mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-01 09:41:58 +00:00
Update to ZDoom r1083. Not fully tested yet!
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or FStrings, depending on the situation. - Changed the strings in the wbstartstruct to be FStrings. - Changed myvsnprintf() to output nothing if count is greater than INT_MAX. This is so that I can use a series of mysnprintf() calls and advance the pointer for each one. Once the pointer goes beyond the end of the buffer, the count will go negative, but since it's an unsigned type it will be seen as excessively huge instead. This should not be a problem, as there's no reason for ZDoom to be using text buffers larger than 2 GB anywhere. - Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig(). - Changed CalcMapName() to return an FString instead of a pointer to a static buffer. - Changed startmap in d_main.cpp into an FString. - Changed CheckWarpTransMap() to take an FString& as the first argument. - Changed d_mapname in g_level.cpp into an FString. - Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an FString. - Fixed: The MAPINFO parser wrote into the string buffer to construct a map name when given a Hexen map number. This was fine with the old scanner code, but only a happy coincidence prevents it from crashing with the new code. - Added the 'B' conversion specifier to StringFormat::VWorker() for printing binary numbers. - Added CMake support for building with MinGW, MSYS, and NMake. Linux support is probably broken until I get around to booting into Linux again. Niceties provided over the existing Makefiles they're replacing: * All command-line builds can use the same build system, rather than having a separate one for MinGW and another for Linux. * Microsoft's NMake tool is supported as a target. * Progress meters. * Parallel makes work from a fresh checkout without needing to be primed first with a single-threaded make. * Porting to other architectures should be simplified, whenever that day comes. - Replaced the makewad tool with zipdir. This handles the dependency tracking itself instead of generating an external makefile to do it, since I couldn't figure out how to generate a makefile with an external tool and include it with a CMake-generated makefile. Where makewad used a master list of files to generate the package file, zipdir just zips the entire contents of one or more directories. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@138 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
3839d89923
commit
d65fc51c06
841 changed files with 2180 additions and 34802 deletions
|
@ -1401,7 +1401,7 @@ void M_QuickSave ()
|
|||
M_SaveGame (0);
|
||||
return;
|
||||
}
|
||||
sprintf (tempstring, GStrings("QSPROMPT"), quickSaveSlot->Title);
|
||||
mysnprintf (tempstring, countof(tempstring), GStrings("QSPROMPT"), quickSaveSlot->Title);
|
||||
strcpy (savegamestring, quickSaveSlot->Title);
|
||||
M_StartMessage (tempstring, M_QuickSaveResponse, true);
|
||||
}
|
||||
|
@ -1437,7 +1437,7 @@ void M_QuickLoad ()
|
|||
M_LoadGame (0);
|
||||
return;
|
||||
}
|
||||
sprintf (tempstring, GStrings("QLPROMPT"), quickSaveSlot->Title);
|
||||
mysnprintf (tempstring, countof(tempstring), GStrings("QLPROMPT"), quickSaveSlot->Title);
|
||||
M_StartMessage (tempstring, M_QuickLoadResponse, true);
|
||||
}
|
||||
|
||||
|
@ -1519,20 +1519,20 @@ void M_DrawHereticMainMenu ()
|
|||
{
|
||||
int frame = (MenuTime / 5) % 7;
|
||||
|
||||
sprintf (name, "FBUL%c0", (frame+2)%7 + 'A');
|
||||
mysnprintf (name, countof(name), "FBUL%c0", (frame+2)%7 + 'A');
|
||||
screen->DrawTexture (TexMan[name], 37, 80, DTA_Clean, true, TAG_DONE);
|
||||
|
||||
sprintf (name, "FBUL%c0", frame + 'A');
|
||||
mysnprintf (name, countof(name), "FBUL%c0", frame + 'A');
|
||||
screen->DrawTexture (TexMan[name], 278, 80, DTA_Clean, true, TAG_DONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
int frame = (MenuTime / 3) % 18;
|
||||
|
||||
sprintf (name, "M_SKL%.2d", 17 - frame);
|
||||
mysnprintf (name, countof(name), "M_SKL%.2d", 17 - frame);
|
||||
screen->DrawTexture (TexMan[name], 40, 10, DTA_Clean, true, TAG_DONE);
|
||||
|
||||
sprintf (name, "M_SKL%.2d", frame);
|
||||
mysnprintf (name, countof(name), "M_SKL%.2d", frame);
|
||||
screen->DrawTexture (TexMan[name], 232, 10, DTA_Clean, true, TAG_DONE);
|
||||
}
|
||||
}
|
||||
|
@ -1666,7 +1666,7 @@ static void DrawClassMenu(void)
|
|||
}
|
||||
screen->DrawTexture (TexMan[boxLumpName[classnum]], 174, 8, DTA_Clean, true, TAG_DONE);
|
||||
|
||||
sprintf (name, walkLumpName[classnum], ((MenuTime >> 3) & 3) + 1);
|
||||
mysnprintf (name, countof(name), walkLumpName[classnum], ((MenuTime >> 3) & 3) + 1);
|
||||
screen->DrawTexture (TexMan[name], 174+24, 8+12, DTA_Clean, true, TAG_DONE);
|
||||
}
|
||||
|
||||
|
@ -2609,9 +2609,8 @@ static void SendNewColor (int red, int green, int blue)
|
|||
{
|
||||
char command[24];
|
||||
|
||||
sprintf (command, "color \"%02x %02x %02x\"", red, green, blue);
|
||||
mysnprintf (command, countof(command), "color \"%02x %02x %02x\"", red, green, blue);
|
||||
C_DoCommand (command);
|
||||
|
||||
R_GetPlayerTranslation (MAKERGB (red, green, blue), &skins[PlayerSkin], translationtables[TRANSLATION_Players][MAXPLAYERS]);
|
||||
}
|
||||
|
||||
|
@ -2967,7 +2966,7 @@ bool M_SaveLoadResponder (event_t *ev)
|
|||
case GK_F1:
|
||||
if (!SelSaveGame->Filename.IsEmpty())
|
||||
{
|
||||
sprintf (workbuf, "File on disk:\n%s", SelSaveGame->Filename.GetChars());
|
||||
mysnprintf (workbuf, countof(workbuf), "File on disk:\n%s", SelSaveGame->Filename.GetChars());
|
||||
if (SaveComment != NULL)
|
||||
{
|
||||
V_FreeBrokenLines (SaveComment);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue