Rename sector[].filler member to '.fogpal'. From CON, keep the '.alignto' alias.

The overall situation is thus as follows:
 - in C and from Lua, that member is called 'fogpal'
 - In CON (both C-CON and LunaCON), it's 'fogpal' with 'alignto' being an alias;
   'filler' wasn't available before, either.
 - In m32script, it's 'fogpal' or 'alignto' ('filler' is not available any more)

git-svn-id: https://svn.eduke32.com/eduke32@4416 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-04-05 11:28:10 +00:00
parent bd0febb846
commit 7603f432df
16 changed files with 28 additions and 28 deletions

View file

@ -324,7 +324,7 @@ typedef struct
Tracker(Sector, int16_t) floorpicnum, floorheinum;
Tracker(Sector, int8_t) floorshade;
Tracker(Sector, uint8_t) floorpal, floorxpanning, floorypanning;
Tracker(Sector, uint8_t) /*CM_CEILINGZ:*/ visibility, filler;
Tracker(Sector, uint8_t) /*CM_CEILINGZ:*/ visibility, fogpal;
Tracker(Sector, uint16_t) lotag, hitag;
Tracker(Sector, int16_t) extra;
} sectortypev7;
@ -425,7 +425,7 @@ typedef struct
Tracker(Sector, int8_t) floorshade;
Tracker(Sector, uint8_t) floorpal, floorxpanning, floorypanning;
Tracker(Sector, uint8_t) /*CM_CEILINGZ:*/ visibility, filler;
Tracker(Sector, uint8_t) /*CM_CEILINGZ:*/ visibility, fogpal;
Tracker(Sector, uint16_t) lotag, hitag;
Tracker(Sector, int16_t) extra;
} sectortypevx;

View file

@ -77,15 +77,15 @@ static inline float getshadefactor(int32_t shade)
return ((float)(numshades-clamped_shade))/(float)numshades;
}
#define POLYMOST_CHOOSE_FOG_PAL(filler, pal) \
((filler) ? (filler) : (pal))
#define POLYMOST_CHOOSE_FOG_PAL(fogpal, pal) \
((fogpal) ? (fogpal) : (pal))
static inline int32_t get_floor_fogpal(const sectortype *sec)
{
return POLYMOST_CHOOSE_FOG_PAL(sec->filler, sec->floorpal);
return POLYMOST_CHOOSE_FOG_PAL(sec->fogpal, sec->floorpal);
}
static inline int32_t get_ceiling_fogpal(const sectortype *sec)
{
return POLYMOST_CHOOSE_FOG_PAL(sec->filler, sec->ceilingpal);
return POLYMOST_CHOOSE_FOG_PAL(sec->fogpal, sec->ceilingpal);
}
typedef struct pthtyp_t

View file

@ -1337,7 +1337,7 @@ static spritetype *loadsprite;
#define CM_CSTAT hitag
#define CM_ANG extra
#define CM_FLOORZ(Sec) (*(int32_t *)&sector[Sec].ceilingxpanning) // ceilingxpanning,ceilingypanning,floorpicnum
#define CM_CEILINGZ(Sec) (*(int32_t *)&sector[Sec].visibility) // visibility,filler,lotag
#define CM_CEILINGZ(Sec) (*(int32_t *)&sector[Sec].visibility) // visibility,fogpal,lotag
// backup of original normalized coordinates
#define CM_WALL_X(Wal) (*(int32_t *)&wall[Wal].picnum) // picnum, overpicnum

View file

@ -200,7 +200,7 @@ static void convertv6sectv7(struct sectortypev6 *from, sectortype *to)
to->ceilingstat = from->ceilingstat;
to->floorstat = from->floorstat;
to->visibility = from->visibility;
to->filler = 0;
to->fogpal = 0;
to->lotag = from->lotag;
to->hitag = from->hitag;
to->extra = from->extra;

View file

