Added minigame hook ups.

This commit is contained in:
Justin Marshall
2026-05-22 20:01:49 -07:00
parent e7b269b082
commit d24553b366
9 changed files with 563 additions and 0 deletions
+30
View File
@@ -1048,6 +1048,36 @@ bool idRenderSystemLocal::UploadImage( const char *imageName, const byte *data,
return true;
}
/*
===============
idRenderSystemLocal::CreateScratchImage
===============
*/
bool idRenderSystemLocal::CreateScratchImage( const char *imageName, int width, int height ) {
if ( !imageName || !imageName[0] || width <= 0 || height <= 0 ) {
return false;
}
idImage *image = globalImages->GetImage( imageName );
if ( !image ) {
image = globalImages->AllocImage( imageName );
}
if ( !image ) {
return false;
}
const int bytes = width * height * 4;
byte *data = (byte *)Mem_Alloc( bytes );
memset( data, 0, bytes );
for ( int i = 3; i < bytes; i += 4 ) {
data[i] = 255;
}
image->GenerateImage( data, width, height, TF_LINEAR, false, TR_CLAMP, TD_DEFAULT );
Mem_Free( data );
return true;
}
/*
===============
idRenderSystemLocal::LoadImage