OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Mon, 10 Dec 2018 09:41:24 +0000 (18:41 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Mon, 10 Dec 2018 09:41:24 +0000 (18:41 +0900)
src/autopick.c
src/main-win.c
src/save.c
src/spells3.c
src/util.c

index 0b2360a..f45c949 100644 (file)
 /*
  * Macros for Keywords
  */
-#define FLG_ALL              
-#define FLG_UNAWARE         
-#define FLG_UNIDENTIFIED     
-#define FLG_IDENTIFIED      
-#define FLG_STAR_IDENTIFIED  
-#define FLG_COLLECTING      
-#define FLG_ARTIFACT        
+#define FLG_ALL                                0
+#define FLG_UNAWARE                    1
+#define FLG_UNIDENTIFIED       2
+#define FLG_IDENTIFIED         3
+#define FLG_STAR_IDENTIFIED    4
+#define FLG_COLLECTING         5
+#define FLG_ARTIFACT           6
 #define FLG_EGO                     7 
 #define FLG_GOOD            10
-#define FLG_NAMELESS        11
+#define FLG_NAMELESS    11
 #define FLG_AVERAGE         12
-#define FLG_WORTHLESS       13
+#define FLG_WORTHLESS   13
 #define FLG_RARE            14
 #define FLG_COMMON          15
 #define FLG_BOOSTED         16
-#define FLG_MORE_DICE       17
-#define FLG_MORE_BONUS      18 
+#define FLG_MORE_DICE   17
+#define FLG_MORE_BONUS  18
 #define FLG_WANTED          19
 #define FLG_UNIQUE          20
 #define FLG_HUMAN           21
-#define FLG_UNREADABLE      22
+#define FLG_UNREADABLE  22
 #define FLG_REALM1          23
 #define FLG_REALM2          24
 #define FLG_FIRST           25
index a604d67..099722b 100644 (file)
@@ -5594,7 +5594,7 @@ int FAR PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst,
        HDC hdc;\r
        MSG msg;\r
 \r
-       setlocale( LC_ALL, "ja_JP" );\r
+       setlocale(LC_ALL, "ja_JP.utf8");\r
 \r
        /* Unused */\r
        (void)nCmdShow;\r
index ce028f1..2fb2438 100644 (file)
@@ -1559,21 +1559,16 @@ static bool wr_savefile_new(void)
  */
 static bool save_player_aux(char *name)
 {
-       bool    ok = FALSE;
-
-       int             fd = -1;
-
-       int             mode = 0644;
-
+       bool ok = FALSE;
+       int fd = -1;
+       int mode = 0644;
 
        /* No file yet */
        fff = NULL;
 
-
        /* File type is "SAVE" */
        FILE_TYPE(FILE_TYPE_SAVE);
 
-
        /* Grab permissions */
        safe_setuid_grab();
 
index b57db37..96c5a75 100644 (file)
@@ -515,10 +515,10 @@ void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode)
 void teleport_away_followable(MONSTER_IDX m_idx)
 {
        monster_type *m_ptr = &m_list[m_idx];
-       int          oldfy = m_ptr->fy;
-       int          oldfx = m_ptr->fx;
-       bool         old_ml = m_ptr->ml;
-       int          old_cdis = m_ptr->cdis;
+       POSITION oldfy = m_ptr->fy;
+       POSITION oldfx = m_ptr->fx;
+       bool old_ml = m_ptr->ml;
+       POSITION old_cdis = m_ptr->cdis;
 
        teleport_away(m_idx, MAX_SIGHT * 2 + 5, 0L);
 
@@ -531,7 +531,7 @@ void teleport_away_followable(MONSTER_IDX m_idx)
                {
                        BIT_FLAGS flgs[TR_FLAG_SIZE];
                        object_type *o_ptr;
-                       int i;
+                       INVENTORY_IDX i;
 
                        for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
                        {
index e1972e3..9dce76a 100644 (file)
@@ -663,7 +663,6 @@ errr fd_copy(cptr file, cptr what)
        return (0);
 }
 
-
 /*
  * Hack -- attempt to open a file descriptor (create file)
  * This function should fail if the file already exists
@@ -691,7 +690,6 @@ int fd_make(cptr file, BIT_FLAGS mode)
        return (open(buf, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, mode));
 #endif
 
-
 }