diff options
author | Simon Howard | 2010-09-09 23:13:06 +0000 |
---|---|---|
committer | Simon Howard | 2010-09-09 23:13:06 +0000 |
commit | 120d90c67b2a4aa0a8883c4897241dee2222acd2 (patch) | |
tree | b439e48483ebbd698c2daa6e24eeaaab1ba97470 /src/heretic/g_game.c | |
parent | 79268587fc730e17cbd974a5583c7185604b59a3 (diff) | |
parent | 22fc405736dc4796958de221c07d52432f1b271b (diff) | |
download | chocolate-doom-120d90c67b2a4aa0a8883c4897241dee2222acd2.tar.gz chocolate-doom-120d90c67b2a4aa0a8883c4897241dee2222acd2.tar.bz2 chocolate-doom-120d90c67b2a4aa0a8883c4897241dee2222acd2.zip |
Merge from raven-branch.
Subversion-branch: /branches/strife-branch
Subversion-revision: 2051
Diffstat (limited to 'src/heretic/g_game.c')
-rw-r--r-- | src/heretic/g_game.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c index a256b63b..b37f95e0 100644 --- a/src/heretic/g_game.c +++ b/src/heretic/g_game.c @@ -28,6 +28,7 @@ #include <string.h> #include "doomdef.h" #include "doomkeys.h" +#include "deh_str.h" #include "i_timer.h" #include "i_system.h" #include "m_controls.h" @@ -862,12 +863,16 @@ void G_Ticker(void) { if (netgame) { - strcpy(savedescription, "NET GAME"); + strncpy(savedescription, DEH_String("NET GAME"), + sizeof(savedescription)); } else { - strcpy(savedescription, "SAVE GAME"); + strncpy(savedescription, DEH_String("SAVE GAME"), + sizeof(savedescription)); } + + savedescription[sizeof(savedescription) - 1] = '\0'; } savegameslot = (players[i].cmd. @@ -1320,7 +1325,9 @@ void G_DoLoadGame(void) save_p = savebuffer + SAVESTRINGSIZE; // Skip the description field memset(vcheck, 0, sizeof(vcheck)); - sprintf(vcheck, "version %i", HERETIC_VERSION); + + DEH_snprintf(vcheck, VERSIONSIZE, "version %i", HERETIC_VERSION); + if (strcmp((char *) save_p, vcheck) != 0) { // Bad version return; @@ -1449,11 +1456,11 @@ void G_InitNew(skill_t skill, int episode, int map) // Set the sky map if (episode > 5) { - skytexture = R_TextureNumForName("SKY1"); + skytexture = R_TextureNumForName(DEH_String("SKY1")); } else { - skytexture = R_TextureNumForName(skyLumpNames[episode - 1]); + skytexture = R_TextureNumForName(DEH_String(skyLumpNames[episode - 1])); } // @@ -1694,7 +1701,7 @@ void G_DoSaveGame(void) SV_Open(name); SV_Write(description, SAVESTRINGSIZE); memset(verString, 0, sizeof(verString)); - sprintf(verString, "version %i", HERETIC_VERSION); + DEH_snprintf(verString, VERSIONSIZE, "version %i", HERETIC_VERSION); SV_Write(verString, VERSIONSIZE); SV_WriteByte(gameskill); SV_WriteByte(gameepisode); @@ -1714,7 +1721,7 @@ void G_DoSaveGame(void) gameaction = ga_nothing; savedescription[0] = 0; - P_SetMessage(&players[consoleplayer], TXT_GAMESAVED, true); + P_SetMessage(&players[consoleplayer], DEH_String(TXT_GAMESAVED), true); } //========================================================================== |