OSDN Git Service

[Refactor] monster_name() で一部 cmd2.c の投擲対象処理を整理。
[hengband/hengband.git] / src / main.c
index 728c490..5738716 100644 (file)
@@ -25,7 +25,7 @@
  *
  * Close down, then fall back into "quit()".
  */
-static void quit_hook(cptr s)
+static void quit_hook(concptr s)
 {
        int j;
 
@@ -99,14 +99,7 @@ static void init_stuff(void)
 {
        char path[1024];
 
-#if defined(VM)
-
-       /* Hack -- prepare "path" */
-       strcpy(path, "Angband:");
-
-#else /* VM */
-
-       cptr tail;
+       concptr tail;
 
        /* Get the environment variable */
        tail = getenv("ANGBAND_PATH");
@@ -120,8 +113,6 @@ static void init_stuff(void)
        /* Hack -- Add a path separator (only if needed) */
        if (!suffix(path, PATH_SEP)) strcat(path, PATH_SEP);
 
-#endif /* VM */
-
        /* Initialize */
        init_file_paths(path);
 }
@@ -137,9 +128,9 @@ static void init_stuff(void)
  * The "<path>" can be any legal path for the given system, and should
  * not end in any special path separator (i.e. "/tmp" or "~/.ang-info").
  */
-static void change_path(cptr info)
+static void change_path(concptr info)
 {
-       cptr s;
+       concptr s;
 
        /* Find equal sign */
        s = my_strchr(info, '=');
@@ -263,7 +254,7 @@ int main(int argc, char *argv[])
        bool done = FALSE;
        bool new_game = FALSE;
        int show_score = 0;
-       cptr mstr = NULL;
+       concptr mstr = NULL;
        bool args = TRUE;
 
        /* Save the "program name" XXX XXX XXX */
@@ -348,7 +339,7 @@ int main(int argc, char *argv[])
 
        /* Acquire the "user name" as a default player name */
 #ifdef ANGBAND_2_8_1
-       user_name(player_name, player_uid);
+       user_name(p_ptr->name, player_uid);
 #else /* ANGBAND_2_8_1 */
        user_name(op_ptr->full_name, player_uid);
 #endif /* ANGBAND_2_8_1 */
@@ -442,7 +433,7 @@ int main(int argc, char *argv[])
                        {
                                if (!argv[i][2]) goto usage;
 #ifdef ANGBAND_2_8_1
-                               strcpy(player_name, &argv[i][2]);
+                               strcpy(p_ptr->name, &argv[i][2]);
 #else /* ANGBAND_2_8_1 */
 
                                /* Get the savefile name */
@@ -559,18 +550,6 @@ int main(int argc, char *argv[])
                                puts("  -mibm    To use IBM (BIOS text mode)");
 #endif /* USE_IBM */
 
-#ifdef USE_SLA
-                               puts("  -msla    To use SLA (SLANG)");
-#endif /* USE_SLA */
-
-#ifdef USE_LSL
-                               puts("  -mlsl    To use LSL (Linux-SVGALIB)");
-#endif /* USE_LSL */
-
-#ifdef USE_VME
-                               puts("  -mvme    To use VME (VAX/ESA)");
-#endif /* USE_VME */
-
                                /* Actually abort the process */
                                quit(NULL);
                        }
@@ -675,76 +654,6 @@ int main(int argc, char *argv[])
 #endif
 
 
-#ifdef USE_EMX
-       /* Attempt to use the "main-emx.c" support */
-       if (!done && (!mstr || (streq(mstr, "emx"))))
-       {
-               extern errr init_emx(void);
-               if (0 == init_emx())
-               {
-                       ANGBAND_SYS = "emx";
-                       done = TRUE;
-               }
-       }
-#endif
-
-
-#ifdef USE_SLA
-       /* Attempt to use the "main-sla.c" support */
-       if (!done && (!mstr || (streq(mstr, "sla"))))
-       {
-               extern errr init_sla(void);
-               if (0 == init_sla())
-               {
-                       ANGBAND_SYS = "sla";
-                       done = TRUE;
-               }
-       }
-#endif
-
-
-#ifdef USE_LSL
-       /* Attempt to use the "main-lsl.c" support */
-       if (!done && (!mstr || (streq(mstr, "lsl"))))
-       {
-               extern errr init_lsl(void);
-               if (0 == init_lsl())
-               {
-                       ANGBAND_SYS = "lsl";
-                       done = TRUE;
-               }
-       }
-#endif
-
-
-#ifdef USE_AMI
-       /* Attempt to use the "main-ami.c" support */
-       if (!done && (!mstr || (streq(mstr, "ami"))))
-       {
-               extern errr init_ami(void);
-               if (0 == init_ami())
-               {
-                       ANGBAND_SYS = "ami";
-                       done = TRUE;
-               }
-       }
-#endif
-
-
-#ifdef USE_VME
-       /* Attempt to use the "main-vme.c" support */
-       if (!done && (!mstr || (streq(mstr, "vme"))))
-       {
-               extern errr init_vme(void);
-               if (0 == init_vme())
-               {
-                       ANGBAND_SYS = "vme";
-                       done = TRUE;
-               }
-       }
-#endif
-
-
        /* Make sure we have a display! */
        if (!done) quit("Unable to prepare any 'display module'!");