Polish
This commit is contained in:
parent
a468a8535c
commit
6f9f0c5afc
2 changed files with 15 additions and 20 deletions
14
demo1.cpp
14
demo1.cpp
|
@ -11,11 +11,13 @@
|
|||
*/
|
||||
|
||||
//#define COMPUTE_WALL_TEXCOORDS 0
|
||||
// ^ this turns off textures
|
||||
// ^ this turns off wall textures
|
||||
|
||||
//#define SUBSAMPLE 1
|
||||
// ^ this turns on full X-resolution
|
||||
|
||||
#define RCL_COMPUTE_FLOOR_TEXCOORDS 1
|
||||
// ^ this turns on floor texture (a lot slower)
|
||||
|
||||
// redefine some parameters
|
||||
#define FPS 255
|
||||
|
@ -1105,9 +1107,13 @@ int16_t intensity;
|
|||
}
|
||||
else
|
||||
{
|
||||
color = pixel->isFloor ?
|
||||
(pixel->height == RCL_FLOOR_TEXCOORDS_HEIGHT ? sampleImage(texture5,pixel->texCoords.x / 2,pixel->texCoords.y / 2) : HUE(1)) :
|
||||
18;
|
||||
color = !pixel->isFloor ?
|
||||
18 :
|
||||
#if RCL_COMPUTE_FLOOR_TEXCOORDS == 1
|
||||
(pixel->height == RCL_FLOOR_TEXCOORDS_HEIGHT ? sampleImage(texture5,pixel->texCoords.x / 2,pixel->texCoords.y / 2) : HUE(1));
|
||||
#else
|
||||
HUE(10);
|
||||
#endif
|
||||
|
||||
color = addIntensity(color,intensity);
|
||||
}
|
||||
|
|
21
demo3.cpp
21
demo3.cpp
|
@ -62,9 +62,12 @@ uint16_t changeIndex = 0;
|
|||
int16_t editCounter = 0;
|
||||
|
||||
#define SQUARE_COLORS 4
|
||||
const uint8_t squareColors[SQUARE_COLORS] =
|
||||
{ HUE(10), HUE(8), HUE(14), HUE(15) };
|
||||
|
||||
#define FLOOR_COLORS 8
|
||||
uint8_t squareColors[SQUARE_COLORS];
|
||||
uint8_t floorColors[FLOOR_COLORS];
|
||||
const uint8_t floorColors[FLOOR_COLORS] =
|
||||
{ HUE(2), HUE(3), HUE(10), HUE(11), HUE(1), HUE(5), HUE(6), HUE(14) };
|
||||
|
||||
#define HEIGHT_PROFILE_LENGTH 256
|
||||
|
||||
|
@ -558,20 +561,6 @@ int main()
|
|||
defaultConstraints.maxHits = 6;
|
||||
defaultConstraints.maxSteps = 20;
|
||||
|
||||
squareColors[0] = 179;
|
||||
squareColors[1] = 147;
|
||||
squareColors[2] = 130;
|
||||
squareColors[3] = 210;
|
||||
|
||||
floorColors[0] = HUE(2);
|
||||
floorColors[1] = HUE(3);
|
||||
floorColors[2] = HUE(10);
|
||||
floorColors[3] = HUE(11);
|
||||
floorColors[4] = HUE(1);
|
||||
floorColors[5] = HUE(5);
|
||||
floorColors[6] = HUE(6);
|
||||
floorColors[7] = HUE(14);
|
||||
|
||||
player.setPositionSquare(4,5);
|
||||
player.mCamera.height = floorHeightAt(4,5);
|
||||
|
||||
|
|
Loading…
Reference in a new issue