X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fmain-win.c;h=ceccba9ab49c56aa98c0b9811be143dcbefa901d;hb=de5820e132fd0e5d8b5775bf54db6747d4987928;hp=1e6e2187d3c779c1d0fde3dcc7c0658633367491;hpb=4437a5b4efe973981d03d9af8ca23d4093fd221d;p=hengband%2Fhengband.git diff --git a/src/main-win.c b/src/main-win.c index 1e6e2187d..ceccba9ab 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -99,8 +99,8 @@ #include "core/stuff-handler.h" #include "core/visuals-reseter.h" #include "dungeon/quest.h" +#include "floor/floor-base-definitions.h" #include "floor/floor-events.h" -#include "floor/floor.h" #include "game-option/runtime-arguments.h" #include "game-option/special-options.h" #include "io/chuukei.h" @@ -113,8 +113,10 @@ #include "main/music-definitions-table.h" #include "main/sound-definitions-table.h" #include "main/sound-of-music.h" +#include "monster-floor/monster-lite.h" #include "system/angband-version.h" #include "system/angband.h" +#include "system/floor-type-definition.h" #include "system/system-variables.h" #include "term/gameterm.h" #include "term/screen-processor.h" @@ -128,8 +130,7 @@ #ifdef WINDOWS #include "dungeon/dungeon.h" -#include "savedata/save.h" -#include "term/z-term.h" +#include "save/save.h" #include #include #include @@ -322,7 +323,7 @@ *

*/ typedef struct { - term t; + term_type t; concptr s; HWND w; DWORD dwStyle; @@ -1386,7 +1387,7 @@ static errr term_xtra_win_react(player_type *player_ptr) } for (int i = 0; i < MAX_TERM_DATA; i++) { - term *old = Term; + term_type *old = Term; term_data *td = &data[i]; if ((td->cols != td->t.wid) || (td->rows != td->t.hgt)) { term_activate(&td->t); @@ -1965,7 +1966,7 @@ static void windows_map(player_type *player_ptr) */ static void term_data_link(term_data *td) { - term *t = &td->t; + term_type *t = &td->t; term_init(t, td->cols, td->rows, td->keys); t->soft_cursor = TRUE; t->higher_pict = TRUE; @@ -2723,6 +2724,28 @@ static void process_menus(player_type *player_ptr, WORD wCmd) } } +/* + * Add a keypress to the "queue" + */ +static errr term_keypress(int k) +{ + /* Refuse to enqueue non-keys */ + if (!k) + return -1; + + /* Store the char, advance the queue */ + Term->key_queue[Term->key_head++] = (char)k; + + /* Circular queue, handle wrap */ + if (Term->key_head == Term->key_size) + Term->key_head = 0; + + if (Term->key_head != Term->key_tail) + return 0; + + return 1; +} + static bool process_keydown(WPARAM wParam, LPARAM lParam) { bool mc = FALSE; @@ -3162,7 +3185,7 @@ LRESULT PASCAL AngbandListProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara TERM_LEN cols = (LOWORD(lParam) - td->size_ow1) / td->tile_wid; TERM_LEN rows = (HIWORD(lParam) - td->size_oh1) / td->tile_hgt; if ((td->cols != cols) || (td->rows != rows)) { - term *old_term = Term; + term_type *old_term = Term; td->cols = cols; td->rows = rows; term_activate(&td->t);