diff --git a/src/game/ending.h b/src/game/ending.h index 4a138d5..a6fff85 100644 --- a/src/game/ending.h +++ b/src/game/ending.h @@ -18,20 +18,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define NUM_ENDING_LINES 6 - #include "../common.h" +#define NUM_ENDING_LINES 6 + +extern void blitRectScaled(SDL_Texture *texture, int x, int y, int w, int h, SDL_Rect *srcRect, int center); +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 c, const char *format, ...); +extern void endSectionTransition(void); extern Atlas *getImageFromAtlas(char *filename); extern Texture *getTexture(const char *filename); -extern char *readFile(const char *filename); -extern void blitRectScaled(SDL_Texture *texture, int x, int y, int w, int h, SDL_Rect *srcRect, int center); -extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...); -extern void limitTextWidth(int width); -extern void endSectionTransition(void); -extern void startSectionTransition(void); extern int getWrappedTextHeight(const char *text, int size); -extern void drawRect(int x, int y, int w, int h, int r, int g, int b, int a); +extern void limitTextWidth(int width); +extern char *readFile(const char *filename); +extern void startSectionTransition(void); extern App app; extern Colors colors; + diff --git a/src/game/options.c b/src/game/options.c index 133148d..94b1d9e 100644 --- a/src/game/options.c +++ b/src/game/options.c @@ -68,8 +68,8 @@ void initOptions(void (*callback)(void)) showWidgetGroup("options"); - app.delegate.logic = logic; - app.delegate.draw = draw; + app.delegate.logic = &logic; + app.delegate.draw = &draw; endSectionTransition(); } diff --git a/src/hub/hub.c b/src/hub/hub.c index 6aeb4fc..77de093 100644 --- a/src/hub/hub.c +++ b/src/hub/hub.c @@ -619,8 +619,8 @@ static void returnFromTrophyStats(void) static void returnFromOptions(void) { - app.delegate.logic = logic; - app.delegate.draw = draw; + app.delegate.logic = &logic; + app.delegate.draw = &draw; returnFromTrophyStats(); } diff --git a/src/hub/postMission.c b/src/hub/postMission.c index 64fa249..0f0da7a 100644 --- a/src/hub/postMission.c +++ b/src/hub/postMission.c @@ -53,8 +53,8 @@ void initPostMission(void) playSound(SND_MISSION_COMPLETE, 0); - app.delegate.logic = logic; - app.delegate.draw = draw; + app.delegate.logic = &logic; + app.delegate.draw = &draw; saveGame(); diff --git a/src/world/radar.c b/src/world/radar.c index 9d9adb2..d3c5310 100644 --- a/src/world/radar.c +++ b/src/world/radar.c @@ -49,8 +49,8 @@ void initRadar(void) memset(blips, 0, sizeof(Entity*) * MAX_BLIPS); memset(marker, 0, sizeof(Marker) * MAX_MARKERS); - app.delegate.logic = logic; - app.delegate.draw = draw; + app.delegate.logic = &logic; + app.delegate.draw = &draw; viewRect.x = (world.bob->x / MAP_TILE_SIZE) - (VIEW_SIZE_X / 2); viewRect.y = (world.bob->y / MAP_TILE_SIZE) - (VIEW_SIZE_Y / 2); diff --git a/src/world/world.c b/src/world/world.c index d78a1c1..0c22b2d 100644 --- a/src/world/world.c +++ b/src/world/world.c @@ -133,8 +133,8 @@ void initWorld(void) game.stats[STAT_MISSIONS_PLAYED]++; - app.delegate.logic = logic; - app.delegate.draw = draw; + app.delegate.logic = &logic; + app.delegate.draw = &draw; app.restrictTrophyAlert = 1; @@ -826,8 +826,8 @@ void exitRadar(void) { startSectionTransition(); - app.delegate.logic = logic; - app.delegate.draw = draw; + app.delegate.logic = &logic; + app.delegate.draw = &draw; endSectionTransition(); } @@ -900,8 +900,8 @@ void quitMission(void) static void returnFromOptions(void) { - app.delegate.logic = logic; - app.delegate.draw = draw; + app.delegate.logic = &logic; + app.delegate.draw = &draw; returnFromTrophyStats(); }