From f553d6ad10ffd2c9f8957efef21f37523d8be235 Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 30 Sep 2014 04:15:53 +0000 Subject: [PATCH] Add assertion for memory error handler in debug builds, add .def load time information to log, call Gv_ResetSystemDefaults() at startup to populate fake tilesizx/tilesizy arrays for CON git-svn-id: https://svn.eduke32.com/eduke32@4629 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index b1d1b9f93..3f968523c 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -10869,6 +10869,9 @@ static void G_HandleMemErr(int32_t line, const char *file, const char *func) { static char msg[128]; Bsnprintf(msg, sizeof(msg), "Out of memory in %s:%d (%s)\n", file, line, func); +#ifdef DEBUGGINGAIDS + Bassert(0); +#endif G_GameExit(msg); } @@ -11466,9 +11469,11 @@ int32_t app_main(int32_t argc, const char **argv) { const char *defsfile = G_DefFile(); + uint32_t stime = getticks(); if (!loaddefinitionsfile(defsfile)) { - initprintf("Definitions file \"%s\" loaded.\n",defsfile); + uint32_t etime = getticks(); + initprintf("Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime-stime); loaddefinitions_game(defsfile, FALSE); } } @@ -11478,6 +11483,8 @@ int32_t app_main(int32_t argc, const char **argv) Bfree(g_defModules); g_defModules = NULL; + Gv_ResetSystemDefaults(); // called here to populate our fake tilesizx and tilesizy arrays presented to CON with sizes generated by dummytiles + if (numplayers == 1 && boardfilename[0] != 0) { ud.m_level_number = 7;