Commit 59d39cf1 authored by Steven Fuller's avatar Steven Fuller

Fixed bug in wl_text (tried to free a ptr on its own instead of calling

uncache)
parent 97af6bcd
CC = gcc CC = gcc
#CFLAGS = -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro CFLAGS = -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
CFLAGS = -g -Wall #CFLAGS = -g -Wall
#CFLAGS = -g #CFLAGS = -g
#CFLAGS = -Os #CFLAGS = -Os
OBJS = objs.o misc.o id_ca.o id_sd.o id_vh.o id_us.o \ OBJS = objs.o misc.o id_ca.o id_sd.o id_vh.o id_us.o \
......
...@@ -3,3 +3,6 @@ Just some random facts/thoughts/ideas/musings: ...@@ -3,3 +3,6 @@ Just some random facts/thoughts/ideas/musings:
Wolfenstein 3D was originally planned to be a much more complex game. ... Wolfenstein 3D was originally planned to be a much more complex game. ...
... lots of unused code ... possibly from previous projects and incarnations ... lots of unused code ... possibly from previous projects and incarnations
of wolf3d. of wolf3d.
1.4 of Wolfenstein 3D (full) had a Read Me! option. The text still exists in
the data file, but all the graphics are off.
...@@ -69,6 +69,8 @@ idea is that different <outputs> can share some drivers, unlike video ...@@ -69,6 +69,8 @@ idea is that different <outputs> can share some drivers, unlike video
* check filehandling (ex, file missing, bad file type, and such) * check filehandling (ex, file missing, bad file type, and such)
PlayDemoFromFile specifically PlayDemoFromFile specifically
* make sure all infinite loops are found (looping around Keyboard) * make sure all infinite loops are found (looping around Keyboard)
* deathcam went by too fast, and right before the fizzlefade was being done
on the border
Specific: Specific:
* memory/sound intro screen goes * memory/sound intro screen goes
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/* SDM = 2 */ /* SDM = 2 */
/* SOD = 3 */ /* SOD = 3 */
#ifndef WMODE #ifndef WMODE
#define WMODE 2 #define WMODE 1
#endif #endif
#if WMODE == 0 #if WMODE == 0
......
...@@ -1187,11 +1187,15 @@ void Quit(char *error) ...@@ -1187,11 +1187,15 @@ void Quit(char *error)
void DemoLoop (void) void DemoLoop (void)
{ {
static int LastDemo;
int i; int i;
// //
// main game cycle // main game cycle
// //
LastDemo = 0;
#if !defined(GOODTIMES) && defined(SPEAR) && !defined(SPEARDEMO) #if !defined(GOODTIMES) && defined(SPEAR) && !defined(SPEARDEMO)
CopyProtection(); CopyProtection();
#endif #endif
......
...@@ -130,7 +130,7 @@ int Confirm(char *string); ...@@ -130,7 +130,7 @@ int Confirm(char *string);
void Message(char *string); void Message(char *string);
void CheckPause(void); void CheckPause(void);
void ShootSnd(void); void ShootSnd(void);
void CheckSecretMissions(void); void FreeMusic(void);
void BossKey(void); void BossKey(void);
void DrawGun(CP_iteminfo *item_i,CP_itemtype *items,int x,int *y,int which,int basey,void (*routine)(int w)); void DrawGun(CP_iteminfo *item_i,CP_itemtype *items,int x,int *y,int which,int basey,void (*routine)(int w));
......
...@@ -590,8 +590,6 @@ void CheckKeys (void) ...@@ -590,8 +590,6 @@ void CheckKeys (void)
scan = LastScan; scan = LastScan;
#ifdef SPEAR
// //
// SECRET CHEAT CODE: TAB-G-F10 // SECRET CHEAT CODE: TAB-G-F10
// //
...@@ -617,8 +615,6 @@ void CheckKeys (void) ...@@ -617,8 +615,6 @@ void CheckKeys (void)
IN_ClearKeysDown(); IN_ClearKeysDown();
return; return;
} }
#endif
// //
// SECRET CHEAT CODE: 'MLI' // SECRET CHEAT CODE: 'MLI'
...@@ -660,17 +656,10 @@ void CheckKeys (void) ...@@ -660,17 +656,10 @@ void CheckKeys (void)
// //
// OPEN UP DEBUG KEYS // OPEN UP DEBUG KEYS
// //
#ifndef SPEAR
if (Keyboard[sc_BackSpace] &&
Keyboard[sc_LShift] &&
Keyboard[sc_Alt] &&
MS_CheckParm("goobers"))
#else
if (Keyboard[sc_BackSpace] && if (Keyboard[sc_BackSpace] &&
Keyboard[sc_LShift] && Keyboard[sc_LShift] &&
Keyboard[sc_Alt] && Keyboard[sc_Alt] &&
MS_CheckParm("debugmode")) MS_CheckParm("debugmode"))
#endif
{ {
ClearMemory (); ClearMemory ();
CA_CacheGrChunk (STARTFONT+1); CA_CacheGrChunk (STARTFONT+1);
......
...@@ -347,12 +347,11 @@ void HandleCtrls (void) ...@@ -347,12 +347,11 @@ void HandleCtrls (void)
===================== =====================
*/ */
void HandleWord (void) void HandleWord()
{ {
char words[WORDLIMIT]; char words[WORDLIMIT];
int i, wordindex; int wordindex;
word wwidth,wheight,newpos; word wwidth, wheight, newpos;
// //
// copy the next word into words[] // copy the next word into words[]
...@@ -591,10 +590,9 @@ void CacheLayoutGraphics (void) ...@@ -591,10 +590,9 @@ void CacheLayoutGraphics (void)
===================== =====================
*/ */
void ShowArticle (char *article) void ShowArticle(char *article)
{ {
unsigned oldfontnumber; unsigned oldfontnumber;
unsigned temp;
boolean newpage,firstpage; boolean newpage,firstpage;
...@@ -651,10 +649,8 @@ void ShowArticle (char *article) ...@@ -651,10 +649,8 @@ void ShowArticle (char *article)
break; break;
} }
#ifndef SPEAR
if (Keyboard[sc_Tab] && Keyboard[sc_P] && MS_CheckParm("goobers")) if (Keyboard[sc_Tab] && Keyboard[sc_P] && MS_CheckParm("goobers"))
PicturePause(); PicturePause();
#endif
} while (LastScan != sc_Escape); } while (LastScan != sc_Escape);
...@@ -679,10 +675,8 @@ int helpextern = T_HELPART; ...@@ -679,10 +675,8 @@ int helpextern = T_HELPART;
*/ */
void HelpScreens (void) void HelpScreens (void)
{ {
int artnum; int artnum;
char *text; char *text;
memptr layout;
CA_UpLevel (); CA_UpLevel ();
MM_SortMem (); MM_SortMem ();
...@@ -694,13 +688,13 @@ void HelpScreens (void) ...@@ -694,13 +688,13 @@ void HelpScreens (void)
ShowArticle (text); ShowArticle (text);
MM_FreePtr (&grsegs[artnum]); CA_UnCacheGrChunk(artnum);
VW_FadeOut(); VW_FadeOut();
FreeMusic (); FreeMusic();
CA_DownLevel (); CA_DownLevel();
MM_SortMem (); MM_SortMem();
} }
// //
...@@ -708,10 +702,8 @@ void HelpScreens (void) ...@@ -708,10 +702,8 @@ void HelpScreens (void)
// //
void EndText (void) void EndText (void)
{ {
int artnum; int artnum;
char *text; char *text;
memptr layout;
ClearMemory (); ClearMemory ();
...@@ -725,15 +717,15 @@ void EndText (void) ...@@ -725,15 +717,15 @@ void EndText (void)
ShowArticle (text); ShowArticle (text);
MM_FreePtr (&grsegs[artnum]); CA_UnCacheGrChunk(artnum);
VW_FadeOut(); VW_FadeOut();
SETFONTCOLOR(0,15); SETFONTCOLOR(0,15);
IN_ClearKeysDown(); IN_ClearKeysDown();
FreeMusic (); FreeMusic();
CA_DownLevel (); CA_DownLevel();
MM_SortMem (); MM_SortMem();
} }
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment