Atlas - SDL_render_ngage_c.h

Home / ext / SDL / src / render / ngage Lines: 1 | Size: 2968 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 SDL_Texture *current_target; 38 39} NGAGE_RendererData; 40 41typedef struct NGAGE_Vertex 42{ 43 int x; 44 int y; 45 46 struct 47 { 48 Uint8 a; 49 Uint8 r; 50 Uint8 g; 51 Uint8 b; 52 53 } color; 54 55} NGAGE_Vertex; 56 57typedef struct CFbsBitmap CFbsBitmap; 58typedef struct CFbsBitGc CFbsBitGc; 59typedef struct CFbsDevice CFbsDevice; 60 61typedef struct NGAGE_TextureData 62{ 63 CFbsBitmap *bitmap; 64 CFbsBitGc *gc; 65 CFbsDevice *device; 66 67} NGAGE_TextureData; 68 69typedef struct NGAGE_CopyExData 70{ 71 SDL_Rect srcrect; 72 SDL_Rect dstrect; 73 74 int angle; 75 76 struct 77 { 78 int x; 79 int y; 80 81 } center; 82 83 SDL_FlipMode flip; 84 85 int scale_x; 86 int scale_y; 87 88} NGAGE_CopyExData; 89 90void NGAGE_Clear(const Uint32 color); 91Uint32 NGAGE_ConvertColor(float r, float g, float b, float a, float color_scale); 92bool NGAGE_Copy(SDL_Renderer *renderer, SDL_Texture *texture, SDL_Rect *srcrect, SDL_Rect *dstrect); 93bool NGAGE_CopyEx(SDL_Renderer *renderer, SDL_Texture *texture, NGAGE_CopyExData *copydata); 94bool NGAGE_CreateTextureData(NGAGE_TextureData *data, const int width, const int height, const int access); 95void NGAGE_DestroyTextureData(NGAGE_TextureData *data); 96void* NGAGE_GetBitmapDataAddress(NGAGE_TextureData *data); 97void NGAGE_DrawLines(NGAGE_Vertex *verts, const int count); 98void NGAGE_DrawPoints(NGAGE_Vertex *verts, const int count); 99void NGAGE_FillRects(NGAGE_Vertex *verts, const int count); 100void NGAGE_Flip(void); 101void NGAGE_SetClipRect(const SDL_Rect *rect); 102void NGAGE_SetDrawColor(const Uint32 color); 103void NGAGE_PumpEventsInternal(void); 104void NGAGE_SuspendScreenSaverInternal(bool suspend); 105void NGAGE_SetRenderTargetInternal(NGAGE_TextureData *target); 106 107#ifdef __cplusplus 108} 109#endif 110 111#endif // ngage_video_render_ngage_c_h 112
[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.