diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 666ee2eb4c..869e645d8e 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +June 4, 2008 +- Removed the 8-character limit on endpic names from the parser. (Though it + might still be present in the texture manager; I don't remember.) +- Fixed: EndSequence needs a proper constructor. + June 4, 2008 (Changes by Graf Zahl) - Fixed: The EndSequence structure was not fully initialized. - While doing the interpolation rewrite I noticed that DScroller and DPolyAction diff --git a/src/g_level.cpp b/src/g_level.cpp index 574f7b16a6..5fac9d282b 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -111,6 +111,14 @@ static FRandom pr_classchoice ("RandomPlayerClassChoice"); TArray EndSequences; +EndSequence::EndSequence() +{ + EndType = END_Pic; + Advanced = false; + MusicLooping = false; + PlayTheEnd = false; +} + extern bool timingdemo; // Start time for timing demos @@ -897,7 +905,6 @@ static void ParseMapInfoLower (FScanner &sc, EndSequence newSeq; bool useseq = false; - memset(&newSeq, 0, sizeof(newSeq)); sc.MustGetString (); if (IsNum (sc.String)) { @@ -926,18 +933,15 @@ static void ParseMapInfoLower (FScanner &sc, { sc.MustGetString(); newSeq.EndType = END_Pic; - strncpy (newSeq.PicName, sc.String, 8); - newSeq.PicName[8] = 0; + newSeq.PicName = sc.String; } else if (sc.Compare("hscroll")) { newSeq.EndType = END_Bunny; sc.MustGetString(); - strncpy (newSeq.PicName, sc.String, 8); - newSeq.PicName[8] = 0; + newSeq.PicName = sc.String; sc.MustGetString(); - strncpy (newSeq.PicName2, sc.String, 8); - newSeq.PicName2[8] = 0; + newSeq.PicName2 = sc.String; if (sc.CheckNumber()) newSeq.PlayTheEnd = !!sc.Number; } @@ -945,11 +949,9 @@ static void ParseMapInfoLower (FScanner &sc, { newSeq.EndType = END_Demon; sc.MustGetString(); - strncpy (newSeq.PicName, sc.String, 8); - newSeq.PicName[8] = 0; + newSeq.PicName = sc.String; sc.MustGetString(); - strncpy (newSeq.PicName2, sc.String, 8); - newSeq.PicName2[8] = 0; + newSeq.PicName2 = sc.String; } else if (sc.Compare("cast")) { @@ -987,8 +989,7 @@ static void ParseMapInfoLower (FScanner &sc, { sc.MustGetString (); newSeq.EndType = END_Pic; - strncpy (newSeq.PicName, sc.String, 8); - newSeq.PicName[8] = 0; + newSeq.PicName = sc.String; useseq = true; } else if (sc.Compare ("endbunny")) @@ -1372,7 +1373,6 @@ static void SetEndSequence (char *nextmap, int type) { EndSequence newseq; newseq.EndType = type; - memset (newseq.PicName, 0, sizeof(newseq.PicName)); seqnum = (int)EndSequences.Push (newseq); } strcpy (nextmap, "enDSeQ"); diff --git a/src/g_level.h b/src/g_level.h index 31178ddfc2..82844ca359 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -287,9 +287,11 @@ struct EndSequence bool Advanced; bool MusicLooping; bool PlayTheEnd; - char PicName[9]; - char PicName2[9]; + FString PicName; + FString PicName2; FString Music; + + EndSequence(); }; extern TArray EndSequences; diff --git a/src/po_man.cpp b/src/po_man.cpp index ab9109f356..226682ae87 100644 --- a/src/po_man.cpp +++ b/src/po_man.cpp @@ -1699,4 +1699,4 @@ FPolyObj::~FPolyObj() delete[] prevPts; prevPts = NULL; } -} \ No newline at end of file +} diff --git a/src/textures/texturemanager.cpp b/src/textures/texturemanager.cpp index daa85a215c..bce5b22a0f 100644 --- a/src/textures/texturemanager.cpp +++ b/src/textures/texturemanager.cpp @@ -852,7 +852,7 @@ void FTextureManager::SortTexturesByType(int start, int end) FTexture::TEX_Override, FTexture::TEX_MiscPatch }; - for(int i=0;i