mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix memory leaks in strategic pathing
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1536 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+4
-4
@@ -470,7 +470,7 @@ Uncomment this to enable the check for files to activate the blood and gore opti
|
||||
if( usTextWidth > OPT_TOGGLE_BOX_TEXT_WIDTH )
|
||||
{
|
||||
//Get how many lines will be used to display the string, without displaying the string
|
||||
UINT8 ubNumLines = DisplayWrappedString( 0, 0, OPT_TOGGLE_BOX_TEXT_WIDTH, 2, OPT_MAIN_FONT, OPT_HIGHLIGHT_COLOR, zOptionsToggleText[ cnt ], FONT_MCOLOR_BLACK, TRUE, LEFT_JUSTIFIED | DONT_DISPLAY_TEXT ) / GetFontHeight( OPT_MAIN_FONT );
|
||||
UINT8 ubNumLines = (UINT8) ( DisplayWrappedString( 0, 0, OPT_TOGGLE_BOX_TEXT_WIDTH, 2, OPT_MAIN_FONT, OPT_HIGHLIGHT_COLOR, zOptionsToggleText[ cnt ], FONT_MCOLOR_BLACK, TRUE, LEFT_JUSTIFIED | DONT_DISPLAY_TEXT ) / GetFontHeight( OPT_MAIN_FONT ) );
|
||||
|
||||
usTextWidth = OPT_TOGGLE_BOX_TEXT_WIDTH;
|
||||
|
||||
@@ -518,7 +518,7 @@ Uncomment this to enable the check for files to activate the blood and gore opti
|
||||
if( usTextWidth > OPT_TOGGLE_BOX_TEXT_WIDTH )
|
||||
{
|
||||
//Get how many lines will be used to display the string, without displaying the string
|
||||
UINT8 ubNumLines = DisplayWrappedString( 0, 0, OPT_TOGGLE_BOX_TEXT_WIDTH, 2, OPT_MAIN_FONT, OPT_HIGHLIGHT_COLOR, zOptionsToggleText[ cnt ], FONT_MCOLOR_BLACK, TRUE, LEFT_JUSTIFIED | DONT_DISPLAY_TEXT ) / GetFontHeight( OPT_MAIN_FONT );
|
||||
UINT8 ubNumLines = (UINT8) ( DisplayWrappedString( 0, 0, OPT_TOGGLE_BOX_TEXT_WIDTH, 2, OPT_MAIN_FONT, OPT_HIGHLIGHT_COLOR, zOptionsToggleText[ cnt ], FONT_MCOLOR_BLACK, TRUE, LEFT_JUSTIFIED | DONT_DISPLAY_TEXT ) / GetFontHeight( OPT_MAIN_FONT ) );
|
||||
|
||||
usTextWidth = OPT_TOGGLE_BOX_TEXT_WIDTH;
|
||||
|
||||
@@ -1052,7 +1052,7 @@ void BtnOptionsTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
void HandleOptionToggle( UINT8 ubButton, BOOLEAN fState, BOOLEAN fDown, BOOLEAN fPlaySound )
|
||||
{
|
||||
static UINT32 uiOptionToggleSound = NO_SAMPLE;
|
||||
UINT32 uiSideToPlaySoundOn = MIDDLEPAN;
|
||||
//UINT32 uiSideToPlaySoundOn = MIDDLEPAN;
|
||||
// static BOOLEAN fCheckBoxDrawnDownLastTime = FALSE;
|
||||
|
||||
if( fState )
|
||||
@@ -1218,7 +1218,7 @@ void HandleSliderBarMovementSounds()
|
||||
{
|
||||
static UINT32 uiLastSoundFxTime=0;
|
||||
static UINT32 uiLastSpeechTime=0;
|
||||
UINT32 uiCurTime = GetJA2Clock();
|
||||
//UINT32 uiCurTime = GetJA2Clock();
|
||||
static UINT32 uiLastPlayingSoundID = NO_SAMPLE;
|
||||
static UINT32 uiLastPlayingSpeechID = NO_SAMPLE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user