Some more hopefully working progress
This commit is contained in:
12
util/util.h
12
util/util.h
@@ -11,7 +11,9 @@ extern SDL_Window *window;
|
||||
extern volatile bool running;
|
||||
|
||||
//The surface contained by the window
|
||||
extern SDL_Renderer *renderer;
|
||||
extern SDL_Renderer *mainRenderer;
|
||||
|
||||
extern SDL_Rect screenRect;
|
||||
|
||||
typedef enum {
|
||||
ORIENT_LEFT_DOWN,
|
||||
@@ -25,6 +27,8 @@ typedef enum {
|
||||
ORIENT_DIRECTION_COUNT
|
||||
} OrientDirection;
|
||||
|
||||
extern bool debugMode;
|
||||
|
||||
SDL_Texture *createRotatedTexture(SDL_Renderer *renderer, SDL_Texture *src, double angle);
|
||||
|
||||
SDL_Texture *createFlippedTexture(SDL_Renderer *renderer, SDL_Texture *src, SDL_RendererFlip flip);
|
||||
@@ -33,6 +37,12 @@ SDL_Texture* ScaleTexture(SDL_Renderer* renderer, SDL_Texture* src, int newWidth
|
||||
|
||||
void DrawThickRect(SDL_Renderer* renderer, SDL_Rect rect, int thickness);
|
||||
|
||||
// Define a function pointer type for your callback
|
||||
typedef void (*DirEntryCallback)(const char *filename, SDL_Renderer *renderer);
|
||||
|
||||
// Helper function to iterate over sorted entries in a directory
|
||||
void iterateSortedDir(const char *path, DirEntryCallback callback, SDL_Renderer *renderer);
|
||||
|
||||
void renderBar(SDL_Renderer *renderer,
|
||||
int x, int y, int width, int height,
|
||||
int maxValue, int currentValue,
|
||||
|
Reference in New Issue
Block a user