Commit 3ac262b0 authored by Richard Gobeille's avatar Richard Gobeille
Browse files

engine: cheap hack to detect if we're using the editor or not

parent a136b019
......@@ -100,6 +100,11 @@ extern int32_t graphicsmode;
extern int32_t grid, autogrid;
extern int32_t editorgridextent; // in engine.c
static FORCE_INLINE bool editorIsInitialized(void)
{
return editorgridextent != -1;
}
extern char game_executable[BMAX_PATH];
extern const char* DefaultGameExec;
extern const char* DefaultGameLocalExec;
......
......@@ -9,7 +9,7 @@
#include "build.h"
#include "editor.h"
int32_t editorgridextent = 131072;
int32_t editorgridextent = -1;
////////// editor side view //////////
int32_t m32_sideview = 0;
......
......@@ -111,6 +111,8 @@ int32_t loadsetup(const char *fn)
char val[VL];
int32_t i;
editorgridextent = 131072;
if ((fp = buildvfs_fopen_read(fn)) == NULL) return -1;
if (readconfig(fp, "usecwd", val, VL) > 0) g_useCwd = (atoi_safe(val) != 0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment