Adjust settings
This commit is contained in:
parent
6696389ca4
commit
cf9504fbd9
1 changed files with 8 additions and 5 deletions
13
demo2.cpp
13
demo2.cpp
|
@ -22,7 +22,8 @@
|
|||
|
||||
//#define RENDER_PRECISE
|
||||
/* ^ Turns on rendering using a more precise but slower algorithm. This can
|
||||
be seen at less shaky head bobbing when moving. */
|
||||
be seen at less shaky head bobbing when moving. However the latter
|
||||
algorithm doesn't support rolling doors (these will be turned off). */
|
||||
|
||||
//#define NO_TEXTURES
|
||||
/* ^ Turns off textures and only uses colors, which increases FPS. */
|
||||
|
@ -767,11 +768,13 @@ unsigned char textureAverageColors[TEXTURES];
|
|||
|
||||
Unit floorHeightAt(int16_t x, int16_t y)
|
||||
{
|
||||
if (x >= 0 && x < LEVEL_X_RES && y >= 0 && y < LEVEL_Y_RES)
|
||||
return level[(LEVEL_Y_RES - y -1) * LEVEL_X_RES + x] == 0 ?
|
||||
0 : UNITS_PER_SQUARE * 2;
|
||||
Unit square = level[(LEVEL_Y_RES - y -1) * LEVEL_X_RES + x];
|
||||
|
||||
return UNITS_PER_SQUARE * 2;
|
||||
#ifdef RENDER_PRECISE
|
||||
return square == 0 || square == 6 ? 0 : UNITS_PER_SQUARE * 2;
|
||||
#else
|
||||
return square == 0 ? 0 : UNITS_PER_SQUARE * 2;
|
||||
#endif
|
||||
}
|
||||
|
||||
Unit collisionAt(int16_t x, int16_t y)
|
||||
|
|
Loading…
Reference in a new issue