Skip to content

Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.

Deltarune: the start, read from the original's data.win

Mason36384a8aebc82f2
diff --git a/games/deltarune/.gitignore b/games/deltarune/.gitignore
new file mode 100644
index 00000000..342d9dda
--- /dev/null
+++ b/games/deltarune/.gitignore
@@ -0,0 +1,2 @@
+output/
+build/
diff --git a/games/deltarune/Makefile b/games/deltarune/Makefile
new file mode 100644
index 00000000..bc94ed34
--- /dev/null
+++ b/games/deltarune/Makefile
@@ -0,0 +1,81 @@
+# Deltarune Chapter 1 on the NumWorks calculator.
+# make output/deltarune.nwa
+# make check link it like the calculator does (output/deltarune.bin)
+# make host build/play: the game on a computer, for tests and screenshots
+# make test the game played on a computer (tests/check.py, with the sanitizers)
+# make data src/data.bin, data.h, tables.c and gmtexts.c from the original's data.win and texts
+# (REF=the folder tools/fetch.py fills; Python + Pillow + NumPy)
+Q ?= @
+# the ARM toolchain on the PATH, or in TOOLCHAIN=<its bin folder>
+TOOLCHAIN ?=
+BIN = $(if $(TOOLCHAIN),$(TOOLCHAIN)/)
+CC = $(BIN)arm-none-eabi-gcc
+NWLINK ?= npx --yes -- [email protected]
+STRIP ?= $(BIN)arm-none-eabi-strip --strip-unneeded
+SIZE = $(BIN)arm-none-eabi-size
+BUILD_DIR = output
+REF ?=
+
+# the drawing runs every frame at -O2; the rest is small at -Os
+HOT = src/gfx.c
+COLD = $(filter-out $(HOT) src/plat_host.c src/plat_eadk.c,$(wildcard src/*.c)) src/lzma/LzmaDec.c
+COLD_OBJ = $(patsubst src/%.c,$(BUILD_DIR)/cold/%.o,$(COLD))
+HEADERS = $(wildcard src/*.h) ../common/epsilon_app.h ../common/epsilon_files.h
+
+CFLAGS = -std=gnu11 $(shell $(NWLINK) eadk-cflags-device) -DEPSILON_XL=1 -DDATA_BIN='"src/data.bin"'
+CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter -fno-math-errno -fsingle-precision-constant
+CFLAGS += -fno-tree-loop-distribute-patterns -flto -fno-fat-lto-objects -fwhole-program -fvisibility=internal
+CFLAGS += -ffunction-sections -fdata-sections $(EXTRA)
+LDFLAGS = -Wl,--relocatable -nostartfiles --specs=nano.specs
+LDFLAGS += -Wl,-e,main -Wl,-u,eadk_app_name -Wl,-u,eadk_app_icon -Wl,-u,eadk_api_level
+LDFLAGS += -Wl,--gc-sections -flinker-output=nolto-rel
+
+.PHONY: build check clean host test data
+build: $(BUILD_DIR)/deltarune.nwa
+
+# apps get 133652 bytes of RAM on custom builds of Epsilon 25.2 (148928 or more on official ones)
+check: $(BUILD_DIR)/deltarune.nwa
+ $(Q) $(NWLINK) nwa-bin --ram-length 133652 $< $(BUILD_DIR)/deltarune.bin
+ @echo "BIN $(BUILD_DIR)/deltarune.bin: $$(wc -c < $(BUILD_DIR)/deltarune.bin) bytes"
+
+$(BUILD_DIR)/data.o: src/data.S src/data.bin | $(BUILD_DIR)
+ $(Q) $(CC) -c -DDATA_BIN='"src/data.bin"' $< -o $@
+
+$(BUILD_DIR)/cold/%.o: src/%.c $(HEADERS)
+ @mkdir -p $(@D)
+ $(Q) $(CC) $(CFLAGS) -Os -c $< -o $@
+
+$(BUILD_DIR)/deltarune.nwa: $(HOT) src/plat_eadk.c $(COLD_OBJ) $(HEADERS) $(BUILD_DIR)/icon.o $(BUILD_DIR)/data.o
+ @echo "LD $@"
+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(HOT) src/plat_eadk.c $(COLD_OBJ) $(BUILD_DIR)/data.o $(BUILD_DIR)/icon.o -lm -o $@
+ $(Q) $(STRIP) $@
+ $(Q) $(SIZE) $@
+
+$(BUILD_DIR)/icon.o: src/icon.png | $(BUILD_DIR)
+ @echo "ICON $<"
+ $(Q) $(NWLINK) png-icon-o $< $@
+
+$(BUILD_DIR):
+ $(Q) mkdir -p $@
+
+# on a computer: tests/play.c plays it with scripted keys and saves screenshots
+HOST_FLAGS = -std=gnu11 -O1 -g -Wall -Wextra -Wno-unused-parameter -Isrc -DHOST -DDATA_BIN='"src/data.bin"'
+HOST_SAN = -fsanitize=address,undefined -fno-sanitize-recover=undefined
+HOST_SRC = $(filter-out src/plat_eadk.c src/main.c,$(wildcard src/*.c)) src/lzma/LzmaDec.c
+host: build/play
+build/play: $(HOST_SRC) tests/play.c src/data.S src/data.bin $(HEADERS)
+ $(Q) mkdir -p $(dir $@)
+ $(Q) cc $(HOST_FLAGS) $(HOST_SAN) $(HOST_SRC) tests/play.c src/data.S -lm -o $@
+ @echo "HOST $@"
+
+test: build/play
+ python3 tests/check.py build/play
+
+data:
+ @test -n "$(REF)" || { echo "make data REF=<the folder with data.win and lang_en.json>"; exit 1; }
+ python3 -I tools/tables.py $(REF)
+ python3 -I tools/texts.py $(REF)
+ python3 -I tools/pack.py $(REF)
+
+clean:
+ $(Q) rm -rf $(BUILD_DIR) build
diff --git a/games/deltarune/src/battle.c b/games/deltarune/src/battle.c
new file mode 100644
index 00000000..cceef09d
--- /dev/null
+++ b/games/deltarune/src/battle.c
@@ -0,0 +1,16 @@
+/* Battles (battle.h). */
+#include "battle.h"
+#include "game.h"
+#include "gfx.h"
+
+static bool over = true;
+static int result;
+void battle_start(int encounter) {
+ (void)encounter;
+ over = true, result = BR_WON;
+}
+bool battle_over(void) { return over; }
+int battle_result(void) { return result; }
+void battle_update(uint32_t pressed, uint32_t held) { (void)pressed, (void)held; }
+void battle_draw(void) { gfx_rect(0, 0, SCREEN_W, SCREEN_H, C_BLACK, 255); }
+int battle_ui(void) { return BUI_NONE; }
diff --git a/games/deltarune/src/battle.h b/games/deltarune/src/battle.h
new file mode 100644
index 00000000..09147636
--- /dev/null
+++ b/games/deltarune/src/battle.h
@@ -0,0 +1,22 @@
+/* Deltarune: battles (the original's obj_battlecontroller and its enemies).
+ *
+ * The original's battle is 640 x 480, halved here as the Dark World is: positions stay the original's
+ * units (1/16 of them for what moves), drawn at half. A battle is an encounter (scr_encountersetup's
+ * number: who is fought and where); the party (up to three) each picks FIGHT, ACT (Kris) or MAGIC, ITEM,
+ * SPARE or DEFEND; then the enemies talk and attack the SOUL in the box, grazing their bullets builds TP. */
+#ifndef DR_BATTLE_H
+#define DR_BATTLE_H
+#include <stdbool.h>
+#include <stdint.h>
+
+enum { BR_WON, BR_SPARED, BR_FLED, BR_LOST, BR_SCRIPTED };
+
+void battle_start(int encounter);
+bool battle_over(void);
+int battle_result(void);
+void battle_update(uint32_t pressed, uint32_t held);
+void battle_draw(void);
+/* (for the tests) what the battle waits for */
+enum { BUI_NONE, BUI_BUTTONS, BUI_TARGET, BUI_ACTS, BUI_ITEMS, BUI_SPELLS, BUI_PARTY, BUI_BARS, BUI_DODGE, BUI_TEXT };
+int battle_ui(void);
+#endif
diff --git a/games/deltarune/src/blk.c b/games/deltarune/src/blk.c
new file mode 100644
index 00000000..23b74619
--- /dev/null
+++ b/games/deltarune/src/blk.c
@@ -0,0 +1,107 @@
+/* data.bin's LZMA blocks and the RAM they're unpacked into (blk.h). */
+#include <string.h>
+#include "blk.h"
+#include "lzma/LzmaDec.h"
+#include "res.h"
+
+#define ARENA (60 * 1024) /* the cache: a screen of tiles is 20 KB, rarely 55; a battle's monsters 40 */
+#define MAX_IN 128 /* blocks in it at once */
+#define MAX_BLOCKS 4096 /* (tools/pack.py's) */
+#define NONE 0xFF
+
+static uint8_t arena[ARENA] __attribute__((aligned(4)));
+typedef struct {
+ uint16_t id, used; /* the block, the frame it was last used in */
+ uint32_t off, size; /* where it is in the arena */
+} In;
+static In in[MAX_IN]; /* by where they are */
+static int nin;
+static uint8_t where[MAX_BLOCKS]; /* each block's place in `in`, or NONE */
+static uint16_t frame_no = 1;
+static bool ready;
+uint32_t blk_unpacked, blk_most_in_frame;
+static uint32_t unpacked_now;
+
+/* the decoder's tables, in one piece (LzmaDecode asks once a block) */
+static uint16_t probs[2800];
+static void *probs_alloc(ISzAllocPtr p, size_t size) {
+ (void)p;
+ return size <= sizeof probs ? probs : NULL;
+}
+static void probs_free(ISzAllocPtr p, void *a) { (void)p, (void)a; }
+static const ISzAlloc alloc = {probs_alloc, probs_free};
+
+static void init(void) {
+ memset(where, NONE, sizeof where);
+ nin = 0, ready = true;
+}
+
+static void drop(int k) {
+ where[in[k].id] = NONE;
+ memmove(&in[k], &in[k + 1], (size_t)(nin - k - 1) * sizeof in[0]);
+ nin--;
+ for (int i = k; i < nin; i++) where[in[i].id] = (uint8_t)i;
+}
+
+/* room for n bytes: its place in `in` (the new entry, made), or -1 */
+static int make_room(uint32_t n) {
+ for (;;) {
+ if (nin < MAX_IN) {
+ uint32_t at = 0;
+ for (int i = 0; i <= nin; i++) {
+ uint32_t end = i < nin ? in[i].off : ARENA;
+ if (end - at >= n) {
+ memmove(&in[i + 1], &in[i], (size_t)(nin - i) * sizeof in[0]);
+ nin++;
+ for (int j = i + 1; j < nin; j++) where[in[j].id] = (uint8_t)j;
+ in[i].off = at, in[i].size = n;
+ return i;
+ }
+ if (i < nin) at = in[i].off + in[i].size;
+ }
+ }
+ if (!nin) return -1;
+ /* throw out the least recently used (those of this frame last) */
+ int old = 0;
+ for (int i = 1; i < nin; i++)
+ if ((uint16_t)(frame_no - in[i].used) > (uint16_t)(frame_no - in[old].used)) old = i;
+ drop(old);
+ }
+}
+
+const uint8_t *blk_get(int id) {
+ if (!ready) init();
+ const uint8_t *s = section(SEC_BLOCKS);
+ if (id < 0 || id >= (int)rd32(s)) return NULL;
+ if (where[id] != NONE) {
+ In *b = &in[where[id]];
+ b->used = frame_no;
+ return arena + b->off;
+ }
+ const uint8_t *e = s + 12 + 8 * id;
+ uint32_t off = rd32(e), size = rd32(e + 4);
+ uint32_t next = id + 1 < (int)rd32(s) ? rd32(e + 8) : 0;
+ int k = make_room(size);
+ if (k < 0) return NULL;
+ In *b = &in[k];
+ b->id = (uint16_t)id, b->used = frame_no;
+ where[id] = (uint8_t)k;
+ SizeT out = size, src = next ? next - off : 1u << 30;
+ ELzmaStatus st;
+ LzmaDecode(arena + b->off, &out, s + off, &src, s + 4, LZMA_PROPS_SIZE, LZMA_FINISH_ANY, &st, &alloc);
+ blk_unpacked++, unpacked_now++;
+ return arena + b->off;
+}
+
+void blk_frame(void) {
+ if (!ready) init();
+ /* the blocks packed together, so the free room is in one piece */
+ uint32_t at = 0;
+ for (int i = 0; i < nin; i++) {
+ if (in[i].off != at) memmove(arena + at, arena + in[i].off, in[i].size), in[i].off = at;
+ at += in[i].size;
+ }
+ if (unpacked_now > blk_most_in_frame) blk_most_in_frame = unpacked_now;
+ unpacked_now = 0;
+ frame_no++;
+}
diff --git a/games/deltarune/src/blk.h b/games/deltarune/src/blk.h
new file mode 100644
index 00000000..0d427d94
--- /dev/null
+++ b/games/deltarune/src/blk.h
@@ -0,0 +1,16 @@
+/* Deltarune: data.bin's BLOCKS, unpacked when needed (tools/pack.py packs them with LZMA).
+ *
+ * The frames and tiles live in blocks; blk_get unpacks a block into a RAM cache
+ * and gives its bytes. A pointer it gives holds until the next blk_get (which can
+ * throw a block out to make room), so callers use it right away, and nothing keeps
+ * one from a frame to the next: blk_frame, at the frame's start, packs the cache's
+ * blocks together. The blocks the frame used are thrown out last. */
+#ifndef DR_BLK_H
+#define DR_BLK_H
+#include <stdint.h>
+
+const uint8_t *blk_get(int id);
+void blk_frame(void);
+/* (for the tests: blocks unpacked so far, the most in a frame) */
+extern uint32_t blk_unpacked, blk_most_in_frame;
+#endif
diff --git a/games/deltarune/src/data.S b/games/deltarune/src/data.S
new file mode 100644
index 00000000..8e612bb7
--- /dev/null
+++ b/games/deltarune/src/data.S
@@ -0,0 +1,19 @@
+/* data.bin (tools/pack.py) in the app's read-only data */
+#ifdef __APPLE__
+ .const_data
+ .p2align 2
+ .globl _dr_data
+_dr_data:
+ .incbin DATA_BIN
+ .p2align 2
+#else
+ .section .rodata.dr_data,"a"
+ .balign 4
+ .global dr_data
+dr_data:
+ .incbin DATA_BIN
+ .balign 4
+#endif
+#ifdef __ELF__
+ .section .note.GNU-stack,"",%progbits
+#endif
diff --git a/games/deltarune/src/data.bin b/games/deltarune/src/data.bin
new file mode 100644
index 00000000..b5e890a7
Binary files /dev/null and b/games/deltarune/src/data.bin differ
diff --git a/games/deltarune/src/data.h b/games/deltarune/src/data.h
new file mode 100644
index 00000000..abbef1fe
--- /dev/null
+++ b/games/deltarune/src/data.h
@@ -0,0 +1,3008 @@
+/* made by tools/pack.py: the numbers of what data.bin holds, by the original's names */
+#ifndef DR_DATA_H
+#define DR_DATA_H
+enum {
+ SEC_SPRITES = 0,
+ SEC_FRAMES = 1,
+ SEC_TILES = 2,
+ SEC_ROOMS = 3,
+ SEC_GRID = 4,
+ SEC_SOLIDS = 5,
+ SEC_INSTS = 6,
+ SEC_FONTS = 7,
+ SEC_STRINGS = 8,
+ SEC_BLOCKS = 9,
+ SEC_ORDER = 10,
+};
+enum {
+ spr_face_susie_alt = 0,
+ spr_face_s0 = 1,
+ spr_face_n0 = 2,
+ spr_face_t0 = 3,
+ spr_face_b0 = 4,
+ spr_face_sans0 = 5,
+ spr_face_c0 = 6,
+ spr_face_jock0 = 7,
+ spr_face_r_dark = 8,
+ spr_face_r_nohat = 9,
+ spr_face_r_hood = 10,
+ spr_face_l0 = 11,
+ spr_face_rudy = 12,
+ spr_face_asgore0 = 13,
+ spr_face_catty = 14,
+ spr_face_bratty = 15,
+ spr_face_burgerpants = 16,
+ spr_face_rurus = 17,
+ spr_face_undyne = 18,
+ spr_face_king = 19,
+ spr_face_tbody = 20,
+ spr_alphysface = 21,
+ spr_chairiel = 22,
+ spr_chairiel_empty = 23,
+ spr_bedsheet = 24,
+ spr_redwagon = 25,
+ spr_housewindow = 26,
+ spr_torcar_u = 27,
+ spr_toriel_d = 28,
+ spr_toriel_dt = 29,
+ spr_toriel_u = 30,
+ spr_toriel_windowopen = 31,
+ spr_toriel_ut = 32,
+ spr_toriel_rt = 33,
+ spr_toriel_lt = 34,
+ spr_alphysd = 35,
+ spr_alphysu = 36,
+ spr_alphysl = 37,
+ spr_alphysr = 38,
+ spr_noelle_dt = 39,
+ spr_noelle_rt = 40,
+ spr_noelle_lt = 41,
+ spr_noelle_ut = 42,
+ spr_noelle_ut_r = 43,
+ spr_noelle_ut_l = 44,
+ spr_berdly_ut = 45,
+ spr_berdly_library_u = 46,
+ spr_berdly_library_r = 47,
+ spr_berdly_ut_l = 48,
+ spr_berdly_ut_r = 49,
+ spr_catti_ut = 50,
+ spr_jockington_ut = 51,
+ spr_jockington_rt = 52,
+ spr_jockington_lt = 53,
+ spr_tem_sit = 54,
+ spr_tem_sit_l = 55,
+ spr_tem_sit_r = 56,
+ spr_snowy_ut = 57,
+ spr_snowy_dt = 58,
+ spr_snowy_ut_l = 59,
+ spr_snowy_ut_r = 60,
+ spr_mkid_ut = 61,
+ spr_mkid_dt = 62,
+ spr_mkid_ut_r = 63,
+ spr_mkid_ut_l = 64,
+ spr_susie_dark_relax = 65,
+ spr_susied = 66,
+ spr_susiel_dark = 67,
+ spr_susielt_dark = 68,
+ spr_susier_dark = 69,
+ spr_susiert_dark = 70,
+ spr_susied_dark = 71,
+ spr_susiedt_dark = 72,
+ spr_susieu_dark = 73,
+ spr_susieut_dark = 74,
+ spr_susied_dark_eyes = 75,
+ spr_susiel_dark_eyes = 76,
+ spr_susier_dark_eyes = 77,
+ spr_ralseid = 78,
+ spr_ralseiu = 79,
+ spr_ralseil = 80,
+ spr_ralseir = 81,
+ spr_lancer_dt = 82,
+ spr_lancer_ut = 83,
+ spr_lancer_rt = 84,
+ spr_lancer_lt = 85,
+ spr_lancer_dark_relax = 86,
+ spr_ironshackle = 87,
+ spr_smoldercake = 88,
+ spr_rudy_d = 89,
+ spr_npc_icewolf = 90,
+ spr_npc_qc = 91,
+ spr_npc_most_improved_1997 = 92,
+ spr_npc_greenfire = 93,
+ spr_npc_flanneldemon = 94,
+ spr_npc_dragonfamily = 95,
+ spr_npc_dresslion = 96,
+ spr_npc_cattiwaitress = 97,
+ spr_flowercontainer = 98,
+ spr_asgored = 99,
+ spr_asgorel = 100,
+ spr_asgorer = 101,
+ spr_asgoreu = 102,
+ spr_undyne_dt = 103,
+ spr_undyne_lt = 104,
+ spr_undyne_rt = 105,
+ spr_undyne_ut = 106,
+ spr_npc_asgoretruck = 107,
+ spr_npc_cattydad = 108,
+ spr_npc_bratty = 109,
+ spr_npc_catty = 110,
+ spr_sans_d = 111,
+ spr_sans_l = 112,
+ spr_sans_r = 113,
+ spr_sans_u = 114,
+ spr_npc_beachtable = 115,
+ spr_npc_bench = 116,
+ spr_npc_donutcar = 117,
+ spr_npc_snailcar = 118,
+ spr_npc_alvin = 119,
+ spr_npc_rgbun = 120,
+ spr_npc_rgdragon = 121,
+ spr_npc_businessguy = 122,
+ spr_npc_receptionist = 123,
+ spr_npc_politicsbear = 124,
+ spr_npc_nurse = 125,
+ spr_normalnpc = 126,
+ spr_rurus_idle = 127,
+ spr_npc_puzzlepiece = 128,
+ spr_npc_puzzlepiece_happy = 129,
+ spr_npc_puzzlepiece_shaved = 130,
+ spr_jackperson = 131,
+ spr_ballperson = 132,
+ spr_npc_gouldensam = 133,
+ spr_blockler_b = 134,
+ spr_blockler_o = 135,
+ spr_bakesale_rudinn = 136,
+ spr_bakesale_hathy = 137,
+ spr_bakesale_lancer = 138,
+ spr_darkmoney = 139,
+ spr_darkthrone = 140,
+ spr_npc_originalstarwalker = 141,
+ spr_npc_mrelegance = 142,
+ spr_npc_mrsociety = 143,
+ spr_npc_coody = 144,
+ spr_topchef = 145,
+ spr_npc_block_broken = 146,
+ spr_savepoint = 147,
+ spr_diamond_overworld = 148,
+ spr_diamond_trash = 149,
+ spr_heartenemy_overworld = 150,
+ spr_clubs_overworld = 151,
+ spr_jigsawry_idle = 152,
+ spr_dummynpc = 153,
+ spr_candytree = 154,
+ spr_textbox_topleft = 155,
+ spr_textbox_top = 156,
+ spr_textbox_left = 157,
+ spr_krisd_dark = 158,
+ spr_krisr_dark = 159,
+ spr_krisu_dark = 160,
+ spr_krisl_dark = 161,
+ spr_krisr = 162,
+ spr_krisl = 163,
+ spr_krisd = 164,
+ spr_krisu = 165,
+ IMAGE_LOGO = 166,
+ spr_heartsmall = 167,
+ NUM_SPRITES = 168
+};
+enum {
+ room_krisroom = 0,
+ room_krishallway = 1,
+ room_torroom = 2,
+ room_torhouse = 3,
+ room_torbathroom = 4,
+ room_town_krisyard = 5,
+ room_town_northwest = 6,
+ room_town_north = 7,
+ room_beach = 8,
+ room_town_mid = 9,
+ room_town_apartments = 10,
+ room_town_south = 11,
+ room_town_school = 12,
+ room_town_church = 13,
+ room_graveyard = 14,
+ room_town_shelter = 15,
+ room_hospital_lobby = 16,
+ room_hospital_hallway = 17,
+ room_hospital_rudy = 18,
+ room_hospital_room2 = 19,
+ room_diner = 20,
+ room_townhall = 21,
+ room_flowershop_1f = 22,
+ room_flowershop_2f = 23,
+ room_library = 24,
+ room_alphysalley = 25,
+ room_torielclass = 26,
+ room_schoollobby = 27,
+ room_alphysclass = 28,
+ room_schooldoor = 29,
+ room_insidecloset = 30,
+ room_school_unusedroom = 31,
+ room_dark1 = 32,
+ room_dark1a = 33,
+ room_dark2 = 34,
+ room_dark3 = 35,
+ room_dark3a = 36,
+ room_dark_wobbles = 37,
+ room_dark_eyepuzzle = 38,
+ room_dark7 = 39,
+ room_dark_chase1 = 40,
+ room_dark_chase2 = 41,
+ room_castle_outskirts = 42,
+ room_castle_town = 43,
+ room_castle_front = 44,
+ room_castle_tutorial = 45,
+ room_castle_darkdoor = 46,
+ room_field_start = 47,
+ room_field_forest = 48,
+ room_field1 = 49,
+ room_field2 = 50,
+ room_field2A = 51,
+ room_field_topchef = 52,
+ room_field_puzzle1 = 53,
+ room_field_maze = 54,
+ room_field_puzzle2 = 55,
+ room_field_getsusie = 56,
+ room_field_shop1 = 57,
+ room_field_puzzletutorial = 58,
+ room_field3 = 59,
+ room_field_boxpuzzle = 60,
+ room_field4 = 61,
+ room_field_secret1 = 62,
+ room_field_checkers4 = 63,
+ room_field_checkers2 = 64,
+ room_field_checkers6 = 65,
+ room_field_checkers3 = 66,
+ room_field_checkers1 = 67,
+ room_field_checkers5 = 68,
+ room_field_checkers7 = 69,
+ room_field_checkersboss = 70,
+ room_forest_savepoint1 = 71,
+ room_forest_area1 = 72,
+ room_forest_area2A = 73,
+ room_forest_puzzle1 = 74,
+ room_forest_area3A = 75,
+ room_forest_area3 = 76,
+ room_forest_savepoint2 = 77,
+ room_forest_area4 = 78,
+ room_forest_thrashmaker = 79,
+ room_forest_starwalker = 80,
+ room_forest_area5 = 81,
+ room_forest_savepoint_relax = 82,
+ room_forest_maze_deadend = 83,
+ room_forest_maze_deadend2 = 84,
+ room_forest_fightsusie = 85,
+ room_cc_prison_cells = 86,
+ room_cc_prisonlancer = 87,
+ room_cc_prison2 = 88,
+ room_cc_prisonelevator = 89,
+ room_cc_elevator = 90,
+ room_cc_prison_prejoker = 91,
+ room_cc_1f = 92,
+ room_cc_rudinn = 93,
+ room_cc_2f = 94,
+ room_cc_rurus1 = 95,
+ room_cc_hathy = 96,
+ room_cc_rurus2 = 97,
+ room_cc_clover = 98,
+ room_cc_lancer = 99,
+ room_cc_6f = 100,
+ room_cc_throneroom = 101,
+ room_cc_preroof = 102,
+ room_cc_kingbattle = 103,
+ room_man = 104,
+ NUM_ROOMS = 105
+};
+enum {
+ obj_battlecontroller = 0,
+ obj_bloxer_enemy = 1,
+ obj_caterpillarchara = 2,
+ obj_checkers_enemy = 3,
+ obj_choicer_neo = 4,
+ obj_classscene = 5,
+ obj_clubsenemy = 6,
+ obj_darkcastle_event = 7,
+ obj_darkcontroller = 8,
+ obj_dialoguer = 9,
+ obj_diamondenemy = 10,
+ obj_doorA = 11,
+ obj_doorA_musfade = 12,
+ obj_doorB = 13,
+ obj_doorB_musfade = 14,
+ obj_doorC = 15,
+ obj_doorC_musfade = 16,
+ obj_doorD = 17,
+ obj_doorD_musfade = 18,
+ obj_doorE = 19,
+ obj_doorF = 20,
+ obj_doorW = 21,
+ obj_doorX = 22,
+ obj_doorX_musfade = 23,
+ obj_doorw_musfade = 24,
+ obj_dummyenemy = 25,
+ obj_elevatorcontroller = 26,
+ obj_event_room = 27,
+ obj_face = 28,
+ obj_headhathy = 29,
+ obj_heartenemy = 30,
+ obj_jigsawryenemy = 31,
+ obj_joker = 32,
+ obj_king_boss = 33,
+ obj_krisroom = 34,
+ obj_lancerbakesale_event = 35,
+ obj_lancerboss = 36,
+ obj_lancerboss2 = 37,
+ obj_lancerboss3 = 38,
+ obj_mainchara = 39,
+ obj_marker = 40,
+ obj_markerA = 41,
+ obj_markerB = 42,
+ obj_markerC = 43,
+ obj_markerD = 44,
+ obj_markerE = 45,
+ obj_markerF = 46,
+ obj_markerX = 47,
+ obj_markerw = 48,
+ obj_npc_facing = 49,
+ obj_npc_hammerguy = 50,
+ obj_npc_puzzlemaster1 = 51,
+ obj_npc_room = 52,
+ obj_npc_sign = 53,
+ obj_placeholderenemy = 54,
+ obj_ponman_enemy = 55,
+ obj_prisonevent = 56,
+ obj_rabbick_enemy = 57,
+ obj_readable = 58,
+ obj_readable_room1 = 59,
+ obj_rudinnranger = 60,
+ obj_savemenu = 61,
+ obj_savepoint = 62,
+ obj_shortcut_door = 63,
+ obj_smallcheckers_enemy = 64,
+ obj_suitspuzz = 65,
+ obj_susieenemy = 66,
+ obj_tempblock_room = 67,
+ obj_town_event = 68,
+ obj_tutorialbattleevent = 69,
+ obj_writer = 70,
+ NUM_OBJS = 71
+};
+enum {
+ obj_krisroom_slash_Create_0_gml_21_0 = 0,
+ obj_krisroom_slash_Create_0_gml_22_0 = 1,
+ obj_krisroom_slash_Step_0_gml_92_0 = 2,
+ obj_npc_facing_slash_Other_10_gml_100_0 = 3,
+ obj_npc_facing_slash_Other_10_gml_104_0 = 4,
+ obj_npc_facing_slash_Other_10_gml_10_0 = 5,
+ obj_npc_facing_slash_Other_10_gml_114_0 = 6,
+ obj_npc_facing_slash_Other_10_gml_115_0 = 7,
+ obj_npc_facing_slash_Other_10_gml_116_0 = 8,
+ obj_npc_facing_slash_Other_10_gml_120_0 = 9,
+ obj_npc_facing_slash_Other_10_gml_126_0 = 10,
+ obj_npc_facing_slash_Other_10_gml_127_0 = 11,
+ obj_npc_facing_slash_Other_10_gml_128_0 = 12,
+ obj_npc_facing_slash_Other_10_gml_132_0 = 13,
+ obj_npc_facing_slash_Other_10_gml_145_0 = 14,
+ obj_npc_facing_slash_Other_10_gml_146_0 = 15,
+ obj_npc_facing_slash_Other_10_gml_150_0 = 16,
+ obj_npc_facing_slash_Other_10_gml_151_0 = 17,
+ obj_npc_facing_slash_Other_10_gml_159_0 = 18,
+ obj_npc_facing_slash_Other_10_gml_160_0 = 19,
+ obj_npc_facing_slash_Other_10_gml_161_0 = 20,
+ obj_npc_facing_slash_Other_10_gml_162_0 = 21,
+ obj_npc_facing_slash_Other_10_gml_166_0 = 22,
+ obj_npc_facing_slash_Other_10_gml_167_0 = 23,
+ obj_npc_facing_slash_Other_10_gml_174_0 = 24,
+ obj_npc_facing_slash_Other_10_gml_175_0 = 25,
+ obj_npc_facing_slash_Other_10_gml_185_0 = 26,
+ obj_npc_facing_slash_Other_10_gml_186_0 = 27,
+ obj_npc_facing_slash_Other_10_gml_187_0 = 28,
+ obj_npc_facing_slash_Other_10_gml_188_0 = 29,
+ obj_npc_facing_slash_Other_10_gml_192_0 = 30,
+ obj_npc_facing_slash_Other_10_gml_198_0 = 31,
+ obj_npc_facing_slash_Other_10_gml_210_0 = 32,
+ obj_npc_facing_slash_Other_10_gml_211_0 = 33,
+ obj_npc_facing_slash_Other_10_gml_213_0 = 34,
+ obj_npc_facing_slash_Other_10_gml_215_0 = 35,
+ obj_npc_facing_slash_Other_10_gml_216_0 = 36,
+ obj_npc_facing_slash_Other_10_gml_218_0 = 37,
+ obj_npc_facing_slash_Other_10_gml_220_0 = 38,
+ obj_npc_facing_slash_Other_10_gml_221_0 = 39,
+ obj_npc_facing_slash_Other_10_gml_223_0 = 40,
+ obj_npc_facing_slash_Other_10_gml_230_0 = 41,
+ obj_npc_facing_slash_Other_10_gml_231_0 = 42,
+ obj_npc_facing_slash_Other_10_gml_233_0 = 43,
+ obj_npc_facing_slash_Other_10_gml_239_0 = 44,
+ obj_npc_facing_slash_Other_10_gml_241_0 = 45,
+ obj_npc_facing_slash_Other_10_gml_243_0 = 46,
+ obj_npc_facing_slash_Other_10_gml_244_0 = 47,
+ obj_npc_facing_slash_Other_10_gml_246_0 = 48,
+ obj_npc_facing_slash_Other_10_gml_257_0 = 49,
+ obj_npc_facing_slash_Other_10_gml_269_0 = 50,
+ obj_npc_facing_slash_Other_10_gml_270_0 = 51,
+ obj_npc_facing_slash_Other_10_gml_272_0 = 52,
+ obj_npc_facing_slash_Other_10_gml_276_0 = 53,
+ obj_npc_facing_slash_Other_10_gml_278_0 = 54,
+ obj_npc_facing_slash_Other_10_gml_295_0 = 55,
+ obj_npc_facing_slash_Other_10_gml_296_0 = 56,
+ obj_npc_facing_slash_Other_10_gml_29_0 = 57,
+ obj_npc_facing_slash_Other_10_gml_307_0 = 58,
+ obj_npc_facing_slash_Other_10_gml_308_0 = 59,
+ obj_npc_facing_slash_Other_10_gml_30_0 = 60,
+ obj_npc_facing_slash_Other_10_gml_312_0 = 61,
+ obj_npc_facing_slash_Other_10_gml_31_0 = 62,
+ obj_npc_facing_slash_Other_10_gml_323_0 = 63,
+ obj_npc_facing_slash_Other_10_gml_324_0 = 64,
+ obj_npc_facing_slash_Other_10_gml_328_0 = 65,
+ obj_npc_facing_slash_Other_10_gml_329_0 = 66,
+ obj_npc_facing_slash_Other_10_gml_330_0 = 67,
+ obj_npc_facing_slash_Other_10_gml_331_0 = 68,
+ obj_npc_facing_slash_Other_10_gml_337_0 = 69,
+ obj_npc_facing_slash_Other_10_gml_338_0 = 70,
+ obj_npc_facing_slash_Other_10_gml_339_0 = 71,
+ obj_npc_facing_slash_Other_10_gml_340_0 = 72,
+ obj_npc_facing_slash_Other_10_gml_341_0 = 73,
+ obj_npc_facing_slash_Other_10_gml_348_0 = 74,
+ obj_npc_facing_slash_Other_10_gml_349_0 = 75,
+ obj_npc_facing_slash_Other_10_gml_350_0 = 76,
+ obj_npc_facing_slash_Other_10_gml_351_0 = 77,
+ obj_npc_facing_slash_Other_10_gml_352_0 = 78,
+ obj_npc_facing_slash_Other_10_gml_375_0 = 79,
+ obj_npc_facing_slash_Other_10_gml_376_0 = 80,
+ obj_npc_facing_slash_Other_10_gml_377_0 = 81,
+ obj_npc_facing_slash_Other_10_gml_379_0 = 82,
+ obj_npc_facing_slash_Other_10_gml_37_0 = 83,
+ obj_npc_facing_slash_Other_10_gml_381_0 = 84,
+ obj_npc_facing_slash_Other_10_gml_382_0 = 85,
+ obj_npc_facing_slash_Other_10_gml_384_0 = 86,
+ obj_npc_facing_slash_Other_10_gml_392_0 = 87,
+ obj_npc_facing_slash_Other_10_gml_394_0 = 88,
+ obj_npc_facing_slash_Other_10_gml_406_0 = 89,
+ obj_npc_facing_slash_Other_10_gml_408_0 = 90,
+ obj_npc_facing_slash_Other_10_gml_410_0 = 91,
+ obj_npc_facing_slash_Other_10_gml_412_0 = 92,
+ obj_npc_facing_slash_Other_10_gml_414_0 = 93,
+ obj_npc_facing_slash_Other_10_gml_419_0 = 94,
+ obj_npc_facing_slash_Other_10_gml_420_0 = 95,
+ obj_npc_facing_slash_Other_10_gml_421_0 = 96,
+ obj_npc_facing_slash_Other_10_gml_423_0 = 97,
+ obj_npc_facing_slash_Other_10_gml_425_0 = 98,
+ obj_npc_facing_slash_Other_10_gml_427_0 = 99,
+ obj_npc_facing_slash_Other_10_gml_428_0 = 100,
+ obj_npc_facing_slash_Other_10_gml_430_0 = 101,
+ obj_npc_facing_slash_Other_10_gml_432_0 = 102,
+ obj_npc_facing_slash_Other_10_gml_438_0 = 103,
+ obj_npc_facing_slash_Other_10_gml_440_0 = 104,
+ obj_npc_facing_slash_Other_10_gml_442_0 = 105,
+ obj_npc_facing_slash_Other_10_gml_444_0 = 106,
+ obj_npc_facing_slash_Other_10_gml_452_0 = 107,
+ obj_npc_facing_slash_Other_10_gml_453_0 = 108,
+ obj_npc_facing_slash_Other_10_gml_455_0 = 109,
+ obj_npc_facing_slash_Other_10_gml_457_0 = 110,
+ obj_npc_facing_slash_Other_10_gml_458_0 = 111,
+ obj_npc_facing_slash_Other_10_gml_470_0 = 112,
+ obj_npc_facing_slash_Other_10_gml_472_0 = 113,
+ obj_npc_facing_slash_Other_10_gml_474_0 = 114,
+ obj_npc_facing_slash_Other_10_gml_476_0 = 115,
+ obj_npc_facing_slash_Other_10_gml_478_0 = 116,
+ obj_npc_facing_slash_Other_10_gml_480_0 = 117,
+ obj_npc_facing_slash_Other_10_gml_489_0 = 118,
+ obj_npc_facing_slash_Other_10_gml_48_0 = 119,
+ obj_npc_facing_slash_Other_10_gml_490_0 = 120,
+ obj_npc_facing_slash_Other_10_gml_492_0 = 121,
+ obj_npc_facing_slash_Other_10_gml_49_0 = 122,
+ obj_npc_facing_slash_Other_10_gml_500_0 = 123,
+ obj_npc_facing_slash_Other_10_gml_501_0 = 124,
+ obj_npc_facing_slash_Other_10_gml_502_0 = 125,
+ obj_npc_facing_slash_Other_10_gml_50_0 = 126,
+ obj_npc_facing_slash_Other_10_gml_512_0 = 127,
+ obj_npc_facing_slash_Other_10_gml_514_0 = 128,
+ obj_npc_facing_slash_Other_10_gml_516_0 = 129,
+ obj_npc_facing_slash_Other_10_gml_518_0 = 130,
+ obj_npc_facing_slash_Other_10_gml_51_0 = 131,
+ obj_npc_facing_slash_Other_10_gml_520_0 = 132,
+ obj_npc_facing_slash_Other_10_gml_522_0 = 133,
+ obj_npc_facing_slash_Other_10_gml_524_0 = 134,
+ obj_npc_facing_slash_Other_10_gml_527_0 = 135,
+ obj_npc_facing_slash_Other_10_gml_529_0 = 136,
+ obj_npc_facing_slash_Other_10_gml_52_0 = 137,
+ obj_npc_facing_slash_Other_10_gml_530_0 = 138,
+ obj_npc_facing_slash_Other_10_gml_53_0 = 139,
+ obj_npc_facing_slash_Other_10_gml_541_0 = 140,
+ obj_npc_facing_slash_Other_10_gml_543_0 = 141,
+ obj_npc_facing_slash_Other_10_gml_545_0 = 142,
+ obj_npc_facing_slash_Other_10_gml_547_0 = 143,
+ obj_npc_facing_slash_Other_10_gml_550_0 = 144,
+ obj_npc_facing_slash_Other_10_gml_552_0 = 145,
+ obj_npc_facing_slash_Other_10_gml_557_0 = 146,
+ obj_npc_facing_slash_Other_10_gml_559_0 = 147,
+ obj_npc_facing_slash_Other_10_gml_568_0 = 148,
+ obj_npc_facing_slash_Other_10_gml_570_0 = 149,
+ obj_npc_facing_slash_Other_10_gml_572_0 = 150,
+ obj_npc_facing_slash_Other_10_gml_573_0 = 151,
+ obj_npc_facing_slash_Other_10_gml_575_0 = 152,
+ obj_npc_facing_slash_Other_10_gml_576_0 = 153,
+ obj_npc_facing_slash_Other_10_gml_579_0 = 154,
+ obj_npc_facing_slash_Other_10_gml_57_0 = 155,
+ obj_npc_facing_slash_Other_10_gml_584_0 = 156,
+ obj_npc_facing_slash_Other_10_gml_586_0 = 157,
+ obj_npc_facing_slash_Other_10_gml_58_0 = 158,
+ obj_npc_facing_slash_Other_10_gml_600_0 = 159,
+ obj_npc_facing_slash_Other_10_gml_601_0 = 160,
+ obj_npc_facing_slash_Other_10_gml_603_0 = 161,
+ obj_npc_facing_slash_Other_10_gml_605_0 = 162,
+ obj_npc_facing_slash_Other_10_gml_606_0 = 163,
+ obj_npc_facing_slash_Other_10_gml_608_0 = 164,
+ obj_npc_facing_slash_Other_10_gml_609_0 = 165,
+ obj_npc_facing_slash_Other_10_gml_611_0 = 166,
+ obj_npc_facing_slash_Other_10_gml_612_0 = 167,
+ obj_npc_facing_slash_Other_10_gml_613_0 = 168,
+ obj_npc_facing_slash_Other_10_gml_615_0 = 169,
+ obj_npc_facing_slash_Other_10_gml_616_0 = 170,
+ obj_npc_facing_slash_Other_10_gml_617_0 = 171,
+ obj_npc_facing_slash_Other_10_gml_619_0 = 172,
+ obj_npc_facing_slash_Other_10_gml_620_0 = 173,
+ obj_npc_facing_slash_Other_10_gml_621_0 = 174,
+ obj_npc_facing_slash_Other_10_gml_623_0 = 175,
+ obj_npc_facing_slash_Other_10_gml_624_0 = 176,
+ obj_npc_facing_slash_Other_10_gml_626_0 = 177,
+ obj_npc_facing_slash_Other_10_gml_627_0 = 178,
+ obj_npc_facing_slash_Other_10_gml_636_0 = 179,
+ obj_npc_facing_slash_Other_10_gml_638_0 = 180,
+ obj_npc_facing_slash_Other_10_gml_640_0 = 181,
+ obj_npc_facing_slash_Other_10_gml_656_0 = 182,
+ obj_npc_facing_slash_Other_10_gml_658_0 = 183,
+ obj_npc_facing_slash_Other_10_gml_65_0 = 184,
+ obj_npc_facing_slash_Other_10_gml_665_0 = 185,
+ obj_npc_facing_slash_Other_10_gml_667_0 = 186,
+ obj_npc_facing_slash_Other_10_gml_668_0 = 187,
+ obj_npc_facing_slash_Other_10_gml_66_0 = 188,
+ obj_npc_facing_slash_Other_10_gml_674_0 = 189,
+ obj_npc_facing_slash_Other_10_gml_676_0 = 190,
+ obj_npc_facing_slash_Other_10_gml_677_0 = 191,
+ obj_npc_facing_slash_Other_10_gml_679_0 = 192,
+ obj_npc_facing_slash_Other_10_gml_67_0 = 193,
+ obj_npc_facing_slash_Other_10_gml_680_0 = 194,
+ obj_npc_facing_slash_Other_10_gml_681_0 = 195,
+ obj_npc_facing_slash_Other_10_gml_683_0 = 196,
+ obj_npc_facing_slash_Other_10_gml_700_0 = 197,
+ obj_npc_facing_slash_Other_10_gml_702_0 = 198,
+ obj_npc_facing_slash_Other_10_gml_703_0 = 199,
+ obj_npc_facing_slash_Other_10_gml_704_0 = 200,
+ obj_npc_facing_slash_Other_10_gml_705_0 = 201,
+ obj_npc_facing_slash_Other_10_gml_706_0 = 202,
+ obj_npc_facing_slash_Other_10_gml_707_0 = 203,
+ obj_npc_facing_slash_Other_10_gml_711_0 = 204,
+ obj_npc_facing_slash_Other_10_gml_712_0 = 205,
+ obj_npc_facing_slash_Other_10_gml_713_0 = 206,
+ obj_npc_facing_slash_Other_10_gml_714_0 = 207,
+ obj_npc_facing_slash_Other_10_gml_719_0 = 208,
+ obj_npc_facing_slash_Other_10_gml_71_0 = 209,
+ obj_npc_facing_slash_Other_10_gml_720_0 = 210,
+ obj_npc_facing_slash_Other_10_gml_721_0 = 211,
+ obj_npc_facing_slash_Other_10_gml_722_0 = 212,
+ obj_npc_facing_slash_Other_10_gml_723_0 = 213,
+ obj_npc_facing_slash_Other_10_gml_724_0 = 214,
+ obj_npc_facing_slash_Other_10_gml_739_0 = 215,
+ obj_npc_facing_slash_Other_10_gml_740_0 = 216,
+ obj_npc_facing_slash_Other_10_gml_741_0 = 217,
+ obj_npc_facing_slash_Other_10_gml_743_0 = 218,
+ obj_npc_facing_slash_Other_10_gml_747_0 = 219,
+ obj_npc_facing_slash_Other_10_gml_753_0 = 220,
+ obj_npc_facing_slash_Other_10_gml_754_0 = 221,
+ obj_npc_facing_slash_Other_10_gml_767_0 = 222,
+ obj_npc_facing_slash_Other_10_gml_768_0 = 223,
+ obj_npc_facing_slash_Other_10_gml_769_0 = 224,
+ obj_npc_facing_slash_Other_10_gml_770_0 = 225,
+ obj_npc_facing_slash_Other_10_gml_771_0 = 226,
+ obj_npc_facing_slash_Other_10_gml_775_0 = 227,
+ obj_npc_facing_slash_Other_10_gml_776_0 = 228,
+ obj_npc_facing_slash_Other_10_gml_785_0 = 229,
+ obj_npc_facing_slash_Other_10_gml_786_0 = 230,
+ obj_npc_facing_slash_Other_10_gml_81_0 = 231,
+ obj_npc_facing_slash_Other_10_gml_82_0 = 232,
+ obj_npc_facing_slash_Other_10_gml_83_0 = 233,
+ obj_npc_facing_slash_Other_10_gml_84_0 = 234,
+ obj_npc_facing_slash_Other_10_gml_88_0 = 235,
+ obj_npc_facing_slash_Other_10_gml_89_0 = 236,
+ obj_npc_facing_slash_Other_10_gml_90_0 = 237,
+ obj_npc_facing_slash_Other_10_gml_96_0 = 238,
+ obj_npc_facing_slash_Other_10_gml_97_0 = 239,
+ obj_npc_facing_slash_Other_10_gml_98_0 = 240,
+ obj_npc_facing_slash_Other_10_gml_99_0 = 241,
+ obj_npc_room_slash_Other_10_gml_1000_0 = 242,
+ obj_npc_room_slash_Other_10_gml_1004_0 = 243,
+ obj_npc_room_slash_Other_10_gml_1005_0 = 244,
+ obj_npc_room_slash_Other_10_gml_1008_0 = 245,
+ obj_npc_room_slash_Other_10_gml_1013_0 = 246,
+ obj_npc_room_slash_Other_10_gml_1014_0 = 247,
+ obj_npc_room_slash_Other_10_gml_101_0 = 248,
+ obj_npc_room_slash_Other_10_gml_1022_0 = 249,
+ obj_npc_room_slash_Other_10_gml_1023_0 = 250,
+ obj_npc_room_slash_Other_10_gml_1024_0 = 251,
+ obj_npc_room_slash_Other_10_gml_1028_0 = 252,
+ obj_npc_room_slash_Other_10_gml_1049_0 = 253,
+ obj_npc_room_slash_Other_10_gml_104_0 = 254,
+ obj_npc_room_slash_Other_10_gml_1050_0 = 255,
+ obj_npc_room_slash_Other_10_gml_1054_0 = 256,
+ obj_npc_room_slash_Other_10_gml_1055_0 = 257,
+ obj_npc_room_slash_Other_10_gml_1068_0 = 258,
+ obj_npc_room_slash_Other_10_gml_1069_0 = 259,
+ obj_npc_room_slash_Other_10_gml_106_0 = 260,
+ obj_npc_room_slash_Other_10_gml_1070_0 = 261,
+ obj_npc_room_slash_Other_10_gml_1071_0 = 262,
+ obj_npc_room_slash_Other_10_gml_1074_0 = 263,
+ obj_npc_room_slash_Other_10_gml_1075_0 = 264,
+ obj_npc_room_slash_Other_10_gml_1081_0 = 265,
+ obj_npc_room_slash_Other_10_gml_1082_0 = 266,
+ obj_npc_room_slash_Other_10_gml_1086_0 = 267,
+ obj_npc_room_slash_Other_10_gml_1087_0 = 268,
+ obj_npc_room_slash_Other_10_gml_108_0 = 269,
+ obj_npc_room_slash_Other_10_gml_1097_0 = 270,
+ obj_npc_room_slash_Other_10_gml_1098_0 = 271,
+ obj_npc_room_slash_Other_10_gml_1099_0 = 272,
+ obj_npc_room_slash_Other_10_gml_1103_0 = 273,
+ obj_npc_room_slash_Other_10_gml_1104_0 = 274,
+ obj_npc_room_slash_Other_10_gml_110_0 = 275,
+ obj_npc_room_slash_Other_10_gml_1118_0 = 276,
+ obj_npc_room_slash_Other_10_gml_1119_0 = 277,
+ obj_npc_room_slash_Other_10_gml_1120_0 = 278,
+ obj_npc_room_slash_Other_10_gml_1121_0 = 279,
+ obj_npc_room_slash_Other_10_gml_1122_0 = 280,
+ obj_npc_room_slash_Other_10_gml_1123_0 = 281,
+ obj_npc_room_slash_Other_10_gml_1124_0 = 282,
+ obj_npc_room_slash_Other_10_gml_1128_0 = 283,
+ obj_npc_room_slash_Other_10_gml_1129_0 = 284,
+ obj_npc_room_slash_Other_10_gml_1130_0 = 285,
+ obj_npc_room_slash_Other_10_gml_1136_0 = 286,
+ obj_npc_room_slash_Other_10_gml_1137_0 = 287,
+ obj_npc_room_slash_Other_10_gml_1139_0 = 288,
+ obj_npc_room_slash_Other_10_gml_1145_0 = 289,
+ obj_npc_room_slash_Other_10_gml_1151_0 = 290,
+ obj_npc_room_slash_Other_10_gml_1153_0 = 291,
+ obj_npc_room_slash_Other_10_gml_1154_0 = 292,
+ obj_npc_room_slash_Other_10_gml_1155_0 = 293,
+ obj_npc_room_slash_Other_10_gml_1156_0 = 294,
+ obj_npc_room_slash_Other_10_gml_1157_0 = 295,
+ obj_npc_room_slash_Other_10_gml_1158_0 = 296,
+ obj_npc_room_slash_Other_10_gml_1159_0 = 297,
+ obj_npc_room_slash_Other_10_gml_1160_0 = 298,
+ obj_npc_room_slash_Other_10_gml_1161_0 = 299,
+ obj_npc_room_slash_Other_10_gml_1162_0 = 300,
+ obj_npc_room_slash_Other_10_gml_1163_0 = 301,
+ obj_npc_room_slash_Other_10_gml_1164_0 = 302,
+ obj_npc_room_slash_Other_10_gml_1165_0 = 303,
+ obj_npc_room_slash_Other_10_gml_1172_0 = 304,
+ obj_npc_room_slash_Other_10_gml_1173_0 = 305,
+ obj_npc_room_slash_Other_10_gml_1174_0 = 306,
+ obj_npc_room_slash_Other_10_gml_1198_0 = 307,
+ obj_npc_room_slash_Other_10_gml_1199_0 = 308,
+ obj_npc_room_slash_Other_10_gml_11_0 = 309,
+ obj_npc_room_slash_Other_10_gml_1202_0 = 310,
+ obj_npc_room_slash_Other_10_gml_1212_0 = 311,
+ obj_npc_room_slash_Other_10_gml_1213_0 = 312,
+ obj_npc_room_slash_Other_10_gml_1214_0 = 313,
+ obj_npc_room_slash_Other_10_gml_1217_0 = 314,
+ obj_npc_room_slash_Other_10_gml_1226_0 = 315,
+ obj_npc_room_slash_Other_10_gml_1227_0 = 316,
+ obj_npc_room_slash_Other_10_gml_1231_0 = 317,
+ obj_npc_room_slash_Other_10_gml_1237_0 = 318,
+ obj_npc_room_slash_Other_10_gml_1238_0 = 319,
+ obj_npc_room_slash_Other_10_gml_1239_0 = 320,
+ obj_npc_room_slash_Other_10_gml_1243_0 = 321,
+ obj_npc_room_slash_Other_10_gml_1255_0 = 322,
+ obj_npc_room_slash_Other_10_gml_1256_0 = 323,
+ obj_npc_room_slash_Other_10_gml_1260_0 = 324,
+ obj_npc_room_slash_Other_10_gml_1261_0 = 325,
+ obj_npc_room_slash_Other_10_gml_1262_0 = 326,
+ obj_npc_room_slash_Other_10_gml_1276_0 = 327,
+ obj_npc_room_slash_Other_10_gml_1277_0 = 328,
+ obj_npc_room_slash_Other_10_gml_1278_0 = 329,
+ obj_npc_room_slash_Other_10_gml_1279_0 = 330,
+ obj_npc_room_slash_Other_10_gml_1280_0 = 331,
+ obj_npc_room_slash_Other_10_gml_1281_0 = 332,
+ obj_npc_room_slash_Other_10_gml_1282_0 = 333,
+ obj_npc_room_slash_Other_10_gml_1283_0 = 334,
+ obj_npc_room_slash_Other_10_gml_1287_0 = 335,
+ obj_npc_room_slash_Other_10_gml_1288_0 = 336,
+ obj_npc_room_slash_Other_10_gml_1289_0 = 337,
+ obj_npc_room_slash_Other_10_gml_1295_0 = 338,
+ obj_npc_room_slash_Other_10_gml_1296_0 = 339,
+ obj_npc_room_slash_Other_10_gml_1297_0 = 340,
+ obj_npc_room_slash_Other_10_gml_1298_0 = 341,
+ obj_npc_room_slash_Other_10_gml_1316_0 = 342,
+ obj_npc_room_slash_Other_10_gml_1317_0 = 343,
+ obj_npc_room_slash_Other_10_gml_1318_0 = 344,
+ obj_npc_room_slash_Other_10_gml_1319_0 = 345,
+ obj_npc_room_slash_Other_10_gml_1323_0 = 346,
+ obj_npc_room_slash_Other_10_gml_1324_0 = 347,
+ obj_npc_room_slash_Other_10_gml_1325_0 = 348,
+ obj_npc_room_slash_Other_10_gml_1326_0 = 349,
+ obj_npc_room_slash_Other_10_gml_1348_0 = 350,
+ obj_npc_room_slash_Other_10_gml_1349_0 = 351,
+ obj_npc_room_slash_Other_10_gml_1353_0 = 352,
+ obj_npc_room_slash_Other_10_gml_1354_0 = 353,
+ obj_npc_room_slash_Other_10_gml_1355_0 = 354,
+ obj_npc_room_slash_Other_10_gml_1361_0 = 355,
+ obj_npc_room_slash_Other_10_gml_1362_0 = 356,
+ obj_npc_room_slash_Other_10_gml_1371_0 = 357,
+ obj_npc_room_slash_Other_10_gml_1372_0 = 358,
+ obj_npc_room_slash_Other_10_gml_1376_0 = 359,
+ obj_npc_room_slash_Other_10_gml_1377_0 = 360,
+ obj_npc_room_slash_Other_10_gml_137_0 = 361,
+ obj_npc_room_slash_Other_10_gml_138_0 = 362,
+ obj_npc_room_slash_Other_10_gml_139_0 = 363,
+ obj_npc_room_slash_Other_10_gml_143_0 = 364,
+ obj_npc_room_slash_Other_10_gml_147_0 = 365,
+ obj_npc_room_slash_Other_10_gml_152_0 = 366,
+ obj_npc_room_slash_Other_10_gml_157_0 = 367,
+ obj_npc_room_slash_Other_10_gml_159_0 = 368,
+ obj_npc_room_slash_Other_10_gml_15_0 = 369,
+ obj_npc_room_slash_Other_10_gml_165_0 = 370,
+ obj_npc_room_slash_Other_10_gml_16_0 = 371,
+ obj_npc_room_slash_Other_10_gml_175_0 = 372,
+ obj_npc_room_slash_Other_10_gml_177_0 = 373,
+ obj_npc_room_slash_Other_10_gml_179_0 = 374,
+ obj_npc_room_slash_Other_10_gml_186_0 = 375,
+ obj_npc_room_slash_Other_10_gml_187_0 = 376,
+ obj_npc_room_slash_Other_10_gml_188_0 = 377,
+ obj_npc_room_slash_Other_10_gml_193_0 = 378,
+ obj_npc_room_slash_Other_10_gml_194_0 = 379,
+ obj_npc_room_slash_Other_10_gml_195_0 = 380,
+ obj_npc_room_slash_Other_10_gml_196_0 = 381,
+ obj_npc_room_slash_Other_10_gml_200_0 = 382,
+ obj_npc_room_slash_Other_10_gml_201_0 = 383,
+ obj_npc_room_slash_Other_10_gml_202_0 = 384,
+ obj_npc_room_slash_Other_10_gml_205_0 = 385,
+ obj_npc_room_slash_Other_10_gml_206_0 = 386,
+ obj_npc_room_slash_Other_10_gml_214_0 = 387,
+ obj_npc_room_slash_Other_10_gml_215_0 = 388,
+ obj_npc_room_slash_Other_10_gml_216_0 = 389,
+ obj_npc_room_slash_Other_10_gml_217_0 = 390,
+ obj_npc_room_slash_Other_10_gml_21_0 = 391,
+ obj_npc_room_slash_Other_10_gml_221_0 = 392,
+ obj_npc_room_slash_Other_10_gml_222_0 = 393,
+ obj_npc_room_slash_Other_10_gml_223_0 = 394,
+ obj_npc_room_slash_Other_10_gml_224_0 = 395,
+ obj_npc_room_slash_Other_10_gml_233_0 = 396,
+ obj_npc_room_slash_Other_10_gml_236_0 = 397,
+ obj_npc_room_slash_Other_10_gml_238_0 = 398,
+ obj_npc_room_slash_Other_10_gml_240_0 = 399,
+ obj_npc_room_slash_Other_10_gml_242_0 = 400,
+ obj_npc_room_slash_Other_10_gml_243_0 = 401,
+ obj_npc_room_slash_Other_10_gml_248_0 = 402,
+ obj_npc_room_slash_Other_10_gml_250_0 = 403,
+ obj_npc_room_slash_Other_10_gml_252_0 = 404,
+ obj_npc_room_slash_Other_10_gml_254_0 = 405,
+ obj_npc_room_slash_Other_10_gml_262_0 = 406,
+ obj_npc_room_slash_Other_10_gml_263_0 = 407,
+ obj_npc_room_slash_Other_10_gml_264_0 = 408,
+ obj_npc_room_slash_Other_10_gml_265_0 = 409,
+ obj_npc_room_slash_Other_10_gml_269_0 = 410,
+ obj_npc_room_slash_Other_10_gml_270_0 = 411,
+ obj_npc_room_slash_Other_10_gml_278_0 = 412,
+ obj_npc_room_slash_Other_10_gml_279_0 = 413,
+ obj_npc_room_slash_Other_10_gml_280_0 = 414,
+ obj_npc_room_slash_Other_10_gml_284_0 = 415,
+ obj_npc_room_slash_Other_10_gml_285_0 = 416,
+ obj_npc_room_slash_Other_10_gml_286_0 = 417,
+ obj_npc_room_slash_Other_10_gml_292_0 = 418,
+ obj_npc_room_slash_Other_10_gml_293_0 = 419,
+ obj_npc_room_slash_Other_10_gml_294_0 = 420,
+ obj_npc_room_slash_Other_10_gml_297_0 = 421,
+ obj_npc_room_slash_Other_10_gml_298_0 = 422,
+ obj_npc_room_slash_Other_10_gml_299_0 = 423,
+ obj_npc_room_slash_Other_10_gml_304_0 = 424,
+ obj_npc_room_slash_Other_10_gml_305_0 = 425,
+ obj_npc_room_slash_Other_10_gml_306_0 = 426,
+ obj_npc_room_slash_Other_10_gml_316_0 = 427,
+ obj_npc_room_slash_Other_10_gml_317_0 = 428,
+ obj_npc_room_slash_Other_10_gml_318_0 = 429,
+ obj_npc_room_slash_Other_10_gml_319_0 = 430,
+ obj_npc_room_slash_Other_10_gml_322_0 = 431,
+ obj_npc_room_slash_Other_10_gml_323_0 = 432,
+ obj_npc_room_slash_Other_10_gml_327_0 = 433,
+ obj_npc_room_slash_Other_10_gml_328_0 = 434,
+ obj_npc_room_slash_Other_10_gml_334_0 = 435,
+ obj_npc_room_slash_Other_10_gml_335_0 = 436,
+ obj_npc_room_slash_Other_10_gml_336_0 = 437,
+ obj_npc_room_slash_Other_10_gml_337_0 = 438,
+ obj_npc_room_slash_Other_10_gml_340_0 = 439,
+ obj_npc_room_slash_Other_10_gml_341_0 = 440,
+ obj_npc_room_slash_Other_10_gml_342_0 = 441,
+ obj_npc_room_slash_Other_10_gml_346_0 = 442,
+ obj_npc_room_slash_Other_10_gml_347_0 = 443,
+ obj_npc_room_slash_Other_10_gml_352_0 = 444,
+ obj_npc_room_slash_Other_10_gml_353_0 = 445,
+ obj_npc_room_slash_Other_10_gml_365_0 = 446,
+ obj_npc_room_slash_Other_10_gml_366_0 = 447,
+ obj_npc_room_slash_Other_10_gml_367_0 = 448,
+ obj_npc_room_slash_Other_10_gml_368_0 = 449,
+ obj_npc_room_slash_Other_10_gml_372_0 = 450,
+ obj_npc_room_slash_Other_10_gml_383_0 = 451,
+ obj_npc_room_slash_Other_10_gml_384_0 = 452,
+ obj_npc_room_slash_Other_10_gml_388_0 = 453,
+ obj_npc_room_slash_Other_10_gml_389_0 = 454,
+ obj_npc_room_slash_Other_10_gml_390_0 = 455,
+ obj_npc_room_slash_Other_10_gml_391_0 = 456,
+ obj_npc_room_slash_Other_10_gml_397_0 = 457,
+ obj_npc_room_slash_Other_10_gml_398_0 = 458,
+ obj_npc_room_slash_Other_10_gml_399_0 = 459,
+ obj_npc_room_slash_Other_10_gml_406_0 = 460,
+ obj_npc_room_slash_Other_10_gml_407_0 = 461,
+ obj_npc_room_slash_Other_10_gml_412_0 = 462,
+ obj_npc_room_slash_Other_10_gml_413_0 = 463,
+ obj_npc_room_slash_Other_10_gml_41_0 = 464,
+ obj_npc_room_slash_Other_10_gml_420_0 = 465,
+ obj_npc_room_slash_Other_10_gml_421_0 = 466,
+ obj_npc_room_slash_Other_10_gml_428_0 = 467,
+ obj_npc_room_slash_Other_10_gml_429_0 = 468,
+ obj_npc_room_slash_Other_10_gml_436_0 = 469,
+ obj_npc_room_slash_Other_10_gml_437_0 = 470,
+ obj_npc_room_slash_Other_10_gml_442_0 = 471,
+ obj_npc_room_slash_Other_10_gml_448_0 = 472,
+ obj_npc_room_slash_Other_10_gml_449_0 = 473,
+ obj_npc_room_slash_Other_10_gml_454_0 = 474,
+ obj_npc_room_slash_Other_10_gml_455_0 = 475,
+ obj_npc_room_slash_Other_10_gml_456_0 = 476,
+ obj_npc_room_slash_Other_10_gml_486_0 = 477,
+ obj_npc_room_slash_Other_10_gml_48_0 = 478,
+ obj_npc_room_slash_Other_10_gml_493_0 = 479,
+ obj_npc_room_slash_Other_10_gml_494_0 = 480,
+ obj_npc_room_slash_Other_10_gml_495_0 = 481,
+ obj_npc_room_slash_Other_10_gml_498_0 = 482,
+ obj_npc_room_slash_Other_10_gml_49_0 = 483,
+ obj_npc_room_slash_Other_10_gml_504_0 = 484,
+ obj_npc_room_slash_Other_10_gml_505_0 = 485,
+ obj_npc_room_slash_Other_10_gml_511_0 = 486,
+ obj_npc_room_slash_Other_10_gml_512_0 = 487,
+ obj_npc_room_slash_Other_10_gml_513_0 = 488,
+ obj_npc_room_slash_Other_10_gml_514_0 = 489,
+ obj_npc_room_slash_Other_10_gml_515_0 = 490,
+ obj_npc_room_slash_Other_10_gml_519_0 = 491,
+ obj_npc_room_slash_Other_10_gml_527_0 = 492,
+ obj_npc_room_slash_Other_10_gml_529_0 = 493,
+ obj_npc_room_slash_Other_10_gml_531_0 = 494,
+ obj_npc_room_slash_Other_10_gml_533_0 = 495,
+ obj_npc_room_slash_Other_10_gml_535_0 = 496,
+ obj_npc_room_slash_Other_10_gml_537_0 = 497,
+ obj_npc_room_slash_Other_10_gml_538_0 = 498,
+ obj_npc_room_slash_Other_10_gml_53_0 = 499,
+ obj_npc_room_slash_Other_10_gml_540_0 = 500,
+ obj_npc_room_slash_Other_10_gml_547_0 = 501,
+ obj_npc_room_slash_Other_10_gml_549_0 = 502,
+ obj_npc_room_slash_Other_10_gml_551_0 = 503,
+ obj_npc_room_slash_Other_10_gml_552_0 = 504,
+ obj_npc_room_slash_Other_10_gml_560_0 = 505,
+ obj_npc_room_slash_Other_10_gml_562_0 = 506,
+ obj_npc_room_slash_Other_10_gml_563_0 = 507,
+ obj_npc_room_slash_Other_10_gml_564_0 = 508,
+ obj_npc_room_slash_Other_10_gml_566_0 = 509,
+ obj_npc_room_slash_Other_10_gml_567_0 = 510,
+ obj_npc_room_slash_Other_10_gml_568_0 = 511,
+ obj_npc_room_slash_Other_10_gml_570_0 = 512,
+ obj_npc_room_slash_Other_10_gml_577_0 = 513,
+ obj_npc_room_slash_Other_10_gml_578_0 = 514,
+ obj_npc_room_slash_Other_10_gml_57_0 = 515,
+ obj_npc_room_slash_Other_10_gml_580_0 = 516,
+ obj_npc_room_slash_Other_10_gml_58_0 = 517,
+ obj_npc_room_slash_Other_10_gml_591_0 = 518,
+ obj_npc_room_slash_Other_10_gml_593_0 = 519,
+ obj_npc_room_slash_Other_10_gml_597_0 = 520,
+ obj_npc_room_slash_Other_10_gml_599_0 = 521,
+ obj_npc_room_slash_Other_10_gml_606_0 = 522,
+ obj_npc_room_slash_Other_10_gml_607_0 = 523,
+ obj_npc_room_slash_Other_10_gml_610_0 = 524,
+ obj_npc_room_slash_Other_10_gml_618_0 = 525,
+ obj_npc_room_slash_Other_10_gml_619_0 = 526,
+ obj_npc_room_slash_Other_10_gml_620_0 = 527,
+ obj_npc_room_slash_Other_10_gml_621_0 = 528,
+ obj_npc_room_slash_Other_10_gml_626_0 = 529,
+ obj_npc_room_slash_Other_10_gml_627_0 = 530,
+ obj_npc_room_slash_Other_10_gml_628_0 = 531,
+ obj_npc_room_slash_Other_10_gml_632_0 = 532,
+ obj_npc_room_slash_Other_10_gml_638_0 = 533,
+ obj_npc_room_slash_Other_10_gml_639_0 = 534,
+ obj_npc_room_slash_Other_10_gml_640_0 = 535,
+ obj_npc_room_slash_Other_10_gml_644_0 = 536,
+ obj_npc_room_slash_Other_10_gml_645_0 = 537,
+ obj_npc_room_slash_Other_10_gml_653_0 = 538,
+ obj_npc_room_slash_Other_10_gml_654_0 = 539,
+ obj_npc_room_slash_Other_10_gml_659_0 = 540,
+ obj_npc_room_slash_Other_10_gml_665_0 = 541,
+ obj_npc_room_slash_Other_10_gml_666_0 = 542,
+ obj_npc_room_slash_Other_10_gml_675_0 = 543,
+ obj_npc_room_slash_Other_10_gml_676_0 = 544,
+ obj_npc_room_slash_Other_10_gml_682_0 = 545,
+ obj_npc_room_slash_Other_10_gml_685_0 = 546,
+ obj_npc_room_slash_Other_10_gml_687_0 = 547,
+ obj_npc_room_slash_Other_10_gml_689_0 = 548,
+ obj_npc_room_slash_Other_10_gml_694_0 = 549,
+ obj_npc_room_slash_Other_10_gml_695_0 = 550,
+ obj_npc_room_slash_Other_10_gml_697_0 = 551,
+ obj_npc_room_slash_Other_10_gml_699_0 = 552,
+ obj_npc_room_slash_Other_10_gml_700_0 = 553,
+ obj_npc_room_slash_Other_10_gml_701_0 = 554,
+ obj_npc_room_slash_Other_10_gml_706_0 = 555,
+ obj_npc_room_slash_Other_10_gml_708_0 = 556,
+ obj_npc_room_slash_Other_10_gml_718_0 = 557,
+ obj_npc_room_slash_Other_10_gml_719_0 = 558,
+ obj_npc_room_slash_Other_10_gml_723_0 = 559,
+ obj_npc_room_slash_Other_10_gml_727_0 = 560,
+ obj_npc_room_slash_Other_10_gml_728_0 = 561,
+ obj_npc_room_slash_Other_10_gml_730_0 = 562,
+ obj_npc_room_slash_Other_10_gml_731_0 = 563,
+ obj_npc_room_slash_Other_10_gml_746_0 = 564,
+ obj_npc_room_slash_Other_10_gml_747_0 = 565,
+ obj_npc_room_slash_Other_10_gml_754_0 = 566,
+ obj_npc_room_slash_Other_10_gml_755_0 = 567,
+ obj_npc_room_slash_Other_10_gml_764_0 = 568,
+ obj_npc_room_slash_Other_10_gml_768_0 = 569,
+ obj_npc_room_slash_Other_10_gml_770_0 = 570,
+ obj_npc_room_slash_Other_10_gml_771_0 = 571,
+ obj_npc_room_slash_Other_10_gml_773_0 = 572,
+ obj_npc_room_slash_Other_10_gml_774_0 = 573,
+ obj_npc_room_slash_Other_10_gml_786_0 = 574,
+ obj_npc_room_slash_Other_10_gml_792_0 = 575,
+ obj_npc_room_slash_Other_10_gml_794_0 = 576,
+ obj_npc_room_slash_Other_10_gml_796_0 = 577,
+ obj_npc_room_slash_Other_10_gml_798_0 = 578,
+ obj_npc_room_slash_Other_10_gml_806_0 = 579,
+ obj_npc_room_slash_Other_10_gml_807_0 = 580,
+ obj_npc_room_slash_Other_10_gml_812_0 = 581,
+ obj_npc_room_slash_Other_10_gml_813_0 = 582,
+ obj_npc_room_slash_Other_10_gml_814_0 = 583,
+ obj_npc_room_slash_Other_10_gml_817_0 = 584,
+ obj_npc_room_slash_Other_10_gml_818_0 = 585,
+ obj_npc_room_slash_Other_10_gml_81_0 = 586,
+ obj_npc_room_slash_Other_10_gml_823_0 = 587,
+ obj_npc_room_slash_Other_10_gml_827_0 = 588,
+ obj_npc_room_slash_Other_10_gml_828_0 = 589,
+ obj_npc_room_slash_Other_10_gml_829_0 = 590,
+ obj_npc_room_slash_Other_10_gml_82_0 = 591,
+ obj_npc_room_slash_Other_10_gml_832_0 = 592,
+ obj_npc_room_slash_Other_10_gml_83_0 = 593,
+ obj_npc_room_slash_Other_10_gml_844_0 = 594,
+ obj_npc_room_slash_Other_10_gml_845_0 = 595,
+ obj_npc_room_slash_Other_10_gml_849_0 = 596,
+ obj_npc_room_slash_Other_10_gml_84_0 = 597,
+ obj_npc_room_slash_Other_10_gml_850_0 = 598,
+ obj_npc_room_slash_Other_10_gml_855_0 = 599,
+ obj_npc_room_slash_Other_10_gml_856_0 = 600,
+ obj_npc_room_slash_Other_10_gml_865_0 = 601,
+ obj_npc_room_slash_Other_10_gml_866_0 = 602,
+ obj_npc_room_slash_Other_10_gml_867_0 = 603,
+ obj_npc_room_slash_Other_10_gml_86_0 = 604,
+ obj_npc_room_slash_Other_10_gml_870_0 = 605,
+ obj_npc_room_slash_Other_10_gml_871_0 = 606,
+ obj_npc_room_slash_Other_10_gml_876_0 = 607,
+ obj_npc_room_slash_Other_10_gml_877_0 = 608,
+ obj_npc_room_slash_Other_10_gml_87_0 = 609,
+ obj_npc_room_slash_Other_10_gml_880_0 = 610,
+ obj_npc_room_slash_Other_10_gml_882_0 = 611,
+ obj_npc_room_slash_Other_10_gml_884_0 = 612,
+ obj_npc_room_slash_Other_10_gml_888_0 = 613,
+ obj_npc_room_slash_Other_10_gml_889_0 = 614,
+ obj_npc_room_slash_Other_10_gml_890_0 = 615,
+ obj_npc_room_slash_Other_10_gml_892_0 = 616,
+ obj_npc_room_slash_Other_10_gml_894_0 = 617,
+ obj_npc_room_slash_Other_10_gml_895_0 = 618,
+ obj_npc_room_slash_Other_10_gml_897_0 = 619,
+ obj_npc_room_slash_Other_10_gml_898_0 = 620,
+ obj_npc_room_slash_Other_10_gml_90_0 = 621,
+ obj_npc_room_slash_Other_10_gml_913_0 = 622,
+ obj_npc_room_slash_Other_10_gml_917_0 = 623,
+ obj_npc_room_slash_Other_10_gml_918_0 = 624,
+ obj_npc_room_slash_Other_10_gml_919_0 = 625,
+ obj_npc_room_slash_Other_10_gml_923_0 = 626,
+ obj_npc_room_slash_Other_10_gml_924_0 = 627,
+ obj_npc_room_slash_Other_10_gml_925_0 = 628,
+ obj_npc_room_slash_Other_10_gml_930_0 = 629,
+ obj_npc_room_slash_Other_10_gml_931_0 = 630,
+ obj_npc_room_slash_Other_10_gml_932_0 = 631,
+ obj_npc_room_slash_Other_10_gml_944_0 = 632,
+ obj_npc_room_slash_Other_10_gml_945_0 = 633,
+ obj_npc_room_slash_Other_10_gml_946_0 = 634,
+ obj_npc_room_slash_Other_10_gml_947_0 = 635,
+ obj_npc_room_slash_Other_10_gml_955_0 = 636,
+ obj_npc_room_slash_Other_10_gml_957_0 = 637,
+ obj_npc_room_slash_Other_10_gml_958_0 = 638,
+ obj_npc_room_slash_Other_10_gml_95_0 = 639,
+ obj_npc_room_slash_Other_10_gml_960_0 = 640,
+ obj_npc_room_slash_Other_10_gml_962_0 = 641,
+ obj_npc_room_slash_Other_10_gml_964_0 = 642,
+ obj_npc_room_slash_Other_10_gml_972_0 = 643,
+ obj_npc_room_slash_Other_10_gml_973_0 = 644,
+ obj_npc_room_slash_Other_10_gml_974_0 = 645,
+ obj_npc_room_slash_Other_10_gml_978_0 = 646,
+ obj_npc_room_slash_Other_10_gml_979_0 = 647,
+ obj_npc_room_slash_Other_10_gml_97_0 = 648,
+ obj_npc_room_slash_Other_10_gml_982_0 = 649,
+ obj_npc_room_slash_Other_10_gml_988_0 = 650,
+ obj_npc_room_slash_Other_10_gml_992_0 = 651,
+ obj_npc_room_slash_Other_10_gml_996_0 = 652,
+ obj_npc_room_slash_Other_10_gml_99_0 = 653,
+ obj_npc_sign_slash_Create_0_gml_45_0 = 654,
+ obj_npc_sign_slash_Create_0_gml_50_0 = 655,
+ obj_npc_sign_slash_Create_0_gml_51_0 = 656,
+ obj_npc_sign_slash_Create_0_gml_52_0 = 657,
+ obj_npc_sign_slash_Create_0_gml_57_0 = 658,
+ obj_npc_sign_slash_Create_0_gml_58_0 = 659,
+ obj_npc_sign_slash_Create_0_gml_59_0 = 660,
+ obj_npc_sign_slash_Other_10_gml_12_0 = 661,
+ obj_npc_sign_slash_Other_10_gml_13_0 = 662,
+ obj_npc_sign_slash_Other_10_gml_161_0 = 663,
+ obj_npc_sign_slash_Other_10_gml_162_0 = 664,
+ obj_npc_sign_slash_Other_10_gml_169_0 = 665,
+ obj_npc_sign_slash_Other_10_gml_173_0 = 666,
+ obj_npc_sign_slash_Other_10_gml_179_0 = 667,
+ obj_npc_sign_slash_Other_10_gml_184_0 = 668,
+ obj_npc_sign_slash_Other_10_gml_185_0 = 669,
+ obj_npc_sign_slash_Other_10_gml_196_0 = 670,
+ obj_npc_sign_slash_Other_10_gml_30_0 = 671,
+ obj_npc_sign_slash_Other_10_gml_41_0 = 672,
+ obj_npc_sign_slash_Other_10_gml_42_0 = 673,
+ obj_npc_sign_slash_Other_10_gml_42_1 = 674,
+ obj_npc_sign_slash_Other_10_gml_43_0 = 675,
+ obj_npc_sign_slash_Other_10_gml_49_0 = 676,
+ obj_npc_sign_slash_Other_10_gml_52_0 = 677,
+ obj_npc_sign_slash_Other_10_gml_53_0 = 678,
+ obj_npc_sign_slash_Other_10_gml_55_0 = 679,
+ obj_npc_sign_slash_Other_10_gml_56_0 = 680,
+ obj_npc_sign_slash_Other_10_gml_57_0 = 681,
+ obj_npc_sign_slash_Other_10_gml_63_0 = 682,
+ obj_npc_sign_slash_Other_10_gml_68_0 = 683,
+ obj_npc_sign_slash_Other_10_gml_69_0 = 684,
+ obj_npc_sign_slash_Other_10_gml_74_0 = 685,
+ obj_npc_sign_slash_Other_10_gml_75_0 = 686,
+ obj_npc_sign_slash_Other_10_gml_80_0 = 687,
+ obj_npc_sign_slash_Other_10_gml_81_0 = 688,
+ obj_npc_sign_slash_Other_10_gml_84_0 = 689,
+ obj_npc_sign_slash_Other_10_gml_8_0 = 690,
+ obj_npc_sign_slash_Other_10_gml_90_0 = 691,
+ obj_npc_sign_slash_Other_10_gml_91_0 = 692,
+ obj_readable_room1_slash_Other_10_gml_1001_0 = 693,
+ obj_readable_room1_slash_Other_10_gml_1002_0 = 694,
+ obj_readable_room1_slash_Other_10_gml_1003_0 = 695,
+ obj_readable_room1_slash_Other_10_gml_100_0 = 696,
+ obj_readable_room1_slash_Other_10_gml_1011_0 = 697,
+ obj_readable_room1_slash_Other_10_gml_1017_0 = 698,
+ obj_readable_room1_slash_Other_10_gml_1024_0 = 699,
+ obj_readable_room1_slash_Other_10_gml_1027_0 = 700,
+ obj_readable_room1_slash_Other_10_gml_1028_0 = 701,
+ obj_readable_room1_slash_Other_10_gml_103_0 = 702,
+ obj_readable_room1_slash_Other_10_gml_1041_0 = 703,
+ obj_readable_room1_slash_Other_10_gml_1042_0 = 704,
+ obj_readable_room1_slash_Other_10_gml_1046_0 = 705,
+ obj_readable_room1_slash_Other_10_gml_1047_0 = 706,
+ obj_readable_room1_slash_Other_10_gml_1051_0 = 707,
+ obj_readable_room1_slash_Other_10_gml_1052_0 = 708,
+ obj_readable_room1_slash_Other_10_gml_1063_0 = 709,
+ obj_readable_room1_slash_Other_10_gml_1064_0 = 710,
+ obj_readable_room1_slash_Other_10_gml_1069_0 = 711,
+ obj_readable_room1_slash_Other_10_gml_1070_0 = 712,
+ obj_readable_room1_slash_Other_10_gml_1071_0 = 713,
+ obj_readable_room1_slash_Other_10_gml_1072_0 = 714,
+ obj_readable_room1_slash_Other_10_gml_1080_0 = 715,
+ obj_readable_room1_slash_Other_10_gml_1081_0 = 716,
+ obj_readable_room1_slash_Other_10_gml_1085_0 = 717,
+ obj_readable_room1_slash_Other_10_gml_1086_0 = 718,
+ obj_readable_room1_slash_Other_10_gml_1093_0 = 719,
+ obj_readable_room1_slash_Other_10_gml_1094_0 = 720,
+ obj_readable_room1_slash_Other_10_gml_1095_0 = 721,
+ obj_readable_room1_slash_Other_10_gml_1096_0 = 722,
+ obj_readable_room1_slash_Other_10_gml_1097_0 = 723,
+ obj_readable_room1_slash_Other_10_gml_1098_0 = 724,
+ obj_readable_room1_slash_Other_10_gml_1102_0 = 725,
+ obj_readable_room1_slash_Other_10_gml_1103_0 = 726,
+ obj_readable_room1_slash_Other_10_gml_1104_0 = 727,
+ obj_readable_room1_slash_Other_10_gml_1105_0 = 728,
+ obj_readable_room1_slash_Other_10_gml_1111_0 = 729,
+ obj_readable_room1_slash_Other_10_gml_1112_0 = 730,
+ obj_readable_room1_slash_Other_10_gml_1117_0 = 731,
+ obj_readable_room1_slash_Other_10_gml_1118_0 = 732,
+ obj_readable_room1_slash_Other_10_gml_1119_0 = 733,
+ obj_readable_room1_slash_Other_10_gml_1134_0 = 734,
+ obj_readable_room1_slash_Other_10_gml_1137_0 = 735,
+ obj_readable_room1_slash_Other_10_gml_113_0 = 736,
+ obj_readable_room1_slash_Other_10_gml_1141_0 = 737,
+ obj_readable_room1_slash_Other_10_gml_1145_0 = 738,
+ obj_readable_room1_slash_Other_10_gml_1158_0 = 739,
+ obj_readable_room1_slash_Other_10_gml_1163_0 = 740,
+ obj_readable_room1_slash_Other_10_gml_1166_0 = 741,
+ obj_readable_room1_slash_Other_10_gml_1178_0 = 742,
+ obj_readable_room1_slash_Other_10_gml_1185_0 = 743,
+ obj_readable_room1_slash_Other_10_gml_1186_0 = 744,
+ obj_readable_room1_slash_Other_10_gml_1187_0 = 745,
+ obj_readable_room1_slash_Other_10_gml_118_0 = 746,
+ obj_readable_room1_slash_Other_10_gml_1192_0 = 747,
+ obj_readable_room1_slash_Other_10_gml_1193_0 = 748,
+ obj_readable_room1_slash_Other_10_gml_11_0 = 749,
+ obj_readable_room1_slash_Other_10_gml_1202_0 = 750,
+ obj_readable_room1_slash_Other_10_gml_1206_0 = 751,
+ obj_readable_room1_slash_Other_10_gml_1207_0 = 752,
+ obj_readable_room1_slash_Other_10_gml_1209_0 = 753,
+ obj_readable_room1_slash_Other_10_gml_1212_0 = 754,
+ obj_readable_room1_slash_Other_10_gml_1219_0 = 755,
+ obj_readable_room1_slash_Other_10_gml_1220_0 = 756,
+ obj_readable_room1_slash_Other_10_gml_1221_0 = 757,
+ obj_readable_room1_slash_Other_10_gml_1227_0 = 758,
+ obj_readable_room1_slash_Other_10_gml_1229_0 = 759,
+ obj_readable_room1_slash_Other_10_gml_1230_0 = 760,
+ obj_readable_room1_slash_Other_10_gml_1231_0 = 761,
+ obj_readable_room1_slash_Other_10_gml_1235_0 = 762,
+ obj_readable_room1_slash_Other_10_gml_123_0 = 763,
+ obj_readable_room1_slash_Other_10_gml_1250_0 = 764,
+ obj_readable_room1_slash_Other_10_gml_1254_0 = 765,
+ obj_readable_room1_slash_Other_10_gml_1257_0 = 766,
+ obj_readable_room1_slash_Other_10_gml_1266_0 = 767,
+ obj_readable_room1_slash_Other_10_gml_1267_0 = 768,
+ obj_readable_room1_slash_Other_10_gml_126_0 = 769,
+ obj_readable_room1_slash_Other_10_gml_1274_0 = 770,
+ obj_readable_room1_slash_Other_10_gml_1275_0 = 771,
+ obj_readable_room1_slash_Other_10_gml_1276_0 = 772,
+ obj_readable_room1_slash_Other_10_gml_1281_0 = 773,
+ obj_readable_room1_slash_Other_10_gml_1291_0 = 774,
+ obj_readable_room1_slash_Other_10_gml_1292_0 = 775,
+ obj_readable_room1_slash_Other_10_gml_1296_0 = 776,
+ obj_readable_room1_slash_Other_10_gml_1297_0 = 777,
+ obj_readable_room1_slash_Other_10_gml_1301_0 = 778,
+ obj_readable_room1_slash_Other_10_gml_1307_0 = 779,
+ obj_readable_room1_slash_Other_10_gml_1308_0 = 780,
+ obj_readable_room1_slash_Other_10_gml_1309_0 = 781,
+ obj_readable_room1_slash_Other_10_gml_1312_0 = 782,
+ obj_readable_room1_slash_Other_10_gml_1313_0 = 783,
+ obj_readable_room1_slash_Other_10_gml_1314_0 = 784,
+ obj_readable_room1_slash_Other_10_gml_1319_0 = 785,
+ obj_readable_room1_slash_Other_10_gml_1320_0 = 786,
+ obj_readable_room1_slash_Other_10_gml_1324_0 = 787,
+ obj_readable_room1_slash_Other_10_gml_1325_0 = 788,
+ obj_readable_room1_slash_Other_10_gml_1326_0 = 789,
+ obj_readable_room1_slash_Other_10_gml_132_0 = 790,
+ obj_readable_room1_slash_Other_10_gml_1338_0 = 791,
+ obj_readable_room1_slash_Other_10_gml_1345_0 = 792,
+ obj_readable_room1_slash_Other_10_gml_1346_0 = 793,
+ obj_readable_room1_slash_Other_10_gml_1350_0 = 794,
+ obj_readable_room1_slash_Other_10_gml_1351_0 = 795,
+ obj_readable_room1_slash_Other_10_gml_1355_0 = 796,
+ obj_readable_room1_slash_Other_10_gml_1356_0 = 797,
+ obj_readable_room1_slash_Other_10_gml_1360_0 = 798,
+ obj_readable_room1_slash_Other_10_gml_1365_0 = 799,
+ obj_readable_room1_slash_Other_10_gml_1366_0 = 800,
+ obj_readable_room1_slash_Other_10_gml_1367_0 = 801,
+ obj_readable_room1_slash_Other_10_gml_1371_0 = 802,
+ obj_readable_room1_slash_Other_10_gml_1372_0 = 803,
+ obj_readable_room1_slash_Other_10_gml_1373_0 = 804,
+ obj_readable_room1_slash_Other_10_gml_1374_0 = 805,
+ obj_readable_room1_slash_Other_10_gml_137_0 = 806,
+ obj_readable_room1_slash_Other_10_gml_1383_0 = 807,
+ obj_readable_room1_slash_Other_10_gml_140_0 = 808,
+ obj_readable_room1_slash_Other_10_gml_146_0 = 809,
+ obj_readable_room1_slash_Other_10_gml_151_0 = 810,
+ obj_readable_room1_slash_Other_10_gml_157_0 = 811,
+ obj_readable_room1_slash_Other_10_gml_167_0 = 812,
+ obj_readable_room1_slash_Other_10_gml_168_0 = 813,
+ obj_readable_room1_slash_Other_10_gml_177_0 = 814,
+ obj_readable_room1_slash_Other_10_gml_178_0 = 815,
+ obj_readable_room1_slash_Other_10_gml_179_0 = 816,
+ obj_readable_room1_slash_Other_10_gml_17_0 = 817,
+ obj_readable_room1_slash_Other_10_gml_18_0 = 818,
+ obj_readable_room1_slash_Other_10_gml_190_0 = 819,
+ obj_readable_room1_slash_Other_10_gml_191_0 = 820,
+ obj_readable_room1_slash_Other_10_gml_192_0 = 821,
+ obj_readable_room1_slash_Other_10_gml_193_0 = 822,
+ obj_readable_room1_slash_Other_10_gml_194_0 = 823,
+ obj_readable_room1_slash_Other_10_gml_199_0 = 824,
+ obj_readable_room1_slash_Other_10_gml_204_0 = 825,
+ obj_readable_room1_slash_Other_10_gml_205_0 = 826,
+ obj_readable_room1_slash_Other_10_gml_206_0 = 827,
+ obj_readable_room1_slash_Other_10_gml_211_0 = 828,
+ obj_readable_room1_slash_Other_10_gml_212_0 = 829,
+ obj_readable_room1_slash_Other_10_gml_217_0 = 830,
+ obj_readable_room1_slash_Other_10_gml_218_0 = 831,
+ obj_readable_room1_slash_Other_10_gml_219_0 = 832,
+ obj_readable_room1_slash_Other_10_gml_223_0 = 833,
+ obj_readable_room1_slash_Other_10_gml_225_0 = 834,
+ obj_readable_room1_slash_Other_10_gml_22_0 = 835,
+ obj_readable_room1_slash_Other_10_gml_230_0 = 836,
+ obj_readable_room1_slash_Other_10_gml_237_0 = 837,
+ obj_readable_room1_slash_Other_10_gml_238_0 = 838,
+ obj_readable_room1_slash_Other_10_gml_239_0 = 839,
+ obj_readable_room1_slash_Other_10_gml_245_0 = 840,
+ obj_readable_room1_slash_Other_10_gml_251_0 = 841,
+ obj_readable_room1_slash_Other_10_gml_255_0 = 842,
+ obj_readable_room1_slash_Other_10_gml_264_0 = 843,
+ obj_readable_room1_slash_Other_10_gml_265_0 = 844,
+ obj_readable_room1_slash_Other_10_gml_269_0 = 845,
+ obj_readable_room1_slash_Other_10_gml_270_0 = 846,
+ obj_readable_room1_slash_Other_10_gml_278_0 = 847,
+ obj_readable_room1_slash_Other_10_gml_279_0 = 848,
+ obj_readable_room1_slash_Other_10_gml_284_0 = 849,
+ obj_readable_room1_slash_Other_10_gml_285_0 = 850,
+ obj_readable_room1_slash_Other_10_gml_289_0 = 851,
+ obj_readable_room1_slash_Other_10_gml_28_0 = 852,
+ obj_readable_room1_slash_Other_10_gml_290_0 = 853,
+ obj_readable_room1_slash_Other_10_gml_298_0 = 854,
+ obj_readable_room1_slash_Other_10_gml_29_0 = 855,
+ obj_readable_room1_slash_Other_10_gml_304_0 = 856,
+ obj_readable_room1_slash_Other_10_gml_305_0 = 857,
+ obj_readable_room1_slash_Other_10_gml_306_0 = 858,
+ obj_readable_room1_slash_Other_10_gml_30_0 = 859,
+ obj_readable_room1_slash_Other_10_gml_318_0 = 860,
+ obj_readable_room1_slash_Other_10_gml_319_0 = 861,
+ obj_readable_room1_slash_Other_10_gml_323_0 = 862,
+ obj_readable_room1_slash_Other_10_gml_324_0 = 863,
+ obj_readable_room1_slash_Other_10_gml_333_0 = 864,
+ obj_readable_room1_slash_Other_10_gml_338_0 = 865,
+ obj_readable_room1_slash_Other_10_gml_339_0 = 866,
+ obj_readable_room1_slash_Other_10_gml_33_0 = 867,
+ obj_readable_room1_slash_Other_10_gml_343_0 = 868,
+ obj_readable_room1_slash_Other_10_gml_347_0 = 869,
+ obj_readable_room1_slash_Other_10_gml_34_0 = 870,
+ obj_readable_room1_slash_Other_10_gml_354_0 = 871,
+ obj_readable_room1_slash_Other_10_gml_358_0 = 872,
+ obj_readable_room1_slash_Other_10_gml_366_0 = 873,
+ obj_readable_room1_slash_Other_10_gml_371_0 = 874,
+ obj_readable_room1_slash_Other_10_gml_372_0 = 875,
+ obj_readable_room1_slash_Other_10_gml_373_0 = 876,
+ obj_readable_room1_slash_Other_10_gml_374_0 = 877,
+ obj_readable_room1_slash_Other_10_gml_375_0 = 878,
+ obj_readable_room1_slash_Other_10_gml_378_0 = 879,
+ obj_readable_room1_slash_Other_10_gml_379_0 = 880,
+ obj_readable_room1_slash_Other_10_gml_388_0 = 881,
+ obj_readable_room1_slash_Other_10_gml_389_0 = 882,
+ obj_readable_room1_slash_Other_10_gml_38_0 = 883,
+ obj_readable_room1_slash_Other_10_gml_400_0 = 884,
+ obj_readable_room1_slash_Other_10_gml_411_0 = 885,
+ obj_readable_room1_slash_Other_10_gml_416_0 = 886,
+ obj_readable_room1_slash_Other_10_gml_419_0 = 887,
+ obj_readable_room1_slash_Other_10_gml_429_0 = 888,
+ obj_readable_room1_slash_Other_10_gml_430_0 = 889,
+ obj_readable_room1_slash_Other_10_gml_431_0 = 890,
+ obj_readable_room1_slash_Other_10_gml_435_0 = 891,
+ obj_readable_room1_slash_Other_10_gml_436_0 = 892,
+ obj_readable_room1_slash_Other_10_gml_446_0 = 893,
+ obj_readable_room1_slash_Other_10_gml_447_0 = 894,
+ obj_readable_room1_slash_Other_10_gml_452_0 = 895,
+ obj_readable_room1_slash_Other_10_gml_457_0 = 896,
+ obj_readable_room1_slash_Other_10_gml_458_0 = 897,
+ obj_readable_room1_slash_Other_10_gml_45_0 = 898,
+ obj_readable_room1_slash_Other_10_gml_465_0 = 899,
+ obj_readable_room1_slash_Other_10_gml_476_0 = 900,
+ obj_readable_room1_slash_Other_10_gml_481_0 = 901,
+ obj_readable_room1_slash_Other_10_gml_482_0 = 902,
+ obj_readable_room1_slash_Other_10_gml_483_0 = 903,
+ obj_readable_room1_slash_Other_10_gml_486_0 = 904,
+ obj_readable_room1_slash_Other_10_gml_493_0 = 905,
+ obj_readable_room1_slash_Other_10_gml_494_0 = 906,
+ obj_readable_room1_slash_Other_10_gml_495_0 = 907,
+ obj_readable_room1_slash_Other_10_gml_496_0 = 908,
+ obj_readable_room1_slash_Other_10_gml_499_0 = 909,
+ obj_readable_room1_slash_Other_10_gml_504_0 = 910,
+ obj_readable_room1_slash_Other_10_gml_505_0 = 911,
+ obj_readable_room1_slash_Other_10_gml_506_0 = 912,
+ obj_readable_room1_slash_Other_10_gml_50_0 = 913,
+ obj_readable_room1_slash_Other_10_gml_510_0 = 914,
+ obj_readable_room1_slash_Other_10_gml_511_0 = 915,
+ obj_readable_room1_slash_Other_10_gml_512_0 = 916,
+ obj_readable_room1_slash_Other_10_gml_519_0 = 917,
+ obj_readable_room1_slash_Other_10_gml_530_0 = 918,
+ obj_readable_room1_slash_Other_10_gml_531_0 = 919,
+ obj_readable_room1_slash_Other_10_gml_540_0 = 920,
+ obj_readable_room1_slash_Other_10_gml_541_0 = 921,
+ obj_readable_room1_slash_Other_10_gml_544_0 = 922,
+ obj_readable_room1_slash_Other_10_gml_545_0 = 923,
+ obj_readable_room1_slash_Other_10_gml_547_0 = 924,
+ obj_readable_room1_slash_Other_10_gml_548_0 = 925,
+ obj_readable_room1_slash_Other_10_gml_559_0 = 926,
+ obj_readable_room1_slash_Other_10_gml_55_0 = 927,
+ obj_readable_room1_slash_Other_10_gml_564_0 = 928,
+ obj_readable_room1_slash_Other_10_gml_565_0 = 929,
+ obj_readable_room1_slash_Other_10_gml_571_0 = 930,
+ obj_readable_room1_slash_Other_10_gml_575_0 = 931,
+ obj_readable_room1_slash_Other_10_gml_591_0 = 932,
+ obj_readable_room1_slash_Other_10_gml_593_0 = 933,
+ obj_readable_room1_slash_Other_10_gml_598_0 = 934,
+ obj_readable_room1_slash_Other_10_gml_599_0 = 935,
+ obj_readable_room1_slash_Other_10_gml_602_0 = 936,
+ obj_readable_room1_slash_Other_10_gml_608_0 = 937,
+ obj_readable_room1_slash_Other_10_gml_609_0 = 938,
+ obj_readable_room1_slash_Other_10_gml_610_0 = 939,
+ obj_readable_room1_slash_Other_10_gml_613_0 = 940,
+ obj_readable_room1_slash_Other_10_gml_626_0 = 941,
+ obj_readable_room1_slash_Other_10_gml_627_0 = 942,
+ obj_readable_room1_slash_Other_10_gml_628_0 = 943,
+ obj_readable_room1_slash_Other_10_gml_636_0 = 944,
+ obj_readable_room1_slash_Other_10_gml_637_0 = 945,
+ obj_readable_room1_slash_Other_10_gml_647_0 = 946,
+ obj_readable_room1_slash_Other_10_gml_648_0 = 947,
+ obj_readable_room1_slash_Other_10_gml_654_0 = 948,
+ obj_readable_room1_slash_Other_10_gml_656_0 = 949,
+ obj_readable_room1_slash_Other_10_gml_658_0 = 950,
+ obj_readable_room1_slash_Other_10_gml_666_0 = 951,
+ obj_readable_room1_slash_Other_10_gml_673_0 = 952,
+ obj_readable_room1_slash_Other_10_gml_675_0 = 953,
+ obj_readable_room1_slash_Other_10_gml_682_0 = 954,
+ obj_readable_room1_slash_Other_10_gml_695_0 = 955,
+ obj_readable_room1_slash_Other_10_gml_698_0 = 956,
+ obj_readable_room1_slash_Other_10_gml_71_0 = 957,
+ obj_readable_room1_slash_Other_10_gml_721_0 = 958,
+ obj_readable_room1_slash_Other_10_gml_726_0 = 959,
+ obj_readable_room1_slash_Other_10_gml_727_0 = 960,
+ obj_readable_room1_slash_Other_10_gml_730_0 = 961,
+ obj_readable_room1_slash_Other_10_gml_731_0 = 962,
+ obj_readable_room1_slash_Other_10_gml_738_0 = 963,
+ obj_readable_room1_slash_Other_10_gml_739_0 = 964,
+ obj_readable_room1_slash_Other_10_gml_746_0 = 965,
+ obj_readable_room1_slash_Other_10_gml_749_0 = 966,
+ obj_readable_room1_slash_Other_10_gml_755_0 = 967,
+ obj_readable_room1_slash_Other_10_gml_758_0 = 968,
+ obj_readable_room1_slash_Other_10_gml_766_0 = 969,
+ obj_readable_room1_slash_Other_10_gml_767_0 = 970,
+ obj_readable_room1_slash_Other_10_gml_768_0 = 971,
+ obj_readable_room1_slash_Other_10_gml_772_0 = 972,
+ obj_readable_room1_slash_Other_10_gml_773_0 = 973,
+ obj_readable_room1_slash_Other_10_gml_774_0 = 974,
+ obj_readable_room1_slash_Other_10_gml_775_0 = 975,
+ obj_readable_room1_slash_Other_10_gml_782_0 = 976,
+ obj_readable_room1_slash_Other_10_gml_783_0 = 977,
+ obj_readable_room1_slash_Other_10_gml_784_0 = 978,
+ obj_readable_room1_slash_Other_10_gml_788_0 = 979,
+ obj_readable_room1_slash_Other_10_gml_789_0 = 980,
+ obj_readable_room1_slash_Other_10_gml_796_0 = 981,
+ obj_readable_room1_slash_Other_10_gml_799_0 = 982,
+ obj_readable_room1_slash_Other_10_gml_79_0 = 983,
+ obj_readable_room1_slash_Other_10_gml_805_0 = 984,
+ obj_readable_room1_slash_Other_10_gml_806_0 = 985,
+ obj_readable_room1_slash_Other_10_gml_815_0 = 986,
+ obj_readable_room1_slash_Other_10_gml_816_0 = 987,
+ obj_readable_room1_slash_Other_10_gml_824_0 = 988,
+ obj_readable_room1_slash_Other_10_gml_829_0 = 989,
+ obj_readable_room1_slash_Other_10_gml_832_0 = 990,
+ obj_readable_room1_slash_Other_10_gml_833_0 = 991,
+ obj_readable_room1_slash_Other_10_gml_838_0 = 992,
+ obj_readable_room1_slash_Other_10_gml_83_0 = 993,
+ obj_readable_room1_slash_Other_10_gml_849_0 = 994,
+ obj_readable_room1_slash_Other_10_gml_853_0 = 995,
+ obj_readable_room1_slash_Other_10_gml_862_0 = 996,
+ obj_readable_room1_slash_Other_10_gml_869_0 = 997,
+ obj_readable_room1_slash_Other_10_gml_870_0 = 998,
+ obj_readable_room1_slash_Other_10_gml_874_0 = 999,
+ obj_readable_room1_slash_Other_10_gml_878_0 = 1000,
+ obj_readable_room1_slash_Other_10_gml_87_0 = 1001,
+ obj_readable_room1_slash_Other_10_gml_898_0 = 1002,
+ obj_readable_room1_slash_Other_10_gml_899_0 = 1003,
+ obj_readable_room1_slash_Other_10_gml_902_0 = 1004,
+ obj_readable_room1_slash_Other_10_gml_908_0 = 1005,
+ obj_readable_room1_slash_Other_10_gml_909_0 = 1006,
+ obj_readable_room1_slash_Other_10_gml_911_0 = 1007,
+ obj_readable_room1_slash_Other_10_gml_912_0 = 1008,
+ obj_readable_room1_slash_Other_10_gml_914_0 = 1009,
+ obj_readable_room1_slash_Other_10_gml_916_0 = 1010,
+ obj_readable_room1_slash_Other_10_gml_917_0 = 1011,
+ obj_readable_room1_slash_Other_10_gml_91_0 = 1012,
+ obj_readable_room1_slash_Other_10_gml_920_0 = 1013,
+ obj_readable_room1_slash_Other_10_gml_922_0 = 1014,
+ obj_readable_room1_slash_Other_10_gml_932_0 = 1015,
+ obj_readable_room1_slash_Other_10_gml_934_0 = 1016,
+ obj_readable_room1_slash_Other_10_gml_935_0 = 1017,
+ obj_readable_room1_slash_Other_10_gml_936_0 = 1018,
+ obj_readable_room1_slash_Other_10_gml_937_0 = 1019,
+ obj_readable_room1_slash_Other_10_gml_940_0 = 1020,
+ obj_readable_room1_slash_Other_10_gml_952_0 = 1021,
+ obj_readable_room1_slash_Other_10_gml_953_0 = 1022,
+ obj_readable_room1_slash_Other_10_gml_957_0 = 1023,
+ obj_readable_room1_slash_Other_10_gml_959_0 = 1024,
+ obj_readable_room1_slash_Other_10_gml_969_0 = 1025,
+ obj_readable_room1_slash_Other_10_gml_96_0 = 1026,
+ obj_readable_room1_slash_Other_10_gml_971_0 = 1027,
+ obj_readable_room1_slash_Other_10_gml_975_0 = 1028,
+ obj_readable_room1_slash_Other_10_gml_976_0 = 1029,
+ obj_readable_room1_slash_Other_10_gml_97_0 = 1030,
+ obj_readable_room1_slash_Other_10_gml_982_0 = 1031,
+ obj_readable_room1_slash_Other_10_gml_984_0 = 1032,
+ obj_readable_room1_slash_Other_10_gml_985_0 = 1033,
+ obj_readable_room1_slash_Other_10_gml_986_0 = 1034,
+ obj_readable_room1_slash_Other_10_gml_989_0 = 1035,
+ obj_readable_room1_slash_Other_10_gml_98_0 = 1036,
+ obj_readable_room1_slash_Other_10_gml_991_0 = 1037,
+ obj_readable_room1_slash_Other_10_gml_992_0 = 1038,
+ obj_readable_room1_slash_Other_10_gml_999_0 = 1039,
+ obj_readable_room1_slash_Other_10_gml_99_0 = 1040,
+ obj_savepoint_slash_Other_10_gml_17_0 = 1041,
+ obj_savepoint_slash_Other_10_gml_18_0 = 1042,
+ obj_savepoint_slash_Other_10_gml_26_0 = 1043,
+ obj_savepoint_slash_Other_10_gml_27_0 = 1044,
+ obj_savepoint_slash_Other_10_gml_28_0 = 1045,
+ obj_savepoint_slash_Other_10_gml_33_0 = 1046,
+ obj_savepoint_slash_Other_10_gml_34_0 = 1047,
+ obj_savepoint_slash_Other_10_gml_39_0 = 1048,
+ obj_savepoint_slash_Other_10_gml_40_0 = 1049,
+ obj_savepoint_slash_Other_10_gml_41_0 = 1050,
+ obj_savepoint_slash_Other_10_gml_51_0 = 1051,
+ obj_savepoint_slash_Other_10_gml_52_0 = 1052,
+ obj_savepoint_slash_Other_10_gml_53_0 = 1053,
+ obj_savepoint_slash_Other_10_gml_57_0 = 1054,
+ obj_savepoint_slash_Other_10_gml_58_0 = 1055,
+ obj_savepoint_slash_Other_10_gml_66_0 = 1056,
+ obj_savepoint_slash_Other_10_gml_67_0 = 1057,
+ obj_savepoint_slash_Other_10_gml_71_0 = 1058,
+ obj_savepoint_slash_Other_10_gml_72_0 = 1059,
+ obj_savepoint_slash_Other_10_gml_80_0 = 1060,
+ obj_savepoint_slash_Other_10_gml_81_0 = 1061,
+ obj_savepoint_slash_Other_10_gml_84_0 = 1062,
+ obj_savepoint_slash_Other_10_gml_85_0 = 1063,
+ scr_armorinfo_slash_scr_armorinfo_gml_108_0 = 1064,
+ scr_armorinfo_slash_scr_armorinfo_gml_109_0 = 1065,
+ scr_armorinfo_slash_scr_armorinfo_gml_128_0 = 1066,
+ scr_armorinfo_slash_scr_armorinfo_gml_129_0 = 1067,
+ scr_armorinfo_slash_scr_armorinfo_gml_148_0 = 1068,
+ scr_armorinfo_slash_scr_armorinfo_gml_149_0 = 1069,
+ scr_armorinfo_slash_scr_armorinfo_gml_26_0 = 1070,
+ scr_armorinfo_slash_scr_armorinfo_gml_27_0 = 1071,
+ scr_armorinfo_slash_scr_armorinfo_gml_46_0 = 1072,
+ scr_armorinfo_slash_scr_armorinfo_gml_47_0 = 1073,
+ scr_armorinfo_slash_scr_armorinfo_gml_66_0 = 1074,
+ scr_armorinfo_slash_scr_armorinfo_gml_67_0 = 1075,
+ scr_armorinfo_slash_scr_armorinfo_gml_87_0 = 1076,
+ scr_armorinfo_slash_scr_armorinfo_gml_88_0 = 1077,
+ scr_encountersetup_slash_scr_encountersetup_gml_100_0 = 1078,
+ scr_encountersetup_slash_scr_encountersetup_gml_116_0 = 1079,
+ scr_encountersetup_slash_scr_encountersetup_gml_128_0 = 1080,
+ scr_encountersetup_slash_scr_encountersetup_gml_139_0 = 1081,
+ scr_encountersetup_slash_scr_encountersetup_gml_158_0 = 1082,
+ scr_encountersetup_slash_scr_encountersetup_gml_172_0 = 1083,
+ scr_encountersetup_slash_scr_encountersetup_gml_185_0 = 1084,
+ scr_encountersetup_slash_scr_encountersetup_gml_206_0 = 1085,
+ scr_encountersetup_slash_scr_encountersetup_gml_223_0 = 1086,
+ scr_encountersetup_slash_scr_encountersetup_gml_234_0 = 1087,
+ scr_encountersetup_slash_scr_encountersetup_gml_250_0 = 1088,
+ scr_encountersetup_slash_scr_encountersetup_gml_261_0 = 1089,
+ scr_encountersetup_slash_scr_encountersetup_gml_277_0 = 1090,
+ scr_encountersetup_slash_scr_encountersetup_gml_292_0 = 1091,
+ scr_encountersetup_slash_scr_encountersetup_gml_305_0 = 1092,
+ scr_encountersetup_slash_scr_encountersetup_gml_324_0 = 1093,
+ scr_encountersetup_slash_scr_encountersetup_gml_343_0 = 1094,
+ scr_encountersetup_slash_scr_encountersetup_gml_358_0 = 1095,
+ scr_encountersetup_slash_scr_encountersetup_gml_384_0 = 1096,
+ scr_encountersetup_slash_scr_encountersetup_gml_397_0 = 1097,
+ scr_encountersetup_slash_scr_encountersetup_gml_414_0 = 1098,
+ scr_encountersetup_slash_scr_encountersetup_gml_430_0 = 1099,
+ scr_encountersetup_slash_scr_encountersetup_gml_449_0 = 1100,
+ scr_encountersetup_slash_scr_encountersetup_gml_463_0 = 1101,
+ scr_encountersetup_slash_scr_encountersetup_gml_484_0 = 1102,
+ scr_encountersetup_slash_scr_encountersetup_gml_505_0 = 1103,
+ scr_encountersetup_slash_scr_encountersetup_gml_517_0 = 1104,
+ scr_encountersetup_slash_scr_encountersetup_gml_84_0 = 1105,
+ scr_iteminfo_slash_scr_iteminfo_gml_105_0 = 1106,
+ scr_iteminfo_slash_scr_iteminfo_gml_106_0 = 1107,
+ scr_iteminfo_slash_scr_iteminfo_gml_112_0 = 1108,
+ scr_iteminfo_slash_scr_iteminfo_gml_113_0 = 1109,
+ scr_iteminfo_slash_scr_iteminfo_gml_14_0 = 1110,
+ scr_iteminfo_slash_scr_iteminfo_gml_15_0 = 1111,
+ scr_iteminfo_slash_scr_iteminfo_gml_21_0 = 1112,
+ scr_iteminfo_slash_scr_iteminfo_gml_22_0 = 1113,
+ scr_iteminfo_slash_scr_iteminfo_gml_28_0 = 1114,
+ scr_iteminfo_slash_scr_iteminfo_gml_29_0 = 1115,
+ scr_iteminfo_slash_scr_iteminfo_gml_35_0 = 1116,
+ scr_iteminfo_slash_scr_iteminfo_gml_36_0 = 1117,
+ scr_iteminfo_slash_scr_iteminfo_gml_42_0 = 1118,
+ scr_iteminfo_slash_scr_iteminfo_gml_43_0 = 1119,
+ scr_iteminfo_slash_scr_iteminfo_gml_49_0 = 1120,
+ scr_iteminfo_slash_scr_iteminfo_gml_50_0 = 1121,
+ scr_iteminfo_slash_scr_iteminfo_gml_56_0 = 1122,
+ scr_iteminfo_slash_scr_iteminfo_gml_57_0 = 1123,
+ scr_iteminfo_slash_scr_iteminfo_gml_63_0 = 1124,
+ scr_iteminfo_slash_scr_iteminfo_gml_64_0 = 1125,
+ scr_iteminfo_slash_scr_iteminfo_gml_70_0 = 1126,
+ scr_iteminfo_slash_scr_iteminfo_gml_71_0 = 1127,
+ scr_iteminfo_slash_scr_iteminfo_gml_77_0 = 1128,
+ scr_iteminfo_slash_scr_iteminfo_gml_78_0 = 1129,
+ scr_iteminfo_slash_scr_iteminfo_gml_84_0 = 1130,
+ scr_iteminfo_slash_scr_iteminfo_gml_85_0 = 1131,
+ scr_iteminfo_slash_scr_iteminfo_gml_91_0 = 1132,
+ scr_iteminfo_slash_scr_iteminfo_gml_92_0 = 1133,
+ scr_iteminfo_slash_scr_iteminfo_gml_98_0 = 1134,
+ scr_iteminfo_slash_scr_iteminfo_gml_99_0 = 1135,
+ scr_monstersetup_slash_scr_monstersetup_gml_103_0 = 1136,
+ scr_monstersetup_slash_scr_monstersetup_gml_115_0 = 1137,
+ scr_monstersetup_slash_scr_monstersetup_gml_117_0 = 1138,
+ scr_monstersetup_slash_scr_monstersetup_gml_119_0 = 1139,
+ scr_monstersetup_slash_scr_monstersetup_gml_123_0 = 1140,
+ scr_monstersetup_slash_scr_monstersetup_gml_132_0 = 1141,
+ scr_monstersetup_slash_scr_monstersetup_gml_144_0 = 1142,
+ scr_monstersetup_slash_scr_monstersetup_gml_146_0 = 1143,
+ scr_monstersetup_slash_scr_monstersetup_gml_148_0 = 1144,
+ scr_monstersetup_slash_scr_monstersetup_gml_160_0 = 1145,
+ scr_monstersetup_slash_scr_monstersetup_gml_16_0 = 1146,
+ scr_monstersetup_slash_scr_monstersetup_gml_170_0 = 1147,
+ scr_monstersetup_slash_scr_monstersetup_gml_184_0 = 1148,
+ scr_monstersetup_slash_scr_monstersetup_gml_18_0 = 1149,
+ scr_monstersetup_slash_scr_monstersetup_gml_208_0 = 1150,
+ scr_monstersetup_slash_scr_monstersetup_gml_20_0 = 1151,
+ scr_monstersetup_slash_scr_monstersetup_gml_210_0 = 1152,
+ scr_monstersetup_slash_scr_monstersetup_gml_212_0 = 1153,
+ scr_monstersetup_slash_scr_monstersetup_gml_218_0 = 1154,
+ scr_monstersetup_slash_scr_monstersetup_gml_226_0 = 1155,
+ scr_monstersetup_slash_scr_monstersetup_gml_22_0 = 1156,
+ scr_monstersetup_slash_scr_monstersetup_gml_238_0 = 1157,
+ scr_monstersetup_slash_scr_monstersetup_gml_240_0 = 1158,
+ scr_monstersetup_slash_scr_monstersetup_gml_242_0 = 1159,
+ scr_monstersetup_slash_scr_monstersetup_gml_24_0 = 1160,
+ scr_monstersetup_slash_scr_monstersetup_gml_251_0 = 1161,
+ scr_monstersetup_slash_scr_monstersetup_gml_263_0 = 1162,
+ scr_monstersetup_slash_scr_monstersetup_gml_26_0 = 1163,
+ scr_monstersetup_slash_scr_monstersetup_gml_271_0 = 1164,
+ scr_monstersetup_slash_scr_monstersetup_gml_274_0 = 1165,
+ scr_monstersetup_slash_scr_monstersetup_gml_27_0 = 1166,
+ scr_monstersetup_slash_scr_monstersetup_gml_282_0 = 1167,
+ scr_monstersetup_slash_scr_monstersetup_gml_294_0 = 1168,
+ scr_monstersetup_slash_scr_monstersetup_gml_296_0 = 1169,
+ scr_monstersetup_slash_scr_monstersetup_gml_298_0 = 1170,
+ scr_monstersetup_slash_scr_monstersetup_gml_307_0 = 1171,
+ scr_monstersetup_slash_scr_monstersetup_gml_315_0 = 1172,
+ scr_monstersetup_slash_scr_monstersetup_gml_327_0 = 1173,
+ scr_monstersetup_slash_scr_monstersetup_gml_329_0 = 1174,
+ scr_monstersetup_slash_scr_monstersetup_gml_32_0 = 1175,
+ scr_monstersetup_slash_scr_monstersetup_gml_331_0 = 1176,
+ scr_monstersetup_slash_scr_monstersetup_gml_337_0 = 1177,
+ scr_monstersetup_slash_scr_monstersetup_gml_346_0 = 1178,
+ scr_monstersetup_slash_scr_monstersetup_gml_358_0 = 1179,
+ scr_monstersetup_slash_scr_monstersetup_gml_365_0 = 1180,
+ scr_monstersetup_slash_scr_monstersetup_gml_377_0 = 1181,
+ scr_monstersetup_slash_scr_monstersetup_gml_379_0 = 1182,
+ scr_monstersetup_slash_scr_monstersetup_gml_381_0 = 1183,
+ scr_monstersetup_slash_scr_monstersetup_gml_386_0 = 1184,
+ scr_monstersetup_slash_scr_monstersetup_gml_394_0 = 1185,
+ scr_monstersetup_slash_scr_monstersetup_gml_406_0 = 1186,
+ scr_monstersetup_slash_scr_monstersetup_gml_408_0 = 1187,
+ scr_monstersetup_slash_scr_monstersetup_gml_412_0 = 1188,
+ scr_monstersetup_slash_scr_monstersetup_gml_420_0 = 1189,
+ scr_monstersetup_slash_scr_monstersetup_gml_432_0 = 1190,
+ scr_monstersetup_slash_scr_monstersetup_gml_434_0 = 1191,
+ scr_monstersetup_slash_scr_monstersetup_gml_440_0 = 1192,
+ scr_monstersetup_slash_scr_monstersetup_gml_449_0 = 1193,
+ scr_monstersetup_slash_scr_monstersetup_gml_44_0 = 1194,
+ scr_monstersetup_slash_scr_monstersetup_gml_463_0 = 1195,
+ scr_monstersetup_slash_scr_monstersetup_gml_465_0 = 1196,
+ scr_monstersetup_slash_scr_monstersetup_gml_467_0 = 1197,
+ scr_monstersetup_slash_scr_monstersetup_gml_470_0 = 1198,
+ scr_monstersetup_slash_scr_monstersetup_gml_473_0 = 1199,
+ scr_monstersetup_slash_scr_monstersetup_gml_475_0 = 1200,
+ scr_monstersetup_slash_scr_monstersetup_gml_47_0 = 1201,
+ scr_monstersetup_slash_scr_monstersetup_gml_484_0 = 1202,
+ scr_monstersetup_slash_scr_monstersetup_gml_496_0 = 1203,
+ scr_monstersetup_slash_scr_monstersetup_gml_498_0 = 1204,
+ scr_monstersetup_slash_scr_monstersetup_gml_4_0 = 1205,
+ scr_monstersetup_slash_scr_monstersetup_gml_501_0 = 1206,
+ scr_monstersetup_slash_scr_monstersetup_gml_504_0 = 1207,
+ scr_monstersetup_slash_scr_monstersetup_gml_506_0 = 1208,
+ scr_monstersetup_slash_scr_monstersetup_gml_50_0 = 1209,
+ scr_monstersetup_slash_scr_monstersetup_gml_512_0 = 1210,
+ scr_monstersetup_slash_scr_monstersetup_gml_51_0 = 1211,
+ scr_monstersetup_slash_scr_monstersetup_gml_524_0 = 1212,
+ scr_monstersetup_slash_scr_monstersetup_gml_527_0 = 1213,
+ scr_monstersetup_slash_scr_monstersetup_gml_530_0 = 1214,
+ scr_monstersetup_slash_scr_monstersetup_gml_538_0 = 1215,
+ scr_monstersetup_slash_scr_monstersetup_gml_550_0 = 1216,
+ scr_monstersetup_slash_scr_monstersetup_gml_553_0 = 1217,
+ scr_monstersetup_slash_scr_monstersetup_gml_556_0 = 1218,
+ scr_monstersetup_slash_scr_monstersetup_gml_562_0 = 1219,
+ scr_monstersetup_slash_scr_monstersetup_gml_574_0 = 1220,
+ scr_monstersetup_slash_scr_monstersetup_gml_579_0 = 1221,
+ scr_monstersetup_slash_scr_monstersetup_gml_580_0 = 1222,
+ scr_monstersetup_slash_scr_monstersetup_gml_585_0 = 1223,
+ scr_monstersetup_slash_scr_monstersetup_gml_586_0 = 1224,
+ scr_monstersetup_slash_scr_monstersetup_gml_594_0 = 1225,
+ scr_monstersetup_slash_scr_monstersetup_gml_59_0 = 1226,
+ scr_monstersetup_slash_scr_monstersetup_gml_607_0 = 1227,
+ scr_monstersetup_slash_scr_monstersetup_gml_609_0 = 1228,
+ scr_monstersetup_slash_scr_monstersetup_gml_611_0 = 1229,
+ scr_monstersetup_slash_scr_monstersetup_gml_619_0 = 1230,
+ scr_monstersetup_slash_scr_monstersetup_gml_631_0 = 1231,
+ scr_monstersetup_slash_scr_monstersetup_gml_633_0 = 1232,
+ scr_monstersetup_slash_scr_monstersetup_gml_635_0 = 1233,
+ scr_monstersetup_slash_scr_monstersetup_gml_643_0 = 1234,
+ scr_monstersetup_slash_scr_monstersetup_gml_655_0 = 1235,
+ scr_monstersetup_slash_scr_monstersetup_gml_657_0 = 1236,
+ scr_monstersetup_slash_scr_monstersetup_gml_659_0 = 1237,
+ scr_monstersetup_slash_scr_monstersetup_gml_665_0 = 1238,
+ scr_monstersetup_slash_scr_monstersetup_gml_677_0 = 1239,
+ scr_monstersetup_slash_scr_monstersetup_gml_704_0 = 1240,
+ scr_monstersetup_slash_scr_monstersetup_gml_705_0 = 1241,
+ scr_monstersetup_slash_scr_monstersetup_gml_714_0 = 1242,
+ scr_monstersetup_slash_scr_monstersetup_gml_715_0 = 1243,
+ scr_monstersetup_slash_scr_monstersetup_gml_71_0 = 1244,
+ scr_monstersetup_slash_scr_monstersetup_gml_724_0 = 1245,
+ scr_monstersetup_slash_scr_monstersetup_gml_725_0 = 1246,
+ scr_monstersetup_slash_scr_monstersetup_gml_73_0 = 1247,
+ scr_monstersetup_slash_scr_monstersetup_gml_75_0 = 1248,
+ scr_monstersetup_slash_scr_monstersetup_gml_78_0 = 1249,
+ scr_monstersetup_slash_scr_monstersetup_gml_83_0 = 1250,
+ scr_monstersetup_slash_scr_monstersetup_gml_95_0 = 1251,
+ scr_monstersetup_slash_scr_monstersetup_gml_97_0 = 1252,
+ scr_monstersetup_slash_scr_monstersetup_gml_98_0 = 1253,
+ scr_roomname_slash_scr_roomname_gml_10_0 = 1254,
+ scr_roomname_slash_scr_roomname_gml_11_0 = 1255,
+ scr_roomname_slash_scr_roomname_gml_12_0 = 1256,
+ scr_roomname_slash_scr_roomname_gml_13_0 = 1257,
+ scr_roomname_slash_scr_roomname_gml_14_0 = 1258,
+ scr_roomname_slash_scr_roomname_gml_15_0 = 1259,
+ scr_roomname_slash_scr_roomname_gml_16_0 = 1260,
+ scr_roomname_slash_scr_roomname_gml_17_0 = 1261,
+ scr_roomname_slash_scr_roomname_gml_18_0 = 1262,
+ scr_roomname_slash_scr_roomname_gml_19_0 = 1263,
+ scr_roomname_slash_scr_roomname_gml_20_0 = 1264,
+ scr_roomname_slash_scr_roomname_gml_3_0 = 1265,
+ scr_roomname_slash_scr_roomname_gml_4_0 = 1266,
+ scr_roomname_slash_scr_roomname_gml_5_0 = 1267,
+ scr_roomname_slash_scr_roomname_gml_6_0 = 1268,
+ scr_roomname_slash_scr_roomname_gml_7_0 = 1269,
+ scr_roomname_slash_scr_roomname_gml_8_0 = 1270,
+ scr_roomname_slash_scr_roomname_gml_9_0 = 1271,
+ scr_spellinfo_slash_scr_spellinfo_gml_18_0 = 1272,
+ scr_spellinfo_slash_scr_spellinfo_gml_21_0 = 1273,
+ scr_spellinfo_slash_scr_spellinfo_gml_22_0 = 1274,
+ scr_spellinfo_slash_scr_spellinfo_gml_23_0 = 1275,
+ scr_spellinfo_slash_scr_spellinfo_gml_31_0 = 1276,
+ scr_spellinfo_slash_scr_spellinfo_gml_32_0 = 1277,
+ scr_spellinfo_slash_scr_spellinfo_gml_33_0 = 1278,
+ scr_spellinfo_slash_scr_spellinfo_gml_42_0 = 1279,
+ scr_spellinfo_slash_scr_spellinfo_gml_43_0 = 1280,
+ scr_spellinfo_slash_scr_spellinfo_gml_44_0 = 1281,
+ scr_spellinfo_slash_scr_spellinfo_gml_52_0 = 1282,
+ scr_spellinfo_slash_scr_spellinfo_gml_53_0 = 1283,
+ scr_spellinfo_slash_scr_spellinfo_gml_54_0 = 1284,
+ scr_spellinfo_slash_scr_spellinfo_gml_64_0 = 1285,
+ scr_spellinfo_slash_scr_spellinfo_gml_65_0 = 1286,
+ scr_spellinfo_slash_scr_spellinfo_gml_66_0 = 1287,
+ scr_spellinfo_slash_scr_spellinfo_gml_75_0 = 1288,
+ scr_spellinfo_slash_scr_spellinfo_gml_76_0 = 1289,
+ scr_spellinfo_slash_scr_spellinfo_gml_77_0 = 1290,
+ scr_spellinfo_slash_scr_spellinfo_gml_86_0 = 1291,
+ scr_spellinfo_slash_scr_spellinfo_gml_87_0 = 1292,
+ scr_spellinfo_slash_scr_spellinfo_gml_88_0 = 1293,
+ scr_text_slash_scr_text_gml_1000_0 = 1294,
+ scr_text_slash_scr_text_gml_1001_0 = 1295,
+ scr_text_slash_scr_text_gml_1002_0 = 1296,
+ scr_text_slash_scr_text_gml_1003_0 = 1297,
+ scr_text_slash_scr_text_gml_1004_0 = 1298,
+ scr_text_slash_scr_text_gml_1005_0 = 1299,
+ scr_text_slash_scr_text_gml_1006_0 = 1300,
+ scr_text_slash_scr_text_gml_1010_0 = 1301,
+ scr_text_slash_scr_text_gml_1011_0 = 1302,
+ scr_text_slash_scr_text_gml_1012_0 = 1303,
+ scr_text_slash_scr_text_gml_1017_0 = 1304,
+ scr_text_slash_scr_text_gml_1018_0 = 1305,
+ scr_text_slash_scr_text_gml_1019_0 = 1306,
+ scr_text_slash_scr_text_gml_1020_0 = 1307,
+ scr_text_slash_scr_text_gml_1021_0 = 1308,
+ scr_text_slash_scr_text_gml_1022_0 = 1309,
+ scr_text_slash_scr_text_gml_1023_0 = 1310,
+ scr_text_slash_scr_text_gml_1029_0 = 1311,
+ scr_text_slash_scr_text_gml_1030_0 = 1312,
+ scr_text_slash_scr_text_gml_1031_0 = 1313,
+ scr_text_slash_scr_text_gml_1032_0 = 1314,
+ scr_text_slash_scr_text_gml_1033_0 = 1315,
+ scr_text_slash_scr_text_gml_1034_0 = 1316,
+ scr_text_slash_scr_text_gml_1039_0 = 1317,
+ scr_text_slash_scr_text_gml_103_0 = 1318,
+ scr_text_slash_scr_text_gml_1040_0 = 1319,
+ scr_text_slash_scr_text_gml_1041_0 = 1320,
+ scr_text_slash_scr_text_gml_1042_0 = 1321,
+ scr_text_slash_scr_text_gml_1043_0 = 1322,
+ scr_text_slash_scr_text_gml_1044_0 = 1323,
+ scr_text_slash_scr_text_gml_1045_0 = 1324,
+ scr_text_slash_scr_text_gml_1046_0 = 1325,
+ scr_text_slash_scr_text_gml_1047_0 = 1326,
+ scr_text_slash_scr_text_gml_1052_0 = 1327,
+ scr_text_slash_scr_text_gml_1053_0 = 1328,
+ scr_text_slash_scr_text_gml_1054_0 = 1329,
+ scr_text_slash_scr_text_gml_1055_0 = 1330,
+ scr_text_slash_scr_text_gml_1056_0 = 1331,
+ scr_text_slash_scr_text_gml_1057_0 = 1332,
+ scr_text_slash_scr_text_gml_1058_0 = 1333,
+ scr_text_slash_scr_text_gml_1059_0 = 1334,
+ scr_text_slash_scr_text_gml_1063_0 = 1335,
+ scr_text_slash_scr_text_gml_1064_0 = 1336,
+ scr_text_slash_scr_text_gml_1069_0 = 1337,
+ scr_text_slash_scr_text_gml_1070_0 = 1338,
+ scr_text_slash_scr_text_gml_1073_0 = 1339,
+ scr_text_slash_scr_text_gml_1074_0 = 1340,
+ scr_text_slash_scr_text_gml_1075_0 = 1341,
+ scr_text_slash_scr_text_gml_1076_0 = 1342,
+ scr_text_slash_scr_text_gml_1080_0 = 1343,
+ scr_text_slash_scr_text_gml_1081_0 = 1344,
+ scr_text_slash_scr_text_gml_1091_0 = 1345,
+ scr_text_slash_scr_text_gml_1092_0 = 1346,
+ scr_text_slash_scr_text_gml_1096_0 = 1347,
+ scr_text_slash_scr_text_gml_1097_0 = 1348,
+ scr_text_slash_scr_text_gml_1098_0 = 1349,
+ scr_text_slash_scr_text_gml_1099_0 = 1350,
+ scr_text_slash_scr_text_gml_1100_0 = 1351,
+ scr_text_slash_scr_text_gml_1101_0 = 1352,
+ scr_text_slash_scr_text_gml_1102_0 = 1353,
+ scr_text_slash_scr_text_gml_1110_0 = 1354,
+ scr_text_slash_scr_text_gml_1111_0 = 1355,
+ scr_text_slash_scr_text_gml_111_0 = 1356,
+ scr_text_slash_scr_text_gml_1120_0 = 1357,
+ scr_text_slash_scr_text_gml_1121_0 = 1358,
+ scr_text_slash_scr_text_gml_1131_0 = 1359,
+ scr_text_slash_scr_text_gml_1132_0 = 1360,
+ scr_text_slash_scr_text_gml_1136_0 = 1361,
+ scr_text_slash_scr_text_gml_1137_0 = 1362,
+ scr_text_slash_scr_text_gml_1138_0 = 1363,
+ scr_text_slash_scr_text_gml_1139_0 = 1364,
+ scr_text_slash_scr_text_gml_1140_0 = 1365,
+ scr_text_slash_scr_text_gml_1141_0 = 1366,
+ scr_text_slash_scr_text_gml_1142_0 = 1367,
+ scr_text_slash_scr_text_gml_1150_0 = 1368,
+ scr_text_slash_scr_text_gml_1151_0 = 1369,
+ scr_text_slash_scr_text_gml_1167_0 = 1370,
+ scr_text_slash_scr_text_gml_1168_0 = 1371,
+ scr_text_slash_scr_text_gml_1172_0 = 1372,
+ scr_text_slash_scr_text_gml_1173_0 = 1373,
+ scr_text_slash_scr_text_gml_1174_0 = 1374,
+ scr_text_slash_scr_text_gml_1175_0 = 1375,
+ scr_text_slash_scr_text_gml_1176_0 = 1376,
+ scr_text_slash_scr_text_gml_1177_0 = 1377,
+ scr_text_slash_scr_text_gml_1178_0 = 1378,
+ scr_text_slash_scr_text_gml_1187_0 = 1379,
+ scr_text_slash_scr_text_gml_1189_0 = 1380,
+ scr_text_slash_scr_text_gml_118_0 = 1381,
+ scr_text_slash_scr_text_gml_1191_0 = 1382,
+ scr_text_slash_scr_text_gml_1193_0 = 1383,
+ scr_text_slash_scr_text_gml_11_0 = 1384,
+ scr_text_slash_scr_text_gml_1202_0 = 1385,
+ scr_text_slash_scr_text_gml_1203_0 = 1386,
+ scr_text_slash_scr_text_gml_1204_0 = 1387,
+ scr_text_slash_scr_text_gml_1205_0 = 1388,
+ scr_text_slash_scr_text_gml_1206_0 = 1389,
+ scr_text_slash_scr_text_gml_1207_0 = 1390,
+ scr_text_slash_scr_text_gml_1211_0 = 1391,
+ scr_text_slash_scr_text_gml_1214_0 = 1392,
+ scr_text_slash_scr_text_gml_1215_0 = 1393,
+ scr_text_slash_scr_text_gml_1216_0 = 1394,
+ scr_text_slash_scr_text_gml_1218_0 = 1395,
+ scr_text_slash_scr_text_gml_1220_0 = 1396,
+ scr_text_slash_scr_text_gml_1224_0 = 1397,
+ scr_text_slash_scr_text_gml_1225_0 = 1398,
+ scr_text_slash_scr_text_gml_1227_0 = 1399,
+ scr_text_slash_scr_text_gml_1229_0 = 1400,
+ scr_text_slash_scr_text_gml_1233_0 = 1401,
+ scr_text_slash_scr_text_gml_1234_0 = 1402,
+ scr_text_slash_scr_text_gml_1235_0 = 1403,
+ scr_text_slash_scr_text_gml_1237_0 = 1404,
+ scr_text_slash_scr_text_gml_1239_0 = 1405,
+ scr_text_slash_scr_text_gml_1244_0 = 1406,
+ scr_text_slash_scr_text_gml_124_0 = 1407,
+ scr_text_slash_scr_text_gml_1251_0 = 1408,
+ scr_text_slash_scr_text_gml_1252_0 = 1409,
+ scr_text_slash_scr_text_gml_1253_0 = 1410,
+ scr_text_slash_scr_text_gml_1254_0 = 1411,
+ scr_text_slash_scr_text_gml_1255_0 = 1412,
+ scr_text_slash_scr_text_gml_1256_0 = 1413,
+ scr_text_slash_scr_text_gml_125_0 = 1414,
+ scr_text_slash_scr_text_gml_1260_0 = 1415,
+ scr_text_slash_scr_text_gml_1263_0 = 1416,
+ scr_text_slash_scr_text_gml_1265_0 = 1417,
+ scr_text_slash_scr_text_gml_1267_0 = 1418,
+ scr_text_slash_scr_text_gml_1272_0 = 1419,
+ scr_text_slash_scr_text_gml_1273_0 = 1420,
+ scr_text_slash_scr_text_gml_1275_0 = 1421,
+ scr_text_slash_scr_text_gml_1277_0 = 1422,
+ scr_text_slash_scr_text_gml_1281_0 = 1423,
+ scr_text_slash_scr_text_gml_1282_0 = 1424,
+ scr_text_slash_scr_text_gml_1284_0 = 1425,
+ scr_text_slash_scr_text_gml_1285_0 = 1426,
+ scr_text_slash_scr_text_gml_128_0 = 1427,
+ scr_text_slash_scr_text_gml_1290_0 = 1428,
+ scr_text_slash_scr_text_gml_1291_0 = 1429,
+ scr_text_slash_scr_text_gml_1292_0 = 1430,
+ scr_text_slash_scr_text_gml_1293_0 = 1431,
+ scr_text_slash_scr_text_gml_1294_0 = 1432,
+ scr_text_slash_scr_text_gml_1295_0 = 1433,
+ scr_text_slash_scr_text_gml_1299_0 = 1434,
+ scr_text_slash_scr_text_gml_129_0 = 1435,
+ scr_text_slash_scr_text_gml_12_0 = 1436,
+ scr_text_slash_scr_text_gml_1302_0 = 1437,
+ scr_text_slash_scr_text_gml_1304_0 = 1438,
+ scr_text_slash_scr_text_gml_1306_0 = 1439,
+ scr_text_slash_scr_text_gml_1308_0 = 1440,
+ scr_text_slash_scr_text_gml_130_0 = 1441,
+ scr_text_slash_scr_text_gml_1312_0 = 1442,
+ scr_text_slash_scr_text_gml_1313_0 = 1443,
+ scr_text_slash_scr_text_gml_1317_0 = 1444,
+ scr_text_slash_scr_text_gml_1318_0 = 1445,
+ scr_text_slash_scr_text_gml_131_0 = 1446,
+ scr_text_slash_scr_text_gml_1325_0 = 1447,
+ scr_text_slash_scr_text_gml_1326_0 = 1448,
+ scr_text_slash_scr_text_gml_1327_0 = 1449,
+ scr_text_slash_scr_text_gml_1329_0 = 1450,
+ scr_text_slash_scr_text_gml_132_0 = 1451,
+ scr_text_slash_scr_text_gml_1331_0 = 1452,
+ scr_text_slash_scr_text_gml_1335_0 = 1453,
+ scr_text_slash_scr_text_gml_1336_0 = 1454,
+ scr_text_slash_scr_text_gml_133_0 = 1455,
+ scr_text_slash_scr_text_gml_1341_0 = 1456,
+ scr_text_slash_scr_text_gml_1342_0 = 1457,
+ scr_text_slash_scr_text_gml_1348_0 = 1458,
+ scr_text_slash_scr_text_gml_134_0 = 1459,
+ scr_text_slash_scr_text_gml_1350_0 = 1460,
+ scr_text_slash_scr_text_gml_1352_0 = 1461,
+ scr_text_slash_scr_text_gml_1355_0 = 1462,
+ scr_text_slash_scr_text_gml_1356_0 = 1463,
+ scr_text_slash_scr_text_gml_1360_0 = 1464,
+ scr_text_slash_scr_text_gml_1361_0 = 1465,
+ scr_text_slash_scr_text_gml_1373_0 = 1466,
+ scr_text_slash_scr_text_gml_1374_0 = 1467,
+ scr_text_slash_scr_text_gml_1375_0 = 1468,
+ scr_text_slash_scr_text_gml_1376_0 = 1469,
+ scr_text_slash_scr_text_gml_1377_0 = 1470,
+ scr_text_slash_scr_text_gml_1378_0 = 1471,
+ scr_text_slash_scr_text_gml_1382_0 = 1472,
+ scr_text_slash_scr_text_gml_1385_0 = 1473,
+ scr_text_slash_scr_text_gml_1386_0 = 1474,
+ scr_text_slash_scr_text_gml_1387_0 = 1475,
+ scr_text_slash_scr_text_gml_1388_0 = 1476,
+ scr_text_slash_scr_text_gml_1390_0 = 1477,
+ scr_text_slash_scr_text_gml_1392_0 = 1478,
+ scr_text_slash_scr_text_gml_1397_0 = 1479,
+ scr_text_slash_scr_text_gml_1398_0 = 1480,
+ scr_text_slash_scr_text_gml_139_0 = 1481,
+ scr_text_slash_scr_text_gml_13_0 = 1482,
+ scr_text_slash_scr_text_gml_1400_0 = 1483,
+ scr_text_slash_scr_text_gml_1401_0 = 1484,
+ scr_text_slash_scr_text_gml_1402_0 = 1485,
+ scr_text_slash_scr_text_gml_1403_0 = 1486,
+ scr_text_slash_scr_text_gml_1405_0 = 1487,
+ scr_text_slash_scr_text_gml_1409_0 = 1488,
+ scr_text_slash_scr_text_gml_140_0 = 1489,
+ scr_text_slash_scr_text_gml_1410_0 = 1490,
+ scr_text_slash_scr_text_gml_1411_0 = 1491,
+ scr_text_slash_scr_text_gml_1412_0 = 1492,
+ scr_text_slash_scr_text_gml_1417_0 = 1493,
+ scr_text_slash_scr_text_gml_1418_0 = 1494,
+ scr_text_slash_scr_text_gml_1421_0 = 1495,
+ scr_text_slash_scr_text_gml_1422_0 = 1496,
+ scr_text_slash_scr_text_gml_1423_0 = 1497,
+ scr_text_slash_scr_text_gml_1426_0 = 1498,
+ scr_text_slash_scr_text_gml_1433_0 = 1499,
+ scr_text_slash_scr_text_gml_1434_0 = 1500,
+ scr_text_slash_scr_text_gml_1440_0 = 1501,
+ scr_text_slash_scr_text_gml_1441_0 = 1502,
+ scr_text_slash_scr_text_gml_1446_0 = 1503,
+ scr_text_slash_scr_text_gml_1451_0 = 1504,
+ scr_text_slash_scr_text_gml_1452_0 = 1505,
+ scr_text_slash_scr_text_gml_1453_0 = 1506,
+ scr_text_slash_scr_text_gml_1455_0 = 1507,
+ scr_text_slash_scr_text_gml_1457_0 = 1508,
+ scr_text_slash_scr_text_gml_1458_0 = 1509,
+ scr_text_slash_scr_text_gml_145_0 = 1510,
+ scr_text_slash_scr_text_gml_1460_0 = 1511,
+ scr_text_slash_scr_text_gml_1462_0 = 1512,
+ scr_text_slash_scr_text_gml_1464_0 = 1513,
+ scr_text_slash_scr_text_gml_1466_0 = 1514,
+ scr_text_slash_scr_text_gml_1468_0 = 1515,
+ scr_text_slash_scr_text_gml_1470_0 = 1516,
+ scr_text_slash_scr_text_gml_1472_0 = 1517,
+ scr_text_slash_scr_text_gml_1474_0 = 1518,
+ scr_text_slash_scr_text_gml_1475_0 = 1519,
+ scr_text_slash_scr_text_gml_1488_0 = 1520,
+ scr_text_slash_scr_text_gml_1489_0 = 1521,
+ scr_text_slash_scr_text_gml_1491_0 = 1522,
+ scr_text_slash_scr_text_gml_1492_0 = 1523,
+ scr_text_slash_scr_text_gml_1494_0 = 1524,
+ scr_text_slash_scr_text_gml_1495_0 = 1525,
+ scr_text_slash_scr_text_gml_1497_0 = 1526,
+ scr_text_slash_scr_text_gml_1499_0 = 1527,
+ scr_text_slash_scr_text_gml_149_0 = 1528,
+ scr_text_slash_scr_text_gml_1501_0 = 1529,
+ scr_text_slash_scr_text_gml_1507_0 = 1530,
+ scr_text_slash_scr_text_gml_1508_0 = 1531,
+ scr_text_slash_scr_text_gml_1509_0 = 1532,
+ scr_text_slash_scr_text_gml_150_0 = 1533,
+ scr_text_slash_scr_text_gml_1510_0 = 1534,
+ scr_text_slash_scr_text_gml_1512_0 = 1535,
+ scr_text_slash_scr_text_gml_1514_0 = 1536,
+ scr_text_slash_scr_text_gml_151_0 = 1537,
+ scr_text_slash_scr_text_gml_1521_0 = 1538,
+ scr_text_slash_scr_text_gml_1522_0 = 1539,
+ scr_text_slash_scr_text_gml_1524_0 = 1540,
+ scr_text_slash_scr_text_gml_1526_0 = 1541,
+ scr_text_slash_scr_text_gml_1528_0 = 1542,
+ scr_text_slash_scr_text_gml_152_0 = 1543,
+ scr_text_slash_scr_text_gml_1530_0 = 1544,
+ scr_text_slash_scr_text_gml_1532_0 = 1545,
+ scr_text_slash_scr_text_gml_153_0 = 1546,
+ scr_text_slash_scr_text_gml_1550_0 = 1547,
+ scr_text_slash_scr_text_gml_1559_0 = 1548,
+ scr_text_slash_scr_text_gml_1560_0 = 1549,
+ scr_text_slash_scr_text_gml_1561_0 = 1550,
+ scr_text_slash_scr_text_gml_1562_0 = 1551,
+ scr_text_slash_scr_text_gml_1563_0 = 1552,
+ scr_text_slash_scr_text_gml_1564_0 = 1553,
+ scr_text_slash_scr_text_gml_1565_0 = 1554,
+ scr_text_slash_scr_text_gml_1572_0 = 1555,
+ scr_text_slash_scr_text_gml_1573_0 = 1556,
+ scr_text_slash_scr_text_gml_1574_0 = 1557,
+ scr_text_slash_scr_text_gml_1586_0 = 1558,
+ scr_text_slash_scr_text_gml_1587_0 = 1559,
+ scr_text_slash_scr_text_gml_1588_0 = 1560,
+ scr_text_slash_scr_text_gml_1589_0 = 1561,
+ scr_text_slash_scr_text_gml_1590_0 = 1562,
+ scr_text_slash_scr_text_gml_1591_0 = 1563,
+ scr_text_slash_scr_text_gml_1592_0 = 1564,
+ scr_text_slash_scr_text_gml_1596_0 = 1565,
+ scr_text_slash_scr_text_gml_1599_0 = 1566,
+ scr_text_slash_scr_text_gml_1600_0 = 1567,
+ scr_text_slash_scr_text_gml_1601_0 = 1568,
+ scr_text_slash_scr_text_gml_1602_0 = 1569,
+ scr_text_slash_scr_text_gml_1603_0 = 1570,
+ scr_text_slash_scr_text_gml_1604_0 = 1571,
+ scr_text_slash_scr_text_gml_1605_0 = 1572,
+ scr_text_slash_scr_text_gml_1606_0 = 1573,
+ scr_text_slash_scr_text_gml_1607_0 = 1574,
+ scr_text_slash_scr_text_gml_1611_0 = 1575,
+ scr_text_slash_scr_text_gml_1612_0 = 1576,
+ scr_text_slash_scr_text_gml_1613_0 = 1577,
+ scr_text_slash_scr_text_gml_1614_0 = 1578,
+ scr_text_slash_scr_text_gml_1615_0 = 1579,
+ scr_text_slash_scr_text_gml_1616_0 = 1580,
+ scr_text_slash_scr_text_gml_1617_0 = 1581,
+ scr_text_slash_scr_text_gml_1624_0 = 1582,
+ scr_text_slash_scr_text_gml_1625_0 = 1583,
+ scr_text_slash_scr_text_gml_1626_0 = 1584,
+ scr_text_slash_scr_text_gml_1627_0 = 1585,
+ scr_text_slash_scr_text_gml_1628_0 = 1586,
+ scr_text_slash_scr_text_gml_1629_0 = 1587,
+ scr_text_slash_scr_text_gml_162_0 = 1588,
+ scr_text_slash_scr_text_gml_1630_0 = 1589,
+ scr_text_slash_scr_text_gml_1631_0 = 1590,
+ scr_text_slash_scr_text_gml_1632_0 = 1591,
+ scr_text_slash_scr_text_gml_1633_0 = 1592,
+ scr_text_slash_scr_text_gml_1634_0 = 1593,
+ scr_text_slash_scr_text_gml_1635_0 = 1594,
+ scr_text_slash_scr_text_gml_1636_0 = 1595,
+ scr_text_slash_scr_text_gml_1637_0 = 1596,
+ scr_text_slash_scr_text_gml_1638_0 = 1597,
+ scr_text_slash_scr_text_gml_1639_0 = 1598,
+ scr_text_slash_scr_text_gml_1640_0 = 1599,
+ scr_text_slash_scr_text_gml_1641_0 = 1600,
+ scr_text_slash_scr_text_gml_1642_0 = 1601,
+ scr_text_slash_scr_text_gml_1643_0 = 1602,
+ scr_text_slash_scr_text_gml_1644_0 = 1603,
+ scr_text_slash_scr_text_gml_1645_0 = 1604,
+ scr_text_slash_scr_text_gml_1650_0 = 1605,
+ scr_text_slash_scr_text_gml_1651_0 = 1606,
+ scr_text_slash_scr_text_gml_1652_0 = 1607,
+ scr_text_slash_scr_text_gml_1658_0 = 1608,
+ scr_text_slash_scr_text_gml_1659_0 = 1609,
+ scr_text_slash_scr_text_gml_1660_0 = 1610,
+ scr_text_slash_scr_text_gml_1662_0 = 1611,
+ scr_text_slash_scr_text_gml_1683_0 = 1612,
+ scr_text_slash_scr_text_gml_1684_0 = 1613,
+ scr_text_slash_scr_text_gml_1687_0 = 1614,
+ scr_text_slash_scr_text_gml_1688_0 = 1615,
+ scr_text_slash_scr_text_gml_1689_0 = 1616,
+ scr_text_slash_scr_text_gml_168_0 = 1617,
+ scr_text_slash_scr_text_gml_1693_0 = 1618,
+ scr_text_slash_scr_text_gml_169_0 = 1619,
+ scr_text_slash_scr_text_gml_1702_0 = 1620,
+ scr_text_slash_scr_text_gml_1703_0 = 1621,
+ scr_text_slash_scr_text_gml_1708_0 = 1622,
+ scr_text_slash_scr_text_gml_1713_0 = 1623,
+ scr_text_slash_scr_text_gml_1714_0 = 1624,
+ scr_text_slash_scr_text_gml_1717_0 = 1625,
+ scr_text_slash_scr_text_gml_1718_0 = 1626,
+ scr_text_slash_scr_text_gml_1719_0 = 1627,
+ scr_text_slash_scr_text_gml_171_0 = 1628,
+ scr_text_slash_scr_text_gml_1723_0 = 1629,
+ scr_text_slash_scr_text_gml_172_0 = 1630,
+ scr_text_slash_scr_text_gml_1733_0 = 1631,
+ scr_text_slash_scr_text_gml_1738_0 = 1632,
+ scr_text_slash_scr_text_gml_1744_0 = 1633,
+ scr_text_slash_scr_text_gml_1749_0 = 1634,
+ scr_text_slash_scr_text_gml_174_0 = 1635,
+ scr_text_slash_scr_text_gml_1750_0 = 1636,
+ scr_text_slash_scr_text_gml_1753_0 = 1637,
+ scr_text_slash_scr_text_gml_1754_0 = 1638,
+ scr_text_slash_scr_text_gml_1755_0 = 1639,
+ scr_text_slash_scr_text_gml_1756_0 = 1640,
+ scr_text_slash_scr_text_gml_1757_0 = 1641,
+ scr_text_slash_scr_text_gml_1762_0 = 1642,
+ scr_text_slash_scr_text_gml_1763_0 = 1643,
+ scr_text_slash_scr_text_gml_1764_0 = 1644,
+ scr_text_slash_scr_text_gml_1768_0 = 1645,
+ scr_text_slash_scr_text_gml_1769_0 = 1646,
+ scr_text_slash_scr_text_gml_176_0 = 1647,
+ scr_text_slash_scr_text_gml_1772_0 = 1648,
+ scr_text_slash_scr_text_gml_1773_0 = 1649,
+ scr_text_slash_scr_text_gml_1774_0 = 1650,
+ scr_text_slash_scr_text_gml_177_0 = 1651,
+ scr_text_slash_scr_text_gml_1780_0 = 1652,
+ scr_text_slash_scr_text_gml_1781_0 = 1653,
+ scr_text_slash_scr_text_gml_1785_0 = 1654,
+ scr_text_slash_scr_text_gml_1786_0 = 1655,
+ scr_text_slash_scr_text_gml_1787_0 = 1656,
+ scr_text_slash_scr_text_gml_1789_0 = 1657,
+ scr_text_slash_scr_text_gml_1790_0 = 1658,
+ scr_text_slash_scr_text_gml_1791_0 = 1659,
+ scr_text_slash_scr_text_gml_1795_0 = 1660,
+ scr_text_slash_scr_text_gml_179_0 = 1661,
+ scr_text_slash_scr_text_gml_180_0 = 1662,
+ scr_text_slash_scr_text_gml_1812_0 = 1663,
+ scr_text_slash_scr_text_gml_1813_0 = 1664,
+ scr_text_slash_scr_text_gml_1814_0 = 1665,
+ scr_text_slash_scr_text_gml_1815_0 = 1666,
+ scr_text_slash_scr_text_gml_1820_0 = 1667,
+ scr_text_slash_scr_text_gml_1821_0 = 1668,
+ scr_text_slash_scr_text_gml_1827_0 = 1669,
+ scr_text_slash_scr_text_gml_1828_0 = 1670,
+ scr_text_slash_scr_text_gml_182_0 = 1671,
+ scr_text_slash_scr_text_gml_1833_0 = 1672,
+ scr_text_slash_scr_text_gml_1834_0 = 1673,
+ scr_text_slash_scr_text_gml_183_0 = 1674,
+ scr_text_slash_scr_text_gml_1841_0 = 1675,
+ scr_text_slash_scr_text_gml_1845_0 = 1676,
+ scr_text_slash_scr_text_gml_1846_0 = 1677,
+ scr_text_slash_scr_text_gml_184_0 = 1678,
+ scr_text_slash_scr_text_gml_1853_0 = 1679,
+ scr_text_slash_scr_text_gml_1854_0 = 1680,
+ scr_text_slash_scr_text_gml_1857_0 = 1681,
+ scr_text_slash_scr_text_gml_1858_0 = 1682,
+ scr_text_slash_scr_text_gml_1859_0 = 1683,
+ scr_text_slash_scr_text_gml_185_0 = 1684,
+ scr_text_slash_scr_text_gml_1863_0 = 1685,
+ scr_text_slash_scr_text_gml_1864_0 = 1686,
+ scr_text_slash_scr_text_gml_186_0 = 1687,
+ scr_text_slash_scr_text_gml_1877_0 = 1688,
+ scr_text_slash_scr_text_gml_1881_0 = 1689,
+ scr_text_slash_scr_text_gml_1886_0 = 1690,
+ scr_text_slash_scr_text_gml_188_0 = 1691,
+ scr_text_slash_scr_text_gml_1891_0 = 1692,
+ scr_text_slash_scr_text_gml_1900_0 = 1693,
+ scr_text_slash_scr_text_gml_1901_0 = 1694,
+ scr_text_slash_scr_text_gml_1904_0 = 1695,
+ scr_text_slash_scr_text_gml_1905_0 = 1696,
+ scr_text_slash_scr_text_gml_1918_0 = 1697,
+ scr_text_slash_scr_text_gml_1922_0 = 1698,
+ scr_text_slash_scr_text_gml_1927_0 = 1699,
+ scr_text_slash_scr_text_gml_1932_0 = 1700,
+ scr_text_slash_scr_text_gml_1938_0 = 1701,
+ scr_text_slash_scr_text_gml_1939_0 = 1702,
+ scr_text_slash_scr_text_gml_193_0 = 1703,
+ scr_text_slash_scr_text_gml_1945_0 = 1704,
+ scr_text_slash_scr_text_gml_1946_0 = 1705,
+ scr_text_slash_scr_text_gml_1948_0 = 1706,
+ scr_text_slash_scr_text_gml_194_0 = 1707,
+ scr_text_slash_scr_text_gml_1950_0 = 1708,
+ scr_text_slash_scr_text_gml_1951_0 = 1709,
+ scr_text_slash_scr_text_gml_1968_0 = 1710,
+ scr_text_slash_scr_text_gml_1970_0 = 1711,
+ scr_text_slash_scr_text_gml_1972_0 = 1712,
+ scr_text_slash_scr_text_gml_1974_0 = 1713,
+ scr_text_slash_scr_text_gml_197_0 = 1714,
+ scr_text_slash_scr_text_gml_1984_0 = 1715,
+ scr_text_slash_scr_text_gml_1985_0 = 1716,
+ scr_text_slash_scr_text_gml_1987_0 = 1717,
+ scr_text_slash_scr_text_gml_1989_0 = 1718,
+ scr_text_slash_scr_text_gml_198_0 = 1719,
+ scr_text_slash_scr_text_gml_1991_0 = 1720,
+ scr_text_slash_scr_text_gml_1993_0 = 1721,
+ scr_text_slash_scr_text_gml_1995_0 = 1722,
+ scr_text_slash_scr_text_gml_199_0 = 1723,
+ scr_text_slash_scr_text_gml_19_0 = 1724,
+ scr_text_slash_scr_text_gml_2006_0 = 1725,
+ scr_text_slash_scr_text_gml_2008_0 = 1726,
+ scr_text_slash_scr_text_gml_200_0 = 1727,
+ scr_text_slash_scr_text_gml_2010_0 = 1728,
+ scr_text_slash_scr_text_gml_2018_0 = 1729,
+ scr_text_slash_scr_text_gml_201_0 = 1730,
+ scr_text_slash_scr_text_gml_2020_0 = 1731,
+ scr_text_slash_scr_text_gml_2022_0 = 1732,
+ scr_text_slash_scr_text_gml_2027_0 = 1733,
+ scr_text_slash_scr_text_gml_2028_0 = 1734,
+ scr_text_slash_scr_text_gml_2029_0 = 1735,
+ scr_text_slash_scr_text_gml_2030_0 = 1736,
+ scr_text_slash_scr_text_gml_2033_0 = 1737,
+ scr_text_slash_scr_text_gml_2034_0 = 1738,
+ scr_text_slash_scr_text_gml_2035_0 = 1739,
+ scr_text_slash_scr_text_gml_2036_0 = 1740,
+ scr_text_slash_scr_text_gml_2037_0 = 1741,
+ scr_text_slash_scr_text_gml_2038_0 = 1742,
+ scr_text_slash_scr_text_gml_2039_0 = 1743,
+ scr_text_slash_scr_text_gml_2040_0 = 1744,
+ scr_text_slash_scr_text_gml_2044_0 = 1745,
+ scr_text_slash_scr_text_gml_2045_0 = 1746,
+ scr_text_slash_scr_text_gml_2053_0 = 1747,
+ scr_text_slash_scr_text_gml_2054_0 = 1748,
+ scr_text_slash_scr_text_gml_2055_0 = 1749,
+ scr_text_slash_scr_text_gml_2056_0 = 1750,
+ scr_text_slash_scr_text_gml_2057_0 = 1751,
+ scr_text_slash_scr_text_gml_2061_0 = 1752,
+ scr_text_slash_scr_text_gml_2062_0 = 1753,
+ scr_text_slash_scr_text_gml_2063_0 = 1754,
+ scr_text_slash_scr_text_gml_2064_0 = 1755,
+ scr_text_slash_scr_text_gml_2068_0 = 1756,
+ scr_text_slash_scr_text_gml_2069_0 = 1757,
+ scr_text_slash_scr_text_gml_2070_0 = 1758,
+ scr_text_slash_scr_text_gml_2071_0 = 1759,
+ scr_text_slash_scr_text_gml_2075_0 = 1760,
+ scr_text_slash_scr_text_gml_2076_0 = 1761,
+ scr_text_slash_scr_text_gml_2077_0 = 1762,
+ scr_text_slash_scr_text_gml_2082_0 = 1763,
+ scr_text_slash_scr_text_gml_2083_0 = 1764,
+ scr_text_slash_scr_text_gml_2084_0 = 1765,
+ scr_text_slash_scr_text_gml_2085_0 = 1766,
+ scr_text_slash_scr_text_gml_2088_0 = 1767,
+ scr_text_slash_scr_text_gml_2089_0 = 1768,
+ scr_text_slash_scr_text_gml_2090_0 = 1769,
+ scr_text_slash_scr_text_gml_2093_0 = 1770,
+ scr_text_slash_scr_text_gml_2094_0 = 1771,
+ scr_text_slash_scr_text_gml_2102_0 = 1772,
+ scr_text_slash_scr_text_gml_2103_0 = 1773,
+ scr_text_slash_scr_text_gml_2104_0 = 1774,
+ scr_text_slash_scr_text_gml_2105_0 = 1775,
+ scr_text_slash_scr_text_gml_2106_0 = 1776,
+ scr_text_slash_scr_text_gml_2107_0 = 1777,
+ scr_text_slash_scr_text_gml_2108_0 = 1778,
+ scr_text_slash_scr_text_gml_2109_0 = 1779,
+ scr_text_slash_scr_text_gml_210_0 = 1780,
+ scr_text_slash_scr_text_gml_2110_0 = 1781,
+ scr_text_slash_scr_text_gml_2114_0 = 1782,
+ scr_text_slash_scr_text_gml_2115_0 = 1783,
+ scr_text_slash_scr_text_gml_2116_0 = 1784,
+ scr_text_slash_scr_text_gml_2117_0 = 1785,
+ scr_text_slash_scr_text_gml_2118_0 = 1786,
+ scr_text_slash_scr_text_gml_2119_0 = 1787,
+ scr_text_slash_scr_text_gml_211_0 = 1788,
+ scr_text_slash_scr_text_gml_2120_0 = 1789,
+ scr_text_slash_scr_text_gml_2121_0 = 1790,
+ scr_text_slash_scr_text_gml_2122_0 = 1791,
+ scr_text_slash_scr_text_gml_2127_0 = 1792,
+ scr_text_slash_scr_text_gml_2128_0 = 1793,
+ scr_text_slash_scr_text_gml_2129_0 = 1794,
+ scr_text_slash_scr_text_gml_212_0 = 1795,
+ scr_text_slash_scr_text_gml_2130_0 = 1796,
+ scr_text_slash_scr_text_gml_2131_0 = 1797,
+ scr_text_slash_scr_text_gml_2132_0 = 1798,
+ scr_text_slash_scr_text_gml_2133_0 = 1799,
+ scr_text_slash_scr_text_gml_2134_0 = 1800,
+ scr_text_slash_scr_text_gml_2135_0 = 1801,
+ scr_text_slash_scr_text_gml_213_0 = 1802,
+ scr_text_slash_scr_text_gml_2140_0 = 1803,
+ scr_text_slash_scr_text_gml_2141_0 = 1804,
+ scr_text_slash_scr_text_gml_2146_0 = 1805,
+ scr_text_slash_scr_text_gml_2147_0 = 1806,
+ scr_text_slash_scr_text_gml_214_0 = 1807,
+ scr_text_slash_scr_text_gml_2150_0 = 1808,
+ scr_text_slash_scr_text_gml_2151_0 = 1809,
+ scr_text_slash_scr_text_gml_2152_0 = 1810,
+ scr_text_slash_scr_text_gml_2153_0 = 1811,
+ scr_text_slash_scr_text_gml_2159_0 = 1812,
+ scr_text_slash_scr_text_gml_2160_0 = 1813,
+ scr_text_slash_scr_text_gml_2161_0 = 1814,
+ scr_text_slash_scr_text_gml_2162_0 = 1815,
+ scr_text_slash_scr_text_gml_2163_0 = 1816,
+ scr_text_slash_scr_text_gml_2167_0 = 1817,
+ scr_text_slash_scr_text_gml_2168_0 = 1818,
+ scr_text_slash_scr_text_gml_2173_0 = 1819,
+ scr_text_slash_scr_text_gml_2174_0 = 1820,
+ scr_text_slash_scr_text_gml_2177_0 = 1821,
+ scr_text_slash_scr_text_gml_2178_0 = 1822,
+ scr_text_slash_scr_text_gml_2184_0 = 1823,
+ scr_text_slash_scr_text_gml_2188_0 = 1824,
+ scr_text_slash_scr_text_gml_2193_0 = 1825,
+ scr_text_slash_scr_text_gml_2194_0 = 1826,
+ scr_text_slash_scr_text_gml_2197_0 = 1827,
+ scr_text_slash_scr_text_gml_2198_0 = 1828,
+ scr_text_slash_scr_text_gml_2202_0 = 1829,
+ scr_text_slash_scr_text_gml_2218_0 = 1830,
+ scr_text_slash_scr_text_gml_221_0 = 1831,
+ scr_text_slash_scr_text_gml_2223_0 = 1832,
+ scr_text_slash_scr_text_gml_2224_0 = 1833,
+ scr_text_slash_scr_text_gml_2227_0 = 1834,
+ scr_text_slash_scr_text_gml_2228_0 = 1835,
+ scr_text_slash_scr_text_gml_2229_0 = 1836,
+ scr_text_slash_scr_text_gml_2230_0 = 1837,
+ scr_text_slash_scr_text_gml_2238_0 = 1838,
+ scr_text_slash_scr_text_gml_2242_0 = 1839,
+ scr_text_slash_scr_text_gml_2247_0 = 1840,
+ scr_text_slash_scr_text_gml_2249_0 = 1841,
+ scr_text_slash_scr_text_gml_2250_0 = 1842,
+ scr_text_slash_scr_text_gml_2251_0 = 1843,
+ scr_text_slash_scr_text_gml_2252_0 = 1844,
+ scr_text_slash_scr_text_gml_2253_0 = 1845,
+ scr_text_slash_scr_text_gml_2254_0 = 1846,
+ scr_text_slash_scr_text_gml_2255_0 = 1847,
+ scr_text_slash_scr_text_gml_2256_0 = 1848,
+ scr_text_slash_scr_text_gml_2257_0 = 1849,
+ scr_text_slash_scr_text_gml_2258_0 = 1850,
+ scr_text_slash_scr_text_gml_2259_0 = 1851,
+ scr_text_slash_scr_text_gml_2260_0 = 1852,
+ scr_text_slash_scr_text_gml_2261_0 = 1853,
+ scr_text_slash_scr_text_gml_2262_0 = 1854,
+ scr_text_slash_scr_text_gml_2263_0 = 1855,
+ scr_text_slash_scr_text_gml_2264_0 = 1856,
+ scr_text_slash_scr_text_gml_2266_0 = 1857,
+ scr_text_slash_scr_text_gml_226_0 = 1858,
+ scr_text_slash_scr_text_gml_2270_0 = 1859,
+ scr_text_slash_scr_text_gml_2271_0 = 1860,
+ scr_text_slash_scr_text_gml_2274_0 = 1861,
+ scr_text_slash_scr_text_gml_2275_0 = 1862,
+ scr_text_slash_scr_text_gml_2276_0 = 1863,
+ scr_text_slash_scr_text_gml_227_0 = 1864,
+ scr_text_slash_scr_text_gml_2280_0 = 1865,
+ scr_text_slash_scr_text_gml_2281_0 = 1866,
+ scr_text_slash_scr_text_gml_2282_0 = 1867,
+ scr_text_slash_scr_text_gml_2286_0 = 1868,
+ scr_text_slash_scr_text_gml_2287_0 = 1869,
+ scr_text_slash_scr_text_gml_2288_0 = 1870,
+ scr_text_slash_scr_text_gml_2289_0 = 1871,
+ scr_text_slash_scr_text_gml_2290_0 = 1872,
+ scr_text_slash_scr_text_gml_2294_0 = 1873,
+ scr_text_slash_scr_text_gml_2295_0 = 1874,
+ scr_text_slash_scr_text_gml_2296_0 = 1875,
+ scr_text_slash_scr_text_gml_2297_0 = 1876,
+ scr_text_slash_scr_text_gml_2303_0 = 1877,
+ scr_text_slash_scr_text_gml_2304_0 = 1878,
+ scr_text_slash_scr_text_gml_2310_0 = 1879,
+ scr_text_slash_scr_text_gml_2311_0 = 1880,
+ scr_text_slash_scr_text_gml_2312_0 = 1881,
+ scr_text_slash_scr_text_gml_2313_0 = 1882,
+ scr_text_slash_scr_text_gml_2317_0 = 1883,
+ scr_text_slash_scr_text_gml_2318_0 = 1884,
+ scr_text_slash_scr_text_gml_2319_0 = 1885,
+ scr_text_slash_scr_text_gml_231_0 = 1886,
+ scr_text_slash_scr_text_gml_2320_0 = 1887,
+ scr_text_slash_scr_text_gml_2324_0 = 1888,
+ scr_text_slash_scr_text_gml_2325_0 = 1889,
+ scr_text_slash_scr_text_gml_2326_0 = 1890,
+ scr_text_slash_scr_text_gml_232_0 = 1891,
+ scr_text_slash_scr_text_gml_2332_0 = 1892,
+ scr_text_slash_scr_text_gml_2333_0 = 1893,
+ scr_text_slash_scr_text_gml_2334_0 = 1894,
+ scr_text_slash_scr_text_gml_2341_0 = 1895,
+ scr_text_slash_scr_text_gml_2344_0 = 1896,
+ scr_text_slash_scr_text_gml_2345_0 = 1897,
+ scr_text_slash_scr_text_gml_2350_0 = 1898,
+ scr_text_slash_scr_text_gml_2355_0 = 1899,
+ scr_text_slash_scr_text_gml_2356_0 = 1900,
+ scr_text_slash_scr_text_gml_2357_0 = 1901,
+ scr_text_slash_scr_text_gml_2358_0 = 1902,
+ scr_text_slash_scr_text_gml_2359_0 = 1903,
+ scr_text_slash_scr_text_gml_2360_0 = 1904,
+ scr_text_slash_scr_text_gml_2361_0 = 1905,
+ scr_text_slash_scr_text_gml_2363_0 = 1906,
+ scr_text_slash_scr_text_gml_2371_0 = 1907,
+ scr_text_slash_scr_text_gml_2372_0 = 1908,
+ scr_text_slash_scr_text_gml_2373_0 = 1909,
+ scr_text_slash_scr_text_gml_2374_0 = 1910,
+ scr_text_slash_scr_text_gml_2375_0 = 1911,
+ scr_text_slash_scr_text_gml_2376_0 = 1912,
+ scr_text_slash_scr_text_gml_2380_0 = 1913,
+ scr_text_slash_scr_text_gml_2381_0 = 1914,
+ scr_text_slash_scr_text_gml_2382_0 = 1915,
+ scr_text_slash_scr_text_gml_2383_0 = 1916,
+ scr_text_slash_scr_text_gml_2384_0 = 1917,
+ scr_text_slash_scr_text_gml_2385_0 = 1918,
+ scr_text_slash_scr_text_gml_2386_0 = 1919,
+ scr_text_slash_scr_text_gml_2387_0 = 1920,
+ scr_text_slash_scr_text_gml_2388_0 = 1921,
+ scr_text_slash_scr_text_gml_2392_0 = 1922,
+ scr_text_slash_scr_text_gml_2397_0 = 1923,
+ scr_text_slash_scr_text_gml_2398_0 = 1924,
+ scr_text_slash_scr_text_gml_23_0 = 1925,
+ scr_text_slash_scr_text_gml_2402_0 = 1926,
+ scr_text_slash_scr_text_gml_2403_0 = 1927,
+ scr_text_slash_scr_text_gml_2404_0 = 1928,
+ scr_text_slash_scr_text_gml_2405_0 = 1929,
+ scr_text_slash_scr_text_gml_2406_0 = 1930,
+ scr_text_slash_scr_text_gml_2409_0 = 1931,
+ scr_text_slash_scr_text_gml_2410_0 = 1932,
+ scr_text_slash_scr_text_gml_2417_0 = 1933,
+ scr_text_slash_scr_text_gml_2418_0 = 1934,
+ scr_text_slash_scr_text_gml_2419_0 = 1935,
+ scr_text_slash_scr_text_gml_241_0 = 1936,
+ scr_text_slash_scr_text_gml_2420_0 = 1937,
+ scr_text_slash_scr_text_gml_2421_0 = 1938,
+ scr_text_slash_scr_text_gml_2422_0 = 1939,
+ scr_text_slash_scr_text_gml_2423_0 = 1940,
+ scr_text_slash_scr_text_gml_2424_0 = 1941,
+ scr_text_slash_scr_text_gml_2427_0 = 1942,
+ scr_text_slash_scr_text_gml_2428_0 = 1943,
+ scr_text_slash_scr_text_gml_242_0 = 1944,
+ scr_text_slash_scr_text_gml_2434_0 = 1945,
+ scr_text_slash_scr_text_gml_2435_0 = 1946,
+ scr_text_slash_scr_text_gml_2438_0 = 1947,
+ scr_text_slash_scr_text_gml_2439_0 = 1948,
+ scr_text_slash_scr_text_gml_243_0 = 1949,
+ scr_text_slash_scr_text_gml_2440_0 = 1950,
+ scr_text_slash_scr_text_gml_2441_0 = 1951,
+ scr_text_slash_scr_text_gml_2442_0 = 1952,
+ scr_text_slash_scr_text_gml_2443_0 = 1953,
+ scr_text_slash_scr_text_gml_2451_0 = 1954,
+ scr_text_slash_scr_text_gml_2452_0 = 1955,
+ scr_text_slash_scr_text_gml_2453_0 = 1956,
+ scr_text_slash_scr_text_gml_2458_0 = 1957,
+ scr_text_slash_scr_text_gml_2459_0 = 1958,
+ scr_text_slash_scr_text_gml_2460_0 = 1959,
+ scr_text_slash_scr_text_gml_2463_0 = 1960,
+ scr_text_slash_scr_text_gml_2464_0 = 1961,
+ scr_text_slash_scr_text_gml_2465_0 = 1962,
+ scr_text_slash_scr_text_gml_2466_0 = 1963,
+ scr_text_slash_scr_text_gml_2467_0 = 1964,
+ scr_text_slash_scr_text_gml_2468_0 = 1965,
+ scr_text_slash_scr_text_gml_2469_0 = 1966,
+ scr_text_slash_scr_text_gml_2470_0 = 1967,
+ scr_text_slash_scr_text_gml_2478_0 = 1968,
+ scr_text_slash_scr_text_gml_2483_0 = 1969,
+ scr_text_slash_scr_text_gml_2485_0 = 1970,
+ scr_text_slash_scr_text_gml_2486_0 = 1971,
+ scr_text_slash_scr_text_gml_2487_0 = 1972,
+ scr_text_slash_scr_text_gml_2488_0 = 1973,
+ scr_text_slash_scr_text_gml_2489_0 = 1974,
+ scr_text_slash_scr_text_gml_2490_0 = 1975,
+ scr_text_slash_scr_text_gml_2491_0 = 1976,
+ scr_text_slash_scr_text_gml_2498_0 = 1977,
+ scr_text_slash_scr_text_gml_2499_0 = 1978,
+ scr_text_slash_scr_text_gml_249_0 = 1979,
+ scr_text_slash_scr_text_gml_24_0 = 1980,
+ scr_text_slash_scr_text_gml_2500_0 = 1981,
+ scr_text_slash_scr_text_gml_2501_0 = 1982,
+ scr_text_slash_scr_text_gml_2502_0 = 1983,
+ scr_text_slash_scr_text_gml_2503_0 = 1984,
+ scr_text_slash_scr_text_gml_2504_0 = 1985,
+ scr_text_slash_scr_text_gml_2505_0 = 1986,
+ scr_text_slash_scr_text_gml_2506_0 = 1987,
+ scr_text_slash_scr_text_gml_2507_0 = 1988,
+ scr_text_slash_scr_text_gml_2508_0 = 1989,
+ scr_text_slash_scr_text_gml_2509_0 = 1990,
+ scr_text_slash_scr_text_gml_250_0 = 1991,
+ scr_text_slash_scr_text_gml_2510_0 = 1992,
+ scr_text_slash_scr_text_gml_2511_0 = 1993,
+ scr_text_slash_scr_text_gml_2512_0 = 1994,
+ scr_text_slash_scr_text_gml_2513_0 = 1995,
+ scr_text_slash_scr_text_gml_2514_0 = 1996,
+ scr_text_slash_scr_text_gml_2517_0 = 1997,
+ scr_text_slash_scr_text_gml_2518_0 = 1998,
+ scr_text_slash_scr_text_gml_251_0 = 1999,
+ scr_text_slash_scr_text_gml_2524_0 = 2000,
+ scr_text_slash_scr_text_gml_2525_0 = 2001,
+ scr_text_slash_scr_text_gml_2526_0 = 2002,
+ scr_text_slash_scr_text_gml_2527_0 = 2003,
+ scr_text_slash_scr_text_gml_2530_0 = 2004,
+ scr_text_slash_scr_text_gml_2531_0 = 2005,
+ scr_text_slash_scr_text_gml_2532_0 = 2006,
+ scr_text_slash_scr_text_gml_2533_0 = 2007,
+ scr_text_slash_scr_text_gml_2534_0 = 2008,
+ scr_text_slash_scr_text_gml_2535_0 = 2009,
+ scr_text_slash_scr_text_gml_2536_0 = 2010,
+ scr_text_slash_scr_text_gml_2537_0 = 2011,
+ scr_text_slash_scr_text_gml_2538_0 = 2012,
+ scr_text_slash_scr_text_gml_2542_0 = 2013,
+ scr_text_slash_scr_text_gml_2543_0 = 2014,
+ scr_text_slash_scr_text_gml_2544_0 = 2015,
+ scr_text_slash_scr_text_gml_2552_0 = 2016,
+ scr_text_slash_scr_text_gml_2553_0 = 2017,
+ scr_text_slash_scr_text_gml_2554_0 = 2018,
+ scr_text_slash_scr_text_gml_2555_0 = 2019,
+ scr_text_slash_scr_text_gml_2559_0 = 2020,
+ scr_text_slash_scr_text_gml_2560_0 = 2021,
+ scr_text_slash_scr_text_gml_2561_0 = 2022,
+ scr_text_slash_scr_text_gml_2562_0 = 2023,
+ scr_text_slash_scr_text_gml_2563_0 = 2024,
+ scr_text_slash_scr_text_gml_2564_0 = 2025,
+ scr_text_slash_scr_text_gml_2565_0 = 2026,
+ scr_text_slash_scr_text_gml_2566_0 = 2027,
+ scr_text_slash_scr_text_gml_2570_0 = 2028,
+ scr_text_slash_scr_text_gml_257_0 = 2029,
+ scr_text_slash_scr_text_gml_2583_0 = 2030,
+ scr_text_slash_scr_text_gml_2584_0 = 2031,
+ scr_text_slash_scr_text_gml_2585_0 = 2032,
+ scr_text_slash_scr_text_gml_2586_0 = 2033,
+ scr_text_slash_scr_text_gml_2587_0 = 2034,
+ scr_text_slash_scr_text_gml_2588_0 = 2035,
+ scr_text_slash_scr_text_gml_2589_0 = 2036,
+ scr_text_slash_scr_text_gml_258_0 = 2037,
+ scr_text_slash_scr_text_gml_2590_0 = 2038,
+ scr_text_slash_scr_text_gml_2591_0 = 2039,
+ scr_text_slash_scr_text_gml_2595_0 = 2040,
+ scr_text_slash_scr_text_gml_2596_0 = 2041,
+ scr_text_slash_scr_text_gml_2597_0 = 2042,
+ scr_text_slash_scr_text_gml_2598_0 = 2043,
+ scr_text_slash_scr_text_gml_2599_0 = 2044,
+ scr_text_slash_scr_text_gml_25_0 = 2045,
+ scr_text_slash_scr_text_gml_2600_0 = 2046,
+ scr_text_slash_scr_text_gml_2601_0 = 2047,
+ scr_text_slash_scr_text_gml_2602_0 = 2048,
+ scr_text_slash_scr_text_gml_2603_0 = 2049,
+ scr_text_slash_scr_text_gml_2604_0 = 2050,
+ scr_text_slash_scr_text_gml_2605_0 = 2051,
+ scr_text_slash_scr_text_gml_2609_0 = 2052,
+ scr_text_slash_scr_text_gml_2610_0 = 2053,
+ scr_text_slash_scr_text_gml_2611_0 = 2054,
+ scr_text_slash_scr_text_gml_2612_0 = 2055,
+ scr_text_slash_scr_text_gml_2613_0 = 2056,
+ scr_text_slash_scr_text_gml_2614_0 = 2057,
+ scr_text_slash_scr_text_gml_2615_0 = 2058,
+ scr_text_slash_scr_text_gml_2616_0 = 2059,
+ scr_text_slash_scr_text_gml_2617_0 = 2060,
+ scr_text_slash_scr_text_gml_2618_0 = 2061,
+ scr_text_slash_scr_text_gml_261_0 = 2062,
+ scr_text_slash_scr_text_gml_2622_0 = 2063,
+ scr_text_slash_scr_text_gml_2623_0 = 2064,
+ scr_text_slash_scr_text_gml_2624_0 = 2065,
+ scr_text_slash_scr_text_gml_2625_0 = 2066,
+ scr_text_slash_scr_text_gml_2626_0 = 2067,
+ scr_text_slash_scr_text_gml_2627_0 = 2068,
+ scr_text_slash_scr_text_gml_2628_0 = 2069,
+ scr_text_slash_scr_text_gml_2629_0 = 2070,
+ scr_text_slash_scr_text_gml_262_0 = 2071,
+ scr_text_slash_scr_text_gml_262_1 = 2072,
+ scr_text_slash_scr_text_gml_2635_0 = 2073,
+ scr_text_slash_scr_text_gml_2636_0 = 2074,
+ scr_text_slash_scr_text_gml_2639_0 = 2075,
+ scr_text_slash_scr_text_gml_263_0 = 2076,
+ scr_text_slash_scr_text_gml_2640_0 = 2077,
+ scr_text_slash_scr_text_gml_2641_0 = 2078,
+ scr_text_slash_scr_text_gml_2648_0 = 2079,
+ scr_text_slash_scr_text_gml_2652_0 = 2080,
+ scr_text_slash_scr_text_gml_2657_0 = 2081,
+ scr_text_slash_scr_text_gml_2658_0 = 2082,
+ scr_text_slash_scr_text_gml_2661_0 = 2083,
+ scr_text_slash_scr_text_gml_2662_0 = 2084,
+ scr_text_slash_scr_text_gml_2663_0 = 2085,
+ scr_text_slash_scr_text_gml_2664_0 = 2086,
+ scr_text_slash_scr_text_gml_2670_0 = 2087,
+ scr_text_slash_scr_text_gml_2671_0 = 2088,
+ scr_text_slash_scr_text_gml_2676_0 = 2089,
+ scr_text_slash_scr_text_gml_2680_0 = 2090,
+ scr_text_slash_scr_text_gml_2685_0 = 2091,
+ scr_text_slash_scr_text_gml_2686_0 = 2092,
+ scr_text_slash_scr_text_gml_2689_0 = 2093,
+ scr_text_slash_scr_text_gml_2690_0 = 2094,
+ scr_text_slash_scr_text_gml_2691_0 = 2095,
+ scr_text_slash_scr_text_gml_2692_0 = 2096,
+ scr_text_slash_scr_text_gml_2694_0 = 2097,
+ scr_text_slash_scr_text_gml_2696_0 = 2098,
+ scr_text_slash_scr_text_gml_2698_0 = 2099,
+ scr_text_slash_scr_text_gml_2699_0 = 2100,
+ scr_text_slash_scr_text_gml_2700_0 = 2101,
+ scr_text_slash_scr_text_gml_2701_0 = 2102,
+ scr_text_slash_scr_text_gml_2702_0 = 2103,
+ scr_text_slash_scr_text_gml_2703_0 = 2104,
+ scr_text_slash_scr_text_gml_2705_0 = 2105,
+ scr_text_slash_scr_text_gml_2707_0 = 2106,
+ scr_text_slash_scr_text_gml_2709_0 = 2107,
+ scr_text_slash_scr_text_gml_2711_0 = 2108,
+ scr_text_slash_scr_text_gml_2712_0 = 2109,
+ scr_text_slash_scr_text_gml_2713_0 = 2110,
+ scr_text_slash_scr_text_gml_2714_0 = 2111,
+ scr_text_slash_scr_text_gml_2718_0 = 2112,
+ scr_text_slash_scr_text_gml_2719_0 = 2113,
+ scr_text_slash_scr_text_gml_2724_0 = 2114,
+ scr_text_slash_scr_text_gml_2725_0 = 2115,
+ scr_text_slash_scr_text_gml_272_0 = 2116,
+ scr_text_slash_scr_text_gml_2731_0 = 2117,
+ scr_text_slash_scr_text_gml_2732_0 = 2118,
+ scr_text_slash_scr_text_gml_2737_0 = 2119,
+ scr_text_slash_scr_text_gml_2738_0 = 2120,
+ scr_text_slash_scr_text_gml_273_0 = 2121,
+ scr_text_slash_scr_text_gml_2744_0 = 2122,
+ scr_text_slash_scr_text_gml_2745_0 = 2123,
+ scr_text_slash_scr_text_gml_2748_0 = 2124,
+ scr_text_slash_scr_text_gml_2749_0 = 2125,
+ scr_text_slash_scr_text_gml_274_0 = 2126,
+ scr_text_slash_scr_text_gml_2750_0 = 2127,
+ scr_text_slash_scr_text_gml_2751_0 = 2128,
+ scr_text_slash_scr_text_gml_2765_0 = 2129,
+ scr_text_slash_scr_text_gml_2770_0 = 2130,
+ scr_text_slash_scr_text_gml_2776_0 = 2131,
+ scr_text_slash_scr_text_gml_2780_0 = 2132,
+ scr_text_slash_scr_text_gml_2781_0 = 2133,
+ scr_text_slash_scr_text_gml_2784_0 = 2134,
+ scr_text_slash_scr_text_gml_2785_0 = 2135,
+ scr_text_slash_scr_text_gml_2789_0 = 2136,
+ scr_text_slash_scr_text_gml_2790_0 = 2137,
+ scr_text_slash_scr_text_gml_2793_0 = 2138,
+ scr_text_slash_scr_text_gml_2794_0 = 2139,
+ scr_text_slash_scr_text_gml_2795_0 = 2140,
+ scr_text_slash_scr_text_gml_279_0 = 2141,
+ scr_text_slash_scr_text_gml_2806_0 = 2142,
+ scr_text_slash_scr_text_gml_2807_0 = 2143,
+ scr_text_slash_scr_text_gml_2809_0 = 2144,
+ scr_text_slash_scr_text_gml_280_0 = 2145,
+ scr_text_slash_scr_text_gml_2810_0 = 2146,
+ scr_text_slash_scr_text_gml_281_0 = 2147,
+ scr_text_slash_scr_text_gml_2822_0 = 2148,
+ scr_text_slash_scr_text_gml_2823_0 = 2149,
+ scr_text_slash_scr_text_gml_2825_0 = 2150,
+ scr_text_slash_scr_text_gml_2826_0 = 2151,
+ scr_text_slash_scr_text_gml_2831_0 = 2152,
+ scr_text_slash_scr_text_gml_2833_0 = 2153,
+ scr_text_slash_scr_text_gml_2840_0 = 2154,
+ scr_text_slash_scr_text_gml_2841_0 = 2155,
+ scr_text_slash_scr_text_gml_2844_0 = 2156,
+ scr_text_slash_scr_text_gml_2845_0 = 2157,
+ scr_text_slash_scr_text_gml_2852_0 = 2158,
+ scr_text_slash_scr_text_gml_2853_0 = 2159,
+ scr_text_slash_scr_text_gml_2857_0 = 2160,
+ scr_text_slash_scr_text_gml_2862_0 = 2161,
+ scr_text_slash_scr_text_gml_2863_0 = 2162,
+ scr_text_slash_scr_text_gml_2864_0 = 2163,
+ scr_text_slash_scr_text_gml_2866_0 = 2164,
+ scr_text_slash_scr_text_gml_2867_0 = 2165,
+ scr_text_slash_scr_text_gml_288_0 = 2166,
+ scr_text_slash_scr_text_gml_2892_0 = 2167,
+ scr_text_slash_scr_text_gml_289_0 = 2168,
+ scr_text_slash_scr_text_gml_2908_0 = 2169,
+ scr_text_slash_scr_text_gml_2924_0 = 2170,
+ scr_text_slash_scr_text_gml_292_0 = 2171,
+ scr_text_slash_scr_text_gml_2933_0 = 2172,
+ scr_text_slash_scr_text_gml_2934_0 = 2173,
+ scr_text_slash_scr_text_gml_2937_0 = 2174,
+ scr_text_slash_scr_text_gml_2938_0 = 2175,
+ scr_text_slash_scr_text_gml_293_0 = 2176,
+ scr_text_slash_scr_text_gml_294_0 = 2177,
+ scr_text_slash_scr_text_gml_295_0 = 2178,
+ scr_text_slash_scr_text_gml_2965_0 = 2179,
+ scr_text_slash_scr_text_gml_2966_0 = 2180,
+ scr_text_slash_scr_text_gml_2972_0 = 2181,
+ scr_text_slash_scr_text_gml_2973_0 = 2182,
+ scr_text_slash_scr_text_gml_2974_0 = 2183,
+ scr_text_slash_scr_text_gml_2975_0 = 2184,
+ scr_text_slash_scr_text_gml_2976_0 = 2185,
+ scr_text_slash_scr_text_gml_2977_0 = 2186,
+ scr_text_slash_scr_text_gml_2978_0 = 2187,
+ scr_text_slash_scr_text_gml_2979_0 = 2188,
+ scr_text_slash_scr_text_gml_2985_0 = 2189,
+ scr_text_slash_scr_text_gml_2986_0 = 2190,
+ scr_text_slash_scr_text_gml_2990_0 = 2191,
+ scr_text_slash_scr_text_gml_2991_0 = 2192,
+ scr_text_slash_scr_text_gml_2997_0 = 2193,
+ scr_text_slash_scr_text_gml_2998_0 = 2194,
+ scr_text_slash_scr_text_gml_3001_0 = 2195,
+ scr_text_slash_scr_text_gml_3002_0 = 2196,
+ scr_text_slash_scr_text_gml_3003_0 = 2197,
+ scr_text_slash_scr_text_gml_3004_0 = 2198,
+ scr_text_slash_scr_text_gml_3006_0 = 2199,
+ scr_text_slash_scr_text_gml_3009_0 = 2200,
+ scr_text_slash_scr_text_gml_3010_0 = 2201,
+ scr_text_slash_scr_text_gml_3014_0 = 2202,
+ scr_text_slash_scr_text_gml_3015_0 = 2203,
+ scr_text_slash_scr_text_gml_3016_0 = 2204,
+ scr_text_slash_scr_text_gml_3021_0 = 2205,
+ scr_text_slash_scr_text_gml_3022_0 = 2206,
+ scr_text_slash_scr_text_gml_3023_0 = 2207,
+ scr_text_slash_scr_text_gml_3024_0 = 2208,
+ scr_text_slash_scr_text_gml_3025_0 = 2209,
+ scr_text_slash_scr_text_gml_3026_0 = 2210,
+ scr_text_slash_scr_text_gml_3027_0 = 2211,
+ scr_text_slash_scr_text_gml_302_0 = 2212,
+ scr_text_slash_scr_text_gml_3033_0 = 2213,
+ scr_text_slash_scr_text_gml_3034_0 = 2214,
+ scr_text_slash_scr_text_gml_3035_0 = 2215,
+ scr_text_slash_scr_text_gml_3036_0 = 2216,
+ scr_text_slash_scr_text_gml_3037_0 = 2217,
+ scr_text_slash_scr_text_gml_3038_0 = 2218,
+ scr_text_slash_scr_text_gml_3039_0 = 2219,
+ scr_text_slash_scr_text_gml_3043_0 = 2220,
+ scr_text_slash_scr_text_gml_3044_0 = 2221,
+ scr_text_slash_scr_text_gml_3045_0 = 2222,
+ scr_text_slash_scr_text_gml_3046_0 = 2223,
+ scr_text_slash_scr_text_gml_3047_0 = 2224,
+ scr_text_slash_scr_text_gml_3048_0 = 2225,
+ scr_text_slash_scr_text_gml_3049_0 = 2226,
+ scr_text_slash_scr_text_gml_3050_0 = 2227,
+ scr_text_slash_scr_text_gml_3051_0 = 2228,
+ scr_text_slash_scr_text_gml_3055_0 = 2229,
+ scr_text_slash_scr_text_gml_3056_0 = 2230,
+ scr_text_slash_scr_text_gml_3057_0 = 2231,
+ scr_text_slash_scr_text_gml_3058_0 = 2232,
+ scr_text_slash_scr_text_gml_3059_0 = 2233,
+ scr_text_slash_scr_text_gml_3063_0 = 2234,
+ scr_text_slash_scr_text_gml_3064_0 = 2235,
+ scr_text_slash_scr_text_gml_3065_0 = 2236,
+ scr_text_slash_scr_text_gml_3066_0 = 2237,
+ scr_text_slash_scr_text_gml_3067_0 = 2238,
+ scr_text_slash_scr_text_gml_3068_0 = 2239,
+ scr_text_slash_scr_text_gml_3069_0 = 2240,
+ scr_text_slash_scr_text_gml_3077_0 = 2241,
+ scr_text_slash_scr_text_gml_3078_0 = 2242,
+ scr_text_slash_scr_text_gml_307_0 = 2243,
+ scr_text_slash_scr_text_gml_3083_0 = 2244,
+ scr_text_slash_scr_text_gml_3084_0 = 2245,
+ scr_text_slash_scr_text_gml_3087_0 = 2246,
+ scr_text_slash_scr_text_gml_3088_0 = 2247,
+ scr_text_slash_scr_text_gml_308_0 = 2248,
+ scr_text_slash_scr_text_gml_3091_0 = 2249,
+ scr_text_slash_scr_text_gml_3092_0 = 2250,
+ scr_text_slash_scr_text_gml_3093_0 = 2251,
+ scr_text_slash_scr_text_gml_3097_0 = 2252,
+ scr_text_slash_scr_text_gml_3098_0 = 2253,
+ scr_text_slash_scr_text_gml_309_0 = 2254,
+ scr_text_slash_scr_text_gml_3103_0 = 2255,
+ scr_text_slash_scr_text_gml_310_0 = 2256,
+ scr_text_slash_scr_text_gml_311_0 = 2257,
+ scr_text_slash_scr_text_gml_311_1 = 2258,
+ scr_text_slash_scr_text_gml_3124_0 = 2259,
+ scr_text_slash_scr_text_gml_3128_0 = 2260,
+ scr_text_slash_scr_text_gml_3137_0 = 2261,
+ scr_text_slash_scr_text_gml_3138_0 = 2262,
+ scr_text_slash_scr_text_gml_313_0 = 2263,
+ scr_text_slash_scr_text_gml_3141_0 = 2264,
+ scr_text_slash_scr_text_gml_3142_0 = 2265,
+ scr_text_slash_scr_text_gml_3143_0 = 2266,
+ scr_text_slash_scr_text_gml_3151_0 = 2267,
+ scr_text_slash_scr_text_gml_3152_0 = 2268,
+ scr_text_slash_scr_text_gml_3153_0 = 2269,
+ scr_text_slash_scr_text_gml_3155_0 = 2270,
+ scr_text_slash_scr_text_gml_3156_0 = 2271,
+ scr_text_slash_scr_text_gml_3161_0 = 2272,
+ scr_text_slash_scr_text_gml_3166_0 = 2273,
+ scr_text_slash_scr_text_gml_3167_0 = 2274,
+ scr_text_slash_scr_text_gml_3173_0 = 2275,
+ scr_text_slash_scr_text_gml_3177_0 = 2276,
+ scr_text_slash_scr_text_gml_3178_0 = 2277,
+ scr_text_slash_scr_text_gml_3186_0 = 2278,
+ scr_text_slash_scr_text_gml_3188_0 = 2279,
+ scr_text_slash_scr_text_gml_318_0 = 2280,
+ scr_text_slash_scr_text_gml_3191_0 = 2281,
+ scr_text_slash_scr_text_gml_3196_0 = 2282,
+ scr_text_slash_scr_text_gml_319_0 = 2283,
+ scr_text_slash_scr_text_gml_3201_0 = 2284,
+ scr_text_slash_scr_text_gml_3202_0 = 2285,
+ scr_text_slash_scr_text_gml_3205_0 = 2286,
+ scr_text_slash_scr_text_gml_3206_0 = 2287,
+ scr_text_slash_scr_text_gml_3207_0 = 2288,
+ scr_text_slash_scr_text_gml_3214_0 = 2289,
+ scr_text_slash_scr_text_gml_3220_0 = 2290,
+ scr_text_slash_scr_text_gml_322_0 = 2291,
+ scr_text_slash_scr_text_gml_323_0 = 2292,
+ scr_text_slash_scr_text_gml_324_0 = 2293,
+ scr_text_slash_scr_text_gml_325_0 = 2294,
+ scr_text_slash_scr_text_gml_326_0 = 2295,
+ scr_text_slash_scr_text_gml_327_0 = 2296,
+ scr_text_slash_scr_text_gml_328_0 = 2297,
+ scr_text_slash_scr_text_gml_329_0 = 2298,
+ scr_text_slash_scr_text_gml_330_0 = 2299,
+ scr_text_slash_scr_text_gml_331_0 = 2300,
+ scr_text_slash_scr_text_gml_332_0 = 2301,
+ scr_text_slash_scr_text_gml_333_0 = 2302,
+ scr_text_slash_scr_text_gml_334_0 = 2303,
+ scr_text_slash_scr_text_gml_335_0 = 2304,
+ scr_text_slash_scr_text_gml_336_0 = 2305,
+ scr_text_slash_scr_text_gml_337_0 = 2306,
+ scr_text_slash_scr_text_gml_342_0 = 2307,
+ scr_text_slash_scr_text_gml_343_0 = 2308,
+ scr_text_slash_scr_text_gml_347_0 = 2309,
+ scr_text_slash_scr_text_gml_348_0 = 2310,
+ scr_text_slash_scr_text_gml_349_0 = 2311,
+ scr_text_slash_scr_text_gml_350_0 = 2312,
+ scr_text_slash_scr_text_gml_357_0 = 2313,
+ scr_text_slash_scr_text_gml_358_0 = 2314,
+ scr_text_slash_scr_text_gml_363_0 = 2315,
+ scr_text_slash_scr_text_gml_364_0 = 2316,
+ scr_text_slash_scr_text_gml_365_0 = 2317,
+ scr_text_slash_scr_text_gml_369_0 = 2318,
+ scr_text_slash_scr_text_gml_370_0 = 2319,
+ scr_text_slash_scr_text_gml_371_0 = 2320,
+ scr_text_slash_scr_text_gml_376_0 = 2321,
+ scr_text_slash_scr_text_gml_387_0 = 2322,
+ scr_text_slash_scr_text_gml_38_0 = 2323,
+ scr_text_slash_scr_text_gml_392_0 = 2324,
+ scr_text_slash_scr_text_gml_398_0 = 2325,
+ scr_text_slash_scr_text_gml_39_0 = 2326,
+ scr_text_slash_scr_text_gml_403_0 = 2327,
+ scr_text_slash_scr_text_gml_404_0 = 2328,
+ scr_text_slash_scr_text_gml_409_0 = 2329,
+ scr_text_slash_scr_text_gml_40_0 = 2330,
+ scr_text_slash_scr_text_gml_410_0 = 2331,
+ scr_text_slash_scr_text_gml_411_0 = 2332,
+ scr_text_slash_scr_text_gml_415_0 = 2333,
+ scr_text_slash_scr_text_gml_416_0 = 2334,
+ scr_text_slash_scr_text_gml_417_0 = 2335,
+ scr_text_slash_scr_text_gml_41_0 = 2336,
+ scr_text_slash_scr_text_gml_422_0 = 2337,
+ scr_text_slash_scr_text_gml_42_0 = 2338,
+ scr_text_slash_scr_text_gml_433_0 = 2339,
+ scr_text_slash_scr_text_gml_438_0 = 2340,
+ scr_text_slash_scr_text_gml_43_0 = 2341,
+ scr_text_slash_scr_text_gml_444_0 = 2342,
+ scr_text_slash_scr_text_gml_449_0 = 2343,
+ scr_text_slash_scr_text_gml_450_0 = 2344,
+ scr_text_slash_scr_text_gml_455_0 = 2345,
+ scr_text_slash_scr_text_gml_456_0 = 2346,
+ scr_text_slash_scr_text_gml_457_0 = 2347,
+ scr_text_slash_scr_text_gml_461_0 = 2348,
+ scr_text_slash_scr_text_gml_472_0 = 2349,
+ scr_text_slash_scr_text_gml_477_0 = 2350,
+ scr_text_slash_scr_text_gml_483_0 = 2351,
+ scr_text_slash_scr_text_gml_491_0 = 2352,
+ scr_text_slash_scr_text_gml_492_0 = 2353,
+ scr_text_slash_scr_text_gml_493_0 = 2354,
+ scr_text_slash_scr_text_gml_495_0 = 2355,
+ scr_text_slash_scr_text_gml_496_0 = 2356,
+ scr_text_slash_scr_text_gml_497_0 = 2357,
+ scr_text_slash_scr_text_gml_498_0 = 2358,
+ scr_text_slash_scr_text_gml_507_0 = 2359,
+ scr_text_slash_scr_text_gml_508_0 = 2360,
+ scr_text_slash_scr_text_gml_50_0 = 2361,
+ scr_text_slash_scr_text_gml_510_0 = 2362,
+ scr_text_slash_scr_text_gml_511_0 = 2363,
+ scr_text_slash_scr_text_gml_512_0 = 2364,
+ scr_text_slash_scr_text_gml_514_0 = 2365,
+ scr_text_slash_scr_text_gml_516_0 = 2366,
+ scr_text_slash_scr_text_gml_517_0 = 2367,
+ scr_text_slash_scr_text_gml_519_0 = 2368,
+ scr_text_slash_scr_text_gml_51_0 = 2369,
+ scr_text_slash_scr_text_gml_521_0 = 2370,
+ scr_text_slash_scr_text_gml_523_0 = 2371,
+ scr_text_slash_scr_text_gml_524_0 = 2372,
+ scr_text_slash_scr_text_gml_525_0 = 2373,
+ scr_text_slash_scr_text_gml_526_0 = 2374,
+ scr_text_slash_scr_text_gml_528_0 = 2375,
+ scr_text_slash_scr_text_gml_530_0 = 2376,
+ scr_text_slash_scr_text_gml_531_0 = 2377,
+ scr_text_slash_scr_text_gml_539_0 = 2378,
+ scr_text_slash_scr_text_gml_540_0 = 2379,
+ scr_text_slash_scr_text_gml_541_0 = 2380,
+ scr_text_slash_scr_text_gml_543_0 = 2381,
+ scr_text_slash_scr_text_gml_545_0 = 2382,
+ scr_text_slash_scr_text_gml_547_0 = 2383,
+ scr_text_slash_scr_text_gml_549_0 = 2384,
+ scr_text_slash_scr_text_gml_550_0 = 2385,
+ scr_text_slash_scr_text_gml_551_0 = 2386,
+ scr_text_slash_scr_text_gml_552_0 = 2387,
+ scr_text_slash_scr_text_gml_553_0 = 2388,
+ scr_text_slash_scr_text_gml_554_0 = 2389,
+ scr_text_slash_scr_text_gml_562_0 = 2390,
+ scr_text_slash_scr_text_gml_563_0 = 2391,
+ scr_text_slash_scr_text_gml_565_0 = 2392,
+ scr_text_slash_scr_text_gml_567_0 = 2393,
+ scr_text_slash_scr_text_gml_568_0 = 2394,
+ scr_text_slash_scr_text_gml_569_0 = 2395,
+ scr_text_slash_scr_text_gml_56_0 = 2396,
+ scr_text_slash_scr_text_gml_571_0 = 2397,
+ scr_text_slash_scr_text_gml_572_0 = 2398,
+ scr_text_slash_scr_text_gml_573_0 = 2399,
+ scr_text_slash_scr_text_gml_574_0 = 2400,
+ scr_text_slash_scr_text_gml_575_0 = 2401,
+ scr_text_slash_scr_text_gml_577_0 = 2402,
+ scr_text_slash_scr_text_gml_579_0 = 2403,
+ scr_text_slash_scr_text_gml_580_0 = 2404,
+ scr_text_slash_scr_text_gml_581_0 = 2405,
+ scr_text_slash_scr_text_gml_582_0 = 2406,
+ scr_text_slash_scr_text_gml_584_0 = 2407,
+ scr_text_slash_scr_text_gml_585_0 = 2408,
+ scr_text_slash_scr_text_gml_586_0 = 2409,
+ scr_text_slash_scr_text_gml_595_0 = 2410,
+ scr_text_slash_scr_text_gml_596_0 = 2411,
+ scr_text_slash_scr_text_gml_599_0 = 2412,
+ scr_text_slash_scr_text_gml_600_0 = 2413,
+ scr_text_slash_scr_text_gml_601_0 = 2414,
+ scr_text_slash_scr_text_gml_602_0 = 2415,
+ scr_text_slash_scr_text_gml_607_0 = 2416,
+ scr_text_slash_scr_text_gml_608_0 = 2417,
+ scr_text_slash_scr_text_gml_609_0 = 2418,
+ scr_text_slash_scr_text_gml_610_0 = 2419,
+ scr_text_slash_scr_text_gml_611_0 = 2420,
+ scr_text_slash_scr_text_gml_612_0 = 2421,
+ scr_text_slash_scr_text_gml_613_0 = 2422,
+ scr_text_slash_scr_text_gml_618_0 = 2423,
+ scr_text_slash_scr_text_gml_619_0 = 2424,
+ scr_text_slash_scr_text_gml_61_0 = 2425,
+ scr_text_slash_scr_text_gml_620_0 = 2426,
+ scr_text_slash_scr_text_gml_621_0 = 2427,
+ scr_text_slash_scr_text_gml_624_0 = 2428,
+ scr_text_slash_scr_text_gml_625_0 = 2429,
+ scr_text_slash_scr_text_gml_629_0 = 2430,
+ scr_text_slash_scr_text_gml_630_0 = 2431,
+ scr_text_slash_scr_text_gml_631_0 = 2432,
+ scr_text_slash_scr_text_gml_632_0 = 2433,
+ scr_text_slash_scr_text_gml_633_0 = 2434,
+ scr_text_slash_scr_text_gml_634_0 = 2435,
+ scr_text_slash_scr_text_gml_636_0 = 2436,
+ scr_text_slash_scr_text_gml_641_0 = 2437,
+ scr_text_slash_scr_text_gml_645_0 = 2438,
+ scr_text_slash_scr_text_gml_646_0 = 2439,
+ scr_text_slash_scr_text_gml_647_0 = 2440,
+ scr_text_slash_scr_text_gml_648_0 = 2441,
+ scr_text_slash_scr_text_gml_649_0 = 2442,
+ scr_text_slash_scr_text_gml_650_0 = 2443,
+ scr_text_slash_scr_text_gml_651_0 = 2444,
+ scr_text_slash_scr_text_gml_652_0 = 2445,
+ scr_text_slash_scr_text_gml_653_0 = 2446,
+ scr_text_slash_scr_text_gml_654_0 = 2447,
+ scr_text_slash_scr_text_gml_655_0 = 2448,
+ scr_text_slash_scr_text_gml_659_0 = 2449,
+ scr_text_slash_scr_text_gml_660_0 = 2450,
+ scr_text_slash_scr_text_gml_661_0 = 2451,
+ scr_text_slash_scr_text_gml_662_0 = 2452,
+ scr_text_slash_scr_text_gml_663_0 = 2453,
+ scr_text_slash_scr_text_gml_664_0 = 2454,
+ scr_text_slash_scr_text_gml_665_0 = 2455,
+ scr_text_slash_scr_text_gml_666_0 = 2456,
+ scr_text_slash_scr_text_gml_667_0 = 2457,
+ scr_text_slash_scr_text_gml_668_0 = 2458,
+ scr_text_slash_scr_text_gml_669_0 = 2459,
+ scr_text_slash_scr_text_gml_673_0 = 2460,
+ scr_text_slash_scr_text_gml_674_0 = 2461,
+ scr_text_slash_scr_text_gml_675_0 = 2462,
+ scr_text_slash_scr_text_gml_676_0 = 2463,
+ scr_text_slash_scr_text_gml_677_0 = 2464,
+ scr_text_slash_scr_text_gml_682_0 = 2465,
+ scr_text_slash_scr_text_gml_683_0 = 2466,
+ scr_text_slash_scr_text_gml_689_0 = 2467,
+ scr_text_slash_scr_text_gml_68_0 = 2468,
+ scr_text_slash_scr_text_gml_690_0 = 2469,
+ scr_text_slash_scr_text_gml_693_0 = 2470,
+ scr_text_slash_scr_text_gml_694_0 = 2471,
+ scr_text_slash_scr_text_gml_699_0 = 2472,
+ scr_text_slash_scr_text_gml_69_0 = 2473,
+ scr_text_slash_scr_text_gml_700_0 = 2474,
+ scr_text_slash_scr_text_gml_701_0 = 2475,
+ scr_text_slash_scr_text_gml_702_0 = 2476,
+ scr_text_slash_scr_text_gml_703_0 = 2477,
+ scr_text_slash_scr_text_gml_704_0 = 2478,
+ scr_text_slash_scr_text_gml_705_0 = 2479,
+ scr_text_slash_scr_text_gml_706_0 = 2480,
+ scr_text_slash_scr_text_gml_707_0 = 2481,
+ scr_text_slash_scr_text_gml_708_0 = 2482,
+ scr_text_slash_scr_text_gml_709_0 = 2483,
+ scr_text_slash_scr_text_gml_713_0 = 2484,
+ scr_text_slash_scr_text_gml_714_0 = 2485,
+ scr_text_slash_scr_text_gml_717_0 = 2486,
+ scr_text_slash_scr_text_gml_718_0 = 2487,
+ scr_text_slash_scr_text_gml_719_0 = 2488,
+ scr_text_slash_scr_text_gml_720_0 = 2489,
+ scr_text_slash_scr_text_gml_727_0 = 2490,
+ scr_text_slash_scr_text_gml_733_0 = 2491,
+ scr_text_slash_scr_text_gml_738_0 = 2492,
+ scr_text_slash_scr_text_gml_739_0 = 2493,
+ scr_text_slash_scr_text_gml_743_0 = 2494,
+ scr_text_slash_scr_text_gml_744_0 = 2495,
+ scr_text_slash_scr_text_gml_745_0 = 2496,
+ scr_text_slash_scr_text_gml_749_0 = 2497,
+ scr_text_slash_scr_text_gml_74_0 = 2498,
+ scr_text_slash_scr_text_gml_756_0 = 2499,
+ scr_text_slash_scr_text_gml_757_0 = 2500,
+ scr_text_slash_scr_text_gml_763_0 = 2501,
+ scr_text_slash_scr_text_gml_769_0 = 2502,
+ scr_text_slash_scr_text_gml_770_0 = 2503,
+ scr_text_slash_scr_text_gml_774_0 = 2504,
+ scr_text_slash_scr_text_gml_775_0 = 2505,
+ scr_text_slash_scr_text_gml_776_0 = 2506,
+ scr_text_slash_scr_text_gml_777_0 = 2507,
+ scr_text_slash_scr_text_gml_778_0 = 2508,
+ scr_text_slash_scr_text_gml_779_0 = 2509,
+ scr_text_slash_scr_text_gml_780_0 = 2510,
+ scr_text_slash_scr_text_gml_786_0 = 2511,
+ scr_text_slash_scr_text_gml_787_0 = 2512,
+ scr_text_slash_scr_text_gml_794_0 = 2513,
+ scr_text_slash_scr_text_gml_795_0 = 2514,
+ scr_text_slash_scr_text_gml_796_0 = 2515,
+ scr_text_slash_scr_text_gml_797_0 = 2516,
+ scr_text_slash_scr_text_gml_79_0 = 2517,
+ scr_text_slash_scr_text_gml_7_0 = 2518,
+ scr_text_slash_scr_text_gml_809_0 = 2519,
+ scr_text_slash_scr_text_gml_80_0 = 2520,
+ scr_text_slash_scr_text_gml_810_0 = 2521,
+ scr_text_slash_scr_text_gml_811_0 = 2522,
+ scr_text_slash_scr_text_gml_812_0 = 2523,
+ scr_text_slash_scr_text_gml_817_0 = 2524,
+ scr_text_slash_scr_text_gml_81_0 = 2525,
+ scr_text_slash_scr_text_gml_822_0 = 2526,
+ scr_text_slash_scr_text_gml_825_0 = 2527,
+ scr_text_slash_scr_text_gml_826_0 = 2528,
+ scr_text_slash_scr_text_gml_827_0 = 2529,
+ scr_text_slash_scr_text_gml_828_0 = 2530,
+ scr_text_slash_scr_text_gml_829_0 = 2531,
+ scr_text_slash_scr_text_gml_82_0 = 2532,
+ scr_text_slash_scr_text_gml_830_0 = 2533,
+ scr_text_slash_scr_text_gml_831_0 = 2534,
+ scr_text_slash_scr_text_gml_840_0 = 2535,
+ scr_text_slash_scr_text_gml_841_0 = 2536,
+ scr_text_slash_scr_text_gml_842_0 = 2537,
+ scr_text_slash_scr_text_gml_848_0 = 2538,
+ scr_text_slash_scr_text_gml_849_0 = 2539,
+ scr_text_slash_scr_text_gml_850_0 = 2540,
+ scr_text_slash_scr_text_gml_857_0 = 2541,
+ scr_text_slash_scr_text_gml_858_0 = 2542,
+ scr_text_slash_scr_text_gml_859_0 = 2543,
+ scr_text_slash_scr_text_gml_869_0 = 2544,
+ scr_text_slash_scr_text_gml_870_0 = 2545,
+ scr_text_slash_scr_text_gml_871_0 = 2546,
+ scr_text_slash_scr_text_gml_872_0 = 2547,
+ scr_text_slash_scr_text_gml_873_0 = 2548,
+ scr_text_slash_scr_text_gml_874_0 = 2549,
+ scr_text_slash_scr_text_gml_875_0 = 2550,
+ scr_text_slash_scr_text_gml_879_0 = 2551,
+ scr_text_slash_scr_text_gml_880_0 = 2552,
+ scr_text_slash_scr_text_gml_881_0 = 2553,
+ scr_text_slash_scr_text_gml_885_0 = 2554,
+ scr_text_slash_scr_text_gml_887_0 = 2555,
+ scr_text_slash_scr_text_gml_888_0 = 2556,
+ scr_text_slash_scr_text_gml_889_0 = 2557,
+ scr_text_slash_scr_text_gml_894_0 = 2558,
+ scr_text_slash_scr_text_gml_895_0 = 2559,
+ scr_text_slash_scr_text_gml_8_0 = 2560,
+ scr_text_slash_scr_text_gml_902_0 = 2561,
+ scr_text_slash_scr_text_gml_907_0 = 2562,
+ scr_text_slash_scr_text_gml_912_0 = 2563,
+ scr_text_slash_scr_text_gml_913_0 = 2564,
+ scr_text_slash_scr_text_gml_914_0 = 2565,
+ scr_text_slash_scr_text_gml_919_0 = 2566,
+ scr_text_slash_scr_text_gml_91_0 = 2567,
+ scr_text_slash_scr_text_gml_920_0 = 2568,
+ scr_text_slash_scr_text_gml_924_0 = 2569,
+ scr_text_slash_scr_text_gml_925_0 = 2570,
+ scr_text_slash_scr_text_gml_926_0 = 2571,
+ scr_text_slash_scr_text_gml_92_0 = 2572,
+ scr_text_slash_scr_text_gml_943_0 = 2573,
+ scr_text_slash_scr_text_gml_947_0 = 2574,
+ scr_text_slash_scr_text_gml_948_0 = 2575,
+ scr_text_slash_scr_text_gml_949_0 = 2576,
+ scr_text_slash_scr_text_gml_950_0 = 2577,
+ scr_text_slash_scr_text_gml_955_0 = 2578,
+ scr_text_slash_scr_text_gml_956_0 = 2579,
+ scr_text_slash_scr_text_gml_957_0 = 2580,
+ scr_text_slash_scr_text_gml_958_0 = 2581,
+ scr_text_slash_scr_text_gml_961_0 = 2582,
+ scr_text_slash_scr_text_gml_962_0 = 2583,
+ scr_text_slash_scr_text_gml_963_0 = 2584,
+ scr_text_slash_scr_text_gml_964_0 = 2585,
+ scr_text_slash_scr_text_gml_965_0 = 2586,
+ scr_text_slash_scr_text_gml_966_0 = 2587,
+ scr_text_slash_scr_text_gml_967_0 = 2588,
+ scr_text_slash_scr_text_gml_970_0 = 2589,
+ scr_text_slash_scr_text_gml_971_0 = 2590,
+ scr_text_slash_scr_text_gml_979_0 = 2591,
+ scr_text_slash_scr_text_gml_97_0 = 2592,
+ scr_text_slash_scr_text_gml_980_0 = 2593,
+ scr_text_slash_scr_text_gml_981_0 = 2594,
+ scr_text_slash_scr_text_gml_982_0 = 2595,
+ scr_text_slash_scr_text_gml_983_0 = 2596,
+ scr_text_slash_scr_text_gml_984_0 = 2597,
+ scr_text_slash_scr_text_gml_985_0 = 2598,
+ scr_text_slash_scr_text_gml_989_0 = 2599,
+ scr_text_slash_scr_text_gml_98_0 = 2600,
+ scr_text_slash_scr_text_gml_990_0 = 2601,
+ scr_text_slash_scr_text_gml_991_0 = 2602,
+ scr_text_slash_scr_text_gml_992_0 = 2603,
+ scr_text_slash_scr_text_gml_993_0 = 2604,
+ scr_text_slash_scr_text_gml_994_0 = 2605,
+ scr_text_slash_scr_text_gml_995_0 = 2606,
+ scr_text_slash_scr_text_gml_996_0 = 2607,
+ scr_text_slash_scr_text_gml_99_0 = 2608,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_118_0 = 2609,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_119_0 = 2610,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_139_0 = 2611,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_140_0 = 2612,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_160_0 = 2613,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_161_0 = 2614,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_181_0 = 2615,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_182_0 = 2616,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_202_0 = 2617,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_203_0 = 2618,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_223_0 = 2619,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_224_0 = 2620,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_29_0 = 2621,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_30_0 = 2622,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_54_0 = 2623,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_55_0 = 2624,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_75_0 = 2625,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_76_0 = 2626,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_97_0 = 2627,
+ scr_weaponinfo_slash_scr_weaponinfo_gml_98_0 = 2628,
+ NUM_TEXTS = 2629
+};
+enum {
+ FONT_MAIN = 0,
+ FONT_SMALL = 1,
+ FONT_TINYNOELLE = 2,
+ FONT_DOTUMCHE = 3,
+};
+#endif
diff --git a/games/deltarune/src/dw.c b/games/deltarune/src/dw.c
new file mode 100644
index 00000000..e068391f
--- /dev/null
+++ b/games/deltarune/src/dw.c
@@ -0,0 +1,19 @@
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC optimize("Os")
+#endif
+/* The Dark World (rooms.h): from the fall to Castle Town, the Field, the Great Board, the Forest and the
+ * Card Castle. Each cutscene is the original's event object as a protothread. */
+#include <string.h>
+#include "battle.h"
+#include "event.h"
+#include "game.h"
+#include "rooms.h"
+#include "text.h"
+#include "world.h"
+
+void dw_setup(int room) { (void)room; }
+void dw_step(void) {}
+int dw_event(Ev *c) {
+ (void)c;
+ return 1;
+}
diff --git a/games/deltarune/src/event.c b/games/deltarune/src/event.c
new file mode 100644
index 00000000..90ac87c5
--- /dev/null
+++ b/games/deltarune/src/event.c
@@ -0,0 +1,31 @@
+/* The event that runs now (event.h). */
+#include <string.h>
+#include "event.h"
+#include "game.h"
+
+static Ev cur;
+static bool running;
+
+void say_list(int fc, int fe, const int *ids) {
+ text_clear();
+ text_face(fc, fe);
+ for (int i = 0; ids[i] >= 0; i++) text_add(str((uint16_t)ids[i]));
+ text_open();
+}
+
+void event_start(int id, Obj *self) {
+ if (running || !id) return;
+ memset(&cur, 0, sizeof cur);
+ cur.id = id, cur.self = self;
+ running = true;
+ event_update(); /* (it starts this frame: a talk opens at once) */
+}
+
+bool event_running(void) { return running; }
+bool event_blocking(void) { return running && !cur.free; }
+void event_cancel(void) { running = false; }
+
+void event_update(void) {
+ if (!running) return;
+ if (event_run(&cur)) running = false;
+}
diff --git a/games/deltarune/src/event.h b/games/deltarune/src/event.h
new file mode 100644
index 00000000..1e56333d
--- /dev/null
+++ b/games/deltarune/src/event.h
@@ -0,0 +1,48 @@
+/* Deltarune: events, the game's cutscenes and talks.
+ *
+ * An event is a C function called once a frame until it says it is done; the macros below make it read
+ * like the original's step events (each TALK waits for its text, each WAIT for its frames). They are
+ * protothreads on GCC's labels as values (a wait can be anywhere, in a switch too). The function's locals
+ * don't last over a wait: what has to is kept in c->v. One event runs at a time; while it does, Kris
+ * doesn't move unless it lets him. */
+#ifndef DR_EVENT_H
+#define DR_EVENT_H
+#include <stdbool.h>
+#include "res.h"
+#include "text.h"
+#include "world.h"
+
+typedef struct Ev {
+ int id, t;
+ void *at; /* where it waits (NULL: from the start) */
+ bool free; /* Kris walks while it runs (FREE()) */
+ int v[6];
+ Obj *self;
+} Ev;
+
+#define EV_CAT2(a, b) a##b
+#define EV_CAT(a, b) EV_CAT2(a, b)
+#define EV_BEGIN do { if (c->at) goto *c->at; } while (0); {
+#define EV_END } return 1
+#define EV_WAIT_(cond, n) do { c->at = &&EV_CAT(ev_at_, n); EV_CAT(ev_at_, n): if (!(cond)) return 0; } while (0)
+#define WAIT_UNTIL(cond) EV_WAIT_(cond, __COUNTER__)
+#define EV_WAITN_(N, n) do { c->t = (N); c->at = &&EV_CAT(ev_at_, n); EV_CAT(ev_at_, n): if (c->t-- > 0) return 0; } while (0)
+#define WAIT(N) EV_WAITN_(N, __COUNTER__)
+/* the dialogue box with the original's texts (their ids, data.h), a face first or none */
+#define TALK(...) do { say_list(0, 0, (const int[]){__VA_ARGS__, -1}); WAIT_UNTIL(!text_active()); } while (0)
+#define TALKF(fc, fe, ...) do { say_list(fc, fe, (const int[]){__VA_ARGS__, -1}); WAIT_UNTIL(!text_active()); } while (0)
+#define FREE(b) (c->free = (b))
+/* a thing walks to (x, y) at sp units a frame; WALK waits for it */
+#define WALK(o, X, Y, SP) do { obj_walk_to(o, X, Y, SP); WAIT_UNTIL(!(o)->walking); } while (0)
+#define KRIS_WALK(X, Y, SP) do { pl_walk_to(X, Y, SP); WAIT_UNTIL(!pl_walking()); } while (0)
+#define BATTLE(id) do { battle_start(id); WAIT_UNTIL(battle_over()); } while (0)
+#define FADE_TO(r, e) do { world_fade_to(r, e); WAIT_UNTIL(!world_fading()); } while (0)
+
+void say_list(int fc, int fe, const int *ids);
+void event_start(int id, Obj *self);
+bool event_running(void);
+bool event_blocking(void); /* running, and Kris can't walk */
+void event_update(void);
+void event_cancel(void);
+int event_run(Ev *c); /* rooms.c: the events, by id */
+#endif
diff --git a/games/deltarune/src/game.c b/games/deltarune/src/game.c
new file mode 100644
index 00000000..73e4d340
--- /dev/null
+++ b/games/deltarune/src/game.c
@@ -0,0 +1,160 @@
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC optimize("Os")
+#endif
+/* The game's modes and its frame (game.h): the title, the overworld, battles, menus. */
+#include <string.h>
+#include "battle.h"
+#include "event.h"
+#include "game.h"
+#include "gfx.h"
+#include "menu.h"
+#include "plat.h"
+#include "res.h"
+#include "rooms.h"
+#include "save.h"
+#include "text.h"
+#include "world.h"
+
+Save sv;
+int g_mode;
+uint32_t g_frame;
+bool g_running = true;
+uint32_t g_pressed, g_held;
+static uint32_t prev_keys;
+static uint32_t seed = 0x2018;
+
+uint32_t rnd(void) {
+ seed ^= seed << 13, seed ^= seed >> 17, seed ^= seed << 5;
+ return seed;
+}
+int rnd_n(int n) { return n > 0 ? (int)(rnd() % (uint32_t)n) : 0; }
+
+bool have_char(int c) { return sv.chr[0] == c || sv.chr[1] == c || sv.chr[2] == c; }
+int party_count(void) { return !!sv.chr[0] + !!sv.chr[1] + !!sv.chr[2]; }
+void party_add(int c) {
+ if (have_char(c)) return;
+ for (int i = 0; i < 3; i++)
+ if (!sv.chr[i]) {
+ sv.chr[i] = (uint8_t)c;
+ break;
+ }
+ follow_reset();
+}
+void party_remove(int c) {
+ for (int i = 0; i < 3; i++)
+ if (sv.chr[i] == c) {
+ for (int k = i; k < 2; k++) sv.chr[k] = sv.chr[k + 1];
+ sv.chr[2] = 0;
+ break;
+ }
+ follow_reset();
+}
+
+/* scr_gamestart: the party's first stats */
+void game_new(void) {
+ char name[12];
+ memcpy(name, sv.name, sizeof name);
+ memset(&sv, 0, sizeof sv);
+ memcpy(sv.name, name, sizeof name);
+ sv.chr[0] = CH_KRIS;
+ sv.lv = 1;
+ sv.hp[CH_KRIS] = sv.maxhp[CH_KRIS] = 90, sv.at[CH_KRIS] = 10, sv.df[CH_KRIS] = 2;
+ sv.hp[CH_SUSIE] = sv.maxhp[CH_SUSIE] = 110, sv.at[CH_SUSIE] = 14, sv.df[CH_SUSIE] = 2, sv.mag[CH_SUSIE] = 1;
+ sv.hp[CH_RALSEI] = sv.maxhp[CH_RALSEI] = 70, sv.at[CH_RALSEI] = 8, sv.df[CH_RALSEI] = 2, sv.mag[CH_RALSEI] = 7;
+ sv.weapon[CH_KRIS] = 1, sv.weapon[CH_SUSIE] = 2, sv.weapon[CH_RALSEI] = 3;
+ sv.keyitem[0] = 1; /* the Cell Phone */
+ sv.lweapon = 2, sv.larmor = 3; /* the Pencil and the Bandage (scr_gamestart's light items) */
+ sv.lhp = sv.lmaxhp = 20;
+ sv.lgold = 2;
+ g_mode = MODE_WORLD;
+ world_enter(room_krisroom, 246, 97, DIR_LEFT);
+}
+
+/* ---------------------------------------------------------------- the title */
+static int title_sel, title_t;
+static bool have_save;
+
+static void title_update(void) {
+ title_t++;
+ int n = have_save ? 2 : 1;
+ if (g_pressed & (K_UP | K_LEFT)) title_sel = (title_sel + n - 1) % n;
+ if (g_pressed & (K_DOWN | K_RIGHT)) title_sel = (title_sel + 1) % n;
+ if (g_pressed & K_Z) {
+ if (have_save && title_sel == 0) {
+ if (save_load()) return;
+ }
+ menu_name_start();
+ }
+}
+
+static void title_draw(void) {
+ gfx_rect(0, 0, SCREEN_W, SCREEN_H, C_BLACK, 255);
+ gfx_sprite(IMAGE_LOGO, 0, 160 - spr_w(IMAGE_LOGO) / 2, 70, 0, 255);
+ static const char *opts[2] = {"Continue", "New game"};
+ int n = have_save ? 2 : 1;
+ for (int i = 0; i < n; i++) {
+ const char *s = have_save ? opts[i] : opts[1];
+ int w = gfx_text_width(FONT_MAIN, s, 32);
+ uint16_t col = title_sel == i ? C_YELLOW : C_WHITE;
+ gfx_text(FONT_MAIN, 160 - w / 2, 150 + 22 * i, s, col, 255);
+ if (title_sel == i) gfx_sprite(spr_heartsmall, 0, 160 - w / 2 - 16, 154 + 22 * i, 0, 255);
+ }
+ gfx_text(FONT_SMALL, 6, 228, "OK choose", rgb565(0x808080), 255);
+}
+
+void game_init(void) {
+ save_restore_copy();
+ config_load();
+ have_save = save_exists();
+ g_mode = MODE_TITLE;
+ if (save_resume_load()) return;
+}
+
+void game_quit_save(void) {
+ if (g_mode == MODE_WORLD || g_mode == MODE_MENU || g_mode == MODE_BATTLE) save_resume_write();
+ g_running = false;
+}
+
+void game_frame(uint32_t keys) {
+ g_pressed = keys & ~prev_keys;
+ g_held = keys;
+ prev_keys = keys;
+ g_frame++;
+ if (g_pressed & K_HOME) {
+ game_quit_save();
+ return;
+ }
+ if (g_mode != MODE_TITLE) sv.time++;
+ switch (g_mode) {
+ case MODE_TITLE: title_update(); break;
+ case MODE_INTRO: menu_name_update(); break;
+ case MODE_WORLD: {
+ bool talking = text_active();
+ text_update(g_pressed, g_held);
+ if (talking) g_pressed &= ~(uint32_t)(K_Z | K_C);
+ event_update();
+ if (g_mode != MODE_WORLD) break;
+ world_update();
+ room_step();
+ break;
+ }
+ case MODE_BATTLE: battle_update(g_pressed, g_held); break;
+ case MODE_MENU: menu_update(); break;
+ case MODE_GAMEOVER: menu_gameover_update(); break;
+ default: break;
+ }
+}
+
+void game_draw(void) {
+ gfx_begin();
+ switch (g_mode) {
+ case MODE_TITLE: title_draw(); break;
+ case MODE_INTRO: menu_name_draw(); break;
+ case MODE_WORLD: world_draw(); break;
+ case MODE_BATTLE: battle_draw(); break;
+ case MODE_MENU: menu_draw(); break;
+ case MODE_GAMEOVER: menu_gameover_draw(); break;
+ default: break;
+ }
+ gfx_end();
+}
diff --git a/games/deltarune/src/game.h b/games/deltarune/src/game.h
new file mode 100644
index 00000000..5b3f43d4
--- /dev/null
+++ b/games/deltarune/src/game.h
@@ -0,0 +1,70 @@
+/* Deltarune: the game's state and its modes (title, overworld, battle, menus).
+ *
+ * Inspired by Deltarune by Toby Fox, not affiliated with him.
+ * Made by Mason Chen as part of NumPlay. */
+#ifndef DR_GAME_H
+#define DR_GAME_H
+#include <stdbool.h>
+#include <stdint.h>
+
+static inline int abs_i(int v) { return v < 0 ? -v : v; }
+static inline int clamp_i(int v, int a, int b) { return v < a ? a : v > b ? b : v; }
+static inline int min_i(int a, int b) { return a < b ? a : b; }
+static inline int max_i(int a, int b) { return a > b ? a : b; }
+static inline int sgn_i(int v) { return (v > 0) - (v < 0); }
+
+enum { MODE_TITLE, MODE_WORLD, MODE_BATTLE, MODE_MENU, MODE_GAMEOVER, MODE_SHOP, MODE_END, MODE_INTRO };
+
+/* the party's members (global.char[]: 1 Kris, 2 Susie, 3 Ralsei) */
+enum { CH_NONE, CH_KRIS, CH_SUSIE, CH_RALSEI };
+#define NFLAGS 1024
+#define NITEMS 12
+
+typedef struct {
+ /* what a SAVE keeps (the original's globals) */
+ char name[12]; /* global.truename, the vessel's */
+ int16_t plot; /* global.plot: how far the story is */
+ uint8_t chr[3]; /* global.char[]: the party, in its order */
+ int16_t hp[4], maxhp[4]; /* by member (1-3) */
+ int16_t at[4], df[4], mag[4];
+ uint8_t weapon[4], armor1[4], armor2[4];
+ uint8_t item[NITEMS], keyitem[NITEMS], weapons[NITEMS], armors[NITEMS];
+ int32_t gold, xp;
+ uint8_t lv;
+ /* the Light World's own */
+ uint8_t litem[8], lweapon, larmor;
+ int16_t lhp, lmaxhp;
+ int32_t lgold;
+ uint32_t time; /* frames played */
+ int16_t room, x, y; /* where it was saved */
+ uint8_t facing;
+ uint8_t darkzone;
+ int16_t flag[NFLAGS]; /* global.flag[] */
+} Save;
+extern Save sv;
+extern int g_mode;
+extern uint32_t g_frame;
+extern bool g_running;
+
+static inline int flag(int f) { return (unsigned)f < NFLAGS ? sv.flag[f] : 0; }
+static inline void set_flag(int f, int v) {
+ if ((unsigned)f < NFLAGS) sv.flag[f] = (int16_t)v;
+}
+static inline int plot(void) { return sv.plot; }
+static inline void set_plot(int p) { sv.plot = (int16_t)p; }
+
+void game_init(void);
+void game_frame(uint32_t keys);
+void game_draw(void);
+void game_quit_save(void);
+void game_new(void);
+uint32_t rnd(void);
+int rnd_n(int n); /* 0 .. n - 1 */
+extern uint32_t g_pressed, g_held; /* the keys pressed this frame, held */
+
+/* the party */
+bool have_char(int c);
+int party_count(void);
+void party_add(int c); /* scr_getchar */
+void party_remove(int c); /* scr_losechar */
+#endif
diff --git a/games/deltarune/src/gfx.c b/games/deltarune/src/gfx.c
new file mode 100644
index 00000000..5ddc5318
--- /dev/null
+++ b/games/deltarune/src/gfx.c
@@ -0,0 +1,483 @@
+/* The renderer: a draw list rasterised in bands of GFX_BAND rows.
+ *
+ * Each command keeps its screen bounds (clipped); a band walks the commands
+ * that cross it, in order. Sprites are row RLE (res.h): a row is runs of
+ * (skip, length, pixels), so a band only reads the rows it shows. Alpha has
+ * 33 steps (0..32), applied with the usual RGB565 trick. */
+#include <string.h>
+#include "blk.h"
+#include "gfx.h"
+#include "res.h"
+#include "world.h"
+
+enum { I_RECT, I_SPRITE, I_TILES, I_TEXT, I_LINE, I_CIRCLE, I_SPRITE_EX };
+
+typedef struct {
+ uint8_t kind, flags, alpha, font;
+ int16_t x0, y0, x1, y1; /* screen bounds, clipped: [x0, x1) x [y0, y1) */
+ int16_t cx0, cx1; /* the clip's columns */
+ int16_t x, y; /* sprite: its top-left; text: its top-left; line: start */
+ int16_t a, b; /* line: end; circle: radius; sprite_ex: scale x, scale y; text: shake, spacing */
+ uint16_t ref, sub; /* sprite, frame / text: pool offset, length */
+ uint16_t color; /* sprite: 0 its own colours, else 1 + RGB565 (in `extra`) */
+ uint16_t extra;
+ uint32_t seed;
+} Item;
+
+#ifdef HOST
+static uint16_t host_band[SCREEN_W * GFX_BAND];
+static uint16_t *band = host_band;
+#else
+static uint16_t *band;
+#endif
+void gfx_set_band_memory(uint16_t *px) {
+#ifdef HOST
+ band = px ? px : host_band;
+#else
+ band = px;
+#endif
+}
+
+static Item items[GFX_MAX_ITEMS];
+static int nitems;
+static char pool[GFX_TEXT_POOL];
+static int npool;
+static int clip_x0, clip_y0, clip_x1 = SCREEN_W, clip_y1 = SCREEN_H;
+int gfx_dropped;
+static int dropped_now;
+
+void gfx_begin(void) {
+ blk_frame();
+ nitems = 0, npool = 0, dropped_now = 0;
+ gfx_clip_all();
+}
+
+void gfx_clip(int x, int y, int w, int h) {
+ clip_x0 = x < 0 ? 0 : x, clip_y0 = y < 0 ? 0 : y;
+ clip_x1 = x + w > SCREEN_W ? SCREEN_W : x + w, clip_y1 = y + h > SCREEN_H ? SCREEN_H : y + h;
+}
+void gfx_clip_all(void) { clip_x0 = 0, clip_y0 = 0, clip_x1 = SCREEN_W, clip_y1 = SCREEN_H; }
+
+/* a new command over [x0, x1) x [y0, y1), clipped; NULL if it shows nothing */
+static Item *add(int kind, int x0, int y0, int x1, int y1) {
+ if (x0 < clip_x0) x0 = clip_x0;
+ if (y0 < clip_y0) y0 = clip_y0;
+ if (x1 > clip_x1) x1 = clip_x1;
+ if (y1 > clip_y1) y1 = clip_y1;
+ if (x0 >= x1 || y0 >= y1) return NULL;
+ if (nitems >= GFX_MAX_ITEMS) {
+ dropped_now++;
+ return NULL;
+ }
+ Item *it = &items[nitems++];
+ memset(it, 0, sizeof *it);
+ it->kind = (uint8_t)kind;
+ it->x0 = (int16_t)x0, it->y0 = (int16_t)y0, it->x1 = (int16_t)x1, it->y1 = (int16_t)y1;
+ it->cx0 = (int16_t)clip_x0, it->cx1 = (int16_t)clip_x1;
+ it->alpha = 255;
+ return it;
+}
+
+void gfx_rect(int x, int y, int w, int h, uint16_t color, uint8_t alpha) {
+ if (!alpha) return;
+ Item *it = add(I_RECT, x, y, x + w, y + h);
+ if (it) it->color = color, it->alpha = alpha;
+}
+
+void gfx_frame_rect(int x, int y, int w, int h, int t, uint16_t color) {
+ gfx_rect(x, y, w, t, color, 255);
+ gfx_rect(x, y + h - t, w, t, color, 255);
+ gfx_rect(x, y + t, t, h - 2 * t, color, 255);
+ gfx_rect(x + w - t, y + t, t, h - 2 * t, color, 255);
+}
+
+static void sprite_item(uint16_t s, int i, int x, int y, uint8_t flags, uint16_t color, bool tint, uint8_t alpha) {
+ Frame f;
+ if (!alpha || !frame_get(s, i, &f)) return;
+ int tx = x - ((flags & GFX_FLIPX) ? f.w - 1 - f.ox : f.ox), ty = y - ((flags & GFX_FLIPY) ? f.h - 1 - f.oy : f.oy);
+ Item *it = add(I_SPRITE, tx, ty, tx + f.w, ty + f.h);
+ if (!it) return;
+ it->x = (int16_t)tx, it->y = (int16_t)ty;
+ it->ref = s, it->sub = (uint16_t)i, it->flags = flags, it->alpha = alpha;
+ it->color = tint, it->extra = color;
+}
+void gfx_sprite(uint16_t s, int i, int x, int y, uint8_t flags, uint8_t alpha) { sprite_item(s, i, x, y, flags, 0, false, alpha); }
+void gfx_sprite_color(uint16_t s, int i, int x, int y, uint8_t flags, uint16_t color, uint8_t alpha) {
+ sprite_item(s, i, x, y, flags, color, true, alpha);
+}
+
+/* scaled and turned: the bounds of the turned rectangle (sin and cos in 1/256 steps of a turn) */
+static const int16_t sin_q[65] = {
+ 0, 25, 50, 75, 100, 125, 150, 175, 200, 224, 249, 273, 297, 321, 345, 369, 392, 415, 438, 460, 483, 505, 526, 548,
+ 569, 590, 610, 630, 650, 669, 688, 706, 724, 742, 759, 775, 792, 807, 822, 837, 851, 865, 878, 891, 903, 915, 926,
+ 936, 946, 955, 964, 972, 980, 987, 993, 999, 1004, 1009, 1013, 1016, 1019, 1021, 1023, 1024, 1024};
+int gfx_sin(int a) { /* a in 1/256 turn, result in 1/1024 */
+ a &= 255;
+ if (a < 64) return sin_q[a];
+ if (a < 128) return sin_q[128 - a];
+ if (a < 192) return -sin_q[a - 128];
+ return -sin_q[256 - a];
+}
+int gfx_cos(int a) { return gfx_sin(a + 64); }
+
+void gfx_sprite_ex(uint16_t s, int i, int x, int y, int scale_x, int scale_y, int angle, uint16_t color, uint8_t alpha) {
+ Frame f;
+ if (!alpha || !frame_get(s, i, &f) || !scale_x || !scale_y) return;
+ if (!(angle & 255) && scale_x == 256 && scale_y == 256) {
+ sprite_item(s, i, x, y, 0, color, color != 0, alpha);
+ return;
+ }
+ /* the corners, relative to the origin, scaled then turned */
+ int c = gfx_cos(angle), sn = gfx_sin(angle);
+ int xs[4] = {-f.ox, f.w - f.ox, -f.ox, f.w - f.ox}, ys[4] = {-f.oy, -f.oy, f.h - f.oy, f.h - f.oy};
+ int minx = 1 << 30, maxx = -(1 << 30), miny = 1 << 30, maxy = -(1 << 30);
+ for (int k = 0; k < 4; k++) {
+ int px = xs[k] * scale_x / 256, py = ys[k] * scale_y / 256;
+ int rx = (px * c - py * sn) / 1024, ry = (px * sn + py * c) / 1024;
+ if (rx < minx) minx = rx;
+ if (rx > maxx) maxx = rx;
+ if (ry < miny) miny = ry;
+ if (ry > maxy) maxy = ry;
+ }
+ Item *it = add(I_SPRITE_EX, x + minx - 1, y + miny - 1, x + maxx + 2, y + maxy + 2);
+ if (!it) return;
+ it->x = (int16_t)x, it->y = (int16_t)y;
+ it->a = (int16_t)scale_x, it->b = (int16_t)scale_y;
+ it->ref = s, it->sub = (uint16_t)i, it->alpha = alpha;
+ it->color = color != 0, it->extra = color;
+ it->seed = (uint32_t)angle;
+}
+
+void gfx_tiles(int wx, int wy, bool front) {
+ Item *it = add(I_TILES, 0, 0, SCREEN_W, SCREEN_H);
+ if (it) it->x = (int16_t)wx, it->y = (int16_t)wy, it->flags = front;
+}
+
+void gfx_line(int x0, int y0, int x1, int y1, uint16_t color) {
+ Item *it = add(I_LINE, (x0 < x1 ? x0 : x1), (y0 < y1 ? y0 : y1), (x0 > x1 ? x0 : x1) + 1, (y0 > y1 ? y0 : y1) + 1);
+ if (!it) return;
+ it->x = (int16_t)x0, it->y = (int16_t)y0, it->a = (int16_t)x1, it->b = (int16_t)y1, it->color = color;
+}
+
+void gfx_circle(int cx, int cy, int r, uint16_t color, uint8_t alpha) {
+ Item *it = add(I_CIRCLE, cx - r, cy - r, cx + r + 1, cy + r + 1);
+ if (!it) return;
+ it->x = (int16_t)cx, it->y = (int16_t)cy, it->a = (int16_t)r, it->color = color, it->alpha = alpha;
+}
+
+/* ---------------------------------------------------------------- fonts */
+typedef struct {
+ uint8_t height, first, count, flags;
+ const uint8_t *glyphs; /* 8 bytes each: advance, w, h, ox, oy, pad, bitmap offset (u16) */
+ const uint8_t *bits;
+} Font;
+static void font_get(int font, Font *f) {
+ const uint8_t *s = section(SEC_FONTS);
+ const uint8_t *p = s + rd32(s + 4 + 4 * font);
+ f->height = p[0], f->first = p[1], f->count = p[2], f->flags = p[3];
+ f->glyphs = p + 4;
+ f->bits = p + 4 + 8 * f->count;
+}
+static const uint8_t *glyph(const Font *f, uint8_t c) {
+ if (c < f->first || c >= f->first + f->count) c = '?';
+ if (c < f->first || c >= f->first + f->count) return NULL;
+ return f->glyphs + 8 * (c - f->first);
+}
+int font_height(int font) {
+ Font f;
+ font_get(font, &f);
+ return f.height;
+}
+int gfx_text_width(int font, const char *s, int n) {
+ Font f;
+ font_get(font, &f);
+ int w = 0, best = 0;
+ for (int i = 0; i < n && s[i]; i++) {
+ if (s[i] == '\n') {
+ if (w > best) best = w;
+ w = 0;
+ continue;
+ }
+ const uint8_t *g = glyph(&f, (uint8_t)s[i]);
+ if (g) w += g[0];
+ }
+ return w > best ? w : best;
+}
+
+int gfx_text_ex(int font, int x, int y, const char *s, int n, uint16_t color, int shake, uint32_t seed, int spacing) {
+ int len = 0;
+ while (len < n && s[len]) len++;
+ if (!len) return 0;
+ Font f;
+ font_get(font, &f);
+ int lines = 1;
+ for (int i = 0; i < len; i++) lines += s[i] == '\n';
+ int w = gfx_text_width(font, s, len) + len * spacing;
+ if (npool + len > GFX_TEXT_POOL) {
+ dropped_now++;
+ return w;
+ }
+ Item *it = add(I_TEXT, x - shake - 2, y - shake - 4, x + w + shake + 4, y + lines * (f.height + 2) + shake + 4);
+ if (!it) return w;
+ memcpy(pool + npool, s, (size_t)len);
+ it->ref = (uint16_t)npool, it->sub = (uint16_t)len;
+ npool += len;
+ it->x = (int16_t)x, it->y = (int16_t)y, it->font = (uint8_t)font, it->color = color;
+ it->a = (int16_t)shake, it->b = (int16_t)spacing, it->seed = seed;
+ return w;
+}
+int gfx_text(int font, int x, int y, const char *s, uint16_t color, uint8_t alpha) {
+ (void)alpha;
+ return gfx_text_ex(font, x, y, s, 0x7FFF, color, 0, 0, 0);
+}
+
+/* ---------------------------------------------------------------- rasterising */
+static inline uint16_t blend(uint16_t d, uint16_t s, uint32_t a) { /* a: 0..32 */
+ uint32_t dd = (d | (uint32_t)d << 16) & 0x07E0F81Fu;
+ uint32_t ss = (s | (uint32_t)s << 16) & 0x07E0F81Fu;
+ uint32_t r = (dd + (((ss - dd) * a) >> 5)) & 0x07E0F81Fu;
+ return (uint16_t)(r | r >> 16);
+}
+static inline uint32_t a32(uint8_t a) { return (a * 32u + 127) / 255; }
+
+static void rast_rect(const Item *it, int by0, int by1) {
+ int y0 = it->y0 > by0 ? it->y0 : by0, y1 = it->y1 < by1 ? it->y1 : by1;
+ uint32_t a = a32(it->alpha);
+ for (int y = y0; y < y1; y++) {
+ uint16_t *row = band + (y - by0) * SCREEN_W;
+ if (a >= 32)
+ for (int x = it->x0; x < it->x1; x++) row[x] = it->color;
+ else
+ for (int x = it->x0; x < it->x1; x++) row[x] = blend(row[x], it->color, a);
+ }
+}
+
+static inline uint32_t px_at(const uint8_t *p, int k, int bpp) {
+ switch (bpp) {
+ case 8: return p[k];
+ case 4: return (p[k >> 1] >> ((k & 1) * 4)) & 15;
+ case 2: return (p[k >> 2] >> ((k & 3) * 2)) & 3;
+ case 1: return (p[k >> 3] >> (k & 7)) & 1;
+ default: return 0;
+ }
+}
+
+static void rast_sprite(const Item *it, int by0, int by1) {
+ Frame f;
+ if (!frame_get(it->ref, it->sub, &f)) return;
+ int y0 = it->y0 > by0 ? it->y0 : by0, y1 = it->y1 < by1 ? it->y1 : by1;
+ uint32_t a = a32(it->alpha);
+ bool fx = it->flags & GFX_FLIPX, fy = it->flags & GFX_FLIPY;
+ uint16_t pal[256];
+ for (int k = 0; k < f.ncol; k++) pal[k] = it->color ? it->extra : rd16(f.pal + 2 * k);
+ int cx0 = it->x0, cx1 = it->x1;
+ for (int y = y0; y < y1; y++) {
+ int r = y - it->y;
+ if (fy) r = f.h - 1 - r;
+ const uint8_t *p = f.data + rd16(f.rows + 2 * r);
+ uint16_t *row = band + (y - by0) * SCREEN_W;
+ int x = 0;
+ while (x < f.w) {
+ int skip = p[0], len = p[1];
+ p += 2;
+ x += skip;
+ for (int k = 0; k < len; k++) {
+ int sx = x + k;
+ int dx = it->x + (fx ? f.w - 1 - sx : sx);
+ if (dx < cx0 || dx >= cx1) continue;
+ uint16_t c = pal[px_at(p, k, f.bpp)];
+ row[dx] = a >= 32 ? c : blend(row[dx], c, a);
+ }
+ p += (len * f.bpp + 7) >> 3;
+ x += len;
+ }
+ }
+}
+
+/* one row of a frame, unpacked: index + 1 for each pixel, 0 where clear */
+static void frame_row(const Frame *f, int r, uint8_t *out) {
+ memset(out, 0, f->w);
+ const uint8_t *p = f->data + rd16(f->rows + 2 * r);
+ int x = 0;
+ while (x < f->w) {
+ int skip = p[0], len = p[1];
+ p += 2;
+ x += skip;
+ for (int k = 0; k < len && x + k < f->w; k++) out[x + k] = (uint8_t)(px_at(p, k, f->bpp) + 1);
+ p += (len * f->bpp + 7) >> 3;
+ x += len;
+ }
+}
+
+static void rast_sprite_ex(const Item *it, int by0, int by1) {
+ Frame f;
+ if (!frame_get(it->ref, it->sub, &f) || f.w > 640) return;
+ int y0 = it->y0 > by0 ? it->y0 : by0, y1 = it->y1 < by1 ? it->y1 : by1;
+ uint32_t a = a32(it->alpha);
+ uint16_t pal[256];
+ for (int k = 0; k < f.ncol; k++) pal[k] = it->color ? it->extra : rd16(f.pal + 2 * k);
+ int c = gfx_cos((int)it->seed), s = gfx_sin((int)it->seed);
+ /* inverse: source = R(-angle) (screen - origin) / scale, in 1/1024 */
+ static uint8_t rowbuf[640];
+ int cached = -1;
+ for (int y = y0; y < y1; y++) {
+ uint16_t *row = band + (y - by0) * SCREEN_W;
+ int dy = y - it->y;
+ for (int x = it->x0; x < it->x1; x++) {
+ int dx = x - it->x;
+ int ux = (dx * c + dy * s), uy = (-dx * s + dy * c); /* x 1024 */
+ int sx = (int)((int64_t)ux * 256 / ((int64_t)it->a * 1024)) + f.ox;
+ int sy = (int)((int64_t)uy * 256 / ((int64_t)it->b * 1024)) + f.oy;
+ if (ux < 0 && (int64_t)ux * 256 % ((int64_t)it->a * 1024)) sx--;
+ if (uy < 0 && (int64_t)uy * 256 % ((int64_t)it->b * 1024)) sy--;
+ if (sx < 0 || sy < 0 || sx >= f.w || sy >= f.h) continue;
+ if (sy != cached) frame_row(&f, sy, rowbuf), cached = sy;
+ uint8_t v = rowbuf[sx];
+ if (!v) continue;
+ uint16_t col = pal[v - 1];
+ row[x] = a >= 32 ? col : blend(row[x], col, a);
+ }
+ }
+}
+
+static void rast_tiles(const Item *it, int by0, int by1) {
+ const RoomInfo *r = world_room_info();
+ if (!r) return;
+ const uint8_t *grid = it->flags ? r->fgrid : r->grid;
+ if (!grid) return;
+ int y0 = it->y0 > by0 ? it->y0 : by0, y1 = it->y1 < by1 ? it->y1 : by1;
+ int gw = r->gcols * 20, gh = r->grows * 20;
+ for (int y = y0; y < y1; y++) {
+ int gy = it->y + y;
+ if (gy < 0 || gy >= gh) continue;
+ int trow = gy / 20, ty = gy % 20;
+ uint16_t *row = band + (y - by0) * SCREEN_W;
+ int x = it->x0;
+ while (x < it->x1) {
+ int gx = it->x + x;
+ if (gx < 0) {
+ x += -gx;
+ continue;
+ }
+ if (gx >= gw) break;
+ int tcol = gx / 20, tx = gx % 20;
+ int n = 20 - tx;
+ if (x + n > it->x1) n = it->x1 - x;
+ uint16_t id = rd16(grid + 2 * (trow * r->gcols + tcol));
+ if (id != 0xFFFF) {
+ Tile t;
+ tile_get(id, &t);
+ int base = ty * 20 + tx;
+ if (t.bpp == 0) {
+ uint16_t c = rd16(t.pal);
+ for (int k = 0; k < n; k++) row[x + k] = c;
+ } else if (t.clear) {
+ for (int k = 0; k < n; k++) {
+ uint32_t v = px_at(t.bits, base + k, t.bpp);
+ if (v) row[x + k] = rd16(t.pal + 2 * v);
+ }
+ } else if (t.bpp == 8) {
+ for (int k = 0; k < n; k++) row[x + k] = rd16(t.pal + 2 * t.bits[base + k]);
+ } else {
+ uint16_t pal[16];
+ int nc = t.ncol > 16 ? 16 : t.ncol;
+ for (int k = 0; k < nc; k++) pal[k] = rd16(t.pal + 2 * k);
+ for (int k = 0; k < n; k++) row[x + k] = pal[px_at(t.bits, base + k, t.bpp)];
+ }
+ }
+ x += n;
+ }
+ }
+}
+
+/* a pseudo-random shake for letter i of a text */
+static int shake_of(uint32_t seed, int i, int axis, int amount) {
+ uint32_t h = seed * 2654435761u ^ (uint32_t)(i * 2 + axis) * 40503u;
+ h ^= h >> 13, h *= 0x5bd1e995u, h ^= h >> 15;
+ return (int)(h % (uint32_t)(2 * amount + 1)) - amount;
+}
+
+static void rast_text(const Item *it, int by0, int by1) {
+ Font f;
+ font_get(it->font, &f);
+ const char *s = pool + it->ref;
+ int x = it->x, y = it->y;
+ for (int i = 0; i < it->sub; i++) {
+ uint8_t ch = (uint8_t)s[i];
+ if (ch == '\n') {
+ x = it->x, y += f.height + 2;
+ continue;
+ }
+ const uint8_t *g = glyph(&f, ch);
+ if (!g) continue;
+ int gw = g[1], gh = g[2], gx = x + (int8_t)g[3], gy = y + (int8_t)g[4];
+ if (it->a) gx += shake_of(it->seed, i, 0, it->a), gy += shake_of(it->seed, i, 1, it->a);
+ x += g[0] + it->b;
+ if (gy >= by1 || gy + gh <= by0) continue;
+ const uint8_t *bits = f.bits + rd16(g + 6);
+ int stride = (gw + 7) >> 3;
+ for (int r = 0; r < gh; r++) {
+ int yy = gy + r;
+ if (yy < by0 || yy >= by1 || yy < it->y0 || yy >= it->y1) continue;
+ uint16_t *row = band + (yy - by0) * SCREEN_W;
+ const uint8_t *b = bits + r * stride;
+ for (int c = 0; c < gw; c++)
+ if (b[c >> 3] & (0x80 >> (c & 7))) {
+ int xx = gx + c;
+ if (xx >= it->cx0 && xx < it->cx1 && xx >= 0 && xx < SCREEN_W) row[xx] = it->color;
+ }
+ }
+ }
+}
+
+static void rast_line(const Item *it, int by0, int by1) {
+ int x0 = it->x, y0 = it->y, x1 = it->a, y1 = it->b;
+ int dx = x1 > x0 ? x1 - x0 : x0 - x1, dy = y1 > y0 ? y0 - y1 : y1 - y0;
+ int sx = x0 < x1 ? 1 : -1, sy = y0 < y1 ? 1 : -1, err = dx + dy;
+ for (;;) {
+ if (y0 >= by0 && y0 < by1 && x0 >= it->x0 && x0 < it->x1 && y0 >= it->y0 && y0 < it->y1) band[(y0 - by0) * SCREEN_W + x0] = it->color;
+ if (x0 == x1 && y0 == y1) break;
+ int e2 = 2 * err;
+ if (e2 >= dy) err += dy, x0 += sx;
+ if (e2 <= dx) err += dx, y0 += sy;
+ }
+}
+
+static void rast_circle(const Item *it, int by0, int by1) {
+ int y0 = it->y0 > by0 ? it->y0 : by0, y1 = it->y1 < by1 ? it->y1 : by1;
+ int r = it->a;
+ uint32_t a = a32(it->alpha);
+ for (int y = y0; y < y1; y++) {
+ int dy = y - it->y, w = 0;
+ while ((w + 1) * (w + 1) + dy * dy <= r * r + r) w++;
+ if (dy * dy > r * r + r) continue;
+ int xa = it->x - w, xb = it->x + w + 1;
+ if (xa < it->x0) xa = it->x0;
+ if (xb > it->x1) xb = it->x1;
+ uint16_t *row = band + (y - by0) * SCREEN_W;
+ for (int x = xa; x < xb; x++) row[x] = a >= 32 ? it->color : blend(row[x], it->color, a);
+ }
+}
+
+void gfx_end(void) {
+ gfx_dropped = dropped_now;
+ if (!band) return;
+ for (int by0 = 0; by0 < SCREEN_H; by0 += GFX_BAND) {
+ int by1 = by0 + GFX_BAND;
+ memset(band, 0, sizeof(uint16_t) * SCREEN_W * GFX_BAND);
+ for (int i = 0; i < nitems; i++) {
+ const Item *it = &items[i];
+ if (it->y1 <= by0 || it->y0 >= by1) continue;
+ switch (it->kind) {
+ case I_RECT: rast_rect(it, by0, by1); break;
+ case I_SPRITE: rast_sprite(it, by0, by1); break;
+ case I_SPRITE_EX: rast_sprite_ex(it, by0, by1); break;
+ case I_TILES: rast_tiles(it, by0, by1); break;
+ case I_TEXT: rast_text(it, by0, by1); break;
+ case I_LINE: rast_line(it, by0, by1); break;
+ case I_CIRCLE: rast_circle(it, by0, by1); break;
+ }
+ }
+ plat_push(0, by0, SCREEN_W, GFX_BAND, band);
+ }
+}
diff --git a/games/deltarune/src/gfx.h b/games/deltarune/src/gfx.h
new file mode 100644
index 00000000..c7f917cc
--- /dev/null
+++ b/games/deltarune/src/gfx.h
@@ -0,0 +1,63 @@
+/* Deltarune: drawing.
+ *
+ * A frame is a draw list, rasterised band by band (the calculator has no
+ * frame buffer) and pushed to the screen. Commands are in screen pixels and
+ * painted in the order given. The Light World is the original's 320 x 240, the
+ * calculator's own size; the Dark World's 640 x 480 is halved (its pictures,
+ * drawn twice their size there, are drawn as they are). */
+#ifndef DR_GFX_H
+#define DR_GFX_H
+#include <stdbool.h>
+#include <stdint.h>
+#include "plat.h"
+
+static inline uint16_t rgb565(uint32_t rgb) { /* 0xRRGGBB */
+ return (uint16_t)(((rgb >> 8) & 0xF800) | ((rgb >> 5) & 0x07E0) | ((rgb >> 3) & 0x001F));
+}
+#define C_BLACK 0x0000
+#define C_WHITE 0xFFFF
+#define C_RED 0xF800
+#define C_YELLOW 0xFFE0
+
+enum { GFX_FLIPX = 1, GFX_FLIPY = 2 };
+
+#define GFX_BAND 16 /* screen rows rasterised at a time */
+#define GFX_MAX_ITEMS 400 /* commands in a frame (more are dropped) */
+#define GFX_TEXT_POOL 1536 /* bytes of text in a frame */
+
+/* the band: SCREEN_W * GFX_BAND pixels, the caller's (main's stack on the calculator) */
+void gfx_set_band_memory(uint16_t *px);
+void gfx_begin(void);
+void gfx_end(void);
+/* later commands draw only inside this screen rectangle (gfx_clip_all(): all of it) */
+void gfx_clip(int x, int y, int w, int h);
+void gfx_clip_all(void);
+
+void gfx_rect(int x, int y, int w, int h, uint16_t color, uint8_t alpha); /* alpha 0 (none) to 255 */
+void gfx_frame_rect(int x, int y, int w, int h, int t, uint16_t color); /* an outline t pixels thick */
+/* frame i of sprite s (SPR_* in data.h), its origin at (x, y); alpha 255 opaque */
+void gfx_sprite(uint16_t s, int i, int x, int y, uint8_t flags, uint8_t alpha);
+/* the same, every opaque pixel in one colour (a flash, a silhouette) */
+void gfx_sprite_color(uint16_t s, int i, int x, int y, uint8_t flags, uint16_t color, uint8_t alpha);
+/* the same, scaled (fixed point 8.8, 256 = 1) around its origin, and turned by angle (0-255 for a turn) */
+void gfx_sprite_ex(uint16_t s, int i, int x, int y, int scale_x, int scale_y, int angle, uint16_t color, uint8_t alpha);
+/* the room's tiles (world.c gives them), its point (wx, wy) in screen pixels at the screen's top-left; front:
+ * those drawn over the characters */
+void gfx_tiles(int wx, int wy, bool front);
+/* text in a font (FONT_* in data.h), its top-left at (x, y); returns its width. '\n' starts a line */
+int gfx_text(int font, int x, int y, const char *s, uint16_t color, uint8_t alpha);
+/* the same, each letter shaken by up to `shake` pixels (the game's shaking text), seeded */
+int gfx_text_ex(int font, int x, int y, const char *s, int n, uint16_t color, int shake, uint32_t seed, int spacing);
+int gfx_text_width(int font, const char *s, int n);
+int font_height(int font);
+/* a line one pixel wide */
+void gfx_line(int x0, int y0, int x1, int y1, uint16_t color);
+/* sine and cosine of a in 1/256 turns, in 1/1024 */
+int gfx_sin(int a);
+int gfx_cos(int a);
+/* a solid circle */
+void gfx_circle(int cx, int cy, int r, uint16_t color, uint8_t alpha);
+
+/* how many commands the last frame dropped */
+extern int gfx_dropped;
+#endif
diff --git a/games/deltarune/src/gmtexts.c b/games/deltarune/src/gmtexts.c
new file mode 100644
index 00000000..fd674d47
--- /dev/null
+++ b/games/deltarune/src/gmtexts.c
@@ -0,0 +1,6167 @@
+/* made by tools/texts.py from the original's code: what its signs, beds and people say (see
+ * gmtexts.h). Its ifs and gotos are the original's; what the game has no use for stays a comment. */
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC optimize("Os")
+#endif
+#include "game.h"
+#include "gmtexts.h"
+#include "world.h"
+
+#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunused-label"
+#endif
+
+void gm_readable_room1(TxtCtx *c) {
+ int tempvar = 0;
+ /* gml: myinteract = 3 */
+ c->msc = 0;
+ /* gml: global.typer = 5 */
+ if (!(sv.darkzone == 1)) goto L68;
+ /* gml: global.typer = 6 */
+L68:;
+ c->fe = 0;
+ c->fc = 0;
+ /* gml: global.interact = 1 */
+ /* gml: with (obj_darkcontroller) { // to L124 */
+ /* gml: charcon = 0 */
+ /* gml: } // end with */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_11_0);
+ if (!(g_room == room_krisroom)) goto L976;
+ goto L280; /* gml: if !(y < 150) goto L280 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_17_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_18_0);
+ goto L316;
+L280:;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_22_0);
+L316:;
+ goto L612; /* gml: if !(x > 100) goto L612 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_28_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_29_0);
+ if (!(0 == 1)) goto L464;
+ MSG(1, obj_readable_room1_slash_Other_10_gml_30_0);
+L464:;
+ if (!(0 == 2)) goto L556;
+ MSG(1, obj_readable_room1_slash_Other_10_gml_33_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_34_0);
+L556:;
+ goto L612; /* gml: if !(read > 0) goto L612 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_38_0);
+L612:;
+ goto L668; /* gml: if !(x > 136) goto L668 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_45_0);
+L668:;
+ goto L724; /* gml: if !(x > 192) goto L724 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_50_0);
+L724:;
+ goto L920; /* gml: if !(x > 220) goto L920 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_55_0);
+ goto L868; /* gml: if !((global.tempflag[10] == 1) && (global.plot < 10)) goto L868 */
+ c->msc = 402;
+ /* gml: scr_text(global.msc) */
+L868:;
+ if (!(sv.plot >= 250)) goto L920;
+ c->msc = 400;
+ /* gml: scr_text(global.msc) */
+L920:;
+ goto L976; /* gml: if !(x > 250) goto L976 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_71_0);
+L976:;
+ if (!(g_room == room_krishallway)) goto L1456;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_79_0);
+ goto L1088; /* gml: if !(x > 120) goto L1088 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_83_0);
+L1088:;
+ goto L1144; /* gml: if !(x > 160) goto L1144 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_87_0);
+L1144:;
+ goto L1200; /* gml: if !(x > 220) goto L1200 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_91_0);
+L1200:;
+ goto L1456; /* gml: if !(x > 320) goto L1456 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_96_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_97_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_98_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_99_0);
+ MSG(4, obj_readable_room1_slash_Other_10_gml_100_0);
+ goto L1456; /* gml: if !(read > 0) goto L1456 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_103_0);
+L1456:;
+ if (!(g_room == room_torhouse)) goto L2044;
+ goto L1532; /* gml: if !(x > 190) goto L1532 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_113_0);
+L1532:;
+ goto L1588; /* gml: if !(x > 220) goto L1588 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_118_0);
+L1588:;
+ goto L1700; /* gml: if !(x > 260) goto L1700 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_123_0);
+ if (!(sv.plot >= 250)) goto L1700;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_126_0);
+L1700:;
+ goto L1756; /* gml: if !(x > 300) goto L1756 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_132_0);
+L1756:;
+ goto L1876; /* gml: if !(x > 340) goto L1876 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_137_0);
+ if (!(sv.flag[262] >= 4)) goto L1876;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_140_0);
+L1876:;
+ goto L1932; /* gml: if !(x > 369) goto L1932 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_146_0);
+L1932:;
+ goto L1988; /* gml: if !(x > 440) goto L1988 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_151_0);
+L1988:;
+ goto L2044; /* gml: if !(x > 560) goto L2044 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_157_0);
+L2044:;
+ if (!(g_room == room_torbathroom)) goto L2364;
+ goto L2156; /* gml: if !(x >= 100) goto L2156 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_167_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_168_0);
+L2156:;
+ goto L2236; /* gml: if !((x >= 160) && (x <= 190)) goto L2236 */
+ c->msc = 355;
+ /* gml: scr_text(global.msc) */
+L2236:;
+ goto L2364; /* gml: if !(x >= 190) goto L2364 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_177_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_178_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_179_0);
+L2364:;
+ if (!(g_room == room_schoollobby)) goto L3692;
+ goto L2748; /* gml: if !((x >= 140) && (x < 240)) goto L2748 */
+ if (!(tempvar == 0)) goto L2488;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_190_0);
+L2488:;
+ if (!(tempvar == 1)) goto L2544;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_191_0);
+L2544:;
+ if (!(tempvar == 2)) goto L2600;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_192_0);
+L2600:;
+ if (!(tempvar == 3)) goto L2656;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_193_0);
+L2656:;
+ if (!(tempvar >= 4)) goto L2712;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_194_0);
+L2712:;
+ /* gml: with (obj_readable_room1) { // to L2744 */
+ tempvar = (tempvar + 1);
+ /* gml: } // end with */
+L2748:;
+ goto L2804; /* gml: if !(x == 240) goto L2804 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_199_0);
+L2804:;
+ goto L2932; /* gml: if !(x >= 280) goto L2932 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_204_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_205_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_206_0);
+L2932:;
+ goto L3024; /* gml: if !(x < 140) goto L3024 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_211_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_212_0);
+L3024:;
+ goto L3396; /* gml: if !(x >= 520) goto L3396 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_217_0);
+ goto L3136; /* gml: if !(read == 1) goto L3136 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_218_0);
+L3136:;
+ goto L3192; /* gml: if !(read >= 2) goto L3192 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_219_0);
+L3192:;
+ if (!(sv.plot < 10)) goto L3396;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_223_0);
+ FACE(1, 'S', 1);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_225_0);
+ goto L3396; /* gml: if !(read >= 1) goto L3396 */
+ FACE(0, 'S', 9);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_230_0);
+L3396:;
+ goto L3524; /* gml: if !(x >= 560) goto L3524 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_237_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_238_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_239_0);
+L3524:;
+ goto L3580; /* gml: if !(x >= 690) goto L3580 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_245_0);
+L3580:;
+ goto L3636; /* gml: if !(x == 760) goto L3636 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_251_0);
+L3636:;
+ goto L3692; /* gml: if !(x == 780) goto L3692 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_255_0);
+L3692:;
+ if (!(g_room == room_alphysclass)) goto L4372;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_264_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_265_0);
+ if (!(sv.plot >= 250)) goto L3876;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_269_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_270_0);
+L3876:;
+ goto L4004; /* gml: if !(x > 240) goto L4004 */
+ c->fe = 1;
+ c->fc = 11;
+ /* gml: global.typer = 20 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_278_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_279_0);
+L4004:;
+ goto L4188; /* gml: if !(x < 200) goto L4188 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_284_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_285_0);
+ if (!(sv.plot >= 250)) goto L4188;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_289_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_290_0);
+L4188:;
+ goto L4244; /* gml: if !(x < 150) goto L4244 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_298_0);
+L4244:;
+ goto L4372; /* gml: if !(x < 80) goto L4372 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_304_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_305_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_306_0);
+L4372:;
+ if (!(g_room == room_torielclass)) goto L5040;
+ goto L4928; /* gml: if !(y <= (room_height / 2)) goto L4928 */
+ goto L4520; /* gml: if !(x >= 100) goto L4520 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_318_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_319_0);
+L4520:;
+ goto L4612; /* gml: if !(x >= 130) goto L4612 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_323_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_324_0);
+L4612:;
+ goto L4664; /* gml: if !(x >= 170) goto L4664 */
+ c->msc = 350;
+ /* gml: scr_text(global.msc) */
+L4664:;
+ goto L4720; /* gml: if !(x >= 198) goto L4720 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_333_0);
+L4720:;
+ goto L4812; /* gml: if !(x >= 204) goto L4812 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_338_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_339_0);
+L4812:;
+ goto L4868; /* gml: if !(x >= 230) goto L4868 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_343_0);
+L4868:;
+ goto L4924; /* gml: if !(x >= 256) goto L4924 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_347_0);
+L4924:;
+ goto L5040;
+L4928:;
+ goto L5004; /* gml: if !(x <= (room_width / 2)) goto L5004 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_354_0);
+ goto L5040;
+L5004:;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_358_0);
+L5040:;
+ if (!(g_room == room_schooldoor)) goto L5096;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_366_0);
+L5096:;
+ if (!(g_room == room_school_unusedroom)) goto L5544;
+ goto L5172; /* gml: if !(x < 80) goto L5172 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_371_0);
+L5172:;
+ goto L5228; /* gml: if !(x > 100) goto L5228 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_372_0);
+L5228:;
+ goto L5312; /* gml: if !((x > 160) && (y < 100)) goto L5312 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_373_0);
+L5312:;
+ goto L5396; /* gml: if !((x > 160) && (y > 100)) goto L5396 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_374_0);
+L5396:;
+ goto L5452; /* gml: if !(x > 220) goto L5452 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_375_0);
+L5452:;
+ goto L5544; /* gml: if !(x > 250) goto L5544 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_378_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_379_0);
+L5544:;
+ if (!(g_room == room_hospital_lobby)) goto L5708;
+ goto L5656; /* gml: if !(x <= 160) goto L5656 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_388_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_389_0);
+L5656:;
+ goto L5708; /* gml: if !(x >= 160) goto L5708 */
+ c->msc = 360;
+ /* gml: scr_text(global.msc) */
+L5708:;
+ if (!((g_room == room_dark3) || (g_room == room_dark7))) goto L5812;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_400_0);
+L5812:;
+ if (!(g_room == room_dark3a)) goto L5864;
+ c->msc = 110;
+ c->arg = 110; gm_scr_text(c);
+L5864:;
+ if (!(g_room == room_dark_eyepuzzle)) goto L5920;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_411_0);
+L5920:;
+ if (!(g_room == room_castle_town)) goto L6068;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_416_0);
+ goto L6032; /* gml: if !(read >= 1) goto L6032 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_419_0);
+L6032:;
+ /* gml: with (obj_readable_room1) { // to L6064 */
+ /* gml: read = (read + 1) */
+ /* gml: } // end with */
+L6068:;
+ if (!(g_room == room_castle_front)) goto L6336;
+ /* gml: global.typer = 31 */
+ c->fc = 2;
+ c->fe = 0;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_429_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_430_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_431_0);
+ goto L6336; /* gml: if !(read > 0) goto L6336 */
+ c->fe = 1;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_435_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_436_0);
+L6336:;
+ if (!(g_room == room_castle_outskirts)) goto L6464;
+ /* gml: global.typer = 31 */
+ c->fc = 2;
+ c->fe = 1;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_446_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_447_0);
+L6464:;
+ if (!(g_room == room_field_puzzle1)) goto L6520;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_452_0);
+L6520:;
+ if (!(g_room == room_field_shop1)) goto L6612;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_457_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_458_0);
+L6612:;
+ if (!((g_room == room_field_checkers4) || (g_room == room_field_checkers6))) goto L6716;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_465_0);
+L6716:;
+ if (!(g_room == room_field_puzzletutorial)) goto L6768;
+ c->msc = 250;
+ /* gml: scr_text(global.msc) */
+L6768:;
+ if (!(g_room == room_field_checkers5)) goto L6824;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_476_0);
+L6824:;
+ if (!(g_room == room_forest_area3)) goto L7556;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_481_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_482_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_483_0);
+ goto L7008; /* gml: if !(read >= 1) goto L7008 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_486_0);
+L7008:;
+ goto L7556; /* gml: if !(y >= 400) goto L7556 */
+ goto L7252; /* gml: if !(x < 600) goto L7252 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_493_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_494_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_495_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_496_0);
+ goto L7248; /* gml: if !(read >= 1) goto L7248 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_499_0);
+L7248:;
+ goto L7488;
+L7252:;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_504_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_505_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_506_0);
+ goto L7488; /* gml: if !(x >= 1100) goto L7488 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_510_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_511_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_512_0);
+L7488:;
+ if (!(sv.plot >= 75)) goto L7556;
+ /* gml: holecon = 999 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_519_0);
+L7556:;
+ if (!(g_room == room_forest_area5)) goto L8324;
+ goto L7668; /* gml: if !(x <= 340) goto L7668 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_530_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_531_0);
+L7668:;
+ goto L8232; /* gml: if !((x >= 600) && (x <= 1300)) goto L8232 */
+ if (!(sv.flag[237] == 0)) goto L8196;
+ sv.flag[237] = 1;
+ /* gml: snd_play(103) */
+ /* gml: instance_create(0, 0, 140) */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_540_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_541_0);
+ goto L8084; /* gml: if !(obj_mainchara.becamebattle == 0) goto L8084 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_544_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_545_0);
+ FACE(2, 'R', 1);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_547_0);
+ MSG(4, obj_readable_room1_slash_Other_10_gml_548_0);
+L8084:;
+ /* gml: with (obj_tempblock_room) { // to L8188 */
+ /* gml: with ((tree)) { // to L8120 */
+ /* gml: instance_destroy() */
+ /* gml: } // end with */
+ /* gml: with ((block)) { // to L8152 */
+ /* gml: instance_destroy() */
+ /* gml: } // end with */
+ /* gml: with ((talkto)) { // to L8184 */
+ /* gml: instance_destroy() */
+ /* gml: } // end with */
+ /* gml: } // end with */
+ goto L8232;
+L8196:;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_559_0);
+L8232:;
+ goto L8324; /* gml: if !(x >= 1350) goto L8324 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_564_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_565_0);
+L8324:;
+ if (!(g_room == room_forest_starwalker)) goto L8504;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_571_0);
+ goto L8480; /* gml: if !(read == 0) goto L8480 */
+ /* gml: snd_play(97) */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_575_0);
+ sv.gold = (sv.gold + 40);
+L8480:;
+ /* gml: read = (read + 1) */
+L8504:;
+ if (!(g_room == room_cc_prison_cells)) goto L9372;
+ sv.flag[231] = (sv.flag[231] + 1);
+ goto L8716; /* gml: if !(x < 400) goto L8716 */
+ c->fc = 2;
+ /* gml: global.typer = 31 */
+ c->fe = 0;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_591_0);
+ FACE(1, 'S', 7);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_593_0);
+L8716:;
+ goto L8892; /* gml: if !((x >= 600) && (y < 200)) goto L8892 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_598_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_599_0);
+ goto L8892; /* gml: if !(read >= 1) goto L8892 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_602_0);
+L8892:;
+ goto L9124; /* gml: if !((x >= 600) && (y > 200)) goto L9124 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_608_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_609_0);
+ goto L9068; /* gml: if !(read >= 1) goto L9068 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_610_0);
+L9068:;
+ if (!(sv.plot >= 155)) goto L9124;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_613_0);
+L9124:;
+ goto L9372; /* gml: if !(x >= 720) goto L9372 */
+ c->msc = 295;
+ /* gml: scr_text(global.msc) */
+ if (!have_char(2)) goto L9372;
+ /* gml: global.typer = 30 */
+ c->fc = 1;
+ c->fe = 6;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_626_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_627_0);
+ if (!(sv.flag[106] == 1)) goto L9372;
+ MSG(1, obj_readable_room1_slash_Other_10_gml_628_0);
+L9372:;
+ if (!(g_room == room_field_boxpuzzle)) goto L9464;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_636_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_637_0);
+L9464:;
+ if (!(g_room == room_forest_thrashmaker)) goto L9816;
+ c->fc = 2;
+ c->fe = 5;
+ /* gml: global.typer = 31 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_647_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_648_0);
+ if (!have_char(2)) goto L9816;
+ c->fc = 1;
+ c->fe = 0;
+ /* gml: global.typer = 30 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_654_0);
+ FACE(1, 'R', 1);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_656_0);
+ FACE(3, 'S', 2);
+ MSG(4, obj_readable_room1_slash_Other_10_gml_658_0);
+L9816:;
+ if (!(g_room == room_forest_area1)) goto L9872;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_666_0);
+L9872:;
+ if (!(g_room == room_man)) goto L10120;
+ goto L10020; /* gml: if !(y >= 220) goto L10020 */
+ if (!(sv.flag[910] < 2)) goto L9980;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_673_0);
+ goto L10016;
+L9980:;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_675_0);
+L10016:;
+ goto L10120;
+L10020:;
+ if (!(sv.flag[910] >= 2)) goto L10088;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_682_0);
+ goto L10120;
+L10088:;
+ c->msc = 600;
+ /* gml: scr_text(global.msc) */
+L10120:;
+ if (!(g_room == room_cc_throneroom)) goto L10232;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_695_0);
+ goto L10232; /* gml: if !(y >= 260) goto L10232 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_698_0);
+L10232:;
+ if (!(g_room == room_cc_prison_prejoker)) goto L10428;
+ /* gml: global.facing = 1 */
+ /* gml: with (obj_caterpillarchara) { // to L10288 */
+ /* gml: sprite_index = rsprite */
+ /* gml: } // end with */
+ /* gml: global.typer = 35 */
+ c->fc = 0;
+ c->msc = 405;
+ if (!(gm_keyitemcheck(5) == 1)) goto L10368;
+ c->msc = 410;
+L10368:;
+ if (!(sv.flag[241] >= 5)) goto L10408;
+ c->msc = 415;
+L10408:;
+ /* gml: scr_text(global.msc) */
+L10428:;
+ if (!(g_room == room_cc_1f)) goto L10816;
+ goto L10504; /* gml: if !(x < 500) goto L10504 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_721_0);
+L10504:;
+ goto L10724; /* gml: if !((x < 1300) && (x > 500)) goto L10724 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_726_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_727_0);
+ if (!(sv.flag[240] == 1)) goto L10724;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_730_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_731_0);
+L10724:;
+ goto L10816; /* gml: if !(x > 1300) goto L10816 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_738_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_739_0);
+L10816:;
+ if (!(g_room == room_cc_rudinn)) goto L10928;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_746_0);
+ goto L10928; /* gml: if !(y < 130) goto L10928 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_749_0);
+L10928:;
+ if (!(g_room == room_cc_2f)) goto L11040;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_755_0);
+ goto L11040; /* gml: if !(y < 250) goto L11040 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_758_0);
+L11040:;
+ if (!(g_room == room_cc_rurus1)) goto L11344;
+ c->fc = 18;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_766_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_767_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_768_0);
+ goto L11344; /* gml: if !(read >= 1) goto L11344 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_772_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_773_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_774_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_775_0);
+L11344:;
+ if (!(g_room == room_cc_rurus2)) goto L11576;
+ c->fc = 18;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_782_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_783_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_784_0);
+ goto L11576; /* gml: if !(read >= 1) goto L11576 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_788_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_789_0);
+L11576:;
+ if (!(g_room == room_cc_6f)) goto L11688;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_796_0);
+ goto L11688; /* gml: if !(read >= 1) goto L11688 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_799_0);
+L11688:;
+ if (!(g_room == room_cc_hathy)) goto L12036;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_805_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_806_0);
+ goto L11864; /* gml: if !(read == 0) goto L11864 */
+ /* gml: with (obj_readable_room1) { // to L11860 */
+ if (!(sv.flag[252] == 0)) goto L11860;
+ tempvar = (tempvar + 1);
+L11860:;
+ /* gml: } // end with */
+L11864:;
+ if (!((tempvar == 4) && (sv.flag[252] == 0))) goto L12036;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_815_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_816_0);
+ sv.flag[252] = 1;
+ /* gml: with (obj_readable_room1) { // to L12032 */
+ tempvar = 99;
+ /* gml: } // end with */
+L12036:;
+ if (!(g_room == room_cc_clover)) goto L12332;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_824_0);
+ goto L12332; /* gml: if !(x > (room_width / 2)) goto L12332 */
+ goto L12296; /* gml: if !(y < (room_height / 2)) goto L12296 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_829_0);
+ goto L12292; /* gml: if !(read >= 1) goto L12292 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_832_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_833_0);
+L12292:;
+ goto L12332;
+L12296:;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_838_0);
+L12332:;
+ if (!(g_room == room_cc_lancer)) goto L12884;
+ goto L12652; /* gml: if !(y <= 220) goto L12652 */
+ goto L12428; /* gml: if !(x < 200) goto L12428 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_849_0);
+L12428:;
+ goto L12512; /* gml: if !((x > 300) && (x < 350)) goto L12512 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_853_0);
+L12512:;
+ goto L12592; /* gml: if !((x > 350) && (x < 400)) goto L12592 */
+ c->msc = 430;
+ /* gml: scr_text(global.msc) */
+L12592:;
+ goto L12648; /* gml: if !(x >= 400) goto L12648 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_862_0);
+L12648:;
+ goto L12884;
+L12652:;
+ goto L12744; /* gml: if !(x < 200) goto L12744 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_869_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_870_0);
+L12744:;
+ goto L12828; /* gml: if !((x > 250) && (x < 320)) goto L12828 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_874_0);
+L12828:;
+ goto L12884; /* gml: if !(x > 320) goto L12884 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_878_0);
+L12884:;
+ if (!(g_room == room_cc_prisonelevator)) goto L12936;
+ c->msc = 435;
+ /* gml: scr_text(global.msc) */
+L12936:;
+ if (!(g_room == room_cc_elevator)) goto L12988;
+ c->msc = 440;
+ /* gml: scr_text(global.msc) */
+L12988:;
+ if (!(g_room == room_cc_prisonlancer)) goto L13684;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_898_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_899_0);
+ goto L13684; /* gml: if !(x >= 560) goto L13684 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_902_0);
+ if (!(have_char(2) && have_char(3))) goto L13684;
+ c->fe = 0;
+ c->fc = 2;
+ /* gml: global.typer = 31 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_908_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_909_0);
+ FACE(2, 'S', 7);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_911_0);
+ MSG(4, obj_readable_room1_slash_Other_10_gml_912_0);
+ FACE(5, 'R', 6);
+ MSG(6, obj_readable_room1_slash_Other_10_gml_914_0);
+ FACE(7, 'S', 2);
+ MSG(8, obj_readable_room1_slash_Other_10_gml_916_0);
+ MSG(9, obj_readable_room1_slash_Other_10_gml_917_0);
+ goto L13684; /* gml: if !(read >= 1) goto L13684 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_920_0);
+ FACE(1, 'S', 2);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_922_0);
+L13684:;
+ if (!(g_room == room_hospital_rudy)) goto L15168;
+ goto L14016; /* gml: if !((x <= 75) && (y < 160)) goto L14016 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_932_0);
+ FACE(1, 'r', 0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_934_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_935_0);
+ MSG(4, obj_readable_room1_slash_Other_10_gml_936_0);
+ MSG(5, obj_readable_room1_slash_Other_10_gml_937_0);
+ goto L14016; /* gml: if !(read >= 1) goto L14016 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_940_0);
+L14016:;
+ goto L14304; /* gml: if !((x <= 75) && (y > 160)) goto L14304 */
+ if (!(sv.flag[255] < 2)) goto L14204;
+ /* gml: global.typer = 55 */
+ c->fc = 15;
+ c->fe = 4;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_952_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_953_0);
+ goto L14304;
+L14204:;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_957_0);
+ FACE(1, 'r', 2);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_959_0);
+L14304:;
+ goto L14572; /* gml: if !((x >= 95) && (x <= 105)) goto L14572 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_969_0);
+ FACE(1, 'r', 2);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_971_0);
+ goto L14572; /* gml: if !(read >= 1) goto L14572 */
+ FACE(1, 'r', 2);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_975_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_976_0);
+L14572:;
+ goto L14920; /* gml: if !(x == 205) goto L14920 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_982_0);
+ FACE(1, 'r', 4);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_984_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_985_0);
+ MSG(4, obj_readable_room1_slash_Other_10_gml_986_0);
+ goto L14920; /* gml: if !(read >= 1) goto L14920 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_989_0);
+ FACE(1, 'r', 0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_991_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_992_0);
+L14920:;
+ goto L15112; /* gml: if !(x > 215) goto L15112 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_999_0);
+ FACE(1, 'r', 0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1001_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_1002_0);
+ MSG(4, obj_readable_room1_slash_Other_10_gml_1003_0);
+L15112:;
+ goto L15168; /* gml: if !(x > 230) goto L15168 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1011_0);
+L15168:;
+ if (!(g_room == room_hospital_hallway)) goto L15224;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1017_0);
+L15224:;
+ if (!(g_room == room_hospital_room2)) goto L15728;
+ goto L15452; /* gml: if !(y >= 160) goto L15452 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1024_0);
+ if (!(tempvar >= 1)) goto L15392;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1027_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1028_0);
+L15392:;
+ /* gml: with (obj_readable_room1) { // to L15444 */
+ goto L15444; /* gml: if !(y >= 160) goto L15444 */
+ tempvar = (tempvar + 1);
+L15444:;
+ /* gml: } // end with */
+ goto L15728;
+L15452:;
+ goto L15544; /* gml: if !(x <= 140) goto L15544 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1041_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1042_0);
+L15544:;
+ goto L15636; /* gml: if !(x >= 150) goto L15636 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1046_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1047_0);
+L15636:;
+ goto L15728; /* gml: if !(x >= 200) goto L15728 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1051_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1052_0);
+L15728:;
+ if (!(g_room == room_library)) goto L16860;
+ goto L16004; /* gml: if !(x < 80) goto L16004 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1063_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1064_0);
+ goto L16004; /* gml: if !(y > 80) goto L16004 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1069_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1070_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1071_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_1072_0);
+L16004:;
+ goto L16188; /* gml: if !(x > 70) goto L16188 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1080_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1081_0);
+ goto L16188; /* gml: if !(y > 80) goto L16188 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1085_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1086_0);
+L16188:;
+ goto L16588; /* gml: if !(x > 110) goto L16588 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1093_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1094_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1095_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_1096_0);
+ MSG(4, obj_readable_room1_slash_Other_10_gml_1097_0);
+ MSG(5, obj_readable_room1_slash_Other_10_gml_1098_0);
+ goto L16588; /* gml: if !(read >= 1) goto L16588 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1102_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1103_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1104_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_1105_0);
+L16588:;
+ goto L16680; /* gml: if !(x > 150) goto L16680 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1111_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1112_0);
+L16680:;
+ goto L16808; /* gml: if !(x > 190) goto L16808 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1117_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1118_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1119_0);
+L16808:;
+ goto L16860; /* gml: if !(x > 220) goto L16860 */
+ c->msc = 185;
+ /* gml: scr_text(global.msc) */
+L16860:;
+ if (!(g_room == room_graveyard)) goto L17084;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1134_0);
+ goto L16972; /* gml: if !(x >= 150) goto L16972 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1137_0);
+L16972:;
+ goto L17028; /* gml: if !(x >= 200) goto L17028 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1141_0);
+L17028:;
+ goto L17084; /* gml: if !(x >= 290) goto L17084 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1145_0);
+L17084:;
+ if (!(g_room == room_townhall)) goto L17272;
+ goto L17160; /* gml: if !(x >= 180) goto L17160 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1158_0);
+L17160:;
+ goto L17216; /* gml: if !(x >= 240) goto L17216 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1163_0);
+L17216:;
+ goto L17272; /* gml: if !(y >= 160) goto L17272 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1166_0);
+L17272:;
+ if (!(g_room == room_beach)) goto L17324;
+ c->msc = 192;
+ /* gml: scr_text(global.msc) */
+L17324:;
+ if (!(g_room == room_diner)) goto L17380;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1178_0);
+L17380:;
+ if (!(g_room == room_flowershop_1f)) goto L17720;
+ goto L17588; /* gml: if !(y > 100) goto L17588 */
+ goto L17476; /* gml: if !(x < 100) goto L17476 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1185_0);
+L17476:;
+ goto L17532; /* gml: if !(x < 70) goto L17532 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1186_0);
+L17532:;
+ goto L17588; /* gml: if !(x < 50) goto L17588 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1187_0);
+L17588:;
+ goto L17720; /* gml: if !(y < 80) goto L17720 */
+ goto L17664; /* gml: if !(x == 140) goto L17664 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1192_0);
+L17664:;
+ goto L17720; /* gml: if !(x != 140) goto L17720 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1193_0);
+L17720:;
+ if (!(g_room == room_flowershop_2f)) goto L18472;
+ goto L17796; /* gml: if !(y < 50) goto L17796 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1202_0);
+L17796:;
+ goto L18020; /* gml: if !(y > 60) goto L18020 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1206_0);
+ goto L17908; /* gml: if !(x >= 60) goto L17908 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1207_0);
+L17908:;
+ goto L17964; /* gml: if !(x >= 180) goto L17964 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1209_0);
+L17964:;
+ goto L18020; /* gml: if !(x >= 260) goto L18020 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1212_0);
+L18020:;
+ goto L18420; /* gml: if !(y > 120) goto L18420 */
+ goto L18172; /* gml: if !(x < 160) goto L18172 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1219_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1220_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1221_0);
+ goto L18420;
+L18172:;
+ goto L18364; /* gml: if !(read == 0) goto L18364 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1227_0);
+ FACE(1, 'A', 4);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1229_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_1230_0);
+ MSG(4, obj_readable_room1_slash_Other_10_gml_1231_0);
+L18364:;
+ goto L18420; /* gml: if !(read >= 1) goto L18420 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1235_0);
+L18420:;
+ goto L18472; /* gml: if !(x == 225) goto L18472 */
+ c->msc = 210;
+ /* gml: scr_text(global.msc) */
+L18472:;
+ if (!(g_room == room_alphysalley)) goto L18644;
+ goto L18552; /* gml: if !(x <= 130) goto L18552 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1250_0);
+ goto L18644;
+L18552:;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1254_0);
+ goto L18644; /* gml: if !(y <= 100) goto L18644 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1257_0);
+L18644:;
+ if (!(g_room == room_town_south)) goto L19016;
+ goto L18756; /* gml: if !(x <= 100) goto L18756 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1266_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1267_0);
+L18756:;
+ goto L19016; /* gml: if !((x > 200) && (x < 300)) goto L19016 */
+ goto L18980; /* gml: if !(read == 0) goto L18980 */
+ /* gml: snd_play(22) */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1274_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1275_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1276_0);
+ /* gml: with (obj_town_event) { // to L18972 */
+ /* gml: con = 50 */
+ /* gml: } // end with */
+ goto L19016;
+L18980:;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1281_0);
+L19016:;
+ if (!(g_room == room_town_mid)) goto L19772;
+ goto L19128; /* gml: if !(x > 260) goto L19128 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1291_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1292_0);
+L19128:;
+ goto L19220; /* gml: if !(x >= 300) goto L19220 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1296_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1297_0);
+L19220:;
+ goto L19276; /* gml: if !(x >= 360) goto L19276 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1301_0);
+L19276:;
+ goto L19772; /* gml: if !(x >= 1240) goto L19772 */
+ /* gml: snd_play(22) */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1307_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1308_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1309_0);
+ goto L19552; /* gml: if !(x >= 1500) goto L19552 */
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1312_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1313_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_1314_0);
+L19552:;
+ goto L19644; /* gml: if !(x >= 1640) goto L19644 */
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1319_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1320_0);
+L19644:;
+ goto L19772; /* gml: if !(x >= 1860) goto L19772 */
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1324_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1325_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_1326_0);
+L19772:;
+ if (!(g_room == room_town_north)) goto L20584;
+ goto L19848; /* gml: if !(x <= 250) goto L19848 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1338_0);
+L19848:;
+ goto L20004; /* gml: if !((x >= 500) && (x <= 570)) goto L20004 */
+ c->fc = 16;
+ /* gml: global.typer = 5 */
+ c->fe = 6;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1345_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1346_0);
+L20004:;
+ goto L20096; /* gml: if !(x >= 580) goto L20096 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1350_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1351_0);
+L20096:;
+ goto L20188; /* gml: if !(x >= 650) goto L20188 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1355_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1356_0);
+L20188:;
+ goto L20244; /* gml: if !(x >= 800) goto L20244 */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1360_0);
+L20244:;
+ goto L20584; /* gml: if !((x >= 1090) && (x <= 1130)) goto L20584 */
+ /* gml: snd_play(22) */
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1365_0);
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1366_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1367_0);
+ goto L20584; /* gml: if !(read >= 1) goto L20584 */
+ MSG(1, obj_readable_room1_slash_Other_10_gml_1371_0);
+ MSG(2, obj_readable_room1_slash_Other_10_gml_1372_0);
+ MSG(3, obj_readable_room1_slash_Other_10_gml_1373_0);
+ MSG(4, obj_readable_room1_slash_Other_10_gml_1374_0);
+L20584:;
+ if (!(g_room == room_town_shelter)) goto L20640;
+ MSG(0, obj_readable_room1_slash_Other_10_gml_1383_0);
+L20640:;
+ /* gml: mydialoguer = instance_create(0, 0, 5) */
+ /* gml: read = (read + 1) */
+}
+
+void gm_npc_room_create(TxtCtx *c) {
+ int tempvar = 0;
+ /* gml: myinteract = 0 */
+ /* gml: talked = 0 */
+ tempvar = 0;
+ /* gml: image_speed = 0 */
+ /* gml: depthcancel = 0 */
+ /* gml: normalanim = 1 */
+ /* gml: remanimspeed = 0 */
+ if (!(sv.darkzone == 0)) goto L1288;
+ if (!(g_room == room_krisroom)) goto L136;
+ c->spr = spr_redwagon;
+L136:;
+ if (!(g_room == room_torhouse)) goto L200;
+ c->spr = spr_chairiel_empty;
+ if (!(sv.plot >= 250)) goto L200;
+ c->spr = spr_chairiel;
+L200:;
+ if (!(g_room == room_graveyard)) goto L304;
+ c->spr = spr_npc_bench;
+ /* gml: fence = scr_marker(81, 122, 301) */
+ /* gml: with ((fence)) { // to L300 */
+ /* gml: scr_depth() */
+ /* gml: } // end with */
+L304:;
+ if (!(g_room == room_hospital_lobby)) goto L336;
+ c->spr = spr_npc_nurse;
+L336:;
+ if (!(g_room == room_hospital_rudy)) goto L368;
+ c->spr = spr_rudy_d;
+L368:;
+ if (!(g_room == room_library)) goto L400;
+ c->spr = spr_normalnpc;
+L400:;
+ if (!(g_room == room_townhall)) goto L496;
+ c->spr = spr_npc_businessguy;
+ goto L464; /* gml: if !(x > 100) goto L464 */
+ c->spr = spr_npc_receptionist;
+L464:;
+ goto L496; /* gml: if !(x > 200) goto L496 */
+ c->spr = spr_npc_politicsbear;
+L496:;
+ if (!(g_room == room_diner)) goto L888;
+ goto L548; /* gml: if !(x < 120) goto L548 */
+ c->spr = spr_npc_cattiwaitress;
+L548:;
+ goto L580; /* gml: if !(x < 60) goto L580 */
+ c->spr = spr_npc_dragonfamily;
+L580:;
+ goto L640; /* gml: if !((x >= 120) && (x <= 140)) goto L640 */
+ c->spr = spr_npc_qc;
+L640:;
+ goto L804; /* gml: if !(y > 130) goto L804 */
+ goto L692; /* gml: if !(x > 180) goto L692 */
+ c->spr = spr_npc_dresslion;
+L692:;
+ goto L748; /* gml: if !(x > 240) goto L748 */
+ c->spr = spr_npc_greenfire;
+ /* gml: depth = 4000 */
+ /* gml: depthcancel = 1 */
+L748:;
+ goto L804; /* gml: if !(x > 260) goto L804 */
+ c->spr = spr_npc_flanneldemon;
+ /* gml: depth = 4000 */
+ /* gml: depthcancel = 1 */
+L804:;
+ goto L888; /* gml: if !(y < 120) goto L888 */
+ goto L856; /* gml: if !(x > 160) goto L856 */
+ c->spr = spr_npc_most_improved_1997;
+L856:;
+ goto L888; /* gml: if !(x > 200) goto L888 */
+ c->spr = spr_npc_icewolf;
+L888:;
+ if (!(g_room == room_town_south)) goto L972;
+ goto L940; /* gml: if !(x > 560) goto L940 */
+ c->spr = spr_npc_donutcar;
+L940:;
+ goto L972; /* gml: if !(x > 720) goto L972 */
+ c->spr = spr_npc_snailcar;
+L972:;
+ if (!(g_room == room_town_church)) goto L1004;
+ c->spr = spr_npc_alvin;
+L1004:;
+ if (!(g_room == room_town_mid)) goto L1088;
+ goto L1056; /* gml: if !(x >= 1800) goto L1056 */
+ c->spr = spr_mkid_dt;
+L1056:;
+ goto L1088; /* gml: if !(x >= 1900) goto L1088 */
+ c->spr = spr_snowy_dt;
+L1088:;
+ if (!(g_room == room_town_north)) goto L1204;
+ goto L1140; /* gml: if !(x >= 480) goto L1140 */
+ c->spr = spr_npc_catty;
+L1140:;
+ goto L1172; /* gml: if !(x >= 640) goto L1172 */
+ c->spr = spr_npc_cattydad;
+L1172:;
+ goto L1204; /* gml: if !(x >= 880) goto L1204 */
+ c->spr = spr_npc_bratty;
+L1204:;
+ if (!(g_room == room_beach)) goto L1288;
+ goto L1256; /* gml: if !(x >= 60) goto L1256 */
+ c->spr = spr_npc_rgbun;
+L1256:;
+ goto L1288; /* gml: if !(x >= 100) goto L1288 */
+ c->spr = spr_npc_rgdragon;
+L1288:;
+ if (!(sv.darkzone == 1)) goto L4948;
+ /* gml: image_xscale = 2 */
+ /* gml: image_yscale = 2 */
+ if (!(g_room == room_castle_tutorial)) goto L1364;
+ c->spr = spr_dummynpc;
+L1364:;
+ if (!((g_room == room_field_puzzle1) || (g_room == room_field4))) goto L1444;
+ c->spr = spr_candytree;
+L1444:;
+ if (!(g_room == room_field_topchef)) goto L1528;
+ c->spr = spr_topchef;
+ goto L1528; /* gml: if !(y <= 120) goto L1528 */
+ c->spr = spr_smoldercake;
+ /* gml: alarm[11] = 1 */
+L1528:;
+ if (!(g_room == room_field_puzzletutorial)) goto L1600;
+ c->spr = spr_npc_puzzlepiece;
+ if (!(sv.flag[251] == 1)) goto L1600;
+ /* gml: instance_destroy() */
+L1600:;
+ if (!(g_room == room_field_maze)) goto L1684;
+ goto L1652; /* gml: if !(x < 1600) goto L1652 */
+ c->spr = spr_jigsawry_idle;
+L1652:;
+ goto L1684; /* gml: if !(x > 1600) goto L1684 */
+ c->spr = spr_lancer_dt;
+L1684:;
+ if (!(g_room == room_field_boxpuzzle)) goto L1716;
+ c->spr = spr_npc_block_broken;
+L1716:;
+ if (!(g_room == room_field_checkers7)) goto L1832;
+ goto L1820; /* gml: if !(x <= (room_width / 2)) goto L1820 */
+ c->spr = spr_npc_mrelegance;
+ if (!(sv.plot >= 60)) goto L1816;
+ /* gml: instance_destroy() */
+L1816:;
+ goto L1832;
+L1820:;
+ c->spr = spr_npc_mrsociety;
+L1832:;
+ if (!(g_room == room_forest_savepoint1)) goto L1956;
+ goto L1944; /* gml: if !(x <= (room_width / 2)) goto L1944 */
+ c->spr = spr_npc_puzzlepiece;
+ if (!(sv.flag[251] == 0)) goto L1940;
+ /* gml: instance_destroy() */
+L1940:;
+ goto L1956;
+L1944:;
+ c->spr = spr_npc_mrelegance;
+L1956:;
+ if (!(g_room == room_forest_area1)) goto L1988;
+ c->spr = spr_diamond_overworld;
+L1988:;
+ if (!(g_room == room_forest_area2A)) goto L2104;
+ goto L2056; /* gml: if !(x <= (room_width / 2)) goto L2056 */
+ c->spr = spr_jackperson;
+L2056:;
+ goto L2104; /* gml: if !(x >= (room_width / 2)) goto L2104 */
+ c->spr = spr_ballperson;
+L2104:;
+ if (!(g_room == room_forest_area3A)) goto L2220;
+ goto L2172; /* gml: if !(x <= (room_width / 2)) goto L2172 */
+ c->spr = spr_blockler_b;
+L2172:;
+ goto L2220; /* gml: if !(x >= (room_width / 2)) goto L2220 */
+ c->spr = spr_blockler_o;
+L2220:;
+ if (!(g_room == room_forest_savepoint2)) goto L2344;
+ c->spr = spr_bakesale_rudinn;
+ goto L2312; /* gml: if !((x >= 800) && (x <= 880)) goto L2312 */
+ c->spr = spr_bakesale_hathy;
+L2312:;
+ goto L2344; /* gml: if !(x >= 980) goto L2344 */
+ c->spr = spr_bakesale_lancer;
+L2344:;
+ if (!(g_room == room_forest_area4)) goto L2376;
+ c->spr = spr_npc_coody;
+L2376:;
+ if (!(g_room == room_forest_starwalker)) goto L2408;
+ c->spr = spr_npc_originalstarwalker;
+L2408:;
+ if (!(g_room == room_forest_savepoint_relax)) goto L2560;
+ goto L2460; /* gml: if !(x <= 200) goto L2460 */
+ c->spr = spr_diamond_overworld;
+L2460:;
+ goto L2560; /* gml: if !(x > 260) goto L2560 */
+ if (!(sv.plot >= 90)) goto L2512;
+ /* gml: instance_destroy() */
+L2512:;
+ goto L2548; /* gml: if !(y >= 240) goto L2548 */
+ c->spr = spr_lancer_dark_relax;
+ goto L2560;
+L2548:;
+ c->spr = spr_susie_dark_relax;
+L2560:;
+ if (!(g_room == room_forest_fightsusie)) goto L2624;
+ c->spr = spr_lancer_dt;
+ if (!(sv.plot >= 150)) goto L2624;
+ /* gml: instance_destroy() */
+L2624:;
+ if (!(g_room == room_cc_prison_cells)) goto L2656;
+ c->spr = spr_diamond_trash;
+L2656:;
+ if (!(g_room == room_cc_prison2)) goto L3520;
+ sv.flag[296] = 1;
+ c->spr = spr_npc_gouldensam;
+ goto L2924; /* gml: if !((x > 240) && (x < 440)) goto L2924 */
+ /* gml: king = instance_create(-100, -100, 84) */
+ /* gml: (king).x = x */
+ /* gml: (king).y = y */
+ /* gml: (king).sprite_index = 352 */
+ /* gml: scr_depth() */
+ /* gml: (king).depth = (depth - 10) */
+L2924:;
+ goto L3120; /* gml: if !((x > 480) && (x < 680)) goto L3120 */
+ /* gml: x = (x + 4) */
+ /* gml: puzz = instance_create(-100, -100, 84) */
+ /* gml: (puzz).x = 660 */
+ /* gml: (puzz).y = 130 */
+ /* gml: (puzz).sprite_index = 326 */
+ tempvar = 1;
+L3120:;
+ goto L3316; /* gml: if !((x > 680) && (x < 900)) goto L3316 */
+ /* gml: x = (x + 8) */
+ /* gml: rudinn = instance_create(-100, -100, 84) */
+ /* gml: (rudinn).x = 900 */
+ /* gml: (rudinn).y = 115 */
+ /* gml: (rudinn).sprite_index = 499 */
+ tempvar = 2;
+L3316:;
+ goto L3520; /* gml: if !((x > 900) && (x < 1120)) goto L3520 */
+ /* gml: x = (x + 12) */
+ tempvar = 3;
+ /* gml: animal = instance_create(-100, -100, 84) */
+ /* gml: (animal).x = x */
+ /* gml: (animal).y = y */
+ /* gml: (animal).sprite_index = 353 */
+L3520:;
+ if (!(g_room == room_cc_rudinn)) goto L3552;
+ c->spr = spr_diamond_overworld;
+L3552:;
+ if (!(g_room == room_cc_rurus1)) goto L3584;
+ c->spr = spr_diamond_overworld;
+L3584:;
+ if (!(g_room == room_cc_hathy)) goto L3616;
+ c->spr = spr_heartenemy_overworld;
+L3616:;
+ if (!(g_room == room_cc_rurus2)) goto L3648;
+ c->spr = spr_diamond_overworld;
+L3648:;
+ if (!(g_room == room_cc_clover)) goto L3744;
+ c->spr = spr_clubs_overworld;
+ goto L3712; /* gml: if !(x < 160) goto L3712 */
+ c->spr = spr_diamond_overworld;
+L3712:;
+ goto L3744; /* gml: if !(x > 400) goto L3744 */
+ c->spr = spr_heartenemy_overworld;
+L3744:;
+ if (!(g_room == room_cc_throneroom)) goto L4348;
+ if (!(sv.plot < 240)) goto L3800;
+ /* gml: instance_destroy() */
+ goto L4348;
+L3800:;
+ goto L4284; /* gml: if !((y < 300) && (y > 80)) goto L4284 */
+ c->spr = spr_npc_gouldensam;
+ goto L4108; /* gml: if !(x < (room_width / 2)) goto L4108 */
+ /* gml: king = instance_create(-100, -100, 84) */
+ /* gml: (king).x = x */
+ /* gml: (king).y = y */
+ /* gml: (king).sprite_index = 352 */
+ /* gml: scr_depth() */
+ /* gml: (king).depth = (depth - 10) */
+ if (!(sv.flag[296] == 0)) goto L4104;
+ /* gml: instance_destroy() */
+L4104:;
+ goto L4280;
+L4108:;
+ tempvar = 1;
+ /* gml: animal = instance_create(-100, -100, 84) */
+ /* gml: (animal).x = x */
+ /* gml: (animal).y = y */
+ /* gml: (animal).sprite_index = 353 */
+ if (!(sv.flag[296] == 0)) goto L4280;
+ /* gml: instance_destroy() */
+L4280:;
+ goto L4348;
+L4284:;
+ goto L4336; /* gml: if !(x < (room_width / 2)) goto L4336 */
+ c->spr = spr_diamond_overworld;
+ goto L4348;
+L4336:;
+ c->spr = spr_topchef;
+L4348:;
+ if (!(g_room == room_cc_preroof)) goto L4528;
+ if (!(sv.plot < 240)) goto L4400;
+ /* gml: instance_destroy() */
+L4400:;
+ goto L4432; /* gml: if !(x > 180) goto L4432 */
+ c->spr = spr_diamond_overworld;
+L4432:;
+ goto L4464; /* gml: if !(x > 320) goto L4464 */
+ c->spr = spr_heartenemy_overworld;
+L4464:;
+ goto L4496; /* gml: if !(x > 460) goto L4496 */
+ c->spr = spr_clubs_overworld;
+L4496:;
+ goto L4528; /* gml: if !(x > 680) goto L4528 */
+ c->spr = spr_diamond_overworld;
+L4528:;
+ if (!(g_room == room_cc_kingbattle)) goto L4948;
+ if (!(sv.plot < 240)) goto L4580;
+ /* gml: instance_destroy() */
+L4580:;
+ goto L4612; /* gml: if !(x < 440) goto L4612 */
+ c->spr = spr_rurus_idle;
+L4612:;
+ goto L4900; /* gml: if !(y < 160) goto L4900 */
+ goto L4664; /* gml: if !(x == 398) goto L4664 */
+ c->spr = spr_npc_mrsociety;
+L4664:;
+ goto L4696; /* gml: if !(x == 522) goto L4696 */
+ c->spr = spr_npc_mrelegance;
+L4696:;
+ goto L4728; /* gml: if !(x == 740) goto L4728 */
+ c->spr = spr_blockler_b;
+L4728:;
+ goto L4760; /* gml: if !(x == 820) goto L4760 */
+ c->spr = spr_blockler_o;
+L4760:;
+ goto L4792; /* gml: if !(x == 940) goto L4792 */
+ c->spr = spr_blockler_o;
+L4792:;
+ goto L4824; /* gml: if !(x == 1020) goto L4824 */
+ c->spr = spr_blockler_b;
+L4824:;
+ goto L4896; /* gml: if !(x > 1140) goto L4896 */
+ c->spr = spr_npc_puzzlepiece_happy;
+ if (!(sv.flag[216] == 1)) goto L4896;
+ c->spr = spr_npc_puzzlepiece_shaved;
+L4896:;
+ goto L4948;
+L4900:;
+ goto L4936; /* gml: if !(x < 900) goto L4936 */
+ c->spr = spr_jackperson;
+ goto L4948;
+L4936:;
+ c->spr = spr_ballperson;
+L4948:;
+ goto L4980; /* gml: if !(depthcancel == 0) goto L4980 */
+ /* gml: scr_depth() */
+L4980:;
+}
+
+void gm_npc_room_talk(TxtCtx *c) {
+ c->msc = 0;
+ /* gml: global.typer = 5 */
+ if (!(sv.darkzone == 1)) goto L56;
+ /* gml: global.typer = 6 */
+L56:;
+ c->fc = 0;
+ c->fe = 0;
+ /* gml: global.interact = 1 */
+ /* gml: image_speed = 0.2 */
+ if (!(sv.darkzone == 1)) goto L152;
+ /* gml: image_speed = 0.2 */
+L152:;
+ MSG(0, obj_npc_room_slash_Other_10_gml_11_0);
+ if (!(g_room == room_krisroom)) goto L280;
+ MSG(0, obj_npc_room_slash_Other_10_gml_15_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_16_0);
+L280:;
+ if (!(g_room == room_torhouse)) goto L424;
+ MSG(0, obj_npc_room_slash_Other_10_gml_21_0);
+ if (!(sv.plot >= 250)) goto L424;
+ c->msc = 455;
+ /* gml: scr_text(global.msc) */
+ /* gml: global.typer = 7 */
+ c->fc = 4;
+ c->fe = 0;
+L424:;
+ if (!(g_room == room_alphysclass)) goto L488;
+ c->msc = 100;
+ /* gml: scr_text(global.msc) */
+ c->fc = 4;
+L488:;
+ if (!(g_room == room_castle_tutorial)) goto L544;
+ MSG(0, obj_npc_room_slash_Other_10_gml_41_0);
+L544:;
+ if (!(g_room == room_field2)) goto L828;
+ if (!(sv.flag[501] == 1)) goto L664;
+ MSG(0, obj_npc_room_slash_Other_10_gml_48_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_49_0);
+L664:;
+ if (!(sv.flag[501] == 2)) goto L728;
+ MSG(0, obj_npc_room_slash_Other_10_gml_53_0);
+L728:;
+ if (!(sv.flag[501] == 3)) goto L828;
+ MSG(0, obj_npc_room_slash_Other_10_gml_57_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_58_0);
+L828:;
+ if (!(g_room == room_field2A)) goto L880;
+ c->msc = 145;
+ /* gml: scr_text(global.msc) */
+L880:;
+ if (!(g_room == room_field_puzzle1)) goto L932;
+ c->msc = 147;
+ /* gml: scr_text(global.msc) */
+L932:;
+ if (!(g_room == room_field_topchef)) goto L1948;
+ goto L1916; /* gml: if !(y >= 160) goto L1916 */
+ /* gml: image_speed = 0.334 */
+ /* gml: normalanim = 2 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_81_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_82_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_83_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_84_0);
+ FACE(4, 'R', 8);
+ MSG(5, obj_npc_room_slash_Other_10_gml_86_0);
+ MSG(6, obj_npc_room_slash_Other_10_gml_87_0);
+ goto L1304; /* gml: if !(talked >= 1) goto L1304 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_90_0);
+L1304:;
+ if (!have_char(2)) goto L1796;
+ MSG(0, obj_npc_room_slash_Other_10_gml_95_0);
+ FACE(1, 'S', 2);
+ MSG(2, obj_npc_room_slash_Other_10_gml_97_0);
+ NOFACE(3);
+ MSG(4, obj_npc_room_slash_Other_10_gml_99_0);
+ FACE(5, 'S', 2);
+ MSG(6, obj_npc_room_slash_Other_10_gml_101_0);
+ goto L1796; /* gml: if !(talked >= 1) goto L1796 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_104_0);
+ FACE(1, 'S', 0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_106_0);
+ FACE(3, 'R', 9);
+ MSG(4, obj_npc_room_slash_Other_10_gml_108_0);
+ FACE(5, 'S', 2);
+ MSG(6, obj_npc_room_slash_Other_10_gml_110_0);
+L1796:;
+ if (!gm_itemcheck(6)) goto L1852;
+ c->msc = 465;
+ /* gml: scr_text(global.msc) */
+L1852:;
+ if (!(sv.flag[253] == 1)) goto L1912;
+ c->msc = 470;
+ /* gml: scr_text(global.msc) */
+L1912:;
+ goto L1948;
+L1916:;
+ c->msc = 149;
+ /* gml: scr_text(global.msc) */
+L1948:;
+ if (!(g_room == room_field_maze)) goto L2656;
+ MSG(0, obj_npc_room_slash_Other_10_gml_137_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_138_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_139_0);
+ if (!(sv.plot < 37)) goto L2164;
+ FACE(3, 'R', 3);
+ MSG(4, obj_npc_room_slash_Other_10_gml_143_0);
+ goto L2200;
+L2164:;
+ MSG(2, obj_npc_room_slash_Other_10_gml_147_0);
+L2200:;
+ goto L2256; /* gml: if !(talked >= 1) goto L2256 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_152_0);
+L2256:;
+ if (!have_char(2)) goto L2436;
+ MSG(0, obj_npc_room_slash_Other_10_gml_157_0);
+ FACE(1, 'S', 2);
+ MSG(2, obj_npc_room_slash_Other_10_gml_159_0);
+ goto L2436; /* gml: if !(talked >= 1) goto L2436 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_165_0);
+L2436:;
+ goto L2656; /* gml: if !(x > 1600) goto L2656 */
+ c->fc = 5;
+ c->fe = 0;
+ /* gml: global.typer = 32 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_175_0);
+ FACE(1, 'R', 1);
+ MSG(2, obj_npc_room_slash_Other_10_gml_177_0);
+ FACE(3, 'L', 2);
+ MSG(4, obj_npc_room_slash_Other_10_gml_179_0);
+L2656:;
+ if (!(g_room == room_field_shop1)) goto L2784;
+ MSG(0, obj_npc_room_slash_Other_10_gml_186_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_187_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_188_0);
+L2784:;
+ if (!(g_room == room_field_puzzletutorial)) goto L3548;
+ MSG(0, obj_npc_room_slash_Other_10_gml_193_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_194_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_195_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_196_0);
+ goto L3184; /* gml: if !(x <= (room_width / 2)) goto L3184 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_200_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_201_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_202_0);
+ goto L3184; /* gml: if !(talked >= 1) goto L3184 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_205_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_206_0);
+L3184:;
+ goto L3548; /* gml: if !(y >= (room_height / 2)) goto L3548 */
+ goto L3404; /* gml: if !(x <= (room_width / 2)) goto L3404 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_214_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_215_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_216_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_217_0);
+ goto L3548;
+L3404:;
+ MSG(0, obj_npc_room_slash_Other_10_gml_221_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_222_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_223_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_224_0);
+L3548:;
+ if (!(g_room == room_field4)) goto L4200;
+ MSG(0, obj_npc_room_slash_Other_10_gml_233_0);
+ if (!(have_char(3) && have_char(2))) goto L4200;
+ MSG(0, obj_npc_room_slash_Other_10_gml_236_0);
+ FACE(1, 'R', 8);
+ MSG(2, obj_npc_room_slash_Other_10_gml_238_0);
+ FACE(3, 'S', 2);
+ MSG(4, obj_npc_room_slash_Other_10_gml_240_0);
+ FACE(5, 'R', 8);
+ MSG(6, obj_npc_room_slash_Other_10_gml_242_0);
+ MSG(7, obj_npc_room_slash_Other_10_gml_243_0);
+ goto L4200; /* gml: if !(talked >= 1) goto L4200 */
+ FACE(0, 'R', 8);
+ MSG(1, obj_npc_room_slash_Other_10_gml_248_0);
+ FACE(2, 'S', 0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_250_0);
+ FACE(4, 'R', 1);
+ MSG(5, obj_npc_room_slash_Other_10_gml_252_0);
+ FACE(6, 'S', 7);
+ MSG(7, obj_npc_room_slash_Other_10_gml_254_0);
+L4200:;
+ if (!(g_room == room_field_puzzletutorial)) goto L4456;
+ MSG(0, obj_npc_room_slash_Other_10_gml_262_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_263_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_264_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_265_0);
+ goto L4456; /* gml: if !(talked >= 1) goto L4456 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_269_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_270_0);
+L4456:;
+ if (!(g_room == room_field_checkers7)) goto L5100;
+ goto L4736; /* gml: if !(sprite_index == 360) goto L4736 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_278_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_279_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_280_0);
+ goto L4732; /* gml: if !(talked >= 1) goto L4732 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_284_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_285_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_286_0);
+L4732:;
+ goto L5100;
+L4736:;
+ MSG(0, obj_npc_room_slash_Other_10_gml_292_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_293_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_294_0);
+ goto L4972; /* gml: if !(talked >= 1) goto L4972 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_297_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_298_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_299_0);
+L4972:;
+ if (!(sv.plot >= 60)) goto L5100;
+ MSG(0, obj_npc_room_slash_Other_10_gml_304_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_305_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_306_0);
+L5100:;
+ if (!(g_room == room_forest_savepoint1)) goto L5952;
+ goto L5468; /* gml: if !(sprite_index == 323) goto L5468 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_316_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_317_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_318_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_319_0);
+ if (!(sv.plot >= 154)) goto L5376;
+ MSG(0, obj_npc_room_slash_Other_10_gml_322_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_323_0);
+L5376:;
+ goto L5468; /* gml: if !(talked >= 1) goto L5468 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_327_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_328_0);
+L5468:;
+ goto L5952; /* gml: if !(sprite_index == 360) goto L5952 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_334_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_335_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_336_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_337_0);
+ if (!(sv.flag[251] == 1)) goto L5768;
+ MSG(0, obj_npc_room_slash_Other_10_gml_340_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_341_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_342_0);
+L5768:;
+ if (!(sv.plot >= 154)) goto L5860;
+ MSG(0, obj_npc_room_slash_Other_10_gml_346_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_347_0);
+L5860:;
+ goto L5952; /* gml: if !(talked >= 1) goto L5952 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_352_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_353_0);
+L5952:;
+ if (!(g_room == room_forest_area1)) goto L6192;
+ goto L6192; /* gml: if !(sprite_index == 499) goto L6192 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_365_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_366_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_367_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_368_0);
+ goto L6192; /* gml: if !(talked >= 1) goto L6192 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_372_0);
+L6192:;
+ if (!(g_room == room_forest_area2A)) goto L7048;
+ goto L6940; /* gml: if !(x <= (room_width / 2)) goto L6940 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_383_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_384_0);
+ if (!((sv.flag[108] == 1) && (sv.flag[233] == 0))) goto L6528;
+ MSG(0, obj_npc_room_slash_Other_10_gml_388_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_389_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_390_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_391_0);
+L6528:;
+ if (!(sv.flag[108] == 0)) goto L6684;
+ MSG(0, obj_npc_room_slash_Other_10_gml_397_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_398_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_399_0);
+ sv.flag[233] = 1;
+L6684:;
+ goto L6848; /* gml: if !((scr_weaponcheck_inventory(9) == 0) && (global.charweapon[3] != 9)) goto L6848 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_406_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_407_0);
+L6848:;
+ goto L6940; /* gml: if !(talked >= 1) goto L6940 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_412_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_413_0);
+L6940:;
+ goto L7048; /* gml: if !(x >= (room_width / 2)) goto L7048 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_420_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_421_0);
+L7048:;
+ if (!(g_room == room_forest_area3)) goto L7160;
+ MSG(0, obj_npc_room_slash_Other_10_gml_428_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_429_0);
+ sv.flag[236] = 1;
+L7160:;
+ if (!(g_room == room_forest_area3A)) goto L7544;
+ MSG(0, obj_npc_room_slash_Other_10_gml_436_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_437_0);
+ goto L7308; /* gml: if !(talked >= 1) goto L7308 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_442_0);
+L7308:;
+ goto L7544; /* gml: if !(x >= (room_width / 2)) goto L7544 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_448_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_449_0);
+ goto L7544; /* gml: if !(talked >= 1) goto L7544 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_454_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_455_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_456_0);
+L7544:;
+ if (!(g_room == room_forest_savepoint2)) goto L7808;
+ goto L7616; /* gml: if !(x < 800) goto L7616 */
+ c->msc = 325;
+ /* gml: scr_text(global.msc) */
+L7616:;
+ goto L7696; /* gml: if !((x >= 800) && (x <= 880)) goto L7696 */
+ c->msc = 327;
+ /* gml: scr_text(global.msc) */
+L7696:;
+ goto L7808; /* gml: if !(x >= 920) goto L7808 */
+ if (!(sv.plot < 80)) goto L7772;
+ c->msc = 330;
+ /* gml: scr_text(global.msc) */
+ goto L7808;
+L7772:;
+ MSG(0, obj_npc_room_slash_Other_10_gml_486_0);
+L7808:;
+ if (!(g_room == room_forest_area4)) goto L7992;
+ MSG(0, obj_npc_room_slash_Other_10_gml_493_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_494_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_495_0);
+ goto L7992; /* gml: if !(talked >= 1) goto L7992 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_498_0);
+L7992:;
+ if (!(g_room == room_forest_starwalker)) goto L8104;
+ MSG(0, obj_npc_room_slash_Other_10_gml_504_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_505_0);
+ sv.flag[254] = 1;
+L8104:;
+ if (!(g_room == room_forest_savepoint_relax)) goto L9772;
+ MSG(0, obj_npc_room_slash_Other_10_gml_511_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_512_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_513_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_514_0);
+ goto L8324; /* gml: if !(talked >= 1) goto L8324 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_515_0);
+L8324:;
+ if (!(sv.plot >= 90)) goto L8380;
+ MSG(0, obj_npc_room_slash_Other_10_gml_519_0);
+L8380:;
+ goto L9152; /* gml: if !(sprite_index == 226) goto L9152 */
+ c->fc = 2;
+ c->fe = 0;
+ /* gml: global.typer = 31 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_527_0);
+ FACE(1, 'L', 0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_529_0);
+ FACE(3, 'R', 8);
+ MSG(4, obj_npc_room_slash_Other_10_gml_531_0);
+ FACE(5, 'S', 0);
+ MSG(6, obj_npc_room_slash_Other_10_gml_533_0);
+ FACE(7, 'R', 6);
+ MSG(8, obj_npc_room_slash_Other_10_gml_535_0);
+ FACE(9, 'L', 1);
+ MSG(10, obj_npc_room_slash_Other_10_gml_537_0);
+ MSG(11, obj_npc_room_slash_Other_10_gml_538_0);
+ FACE(12, 'S', 2);
+ MSG(13, obj_npc_room_slash_Other_10_gml_540_0);
+ goto L9152; /* gml: if !(talked >= 1) goto L9152 */
+ c->fc = 5;
+ c->fe = 3;
+ /* gml: global.typer = 32 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_547_0);
+ FACE(1, 'S', 2);
+ MSG(2, obj_npc_room_slash_Other_10_gml_549_0);
+ FACE(3, 'R', 10);
+ MSG(4, obj_npc_room_slash_Other_10_gml_551_0);
+ MSG(5, obj_npc_room_slash_Other_10_gml_552_0);
+L9152:;
+ goto L9772; /* gml: if !(sprite_index == 156) goto L9772 */
+ c->fc = 2;
+ c->fe = 6;
+ /* gml: global.typer = 31 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_560_0);
+ FACE(1, 'S', 1);
+ MSG(2, obj_npc_room_slash_Other_10_gml_562_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_563_0);
+ MSG(4, obj_npc_room_slash_Other_10_gml_564_0);
+ FACE(5, 'L', 6);
+ MSG(6, obj_npc_room_slash_Other_10_gml_566_0);
+ MSG(7, obj_npc_room_slash_Other_10_gml_567_0);
+ MSG(8, obj_npc_room_slash_Other_10_gml_568_0);
+ FACE(9, 'S', 2);
+ MSG(10, obj_npc_room_slash_Other_10_gml_570_0);
+ goto L9772; /* gml: if !(talked >= 1) goto L9772 */
+ c->fc = 1;
+ c->fe = 1;
+ /* gml: global.typer = 30 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_577_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_578_0);
+ FACE(2, 'L', 3);
+ MSG(3, obj_npc_room_slash_Other_10_gml_580_0);
+L9772:;
+ if (!(g_room == room_forest_fightsusie)) goto L10048;
+ /* gml: global.typer = 31 */
+ c->fe = 8;
+ c->fc = 2;
+ MSG(0, obj_npc_room_slash_Other_10_gml_591_0);
+ FACE(1, 'L', 3);
+ MSG(2, obj_npc_room_slash_Other_10_gml_593_0);
+ goto L10048; /* gml: if !(talked >= 1) goto L10048 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_597_0);
+ FACE(1, 'L', 3);
+ MSG(2, obj_npc_room_slash_Other_10_gml_599_0);
+L10048:;
+ if (!(g_room == room_cc_prison_cells)) goto L10196;
+ MSG(0, obj_npc_room_slash_Other_10_gml_606_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_607_0);
+ goto L10196; /* gml: if !(talked >= 1) goto L10196 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_610_0);
+L10196:;
+ if (!(g_room == room_cc_prison2)) goto L11092;
+ goto L10440; /* gml: if !(sprite_index == 340) goto L10440 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_618_0);
+ goto L10328; /* gml: if !(tempvar == 1) goto L10328 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_619_0);
+L10328:;
+ goto L10384; /* gml: if !(tempvar == 2) goto L10384 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_620_0);
+L10384:;
+ goto L10440; /* gml: if !(tempvar == 3) goto L10440 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_621_0);
+L10440:;
+ goto L10624; /* gml: if !(sprite_index == 353) goto L10624 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_626_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_627_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_628_0);
+ goto L10624; /* gml: if !(talked >= 1) goto L10624 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_632_0);
+L10624:;
+ goto L10844; /* gml: if !(sprite_index == 352) goto L10844 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_638_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_639_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_640_0);
+ goto L10844; /* gml: if !(talked >= 1) goto L10844 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_644_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_645_0);
+L10844:;
+ goto L11000; /* gml: if !(sprite_index == 499) goto L11000 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_653_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_654_0);
+ if (!(sv.flag[40] >= 2)) goto L11000;
+ MSG(0, obj_npc_room_slash_Other_10_gml_659_0);
+L11000:;
+ goto L11092; /* gml: if !(sprite_index == 326) goto L11092 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_665_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_666_0);
+L11092:;
+ if (!(g_room == room_cc_rudinn)) goto L12380;
+ goto L11224; /* gml: if !(x <= (room_width / 2)) goto L11224 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_675_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_676_0);
+ goto L12380;
+L11224:;
+ if (!(sv.flag[520] == 0)) goto L11956;
+ MSG(0, obj_npc_room_slash_Other_10_gml_682_0);
+ if (!(sv.flag[243] == 3)) goto L11472;
+ MSG(0, obj_npc_room_slash_Other_10_gml_685_0);
+ FACE(1, 'S', 2);
+ MSG(2, obj_npc_room_slash_Other_10_gml_687_0);
+ NOFACE(3);
+ MSG(4, obj_npc_room_slash_Other_10_gml_689_0);
+L11472:;
+ if (!(sv.flag[243] == 0)) goto L11952;
+ MSG(0, obj_npc_room_slash_Other_10_gml_694_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_695_0);
+ FACE(2, 'S', 0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_697_0);
+ NOFACE(4);
+ MSG(5, obj_npc_room_slash_Other_10_gml_699_0);
+ MSG(6, obj_npc_room_slash_Other_10_gml_700_0);
+ MSG(7, obj_npc_room_slash_Other_10_gml_701_0);
+ gm_itemget(13);
+ goto L11932; /* gml: if !(noroom == 1) goto L11932 */
+ FACE(7, 'R', 8);
+ MSG(8, obj_npc_room_slash_Other_10_gml_706_0);
+ FACE(9, 'S', 2);
+ MSG(10, obj_npc_room_slash_Other_10_gml_708_0);
+L11932:;
+ sv.flag[243] = 3;
+L11952:;
+ goto L12380;
+L11956:;
+ if (!(sv.flag[243] == 3)) goto L12056;
+ MSG(0, obj_npc_room_slash_Other_10_gml_718_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_719_0);
+L12056:;
+ if (!(sv.flag[243] == 2)) goto L12120;
+ MSG(0, obj_npc_room_slash_Other_10_gml_723_0);
+L12120:;
+ if (!(sv.flag[243] == 1)) goto L12320;
+ MSG(0, obj_npc_room_slash_Other_10_gml_727_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_728_0);
+ FACE(2, 'S', 1);
+ MSG(3, obj_npc_room_slash_Other_10_gml_730_0);
+ MSG(4, obj_npc_room_slash_Other_10_gml_731_0);
+L12320:;
+ if (!(sv.flag[243] == 0)) goto L12380;
+ c->msc = 425;
+ /* gml: scr_text(global.msc) */
+L12380:;
+ if (!(g_room == room_cc_rurus1)) goto L12472;
+ MSG(0, obj_npc_room_slash_Other_10_gml_746_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_747_0);
+L12472:;
+ if (!(g_room == room_cc_hathy)) goto L13464;
+ goto L12604; /* gml: if !(x <= (room_width / 2)) goto L12604 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_754_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_755_0);
+ goto L13464;
+L12604:;
+ if (!(sv.flag[521] <= 2)) goto L13244;
+ if (!(sv.flag[244] == 0)) goto L13184;
+ MSG(0, obj_npc_room_slash_Other_10_gml_764_0);
+ if (!(sv.flag[521] > 0)) goto L13180;
+ MSG(0, obj_npc_room_slash_Other_10_gml_768_0);
+ FACE(1, 'R', 6);
+ MSG(2, obj_npc_room_slash_Other_10_gml_770_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_771_0);
+ NOFACE(4);
+ MSG(5, obj_npc_room_slash_Other_10_gml_773_0);
+ MSG(6, obj_npc_room_slash_Other_10_gml_774_0);
+ sv.flag[43] = (sv.flag[43] - sv.flag[524]);
+ if (!(sv.flag[43] < 0)) goto L13048;
+ sv.flag[43] = 0;
+L13048:;
+ /* gml: normal_kills = (global.flag[521] - global.flag[524]) */
+ /* gml: global.flag[40] = (global.flag[40] - normal_kills) */
+ if (!(sv.flag[40] < 0)) goto L13180;
+ sv.flag[40] = 0;
+L13180:;
+ goto L13220;
+L13184:;
+ MSG(0, obj_npc_room_slash_Other_10_gml_786_0);
+L13220:;
+ sv.flag[244] = 1;
+ goto L13464;
+L13244:;
+ MSG(0, obj_npc_room_slash_Other_10_gml_792_0);
+ FACE(1, 'S', 2);
+ MSG(2, obj_npc_room_slash_Other_10_gml_794_0);
+ NOFACE(3);
+ MSG(4, obj_npc_room_slash_Other_10_gml_796_0);
+ FACE(5, 'S', 6);
+ MSG(6, obj_npc_room_slash_Other_10_gml_798_0);
+L13464:;
+ if (!(g_room == room_cc_rurus2)) goto L13556;
+ MSG(0, obj_npc_room_slash_Other_10_gml_806_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_807_0);
+L13556:;
+ if (!(g_room == room_cc_clover)) goto L14024;
+ MSG(0, obj_npc_room_slash_Other_10_gml_812_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_813_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_814_0);
+ if (!(sv.flag[522] == 1)) goto L13784;
+ MSG(0, obj_npc_room_slash_Other_10_gml_817_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_818_0);
+L13784:;
+ goto L13840; /* gml: if !(x < 160) goto L13840 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_823_0);
+L13840:;
+ goto L14024; /* gml: if !(x > 400) goto L14024 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_827_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_828_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_829_0);
+ goto L14024; /* gml: if !(talked >= 1) goto L14024 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_832_0);
+L14024:;
+ if (!(g_room == room_cc_throneroom)) goto L15308;
+ goto L14364; /* gml: if !(y < 300) goto L14364 */
+ goto L14176; /* gml: if !(sprite_index == 340) goto L14176 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_844_0);
+ goto L14176; /* gml: if !(tempvar == 1) goto L14176 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_845_0);
+L14176:;
+ goto L14268; /* gml: if !(sprite_index == 353) goto L14268 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_849_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_850_0);
+L14268:;
+ goto L14360; /* gml: if !(sprite_index == 352) goto L14360 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_855_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_856_0);
+L14360:;
+ goto L15308;
+L14364:;
+ goto L14604; /* gml: if !(x < (room_width / 2)) goto L14604 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_865_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_866_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_867_0);
+ goto L14600; /* gml: if !(talked >= 1) goto L14600 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_870_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_871_0);
+L14600:;
+ goto L15308;
+L14604:;
+ MSG(0, obj_npc_room_slash_Other_10_gml_876_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_877_0);
+ if (!(sv.flag[295] == 1)) goto L14860;
+ MSG(0, obj_npc_room_slash_Other_10_gml_880_0);
+ FACE(1, 'S', 3);
+ MSG(2, obj_npc_room_slash_Other_10_gml_882_0);
+ NOFACE(3);
+ MSG(4, obj_npc_room_slash_Other_10_gml_884_0);
+L14860:;
+ if (!((sv.flag[253] == 1) && (sv.flag[295] == 0))) goto L15308;
+ MSG(0, obj_npc_room_slash_Other_10_gml_888_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_889_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_890_0);
+ FACE(3, 'S', 2);
+ MSG(4, obj_npc_room_slash_Other_10_gml_892_0);
+ NOFACE(5);
+ MSG(6, obj_npc_room_slash_Other_10_gml_894_0);
+ MSG(7, obj_npc_room_slash_Other_10_gml_895_0);
+ FACE(8, 'S', 5);
+ MSG(9, obj_npc_room_slash_Other_10_gml_897_0);
+ MSG(10, obj_npc_room_slash_Other_10_gml_898_0);
+ sv.flag[295] = 1;
+L15308:;
+ if (!(g_room == room_cc_preroof)) goto L15800;
+ goto L15384; /* gml: if !(x > 180) goto L15384 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_913_0);
+L15384:;
+ goto L15532; /* gml: if !(x > 320) goto L15532 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_917_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_918_0);
+ goto L15532; /* gml: if !(talked >= 1) goto L15532 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_919_0);
+L15532:;
+ goto L15672; /* gml: if !(x > 460) goto L15672 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_923_0);
+ /* gml: global.msg[1] = (scr_84_get_lang_string("obj_npc_room_slash_Other_10_gml_924_0") + "/") */
+ MSG(2, obj_npc_room_slash_Other_10_gml_925_0);
+L15672:;
+ goto L15800; /* gml: if !(x > 680) goto L15800 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_930_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_931_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_932_0);
+L15800:;
+ if (!(g_room == room_cc_kingbattle)) goto L17332;
+ goto L16392; /* gml: if !(sprite_index == 317) goto L16392 */
+ c->fc = 18;
+ c->fe = 0;
+ MSG(0, obj_npc_room_slash_Other_10_gml_944_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_945_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_946_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_947_0);
+ goto L16392; /* gml: if !(talked >= 1) goto L16392 */
+ c->fc = 1;
+ c->fe = 0;
+ /* gml: global.typer = 30 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_955_0);
+ FACE(1, 'u', 3);
+ MSG(2, obj_npc_room_slash_Other_10_gml_957_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_958_0);
+ FACE(4, 'S', 0);
+ MSG(5, obj_npc_room_slash_Other_10_gml_960_0);
+ FACE(6, 'u', 1);
+ MSG(7, obj_npc_room_slash_Other_10_gml_962_0);
+ FACE(8, 'S', 2);
+ MSG(9, obj_npc_room_slash_Other_10_gml_964_0);
+L16392:;
+ goto L17164; /* gml: if !(y < 160) goto L17164 */
+ goto L16540; /* gml: if !(x == 398) goto L16540 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_972_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_973_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_974_0);
+L16540:;
+ goto L16688; /* gml: if !(x == 522) goto L16688 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_978_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_979_0);
+ goto L16688; /* gml: if !(talked >= 1) goto L16688 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_982_0);
+L16688:;
+ goto L16744; /* gml: if !(x == 740) goto L16744 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_988_0);
+L16744:;
+ goto L16800; /* gml: if !(x == 820) goto L16800 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_992_0);
+L16800:;
+ goto L16856; /* gml: if !(x == 940) goto L16856 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_996_0);
+L16856:;
+ goto L16912; /* gml: if !(x == 1020) goto L16912 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1000_0);
+L16912:;
+ goto L17160; /* gml: if !(x > 1140) goto L17160 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1004_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1005_0);
+ if (!(sv.flag[216] == 1)) goto L17068;
+ MSG(1, obj_npc_room_slash_Other_10_gml_1008_0);
+L17068:;
+ goto L17160; /* gml: if !(talked >= 1) goto L17160 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1013_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1014_0);
+L17160:;
+ goto L17332;
+L17164:;
+ goto L17296; /* gml: if !(x < 900) goto L17296 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1022_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1023_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1024_0);
+ goto L17332;
+L17296:;
+ MSG(0, obj_npc_room_slash_Other_10_gml_1028_0);
+L17332:;
+ if (!(g_room == room_hospital_rudy)) goto L17464;
+ /* gml: global.typer = 55 */
+ c->fc = 15;
+ c->fe = 2;
+ if (!(sv.flag[255] < 2)) goto L17432;
+ c->msc = 180;
+ goto L17444;
+L17432:;
+ c->msc = 181;
+L17444:;
+ /* gml: scr_text(global.msc) */
+L17464:;
+ if (!(g_room == room_library)) goto L17648;
+ MSG(0, obj_npc_room_slash_Other_10_gml_1049_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1050_0);
+ goto L17648; /* gml: if !(talked >= 1) goto L17648 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1054_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1055_0);
+L17648:;
+ if (!(g_room == room_graveyard)) goto L17700;
+ c->msc = 190;
+ /* gml: scr_text(global.msc) */
+L17700:;
+ if (!(g_room == room_townhall)) goto L18360;
+ MSG(0, obj_npc_room_slash_Other_10_gml_1068_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1069_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1070_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_1071_0);
+ goto L17956; /* gml: if !(talked >= 1) goto L17956 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1074_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1075_0);
+L17956:;
+ goto L18140; /* gml: if !(x > 100) goto L18140 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1081_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1082_0);
+ goto L18140; /* gml: if !(talked >= 1) goto L18140 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1086_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1087_0);
+L18140:;
+ goto L18360; /* gml: if !(x > 200) goto L18360 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1097_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1098_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1099_0);
+ goto L18360; /* gml: if !(talked >= 1) goto L18360 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1103_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1104_0);
+L18360:;
+ if (!(g_room == room_diner)) goto L20472;
+ goto L18804; /* gml: if !(sprite_index == 265) goto L18804 */
+ c->fc = 13;
+ c->fe = 0;
+ MSG(0, obj_npc_room_slash_Other_10_gml_1118_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1119_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1120_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_1121_0);
+ MSG(4, obj_npc_room_slash_Other_10_gml_1122_0);
+ MSG(5, obj_npc_room_slash_Other_10_gml_1123_0);
+ MSG(6, obj_npc_room_slash_Other_10_gml_1124_0);
+ goto L18804; /* gml: if !(talked >= 1) goto L18804 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1128_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1129_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1130_0);
+L18804:;
+ goto L18952; /* gml: if !(sprite_index == 263) goto L18952 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1136_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1137_0);
+ goto L18952; /* gml: if !(talked >= 1) goto L18952 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1139_0);
+L18952:;
+ goto L19768; /* gml: if !((x >= 120) && (x <= 140)) goto L19768 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1145_0);
+ if (!(sv.flag[261] == 0)) goto L19768;
+ MSG(0, obj_npc_room_slash_Other_10_gml_1151_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1153_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1154_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_1155_0);
+ MSG(4, obj_npc_room_slash_Other_10_gml_1156_0);
+ MSG(5, obj_npc_room_slash_Other_10_gml_1157_0);
+ MSG(6, obj_npc_room_slash_Other_10_gml_1158_0);
+ MSG(7, obj_npc_room_slash_Other_10_gml_1159_0);
+ MSG(8, obj_npc_room_slash_Other_10_gml_1160_0);
+ MSG(9, obj_npc_room_slash_Other_10_gml_1161_0);
+ MSG(10, obj_npc_room_slash_Other_10_gml_1162_0);
+ MSG(11, obj_npc_room_slash_Other_10_gml_1163_0);
+ MSG(12, obj_npc_room_slash_Other_10_gml_1164_0);
+ MSG(13, obj_npc_room_slash_Other_10_gml_1165_0);
+ sv.flag[261] = 1;
+ /* gml: noroom = 0 */
+ gm_litemget(1);
+ goto L19768; /* gml: if !(noroom == 1) goto L19768 */
+ sv.flag[261] = 2;
+ MSG(11, obj_npc_room_slash_Other_10_gml_1172_0);
+ MSG(12, obj_npc_room_slash_Other_10_gml_1173_0);
+ MSG(13, obj_npc_room_slash_Other_10_gml_1174_0);
+L19768:;
+ goto L19788; /* gml: if !(x > 240) goto L19788 */
+L19788:;
+ goto L20140; /* gml: if !(y > 140) goto L20140 */
+ goto L19956; /* gml: if !(x > 180) goto L19956 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1198_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1199_0);
+ goto L19956; /* gml: if !(talked >= 1) goto L19956 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1202_0);
+L19956:;
+ goto L20140; /* gml: if !(x > 260) goto L20140 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1212_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1213_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1214_0);
+ goto L20140; /* gml: if !(talked >= 1) goto L20140 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1217_0);
+L20140:;
+ goto L20288; /* gml: if !(sprite_index == 260) goto L20288 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1226_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1227_0);
+ goto L20288; /* gml: if !(talked >= 1) goto L20288 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1231_0);
+L20288:;
+ goto L20472; /* gml: if !(sprite_index == 258) goto L20472 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1237_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1238_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1239_0);
+ goto L20472; /* gml: if !(talked >= 1) goto L20472 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1243_0);
+L20472:;
+ if (!(g_room == room_town_south)) goto L20712;
+ goto L20584; /* gml: if !(sprite_index == 307) goto L20584 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1255_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1256_0);
+L20584:;
+ goto L20712; /* gml: if !(sprite_index == 308) goto L20712 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1260_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1261_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1262_0);
+L20712:;
+ if (!(g_room == room_town_mid)) goto L21384;
+ goto L20784; /* gml: if !(sprite_index == 280) goto L20784 */
+ c->msc = 340;
+ /* gml: scr_text(global.msc) */
+L20784:;
+ goto L21220; /* gml: if !(sprite_index == 153) goto L21220 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1276_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1277_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1278_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_1279_0);
+ MSG(4, obj_npc_room_slash_Other_10_gml_1280_0);
+ MSG(5, obj_npc_room_slash_Other_10_gml_1281_0);
+ MSG(6, obj_npc_room_slash_Other_10_gml_1282_0);
+ MSG(7, obj_npc_room_slash_Other_10_gml_1283_0);
+ goto L21220; /* gml: if !(talked >= 1) goto L21220 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1287_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1288_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1289_0);
+L21220:;
+ goto L21384; /* gml: if !(sprite_index == 149) goto L21384 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1295_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1296_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1297_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_1298_0);
+L21384:;
+ if (!(g_room == room_town_north)) goto L21888;
+ goto L21480; /* gml: if !(sprite_index == 288) goto L21480 */
+ c->fc = 16;
+ /* gml: global.typer = 5 */
+ c->msc = 215;
+ /* gml: scr_text(global.msc) */
+L21480:;
+ goto L21812; /* gml: if !(sprite_index == 286) goto L21812 */
+ goto L21668; /* gml: if !(talked == 0) goto L21668 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1316_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1317_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1318_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_1319_0);
+ goto L21812;
+L21668:;
+ MSG(0, obj_npc_room_slash_Other_10_gml_1323_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1324_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1325_0);
+ MSG(3, obj_npc_room_slash_Other_10_gml_1326_0);
+L21812:;
+ goto L21888; /* gml: if !(sprite_index == 287) goto L21888 */
+ c->fc = 17;
+ /* gml: global.typer = 5 */
+ c->msc = 220;
+ /* gml: scr_text(global.msc) */
+L21888:;
+ if (!(g_room == room_town_church)) goto L21940;
+ c->msc = 345;
+ /* gml: scr_text(global.msc) */
+L21940:;
+ if (!(g_room == room_hospital_lobby)) goto L22252;
+ MSG(0, obj_npc_room_slash_Other_10_gml_1348_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1349_0);
+ goto L22160; /* gml: if !(talked >= 1) goto L22160 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1353_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1354_0);
+ MSG(2, obj_npc_room_slash_Other_10_gml_1355_0);
+L22160:;
+ goto L22252; /* gml: if !(tempvar >= 1) goto L22252 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1361_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1362_0);
+L22252:;
+ if (!(g_room == room_beach)) goto L22456;
+ goto L22364; /* gml: if !(sprite_index == 310) goto L22364 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1371_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1372_0);
+L22364:;
+ goto L22456; /* gml: if !(sprite_index == 311) goto L22456 */
+ MSG(0, obj_npc_room_slash_Other_10_gml_1376_0);
+ MSG(1, obj_npc_room_slash_Other_10_gml_1377_0);
+L22456:;
+ /* gml: remanimspeed = image_speed */
+ /* gml: myinteract = 3 */
+ /* gml: mydialoguer = instance_create(0, 0, 5) */
+ /* gml: talked = (talked + 1) */
+}
+
+void gm_npc_sign_create(TxtCtx *c) {
+ /* gml: myinteract = 0 */
+ /* gml: image_speed = 0 */
+ /* gml: setdepth = 1 */
+ /* gml: read = 0 */
+ if (!(sv.darkzone == 1)) goto L92;
+ /* gml: image_xscale = 2 */
+ /* gml: image_yscale = 2 */
+L92:;
+ if (!(g_room == room_cc_prison_cells)) goto L176;
+ c->spr = spr_ironshackle;
+ /* gml: image_index = 0 */
+ if (!(sv.flag[105] == 1)) goto L176;
+ /* gml: image_index = 1 */
+L176:;
+ if (!(g_room == room_cc_prison2)) goto L248;
+ c->spr = spr_npc_originalstarwalker;
+ if (!(sv.flag[254] == 0)) goto L248;
+ /* gml: instance_destroy() */
+L248:;
+ if (!(g_room == room_cc_throneroom)) goto L344;
+ goto L332; /* gml: if !((x >= 220) && (x <= 400)) goto L332 */
+ c->spr = spr_darkthrone;
+ goto L344;
+L332:;
+ c->spr = spr_darkmoney;
+L344:;
+ if (!(g_room == room_flowershop_2f)) goto L792;
+ c->spr = spr_flowercontainer;
+ /* gml: num = 0 */
+ /* gml: colortxt = scr_84_get_lang_string("obj_npc_sign_slash_Create_0_gml_45_0") */
+ goto L596; /* gml: if !(x > 170) goto L596 */
+ /* gml: num = 1 */
+ /* gml: colortxt = scr_84_get_lang_string("obj_npc_sign_slash_Create_0_gml_50_0") */
+ goto L536; /* gml: if !(y > 110) goto L536 */
+ /* gml: num = 5 */
+ /* gml: colortxt = scr_84_get_lang_string("obj_npc_sign_slash_Create_0_gml_51_0") */
+L536:;
+ goto L596; /* gml: if !(y > 130) goto L596 */
+ /* gml: num = 6 */
+ /* gml: colortxt = scr_84_get_lang_string("obj_npc_sign_slash_Create_0_gml_52_0") */
+L596:;
+ goto L776; /* gml: if !(x < 140) goto L776 */
+ /* gml: num = 2 */
+ /* gml: colortxt = scr_84_get_lang_string("obj_npc_sign_slash_Create_0_gml_57_0") */
+ goto L716; /* gml: if !(y > 110) goto L716 */
+ /* gml: num = 3 */
+ /* gml: colortxt = scr_84_get_lang_string("obj_npc_sign_slash_Create_0_gml_58_0") */
+L716:;
+ goto L776; /* gml: if !(y > 130) goto L776 */
+ /* gml: num = 4 */
+ /* gml: colortxt = scr_84_get_lang_string("obj_npc_sign_slash_Create_0_gml_59_0") */
+L776:;
+ /* gml: image_index = num */
+L792:;
+ if (!(g_room == room_town_north)) goto L852;
+ c->spr = spr_npc_asgoretruck;
+ /* gml: setdepth = 0 */
+ /* gml: depth = 700000 */
+L852:;
+ if (!(g_room == room_beach)) goto L884;
+ c->spr = spr_npc_beachtable;
+L884:;
+ if (!(g_room == room_town_krisyard)) goto L916;
+ c->spr = spr_torcar_u;
+L916:;
+ goto L948; /* gml: if !(setdepth == 1) goto L948 */
+ /* gml: scr_depth() */
+L948:;
+}
+
+void gm_npc_sign_talk(TxtCtx *c) {
+ c->msc = 0;
+ /* gml: global.typer = 5 */
+ if (!(sv.darkzone == 1)) goto L56;
+ /* gml: global.typer = 6 */
+L56:;
+ c->fc = 0;
+ c->fe = 0;
+ /* gml: global.interact = 1 */
+ MSG(0, obj_npc_sign_slash_Other_10_gml_8_0);
+ if (!(g_room == room_field1)) goto L292;
+ goto L220; /* gml: if !(x < (room_width / 2)) goto L220 */
+ MSG(0, obj_npc_sign_slash_Other_10_gml_12_0);
+L220:;
+ goto L292; /* gml: if !(x > (room_width / 2)) goto L292 */
+ MSG(0, obj_npc_sign_slash_Other_10_gml_13_0);
+L292:;
+ if (!(g_room == room_field2)) goto L348;
+ MSG(0, obj_npc_sign_slash_Other_10_gml_30_0);
+L348:;
+ if (!(g_room == room_field2A)) goto L520;
+ MSG(0, obj_npc_sign_slash_Other_10_gml_41_0);
+ /* gml: global.msg[1] = ((scr_84_get_lang_string("obj_npc_sign_slash_Other_10_gml_42_0") + scr_get_input_name(6)) + scr_84_get_lang_string("obj_npc_sign_slash_Other_10_gml_42_1")) */
+ MSG(2, obj_npc_sign_slash_Other_10_gml_43_0);
+L520:;
+ if (!(g_room == room_field_maze)) goto L912;
+ goto L596; /* gml: if !(y > 80) goto L596 */
+ MSG(0, obj_npc_sign_slash_Other_10_gml_49_0);
+L596:;
+ goto L688; /* gml: if !(y > 200) goto L688 */
+ MSG(0, obj_npc_sign_slash_Other_10_gml_52_0);
+ MSG(1, obj_npc_sign_slash_Other_10_gml_53_0);
+L688:;
+ goto L744; /* gml: if !(y > 640) goto L744 */
+ MSG(0, obj_npc_sign_slash_Other_10_gml_55_0);
+L744:;
+ goto L828; /* gml: if !((y > 1000) && (x > 1000)) goto L828 */
+ MSG(0, obj_npc_sign_slash_Other_10_gml_56_0);
+L828:;
+ goto L912; /* gml: if !((y > 1000) && (x < 600)) goto L912 */
+ MSG(0, obj_npc_sign_slash_Other_10_gml_57_0);
+L912:;
+ if (!(g_room == room_field_getsusie)) goto L968;
+ MSG(0, obj_npc_sign_slash_Other_10_gml_63_0);
+L968:;
+ if (!(g_room == room_field3)) goto L1060;
+ MSG(0, obj_npc_sign_slash_Other_10_gml_68_0);
+ MSG(1, obj_npc_sign_slash_Other_10_gml_69_0);
+L1060:;
+ if (!(g_room == room_field_puzzletutorial)) goto L1152;
+ MSG(0, obj_npc_sign_slash_Other_10_gml_74_0);
+ MSG(1, obj_npc_sign_slash_Other_10_gml_75_0);
+L1152:;
+ if (!(g_room == room_field_secret1)) goto L1300;
+ MSG(0, obj_npc_sign_slash_Other_10_gml_80_0);
+ MSG(1, obj_npc_sign_slash_Other_10_gml_81_0);
+ goto L1300; /* gml: if !(read >= 1) goto L1300 */
+ MSG(0, obj_npc_sign_slash_Other_10_gml_84_0);
+L1300:;
+ if (!(g_room == room_forest_puzzle1)) goto L1392;
+ MSG(0, obj_npc_sign_slash_Other_10_gml_90_0);
+ MSG(1, obj_npc_sign_slash_Other_10_gml_91_0);
+L1392:;
+ if (!(g_room == room_forest_thrashmaker)) goto L1412;
+L1412:;
+ if (!(g_room == room_cc_prison_cells)) goto L1500;
+ sv.flag[231] = (sv.flag[231] + 1);
+ c->msc = 300;
+ /* gml: scr_text(global.msc) */
+L1500:;
+ if (!(g_room == room_cc_prison2)) goto L1592;
+ MSG(0, obj_npc_sign_slash_Other_10_gml_161_0);
+ MSG(1, obj_npc_sign_slash_Other_10_gml_162_0);
+L1592:;
+ if (!(g_room == room_cc_throneroom)) goto L1724;
+ goto L1668; /* gml: if !(sprite_index == 351) goto L1668 */
+ MSG(0, obj_npc_sign_slash_Other_10_gml_169_0);
+L1668:;
+ goto L1724; /* gml: if !(sprite_index == 350) goto L1724 */
+ MSG(0, obj_npc_sign_slash_Other_10_gml_173_0);
+L1724:;
+ if (!(g_room == room_flowershop_2f)) goto L1796;
+ MSG(0, obj_npc_sign_slash_Other_10_gml_179_0); /* gml: global.msg[0] = scr_84_get_subst_string(scr_84_get_lang_string("obj_npc_sign_slash_Other_10_gml_179_0"), colortxt) */
+L1796:;
+ if (!(g_room == room_town_north)) goto L1888;
+ MSG(0, obj_npc_sign_slash_Other_10_gml_184_0);
+ MSG(1, obj_npc_sign_slash_Other_10_gml_185_0);
+L1888:;
+ if (!(g_room == room_beach)) goto L1940;
+ c->msc = 192;
+ /* gml: scr_text(global.msc) */
+L1940:;
+ if (!(g_room == room_town_krisyard)) goto L1996;
+ MSG(0, obj_npc_sign_slash_Other_10_gml_196_0);
+L1996:;
+ /* gml: read = (read + 1) */
+ /* gml: myinteract = 3 */
+ /* gml: mydialoguer = instance_create(0, 0, 5) */
+}
+
+void gm_npc_facing_create(TxtCtx *c) {
+ c->tspr[0] = spr_toriel_dt;
+ c->tspr[1] = spr_toriel_rt;
+ c->tspr[3] = spr_toriel_lt;
+ c->tspr[2] = spr_toriel_ut;
+ /* gml: myinteract = 0 */
+ /* gml: facing = 0 */
+ /* gml: dfacing = 0 */
+ /* gml: image_speed = 0 */
+ /* gml: talked = 0 */
+ /* gml: ourcase = 0 */
+ if (!(sv.darkzone == 1)) goto L164;
+ /* gml: image_xscale = 2 */
+ /* gml: image_yscale = 2 */
+L164:;
+ /* gml: normalanim = 1 */
+ /* gml: remanimspeed = 0 */
+ /* gml: depthbonus = 0 */
+ /* gml: depthcancel = 0 */
+ if (!(g_room == room_alphysclass)) goto L768;
+ /* gml: facing = 2 */
+ /* gml: dfacing = 2 */
+ /* gml: ourcase = 1 */
+ goto L404; /* gml: if !(y < 172) goto L404 */
+ c->tspr[0] = spr_noelle_dt;
+ c->tspr[1] = spr_noelle_ut_r;
+ c->tspr[2] = spr_noelle_ut;
+ c->tspr[3] = spr_noelle_ut_l;
+ goto L404; /* gml: if !(x > 120) goto L404 */
+ c->tspr[2] = spr_berdly_ut;
+ c->tspr[1] = spr_berdly_ut_r;
+ c->tspr[3] = spr_berdly_ut_l;
+ c->tspr[0] = spr_berdly_ut;
+L404:;
+ goto L540; /* gml: if !(y > 172) goto L540 */
+ c->tspr[0] = spr_catti_ut;
+ c->tspr[2] = spr_catti_ut;
+ c->tspr[1] = spr_catti_ut;
+ c->tspr[3] = spr_catti_ut;
+ goto L540; /* gml: if !(x > 120) goto L540 */
+ c->tspr[0] = spr_mkid_ut;
+ c->tspr[1] = spr_mkid_ut_r;
+ c->tspr[3] = spr_mkid_ut_l;
+ c->tspr[2] = spr_mkid_ut;
+L540:;
+ goto L676; /* gml: if !(y > 212) goto L676 */
+ c->tspr[0] = spr_jockington_ut;
+ c->tspr[2] = spr_jockington_ut;
+ c->tspr[1] = spr_jockington_rt;
+ c->tspr[3] = spr_jockington_lt;
+ goto L676; /* gml: if !(x > 120) goto L676 */
+ c->tspr[2] = spr_snowy_ut;
+ c->tspr[3] = spr_snowy_ut_l;
+ c->tspr[1] = spr_snowy_ut_r;
+ c->tspr[0] = spr_snowy_ut;
+L676:;
+ goto L768; /* gml: if !(y < 100) goto L768 */
+ /* gml: facing = 0 */
+ /* gml: dfacing = 0 */
+ c->tspr[0] = spr_alphysd;
+ c->tspr[3] = spr_alphysl;
+ c->tspr[1] = spr_alphysr;
+ c->tspr[2] = spr_alphysu;
+L768:;
+ if (!(g_room == room_field2)) goto L912;
+ /* gml: facing = 0 */
+ /* gml: dfacing = 0 */
+ c->tspr[0] = spr_lancer_dt;
+ c->tspr[2] = spr_lancer_dt;
+ c->tspr[1] = spr_lancer_rt;
+ c->tspr[3] = spr_lancer_lt;
+ if (!(g_room == room_field2)) goto L912;
+ if (!(sv.plot >= 35)) goto L912;
+ /* gml: instance_destroy() */
+L912:;
+ if (!(g_room == room_forest_maze_deadend)) goto L1104;
+ /* gml: facing = 0 */
+ /* gml: dfacing = 0 */
+ if (!(sv.plot < 95)) goto L988;
+ sv.plot = 95;
+L988:;
+ sv.flag[293] = (sv.flag[293] + 1);
+ c->tspr[0] = spr_lancer_dt;
+ c->tspr[2] = spr_lancer_dt;
+ c->tspr[1] = spr_lancer_rt;
+ c->tspr[3] = spr_lancer_lt;
+ if (!(sv.plot >= 120)) goto L1104;
+ /* gml: instance_destroy() */
+L1104:;
+ if (!(g_room == room_forest_maze_deadend2)) goto L1264;
+ /* gml: facing = 2 */
+ /* gml: dfacing = 2 */
+ sv.flag[294] = (sv.flag[294] + 1);
+ c->tspr[0] = spr_susied_dark;
+ c->tspr[2] = spr_susieu_dark;
+ c->tspr[1] = spr_susier_dark;
+ c->tspr[3] = spr_susiel_dark;
+ if (!(sv.plot >= 120)) goto L1264;
+ /* gml: instance_destroy() */
+L1264:;
+ if (!(g_room == room_field_boxpuzzle)) goto L1524;
+ /* gml: type = 0 */
+ goto L1424; /* gml: if !(x < (room_width / 2)) goto L1424 */
+ c->spr = spr_ralseid;
+ c->tspr[0] = spr_ralseid;
+ c->tspr[2] = spr_ralseiu;
+ c->tspr[1] = spr_ralseir;
+ c->tspr[3] = spr_ralseil;
+ /* gml: y = (y + sprite_height) */
+ goto L1524;
+L1424:;
+ /* gml: type = 1 */
+ c->spr = spr_susied;
+ c->tspr[0] = spr_susied_dark;
+ c->tspr[2] = spr_susieu_dark;
+ c->tspr[1] = spr_susier_dark;
+ c->tspr[3] = spr_susiel_dark;
+ /* gml: y = (y + sprite_height) */
+L1524:;
+ if (!(g_room == room_cc_kingbattle)) goto L1664;
+ if (!(sv.plot < 240)) goto L1576;
+ /* gml: instance_destroy() */
+L1576:;
+ c->spr = spr_ralseid;
+ c->tspr[0] = spr_ralseid;
+ c->tspr[2] = spr_ralseiu;
+ c->tspr[1] = spr_ralseir;
+ c->tspr[3] = spr_ralseil;
+ /* gml: y = (y + sprite_height) */
+L1664:;
+ if (!(g_room == room_cc_throneroom)) goto L1816;
+ if (!(sv.plot < 240)) goto L1716;
+ /* gml: instance_destroy() */
+L1716:;
+ c->spr = spr_lancer_dt;
+ c->tspr[0] = spr_lancer_dt;
+ c->tspr[2] = spr_lancer_ut;
+ c->tspr[1] = spr_lancer_rt;
+ c->tspr[3] = spr_lancer_lt;
+ /* gml: y = (y + sprite_height) */
+ /* gml: depthbonus = -250 */
+L1816:;
+ if (!(g_room == room_forest_area1)) goto L2056;
+ c->spr = spr_susier_dark;
+ c->tspr[1] = spr_susier_dark;
+ c->tspr[0] = spr_susied_dark;
+ c->tspr[2] = spr_susieu_dark;
+ c->tspr[3] = spr_susiel_dark;
+ /* gml: facing = 1 */
+ /* gml: dfacing = 1 */
+ goto L2024; /* gml: if !(x >= 1160) goto L2024 */
+ /* gml: facing = 3 */
+ /* gml: dfacing = 3 */
+ c->spr = spr_lancer_lt;
+ c->tspr[0] = spr_lancer_dt;
+ c->tspr[2] = spr_lancer_dt;
+ c->tspr[1] = spr_lancer_rt;
+ c->tspr[3] = spr_lancer_lt;
+L2024:;
+ if (!(sv.plot > 70)) goto L2056;
+ /* gml: instance_destroy() */
+L2056:;
+ if (!(g_room == room_forest_area3)) goto L2268;
+ goto L2184; /* gml: if !(x >= 600) goto L2184 */
+ /* gml: facing = 2 */
+ /* gml: dfacing = 2 */
+ c->spr = spr_lancer_ut;
+ c->tspr[0] = spr_lancer_dt;
+ c->tspr[2] = spr_lancer_ut;
+ c->tspr[1] = spr_lancer_rt;
+ c->tspr[3] = spr_lancer_lt;
+ goto L2268;
+L2184:;
+ /* gml: facing = 2 */
+ /* gml: dfacing = 2 */
+ c->spr = spr_susieut_dark;
+ c->tspr[0] = spr_susiedt_dark;
+ c->tspr[2] = spr_susieut_dark;
+ c->tspr[1] = spr_susiert_dark;
+ c->tspr[3] = spr_susielt_dark;
+L2268:;
+ if (!(g_room == room_library)) goto L2588;
+ goto L2404; /* gml: if !(x < 120) goto L2404 */
+ /* gml: facing = 1 */
+ /* gml: dfacing = 1 */
+ c->tspr[0] = spr_berdly_library_r;
+ c->tspr[2] = spr_berdly_library_u;
+ c->tspr[1] = spr_berdly_library_r;
+ c->tspr[3] = spr_berdly_library_u;
+ /* gml: depthcancel = 1 */
+ /* gml: depth = 4000 */
+L2404:;
+ goto L2496; /* gml: if !(x > 150) goto L2496 */
+ /* gml: facing = 1 */
+ /* gml: dfacing = 1 */
+ c->tspr[0] = spr_jockington_ut;
+ c->tspr[2] = spr_jockington_ut;
+ c->tspr[1] = spr_jockington_rt;
+ c->tspr[3] = spr_jockington_lt;
+L2496:;
+ goto L2588; /* gml: if !(x > 220) goto L2588 */
+ /* gml: facing = 3 */
+ /* gml: dfacing = 3 */
+ c->tspr[0] = spr_tem_sit_l;
+ c->tspr[1] = spr_tem_sit_r;
+ c->tspr[2] = spr_tem_sit;
+ c->tspr[3] = spr_tem_sit_l;
+L2588:;
+ if (!(g_room == room_flowershop_1f)) goto L2680;
+ /* gml: facing = 0 */
+ /* gml: dfacing = 0 */
+ c->tspr[0] = spr_asgored;
+ c->tspr[2] = spr_asgoreu;
+ c->tspr[1] = spr_asgorer;
+ c->tspr[3] = spr_asgorel;
+L2680:;
+ if (!(g_room == room_flowershop_2f)) goto L2772;
+ /* gml: facing = 2 */
+ /* gml: dfacing = 2 */
+ c->tspr[0] = spr_asgored;
+ c->tspr[2] = spr_asgoreu;
+ c->tspr[1] = spr_asgorer;
+ c->tspr[3] = spr_asgorel;
+L2772:;
+ if (!(g_room == room_alphysalley)) goto L2864;
+ /* gml: facing = 3 */
+ /* gml: dfacing = 3 */
+ c->tspr[0] = spr_alphysd;
+ c->tspr[2] = spr_alphysu;
+ c->tspr[1] = spr_alphysr;
+ c->tspr[3] = spr_alphysl;
+L2864:;
+ if (!(g_room == room_town_south)) goto L2956;
+ /* gml: facing = 0 */
+ /* gml: dfacing = 0 */
+ c->tspr[0] = spr_undyne_dt;
+ c->tspr[2] = spr_undyne_ut;
+ c->tspr[1] = spr_undyne_rt;
+ c->tspr[3] = spr_undyne_lt;
+L2956:;
+ if (!(g_room == room_town_mid)) goto L3048;
+ /* gml: facing = 0 */
+ /* gml: dfacing = 0 */
+ c->tspr[0] = spr_sans_d;
+ c->tspr[3] = spr_sans_l;
+ c->tspr[2] = spr_sans_u;
+ c->tspr[1] = spr_sans_r;
+L3048:;
+ if (!(g_room == room_town_north)) goto L3180;
+ /* gml: facing = 3 */
+ /* gml: dfacing = 3 */
+ c->tspr[0] = spr_noelle_dt;
+ c->tspr[3] = spr_noelle_lt;
+ c->tspr[2] = spr_noelle_ut;
+ c->tspr[1] = spr_noelle_rt;
+ if (!(sv.flag[255] < 1)) goto L3180;
+ /* gml: instance_destroy() */
+L3180:;
+ /* gml: scr_npcdir() */
+ /* gml: y = (y - sprite_height) */
+ goto L3252; /* gml: if !(depthcancel == 0) goto L3252 */
+ /* gml: scr_depth() */
+L3252:;
+ /* gml: depth = (depth + depthbonus) */
+}
+
+void gm_npc_facing_talk(TxtCtx *c) {
+ c->msc = 0;
+ /* gml: global.typer = 5 */
+ if (!(sv.darkzone == 1)) goto L56;
+ /* gml: global.typer = 6 */
+L56:;
+ c->fc = 0;
+ c->fe = 0;
+ /* gml: global.interact = 1 */
+ /* gml: image_speed = 0.2 */
+ if (!(sv.darkzone == 1)) goto L152;
+ /* gml: image_speed = 0.1 */
+L152:;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_10_0);
+ if (!(g_room == room_alphysclass)) goto L2916;
+ goto L536; /* gml: if !(utsprite == 130) goto L536 */
+ c->msc = 100;
+ goto L272; /* gml: if !(talked > 0) goto L272 */
+ c->msc = 102;
+L272:;
+ /* gml: scr_text(global.msc) */
+ c->fe = 0;
+ c->fc = 3;
+ /* gml: global.typer = 12 */
+ if (!(sv.plot >= 3)) goto L536;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_29_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_30_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_31_0);
+ goto L536; /* gml: if !(talked >= 1) goto L536 */
+ /* gml: global.typer = 23 */
+ c->fe = 3;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_37_0);
+L536:;
+ goto L1096; /* gml: if !(utsprite == 134) goto L1096 */
+ c->fc = 12;
+ c->fe = 1;
+ /* gml: global.typer = 13 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_48_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_49_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_50_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_51_0);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_52_0);
+ MSG(5, obj_npc_facing_slash_Other_10_gml_53_0);
+ goto L900; /* gml: if !(talked > 0) goto L900 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_57_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_58_0);
+L900:;
+ if (!(sv.plot >= 3)) goto L1096;
+ c->fe = 3;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_65_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_66_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_67_0);
+ goto L1096; /* gml: if !(talked > 0) goto L1096 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_71_0);
+L1096:;
+ goto L1644; /* gml: if !(utsprite == 148) goto L1644 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_81_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_82_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_83_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_84_0);
+ goto L1388; /* gml: if !(talked > 0) goto L1388 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_88_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_89_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_90_0);
+L1388:;
+ if (!(sv.plot >= 3)) goto L1644;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_96_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_97_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_98_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_99_0);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_100_0);
+ goto L1644; /* gml: if !(talked > 0) goto L1644 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_104_0);
+L1644:;
+ goto L2012; /* gml: if !(utsprite == 152) goto L2012 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_114_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_115_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_116_0);
+ goto L1828; /* gml: if !(talked > 0) goto L1828 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_120_0);
+L1828:;
+ if (!(sv.plot >= 3)) goto L2012;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_126_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_127_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_128_0);
+ goto L2012; /* gml: if !(talked > 0) goto L2012 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_132_0);
+L2012:;
+ goto L2220; /* gml: if !(utsprite == 139) goto L2220 */
+ c->fc = 13;
+ c->fe = 0;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_145_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_146_0);
+ if (!(sv.plot >= 3)) goto L2220;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_150_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_151_0);
+L2220:;
+ goto L2580; /* gml: if !(utsprite == 140) goto L2580 */
+ c->fc = 14;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_159_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_160_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_161_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_162_0);
+ goto L2488; /* gml: if !(talked > 0) goto L2488 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_166_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_167_0);
+L2488:;
+ if (!(sv.plot >= 3)) goto L2580;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_174_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_175_0);
+L2580:;
+ goto L2916; /* gml: if !(utsprite == 120) goto L2916 */
+ c->fc = 11;
+ /* gml: global.typer = 20 */
+ c->fe = 3;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_185_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_186_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_187_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_188_0);
+ goto L2848; /* gml: if !(talked > 0) goto L2848 */
+ c->fe = 7;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_192_0);
+L2848:;
+ if (!(sv.plot >= 3)) goto L2916;
+ c->fe = 5;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_198_0);
+L2916:;
+ if (!(g_room == room_field2)) goto L3984;
+ c->fc = 5;
+ c->fe = 0;
+ /* gml: global.typer = 32 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_210_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_211_0);
+ FACE(2, 'R', 10);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_213_0);
+ FACE(4, 'L', 3);
+ MSG(5, obj_npc_facing_slash_Other_10_gml_215_0);
+ MSG(6, obj_npc_facing_slash_Other_10_gml_216_0);
+ FACE(7, 'R', 3);
+ MSG(8, obj_npc_facing_slash_Other_10_gml_218_0);
+ FACE(9, 'L', 1);
+ MSG(10, obj_npc_facing_slash_Other_10_gml_220_0);
+ MSG(11, obj_npc_facing_slash_Other_10_gml_221_0);
+ FACE(12, 'R', 9);
+ MSG(13, obj_npc_facing_slash_Other_10_gml_223_0);
+ if (!(sv.flag[210] == 1)) goto L3640;
+ c->fc = 2;
+ c->fe = 11;
+ /* gml: global.typer = 31 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_230_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_231_0);
+ FACE(2, 'L', 7);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_233_0);
+L3640:;
+ if (!(sv.flag[210] == 2)) goto L3936;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_239_0);
+ FACE(1, 'R', 8);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_241_0);
+ FACE(3, 'L', 3);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_243_0);
+ MSG(5, obj_npc_facing_slash_Other_10_gml_244_0);
+ FACE(6, 'R', 10);
+ MSG(7, obj_npc_facing_slash_Other_10_gml_246_0);
+L3936:;
+ if (!(sv.flag[210] == 0)) goto L3984;
+ sv.flag[210] = 1;
+L3984:;
+ if (!(g_room == room_field_boxpuzzle)) goto L4592;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_257_0);
+ goto L4456; /* gml: if !(type == 0) goto L4456 */
+ /* gml: global.typer = 31 */
+ c->fc = 2;
+ c->fe = 0;
+ if (!(sv.flag[212] == 1)) goto L4452;
+ /* gml: input_name = scr_get_input_name(4) */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_269_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_270_0); /* gml: global.msg[1] = scr_84_get_subst_string(scr_84_get_lang_string("obj_npc_facing_slash_Other_10_gml_270_0"), input_name) */
+ FACE(2, 'S', 9);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_272_0); /* gml: global.msg[3] = scr_84_get_subst_string(scr_84_get_lang_string("obj_npc_facing_slash_Other_10_gml_272_0"), input_name) */
+ goto L4452; /* gml: if !(talked >= 1) goto L4452 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_276_0); /* gml: global.msg[0] = scr_84_get_subst_string(scr_84_get_lang_string("obj_npc_facing_slash_Other_10_gml_276_0"), input_name) */
+ FACE(1, 'S', 2);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_278_0);
+L4452:;
+ goto L4592;
+L4456:;
+ /* gml: global.typer = 30 */
+ c->fc = 1;
+ c->fe = 0;
+ if (!(sv.flag[212] == 1)) goto L4592;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_295_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_296_0);
+L4592:;
+ if (!(g_room == room_cc_prison_cells)) goto L5640;
+ /* gml: global.typer = 31 */
+ c->fc = 2;
+ c->fe = 1;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_307_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_308_0);
+ goto L4776; /* gml: if !(talked >= 1) goto L4776 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_312_0);
+L4776:;
+ if (!(sv.flag[231] >= 3)) goto L5640;
+ /* gml: shack = 0 */
+ /* gml: moss = 0 */
+ goto L4900; /* gml: if !((global.chararmor1[1] == 5) || global.chararmor2[1]) goto L4900 */
+ /* gml: shack = 1 */
+L4900:;
+ if (!(sv.flag[106] == 1)) goto L4940;
+ /* gml: moss = 1 */
+L4940:;
+ /* gml: with (obj_prisonevent) { // to L4960 */
+ /* gml: con = 15 */
+ /* gml: } // end with */
+ c->fe = 0;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_323_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_324_0);
+ goto L5212; /* gml: if !(moss == 1) goto L5212 */
+ MSG(1, obj_npc_facing_slash_Other_10_gml_328_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_329_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_330_0);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_331_0);
+L5212:;
+ goto L5412; /* gml: if !(shack == 1) goto L5412 */
+ MSG(1, obj_npc_facing_slash_Other_10_gml_337_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_338_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_339_0);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_340_0);
+ MSG(5, obj_npc_facing_slash_Other_10_gml_341_0);
+L5412:;
+ goto L5640; /* gml: if !((moss == 1) && (shack == 1)) goto L5640 */
+ MSG(1, obj_npc_facing_slash_Other_10_gml_348_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_349_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_350_0);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_351_0);
+ MSG(5, obj_npc_facing_slash_Other_10_gml_352_0);
+L5640:;
+ if (!(g_room == room_forest_area1)) goto L6288;
+ if (!(sv.flag[232] == 0)) goto L5760;
+ /* gml: global.typer = 31 */
+ c->fc = 2;
+ c->fe = 0;
+ c->msc = 255;
+ /* gml: scr_text(global.msc) */
+ goto L6288;
+L5760:;
+ /* gml: global.typer = 30 */
+ c->fc = 1;
+ c->fe = 0;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_375_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_376_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_377_0);
+ FACE(3, 'R', 6);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_379_0);
+ FACE(5, 'L', 2);
+ MSG(6, obj_npc_facing_slash_Other_10_gml_381_0);
+ MSG(7, obj_npc_facing_slash_Other_10_gml_382_0);
+ FACE(8, 'S', 2);
+ MSG(9, obj_npc_facing_slash_Other_10_gml_384_0);
+ goto L6288; /* gml: if !(x >= 1160) goto L6288 */
+ /* gml: global.typer = 32 */
+ c->fc = 5;
+ c->fe = 3;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_392_0);
+ FACE(1, 'S', 2);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_394_0);
+L6288:;
+ if (!(g_room == room_forest_puzzle1)) goto L7672;
+ /* gml: global.typer = 30 */
+ c->fc = 1;
+ c->fe = 1;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_406_0);
+ FACE(1, 'L', 3);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_408_0);
+ FACE(3, 'S', 2);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_410_0);
+ FACE(5, 'R', 0);
+ MSG(6, obj_npc_facing_slash_Other_10_gml_412_0);
+ FACE(7, 'S', 7);
+ MSG(8, obj_npc_facing_slash_Other_10_gml_414_0);
+ goto L7120; /* gml: if !(talked >= 1) goto L7120 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_419_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_420_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_421_0);
+ FACE(3, 'L', 3);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_423_0);
+ FACE(5, 'S', 2);
+ MSG(6, obj_npc_facing_slash_Other_10_gml_425_0);
+ FACE(7, 'R', 0);
+ MSG(8, obj_npc_facing_slash_Other_10_gml_427_0);
+ MSG(9, obj_npc_facing_slash_Other_10_gml_428_0);
+ FACE(10, 'L', 3);
+ MSG(11, obj_npc_facing_slash_Other_10_gml_430_0);
+ FACE(12, 'R', 9);
+ MSG(13, obj_npc_facing_slash_Other_10_gml_432_0);
+L7120:;
+ goto L7380; /* gml: if !(talked < -50) goto L7380 */
+ c->fe = 2;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_438_0);
+ FACE(1, 'L', 2);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_440_0);
+ FACE(3, 'R', 9);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_442_0);
+ FACE(5, 'S', 2);
+ MSG(6, obj_npc_facing_slash_Other_10_gml_444_0);
+L7380:;
+ goto L7672; /* gml: if !(dtsprite == 211) goto L7672 */
+ /* gml: global.typer = 32 */
+ c->fc = 5;
+ c->fe = 0;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_452_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_453_0);
+ FACE(2, 'S', 2);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_455_0);
+ FACE(4, 'L', 6);
+ MSG(5, obj_npc_facing_slash_Other_10_gml_457_0);
+ MSG(6, obj_npc_facing_slash_Other_10_gml_458_0);
+L7672:;
+ if (!(g_room == room_forest_area3)) goto L8440;
+ /* gml: global.typer = 31 */
+ c->fc = 2;
+ c->fe = 6;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_470_0);
+ FACE(1, 'S', 0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_472_0);
+ FACE(3, 'R', 0);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_474_0);
+ FACE(5, 'S', 2);
+ MSG(6, obj_npc_facing_slash_Other_10_gml_476_0);
+ FACE(7, 'L', 3);
+ MSG(8, obj_npc_facing_slash_Other_10_gml_478_0);
+ FACE(9, 'S', 6);
+ MSG(10, obj_npc_facing_slash_Other_10_gml_480_0);
+ goto L8276; /* gml: if !(talked >= 1) goto L8276 */
+ /* gml: global.typer = 31 */
+ c->fc = 2;
+ c->fe = 0;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_489_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_490_0);
+ FACE(2, 'S', 6);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_492_0);
+L8276:;
+ goto L8440; /* gml: if !(x >= 600) goto L8440 */
+ /* gml: global.typer = 32 */
+ c->fc = 5;
+ c->fe = 0;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_500_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_501_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_502_0);
+L8440:;
+ if (!(g_room == room_forest_savepoint2)) goto L9108;
+ c->fc = 1;
+ c->fe = 2;
+ /* gml: global.typer = 30 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_512_0);
+ FACE(1, 'L', 2);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_514_0);
+ FACE(3, 'R', 0);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_516_0);
+ FACE(5, 'L', 3);
+ MSG(6, obj_npc_facing_slash_Other_10_gml_518_0);
+ FACE(7, 'S', 2);
+ MSG(8, obj_npc_facing_slash_Other_10_gml_520_0);
+ FACE(9, 'L', 1);
+ MSG(10, obj_npc_facing_slash_Other_10_gml_522_0);
+ FACE(11, 'R', 9);
+ MSG(12, obj_npc_facing_slash_Other_10_gml_524_0);
+ goto L9072; /* gml: if !(talked >= 1) goto L9072 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_527_0);
+ FACE(1, 'L', 2);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_529_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_530_0);
+L9072:;
+ /* gml: with (obj_npc_facing) { // to L9104 */
+ /* gml: talked = (talked + 1) */
+ /* gml: } // end with */
+L9108:;
+ if (!(g_room == room_forest_maze_deadend)) goto L9652;
+ c->fc = 5;
+ c->fe = 3;
+ /* gml: global.typer = 32 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_541_0);
+ FACE(1, 'R', 8);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_543_0);
+ FACE(3, 'L', 6);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_545_0);
+ FACE(5, 'R', 9);
+ MSG(6, obj_npc_facing_slash_Other_10_gml_547_0);
+ goto L9512; /* gml: if !(talked >= 1) goto L9512 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_550_0);
+ FACE(1, 'R', 8);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_552_0);
+L9512:;
+ if (!(sv.flag[293] >= 2)) goto L9652;
+ c->fe = 2;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_557_0);
+ FACE(1, 'R', 9);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_559_0);
+L9652:;
+ if (!(g_room == room_forest_maze_deadend2)) goto L10204;
+ c->fc = 1;
+ c->fe = 0;
+ /* gml: global.typer = 30 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_568_0);
+ FACE(1, 'R', 6);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_570_0);
+ FACE(3, 'S', 2);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_572_0);
+ MSG(5, obj_npc_facing_slash_Other_10_gml_573_0);
+ FACE(6, 'R', 8);
+ MSG(7, obj_npc_facing_slash_Other_10_gml_575_0);
+ MSG(8, obj_npc_facing_slash_Other_10_gml_576_0);
+ goto L10064; /* gml: if !(talked >= 1) goto L10064 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_579_0);
+L10064:;
+ if (!(sv.flag[294] >= 2)) goto L10204;
+ c->fe = 9;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_584_0);
+ FACE(1, 'R', 9);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_586_0);
+L10204:;
+ if (!(g_room == room_cc_throneroom)) goto L11440;
+ if (!(sv.plot < 243)) goto L11240;
+ c->fc = 5;
+ c->fe = 3;
+ /* gml: global.typer = 32 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_600_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_601_0);
+ FACE(2, 'S', 2);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_603_0);
+ FACE(4, 'L', 1);
+ MSG(5, obj_npc_facing_slash_Other_10_gml_605_0);
+ MSG(6, obj_npc_facing_slash_Other_10_gml_606_0);
+ FACE(7, 'S', 9);
+ MSG(8, obj_npc_facing_slash_Other_10_gml_608_0);
+ MSG(9, obj_npc_facing_slash_Other_10_gml_609_0);
+ FACE(10, 'L', 2);
+ MSG(11, obj_npc_facing_slash_Other_10_gml_611_0);
+ MSG(12, obj_npc_facing_slash_Other_10_gml_612_0);
+ MSG(13, obj_npc_facing_slash_Other_10_gml_613_0);
+ FACE(14, 'S', 2);
+ MSG(15, obj_npc_facing_slash_Other_10_gml_615_0);
+ MSG(16, obj_npc_facing_slash_Other_10_gml_616_0);
+ MSG(17, obj_npc_facing_slash_Other_10_gml_617_0);
+ FACE(18, 'L', 3);
+ MSG(19, obj_npc_facing_slash_Other_10_gml_619_0);
+ MSG(20, obj_npc_facing_slash_Other_10_gml_620_0);
+ MSG(21, obj_npc_facing_slash_Other_10_gml_621_0);
+ FACE(22, 'S', 3);
+ MSG(23, obj_npc_facing_slash_Other_10_gml_623_0);
+ MSG(24, obj_npc_facing_slash_Other_10_gml_624_0);
+ FACE(25, 'L', 3);
+ MSG(26, obj_npc_facing_slash_Other_10_gml_626_0);
+ MSG(27, obj_npc_facing_slash_Other_10_gml_627_0);
+ sv.plot = 243;
+ goto L11440;
+L11240:;
+ c->fc = 5;
+ c->fe = 3;
+ /* gml: global.typer = 32 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_636_0);
+ FACE(1, 'S', 3);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_638_0);
+ FACE(3, 'L', 3);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_640_0);
+L11440:;
+ if (!(g_room == room_cc_kingbattle)) goto L12164;
+ /* gml: global.typer = 31 */
+ c->fc = 2;
+ c->fe = 11;
+ if (!(sv.plot == 242)) goto L11628;
+ c->fe = 1;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_656_0);
+ FACE(1, 'S', 2);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_658_0);
+L11628:;
+ if (!(sv.plot >= 243)) goto L11796;
+ c->fe = 1;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_665_0);
+ FACE(1, 'S', 2);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_667_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_668_0);
+L11796:;
+ if (!(sv.plot < 242)) goto L12164;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_674_0);
+ FACE(1, 'S', 0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_676_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_677_0);
+ FACE(4, 'R', 8);
+ MSG(5, obj_npc_facing_slash_Other_10_gml_679_0);
+ MSG(6, obj_npc_facing_slash_Other_10_gml_680_0);
+ MSG(7, obj_npc_facing_slash_Other_10_gml_681_0);
+ FACE(8, 'S', 2);
+ MSG(9, obj_npc_facing_slash_Other_10_gml_683_0);
+ sv.plot = 242;
+L12164:;
+ if (!(g_room == room_library)) goto L13388;
+ if (!(g_room == room_library)) goto L13388;
+ goto L13004; /* gml: if !(x < 140) goto L13004 */
+ c->fc = 12;
+ /* gml: global.typer = 13 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_700_0);
+ if (!(sv.flag[256] == 1)) goto L12348;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_702_0);
+L12348:;
+ MSG(1, obj_npc_facing_slash_Other_10_gml_703_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_704_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_705_0);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_706_0);
+ MSG(5, obj_npc_facing_slash_Other_10_gml_707_0);
+ goto L12692; /* gml: if !(talked >= 1) goto L12692 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_711_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_712_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_713_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_714_0);
+L12692:;
+ if (!((sv.flag[255] >= 1) && (sv.flag[256] == 0))) goto L13004;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_719_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_720_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_721_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_722_0);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_723_0);
+ MSG(5, obj_npc_facing_slash_Other_10_gml_724_0);
+ sv.flag[256] = 1;
+ /* gml: talked = -1 */
+L13004:;
+ goto L13296; /* gml: if !((x > 150) && (x < 220)) goto L13296 */
+ c->fc = 14;
+ c->fe = 0;
+ MSG(0, obj_npc_facing_slash_Other_10_gml_739_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_740_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_741_0);
+ NOFACE(3);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_743_0);
+ goto L13296; /* gml: if !(talked >= 1) goto L13296 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_747_0);
+L13296:;
+ goto L13388; /* gml: if !(x > 220) goto L13388 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_753_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_754_0);
+L13388:;
+ if (!(g_room == room_flowershop_1f)) goto L13716;
+ c->fc = 10;
+ c->fe = 1;
+ /* gml: global.typer = 18 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_767_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_768_0);
+ MSG(2, obj_npc_facing_slash_Other_10_gml_769_0);
+ MSG(3, obj_npc_facing_slash_Other_10_gml_770_0);
+ MSG(4, obj_npc_facing_slash_Other_10_gml_771_0);
+ goto L13716; /* gml: if !(talked >= 1) goto L13716 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_775_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_776_0);
+L13716:;
+ if (!(g_room == room_flowershop_2f)) goto L13844;
+ c->fc = 10;
+ c->fe = 2;
+ /* gml: global.typer = 18 */
+ MSG(0, obj_npc_facing_slash_Other_10_gml_785_0);
+ MSG(1, obj_npc_facing_slash_Other_10_gml_786_0);
+L13844:;
+ if (!(g_room == room_alphysalley)) goto L13932;
+ c->fc = 11;
+ c->fe = 0;
+ /* gml: global.typer = 20 */
+ c->msc = 285;
+ /* gml: scr_text(global.msc) */
+L13932:;
+ if (!(g_room == room_town_south)) goto L13996;
+ /* gml: global.typer = 17 */
+ c->msc = 335;
+ /* gml: scr_text(global.msc) */
+L13996:;
+ if (!(g_room == room_town_mid)) goto L14172;
+ /* gml: image_speed = 0 */
+ /* gml: image_index = 0 */
+ /* gml: global.typer = 14 */
+ c->fc = 6;
+ c->fe = 0;
+ c->msc = 370;
+ if (!(sv.flag[273] >= 1)) goto L14128;
+ c->msc = 371;
+L14128:;
+ /* gml: scr_text(global.msc) */
+ /* gml: with (obj_town_event) { // to L14168 */
+ /* gml: con = 70 */
+ /* gml: } // end with */
+L14172:;
+ if (!(g_room == room_town_north)) goto L14280;
+ goto L14280; /* gml: if !(dtsprite == 124) goto L14280 */
+ c->msc = 385;
+ /* gml: global.typer = 12 */
+ c->fc = 3;
+ c->fe = 0;
+ /* gml: scr_text(global.msc) */
+L14280:;
+ /* gml: remanimspeed = image_speed */
+ /* gml: myinteract = 3 */
+ /* gml: mydialoguer = instance_create(0, 0, 5) */
+ /* gml: talked = (talked + 1) */
+}
+
+void gm_scr_text(TxtCtx *c) {
+ int afford = 0, tempvar = 0;
+ /* gml: if (argument0 == 0) goto L2320 */
+ /* gml: if (argument0 == 10) goto L2324 */
+ /* gml: if (argument0 == 11) goto L2556 */
+ /* gml: if (argument0 == 100) goto L2916 */
+ /* gml: if (argument0 == 101) goto L3160 */
+ /* gml: if (argument0 == 102) goto L3336 */
+ /* gml: if (argument0 == 103) goto L3400 */
+ /* gml: if (argument0 == 104) goto L3576 */
+ /* gml: if (argument0 == 105) goto L3748 */
+ /* gml: if (argument0 == 110) goto L3776 */
+ /* gml: if (argument0 == 111) goto L4076 */
+ /* gml: if (argument0 == 120) goto L4260 */
+ /* gml: if (argument0 == 121) goto L4660 */
+ /* gml: if (argument0 == 122) goto L5048 */
+ /* gml: if (argument0 == 125) goto L5864 */
+ /* gml: if (argument0 == 126) goto L6192 */
+ /* gml: if (argument0 == 130) goto L6500 */
+ /* gml: if (argument0 == 131) goto L6760 */
+ /* gml: if (argument0 == 132) goto L7068 */
+ /* gml: if (argument0 == 133) goto L7368 */
+ /* gml: if (argument0 == 135) goto L7636 */
+ /* gml: if (argument0 == 136) goto L7928 */
+ /* gml: if (argument0 == 140) goto L8296 */
+ /* gml: if (argument0 == 141) goto L9020 */
+ /* gml: if (argument0 == 145) goto L9260 */
+ /* gml: if (argument0 == 146) goto L9720 */
+ /* gml: if (argument0 == 147) goto L9936 */
+ /* gml: if (argument0 == 148) goto L10396 */
+ /* gml: if (argument0 == 149) goto L10612 */
+ /* gml: if (argument0 == 150) goto L10912 */
+ /* gml: if (argument0 == 175) goto L11112 */
+ /* gml: if (argument0 == 176) goto L11416 */
+ /* gml: if (argument0 == 180) goto L13864 */
+ /* gml: if (argument0 == 181) goto L14156 */
+ /* gml: if (argument0 == 182) goto L14960 */
+ /* gml: if (argument0 == 185) goto L16136 */
+ /* gml: if (argument0 == 186) goto L16356 */
+ /* gml: if (argument0 == 190) goto L16776 */
+ /* gml: if (argument0 == 191) goto L17068 */
+ /* gml: if (argument0 == 192) goto L17184 */
+ /* gml: if (argument0 == 193) goto L17504 */
+ /* gml: if (argument0 == 195) goto L17676 */
+ /* gml: if (argument0 == 196) goto L18076 */
+ /* gml: if (argument0 == 197) goto L18472 */
+ /* gml: if (argument0 == 198) goto L19076 */
+ /* gml: if (argument0 == 210) goto L19968 */
+ /* gml: if (argument0 == 211) goto L20372 */
+ /* gml: if (argument0 == 215) goto L21272 */
+ /* gml: if (argument0 == 216) goto L21792 */
+ /* gml: if (argument0 == 220) goto L22776 */
+ /* gml: if (argument0 == 221) goto L23032 */
+ /* gml: if (argument0 == 225) goto L24016 */
+ /* gml: if (argument0 == 226) goto L24284 */
+ /* gml: if (argument0 == 227) goto L24960 */
+ /* gml: if (argument0 == 228) goto L25636 */
+ /* gml: if (argument0 == 230) goto L26384 */
+ /* gml: if (argument0 == 231) goto L26604 */
+ /* gml: if (argument0 == 235) goto L27444 */
+ /* gml: if (argument0 == 236) goto L27664 */
+ /* gml: if (argument0 == 240) goto L28288 */
+ /* gml: if (argument0 == 241) goto L28508 */
+ /* gml: if (argument0 == 245) goto L29828 */
+ /* gml: if (argument0 == 246) goto L30048 */
+ /* gml: if (argument0 == 250) goto L30856 */
+ /* gml: if (argument0 == 251) goto L31152 */
+ /* gml: if (argument0 == 255) goto L31508 */
+ /* gml: if (argument0 == 256) goto L32328 */
+ /* gml: if (argument0 == 270) goto L33616 */
+ /* gml: if (argument0 == 285) goto L34192 */
+ /* gml: if (argument0 == 286) goto L34448 */
+ /* gml: if (argument0 == 290) goto L36044 */
+ /* gml: if (argument0 == 291) goto L36240 */
+ /* gml: if (argument0 == 295) goto L36424 */
+ /* gml: if (argument0 == 296) goto L36744 */
+ /* gml: if (argument0 == 300) goto L36968 */
+ /* gml: if (argument0 == 301) goto L37288 */
+ /* gml: if (argument0 == 305) goto L37528 */
+ /* gml: if (argument0 == 306) goto L37856 */
+ /* gml: if (argument0 == 310) goto L37968 */
+ /* gml: if (argument0 == 311) goto L38248 */
+ /* gml: if (argument0 == 315) goto L38324 */
+ /* gml: if (argument0 == 316) goto L38568 */
+ /* gml: if (argument0 == 325) goto L39508 */
+ /* gml: if (argument0 == 326) goto L39860 */
+ /* gml: if (argument0 == 327) goto L40124 */
+ /* gml: if (argument0 == 328) goto L40344 */
+ /* gml: if (argument0 == 330) goto L40608 */
+ /* gml: if (argument0 == 331) goto L41028 */
+ /* gml: if (argument0 == 335) goto L42304 */
+ /* gml: if (argument0 == 336) goto L42896 */
+ /* gml: if (argument0 == 340) goto L43556 */
+ /* gml: if (argument0 == 341) goto L43956 */
+ /* gml: if (argument0 == 345) goto L45084 */
+ /* gml: if (argument0 == 346) goto L45352 */
+ /* gml: if (argument0 == 350) goto L45632 */
+ /* gml: if (argument0 == 351) goto L45828 */
+ /* gml: if (argument0 == 355) goto L45928 */
+ /* gml: if (argument0 == 356) goto L46204 */
+ /* gml: if (argument0 == 360) goto L46316 */
+ /* gml: if (argument0 == 361) goto L46584 */
+ /* gml: if (argument0 == 365) goto L46728 */
+ /* gml: if (argument0 == 370) goto L47428 */
+ /* gml: if (argument0 == 371) goto L47660 */
+ /* gml: if (argument0 == 372) goto L48320 */
+ /* gml: if (argument0 == 373) goto L48888 */
+ /* gml: if (argument0 == 375) goto L50124 */
+ /* gml: if (argument0 == 376) goto L50548 */
+ /* gml: if (argument0 == 380) goto L51112 */
+ /* gml: if (argument0 == 381) goto L51452 */
+ /* gml: if (argument0 == 385) goto L52436 */
+ /* gml: if (argument0 == 386) goto L53200 */
+ /* gml: if (argument0 == 387) goto L54404 */
+ /* gml: if (argument0 == 400) goto L55856 */
+ /* gml: if (argument0 == 401) goto L56088 */
+ /* gml: if (argument0 == 402) goto L56228 */
+ /* gml: if (argument0 == 403) goto L56496 */
+ /* gml: if (argument0 == 405) goto L56756 */
+ /* gml: if (argument0 == 406) goto L57836 */
+ /* gml: if (argument0 == 410) goto L58240 */
+ /* gml: if (argument0 == 411) goto L58532 */
+ /* gml: if (argument0 == 415) goto L58844 */
+ /* gml: if (argument0 == 420) goto L58884 */
+ /* gml: if (argument0 == 425) goto L59080 */
+ /* gml: if (argument0 == 426) goto L59312 */
+ /* gml: if (argument0 == 430) goto L60168 */
+ /* gml: if (argument0 == 431) goto L60364 */
+ /* gml: if (argument0 == 435) goto L60520 */
+ /* gml: if (argument0 == 436) goto L60728 */
+ /* gml: if (argument0 == 440) goto L61232 */
+ /* gml: if (argument0 == 441) goto L61428 */
+ /* gml: if (argument0 == 445) goto L61592 */
+ /* gml: if (argument0 == 446) goto L62040 */
+ /* gml: if (argument0 == 450) goto L62212 */
+ /* gml: if (argument0 == 451) goto L62644 */
+ /* gml: if (argument0 == 455) goto L62756 */
+ /* gml: if (argument0 == 456) goto L63036 */
+ /* gml: if (argument0 == 460) goto L64264 */
+ /* gml: if (argument0 == 461) goto L64680 */
+ /* gml: if (argument0 == 465) goto L65020 */
+ /* gml: if (argument0 == 466) goto L65252 */
+ /* gml: if (argument0 == 470) goto L65592 */
+ /* gml: if (argument0 == 471) goto L65852 */
+ /* gml: if (argument0 == 600) goto L66100 */
+ /* gml: if (argument0 == 601) goto L66332 */
+ goto L66492;
+ goto L66496;
+L2320:;
+ goto L66496;
+L2324:;
+ CHOICE(1, scr_text_slash_scr_text_gml_7_0);
+ CHOICE(0, scr_text_slash_scr_text_gml_8_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_11_0);
+ MSG(1, scr_text_slash_scr_text_gml_12_0);
+ MSG(2, scr_text_slash_scr_text_gml_13_0);
+ goto L66496;
+L2556:;
+ goto L2616; /* gml: if !(global.choice == 0) goto L2616 */
+ MSG(0, scr_text_slash_scr_text_gml_19_0);
+ goto L2912;
+L2616:;
+ MSG(0, scr_text_slash_scr_text_gml_23_0);
+ MSG(1, scr_text_slash_scr_text_gml_24_0);
+ MSG(2, scr_text_slash_scr_text_gml_25_0);
+ /* gml: script_execute(10, global.menucoord[1], 0) */
+ /* gml: i = 0 */
+L2780:;
+ goto L2912; /* gml: if !(i < 12) goto L2912 */
+ /* gml: global.item[i] = 0 */
+ /* gml: global.weapon[i] = 0 */
+ /* gml: global.armor[i] = 0 */
+ /* gml: i = (i + 1) */
+ goto L2780;
+L2912:;
+ goto L66496;
+L2916:;
+ MSG(0, scr_text_slash_scr_text_gml_38_0);
+ MSG(1, scr_text_slash_scr_text_gml_39_0);
+ MSG(2, scr_text_slash_scr_text_gml_40_0);
+ MSG(3, scr_text_slash_scr_text_gml_41_0);
+ MSG(4, scr_text_slash_scr_text_gml_42_0);
+ MSG(5, scr_text_slash_scr_text_gml_43_0);
+ txt_msg(c, 6, " ");
+ goto L66496;
+L3160:;
+ goto L3276; /* gml: if !(global.choice == 1) goto L3276 */
+ MSG(0, scr_text_slash_scr_text_gml_50_0);
+ MSG(1, scr_text_slash_scr_text_gml_51_0);
+ /* gml: with (obj_classscene) { // to L3272 */
+ /* gml: con = 20 */
+ /* gml: } // end with */
+L3276:;
+ goto L3332; /* gml: if !(global.choice == 0) goto L3332 */
+ MSG(0, scr_text_slash_scr_text_gml_56_0);
+L3332:;
+ goto L66496;
+L3336:;
+ MSG(0, scr_text_slash_scr_text_gml_61_0);
+ txt_msg(c, 1, " ");
+ goto L66496;
+L3400:;
+ goto L3516; /* gml: if !(global.choice == 1) goto L3516 */
+ MSG(0, scr_text_slash_scr_text_gml_68_0);
+ MSG(1, scr_text_slash_scr_text_gml_69_0);
+ /* gml: with (obj_classscene) { // to L3512 */
+ /* gml: con = 20 */
+ /* gml: } // end with */
+L3516:;
+ goto L3572; /* gml: if !(global.choice == 0) goto L3572 */
+ MSG(0, scr_text_slash_scr_text_gml_74_0);
+L3572:;
+ goto L66496;
+L3576:;
+ MSG(0, scr_text_slash_scr_text_gml_79_0);
+ MSG(1, scr_text_slash_scr_text_gml_80_0);
+ MSG(2, scr_text_slash_scr_text_gml_81_0);
+ MSG(3, scr_text_slash_scr_text_gml_82_0);
+ txt_msg(c, 4, " ");
+ goto L66496;
+L3748:;
+ txt_msg(c, 0, " %%");
+ goto L66496;
+L3776:;
+ CHOICE(0, scr_text_slash_scr_text_gml_91_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_92_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ if (!(sv.flag[100] == 0)) goto L4036;
+ MSG(0, scr_text_slash_scr_text_gml_97_0);
+ MSG(1, scr_text_slash_scr_text_gml_98_0);
+ MSG(2, scr_text_slash_scr_text_gml_99_0);
+ goto L4072;
+L4036:;
+ MSG(0, scr_text_slash_scr_text_gml_103_0);
+L4072:;
+ goto L66496;
+L4076:;
+ goto L4220; /* gml: if !(global.choice == 0) goto L4220 */
+ MSG(0, scr_text_slash_scr_text_gml_111_0);
+ sv.flag[100] = 1;
+ gm_itemget(3);
+ /* gml: with (obj_readable_room1) { // to L4212 */
+ /* gml: with ((shine)) { // to L4208 */
+ /* gml: instance_destroy() */
+ /* gml: } // end with */
+ /* gml: } // end with */
+ goto L4256;
+L4220:;
+ MSG(0, scr_text_slash_scr_text_gml_118_0);
+L4256:;
+ goto L66496;
+L4260:;
+ CHOICE(0, scr_text_slash_scr_text_gml_124_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_125_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_128_0);
+ MSG(1, scr_text_slash_scr_text_gml_129_0);
+ MSG(2, scr_text_slash_scr_text_gml_130_0);
+ MSG(3, scr_text_slash_scr_text_gml_131_0);
+ MSG(4, scr_text_slash_scr_text_gml_132_0);
+ MSG(5, scr_text_slash_scr_text_gml_133_0);
+ MSG(6, scr_text_slash_scr_text_gml_134_0);
+ txt_msg(c, 7, " ");
+ goto L66496;
+L4660:;
+ CHOICE(0, scr_text_slash_scr_text_gml_139_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_140_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ goto L4840; /* gml: if !(global.choice == 0) goto L4840 */
+ MSG(0, scr_text_slash_scr_text_gml_145_0);
+ goto L5044;
+L4840:;
+ MSG(0, scr_text_slash_scr_text_gml_149_0);
+ MSG(1, scr_text_slash_scr_text_gml_150_0);
+ MSG(2, scr_text_slash_scr_text_gml_151_0);
+ MSG(3, scr_text_slash_scr_text_gml_152_0);
+ MSG(4, scr_text_slash_scr_text_gml_153_0);
+ txt_msg(c, 5, " ");
+L5044:;
+ goto L66496;
+L5048:;
+ goto L5108; /* gml: if !(global.choice == 0) goto L5108 */
+ MSG(0, scr_text_slash_scr_text_gml_162_0);
+ goto L5860;
+L5108:;
+ sv.flag[203] = 1;
+ /* gml: with (obj_darkcastle_event) { // to L5148 */
+ /* gml: con = 30 */
+ /* gml: } // end with */
+ MSG(0, scr_text_slash_scr_text_gml_168_0);
+ MSG(1, scr_text_slash_scr_text_gml_169_0);
+ FACE(2, 'S', 0);
+ MSG(3, scr_text_slash_scr_text_gml_171_0);
+ MSG(4, scr_text_slash_scr_text_gml_172_0);
+ FACE(5, 'R', 0);
+ MSG(6, scr_text_slash_scr_text_gml_174_0);
+ FACE(7, 'S', 0);
+ MSG(8, scr_text_slash_scr_text_gml_176_0);
+ MSG(9, scr_text_slash_scr_text_gml_177_0);
+ FACE(10, 'R', 0);
+ MSG(11, scr_text_slash_scr_text_gml_179_0);
+ MSG(12, scr_text_slash_scr_text_gml_180_0);
+ FACE(13, 'S', 1);
+ MSG(14, scr_text_slash_scr_text_gml_182_0);
+ MSG(15, scr_text_slash_scr_text_gml_183_0);
+ MSG(16, scr_text_slash_scr_text_gml_184_0);
+ MSG(17, scr_text_slash_scr_text_gml_185_0);
+ MSG(18, scr_text_slash_scr_text_gml_186_0);
+ FACE(19, 'R', 1);
+ MSG(20, scr_text_slash_scr_text_gml_188_0);
+L5860:;
+ goto L66496;
+L5864:;
+ CHOICE(0, scr_text_slash_scr_text_gml_193_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_194_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_197_0);
+ MSG(1, scr_text_slash_scr_text_gml_198_0);
+ MSG(2, scr_text_slash_scr_text_gml_199_0);
+ MSG(3, scr_text_slash_scr_text_gml_200_0);
+ MSG(4, scr_text_slash_scr_text_gml_201_0);
+ txt_msg(c, 5, " ");
+ goto L66496;
+L6192:;
+ goto L6428; /* gml: if !(global.choice == 0) goto L6428 */
+ c->fe = 7;
+ sv.flag[204] = 1;
+ MSG(0, scr_text_slash_scr_text_gml_210_0);
+ MSG(1, scr_text_slash_scr_text_gml_211_0);
+ MSG(2, scr_text_slash_scr_text_gml_212_0);
+ MSG(3, scr_text_slash_scr_text_gml_213_0);
+ MSG(4, scr_text_slash_scr_text_gml_214_0);
+ goto L6496;
+L6428:;
+ sv.flag[204] = 2;
+ c->fe = 8;
+ MSG(0, scr_text_slash_scr_text_gml_221_0);
+L6496:;
+ goto L66496;
+L6500:;
+ CHOICE(0, scr_text_slash_scr_text_gml_226_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_227_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ /* gml: input_name = scr_get_input_name(5) */
+ MSG(0, scr_text_slash_scr_text_gml_231_0); /* gml: global.msg[0] = scr_84_get_subst_string(scr_84_get_lang_string("scr_text_slash_scr_text_gml_231_0"), input_name) */
+ MSG(1, scr_text_slash_scr_text_gml_232_0);
+ txt_msg(c, 2, " ");
+ goto L66496;
+L6760:;
+ goto L6904; /* gml: if !(global.choice == 0) goto L6904 */
+ c->fe = 3;
+ MSG(0, scr_text_slash_scr_text_gml_241_0);
+ MSG(1, scr_text_slash_scr_text_gml_242_0);
+ MSG(2, scr_text_slash_scr_text_gml_243_0);
+ goto L7064;
+L6904:;
+ c->fe = 0;
+ /* gml: input_name = scr_get_input_name(5) */
+ MSG(0, scr_text_slash_scr_text_gml_249_0); /* gml: global.msg[0] = scr_84_get_subst_string(scr_84_get_lang_string("scr_text_slash_scr_text_gml_249_0"), input_name) */
+ MSG(1, scr_text_slash_scr_text_gml_250_0);
+ MSG(2, scr_text_slash_scr_text_gml_251_0);
+L7064:;
+ goto L66496;
+L7068:;
+ CHOICE(0, scr_text_slash_scr_text_gml_257_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_258_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_261_0);
+ /* gml: global.msg[1] = ((scr_84_get_lang_string("scr_text_slash_scr_text_gml_262_0") + scr_get_input_name(5)) + scr_84_get_lang_string("scr_text_slash_scr_text_gml_262_1")) */
+ MSG(2, scr_text_slash_scr_text_gml_263_0);
+ txt_msg(c, 3, " ");
+ goto L66496;
+L7368:;
+ goto L7512; /* gml: if !(global.choice == 0) goto L7512 */
+ c->fe = 3;
+ MSG(0, scr_text_slash_scr_text_gml_272_0);
+ MSG(1, scr_text_slash_scr_text_gml_273_0);
+ MSG(2, scr_text_slash_scr_text_gml_274_0);
+ goto L7632;
+L7512:;
+ c->fe = 0;
+ MSG(0, scr_text_slash_scr_text_gml_279_0);
+ MSG(1, scr_text_slash_scr_text_gml_280_0);
+ MSG(2, scr_text_slash_scr_text_gml_281_0);
+L7632:;
+ goto L66496;
+L7636:;
+ CHOICE(0, scr_text_slash_scr_text_gml_288_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_289_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_292_0);
+ MSG(1, scr_text_slash_scr_text_gml_293_0);
+ MSG(2, scr_text_slash_scr_text_gml_294_0);
+ MSG(3, scr_text_slash_scr_text_gml_295_0);
+ txt_msg(c, 4, " ");
+ goto L66496;
+L7928:;
+ goto L8012; /* gml: if !(global.choice == 0) goto L8012 */
+ MSG(0, scr_text_slash_scr_text_gml_302_0);
+ /* gml: with (obj_tutorialbattleevent) { // to L8004 */
+ /* gml: con = 20 */
+ /* gml: } // end with */
+ goto L8292;
+L8012:;
+ MSG(0, scr_text_slash_scr_text_gml_307_0);
+ MSG(1, scr_text_slash_scr_text_gml_308_0);
+ MSG(2, scr_text_slash_scr_text_gml_309_0);
+ MSG(3, scr_text_slash_scr_text_gml_310_0);
+ /* gml: global.msg[4] = ((scr_84_get_lang_string("scr_text_slash_scr_text_gml_311_0") + scr_get_input_name(6)) + scr_84_get_lang_string("scr_text_slash_scr_text_gml_311_1")) */
+ NOFACE(5);
+ MSG(6, scr_text_slash_scr_text_gml_313_0);
+L8292:;
+ goto L66496;
+L8296:;
+ CHOICE(0, scr_text_slash_scr_text_gml_318_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_319_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_322_0);
+ MSG(1, scr_text_slash_scr_text_gml_323_0);
+ MSG(2, scr_text_slash_scr_text_gml_324_0);
+ MSG(3, scr_text_slash_scr_text_gml_325_0);
+ MSG(4, scr_text_slash_scr_text_gml_326_0);
+ MSG(5, scr_text_slash_scr_text_gml_327_0);
+ MSG(6, scr_text_slash_scr_text_gml_328_0);
+ MSG(7, scr_text_slash_scr_text_gml_329_0);
+ MSG(8, scr_text_slash_scr_text_gml_330_0);
+ MSG(9, scr_text_slash_scr_text_gml_331_0);
+ MSG(10, scr_text_slash_scr_text_gml_332_0);
+ MSG(11, scr_text_slash_scr_text_gml_333_0);
+ MSG(12, scr_text_slash_scr_text_gml_334_0);
+ MSG(13, scr_text_slash_scr_text_gml_335_0);
+ MSG(14, scr_text_slash_scr_text_gml_336_0);
+ MSG(15, scr_text_slash_scr_text_gml_337_0);
+ txt_msg(c, 16, " ");
+ goto L66496;
+L9020:;
+ MSG(0, scr_text_slash_scr_text_gml_342_0);
+ MSG(1, scr_text_slash_scr_text_gml_343_0);
+ goto L9256; /* gml: if !(global.choice == 1) goto L9256 */
+ MSG(0, scr_text_slash_scr_text_gml_347_0);
+ MSG(1, scr_text_slash_scr_text_gml_348_0);
+ MSG(2, scr_text_slash_scr_text_gml_349_0);
+ MSG(3, scr_text_slash_scr_text_gml_350_0);
+L9256:;
+ goto L66496;
+L9260:;
+ CHOICE(0, scr_text_slash_scr_text_gml_357_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_358_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ if (!(sv.flag[101] == 0)) goto L9516;
+ MSG(0, scr_text_slash_scr_text_gml_363_0);
+ MSG(1, scr_text_slash_scr_text_gml_364_0);
+ MSG(2, scr_text_slash_scr_text_gml_365_0);
+L9516:;
+ if (!(sv.flag[101] == 1)) goto L9652;
+ MSG(0, scr_text_slash_scr_text_gml_369_0);
+ MSG(1, scr_text_slash_scr_text_gml_370_0);
+ MSG(2, scr_text_slash_scr_text_gml_371_0);
+L9652:;
+ if (!(sv.flag[101] >= 2)) goto L9716;
+ MSG(0, scr_text_slash_scr_text_gml_376_0);
+L9716:;
+ goto L66496;
+L9720:;
+ goto L9896; /* gml: if !(global.choice == 0) goto L9896 */
+ gm_itemget(1);
+ goto L9856; /* gml: if !(noroom == 0) goto L9856 */
+ MSG(0, scr_text_slash_scr_text_gml_387_0);
+ sv.flag[101] = (sv.flag[101] + 1);
+ goto L9892;
+L9856:;
+ MSG(0, scr_text_slash_scr_text_gml_392_0);
+L9892:;
+ goto L9932;
+L9896:;
+ MSG(0, scr_text_slash_scr_text_gml_398_0);
+L9932:;
+ goto L66496;
+L9936:;
+ CHOICE(0, scr_text_slash_scr_text_gml_403_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_404_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ if (!(sv.flag[102] == 0)) goto L10192;
+ MSG(0, scr_text_slash_scr_text_gml_409_0);
+ MSG(1, scr_text_slash_scr_text_gml_410_0);
+ MSG(2, scr_text_slash_scr_text_gml_411_0);
+L10192:;
+ if (!(sv.flag[102] == 1)) goto L10328;
+ MSG(0, scr_text_slash_scr_text_gml_415_0);
+ MSG(1, scr_text_slash_scr_text_gml_416_0);
+ MSG(2, scr_text_slash_scr_text_gml_417_0);
+L10328:;
+ if (!(sv.flag[102] >= 2)) goto L10392;
+ MSG(0, scr_text_slash_scr_text_gml_422_0);
+L10392:;
+ goto L66496;
+L10396:;
+ goto L10572; /* gml: if !(global.choice == 0) goto L10572 */
+ gm_itemget(1);
+ goto L10532; /* gml: if !(noroom == 0) goto L10532 */
+ MSG(0, scr_text_slash_scr_text_gml_433_0);
+ sv.flag[102] = (sv.flag[102] + 1);
+ goto L10568;
+L10532:;
+ MSG(0, scr_text_slash_scr_text_gml_438_0);
+L10568:;
+ goto L10608;
+L10572:;
+ MSG(0, scr_text_slash_scr_text_gml_444_0);
+L10608:;
+ goto L66496;
+L10612:;
+ CHOICE(0, scr_text_slash_scr_text_gml_449_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_450_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ if (!(sv.flag[103] == 0)) goto L10872;
+ MSG(0, scr_text_slash_scr_text_gml_455_0);
+ MSG(1, scr_text_slash_scr_text_gml_456_0);
+ MSG(2, scr_text_slash_scr_text_gml_457_0);
+ goto L10908;
+L10872:;
+ MSG(0, scr_text_slash_scr_text_gml_461_0);
+L10908:;
+ goto L66496;
+L10912:;
+ goto L11072; /* gml: if !(global.choice == 0) goto L11072 */
+ gm_keyitemget(3);
+ goto L11032; /* gml: if !(noroom == 0) goto L11032 */
+ MSG(0, scr_text_slash_scr_text_gml_472_0);
+ sv.flag[103] = 1;
+ goto L11068;
+L11032:;
+ MSG(0, scr_text_slash_scr_text_gml_477_0);
+L11068:;
+ goto L11108;
+L11072:;
+ MSG(0, scr_text_slash_scr_text_gml_483_0);
+L11108:;
+ goto L66496;
+L11112:;
+ CHOICE(0, scr_text_slash_scr_text_gml_491_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_492_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_493_0);
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_495_0);
+ MSG(1, scr_text_slash_scr_text_gml_496_0);
+ MSG(2, scr_text_slash_scr_text_gml_497_0);
+ MSG(3, scr_text_slash_scr_text_gml_498_0);
+ txt_msg(c, 4, " ");
+ goto L66496;
+L11416:;
+ goto L12332; /* gml: if !(global.choice == 0) goto L12332 */
+ c->fc = 0;
+ /* gml: global.typer = 6 */
+ MSG(0, scr_text_slash_scr_text_gml_507_0);
+ MSG(1, scr_text_slash_scr_text_gml_508_0);
+ FACE(2, 'L', 2);
+ MSG(3, scr_text_slash_scr_text_gml_510_0);
+ MSG(4, scr_text_slash_scr_text_gml_511_0);
+ MSG(5, scr_text_slash_scr_text_gml_512_0);
+ FACE(6, 'S', 2);
+ /* gml: global.msg[7] = (scr_84_get_lang_string("scr_text_slash_scr_text_gml_514_0") + "/") */
+ FACE(8, 'L', 7);
+ MSG(9, scr_text_slash_scr_text_gml_516_0);
+ MSG(10, scr_text_slash_scr_text_gml_517_0);
+ FACE(11, 'R', 1);
+ MSG(12, scr_text_slash_scr_text_gml_519_0);
+ FACE(13, 'S', 2);
+ MSG(14, scr_text_slash_scr_text_gml_521_0);
+ FACE(15, 'L', 2);
+ MSG(16, scr_text_slash_scr_text_gml_523_0);
+ MSG(17, scr_text_slash_scr_text_gml_524_0);
+ MSG(18, scr_text_slash_scr_text_gml_525_0);
+ MSG(19, scr_text_slash_scr_text_gml_526_0);
+ FACE(20, 'R', 10);
+ MSG(21, scr_text_slash_scr_text_gml_528_0);
+ FACE(22, 'L', 2);
+ MSG(23, scr_text_slash_scr_text_gml_530_0);
+ MSG(24, scr_text_slash_scr_text_gml_531_0);
+ sv.flag[214] = 1;
+L12332:;
+ goto L12944; /* gml: if !(global.choice == 1) goto L12944 */
+ c->fc = 0;
+ /* gml: global.typer = 6 */
+ MSG(0, scr_text_slash_scr_text_gml_539_0);
+ MSG(1, scr_text_slash_scr_text_gml_540_0);
+ MSG(2, scr_text_slash_scr_text_gml_541_0);
+ FACE(3, 'L', 3);
+ MSG(4, scr_text_slash_scr_text_gml_543_0);
+ FACE(5, 'R', 10);
+ MSG(6, scr_text_slash_scr_text_gml_545_0);
+ FACE(7, 'S', 1);
+ MSG(8, scr_text_slash_scr_text_gml_547_0);
+ FACE(9, 'L', 3);
+ MSG(10, scr_text_slash_scr_text_gml_549_0);
+ MSG(11, scr_text_slash_scr_text_gml_550_0);
+ MSG(12, scr_text_slash_scr_text_gml_551_0);
+ MSG(13, scr_text_slash_scr_text_gml_552_0);
+ MSG(14, scr_text_slash_scr_text_gml_553_0);
+ MSG(15, scr_text_slash_scr_text_gml_554_0);
+ sv.flag[214] = 2;
+L12944:;
+ goto L13860; /* gml: if !(global.choice == 2) goto L13860 */
+ c->fc = 0;
+ /* gml: global.typer = 6 */
+ MSG(0, scr_text_slash_scr_text_gml_562_0);
+ MSG(1, scr_text_slash_scr_text_gml_563_0);
+ FACE(2, 'L', 7);
+ MSG(3, scr_text_slash_scr_text_gml_565_0);
+ FACE(4, 'R', 8);
+ MSG(5, scr_text_slash_scr_text_gml_567_0);
+ MSG(6, scr_text_slash_scr_text_gml_568_0);
+ MSG(7, scr_text_slash_scr_text_gml_569_0);
+ FACE(8, 'S', 0);
+ MSG(9, scr_text_slash_scr_text_gml_571_0);
+ MSG(10, scr_text_slash_scr_text_gml_572_0);
+ MSG(11, scr_text_slash_scr_text_gml_573_0);
+ MSG(12, scr_text_slash_scr_text_gml_574_0);
+ MSG(13, scr_text_slash_scr_text_gml_575_0);
+ FACE(14, 'R', 1);
+ MSG(15, scr_text_slash_scr_text_gml_577_0);
+ FACE(16, 'S', 2);
+ MSG(17, scr_text_slash_scr_text_gml_579_0);
+ MSG(18, scr_text_slash_scr_text_gml_580_0);
+ MSG(19, scr_text_slash_scr_text_gml_581_0);
+ MSG(20, scr_text_slash_scr_text_gml_582_0);
+ FACE(21, 'L', 1);
+ MSG(22, scr_text_slash_scr_text_gml_584_0);
+ MSG(23, scr_text_slash_scr_text_gml_585_0);
+ MSG(24, scr_text_slash_scr_text_gml_586_0);
+ sv.flag[214] = 3;
+L13860:;
+ goto L66496;
+L13864:;
+ CHOICE(0, scr_text_slash_scr_text_gml_595_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_596_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_599_0);
+ MSG(1, scr_text_slash_scr_text_gml_600_0);
+ MSG(2, scr_text_slash_scr_text_gml_601_0);
+ MSG(3, scr_text_slash_scr_text_gml_602_0);
+ txt_msg(c, 4, " ");
+ goto L66496;
+L14156:;
+ CHOICE(0, scr_text_slash_scr_text_gml_607_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_608_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_609_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_610_0);
+ MSG(0, scr_text_slash_scr_text_gml_611_0);
+ MSG(1, scr_text_slash_scr_text_gml_612_0);
+ MSG(2, scr_text_slash_scr_text_gml_613_0);
+ if (!(sv.flag[255] < 2)) goto L14956;
+ sv.flag[255] = 2;
+ MSG(0, scr_text_slash_scr_text_gml_618_0);
+ MSG(1, scr_text_slash_scr_text_gml_619_0);
+ MSG(2, scr_text_slash_scr_text_gml_620_0);
+ MSG(3, scr_text_slash_scr_text_gml_621_0);
+ MSG(4, scr_text_slash_scr_text_gml_624_0);
+ MSG(5, scr_text_slash_scr_text_gml_625_0);
+ goto L14920; /* gml: if !(global.choice == 1) goto L14920 */
+ c->fe = 1;
+ MSG(0, scr_text_slash_scr_text_gml_629_0);
+ MSG(1, scr_text_slash_scr_text_gml_630_0);
+ MSG(2, scr_text_slash_scr_text_gml_631_0);
+ MSG(3, scr_text_slash_scr_text_gml_632_0);
+ MSG(4, scr_text_slash_scr_text_gml_633_0);
+ MSG(5, scr_text_slash_scr_text_gml_634_0);
+L14920:;
+ MSG(6, scr_text_slash_scr_text_gml_636_0);
+L14956:;
+ goto L66496;
+L14960:;
+ MSG(0, scr_text_slash_scr_text_gml_641_0);
+ goto L15424; /* gml: if !(global.choice == 0) goto L15424 */
+ c->fe = 0;
+ MSG(0, scr_text_slash_scr_text_gml_645_0);
+ MSG(1, scr_text_slash_scr_text_gml_646_0);
+ MSG(2, scr_text_slash_scr_text_gml_647_0);
+ MSG(3, scr_text_slash_scr_text_gml_648_0);
+ MSG(4, scr_text_slash_scr_text_gml_649_0);
+ MSG(5, scr_text_slash_scr_text_gml_650_0);
+ MSG(6, scr_text_slash_scr_text_gml_651_0);
+ MSG(7, scr_text_slash_scr_text_gml_652_0);
+ MSG(8, scr_text_slash_scr_text_gml_653_0);
+ MSG(9, scr_text_slash_scr_text_gml_654_0);
+ MSG(10, scr_text_slash_scr_text_gml_655_0);
+L15424:;
+ goto L15840; /* gml: if !(global.choice == 1) goto L15840 */
+ MSG(0, scr_text_slash_scr_text_gml_659_0);
+ MSG(1, scr_text_slash_scr_text_gml_660_0);
+ MSG(2, scr_text_slash_scr_text_gml_661_0);
+ MSG(3, scr_text_slash_scr_text_gml_662_0);
+ MSG(4, scr_text_slash_scr_text_gml_663_0);
+ MSG(5, scr_text_slash_scr_text_gml_664_0);
+ MSG(6, scr_text_slash_scr_text_gml_665_0);
+ MSG(7, scr_text_slash_scr_text_gml_666_0);
+ MSG(8, scr_text_slash_scr_text_gml_667_0);
+ MSG(9, scr_text_slash_scr_text_gml_668_0);
+ MSG(10, scr_text_slash_scr_text_gml_669_0);
+L15840:;
+ goto L16040; /* gml: if !(global.choice == 2) goto L16040 */
+ MSG(0, scr_text_slash_scr_text_gml_673_0);
+ MSG(1, scr_text_slash_scr_text_gml_674_0);
+ MSG(2, scr_text_slash_scr_text_gml_675_0);
+ MSG(3, scr_text_slash_scr_text_gml_676_0);
+ MSG(4, scr_text_slash_scr_text_gml_677_0);
+L16040:;
+ goto L16132; /* gml: if !(global.choice == 3) goto L16132 */
+ MSG(0, scr_text_slash_scr_text_gml_682_0);
+ MSG(1, scr_text_slash_scr_text_gml_683_0);
+L16132:;
+ goto L66496;
+L16136:;
+ CHOICE(0, scr_text_slash_scr_text_gml_689_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_690_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_693_0);
+ MSG(1, scr_text_slash_scr_text_gml_694_0);
+ txt_msg(c, 2, " ");
+ goto L66496;
+L16356:;
+ MSG(0, scr_text_slash_scr_text_gml_699_0);
+ MSG(1, scr_text_slash_scr_text_gml_700_0);
+ MSG(2, scr_text_slash_scr_text_gml_701_0);
+ MSG(3, scr_text_slash_scr_text_gml_702_0);
+ MSG(4, scr_text_slash_scr_text_gml_703_0);
+ MSG(5, scr_text_slash_scr_text_gml_704_0);
+ MSG(6, scr_text_slash_scr_text_gml_705_0);
+ MSG(7, scr_text_slash_scr_text_gml_706_0);
+ MSG(8, scr_text_slash_scr_text_gml_707_0);
+ MSG(9, scr_text_slash_scr_text_gml_708_0);
+ goto L16772; /* gml: if !(global.choice < 1) goto L16772 */
+ MSG(0, scr_text_slash_scr_text_gml_709_0);
+L16772:;
+ goto L66496;
+L16776:;
+ CHOICE(0, scr_text_slash_scr_text_gml_713_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_714_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_717_0);
+ MSG(1, scr_text_slash_scr_text_gml_718_0);
+ MSG(2, scr_text_slash_scr_text_gml_719_0);
+ MSG(3, scr_text_slash_scr_text_gml_720_0);
+ txt_msg(c, 4, " ");
+ goto L66496;
+L17068:;
+ goto L17124; /* gml: if !(global.choice == 0) goto L17124 */
+ MSG(0, scr_text_slash_scr_text_gml_727_0);
+L17124:;
+ goto L17180; /* gml: if !(global.choice == 1) goto L17180 */
+ MSG(0, scr_text_slash_scr_text_gml_733_0);
+L17180:;
+ goto L66496;
+L17184:;
+ CHOICE(0, scr_text_slash_scr_text_gml_738_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_739_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_743_0);
+ MSG(1, scr_text_slash_scr_text_gml_744_0);
+ MSG(2, scr_text_slash_scr_text_gml_745_0);
+ txt_msg(c, 3, " ");
+ if (!(sv.flag[257] == 1)) goto L17500;
+ MSG(0, scr_text_slash_scr_text_gml_749_0);
+L17500:;
+ goto L66496;
+L17504:;
+ goto L17616; /* gml: if !(global.choice == 0) goto L17616 */
+ MSG(0, scr_text_slash_scr_text_gml_756_0);
+ MSG(1, scr_text_slash_scr_text_gml_757_0);
+ sv.flag[257] = 1;
+L17616:;
+ goto L17672; /* gml: if !(global.choice == 1) goto L17672 */
+ MSG(0, scr_text_slash_scr_text_gml_763_0);
+L17672:;
+ goto L66496;
+L17676:;
+ CHOICE(0, scr_text_slash_scr_text_gml_769_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_770_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_774_0);
+ MSG(1, scr_text_slash_scr_text_gml_775_0);
+ MSG(2, scr_text_slash_scr_text_gml_776_0);
+ MSG(3, scr_text_slash_scr_text_gml_777_0);
+ MSG(4, scr_text_slash_scr_text_gml_778_0);
+ MSG(5, scr_text_slash_scr_text_gml_779_0);
+ MSG(6, scr_text_slash_scr_text_gml_780_0);
+ txt_msg(c, 7, " ");
+ goto L66496;
+L18076:;
+ CHOICE(0, scr_text_slash_scr_text_gml_786_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_787_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ goto L18384; /* gml: if !(global.choice == 0) goto L18384 */
+ MSG(0, scr_text_slash_scr_text_gml_794_0);
+ MSG(1, scr_text_slash_scr_text_gml_795_0);
+ MSG(2, scr_text_slash_scr_text_gml_796_0);
+ MSG(3, scr_text_slash_scr_text_gml_797_0);
+ txt_msg(c, 4, " ");
+L18384:;
+ goto L18468; /* gml: if !(global.choice == 1) goto L18468 */
+ sv.flag[258] = 3;
+ sv.flag[20] = 1;
+ txt_msg(c, 0, "%%%");
+L18468:;
+ goto L66496;
+L18472:;
+ CHOICE(0, scr_text_slash_scr_text_gml_809_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_810_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_811_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_812_0);
+ goto L18692; /* gml: if !(global.choice == 0) goto L18692 */
+ sv.flag[259] = 1;
+ MSG(0, scr_text_slash_scr_text_gml_817_0);
+L18692:;
+ goto L18768; /* gml: if !(global.choice == 1) goto L18768 */
+ sv.flag[259] = 2;
+ MSG(0, scr_text_slash_scr_text_gml_822_0);
+L18768:;
+ MSG(1, scr_text_slash_scr_text_gml_825_0);
+ MSG(2, scr_text_slash_scr_text_gml_826_0);
+ MSG(3, scr_text_slash_scr_text_gml_827_0);
+ /* gml: nn = scr_84_get_lang_string("scr_text_slash_scr_text_gml_828_0") */
+ if (!(sv.flag[259] == 2)) goto L18960;
+ /* gml: nn = scr_84_get_lang_string("scr_text_slash_scr_text_gml_829_0") */
+L18960:;
+ MSG(4, scr_text_slash_scr_text_gml_830_0); /* gml: global.msg[4] = scr_84_get_subst_string(scr_84_get_lang_string("scr_text_slash_scr_text_gml_830_0"), nn) */
+ MSG(5, scr_text_slash_scr_text_gml_831_0);
+ txt_msg(c, 6, " ");
+ goto L66496;
+L19076:;
+ goto L19244; /* gml: if !(global.choice == 0) goto L19244 */
+ sv.flag[258] = 2;
+ sv.flag[260] = 1;
+ MSG(0, scr_text_slash_scr_text_gml_840_0);
+ MSG(1, scr_text_slash_scr_text_gml_841_0);
+ MSG(2, scr_text_slash_scr_text_gml_842_0);
+L19244:;
+ goto L19412; /* gml: if !(global.choice == 1) goto L19412 */
+ sv.flag[258] = 2;
+ sv.flag[260] = 2;
+ MSG(0, scr_text_slash_scr_text_gml_848_0);
+ MSG(1, scr_text_slash_scr_text_gml_849_0);
+ MSG(2, scr_text_slash_scr_text_gml_850_0);
+L19412:;
+ goto L19580; /* gml: if !(global.choice == 2) goto L19580 */
+ sv.flag[258] = 2;
+ sv.flag[260] = 3;
+ MSG(0, scr_text_slash_scr_text_gml_857_0);
+ MSG(1, scr_text_slash_scr_text_gml_858_0);
+ MSG(2, scr_text_slash_scr_text_gml_859_0);
+L19580:;
+ goto L19684; /* gml: if !(global.choice == 3) goto L19684 */
+ sv.flag[258] = 3;
+ sv.flag[260] = 4;
+ sv.flag[20] = 1;
+ txt_msg(c, 0, "%%%");
+L19684:;
+ MSG(3, scr_text_slash_scr_text_gml_869_0);
+ MSG(4, scr_text_slash_scr_text_gml_870_0);
+ MSG(5, scr_text_slash_scr_text_gml_871_0);
+ if (!(sv.flag[259] == 2)) goto L19856;
+ MSG(5, scr_text_slash_scr_text_gml_872_0);
+L19856:;
+ MSG(6, scr_text_slash_scr_text_gml_873_0);
+ MSG(7, scr_text_slash_scr_text_gml_874_0);
+ MSG(8, scr_text_slash_scr_text_gml_875_0);
+ goto L66496;
+L19968:;
+ CHOICE(0, scr_text_slash_scr_text_gml_879_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_880_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_881_0);
+ c->choicemsg[3] = " ";
+ goto L20296; /* gml: if !(read == 0) goto L20296 */
+ MSG(0, scr_text_slash_scr_text_gml_885_0);
+ FACE(1, 'A', 0);
+ MSG(2, scr_text_slash_scr_text_gml_887_0);
+ MSG(3, scr_text_slash_scr_text_gml_888_0);
+ MSG(4, scr_text_slash_scr_text_gml_889_0);
+ goto L20368;
+L20296:;
+ MSG(0, scr_text_slash_scr_text_gml_894_0);
+ MSG(1, scr_text_slash_scr_text_gml_895_0);
+L20368:;
+ goto L66496;
+L20372:;
+ c->fc = 0;
+ /* gml: global.typer = 5 */
+ MSG(0, scr_text_slash_scr_text_gml_902_0);
+ goto L21048; /* gml: if !(global.choice == 0) goto L21048 */
+ if (!(sv.flag[263] == 2)) goto L20516;
+ MSG(0, scr_text_slash_scr_text_gml_907_0);
+L20516:;
+ if (!(sv.flag[263] == 1)) goto L20652;
+ MSG(0, scr_text_slash_scr_text_gml_912_0);
+ MSG(1, scr_text_slash_scr_text_gml_913_0);
+ MSG(2, scr_text_slash_scr_text_gml_914_0);
+L20652:;
+ if (!(sv.flag[263] == 0)) goto L21048;
+ MSG(0, scr_text_slash_scr_text_gml_919_0);
+ MSG(1, scr_text_slash_scr_text_gml_920_0);
+ sv.flag[263] = 1;
+ if (!gm_litemcheck(8)) goto L21048;
+ MSG(0, scr_text_slash_scr_text_gml_924_0);
+ MSG(1, scr_text_slash_scr_text_gml_925_0);
+ MSG(2, scr_text_slash_scr_text_gml_926_0);
+ /* gml: i = 0 */
+L20916:;
+ goto L21028; /* gml: if !(i < 8) goto L21028 */
+ goto L21000; /* gml: if !(global.litem[i] == 8) goto L21000 */
+ /* gml: scr_litemshift(i, 0) */
+L21000:;
+ /* gml: i = (i + 1) */
+ goto L20916;
+L21028:;
+ sv.flag[263] = 2;
+L21048:;
+ goto L21104; /* gml: if !(global.choice == 1) goto L21104 */
+ MSG(0, scr_text_slash_scr_text_gml_943_0);
+L21104:;
+ goto L21268; /* gml: if !(global.choice == 2) goto L21268 */
+ MSG(0, scr_text_slash_scr_text_gml_947_0);
+ MSG(1, scr_text_slash_scr_text_gml_948_0);
+ MSG(2, scr_text_slash_scr_text_gml_949_0);
+ MSG(3, scr_text_slash_scr_text_gml_950_0);
+L21268:;
+ goto L66496;
+L21272:;
+ CHOICE(0, scr_text_slash_scr_text_gml_955_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_956_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_957_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_958_0);
+ MSG(0, scr_text_slash_scr_text_gml_961_0);
+ MSG(1, scr_text_slash_scr_text_gml_962_0);
+ MSG(2, scr_text_slash_scr_text_gml_963_0);
+ MSG(3, scr_text_slash_scr_text_gml_964_0);
+ MSG(4, scr_text_slash_scr_text_gml_965_0);
+ MSG(5, scr_text_slash_scr_text_gml_966_0);
+ MSG(6, scr_text_slash_scr_text_gml_967_0);
+ if (!(sv.flag[265] > 0)) goto L21768;
+ MSG(0, scr_text_slash_scr_text_gml_970_0);
+ MSG(1, scr_text_slash_scr_text_gml_971_0);
+L21768:;
+ sv.flag[265] = 1;
+ goto L66496;
+L21792:;
+ goto L22064; /* gml: if !(global.choice == 0) goto L22064 */
+ MSG(0, scr_text_slash_scr_text_gml_979_0);
+ MSG(1, scr_text_slash_scr_text_gml_980_0);
+ MSG(2, scr_text_slash_scr_text_gml_981_0);
+ MSG(3, scr_text_slash_scr_text_gml_982_0);
+ MSG(4, scr_text_slash_scr_text_gml_983_0);
+ MSG(5, scr_text_slash_scr_text_gml_984_0);
+ MSG(6, scr_text_slash_scr_text_gml_985_0);
+L22064:;
+ goto L22372; /* gml: if !(global.choice == 1) goto L22372 */
+ MSG(0, scr_text_slash_scr_text_gml_989_0);
+ MSG(1, scr_text_slash_scr_text_gml_990_0);
+ MSG(2, scr_text_slash_scr_text_gml_991_0);
+ MSG(3, scr_text_slash_scr_text_gml_992_0);
+ MSG(4, scr_text_slash_scr_text_gml_993_0);
+ MSG(5, scr_text_slash_scr_text_gml_994_0);
+ MSG(6, scr_text_slash_scr_text_gml_995_0);
+ MSG(7, scr_text_slash_scr_text_gml_996_0);
+L22372:;
+ goto L22644; /* gml: if !(global.choice == 2) goto L22644 */
+ MSG(0, scr_text_slash_scr_text_gml_1000_0);
+ MSG(1, scr_text_slash_scr_text_gml_1001_0);
+ MSG(2, scr_text_slash_scr_text_gml_1002_0);
+ MSG(3, scr_text_slash_scr_text_gml_1003_0);
+ MSG(4, scr_text_slash_scr_text_gml_1004_0);
+ MSG(5, scr_text_slash_scr_text_gml_1005_0);
+ MSG(6, scr_text_slash_scr_text_gml_1006_0);
+L22644:;
+ goto L22772; /* gml: if !(global.choice == 3) goto L22772 */
+ MSG(0, scr_text_slash_scr_text_gml_1010_0);
+ MSG(1, scr_text_slash_scr_text_gml_1011_0);
+ MSG(2, scr_text_slash_scr_text_gml_1012_0);
+L22772:;
+ goto L66496;
+L22776:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1017_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1018_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_1019_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_1020_0);
+ MSG(0, scr_text_slash_scr_text_gml_1021_0);
+ MSG(1, scr_text_slash_scr_text_gml_1022_0);
+ MSG(2, scr_text_slash_scr_text_gml_1023_0);
+ goto L66496;
+L23032:;
+ goto L23268; /* gml: if !(global.choice == 0) goto L23268 */
+ MSG(0, scr_text_slash_scr_text_gml_1029_0);
+ MSG(1, scr_text_slash_scr_text_gml_1030_0);
+ MSG(2, scr_text_slash_scr_text_gml_1031_0);
+ MSG(3, scr_text_slash_scr_text_gml_1032_0);
+ MSG(4, scr_text_slash_scr_text_gml_1033_0);
+ MSG(5, scr_text_slash_scr_text_gml_1034_0);
+L23268:;
+ goto L23612; /* gml: if !(global.choice == 1) goto L23612 */
+ MSG(0, scr_text_slash_scr_text_gml_1039_0);
+ MSG(1, scr_text_slash_scr_text_gml_1040_0);
+ MSG(2, scr_text_slash_scr_text_gml_1041_0);
+ MSG(3, scr_text_slash_scr_text_gml_1042_0);
+ MSG(4, scr_text_slash_scr_text_gml_1043_0);
+ MSG(5, scr_text_slash_scr_text_gml_1044_0);
+ MSG(6, scr_text_slash_scr_text_gml_1045_0);
+ MSG(7, scr_text_slash_scr_text_gml_1046_0);
+ MSG(8, scr_text_slash_scr_text_gml_1047_0);
+L23612:;
+ goto L23920; /* gml: if !(global.choice == 2) goto L23920 */
+ MSG(0, scr_text_slash_scr_text_gml_1052_0);
+ MSG(1, scr_text_slash_scr_text_gml_1053_0);
+ MSG(2, scr_text_slash_scr_text_gml_1054_0);
+ MSG(3, scr_text_slash_scr_text_gml_1055_0);
+ MSG(4, scr_text_slash_scr_text_gml_1056_0);
+ MSG(5, scr_text_slash_scr_text_gml_1057_0);
+ MSG(6, scr_text_slash_scr_text_gml_1058_0);
+ MSG(7, scr_text_slash_scr_text_gml_1059_0);
+L23920:;
+ goto L24012; /* gml: if !(global.choice == 3) goto L24012 */
+ MSG(0, scr_text_slash_scr_text_gml_1063_0);
+ MSG(1, scr_text_slash_scr_text_gml_1064_0);
+L24012:;
+ goto L66496;
+L24016:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1069_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1070_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_1073_0);
+ MSG(1, scr_text_slash_scr_text_gml_1074_0);
+ MSG(2, scr_text_slash_scr_text_gml_1075_0);
+ MSG(3, scr_text_slash_scr_text_gml_1076_0);
+ goto L66496;
+L24284:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1080_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1081_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ goto L24872; /* gml: if !(global.choice == 0) goto L24872 */
+ afford = 1;
+ if (!(sv.gold >= 50)) goto L24484;
+ sv.gold = (sv.gold - 50);
+ goto L24496;
+L24484:;
+ afford = 0;
+L24496:;
+ if (!(afford == 1)) goto L24592;
+ MSG(0, scr_text_slash_scr_text_gml_1091_0);
+ MSG(1, scr_text_slash_scr_text_gml_1092_0);
+ goto L24844;
+L24592:;
+ MSG(0, scr_text_slash_scr_text_gml_1096_0);
+ MSG(1, scr_text_slash_scr_text_gml_1097_0);
+ MSG(2, scr_text_slash_scr_text_gml_1098_0);
+ MSG(3, scr_text_slash_scr_text_gml_1099_0);
+ MSG(4, scr_text_slash_scr_text_gml_1100_0);
+ MSG(5, scr_text_slash_scr_text_gml_1101_0);
+ MSG(6, scr_text_slash_scr_text_gml_1102_0);
+L24844:;
+ /* gml: with (obj_npc_puzzlemaster1) { // to L24864 */
+ /* gml: con = 5 */
+ /* gml: } // end with */
+ goto L24956;
+L24872:;
+ MSG(0, scr_text_slash_scr_text_gml_1110_0);
+ MSG(1, scr_text_slash_scr_text_gml_1111_0);
+ afford = 0;
+L24956:;
+ goto L66496;
+L24960:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1120_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1121_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ goto L25548; /* gml: if !(global.choice == 0) goto L25548 */
+ afford = 1;
+ if (!(sv.gold >= 20)) goto L25160;
+ sv.gold = (sv.gold - 20);
+ goto L25172;
+L25160:;
+ afford = 0;
+L25172:;
+ if (!(afford == 1)) goto L25268;
+ MSG(0, scr_text_slash_scr_text_gml_1131_0);
+ MSG(1, scr_text_slash_scr_text_gml_1132_0);
+ goto L25520;
+L25268:;
+ MSG(0, scr_text_slash_scr_text_gml_1136_0);
+ MSG(1, scr_text_slash_scr_text_gml_1137_0);
+ MSG(2, scr_text_slash_scr_text_gml_1138_0);
+ MSG(3, scr_text_slash_scr_text_gml_1139_0);
+ MSG(4, scr_text_slash_scr_text_gml_1140_0);
+ MSG(5, scr_text_slash_scr_text_gml_1141_0);
+ MSG(6, scr_text_slash_scr_text_gml_1142_0);
+L25520:;
+ /* gml: with (obj_npc_puzzlemaster1) { // to L25540 */
+ /* gml: con = 5 */
+ /* gml: } // end with */
+ goto L25632;
+L25548:;
+ MSG(0, scr_text_slash_scr_text_gml_1150_0);
+ MSG(1, scr_text_slash_scr_text_gml_1151_0);
+ afford = 0;
+L25632:;
+ goto L66496;
+L25636:;
+ goto L26104; /* gml: if !(global.choice == 0) goto L26104 */
+ afford = 1;
+ if (!(sv.gold >= 1)) goto L25716;
+ sv.gold = (sv.gold - 1);
+ goto L25728;
+L25716:;
+ afford = 0;
+L25728:;
+ if (!(afford == 1)) goto L25824;
+ MSG(0, scr_text_slash_scr_text_gml_1167_0);
+ MSG(1, scr_text_slash_scr_text_gml_1168_0);
+ goto L26076;
+L25824:;
+ MSG(0, scr_text_slash_scr_text_gml_1172_0);
+ MSG(1, scr_text_slash_scr_text_gml_1173_0);
+ MSG(2, scr_text_slash_scr_text_gml_1174_0);
+ MSG(3, scr_text_slash_scr_text_gml_1175_0);
+ MSG(4, scr_text_slash_scr_text_gml_1176_0);
+ MSG(5, scr_text_slash_scr_text_gml_1177_0);
+ MSG(6, scr_text_slash_scr_text_gml_1178_0);
+L26076:;
+ /* gml: with (obj_npc_puzzlemaster1) { // to L26096 */
+ /* gml: con = 5 */
+ /* gml: } // end with */
+ goto L26380;
+L26104:;
+ FACE(0, 'R', 6);
+ MSG(1, scr_text_slash_scr_text_gml_1187_0);
+ NOFACE(2);
+ MSG(3, scr_text_slash_scr_text_gml_1189_0);
+ FACE(4, 'R', 1);
+ MSG(5, scr_text_slash_scr_text_gml_1191_0);
+ NOFACE(6);
+ MSG(7, scr_text_slash_scr_text_gml_1193_0);
+ /* gml: with (obj_npc_puzzlemaster1) { // to L26364 */
+ /* gml: con = 5 */
+ /* gml: } // end with */
+ afford = 0;
+L26380:;
+ goto L66496;
+L26384:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1202_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1203_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_1204_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_1205_0);
+ MSG(0, scr_text_slash_scr_text_gml_1206_0);
+ MSG(1, scr_text_slash_scr_text_gml_1207_0);
+ goto L66496;
+L26604:;
+ MSG(0, scr_text_slash_scr_text_gml_1211_0);
+ goto L26888; /* gml: if !(global.choice == 0) goto L26888 */
+ MSG(0, scr_text_slash_scr_text_gml_1214_0);
+ MSG(1, scr_text_slash_scr_text_gml_1215_0);
+ MSG(2, scr_text_slash_scr_text_gml_1216_0);
+ FACE(3, 'R', 9);
+ MSG(4, scr_text_slash_scr_text_gml_1218_0);
+ NOFACE(5);
+ MSG(6, scr_text_slash_scr_text_gml_1220_0);
+L26888:;
+ goto L27100; /* gml: if !(global.choice == 1) goto L27100 */
+ MSG(0, scr_text_slash_scr_text_gml_1224_0);
+ MSG(1, scr_text_slash_scr_text_gml_1225_0);
+ FACE(2, 'R', 1);
+ MSG(3, scr_text_slash_scr_text_gml_1227_0);
+ NOFACE(4);
+ MSG(5, scr_text_slash_scr_text_gml_1229_0);
+L27100:;
+ goto L27440; /* gml: if !(global.choice == 2) goto L27440 */
+ MSG(0, scr_text_slash_scr_text_gml_1233_0);
+ MSG(1, scr_text_slash_scr_text_gml_1234_0);
+ MSG(2, scr_text_slash_scr_text_gml_1235_0);
+ FACE(3, 'S', 0);
+ MSG(4, scr_text_slash_scr_text_gml_1237_0);
+ NOFACE(5);
+ MSG(6, scr_text_slash_scr_text_gml_1239_0);
+ if (!!have_char(2)) goto L27440;
+ FACE(3, 'R', 1);
+ MSG(4, scr_text_slash_scr_text_gml_1244_0);
+L27440:;
+ goto L66496;
+L27444:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1251_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1252_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_1253_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_1254_0);
+ MSG(0, scr_text_slash_scr_text_gml_1255_0);
+ MSG(1, scr_text_slash_scr_text_gml_1256_0);
+ goto L66496;
+L27664:;
+ MSG(0, scr_text_slash_scr_text_gml_1260_0);
+ goto L27876; /* gml: if !(global.choice == 0) goto L27876 */
+ MSG(0, scr_text_slash_scr_text_gml_1263_0);
+ FACE(1, 'R', 9);
+ MSG(2, scr_text_slash_scr_text_gml_1265_0);
+ NOFACE(3);
+ MSG(4, scr_text_slash_scr_text_gml_1267_0);
+L27876:;
+ goto L28088; /* gml: if !(global.choice == 1) goto L28088 */
+ MSG(0, scr_text_slash_scr_text_gml_1272_0);
+ MSG(1, scr_text_slash_scr_text_gml_1273_0);
+ FACE(2, 'R', 1);
+ MSG(3, scr_text_slash_scr_text_gml_1275_0);
+ NOFACE(4);
+ MSG(5, scr_text_slash_scr_text_gml_1277_0);
+L28088:;
+ goto L28284; /* gml: if !(global.choice == 2) goto L28284 */
+ MSG(0, scr_text_slash_scr_text_gml_1281_0);
+ MSG(1, scr_text_slash_scr_text_gml_1282_0);
+ FACE(2, 'R', 10);
+ MSG(3, scr_text_slash_scr_text_gml_1284_0);
+ MSG(4, scr_text_slash_scr_text_gml_1285_0);
+L28284:;
+ goto L66496;
+L28288:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1290_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1291_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_1292_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_1293_0);
+ MSG(0, scr_text_slash_scr_text_gml_1294_0);
+ MSG(1, scr_text_slash_scr_text_gml_1295_0);
+ goto L66496;
+L28508:;
+ MSG(0, scr_text_slash_scr_text_gml_1299_0);
+ goto L28976; /* gml: if !(global.choice == 0) goto L28976 */
+ MSG(0, scr_text_slash_scr_text_gml_1302_0);
+ FACE(1, 'S', 2);
+ MSG(2, scr_text_slash_scr_text_gml_1304_0);
+ NOFACE(3);
+ MSG(4, scr_text_slash_scr_text_gml_1306_0);
+ FACE(5, 'S', 4);
+ MSG(6, scr_text_slash_scr_text_gml_1308_0);
+ if (!!have_char(2)) goto L28884;
+ MSG(0, scr_text_slash_scr_text_gml_1312_0);
+ MSG(1, scr_text_slash_scr_text_gml_1313_0);
+L28884:;
+ if (!(sv.plot >= 150)) goto L28976;
+ MSG(0, scr_text_slash_scr_text_gml_1317_0);
+ MSG(1, scr_text_slash_scr_text_gml_1318_0);
+L28976:;
+ goto L29456; /* gml: if !(global.choice == 1) goto L29456 */
+ MSG(0, scr_text_slash_scr_text_gml_1325_0);
+ MSG(1, scr_text_slash_scr_text_gml_1326_0);
+ MSG(2, scr_text_slash_scr_text_gml_1327_0);
+ FACE(3, 'S', 2);
+ MSG(4, scr_text_slash_scr_text_gml_1329_0);
+ NOFACE(5);
+ MSG(6, scr_text_slash_scr_text_gml_1331_0);
+ if (!!have_char(2)) goto L29324;
+ MSG(0, scr_text_slash_scr_text_gml_1335_0);
+ MSG(1, scr_text_slash_scr_text_gml_1336_0);
+L29324:;
+ if (!(sv.plot >= 150)) goto L29456;
+ /* gml: input_name = scr_get_input_name(4) */
+ MSG(0, scr_text_slash_scr_text_gml_1341_0);
+ MSG(1, scr_text_slash_scr_text_gml_1342_0); /* gml: global.msg[1] = scr_84_get_subst_string(scr_84_get_lang_string("scr_text_slash_scr_text_gml_1342_0"), input_name) */
+L29456:;
+ goto L29824; /* gml: if !(global.choice == 2) goto L29824 */
+ MSG(0, scr_text_slash_scr_text_gml_1348_0);
+ FACE(1, 'S', 0);
+ MSG(2, scr_text_slash_scr_text_gml_1350_0);
+ NOFACE(3);
+ MSG(4, scr_text_slash_scr_text_gml_1352_0);
+ if (!!have_char(2)) goto L29732;
+ MSG(0, scr_text_slash_scr_text_gml_1355_0);
+ MSG(1, scr_text_slash_scr_text_gml_1356_0);
+L29732:;
+ if (!(sv.plot >= 150)) goto L29824;
+ MSG(0, scr_text_slash_scr_text_gml_1360_0);
+ MSG(1, scr_text_slash_scr_text_gml_1361_0);
+L29824:;
+ goto L66496;
+L29828:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1373_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1374_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_1375_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_1376_0);
+ MSG(0, scr_text_slash_scr_text_gml_1377_0);
+ MSG(1, scr_text_slash_scr_text_gml_1378_0);
+ goto L66496;
+L30048:;
+ MSG(0, scr_text_slash_scr_text_gml_1382_0);
+ goto L30368; /* gml: if !(global.choice == 0) goto L30368 */
+ MSG(0, scr_text_slash_scr_text_gml_1385_0);
+ MSG(1, scr_text_slash_scr_text_gml_1386_0);
+ MSG(2, scr_text_slash_scr_text_gml_1387_0);
+ MSG(3, scr_text_slash_scr_text_gml_1388_0);
+ FACE(4, 'R', 0);
+ MSG(5, scr_text_slash_scr_text_gml_1390_0);
+ NOFACE(6);
+ MSG(7, scr_text_slash_scr_text_gml_1392_0);
+L30368:;
+ goto L30688; /* gml: if !(global.choice == 1) goto L30688 */
+ MSG(0, scr_text_slash_scr_text_gml_1397_0);
+ MSG(1, scr_text_slash_scr_text_gml_1398_0);
+ FACE(2, 'R', 0);
+ MSG(3, scr_text_slash_scr_text_gml_1400_0);
+ MSG(4, scr_text_slash_scr_text_gml_1401_0);
+ MSG(5, scr_text_slash_scr_text_gml_1402_0);
+ MSG(6, scr_text_slash_scr_text_gml_1403_0);
+ NOFACE(7);
+ MSG(8, scr_text_slash_scr_text_gml_1405_0);
+L30688:;
+ goto L30852; /* gml: if !(global.choice == 2) goto L30852 */
+ MSG(0, scr_text_slash_scr_text_gml_1409_0);
+ MSG(1, scr_text_slash_scr_text_gml_1410_0);
+ MSG(2, scr_text_slash_scr_text_gml_1411_0);
+ MSG(3, scr_text_slash_scr_text_gml_1412_0);
+L30852:;
+ goto L66496;
+L30856:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1417_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1418_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_1421_0);
+ MSG(1, scr_text_slash_scr_text_gml_1422_0);
+ MSG(2, scr_text_slash_scr_text_gml_1423_0);
+ if (!(sv.flag[216] == 1)) goto L31148;
+ MSG(0, scr_text_slash_scr_text_gml_1426_0);
+L31148:;
+ goto L66496;
+L31152:;
+ goto L31448; /* gml: if !(global.choice == 0) goto L31448 */
+ MSG(0, scr_text_slash_scr_text_gml_1433_0);
+ MSG(1, scr_text_slash_scr_text_gml_1434_0);
+ afford = 1;
+ if (!(sv.gold >= 1)) goto L31304;
+ sv.gold = (sv.gold - 1);
+ goto L31316;
+L31304:;
+ afford = 0;
+L31316:;
+ if (!(afford == 1)) goto L31356;
+ sv.flag[216] = 1;
+L31356:;
+ if (!(afford == 0)) goto L31448;
+ MSG(0, scr_text_slash_scr_text_gml_1440_0);
+ MSG(1, scr_text_slash_scr_text_gml_1441_0);
+L31448:;
+ goto L31504; /* gml: if !(global.choice == 1) goto L31504 */
+ MSG(0, scr_text_slash_scr_text_gml_1446_0);
+L31504:;
+ goto L66496;
+L31508:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1451_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1452_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_1453_0);
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_1455_0);
+ FACE(1, 'S', 6);
+ MSG(2, scr_text_slash_scr_text_gml_1457_0);
+ MSG(3, scr_text_slash_scr_text_gml_1458_0);
+ FACE(4, 'R', 1);
+ MSG(5, scr_text_slash_scr_text_gml_1460_0);
+ FACE(6, 'S', 7);
+ MSG(7, scr_text_slash_scr_text_gml_1462_0);
+ FACE(8, 'L', 3);
+ MSG(9, scr_text_slash_scr_text_gml_1464_0);
+ FACE(10, 'R', 6);
+ MSG(11, scr_text_slash_scr_text_gml_1466_0);
+ FACE(12, 'L', 2);
+ MSG(13, scr_text_slash_scr_text_gml_1468_0);
+ FACE(14, 'R', 8);
+ MSG(15, scr_text_slash_scr_text_gml_1470_0);
+ FACE(16, 'L', 1);
+ MSG(17, scr_text_slash_scr_text_gml_1472_0);
+ FACE(18, 'R', 8);
+ MSG(19, scr_text_slash_scr_text_gml_1474_0);
+ MSG(20, scr_text_slash_scr_text_gml_1475_0);
+ goto L66496;
+L32328:;
+ sv.flag[232] = 1;
+ goto L32860; /* gml: if !(global.choice == 0) goto L32860 */
+ FACE(0, 'R', 6);
+ MSG(1, scr_text_slash_scr_text_gml_1488_0);
+ MSG(2, scr_text_slash_scr_text_gml_1489_0);
+ FACE(3, 'L', 3);
+ MSG(4, scr_text_slash_scr_text_gml_1491_0);
+ MSG(5, scr_text_slash_scr_text_gml_1492_0);
+ FACE(6, 'R', 1);
+ MSG(7, scr_text_slash_scr_text_gml_1494_0);
+ MSG(8, scr_text_slash_scr_text_gml_1495_0);
+ FACE(9, 'S', 7);
+ MSG(10, scr_text_slash_scr_text_gml_1497_0);
+ FACE(11, 'L', 3);
+ MSG(12, scr_text_slash_scr_text_gml_1499_0);
+ FACE(13, 'S', 6);
+ MSG(14, scr_text_slash_scr_text_gml_1501_0);
+L32860:;
+ goto L33172; /* gml: if !(global.choice == 1) goto L33172 */
+ NOFACE(0);
+ MSG(1, scr_text_slash_scr_text_gml_1507_0);
+ MSG(2, scr_text_slash_scr_text_gml_1508_0);
+ MSG(3, scr_text_slash_scr_text_gml_1509_0);
+ MSG(4, scr_text_slash_scr_text_gml_1510_0);
+ FACE(5, 'S', 2);
+ MSG(6, scr_text_slash_scr_text_gml_1512_0);
+ FACE(7, 'L', 3);
+ MSG(8, scr_text_slash_scr_text_gml_1514_0);
+L33172:;
+ goto L33612; /* gml: if !(global.choice == 2) goto L33612 */
+ FACE(0, 'S', 2);
+ MSG(1, scr_text_slash_scr_text_gml_1521_0);
+ MSG(2, scr_text_slash_scr_text_gml_1522_0);
+ FACE(3, 'L', 3);
+ MSG(4, scr_text_slash_scr_text_gml_1524_0);
+ FACE(5, 'S', 2);
+ MSG(6, scr_text_slash_scr_text_gml_1526_0);
+ FACE(7, 'L', 3);
+ MSG(8, scr_text_slash_scr_text_gml_1528_0);
+ FACE(9, 'S', 2);
+ MSG(10, scr_text_slash_scr_text_gml_1530_0);
+ FACE(11, 'L', 3);
+ MSG(12, scr_text_slash_scr_text_gml_1532_0);
+L33612:;
+ goto L66496;
+L33616:;
+ /* gml: addflag = 0 */
+ if (!(sv.flag[267] == -10)) goto L33704;
+ MSG(0, scr_text_slash_scr_text_gml_1550_0);
+ /* gml: addflag = 1 */
+L33704:;
+ if (!(sv.flag[267] == 0)) goto L33996;
+ MSG(0, scr_text_slash_scr_text_gml_1559_0);
+ MSG(1, scr_text_slash_scr_text_gml_1560_0);
+ MSG(2, scr_text_slash_scr_text_gml_1561_0);
+ MSG(3, scr_text_slash_scr_text_gml_1562_0);
+ MSG(4, scr_text_slash_scr_text_gml_1563_0);
+ MSG(5, scr_text_slash_scr_text_gml_1564_0);
+ MSG(6, scr_text_slash_scr_text_gml_1565_0);
+ /* gml: addflag = 1 */
+L33996:;
+ if (!(sv.flag[267] == 1)) goto L34132;
+ MSG(0, scr_text_slash_scr_text_gml_1572_0);
+ MSG(1, scr_text_slash_scr_text_gml_1573_0);
+ MSG(2, scr_text_slash_scr_text_gml_1574_0);
+L34132:;
+ goto L34188; /* gml: if !(addflag == 1) goto L34188 */
+ sv.flag[267] = (sv.flag[267] + 1);
+L34188:;
+ goto L66496;
+L34192:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1586_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1587_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_1588_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_1589_0);
+ MSG(0, scr_text_slash_scr_text_gml_1590_0);
+ MSG(1, scr_text_slash_scr_text_gml_1591_0);
+ MSG(2, scr_text_slash_scr_text_gml_1592_0);
+ goto L66496;
+L34448:;
+ MSG(0, scr_text_slash_scr_text_gml_1596_0);
+ goto L34828; /* gml: if !(global.choice == 0) goto L34828 */
+ MSG(0, scr_text_slash_scr_text_gml_1599_0);
+ MSG(1, scr_text_slash_scr_text_gml_1600_0);
+ MSG(2, scr_text_slash_scr_text_gml_1601_0);
+ MSG(3, scr_text_slash_scr_text_gml_1602_0);
+ MSG(4, scr_text_slash_scr_text_gml_1603_0);
+ MSG(5, scr_text_slash_scr_text_gml_1604_0);
+ MSG(6, scr_text_slash_scr_text_gml_1605_0);
+ MSG(7, scr_text_slash_scr_text_gml_1606_0);
+ MSG(8, scr_text_slash_scr_text_gml_1607_0);
+L34828:;
+ goto L35100; /* gml: if !(global.choice == 1) goto L35100 */
+ MSG(0, scr_text_slash_scr_text_gml_1611_0);
+ MSG(1, scr_text_slash_scr_text_gml_1612_0);
+ MSG(2, scr_text_slash_scr_text_gml_1613_0);
+ MSG(3, scr_text_slash_scr_text_gml_1614_0);
+ MSG(4, scr_text_slash_scr_text_gml_1615_0);
+ MSG(5, scr_text_slash_scr_text_gml_1616_0);
+ MSG(6, scr_text_slash_scr_text_gml_1617_0);
+L35100:;
+ goto L35912; /* gml: if !(global.choice == 2) goto L35912 */
+ MSG(0, scr_text_slash_scr_text_gml_1624_0);
+ MSG(1, scr_text_slash_scr_text_gml_1625_0);
+ MSG(2, scr_text_slash_scr_text_gml_1626_0);
+ MSG(3, scr_text_slash_scr_text_gml_1627_0);
+ MSG(4, scr_text_slash_scr_text_gml_1628_0);
+ MSG(5, scr_text_slash_scr_text_gml_1629_0);
+ MSG(6, scr_text_slash_scr_text_gml_1630_0);
+ MSG(7, scr_text_slash_scr_text_gml_1631_0);
+ MSG(8, scr_text_slash_scr_text_gml_1632_0);
+ MSG(9, scr_text_slash_scr_text_gml_1633_0);
+ MSG(10, scr_text_slash_scr_text_gml_1634_0);
+ MSG(11, scr_text_slash_scr_text_gml_1635_0);
+ MSG(12, scr_text_slash_scr_text_gml_1636_0);
+ MSG(13, scr_text_slash_scr_text_gml_1637_0);
+ MSG(14, scr_text_slash_scr_text_gml_1638_0);
+ MSG(15, scr_text_slash_scr_text_gml_1639_0);
+ MSG(16, scr_text_slash_scr_text_gml_1640_0);
+ MSG(17, scr_text_slash_scr_text_gml_1641_0);
+ MSG(18, scr_text_slash_scr_text_gml_1642_0);
+ MSG(19, scr_text_slash_scr_text_gml_1643_0);
+ MSG(20, scr_text_slash_scr_text_gml_1644_0);
+ MSG(21, scr_text_slash_scr_text_gml_1645_0);
+L35912:;
+ goto L36040; /* gml: if !(global.choice == 3) goto L36040 */
+ MSG(0, scr_text_slash_scr_text_gml_1650_0);
+ MSG(1, scr_text_slash_scr_text_gml_1651_0);
+ MSG(2, scr_text_slash_scr_text_gml_1652_0);
+L36040:;
+ goto L66496;
+L36044:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1658_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1659_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_1660_0);
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_1662_0);
+ txt_msg(c, 1, " ");
+ goto L66496;
+L36240:;
+ goto L36292; /* gml: if !(global.choice == 0) goto L36292 */
+ /* gml: with (obj_suitspuzz) { // to L36288 */
+ /* gml: event_user(2) */
+ /* gml: } // end with */
+L36292:;
+ goto L36344; /* gml: if !(global.choice == 1) goto L36344 */
+ /* gml: with (obj_suitspuzz) { // to L36340 */
+ /* gml: event_user(3) */
+ /* gml: } // end with */
+L36344:;
+ goto L36396; /* gml: if !(global.choice == 2) goto L36396 */
+ /* gml: with (obj_suitspuzz) { // to L36392 */
+ /* gml: event_user(4) */
+ /* gml: } // end with */
+L36396:;
+ txt_msg(c, 0, " %%");
+ goto L66496;
+L36424:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1683_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1684_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_1687_0);
+ MSG(1, scr_text_slash_scr_text_gml_1688_0);
+ MSG(2, scr_text_slash_scr_text_gml_1689_0);
+ txt_msg(c, 3, " ");
+ if (!(sv.flag[106] == 1)) goto L36740;
+ MSG(0, scr_text_slash_scr_text_gml_1693_0);
+L36740:;
+ goto L66496;
+L36744:;
+ goto L36908; /* gml: if !(global.choice == 0) goto L36908 */
+ /* gml: global.hp[1] = global.maxhp[1] */
+ /* gml: snd_play(104) */
+ MSG(0, scr_text_slash_scr_text_gml_1702_0);
+ MSG(1, scr_text_slash_scr_text_gml_1703_0);
+ sv.flag[106] = 1;
+L36908:;
+ goto L36964; /* gml: if !(global.choice == 1) goto L36964 */
+ MSG(0, scr_text_slash_scr_text_gml_1708_0);
+L36964:;
+ goto L66496;
+L36968:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1713_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1714_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_1717_0);
+ MSG(1, scr_text_slash_scr_text_gml_1718_0);
+ MSG(2, scr_text_slash_scr_text_gml_1719_0);
+ txt_msg(c, 3, " ");
+ if (!(sv.flag[105] == 1)) goto L37284;
+ MSG(0, scr_text_slash_scr_text_gml_1723_0);
+L37284:;
+ goto L66496;
+L37288:;
+ goto L37468; /* gml: if !(global.choice == 0) goto L37468 */
+ gm_armorget(5);
+ goto L37388; /* gml: if !(noroom == 1) goto L37388 */
+ MSG(0, scr_text_slash_scr_text_gml_1733_0);
+ goto L37468;
+L37388:;
+ /* gml: with (obj_npc_sign) { // to L37408 */
+ /* gml: image_index = 1 */
+ /* gml: } // end with */
+ MSG(0, scr_text_slash_scr_text_gml_1738_0);
+ sv.flag[105] = 1;
+L37468:;
+ goto L37524; /* gml: if !(global.choice == 1) goto L37524 */
+ MSG(0, scr_text_slash_scr_text_gml_1744_0);
+L37524:;
+ goto L66496;
+L37528:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1749_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1750_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_1753_0);
+ MSG(1, scr_text_slash_scr_text_gml_1754_0);
+ MSG(2, scr_text_slash_scr_text_gml_1755_0);
+ MSG(3, scr_text_slash_scr_text_gml_1756_0);
+ MSG(4, scr_text_slash_scr_text_gml_1757_0);
+ txt_msg(c, 5, " ");
+ goto L66496;
+L37856:;
+ MSG(0, scr_text_slash_scr_text_gml_1762_0);
+ MSG(1, scr_text_slash_scr_text_gml_1763_0);
+ MSG(2, scr_text_slash_scr_text_gml_1764_0);
+ goto L66496;
+L37968:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1768_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1769_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_1772_0);
+ MSG(1, scr_text_slash_scr_text_gml_1773_0);
+ MSG(2, scr_text_slash_scr_text_gml_1774_0);
+ txt_msg(c, 3, " ");
+ txt_msg(c, 4, " ");
+ goto L66496;
+L38248:;
+ MSG(0, scr_text_slash_scr_text_gml_1780_0);
+ MSG(1, scr_text_slash_scr_text_gml_1781_0);
+ goto L66496;
+L38324:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1785_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1786_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_1787_0);
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_1789_0);
+ MSG(1, scr_text_slash_scr_text_gml_1790_0);
+ MSG(2, scr_text_slash_scr_text_gml_1791_0);
+ goto L66496;
+L38568:;
+ MSG(0, scr_text_slash_scr_text_gml_1795_0);
+ goto L39332; /* gml: if !(global.choice == 0) goto L39332 */
+ /* gml: which = 0 */
+ if (!(gm_keyitemcheck(6) && gm_keyitemcheck(7))) goto L38728;
+ /* gml: which = 3 */
+L38728:;
+ goto L38844; /* gml: if !(scr_keyitemcheck(3) && (which == 0)) goto L38844 */
+ /* gml: which = 1 */
+ gm_itemget(6);
+ goto L38844; /* gml: if !(noroom == 1) goto L38844 */
+ /* gml: which = 2 */
+L38844:;
+ goto L39008; /* gml: if !(which == 0) goto L39008 */
+ MSG(0, scr_text_slash_scr_text_gml_1812_0);
+ MSG(1, scr_text_slash_scr_text_gml_1813_0);
+ MSG(2, scr_text_slash_scr_text_gml_1814_0);
+ MSG(3, scr_text_slash_scr_text_gml_1815_0);
+L39008:;
+ goto L39124; /* gml: if !(which == 1) goto L39124 */
+ MSG(0, scr_text_slash_scr_text_gml_1820_0);
+ MSG(1, scr_text_slash_scr_text_gml_1821_0);
+ /* gml: with (obj_npc_hammerguy) { // to L39120 */
+ /* gml: con = 30 */
+ /* gml: } // end with */
+L39124:;
+ goto L39216; /* gml: if !(which == 2) goto L39216 */
+ MSG(0, scr_text_slash_scr_text_gml_1827_0);
+ MSG(1, scr_text_slash_scr_text_gml_1828_0);
+L39216:;
+ goto L39332; /* gml: if !(which == 3) goto L39332 */
+ MSG(0, scr_text_slash_scr_text_gml_1833_0);
+ MSG(1, scr_text_slash_scr_text_gml_1834_0);
+ /* gml: with (obj_npc_hammerguy) { // to L39328 */
+ /* gml: con = 50 */
+ /* gml: } // end with */
+L39332:;
+ goto L39388; /* gml: if !(global.choice == 1) goto L39388 */
+ MSG(0, scr_text_slash_scr_text_gml_1841_0);
+L39388:;
+ goto L39504; /* gml: if !(global.choice == 2) goto L39504 */
+ MSG(0, scr_text_slash_scr_text_gml_1845_0);
+ MSG(1, scr_text_slash_scr_text_gml_1846_0);
+ /* gml: with (obj_npc_hammerguy) { // to L39500 */
+ /* gml: con = 10 */
+ /* gml: } // end with */
+L39504:;
+ goto L66496;
+L39508:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1853_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1854_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_1857_0);
+ MSG(1, scr_text_slash_scr_text_gml_1858_0);
+ MSG(2, scr_text_slash_scr_text_gml_1859_0);
+ txt_msg(c, 3, " ");
+ if (!gm_itemcheck(13)) goto L39856;
+ MSG(0, scr_text_slash_scr_text_gml_1863_0);
+ MSG(1, scr_text_slash_scr_text_gml_1864_0);
+L39856:;
+ goto L66496;
+L39860:;
+ goto L40084; /* gml: if !(global.choice == 0) goto L40084 */
+ if (!(sv.gold >= 40)) goto L40044;
+ gm_itemget(13);
+ goto L40004; /* gml: if !(noroom == 0) goto L40004 */
+ sv.gold = (sv.gold - 40);
+ MSG(0, scr_text_slash_scr_text_gml_1877_0);
+ goto L40040;
+L40004:;
+ MSG(0, scr_text_slash_scr_text_gml_1881_0);
+L40040:;
+ goto L40080;
+L40044:;
+ MSG(0, scr_text_slash_scr_text_gml_1886_0);
+L40080:;
+ goto L40120;
+L40084:;
+ MSG(0, scr_text_slash_scr_text_gml_1891_0);
+L40120:;
+ goto L66496;
+L40124:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1900_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1901_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_1904_0);
+ MSG(1, scr_text_slash_scr_text_gml_1905_0);
+ txt_msg(c, 2, " ");
+ goto L66496;
+L40344:;
+ goto L40568; /* gml: if !(global.choice == 0) goto L40568 */
+ if (!(sv.gold >= 40)) goto L40528;
+ gm_itemget(12);
+ goto L40488; /* gml: if !(noroom == 0) goto L40488 */
+ sv.gold = (sv.gold - 40);
+ MSG(0, scr_text_slash_scr_text_gml_1918_0);
+ goto L40524;
+L40488:;
+ MSG(0, scr_text_slash_scr_text_gml_1922_0);
+L40524:;
+ goto L40564;
+L40528:;
+ MSG(0, scr_text_slash_scr_text_gml_1927_0);
+L40564:;
+ goto L40604;
+L40568:;
+ MSG(0, scr_text_slash_scr_text_gml_1932_0);
+L40604:;
+ goto L66496;
+L40608:;
+ CHOICE(0, scr_text_slash_scr_text_gml_1938_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_1939_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ c->fc = 5;
+ /* gml: global.typer = 32 */
+ c->fe = 2;
+ MSG(0, scr_text_slash_scr_text_gml_1945_0);
+ MSG(1, scr_text_slash_scr_text_gml_1946_0);
+ FACE(2, 'S', 2);
+ MSG(3, scr_text_slash_scr_text_gml_1948_0);
+ FACE(4, 'L', 3);
+ MSG(5, scr_text_slash_scr_text_gml_1950_0);
+ MSG(6, scr_text_slash_scr_text_gml_1951_0);
+ txt_msg(c, 7, " ");
+ goto L66496;
+L41028:;
+ goto L42100; /* gml: if !(global.choice == 0) goto L42100 */
+ if (!(sv.gold >= 40)) goto L41896;
+ gm_itemget(9);
+ goto L41416; /* gml: if !(noroom == 0) goto L41416 */
+ sv.gold = (sv.gold - 40);
+ c->fc = 1;
+ c->fe = 1;
+ /* gml: global.typer = 30 */
+ MSG(0, scr_text_slash_scr_text_gml_1968_0);
+ NOFACE(1);
+ MSG(2, scr_text_slash_scr_text_gml_1970_0);
+ FACE(3, 'S', 2);
+ MSG(4, scr_text_slash_scr_text_gml_1972_0);
+ FACE(5, 'L', 1);
+ MSG(6, scr_text_slash_scr_text_gml_1974_0);
+ /* gml: with (obj_lancerbakesale_event) { // to L41408 */
+ /* gml: con = 10 */
+ /* gml: } // end with */
+ goto L41892;
+L41416:;
+ sv.gold = (sv.gold - 40);
+ c->fc = 0;
+ c->fe = 0;
+ /* gml: global.typer = 6 */
+ MSG(0, scr_text_slash_scr_text_gml_1984_0);
+ MSG(1, scr_text_slash_scr_text_gml_1985_0);
+ FACE(2, 'L', 7);
+ MSG(3, scr_text_slash_scr_text_gml_1987_0);
+ FACE(4, 'S', 2);
+ MSG(5, scr_text_slash_scr_text_gml_1989_0);
+ FACE(6, 'L', 3);
+ MSG(7, scr_text_slash_scr_text_gml_1991_0);
+ FACE(8, 'S', 2);
+ MSG(9, scr_text_slash_scr_text_gml_1993_0);
+ FACE(10, 'L', 2);
+ MSG(11, scr_text_slash_scr_text_gml_1995_0);
+ /* gml: with (obj_lancerbakesale_event) { // to L41888 */
+ /* gml: con = 10 */
+ /* gml: } // end with */
+L41892:;
+ goto L42096;
+L41896:;
+ /* gml: global.typer = 32 */
+ c->fe = 6;
+ c->fc = 5;
+ MSG(0, scr_text_slash_scr_text_gml_2006_0);
+ FACE(1, 'S', 0);
+ MSG(2, scr_text_slash_scr_text_gml_2008_0);
+ FACE(3, 'L', 6);
+ MSG(4, scr_text_slash_scr_text_gml_2010_0);
+L42096:;
+ goto L42300;
+L42100:;
+ /* gml: global.typer = 32 */
+ c->fc = 5;
+ c->fe = 2;
+ MSG(0, scr_text_slash_scr_text_gml_2018_0);
+ FACE(1, 'S', 2);
+ MSG(2, scr_text_slash_scr_text_gml_2020_0);
+ FACE(3, 'R', 6);
+ MSG(4, scr_text_slash_scr_text_gml_2022_0);
+L42300:;
+ goto L66496;
+L42304:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2027_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2028_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_2029_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_2030_0);
+ c->fe = 2;
+ c->fc = 9;
+ MSG(0, scr_text_slash_scr_text_gml_2033_0);
+ MSG(1, scr_text_slash_scr_text_gml_2034_0);
+ MSG(2, scr_text_slash_scr_text_gml_2035_0);
+ MSG(3, scr_text_slash_scr_text_gml_2036_0);
+ MSG(4, scr_text_slash_scr_text_gml_2037_0);
+ MSG(5, scr_text_slash_scr_text_gml_2038_0);
+ MSG(6, scr_text_slash_scr_text_gml_2039_0);
+ MSG(7, scr_text_slash_scr_text_gml_2040_0);
+ if (!(sv.flag[270] >= 1)) goto L42872;
+ c->fe = 1;
+ MSG(0, scr_text_slash_scr_text_gml_2044_0);
+ MSG(1, scr_text_slash_scr_text_gml_2045_0);
+L42872:;
+ sv.flag[270] = 1;
+ goto L66496;
+L42896:;
+ goto L43096; /* gml: if !(global.choice == 0) goto L43096 */
+ MSG(0, scr_text_slash_scr_text_gml_2053_0);
+ MSG(1, scr_text_slash_scr_text_gml_2054_0);
+ MSG(2, scr_text_slash_scr_text_gml_2055_0);
+ MSG(3, scr_text_slash_scr_text_gml_2056_0);
+ MSG(4, scr_text_slash_scr_text_gml_2057_0);
+L43096:;
+ goto L43260; /* gml: if !(global.choice == 1) goto L43260 */
+ MSG(0, scr_text_slash_scr_text_gml_2061_0);
+ MSG(1, scr_text_slash_scr_text_gml_2062_0);
+ MSG(2, scr_text_slash_scr_text_gml_2063_0);
+ MSG(3, scr_text_slash_scr_text_gml_2064_0);
+L43260:;
+ goto L43424; /* gml: if !(global.choice == 2) goto L43424 */
+ MSG(0, scr_text_slash_scr_text_gml_2068_0);
+ MSG(1, scr_text_slash_scr_text_gml_2069_0);
+ MSG(2, scr_text_slash_scr_text_gml_2070_0);
+ MSG(3, scr_text_slash_scr_text_gml_2071_0);
+L43424:;
+ goto L43552; /* gml: if !(global.choice == 3) goto L43552 */
+ MSG(0, scr_text_slash_scr_text_gml_2075_0);
+ MSG(1, scr_text_slash_scr_text_gml_2076_0);
+ MSG(2, scr_text_slash_scr_text_gml_2077_0);
+L43552:;
+ goto L66496;
+L43556:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2082_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2083_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_2084_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_2085_0);
+ c->fe = 0;
+ c->fc = 19;
+ MSG(0, scr_text_slash_scr_text_gml_2088_0);
+ MSG(1, scr_text_slash_scr_text_gml_2089_0);
+ MSG(2, scr_text_slash_scr_text_gml_2090_0);
+ if (!(sv.flag[271] > 1)) goto L43932;
+ MSG(0, scr_text_slash_scr_text_gml_2093_0);
+ MSG(1, scr_text_slash_scr_text_gml_2094_0);
+L43932:;
+ sv.flag[271] = 2;
+ goto L66496;
+L43956:;
+ goto L44300; /* gml: if !(global.choice == 0) goto L44300 */
+ MSG(0, scr_text_slash_scr_text_gml_2102_0);
+ MSG(1, scr_text_slash_scr_text_gml_2103_0);
+ MSG(2, scr_text_slash_scr_text_gml_2104_0);
+ MSG(3, scr_text_slash_scr_text_gml_2105_0);
+ MSG(4, scr_text_slash_scr_text_gml_2106_0);
+ MSG(5, scr_text_slash_scr_text_gml_2107_0);
+ MSG(6, scr_text_slash_scr_text_gml_2108_0);
+ MSG(7, scr_text_slash_scr_text_gml_2109_0);
+ MSG(8, scr_text_slash_scr_text_gml_2110_0);
+L44300:;
+ goto L44644; /* gml: if !(global.choice == 1) goto L44644 */
+ MSG(0, scr_text_slash_scr_text_gml_2114_0);
+ MSG(1, scr_text_slash_scr_text_gml_2115_0);
+ MSG(2, scr_text_slash_scr_text_gml_2116_0);
+ MSG(3, scr_text_slash_scr_text_gml_2117_0);
+ MSG(4, scr_text_slash_scr_text_gml_2118_0);
+ MSG(5, scr_text_slash_scr_text_gml_2119_0);
+ MSG(6, scr_text_slash_scr_text_gml_2120_0);
+ MSG(7, scr_text_slash_scr_text_gml_2121_0);
+ MSG(8, scr_text_slash_scr_text_gml_2122_0);
+L44644:;
+ goto L44988; /* gml: if !(global.choice == 2) goto L44988 */
+ MSG(0, scr_text_slash_scr_text_gml_2127_0);
+ MSG(1, scr_text_slash_scr_text_gml_2128_0);
+ MSG(2, scr_text_slash_scr_text_gml_2129_0);
+ MSG(3, scr_text_slash_scr_text_gml_2130_0);
+ MSG(4, scr_text_slash_scr_text_gml_2131_0);
+ MSG(5, scr_text_slash_scr_text_gml_2132_0);
+ MSG(6, scr_text_slash_scr_text_gml_2133_0);
+ MSG(7, scr_text_slash_scr_text_gml_2134_0);
+ MSG(8, scr_text_slash_scr_text_gml_2135_0);
+L44988:;
+ goto L45080; /* gml: if !(global.choice == 3) goto L45080 */
+ MSG(0, scr_text_slash_scr_text_gml_2140_0);
+ MSG(1, scr_text_slash_scr_text_gml_2141_0);
+L45080:;
+ goto L66496;
+L45084:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2146_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2147_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2150_0);
+ MSG(1, scr_text_slash_scr_text_gml_2151_0);
+ MSG(2, scr_text_slash_scr_text_gml_2152_0);
+ MSG(3, scr_text_slash_scr_text_gml_2153_0);
+ goto L66496;
+L45352:;
+ goto L45556; /* gml: if !(global.choice == 0) goto L45556 */
+ MSG(0, scr_text_slash_scr_text_gml_2159_0);
+ MSG(1, scr_text_slash_scr_text_gml_2160_0);
+ MSG(2, scr_text_slash_scr_text_gml_2161_0);
+ MSG(3, scr_text_slash_scr_text_gml_2162_0);
+ MSG(4, scr_text_slash_scr_text_gml_2163_0);
+ goto L45628;
+L45556:;
+ MSG(0, scr_text_slash_scr_text_gml_2167_0);
+ MSG(1, scr_text_slash_scr_text_gml_2168_0);
+L45628:;
+ goto L66496;
+L45632:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2173_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2174_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2177_0);
+ MSG(1, scr_text_slash_scr_text_gml_2178_0);
+ goto L66496;
+L45828:;
+ goto L45888; /* gml: if !(global.choice == 0) goto L45888 */
+ MSG(0, scr_text_slash_scr_text_gml_2184_0);
+ goto L45924;
+L45888:;
+ MSG(0, scr_text_slash_scr_text_gml_2188_0);
+L45924:;
+ goto L66496;
+L45928:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2193_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2194_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2197_0);
+ MSG(1, scr_text_slash_scr_text_gml_2198_0);
+ txt_msg(c, 2, " ");
+ if (!(sv.plot >= 50)) goto L46200;
+ MSG(1, scr_text_slash_scr_text_gml_2202_0);
+L46200:;
+ goto L66496;
+L46204:;
+ goto L46276; /* gml: if !(global.choice == 0) goto L46276 */
+ txt_msg(c, 0, "%%");
+ /* gml: with (obj_town_event) { // to L46268 */
+ /* gml: con = 60 */
+ /* gml: } // end with */
+ goto L46312;
+L46276:;
+ MSG(0, scr_text_slash_scr_text_gml_2218_0);
+L46312:;
+ goto L66496;
+L46316:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2223_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2224_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2227_0);
+ MSG(1, scr_text_slash_scr_text_gml_2228_0);
+ MSG(2, scr_text_slash_scr_text_gml_2229_0);
+ MSG(3, scr_text_slash_scr_text_gml_2230_0);
+ goto L66496;
+L46584:;
+ goto L46688; /* gml: if !(global.choice == 0) goto L46688 */
+ /* gml: with (obj_npc_room) { // to L46624 */
+ tempvar = 1;
+ /* gml: } // end with */
+ /* gml: snd_play(21) */
+ MSG(0, scr_text_slash_scr_text_gml_2238_0);
+ goto L46724;
+L46688:;
+ MSG(0, scr_text_slash_scr_text_gml_2242_0);
+L46724:;
+ goto L66496;
+L46728:;
+ MSG(0, scr_text_slash_scr_text_gml_2247_0);
+ FACE(1, 'T', 8);
+ MSG(2, scr_text_slash_scr_text_gml_2249_0);
+ MSG(3, scr_text_slash_scr_text_gml_2250_0);
+ MSG(4, scr_text_slash_scr_text_gml_2251_0);
+ MSG(5, scr_text_slash_scr_text_gml_2252_0);
+ MSG(6, scr_text_slash_scr_text_gml_2253_0);
+ MSG(7, scr_text_slash_scr_text_gml_2254_0);
+ MSG(8, scr_text_slash_scr_text_gml_2255_0);
+ MSG(9, scr_text_slash_scr_text_gml_2256_0);
+ MSG(10, scr_text_slash_scr_text_gml_2257_0);
+ MSG(11, scr_text_slash_scr_text_gml_2258_0);
+ MSG(12, scr_text_slash_scr_text_gml_2259_0);
+ MSG(13, scr_text_slash_scr_text_gml_2260_0);
+ MSG(14, scr_text_slash_scr_text_gml_2261_0);
+ MSG(15, scr_text_slash_scr_text_gml_2262_0);
+ MSG(16, scr_text_slash_scr_text_gml_2263_0);
+ MSG(17, scr_text_slash_scr_text_gml_2264_0);
+ NOFACE(18);
+ MSG(19, scr_text_slash_scr_text_gml_2266_0);
+ goto L66496;
+L47428:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2270_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2271_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2274_0);
+ MSG(1, scr_text_slash_scr_text_gml_2275_0);
+ MSG(2, scr_text_slash_scr_text_gml_2276_0);
+ goto L66496;
+L47660:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2280_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2281_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_2282_0);
+ c->choicemsg[3] = " ";
+ goto L47992; /* gml: if !(global.choice == 0) goto L47992 */
+ MSG(0, scr_text_slash_scr_text_gml_2286_0);
+ MSG(1, scr_text_slash_scr_text_gml_2287_0);
+ MSG(2, scr_text_slash_scr_text_gml_2288_0);
+ MSG(3, scr_text_slash_scr_text_gml_2289_0);
+ MSG(4, scr_text_slash_scr_text_gml_2290_0);
+L47992:;
+ goto L48156; /* gml: if !(global.choice == 1) goto L48156 */
+ MSG(0, scr_text_slash_scr_text_gml_2294_0);
+ MSG(1, scr_text_slash_scr_text_gml_2295_0);
+ MSG(2, scr_text_slash_scr_text_gml_2296_0);
+ MSG(3, scr_text_slash_scr_text_gml_2297_0);
+L48156:;
+ if (!(sv.flag[273] >= 1)) goto L48268;
+ c->fe = 5;
+ MSG(0, scr_text_slash_scr_text_gml_2303_0);
+ MSG(1, scr_text_slash_scr_text_gml_2304_0);
+L48268:;
+ if (!(sv.flag[273] < 1)) goto L48316;
+ sv.flag[273] = 1;
+L48316:;
+ goto L66496;
+L48320:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2310_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2311_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_2312_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_2313_0);
+ goto L48628; /* gml: if !(global.choice == 0) goto L48628 */
+ MSG(0, scr_text_slash_scr_text_gml_2317_0);
+ MSG(1, scr_text_slash_scr_text_gml_2318_0);
+ MSG(2, scr_text_slash_scr_text_gml_2319_0);
+ MSG(3, scr_text_slash_scr_text_gml_2320_0);
+L48628:;
+ goto L48756; /* gml: if !(global.choice == 1) goto L48756 */
+ MSG(0, scr_text_slash_scr_text_gml_2324_0);
+ MSG(1, scr_text_slash_scr_text_gml_2325_0);
+ MSG(2, scr_text_slash_scr_text_gml_2326_0);
+L48756:;
+ goto L48884; /* gml: if !(global.choice == 2) goto L48884 */
+ MSG(0, scr_text_slash_scr_text_gml_2332_0);
+ MSG(1, scr_text_slash_scr_text_gml_2333_0);
+ MSG(2, scr_text_slash_scr_text_gml_2334_0);
+L48884:;
+ goto L66496;
+L48888:;
+ goto L49484; /* gml: if !(global.choice == 0) goto L49484 */
+ MSG(0, scr_text_slash_scr_text_gml_2341_0);
+ if (!(sv.flag[274] == 2)) goto L49044;
+ MSG(0, scr_text_slash_scr_text_gml_2344_0);
+ MSG(1, scr_text_slash_scr_text_gml_2345_0);
+L49044:;
+ if (!(sv.flag[274] == 1)) goto L49108;
+ MSG(0, scr_text_slash_scr_text_gml_2350_0);
+L49108:;
+ if (!(sv.flag[274] == 0)) goto L49484;
+ MSG(0, scr_text_slash_scr_text_gml_2355_0);
+ MSG(1, scr_text_slash_scr_text_gml_2356_0);
+ MSG(2, scr_text_slash_scr_text_gml_2357_0);
+ MSG(3, scr_text_slash_scr_text_gml_2358_0);
+ MSG(4, scr_text_slash_scr_text_gml_2359_0);
+ MSG(5, scr_text_slash_scr_text_gml_2360_0);
+ MSG(6, scr_text_slash_scr_text_gml_2361_0);
+ NOFACE(7);
+ MSG(8, scr_text_slash_scr_text_gml_2363_0);
+ sv.flag[274] = 1;
+ /* gml: scr_phoneadd(202) */
+L49484:;
+ goto L49720; /* gml: if !(global.choice == 1) goto L49720 */
+ MSG(0, scr_text_slash_scr_text_gml_2371_0);
+ MSG(1, scr_text_slash_scr_text_gml_2372_0);
+ MSG(2, scr_text_slash_scr_text_gml_2373_0);
+ MSG(3, scr_text_slash_scr_text_gml_2374_0);
+ MSG(4, scr_text_slash_scr_text_gml_2375_0);
+ MSG(5, scr_text_slash_scr_text_gml_2376_0);
+L49720:;
+ goto L50064; /* gml: if !(global.choice == 2) goto L50064 */
+ MSG(0, scr_text_slash_scr_text_gml_2380_0);
+ MSG(1, scr_text_slash_scr_text_gml_2381_0);
+ MSG(2, scr_text_slash_scr_text_gml_2382_0);
+ MSG(3, scr_text_slash_scr_text_gml_2383_0);
+ MSG(4, scr_text_slash_scr_text_gml_2384_0);
+ MSG(5, scr_text_slash_scr_text_gml_2385_0);
+ MSG(6, scr_text_slash_scr_text_gml_2386_0);
+ MSG(7, scr_text_slash_scr_text_gml_2387_0);
+ MSG(8, scr_text_slash_scr_text_gml_2388_0);
+L50064:;
+ goto L50120; /* gml: if !(global.choice == 3) goto L50120 */
+ MSG(0, scr_text_slash_scr_text_gml_2392_0);
+L50120:;
+ goto L66496;
+L50124:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2397_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2398_0);
+ c->choicemsg[2] = "3";
+ c->choicemsg[3] = "4";
+ /* gml: snd_play(27) */
+ MSG(0, scr_text_slash_scr_text_gml_2402_0);
+ MSG(1, scr_text_slash_scr_text_gml_2403_0);
+ MSG(2, scr_text_slash_scr_text_gml_2404_0);
+ MSG(3, scr_text_slash_scr_text_gml_2405_0);
+ MSG(4, scr_text_slash_scr_text_gml_2406_0);
+ if (!(sv.flag[274] == 2)) goto L50544;
+ MSG(0, scr_text_slash_scr_text_gml_2409_0);
+ MSG(1, scr_text_slash_scr_text_gml_2410_0);
+L50544:;
+ goto L66496;
+L50548:;
+ if (!(sv.flag[274] == 1)) goto L50596;
+ sv.flag[274] = 2;
+L50596:;
+ /* gml: scr_phonename() */
+ MSG(0, scr_text_slash_scr_text_gml_2417_0);
+ goto L50720; /* gml: if !(global.choice == 0) goto L50720 */
+ MSG(0, scr_text_slash_scr_text_gml_2418_0);
+ sv.flag[275] = 1;
+L50720:;
+ goto L50796; /* gml: if !(global.choice == 1) goto L50796 */
+ MSG(0, scr_text_slash_scr_text_gml_2419_0);
+ sv.flag[275] = 2;
+L50796:;
+ goto L50872; /* gml: if !(global.choice == 2) goto L50872 */
+ MSG(0, scr_text_slash_scr_text_gml_2420_0);
+ sv.flag[275] = 3;
+L50872:;
+ MSG(1, scr_text_slash_scr_text_gml_2421_0);
+ MSG(2, scr_text_slash_scr_text_gml_2422_0);
+ MSG(3, scr_text_slash_scr_text_gml_2423_0);
+ MSG(4, scr_text_slash_scr_text_gml_2424_0);
+ goto L51108; /* gml: if !(global.choice == 3) goto L51108 */
+ MSG(0, scr_text_slash_scr_text_gml_2427_0);
+ MSG(1, scr_text_slash_scr_text_gml_2428_0);
+L51108:;
+ goto L66496;
+L51112:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2434_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2435_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2438_0);
+ MSG(1, scr_text_slash_scr_text_gml_2439_0);
+ MSG(2, scr_text_slash_scr_text_gml_2440_0);
+ MSG(3, scr_text_slash_scr_text_gml_2441_0);
+ MSG(4, scr_text_slash_scr_text_gml_2442_0);
+ MSG(5, scr_text_slash_scr_text_gml_2443_0);
+ goto L66496;
+L51452:;
+ goto L52032; /* gml: if !(global.choice == 0) goto L52032 */
+ if (!(sv.flag[33] < 40)) goto L51608;
+ MSG(0, scr_text_slash_scr_text_gml_2451_0);
+ MSG(1, scr_text_slash_scr_text_gml_2452_0);
+ MSG(2, scr_text_slash_scr_text_gml_2453_0);
+L51608:;
+ if (!(sv.flag[33] >= 40)) goto L51744;
+ MSG(0, scr_text_slash_scr_text_gml_2458_0);
+ MSG(1, scr_text_slash_scr_text_gml_2459_0);
+ MSG(2, scr_text_slash_scr_text_gml_2460_0);
+L51744:;
+ MSG(3, scr_text_slash_scr_text_gml_2463_0);
+ MSG(4, scr_text_slash_scr_text_gml_2464_0);
+ MSG(5, scr_text_slash_scr_text_gml_2465_0);
+ MSG(6, scr_text_slash_scr_text_gml_2466_0);
+ MSG(7, scr_text_slash_scr_text_gml_2467_0);
+ MSG(8, scr_text_slash_scr_text_gml_2468_0);
+ MSG(9, scr_text_slash_scr_text_gml_2469_0);
+ MSG(10, scr_text_slash_scr_text_gml_2470_0);
+L52032:;
+ goto L52432; /* gml: if !(global.choice == 1) goto L52432 */
+ if (!(sv.flag[33] < 40)) goto L52116;
+ MSG(0, scr_text_slash_scr_text_gml_2478_0);
+L52116:;
+ if (!(sv.flag[33] >= 40)) goto L52180;
+ MSG(0, scr_text_slash_scr_text_gml_2483_0);
+L52180:;
+ MSG(1, scr_text_slash_scr_text_gml_2485_0);
+ MSG(2, scr_text_slash_scr_text_gml_2486_0);
+ MSG(3, scr_text_slash_scr_text_gml_2487_0);
+ MSG(4, scr_text_slash_scr_text_gml_2488_0);
+ MSG(5, scr_text_slash_scr_text_gml_2489_0);
+ MSG(6, scr_text_slash_scr_text_gml_2490_0);
+ MSG(7, scr_text_slash_scr_text_gml_2491_0);
+L52432:;
+ goto L66496;
+L52436:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2498_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2499_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_2500_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_2501_0);
+ MSG(0, scr_text_slash_scr_text_gml_2502_0);
+ MSG(1, scr_text_slash_scr_text_gml_2503_0);
+ MSG(2, scr_text_slash_scr_text_gml_2504_0);
+ MSG(3, scr_text_slash_scr_text_gml_2505_0);
+ MSG(4, scr_text_slash_scr_text_gml_2506_0);
+ MSG(5, scr_text_slash_scr_text_gml_2507_0);
+ MSG(6, scr_text_slash_scr_text_gml_2508_0);
+ MSG(7, scr_text_slash_scr_text_gml_2509_0);
+ MSG(8, scr_text_slash_scr_text_gml_2510_0);
+ MSG(9, scr_text_slash_scr_text_gml_2511_0);
+ MSG(10, scr_text_slash_scr_text_gml_2512_0);
+ MSG(11, scr_text_slash_scr_text_gml_2513_0);
+ MSG(12, scr_text_slash_scr_text_gml_2514_0);
+ if (!(sv.flag[276] >= 1)) goto L53148;
+ MSG(0, scr_text_slash_scr_text_gml_2517_0);
+ MSG(1, scr_text_slash_scr_text_gml_2518_0);
+L53148:;
+ if (!(sv.flag[276] == 0)) goto L53196;
+ sv.flag[276] = 1;
+L53196:;
+ goto L66496;
+L53200:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2524_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2525_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_2526_0);
+ CHOICE(3, scr_text_slash_scr_text_gml_2527_0);
+ goto L53872; /* gml: if !(global.choice == 0) goto L53872 */
+ MSG(0, scr_text_slash_scr_text_gml_2530_0);
+ MSG(1, scr_text_slash_scr_text_gml_2531_0);
+ MSG(2, scr_text_slash_scr_text_gml_2532_0);
+ MSG(3, scr_text_slash_scr_text_gml_2533_0);
+ MSG(4, scr_text_slash_scr_text_gml_2534_0);
+ MSG(5, scr_text_slash_scr_text_gml_2535_0);
+ MSG(6, scr_text_slash_scr_text_gml_2536_0);
+ MSG(7, scr_text_slash_scr_text_gml_2537_0);
+ MSG(8, scr_text_slash_scr_text_gml_2538_0);
+ if (!(sv.flag[276] >= 2)) goto L53824;
+ MSG(0, scr_text_slash_scr_text_gml_2542_0);
+ MSG(1, scr_text_slash_scr_text_gml_2543_0);
+ MSG(2, scr_text_slash_scr_text_gml_2544_0);
+L53824:;
+ if (!(sv.flag[276] < 2)) goto L53872;
+ sv.flag[276] = 2;
+L53872:;
+ goto L54036; /* gml: if !(global.choice == 1) goto L54036 */
+ MSG(0, scr_text_slash_scr_text_gml_2552_0);
+ MSG(1, scr_text_slash_scr_text_gml_2553_0);
+ MSG(2, scr_text_slash_scr_text_gml_2554_0);
+ MSG(3, scr_text_slash_scr_text_gml_2555_0);
+L54036:;
+ goto L54344; /* gml: if !(global.choice == 2) goto L54344 */
+ MSG(0, scr_text_slash_scr_text_gml_2559_0);
+ MSG(1, scr_text_slash_scr_text_gml_2560_0);
+ MSG(2, scr_text_slash_scr_text_gml_2561_0);
+ MSG(3, scr_text_slash_scr_text_gml_2562_0);
+ MSG(4, scr_text_slash_scr_text_gml_2563_0);
+ MSG(5, scr_text_slash_scr_text_gml_2564_0);
+ MSG(6, scr_text_slash_scr_text_gml_2565_0);
+ MSG(7, scr_text_slash_scr_text_gml_2566_0);
+L54344:;
+ goto L54400; /* gml: if !(global.choice == 3) goto L54400 */
+ MSG(0, scr_text_slash_scr_text_gml_2570_0);
+L54400:;
+ goto L66496;
+L54404:;
+ goto L54748; /* gml: if !(global.choice == 0) goto L54748 */
+ MSG(0, scr_text_slash_scr_text_gml_2583_0);
+ MSG(1, scr_text_slash_scr_text_gml_2584_0);
+ MSG(2, scr_text_slash_scr_text_gml_2585_0);
+ MSG(3, scr_text_slash_scr_text_gml_2586_0);
+ MSG(4, scr_text_slash_scr_text_gml_2587_0);
+ MSG(5, scr_text_slash_scr_text_gml_2588_0);
+ MSG(6, scr_text_slash_scr_text_gml_2589_0);
+ MSG(7, scr_text_slash_scr_text_gml_2590_0);
+ MSG(8, scr_text_slash_scr_text_gml_2591_0);
+L54748:;
+ goto L55164; /* gml: if !(global.choice == 1) goto L55164 */
+ MSG(0, scr_text_slash_scr_text_gml_2595_0);
+ MSG(1, scr_text_slash_scr_text_gml_2596_0);
+ MSG(2, scr_text_slash_scr_text_gml_2597_0);
+ MSG(3, scr_text_slash_scr_text_gml_2598_0);
+ MSG(4, scr_text_slash_scr_text_gml_2599_0);
+ MSG(5, scr_text_slash_scr_text_gml_2600_0);
+ MSG(6, scr_text_slash_scr_text_gml_2601_0);
+ MSG(7, scr_text_slash_scr_text_gml_2602_0);
+ MSG(8, scr_text_slash_scr_text_gml_2603_0);
+ MSG(9, scr_text_slash_scr_text_gml_2604_0);
+ MSG(10, scr_text_slash_scr_text_gml_2605_0);
+L55164:;
+ goto L55544; /* gml: if !(global.choice == 2) goto L55544 */
+ MSG(0, scr_text_slash_scr_text_gml_2609_0);
+ MSG(1, scr_text_slash_scr_text_gml_2610_0);
+ MSG(2, scr_text_slash_scr_text_gml_2611_0);
+ MSG(3, scr_text_slash_scr_text_gml_2612_0);
+ MSG(4, scr_text_slash_scr_text_gml_2613_0);
+ MSG(5, scr_text_slash_scr_text_gml_2614_0);
+ MSG(6, scr_text_slash_scr_text_gml_2615_0);
+ MSG(7, scr_text_slash_scr_text_gml_2616_0);
+ MSG(8, scr_text_slash_scr_text_gml_2617_0);
+ MSG(9, scr_text_slash_scr_text_gml_2618_0);
+L55544:;
+ goto L55852; /* gml: if !(global.choice == 3) goto L55852 */
+ MSG(0, scr_text_slash_scr_text_gml_2622_0);
+ MSG(1, scr_text_slash_scr_text_gml_2623_0);
+ MSG(2, scr_text_slash_scr_text_gml_2624_0);
+ MSG(3, scr_text_slash_scr_text_gml_2625_0);
+ MSG(4, scr_text_slash_scr_text_gml_2626_0);
+ MSG(5, scr_text_slash_scr_text_gml_2627_0);
+ MSG(6, scr_text_slash_scr_text_gml_2628_0);
+ MSG(7, scr_text_slash_scr_text_gml_2629_0);
+L55852:;
+ goto L66496;
+L55856:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2635_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2636_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2639_0);
+ MSG(1, scr_text_slash_scr_text_gml_2640_0);
+ MSG(2, scr_text_slash_scr_text_gml_2641_0);
+ goto L66496;
+L56088:;
+ goto L56168; /* gml: if !(global.choice == 0) goto L56168 */
+ /* gml: with (obj_krisroom) { // to L56128 */
+ /* gml: con = 50 */
+ /* gml: } // end with */
+ MSG(0, scr_text_slash_scr_text_gml_2648_0);
+L56168:;
+ goto L56224; /* gml: if !(global.choice == 1) goto L56224 */
+ MSG(0, scr_text_slash_scr_text_gml_2652_0);
+L56224:;
+ goto L66496;
+L56228:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2657_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2658_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2661_0);
+ MSG(1, scr_text_slash_scr_text_gml_2662_0);
+ MSG(2, scr_text_slash_scr_text_gml_2663_0);
+ MSG(3, scr_text_slash_scr_text_gml_2664_0);
+ goto L66496;
+L56496:;
+ goto L56696; /* gml: if !(global.choice == 0) goto L56696 */
+ CHOICE(0, scr_text_slash_scr_text_gml_2670_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2671_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ /* gml: with (obj_krisroom) { // to L56656 */
+ /* gml: con = 100 */
+ /* gml: } // end with */
+ MSG(0, scr_text_slash_scr_text_gml_2676_0);
+L56696:;
+ goto L56752; /* gml: if !(global.choice == 1) goto L56752 */
+ MSG(0, scr_text_slash_scr_text_gml_2680_0);
+L56752:;
+ goto L66496;
+L56756:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2685_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2686_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2689_0);
+ MSG(1, scr_text_slash_scr_text_gml_2690_0);
+ MSG(2, scr_text_slash_scr_text_gml_2691_0);
+ MSG(3, scr_text_slash_scr_text_gml_2692_0);
+ FACE(4, 'R', 0);
+ MSG(5, scr_text_slash_scr_text_gml_2694_0);
+ FACE(6, 'S', 2);
+ MSG(7, scr_text_slash_scr_text_gml_2696_0);
+ NOFACE(8);
+ MSG(9, scr_text_slash_scr_text_gml_2698_0);
+ MSG(10, scr_text_slash_scr_text_gml_2699_0);
+ MSG(11, scr_text_slash_scr_text_gml_2700_0);
+ MSG(12, scr_text_slash_scr_text_gml_2701_0);
+ MSG(13, scr_text_slash_scr_text_gml_2702_0);
+ MSG(14, scr_text_slash_scr_text_gml_2703_0);
+ FACE(15, 'R', 8);
+ MSG(16, scr_text_slash_scr_text_gml_2705_0);
+ NOFACE(17);
+ MSG(18, scr_text_slash_scr_text_gml_2707_0);
+ FACE(19, 'S', 2);
+ MSG(20, scr_text_slash_scr_text_gml_2709_0);
+ NOFACE(21);
+ MSG(22, scr_text_slash_scr_text_gml_2711_0);
+ MSG(23, scr_text_slash_scr_text_gml_2712_0);
+ MSG(24, scr_text_slash_scr_text_gml_2713_0);
+ MSG(25, scr_text_slash_scr_text_gml_2714_0);
+ if (!(sv.flag[241] == 1)) goto L57832;
+ MSG(0, scr_text_slash_scr_text_gml_2718_0);
+ MSG(1, scr_text_slash_scr_text_gml_2719_0);
+L57832:;
+ goto L66496;
+L57836:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2724_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2725_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ if (!(sv.flag[241] == 0)) goto L58004;
+ sv.flag[241] = 1;
+L58004:;
+ goto L58120; /* gml: if !(global.choice == 0) goto L58120 */
+ MSG(0, scr_text_slash_scr_text_gml_2731_0);
+ MSG(1, scr_text_slash_scr_text_gml_2732_0);
+ /* gml: with (obj_event_room) { // to L58116 */
+ /* gml: con = 20 */
+ /* gml: } // end with */
+L58120:;
+ goto L58236; /* gml: if !(global.choice == 1) goto L58236 */
+ MSG(0, scr_text_slash_scr_text_gml_2737_0);
+ MSG(1, scr_text_slash_scr_text_gml_2738_0);
+ /* gml: with (obj_event_room) { // to L58232 */
+ /* gml: con = 20 */
+ /* gml: } // end with */
+L58236:;
+ goto L66496;
+L58240:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2744_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2745_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2748_0);
+ MSG(1, scr_text_slash_scr_text_gml_2749_0);
+ MSG(2, scr_text_slash_scr_text_gml_2750_0);
+ MSG(3, scr_text_slash_scr_text_gml_2751_0);
+ txt_msg(c, 4, " ");
+ goto L66496;
+L58532:;
+ if (!(sv.flag[241] < 5)) goto L58580;
+ sv.flag[241] = 5;
+L58580:;
+ gm_keyitemremove(4);
+ gm_keyitemremove(5);
+ gm_keyitemremove(6);
+ gm_keyitemremove(7);
+ goto L58760; /* gml: if !(global.choice == 0) goto L58760 */
+ NOFACE(0);
+ MSG(1, scr_text_slash_scr_text_gml_2765_0);
+ /* gml: with (obj_event_room) { // to L58756 */
+ /* gml: con = 5 */
+ /* gml: } // end with */
+L58760:;
+ goto L58840; /* gml: if !(global.choice == 1) goto L58840 */
+ MSG(0, scr_text_slash_scr_text_gml_2770_0);
+ /* gml: with (obj_event_room) { // to L58836 */
+ /* gml: con = 5 */
+ /* gml: } // end with */
+L58840:;
+ goto L66496;
+L58844:;
+ MSG(0, scr_text_slash_scr_text_gml_2776_0);
+ goto L66496;
+L58884:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2780_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2781_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2784_0);
+ MSG(1, scr_text_slash_scr_text_gml_2785_0);
+ goto L66496;
+L59080:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2789_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2790_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2793_0);
+ MSG(1, scr_text_slash_scr_text_gml_2794_0);
+ MSG(2, scr_text_slash_scr_text_gml_2795_0);
+ goto L66496;
+L59312:;
+ goto L59784; /* gml: if !(global.choice == 0) goto L59784 */
+ FACE(0, 'R', 6);
+ MSG(1, scr_text_slash_scr_text_gml_2806_0);
+ MSG(2, scr_text_slash_scr_text_gml_2807_0);
+ NOFACE(3);
+ MSG(4, scr_text_slash_scr_text_gml_2809_0);
+ MSG(5, scr_text_slash_scr_text_gml_2810_0);
+ sv.flag[43] = (sv.flag[43] - sv.flag[523]);
+ if (!(sv.flag[43] < 0)) goto L59624;
+ sv.flag[43] = 0;
+L59624:;
+ /* gml: normal_kills = (global.flag[520] - global.flag[523]) */
+ /* gml: global.flag[40] = (global.flag[40] - normal_kills) */
+ if (!(sv.flag[40] < 0)) goto L59760;
+ sv.flag[40] = 0;
+L59760:;
+ sv.flag[243] = 1;
+ goto L60164;
+L59784:;
+ FACE(0, 'S', 1);
+ MSG(1, scr_text_slash_scr_text_gml_2822_0);
+ MSG(2, scr_text_slash_scr_text_gml_2823_0);
+ NOFACE(3);
+ MSG(4, scr_text_slash_scr_text_gml_2825_0);
+ MSG(5, scr_text_slash_scr_text_gml_2826_0);
+ gm_itemget(13);
+ goto L60144; /* gml: if !(noroom == 1) goto L60144 */
+ FACE(5, 'R', 6);
+ MSG(6, scr_text_slash_scr_text_gml_2831_0);
+ FACE(7, 'S', 2);
+ MSG(8, scr_text_slash_scr_text_gml_2833_0);
+L60144:;
+ sv.flag[243] = 2;
+L60164:;
+ goto L66496;
+L60168:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2840_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2841_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2844_0);
+ MSG(1, scr_text_slash_scr_text_gml_2845_0);
+ goto L66496;
+L60364:;
+ goto L60480; /* gml: if !(global.choice == 0) goto L60480 */
+ /* gml: snd_play(15) */
+ MSG(0, scr_text_slash_scr_text_gml_2852_0);
+ MSG(1, scr_text_slash_scr_text_gml_2853_0);
+ goto L60516;
+L60480:;
+ MSG(0, scr_text_slash_scr_text_gml_2857_0);
+L60516:;
+ goto L66496;
+L60520:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2862_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2863_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_2864_0);
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2866_0);
+ MSG(1, scr_text_slash_scr_text_gml_2867_0);
+ goto L66496;
+L60728:;
+ txt_msg(c, 0, "%%");
+ goto L60956; /* gml: if !(global.choice == 0) goto L60956 */
+ if (!(sv.flag[239] != 0)) goto L60920;
+ /* gml: with (obj_elevatorcontroller) { // to L60912 */
+ if (!(sv.flag[239] == 1)) goto L60876;
+ /* gml: dir = -1 */
+ /* gml: newcno = 0 */
+ /* gml: con = 100 */
+ goto L60912;
+L60876:;
+ /* gml: dir = 1 */
+ /* gml: newcno = 0 */
+ /* gml: con = 100 */
+L60912:;
+ /* gml: } // end with */
+ goto L60956;
+L60920:;
+ MSG(0, scr_text_slash_scr_text_gml_2892_0);
+L60956:;
+ goto L61092; /* gml: if !(global.choice == 1) goto L61092 */
+ if (!(sv.flag[239] != 1)) goto L61056;
+ /* gml: with (obj_elevatorcontroller) { // to L61048 */
+ /* gml: dir = 1 */
+ /* gml: newcno = 1 */
+ /* gml: con = 100 */
+ /* gml: } // end with */
+ goto L61092;
+L61056:;
+ MSG(0, scr_text_slash_scr_text_gml_2908_0);
+L61092:;
+ goto L61228; /* gml: if !(global.choice == 2) goto L61228 */
+ if (!(sv.flag[239] != 3)) goto L61192;
+ /* gml: with (obj_elevatorcontroller) { // to L61184 */
+ /* gml: dir = -1 */
+ /* gml: newcno = 3 */
+ /* gml: con = 100 */
+ /* gml: } // end with */
+ goto L61228;
+L61192:;
+ MSG(0, scr_text_slash_scr_text_gml_2924_0);
+L61228:;
+ goto L66496;
+L61232:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2933_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2934_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_2937_0);
+ MSG(1, scr_text_slash_scr_text_gml_2938_0);
+ goto L66496;
+L61428:;
+ txt_msg(c, 0, "%%");
+ goto L61588; /* gml: if !(global.choice == 0) goto L61588 */
+ /* gml: with (obj_elevatorcontroller) { // to L61584 */
+ if (!(sv.flag[239] == 1)) goto L61548;
+ /* gml: dir = 1 */
+ /* gml: newcno = 2 */
+ /* gml: con = 100 */
+ goto L61584;
+L61548:;
+ /* gml: dir = -1 */
+ /* gml: newcno = 1 */
+ /* gml: con = 100 */
+L61584:;
+ /* gml: } // end with */
+L61588:;
+ goto L66496;
+L61592:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2965_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2966_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ /* gml: global.typer = 30 */
+ c->fc = 1;
+ c->fe = 0;
+ MSG(0, scr_text_slash_scr_text_gml_2972_0);
+ MSG(1, scr_text_slash_scr_text_gml_2973_0);
+ MSG(2, scr_text_slash_scr_text_gml_2974_0);
+ MSG(3, scr_text_slash_scr_text_gml_2975_0);
+ MSG(4, scr_text_slash_scr_text_gml_2976_0);
+ MSG(5, scr_text_slash_scr_text_gml_2977_0);
+ MSG(6, scr_text_slash_scr_text_gml_2978_0);
+ MSG(7, scr_text_slash_scr_text_gml_2979_0);
+ goto L66496;
+L62040:;
+ goto L62136; /* gml: if !(global.choice == 0) goto L62136 */
+ MSG(0, scr_text_slash_scr_text_gml_2985_0);
+ MSG(1, scr_text_slash_scr_text_gml_2986_0);
+ goto L62208;
+L62136:;
+ MSG(0, scr_text_slash_scr_text_gml_2990_0);
+ MSG(1, scr_text_slash_scr_text_gml_2991_0);
+L62208:;
+ goto L66496;
+L62212:;
+ CHOICE(0, scr_text_slash_scr_text_gml_2997_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_2998_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_3001_0);
+ MSG(1, scr_text_slash_scr_text_gml_3002_0);
+ MSG(2, scr_text_slash_scr_text_gml_3003_0);
+ MSG(3, scr_text_slash_scr_text_gml_3004_0);
+ FACE(4, 'L', 1);
+ MSG(5, scr_text_slash_scr_text_gml_3006_0);
+ FACE(6, 'S', 1);
+ MSG(7, scr_text_slash_scr_text_gml_3009_0);
+ MSG(8, scr_text_slash_scr_text_gml_3010_0);
+ goto L66496;
+L62644:;
+ MSG(0, scr_text_slash_scr_text_gml_3014_0);
+ MSG(1, scr_text_slash_scr_text_gml_3015_0);
+ MSG(2, scr_text_slash_scr_text_gml_3016_0);
+ goto L66496;
+L62756:;
+ CHOICE(0, scr_text_slash_scr_text_gml_3021_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_3022_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_3023_0);
+ if (!gm_litemcheck(4)) goto L62924;
+ CHOICE(2, scr_text_slash_scr_text_gml_3024_0);
+L62924:;
+ CHOICE(3, scr_text_slash_scr_text_gml_3025_0);
+ MSG(0, scr_text_slash_scr_text_gml_3026_0);
+ MSG(1, scr_text_slash_scr_text_gml_3027_0);
+ goto L66496;
+L63036:;
+ goto L63308; /* gml: if !(global.choice == 0) goto L63308 */
+ MSG(0, scr_text_slash_scr_text_gml_3033_0);
+ MSG(1, scr_text_slash_scr_text_gml_3034_0);
+ MSG(2, scr_text_slash_scr_text_gml_3035_0);
+ MSG(3, scr_text_slash_scr_text_gml_3036_0);
+ MSG(4, scr_text_slash_scr_text_gml_3037_0);
+ MSG(5, scr_text_slash_scr_text_gml_3038_0);
+ MSG(6, scr_text_slash_scr_text_gml_3039_0);
+L63308:;
+ goto L63652; /* gml: if !(global.choice == 1) goto L63652 */
+ MSG(0, scr_text_slash_scr_text_gml_3043_0);
+ MSG(1, scr_text_slash_scr_text_gml_3044_0);
+ MSG(2, scr_text_slash_scr_text_gml_3045_0);
+ MSG(3, scr_text_slash_scr_text_gml_3046_0);
+ MSG(4, scr_text_slash_scr_text_gml_3047_0);
+ MSG(5, scr_text_slash_scr_text_gml_3048_0);
+ MSG(6, scr_text_slash_scr_text_gml_3049_0);
+ MSG(7, scr_text_slash_scr_text_gml_3050_0);
+ MSG(8, scr_text_slash_scr_text_gml_3051_0);
+L63652:;
+ goto L64168; /* gml: if !(global.choice == 2) goto L64168 */
+ MSG(0, scr_text_slash_scr_text_gml_3055_0);
+ MSG(1, scr_text_slash_scr_text_gml_3056_0);
+ MSG(2, scr_text_slash_scr_text_gml_3057_0);
+ MSG(3, scr_text_slash_scr_text_gml_3058_0);
+ MSG(4, scr_text_slash_scr_text_gml_3059_0);
+ if (!gm_litemcheck(4)) goto L64168;
+ MSG(0, scr_text_slash_scr_text_gml_3063_0);
+ MSG(1, scr_text_slash_scr_text_gml_3064_0);
+ MSG(2, scr_text_slash_scr_text_gml_3065_0);
+ MSG(3, scr_text_slash_scr_text_gml_3066_0);
+ MSG(4, scr_text_slash_scr_text_gml_3067_0);
+ MSG(5, scr_text_slash_scr_text_gml_3068_0);
+ MSG(6, scr_text_slash_scr_text_gml_3069_0);
+ gm_litemremove(4);
+ sv.flag[262] = 3;
+L64168:;
+ goto L64260; /* gml: if !(global.choice == 3) goto L64260 */
+ MSG(0, scr_text_slash_scr_text_gml_3077_0);
+ MSG(1, scr_text_slash_scr_text_gml_3078_0);
+L64260:;
+ goto L66496;
+L64264:;
+ CHOICE(0, scr_text_slash_scr_text_gml_3083_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_3084_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_3087_0);
+ MSG(1, scr_text_slash_scr_text_gml_3088_0);
+ if (!(sv.plot >= 75)) goto L64584;
+ CHOICE(1, scr_text_slash_scr_text_gml_3091_0);
+ CHOICE(2, scr_text_slash_scr_text_gml_3092_0);
+ MSG(1, scr_text_slash_scr_text_gml_3093_0);
+L64584:;
+ if (!(sv.plot >= 154)) goto L64676;
+ CHOICE(3, scr_text_slash_scr_text_gml_3097_0);
+ MSG(1, scr_text_slash_scr_text_gml_3098_0);
+L64676:;
+ goto L66496;
+L64680:;
+ MSG(0, scr_text_slash_scr_text_gml_3103_0);
+ goto L64760; /* gml: if !(global.choice == 0) goto L64760 */
+ /* gml: with (obj_shortcut_door) { // to L64756 */
+ /* gml: door_destination = 61 */
+ /* gml: } // end with */
+L64760:;
+ goto L64804; /* gml: if !(global.choice == 1) goto L64804 */
+ /* gml: with (obj_shortcut_door) { // to L64800 */
+ /* gml: door_destination = 73 */
+ /* gml: } // end with */
+L64804:;
+ goto L64848; /* gml: if !(global.choice == 2) goto L64848 */
+ /* gml: with (obj_shortcut_door) { // to L64844 */
+ /* gml: door_destination = 82 */
+ /* gml: } // end with */
+L64848:;
+ goto L64892; /* gml: if !(global.choice == 3) goto L64892 */
+ /* gml: with (obj_shortcut_door) { // to L64888 */
+ /* gml: door_destination = 97 */
+ /* gml: } // end with */
+L64892:;
+ /* gml: with (obj_shortcut_door) { // to L65012 */
+ goto L64964; /* gml: if !(door_destination == door_location) goto L64964 */
+ MSG(0, scr_text_slash_scr_text_gml_3124_0);
+ goto L65012;
+L64964:;
+ MSG(0, scr_text_slash_scr_text_gml_3128_0);
+ /* gml: con = 50 */
+L65012:;
+ /* gml: } // end with */
+ goto L66496;
+L65020:;
+ CHOICE(0, scr_text_slash_scr_text_gml_3137_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_3138_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_3141_0);
+ MSG(1, scr_text_slash_scr_text_gml_3142_0);
+ MSG(2, scr_text_slash_scr_text_gml_3143_0);
+ goto L66496;
+L65252:;
+ goto L65532; /* gml: if !(global.choice == 0) goto L65532 */
+ gm_itemremove(6);
+ gm_itemget(7);
+ MSG(0, scr_text_slash_scr_text_gml_3151_0);
+ MSG(1, scr_text_slash_scr_text_gml_3152_0);
+ MSG(2, scr_text_slash_scr_text_gml_3153_0);
+ /* gml: global.writersnd[0] = 97 */
+ MSG(3, scr_text_slash_scr_text_gml_3155_0);
+ MSG(4, scr_text_slash_scr_text_gml_3156_0);
+ sv.flag[253] = 1;
+L65532:;
+ goto L65588; /* gml: if !(global.choice == 1) goto L65588 */
+ MSG(0, scr_text_slash_scr_text_gml_3161_0);
+L65588:;
+ goto L66496;
+L65592:;
+ CHOICE(0, scr_text_slash_scr_text_gml_3166_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_3167_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ if (!gm_itemcheck(7)) goto L65776;
+ MSG(0, scr_text_slash_scr_text_gml_3173_0);
+ goto L65848;
+L65776:;
+ MSG(0, scr_text_slash_scr_text_gml_3177_0);
+ MSG(1, scr_text_slash_scr_text_gml_3178_0);
+L65848:;
+ goto L66496;
+L65852:;
+ goto L66040; /* gml: if !(global.choice == 0) goto L66040 */
+ gm_itemget(7);
+ MSG(0, scr_text_slash_scr_text_gml_3186_0);
+ /* gml: global.writersnd[0] = 97 */
+ MSG(1, scr_text_slash_scr_text_gml_3188_0);
+ goto L66040; /* gml: if !(noroom == 1) goto L66040 */
+ MSG(0, scr_text_slash_scr_text_gml_3191_0);
+L66040:;
+ goto L66096; /* gml: if !(global.choice == 1) goto L66096 */
+ MSG(0, scr_text_slash_scr_text_gml_3196_0);
+L66096:;
+ goto L66496;
+L66100:;
+ CHOICE(0, scr_text_slash_scr_text_gml_3201_0);
+ CHOICE(1, scr_text_slash_scr_text_gml_3202_0);
+ c->choicemsg[2] = " ";
+ c->choicemsg[3] = " ";
+ MSG(0, scr_text_slash_scr_text_gml_3205_0);
+ MSG(1, scr_text_slash_scr_text_gml_3206_0);
+ MSG(2, scr_text_slash_scr_text_gml_3207_0);
+ goto L66496;
+L66332:;
+ sv.flag[910] = 2;
+ goto L66452; /* gml: if !(global.choice == 0) goto L66452 */
+ MSG(0, scr_text_slash_scr_text_gml_3214_0);
+ /* gml: snd_play(29) */
+ gm_keyitemget(2);
+ goto L66488;
+L66452:;
+ MSG(0, scr_text_slash_scr_text_gml_3220_0);
+L66488:;
+ goto L66496;
+L66492:;
+ goto L66496;
+L66496:;
+ /* gml: argument0 */
+}
diff --git a/games/deltarune/src/gmtexts.h b/games/deltarune/src/gmtexts.h
new file mode 100644
index 00000000..7e7ce3ee
--- /dev/null
+++ b/games/deltarune/src/gmtexts.h
@@ -0,0 +1,52 @@
+/* Deltarune: what the signs, beds and people say, as the original chooses it (gmtexts.c, made by
+ * tools/texts.py from its code). A TxtCtx is the instance asking (where it is, how often it was read)
+ * and what it gets back: the messages for the dialogue box, a face, a choice. */
+#ifndef DR_GMTEXTS_H
+#define DR_GMTEXTS_H
+#include <stdint.h>
+#include "data.h"
+#include "res.h"
+#include "text.h"
+
+typedef struct TxtCtx {
+ int x, y; /* the instance's place, the original's units */
+ int read, talked; /* how often it was read */
+ int img; /* its image_index */
+ uint16_t spr; /* its sprite (an npc's create sets it) */
+ uint16_t tspr[4]; /* facing Kris while talking: down, right, up, left (DIR_*) */
+ int fc, fe; /* the face the box starts with */
+ int choice, facing, msc, arg, arg1;
+ int tempflag[16];
+ const char *msg[MAX_MSG];
+ int nmsg; /* messages set (the highest + 1) */
+ const char *choicemsg[4];
+} TxtCtx;
+
+void txt_msg(TxtCtx *c, int i, const char *s);
+void txt_face(TxtCtx *c, int i, char who, int fe);
+#define MSG(i, id) txt_msg(c, i, str(id))
+#define CHOICE(i, id) (c->choicemsg[i] = str(id))
+#define FACE(i, who, fe) txt_face(c, i, who, fe)
+#define NOFACE(i) txt_face(c, i, 0, 0)
+void gm_itemget(int id);
+void gm_keyitemget(int id);
+void gm_weaponget(int id);
+void gm_armorget(int id);
+void gm_litemget(int id);
+int gm_itemcheck(int id);
+int gm_keyitemcheck(int id);
+int gm_litemcheck(int id);
+int gm_weaponcheck(int id);
+void gm_itemremove(int id);
+void gm_keyitemremove(int id);
+void gm_litemremove(int id);
+
+void gm_readable_room1(TxtCtx *c);
+void gm_npc_room_create(TxtCtx *c);
+void gm_npc_room_talk(TxtCtx *c);
+void gm_npc_sign_create(TxtCtx *c);
+void gm_npc_sign_talk(TxtCtx *c);
+void gm_npc_facing_create(TxtCtx *c);
+void gm_npc_facing_talk(TxtCtx *c);
+void gm_scr_text(TxtCtx *c);
+#endif
diff --git a/games/deltarune/src/lw.c b/games/deltarune/src/lw.c
new file mode 100644
index 00000000..cb1bd706
--- /dev/null
+++ b/games/deltarune/src/lw.c
@@ -0,0 +1,91 @@
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC optimize("Os")
+#endif
+/* The Light World (rooms.h): Kris's house, the town, the school, the supply closet. Each cutscene is the
+ * original's event object (obj_krisroom...) as a protothread, its timings its alarms'. */
+#include <string.h>
+#include "event.h"
+#include "plat.h"
+#include "game.h"
+#include "rooms.h"
+#include "text.h"
+#include "world.h"
+
+enum { EV_KRISROOM = EV_LW_FIRST };
+
+/* a thing showing a sprite (scr_marker), image_speed in 1/16 frames */
+static Obj *marker(uint16_t spr, int x, int y, int ispd, int name) {
+ Obj *o = obj_new(spr, x, y);
+ o->ispd = ispd, o->name = (uint8_t)name;
+ return o;
+}
+
+void lw_setup(int room) {
+ switch (room) {
+ case room_krisroom: {
+ Obj *w = marker(spr_housewindow, 140, 40, 0, ACT_PROP);
+ w->img = plot() > 0 ? FX : 0;
+ Obj *b = marker(spr_bedsheet, 232, 100, 0, ACT_PROP2);
+ b->img = plot() > 0 ? FX : 0;
+ if (plot() == 0) {
+ marker(spr_toriel_rt, 151, 97, FX / 4, ACT_TORIEL);
+ pl.dir = DIR_LEFT;
+ event_start(EV_KRISROOM, NULL);
+ }
+ break;
+ }
+ default: break;
+ }
+}
+
+void lw_step(void) {}
+
+/* obj_krisroom: Toriel wakes Kris up */
+static int ev_krisroom(Ev *c) {
+ Obj *t = obj_get(ACT_TORIEL);
+ EV_BEGIN;
+ TALKF(FC_TORIEL, 1, obj_krisroom_slash_Create_0_gml_21_0, obj_krisroom_slash_Create_0_gml_22_0);
+ t->spr = spr_toriel_u, t->img = 0, t->ispd = FX / 4, t->vs = -2 * FX;
+ WAIT(20);
+ t->img = 0, t->ispd = 0, t->vs = 0;
+ WAIT(10);
+ t->spr = spr_toriel_windowopen, t->ispd = FX / 4;
+ obj_get(ACT_PROP)->img = FX;
+ WAIT(10);
+ t->ispd = 0;
+ WAIT(20);
+ t->spr = spr_toriel_d, t->img = 0, t->ispd = FX / 4, t->vs = 2 * FX;
+ WAIT(20);
+ t->img = 0, t->ispd = 0, t->vs = 0;
+ WAIT(20);
+ t->spr = spr_toriel_rt;
+ WAIT(20);
+ t->ispd = FX / 4;
+ TALKF(FC_TORIEL, 0, obj_krisroom_slash_Step_0_gml_92_0);
+ t->img = 0, t->spr = spr_toriel_d, t->ispd = FX / 4, t->vs = 3 * FX;
+ WAIT(90);
+ obj_free(t);
+ obj_get(ACT_PROP2)->img = FX;
+ WAIT(40);
+ /* Kris gets up and walks out of bed, to the left (faster with X held) */
+ c->v[0] = (g_held & K_X) ? 4 : 1;
+ c->v[1] = (g_held & K_X) ? 10 : 40;
+ pl.spr = spr_krisl;
+ for (c->v[2] = 0; c->v[2] < c->v[1]; c->v[2]++) {
+ pl.x -= c->v[0];
+ pl.img = (c->v[2] / 4) % 4;
+ WAIT(1);
+ }
+ pl.spr = 0, pl.img = 0, pl.dir = DIR_LEFT;
+ WAIT((g_held & K_X) ? 5 : 20);
+ pl.dir = DIR_DOWN;
+ if (plot() < 1) set_plot(1);
+ EV_END;
+}
+
+int lw_event(Ev *c) {
+ switch (c->id) {
+ case EV_KRISROOM: return ev_krisroom(c);
+ default: return 1;
+ }
+}
diff --git a/games/deltarune/src/lzma/7zTypes.h b/games/deltarune/src/lzma/7zTypes.h
new file mode 100644
index 00000000..4977cdaa
--- /dev/null
+++ b/games/deltarune/src/lzma/7zTypes.h
@@ -0,0 +1,374 @@
+/* 7zTypes.h -- Basic types
+2017-07-17 : Igor Pavlov : Public domain */
+
+#ifndef __7Z_TYPES_H
+#define __7Z_TYPES_H
+
+#ifdef _WIN32
+/* #include <windows.h> */
+#endif
+
+#include <stddef.h>
+
+#ifndef EXTERN_C_BEGIN
+#ifdef __cplusplus
+#define EXTERN_C_BEGIN extern "C" {
+#define EXTERN_C_END }
+#else
+#define EXTERN_C_BEGIN
+#define EXTERN_C_END
+#endif
+#endif
+
+EXTERN_C_BEGIN
+
+#define SZ_OK 0
+
+#define SZ_ERROR_DATA 1
+#define SZ_ERROR_MEM 2
+#define SZ_ERROR_CRC 3
+#define SZ_ERROR_UNSUPPORTED 4
+#define SZ_ERROR_PARAM 5
+#define SZ_ERROR_INPUT_EOF 6
+#define SZ_ERROR_OUTPUT_EOF 7
+#define SZ_ERROR_READ 8
+#define SZ_ERROR_WRITE 9
+#define SZ_ERROR_PROGRESS 10
+#define SZ_ERROR_FAIL 11
+#define SZ_ERROR_THREAD 12
+
+#define SZ_ERROR_ARCHIVE 16
+#define SZ_ERROR_NO_ARCHIVE 17
+
+typedef int SRes;
+
+
+#ifdef _WIN32
+
+/* typedef DWORD WRes; */
+typedef unsigned WRes;
+#define MY_SRes_HRESULT_FROM_WRes(x) HRESULT_FROM_WIN32(x)
+
+#else
+
+typedef int WRes;
+#define MY__FACILITY_WIN32 7
+#define MY__FACILITY__WRes MY__FACILITY_WIN32
+#define MY_SRes_HRESULT_FROM_WRes(x) ((HRESULT)(x) <= 0 ? ((HRESULT)(x)) : ((HRESULT) (((x) & 0x0000FFFF) | (MY__FACILITY__WRes << 16) | 0x80000000)))
+
+#endif
+
+
+#ifndef RINOK
+#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; }
+#endif
+
+typedef unsigned char Byte;
+typedef short Int16;
+typedef unsigned short UInt16;
+
+#ifdef _LZMA_UINT32_IS_ULONG
+typedef long Int32;
+typedef unsigned long UInt32;
+#else
+typedef int Int32;
+typedef unsigned int UInt32;
+#endif
+
+#ifdef _SZ_NO_INT_64
+
+/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers.
+ NOTES: Some code will work incorrectly in that case! */
+
+typedef long Int64;
+typedef unsigned long UInt64;
+
+#else
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+typedef __int64 Int64;
+typedef unsigned __int64 UInt64;
+#define UINT64_CONST(n) n
+#else
+typedef long long int Int64;
+typedef unsigned long long int UInt64;
+#define UINT64_CONST(n) n ## ULL
+#endif
+
+#endif
+
+#ifdef _LZMA_NO_SYSTEM_SIZE_T
+typedef UInt32 SizeT;
+#else
+typedef size_t SizeT;
+#endif
+
+typedef int Bool;
+#define True 1
+#define False 0
+
+
+#ifdef _WIN32
+#define MY_STD_CALL __stdcall
+#else
+#define MY_STD_CALL
+#endif
+
+#ifdef _MSC_VER
+
+#if _MSC_VER >= 1300
+#define MY_NO_INLINE __declspec(noinline)
+#else
+#define MY_NO_INLINE
+#endif
+
+#define MY_FORCE_INLINE __forceinline
+
+#define MY_CDECL __cdecl
+#define MY_FAST_CALL __fastcall
+
+#else
+
+#define MY_NO_INLINE
+#define MY_FORCE_INLINE
+#define MY_CDECL
+#define MY_FAST_CALL
+
+/* inline keyword : for C++ / C99 */
+
+/* GCC, clang: */
+/*
+#if defined (__GNUC__) && (__GNUC__ >= 4)
+#define MY_FORCE_INLINE __attribute__((always_inline))
+#define MY_NO_INLINE __attribute__((noinline))
+#endif
+*/
+
+#endif
+
+
+/* The following interfaces use first parameter as pointer to structure */
+
+typedef struct IByteIn IByteIn;
+struct IByteIn
+{
+ Byte (*Read)(const IByteIn *p); /* reads one byte, returns 0 in case of EOF or error */
+};
+#define IByteIn_Read(p) (p)->Read(p)
+
+
+typedef struct IByteOut IByteOut;
+struct IByteOut
+{
+ void (*Write)(const IByteOut *p, Byte b);
+};
+#define IByteOut_Write(p, b) (p)->Write(p, b)
+
+
+typedef struct ISeqInStream ISeqInStream;
+struct ISeqInStream
+{
+ SRes (*Read)(const ISeqInStream *p, void *buf, size_t *size);
+ /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
+ (output(*size) < input(*size)) is allowed */
+};
+#define ISeqInStream_Read(p, buf, size) (p)->Read(p, buf, size)
+
+/* it can return SZ_ERROR_INPUT_EOF */
+SRes SeqInStream_Read(const ISeqInStream *stream, void *buf, size_t size);
+SRes SeqInStream_Read2(const ISeqInStream *stream, void *buf, size_t size, SRes errorType);
+SRes SeqInStream_ReadByte(const ISeqInStream *stream, Byte *buf);
+
+
+typedef struct ISeqOutStream ISeqOutStream;
+struct ISeqOutStream
+{
+ size_t (*Write)(const ISeqOutStream *p, const void *buf, size_t size);
+ /* Returns: result - the number of actually written bytes.
+ (result < size) means error */
+};
+#define ISeqOutStream_Write(p, buf, size) (p)->Write(p, buf, size)
+
+typedef enum
+{
+ SZ_SEEK_SET = 0,
+ SZ_SEEK_CUR = 1,
+ SZ_SEEK_END = 2
+} ESzSeek;
+
+
+typedef struct ISeekInStream ISeekInStream;
+struct ISeekInStream
+{
+ SRes (*Read)(const ISeekInStream *p, void *buf, size_t *size); /* same as ISeqInStream::Read */
+ SRes (*Seek)(const ISeekInStream *p, Int64 *pos, ESzSeek origin);
+};
+#define ISeekInStream_Read(p, buf, size) (p)->Read(p, buf, size)
+#define ISeekInStream_Seek(p, pos, origin) (p)->Seek(p, pos, origin)
+
+
+typedef struct ILookInStream ILookInStream;
+struct ILookInStream
+{
+ SRes (*Look)(const ILookInStream *p, const void **buf, size_t *size);
+ /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
+ (output(*size) > input(*size)) is not allowed
+ (output(*size) < input(*size)) is allowed */
+ SRes (*Skip)(const ILookInStream *p, size_t offset);
+ /* offset must be <= output(*size) of Look */
+
+ SRes (*Read)(const ILookInStream *p, void *buf, size_t *size);
+ /* reads directly (without buffer). It's same as ISeqInStream::Read */
+ SRes (*Seek)(const ILookInStream *p, Int64 *pos, ESzSeek origin);
+};
+
+#define ILookInStream_Look(p, buf, size) (p)->Look(p, buf, size)
+#define ILookInStream_Skip(p, offset) (p)->Skip(p, offset)
+#define ILookInStream_Read(p, buf, size) (p)->Read(p, buf, size)
+#define ILookInStream_Seek(p, pos, origin) (p)->Seek(p, pos, origin)
+
+
+SRes LookInStream_LookRead(const ILookInStream *stream, void *buf, size_t *size);
+SRes LookInStream_SeekTo(const ILookInStream *stream, UInt64 offset);
+
+/* reads via ILookInStream::Read */
+SRes LookInStream_Read2(const ILookInStream *stream, void *buf, size_t size, SRes errorType);
+SRes LookInStream_Read(const ILookInStream *stream, void *buf, size_t size);
+
+
+
+typedef struct
+{
+ ILookInStream vt;
+ const ISeekInStream *realStream;
+
+ size_t pos;
+ size_t size; /* it's data size */
+
+ /* the following variables must be set outside */
+ Byte *buf;
+ size_t bufSize;
+} CLookToRead2;
+
+void LookToRead2_CreateVTable(CLookToRead2 *p, int lookahead);
+
+#define LookToRead2_Init(p) { (p)->pos = (p)->size = 0; }
+
+
+typedef struct
+{
+ ISeqInStream vt;
+ const ILookInStream *realStream;
+} CSecToLook;
+
+void SecToLook_CreateVTable(CSecToLook *p);
+
+
+
+typedef struct
+{
+ ISeqInStream vt;
+ const ILookInStream *realStream;
+} CSecToRead;
+
+void SecToRead_CreateVTable(CSecToRead *p);
+
+
+typedef struct ICompressProgress ICompressProgress;
+
+struct ICompressProgress
+{
+ SRes (*Progress)(const ICompressProgress *p, UInt64 inSize, UInt64 outSize);
+ /* Returns: result. (result != SZ_OK) means break.
+ Value (UInt64)(Int64)-1 for size means unknown value. */
+};
+#define ICompressProgress_Progress(p, inSize, outSize) (p)->Progress(p, inSize, outSize)
+
+
+
+typedef struct ISzAlloc ISzAlloc;
+typedef const ISzAlloc * ISzAllocPtr;
+
+struct ISzAlloc
+{
+ void *(*Alloc)(ISzAllocPtr p, size_t size);
+ void (*Free)(ISzAllocPtr p, void *address); /* address can be 0 */
+};
+
+#define ISzAlloc_Alloc(p, size) (p)->Alloc(p, size)
+#define ISzAlloc_Free(p, a) (p)->Free(p, a)
+
+/* deprecated */
+#define IAlloc_Alloc(p, size) ISzAlloc_Alloc(p, size)
+#define IAlloc_Free(p, a) ISzAlloc_Free(p, a)
+
+
+
+
+
+#ifndef MY_offsetof
+ #ifdef offsetof
+ #define MY_offsetof(type, m) offsetof(type, m)
+ /*
+ #define MY_offsetof(type, m) FIELD_OFFSET(type, m)
+ */
+ #else
+ #define MY_offsetof(type, m) ((size_t)&(((type *)0)->m))
+ #endif
+#endif
+
+
+
+#ifndef MY_container_of
+
+/*
+#define MY_container_of(ptr, type, m) container_of(ptr, type, m)
+#define MY_container_of(ptr, type, m) CONTAINING_RECORD(ptr, type, m)
+#define MY_container_of(ptr, type, m) ((type *)((char *)(ptr) - offsetof(type, m)))
+#define MY_container_of(ptr, type, m) (&((type *)0)->m == (ptr), ((type *)(((char *)(ptr)) - MY_offsetof(type, m))))
+*/
+
+/*
+ GCC shows warning: "perhaps the 'offsetof' macro was used incorrectly"
+ GCC 3.4.4 : classes with constructor
+ GCC 4.8.1 : classes with non-public variable members"
+*/
+
+#define MY_container_of(ptr, type, m) ((type *)((char *)(1 ? (ptr) : &((type *)0)->m) - MY_offsetof(type, m)))
+
+
+#endif
+
+#define CONTAINER_FROM_VTBL_SIMPLE(ptr, type, m) ((type *)(ptr))
+
+/*
+#define CONTAINER_FROM_VTBL(ptr, type, m) CONTAINER_FROM_VTBL_SIMPLE(ptr, type, m)
+*/
+#define CONTAINER_FROM_VTBL(ptr, type, m) MY_container_of(ptr, type, m)
+
+#define CONTAINER_FROM_VTBL_CLS(ptr, type, m) CONTAINER_FROM_VTBL_SIMPLE(ptr, type, m)
+/*
+#define CONTAINER_FROM_VTBL_CLS(ptr, type, m) CONTAINER_FROM_VTBL(ptr, type, m)
+*/
+
+
+
+#ifdef _WIN32
+
+#define CHAR_PATH_SEPARATOR '\\'
+#define WCHAR_PATH_SEPARATOR L'\\'
+#define STRING_PATH_SEPARATOR "\\"
+#define WSTRING_PATH_SEPARATOR L"\\"
+
+#else
+
+#define CHAR_PATH_SEPARATOR '/'
+#define WCHAR_PATH_SEPARATOR L'/'
+#define STRING_PATH_SEPARATOR "/"
+#define WSTRING_PATH_SEPARATOR L"/"
+
+#endif
+
+EXTERN_C_END
+
+#endif
diff --git a/games/deltarune/src/lzma/LzmaDec.c b/games/deltarune/src/lzma/LzmaDec.c
new file mode 100644
index 00000000..962b94bb
--- /dev/null
+++ b/games/deltarune/src/lzma/LzmaDec.c
@@ -0,0 +1,1185 @@
+/* LzmaDec.c -- LZMA Decoder
+2018-02-28 : Igor Pavlov : Public domain */
+
+#include "Precomp.h"
+
+/* #include "CpuArch.h" */
+#include "LzmaDec.h"
+
+#include <string.h>
+
+#define kNumTopBits 24
+#define kTopValue ((UInt32)1 << kNumTopBits)
+
+#define kNumBitModelTotalBits 11
+#define kBitModelTotal (1 << kNumBitModelTotalBits)
+#define kNumMoveBits 5
+
+#define RC_INIT_SIZE 5
+
+#define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); }
+
+#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)
+#define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));
+#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits));
+#define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \
+ { UPDATE_0(p); i = (i + i); A0; } else \
+ { UPDATE_1(p); i = (i + i) + 1; A1; }
+
+#define TREE_GET_BIT(probs, i) { GET_BIT2(probs + i, i, ;, ;); }
+
+#define REV_BIT(p, i, A0, A1) IF_BIT_0(p + i) \
+ { UPDATE_0(p + i); A0; } else \
+ { UPDATE_1(p + i); A1; }
+#define REV_BIT_VAR( p, i, m) REV_BIT(p, i, i += m; m += m, m += m; i += m; )
+#define REV_BIT_CONST(p, i, m) REV_BIT(p, i, i += m; , i += m * 2; )
+#define REV_BIT_LAST( p, i, m) REV_BIT(p, i, i -= m , ; )
+
+#define TREE_DECODE(probs, limit, i) \
+ { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; }
+
+/* #define _LZMA_SIZE_OPT */
+
+#ifdef _LZMA_SIZE_OPT
+#define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i)
+#else
+#define TREE_6_DECODE(probs, i) \
+ { i = 1; \
+ TREE_GET_BIT(probs, i); \
+ TREE_GET_BIT(probs, i); \
+ TREE_GET_BIT(probs, i); \
+ TREE_GET_BIT(probs, i); \
+ TREE_GET_BIT(probs, i); \
+ TREE_GET_BIT(probs, i); \
+ i -= 0x40; }
+#endif
+
+#define NORMAL_LITER_DEC TREE_GET_BIT(prob, symbol)
+#define MATCHED_LITER_DEC \
+ matchByte += matchByte; \
+ bit = offs; \
+ offs &= matchByte; \
+ probLit = prob + (offs + bit + symbol); \
+ GET_BIT2(probLit, symbol, offs ^= bit; , ;)
+
+
+
+#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); }
+
+#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)
+#define UPDATE_0_CHECK range = bound;
+#define UPDATE_1_CHECK range -= bound; code -= bound;
+#define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \
+ { UPDATE_0_CHECK; i = (i + i); A0; } else \
+ { UPDATE_1_CHECK; i = (i + i) + 1; A1; }
+#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;)
+#define TREE_DECODE_CHECK(probs, limit, i) \
+ { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; }
+
+
+#define REV_BIT_CHECK(p, i, m) IF_BIT_0_CHECK(p + i) \
+ { UPDATE_0_CHECK; i += m; m += m; } else \
+ { UPDATE_1_CHECK; m += m; i += m; }
+
+
+#define kNumPosBitsMax 4
+#define kNumPosStatesMax (1 << kNumPosBitsMax)
+
+#define kLenNumLowBits 3
+#define kLenNumLowSymbols (1 << kLenNumLowBits)
+#define kLenNumHighBits 8
+#define kLenNumHighSymbols (1 << kLenNumHighBits)
+
+#define LenLow 0
+#define LenHigh (LenLow + 2 * (kNumPosStatesMax << kLenNumLowBits))
+#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
+
+#define LenChoice LenLow
+#define LenChoice2 (LenLow + (1 << kLenNumLowBits))
+
+#define kNumStates 12
+#define kNumStates2 16
+#define kNumLitStates 7
+
+#define kStartPosModelIndex 4
+#define kEndPosModelIndex 14
+#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
+
+#define kNumPosSlotBits 6
+#define kNumLenToPosStates 4
+
+#define kNumAlignBits 4
+#define kAlignTableSize (1 << kNumAlignBits)
+
+#define kMatchMinLen 2
+#define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols * 2 + kLenNumHighSymbols)
+
+/* External ASM code needs same CLzmaProb array layout. So don't change it. */
+
+/* (probs_1664) is faster and better for code size at some platforms */
+/*
+#ifdef MY_CPU_X86_OR_AMD64
+*/
+#define kStartOffset 1664
+#define GET_PROBS p->probs_1664
+/*
+#define GET_PROBS p->probs + kStartOffset
+#else
+#define kStartOffset 0
+#define GET_PROBS p->probs
+#endif
+*/
+
+#define SpecPos (-kStartOffset)
+#define IsRep0Long (SpecPos + kNumFullDistances)
+#define RepLenCoder (IsRep0Long + (kNumStates2 << kNumPosBitsMax))
+#define LenCoder (RepLenCoder + kNumLenProbs)
+#define IsMatch (LenCoder + kNumLenProbs)
+#define Align (IsMatch + (kNumStates2 << kNumPosBitsMax))
+#define IsRep (Align + kAlignTableSize)
+#define IsRepG0 (IsRep + kNumStates)
+#define IsRepG1 (IsRepG0 + kNumStates)
+#define IsRepG2 (IsRepG1 + kNumStates)
+#define PosSlot (IsRepG2 + kNumStates)
+#define Literal (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
+#define NUM_BASE_PROBS (Literal + kStartOffset)
+
+#if Align != 0 && kStartOffset != 0
+ #error Stop_Compiling_Bad_LZMA_kAlign
+#endif
+
+#if NUM_BASE_PROBS != 1984
+ #error Stop_Compiling_Bad_LZMA_PROBS
+#endif
+
+
+#define LZMA_LIT_SIZE 0x300
+
+#define LzmaProps_GetNumProbs(p) (NUM_BASE_PROBS + ((UInt32)LZMA_LIT_SIZE << ((p)->lc + (p)->lp)))
+
+
+#define CALC_POS_STATE(processedPos, pbMask) (((processedPos) & (pbMask)) << 4)
+#define COMBINED_PS_STATE (posState + state)
+#define GET_LEN_STATE (posState)
+
+#define LZMA_DIC_MIN (1 << 12)
+
+/*
+p->remainLen : shows status of LZMA decoder:
+ < kMatchSpecLenStart : normal remain
+ = kMatchSpecLenStart : finished
+ = kMatchSpecLenStart + 1 : need init range coder
+ = kMatchSpecLenStart + 2 : need init range coder and state
+*/
+
+/* ---------- LZMA_DECODE_REAL ---------- */
+/*
+LzmaDec_DecodeReal_3() can be implemented in external ASM file.
+3 - is the code compatibility version of that function for check at link time.
+*/
+
+#define LZMA_DECODE_REAL LzmaDec_DecodeReal_3
+
+/*
+LZMA_DECODE_REAL()
+In:
+ RangeCoder is normalized
+ if (p->dicPos == limit)
+ {
+ LzmaDec_TryDummy() was called before to exclude LITERAL and MATCH-REP cases.
+ So first symbol can be only MATCH-NON-REP. And if that MATCH-NON-REP symbol
+ is not END_OF_PAYALOAD_MARKER, then function returns error code.
+ }
+
+Processing:
+ first LZMA symbol will be decoded in any case
+ All checks for limits are at the end of main loop,
+ It will decode new LZMA-symbols while (p->buf < bufLimit && dicPos < limit),
+ RangeCoder is still without last normalization when (p->buf < bufLimit) is being checked.
+
+Out:
+ RangeCoder is normalized
+ Result:
+ SZ_OK - OK
+ SZ_ERROR_DATA - Error
+ p->remainLen:
+ < kMatchSpecLenStart : normal remain
+ = kMatchSpecLenStart : finished
+*/
+
+
+#ifdef _LZMA_DEC_OPT
+
+int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit);
+
+#else
+
+static
+int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit)
+{
+ CLzmaProb *probs = GET_PROBS;
+ unsigned state = (unsigned)p->state;
+ UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3];
+ unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1;
+ unsigned lc = p->prop.lc;
+ unsigned lpMask = ((unsigned)0x100 << p->prop.lp) - ((unsigned)0x100 >> lc);
+
+ Byte *dic = p->dic;
+ SizeT dicBufSize = p->dicBufSize;
+ SizeT dicPos = p->dicPos;
+
+ UInt32 processedPos = p->processedPos;
+ UInt32 checkDicSize = p->checkDicSize;
+ unsigned len = 0;
+
+ const Byte *buf = p->buf;
+ UInt32 range = p->range;
+ UInt32 code = p->code;
+
+ do
+ {
+ CLzmaProb *prob;
+ UInt32 bound;
+ unsigned ttt;
+ unsigned posState = CALC_POS_STATE(processedPos, pbMask);
+
+ prob = probs + IsMatch + COMBINED_PS_STATE;
+ IF_BIT_0(prob)
+ {
+ unsigned symbol;
+ UPDATE_0(prob);
+ prob = probs + Literal;
+ if (processedPos != 0 || checkDicSize != 0)
+ prob += (UInt32)3 * ((((processedPos << 8) + dic[(dicPos == 0 ? dicBufSize : dicPos) - 1]) & lpMask) << lc);
+ processedPos++;
+
+ if (state < kNumLitStates)
+ {
+ state -= (state < 4) ? state : 3;
+ symbol = 1;
+ #ifdef _LZMA_SIZE_OPT
+ do { NORMAL_LITER_DEC } while (symbol < 0x100);
+ #else
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ NORMAL_LITER_DEC
+ #endif
+ }
+ else
+ {
+ unsigned matchByte = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
+ unsigned offs = 0x100;
+ state -= (state < 10) ? 3 : 6;
+ symbol = 1;
+ #ifdef _LZMA_SIZE_OPT
+ do
+ {
+ unsigned bit;
+ CLzmaProb *probLit;
+ MATCHED_LITER_DEC
+ }
+ while (symbol < 0x100);
+ #else
+ {
+ unsigned bit;
+ CLzmaProb *probLit;
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ MATCHED_LITER_DEC
+ }
+ #endif
+ }
+
+ dic[dicPos++] = (Byte)symbol;
+ continue;
+ }
+
+ {
+ UPDATE_1(prob);
+ prob = probs + IsRep + state;
+ IF_BIT_0(prob)
+ {
+ UPDATE_0(prob);
+ state += kNumStates;
+ prob = probs + LenCoder;
+ }
+ else
+ {
+ UPDATE_1(prob);
+ /*
+ // that case was checked before with kBadRepCode
+ if (checkDicSize == 0 && processedPos == 0)
+ return SZ_ERROR_DATA;
+ */
+ prob = probs + IsRepG0 + state;
+ IF_BIT_0(prob)
+ {
+ UPDATE_0(prob);
+ prob = probs + IsRep0Long + COMBINED_PS_STATE;
+ IF_BIT_0(prob)
+ {
+ UPDATE_0(prob);
+ dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
+ dicPos++;
+ processedPos++;
+ state = state < kNumLitStates ? 9 : 11;
+ continue;
+ }
+ UPDATE_1(prob);
+ }
+ else
+ {
+ UInt32 distance;
+ UPDATE_1(prob);
+ prob = probs + IsRepG1 + state;
+ IF_BIT_0(prob)
+ {
+ UPDATE_0(prob);
+ distance = rep1;
+ }
+ else
+ {
+ UPDATE_1(prob);
+ prob = probs + IsRepG2 + state;
+ IF_BIT_0(prob)
+ {
+ UPDATE_0(prob);
+ distance = rep2;
+ }
+ else
+ {
+ UPDATE_1(prob);
+ distance = rep3;
+ rep3 = rep2;
+ }
+ rep2 = rep1;
+ }
+ rep1 = rep0;
+ rep0 = distance;
+ }
+ state = state < kNumLitStates ? 8 : 11;
+ prob = probs + RepLenCoder;
+ }
+
+ #ifdef _LZMA_SIZE_OPT
+ {
+ unsigned lim, offset;
+ CLzmaProb *probLen = prob + LenChoice;
+ IF_BIT_0(probLen)
+ {
+ UPDATE_0(probLen);
+ probLen = prob + LenLow + GET_LEN_STATE;
+ offset = 0;
+ lim = (1 << kLenNumLowBits);
+ }
+ else
+ {
+ UPDATE_1(probLen);
+ probLen = prob + LenChoice2;
+ IF_BIT_0(probLen)
+ {
+ UPDATE_0(probLen);
+ probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits);
+ offset = kLenNumLowSymbols;
+ lim = (1 << kLenNumLowBits);
+ }
+ else
+ {
+ UPDATE_1(probLen);
+ probLen = prob + LenHigh;
+ offset = kLenNumLowSymbols * 2;
+ lim = (1 << kLenNumHighBits);
+ }
+ }
+ TREE_DECODE(probLen, lim, len);
+ len += offset;
+ }
+ #else
+ {
+ CLzmaProb *probLen = prob + LenChoice;
+ IF_BIT_0(probLen)
+ {
+ UPDATE_0(probLen);
+ probLen = prob + LenLow + GET_LEN_STATE;
+ len = 1;
+ TREE_GET_BIT(probLen, len);
+ TREE_GET_BIT(probLen, len);
+ TREE_GET_BIT(probLen, len);
+ len -= 8;
+ }
+ else
+ {
+ UPDATE_1(probLen);
+ probLen = prob + LenChoice2;
+ IF_BIT_0(probLen)
+ {
+ UPDATE_0(probLen);
+ probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits);
+ len = 1;
+ TREE_GET_BIT(probLen, len);
+ TREE_GET_BIT(probLen, len);
+ TREE_GET_BIT(probLen, len);
+ }
+ else
+ {
+ UPDATE_1(probLen);
+ probLen = prob + LenHigh;
+ TREE_DECODE(probLen, (1 << kLenNumHighBits), len);
+ len += kLenNumLowSymbols * 2;
+ }
+ }
+ }
+ #endif
+
+ if (state >= kNumStates)
+ {
+ UInt32 distance;
+ prob = probs + PosSlot +
+ ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits);
+ TREE_6_DECODE(prob, distance);
+ if (distance >= kStartPosModelIndex)
+ {
+ unsigned posSlot = (unsigned)distance;
+ unsigned numDirectBits = (unsigned)(((distance >> 1) - 1));
+ distance = (2 | (distance & 1));
+ if (posSlot < kEndPosModelIndex)
+ {
+ distance <<= numDirectBits;
+ prob = probs + SpecPos;
+ {
+ UInt32 m = 1;
+ distance++;
+ do
+ {
+ REV_BIT_VAR(prob, distance, m);
+ }
+ while (--numDirectBits);
+ distance -= m;
+ }
+ }
+ else
+ {
+ numDirectBits -= kNumAlignBits;
+ do
+ {
+ NORMALIZE
+ range >>= 1;
+
+ {
+ UInt32 t;
+ code -= range;
+ t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */
+ distance = (distance << 1) + (t + 1);
+ code += range & t;
+ }
+ /*
+ distance <<= 1;
+ if (code >= range)
+ {
+ code -= range;
+ distance |= 1;
+ }
+ */
+ }
+ while (--numDirectBits);
+ prob = probs + Align;
+ distance <<= kNumAlignBits;
+ {
+ unsigned i = 1;
+ REV_BIT_CONST(prob, i, 1);
+ REV_BIT_CONST(prob, i, 2);
+ REV_BIT_CONST(prob, i, 4);
+ REV_BIT_LAST (prob, i, 8);
+ distance |= i;
+ }
+ if (distance == (UInt32)0xFFFFFFFF)
+ {
+ len = kMatchSpecLenStart;
+ state -= kNumStates;
+ break;
+ }
+ }
+ }
+
+ rep3 = rep2;
+ rep2 = rep1;
+ rep1 = rep0;
+ rep0 = distance + 1;
+ state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3;
+ if (distance >= (checkDicSize == 0 ? processedPos: checkDicSize))
+ {
+ p->dicPos = dicPos;
+ return SZ_ERROR_DATA;
+ }
+ }
+
+ len += kMatchMinLen;
+
+ {
+ SizeT rem;
+ unsigned curLen;
+ SizeT pos;
+
+ if ((rem = limit - dicPos) == 0)
+ {
+ p->dicPos = dicPos;
+ return SZ_ERROR_DATA;
+ }
+
+ curLen = ((rem < len) ? (unsigned)rem : len);
+ pos = dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0);
+
+ processedPos += curLen;
+
+ len -= curLen;
+ if (curLen <= dicBufSize - pos)
+ {
+ Byte *dest = dic + dicPos;
+ ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos;
+ const Byte *lim = dest + curLen;
+ dicPos += curLen;
+ do
+ *(dest) = (Byte)*(dest + src);
+ while (++dest != lim);
+ }
+ else
+ {
+ do
+ {
+ dic[dicPos++] = dic[pos];
+ if (++pos == dicBufSize)
+ pos = 0;
+ }
+ while (--curLen != 0);
+ }
+ }
+ }
+ }
+ while (dicPos < limit && buf < bufLimit);
+
+ NORMALIZE;
+
+ p->buf = buf;
+ p->range = range;
+ p->code = code;
+ p->remainLen = len;
+ p->dicPos = dicPos;
+ p->processedPos = processedPos;
+ p->reps[0] = rep0;
+ p->reps[1] = rep1;
+ p->reps[2] = rep2;
+ p->reps[3] = rep3;
+ p->state = state;
+
+ return SZ_OK;
+}
+#endif
+
+static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit)
+{
+ if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart)
+ {
+ Byte *dic = p->dic;
+ SizeT dicPos = p->dicPos;
+ SizeT dicBufSize = p->dicBufSize;
+ unsigned len = (unsigned)p->remainLen;
+ SizeT rep0 = p->reps[0]; /* we use SizeT to avoid the BUG of VC14 for AMD64 */
+ SizeT rem = limit - dicPos;
+ if (rem < len)
+ len = (unsigned)(rem);
+
+ if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len)
+ p->checkDicSize = p->prop.dicSize;
+
+ p->processedPos += len;
+ p->remainLen -= len;
+ while (len != 0)
+ {
+ len--;
+ dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
+ dicPos++;
+ }
+ p->dicPos = dicPos;
+ }
+}
+
+
+#define kRange0 0xFFFFFFFF
+#define kBound0 ((kRange0 >> kNumBitModelTotalBits) << (kNumBitModelTotalBits - 1))
+#define kBadRepCode (kBound0 + (((kRange0 - kBound0) >> kNumBitModelTotalBits) << (kNumBitModelTotalBits - 1)))
+#if kBadRepCode != (0xC0000000 - 0x400)
+ #error Stop_Compiling_Bad_LZMA_Check
+#endif
+
+static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit)
+{
+ do
+ {
+ SizeT limit2 = limit;
+ if (p->checkDicSize == 0)
+ {
+ UInt32 rem = p->prop.dicSize - p->processedPos;
+ if (limit - p->dicPos > rem)
+ limit2 = p->dicPos + rem;
+
+ if (p->processedPos == 0)
+ if (p->code >= kBadRepCode)
+ return SZ_ERROR_DATA;
+ }
+
+ RINOK(LZMA_DECODE_REAL(p, limit2, bufLimit));
+
+ if (p->checkDicSize == 0 && p->processedPos >= p->prop.dicSize)
+ p->checkDicSize = p->prop.dicSize;
+
+ LzmaDec_WriteRem(p, limit);
+ }
+ while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart);
+
+ return 0;
+}
+
+typedef enum
+{
+ DUMMY_ERROR, /* unexpected end of input stream */
+ DUMMY_LIT,
+ DUMMY_MATCH,
+ DUMMY_REP
+} ELzmaDummy;
+
+static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize)
+{
+ UInt32 range = p->range;
+ UInt32 code = p->code;
+ const Byte *bufLimit = buf + inSize;
+ const CLzmaProb *probs = GET_PROBS;
+ unsigned state = (unsigned)p->state;
+ ELzmaDummy res;
+
+ {
+ const CLzmaProb *prob;
+ UInt32 bound;
+ unsigned ttt;
+ unsigned posState = CALC_POS_STATE(p->processedPos, (1 << p->prop.pb) - 1);
+
+ prob = probs + IsMatch + COMBINED_PS_STATE;
+ IF_BIT_0_CHECK(prob)
+ {
+ UPDATE_0_CHECK
+
+ /* if (bufLimit - buf >= 7) return DUMMY_LIT; */
+
+ prob = probs + Literal;
+ if (p->checkDicSize != 0 || p->processedPos != 0)
+ prob += ((UInt32)LZMA_LIT_SIZE *
+ ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) +
+ (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc))));
+
+ if (state < kNumLitStates)
+ {
+ unsigned symbol = 1;
+ do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100);
+ }
+ else
+ {
+ unsigned matchByte = p->dic[p->dicPos - p->reps[0] +
+ (p->dicPos < p->reps[0] ? p->dicBufSize : 0)];
+ unsigned offs = 0x100;
+ unsigned symbol = 1;
+ do
+ {
+ unsigned bit;
+ const CLzmaProb *probLit;
+ matchByte += matchByte;
+ bit = offs;
+ offs &= matchByte;
+ probLit = prob + (offs + bit + symbol);
+ GET_BIT2_CHECK(probLit, symbol, offs ^= bit; , ; )
+ }
+ while (symbol < 0x100);
+ }
+ res = DUMMY_LIT;
+ }
+ else
+ {
+ unsigned len;
+ UPDATE_1_CHECK;
+
+ prob = probs + IsRep + state;
+ IF_BIT_0_CHECK(prob)
+ {
+ UPDATE_0_CHECK;
+ state = 0;
+ prob = probs + LenCoder;
+ res = DUMMY_MATCH;
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ res = DUMMY_REP;
+ prob = probs + IsRepG0 + state;
+ IF_BIT_0_CHECK(prob)
+ {
+ UPDATE_0_CHECK;
+ prob = probs + IsRep0Long + COMBINED_PS_STATE;
+ IF_BIT_0_CHECK(prob)
+ {
+ UPDATE_0_CHECK;
+ NORMALIZE_CHECK;
+ return DUMMY_REP;
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ }
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ prob = probs + IsRepG1 + state;
+ IF_BIT_0_CHECK(prob)
+ {
+ UPDATE_0_CHECK;
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ prob = probs + IsRepG2 + state;
+ IF_BIT_0_CHECK(prob)
+ {
+ UPDATE_0_CHECK;
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ }
+ }
+ }
+ state = kNumStates;
+ prob = probs + RepLenCoder;
+ }
+ {
+ unsigned limit, offset;
+ const CLzmaProb *probLen = prob + LenChoice;
+ IF_BIT_0_CHECK(probLen)
+ {
+ UPDATE_0_CHECK;
+ probLen = prob + LenLow + GET_LEN_STATE;
+ offset = 0;
+ limit = 1 << kLenNumLowBits;
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ probLen = prob + LenChoice2;
+ IF_BIT_0_CHECK(probLen)
+ {
+ UPDATE_0_CHECK;
+ probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits);
+ offset = kLenNumLowSymbols;
+ limit = 1 << kLenNumLowBits;
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ probLen = prob + LenHigh;
+ offset = kLenNumLowSymbols * 2;
+ limit = 1 << kLenNumHighBits;
+ }
+ }
+ TREE_DECODE_CHECK(probLen, limit, len);
+ len += offset;
+ }
+
+ if (state < 4)
+ {
+ unsigned posSlot;
+ prob = probs + PosSlot +
+ ((len < kNumLenToPosStates - 1 ? len : kNumLenToPosStates - 1) <<
+ kNumPosSlotBits);
+ TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot);
+ if (posSlot >= kStartPosModelIndex)
+ {
+ unsigned numDirectBits = ((posSlot >> 1) - 1);
+
+ /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */
+
+ if (posSlot < kEndPosModelIndex)
+ {
+ prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits);
+ }
+ else
+ {
+ numDirectBits -= kNumAlignBits;
+ do
+ {
+ NORMALIZE_CHECK
+ range >>= 1;
+ code -= range & (((code - range) >> 31) - 1);
+ /* if (code >= range) code -= range; */
+ }
+ while (--numDirectBits);
+ prob = probs + Align;
+ numDirectBits = kNumAlignBits;
+ }
+ {
+ unsigned i = 1;
+ unsigned m = 1;
+ do
+ {
+ REV_BIT_CHECK(prob, i, m);
+ }
+ while (--numDirectBits);
+ }
+ }
+ }
+ }
+ }
+ NORMALIZE_CHECK;
+ return res;
+}
+
+
+void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
+{
+ p->remainLen = kMatchSpecLenStart + 1;
+ p->tempBufSize = 0;
+
+ if (initDic)
+ {
+ p->processedPos = 0;
+ p->checkDicSize = 0;
+ p->remainLen = kMatchSpecLenStart + 2;
+ }
+ if (initState)
+ p->remainLen = kMatchSpecLenStart + 2;
+}
+
+void LzmaDec_Init(CLzmaDec *p)
+{
+ p->dicPos = 0;
+ LzmaDec_InitDicAndState(p, True, True);
+}
+
+
+SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen,
+ ELzmaFinishMode finishMode, ELzmaStatus *status)
+{
+ SizeT inSize = *srcLen;
+ (*srcLen) = 0;
+
+ *status = LZMA_STATUS_NOT_SPECIFIED;
+
+ if (p->remainLen > kMatchSpecLenStart)
+ {
+ for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--)
+ p->tempBuf[p->tempBufSize++] = *src++;
+ if (p->tempBufSize != 0 && p->tempBuf[0] != 0)
+ return SZ_ERROR_DATA;
+ if (p->tempBufSize < RC_INIT_SIZE)
+ {
+ *status = LZMA_STATUS_NEEDS_MORE_INPUT;
+ return SZ_OK;
+ }
+ p->code =
+ ((UInt32)p->tempBuf[1] << 24)
+ | ((UInt32)p->tempBuf[2] << 16)
+ | ((UInt32)p->tempBuf[3] << 8)
+ | ((UInt32)p->tempBuf[4]);
+ p->range = 0xFFFFFFFF;
+ p->tempBufSize = 0;
+
+ if (p->remainLen > kMatchSpecLenStart + 1)
+ {
+ SizeT numProbs = LzmaProps_GetNumProbs(&p->prop);
+ SizeT i;
+ CLzmaProb *probs = p->probs;
+ for (i = 0; i < numProbs; i++)
+ probs[i] = kBitModelTotal >> 1;
+ p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1;
+ p->state = 0;
+ }
+
+ p->remainLen = 0;
+ }
+
+ LzmaDec_WriteRem(p, dicLimit);
+
+ while (p->remainLen != kMatchSpecLenStart)
+ {
+ int checkEndMarkNow = 0;
+
+ if (p->dicPos >= dicLimit)
+ {
+ if (p->remainLen == 0 && p->code == 0)
+ {
+ *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK;
+ return SZ_OK;
+ }
+ if (finishMode == LZMA_FINISH_ANY)
+ {
+ *status = LZMA_STATUS_NOT_FINISHED;
+ return SZ_OK;
+ }
+ if (p->remainLen != 0)
+ {
+ *status = LZMA_STATUS_NOT_FINISHED;
+ return SZ_ERROR_DATA;
+ }
+ checkEndMarkNow = 1;
+ }
+
+ if (p->tempBufSize == 0)
+ {
+ SizeT processed;
+ const Byte *bufLimit;
+ if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)
+ {
+ int dummyRes = LzmaDec_TryDummy(p, src, inSize);
+ if (dummyRes == DUMMY_ERROR)
+ {
+ memcpy(p->tempBuf, src, inSize);
+ p->tempBufSize = (unsigned)inSize;
+ (*srcLen) += inSize;
+ *status = LZMA_STATUS_NEEDS_MORE_INPUT;
+ return SZ_OK;
+ }
+ if (checkEndMarkNow && dummyRes != DUMMY_MATCH)
+ {
+ *status = LZMA_STATUS_NOT_FINISHED;
+ return SZ_ERROR_DATA;
+ }
+ bufLimit = src;
+ }
+ else
+ bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX;
+ p->buf = src;
+ if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0)
+ return SZ_ERROR_DATA;
+ processed = (SizeT)(p->buf - src);
+ (*srcLen) += processed;
+ src += processed;
+ inSize -= processed;
+ }
+ else
+ {
+ unsigned rem = p->tempBufSize, lookAhead = 0;
+ while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize)
+ p->tempBuf[rem++] = src[lookAhead++];
+ p->tempBufSize = rem;
+ if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)
+ {
+ int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem);
+ if (dummyRes == DUMMY_ERROR)
+ {
+ (*srcLen) += lookAhead;
+ *status = LZMA_STATUS_NEEDS_MORE_INPUT;
+ return SZ_OK;
+ }
+ if (checkEndMarkNow && dummyRes != DUMMY_MATCH)
+ {
+ *status = LZMA_STATUS_NOT_FINISHED;
+ return SZ_ERROR_DATA;
+ }
+ }
+ p->buf = p->tempBuf;
+ if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0)
+ return SZ_ERROR_DATA;
+
+ {
+ unsigned kkk = (unsigned)(p->buf - p->tempBuf);
+ if (rem < kkk)
+ return SZ_ERROR_FAIL; /* some internal error */
+ rem -= kkk;
+ if (lookAhead < rem)
+ return SZ_ERROR_FAIL; /* some internal error */
+ lookAhead -= rem;
+ }
+ (*srcLen) += lookAhead;
+ src += lookAhead;
+ inSize -= lookAhead;
+ p->tempBufSize = 0;
+ }
+ }
+
+ if (p->code != 0)
+ return SZ_ERROR_DATA;
+ *status = LZMA_STATUS_FINISHED_WITH_MARK;
+ return SZ_OK;
+}
+
+
+SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status)
+{
+ SizeT outSize = *destLen;
+ SizeT inSize = *srcLen;
+ *srcLen = *destLen = 0;
+ for (;;)
+ {
+ SizeT inSizeCur = inSize, outSizeCur, dicPos;
+ ELzmaFinishMode curFinishMode;
+ SRes res;
+ if (p->dicPos == p->dicBufSize)
+ p->dicPos = 0;
+ dicPos = p->dicPos;
+ if (outSize > p->dicBufSize - dicPos)
+ {
+ outSizeCur = p->dicBufSize;
+ curFinishMode = LZMA_FINISH_ANY;
+ }
+ else
+ {
+ outSizeCur = dicPos + outSize;
+ curFinishMode = finishMode;
+ }
+
+ res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status);
+ src += inSizeCur;
+ inSize -= inSizeCur;
+ *srcLen += inSizeCur;
+ outSizeCur = p->dicPos - dicPos;
+ memcpy(dest, p->dic + dicPos, outSizeCur);
+ dest += outSizeCur;
+ outSize -= outSizeCur;
+ *destLen += outSizeCur;
+ if (res != 0)
+ return res;
+ if (outSizeCur == 0 || outSize == 0)
+ return SZ_OK;
+ }
+}
+
+void LzmaDec_FreeProbs(CLzmaDec *p, ISzAllocPtr alloc)
+{
+ ISzAlloc_Free(alloc, p->probs);
+ p->probs = NULL;
+}
+
+static void LzmaDec_FreeDict(CLzmaDec *p, ISzAllocPtr alloc)
+{
+ ISzAlloc_Free(alloc, p->dic);
+ p->dic = NULL;
+}
+
+void LzmaDec_Free(CLzmaDec *p, ISzAllocPtr alloc)
+{
+ LzmaDec_FreeProbs(p, alloc);
+ LzmaDec_FreeDict(p, alloc);
+}
+
+SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size)
+{
+ UInt32 dicSize;
+ Byte d;
+
+ if (size < LZMA_PROPS_SIZE)
+ return SZ_ERROR_UNSUPPORTED;
+ else
+ dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24);
+
+ if (dicSize < LZMA_DIC_MIN)
+ dicSize = LZMA_DIC_MIN;
+ p->dicSize = dicSize;
+
+ d = data[0];
+ if (d >= (9 * 5 * 5))
+ return SZ_ERROR_UNSUPPORTED;
+
+ p->lc = (Byte)(d % 9);
+ d /= 9;
+ p->pb = (Byte)(d / 5);
+ p->lp = (Byte)(d % 5);
+
+ return SZ_OK;
+}
+
+static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAllocPtr alloc)
+{
+ UInt32 numProbs = LzmaProps_GetNumProbs(propNew);
+ if (!p->probs || numProbs != p->numProbs)
+ {
+ LzmaDec_FreeProbs(p, alloc);
+ p->probs = (CLzmaProb *)ISzAlloc_Alloc(alloc, numProbs * sizeof(CLzmaProb));
+ if (!p->probs)
+ return SZ_ERROR_MEM;
+ p->probs_1664 = p->probs + 1664;
+ p->numProbs = numProbs;
+ }
+ return SZ_OK;
+}
+
+SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc)
+{
+ CLzmaProps propNew;
+ RINOK(LzmaProps_Decode(&propNew, props, propsSize));
+ RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
+ p->prop = propNew;
+ return SZ_OK;
+}
+
+SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc)
+{
+ CLzmaProps propNew;
+ SizeT dicBufSize;
+ RINOK(LzmaProps_Decode(&propNew, props, propsSize));
+ RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
+
+ {
+ UInt32 dictSize = propNew.dicSize;
+ SizeT mask = ((UInt32)1 << 12) - 1;
+ if (dictSize >= ((UInt32)1 << 30)) mask = ((UInt32)1 << 22) - 1;
+ else if (dictSize >= ((UInt32)1 << 22)) mask = ((UInt32)1 << 20) - 1;;
+ dicBufSize = ((SizeT)dictSize + mask) & ~mask;
+ if (dicBufSize < dictSize)
+ dicBufSize = dictSize;
+ }
+
+ if (!p->dic || dicBufSize != p->dicBufSize)
+ {
+ LzmaDec_FreeDict(p, alloc);
+ p->dic = (Byte *)ISzAlloc_Alloc(alloc, dicBufSize);
+ if (!p->dic)
+ {
+ LzmaDec_FreeProbs(p, alloc);
+ return SZ_ERROR_MEM;
+ }
+ }
+ p->dicBufSize = dicBufSize;
+ p->prop = propNew;
+ return SZ_OK;
+}
+
+SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
+ const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
+ ELzmaStatus *status, ISzAllocPtr alloc)
+{
+ CLzmaDec p;
+ SRes res;
+ SizeT outSize = *destLen, inSize = *srcLen;
+ *destLen = *srcLen = 0;
+ *status = LZMA_STATUS_NOT_SPECIFIED;
+ if (inSize < RC_INIT_SIZE)
+ return SZ_ERROR_INPUT_EOF;
+ LzmaDec_Construct(&p);
+ RINOK(LzmaDec_AllocateProbs(&p, propData, propSize, alloc));
+ p.dic = dest;
+ p.dicBufSize = outSize;
+ LzmaDec_Init(&p);
+ *srcLen = inSize;
+ res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status);
+ *destLen = p.dicPos;
+ if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT)
+ res = SZ_ERROR_INPUT_EOF;
+ LzmaDec_FreeProbs(&p, alloc);
+ return res;
+}
diff --git a/games/deltarune/src/lzma/LzmaDec.h b/games/deltarune/src/lzma/LzmaDec.h
new file mode 100644
index 00000000..28ce60c3
--- /dev/null
+++ b/games/deltarune/src/lzma/LzmaDec.h
@@ -0,0 +1,234 @@
+/* LzmaDec.h -- LZMA Decoder
+2018-04-21 : Igor Pavlov : Public domain */
+
+#ifndef __LZMA_DEC_H
+#define __LZMA_DEC_H
+
+#include "7zTypes.h"
+
+EXTERN_C_BEGIN
+
+/* #define _LZMA_PROB32 */
+/* _LZMA_PROB32 can increase the speed on some CPUs,
+ but memory usage for CLzmaDec::probs will be doubled in that case */
+
+typedef
+#ifdef _LZMA_PROB32
+ UInt32
+#else
+ UInt16
+#endif
+ CLzmaProb;
+
+
+/* ---------- LZMA Properties ---------- */
+
+#define LZMA_PROPS_SIZE 5
+
+typedef struct _CLzmaProps
+{
+ Byte lc;
+ Byte lp;
+ Byte pb;
+ Byte _pad_;
+ UInt32 dicSize;
+} CLzmaProps;
+
+/* LzmaProps_Decode - decodes properties
+Returns:
+ SZ_OK
+ SZ_ERROR_UNSUPPORTED - Unsupported properties
+*/
+
+SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size);
+
+
+/* ---------- LZMA Decoder state ---------- */
+
+/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case.
+ Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */
+
+#define LZMA_REQUIRED_INPUT_MAX 20
+
+typedef struct
+{
+ /* Don't change this structure. ASM code can use it. */
+ CLzmaProps prop;
+ CLzmaProb *probs;
+ CLzmaProb *probs_1664;
+ Byte *dic;
+ SizeT dicBufSize;
+ SizeT dicPos;
+ const Byte *buf;
+ UInt32 range;
+ UInt32 code;
+ UInt32 processedPos;
+ UInt32 checkDicSize;
+ UInt32 reps[4];
+ UInt32 state;
+ UInt32 remainLen;
+
+ UInt32 numProbs;
+ unsigned tempBufSize;
+ Byte tempBuf[LZMA_REQUIRED_INPUT_MAX];
+} CLzmaDec;
+
+#define LzmaDec_Construct(p) { (p)->dic = NULL; (p)->probs = NULL; }
+
+void LzmaDec_Init(CLzmaDec *p);
+
+/* There are two types of LZMA streams:
+ - Stream with end mark. That end mark adds about 6 bytes to compressed size.
+ - Stream without end mark. You must know exact uncompressed size to decompress such stream. */
+
+typedef enum
+{
+ LZMA_FINISH_ANY, /* finish at any point */
+ LZMA_FINISH_END /* block must be finished at the end */
+} ELzmaFinishMode;
+
+/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!!
+
+ You must use LZMA_FINISH_END, when you know that current output buffer
+ covers last bytes of block. In other cases you must use LZMA_FINISH_ANY.
+
+ If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK,
+ and output value of destLen will be less than output buffer size limit.
+ You can check status result also.
+
+ You can use multiple checks to test data integrity after full decompression:
+ 1) Check Result and "status" variable.
+ 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize.
+ 3) Check that output(srcLen) = compressedSize, if you know real compressedSize.
+ You must use correct finish mode in that case. */
+
+typedef enum
+{
+ LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */
+ LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */
+ LZMA_STATUS_NOT_FINISHED, /* stream was not finished */
+ LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */
+ LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */
+} ELzmaStatus;
+
+/* ELzmaStatus is used only as output value for function call */
+
+
+/* ---------- Interfaces ---------- */
+
+/* There are 3 levels of interfaces:
+ 1) Dictionary Interface
+ 2) Buffer Interface
+ 3) One Call Interface
+ You can select any of these interfaces, but don't mix functions from different
+ groups for same object. */
+
+
+/* There are two variants to allocate state for Dictionary Interface:
+ 1) LzmaDec_Allocate / LzmaDec_Free
+ 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs
+ You can use variant 2, if you set dictionary buffer manually.
+ For Buffer Interface you must always use variant 1.
+
+LzmaDec_Allocate* can return:
+ SZ_OK
+ SZ_ERROR_MEM - Memory allocation error
+ SZ_ERROR_UNSUPPORTED - Unsupported properties
+*/
+
+SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc);
+void LzmaDec_FreeProbs(CLzmaDec *p, ISzAllocPtr alloc);
+
+SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc);
+void LzmaDec_Free(CLzmaDec *p, ISzAllocPtr alloc);
+
+/* ---------- Dictionary Interface ---------- */
+
+/* You can use it, if you want to eliminate the overhead for data copying from
+ dictionary to some other external buffer.
+ You must work with CLzmaDec variables directly in this interface.
+
+ STEPS:
+ LzmaDec_Construct()
+ LzmaDec_Allocate()
+ for (each new stream)
+ {
+ LzmaDec_Init()
+ while (it needs more decompression)
+ {
+ LzmaDec_DecodeToDic()
+ use data from CLzmaDec::dic and update CLzmaDec::dicPos
+ }
+ }
+ LzmaDec_Free()
+*/
+
+/* LzmaDec_DecodeToDic
+
+ The decoding to internal dictionary buffer (CLzmaDec::dic).
+ You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!
+
+finishMode:
+ It has meaning only if the decoding reaches output limit (dicLimit).
+ LZMA_FINISH_ANY - Decode just dicLimit bytes.
+ LZMA_FINISH_END - Stream must be finished after dicLimit.
+
+Returns:
+ SZ_OK
+ status:
+ LZMA_STATUS_FINISHED_WITH_MARK
+ LZMA_STATUS_NOT_FINISHED
+ LZMA_STATUS_NEEDS_MORE_INPUT
+ LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
+ SZ_ERROR_DATA - Data error
+*/
+
+SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit,
+ const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
+
+
+/* ---------- Buffer Interface ---------- */
+
+/* It's zlib-like interface.
+ See LzmaDec_DecodeToDic description for information about STEPS and return results,
+ but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need
+ to work with CLzmaDec variables manually.
+
+finishMode:
+ It has meaning only if the decoding reaches output limit (*destLen).
+ LZMA_FINISH_ANY - Decode just destLen bytes.
+ LZMA_FINISH_END - Stream must be finished after (*destLen).
+*/
+
+SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
+ const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
+
+
+/* ---------- One Call Interface ---------- */
+
+/* LzmaDecode
+
+finishMode:
+ It has meaning only if the decoding reaches output limit (*destLen).
+ LZMA_FINISH_ANY - Decode just destLen bytes.
+ LZMA_FINISH_END - Stream must be finished after (*destLen).
+
+Returns:
+ SZ_OK
+ status:
+ LZMA_STATUS_FINISHED_WITH_MARK
+ LZMA_STATUS_NOT_FINISHED
+ LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
+ SZ_ERROR_DATA - Data error
+ SZ_ERROR_MEM - Memory allocation error
+ SZ_ERROR_UNSUPPORTED - Unsupported properties
+ SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
+*/
+
+SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
+ const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
+ ELzmaStatus *status, ISzAllocPtr alloc);
+
+EXTERN_C_END
+
+#endif
diff --git a/games/deltarune/src/lzma/Precomp.h b/games/deltarune/src/lzma/Precomp.h
new file mode 100644
index 00000000..fdaa2452
--- /dev/null
+++ b/games/deltarune/src/lzma/Precomp.h
@@ -0,0 +1,5 @@
+/* Precomp.h -- StdAfx
+2013-11-12 : Igor Pavlov : Public domain */
+#ifndef __7Z_PRECOMP_H
+#define __7Z_PRECOMP_H
+#endif
diff --git a/games/deltarune/src/main.c b/games/deltarune/src/main.c
new file mode 100644
index 00000000..46615578
--- /dev/null
+++ b/games/deltarune/src/main.c
@@ -0,0 +1,48 @@
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC optimize("Os") /* not drawn every frame: smaller over faster */
+#endif
+/* Deltarune for the NumWorks calculator.
+ *
+ * Inspired by Deltarune by Toby Fox, not affiliated with him.
+ * Made by Mason Chen as part of NumPlay. */
+#include "game.h"
+#include "gfx.h"
+#include "plat.h"
+#include "res.h"
+
+#ifndef HOST
+const char eadk_app_name[] __attribute__((section(".rodata.eadk_app_name"))) = "Deltarune";
+const uint32_t eadk_api_level __attribute__((section(".rodata.eadk_api_level"))) = 0;
+extern const uint8_t dr_data[];
+
+uint32_t perf_frames __attribute__((used)); /* read by tools/emu.py */
+uint32_t perf_updates __attribute__((used));
+
+int main(void) {
+ uint16_t band[SCREEN_W * GFX_BAND]; /* (here: on the stack, out of the RAM apps get) */
+ gfx_set_band_memory(band);
+ plat_begin();
+ dr_bin = dr_data;
+ game_init();
+ uint32_t next = plat_millis() * 3; /* in thirds of a millisecond: 100 per frame, as the game's 30 a second */
+ while (g_running) {
+ /* the game's frames: drawn when caught up (at most 2 updates per drawing) */
+ int n = 0;
+ uint32_t now = plat_millis() * 3;
+ while ((int32_t)(now - next) >= 0 && n < 2 && g_running) {
+ game_frame(plat_keys());
+ perf_updates++;
+ next += 100;
+ n++;
+ }
+ if (!g_running) break;
+ if ((int32_t)(now - next) > 600) next = now; /* far behind: do not rush */
+ if (n) {
+ game_draw();
+ perf_frames++;
+ } else
+ plat_sleep(1);
+ }
+ return plat_end();
+}
+#endif
diff --git a/games/deltarune/src/menu.c b/games/deltarune/src/menu.c
new file mode 100644
index 00000000..e7508b2b
--- /dev/null
+++ b/games/deltarune/src/menu.c
@@ -0,0 +1,211 @@
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC optimize("Os")
+#endif
+/* The menus (menu.h). */
+#include <stdio.h>
+#include <string.h>
+#include "game.h"
+#include "gfx.h"
+#include "menu.h"
+#include "plat.h"
+#include "res.h"
+#include "rooms.h"
+#include "save.h"
+#include "tables.h"
+#include "text.h"
+#include "world.h"
+
+#define GREY rgb565(0x808080)
+
+/* ---------------------------------------------------------------- the vessel's name */
+static int nm_sel, nm_len;
+static const char nm_letters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+
+void menu_name_start(void) {
+ memset(sv.name, 0, sizeof sv.name);
+ nm_sel = 0, nm_len = 0;
+ g_mode = MODE_INTRO;
+}
+
+void menu_name_update(void) {
+ /* 26 letters on 4 rows of 7, then BACK and END */
+ int n = 26 + 2;
+ if (g_pressed & K_LEFT) nm_sel = (nm_sel + n - 1) % n;
+ if (g_pressed & K_RIGHT) nm_sel = (nm_sel + 1) % n;
+ if (g_pressed & K_UP) nm_sel = nm_sel >= 26 ? 21 + (nm_sel - 26) * 3 : nm_sel >= 7 ? nm_sel - 7 : 26;
+ if (g_pressed & K_DOWN) nm_sel = nm_sel >= 26 ? nm_sel - 26 : nm_sel + 7 < 26 ? nm_sel + 7 : 26 + (nm_sel % 7 > 3);
+ if (g_pressed & K_X) {
+ if (nm_len) sv.name[--nm_len] = 0;
+ }
+ if (g_pressed & K_Z) {
+ if (nm_sel < 26) {
+ if (nm_len < 12) sv.name[nm_len++] = nm_letters[nm_sel];
+ } else if (nm_sel == 26) {
+ if (nm_len) sv.name[--nm_len] = 0;
+ } else if (nm_len) {
+ game_new();
+ }
+ }
+}
+
+void menu_name_draw(void) {
+ gfx_rect(0, 0, SCREEN_W, SCREEN_H, C_BLACK, 255);
+ const char *t = "ENTER YOUR NAME.";
+ gfx_text(FONT_MAIN, 160 - gfx_text_width(FONT_MAIN, t, 64) / 2, 30, t, C_WHITE, 255);
+ gfx_text(FONT_MAIN, 160 - nm_len * 4, 60, sv.name, C_WHITE, 255);
+ for (int i = 0; i < 26; i++) {
+ char s[2] = {nm_letters[i], 0};
+ gfx_text(FONT_MAIN, 76 + (i % 7) * 26, 100 + (i / 7) * 22, s, nm_sel == i ? C_YELLOW : C_WHITE, 255);
+ }
+ gfx_text(FONT_MAIN, 80, 196, "BACK", nm_sel == 26 ? C_YELLOW : C_WHITE, 255);
+ gfx_text(FONT_MAIN, 200, 196, "END", nm_sel == 27 ? C_YELLOW : C_WHITE, 255);
+ gfx_text(FONT_SMALL, 6, 228, "OK letter Back erase", GREY, 255);
+}
+
+/* ---------------------------------------------------------------- the SAVE menu (obj_savemenu) */
+static int sm_state; /* 0 Save/Return, 1 saved, 2 done */
+static int sm_sel;
+static bool menu_from_save;
+
+void menu_save_open(void) {
+ sm_state = 0, sm_sel = 0;
+ menu_from_save = true;
+ g_mode = MODE_MENU;
+}
+bool menu_save_done(void) { return !menu_from_save; }
+
+static void time_text(char *buf, uint32_t frames) {
+ uint32_t s = frames / 30;
+ snprintf(buf, 16, "%lu:%02lu", (unsigned long)(s / 60), (unsigned long)(s % 60));
+}
+
+static void save_update(void) {
+ if (sm_state == 0) {
+ if (g_pressed & (K_LEFT | K_RIGHT)) sm_sel ^= 1;
+ if (g_pressed & K_Z) {
+ if (sm_sel == 0) {
+ sv.room = (int16_t)g_room, sv.x = (int16_t)pl.x, sv.y = (int16_t)pl.y, sv.facing = pl.dir;
+ save_write();
+ sm_state = 1;
+ } else {
+ sm_state = 2;
+ }
+ }
+ if (g_pressed & K_X) sm_state = 2;
+ } else if (sm_state == 1) {
+ if (g_pressed & (K_Z | K_X)) sm_state = 2;
+ }
+ if (sm_state == 2) {
+ menu_from_save = false;
+ g_mode = MODE_WORLD;
+ }
+}
+
+static void save_draw(void) {
+ world_draw_scene();
+ bool dark = world_dark();
+ int x0 = 54, y0 = 49, w = 212, h = 82;
+ if (dark) {
+ gfx_rect(x0, y0, w, h, C_BLACK, 255);
+ gfx_frame_rect(x0, y0, w, h, 3, C_WHITE);
+ } else {
+ gfx_rect(x0, y0, w, h, C_WHITE, 255);
+ gfx_rect(x0 + 3, y0 + 3, w - 6, h - 6, C_BLACK, 255);
+ }
+ uint16_t col = sm_state == 1 ? C_YELLOW : C_WHITE;
+ char buf[32];
+ gfx_text(FONT_MAIN, x0 + 16, y0 + 12, sv.name, col, 255);
+ snprintf(buf, sizeof buf, "LV %d", sv.lv);
+ gfx_text(FONT_MAIN, x0 + 100, y0 + 12, buf, col, 255);
+ time_text(buf, sv.time);
+ gfx_text(FONT_MAIN, x0 + w - 16 - gfx_text_width(FONT_MAIN, buf, 16), y0 + 12, buf, col, 255);
+ gfx_text(FONT_MAIN, x0 + 16, y0 + 32, room_title(g_room), col, 255);
+ if (sm_state == 1) {
+ gfx_text(FONT_MAIN, x0 + 30, y0 + 58, "File saved.", C_YELLOW, 255);
+ } else {
+ gfx_text(FONT_MAIN, x0 + 30, y0 + 58, "Save", sm_sel == 0 ? C_YELLOW : C_WHITE, 255);
+ gfx_text(FONT_MAIN, x0 + 120, y0 + 58, "Return", sm_sel == 1 ? C_YELLOW : C_WHITE, 255);
+ gfx_sprite(spr_heartsmall, 0, x0 + (sm_sel ? 106 : 16), y0 + 62, 0, 255);
+ }
+}
+
+/* ---------------------------------------------------------------- the C menu */
+static int cm_sel, cm_sub, cm_state;
+
+void menu_open(void) {
+ menu_from_save = false;
+ cm_sel = 0, cm_sub = 0, cm_state = 0;
+ g_mode = MODE_MENU;
+}
+
+static int item_slots(void) {
+ int n = 0;
+ while (n < NITEMS && sv.item[n]) n++;
+ return n;
+}
+
+static void cmenu_update(void) {
+ if (cm_state == 0) {
+ if (g_pressed & K_LEFT) cm_sel = (cm_sel + 3) % 4;
+ if (g_pressed & K_RIGHT) cm_sel = (cm_sel + 1) % 4;
+ if (g_pressed & (K_X | K_C)) g_mode = MODE_WORLD;
+ if ((g_pressed & K_Z) && cm_sel == 0 && item_slots()) cm_state = 1, cm_sub = 0;
+ } else {
+ int n = item_slots();
+ if (g_pressed & K_UP) cm_sub = (cm_sub + n - 1) % (n ? n : 1);
+ if (g_pressed & K_DOWN) cm_sub = (cm_sub + 1) % (n ? n : 1);
+ if (g_pressed & K_X) cm_state = 0;
+ }
+}
+
+static void cmenu_draw(void) {
+ world_draw_scene();
+ /* the top bar: four buttons, and the money */
+ gfx_rect(0, 0, SCREEN_W, 40, C_BLACK, 255);
+ static const char *names[4] = {"ITEM", "EQUIP", "POWER", "CONFIG"};
+ for (int i = 0; i < 4; i++) {
+ int x = 60 + i * 50;
+ gfx_text(FONT_SMALL, x, 6, names[i], cm_sel == i ? C_YELLOW : GREY, 255);
+ }
+ char buf[24];
+ snprintf(buf, sizeof buf, "D$ %ld", (long)sv.gold);
+ gfx_text(FONT_MAIN, 250, 12, buf, C_WHITE, 255);
+ if (cm_state == 1) {
+ gfx_rect(40, 60, 240, 120, C_BLACK, 255);
+ gfx_frame_rect(40, 60, 240, 120, 2, C_WHITE);
+ for (int i = 0; i < item_slots(); i++) {
+ const ItemDef *d = &item_defs[sv.item[i] < item_count ? sv.item[i] : 0];
+ gfx_text(FONT_MAIN, 66 + (i % 2) * 110, 70 + (i / 2) * 18, d->name != 0xFFFF ? str(d->name) : "?",
+ cm_sub == i ? C_YELLOW : C_WHITE, 255);
+ }
+ }
+}
+
+void menu_update(void) {
+ if (menu_from_save) save_update();
+ else cmenu_update();
+}
+void menu_draw(void) {
+ if (menu_from_save) save_draw();
+ else cmenu_draw();
+}
+
+/* ---------------------------------------------------------------- the game over */
+static int go_t;
+void menu_gameover_start(void) {
+ go_t = 0;
+ g_mode = MODE_GAMEOVER;
+}
+void menu_gameover_update(void) {
+ go_t++;
+ if (go_t > 60 && (g_pressed & K_Z)) {
+ if (!save_load()) {
+ g_mode = MODE_TITLE;
+ }
+ }
+}
+void menu_gameover_draw(void) {
+ gfx_rect(0, 0, SCREEN_W, SCREEN_H, C_BLACK, 255);
+ const char *t = "GAME OVER";
+ gfx_text(FONT_MAIN, 160 - gfx_text_width(FONT_MAIN, t, 16) / 2, 100, t, C_WHITE, 255);
+}
diff --git a/games/deltarune/src/menu.h b/games/deltarune/src/menu.h
new file mode 100644
index 00000000..8138e37f
--- /dev/null
+++ b/games/deltarune/src/menu.h
@@ -0,0 +1,18 @@
+/* Deltarune: the menus. The vessel's name, the C menu (the Dark World's ITEM, EQUIP, POWER, CONFIG; the
+ * Light World's ITEM, STAT, CELL), the SAVE menu and the game over. */
+#ifndef DR_MENU_H
+#define DR_MENU_H
+#include <stdbool.h>
+
+void menu_name_start(void);
+void menu_name_update(void);
+void menu_name_draw(void);
+void menu_open(void); /* C */
+void menu_save_open(void); /* a SAVE point's */
+bool menu_save_done(void);
+void menu_update(void);
+void menu_draw(void);
+void menu_gameover_start(void);
+void menu_gameover_update(void);
+void menu_gameover_draw(void);
+#endif
diff --git a/games/deltarune/src/plat.h b/games/deltarune/src/plat.h
new file mode 100644
index 00000000..b21d4bb2
--- /dev/null
+++ b/games/deltarune/src/plat.h
@@ -0,0 +1,40 @@
+/* Deltarune: the platform (the calculator, or a computer for tests).
+ *
+ * plat_eadk.c: the calculator's EADK display, keyboard, time and files.
+ * plat_host.c: a frame buffer that tests save as images, scripted keys and
+ * simulated time (tests/play.c). */
+#ifndef DR_PLAT_H
+#define DR_PLAT_H
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+
+#define SCREEN_W 320
+#define SCREEN_H 240
+
+/* keys held now, as bits: the game's Z, X and C are OK, Back and toolbox */
+enum {
+ K_LEFT = 1 << 0, K_RIGHT = 1 << 1, K_UP = 1 << 2, K_DOWN = 1 << 3,
+ K_Z = 1 << 4, /* OK, EXE: confirm */
+ K_X = 1 << 5, /* Back: cancel */
+ K_C = 1 << 6, /* toolbox, shift: the menu */
+ K_HOME = 1 << 7, /* Home, On/Off: save the moment and quit */
+ K_ANY = 1 << 8
+};
+uint32_t plat_keys(void);
+uint32_t plat_millis(void);
+void plat_sleep(uint32_t ms);
+void plat_push(int x, int y, int w, int h, const uint16_t *px);
+void plat_fill(int x, int y, int w, int h, uint16_t c);
+bool plat_save(const char *name, const void *data, uint32_t len);
+const uint8_t *plat_load(const char *name, uint32_t *len); /* NULL if absent */
+/* a file of len bytes to write in place (the calculator's storage is RAM): plat_reserve gives its
+ * bytes, plat_reserved says they are written; NULL if there is no room */
+uint8_t *plat_reserve(const char *name, uint32_t len);
+void plat_reserved(const char *name, uint32_t len);
+bool plat_remove(const char *name);
+void plat_begin(void);
+int plat_end(void);
+/* an N0110 or N0115 (216 MHz, the N0120 has 550) */
+bool plat_slow(void);
+#endif
diff --git a/games/deltarune/src/plat_eadk.c b/games/deltarune/src/plat_eadk.c
new file mode 100644
index 00000000..4d67782a
--- /dev/null
+++ b/games/deltarune/src/plat_eadk.c
@@ -0,0 +1,42 @@
+/* The calculator: EADK display, keyboard, time and files. */
+#include <eadk.h>
+#include "../../common/epsilon_app.h"
+#include "../../common/epsilon_files.h"
+#include "plat.h"
+
+#define KEY(k) ((uint64_t)1 << (k))
+
+uint32_t plat_keys(void) {
+ uint64_t k = eadk_keyboard_scan();
+ uint32_t r = 0;
+ if (k & (KEY(eadk_key_left) | KEY(eadk_key_four))) r |= K_LEFT;
+ if (k & (KEY(eadk_key_right) | KEY(eadk_key_six))) r |= K_RIGHT;
+ if (k & (KEY(eadk_key_up) | KEY(eadk_key_eight))) r |= K_UP;
+ if (k & (KEY(eadk_key_down) | KEY(eadk_key_two))) r |= K_DOWN;
+ if (k & (KEY(eadk_key_ok) | KEY(eadk_key_exe) | KEY(eadk_key_five))) r |= K_Z;
+ if (k & (KEY(eadk_key_back) | KEY(eadk_key_backspace))) r |= K_X;
+ if (k & (KEY(eadk_key_toolbox) | KEY(eadk_key_shift) | KEY(eadk_key_var))) r |= K_C;
+ if (k & (KEY(eadk_key_home) | KEY(eadk_key_on_off))) r |= K_HOME;
+ if (k) r |= K_ANY;
+ return r;
+}
+
+uint32_t plat_millis(void) { return (uint32_t)eadk_timing_millis(); }
+void plat_sleep(uint32_t ms) { eadk_timing_msleep(ms); }
+void plat_push(int x, int y, int w, int h, const uint16_t *px) {
+ eadk_display_push_rect((eadk_rect_t){(uint16_t)x, (uint16_t)y, (uint16_t)w, (uint16_t)h}, px);
+}
+void plat_fill(int x, int y, int w, int h, uint16_t c) {
+ if (w > 0 && h > 0) eadk_display_push_rect_uniform((eadk_rect_t){(uint16_t)x, (uint16_t)y, (uint16_t)w, (uint16_t)h}, c);
+}
+bool plat_save(const char *name, const void *data, uint32_t len) { return ef_write(name, data, len); }
+const uint8_t *plat_load(const char *name, uint32_t *len) { return ef_read(name, len); }
+uint8_t *plat_reserve(const char *name, uint32_t len) {
+ uint32_t n;
+ return ef_write(name, NULL, len) ? (uint8_t *)(uintptr_t)ef_read(name, &n) : NULL; /* (the storage is RAM) */
+}
+void plat_reserved(const char *name, uint32_t len) { (void)name, (void)len; }
+bool plat_remove(const char *name) { return ef_remove(name); }
+void plat_begin(void) { np_app_begin(); }
+int plat_end(void) { return np_app_end(); }
+bool plat_slow(void) { return epsilon_slow_model(); }
diff --git a/games/deltarune/src/plat_host.c b/games/deltarune/src/plat_host.c
new file mode 100644
index 00000000..047ec744
--- /dev/null
+++ b/games/deltarune/src/plat_host.c
@@ -0,0 +1,76 @@
+/* A computer: the screen goes to a frame buffer that tests save as images,
+ * keys come from a script, time is simulated. */
+#include <stdio.h>
+#include <stdlib.h>
+#include "plat.h"
+
+uint16_t host_fb[SCREEN_W * SCREEN_H];
+uint32_t host_time; /* ms */
+uint32_t host_keys;
+
+uint32_t plat_keys(void) { return host_keys; }
+uint32_t plat_millis(void) { return host_time; }
+void plat_sleep(uint32_t ms) { host_time += ms; }
+void plat_push(int x, int y, int w, int h, const uint16_t *px) {
+ for (int r = 0; r < h; r++)
+ for (int c = 0; c < w; c++)
+ if ((unsigned)(x + c) < SCREEN_W && (unsigned)(y + r) < SCREEN_H) host_fb[(y + r) * SCREEN_W + x + c] = px[r * w + c];
+}
+void plat_fill(int x, int y, int w, int h, uint16_t c) {
+ for (int r = 0; r < h; r++)
+ for (int k = 0; k < w; k++)
+ if ((unsigned)(x + k) < SCREEN_W && (unsigned)(y + r) < SCREEN_H) host_fb[(y + r) * SCREEN_W + x + k] = c;
+}
+
+static char save_dir[256] = "build/host-saves";
+void host_save_dir(const char *d) { snprintf(save_dir, sizeof save_dir, "%s", d); }
+bool plat_save(const char *name, const void *data, uint32_t len) {
+ char p[512];
+ snprintf(p, sizeof p, "%s/%s", save_dir, name);
+ FILE *f = fopen(p, "wb");
+ if (!f) return false;
+ bool ok = fwrite(data, 1, len, f) == len;
+ fclose(f);
+ return ok;
+}
+/* (each file read gets its own buffer: callers may hold two at once) */
+static uint8_t loaded[4][1 << 16];
+static int next_load;
+const uint8_t *plat_load(const char *name, uint32_t *len) {
+ char p[512];
+ snprintf(p, sizeof p, "%s/%s", save_dir, name);
+ FILE *f = fopen(p, "rb");
+ if (!f) return NULL;
+ uint8_t *b = loaded[next_load++ & 3];
+ *len = (uint32_t)fread(b, 1, sizeof loaded[0], f);
+ fclose(f);
+ return b;
+}
+static uint8_t reserved[1 << 16];
+bool host_storage_full; /* tests: no room for any file */
+uint8_t *plat_reserve(const char *name, uint32_t len) {
+ (void)name;
+ return len <= sizeof reserved && !host_storage_full ? reserved : NULL;
+}
+void plat_reserved(const char *name, uint32_t len) { plat_save(name, reserved, len); }
+bool plat_remove(const char *name) {
+ char p[512];
+ snprintf(p, sizeof p, "%s/%s", save_dir, name);
+ return remove(p) == 0;
+}
+void plat_begin(void) {}
+int plat_end(void) { return 0; }
+bool plat_slow(void) { return false; }
+
+/* writes the screen as a PPM image */
+void host_shot(const char *path) {
+ FILE *f = fopen(path, "wb");
+ if (!f) return;
+ fprintf(f, "P6\n%d %d\n255\n", SCREEN_W, SCREEN_H);
+ for (int i = 0; i < SCREEN_W * SCREEN_H; i++) {
+ uint16_t c = host_fb[i];
+ uint8_t rgb[3] = {(uint8_t)((c >> 11) * 255 / 31), (uint8_t)(((c >> 5) & 63) * 255 / 63), (uint8_t)((c & 31) * 255 / 31)};
+ fwrite(rgb, 1, 3, f);
+ }
+ fclose(f);
+}
diff --git a/games/deltarune/src/res.c b/games/deltarune/src/res.c
new file mode 100644
index 00000000..b121f7bb
--- /dev/null
+++ b/games/deltarune/src/res.c
@@ -0,0 +1,87 @@
+/* data.bin: sections, sprites, tiles, rooms and texts (see res.h). */
+#include <stddef.h>
+#include "blk.h"
+#include "res.h"
+
+const uint8_t *dr_bin;
+
+int spr_frames(uint16_t spr) {
+ const uint8_t *s = section(SEC_SPRITES);
+ if (spr >= rd32(s)) return 0;
+ return rd16(s + 4 + 4 * spr + 2);
+}
+
+/* a frame's or tile's bytes: in its block, unpacked (blk.h) */
+static const uint8_t *in_block(int sec, int k) {
+ const uint8_t *t = section(sec);
+ if ((uint32_t)k >= rd32(t)) return NULL;
+ t += 4 + 4 * k;
+ const uint8_t *b = blk_get(rd16(t));
+ return b ? b + rd16(t + 2) : NULL;
+}
+
+bool frame_get(uint16_t spr, int i, Frame *f) {
+ const uint8_t *s = section(SEC_SPRITES);
+ if (spr >= rd32(s)) return false;
+ int first = rd16(s + 4 + 4 * spr), n = rd16(s + 4 + 4 * spr + 2);
+ if (n <= 0) return false;
+ i %= n;
+ if (i < 0) i += n;
+ const uint8_t *p = in_block(SEC_FRAMES, first + i);
+ if (!p) return false;
+ f->w = rd16(p), f->h = rd16(p + 2);
+ f->ox = rds16(p + 4), f->oy = rds16(p + 6);
+ f->bpp = p[8], f->ncol = p[9];
+ f->pal = p + 10;
+ uint32_t o = 10 + 2u * f->ncol;
+ f->rows = p + o;
+ f->data = p + o + 2u * f->h;
+ return true;
+}
+
+int spr_w(uint16_t spr) {
+ Frame f;
+ return frame_get(spr, 0, &f) ? f.w : 0;
+}
+int spr_h(uint16_t spr) {
+ Frame f;
+ return frame_get(spr, 0, &f) ? f.h : 0;
+}
+
+void tile_get(uint16_t id, Tile *t) {
+ static const uint8_t black[4] = {0, 1, 0, 0};
+ const uint8_t *p = in_block(SEC_TILES, id);
+ if (!p) p = black;
+ t->bpp = p[0] & 0x7F, t->clear = (p[0] & 0x80) != 0, t->ncol = p[1];
+ t->pal = p + 2;
+ t->bits = p + 2 + 2 * t->ncol;
+}
+
+void room_info(int room, RoomInfo *r) {
+ const uint8_t *s = section(SEC_ROOMS);
+ if ((uint32_t)room >= rd32(s)) room = 0;
+ const uint8_t *p = s + 4 + 32 * room;
+ r->w = rd16(p), r->h = rd16(p + 2), r->gcols = rd16(p + 4), r->grows = rd16(p + 6);
+ const uint8_t *grid = section(SEC_GRID);
+ r->grid = grid + 2 * rd32(p + 8);
+ uint32_t f = rd32(p + 12);
+ r->fgrid = f == 0xFFFFFFFFu ? NULL : grid + 2 * f;
+ r->solids = section(SEC_SOLIDS) + 10 * rd32(p + 16);
+ r->nsolid = rd16(p + 20);
+ r->insts = section(SEC_INSTS) + 12 * rd32(p + 22);
+ r->ninst = rd16(p + 26);
+ r->flags = p[28];
+ r->bgcol = rd16(p + 30);
+}
+
+void room_inst(const RoomInfo *r, int i, Inst *o) {
+ const uint8_t *p = r->insts + 12 * i;
+ o->obj = rd16(p), o->x = rds16(p + 2), o->y = rds16(p + 4), o->sx = rds16(p + 6), o->sy = rds16(p + 8);
+ o->n = rd16(p + 10);
+}
+
+const char *str(uint16_t id) {
+ const uint8_t *s = section(SEC_STRINGS);
+ if (id >= rd32(s)) return "";
+ return (const char *)s + rd32(s + 4 + 4 * id);
+}
diff --git a/games/deltarune/src/res.h b/games/deltarune/src/res.h
new file mode 100644
index 00000000..3927575c
--- /dev/null
+++ b/games/deltarune/src/res.h
@@ -0,0 +1,67 @@
+/* Deltarune: data.bin (tools/pack.py), read where it lies in flash.
+ *
+ * Its sections (SEC_* in data.h): the original's sprites and their frames,
+ * the rooms (tile grids, solids, instances), fonts and texts. Frames and tiles
+ * are packed in LZMA blocks (blk.h): their pointers hold until the next
+ * frame_get or tile_get. */
+#ifndef DR_RES_H
+#define DR_RES_H
+#include <stdbool.h>
+#include <stdint.h>
+#include "data.h"
+
+extern const uint8_t *dr_bin;
+static inline uint16_t rd16(const uint8_t *p) { return (uint16_t)(p[0] | p[1] << 8); }
+static inline int16_t rds16(const uint8_t *p) { return (int16_t)rd16(p); }
+static inline uint32_t rd32(const uint8_t *p) { return p[0] | p[1] << 8 | p[2] << 16 | (uint32_t)p[3] << 24; }
+static inline const uint8_t *section(int s) { return dr_bin + rd32(dr_bin + 8 + 4 * s); }
+
+/* a sprite's frame: its size and origin, palette and rows */
+typedef struct {
+ uint16_t w, h;
+ int16_t ox, oy;
+ uint8_t bpp, ncol;
+ const uint8_t *pal; /* ncol RGB565 colours (unaligned: read with rd16) */
+ const uint8_t *rows; /* u16 offsets of each row, from `data` */
+ const uint8_t *data;
+} Frame;
+bool frame_get(uint16_t spr, int i, Frame *f);
+int spr_frames(uint16_t spr);
+int spr_w(uint16_t spr);
+int spr_h(uint16_t spr);
+
+/* a 20 x 20 tile: bpp 0 (one colour), 1, 2, 4 or 8; clear: colour 0 is see-through */
+typedef struct {
+ uint8_t bpp, ncol;
+ bool clear;
+ const uint8_t *pal; /* ncol RGB565 colours */
+ const uint8_t *bits; /* 400 pixels, bpp bits each, lowest bits first */
+} Tile;
+void tile_get(uint16_t id, Tile *t);
+
+/* a room: its size in the original's units (the Dark World's are twice the screen's), its tiles */
+typedef struct {
+ uint16_t w, h;
+ uint16_t gcols, grows;
+ const uint8_t *grid; /* gcols * grows tile ids (u16), 0xFFFF none */
+ const uint8_t *fgrid; /* the same, drawn over the characters; NULL none */
+ const uint8_t *solids; /* nsolid * 10 bytes */
+ const uint8_t *insts; /* ninst * 12 bytes */
+ uint16_t nsolid, ninst;
+ uint8_t flags;
+ uint16_t bgcol;
+} RoomInfo;
+#define ROOM_DARK 1
+void room_info(int room, RoomInfo *r);
+
+/* an instance the room places (of an object the game knows: OBJ ids in data.h) */
+typedef struct {
+ uint16_t obj;
+ int16_t x, y;
+ int16_t sx, sy; /* its scale, 1/100 */
+ uint16_t n; /* its place among the room's instances */
+} Inst;
+void room_inst(const RoomInfo *r, int i, Inst *out);
+
+const char *str(uint16_t id);
+#endif
diff --git a/games/deltarune/src/rooms.c b/games/deltarune/src/rooms.c
new file mode 100644
index 00000000..64701a93
--- /dev/null
+++ b/games/deltarune/src/rooms.c
@@ -0,0 +1,396 @@
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC optimize("Os")
+#endif
+/* The rooms' common things (rooms.h): doors and markers, SAVE points, what can be read or talked to,
+ * treasure, and the events by id. Each part's own rooms are in lw.c (the Light World) and dw.c (the Dark). */
+#include <string.h>
+#include "battle.h"
+#include "event.h"
+#include "game.h"
+#include "gmtexts.h"
+#include "menu.h"
+#include "rooms.h"
+#include "text.h"
+#include "world.h"
+
+/* every room of the chapter (they go in data.bin), in the original's order */
+const uint16_t chapter_rooms[] = {
+ room_krisroom, room_krishallway, room_torroom, room_torhouse, room_torbathroom, room_town_krisyard,
+ room_town_northwest, room_town_north, room_beach, room_town_mid, room_town_apartments, room_town_south,
+ room_town_school, room_town_church, room_graveyard, room_town_shelter, room_hospital_lobby, room_hospital_hallway,
+ room_hospital_rudy, room_hospital_room2, room_diner, room_townhall, room_flowershop_1f, room_flowershop_2f,
+ room_library, room_alphysalley, room_torielclass, room_schoollobby, room_alphysclass, room_schooldoor,
+ room_insidecloset, room_dark1, room_dark1a, room_dark2, room_dark3, room_dark3a, room_dark_wobbles,
+ room_dark_eyepuzzle, room_dark7, room_dark_chase1, room_dark_chase2, room_castle_outskirts, room_castle_town,
+ room_castle_front, room_castle_tutorial, room_castle_darkdoor, room_field_start, room_field_forest, room_field1,
+ room_field2, room_field2A, room_field_topchef, room_field_puzzle1, room_field_maze, room_field_puzzle2,
+ room_field_getsusie, room_field_shop1, room_field_puzzletutorial, room_field3, room_field_boxpuzzle, room_field4,
+ room_field_secret1, room_field_checkers4, room_field_checkers2, room_field_checkers6, room_field_checkers3,
+ room_field_checkers1, room_field_checkers5, room_field_checkers7, room_field_checkersboss,
+};
+
+int room_next(int room, int n) {
+ const uint8_t *o = section(SEC_ORDER);
+ int want = rd16(o + 2 * room) + n;
+ for (int i = 0; i < NUM_ROOMS; i++)
+ if (rd16(o + 2 * i) == want) return i;
+ return room;
+}
+
+/* scr_roomname: the name the SAVE menu shows (by the room's place in the original's order) */
+const char *room_title(int room) {
+ static const struct {
+ uint8_t orig;
+ uint16_t text;
+ } names[] = {
+ {2, scr_roomname_slash_scr_roomname_gml_3_0}, {35, scr_roomname_slash_scr_roomname_gml_4_0},
+ {40, scr_roomname_slash_scr_roomname_gml_5_0}, {45, scr_roomname_slash_scr_roomname_gml_6_0},
+ {49, scr_roomname_slash_scr_roomname_gml_7_0}, {59, scr_roomname_slash_scr_roomname_gml_8_0},
+ {68, scr_roomname_slash_scr_roomname_gml_9_0}, {71, scr_roomname_slash_scr_roomname_gml_10_0},
+ {73, scr_roomname_slash_scr_roomname_gml_11_0}, {82, scr_roomname_slash_scr_roomname_gml_12_0},
+ {90, scr_roomname_slash_scr_roomname_gml_13_0}, {96, scr_roomname_slash_scr_roomname_gml_14_0},
+ {97, scr_roomname_slash_scr_roomname_gml_15_0}, {107, scr_roomname_slash_scr_roomname_gml_16_0},
+ {114, scr_roomname_slash_scr_roomname_gml_17_0}, {123, scr_roomname_slash_scr_roomname_gml_18_0},
+ {126, scr_roomname_slash_scr_roomname_gml_19_0}, {111, scr_roomname_slash_scr_roomname_gml_20_0},
+ };
+ int orig = rd16(section(SEC_ORDER) + 2 * room);
+ for (unsigned i = 0; i < sizeof names / sizeof names[0]; i++)
+ if (names[i].orig == orig) return str(names[i].text);
+ return " ";
+}
+
+/* the doors: where each goes (obj_doorA..F: the next or previous rooms; X and W: by the room) */
+static int door_dest(int obj, int *entrance) {
+ switch (obj) {
+ case obj_doorA: case obj_doorA_musfade: *entrance = 1; return room_next(g_room, 1);
+ case obj_doorB: case obj_doorB_musfade: *entrance = 2; return room_next(g_room, -1);
+ case obj_doorC: case obj_doorC_musfade: *entrance = 4; return room_next(g_room, 2);
+ case obj_doorD: case obj_doorD_musfade: *entrance = 5; return room_next(g_room, -2);
+ case obj_doorE: *entrance = 6; return room_next(g_room, 3);
+ case obj_doorF: *entrance = 7; return room_next(g_room, -3);
+ case obj_doorX: case obj_doorX_musfade:
+ *entrance = 24;
+ switch (g_room) {
+ case room_castle_town: return room_castle_tutorial;
+ case room_castle_tutorial: return room_castle_town;
+ case room_town_south: return room_library;
+ case room_library: return room_town_south;
+ case room_town_church: return room_townhall;
+ case room_townhall: return room_town_church;
+ case room_schoollobby: return room_town_school;
+ case room_town_school: return room_schoollobby;
+ case room_town_mid: return room_diner;
+ case room_diner: return room_town_mid;
+ case room_town_north: return room_flowershop_1f;
+ case room_flowershop_1f: return room_town_north;
+ case room_torhouse: return room_town_krisyard;
+ case room_town_krisyard: return room_torhouse;
+ default: return g_room;
+ }
+ case obj_doorW: case obj_doorw_musfade:
+ *entrance = 23;
+ switch (g_room) {
+ case room_town_mid: return room_hospital_lobby;
+ case room_hospital_lobby: return room_town_mid;
+ case room_town_south: return room_alphysalley;
+ case room_alphysalley: return room_town_south;
+ case room_town_north: return room_beach;
+ case room_beach: return room_town_north;
+ default: return g_room;
+ }
+ default: *entrance = 1; return g_room;
+ }
+}
+
+static bool is_door(int obj) {
+ switch (obj) {
+ case obj_doorA: case obj_doorA_musfade: case obj_doorB: case obj_doorB_musfade: case obj_doorC: case obj_doorC_musfade:
+ case obj_doorD: case obj_doorD_musfade: case obj_doorE: case obj_doorF: case obj_doorX: case obj_doorX_musfade:
+ case obj_doorW: case obj_doorw_musfade: return true;
+ default: return false;
+ }
+}
+
+static void npc_setup(const Inst *in);
+static uint8_t reads[256];
+
+/* the instances every room places the same way */
+void room_setup(int room) {
+ const RoomInfo *r = world_room_info();
+ memset(reads, 0, sizeof reads);
+ for (int i = 0; i < r->ninst; i++) {
+ Inst in;
+ room_inst(r, i, &in);
+ int w = 20 * in.sx / 100, h = 20 * in.sy / 100;
+ if (is_door(in.obj)) {
+ Obj *o = obj_new(0xFFFF, in.x, in.y);
+ o->flags |= OF_TOUCH | OF_HIDDEN;
+ o->obj = in.obj, o->inst = (int16_t)in.n;
+ obj_set_box(o, 0, 0, w, h);
+ o->event = EV_DOOR;
+ } else if (in.obj == obj_readable_room1 || in.obj == obj_readable) {
+ Obj *o = obj_new(0xFFFF, in.x, in.y);
+ o->flags |= OF_TALK | OF_HIDDEN;
+ o->obj = in.obj, o->inst = (int16_t)in.n;
+ obj_set_box(o, 0, 0, w, h);
+ o->event = EV_READ;
+ } else if (in.obj == obj_savepoint) {
+ Obj *o = obj_new(spr_savepoint, in.x, in.y);
+ o->flags |= OF_TALK | OF_SOLID;
+ o->obj = in.obj, o->inst = (int16_t)in.n;
+ o->ispd = FX / 4;
+ int s = world_scale();
+ obj_set_box(o, 0, 10 * s, 20 * s, 10 * s);
+ o->event = EV_SAVE;
+ o->name = ACT_SAVE;
+ } else if (in.obj == obj_npc_room || in.obj == obj_npc_sign || in.obj == obj_npc_facing) {
+ npc_setup(&in);
+ }
+ }
+ if (world_dark()) dw_setup(room);
+ else lw_setup(room);
+}
+
+void room_step(void) {
+ if (world_dark()) dw_step();
+ else lw_step();
+}
+
+void room_draw_over(void) {}
+
+void room_menu(void) { menu_open(); }
+
+/* ---------------------------------------------------------------- the common events */
+static int ev_door(Ev *c) {
+ EV_BEGIN;
+ {
+ int e;
+ int dest = door_dest(c->self->obj, &e);
+ if (dest == g_room) return 1;
+ c->v[0] = dest, c->v[1] = e;
+ }
+ pl.frozen = true;
+ FADE_TO(c->v[0], c->v[1]);
+ pl.frozen = false;
+ EV_END;
+}
+
+/* ---------------------------------------------------------------- what things say (gmtexts.c) */
+static TxtCtx tc;
+
+static char face_msgs[MAX_MSG][16];
+
+void txt_msg(TxtCtx *c, int i, const char *s) {
+ if (i < 0 || i >= MAX_MSG) return;
+ c->msg[i] = s;
+ if (i + 1 > c->nmsg) c->nmsg = i + 1;
+}
+/* scr_susface and the others: a message that only changes the face (who 0: none) */
+void txt_face(TxtCtx *c, int i, char who, int fe) {
+ if (i < 0 || i >= MAX_MSG) return;
+ char *m = face_msgs[i];
+ int n = 0;
+ m[n++] = '\\', m[n++] = 'F', m[n++] = '0';
+ if (who) {
+ m[n++] = '\\', m[n++] = 'E', m[n++] = (char)(fe < 10 ? '0' + fe : 'A' + fe - 10);
+ m[n++] = '\\', m[n++] = 'F', m[n++] = who;
+ }
+ m[n++] = '%', m[n] = 0;
+ txt_msg(c, i, m);
+}
+void gm_itemget(int id) {
+ for (int i = 0; i < NITEMS; i++)
+ if (!sv.item[i]) {
+ sv.item[i] = (uint8_t)id;
+ return;
+ }
+}
+void gm_keyitemget(int id) {
+ for (int i = 0; i < NITEMS; i++)
+ if (!sv.keyitem[i]) {
+ sv.keyitem[i] = (uint8_t)id;
+ return;
+ }
+}
+void gm_weaponget(int id) {
+ for (int i = 0; i < NITEMS; i++)
+ if (!sv.weapons[i]) {
+ sv.weapons[i] = (uint8_t)id;
+ return;
+ }
+}
+void gm_armorget(int id) {
+ for (int i = 0; i < NITEMS; i++)
+ if (!sv.armors[i]) {
+ sv.armors[i] = (uint8_t)id;
+ return;
+ }
+}
+void gm_litemget(int id) {
+ for (int i = 0; i < 8; i++)
+ if (!sv.litem[i]) {
+ sv.litem[i] = (uint8_t)id;
+ return;
+ }
+}
+
+static int has(const uint8_t *list, int n, int id) {
+ for (int i = 0; i < n; i++)
+ if (list[i] == id) return 1;
+ return 0;
+}
+static void drop(uint8_t *list, int n, int id) {
+ for (int i = 0; i < n; i++)
+ if (list[i] == id) {
+ memmove(list + i, list + i + 1, (size_t)(n - i - 1));
+ list[n - 1] = 0;
+ return;
+ }
+}
+int gm_itemcheck(int id) { return has(sv.item, NITEMS, id); }
+int gm_keyitemcheck(int id) { return has(sv.keyitem, NITEMS, id); }
+int gm_litemcheck(int id) { return has(sv.litem, 8, id); }
+int gm_weaponcheck(int id) {
+ return has(sv.weapons, NITEMS, id) || sv.weapon[1] == id || sv.weapon[2] == id || sv.weapon[3] == id;
+}
+void gm_itemremove(int id) { drop(sv.item, NITEMS, id); }
+void gm_keyitemremove(int id) { drop(sv.keyitem, NITEMS, id); }
+void gm_litemremove(int id) { drop(sv.litem, 8, id); }
+
+static void tc_begin(const Obj *o) {
+ memset(&tc, 0, sizeof tc);
+ const RoomInfo *r = world_room_info();
+ for (int i = 0; i < r->ninst; i++) {
+ Inst in;
+ room_inst(r, i, &in);
+ if (in.n == o->inst) {
+ tc.x = in.x, tc.y = in.y;
+ break;
+ }
+ }
+ tc.read = reads[o->inst & 255];
+ tc.talked = tc.read;
+ tc.facing = pl.dir;
+}
+
+/* the box opened with what tc says */
+static bool tc_say(void) {
+ if (!tc.nmsg) return false;
+ text_clear();
+ text_face(tc.fc, tc.fe);
+ for (int i = 0; i < tc.nmsg; i++) text_add(tc.msg[i] ? tc.msg[i] : " %");
+ if (tc.choicemsg[0]) text_set_choices(tc.choicemsg[0], tc.choicemsg[1], tc.choicemsg[2], tc.choicemsg[3]);
+ text_open();
+ return true;
+}
+
+/* obj_readable_room1, obj_npc_room...: what it says, by the room, where it is, how often it was read */
+static int ev_read(Ev *c) {
+ EV_BEGIN;
+ tc_begin(c->self);
+ switch (c->self->obj) {
+ case obj_npc_room: gm_npc_room_talk(&tc); break;
+ case obj_npc_sign: gm_npc_sign_talk(&tc); break;
+ case obj_npc_facing: gm_npc_facing_talk(&tc); break;
+ default: gm_readable_room1(&tc); break;
+ }
+ reads[c->self->inst & 255]++;
+ if (!tc_say()) return 1;
+ WAIT_UNTIL(!text_active());
+ EV_END;
+}
+
+/* an npc's sprite (its create) */
+static void npc_setup(const Inst *in) {
+ memset(&tc, 0, sizeof tc);
+ tc.x = in->x, tc.y = in->y, tc.spr = 0xFFFF;
+ switch (in->obj) {
+ case obj_npc_room: gm_npc_room_create(&tc); break;
+ case obj_npc_sign: gm_npc_sign_create(&tc); break;
+ case obj_npc_facing: gm_npc_facing_create(&tc); break;
+ default: break;
+ }
+ Obj *o = obj_new(tc.spr, tc.x, tc.y);
+ o->flags |= OF_TALK | OF_SOLID;
+ o->obj = in->obj, o->inst = (int16_t)in->n;
+ o->event = EV_READ;
+ /* its box: its sprite's (the original's interactablesolid) */
+ int s = world_scale();
+ int w = tc.spr != 0xFFFF ? spr_w(tc.spr) * s : 20, h = tc.spr != 0xFFFF ? spr_h(tc.spr) * s : 20;
+ obj_set_box(o, 0, h / 2, w, h - h / 2);
+}
+
+/* obj_savepoint's texts, by the room */
+static int c_talked; /* (the eye puzzle's SAVE point talks once) */
+static int save_text(int *ids) {
+ int n = 0;
+ switch (g_room) {
+ case room_dark1a:
+ ids[n++] = obj_savepoint_slash_Other_10_gml_17_0, ids[n++] = obj_savepoint_slash_Other_10_gml_18_0;
+ break;
+ case room_dark_eyepuzzle:
+ if (c_talked) break;
+ if (sv.hp[CH_KRIS] < 30)
+ ids[n++] = obj_savepoint_slash_Other_10_gml_33_0, ids[n++] = obj_savepoint_slash_Other_10_gml_34_0;
+ else if (sv.hp[CH_KRIS] < sv.maxhp[CH_KRIS])
+ ids[n++] = obj_savepoint_slash_Other_10_gml_26_0, ids[n++] = obj_savepoint_slash_Other_10_gml_27_0,
+ ids[n++] = obj_savepoint_slash_Other_10_gml_28_0;
+ else
+ ids[n++] = obj_savepoint_slash_Other_10_gml_39_0, ids[n++] = obj_savepoint_slash_Other_10_gml_40_0,
+ ids[n++] = obj_savepoint_slash_Other_10_gml_41_0;
+ c_talked++;
+ break;
+ case room_castle_town:
+ if (have_char(CH_RALSEI))
+ ids[n++] = obj_savepoint_slash_Other_10_gml_57_0, ids[n++] = obj_savepoint_slash_Other_10_gml_58_0;
+ else
+ ids[n++] = obj_savepoint_slash_Other_10_gml_51_0, ids[n++] = obj_savepoint_slash_Other_10_gml_52_0,
+ ids[n++] = obj_savepoint_slash_Other_10_gml_53_0;
+ break;
+ case room_field_start:
+ if (plot() >= 37)
+ ids[n++] = obj_savepoint_slash_Other_10_gml_71_0, ids[n++] = obj_savepoint_slash_Other_10_gml_72_0;
+ else
+ ids[n++] = obj_savepoint_slash_Other_10_gml_66_0, ids[n++] = obj_savepoint_slash_Other_10_gml_67_0;
+ break;
+ case room_field_shop1:
+ if (!have_char(CH_SUSIE))
+ ids[n++] = obj_savepoint_slash_Other_10_gml_84_0, ids[n++] = obj_savepoint_slash_Other_10_gml_85_0;
+ else
+ ids[n++] = obj_savepoint_slash_Other_10_gml_80_0, ids[n++] = obj_savepoint_slash_Other_10_gml_81_0;
+ break;
+ default: break;
+ }
+ return n;
+}
+
+static int ev_save(Ev *c) {
+ EV_BEGIN;
+ {
+ /* what it says in this room (obj_savepoint), then every SAVE point heals the party */
+ int ids[4];
+ int n = save_text(ids);
+ for (int i = 1; i < 4; i++)
+ if (sv.hp[i] < sv.maxhp[i]) sv.hp[i] = sv.maxhp[i];
+ if (n) {
+ text_clear();
+ for (int i = 0; i < n; i++) text_add(str((uint16_t)ids[i]));
+ text_open();
+ }
+ }
+ WAIT_UNTIL(!text_active());
+ menu_save_open();
+ WAIT_UNTIL(menu_save_done());
+ EV_END;
+}
+
+int event_run(Ev *c) {
+ if (c->id >= EV_DW_FIRST) return dw_event(c);
+ if (c->id >= EV_LW_FIRST) return lw_event(c);
+ switch (c->id) {
+ case EV_DOOR: return ev_door(c);
+ case EV_READ: return ev_read(c);
+ case EV_SAVE: return ev_save(c);
+ default: return 1;
+ }
+}
diff --git a/games/deltarune/src/rooms.h b/games/deltarune/src/rooms.h
new file mode 100644
index 00000000..27b3a603
--- /dev/null
+++ b/games/deltarune/src/rooms.h
@@ -0,0 +1,35 @@
+/* Deltarune: the rooms' things and events (rooms.c, lw.c, dw.c...). */
+#ifndef DR_ROOMS_H
+#define DR_ROOMS_H
+#include <stdbool.h>
+#include "event.h"
+
+/* the events (Obj.event, event_start) */
+enum {
+ EV_NONE, EV_DOOR, EV_SAVE, EV_READ, EV_NPC, EV_ROOM, EV_TREASURE, EV_MENU_SAVE,
+ EV_LW_FIRST = 100,
+ EV_DW_FIRST = 200,
+ EV_FIELD_FIRST = 300,
+ EV_FOREST_FIRST = 400,
+ EV_CASTLE_FIRST = 500,
+};
+
+/* the actors scripts find by name (Obj.name) */
+enum { ACT_NONE, ACT_TORIEL, ACT_SUSIE, ACT_RALSEI, ACT_LANCER, ACT_NOELLE, ACT_ALPHYS, ACT_PROP, ACT_PROP2,
+ ACT_PROP3, ACT_KING, ACT_CLOVER, ACT_SAVE, ACT_DOOR, ACT_DOOR2 };
+
+void room_setup(int room); /* the room's things, as it starts */
+void room_menu(void); /* C: the menu */
+void room_draw_over(void); /* what a room draws over everything (a cutscene's) */
+int room_next(int room, int n); /* n rooms after it in the original's order (before: n < 0) */
+void room_step(void); /* each frame in the overworld: the room's own (its cutscenes start) */
+const char *room_title(int room); /* the name the SAVE menu shows */
+
+/* each part's own (lw.c the Light World, dw.c the Dark World...) */
+void lw_setup(int room);
+int lw_event(Ev *c);
+void lw_step(void);
+void dw_setup(int room);
+int dw_event(Ev *c);
+void dw_step(void);
+#endif
diff --git a/games/deltarune/src/save.c b/games/deltarune/src/save.c
new file mode 100644
index 00000000..7d579e01
--- /dev/null
+++ b/games/deltarune/src/save.c
@@ -0,0 +1,189 @@
+/* Saves (save.h): the game's SAVE (deltarune.sav), the moment kept when Home quits (drresume.sav, read once
+ * on the next start), and a copy of both in a Python script: installing apps from the NumWorks website keeps
+ * only Python scripts, so the saves come back from it when the files themselves are gone. Each is a
+ * comment line "#>name:base64" (the way NumPlay and its big games keep theirs). */
+#include <string.h>
+#include "game.h"
+#include "plat.h"
+#include "save.h"
+#include "world.h"
+
+#define SAVE_NAME "deltarune.sav"
+#define RESUME_NAME "drresume.sav"
+#define COPY_NAME "deltarune_saves.py"
+#define CONFIG_NAME "drconfig.sav"
+#define MAGIC 0x31305244u /* "DR01" */
+#define CONFIG_MAGIC 0x31435244u /* "DRC1" */
+
+typedef struct {
+ uint32_t magic;
+ uint32_t size;
+ Save s;
+} SaveFile;
+
+static const char *const kept[] = {SAVE_NAME, RESUME_NAME, CONFIG_NAME};
+#define NKEPT (int)(sizeof kept / sizeof kept[0])
+static const char copy_head[] = "# Deltarune's saves: keep this file\n";
+static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+static void copy_write(void) {
+ uint32_t total = 1 + (sizeof copy_head - 1) + 1, len;
+ int n = 0;
+ for (int k = 0; k < NKEPT; k++)
+ if (plat_load(kept[k], &len) && len) total += 2 + (uint32_t)strlen(kept[k]) + 1 + (len + 2) / 3 * 4 + 1, n++;
+ plat_remove(COPY_NAME);
+ if (!n) return;
+ uint8_t *o = plat_reserve(COPY_NAME, total), *p = o;
+ if (!o) return;
+ *p++ = 0; /* (the script's status byte: not imported) */
+ memcpy(p, copy_head, sizeof copy_head - 1), p += sizeof copy_head - 1;
+ for (int k = 0; k < NKEPT; k++) {
+ const uint8_t *d = plat_load(kept[k], &len);
+ if (!d || !len) continue;
+ uint32_t nl = (uint32_t)strlen(kept[k]);
+ *p++ = '#', *p++ = '>';
+ memcpy(p, kept[k], nl), p += nl;
+ *p++ = ':';
+ for (uint32_t i = 0; i < len; i += 3, p += 4) {
+ /* (written out: GCC 15.2 for the calculator got a loop over the four wrong, see NumPlay's
+ * launcher/src/storage.c) */
+ uint32_t left = len - i, v = (uint32_t)d[i] << 16 | (left > 1 ? d[i + 1] << 8 : 0) | (left > 2 ? d[i + 2] : 0);
+ p[0] = (uint8_t)b64[v >> 18 & 63];
+ p[1] = (uint8_t)b64[v >> 12 & 63];
+ p[2] = left > 1 ? (uint8_t)b64[v >> 6 & 63] : '=';
+ p[3] = left > 2 ? (uint8_t)b64[v & 63] : '=';
+ }
+ *p++ = '\n';
+ }
+ *p++ = 0;
+ plat_reserved(COPY_NAME, (uint32_t)(p - o));
+}
+
+static int b64_value(uint8_t c) {
+ for (int i = 0; i < 64; i++)
+ if ((uint8_t)b64[i] == c) return i;
+ return -1;
+}
+
+static const uint8_t *copy_line(int k, uint32_t *len) {
+ uint32_t n, nl = (uint32_t)strlen(kept[k]);
+ const uint8_t *c = plat_load(COPY_NAME, &n);
+ if (!c) return NULL;
+ for (uint32_t i = 0; i + nl + 3 <= n; i++)
+ if (c[i] == '#' && c[i + 1] == '>' && !memcmp(c + i + 2, kept[k], nl) && c[i + 2 + nl] == ':') {
+ const uint8_t *l = c + i + 3 + nl;
+ uint32_t m = 0;
+ while (l + m < c + n && l[m] != '\n' && l[m]) m++;
+ *len = m;
+ return l;
+ }
+ return NULL;
+}
+
+void save_restore_copy(void) {
+ for (int k = 0; k < NKEPT; k++) {
+ uint32_t have, len;
+ if (plat_load(kept[k], &have)) continue;
+ const uint8_t *l = copy_line(k, &len);
+ if (!l || !len || len % 4) continue;
+ uint32_t size = len / 4 * 3 - (l[len - 1] == '=') - (l[len - 2] == '=');
+ uint8_t *out = plat_reserve(kept[k], size);
+ if (!out) continue;
+ l = copy_line(k, &len);
+ bool ok = l != NULL && len / 4 * 3 - (l[len - 1] == '=') - (l[len - 2] == '=') == size;
+ uint32_t o = 0;
+ for (uint32_t i = 0; ok && i < len; i += 4) {
+ int v0 = l[i] == '=' ? 0 : b64_value(l[i]), v1 = l[i + 1] == '=' ? 0 : b64_value(l[i + 1]);
+ int v2 = l[i + 2] == '=' ? 0 : b64_value(l[i + 2]), v3 = l[i + 3] == '=' ? 0 : b64_value(l[i + 3]);
+ if (v0 < 0 || v1 < 0 || v2 < 0 || v3 < 0) ok = false;
+ uint32_t wd = (uint32_t)(v0 << 18 | v1 << 12 | v2 << 6 | v3);
+ if (o < size) out[o++] = (uint8_t)(wd >> 16);
+ if (o < size) out[o++] = (uint8_t)(wd >> 8);
+ if (o < size) out[o++] = (uint8_t)wd;
+ }
+ if (ok && o == size) plat_reserved(kept[k], size);
+ else plat_remove(kept[k]);
+ }
+}
+
+static bool write_file(const char *name, const Save *s) {
+ SaveFile f;
+ memset(&f, 0, sizeof f);
+ f.magic = MAGIC, f.size = sizeof(Save), f.s = *s;
+ bool ok = plat_save(name, &f, sizeof f);
+ copy_write();
+ return ok;
+}
+
+static bool read_file(const char *name, Save *s) {
+ uint32_t len;
+ const uint8_t *d = plat_load(name, &len);
+ if (!d || len != sizeof(SaveFile)) return false;
+ SaveFile f;
+ memcpy(&f, d, sizeof f);
+ if (f.magic != MAGIC || f.size != sizeof(Save)) return false;
+ *s = f.s;
+ return true;
+}
+
+bool save_write(void) { return write_file(SAVE_NAME, &sv); }
+bool save_write_auto(void) { return write_file(SAVE_NAME, &sv); }
+bool save_exists(void) {
+ Save s;
+ return read_file(SAVE_NAME, &s);
+}
+bool save_peek(Save *s) { return read_file(SAVE_NAME, s); }
+
+bool save_load(void) {
+ Save s;
+ if (!read_file(SAVE_NAME, &s)) return false;
+ sv = s;
+ g_mode = MODE_WORLD;
+ world_enter(sv.room, sv.x, sv.y, sv.facing);
+ return true;
+}
+
+/* Home: the moment kept as it is, room and place; read back once */
+void save_resume_write(void) {
+ if (g_mode != MODE_WORLD && g_mode != MODE_MENU && g_mode != MODE_GAMEOVER) {
+ /* (in a battle: kept as it was before it) */
+ }
+ Save s = sv;
+ s.room = (int16_t)g_room, s.x = (int16_t)pl.x, s.y = (int16_t)pl.y, s.facing = pl.dir;
+ write_file(RESUME_NAME, &s);
+}
+
+bool save_resume_load(void) {
+ Save s;
+ if (!read_file(RESUME_NAME, &s)) return false;
+ plat_remove(RESUME_NAME);
+ copy_write();
+ sv = s;
+ g_mode = MODE_WORLD;
+ world_enter(sv.room, sv.x, sv.y, sv.facing);
+ return true;
+}
+
+/* Settings: kept apart from the SAVE (a new game keeps them), as the game keeps its own */
+uint8_t g_walk_fast;
+typedef struct {
+ uint32_t magic;
+ uint8_t walk_fast, unused[3];
+} ConfigFile;
+
+void config_load(void) {
+ uint32_t len;
+ const uint8_t *d = plat_load(CONFIG_NAME, &len);
+ ConfigFile f;
+ if (!d || len != sizeof f) return;
+ memcpy(&f, d, sizeof f);
+ if (f.magic == CONFIG_MAGIC) g_walk_fast = f.walk_fast ? 1 : 0;
+}
+
+void config_save(void) {
+ ConfigFile f;
+ memset(&f, 0, sizeof f);
+ f.magic = CONFIG_MAGIC, f.walk_fast = g_walk_fast;
+ plat_save(CONFIG_NAME, &f, sizeof f);
+ copy_write();
+}
diff --git a/games/deltarune/src/save.h b/games/deltarune/src/save.h
new file mode 100644
index 00000000..2982d7dc
--- /dev/null
+++ b/games/deltarune/src/save.h
@@ -0,0 +1,16 @@
+/* Deltarune: saves (the game's SAVE, the moment kept on Home), and their copy in a Python script. */
+#ifndef DR_SAVE_H
+#define DR_SAVE_H
+#include <stdbool.h>
+#include "game.h"
+void save_restore_copy(void);
+bool save_write(void);
+bool save_write_auto(void); /* the game's own SAVE at certain moments (sv's room and place set) */
+bool save_exists(void);
+bool save_load(void);
+bool save_peek(Save *s); /* the SAVE's facts, without loading it */
+void save_resume_write(void);
+bool save_resume_load(void);
+void config_load(void); /* the settings */
+void config_save(void);
+#endif
diff --git a/games/deltarune/src/tables.c b/games/deltarune/src/tables.c
new file mode 100644
index 00000000..cb6e33c5
--- /dev/null
+++ b/games/deltarune/src/tables.c
@@ -0,0 +1,164 @@
+/* made by tools/tables.py from the original's scripts: items, weapons, armors, spells, enemies and
+ * battles (see tables.h) */
+#include "data.h"
+#include "tables.h"
+
+const ItemDef item_defs[16] = {
+ {0xFFFF, 0xFFFF, 0, 0, 0},
+ {scr_iteminfo_slash_scr_iteminfo_gml_14_0, scr_iteminfo_slash_scr_iteminfo_gml_15_0, 1, 25, 1},
+ {scr_iteminfo_slash_scr_iteminfo_gml_21_0, scr_iteminfo_slash_scr_iteminfo_gml_22_0, 1, 400, 1},
+ {scr_iteminfo_slash_scr_iteminfo_gml_28_0, scr_iteminfo_slash_scr_iteminfo_gml_29_0, 0, 200, 0},
+ {scr_iteminfo_slash_scr_iteminfo_gml_35_0, scr_iteminfo_slash_scr_iteminfo_gml_36_0, 2, 1, 0},
+ {scr_iteminfo_slash_scr_iteminfo_gml_42_0, scr_iteminfo_slash_scr_iteminfo_gml_43_0, 1, 5, 1},
+ {scr_iteminfo_slash_scr_iteminfo_gml_49_0, scr_iteminfo_slash_scr_iteminfo_gml_50_0, 2, 150, 1},
+ {scr_iteminfo_slash_scr_iteminfo_gml_56_0, scr_iteminfo_slash_scr_iteminfo_gml_57_0, 2, 5, 1},
+ {scr_iteminfo_slash_scr_iteminfo_gml_63_0, scr_iteminfo_slash_scr_iteminfo_gml_64_0, 1, 70, 1},
+ {scr_iteminfo_slash_scr_iteminfo_gml_70_0, scr_iteminfo_slash_scr_iteminfo_gml_71_0, 1, 10, 1},
+ {scr_iteminfo_slash_scr_iteminfo_gml_77_0, scr_iteminfo_slash_scr_iteminfo_gml_78_0, 1, 10, 1},
+ {scr_iteminfo_slash_scr_iteminfo_gml_84_0, scr_iteminfo_slash_scr_iteminfo_gml_85_0, 2, 70, 1},
+ {scr_iteminfo_slash_scr_iteminfo_gml_91_0, scr_iteminfo_slash_scr_iteminfo_gml_92_0, 1, 40, 1},
+ {scr_iteminfo_slash_scr_iteminfo_gml_98_0, scr_iteminfo_slash_scr_iteminfo_gml_99_0, 1, 40, 1},
+ {scr_iteminfo_slash_scr_iteminfo_gml_105_0, scr_iteminfo_slash_scr_iteminfo_gml_106_0, 1, 10, 1},
+ {scr_iteminfo_slash_scr_iteminfo_gml_112_0, scr_iteminfo_slash_scr_iteminfo_gml_113_0, 1, 50, 1},
+};
+const int item_count = 16;
+
+const EquipDef weapon_defs[11] = {
+ {0xFFFF, 0xFFFF, 0, 0, 0, 0, 0, 0, 0, 0},
+ {scr_weaponinfo_slash_scr_weaponinfo_gml_29_0, scr_weaponinfo_slash_scr_weaponinfo_gml_30_0, 0, 0, 0, 1, 0, 0, 1, 60},
+ {scr_weaponinfo_slash_scr_weaponinfo_gml_54_0, scr_weaponinfo_slash_scr_weaponinfo_gml_55_0, 0, 0, 0, 0, 0, 0, 2, 80},
+ {scr_weaponinfo_slash_scr_weaponinfo_gml_75_0, scr_weaponinfo_slash_scr_weaponinfo_gml_76_0, 0, 0, 0, 0, 0, 1, 3, 100},
+ {scr_weaponinfo_slash_scr_weaponinfo_gml_97_0, scr_weaponinfo_slash_scr_weaponinfo_gml_98_0, 12, 6, 8, 1, 1, 1, 0, 150},
+ {scr_weaponinfo_slash_scr_weaponinfo_gml_118_0, scr_weaponinfo_slash_scr_weaponinfo_gml_119_0, 2, 0, 0, 1, 0, 0, 1, 200},
+ {scr_weaponinfo_slash_scr_weaponinfo_gml_139_0, scr_weaponinfo_slash_scr_weaponinfo_gml_140_0, 2, 0, 0, 0, 1, 0, 2, 150},
+ {scr_weaponinfo_slash_scr_weaponinfo_gml_160_0, scr_weaponinfo_slash_scr_weaponinfo_gml_161_0, 5, 0, 4, 0, 1, 0, 2, 0},
+ {scr_weaponinfo_slash_scr_weaponinfo_gml_181_0, scr_weaponinfo_slash_scr_weaponinfo_gml_182_0, 4, 0, 0, 1, 0, 0, 1, 250},
+ {scr_weaponinfo_slash_scr_weaponinfo_gml_202_0, scr_weaponinfo_slash_scr_weaponinfo_gml_203_0, 2, 0, 0, 0, 0, 1, 3, 200},
+ {scr_weaponinfo_slash_scr_weaponinfo_gml_223_0, scr_weaponinfo_slash_scr_weaponinfo_gml_224_0, 0, 0, 2, 0, 0, 1, 3, 200},
+};
+const int weapon_count = 11;
+
+const EquipDef armor_defs[8] = {
+ {0xFFFF, 0xFFFF, 0, 0, 0, 1, 0, 1, 0, 0},
+ {scr_armorinfo_slash_scr_armorinfo_gml_26_0, scr_armorinfo_slash_scr_armorinfo_gml_27_0, 0, 1, 0, 1, 1, 1, 4, 100},
+ {scr_armorinfo_slash_scr_armorinfo_gml_46_0, scr_armorinfo_slash_scr_armorinfo_gml_47_0, 0, 2, 0, 1, 1, 1, 4, 150},
+ {scr_armorinfo_slash_scr_armorinfo_gml_66_0, scr_armorinfo_slash_scr_armorinfo_gml_67_0, 0, 1, 0, 1, 0, 1, 4, 100},
+ {scr_armorinfo_slash_scr_armorinfo_gml_87_0, scr_armorinfo_slash_scr_armorinfo_gml_88_0, 0, 2, 0, 1, 0, 1, 4, 90},
+ {scr_armorinfo_slash_scr_armorinfo_gml_108_0, scr_armorinfo_slash_scr_armorinfo_gml_109_0, 1, 2, 0, 1, 1, 1, 4, 150},
+ {scr_armorinfo_slash_scr_armorinfo_gml_128_0, scr_armorinfo_slash_scr_armorinfo_gml_129_0, 0, 0, 2, 1, 1, 1, 4, 120},
+ {scr_armorinfo_slash_scr_armorinfo_gml_148_0, scr_armorinfo_slash_scr_armorinfo_gml_149_0, 2, 2, 2, 1, 1, 1, 4, 0},
+};
+const int armor_count = 8;
+
+const SpellDef spell_defs[8] = {
+ {0xFFFF, scr_spellinfo_slash_scr_spellinfo_gml_18_0, 0xFFFF, -1, 0, 0},
+ {scr_spellinfo_slash_scr_spellinfo_gml_22_0, scr_spellinfo_slash_scr_spellinfo_gml_23_0, scr_spellinfo_slash_scr_spellinfo_gml_21_0, 125, 2, 0},
+ {scr_spellinfo_slash_scr_spellinfo_gml_32_0, scr_spellinfo_slash_scr_spellinfo_gml_33_0, scr_spellinfo_slash_scr_spellinfo_gml_31_0, 80, 1, 1},
+ {scr_spellinfo_slash_scr_spellinfo_gml_43_0, scr_spellinfo_slash_scr_spellinfo_gml_44_0, scr_spellinfo_slash_scr_spellinfo_gml_42_0, 40, 2, 0},
+ {scr_spellinfo_slash_scr_spellinfo_gml_53_0, scr_spellinfo_slash_scr_spellinfo_gml_54_0, scr_spellinfo_slash_scr_spellinfo_gml_52_0, 100, 2, 0},
+ {scr_spellinfo_slash_scr_spellinfo_gml_65_0, scr_spellinfo_slash_scr_spellinfo_gml_66_0, scr_spellinfo_slash_scr_spellinfo_gml_64_0, 0, 2, 0},
+ {scr_spellinfo_slash_scr_spellinfo_gml_76_0, scr_spellinfo_slash_scr_spellinfo_gml_77_0, scr_spellinfo_slash_scr_spellinfo_gml_75_0, 0, 0, 0},
+ {scr_spellinfo_slash_scr_spellinfo_gml_87_0, scr_spellinfo_slash_scr_spellinfo_gml_88_0, scr_spellinfo_slash_scr_spellinfo_gml_86_0, 0, 0, 0},
+};
+const int spell_count = 8;
+
+const MonsterDef monster_defs[26] = {
+ {0xFFFF, 0, 0, 0, 0, 0, 0, 0, 0, 0xFFFF,
+ {{0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_4_0, 130, 7, 0, 0, 0, 10, 100, 0, scr_monstersetup_slash_scr_monstersetup_gml_27_0,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_16_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_18_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_20_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_22_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_24_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_26_0, 0xFFFF, 1, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_32_0, 540, 5, 1, 0, 20, 10, 100, 0, scr_monstersetup_slash_scr_monstersetup_gml_51_0,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_44_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_47_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_50_0, 0xFFFF, 1, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_59_0, 450, 0, 0, 0, 0, 0, 100, 0, scr_monstersetup_slash_scr_monstersetup_gml_78_0,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_71_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_73_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_75_0, 0xFFFF, 1, 0, 3}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_83_0, 90, 8, 6, 0, 0, 0, 100, 0, scr_monstersetup_slash_scr_monstersetup_gml_98_0,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_95_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_97_0, 0xFFFF, 1, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_103_0, 120, 5, 0, 0, 30, 10, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_115_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_117_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_119_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_123_0, 0xFFFF, 1, 0, 3}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_132_0, 150, 6, 0, 0, 28, 10, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_144_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_146_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_148_0, 0xFFFF, 1, 0, 2}, {scr_monstersetup_slash_scr_monstersetup_gml_160_0, 0xFFFF, 1, 0, 2}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_170_0, 270, 8, 1, 0, 43, 10, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_184_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_208_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_210_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_212_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_218_0, 0xFFFF, 1, 0, 3}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_226_0, 170, 8, 0, 0, 50, 10, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_238_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_240_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_242_0, 0xFFFF, 1, 0, 3}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_251_0, 10, 5, 0, 0, 10, 0, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_263_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_271_0, 0xFFFF, 1, 0, 2}, {scr_monstersetup_slash_scr_monstersetup_gml_274_0, 0xFFFF, 1, 0, 3}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_282_0, 1300, 7, 3, 0, 100, 0, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_294_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_296_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_298_0, 0xFFFF, 1, 0, 3}, {scr_monstersetup_slash_scr_monstersetup_gml_307_0, 0xFFFF, 1, 0, 3}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_315_0, 140, 7, 1, 0, 23, 10, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_327_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_329_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_331_0, 0xFFFF, 1, 0, 3}, {scr_monstersetup_slash_scr_monstersetup_gml_337_0, 0xFFFF, 1, 0, 3}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_346_0, 2400, 4, -40, 0, 0, 0, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_358_0, 0xFFFF, 1, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_365_0, 120, 8, 1, 0, 38, 10, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_377_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_379_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_381_0, 0xFFFF, 1, 0, 3}, {scr_monstersetup_slash_scr_monstersetup_gml_386_0, 0xFFFF, 1, 0, 3}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_394_0, 130, 9, 2, 0, 38, 10, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_406_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_408_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_412_0, 0xFFFF, 1, 0, 2}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_420_0, 90, 5, 0, 0, 20, 10, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_432_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_434_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_440_0, 0xFFFF, 1, 0, 3}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_449_0, 270, 6, 1, 0, 80, 10, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_463_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_465_0, 0xFFFF, 1, 0, 3}, {scr_monstersetup_slash_scr_monstersetup_gml_467_0, 0xFFFF, 1, 0, 3}, {scr_monstersetup_slash_scr_monstersetup_gml_470_0, 0xFFFF, 1, 0, 3}, {scr_monstersetup_slash_scr_monstersetup_gml_473_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_475_0, 0xFFFF, 1, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_484_0, 700, 6, 0, 0, 0, 0, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_496_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_498_0, 0xFFFF, 1, 0, 3}, {scr_monstersetup_slash_scr_monstersetup_gml_501_0, 0xFFFF, 1, 0, 3}, {scr_monstersetup_slash_scr_monstersetup_gml_504_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_506_0, 0xFFFF, 1, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_512_0, 800, 6, 1, 0, 0, 0, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_524_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_527_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_530_0, 0xFFFF, 1, 0, 3}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_538_0, 120, 7, 0, 0, 0, 0, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_550_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_553_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_556_0, 0xFFFF, 1, 0, 3}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_562_0, 3500, 10, 5, 0, 0, 0, 999, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_574_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_579_0, scr_monstersetup_slash_scr_monstersetup_gml_580_0, 1, 50, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_585_0, scr_monstersetup_slash_scr_monstersetup_gml_586_0, 1, 125, 4}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_594_0, 1300, 8, 3, 0, 100, 0, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_607_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_609_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_611_0, 0xFFFF, 1, 0, 4}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_619_0, 170, 8, 0, 0, 45, 25, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_631_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_633_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_635_0, 0xFFFF, 1, 0, 2}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_643_0, 190, 8, 0, 0, 40, 10, 100, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_655_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_657_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_659_0, 0xFFFF, 1, 0, 2}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {0xFFFF, 0, 0, 0, 0, 0, 0, 0, 0, 0xFFFF,
+ {{0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+ {scr_monstersetup_slash_scr_monstersetup_gml_665_0, 2800, 8, 0, 0, 0, 0, 999, 0, 0xFFFF,
+ {{scr_monstersetup_slash_scr_monstersetup_gml_677_0, 0xFFFF, 1, 0, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_704_0, scr_monstersetup_slash_scr_monstersetup_gml_705_0, 1, 62, 1}, {scr_monstersetup_slash_scr_monstersetup_gml_714_0, scr_monstersetup_slash_scr_monstersetup_gml_715_0, 1, 150, 2}, {scr_monstersetup_slash_scr_monstersetup_gml_724_0, scr_monstersetup_slash_scr_monstersetup_gml_725_0, 1, 125, 3}, {0xFFFF, 0xFFFF, 0, 0, 1}, {0xFFFF, 0xFFFF, 0, 0, 1}}},
+};
+const int monster_count = 26;
+
+const EncounterDef encounter_defs[41] = {
+ {{{0, -1, 0, 0}, {0, -1, 0, 0}, {0, -1, 0, 0}}, 0xFFFF}, /* */
+ {{{1, 238, 480, 110}, {1, 238, 500, 200}, {0, -1, 0, 0}}, 0xFFFF}, /* obj_placeholderenemy obj_placeholderenemy */
+ {{{2, 278, 540, 200}, {0, -1, 0, 0}, {0, -1, 0, 0}}, 0xFFFF}, /* obj_lancerboss */
+ {{{3, 236, 0, 0}, {0, -1, 0, 0}, {0, -1, 0, 0}}, 0xFFFF}, /* obj_dummyenemy */
+ {{{5, 280, 480, 140}, {0, -1, 0, 0}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_84_0}, /* obj_diamondenemy */
+ {{{5, 280, 480, 110}, {5, 280, 500, 200}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_100_0}, /* obj_diamondenemy obj_diamondenemy */
+ {{{5, 280, 480, 110}, {6, 287, 500, 200}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_116_0}, /* obj_diamondenemy obj_heartenemy */
+ {{{9, 289, 440, 150}, {0, -1, 0, 0}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_128_0}, /* obj_smallcheckers_enemy */
+ {{{16, 285, 400, 120}, {0, -1, 0, 0}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_139_0}, /* obj_clubsenemy */
+ {{{6, 287, 480, 20}, {6, 287, 500, 120}, {6, 287, 460, 220}}, scr_encountersetup_slash_scr_encountersetup_gml_158_0}, /* obj_heartenemy obj_heartenemy obj_heartenemy */
+ {{{0, -1, 0, 0}, {0, -1, 0, 0}, {0, -1, 0, 0}}, 0xFFFF}, /* */
+ {{{0, -1, 0, 0}, {0, -1, 0, 0}, {0, -1, 0, 0}}, 0xFFFF}, /* */
+ {{{10, 253, 480, 120}, {0, -1, 0, 0}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_172_0}, /* obj_checkers_enemy */
+ {{{11, 260, 480, 110}, {11, 260, 500, 200}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_185_0}, /* obj_ponman_enemy obj_ponman_enemy */
+ {{{11, 260, 480, 20}, {11, 260, 500, 120}, {11, 260, 460, 220}}, scr_encountersetup_slash_scr_encountersetup_gml_206_0}, /* obj_ponman_enemy obj_ponman_enemy obj_ponman_enemy */
+ {{{7, 285, 400, 30}, {6, 287, 420, 200}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_223_0}, /* obj_clubsenemy obj_heartenemy */
+ {{{13, 273, 480, 140}, {0, -1, 0, 0}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_234_0}, /* obj_rabbick_enemy */
+ {{{13, 273, 480, 60}, {13, 273, 460, 180}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_250_0}, /* obj_rabbick_enemy obj_rabbick_enemy */
+ {{{14, 275, 480, 140}, {0, -1, 0, 0}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_261_0}, /* obj_bloxer_enemy */
+ {{{14, 275, 480, 60}, {14, 275, 460, 180}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_277_0}, /* obj_bloxer_enemy obj_bloxer_enemy */
+ {{{12, 279, 480, 160}, {0, -1, 0, 0}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_292_0}, /* obj_lancerboss2 */
+ {{{15, 252, 480, 140}, {0, -1, 0, 0}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_305_0}, /* obj_jigsawryenemy */
+ {{{15, 252, 480, 20}, {15, 252, 500, 120}, {15, 252, 460, 220}}, scr_encountersetup_slash_scr_encountersetup_gml_324_0}, /* obj_jigsawryenemy obj_jigsawryenemy obj_jigsawryenemy */
+ {{{15, 252, 480, 20}, {5, 280, 500, 120}, {6, 287, 460, 220}}, scr_encountersetup_slash_scr_encountersetup_gml_343_0}, /* obj_jigsawryenemy obj_diamondenemy obj_heartenemy */
+ {{{13, 273, 480, 60}, {5, 280, 460, 180}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_358_0}, /* obj_rabbick_enemy obj_diamondenemy */
+ {{{20, 284, 500, 160}, {0, -1, 0, 0}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_384_0}, /* obj_joker */
+ {{{0, -1, 0, 0}, {0, -1, 0, 0}, {0, -1, 0, 0}}, 0xFFFF}, /* */
+ {{{21, 253, 480, 120}, {0, -1, 0, 0}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_397_0}, /* obj_checkers_enemy */
+ {{{22, 250, 480, 110}, {22, 250, 500, 200}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_414_0}, /* obj_rudinnranger obj_rudinnranger */
+ {{{23, 288, 480, 110}, {23, 288, 500, 200}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_430_0}, /* obj_headhathy obj_headhathy */
+ {{{23, 288, 480, 20}, {23, 288, 500, 120}, {23, 288, 460, 220}}, scr_encountersetup_slash_scr_encountersetup_gml_449_0}, /* obj_headhathy obj_headhathy obj_headhathy */
+ {{{19, 281, 520, 80}, {18, 282, 540, 240}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_463_0}, /* obj_susieenemy obj_lancerboss3 */
+ {{{13, 273, 480, 20}, {13, 273, 500, 120}, {13, 273, 460, 220}}, scr_encountersetup_slash_scr_encountersetup_gml_484_0}, /* obj_rabbick_enemy obj_rabbick_enemy obj_rabbick_enemy */
+ {{{5, 280, 480, 20}, {6, 287, 500, 120}, {5, 280, 460, 220}}, scr_encountersetup_slash_scr_encountersetup_gml_505_0}, /* obj_diamondenemy obj_heartenemy obj_diamondenemy */
+ {{{0, -1, 0, 0}, {0, -1, 0, 0}, {0, -1, 0, 0}}, 0xFFFF}, /* */
+ {{{0, -1, 0, 0}, {0, -1, 0, 0}, {0, -1, 0, 0}}, 0xFFFF}, /* */
+ {{{0, -1, 0, 0}, {0, -1, 0, 0}, {0, -1, 0, 0}}, 0xFFFF}, /* */
+ {{{0, -1, 0, 0}, {0, -1, 0, 0}, {0, -1, 0, 0}}, 0xFFFF}, /* */
+ {{{0, -1, 0, 0}, {0, -1, 0, 0}, {0, -1, 0, 0}}, 0xFFFF}, /* */
+ {{{0, -1, 0, 0}, {0, -1, 0, 0}, {0, -1, 0, 0}}, 0xFFFF}, /* */
+ {{{25, 283, 460, 70}, {0, -1, 0, 0}, {0, -1, 0, 0}}, scr_encountersetup_slash_scr_encountersetup_gml_517_0}, /* obj_king_boss */
+};
+const int encounter_count = 41;
diff --git a/games/deltarune/src/tables.h b/games/deltarune/src/tables.h
new file mode 100644
index 00000000..6be8f59c
--- /dev/null
+++ b/games/deltarune/src/tables.h
@@ -0,0 +1,60 @@
+/* Deltarune: the original's tables (tables.c, made by tools/tables.py from its scripts). Texts are ids
+ * (data.h), 0xFFFF none. */
+#ifndef DR_TABLES_H
+#define DR_TABLES_H
+#include <stdint.h>
+
+typedef struct {
+ uint16_t name, desc;
+ uint8_t target; /* 0 none, 1 one of the party, 2 all of it */
+ int16_t value; /* what it heals (or sells for) */
+ uint8_t usable;
+} ItemDef;
+
+typedef struct {
+ uint16_t name, desc;
+ int8_t at, df, mag;
+ uint8_t kris, susie, ralsei; /* who can use it */
+ uint8_t icon;
+ int16_t value;
+} EquipDef;
+
+typedef struct {
+ uint16_t name, desc, longname;
+ int16_t cost; /* TP, out of 250 */
+ uint8_t target; /* 0 none, 1 the party, 2 an enemy */
+ uint8_t usable; /* usable out of battle */
+} SpellDef;
+
+typedef struct {
+ uint16_t name, desc;
+ uint8_t can;
+ int16_t cost; /* TP */
+ uint8_t actor; /* 1 Kris, 2 Susie, 3 Ralsei, 4 all */
+} ActDef;
+
+typedef struct {
+ uint16_t name;
+ int16_t hp, at, df, exp, gold;
+ int16_t sparepoint, mercymax, mercymod;
+ uint16_t battlemsg;
+ ActDef acts[6];
+} MonsterDef;
+
+typedef struct {
+ int8_t type; /* MonsterDef */
+ int16_t obj; /* the original's object for it (its ways) */
+ int16_t x, y; /* where it stands, from the view's top-left (640 x 480) */
+} EncMon;
+typedef struct {
+ EncMon m[3];
+ uint16_t battlemsg;
+} EncounterDef;
+
+extern const ItemDef item_defs[];
+extern const EquipDef weapon_defs[], armor_defs[];
+extern const SpellDef spell_defs[];
+extern const MonsterDef monster_defs[];
+extern const EncounterDef encounter_defs[];
+extern const int item_count, weapon_count, armor_count, spell_count, monster_count, encounter_count;
+#endif
diff --git a/games/deltarune/src/text.c b/games/deltarune/src/text.c
new file mode 100644
index 00000000..553cf5f0
--- /dev/null
+++ b/games/deltarune/src/text.c
@@ -0,0 +1,499 @@
+/* Text typed a letter at a time, and the dialogue box (see text.h): the original's obj_writer,
+ * obj_dialoguer, obj_face and obj_choicer_neo. */
+#include <stdarg.h>
+#include <string.h>
+#include "game.h"
+#include "gfx.h"
+#include "res.h"
+#include "text.h"
+#include "world.h"
+
+/* ---------------------------------------------------------------- faces (obj_face's draw) */
+typedef struct {
+ uint16_t first; /* the sprite of expression 0 */
+ uint8_t n; /* expressions as sprites (first + fe); 0: one sprite, fe its frame */
+ int8_t dx, dy; /* (the original's offsets, in the screen's pixels) */
+} FaceDef;
+
+static const FaceDef *face_def(int fc) {
+ /* (offsets in the original's units: halved in the Dark World) */
+ static const FaceDef susie = {spr_face_s0, 14, -5, 0}, susie_alt = {spr_face_susie_alt, 0, -5, 0};
+ static const FaceDef ralsei = {spr_face_r_dark, 0, -15, -10}, ralsei_hood = {spr_face_r_hood, 0, -15, -10};
+ static const FaceDef ralsei_nohat = {spr_face_r_nohat, 0, -15, -10};
+ static const FaceDef noelle = {spr_face_n0, 10, -12, -10}, toriel = {spr_face_t0, 10, 0, 0};
+ static const FaceDef lancer = {spr_face_l0, 0, -15, -10}, sans = {spr_face_sans0, 6, 0, 0};
+ static const FaceDef undyne = {spr_face_undyne, 0, -10, 0}, asgore = {spr_face_asgore0, 7, -10, 0};
+ static const FaceDef alphys = {spr_alphysface, 0, -10, 0}, berdly = {spr_face_b0, 6, -10, 0};
+ static const FaceDef cface = {spr_face_c0, 3, -10, 0}, jock = {spr_face_jock0, 10, -10, 0};
+ static const FaceDef rudy = {spr_face_rudy, 0, -12, -10}, catty = {spr_face_catty, 0, -10, 0};
+ static const FaceDef bratty = {spr_face_bratty, 0, -5, 2}, rurus = {spr_face_rurus, 0, -10, 0};
+ static const FaceDef burgerpants = {spr_face_burgerpants, 0, -5, -5}, king = {spr_face_king, 0, -5, -5};
+ switch (fc) {
+ case FC_SUSIE: return flag(29) ? &susie_alt : &susie;
+ case FC_RALSEI: return flag(30) == 1 ? &ralsei_hood : flag(30) == 2 ? &ralsei_nohat : &ralsei;
+ case FC_NOELLE: return &noelle;
+ case FC_TORIEL: return &toriel;
+ case FC_LANCER: return &lancer;
+ case FC_SANS: return &sans;
+ case FC_UNDYNE: return &undyne;
+ case FC_ASGORE: return &asgore;
+ case FC_ALPHYS: return &alphys;
+ case FC_BERDLY: return &berdly;
+ case FC_C: return &cface;
+ case FC_JOCK: return &jock;
+ case FC_RUDY: return &rudy;
+ case FC_CATTY: return &catty;
+ case FC_BRATTY: return &bratty;
+ case FC_RURUS: return &rurus;
+ case FC_BURGERPANTS: return &burgerpants;
+ case FC_KING: return &king;
+ default: return NULL;
+ }
+}
+
+static int fc_of_letter(char c) {
+ switch (c) {
+ case 'S': return FC_SUSIE;
+ case 'R': return FC_RALSEI;
+ case 'N': return FC_NOELLE;
+ case 'T': return FC_TORIEL;
+ case 'L': return FC_LANCER;
+ case 'A': return FC_ALPHYS;
+ case 'a': return FC_ASGORE;
+ case 'B': return FC_BERDLY;
+ case 'r': return FC_RUDY;
+ case 'u': return FC_UNDYNE;
+ case 'K': return FC_KING;
+ default: return FC_NONE;
+ }
+}
+
+static int fe_of(char c) { return c >= 'A' && c <= 'Z' ? 10 + c - 'A' : c >= '0' && c <= '9' ? c - '0' : 0; }
+
+/* draws the face fc, expression fe, its top-left near (x, y); the mouth moves while talking */
+static void face_draw(int fc, int fe, int x, int y, bool talking, int t) {
+ const FaceDef *d = face_def(fc);
+ if (!d) return;
+ int s = world_scale();
+ if (fc == FC_TORIEL) gfx_sprite(spr_face_tbody, 0, x - 7 / s, y + 29 / s, 0, 255);
+ if (d->n) {
+ int spr = d->first + (fe < d->n ? fe : 0);
+ int fi = talking && spr_frames((uint16_t)spr) > 1 && (t / 3) % 2;
+ gfx_sprite((uint16_t)spr, fi, x + d->dx / s, y + d->dy / s, 0, 255);
+ } else {
+ gfx_sprite(d->first, fe, x + d->dx / s, y + d->dy / s, 0, 255);
+ }
+}
+
+/* ---------------------------------------------------------------- the writer */
+static const int pauses[10] = {0, 5, 10, 15, 20, 30, 40, 60, 90, 150};
+
+/* the message laid out: the original's wrapping (at the last space past charline letters; the line after
+ * indented by two letters, "||", when the message has an asterisk), into w->line */
+static void layout(Writer *w) {
+ const char *s = w->msg[w->cur];
+ char *o = w->line;
+ int n = 0, cap = (int)sizeof w->line - 4;
+ int charpos = 0, remspace = -1;
+ bool aster = false;
+ for (int i = 0; s[i] && n < cap; i++) {
+ char c = s[i];
+ if (c == '\\' && s[i + 1] && s[i + 2]) {
+ o[n++] = s[i], o[n++] = s[i + 1], o[n++] = s[i + 2];
+ i += 2;
+ continue;
+ }
+ if (c == '^' && s[i + 1]) {
+ o[n++] = c, o[n++] = s[i + 1];
+ i++;
+ continue;
+ }
+ if (c == '/' || c == '%') {
+ o[n++] = c;
+ continue;
+ }
+ if (c == '&') {
+ o[n++] = '&';
+ charpos = 0, remspace = -1;
+ if (s[i + 1] != '*' && aster) o[n++] = '|', o[n++] = '|', charpos = 2;
+ continue;
+ }
+ if (c == '*') aster = true;
+ if (charpos >= w->charline) {
+ if (remspace > 2) {
+ /* back to the last space: it becomes the break */
+ int back = n - remspace;
+ o[remspace] = '&';
+ n = remspace + 1;
+ i -= back;
+ charpos = 0;
+ if (aster) o[n++] = '|', o[n++] = '|', charpos = 2;
+ remspace = -1;
+ continue;
+ }
+ o[n++] = '&';
+ charpos = 0;
+ if (aster) o[n++] = '|', o[n++] = '|', charpos = 2;
+ remspace = -1;
+ }
+ if (c == ' ') remspace = n;
+ o[n++] = c;
+ charpos++;
+ }
+ o[n] = 0;
+ w->len = n;
+ w->aster = aster;
+}
+
+static void msg_begin(Writer *w) {
+ w->pos = 0, w->wait = 0, w->halt = false, w->closing = false;
+ layout(w);
+}
+
+void writer_start(Writer *w, int x, int y, int charline) {
+ memset(w, 0, sizeof *w);
+ w->x = x, w->y = y, w->charline = charline;
+ w->hspace = 8, w->vspace = 18;
+ w->font = FONT_MAIN;
+ w->color = C_WHITE;
+ w->skippable = true;
+}
+
+void writer_add(Writer *w, const char *s) {
+ if (w->nmsg < MAX_MSG) w->msg[w->nmsg++] = s;
+ if (w->nmsg == 1) msg_begin(w);
+}
+
+static int g_choice_n; /* a \C choice showing: its options (0: none) */
+static int g_choice, g_choice_sel = -1;
+static const char *g_choices[4];
+static int g_cue;
+
+/* the marks the writer passes as it types (their effects) */
+static void passed(Writer *w, const char *p) {
+ if (p[0] != '\\') return;
+ char a = p[1], b = p[2];
+ if (a == 'E') w->fe = (uint8_t)fe_of(b);
+ else if (a == 'F') w->fc = (uint8_t)(b == '0' ? FC_NONE : fc_of_letter(b));
+ else if (a == 'M') g_cue = b - '0';
+ else if (a == 's') w->skippable = b == '1';
+}
+
+static void next_msg(Writer *w) {
+ if (w->cur + 1 < w->nmsg) {
+ w->cur++;
+ msg_begin(w);
+ } else {
+ w->done = true;
+ }
+}
+
+void writer_show_all(Writer *w) {
+ while (!w->halt && !w->done && w->pos < w->len) {
+ const char *p = w->line + w->pos;
+ if (*p == '\\') {
+ passed(w, p);
+ if (p[1] == 'C') {
+ g_choice_n = p[2] - '0';
+ if (g_choice_n < 2) g_choice_n = 2;
+ g_choice_sel = -1;
+ w->pos += 3;
+ w->halt = true;
+ return;
+ }
+ w->pos += 3;
+ } else if (*p == '^') {
+ w->pos += 2;
+ } else if (*p == '/') {
+ w->halt = true;
+ w->closing = p[1] == '%';
+ w->pos++;
+ } else if (*p == '%') {
+ w->pos++;
+ if (p[1] == '%') {
+ w->done = true;
+ return;
+ }
+ next_msg(w);
+ return;
+ } else {
+ w->pos++;
+ }
+ }
+ if (w->pos >= w->len && !w->halt) w->halt = true, w->closing = w->cur + 1 >= w->nmsg;
+}
+
+bool writer_update(Writer *w, uint32_t pressed, uint32_t held) {
+ if (w->done || !w->nmsg) return false;
+ if (g_choice_n) {
+ /* obj_choicer_neo: a direction picks, Z takes it */
+ if (held & K_LEFT) g_choice_sel = 0;
+ if (held & K_RIGHT) g_choice_sel = 1;
+ if (g_choice_n >= 3 && (held & K_UP)) g_choice_sel = 2;
+ if (g_choice_n >= 4 && (held & K_DOWN)) g_choice_sel = 3;
+ if ((pressed & K_Z) && g_choice_sel >= 0) {
+ g_choice = g_choice_sel;
+ g_choice_n = 0;
+ w->done = true;
+ }
+ return !w->done;
+ }
+ if (w->halt) {
+ if (pressed & K_Z) {
+ if (w->closing) w->done = true;
+ else next_msg(w);
+ }
+ return !w->done;
+ }
+ if ((held & K_X) && w->skippable) {
+ writer_show_all(w);
+ return !w->done;
+ }
+ if (w->talk_t > 0) w->talk_t--;
+ if (w->wait > 0) {
+ w->wait--;
+ return true;
+ }
+ /* one letter, past the marks before it */
+ for (;;) {
+ if (w->pos >= w->len) {
+ w->halt = true, w->closing = w->cur + 1 >= w->nmsg;
+ break;
+ }
+ const char *p = w->line + w->pos;
+ if (*p == '\\') {
+ passed(w, p);
+ if (p[1] == 'C') {
+ g_choice_n = p[2] - '0';
+ if (g_choice_n < 2) g_choice_n = 2;
+ g_choice_sel = -1;
+ w->pos += 3;
+ w->halt = true;
+ break;
+ }
+ w->pos += 3;
+ continue;
+ }
+ if (*p == '^') {
+ int d = p[1] >= '0' && p[1] <= '9' ? pauses[p[1] - '0'] : 0;
+ w->pos += 2;
+ if (d) {
+ w->wait = d;
+ break;
+ }
+ continue;
+ }
+ if (*p == '&' || *p == '|') {
+ w->pos++;
+ continue;
+ }
+ if (*p == '/') {
+ w->halt = true;
+ w->closing = p[1] == '%';
+ w->pos++;
+ break;
+ }
+ if (*p == '%') {
+ w->pos++;
+ if (p[1] == '%') w->done = true;
+ else next_msg(w);
+ break;
+ }
+ w->pos++;
+ if (*p != ' ') w->talk_t = 6;
+ break;
+ }
+ return !w->done;
+}
+
+bool writer_talking(const Writer *w) { return !w->done && !w->halt && w->talk_t > 0; }
+
+static uint16_t color_of(char c, uint16_t own) {
+ switch (c) {
+ case 'R': return rgb565(0xFF0000);
+ case 'B': return rgb565(0x0000FF);
+ case 'Y': return rgb565(0xFFFF00);
+ case 'G': return rgb565(0x00FF00);
+ case 'W': return C_WHITE;
+ case 'X': return C_BLACK;
+ default: return own;
+ }
+}
+
+void writer_draw(const Writer *w) {
+ if (w->done || !w->nmsg) return;
+ int x0 = w->x + (w->fc ? 58 : 0);
+ int wx = x0, wy = w->y;
+ uint16_t col = w->color;
+ char run[64];
+ int nrun = 0, run_x = wx;
+ for (int i = 0; i < w->pos && i < w->len; i++) {
+ const char *p = w->line + i;
+ bool flush = false;
+ if (*p == '\\') {
+ if (p[1] == 'c') {
+ if (nrun) gfx_text_ex(w->font, run_x, wy, run, nrun, col, 0, 0, 0), nrun = 0;
+ col = color_of(p[2], w->color);
+ }
+ i += 2;
+ continue;
+ }
+ if (*p == '^') {
+ i++;
+ continue;
+ }
+ if (*p == '/' || *p == '%') continue;
+ if (*p == '&') {
+ flush = true;
+ } else if (*p == '|') {
+ if (nrun) gfx_text_ex(w->font, run_x, wy, run, nrun, col, 0, 0, 0), nrun = 0;
+ wx += w->hspace;
+ run_x = wx;
+ continue;
+ }
+ if (flush) {
+ if (nrun) gfx_text_ex(w->font, run_x, wy, run, nrun, col, 0, 0, 0), nrun = 0;
+ wx = x0, wy += w->vspace, run_x = wx;
+ continue;
+ }
+ /* every letter is hspace wide: drawn one by one where the font's own width differs */
+ char ch = *p;
+ if (nrun == (int)sizeof run) gfx_text_ex(w->font, run_x, wy, run, nrun, col, 0, 0, 0), nrun = 0, run_x = wx;
+ if (!nrun) run_x = wx;
+ run[nrun++] = ch;
+ wx += w->hspace;
+ }
+ if (nrun) gfx_text_ex(w->font, run_x, wy, run, nrun, col, 0, 0, 0);
+}
+
+/* ---------------------------------------------------------------- the dialogue box */
+static Writer box;
+static bool box_open;
+static int box_side = -1, side_now;
+static int face_t;
+static const char *pending[MAX_MSG];
+static int npending;
+static char fbuf[4][256];
+static int fbuf_i;
+static uint8_t start_fc, start_fe;
+
+void text_clear(void) { npending = 0, start_fc = 0, start_fe = 0; }
+void text_add(const char *s) {
+ if (npending < MAX_MSG) pending[npending++] = s;
+}
+
+/* "~1" and "~2" in a text filled with the strings given (scr_84_get_subst_string) */
+void text_addf(const char *fmt, ...) {
+ va_list ap;
+ const char *args[4] = {"", "", "", ""};
+ va_start(ap, fmt);
+ for (int k = 0; k < 4; k++) {
+ const char *a = va_arg(ap, const char *);
+ if (!a) break;
+ args[k] = a;
+ }
+ va_end(ap);
+ char *o = fbuf[fbuf_i++ & 3];
+ int n = 0;
+ for (int i = 0; fmt[i] && n < 250; i++) {
+ if (fmt[i] == '~' && fmt[i + 1] >= '1' && fmt[i + 1] <= '4') {
+ for (const char *a = args[fmt[i + 1] - '1']; *a && n < 250; a++) o[n++] = *a;
+ i++;
+ } else {
+ o[n++] = fmt[i];
+ }
+ }
+ o[n] = 0;
+ text_add(o);
+}
+
+void text_face(int fc, int fe) { start_fc = (uint8_t)fc, start_fe = (uint8_t)fe; }
+void text_side(int side) { box_side = side; }
+void text_set_choices(const char *a, const char *b, const char *c, const char *d) {
+ g_choices[0] = a, g_choices[1] = b, g_choices[2] = c, g_choices[3] = d;
+}
+
+void text_open(void) {
+ if (!npending) return;
+ side_now = box_side >= 0 ? box_side : !world_kris_low();
+ writer_start(&box, 29, side_now ? 170 : 15, 33);
+ box.fc = start_fc, box.fe = start_fe;
+ for (int i = 0; i < npending; i++) writer_add(&box, pending[i]);
+ if (box.fc) box.charline = 26, msg_begin(&box);
+ box_open = true;
+ npending = 0;
+ box_side = -1;
+ face_t = 0;
+}
+
+bool text_active(void) { return box_open; }
+int text_choice(void) { return g_choice; }
+int text_cue(void) { return g_cue; }
+void text_set_cue(int v) { g_cue = v; }
+int text_msgno(void) { return box.cur; }
+void text_close(void) { box_open = false, g_choice_n = 0; }
+
+void text_update(uint32_t pressed, uint32_t held) {
+ if (!box_open) return;
+ int fc = box.fc;
+ writer_update(&box, pressed, held);
+ if (box.fc != fc) box.charline = box.fc ? 26 : 33;
+ face_t++;
+ if (box.done) box_open = false;
+}
+
+static void draw_choices(int top) {
+ if (!g_choice_n) return;
+ int d = top ? 0 : 155;
+ int n = g_choice_n;
+ int hx[4], hy[4], tx[4], ty[4];
+ hx[0] = 30, hy[0] = 34 + d, tx[0] = 46, ty[0] = 13 + d;
+ int w1 = gfx_text_width(FONT_MAIN, g_choices[1] ? g_choices[1] : "", 64);
+ hx[1] = 320 - 30 - w1 - 14, hy[1] = 34 + d, tx[1] = hx[1] + 16, ty[1] = 13 + d;
+ if (n >= 3) {
+ int r0 = hx[0] + 16 + gfx_text_width(FONT_MAIN, g_choices[0] ? g_choices[0] : "", 64);
+ int w2 = gfx_text_width(FONT_MAIN, g_choices[2] ? g_choices[2] : "", 64) + 16;
+ if (n == 4) {
+ int w3 = gfx_text_width(FONT_MAIN, g_choices[3] ? g_choices[3] : "", 64) + 16;
+ if (w3 > w2) w2 = w3;
+ }
+ hx[2] = r0 + (hx[1] - r0) / 2 - w2 / 2, hy[2] = 16 + d, tx[2] = hx[2] + 16, ty[2] = 13 + d;
+ hx[3] = hx[2], hy[3] = 60 + d, tx[3] = hx[3] + 16, ty[3] = 56 + d;
+ }
+ for (int i = 0; i < n; i++)
+ if (g_choices[i]) gfx_text(FONT_MAIN, tx[i], ty[i], g_choices[i], g_choice_sel == i ? C_YELLOW : C_WHITE, 255);
+ int sx = g_choice_sel >= 0 ? hx[g_choice_sel] : 140, sy = g_choice_sel >= 0 ? hy[g_choice_sel] : 36 + d;
+ gfx_sprite(spr_heartsmall, 0, sx, sy, 0, 255);
+}
+
+/* scr_darkbox: the Dark World's box, its corners' jewels turning */
+void draw_darkbox(int x0, int y0, int x1, int y1) {
+ gfx_rect(x0 + 7, y0 + 7, x1 - x0 - 14, y1 - y0 - 14, C_BLACK, 255);
+ int jewel = (face_t / 10) % 4;
+ gfx_sprite_ex(spr_textbox_top, 0, x0 + 16, y0, 256 * (x1 - x0 - 31), 256, 0, 0, 255);
+ gfx_sprite_ex(spr_textbox_top, 0, x0 + 16, y1 + 1, 256 * (x1 - x0 - 31), -256, 0, 0, 255);
+ gfx_sprite_ex(spr_textbox_left, 0, x0, y0 + 16, 256, 256 * (y1 - y0 - 31), 0, 0, 255);
+ gfx_sprite_ex(spr_textbox_left, 0, x1 + 1, y0 + 16, -256, 256 * (y1 - y0 - 31), 0, 0, 255);
+ gfx_sprite(spr_textbox_topleft, jewel, x0, y0, 0, 255);
+ gfx_sprite(spr_textbox_topleft, jewel, x1 + 1, y0, GFX_FLIPX, 255);
+ gfx_sprite(spr_textbox_topleft, jewel, x0, y1 + 1, GFX_FLIPY, 255);
+ gfx_sprite(spr_textbox_topleft, jewel, x1 + 1, y1 + 1, GFX_FLIPX | GFX_FLIPY, 255);
+}
+
+void text_draw(void) {
+ if (!box_open) return;
+ int top = !side_now;
+ if (!world_dark()) {
+ /* scr_dbox in the Light World: a white frame, three pixels */
+ int y = top ? 5 : 160;
+ gfx_rect(16, y, 289, 76, C_WHITE, 255);
+ gfx_rect(19, y + 3, 283, 70, C_BLACK, 255);
+ } else {
+ int y0 = top ? 5 : 160;
+ gfx_rect(19, y0 + 3, 282, 69, C_BLACK, 255);
+ draw_darkbox(12, y0 - 4, 308, y0 + 79);
+ }
+ if (box.fc) face_draw(box.fc, box.fe, box.x + 8, box.y + 5, writer_talking(&box), face_t);
+ writer_draw(&box);
+ draw_choices(top);
+}
diff --git a/games/deltarune/src/text.h b/games/deltarune/src/text.h
new file mode 100644
index 00000000..e90ec34a
--- /dev/null
+++ b/games/deltarune/src/text.h
@@ -0,0 +1,70 @@
+/* Deltarune: text, typed a letter at a time, as the original's writer does it.
+ *
+ * The texts are the original's own (its lang_en.json), with its marks:
+ * & a new line (indented under "* " when the text starts so)
+ * / the end of a message: Z goes on to the next one
+ * /% the end of the last: Z closes the box
+ * % the next message at once; %% the box closes at once
+ * ^N a pause (N: 1-9, 5 to 150 frames)
+ * \Ex the face's expression (0-9, A-E); \Fx the face (0 none, S Susie, R Ralsei, N Noelle, T Toriel,
+ * L Lancer, A Alphys, B Berdly, r Rudy, K the King, ...)
+ * \cx colour (R, B, Y, G, W, X black, 0 back to the text's own)
+ * \Cn a choice of n (2-4) in the box (text_set_choices gives them)
+ * \Mn a cue for the cutscene (text_cue())
+ * \Tx \Sn \In \sn \fn the voice, a sound, a picture, skipping, a small face: shown or skipped here
+ * Lines wrap at 33 letters (26 beside a face), every letter 8 pixels wide. */
+#ifndef DR_TEXT_H
+#define DR_TEXT_H
+#include <stdbool.h>
+#include <stdint.h>
+
+enum { FC_NONE, FC_SUSIE, FC_RALSEI, FC_NOELLE, FC_TORIEL, FC_LANCER, FC_SANS, FC_UNDYNE = 9, FC_ASGORE,
+ FC_ALPHYS, FC_BERDLY, FC_C, FC_JOCK, FC_RUDY, FC_CATTY, FC_BRATTY, FC_RURUS, FC_BURGERPANTS, FC_KING };
+
+#define MAX_MSG 16
+
+/* the dialogue box: messages added, then opened */
+void text_clear(void);
+void text_add(const char *s); /* a message (global.msg[n]) */
+void text_addf(const char *fmt, ...); /* (one made with ~1 ~2 filled, as scr_84_get_subst_string) */
+void text_face(int fc, int fe); /* the face it starts with (global.fc, global.fe) */
+void text_open(void);
+void text_side(int side); /* -1 by where Kris is (the default), 0 top, 1 bottom */
+void text_set_choices(const char *a, const char *b, const char *c, const char *d);
+bool text_active(void);
+void text_update(uint32_t pressed, uint32_t held);
+void text_draw(void);
+int text_choice(void); /* the last choice: 0-3 */
+int text_cue(void); /* the last \M cue (global.flag[20]) */
+void text_set_cue(int v);
+int text_msgno(void); /* the message shown now */
+void text_close(void);
+
+/* a writer anywhere (the battle's text, a bubble): the same marks */
+typedef struct {
+ const char *msg[MAX_MSG];
+ int nmsg, cur;
+ int pos; /* letters of the message shown (source offset) */
+ int wait; /* frames to the next letter */
+ int x, y; /* where its first line starts (screen) */
+ int charline; /* letters a line */
+ int vspace, hspace;
+ int font;
+ uint16_t color;
+ bool halt; /* the message is all shown: waits for Z */
+ bool closing; /* /%: Z closes */
+ bool done; /* closed */
+ bool skippable;
+ bool aster; /* the message starts with "* " */
+ uint8_t fc, fe;
+ int talk_t; /* frames the mouth moves */
+ char line[640]; /* the message as laid out: wraps made into & */
+ int len;
+} Writer;
+void writer_start(Writer *w, int x, int y, int charline);
+void writer_add(Writer *w, const char *s);
+bool writer_update(Writer *w, uint32_t pressed, uint32_t held); /* false once done */
+void writer_draw(const Writer *w);
+bool writer_talking(const Writer *w);
+void writer_show_all(Writer *w);
+#endif
diff --git a/games/deltarune/src/world.c b/games/deltarune/src/world.c
new file mode 100644
index 00000000..66d710e4
--- /dev/null
+++ b/games/deltarune/src/world.c
@@ -0,0 +1,552 @@
+/* The overworld (world.h): the original's obj_mainchara, obj_caterpillarchara, its doors and markers. */
+#include <string.h>
+#include "event.h"
+#include "game.h"
+#include "gfx.h"
+#include "rooms.h"
+#include "text.h"
+#include "world.h"
+
+Obj objs[MAX_OBJS];
+Player pl;
+int g_room = -1;
+int cam_x, cam_y;
+bool cam_locked;
+uint8_t g_fade;
+int g_shake;
+static RoomInfo ri;
+
+const RoomInfo *world_room_info(void) { return g_room >= 0 ? &ri : NULL; }
+bool world_dark(void) { return g_room >= 0 && (ri.flags & ROOM_DARK); }
+int world_scale(void) { return world_dark() ? 2 : 1; }
+static int view_w(void) { return 320 * world_scale(); }
+static int view_h(void) { return 240 * world_scale(); }
+
+/* Kris's sprites and box (spr_krisd's mask: x 0-18, y 25-38; drawn twice its size in the Dark World) */
+static uint16_t kris_spr(int dir) {
+ static const uint16_t lw[4] = {spr_krisd, spr_krisr, spr_krisu, spr_krisl};
+ static const uint16_t dw[4] = {spr_krisd_dark, spr_krisr_dark, spr_krisu_dark, spr_krisl_dark};
+ return world_dark() ? dw[dir & 3] : lw[dir & 3];
+}
+static void kris_box(int x, int y, int *x0, int *y0, int *x1, int *y1) {
+ int s = world_scale();
+ *x0 = x, *y0 = y + 25 * s, *x1 = x + 19 * s, *y1 = y + 39 * s;
+}
+bool world_kris_low(void) { return pl.y > cam_y + (world_dark() ? 250 : 130); }
+
+/* ---------------------------------------------------------------- solids */
+static bool box_hits_solid(int x0, int y0, int x1, int y1, const uint8_t *s) {
+ int kind = s[0];
+ int sx0 = rds16(s + 2), sy0 = rds16(s + 4), sx1 = rds16(s + 6), sy1 = rds16(s + 8);
+ if (x1 <= sx0 || x0 >= sx1 || y1 <= sy0 || y0 >= sy1) return false;
+ if (kind == 0) return true;
+ int w = sx1 - sx0, h = sy1 - sy0;
+ if (kind == 5) {
+ /* an ellipse: the box's point nearest its middle */
+ int cx = (sx0 + sx1) / 2, cy = (sy0 + sy1) / 2;
+ int px = clamp_i(cx, x0, x1 - 1), py = clamp_i(cy, y0, y1 - 1);
+ int64_t dx = (int64_t)(px - cx) * 2 * h, dy = (int64_t)(py - cy) * 2 * w;
+ return dx * dx + dy * dy <= (int64_t)w * h * w * h;
+ }
+ /* a right triangle: the box's corner deepest into it */
+ int px, py;
+ switch (kind) {
+ case 1: /* square corner bottom-left: solid below the line from top-left to bottom-right */
+ px = max_i(x0, sx0), py = min_i(y1 - 1, sy1 - 1);
+ return (int64_t)(py - sy0) * w >= (int64_t)(px - sx0) * h;
+ case 2: /* bottom-right: below the line from top-right to bottom-left */
+ px = min_i(x1 - 1, sx1 - 1), py = min_i(y1 - 1, sy1 - 1);
+ return (int64_t)(py - sy0) * w >= (int64_t)(sx1 - 1 - px) * h;
+ case 3: /* top-left: above the line from bottom-left to top-right */
+ px = max_i(x0, sx0), py = max_i(y0, sy0);
+ return (int64_t)(sy1 - 1 - py) * w >= (int64_t)(px - sx0) * h;
+ default: /* top-right */
+ px = min_i(x1 - 1, sx1 - 1), py = max_i(y0, sy0);
+ return (int64_t)(sy1 - 1 - py) * w >= (int64_t)(sx1 - 1 - px) * h;
+ }
+}
+
+static bool box_free(int x0, int y0, int x1, int y1, int ignore) {
+ for (int i = 0; i < ri.nsolid; i++)
+ if (box_hits_solid(x0, y0, x1, y1, ri.solids + 10 * i)) return false;
+ for (int i = 0; i < MAX_OBJS; i++) {
+ const Obj *o = &objs[i];
+ if ((o->flags & (OF_SOLID | OF_GONE)) != OF_SOLID || i == ignore) continue;
+ int ox = o->x / FX + o->bx, oy = o->y / FX + o->by;
+ if (x1 > ox && x0 < ox + o->bw && y1 > oy && y0 < oy + o->bh) return false;
+ }
+ return true;
+}
+
+bool world_place_free(int x, int y, int ignore) {
+ int x0, y0, x1, y1;
+ kris_box(x, y, &x0, &y0, &x1, &y1);
+ return box_free(x0, y0, x1, y1, ignore);
+}
+
+/* ---------------------------------------------------------------- things */
+Obj *obj_new(uint16_t spr, int x, int y) {
+ for (int i = 0; i < MAX_OBJS; i++)
+ if (objs[i].flags & OF_GONE) {
+ Obj *o = &objs[i];
+ memset(o, 0, sizeof *o);
+ o->obj = 0xFFFF, o->inst = -1;
+ o->spr = spr, o->x = x * FX, o->y = y * FX;
+ o->alpha = 255;
+ return o;
+ }
+ static Obj spare;
+ memset(&spare, 0, sizeof spare);
+ spare.flags = OF_GONE;
+ return &spare;
+}
+void obj_free(Obj *o) { o->flags = OF_GONE; }
+void obj_clear_all(void) {
+ for (int i = 0; i < MAX_OBJS; i++) objs[i].flags = OF_GONE;
+}
+Obj *obj_find(int name) {
+ for (int i = 0; i < MAX_OBJS; i++)
+ if (!(objs[i].flags & OF_GONE) && objs[i].name == name) return &objs[i];
+ return NULL;
+}
+Obj *obj_get(int name) {
+ Obj *o = obj_find(name);
+ if (o) return o;
+ static Obj spare;
+ memset(&spare, 0, sizeof spare);
+ spare.flags = OF_GONE;
+ return &spare;
+}
+void obj_set_box(Obj *o, int bx, int by, int bw, int bh) {
+ o->bx = (int16_t)bx, o->by = (int16_t)by, o->bw = (int16_t)bw, o->bh = (int16_t)bh;
+}
+void obj_walk_to(Obj *o, int x, int y, int sp) {
+ o->tx = x * FX, o->ty = y * FX, o->wsp = sp * FX, o->walking = true;
+}
+int obj_px(const Obj *o) { return o->x / FX; }
+int obj_py(const Obj *o) { return o->y / FX; }
+void obj_place(Obj *o, int x, int y) { o->x = x * FX, o->y = y * FX; }
+
+static void obj_step(Obj *o) {
+ if (o->walking) {
+ int dx = o->tx - o->x, dy = o->ty - o->y;
+ if (o->sprs[0]) {
+ if (abs_i(dx) > abs_i(dy)) o->dir = dx < 0 ? DIR_LEFT : DIR_RIGHT;
+ else if (dy) o->dir = dy < 0 ? DIR_UP : DIR_DOWN;
+ o->spr = o->sprs[o->dir];
+ }
+ o->x += clamp_i(dx, -o->wsp, o->wsp);
+ o->y += clamp_i(dy, -o->wsp, o->wsp);
+ o->img += FX / 4;
+ if (o->x == o->tx && o->y == o->ty) o->walking = false, o->img = 0;
+ } else {
+ o->x += o->hs, o->y += o->vs;
+ o->img += o->ispd;
+ }
+}
+
+/* ---------------------------------------------------------------- the party following (obj_caterpillarchara) */
+#define HIST 26
+static int32_t hx[HIST], hy[HIST];
+static uint8_t hdir[HIST];
+static bool follow_on = true;
+typedef struct {
+ int c;
+ int target; /* how far behind Kris (history steps) */
+ int32_t x, y;
+ int walktimer, walkbuffer;
+ uint8_t dir;
+} Follower;
+static Follower fl[2];
+static int nfl;
+
+static void follower_sprites(int c, uint16_t s[4]) {
+ if (c == CH_SUSIE) {
+ s[0] = plot() >= 240 ? spr_susied_dark_eyes : spr_susied_dark, s[1] = plot() >= 240 ? spr_susier_dark_eyes : spr_susier_dark;
+ s[2] = spr_susieu_dark, s[3] = plot() >= 240 ? spr_susiel_dark_eyes : spr_susiel_dark;
+ } else {
+ s[0] = spr_ralseid, s[1] = spr_ralseir, s[2] = spr_ralseiu, s[3] = spr_ralseil;
+ }
+}
+
+void follow_reset(void) {
+ for (int i = 0; i < HIST; i++) hx[i] = pl.x, hy[i] = pl.y, hdir[i] = pl.dir;
+ nfl = 0;
+ if (!world_dark()) return;
+ for (int k = 1; k < 3; k++) {
+ int c = sv.chr[k];
+ if (c != CH_SUSIE && c != CH_RALSEI) continue;
+ Follower *f = &fl[nfl];
+ f->c = c, f->target = 12 * (nfl + 1);
+ f->walktimer = 0, f->walkbuffer = 0, f->dir = pl.dir;
+ f->x = pl.x - (c == CH_SUSIE ? 6 : 4) * 2 / 2, f->y = pl.y - (c == CH_SUSIE ? 16 : 12);
+ nfl++;
+ }
+}
+void follow_show(bool on) { follow_on = on; }
+bool follow_shown(void) { return follow_on; }
+
+static void follow_step(void) {
+ bool moved = pl.x != hx[0] || pl.y != hy[0];
+ if (moved) {
+ for (int i = HIST - 1; i > 0; i--) hx[i] = hx[i - 1], hy[i] = hy[i - 1], hdir[i] = hdir[i - 1];
+ hx[0] = pl.x, hy[0] = pl.y, hdir[0] = pl.dir;
+ }
+ for (int k = 0; k < nfl; k++) {
+ Follower *f = &fl[k];
+ if (!moved) {
+ if (f->walkbuffer <= 0) f->walktimer = 0;
+ f->walkbuffer -= 3;
+ continue;
+ }
+ int t = f->target < HIST - 1 ? f->target : HIST - 2;
+ int32_t nx = hx[t] - (f->c == CH_SUSIE ? 6 : 4), ny = hy[t] - (f->c == CH_SUSIE ? 16 : 12);
+ bool run = abs_i(hx[t + 1] - hx[t]) > 4 || abs_i(hy[t + 1] - hy[t]) > 4;
+ if (nx != f->x || ny != f->y) f->walkbuffer = 24;
+ f->x = nx, f->y = ny, f->dir = hdir[t];
+ if (f->walkbuffer > 12) {
+ f->walktimer += run ? 6 : 3;
+ if (f->walktimer >= 80) f->walktimer -= 80;
+ }
+ }
+}
+
+Obj *follower(int c) {
+ (void)c;
+ return NULL;
+}
+
+/* ---------------------------------------------------------------- entering a room */
+void world_enter(int room, int x, int y, int dir) {
+ g_room = room;
+ room_info(room, &ri);
+ sv.darkzone = (ri.flags & ROOM_DARK) ? 1 : 0;
+ obj_clear_all();
+ pl.x = x, pl.y = y, pl.dir = (uint8_t)dir;
+ pl.frozen = false, pl.hidden = false, pl.spr = 0, pl.img = 0;
+ pl.walktimer = 0, pl.walkbuffer = 0, pl.runtimer = 0;
+ cam_locked = false;
+ follow_on = true;
+ follow_reset();
+ room_setup(room);
+ world_camera();
+}
+
+bool world_inst(int obj, int k, Inst *out) {
+ for (int i = 0; i < ri.ninst; i++) {
+ room_inst(&ri, i, out);
+ if (out->obj == obj && k-- == 0) return true;
+ }
+ return false;
+}
+
+bool world_marker(int obj, int *x, int *y) {
+ Inst in;
+ if (!world_inst(obj, 0, &in)) return false;
+ *x = in.x, *y = in.y;
+ return true;
+}
+
+/* the marker each entrance lands on (obj_mainchara's create) */
+static int marker_of(int entrance) {
+ switch (entrance) {
+ case 1: return obj_markerA;
+ case 2: return obj_markerB;
+ case 4: return obj_markerC;
+ case 5: return obj_markerD;
+ case 6: return obj_markerE;
+ case 7: return obj_markerF;
+ case 23: return obj_markerw;
+ case 24: return obj_markerX;
+ default: return -1;
+ }
+}
+
+void world_enter_marker(int room, int entrance) {
+ RoomInfo r;
+ room_info(room, &r);
+ int x = 0, y = 0, m = marker_of(entrance);
+ bool found = false;
+ for (int i = 0; i < r.ninst && m >= 0; i++) {
+ Inst in;
+ room_inst(&r, i, &in);
+ if (in.obj == m) {
+ x = in.x, y = in.y, found = true;
+ break;
+ }
+ }
+ if (!found) {
+ /* (no marker: where the room puts Kris itself) */
+ for (int i = 0; i < r.ninst; i++) {
+ Inst in;
+ room_inst(&r, i, &in);
+ if (in.obj == obj_mainchara) x = in.x, y = in.y;
+ }
+ }
+ world_enter(room, x, y, pl.dir);
+}
+
+/* ---------------------------------------------------------------- the camera */
+void world_camera(void) {
+ if (cam_locked) return;
+ int s = world_scale();
+ if (world_dark()) {
+ cam_x = pl.x - (view_w() / 2 - 19);
+ cam_y = pl.y - (view_h() / 2 - 38);
+ } else {
+ cam_x = pl.x + 11 - view_w() / 2;
+ cam_y = pl.y + 17 - view_h() / 2;
+ }
+ (void)s;
+ cam_x = clamp_i(cam_x, 0, max_i(0, ri.w - view_w()));
+ cam_y = clamp_i(cam_y, 0, max_i(0, ri.h - view_h()));
+}
+
+/* ---------------------------------------------------------------- doors and fades */
+static struct {
+ int phase, t; /* 1 fading out, 2 fading in */
+ int room, entrance;
+} fade;
+
+void world_fade_to(int room, int entrance) {
+ fade.phase = 1, fade.t = 0, fade.room = room, fade.entrance = entrance;
+}
+bool world_fading(void) { return fade.phase != 0; }
+
+static void fade_step(void) {
+ if (!fade.phase) return;
+ if (fade.phase == 1) {
+ fade.t++;
+ g_fade = (uint8_t)min_i(255, fade.t * 255 / 8);
+ if (fade.t >= 8) {
+ world_enter_marker(fade.room, fade.entrance);
+ fade.phase = 2, fade.t = 8;
+ }
+ } else {
+ fade.t--;
+ g_fade = (uint8_t)max_i(0, fade.t * 255 / 8);
+ if (fade.t <= 0) fade.phase = 0, g_fade = 0;
+ }
+}
+
+/* ---------------------------------------------------------------- Kris (obj_mainchara's step) */
+static void kris_animate(bool walked, bool running) {
+ if (walked) pl.walkbuffer = 24;
+ if (pl.walkbuffer > 12) {
+ pl.walktimer += running ? 6 : 3;
+ if (pl.walktimer >= 80) pl.walktimer -= 80;
+ pl.img = pl.walktimer / 20;
+ }
+ if (pl.walkbuffer <= 0) {
+ pl.walktimer = pl.walktimer < 20 ? 19 : pl.walktimer < 40 ? 39 : pl.walktimer < 60 ? 59 : 79;
+ pl.img = 0;
+ }
+ pl.walkbuffer -= 3;
+}
+
+static void kris_move(void) {
+ uint32_t k = g_held;
+ bool dark = world_dark();
+ int bw = dark ? 4 : 3;
+ bool run = (k & K_X) != 0;
+ if (flag(11) == 1) run = !run;
+ int ws = bw;
+ if (run) {
+ if (!dark) ws = bw + (pl.runtimer > 60 ? 3 : pl.runtimer > 10 ? 2 : 1);
+ else ws = bw + (pl.runtimer > 60 ? 5 : pl.runtimer > 10 ? 4 : 2);
+ }
+ bool l = k & K_LEFT, r = k & K_RIGHT, u = k & K_UP, d = k & K_DOWN;
+ int px = 0, py = 0, pressdir = -1;
+ if (r) px = ws, pressdir = DIR_RIGHT;
+ if (l) px = -ws, pressdir = DIR_LEFT;
+ if (d) py = ws, pressdir = DIR_DOWN;
+ if (u) py = -ws, pressdir = DIR_UP;
+ /* facing: kept while its key is held */
+ bool held_now = (pl.dir == DIR_DOWN && d) || (pl.dir == DIR_UP && u) || (pl.dir == DIR_LEFT && l) || (pl.dir == DIR_RIGHT && r);
+ if (pressdir >= 0 && !held_now) pl.dir = (uint8_t)pressdir;
+ if (pl.dir == DIR_UP && d && !u) pl.dir = DIR_DOWN;
+ if (pl.dir == DIR_DOWN && u && !d) pl.dir = DIR_UP;
+ if (pl.dir == DIR_LEFT && r && !l) pl.dir = DIR_RIGHT;
+ if (pl.dir == DIR_RIGHT && l && !r) pl.dir = DIR_LEFT;
+ int x = pl.x, y = pl.y;
+ if (!world_place_free(x + px, y + py, -1)) {
+ /* blocked going sideways: around a corner, up or down, as far as it walks */
+ if (px && !world_place_free(x + px, y, -1)) {
+ for (int g = ws; g > 0; g--) {
+ if (!d && world_place_free(x + px, y - g, -1)) { y -= g, py = 0; break; }
+ if (!u && world_place_free(x + px, y + g, -1)) { y += g, py = 0; break; }
+ }
+ int i = px;
+ while (i && !world_place_free(x + i, y, -1)) i -= sgn_i(i);
+ px = i;
+ }
+ if (py && !world_place_free(x + px, y + py, -1) && !world_place_free(x, y + py, -1)) {
+ for (int g = ws; g > 0; g--) {
+ if (!r && world_place_free(x - g, y + py, -1)) { x -= g, px = 0; break; }
+ if (!l && world_place_free(x + g, y + py, -1)) { x += g, px = 0; break; }
+ }
+ int j = py;
+ while (j && !world_place_free(x + px, y + j, -1)) j -= sgn_i(j);
+ py = j;
+ }
+ if (!world_place_free(x + px, y + py, -1)) {
+ if (world_place_free(x + px, y, -1)) py = 0;
+ else if (world_place_free(x, y + py, -1)) px = 0;
+ else px = py = 0;
+ }
+ }
+ bool moving = px || py;
+ if (run && moving) pl.runtimer++;
+ else pl.runtimer = 0;
+ pl.x = x + px, pl.y = y + py;
+ kris_animate(moving || x != pl.x - px || y != pl.y - py, run && moving);
+}
+
+/* what Z reaches in front of Kris (the original's collision rectangles) */
+static Obj *talk_target(void) {
+ int d = world_scale(), w = 19 * d, h = 38 * d;
+ int x0, y0, x1, y1, x = pl.x, y = pl.y;
+ switch (pl.dir) {
+ case DIR_RIGHT: x0 = x + w / 2, y0 = y + 6 * d + h / 2, x1 = x + w + 13 * d, y1 = y + h; break;
+ case DIR_LEFT: x0 = x - 13 * d, y0 = y + 6 * d + h / 2, x1 = x + w / 2, y1 = y + h; break;
+ case DIR_DOWN: x0 = x + 4 * d, y0 = y + 28 * d, x1 = x + w - 4 * d, y1 = y + h + 15 * d; break;
+ default: x0 = x + 3 * d, y0 = y + 5 * d, x1 = x + w - 5 * d, y1 = y + h - 5 * d; break;
+ }
+ for (int i = 0; i < MAX_OBJS; i++) {
+ Obj *o = &objs[i];
+ if ((o->flags & (OF_TALK | OF_GONE)) != OF_TALK) continue;
+ int ox = o->x / FX + o->bx, oy = o->y / FX + o->by;
+ if (x1 >= ox && x0 < ox + o->bw && y1 >= oy && y0 < oy + o->bh) return o;
+ }
+ return NULL;
+}
+
+static Obj *touch_target(void) {
+ int x0, y0, x1, y1;
+ kris_box(pl.x, pl.y, &x0, &y0, &x1, &y1);
+ for (int i = 0; i < MAX_OBJS; i++) {
+ Obj *o = &objs[i];
+ if ((o->flags & (OF_TOUCH | OF_GONE)) != OF_TOUCH) continue;
+ int ox = o->x / FX + o->bx, oy = o->y / FX + o->by;
+ if (x1 > ox && x0 < ox + o->bw && y1 > oy && y0 < oy + o->bh) return o;
+ }
+ return NULL;
+}
+
+void pl_face(int dir) { pl.dir = (uint8_t)dir; }
+
+/* ---------------------------------------------------------------- Kris walked by a cutscene */
+static struct {
+ int x, y, sp;
+ bool on;
+} walk;
+void pl_walk_to(int x, int y, int sp) { walk.x = x, walk.y = y, walk.sp = sp ? sp : 4, walk.on = true; }
+bool pl_walking(void) { return walk.on; }
+static void pl_walk_step(void) {
+ if (!walk.on) {
+ kris_animate(false, false);
+ return;
+ }
+ int dx = walk.x - pl.x, dy = walk.y - pl.y;
+ if (dx) pl.dir = dx < 0 ? DIR_LEFT : DIR_RIGHT;
+ if (abs_i(dy) > abs_i(dx)) pl.dir = dy < 0 ? DIR_UP : DIR_DOWN;
+ pl.x += clamp_i(dx, -walk.sp, walk.sp);
+ pl.y += clamp_i(dy, -walk.sp, walk.sp);
+ kris_animate(true, false);
+ if (pl.x == walk.x && pl.y == walk.y) walk.on = false;
+}
+
+void world_update(void) {
+ for (int i = 0; i < MAX_OBJS; i++)
+ if (!(objs[i].flags & OF_GONE)) obj_step(&objs[i]);
+ fade_step();
+ if (fade.phase) return;
+ bool busy = text_active() || event_blocking() || pl.frozen;
+ if (!busy) {
+ kris_move();
+ if (g_pressed & K_Z) {
+ Obj *o = talk_target();
+ if (o && o->event) {
+ if (o->sprs[0]) o->dir = (uint8_t)((pl.dir + 2) & 3), o->spr = o->sprs[o->dir];
+ event_start(o->event, o);
+ }
+ }
+ if (!event_running()) {
+ Obj *t = touch_target();
+ if (t && t->event) event_start(t->event, t);
+ }
+ if ((g_pressed & K_C) && !event_running()) room_menu();
+ } else if (!text_active()) {
+ pl_walk_step();
+ } else {
+ kris_animate(false, false);
+ }
+ follow_step();
+ world_camera();
+ if (g_shake > 0) g_shake--;
+}
+
+/* ---------------------------------------------------------------- drawing */
+typedef struct {
+ int key; /* the bottom, for the drawing order */
+ int16_t i; /* objs index, -1 Kris, -2 - k follower k */
+} DrawRef;
+
+static int sx_of(int x) { return (x - cam_x) / world_scale(); }
+static int sy_of(int y) { return (y - cam_y) / world_scale(); }
+
+void world_draw_scene(void) {
+ int s = world_scale();
+ int shx = g_shake ? (int)(rnd() % 5) - 2 : 0;
+ int ox = cam_x / s - shx, oy = cam_y / s;
+ if (ri.bgcol) gfx_rect(0, 0, SCREEN_W, SCREEN_H, ri.bgcol, 255);
+ gfx_tiles(ox, oy, false);
+ DrawRef refs[MAX_OBJS + 4];
+ int n = 0;
+ for (int i = 0; i < MAX_OBJS; i++) {
+ const Obj *o = &objs[i];
+ if (o->flags & (OF_GONE | OF_HIDDEN) || o->spr == 0xFFFF) continue;
+ int key = o->y / FX + spr_h(o->spr) * s + o->depth_bias;
+ if (o->flags & OF_BACK) key = -100000;
+ if (o->flags & OF_FRONT) key = 1000000;
+ refs[n].key = key, refs[n].i = (int16_t)i, n++;
+ }
+ if (!pl.hidden) refs[n].key = pl.y + 38 * s, refs[n].i = -1, n++;
+ if (follow_on)
+ for (int k = 0; k < nfl; k++) refs[n].key = fl[k].y + 46 * s - 1, refs[n].i = (int16_t)(-2 - k), n++;
+ /* in order of their bottoms (insertion sort: few) */
+ for (int a = 1; a < n; a++) {
+ DrawRef t = refs[a];
+ int b = a - 1;
+ while (b >= 0 && refs[b].key > t.key) refs[b + 1] = refs[b], b--;
+ refs[b + 1] = t;
+ }
+ for (int k = 0; k < n; k++) {
+ int i = refs[k].i;
+ if (i == -1) {
+ uint16_t spr = pl.spr ? pl.spr : kris_spr(pl.dir);
+ gfx_sprite(spr, pl.spr ? pl.img : pl.img, sx_of(pl.x) + shx, sy_of(pl.y), 0, 255);
+ } else if (i <= -2) {
+ const Follower *f = &fl[-2 - i];
+ uint16_t sp[4];
+ follower_sprites(f->c, sp);
+ gfx_sprite(sp[f->dir & 3], f->walktimer / 20, sx_of(f->x) + shx, sy_of(f->y), 0, 255);
+ } else {
+ const Obj *o = &objs[i];
+ int fr = o->img / FX;
+ if (o->scale)
+ gfx_sprite_ex(o->spr, fr, sx_of(o->x / FX) + shx, sy_of(o->y / FX), o->flags & OF_FLIPX ? -o->scale : o->scale,
+ o->scale, 0, 0, o->alpha);
+ else
+ gfx_sprite(o->spr, fr, sx_of(o->x / FX) + shx, sy_of(o->y / FX), o->flags & OF_FLIPX ? GFX_FLIPX : 0, o->alpha);
+ }
+ }
+ if (ri.fgrid) gfx_tiles(ox, oy, true);
+ room_draw_over();
+}
+
+void world_draw(void) {
+ world_draw_scene();
+ text_draw();
+ if (g_fade) gfx_rect(0, 0, SCREEN_W, SCREEN_H, C_BLACK, g_fade);
+}
diff --git a/games/deltarune/src/world.h b/games/deltarune/src/world.h
new file mode 100644
index 00000000..ca2f7143
--- /dev/null
+++ b/games/deltarune/src/world.h
@@ -0,0 +1,108 @@
+/* Deltarune: the overworld. Rooms, the camera, Kris and the party following him, the room's things.
+ *
+ * Positions are the original's room units: the Light World's are the screen's pixels, the Dark World's
+ * twice them (its rooms are drawn halved). Things move as there, in 1/16 of a unit. */
+#ifndef DR_WORLD_H
+#define DR_WORLD_H
+#include <stdbool.h>
+#include <stdint.h>
+#include "res.h"
+
+enum { DIR_DOWN, DIR_RIGHT, DIR_UP, DIR_LEFT }; /* global.facing's order */
+
+/* a thing of the room: a character, a sign, a SAVE point, a trigger... */
+enum {
+ OF_SOLID = 1, /* Kris can't walk through its box */
+ OF_TALK = 2, /* Z facing it runs its event */
+ OF_TOUCH = 4, /* walking into its box runs its event */
+ OF_HIDDEN = 8, /* not drawn */
+ OF_FRONT = 16, /* drawn over everything else */
+ OF_BACK = 32, /* drawn under everything else */
+ OF_FLIPX = 64, /* drawn mirrored */
+ OF_WALKANIM = 128, /* its frames follow its walking (as the party's) */
+ OF_GONE = 256 /* free */
+};
+#define MAX_OBJS 64
+#define FX 16
+typedef struct Obj {
+ uint16_t flags;
+ uint16_t obj; /* the original's object (obj_* in data.h), 0xFFFF none */
+ int16_t inst; /* its place among the room's instances, -1 */
+ int32_t x, y; /* its sprite's origin, 1/16 unit */
+ int32_t hs, vs; /* speed (1/16 unit a frame) */
+ uint16_t spr; /* SPR (data.h), 0xFFFF none */
+ int32_t img, ispd; /* image_index and image_speed, 1/16 frame */
+ int16_t bx, by, bw, bh; /* its box (solid, talk, touch), units from (x, y) */
+ uint16_t event; /* EV_* when talked to or touched */
+ int16_t arg; /* the event's own */
+ uint8_t alpha;
+ int8_t depth_bias; /* drawn as if this many units lower */
+ uint16_t sprs[4]; /* when walking: its sprite each way (DIR_*), 0 none */
+ uint8_t dir;
+ int32_t tx, ty, wsp; /* walking to (tx, ty) at wsp a frame, 1/16 unit */
+ bool walking;
+ uint8_t name; /* an ACT_* (scripts find it by it) */
+ int16_t scale; /* drawn at this scale (1/256), 0: as its room's */
+} Obj;
+extern Obj objs[MAX_OBJS];
+
+typedef struct {
+ int32_t x, y; /* Kris's top-left (the sprite's), units */
+ uint8_t dir;
+ bool frozen; /* a cutscene has control */
+ bool hidden;
+ uint16_t spr; /* a sprite a cutscene shows instead (0 none) */
+ int img;
+ int walktimer; /* 1/2 */
+ int walkbuffer; /* 1/4 */
+ int runtimer;
+ bool run;
+ uint16_t steps;
+} Player;
+extern Player pl;
+
+extern int g_room;
+extern int cam_x, cam_y; /* the view's top-left, units */
+extern bool cam_locked; /* a cutscene moves the camera */
+extern uint8_t g_fade; /* 0 clear .. 255 black, over the room */
+extern int g_shake;
+
+const RoomInfo *world_room_info(void);
+bool world_dark(void); /* the room is the Dark World's (halved) */
+int world_scale(void); /* 2 in the Dark World, 1 in the Light */
+bool world_kris_low(void); /* Kris low on the screen: the box goes on top */
+void world_enter(int room, int x, int y, int dir); /* Kris's top-left at (x, y); no fade */
+void world_enter_marker(int room, int entrance); /* at the room's obj_marker for entrance (1 A, 2 B...) */
+void world_update(void);
+void world_draw(void);
+void world_draw_scene(void); /* the room and its things, without the box */
+bool world_place_free(int x, int y, int ignore); /* Kris's box with its top-left at (x, y): no solid */
+void world_camera(void);
+void world_fade_to(int room, int entrance);
+bool world_fading(void);
+bool world_marker(int obj, int *x, int *y); /* where the room's instance of obj is */
+bool world_inst(int obj, int k, Inst *out); /* the room's k-th instance of obj */
+
+/* things */
+Obj *obj_new(uint16_t spr, int x, int y); /* units */
+Obj *obj_find(int name);
+Obj *obj_get(int name); /* obj_find, or a spare one (events can't crash on it) */
+void obj_free(Obj *o);
+void obj_clear_all(void);
+void obj_set_box(Obj *o, int bx, int by, int bw, int bh);
+void obj_walk_to(Obj *o, int x, int y, int sp); /* units, sp units a frame */
+int obj_px(const Obj *o);
+int obj_py(const Obj *o);
+void obj_place(Obj *o, int x, int y);
+
+/* the party following Kris (obj_caterpillarchara) */
+void follow_reset(void); /* all at Kris */
+void follow_show(bool on);
+bool follow_shown(void);
+Obj *follower(int c); /* CH_SUSIE or CH_RALSEI's, NULL none */
+
+/* Kris walked by a cutscene */
+void pl_walk_to(int x, int y, int sp);
+bool pl_walking(void);
+void pl_face(int dir);
+#endif
diff --git a/games/deltarune/tests/play.c b/games/deltarune/tests/play.c
new file mode 100644
index 00000000..c399b546
--- /dev/null
+++ b/games/deltarune/tests/play.c
@@ -0,0 +1,143 @@
+/* Plays Deltarune on a computer, with scripted keys, and saves frames.
+ *
+ * play [--frames N] [--keys "10-40:right,50:z,..."] [--shots 30,60|all|every:N] [--out DIR] [--saves DIR]
+ * [--room NAME_NUMBER --at X,Y] [--plot P] [--party 1,2,3] [--flag F=V]... [--battle N] [--fuzz SEED]
+ * [--mash] [--trace]
+ *
+ * Keys: left right up down z x c home. "a-b:key" holds the key from frame a to b, "a:key" for one frame.
+ * --room starts a new game in room N (its number in data.h) with Kris's top-left at (X, Y), past the title.
+ * --battle starts encounter N (scr_encountersetup's) at once. --mash presses Z every 4 frames when no
+ * scripted key is held (through talks). --fuzz presses random keys (seeded) the whole time.
+ * Screenshots are DIR/shot_<frame>.ppm. At the end it prints the state: mode, room, Kris, plot, HP. */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include "../src/battle.h"
+#include "../src/blk.h"
+#include "../src/event.h"
+#include "../src/game.h"
+#include "../src/gfx.h"
+#include "../src/res.h"
+#include "../src/text.h"
+#include "../src/world.h"
+
+extern uint32_t host_keys, host_time;
+void host_shot(const char *path);
+void host_save_dir(const char *d);
+extern const uint8_t dr_data[];
+
+typedef struct { int a, b; uint32_t k; } Hold;
+static Hold holds[4096];
+static int nholds;
+
+static uint32_t key_of(const char *s) {
+ if (!strncmp(s, "left", 4)) return K_LEFT;
+ if (!strncmp(s, "right", 5)) return K_RIGHT;
+ if (!strncmp(s, "up", 2)) return K_UP;
+ if (!strncmp(s, "down", 4)) return K_DOWN;
+ if (!strncmp(s, "z", 1)) return K_Z;
+ if (!strncmp(s, "x", 1)) return K_X;
+ if (!strncmp(s, "c", 1)) return K_C;
+ if (!strncmp(s, "home", 4)) return K_HOME;
+ return 0;
+}
+
+static void parse_keys(const char *s) {
+ while (*s) {
+ int a = atoi(s), b = a;
+ while (*s >= '0' && *s <= '9') s++;
+ if (*s == '-') {
+ s++;
+ b = atoi(s);
+ while (*s >= '0' && *s <= '9') s++;
+ }
+ if (*s == ':') s++;
+ if (nholds < 4096) holds[nholds++] = (Hold){a, b, key_of(s)};
+ while (*s && *s != ',') s++;
+ if (*s == ',') s++;
+ }
+}
+
+int main(int argc, char **argv) {
+ int frames = 300, room = -1, ax = 0, ay = 0, plotv = -1, battle = -1, every = 0;
+ unsigned fuzz = 0;
+ bool all = false, mash = false, trace = false;
+ const char *out = "build/shots", *shots = "";
+ int party[3] = {0, 0, 0};
+ static int flags[64][2];
+ int nflags = 0;
+ for (int i = 1; i < argc; i++) {
+ const char *a = argv[i], *v = i + 1 < argc ? argv[i + 1] : "";
+ if (!strcmp(a, "--frames")) frames = atoi(v), i++;
+ else if (!strcmp(a, "--keys")) parse_keys(v), i++;
+ else if (!strcmp(a, "--shots")) {
+ shots = v, i++;
+ if (!strcmp(v, "all")) all = true;
+ if (!strncmp(v, "every:", 6)) every = atoi(v + 6);
+ } else if (!strcmp(a, "--out")) out = v, i++;
+ else if (!strcmp(a, "--saves")) host_save_dir(v), i++;
+ else if (!strcmp(a, "--room")) room = atoi(v), i++;
+ else if (!strcmp(a, "--at")) sscanf(v, "%d,%d", &ax, &ay), i++;
+ else if (!strcmp(a, "--plot")) plotv = atoi(v), i++;
+ else if (!strcmp(a, "--party")) sscanf(v, "%d,%d,%d", &party[0], &party[1], &party[2]), i++;
+ else if (!strcmp(a, "--flag") && nflags < 64) sscanf(v, "%d=%d", &flags[nflags][0], &flags[nflags][1]), nflags++, i++;
+ else if (!strcmp(a, "--battle")) battle = atoi(v), i++;
+ else if (!strcmp(a, "--fuzz")) fuzz = (unsigned)atoi(v), i++;
+ else if (!strcmp(a, "--mash")) mash = true;
+ else if (!strcmp(a, "--trace")) trace = true;
+ }
+ mkdir(out, 0755);
+ dr_bin = dr_data;
+ game_init();
+ if (room >= 0 || battle >= 0) {
+ memset(sv.name, 0, sizeof sv.name);
+ strcpy(sv.name, "TEST");
+ game_new();
+ if (plotv >= 0) sv.plot = (int16_t)plotv;
+ if (party[0]) for (int k = 0; k < 3; k++) sv.chr[k] = (uint8_t)party[k];
+ for (int k = 0; k < nflags; k++) set_flag(flags[k][0], flags[k][1]);
+ if (room >= 0) world_enter(room, ax, ay, DIR_DOWN);
+ if (battle >= 0) battle_start(battle);
+ }
+ uint32_t seed = fuzz * 2654435761u + 1;
+ for (int f = 0; f < frames && g_running; f++) {
+ uint32_t k = 0;
+ for (int h = 0; h < nholds; h++)
+ if (f >= holds[h].a && f <= holds[h].b) k |= holds[h].k;
+ if (fuzz) {
+ seed ^= seed << 13, seed ^= seed >> 17, seed ^= seed << 5;
+ static const uint32_t ks[] = {K_LEFT, K_RIGHT, K_UP, K_DOWN, K_Z, K_X, K_C, 0};
+ k = ks[seed % 8] | ((seed >> 8) % 3 == 0 ? ks[(seed >> 12) % 8] : 0);
+ } else if (mash && !k && f % 4 == 0) {
+ k = K_Z;
+ }
+ host_keys = k;
+ game_frame(k);
+ host_time += 33;
+ game_draw();
+ bool shoot = all || (every && f % every == 0);
+ if (!shoot && *shots) {
+ char key[16];
+ snprintf(key, sizeof key, "%d", f);
+ const char *p = shots;
+ while (*p) {
+ if (!strncmp(p, key, strlen(key)) && (p[strlen(key)] == ',' || !p[strlen(key)])) shoot = true;
+ while (*p && *p != ',') p++;
+ if (*p) p++;
+ }
+ }
+ if (shoot) {
+ char path[512];
+ snprintf(path, sizeof path, "%s/shot_%05d.ppm", out, f);
+ host_shot(path);
+ }
+ if (trace && f % 30 == 0)
+ printf("frame %d mode %d room %d kris %d,%d plot %d text %d event %d\n", f, g_mode, g_room, (int)pl.x, (int)pl.y,
+ sv.plot, text_active(), event_running());
+ }
+ printf("STATE mode %d room %d kris %d,%d dir %d plot %d hp %d,%d,%d gold %ld party %d,%d,%d dropped %d blocks %u\n",
+ g_mode, g_room, (int)pl.x, (int)pl.y, pl.dir, sv.plot, sv.hp[1], sv.hp[2], sv.hp[3], (long)sv.gold,
+ sv.chr[0], sv.chr[1], sv.chr[2], gfx_dropped, (unsigned)blk_most_in_frame);
+ return 0;
+}
diff --git a/games/deltarune/tools/gm.py b/games/deltarune/tools/gm.py
new file mode 100644
index 00000000..da753cd7
--- /dev/null
+++ b/games/deltarune/tools/gm.py
@@ -0,0 +1,684 @@
+"""A reader for GameMaker Studio 1.4 data files (data.win, bytecode 16), as Deltarune's Chapter 1 (2018) has.
+
+ python3 -I tools/gm.py DATA.WIN rooms the rooms (name, size)
+ python3 -I tools/gm.py DATA.WIN room NAME a room's views, backgrounds, objects and tiles
+ python3 -I tools/gm.py DATA.WIN objects the objects (sprite, parent, events)
+ python3 -I tools/gm.py DATA.WIN code NAME a code entry, decompiled to plain statements
+ python3 -I tools/gm.py DATA.WIN grep TEXT the code entries that use TEXT (a name or string)
+ python3 -I tools/gm.py DATA.WIN sprites the sprites (size, origin, frames)
+ python3 -I tools/gm.py DATA.WIN fonts the fonts
+
+Read only: nothing in the file is run. The decompiler turns the stack code back into expressions and
+statements; jumps stay as labelled gotos (if (!x) goto L12), which is enough to read the game's rules."""
+import io
+import struct
+import sys
+
+from PIL import Image
+
+
+class GM:
+ def __init__(self, path):
+ self.d = open(path, "rb").read()
+ self.chunks = {}
+ p = 8
+ while p < len(self.d):
+ name = self.d[p:p + 4].decode()
+ size = self.u32(p + 4)
+ self.chunks[name] = (p + 8, size)
+ p += 8 + size
+ self._strings = None
+ self._sprites = None
+ self._backgrounds = None
+ self._objects = None
+ self._rooms = None
+ self._code = None
+ self._textures = {}
+ self._fonts = None
+ self._vars = None
+ self._funcs = None
+
+ # ---- primitives
+ def u32(self, p):
+ return struct.unpack_from("<I", self.d, p)[0]
+
+ def i32(self, p):
+ return struct.unpack_from("<i", self.d, p)[0]
+
+ def f32(self, p):
+ return struct.unpack_from("<f", self.d, p)[0]
+
+ def u16(self, p):
+ return struct.unpack_from("<H", self.d, p)[0]
+
+ def s(self, p):
+ """a string pointer (it points at the text, after its length)"""
+ if p == 0:
+ return None
+ n = self.u32(p - 4)
+ return self.d[p:p + n].decode("utf-8", "replace")
+
+ def plist(self, p):
+ n = self.u32(p)
+ return [self.u32(p + 4 + 4 * i) for i in range(n)]
+
+ def chunk_list(self, name):
+ return self.plist(self.chunks[name][0])
+
+ # ---- strings
+ @property
+ def strings(self):
+ if self._strings is None:
+ self._strings = [self.s(q + 4) for q in self.chunk_list("STRG")]
+ return self._strings
+
+ # ---- textures and texture pages
+ def texture(self, i):
+ if i not in self._textures:
+ q = self.chunk_list("TXTR")[i]
+ p = self.u32(q + 8) # (scaled, generated mipmaps, then the PNG)
+ # the PNG: up to its IEND
+ end = self.d.index(b"IEND", p) + 8
+ self._textures[i] = Image.open(io.BytesIO(self.d[p:end])).convert("RGBA")
+ return self._textures[i]
+
+ def tpag(self, p):
+ v = struct.unpack_from("<11H", self.d, p)
+ return dict(sx=v[0], sy=v[1], sw=v[2], sh=v[3], tx=v[4], ty=v[5], tw=v[6], th=v[7], bw=v[8], bh=v[9], page=v[10])
+
+ def tpag_image(self, p):
+ """the texture page item as the full bounding image (RGBA)"""
+ t = self.tpag(p)
+ im = Image.new("RGBA", (t["bw"], t["bh"]), (0, 0, 0, 0))
+ src = self.texture(t["page"]).crop((t["sx"], t["sy"], t["sx"] + t["sw"], t["sy"] + t["sh"]))
+ if (t["sw"], t["sh"]) != (t["tw"], t["th"]):
+ src = src.resize((t["tw"], t["th"]), Image.NEAREST)
+ im.paste(src, (t["tx"], t["ty"]))
+ return im
+
+ # ---- sprites
+ @property
+ def sprites(self):
+ if self._sprites is None:
+ out = []
+ for p in self.chunk_list("SPRT"):
+ v = struct.unpack_from("<i6i3i2I2i", self.d, p)
+ name = self.s(v[0])
+ q = p + 4 * 14
+ if self.i32(q) == -1: # GameMaker Studio 2: a version, a type, the playback speed and its kind
+ q += 4 * 5
+ n = self.u32(q)
+ frames = [self.u32(q + 4 + 4 * i) for i in range(n)]
+ out.append(dict(name=name, w=v[1], h=v[2], ml=v[3], mr=v[4], mb=v[5], mt=v[6],
+ bbox_mode=v[10], ox=v[12], oy=v[13], frames=frames, ptr=p))
+ self._sprites = out
+ return self._sprites
+
+ def sprite(self, name):
+ for s in self.sprites:
+ if s["name"] == name:
+ return s
+ raise KeyError(name)
+
+ def sprite_index(self, name):
+ for i, s in enumerate(self.sprites):
+ if s["name"] == name:
+ return i
+ raise KeyError(name)
+
+ def sprite_frames(self, name):
+ s = self.sprite(name) if isinstance(name, str) else self.sprites[name]
+ out = []
+ for f in s["frames"]:
+ t = self.tpag(f)
+ im = Image.new("RGBA", (s["w"], s["h"]), (0, 0, 0, 0))
+ src = self.texture(t["page"]).crop((t["sx"], t["sy"], t["sx"] + t["sw"], t["sy"] + t["sh"]))
+ if (t["sw"], t["sh"]) != (t["tw"], t["th"]):
+ src = src.resize((t["tw"], t["th"]), Image.NEAREST)
+ im.paste(src, (t["tx"], t["ty"]))
+ out.append(im)
+ return out
+
+ # ---- backgrounds (tilesets too)
+ @property
+ def backgrounds(self):
+ if self._backgrounds is None:
+ out = []
+ for p in self.chunk_list("BGND"):
+ # GameMaker Studio 2's tilesets: the tiles' size, their borders, columns and count
+ tw, th, bx, by, cols, _, count = struct.unpack_from("<7I", self.d, p + 24)
+ out.append(dict(name=self.s(self.u32(p)), tpag=self.u32(p + 16), tw=tw, th=th, bx=bx, by=by,
+ cols=cols, count=count))
+ self._backgrounds = out
+ return self._backgrounds
+
+ def background_image(self, i):
+ return self.tpag_image(self.backgrounds[i]["tpag"])
+
+ # ---- fonts
+ @property
+ def fonts(self):
+ if self._fonts is None:
+ out = []
+ for p in self.chunk_list("FONT"):
+ name, disp, em, bold, italic = self.s(self.u32(p)), self.s(self.u32(p + 4)), self.u32(p + 8), self.u32(p + 12), self.u32(p + 16)
+ rs = self.u16(p + 20)
+ re_ = self.u32(p + 24)
+ tp = self.u32(p + 28)
+ sx, sy = self.f32(p + 32), self.f32(p + 36)
+ glyphs = []
+ for g in self.plist(p + 40):
+ c, x, y, w, h = struct.unpack_from("<5H", self.d, g)
+ shift, off = struct.unpack_from("<hh", self.d, g + 10)
+ glyphs.append(dict(c=c, x=x, y=y, w=w, h=h, shift=shift, offset=off))
+ out.append(dict(name=name, display=disp, size=em, bold=bold, italic=italic, first=rs, last=re_,
+ tpag=tp, sx=sx, sy=sy, glyphs=glyphs))
+ self._fonts = out
+ return self._fonts
+
+ def font(self, name):
+ for f in self.fonts:
+ if f["name"] == name:
+ return f
+ raise KeyError(name)
+
+ # ---- objects
+ @property
+ def objects(self):
+ if self._objects is None:
+ out = []
+ for p in self.chunk_list("OBJT"):
+ name = self.s(self.u32(p))
+ spr, vis, solid, depth, pers, parent, mask = struct.unpack_from("<i2Ii2i", self.d, p + 4)[0:0] or (
+ self.i32(p + 4), self.u32(p + 8), self.u32(p + 12), self.i32(p + 16), self.u32(p + 20),
+ self.i32(p + 24), self.i32(p + 28))
+ # physics: uses, sensor, shape, density, restitution, group, lin damp, ang damp, vertex count,
+ # friction, awake, kinematic, then the vertices
+ q = p + 32
+ nvert = self.i32(q + 32)
+ q += 48 + 8 * nvert
+ events = []
+ for etype, ep in enumerate(self.plist(q)):
+ for e in self.plist(ep):
+ sub = self.u32(e)
+ codes = []
+ for a in self.plist(e + 4):
+ codes.append(self.i32(a + 32))
+ events.append((etype, sub, codes))
+ out.append(dict(name=name, sprite=spr, visible=vis, solid=solid, depth=depth, persistent=pers,
+ parent=parent, mask=mask, events=events))
+ self._objects = out
+ return self._objects
+
+ def object_index(self, name):
+ for i, o in enumerate(self.objects):
+ if o["name"] == name:
+ return i
+ raise KeyError(name)
+
+ # ---- rooms
+ @property
+ def rooms(self):
+ if self._rooms is None:
+ self._rooms = [self._room(p) for p in self.chunk_list("ROOM")]
+ return self._rooms
+
+ def _room(self, p):
+ r = dict(name=self.s(self.u32(p)), caption=self.s(self.u32(p + 4)), w=self.u32(p + 8), h=self.u32(p + 12),
+ speed=self.u32(p + 16), persistent=self.u32(p + 20), bgcolor=self.u32(p + 24),
+ draw_bgcolor=self.u32(p + 28), code=self.i32(p + 32), flags=self.u32(p + 36))
+ bgs, views, objs, tiles = (self.u32(p + 40 + 4 * i) for i in range(4))
+ r["backgrounds"] = []
+ for b in self.plist(bgs):
+ v = struct.unpack_from("<2I7iI", self.d, b)
+ r["backgrounds"].append(dict(enabled=v[0], foreground=v[1], bg=v[2], x=v[3], y=v[4], tilex=v[5],
+ tiley=v[6], speedx=v[7], speedy=v[8], stretch=v[9]))
+ r["views"] = []
+ for b in self.plist(views):
+ v = struct.unpack_from("<I12i", self.d, b)
+ r["views"].append(dict(enabled=v[0], x=v[1], y=v[2], w=v[3], h=v[4], px=v[5], py=v[6], pw=v[7],
+ ph=v[8], bx=v[9], by=v[10], sx=v[11], sy=v[12], obj=self.i32(b + 52)))
+ r["objects"] = []
+ for b in self.plist(objs):
+ x, y, o, inst, code = struct.unpack_from("<3iIi", self.d, b)
+ sx, sy = self.f32(b + 20), self.f32(b + 24)
+ col = self.u32(b + 28)
+ rot = self.f32(b + 32)
+ pre = self.i32(b + 36)
+ r["objects"].append(dict(x=x, y=y, obj=o, id=inst, code=code, sx=sx, sy=sy, color=col, rot=rot, pre=pre))
+ r["tiles"] = []
+ for b in self.plist(tiles):
+ x, y, bg, sx, sy, w, h, depth, inst = struct.unpack_from("<8iI", self.d, b)
+ scx, scy = self.f32(b + 36), self.f32(b + 40)
+ col = self.u32(b + 44)
+ r["tiles"].append(dict(x=x, y=y, bg=bg, sx=sx, sy=sy, w=w, h=h, depth=depth, id=inst, scx=scx, scy=scy,
+ color=col))
+ # GameMaker Studio 2's layers: backgrounds, instances, assets (sprites) and tile grids
+ r["layers"] = []
+ lp = self.u32(p + 4 * 22)
+ for b in self.plist(lp) if lp else []:
+ name = self.s(self.u32(b))
+ lid, ltype, depth = self.u32(b + 4), self.u32(b + 8), self.i32(b + 12)
+ xo, yo, hs, vs = struct.unpack_from("<4f", self.d, b + 16)
+ vis = self.u32(b + 32)
+ L = dict(name=name, id=lid, type=ltype, depth=depth, xo=xo, yo=yo, hs=hs, vs=vs, visible=vis)
+ q = b + 36
+ if ltype == 1:
+ v = struct.unpack_from("<2Ii3II", self.d, q)
+ L.update(bg_visible=v[0], foreground=v[1], sprite=v[2], tiledh=v[3], tiledv=v[4], stretch=v[5],
+ color=v[6], frame=self.f32(q + 28), anim=self.f32(q + 32))
+ elif ltype == 2:
+ n = self.u32(q)
+ L["instances"] = [self.u32(q + 4 + 4 * i) for i in range(n)]
+ elif ltype == 3:
+ legacy, sprs = self.u32(q), self.u32(q + 4)
+ L["sprites"] = []
+ for sp in self.plist(sprs):
+ sid, x, y = self.i32(sp + 4), self.i32(sp + 8), self.i32(sp + 12)
+ scx, scy = self.f32(sp + 16), self.f32(sp + 20)
+ col = self.u32(sp + 24)
+ fi, rot = self.f32(sp + 36), self.f32(sp + 40)
+ L["sprites"].append(dict(sprite=sid, x=x, y=y, sx=scx, sy=scy, color=col, frame=fi, rot=rot))
+ # the legacy tiles (rooms made in GameMaker 1.4): a piece of a sprite each (not a background)
+ L["tiles"] = []
+ for t in self.plist(legacy):
+ x, y, spr, sx, sy, w, h, depth, inst = struct.unpack_from("<8iI", self.d, t)
+ scx, scy = self.f32(t + 36), self.f32(t + 40)
+ col = self.u32(t + 44)
+ L["tiles"].append(dict(x=x, y=y, spr=spr, sx=sx, sy=sy, w=w, h=h, depth=depth, scx=scx, scy=scy,
+ color=col))
+ elif ltype == 4:
+ bg, cols, rows = self.i32(q), self.u32(q + 4), self.u32(q + 8)
+ L.update(bg=bg, cols=cols, rows=rows,
+ data=list(struct.unpack_from("<%dI" % (cols * rows), self.d, q + 12)))
+ r["layers"].append(L)
+ return r
+
+ def room(self, name):
+ for r in self.rooms:
+ if r["name"] == name:
+ return r
+ raise KeyError(name)
+
+ # ---- code
+ @property
+ def code(self):
+ if self._code is None:
+ out = []
+ for p in self.chunk_list("CODE"):
+ name = self.s(self.u32(p))
+ length = self.u32(p + 4)
+ nloc, nargs = self.u16(p + 8), self.u16(p + 10)
+ rel = self.i32(p + 12)
+ start = p + 12 + rel
+ off = self.u32(p + 16)
+ out.append(dict(name=name, start=start, length=length, offset=off, nargs=nargs & 0x7FFF))
+ self._code = out
+ return self._code
+
+ def code_named(self, name):
+ for c in self.code:
+ if c["name"] == name:
+ return c
+ raise KeyError(name)
+
+ def _refs(self):
+ """for each variable or function reference in the code: its name (by the instruction's address)"""
+ if self._vars is not None:
+ return
+ self._vars, self._funcs = {}, {}
+ p, size = self.chunks["VARI"]
+ q = p + 12
+ while q + 20 <= p + size:
+ nm, itype, vid, occ, first = struct.unpack_from("<IiiIi", self.d, q)
+ name = self.s(nm)
+ a = first
+ for _ in range(occ):
+ self._vars[a] = (name, itype)
+ nxt = self.u32(a + 4) & 0x07FFFFFF
+ a += nxt
+ q += 20
+ p, size = self.chunks["FUNC"]
+ n = self.u32(p)
+ for i in range(n):
+ nm, occ, first = struct.unpack_from("<IIi", self.d, p + 4 + 12 * i)
+ name = self.s(nm)
+ a = first
+ for _ in range(occ):
+ self._funcs[a] = name
+ nxt = self.u32(a + 4) & 0x07FFFFFF
+ a += nxt
+
+ def disasm(self, entry):
+ """the instructions of a code entry: (address in bytes from its start, opcode, fields)"""
+ self._refs()
+ if isinstance(entry, str):
+ entry = self.code_named(entry)
+ base = entry["start"]
+ p, end = base + entry["offset"], base + entry["length"]
+ out = []
+ p = base
+ while p < end:
+ w = self.u32(p)
+ op = w >> 24
+ a = p - base
+ t1, t2 = (w >> 16) & 0xF, (w >> 20) & 0xF
+ ins = dict(a=a, op=op, t1=t1, t2=t2, raw=w)
+ size = 4
+ if op in (0xB6, 0xB7, 0xB8, 0xBA, 0xBB):
+ off = w & 0x7FFFFF
+ if off & 0x400000:
+ off -= 0x800000
+ ins["target"] = a + off * 4
+ elif op == 0x45: # pop
+ ins["inst"] = struct.unpack("<h", struct.pack("<H", w & 0xFFFF))[0]
+ ins["var"] = self._vars.get(p, ("?", 0))[0]
+ ins["vtype"] = self.u32(p + 4) >> 24 & 0xF8
+ size = 8
+ elif op in (0xC0, 0xC1, 0xC2, 0xC3, 0x84):
+ if t1 == 0:
+ ins["v"] = struct.unpack_from("<d", self.d, p + 4)[0]; size = 12
+ elif t1 == 1:
+ ins["v"] = self.f32(p + 4); size = 8
+ elif t1 == 2:
+ ins["v"] = self.i32(p + 4); size = 8
+ elif t1 == 3:
+ ins["v"] = struct.unpack_from("<q", self.d, p + 4)[0]; size = 12
+ elif t1 == 4:
+ ins["v"] = self.u32(p + 4) != 0; size = 8
+ elif t1 == 5:
+ ins["inst"] = struct.unpack("<h", struct.pack("<H", w & 0xFFFF))[0]
+ ins["var"] = self._vars.get(p, ("?", 0))[0]
+ ins["vtype"] = self.u32(p + 4) >> 24 & 0xF8
+ size = 8
+ elif t1 == 6:
+ ins["v"] = self.strings[self.u32(p + 4)]; ins["str"] = True; size = 8
+ elif t1 == 0xF:
+ ins["v"] = struct.unpack("<h", struct.pack("<H", w & 0xFFFF))[0]
+ elif op == 0xD9: # call
+ ins["argc"] = w & 0xFFFF
+ ins["func"] = self._funcs.get(p, "?")
+ size = 8
+ elif op == 0x15:
+ ins["cmp"] = (w >> 8) & 0xFF
+ elif op == 0x86:
+ ins["dup"] = w & 0xFF
+ elif op == 0xFF:
+ ins["brk"] = w & 0xFFFF
+ if t1 == 2:
+ size = 8
+ out.append(ins)
+ p += size
+ return out
+
+ def decompile(self, entry):
+ return Decompiler(self).run(self.disasm(entry))
+
+ def objname(self, i):
+ if 0 <= i < len(self.objects):
+ return self.objects[i]["name"]
+ return str(i)
+
+
+INST = {-1: "self", -2: "other", -3: "all", -4: "noone", -5: "global", -6: "builtin", -7: "local", -9: "stacktop"}
+BIN = {0x08: "*", 0x09: "/", 0x0A: "div", 0x0B: "%", 0x0C: "+", 0x0D: "-", 0x0E: "&", 0x0F: "|", 0x10: "^",
+ 0x13: "<<", 0x14: ">>"}
+CMP = {1: "<", 2: "<=", 3: "==", 4: "!=", 5: ">=", 6: ">"}
+
+
+class Duped(str):
+ """a stack value a dup copied (a compound assignment's instance or index)"""
+ duped = True
+
+
+class Decompiler:
+ """stack code to statements: expressions rebuilt, jumps kept as gotos"""
+ def __init__(self, gm):
+ self.gm = gm
+
+ def fmt(self, v):
+ if isinstance(v, str):
+ return v
+ return repr(v)
+
+ def varname(self, ins, stack):
+ inst = ins["inst"]
+ name = ins["var"]
+ # the reference's kind: 0x00 an array (instance and index on the stack), 0x80 the instance on the
+ # stack, 0xA0 plain, 0xE0 an instance's
+ if ins["vtype"] == 0x00:
+ idx = stack.pop() if stack else "?"
+ who = stack.pop() if stack else "?"
+ w = self.who(who)
+ return "%s[%s]" % (name if w == "self" else "%s.%s" % (w, name), idx)
+ if ins["vtype"] == 0x80:
+ who = stack.pop() if stack else "?"
+ w = self.who(who)
+ return name if w == "self" else "%s.%s" % (w, name)
+ if inst == -1 or inst == -7 or inst == -6:
+ return name
+ return "%s.%s" % (INST.get(inst, self.gm.objname(inst)), name)
+
+ def who(self, w):
+ try:
+ i = int(float(w))
+ if i in INST:
+ return INST[i]
+ return self.gm.objname(i)
+ except (ValueError, TypeError):
+ return "(%s)" % w
+
+ def run(self, prog):
+ out = []
+ stack = []
+ at = {ins["a"]: k for k, ins in enumerate(prog)}
+ # the short-circuit && and ||: X bf La; Y; b Lb; La: push 0; Lb: -> (X && Y) (bt and push 1: ||)
+ logic = {}
+ skip_to = {}
+ for k, ins in enumerate(prog):
+ if ins["op"] in (0xB7, 0xB8):
+ la = ins["target"]
+ j = at.get(la)
+ if j is None or j == 0:
+ continue
+ b, p = prog[j - 1], prog[j]
+ want = 0 if ins["op"] == 0xB8 else 1
+ if b["op"] == 0xB6 and b["target"] == la + 4 and p["op"] in (0x84, 0xC0) and p.get("v") == want and j - 1 > k:
+ logic[k] = (j - 1, "&&" if want == 0 else "||")
+ skip_to[j - 1] = la + 4
+ used = set()
+ for k, ins in enumerate(prog):
+ if "target" in ins and k not in logic and k not in skip_to:
+ used.add(ins["target"])
+ targets = used
+ pend = {}
+ k = 0
+ while k < len(prog):
+ ins = prog[k]
+ a = ins["a"]
+ if k in logic:
+ x = stack.pop() if stack else "?"
+ pend[logic[k][0]] = (x, logic[k][1])
+ k += 1
+ continue
+ if k in pend:
+ x, op_ = pend.pop(k)
+ y = stack.pop() if stack else "?"
+ stack.append("(%s %s %s)" % (x, op_, y))
+ k = at[skip_to[k]]
+ continue
+ k += 1
+ if a in targets:
+ if stack:
+ out.append(" // stack: %s" % ", ".join(stack))
+ out.append("L%d:" % a)
+ op = ins["op"]
+ if op in BIN:
+ b = stack.pop() if stack else "?"
+ x = stack.pop() if stack else "?"
+ stack.append("(%s %s %s)" % (x, BIN[op], b))
+ elif op == 0x15:
+ b = stack.pop() if stack else "?"
+ x = stack.pop() if stack else "?"
+ stack.append("(%s %s %s)" % (x, CMP.get(ins["cmp"], "?"), b))
+ elif op == 0x11:
+ stack.append("-" + (stack.pop() if stack else "?"))
+ elif op == 0x12:
+ stack.append("!" + (stack.pop() if stack else "?"))
+ elif op == 0x07:
+ pass
+ elif op == 0x86:
+ n = ins["dup"] + 1
+ if ins["t1"] in (0, 3): # 8-byte values: two stack words each
+ n = (ins["dup"] + 1)
+ if len(stack) >= n:
+ for j in range(len(stack) - n, len(stack)):
+ stack[j] = Duped(stack[j])
+ stack.extend(str(s) for s in stack[-n:])
+ else:
+ stack.extend(["?"] * n)
+ elif op in (0xC0, 0xC1, 0xC2, 0xC3, 0x84):
+ if ins["t1"] == 5:
+ stack.append(self.varname(ins, stack))
+ elif ins.get("str"):
+ stack.append('"%s"' % ins["v"].replace("\n", "\\n"))
+ else:
+ v = ins["v"]
+ if isinstance(v, float) and v == int(v):
+ v = int(v)
+ stack.append(str(v))
+ elif op == 0x45:
+ if ins["vtype"] in (0x00, 0x80):
+ # a variable's value (pop.v.v) is pushed after the instance and the index; another (pop.v.i)
+ # before them
+ if len(stack) >= 2 and getattr(stack[-2], "duped", False):
+ # (a compound assignment, a[i] += v: the instance and index, duplicated, came first)
+ val = stack.pop() if stack else "?"
+ name = self.varname(ins, stack)
+ else:
+ name = self.varname(ins, stack)
+ val = stack.pop() if stack else "?"
+ out.append("%s = %s" % (name, val))
+ else:
+ val = stack.pop() if stack else "?"
+ inst = ins["inst"]
+ nm = ins["var"] if inst in (-1, -7, -6) else "%s.%s" % (INST.get(inst, self.gm.objname(inst)), ins["var"])
+ out.append("%s = %s" % (nm, val))
+ elif op == 0xD9:
+ n = ins["argc"]
+ args = [stack.pop() if stack else "?" for _ in range(n)]
+ stack.append("%s(%s)" % (ins["func"], ", ".join(args)))
+ elif op == 0x9E: # popz
+ if stack:
+ out.append(stack.pop())
+ elif op == 0xB6:
+ out.append("goto L%d" % ins["target"])
+ elif op == 0xB7:
+ out.append("if %s goto L%d" % (stack.pop() if stack else "?", ins["target"]))
+ elif op == 0xB8:
+ out.append("if !%s goto L%d" % (stack.pop() if stack else "?", ins["target"]))
+ elif op == 0xBA:
+ out.append("with (%s) { // to L%d" % (self.who(stack.pop() if stack else "?"), ins["target"]))
+ elif op == 0xBB:
+ out.append("} // end with")
+ elif op == 0x9C:
+ out.append("return %s" % (stack.pop() if stack else ""))
+ elif op == 0x9D:
+ out.append("exit")
+ elif op == 0xFF:
+ pass
+ else:
+ out.append("// op %02x" % op)
+ if stack:
+ out.append("// stack: %s" % ", ".join(stack))
+ return "\n".join(out)
+
+
+EVENTS = ["Create", "Destroy", "Alarm", "Step", "Collision", "Keyboard", "Mouse", "Other", "Draw", "KeyPress",
+ "KeyRelease", "Trigger", "CleanUp", "Gesture", "PreCreate"]
+
+
+def main():
+ if len(sys.argv) < 3:
+ sys.exit(__doc__)
+ gm = GM(sys.argv[1])
+ cmd = sys.argv[2]
+ arg = sys.argv[3] if len(sys.argv) > 3 else None
+ if cmd == "rooms":
+ for i, r in enumerate(gm.rooms):
+ print(i, r["name"], r["w"], r["h"], len(r["objects"]), len(r["tiles"]))
+ elif cmd == "room":
+ r = gm.room(arg)
+ print(r["name"], r["w"], r["h"], "code", r["code"], "bgcolor %06x" % r["bgcolor"])
+ for v in r["views"]:
+ if v["enabled"]:
+ print("view", v)
+ for b in r["backgrounds"]:
+ if b["enabled"]:
+ print("bg", gm.backgrounds[b["bg"]]["name"] if b["bg"] >= 0 else None, b)
+ for o in r["objects"]:
+ print("obj", gm.objname(o["obj"]), o["x"], o["y"], o["sx"], o["sy"], "code", o["code"],
+ gm.code[o["code"]]["name"] if o["code"] >= 0 else "")
+ for L in r["layers"]:
+ extra = ""
+ if L["type"] == 4:
+ extra = "%s %dx%d" % (gm.backgrounds[L["bg"]]["name"] if L["bg"] >= 0 else None, L["cols"], L["rows"])
+ elif L["type"] == 1:
+ extra = "sprite %s color %08x %s" % (gm.sprites[L["sprite"]]["name"] if L["sprite"] >= 0 else None,
+ L["color"], "visible" if L["bg_visible"] else "hidden")
+ elif L["type"] == 3:
+ extra = "%d sprites: %s; %d tiles: %s" % (
+ len(L["sprites"]), " ".join(sorted({gm.sprites[a["sprite"]]["name"] for a in L["sprites"]})),
+ len(L["tiles"]), " ".join(sorted({gm.sprites[a["spr"]]["name"] for a in L["tiles"]})))
+ elif L["type"] == 2:
+ extra = "%d instances" % len(L["instances"])
+ print("layer", L["name"], "type", L["type"], "depth", L["depth"], "visible", L["visible"], extra)
+ tl = {}
+ for t in r["tiles"]:
+ tl.setdefault((gm.backgrounds[t["bg"]]["name"], t["depth"]), 0)
+ tl[(gm.backgrounds[t["bg"]]["name"], t["depth"])] += 1
+ for k, v in tl.items():
+ print("tiles", k, v)
+ elif cmd == "objects":
+ for i, o in enumerate(gm.objects):
+ print(i, o["name"], gm.sprites[o["sprite"]]["name"] if o["sprite"] >= 0 else "-", "parent",
+ gm.objname(o["parent"]) if o["parent"] >= 0 else "-", "depth", o["depth"],
+ " ".join("%s%d" % (EVENTS[e], s) for e, s, _ in o["events"]))
+ elif cmd == "code":
+ if arg.isdigit():
+ print(gm.decompile(gm.code[int(arg)]))
+ else:
+ print(gm.decompile(arg))
+ elif cmd == "codes":
+ for i, c in enumerate(gm.code):
+ print(i, c["name"], c["length"])
+ elif cmd == "grep":
+ for c in gm.code:
+ if c["length"] == 0:
+ continue
+ txt = gm.decompile(c)
+ if arg in txt:
+ print("==", c["name"])
+ for line in txt.split("\n"):
+ if arg in line:
+ print(" ", line[:200])
+ elif cmd == "sprites":
+ for i, s in enumerate(gm.sprites):
+ print(i, s["name"], s["w"], s["h"], s["ox"], s["oy"], len(s["frames"]))
+ elif cmd == "backgrounds":
+ for i, b in enumerate(gm.backgrounds):
+ t = gm.tpag(b["tpag"])
+ print(i, b["name"], t["bw"], t["bh"])
+ elif cmd == "fonts":
+ for f in gm.fonts:
+ print(f["name"], f["display"], f["size"], f["first"], f["last"], len(f["glyphs"]), f["sx"], f["sy"])
+ elif cmd == "strings":
+ for i, s in enumerate(gm.strings):
+ if arg is None or arg in s:
+ print(i, repr(s))
+ else:
+ sys.exit(__doc__)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/games/deltarune/tools/pack.py b/games/deltarune/tools/pack.py
new file mode 100644
index 00000000..b804c594
--- /dev/null
+++ b/games/deltarune/tools/pack.py
@@ -0,0 +1,515 @@
+#!/usr/bin/env python3
+"""Deltarune Chapter 1's pictures, rooms, fonts and texts -> src/data.bin + src/data.h.
+
+ python3 -I tools/pack.py REF (REF: the folder with data.win and lang_en.json, from tools/fetch.py)
+
+What goes in is what the game's C code names: every identifier in src/*.c that is the name of one of the
+original's sprites (spr_krisd), rooms (room_krisroom), objects (obj_doorA) or texts (obj_krisroom_slash_Step_0_gml_92_0)
+is packed, and data.h gives it its number under that same name.
+
+data.bin: "DRD1", the number of sections, their offsets, then the sections (SEC_* in data.h):
+- SPRITES: for each sprite its first frame and its number of frames (u16, u16)
+- FRAMES: each frame: w, h, origin x, y (u16, u16, s16, s16), bpp, colours (u8, u8), the colours (RGB565), each
+ row's offset (u16) from the rows' data, then the rows: runs of (skip, length, length pixels of bpp bits, lowest
+ first, the run padded to a byte), until the row's width
+- TILES: 20 x 20 pixel tiles of the rooms, as the screen shows them: bpp (0: one colour; +0x80: colour 0 is
+ see-through), colours, the colours (RGB565), 400 pixels of bpp bits
+- ROOMS: 32 bytes each (res.c room_info): its size in the original's units, its tile grid (and a foreground
+ grid drawn over the characters), its solids and its instances, its flags (1: the Dark World, drawn at half size)
+- GRID: the rooms' tile ids (u16, 0xFFFF none)
+- SOLIDS: 10 bytes each: the shape (0 a box; 1-4 a right triangle, its square corner bottom-left, bottom-right,
+ top-left, top-right; 5 an ellipse) and its box (s16 x0, y0, x1, y1, the original's units, x1 and y1 past it)
+- INSTS: 12 bytes each: the object (OBJ number in data.h), x, y (s16), its scale x and y (s16, 1/100), the
+ instance's place among the room's instances (u16)
+- FONTS: height, first character, count, flags, then 8 bytes a glyph (advance, w, h, ox, oy, 0, bitmap
+ offset u16) and the bitmaps (rows of whole bytes, highest bit first)
+- STRINGS: the texts (u32 count, u32 offsets, then each text, ending in 0)
+- BLOCKS: the frames and tiles themselves, in LZMA streams the game unpacks when it needs them (blk.c)
+- ORDER: each room's place in the original's order (u16: its doors go to the next or previous rooms)"""
+import json
+import lzma
+import os
+import re
+import struct
+import sys
+
+import numpy as np
+from PIL import Image
+
+HERE = os.path.dirname(os.path.abspath(__file__))
+sys.path.insert(0, HERE)
+import gm as GM # noqa: E402
+
+SRC = os.path.join(HERE, "..", "src")
+OUT_BIN = os.path.join(SRC, "data.bin")
+OUT_H = os.path.join(SRC, "data.h")
+SECTIONS = ["SPRITES", "FRAMES", "TILES", "ROOMS", "GRID", "SOLIDS", "INSTS", "FONTS", "STRINGS", "BLOCKS", "ORDER"]
+BLOCK_TILES, BLOCK_FRAMES = 2048, 16384
+MAX_BLOCKS = 4096
+LZMA_FILTERS = [{"id": lzma.FILTER_LZMA1, "dict_size": 1 << 16, "lc": 0, "lp": 0, "pb": 0}]
+# the fonts the game draws with: the original's own, from its texture pages
+FONTS = ["fnt_main", "fnt_small", "fnt_tinynoelle", "fnt_dotumche"]
+# solids: the objects (and their children) Kris can't walk through, and their shapes
+SOLID_SHAPES = {"obj_sdl": 1, "obj_sdl_dark": 1, "obj_sdr": 2, "obj_sul": 3, "obj_sur": 4, "obj_sur_dark": 4,
+ "obj_solidcircle": 5}
+# characters' depth (scr_depth: 100000 - 10 (y + height)): tiles nearer than this are drawn over them
+FRONT_DEPTH = 50000
+
+
+class Blocks:
+ def __init__(self):
+ self.raw = []
+
+ def place(self, entries, groups):
+ where = [None] * len(entries)
+ for g in groups:
+ data = bytearray()
+ for i in g:
+ where[i] = (len(self.raw), len(data))
+ data += entries[i]
+ assert len(data) < 65536
+ self.raw.append(bytes(data))
+ return struct.pack("<I", len(entries)) + b"".join(struct.pack("<HH", b, o) for b, o in where)
+
+ def section(self):
+ assert len(self.raw) <= MAX_BLOCKS
+ streams = [lzma.compress(r, format=lzma.FORMAT_RAW, filters=LZMA_FILTERS) for r in self.raw]
+ props = bytes([0]) + struct.pack("<I", 1 << 16) + bytes(3)
+ head = struct.pack("<I", len(streams)) + props
+ base = len(head) + 8 * len(streams)
+ table, body = bytearray(), bytearray()
+ for r, c in zip(self.raw, streams):
+ table += struct.pack("<II", base + len(body), len(r))
+ body += c
+ return head + bytes(table) + bytes(body)
+
+
+def groups_by_size(sizes, limit, starts=()):
+ out, cur, n = [], [], 0
+ starts = set(starts)
+ for i, sz in enumerate(sizes):
+ if cur and (n + sz > limit or i in starts):
+ out.append(cur)
+ cur, n = [], 0
+ cur.append(i)
+ n += sz
+ if cur:
+ out.append(cur)
+ return out
+
+
+def rgb565(r, g, b):
+ r, g, b = int(r), int(g), int(b)
+ return ((r * 31 + 127) // 255) << 11 | ((g * 63 + 127) // 255) << 5 | ((b * 31 + 127) // 255)
+
+
+def rgb565_array(a):
+ a = a.astype(np.uint32)
+ return (((a[..., 0] * 31 + 127) // 255) << 11 | ((a[..., 1] * 63 + 127) // 255) << 5 |
+ ((a[..., 2] * 31 + 127) // 255)).astype(np.uint16)
+
+
+def table(entries):
+ out, offs = bytearray(), []
+ base = 4 + 4 * len(entries)
+ for e in entries:
+ while (base + len(out)) % 2:
+ out.append(0)
+ offs.append(base + len(out))
+ out += e
+ return struct.pack("<I", len(entries)) + b"".join(struct.pack("<I", o) for o in offs) + bytes(out)
+
+
+def bits_pack(values, bpp):
+ out = bytearray((len(values) * bpp + 7) // 8)
+ for k, v in enumerate(values):
+ b = k * bpp
+ out[b >> 3] |= v << (b & 7)
+ return out
+
+
+def bpp_for(n):
+ return 1 if n <= 2 else 2 if n <= 4 else 4 if n <= 16 else 8
+
+
+# ------------------------------------------------------------------ frames
+def encode_frame(img, ox, oy):
+ a = np.array(img.convert("RGBA"))
+ h, w = a.shape[:2]
+ opaque = a[:, :, 3] >= 128
+ cols = {}
+ for c in map(tuple, a[opaque][:, :3]):
+ k = rgb565(*c)
+ cols[k] = cols.get(k, 0) + 1
+ pal = sorted(cols, key=lambda k: -cols[k])
+ if len(pal) > 255:
+ # (a rare frame with too many colours: the least used ones folded into their nearest)
+ keep = pal[:255]
+ def near(k):
+ r, g, b = k >> 11, (k >> 5) & 63, k & 31
+ return min(keep, key=lambda q: (r - (q >> 11)) ** 2 + ((g - ((q >> 5) & 63)) // 2) ** 2 + (b - (q & 31)) ** 2)
+ remap = {k: (k if k in keep else near(k)) for k in pal}
+ pal = keep
+ else:
+ remap = {k: k for k in pal}
+ index = {k: i for i, k in enumerate(pal)}
+ bpp = bpp_for(max(len(pal), 1))
+ rows, data = [], bytearray()
+ for y in range(h):
+ rows.append(len(data))
+ x = 0
+ while x < w:
+ skip = 0
+ while x < w and not opaque[y, x] and skip < 255:
+ x += 1
+ skip += 1
+ run = []
+ while x < w and opaque[y, x] and len(run) < 255:
+ run.append(index[remap[rgb565(*a[y, x, :3])]])
+ x += 1
+ data += bytes([skip, len(run)]) + bits_pack(run, bpp)
+ if len(data) > 0xFFFF:
+ raise ValueError("a frame too big")
+ head = struct.pack("<HHhhBB", w, h, ox, oy, bpp, len(pal)) + b"".join(struct.pack("<H", k) for k in pal)
+ return head + b"".join(struct.pack("<H", r) for r in rows) + bytes(data)
+
+
+def crop_frames(frames):
+ box = None
+ for f in frames:
+ b = f.getchannel("A").point(lambda v: 255 if v >= 128 else 0).getbbox()
+ if b:
+ box = b if box is None else (min(box[0], b[0]), min(box[1], b[1]), max(box[2], b[2]), max(box[3], b[3]))
+ if box is None:
+ return [Image.new("RGBA", (1, 1)) for _ in frames], 0, 0
+ return [f.crop(box) for f in frames], box[0], box[1]
+
+
+# ------------------------------------------------------------------ fonts
+def make_font(g, name):
+ f = g.font(name)
+ page = g.tpag_image(f["tpag"])
+ a = np.array(page)
+ glyphs = {x["c"]: x for x in f["glyphs"]}
+ first, last = 32, 127
+ gl, bits = bytearray(), bytearray()
+ height = max(x["h"] for x in f["glyphs"])
+ for c in range(first, last):
+ x = glyphs.get(c) or glyphs.get(ord("?"))
+ sub = a[x["y"]:x["y"] + x["h"], x["x"]:x["x"] + x["w"], 3] >= 128
+ ys, xs = np.nonzero(sub)
+ if len(xs) == 0:
+ gl += struct.pack("<BBBbbBH", x["shift"], 0, 0, 0, 0, 0, len(bits))
+ continue
+ x0, x1, y0, y1 = xs.min(), xs.max() + 1, ys.min(), ys.max() + 1
+ box = sub[y0:y1, x0:x1]
+ off = len(bits)
+ for row in box:
+ rb = bytearray((box.shape[1] + 7) // 8)
+ for k, v in enumerate(row):
+ if v:
+ rb[k >> 3] |= 0x80 >> (k & 7)
+ bits += rb
+ gl += struct.pack("<BBBbbBH", x["shift"], box.shape[1], box.shape[0], x0 + x["offset"], y0, 0, off)
+ return struct.pack("<BBBB", height, first, last - first, 0) + bytes(gl) + bytes(bits)
+
+
+# ------------------------------------------------------------------ rooms
+class TileSet:
+ def __init__(self):
+ self.ids, self.blobs = {}, []
+
+ def add(self, block, clear=None):
+ """a 20 x 20 block of RGB565 values (and its see-through mask) -> its tile id"""
+ key = block.tobytes() + (clear.tobytes() if clear is not None else b"")
+ if key in self.ids:
+ return self.ids[key]
+ flat = block.reshape(-1)
+ if clear is not None:
+ cflat = clear.reshape(-1)
+ cols, counts = np.unique(flat[~cflat], return_counts=True)
+ order = [None] + [int(c) for c, _ in sorted(zip(cols, counts), key=lambda t: -t[1])]
+ index = {c: i for i, c in enumerate(order)}
+ bpp = bpp_for(len(order))
+ blob = struct.pack("<BB", 0x80 | bpp, len(order)) + struct.pack("<H", 0)
+ blob += b"".join(struct.pack("<H", c) for c in order[1:])
+ blob += bits_pack([0 if cl else index[int(v)] for v, cl in zip(flat, cflat)], bpp)
+ else:
+ cols, counts = np.unique(flat, return_counts=True)
+ order = [int(c) for c, _ in sorted(zip(cols, counts), key=lambda t: -t[1])]
+ if len(order) == 1:
+ blob = struct.pack("<BBH", 0, 1, order[0])
+ else:
+ index = {c: i for i, c in enumerate(order)}
+ bpp = bpp_for(len(order))
+ blob = struct.pack("<BB", bpp, len(order)) + b"".join(struct.pack("<H", c) for c in order)
+ blob += bits_pack([index[int(v)] for v in flat], bpp)
+ self.ids[key] = len(self.blobs)
+ self.blobs.append(blob)
+ return self.ids[key]
+
+
+def is_dark(r):
+ return any(v["enabled"] and v["w"] == 640 for v in r["views"]) or (r["w"] >= 640 and not any(v["enabled"] for v in r["views"]))
+
+
+def render_room(g, r, front):
+ """the room's tiles and backgrounds (front: only those drawn over the characters), at the original's size"""
+ im = Image.new("RGBA", (r["w"], r["h"]), (0, 0, 0, 0))
+ for L in sorted(r["layers"], key=lambda L: -L["depth"]):
+ if (L["depth"] < FRONT_DEPTH) != front or not L["visible"]:
+ continue
+ if L["type"] == 1 and L["sprite"] >= 0 and L["bg_visible"]:
+ fr = g.sprite_frames(L["sprite"])[0]
+ x0, y0 = int(L["xo"]), int(L["yo"])
+ xs = range(x0 % fr.width - fr.width, r["w"], fr.width) if L["tiledh"] else [x0]
+ ys = range(y0 % fr.height - fr.height, r["h"], fr.height) if L["tiledv"] else [y0]
+ for yy in ys:
+ for xx in xs:
+ im.alpha_composite(fr, (xx, yy)) if xx >= 0 and yy >= 0 else im.paste(fr, (xx, yy), fr)
+ elif L["type"] == 3:
+ for t in L["tiles"]:
+ fr = sprite_frame0(g, t["spr"])
+ piece = fr.crop((t["sx"], t["sy"], t["sx"] + t["w"], t["sy"] + t["h"]))
+ if t["scx"] != 1 or t["scy"] != 1:
+ piece = piece.resize((max(1, round(t["w"] * abs(t["scx"]))), max(1, round(t["h"] * abs(t["scy"])))),
+ Image.NEAREST)
+ if t["scx"] < 0:
+ piece = piece.transpose(Image.FLIP_LEFT_RIGHT)
+ if t["scy"] < 0:
+ piece = piece.transpose(Image.FLIP_TOP_BOTTOM)
+ im.paste(piece, (t["x"], t["y"]), piece)
+ return im
+
+
+_frame0 = {}
+
+
+def sprite_frame0(g, i):
+ if i not in _frame0:
+ _frame0[i] = g.sprite_frames(i)[0]
+ return _frame0[i]
+
+
+def solid_kind(g, oi):
+ """the shape of a solid object, None if it isn't one"""
+ o = oi
+ while o >= 0:
+ name = g.objects[o]["name"]
+ if name in SOLID_SHAPES:
+ return SOLID_SHAPES[name]
+ if name == "obj_solidblock":
+ return 0
+ o = g.objects[o]["parent"]
+ return None
+
+
+def is_child_of(g, oi, parent):
+ while oi >= 0:
+ if g.objects[oi]["name"] == parent:
+ return True
+ oi = g.objects[oi]["parent"]
+ return False
+
+
+def solid_box(g, inst):
+ """an instance's mask box (its sprite's bounding box, scaled), the original's units"""
+ o = g.objects[inst["obj"]]
+ si = o["mask"] if o["mask"] >= 0 else o["sprite"]
+ s = g.sprites[si]
+ # (bbox margins: left, right, bottom, top, the right and bottom ones included)
+ l, rr, b, t = s["ml"], s["mr"] + 1, s["mb"] + 1, s["mt"]
+ sx, sy = inst["sx"], inst["sy"]
+ xa, xb = inst["x"] + (l - s["ox"]) * sx, inst["x"] + (rr - s["ox"]) * sx
+ ya, yb = inst["y"] + (t - s["oy"]) * sy, inst["y"] + (b - s["oy"]) * sy
+ return int(round(min(xa, xb))), int(round(min(ya, yb))), int(round(max(xa, xb))), int(round(max(ya, yb)))
+
+
+def pack_room(g, r, tiles, used_objs, obj_ids):
+ dark = is_dark(r)
+ k = 2 if dark else 1
+ w, h = r["w"] // k, r["h"] // k
+ gcols, grows = (w + 19) // 20, (h + 19) // 20
+
+ def grid_of(img, front):
+ a = np.array(img)
+ if k == 2:
+ a = a[::2, ::2]
+ full = np.zeros((grows * 20, gcols * 20, 4), np.uint8)
+ full[:a.shape[0], :a.shape[1]] = a[:grows * 20, :gcols * 20]
+ rgb = rgb565_array(full[..., :3])
+ clear = full[..., 3] < 128
+ ids = []
+ any_tile = False
+ for ty in range(grows):
+ for tx in range(gcols):
+ blk = rgb[ty * 20:ty * 20 + 20, tx * 20:tx * 20 + 20]
+ cl = clear[ty * 20:ty * 20 + 20, tx * 20:tx * 20 + 20]
+ if cl.all():
+ ids.append(0xFFFF)
+ elif front or cl.any():
+ if not front:
+ blk = blk.copy()
+ blk[cl] = bgcol
+ ids.append(tiles.add(blk))
+ else:
+ ids.append(tiles.add(blk, cl))
+ any_tile = True
+ else:
+ ids.append(tiles.add(blk))
+ any_tile = True
+ return ids, any_tile
+
+ bgcol = 0
+ for L in r["layers"]:
+ if L["type"] == 1 and L["sprite"] < 0 and L["visible"]:
+ c = L["color"]
+ bgcol = rgb565(c & 255, (c >> 8) & 255, (c >> 16) & 255)
+ back = render_room(g, r, False)
+ front = render_room(g, r, True)
+ grid, _ = grid_of(back, False)
+ fgrid, has_front = grid_of(front, True)
+ solids, insts = [], []
+ for n, inst in enumerate(r["objects"]):
+ oi = inst["obj"]
+ if oi < 0:
+ continue
+ kind = solid_kind(g, oi)
+ if kind is not None and not is_child_of(g, oi, "obj_interactablesolid") and g.objects[oi]["name"] not in used_objs:
+ x0, y0, x1, y1 = solid_box(g, inst)
+ if kind in (1, 2, 3, 4) and (inst["sx"] < 0) != (inst["sy"] < 0) and False:
+ pass
+ if inst["sx"] < 0: # a mirrored triangle: its square corner on the other side
+ kind = {1: 2, 2: 1, 3: 4, 4: 3}.get(kind, kind)
+ if inst["sy"] < 0:
+ kind = {1: 3, 3: 1, 2: 4, 4: 2}.get(kind, kind)
+ solids.append(struct.pack("<BBhhhh", kind, 0, x0, y0, x1, y1))
+ name = g.objects[oi]["name"]
+ if name in used_objs:
+ insts.append(struct.pack("<Hhhhhh", obj_ids[name], inst["x"], inst["y"], int(round(inst["sx"] * 100)),
+ int(round(inst["sy"] * 100)), n))
+ return dict(dark=dark, w=r["w"], h=r["h"], gcols=gcols, grows=grows, grid=grid,
+ fgrid=fgrid if has_front else None, solids=solids, insts=insts, bgcol=bgcol)
+
+
+# ------------------------------------------------------------------ what the code names
+def names_in_sources():
+ words = set()
+ for fn in sorted(os.listdir(SRC)):
+ if fn.endswith((".c", ".h")) and fn != "data.h":
+ with open(os.path.join(SRC, fn), encoding="utf-8") as f:
+ words |= set(re.findall(r"\b[A-Za-z_][A-Za-z0-9_]*\b", f.read()))
+ return words
+
+
+def text_bytes(s):
+ out = bytearray()
+ for ch in s:
+ o = ord(ch)
+ out += bytes([o]) if o < 256 else b"?"
+ return bytes(out)
+
+
+def main():
+ if len(sys.argv) != 2:
+ sys.exit(__doc__)
+ ref = sys.argv[1]
+ g = GM.GM(os.path.join(ref, "data.win"))
+ with open(os.path.join(ref, "lang_en.json"), encoding="utf-8") as f:
+ lang = json.load(f)
+ words = names_in_sources()
+ spr_names = [s["name"] for s in g.sprites]
+ room_names = [r["name"] for r in g.rooms]
+ obj_names = [o["name"] for o in g.objects]
+ sprites = [n for n in spr_names if n in words]
+ rooms = [n for n in room_names if n in words]
+ objs = sorted(n for n in obj_names if n in words)
+ texts = sorted(k for k in lang if k in words)
+ obj_ids = {n: i for i, n in enumerate(objs)}
+ blocks = Blocks()
+ secs = {}
+
+ # sprites
+ spr_table, frames, starts = bytearray(), [], []
+ for name in sprites:
+ s = g.sprite(name)
+ fr = g.sprite_frames(name)
+ fr, cx, cy = crop_frames(fr)
+ starts.append(len(frames))
+ spr_table += struct.pack("<HH", len(frames), len(fr))
+ for im in fr:
+ frames.append(encode_frame(im, s["ox"] - cx, s["oy"] - cy))
+ secs["SPRITES"] = struct.pack("<I", len(sprites)) + bytes(spr_table)
+ secs["FRAMES"] = blocks.place(frames, groups_by_size([len(f) for f in frames], BLOCK_FRAMES, starts))
+
+ # rooms
+ tiles = TileSet()
+ room_recs, grid, solids, insts = bytearray(), bytearray(), bytearray(), bytearray()
+ tile_order = []
+ for name in rooms:
+ pr = pack_room(g, g.room(name), tiles, set(objs), obj_ids)
+ goff = len(grid) // 2
+ grid += b"".join(struct.pack("<H", t) for t in pr["grid"])
+ foff = 0xFFFFFFFF
+ if pr["fgrid"]:
+ foff = len(grid) // 2
+ grid += b"".join(struct.pack("<H", t) for t in pr["fgrid"])
+ soff, ioff = len(solids) // 10, len(insts) // 12
+ solids += b"".join(pr["solids"])
+ insts += b"".join(pr["insts"])
+ room_recs += struct.pack("<HHHHIIIHIHBBH", pr["w"], pr["h"], pr["gcols"], pr["grows"], goff, foff,
+ soff, len(pr["solids"]), ioff, len(pr["insts"]), 1 if pr["dark"] else 0, 0, pr["bgcol"])
+ tile_order.append(len(tiles.blobs))
+ assert len(room_recs) == 32 * len(rooms)
+ secs["TILES"] = blocks.place(tiles.blobs, groups_by_size([len(b) for b in tiles.blobs], BLOCK_TILES, tile_order))
+ secs["ROOMS"] = struct.pack("<I", len(rooms)) + bytes(room_recs)
+ secs["GRID"] = bytes(grid)
+ secs["SOLIDS"] = bytes(solids)
+ secs["INSTS"] = bytes(insts)
+ secs["FONTS"] = table([make_font(g, f) for f in FONTS])
+ # texts
+ out, offs = bytearray(), []
+ base = 4 + 4 * len(texts)
+ for k in texts:
+ offs.append(base + len(out))
+ out += text_bytes(lang[k]) + b"\0"
+ secs["STRINGS"] = struct.pack("<I", len(texts)) + b"".join(struct.pack("<I", o) for o in offs) + bytes(out)
+ secs["BLOCKS"] = blocks.section()
+ secs["ORDER"] = b"".join(struct.pack("<H", room_names.index(n)) for n in rooms)
+
+ head = b"DRD1" + struct.pack("<I", len(SECTIONS))
+ pos = len(head) + 4 * len(SECTIONS)
+ body, offs = bytearray(), []
+ for s in SECTIONS:
+ while (pos + len(body)) % 4:
+ body.append(0)
+ offs.append(pos + len(body))
+ body += secs[s]
+ data = head + b"".join(struct.pack("<I", o) for o in offs) + bytes(body)
+ with open(OUT_BIN, "wb") as f:
+ f.write(data)
+
+ hl = ["/* made by tools/pack.py: the numbers of what data.bin holds, by the original's names */",
+ "#ifndef DR_DATA_H", "#define DR_DATA_H", "enum {"]
+ hl += [" SEC_%s = %d," % (s, i) for i, s in enumerate(SECTIONS)]
+ hl += ["};", "enum {"]
+ hl += [" %s = %d," % (n, i) for i, n in enumerate(sprites)]
+ hl += [" NUM_SPRITES = %d" % len(sprites), "};", "enum {"]
+ hl += [" %s = %d," % (n, i) for i, n in enumerate(rooms)]
+ hl += [" NUM_ROOMS = %d" % len(rooms), "};", "enum {"]
+ hl += [" %s = %d," % (n, i) for i, n in enumerate(objs)]
+ hl += [" NUM_OBJS = %d" % len(objs), "};", "enum {"]
+ hl += [" %s = %d," % (k, i) for i, k in enumerate(texts)]
+ hl += [" NUM_TEXTS = %d" % len(texts), "};", "enum {"]
+ hl += [" FONT_%s = %d," % (f[4:].upper(), i) for i, f in enumerate(FONTS)]
+ hl += ["};", "#endif", ""]
+ with open(OUT_H, "w") as f:
+ f.write("\n".join(hl))
+ print("data.bin %d bytes: %d sprites (%d frames), %d rooms, %d tiles, %d objects, %d texts" % (
+ len(data), len(sprites), len(frames), len(rooms), len(tiles.blobs), len(objs), len(texts)))
+ for s in SECTIONS:
+ print(" %-8s %8d" % (s, len(secs[s])))
+
+
+if __name__ == "__main__":
+ main()
diff --git a/games/deltarune/tools/tables.py b/games/deltarune/tools/tables.py
new file mode 100644
index 00000000..e2185750
--- /dev/null
+++ b/games/deltarune/tools/tables.py
@@ -0,0 +1,195 @@
+#!/usr/bin/env python3
+"""The original's tables, read from its own scripts in data.win -> src/tables.c.
+
+ python3 -I tools/tables.py REF (REF: the folder with data.win)
+
+The scripts are switches on their argument (scr_iteminfo, scr_weaponinfo, scr_armorinfo, scr_spellinfo,
+scr_encountersetup) or chains of ifs (scr_monstersetup): each case's assignments become a row. Texts are
+kept as the ids of the original's texts (data.h names them the same way)."""
+import os
+import re
+import sys
+
+HERE = os.path.dirname(os.path.abspath(__file__))
+sys.path.insert(0, HERE)
+import gm as GM # noqa: E402
+
+OUT = os.path.join(HERE, "..", "src", "tables.c")
+LANG = re.compile(r'scr_84_get_lang_string\("([^"]+)"\)')
+
+
+def switch_cases(text, var="argument0"):
+ """{case value: [(lhs, rhs), ...]} of a switch on var"""
+ lines = text.split("\n")
+ cases = {}
+ for ln in lines:
+ m = re.match(r"if \(%s == (\d+)\) goto L(\d+)$" % re.escape(var), ln)
+ if m:
+ cases.setdefault(int(m.group(1)), int(m.group(2)))
+ labels = {}
+ for i, ln in enumerate(lines):
+ m = re.match(r"L(\d+):$", ln)
+ if m:
+ labels[int(m.group(1))] = i
+ out = {}
+ for v, lab in cases.items():
+ i = labels[lab] + 1
+ rows = []
+ while i < len(lines):
+ ln = lines[i]
+ if ln.startswith("goto ") or (re.match(r"L\d+:$", ln) and int(ln[1:-1]) in cases.values() and int(ln[1:-1]) != lab):
+ break
+ m = re.match(r"([\w.\[\]() *+]+?) = (.+)$", ln)
+ if m:
+ rows.append((m.group(1), m.group(2)))
+ i += 1
+ out[v] = rows
+ return out
+
+
+def if_chain(text, cond):
+ """{value: [(lhs, rhs)]} of a chain 'if !(cond == N) goto Lx ... Lx:'"""
+ lines = text.split("\n")
+ out = {}
+ i = 0
+ while i < len(lines):
+ m = re.match(r"if !\(%s == (\d+)\) goto L(\d+)$" % re.escape(cond), lines[i])
+ if m:
+ v, end = int(m.group(1)), "L%s:" % m.group(2)
+ rows = []
+ i += 1
+ while i < len(lines) and lines[i] != end:
+ a = re.match(r"([\w.\[\]() *+]+?) = (.+)$", lines[i])
+ if a:
+ rows.append((a.group(1), a.group(2)))
+ i += 1
+ out[v] = rows
+ i += 1
+ return out
+
+
+def num(expr, **env):
+ e = expr
+ for k, v in env.items():
+ e = re.sub(r"\b%s\b" % k, str(v), e)
+ if not re.fullmatch(r"[\d\s.+\-*/()]+", e):
+ return None
+ try:
+ return eval(e, {"__builtins__": {}})
+ except Exception:
+ return None
+
+
+def lang(expr):
+ m = LANG.search(expr)
+ return m.group(1) if m else None
+
+
+def field(rows, name, default=0, last=True):
+ val = default
+ for lhs, rhs in rows:
+ if lhs == name:
+ val = rhs
+ if not last:
+ break
+ return val
+
+
+def cstr(key):
+ return key if key else "0xFFFF"
+
+
+def main():
+ if len(sys.argv) != 2:
+ sys.exit(__doc__)
+ g = GM.GM(os.path.join(sys.argv[1], "data.win"))
+ code = lambda n: g.decompile(n)
+ out = ["/* made by tools/tables.py from the original's scripts: items, weapons, armors, spells, enemies and",
+ " * battles (see tables.h) */", '#include "data.h"', '#include "tables.h"', ""]
+
+ # items: scr_iteminfo
+ items = switch_cases(code("gml_Script_scr_iteminfo"))
+ n = max(items) + 1
+ out.append("const ItemDef item_defs[%d] = {" % n)
+ for i in range(n):
+ r = items.get(i, [])
+ out.append(" {%s, %s, %d, %d, %d}," % (
+ cstr(lang(field(r, "itemnameb", ""))), cstr(lang(field(r, "itemdescb", ""))),
+ num(str(field(r, "itemtarget", 0))) or 0, num(str(field(r, "value", 0))) or 0,
+ num(str(field(r, "usable", 0))) or 0))
+ out += ["};", "const int item_count = %d;" % n, ""]
+
+ # weapons and armors
+ for kind, script, p in (("weapon", "gml_Script_scr_weaponinfo", "weapon"), ("armor", "gml_Script_scr_armorinfo", "armor")):
+ cases = switch_cases(code(script))
+ n = max(cases) + 1
+ out.append("const EquipDef %s_defs[%d] = {" % (kind, n))
+ for i in range(n):
+ r = cases.get(i, [])
+ v = lambda k: num(str(field(r, p + k + "temp", 0))) or 0
+ out.append(" {%s, %s, %d, %d, %d, %d, %d, %d, %d, %d}," % (
+ cstr(lang(field(r, p + "nametemp", ""))), cstr(lang(field(r, p + "desctemp", ""))),
+ v("at"), v("df"), v("mag"), v("char1"), v("char2"), v("char3"), v("icon"),
+ num(str(field(r, "value", 0))) or 0))
+ out += ["};", "const int %s_count = %d;" % (kind, n), ""]
+
+ # spells
+ sp = switch_cases(code("gml_Script_scr_spellinfo"))
+ n = max(sp) + 1
+ out.append("const SpellDef spell_defs[%d] = {" % n)
+ for i in range(n):
+ r = sp.get(i, [])
+ out.append(" {%s, %s, %s, %d, %d, %d}," % (
+ cstr(lang(field(r, "spellnameb", ""))), cstr(lang(field(r, "spelldescb", ""))),
+ cstr(lang(field(r, "spellname", ""))),
+ num(str(field(r, "cost", -1))) or 0, num(str(field(r, "spelltarget", 0))) or 0,
+ num(str(field(r, "spellusable", 0))) or 0))
+ out += ["};", "const int spell_count = %d;" % n, ""]
+
+ # enemies: scr_monstersetup
+ mons = if_chain(code("gml_Script_scr_monstersetup"), "global.monstertype[myself]")
+ n = max(mons) + 1
+ out.append("const MonsterDef monster_defs[%d] = {" % n)
+ for i in range(n):
+ r = mons.get(i, [])
+ g_ = lambda k, d=0: num(str(field(r, "global.%s[myself]" % k, d))) or 0
+ acts = []
+ for k in range(6):
+ nm = lang(field(r, "global.actname[((myself * 32000) + %d)]" % k, ""))
+ can = num(str(field(r, "global.canact[((myself * 32000) + %d)]" % k, 0))) or 0
+ desc = lang(field(r, "global.actdesc[((myself * 32000) + %d)]" % k, ""))
+ cost = num(str(field(r, "global.actcost[((myself * 32000) + %d)]" % k, 0))) or 0
+ actor = num(str(field(r, "global.actactor[((myself * 32000) + %d)]" % k, 1))) or 1
+ acts.append("{%s, %s, %d, %d, %d}" % (cstr(nm), cstr(desc), can, cost, actor))
+ out.append(" {%s, %d, %d, %d, %d, %d, %d, %d, %d, %s,\n {%s}}," % (
+ cstr(lang(field(r, "global.monstername[myself]", ""))), g_("monstermaxhp"), g_("monsterat"),
+ g_("monsterdf"), g_("monsterexp"), g_("monstergold"), g_("sparepoint"), g_("mercymax"),
+ g_("mercymod"), cstr(lang(field(r, "global.battlemsg[0]", ""))), ", ".join(acts)))
+ out += ["};", "const int monster_count = %d;" % n, ""]
+
+ # battles: scr_encountersetup (what each encounter places, around the view's top-left)
+ enc = switch_cases(code("gml_Script_scr_encountersetup"))
+ n = max(enc) + 1
+ out.append("const EncounterDef encounter_defs[%d] = {" % n)
+ objs = [o["name"] for o in g.objects]
+ for i in range(n):
+ r = enc.get(i, [])
+ ms = []
+ for k in range(3):
+ t = num(str(field(r, "global.monstertype[%d]" % k, 0))) or 0
+ it = num(str(field(r, "global.monsterinstancetype[%d]" % k, -1)))
+ mx = num(str(field(r, "global.monstermakex[%d]" % k, 0)), xx=0, yy=0) or 0
+ my = num(str(field(r, "global.monstermakey[%d]" % k, 0)), xx=0, yy=0) or 0
+ ms.append("{%d, %d, %d, %d}" % (t, it if it is not None else -1, mx, my))
+ out.append(" {{%s}, %s}, /* %s */" % (", ".join(ms), cstr(lang(field(r, "global.battlemsg[0]", ""))),
+ " ".join(objs[int(num(str(field(r, "global.monsterinstancetype[%d]" % k, 0))) or 0)]
+ for k in range(3)
+ if (num(str(field(r, "global.monstertype[%d]" % k, 0))) or 0))))
+ out += ["};", "const int encounter_count = %d;" % n, ""]
+ with open(OUT, "w") as f:
+ f.write("\n".join(out))
+ print("tables.c: %d items, %d spells, %d enemies, %d battles" % (len(items), len(sp), len(mons), len(enc)))
+
+
+if __name__ == "__main__":
+ main()
diff --git a/games/deltarune/tools/texts.py b/games/deltarune/tools/texts.py
new file mode 100644
index 00000000..ee952a6e
--- /dev/null
+++ b/games/deltarune/tools/texts.py
@@ -0,0 +1,206 @@
+#!/usr/bin/env python3
+"""The original's text-choosing code, read from data.win and turned into C -> src/gmtexts.c.
+
+ python3 -I tools/texts.py REF (REF: the folder with data.win)
+
+What a sign, a bed or a character says depends on the room, where it stands, the story so far: the
+original decides it in long chains of ifs (obj_readable_room1, obj_npc_room, scr_text...). Those are
+turned into C as they are (their ifs and gotos kept), with its texts as ids and its globals as the
+game's (game.h). A statement the game has no use for is kept as a comment."""
+import os
+import re
+import sys
+
+HERE = os.path.dirname(os.path.abspath(__file__))
+sys.path.insert(0, HERE)
+import gm as GM # noqa: E402
+
+OUT = os.path.join(HERE, "..", "src", "gmtexts.c")
+# code entry -> C function
+ENTRIES = [
+ ("gml_Object_obj_readable_room1_Other_10", "gm_readable_room1"),
+ ("gml_Object_obj_npc_room_Create_0", "gm_npc_room_create"),
+ ("gml_Object_obj_npc_room_Other_10", "gm_npc_room_talk"),
+ ("gml_Object_obj_npc_sign_Create_0", "gm_npc_sign_create"),
+ ("gml_Object_obj_npc_sign_Other_10", "gm_npc_sign_talk"),
+ ("gml_Object_obj_npc_facing_Create_0", "gm_npc_facing_create"),
+ ("gml_Object_obj_npc_facing_Other_10", "gm_npc_facing_talk"),
+ ("gml_Script_scr_text", "gm_scr_text"),
+]
+LOCALS = {"tempvar", "afford", "itemflag", "itemtype", "t_itemid"}
+FACES = {"scr_susface": "S", "scr_ralface": "R", "scr_noeface": "N", "scr_torface": "T", "scr_lanface": "L",
+ "scr_rudface": "r", "scr_asgface": "A", "scr_kingface": "K", "scr_rurusface": "u"}
+VARS = [
+ (r"\bglobal\.plot\b", "sv.plot"), (r"\bglobal\.flag\[", "sv.flag["), (r"\bglobal\.tempflag\[", "c->tempflag["),
+ (r"\bglobal\.filechoice\b", "0"), (r"\bglobal\.darkzone\b", "sv.darkzone"), (r"\bglobal\.gold\b", "sv.gold"),
+ (r"\bglobal\.lgold\b", "sv.lgold"), (r"\bglobal\.hp\[", "sv.hp["), (r"\bglobal\.maxhp\[", "sv.maxhp["),
+ (r"\bglobal\.char\[", "sv.chr["), (r"\bglobal\.choice\b", "c->choice"), (r"\bglobal\.lweapon\b", "sv.lweapon"),
+ (r"\bglobal\.larmor\b", "sv.larmor"), (r"\bglobal\.facing\b", "c->facing"), (r"\bglobal\.item\[", "sv.item["),
+ (r"\bglobal\.keyitem\[", "sv.keyitem["), (r"\bglobal\.lv\b", "sv.lv"), (r"\bglobal\.litem\[", "sv.litem["),
+ (r"\bargument0\b", "c->arg"), (r"\bargument1\b", "c->arg1"), (r"\bglobal\.msc\b", "c->msc"),
+ (r"\bscr_havechar\(", "have_char("), (r"\bscr_itemcheck\(", "gm_itemcheck("),
+ (r"\bscr_keyitemcheck\(", "gm_keyitemcheck("), (r"\bscr_litemcheck\(", "gm_litemcheck("),
+ (r"\bscr_weaponcheck_inventory\(", "gm_weaponcheck("), (r"\broom_width\b", "world_room_info()->w"),
+ (r"\broom_height\b", "world_room_info()->h"), (r"\bx\b", "c->x"), (r"\by\b", "c->y"), (r"\bread\b", "c->read"),
+ (r"\btalked\b", "c->talked"), (r"\bimage_index\b", "c->img"), (r"\bsprite_index\b", "c->spr"),
+]
+
+
+def load_names(g):
+ return ([s["name"] for s in g.sprites], [r["name"] for r in g.rooms], [o["name"] for o in g.objects])
+
+
+class Tr:
+ def __init__(self, g):
+ self.spr, self.rooms, self.objs = load_names(g)
+ self.unknown = 0
+ self.locals = set()
+
+ def expr(self, e):
+ """an expression in C, or None when it uses what the game hasn't got"""
+ e = re.sub(r"\broom (==|!=|<|>|<=|>=) (\d+)\b", lambda m: "g_room %s %s" % (m.group(1), self.rooms[int(m.group(2))]), e)
+ e = re.sub(r'scr_84_get_lang_string\("([^"]+)"\)', r"\1", e)
+ for pat, rep in VARS:
+ e = re.sub(pat, rep, e)
+ e = e.replace("\\", "\\\\")
+ # anything left that looks like a name the game hasn't got
+ rest = re.sub(r'"[^"]*"', "", e)
+ rest = re.sub(r"->\w+|sv\.\w+", "", rest)
+ for w in re.findall(r"\b[A-Za-z_][A-Za-z0-9_.]*\b", rest):
+ if w in ("g_room", "have_char", "gm_itemcheck", "gm_keyitemcheck", "gm_litemcheck", "gm_weaponcheck",
+ "world_room_info") or (w.startswith("room_") and w in self.rooms):
+ continue
+ if w in self.locals:
+ continue
+ if w in ("abs", "floor", "round"):
+ continue
+ if re.match(r"^[a-z0-9_]+_slash_", w):
+ continue
+ return None
+ return e
+
+ def stmt(self, ln, labels_used):
+ m = re.match(r"if !(.+) goto (L\d+)$", ln)
+ if m:
+ c = self.expr(m.group(1))
+ return "if (!%s) goto %s;" % (c, m.group(2)) if c is not None else "goto %s; /* gml: %s */" % (m.group(2), ln)
+ m = re.match(r"if (.+) goto (L\d+)$", ln)
+ if m:
+ c = self.expr(m.group(1))
+ return "if (%s) goto %s;" % (c, m.group(2)) if c is not None else "/* gml: %s */" % ln
+ m = re.match(r"goto (L\d+)$", ln)
+ if m:
+ return "goto %s;" % m.group(1)
+ m = re.match(r"(L\d+):$", ln)
+ if m:
+ return "%s:;" % m.group(1) if m.group(1) in labels_used else None
+ m = re.match(r'global\.msg\[(\d+)\] = scr_84_get_lang_string\("([^"]+)"\)$', ln)
+ if m:
+ return "MSG(%s, %s);" % (m.group(1), m.group(2))
+ m = re.match(r'global\.msg\[(\d+)\] = scr_84_get_subst_string\(scr_84_get_lang_string\("([^"]+)"\), (.+)\)$', ln)
+ if m:
+ return "MSG(%s, %s); /* gml: %s */" % (m.group(1), m.group(2), ln)
+ m = re.match(r'global\.(msg|choicemsg)\[(\d+)\] = "([^"]*)"$', ln)
+ if m:
+ return ('txt_msg(c, %s, "%s");' if m.group(1) == "msg" else 'c->choicemsg[%s] = "%s";') % (m.group(2), m.group(3))
+ m = re.match(r'global\.choicemsg\[(\d+)\] = scr_84_get_lang_string\("([^"]+)"\)$', ln)
+ if m:
+ return "CHOICE(%s, %s);" % (m.group(1), m.group(2))
+ m = re.match(r'(scr_\w+face)\((\d+), "?(\w+)"?\)$', ln)
+ if m and m.group(1) in FACES:
+ fe = m.group(3)
+ fe = str(10 + ord(fe) - ord("A")) if fe.isalpha() and len(fe) == 1 else fe
+ return "FACE(%s, '%s', %s);" % (m.group(2), FACES[m.group(1)], fe)
+ m = re.match(r"([drlu])tsprite = (\d+)$", ln)
+ if m:
+ return "c->tspr[%d] = %s;" % ("drul".index(m.group(1)), self.spr[int(m.group(2))])
+ m = re.match(r"scr_noface\((\d+)\)$", ln)
+ if m:
+ return "NOFACE(%s);" % m.group(1)
+ m = re.match(r"global\.fc = (\d+)$", ln)
+ if m:
+ return "c->fc = %s;" % m.group(1)
+ m = re.match(r"global\.fe = (\d+)$", ln)
+ if m:
+ return "c->fe = %s;" % m.group(1)
+ m = re.match(r"global\.msc = (.+)$", ln)
+ if m:
+ e = self.expr(m.group(1))
+ return "c->msc = %s;" % e if e else "/* gml: %s */" % ln
+ m = re.match(r"scr_text\((.+)\)$", ln)
+ if m:
+ e = self.expr(m.group(1))
+ return "c->arg = %s; gm_scr_text(c);" % e if e else "/* gml: %s */" % ln
+ m = re.match(r"sprite_index = (\d+)$", ln)
+ if m:
+ return "c->spr = %s;" % self.spr[int(m.group(1))]
+ m = re.match(r"(global\.flag\[.+\]|global\.plot|global\.gold|global\.lgold|read|talked|c->\w+|image_index) = (.+)$", ln)
+ if m:
+ lhs, rhs = self.expr(m.group(1)), self.expr(m.group(2))
+ if lhs and rhs:
+ return "%s = %s;" % (lhs, rhs)
+ m = re.match(r"(\w+) = (.+)$", ln)
+ if m and m.group(1) in self.locals:
+ rhs = self.expr(m.group(2))
+ if rhs:
+ return "%s = %s;" % (m.group(1), rhs)
+ m = re.match(r"(scr_itemget|scr_keyitemget|scr_weaponget|scr_armorget|scr_litemget|scr_itemremove|scr_keyitemremove|scr_litemremove)\((.+)\)$", ln)
+ if m:
+ e = self.expr(m.group(2))
+ if e:
+ return "%s(%s);" % (m.group(1).replace("scr_", "gm_"), e)
+ self.unknown += 1
+ return "/* gml: %s */" % ln.replace("*/", "* /")
+
+ def function(self, name, text):
+ lines = text.split("\n")
+ # the code's own counters (tempvar, afford...): locals of the function
+ self.locals = set()
+ for ln in lines:
+ m = re.match(r"([a-z_][a-z0-9_]*) = (.+)$", ln)
+ if m and m.group(1) in LOCALS:
+ self.locals.add(m.group(1))
+ used = set()
+ for ln in lines:
+ m = re.search(r"goto (L\d+)", ln)
+ if m:
+ used.add(m.group(1))
+ body = []
+ for ln in lines:
+ if not ln.strip() or ln.startswith(" // stack") or ln.startswith("// stack"):
+ continue
+ if ln.startswith("with (") or ln.startswith("} // end with"):
+ body.append(" /* gml: %s */" % ln.replace("*/", "* /"))
+ continue
+ s = self.stmt(ln, used)
+ if s is not None:
+ body.append(("" if re.match(r"L\d+:;", s) else " ") + s)
+ # labels never reached by a goto that the function jumps to past its end
+ defined = {re.match(r"(L\d+):", b).group(1) for b in body if re.match(r"L\d+:", b)}
+ for lab in sorted(used - defined, key=lambda s: int(s[1:])):
+ body.append("%s:;" % lab)
+ head = ["void %s(TxtCtx *c) {" % name]
+ if self.locals:
+ head.append(" int %s;" % ", ".join("%s = 0" % v for v in sorted(self.locals)))
+ return head + body + ["}", ""]
+
+
+def main():
+ if len(sys.argv) != 2:
+ sys.exit(__doc__)
+ g = GM.GM(os.path.join(sys.argv[1], "data.win"))
+ tr = Tr(g)
+ out = ["/* made by tools/texts.py from the original's code: what its signs, beds and people say (see",
+ " * gmtexts.h). Its ifs and gotos are the original's; what the game has no use for stays a comment. */",
+ "#if defined(__GNUC__) && !defined(__clang__)", '#pragma GCC optimize("Os")', "#endif",
+ '#include "game.h"', '#include "gmtexts.h"', '#include "world.h"', "",
+ "#if defined(__GNUC__)", '#pragma GCC diagnostic ignored "-Wunused-label"\n#pragma GCC diagnostic ignored "-Wunused-but-set-variable"', "#endif", ""]
+ for entry, fn in ENTRIES:
+ out += tr.function(fn, g.decompile(entry))
+ with open(OUT, "w") as f:
+ f.write("\n".join(out))
+ print("gmtexts.c: %d functions, %d statements left as comments" % (len(ENTRIES), tr.unknown))
+
+
+if __name__ == "__main__":
+ main()