Skip to content

Commit

Permalink
Tidy headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenjsweeney committed Nov 13, 2019
1 parent 2d7c6f7 commit 51b7486
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 25 deletions.
1 change: 0 additions & 1 deletion src/entities/finalToilet.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../json/cJSON.h"

extern AtlasImage *getAtlasImage(char *filename, int required);
extern void initEnding(void);

extern Stage stage;
4 changes: 2 additions & 2 deletions src/game/credits.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

#include "../common.h"

extern void doEntities(void);
extern char *readFile(const char *filename);
extern const char *getFileLocation(const char *filename);
extern void doEntities(void);
extern void drawText(int x, int y, int size, int align, SDL_Color color, const char *format, ...);
extern char *readFile(const char *filename);

extern App app;
9 changes: 4 additions & 5 deletions src/game/ending.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

#include "../common.h"

extern void destroyStage(void);
extern void doEntities(void);
extern int doWipe(void);
extern void drawEntities(int background);
extern AtlasImage *getAtlasImage(char *filename, int required);
extern void drawMap(void);
extern void drawText(int x, int y, int size, int align, SDL_Color color, const char *format, ...);
extern void drawWipe(void);
extern void initWipe(int type);
extern void loadStage(int randomTiles);
extern void blitAtlasImage(AtlasImage *atlasImage, int x, int y, int center, SDL_RendererFlip flip);
extern void destroyStage(void);
extern AtlasImage *getAtlasImage(char *filename, int required);
extern void initCredits(void (*done)(void));
extern void initTitle(void);
extern void initWipe(int type);
extern void loadStage(int randomTiles);

extern App app;
extern Stage stage;
4 changes: 2 additions & 2 deletions src/game/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../common.h"
#include "../json/cJSON.h"

extern const char *getFileLocation(const char *filename);
extern int fileExists(const char *filename);
extern int getJSONIntVal(cJSON *root, char *name, int defaultValue);
extern char *getLookupName(char *prefix, long num);
extern StageMeta *getStageMeta(int n);
extern unsigned long lookup(const char *name);
extern char *readFile(const char *filename);
extern int writeFile(const char *filename, const char *data);
extern int getJSONIntVal(cJSON *root, char *name, int defaultValue);
extern const char *getFileLocation(const char *filename);

extern App app;
extern Game game;
1 change: 0 additions & 1 deletion src/game/meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../common.h"
#include "../json/cJSON.h"

extern const char *getFileLocation(const char *filename);
extern int fileExists(const char *filename);
extern char *readFile(const char *filename);

Expand Down
2 changes: 1 addition & 1 deletion src/game/stageSelect.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ extern void drawText(int x, int y, int size, int align, SDL_Color color, const c
extern AtlasImage *getAtlasImage(char *filename, int required);
extern void initStage(void);
extern int isAcceptControl(void);
extern int isControl(int type);
extern void loadRandomStageMusic(void);
extern void loadStage(int randomTiles);
extern void playSound(int snd, int ch);
extern void showWidgets(const char *groupName, int visible);
extern int isControl(int type);

extern App app;
extern Game game;
Expand Down
4 changes: 2 additions & 2 deletions src/game/stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ extern void doWidgets(const char *groupName);
extern void drawOutlineRect(int x, int y, int w, int h, int r, int g, int b, int a);
extern void drawRect(int x, int y, int w, int h, int r, int g, int b, int a);
extern void drawText(int x, int y, int size, int align, SDL_Color color, const char *format, ...);
extern void drawWidgetFrame(void);
extern void drawWidgets(const char *groupName);
extern AtlasImage *getAtlasImage(char *filename, int required);
extern Widget *getWidget(const char *name, const char *groupName);
extern void showWidgets(const char *groupName, int visible);
extern void drawWidgetFrame(void);
extern int isControl(int type);
extern void showWidgets(const char *groupName, int visible);

extern App app;
extern Game game;
2 changes: 1 addition & 1 deletion src/game/title.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ extern void doEntities(void);
extern void doWidgets(const char *groupName);
extern int doWipe(void);
extern void drawEntities(int background);
extern void initCredits(void (*done)(void));
extern void drawMap(void);
extern void drawRect(int x, int y, int w, int h, int r, int g, int b, int a);
extern void drawText(int x, int y, int size, int align, SDL_Color color, const char *format, ...);
Expand All @@ -35,6 +34,7 @@ extern void drawWidgets(const char *groupName);
extern void drawWipe(void);
extern AtlasImage *getAtlasImage(char *filename, int required);
extern Widget *getWidget(const char *name, const char *groupName);
extern void initCredits(void (*done)(void));
extern void initOptions(void (*done)(void));
extern void initStageSelect(void (*done)(void));
extern void initStats(void (*done)(void));
Expand Down
4 changes: 2 additions & 2 deletions src/system/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../common.h"

extern void createSaveFolder(void);
extern void destroySounds(void);
extern void destroyTextures(void);
extern void drawRect(int x, int y, int w, int h, int r, int g, int b, int a);
extern void initAtlas(void);
extern void initEntityFactory(void);
Expand All @@ -40,7 +42,5 @@ extern void initWidgets(void);
extern void loadConfig(void);
extern void prepareScene(void);
extern void presentScene(void);
extern void destroyTextures(void);
extern void destroySounds(void);

extern App app;
2 changes: 1 addition & 1 deletion src/system/sound.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

#include "../common.h"

extern const char *getFileLocation(const char *filename);
extern float getAngle(int x1, int y1, int x2, int y2);
extern int getDistance(int x1, int y1, int x2, int y2);
extern const char *getFileLocation(const char *filename);
2 changes: 0 additions & 2 deletions src/system/textures.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

#include "../common.h"

extern const char *getFileLocation(char *filename);

extern App app;
8 changes: 4 additions & 4 deletions src/system/widgets.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

extern void calcTextDimensions(const char *text, int size, int *w, int *h);
extern const char *getFileLocation(const char *filename);
extern void clearAcceptControls(void);
extern void clearControl(int type);
extern void drawOutlineRect(int x, int y, int w, int h, int r, int g, int b, int a);
extern void drawRect(int x, int y, int w, int h, int r, int g, int b, int a);
extern void drawText(int x, int y, int size, int align, SDL_Color color, const char *format, ...);
extern char **getFileList(const char *dir, int *count);
extern int isAcceptControl(void);
extern int isControl(int type);
extern long lookup(const char *name);
extern void playSound(int snd, int ch);
extern char *readFile(const char *filename);
extern int isControl(int type);
extern void clearControl(int type);
extern int isAcceptControl(void);
extern void clearAcceptControls(void);

extern App app;
2 changes: 1 addition & 1 deletion src/world/entityFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../json/cJSON.h"

extern void initCoin(Entity *e);
extern void initDecoration(Entity *e);
extern void initDoor(Entity *e);
extern void initFinalToilet(Entity *e);
extern void initItem(Entity *e);
Expand All @@ -41,7 +42,6 @@ extern void initTrafficLight(Entity *e);
extern void initVomitToilet(Entity *e);
extern void initWaterButton(Entity *e);
extern void initWaterPistol(Entity *e);
extern void initDecoration(Entity *e);

extern Entity *self;
extern Stage stage;

0 comments on commit 51b7486

Please sign in to comment.