diff --git a/docs/rh-log.txt b/docs/rh-log.txt index cb965c2b6..ce238f6f8 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,14 @@ +January 26, 2007 (Changes by Graf Zahl) +- Fixed: The rewrite of FMemLump broke the non-standard use of it in + P_TranslateLinedefs. +- Fixed: ShowErrorPane can be called before ST_NetDone is valid so it has to + check whether it is NULL. +- Fixed: The Megasphere had an incorrect pickup sound. + +January 25, 2007 (Changes by Graf Zahl) +- Fixed: The new video initialization code could set the screen's Font pointer + to NULL, causing a crash with levels that start in a secret sector. + January 24, 2007 - Fixed: If you called the FString assignment operator that accepts a const char * with a string inside its buffer, it released the buffer diff --git a/src/p_xlat.cpp b/src/p_xlat.cpp index 6b601e29e..2cf2e1eb0 100644 --- a/src/p_xlat.cpp +++ b/src/p_xlat.cpp @@ -48,6 +48,7 @@ #include "w_wad.h" #include "sc_man.h" #include "cmdlib.h" +#include "i_system.h" // define names for the TriggerType field of the general linedefs @@ -63,10 +64,17 @@ typedef enum PushMany, } triggertype_e; + +BYTE *tlatetab; + +static void Freetlate() +{ + if (tlatetab != NULL) delete [] tlatetab; + tlatetab = NULL; +} + void P_TranslateLineDef (line_t *ld, maplinedef_t *mld) { - static FMemLump tlatebase; - const BYTE *tlate; short special = LittleShort(mld->special); short tag = LittleShort(mld->tag); DWORD flags = LittleShort(mld->flags); @@ -121,22 +129,31 @@ void P_TranslateLineDef (line_t *ld, maplinedef_t *mld) return; } - if (tlatebase.GetMem() == NULL) + if (tlatetab == NULL) { + const char *lumpname; + int lumpnum, lumplen; if (gameinfo.gametype == GAME_Doom) { - tlatebase = Wads.ReadLump ("DOOMX"); + lumpname = "DOOMX"; } else if (gameinfo.gametype == GAME_Strife) { - tlatebase = Wads.ReadLump ("STRIFEX"); + lumpname = "STRIFEX"; } else { - tlatebase = Wads.ReadLump ("HERETICX"); + lumpname = "HERETICX"; } + + lumpnum = Wads.GetNumForName (lumpname); + lumplen = Wads.LumpLength(lumpnum); + + tlatetab = new BYTE[lumplen]; + Wads.ReadLump(lumpnum, tlatetab); + atterm(Freetlate); } - tlate = (const BYTE *)tlatebase.GetMem(); + BYTE *tlate = tlatetab; // Check if this is a regular linetype if (tlate[0] == 'N' && tlate[1] == 'O' && tlate[2] == 'R' && tlate[3] == 'M') diff --git a/src/v_video.cpp b/src/v_video.cpp index 84f9bbe57..42579c41b 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -988,7 +988,7 @@ void V_Init2() Printf ("Resolution: %d x %d\n", SCREENWIDTH, SCREENHEIGHT); screen->SetGamma (gamma); - screen->SetFont (font); + if (font != NULL) screen->SetFont (font); FBaseCVar::ResetColors (); C_NewModeAdjust(); M_InitVideoModesMenu(); diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index ad9916e9d..3823395fb 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -677,7 +677,7 @@ void ShowErrorPane(const char *text) } SetWindowText (Window, "Fatal Error - " WINDOW_TITLE); - ST_NetDone(); // Ensure that the network pane is hidden. + if (ST_NetDone != NULL) ST_NetDone(); // Ensure that the network pane is hidden. ErrorIcon = CreateWindowEx (WS_EX_NOPARENTNOTIFY, "STATIC", NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | SS_OWNERDRAW, 0, 0, 0, 0, Window, NULL, g_hInst, NULL); if (ErrorIcon != NULL) { diff --git a/wadsrc/decorate/doom/doomartifacts.txt b/wadsrc/decorate/doom/doomartifacts.txt index 0c8009f77..cedc7d17e 100644 --- a/wadsrc/decorate/doom/doomartifacts.txt +++ b/wadsrc/decorate/doom/doomartifacts.txt @@ -58,6 +58,7 @@ ACTOR Megasphere : CustomInventory 83 +COUNTITEM +INVENTORY.ALWAYSPICKUP Inventory.PickupMessage "$GOTMSPHERE" + Inventory.PickupSound "misc/p_pkup" States { Spawn: