Fixed - Enforced 80-character maximum on demo.c
[neverball] / ball / st_conf.c
index 100e088..04c3299 100644 (file)
@@ -16,6 +16,8 @@
 #include "hud.h"
 #include "back.h"
 #include "geom.h"
+#include "item.h"
+#include "ball.h"
 #include "part.h"
 #include "game.h"
 #include "audio.h"
@@ -194,13 +196,13 @@ static int conf_enter(void)
         int s = config_get_d(CONFIG_SOUND_VOLUME);
         int m = config_get_d(CONFIG_MUSIC_VOLUME);
 
-        char resolution[20], player[MAXNAM];
+        char resolution[20], player[MAXNAM] = "";
 
         sprintf(resolution, "%d x %d",
                 config_get_d(CONFIG_WIDTH),
                 config_get_d(CONFIG_HEIGHT));
 
-        config_get_s(CONFIG_PLAYER, player, MAXNAM);
+        config_get_s(CONFIG_PLAYER, player, MAXNAM - 1);
 
         if ((jd = gui_harray(id)))
         {
@@ -341,7 +343,7 @@ static void conf_leave(int id)
     gui_delete(id);
 }
 
-static void conf_paint(int id, float st)
+static void conf_paint(int id, float t)
 {
     config_push_persp((float) config_get_d(CONFIG_VIEW_FOV), 0.1f, FAR_DIST);
     {
@@ -384,10 +386,10 @@ static void null_leave(int id)
 {
     int g = config_get_d(CONFIG_GEOMETRY);
 
-    part_init(GOAL_HEIGHT);
+    part_init(GOAL_HEIGHT, JUMP_HEIGHT);
     shad_init();
-    ball_init(g);
-    item_init(g);
+    ball_init();
+    item_init();
     goal_init(g);
     jump_init(g);
     swch_init(g);
@@ -404,6 +406,7 @@ struct state st_conf = {
     shared_timer,
     shared_point,
     shared_stick,
+    shared_angle,
     shared_click,
     NULL,
     conf_buttn,
@@ -420,5 +423,6 @@ struct state st_null = {
     NULL,
     NULL,
     NULL,
+    NULL,
     1, 0
 };