OSDN Git Service

Make "demon slayer member" plural for subject/verb agreement.
[hengband/hengband.git] / src / main.c
index d883528..895573a 100644 (file)
@@ -11,7 +11,7 @@
 #include "core/game-play.h"
 #include "core/scores.h"
 #include "game-option/runtime-arguments.h"
-#include "io/chuukei.h"
+#include "io/record-play-movie.h"
 #include "io/files-util.h"
 #include "io/inet.h"
 #include "io/signal-handlers.h"
@@ -98,12 +98,13 @@ static void create_user_dir(void)
  * Initialize and verify the file paths, and the score file.
  *
  * Use the ANGBAND_PATH environment var if possible, else use
- * DEFAULT_PATH, and in either case, branch off appropriately.
+ * DEFAULT_(LIB|VAR)_PATH, and in either case, branch off
+ * appropriately.
  *
  * First, we'll look for the ANGBAND_PATH environment variable,
  * and then look for the files in there.  If that doesn't work,
- * we'll try the DEFAULT_PATH constant.  So be sure that one of
- * these two things works...
+ * we'll try the DEFAULT_(LIB|VAR)_PATH constants.  So be sure
+ * that one of these two things works...
  *
  * We must ensure that the path ends with "PATH_SEP" if needed,
  * since the "init_file_paths()" function will simply append the
@@ -115,25 +116,27 @@ static void create_user_dir(void)
  */
 static void init_stuff(void)
 {
-    char path[1024];
+       char libpath[1024], varpath[1024];
 
     concptr tail;
 
     /* Get the environment variable */
     tail = getenv("ANGBAND_PATH");
 
-    /* Use the angband_path, or a default */
-    strncpy(path, tail ? tail : DEFAULT_PATH, 511);
+       /* Use the angband_path, or a default */
+       strncpy(libpath, tail ? tail : DEFAULT_LIB_PATH, 511);
+       strncpy(varpath, tail ? tail : DEFAULT_VAR_PATH, 511);
 
-    /* Make sure it's terminated */
-    path[511] = '\0';
+       /* Make sure they're terminated */
+       libpath[511] = '\0';
+       varpath[511] = '\0';
 
-    /* Hack -- Add a path separator (only if needed) */
-    if (!suffix(path, PATH_SEP))
-        strcat(path, PATH_SEP);
+       /* Hack -- Add a path separator (only if needed) */
+       if (!suffix(libpath, PATH_SEP)) strcat(libpath, PATH_SEP);
+       if (!suffix(varpath, PATH_SEP)) strcat(varpath, PATH_SEP);
 
-    /* Initialize */
-    init_file_paths(path);
+       /* Initialize */
+       init_file_paths(libpath, varpath);
 }
 
 /*
@@ -345,6 +348,7 @@ int main(int argc, char *argv[])
 #endif /* SET_UID */
 
     /* Process the command line arguments */
+    bool browsing_movie = FALSE;
     for (i = 1; args && (i < argc); i++) {
         /* Require proper options */
         if (argv[i][0] != '-') {
@@ -437,7 +441,8 @@ int main(int argc, char *argv[])
                 break;
             }
 
-            prepare_browse_movie(&argv[i][2]);
+            prepare_browse_movie_with_path_build(&argv[i][2]);
+            browsing_movie = TRUE;
             break;
         }
         case '-': {
@@ -533,7 +538,7 @@ int main(int argc, char *argv[])
     pause_line(23);
 
     /* Play the game */
-    play_game(p_ptr, new_game);
+    play_game(p_ptr, new_game, browsing_movie);
 
     /* Quit */
     quit(NULL);