@ -2367,7 +2367,7 @@ static void polymost_drawalls(int32_t bunch)
dapskyoff = getpsky(globalpicnum, NULL, &dapskybits);
global_cf_fogpal = sec->filler;
global_cf_fogpal = sec->fogpal;
global_cf_shade = sec->floorshade, global_cf_pal = sec->floorpal; global_cf_z = sec->floorz; // REFACT
global_cf_xpanning = sec->floorxpanning; global_cf_ypanning = sec->floorypanning, global_cf_heinum = sec->floorheinum;
global_getzofslope_func = &getflorzofslope;
@ -2635,7 +2635,7 @@ static void polymost_drawalls(int32_t bunch)
dapskyoff = getpsky(globalpicnum, NULL, &dapskybits);
global_cf_fogpal = sec->filler;
global_cf_fogpal = sec->fogpal;
global_cf_shade = sec->ceilingshade, global_cf_pal = sec->ceilingpal; global_cf_z = sec->ceilingz; // REFACT
global_cf_xpanning = sec->ceilingxpanning; global_cf_ypanning = sec->ceilingypanning, global_cf_heinum = sec->ceilingheinum;
global_getzofslope_func = &getceilzofslope;

View file

@ -723,8 +723,8 @@ const memberlabel_t SectorLabels[]=
{ "floorxpanning", SECTOR_FLOORXPANNING, 0, 0 },
{ "floorypanning", SECTOR_FLOORYPANNING, 0, 0 },
{ "visibility", SECTOR_VISIBILITY, 0, 0 },
// { "filler", SECTOR_ALIGNTO, 0, 0 },
{ "alignto", SECTOR_ALIGNTO, 0, 0 }, // aka filler, not used
{ "fogpal", SECTOR_FOGPAL, 0, 0 }, // formerly filler
{ "alignto", SECTOR_FOGPAL, 0, 0 }, // formerly filler
{ "lotag", SECTOR_LOTAG, 0, 0 },
{ "hitag", SECTOR_HITAG, 0, 0 },
{ "extra", SECTOR_EXTRA, 0, 0 },

View file

@ -427,7 +427,7 @@ enum SectorLabel_t
SECTOR_FLOORXPANNING,
SECTOR_FLOORYPANNING,
SECTOR_VISIBILITY,
SECTOR_ALIGNTO,
SECTOR_FOGPAL,
SECTOR_LOTAG,
SECTOR_HITAG,
SECTOR_EXTRA,

View file

@ -2362,13 +2362,13 @@ static void __fastcall VM_AccessSector(int32_t iSet, int32_t lVar1, int32_t lLab
Gv_SetVarX(lVar2, sector[iSector].visibility);
return;
case SECTOR_ALIGNTO:
case SECTOR_FOGPAL:
if (iSet)
{
sector[iSector].filler=lValue;
sector[iSector].fogpal=lValue;
return;
}
Gv_SetVarX(lVar2, sector[iSector].filler);
Gv_SetVarX(lVar2, sector[iSector].fogpal);
return;
case SECTOR_LOTAG:
@ -3581,7 +3581,7 @@ static int32_t __fastcall VM_AccessSectorX(int32_t iSector, int32_t lLabelID)
case SECTOR_FLOORXPANNING: return sector[iSector].floorxpanning;
case SECTOR_FLOORYPANNING: return sector[iSector].floorypanning;
case SECTOR_VISIBILITY: return sector[iSector].visibility;
case SECTOR_ALIGNTO: return sector[iSector].filler;
case SECTOR_FOGPAL: return sector[iSector].fogpal;
case SECTOR_LOTAG: return (int16_t)sector[iSector].lotag;
case SECTOR_HITAG: return (int16_t)sector[iSector].hitag;
case SECTOR_ULOTAG: return sector[iSector].lotag;

View file

@ -710,8 +710,8 @@ local SectorLabels = {
floorypanning = SEC".floorypanning",
visibility = SEC".visibility",
filler = SEC".filler",
alignto = SEC".filler", -- NAME
fogpal = SEC".fogpal",
alignto = SEC".fogpal", -- NAME
lotag = SEC".lotag",
hitag = SEC".hitag",

View file

@ -205,7 +205,7 @@ string.format([[
};
]], CF_MEMBERS:gsub("~","ceiling"), CF_MEMBERS:gsub("~","floor"))
..[[
uint8_t visibility, filler;
uint8_t visibility, fogpal;
int16_t lotag, hitag; // NOTE: signed for Lunatic
int16_t extra;
}]]

