mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
engine.c: Split CLASSIC_NONPOW2_YSIZE into _WALLS and _SPRITES, enable the second
git-svn-id: https://svn.eduke32.com/eduke32@3034 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
beb47f47b5
commit
ede713af62
1 changed files with 10 additions and 7 deletions
|
@ -47,7 +47,8 @@
|
||||||
#include "engine_priv.h"
|
#include "engine_priv.h"
|
||||||
|
|
||||||
#define CACHEAGETIME 16
|
#define CACHEAGETIME 16
|
||||||
//#define CLASSIC_NONPOW2_YSIZE
|
//#define CLASSIC_NONPOW2_YSIZE_WALLS
|
||||||
|
#define CLASSIC_NONPOW2_YSIZE_SPRITES
|
||||||
|
|
||||||
#if !defined DEBUG_MAIN_ARRAYS
|
#if !defined DEBUG_MAIN_ARRAYS
|
||||||
const int32_t engine_main_arrays_are_static = 0; // for Lunatic
|
const int32_t engine_main_arrays_are_static = 0; // for Lunatic
|
||||||
|
@ -2642,9 +2643,11 @@ skipitaddwall:
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef NONPOW2_YSIZE_ASM
|
#undef NONPOW2_YSIZE_ASM
|
||||||
#if defined CLASSIC_NONPOW2_YSIZE && !defined ENGINE_USING_A_C
|
#if !defined ENGINE_USING_A_C
|
||||||
|
# if defined CLASSIC_NONPOW2_YSIZE_WALLS || defined CLASSIC_NONPOW2_YSIZE_SPRITES
|
||||||
# define NONPOW2_YSIZE_ASM
|
# define NONPOW2_YSIZE_ASM
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -4533,7 +4536,7 @@ static void setup_globals_wall2(const walltype *wal, uint8_t secvisibility, int3
|
||||||
globvis = mulscale4(globvis, (int32_t)((uint8_t)(secvisibility+16)));
|
globvis = mulscale4(globvis, (int32_t)((uint8_t)(secvisibility+16)));
|
||||||
|
|
||||||
globalshiftval = logtilesizy;
|
globalshiftval = logtilesizy;
|
||||||
#if !defined CLASSIC_NONPOW2_YSIZE
|
#if !defined CLASSIC_NONPOW2_YSIZE_WALLS
|
||||||
// before proper non-power-of-two tilesizy drawing
|
// before proper non-power-of-two tilesizy drawing
|
||||||
if (pow2long[logtilesizy] != tilesizy[globalpicnum])
|
if (pow2long[logtilesizy] != tilesizy[globalpicnum])
|
||||||
globalshiftval++;
|
globalshiftval++;
|
||||||
|
@ -4547,7 +4550,7 @@ static void setup_globals_wall2(const walltype *wal, uint8_t secvisibility, int3
|
||||||
globalshiftval = 32-globalshiftval;
|
globalshiftval = 32-globalshiftval;
|
||||||
globalyscale = wal->yrepeat<<(globalshiftval-19);
|
globalyscale = wal->yrepeat<<(globalshiftval-19);
|
||||||
}
|
}
|
||||||
#if defined CLASSIC_NONPOW2_YSIZE
|
#if defined CLASSIC_NONPOW2_YSIZE_WALLS
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
globaltilesizy = tsizy;
|
globaltilesizy = tsizy;
|
||||||
|
@ -5388,7 +5391,7 @@ static void setup_globals_sprite1(const spritetype *tspr, const sectortype *sec,
|
||||||
tsizy = tilesizy[globalpicnum];
|
tsizy = tilesizy[globalpicnum];
|
||||||
|
|
||||||
globalshiftval = logtilesizy;
|
globalshiftval = logtilesizy;
|
||||||
#if !defined CLASSIC_NONPOW2_YSIZE
|
#if !defined CLASSIC_NONPOW2_YSIZE_SPRITES
|
||||||
// before proper non-power-of-two tilesizy drawing
|
// before proper non-power-of-two tilesizy drawing
|
||||||
if (pow2long[logtilesizy] != tsizy)
|
if (pow2long[logtilesizy] != tsizy)
|
||||||
globalshiftval++;
|
globalshiftval++;
|
||||||
|
@ -5400,7 +5403,7 @@ static void setup_globals_sprite1(const spritetype *tspr, const sectortype *sec,
|
||||||
globalshiftval = 32-globalshiftval;
|
globalshiftval = 32-globalshiftval;
|
||||||
globalyscale = divscale(512,tspr->yrepeat,globalshiftval-19);
|
globalyscale = divscale(512,tspr->yrepeat,globalshiftval-19);
|
||||||
}
|
}
|
||||||
#if defined CLASSIC_NONPOW2_YSIZE
|
#if defined CLASSIC_NONPOW2_YSIZE_SPRITES
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
globaltilesizy = tsizy;
|
globaltilesizy = tsizy;
|
||||||
|
|
Loading…
Reference in a new issue