diff --git a/src/dehacked.c b/src/dehacked.c index 1d56f613..e3a90683 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -1117,6 +1117,11 @@ static void readlevelheader(MYFILE *f, INT32 num) deh_strlcpy(mapheaderinfo[num-1]->lvlttl, word2, sizeof(mapheaderinfo[num-1]->lvlttl), va("Level header %d: levelname", num)); } + else if (fastcmp(word, "ZONETITLE")) + { + deh_strlcpy(mapheaderinfo[num-1]->zonttl, word2, + sizeof(mapheaderinfo[num-1]->zonttl), va("Level header %d: zonetitle", num)); + } else if (fastcmp(word, "SCRIPTNAME")) { deh_strlcpy(mapheaderinfo[num-1]->scriptname, word2, diff --git a/src/doomdef.h b/src/doomdef.h index 8a11343c..e0b58a4e 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -142,17 +142,17 @@ extern FILE *logstream; #define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3 #ifdef DEVELOP -#define VERSION 103 // Game version -#define SUBVERSION 20 // more precise version number +#define VERSION 104 // Game version +#define SUBVERSION 0 // more precise version number #define VERSIONSTRING "Development EXE" -#define VERSIONSTRINGW "v1.3.20" +#define VERSIONSTRINGW "v1.4.0" // most interface strings are ignored in development mode. // we use comprevision and compbranch instead. #else -#define VERSION 103 // Game version -#define SUBVERSION 20 // more precise version number -#define VERSIONSTRING "DevEXE v1.3.20" -#define VERSIONSTRINGW L"v1.3.20" +#define VERSION 104 // Game version +#define SUBVERSION 0 // more precise version number +#define VERSIONSTRING "DevEXE v1.4.0" +#define VERSIONSTRINGW L"v1.4.0" // Hey! If you change this, add 1 to the MODVERSION below! // Otherwise we can't force updates! #endif diff --git a/src/doomstat.h b/src/doomstat.h index cf0480c4..f3955e39 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -213,6 +213,7 @@ typedef struct // The original eight, plus one. char lvlttl[22]; ///< Level name without "Zone". (21 character limit instead of 32, 21 characters can display on screen max anyway) char subttl[33]; ///< Subtitle for level + char zonttl[22]; ///< "ZONE" replacement name UINT8 actnum; ///< Act number or 0 for none. UINT16 typeoflevel; ///< Combination of typeoflevel flags. INT16 nextlevel; ///< Map number of next level, or 1100-1102 to end. diff --git a/src/g_game.c b/src/g_game.c index b2f10b00..6274c9b1 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3787,7 +3787,12 @@ char *G_BuildMapTitle(INT32 mapnum) const INT32 actnum = mapheaderinfo[mapnum-1]->actnum; len += strlen(mapheaderinfo[mapnum-1]->lvlttl); - if (!(mapheaderinfo[mapnum-1]->levelflags & LF_NOZONE)) + if (strcmp(mapheaderinfo[mapnum-1]->zonttl, "")) + { + zonetext = M_GetText(mapheaderinfo[mapnum-1]->zonttl); + len += strlen(zonetext) + 1; // ' ' + zonetext + } + else if (!(mapheaderinfo[mapnum-1]->levelflags & LF_NOZONE)) { zonetext = M_GetText("ZONE"); len += strlen(zonetext) + 1; // ' ' + zonetext diff --git a/src/lua_maplib.c b/src/lua_maplib.c index 208aebe3..0a455a30 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -1182,6 +1182,8 @@ static int mapheaderinfo_get(lua_State *L) lua_pushstring(L, header->lvlttl); else if (fastcmp(field,"subttl")) lua_pushstring(L, header->subttl); + else if (fastcmp(field,"zonttl")) + lua_pushstring(L, header->zonttl); else if (fastcmp(field,"actnum")) lua_pushinteger(L, header->actnum); else if (fastcmp(field,"typeoflevel")) diff --git a/src/m_misc.c b/src/m_misc.c index ab7e201e..57fe6750 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -680,7 +680,8 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png if (gamestate == GS_LEVEL && mapheaderinfo[gamemap-1]->lvlttl[0] != '\0') snprintf(lvlttltext, 48, "%s%s%s", mapheaderinfo[gamemap-1]->lvlttl, - (mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE) ? "" : " ZONE", + (strlen(mapheaderinfo[gamemap-1]->zonttl) > 0) ? mapheaderinfo[gamemap-1]->zonttl : // SRB2kart + ((mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE) ? "" : " ZONE"), (mapheaderinfo[gamemap-1]->actnum > 0) ? va(" %d",mapheaderinfo[gamemap-1]->actnum) : ""); else snprintf(lvlttltext, 48, "Unknown"); diff --git a/src/p_setup.c b/src/p_setup.c index c619bde2..de0172eb 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -174,6 +174,8 @@ static void P_ClearSingleMapHeaderInfo(INT16 i) mapheaderinfo[num]->lvlttl[0] = '\0'; DEH_WriteUndoline("SUBTITLE", mapheaderinfo[num]->subttl, UNDO_NONE); mapheaderinfo[num]->subttl[0] = '\0'; + DEH_WriteUndoline("ZONETITLE", mapheaderinfo[num]->zonttl, UNDO_NONE); // SRB2kart + mapheaderinfo[num]->zonttl[0] = '\0'; DEH_WriteUndoline("ACT", va("%d", mapheaderinfo[num]->actnum), UNDO_NONE); mapheaderinfo[num]->actnum = 0; DEH_WriteUndoline("TYPEOFLEVEL", va("%d", mapheaderinfo[num]->typeoflevel), UNDO_NONE); @@ -2614,7 +2616,8 @@ boolean P_SetupLevel(boolean skipprecip) V_DrawSmallString(1, 191, V_ALLOWLOWERCASE, M_GetText("Speeding off to...")); snprintf(tx, 63, "%s%s%s", mapheaderinfo[gamemap-1]->lvlttl, - (mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE) ? "" : " ZONE", + (strlen(mapheaderinfo[gamemap-1]->zonttl) > 0) ? mapheaderinfo[gamemap-1]->zonttl : // SRB2kart + ((mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE) ? "" : " ZONE"), (mapheaderinfo[gamemap-1]->actnum > 0) ? va(", Act %d",mapheaderinfo[gamemap-1]->actnum) : ""); V_DrawSmallString(1, 195, V_ALLOWLOWERCASE, tx); I_UpdateNoVsync(); diff --git a/src/st_stuff.c b/src/st_stuff.c index 05f14e53..f3f78205 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -748,6 +748,7 @@ static void ST_drawLevelTitle(void) { char *lvlttl = mapheaderinfo[gamemap-1]->lvlttl; char *subttl = mapheaderinfo[gamemap-1]->subttl; + char *zonttl = mapheaderinfo[gamemap-1]->zonttl; // SRB2kart INT32 actnum = mapheaderinfo[gamemap-1]->actnum; INT32 lvlttlxpos; INT32 subttlxpos = BASEVIDWIDTH/2; @@ -769,7 +770,10 @@ static void ST_drawLevelTitle(void) lvlttlxpos = ((BASEVIDWIDTH/2) - (V_LevelNameWidth(lvlttl)/2)); ttlnumxpos = lvlttlxpos + V_LevelNameWidth(lvlttl); - zonexpos = ttlnumxpos - V_LevelNameWidth(M_GetText("ZONE")); + if (zonttl) + zonexpos = ttlnumxpos - V_LevelNameWidth(M_GetText(zonttl)); // SRB2kart + else + zonexpos = ttlnumxpos - V_LevelNameWidth(M_GetText("ZONE")); if (lvlttlxpos < 0) lvlttlxpos = 0; @@ -798,7 +802,9 @@ static void ST_drawLevelTitle(void) V_DrawLevelTitle(lvlttlxpos, lvlttly, 0, lvlttl); - if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE)) + if (zonttl) + V_DrawLevelTitle(zonexpos, zoney, 0, M_GetText(zonttl)); + else if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE)) V_DrawLevelTitle(zonexpos, zoney, 0, M_GetText("ZONE")); if (lvlttly+48 < 200)