OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
[hengband/hengband.git] / src / main-win.c
index 6f17a28..9e3e2fe 100644 (file)
@@ -374,8 +374,8 @@ struct _term_data
 \r
        uint keys;\r
 \r
-       uint rows;      /* int -> uint */\r
-       uint cols;\r
+       TERM_POSITION rows;     /* int -> uint */\r
+       TERM_POSITION cols;\r
 \r
        uint pos_x;\r
        uint pos_y;\r
@@ -400,11 +400,11 @@ struct _term_data
 \r
        HFONT font_id;\r
 \r
-       uint font_wid;\r
-       uint font_hgt;\r
+       int font_wid;\r
+       int font_hgt;\r
 \r
-       uint tile_wid;\r
-       uint tile_hgt;\r
+       int tile_wid;\r
+       int tile_hgt;\r
 \r
        uint map_tile_wid;\r
        uint map_tile_hgt;\r
@@ -605,8 +605,8 @@ static bool Term_no_press = FALSE;
  */\r
 static bool mouse_down = FALSE;\r
 static bool paint_rect = FALSE;\r
-static int mousex = 0, mousey = 0;\r
-static int oldx, oldy;\r
+static TERM_POSITION mousex = 0, mousey = 0;\r
+static TERM_POSITION oldx, oldy;\r
 \r
 \r
 /*\r
@@ -1314,7 +1314,7 @@ static void load_prefs_aux(int i)
        /* Window size */\r
        if (i == 0)\r
        {\r
-               win_maximized = GetPrivateProfileInt(sec_name, "Maximized", win_maximized, ini_file);\r
+               win_maximized = (GetPrivateProfileInt(sec_name, "Maximized", win_maximized, ini_file) != 0);\r
        }\r
 \r
        /* Window position */\r
@@ -1326,7 +1326,7 @@ static void load_prefs_aux(int i)
        /* Window Z position */\r
        if (i > 0)\r
        {\r
-               td->posfix = GetPrivateProfileInt(sec_name, "PositionFix", td->posfix, ini_file);\r
+               td->posfix = (GetPrivateProfileInt(sec_name, "PositionFix", td->posfix, ini_file) != 0);\r
        }\r
 }\r
 \r
@@ -1339,10 +1339,10 @@ static void load_prefs(void)
        int i;\r
 \r
        /* Extract the "arg_graphics" flag */\r
-       arg_graphics = GetPrivateProfileInt("Angband", "Graphics", GRAPHICS_NONE, ini_file);\r
+       arg_graphics = (byte_hack)GetPrivateProfileInt("Angband", "Graphics", GRAPHICS_NONE, ini_file);\r
 \r
        /* Extract the "arg_bigtile" flag */\r
-       arg_bigtile = GetPrivateProfileInt("Angband", "Bigtile", FALSE, ini_file);\r
+       arg_bigtile = (GetPrivateProfileInt("Angband", "Bigtile", FALSE, ini_file) != 0);\r
        use_bigtile = arg_bigtile;\r
 \r
        /* Extract the "arg_sound" flag */\r
@@ -1381,11 +1381,9 @@ static void load_prefs(void)
  */\r
 static s16b tokenize_whitespace(char *buf, s16b num, char **tokens)\r
 {\r
-       int k = 0;\r
-\r
+       s16b k = 0;\r
        char *s = buf;\r
 \r
-\r
        /* Process */\r
        while (k < num)\r
        {\r
@@ -1691,7 +1689,7 @@ static bool init_graphics(void)
        /* if (can_use_graphics != arg_graphics) */\r
        {\r
                char buf[1024];\r
-               int wid, hgt, twid, thgt, ox, oy;\r
+               BYTE wid, hgt, twid, thgt, ox, oy;\r
                cptr name;\r
 \r
                if (arg_graphics == GRAPHICS_ADAM_BOLT)\r
@@ -2314,7 +2312,7 @@ static errr Term_xtra_win_react(void)
                term_data *td = &data[i];\r
 \r
                /* Update resized windows */\r
-               if ((td->cols != (uint)td->t.wid) || (td->rows != (uint)td->t.hgt))\r
+               if ((td->cols != td->t.wid) || (td->rows != td->t.hgt))\r
                {\r
                        /* Activate */\r
                        Term_activate(&td->t);\r
@@ -3199,11 +3197,13 @@ static errr Term_pict_win(int x, int y, int n, const byte *ap, const char *cp, c
 static void windows_map(void)\r
 {\r
        term_data *td = &data[0];\r
-       byte a, c;\r
+       byte a;\r
+       char c;\r
        int x, min_x, max_x;\r
        int y, min_y, max_y;\r
 \r
-       byte ta, tc;\r
+       byte ta;\r
+       char tc;\r
 \r
        /* Only in graphics mode */\r
        if (!use_graphics) return;\r
@@ -4292,7 +4292,7 @@ static void process_menus(WORD wCmd)
 \r
                case IDM_OPTIONS_BIGTILE:\r
                {\r
-                       term_data *td = &data[0];\r
+                       td = &data[0];\r
 \r
                        /* Paranoia */\r
                        if (!inkey_flag)\r
@@ -4738,11 +4738,11 @@ LRESULT FAR PASCAL AngbandWndProc(HWND hWnd, UINT uMsg,
                {\r
                        HGLOBAL hGlobal;\r
                        LPSTR lpStr;\r
-                       int i, j, sz;\r
-                       int dx = abs(oldx - mousex) + 1;\r
-                       int dy = abs(oldy - mousey) + 1;\r
-                       int ox = (oldx > mousex) ? mousex : oldx;\r
-                       int oy = (oldy > mousey) ? mousey : oldy;\r
+                       int j, sz;\r
+                       TERM_POSITION dx = abs(oldx - mousex) + 1;\r
+                       TERM_POSITION dy = abs(oldy - mousey) + 1;\r
+                       TERM_POSITION ox = (oldx > mousex) ? mousex : oldx;\r
+                       TERM_POSITION oy = (oldy > mousey) ? mousey : oldy;\r
 \r
                        mouse_down = FALSE;\r
                        paint_rect = FALSE;\r
@@ -4947,8 +4947,8 @@ LRESULT FAR PASCAL AngbandWndProc(HWND hWnd, UINT uMsg,
 \r
                                case SIZE_RESTORED:\r
                                {\r
-                                       uint cols = (LOWORD(lParam) - td->size_ow1) / td->tile_wid;\r
-                                       uint rows = (HIWORD(lParam) - td->size_oh1) / td->tile_hgt;\r
+                                       TERM_POSITION cols = (LOWORD(lParam) - td->size_ow1) / td->tile_wid;\r
+                                       TERM_POSITION rows = (HIWORD(lParam) - td->size_oh1) / td->tile_hgt;\r
 \r
                                        /* New size */\r
                                        if ((td->cols != cols) || (td->rows != rows))\r
@@ -5125,8 +5125,8 @@ LRESULT FAR PASCAL AngbandListProc(HWND hWnd, UINT uMsg,
 \r
                case WM_SIZE:\r
                {\r
-                       uint cols;\r
-                       uint rows;\r
+                       TERM_POSITION cols;\r
+                       TERM_POSITION rows;\r
                        \r
                        /* this message was sent before WM_NCCREATE */\r
                        if (!td) return 1;\r