mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Initialized many variables
Fix for enemy invasions and reinforcements git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1192 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+26
-18
@@ -2968,7 +2968,7 @@ BOOLEAN AddTopMessage( UINT8 ubType, STR16 pzString )
|
||||
void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, STR16 psString )
|
||||
{
|
||||
UINT32 uiBAR, uiPLAYERBAR, uiINTBAR;
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
INT16 sX, sY;
|
||||
INT32 cnt2;
|
||||
INT16 sBarX = 0;
|
||||
@@ -2983,7 +2983,7 @@ void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, STR16 psString )
|
||||
|
||||
if (iResolution == 0)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\rect.sti", VObjectDesc.ImageFile);
|
||||
FilenameForBPP("INTERFACE\\rect.sti", VObjectDesc.ImageFile);
|
||||
}
|
||||
else if (iResolution == 1)
|
||||
{
|
||||
@@ -2993,6 +2993,11 @@ void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, STR16 psString )
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\rect_1024x768.sti", VObjectDesc.ImageFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
AssertMsg( 0, "Invalid resolution");
|
||||
return;
|
||||
}
|
||||
|
||||
if( !AddVideoObject( &VObjectDesc, &uiBAR ) )
|
||||
AssertMsg(0, "Missing INTERFACE\\rect.sti" );
|
||||
@@ -3003,40 +3008,44 @@ void CreateTopMessage( UINT32 uiSurface, UINT8 ubType, STR16 psString )
|
||||
if (iResolution == 0)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\timebargreen.sti", VObjectDesc.ImageFile);
|
||||
if( !AddVideoObject( &VObjectDesc, &uiPLAYERBAR ) )
|
||||
AssertMsg(0, "Missing INTERFACE\\timebargreen.sti" );
|
||||
}
|
||||
else if (iResolution == 1)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\timebargreen_800x600.sti", VObjectDesc.ImageFile);
|
||||
if( !AddVideoObject( &VObjectDesc, &uiPLAYERBAR ) )
|
||||
AssertMsg(0, "Missing INTERFACE\\timebargreen_800x600.sti" );
|
||||
}
|
||||
else if (iResolution == 2)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\timebargreen_1024x768.sti", VObjectDesc.ImageFile);
|
||||
if( !AddVideoObject( &VObjectDesc, &uiPLAYERBAR ) )
|
||||
AssertMsg(0, "Missing INTERFACE\\timebargreen_1024x768.sti" );
|
||||
}
|
||||
else
|
||||
{
|
||||
AssertMsg( 0, "Invalid resolution");
|
||||
return;
|
||||
}
|
||||
|
||||
if( !AddVideoObject( &VObjectDesc, &uiPLAYERBAR ) )
|
||||
AssertMsg(0, String( "Missing %s", VObjectDesc.ImageFile) );
|
||||
|
||||
if (iResolution == 0)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\timebaryellow.sti", VObjectDesc.ImageFile);
|
||||
if( !AddVideoObject( &VObjectDesc, &uiINTBAR ) )
|
||||
AssertMsg(0, "Missing INTERFACE\\timebaryellow.sti" );
|
||||
FilenameForBPP("INTERFACE\\timebaryellow.sti", VObjectDesc.ImageFile);
|
||||
}
|
||||
else if (iResolution == 1)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\timebaryellow_800x600.sti", VObjectDesc.ImageFile);
|
||||
if( !AddVideoObject( &VObjectDesc, &uiINTBAR ) )
|
||||
AssertMsg(0, "Missing INTERFACE\\timebaryellow_800x600.sti" );
|
||||
}
|
||||
else if (iResolution == 2)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\timebaryellow_1024x768.sti", VObjectDesc.ImageFile);
|
||||
if( !AddVideoObject( &VObjectDesc, &uiINTBAR ) )
|
||||
AssertMsg(0, "Missing INTERFACE\\timebaryellow_1024x768.sti" );
|
||||
}
|
||||
else
|
||||
{
|
||||
AssertMsg( 0, "Invalid resolution");
|
||||
return;
|
||||
}
|
||||
|
||||
if( !AddVideoObject( &VObjectDesc, &uiINTBAR ) )
|
||||
AssertMsg(0, String( "Missing %s", VObjectDesc.ImageFile) );
|
||||
|
||||
// Change dest buffer
|
||||
SetFontDestBuffer( uiSurface , 0, 0, SCREEN_WIDTH , 20, FALSE );
|
||||
@@ -3837,13 +3846,12 @@ void RenderAimCubeUI( )
|
||||
|
||||
if ( gfInAimCubeUI )
|
||||
{
|
||||
// Determine screen location....
|
||||
GetGridNoScreenPos( gCubeUIData.sGridNo, gCubeUIData.ubLevel, &sScreenX, &sScreenY );
|
||||
|
||||
// OK, given height
|
||||
if ( gCubeUIData.fShowHeight )
|
||||
{
|
||||
// Determine screen location....
|
||||
GetGridNoScreenPos( gCubeUIData.sGridNo, gCubeUIData.ubLevel, &sScreenX, &sScreenY );
|
||||
|
||||
// Save background
|
||||
iBack = RegisterBackgroundRect( BGND_FLAG_SINGLE, NULL, sScreenX, (INT16)(sScreenY - 70 ), (INT16)(sScreenX + 40 ), (INT16)(sScreenY + 50 ) );
|
||||
if ( iBack != -1 )
|
||||
|
||||
Reference in New Issue
Block a user