mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-26 00:40:56 +00:00
a-c.c: Compile vlineasm4nlogy() only if CLASSIC_NONPOW2_YSIZE_WALLS is #defined.
Also make three file-scope variables static. git-svn-id: https://svn.eduke32.com/eduke32@4758 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e919dee00f
commit
b65ae1b741
3 changed files with 27 additions and 20 deletions
|
@ -11,6 +11,11 @@
|
||||||
#define CLASSIC_SLICE_BY_4
|
#define CLASSIC_SLICE_BY_4
|
||||||
#define A_C_RESTRICT __restrict
|
#define A_C_RESTRICT __restrict
|
||||||
|
|
||||||
|
#define CLASSIC_NONPOW2_YSIZE_SPRITES
|
||||||
|
#ifdef LUNATIC
|
||||||
|
# define CLASSIC_NONPOW2_YSIZE_WALLS
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Definitions of high-precision integer types. **/
|
/** Definitions of high-precision integer types. **/
|
||||||
// Should be used for values that represent coordinates with which calculations
|
// Should be used for values that represent coordinates with which calculations
|
||||||
// like dot product are carried out. Substituting 32-bit ints for these will
|
// like dot product are carried out. Substituting 32-bit ints for these will
|
||||||
|
|
|
@ -37,9 +37,10 @@ char *a64_gtrans;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int32_t bpl, transmode = 0;
|
static int32_t bpl, transmode = 0;
|
||||||
int32_t glogx, glogy, gpinc;
|
static char *gbuf;
|
||||||
|
static int32_t glogx, glogy;
|
||||||
|
int32_t gpinc;
|
||||||
static int32_t gbxinc, gbyinc;
|
static int32_t gbxinc, gbyinc;
|
||||||
char *gbuf;
|
|
||||||
static char *gpal, *ghlinepal, *gtrans;
|
static char *gpal, *ghlinepal, *gtrans;
|
||||||
static char *gpal2;
|
static char *gpal2;
|
||||||
|
|
||||||
|
@ -219,8 +220,9 @@ typedef uint32_t uint32_vec4 __attribute__ ((vector_size (16)));
|
||||||
# define saturate_vplc_trans(vplc, vinc)
|
# define saturate_vplc_trans(vplc, vinc)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CLASSIC_NONPOW2_YSIZE_WALLS
|
||||||
// cnt >= 1
|
// cnt >= 1
|
||||||
void vlineasm4nlogy(int32_t cnt, char *p, char *const A_C_RESTRICT * pal, char *const A_C_RESTRICT * buf,
|
static void vlineasm4nlogy(int32_t cnt, char *p, char *const A_C_RESTRICT * pal, char *const A_C_RESTRICT * buf,
|
||||||
# ifdef USE_VECTOR_EXT
|
# ifdef USE_VECTOR_EXT
|
||||||
uint32_vec4 vplc, const uint32_vec4 vinc)
|
uint32_vec4 vplc, const uint32_vec4 vinc)
|
||||||
# else
|
# else
|
||||||
|
@ -249,6 +251,7 @@ void vlineasm4nlogy(int32_t cnt, char *p, char *const A_C_RESTRICT * pal, char *
|
||||||
|
|
||||||
Bmemcpy(&vplce[0], &vplc[0], sizeof(uint32_t) * 4);
|
Bmemcpy(&vplce[0], &vplc[0], sizeof(uint32_t) * 4);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// cnt >= 1
|
// cnt >= 1
|
||||||
void vlineasm4(int32_t cnt, char *p)
|
void vlineasm4(int32_t cnt, char *p)
|
||||||
|
@ -264,11 +267,16 @@ void vlineasm4(int32_t cnt, char *p)
|
||||||
#endif
|
#endif
|
||||||
const int32_t logy = glogy, ourbpl = bpl;
|
const int32_t logy = glogy, ourbpl = bpl;
|
||||||
|
|
||||||
if (EDUKE32_PREDICT_FALSE(!logy)) // I had an assert on logy for quite a while that NEVER triggered...
|
#ifdef CLASSIC_NONPOW2_YSIZE_WALLS
|
||||||
|
if (EDUKE32_PREDICT_FALSE(!logy))
|
||||||
{
|
{
|
||||||
|
// This should only happen when 'globalshiftval = 0' has been set in engine.c.
|
||||||
vlineasm4nlogy(cnt, p, pal, buf, vplc, vinc);
|
vlineasm4nlogy(cnt, p, pal, buf, vplc, vinc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
assert(logy);
|
||||||
|
#endif
|
||||||
|
|
||||||
// just fucking shoot me
|
// just fucking shoot me
|
||||||
#ifdef CLASSIC_SLICE_BY_4
|
#ifdef CLASSIC_SLICE_BY_4
|
||||||
|
|
|
@ -53,11 +53,6 @@ L_State g_engState;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CACHEAGETIME 16
|
#define CACHEAGETIME 16
|
||||||
#define CLASSIC_NONPOW2_YSIZE_SPRITES
|
|
||||||
|
|
||||||
#ifdef LUNATIC
|
|
||||||
# define CLASSIC_NONPOW2_YSIZE_WALLS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(__arm__) && !defined(GEKKO)
|
#if !defined(__arm__) && !defined(GEKKO)
|
||||||
#define HIGH_PRECISION_SPRITE
|
#define HIGH_PRECISION_SPRITE
|
||||||
|
@ -4208,15 +4203,14 @@ static int32_t gglogx, gglogy, ggpinc;
|
||||||
static char *ggbuf, *ggpal;
|
static char *ggbuf, *ggpal;
|
||||||
|
|
||||||
#ifdef ENGINE_USING_A_C
|
#ifdef ENGINE_USING_A_C
|
||||||
extern int32_t glogx, glogy, gpinc;
|
extern int32_t gpinc;
|
||||||
extern char *gbuf;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline void setupslopevlin_alsotrans(int32_t logylogx, intptr_t bufplc, int32_t pinc)
|
static inline void setupslopevlin_alsotrans(int32_t logylogx, intptr_t bufplc, int32_t pinc)
|
||||||
{
|
{
|
||||||
#ifdef ENGINE_USING_A_C
|
#ifdef ENGINE_USING_A_C
|
||||||
glogx = (logylogx&255); glogy = (logylogx>>8);
|
sethlinesizes(logylogx&255, logylogx>>8, bufplc);
|
||||||
gbuf = (char *) bufplc; gpinc = pinc;
|
gpinc = pinc;
|
||||||
#else
|
#else
|
||||||
setupslopevlin(logylogx, bufplc, pinc);
|
setupslopevlin(logylogx, bufplc, pinc);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue