mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 09:20:51 +00:00
Split r3159..r3161, part 6: code conditional on __cplusplus.
Note the type change of vplce[] in engine.c: int32_t -> uint32_t. git-svn-id: https://svn.eduke32.com/eduke32@3172 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
5485206c03
commit
6d5d415ea5
6 changed files with 58 additions and 13 deletions
|
@ -407,7 +407,13 @@ EXTERN spritetype *tspriteptr[MAXSPRITESONSCREEN + 1];
|
|||
|
||||
EXTERN int32_t xdim, ydim, numpages;
|
||||
EXTERN int32_t yxaspect, viewingrange;
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
EXTERN intptr_t ylookup[MAXYDIM+1];
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#define MAXVALIDMODES 256
|
||||
EXTERN int32_t validmodecnt;
|
||||
|
@ -469,8 +475,14 @@ EXTERN int16_t nextspritesect[MAXSPRITES], nextspritestat[MAXSPRITES];
|
|||
EXTERN int16_t tilesizx[MAXTILES], tilesizy[MAXTILES];
|
||||
EXTERN char picsiz[MAXTILES];
|
||||
EXTERN char walock[MAXTILES];
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
EXTERN char pow2char[8];
|
||||
EXTERN int32_t pow2long[32];
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
EXTERN int32_t picanm[MAXTILES];
|
||||
EXTERN intptr_t waloff[MAXTILES]; // stores pointers to cache -- SA
|
||||
|
||||
|
|
|
@ -132,7 +132,8 @@ int32_t vlineasm1(int32_t vinc, intptr_t paloffs, int32_t cnt, uint32_t vplc, in
|
|||
|
||||
|
||||
extern intptr_t palookupoffse[4];
|
||||
extern int32_t vplce[4], vince[4];
|
||||
extern uint32_t vplce[4];
|
||||
extern int32_t vince[4];
|
||||
extern intptr_t bufplce[4];
|
||||
|
||||
// cnt >= 1
|
||||
|
|
|
@ -383,10 +383,20 @@ int32_t baselayer_init(void)
|
|||
# include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#if !defined(NOASM) && !defined(GEKKO) && !defined(__ANDROID__)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int32_t dep_begin, dep_end;
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void makeasmwriteable(void)
|
||||
{
|
||||
#if !defined(NOASM) && !defined(GEKKO) && !defined(__ANDROID__)
|
||||
extern int32_t dep_begin, dep_end;
|
||||
// extern int32_t dep_begin, dep_end;
|
||||
# if defined _WIN32
|
||||
DWORD oldprot;
|
||||
if (!VirtualProtect((LPVOID)&dep_begin, (SIZE_T)&dep_end - (SIZE_T)&dep_begin, PAGE_EXECUTE_READWRITE, &oldprot))
|
||||
|
|
|
@ -130,7 +130,22 @@ static int16_t *dotp1[MAXYDIM], *dotp2[MAXYDIM];
|
|||
|
||||
static int8_t tempbuf[MAXWALLS];
|
||||
|
||||
// referenced from asm
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int32_t ebpbak, espbak;
|
||||
int32_t reciptable[2048], fpuasm;
|
||||
intptr_t asm1, asm2, asm3, asm4, palookupoffse[4];
|
||||
uint32_t vplce[4];
|
||||
int32_t vince[4];
|
||||
intptr_t bufplce[4];
|
||||
int32_t globaltilesizy;
|
||||
int32_t globalx1, globaly2, globalx3, globaly3;
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
static intptr_t slopalookup[16384]; // was 2048
|
||||
#if defined(USE_OPENGL)
|
||||
palette_t palookupfog[MAXPALOOKUPS];
|
||||
|
@ -198,8 +213,6 @@ void initialize_engine_globals(void)
|
|||
pow2long[31] = 2147483647L;
|
||||
}
|
||||
|
||||
int32_t reciptable[2048], fpuasm;
|
||||
|
||||
char britable[16][256]; // JBF 20040207: full 8bit precision
|
||||
|
||||
extern char textfont[2048], smalltextfont[2048];
|
||||
|
@ -1252,6 +1265,7 @@ static walltype *loadwall, *loadwallinv;
|
|||
static spritetype *loadsprite;
|
||||
|
||||
// sectoidx bits
|
||||
#undef CM_NONE
|
||||
#define CM_NONE (CM_MAX<<1)
|
||||
#define CM_SOME (CM_NONE-1)
|
||||
#define CM_OUTER (CM_MAX) // sector surrounds clipping sector
|
||||
|
@ -2265,9 +2279,6 @@ static int32_t globalhisibility, globalpisibility, globalcisibility;
|
|||
int32_t xyaspect;
|
||||
static int32_t viewingrangerecip;
|
||||
|
||||
intptr_t asm1, asm2, asm3, asm4, palookupoffse[4];
|
||||
int32_t vplce[4], vince[4];
|
||||
intptr_t bufplce[4];
|
||||
static char globalxshift, globalyshift;
|
||||
static int32_t globalxpanning, globalypanning;
|
||||
int32_t globalshade, globalorientation;
|
||||
|
@ -2277,9 +2288,6 @@ static int32_t globalzd, globalyscale;
|
|||
static int32_t globalxspan, globalyspan, globalispow2=1; // true if texture has power-of-two x and y size
|
||||
static intptr_t globalbufplc;
|
||||
|
||||
int32_t globaltilesizy;
|
||||
|
||||
int32_t globalx1, globaly2, globalx3, globaly3;
|
||||
static int32_t globaly1, globalx2, globalzx;
|
||||
static int32_t globalx, globaly, globalz;
|
||||
|
||||
|
|
|
@ -17,6 +17,15 @@
|
|||
# define YAX_MAXDRAWS 8
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern intptr_t asm1, asm2, asm3, asm4;
|
||||
extern int32_t globalx1, globaly2;
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
//#define OBSOLETE_RENDMODES
|
||||
|
||||
extern uint8_t basepalcount;
|
||||
|
@ -34,10 +43,9 @@ extern int32_t globalpal, cosglobalang, singlobalang;
|
|||
extern int32_t cosviewingrangeglobalang, sinviewingrangeglobalang;
|
||||
extern int32_t globalvisibility;
|
||||
extern int32_t xyaspect;
|
||||
extern intptr_t asm1, asm2, asm3, asm4;
|
||||
extern int32_t globalshade;
|
||||
extern int16_t globalpicnum;
|
||||
extern int32_t globalx1, globaly2;
|
||||
|
||||
extern int32_t globalorientation;
|
||||
|
||||
extern int16_t editstatus;
|
||||
|
|
|
@ -9951,7 +9951,13 @@ int32_t app_main(int32_t argc, const char **argv)
|
|||
wm_setapptitle(tempbuf);
|
||||
//initprintf("sizeof(mapstate_t)=%d\n", (int32_t)sizeof(mapstate_t));
|
||||
|
||||
initprintf(HEAD2 " %s\n", s_buildRev);
|
||||
initprintf(HEAD2 " %s %s\n", s_buildRev,
|
||||
#ifdef __cplusplus
|
||||
"C++ build"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
);
|
||||
initprintf("Compiled %s\n", __DATE__" "__TIME__);
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
|
|
Loading…
Reference in a new issue