mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
New feature: quest & intel map overlay
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23742&goto=353499&#msg_353499 Requires GameDir >= r2424 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8560 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1842,4 +1842,32 @@ void PerformVideoInfoDumpIntoFile( const STR8 filename, BOOLEAN fAppend )
|
||||
|
||||
#endif
|
||||
|
||||
// Flugente: retrieve width and height of video object
|
||||
void GetVideoObjectDimensions( HVOBJECT hSrcVObject, UINT16 usIndex, UINT16& rusWidth, UINT16& rusHeight )
|
||||
{
|
||||
rusWidth = 0;
|
||||
rusHeight = 0;
|
||||
|
||||
if ( hSrcVObject == NULL )
|
||||
return;
|
||||
|
||||
switch ( hSrcVObject->ubBitDepth )
|
||||
{
|
||||
case 32:
|
||||
case 16:
|
||||
if ( usIndex < hSrcVObject->usNumberOf16BPPObjects )
|
||||
{
|
||||
rusWidth = hSrcVObject->p16BPPObject[usIndex].usWidth;
|
||||
rusHeight = hSrcVObject->p16BPPObject[usIndex].usHeight;
|
||||
}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if ( usIndex < hSrcVObject->usNumberOfObjects )
|
||||
{
|
||||
rusWidth = hSrcVObject->pETRLEObject[usIndex].usWidth;
|
||||
rusHeight = hSrcVObject->pETRLEObject[usIndex].usHeight;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user