View file

@ -43,7 +43,7 @@ local sector_members = {
Y = "ceilingypanning", y = "floorypanning",
v = "visibility",
_ = "filler",
_ = "fogpal",
o = "lotag", i = "hitag", e = { "extra", -1 }
}

View file

@ -29,7 +29,7 @@ local STRUCTDEF = {
int16_t floorpicnum, floorheinum;
int8_t floorshade;
uint8_t floorpal, floorxpanning, floorypanning;
uint8_t visibility, filler;
uint8_t visibility, fogpal;
int16_t lotag, hitag, extra;
]],

View file

@ -58,7 +58,7 @@ local sector_members = {
"floorpicnum", "floorheinum",
"floorshade",
"floorpal", "floorxpanning", "floorypanning",
"visibility", "filler",
"visibility", "fogpal",
"lotag", "hitag", "extra",
}

View file

@ -441,12 +441,12 @@ const memberlabel_t SectorLabels[]=
{ "floorxpanning", SECTOR_FLOORXPANNING, 0, 0, 0 },
{ "floorypanning", SECTOR_FLOORYPANNING, 0, 0, 0 },
{ "visibility", SECTOR_VISIBILITY, 0, 0, 0 },
{ "alignto", SECTOR_ALIGNTO, 0, 0, 0 }, // aka filler, not used
{ "fogpal", SECTOR_FOGPAL, 0, 0, 0 }, // formerly filler
{ "lotag", SECTOR_LOTAG, 0, 0, 0 },
{ "hitag", SECTOR_HITAG, 0, 0, 0 },
{ "extra", SECTOR_EXTRA, 0, 0, 0 },
// aliases
{ "filler", SECTOR_ALIGNTO, 0, 0, 0 },
{ "alignto", SECTOR_FOGPAL, 0, 0, 0 }, // formerly filler
{ "ceilingheinum", SECTOR_CEILINGSLOPE, 0, 0, 0},
{ "floorheinum", SECTOR_FLOORSLOPE, 0, 0, 0},

View file

@ -186,7 +186,7 @@ enum SectorLabel_t
SECTOR_FLOORXPANNING,
SECTOR_FLOORYPANNING,
SECTOR_VISIBILITY,
SECTOR_ALIGNTO,
SECTOR_FOGPAL,
SECTOR_LOTAG,
SECTOR_HITAG,
SECTOR_EXTRA,

View file

@ -220,7 +220,7 @@ static int32_t __fastcall VM_AccessSector(int32_t how, int32_t lVar1, int32_t lL
case SECTOR_FLOORXPANNING: sector[i].floorxpanning=lValue; break;
case SECTOR_FLOORYPANNING: sector[i].floorypanning=lValue; break;
case SECTOR_VISIBILITY: sector[i].visibility=lValue; break;
case SECTOR_ALIGNTO: sector[i].filler=lValue; break;
case SECTOR_FOGPAL: sector[i].fogpal=lValue; break;
case SECTOR_LOTAG: sector[i].lotag=lValue; break;
case SECTOR_HITAG: sector[i].hitag=lValue; break;
case SECTOR_EXTRA: sector[i].extra=lValue; break;
@ -253,7 +253,7 @@ static int32_t __fastcall VM_AccessSector(int32_t how, int32_t lVar1, int32_t lL
case SECTOR_FLOORXPANNING: lValue=sector[i].floorxpanning; break;
case SECTOR_FLOORYPANNING: lValue=sector[i].floorypanning; break;
case SECTOR_VISIBILITY: lValue=sector[i].visibility; break;
case SECTOR_ALIGNTO: lValue=sector[i].filler; break;
case SECTOR_FOGPAL: lValue=sector[i].fogpal; break;
case SECTOR_LOTAG: lValue=sector[i].lotag; break;
case SECTOR_HITAG: lValue=sector[i].hitag; break;
case SECTOR_EXTRA: lValue=sector[i].extra; break;