demo_header_write() now writes the header. :-P
[neverball] / ball / levels.c
index b300779..1c9ccb1 100644 (file)
@@ -1,4 +1,4 @@
-/*   
+/*
  * Copyright (C) 2003 Robert Kooima
  *
  * NEVERBALL is  free software; you can redistribute  it and/or modify
@@ -34,7 +34,7 @@ static struct level_game current_level_game;
 
 int level_replay(const char *filename)
 {
-    return demo_replay_init(filename, &current_level_game); 
+    return demo_replay_init(filename, &current_level_game);
 }
 
 static struct level single_level; /* a level without set */
@@ -63,20 +63,24 @@ int level_play_go(void)
     return demo_play_init(USER_REPLAY_FILE, l, lg);
 }
 
+/* Prepare to play a single level */
 
 void level_play_single(const char *filename)
-/* Prepare to play a single level */
 {
     struct level *l = &single_level;
+
     level_load(filename, l);
     level_play(l, MODE_SINGLE);
 }
 
-void level_play(const struct level *l, int m)
 /* Prepare to play a level sequence from the `i'th level */
+
+void level_play(const struct level *l, int m)
 {
-    struct level_game *lg = &current_level_game; 
-    memset(lg, 0, sizeof(struct level_game));
+    struct level_game *lg = &current_level_game;
+
+    memset(lg, 0, sizeof (struct level_game));
+
     lg->mode  = m;
     lg->level = l;
     lg->balls = 3;
@@ -96,8 +100,9 @@ int count_extra_balls(int old_score, int coins)
     return sum / 100;
 }
 
-void level_stop(int state, int state_value, int clock, int coins)
 /* Stop the current playing level */
+
+void level_stop(int state, int state_value, int clock, int coins)
 {
     struct level_game *lg = &current_level_game;
     int mode = lg->mode;