Lunatic: Fix build, part 8. MapInfo --> g_mapInfo

git-svn-id: https://svn.eduke32.com/eduke32@5991 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-01-05 05:29:33 +00:00
parent 9f41addab0
commit e036de108d
6 changed files with 8 additions and 8 deletions

View file

@ -213,13 +213,13 @@ int Gv_ReadSave(int32_t kFile)
if (aGameVars[j].flags & GAMEVAR_NORESET) continue; if (aGameVars[j].flags & GAMEVAR_NORESET) continue;
if (aGameVars[j].flags & GAMEVAR_PERPLAYER) 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)); 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; 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) 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)); 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; if (kdfread(&g_mapInfo[i].savedstate->vars[j][0],sizeof(intptr_t), MAXSPRITES, kFile) != MAXSPRITES) goto corrupt;
} }

View file

@ -908,12 +908,12 @@ function _qgetsysstr(qdst, what, pli)
local dst = bcheck.quote_idx(qdst) local dst = bcheck.quote_idx(qdst)
local idx = ffiC.ud.volume_number*con_lang.MAXLEVELS + ffiC.ud.level_number 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) local mapnamep = (what == ffiC.STR_MAPNAME)
if (mapnamep or what == ffiC.STR_MAPFILENAME) then if (mapnamep or what == ffiC.STR_MAPFILENAME) then
assert(not (idx >= MAXIDX+0ULL)) 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 if (src == nil) then
error(format("attempted access to %s of non-existent map (vol=%d, lev=%d)", error(format("attempted access to %s of non-existent map (vol=%d, lev=%d)",
mapnamep and "name" or "file name", mapnamep and "name" or "file name",

View file

@ -614,7 +614,7 @@ int32_t g_logoFlags;
]] ]]
-- INTERNAL VARIABLES/FUNCTIONS -- 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("char g_volumeNames[$][33];", con_lang.MAXVOLUMES)
decl[[ decl[[

View file

@ -128,7 +128,7 @@ g_elModules;
g_modDir; g_modDir;
g_elSessionVar; g_elSessionVar;
MapInfo; g_mapInfo;
g_volumeNames; g_volumeNames;
kopen4loadfrommod; kopen4loadfrommod;

View file

@ -2121,7 +2121,7 @@ static void postloadplayer(int32_t savegamep)
if (ud.config.MusicToggle) if (ud.config.MusicToggle)
{ {
if (g_mapInfo[musicIdx].musicfn != NULL && if (g_mapInfo[musicIdx].musicfn != NULL &&
(musicIdx != g_musicIndex /* || MapInfo[MUS_LOADING].musicfn */)) (musicIdx != g_musicIndex /* || g_mapInfo[MUS_LOADING].musicfn */))
{ {
S_StopMusic(); S_StopMusic();

View file

@ -108,7 +108,7 @@ typedef struct {
mapstate_t *savedstate; mapstate_t *savedstate;
} map_t; } 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); void G_ActivateBySector(int sect,int j);
int S_FindMusicSFX(int sectNum, int *sndptr); int S_FindMusicSFX(int sectNum, int *sndptr);