reformat
This commit is contained in:
@@ -120,7 +120,7 @@ void renderBar(SDL_Renderer *renderer,
|
||||
}
|
||||
|
||||
int cmpstringp(const void *p1, const void *p2) {
|
||||
return strcmp(*(const char **)p1, *(const char **)p2);
|
||||
return strcmp(*(const char **) p1, *(const char **) p2);
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ void iterateSortedDir(const char *path, DirEntryCallback callback, SDL_Renderer
|
||||
closedir(dir);
|
||||
|
||||
// Sort entries
|
||||
qsort(names, count, sizeof(char *), cmpstringp);
|
||||
qsort(names, count, sizeof(char *), cmpstringp);
|
||||
|
||||
// Call the user-provided function for each file
|
||||
if (names != NULL) {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define FACTORYGAME_UTIL_H
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
//The window we'll be rendering to
|
||||
extern SDL_Window *window;
|
||||
extern volatile bool running;
|
||||
@@ -33,9 +34,9 @@ SDL_Texture *createRotatedTexture(SDL_Renderer *renderer, SDL_Texture *src, doub
|
||||
|
||||
SDL_Texture *createFlippedTexture(SDL_Renderer *renderer, SDL_Texture *src, SDL_RendererFlip flip);
|
||||
|
||||
SDL_Texture* ScaleTexture(SDL_Renderer* renderer, SDL_Texture* src, int newWidth, int newHeight);
|
||||
SDL_Texture *ScaleTexture(SDL_Renderer *renderer, SDL_Texture *src, int newWidth, int newHeight);
|
||||
|
||||
void DrawThickRect(SDL_Renderer* renderer, SDL_Rect rect, int thickness);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user