mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-11-24 14:29:20 +03:00
Add branch name to interim version information
This is useful for developers who may have multiple builds of the game from various different branches and may easily forget which build of the game is what. This shows up in the bottom-right corner of the title screen and also with the `-version` command-line option, and in the status message printed when building the game.
This commit is contained in:
1 parent
f35618999f
commit
d2b6fb2d06
5 files changed
+17
-3
No files matched your search
@@ -13,6 +13,9 @@ extern const int LEN_INTERIM_COMMIT;
|
||||
|
||||
extern const char* COMMIT_DATE;
|
||||
|
||||
extern const char* BRANCH_NAME;
|
||||
extern const int LEN_BRANCH_NAME;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
@@ -2,3 +2,6 @@ const char* INTERIM_COMMIT = "@INTERIM_COMMIT@";
|
||||
const int LEN_INTERIM_COMMIT = sizeof("@INTERIM_COMMIT@") - 1;
|
||||
|
||||
const char* COMMIT_DATE = "@COMMIT_DATE@";
|
||||
|
||||
const char* BRANCH_NAME = "@BRANCH_NAME@";
|
||||
const int LEN_BRANCH_NAME = sizeof("@BRANCH_NAME@") - 1;
|
||||
@@ -158,8 +158,9 @@ static void menurender(void)
|
||||
graphics.Print(264-graphics.len(editionlabel),temp+35,editionlabel,tr, tg, tb);
|
||||
#endif
|
||||
#ifdef INTERIM_VERSION_EXISTS
|
||||
graphics.Print( 310 - (10*8), 210, COMMIT_DATE, tr/2, tg/2, tb/2);
|
||||
graphics.Print( 310 - LEN_INTERIM_COMMIT * 8, 220, INTERIM_COMMIT, tr/2, tg/2, tb/2);
|
||||
graphics.Print( 310 - (10*8), 200, COMMIT_DATE, tr/2, tg/2, tb/2);
|
||||
graphics.Print( 310 - LEN_INTERIM_COMMIT * 8, 210, INTERIM_COMMIT, tr/2, tg/2, tb/2);
|
||||
graphics.Print( 310 - LEN_BRANCH_NAME * 8, 220, BRANCH_NAME, tr/2, tg/2, tb/2);
|
||||
#endif
|
||||
graphics.Print( 310 - (SDL_arraysize(RELEASE_VERSION) - 1) * 8, 230, RELEASE_VERSION, tr/2, tg/2, tb/2);
|
||||
|
||||
|
||||
@@ -401,6 +401,7 @@ int main(int argc, char *argv[])
|
||||
#ifdef INTERIM_VERSION_EXISTS
|
||||
puts(COMMIT_DATE);
|
||||
puts(INTERIM_COMMIT);
|
||||
puts(BRANCH_NAME);
|
||||
#endif
|
||||
VVV_exit(0);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user