summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorjussi2022-05-22 14:47:06 +0300
committerjussi2022-05-22 14:47:06 +0300
commit44e8b06603d91d398c0955f34da33d0242b7551a (patch)
treea14e70cc7bff7673ccc5b8a04750ed7aed56b701 /src/main.c
parent85fc6cd6a3865f19ceac448dcb33b0c19b8e6b77 (diff)
downloadreilua-enhanced-44e8b06603d91d398c0955f34da33d0242b7551a.tar.gz
reilua-enhanced-44e8b06603d91d398c0955f34da33d0242b7551a.tar.bz2
reilua-enhanced-44e8b06603d91d398c0955f34da33d0242b7551a.zip
Pong example, type named fields and vector lib changes.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 9bb5d2e..9155cd7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,13 +2,21 @@
#include "state.h"
#include "lua_core.h"
+inline static void printVersion() {
+ if ( VERSION_DEV ) {
+ TraceLog( LOG_INFO, "ReiLua %d.%d.%d-Dev", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH );
+ }
+ else {
+ TraceLog( LOG_INFO, "ReiLua %d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH );
+ }
+}
+
int main( int argn, const char **argc ) {
char exePath[ STRING_LEN ] = { '\0' };
if ( 1 < argn ) {
if ( strcmp( argc[1], "--version" ) == 0 || strcmp( argc[1], "-v" ) == 0 ) {
- printf( "ReiLua %d.%d.%d\n", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH );
-
+ printVersion();
return 1;
}
else{
@@ -18,7 +26,7 @@ int main( int argn, const char **argc ) {
else {
sprintf( exePath, "%s/", GetWorkingDirectory() );
}
- TraceLog( LOG_INFO, "ReiLua %d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH );
+ printVersion();
stateInit( exePath );
while ( state->run ) {