From e036de108dc13f49ed70f2ba9557bd99c39716c0 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Thu, 5 Jan 2017 05:29:33 +0000 Subject: [PATCH] Lunatic: Fix build, part 8. MapInfo --> g_mapInfo git-svn-id: https://svn.eduke32.com/eduke32@5991 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamevars.c | 4 ++-- polymer/eduke32/source/lunatic/control.lua | 4 ++-- polymer/eduke32/source/lunatic/defs.ilua | 2 +- polymer/eduke32/source/lunatic/dynsymlist | 2 +- polymer/eduke32/source/savegame.c | 2 +- polymer/eduke32/source/sector.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index 4d384c28c..9c2f6d26b 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -213,13 +213,13 @@ int Gv_ReadSave(int32_t kFile) if (aGameVars[j].flags & GAMEVAR_NORESET) continue; if (aGameVars[j].flags & GAMEVAR_PERPLAYER) { -// if (!MapInfo[i].savedstate->vars[j]) +// if (!g_mapInfo[i].savedstate->vars[j]) g_mapInfo[i].savedstate->vars[j] = (intptr_t *)Xaligned_alloc(PLAYER_VAR_ALIGNMENT, MAXPLAYERS * sizeof(intptr_t)); if (kdfread(&g_mapInfo[i].savedstate->vars[j][0],sizeof(intptr_t) * MAXPLAYERS, 1, kFile) != 1) goto corrupt; } else if (aGameVars[j].flags & GAMEVAR_PERACTOR) { -// if (!MapInfo[i].savedstate->vars[j]) +// if (!g_mapInfo[i].savedstate->vars[j]) g_mapInfo[i].savedstate->vars[j] = (intptr_t *)Xaligned_alloc(ACTOR_VAR_ALIGNMENT, MAXSPRITES * sizeof(intptr_t)); if (kdfread(&g_mapInfo[i].savedstate->vars[j][0],sizeof(intptr_t), MAXSPRITES, kFile) != MAXSPRITES) goto corrupt; } diff --git a/polymer/eduke32/source/lunatic/control.lua b/polymer/eduke32/source/lunatic/control.lua index 9c1be3280..ca08bc3d2 100644 --- a/polymer/eduke32/source/lunatic/control.lua +++ b/polymer/eduke32/source/lunatic/control.lua @@ -908,12 +908,12 @@ function _qgetsysstr(qdst, what, pli) local dst = bcheck.quote_idx(qdst) local idx = ffiC.ud.volume_number*con_lang.MAXLEVELS + ffiC.ud.level_number - local MAXIDX = ffi.sizeof(ffiC.MapInfo) / ffi.sizeof(ffiC.MapInfo[0]) + local MAXIDX = ffi.sizeof(ffiC.g_mapInfo) / ffi.sizeof(ffiC.g_mapInfo[0]) local mapnamep = (what == ffiC.STR_MAPNAME) if (mapnamep or what == ffiC.STR_MAPFILENAME) then assert(not (idx >= MAXIDX+0ULL)) - local src = mapnamep and ffiC.MapInfo[idx].name or ffiC.MapInfo[idx].filename + local src = mapnamep and ffiC.g_mapInfo[idx].name or ffiC.g_mapInfo[idx].filename if (src == nil) then error(format("attempted access to %s of non-existent map (vol=%d, lev=%d)", mapnamep and "name" or "file name", diff --git a/polymer/eduke32/source/lunatic/defs.ilua b/polymer/eduke32/source/lunatic/defs.ilua index a6d862b01..841024ca0 100644 --- a/polymer/eduke32/source/lunatic/defs.ilua +++ b/polymer/eduke32/source/lunatic/defs.ilua @@ -614,7 +614,7 @@ int32_t g_logoFlags; ]] -- INTERNAL VARIABLES/FUNCTIONS -decl("map_t MapInfo[$*$];", con_lang.MAXVOLUMES+1, con_lang.MAXLEVELS) +decl("map_t g_mapInfo[$*$];", con_lang.MAXVOLUMES+1, con_lang.MAXLEVELS) decl("char g_volumeNames[$][33];", con_lang.MAXVOLUMES) decl[[ diff --git a/polymer/eduke32/source/lunatic/dynsymlist b/polymer/eduke32/source/lunatic/dynsymlist index d119cc55d..3f2b7ea6a 100644 --- a/polymer/eduke32/source/lunatic/dynsymlist +++ b/polymer/eduke32/source/lunatic/dynsymlist @@ -128,7 +128,7 @@ g_elModules; g_modDir; g_elSessionVar; -MapInfo; +g_mapInfo; g_volumeNames; kopen4loadfrommod; diff --git a/polymer/eduke32/source/savegame.c b/polymer/eduke32/source/savegame.c index 80502fcc8..b6e4471ea 100644 --- a/polymer/eduke32/source/savegame.c +++ b/polymer/eduke32/source/savegame.c @@ -2121,7 +2121,7 @@ static void postloadplayer(int32_t savegamep) if (ud.config.MusicToggle) { if (g_mapInfo[musicIdx].musicfn != NULL && - (musicIdx != g_musicIndex /* || MapInfo[MUS_LOADING].musicfn */)) + (musicIdx != g_musicIndex /* || g_mapInfo[MUS_LOADING].musicfn */)) { S_StopMusic(); diff --git a/polymer/eduke32/source/sector.h b/polymer/eduke32/source/sector.h index 42f2d693f..30d316426 100644 --- a/polymer/eduke32/source/sector.h +++ b/polymer/eduke32/source/sector.h @@ -108,7 +108,7 @@ typedef struct { mapstate_t *savedstate; } map_t; -//extern map_t MapInfo[(MAXVOLUMES+1)*MAXLEVELS]; // +1 volume for "intro", "briefing" music +//extern map_t g_mapInfo[(MAXVOLUMES+1)*MAXLEVELS]; // +1 volume for "intro", "briefing" music void G_ActivateBySector(int sect,int j); int S_FindMusicSFX(int sectNum, int *sndptr);