#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"
#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"
#ifdef WINDOWS
#include "dungeon/dungeon.h"
-#include "savedata/save.h"
-#include "term/z-term.h"
+#include "save/save.h"
#include <direct.h>
#include <locale.h>
#include <windows.h>
* </p>
*/
typedef struct {
- term t;
+ term_type t;
concptr s;
HWND w;
DWORD dwStyle;
}
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);
*/
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;
}
}
+/*
+ * 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;
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);