mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 19:20:38 +00:00
Add a wallext structure for non-Lunatic builds so they can have a blend member too.
git-svn-id: https://svn.eduke32.com/eduke32@6276 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
610d2e3b46
commit
cb12f25cda
7 changed files with 40 additions and 4 deletions
|
@ -504,6 +504,12 @@ typedef struct {
|
||||||
uint8_t filler[2];
|
uint8_t filler[2];
|
||||||
} spritesmooth_t;
|
} spritesmooth_t;
|
||||||
|
|
||||||
|
#ifndef NEW_MAP_FORMAT
|
||||||
|
typedef struct {
|
||||||
|
uint8_t blend;
|
||||||
|
} wallext_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SPREXT_NOTMD 1
|
#define SPREXT_NOTMD 1
|
||||||
#define SPREXT_NOMDANIM 2
|
#define SPREXT_NOMDANIM 2
|
||||||
#define SPREXT_AWAY1 4
|
#define SPREXT_AWAY1 4
|
||||||
|
@ -531,6 +537,9 @@ extern int32_t num_usermaphacks;
|
||||||
#if !defined DEBUG_MAIN_ARRAYS
|
#if !defined DEBUG_MAIN_ARRAYS
|
||||||
EXTERN spriteext_t *spriteext;
|
EXTERN spriteext_t *spriteext;
|
||||||
EXTERN spritesmooth_t *spritesmooth;
|
EXTERN spritesmooth_t *spritesmooth;
|
||||||
|
# ifndef NEW_MAP_FORMAT
|
||||||
|
EXTERN wallext_t *wallext;
|
||||||
|
# endif
|
||||||
|
|
||||||
EXTERN sectortype *sector;
|
EXTERN sectortype *sector;
|
||||||
EXTERN walltype *wall;
|
EXTERN walltype *wall;
|
||||||
|
@ -539,6 +548,9 @@ EXTERN uspritetype *tsprite;
|
||||||
#else
|
#else
|
||||||
EXTERN spriteext_t spriteext[MAXSPRITES+MAXUNIQHUDID];
|
EXTERN spriteext_t spriteext[MAXSPRITES+MAXUNIQHUDID];
|
||||||
EXTERN spritesmooth_t spritesmooth[MAXSPRITES+MAXUNIQHUDID];
|
EXTERN spritesmooth_t spritesmooth[MAXSPRITES+MAXUNIQHUDID];
|
||||||
|
# ifndef NEW_MAP_FORMAT
|
||||||
|
EXTERN wallext_t wallext[MAXWALLS];
|
||||||
|
# endif
|
||||||
|
|
||||||
EXTERN sectortype sector[MAXSECTORS + M32_FIXME_SECTORS];
|
EXTERN sectortype sector[MAXSECTORS + M32_FIXME_SECTORS];
|
||||||
EXTERN walltype wall[MAXWALLS + M32_FIXME_WALLS];
|
EXTERN walltype wall[MAXWALLS + M32_FIXME_WALLS];
|
||||||
|
|
|
@ -5910,7 +5910,7 @@ static void drawmaskwall(int16_t damaskwallcnt)
|
||||||
#ifdef NEW_MAP_FORMAT
|
#ifdef NEW_MAP_FORMAT
|
||||||
setup_blend(wal->blend, globalorientation&512);
|
setup_blend(wal->blend, globalorientation&512);
|
||||||
#else
|
#else
|
||||||
setup_blend(0, globalorientation&512);
|
setup_blend(wallext[thewall[z]].blend, globalorientation&512);
|
||||||
#endif
|
#endif
|
||||||
transmaskwallscan(xb1[z],xb2[z], 0);
|
transmaskwallscan(xb1[z],xb2[z], 0);
|
||||||
}
|
}
|
||||||
|
@ -7588,6 +7588,9 @@ static spriteext_t spriteext_s[MAXSPRITES+MAXUNIQHUDID];
|
||||||
static spritesmooth_t spritesmooth_s[MAXSPRITES+MAXUNIQHUDID];
|
static spritesmooth_t spritesmooth_s[MAXSPRITES+MAXUNIQHUDID];
|
||||||
static sectortype sector_s[MAXSECTORS + M32_FIXME_SECTORS];
|
static sectortype sector_s[MAXSECTORS + M32_FIXME_SECTORS];
|
||||||
static walltype wall_s[MAXWALLS + M32_FIXME_WALLS];
|
static walltype wall_s[MAXWALLS + M32_FIXME_WALLS];
|
||||||
|
#ifndef NEW_MAP_FORMAT
|
||||||
|
static wallext_t wallext_s[MAXWALLS];
|
||||||
|
#endif
|
||||||
static spritetype sprite_s[MAXSPRITES];
|
static spritetype sprite_s[MAXSPRITES];
|
||||||
static uspritetype tsprite_s[MAXSPRITESONSCREEN];
|
static uspritetype tsprite_s[MAXSPRITESONSCREEN];
|
||||||
#endif
|
#endif
|
||||||
|
@ -7613,6 +7616,9 @@ int32_t preinitengine(void)
|
||||||
{
|
{
|
||||||
{ (void **) §or, sizeof(sectortype) *MAXSECTORS },
|
{ (void **) §or, sizeof(sectortype) *MAXSECTORS },
|
||||||
{ (void **) &wall, sizeof(walltype) *MAXWALLS }, // +512: editor quirks. FIXME!
|
{ (void **) &wall, sizeof(walltype) *MAXWALLS }, // +512: editor quirks. FIXME!
|
||||||
|
# ifndef NEW_MAP_FORMAT
|
||||||
|
{ (void **) &wallext, sizeof(wallext_t) *MAXWALLS },
|
||||||
|
# endif
|
||||||
{ (void **) &sprite, sizeof(spritetype) *MAXSPRITES },
|
{ (void **) &sprite, sizeof(spritetype) *MAXSPRITES },
|
||||||
{ (void **) &tsprite, sizeof(spritetype) *MAXSPRITESONSCREEN },
|
{ (void **) &tsprite, sizeof(spritetype) *MAXSPRITESONSCREEN },
|
||||||
{ (void **) &spriteext, sizeof(spriteext_t) *(MAXSPRITES+MAXUNIQHUDID) },
|
{ (void **) &spriteext, sizeof(spriteext_t) *(MAXSPRITES+MAXUNIQHUDID) },
|
||||||
|
@ -7644,6 +7650,9 @@ int32_t preinitengine(void)
|
||||||
#elif !defined DEBUG_MAIN_ARRAYS
|
#elif !defined DEBUG_MAIN_ARRAYS
|
||||||
sector = sector_s;
|
sector = sector_s;
|
||||||
wall = wall_s;
|
wall = wall_s;
|
||||||
|
# ifndef NEW_MAP_FORMAT
|
||||||
|
wallext = wallext_s;
|
||||||
|
# endif
|
||||||
sprite = sprite_s;
|
sprite = sprite_s;
|
||||||
tsprite = tsprite_s;
|
tsprite = tsprite_s;
|
||||||
spriteext = spriteext_s;
|
spriteext = spriteext_s;
|
||||||
|
@ -9010,6 +9019,9 @@ static int32_t finish_loadboard(const vec3_t *dapos, int16_t *dacursectnum, int1
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
Bmemset(spriteext, 0, sizeof(spriteext_t)*MAXSPRITES);
|
Bmemset(spriteext, 0, sizeof(spriteext_t)*MAXSPRITES);
|
||||||
|
#ifndef NEW_MAP_FORMAT
|
||||||
|
Bmemset(wallext, 0, sizeof(wallext_t)*MAXWALLS);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
Bmemset(spritesmooth, 0, sizeof(spritesmooth_t)*(MAXSPRITES+MAXUNIQHUDID));
|
Bmemset(spritesmooth, 0, sizeof(spritesmooth_t)*(MAXSPRITES+MAXUNIQHUDID));
|
||||||
|
|
|
@ -4133,7 +4133,7 @@ void polymost_drawmaskwall(int32_t damaskwallcnt)
|
||||||
#ifdef NEW_MAP_FORMAT
|
#ifdef NEW_MAP_FORMAT
|
||||||
uint8_t const blend = wal->blend;
|
uint8_t const blend = wal->blend;
|
||||||
#else
|
#else
|
||||||
uint8_t const blend = 0;
|
uint8_t const blend = wallext[thewall[z]].blend;
|
||||||
#endif
|
#endif
|
||||||
handle_blend(!!(wal->cstat & 128), blend, !!(wal->cstat & 512));
|
handle_blend(!!(wal->cstat & 128), blend, !!(wal->cstat & 512));
|
||||||
|
|
||||||
|
|
|
@ -66,10 +66,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
// increase by 3, because atomic GRP adds 1, and Shareware adds 2
|
// increase by 3, because atomic GRP adds 1, and Shareware adds 2
|
||||||
#ifdef LUNATIC
|
#ifdef LUNATIC
|
||||||
// Lunatic
|
// Lunatic
|
||||||
# define BYTEVERSION_EDUKE32 312
|
# define BYTEVERSION_EDUKE32 315
|
||||||
#else
|
#else
|
||||||
// Non-Lua build
|
// Non-Lua build
|
||||||
# define BYTEVERSION_EDUKE32 312
|
# define BYTEVERSION_EDUKE32 315
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#define BYTEVERSION_13 27
|
//#define BYTEVERSION_13 27
|
||||||
|
|
|
@ -6014,6 +6014,9 @@ void G_SaveMapState(void)
|
||||||
initprintf("Line %d: savemapstate called from EVENT_ANIMATESPRITES. WHY?\n", g_errorLineNum);
|
initprintf("Line %d: savemapstate called from EVENT_ANIMATESPRITES. WHY?\n", g_errorLineNum);
|
||||||
#endif
|
#endif
|
||||||
Bmemcpy(&save->spriteext[0],&spriteext[0],sizeof(spriteext_t)*MAXSPRITES);
|
Bmemcpy(&save->spriteext[0],&spriteext[0],sizeof(spriteext_t)*MAXSPRITES);
|
||||||
|
#ifndef NEW_MAP_FORMAT
|
||||||
|
Bmemcpy(&save->wallext[0],&wallext[0],sizeof(wallext_t)*MAXWALLS);
|
||||||
|
#endif
|
||||||
|
|
||||||
save->numsprites = Numsprites;
|
save->numsprites = Numsprites;
|
||||||
save->tailspritefree = tailspritefree;
|
save->tailspritefree = tailspritefree;
|
||||||
|
@ -6143,6 +6146,9 @@ void G_RestoreMapState(void)
|
||||||
|
|
||||||
numwalls = pSavedState->numwalls;
|
numwalls = pSavedState->numwalls;
|
||||||
Bmemcpy(&wall[0],&pSavedState->wall[0],sizeof(walltype)*MAXWALLS);
|
Bmemcpy(&wall[0],&pSavedState->wall[0],sizeof(walltype)*MAXWALLS);
|
||||||
|
#ifndef NEW_MAP_FORMAT
|
||||||
|
Bmemcpy(&wallext[0],&pSavedState->wallext[0],sizeof(wallext_t)*MAXWALLS);
|
||||||
|
#endif
|
||||||
numsectors = pSavedState->numsectors;
|
numsectors = pSavedState->numsectors;
|
||||||
Bmemcpy(§or[0],&pSavedState->sector[0],sizeof(sectortype)*MAXSECTORS);
|
Bmemcpy(§or[0],&pSavedState->sector[0],sizeof(sectortype)*MAXSECTORS);
|
||||||
Bmemcpy(&sprite[0],&pSavedState->sprite[0],sizeof(spritetype)*MAXSPRITES);
|
Bmemcpy(&sprite[0],&pSavedState->sprite[0],sizeof(spritetype)*MAXSPRITES);
|
||||||
|
|
|
@ -1072,6 +1072,9 @@ static const dataspec_t svgm_secwsp[] =
|
||||||
{ DS_SAVEFN, (void *)&sv_prespriteextsave, 0, 1 },
|
{ DS_SAVEFN, (void *)&sv_prespriteextsave, 0, 1 },
|
||||||
#endif
|
#endif
|
||||||
{ DS_MAINAR, &spriteext, sizeof(spriteext_t), MAXSPRITES },
|
{ DS_MAINAR, &spriteext, sizeof(spriteext_t), MAXSPRITES },
|
||||||
|
#ifndef NEW_MAP_FORMAT
|
||||||
|
{ DS_MAINAR, &wallext, sizeof(wallext_t), MAXWALLS },
|
||||||
|
#endif
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
{ DS_SAVEFN|DS_LOADFN, (void *)&sv_postspriteext, 0, 1 },
|
{ DS_SAVEFN|DS_LOADFN, (void *)&sv_postspriteext, 0, 1 },
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -84,6 +84,9 @@ typedef struct {
|
||||||
spriteext_t spriteext[MAXSPRITES];
|
spriteext_t spriteext[MAXSPRITES];
|
||||||
uspritetype sprite[MAXSPRITES];
|
uspritetype sprite[MAXSPRITES];
|
||||||
uwalltype wall[MAXWALLS];
|
uwalltype wall[MAXWALLS];
|
||||||
|
#ifndef NEW_MAP_FORMAT
|
||||||
|
wallext_t wallext[MAXWALLS];
|
||||||
|
#endif
|
||||||
#if !defined LUNATIC
|
#if !defined LUNATIC
|
||||||
intptr_t *vars[MAXGAMEVARS];
|
intptr_t *vars[MAXGAMEVARS];
|
||||||
intptr_t *arrays[MAXGAMEARRAYS];
|
intptr_t *arrays[MAXGAMEARRAYS];
|
||||||
|
|
Loading…
Reference in a new issue