CorsixTH engine (the C++ part)
Open source implementation of Theme Hospital
Loading...
Searching...
No Matches
th_gfx_sdl.h
Go to the documentation of this file.
1/*
2Copyright (c) 2009-2013 Peter "Corsix" Cawley and Edvin "Lego3" Linge
3
4Permission is hereby granted, free of charge, to any person obtaining a copy of
5this software and associated documentation files (the "Software"), to deal in
6the Software without restriction, including without limitation the rights to
7use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8of the Software, and to permit persons to whom the Software is furnished to do
9so, subject to the following conditions:
10
11The above copyright notice and this permission notice shall be included in all
12copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20SOFTWARE.
21*/
22
23#ifndef CORSIX_TH_TH_GFX_SDL_H_
24#define CORSIX_TH_TH_GFX_SDL_H_
25
26#include "config.h"
27
28#include <SDL.h>
29
30#include <array>
31#include <memory>
32#include <stack>
33#include <stdexcept>
34#include <vector>
35
36#include "th_gfx_common.h"
37
38class cursor;
39class line_sequence;
42
43struct clip_rect : public SDL_Rect {
46};
47
61
62enum class scaled_items;
63
65typedef uint32_t argb_colour;
66
68class palette {
69 public: // External API
71 static constexpr int color_count{256};
72
74 palette() = default;
75
77
83 palette(const uint8_t* pData, size_t iDataLength, bool is8bit);
84
86
94 bool set_entry(int iEntry, uint8_t iR, uint8_t iG, uint8_t iB);
95
96 public: // Internal (this rendering engine only) API
98
105 static constexpr argb_colour pack_argb(uint8_t iA, uint8_t iR, uint8_t iG,
106 uint8_t iB) {
107 return (static_cast<argb_colour>(iR) << 0) |
108 (static_cast<argb_colour>(iG) << 8) |
109 (static_cast<argb_colour>(iB) << 16) |
110 (static_cast<argb_colour>(iA) << 24);
111 }
112
114
118 static constexpr uint8_t get_red(argb_colour iColour) {
119 return static_cast<uint8_t>((iColour >> 0) & 0xFF);
120 }
121
123
127 static constexpr uint8_t get_green(argb_colour iColour) {
128 return static_cast<uint8_t>((iColour >> 8) & 0xFF);
129 }
130
132
136 static constexpr uint8_t get_blue(argb_colour iColour) {
137 return static_cast<uint8_t>((iColour >> 16) & 0xFF);
138 }
139
141
145 static constexpr uint8_t get_alpha(argb_colour iColour) {
146 return static_cast<uint8_t>((iColour >> 24) & 0xFF);
147 }
148
150
153 const std::array<argb_colour, color_count>& get_argb_data() const;
154
156
160 inline void set_argb(int iEntry, uint32_t iVal) {
161 colour_index_to_argb_map[iEntry] = iVal;
162 }
163
164 private:
166 std::array<argb_colour, color_count> colour_index_to_argb_map{};
167};
168
173 public:
175
180 virtual ~full_colour_renderer() = default;
181
183
189 void decode_image(const uint8_t* pImg, const ::palette* pPalette,
190 uint32_t iSpriteFlags);
191
192 private:
194
197 virtual void store_argb(uint32_t pixel) = 0;
198
199 const int width;
200 const int height;
201 int x{};
202 int y{};
203
205
208 inline void push_pixel(uint32_t iValue) {
209 if (y < height) {
210 store_argb(iValue);
211 x++;
212 if (x >= width) {
213 x = 0;
214 y++;
215 }
216 } else {
217 throw std::logic_error("Attempt to push_pixel past the end of the image");
218 }
219 }
220};
221
223 public:
224 full_colour_storing(uint32_t* pDest, int iWidth, int iHeight);
225
226 private:
227 void store_argb(uint32_t pixel) override;
228
230 uint32_t* destination;
231};
232
234 public:
235 wx_storing(uint8_t* pRGBData, uint8_t* pAData, int iWidth, int iHeight);
236
237 private:
238 void store_argb(uint32_t pixel) override;
239
241 uint8_t* rgb_data;
242
244 uint8_t* alpha_data;
245};
246
248 public: // External API
253
255 static constexpr uint32_t map_colour(uint8_t iR, uint8_t iG, uint8_t iB) {
256 return palette::pack_argb(0xFF, iR, iG, iB);
257 }
258
261
263 const char* get_last_error();
264
266 bool start_frame();
267
269 bool end_frame();
270
272 bool fill_black();
273
275 bool fill_colour(uint32_t colour);
276
278 // Used to add the blue effect when the game is paused.
280
282 bool fill_rect(uint32_t iColour, int iX, int iY, int iW, int iH);
283
285 int set_minimum_size(int width, int height);
286
288 public:
290 ~scoped_clip();
291
292 private:
293 render_target* target{nullptr};
294 };
295
297 void push_clip_rect(const clip_rect* pRect);
298
300 void pop_clip_rect();
301
303 int get_width() const;
304
306 int get_height() const;
307
310
313
316
318 void set_cursor_position(int iX, int iY);
319
321 bool take_screenshot(const char* file_path) const;
322
324
330
332 void set_caption(const char* sCaption);
333
335 void set_window_grab(bool bActivate);
336
338 const char* get_renderer_details() const;
339
340 // If you add any extra methods here which are called from outside the
341 // rendering engine, then be sure to at least add dummy implementations
342 // to the other rendering engines.
343
344 public: // Internal (this rendering engine only) API
346 public:
347 virtual ~scoped_buffer() = default;
348 };
349
351 public:
353 int iHeight, bool bScale);
356 ~scoped_target_texture() override;
357 void offset(SDL_FRect& targetRect) const;
358 double scale_factor() const;
359 bool is_target() const;
360
361 private:
362 render_target* target;
363 scoped_target_texture* previous_target;
364 SDL_Rect rect;
365 bool scale;
366 SDL_Texture* texture{nullptr};
367 };
368
369 SDL_Renderer* get_renderer() const { return renderer; }
370
372
377 bool should_scale_bitmaps(double* pFactor);
378
380 const uint8_t* pPixels,
381 const ::palette* pPalette,
382 uint32_t iSpriteFlags) const;
384 const uint32_t* pPixels) const;
385 void draw(SDL_Texture* pTexture, const SDL_Rect* prcSrcRect,
386 const SDL_Rect* prcDstRect, int iFlags);
387 void draw_line(line_sequence* pLine, int iX, int iY);
388
392
398 std::unique_ptr<scoped_buffer> begin_intermediate_drawing(int iX, int iY,
399 int iWidth,
400 int iHeight);
401
402 private:
404
405 double draw_scale() const;
406
407 void destroy_intermediate_textures();
408
409 SDL_Window* window{nullptr};
410 SDL_Renderer* renderer{nullptr};
411 scoped_target_texture* current_target{nullptr};
412 std::unique_ptr<scoped_target_texture> zoom_buffer;
413 SDL_PixelFormat* pixel_format{nullptr};
414 bool blue_filter_active{false};
415 cursor* game_cursor{nullptr};
416 double bitmap_scale_factor{1.0};
417 double global_scale_factor{1.0};
418 int width{-1};
419 int height{-1};
420 int cursor_x{};
421 int cursor_y{};
422
423 std::stack<SDL_Rect> clip_rects;
424
425 // Intermediate textures used in the production of the current frame.
426 // These are destroyed after the frame is presented.
427 std::vector<SDL_Texture*> intermediate_textures;
428
429 bool scale_bitmaps{false};
430 bool supports_target_textures{};
431
432 // In SDL2 < 2.0.4 there is an issue with the y coordinates used for
433 // ClipRects in opengl and opengles.
434 // see: https://bugzilla.libsdl.org/show_bug.cgi?id=2700
435 bool apply_opengl_clip_fix{};
436 bool direct_zoom{};
437};
438
441 public:
442 raw_bitmap() = default;
443 ~raw_bitmap();
444
446
449 void set_palette(const ::palette* pPalette);
450
452
461 void load_from_th_file(const uint8_t* pPixelData, size_t iPixelDataLength,
463 uint32_t spriteFlags);
464
466
471 void draw(render_target* pCanvas, int iX, int iY);
472
474
483 void draw(render_target* pCanvas, int iX, int iY, int iSrcX, int iSrcY,
484 int iWidth, int iHeight);
485
486 private:
488 SDL_Texture* texture{nullptr};
489
491 const ::palette* bitmap_palette{nullptr};
492
494 render_target* target{nullptr};
495
497 int width{};
498
500 int height{};
501};
502
505 public: // External API
506 sprite_sheet() = default;
508
510
513 void set_palette(const ::palette* pPalette);
514
517
527 bool load_from_th_file(const uint8_t* pTableData, size_t iTableDataLength,
528 const uint8_t* pChunkData, size_t iChunkDataLength,
530
532
542 bool set_sprite_data(size_t iSprite, const uint8_t* pData, bool bTakeData,
543 size_t iDataLength, int iWidth, int iHeight);
544
546
551 void set_sprite_alt_palette_map(size_t iSprite, const uint8_t* pMap,
552 uint32_t iAlt32);
553
555
558 size_t get_sprite_count() const;
559
561
567
569
577 bool get_sprite_size(size_t iSprite, int* pWidth, int* pHeight) const;
578
580
585 void get_sprite_size_unchecked(size_t iSprite, int* pWidth,
586 int* pHeight) const;
587
589
595
597
601 bool is_sprite_visible(size_t iSprite) const;
602
604
614 void draw_sprite(render_target* pCanvas, size_t iSprite, int iX, int iY,
615 uint32_t iFlags, size_t effect_ticks = 0u,
617 int scale_factor = 1);
618
620
629 bool hit_test_sprite(size_t iSprite, int iX, int iY, uint32_t iFlags) const;
630
631 public: // Internal (this rendering engine only) API
633
638 void wx_draw_sprite(size_t iSprite, uint8_t* pRGBData, uint8_t* pAData);
639
640 private:
641 friend class cursor;
642
644 struct sprite {
646 SDL_Texture* texture;
647
649 SDL_Texture* alt_texture;
650
652 const uint8_t* data;
653
655 const uint8_t* alt_palette_map;
656
658 uint32_t sprite_flags;
659
661 int width;
662
664 int height;
665 }* sprites{nullptr};
666
668 const ::palette* palette{nullptr};
669
671 render_target* target{nullptr};
672
674 size_t sprite_count{};
675
677
680 void _freeSingleSprite(size_t iNumber);
681
683 void _freeSprites();
684
687
691 SDL_Texture* _makeAltBitmap(sprite* pSprite);
692};
693
694class cursor {
695 public:
696 cursor() = default;
697 ~cursor();
698
700 int iHotspotX = 0, int iHotspotY = 0);
701
703
704 static bool set_position(render_target* pTarget, int iX, int iY);
705
706 void draw(render_target* pCanvas, int iX, int iY);
707
708 private:
709 SDL_Surface* bitmap{nullptr};
710 SDL_Cursor* hidden_cursor{nullptr};
711 int hotspot_x{};
712 int hotspot_y{};
713};
714
716 public:
718
719 void move_to(double fX, double fY);
720
721 void line_to(double fX, double fY);
722
723 void set_width(double lineWidth);
724
725 void draw(render_target* pCanvas, int iX, int iY);
726
727 void set_colour(uint8_t iR, uint8_t iG, uint8_t iB, uint8_t iA = 255);
728
731
732 private:
733 friend class render_target;
734
735 enum class line_command : uint32_t { move = 0, line = 1 };
736
737 class line_element {
738 public:
739 line_command type;
740 double x, y;
741 line_element(line_command type, double x, double y)
742 : type(type), x(x), y(y) {}
743 };
744
745 std::vector<line_element> line_elements;
746 double width{1};
747 uint8_t red{0}, green{0}, blue{0}, alpha{255};
748};
749
750#endif // CORSIX_TH_TH_GFX_SDL_H_
Definition th_gfx_sdl.h:694
cursor()=default
void draw(render_target *pCanvas, int iX, int iY)
Definition th_gfx_sdl.cpp:1637
~cursor()
Definition th_gfx_sdl.cpp:1593
bool create_from_sprite(sprite_sheet *pSheet, size_t iSprite, int iHotspotX=0, int iHotspotY=0)
Definition th_gfx_sdl.cpp:1598
static bool set_position(render_target *pTarget, int iX, int iY)
Definition th_gfx_sdl.cpp:1628
void use(render_target *pTarget)
Definition th_gfx_sdl.cpp:1617
Definition th_gfx_sdl.h:172
virtual ~full_colour_renderer()=default
void decode_image(const uint8_t *pImg, const ::palette *pPalette, uint32_t iSpriteFlags)
Decode a 32bpp image, and push it to the storage backend.
Definition th_gfx_sdl.cpp:260
Definition th_gfx_sdl.h:222
Definition th_gfx_sdl.h:715
line_sequence()
Definition th_gfx_sdl.cpp:1646
void depersist(lua_persist_reader *pReader)
Definition th_gfx_sdl.cpp:1686
void line_to(double fX, double fY)
Definition th_gfx_sdl.cpp:1652
void draw(render_target *pCanvas, int iX, int iY)
Definition th_gfx_sdl.cpp:1665
void set_colour(uint8_t iR, uint8_t iG, uint8_t iB, uint8_t iA=255)
Definition th_gfx_sdl.cpp:1658
void move_to(double fX, double fY)
Definition th_gfx_sdl.cpp:1648
void set_width(double lineWidth)
Definition th_gfx_sdl.cpp:1656
void persist(lua_persist_writer *pWriter) const
Definition th_gfx_sdl.cpp:1669
Interface used for depersisting Lua objects.
Definition persist_lua.h:107
Interface used for persisting Lua objects.
Definition persist_lua.h:44
8bpp palette class.
Definition th_gfx_sdl.h:68
static constexpr uint8_t get_blue(argb_colour iColour)
Get the blue component of a colour.
Definition th_gfx_sdl.h:136
static constexpr uint8_t get_green(argb_colour iColour)
Get the green component of a colour.
Definition th_gfx_sdl.h:127
void set_argb(int iEntry, uint32_t iVal)
Set an entry of the palette.
Definition th_gfx_sdl.h:160
static constexpr uint8_t get_red(argb_colour iColour)
Get the red component of a colour.
Definition th_gfx_sdl.h:118
bool set_entry(int iEntry, uint8_t iR, uint8_t iG, uint8_t iB)
Set an entry of the palette.
Definition th_gfx_sdl.cpp:245
palette()=default
Create an empty palette. All entries are black and fully opaque.
static constexpr uint8_t get_alpha(argb_colour iColour)
Get the opacity component of a colour.
Definition th_gfx_sdl.h:145
const std::array< argb_colour, color_count > & get_argb_data() const
Get the internal palette data for fast (read-only) access.
Definition th_gfx_sdl.cpp:255
static constexpr argb_colour pack_argb(uint8_t iA, uint8_t iR, uint8_t iG, uint8_t iB)
Convert A, R, G, B values to a 32bpp colour.
Definition th_gfx_sdl.h:105
static constexpr int color_count
Number of colours in the palette.
Definition th_gfx_sdl.h:71
Stored image.
Definition th_gfx_sdl.h:440
void load_from_th_file(const uint8_t *pPixelData, size_t iPixelDataLength, int iWidth, render_target *pEventualCanvas, uint32_t spriteFlags)
Load the image from the supplied pixel data.
Definition th_gfx_sdl.cpp:1017
~raw_bitmap()
Definition th_gfx_sdl.cpp:1007
raw_bitmap()=default
void draw(render_target *pCanvas, int iX, int iY)
Draw the image at a given position at the given canvas.
Definition th_gfx_sdl.cpp:1101
void set_palette(const ::palette *pPalette)
Set the palette of the image.
Definition th_gfx_sdl.cpp:1013
Definition th_gfx_sdl.h:345
virtual ~scoped_buffer()=default
Definition th_gfx_sdl.h:287
~scoped_clip()
Definition th_gfx_sdl.cpp:655
Definition th_gfx_sdl.h:350
scoped_target_texture(scoped_target_texture &)=delete
scoped_target_texture & operator=(scoped_target_texture &)=delete
~scoped_target_texture() override
Definition th_gfx_sdl.cpp:415
void offset(SDL_FRect &targetRect) const
Definition th_gfx_sdl.cpp:404
double scale_factor() const
Definition th_gfx_sdl.cpp:409
bool is_target() const
Definition th_gfx_sdl.cpp:413
Definition th_gfx_sdl.h:247
const char * get_renderer_details() const
Get any user-displayable information to describe the renderer path used.
Definition th_gfx_sdl.cpp:574
void set_caption(const char *sCaption)
Set the window caption.
Definition th_gfx_sdl.cpp:570
render_target(const render_target &other)=delete
const char * get_last_error()
Get the reason for the last operation failing.
Definition th_gfx_sdl.cpp:580
void draw(SDL_Texture *pTexture, const SDL_Rect *prcSrcRect, const SDL_Rect *prcDstRect, int iFlags)
Definition th_gfx_sdl.cpp:934
bool fill_colour(uint32_t colour)
Paint the entire render target with a solid colour.
Definition th_gfx_sdl.cpp:616
bool update(const render_target_creation_params &params)
Update the parameters for the render target.
Definition th_gfx_sdl.cpp:489
bool set_scale_factor(double fScale, scaled_items eWhatToScale)
Set the amount by which future draw operations are scaled.
Definition th_gfx_sdl.cpp:521
SDL_Renderer * get_renderer() const
Definition th_gfx_sdl.h:369
SDL_Texture * create_palettized_texture(int iWidth, int iHeight, const uint8_t *pPixels, const ::palette *pPalette, uint32_t iSpriteFlags) const
Definition th_gfx_sdl.cpp:882
bool fill_rect(uint32_t iColour, int iX, int iY, int iW, int iH)
Fill a rectangle of the render target with a solid colour.
Definition th_gfx_sdl.cpp:634
~render_target()
Definition th_gfx_sdl.cpp:469
int get_height() const
Get the height of the render target (in pixels)
Definition th_gfx_sdl.cpp:701
int set_minimum_size(int width, int height)
Sets a minimum size for the render target.
bool start_frame()
Begin rendering a new frame.
Definition th_gfx_sdl.cpp:582
SDL_Texture * create_texture(int iWidth, int iHeight, const uint32_t *pPixels) const
Definition th_gfx_sdl.cpp:899
bool end_frame()
Finish rendering the current frame and present it.
Definition th_gfx_sdl.cpp:590
bool should_scale_bitmaps(double *pFactor)
Should bitmaps be scaled?
Definition th_gfx_sdl.cpp:837
static constexpr uint32_t map_colour(uint8_t iR, uint8_t iG, uint8_t iB)
Encode an RGB triplet for fillRect()
Definition th_gfx_sdl.h:255
int get_width() const
Get the width of the render target (in pixels)
Definition th_gfx_sdl.cpp:695
render_target & operator=(const render_target &other)=delete
void set_cursor_position(int iX, int iY)
Update the cursor position (if the cursor is being simulated)
Definition th_gfx_sdl.cpp:717
void pop_clip_rect()
Restore the previous clip rectangle.
Definition th_gfx_sdl.cpp:686
void push_clip_rect(const clip_rect *pRect)
Push a new clip rectangle.
Definition th_gfx_sdl.cpp:657
bool fill_black()
Paint the entire render target black.
Definition th_gfx_sdl.cpp:609
void start_nonoverlapping_draws()
Enable optimisations for non-overlapping draws.
Definition th_gfx_sdl.cpp:707
void set_blue_filter_active(bool bActivate)
Sets a blue filter on the current surface.
Definition th_gfx_sdl.cpp:625
std::unique_ptr< scoped_buffer > begin_intermediate_drawing(int iX, int iY, int iWidth, int iHeight)
Definition th_gfx_sdl.cpp:986
void draw_line(line_sequence *pLine, int iX, int iY)
Definition th_gfx_sdl.cpp:961
void finish_nonoverlapping_draws()
Disable optimisations for non-overlapping draws.
Definition th_gfx_sdl.cpp:711
void set_window_grab(bool bActivate)
Toggle mouse capture on the window.
Definition th_gfx_sdl.cpp:630
friend class scoped_target_texture
Definition th_gfx_sdl.h:403
bool take_screenshot(const char *file_path) const
Take a screenshot and save it as a PNG file.
Definition th_gfx_sdl.cpp:800
void set_cursor(cursor *pCursor)
Set the cursor to be used.
Definition th_gfx_sdl.cpp:715
Sheet of sprites.
Definition th_gfx_sdl.h:504
bool hit_test_sprite(size_t iSprite, int iX, int iY, uint32_t iFlags) const
Test whether a sprite was hit.
Definition th_gfx_sdl.cpp:1577
bool set_sprite_data(size_t iSprite, const uint8_t *pData, bool bTakeData, size_t iDataLength, int iWidth, int iHeight)
Set the data of a sprite.
Definition th_gfx_sdl.cpp:1242
bool get_sprite_size(size_t iSprite, int *pWidth, int *pHeight) const
Get size of a sprite.
Definition th_gfx_sdl.cpp:1287
bool get_sprite_average_colour(size_t iSprite, argb_colour *pColour) const
Get the best colour to represent the sprite.
Definition th_gfx_sdl.cpp:1301
bool load_from_th_file(const uint8_t *pTableData, size_t iTableDataLength, const uint8_t *pChunkData, size_t iChunkDataLength, bool bComplexChunks, render_target *pEventualCanvas)
Definition th_gfx_sdl.cpp:1201
void set_sprite_alt_palette_map(size_t iSprite, const uint8_t *pMap, uint32_t iAlt32)
Supply a new mapped palette to a sprite.
Definition th_gfx_sdl.cpp:1269
~sprite_sheet()
Definition th_gfx_sdl.cpp:1121
bool is_sprite_visible(size_t iSprite) const
Return whether the given sprite show any pixel when displayed.
Definition th_gfx_sdl.cpp:1344
void draw_sprite(render_target *pCanvas, size_t iSprite, int iX, int iY, uint32_t iFlags, size_t effect_ticks=0u, animation_effect effect=animation_effect::none, int scale_factor=1)
Draw a sprite onto the canvas.
Definition th_gfx_sdl.cpp:1356
void get_sprite_size_unchecked(size_t iSprite, int *pWidth, int *pHeight) const
Get size of a sprite, assuming all input is correctly supplied.
Definition th_gfx_sdl.cpp:1295
bool set_sprite_count(size_t iCount, render_target *pCanvas)
Set the number of sprites in the sheet.
Definition th_gfx_sdl.cpp:1152
sprite_sheet()=default
void set_palette(const ::palette *pPalette)
Set the palette to use for the sprites in the sheet.
Definition th_gfx_sdl.cpp:1148
void wx_draw_sprite(size_t iSprite, uint8_t *pRGBData, uint8_t *pAData)
Draw a sprite into wxImage data arrays (for the Map Editor)
Definition th_gfx_sdl.cpp:1439
size_t get_sprite_count() const
Get the number of sprites at the sheet.
Definition th_gfx_sdl.cpp:1285
Definition th_gfx_sdl.h:233
Definition th_gfx_sdl.h:43
Uint16 w_h_type
Definition th_gfx_sdl.h:45
Sint16 x_y_type
Definition th_gfx_sdl.h:44
Definition th_gfx_sdl.h:49
int bpp
Expected colour depth of the render target.
Definition th_gfx_sdl.h:52
int width
Expected width of the render target.
Definition th_gfx_sdl.h:50
int min_width
Minimum width of the render target.
Definition th_gfx_sdl.h:58
bool direct_zoom
Definition th_gfx_sdl.h:56
bool fullscreen
Run full-screen.
Definition th_gfx_sdl.h:53
bool present_immediate
Definition th_gfx_sdl.h:54
int height
Expected height of the render target.
Definition th_gfx_sdl.h:51
int min_height
Minimum height of the render target.
Definition th_gfx_sdl.h:59
scaled_items
Definition th_gfx.h:45
animation_effect
Animation Effect for drawing a sprite with a special effect applied.
Definition th_gfx_common.h:30
@ none
No special effect.
#define SDL_FRect
Definition th_gfx_sdl.cpp:61
uint32_t argb_colour
32bpp ARGB colour. See palette::pack_argb
Definition th_gfx_sdl.h:65