Skip to content

Commit

Permalink
Blood: Use version control revision number on HUD
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendricks266 committed Jul 12, 2023
1 parent 95e521b commit ba243ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion source/blood/src/common_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ extern int g_useCwd;
#define BLOODWIDESCREENDEF "blood_widescreen.def"

#define BYTEVERSION 104
#define EXEVERSION 101

void _SetErrorLoc(const char *pzFile, int nLine);
void _ThrowError(const char *pzFormat, ...);
Expand Down
6 changes: 5 additions & 1 deletion source/blood/src/globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ const char *GetVersionString(void)
gVersionString = gVersionStringBuf;
if (!gVersionString)
return NULL;
sprintf(gVersionString, "%d.%02d", EXEVERSION / 100, EXEVERSION % 100);

Bstrncpyz(gVersionStringBuf, s_buildRev, sizeof(gVersionStringBuf));
char * const pHyphen = strchr(gVersionStringBuf, '-');
if (pHyphen != nullptr)
pHyphen[0] = '\0';
}
return gVersionString;
}
3 changes: 1 addition & 2 deletions source/blood/src/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1813,8 +1813,7 @@ void UpdateStatusBar(ClockTicks arg)
TileHGauge(2208, 44, 190, pPlayer->armor[2], 3200);
DrawStatNumber("%3d", pPlayer->armor[2]>>4, 2230, 50, 193, 0, 0);
}
sprintf(gTempStr, "v%s", GetVersionString());
viewDrawText(3, gTempStr, 20, 191, 32, 0, 1, 0);
viewDrawText(3, GetVersionString(), 20, 191, 32, 0, 1, 0);

for (int i = 0; i < 6; i++)
{
Expand Down

0 comments on commit ba243ab

Please sign in to comment.