Atlas - SDL_render_ngage_c.h

Home / ext / SDL / src / render / ngage Lines: 1 | Size: 2704 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1/* 2 Simple DirectMedia Layer 3 Copyright (C) 1997-2026 Sam Lantinga <[email protected]> 4 5 This software is provided 'as-is', without any express or implied 6 warranty. In no event will the authors be held liable for any damages 7 arising from the use of this software. 8 9 Permission is granted to anyone to use this software for any purpose, 10 including commercial applications, and to alter it and redistribute it 11 freely, subject to the following restrictions: 12 13 1. The origin of this software must not be misrepresented; you must not 14 claim that you wrote the original software. If you use this software 15 in a product, an acknowledgment in the product documentation would be 16 appreciated but is not required. 17 2. Altered source versions must be plainly marked as such, and must not be 18 misrepresented as being the original software. 19 3. This notice may not be removed or altered from any source distribution. 20*/ 21 22#ifndef ngage_video_render_ngage_c_h 23#define ngage_video_render_ngage_c_h 24 25#define NGAGE_SCREEN_WIDTH 176 26#define NGAGE_SCREEN_HEIGHT 208 27 28#ifdef __cplusplus 29extern "C" { 30#endif 31 32#include "../SDL_sysrender.h" 33 34typedef struct NGAGE_RendererData 35{ 36 SDL_Rect *viewport; 37 38} NGAGE_RendererData; 39 40typedef struct NGAGE_Vertex 41{ 42 int x; 43 int y; 44 45 struct 46 { 47 Uint8 a; 48 Uint8 r; 49 Uint8 g; 50 Uint8 b; 51 52 } color; 53 54} NGAGE_Vertex; 55 56typedef struct CFbsBitmap CFbsBitmap; 57 58typedef struct NGAGE_TextureData 59{ 60 CFbsBitmap *bitmap; 61 SDL_Surface *surface; 62 63} NGAGE_TextureData; 64 65typedef struct NGAGE_CopyExData 66{ 67 SDL_Rect srcrect; 68 SDL_Rect dstrect; 69 70 int angle; 71 72 struct 73 { 74 int x; 75 int y; 76 77 } center; 78 79 SDL_FlipMode flip; 80 81 int scale_x; 82 int scale_y; 83 84} NGAGE_CopyExData; 85 86void NGAGE_Clear(const Uint32 color); 87Uint32 NGAGE_ConvertColor(float r, float g, float b, float a, float color_scale); 88bool NGAGE_Copy(SDL_Renderer *renderer, SDL_Texture *texture, SDL_Rect *srcrect, SDL_Rect *dstrect); 89bool NGAGE_CopyEx(SDL_Renderer *renderer, SDL_Texture *texture, NGAGE_CopyExData *copydata); 90bool NGAGE_CreateTextureData(NGAGE_TextureData *data, const int width, const int height); 91void NGAGE_DestroyTextureData(NGAGE_TextureData *data); 92void NGAGE_DrawLines(NGAGE_Vertex *verts, const int count); 93void NGAGE_DrawPoints(NGAGE_Vertex *verts, const int count); 94void NGAGE_FillRects(NGAGE_Vertex *verts, const int count); 95void NGAGE_Flip(void); 96void NGAGE_SetClipRect(const SDL_Rect *rect); 97void NGAGE_SetDrawColor(const Uint32 color); 98void NGAGE_PumpEventsInternal(void); 99void NGAGE_SuspendScreenSaverInternal(bool suspend); 100 101#ifdef __cplusplus 102} 103#endif 104 105#endif // ngage_video_render_ngage_c_h 106
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.