OSDN Git Service

center_player がオフのときに、画面表示位置の初期設定がおかしかったので修正。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 12 Mar 2002 15:20:09 +0000 (15:20 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 12 Mar 2002 15:20:09 +0000 (15:20 +0000)
src/cave.c
src/dungeon.c
src/externs.h
src/generate.c
src/init1.c
src/variable.c
src/wild.c
src/xtra2.c

index 343340e..1be351b 100644 (file)
@@ -2301,16 +2301,21 @@ void prt_path(int y, int x)
                if (panel_contains(ny, nx))
                {
                        byte a = default_color;
-                       char c;
+                       char c, c2;
 
 #ifdef USE_TRANSPARENCY
                        byte ta;
                        char tc;
+#endif
 
                        if (cave[ny][nx].m_idx && m_list[cave[ny][nx].m_idx].ml)
                        {
                                /* Determine what is there */
+#ifdef USE_TRANSPARENCY
                                map_info(ny, nx, &a, &c, &ta, &tc);
+#else
+                               map_info(ny, nx, &a, &c);
+#endif
                        
                                if (c == '.' && (a == TERM_WHITE || a == TERM_L_WHITE))
                                        a = default_color;
@@ -2326,33 +2331,25 @@ void prt_path(int y, int x)
                                else if (p_ptr->wraith_form) a = TERM_L_DARK;
                        }
 
-
-                       /* Hack -- Queue it */
-                       Term_queue_char(panel_col_of(nx), ny-panel_row_prt, a, '*', ta, tc);
-#else /* USE_TRANSPARENCY */
-
-                       if (cave[ny][nx].m_idx && m_list[cave[ny][nx].m_idx].ml)
-                       {
-                               /* Determine what is there */
-                               map_info(ny, nx, &a, &c);
-                               
-                               if (c == '.' && (a == TERM_WHITE || a == TERM_L_WHITE))
-                                       a = default_color;
-                               else if (a == default_color)
-                                       a = TERM_WHITE;
-                       }
-
-                       if (fake_monochrome)
+                       c = '*';
+                       if (use_bigtile)
                        {
-                               if (world_monster) a = TERM_DARK;
-                               else if (p_ptr->invuln || world_player) a = TERM_WHITE;
-                               else if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] == MUSIC_INVULN)) a = TERM_WHITE;
-                               else if (p_ptr->wraith_form) a = TERM_L_DARK;
+#ifdef JP
+                               c2 = ascii_to_zenkaku[2*(c-' ') + 1];
+                               c = ascii_to_zenkaku[2*(c-' ')];
+#else
+                               c2 = '*';
+#endif
                        }
 
                        /* Hack -- Queue it */
-                       Term_queue_char(panel_col_of(nx), ny-panel_row_prt, a, '*');
-#endif /* USE_TRANSPARENCY */
+#ifdef USE_TRANSPARENCY
+                       Term_queue_char(panel_col_of(nx), ny-panel_row_prt, a, c, ta, tc);
+                       if (use_bigtile) Term_queue_char(panel_col_of(nx), ny-panel_row_prt, a, c2, ta, tc);
+#else
+                       Term_queue_char(panel_col_of(nx), ny-panel_row_prt, a, c);
+                       if (use_bigtile) Term_queue_char(panel_col_of(nx), ny-panel_row_prt, a, c2);
+#endif
                }
 
                /* Known Wall */
index cd9ce11..14a256e 100644 (file)
@@ -5551,21 +5551,12 @@ static void dungeon(bool load_game)
                create_down_stair = create_up_stair = 0;
        }
 
+       /* Validate the panel */
+       panel_bounds_center();
 
        /* Verify the panel */
        verify_panel();
 
-       /* Validate the panel */
-       if (center_player)
-       {
-               panel_bounds_center();
-       }
-       else
-       {
-       panel_bounds();
-       }
-
-
        /* Flush messages */
        msg_print(NULL);
 
index d244227..34edfc3 100644 (file)
@@ -319,7 +319,6 @@ extern byte feeling;
 extern s16b rating;
 extern bool good_item_flag;
 extern bool closing_flag;
-extern s16b panel_row, panel_col;
 extern s16b panel_row_min, panel_row_max;
 extern s16b panel_col_min, panel_col_max;
 extern s16b panel_col_prt, panel_row_prt;
