mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-21 08:25:05 -05:00
Add settings
This commit is contained in:
parent
d265b36ff2
commit
b8a496f3df
37
game.h
37
game.h
@ -951,12 +951,25 @@ void SFG_pixelFunc(RCL_PixelInfo *pixel)
|
||||
|
||||
shadow = pixel->hit.direction >> 1;
|
||||
}
|
||||
else
|
||||
else // floor/ceiling
|
||||
{
|
||||
color = pixel->isFloor ?
|
||||
(SFG_currentLevel.floorColor) :
|
||||
(
|
||||
#if SFG_DIFFERENT_FLOOR_CEILING_COLORS
|
||||
2 + (pixel->height / SFG_WALL_HEIGHT_STEP) % 4
|
||||
#else
|
||||
SFG_currentLevel.floorColor
|
||||
#endif
|
||||
) :
|
||||
(pixel->height < SFG_CEILING_MAX_HEIGHT ?
|
||||
SFG_currentLevel.ceilingColor : SFG_TRANSPARENT_COLOR);
|
||||
(
|
||||
#if SFG_DIFFERENT_FLOOR_CEILING_COLORS
|
||||
18 + (pixel->height / SFG_WALL_HEIGHT_STEP) % 4
|
||||
#else
|
||||
SFG_currentLevel.ceilingColor
|
||||
#endif
|
||||
)
|
||||
: SFG_TRANSPARENT_COLOR);
|
||||
}
|
||||
|
||||
if (color != SFG_TRANSPARENT_COLOR)
|
||||
@ -1006,6 +1019,12 @@ void SFG_pixelFunc(RCL_PixelInfo *pixel)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if SFG_BRIGHTNESS > 0
|
||||
color = palette_plusValue(color,SFG_BRIGHTNESS);
|
||||
#elif SFG_BRIGHTNESS < 0
|
||||
color = palette_minusValue(color,-1 * SFG_BRIGHTNESS);
|
||||
#endif
|
||||
|
||||
#if SFG_RAYCASTING_SUBSAMPLE == 1
|
||||
// the other version will probably get optimized to this, but just in case
|
||||
SFG_setGamePixel(pixel->position.x,pixel->position.y,color);
|
||||
@ -4644,18 +4663,6 @@ void SFG_draw()
|
||||
SFG_backgroundBlurIndex = 0;
|
||||
#endif
|
||||
|
||||
uint8_t aaa = 0;
|
||||
/*
|
||||
for (uint16_t j = 0; j < SFG_SCREEN_RESOLUTION_Y; ++j)
|
||||
for (uint16_t i = 0; i < SFG_SCREEN_RESOLUTION_Y; ++i)
|
||||
{
|
||||
SFG_setGamePixel(i,j,2);
|
||||
aaa++;
|
||||
}
|
||||
SFG_drawText("aaa",10,10,2,7,255,0);
|
||||
|
||||
return;
|
||||
*/
|
||||
if (SFG_game.state == SFG_GAME_STATE_MENU)
|
||||
{
|
||||
SFG_drawMenu();
|
||||
|
17
settings.h
17
settings.h
@ -44,6 +44,14 @@
|
||||
#define SFG_FPS 60
|
||||
#endif
|
||||
|
||||
/**
|
||||
Increases or decreases the brightness of the rendered world (but not menu,
|
||||
HUD etc.). Effective values are -8 to 8.
|
||||
*/
|
||||
#ifndef SFG_BRIGHTNESS
|
||||
#define SFG_BRIGHTNESS 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
On platforms with mouse this sets its horizontal sensitivity. 128 means 1
|
||||
RCL_Unit turn angle per mouse pixel travelled.
|
||||
@ -148,6 +156,15 @@
|
||||
#define SFG_FOG_DIMINISH_STEP 2048
|
||||
#endif
|
||||
|
||||
/**
|
||||
If set, floor and ceiling will be colored differently depending on their
|
||||
height. This can be useful when fog is turned on and different floor levels
|
||||
are hard to distinguish.
|
||||
*/
|
||||
#ifndef SFG_DIFFERENT_FLOOR_CEILING_COLORS
|
||||
#define SFG_DIFFERENT_FLOOR_CEILING_COLORS 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
Maximum number of squares that will be traversed by any cast ray. Smaller
|
||||
number is faster but can cause visual artifacts.
|
||||
|
Loading…
Reference in New Issue
Block a user