From 54591b7d51269554ba672906fb2f9a569fa38287 Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Fri, 19 Apr 2019 16:15:48 +0200 Subject: game,main: reformat comments --- game.c | 9 ++++++--- main.c | 21 ++++++++++++--------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/game.c b/game.c index e0246b6..bffd98b 100644 --- a/game.c +++ b/game.c @@ -139,7 +139,9 @@ int play_level(SDL_Renderer* renderer, struct level_struct *currentlevel) // Move all of the echidnas run_all_echidnaAI_onestep( currentlevel ); - // And make sure we open/close red doors if any of them are stepping on red levers + + // And make sure we open/close red doors if any + // of them are stepping on red levers check_echidna_on_switches( currentlevel ); // Check to see if the player has run into an echidna @@ -150,8 +152,9 @@ int play_level(SDL_Renderer* renderer, struct level_struct *currentlevel) } } - // The code running play_level needs to know if too advance to the next level - // or just repeat the current one ( if the player has died ) + // The code running play_level needs to know if too advance + // to the next level or just repeat the current one (if the + // player has died) return player_status; } diff --git a/main.c b/main.c index bc99a45..c1bc2e0 100644 --- a/main.c +++ b/main.c @@ -40,12 +40,14 @@ void error_sdl( char* reason ) int main(int argc, char *argv[]) { - /// Initialisation + // Initialisation - /* First we need to tell SDL to create a window. A 'surface' is created called surf_screen, - * 'surfaces' are simply images of what we see on-screen. + /* First we need to tell SDL to create a window. A 'surface' + * is created called surf_screen, 'surfaces' are simply images + * of what we see on-screen. * - * To make things appear on the screen, I copy ('blit') images onto this surface at different locations + * To make things appear on the screen, I copy ('blit') images + * onto this surface at different locations */ // Initialise SDL @@ -96,11 +98,12 @@ int main(int argc, char *argv[]) } } - /* Technically the computer will never reach this point, because the while statement - * above will run forever until the user quits the game. - * - * The 'return' statement is still written here so the compiler does not complain - */ + /* Technically the computer will never reach this point, + * because the while statement above will run forever until the + * user quits the game. + * + * The 'return' statement is still written here so the compiler + * does not complain */ return 0; } -- cgit v1.2.1-18-gbd029