@@ -1261,7 +1260,6 @@ extern void check_quest_completion(monster_type *m_ptr);
 extern void monster_death(int m_idx, bool drop_item);
 extern bool mon_take_hit(int m_idx, int dam, bool *fear, cptr note);
 extern void get_screen_size(int *wid_p, int *hgt_p);
-extern void panel_bounds(void);
 extern void panel_bounds_center(void);
 extern void resize_map(void);
 extern void redraw_window(void);
index 5a7aecb..0e29adb 100644 (file)
@@ -1392,8 +1392,8 @@ msg_print("
                cur_wid = level_width * SCREEN_WID;
 
                /* Assume illegal panel */
-               panel_row = 255;
-               panel_col = 255;
+               panel_row_min = 255;
+               panel_col_min = 255;
 
                if (cheat_room)
                  msg_format("X:%d, Y:%d.", cur_hgt, cur_wid);
@@ -1405,8 +1405,8 @@ msg_print("
                cur_wid = MAX_WID;
 
                /* Assume illegal panel */
-               panel_row = 255;
-               panel_col = 255;
+               panel_row_min = 255;
+               panel_col_min = 255;
        }
 
        /* Make a dungeon */
index 2e8bbc8..94da158 100644 (file)
@@ -3558,8 +3558,8 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
                                cur_wid = panels_x * SCREEN_WID;
 
                                /* Assume illegal panel */
-                               panel_row = 255;
-                               panel_col = 255;
+                               panel_row_min = 255;
+                               panel_col_min = 255;
 
                                /* Place player in a quest level */
                                if (p_ptr->inside_quest)
index 4bacf04..052806c 100644 (file)
@@ -345,8 +345,7 @@ bool closing_flag;          /* Dungeon is closing */
  * Dungeon size info
  */
 
-s16b panel_row, panel_col;
-s16b panel_row_min, panel_row_max;
+s16b panel_row_min = 255, panel_row_max = 255;
 s16b panel_col_min, panel_col_max;
 s16b panel_col_prt, panel_row_prt;
 
index af019a1..30094c1 100644 (file)
@@ -647,8 +647,8 @@ void wilderness_gen(void)
        cur_wid = MAX_WID;
 
        /* Assume illegal panel */
-       panel_row = 255;
-       panel_col = 255;
+       panel_row_min = 255;
+       panel_col_min = 255;
 
        /* Init the wilderness */
 
@@ -911,8 +911,8 @@ void wilderness_gen_small()
        if (cur_wid > MAX_WID) cur_wid = MAX_WID;
 
        /* Assume illegal panel */
-       panel_row = 255;
-       panel_col = 255;
+       panel_row_min = 255;
+       panel_col_min = 255;
 
         /* Place the player */
         px = p_ptr->wilderness_x;
index 243b6f0..ce612a3 100644 (file)
@@ -2140,30 +2140,10 @@ void get_screen_size(int *wid_p, int *hgt_p)
        if (use_bigtile) *wid_p /= 2;
 }
 
-/*
- * Calculates current boundaries
- * Called below and from "do_cmd_locate()".
- */
-void panel_bounds(void)
-{
-       int wid, hgt;
-
-       /* Get size */
-       get_screen_size(&wid, &hgt);
-
-       panel_row_min = panel_row * hgt / 2;
-       panel_row_max = panel_row_min + hgt - 1;
-       panel_row_prt = panel_row_min - 1;
-       panel_col_min = panel_col * wid / 2;
-       panel_col_max = panel_col_min + wid - 1;
-       panel_col_prt = panel_col_min - 13;
-}
-
 
 /*
  * Calculates current boundaries
  * Called below and from "do_cmd_locate()".
- * Modified for "centering player on screen"
  */
 void panel_bounds_center(void)
 {
@@ -2172,10 +2152,8 @@ void panel_bounds_center(void)
        /* Get size */
        get_screen_size(&wid, &hgt);
 
-       panel_row = panel_row_min / (hgt / 2);
        panel_row_max = panel_row_min + hgt - 1;
        panel_row_prt = panel_row_min - 1;
-       panel_col = panel_col_min / (wid / 2);
        panel_col_max = panel_col_min + wid - 1;
        panel_col_prt = panel_col_min - 13;
 }