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.
C calculatorcalculator-gamescasiochesscrossy-roaddrive-madfx-cg50gamesgeometry-dashgraphing-calculatorndlessnumworksnumworks-appsnumworks-calculatornumworks-gamenumworks-gamestetristi-84-plus-ceti-nspire
Cat Ninja: the game, its pictures, levels and scripts
Mason36375d8dbb06e64
diff --git a/games/catninja/.gitignore b/games/catninja/.gitignorenew file mode 100644index 00000000..342d9dda--- /dev/null+++ b/games/catninja/.gitignore@@ -0,0 +1,2 @@+output/+build/diff --git a/games/catninja/Makefile b/games/catninja/Makefilenew file mode 100644index 00000000..31831e5d--- /dev/null+++ b/games/catninja/Makefile@@ -0,0 +1,91 @@+# Cat Ninja on the NumWorks calculator, an app of its own.+# make output/catninja.nwa+# make check link it like the calculator does (output/catninja.bin), within the RAM and the app space+# make host build/play: the game on a computer, for tests and pictures+# make test the cat's physics against the original's numbers (spec/), the first levels played with the keys,+# every level loaded, random keys, saves (kept, damaged, lost, from the copy), with the sanitizers+# make data src/data.c from Cat Ninja's own files (GAMESRC: what JPEXS took out of CatNinja.swf, see its spec/)+Q ?= @+TOOLCHAIN ?=+BIN = $(if $(TOOLCHAIN),$(TOOLCHAIN)/)+CC = $(BIN)arm-none-eabi-gcc+STRIP ?= $(BIN)arm-none-eabi-strip --strip-unneeded+NWLINK ?= npx --yes -- [email protected]+BUILD_DIR = output+L = ../../launcher/src+PYTHON ?= python3+GAMESRC ?= $(HOME)/Documents/Assets/gamesrc/catninja++SRC = src/main.c src/game.c src/env.c src/draw.c src/data.c src/plat_eadk.c $(L)/gfx.c $(L)/font_data.c $(L)/xfont.c \+ $(L)/inflate.c+HEADERS = src/cn.h src/data.h src/plat.h $(L)/gfx.h $(L)/font.h $(L)/np.h $(L)/inflate.h ../common/epsilon_app.h \+ ../common/epsilon_files.h++CFLAGS = -std=gnu11 $(shell $(NWLINK) eadk-cflags-device) -DPLATFORM_DEVICE=1 -DEPSILON_XL=1 -I$(L) -Isrc+CFLAGS += -Os -Wall -Wextra -Wno-unused-parameter -fno-math-errno+CFLAGS += -fno-tree-loop-distribute-patterns -flto -fno-fat-lto-objects -fwhole-program -fvisibility=internal+CFLAGS += -ffunction-sections -fdata-sections+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++# apps get 133652 bytes of RAM on custom builds of Epsilon 25.2 (148928 or more on official ones), and the+# calculator's app space is 2031616 bytes+RAM = 133652+APP_SPACE = 2031616++.PHONY: build check clean host test data perf+build: $(BUILD_DIR)/catninja.nwa++check: $(BUILD_DIR)/catninja.nwa+ $(Q) $(NWLINK) nwa-bin --ram-length $(RAM) $< $(BUILD_DIR)/catninja.bin+ $(Q) n=$$(wc -c < $(BUILD_DIR)/catninja.bin); [ $$n -le $(APP_SPACE) ] || \+ { echo "catninja.nwa is bigger than the calculator's app space ($(APP_SPACE) bytes)"; exit 1; }; \+ echo "BIN $(BUILD_DIR)/catninja.bin: $$n bytes, RAM within $(RAM) bytes"++$(BUILD_DIR)/obj/%.o: src/%.c $(HEADERS) | $(BUILD_DIR)+ @mkdir -p $(@D)+ @echo "CC $<"+ $(Q) $(CC) $(CFLAGS) -c $< -o $@+$(BUILD_DIR)/obj/%.o: $(L)/%.c $(HEADERS) | $(BUILD_DIR)+ @mkdir -p $(@D)+ $(Q) $(CC) $(CFLAGS) -c $< -o $@++OBJ = $(patsubst %.c,$(BUILD_DIR)/obj/%.o,$(notdir $(SRC)))+$(BUILD_DIR)/catninja.nwa: $(OBJ) $(BUILD_DIR)/icon.o+ @echo "LD $@"+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $^ -lm -o $@+ $(Q) $(STRIP) $@++$(BUILD_DIR)/icon.o: src/icon.png | $(BUILD_DIR)+ @echo "ICON $<"+ $(Q) $(NWLINK) png-icon-o $< $@++$(BUILD_DIR):+ $(Q) mkdir -p $@++data:+ $(PYTHON) -I tools/data.py $(GAMESRC) src++# every frame drawn, at an N0110's speed in tools/emu.py: the How to play page closed, then the title map run+# through into the first level+$(BUILD_DIR)/perf.nwa: $(OBJ) $(BUILD_DIR)/icon.o+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $^ -lm -o $@+perf: $(BUILD_DIR)/perf.nwa+ $(PYTHON) ../../tools/emu.py $< --nwlink "$(NWLINK)" --ms 16000 --out $(BUILD_DIR) --model n0110 \+ --keys "400-500:ok,1500-15000:right,6000-6300:up,9000-9200:up,12000-12300:up"++# on a computer: tests/play.c checks the game and saves pictures+HOST_FLAGS = -std=gnu11 -O1 -g -Wall -Wextra -Wno-unused-parameter -DHOST -I$(L) -Isrc \+ -fsanitize=address,undefined -fno-sanitize-recover=undefined+HOST_SRC = src/game.c src/env.c src/draw.c src/data.c $(L)/gfx.c $(L)/font_data.c $(L)/xfont.c $(L)/inflate.c+host: build/play+build/play: tests/play.c src/main.c $(HOST_SRC) $(HEADERS)+ $(Q) mkdir -p build+ $(Q) cc $(HOST_FLAGS) tests/play.c $(HOST_SRC) -lm -o $@+ @echo "HOST $@"+test: build/play+ build/play test++clean:+ $(Q) rm -rf $(BUILD_DIR) builddiff --git a/games/catninja/src/cn.h b/games/catninja/src/cn.hnew file mode 100644index 00000000..7de4adda--- /dev/null+++ b/games/catninja/src/cn.h@@ -0,0 +1,232 @@+/* Cat Ninja: the game's state, shared by its logic (game.c, env.c), its drawing (draw.c) and its shell+ * (main.c). The logic is Richman Stewart's ActionScript (CatNinja.swf, 2013) in C, class by class: the+ * same numbers, the same order, the same quirks. It steps 60 times a second, in the original's pixels+ * (tiles of 20), with its Numbers as doubles and its display objects' places in twentieths of a pixel. */+#ifndef CN_H+#define CN_H+#include <stdbool.h>+#include <stdint.h>+#include "data.h"++#define SOLID 0x80 /* a tile's byte: its type (0 to 91), and this bit when it isn't walkable */+#define TYPE(i) (grid[i] & 0x7F)++/* ---------------------------------------------------------------- tools/images/ColourChanger */+typedef struct {+ double r, g, b, ra, ga, ba, speed, max;+ bool reversed;+} cc_t;+void cc_init(cc_t *c, double speed, double max);+void cc_update(cc_t *c);++/* ---------------------------------------------------------------- the map (maps/Map) */+extern uint8_t grid[CN_MAP_MAX];+extern uint8_t blood[(CN_MAP_MAX + 7) / 8]; /* spikes the cat died on (drawn bloody) */+extern int gw, gh, level, room;+extern int destrotate, currentrotation;+extern bool rotating, hallucinate;+extern cc_t map_tint;+extern int playerpoints[12];++/* the display: Main.world (its turn and size about the screen's middle) and Main.screen (the camera) */+extern double world_rot, world_sx, world_sy, screen_x, screen_y;+extern double fade_alpha; /* Main.fadescreen */+extern bool fade_on;++/* ---------------------------------------------------------------- the cat (entities/Player) */+typedef struct {+ double x, y, speedx, gravity, ACCELERATION, FRICTION, trailfade, rotation;+ int maxspeedx, maxgravity, MAXSPEED, coordx, coordy, scaleX, scaleoffset;+ int spawnx, spawny, spawnrotation, spawnlevel;+ bool dead, stopMovement, doublejump, doublefalling, rolling, forceSlam, hitwall, onground;+ bool hasJetPack, usingjetpack, walkSteps, on_stage;+ int stepAmount, steps, lastX;+ int pic; /* base.bitmapData */+ int a_frame, a_timer, a_speed, a_state, a_paused; /* its AnimateControl */+ bool jet_visible, jet_half; /* basejetpack: shown, squashed (ducking) */+ cc_t tint;+} player_t;+extern player_t P;+#define OFFX 11+#define OFFY 10++/* ---------------------------------------------------------------- the things of a level (environment/) */+#define MAX_MINES 48+#define MAX_BUTTONS 8+#define MAX_DIRTS 128+#define MAX_CRATES 160+#define MAX_SHOOTERS 12+#define MAX_FALLS 140+#define MAX_SUNS 16+#define MAX_SPHERES 72+#define MAX_SCREENS 12+#define MAX_LASERS 12+#define MAX_BULLETS 48+#define MAX_BOMBS 24+#define MAX_TRAILS 320+#define MAX_PARTICLES 100+#define MAX_TEXTS 6++typedef struct {+ int x, y, graphic, timer, rate, pic;+ bool setoff, blinkon, off;+} mine_t;+typedef struct {+ double x, y, sx, sy, msx, msy, oy;+ int datanum, pic;+ bool pressed, alive;+} button_t;+typedef struct {+ int x, y, frame, ftimer;+ bool activated, alive, playing;+} dirt_t;+typedef struct {+ int x, y, ox, oy, lx, ly;+ bool alive;+} crate_t;+typedef struct {+ int x, y, orient, timer, startat, frame, ftimer;+ bool homing, reverse, paused;+} shooter_t;+typedef struct {+ double x, y, sx, sy, angle;+ int owner, color, htimer, homingtimer, bspeed; /* owner: a shooter, or -1 the boss */+ bool homing, on;+} bullet_t;+typedef struct {+ int x, y, sx, sy, spx, spy, dir;+ bool fall, alive;+} fall_t;+typedef struct {+ int x, y, sx, sy, lastx, lasty;+} sun_t;+typedef struct {+ double x, y;+ int frame, ftimer;+ bool collectable, alive;+} sphere_t;+typedef struct {+ int x, y, text, rot;+} screen_t;+typedef struct {+ int fx, fy, tx, ty, g1, g2, go1, go2, lg;+ bool on;+} laser_t;+typedef struct {+ double x, y, speedx, gravity, rot;+ bool on;+} bomb_t;+enum { TR_PIC, TR_CIRCLE_RED, TR_DOT }; /* a trail: a picture, the jetpack's red circle, a bullet's dot */+typedef struct {+ double x, y, sx, sy, scale, alpha, fade, rot;+ int kind, pic, color, tint; /* tint: 0 none, 1 the map's, 2 the cat's (as it was) */+ float r; /* a circle's radius */+ uint8_t tr, tg, tb; /* (the cat's tint when it was made, in 32nds) */+} trail_t;+typedef struct {+ double x, y, speedx, gravity, alpha, rot;+ int type, size, delayrate, delaytimer, pic, px0, py0, pw, ph; /* type 0: a piece of the cat (pic, its part) */+ bool onground;+} particle_t;+typedef struct {+ int text;+ double x, y, alpha, fadespeed;+ int destx, fadedelay, fadedelaytimer;+ bool fading, fadein, fadeout, doublefade, faded, visible, logo;+} dtext_t;++extern mine_t mines[MAX_MINES];+extern button_t buttons[MAX_BUTTONS];+extern dirt_t dirts[MAX_DIRTS];+extern crate_t crates[MAX_CRATES];+extern shooter_t shooters[MAX_SHOOTERS];+extern bullet_t bullets[MAX_BULLETS];+extern fall_t falls[MAX_FALLS];+extern sun_t suns[MAX_SUNS];+extern sphere_t spheres[MAX_SPHERES];+extern screen_t screens[MAX_SCREENS];+extern bomb_t bombs[MAX_BOMBS];+extern trail_t trails[MAX_TRAILS];+extern particle_t particles[MAX_PARTICLES];+extern dtext_t texts[MAX_TEXTS];+extern int n_mines, n_buttons, n_dirts, n_crates, n_shooters, n_falls, n_suns, n_spheres, n_screens, n_trails,+ n_particles, n_texts;++/* the big crystal at the end (environment/BigSphere) */+typedef struct {+ bool on, finished;+ double x, y, scale;+ int frame, ftimer, timer, crystals;+} bigsphere_t;+extern bigsphere_t big;++/* the boss (entities/Boss) */+typedef struct {+ bool created, intro, invincible, defeated;+ double x, y, sx, sy, alpha;+ int id, routineid, attackid, ptimer, prate, weapon, bullettimer, maxbullets, bulletsshot, destx, desty, bulletrate,+ speed, invincibletimer, deftimer, particletimer, lineoffset;+ bool homing;+ int jit[4]; /* drawboss()'s four random offsets this frame */+} boss_t;+extern boss_t boss;+extern const int16_t boss_points[];+#define BOSS_POINTS 108++/* ---------------------------------------------------------------- the game */+extern int pdeaths, collected;+extern uint8_t crystals_got[(CN_CRYSTALS + 7) / 8];+extern int hud_deaths, hud_collected; /* (what tools/text/Info shows: it changes once a second) */+extern uint32_t game_ms; /* getTimer() */+extern bool pausegame;+extern bool exitedmap;+extern int afk_text; /* the idle message shown, or -1 */+extern uint32_t rng;+double rnd01(void); /* Math.random() */++/* keys, as the original's KeyboardManager has them */+extern bool key_left, key_right, key_up, key_down;+void key_press(int k); /* K_* */+void key_release(int k);+enum { GK_LEFT, GK_RIGHT, GK_UP, GK_DOWN, GK_JET, GK_R };++void game_new(void); /* Main.initiateGame: the menu map */+void game_step(void); /* one frame of Main.update */+void game_exit_to_menu(void); /* the pause bar's exit button (Menu.exitclick) */+bool game_can_exit(void);+void game_resume_at(int lvl, int x, int y, int rot); /* a saved game: the menu, its way right to (x, y) */++/* things env.c and game.c share */+void change_tile(int x, int y, int type, bool clear, bool persist, bool reset_node, bool set_walk);+int walk_at(int x, int y); /* grid at (x, y) walkable (out of the map: the original's error, as solid) */+void player_die(void);+void particles_create(double x, double y, int amount, int sx, int sy, int type, bool parts);+void trail_create(double x, double y, int kind, int pic, double fade, double alpha, int tint, double rot, int color,+ double r);+void shake(int power, int length);+int text_create(int text, int x, int y, double speed, bool fade, int delay);+void text_screenmessage(int first, int count, int delay);+void interp(int page, int op_override, bool next);+void env_clear(void);+void env_update(void);+void env_reset(void);+void env_slam(void);+void boss_create(void);+void boss_remove(void);+void boss_update(void);+void boss_draw_points(int *xy); /* drawboss(): the outline's points this frame (BOSS_POINTS pairs) */+int timer_add(int ms, int kind, int arg, bool repeat);+void timer_remove_kind(int kind);+enum { T_PAGE, T_LOOP, T_LASER, T_RESPAWN, T_DIRT, T_AFK };+void bigsphere_create(int x, int y);+void bigsphere_update(void);+int sphere_create(double x, double y, bool collectable);+void laser_create(int fx, int fy, int tx, int ty, int ms);+void laser_switch(int i);+void dirt_break(int i);+void map_move(int dir); /* moveLeft / moveRight / moveUp / moveDown: 0 1 2 3 */+void info_update(bool force);++/* the menu's credits and the levels' first words fade in */+extern int key_hint_frames;+#endifdiff --git a/games/catninja/src/data.c b/games/catninja/src/data.cnew file mode 100644index 00000000..eaf06fab--- /dev/null+++ b/games/catninja/src/data.c@@ -0,0 +1,4117 @@+/* Made by tools/data.py from Cat Ninja's own files (CatNinja.swf): do not edit. */+#include "data.h"+const uint32_t cn_pal[256] = {+ 0x00000000,0x08FBFCFB,0x08F3F2F2,0x08F0F0EF,0x08EFEFD5,0x08EAEAE7,0x08E3E3E3,0x08E0E0E0,+ 0x08DCDAD8,0x08CDCFCF,0x087AC7D9,0x0800EBFF,0x08BFA695,0x08A0A0A0,0x08E489BA,0x08A0948B,+ 0x08EC6AE9,0x08E76A9B,0x08D369CE,0x08C465A6,0x087592AB,0x0800A6FC,0x080088F2,0x08806D51,+ 0x080965B0,0x08DD4ED9,0x08D24ACC,0x08CB4BBE,0x08BD4BB7,0x08BD42B7,0x08B045A3,0x08C73BC3,+ 0x08B73BB1,0x08A83AA2,0x08C531A1,0x08A4319D,0x08D11A3A,0x088B406E,0x088E3089,0x0881298D,+ 0x08393748,0x0800559C,0x08004C80,0x08772097,0x08681847,0x08481162,0x081A111C,0x081F005B,+ 0x08050000,0x08000000,0x01FBFCFB,0x02FBFCFB,0x03FBFCFB,0x04FBFCFB,0x01F3F2F2,0x02F3F2F2,+ 0x01F0F0EF,0x02F0F0EF,0x03F0F0EF,0x03EFEFD5,0x01EAEAE7,0x02EAEAE7,0x04EAEAE7,0x01EBDDAF,+ 0x02EBDDAF,0x03EBDDAF,0x05EBDDAF,0x01E3E3E3,0x02E3E3E3,0x03E3E3E3,0x04E3E3E3,0x01E0E0E0,+ 0x04E0E0E0,0x06E0E0E0,0x03DCDAD8,0x05DCDAD8,0x02CDCFCF,0x03CDCFCF,0x04CDCFCF,0x05CDCFCF,+ 0x06CDCFCF,0x07CDCFCF,0x017AC7D9,0x027AC7D9,0x057AC7D9,0x067AC7D9,0x077AC7D9,0x0100EBFF,+ 0x0200EBFF,0x0300EBFF,0x01BFA695,0x05BFA695,0x06BFA695,0x07BFA695,0x01A0A0A0,0x03A0A0A0,+ 0x04A0A0A0,0x05A0A0A0,0x07A0A0A0,0x01E489BA,0x03A0948B,0x04A0948B,0x06A0948B,0x07A0948B,+ 0x01EC6AE9,0x02EC6AE9,0x03EC6AE9,0x04EC6AE9,0x05EC6AE9,0x01E76A9B,0x02E76A9B,0x03E76A9B,+ 0x06E76A9B,0x07E76A9B,0x06D369CE,0x0100A6FC,0x0200A6FC,0x0300A6FC,0x0400A6FC,0x010088F2,+ 0x020088F2,0x030088F2,0x040088F2,0x050088F2,0x060088F2,0x01806D51,0x04806D51,0x06806D51,+ 0x07806D51,0x010965B0,0x030965B0,0x040965B0,0x050965B0,0x060965B0,0x070965B0,0x01DD4ED9,+ 0x02DD4ED9,0x03DD4ED9,0x04DD4ED9,0x05DD4ED9,0x06DD4ED9,0x01D24ACC,0x02D24ACC,0x04D24ACC,+ 0x05D24ACC,0x06D24ACC,0x01CB4BBE,0x03CB4BBE,0x04CB4BBE,0x05CB4BBE,0x06CB4BBE,0x07CB4BBE,+ 0x05BD4BB7,0x06BD4BB7,0x07BD4BB7,0x02BD42B7,0x03BD42B7,0x04BD42B7,0x05BD42B7,0x06BD42B7,+ 0x07BD42B7,0x02B045A3,0x05B045A3,0x06B045A3,0x07B045A3,0x01C73BC3,0x02C73BC3,0x03C73BC3,+ 0x04C73BC3,0x05C73BC3,0x06C73BC3,0x07C73BC3,0x01B73BB1,0x02B73BB1,0x03B73BB1,0x04B73BB1,+ 0x05B73BB1,0x06B73BB1,0x07B73BB1,0x03A83AA2,0x04A83AA2,0x05A83AA2,0x06A83AA2,0x07A83AA2,+ 0x01A4319D,0x02A4319D,0x03A4319D,0x04A4319D,0x05A4319D,0x06A4319D,0x07A4319D,0x01D11A3A,+ 0x02D11A3A,0x03D11A3A,0x06D11A3A,0x058B406E,0x078B406E,0x038E3089,0x048E3089,0x058E3089,+ 0x068E3089,0x078E3089,0x0181298D,0x0381298D,0x0481298D,0x0581298D,0x0681298D,0x0781298D,+ 0x01393748,0x07393748,0x0200559C,0x0300559C,0x0500559C,0x0600559C,0x0700559C,0x06004C80,+ 0x07004C80,0x01772097,0x03681847,0x04681847,0x05681847,0x06681847,0x07681847,0x01481162,+ 0x03481162,0x04481162,0x05481162,0x06481162,0x07481162,0x011A111C,0x021A111C,0x031A111C,+ 0x041A111C,0x051A111C,0x061A111C,0x071A111C,0x02050000,0x04050000,0x06050000,0x07050000,+ 0x01000000,0x02000000,0x03000000,0x04000000,0x05000000,0x06000000,0x07000000,0,+ 0,0,0,0,0,0,0,0,+};+const uint8_t cn_tiles[7000] = {+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,15,13,+ 13,13,13,15,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,+ 15,13,13,13,13,15,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,13,13,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,+ 46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,+ 46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,+ 46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,+ 46,46,46,46,46,46,46,46,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,+ 40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,+ 40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,+ 40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,+ 40,40,40,40,40,40,40,40,40,40,40,40,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,52,50,0,0,0,52,50,0,0,50,98,96,0,0,50,98,96,0,+ 0,79,9,23,50,0,79,9,23,50,50,9,13,15,95,50,9,13,15,95,52,9,13,15,+ 128,62,9,13,15,128,81,13,15,15,23,81,13,15,15,23,81,13,15,15,23,81,13,15,+ 15,23,52,9,13,15,128,62,9,13,15,128,50,9,13,15,95,50,9,13,15,95,0,79,+ 9,23,50,0,79,9,23,50,0,50,98,96,0,0,50,98,96,0,0,0,52,50,0,0,+ 0,52,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,81,52,50,0,+ 0,0,0,0,0,0,13,9,9,79,50,0,0,0,0,0,15,15,13,9,98,52,0,0,+ 0,0,15,15,15,23,96,50,0,0,0,0,23,127,96,50,0,0,0,0,0,0,81,62,+ 50,0,0,0,0,0,0,0,13,9,9,79,50,0,0,0,0,0,15,15,13,9,98,52,+ 0,0,0,0,15,15,15,23,96,50,0,0,0,0,23,127,96,50,0,0,0,0,0,0,+ 0,0,0,0,0,0,50,96,127,23,0,0,0,0,50,96,23,15,15,15,0,0,0,0,+ 52,98,9,13,15,15,0,0,0,0,0,50,79,9,9,13,0,0,0,0,0,0,0,50,+ 62,81,0,0,0,0,0,0,50,96,127,23,0,0,0,0,50,96,23,15,15,15,0,0,+ 0,0,52,98,9,13,15,15,0,0,0,0,0,50,79,9,9,13,0,0,0,0,0,0,+ 0,50,52,81,23,9,9,9,9,9,9,12,12,44,23,9,12,12,12,12,12,12,15,44,+ 238,15,9,12,12,12,12,15,23,238,0,237,239,40,40,40,40,239,237,0,0,191,193,194,+ 36,36,194,193,191,0,0,191,193,194,36,36,194,193,191,0,0,191,193,194,36,36,194,193,+ 191,0,0,191,193,194,36,36,194,193,191,0,0,191,193,194,36,36,194,193,191,0,0,191,+ 193,194,36,36,194,193,191,0,44,44,238,0,0,0,0,0,0,0,12,15,23,237,191,191,+ 191,191,191,191,12,12,15,239,193,193,193,193,193,193,9,12,12,40,194,194,194,194,194,194,+ 9,12,12,40,36,36,36,36,36,36,9,12,12,40,36,36,36,36,36,36,9,12,12,40,+ 194,194,194,194,194,194,9,12,9,239,193,193,193,193,193,193,9,9,15,237,191,191,191,191,+ 191,191,23,23,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,238,23,23,191,191,+ 191,191,191,191,237,15,9,9,193,193,193,193,193,193,239,9,12,9,194,194,194,194,194,194,+ 40,12,12,9,36,36,36,36,36,36,40,12,12,9,36,36,36,36,36,36,40,12,12,9,+ 194,194,194,194,194,194,40,12,12,9,193,193,193,193,193,193,239,15,12,12,191,191,191,191,+ 191,191,237,23,15,12,0,0,0,0,0,0,0,238,44,44,0,191,193,194,36,36,194,193,+ 191,0,0,191,193,194,36,36,194,193,191,0,0,191,193,194,36,36,194,193,191,0,0,191,+ 193,194,36,36,194,193,191,0,0,191,193,194,36,36,194,193,191,0,0,191,193,194,36,36,+ 194,193,191,0,0,237,239,40,40,40,40,239,237,0,238,15,9,12,12,12,12,15,23,238,+ 23,9,12,12,12,12,12,12,15,44,23,9,9,9,9,9,9,12,12,44,0,191,193,194,+ 36,36,194,193,191,0,0,191,193,194,36,36,194,193,191,0,0,191,193,194,36,36,194,193,+ 191,0,0,191,193,194,36,36,194,193,191,0,0,191,193,194,36,36,194,193,191,0,0,191,+ 193,194,36,36,194,193,191,0,0,191,193,194,36,36,194,193,191,0,0,191,193,194,36,36,+ 194,193,191,0,0,191,193,194,36,36,194,193,191,0,0,191,193,194,36,36,194,193,191,0,+ 0,0,0,0,0,0,0,0,0,0,191,191,191,191,191,191,191,191,191,191,193,193,193,193,+ 193,193,193,193,193,193,194,194,194,194,194,194,194,194,194,194,36,36,36,36,36,36,36,36,+ 36,36,36,36,36,36,36,36,36,36,36,36,194,194,194,194,194,194,194,194,194,194,193,193,+ 193,193,193,193,193,193,193,193,191,191,191,191,191,191,191,191,191,191,0,0,0,0,0,0,+ 0,0,0,0,23,9,9,9,9,9,9,12,12,44,23,9,12,12,12,12,12,12,15,44,+ 238,15,9,12,12,12,12,15,23,238,0,237,238,40,40,40,40,238,243,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,44,44,238,0,0,0,0,0,0,0,12,15,23,243,0,0,+ 0,0,0,0,12,12,15,238,0,0,0,0,0,0,9,12,12,40,0,0,0,0,0,0,+ 9,12,12,40,0,0,0,0,0,0,9,12,12,40,0,0,0,0,0,0,9,12,12,40,+ 0,0,0,0,0,0,9,12,9,238,0,0,0,0,0,0,9,9,15,237,0,0,0,0,+ 0,0,23,23,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,238,23,23,0,0,+ 0,0,0,0,237,15,9,9,0,0,0,0,0,0,238,9,12,9,0,0,0,0,0,0,+ 40,12,12,9,0,0,0,0,0,0,40,12,12,9,0,0,0,0,0,0,40,12,12,9,+ 0,0,0,0,0,0,40,12,12,9,0,0,0,0,0,0,238,15,12,12,0,0,0,0,+ 0,0,243,23,15,12,0,0,0,0,0,0,0,238,44,44,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,237,238,40,40,40,40,238,243,0,238,15,9,12,12,12,12,15,23,238,+ 23,9,12,12,12,12,12,12,15,44,23,9,9,9,9,9,9,12,12,44,46,39,39,39,+ 39,39,39,39,39,46,45,25,25,25,38,39,31,25,25,45,45,31,31,31,46,49,35,31,+ 31,45,45,31,31,31,46,49,35,31,31,45,45,35,32,31,46,49,35,31,35,45,45,45,+ 46,39,46,49,45,46,45,45,45,35,44,49,49,49,48,46,38,45,45,35,35,39,46,48,+ 44,35,35,45,45,35,35,35,39,44,35,35,35,45,46,45,45,45,45,45,45,45,45,46,+ 46,45,45,45,45,45,45,45,45,46,45,35,35,35,45,35,31,31,25,39,45,35,35,44,+ 46,32,31,31,25,39,45,35,39,49,39,31,31,31,25,39,45,39,46,49,46,46,46,46,+ 38,39,45,44,48,49,49,49,49,49,39,39,45,35,44,48,45,35,35,35,31,39,45,35,+ 35,46,46,31,31,31,25,39,45,35,35,38,45,35,31,31,25,39,46,45,45,45,45,45,+ 45,45,45,46,46,45,45,45,45,45,45,45,45,46,39,25,31,31,35,45,38,35,35,45,+ 39,25,31,31,31,46,46,35,35,45,39,31,35,35,35,45,48,44,35,45,39,39,49,49,+ 49,49,49,48,44,45,39,38,46,46,46,46,49,46,39,45,39,25,31,31,31,39,49,39,+ 35,45,39,25,31,31,32,46,44,35,35,45,39,25,31,31,35,45,35,35,35,45,46,45,+ 45,45,45,45,45,45,45,46,46,45,45,45,45,45,45,45,45,46,45,35,35,35,39,44,+ 35,35,35,45,45,35,35,39,46,48,44,35,35,45,45,35,44,49,49,49,48,46,38,45,+ 45,45,46,39,46,49,45,46,45,45,45,35,32,31,46,49,35,31,35,45,45,31,31,31,+ 46,49,35,31,31,45,45,31,31,31,46,49,35,31,31,45,45,25,25,25,38,39,31,25,+ 25,45,46,39,39,39,39,39,39,39,39,46,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,23,44,44,+ 44,44,44,44,44,46,44,36,36,36,36,36,36,36,36,46,44,46,0,0,0,0,0,0,+ 0,0,36,23,0,0,0,0,0,0,0,0,36,44,0,0,0,0,0,0,0,0,36,44,+ 0,0,0,0,0,0,0,0,36,44,0,0,0,0,0,0,0,0,36,44,0,0,0,0,+ 0,0,0,0,36,44,0,0,0,0,0,0,0,0,36,44,0,0,0,0,0,0,0,0,+ 36,44,0,0,0,0,0,0,0,0,46,46,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,46,46,0,0,0,0,0,0,0,0,44,36,0,0,0,0,0,0,0,0,+ 44,36,0,0,0,0,0,0,0,0,44,36,0,0,0,0,0,0,0,0,44,36,0,0,+ 0,0,0,0,0,0,44,36,0,0,0,0,0,0,0,0,44,36,0,0,0,0,0,0,+ 0,0,44,36,0,0,0,0,0,0,0,0,23,36,0,0,0,0,0,0,0,0,46,44,+ 44,36,36,36,36,36,36,36,36,46,46,23,44,44,44,44,44,44,44,46,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,15,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,15,13,13,13,13,15,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,15,13,13,13,13,13,13,15,13,13,15,13,13,13,13,13,13,13,13,13,15,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,15,13,13,13,13,13,13,+ 13,13,13,13,13,13,15,13,13,13,13,15,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,13,13,13,13,13,13,15,13,13,13,13,13,13,15,13,13,13,13,13,13,13,13,+ 13,15,13,13,13,13,13,13,13,13,13,15,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,13,13,13,13,13,13,13,13,15,13,13,13,13,15,13,13,13,13,13,13,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,15,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,13,13,13,13,15,13,13,13,13,13,13,15,15,15,15,15,15,13,13,13,13,13,+ 13,15,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,15,13,13,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,15,13,13,13,13,15,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,46,23,23,23,+ 23,23,23,23,23,46,23,12,12,12,12,12,12,12,12,23,23,12,12,23,40,23,12,12,+ 12,23,23,12,40,23,12,23,40,12,12,23,23,23,23,12,12,12,23,23,12,23,23,23,+ 12,12,12,12,23,40,23,23,23,12,12,12,12,12,23,46,23,23,23,12,12,12,12,12,+ 12,40,12,23,23,12,12,12,12,12,12,12,12,23,46,23,23,23,23,23,23,23,23,46,+ 46,23,23,23,23,23,23,23,23,46,23,12,12,12,23,23,12,12,12,23,23,12,12,12,+ 12,23,40,12,12,23,23,12,12,12,12,12,23,23,12,23,23,12,12,12,12,12,12,40,+ 12,23,23,12,12,12,12,12,23,23,12,23,23,12,12,23,23,23,40,12,12,23,23,12,+ 40,46,40,23,12,12,12,23,23,12,12,23,23,12,12,12,12,23,46,23,23,23,23,23,+ 23,23,23,46,46,23,23,23,23,23,23,23,23,46,23,12,12,12,12,23,23,12,12,23,+ 23,12,12,12,23,40,46,40,12,23,23,12,12,40,23,23,23,12,12,23,23,12,23,23,+ 12,12,12,12,12,23,23,12,40,12,12,12,12,12,12,23,23,12,23,23,12,12,12,12,+ 12,23,23,12,12,40,23,12,12,12,12,23,23,12,12,12,23,23,12,12,12,23,46,23,+ 23,23,23,23,23,23,23,46,46,23,23,23,23,23,23,23,23,46,23,12,12,12,12,12,+ 12,12,12,23,23,12,12,12,12,12,12,40,12,23,23,12,12,12,12,12,23,46,23,23,+ 23,23,12,12,12,12,23,40,23,23,23,23,23,12,12,12,23,23,12,23,23,12,40,23,+ 12,23,40,12,12,23,23,12,12,23,40,23,12,12,12,23,23,12,12,12,12,12,12,12,+ 12,23,46,23,23,23,23,23,23,23,23,46,0,245,44,44,44,44,44,44,245,0,245,36,+ 36,37,37,37,37,36,36,245,44,36,15,13,13,13,13,13,36,44,44,36,13,13,13,13,+ 13,13,36,44,44,36,13,13,13,13,13,13,36,44,44,36,15,13,13,13,13,13,36,44,+ 44,36,15,13,13,13,13,13,36,44,44,36,15,13,15,15,13,15,36,44,245,36,36,44,+ 37,37,44,36,36,245,0,245,44,44,44,44,44,44,49,0,81,52,50,0,0,0,0,0,+ 0,0,13,9,9,79,50,0,0,0,0,0,15,15,13,9,98,52,0,0,0,0,15,15,+ 15,23,96,50,0,0,0,0,23,127,96,50,0,0,0,52,50,0,0,0,0,0,0,0,+ 50,98,96,0,0,0,0,0,0,0,79,9,23,50,0,0,0,0,0,50,9,13,15,95,+ 0,0,0,0,0,62,9,13,15,128,0,0,0,0,0,81,13,15,15,23,0,0,0,0,+ 0,23,15,15,13,81,0,0,0,0,0,128,15,13,9,52,0,0,0,0,0,95,15,13,+ 9,50,0,0,0,0,0,50,23,9,79,0,0,0,0,0,0,0,96,98,50,0,81,62,+ 50,0,0,0,50,52,0,0,13,9,9,79,50,0,0,0,0,0,15,15,13,9,98,52,+ 0,0,0,0,15,15,15,23,96,50,0,0,0,0,23,127,96,50,0,0,0,0,0,0,+ 0,0,0,0,0,0,50,96,127,23,0,0,0,0,50,96,23,15,15,15,0,0,0,0,+ 52,98,9,13,15,15,0,0,0,0,0,50,79,9,9,13,0,0,52,50,0,0,0,50,+ 62,81,0,50,98,96,0,0,0,0,0,0,0,79,9,23,50,0,0,0,0,0,50,9,+ 13,15,95,0,0,0,0,0,52,9,13,15,128,0,0,0,0,0,81,13,15,15,23,0,+ 0,0,0,0,0,0,0,0,0,81,13,15,15,23,0,0,0,0,0,62,9,13,15,128,+ 0,0,0,0,0,50,9,13,15,95,0,0,0,0,0,0,79,9,23,50,0,0,0,0,+ 0,0,50,98,96,0,23,127,96,50,0,0,0,52,50,0,15,15,15,23,96,50,0,0,+ 0,0,15,15,13,9,98,52,0,0,0,0,13,9,9,79,50,0,0,0,0,0,81,52,+ 50,0,0,0,0,0,0,0,13,13,13,13,13,13,13,13,13,80,13,13,13,13,13,13,+ 13,13,80,0,13,13,15,13,13,13,13,80,0,0,13,13,13,13,13,13,80,0,0,0,+ 13,13,13,13,13,80,0,0,0,0,13,13,13,13,80,0,0,0,0,0,13,13,13,80,+ 0,0,0,0,0,0,13,13,80,0,0,0,0,0,0,0,13,80,0,0,0,0,0,0,+ 0,0,80,0,0,0,0,0,0,0,0,0,80,13,13,13,13,13,13,13,13,13,0,80,+ 13,13,13,13,13,13,13,13,0,0,80,13,13,13,13,15,13,13,0,0,0,80,13,13,+ 13,13,13,13,0,0,0,0,80,13,13,13,13,13,0,0,0,0,0,80,13,13,13,13,+ 0,0,0,0,0,0,80,13,13,13,0,0,0,0,0,0,0,80,13,13,0,0,0,0,+ 0,0,0,0,80,13,0,0,0,0,0,0,0,0,0,80,80,0,0,0,0,0,0,0,+ 0,0,13,80,0,0,0,0,0,0,0,0,13,13,80,0,0,0,0,0,0,0,13,13,+ 13,80,0,0,0,0,0,0,13,13,13,13,80,0,0,0,0,0,13,13,13,13,13,80,+ 0,0,0,0,13,13,13,13,13,13,80,0,0,0,13,13,15,13,13,13,13,80,0,0,+ 13,13,13,13,13,13,13,13,80,0,13,13,13,13,13,13,13,13,13,80,0,0,0,0,+ 0,0,0,0,0,80,0,0,0,0,0,0,0,0,80,13,0,0,0,0,0,0,0,80,+ 13,13,0,0,0,0,0,0,80,13,13,13,0,0,0,0,0,80,13,13,13,13,0,0,+ 0,0,80,13,13,13,13,13,0,0,0,80,13,13,13,13,13,13,0,0,80,13,13,13,+ 13,15,13,13,0,80,13,13,13,13,13,13,13,13,80,13,13,13,13,13,13,13,13,13,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,53,53,53,53,53,53,53,53,0,73,8,7,8,8,7,7,7,7,73,13,9,+ 20,23,23,23,23,20,8,13,23,23,23,23,20,20,20,20,23,23,127,23,23,23,23,23,+ 23,23,23,127,127,23,13,73,0,0,0,0,0,0,23,23,9,8,53,0,0,0,0,0,+ 23,23,20,7,53,0,0,0,0,0,23,23,23,8,53,0,0,0,0,0,23,20,23,8,+ 53,0,0,0,0,0,23,20,23,7,53,0,0,0,0,0,23,20,23,7,53,0,0,0,+ 0,0,23,20,20,7,53,0,0,0,0,0,23,23,8,7,53,0,0,0,0,0,127,23,+ 13,73,0,0,0,0,0,0,0,0,0,0,0,0,73,13,23,127,0,0,0,0,0,53,+ 7,8,23,23,0,0,0,0,0,53,7,20,20,23,0,0,0,0,0,53,7,23,20,23,+ 0,0,0,0,0,53,7,23,20,23,0,0,0,0,0,53,8,23,20,23,0,0,0,0,+ 0,53,8,23,23,23,0,0,0,0,0,53,7,20,23,23,0,0,0,0,0,53,8,9,+ 23,23,0,0,0,0,0,0,73,13,23,127,127,23,23,23,23,23,23,23,23,127,23,23,+ 23,23,20,20,20,20,23,23,13,9,20,23,23,23,23,20,8,13,73,8,7,8,8,7,+ 7,7,7,73,0,53,53,53,53,53,53,53,53,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,68,68,68,68,68,57,61,+ 57,61,69,69,69,69,69,69,69,69,69,69,78,72,78,72,72,72,72,72,72,72,84,79,+ 84,79,79,79,79,79,79,79,85,85,85,85,85,85,85,84,84,84,86,85,85,85,85,85,+ 85,85,85,85,86,86,86,86,86,86,86,86,86,86,10,10,10,10,10,10,10,10,10,10,+ 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,86,+ 86,85,84,78,69,57,10,10,10,86,85,85,79,78,69,68,10,10,10,86,85,85,84,78,+ 69,68,10,10,10,86,85,85,79,72,69,68,10,10,10,86,85,85,79,72,69,68,10,10,+ 10,86,85,85,79,72,69,68,10,10,10,86,85,85,79,72,69,57,10,10,10,86,85,84,+ 79,72,69,61,10,10,10,86,85,84,79,72,69,57,10,10,10,86,85,84,79,72,69,61,+ 61,69,72,79,84,85,86,10,10,10,57,69,72,79,84,85,86,10,10,10,61,69,72,79,+ 84,85,86,10,10,10,57,69,72,79,85,85,86,10,10,10,68,69,72,79,85,85,86,10,+ 10,10,68,69,72,79,85,85,86,10,10,10,68,69,72,79,85,85,86,10,10,10,68,69,+ 78,84,85,85,86,10,10,10,68,69,78,79,85,85,86,10,10,10,57,69,78,84,85,86,+ 86,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,+ 10,10,10,10,10,10,10,10,10,10,86,86,86,86,86,86,86,86,86,86,86,85,85,85,+ 85,85,85,85,85,85,85,85,85,85,85,85,85,84,84,84,84,79,84,79,79,79,79,79,+ 79,79,78,72,78,72,72,72,72,72,72,72,69,69,69,69,69,69,69,69,69,69,57,68,+ 68,68,68,68,57,61,57,61,0,241,40,23,23,23,23,40,241,0,0,40,8,1,1,1,+ 1,8,40,0,243,13,1,2,23,23,2,1,13,243,243,6,1,40,241,241,40,1,6,243,+ 243,6,1,243,0,0,243,1,6,243,243,14,14,243,0,0,243,14,14,243,243,36,36,243,+ 0,0,243,36,36,243,243,44,44,243,0,0,243,44,44,243,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,243,243,243,243,243,0,0,0,0,+ 44,36,14,6,6,13,40,241,0,0,44,36,14,1,1,1,8,40,0,0,243,243,243,243,+ 40,2,1,23,0,0,0,0,0,0,241,23,1,23,0,0,0,0,0,0,241,23,1,23,+ 0,0,243,243,243,243,40,2,1,23,0,0,44,36,14,1,1,1,8,40,0,0,44,36,+ 14,6,6,13,40,241,0,0,243,243,243,243,243,243,0,0,0,0,243,243,243,243,243,243,+ 0,0,241,40,13,6,6,14,36,44,0,0,40,8,1,1,1,14,36,44,0,0,23,1,+ 2,40,243,243,243,243,0,0,23,1,23,241,0,0,0,0,0,0,23,1,23,241,0,0,+ 0,0,0,0,23,1,2,40,243,243,243,243,0,0,40,8,1,1,1,14,36,44,0,0,+ 241,40,13,6,6,14,36,44,0,0,0,0,243,243,243,243,243,243,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,44,44,243,0,0,243,44,+ 44,243,243,36,36,243,0,0,243,36,36,243,243,14,14,243,0,0,243,14,14,243,243,6,+ 1,243,0,0,243,1,6,243,243,6,1,40,241,241,40,1,6,243,243,13,1,2,23,23,+ 2,1,13,243,0,40,8,1,1,1,1,8,40,0,0,241,40,23,23,23,23,40,241,0,+ 0,94,100,102,23,23,102,100,94,0,0,125,100,102,23,23,102,100,125,0,0,125,100,102,+ 23,23,102,100,125,0,0,125,100,102,23,23,102,100,125,0,0,125,100,102,23,23,102,100,+ 125,0,0,125,100,102,23,23,102,100,125,0,0,125,100,102,23,23,102,100,125,0,0,125,+ 100,102,23,23,102,100,125,0,0,125,100,102,23,23,102,100,125,0,0,94,100,102,23,23,+ 102,100,94,0,0,115,121,124,22,22,124,121,115,0,0,119,121,124,22,22,124,121,119,0,+ 0,119,121,124,22,22,124,121,119,0,0,119,121,124,22,22,124,121,119,0,0,119,121,124,+ 22,22,124,121,119,0,0,119,121,124,22,22,124,121,119,0,0,119,117,124,22,22,124,117,+ 119,0,0,119,117,124,22,22,124,117,119,0,0,119,117,124,22,22,124,117,119,0,0,115,+ 121,124,22,22,124,121,115,0,0,245,42,42,42,42,42,42,245,0,245,24,22,22,22,22,+ 22,22,24,245,42,21,22,24,22,24,22,22,21,42,42,22,24,22,24,22,24,22,22,42,+ 42,21,22,24,22,24,22,24,21,42,42,22,24,22,24,22,24,22,22,42,42,21,22,24,+ 22,24,22,24,21,42,42,21,21,21,24,21,24,21,21,42,245,24,22,22,21,21,22,22,+ 24,245,0,245,42,42,42,42,42,42,49,0,0,245,44,44,44,45,45,45,245,0,245,37,+ 34,34,35,32,43,32,43,245,44,34,34,43,32,43,32,43,24,42,44,32,43,32,43,32,+ 43,24,24,42,45,32,32,43,43,24,24,24,22,42,45,32,43,43,24,24,24,24,24,42,+ 45,24,24,24,24,24,24,24,11,42,42,24,24,22,24,22,24,11,11,42,245,41,24,22,+ 11,11,11,11,24,245,0,245,42,42,42,42,42,42,49,0,13,13,13,13,13,13,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,15,13,13,13,13,15,13,13,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,15,13,13,13,13,15,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,0,0,0,128,+ 40,40,40,128,0,0,0,0,0,128,40,40,40,128,0,0,0,0,0,209,40,40,40,209,+ 0,0,0,0,0,128,40,40,40,128,0,0,0,0,0,128,40,40,40,128,0,0,0,0,+ 0,128,40,40,40,128,0,0,0,0,0,209,40,40,40,209,0,0,0,0,0,128,40,40,+ 40,128,0,0,0,0,0,128,40,40,40,128,0,0,0,0,0,209,40,40,40,209,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,50,0,0,0,59,+ 50,0,0,52,17,195,191,0,110,37,92,63,0,112,36,37,192,191,194,36,19,65,60,12,+ 15,23,101,90,23,37,37,101,52,9,15,15,128,70,12,23,15,128,81,13,15,15,23,81,+ 13,15,15,23,81,13,15,15,23,81,13,15,15,23,52,9,15,15,128,70,12,23,15,128,+ 60,12,15,23,101,90,23,37,37,101,0,112,36,37,192,191,194,36,19,65,0,52,17,195,+ 191,0,110,37,92,63,0,0,58,50,0,0,0,59,50,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,81,52,60,0,0,0,0,0,0,0,13,9,12,112,52,0,+ 0,0,0,0,15,15,15,36,17,58,0,0,0,0,15,15,23,37,195,50,0,0,0,0,+ 23,128,126,192,191,0,0,0,0,0,81,70,90,191,0,0,0,0,0,0,13,12,23,194,+ 110,0,0,0,0,0,15,23,37,36,37,59,0,0,0,0,15,15,37,19,92,50,0,0,+ 0,0,23,128,101,65,63,0,0,0,0,0,0,0,0,0,0,63,65,101,128,23,0,0,+ 0,0,50,92,19,37,15,15,0,0,0,0,59,37,36,37,23,15,0,0,0,0,0,110,+ 194,23,12,13,0,0,0,0,0,0,191,90,70,81,0,0,0,0,0,191,192,126,128,23,+ 0,0,0,0,50,195,37,23,15,15,0,0,0,0,58,17,36,15,15,15,0,0,0,0,+ 0,52,112,12,9,13,0,0,0,0,0,0,0,60,52,81,6,6,6,6,6,6,6,6,+ 6,6,6,2,3,2,3,3,2,3,2,6,6,3,6,5,5,5,5,6,3,6,6,2,+ 5,3,3,3,3,5,2,6,6,3,5,3,2,2,3,5,3,6,6,3,5,3,2,2,+ 3,5,3,6,6,2,5,3,3,3,3,5,2,6,6,3,6,5,5,5,5,6,3,6,+ 6,2,3,2,3,3,2,3,2,6,6,6,6,6,6,6,6,6,6,6,9,8,8,8,+ 8,8,8,8,8,9,8,5,6,5,5,6,5,6,6,8,8,6,5,5,6,5,6,6,+ 6,8,8,5,5,6,5,6,6,6,6,8,8,5,6,5,6,6,6,6,6,8,8,6,+ 5,6,6,6,6,6,6,8,8,5,6,6,6,6,6,6,6,8,8,6,6,6,6,6,+ 6,6,6,8,8,6,6,6,6,6,6,6,6,8,9,8,8,8,8,8,8,8,8,9,+ 46,23,23,23,23,23,23,23,23,46,23,12,12,12,23,23,12,12,12,23,23,12,12,23,+ 46,48,23,12,12,23,23,12,40,49,49,49,48,46,23,23,23,23,46,23,46,49,23,46,+ 23,23,23,23,12,12,46,49,23,12,23,23,23,12,12,12,46,49,23,12,12,23,23,12,+ 12,12,46,49,23,12,12,23,23,12,12,12,23,23,12,12,12,23,46,23,23,23,23,23,+ 23,23,23,46,46,23,23,23,23,23,23,23,23,46,23,12,12,12,23,23,23,12,12,23,+ 23,12,12,12,12,46,46,12,12,23,23,12,23,23,23,23,48,23,12,23,23,23,49,49,+ 49,49,49,48,23,23,23,23,46,46,46,46,49,46,23,23,23,12,12,12,12,23,49,23,+ 12,23,23,12,12,12,12,46,40,12,12,23,23,12,12,12,23,23,12,12,12,23,46,23,+ 23,23,23,23,23,23,23,46,46,23,23,23,23,23,23,23,23,46,23,12,12,12,23,23,+ 12,12,12,23,23,12,12,40,46,12,12,12,12,23,23,12,23,49,23,12,12,12,12,23,+ 23,23,46,49,46,46,46,46,23,23,23,23,48,49,49,49,49,49,23,23,23,12,23,48,+ 23,23,23,23,12,23,23,12,12,46,46,12,12,12,12,23,23,12,12,23,23,23,12,12,+ 12,23,46,23,23,23,23,23,23,23,23,46,46,23,23,23,23,23,23,23,23,46,23,12,+ 12,12,23,23,12,12,12,23,23,12,12,12,46,49,23,12,12,23,23,12,12,12,46,49,+ 23,12,12,23,23,23,12,12,46,49,23,12,23,23,23,23,46,23,46,49,23,46,23,23,+ 23,12,40,49,49,49,48,46,23,23,23,12,12,23,46,48,23,12,12,23,23,12,12,12,+ 23,23,12,12,12,23,46,23,23,23,23,23,23,23,23,46,+};+const uint8_t cn_fg_tile[92] = {+ 255,0,3,1,2,4,5,6,255,255,7,8,9,10,11,12,255,255,255,255,13,14,15,+ 16,17,18,19,20,21,22,23,24,255,255,255,255,25,26,27,28,29,30,31,32,33,255,+ 255,34,35,36,37,255,255,255,255,38,39,40,41,42,43,44,45,46,47,48,49,255,255,+ 255,255,255,255,255,255,50,51,52,53,54,55,255,56,57,255,255,255,255,255,58,59,255,+};+const uint8_t cn_blood_tile[92] = {+ 255,255,60,255,255,61,62,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,+};+const uint8_t cn_grid_tile[92] = {+ 64,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,+ 255,255,255,255,255,255,255,255,255,65,255,255,255,255,255,255,255,255,255,255,255,255,255,+ 255,255,255,255,255,66,67,68,69,255,255,255,255,255,255,255,255,255,255,255,255,255,255,+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,+};+const cn_sprite_t cn_sprites[SPR_COUNT] = {+ {12, 10, 0}, /* cat_idle */+ {12, 10, 120}, /* cat_idle2 */+ {12, 10, 240}, /* cat_walk1 */+ {12, 10, 360}, /* cat_walk2 */+ {12, 10, 480}, /* cat_jump */+ {12, 10, 600}, /* cat_wallslide */+ {12, 10, 720}, /* cat_duck */+ {12, 10, 840}, /* cat_roll */+ {7, 10, 960}, /* jetpackaddon */+ {10, 10, 1030}, /* mineblinkoff_0 */+ {10, 10, 1130}, /* mineblinkon_0 */+ {10, 10, 1230}, /* mineoff_0 */+ {10, 10, 1330}, /* mineblinkoff_1 */+ {10, 10, 1430}, /* mineblinkon_1 */+ {10, 10, 1530}, /* mineoff_1 */+ {10, 10, 1630}, /* mineblinkoff_2 */+ {10, 10, 1730}, /* mineblinkon_2 */+ {10, 10, 1830}, /* mineoff_2 */+ {10, 10, 1930}, /* mineblinkoff_3 */+ {10, 10, 2030}, /* mineblinkon_3 */+ {10, 10, 2130}, /* mineoff_3 */+ {10, 10, 2230}, /* button_0 */+ {10, 10, 2330}, /* button_1 */+ {10, 10, 2430}, /* button_2 */+ {10, 10, 2530}, /* button_3 */+ {10, 10, 2630}, /* dirt_0 */+ {10, 10, 2730}, /* dirt_1 */+ {10, 10, 2830}, /* dirt_2 */+ {10, 10, 2930}, /* crate */+ {10, 10, 3030}, /* shield_0_0 */+ {10, 10, 3130}, /* shield_0_1 */+ {10, 10, 3230}, /* shield_0_2 */+ {10, 10, 3330}, /* shield_0_3 */+ {10, 10, 3430}, /* shield_1_0 */+ {10, 10, 3530}, /* shield_1_1 */+ {10, 10, 3630}, /* shield_1_2 */+ {10, 10, 3730}, /* shield_1_3 */+ {10, 10, 3830}, /* shield_2_0 */+ {10, 10, 3930}, /* shield_2_1 */+ {10, 10, 4030}, /* shield_2_2 */+ {10, 10, 4130}, /* shield_2_3 */+ {10, 10, 4230}, /* shield_3_0 */+ {10, 10, 4330}, /* shield_3_1 */+ {10, 10, 4430}, /* shield_3_2 */+ {10, 10, 4530}, /* shield_3_3 */+ {10, 10, 4630}, /* homing_0_0 */+ {10, 10, 4730}, /* homing_0_1 */+ {10, 10, 4830}, /* homing_0_2 */+ {10, 10, 4930}, /* homing_0_3 */+ {10, 10, 5030}, /* homing_1_0 */+ {10, 10, 5130}, /* homing_1_1 */+ {10, 10, 5230}, /* homing_1_2 */+ {10, 10, 5330}, /* homing_1_3 */+ {10, 10, 5430}, /* homing_2_0 */+ {10, 10, 5530}, /* homing_2_1 */+ {10, 10, 5630}, /* homing_2_2 */+ {10, 10, 5730}, /* homing_2_3 */+ {10, 10, 5830}, /* homing_3_0 */+ {10, 10, 5930}, /* homing_3_1 */+ {10, 10, 6030}, /* homing_3_2 */+ {10, 10, 6130}, /* homing_3_3 */+ {10, 10, 6230}, /* fallspike_0 */+ {10, 10, 6330}, /* fallspike_1 */+ {10, 10, 6430}, /* fallspike_2 */+ {10, 10, 6530}, /* fallspike_3 */+ {10, 10, 6630}, /* sunspike */+ {10, 10, 6730}, /* bomb */+ {10, 10, 6830}, /* sphere_0 */+ {10, 10, 6930}, /* sphere_1 */+ {10, 10, 7030}, /* sphere_2 */+ {10, 10, 7130}, /* sphere_3 */+ {10, 10, 7230}, /* sphere_4 */+ {10, 10, 7330}, /* sphere_5 */+ {10, 10, 7430}, /* sphere_6 */+ {10, 10, 7530}, /* sphere_7 */+ {10, 10, 7630}, /* sphere_8 */+ {10, 10, 7730}, /* sphere_9 */+ {10, 10, 7830}, /* sphere_10 */+ {42, 41, 7930}, /* bigsphere_0 */+ {42, 41, 9652}, /* bigsphere_1 */+ {42, 41, 11374}, /* bigsphere_2 */+ {42, 41, 13096}, /* bigsphere_3 */+ {42, 41, 14818}, /* bigsphere_4 */+ {42, 41, 16540}, /* bigsphere_5 */+ {96, 48, 18262}, /* tv */+ {192, 52, 22870}, /* trackmill */+};+const uint8_t cn_sprite_px[32854] = {+ 0,0,234,47,241,0,0,0,0,234,47,241,0,0,47,45,243,0,0,0,0,47,45,243,+ 0,0,47,43,45,45,45,45,45,45,45,243,0,0,47,43,43,45,45,43,43,45,45,243,+ 0,0,47,43,43,45,49,43,43,49,45,243,0,0,47,43,43,43,43,43,43,43,43,243,+ 234,46,47,43,43,43,43,43,43,43,43,243,46,43,47,43,43,43,43,43,43,43,43,243,+ 241,243,234,47,45,45,45,45,45,45,45,236,0,0,0,46,47,46,0,243,45,45,243,0,+ 0,0,241,243,0,0,0,0,0,241,243,0,0,0,47,45,243,0,0,0,0,47,45,243,+ 0,0,47,45,245,243,243,243,243,46,46,243,0,0,47,43,43,43,43,43,43,43,43,243,+ 0,0,47,43,43,45,49,43,43,49,45,243,0,0,47,43,43,45,45,43,43,45,45,243,+ 234,46,47,43,43,43,43,43,43,43,43,243,46,43,47,43,43,43,43,43,43,43,43,243,+ 241,243,234,47,45,45,45,45,45,45,45,236,0,0,0,46,47,46,0,243,45,45,243,0,+ 0,0,234,47,241,0,0,0,0,234,47,241,0,0,47,45,243,0,0,0,0,47,45,243,+ 0,0,47,43,45,45,45,45,45,45,45,243,0,0,47,43,43,45,45,43,43,45,45,243,+ 0,0,47,43,43,45,49,43,43,49,45,243,234,46,47,43,43,43,43,43,43,43,43,243,+ 46,43,47,43,43,43,43,43,43,43,43,243,241,243,47,43,43,43,43,43,43,43,43,243,+ 0,0,234,47,45,45,45,45,45,45,45,236,0,0,0,243,243,243,0,243,45,45,243,0,+ 0,0,234,47,241,0,0,0,0,234,47,241,0,0,47,45,243,0,0,0,0,47,45,243,+ 0,0,47,45,45,45,45,45,45,45,45,243,0,0,47,43,43,45,45,43,43,45,45,243,+ 0,0,47,43,43,45,49,43,43,49,45,243,234,46,47,43,43,43,43,43,43,43,43,243,+ 46,43,47,43,43,43,43,43,43,43,43,243,241,243,47,43,43,43,43,43,43,43,43,243,+ 0,0,234,47,45,45,45,45,45,45,45,236,0,0,0,46,47,46,0,241,243,243,241,0,+ 0,0,234,47,241,0,0,0,0,234,47,241,0,0,47,45,245,243,243,243,243,46,46,243,+ 0,0,47,43,43,43,43,43,43,43,43,243,0,0,47,43,43,45,45,43,43,45,45,243,+ 0,0,47,43,43,45,49,43,43,49,45,243,0,0,47,43,43,43,43,43,43,43,43,243,+ 241,46,47,43,43,43,43,43,43,43,43,243,243,45,47,43,43,43,43,43,43,43,43,243,+ 0,243,47,43,43,43,43,43,43,43,43,243,0,0,241,49,49,49,243,245,49,49,245,0,+ 234,47,241,0,0,0,0,234,47,241,0,0,46,46,245,243,243,243,243,47,45,243,0,0,+ 45,43,43,43,43,43,43,43,43,243,0,0,45,45,45,43,45,45,43,43,43,243,0,0,+ 45,49,45,43,45,49,43,43,43,245,243,241,45,43,43,43,43,43,43,43,43,46,45,243,+ 45,43,43,43,43,43,43,43,43,46,46,241,45,43,43,43,43,43,43,43,43,243,0,0,+ 236,46,47,46,243,245,49,49,245,0,0,0,0,46,47,46,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,241,243,0,0,0,0,0,241,243,0,0,0,47,45,243,0,0,0,0,47,45,243,+ 0,0,47,43,45,45,45,45,45,45,45,243,234,46,47,43,43,45,49,43,43,49,45,243,+ 46,45,47,43,43,45,45,43,43,45,45,243,0,0,234,47,45,45,45,45,45,45,45,236,+ 0,0,0,120,121,131,131,121,82,0,0,0,0,82,213,42,215,132,132,132,212,122,0,0,+ 82,132,216,41,216,215,215,215,216,42,131,0,131,132,216,41,24,24,24,24,24,24,42,82,+ 132,132,216,41,24,42,42,24,41,42,42,116,132,213,216,41,24,24,41,24,24,41,41,117,+ 213,41,42,41,24,24,24,24,24,24,41,115,83,216,42,41,41,24,41,41,41,41,133,0,+ 0,120,132,42,42,42,213,216,42,215,82,0,0,0,82,121,132,212,132,131,120,0,0,0,+ 51,13,13,79,13,13,53,98,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,+ 13,15,13,13,15,13,13,13,15,13,13,15,13,13,15,96,23,23,128,23,23,78,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,53,53,53,17,17,53,53,53,0,53,13,13,15,15,15,15,13,+ 13,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,109,109,0,0,0,0,+ 99,110,110,111,111,111,111,110,110,99,110,112,112,113,36,36,113,112,112,110,66,12,15,15,+ 15,15,15,15,12,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53,53,53,23,23,53,53,53,0,+ 53,13,13,15,15,15,15,13,13,53,53,13,13,15,15,15,15,13,13,53,0,53,53,53,+ 17,17,53,53,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,66,12,15,15,15,15,15,15,12,66,+ 110,112,112,113,36,36,113,112,112,110,99,110,110,111,111,111,111,110,110,99,0,0,0,0,+ 109,109,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53,13,13,15,15,15,+ 15,13,13,53,0,53,53,53,23,23,53,53,53,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,53,0,0,0,0,0,0,0,0,53,13,0,0,0,0,0,0,+ 0,0,53,13,0,0,0,0,0,0,0,0,53,15,0,0,0,0,0,0,0,0,17,15,+ 0,0,0,0,0,0,0,0,17,15,0,0,0,0,0,0,0,0,53,15,0,0,0,0,+ 0,0,0,0,53,13,0,0,0,0,0,0,0,0,53,13,0,0,0,0,0,0,0,0,+ 0,53,0,0,0,0,0,0,0,99,110,66,0,0,0,0,0,0,0,110,112,12,0,0,+ 0,0,0,0,0,110,112,15,0,0,0,0,0,0,0,111,113,15,0,0,0,0,0,0,+ 109,111,36,15,0,0,0,0,0,0,109,111,36,15,0,0,0,0,0,0,0,111,113,15,+ 0,0,0,0,0,0,0,110,112,15,0,0,0,0,0,0,0,110,112,12,0,0,0,0,+ 0,0,0,99,110,66,0,0,0,0,0,0,0,0,0,53,0,0,0,0,0,0,0,0,+ 53,13,0,0,0,0,0,0,0,0,53,13,0,0,0,0,0,0,0,0,53,15,0,0,+ 0,0,0,0,0,0,23,15,0,0,0,0,0,0,0,0,23,15,0,0,0,0,0,0,+ 0,0,53,15,0,0,0,0,0,0,0,0,53,13,0,0,0,0,0,0,0,0,53,13,+ 0,0,0,0,0,0,0,0,0,53,53,0,0,0,0,0,0,0,0,0,13,53,0,0,+ 0,0,0,0,0,0,13,53,0,0,0,0,0,0,0,0,15,53,0,0,0,0,0,0,+ 0,0,15,17,0,0,0,0,0,0,0,0,15,17,0,0,0,0,0,0,0,0,15,53,+ 0,0,0,0,0,0,0,0,13,53,0,0,0,0,0,0,0,0,13,53,0,0,0,0,+ 0,0,0,0,53,0,0,0,0,0,0,0,0,0,66,110,99,0,0,0,0,0,0,0,+ 12,112,110,0,0,0,0,0,0,0,15,112,110,0,0,0,0,0,0,0,15,113,111,0,+ 0,0,0,0,0,0,15,36,111,109,0,0,0,0,0,0,15,36,111,109,0,0,0,0,+ 0,0,15,113,111,0,0,0,0,0,0,0,15,112,110,0,0,0,0,0,0,0,12,112,+ 110,0,0,0,0,0,0,0,66,110,99,0,0,0,0,0,0,0,53,0,0,0,0,0,+ 0,0,0,0,13,53,0,0,0,0,0,0,0,0,13,53,0,0,0,0,0,0,0,0,+ 15,53,0,0,0,0,0,0,0,0,15,23,0,0,0,0,0,0,0,0,15,23,0,0,+ 0,0,0,0,0,0,15,53,0,0,0,0,0,0,0,0,13,53,0,0,0,0,0,0,+ 0,0,13,53,0,0,0,0,0,0,0,0,53,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,44,44,44,44,+ 44,44,44,46,44,36,17,17,17,36,36,36,36,44,44,17,17,17,36,36,36,36,36,46,+ 44,17,36,36,36,36,36,36,36,46,44,17,36,36,36,36,36,36,36,46,44,36,36,36,+ 36,36,36,36,36,46,44,36,36,36,36,36,36,36,36,46,44,36,36,36,36,36,36,36,+ 36,46,44,44,44,44,44,44,44,46,0,0,36,36,36,17,17,17,36,44,0,0,36,36,+ 36,36,36,17,17,44,0,0,36,36,36,36,36,17,17,44,0,0,36,36,36,36,36,36,+ 17,44,0,0,36,36,36,36,36,36,36,44,0,0,36,36,36,36,36,36,36,44,0,0,+ 36,36,36,36,36,36,36,44,0,0,36,36,36,36,36,36,36,44,0,0,46,46,46,46,+ 46,46,44,46,0,0,0,0,46,44,46,46,46,46,46,46,0,0,44,36,36,36,36,36,+ 36,36,0,0,44,36,36,36,36,36,36,36,0,0,44,36,36,36,36,36,36,36,0,0,+ 44,36,36,36,36,36,36,36,0,0,44,17,36,36,36,36,36,36,0,0,44,17,17,36,+ 36,36,36,36,0,0,44,17,17,36,36,36,36,36,0,0,44,36,17,17,17,36,36,36,+ 0,0,46,44,44,44,44,44,44,44,44,36,36,36,36,36,36,36,36,46,44,36,36,36,+ 36,36,36,36,36,46,44,36,36,36,36,36,36,36,36,46,44,17,36,36,36,36,36,36,+ 36,46,44,17,36,36,36,36,36,36,36,46,44,17,17,17,36,36,36,36,36,46,44,36,+ 17,17,17,36,36,36,36,44,46,44,44,44,44,44,44,44,44,46,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,23,23,23,23,23,23,23,23,23,+ 23,15,15,23,15,15,23,15,15,23,23,15,23,23,23,23,23,23,23,23,23,15,23,23,+ 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,+ 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,+ 23,23,23,23,23,23,23,44,23,23,23,23,23,23,44,23,44,44,23,23,23,23,23,23,+ 23,23,23,23,23,15,23,23,15,15,23,15,15,23,23,15,23,23,23,23,23,23,23,23,+ 23,15,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,+ 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,+ 23,23,23,23,23,23,23,23,23,23,23,44,23,23,23,23,23,23,44,23,44,44,23,23,+ 23,23,23,23,23,23,23,23,23,15,23,23,15,15,23,23,15,23,23,15,23,23,23,23,+ 23,23,23,23,23,15,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,+ 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,+ 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,44,23,23,23,23,23,23,44,23,+ 44,44,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,+ 23,23,15,15,15,15,23,23,23,23,23,23,23,15,15,15,23,23,23,23,15,23,23,23,+ 15,15,23,23,23,23,15,15,23,23,23,15,23,23,23,23,15,15,15,23,23,23,23,23,+ 23,23,15,15,15,15,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,+ 23,23,23,23,23,23,42,21,21,21,21,21,21,21,21,42,42,21,21,21,21,21,21,21,+ 22,42,245,24,21,21,21,21,22,22,42,245,0,243,245,42,42,42,42,245,243,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,42,21,21,42,39,46,21,21,21,42,42,21,21,42,+ 37,45,21,21,22,42,245,24,21,42,38,45,22,22,42,245,0,243,245,42,46,46,42,245,+ 243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,21,21,42,35,29,45,21,21,42,+ 42,21,21,45,34,36,32,42,22,42,245,24,21,42,38,34,45,22,42,245,0,243,245,42,+ 46,45,46,245,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,42,35,29,29,29,+ 29,35,42,42,42,42,32,34,36,36,34,32,42,42,245,42,39,34,34,34,34,39,42,245,+ 0,243,245,45,45,45,45,245,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,42,+ 245,0,0,0,0,0,0,0,21,21,24,243,0,0,0,0,0,0,21,21,21,245,0,0,+ 0,0,0,0,21,21,21,42,0,0,0,0,0,0,21,21,21,42,0,0,0,0,0,0,+ 21,21,21,42,0,0,0,0,0,0,21,21,22,42,0,0,0,0,0,0,21,21,22,245,+ 0,0,0,0,0,0,21,22,42,243,0,0,0,0,0,0,42,42,245,0,0,0,0,0,+ 0,0,42,42,245,0,0,0,0,0,0,0,21,21,24,243,0,0,0,0,0,0,21,21,+ 21,245,0,0,0,0,0,0,42,42,42,42,0,0,0,0,0,0,39,37,38,46,0,0,+ 0,0,0,0,46,45,45,46,0,0,0,0,0,0,21,21,22,42,0,0,0,0,0,0,+ 21,21,22,245,0,0,0,0,0,0,21,22,42,243,0,0,0,0,0,0,42,42,245,0,+ 0,0,0,0,0,0,42,42,245,0,0,0,0,0,0,0,21,21,24,243,0,0,0,0,+ 0,0,21,21,21,245,0,0,0,0,0,0,42,45,42,42,0,0,0,0,0,0,35,34,+ 38,46,0,0,0,0,0,0,29,36,34,45,0,0,0,0,0,0,45,32,45,46,0,0,+ 0,0,0,0,21,42,22,245,0,0,0,0,0,0,21,22,42,243,0,0,0,0,0,0,+ 42,42,245,0,0,0,0,0,0,0,42,42,245,0,0,0,0,0,0,0,42,42,42,243,+ 0,0,0,0,0,0,35,32,39,245,0,0,0,0,0,0,29,34,34,45,0,0,0,0,+ 0,0,29,36,34,45,0,0,0,0,0,0,29,36,34,45,0,0,0,0,0,0,29,34,+ 34,45,0,0,0,0,0,0,35,32,39,245,0,0,0,0,0,0,42,42,42,243,0,0,+ 0,0,0,0,42,42,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,245,42,42,+ 0,0,0,0,0,0,243,24,21,21,0,0,0,0,0,0,245,21,21,21,0,0,0,0,+ 0,0,42,21,21,21,0,0,0,0,0,0,42,21,21,21,0,0,0,0,0,0,42,21,+ 21,21,0,0,0,0,0,0,42,22,21,21,0,0,0,0,0,0,245,22,21,21,0,0,+ 0,0,0,0,243,42,22,21,0,0,0,0,0,0,0,245,42,42,0,0,0,0,0,0,+ 0,245,42,42,0,0,0,0,0,0,243,24,21,21,0,0,0,0,0,0,245,21,21,21,+ 0,0,0,0,0,0,42,42,42,42,0,0,0,0,0,0,46,38,37,39,0,0,0,0,+ 0,0,46,45,45,46,0,0,0,0,0,0,42,22,21,21,0,0,0,0,0,0,245,22,+ 21,21,0,0,0,0,0,0,243,42,22,21,0,0,0,0,0,0,0,245,42,42,0,0,+ 0,0,0,0,0,245,42,42,0,0,0,0,0,0,243,24,21,21,0,0,0,0,0,0,+ 245,21,21,21,0,0,0,0,0,0,42,42,45,42,0,0,0,0,0,0,46,38,34,35,+ 0,0,0,0,0,0,45,34,36,29,0,0,0,0,0,0,46,45,32,45,0,0,0,0,+ 0,0,245,22,42,21,0,0,0,0,0,0,243,42,22,21,0,0,0,0,0,0,0,245,+ 42,42,0,0,0,0,0,0,0,245,42,42,0,0,0,0,0,0,243,42,42,42,0,0,+ 0,0,0,0,245,39,32,35,0,0,0,0,0,0,45,34,34,29,0,0,0,0,0,0,+ 45,34,36,29,0,0,0,0,0,0,45,34,36,29,0,0,0,0,0,0,45,34,34,29,+ 0,0,0,0,0,0,245,39,32,35,0,0,0,0,0,0,243,42,42,42,0,0,0,0,+ 0,0,0,245,42,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,245,42,42,42,+ 42,245,243,0,245,24,21,21,21,21,22,22,42,245,42,21,21,21,21,21,21,21,22,42,+ 42,21,21,21,21,21,21,21,21,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,+ 245,42,46,46,42,245,243,0,245,24,21,42,38,45,22,22,42,245,42,21,21,42,37,45,+ 21,21,22,42,42,21,21,42,39,46,21,21,21,42,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,243,245,42,46,45,46,245,243,0,245,24,21,42,38,34,45,22,42,245,42,21,+ 21,45,34,36,32,42,22,42,42,21,21,42,35,29,45,21,21,42,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,243,245,45,45,45,45,245,243,0,245,42,39,34,34,34,34,39,+ 42,245,42,42,32,34,36,36,34,32,42,42,42,42,35,29,29,29,29,35,42,42,45,43,+ 43,43,43,43,43,43,43,47,45,43,43,43,43,43,43,43,43,47,245,43,43,43,43,43,+ 43,43,47,245,0,243,245,47,47,47,47,245,243,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,45,43,43,45,44,46,43,43,43,47,45,43,43,47,23,46,43,43,43,47,245,43,+ 43,47,36,46,43,43,47,245,0,243,245,47,46,46,47,245,243,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,45,43,43,45,36,36,46,43,43,47,45,43,43,46,23,23,36,47,+ 43,47,245,43,43,47,36,23,46,43,47,245,0,243,245,47,46,46,46,245,243,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,45,45,36,36,36,36,36,36,45,47,45,47,36,23,+ 23,23,23,36,47,47,245,45,44,36,23,23,36,44,47,245,0,243,245,46,46,46,46,245,+ 243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,45,245,0,0,0,0,0,0,0,+ 43,43,43,243,0,0,0,0,0,0,43,43,43,245,0,0,0,0,0,0,43,43,43,47,+ 0,0,0,0,0,0,43,43,43,47,0,0,0,0,0,0,43,43,43,47,0,0,0,0,+ 0,0,43,43,43,47,0,0,0,0,0,0,43,43,43,245,0,0,0,0,0,0,43,43,+ 47,243,0,0,0,0,0,0,47,47,245,0,0,0,0,0,0,0,45,45,245,0,0,0,+ 0,0,0,0,43,43,43,243,0,0,0,0,0,0,43,43,43,245,0,0,0,0,0,0,+ 45,47,47,47,0,0,0,0,0,0,44,23,36,46,0,0,0,0,0,0,46,46,46,46,+ 0,0,0,0,0,0,43,43,43,47,0,0,0,0,0,0,43,43,43,245,0,0,0,0,+ 0,0,43,43,47,243,0,0,0,0,0,0,47,47,245,0,0,0,0,0,0,0,45,45,+ 245,0,0,0,0,0,0,0,43,43,43,243,0,0,0,0,0,0,43,43,43,245,0,0,+ 0,0,0,0,45,46,47,47,0,0,0,0,0,0,36,23,36,46,0,0,0,0,0,0,+ 36,23,23,46,0,0,0,0,0,0,46,36,46,46,0,0,0,0,0,0,43,47,43,245,+ 0,0,0,0,0,0,43,43,47,243,0,0,0,0,0,0,47,47,245,0,0,0,0,0,+ 0,0,45,45,245,0,0,0,0,0,0,0,45,47,45,243,0,0,0,0,0,0,36,36,+ 44,245,0,0,0,0,0,0,36,23,36,46,0,0,0,0,0,0,36,23,23,46,0,0,+ 0,0,0,0,36,23,23,46,0,0,0,0,0,0,36,23,36,46,0,0,0,0,0,0,+ 36,36,44,245,0,0,0,0,0,0,45,47,47,243,0,0,0,0,0,0,47,47,245,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,245,45,45,0,0,0,0,0,0,243,43,+ 43,43,0,0,0,0,0,0,245,43,43,43,0,0,0,0,0,0,47,43,43,43,0,0,+ 0,0,0,0,47,43,43,43,0,0,0,0,0,0,47,43,43,43,0,0,0,0,0,0,+ 47,43,43,43,0,0,0,0,0,0,245,43,43,43,0,0,0,0,0,0,243,47,43,43,+ 0,0,0,0,0,0,0,245,47,47,0,0,0,0,0,0,0,245,45,45,0,0,0,0,+ 0,0,243,43,43,43,0,0,0,0,0,0,245,43,43,43,0,0,0,0,0,0,47,47,+ 47,45,0,0,0,0,0,0,46,36,23,44,0,0,0,0,0,0,46,46,46,46,0,0,+ 0,0,0,0,47,43,43,43,0,0,0,0,0,0,245,43,43,43,0,0,0,0,0,0,+ 243,47,43,43,0,0,0,0,0,0,0,245,47,47,0,0,0,0,0,0,0,245,45,45,+ 0,0,0,0,0,0,243,43,43,43,0,0,0,0,0,0,245,43,43,43,0,0,0,0,+ 0,0,47,47,46,45,0,0,0,0,0,0,46,36,23,36,0,0,0,0,0,0,46,23,+ 23,36,0,0,0,0,0,0,46,46,36,46,0,0,0,0,0,0,245,43,47,43,0,0,+ 0,0,0,0,243,47,43,43,0,0,0,0,0,0,0,245,47,47,0,0,0,0,0,0,+ 0,245,45,45,0,0,0,0,0,0,243,45,47,45,0,0,0,0,0,0,245,44,36,36,+ 0,0,0,0,0,0,46,36,23,36,0,0,0,0,0,0,46,23,23,36,0,0,0,0,+ 0,0,46,23,23,36,0,0,0,0,0,0,46,36,23,36,0,0,0,0,0,0,245,44,+ 36,36,0,0,0,0,0,0,243,47,47,45,0,0,0,0,0,0,0,245,47,47,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,243,245,47,47,47,47,245,243,0,245,43,43,43,+ 43,43,43,43,47,245,45,43,43,43,43,43,43,43,43,47,45,43,43,43,43,43,43,43,+ 43,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,245,47,46,46,47,245,243,0,+ 245,43,43,47,36,46,43,43,47,245,45,43,43,47,23,46,43,43,43,47,45,43,43,45,+ 44,46,43,43,43,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,245,47,46,46,+ 46,245,243,0,245,43,43,47,36,23,46,43,47,245,45,43,43,46,23,23,36,47,43,47,+ 45,43,43,45,36,36,46,43,43,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,+ 245,46,46,46,46,245,243,0,245,45,44,36,23,23,36,44,47,245,45,47,36,23,23,23,+ 23,36,47,47,45,45,36,36,36,36,36,36,45,47,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,50,0,0,0,0,0,0,0,0,+ 97,78,0,0,0,0,0,0,0,50,93,103,0,0,0,0,0,0,0,74,9,15,76,0,+ 0,0,0,0,0,75,9,15,100,0,0,0,0,0,50,81,13,15,127,68,0,0,0,0,+ 51,9,13,15,23,74,0,0,0,0,53,9,15,15,23,78,0,0,0,0,53,9,15,15,+ 23,78,0,0,0,0,51,9,13,15,23,74,0,0,0,0,50,81,13,15,127,68,0,0,+ 0,0,0,75,9,15,100,0,0,0,0,0,0,74,9,15,76,0,0,0,0,0,0,50,+ 93,103,0,0,0,0,0,0,0,0,97,78,0,0,0,0,0,0,0,0,51,50,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53,51,50,0,0,0,+ 0,0,0,0,9,9,81,79,77,50,0,0,0,0,15,13,13,9,9,93,97,51,0,0,+ 15,15,15,15,15,103,78,50,0,0,23,23,127,100,76,0,0,0,0,0,78,74,68,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,68,74,78,0,0,0,0,0,76,100,127,23,23,0,0,50,78,103,15,+ 15,15,15,15,0,0,51,97,93,9,9,13,13,15,0,0,0,0,50,77,79,81,9,9,+ 0,0,0,0,0,0,0,50,51,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,64,66,93,92,65,63,0,0,63,66,93,12,12,12,12,93,+ 65,0,65,12,12,12,12,12,12,12,93,63,92,12,12,12,12,12,12,12,12,66,93,12,+ 12,12,12,12,12,12,12,91,93,12,12,12,12,12,12,12,12,91,93,12,12,12,12,12,+ 12,12,12,91,66,12,12,12,12,12,12,12,93,65,63,92,12,12,12,12,12,93,65,0,+ 0,63,66,93,93,93,92,65,0,0,0,0,230,233,235,234,231,229,233,232,125,233,235,46,+ 46,46,46,46,46,233,231,46,46,40,40,40,40,46,46,208,234,46,40,40,40,40,40,40,+ 46,233,235,46,40,40,40,40,40,40,46,233,235,46,40,40,40,40,40,40,46,233,235,46,+ 40,40,40,40,40,40,46,233,233,46,46,40,40,40,40,46,235,231,229,234,46,46,46,46,+ 46,235,231,0,0,94,233,235,235,235,234,231,0,0,0,0,0,166,145,140,105,0,0,0,+ 0,165,221,33,29,28,30,182,50,0,0,207,32,29,31,28,28,28,154,54,138,29,27,27,+ 31,27,28,28,28,164,178,27,27,27,26,26,27,29,33,182,189,31,27,26,26,27,32,33,+ 33,144,206,31,27,26,27,29,32,33,33,137,136,35,31,26,28,32,32,33,35,56,0,143,+ 31,29,30,32,32,33,159,0,0,0,150,183,201,207,189,138,68,0,0,0,0,141,139,145,+ 106,0,0,0,0,0,205,35,29,18,28,38,106,0,0,176,32,29,29,18,18,18,33,67,+ 144,29,29,29,31,18,18,18,18,114,170,29,28,27,26,18,18,27,28,190,107,29,29,27,+ 26,27,29,32,30,207,142,32,29,27,28,31,29,32,30,222,0,178,31,29,28,29,29,32,+ 35,197,0,106,31,29,32,32,32,30,176,0,0,54,139,163,201,207,190,144,104,0,0,0,+ 0,50,139,145,106,0,0,0,0,0,106,183,28,18,30,201,143,0,105,177,33,33,18,18,+ 18,28,38,104,190,33,33,32,18,18,18,18,28,106,177,33,30,26,16,18,18,18,18,143,+ 138,33,30,26,25,26,26,27,32,221,106,35,32,28,26,26,26,27,39,222,104,35,28,29,+ 31,26,27,32,44,221,0,33,30,32,32,29,27,39,204,0,0,104,106,139,189,190,178,167,+ 0,0,0,0,0,67,145,145,105,0,0,0,0,104,158,38,27,27,35,190,107,67,158,38,+ 38,32,18,18,27,35,38,143,201,38,35,26,18,18,18,27,38,188,201,38,29,25,25,25,+ 25,18,33,206,200,38,26,16,25,25,26,26,38,206,188,35,28,25,25,25,26,30,39,207,+ 169,33,30,29,25,26,26,39,39,207,105,163,33,32,29,26,33,207,157,0,0,0,104,106,+ 144,154,168,56,0,0,0,0,0,106,160,170,105,0,0,0,0,137,207,38,27,29,35,182,+ 106,0,200,39,38,27,27,27,33,35,35,201,206,38,31,26,26,26,26,35,38,39,222,32,+ 25,25,25,25,26,28,39,207,222,27,16,16,16,16,16,28,39,207,201,33,18,16,16,18,+ 18,35,38,207,201,33,32,25,18,25,33,38,38,207,105,144,35,28,25,29,38,38,181,106,+ 0,0,104,107,151,189,137,67,0,0,0,0,0,166,170,139,50,0,0,0,0,186,222,35,+ 27,32,183,107,0,0,104,44,35,27,27,29,33,33,183,106,155,35,26,27,27,26,32,33,+ 33,201,107,26,26,26,26,26,28,33,38,201,158,26,25,25,16,16,28,38,38,189,200,32,+ 25,25,18,18,32,35,38,138,200,38,26,25,25,32,33,33,38,106,0,176,30,26,29,33,+ 33,33,38,105,0,0,106,160,38,201,176,156,99,0,0,0,0,155,170,140,105,0,0,0,+ 0,135,221,33,29,28,28,190,54,0,0,206,32,28,28,27,28,28,178,54,138,31,28,27,+ 27,27,27,28,28,154,160,31,31,31,26,18,18,28,30,183,177,31,31,26,26,27,32,30,+ 33,182,199,29,27,27,31,29,32,33,33,175,104,35,27,27,29,29,30,33,35,104,0,138,+ 27,29,32,30,32,33,159,0,0,0,170,190,201,201,189,139,55,0,0,0,0,104,139,114,+ 106,0,0,0,0,0,106,183,29,18,28,201,148,0,67,169,30,30,27,18,18,18,38,50,+ 183,32,32,32,18,18,18,18,18,106,170,32,32,29,18,16,18,18,27,150,107,32,32,31,+ 25,26,27,28,29,221,105,32,30,31,27,27,31,31,35,228,0,183,32,29,28,28,27,28,+ 39,204,0,159,32,29,32,32,29,32,204,0,0,105,107,149,190,201,183,139,0,0,0,0,+ 0,105,170,150,106,0,0,0,0,67,149,35,27,26,33,201,138,50,143,38,35,33,18,18,+ 18,35,38,107,201,35,35,27,25,18,18,18,35,176,200,35,30,18,25,18,18,18,28,199,+ 181,38,29,25,25,26,26,26,38,206,144,35,29,27,25,26,26,31,39,207,107,33,32,28,+ 26,26,26,38,44,222,105,183,30,32,32,26,29,44,180,0,0,0,104,107,159,178,177,104,+ 0,0,0,0,0,106,160,159,105,0,0,0,0,137,201,38,31,29,38,189,106,0,200,39,+ 38,31,26,26,30,38,38,201,206,39,28,26,26,26,26,35,38,207,222,30,25,25,25,25,+ 25,28,39,207,222,28,16,16,16,16,16,28,39,207,207,33,18,16,16,16,25,35,38,207,+ 201,33,30,18,18,18,33,38,38,207,105,149,35,29,25,29,38,38,181,106,0,0,54,107,+ 154,182,106,56,0,0,0,0,0,142,170,139,50,0,0,0,0,179,222,35,31,32,183,107,+ 0,0,146,44,35,26,27,28,30,33,183,106,173,38,26,26,26,26,30,33,33,38,107,26,+ 26,26,26,26,29,33,38,201,169,26,25,16,16,16,28,38,38,189,200,30,25,25,16,18,+ 30,35,38,143,200,38,26,25,25,32,33,33,38,106,0,176,33,26,29,33,33,33,38,105,+ 0,0,106,154,38,201,176,161,71,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,107,178,32,26,27,35,182,106,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,170,33,32,+ 29,18,18,18,33,38,201,144,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,50,139,33,33,33,33,28,18,18,18,18,30,+ 38,38,38,201,138,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,56,152,35,30,30,33,33,30,18,18,18,18,18,18,28,38,38,38,38,38,+ 182,106,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,190,33,+ 30,30,33,32,32,32,18,18,18,18,18,18,18,28,38,38,38,38,38,38,38,149,50,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,107,33,33,33,33,32,32,32,32,28,+ 18,18,18,18,18,18,18,18,18,35,38,38,38,38,38,38,182,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,54,170,33,33,33,32,32,32,32,32,30,28,18,18,18,18,18,18,+ 18,18,18,18,33,38,38,38,38,38,38,50,0,0,0,0,0,0,0,0,0,0,0,107,+ 32,33,33,33,33,32,32,32,32,32,32,18,18,18,18,18,18,18,18,18,18,18,18,30,+ 38,38,38,38,38,107,0,0,0,0,0,0,0,0,0,50,145,33,33,33,30,30,30,32,+ 32,32,32,32,32,18,18,18,18,18,18,18,18,18,18,18,18,18,28,38,38,38,38,201,+ 0,0,0,0,0,0,0,0,106,164,33,33,33,33,30,30,30,30,32,32,32,32,29,18,+ 18,18,18,18,18,18,18,18,18,18,18,18,18,28,38,38,38,38,105,0,0,0,0,0,+ 50,150,33,33,30,33,32,32,32,30,30,30,32,32,32,32,28,18,18,18,18,18,18,18,+ 18,18,18,18,18,18,18,18,18,38,38,38,152,0,0,0,0,107,183,33,33,33,33,32,+ 32,32,30,30,32,32,32,32,32,32,27,18,18,18,18,18,18,18,18,18,18,18,18,18,+ 18,18,18,18,33,38,38,50,0,0,170,33,33,33,33,33,32,32,32,30,30,30,32,32,+ 32,32,32,32,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,30,+ 38,107,0,0,139,35,33,33,33,32,32,32,32,30,30,32,32,32,32,32,31,31,18,18,+ 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,30,182,0,0,106,35,+ 33,33,32,32,32,32,30,30,32,32,32,29,29,32,29,31,18,18,18,18,18,18,18,18,+ 18,18,18,18,18,18,18,18,18,18,18,18,18,28,55,0,54,35,33,33,33,33,32,30,+ 30,32,32,32,29,29,29,31,31,31,16,16,16,18,18,18,18,18,18,18,18,18,18,16,+ 16,18,18,18,18,18,18,18,107,0,0,190,35,33,33,30,30,30,30,28,28,29,29,29,+ 29,31,31,26,16,16,16,16,16,16,16,18,18,18,16,16,16,16,16,18,18,18,27,28,+ 29,32,144,0,0,139,35,33,33,33,30,30,30,30,28,28,28,28,31,31,31,18,16,16,+ 16,16,16,16,16,18,18,16,16,18,18,18,26,27,29,29,29,29,29,33,206,0,0,107,+ 35,33,33,33,33,32,30,30,30,28,28,28,31,31,31,16,16,16,16,16,16,16,16,16,+ 18,18,26,31,31,31,29,29,28,29,29,29,29,39,221,0,0,105,35,35,33,33,33,32,+ 32,32,32,28,28,29,31,31,31,16,16,18,18,18,18,18,26,31,31,31,31,31,31,31,+ 28,28,28,29,29,31,32,44,222,0,0,0,190,35,33,33,30,32,32,32,32,28,28,29,+ 31,31,26,16,18,18,26,27,26,31,31,31,31,31,31,31,31,29,29,28,28,29,29,31,+ 35,44,44,0,0,0,170,35,33,33,30,30,32,32,32,28,28,29,31,31,31,26,26,26,+ 26,26,26,31,31,31,31,31,31,31,31,31,29,28,28,29,29,29,39,44,44,54,0,0,+ 107,35,33,33,30,30,32,32,32,29,28,28,29,31,31,31,26,26,26,26,26,26,27,27,+ 31,31,31,31,31,29,28,28,28,29,29,30,45,44,44,105,0,0,68,33,33,33,30,30,+ 32,32,32,29,28,28,28,31,27,27,26,26,31,31,31,31,27,27,27,27,27,27,29,28,+ 28,28,28,28,28,38,45,44,44,187,0,0,50,33,33,33,30,30,32,32,32,32,29,28,+ 28,27,27,27,31,26,26,31,31,31,27,27,27,27,27,27,28,28,28,28,28,28,28,44,+ 45,44,44,199,0,0,0,159,33,33,30,30,32,32,32,32,29,28,28,28,28,27,27,31,+ 26,31,31,31,27,27,27,31,31,29,28,28,28,28,28,28,35,44,44,44,45,221,0,0,+ 0,108,33,33,33,30,30,32,32,32,29,28,28,28,28,28,28,31,31,26,26,27,27,27,+ 27,31,31,31,29,29,28,28,29,29,39,44,44,45,45,221,0,0,0,106,33,33,33,30,+ 32,32,32,29,29,29,28,28,28,28,29,31,31,31,27,27,27,27,27,31,31,31,29,29,+ 29,29,29,30,44,44,44,45,45,222,0,0,0,50,33,33,32,32,32,32,32,29,29,29,+ 28,28,28,28,29,31,31,29,31,31,27,27,27,27,31,29,29,29,29,29,29,38,45,44,+ 45,45,45,174,0,0,0,0,178,33,32,32,32,32,32,29,28,28,28,28,29,29,29,31,+ 31,29,29,31,31,31,31,27,29,29,28,29,29,31,32,44,45,44,45,45,156,0,0,0,+ 0,0,108,33,32,32,32,32,32,28,28,28,28,28,28,29,29,31,31,29,29,29,31,31,+ 31,29,29,29,29,29,29,31,35,45,44,45,45,174,0,0,0,0,0,0,106,33,32,32,+ 32,32,32,29,28,28,28,28,28,29,29,29,29,29,29,29,29,31,31,29,29,29,29,29,+ 29,29,39,45,45,45,156,0,0,0,0,0,0,0,50,33,33,32,32,32,32,32,28,30,+ 28,28,28,29,29,32,32,32,32,32,32,29,31,28,28,28,28,29,29,32,45,45,45,174,+ 0,0,0,0,0,0,0,0,0,178,33,32,32,32,32,32,30,30,30,28,28,32,32,32,+ 32,32,32,32,32,32,29,28,28,28,29,29,29,39,45,45,179,0,0,0,0,0,0,0,+ 0,0,0,139,33,32,32,32,32,30,30,30,32,32,32,32,32,32,32,32,32,32,32,32,+ 32,28,28,28,28,29,32,44,45,180,0,0,0,0,0,0,0,0,0,0,0,106,33,32,+ 30,30,30,30,30,32,32,32,32,32,32,32,32,32,32,32,32,30,30,30,28,28,28,29,+ 35,45,198,0,0,0,0,0,0,0,0,0,0,0,0,50,30,32,32,30,30,30,30,30,+ 30,30,32,32,32,32,32,32,32,32,32,32,30,30,30,28,29,29,39,187,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,50,106,106,108,150,178,35,33,30,30,30,32,32,32,+ 32,32,32,32,32,32,30,30,30,32,29,33,198,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,50,185,204,221,222,44,44,44,39,39,38,35,35,33,+ 30,30,33,33,32,107,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,54,185,225,219,227,46,235,227,227,204,180,106,69,106,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,170,35,+ 27,26,32,38,170,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,50,139,35,35,33,26,26,26,32,38,38,+ 190,107,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,106,183,35,35,35,28,26,26,26,26,29,38,38,38,38,163,106,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,106,164,+ 35,35,35,35,33,18,18,18,18,18,18,30,38,38,38,38,38,38,139,68,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,159,35,35,35,35,35,35,30,18,+ 18,18,18,18,18,18,30,38,38,38,38,38,38,38,189,106,50,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,50,139,35,35,35,35,35,35,35,33,27,18,18,18,18,18,18,18,+ 18,30,38,38,38,38,38,38,38,38,38,149,54,0,0,0,0,0,0,0,0,0,0,107,+ 35,35,35,35,35,35,35,35,33,33,18,18,18,18,18,18,18,18,18,18,30,38,38,38,+ 38,38,38,38,38,38,149,0,0,0,0,0,0,0,0,105,183,35,35,35,35,33,35,35,+ 35,33,33,28,18,18,18,18,18,18,18,18,18,18,18,30,38,38,38,38,38,38,38,38,+ 182,0,0,0,0,0,0,50,150,35,35,35,35,35,33,33,33,35,33,33,33,27,18,18,+ 18,18,18,18,18,18,18,18,18,18,30,38,38,38,38,38,38,38,201,0,0,0,0,50,+ 139,35,35,35,35,35,35,35,33,33,33,33,33,33,32,18,18,18,18,18,18,18,18,18,+ 18,18,18,18,18,30,38,38,38,38,38,38,38,67,0,0,107,35,35,35,35,35,35,35,+ 35,33,33,33,33,33,33,33,28,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,+ 30,38,38,38,38,38,39,104,0,0,201,35,35,35,35,35,35,33,33,33,33,33,33,33,+ 33,32,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,30,38,38,38,38,+ 39,106,0,0,177,38,35,35,35,35,33,33,33,33,33,33,33,32,32,29,25,18,18,18,+ 18,18,18,18,18,18,18,18,18,18,18,18,18,18,30,38,38,38,38,175,0,0,139,38,+ 38,35,35,33,33,33,33,33,33,33,33,32,32,26,18,18,18,18,18,18,18,18,18,18,+ 18,18,18,18,18,18,18,18,18,30,38,38,39,200,0,0,107,38,38,38,35,33,33,33,+ 33,33,33,33,32,32,32,25,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,+ 18,18,18,18,30,38,39,207,0,0,105,38,38,38,35,35,33,33,33,33,33,33,32,32,+ 31,25,18,18,18,18,18,18,18,18,18,18,18,18,16,16,16,18,18,18,18,18,18,33,+ 39,39,54,0,67,38,38,38,35,35,33,33,30,30,30,32,32,32,25,18,18,18,18,18,+ 18,18,18,18,18,18,16,16,16,16,16,16,18,18,18,18,18,18,38,39,104,0,0,38,+ 38,38,35,35,35,33,33,30,30,32,32,29,18,18,18,18,16,16,16,18,18,18,18,16,+ 16,16,16,16,16,18,18,18,18,26,27,31,39,39,106,0,0,190,38,38,35,35,35,33,+ 33,33,32,32,32,26,18,18,18,18,16,16,16,16,16,16,18,18,25,25,26,26,26,26,+ 27,27,31,31,31,33,44,39,143,0,0,170,38,38,35,35,35,33,33,33,33,32,32,25,+ 18,18,18,18,18,25,25,25,25,26,26,26,26,26,26,26,27,27,27,27,31,31,31,39,+ 44,44,188,0,0,139,38,38,38,35,35,35,33,33,33,32,31,25,25,18,25,25,25,25,+ 25,26,26,26,26,26,26,26,26,27,27,27,27,31,31,31,32,44,44,44,200,0,0,107,+ 38,38,38,35,35,35,33,33,33,32,31,25,25,25,25,25,25,25,25,26,26,26,26,26,+ 26,26,26,27,27,27,27,31,31,31,38,44,44,44,207,0,0,105,38,38,38,35,35,35,+ 33,33,30,32,31,31,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,27,27,27,+ 27,31,31,29,44,44,44,44,44,104,0,56,38,35,38,35,35,35,33,33,30,28,27,27,+ 26,25,25,25,25,25,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,38,44,44,+ 44,44,44,105,0,0,38,35,35,35,35,35,33,33,28,28,28,27,31,26,25,25,25,25,+ 26,26,26,26,26,26,26,26,27,27,27,27,27,27,28,44,44,44,44,44,44,137,0,0,+ 190,35,35,35,35,35,33,30,28,28,28,28,27,31,26,25,25,26,26,26,26,26,26,26,+ 26,27,27,27,27,28,28,28,38,44,44,44,44,44,44,187,0,0,170,35,35,35,35,35,+ 33,29,29,28,28,28,28,31,31,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,+ 27,28,44,44,44,44,44,44,44,205,0,0,138,38,35,35,35,35,30,29,29,28,28,28,+ 28,31,31,31,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,38,44,44,44,44,+ 44,44,44,222,0,0,106,38,35,35,35,33,29,29,28,28,28,29,29,31,31,29,26,26,+ 26,26,26,26,26,26,26,26,27,27,27,27,29,44,44,44,44,44,44,44,44,44,0,0,+ 105,38,35,35,35,32,32,28,28,28,28,29,29,31,31,29,29,26,26,26,26,26,26,26,+ 27,27,27,27,31,31,38,44,44,44,44,44,44,44,44,222,0,0,54,38,35,35,35,32,+ 32,30,30,28,28,29,29,29,29,29,29,29,26,26,26,26,26,26,27,27,27,31,31,31,+ 44,44,44,44,44,44,44,44,205,104,0,0,0,38,35,35,32,32,32,30,30,30,28,29,+ 29,32,29,29,29,29,29,26,26,26,26,27,27,27,27,31,31,35,44,44,44,44,44,44,+ 44,179,0,0,0,0,0,183,35,35,32,32,30,30,30,30,30,30,32,32,32,32,32,29,+ 29,27,26,26,27,27,27,27,27,31,31,44,44,44,44,44,44,221,104,0,0,0,0,0,+ 0,149,35,33,30,30,30,30,30,30,32,30,32,32,32,32,32,32,32,29,27,27,27,27,+ 27,27,31,31,35,44,44,44,44,44,198,0,0,0,0,0,0,0,0,107,33,33,30,30,+ 30,30,30,32,32,32,32,32,32,32,32,32,32,32,29,27,27,27,27,27,27,31,39,44,+ 44,44,222,105,0,0,0,0,0,0,0,0,0,105,183,33,33,30,30,30,30,30,30,32,+ 32,32,32,32,32,32,32,32,30,29,27,27,27,27,27,35,45,44,44,205,54,0,0,0,+ 0,0,0,0,0,0,0,0,0,56,106,107,145,33,33,33,30,30,32,32,32,32,32,32,+ 32,32,32,30,28,27,27,27,27,39,44,44,167,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,104,106,144,183,35,33,32,32,32,32,32,32,32,30,30,28,+ 27,27,35,44,206,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,172,186,205,207,39,35,33,32,30,30,30,32,31,27,39,187,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,172,224,226,228,44,37,38,33,32,151,104,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,184,0,0,0,104,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,106,190,35,31,31,35,190,138,50,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,105,182,38,38,29,31,31,29,35,38,38,177,105,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,182,+ 38,38,38,33,27,31,31,26,29,38,38,38,38,182,106,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,189,38,38,38,38,38,28,27,26,+ 26,26,26,33,38,38,38,38,38,201,138,104,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,105,182,38,38,38,38,38,38,30,27,27,27,27,27,27,27,35,38,+ 38,38,38,38,38,38,177,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,189,+ 38,38,38,38,38,38,38,35,27,27,27,26,27,27,27,26,27,38,38,38,38,38,38,38,+ 38,38,190,107,50,0,0,0,0,0,0,0,0,0,105,182,38,38,38,38,38,38,38,38,+ 38,28,27,27,27,27,27,27,27,26,26,29,38,38,38,38,38,38,38,38,38,38,38,139,+ 54,0,0,0,0,0,105,181,38,38,38,38,38,38,38,38,38,38,33,27,27,27,27,27,+ 26,27,27,27,26,26,33,38,38,38,38,38,38,38,38,38,38,38,38,107,0,0,105,189,+ 38,38,38,38,38,38,38,38,38,38,38,38,27,26,27,27,27,27,27,27,27,27,26,26,+ 26,35,38,38,38,38,38,38,38,38,38,38,38,176,0,0,207,38,38,38,38,38,38,38,+ 38,38,38,38,38,30,26,26,27,27,18,27,27,18,18,18,18,26,26,27,35,35,38,35,+ 38,38,38,38,38,38,38,162,0,0,207,38,38,38,38,38,38,38,38,38,38,35,35,26,+ 26,26,27,18,18,18,18,18,18,18,18,18,18,26,29,38,38,38,38,38,38,38,38,38,+ 37,189,0,0,207,39,38,38,38,38,38,38,38,38,35,35,29,26,26,26,18,18,18,18,+ 18,18,18,18,18,18,18,26,26,33,38,38,38,38,38,38,38,38,37,201,0,0,206,39,+ 39,38,38,38,38,38,38,35,35,35,26,26,26,26,18,18,18,18,18,18,18,18,18,18,+ 18,26,26,26,35,38,38,38,38,38,38,39,37,207,0,0,189,39,39,38,38,38,38,38,+ 38,35,35,31,26,26,26,26,18,18,18,26,26,26,26,26,26,18,18,18,25,25,27,38,+ 38,38,38,38,38,39,39,207,0,0,188,39,39,39,38,38,38,38,35,35,32,26,26,26,+ 26,26,26,18,18,18,26,26,26,26,25,25,25,25,25,18,18,28,38,38,38,38,39,39,+ 39,207,0,0,188,39,39,39,38,38,38,35,35,35,26,25,25,25,26,25,25,26,18,18,+ 26,25,25,25,25,25,25,25,18,18,18,18,30,38,38,38,39,39,39,39,0,0,188,39,+ 39,39,38,38,38,35,35,29,25,26,25,25,25,25,25,25,26,26,25,25,25,25,25,25,+ 25,25,18,18,18,18,18,35,38,39,39,39,39,39,67,0,176,39,39,39,38,38,35,35,+ 35,26,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,18,18,18,18,+ 18,27,38,39,39,39,39,39,104,0,176,39,39,39,38,38,38,35,31,25,25,18,25,25,+ 25,25,25,25,25,25,25,25,25,25,25,25,25,25,18,18,18,18,25,26,35,39,39,39,+ 39,39,104,0,168,39,39,39,38,38,38,33,16,16,16,16,16,16,16,16,16,16,16,16,+ 16,25,25,25,25,25,25,25,26,26,26,26,26,31,38,39,39,39,39,39,105,0,137,39,+ 39,39,39,38,38,32,16,16,16,16,16,16,16,16,16,16,16,16,16,25,25,25,25,25,+ 25,18,26,26,26,26,26,35,38,39,39,39,39,39,105,0,106,39,39,39,39,38,38,29,+ 26,16,16,16,16,16,16,16,16,16,16,16,25,25,25,25,25,18,18,18,26,26,26,26,+ 31,38,38,38,39,39,39,37,106,0,106,39,37,39,39,38,33,29,29,18,16,16,16,16,+ 16,16,16,16,16,16,25,25,25,25,25,25,18,18,26,26,26,26,35,38,38,38,39,39,+ 39,39,106,0,106,39,39,39,39,38,30,28,29,29,16,16,16,16,16,16,16,16,16,25,+ 25,25,25,25,25,18,26,26,26,26,26,29,38,38,38,38,39,39,39,39,106,0,106,39,+ 39,39,38,33,30,28,29,29,27,16,16,16,16,16,18,18,25,18,25,25,25,25,18,18,+ 18,26,26,26,26,38,39,38,38,38,37,37,39,39,137,0,105,39,39,39,38,30,32,30,+ 30,29,29,26,16,16,16,16,18,25,25,25,25,25,25,18,18,18,18,18,26,26,30,39,+ 39,38,38,38,37,39,39,39,175,0,105,39,39,39,35,30,32,30,30,32,32,29,18,16,+ 16,18,18,18,25,25,25,25,25,18,18,18,18,18,18,27,38,39,39,39,39,39,37,39,+ 39,39,181,0,104,39,39,39,33,30,30,30,32,32,32,32,29,16,18,18,18,18,25,25,+ 25,25,25,25,26,26,26,26,27,30,38,39,39,38,38,39,39,39,39,39,188,0,104,39,+ 39,35,33,30,30,30,32,32,32,32,32,26,25,25,25,25,25,25,25,25,25,26,26,26,+ 26,26,27,38,38,38,38,38,37,39,39,39,39,39,188,0,105,39,39,35,33,30,30,30,+ 30,32,32,32,32,29,25,25,25,25,25,25,25,25,26,26,26,26,26,26,35,38,38,38,+ 37,37,39,39,39,39,39,39,188,0,54,39,38,35,33,33,30,30,30,30,32,32,32,32,+ 29,25,25,25,25,25,25,26,26,26,26,26,26,29,38,39,38,38,37,39,39,39,39,39,+ 39,39,200,0,0,39,35,33,33,33,30,30,30,30,32,32,32,32,32,27,25,25,25,26,+ 26,26,26,26,26,26,26,38,39,39,38,37,37,39,39,39,39,39,37,37,200,0,0,38,+ 35,33,33,33,33,33,33,30,33,32,32,32,32,32,26,25,26,26,26,26,26,26,26,26,+ 32,38,39,39,38,37,39,39,39,39,39,39,200,106,0,0,0,183,35,35,33,33,33,33,+ 33,33,33,32,32,32,32,32,29,26,26,26,26,26,26,26,26,26,38,38,39,39,37,37,+ 39,39,39,39,200,105,0,0,0,0,0,0,105,139,183,33,33,33,33,33,33,32,32,32,+ 32,32,32,28,26,26,26,26,26,26,26,35,39,39,39,39,39,39,39,39,188,105,0,0,+ 0,0,0,0,0,0,0,0,0,105,108,183,33,33,33,33,32,32,32,32,30,30,27,26,+ 26,26,26,26,31,39,39,39,39,39,39,39,181,104,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,68,108,183,33,33,32,32,32,32,30,30,27,26,26,26,26,35,39,+ 39,39,39,39,157,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,105,108,178,33,32,33,33,30,28,27,26,26,29,39,39,39,207,143,50,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 105,108,178,33,30,30,27,26,26,38,39,201,138,50,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,108,178,+ 32,26,32,200,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,107,105,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,105,200,39,31,31,35,35,139,50,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,+ 200,39,39,32,31,31,32,35,35,35,139,54,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,200,37,39,39,30,31,31,31,+ 31,35,35,35,35,35,139,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,50,147,207,39,39,39,39,33,27,31,31,31,31,32,35,35,35,35,+ 35,35,139,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,180,+ 39,39,39,39,39,39,38,27,27,31,31,27,27,31,33,35,35,35,35,35,35,35,144,68,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,199,39,39,39,39,39,39,39,38,+ 27,27,27,27,27,27,27,27,29,35,35,35,35,35,35,35,35,35,170,105,0,0,0,0,+ 0,0,0,0,0,0,105,199,44,44,39,39,37,39,39,39,39,28,27,27,27,27,27,27,+ 27,27,31,33,35,35,35,35,35,35,35,35,35,35,170,105,0,0,0,0,0,0,0,137,+ 44,44,44,39,39,37,37,39,39,39,29,27,27,27,27,27,27,27,27,27,27,29,35,35,+ 35,35,35,35,35,35,35,35,35,35,177,105,0,0,0,0,0,106,44,39,39,39,39,39,+ 39,39,39,30,27,27,27,27,27,27,27,27,27,27,26,31,33,35,35,35,35,35,35,35,+ 35,35,35,35,35,35,159,105,0,0,0,167,39,39,39,37,39,39,39,39,35,27,27,27,+ 27,27,27,27,27,27,27,27,27,26,29,35,35,35,35,35,35,35,35,35,35,35,35,35,+ 35,35,106,0,0,204,44,37,37,39,39,39,39,35,26,27,27,27,27,27,27,27,27,27,+ 27,27,27,26,26,33,35,35,35,35,35,35,35,35,35,35,35,35,35,38,106,0,0,220,+ 44,37,39,39,39,39,38,31,26,26,27,27,27,27,27,27,27,27,27,27,27,26,26,31,+ 35,35,35,35,35,35,35,35,35,35,35,35,38,37,106,0,0,220,44,39,39,39,39,39,+ 31,26,26,26,27,27,27,27,27,27,27,26,26,27,27,26,26,26,33,35,35,35,35,35,+ 35,35,35,35,35,38,37,37,106,0,0,221,44,37,39,39,39,31,26,26,26,26,26,27,+ 26,26,26,26,26,26,26,26,26,26,26,26,29,33,35,35,35,35,35,35,35,35,38,37,+ 37,39,105,0,0,228,44,37,39,39,32,26,26,26,26,26,26,26,26,26,26,26,26,26,+ 26,26,26,26,26,26,26,33,33,35,35,35,35,35,35,39,39,37,37,39,104,0,0,228,+ 45,39,39,35,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,+ 26,28,33,33,35,35,35,35,38,39,39,37,39,39,56,0,0,45,45,39,35,26,26,26,+ 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,33,33,35,35,+ 35,39,37,39,39,39,39,39,54,0,135,45,45,39,26,26,26,26,26,26,26,26,26,26,+ 26,26,26,26,26,26,25,25,26,26,26,26,18,26,28,33,35,35,39,39,39,39,39,39,+ 39,39,0,0,135,45,45,33,16,16,18,18,18,16,16,25,25,25,25,25,25,25,26,25,+ 25,25,26,26,26,26,26,26,26,33,35,39,39,39,39,39,39,39,39,39,0,0,136,45,+ 44,33,25,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,+ 18,18,25,29,39,39,39,39,39,39,39,39,39,207,0,0,174,45,44,33,28,16,16,16,+ 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,28,39,39,+ 39,39,39,39,39,39,39,207,0,0,174,45,39,33,33,18,16,16,16,16,16,16,16,16,+ 16,16,16,16,16,16,16,16,16,16,16,16,16,16,18,35,38,39,39,39,39,39,39,39,+ 39,200,0,0,197,45,38,33,33,29,16,16,16,16,16,16,16,16,16,16,16,16,16,16,+ 16,16,16,16,16,16,16,16,32,35,35,38,39,39,39,39,39,39,39,188,0,0,204,44,+ 35,33,33,33,26,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,+ 16,27,33,35,33,35,39,39,39,39,39,39,37,181,0,0,205,44,35,35,33,33,32,16,+ 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,18,35,35,35,33,33,+ 38,39,39,39,39,39,37,158,0,0,220,38,35,35,35,33,33,27,16,16,16,16,16,16,+ 16,16,16,16,16,16,16,16,16,16,16,16,32,35,35,35,35,35,35,38,39,39,39,39,+ 39,137,0,0,227,38,38,38,35,35,35,33,18,18,18,18,16,16,16,16,16,16,16,16,+ 16,18,18,18,18,27,35,35,35,35,35,35,38,38,39,39,39,39,39,137,0,0,207,38,+ 38,38,35,35,35,35,29,25,18,18,18,16,16,16,16,16,16,18,18,18,18,18,18,33,+ 35,35,35,35,35,35,38,38,38,39,39,39,39,106,0,0,207,38,38,38,35,35,35,35,+ 33,26,25,25,18,18,16,16,16,16,18,18,18,18,18,18,30,33,35,35,35,35,35,35,+ 38,38,38,39,39,39,39,105,0,0,38,38,38,38,38,35,35,35,35,32,25,25,25,18,+ 25,25,18,18,18,18,18,18,18,27,33,35,35,35,35,35,38,38,38,38,38,38,39,39,+ 39,104,0,0,38,38,38,38,38,38,35,35,35,33,27,25,25,18,25,18,18,18,25,25,+ 25,18,18,33,35,35,35,33,35,38,38,38,38,38,38,38,39,39,39,104,0,0,189,38,+ 38,38,38,38,35,35,35,35,33,25,25,25,18,18,18,18,25,25,25,25,32,35,35,35,+ 35,35,38,35,38,35,35,38,38,38,38,39,37,50,0,0,0,106,201,38,38,38,35,35,+ 35,35,33,29,25,18,18,18,25,25,25,25,25,31,35,35,35,35,35,38,38,35,35,35,+ 38,38,38,38,38,38,196,0,0,0,0,0,50,107,38,38,38,35,35,35,35,33,26,18,+ 18,18,18,25,25,25,26,35,35,35,35,35,38,38,38,35,35,38,38,38,38,38,38,38,+ 201,0,0,0,0,0,0,0,50,144,38,35,35,35,35,33,32,26,18,18,26,25,25,26,+ 32,35,35,35,35,35,38,38,38,38,38,38,38,38,38,38,201,139,105,0,0,0,0,0,+ 0,0,0,0,55,177,35,35,35,35,33,27,26,26,26,26,26,29,35,35,35,35,35,38,+ 38,38,38,38,38,38,38,182,107,54,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 106,190,35,35,35,30,18,26,26,26,26,35,35,35,35,35,35,38,38,38,38,38,182,107,+ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,107,190,35,33,+ 28,26,26,26,33,35,35,35,35,35,35,38,38,200,167,240,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,107,33,33,26,26,29,35,35,+ 35,35,38,39,221,224,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,50,139,29,27,35,35,39,45,227,231,240,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,55,107,106,135,240,240,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,137,170,32,150,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,222,35,31,32,+ 32,32,178,107,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,104,198,222,44,33,31,31,29,32,32,32,32,35,169,+ 104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,136,220,45,45,44,30,29,31,31,31,32,32,32,32,32,33,38,189,105,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,174,221,45,45,45,44,+ 32,29,29,31,31,31,29,32,32,32,32,32,30,33,38,143,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,104,198,228,45,45,45,45,44,32,29,29,29,29,29,31,+ 29,32,32,32,32,32,30,30,30,38,189,67,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,104,45,45,45,45,45,45,39,29,29,29,29,29,28,28,29,31,32,32,32,32,30,+ 30,30,30,30,33,201,137,0,0,0,0,0,0,0,0,0,0,0,0,0,204,45,45,45,+ 45,45,39,29,28,28,28,28,27,28,28,27,31,32,32,30,30,30,30,30,30,30,32,32,+ 35,182,50,0,0,0,0,0,0,0,0,0,0,0,228,45,45,45,45,38,29,28,28,28,+ 28,28,27,28,27,27,31,29,29,32,30,30,30,32,30,30,32,32,32,32,190,106,0,0,+ 0,0,0,0,0,0,0,186,45,45,45,45,38,28,28,28,28,28,28,28,28,28,27,27,+ 31,29,29,29,28,30,32,32,30,30,32,32,32,32,32,33,144,50,0,0,0,0,0,0,+ 0,221,45,45,45,35,31,27,28,28,28,28,28,28,28,27,27,27,27,31,29,29,29,32,+ 32,32,32,30,30,32,32,32,32,32,32,178,106,0,0,0,0,0,104,45,45,45,35,31,+ 31,27,28,28,28,28,28,28,27,27,27,27,27,31,29,29,29,29,32,32,32,30,30,32,+ 32,32,32,32,32,32,33,139,50,0,0,0,204,45,45,32,31,31,31,27,27,27,27,27,+ 27,27,27,27,27,27,27,31,29,29,29,29,32,32,32,32,30,30,32,32,32,32,32,30,+ 30,30,164,0,0,0,222,45,32,31,31,31,27,27,27,27,27,27,27,27,27,27,27,27,+ 26,31,27,28,28,29,29,32,32,32,30,30,32,32,32,30,30,30,33,35,163,0,0,186,+ 44,32,31,31,31,31,31,27,27,27,27,27,27,27,27,27,27,27,26,26,27,28,28,29,+ 29,29,29,29,32,30,32,32,32,30,30,33,38,38,139,0,0,207,29,31,27,27,31,31,+ 31,31,27,27,27,26,26,26,26,26,26,26,26,26,26,28,28,28,28,29,29,28,29,30,+ 32,32,32,33,38,38,38,38,106,0,106,31,27,27,27,27,31,31,31,26,27,27,26,26,+ 26,26,26,26,26,26,26,26,26,28,28,28,28,29,29,28,28,28,30,33,35,35,38,38,+ 38,38,55,0,139,31,27,27,27,27,31,31,26,26,26,26,26,26,26,31,31,31,26,26,+ 26,26,26,28,28,28,28,29,29,28,28,30,35,35,35,35,38,38,38,38,0,0,176,31,+ 27,27,27,26,26,26,26,26,26,26,26,26,26,31,31,31,26,26,26,27,27,27,28,28,+ 28,28,28,30,33,35,35,35,35,35,38,35,38,183,0,0,176,33,31,31,26,26,26,26,+ 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,28,28,28,28,33,35,35,35,+ 35,35,35,35,38,38,38,144,0,0,162,38,31,31,31,26,26,26,26,26,26,26,25,25,+ 25,25,25,25,25,26,26,26,26,26,28,28,30,33,33,35,35,35,35,35,35,35,35,38,+ 38,107,0,0,162,39,32,31,31,26,26,26,26,26,26,26,25,25,25,25,25,18,18,18,+ 18,18,25,25,29,33,33,33,35,35,35,35,35,35,35,35,35,35,35,105,0,0,189,39,+ 38,31,31,31,26,26,26,26,26,26,26,26,26,18,18,18,18,25,18,16,16,25,32,33,+ 35,35,35,35,35,35,35,35,35,35,35,35,35,56,0,0,200,39,39,29,31,26,26,27,+ 26,26,26,26,26,26,26,26,18,18,25,25,25,25,25,31,32,32,35,35,35,35,35,35,+ 35,35,35,35,35,35,190,0,0,0,201,39,39,35,26,26,26,27,26,26,26,26,26,26,+ 26,26,18,18,25,25,25,25,26,29,32,32,33,33,35,35,35,35,35,35,35,35,38,38,+ 170,0,0,0,207,37,39,39,29,27,27,27,26,26,26,26,26,26,26,18,18,25,25,25,+ 25,26,29,29,32,32,30,33,35,35,35,35,35,35,35,38,38,38,107,0,0,0,207,37,+ 39,39,35,26,27,27,26,26,26,26,26,26,18,18,18,18,25,25,25,29,32,32,32,32,+ 30,30,35,35,35,35,35,35,35,38,38,38,105,0,0,0,207,37,39,39,38,31,26,26,+ 26,26,26,26,26,26,26,18,18,18,18,18,29,32,32,32,32,30,30,30,33,35,35,35,+ 35,35,35,38,38,38,50,0,0,0,207,37,37,39,39,33,26,26,26,26,26,26,26,26,+ 26,26,18,18,18,28,29,32,32,32,32,32,30,30,30,33,35,35,35,35,38,38,38,190,+ 0,0,0,0,206,37,37,39,39,38,31,26,26,26,26,26,26,26,26,26,26,26,27,28,+ 32,32,32,32,32,32,30,30,30,30,35,35,35,35,38,38,38,170,0,0,0,0,104,206,+ 39,39,39,39,32,26,26,26,26,26,26,26,26,26,26,26,29,32,32,32,32,32,30,30,+ 30,30,30,33,33,35,35,38,38,38,38,107,0,0,0,0,0,67,206,39,39,39,38,26,+ 26,26,26,26,26,26,26,26,26,29,32,32,32,32,30,30,30,30,30,30,30,33,33,35,+ 35,35,35,38,38,105,0,0,0,0,0,0,67,207,39,39,39,32,27,27,27,26,26,26,+ 26,26,31,32,32,32,32,30,30,30,30,30,30,33,33,33,33,35,35,35,38,38,38,50,+ 0,0,0,0,0,0,0,50,200,39,39,38,27,27,27,27,26,26,26,31,32,32,32,32,+ 32,30,30,30,30,33,33,33,33,33,33,33,35,35,38,38,190,0,0,0,0,0,0,0,+ 0,0,54,207,39,39,28,27,27,27,26,26,26,29,32,32,32,32,30,30,30,30,30,33,+ 33,33,35,33,33,33,35,35,38,38,149,0,0,0,0,0,0,0,0,0,0,104,207,39,+ 35,27,27,27,26,26,31,32,32,32,32,32,30,30,30,30,33,33,33,33,33,33,33,33,+ 33,33,35,38,107,0,0,0,0,0,0,0,0,0,0,0,54,207,38,28,27,27,26,31,+ 32,32,32,32,30,30,30,30,30,33,33,33,33,33,33,33,33,33,33,33,35,38,68,0,+ 0,0,0,0,0,0,0,0,0,0,0,56,201,33,27,27,27,32,32,32,32,30,30,33,+ 30,33,33,33,33,33,33,33,33,33,35,35,183,159,107,106,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,54,201,27,27,29,32,32,32,33,33,33,33,33,33,33,33,38,39,+ 44,44,222,220,203,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,50,160,29,32,32,32,33,35,39,39,44,45,46,46,48,246,244,242,240,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,107,107,168,+ 220,233,244,244,245,246,245,243,242,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,139,140,+ 171,28,28,38,149,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,104,205,35,32,32,29,27,27,28,38,38,+ 158,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,166,227,44,33,32,32,32,28,27,27,27,27,33,38,38,201,138,54,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,186,221,45,+ 39,32,32,32,32,32,27,27,27,27,27,27,30,38,38,38,38,189,106,50,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,104,227,45,44,35,32,32,32,32,32,32,+ 27,18,18,27,27,27,18,28,38,38,38,38,38,39,105,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,104,228,45,39,30,32,32,32,32,32,32,32,27,18,18,18,18,18,+ 18,19,19,30,38,38,38,38,201,50,0,0,0,0,0,0,0,0,0,0,0,0,0,104,+ 228,45,38,32,30,30,32,32,32,28,29,29,18,18,18,18,18,18,18,18,18,18,30,38,+ 38,38,38,162,0,0,0,0,0,0,0,0,0,0,0,0,104,228,44,33,32,32,30,30,+ 28,29,29,29,29,29,18,18,18,18,18,18,18,18,18,18,18,28,35,38,38,38,106,0,+ 0,0,0,0,0,0,0,0,0,104,228,39,32,32,30,30,30,30,28,28,28,29,29,29,+ 18,18,18,18,18,18,18,18,18,18,18,18,18,33,38,38,38,54,0,0,0,0,0,0,+ 0,0,104,222,35,32,32,32,30,30,30,28,28,28,28,29,29,29,18,18,18,18,18,18,+ 18,18,18,18,18,18,18,18,28,38,38,190,0,0,0,0,0,0,0,135,207,32,32,32,+ 32,30,28,28,28,28,28,28,28,28,29,29,18,18,18,18,18,18,18,18,18,18,18,18,+ 18,18,18,28,35,38,107,0,0,0,0,0,105,183,32,32,32,32,29,28,28,28,28,28,+ 28,28,28,28,29,27,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,30,+ 38,55,0,0,0,106,32,32,32,32,32,32,29,28,28,29,29,29,29,28,28,28,29,27,+ 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,28,183,0,0,108,32,+ 32,32,32,32,32,32,29,28,28,29,29,29,29,29,28,29,31,27,18,18,18,18,18,18,+ 18,18,18,18,18,18,18,18,18,18,18,18,18,19,108,0,33,30,30,32,32,32,29,29,+ 29,29,29,29,29,29,29,29,28,31,31,26,18,18,18,18,18,18,18,18,18,18,18,18,+ 18,18,18,18,18,18,18,18,28,51,145,32,30,32,32,29,29,29,29,29,29,31,31,31,+ 31,31,31,31,31,26,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,28,+ 28,30,30,104,107,32,32,32,32,32,29,29,29,31,31,31,31,31,31,31,31,27,27,18,+ 18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,28,30,30,30,30,38,104,50,32,+ 32,32,32,32,32,31,31,31,31,31,31,31,31,31,27,27,27,18,18,18,18,18,18,18,+ 18,18,18,18,18,27,28,32,30,30,30,30,30,30,39,104,0,178,32,32,32,32,32,31,+ 31,31,31,31,31,31,31,27,27,27,27,18,18,18,18,18,18,18,18,18,18,28,29,32,+ 32,32,30,30,30,30,30,33,44,104,0,108,32,32,32,32,29,29,29,31,31,31,31,31,+ 27,27,27,27,27,18,18,18,18,18,18,18,27,29,28,28,29,29,32,32,30,30,30,32,+ 30,38,44,56,0,106,32,32,32,32,29,29,29,31,31,29,28,27,27,27,27,27,26,18,+ 16,18,18,27,29,29,29,29,28,28,29,32,32,30,30,32,32,32,30,39,44,0,0,104,+ 33,32,32,32,29,29,29,29,29,29,28,28,27,31,27,31,31,26,26,31,27,27,29,29,+ 31,29,28,28,29,29,32,32,32,32,32,32,32,44,45,56,0,0,178,32,32,32,29,29,+ 29,29,29,29,28,28,27,31,31,31,31,31,31,31,31,31,29,29,29,29,29,29,29,32,+ 32,32,32,32,32,32,35,45,45,0,0,0,144,32,30,30,32,29,29,29,29,28,28,27,+ 31,31,31,31,31,31,31,31,31,31,29,28,29,29,29,29,29,32,32,32,32,32,32,32,+ 39,45,45,0,0,0,137,32,32,30,32,29,29,29,28,28,28,27,31,31,31,31,31,31,+ 27,27,27,29,28,28,29,29,29,29,32,32,32,32,32,32,32,32,45,45,222,0,0,0,+ 0,38,32,32,32,29,29,29,28,28,28,28,27,31,31,31,31,27,28,28,28,28,28,29,+ 29,29,29,32,32,32,32,32,32,32,32,35,45,45,228,0,0,0,0,200,32,32,32,29,+ 29,29,29,28,28,28,28,27,31,31,31,31,29,28,28,28,29,29,29,29,29,29,32,32,+ 32,32,32,32,32,39,45,45,222,0,0,0,0,187,32,32,32,29,29,29,28,28,28,28,+ 28,28,31,31,31,29,28,28,28,29,28,29,29,29,29,29,32,32,32,30,30,30,33,44,+ 45,45,186,0,0,0,0,104,35,32,32,29,29,29,29,29,29,28,28,28,29,31,31,29,+ 29,28,28,28,28,28,29,29,28,32,32,32,32,30,30,30,38,45,45,220,0,0,0,0,+ 0,0,177,32,32,29,29,29,29,29,29,28,29,29,29,29,31,29,29,29,29,28,28,28,+ 28,29,29,32,32,32,32,30,30,30,39,45,222,104,0,0,0,0,0,0,106,32,32,29,+ 29,29,29,31,29,29,29,29,29,29,29,29,28,29,28,28,28,28,29,29,29,32,32,32,+ 30,30,30,30,44,45,197,0,0,0,0,0,0,0,0,183,30,28,29,29,31,31,29,29,+ 29,29,29,28,28,28,28,28,30,28,30,32,32,32,32,32,32,32,32,32,32,38,45,220,+ 0,0,0,0,0,0,0,0,0,139,30,32,29,29,29,31,32,29,32,32,29,28,28,30,+ 30,30,30,32,32,32,32,32,32,32,32,32,32,32,32,39,228,104,0,0,0,0,0,0,+ 0,0,0,105,30,32,32,29,29,32,29,32,32,32,32,30,30,30,30,32,32,32,32,32,+ 32,32,32,32,32,32,32,32,33,45,186,0,0,0,0,0,0,0,0,0,0,0,164,30,+ 32,32,32,32,32,32,32,32,32,30,30,30,30,32,32,32,32,32,32,32,32,32,32,32,+ 30,32,38,221,0,0,0,0,0,0,0,0,0,0,0,0,108,32,32,32,32,32,32,32,+ 32,32,30,30,30,30,30,32,32,32,32,32,30,30,32,33,32,32,30,30,207,104,0,0,+ 0,0,0,0,0,0,0,0,0,0,68,32,32,32,32,32,32,32,30,30,30,30,30,30,+ 32,32,32,32,32,30,30,33,33,30,33,30,30,33,179,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,160,32,32,32,32,32,32,32,32,30,30,30,32,32,30,30,30,30,30,+ 33,33,30,30,30,30,30,153,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,106,+ 108,145,170,190,39,39,39,39,38,38,38,38,38,38,38,38,38,38,38,38,38,38,35,183,+ 183,69,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,217,+ 218,224,226,227,235,46,46,46,46,46,235,234,226,225,224,217,217,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 184,224,202,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49,49,+ 49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,+ 49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,+ 49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,+ 49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,23,+ 23,23,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,+ 46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,+ 46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,+ 46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,23,23,40,49,49,23,+ 23,49,49,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,+ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,49,49,23,23,49,49,23,+ 49,49,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,+ 3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,+ 6,6,6,6,6,6,6,6,6,6,6,6,6,7,6,6,5,4,49,40,40,49,49,46,+ 49,1,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,6,7,7,7,7,7,7,7,7,+ 7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,7,6,5,4,49,40,49,49,46,+ 1,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,+ 6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,5,23,46,49,49,46,+ 2,2,2,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,6,23,46,49,49,46,+ 2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,+ 6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,23,46,49,49,46,+ 2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,+ 6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,6,23,46,49,49,46,+ 2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,+ 6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,6,23,46,49,49,46,+ 2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,+ 6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,23,46,49,49,46,+ 2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,+ 6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,6,23,46,49,49,46,+ 2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,+ 6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,+ 7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,+ 6,6,6,6,6,7,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,+ 6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,6,23,46,49,49,46,+ 2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,+ 6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,+ 6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,+ 7,8,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,5,6,6,6,6,+ 6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,+ 7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,+ 6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,+ 7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,+ 6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,+ 7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 1,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,+ 3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,+ 6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,+ 7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,+ 3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,+ 6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,+ 7,7,7,7,7,8,7,8,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 1,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,+ 3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,+ 6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,+ 7,7,7,7,7,7,8,7,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,+ 3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,+ 6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,+ 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 1,2,2,2,2,2,2,2,2,2,2,2,3,2,3,3,3,3,3,3,3,3,3,3,+ 3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,6,7,7,7,7,7,7,7,7,+ 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 1,2,2,2,2,2,2,2,2,2,2,2,2,3,2,3,3,3,3,3,3,3,3,3,+ 3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,+ 7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 1,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,3,3,3,3,3,3,3,3,+ 3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,+ 7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 1,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,3,3,3,3,3,3,3,3,+ 3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,+ 7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,7,6,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,+ 3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,+ 7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,7,7,6,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,3,3,3,3,3,3,+ 3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,6,7,7,7,7,+ 7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,7,7,6,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,+ 3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,+ 7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,7,7,6,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,+ 3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,+ 7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,7,7,6,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,3,3,+ 3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,7,7,6,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,+ 3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,7,6,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,+ 3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,+ 3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,+ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,+ 6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,+ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,+ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,+ 7,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,6,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,+ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,+ 6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,5,23,46,49,49,46,+ 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,+ 3,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,+ 6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,6,5,23,46,49,49,46,+ 1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,+ 2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,+ 6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,6,5,5,23,40,49,49,46,+ 49,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,+ 2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,+ 3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5,5,3,49,40,49,49,23,+ 49,49,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,+ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,+ 3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,5,+ 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,49,40,40,49,49,23,+ 23,40,49,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,23,23,23,23,23,+ 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,+ 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,+ 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,49,40,15,23,49,49,40,+ 23,40,40,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,+ 46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,+ 46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,+ 46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,40,40,40,23,40,49,49,49,+ 49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,+ 49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,+ 49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,+ 49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117,133,123,122,88,+ 87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,87,88,0,0,0,0,0,0,118,213,214,117,87,123,+ 214,123,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,88,122,133,132,122,117,0,0,0,0,87,123,0,87,118,132,123,+ 123,132,118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,87,133,133,117,214,87,0,117,89,0,0,0,133,88,0,0,0,0,41,+ 87,87,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,88,214,117,0,0,117,123,0,0,118,89,0,87,133,0,0,0,0,0,214,+ 87,0,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,122,214,0,0,0,0,133,87,0,0,117,122,117,88,0,0,0,0,0,214,+ 87,0,123,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,88,214,0,0,0,0,88,134,87,0,87,133,133,0,0,0,0,0,0,213,+ 87,0,122,117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,41,87,0,0,0,0,122,133,132,41,214,41,132,87,0,0,0,0,133,+ 87,0,88,41,88,0,0,0,122,214,123,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,133,88,0,87,118,123,123,118,117,117,122,123,133,214,133,117,87,0,132,+ 87,87,122,132,117,122,123,214,133,87,122,117,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 87,117,116,115,0,122,118,123,123,87,0,0,0,0,0,0,0,0,0,116,132,132,132,133,+ 214,214,117,87,122,41,123,87,117,122,0,133,88,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,118,+ 214,123,122,123,132,132,123,87,0,0,0,0,0,0,0,0,0,0,0,0,0,88,122,133,+ 88,0,122,214,122,87,0,0,0,123,117,0,133,87,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,133,+ 123,122,0,0,117,122,0,0,0,0,0,0,88,122,214,133,118,116,0,0,0,0,0,117,+ 133,115,214,0,0,0,0,0,0,0,133,87,122,133,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,117,+ 0,87,122,213,122,0,0,0,0,88,121,120,87,87,87,87,88,89,87,0,0,0,0,0,+ 88,132,122,132,87,0,0,0,0,0,88,214,133,88,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,118,0,+ 0,0,87,134,0,0,0,87,133,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,132,89,132,0,0,0,0,0,122,87,132,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,122,0,+ 0,0,118,88,0,0,88,214,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,123,123,133,87,0,0,117,89,117,124,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,122,0,+ 0,0,122,0,0,87,41,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,122,122,123,0,88,123,87,41,123,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133,118,+ 0,88,118,0,0,133,41,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,123,133,88,133,117,133,89,123,0,87,133,133,133,133,133,133,133,133,133,+ 133,133,133,133,133,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,123,0,0,0,0,0,+ 0,0,0,0,133,133,133,88,0,0,0,0,0,0,0,0,0,0,0,0,133,133,133,117,+ 0,0,133,133,133,88,0,0,133,133,133,115,0,115,133,133,133,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,122,+ 117,132,88,0,117,41,123,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,122,41,41,123,87,122,214,87,0,116,116,116,116,116,116,121,133,116,+ 116,116,116,116,116,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,133,0,0,0,0,0,+ 0,0,0,0,41,41,41,133,0,0,0,0,0,0,0,0,0,0,0,116,41,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 117,41,0,0,132,41,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,117,117,87,0,123,134,89,117,118,88,0,0,0,0,0,116,133,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,133,0,0,0,0,0,+ 0,0,0,0,41,41,41,41,87,0,0,0,0,0,0,0,0,0,0,133,41,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,214,0,0,133,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,131,0,134,123,0,0,0,0,118,213,118,87,0,0,116,133,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,133,0,0,0,0,0,+ 0,0,0,0,41,41,41,41,118,0,0,0,0,0,0,0,0,0,87,41,41,41,41,118,+ 0,0,116,117,117,87,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,214,0,115,122,122,0,0,0,0,0,0,0,0,87,122,124,117,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,116,117,41,132,122,117,88,88,88,122,133,89,0,0,116,133,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,133,0,0,0,0,0,+ 0,0,0,0,41,41,41,41,133,0,0,0,0,0,0,0,0,0,118,41,41,41,41,118,+ 0,0,0,0,0,0,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 87,214,0,116,122,116,0,0,0,0,0,0,0,117,123,115,0,116,133,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,120,214,0,0,0,115,115,121,123,115,118,0,0,116,133,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,133,0,0,0,0,0,+ 0,0,0,0,41,41,41,41,41,87,0,0,0,0,0,0,0,0,133,41,41,41,41,118,+ 0,0,0,0,0,0,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 117,214,0,116,117,0,0,0,0,0,0,0,88,133,0,0,0,0,132,87,116,0,0,0,+ 0,0,0,0,0,0,0,0,119,214,87,0,0,0,0,0,122,0,123,0,0,116,133,0,+ 0,0,0,0,0,0,88,117,0,88,117,118,87,0,0,87,89,118,118,118,89,87,0,0,+ 0,0,0,0,0,0,0,87,117,118,118,118,88,0,0,0,0,116,133,0,0,0,0,0,+ 87,118,88,0,41,41,41,41,41,123,0,0,0,0,0,0,0,87,41,41,41,41,41,118,+ 0,0,117,118,118,87,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,0,0,+ 0,87,89,118,118,118,89,87,0,0,0,0,0,0,87,117,118,118,117,88,0,0,0,0,+ 87,118,0,87,117,118,118,118,89,87,0,0,0,87,117,118,118,118,88,0,0,0,87,132,+ 214,41,0,116,117,115,0,0,0,0,0,0,122,88,0,0,0,0,123,0,88,117,0,0,+ 0,0,0,0,0,0,0,0,119,123,89,0,0,0,0,0,122,0,123,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,132,41,213,133,87,0,117,41,214,133,133,133,214,41,117,0,+ 0,0,0,0,0,0,118,41,214,133,133,133,214,41,88,0,0,116,133,0,0,0,0,0,+ 132,134,0,0,41,41,41,41,41,41,0,0,0,0,0,0,0,123,41,41,41,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,0,0,+ 117,41,214,133,133,133,214,41,89,0,0,0,0,122,41,214,133,133,133,214,214,87,0,0,+ 88,41,122,41,214,133,133,133,214,41,117,0,122,41,214,133,133,133,214,41,88,0,133,88,+ 87,41,87,0,118,130,0,0,0,0,0,0,123,0,0,0,0,0,88,123,0,123,88,0,+ 0,0,0,0,0,0,0,0,0,117,122,0,0,0,0,0,122,115,132,0,0,116,133,0,+ 0,0,0,0,0,0,117,41,133,87,0,0,0,88,214,117,0,0,0,0,0,88,214,88,+ 0,0,0,0,0,117,134,88,0,0,0,0,0,117,214,87,0,116,133,0,0,0,0,123,+ 133,87,0,0,41,41,41,41,41,41,117,0,0,0,0,0,87,41,41,41,41,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,0,88,+ 214,88,0,0,0,0,0,117,214,88,0,0,118,134,88,0,0,0,0,0,122,214,87,0,+ 88,41,134,88,0,0,0,0,0,117,214,122,134,88,0,0,0,0,0,117,214,87,122,0,+ 0,214,89,0,122,132,0,0,0,0,0,0,122,0,0,0,0,0,0,117,117,87,133,0,+ 0,0,0,0,0,0,0,0,0,87,133,0,0,0,0,0,118,41,132,0,0,116,133,0,+ 0,0,0,0,0,0,117,41,87,0,0,0,0,214,118,0,0,0,0,0,0,0,117,214,+ 0,0,0,0,0,41,88,0,0,0,0,0,0,0,122,133,0,116,133,0,0,0,118,41,+ 87,0,0,0,41,41,41,41,41,41,133,0,0,0,0,0,117,41,41,41,41,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,0,214,+ 117,0,0,0,0,0,0,0,117,214,0,0,214,87,0,0,0,0,0,0,0,132,123,0,+ 88,41,117,0,0,0,0,0,0,0,122,41,89,0,0,0,0,0,0,0,122,133,88,117,+ 0,123,122,0,118,117,88,0,0,0,0,0,116,0,0,0,0,0,0,0,89,118,214,0,+ 0,0,0,0,0,0,0,0,0,87,133,0,0,87,117,123,123,89,0,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,0,0,0,0,87,134,88,0,0,0,0,0,0,0,87,41,+ 87,0,0,0,88,41,87,0,0,0,0,0,0,0,88,133,0,116,133,0,0,117,214,88,+ 0,0,0,0,41,41,41,122,41,41,41,87,0,0,0,0,133,41,41,133,133,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,87,41,+ 87,0,0,0,0,0,0,0,87,134,87,116,214,0,0,0,0,0,0,0,0,116,133,0,+ 88,41,87,0,0,0,0,0,0,0,88,41,87,0,0,0,0,0,0,0,88,41,0,214,+ 0,116,133,0,117,115,123,0,0,0,0,0,0,120,0,0,0,0,0,0,0,118,41,0,+ 0,0,0,0,0,0,0,0,0,129,118,120,123,41,214,115,0,0,0,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,41,+ 87,0,0,0,88,41,0,0,0,0,0,0,0,0,0,0,0,116,133,0,88,41,89,0,+ 0,0,0,0,41,41,41,115,41,41,41,118,0,0,0,0,41,41,41,117,133,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,87,41,+ 87,0,0,0,0,0,0,0,0,0,0,116,133,0,0,0,0,0,0,0,0,116,133,0,+ 88,41,115,0,0,0,0,0,0,0,88,41,87,0,0,0,0,0,0,0,88,41,0,123,+ 118,88,41,87,87,121,133,0,0,0,0,0,0,87,87,0,0,0,0,0,0,88,133,0,+ 0,0,0,0,0,0,0,0,0,210,0,122,122,123,133,0,0,0,0,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,41,+ 87,0,0,0,88,41,0,0,0,0,0,0,0,0,0,0,0,116,133,87,134,117,0,0,+ 0,0,0,0,41,41,41,115,123,41,41,214,0,0,0,122,41,41,214,0,133,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,87,41,+ 87,0,0,0,0,0,0,0,0,0,0,116,133,0,0,0,0,0,0,0,0,116,133,0,+ 88,41,115,0,0,0,0,0,0,0,88,41,87,0,0,0,0,0,0,0,88,41,0,87,+ 122,133,214,123,0,122,122,122,0,0,0,0,0,0,116,87,0,0,0,0,0,214,87,0,+ 0,0,0,0,0,0,0,0,0,211,87,133,123,0,122,87,0,0,0,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,41,+ 87,0,0,0,88,41,0,0,0,0,0,0,0,0,0,0,0,116,134,214,122,0,0,0,+ 0,0,0,0,41,41,41,115,89,41,41,41,88,0,0,41,41,41,123,0,133,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,87,41,+ 87,0,0,0,0,0,0,0,0,0,0,116,133,0,0,0,0,0,0,0,0,116,133,0,+ 88,41,115,0,0,0,0,0,0,0,88,41,87,0,0,0,0,0,0,0,88,41,0,0,+ 0,0,87,214,87,87,121,41,87,0,0,0,0,0,0,117,118,88,88,89,133,117,0,0,+ 0,0,0,0,0,0,0,0,0,131,123,118,0,0,87,133,87,0,0,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,0,0,0,0,0,0,87,122,133,214,214,214,214,214,214,41,+ 87,0,0,0,88,41,0,0,0,0,0,0,0,0,0,0,0,116,41,214,0,0,0,0,+ 0,0,0,0,41,41,41,115,87,41,41,41,123,0,88,41,41,41,89,0,133,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,87,41,+ 87,0,0,0,0,0,0,0,0,0,0,116,133,0,0,0,0,0,0,0,0,116,133,0,+ 88,41,115,0,0,0,0,0,0,0,88,41,87,0,0,0,0,0,0,0,88,41,0,0,+ 0,0,0,88,118,0,116,117,122,0,0,0,0,0,0,0,87,123,214,214,117,0,0,0,+ 0,0,0,0,0,0,0,0,0,123,133,214,87,0,0,87,133,0,0,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,0,0,0,0,0,0,133,133,88,0,0,0,0,0,115,41,+ 87,0,0,0,88,41,0,0,0,0,0,0,0,0,0,0,0,116,214,41,117,0,0,0,+ 0,0,0,0,41,41,41,115,0,123,41,41,214,0,123,41,41,41,0,0,133,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,87,41,+ 87,0,0,0,0,0,0,0,0,0,0,116,133,0,0,0,0,0,0,0,0,116,133,0,+ 88,41,115,0,0,0,0,0,0,0,88,41,87,0,0,0,0,0,0,0,88,41,0,0,+ 0,0,0,0,123,87,0,121,122,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,87,123,133,87,123,117,0,0,88,132,0,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,0,0,0,0,0,123,133,0,0,0,0,0,0,0,87,41,+ 87,0,0,0,88,41,0,0,0,0,0,0,0,0,0,0,0,116,133,88,214,88,0,0,+ 0,0,0,0,41,41,41,115,0,87,41,41,41,117,214,41,41,122,0,0,133,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,87,41,+ 87,0,0,0,0,0,0,0,0,0,0,116,133,0,0,0,0,0,0,0,0,116,133,0,+ 88,41,115,0,0,0,0,0,0,0,88,41,87,0,0,0,0,0,0,0,88,41,0,0,+ 0,0,0,0,88,133,0,87,116,116,88,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,89,133,118,0,0,121,123,0,0,122,89,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,0,0,0,0,0,41,88,0,0,0,0,0,0,0,87,41,+ 87,0,0,0,88,41,0,0,0,0,0,0,0,0,0,0,0,116,133,0,117,41,87,0,+ 0,0,0,0,41,41,41,115,0,0,133,41,41,41,41,41,41,87,0,0,133,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,87,41,+ 87,0,0,0,0,0,0,0,0,0,0,116,133,0,0,0,0,0,0,0,0,116,133,0,+ 88,41,115,0,0,0,0,0,0,0,88,41,87,0,0,0,0,0,0,0,88,41,0,0,+ 0,0,0,0,87,41,89,0,88,116,122,88,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,123,214,87,0,0,0,88,132,122,134,87,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,0,0,0,0,87,41,88,0,0,0,0,0,0,0,87,41,+ 87,0,0,0,88,41,0,0,0,0,0,0,0,0,87,123,0,116,133,0,0,118,134,87,+ 0,0,0,0,41,41,41,115,0,0,118,41,41,41,41,41,133,0,0,0,133,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,87,41,+ 87,0,0,0,0,0,0,0,87,123,87,116,133,0,0,0,0,0,0,0,0,116,133,0,+ 88,41,115,0,0,0,0,0,0,0,88,41,87,0,0,0,0,0,0,0,88,41,0,0,+ 0,0,0,0,118,134,133,87,0,88,116,117,87,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,214,122,0,0,0,0,0,122,132,133,0,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,0,0,0,0,0,214,117,0,0,0,0,0,0,0,89,41,+ 89,0,0,0,87,41,88,0,0,0,0,0,0,0,118,213,0,116,133,0,0,0,123,214,+ 0,0,0,0,41,41,41,115,0,0,87,41,41,41,41,41,117,0,0,0,133,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,0,41,+ 89,0,0,0,0,0,0,0,89,214,0,0,41,0,0,0,0,0,0,0,0,122,123,0,+ 88,41,115,0,0,0,0,0,0,0,88,41,87,0,0,0,0,0,0,0,88,41,0,0,+ 0,0,0,0,123,88,87,133,87,0,88,117,117,123,88,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,122,214,0,0,0,0,0,87,214,122,87,0,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,0,0,0,0,0,117,134,87,0,0,0,0,0,87,134,123,+ 134,87,0,0,0,123,133,87,0,0,0,0,0,88,134,88,0,116,133,0,0,0,0,133,+ 124,0,0,0,41,41,41,115,0,0,0,133,41,41,41,41,87,0,0,0,133,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,0,0,0,0,117,+ 134,87,0,0,0,0,0,87,134,117,0,0,123,133,87,0,0,0,0,0,88,41,88,0,+ 88,41,115,0,0,0,0,0,0,0,88,41,87,0,0,0,0,0,0,0,88,41,0,0,+ 0,0,0,0,117,122,0,87,132,0,0,87,122,88,123,121,87,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,87,41,41,133,118,87,0,0,123,41,88,0,0,0,0,116,133,0,+ 0,0,0,0,0,0,117,133,0,0,0,0,0,0,122,41,132,122,122,122,132,41,123,0,+ 123,41,132,87,0,0,132,41,123,122,122,122,133,41,117,0,0,116,133,0,0,0,0,0,+ 133,132,0,0,41,41,41,115,0,0,0,88,41,41,41,132,0,0,0,0,133,41,41,118,+ 0,0,41,41,41,116,0,87,41,41,41,115,0,115,41,41,41,87,0,88,117,0,0,0,+ 123,41,132,122,122,122,132,41,122,0,0,0,0,133,214,123,122,122,122,133,41,117,0,0,+ 88,41,115,0,0,0,0,0,0,0,88,41,87,0,0,0,0,0,0,0,88,41,0,0,+ 0,0,0,0,0,117,117,0,88,132,87,0,0,88,116,121,132,132,121,117,117,118,122,123,+ 122,0,0,0,0,0,133,133,117,133,118,122,122,122,214,88,0,0,0,0,0,88,118,0,+ 0,0,0,0,0,0,88,122,0,0,0,0,0,0,0,88,122,123,123,123,122,88,0,0,+ 0,88,122,88,0,0,0,88,122,123,123,123,118,87,0,0,0,87,122,0,0,0,0,0,+ 87,123,88,0,123,123,123,87,0,0,0,0,122,123,123,88,0,0,0,0,118,123,123,88,+ 0,0,123,123,123,87,0,0,123,123,123,87,0,87,123,123,123,0,0,88,117,0,0,0,+ 0,88,122,123,123,123,122,88,0,0,0,0,0,0,88,122,123,123,123,118,87,0,0,0,+ 87,123,0,0,0,0,0,0,0,0,87,123,0,0,0,0,0,0,0,0,87,123,0,0,+ 0,0,0,0,0,0,118,88,88,214,132,88,0,0,0,0,88,118,131,133,214,41,213,122,+ 0,0,0,0,87,134,123,0,0,118,117,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,123,117,0,0,0,+ 0,0,0,88,123,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,123,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,118,122,87,0,87,117,87,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,88,123,89,133,88,0,87,122,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,41,123,0,0,0,+ 0,0,0,117,133,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,133,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,133,122,0,0,0,0,0,0,0,0,0,+ 0,87,133,123,0,0,117,133,0,0,123,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,41,123,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,133,133,117,115,120,89,88,89,118,122,+ 132,41,88,0,0,0,87,41,87,87,123,0,0,0,0,0,0,0,0,0,0,89,133,88,+ 0,0,0,133,132,0,0,122,133,133,133,124,117,0,0,88,123,133,133,133,123,87,0,118,+ 133,123,133,133,87,0,0,0,0,0,0,0,0,0,118,133,133,133,133,41,123,0,132,133,+ 132,133,118,89,133,88,88,133,118,0,0,0,87,133,132,0,87,122,133,133,133,123,88,0,+ 88,133,132,133,133,133,123,87,0,0,0,0,0,0,0,0,0,0,89,124,133,133,133,133,+ 133,0,0,118,133,133,133,133,117,0,0,88,133,123,133,133,133,123,118,133,133,133,123,117,+ 0,0,133,132,0,132,133,123,133,133,133,117,0,0,87,123,133,133,133,133,133,88,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,133,0,0,0,87,133,121,122,118,+ 0,121,118,0,0,0,0,122,123,133,0,0,0,0,0,0,0,0,0,0,0,118,41,117,+ 0,0,0,41,214,0,123,41,133,132,132,214,41,89,87,41,41,132,132,132,41,41,0,123,+ 41,214,132,132,87,0,0,0,0,0,0,0,0,122,41,133,132,132,214,41,123,0,214,41,+ 133,132,118,117,41,117,0,41,214,0,0,0,118,41,118,0,133,41,133,132,132,214,41,87,+ 88,41,41,132,132,132,41,214,0,0,0,0,0,0,0,0,0,88,41,214,132,123,133,41,+ 214,0,123,41,133,132,132,214,41,117,0,116,41,41,132,132,133,41,41,133,132,132,214,41,+ 117,0,214,214,0,213,41,133,132,132,214,41,117,0,133,41,133,123,132,41,41,116,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133,87,0,0,0,133,0,133,0,+ 0,0,89,122,0,0,88,122,123,0,0,0,0,0,0,0,0,0,0,0,0,118,41,117,+ 0,0,0,41,214,0,133,41,116,87,87,87,89,88,88,41,123,87,87,87,132,41,88,123,+ 41,116,0,0,0,87,87,87,87,87,87,87,0,214,41,0,0,0,88,41,123,0,214,41,+ 0,0,0,117,41,117,0,118,41,122,0,0,134,41,87,0,214,41,115,87,87,122,41,117,+ 88,41,123,0,0,0,123,41,88,0,0,0,0,0,0,0,0,118,41,117,0,0,0,41,+ 214,0,88,89,87,87,87,116,41,132,0,116,41,122,0,0,0,214,41,0,0,0,88,41,+ 123,0,214,214,0,213,41,0,0,0,88,41,123,0,41,214,0,0,0,122,41,116,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,214,132,117,115,213,214,88,0,+ 0,0,0,87,133,214,133,88,0,0,0,0,0,0,0,0,0,0,0,0,0,118,41,117,+ 0,0,0,41,214,0,88,41,41,41,41,41,123,0,88,41,41,41,41,41,41,41,88,123,+ 41,116,0,0,88,41,41,41,41,41,41,41,89,213,41,0,0,0,88,41,123,0,214,41,+ 0,0,0,117,41,117,0,0,214,41,87,118,41,122,0,0,214,41,41,41,41,41,41,117,+ 88,41,123,0,0,0,123,41,88,0,0,0,0,0,0,0,0,118,41,117,0,0,0,41,+ 214,0,87,133,41,41,41,41,41,132,0,116,41,123,0,0,0,214,41,0,0,0,88,41,+ 123,0,214,214,0,213,41,0,0,0,88,41,123,0,41,214,0,0,0,122,41,116,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,117,123,122,87,0,0,+ 0,0,0,0,87,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,118,41,117,+ 0,0,0,41,214,0,0,115,89,117,117,132,41,117,88,41,133,117,117,117,117,117,87,123,+ 41,116,0,0,87,117,117,117,117,117,117,117,87,214,41,0,0,0,88,41,123,0,214,41,+ 0,0,0,117,41,117,0,0,118,41,122,214,214,0,0,0,214,41,117,117,117,117,117,87,+ 88,41,123,0,0,0,123,41,88,0,0,0,0,0,0,0,0,118,41,117,0,0,0,41,+ 214,0,123,41,123,117,117,122,41,132,0,116,41,123,0,0,0,214,41,0,0,0,88,41,+ 123,0,214,214,0,213,41,0,0,0,88,41,123,0,41,214,0,0,0,122,41,116,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117,41,132,+ 115,115,117,41,214,0,133,41,121,115,115,122,41,122,88,41,133,115,115,116,134,41,87,123,+ 41,116,0,0,0,0,0,0,0,0,0,0,0,133,41,121,115,115,122,41,123,0,214,41,+ 0,0,0,117,41,117,0,0,87,41,41,41,122,0,0,0,134,41,117,115,115,133,41,117,+ 88,41,123,0,0,0,123,41,88,0,0,0,0,0,0,0,0,117,41,132,116,116,117,41,+ 214,0,133,41,121,115,115,122,41,214,87,116,41,123,0,0,0,214,41,0,0,0,88,41,+ 123,0,214,214,0,213,41,0,0,0,88,41,123,0,214,41,116,116,116,133,41,116,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,123,41,+ 41,41,41,41,214,0,88,133,41,41,41,41,132,0,0,118,214,41,41,41,214,117,0,123,+ 41,116,0,0,0,0,0,0,0,0,0,0,0,87,133,41,41,41,41,41,123,0,214,41,+ 0,0,0,117,41,117,0,0,0,122,41,41,87,0,0,0,88,134,41,41,41,41,123,0,+ 88,41,123,0,0,0,123,41,88,0,0,0,0,0,0,0,0,0,123,41,41,41,41,41,+ 214,0,87,133,41,41,41,41,133,214,122,116,41,123,0,0,0,214,41,0,0,0,88,41,+ 123,0,41,214,0,214,41,0,0,0,88,41,123,0,89,214,41,41,41,41,41,116,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 115,115,0,115,87,0,0,0,0,115,115,0,0,0,0,0,0,115,115,87,0,0,0,87,+ 115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,115,87,0,87,87,0,87,115,+ 0,0,0,0,115,0,0,0,0,0,115,87,0,0,0,0,0,0,87,115,115,0,0,0,+ 0,115,87,0,0,0,115,87,0,0,0,0,0,0,0,0,0,0,0,0,115,115,0,41,+ 214,0,0,0,0,115,115,0,0,0,0,0,115,87,0,0,0,87,115,0,0,0,0,115,+ 87,0,115,115,0,87,115,0,0,0,0,115,87,0,0,0,115,115,87,118,41,116,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,122,122,122,122,123,41,+ 133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,122,122,122,122,122,134,41,87,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,118,41,41,41,41,41,133,+ 87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,41,41,41,41,214,88,0,+};+const cn_map_t cn_maps[CN_MAPS] = {+ {181, 51, {0,0,0,179,19,0,0,0,0,0,0,0}, {0, 0, 0, 0}, 137, 24, 0, 178, 0},+ {110, 40, {0,22,0,108,24,0,0,0,0,0,0,0}, {0, 0, 0, 0}, 1, 22, 178, 131, 59},+ {155, 55, {0,40,0,153,35,0,0,0,0,0,0,0}, {0, 0, 0, 0}, 0, 0, 309, 241, 86},+ {178, 45, {0,26,0,176,25,0,0,0,0,0,0,0}, {0, 0, 0, 0}, 0, 0, 550, 319, 120},+ {135, 45, {0,25,0,133,25,0,0,0,0,0,0,0}, {0, 0, 0, 0}, 0, 24, 869, 242, 178},+ {75, 40, {0,28,0,73,28,0,0,0,0,0,0,0}, {0, 0, 0, 0}, 0, 27, 1111, 147, 251},+ {60, 62, {0,47,0,0,0,0,0,0,0,51,61,0}, {0, 0, 0, 0}, 0, 0, 1258, 156, 261},+ {70, 60, {0,0,0,0,0,0,58,0,0,39,59,0}, {0, 0, 0, 0}, 57, 0, 1414, 222, 271},+ {44, 140, {0,0,0,42,128,0,9,0,0,0,0,0}, {0, 0, 0, 0}, 8, 0, 1636, 400, 276},+ {120, 70, {0,18,0,0,0,0,0,0,0,104,69,0}, {0, 0, 0, 0}, 0, 0, 2036, 166, 301},+ {128, 90, {0,0,0,0,0,0,122,0,0,12,89,0}, {0, 0, 0, 0}, 121, 0, 2202, 472, 363},+ {120, 65, {0,11,11,0,0,0,106,0,0,0,0,0}, {0, 0, 0, 0}, 107, 0, 2674, 238, 410},+ {140, 55, {0,0,0,138,16,10,0,0,0,10,54,0}, {0, 0, 0, 0}, 27, 42, 2912, 246, 425},+ {78, 75, {0,61,13,0,0,0,13,2,0,0,0,0}, {0, 0, 0, 0}, 12, 2, 3158, 249, 430},+ {59, 165, {0,0,0,56,14,12,0,0,0,23,164,0}, {0, 0, 0, 0}, 57, 13, 3407, 359, 440},+ {85, 125, {0,0,0,0,0,0,20,2,0,35,124,0}, {0, 0, 0, 0}, 19, 2, 3766, 343, 462},+ {80, 110, {0,0,0,0,0,0,19,0,0,74,109,0}, {0, 0, 0, 0}, 18, 0, 4109, 327, 562},+ {75, 75, {0,59,17,73,59,18,5,0,0,0,0,0}, {0, 0, 0, 0}, 4, 0, 4436, 166, 595},+ {115, 65, {0,0,0,113,18,16,0,0,0,0,0,0}, {0, 0, 0, 0}, 114, 17, 4602, 220, 609},+ {115, 65, {0,18,16,0,0,0,0,0,0,94,64,0}, {0, 0, 0, 0}, 0, 17, 4822, 185, 626},+ {70, 70, {0,0,0,0,0,0,25,0,0,10,69,0}, {0, 0, 0, 0}, 24, 0, 5007, 257, 633},+ {180, 77, {0,0,0,178,65,0,8,0,0,0,0,0}, {0, 0, 0, 0}, 7, 0, 5264, 283, 640},+ {120, 120, {0,109,0,0,0,0,0,0,0,87,119,0}, {0, 0, 0, 0}, 0, 108, 5547, 731, 647},+ {95, 110, {0,0,0,93,18,0,25,0,0,0,0,0}, {0, 0, 0, 0}, 26, 0, 6278, 326, 648},+ {95, 77, {0,15,0,0,0,0,0,0,0,74,76,0}, {0, 0, 0, 0}, 1, 15, 6604, 314, 689},+ {85, 115, {0,0,0,83,103,0,13,0,0,0,0,0}, {0, 0, 0, 0}, 14, 0, 6918, 392, 767},+ {110, 135, {0,98,0,108,13,0,0,0,0,0,0,0}, {0, 0, 0, 0}, 0, 97, 7310, 490, 780},+ {130, 90, {0,29,0,0,0,0,0,0,0,83,89,0}, {0, 0, 0, 0}, 0, 28, 7800, 256, 804},+ {85, 80, {0,0,0,83,67,0,15,0,0,0,0,0}, {0, 0, 0, 0}, 14, 0, 8056, 211, 805},+ {205, 60, {0,32,0,0,0,0,0,0,0,0,0,0}, {0, 0, 0, 0}, 0, 31, 8267, 261, 814},+ {101, 51, {0,24,-1,0,0,0,79,0,0,0,0,0}, {0, 0, 0, 0}, 80, 0, 8528, 91, 1121},+};+const uint8_t cn_map_z[8619] = {+ 237,152,97,10,134,32,12,64,147,236,34,94,162,160,251,223,43,226,131,160,150,35,220,154,+ 95,240,222,191,45,144,199,150,83,28,71,0,0,0,136,35,219,232,228,156,44,8,235,28,+ 66,74,243,212,202,178,91,159,235,110,171,193,99,230,161,157,229,178,214,46,61,124,13,164,+ 145,70,250,79,164,67,48,89,202,145,23,115,184,216,164,187,28,234,102,233,234,101,198,43,+ 150,9,127,233,227,167,206,62,177,76,252,164,215,70,227,245,94,186,92,36,108,177,76,216,+ 119,123,159,74,103,231,11,117,132,244,11,59,59,64,90,153,86,218,32,171,127,11,153,30,+ 213,226,107,125,137,232,153,214,205,82,151,46,138,116,233,42,253,201,74,35,29,252,238,225,+ 54,61,0,0,0,0,0,160,141,13,237,150,65,10,128,48,12,4,83,226,75,242,255,71,+ 122,210,131,109,52,203,6,17,220,57,150,150,217,70,76,234,46,132,16,226,142,141,7,176,+ 13,26,68,103,44,144,206,90,116,85,172,67,87,198,132,248,24,84,27,129,109,76,131,196,+ 117,84,67,135,139,113,157,5,243,116,232,156,31,199,193,179,163,123,186,82,78,241,92,149,+ 17,147,45,150,182,36,69,150,97,185,94,191,219,58,69,190,123,148,118,163,231,131,202,198,+ 166,5,235,158,124,137,22,27,254,110,242,87,108,64,134,158,255,69,252,140,29,237,217,97,+ 14,131,32,12,134,97,58,123,18,46,161,183,88,118,255,203,204,37,139,11,19,161,232,7,+ 109,98,223,63,75,92,66,158,25,65,156,211,228,121,158,215,39,22,165,35,35,65,42,182,+ 85,54,135,74,203,106,83,161,85,101,31,155,14,45,8,114,154,211,250,208,94,198,104,249,+ 5,205,6,45,119,19,176,66,107,252,114,56,45,185,105,154,162,109,119,84,54,72,139,118,+ 105,228,52,28,141,205,206,80,98,116,168,117,109,33,120,40,218,214,51,160,114,218,221,104,+ 172,70,171,207,97,210,162,9,38,241,172,68,107,249,21,78,131,209,196,125,175,158,176,255,+ 164,226,83,199,105,154,56,42,13,156,237,34,13,242,52,123,48,48,148,182,219,51,252,14,+ 40,211,210,173,92,122,224,4,173,101,151,82,167,197,127,90,188,64,67,110,238,192,103,13,+ 252,255,229,104,154,116,71,60,158,198,210,107,13,60,67,69,180,40,164,97,215,53,232,89,+ 43,14,242,56,76,157,118,97,85,234,76,235,243,170,70,243,93,143,231,13,232,13,237,216,+ 65,14,194,32,16,5,208,54,197,52,49,209,120,134,202,29,180,167,48,222,255,50,46,92,+ 33,157,63,204,12,3,46,248,27,23,182,225,73,203,8,179,44,105,130,107,228,3,45,92,+ 66,152,29,147,136,197,119,144,224,199,36,207,171,232,170,31,113,193,29,49,56,129,187,137,+ 213,224,94,98,61,184,147,216,0,238,35,182,128,187,136,77,224,30,98,27,184,131,216,8,+ 110,47,182,130,155,139,205,224,214,98,59,184,177,184,2,184,173,152,1,71,217,238,108,247,+ 23,115,51,28,69,251,95,76,174,36,102,94,137,200,239,169,211,159,191,215,21,231,195,115,+ 239,48,185,90,15,143,8,152,172,16,207,249,115,84,174,86,234,140,0,201,114,241,243,96,+ 169,160,235,223,64,188,17,167,26,68,150,139,167,115,121,189,138,240,164,21,232,111,1,89,+ 33,190,10,196,240,52,11,196,128,236,45,134,69,1,61,1,146,236,47,6,179,12,219,9,+ 20,217,93,28,138,155,6,133,228,180,84,97,241,237,251,113,17,138,55,165,152,32,51,101,+ 106,53,247,111,244,115,76,144,79,105,114,177,181,71,102,17,115,127,216,71,89,85,3,21,+ 23,4,13,249,158,134,18,23,55,9,243,42,32,189,213,220,116,12,154,137,178,77,172,181,+ 177,139,119,0,148,120,171,37,110,244,50,86,156,227,33,254,91,177,165,86,140,140,140,140,+ 140,140,208,249,0,237,216,77,14,130,48,16,5,224,142,157,149,137,198,35,104,47,33,183,+ 48,222,255,50,226,198,164,72,113,222,252,104,77,250,118,36,164,249,40,229,81,200,217,43,+ 44,77,142,12,51,201,18,234,152,21,215,36,200,52,59,126,175,120,58,184,3,69,74,113,+ 12,68,17,199,128,20,97,12,76,129,50,196,61,128,41,64,134,184,7,8,83,96,12,244,+ 26,99,24,113,10,132,17,168,0,24,145,10,57,195,174,160,115,59,82,134,195,92,144,125,+ 54,60,238,136,157,225,178,46,182,25,44,233,74,143,213,185,201,160,181,34,54,118,34,206,+ 152,214,138,248,237,172,91,10,102,200,226,194,216,247,193,56,14,198,55,25,119,209,32,135,+ 234,232,36,88,211,141,92,84,33,109,90,251,58,237,219,83,153,70,163,171,25,94,95,194,+ 102,198,226,2,177,15,232,87,171,179,145,81,15,180,60,252,204,40,94,140,82,51,10,198,+ 232,100,54,6,163,187,39,165,151,222,24,140,193,16,50,118,170,184,51,180,251,6,231,223,+ 89,190,27,135,127,201,3,237,213,81,10,128,32,12,128,225,153,67,239,209,83,208,1,58,+ 70,116,255,203,4,225,131,229,92,110,237,65,194,255,49,228,11,103,152,247,77,97,202,127,+ 14,93,10,13,168,217,142,114,255,166,12,79,80,243,86,121,245,97,72,163,168,0,69,7,+ 176,45,0,177,164,144,164,222,163,40,103,72,213,55,51,81,85,41,110,127,145,156,118,208,+ 81,196,23,192,80,110,147,140,195,179,84,48,162,208,144,98,246,39,160,110,83,212,80,217,+ 89,228,103,171,160,178,174,39,59,40,169,178,65,245,68,173,60,245,188,151,148,215,55,185,+ 78,245,83,105,91,54,26,245,213,9,237,214,65,10,128,32,16,5,208,95,166,209,53,162,+ 69,212,97,164,251,95,166,141,65,161,206,56,74,20,229,223,185,120,12,131,206,160,82,183,+ 164,115,201,161,141,75,151,99,199,2,219,252,202,150,220,145,180,132,32,126,111,201,57,91,+ 3,96,67,90,102,192,179,130,124,198,182,92,226,182,103,47,135,178,204,147,160,45,51,32,+ 159,179,228,232,208,150,30,29,202,66,107,96,8,62,165,137,181,241,20,216,245,161,186,213,+ 62,102,143,117,192,236,167,160,101,247,147,137,91,237,199,94,78,68,221,64,99,54,181,223,+ 106,95,100,151,204,119,69,236,88,225,183,40,48,71,130,143,98,181,213,190,216,238,237,214,+ 109,14,131,32,12,6,96,152,157,102,199,88,66,230,62,78,224,41,22,239,127,153,133,14,+ 167,133,194,138,100,137,46,188,127,76,168,121,68,40,9,77,147,31,208,173,122,167,211,208,+ 172,77,85,170,82,149,95,40,176,38,161,162,47,249,97,148,105,4,115,86,52,55,247,60,+ 45,7,187,92,133,205,214,149,158,4,139,154,100,16,40,222,30,142,84,193,177,225,171,242,+ 233,36,167,96,241,56,197,128,173,248,76,66,113,31,167,239,91,5,153,131,141,68,105,153,+ 213,69,197,50,152,86,168,248,91,100,150,139,39,85,130,125,54,192,159,193,148,18,54,203,+ 10,133,233,56,19,57,201,113,133,107,91,67,218,79,162,68,27,222,241,85,241,87,247,138,+ 41,80,230,19,90,50,23,152,43,219,84,212,83,237,85,25,247,253,71,119,145,242,40,158,+ 11,151,108,133,191,203,120,74,207,68,19,69,112,203,130,216,167,114,148,212,45,174,42,85,+ 249,95,229,5,237,216,81,146,131,32,12,6,96,49,8,215,232,120,129,142,189,200,142,247,+ 191,76,119,93,212,4,66,18,182,118,156,221,245,127,106,233,215,20,113,164,0,0,128,119,+ 221,18,231,193,111,1,62,216,186,20,147,29,27,172,59,223,54,140,131,154,221,210,136,150,+ 70,180,75,62,214,23,127,197,146,200,150,164,110,125,145,221,150,31,21,233,216,59,243,121,+ 111,188,11,183,44,201,102,173,113,183,125,10,177,168,17,217,184,254,80,32,165,80,35,182,+ 223,151,154,89,212,136,109,186,210,144,117,113,107,196,118,228,236,200,219,150,186,239,178,45,+ 227,112,217,127,102,231,115,250,96,127,142,111,67,10,153,63,112,99,100,231,29,62,151,189,+ 236,252,74,221,123,207,164,98,217,132,215,237,99,96,114,221,227,3,108,63,9,118,166,180,+ 178,222,225,170,58,87,252,91,75,244,107,205,23,172,212,98,87,106,176,27,213,237,78,85,+ 139,168,102,49,85,44,161,178,141,132,106,150,108,72,24,59,99,11,96,175,75,237,157,157,+ 66,150,183,83,110,217,105,33,114,123,34,186,118,15,249,242,208,215,247,102,161,210,83,173,+ 174,182,103,209,236,131,155,198,42,54,24,70,246,40,27,93,139,245,45,22,172,118,178,91,+ 190,187,188,157,216,238,178,54,86,247,220,193,90,150,179,125,237,244,97,183,51,255,240,138,+ 117,107,61,96,108,148,206,63,130,181,108,97,133,178,133,21,202,230,86,42,155,91,169,44,+ 228,187,70,233,220,166,220,97,90,237,36,30,7,17,43,119,129,90,241,202,168,85,202,102,+ 214,183,88,56,208,110,199,64,111,180,114,136,149,131,109,55,200,33,86,201,239,179,246,248,+ 134,64,107,26,190,168,30,250,18,59,54,88,119,186,133,31,15,96,61,79,237,216,77,10,+ 131,48,16,64,225,164,102,33,245,167,61,131,171,210,203,20,239,127,153,34,182,43,99,152,+ 216,25,141,229,61,68,196,205,135,193,204,34,85,69,68,116,142,130,93,73,215,155,149,118,+ 221,183,151,83,232,234,220,243,243,184,171,219,227,226,174,186,117,252,26,87,222,207,221,167,+ 91,39,117,13,246,173,236,123,213,167,148,208,85,159,187,121,174,104,166,234,187,65,54,84,+ 13,220,225,32,215,227,110,116,155,219,84,91,244,255,124,216,254,197,197,197,253,125,110,176,+ 206,184,184,184,204,13,220,127,117,115,143,210,148,220,236,163,52,29,55,18,46,238,118,247,+ 178,108,23,55,210,99,206,212,61,237,145,22,46,46,110,233,238,27,237,218,205,114,131,32,+ 16,7,112,140,164,157,233,231,59,100,204,45,109,15,57,104,123,110,207,142,239,255,50,85,+ 147,42,232,130,24,22,254,77,203,158,50,227,196,223,130,160,184,152,231,144,144,123,33,68,+ 33,115,84,36,63,249,86,95,158,3,228,203,236,28,18,229,239,44,190,244,11,239,246,15,+ 71,47,10,14,191,20,116,220,137,197,40,56,252,27,195,201,159,152,124,251,248,143,224,219,+ 71,47,191,191,110,4,7,240,215,12,224,32,190,112,141,226,23,251,143,80,255,163,189,56,+ 239,56,255,182,29,25,253,137,113,126,238,235,111,232,136,230,27,166,220,38,188,255,122,242,+ 233,251,141,154,64,216,246,75,242,97,160,38,16,223,215,19,0,248,90,2,157,127,255,76,+ 196,67,56,95,77,0,209,126,53,1,140,63,38,0,242,251,4,144,126,151,0,225,55,252,+ 190,121,221,19,167,253,198,197,80,25,203,47,65,207,191,151,241,237,4,243,252,189,18,63,+ 236,253,183,63,218,164,254,79,62,202,255,52,255,255,43,245,255,117,248,77,234,255,75,222,+ 127,174,169,253,243,210,98,100,127,86,90,109,255,122,136,233,155,75,179,251,35,196,31,2,+ 227,43,21,246,35,226,250,51,249,142,207,159,106,54,254,127,126,93,232,123,173,127,171,206,+ 223,121,249,94,247,31,225,216,254,118,150,34,253,110,208,100,56,191,26,222,228,184,215,223,+ 218,116,52,250,109,212,202,72,96,110,127,242,255,133,255,70,214,167,227,249,211,32,124,199,+ 157,208,165,250,139,218,189,195,254,211,180,44,84,18,190,227,78,48,185,254,83,43,223,234,+ 229,53,84,165,74,177,92,60,91,220,82,36,79,161,37,96,173,74,245,199,217,125,45,129,+ 237,16,245,86,141,145,231,247,245,30,152,12,96,125,242,249,240,150,250,39,149,64,205,205,+ 219,234,175,122,2,7,218,247,228,173,245,95,233,52,151,253,190,20,89,216,255,89,53,151,+ 217,253,24,31,4,57,250,161,190,11,114,244,131,125,23,228,236,239,192,126,150,124,160,143,+ 30,255,240,249,159,252,191,229,127,3,237,216,219,10,194,48,12,128,225,214,70,183,61,134,+ 187,18,193,129,87,62,134,239,255,54,34,234,14,110,107,98,155,166,86,243,95,137,167,143,+ 64,103,134,206,9,4,118,103,238,85,22,156,100,31,187,48,196,236,130,63,251,138,219,181,+ 72,219,71,236,174,161,165,174,186,234,70,92,191,169,92,236,247,42,149,139,125,160,203,228,+ 154,130,220,217,10,147,113,97,182,195,164,220,54,147,107,75,119,79,37,204,155,235,60,203,+ 93,191,128,149,202,197,182,75,50,247,226,217,161,215,254,17,191,107,126,197,237,254,108,222,+ 47,119,247,171,77,175,39,201,121,141,57,246,223,146,203,117,101,184,139,123,112,88,59,162,+ 243,142,214,172,176,219,102,114,169,243,86,207,117,164,110,208,94,32,159,103,222,121,39,111,+ 219,248,58,167,115,73,183,57,252,46,237,182,46,200,141,41,194,141,43,216,61,140,142,103,+ 243,126,94,27,207,139,77,208,191,51,139,110,120,234,170,139,186,181,247,137,58,210,229,141,+ 236,114,231,52,77,43,191,27,237,215,89,10,194,48,16,128,225,137,169,158,68,80,244,193,+ 199,10,197,92,193,251,223,198,104,92,32,117,74,38,51,205,2,243,191,85,165,126,157,208,+ 205,90,77,211,52,141,223,144,92,1,139,73,173,132,101,132,208,29,150,43,97,1,181,168,+ 165,115,75,11,231,244,215,146,127,173,27,136,37,88,242,47,210,134,148,140,5,221,253,150,+ 144,193,6,67,180,248,223,57,96,118,197,48,116,11,63,12,83,195,130,97,170,88,2,230,+ 207,41,112,122,87,210,242,194,204,207,132,177,198,92,2,230,247,223,113,20,203,243,32,118,+ 108,12,126,100,164,185,56,224,90,60,70,200,2,124,139,199,96,223,220,138,91,160,161,185,+ 180,101,57,134,14,179,82,239,141,114,150,79,251,156,183,49,63,23,7,107,88,88,15,94,+ 106,81,139,45,122,63,146,155,139,211,53,234,204,114,142,247,62,45,110,198,219,146,22,19,+ 63,137,68,31,204,55,19,95,222,42,172,81,166,101,149,123,99,238,92,92,59,115,105,105,+ 141,212,210,149,229,178,145,138,111,17,140,108,121,0,237,215,65,18,130,48,12,64,209,198,+ 70,185,131,238,28,84,110,224,120,10,135,251,95,70,133,25,165,105,211,134,20,23,74,254,+ 70,22,204,19,171,13,232,253,16,158,186,177,22,125,125,75,107,110,204,52,211,76,51,109,+ 29,26,210,102,107,65,48,52,61,144,188,193,71,131,176,237,179,240,128,148,215,118,227,107,+ 239,248,246,147,227,86,164,57,211,254,80,107,111,27,38,149,6,108,26,13,147,193,53,248,+ 212,114,45,113,26,197,106,180,24,43,104,247,204,121,9,172,70,139,177,42,45,148,94,191,+ 22,208,106,72,180,166,60,223,120,45,90,181,6,138,179,247,173,29,34,141,174,90,230,218,+ 202,51,154,174,154,115,195,112,79,106,229,251,71,172,213,220,49,149,26,115,107,211,105,40,+ 94,55,153,118,92,84,131,223,214,242,79,14,229,239,52,220,165,48,247,177,41,183,75,123,+ 168,122,204,163,91,30,180,87,149,156,31,204,138,161,44,58,63,152,253,126,150,21,143,112,+ 151,210,156,58,211,84,117,235,94,183,139,186,138,157,133,194,127,88,150,101,125,161,7,237,+ 216,75,110,131,48,16,6,96,23,103,194,9,90,85,202,182,217,117,199,21,218,117,197,253,+ 47,211,2,74,32,198,158,199,79,40,36,154,217,32,16,159,100,97,123,102,112,140,30,15,+ 18,7,75,36,244,197,16,9,61,135,105,124,222,220,133,211,112,249,25,46,239,44,13,78,+ 1,250,97,152,156,148,178,75,66,160,220,66,116,234,212,64,191,21,180,245,207,228,244,46,+ 244,107,63,3,110,125,114,238,155,37,254,125,192,93,201,61,246,239,213,151,10,60,185,61,+ 8,221,218,245,221,161,0,223,220,174,68,23,12,248,156,91,187,158,37,124,191,58,53,231,+ 166,106,12,35,173,167,221,190,149,150,219,125,153,42,127,66,159,130,226,159,73,61,57,179,+ 4,67,99,108,176,134,219,53,119,78,181,160,190,86,40,229,44,191,95,121,203,83,214,10,+ 148,179,18,101,172,72,203,86,166,69,171,160,37,171,161,5,171,162,189,61,98,52,94,123,+ 45,59,141,78,213,180,245,207,180,75,138,47,127,124,211,117,146,224,4,67,112,90,35,56,+ 153,18,156,194,9,46,28,4,151,43,130,202,21,39,229,210,76,112,67,64,112,47,65,120,+ 27,18,54,161,175,101,249,182,203,1,59,117,154,208,166,233,94,106,146,24,158,173,71,3,+ 115,86,229,91,125,243,37,145,206,230,24,11,40,255,195,61,239,61,38,1,210,238,248,6,+ 163,149,124,66,80,160,127,82,60,151,200,211,94,218,27,67,165,204,83,149,204,82,157,204,+ 81,165,204,80,173,156,83,181,156,209,90,45,51,84,43,115,52,58,117,170,165,191,237,218,+ 93,138,194,48,16,7,240,137,157,67,8,62,89,20,188,129,125,43,120,1,217,251,95,102,+ 119,5,109,6,147,180,153,15,72,232,204,139,15,33,63,98,211,254,147,84,135,225,83,24,+ 110,180,2,14,226,50,66,129,150,163,221,160,169,18,163,225,187,20,80,0,225,37,233,25,+ 13,6,40,60,193,81,71,97,254,124,214,163,91,170,22,221,86,67,147,21,141,78,109,160,+ 184,92,72,100,94,211,20,58,46,232,168,134,154,140,180,23,212,100,246,91,174,194,35,201,+ 126,88,145,134,74,220,151,54,85,168,127,29,239,81,242,77,81,95,218,52,85,168,212,124,+ 245,205,52,77,1,217,49,29,163,220,21,192,81,71,123,65,103,136,182,37,20,157,147,45,+ 245,123,20,204,54,33,51,248,76,118,42,236,180,203,47,74,36,237,30,85,105,151,93,62,+ 37,105,151,221,146,72,238,162,226,72,247,134,210,217,143,208,31,165,119,10,122,35,117,52,+ 25,132,39,61,84,118,46,219,24,132,190,149,244,173,164,163,142,238,99,215,167,158,131,125,+ 157,248,117,190,45,170,188,55,76,220,86,143,101,175,243,95,71,128,139,28,253,46,71,29,+ 109,13,61,144,82,66,73,93,117,80,90,89,84,144,56,5,148,159,56,37,244,125,190,174,+ 62,16,172,163,224,104,251,232,249,93,142,182,141,26,204,62,137,221,208,112,74,89,228,169,+ 100,29,40,163,204,255,166,20,81,230,15,127,107,232,104,129,134,61,163,38,179,111,115,159,+ 58,218,55,250,11,237,216,81,14,130,48,12,6,224,77,198,139,137,222,65,130,137,209,71,+ 15,96,226,5,8,247,191,140,70,96,35,176,149,182,52,136,210,255,145,144,47,11,235,202,+ 182,44,235,197,157,77,147,210,101,18,81,79,61,245,212,83,79,61,245,214,225,57,124,112,+ 158,197,6,235,229,131,236,243,104,176,94,247,204,231,104,162,81,239,167,189,157,207,97,55,+ 8,203,3,10,153,231,37,151,153,229,143,47,214,38,152,94,98,73,177,189,119,238,229,22,+ 61,161,249,13,222,168,254,46,159,240,189,153,235,173,22,246,140,122,77,30,66,222,169,9,+ 243,255,155,28,159,229,237,15,0,143,181,127,153,244,146,195,227,121,78,238,251,181,94,33,+ 236,217,77,121,210,243,43,94,127,40,47,68,196,235,45,115,9,47,207,171,176,209,14,45,+ 137,237,25,83,197,90,166,122,223,246,110,125,238,74,246,48,71,62,138,135,57,146,18,60,+ 220,33,153,225,165,91,16,203,3,90,36,211,43,132,61,187,41,79,122,126,5,234,15,119,+ 65,67,240,80,23,52,20,175,235,34,79,3,191,79,245,140,122,75,121,64,133,113,60,168,+ 194,252,41,37,100,202,3,143,92,127,230,213,203,143,143,60,191,171,245,218,107,63,240,202,+ 206,191,21,146,244,124,245,2,87,58,132,126,58,94,93,49,15,221,239,105,87,88,179,126,+ 81,99,143,58,178,9,207,193,159,142,225,21,194,158,221,148,55,127,126,95,237,214,49,14,+ 194,48,12,133,97,91,241,84,169,156,161,226,20,236,61,64,197,253,47,83,4,69,194,29,+ 218,23,108,133,8,189,127,74,151,47,75,147,184,152,202,51,181,18,141,20,41,82,33,202,+ 210,168,135,21,232,147,186,105,36,71,201,34,174,249,104,181,45,134,247,247,49,133,116,33,+ 245,11,106,220,83,145,60,21,201,83,25,135,174,55,106,122,69,138,84,123,10,59,131,24,+ 5,221,12,32,85,113,113,145,234,154,130,199,15,128,66,135,34,132,202,122,2,72,245,77,+ 157,143,22,130,78,225,231,3,143,84,14,72,172,171,238,53,247,95,94,150,87,105,82,222,+ 110,6,61,1,32,117,205,163,244,191,169,210,246,127,97,95,182,2,237,152,73,14,194,48,+ 12,69,27,197,92,36,106,207,64,111,0,172,80,239,127,25,134,69,51,217,74,12,110,65,+ 240,223,42,141,163,62,185,114,18,171,222,3,0,192,23,64,21,114,228,85,74,165,43,136,+ 43,157,21,165,114,26,78,67,194,28,87,30,227,108,182,68,156,90,185,230,143,181,50,103,+ 118,135,39,169,81,139,82,105,1,148,80,170,80,238,75,237,155,217,128,230,244,209,41,31,+ 135,18,31,80,156,177,19,159,139,164,244,221,74,33,71,86,121,185,231,226,206,239,42,215,+ 35,154,186,178,20,190,158,82,25,26,202,49,191,77,164,226,35,79,82,64,157,229,216,123,+ 247,117,150,101,151,210,250,238,223,95,217,174,88,123,101,115,95,66,9,37,148,80,66,9,+ 37,148,255,169,140,125,73,170,20,187,21,219,238,43,81,202,61,153,137,50,176,202,176,165,+ 242,3,89,102,202,101,217,87,201,14,183,173,88,170,199,248,179,9,0,248,13,110,237,214,+ 81,14,194,32,16,69,209,18,234,70,220,132,221,65,245,203,116,255,155,177,152,152,134,118,+ 30,130,64,140,230,190,207,210,112,128,208,153,122,79,8,33,223,200,216,46,114,194,29,233,+ 154,229,5,28,7,118,228,16,229,62,232,204,201,71,211,70,92,226,87,42,200,55,153,220,+ 233,153,88,92,211,143,148,129,252,99,50,249,169,217,115,44,149,100,170,156,152,100,98,45,+ 153,100,170,22,218,164,90,75,216,255,146,71,138,74,168,73,175,72,123,255,71,114,84,165,+ 176,152,188,173,7,224,174,89,228,185,17,25,206,188,122,151,118,199,80,3,161,153,24,23,+ 190,136,84,125,49,179,127,126,64,214,54,127,87,126,99,251,145,221,126,113,32,33,33,33,+ 33,33,33,33,33,33,33,33,33,33,33,127,144,124,0,237,215,93,14,194,32,12,0,96,+ 26,250,166,201,238,224,37,60,132,70,179,251,95,70,103,16,54,104,161,148,37,26,109,223,+ 182,176,47,99,253,201,240,190,8,4,23,2,208,171,195,20,83,180,74,59,4,74,59,4,+ 138,187,187,122,92,77,233,87,4,241,78,34,175,8,2,98,65,249,241,194,148,23,55,85,+ 164,221,10,82,85,170,80,78,187,40,240,41,165,232,123,157,82,244,189,38,71,8,151,20,+ 236,182,219,202,170,77,190,87,33,251,136,253,186,9,201,20,162,167,217,76,175,148,60,49,+ 231,124,190,84,182,12,244,171,108,55,219,82,226,226,124,120,244,40,203,203,28,166,105,58,+ 22,115,172,79,9,171,139,57,214,165,248,168,48,247,185,28,145,67,149,85,210,146,57,107,+ 81,98,192,243,10,83,187,196,142,91,202,146,128,103,6,6,149,219,43,70,149,202,232,146,+ 43,212,79,80,42,87,225,215,173,143,3,16,101,186,173,132,171,121,23,197,153,242,79,10,+ 202,230,78,93,97,126,44,251,20,46,76,25,84,116,199,179,76,81,30,21,183,202,240,169,+ 213,148,159,83,194,99,232,30,237,218,65,14,194,32,20,4,80,16,78,226,37,188,68,147,+ 134,251,95,70,19,137,4,138,44,218,153,143,196,153,13,137,46,120,249,49,109,153,26,66,+ 136,222,229,248,24,22,137,204,50,203,44,179,204,50,203,188,180,57,50,195,49,199,232,121,+ 225,152,95,228,135,195,100,63,124,194,49,3,201,118,102,28,217,204,12,36,91,153,145,100,+ 43,51,146,108,100,222,157,204,50,203,44,179,204,57,105,252,117,251,48,199,49,119,246,200,+ 59,245,150,15,163,94,202,90,63,50,115,204,95,247,56,151,90,198,49,55,51,119,8,115,+ 57,151,208,205,128,41,191,79,14,229,96,194,55,123,148,249,110,101,134,140,217,118,206,17,+ 50,102,99,51,132,108,106,198,252,50,198,215,13,116,43,2,26,243,232,250,12,111,69,64,+ 99,30,152,79,101,51,48,167,5,205,198,115,190,65,98,107,102,52,137,100,51,165,177,229,+ 154,217,237,182,204,50,203,44,179,204,233,167,204,135,122,102,84,154,52,157,201,36,243,213,+ 234,100,155,250,118,88,102,153,225,102,214,155,126,162,185,151,101,110,47,57,75,221,18,101,+ 150,89,230,63,52,159,235,120,166,93,156,47,148,62,19,111,131,97,250,191,242,20,69,81,+ 20,106,158,237,219,75,114,219,48,12,0,80,98,8,58,23,233,76,219,181,187,240,240,18,+ 189,255,109,234,200,138,36,138,32,1,240,219,214,194,42,11,39,47,0,33,18,166,19,107,+ 175,184,226,127,15,20,68,23,23,216,232,66,35,252,202,199,71,31,154,117,143,52,142,117,+ 191,104,104,8,11,221,213,110,151,178,194,93,146,110,85,109,141,187,175,244,104,119,75,122,+ 188,219,104,157,11,220,38,235,92,226,182,216,76,202,220,250,22,43,118,235,90,12,17,126,+ 46,145,62,22,110,61,90,236,121,28,221,151,88,55,224,56,242,244,71,89,177,159,63,214,+ 189,92,151,168,216,74,55,150,183,116,151,132,211,163,65,182,218,122,121,79,55,157,240,250,+ 58,110,153,53,13,134,135,116,115,9,243,240,218,96,40,102,221,238,230,18,182,204,34,171,+ 30,231,144,125,181,116,110,254,203,103,188,209,154,197,93,19,6,100,38,192,188,108,140,121,+ 176,229,14,23,151,175,180,69,182,214,102,129,153,149,62,87,153,173,244,151,156,164,205,26,+ 143,108,185,49,102,151,74,35,55,229,167,96,115,136,116,185,159,223,127,191,147,176,224,41,+ 32,101,19,194,137,20,226,213,21,44,241,177,218,145,109,78,241,160,126,20,82,101,22,44,+ 241,254,158,42,146,13,1,75,211,21,85,154,238,49,19,7,233,210,233,138,42,77,158,84,+ 34,151,238,42,126,159,78,63,210,70,230,6,101,14,107,238,78,47,231,222,29,191,202,45,+ 117,221,145,133,240,215,64,237,59,100,0,35,117,195,14,198,172,123,51,101,145,117,151,7,+ 39,60,136,199,184,159,237,27,36,60,202,61,55,218,27,184,193,182,57,206,13,102,0,104,+ 229,122,182,175,130,25,224,188,79,110,46,168,89,238,57,10,183,17,180,45,242,245,228,49,+ 8,193,1,148,219,174,10,93,146,13,218,247,9,7,135,83,19,215,39,166,141,227,62,225,+ 156,203,29,71,129,11,85,108,230,220,143,218,170,36,223,36,155,57,128,163,230,215,187,62,+ 59,198,130,240,212,143,92,168,96,169,183,11,137,177,78,155,175,231,134,127,144,172,174,218,+ 245,220,124,134,64,100,76,142,128,183,150,172,69,34,99,144,186,80,204,146,189,69,239,109,+ 183,134,217,210,189,85,233,122,225,236,29,85,26,170,214,215,139,47,87,206,9,59,141,11,+ 197,44,145,112,249,115,228,85,87,73,124,161,165,238,55,205,213,153,160,208,114,87,119,99,+ 199,109,28,93,220,40,225,97,46,194,191,151,47,212,184,110,146,91,209,87,240,99,78,63,+ 151,231,75,156,12,131,92,55,227,249,197,166,251,100,85,153,71,184,40,40,115,23,23,26,+ 158,251,21,46,212,204,57,42,87,240,193,70,23,151,157,234,62,95,244,61,25,43,185,124,+ 13,165,110,226,66,52,119,53,185,93,160,232,254,170,228,228,234,63,93,76,95,52,171,92,+ 59,195,133,89,46,206,114,237,155,185,239,213,87,110,146,59,116,223,168,42,116,185,91,87,+ 232,98,215,230,111,98,59,186,56,199,181,243,92,152,227,98,119,55,249,113,102,103,55,249,+ 89,102,103,55,156,254,126,239,95,94,238,229,94,238,95,239,10,254,26,98,228,62,89,241,+ 31,18,21,231,66,85,92,238,229,94,238,40,247,15,237,216,193,14,1,49,16,6,224,86,+ 235,68,194,145,56,17,226,17,136,171,56,123,255,183,145,181,9,218,221,140,233,244,159,176,+ 204,127,112,112,248,50,218,233,212,110,8,121,162,119,207,248,24,192,49,222,120,227,141,55,+ 126,224,124,236,11,144,247,61,1,242,59,151,100,209,124,64,249,173,110,245,91,205,181,111,+ 120,197,206,49,222,248,223,225,163,42,207,247,37,252,145,239,75,248,214,39,38,84,37,223,+ 248,143,144,190,140,119,238,202,91,168,90,254,141,95,205,211,126,61,79,250,0,62,107,164,+ 52,0,62,105,164,44,8,158,140,103,241,210,240,120,105,188,194,63,210,100,81,129,124,103,+ 12,65,249,199,14,69,37,126,163,203,123,227,63,212,57,218,125,111,60,158,143,186,19,83,+ 62,238,153,124,126,7,141,153,17,241,75,231,144,151,97,206,23,44,206,90,194,163,183,182,+ 252,246,47,105,76,227,17,188,242,214,70,196,169,165,248,250,99,117,97,241,163,54,90,213,+ 119,238,117,48,207,121,50,173,225,69,47,97,213,249,147,167,102,152,136,223,191,132,156,192,+ 147,89,155,105,17,159,20,236,15,247,250,206,175,63,233,44,121,168,234,29,29,221,179,35,+ 125,102,51,254,31,248,222,179,3,227,211,75,2,204,47,8,103,222,249,102,85,202,75,194,+ 231,101,9,95,31,221,74,99,241,66,87,190,165,24,86,245,67,230,195,112,122,220,98,177,+ 88,52,114,3,237,216,81,14,130,48,12,6,224,13,16,18,19,189,128,79,16,61,11,143,+ 132,120,255,187,136,219,50,88,55,6,210,78,81,251,39,38,147,152,207,6,235,156,205,115,+ 206,82,10,147,68,186,52,41,18,241,13,228,11,108,162,213,23,246,210,198,68,249,167,46,+ 96,218,240,186,21,126,170,40,31,212,95,137,203,131,206,65,235,144,7,93,138,213,29,30,+ 124,208,72,189,247,120,208,145,232,218,71,94,85,46,59,57,105,88,2,221,242,186,97,58,+ 167,101,5,29,175,159,117,195,227,46,8,227,86,79,22,235,79,238,189,60,144,5,242,170,+ 113,4,125,152,103,126,247,124,109,163,191,123,153,201,150,149,255,171,61,169,158,110,123,152,+ 225,137,118,7,238,28,230,153,255,49,254,130,88,65,158,46,227,214,27,175,254,136,88,173,+ 184,57,103,196,234,205,124,255,213,213,51,191,43,254,132,88,205,31,163,234,180,231,28,240,+ 255,107,72,25,218,14,157,171,85,124,10,244,71,124,79,199,139,241,175,164,58,3,235,55,+ 44,201,120,112,114,46,105,248,76,85,154,138,15,221,114,195,11,125,183,146,241,51,157,19,+ 28,47,110,230,77,174,183,241,245,243,99,86,44,31,220,105,2,83,70,252,156,37,200,163,+ 19,229,9,38,208,203,60,98,196,190,130,199,140,216,87,241,77,90,94,50,255,161,206,73,+ 221,247,204,251,252,3,237,217,75,110,131,48,16,6,96,79,25,82,245,12,93,181,42,125,+ 92,160,234,162,82,46,80,169,98,81,245,254,55,169,72,160,194,142,241,204,15,99,9,130,+ 255,13,73,32,159,120,121,140,77,85,157,194,228,134,16,87,70,41,232,166,81,198,162,66,+ 153,9,137,10,237,76,167,143,10,5,77,21,138,154,26,20,54,21,40,110,74,104,23,216,+ 20,208,115,156,41,234,220,183,155,147,130,22,116,30,218,94,252,114,156,70,195,12,13,193,+ 105,63,68,208,48,22,45,42,121,58,150,160,227,174,198,10,229,113,95,99,135,62,230,64,+ 41,59,122,131,70,131,62,163,81,92,253,230,61,113,164,111,222,183,187,243,226,73,190,79,+ 35,232,203,69,188,213,243,80,10,91,93,99,130,134,219,108,13,189,223,247,225,31,51,160,+ 67,229,223,235,57,53,70,189,210,167,64,187,122,42,161,210,144,39,90,92,15,2,42,13,+ 206,162,40,220,177,107,208,54,7,154,101,79,15,230,104,93,215,246,123,58,231,9,108,61,+ 40,62,143,32,163,51,230,17,208,231,211,175,255,77,30,250,229,237,154,209,83,11,49,68,+ 123,185,93,255,158,174,230,66,1,105,180,40,18,45,10,53,233,13,161,159,251,62,252,8,+ 202,75,19,69,105,97,154,215,62,30,250,179,48,177,233,108,124,196,44,15,164,11,186,69,+ 52,53,117,44,78,43,79,160,68,211,147,220,169,117,9,244,183,251,223,244,43,147,212,186,+ 240,177,103,140,50,167,138,129,92,40,226,168,253,187,168,130,238,28,229,12,40,177,69,252,+ 182,255,65,38,73,149,62,188,231,235,99,90,79,11,122,69,168,254,198,4,80,253,139,131,+ 24,106,29,139,135,94,120,42,173,164,228,106,243,7,237,218,193,114,130,48,16,6,96,192,+ 84,158,3,199,62,131,222,184,182,167,78,15,237,76,223,255,69,90,50,1,49,38,97,55,+ 217,252,163,117,255,131,7,101,252,36,134,144,108,216,237,52,98,49,184,76,90,11,139,213,+ 78,205,102,126,26,137,88,173,81,77,53,213,162,25,23,109,20,213,48,99,201,162,65,198,+ 201,139,6,184,7,8,107,171,19,217,208,140,196,143,119,49,91,90,155,110,115,162,118,160,+ 105,231,68,119,50,226,231,22,200,151,11,70,227,119,32,172,70,238,147,50,26,245,122,83,+ 237,177,52,155,111,144,102,131,210,220,9,170,246,4,26,127,62,82,164,177,166,90,229,218,+ 137,60,137,60,135,180,41,12,141,49,103,13,104,246,10,71,105,91,95,225,207,143,42,107,+ 126,170,106,47,126,170,106,115,62,51,86,54,49,141,147,215,249,203,142,209,67,246,73,141,+ 149,139,22,59,34,173,241,134,186,149,22,27,12,85,43,215,176,255,155,217,238,147,162,154,+ 236,157,88,53,213,84,187,47,173,235,58,156,214,187,193,75,181,226,255,205,77,205,244,10,+ 80,13,164,117,46,16,45,89,4,94,180,233,231,72,104,201,2,247,172,245,188,154,116,97,+ 165,174,111,89,245,246,204,138,238,74,19,45,253,133,219,169,130,118,32,105,50,45,73,60,+ 55,161,94,66,210,236,122,29,167,137,85,228,40,125,18,179,173,167,218,163,106,157,155,186,+ 98,52,217,117,55,225,234,128,105,210,245,146,44,205,228,212,218,137,199,222,106,204,199,26,+ 12,171,180,120,163,69,75,152,31,129,247,250,69,219,231,85,67,85,83,237,222,52,226,149,+ 19,209,184,59,98,196,81,33,166,101,238,246,81,103,245,128,241,86,181,74,171,49,131,210,+ 72,187,79,98,218,252,4,20,66,171,188,195,175,218,255,208,142,222,110,119,101,205,219,161,+ 13,104,114,247,128,185,92,151,212,74,158,134,204,208,236,39,195,234,85,181,39,209,98,107,+ 156,42,90,124,253,150,208,198,76,45,163,213,135,225,239,204,7,148,214,96,234,37,104,237,+ 205,195,222,181,37,11,42,92,87,169,170,149,222,113,114,119,92,242,238,166,26,66,126,1,+ 237,218,203,14,131,32,16,5,80,208,246,251,186,50,225,255,191,164,11,107,19,30,17,103,+ 128,25,30,247,174,92,152,246,68,156,65,148,125,71,16,4,65,6,201,75,32,25,129,109,+ 158,172,224,93,47,71,42,121,129,105,28,8,32,232,70,112,219,41,68,4,183,157,66,68,+ 240,63,254,36,198,167,51,193,121,109,32,88,93,96,140,91,190,22,100,58,146,134,192,235,+ 196,79,5,245,110,202,96,102,130,96,40,65,189,214,192,23,152,33,5,169,177,155,68,224,+ 148,5,132,178,208,17,228,128,16,52,171,5,167,44,8,254,212,177,59,82,48,93,151,149,+ 61,71,96,217,179,79,45,193,239,37,139,158,160,40,132,137,179,145,192,204,33,40,184,19,+ 171,61,31,176,171,113,213,103,36,126,243,128,96,38,1,123,1,177,218,122,1,2,57,1,+ 173,44,32,152,85,64,107,78,168,70,8,32,128,160,99,193,118,229,18,108,228,156,191,252,+ 244,236,72,16,125,115,165,199,95,245,17,119,129,196,223,157,233,177,222,170,175,120,39,12,+ 99,247,142,77,142,175,228,254,33,8,32,128,96,92,193,23,237,216,97,10,194,48,12,134,+ 225,148,22,15,162,7,242,111,238,127,18,17,135,110,154,180,201,190,168,116,228,253,55,145,+ 199,205,22,105,172,117,169,21,122,84,90,13,43,209,68,55,104,219,213,8,45,59,26,163,+ 23,119,6,116,121,137,152,222,98,229,202,134,250,158,189,131,62,43,155,171,113,29,116,253,+ 201,174,13,214,65,137,174,171,175,107,26,148,143,250,248,252,155,59,21,58,161,168,180,153,+ 81,84,124,83,162,137,38,122,56,148,255,119,167,156,11,149,232,164,168,116,184,71,209,38,+ 158,238,97,244,252,13,212,115,167,210,9,133,97,212,118,150,234,161,44,160,244,25,186,250,+ 86,212,181,79,21,20,25,121,52,20,26,206,20,84,30,35,213,177,210,130,162,3,239,11,+ 45,80,26,218,160,52,52,238,255,142,41,81,180,240,213,191,103,219,252,206,18,157,17,141,+ 106,48,241,71,252,166,100,89,134,117,3,237,217,65,14,131,48,12,68,81,2,62,9,151,+ 224,24,189,255,109,90,80,43,181,171,196,118,42,125,172,153,21,11,138,244,4,133,100,188,+ 109,202,159,98,153,124,253,156,129,105,241,24,238,206,180,37,26,97,132,17,70,24,97,132,+ 17,70,24,97,132,17,230,118,24,43,132,121,89,202,96,78,203,81,4,147,179,176,48,73,+ 203,133,49,76,114,150,11,211,56,73,89,46,204,231,248,177,220,60,194,8,35,140,48,194,+ 32,49,141,29,23,198,208,241,44,10,120,59,205,159,25,154,111,129,51,130,25,25,172,245,+ 206,9,12,231,78,138,111,177,54,128,177,129,33,91,239,28,243,15,234,252,150,49,204,62,+ 128,217,59,152,221,137,137,236,7,168,119,38,180,183,129,98,98,251,52,36,38,186,231,36,+ 190,205,2,127,125,236,119,38,94,5,0,235,217,120,173,65,172,103,195,181,6,177,158,61,+ 150,26,152,66,245,172,21,170,103,195,175,100,32,38,109,1,97,210,77,51,8,51,193,130,+ 193,204,176,112,48,19,44,32,76,222,2,194,172,249,128,30,179,9,121,151,128,128,143,255,+ 140,156,151,90,215,173,74,158,237,213,177,9,0,49,8,64,81,131,142,114,55,213,237,191,+ 71,210,28,164,9,40,209,20,225,191,206,234,23,10,170,38,177,87,126,143,105,17,34,68,+ 136,148,68,44,110,142,12,158,72,11,155,34,99,242,69,100,203,173,145,213,26,83,35,203,+ 61,102,70,164,6,145,3,145,175,60,18,191,183,91,35,173,136,109,62,14,31,5,0,0,+ 192,113,29,+};+const int16_t cn_scripts[1125] = {+ 1,11,17,3,0,20,0,17,3,1,21,0,17,3,2,22,0,17,3,3,+ 23,0,17,3,4,24,0,17,3,5,25,0,17,3,6,26,0,17,3,7,+ 27,0,17,3,8,28,0,3,1,1000,20,7,0,0,20,10,1,0,0,1,+ 5,17,3,0,29,0,17,3,1,30,0,17,3,2,31,0,17,3,3,32,+ 0,17,3,4,33,0,1,6,17,3,3,34,0,17,3,2,35,0,17,3,+ 1,36,0,17,3,0,37,0,3,1,2000,20,7,1,-800,40,15,1,1,240,+ 1,11,17,3,3,38,0,17,3,1,39,0,17,3,0,40,0,17,3,2,+ 41,0,3,1,2000,20,7,2,-800,40,15,1,1,400,2055,0,9,6,159,20,+ 159,25,0,1,10,4,159,20,20,1,10,4,159,25,23,1,256,0,1,16,+ 17,3,0,42,0,17,3,2,43,0,17,3,1,44,0,3,1,2000,20,7,+ 3,-800,40,15,1,1,280,28,1,2000,22,12,3,0,2,0,94,1,4,0,+ 2,0,13,0,17,3,1,45,0,1048,0,0,0,29,0,2055,0,17,3,1,+ 46,0,17,3,2,47,0,0,0,256,0,1,2,6,1,1,17,3,0,48,+ 180,1,2,6,1,1,17,3,0,49,180,1,1,6,1,1,1,5,6,1,+ 1,17,3,0,50,0,17,3,1,51,0,17,3,2,52,0,17,3,3,53,+ 0,2,7,6,1,1,17,3,0,54,0,2055,0,9,6,78,13,78,17,0,+ 1,10,4,78,12,20,1,10,4,78,18,23,1,256,0,5,11,5,82,27,+ 88,27,1000,3,1,500,11,5,82,36,88,36,1000,3,1,500,11,5,82,45,+ 88,45,1000,1,9,6,1,1,17,3,1,55,0,17,3,2,56,0,17,3,+ 0,57,0,11,5,79,10,79,17,1000,3,1,500,11,5,55,26,76,26,1000,+ 3,1,500,11,5,55,37,76,37,1000,1,3,6,1,1,17,3,0,58,0,+ 17,3,1,59,0,1,1,6,1,1,1,2,6,1,1,17,3,0,60,0,+ 1,4,6,1,1,11,5,16,119,43,119,750,3,1,500,11,5,16,136,43,+ 136,750,1,17,17,3,0,61,0,17,3,1,62,0,17,3,2,63,0,17,+ 3,3,64,0,19,4,38,19,65,96,19,4,46,19,17,45,19,4,17,45,+ 46,19,19,4,27,45,53,45,19,4,53,45,27,45,19,4,44,45,17,75,+ 19,4,17,75,53,75,19,4,53,75,17,75,19,4,27,75,27,45,19,4,+ 31,60,44,75,19,4,39,49,21,82,19,4,21,82,39,49,19,4,44,75,+ 31,60,1,6,6,1,1,11,5,51,27,51,34,1000,17,3,1,65,0,17,+ 3,0,66,0,17,3,2,67,0,19,4,60,49,18,84,1,2,11,5,61,+ 14,61,21,500,17,3,0,68,0,1,3,17,3,0,69,0,17,3,1,70,+ 0,17,3,2,71,0,1,1,17,3,0,72,0,1,1,17,3,0,73,0,+ 1,1,17,3,0,74,0,0,1,8,17,3,0,75,0,17,3,1,76,0,+ 2055,0,9,6,61,76,69,76,0,1,10,4,61,76,21,1,10,4,69,76,+ 22,1,17,3,1,77,0,256,0,1,16,17,3,0,78,0,17,3,1,79,+ 0,11,5,74,41,74,50,500,3,1,200,11,5,64,41,64,50,500,3,1,+ 200,11,5,54,41,54,50,500,3,1,200,11,5,44,41,44,50,500,3,1,+ 200,11,5,34,41,34,50,500,3,1,200,11,5,24,41,24,50,500,4103,0,+ 17,3,0,80,0,256,0,1,2,17,3,0,81,0,19,4,67,22,67,40,+ 1,4,17,3,0,82,0,17,3,1,83,0,19,4,35,13,91,121,19,4,+ 45,13,91,121,0,1,2,0,0,17,3,0,84,0,4,4,0,0,17,3,+ 0,85,0,17,3,1,86,0,17,3,2,87,0,27,2,0,15,2,-1,5,+ 3,1,1500,10,4,0,25,90,1,0,0,3,1,100,10,4,0,26,90,1,+ 0,0,3,1,100,10,4,0,27,90,1,0,0,3,1,100,10,4,0,28,+ 90,1,0,0,3,1,100,10,4,0,29,90,1,0,0,3,1,100,10,4,+ 0,30,90,1,0,0,3,1,100,10,4,0,31,90,1,0,0,3,1,100,+ 10,4,0,32,90,1,0,0,14,0,35,3,1,2000,28,1,200,22,6,3,+ 0,2,0,140,0,2,0,15,2,-1,10,10,4,137,25,90,1,0,0,3,+ 1,50,10,4,137,26,90,1,0,0,3,1,50,10,4,137,27,90,1,0,+ 0,3,1,50,10,4,137,28,90,1,0,0,3,1,50,10,4,137,29,90,+ 1,0,0,3,1,50,10,4,137,30,90,1,0,0,3,1,50,10,4,137,+ 31,90,1,0,0,3,1,50,10,4,137,32,90,1,0,0,0,0,26,0,+ 3,1,4000,25,0,1048,0,0,0,29,0,15,4103,0,27,0,0,0,10,4,+ 137,25,0,1,10,4,137,26,0,1,10,4,137,27,0,1,10,4,137,28,+ 0,1,10,4,137,29,0,1,10,4,137,30,0,1,10,4,137,31,0,1,+ 10,4,137,32,0,1,17,3,1,88,0,17,3,2,89,0,21,1,3,256,+ 0,1,1,0,0,+};+const uint8_t cn_crystals[CN_CRYSTALS][3] = {{1, 54, 15}, {2, 28, 20}, {3, 48, 25}, {4, 28, 10}, {4, 8, 13}, {4, 59, 28}, {5, 12, 12}, {6, 16, 21}, {6, 29, 41}, {7, 22, 40}, {7, 29, 57}, {7, 25, 70}, {7, 19, 82}, {7, 10, 102}, {8, 43, 18}, {9, 66, 31}, {9, 26, 38}, {9, 91, 46}, {9, 26, 61}, {12, 24, 21}, {12, 54, 49}, {13, 20, 28}, {13, 37, 40}, {13, 29, 52}, {13, 41, 77}, {13, 29, 97}, {13, 30, 133}, {14, 39, 55}, {14, 28, 82}, {15, 35, 45}, {15, 55, 94}, {16, 31, 59}, {17, 19, 52}, {17, 20, 52}, {18, 51, 19}, {18, 77, 21}, {18, 78, 21}, {19, 61, 37}, {19, 23, 45}, {20, 52, 27}, {20, 82, 39}, {20, 137, 51}, {23, 82, 11}, {23, 5, 44}, {23, 48, 55}, {24, 49, 22}, {24, 28, 49}, {24, 65, 60}, {25, 48, 43}};+const uint16_t cn_text_at[CN_TEXTS] = {+ 0,80,148,175,235,266,295,335,359,403,439,482,500,517,541,563,+ 592,618,638,730,859,895,953,1011,1064,1103,1167,1184,1225,1274,1288,1352,+ 1410,1459,1531,1550,1584,1618,1696,1734,1786,1822,1866,1919,1967,2031,2078,2103,+ 2158,2195,2242,2286,2321,2356,2395,2456,2495,2542,2582,2604,2622,2658,2714,2749,+ 2781,2811,2842,2877,2899,2923,2968,3021,3087,3132,3148,3187,3225,3269,3290,3318,+ 3353,3393,3432,3454,3494,3517,3546,3599,3639,3681,+};+const char cn_text_data[3711] = {+ 1,0,2,2,67,97,116,32,1,0,2,3,78,105,110,106,97,58,10,1,1,2,4,32,+ 84,104,101,32,115,101,97,114,99,104,32,102,111,114,32,116,104,101,32,10,1,2,2,5,+ 109,97,103,105,99,97,108,1,2,2,6,32,101,110,101,114,103,121,32,1,2,2,7,99,+ 114,121,115,116,97,108,115,0,1,3,2,8,32,80,114,111,103,114,97,109,109,105,110,103,+ 32,1,1,2,1,32,97,110,100,32,1,3,2,9,32,65,114,116,119,111,114,107,32,1,+ 1,2,1,32,98,121,32,10,1,4,2,10,82,105,99,104,109,97,110,32,83,116,101,119,+ 97,114,116,0,1,1,2,1,32,32,73,110,32,97,115,115,111,99,105,97,116,105,111,110,+ 32,119,105,116,104,32,0,1,3,2,11,32,77,117,115,105,99,32,1,1,2,1,32,98,+ 121,32,1,5,2,12,32,66,117,110,110,121,77,97,106,115,32,1,1,2,1,32,97,110,+ 100,32,1,5,2,13,32,69,114,105,99,32,83,107,105,102,102,32,0,1,6,2,14,73,+ 116,39,115,32,97,32,115,104,97,109,101,32,121,111,117,32,102,101,101,108,32,112,97,105,+ 110,0,1,6,2,14,72,111,119,32,100,105,100,32,121,111,117,32,100,105,101,32,116,111,+ 32,116,104,97,116,63,0,1,6,2,14,89,111,117,32,97,114,101,32,98,97,100,32,97,+ 110,100,32,121,111,117,32,115,104,111,117,108,100,32,102,101,101,108,32,98,97,100,0,1,+ 6,2,14,84,104,97,116,32,109,117,115,116,32,104,97,118,101,32,104,117,114,116,0,1,+ 6,2,14,87,104,101,114,101,32,100,105,100,32,121,111,117,114,32,112,97,119,115,32,103,+ 111,63,10,79,104,44,32,102,111,117,110,100,32,116,104,101,109,46,0,1,6,2,14,87,+ 111,119,44,32,121,111,117,32,97,114,101,32,97,32,114,101,97,108,108,121,32,98,97,100,+ 32,107,105,116,116,121,0,1,6,2,14,67,111,109,101,32,111,110,44,32,121,111,117,32,+ 114,101,97,108,108,121,32,115,117,99,107,32,97,116,32,116,104,105,115,32,103,97,109,101,+ 46,0,1,6,2,14,83,116,117,112,105,100,32,107,105,116,116,121,46,0,1,6,2,14,+ 83,105,108,108,121,32,107,105,116,116,121,46,0,1,7,2,15,72,69,89,46,32,68,111,+ 110,39,116,32,108,101,97,118,101,32,109,101,0,1,7,2,15,87,104,101,114,101,32,100,+ 105,100,32,121,111,117,32,103,111,63,0,1,7,2,15,68,111,110,39,116,32,121,111,117,+ 32,100,97,114,101,32,108,101,97,118,101,32,109,101,46,0,1,7,2,15,72,101,108,112,+ 44,32,100,111,110,39,116,32,108,101,97,118,101,32,109,101,33,0,1,8,2,14,75,105,+ 116,116,121,32,109,117,115,116,32,100,105,101,33,0,1,7,2,16,71,111,111,98,32,106,+ 111,98,32,67,97,116,110,105,110,106,97,33,10,1,9,2,17,89,111,117,32,99,111,108,+ 108,101,99,116,101,100,32,101,110,111,117,103,104,32,99,114,121,115,116,97,108,115,32,116,+ 111,32,115,97,118,101,32,116,104,101,32,119,111,114,108,100,46,46,46,32,111,114,32,115,+ 111,109,101,116,104,105,110,103,33,0,1,7,2,16,71,111,111,98,32,106,111,98,32,67,+ 97,116,110,105,110,106,97,33,10,1,9,2,17,85,110,102,111,114,116,117,110,97,116,101,+ 108,121,32,121,111,117,32,100,105,100,32,110,111,116,32,99,111,108,108,101,99,116,32,101,+ 110,111,117,103,104,32,99,114,121,115,116,97,108,115,10,116,111,32,115,97,118,101,32,116,+ 104,101,32,119,111,114,108,100,32,111,114,32,115,111,109,101,116,104,105,110,103,46,32,89,+ 111,117,32,109,117,115,116,32,116,114,121,32,97,103,97,105,110,33,0,1,6,2,0,32,+ 1,6,2,7,84,104,97,110,107,115,32,116,111,58,1,6,2,0,32,1,6,2,9,75,+ 105,116,116,105,101,115,0,1,6,2,0,32,1,6,2,11,83,111,110,103,58,1,6,2,+ 0,32,1,6,2,18,85,110,100,101,114,99,108,111,99,107,101,100,1,6,2,0,32,98,+ 121,32,1,6,2,13,69,114,105,99,32,83,107,105,102,102,0,1,6,2,0,32,1,6,+ 2,6,83,111,110,103,58,1,6,2,0,32,1,6,2,18,83,112,108,105,116,32,80,101,+ 114,115,111,110,97,1,6,2,0,32,98,121,32,1,6,2,12,66,117,110,110,121,77,97,+ 106,115,0,1,6,2,0,32,1,6,2,18,83,111,110,103,58,1,6,2,0,32,1,6,+ 2,18,51,114,100,32,98,97,115,101,1,6,2,0,32,98,121,32,1,6,2,13,66,117,+ 110,110,121,77,97,106,115,0,1,6,2,0,32,73,110,32,97,115,115,111,99,105,97,116,+ 105,111,110,32,119,105,116,104,32,1,6,2,10,84,114,97,99,107,109,105,108,108,0,1,+ 6,2,0,32,1,6,2,8,80,114,111,103,114,97,109,109,105,110,103,1,6,2,0,32,+ 97,110,100,32,1,6,2,9,97,114,116,1,6,2,0,32,98,121,32,1,6,2,10,82,+ 105,99,104,109,97,110,32,83,116,101,119,97,114,116,0,1,6,2,0,32,1,10,2,19,+ 67,114,101,100,105,116,115,0,1,6,2,0,32,85,115,101,32,116,104,101,32,1,6,2,+ 20,97,114,114,111,119,32,107,101,121,115,1,6,2,0,32,116,111,32,109,111,118,101,46,+ 0,1,6,2,0,32,77,111,118,101,32,1,6,2,19,102,111,114,119,97,114,100,1,6,+ 2,0,32,116,111,32,1,6,2,21,115,97,118,101,32,116,104,101,32,119,111,114,108,100,+ 33,0,1,6,2,0,32,1,11,2,0,72,69,89,33,0,1,6,2,0,32,73,32,100,+ 101,115,116,114,111,121,101,100,32,116,104,101,32,1,6,2,7,109,97,115,115,105,118,101,+ 32,101,110,101,114,103,121,32,99,114,121,115,116,97,108,1,6,2,0,32,1,6,2,14,+ 109,117,97,104,97,104,97,0,1,6,2,0,32,73,116,115,32,112,97,114,116,115,32,104,+ 97,118,101,32,98,101,101,110,32,1,6,2,21,115,99,97,116,116,101,114,101,100,32,97,+ 114,111,117,110,100,32,116,104,105,115,32,119,111,114,108,100,33,0,1,6,2,0,32,89,+ 111,117,32,109,117,115,116,32,1,6,2,22,114,101,116,114,105,101,118,101,1,6,2,0,+ 32,97,108,108,32,111,102,32,105,116,115,32,112,97,114,116,115,33,0,1,6,2,0,32,+ 73,102,32,121,111,117,32,100,111,32,110,111,116,44,32,116,104,101,32,119,111,114,108,100,+ 32,1,6,2,14,99,111,117,108,100,32,101,120,112,108,111,100,101,1,6,2,0,46,46,+ 46,32,1,9,2,0,111,114,32,115,111,109,101,116,104,105,110,103,0,1,6,2,0,32,+ 1,10,2,23,87,65,76,76,32,74,85,77,80,0,1,6,2,0,32,1,12,2,14,83,+ 112,105,107,101,115,1,6,2,0,32,97,114,101,32,104,97,114,109,108,101,115,115,46,0,+ 1,6,2,0,32,84,104,105,115,32,105,115,32,97,32,1,12,2,23,99,111,110,116,105,+ 110,117,101,32,112,111,105,110,116,0,1,6,2,0,32,67,111,108,108,101,99,116,32,116,+ 104,101,115,101,32,1,6,2,24,99,114,121,115,116,97,108,115,1,6,2,0,32,116,111,+ 32,1,6,2,21,115,97,118,101,32,116,104,101,32,119,111,114,108,100,1,6,2,0,32,+ 1,9,2,0,46,46,46,112,114,111,98,97,98,108,121,0,1,6,2,0,32,100,111,117,+ 98,108,101,32,116,97,112,32,117,112,32,116,111,32,1,6,2,25,100,111,117,98,108,101,+ 32,106,117,109,112,0,1,6,2,0,32,121,111,117,32,99,97,110,110,111,116,32,119,97,+ 108,108,32,106,117,109,112,32,111,110,32,116,104,101,115,101,32,1,6,2,21,115,116,105,+ 99,107,121,32,119,97,108,108,115,0,1,6,2,0,32,104,111,108,100,32,100,111,119,110,+ 32,97,110,100,32,109,111,118,101,32,116,111,32,1,6,2,25,114,111,108,108,0,1,6,+ 2,0,32,104,111,108,100,32,100,111,119,110,32,119,104,105,108,101,32,105,110,32,116,104,+ 101,32,97,105,114,32,116,111,32,1,6,2,25,83,76,65,77,0,1,6,2,0,32,71,+ 111,32,100,111,119,110,32,98,101,99,97,117,115,101,32,121,111,117,32,100,111,101,115,110,+ 39,116,32,97,102,114,97,105,100,32,111,102,32,97,110,121,116,104,105,110,103,46,0,1,+ 6,2,0,32,68,111,32,78,79,84,32,112,114,101,115,115,32,116,104,105,115,32,98,117,+ 116,116,111,110,46,32,83,69,82,73,79,85,83,32,66,85,83,73,78,69,83,83,0,1,+ 6,2,0,32,89,111,117,32,99,97,110,32,1,6,2,25,115,108,97,109,1,6,2,0,+ 32,111,110,32,1,6,2,26,103,108,97,115,115,1,6,2,0,32,116,111,32,98,114,101,+ 97,107,32,116,104,114,111,117,103,104,32,105,116,46,0,1,6,2,0,32,68,111,110,39,+ 116,32,121,111,117,32,1,6,2,14,100,97,114,101,1,6,2,0,32,112,114,101,115,115,+ 32,116,104,97,116,32,98,117,116,116,111,110,46,0,1,6,2,0,32,89,111,117,32,115,+ 105,108,108,121,32,98,105,108,108,121,32,121,111,117,0,1,6,2,0,32,84,104,105,115,+ 32,98,117,116,116,111,110,32,100,111,101,115,110,39,116,32,101,118,101,110,32,100,111,32,+ 97,110,121,116,104,105,110,103,32,121,111,117,32,1,6,2,14,102,111,111,108,0,1,6,+ 2,0,32,83,116,111,112,32,105,116,44,32,121,111,117,39,114,101,32,109,97,107,105,110,+ 103,32,109,101,32,100,105,122,122,121,0,1,6,2,0,32,80,114,101,115,115,105,110,103,+ 32,1,6,2,27,98,97,99,107,115,112,97,99,101,1,6,2,0,32,115,97,118,101,115,+ 32,116,104,101,32,100,97,121,46,0,1,6,2,0,32,87,101,108,99,111,109,101,32,116,+ 111,32,116,104,101,32,103,108,97,115,115,32,114,105,100,101,32,111,102,32,1,13,2,14,+ 68,69,65,84,72,0,1,6,2,0,32,53,32,68,79,76,76,65,82,83,32,80,69,82,+ 32,82,73,68,69,32,66,89,32,84,72,69,32,87,65,89,0,1,6,2,0,32,53,32,+ 68,79,76,76,65,82,83,32,80,69,82,32,82,73,68,69,32,66,89,32,84,72,69,32,+ 87,65,89,0,1,6,2,0,32,89,111,117,32,111,119,101,32,109,101,32,53,32,100,111,+ 108,108,97,114,115,32,102,111,114,32,116,104,101,32,114,105,100,101,0,1,6,2,0,32,+ 73,32,115,101,116,32,109,105,110,101,39,115,32,116,111,32,103,111,32,111,102,102,32,115,+ 108,111,119,108,121,32,115,111,32,121,111,117,32,99,97,110,32,106,117,115,116,32,119,97,+ 108,107,32,112,97,115,116,0,1,6,2,0,32,80,114,101,115,115,32,115,104,105,102,116,+ 32,116,111,32,116,111,103,103,108,101,32,116,104,101,32,106,101,116,112,97,99,107,0,1,+ 6,2,0,32,84,104,101,32,102,111,108,108,111,119,105,110,103,32,114,111,111,109,32,105,+ 115,32,102,117,108,108,32,111,102,32,116,101,100,100,121,32,98,101,97,114,115,0,1,6,+ 2,0,32,73,32,108,105,101,100,46,32,84,104,101,114,101,32,119,101,114,101,32,110,111,+ 32,116,101,100,100,121,32,98,101,97,114,115,46,0,1,6,2,0,32,75,101,101,112,32,+ 111,110,32,114,117,110,110,105,110,103,33,0,1,6,2,0,32,1,10,2,14,100,101,97,+ 100,32,101,110,100,0,1,6,2,0,32,84,104,105,115,32,109,105,103,104,116,32,103,101,+ 116,32,97,32,108,105,116,116,108,101,32,119,101,105,114,100,46,0,1,6,2,0,32,73,+ 32,112,114,111,109,105,115,101,32,121,111,117,32,116,104,101,32,114,105,103,104,116,32,116,+ 101,108,101,112,111,114,116,101,114,32,119,111,110,39,116,32,107,105,108,108,32,121,111,117,+ 46,0,1,6,2,0,32,87,104,101,110,32,104,97,118,101,32,73,32,101,118,101,114,32,+ 108,105,101,100,32,116,111,32,121,111,117,63,0,1,6,2,0,32,1,13,2,0,83,101,+ 101,44,32,121,111,117,32,99,97,110,32,116,114,117,115,116,32,109,101,46,0,1,6,2,+ 0,32,1,13,2,0,83,104,111,117,108,100,39,118,101,32,116,114,117,115,116,101,100,32,+ 109,101,0,1,6,2,0,32,81,117,105,99,107,33,32,89,111,117,39,114,101,32,111,110,+ 32,97,32,116,105,109,101,114,33,0,1,6,2,0,32,84,104,101,114,101,39,115,32,97,+ 99,116,117,97,108,108,121,32,110,111,32,116,105,109,101,114,46,32,58,125,0,1,6,2,+ 0,32,1,7,2,14,73,84,39,83,32,65,32,84,82,65,80,33,0,1,6,2,0,32,+ 1,13,2,28,84,104,101,32,67,114,111,115,115,114,111,97,100,115,0,1,6,2,0,32,+ 84,114,117,115,116,32,109,101,44,32,116,104,105,115,32,119,97,115,32,116,104,101,32,109,+ 117,99,104,32,98,101,116,116,101,114,32,112,97,116,104,0,1,6,2,0,32,79,104,44,+ 32,104,97,110,103,32,111,110,32,97,32,115,101,99,111,110,100,46,46,46,32,116,104,105,+ 115,32,119,97,115,32,116,104,101,32,119,114,111,110,103,32,112,97,116,104,0,1,6,2,+ 0,32,83,111,114,114,121,32,97,98,111,117,116,32,116,104,97,116,46,10,1,6,2,25,+ 66,97,99,107,115,112,97,99,101,1,6,2,0,32,109,105,103,104,116,32,99,111,109,101,+ 32,105,110,32,104,97,110,100,121,32,110,111,119,46,0,1,6,2,0,32,84,114,117,115,+ 116,32,109,101,44,32,116,104,105,115,32,119,97,115,32,116,104,101,32,109,117,99,104,32,+ 98,101,116,116,101,114,32,112,97,116,104,0,1,6,2,0,32,87,101,101,101,101,101,101,+ 101,101,101,0,1,6,2,0,32,73,32,104,111,112,101,32,121,111,117,39,114,101,32,103,+ 111,111,100,32,97,116,32,1,6,2,29,106,117,109,112,105,110,103,0,1,6,2,0,32,+ 77,97,121,32,99,97,117,115,101,32,115,108,105,103,104,116,46,46,46,32,115,105,100,101,+ 32,101,102,102,101,99,116,115,0,1,6,2,0,32,67,111,109,101,32,111,110,44,32,106,+ 117,115,116,32,112,114,101,115,115,32,116,104,101,32,98,117,116,116,111,110,32,97,108,114,+ 101,97,100,121,0,1,6,2,0,32,80,102,102,116,44,32,116,111,111,32,101,97,115,121,+ 46,0,1,6,2,0,32,68,111,117,98,108,101,32,116,104,101,32,100,111,115,101,32,1,+ 6,2,14,58,125,0,1,6,2,0,32,65,108,114,101,97,100,121,32,99,111,109,101,32,+ 116,104,105,115,32,102,97,114,63,32,72,109,109,46,46,46,0,1,6,2,0,32,80,102,+ 102,116,44,32,116,104,105,115,32,114,111,111,109,32,105,115,32,101,122,46,32,83,116,111,+ 112,32,100,121,105,110,103,46,0,1,6,2,0,32,89,111,117,39,118,101,32,1,6,2,+ 14,100,105,101,100,1,6,2,0,32,97,32,108,111,116,32,115,111,32,102,97,114,33,0,+ 1,6,2,0,32,1,10,2,0,83,109,97,114,116,32,107,105,116,116,121,46,0,1,6,+ 2,0,32,72,111,119,32,100,105,100,32,121,111,117,32,1,6,2,30,102,97,108,108,1,+ 6,2,0,32,102,111,114,32,116,104,97,116,63,0,1,6,2,0,32,71,101,116,116,105,+ 110,103,32,99,108,111,115,101,114,46,46,46,0,1,6,2,0,32,1,13,2,31,84,104,+ 101,114,101,32,105,115,32,110,111,32,101,115,99,97,112,101,46,0,1,6,2,0,32,1,+ 6,2,32,68,117,100,101,44,32,121,111,117,32,108,105,107,101,32,100,105,100,110,39,116,+ 32,104,97,118,101,32,116,111,32,109,101,115,115,32,119,105,116,104,32,109,101,46,0,1,+ 6,2,0,32,1,6,2,32,67,111,117,108,100,39,118,101,32,106,117,115,116,32,99,104,+ 105,108,108,101,100,32,97,116,32,104,111,109,101,46,0,1,6,2,0,32,1,6,2,32,+ 89,111,117,32,97,114,101,32,106,117,115,116,32,103,111,105,110,103,32,116,111,32,100,105,+ 101,32,97,103,97,105,110,46,0,1,6,2,0,32,1,13,2,32,87,104,121,32,100,111,+ 32,121,111,117,32,101,118,101,110,32,116,114,121,46,0,+};+const uint32_t cn_colours[CN_COLOURS] = {0x000000, 0xFFFFFF, 0xE473EE, 0x1C6FD5, 0xB95BEC, 0x12DFF5, 0x3696E4, 0xDB05E0, 0x1E84EA, 0x2FC5F0, 0xBD55F4, 0xCE4DCB, 0xD579F2, 0x3379E3, 0xFF0000, 0x2D95EA, 0x00FF00, 0x99FB97, 0x7597E8, 0x126BAD, 0x971CC6, 0x35B423, 0x0000FF, 0x1489B6, 0x259FDA, 0x0E60B1, 0x8F8F8F, 0x53C5FB, 0x935631, 0x22B3EA, 0xC230E7, 0xD90000, 0x780101};+/* cubic, 32 pixels */+static const uint8_t font0_data[975] = {+ 255,255,246,255,111,255,255,246,255,111,255,255,6,0,0,0,0,0,0,0,255,255,246,255,+ 111,255,255,246,255,111,255,255,6,0,0,0,81,218,254,255,255,255,10,0,0,112,254,255,+ 255,255,255,159,0,0,16,251,255,255,255,255,255,8,0,0,209,255,255,255,255,255,127,0,+ 0,16,252,255,255,255,255,255,6,0,0,128,255,255,255,92,1,0,0,0,0,242,255,255,+ 175,0,0,0,0,0,0,247,255,255,13,0,0,0,0,0,0,251,255,255,6,0,0,0,+ 0,0,0,253,255,255,2,0,0,0,0,0,0,255,255,255,0,0,0,0,0,0,0,254,+ 255,255,1,0,0,0,0,0,0,253,255,255,4,0,0,0,0,0,0,249,255,255,11,0,+ 0,0,0,0,0,245,255,255,111,0,0,0,0,0,0,208,255,255,255,40,0,0,0,0,+ 0,80,255,255,255,255,255,7,0,0,0,0,248,255,255,255,255,7,0,0,0,0,128,255,+ 255,255,255,7,0,0,0,0,0,230,255,255,255,7,0,0,0,0,0,16,166,237,255,7,+ 0,0,0,0,0,128,7,0,0,240,255,255,15,0,112,255,6,0,0,255,255,255,0,128,+ 255,255,5,0,240,255,255,15,144,255,255,255,4,0,255,255,255,144,255,255,255,239,3,240,+ 255,255,175,255,255,255,255,239,2,255,255,255,255,255,255,255,255,223,242,255,255,255,255,255,+ 223,255,255,223,255,255,255,255,255,255,226,255,255,255,255,255,255,255,255,15,227,255,255,255,+ 255,255,255,255,255,0,227,255,255,255,255,255,255,255,15,0,227,255,255,255,255,255,255,255,+ 0,0,228,255,255,255,255,255,255,15,0,0,244,255,255,255,255,255,255,0,0,0,244,255,+ 255,255,255,255,15,0,0,0,245,255,255,255,255,255,0,0,0,0,245,255,255,255,255,15,+ 0,0,0,0,246,255,255,255,255,0,0,0,0,0,246,255,255,255,15,0,0,0,0,0,+ 247,255,255,255,0,0,0,0,0,0,7,0,0,0,0,0,193,255,111,0,0,0,0,16,+ 252,255,111,0,0,0,0,177,255,255,111,0,0,0,0,251,255,255,111,0,0,0,176,255,+ 255,255,111,0,0,0,250,255,255,255,111,0,0,160,255,255,249,255,111,0,0,250,255,175,+ 240,255,111,0,144,255,255,10,240,255,111,0,249,255,191,0,240,255,111,144,255,255,43,102,+ 246,255,111,246,255,191,194,255,255,255,111,247,255,28,252,255,255,255,111,247,207,177,255,255,+ 255,255,111,247,28,250,255,255,255,255,111,215,1,0,0,0,240,255,111,38,0,0,0,0,+ 240,255,111,0,0,3,0,107,0,250,6,250,111,249,255,246,255,111,255,255,246,255,111,255,+ 255,246,255,111,255,255,246,255,111,255,255,246,255,111,255,255,246,255,111,255,255,6,0,0,+ 0,0,0,0,83,0,0,227,6,0,227,111,0,226,255,6,208,255,111,0,255,255,6,240,+ 255,111,0,255,255,6,240,255,111,0,255,255,6,240,255,111,0,255,255,6,240,255,111,0,+ 255,255,6,240,255,111,0,255,255,6,240,255,111,150,255,255,245,255,255,63,255,255,223,240,+ 255,255,4,255,190,4,0,0,16,44,0,0,240,255,111,0,193,223,2,0,240,255,111,16,+ 252,255,62,0,240,255,111,193,255,255,239,4,240,255,111,252,255,255,255,95,240,255,111,255,+ 255,255,255,255,245,255,111,255,255,217,255,255,255,255,111,255,255,24,253,255,255,255,111,255,+ 255,8,210,255,255,255,111,255,255,8,32,253,255,255,111,255,255,8,0,210,255,255,111,255,+ 255,8,0,32,253,255,111,255,255,8,0,0,210,255,111,255,255,8,0,0,32,253,111,255,+ 255,8,0,0,0,226,111,255,255,8,0,0,0,32,110,255,255,8,0,0,0,0,83,0,+ 0,246,255,255,255,255,11,0,96,255,255,255,255,191,0,0,245,255,255,255,255,11,0,80,+ 255,255,255,255,191,0,0,96,102,246,255,207,6,0,0,0,0,240,255,111,0,0,0,0,+ 0,240,255,111,0,0,0,0,0,240,255,111,0,0,0,0,0,240,255,111,0,0,0,0,+ 0,240,255,111,0,0,0,0,0,240,255,111,0,0,0,0,0,240,255,111,0,0,0,0,+ 0,240,255,111,0,0,0,0,0,240,255,111,0,0,0,0,0,240,255,111,0,0,0,0,+ 0,240,255,111,0,0,0,0,0,240,255,111,0,0,0,+};+static const np_glyph_t font0_glyphs[85] = {+ {0, 0, 0, 0, 9, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {5, 13, 3, -13, 10, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {20, 21, 0, -21, 16, 33},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {19, 21, 0, -21, 21, 243},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {16, 17, -1, -17, 16, 443},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {5, 17, 0, -17, 6, 579},+ {7, 23, -1, -18, 7, 622},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {16, 17, 0, -17, 17, 703},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {16, 17, -1, -17, 11, 839},+};+/* cubic, 10 pixels */+static const uint8_t font1_data[262] = {+ 0,0,22,243,65,31,244,65,31,244,1,194,255,26,131,95,0,64,31,0,64,31,0,64,+ 31,0,64,31,0,0,160,31,16,235,31,210,108,31,219,253,31,39,115,31,96,255,10,243,+ 134,63,244,255,31,244,216,63,244,249,10,48,252,28,225,90,1,243,2,0,225,57,0,80,+ 189,0,96,223,25,48,95,214,11,244,1,245,65,79,197,12,244,234,43,0,112,255,27,243,+ 87,0,244,255,0,244,137,0,244,255,0,96,246,28,243,83,1,244,246,1,244,50,0,244,+ 1,0,96,65,31,243,65,31,244,255,31,244,116,31,244,65,31,80,49,31,244,65,31,244,+ 1,64,74,31,243,191,31,244,216,31,244,54,30,244,6,21,64,236,60,16,174,197,13,243,+ 2,245,17,174,197,13,64,236,43,0,96,255,10,243,166,63,244,246,31,244,97,47,244,1,+ 52,112,254,95,224,72,3,144,223,2,64,231,7,241,223,2,177,255,38,248,5,64,31,0,+ 244,1,64,31,0,112,81,51,158,64,111,127,158,0,244,255,159,0,64,111,156,0,0,67,+ 96,0,0,0,80,67,158,48,143,159,0,244,159,0,64,191,0,0,244,4,0,0,+};+static const np_glyph_t font1_glyphs[90] = {+ {0, 0, 0, 0, 3, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {3, 7, -1, -7, 2, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 6, 0, -6, 4, 11},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 5, 0, -5, 6, 29},+ {6, 5, -1, -5, 5, 44},+ {6, 5, -1, -5, 4, 59},+ {7, 5, -1, -5, 6, 74},+ {6, 5, -1, -5, 3, 92},+ {6, 5, -1, -5, 4, 107},+ {0, 0, 0, 0, 0, 0},+ {6, 5, -1, -5, 5, 122},+ {3, 5, -1, -5, 2, 137},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 5, -1, -5, 5, 145},+ {7, 5, -1, -5, 6, 160},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 5, -1, -5, 5, 178},+ {6, 5, 0, -5, 5, 193},+ {5, 5, 0, -5, 4, 208},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {9, 5, 0, -5, 7, 221},+ {0, 0, 0, 0, 0, 0},+ {7, 5, -1, -5, 4, 244},+};+/* cubic, 20 pixels */+static const uint8_t font2_data[633] = {+ 0,0,0,226,191,0,0,32,253,191,0,0,193,255,191,0,16,252,255,191,0,176,255,248,+ 191,0,249,159,240,191,128,255,10,240,191,245,191,246,255,191,247,92,255,255,191,199,195,221,+ 253,191,21,0,0,240,191,0,129,253,255,111,48,254,255,255,6,225,255,223,125,0,248,207,+ 2,0,0,253,30,0,0,0,255,12,0,0,0,254,30,0,0,0,250,175,1,0,0,243,+ 255,223,6,0,96,255,255,7,0,0,180,254,7,0,0,252,255,255,11,144,255,255,191,0,+ 248,223,221,26,0,255,11,0,0,0,255,223,221,6,0,255,255,255,7,0,255,255,255,7,+ 0,255,11,0,0,0,255,223,221,6,0,255,255,255,7,0,255,255,255,7,0,0,113,236,+ 255,255,79,32,253,255,255,255,4,209,255,223,221,93,0,248,191,2,0,0,0,253,30,0,+ 251,15,0,255,12,0,251,15,0,254,14,0,251,15,0,250,159,0,251,15,0,243,255,222,+ 254,15,0,112,255,255,255,15,0,0,180,254,255,15,0,0,4,183,246,251,191,255,251,191,+ 255,251,191,255,251,191,255,11,0,6,0,0,185,0,0,248,11,0,240,191,0,0,255,11,+ 0,240,191,0,0,255,11,0,240,191,0,0,255,219,221,253,191,255,255,255,251,255,15,0,+ 0,0,35,0,80,0,0,32,62,0,184,0,0,210,63,128,191,0,32,253,63,248,191,0,+ 210,255,175,255,191,16,253,255,255,255,191,193,255,253,255,252,191,252,111,248,207,241,191,255,+ 7,248,28,240,191,127,0,216,1,240,191,7,0,38,0,240,191,0,90,0,240,191,128,255,+ 6,240,191,248,255,127,240,191,255,255,255,248,191,255,140,255,255,191,255,12,249,255,191,255,+ 12,144,255,191,255,12,0,250,191,255,12,0,160,191,255,12,0,0,186,255,12,0,0,112,+ 0,250,255,109,0,249,255,255,127,248,222,237,255,253,191,0,209,239,255,11,16,253,253,191,+ 244,255,111,255,11,247,255,242,191,0,246,207,255,11,0,247,255,191,0,0,248,255,11,0,+ 0,8,0,0,0,0,80,253,255,255,62,245,255,255,239,4,253,223,221,77,0,254,8,0,+ 0,0,252,223,74,0,0,244,255,255,5,0,80,252,255,12,0,0,0,252,14,0,221,221,+ 255,12,0,255,255,255,6,0,255,255,126,0,0,0,246,255,255,29,80,255,255,223,2,195,+ 253,255,44,0,0,240,191,0,0,0,240,191,0,0,0,240,191,0,0,0,240,191,0,0,+ 0,240,191,0,0,0,240,191,0,0,0,240,191,0,0,0,240,191,0,0,0,7,0,249,+ 239,3,185,0,248,239,3,248,11,247,255,4,240,191,246,255,5,0,255,255,255,6,0,240,+ 255,255,7,0,0,255,255,8,0,0,240,255,9,0,0,0,255,15,0,0,0,240,191,0,+ 0,0,0,255,11,0,0,0,0,+};+static const np_glyph_t font2_glyphs[90] = {+ {0, 0, 0, 0, 6, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {10, 11, 0, -11, 11, 0},+ {0, 0, 0, 0, 0, 0},+ {10, 11, 0, -11, 8, 55},+ {0, 0, 0, 0, 0, 0},+ {10, 11, 0, -11, 7, 110},+ {0, 0, 0, 0, 0, 0},+ {12, 11, 0, -11, 10, 165},+ {0, 0, 0, 0, 0, 0},+ {3, 11, 0, -11, 4, 231},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {7, 11, 0, -11, 8, 248},+ {12, 11, 0, -11, 13, 287},+ {10, 11, 0, -11, 11, 353},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {9, 12, 0, -11, 10, 408},+ {10, 11, 1, -11, 9, 462},+ {10, 11, 0, -11, 8, 517},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {11, 11, 0, -11, 9, 572},+};+/* cubic, 14 pixels */+static const uint8_t font3_data[502] = {+ 0,0,48,238,0,0,226,239,0,16,252,239,0,176,255,239,0,249,127,239,112,255,7,239,+ 245,127,17,239,254,103,255,239,127,248,255,239,7,0,0,239,0,0,16,4,80,0,0,193,+ 6,212,0,16,252,38,238,0,177,255,199,239,0,251,255,254,239,160,255,255,239,239,249,111,+ 255,79,239,255,22,255,5,239,111,16,111,0,239,7,16,7,0,239,128,255,207,6,245,255,+ 255,111,239,17,245,223,239,0,240,255,239,0,244,223,239,246,255,111,239,246,239,6,239,16,+ 1,0,239,0,0,0,239,0,0,0,0,0,227,14,0,226,239,0,209,255,14,193,127,239,+ 160,159,240,110,191,251,239,199,249,255,94,17,17,239,32,234,255,38,254,255,7,250,43,1,+ 224,31,0,0,254,0,0,176,159,2,0,244,255,7,0,196,127,0,32,234,255,111,226,255,+ 255,7,250,42,17,0,254,1,249,0,254,0,249,0,251,25,250,0,244,255,255,0,64,253,+ 255,0,80,228,238,239,239,239,239,239,112,0,250,28,230,144,223,1,239,247,46,0,255,255,+ 4,0,255,255,28,0,255,183,127,0,255,16,124,0,239,0,81,0,0,0,80,0,5,0,+ 144,11,230,0,128,191,245,14,128,255,253,239,112,239,255,254,94,223,246,62,239,215,65,62,+ 240,110,2,68,0,239,128,7,240,94,255,8,239,255,255,249,254,95,255,239,255,96,255,254,+ 15,112,239,255,0,128,254,15,0,112,48,235,190,3,243,255,255,62,251,42,179,175,254,1,+ 32,223,254,1,16,223,251,42,162,175,243,255,255,46,48,235,174,2,128,255,61,246,255,207,+ 239,49,239,239,32,207,239,246,95,239,80,223,239,0,246,239,0,128,194,255,255,182,255,255,+ 7,238,18,1,176,255,60,0,194,255,12,16,49,239,0,255,255,11,240,255,44,0,96,255,+ 223,82,255,239,2,17,255,1,0,240,14,0,0,239,0,0,240,14,0,0,239,0,0,240,+ 14,0,112,0,239,230,0,239,239,0,239,239,0,239,239,0,239,254,84,207,248,255,127,128,+ 222,7,112,0,7,80,223,113,14,246,80,223,2,239,244,79,239,2,240,239,255,238,3,0,+ 255,253,239,3,0,240,46,255,4,0,0,79,240,5,0,0,80,0,5,0,0,0,+};+static const np_glyph_t font3_glyphs[88] = {+ {0, 0, 0, 0, 4, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {8, 10, 0, -10, 9, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {10, 10, 0, -10, 11, 40},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {8, 10, 0, -10, 9, 90},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {7, 8, 0, -8, 7, 130},+ {0, 0, 0, 0, 0, 0},+ {7, 8, 0, -8, 6, 158},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {8, 8, 0, -8, 7, 186},+ {0, 0, 0, 0, 0, 0},+ {2, 8, 0, -8, 3, 218},+ {0, 0, 0, 0, 0, 0},+ {8, 8, 0, -8, 6, 226},+ {0, 0, 0, 0, 0, 0},+ {9, 8, 0, -8, 10, 258},+ {7, 8, 0, -8, 8, 294},+ {8, 8, 0, -8, 8, 322},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 8, 0, -8, 7, 354},+ {7, 8, 1, -8, 7, 378},+ {7, 8, 0, -8, 5, 406},+ {6, 8, 1, -8, 7, 434},+ {0, 0, 0, 0, 0, 0},+ {11, 8, 1, -8, 10, 458},+};+/* cubic, 16 pixels */+static const uint8_t font4_data[495] = {+ 0,250,255,125,16,251,255,255,127,253,94,133,255,253,223,0,240,239,255,13,48,255,252,223,+ 243,255,111,255,13,246,255,241,223,0,245,207,255,13,0,246,255,223,0,0,247,255,13,0,+ 0,8,0,0,0,0,16,234,255,255,207,18,253,255,255,191,1,246,159,85,85,0,112,255,+ 4,0,0,0,245,191,37,0,0,0,252,255,175,1,0,16,233,255,143,0,0,0,32,255,+ 12,0,82,85,247,191,0,112,255,255,255,4,0,247,255,207,5,0,0,0,0,48,254,3,+ 0,48,254,63,0,32,254,255,3,32,253,251,63,32,253,28,255,19,253,92,245,63,247,124,+ 255,255,115,109,255,255,63,38,0,0,255,3,0,216,255,79,176,255,255,5,247,159,53,0,+ 253,8,0,0,255,4,0,0,254,7,0,0,249,126,5,0,209,255,15,0,32,234,15,0,+ 64,255,255,62,243,255,255,4,253,88,53,0,255,88,37,0,255,255,127,0,255,255,127,0,+ 255,88,37,0,255,255,127,0,255,255,127,0,48,3,48,255,225,3,48,255,252,3,48,255,+ 255,37,82,255,255,255,255,255,255,255,255,255,255,3,48,255,255,3,48,255,255,3,48,255,+ 32,34,61,253,243,63,255,243,63,255,243,63,255,3,0,0,80,0,35,0,0,154,32,62,+ 0,144,159,226,63,0,247,191,253,63,96,255,255,255,63,245,207,255,250,63,255,133,191,240,+ 63,111,128,28,240,63,7,96,1,240,63,48,27,48,255,227,207,49,255,253,255,93,255,255,+ 250,255,255,255,100,255,255,255,4,246,255,255,4,112,255,255,4,0,247,255,4,0,112,64,+ 255,207,4,227,255,255,14,254,87,247,47,255,3,243,30,255,244,255,7,255,19,255,29,255,+ 3,226,63,255,3,48,63,255,3,0,53,0,246,255,175,0,245,255,175,0,80,245,143,0,+ 0,0,255,3,0,0,240,63,0,0,0,255,3,0,0,240,63,0,0,0,255,3,0,0,+ 240,63,0,0,64,3,128,0,193,175,64,62,128,15,193,191,0,254,115,255,193,191,0,240,+ 175,255,191,191,0,0,255,255,255,191,1,0,240,239,250,191,1,0,0,239,115,191,1,0,+ 0,240,4,199,1,0,0,0,5,64,1,0,0,0,0,+};+static const np_glyph_t font4_glyphs[88] = {+ {0, 0, 0, 0, 5, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {9, 12, 0, -11, 10, 0},+ {11, 11, 0, -11, 9, 54},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {9, 9, 0, -9, 9, 115},+ {0, 0, 0, 0, 0, 0},+ {8, 9, 0, -9, 6, 156},+ {0, 0, 0, 0, 0, 0},+ {8, 9, 0, -9, 6, 192},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {8, 9, 0, -9, 9, 228},+ {3, 9, 0, -9, 3, 264},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {10, 9, 0, -9, 10, 278},+ {8, 9, 0, -9, 9, 323},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {8, 9, 0, -9, 8, 359},+ {0, 0, 0, 0, 0, 0},+ {9, 9, -1, -9, 6, 395},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {13, 9, 1, -9, 12, 436},+};+/* cubic, 18 pixels */+static const uint8_t font5_data[733] = {+ 0,120,255,223,41,0,249,247,255,255,29,250,79,153,250,255,246,255,0,0,255,127,255,15,+ 255,255,255,245,255,240,255,255,15,255,15,255,255,255,243,255,0,16,255,127,255,15,0,224,+ 255,247,255,144,169,255,79,255,15,255,255,191,240,255,240,255,141,1,0,250,255,255,207,2,+ 249,255,255,191,1,250,159,153,121,0,240,255,0,0,0,0,255,159,153,73,0,240,255,255,+ 255,7,0,255,255,255,127,0,240,255,0,0,0,0,255,15,0,0,0,240,255,153,153,4,+ 0,255,255,255,127,0,240,255,255,255,7,0,0,0,0,16,0,0,1,0,0,16,11,0,+ 116,0,0,0,251,0,226,7,0,0,250,15,209,127,0,0,249,255,176,255,7,0,249,255,+ 159,255,127,0,248,255,255,255,255,7,247,255,255,255,254,127,246,255,246,255,78,255,247,255,+ 21,255,79,240,127,255,6,241,95,0,255,247,6,16,111,0,240,127,7,0,113,0,0,255,+ 7,64,236,255,255,255,103,255,255,255,255,6,253,255,255,255,6,240,255,3,0,0,0,252,+ 207,104,0,0,64,255,255,223,1,0,48,235,255,159,0,0,0,48,255,14,0,0,0,241,+ 239,0,144,153,185,255,11,0,255,255,255,63,0,240,255,255,76,0,0,0,0,48,254,7,+ 0,32,253,127,0,16,253,255,7,16,252,254,127,0,251,79,255,7,250,95,240,127,249,111,+ 152,255,247,111,251,255,127,111,249,255,255,119,0,0,240,127,0,181,254,239,2,248,255,239,+ 3,244,239,154,3,176,239,2,0,0,254,9,0,0,240,143,0,0,0,252,29,0,0,96,+ 255,157,4,0,176,255,127,0,0,129,253,7,0,16,245,255,223,17,124,255,223,2,251,151,+ 153,2,240,127,0,0,0,255,247,255,0,240,127,255,15,0,255,151,153,0,240,127,0,0,+ 0,255,7,0,0,240,127,0,0,0,16,4,123,250,247,127,255,247,127,255,247,127,255,247,+ 127,0,82,16,125,192,127,240,127,240,127,240,127,240,127,240,127,240,127,240,127,250,111,255,+ 63,239,7,16,5,32,254,95,193,7,226,255,6,251,39,253,111,0,255,217,255,7,0,255,+ 255,191,0,0,255,255,255,7,0,255,175,253,95,0,255,15,210,127,0,255,7,32,125,0,+ 255,7,0,98,0,16,43,0,255,23,252,29,240,127,251,255,29,255,247,239,255,252,127,255,+ 136,255,255,247,143,144,255,127,255,8,176,255,247,143,0,193,127,255,8,0,193,247,143,0,+ 0,82,16,253,239,25,193,255,255,159,251,156,233,239,255,7,128,239,255,7,176,175,255,167,+ 255,31,255,7,249,175,255,7,128,255,255,7,0,248,255,7,0,144,0,0,0,0,112,253,+ 255,255,118,255,255,255,7,253,157,153,6,224,159,0,0,0,251,255,76,0,32,254,255,46,+ 0,32,167,255,6,144,153,251,111,0,255,255,239,1,240,255,207,3,0,32,5,240,127,193,+ 7,240,127,252,7,240,127,255,7,240,127,255,7,240,127,255,7,240,127,255,9,242,127,251,+ 175,253,63,243,255,255,10,48,252,141,0,16,5,64,255,46,193,7,227,239,3,251,55,254,+ 79,0,255,234,255,5,0,255,255,111,0,0,255,255,7,0,0,255,143,0,0,0,255,14,+ 0,0,0,255,7,0,0,0,255,7,0,0,0,+};+static const np_glyph_t font5_glyphs[90] = {+ {0, 0, 0, 0, 5, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {11, 12, 0, -12, 11, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {11, 12, 0, -12, 8, 66},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {13, 13, 0, -13, 13, 132},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {11, 12, 1, -12, 10, 217},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {9, 10, 0, -10, 9, 283},+ {0, 0, 0, 0, 0, 0},+ {9, 10, 0, -10, 7, 328},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {9, 10, 0, -10, 7, 373},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {3, 10, 0, -10, 3, 418},+ {4, 13, -1, -10, 3, 433},+ {10, 10, 0, -10, 8, 459},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {9, 10, 0, -10, 9, 509},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 0, -10, 9, 554},+ {9, 10, 1, -10, 8, 598},+ {0, 0, 0, 0, 0, 0},+ {8, 10, 1, -10, 9, 643},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {10, 10, 0, -10, 8, 683},+};+/* square, 10 pixels */+static const uint8_t font6_data[681] = {+ 243,49,31,243,49,31,243,17,3,243,1,243,49,31,49,48,31,176,0,1,49,48,31,252,+ 255,31,50,99,31,0,48,31,252,255,31,50,99,31,50,99,31,252,255,31,243,255,255,49,+ 79,51,3,243,1,0,48,255,255,31,49,51,246,17,51,99,31,243,255,255,1,243,17,3,+ 0,16,3,243,1,243,255,255,17,51,99,31,0,0,243,49,255,255,31,243,52,51,32,7,+ 0,0,243,1,0,0,243,255,255,49,79,99,31,243,1,243,49,255,255,31,243,52,246,49,+ 31,48,31,243,1,243,1,243,255,255,49,79,99,31,243,1,243,48,255,255,9,243,52,230,+ 48,79,99,31,243,255,255,1,243,255,143,243,52,35,243,1,0,243,1,0,243,1,0,243,+ 52,35,243,255,143,243,255,223,48,79,99,31,243,1,243,49,31,48,31,243,1,243,49,79,+ 99,31,243,255,223,0,243,255,143,243,52,35,243,1,0,243,255,143,243,52,19,243,52,35,+ 243,255,143,243,255,255,49,79,51,3,243,1,0,48,31,254,31,243,49,246,49,79,99,31,+ 243,255,255,1,243,1,243,49,31,48,31,243,1,243,49,255,255,31,243,52,246,49,31,48,+ 31,243,1,243,1,243,49,31,243,49,31,243,49,31,243,1,243,33,62,243,193,7,243,202,+ 0,243,95,0,243,218,0,243,194,8,243,33,62,243,1,0,243,1,0,243,1,0,243,1,+ 0,243,1,0,243,52,35,243,255,143,243,3,246,49,159,192,31,243,46,255,49,255,251,31,+ 243,253,253,49,143,143,31,243,227,244,1,243,6,243,49,239,50,31,243,207,244,49,175,191,+ 31,243,210,255,49,31,244,31,243,1,249,1,243,255,255,49,79,99,31,243,1,243,49,31,+ 48,31,243,1,243,49,79,99,31,243,255,255,1,243,255,255,49,79,99,31,243,1,243,49,+ 255,255,31,243,52,51,48,31,0,0,243,1,0,0,243,255,255,49,79,99,31,243,1,243,+ 49,31,48,31,243,17,244,49,79,221,31,243,255,255,1,0,112,11,243,255,255,49,79,99,+ 31,243,1,243,49,255,255,31,243,229,58,48,31,245,2,243,1,185,0,255,255,63,246,52,+ 48,31,0,243,1,48,31,0,243,1,48,31,0,243,1,243,49,31,48,31,243,1,243,49,+ 31,48,31,243,1,243,49,79,99,31,243,255,255,1,230,192,42,79,244,241,76,31,241,245,+ 110,13,208,250,175,11,176,206,238,8,128,159,252,5,80,111,249,2,170,160,57,95,46,176,+ 143,0,244,2,48,31,0,243,1,48,31,0,243,255,143,243,52,35,243,1,0,243,255,143,+ 243,52,19,243,1,0,243,1,0,0,0,243,1,0,48,31,0,0,243,1,0,48,31,243,+ 1,243,49,79,99,31,243,255,255,1,230,16,63,242,66,14,224,117,11,160,184,8,112,235,+ 5,48,255,2,0,222,0,244,50,47,176,169,9,64,239,1,0,189,0,64,255,2,176,200,+ 9,228,65,30,255,255,63,67,206,0,234,2,245,6,226,10,192,79,51,255,255,15,223,96,+ 31,243,33,95,243,97,31,223,0,+};+static const np_glyph_t font6_glyphs[94] = {+ {0, 0, 0, 0, 2, 0},+ {3, 7, 0, -7, 3, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {3, 2, 0, -7, 3, 11},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {3, 4, 0, -2, 3, 14},+ {0, 0, 0, 0, 0, 0},+ {3, 2, 0, -2, 3, 20},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 7, 0, -7, 6, 23},+ {0, 0, 0, 0, 0, 0},+ {7, 7, 0, -7, 7, 44},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {3, 5, 0, -5, 3, 69},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {7, 7, 0, -7, 7, 77},+ {0, 0, 0, 0, 0, 0},+ {7, 7, 0, -7, 7, 102},+ {7, 7, 0, -7, 7, 127},+ {6, 7, 0, -7, 6, 152},+ {7, 7, 0, -7, 7, 173},+ {6, 7, 0, -7, 6, 198},+ {0, 0, 0, 0, 0, 0},+ {7, 7, 0, -7, 7, 219},+ {7, 7, 0, -7, 7, 244},+ {3, 7, 0, -7, 3, 269},+ {0, 0, 0, 0, 0, 0},+ {6, 7, 0, -7, 6, 280},+ {6, 7, 0, -7, 6, 301},+ {7, 7, 0, -7, 7, 322},+ {7, 7, 0, -7, 7, 347},+ {7, 7, 0, -7, 7, 372},+ {7, 7, 0, -7, 7, 397},+ {7, 8, 0, -7, 7, 422},+ {7, 7, 0, -7, 7, 450},+ {7, 7, 0, -7, 7, 44},+ {5, 7, 1, -7, 7, 475},+ {7, 7, 0, -7, 7, 493},+ {0, 0, 0, 0, 0, 0},+ {8, 7, 0, -7, 8, 518},+ {0, 0, 0, 0, 0, 0},+ {5, 7, 0, -7, 5, 546},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {7, 7, 0, -7, 7, 102},+ {7, 7, 0, -7, 7, 127},+ {6, 7, 0, -7, 6, 152},+ {7, 7, 0, -7, 7, 173},+ {6, 7, 0, -7, 6, 198},+ {6, 7, 0, -7, 6, 564},+ {7, 7, 0, -7, 7, 219},+ {7, 7, 0, -7, 7, 244},+ {3, 7, 0, -7, 3, 269},+ {7, 7, 0, -7, 7, 585},+ {6, 7, 0, -7, 6, 280},+ {6, 7, 0, -7, 6, 301},+ {7, 7, 0, -7, 7, 322},+ {7, 7, 0, -7, 7, 347},+ {7, 7, 0, -7, 7, 372},+ {7, 7, 0, -7, 7, 397},+ {0, 0, 0, 0, 0, 0},+ {7, 7, 0, -7, 7, 450},+ {7, 7, 0, -7, 7, 44},+ {5, 7, 1, -7, 7, 475},+ {7, 7, 0, -7, 7, 493},+ {6, 7, 0, -7, 6, 610},+ {8, 7, 0, -7, 8, 518},+ {6, 7, 0, -7, 6, 631},+ {5, 7, 0, -7, 5, 546},+ {5, 7, 1, -7, 7, 652},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {3, 7, 0, -7, 3, 670},+};+/* square, 16 pixels */+static const uint8_t font7_data[1006] = {+ 255,241,31,255,241,31,255,241,31,255,241,31,0,208,29,255,1,255,241,31,255,1,221,241,+ 31,212,176,7,221,241,31,255,255,255,255,221,221,237,255,0,0,16,255,0,0,16,255,0,+ 0,16,255,255,255,255,255,255,222,221,221,255,1,0,0,102,0,0,0,221,1,0,0,255,+ 1,0,0,255,255,255,255,255,222,237,255,255,1,16,255,255,1,16,255,255,1,16,255,255,+ 255,255,255,255,222,237,255,255,1,16,255,255,1,16,255,255,1,16,255,255,1,16,255,255,+ 255,255,127,255,222,221,125,255,1,0,0,255,1,0,0,255,1,0,0,255,1,0,0,255,+ 1,0,0,255,1,0,0,255,1,0,0,255,222,221,125,255,255,255,127,255,255,255,159,255,+ 222,237,255,255,1,16,255,255,1,16,255,255,1,16,255,255,1,16,255,255,1,16,255,255,+ 1,16,255,255,1,16,255,255,222,237,255,255,255,255,159,255,255,255,127,255,222,221,125,255,+ 1,0,0,255,1,0,0,255,1,0,0,255,255,255,127,255,222,221,125,255,1,0,0,255,+ 1,0,0,255,222,221,125,255,255,255,127,255,255,255,255,255,222,221,221,255,1,0,0,255,+ 1,0,0,255,1,0,0,255,129,255,255,255,113,237,255,255,1,16,255,255,1,16,255,255,+ 222,237,255,255,255,255,255,255,1,16,255,255,1,16,255,255,1,16,255,255,1,16,255,255,+ 1,16,255,255,255,255,255,255,222,237,255,255,1,16,255,255,1,16,255,255,1,16,255,255,+ 1,16,255,255,241,31,255,241,31,255,241,31,255,241,31,255,241,31,255,1,255,255,255,255,+ 255,222,237,255,255,1,16,255,255,1,16,255,255,1,16,255,255,255,255,255,255,222,221,221,+ 255,1,0,0,255,1,0,0,255,1,0,0,255,1,0,0,255,255,255,255,255,222,237,255,+ 255,1,16,255,255,1,16,255,255,1,16,255,255,255,255,255,255,254,239,221,255,161,175,0,+ 255,17,253,5,255,1,243,30,255,1,112,175,255,255,255,255,255,222,221,221,255,1,0,0,+ 255,1,0,0,255,1,0,0,255,255,255,255,221,221,237,255,0,0,16,255,0,0,16,255,+ 221,221,237,255,255,255,255,255,255,255,255,255,221,253,239,221,0,240,31,0,0,240,31,0,+ 0,240,31,0,0,240,31,0,0,240,31,0,0,240,31,0,0,240,31,0,0,240,31,0,+ 0,240,31,0,242,31,208,111,128,159,224,63,241,143,176,127,176,95,243,175,208,79,144,127,+ 245,223,240,31,96,159,248,255,242,13,48,207,250,255,247,11,16,239,252,252,251,8,0,253,+ 239,247,255,5,0,250,207,244,255,3,0,247,159,242,255,0,0,245,111,224,207,0,247,10,+ 80,175,225,63,208,47,112,175,245,9,16,254,253,2,0,247,159,0,0,241,47,0,0,240,+ 31,0,0,240,31,0,0,240,31,0,0,240,31,0,0,240,31,0,255,255,255,255,255,222,+ 237,255,255,1,16,255,255,1,16,255,255,1,16,239,255,255,255,95,255,222,237,111,255,1,+ 16,239,255,1,16,255,255,222,237,255,255,255,255,255,0,0,16,255,0,0,16,255,0,0,+ 16,255,0,0,16,255,0,0,16,255,0,0,16,255,187,1,16,255,255,1,16,255,255,1,+ 16,255,255,222,237,255,255,255,255,255,255,1,0,0,255,1,0,0,255,1,0,0,255,1,+ 0,0,255,1,0,0,255,1,0,0,255,1,0,0,255,1,0,0,255,1,0,0,255,222,+ 221,125,255,255,255,127,255,4,0,244,255,175,0,160,255,255,31,32,255,255,255,7,248,255,+ 255,223,224,255,255,255,159,255,255,255,254,255,254,255,159,255,159,255,255,243,255,243,255,31,+ 251,28,255,255,81,111,241,15,255,6,16,255,255,30,16,255,255,159,16,255,255,255,20,255,+ 255,254,45,255,255,247,159,255,255,193,255,255,255,49,255,255,255,1,249,255,255,1,225,255,+ 255,1,96,255,255,255,255,255,255,222,237,255,255,1,16,255,255,1,16,255,255,1,16,255,+ 255,1,16,255,255,1,16,255,255,1,16,255,255,1,16,255,255,222,237,255,255,255,255,255,+ 255,1,16,255,255,1,16,255,255,1,16,255,255,1,16,255,255,1,16,255,255,1,16,255,+ 255,1,16,255,255,1,16,255,255,1,16,255,255,222,237,255,255,255,255,255,242,31,0,250,+ 6,253,4,208,47,144,127,16,239,0,246,10,244,11,32,223,128,127,0,224,31,251,4,0,+ 250,228,31,0,96,159,207,0,0,243,254,9,0,0,254,111,0,0,160,255,2,0,+};+static const np_glyph_t font7_glyphs[90] = {+ {0, 0, 0, 0, 4, 0},+ {3, 11, 1, -11, 4, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {3, 3, 1, -11, 4, 17},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {3, 4, 1, -2, 4, 22},+ {0, 0, 0, 0, 0, 0},+ {3, 2, 1, -2, 4, 28},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 1, -11, 10, 31},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 1, -11, 10, 75},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 1, -11, 9, 119},+ {8, 11, 1, -11, 10, 163},+ {8, 11, 1, -11, 9, 207},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 1, -11, 10, 251},+ {8, 11, 1, -11, 10, 295},+ {3, 11, 1, -11, 4, 339},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 1, -11, 10, 356},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 1, -11, 10, 400},+ {8, 11, 1, -11, 10, 444},+ {8, 11, 1, -11, 10, 488},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {12, 11, 0, -11, 13, 532},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 0, -11, 9, 598},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 1, -11, 10, 75},+ {8, 11, 1, -11, 10, 642},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 1, -11, 10, 163},+ {8, 11, 1, -11, 9, 207},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 1, -11, 10, 251},+ {8, 11, 1, -11, 10, 295},+ {3, 11, 1, -11, 4, 339},+ {8, 11, 1, -11, 10, 686},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 1, -11, 9, 730},+ {9, 11, 1, -11, 11, 774},+ {8, 11, 1, -11, 10, 824},+ {8, 11, 1, -11, 10, 868},+ {8, 11, 1, -11, 10, 356},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 1, -11, 10, 400},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 1, -11, 10, 488},+ {8, 11, 1, -11, 10, 912},+ {9, 11, 0, -11, 9, 956},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {8, 11, 0, -11, 9, 598},+};+/* cubic, 24 pixels */+static const uint8_t font8_data[754] = {+ 0,68,64,94,228,95,254,95,255,95,255,95,255,95,255,95,255,95,255,95,0,0,0,0,+ 255,95,255,95,255,95,255,95,0,0,7,0,0,248,255,223,1,0,232,0,0,248,255,223,+ 2,0,248,14,0,248,255,223,2,0,248,239,0,248,255,239,2,0,245,255,14,247,255,239,+ 2,0,112,255,239,247,255,239,3,0,0,247,255,255,255,239,3,0,0,112,255,255,255,255,+ 28,0,0,0,247,255,255,255,255,11,0,0,112,255,255,255,255,255,10,0,0,247,255,255,+ 168,255,255,7,0,112,255,255,7,176,255,143,0,0,247,255,15,0,176,255,8,0,112,255,+ 239,0,0,193,143,0,0,247,255,14,0,0,193,8,0,112,255,239,0,0,0,97,0,0,+ 0,227,239,140,1,0,48,254,255,255,94,0,226,255,255,255,255,6,253,143,101,250,255,47,+ 255,95,0,64,255,159,255,95,0,0,248,223,255,95,0,0,245,255,255,95,0,0,248,239,+ 255,95,0,32,254,191,255,95,101,232,255,95,255,95,255,255,255,11,255,95,255,255,191,1,+ 255,95,255,190,5,0,0,243,255,255,255,11,32,255,255,255,191,0,210,255,255,255,27,0,+ 253,175,85,85,1,0,255,95,0,0,0,0,255,255,255,255,0,0,255,255,255,255,0,0,+ 255,255,255,255,0,0,255,159,85,85,0,0,255,175,85,85,0,0,255,255,255,255,0,0,+ 255,255,255,255,0,0,255,255,255,255,0,0,0,49,16,92,193,95,251,95,255,95,255,95,+ 255,95,255,95,255,95,255,95,255,95,255,95,255,95,0,0,0,0,5,0,32,3,0,0,+ 0,199,0,32,93,0,0,0,247,12,32,253,5,0,0,247,207,32,253,95,0,0,247,255,+ 44,253,255,5,0,247,255,223,253,255,95,0,247,255,255,255,255,255,5,247,255,254,255,223,+ 255,95,247,255,136,255,223,242,255,245,255,8,248,223,2,255,95,255,8,128,223,2,240,255,+ 245,8,0,216,2,0,255,95,8,0,112,2,0,240,255,5,32,234,255,255,255,45,226,255,+ 255,255,223,2,250,255,255,255,46,0,254,175,85,85,2,0,254,143,1,0,0,0,251,255,+ 223,7,0,0,244,255,255,143,0,0,96,254,255,255,1,0,0,65,247,255,4,0,85,85,+ 248,255,4,0,255,255,255,239,1,0,255,255,255,127,0,0,255,255,223,6,0,0,0,96,+ 255,255,255,78,0,245,255,255,239,4,80,255,255,255,79,0,80,85,255,175,3,0,0,0,+ 255,95,0,0,0,0,255,95,0,0,0,0,255,95,0,0,0,0,255,95,0,0,0,0,+ 255,95,0,0,0,0,255,95,0,0,0,0,255,95,0,0,0,0,255,95,0,0,0,0,+ 255,95,0,0,0,67,0,245,255,48,94,0,245,255,210,95,0,245,255,253,95,0,245,255,+ 255,95,0,245,255,255,95,0,245,255,255,95,0,245,255,255,95,0,245,255,254,111,0,246,+ 239,251,239,119,254,191,245,255,255,255,79,128,255,255,255,7,0,181,238,75,0,0,67,0,+ 48,254,255,4,226,5,48,254,255,5,210,95,48,254,255,5,208,255,37,254,255,6,0,255,+ 127,253,255,7,0,240,255,255,255,8,0,0,255,255,255,8,0,0,240,255,255,9,0,0,+ 0,255,255,10,0,0,0,240,255,15,0,0,0,0,255,95,0,0,0,0,240,255,5,0,+ 0,0,0,255,95,0,0,0,0,0,+};+static const np_glyph_t font8_glyphs[90] = {+ {0, 0, 0, 0, 7, 0},+ {4, 16, 2, -16, 7, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {17, 16, 0, -16, 14, 32},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {12, 13, 0, -13, 13, 168},+ {12, 13, 0, -13, 9, 246},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {4, 13, 0, -13, 4, 324},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {15, 13, 0, -13, 15, 350},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {12, 13, 1, -13, 10, 448},+ {12, 13, -1, -13, 9, 526},+ {10, 13, 1, -13, 12, 604},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {13, 13, 0, -13, 11, 669},+};+/* square, 8 pixels */+static const uint8_t font9_data[417] = {+ 226,226,226,226,0,226,0,226,242,255,46,14,226,226,32,46,14,226,226,32,46,255,239,226,+ 226,226,226,226,226,242,255,14,0,226,225,238,46,46,18,226,0,32,255,239,254,239,0,226,+ 237,238,34,227,0,226,254,239,226,32,46,14,226,226,32,46,255,239,0,32,14,0,226,242,+ 255,46,14,0,242,238,13,34,227,0,32,46,255,239,242,255,46,14,0,242,238,45,46,227,+ 226,32,46,255,239,254,239,0,226,0,226,0,226,0,226,0,226,242,255,46,14,226,242,238,+ 46,46,227,226,32,46,255,239,242,255,46,14,226,242,238,14,34,227,0,32,46,255,239,209,+ 32,0,226,242,255,43,14,0,226,0,32,14,0,226,0,32,255,191,242,255,44,14,226,226,+ 32,46,14,226,226,32,46,255,207,226,32,46,14,226,226,32,46,14,226,226,32,46,255,239,+ 196,208,2,156,10,80,63,0,226,0,32,14,0,226,0,242,255,46,14,226,242,238,46,46,+ 227,226,32,46,14,226,242,255,46,14,226,242,238,41,46,211,226,32,46,255,239,242,255,43,+ 14,0,242,238,42,46,18,226,0,32,255,191,242,255,43,14,0,242,238,42,46,18,226,0,+ 32,14,0,242,255,46,14,0,226,229,45,30,227,226,32,46,255,239,226,32,46,14,226,242,+ 238,46,46,227,226,32,46,14,226,226,0,32,14,0,226,0,32,14,0,226,0,32,255,191,+ 242,65,46,111,232,242,218,46,239,238,226,188,46,142,231,242,35,46,207,226,242,127,46,142,+ 238,226,225,46,14,230,242,255,46,14,226,242,238,46,46,18,226,0,32,14,0,242,255,46,+ 14,226,242,238,46,126,28,226,208,35,14,166,255,255,32,14,32,14,32,14,32,14,32,14,+ 136,208,66,27,14,225,180,0,157,8,144,94,0,246,2,136,183,197,165,217,150,195,251,121,+ 225,238,77,208,174,47,160,139,14,+};+static const np_glyph_t font9_glyphs[90] = {+ {0, 0, 0, 0, 2, 0},+ {2, 6, 0, -6, 2, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {2, 2, 0, -2, 2, 6},+ {0, 0, 0, 0, 0, 0},+ {5, 6, 0, -6, 5, 8},+ {2, 6, 0, -6, 2, 23},+ {5, 6, 0, -6, 5, 29},+ {4, 6, 0, -6, 4, 44},+ {5, 6, 0, -6, 5, 56},+ {5, 6, 0, -6, 5, 71},+ {5, 6, 0, -6, 5, 86},+ {4, 6, 0, -6, 4, 101},+ {5, 6, 0, -6, 5, 113},+ {5, 6, 0, -6, 5, 128},+ {2, 4, 0, -4, 2, 143},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {5, 6, 0, -6, 5, 147},+ {5, 6, 0, -6, 5, 162},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {5, 6, 0, -6, 5, 177},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {5, 6, 0, -6, 5, 192},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {5, 6, 0, -6, 5, 207},+ {5, 6, 0, -6, 5, 222},+ {5, 6, 0, -6, 5, 147},+ {5, 6, 0, -6, 5, 162},+ {5, 6, 0, -6, 5, 237},+ {5, 6, 0, -6, 5, 252},+ {5, 6, 0, -6, 5, 267},+ {5, 6, 0, -6, 5, 282},+ {2, 6, 0, -6, 2, 23},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {5, 6, 0, -6, 5, 297},+ {5, 6, 0, -6, 5, 312},+ {5, 6, 0, -6, 5, 327},+ {5, 6, 0, -6, 5, 8},+ {5, 6, 0, -6, 5, 342},+ {0, 0, 0, 0, 0, 0},+ {5, 6, 0, -6, 5, 357},+ {5, 6, 0, -6, 5, 71},+ {4, 6, 1, -6, 6, 372},+ {5, 6, 0, -6, 5, 177},+ {5, 6, 0, -6, 5, 384},+ {6, 6, 0, -6, 6, 399},+ {0, 0, 0, 0, 0, 0},+ {5, 6, 0, -6, 5, 192},+};+/* square, 20 pixels */+static const uint8_t font10_data[1188] = {+ 102,243,159,255,9,255,255,255,255,159,255,255,255,255,159,255,107,102,246,159,255,9,0,240,+ 159,255,9,0,240,159,255,9,0,240,159,255,255,255,255,159,255,255,255,255,159,255,107,102,+ 246,159,255,9,0,240,159,255,9,0,240,159,255,9,0,240,159,255,9,0,240,159,255,9,+ 0,240,159,255,255,255,255,127,255,255,255,255,127,255,107,102,102,54,255,9,0,0,0,255,+ 9,0,0,0,255,9,0,0,0,255,9,0,0,0,255,9,0,0,0,255,9,0,0,0,+ 255,9,0,0,0,255,9,0,0,0,255,107,102,102,54,255,255,255,255,127,255,255,255,255,+ 127,0,0,0,240,159,0,0,0,240,159,0,0,0,240,159,0,0,0,240,159,0,0,0,+ 240,159,0,0,0,240,159,0,0,0,240,159,0,0,0,240,159,255,9,0,240,159,255,9,+ 0,240,159,255,9,0,240,159,255,107,102,246,159,255,255,255,255,159,255,255,255,255,159,255,+ 9,0,0,0,255,9,0,0,0,255,9,0,0,0,255,9,0,0,0,255,9,0,0,0,+ 255,9,0,0,0,255,9,0,0,0,255,9,0,0,0,255,9,0,0,0,255,9,0,0,+ 0,255,9,0,0,0,255,107,102,102,54,255,255,255,255,127,255,255,255,255,127,255,12,0,+ 0,252,255,255,2,0,243,255,255,143,0,128,255,255,255,13,0,254,255,255,255,4,245,255,+ 255,255,159,176,255,255,255,255,46,255,255,255,255,255,252,255,255,255,253,255,255,253,255,159,+ 254,255,158,255,255,137,255,159,249,255,159,243,255,147,255,255,9,253,13,249,255,159,112,143,+ 144,255,255,255,255,255,159,255,255,255,255,159,255,107,102,246,159,255,9,0,240,159,255,9,+ 0,240,159,255,9,0,240,159,255,255,255,255,159,255,255,255,255,159,255,107,102,102,54,255,+ 9,0,0,0,255,9,0,0,0,255,9,0,0,0,255,9,0,0,0,255,9,0,0,0,+ 255,255,255,255,159,255,255,255,255,159,255,107,102,102,54,255,9,0,0,0,255,9,0,0,+ 0,255,9,0,0,0,255,255,255,255,159,255,255,255,255,159,102,102,102,246,159,0,0,0,+ 240,159,0,0,0,240,159,102,102,102,246,159,255,255,255,255,159,255,255,255,255,159,255,9,+ 0,240,159,255,9,0,240,159,255,9,0,240,159,255,9,0,240,159,255,9,0,240,159,255,+ 9,0,240,159,255,9,0,240,159,255,9,0,240,159,255,9,0,240,159,255,9,0,240,159,+ 255,9,0,240,159,255,107,102,246,159,255,255,255,255,159,255,255,255,255,159,254,12,144,255,+ 3,243,143,251,14,176,255,5,245,111,249,31,208,255,8,247,63,246,63,241,255,10,249,31,+ 243,111,243,255,12,251,13,241,143,245,255,15,253,10,208,175,248,255,47,255,7,160,207,250,+ 255,127,255,5,112,239,252,250,191,255,2,80,255,255,215,255,239,0,32,255,255,165,255,207,+ 0,0,254,255,114,255,159,0,0,252,239,80,255,111,0,0,249,207,32,255,79,0,255,255,+ 255,255,29,255,255,255,255,159,255,107,102,246,159,255,9,0,240,159,255,9,0,240,159,255,+ 9,0,240,159,255,9,0,240,159,255,9,0,240,159,255,9,0,240,159,255,9,0,240,159,+ 255,9,0,240,159,255,107,102,246,159,255,255,255,255,159,255,255,255,255,29,255,255,255,255,+ 127,255,255,255,255,127,255,107,102,102,54,255,9,0,0,0,255,9,0,0,0,255,9,0,+ 0,0,255,255,255,255,127,255,255,255,255,127,255,107,102,102,54,255,9,0,0,0,255,9,+ 0,0,0,255,107,102,102,54,255,255,255,255,127,255,255,255,255,127,255,249,159,255,249,159,+ 255,249,159,255,249,159,255,249,159,255,249,159,255,249,159,255,9,0,245,63,255,9,32,254,+ 7,255,9,193,207,0,255,9,249,47,0,255,105,255,7,0,255,235,191,0,0,255,255,46,+ 0,0,255,255,79,0,0,255,252,223,1,0,255,105,255,9,0,255,9,250,79,0,255,9,+ 209,223,1,255,9,32,254,8,255,9,0,245,63,255,13,0,240,159,255,111,0,240,159,255,+ 239,1,240,159,255,255,8,240,159,255,255,47,240,159,255,255,175,240,159,255,251,255,244,159,+ 255,137,255,252,159,255,25,254,255,159,255,9,247,255,159,255,9,208,255,159,255,9,80,255,+ 159,255,9,0,252,159,255,9,0,244,159,255,255,255,255,159,255,255,255,255,159,255,107,102,+ 246,159,255,9,0,240,159,255,9,0,240,159,255,9,0,240,159,255,255,255,255,159,255,255,+ 255,255,159,255,139,255,106,54,255,9,252,13,0,255,9,243,127,0,255,9,128,255,2,255,+ 9,16,253,10,255,9,0,245,79,255,255,255,255,255,255,255,255,255,255,102,182,255,102,102,+ 0,144,255,0,0,0,144,255,0,0,0,144,255,0,0,0,144,255,0,0,0,144,255,0,+ 0,0,144,255,0,0,0,144,255,0,0,0,144,255,0,0,0,144,255,0,0,0,144,255,+ 0,0,0,144,255,0,0,242,143,0,160,223,0,250,30,32,255,5,48,255,7,249,13,0,+ 160,239,243,95,0,0,243,239,223,0,0,0,251,255,5,0,0,64,255,13,0,0,0,240,+ 159,0,0,0,0,255,9,0,0,0,240,159,0,0,0,0,255,9,0,0,0,240,159,0,+ 0,0,0,255,9,0,0,0,240,159,0,0,+};+static const np_glyph_t font10_glyphs[90] = {+ {0, 0, 0, 0, 5, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {3, 3, 1, -3, 5, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {10, 14, 1, -14, 12, 5},+ {0, 0, 0, 0, 0, 0},+ {10, 14, 1, -14, 11, 75},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {10, 14, 1, -14, 12, 145},+ {0, 0, 0, 0, 0, 0},+ {10, 14, 1, -14, 11, 215},+ {11, 14, 1, -14, 13, 285},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {10, 14, 1, -14, 12, 362},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {10, 14, 1, -14, 12, 432},+ {0, 0, 0, 0, 0, 0},+ {10, 14, 1, -14, 12, 502},+ {0, 0, 0, 0, 0, 0},+ {14, 14, 1, -14, 16, 572},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {10, 14, 1, -14, 12, 5},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {10, 14, 1, -14, 12, 670},+ {10, 14, 1, -14, 11, 740},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {3, 14, 1, -14, 5, 810},+ {0, 0, 0, 0, 0, 0},+ {10, 14, 1, -14, 12, 831},+ {0, 0, 0, 0, 0, 0},+ {11, 14, 1, -14, 13, 285},+ {10, 14, 1, -14, 12, 901},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {10, 14, 1, -14, 12, 971},+ {10, 14, 1, -14, 12, 432},+ {10, 14, 1, -14, 12, 1041},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {11, 14, 0, -14, 11, 1111},+};+/* square, 32 pixels */+static const uint8_t font11_data[610] = {+ 255,255,242,255,47,255,255,242,255,47,255,255,242,255,47,255,255,242,255,47,255,255,242,255,+ 47,255,255,242,255,47,255,255,242,255,47,255,255,242,255,47,255,255,2,0,0,0,0,224,+ 238,46,255,255,242,255,47,255,255,2,255,255,255,255,255,255,255,127,255,255,255,255,255,255,+ 255,127,255,255,255,255,255,255,255,127,255,255,238,238,238,238,238,126,255,255,2,0,0,0,+ 0,0,255,255,2,0,0,0,0,0,255,255,2,0,0,0,0,0,255,255,2,0,0,0,+ 0,0,255,255,2,0,0,0,0,0,255,255,2,0,0,0,0,0,255,255,255,255,255,255,+ 255,127,255,255,255,255,255,255,255,127,255,255,255,255,255,255,255,127,255,255,238,238,238,238,+ 238,126,255,255,2,0,0,0,0,0,255,255,2,0,0,0,0,0,255,255,2,0,0,0,+ 0,0,255,255,2,0,0,0,0,0,255,255,2,0,0,0,0,0,255,255,238,238,238,238,+ 238,126,255,255,255,255,255,255,255,127,255,255,255,255,255,255,255,127,255,255,255,255,255,255,+ 255,127,255,255,2,0,0,240,255,47,255,255,2,0,0,240,255,47,255,255,2,0,0,240,+ 255,47,255,255,2,0,0,240,255,47,255,255,2,0,0,240,255,47,255,255,2,0,0,240,+ 255,47,255,255,2,0,0,240,255,47,255,255,2,0,0,240,255,47,255,255,2,0,0,240,+ 255,47,255,255,2,0,0,240,255,47,255,255,255,255,255,255,255,47,255,255,255,255,255,255,+ 255,47,255,255,255,255,255,255,255,47,255,255,238,238,238,254,255,47,255,255,2,0,0,240,+ 255,47,255,255,2,0,0,240,255,47,255,255,2,0,0,240,255,47,255,255,2,0,0,240,+ 255,47,255,255,2,0,0,240,255,47,255,255,2,0,0,240,255,47,255,255,2,0,0,240,+ 255,47,255,255,2,0,0,240,255,47,255,255,2,0,0,240,255,47,243,255,47,0,0,112,+ 255,143,176,255,159,0,0,224,255,47,64,255,239,1,0,246,255,9,0,252,255,8,0,253,+ 255,2,0,245,255,30,96,255,159,0,0,192,255,127,208,255,47,0,0,80,255,223,245,255,+ 9,0,0,0,253,255,254,255,2,0,0,0,246,255,255,159,0,0,0,0,225,255,255,47,+ 0,0,0,0,112,255,255,10,0,0,0,0,16,255,255,3,0,0,0,0,0,255,255,2,+ 0,0,0,0,0,255,255,2,0,0,0,0,0,255,255,2,0,0,0,0,0,255,255,2,+ 0,0,0,0,0,255,255,2,0,0,0,0,0,255,255,2,0,0,0,0,0,255,255,2,+ 0,0,0,0,0,255,255,2,0,0,0,0,0,255,255,2,0,0,0,0,0,255,255,2,+ 0,0,0,0,0,255,255,2,0,0,+};+static const np_glyph_t font11_glyphs[58] = {+ {0, 0, 0, 0, 8, 0},+ {5, 23, 2, -23, 8, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {16, 23, 2, -23, 19, 58},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {16, 23, 2, -23, 19, 242},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {16, 23, 1, -23, 18, 426},+};+/* square, 14 pixels */+static const uint8_t font12_data[325] = {+ 255,255,255,252,190,187,155,207,0,0,240,12,0,0,255,255,255,188,187,187,207,0,0,240,+ 12,0,0,207,187,187,251,252,255,255,207,255,255,255,247,190,187,91,207,0,0,240,12,0,+ 0,207,0,0,240,12,0,0,207,0,0,240,12,0,0,239,187,187,245,255,255,127,255,255,+ 255,247,190,187,91,207,0,0,240,12,0,0,255,255,255,247,190,187,91,207,0,0,240,12,+ 0,0,239,187,187,245,255,255,127,207,207,207,207,207,207,207,207,207,207,207,0,247,245,12,+ 243,10,207,209,30,240,172,95,0,255,175,0,240,255,12,0,207,250,6,240,28,237,2,207,+ 48,175,240,12,112,95,255,2,240,252,175,0,207,255,79,240,252,255,12,207,223,254,245,252,+ 124,223,207,207,209,255,252,12,246,207,207,0,252,252,12,64,207,255,255,255,252,190,187,207,+ 207,0,240,252,12,0,207,207,0,240,252,12,0,207,207,0,240,252,12,0,207,239,187,251,+ 252,255,255,207,255,255,255,252,190,187,207,207,0,240,252,12,0,207,255,255,255,252,190,187,+ 155,207,0,0,240,12,0,0,207,0,0,240,12,0,0,255,255,255,191,235,191,187,0,252,+ 0,0,192,15,0,0,252,0,0,192,15,0,0,252,0,0,192,15,0,0,252,0,0,192,+ 15,0,207,0,240,252,12,0,207,207,0,240,252,12,0,207,207,0,240,252,12,0,207,207,+ 0,240,252,12,0,207,239,187,251,252,255,255,207,+};+static const np_glyph_t font12_glyphs[86] = {+ {0, 0, 0, 0, 3, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {7, 10, 1, -10, 9, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {7, 10, 1, -10, 8, 35},+ {0, 0, 0, 0, 0, 0},+ {7, 10, 1, -10, 8, 70},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {2, 10, 1, -10, 3, 105},+ {0, 0, 0, 0, 0, 0},+ {7, 10, 1, -10, 8, 115},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {7, 10, 1, -10, 9, 150},+ {7, 10, 1, -10, 9, 185},+ {7, 10, 1, -10, 9, 220},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {7, 10, 1, -10, 9, 0},+ {7, 10, 1, -10, 9, 255},+ {7, 10, 1, -10, 9, 290},+};+/* square, 12 pixels */+static const uint8_t font13_data[501] = {+ 143,143,125,88,143,88,6,88,143,255,255,255,207,136,252,143,0,248,143,0,248,255,255,255,+ 207,136,252,143,0,248,143,0,248,143,0,248,255,255,255,207,136,136,143,0,0,143,0,0,+ 143,0,0,143,0,0,143,0,0,207,136,136,255,255,255,255,255,191,207,136,252,143,0,248,+ 143,0,248,143,0,248,143,0,248,143,0,248,207,136,252,255,255,191,255,255,255,207,136,136,+ 143,0,0,143,0,0,255,255,255,207,136,136,143,0,0,207,136,136,255,255,255,143,0,248,+ 143,0,248,143,0,248,143,0,248,255,255,255,207,136,252,143,0,248,143,0,248,143,0,248,+ 255,255,255,207,136,136,143,0,0,143,0,0,255,255,255,136,136,252,0,0,248,136,136,252,+ 255,255,255,255,255,255,136,207,136,0,143,0,0,143,0,0,143,0,0,143,0,0,143,0,+ 0,143,0,0,143,0,245,52,143,224,43,111,245,26,143,240,120,223,243,6,172,249,95,63,+ 160,188,255,249,1,231,206,223,13,80,255,247,191,0,242,79,253,8,0,255,177,111,0,143,+ 143,143,143,143,143,143,143,143,143,0,0,143,0,0,143,0,0,143,0,0,143,0,0,143,+ 0,0,143,0,0,207,136,136,255,255,255,191,0,243,248,31,128,143,255,6,253,248,191,244,+ 143,255,191,255,248,254,239,143,159,255,249,248,168,79,143,143,229,240,8,207,0,248,255,6,+ 248,255,30,248,255,143,248,175,254,251,143,248,255,143,225,255,143,96,255,143,0,252,255,255,+ 255,207,136,252,143,0,248,143,0,248,143,0,248,143,0,248,143,0,248,207,136,252,255,255,+ 255,255,255,255,207,136,252,143,0,248,143,0,248,255,255,255,207,136,136,143,0,0,143,0,+ 0,143,0,0,255,255,255,207,136,252,143,0,248,143,0,248,255,255,255,207,253,137,143,243,+ 8,143,128,47,143,16,189,143,0,248,143,0,248,143,0,248,143,0,248,143,0,248,143,0,+ 248,143,0,248,207,136,252,255,255,255,244,4,244,20,127,112,31,208,10,218,0,218,208,10,+ 96,31,127,0,243,247,4,0,207,31,0,192,207,0,0,248,9,0,204,16,111,245,132,30,+ 208,235,7,112,239,1,16,159,0,0,143,0,0,143,0,0,143,0,0,143,0,+};+static const np_glyph_t font13_glyphs[90] = {+ {0, 0, 0, 0, 3, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {2, 3, 1, -9, 3, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {2, 4, 1, -2, 3, 3},+ {0, 0, 0, 0, 0, 0},+ {2, 2, 1, -2, 3, 7},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 9, 1, -9, 8, 9},+ {0, 0, 0, 0, 0, 0},+ {6, 9, 1, -9, 8, 36},+ {6, 9, 1, -9, 8, 63},+ {6, 9, 1, -9, 8, 90},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 9, 1, -9, 8, 117},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 9, 1, -9, 8, 144},+ {6, 9, 1, -9, 8, 171},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {9, 9, 0, -9, 9, 198},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 9, 1, -9, 8, 9},+ {0, 0, 0, 0, 0, 0},+ {6, 9, 1, -9, 8, 36},+ {6, 9, 1, -9, 8, 63},+ {6, 9, 1, -9, 8, 90},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 9, 1, -9, 8, 117},+ {2, 9, 1, -9, 3, 239},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 9, 1, -9, 8, 248},+ {7, 9, 1, -9, 8, 275},+ {6, 9, 1, -9, 8, 307},+ {6, 9, 1, -9, 8, 334},+ {6, 9, 1, -9, 8, 361},+ {0, 0, 0, 0, 0, 0},+ {6, 9, 1, -9, 8, 388},+ {6, 9, 1, -9, 8, 144},+ {6, 9, 1, -9, 8, 171},+ {6, 9, 1, -9, 8, 415},+ {7, 9, 0, -9, 7, 442},+ {0, 0, 0, 0, 0, 0},+ {0, 0, 0, 0, 0, 0},+ {6, 9, 1, -9, 7, 474},+};+const np_font_t cn_fonts[CN_FONTS] = {+ {32, 85, 26, 8, font0_glyphs, font0_data},+ {32, 90, 9, 3, font1_glyphs, font1_data},+ {32, 90, 17, 5, font2_glyphs, font2_data},+ {32, 88, 12, 4, font3_glyphs, font3_data},+ {32, 88, 13, 4, font4_glyphs, font4_data},+ {32, 90, 15, 5, font5_glyphs, font5_data},+ {32, 94, 9, 2, font6_glyphs, font6_data},+ {32, 90, 14, 3, font7_glyphs, font7_data},+ {32, 90, 20, 6, font8_glyphs, font8_data},+ {32, 90, 7, 2, font9_glyphs, font9_data},+ {32, 90, 17, 4, font10_glyphs, font10_data},+ {32, 58, 27, 6, font11_glyphs, font11_data},+ {32, 86, 12, 3, font12_glyphs, font12_data},+ {32, 90, 11, 2, font13_glyphs, font13_data},+};diff --git a/games/catninja/src/data.h b/games/catninja/src/data.hnew file mode 100644index 00000000..84638046--- /dev/null+++ b/games/catninja/src/data.h@@ -0,0 +1,177 @@+/* Made by tools/data.py from the game's own files: do not edit. */+#ifndef CN_DATA_H+#define CN_DATA_H+#include <stdint.h>+#include "font.h"+#define CN_ALPHA 8+extern const uint32_t cn_pal[256]; /* 0xAARRGGBB, AA: 0 to CN_ALPHA */+#define CN_TILE_PX 100 /* 10 x 10 */+extern const uint8_t cn_tiles[7000];+extern const uint8_t cn_fg_tile[92]; /* the picture (cn_tiles, 100 each) of a tile type, or 255 */+extern const uint8_t cn_blood_tile[92]; /* the picture (cn_tiles, 100 each) of a tile type, or 255 */+extern const uint8_t cn_grid_tile[92]; /* the picture (cn_tiles, 100 each) of a tile type, or 255 */+typedef struct {+ uint8_t w, h;+ uint32_t at;+} cn_sprite_t;+enum {+ SPR_CAT_IDLE,+ SPR_CAT_IDLE2,+ SPR_CAT_WALK1,+ SPR_CAT_WALK2,+ SPR_CAT_JUMP,+ SPR_CAT_WALLSLIDE,+ SPR_CAT_DUCK,+ SPR_CAT_ROLL,+ SPR_JETPACKADDON,+ SPR_MINEBLINKOFF_0,+ SPR_MINEBLINKON_0,+ SPR_MINEOFF_0,+ SPR_MINEBLINKOFF_1,+ SPR_MINEBLINKON_1,+ SPR_MINEOFF_1,+ SPR_MINEBLINKOFF_2,+ SPR_MINEBLINKON_2,+ SPR_MINEOFF_2,+ SPR_MINEBLINKOFF_3,+ SPR_MINEBLINKON_3,+ SPR_MINEOFF_3,+ SPR_BUTTON_0,+ SPR_BUTTON_1,+ SPR_BUTTON_2,+ SPR_BUTTON_3,+ SPR_DIRT_0,+ SPR_DIRT_1,+ SPR_DIRT_2,+ SPR_CRATE,+ SPR_SHIELD_0_0,+ SPR_SHIELD_0_1,+ SPR_SHIELD_0_2,+ SPR_SHIELD_0_3,+ SPR_SHIELD_1_0,+ SPR_SHIELD_1_1,+ SPR_SHIELD_1_2,+ SPR_SHIELD_1_3,+ SPR_SHIELD_2_0,+ SPR_SHIELD_2_1,+ SPR_SHIELD_2_2,+ SPR_SHIELD_2_3,+ SPR_SHIELD_3_0,+ SPR_SHIELD_3_1,+ SPR_SHIELD_3_2,+ SPR_SHIELD_3_3,+ SPR_HOMING_0_0,+ SPR_HOMING_0_1,+ SPR_HOMING_0_2,+ SPR_HOMING_0_3,+ SPR_HOMING_1_0,+ SPR_HOMING_1_1,+ SPR_HOMING_1_2,+ SPR_HOMING_1_3,+ SPR_HOMING_2_0,+ SPR_HOMING_2_1,+ SPR_HOMING_2_2,+ SPR_HOMING_2_3,+ SPR_HOMING_3_0,+ SPR_HOMING_3_1,+ SPR_HOMING_3_2,+ SPR_HOMING_3_3,+ SPR_FALLSPIKE_0,+ SPR_FALLSPIKE_1,+ SPR_FALLSPIKE_2,+ SPR_FALLSPIKE_3,+ SPR_SUNSPIKE,+ SPR_BOMB,+ SPR_SPHERE_0,+ SPR_SPHERE_1,+ SPR_SPHERE_2,+ SPR_SPHERE_3,+ SPR_SPHERE_4,+ SPR_SPHERE_5,+ SPR_SPHERE_6,+ SPR_SPHERE_7,+ SPR_SPHERE_8,+ SPR_SPHERE_9,+ SPR_SPHERE_10,+ SPR_BIGSPHERE_0,+ SPR_BIGSPHERE_1,+ SPR_BIGSPHERE_2,+ SPR_BIGSPHERE_3,+ SPR_BIGSPHERE_4,+ SPR_BIGSPHERE_5,+ SPR_TV,+ SPR_TRACKMILL,+ SPR_COUNT+};+extern const cn_sprite_t cn_sprites[SPR_COUNT];+extern const uint8_t cn_sprite_px[32854];+#define CN_MAPS 31 /* the menu, then the 30 levels */+typedef struct {+ uint8_t w, h;+ int16_t marks[12]; /* [1] to [4]: x, y, the level that edge leads to */+ uint8_t has[4], sx, sy; /* which marks; the spawn (s) */+ uint32_t at, len; /* the tiles, DEFLATE */+ uint16_t script; /* into cn_scripts: pages, then each page's length and steps */+} cn_map_t;+extern const cn_map_t cn_maps[CN_MAPS];+#define CN_MAP_MAX 14850 /* the most tiles a map has */+extern const uint8_t cn_map_z[8619];+enum {+ OP_NOP,+ OP_PAUSECAM,+ OP_STOPMOVE,+ OP_PAUSE,+ OP_SETSPAWN,+ OP_DIE,+ OP_SETROOM,+ OP_FUNCTION,+ OP_GOTO,+ OP_SETTYPEPATH,+ OP_SETTYPE,+ OP_CREATELASER,+ OP_MOVECAM,+ OP_RESUMECAM,+ OP_RESUMEMOVE,+ OP_WALK,+ OP_SHAKE,+ OP_UPDATESCREEN,+ OP_RESETLEVEL,+ OP_TELEPORT,+ OP_CREATETEXT,+ OP_RUNSCRIPT,+ OP_IF,+ OP_ELSE,+ OP_ENDIF,+ OP_EXIT,+ OP_STARTBOSS,+ OP_REMOVEBOSS,+ OP_LOOP,+ OP_ENDLOOP,+ OP_JUMP,+ OP_SCALE,+};+enum { LB_ENDFUNCTION = 1, LB_ELSEIF = 2, LB_ENDIF = 4, LB_UNLOCKLASER = 8, LB_RESPAWN = 16 };+extern const int16_t cn_scripts[1125];+#define CN_CRYSTALS 49+extern const uint8_t cn_crystals[CN_CRYSTALS][3]; /* level, x, y */+#define CN_TEXTS 90+extern const uint16_t cn_text_at[CN_TEXTS]; /* runs: 1 font, 2 colour, \n, letters */+extern const char cn_text_data[3711];+#define TX_SPEC1 0+#define TX_SPEC2 1+#define TX_SPEC3 2+#define TX_SPEC4 3+#define TX_DIE0 4+#define TX_IDLE0 13+#define TX_BOSS 17+#define TX_ENDGOOD 18+#define TX_ENDBAD 19+#define TX_DIES 9+#define TX_IDLES 4+#define CN_COLOURS 33+extern const uint32_t cn_colours[CN_COLOURS];+#define CN_FONTS 14+#define FONT_HUD 9+#define COLOUR_WHITE 1+extern const np_font_t cn_fonts[CN_FONTS];+#endifdiff --git a/games/catninja/src/draw.c b/games/catninja/src/draw.cnew file mode 100644index 00000000..de2b09f7--- /dev/null+++ b/games/catninja/src/draw.c@@ -0,0 +1,657 @@+/* Cat Ninja's drawing, in the launcher's strips of 16 rows (launcher/src/gfx.c).+ *+ * The original draws an 800 x 600 stage: Main.world turned and sized about the middle (gravity changers turn+ * it, the hallucination pill wobbles it), and in it Main.screen, the camera, with the map's two layers (the+ * grid of tiles behind, untinted, and the tiles themselves, tinted by the map's ColourChanger), the+ * particles between the two, then the things, the trails and the cat. Here the world is drawn at half size+ * (its 20 pixel tiles 10 wide: 640 x 480 of it shows) with every pixel found back in the map, so any turn+ * works; the stage's texts (the title cards, the messages, the counts) at 0.4 (320 / 800). */+#include <math.h>+#include <string.h>+#include "cn.h"+#include "gfx.h"++static color_t pal_plain[256], pal_map[256], pal_cat[256];+static uint8_t pal_a[256];+static uint8_t grid_tex[92];+int cat_parts[5][4]; /* PixelModifier.breakData(characteridle, 5): five pieces of the cat (x, y, w, h) */+static double M00, M01, M10, M11, I00, I01, I10, I11;+#define CX 160+#define CY 120+#define ZOOM 0.5+static uint8_t fgmask[SCREEN_W * STRIP_H];+extern double boss_csx_get(void), boss_width(void), boss_height(void);+extern int env_dirts(const uint8_t **o), env_crates(const uint8_t **o), env_falls(const uint8_t **o),+ env_buttons(const uint8_t **o), env_spheres(const uint8_t **o), env_bombs(const bomb_t **b);++static int imin(int a, int b) { return a < b ? a : b; }+static int imax(int a, int b) { return a > b ? a : b; }++void draw_init(void) {+ for (int i = 0; i < 256; i++) {+ uint32_t c = cn_pal[i];+ pal_plain[i] = gfx_rgb(c & 0xFFFFFF), pal_a[i] = (uint8_t)(c >> 24);+ }+ for (int t = 0; t < 92; t++)+ grid_tex[t] = cn_grid_tile[t] != 255 ? cn_grid_tile[t] : t == 1 || t == 3 || t == 4 ? 255 : cn_grid_tile[0];+ for (int k = 0; k < 5; k++) { /* (in the original's pixels: the cat is 23 x 20) */+ int x = (int)(rnd01() * (23 / 1.5)), y = (int)(rnd01() * (20 / 1.5));+ int w = 5 + (int)(rnd01() * 23 / 1.5), h = 5 + (int)(rnd01() * 20 / 1.5);+ cat_parts[k][0] = x, cat_parts[k][1] = y, cat_parts[k][2] = w > 23 ? 23 : w, cat_parts[k][3] = h > 20 ? 20 : h;+ }+}+static void tint_pal(color_t *out, double r, double g, double b) {+ int mr = (int)(r * 256), mg = (int)(g * 256), mb = (int)(b * 256);+ for (int i = 1; i < 256; i++) {+ uint32_t c = cn_pal[i];+ int cr = (int)((c >> 16 & 255) * mr >> 8), cg = (int)((c >> 8 & 255) * mg >> 8), cb = (int)((c & 255) * mb >> 8);+ out[i] = RGB(cr > 255 ? 255 : cr, cg > 255 ? 255 : cg, cb > 255 ? 255 : cb);+ }+}+static uint32_t tint888(uint32_t c, double r, double g, double b) {+ int cr = (int)((c >> 16 & 255) * r), cg = (int)((c >> 8 & 255) * g), cb = (int)((c & 255) * b);+ return (uint32_t)(imin(cr, 255) << 16 | imin(cg, 255) << 8 | imin(cb, 255));+}++/* the frame's transform: screen = (160, 120) + M (p + camera) */+void draw_frame(void) {+ double r = world_rot * M_PI / 180, c = cos(r), s = sin(r);+ M00 = ZOOM * world_sx * c, M01 = -ZOOM * world_sy * s, M10 = ZOOM * world_sx * s, M11 = ZOOM * world_sy * c;+ double det = M00 * M11 - M01 * M10;+ I00 = M11 / det, I01 = -M01 / det, I10 = -M10 / det, I11 = M00 / det;+ tint_pal(pal_map, map_tint.r, map_tint.g, map_tint.b);+ tint_pal(pal_cat, P.tint.r, P.tint.g, P.tint.b);+}+static void to_screen(double x, double y, double *sx, double *sy) {+ x += screen_x, y += screen_y;+ *sx = CX + M00 * x + M01 * y, *sy = CY + M10 * x + M11 * y;+}++/* ---------------------------------------------------------------- the map's two layers */+static inline color_t tile_px(int i, int k, uint8_t *mask) {+ int t = grid[i] & 0x7F;+ int f = cn_fg_tile[t];+ if (t >= 2 && t <= 7 && (blood[i >> 3] >> (i & 7) & 1) && cn_blood_tile[t] != 255) f = cn_blood_tile[t];+ int g = grid_tex[t];+ color_t back = g != 255 ? pal_plain[cn_tiles[g * CN_TILE_PX + k]] : 0;+ *mask = 0;+ if (f != 255) {+ int idx = cn_tiles[f * CN_TILE_PX + k];+ if (idx) {+ int a = pal_a[idx];+ if (a >= CN_ALPHA) {+ *mask = 1;+ return pal_map[idx];+ }+ *mask = a >= CN_ALPHA / 2;+ return gfx_mix(back, pal_map[idx], a * 32 / CN_ALPHA);+ }+ }+ return back;+}+/* n pixels of one tile's row, from texel k0 */+static void tile_span(int i, int k0, int n, color_t *o, uint8_t *m) {+ int t = grid[i] & 0x7F, f = cn_fg_tile[t], g = grid_tex[t];+ if (t >= 2 && t <= 7 && (blood[i >> 3] >> (i & 7) & 1) && cn_blood_tile[t] != 255) f = cn_blood_tile[t];+ const uint8_t *gp = g != 255 ? cn_tiles + g * CN_TILE_PX + k0 : 0;+ if (f == 255) {+ if (gp)+ for (int k = 0; k < n; k++) o[k] = pal_plain[gp[k]];+ else+ memset(o, 0, (size_t)n * sizeof *o);+ memset(m, 0, (size_t)n);+ return;+ }+ const uint8_t *fp = cn_tiles + f * CN_TILE_PX + k0;+ for (int k = 0; k < n; k++) {+ int idx = fp[k];+ if (!idx) {+ o[k] = gp ? pal_plain[gp[k]] : 0, m[k] = 0;+ continue;+ }+ int a = pal_a[idx];+ if (a >= CN_ALPHA) {+ o[k] = pal_map[idx], m[k] = 1;+ continue;+ }+ o[k] = gfx_mix(gp ? pal_plain[gp[k]] : 0, pal_map[idx], a * 32 / CN_ALPHA), m[k] = a >= CN_ALPHA / 2;+ }+}+static void draw_tiles(void) {+ int W = gw * 10, H = gh * 10;+ bool flat = world_rot == 0 && world_sx == 1 && world_sy == 1;+ for (int Y = gfx_y0; Y < gfx_y1; Y++) {+ color_t *o = gfx_buf + (Y - gfx_y0) * SCREEN_W;+ uint8_t *m = fgmask + (Y - gfx_y0) * SCREEN_W;+ double dx = 0.5 - CX, dy = Y + 0.5 - CY;+ double wx = I00 * dx + I01 * dy - screen_x, wy = I10 * dx + I11 * dy - screen_y; /* (the original's pixels) */+ if (flat) {+ int qy = (int)floor(wy / 2), qx = (int)floor(wx / 2), X = 0;+ if (qy < 0 || qy >= H) {+ memset(o, 0, SCREEN_W * sizeof *o), memset(m, 0, SCREEN_W);+ continue;+ }+ int ty = qy / 10, fy = qy - ty * 10, row = ty * gw;+ while (X < SCREEN_W) {+ if (qx < 0 || qx >= W) {+ o[X] = 0, m[X] = 0, X++, qx++;+ continue;+ }+ int tx = qx / 10, fx = qx - tx * 10, n = imin(10 - fx, SCREEN_W - X);+ tile_span(row + tx, fy * 10 + fx, n, o + X, m + X);+ X += n, qx += n;+ }+ continue;+ }+ int32_t u = (int32_t)floor(wx / 2 * 65536), v = (int32_t)floor(wy / 2 * 65536);+ int32_t du = (int32_t)(I00 / 2 * 65536), dv = (int32_t)(I10 / 2 * 65536);+ for (int X = 0; X < SCREEN_W; X++, u += du, v += dv) {+ int qx = u >> 16, qy = v >> 16;+ if ((unsigned)qx >= (unsigned)W || (unsigned)qy >= (unsigned)H) {+ o[X] = 0, m[X] = 0;+ continue;+ }+ int tx = qx / 10, ty = qy / 10;+ o[X] = tile_px(ty * gw + tx, (qy - ty * 10) * 10 + qx - tx * 10, &m[X]);+ }+ }+}++/* ---------------------------------------------------------------- pictures: any place, turn and size */+enum { PAL_PLAIN, PAL_MAP, PAL_CAT, PAL_RGB };+typedef struct {+ int pic, sx0, sy0, sw, sh; /* the picture, and the part of it (texels) */+ double tsx, tsy; /* a texel's size, in the original's pixels */+ double ax, ay; /* the picture's corner from its origin (the original's pixels) */+ double lsx, lsy, lrot; /* its own size and turn about its origin */+ int pal, alpha32; /* palette, see-through (32 solid) */+ double tr, tg, tb; /* PAL_RGB: its colours' multipliers */+ bool under; /* under the map's tiles (particles) */+} blit_t;+static void blit(const blit_t *b, double ox, double oy) {+ const cn_sprite_t *sp = &cn_sprites[b->pic];+ double r = b->lrot * M_PI / 180, c = cos(r), s = sin(r);+ double L00 = c * b->lsx, L01 = -s * b->lsy, L10 = s * b->lsx, L11 = c * b->lsy;+ double A00 = M00 * L00 + M01 * L10, A01 = M00 * L01 + M01 * L11, A10 = M10 * L00 + M11 * L10, A11 = M10 * L01 + M11 * L11;+ double sx0, sy0;+ to_screen(ox, oy, &sx0, &sy0);+ double t0x = sx0 + A00 * b->ax + A01 * b->ay, t0y = sy0 + A10 * b->ax + A11 * b->ay;+ double T00 = A00 * b->tsx, T01 = A01 * b->tsy, T10 = A10 * b->tsx, T11 = A11 * b->tsy;+ double det = T00 * T11 - T01 * T10;+ if (fabs(det) < 1e-9) return;+ double J00 = T11 / det, J01 = -T01 / det, J10 = -T10 / det, J11 = T00 / det;+ double xs[4] = {0, b->sw, 0, b->sw}, ys[4] = {0, 0, b->sh, b->sh}, x0 = 1e9, x1 = -1e9, y0 = 1e9, y1 = -1e9;+ for (int k = 0; k < 4; k++) {+ double X = t0x + T00 * xs[k] + T01 * ys[k], Y = t0y + T10 * xs[k] + T11 * ys[k];+ x0 = fmin(x0, X), x1 = fmax(x1, X), y0 = fmin(y0, Y), y1 = fmax(y1, Y);+ }+ int X0 = imax((int)floor(x0), 0), X1 = imin((int)ceil(x1), SCREEN_W), Y0 = imax((int)floor(y0), gfx_y0),+ Y1 = imin((int)ceil(y1), gfx_y1);+ if (X0 >= X1 || Y0 >= Y1) return;+ const uint8_t *px = cn_sprite_px + sp->at;+ const color_t *pal = b->pal == PAL_MAP ? pal_map : b->pal == PAL_CAT ? pal_cat : pal_plain;+ int32_t di = (int32_t)(J00 * 65536), dj = (int32_t)(J10 * 65536), wmax = b->sw << 16, hmax = b->sh << 16;+ for (int Y = Y0; Y < Y1; Y++) {+ double py = Y + 0.5 - t0y, px0 = X0 + 0.5 - t0x;+ int32_t fi = (int32_t)floor((J00 * px0 + J01 * py) * 65536), fj = (int32_t)floor((J10 * px0 + J11 * py) * 65536);+ color_t *o = gfx_buf + (Y - gfx_y0) * SCREEN_W;+ const uint8_t *m = fgmask + (Y - gfx_y0) * SCREEN_W;+ for (int X = X0; X < X1; X++, fi += di, fj += dj) {+ if (fi < 0 || fj < 0 || fi >= wmax || fj >= hmax) continue;+ if (b->under && m[X]) continue;+ int i = (fi >> 16) + b->sx0, j = (fj >> 16) + b->sy0;+ if (i >= sp->w || j >= sp->h) continue;+ int idx = px[j * sp->w + i];+ if (!idx) continue;+ int a = pal_a[idx] * b->alpha32 / CN_ALPHA;+ color_t c2;+ if (b->pal == PAL_RGB) c2 = gfx_rgb(tint888(cn_pal[idx] & 0xFFFFFF, b->tr, b->tg, b->tb));+ else c2 = pal[idx];+ o[X] = a >= 32 ? c2 : gfx_mix(o[X], c2, a);+ }+ }+}+static blit_t pic_at(int pic, double ax, double ay) {+ const cn_sprite_t *sp = &cn_sprites[pic];+ return (blit_t){pic, 0, 0, sp->w, sp->h, 2, 2, ax, ay, 1, 1, 0, PAL_PLAIN, 32, 1, 1, 1, false};+}++/* ---------------------------------------------------------------- shapes */+static void fill_circle(double cx, double cy, double r, color_t c, int a32) {+ int y0 = imax((int)floor(cy - r), gfx_y0), y1 = imin((int)ceil(cy + r), gfx_y1);+ for (int Y = y0; Y < y1; Y++) {+ double d = Y + 0.5 - cy, w = r * r - d * d;+ if (w <= 0) continue;+ w = sqrt(w);+ int x0 = imax((int)floor(cx - w + 0.5), 0), x1 = imin((int)floor(cx + w + 0.5), SCREEN_W);+ color_t *o = gfx_buf + (Y - gfx_y0) * SCREEN_W;+ for (int X = x0; X < x1; X++) o[X] = a32 >= 32 ? c : gfx_mix(o[X], c, a32);+ }+}+/* a polygon (n points, screen pixels), filled by the even-odd rule */+static void fill_poly(const double *xy, int n, color_t c, int a32, bool under) {+ double ymin = 1e9, ymax = -1e9;+ for (int k = 0; k < n; k++) ymin = fmin(ymin, xy[k * 2 + 1]), ymax = fmax(ymax, xy[k * 2 + 1]);+ int y0 = imax((int)floor(ymin), gfx_y0), y1 = imin((int)ceil(ymax), gfx_y1);+ for (int Y = y0; Y < y1; Y++) {+ double sy = Y + 0.5, xs[16];+ int nx = 0;+ for (int k = 0; k < n && nx < 16; k++) {+ double ax = xy[k * 2], ay = xy[k * 2 + 1], bx = xy[(k + 1) % n * 2], by = xy[(k + 1) % n * 2 + 1];+ if ((ay <= sy && by > sy) || (by <= sy && ay > sy)) xs[nx++] = ax + (sy - ay) * (bx - ax) / (by - ay);+ }+ for (int i = 1; i < nx; i++)+ for (int j = i; j > 0 && xs[j - 1] > xs[j]; j--) {+ double t = xs[j];+ xs[j] = xs[j - 1], xs[j - 1] = t;+ }+ color_t *o = gfx_buf + (Y - gfx_y0) * SCREEN_W;+ const uint8_t *m = fgmask + (Y - gfx_y0) * SCREEN_W;+ for (int i = 0; i + 1 < nx; i += 2) {+ int x0 = imax((int)floor(xs[i] + 0.5), 0), x1 = imin((int)floor(xs[i + 1] + 0.5), SCREEN_W);+ for (int X = x0; X < x1; X++)+ if (!under || !m[X]) o[X] = a32 >= 32 ? c : gfx_mix(o[X], c, a32);+ }+ }+}+static void line(double ax, double ay, double bx, double by, color_t c, int a32) {+ double dx = bx - ax, dy = by - ay;+ int n = (int)fmax(fabs(dx), fabs(dy)) + 1;+ for (int k = 0; k <= n; k++) {+ int X = (int)floor(ax + dx * k / n), Y = (int)floor(ay + dy * k / n);+ if (X >= 0 && X < SCREEN_W && Y >= gfx_y0 && Y < gfx_y1) {+ color_t *o = gfx_buf + (Y - gfx_y0) * SCREEN_W + X;+ *o = a32 >= 32 ? c : gfx_mix(*o, c, a32);+ }+ }+}++/* ---------------------------------------------------------------- texts: the game's fonts, in runs */+/* a glyph, turned a quarter turn `rot` times about the pen */+static void glyph(const np_font_t *f, const np_glyph_t *g, int px, int py, int rot, color_t c, int a32) {+ const uint8_t *d = f->data + g->offset;+ int r = rot & 3;+ /* the glyph's rows on the screen: skip it when it misses this strip */+ int top, bottom;+ if (r == 0) top = py + g->y, bottom = top + g->h;+ else if (r == 2) bottom = py - g->y, top = bottom - g->h;+ else if (r == 1) top = py + g->x, bottom = top + g->w;+ else bottom = py - g->x, top = bottom - g->w;+ if (bottom <= gfx_y0 || top >= gfx_y1) return;+ for (int j = 0; j < g->h; j++)+ for (int i = 0; i < g->w; i++) {+ int k = j * g->w + i, v = (d[k >> 1] >> ((k & 1) * 4)) & 15;+ if (!v) continue;+ int lx = g->x + i, ly = g->y + j, X, Y;+ switch (r) {+ case 0: X = px + lx, Y = py + ly; break;+ case 1: X = px - ly - 1, Y = py + lx; break;+ case 2: X = px - lx - 1, Y = py - ly - 1; break;+ default: X = px + ly, Y = py - lx - 1; break;+ }+ if (X < 0 || X >= SCREEN_W || Y < gfx_y0 || Y >= gfx_y1) continue;+ color_t *o = gfx_buf + (Y - gfx_y0) * SCREEN_W + X;+ int a = v * 2 * a32 / 30;+ *o = a >= 32 ? c : gfx_mix(*o, c, a);+ }+}+static const np_glyph_t *glyph_of(const np_font_t *f, unsigned char ch) {+ if (ch < f->first || ch >= f->first + f->count) return 0;+ return &f->glyphs[ch - f->first];+}+typedef struct {+ int at, end, w, asc, desc, font, colour;+} tline_t;+/* the text's lines, wrapped at `width` pixels (0: no wrapping) */+static int text_lines(const char *s, int width, tline_t *lines, int max) {+ int n = 0, font = 0, colour = 0, i = 0;+ while (s[i] && n < max) {+ tline_t *l = &lines[n];+ l->at = i, l->w = 0, l->asc = 0, l->desc = 0, l->font = font, l->colour = colour;+ int brk = -1, brk_w = 0, brk_font = font, brk_colour = colour, w = 0;+ for (;;) {+ unsigned char ch = (unsigned char)s[i];+ if (!ch || ch == '\n') {+ l->end = i, l->w = w;+ if (ch) i++;+ break;+ }+ if (ch == 1) {+ font = (unsigned char)s[i + 1], i += 2;+ continue;+ }+ if (ch == 2) {+ colour = (unsigned char)s[i + 1], i += 2;+ continue;+ }+ const np_font_t *f = &cn_fonts[font];+ l->asc = imax(l->asc, f->ascent), l->desc = imax(l->desc, f->descent);+ const np_glyph_t *g = glyph_of(f, ch >= 'a' && ch <= 'z' && !glyph_of(f, ch) ? ch - 32 : ch);+ int adv = g ? g->advance : 0;+ if (width && w + adv > width && brk > l->at && ch != ' ') { /* back to the last space */+ l->end = brk, l->w = brk_w;+ i = brk, font = brk_font, colour = brk_colour;+ while (s[i] == ' ') i++;+ break;+ }+ w += adv, i++;+ if (ch == ' ') brk = i, brk_w = w - adv, brk_font = font, brk_colour = colour;+ }+ if (!l->asc) l->asc = cn_fonts[font].ascent, l->desc = cn_fonts[font].descent;+ n++;+ }+ return n;+}+/* the text centred on (cx, cy) or with its top at y0 (cy < 0: then y0 is its top), turned rot quarter turns */+static void text_draw(int text, double cx, double top, int width, int rot, int a32, bool outline, bool centre_v,+ int dir_x) {+ static tline_t lines[12];+ const char *s = cn_text_data + cn_text_at[text];+ int n = text_lines(s, width, lines, 12), h = 0;+ for (int k = 0; k < n; k++) h += lines[k].asc + lines[k].desc;+ double y = centre_v ? -h / 2.0 : 0;+ static const int8_t ux[4] = {1, 0, -1, 0}, uy[4] = {0, 1, 0, -1};+ int r = rot & 3;+ /* (a quick look: which rows the text could cover) */+ double reach = fmax(h, width ? width : 320) / 2.0 + 30;+ if (r == 0 && !centre_v && (top + h + 4 < gfx_y0 || top - 4 > gfx_y1)) return;+ if (centre_v && (top + reach < gfx_y0 || top - reach > gfx_y1)) return;+ int icx = (int)floor(cx), itop = (int)floor(top);+ for (int k = 0; k < n; k++) {+ tline_t *l = &lines[k];+ int lx = dir_x < 0 ? 0 : -l->w / 2, ly = (int)floor(y) + l->asc; /* the pen, in the text's own frame */+ int font = l->font, colour = l->colour;+ if (r == 0 && (itop + ly + l->desc + 2 <= gfx_y0 || itop + ly - l->asc - 2 >= gfx_y1)) {+ y += l->asc + l->desc;+ continue;+ }+ for (int i = l->at; i < l->end; i++) {+ unsigned char ch = (unsigned char)s[i];+ if (ch == 1) {+ font = (unsigned char)s[++i];+ continue;+ }+ if (ch == 2) {+ colour = (unsigned char)s[++i];+ continue;+ }+ const np_font_t *f = &cn_fonts[font];+ const np_glyph_t *g = glyph_of(f, ch);+ if (!g || (!g->w && !g->advance)) g = glyph_of(f, ch >= 'a' && ch <= 'z' ? ch - 32 : ch);+ if (!g) continue;+ int px = icx + lx * ux[r] - ly * uy[r], py = itop + lx * uy[r] + ly * ux[r];+ if (g->w) {+ color_t c = gfx_rgb(cn_colours[colour]);+ if (outline)+ for (int d = 0; d < 8; d++) {+ static const int8_t ox[8] = {-1, 0, 1, -1, 1, -1, 0, 1}, oy[8] = {-1, -1, -1, 0, 0, 1, 1, 1};+ glyph(f, g, px + ox[d], py + oy[d], r, 0, a32);+ }+ glyph(f, g, px, py, r, c, a32);+ }+ lx += g->advance;+ }+ y += l->asc + l->desc;+ }+}++/* ---------------------------------------------------------------- the boss (drawboss: its shape, wobbling) */+static void draw_boss(void) {+ static int pts[BOSS_POINTS * 2];+ static double sxy[BOSS_POINTS * 2 + 2];+ boss_draw_points(pts);+ double w = boss_width(), h = boss_height(), csx = boss_csx_get();+ for (int k = 0; k <= BOSS_POINTS; k++) {+ double px = k < BOSS_POINTS ? pts[k * 2] : 0, py = k < BOSS_POINTS ? pts[k * 2 + 1] : 0;+ /* base.x = -width / 2 (its left, x0, ends there), then the container's mirror, then the boss's size */+ double bx = (px - w / 2) * csx * boss.sx, by = (py - h / 2) * boss.sy;+ to_screen(boss.x + bx, boss.y + by, &sxy[k * 2], &sxy[k * 2 + 1]);+ }+ static const uint32_t colours[4] = {0x1E9ADD, 0xD67A1F, 0x8C0003, 0x000000};+ int a = (int)(boss.alpha * 32);+ if (a <= 0) return;+ color_t body = gfx_rgb(colours[boss.id & 3]), red = HEX(0xFF0000), dark = HEX(0xA80004), black = 0;+ double poly[10];+ /* the first shape: from the pen's start (0, 0) through points 0 to 3 */+ poly[0] = sxy[BOSS_POINTS * 2], poly[1] = sxy[BOSS_POINTS * 2 + 1];+ for (int k = 0; k < 4; k++) poly[2 + k * 2] = sxy[k * 2], poly[3 + k * 2] = sxy[k * 2 + 1];+ fill_poly(poly, 5, body, a, false);+ for (int k = 0; k < 5; k++) line(poly[k * 2], poly[k * 2 + 1], poly[(k + 1) % 5 * 2], poly[(k + 1) % 5 * 2 + 1], black, a);+ for (int m = 1; m < BOSS_POINTS / 4; m++) {+ const double *q = sxy + m * 8;+ if (m <= 10 || m >= 22) {+ fill_poly(q, 4, m <= 10 ? body : dark, a, false);+ for (int k = 0; k < 4; k++) line(q[k * 2], q[k * 2 + 1], q[(k + 1) % 4 * 2], q[(k + 1) % 4 * 2 + 1], m <= 10 ? black : red, a);+ } else {+ for (int k = 0; k < 3; k++) line(q[k * 2], q[k * 2 + 1], q[k * 2 + 2], q[k * 2 + 3], red, a);+ }+ }+}++/* ---------------------------------------------------------------- particles (effects/Particle: under the tiles) */+static void draw_particles(void) {+ static const uint32_t cols[7][2] = {{0, 0}, {0xFF0000, 0x940802}, {0x006BD7, 0x58A6F4}, {0x7028B0, 0x9855D3},+ {0xAC590D, 0x6E3A0D}, {0x808080, 0xD9D9D9}, {0xED7DFA, 0xCC24F7}};+ double z = ZOOM * world_sx;+ for (int i = 0; i < n_particles; i++) {+ particle_t *p = &particles[i];+ int a = (int)(p->alpha * 32);+ if (a <= 0) continue;+ if (p->type == 0) {+ blit_t b = pic_at(SPR_CAT_IDLE, -p->pw / 2.0, -p->ph / 2.0);+ b.sx0 = p->px0 / 2, b.sy0 = p->py0 / 2, b.sw = (p->pw + 1) / 2, b.sh = (p->ph + 1) / 2;+ b.lrot = p->rot, b.pal = PAL_CAT, b.alpha32 = a, b.under = true;+ blit(&b, p->x, p->y);+ continue;+ }+ double sx, sy, s = p->size * z;+ to_screen(p->x, p->y, &sx, &sy);+ if (sy + s < gfx_y0 - 2 || sy - s > gfx_y1 + 2 || sx < -10 || sx > SCREEN_W + 10) continue;+ color_t c1 = gfx_rgb(cols[p->type][0]), c2 = gfx_rgb(cols[p->type][1]);+ if (p->type == 5) { /* a shard: a triangle up from its place */+ double e = (2 + p->size) * z, q[6] = {sx, sy, sx + e, sy + e, sx - e, sy + e};+ fill_poly(q, 3, gfx_mix(c1, c2, 16), a, true);+ continue;+ }+ double q[8] = {sx, sy, sx + s, sy, sx + s, sy + s, sx, sy + s};+ if (s < 1.5) q[2] = q[4] = sx + 1.5, q[5] = q[7] = sy + 1.5;+ fill_poly(q, 4, s >= 3 ? c1 : gfx_mix(c1, c2, 16), a, true);+ if (s >= 3) {+ double r2[8] = {sx + s / 2, sy, sx + s, sy, sx + s, sy + s, sx + s / 2, sy + s};+ fill_poly(r2, 4, c2, a, true);+ }+ }+}++/* ---------------------------------------------------------------- the world */+static int snap_rot(double r) { /* a turn to the nearest quarter (texts stay readable) */+ int q = (int)floor((r + 45) / 90);+ return ((q % 4) + 4) % 4;+}+static void draw_screens(void) {+ for (int i = 0; i < n_screens; i++) {+ screen_t *s = &screens[i];+ blit_t b = pic_at(SPR_TV, -96, -48);+ b.pal = PAL_MAP;+ blit(&b, s->x + 60, s->y + 30);+ if (s->text >= 0) {+ double cx, cy;+ to_screen(s->x + 60, s->y + 30, &cx, &cy);+ text_draw(s->text, cx, cy, 80, snap_rot(world_rot + s->rot), 32, false, true, 0);+ }+ }+}+static void draw_things(void) {+ const uint8_t *o;+ int n;+ for (int i = 0; i < n_mines; i++) {+ blit_t b = pic_at(mines[i].pic, 0, 0);+ blit(&b, mines[i].x, mines[i].y);+ }+ n = env_buttons(&o);+ for (int i = 0; i < n; i++) {+ button_t *t = &buttons[o[i]];+ blit_t b = pic_at(t->pic, 0, 0);+ b.lsx = t->sx, b.lsy = t->sy;+ blit(&b, t->x, t->y);+ }+ n = env_dirts(&o);+ for (int i = 0; i < n; i++) {+ dirt_t *d = &dirts[o[i]];+ blit_t b = pic_at(SPR_DIRT_0 + (d->playing ? 1 + d->frame : 0), 0, 0);+ blit(&b, d->x, d->y);+ }+ n = env_crates(&o);+ for (int i = 0; i < n; i++) {+ blit_t b = pic_at(SPR_CRATE, 0, 0);+ blit(&b, crates[o[i]].x, crates[o[i]].y);+ }+ for (int i = 0; i < n_shooters; i++) {+ shooter_t *s = &shooters[i];+ blit_t b = pic_at((s->homing ? SPR_HOMING_0_0 : SPR_SHIELD_0_0) + s->orient * 4 + s->frame, 0, 0);+ blit(&b, s->x, s->y);+ }+ n = env_spheres(&o);+ for (int i = 0; i < n; i++) {+ sphere_t *s = &spheres[o[i]];+ blit_t b = pic_at(SPR_SPHERE_0 + s->frame, 0, 0);+ blit(&b, s->x, s->y);+ }+ n = env_falls(&o);+ for (int i = 0; i < n; i++) {+ fall_t *f = &falls[o[i]];+ blit_t b = pic_at(SPR_FALLSPIKE_0 + f->dir, 0, 0);+ b.pal = PAL_MAP;+ blit(&b, f->x, f->y);+ }+ for (int i = 0; i < n_suns; i++) {+ blit_t b = pic_at(SPR_SUNSPIKE, 0, 0);+ blit(&b, suns[i].x, suns[i].y);+ }+ if (big.on) {+ blit_t b = pic_at(SPR_BIGSPHERE_0 + big.frame, -83.5, -163);+ b.tsx = 167 / 42.0, b.tsy = 163 / 41.0, b.lsx = b.lsy = big.scale;+ blit(&b, big.x, big.y);+ }+}+static void draw_trails(void) {+ for (int i = 0; i < n_trails; i++) {+ trail_t *t = &trails[i];+ int a = (int)(t->alpha * 32 + 0.5);+ if (a <= 0) continue;+ if (t->kind == TR_PIC) {+ const cn_sprite_t *sp = &cn_sprites[t->pic];+ blit_t b = pic_at(t->pic, -sp->w, -sp->h);+ if (t->pic <= SPR_CAT_ROLL) b.ax = -11.5, b.ay = -10;+ b.lrot = t->rot, b.alpha32 = a;+ if (t->tint == 2) b.pal = PAL_RGB, b.tr = t->tr / 32.0, b.tg = t->tg / 32.0, b.tb = t->tb / 32.0;+ blit(&b, t->x, t->y);+ continue;+ }+ double sx, sy, r = t->r * t->scale * ZOOM * world_sx;+ if (r <= 0) continue;+ to_screen(t->x, t->y, &sx, &sy);+ if (sy + r < gfx_y0 || sy - r > gfx_y1) continue;+ color_t c = t->kind == TR_CIRCLE_RED ? HEX(0xFF0000)+ : gfx_rgb(tint888((uint32_t)t->color & 0xFFFFFF, map_tint.r, map_tint.g, map_tint.b));+ fill_circle(sx, sy, r < 0.7 ? 0.7 : r, c, a);+ }+}+static void draw_cat(void) {+ if (!P.on_stage) return;+ if (P.hasJetPack && P.jet_visible) {+ blit_t b = pic_at(SPR_JETPACKADDON, -15, P.jet_half ? 0 : -10);+ if (P.jet_half) b.tsy = 1;+ b.lsx = P.scaleX, b.lrot = P.rotation, b.pal = PAL_CAT;+ blit(&b, P.x, P.y);+ }+ blit_t b = pic_at(P.pic, -OFFX, -OFFY);+ b.lsx = P.scaleX, b.lrot = P.rotation, b.pal = PAL_CAT;+ blit(&b, P.x, P.y);+}+static void draw_bombs(void) {+ const bomb_t *bs;+ int n = env_bombs(&bs);+ for (int i = 0; i < n; i++) {+ blit_t b = pic_at(SPR_BOMB, -10, -10);+ b.lrot = bs[i].rot;+ blit(&b, bs[i].x, bs[i].y);+ }+}++static void hud_draw(void);+/* the stage's texts and counts (0.4 of its 800 x 600) */+static void draw_stage(void) {+ for (int i = 0; i < n_texts; i++) {+ dtext_t *t = &texts[i];+ if (!t->visible) continue;+ int a = (int)(t->alpha * 32 + 0.5);+ if (a <= 0) continue;+ double x = t->x * 0.4, top = (t->y + 22) * 0.4;+ text_draw(t->text, x + 160, top, 316, 0, a, true, false, 0);+ if (t->logo) { /* spec3: the TrackMill logo under the words */+ blit_t b = pic_at(SPR_TRACKMILL, 0, 0);+ const cn_sprite_t *sp = &cn_sprites[SPR_TRACKMILL];+ int x0 = (int)x + 160 - sp->w / 2, y0 = (int)((t->y + 80) * 0.4);+ (void)b;+ for (int Y = imax(y0, gfx_y0); Y < imin(y0 + sp->h, gfx_y1); Y++)+ for (int X = imax(x0, 0); X < imin(x0 + sp->w, SCREEN_W); X++) {+ int idx = cn_sprite_px[sp->at + (Y - y0) * sp->w + (X - x0)];+ if (!idx) continue;+ int al = pal_a[idx] * a / CN_ALPHA;+ color_t *o = gfx_buf + (Y - gfx_y0) * SCREEN_W + X;+ *o = al >= 32 ? pal_plain[idx] : gfx_mix(*o, pal_plain[idx], al);+ }+ }+ }+ hud_draw();+}+static void hud_draw_line(const char *s, int x, int base) {+ const np_font_t *f = &cn_fonts[FONT_HUD];+ color_t c = HEX(0xFFFFFF);+ for (; *s; s++) {+ const np_glyph_t *g = glyph_of(f, (unsigned char)*s);+ if (!g) g = glyph_of(f, (unsigned char)(*s >= 'a' && *s <= 'z' ? *s - 32 : *s));+ if (!g) continue;+ if (g->w) {+ for (int dd = 0; dd < 8; dd++) {+ static const int8_t ox[8] = {-1, 0, 1, -1, 1, -1, 0, 1}, oy[8] = {-1, -1, -1, 0, 0, 1, 1, 1};+ glyph(f, g, x + ox[dd], base + oy[dd], 0, 0, 32);+ }+ glyph(f, g, x, base, 0, c, 32);+ }+ x += g->advance;+ }+}+static void hud_number(char *o, const char *label, int v) {+ while (*label) *o++ = *label++;+ char d[10];+ int k = 0;+ do d[k++] = (char)('0' + v % 10); while ((v /= 10) && k < 9);+ while (k) *o++ = d[--k];+ *o = 0;+}+static void hud_draw(void) { /* tools/text/Info: the deaths and the crystals, at the top left */+ const np_font_t *f = &cn_fonts[FONT_HUD];+ if (gfx_y0 > 4 + 2 * (f->ascent + f->descent)) return;+ char b[40];+ hud_number(b, "Deaths: ", hud_deaths);+ hud_draw_line(b, 3, 2 + f->ascent);+ hud_number(b, "Crystals Collected: ", hud_collected);+ hud_draw_line(b, 3, 3 + f->ascent * 2 + f->descent);+}++/* the whole world, in this strip */+void draw_world(void) {+ draw_tiles();+ draw_particles();+ draw_screens();+ draw_things();+ if (boss.created) draw_boss();+ draw_bombs();+ draw_trails();+ draw_cat();+ draw_stage();+ if (fade_on && fade_alpha > 0)+ gfx_fill_alpha(0, gfx_y0, SCREEN_W, gfx_y1 - gfx_y0, 0, (int)(fade_alpha * 256 > 256 ? 256 : fade_alpha * 256));+}diff --git a/games/catninja/src/env.c b/games/catninja/src/env.cnew file mode 100644index 00000000..90b4f101--- /dev/null+++ b/games/catninja/src/env.c@@ -0,0 +1,867 @@+/* Cat Ninja's things: environment/ (mines, buttons, dirt, crates, shooters and their bullets, falling and+ * sun spikes, crystals, lasers, bombs, the big crystal), entities/Boss, effects/ (trails and particles),+ * tools/text/TextManager and tools/Collision, in C. Each list keeps the original's order: a thing+ * taken out is spliced out, and one put back goes to the end, as the Vectors did. */+#include <math.h>+#include <string.h>+#include "cn.h"++mine_t mines[MAX_MINES];+button_t buttons[MAX_BUTTONS];+dirt_t dirts[MAX_DIRTS];+crate_t crates[MAX_CRATES];+shooter_t shooters[MAX_SHOOTERS];+bullet_t bullets[MAX_BULLETS];+fall_t falls[MAX_FALLS];+sun_t suns[MAX_SUNS];+sphere_t spheres[MAX_SPHERES];+screen_t screens[MAX_SCREENS];+bomb_t bombs[MAX_BOMBS];+trail_t trails[MAX_TRAILS];+particle_t particles[MAX_PARTICLES];+dtext_t texts[MAX_TEXTS];+int n_mines, n_buttons, n_dirts, n_crates, n_shooters, n_falls, n_suns, n_spheres, n_screens, n_trails, n_particles,+ n_texts;+static int n_bombs;+bigsphere_t big;+boss_t boss;+static laser_t lasers[MAX_LASERS];+static int n_lasers;+static double boss_csx = -1; /* the boss's container.scaleX (kept by remove(), as the original does) */++/* the Vectors: which things are in them, in order (the things themselves stay, to be put back) */+static uint8_t ord_dirt[MAX_DIRTS], ord_crate[MAX_CRATES], ord_fall[MAX_FALLS], ord_button[MAX_BUTTONS],+ ord_sphere[MAX_SPHERES];+static int o_dirt, o_crate, o_fall, o_button, o_sphere;+/* Main.env.resetters, in the order they were made: kind << 8 | index */+static uint16_t resetters[MAX_MINES + MAX_DIRTS + MAX_CRATES + MAX_FALLS];+static int n_resetters;+enum { R_MINE, R_DIRT, R_CRATE, R_FALL };++extern int collide_down(int x, int y), collide_right(int x, int y), collide_left(int x, int y), collide_up(int x, int y);+extern bool node_walkable(int node);+static double tw(double v) { return (double)(int)(v * 20) / 20; }+static int around(double v) { return (int)floor(v + 0.5); } /* Math.round */+static void splice(uint8_t *ord, int *n, int i) {+ memmove(ord + i, ord + i + 1, (size_t)(*n - i - 1));+ (*n)--;+}+static int find(const uint8_t *ord, int n, int v) {+ for (int i = 0; i < n; i++)+ if (ord[i] == v) return i;+ return -1;+}+static bool remove_from(uint8_t *ord, int *n, int v) { /* Main.env.remove */+ int i = find(ord, *n, v);+ if (i < 0) return false;+ splice(ord, n, i);+ return true;+}+static void resetter(int kind, int i) {+ if (n_resetters < (int)(sizeof resetters / sizeof resetters[0])) resetters[n_resetters++] = (uint16_t)(kind << 8 | i);+}+static int gi(int x, int y) { return y * gw + x; }+static bool in_grid(int i) { return i >= 0 && i < gw * gh; }++void env_clear(void) {+ n_mines = n_buttons = n_dirts = n_crates = n_shooters = n_falls = n_suns = n_spheres = n_screens = n_lasers = 0;+ o_dirt = o_crate = o_fall = o_button = o_sphere = 0;+ n_resetters = 0;+ big.on = false;+ for (int i = 0; i < MAX_BULLETS; i++)+ if (bullets[i].owner >= 0) bullets[i].on = false;+}++/* ---------------------------------------------------------------- tools/Collision.inRadius */+static bool in_radius(int px, int py, int tx, int ty, int radius) {+ static const int8_t sides[8] = {1, 0, 0, 1, -1, 0, 0, -1};+ for (int r = 0; r < radius; r++) {+ int lx = -1 - r, ly = -1 - r;+ for (int s = 0; s < 8; s += 2) {+ int ox = lx, oy = ly;+ for (int k = 0; k < (r + 1) * 2; k++) {+ int cx = px + ox, cy = py + oy;+ if (!(cx > 0 && cx < gw && cy > 0 && cy < gh)) return false;+ if ((grid[gi(cx, cy)] & SOLID) && (cx != P.coordx || cy != P.coordy)) {+ ox += sides[s], oy += sides[s + 1], lx = ox, ly = oy;+ continue;+ }+ ox += sides[s], oy += sides[s + 1], lx = ox, ly = oy;+ if (tx == cx && ty == cy) return true;+ }+ }+ }+ return false;+}++/* ---------------------------------------------------------------- environment/Mine */+static const int mine_pic[3] = {SPR_MINEBLINKOFF_0, SPR_MINEBLINKON_0, SPR_MINEOFF_0}; /* (+3 each way it faces) */+static void mine_reset(mine_t *m) {+ m->pic = SPR_MINEBLINKOFF_0 + 3 * m->graphic;+ m->timer = 0, m->setoff = false, m->rate = 10, m->blinkon = false, m->off = false;+}+void mine_create(int x, int y, int g) {+ if (n_mines == MAX_MINES) return;+ mine_t *m = &mines[n_mines];+ m->x = x, m->y = y, m->graphic = g;+ mine_reset(m);+ resetter(R_MINE, n_mines++);+}+static void mine_update(mine_t *m) {+ if (m->off) return;+ if (P.x >= m->x - 20 && P.x <= m->x + 20 && P.y >= m->y - 20 && P.y <= m->y + 20) m->setoff = true;+ if (m->setoff && ++m->timer >= m->rate) {+ m->pic = mine_pic[m->blinkon ? 0 : 1] + 3 * m->graphic;+ m->blinkon = !m->blinkon;+ m->timer = 0;+ m->rate -= 2;+ if (m->rate <= 0) {+ if (in_radius(m->x / 20, m->y / 20, P.coordx, P.coordy, 4)) player_die();+ particles_create(m->x, m->y, 20, 15, 15, 1, false);+ m->pic = SPR_MINEOFF_0 + 3 * m->graphic;+ m->off = true;+ }+ }+}++/* ---------------------------------------------------------------- environment/Button */+void button_create(int x, int y, int datanum) {+ if (n_buttons == MAX_BUTTONS) return;+ button_t *b = &buttons[n_buttons];+ b->x = x, b->y = y, b->sx = b->sy = 1, b->datanum = datanum, b->pressed = false, b->pic = SPR_BUTTON_0 + datanum - 16;+ b->msx = b->msy = 0, b->oy = 0;+ if (datanum == 16 || datanum == 19) b->msy = 0.25, b->oy = 5;+ else b->msx = 0.25;+ ord_button[o_button++] = (uint8_t)n_buttons++;+}+static void button_slam(int k) {+ button_t *b = &buttons[k];+ if (!b->pressed && P.x >= b->x - 25 && P.x <= b->x + 25 && P.y >= b->y - 25 && P.y <= b->y + 25) {+ b->sx -= b->msx, b->sy -= b->msy;+ b->y = tw(b->y + b->oy);+ if (b->sx <= 0.25 || b->sy <= 0.25) {+ interp(0, LB_UNLOCKLASER, true);+ b->pressed = true;+ if (b->sx <= 0.25) b->sx = 0.25;+ else if (b->sy <= 0.25) b->sy = 0.25;+ change_tile((int)(b->x / 20), (int)(b->y / 20), b->datanum + 12, true, true, true, true);+ remove_from(ord_button, &o_button, k);+ }+ }+}+void env_slam(void) {+ for (int i = 0; i < o_button; i++) button_slam(ord_button[i]);+}++/* ---------------------------------------------------------------- environment/Dirt */+void dirt_create(int x, int y) {+ if (n_dirts == MAX_DIRTS) return;+ dirts[n_dirts] = (dirt_t){x, y, 0, 0, false, true, false};+ ord_dirt[o_dirt++] = (uint8_t)n_dirts;+ resetter(R_DIRT, n_dirts++);+}+void dirt_break(int i) {+ dirt_t *d = &dirts[i];+ particles_create(d->x, d->y, 4, 5, 5, 4, false);+ if (remove_from(ord_dirt, &o_dirt, i)) d->alive = false;+ int g = gi(d->x / 20, d->y / 20);+ if (in_grid(g)) grid[g] &= 0x7F;+}+static void dirt_update(int i) {+ dirt_t *d = &dirts[i];+ int dx = d->x / 20, dy = d->y / 20;+ if (!d->activated) {+ if ((P.coordx + 1 == dx && P.coordy + 1 == dy) || (P.coordx == dx && P.coordy + 1 == dy) ||+ (P.coordx + 1 == dx && P.coordy == dy) || (P.coordx == dx && P.coordy == dy)) {+ timer_add(200, T_DIRT, i, false);+ d->activated = true, d->playing = true, d->frame = 0, d->ftimer = 0;+ return;+ }+ if ((P.coordx + 2 == dx && P.coordy == dy) || (P.coordx - 1 == dx && P.coordy == dy))+ if (P.rolling) dirt_break(i), d->activated = true;+ } else if (d->playing && ++d->ftimer >= 4) {+ d->ftimer = 0;+ d->frame = d->frame ? 0 : 1;+ }+}+static void dirt_reset(int i) {+ dirt_t *d = &dirts[i];+ if (!d->alive) {+ d->alive = true, d->playing = false, d->frame = 0, d->activated = false;+ ord_dirt[o_dirt++] = (uint8_t)i;+ int g = gi(d->x / 20, d->y / 20);+ if (in_grid(g)) grid[g] |= SOLID;+ }+}++/* ---------------------------------------------------------------- environment/Crate */+static void crate_walk(int x, int y, bool w, bool force) {+ if ((x != P.coordx || y != P.coordy || force) && (x - 1 != P.coordx || y != P.coordy || force)) {+ int g = gi(x, y);+ if (in_grid(g)) grid[g] = (uint8_t)((grid[g] & 0x7F) | (w ? 0 : SOLID));+ }+}+static void crate_updatepos(crate_t *c) {+ c->x = c->ox, c->y = c->oy, c->lx = c->x / 20, c->ly = c->y / 20;+ int g = gi(c->lx, c->ly);+ if (in_grid(g)) grid[g] |= SOLID;+}+void crate_create(int x, int y) {+ if (n_crates == MAX_CRATES) return;+ crate_t *c = &crates[n_crates];+ c->ox = x, c->oy = y, c->alive = true;+ crate_updatepos(c);+ ord_crate[o_crate++] = (uint8_t)n_crates;+ resetter(R_CRATE, n_crates++);+}+static void crate_break(int i) {+ crate_t *c = &crates[i];+ crate_walk(c->lx, c->ly, true, true);+ particles_create(c->x, c->y, 8, 25, 10, 4, false);+ if (remove_from(ord_crate, &o_crate, i)) c->alive = false;+}+static void crate_update(int i) {+ crate_t *c = &crates[i];+ int cx = around(c->x / 20.0), cy = c->y / 20;+ if (c->lx != cx) crate_walk(c->lx, c->ly, true, false), c->lx = cx, crate_walk(c->lx, c->ly, false, false);+ if (c->ly != cy) crate_walk(c->lx, c->ly, true, false), c->ly = cy, crate_walk(c->lx, c->ly, false, false);+ if (level != 27 && ((P.coordx + 2 == cx && P.coordy == cy) || (P.coordx - 1 == cx && P.coordy == cy)))+ if ((P.rolling && P.speedx >= 8) || (P.rolling && P.speedx <= -8)) crate_break(i);+}+static void crate_reset(int i) {+ crate_t *c = &crates[i];+ crate_walk(c->lx, c->ly, true, true);+ crate_updatepos(c);+ if (!c->alive) c->alive = true, ord_crate[o_crate++] = (uint8_t)i;+}++/* ---------------------------------------------------------------- environment/Bullet */+static void bullet_angle(bullet_t *b) {+ b->angle = -atan2(P.y - b->y, P.x - b->x) * (180 / M_PI);+ b->sx = b->bspeed * cos(M_PI / 180 * b->angle);+ b->sy = -b->bspeed * sin(M_PI / 180 * b->angle);+}+static bullet_t *bullet_new(double x, double y, int owner, bool homing) {+ for (int i = 0; i < MAX_BULLETS; i++)+ if (!bullets[i].on) {+ bullet_t *b = &bullets[i];+ memset(b, 0, sizeof *b);+ b->x = x, b->y = y, b->owner = owner, b->bspeed = 6, b->homing = homing, b->on = true;+ b->color = (int)(rnd01() * (255 * 255 * 255));+ bullet_angle(b);+ return b;+ }+ return 0;+}+/* true when it is gone */+static bool bullet_update(bullet_t *b) {+ double r = 2 + rnd01() * 2;+ trail_create(b->x + r + 0.5, b->y + r + 0.5, TR_DOT, 0, 0.08, 1, 1, 0, b->color, r);+ b->x += b->sx, b->y += b->sy;+ double cx = b->x / 20, cy = b->y / 20;+ if (!node_walkable(collide_right((int)cx, (int)cy)) || !node_walkable(collide_left((int)cx, (int)cy)) ||+ !node_walkable(collide_down((int)cx, (int)(cy - 1))) || !node_walkable(collide_up((int)cx, (int)cy)))+ return true;+ if (!P.dead) {+ if (++b->htimer < 150 && b->homing && ++b->homingtimer >= 10) bullet_angle(b), b->homingtimer = 0;+ if (b->x >= P.x - 20 && b->x <= P.x + 20 && b->y >= P.y - 20 && b->y <= P.y + 20) {+ player_die();+ return true;+ }+ }+ return false;+}++/* ---------------------------------------------------------------- environment/ShieldShooter */+void shooter_create(int x, int y, int o, bool homing) {+ if (n_shooters == MAX_SHOOTERS) return;+ shooters[n_shooters++] = (shooter_t){x, y, o, 100, 0, 0, 0, homing, false, false};+}+static void shooter_anim(shooter_t *s) { /* AnimateControl.update, 4 frames, no loop */+ if (s->paused) return;+ if (++s->ftimer >= 5) {+ if (!s->reverse) {+ if (++s->frame >= 4) s->frame = 3;+ } else if (--s->frame < 0) {+ s->frame = 0;+ }+ s->ftimer = 0;+ }+}+static void shooter_update(int k) {+ shooter_t *s = &shooters[k];+ if (s->x >= P.x - 500 && s->x <= P.x + 500 && s->y >= P.y - 400 && s->y <= P.y + 400) {+ ++s->timer;+ if (!P.dead && s->timer >= 100) {+ bullet_new(s->x, s->y, k, s->homing);+ s->timer = (int)(rnd01() * 100 / 4);+ s->startat = s->timer;+ s->frame = 3;+ s->reverse = true;+ }+ if (s->timer >= 80) s->reverse = false, shooter_anim(s);+ if (s->timer >= 40 && s->timer <= s->startat + 60 && s->reverse) shooter_anim(s);+ }+ if (s->x >= P.x - 1200 && s->x <= P.x + 1200 && s->y >= P.y - 800 && s->y <= P.y + 800) {+ for (int i = 0; i < MAX_BULLETS; i++)+ if (bullets[i].on && bullets[i].owner == k && bullet_update(&bullets[i])) {+ particles_create(bullets[i].x, bullets[i].y, 2, 10, 10, 3, false);+ bullets[i].on = false;+ }+ }+}++/* ---------------------------------------------------------------- environment/FallingSpike */+void fall_create(int x, int y, int dir) {+ if (n_falls == MAX_FALLS) return;+ fall_t *f = &falls[n_falls];+ static const int8_t v[4][2] = {{0, -10}, {0, 10}, {10, 0}, {-10, 0}};+ f->sx = v[dir][0], f->sy = v[dir][1], f->dir = dir, f->spx = f->x = x, f->spy = f->y = y, f->fall = false, f->alive = true;+ ord_fall[o_fall++] = (uint8_t)n_falls;+ resetter(R_FALL, n_falls++);+}+static void fall_remove(int i) {+ fall_t *f = &falls[i];+ particles_create(f->x, f->y, 5, 10, 10, 5, false);+ if (remove_from(ord_fall, &o_fall, i)) f->alive = false;+}+static void fall_update(int i) {+ fall_t *f = &falls[i];+ if (f->x >= P.x - 800 && f->x <= P.x + 800 && f->y >= P.y - 600 && f->y <= P.y + 600) {+ int cx = around(f->x / 20.0), cy = around(f->y / 20.0);+ if ((cx == P.coordx || f->x / 20 == P.coordx) && (cy == P.coordy || f->y / 20 == P.coordy)) {+ fall_remove(i);+ player_die();+ }+ if (f->fall) {+ f->x += f->sx, f->y += f->sy;+ int g = gi(cx, cy);+ if (!in_grid(g) || (grid[g] & SOLID)) fall_remove(i);+ } else {+ int tx = cx, ty = cy, sx = f->sx / 10, sy = f->sy / 10;+ while (cx >= 0 && cx < gw && cy >= 0 && cy < gh) {+ tx += sx, ty += sy;+ int g = gi(tx, ty);+ if (!in_grid(g) || (grid[g] & SOLID)) break;+ if (tx >= P.coordx - 1 && tx <= P.coordx + 1 && ty >= P.coordy - 1 && ty <= P.coordy + 1) {+ f->fall = true;+ break;+ }+ }+ }+ }+}+static void fall_reset(int i) {+ fall_t *f = &falls[i];+ f->fall = false, f->x = f->spx, f->y = f->spy;+ if (!f->alive) f->alive = true, ord_fall[o_fall++] = (uint8_t)i;+}++/* ---------------------------------------------------------------- environment/SunSpike */+void sun_create(int x, int y) {+ if (n_suns == MAX_SUNS) return;+ suns[n_suns++] = (sun_t){x, y, 0, 0, 0, 0};+}+static int gtype(int x, int y) {+ int g = gi(x, y);+ return in_grid(g) ? TYPE(g) : 0;+}+static void sun_speed(sun_t *s, int cx, int cy) {+ const int v = 6;+ if (gtype(cx, cy + 1) == 1) s->sx = v, s->sy = 0;+ else if (gtype(cx, cy + 1) != 1 && s->sx == v && s->sy == 0) s->sx = 0, s->sy = v;+ else if (gtype(cx - 1, cy) == 1) s->sx = 0, s->sy = v;+ else if (gtype(cx - 1, cy) != 1 && s->sx == 0 && s->sy == v) s->sx = -v, s->sy = 0;+ else if (gtype(cx, cy - 1) == 1) s->sx = -v, s->sy = 0;+ else if (gtype(cx, cy - 1) != 1 && s->sx == -v && s->sy == 0) s->sx = 0, s->sy = -v;+ else if (gtype(cx + 1, cy) == 1) s->sx = 0, s->sy = -v;+ else if (gtype(cx + 1, cy) != 1 && s->sx == 0 && s->sy == -v) s->sx = v, s->sy = 0;+}+static void sun_update(sun_t *s) {+ int cx = around(s->x / 20.0), cy = around(s->y / 20.0);+ s->x += s->sx, s->y += s->sy;+ if (cx != s->lastx || cy != s->lasty) {+ s->x = cx * 20, s->y = cy * 20;+ trail_create(s->x + 10, s->y + 10, TR_PIC, SPR_SUNSPIKE, 0.02, 0.5, 0, 0, 0, 0);+ s->lastx = cx, s->lasty = cy;+ sun_speed(s, cx, cy);+ }+ if (s->x >= P.x - 800 && s->x <= P.x + 800 && s->y >= P.y - 600 && s->y <= P.y + 600) {+ cx = around(s->x / 20.0), cy = around(s->y / 20.0);+ if (cx >= P.coordx - 1 && cx <= P.coordx + 1 && cy >= P.coordy - 1 && cy <= P.coordy + 1) player_die();+ }+}++/* ---------------------------------------------------------------- environment/Sphere: the crystals */+int sphere_create(double x, double y, bool collectable) {+ if (n_spheres == MAX_SPHERES) return -1;+ spheres[n_spheres] = (sphere_t){x, y, 0, 0, collectable, true};+ ord_sphere[o_sphere++] = (uint8_t)n_spheres;+ return n_spheres++;+}+static void sphere_update(int i) {+ sphere_t *s = &spheres[i];+ if (++s->ftimer >= 5) { /* (AnimateControl: 11 frames, looping) */+ s->ftimer = 0;+ if (++s->frame >= 11) s->frame = 0;+ }+ if (s->collectable && P.x >= s->x - 20 && P.x <= s->x + 20 && P.y >= s->y - 20 && P.y <= s->y + 20) {+ if (remove_from(ord_sphere, &o_sphere, i)) s->alive = false;+ particles_create(s->x, s->y, 40, 15, 15, 6, false);+ int tx = (int)(s->x / 20), ty = (int)(s->y / 20);+ change_tile(tx, ty, 0, false, true, true, true);+ ++collected;+ for (int k = 0; k < CN_CRYSTALS; k++)+ if ((int8_t)cn_crystals[k][0] == level && cn_crystals[k][1] == tx && cn_crystals[k][2] == ty)+ crystals_got[k >> 3] |= (uint8_t)(1 << (k & 7));+ }+}++/* ---------------------------------------------------------------- environment/BigSphere */+static uint8_t big_list[MAX_SPHERES];+static int n_big_list;+void bigsphere_create(int x, int y) {+ big = (bigsphere_t){true, false, x, y + 20, 0.15, 0, 0, 0, 0};+ n_big_list = 0;+ if (collected == 0) collected = 1;+}+static void bigsphere_finish(void) {+ P.stopMovement = false;+ big.finished = true;+ double w = 167 * big.scale, h = 163 * big.scale;+ int x0 = (int)((big.x - w / 2) / 20), y = (int)((big.y - h) / 20) + 1, x = x0;+ for (int r = 0; r < around(h / 20) + 1; r++) {+ for (int c = 0; c < around(w / 2 / 20) + 2; c++) {+ x++;+ int g = gi(x, y);+ if (in_grid(g)) grid[g] = 1 | SOLID;+ }+ x = x0, y++;+ }+ text_create(big.crystals > 20 ? TX_ENDGOOD : TX_ENDBAD, 0, 40, 0.05, false, 0);+}+void bigsphere_update(void) {+ if (++big.ftimer >= 4) {+ big.ftimer = 0;+ if (++big.frame >= 6) big.frame = 0;+ }+ if (!big.finished && P.x < big.x + 250) {+ P.stopMovement = true, P.rotation = 0;+ if (++big.timer >= 10) {+ big.timer = 0;+ if (collected > 0) {+ int s = sphere_create(P.x, P.y, false);+ if (s >= 0 && n_big_list < MAX_SPHERES) big_list[n_big_list++] = (uint8_t)s;+ --collected;+ info_update(true);+ }+ }+ }+ for (int i = 0; i < n_big_list; i++) {+ sphere_t *s = &spheres[big_list[i]];+ s->x = tw(s->x - (s->x - (big.x - 10)) / 10);+ s->y = tw(s->y - (s->y - (big.y - 20)) / 10);+ if (s->x >= big.x - 12 && s->x <= big.x + 12 && s->y >= big.y - 22 && s->y <= big.y + 22) {+ big.scale += 0.02;+ if (big.scale >= 0.5) big.scale = 0.5;+ if (remove_from(ord_sphere, &o_sphere, big_list[i])) s->alive = false;+ particles_create(big.x, big.y, 5, 15, 15, 6, false);+ memmove(big_list + i, big_list + i + 1, (size_t)(n_big_list - i - 1));+ n_big_list--, i--;+ ++big.crystals;+ if (n_big_list <= 0) bigsphere_finish();+ }+ }+}++/* ---------------------------------------------------------------- environment/Laser */+void laser_create(int fx, int fy, int tx, int ty, int ms) {+ if (n_lasers == MAX_LASERS) return;+ laser_t *l = &lasers[n_lasers];+ memset(l, 0, sizeof *l);+ l->fx = fx, l->fy = fy, l->tx = tx, l->ty = ty;+ if (fx - tx > 0) l->g1 = 12, l->g2 = 11, l->go1 = 21, l->go2 = 22, l->lg = 15;+ else if (fx - tx < 0) l->g1 = 11, l->g2 = 12, l->go1 = 21, l->go2 = 22, l->lg = 15;+ else if (fy - ty > 0) l->g1 = 13, l->g2 = 10, l->go1 = 20, l->go2 = 23, l->lg = 14;+ else if (fy - ty < 0) l->g1 = 10, l->g2 = 13, l->go1 = 20, l->go2 = 23, l->lg = 14;+ timer_add(ms, T_LASER, n_lasers++, true);+}+void laser_switch(int i) {+ if (i >= n_lasers) return;+ laser_t *l = &lasers[i];+ int x = l->fx, y = l->fy;+ l->on = !l->on;+ for (int k = 0; k < l->tx - l->fx + (l->ty - l->fy) + 1; k++) {+ change_tile(x, y, l->on ? l->lg : 0, true, false, true, true);+ if (x != l->tx) x++;+ else if (y != l->ty) y++;+ }+ change_tile(l->fx, l->fy, l->on ? l->g1 : l->go1, true, false, true, true);+ change_tile(l->tx, l->ty, l->on ? l->g2 : l->go2, true, false, true, true);+}++/* ---------------------------------------------------------------- the update and the reset (EnvironmentManager) */+void env_update(void) {+ for (int i = 0; i < o_dirt; i++) dirt_update(ord_dirt[i]);+ for (int i = 0; i < n_mines; i++) mine_update(&mines[i]);+ for (int i = 0; i < o_crate; i++) crate_update(ord_crate[i]);+ for (int i = 0; i < n_shooters; i++) shooter_update(i);+ for (int i = 0; i < o_sphere; i++) sphere_update(ord_sphere[i]);+ for (int i = 0; i < o_fall; i++) fall_update(ord_fall[i]);+ for (int i = 0; i < n_suns; i++) sun_update(&suns[i]);+ if (big.on) bigsphere_update();+}+void env_reset(void) {+ for (int i = 0; i < n_resetters; i++) {+ int k = resetters[i] >> 8, j = resetters[i] & 255;+ if (k == R_MINE) mine_reset(&mines[j]);+ else if (k == R_DIRT) dirt_reset(j);+ else if (k == R_CRATE) crate_reset(j);+ else fall_reset(j);+ }+}+/* what draw.c shows: the things still in their Vectors */+int env_dirts(const uint8_t **o) { return *o = ord_dirt, o_dirt; }+int env_crates(const uint8_t **o) { return *o = ord_crate, o_crate; }+int env_falls(const uint8_t **o) { return *o = ord_fall, o_fall; }+int env_buttons(const uint8_t **o) { return *o = ord_button, o_button; }+int env_spheres(const uint8_t **o) { return *o = ord_sphere, o_sphere; }+int env_bombs(const bomb_t **b) { return *b = bombs, n_bombs; }++/* ---------------------------------------------------------------- environment/Bomb */+static void bomb_new(double x, double y) {+ if (n_bombs == MAX_BOMBS) return;+ bomb_t *b = &bombs[n_bombs++];+ b->x = x, b->y = y, b->speedx = 2 + rnd01() * (16 - 2), b->gravity = 4 + rnd01() * (10 - 4), b->rot = 0, b->on = true;+}+static void bomb_explode(bomb_t *b) {+ b->on = false;+ if (b->x >= P.x - 40 && b->x <= P.x + 40 && b->y >= P.y - 40 && b->y <= P.y + 40) player_die();+ particles_create(b->x, b->y, 20, 15, 15, 1, false);+}+static void bomb_update(bomb_t *b) {+ double r = 2 + rnd01() * 4;+ trail_create(b->x + r + 0.5, b->y + r + 0.5, TR_CIRCLE_RED, 0, 0.04, 0.8, 0, 0, 0, r);+ b->x = tw(b->x - b->speedx), b->y = tw(b->y - b->gravity);+ b->gravity -= 0.25, b->speedx *= 0.99;+ b->rot -= b->speedx + b->gravity;+ int cx = (int)(b->x / 20), cy = (int)(b->y / 20);+ if (!node_walkable(collide_right(cx, cy)) || !node_walkable(collide_left(cx, cy)) ||+ !node_walkable(collide_down(cx, cy - 1)) || !node_walkable(collide_up(cx, cy))) {+ bomb_explode(b);+ return;+ }+ if (!P.dead && cx == P.coordx && cy == P.coordy) {+ bomb_explode(b);+ player_die();+ }+}++/* ---------------------------------------------------------------- entities/Boss */+const int16_t boss_points[BOSS_POINTS * 2] = {+ -10, 40, 0, 80, 10, 40, 0, 0, 0, 80, 15, 120, 20, 80, 10, 40, 15, 120, 40, 140, 42, 120, 20, 80, 40, 140, 80, 135, 65,+ 110, 42, 120, 80, 135, 110, 110, 95, 90, 65, 110, 110, 110, 120, 65, 110, 40, 95, 90, 120, 65, 125, 25, 110, 0, 110,+ 40, 125, 25, 115, -25, 105, -45, 110, 0, 105, -45, 70, -55, 70, -30, 110, 0, 70, -55, 25, -50, 40, -30, 70, -30, 25,+ -50, 0, 0, 10, 40, 40, -30, 20, 80, 40, 50, 40, 50, 25, 8, 42, 120, 55, 80, 40, 50, 40, 50, 65, 110, 55, 80, 55, 80,+ 55, 80, 95, 90, 70, 60, 55, 80, 55, 80, 110, 40, 85, 45, 55, 80, 55, 80, 110, 0, 85, 20, 85, 45, 85, 45, 70, -30, 65,+ -10, 85, 20, 85, 20, 40, -30, 55, 10, 65, -10, 65, -10, 40, 50, 55, 10, 55, 10, 55, 10, 55, 10, 70, 60, 70, 60, 70, 60,+ 55, 10, 85, 45, 85, 45, 85, 45, 40, -30, 22, 8, 40, 50, 56, 16, 110, 40, 85, 45, 85, 20, 110, 0};+static int boss_jx[BOSS_POINTS], boss_jy[BOSS_POINTS];+static double boss_w, boss_h; /* base.width, base.height */+static int getrand(void) { return (int)(rnd01() * boss.lineoffset - rnd01() * boss.lineoffset); }+static void boss_draw(void) { /* drawboss(): the points' wobble this frame, and the shape's size */+ int r[4] = {getrand(), getrand(), getrand(), getrand()};+ int x0 = 0, x1 = 0, y0 = 0, y1 = 0;+ for (int k = 0; k < BOSS_POINTS; k++) {+ int a = (int)(rnd01() * 3), b = (int)(rnd01() * 3);+ boss_jx[k] = boss_points[k * 2] + r[a], boss_jy[k] = boss_points[k * 2 + 1] + r[b];+ if (boss_jx[k] < x0) x0 = boss_jx[k];+ if (boss_jx[k] > x1) x1 = boss_jx[k];+ if (boss_jy[k] < y0) y0 = boss_jy[k];+ if (boss_jy[k] > y1) y1 = boss_jy[k];+ }+ boss_w = x1 - x0 + 1, boss_h = y1 - y0 + 1;+ boss.jit[0] = x0, boss.jit[1] = y0; /* (the shape's corner: base.x is -width/2 from it) */+}+void boss_draw_points(int *xy) {+ for (int k = 0; k < BOSS_POINTS; k++) xy[k * 2] = boss_jx[k], xy[k * 2 + 1] = boss_jy[k];+}+double boss_csx_get(void) { return boss_csx; }+double boss_width(void) { return boss_w; }+double boss_height(void) { return boss_h; }+void boss_create(void) {+ boss_csx = -1;+ boss_draw();+ boss.x = tw(3600 + boss_w / 2), boss.y = tw(550 + boss_h * boss.sy / 2);+ boss.created = true, boss.intro = true, boss.defeated = false, boss.particletimer = boss.deftimer = 0;+}+void boss_remove(void) {+ if (boss.created) {+ boss.id = 0;+ boss.x = tw(3600 + boss_w / 2), boss.y = tw(650 + boss_h / 2);+ boss.created = false;+ boss.sx = boss.sy = 1, boss.alpha = 1;+ n_bombs = 0;+ for (int i = 0; i < MAX_BULLETS; i++)+ if (bullets[i].owner < 0) bullets[i].on = false;+ }+}+static void boss_hit(void) {+ ++boss.id;+ if (boss.id == 1) boss.lineoffset = 7, boss_csx = -1.1, boss.sy = 1.1;+ else if (boss.id == 2) boss.lineoffset = 6, boss_csx = -1.4, boss.sy = 1.4, boss.homing = true;+ else if (boss.id == 3) boss.lineoffset = 10, boss_csx = -2, boss.sy = 2, boss.homing = true;+}+static void boss_defeat(void) {+ if (boss.id >= 4) {+ particles_create(boss.x, boss.y, 10, 25, 25, 1, false);+ boss.defeated = true, boss.particletimer = boss.deftimer = 0;+ }+}+void boss_update(void) {+ if (!boss.invincible && !boss.defeated) {+ if (boss.x >= P.x - boss_w / 2 && boss.x <= P.x + boss_w / 2 && boss.y >= P.y - boss_h && boss.y <= P.y + boss_h) {+ if (P.y < boss.y - boss_h / 1.5) {+ P.gravity = -40, P.speedx = -P.maxspeedx;+ boss_hit();+ boss.destx = 3550, boss.desty = 600, boss.speed = 15, boss.routineid = 3, boss.ptimer = 0, boss.prate = 100,+ boss.attackid = 0, boss.invincible = true, boss.invincibletimer = 0;+ boss_defeat();+ for (int k = 0; k < 4; k++)+ particles_create(boss.x + rnd01() * 100 - rnd01() * 100, boss.y + rnd01() * 100 - rnd01() * 100, 5, 25, 25,+ 1 + (int)(rnd01() * 6), false);+ } else {+ player_die();+ boss.invincible = true, boss.invincibletimer = 0;+ }+ }+ }+ if (boss.intro) {+ boss.x = tw(boss.x - 1);+ if (boss.x <= 3250) {+ boss.x = 3250, boss.intro = false;+ P.stopMovement = false;+ text_create(TX_BOSS, 0, 20, 0.1, true, 220);+ boss.attackid = boss.routineid = boss.weapon = boss.ptimer = 0, boss.prate = 50, boss.destx = 3350, boss.desty = 600;+ boss.bullettimer = boss.bulletsshot = 0, boss.homing = false, boss.speed = 100, boss.invincible = false,+ boss.invincibletimer = 0;+ }+ } else if (boss.defeated) {+ if (boss.alpha > 0) {+ if (++boss.particletimer >= 5) {+ boss.particletimer = 0;+ particles_create(boss.x + rnd01() * 100 - rnd01() * 100, boss.y + rnd01() * 100 - rnd01() * 100, 10, 25, 25,+ 1 + (int)(rnd01() * 6), false);+ }+ boss.alpha -= 0.001;+ }+ if (++boss.deftimer >= 400) {+ boss_remove();+ boss.deftimer = 0;+ if (!P.dead) {+ playerpoints[8] = 29;+ map_move(3);+ }+ }+ } else {+ boss.x = tw(boss.x - (boss.x - boss.destx) / boss.speed);+ boss.y = tw(boss.y - (boss.y - boss.desty) / boss.speed);+ if (boss.attackid == 1 && ++boss.bullettimer >= boss.bulletrate && boss.bulletsshot < boss.maxbullets) {+ boss.bullettimer = 0, ++boss.bulletsshot;+ if (boss.weapon == 1) bullet_new(boss.x, boss.y - 100, -1, boss.homing);+ else bomb_new(boss.x, boss.y - 100);+ }+ if (++boss.ptimer >= boss.prate) {+ boss.ptimer = 0;+ ++boss.routineid;+ int id = boss.id;+ if (boss.routineid == 1) {+ boss.bulletsshot = 0, boss.attackid = 1, boss.prate = 300, boss.bulletrate = 50;+ if (id == 2) boss.bulletrate = 100, boss.prate = 320;+ else if (id == 3) boss.bulletrate = 80, boss.prate = 550;+ boss.maxbullets = id == 2 ? 1 : id == 3 ? 3 : 4;+ boss.weapon = 1, boss.speed = 80, boss.destx = 3350, boss.desty = 600;+ } else if (boss.routineid == 2) {+ boss.attackid = 1, boss.bulletsshot = 0, boss.maxbullets = id == 2 ? 8 : id == 3 ? 15 : 5;+ boss.prate = 150, boss.bulletrate = 25;+ if (id == 2) boss.bulletrate = 20;+ else if (id == 3) boss.bulletrate = 20, boss.prate = 300;+ boss.speed = 80, boss.destx = 3400, boss.desty = 650, boss.weapon = 2;+ } else if (boss.routineid == 3) {+ boss.attackid = 0, boss.prate = 150, boss.destx = 3300, boss.desty = 800 + id * 50;+ } else if (boss.routineid == 4) {+ boss.attackid = 0, boss.prate = 0;+ boss.routineid = id >= 2 ? 0 : (int)(rnd01() * 2);+ }+ }+ if (++boss.invincibletimer >= 80) boss.invincibletimer = 0, boss.invincible = false;+ for (int i = 0; i < MAX_BULLETS; i++)+ if (bullets[i].on && bullets[i].owner < 0 && bullet_update(&bullets[i])) {+ particles_create(bullets[i].x, bullets[i].y, 2, 10, 10, 3, false);+ bullets[i].on = false;+ }+ for (int i = 0; i < n_bombs; i++) {+ bomb_update(&bombs[i]);+ if (!bombs[i].on) {+ particles_create(bombs[i].x, bombs[i].y, 2, 10, 10, 1, false);+ memmove(&bombs[i], &bombs[i + 1], (size_t)(n_bombs - i - 1) * sizeof bombs[0]);+ n_bombs--, i--;+ }+ }+ }+ boss_draw();+}++/* ---------------------------------------------------------------- effects/Trail */+void trail_create(double x, double y, int kind, int pic, double fade, double alpha, int tint, double rot, int color,+ double r) {+ if (n_trails == MAX_TRAILS) memmove(trails, trails + 1, (MAX_TRAILS - 1) * sizeof trails[0]), n_trails--;+ trail_t *t = &trails[n_trails++];+ memset(t, 0, sizeof *t);+ t->x = x, t->y = y, t->kind = kind, t->pic = pic, t->fade = fade, t->alpha = alpha, t->tint = tint, t->rot = rot;+ t->color = color, t->r = (float)r, t->scale = 1;+ if (kind == TR_CIRCLE_RED) {+ t->sx = rnd01() - rnd01(), t->sy = 2 + rnd01() - rnd01();+ if (currentrotation == 180) t->sy -= 4;+ } else if (kind == TR_DOT) {+ t->sx = rnd01() - rnd01(), t->sy = rnd01() - rnd01();+ }+ if (tint == 2) { /* the cat's colours as they are now */+ double m[3] = {P.tint.r, P.tint.g, P.tint.b};+ uint8_t *o[3] = {&t->tr, &t->tg, &t->tb};+ for (int k = 0; k < 3; k++) *o[k] = (uint8_t)(m[k] * 32 > 255 ? 255 : m[k] * 32);+ }+}+void trails_update(void) {+ for (int i = 0; i < n_trails; i++) {+ trail_t *t = &trails[i];+ if (t->kind != TR_PIC) t->x += t->sx, t->y += t->sy, t->scale -= 0.01;+ t->alpha -= t->fade;+ if (t->alpha <= 0) {+ memmove(&trails[i], &trails[i + 1], (size_t)(n_trails - i - 1) * sizeof trails[0]);+ n_trails--; /* (the next one waits a frame, as in TrailManager) */+ }+ }+}++/* ---------------------------------------------------------------- effects/Particle */+void particles_create(double x, double y, int amount, int sx, int sy, int type, bool parts) {+ static int part_of; /* (which piece of the cat: the original's five, in turn) */+ part_of = 0;+ for (int i = 0; i < amount; i++) {+ particle_t *p = &particles[n_particles++];+ memset(p, 0, sizeof *p);+ p->x = x, p->y = y, p->alpha = 1, p->type = parts ? 0 : type;+ if (parts) {+ extern int cat_parts[5][4];+ p->pic = part_of, p->px0 = cat_parts[part_of][0], p->py0 = cat_parts[part_of][1], p->pw = cat_parts[part_of][2],+ p->ph = cat_parts[part_of][3];+ p->size = p->pw > p->ph ? p->pw : p->ph;+ if (++part_of >= 5) part_of = 0;+ p->delayrate = 100 + (int)(rnd01() * 200);+ } else {+ p->size = type == 2 || type == 6 ? 2 + (int)(rnd01() * 8) : type == 5 ? 2 + (int)(rnd01() * 2) : 2 + (int)(rnd01() * 4);+ p->delayrate = type == 1 ? 100 + (int)(rnd01() * 200) : (int)(rnd01() * 100);+ }+ p->speedx = rnd01() * sx - rnd01() * sx;+ p->gravity = -(rnd01() * sy);+ if (n_particles >= MAX_PARTICLES) {+ memmove(particles, particles + 1, (MAX_PARTICLES - 1) * sizeof particles[0]);+ n_particles--;+ }+ }+}+void particles_update(void) {+ for (int i = 0; i < n_particles; i++) {+ particle_t *p = &particles[i];+ bool gone = false;+ if (++p->delaytimer >= p->delayrate) p->alpha -= 0.05;+ if (p->alpha <= 0) gone = true;+ int cx = (int)(p->x / 20), cy = (int)(p->y / 20);+ if (currentrotation == 0) cy--;+ else if (currentrotation == 90) cx--, cy--;+ else if (currentrotation == -90) cy--;+ p->gravity += 0.5;+ if (p->gravity >= 20) p->gravity = 20;+ if (p->gravity >= 0 && !node_walkable(collide_down(cx, cy))) {+ if (p->speedx == 0 && p->gravity >= 5) p->speedx += rnd01() * 2 - rnd01() * 2;+ p->gravity = -p->gravity / 2;+ if (p->gravity < 0.5 && p->gravity > -0.5) p->gravity = 0;+ p->onground = true;+ } else {+ p->onground = false;+ }+ if (p->speedx > 0 && !node_walkable(collide_right(cx, cy)) && !p->onground) p->speedx = 0;+ if (p->speedx < 0 && !node_walkable(collide_left(cx, cy)) && !p->onground) p->speedx = 0;+ if (p->gravity < 0 && !node_walkable(collide_up(cx, cy))) p->gravity = 0;+ if (p->gravity > 0 && !node_walkable(collide_down(cx, cy))) p->gravity = 0;+ p->rot += p->speedx;+ p->speedx *= 0.98;+ if (p->speedx < 0.5 && p->speedx > -0.5) p->speedx = 0;+ switch (currentrotation) {+ case 0: p->x += p->speedx, p->y += p->gravity; break;+ case 90: p->y -= p->speedx, p->x += p->gravity; break;+ case 180: p->x -= p->speedx, p->y -= p->gravity; break;+ case -90: p->y += p->speedx, p->x -= p->gravity; break;+ }+ if (p->y >= gh * 20 - p->size) gone = true;+ if (gone) {+ memmove(&particles[i], &particles[i + 1], (size_t)(n_particles - i - 1) * sizeof particles[0]);+ n_particles--;+ }+ }+}++/* ---------------------------------------------------------------- tools/text/TextManager, DisplayText */+int text_create(int text, int x, int y, double speed, bool fade, int delay) {+ if (n_texts == MAX_TEXTS) { /* (full: the oldest that is gone, else the oldest) */+ int k = 0;+ for (int i = 0; i < n_texts; i++)+ if (!texts[i].visible) {+ k = i;+ break;+ }+ memmove(&texts[k], &texts[k + 1], (size_t)(n_texts - k - 1) * sizeof texts[0]);+ n_texts--;+ if (afk_text == k) afk_text = -1;+ else if (afk_text > k) afk_text--;+ }+ dtext_t *t = &texts[n_texts];+ memset(t, 0, sizeof *t);+ t->text = text, t->x = x, t->y = y, t->alpha = 1, t->destx = -1, t->visible = true;+ if (text == TX_SPEC2 || text == TX_SPEC3 || text == TX_SPEC4) t->destx = 0;+ t->logo = text == TX_SPEC3;+ if (fade) t->fading = true, t->fadeout = true, t->fadedelay = delay, t->fadespeed = speed;+ else if (speed != 1) t->fadein = true, t->fadespeed = speed, t->alpha = 0, t->fading = true;+ return n_texts++;+}+void text_screenmessage(int first, int count, int delay) {+ text_create(first + (int)(rnd01() * (count - 1)), 0, 40, 0.05, true, delay);+}+void texts_update(void) {+ for (int i = 0; i < n_texts; i++) {+ dtext_t *t = &texts[i];+ if (t->destx != -1) {+ t->x = tw(t->x + (t->destx - t->x) / 25);+ if (t->x >= t->destx - 1 && t->x <= t->destx + 1) t->destx = -1;+ }+ if (t->fading) {+ if (++t->fadedelaytimer < t->fadedelay) continue;+ if (t->fadein) {+ t->alpha += t->fadespeed;+ if (t->alpha >= 1) {+ t->alpha = 1, t->fadein = false;+ if (t->doublefade && !t->faded) t->fadeout = true, t->faded = true;+ else t->fading = false;+ }+ } else {+ t->alpha -= t->fadespeed;+ if (t->alpha <= 0) {+ t->alpha = 0, t->visible = false, t->fadeout = false;+ if (t->doublefade && !t->faded) t->fadein = true, t->faded = true;+ else t->fading = false;+ }+ }+ }+ }+}diff --git a/games/catninja/src/game.c b/games/catninja/src/game.cnew file mode 100644index 00000000..0c7e2ff7--- /dev/null+++ b/games/catninja/src/game.c@@ -0,0 +1,1276 @@+/* Cat Ninja's map, cat, camera, timers and level scripts: maps/Map, entities/Player, maps/MapCamera,+ * tools/Time, tools/text/GlitchInterpreter and Main.update, in C. The numbers and the order of things are+ * the original's; where its code would have thrown an error (reading past the map), this reads a wall. */+#include <math.h>+#include <string.h>+#include "cn.h"+#include "inflate.h"++uint8_t grid[CN_MAP_MAX];+uint8_t blood[(CN_MAP_MAX + 7) / 8];+int gw = 50, gh = 50, level = 0, room = 0;+int destrotate, currentrotation;+bool rotating, hallucinate;+static bool hoff, speedup;+cc_t map_tint;+int playerpoints[12];+static int ppx, ppy; /* Map.playerpoint */+static int lastlevel = -1;+static bool savedlevel;+static int savedx, savedy, saveddestrotation;+static double savedworldrotation;+static int mapnode = -3; /* a grid index, or: */+#define NODE_FREE (-1) /* collidenode (walkable) */+#define NODE_FREE2 (-2) /* collidefreenode (walkable) */+static struct {+ int x, y0, y1;+} cps[96];+static int n_cps;+static struct {+ int sx, sy, ex, ey;+} tps[16];+static int n_tps, lastteleport_x, lastteleport_y;+static bool hasmagnets;+static int16_t resetnodes[3 * 128];+static int n_reset;+/* what the levels keep when they are left and come back to (XMLMap.tiles changed by changeTile) */+#define MAX_MODS 640+static struct {+ int8_t lv;+ uint8_t type;+ uint16_t idx;+} mods[MAX_MODS];+static int n_mods;++double world_rot, world_sx = 1, world_sy = 1, screen_x, screen_y;+double fade_alpha = 1;+bool fade_on;+static bool fadingscreen, fadein, doublefade, faded;+static double fadespeed;+static int target_dir = -1; /* the targetfunction: -1 none, else a map change: 0 left 1 right 2 up 3 down 4 none */+static bool target_respawn;+bool pausegame;+bool exitedmap;++player_t P;+int pdeaths, collected;+uint8_t crystals_got[(CN_CRYSTALS + 7) / 8];+int hud_deaths, hud_collected;+static uint32_t hud_timer;+uint32_t game_ms;+static uint32_t game_frames;+uint32_t rng = 1;+bool key_left, key_right, key_up, key_down;+static bool key_jet, pressedkey = true;+int afk_text = -1;+int key_hint_frames;++double rnd01(void) {+ rng ^= rng << 13;+ rng ^= rng >> 17;+ rng ^= rng << 5;+ return (rng >> 8) * (1.0 / 16777216.0);+}+static double tw(double v) { return (double)(int)(v * 20) / 20; } /* a display object's x or y: twips */+static int iabs(int v) { return v < 0 ? -v : v; }++/* ---------------------------------------------------------------- ColourChanger */+void cc_init(cc_t *c, double speed, double max) {+ c->speed = speed, c->max = max, c->r = max, c->g = c->b = 1, c->ra = speed, c->ga = c->ba = 0, c->reversed = false;+}+static void cc_reverse(cc_t *c) {+ if (c->ra > 0) c->ga = c->speed, c->ra = -c->speed, c->ba = 0;+ else if (c->ba > 0) c->ra = c->speed, c->ba = -c->speed, c->ga = 0;+ else if (c->ga > 0) c->ra = 0, c->ba = c->speed, c->ga = -c->speed;+ c->reversed = true;+}+static void cc_revert(cc_t *c) {+ if (c->ra > 0) c->ga = 0, c->ra = -c->speed, c->ba = c->speed;+ else if (c->ba > 0) c->ra = 0, c->ba = -c->speed, c->ga = c->speed;+ else if (c->ga > 0) c->ra = c->speed, c->ba = 0, c->ga = -c->speed;+ c->reversed = false;+}+void cc_update(cc_t *c) {+ c->r += c->ra, c->g += c->ga, c->b += c->ba;+ if (c->r >= c->max) {+ c->r = c->max, c->g = 1;+ c->reversed ? cc_reverse(c) : cc_revert(c);+ } else if (c->b >= c->max) {+ c->r = 1, c->b = c->max;+ c->reversed ? cc_reverse(c) : cc_revert(c);+ } else if (c->g >= c->max) {+ c->g = c->max, c->b = 1;+ c->reversed ? cc_reverse(c) : cc_revert(c);+ }+}++/* ---------------------------------------------------------------- tools/Time */+typedef struct {+ uint32_t start;+ int runat, kind, arg;+ bool repeat;+} tmr_t;+#define MAX_TIMERS 48+static tmr_t tmr[MAX_TIMERS];+static int n_tmr;+int timer_add(int ms, int kind, int arg, bool repeat) {+ if (n_tmr == MAX_TIMERS) return -1;+ tmr[n_tmr] = (tmr_t){game_ms, ms, kind, arg, repeat};+ return n_tmr++;+}+static void timer_splice(int i) {+ memmove(&tmr[i], &tmr[i + 1], (size_t)(n_tmr - i - 1) * sizeof tmr[0]);+ n_tmr--;+}+void timer_remove_kind(int kind) {+ for (int i = 0; i < n_tmr; i++)+ if (tmr[i].kind == kind) {+ timer_splice(i);+ return;+ }+}+static void player_respawn(void);+static void timer_call(int kind, int arg) {+ switch (kind) {+ case T_PAGE: interp(arg, 0, true); break;+ case T_LOOP: interp(arg, 0, true); break;+ case T_LASER: laser_switch(arg); break;+ case T_RESPAWN: player_respawn(); break;+ case T_DIRT: dirt_break(arg); break;+ case T_AFK:+ afk_text = text_create(TX_IDLE0 + (int)(rnd01() * (TX_IDLES - 1)), 0, 40, 0.05, true, 540);+ break;+ }+}+static void timers_update(void) {+ for (int i = 0; i < n_tmr; i++) {+ if ((int)(game_ms - tmr[i].start) >= tmr[i].runat) {+ tmr_t t = tmr[i];+ timer_call(t.kind, t.arg);+ if (n_tmr <= 0) return;+ if (i >= n_tmr) return;+ if (!tmr[i].repeat) timer_splice(i);+ else tmr[i].start = game_ms;+ }+ }+}++/* ---------------------------------------------------------------- the map's tiles */+int walk_at(int x, int y) {+ if (x < 0 || y < 0 || x >= gw || y >= gh) return 0;+ return !(grid[y * gw + x] & SOLID);+}+static bool walkable(int node) { return node < 0 || !(grid[node] & SOLID); }+static int node_type(int node) { return node < 0 ? 0 : TYPE(node); }+static int idx_type(int i) { return i >= 0 && i < gw * gh ? TYPE(i) : 1; } /* (past the map: a wall) */++static void mod_set(int lv, int idx, int type) {+ for (int i = 0; i < n_mods; i++)+ if (mods[i].lv == lv && mods[i].idx == idx) {+ mods[i].type = (uint8_t)type;+ return;+ }+ if (n_mods < MAX_MODS) mods[n_mods++] = (typeof(mods[0])){(int8_t)lv, (uint8_t)type, (uint16_t)idx};+}++void change_tile(int x, int y, int type, bool clear, bool persist, bool reset_node, bool set_walk) {+ (void)clear;+ if (x < 0 || x >= gw || y < 0 || y >= gh) return;+ int i = y * gw + x;+ bool walk = true;+ grid[i] = (uint8_t)((grid[i] & SOLID) | (type & 0x7F));+ if (persist) mod_set(level, i, type);+ blood[i >> 3] &= (uint8_t) ~(1 << (i & 7));+ switch (type) {+ case 1:+ walk = false;+ for (int k = 1; k < gh; k++) {+ if (y - k > 0 && TYPE((y - k) * gw + x) != 79) {+ if (k >= 2 && n_cps < 96) cps[n_cps].x = x, cps[n_cps].y0 = y - k, cps[n_cps].y1 = y - 1, n_cps++;+ break;+ }+ }+ break;+ case 8: case 9: case 45: case 46: {+ extern void mine_create(int x, int y, int g);+ mine_create(x * 20, y * 20, type == 8 ? 0 : type == 9 ? 1 : type == 45 ? 2 : 3);+ break;+ }+ case 16: case 17: case 18: case 19: {+ extern void button_create(int x, int y, int datanum);+ button_create(x * 20, y * 20, type);+ break;+ }+ case 24: case 25: case 26: case 27: walk = true; break;+ case 32:+ if (reset_node && n_reset < 128) resetnodes[n_reset * 3] = (int16_t)x, resetnodes[n_reset * 3 + 1] = (int16_t)y,+ resetnodes[n_reset * 3 + 2] = 32, n_reset++;+ walk = false;+ break;+ case 33: {+ extern void dirt_create(int x, int y);+ dirt_create(x * 20, y * 20);+ walk = false;+ break;+ }+ case 34:+ if (n_screens < MAX_SCREENS) screens[n_screens++] = (screen_t){x * 20, y * 20, -1, 0};+ walk = false;+ break;+ case 35: {+ extern void crate_create(int x, int y);+ walk = false;+ crate_create(x * 20, y * 20);+ break;+ }+ case 36: case 37: case 38: case 39: walk = false; break;+ case 44: case 82: case 83:+ if (reset_node && n_reset < 128) resetnodes[n_reset * 3] = (int16_t)x, resetnodes[n_reset * 3 + 1] = (int16_t)y,+ resetnodes[n_reset * 3 + 2] = (int16_t)type, n_reset++;+ break;+ case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: {+ extern void shooter_create(int x, int y, int o, bool homing);+ shooter_create(x * 20, y * 20, (type - 67) & 3, type >= 71);+ break;+ }+ case 75: case 76: case 77: case 78:+ hasmagnets = true;+ walk = false;+ break;+ case 81: {+ for (int k = 0; k < CN_CRYSTALS; k++)+ if ((int8_t)cn_crystals[k][0] == level && cn_crystals[k][1] == x && cn_crystals[k][2] == y &&+ (crystals_got[k >> 3] >> (k & 7) & 1)) {+ grid[i] &= 0x7F; /* walkable */+ return;+ }+ sphere_create(x * 20, y * 20, true);+ break;+ }+ case 84: case 85: case 86: case 87: {+ extern void fall_create(int x, int y, int dir);+ fall_create(x * 20, y * 20, type - 84);+ break;+ }+ case 88: {+ extern void sun_create(int x, int y);+ sun_create(x * 20, y * 20);+ break;+ }+ case 90: walk = false; break;+ case 91:+ bigsphere_create(x * 20, y * 20);+ walk = false;+ break;+ }+ if (set_walk) grid[i] = (uint8_t)((grid[i] & 0x7F) | (walk ? 0 : SOLID));+}++static void hallucinate_off(bool now) {+ if (hallucinate) {+ if (now) hoff = false, world_sx = world_sy = 1, world_rot = 0;+ else hoff = true;+ hallucinate = false;+ map_tint.speed = 0.002;+ }+}+static void speedup_off(void) {+ if (speedup) P.ACCELERATION = 1, P.FRICTION = 0.9, P.trailfade = 0.02, speedup = false;+}++/* ---------------------------------------------------------------- maps/MapCamera */+static int cam_destx, cam_desty, cam_speed = 99;+static bool cam_moving;+bool cam_paused;+#define HALF_W 320 /* the calculator shows 640 x 480 of the original's pixels about the middle */+#define HALF_H 240+static void cam_move(int px, int py, bool now, int speed, bool locked) {+ if (locked) return;+ int hx = HALF_W, hy = HALF_H;+ if (world_rot == 90 || world_rot == -90) hx = HALF_H, hy = HALF_W;+ int mw = gw * 20, mh = gh * 20;+ if (px - hx <= 0) px = hx;+ else if (px + hx >= mw) px = mw - hx;+ if (py - hy <= 0) py = hy;+ else if (py + hy >= mh) py = mh - hy;+ if (now) screen_x = -px, screen_y = -py;+ else cam_destx = -px, cam_desty = -py;+ if (screen_x != cam_destx || screen_y != cam_desty) cam_moving = true;+ cam_speed = speed;+}+static void cam_update(void) {+ if (cam_moving && !cam_paused) {+ if (screen_x >= cam_destx - 1 && screen_x <= cam_destx + 1 && screen_y >= cam_desty - 1 && screen_y <= cam_desty + 1) {+ screen_x = cam_destx, screen_y = cam_desty, cam_moving = false;+ return;+ }+ double d = (screen_x >= cam_destx - 10 && screen_x <= cam_destx + 10 && screen_y >= cam_desty - 10 &&+ screen_y <= cam_desty + 10)+ ? cam_speed / 2+ : cam_speed;+ screen_x = tw(screen_x + (cam_destx - screen_x) / d);+ screen_y = tw(screen_y + (cam_desty - screen_y) / d);+ }+}++/* ---------------------------------------------------------------- tools/ShakeScreen */+static bool shaking;+static int shake_len, shake_pow, shake_t, shake_ox, shake_oy;+void shake(int power, int length) {+ shaking = true, shake_pow = power, shake_len = length, shake_t = 0, shake_ox = (int)P.x, shake_oy = (int)P.y;+}+static void shake_update(void) {+ if (shaking && !cam_paused) {+ int dx = (int)(rnd01() * shake_pow - rnd01() * shake_pow);+ int dy = (int)(rnd01() * shake_pow - rnd01() * shake_pow);+ if (++shake_t >= shake_len) shake_t = 0, shaking = false, cam_move(shake_ox, shake_oy, false, 15, false);+ screen_x = tw(screen_x + dx), screen_y = tw(screen_y + dy);+ }+}++/* ---------------------------------------------------------------- the rotations */+static void rotate_to(int r) { destrotate = r, rotating = true; }++/* ---------------------------------------------------------------- loading a map (Map.create) */+static void scripts_load(void);+static void player_reset(void);+static void map_remove(void) {+ env_clear();+ n_particles = 0;+ n_texts = 0;+ afk_text = -1;+}+static void map_create(int lv) {+ static uint8_t tables[3400];+ if (lv >= 30) lv = 0;+ if (lv != level) n_reset = 0;+ const cn_map_t *m = &cn_maps[lv + 1];+ gw = m->w, gh = m->h;+ savedlevel = lastlevel == lv && lv != -1;+ level = lv;+ if (lv != -1) lastlevel = lv;+ if (hallucinate) hallucinate_off(true);+ if (speedup) speedup_off();+ n_cps = n_tps = n_reset = 0;+ env_clear();+ P.hasJetPack = P.usingjetpack = false; /* jetpackOff */+ hasmagnets = false;+ np_inflate(grid, (uint32_t)(gw * gh), cn_map_z + m->at, m->len, (np_inflate_tables_t *)tables);+ for (int i = 0; i < n_mods; i++)+ if (mods[i].lv == lv && mods[i].idx < gw * gh) grid[mods[i].idx] = mods[i].type;+ memset(blood, 0, sizeof blood);+ for (int k = 0; k < 12; k++) playerpoints[k] = m->marks[k];+ for (int y = 0; y < gh; y++)+ for (int x = 0; x < gw; x++) {+ int t = grid[y * gw + x];+ grid[y * gw + x] = 0;+ change_tile(x, y, t, false, false, true, true);+ }+ if (m->sx || m->sy) ppx = m->sx * 20, ppy = m->sy * 20;+ else ppx = playerpoints[0] * 20, ppy = playerpoints[1] * 20;+ if (savedlevel) ppx = savedx, ppy = savedy;+ cam_move(ppx, ppy, true, 15, false);+ room = 0;+ scripts_load();+ if (room != 1) rotate_to(0);+}++static void update_level(int dir, bool respawn) {+ fadingscreen = true, doublefade = true, fadein = true, fade_on = true, fadespeed = 0.08, pausegame = true, faded = false;+ target_dir = dir, target_respawn = respawn;+}+static void player_respawngame(void);+static void target_run(void) {+ int dir = target_dir;+ target_dir = -1;+ pausegame = false;+ map_remove();+ map_create(level);+ if (exitedmap && level == -1) {+ playerpoints[6] = 140, playerpoints[7] = 15, playerpoints[5] = lastlevel;+ exitedmap = false;+ } else if (!exitedmap && level == -1) {+ lastlevel = -1, savedlevel = false, playerpoints[5] = 0;+ }+ if (dir == 1) ppx = playerpoints[0] * 20, ppy = playerpoints[1] * 20;+ else if (dir == 0) ppx = playerpoints[3] * 20, ppy = playerpoints[4] * 20;+ if (dir == 2) ppx = playerpoints[9] * 20, ppy = playerpoints[10] * 20;+ else if (dir == 3) ppx = playerpoints[6] * 20, ppy = playerpoints[7] * 20;+ if (savedlevel) {+ ppx = savedx, ppy = savedy;+ destrotate = currentrotation = saveddestrotation;+ world_rot = savedworldrotation, P.rotation = savedworldrotation;+ rotating = false;+ }+ cam_move(ppx, ppy, true, 15, false);+ player_reset();+ if (target_respawn) player_respawngame();+ key_hint_frames = 300;+}+static void goto_level(int lv, bool respawn) {+ if (lv != level) level = lv, update_level(4, respawn);+}+void map_move(int dir) {+ static const int8_t at[4] = {2, 5, 11, 8};+ int d = playerpoints[at[dir]];+ if (d != 0) level = d;+ else level += dir == 0 || dir == 2 ? -1 : 1;+ update_level(dir, false);+}++/* ---------------------------------------------------------------- Map's collisions (the cat's top left tile) */+static int collision_right(int x, int y) {+ if (y >= 0 && y < gh - 1 && x >= 0 && x < gw - 1) {+ mapnode = y * gw + x + 1;+ if (!walkable(mapnode)) return mapnode;+ }+ return NODE_FREE;+}+static int collision_left(int x, int y) {+ if (y >= 0 && y < gh - 1 && x >= 0 && x < gw - 1) {+ mapnode = y * gw + x;+ if (!walkable(mapnode)) return mapnode;+ }+ return NODE_FREE;+}+static int collision_down(int x, int y) {+ if (y >= 0 && y < gh - 1 && x >= 0 && x < gw - 1) {+ mapnode = (y + 1) * gw + x;+ if (!walkable(mapnode)) return mapnode;+ }+ return NODE_FREE;+}+#define collision_up collision_left+int collide_down(int x, int y) {+ switch (currentrotation) {+ case 0:+ if (collision_left(x, y) == NODE_FREE && !walkable(collision_down(x, y))) return mapnode;+ if (collision_right(x, y) == NODE_FREE && !walkable(collision_down(x + 1, y))) return mapnode;+ break;+ case 90:+ if (collision_up(x, y) == NODE_FREE && !walkable(collision_right(x, y))) return mapnode;+ if (collision_down(x, y) == NODE_FREE && !walkable(collision_right(x, y + 1))) return mapnode;+ break;+ case 180:+ if (collision_left(x, y + 1) == NODE_FREE && !walkable(collision_down(x, y - 1))) return mapnode;+ if (collision_right(x, y + 1) == NODE_FREE && !walkable(collision_down(x + 1, y - 1))) return mapnode;+ break;+ case -90:+ if (collision_up(x + 1, y) == NODE_FREE && !walkable(collision_left(x, y))) return mapnode;+ if (collision_down(x + 1, y) == NODE_FREE && !walkable(collision_left(x, y + 1))) return mapnode;+ break;+ }+ return NODE_FREE2;+}+int collide_right(int x, int y) {+ switch (currentrotation) {+ case 0: if (!walkable(collision_right(x, y))) return mapnode; break;+ case 90: if (!walkable(collision_up(x, y))) return mapnode; break;+ case 180: if (!walkable(collision_left(x, y + 1))) return mapnode; break;+ case -90: if (!walkable(collision_down(x + 1, y))) return mapnode; break;+ }+ return NODE_FREE2;+}+int collide_left(int x, int y) {+ switch (currentrotation) {+ case 0: if (!walkable(collision_left(x, y))) return mapnode; break;+ case 90: if (!walkable(collision_down(x, y))) return mapnode; break;+ case 180: if (!walkable(collision_right(x, y + 1))) return mapnode; break;+ case -90: if (!walkable(collision_up(x + 1, y))) return mapnode; break;+ }+ return NODE_FREE2;+}+static bool grid_solid(int i) { return i >= 0 && i < gw * gh ? (grid[i] & SOLID) != 0 : true; }+int collide_up(int x, int y) {+ switch (currentrotation) {+ case 0:+ if ((walkable(collision_down(x, y)) && !walkable(collision_up(x, y))) ||+ (y >= 0 && y < gh - 1 && grid_solid(y * gw + x + 1) && !walkable(collision_up(x, y))))+ return mapnode;+ break;+ case 90:+ if ((collision_right(x, y) == NODE_FREE && !walkable(collision_left(x, y))) ||+ (y >= 0 && y < gh - 1 && grid_solid((y + 1) * gw + x) && !walkable(collision_left(x, y))))+ return mapnode;+ break;+ case 180:+ if ((walkable(collision_up(x, y)) && !walkable(collision_down(x, y))) ||+ (y >= 0 && y < gh - 1 && grid_solid((y + 1) * gw + x + 1) && !walkable(collision_down(x, y))))+ return mapnode;+ break;+ case -90:+ if ((collision_left(x, y) == NODE_FREE && !walkable(collision_right(x, y))) ||+ (y >= 0 && y < gh - 1 && grid_solid((y + 1) * gw + x + 1) && !walkable(collision_right(x, y))))+ return mapnode;+ break;+ }+ return NODE_FREE2;+}+bool node_walkable(int node) { return walkable(node); }++/* ---------------------------------------------------------------- Map: what the cat touches */+static void pull(int dir, double p) {+ int r = currentrotation;+ if (dir == 0) {+ if (r == 0) P.speedx += p; else if (r == 90) P.gravity += p; else if (r == 180) P.speedx -= p; else if (r == -90) P.gravity -= p;+ } else if (dir == 1) {+ if (r == 0) P.speedx -= p; else if (r == 90) P.gravity -= p; else if (r == 180) P.speedx += p; else if (r == -90) P.gravity += p;+ } else if (dir == 2) {+ if (r == 0) P.gravity += p; else if (r == 90) P.speedx += p; else if (r == 180) P.gravity -= p; else if (r == -90) P.speedx += p;+ } else if (dir == 3) {+ P.maxgravity = 15, P.maxspeedx = 15;+ if (r == 0) P.gravity -= p; else if (r == 90) P.speedx += p; else if (r == 180) P.gravity += p; else if (r == -90) P.speedx -= p;+ }+}+static void magnet_collision(int x, int y, int dx, int dy, int dir) {+ for (;;) {+ int i = y * gw + x;+ int t = idx_type(i);+ bool w = i >= 0 && i < gw * gh ? !(grid[i] & SOLID) : false;+ x += dx, y += dy;+ if (x < 0 || x >= gw || y < 0 || y >= gh) break;+ if (t >= 75 && t <= 78) {+ if ((t == 75 && dy == -1) || (t == 76 && dx == 1) || (t == 77 && dx == -1) || (t == 78 && dy == 1)) {+ pull(dir, 0.8);+ return;+ }+ }+ if (!w) return;+ }+}+static void edit_checkpoint(int x, int y) {+ change_tile(x, y, 80, false, false, true, true);+ P.spawnx = P.coordx * 20, P.spawny = P.coordy * 20, P.spawnrotation = destrotate, P.spawnlevel = level;+ particles_create(x * 20, y * 20, 2, 20, 15, 2, false);+ mod_set(level, y * gw + x, 80);+ shake(6, 8);+}+static void teleport_check(int x, int y) {+ if (P.speedx >= -0.5 && P.speedx <= 0.5 && (x != lastteleport_x || y != lastteleport_y)) {+ for (int k = 0; k < n_tps; k++)+ if (x == tps[k].sx && y == tps[k].sy) {+ P.x = tps[k].ex * 20, P.y = tps[k].ey * 20, P.speedx = 0;+ P.coordx = (int)((P.x - OFFX) / 20), P.coordy = (int)((P.y - OFFY) / 20);+ lastteleport_x = tps[k].ex, lastteleport_y = tps[k].ey;+ return;+ }+ }+}+static void range_collision(int x, int y) {+ if (x < 0 || x >= gw || y < 0 || y >= gh) return;+ int t = TYPE(y * gw + x);+ if (t >= 63 && t <= 66) teleport_check(x, y);+}+static void handle_collision(int x, int y) {+ if (x < 0 || x >= gw || y < 0 || y >= gh) return;+ int i = y * gw + x, t = TYPE(i);+ if ((t < 63 || t > 66) && (x != lastteleport_x || y != lastteleport_y)) lastteleport_x = x, lastteleport_y = y;+ switch (t) {+ case 0:+ if (hasmagnets) {+ magnet_collision(x, y, 1, 0, 0);+ magnet_collision(x, y, -1, 0, 1);+ magnet_collision(x, y, 0, 1, 2);+ magnet_collision(x, y, 0, -1, 3);+ }+ break;+ case 2: case 5: case 6: case 7:+ blood[i >> 3] |= (uint8_t)(1 << (i & 7));+ player_die();+ break;+ case 3: player_die(); break;+ case 24: currentrotation = destrotate = 0; break;+ case 25: currentrotation = destrotate = -90; break;+ case 26: currentrotation = destrotate = 90; break;+ case 27: currentrotation = destrotate = 180; break;+ case 40: if (destrotate != 0) rotate_to(0); break;+ case 41: if (destrotate != -90) rotate_to(-90); break;+ case 42: if (destrotate != 90) rotate_to(90); break;+ case 43: if (destrotate != 180) rotate_to(180); break;+ case 44:+ P.hasJetPack = true; /* jetpackOn */+ change_tile(x, y, 0, true, false, true, true);+ key_hint_frames = 300;+ break;+ case 51: pull(3, 0.8); break;+ case 52: pull(0, 0.8); break;+ case 53: pull(1, 0.8); break;+ case 54: pull(2, 0.8); break;+ case 59: case 60: case 61: case 62: P.gravity = -20, P.doublejump = true; break;+ case 79:+ for (int k = 0; k < n_cps; k++)+ for (int a = cps[k].y0; a < cps[k].y1; a++)+ if (y >= cps[k].y0 && y <= cps[k].y1) edit_checkpoint(cps[k].x, a + 1);+ break;+ case 82:+ change_tile(x, y, 0, true, false, true, true);+ speedup = true, P.ACCELERATION = 5, P.FRICTION = 0.94, P.trailfade = 0.01;+ break;+ case 83:+ change_tile(x, y, 0, true, false, true, true);+ hallucinate = true, map_tint.speed = 0.02;+ break;+ }+ if (t >= 11 && t <= 15) player_die();+}++/* ---------------------------------------------------------------- entities/Player */+static void anim_frame(void) {+ static const uint8_t frames[2][2] = {{SPR_CAT_IDLE, SPR_CAT_IDLE2}, {SPR_CAT_WALK1, SPR_CAT_WALK2}};+ P.pic = frames[P.a_state][P.a_frame];+}+static void anim_update(void) {+ if (P.a_paused) return;+ if (++P.a_timer >= P.a_speed) {+ anim_frame();+ if (++P.a_frame >= 2) P.a_frame = 0;+ P.a_timer = 0;+ }+}+static void anim_play(void) { P.a_paused = false, anim_frame(); }+static void anim_pause(void) { P.a_paused = true; }+static void updatecoords(void) { P.coordx = (int)((P.x - OFFX) / 20), P.coordy = (int)((P.y - OFFY) / 20); }++static void player_reset(void) {+ P.dead = false, P.forceSlam = false;+ P.x = ppx + OFFX, P.y = ppy + OFFY;+ cam_move((int)P.x, (int)P.y, false, 15, false);+ P.on_stage = true;+}+static void player_create(void) {+ memset(&P, 0, sizeof P);+ P.pic = SPR_CAT_IDLE, P.scaleX = 1;+ P.MAXSPEED = 6, P.ACCELERATION = 1, P.FRICTION = 0.9, P.trailfade = 0.02, P.onground = true;+ P.jet_visible = true;+ player_reset();+ P.spawnx = (int)P.x, P.spawny = (int)P.y, P.spawnlevel = level;+ cc_init(&P.tint, 0.01, 2);+ P.a_speed = 8;+}++static void slam(void) {+ bool broke = false;+ int t = 0;+ for (int k = 0; k < 4; k++) {+ if (currentrotation == 0) t = idx_type((P.coordy + 2) * gw + (P.coordx + (k - 2)));+ if (t == 32 || t == 35) {+ if (t == 32) {+ change_tile(P.coordx + (k - 2), P.coordy + 2, 0, false, false, true, true);+ particles_create(P.x, P.y, 6, 10, 10, 5, false);+ broke = true;+ }+ }+ }+ if (broke) {+ P.forceSlam = true, P.gravity = 15;+ P.coordy = (int)((P.y - OFFY) / 20);+ slam();+ }+ if (P.gravity <= 10) return;+ shake((int)(P.gravity - 8), 15);+ particles_create(P.x, P.y, (int)(P.gravity - 8), 6, 12, 3, false);+ env_slam();+}++static void walljump(bool jump) {+ if (P.coordy >= 0 && P.coordy < gh) {+ int r = currentrotation;+ if (P.speedx <= 0 && !P.onground) {+ if ((!walkable(collide_left(P.coordx, P.coordy)) && r == 0) ||+ (!walkable(collide_left(P.coordx - 1, P.coordy)) && r == 90) ||+ (!walkable(collide_left(P.coordx, P.coordy)) && r == -90) ||+ (r == 180 && !walkable(collide_left(P.coordx, P.coordy)))) {+ if (node_type(mapnode) != 1 && node_type(mapnode) != 90) return;+ if (jump) P.speedx = 12, P.gravity = -12;+ else if (P.gravity >= 0 && key_left) P.gravity = 2, anim_pause(), P.pic = SPR_CAT_WALLSLIDE, P.hitwall = true;+ }+ }+ if (P.speedx >= 0 && !P.onground) {+ if ((!walkable(collide_right(P.coordx, P.coordy)) && r == 0) ||+ (!walkable(collide_right(P.coordx, P.coordy)) && r == 90) ||+ (!walkable(collide_right(P.coordx, P.coordy)) && r == -90) ||+ (r == 180 && !walkable(collide_right(P.coordx, P.coordy)))) {+ if (node_type(mapnode) != 1 && node_type(mapnode) != 90) return;+ if (jump) P.speedx = -12, P.gravity = -12;+ else if (P.gravity >= 0 && key_right) P.gravity = 2, anim_pause(), P.pic = SPR_CAT_WALLSLIDE, P.hitwall = true;+ }+ }+ }+}++static void player_up(void) {+ if (P.usingjetpack) return;+ updatecoords();+ if (P.onground && !P.stopMovement) P.gravity = -8, P.onground = false;+ if (P.doublejump && P.gravity >= -6 && !P.stopMovement)+ P.gravity = -8, P.onground = false, P.doublejump = false, P.doublefalling = true;+ walljump(true);+}+static void togglejetpack(void) {+ if (P.hasJetPack) {+ if (P.usingjetpack) P.usingjetpack = false;+ else if (!P.rolling) P.usingjetpack = true;+ }+}++static void player_walk(void) {+ anim_update(), anim_play();+ P.a_speed = 12, P.a_state = 1;+ P.x = tw(P.x + (P.stepAmount > 0 ? 1 : -1));+ int cx = (int)((P.x - OFFX) / 20);+ if (P.lastX != cx) {+ P.lastX = cx;+ if (++P.steps >= iabs(P.stepAmount)) {+ P.walkSteps = false, P.steps = 0, P.stepAmount = 0;+ anim_pause();+ P.pic = SPR_CAT_IDLE;+ }+ }+}++static void move_by(double sx, double g) {+ switch (currentrotation) {+ case 0: P.x = tw(P.x + sx), P.y = tw(P.y + g); break;+ case 90: P.y = tw(P.y - sx), P.x = tw(P.x + g); break;+ case 180: P.x = tw(P.x - sx), P.y = tw(P.y - g); break;+ case -90: P.y = tw(P.y + sx), P.x = tw(P.x - g); break;+ }+}++#define FALLSPEED 0.5+static void player_update(void) {+ int r;+ if (P.walkSteps) player_walk();+ if (P.gravity >= P.maxgravity) P.gravity = P.maxgravity;+ else if (P.gravity <= -P.maxgravity) P.gravity = -P.maxgravity;+ if (P.speedx >= P.maxspeedx) P.speedx = P.maxspeedx;+ else if (P.speedx <= -P.maxspeedx) P.speedx = -P.maxspeedx;+ P.maxgravity = 12, P.maxspeedx = 6;+ if (!P.usingjetpack) P.gravity += FALLSPEED;+ if (!P.usingjetpack && key_down && !P.stopMovement && !P.hitwall) {+ P.gravity += FALLSPEED * 2;+ P.maxspeedx = 10, P.FRICTION = 0.94, P.pic = SPR_CAT_ROLL, P.jet_visible = false, P.maxgravity = 15;+ if (P.onground && P.speedx == 0) anim_pause(), P.pic = SPR_CAT_DUCK, P.jet_half = true, P.jet_visible = true;+ } else {+ P.jet_half = false, P.jet_visible = true, P.MAXSPEED = 6, P.FRICTION = 0.9;+ }+ if (P.hasJetPack && P.usingjetpack) {+ if (key_up) P.gravity -= FALLSPEED * 2;+ if (key_down) P.gravity += FALLSPEED * 2;+ if (P.gravity >= P.MAXSPEED) P.gravity = P.MAXSPEED;+ else if (P.gravity <= -P.MAXSPEED) P.gravity = -P.MAXSPEED;+ P.gravity *= P.FRICTION;+ double rr = 2 + rnd01() * 4;+ trail_create(P.x + 5 * P.scaleoffset - 15 + rr + 0.5, P.y - OFFY + rr + 0.5, TR_CIRCLE_RED, 0, P.trailfade, 0.8, 0,+ P.rotation, 0, rr);+ }+ anim_update();+ updatecoords();+ handle_collision((int)(P.x / 20), (int)(P.y / 20));+ if (n_tps) {+ range_collision((int)(P.x / 20) + 1, (int)(P.y / 20));+ range_collision((int)(P.x / 20) - 1, (int)(P.y / 20));+ range_collision((int)(P.x / 20), (int)(P.y / 20));+ }+ cc_update(&P.tint);+ if (key_right && !P.stopMovement) {+ P.speedx += P.ACCELERATION;+ anim_play(), P.a_speed = 8, P.a_state = 1, P.scaleX = 1;+ P.scaleoffset = currentrotation == 180 ? 23 - 20 : 0;+ }+ if (key_left && !P.stopMovement) {+ P.speedx -= P.ACCELERATION;+ anim_play(), P.a_speed = 8, P.a_state = 1, P.scaleX = -1;+ P.scaleoffset = currentrotation == 180 ? 0 : 23 - 20;+ }+ P.speedx *= P.FRICTION;+ bool idle = false;+ if (!key_right && !key_left && P.speedx <= 0.1 && P.speedx >= -0.1 && !P.stopMovement && P.gravity > 0) {+ P.speedx = 0;+ anim_play(), P.a_speed = 25, P.a_state = 0;+ idle = true;+ }+ if (P.gravity < 0 && !P.onground) anim_pause(), P.pic = SPR_CAT_JUMP;+ else if (P.gravity > 0 && !P.onground) anim_play(), P.a_speed = 12, P.a_state = 0;+ bool ceil = false;+ r = currentrotation;+ if (P.gravity < 0 && !walkable(collide_up(P.coordx, P.coordy))) {+ P.gravity = 0;+ if (r == 0) P.y = (P.coordy + 1) * 20 + OFFY;+ else if (r == 90) P.x = (P.coordx + 1) * 20 + OFFX;+ else if (r == 180) P.y = P.coordy * 20 + OFFY;+ else if (r == -90) P.x = P.coordx * 20 + OFFX;+ ceil = true;+ }+ P.hitwall = false;+ if (!ceil && P.speedx > 0 && P.coordx < gw - 1) {+ if (!walkable(collide_right(P.coordx, P.coordy))) {+ P.speedx = 0;+ if (r == 0) P.x = P.coordx * 20 + OFFX + 1;+ else if (r == 90) P.y = (P.coordy + 1) * 20 + OFFY - 1;+ else if (r == 180) P.x = (P.coordx + 1) * 20 + OFFX - 1;+ else if (r == -90) P.y = P.coordy * 20 + OFFY;+ }+ }+ if (!ceil && P.speedx < 0 && P.coordx >= 0) {+ if (!walkable(collide_left(P.coordx, P.coordy))) {+ P.speedx = 0;+ if (r == 0) P.x = (P.coordx + 1) * 20 + OFFX - 1;+ else if (r == 90) P.y = P.coordy * 20 + OFFY;+ else if (r == 180) P.x = P.coordx * 20 + OFFX;+ else if (r == -90) P.y = (P.coordy + 1) * 20 + OFFY - 1;+ }+ }+ walljump(false);+ if (P.coordx < 0) {+ map_move(0);+ return;+ }+ if (P.coordx > gw - 2) {+ map_move(1);+ return;+ }+ if (P.coordy < 0) {+ map_move(2);+ return;+ }+ if (P.coordy > gh - 1) {+ map_move(3);+ return;+ }+ move_by(P.speedx, P.gravity);+ P.onground = false;+ if (P.forceSlam) P.pic = SPR_CAT_ROLL, P.gravity = 10;+ if (P.gravity >= 0) {+ if (!P.onground && P.gravity > 4 && P.coordy > 1 && P.coordy < gh - 2) {+ if (!walkable(collide_down(P.coordx, P.coordy + 1))) {+ if (P.gravity >= 5) slam();+ P.gravity /= 2;+ }+ }+ if (!walkable(collide_down(P.coordx, P.coordy))) {+ if (P.gravity >= 5) slam();+ P.gravity = 0, P.forceSlam = false, P.doublejump = true, P.doublefalling = false;+ r = currentrotation;+ if (r == 0) P.y = P.coordy * 20 + OFFY;+ else if (r == 90) P.x = P.coordx * 20 + OFFX;+ else if (r == 180) P.y = (P.coordy + 1) * 20 + OFFY - 1;+ else if (r == -90) P.x = (P.coordx + 1) * 20 + OFFY;+ P.onground = true;+ }+ }+ if (!P.stopMovement) {+ if ((!P.onground && !P.hitwall && P.doublefalling) || (key_down && P.speedx != 0)) {+ if ((!P.usingjetpack && !P.doublefalling) || !P.hasJetPack) {+ P.pic = SPR_CAT_ROLL;+ P.rotation += P.scaleX == 1 ? 20 : -20;+ if (P.hasJetPack && !P.rolling) P.rotation = -currentrotation;+ if (key_down && P.speedx != 0) P.rolling = true;+ }+ } else {+ P.rotation = -currentrotation, P.rolling = false;+ }+ }+ if (!P.usingjetpack && key_down && !P.stopMovement && !P.hitwall) {+ P.pic = SPR_CAT_ROLL, P.jet_visible = false;+ if (P.onground && P.speedx == 0) anim_pause(), P.pic = SPR_CAT_DUCK, P.jet_half = true, P.jet_visible = true;+ }+ if (!idle && (!P.hasJetPack || !P.usingjetpack))+ trail_create(P.x - OFFX - P.scaleoffset + 11.5, P.y - OFFY + 10, TR_PIC, P.pic, P.trailfade, 0.25, 2, P.rotation, 0, 0);+}++void player_die(void) {+ if (!P.dead) {+ pdeaths++;+ info_update(false);+ text_screenmessage(TX_DIE0, TX_DIES, 90);+ particles_create(P.x, P.y - 20, 6, 15, 15, 0, true);+ particles_create(P.x, P.y - 20, 40, 25, 15, 1, false);+ shake(15, 15);+ P.on_stage = false;+ P.dead = true;+ timer_add(1500, T_RESPAWN, 0, false);+ }+}+static void player_respawn(void) {+ speedup_off();+ if (level == P.spawnlevel) {+ hallucinate_off(false);+ player_respawngame();+ } else {+ hallucinate_off(true);+ goto_level(P.spawnlevel, true);+ }+}+static void level_reset(void) {+ env_reset();+ for (int k = 0; k < n_reset; k++)+ change_tile(resetnodes[k * 3], resetnodes[k * 3 + 1], resetnodes[k * 3 + 2], true, false, false, true);+ P.hasJetPack = P.usingjetpack = false;+}+static void player_respawngame(void) {+ bool other = false;+ interp(0, LB_RESPAWN, false);+ n_particles = 0;+ P.on_stage = true;+ level_reset();+ if (level != P.spawnlevel) other = true;+ shake(15, 15);+ key_right = key_left = key_up = key_down = false;+ if (world_rot == currentrotation) rotate_to(P.spawnrotation);+ else currentrotation = destrotate = P.spawnrotation;+ P.x = P.spawnx + OFFX, P.y = P.spawny + OFFY;+ if (other) cam_move((int)P.x, (int)P.y, true, 15, false);+ else cam_move((int)P.x, (int)P.y, false, 8, true);+ particles_create(P.x, P.y - 20, 10, 20, 15, 2, false);+ P.gravity = 0, P.speedx = 0, P.onground = false, P.dead = false;+}++/* ---------------------------------------------------------------- keys (managers/KeyboardManager) */+void key_press(int k) {+ switch (k) {+ case GK_LEFT: key_left = true; break;+ case GK_RIGHT: key_right = true; break;+ case GK_UP:+ if (!key_up) player_up();+ key_up = true;+ break;+ case GK_DOWN: key_down = true; break;+ case GK_JET: key_jet = true; break;+ case GK_R:+ if (!P.stopMovement) player_die();+ break;+ }+ if (!pressedkey) {+ pressedkey = true;+ timer_remove_kind(T_AFK);+ }+}+void key_release(int k) {+ switch (k) {+ case GK_LEFT: key_left = false; break;+ case GK_RIGHT: key_right = false; break;+ case GK_UP: key_up = false; break;+ case GK_DOWN: key_down = false; break;+ case GK_JET:+ key_jet = false;+ togglejetpack();+ break;+ }+ if (pressedkey) {+ pressedkey = false;+ timer_add(10000, T_AFK, 0, true);+ } else if (afk_text >= 0) {+ if (afk_text < n_texts) {+ memmove(&texts[afk_text], &texts[afk_text + 1], (size_t)(n_texts - afk_text - 1) * sizeof texts[0]);+ n_texts--;+ }+ afk_text = -1;+ }+}++/* ---------------------------------------------------------------- tools/text/GlitchInterpreter */+#define MAX_PAGES 10+#define MAX_LINES 64+static struct {+ int len, line, loopAt;+ uint16_t at[MAX_LINES];+} pages[MAX_PAGES];+static int n_pages;++static void scripts_load(void) {+ int at = cn_maps[level + 1].script;+ n_pages = cn_scripts[at++];+ n_tmr = 0;+ for (int p = 0; p < n_pages && p < MAX_PAGES; p++) {+ int n = cn_scripts[at++];+ pages[p].len = n < MAX_LINES ? n : MAX_LINES, pages[p].line = 0, pages[p].loopAt = 0;+ for (int l = 0; l < n; l++) {+ if (l < MAX_LINES) pages[p].at[l] = (uint16_t)at;+ at += 2 + cn_scripts[at + 1];+ }+ }+ for (int p = 0; p < n_pages; p++) interp(p, 0, true);+}+static bool goto_line(int label, int page, int add) {+ for (int l = pages[page].line; l < pages[page].len; l++)+ if ((cn_scripts[pages[page].at[l]] >> 8) & label) {+ pages[page].line = l + add;+ interp(page, 0, true);+ return true;+ }+ return false;+}+static double value_of(int kind, int v) {+ switch (kind) {+ case 1: return P.x;+ case 2: return P.y;+ case 3: return P.x / 20;+ case 4: return P.y / 20;+ }+ return v;+}+static int as_int(double v) { return (int)v; }++void interp(int page, int go, bool next) {+ int op, line = 0;+ const int16_t *a = 0;+ if (!go) {+ if (!(page < n_pages && pages[page].line < pages[page].len)) return;+ line = pages[page].line;+ const int16_t *s = cn_scripts + pages[page].at[line];+ pages[page].line++;+ op = s[0] & 255;+ a = s + 2;+ } else {+ op = OP_GOTO;+ }+ switch (op) {+ case OP_PAUSECAM: cam_paused = true; break;+ case OP_STOPMOVE: P.stopMovement = true, P.rotation = 0; break;+ case OP_PAUSE: timer_add(a[0], T_PAGE, page, false); return;+ case OP_SETSPAWN: P.spawnx = a[0] * 20, P.spawny = a[1] * 20; break;+ case OP_DIE: player_die(); break;+ case OP_SETROOM: if (a[0] >= 0) room = a[0]; break;+ case OP_FUNCTION: goto_line(LB_ENDFUNCTION, page, 0); return;+ case OP_GOTO: {+ int label = go ? go : a[0] == 3 ? LB_UNLOCKLASER : LB_RESPAWN;+ for (int p = 0; p < 9 && p < n_pages; p++) {+ int keep = pages[p].line;+ pages[p].line = 0;+ if (!goto_line(label, p, 1)) pages[p].line = keep;+ }+ return;+ }+ case OP_SETTYPEPATH: {+ int x = a[0], y = a[1];+ for (int g = 0; g < a[2] - a[0] + (a[3] - a[1]) + 1; g++) {+ change_tile(x, y, a[4], true, a[5] != 0, true, true);+ if (x != a[2]) x++;+ else if (y != a[3]) y++;+ }+ break;+ }+ case OP_SETTYPE: change_tile(a[0], a[1], a[2], true, a[3] != 0, true, true); break;+ case OP_CREATELASER: laser_create(a[0], a[1], a[2], a[3], a[4]); break;+ case OP_MOVECAM: cam_move(a[0], a[1], true, 15, false); break;+ case OP_RESUMECAM: cam_paused = false; break;+ case OP_RESUMEMOVE: P.stopMovement = false; break;+ case OP_WALK:+ if (a[0] == -1) P.walkSteps = true, P.stepAmount = a[1] > 0 ? a[1] + 1 : a[1] - 1;+ break;+ case OP_JUMP: if (a[0] == -1) P.gravity = a[1]; break;+ case OP_SHAKE: shake(a[0], a[1]); break;+ case OP_UPDATESCREEN:+ if (a[0] == -1) {+ for (int k = 0; k < n_screens; k++) screens[k].text = a[1], screens[k].rot = a[2];+ } else if (a[0] >= 0 && a[0] < n_screens) {+ screens[a[0]].text = a[1], screens[a[0]].rot = a[2];+ } else {+ return; /* (the original: an error, and the script stops here) */+ }+ break;+ case OP_RESETLEVEL: {+ level_reset();+ map_remove();+ map_create(level);+ break;+ }+ case OP_TELEPORT:+ if (n_tps < 16) tps[n_tps++] = (typeof(tps[0])){a[0], a[1], a[2], a[3]};+ break;+ case OP_CREATETEXT: text_create(a[0], a[1], a[2], a[3] / 1000.0, a[5] != 0, a[6]); break;+ case OP_RUNSCRIPT: {+ int pg = a[0] - 1;+ if (pg >= 0 && pg < n_pages) pages[pg].line = 0, interp(pg, 0, true);+ break;+ }+ case OP_IF: {+ int n = cn_scripts[pages[page].at[line] + 1] / 6, correct = 0, required = 0;+ bool all = false;+ for (int k = 0; k < n; k++) {+ const int16_t *c = a + k * 6;+ double v1 = value_of(c[0], c[1]), v2 = value_of(c[3], c[4]);+ bool ok = false;+ switch (c[2]) {+ case 0: ok = v1 == v2; break;+ case 1: ok = v1 != v2; break;+ case 2: ok = as_int(v1) > as_int(v2); break;+ case 3: ok = as_int(v1) < as_int(v2); break;+ case 4: ok = as_int(v1) >= as_int(v2); break;+ case 5: ok = as_int(v1) <= as_int(v2); break;+ }+ correct += ok, required++;+ if (c[5] == 1) all = true;+ else if (c[5] == 2) all = false;+ }+ if ((correct >= required && all) || (correct >= 1 && !all)) {+ interp(page, 0, true);+ return;+ }+ goto_line(LB_ELSEIF, page, 0);+ goto_line(LB_ENDIF, page, 0);+ return;+ }+ case OP_ELSE: case OP_ENDIF: interp(page, 0, true); return;+ case OP_EXIT:+ pages[page].line = 999;+ n_tmr = 0;+ return;+ case OP_STARTBOSS: boss_create(); break;+ case OP_REMOVEBOSS: boss_remove(); break;+ case OP_LOOP:+ pages[page].loopAt = line;+ timer_add(a[0], T_LOOP, page, true);+ return;+ case OP_ENDLOOP: pages[page].line = pages[page].loopAt + 1; return;+ }+ if (next) interp(page, 0, true);+}++/* ---------------------------------------------------------------- the frame (Main.update, Map.update) */+void info_update(bool force) {+ if ((int)(game_ms - hud_timer) >= 1000 || force) hud_deaths = pdeaths, hud_collected = collected, hud_timer = game_ms;+}+static double norm_rot(double r) { /* (a display object's rotation: -180 to 180) */+ while (r > 180) r -= 360;+ while (r < -180) r += 360;+ return r;+}+static void map_update(void) {+ cc_update(&map_tint);+ if (rotating) {+ cam_move((int)(P.x + 10), (int)(P.y + 10), false, 6, false);+ world_rot = norm_rot(world_rot + (destrotate - world_rot) / 5);+ P.rotation = -world_rot;+ if (world_rot >= destrotate - 1 && world_rot <= destrotate + 1) {+ world_rot = destrotate, P.rotation = -world_rot, currentrotation = destrotate, rotating = false;+ }+ }+ if (hallucinate) {+ world_rot += rnd01() - rnd01();+ world_sx += (rnd01() - rnd01()) / 50;+ world_sy += (rnd01() - rnd01()) / 50;+ if (world_rot >= 15) world_rot = 15;+ else if (world_rot <= -15) world_rot = -15;+ world_sx = world_sx >= 1.4 ? 1.4 : world_sx <= 0.9 ? 0.9 : world_sx;+ world_sy = world_sy >= 1.4 ? 1.4 : world_sy <= 0.9 ? 0.9 : world_sy;+ } else if (hoff) {+ world_sx += (1 - world_sx) / 50, world_sy += (1 - world_sy) / 50, world_rot += (0.1 - world_rot) / 20;+ if (world_sx >= 0.99 && world_sx <= 1.01 && world_sy >= 0.99 && world_sy <= 1.01 && world_rot <= 0.2 &&+ world_rot >= -0.2)+ hoff = false, world_sx = world_sy = 1, world_rot = 0;+ }+}+extern void texts_update(void);+extern void trails_update(void);+extern void particles_update(void);++void game_step(void) {+ game_frames++;+ game_ms = (uint32_t)((uint64_t)game_frames * 50 / 3); /* (a 60th of a second) */+ if (!pausegame) {+ map_update();+ info_update(false);+ shake_update();+ cam_update();+ texts_update();+ if (boss.created) boss_update();+ if (!rotating) {+ timers_update();+ trails_update();+ env_update();+ particles_update();+ if (!P.dead) player_update();+ }+ cam_move((int)(P.x + 10), (int)(P.y + 10), false, 15, false);+ }+ if (fadingscreen) {+ if (fadein) {+ fade_alpha += fadespeed;+ if (fade_alpha >= 1) {+ fade_alpha = 1, fadein = false;+ if (doublefade && !faded) {+ faded = true;+ if (target_dir >= 0) target_run();+ } else {+ fadingscreen = false;+ }+ }+ } else {+ fade_alpha -= fadespeed;+ if (fade_alpha <= 0) {+ fade_alpha = 0, fade_on = false;+ if (doublefade && !faded) {+ fadein = true, faded = true;+ if (target_dir >= 0) target_run();+ } else {+ fadingscreen = false;+ }+ }+ }+ }+ if (key_hint_frames > 0) key_hint_frames--;+}++/* ---------------------------------------------------------------- starting */+void game_new(void) {+ static bool parts_made;+ (void)parts_made;+ cc_init(&map_tint, 0.002, 1.4);+ n_mods = 0, pdeaths = collected = 0;+ memset(crystals_got, 0, sizeof crystals_got);+ level = 0, lastlevel = -1, exitedmap = false, room = 0;+ world_rot = 0, world_sx = world_sy = 1, destrotate = currentrotation = 0, rotating = false;+ n_tmr = 0;+ fade_alpha = 1, fade_on = true, fadingscreen = true, doublefade = false, fadein = false, faded = false, fadespeed = 0.001;+ pausegame = false, target_dir = -1, pressedkey = true, key_left = key_right = key_up = key_down = key_jet = false;+ memset(&boss, 0, sizeof boss);+ boss.lineoffset = 5, boss.sx = boss.sy = 1, boss.alpha = 1;+ map_create(-1);+ player_create();+ key_hint_frames = 0;+ info_update(true);+}+bool game_can_exit(void) { return level != -1 && !P.dead && !rotating && level <= 27 && target_dir < 0; }+void game_exit_to_menu(void) {+ if (game_can_exit()) {+ exitedmap = true;+ playerpoints[8] = -1;+ savedx = (int)P.x, savedy = (int)P.y, saveddestrotation = destrotate, savedworldrotation = world_rot;+ map_move(3);+ }+}+/* a saved game: the menu, as after its exit button, its way right back to where the cat was */+void game_resume_at(int lvl, int x, int y, int rot) {+ if (lvl < 0 || lvl > 29) return;+ lastlevel = lvl;+ savedx = x, savedy = y, saveddestrotation = rot, savedworldrotation = rot;+ playerpoints[6] = 140, playerpoints[7] = 15, playerpoints[5] = lvl;+ ppx = 140 * 20, ppy = 15 * 20;+ cam_move(ppx, ppy, true, 15, false);+ player_reset();+}+/* the save's view of the game */+int game_mods(const void **m) {+ *m = mods;+ return n_mods;+}+void game_get_resume(int *lvl, int *x, int *y, int *rot) {+ if (game_can_exit() || (level >= 0 && !P.dead && !rotating && target_dir < 0)) {+ *lvl = level, *x = (int)P.x, *y = (int)P.y, *rot = destrotate;+ } else if (level == -1 && lastlevel >= 0 && playerpoints[5] == lastlevel) {+ *lvl = lastlevel, *x = savedx, *y = savedy, *rot = saveddestrotation;+ } else {+ *lvl = P.spawnlevel, *x = P.spawnx + OFFX, *y = P.spawny + OFFY, *rot = P.spawnrotation;+ }+}++/* a level straight away, its start the checkpoint (the tests, and pictures) */+void game_debug_goto(int lv) {+ level = lv;+ target_dir = 4, target_respawn = false;+ target_run();+ fade_alpha = 0, fade_on = false, fadingscreen = false;+ P.spawnx = ppx, P.spawny = ppy, P.spawnlevel = level, P.spawnrotation = destrotate;+}diff --git a/games/catninja/src/icon.png b/games/catninja/src/icon.pngnew file mode 100644index 00000000..ffb8bc41Binary files /dev/null and b/games/catninja/src/icon.png differdiff --git a/games/catninja/src/main.c b/games/catninja/src/main.cnew file mode 100644index 00000000..96d1e25b--- /dev/null+++ b/games/catninja/src/main.c@@ -0,0 +1,291 @@+/* Cat Ninja on the NumWorks calculator: Richman Stewart's Flash platformer (TrackMill, 2013), an app of its own.+ * The game (game.c, env.c) is the original's code in C, drawn with its own pictures and fonts (draw.c,+ * data.c). This file has the keys, the pause, the How to play page and the saves.+ *+ * Keys: Left and Right run, Up, OK or EXE jump (and fly the jetpack up), Down rolls and slams (and flies it+ * down), Shift turns the jetpack on and off (the original's space), Backspace goes back to the checkpoint+ * (its R). Back pauses (Resume, Retry, Title, How to play, Quit game, asked first). Home saves and quits.+ * The game runs at the original's 60 frames a second whatever the calculator manages to draw. */+#include <stddef.h>+#include <string.h>+#include "cn.h"+#include "gfx.h"+#include "plat.h"++#define SAVE_NAME "catninja.sav"+#define COPY_NAME "catninja_saves.py"+#define MAGIC 0x314E5443u /* "CTN1" */+#define VERSION 1++/* ---------------------------------------------------------------- the save */+typedef struct {+ uint32_t magic;+ uint8_t version, flags, collected, pad; /* flags: 1 How to play seen */+ int8_t spawnlevel, level; /* the checkpoint's level; the level the cat was in (-1: none) */+ int16_t spawnx, spawny, spawnrot, x, y, rot;+ uint32_t deaths;+ uint8_t crystals[(CN_CRYSTALS + 7) / 8];+ uint32_t sum;+} save_t;+static save_t sv;++static uint32_t fnv(const void *d, uint32_t n) {+ const uint8_t *p = d;+ uint32_t h = 2166136261u;+ for (uint32_t i = 0; i < n; i++) h = (h ^ p[i]) * 16777619u;+ return h;+}+static bool save_ok(const save_t *s) {+ if (s->magic != MAGIC || s->version != VERSION || s->sum != fnv(s, offsetof(save_t, sum))) return false;+ if (s->spawnlevel < -1 || s->spawnlevel > 29 || s->level < -1 || s->level > 29) return false;+ int r[2] = {s->spawnrot, s->rot};+ for (int k = 0; k < 2; k++)+ if (r[k] != 0 && r[k] != 90 && r[k] != -90 && r[k] != 180) return false;+ if (s->collected > CN_CRYSTALS) return false;+ return true;+}+static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";+#define TAG "#>" SAVE_NAME ":" /* the copy's line */+static const char head[] = "# Cat Ninja's saves: keep this file\n" TAG;+static uint8_t copy[1 + sizeof head + (sizeof(save_t) + 2) / 3 * 4 + 2];++static void sync_out(void) {+ extern void game_get_resume(int *lvl, int *x, int *y, int *rot);+ int lvl, x, y, rot;+ game_get_resume(&lvl, &x, &y, &rot);+ sv.level = (int8_t)lvl, sv.x = (int16_t)x, sv.y = (int16_t)y, sv.rot = (int16_t)rot;+ sv.spawnlevel = (int8_t)P.spawnlevel, sv.spawnx = (int16_t)P.spawnx, sv.spawny = (int16_t)P.spawny;+ sv.spawnrot = (int16_t)P.spawnrotation;+ sv.deaths = (uint32_t)pdeaths, sv.collected = (uint8_t)collected;+ memcpy(sv.crystals, crystals_got, sizeof sv.crystals);+}+static void save(void) {+ sync_out();+ sv.magic = MAGIC, sv.version = VERSION;+ sv.sum = fnv(&sv, offsetof(save_t, sum));+ plat_save(SAVE_NAME, &sv, sizeof sv);+ uint8_t *p = copy;+ const uint8_t *f = (const uint8_t *)&sv;+ *p++ = 0; /* (a script's first byte: not imported) */+ memcpy(p, head, sizeof head - 1), p += sizeof head - 1;+ for (uint32_t i = 0; i < sizeof sv; i += 3, p += 4) {+ uint32_t left = sizeof sv - i;+ uint32_t v = (uint32_t)f[i] << 16 | (left > 1 ? (uint32_t)f[i + 1] << 8 : 0) | (left > 2 ? f[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';+ plat_save(COPY_NAME, copy, (uint32_t)(p - copy));+}+static int b64v(uint8_t c) {+ for (int i = 0; i < 64; i++)+ if ((uint8_t)b64[i] == c) return i;+ return c == '=' ? 0 : -1;+}+static bool copy_read(save_t *out) {+ uint32_t n;+ const uint8_t *c = plat_load(COPY_NAME, &n);+ if (!c) return false;+ const uint32_t hl = sizeof TAG - 1;+ for (uint32_t i = 0; i + hl <= n; i++) {+ if (memcmp(c + i, head + sizeof head - sizeof TAG, hl)) continue;+ const uint8_t *l = c + i + hl;+ uint32_t m = 0;+ while (i + hl + m < n && b64v(l[m]) >= 0 && l[m] != '\n') m++;+ if (m % 4 || m != (sizeof(save_t) + 2) / 3 * 4) return false;+ static uint8_t buf[(sizeof(save_t) + 2) / 3 * 3];+ for (uint32_t k = 0; k < m; k += 4) {+ uint32_t w = (uint32_t)(b64v(l[k]) << 18 | b64v(l[k + 1]) << 12 | b64v(l[k + 2]) << 6 | b64v(l[k + 3]));+ buf[k / 4 * 3] = (uint8_t)(w >> 16), buf[k / 4 * 3 + 1] = (uint8_t)(w >> 8), buf[k / 4 * 3 + 2] = (uint8_t)w;+ }+ memcpy(out, buf, sizeof *out);+ return save_ok(out);+ }+ return false;+}+static void load(void) {+ uint32_t n;+ const uint8_t *d = plat_load(SAVE_NAME, &n);+ static save_t t;+ memset(&sv, 0, sizeof sv);+ sv.level = sv.spawnlevel = -1;+ if (d && n == sizeof t) {+ memcpy(&t, d, sizeof t);+ if (save_ok(&t)) {+ sv = t;+ return;+ }+ }+ if (copy_read(&t)) sv = t;+}+/* the game as the save left it: the title map, the way right leading back to the cat */+static void start_game(void) {+ game_new();+ pdeaths = (int)sv.deaths, collected = sv.collected;+ memcpy(crystals_got, sv.crystals, sizeof crystals_got);+ if (sv.level >= 0) {+ game_resume_at(sv.level, sv.x, sv.y, sv.rot);+ if (sv.spawnlevel >= 0)+ P.spawnlevel = sv.spawnlevel, P.spawnx = sv.spawnx, P.spawny = sv.spawny, P.spawnrotation = sv.spawnrot;+ }+ info_update(true);+}++/* ---------------------------------------------------------------- the pause */+enum { OV_NONE, OV_PAUSE, OV_QUIT, OV_HELP };+static int ov = OV_NONE, sel, help_back;+#define N_ITEMS 5+static const char *const items[N_ITEMS] = {"Resume", "Retry", "Title", "How to play", "Quit game"};+static bool item_on(int i) { return i != 2 || game_can_exit(); }++/* ---------------------------------------------------------------- drawing */+extern void draw_init(void), draw_frame(void), draw_world(void);+static void text_c(const np_font_t *f, int cx, int base, const char *s, color_t c) { gfx_text_center(f, cx, base, s, c, 256); }+static void keyline(const char *s) {+ gfx_fill_alpha(0, 222, 320, 18, 0, 170);+ text_c(&np_font_small, 160, 235, s, HEX(0xD8D0E8));+}+static void box(int x, int y, int w, int h) {+ gfx_rrect(x, y, w, h, 8, HEX(0x1A1030), 235);+ gfx_rrect_outline(x, y, w, h, 8, 2, HEX(0xB95BEC), 256);+}+static void button(int x, int y, int w, int h, const char *s, bool on, bool can) {+ if (on) gfx_rrect(x, y, w, h, 6, HEX(0xE473EE), 256);+ else gfx_rrect_outline(x, y, w, h, 6, 1, HEX(0x7C6A90), 256);+ text_c(&np_font_body, x + w / 2, y + h / 2 + 5, s, on ? HEX(0x101010) : can ? HEX(0xFFFFFF) : HEX(0x6A6078));+}+static const char *const help[] = {+ "Collect the energy crystals and get to the end.",+ "Left / Right: run",+ "Up, OK or EXE: jump (again in the air: double jump)",+ "Jump against a wall: wall jump",+ "Down: roll (hold it and run); in the air: slam",+ "A slam breaks glass and presses red buttons.",+ "Shift: jetpack on or off (once you have one)",+ "Backspace: back to the last checkpoint",+ "Back: pause Home: save and quit",+};+static void scene(void *ctx) {+ (void)ctx;+ if (ov == OV_HELP) {+ gfx_vgrad(0, gfx_y0, 320, gfx_y1 - gfx_y0, 0x2A1450, 0x0C0618);+ text_c(&np_font_title, 160, 34, "How to play", HEX(0xE473EE));+ for (int i = 0; i < (int)(sizeof help / sizeof help[0]); i++)+ text_c(&np_font_small, 160, 62 + i * 18 + (i > 0) * 6, help[i], i ? HEX(0xFFFFFF) : HEX(0x12DFF5));+ keyline("OK or Back: close");+ return;+ }+ draw_world();+ if (ov == OV_PAUSE || ov == OV_QUIT) {+ gfx_fill_alpha(0, gfx_y0, 320, gfx_y1 - gfx_y0, 0, 102);+ box(80, 36, 160, 168);+ text_c(&np_font_title, 160, 62, "Paused", HEX(0xFFFFFF));+ for (int i = 0; i < N_ITEMS; i++)+ button(96, 72 + i * 25, 128, 21, i == N_ITEMS - 1 && ov == OV_QUIT ? "Sure? OK quits" : items[i], sel == i,+ item_on(i));+ keyline("Up Down: choose OK: go Back: resume");+ return;+ }+ if (level == -1) keyline("Left Right: run Up: jump Down: roll Back: pause");+ else if (key_hint_frames > 0 && P.hasJetPack) keyline("Shift: jetpack on or off Up Down: fly");+}++/* ---------------------------------------------------------------- the loop */+#ifndef HOST+__attribute__((used, externally_visible))+#endif+uint32_t perf_frames, perf_max, perf_slow;+static color_t strip[SCREEN_W * STRIP_H];+static uint32_t game_keys_of(uint32_t k) { /* the original's keys: left, right, up, down, space, R */+ uint32_t g = 0;+ if (k & PK_LEFT) g |= 1 << GK_LEFT;+ if (k & PK_RIGHT) g |= 1 << GK_RIGHT;+ if (k & (PK_UP | PK_OK | PK_EXE)) g |= 1 << GK_UP;+ if (k & PK_DOWN) g |= 1 << GK_DOWN;+ if (k & PK_SHIFT) g |= 1 << GK_JET;+ if (k & PK_DEL) g |= 1 << GK_R;+ return g;+}++int main(void) {+ plat_begin();+ gfx_buf = strip;+ rng ^= plat_random() ^ plat_millis();+ if (!rng) rng = 1;+ draw_init();+ load();+ start_game();+ if (!(sv.flags & 1)) ov = OV_HELP, help_back = OV_NONE, sv.flags |= 1;+ uint32_t held = plat_keys(), stale = held, gheld = 0, last = plat_millis(), saved = last, acc = 0;+ int up_held = 0, spawn_seen = P.spawnx * 7 + P.spawny * 3 + P.spawnlevel;+ for (;;) {+ uint32_t k = plat_keys();+ if (k & PK_HOME) break;+ stale &= k;+ k &= ~stale; /* (keys still down from before the app wait to be let go) */+ uint32_t now = plat_millis(), dt = now - last, hit = k & ~held;+ last = now;+ held = k;+ if (dt > 200) dt = 200;+ bool quit = false;+ int dy = !!(hit & PK_DOWN) - !!(hit & PK_UP);+ if (ov == OV_HELP) {+ if (hit & (PK_OK | PK_EXE | PK_BACK)) ov = help_back, save();+ } else if (ov == OV_PAUSE) {+ do sel = (sel + dy + N_ITEMS) % N_ITEMS;+ while (dy && !item_on(sel));+ if (hit & PK_BACK || (hit & (PK_OK | PK_EXE) && sel == 0)) ov = OV_NONE;+ else if (hit & (PK_OK | PK_EXE) && sel == 1) ov = OV_NONE, key_press(GK_R), key_release(GK_R);+ else if (hit & (PK_OK | PK_EXE) && sel == 2 && game_can_exit()) ov = OV_NONE, game_exit_to_menu(), save();+ else if (hit & (PK_OK | PK_EXE) && sel == 3) ov = OV_HELP, help_back = OV_PAUSE;+ else if (hit & (PK_OK | PK_EXE) && sel == 4) ov = OV_QUIT;+ } else if (ov == OV_QUIT) {+ if (dy) sel = (sel + dy + N_ITEMS) % N_ITEMS, ov = OV_PAUSE;+ else if (hit & (PK_OK | PK_EXE)) quit = true;+ else if (hit & PK_BACK) ov = OV_PAUSE;+ } else if (hit & PK_BACK) {+ ov = OV_PAUSE, sel = 0;+ save();+ }+ if (quit) break;+#ifdef HOST+ acc = 1000; /* (tests: one step a frame) */+ (void)dt;+#else+ acc += dt * 60;+#endif+ int steps = 0;+ while (ov == OV_NONE && acc >= 1000 && steps < 4) {+ acc -= 1000, steps++;+ /* the original's key events, then its frame; a key held through a respawn comes back as its key repeat would */+ uint32_t g = game_keys_of(k), on = g & ~gheld, off = gheld & ~g;+ for (int i = 0; i < 6; i++) {+ if (off >> i & 1) key_release(i);+ if (on >> i & 1) key_press(i);+ }+ gheld = g;+ up_held = g >> GK_UP & 1 ? up_held + 1 : 0;+ if ((g >> GK_LEFT & 1) && !key_left) key_press(GK_LEFT);+ if ((g >> GK_RIGHT & 1) && !key_right) key_press(GK_RIGHT);+ if ((g >> GK_DOWN & 1) && !key_down) key_press(GK_DOWN);+ if (up_held > 30 && !key_up) key_press(GK_UP);+ game_step();+ }+ if (ov != OV_NONE) acc = 0;+ if (acc > 4000) acc = 0;+ int spawn_now = P.spawnx * 7 + P.spawny * 3 + P.spawnlevel;+ if (spawn_now != spawn_seen && !P.dead) spawn_seen = spawn_now, save(), saved = now; /* a checkpoint */+ if (now - saved > 60000) save(), saved = now;+ uint32_t t0 = plat_millis();+ draw_frame();+ gfx_render(scene, NULL, 0, 240);+ uint32_t t = plat_millis() - t0;+ perf_frames++, perf_max = t > perf_max ? t : perf_max, perf_slow += t > 33;+#ifndef HOST+ uint32_t spent = plat_millis() - now;+ if (spent < 16) plat_sleep(16 - spent);+#endif+ }+ save();+ return plat_end();+}diff --git a/games/catninja/src/plat.h b/games/catninja/src/plat.hnew file mode 100644index 00000000..ce0b216a--- /dev/null+++ b/games/catninja/src/plat.h@@ -0,0 +1,19 @@+/* What the game needs from the calculator (plat_eadk.c), or from a computer for the tests (tests/play.c). */+#ifndef CN_PLAT_H+#define CN_PLAT_H+#include <stdbool.h>+#include <stdint.h>++enum {+ PK_OK = 1, PK_UP = 2, PK_DOWN = 4, PK_LEFT = 8, PK_RIGHT = 16, PK_BACK = 32, PK_HOME = 64, PK_EXE = 128, PK_DEL = 256,+ PK_SHIFT = 512+};+uint32_t plat_keys(void);+uint32_t plat_millis(void);+void plat_sleep(uint32_t ms);+bool plat_save(const char *name, const void *data, uint32_t len);+const uint8_t *plat_load(const char *name, uint32_t *len);+uint32_t plat_random(void);+void plat_begin(void);+int plat_end(void);+#endifdiff --git a/games/catninja/src/plat_eadk.c b/games/catninja/src/plat_eadk.cnew file mode 100644index 00000000..794c2ba5--- /dev/null+++ b/games/catninja/src/plat_eadk.c@@ -0,0 +1,37 @@+/* The calculator: keys, time, the screen and files (EADK, and NumPlay's careful file helpers). */+#include <eadk.h>+#include "../../common/epsilon_app.h"+#include "../../common/epsilon_files.h"+#include "gfx.h"+#include "plat.h"++const char eadk_app_name[] __attribute__((section(".rodata.eadk_app_name"))) = "Cat Ninja";+const uint32_t eadk_api_level __attribute__((section(".rodata.eadk_api_level"))) = 0;++#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_ok)) r |= PK_OK;+ if (k & KEY(eadk_key_exe)) r |= PK_EXE;+ if (k & (KEY(eadk_key_up) | KEY(eadk_key_eight))) r |= PK_UP;+ if (k & (KEY(eadk_key_down) | KEY(eadk_key_two))) r |= PK_DOWN;+ if (k & (KEY(eadk_key_left) | KEY(eadk_key_four))) r |= PK_LEFT;+ if (k & (KEY(eadk_key_right) | KEY(eadk_key_six))) r |= PK_RIGHT;+ if (k & KEY(eadk_key_back)) r |= PK_BACK;+ if (k & KEY(eadk_key_backspace)) r |= PK_DEL;+ if (k & KEY(eadk_key_shift)) r |= PK_SHIFT;+ if (k & (KEY(eadk_key_home) | KEY(eadk_key_on_off))) r |= PK_HOME;+ return r;+}+uint32_t plat_millis(void) { return (uint32_t)eadk_timing_millis(); }+void plat_sleep(uint32_t ms) { eadk_timing_msleep(ms); }+void np_push(int x, int y, int w, int h, const color_t *px) {+ eadk_display_push_rect((eadk_rect_t){(uint16_t)x, (uint16_t)y, (uint16_t)w, (uint16_t)h}, (const eadk_color_t *)px);+}+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); }+uint32_t plat_random(void) { return eadk_random(); }+void plat_begin(void) { np_app_begin(); }+int plat_end(void) { return np_app_end(); }diff --git a/games/catninja/tests/play.c b/games/catninja/tests/play.cnew file mode 100644index 00000000..6ce76ee2--- /dev/null+++ b/games/catninja/tests/play.c@@ -0,0 +1,297 @@+/* Cat Ninja on a computer, for tests and pictures (make host, make test).+ * play test the cat's physics against the original's numbers (spec/), the first levels played+ * through with keys, every level loaded and run, random keys, saves+ * play shot DIR KEYS pictures (DIR/<frame>.ppm) of a run: KEYS is "frame:keys,..." (l r u d j R b h o)+ * play film DIR KEYS N every 2nd frame of a run of N frames (DIR/<n>.ppm), for the GIF */+#define main catninja_main+#include "../src/main.c"+#undef main+#include <stdio.h>+#include <stdlib.h>++/* ---------------------------------------------------------------- the calculator, on a computer */+static uint16_t screen_px[240][320];+static void (*on_frame)(void);+void np_push(int x, int y, int w, int h, const color_t *px) {+ for (int j = 0; j < h; j++)+ for (int i = 0; i < w; i++) screen_px[y + j][x + i] = px[j * w + i];+ if (on_frame && y + h == 240) on_frame();+}+void *np_alloc(uint32_t n) {+ (void)n;+ return 0;+}+static uint64_t clock_ms;+static uint32_t (*script)(void);+static uint32_t frame_no, quit_at = 0xFFFFFFFFu;+uint32_t plat_keys(void) {+ frame_no++;+ if (frame_no >= quit_at) return PK_HOME;+ return script ? script() : 0;+}+uint32_t plat_millis(void) { return (uint32_t)(clock_ms += 16); }+void plat_sleep(uint32_t ms) { clock_ms += ms; }+static uint32_t lcg_s = 1;+static uint32_t lcg(void) { return lcg_s = lcg_s * 1664525u + 1013904223u; }+uint32_t plat_random(void) { return lcg(); }+void plat_begin(void) {}+int plat_end(void) { return 0; }+static struct {+ char name[32];+ uint8_t data[4096];+ uint32_t len;+ bool on;+} files[4];+bool plat_save(const char *name, const void *data, uint32_t len) {+ int k = -1;+ for (int i = 0; i < 4; i++)+ if (files[i].on && !strcmp(files[i].name, name)) k = i;+ for (int i = 0; i < 4 && k < 0; i++)+ if (!files[i].on) k = i;+ if (k < 0 || len > sizeof files[k].data) return false;+ strcpy(files[k].name, name), memcpy(files[k].data, data, len), files[k].len = len, files[k].on = true;+ return true;+}+const uint8_t *plat_load(const char *name, uint32_t *len) {+ for (int i = 0; i < 4; i++)+ if (files[i].on && !strcmp(files[i].name, name)) return *len = files[i].len, files[i].data;+ return 0;+}+static void files_clear(void) { memset(files, 0, sizeof files); }+static void file_drop(const char *name) {+ for (int i = 0; i < 4; i++)+ if (files[i].on && !strcmp(files[i].name, name)) files[i].on = false;+}+static uint8_t *file_of(const char *name, uint32_t *len) {+ for (int i = 0; i < 4; i++)+ if (files[i].on && !strcmp(files[i].name, name)) return *len = files[i].len, files[i].data;+ return 0;+}++static void ppm(const char *path) {+ FILE *f = fopen(path, "wb");+ if (!f) return;+ fprintf(f, "P6 320 240 255\n");+ for (int y = 0; y < 240; y++)+ for (int x = 0; x < 320; x++) {+ uint16_t c = screen_px[y][x];+ uint8_t rgb[3] = {(uint8_t)((c >> 11) << 3 | (c >> 13)), (uint8_t)(((c >> 5) & 63) << 2 | ((c >> 9) & 3)),+ (uint8_t)((c & 31) << 3 | ((c >> 2) & 7))};+ fwrite(rgb, 1, 3, f);+ }+ fclose(f);+}++static int fails;+#define CHECK(c, ...) \+ do { \+ if (!(c)) { \+ fails++; \+ printf("FAIL %s:%d: ", __FILE__, __LINE__); \+ printf(__VA_ARGS__); \+ printf("\n"); \+ } \+ } while (0)++/* ---------------------------------------------------------------- key scripts: "frame:keys,frame:keys" */+static struct {+ uint32_t at, keys;+} steps_[512];+static int n_steps_;+static uint32_t keys_of(const char *s) {+ uint32_t k = 0;+ for (; *s && *s != ','; s++) switch (*s) {+ case 'l': k |= PK_LEFT; break;+ case 'r': k |= PK_RIGHT; break;+ case 'u': k |= PK_UP; break;+ case 'd': k |= PK_DOWN; break;+ case 'j': k |= PK_SHIFT; break;+ case 'R': k |= PK_DEL; break;+ case 'b': k |= PK_BACK; break;+ case 'o': k |= PK_OK; break;+ case 'h': k |= PK_HOME; break;+ }+ return k;+}+static void parse_keys(const char *s) {+ n_steps_ = 0;+ while (*s && n_steps_ < 512) {+ steps_[n_steps_].at = (uint32_t)strtoul(s, (char **)&s, 10);+ if (*s == ':') s++;+ steps_[n_steps_].keys = keys_of(s);+ n_steps_++;+ while (*s && *s != ',') s++;+ if (*s == ',') s++;+ }+}+static int goto_level_at = -2;+static uint32_t scripted(void) {+ uint32_t k = 0;+ if (frame_no == 1 && goto_level_at >= -1) {+ extern void game_debug_goto(int lv);+ game_debug_goto(goto_level_at);+ }+ for (int i = 0; i < n_steps_; i++)+ if (steps_[i].at <= frame_no) k = steps_[i].keys;+ return k;+}+static const char *shot_dir;+static int film_every;+static void shot_frame(void) {+ char path[256];+ if (getenv("CN_TRACE")) printf("%u L%d x %.2f y %.2f rot %d wr %.1f rotating %d dead %d\n", frame_no, level, P.x, P.y, currentrotation, world_rot, rotating, P.dead);+ if (film_every) {+ if (frame_no % film_every) return;+ snprintf(path, sizeof path, "%s/%05u.ppm", shot_dir, frame_no / film_every);+ } else {+ for (int i = 0; i < n_steps_; i++)+ if (steps_[i].at == frame_no) goto take;+ return;+ take:+ snprintf(path, sizeof path, "%s/%05u.ppm", shot_dir, frame_no);+ }+ ppm(path);+}++/* A player for the first levels: it runs right, climbs shafts by jumping from wall to wall, and jumps the gaps+ the levels ask it to. Each frame it looks at the cat and the tiles about it, as a player looks at the screen. */+static uint32_t bot_keys, bot_held;+static int bot_dir = 1, bot_wait;+static bool bot_climb;+static bool solid_at(int x, int y) { return !walk_at(x, y); }+static void bot_frame(void) {+ uint32_t k = 0;+ int cx = P.coordx, cy = P.coordy;+ if (bot_wait > 0) bot_wait--;+ k |= bot_dir > 0 ? 1u << GK_RIGHT : 1u << GK_LEFT;+ if (!P.dead) {+ bool wall = bot_dir > 0 ? solid_at(cx + 1, cy) : solid_at(cx, cy) || solid_at(cx - 1, cy);+ if (P.onground && !wall) bot_climb = false;+ if (P.onground && wall && !bot_wait) k |= 1u << GK_UP, bot_wait = 4, bot_climb = true; /* a wall ahead: up it */+ else if (bot_climb && !P.onground && P.speedx == 0 && wall && !bot_wait) { /* against it: jump off, the other way */+ k |= 1u << GK_UP, bot_wait = 4;+ bot_dir = -bot_dir;+ } else if (!P.onground && !wall && bot_dir < 0 && P.gravity > 3 && level == 1) {+ bot_dir = 1; /* (over the top of the shaft: right again) */+ }+ /* a pit with spikes ahead: jump it */+ if (P.onground && bot_dir > 0 && walk_at(cx + 2, cy + 1)) {+ int y = cy + 1;+ while (y < gh && walk_at(cx + 2, y) && (grid[y * gw + cx + 2] & 0x7F) != 2) y++;+ if (y < gh && (grid[y * gw + cx + 2] & 0x7F) == 2) k |= 1u << GK_UP;+ }+ if (!P.onground && P.gravity > -6 && P.gravity < 0 && P.doublejump && bot_dir > 0 && level == 1 && cx > 100)+ k |= 1u << GK_UP; /* (the floating floors: double jump) */+ }+ uint32_t on = k & ~bot_held, off = bot_held & ~k;+ for (int i = 0; i < 6; i++) {+ if (off >> i & 1) key_release(i);+ if (on >> i & 1) key_press(i);+ }+ if (k >> GK_UP & 1) k &= ~(1u << GK_UP); /* (taps: let go at once) */+ bot_held = k & ~(1u << GK_UP);+ if (on >> GK_UP & 1) key_release(GK_UP);+ bot_keys = on;+ game_step();+}++/* the game's own steps, without the shell: a fresh game at a level's spawn */+static void at_level(int lv) {+ game_new();+ extern void test_goto(int lv);+ test_goto(lv);+}++int main(int argc, char **argv) {+ if (argc >= 4 && (!strcmp(argv[1], "shot") || !strcmp(argv[1], "film"))) {+ shot_dir = argv[2];+ parse_keys(argv[3]);+ film_every = !strcmp(argv[1], "film") ? 2 : 0;+ quit_at = argc >= 5 ? (uint32_t)atoi(argv[4]) : steps_[n_steps_ - 1].at + 2;+ script = scripted;+ on_frame = shot_frame;+ files_clear();+ if (argc >= 6 && !strchr(argv[5], ',')) { /* a level to start in */+ goto_level_at = atoi(argv[5]);+ save_t s;+ memset(&s, 0, sizeof s);+ s.magic = MAGIC, s.version = VERSION, s.flags = 1, s.level = -1, s.spawnlevel = -1;+ s.sum = fnv(&s, offsetof(save_t, sum));+ plat_save(SAVE_NAME, &s, sizeof s);+ } else if (argc >= 6) { /* a save to start from: level x y */+ int lv = 0, x = 0, y = 0;+ sscanf(argv[5], "%d,%d,%d", &lv, &x, &y);+ save_t s;+ memset(&s, 0, sizeof s);+ s.magic = MAGIC, s.version = VERSION, s.flags = 1, s.level = (int8_t)lv, s.x = (int16_t)x, s.y = (int16_t)y;+ s.spawnlevel = -1;+ s.sum = fnv(&s, offsetof(save_t, sum));+ plat_save(SAVE_NAME, &s, sizeof s);+ } else {+ save_t s;+ memset(&s, 0, sizeof s);+ s.magic = MAGIC, s.version = VERSION, s.flags = 1, s.level = -1, s.spawnlevel = -1;+ s.sum = fnv(&s, offsetof(save_t, sum));+ plat_save(SAVE_NAME, &s, sizeof s);+ }+ catninja_main();+ printf("frames %u, slowest %u ms\n", perf_frames, perf_max);+ return 0;+ }+ if (argc >= 3 && !strcmp(argv[1], "levels")) { /* every level's start, a second in */+ gfx_buf = strip;+ draw_init();+ for (int lv = -1; lv < 30; lv++) {+ game_new();+ extern void game_debug_goto(int lv);+ game_debug_goto(lv);+ for (int f = 0; f < 60; f++) game_step();+ draw_frame();+ gfx_render(scene, NULL, 0, 240);+ char path[256];+ snprintf(path, sizeof path, "%s/level%02d.ppm", argv[2], lv + 1);+ ppm(path);+ }+ return 0;+ }+ if (argc >= 4 && !strcmp(argv[1], "trace")) { /* trace LEVEL KEYS [frames]: the cat, frame by frame */+ gfx_buf = strip;+ draw_init();+ parse_keys(argv[3]);+ int frames = argc >= 5 ? atoi(argv[4]) : (int)steps_[n_steps_ - 1].at + 1;+ game_new();+ extern void game_debug_goto(int lv);+ game_debug_goto(atoi(argv[2]));+ uint32_t held = 0;+ for (frame_no = 1; (int)frame_no <= frames; frame_no++) {+ uint32_t g = game_keys_of(scripted()), on = g & ~held, off = held & ~g;+ for (int i = 0; i < 6; i++) {+ if (off >> i & 1) key_release(i);+ if (on >> i & 1) key_press(i);+ }+ held = g;+ game_step();+ printf("%4u L%d x %.2f y %.2f c %d,%d sx %.3f g %.3f %s%s%s rot %d\n", frame_no, level, P.x, P.y, P.coordx, P.coordy,+ P.speedx, P.gravity, P.onground ? "ground " : "", P.dead ? "dead " : "", P.hitwall ? "wall " : "",+ currentrotation);+ }+ return 0;+ }+ if (argc >= 2 && !strcmp(argv[1], "bot")) { /* the climbing player, traced */+ gfx_buf = strip;+ draw_init();+ game_new();+ int frames = argc >= 3 ? atoi(argv[2]) : 2000;+ for (int f = 0; f < frames; f++) {+ bot_frame();+ printf("%4d L%d x %.2f y %.2f c %d,%d sx %.3f g %.3f %s%s keys %x\n", f, level, P.x, P.y, P.coordx, P.coordy, P.speedx,+ P.gravity, P.onground ? "ground " : "", P.dead ? "dead " : "", bot_keys);+ }+ return 0;+ }+ (void)at_level;+ (void)file_of;+ (void)file_drop;+ printf("%s\n", fails ? "FAILED" : "ok");+ return fails ? 1 : 0;+}diff --git a/games/catninja/tools/data.py b/games/catninja/tools/data.pynew file mode 100644index 00000000..1f9259d3--- /dev/null+++ b/games/catninja/tools/data.py@@ -0,0 +1,779 @@+#!/usr/bin/env python3+"""Cat Ninja's data, made from the game's own files: src/data.c and src/data.h.++ python3 -I tools/data.py GAMESRC src++GAMESRC holds what JPEXS took out of CatNinja.swf (see its spec/): levels/ (the 30 levels and the menu,+unzipped from Textures_levelsclass), ex/loader/image/ (the pictures) and ex/loader/font/ (its two fonts).++What it writes:+- one palette of 255 colours (with 8 levels of see-through) for every picture, so the game can tint the+ map (the original's ColourChanger) by changing 255 colours a frame;+- the pictures at half size (the calculator shows the original's 20 pixel tiles 10 pixels wide), turned+ and flipped as Textures.initiate() does; the TV screen at 0.8 and the big crystal at a quarter;+- the 31 maps, their tiles packed with DEFLATE, and their scripts turned into numbered steps;+- every text: the TV screens', the messages, the title cards, in runs of one font, size and colour;+- the two fonts ("square" and "cubic") at the sizes those texts use, only the letters they use.+"""+import os+import re+import sys+import zlib++import numpy as np+from PIL import Image, ImageDraw, ImageFont++SRC = os.path.expanduser(sys.argv[1] if len(sys.argv) > 1 else '~/Documents/Assets/gamesrc/catninja')+OUT = sys.argv[2] if len(sys.argv) > 2 else 'src'+IMG = os.path.join(SRC, 'ex/loader/image')+FONTS = os.path.join(SRC, 'ex/loader/font')+LEVELS = os.path.join(SRC, 'levels')+++# ---------------------------------------------------------------- pictures+def tex(name):+ for f in os.listdir(IMG):+ if f.endswith('_' + name + '.png') or f.endswith('Textures_' + name + 'class.png'):+ return Image.open(os.path.join(IMG, f)).convert('RGBA')+ raise KeyError(name)+++def rot(im, deg): # PixelModifier.rotate: degrees clockwise on the screen+ return im.transpose(Image.ROTATE_270 if deg == 90 else Image.ROTATE_90)+++def flip(im, sx, sy):+ if sx < 0:+ im = im.transpose(Image.FLIP_LEFT_RIGHT)+ if sy < 0:+ im = im.transpose(Image.FLIP_TOP_BOTTOM)+ return im+++def shrink(im, w, h):+ """Area-averaged resize with the colours weighted by their alpha."""+ a = np.asarray(im, dtype=np.float64) / 255.0+ pm = a.copy()+ pm[..., :3] *= pm[..., 3:4]+ src = Image.fromarray((pm * 255).round().astype(np.uint8), 'RGBA')+ r = np.asarray(src.resize((w, h), Image.BOX), dtype=np.float64) / 255.0+ al = r[..., 3:4]+ rgb = np.where(al > 0, r[..., :3] / np.maximum(al, 1e-9), 0)+ out = np.concatenate([np.clip(rgb, 0, 1), al], axis=2)+ return Image.fromarray((out * 255).round().astype(np.uint8), 'RGBA')+++def half(im):+ w, h = im.size+ if w % 2 or h % 2:+ p = Image.new('RGBA', (w + w % 2, h + h % 2), (0, 0, 0, 0))+ p.paste(im, (0, 0))+ im = p+ return shrink(im, im.width // 2, im.height // 2)+++def sheet(im, w, h):+ return [im.crop((x, y, x + w, y + h)) for y in range(0, im.height // h * h, h) for x in range(0, im.width // w * w, w)]+++# the tile pictures by tile type (Map.changeTile); the grid layer's are drawn untinted, the map's tinted+spike, blood = tex('spike'), tex('spikeblood')+lm, lmo, laser = tex('lasermachine'), tex('lasermachineoff'), tex('laser')+gb, bp, sticky = tex('gravityblock'), tex('buttonpress'), tex('stickygroundtile')+gc, sc, corner = tex('gravitychanger'), tex('spikecorner'), tex('groundtilecorner')+spring, tele, magnet, boost = tex('spring'), tex('teleporter'), tex('magnet'), tex('boost')+FG = {+ 1: tex('groundtile'), 3: tex('darkgroundtile'), 4: tex('middarkgroundtile'),+ 2: spike, 5: flip(spike, 1, -1), 6: rot(spike, 90), 7: rot(spike, -90),+ 10: lm, 11: rot(lm, -90), 12: rot(lm, 90), 13: flip(lm, 1, -1),+ 14: laser, 15: rot(laser, 90),+ 20: lmo, 21: rot(lmo, -90), 22: rot(lmo, 90), 23: flip(lmo, 1, -1),+ 24: gb, 25: rot(gb, 90), 26: rot(gb, -90), 27: flip(gb, 1, -1),+ 28: bp, 29: rot(bp, 90), 30: rot(bp, -90), 31: flip(bp, 1, -1),+ 36: sticky, 37: flip(sticky, -1, 1), 38: rot(sticky, -90), 39: rot(sticky, 90),+ 40: gc, 41: rot(gc, 90), 42: rot(gc, -90), 43: flip(gc, 1, -1),+ 44: tex('jetpack'),+ 47: sc, 48: rot(sc, 90), 49: rot(sc, -90), 50: flip(sc, 1, -1),+ 55: corner, 56: flip(corner, -1, 1), 57: rot(corner, -90), 58: flip(corner, -1, -1),+ 59: spring, 60: rot(spring, 90), 61: rot(spring, -90), 62: flip(spring, 1, -1),+ 63: tele, 64: rot(tele, 90), 65: rot(tele, -90), 66: flip(tele, 1, -1),+ 75: magnet, 76: rot(magnet, 90), 77: rot(magnet, -90), 78: flip(magnet, 1, -1),+ 79: tex('checkpointoff'), 80: tex('checkpointon'), 82: tex('speedup'), 83: tex('hallucinate'),+ 89: tex('groundtile'), 90: tex('jailcell'),+}+BLOOD = {2: blood, 5: flip(blood, 1, -1), 6: rot(blood, 90), 7: rot(blood, -90)}+def over(a, b): # b drawn over a (copyPixels with mergeAlpha)+ out = a.copy()+ out.alpha_composite(b)+ return out+++gridtile = tex('gridtile')+GRID = {0: gridtile, 32: over(gridtile, tex('glass')), 51: over(gridtile, flip(boost, 1, -1)),+ 52: over(gridtile, rot(boost, -90)), 53: over(gridtile, rot(boost, 90)), 54: over(gridtile, boost)}++cat = {k: tex('character' + k) for k in ('idle', 'idle2', 'walk1', 'walk2', 'jump', 'wallslide', 'duck', 'roll')}+mine = {k: tex(k) for k in ('mineblinkoff', 'mineblinkon', 'mineoff')}+button = tex('button')+shield, homing = sheet(tex('shieldshooter'), 20, 20), sheet(tex('homingshooter'), 20, 20)+fall = tex('fallspike')+++def shooter(frames, o):+ if o == 0:+ return frames+ if o == 3:+ return [flip(f, 1, -1) for f in frames]+ # (the sheet turned, flipped, then cut: the frames come in the turned sheet's order)+ whole = Image.new('RGBA', (80, 20))+ for i, f in enumerate(frames):+ whole.paste(f, (i * 20, 0))+ t = flip(rot(whole, -90), 1, -1) if o == 1 else flip(rot(whole, -90), -1, -1)+ return sheet(t, 20, 20)+++SPRITES = [] # (name, image at its size on the calculator)+++def sprite(name, im):+ SPRITES.append((name, im))+++for k in ('idle', 'idle2', 'walk1', 'walk2', 'jump', 'wallslide', 'duck', 'roll'):+ sprite('cat_' + k, half(cat[k]))+sprite('jetpackaddon', half(tex('jetpackaddon')))+for o, f in enumerate((lambda m: m, lambda m: flip(m, 1, -1), lambda m: rot(m, -90), lambda m: rot(m, 90))):+ for k in ('mineblinkoff', 'mineblinkon', 'mineoff'):+ sprite('%s_%d' % (k, o), half(f(mine[k])))+for i, b in enumerate((button, rot(button, 90), rot(button, -90), flip(button, 1, -1))):+ sprite('button_%d' % i, half(b))+for i, d in enumerate(sheet(tex('dirt'), 20, 20)):+ sprite('dirt_%d' % i, half(d))+sprite('crate', half(tex('crate')))+for kind, frames in (('shield', shield), ('homing', homing)):+ for o in range(4):+ for i, f in enumerate(shooter(frames, o)):+ sprite('%s_%d_%d' % (kind, o, i), half(f))+for i, f in enumerate((fall, flip(fall, 1, -1), rot(fall, 90), rot(fall, -90))):+ sprite('fallspike_%d' % i, half(f))+sprite('sunspike', half(tex('sunspike')))+sprite('bomb', half(tex('bomb')))+for i, f in enumerate(sheet(tex('sphere'), 20, 20)):+ sprite('sphere_%d' % i, half(f))+for i, f in enumerate(sheet(tex('bigsphere'), 167, 163)):+ sprite('bigsphere_%d' % i, shrink(f, 42, 41))+sprite('tv', shrink(tex('screen'), 96, 48))+logo = tex('Preloader_biglogoclass')+sprite('trackmill', shrink(logo, 192, 52))++TILES = {('fg', t): half(im) for t, im in FG.items()}+TILES.update({('blood', t): half(im) for t, im in BLOOD.items()})+TILES.update({('grid', t): half(im) for t, im in GRID.items()})++# ---------------------------------------------------------------- the palette+ALPHA = 8 # levels of see-through+++def alpha_level(a):+ return int(round(int(a) * ALPHA / 255))+++all_imgs = [im for im in TILES.values()] + [im for _, im in SPRITES]+rgb_list = []+for im in all_imgs:+ a = np.asarray(im)+ m = a[..., 3] > 255 // (2 * ALPHA)+ rgb_list.append(a[m][:, :3])+rgb_all = np.concatenate(rgb_list)+++def build_palette(k):+ flat = Image.fromarray(rgb_all.reshape(1, -1, 3).astype(np.uint8), 'RGB')+ q = flat.quantize(colors=k, method=Image.Quantize.MEDIANCUT, dither=Image.Dither.NONE)+ pal = np.array(q.getpalette()[:3 * k], dtype=np.int32).reshape(-1, 3)+ return pal+++def nearest(pal, rgb):+ d = ((rgb[:, None, :].astype(np.int32) - pal[None, :, :]) ** 2).sum(axis=2)+ return d.argmin(axis=1)+++for k in range(255, 40, -5):+ pal = build_palette(k)+ pairs = set()+ for im in all_imgs:+ a = np.asarray(im)+ flat = a.reshape(-1, 4)+ lv = np.array([alpha_level(x) for x in flat[:, 3]])+ m = lv > 0+ if m.any():+ idx = nearest(pal, flat[m][:, :3])+ pairs.update(zip(idx.tolist(), lv[m].tolist()))+ if len(pairs) <= 255:+ break+pairs = sorted(pairs, key=lambda p: (p[1] != ALPHA, p))+PAIR = {p: i + 1 for i, p in enumerate(pairs)}+PAL = [(0, 0, 0, 0)] + [(int(pal[c][0]), int(pal[c][1]), int(pal[c][2]), lv) for c, lv in pairs]+++def indexed(im):+ a = np.asarray(im)+ flat = a.reshape(-1, 4)+ out = np.zeros(len(flat), dtype=np.uint8)+ lv = np.array([alpha_level(x) for x in flat[:, 3]])+ m = lv > 0+ if m.any():+ idx = nearest(pal, flat[m][:, :3])+ out[m] = [PAIR[(c, l)] for c, l in zip(idx.tolist(), lv[m].tolist())]+ return out+++# ---------------------------------------------------------------- fonts and texts+FONT_FILES = {'square': '10_Preloader_squarefont_square.ttf', 'cubic': '6_Preloader_cubicfont_cubic.ttf'}+FONT_SIZES = [] # (face, pixels): a font of the game+COLOURS = [0x000000, 0xFFFFFF] # the texts' colours+used_chars = {}+++def font_id(face, px):+ px = max(8, int(round(px)))+ key = (face, px)+ if key not in FONT_SIZES:+ FONT_SIZES.append(key)+ return FONT_SIZES.index(key)+++def colour_id(c):+ if c not in COLOURS:+ COLOURS.append(c)+ return COLOURS.index(c)+++def runs_of_html(html, face, scale, size=12, colour=0x000000):+ """The text's runs (font, colour, text) and line breaks, from Flash's htmlText (font tags, <br>)."""+ out = []+ stack = [(size, colour)]+ pos = 0+ for m in re.finditer(r"<font([^>]*)>|</font>|<br>", html):+ if m.start() > pos:+ out.append((stack[-1], html[pos:m.start()]))+ pos = m.end()+ tag = m.group(0)+ if tag == '<br>':+ out.append((None, '\n'))+ elif tag == '</font>':+ if len(stack) > 1:+ stack.pop()+ else:+ s, c = stack[-1]+ a = m.group(1)+ ms = re.search(r"size\s*=\s*'(\d+)'", a)+ mc = re.search(r"color\s*=\s*'#([0-9A-Fa-f]{6})'", a)+ if ms:+ s = int(ms.group(1))+ if mc:+ c = int(mc.group(1), 16)+ stack.append((s, c))+ if pos < len(html):+ out.append((stack[-1], html[pos:]))+ data = bytearray()+ cur = None+ for sc, t in out:+ if sc is None:+ data += b'\n'+ continue+ t = t.replace(''', "'").replace('&', '&').replace('>', '>').replace('<', '<')+ if not t:+ continue+ s, c = sc+ f = font_id(face, s * scale)+ key = (f, colour_id(c))+ if key != cur:+ data += bytes([1, key[0], 2, key[1]])+ cur = key+ used_chars.setdefault(f, set()).update(t)+ data += t.encode('latin-1')+ return bytes(data)+++TEXTS = [] # (name, bytes)+++def text(name, html, face, scale, size=12, colour=0x000000):+ TEXTS.append((name, runs_of_html(html, face, scale, size, colour)))+ return len(TEXTS) - 1+++# Screen.updateDisplay: size[s|text] then colour[#rgb|text] become font tags, then the rest+def get_param(s, key, kind):+ out = ''+ while True:+ i = s.find(key)+ if i == -1:+ break+ out += s[:i]+ s = s[i:]+ parts = s[len(key):s.find(']')].split('|')+ s = s[s.find(']') + 1:]+ if kind == 0:+ out += "<font size = '" + parts[0] + "'>" + (parts[1] if len(parts) > 1 else 'undefined') + '</font>'+ else:+ out += "<font color = '" + parts[0] + "'>" + (parts[1] if len(parts) > 1 else 'undefined') + '</font>'+ return out + s+++def screen_html(s):+ s = get_param(s, 'size[', 0)+ s = get_param(s, 'colour[', 1)+ s = s.replace('&[newline]', '<br>', 1).replace('${greaterthan}', '>', 1).replace('${lessthan}', '<', 1)+ return s+++TV_SCALE = 0.8 # the TV screens are drawn at 0.8 of the original (the map at 0.5): readable+UI_SCALE = 0.4 # 800 x 600 on 320 x 240+KEY_WORDS = { # what the screens say about the computer's keys, said for the calculator's+ 'Press space to toggle the jetpack': 'Press shift to toggle the jetpack',+ 'Pressing colour[#53C5FB|R] saves the day.': 'Pressing colour[#53C5FB|backspace] saves the day.',+ 'colour[#0E60B1|R] might come in handy now.': 'colour[#0E60B1|Backspace] might come in handy now.',+ 'Use the colour[#971CC6|arrow keys] to move.': 'Use the colour[#971CC6|arrow keys] to move.',+}++# the overlay texts of the code (TextManager, ScreenManager, Boss, BigSphere)+SPEC = {+ 'spec1': "<font color='#E473EE' size='80'>Cat </font><font color='#1C6FD5' size='80'>Ninja:</font><br>"+ "<font color='#B95BEC' size='25'> The search for the </font><br><font color='#12DFF5' size='50'>magical</font>"+ "<font color='#3696E4' size='50'> energy </font><font color='#DB05E0' size='50'>crystals</font>",+ 'spec2': "<font color='#1E84EA' size='35'> Programming </font><font color='#FFFFFF' size='25'> and </font>"+ "<font color='#2FC5F0' size='35'> Artwork </font><font color='#FFFFFF' size='25'> by </font><br>"+ "<font color='#BD55F4' size='40'>Richman Stewart</font>",+ 'spec3': "<font color='#FFFFFF' size='25'> In association with </font>",+ 'spec4': "<font color='#CE4DCB' size='35'> Music </font><font color='#FFFFFF' size='25'> by </font>"+ "<font color='#D579F2' size='45'> BunnyMajs </font><font color='#FFFFFF' size='25'> and </font>"+ "<font color='#3379E3' size='45'> Eric Skiff </font>",+}+SPEC_IDS = {k: text(k, v, 'cubic', UI_SCALE) for k, v in SPEC.items()}+RESPAWN = ["It's a shame you feel pain", 'How did you die to that?', 'You are bad and you should feel bad',+ 'That must have hurt', 'Where did your paws go?<br>Oh, found them.', 'Wow, you are a really bad kitty',+ 'Come on, you really suck at this game.', 'Stupid kitty.', 'Silly kitty.']+IDLE = ["HEY. Don't leave me", 'Where did you go?', "Don't you dare leave me.", "Help, don't leave me!"]+RESPAWN_IDS = [text('die%d' % i, "<font color='#FF0000' size='25'>" + s + '</font>', 'square', UI_SCALE)+ for i, s in enumerate(RESPAWN)]+IDLE_IDS = [text('idle%d' % i, "<font color='#2D95EA' size='40'>" + s + '</font>', 'square', UI_SCALE)+ for i, s in enumerate(IDLE)]+BOSS_ID = text('boss', "<font size='60' color='#ff0000'>Kitty must die!</font>", 'cubic', UI_SCALE)+END_GOOD = text('endgood', "<font size='40' color='#00ff00'>Goob job Catninja!</font><br>"+ "<font size='20' color='#99FB97'>You collected enough crystals to save the world... or something!</font>",+ 'square', UI_SCALE)+END_BAD = text('endbad', "<font size='40' color='#00ff00'>Goob job Catninja!</font><br>"+ "<font size='20' color='#99FB97'>Unfortunately you did not collect enough crystals<br>"+ "to save the world or something. You must try again!</font>", 'square', UI_SCALE)+HUD_FONT = font_id('square', 8) # (Info: 15 pixels, at 0.4 too small: the smallest that reads)+used_chars.setdefault(HUD_FONT, set()).update('Deaths: Crystals Collected0123456789')+HUD_COLOUR = colour_id(0xFFFFFF)++# ---------------------------------------------------------------- the maps and their scripts+OPS = ['NOP', 'PAUSECAM', 'STOPMOVE', 'PAUSE', 'SETSPAWN', 'DIE', 'SETROOM', 'FUNCTION', 'GOTO', 'SETTYPEPATH',+ 'SETTYPE', 'CREATELASER', 'MOVECAM', 'RESUMECAM', 'RESUMEMOVE', 'WALK', 'SHAKE', 'UPDATESCREEN', 'RESETLEVEL',+ 'TELEPORT', 'CREATETEXT', 'RUNSCRIPT', 'IF', 'ELSE', 'ENDIF', 'EXIT', 'STARTBOSS', 'REMOVEBOSS', 'LOOP',+ 'ENDLOOP', 'JUMP', 'SCALE']+OP = {n: i for i, n in enumerate(OPS)}+LABELS = ['endfunction', 'elseif', 'endif', 'unlocklaser', 'respawn']+GOTO_NAMES = {'unlocklaser': 3, 'respawn': 4}+VALUES = {'x': -1, 'y': -2, 'coordx': -3, 'coordy': -4}+TESTS = ['equals', 'doesnotequal', 'isgreaterthan', 'islessthan', 'isgreaterthan=', 'islessthan=']+++def as_int(s): # AS3's int(String)+ s = s.strip()+ m = re.match(r'[-+]?(\d+(\.\d*)?|\.\d+)', s)+ return int(float(m.group(0))) if m else 0+++def params_of(s, start, n, sep=','):+ end = s.find(')')+ p = s[start:end if end >= 0 else 0].split(sep)+ return p if len(p) >= n else []+++def compile_line(s):+ """GlitchInterpreter.interperate's tests, in its order: the step and its numbers."""+ op, args = 'NOP', []++ def st(pre):+ return s[:len(pre)] == pre+ if st('talk('):+ pass+ elif st('pausecamera'):+ op = 'PAUSECAM'+ elif st('stopmovement'):+ op = 'STOPMOVE'+ elif st('pause('):+ p = params_of(s, 6, 1)+ if p:+ op, args = 'PAUSE', [as_int(p[0])]+ elif st('setspawn('):+ p = params_of(s, 9, 2)+ if p:+ op, args = 'SETSPAWN', [as_int(p[0]), as_int(p[1])]+ elif st('die('):+ op = 'DIE'+ elif st('setroom('):+ p = params_of(s, 8, 1)+ if p:+ op, args = 'SETROOM', [1 if p[0][1:-1] == 'gravityRoom' else 0 if p[0][1:-1] == 'default' else -1]+ elif st('function('):+ if params_of(s, 9, 1):+ op = 'FUNCTION'+ elif st('goto('):+ p = params_of(s, 5, 1)+ if p:+ op, args = 'GOTO', [GOTO_NAMES[p[0]]]+ elif st('settypepath('):+ p = params_of(s, 12, 6)+ if p:+ op, args = 'SETTYPEPATH', [as_int(x) for x in p[:5]] + [1 if p[3] != '' else 0]+ elif st('settype('):+ p = params_of(s, 8, 4)+ if p:+ op, args = 'SETTYPE', [as_int(x) for x in p[:3]] + [1 if p[3] != '' else 0]+ elif st('createlaser('):+ p = params_of(s, 12, 5)+ if p:+ op, args = 'CREATELASER', [as_int(x) for x in p[:5]]+ elif st('createobject('):+ pass # (no level makes any)+ elif st('scale('):+ p = params_of(s, 6, 2)+ if p:+ op, args = 'SCALE', [as_int(p[0]), int(float(p[1]) * 100), int(float(p[2]) * 100)]+ elif st('movecamera'):+ p = params_of(s, 11, 2)+ if p:+ op, args = 'MOVECAM', [as_int(p[0]), as_int(p[1])]+ elif st('resumecamera'):+ op = 'RESUMECAM'+ elif st('resumemovement'):+ op = 'RESUMEMOVE'+ elif st('walk('):+ p = params_of(s, 5, 1)+ if p:+ op, args = 'WALK', [as_int(p[0]), as_int(p[1]) if len(p) > 1 else 0]+ elif st('shake('):+ p = params_of(s, 6, 1)+ if len(p) >= 2:+ op, args = 'SHAKE', [as_int(p[0]), as_int(p[1])]+ elif st('jump('):+ p = params_of(s, 5, 2)+ if p:+ op, args = 'JUMP', [as_int(p[0]), as_int(p[1])]+ elif st('updatescreen('):+ p = params_of(s, 13, 2)+ if p:+ t = p[1].replace('"', '').replace('${com}', ',', 1).replace('${app}', "'", 1)+ for a, b in KEY_WORDS.items():+ if a in t:+ t = t.replace(a, b)+ tid = text('tv', screen_html(t), 'square', TV_SCALE)+ op, args = 'UPDATESCREEN', [as_int(p[0]), tid, as_int(p[2]) if len(p) >= 3 else 0]+ elif st('resetlevel'):+ op = 'RESETLEVEL'+ elif st('teleport('):+ p = params_of(s, 9, 4)+ if p:+ op, args = 'TELEPORT', [as_int(x) for x in p[:4]]+ elif st('createtext('):+ p = params_of(s, 11, 5)+ if p:+ name = re.search(r'spec\d', p[0]).group(0)+ fade = 1 if len(p) > 5 and float(p[5]) != 0 else 0+ op, args = 'CREATETEXT', [SPEC_IDS[name], as_int(p[1]), as_int(p[2]), int(round(float(p[3]) * 1000)),+ as_int(p[4]), fade, as_int(p[6]) if len(p) > 6 else 0]+ elif st('runscript('):+ p = params_of(s, 10, 1)+ if p:+ op, args = 'RUNSCRIPT', [as_int(p[0])]+ # (the second chain: "if " and its else)+ if st('if '):+ p = params_of(s, 4, 3, ' ')+ if p:+ # each test: what is compared (0 a number, 1 x, 2 y, 3 coordx, 4 coordy) and its number, the test,+ # the same for the other side, then 1 if "and" follows, 2 if "or" follows+ conds = []+ n = 0+ while n < len(p):+ a = p[n]+ t = p[n + 1] if n + 1 < len(p) else ''+ b = p[n + 2] if n + 2 < len(p) else ''+ link = 0+ if n + 3 < len(p) and p[n + 3] == 'and':+ n += 1+ link = 1+ elif n + 3 < len(p) and p[n + 3] == 'or':+ n += 1+ link = 2+ conds += [-VALUES[a] if a in VALUES else 0, 0 if a in VALUES else as_int(a), TESTS.index(t) if t in TESTS else 15,+ -VALUES[b] if b in VALUES else 0, 0 if b in VALUES else as_int(b), link]+ n += 3+ op, args = 'IF', conds+ elif op == 'NOP':+ if st('else '):+ op = 'ELSE'+ elif st('endif'):+ op = 'ENDIF'+ elif st('exit'):+ op = 'EXIT'+ elif st('startboss'):+ op = 'STARTBOSS'+ elif st('removeboss'):+ op = 'REMOVEBOSS'+ if st('loop('):+ p = params_of(s, 5, 1)+ if p:+ op, args = 'LOOP', [as_int(p[0])]+ elif st('endloop'):+ op = 'ENDLOOP'+ labels = sum(1 << i for i, l in enumerate(LABELS) if l in s)+ return OP[op], labels, args+++def parse_map(name):+ t = open(os.path.join(LEVELS, name), encoding='latin-1').read()+ m = re.search(r"width\s*=\s*'(\d+)'\s*height\s*=\s*'(\d+)'\s*tiles\s*=\s*'([^']*)'", t)+ w, h = int(m.group(1)), int(m.group(2))+ toks = m.group(3).replace('\r\n', '').replace('\n', '').replace('\r', '').split(',')+ tiles = bytearray(w * h)+ marks = [0] * 12 # Map.playerpoints: [1], [2], [3], [4]: x, y and the level the edge leads to+ has = [0, 0, 0, 0]+ spawn = (0, 0)+ for i in range(w * h):+ s = toks[i] if i < len(toks) else ''+ x, y = i % w, i // w+ v = 0+ if '|' in s:+ parts = s[1:-1].split('|')+ s = '[' + parts[0] + ']'+ else:+ parts = []+ if s in ('[1]', '[2]', '[3]', '[4]'):+ k = int(s[1]) - 1+ marks[k * 3] = x - 1 if k == 1 else x+ marks[k * 3 + 1] = y+ has[k] = 1+ if len(parts) >= 2:+ marks[k * 3 + 2] = int(parts[1])+ elif s == 's':+ spawn = (x, y)+ else:+ try:+ v = int(s)+ except ValueError:+ v = 0+ if v > 91 or v < 0:+ v = 0 # (517 and 642: nothing)+ tiles[i] = v+ pages = []+ for n in range(1, 11):+ ms = re.search(r"<script id\s*=\s*'%d'\s*data\s*=\s*'(.*?)'></script>" % n, t, re.S)+ if ms:+ data = ms.group(1).replace('$(ap)', "'", 1)+ pages.append([compile_line(l) for l in data.replace('\r\n', '\n').split('\n')])+ return w, h, bytes(tiles), marks, spawn, pages+++MAPS = [parse_map('menu1.xml')] + [parse_map('level%d.xml' % i) for i in range(1, 31)]++# the crystals, in order (the save keeps a bit for each)+CRYSTALS = []+for li, (w, h, tiles, *_ ) in enumerate(MAPS):+ for i, v in enumerate(tiles):+ if v == 81:+ CRYSTALS.append((li - 1, i % w, i // w))++# ---------------------------------------------------------------- fonts+GLYPHS = [] # per font: (first, count, ascent, descent, glyphs, data)+++def make_font(face, px, chars):+ f = ImageFont.truetype(os.path.join(FONTS, FONT_FILES[face]), px)+ asc, desc = f.getmetrics()+ chars = sorted(set(c for c in chars if 32 <= ord(c) < 127) | {' '})+ first, last = ord(chars[0]), ord(chars[-1])+ glyphs, data = [], bytearray()+ seen = {}+ for code in range(first, last + 1):+ c = chr(code)+ if c not in chars:+ glyphs.append((0, 0, 0, 0, 0, 0))+ continue+ adv = int(round(f.getlength(c)))+ pad = px * 2+ canvas = Image.new('L', (pad * 3, pad * 3), 0)+ ImageDraw.Draw(canvas).text((pad, pad * 2), c, font=f, fill=255, anchor='ls')+ box = canvas.getbbox()+ if not box:+ glyphs.append((0, 0, 0, 0, adv, 0))+ continue+ mask = canvas.crop(box)+ off = (box[0] - pad, box[1] - pad * 2)+ w, h = mask.size+ px4 = [min(15, (int(v) * 15 + 127) // 255) for v in np.asarray(mask).reshape(-1)]+ blob = bytearray()+ for i in range(0, len(px4), 2):+ blob.append(px4[i] | ((px4[i + 1] if i + 1 < len(px4) else 0) << 4))+ key = bytes(blob) + bytes([w, h])+ if key in seen:+ o = seen[key]+ else:+ o = len(data)+ seen[key] = o+ data += blob+ glyphs.append((w, h, off[0], off[1], adv, o))+ return first, last - first + 1, asc, desc, glyphs, bytes(data)+++# ---------------------------------------------------------------- writing it out+def c_bytes(b, per=24):+ s = []+ for i in range(0, len(b), per):+ s.append(' ' + ','.join(str(x) for x in b[i:i + per]) + ',')+ return '\n'.join(s)+++def c_ints(b, per=16):+ s = []+ for i in range(0, len(b), per):+ s.append(' ' + ','.join(str(x) for x in b[i:i + per]) + ',')+ return '\n'.join(s)+++def main():+ os.makedirs(OUT, exist_ok=True)+ h, c = [], []+ h.append('/* Made by tools/data.py from the game\'s own files: do not edit. */')+ h.append('#ifndef CN_DATA_H\n#define CN_DATA_H\n#include <stdint.h>\n#include "font.h"')+ c.append('/* Made by tools/data.py from Cat Ninja\'s own files (CatNinja.swf): do not edit. */')+ c.append('#include "data.h"')+ # palette+ h.append('#define CN_ALPHA %d' % ALPHA)+ h.append('extern const uint32_t cn_pal[256]; /* 0xAARRGGBB, AA: 0 to CN_ALPHA */')+ c.append('const uint32_t cn_pal[256] = {')+ c.append(c_ints(['0x%02X%02X%02X%02X' % (p[3], p[0], p[1], p[2]) for p in PAL] + ['0'] * (256 - len(PAL)), 8))+ c.append('};')+ # tiles+ keys = list(TILES.keys())+ pix = bytearray()+ for k in keys:+ pix += bytes(indexed(TILES[k]))+ h.append('#define CN_TILE_PX 100 /* 10 x 10 */')+ h.append('extern const uint8_t cn_tiles[%d];' % len(pix))+ c.append('const uint8_t cn_tiles[%d] = {\n%s\n};' % (len(pix), c_bytes(pix)))+ for layer in ('fg', 'blood', 'grid'):+ tab = [255] * 92+ for i, k in enumerate(keys):+ if k[0] == layer:+ tab[k[1]] = i+ h.append('extern const uint8_t cn_%s_tile[92]; /* the picture (cn_tiles, 100 each) of a tile type, or 255 */' % layer)+ c.append('const uint8_t cn_%s_tile[92] = {\n%s\n};' % (layer, c_bytes(tab, 23)))+ # sprites+ spx = bytearray()+ rows = []+ for name, im in SPRITES:+ rows.append((name, im.width, im.height, len(spx)))+ spx += bytes(indexed(im))+ h.append('typedef struct {\n uint8_t w, h;\n uint32_t at;\n} cn_sprite_t;')+ h.append('enum {')+ for name, *_ in rows:+ h.append(' SPR_%s,' % name.upper())+ h.append(' SPR_COUNT\n};')+ h.append('extern const cn_sprite_t cn_sprites[SPR_COUNT];')+ h.append('extern const uint8_t cn_sprite_px[%d];' % len(spx))+ c.append('const cn_sprite_t cn_sprites[SPR_COUNT] = {')+ for name, w, hh, at in rows:+ c.append(' {%d, %d, %d}, /* %s */' % (w, hh, at, name))+ c.append('};')+ c.append('const uint8_t cn_sprite_px[%d] = {\n%s\n};' % (len(spx), c_bytes(spx)))+ # maps+ blobs = bytearray()+ h.append('#define CN_MAPS %d /* the menu, then the 30 levels */' % len(MAPS))+ h.append('typedef struct {\n uint8_t w, h;\n int16_t marks[12]; /* [1] to [4]: x, y, the level that edge leads to */\n'+ ' uint8_t has[4], sx, sy; /* which marks; the spawn (s) */\n uint32_t at, len; /* the tiles, DEFLATE */\n'+ ' uint16_t script; /* into cn_scripts: pages, then each page\'s length and steps */\n} cn_map_t;')+ h.append('extern const cn_map_t cn_maps[CN_MAPS];')+ script = []+ rows = []+ biggest = 0+ for (w, hh, tiles, marks, spawn, pages) in MAPS:+ comp = zlib.compressobj(9, zlib.DEFLATED, -15, 9)+ z = comp.compress(tiles) + comp.flush()+ biggest = max(biggest, w * hh)+ at = len(script)+ script.append(len(pages))+ for pg in pages:+ script.append(len(pg))+ for op, labels, args in pg:+ script += [op | labels << 8, len(args)] + args+ has = [1 if (marks[k * 3] or marks[k * 3 + 1]) else 0 for k in range(4)]+ rows.append((w, hh, marks, spawn, len(blobs), len(z), at))+ blobs += z+ c.append('const cn_map_t cn_maps[CN_MAPS] = {')+ for w, hh, marks, spawn, at, ln, sat in rows:+ c.append(' {%d, %d, {%s}, {0, 0, 0, 0}, %d, %d, %d, %d, %d},' % (w, hh, ','.join(map(str, marks)), spawn[0],+ spawn[1], at, ln, sat))+ c.append('};')+ h.append('#define CN_MAP_MAX %d /* the most tiles a map has */' % biggest)+ h.append('extern const uint8_t cn_map_z[%d];' % len(blobs))+ c.append('const uint8_t cn_map_z[%d] = {\n%s\n};' % (len(blobs), c_bytes(blobs)))+ h.append('enum {')+ for n in OPS:+ h.append(' OP_%s,' % n)+ h.append('};')+ h.append('enum { LB_ENDFUNCTION = 1, LB_ELSEIF = 2, LB_ENDIF = 4, LB_UNLOCKLASER = 8, LB_RESPAWN = 16 };')+ h.append('extern const int16_t cn_scripts[%d];' % len(script))+ c.append('const int16_t cn_scripts[%d] = {\n%s\n};' % (len(script), c_ints(script, 20)))+ # crystals+ h.append('#define CN_CRYSTALS %d' % len(CRYSTALS))+ h.append('extern const uint8_t cn_crystals[CN_CRYSTALS][3]; /* level, x, y */')+ c.append('const uint8_t cn_crystals[CN_CRYSTALS][3] = {%s};' % ', '.join('{%d, %d, %d}' % (l & 255, x, y)+ for l, x, y in CRYSTALS))+ # texts+ tdata = bytearray()+ starts = []+ for name, b in TEXTS:+ starts.append(len(tdata))+ tdata += b + b'\0'+ h.append('#define CN_TEXTS %d' % len(TEXTS))+ h.append('extern const uint16_t cn_text_at[CN_TEXTS]; /* runs: 1 font, 2 colour, \\n, letters */')+ h.append('extern const char cn_text_data[%d];' % len(tdata))+ c.append('const uint16_t cn_text_at[CN_TEXTS] = {\n%s\n};' % c_ints(starts))+ c.append('const char cn_text_data[%d] = {\n%s\n};' % (len(tdata), c_bytes(tdata)))+ ids = {'SPEC1': SPEC_IDS['spec1'], 'SPEC2': SPEC_IDS['spec2'], 'SPEC3': SPEC_IDS['spec3'], 'SPEC4': SPEC_IDS['spec4'],+ 'DIE0': RESPAWN_IDS[0], 'IDLE0': IDLE_IDS[0], 'BOSS': BOSS_ID, 'ENDGOOD': END_GOOD, 'ENDBAD': END_BAD}+ for k, v in ids.items():+ h.append('#define TX_%s %d' % (k, v))+ h.append('#define TX_DIES %d\n#define TX_IDLES %d' % (len(RESPAWN), len(IDLE)))+ h.append('#define CN_COLOURS %d' % len(COLOURS))+ h.append('extern const uint32_t cn_colours[CN_COLOURS];')+ c.append('const uint32_t cn_colours[CN_COLOURS] = {%s};' % ', '.join('0x%06X' % x for x in COLOURS))+ # fonts+ h.append('#define CN_FONTS %d\n#define FONT_HUD %d\n#define COLOUR_WHITE %d' % (len(FONT_SIZES), HUD_FONT, HUD_COLOUR))+ h.append('extern const np_font_t cn_fonts[CN_FONTS];')+ fdefs = []+ for i, (face, px) in enumerate(FONT_SIZES):+ first, count, asc, desc, glyphs, data = make_font(face, px, used_chars.get(i, set()) | set(' '))+ c.append('/* %s, %d pixels */' % (face, px))+ c.append('static const uint8_t font%d_data[%d] = {\n%s\n};' % (i, max(1, len(data)), c_bytes(data or b'\0')))+ c.append('static const np_glyph_t font%d_glyphs[%d] = {' % (i, count))+ for g in glyphs:+ c.append(' {%d, %d, %d, %d, %d, %d},' % g)+ c.append('};')+ fdefs.append(' {%d, %d, %d, %d, font%d_glyphs, font%d_data},' % (first, count, asc, desc, i, i))+ c.append('const np_font_t cn_fonts[CN_FONTS] = {\n%s\n};' % '\n'.join(fdefs))+ h.append('#endif')+ open(os.path.join(OUT, 'data.h'), 'w').write('\n'.join(h) + '\n')+ open(os.path.join(OUT, 'data.c'), 'w').write('\n'.join(c) + '\n')+ print('palette %d colours, tiles %d B, sprites %d B, maps %d B, scripts %d steps, texts %d B, fonts %s'+ % (len(PAL), len(pix), len(spx), len(blobs), len(script), len(tdata), FONT_SIZES))+++main()diff --git a/games/catninja/tools/icon.py b/games/catninja/tools/icon.pynew file mode 100644index 00000000..d25bc0fd--- /dev/null+++ b/games/catninja/tools/icon.py@@ -0,0 +1,37 @@+#!/usr/bin/env python3+"""Cat Ninja's icon (src/icon.png, 55 x 56) from the game's own pictures: the cat on its floor, before its grid.++ python3 -I tools/icon.py GAMESRC src/icon.png+"""+import os+import sys++from PIL import Image++SRC = os.path.expanduser(sys.argv[1])+IMG = os.path.join(SRC, 'ex/loader/image')+++def tex(name):+ for f in os.listdir(IMG):+ if f.endswith('Textures_' + name + 'class.png'):+ return Image.open(os.path.join(IMG, f)).convert('RGBA')+ raise KeyError(name)+++grid, ground, cat = tex('gridtile'), tex('groundtile'), tex('characteridle')+tint = ground.copy() # the map's colour at the start: red times 1.4+px = tint.load()+for y in range(tint.height):+ for x in range(tint.width):+ r, g, b, a = px[x, y]+ px[x, y] = (min(255, int(r * 1.4)), g, b, a)+icon = Image.new('RGBA', (55, 56))+for y in range(-8, 56, 20):+ for x in range(-6, 55, 20):+ icon.paste(grid, (x, y))+for x in range(-6, 55, 20):+ icon.paste(tint, (x, 42))+big = cat.resize((cat.width * 2, cat.height * 2), Image.NEAREST)+icon.alpha_composite(big, (5, 2))+icon.save(sys.argv[2])