1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-20 06:12:57 +01:00

Rename lightfx guard

This commit is contained in:
Ted John
2016-10-24 13:06:44 +01:00
parent ca47770825
commit ebe4ca4df4
9 changed files with 16 additions and 18 deletions

View File

@@ -144,6 +144,4 @@ assert_struct_size(registers, 7 * 4);
#define UNUSED(x) ((void)(x)) #define UNUSED(x) ((void)(x))
// #define STOUT_EXPANDED_RENDERING_LIGHT
#endif #endif

View File

@@ -195,7 +195,7 @@ private:
SDL_Texture * _screenTexture = nullptr; SDL_Texture * _screenTexture = nullptr;
SDL_PixelFormat * _screenTextureFormat = nullptr; SDL_PixelFormat * _screenTextureFormat = nullptr;
uint32 _paletteHWMapped[256] = { 0 }; uint32 _paletteHWMapped[256] = { 0 };
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
uint32 _lightPaletteHWMapped[256] = { 0 }; uint32 _lightPaletteHWMapped[256] = { 0 };
#endif #endif
@@ -310,13 +310,13 @@ public:
{ {
if (_screenTextureFormat != nullptr) if (_screenTextureFormat != nullptr)
{ {
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
const SDL_Color * lightPalette = lightfx_get_palette(); const SDL_Color * lightPalette = lightfx_get_palette();
#endif #endif
for (int i = 0; i < 256; i++) for (int i = 0; i < 256; i++)
{ {
_paletteHWMapped[i] = SDL_MapRGB(_screenTextureFormat, palette[i].r, palette[i].g, palette[i].b); _paletteHWMapped[i] = SDL_MapRGB(_screenTextureFormat, palette[i].r, palette[i].g, palette[i].b);
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
_lightPaletteHWMapped[i] = SDL_MapRGBA(_screenTextureFormat, lightPalette[i].r, lightPalette[i].g, lightPalette[i].b, lightPalette[i].a); _lightPaletteHWMapped[i] = SDL_MapRGBA(_screenTextureFormat, lightPalette[i].r, lightPalette[i].g, lightPalette[i].b, lightPalette[i].a);
#endif #endif
} }
@@ -533,7 +533,7 @@ private:
ConfigureDirtyGrid(); ConfigureDirtyGrid();
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
lightfx_update_buffers(dpi); lightfx_update_buffers(dpi);
#endif #endif
} }
@@ -695,7 +695,7 @@ private:
void DisplayViaTexture() void DisplayViaTexture()
{ {
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
lightfx_render_to_texture(_screenTexture, _bits, _width, _height, _paletteHWMapped, _lightPaletteHWMapped); lightfx_render_to_texture(_screenTexture, _bits, _width, _height, _paletteHWMapped, _lightPaletteHWMapped);
#else #else
CopyBitsToTexture(_screenTexture, _bits, (sint32)_width, (sint32)_height, _paletteHWMapped); CopyBitsToTexture(_screenTexture, _bits, (sint32)_width, (sint32)_height, _paletteHWMapped);

View File

@@ -14,7 +14,7 @@
*****************************************************************************/ *****************************************************************************/
#pragma endregion #pragma endregion
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
#include "../common.h" #include "../common.h"
#include <SDL.h> #include <SDL.h>
@@ -1026,4 +1026,4 @@ void lightfx_render_to_texture(
} }
} }
#endif // STOUT_EXPANDED_RENDERING_LIGHT #endif // __ENABLE_LIGHTFX__

View File

@@ -17,7 +17,7 @@
#ifndef _LIGHTFX_H #ifndef _LIGHTFX_H
#define _LIGHTFX_H #define _LIGHTFX_H
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
#include "../common.h" #include "../common.h"
#include "drawing.h" #include "drawing.h"
@@ -75,6 +75,6 @@ void lightfx_render_to_texture(
uint32 * palette, uint32 * palette,
uint32 * lightPalette); uint32 * lightPalette);
#endif // STOUT_EXPANDED_RENDERING_LIGHT #endif // __ENABLE_LIGHTFX__
#endif #endif

View File

@@ -42,7 +42,7 @@ static void ride_entrance_exit_paint(uint8 direction, int height, rct_map_elemen
return; return;
} }
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
if (!is_exit) { if (!is_exit) {
lightfx_add_3d_light_magic_from_drawing_tile(0, 0, height + 45, LIGHTFX_LIGHT_TYPE_LANTERN_3); lightfx_add_3d_light_magic_from_drawing_tile(0, 0, height + 45, LIGHTFX_LIGHT_TYPE_LANTERN_3);
@@ -189,7 +189,7 @@ static void park_entrance_paint(uint8 direction, int height, rct_map_element* ma
if (gTrackDesignSaveMode) if (gTrackDesignSaveMode)
return; return;
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
lightfx_add_3d_light_magic_from_drawing_tile(0, 0, 155, LIGHTFX_LIGHT_TYPE_LANTERN_3); lightfx_add_3d_light_magic_from_drawing_tile(0, 0, 155, LIGHTFX_LIGHT_TYPE_LANTERN_3);

View File

@@ -764,7 +764,7 @@ void path_paint(uint8 direction, uint16 height, rct_map_element * map_element)
loc_6A3B57(map_element, height, footpathEntry, word_F3F038, imageFlags, sceneryImageFlags); loc_6A3B57(map_element, height, footpathEntry, word_F3F038, imageFlags, sceneryImageFlags);
} }
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
if (footpath_element_has_path_scenery(map_element) && !(map_element->flags & MAP_ELEMENT_FLAG_BROKEN)) { if (footpath_element_has_path_scenery(map_element) && !(map_element->flags & MAP_ELEMENT_FLAG_BROKEN)) {
rct_scenery_entry *sceneryEntry = get_footpath_item_entry(footpath_element_get_path_scenery_index(map_element)); rct_scenery_entry *sceneryEntry = get_footpath_item_entry(footpath_element_get_path_scenery_index(map_element));
if (sceneryEntry->path_bit.flags & PATH_BIT_FLAG_LAMP) { if (sceneryEntry->path_bit.flags & PATH_BIT_FLAG_LAMP) {

View File

@@ -27,7 +27,7 @@
*/ */
void peep_paint(rct_peep * peep, int imageDirection) void peep_paint(rct_peep * peep, int imageDirection)
{ {
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
if (peep->type == PEEP_TYPE_STAFF){ if (peep->type == PEEP_TYPE_STAFF){
sint16 peep_x, peep_y, peep_z; sint16 peep_x, peep_y, peep_z;

View File

@@ -259,7 +259,7 @@ void platform_update_palette(const uint8* colours, int start_index, int num_colo
uint8 g = colours[1]; uint8 g = colours[1];
uint8 b = colours[0]; uint8 b = colours[0];
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
lightfx_apply_palette_filter(i, &r, &g, &b); lightfx_apply_palette_filter(i, &r, &g, &b);
#else #else
float night = gDayNightCycle; float night = gDayNightCycle;

View File

@@ -51,7 +51,7 @@
#include "world/scenery.h" #include "world/scenery.h"
#include "world/sprite.h" #include "world/sprite.h"
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
#include "drawing/lightfx.h" #include "drawing/lightfx.h"
@@ -199,7 +199,7 @@ bool rct2_init()
window_staff_list_init_vars(); window_staff_list_init_vars();
#ifdef STOUT_EXPANDED_RENDERING_LIGHT #ifdef __ENABLE_LIGHTFX__
lightfx_init(); lightfx_init();