mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
De-duplicate release version
I'm fine with putting the release version in a header file, thus necessitating the need to recompile every file that includes it if it's changed, simply because it's not supposed to be changed that often. The SDL_arraysize is necessary because sometimes we'll have subreleases (e.g. 2.4.1, 2.4.2, 2.4.3), and who knows, maybe we'll get to 2.10 someday.
This commit is contained in:
parent
4bf5e5e6a0
commit
52124f7010
3 changed files with 10 additions and 3 deletions
6
desktop_version/src/ReleaseVersion.h
Normal file
6
desktop_version/src/ReleaseVersion.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef RELEASEVERSION_H
|
||||
#define RELEASEVERSION_H
|
||||
|
||||
#define RELEASE_VERSION "v2.4"
|
||||
|
||||
#endif /* RELEASEVERSION_H */
|
|
@ -15,6 +15,7 @@
|
|||
#include "Map.h"
|
||||
#include "Maths.h"
|
||||
#include "Music.h"
|
||||
#include "ReleaseVersion.h"
|
||||
#include "Screen.h"
|
||||
#include "Script.h"
|
||||
#include "UtilityClass.h"
|
||||
|
@ -148,7 +149,7 @@ static void menurender(void)
|
|||
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);
|
||||
#endif
|
||||
graphics.Print( 310 - (4*8), 230, "v2.4", tr/2, tg/2, tb/2);
|
||||
graphics.Print( 310 - (SDL_arraysize(RELEASE_VERSION) - 1) * 8, 230, RELEASE_VERSION, tr/2, tg/2, tb/2);
|
||||
|
||||
if(music.mmmmmm){
|
||||
graphics.Print( 10, 230, "[MMMMMM Mod Installed]", tr/2, tg/2, tb/2);
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "Music.h"
|
||||
#include "Network.h"
|
||||
#include "preloader.h"
|
||||
#include "ReleaseVersion.h"
|
||||
#include "Render.h"
|
||||
#include "RenderFixed.h"
|
||||
#include "Screen.h"
|
||||
|
@ -387,9 +388,8 @@ int main(int argc, char *argv[])
|
|||
if (ARG("-version"))
|
||||
{
|
||||
/* Just print the version and exit. No vlogging. */
|
||||
/* TODO: Version should be de-duplicated and only set in one place... TwT */
|
||||
/* TODO: Also print commit date and hash, if applicable. */
|
||||
puts("VVVVVV v2.4");
|
||||
puts("VVVVVV " RELEASE_VERSION);
|
||||
VVV_exit(0);
|
||||
}
|
||||
else if (ARG("-renderer"))
|
||||
|
|
Loading…
Reference in a new issue