correctly define functions that take no arguments

This commit is contained in:
Sebastian Krzyszkowiak 2012-11-13 16:49:18 +01:00
parent 32207926f3
commit 194a81fa55
20 changed files with 32 additions and 32 deletions

View file

@ -23,7 +23,7 @@
ALLEGRO_CONFIG *config;
void InitConfig() {
void InitConfig(void) {
ALLEGRO_PATH *path = al_get_standard_path(ALLEGRO_USER_SETTINGS_PATH);
ALLEGRO_PATH *data = al_create_path("SuperDerpy.ini");
al_join_paths(path, data);
@ -46,7 +46,7 @@ const char* GetConfigOptionDefault(char* section, char* name, const char* def) {
if (!ret) return def; else return ret;
}
void DeinitConfig() {
void DeinitConfig(void) {
ALLEGRO_PATH *path = al_get_standard_path(ALLEGRO_USER_SETTINGS_PATH);
ALLEGRO_PATH *data = al_create_path("SuperDerpy.ini");
al_make_directory(al_path_cstr(path, ALLEGRO_NATIVE_PATH_SEP));

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/*! \brief Reads config from file into memory. */
void InitConfig();
void InitConfig(void);
/*! \brief Returns value of requested config entry. */
const char* GetConfigOption(char* section, char* name);
/*! \brief Returns value of requested config entry, or def if no such entry exists. */
@ -27,4 +27,4 @@ const char* GetConfigOptionDefault(char* section, char* name, const char* def);
/*! \brief Sets new value of requested config entry, or created new if no such entry exists. */
void SetConfigOption(char* section, char* name, char* value);
/*! \brief Writes config from memory to file. */
void DeinitConfig();
void DeinitConfig(void);

View file

@ -93,7 +93,7 @@ void Level1_Preload(struct Game *game) {
Dodger_Preload(game);
}
inline int Level1_PreloadSteps() {
inline int Level1_PreloadSteps(void) {
return 4+Dodger_PreloadSteps();
}

View file

@ -25,7 +25,7 @@ void Level1_Unload(struct Game *game);
void Level1_UnloadBitmaps(struct Game *game);
void Level1_Preload(struct Game *game);
void Level1_PreloadBitmaps(struct Game *game, void (*progress)(struct Game*, float));
inline int Level1_PreloadSteps();
inline int Level1_PreloadSteps(void);
void Level1_Draw(struct Game *game);
void Level1_Logic(struct Game *game);
void Level1_Keydown(struct Game *game, ALLEGRO_EVENT *ev);

View file

@ -44,7 +44,7 @@ void Level2_Preload(struct Game *game) {
Moonwalk_Preload(game);
}
inline int Level2_PreloadSteps() {
inline int Level2_PreloadSteps(void) {
return 0+Moonwalk_PreloadSteps();
}

View file

@ -25,7 +25,7 @@ void Level2_Unload(struct Game *game);
void Level2_UnloadBitmaps(struct Game *game);
void Level2_Preload(struct Game *game);
void Level2_PreloadBitmaps(struct Game *game, void (*progress)(struct Game*, float));
inline int Level2_PreloadSteps();
inline int Level2_PreloadSteps(void);
void Level2_Draw(struct Game *game);
void Level2_Logic(struct Game *game);
void Level2_Keydown(struct Game *game, ALLEGRO_EVENT *ev);

View file

@ -45,7 +45,7 @@ void Level3_Preload(struct Game *game) {
Moonwalk_Preload(game);
}
inline int Level3_PreloadSteps() {
inline int Level3_PreloadSteps(void) {
return 0+Moonwalk_PreloadSteps();
}

View file

@ -25,7 +25,7 @@ void Level3_Unload(struct Game *game);
void Level3_UnloadBitmaps(struct Game *game);
void Level3_Preload(struct Game *game);
void Level3_PreloadBitmaps(struct Game *game, void (*progress)(struct Game*, float));
inline int Level3_PreloadSteps();
inline int Level3_PreloadSteps(void);
void Level3_Draw(struct Game *game);
void Level3_Logic(struct Game *game);
void Level3_Keydown(struct Game *game, ALLEGRO_EVENT *ev);

View file

@ -45,7 +45,7 @@ void Level4_Preload(struct Game *game) {
Moonwalk_Preload(game);
}
inline int Level4_PreloadSteps() {
inline int Level4_PreloadSteps(void) {
return 0+Moonwalk_PreloadSteps();
}

View file

@ -25,7 +25,7 @@ void Level4_Unload(struct Game *game);
void Level4_UnloadBitmaps(struct Game *game);
void Level4_Preload(struct Game *game);
void Level4_PreloadBitmaps(struct Game *game, void (*progress)(struct Game*, float));
inline int Level4_PreloadSteps();
inline int Level4_PreloadSteps(void);
void Level4_Draw(struct Game *game);
void Level4_Logic(struct Game *game);
void Level4_Keydown(struct Game *game, ALLEGRO_EVENT *ev);

View file

@ -45,7 +45,7 @@ void Level5_Preload(struct Game *game) {
Moonwalk_Preload(game);
}
inline int Level5_PreloadSteps() {
inline int Level5_PreloadSteps(void) {
return 0+Moonwalk_PreloadSteps();
}

View file

@ -25,7 +25,7 @@ void Level5_Unload(struct Game *game);
void Level5_UnloadBitmaps(struct Game *game);
void Level5_Preload(struct Game *game);
void Level5_PreloadBitmaps(struct Game *game, void (*progress)(struct Game*, float));
inline int Level5_PreloadSteps();
inline int Level5_PreloadSteps(void);
void Level5_Draw(struct Game *game);
void Level5_Logic(struct Game *game);
void Level5_Keydown(struct Game *game, ALLEGRO_EVENT *ev);

View file

@ -45,7 +45,7 @@ void Level6_Preload(struct Game *game) {
Moonwalk_Preload(game);
}
inline int Level6_PreloadSteps() {
inline int Level6_PreloadSteps(void) {
return 0+Moonwalk_PreloadSteps();
}

View file

@ -25,7 +25,7 @@ void Level6_Unload(struct Game *game);
void Level6_UnloadBitmaps(struct Game *game);
void Level6_Preload(struct Game *game);
void Level6_PreloadBitmaps(struct Game *game, void (*progress)(struct Game*, float));
inline int Level6_PreloadSteps();
inline int Level6_PreloadSteps(void);
void Level6_Draw(struct Game *game);
void Level6_Logic(struct Game *game);
void Level6_Keydown(struct Game *game, ALLEGRO_EVENT *ev);

View file

@ -218,7 +218,7 @@ void Dodger_ProcessEvent(struct Game *game, ALLEGRO_EVENT *ev) {
}
}
inline int Dodger_PreloadSteps() {
inline int Dodger_PreloadSteps(void) {
return 7;
}

View file

@ -31,4 +31,4 @@ void Dodger_PreloadBitmaps(struct Game *game, void (*progress)(struct Game*, flo
void Dodger_ProcessEvent(struct Game *game, ALLEGRO_EVENT *ev);
void Dodger_Resume(struct Game *game);
void Dodger_Pause(struct Game *game);
inline int Dodger_PreloadSteps();
inline int Dodger_PreloadSteps(void);

View file

@ -60,7 +60,7 @@ void Moonwalk_Load(struct Game *game) {
void Moonwalk_Keydown(struct Game *game, ALLEGRO_EVENT *ev) {}
inline int Moonwalk_PreloadSteps() {
inline int Moonwalk_PreloadSteps(void) {
return 1;
}

View file

@ -33,4 +33,4 @@ void Moonwalk_PreloadBitmaps(struct Game *game, void (*progress)(struct Game*, f
void Moonwalk_ProcessEvent(struct Game *game, ALLEGRO_EVENT *ev);
void Moonwalk_Resume(struct Game *game);
void Moonwalk_Pause(struct Game *game);
inline int Moonwalk_PreloadSteps();
inline int Moonwalk_PreloadSteps(void);

View file

@ -34,7 +34,7 @@ void TM_Init(struct Game* g) {
background = NULL;
}
void TM_Process() {
void TM_Process(void) {
if (!game) return;
/* process first element from queue
if returns true, delete it */
@ -146,17 +146,17 @@ void Propagate(enum TM_ActionState action) {
}
}
void TM_Draw() {
void TM_Draw(void) {
Propagate(TM_ACTIONSTATE_DRAW);
}
void TM_Pause() {
void TM_Pause(void) {
PrintConsole(game, "Timeline Manager: Pause.");
PauseTimers(true);
Propagate(TM_ACTIONSTATE_PAUSE);
}
void TM_Resume() {
void TM_Resume(void) {
PrintConsole(game, "Timeline Manager: Resume.");
Propagate(TM_ACTIONSTATE_RESUME);
PauseTimers(false);
@ -290,7 +290,7 @@ void TM_AddDelay(int delay) {
al_register_event_source(game->event_queue, al_get_timer_event_source(tmp->timer));
}
void TM_Destroy() {
void TM_Destroy(void) {
if (!game) return;
PrintConsole(game, "Timeline Manager: destroy");
struct TM_Action *tmp, *tmp2, *pom = queue;
@ -371,7 +371,7 @@ void TM_DestroyArgs(struct TM_Arguments* args) {
}
}
bool TM_Initialized() {
bool TM_Initialized(void) {
if (game) return true;
return false;
}

View file

@ -55,13 +55,13 @@ struct TM_Action {
/*! \brief Init timeline. */
void TM_Init(struct Game* game);
/*! \brief Process current timeline actions. */
void TM_Process();
void TM_Process(void);
/*! \brief Ask current timeline actions to draw. */
void TM_Draw();
void TM_Draw(void);
/*! \brief Pauses timeline. */
void TM_Pause();
void TM_Pause(void);
/*! \brief Resumes timeline. */
void TM_Resume();
void TM_Resume(void);
/*! \brief Handle timer events. */
void TM_HandleEvent(ALLEGRO_EVENT *ev);
/*! \brief Add new action to main queue. */
@ -73,12 +73,12 @@ struct TM_Action* TM_AddQueuedBackgroundAction(bool (*func)(struct Game*, struct
/*! \brief Add delay to main queue. */
void TM_AddDelay(int delay);
/*! \brief Destroy timeline. */
void TM_Destroy();
void TM_Destroy(void);
/*! \brief Add data to TM_Arguments queue. */
struct TM_Arguments* TM_AddToArgs(struct TM_Arguments* args, void* arg);
/*! \brief Destroy TM_Arguments queue. */
void TM_DestroyArgs(struct TM_Arguments* args);
/*! \brief Check if timeline is initialised. */
bool TM_Initialized();
bool TM_Initialized(void);
#endif