#ifndef _LEXSDL_internal_H_ #define _LEXSDL_internal_H_ /* WARNING if LexSdlData struct is modified it need to be modified in Rust too! */ /* INTERNAL TYPES */ typedef struct LexSdlData LexSdlData; typedef struct LEXSDL_Sprite LEXSDL_Sprite; /* INTERNAL GLOBALS */ extern LexSdlData LEXSDLDATA; /* Functions */ extern void LEXSDLINTERNAL_CleanState(void); /* STRUCTS */ struct LexSdlData { /* Windowing(?) */ SDL_Window *window; /* Rendering */ SDL_Renderer *renderer; uint8_t bgColor[4]; uint8_t drColor[4]; SDL_Texture **textures; LEXSDL_Sprite *sprites; LEXSDL_TextureID texturesQuantity; LEXSDL_SpriteID spritesQuantity; /* Event */ uint8_t eventQuit; const uint8_t *keyboardState; LEXSDL_Mouse mouseState; /* Timing */ uint32_t deltaTicksLast; uint32_t deltaTicksCurrent; uint32_t delta; float deltaFloat; }; struct LEXSDL_Sprite { uint32_t frames; uint32_t delta; uint32_t currentFrame; uint32_t fps; LEXSDL_TextureID textureID; SDL_Rect frameDimensions; uint8_t freed; }; #endif