- 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.
- 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.


SVN r464 (trunk)
This commit is contained in:
Christoph Oelckers 2007-01-26 21:46:47 +00:00
parent af13d6d686
commit 37f701a462
5 changed files with 38 additions and 9 deletions

View file

@ -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 January 24, 2007
- Fixed: If you called the FString assignment operator that accepts a - Fixed: If you called the FString assignment operator that accepts a
const char * with a string inside its buffer, it released the buffer const char * with a string inside its buffer, it released the buffer

View file

@ -48,6 +48,7 @@
#include "w_wad.h" #include "w_wad.h"
#include "sc_man.h" #include "sc_man.h"
#include "cmdlib.h" #include "cmdlib.h"
#include "i_system.h"
// define names for the TriggerType field of the general linedefs // define names for the TriggerType field of the general linedefs
@ -63,10 +64,17 @@ typedef enum
PushMany, PushMany,
} triggertype_e; } triggertype_e;
BYTE *tlatetab;
static void Freetlate()
{
if (tlatetab != NULL) delete [] tlatetab;
tlatetab = NULL;
}
void P_TranslateLineDef (line_t *ld, maplinedef_t *mld) void P_TranslateLineDef (line_t *ld, maplinedef_t *mld)
{ {
static FMemLump tlatebase;
const BYTE *tlate;
short special = LittleShort(mld->special); short special = LittleShort(mld->special);
short tag = LittleShort(mld->tag); short tag = LittleShort(mld->tag);
DWORD flags = LittleShort(mld->flags); DWORD flags = LittleShort(mld->flags);
@ -121,22 +129,31 @@ void P_TranslateLineDef (line_t *ld, maplinedef_t *mld)
return; return;
} }
if (tlatebase.GetMem() == NULL) if (tlatetab == NULL)
{ {
const char *lumpname;
int lumpnum, lumplen;
if (gameinfo.gametype == GAME_Doom) if (gameinfo.gametype == GAME_Doom)
{ {
tlatebase = Wads.ReadLump ("DOOMX"); lumpname = "DOOMX";
} }
else if (gameinfo.gametype == GAME_Strife) else if (gameinfo.gametype == GAME_Strife)
{ {
tlatebase = Wads.ReadLump ("STRIFEX"); lumpname = "STRIFEX";
} }
else 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 // Check if this is a regular linetype
if (tlate[0] == 'N' && tlate[1] == 'O' && tlate[2] == 'R' && tlate[3] == 'M') if (tlate[0] == 'N' && tlate[1] == 'O' && tlate[2] == 'R' && tlate[3] == 'M')

View file

@ -988,7 +988,7 @@ void V_Init2()
Printf ("Resolution: %d x %d\n", SCREENWIDTH, SCREENHEIGHT); Printf ("Resolution: %d x %d\n", SCREENWIDTH, SCREENHEIGHT);
screen->SetGamma (gamma); screen->SetGamma (gamma);
screen->SetFont (font); if (font != NULL) screen->SetFont (font);
FBaseCVar::ResetColors (); FBaseCVar::ResetColors ();
C_NewModeAdjust(); C_NewModeAdjust();
M_InitVideoModesMenu(); M_InitVideoModesMenu();

View file

@ -677,7 +677,7 @@ void ShowErrorPane(const char *text)
} }
SetWindowText (Window, "Fatal Error - " WINDOW_TITLE); 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); 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) if (ErrorIcon != NULL)
{ {

View file

@ -58,6 +58,7 @@ ACTOR Megasphere : CustomInventory 83
+COUNTITEM +COUNTITEM
+INVENTORY.ALWAYSPICKUP +INVENTORY.ALWAYSPICKUP
Inventory.PickupMessage "$GOTMSPHERE" Inventory.PickupMessage "$GOTMSPHERE"
Inventory.PickupSound "misc/p_pkup"
States States
{ {
Spawn: Spawn: