- 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.
- Some more GCC warning removals.



SVN r1021 (trunk)
This commit is contained in:
Randy Heit 2008-06-05 04:30:18 +00:00
parent 728163efb4
commit a4dc93fb91
7 changed files with 29 additions and 22 deletions

View File

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

View File

@ -111,6 +111,14 @@ static FRandom pr_classchoice ("RandomPlayerClassChoice");
TArray<EndSequence> 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");

View File

@ -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<EndSequence> EndSequences;

View File

@ -1699,4 +1699,4 @@ FPolyObj::~FPolyObj()
delete[] prevPts;
prevPts = NULL;
}
}
}

View File

@ -852,7 +852,7 @@ void FTextureManager::SortTexturesByType(int start, int end)
FTexture::TEX_Override, FTexture::TEX_MiscPatch
};
for(int i=0;i<countof(texturetypes);i++)
for(unsigned int i=0;i<countof(texturetypes);i++)
{
for(unsigned j = 0; j<newtextures.Size(); j++)
{

View File

@ -1674,9 +1674,9 @@ FILE *err;
spcnt += k;
for(; argv[i]; i++) fprintf(err," %s",argv[i]);
if( spcnt<20 ){
fprintf(err,"\n%*s^-- here\n",spcnt,"");
fprintf(err,"\n%*s^-- here\n",(int)spcnt,"");
}else{
fprintf(err,"\n%*shere --^\n",spcnt-7,"");
fprintf(err,"\n%*shere --^\n",(int)spcnt-7,"");
}
}
@ -1915,7 +1915,7 @@ void OptPrint(){
switch( op[i].type ){
case OPT_FLAG:
case OPT_FFLAG:
fprintf(errstream," -%-*s %s\n",max,op[i].label,op[i].message);
fprintf(errstream," -%-*s %s\n",(int)max,op[i].label,op[i].message);
break;
case OPT_INT:
case OPT_FINT:

View File

@ -148,7 +148,7 @@ int appendtozip (zipFile zipfile, const char * zipname, const char *filename)
if (readbuf == NULL)
{
fclose(lumpfile);
fprintf (stderr, "Could not allocate %d bytes\n", len);
fprintf (stderr, "Could not allocate %u bytes\n", (int)len);
return 1;
}
// read the whole source file into buffer