mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +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];
|
||||
} spritesmooth_t;
|
||||
|
||||
#ifndef NEW_MAP_FORMAT
|
||||
typedef struct {
|
||||
uint8_t blend;
|
||||
} wallext_t;
|
||||
#endif
|
||||
|
||||
#define SPREXT_NOTMD 1
|
||||
#define SPREXT_NOMDANIM 2
|
||||
#define SPREXT_AWAY1 4
|
||||
|
@ -531,6 +537,9 @@ extern int32_t num_usermaphacks;
|
|||
#if !defined DEBUG_MAIN_ARRAYS
|
||||
EXTERN spriteext_t *spriteext;
|
||||
EXTERN spritesmooth_t *spritesmooth;
|
||||
# ifndef NEW_MAP_FORMAT
|
||||
EXTERN wallext_t *wallext;
|
||||
# endif
|
||||
|
||||
EXTERN sectortype *sector;
|
||||
EXTERN walltype *wall;
|
||||
|
@ -539,6 +548,9 @@ EXTERN uspritetype *tsprite;
|
|||
#else
|
||||
EXTERN spriteext_t spriteext[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 walltype wall[MAXWALLS + M32_FIXME_WALLS];
|
||||
|
|
|
@ -5910,7 +5910,7 @@ static void drawmaskwall(int16_t damaskwallcnt)
|
|||
#ifdef NEW_MAP_FORMAT
|
||||
setup_blend(wal->blend, globalorientation&512);
|
||||
#else
|
||||
setup_blend(0, globalorientation&512);
|
||||
setup_blend(wallext[thewall[z]].blend, globalorientation&512);
|
||||
#endif
|
||||
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 sectortype sector_s[MAXSECTORS + M32_FIXME_SECTORS];
|
||||
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 uspritetype tsprite_s[MAXSPRITESONSCREEN];
|
||||
#endif
|
||||
|
@ -7613,6 +7616,9 @@ int32_t preinitengine(void)
|
|||
{
|
||||
{ (void **) §or, sizeof(sectortype) *MAXSECTORS },
|
||||
{ (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 **) &tsprite, sizeof(spritetype) *MAXSPRITESONSCREEN },
|
||||
{ (void **) &spriteext, sizeof(spriteext_t) *(MAXSPRITES+MAXUNIQHUDID) },
|
||||
|
@ -7644,6 +7650,9 @@ int32_t preinitengine(void)
|
|||
#elif !defined DEBUG_MAIN_ARRAYS
|
||||
sector = sector_s;
|
||||
wall = wall_s;
|
||||
# ifndef NEW_MAP_FORMAT
|
||||
wallext = wallext_s;
|
||||
# endif
|
||||
sprite = sprite_s;
|
||||
tsprite = tsprite_s;
|
||||
spriteext = spriteext_s;
|
||||
|
@ -9010,6 +9019,9 @@ static int32_t finish_loadboard(const vec3_t *dapos, int16_t *dacursectnum, int1
|
|||
#endif
|
||||
{
|
||||
Bmemset(spriteext, 0, sizeof(spriteext_t)*MAXSPRITES);
|
||||
#ifndef NEW_MAP_FORMAT
|
||||
Bmemset(wallext, 0, sizeof(wallext_t)*MAXWALLS);
|
||||
#endif
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
Bmemset(spritesmooth, 0, sizeof(spritesmooth_t)*(MAXSPRITES+MAXUNIQHUDID));
|
||||
|
|
|
@ -4133,7 +4133,7 @@ void polymost_drawmaskwall(int32_t damaskwallcnt)
|
|||
#ifdef NEW_MAP_FORMAT
|
||||
uint8_t const blend = wal->blend;
|
||||
#else
|
||||
uint8_t const blend = 0;
|
||||
uint8_t const blend = wallext[thewall[z]].blend;
|
||||
#endif
|
||||
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
|
||||
#ifdef LUNATIC
|
||||
// Lunatic
|
||||
# define BYTEVERSION_EDUKE32 312
|
||||
# define BYTEVERSION_EDUKE32 315
|
||||
#else
|
||||
// Non-Lua build
|
||||
# define BYTEVERSION_EDUKE32 312
|
||||
# define BYTEVERSION_EDUKE32 315
|
||||
#endif
|
||||
|
||||
//#define BYTEVERSION_13 27
|
||||
|
|
|
@ -6014,6 +6014,9 @@ void G_SaveMapState(void)
|
|||
initprintf("Line %d: savemapstate called from EVENT_ANIMATESPRITES. WHY?\n", g_errorLineNum);
|
||||
#endif
|
||||
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->tailspritefree = tailspritefree;
|
||||
|
@ -6143,6 +6146,9 @@ void G_RestoreMapState(void)
|
|||
|
||||
numwalls = pSavedState->numwalls;
|
||||
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;
|
||||
Bmemcpy(§or[0],&pSavedState->sector[0],sizeof(sectortype)*MAXSECTORS);
|
||||
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 },
|
||||
#endif
|
||||
{ DS_MAINAR, &spriteext, sizeof(spriteext_t), MAXSPRITES },
|
||||
#ifndef NEW_MAP_FORMAT
|
||||
{ DS_MAINAR, &wallext, sizeof(wallext_t), MAXWALLS },
|
||||
#endif
|
||||
#ifdef USE_OPENGL
|
||||
{ DS_SAVEFN|DS_LOADFN, (void *)&sv_postspriteext, 0, 1 },
|
||||
#endif
|
||||
|
|
|
@ -84,6 +84,9 @@ typedef struct {
|
|||
spriteext_t spriteext[MAXSPRITES];
|
||||
uspritetype sprite[MAXSPRITES];
|
||||
uwalltype wall[MAXWALLS];
|
||||
#ifndef NEW_MAP_FORMAT
|
||||
wallext_t wallext[MAXWALLS];
|
||||
#endif
|
||||
#if !defined LUNATIC
|
||||
intptr_t *vars[MAXGAMEVARS];
|
||||
intptr_t *arrays[MAXGAMEARRAYS];
|
||||
|
|
Loading…
Reference in a new issue