From 642ba7112f5eebda916b2dcd01427a848fcd6c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Fri, 4 Oct 2019 22:40:41 +0200 Subject: [PATCH] Add setting (fog) --- TODO.txt | 12 ++++++++++++ main.c | 2 ++ settings.h | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 TODO.txt diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 0000000..aa25ee7 --- /dev/null +++ b/TODO.txt @@ -0,0 +1,12 @@ +- port to GB Meta +- custom font +- GUI +- menu +- sounds (music?) +- level 2D map (with revealing, bitmap), special key for quick displaying map +- save/load (optional) +- enemies +- weapons +- more levels +- disable transparency for walls for performance (setting)? +- replace textures in distace with constant color for performance (setting)? diff --git a/main.c b/main.c index 7d18215..3ee0283 100755 --- a/main.c +++ b/main.c @@ -346,7 +346,9 @@ void SFG_pixelFunc(RCL_PixelInfo *pixel) shadow += pixel->depth / (RCL_UNITS_PER_SQUARE * 2); #endif +#if SFG_ENABLE_FOG color = palette_minusValue(color,shadow); +#endif } else { diff --git a/settings.h b/settings.h index 970907a..765def6 100644 --- a/settings.h +++ b/settings.h @@ -85,4 +85,11 @@ */ #define SFG_RAYCASTING_SUBSAMPLE 1 +/** + Enables or disables fog (darkness) due to distance. Recommended to keep on + for good look, but can be turned off for performance. +*/ + +#define SFG_ENABLE_FOG 1 + #endif // guard