On Windows, when renaming Last to the destination filename, check if the
[neverball] / ball / st_title.c
index bfc0719..70d85bd 100644 (file)
@@ -1,4 +1,4 @@
-/*   
+/*
  * Copyright (C) 2003 Robert Kooima
  *
  * NEVERBALL is  free software; you can redistribute  it and/or modify
@@ -46,12 +46,14 @@ static int title_action(int i)
 
     switch (i)
     {
-    case TITLE_PLAY: 
-       config_get_s(CONFIG_PLAYER, player, MAXNAM);
-       if (player[0] == '\0')
-           return goto_name(&st_set, &st_title);
-       else
-           return goto_state(&st_set);
+    case TITLE_PLAY:
+        config_get_s(CONFIG_PLAYER, player, MAXNAM);
+
+        if (player[0] == '\0')
+            return goto_name(&st_set, &st_title);
+        else
+            return goto_state(&st_set);
+
     case TITLE_HELP: return goto_state(&st_help);
     case TITLE_DEMO: return goto_state(&st_demo);
     case TITLE_CONF: return goto_state(&st_conf);
@@ -96,7 +98,7 @@ static int title_enter(void)
     audio_music_fade_to(0.5f, "bgm/title.ogg");
 
     /* Initialize the first level of the first set for display. */
-    level_load(config_data("map-rlk/title.sol"), &title_level);
+    level_load("map-rlk/title.sol", &title_level);
     game_init(&title_level, 0, 0);
 
     real_time = 0.0f;
@@ -159,7 +161,7 @@ static void title_timer(int id, float dt)
             if (demo_replay_step(&t))
                 demo_time += t;
             else
-            { 
+            {
                 demo_replay_stop(0);
                 game_fade(+1.0f);
                 real_time = 0.0f;
@@ -186,10 +188,10 @@ static void title_timer(int id, float dt)
 static int title_keybd(int c, int d)
 {
     if (d && c == SDLK_c && ALLOW_CHEAT)
-       config_tgl_d(CONFIG_CHEAT);
-    return 1; 
+        config_tgl_d(CONFIG_CHEAT);
+    return 1;
 }
-       
+
 static int title_buttn(int b, int d)
 {
     if (d)