1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +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 STOUT_EXPANDED_RENDERING_LIGHT
#endif

View File

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

View File

@@ -14,7 +14,7 @@
*****************************************************************************/
#pragma endregion
#ifdef STOUT_EXPANDED_RENDERING_LIGHT
#ifdef __ENABLE_LIGHTFX__
#include "../common.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
#define _LIGHTFX_H
#ifdef STOUT_EXPANDED_RENDERING_LIGHT
#ifdef __ENABLE_LIGHTFX__
#include "../common.h"
#include "drawing.h"
@@ -75,6 +75,6 @@ void lightfx_render_to_texture(
uint32 * palette,
uint32 * lightPalette);
#endif // STOUT_EXPANDED_RENDERING_LIGHT
#endif // __ENABLE_LIGHTFX__
#endif

View File

@@ -42,7 +42,7 @@ static void ride_entrance_exit_paint(uint8 direction, int height, rct_map_elemen
return;
}
#ifdef STOUT_EXPANDED_RENDERING_LIGHT
#ifdef __ENABLE_LIGHTFX__
if (!is_exit) {
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)
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);

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);
}
#ifdef STOUT_EXPANDED_RENDERING_LIGHT
#ifdef __ENABLE_LIGHTFX__
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));
if (sceneryEntry->path_bit.flags & PATH_BIT_FLAG_LAMP) {

View File

@@ -27,7 +27,7 @@
*/
void peep_paint(rct_peep * peep, int imageDirection)
{
#ifdef STOUT_EXPANDED_RENDERING_LIGHT
#ifdef __ENABLE_LIGHTFX__
if (peep->type == PEEP_TYPE_STAFF){
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 b = colours[0];
#ifdef STOUT_EXPANDED_RENDERING_LIGHT
#ifdef __ENABLE_LIGHTFX__
lightfx_apply_palette_filter(i, &r, &g, &b);
#else
float night = gDayNightCycle;

View File

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