git-svn-id: https://svn.eduke32.com/eduke32@94 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2006-04-23 03:14:44 +00:00
parent 62f08cabe9
commit d99888e472
5 changed files with 23 additions and 9 deletions

View file

@ -433,7 +433,7 @@ extern char buf[1024]; //My own generic input buffer
#define MAXQUOTELEN 64
extern char *fta_quotes[NUMOFFIRSTTIMEACTIVE];
extern char *fta_quotes[NUMOFFIRSTTIMEACTIVE],*redefined_quotes[NUMOFFIRSTTIMEACTIVE];
extern char scantoasc[128],ready2send;
extern char scantoascwithshift[128];

View file

@ -6298,7 +6298,7 @@ char cheatquotes[][MAXCHEATLEN] = {
"keys", // 23
"debug", // 24
"<RESERVED>", // 25
"screamforme", // 26
"sfm", // 26
};
enum cheats {
@ -7967,6 +7967,8 @@ void loadtmb(void)
void Shutdown( void )
{
int i;
SoundShutdown();
MusicShutdown();
uninittimer();
@ -7974,6 +7976,13 @@ void Shutdown( void )
CONTROL_Shutdown();
CONFIG_WriteSetup();
KB_Shutdown();
for(i=0;i<NUMOFFIRSTTIMEACTIVE;i++)
{
if(fta_quotes[i] != NULL)
Bfree(fta_quotes[i]);
if(redefined_quotes[i] != NULL)
Bfree(redefined_quotes[i]);
}
}
/*

View file

@ -41,7 +41,6 @@ signed char checking_switch = 0, current_event = -1;
char labelsonly = 0, nokeywordcheck = 0, dynamicremap = 0;
static short num_braces = 0; // init to some sensible defaults
char *redefined_quotes[NUMOFFIRSTTIMEACTIVE];
int redefined_quote_count = 0;
long *aplWeaponClip[MAX_WEAPONS]; // number of items in magazine
@ -4542,6 +4541,11 @@ repeatcase:
{
if(fta_quotes[k] == NULL)
fta_quotes[k] = Bmalloc(sizeof(char) * MAXQUOTELEN);
if (!fta_quotes[k])
{
fta_quotes[k] = NULL;
gameexit("Failed allocating 64 byte quote text buffer.");
}
scriptptr--;
}
@ -4555,6 +4559,11 @@ repeatcase:
redefined_quote_count++;
if(redefined_quotes[redefined_quote_count] == NULL)
redefined_quotes[redefined_quote_count] = Bmalloc(sizeof(char) * MAXQUOTELEN);
if (!redefined_quotes[redefined_quote_count])
{
redefined_quotes[redefined_quote_count] = NULL;
gameexit("Failed allocating 64 byte quote text buffer.");
}
}
while( *textptr != 0x0a && *textptr != 0x0d && *textptr != 0 )
@ -4914,9 +4923,7 @@ void FreeGameVars(void)
aGameVars[i].dwFlags=0;
if(aGameVars[i].plValues)
{
Bfree(aGameVars[i].plValues); // crash point
}
Bfree(aGameVars[i].plValues);
aGameVars[i].plValues=NULL;
}

View file

@ -39,8 +39,6 @@ extern long *actorLoadEventScrptr[MAXTILES];
extern long *apScriptGameEvent[MAXGAMEEVENTS];
extern char *redefined_quotes[NUMOFFIRSTTIMEACTIVE];
extern short otherp;
extern long g_currentweapon;
extern long g_gun_pos;

View file

@ -42,7 +42,7 @@ short animatesect[MAXANIMATES];
long msx[2048],msy[2048];
short cyclers[MAXCYCLERS][6],numcyclers;
char *fta_quotes[NUMOFFIRSTTIMEACTIVE];
char *fta_quotes[NUMOFFIRSTTIMEACTIVE],*redefined_quotes[NUMOFFIRSTTIMEACTIVE];
char tempbuf[2048], packbuf[576];