mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
- removed the indirection for the global arrays.
No idea what part of EDuke32 needed this, but it is not necessary.
This commit is contained in:
parent
75ecd173b6
commit
d572e56839
4 changed files with 13 additions and 31 deletions
|
@ -145,12 +145,12 @@ struct usermaphack_t
|
||||||
uint8_t md4[16]{};
|
uint8_t md4[16]{};
|
||||||
};
|
};
|
||||||
|
|
||||||
EXTERN spriteext_t *spriteext;
|
extern spriteext_t spriteext[MAXSPRITES];
|
||||||
EXTERN spritesmooth_t *spritesmooth;
|
extern spritesmooth_t spritesmooth[MAXSPRITES];
|
||||||
|
|
||||||
EXTERN sectortype *sector;
|
extern sectortype sector[MAXSECTORS];
|
||||||
EXTERN walltype *wall;
|
extern walltype wall[MAXWALLS];
|
||||||
EXTERN spritetype *sprite;
|
extern spritetype sprite[MAXSPRITES];
|
||||||
EXTERN int leveltimer;
|
EXTERN int leveltimer;
|
||||||
|
|
||||||
extern sectortype sectorbackup[MAXSECTORS];
|
extern sectortype sectorbackup[MAXSECTORS];
|
||||||
|
@ -337,7 +337,6 @@ typedef struct artheader_t {
|
||||||
} artheader_t;
|
} artheader_t;
|
||||||
#define ARTv1_UNITOFFSET 24 // using sizeof does not work because picanm_t is not the in-file format.
|
#define ARTv1_UNITOFFSET 24 // using sizeof does not work because picanm_t is not the in-file format.
|
||||||
|
|
||||||
int32_t enginePreInit(void); // a partial setup of the engine used for launch windows
|
|
||||||
int32_t engineInit(void);
|
int32_t engineInit(void);
|
||||||
void engineUnInit(void);
|
void engineUnInit(void);
|
||||||
void initspritelists(void);
|
void initspritelists(void);
|
||||||
|
|
|
@ -41,6 +41,13 @@
|
||||||
#include "gl_renderer.h"
|
#include "gl_renderer.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
spriteext_t spriteext[MAXSPRITES];
|
||||||
|
spritesmooth_t spritesmooth[MAXSPRITES];
|
||||||
|
|
||||||
|
sectortype sector[MAXSECTORS];
|
||||||
|
walltype wall[MAXWALLS];
|
||||||
|
spritetype sprite[MAXSPRITES];
|
||||||
|
|
||||||
int32_t r_rortexture = 0;
|
int32_t r_rortexture = 0;
|
||||||
int32_t r_rortexturerange = 0;
|
int32_t r_rortexturerange = 0;
|
||||||
int32_t r_rorphase = 0;
|
int32_t r_rorphase = 0;
|
||||||
|
@ -625,27 +632,6 @@ const int16_t* getpsky(int32_t picnum, int32_t* dapyscale, int32_t* dapskybits,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// preinitengine
|
|
||||||
//
|
|
||||||
static spriteext_t spriteext_s[MAXSPRITES+MAXUNIQHUDID];
|
|
||||||
static spritesmooth_t spritesmooth_s[MAXSPRITES+MAXUNIQHUDID];
|
|
||||||
static sectortype sector_s[MAXSECTORS];
|
|
||||||
static walltype wall_s[MAXWALLS];
|
|
||||||
spritetype sprite_s[MAXSPRITES];
|
|
||||||
|
|
||||||
int32_t enginePreInit(void)
|
|
||||||
{
|
|
||||||
sector = sector_s;
|
|
||||||
wall = wall_s;
|
|
||||||
sprite = sprite_s;
|
|
||||||
spriteext = spriteext_s;
|
|
||||||
spritesmooth = spritesmooth_s;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// initengine
|
// initengine
|
||||||
//
|
//
|
||||||
|
|
|
@ -986,7 +986,6 @@ int RunGame()
|
||||||
if (Args->CheckParm("-sounddebug"))
|
if (Args->CheckParm("-sounddebug"))
|
||||||
C_DoCommand("stat sounddebug");
|
C_DoCommand("stat sounddebug");
|
||||||
|
|
||||||
enginePreInit();
|
|
||||||
SetupGameButtons();
|
SetupGameButtons();
|
||||||
gameinfo.mBackButton = "engine/graphics/m_back.png";
|
gameinfo.mBackButton = "engine/graphics/m_back.png";
|
||||||
StartScreen->Progress();
|
StartScreen->Progress();
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include "d_net.h"
|
#include "d_net.h"
|
||||||
#include "gameinput.h"
|
#include "gameinput.h"
|
||||||
|
|
||||||
extern spritetype sprite_s[];
|
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
BEGIN_DUKE_NS
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +39,7 @@ struct weaponhit
|
||||||
|
|
||||||
static weaponhit* array(); // this is necessary to allow define inline functions referencing the global array inside the definition itself.
|
static weaponhit* array(); // this is necessary to allow define inline functions referencing the global array inside the definition itself.
|
||||||
|
|
||||||
weaponhit() : s(&sprite_s[this - array()]) {} // little trick to initialize the reference automatically. ;)
|
weaponhit() : s(&sprite[this - array()]) {} // little trick to initialize the reference automatically. ;)
|
||||||
weaponhit(const weaponhit& other) = delete; // we also do not want to allow copies.
|
weaponhit(const weaponhit& other) = delete; // we also do not want to allow copies.
|
||||||
weaponhit& operator=(const weaponhit& other) = delete;
|
weaponhit& operator=(const weaponhit& other) = delete;
|
||||||
void clear()
|
void clear()
|
||||||
|
|
Loading…
Reference in a new issue