Add more options
This commit is contained in:
parent
7c26888a16
commit
33522dd6c5
2 changed files with 14 additions and 0 deletions
|
@ -10,6 +10,9 @@
|
|||
license: CC0 1.0
|
||||
*/
|
||||
|
||||
//#define COMPUTE_WALL_TEXCOORDS 0
|
||||
// ^ this turns off textures
|
||||
|
||||
// redefine some parameters
|
||||
#define FPS 60
|
||||
#define GRAVITY_ACCELERATION (UNITS_PER_SQUARE * 3)
|
||||
|
@ -1007,7 +1010,12 @@ inline void pixelFunc(PixelInfo *pixel)
|
|||
if (intensity < 0)
|
||||
intensity = 0;
|
||||
|
||||
#if COMPUTE_WALL_TEXCOORDS == 1
|
||||
c = sampleImage(textures[pixel->hit.type],pixel->texCoords.x,pixel->texCoords.y);
|
||||
#else
|
||||
c = textures[pixel->hit.type][2];
|
||||
#endif
|
||||
|
||||
c = addIntensity(c,intensity - 3);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
//#define NO_TEXTURES
|
||||
/* ^ Turns off textures and only uses colors, which increases FPS. */
|
||||
|
||||
//#define NO_SHADING
|
||||
/* ^ Turns off shading (fog) which increases FPS. */
|
||||
|
||||
//#define USE_DIST_APPROX 1
|
||||
/* ^ Turns on distance approximation, which won't compute exact distances but
|
||||
only approximations - this should increase performance a little, but
|
||||
|
@ -948,6 +951,7 @@ inline void pixelFunc(PixelInfo *pixel)
|
|||
textureAverageColors[pixel->hit.type];
|
||||
#endif
|
||||
|
||||
#ifndef NO_SHADING
|
||||
if (previousColumn == pixel->position.x)
|
||||
{
|
||||
c = addIntensity(c,pixelIntensity);
|
||||
|
@ -959,6 +963,8 @@ inline void pixelFunc(PixelInfo *pixel)
|
|||
previousColumn = pixel->position.x;
|
||||
c = addIntensity(c,pixelIntensity);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
putSubsampledPixel // macro
|
||||
|
|
Loading…
Reference in a new issue