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:
Overhaul
2007-10-20 08:40:25 +00:00
parent b170dbb1e5
commit 13288fd750
10 changed files with 68 additions and 28 deletions
+4 -4
View File
@@ -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;