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
Add Dune as a standalone NumWorks game
Bobydeluxec334e69bf3f0
diff --git a/.github/workflows/dune.yml b/.github/workflows/dune.ymlnew file mode 100644index 00000000..c10c994e--- /dev/null+++ b/.github/workflows/dune.yml@@ -0,0 +1,57 @@+name: Dune++on:+ pull_request:+ paths:+ - 'games/dune/**'+ - 'games/common/**'+ - 'tools/emu.py'+ - 'Makefile'+ - '.github/workflows/dune.yml'+ push:+ branches: [main]+ paths:+ - 'games/dune/**'+ - 'games/common/**'+ - '.github/workflows/dune.yml'+ workflow_dispatch:++permissions:+ contents: read++jobs:+ game:+ runs-on: ubuntu-24.04+ steps:+ - uses: actions/checkout@v4+ - name: ARM toolchain+ run: |+ v=15.2.1-1.1+ curl -fsSL "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v$v/xpack-arm-none-eabi-gcc-$v-linux-x64.tar.gz" | tar -xz -C "$RUNNER_TEMP"+ echo "$RUNNER_TEMP/xpack-arm-none-eabi-gcc-$v/bin" >> "$GITHUB_PATH"+ - uses: actions/setup-node@v4+ with:+ node-version: 20+ - uses: actions/setup-python@v5+ with:+ python-version: '3.12'+ - name: Tools+ run: |+ npm install -g [email protected]+ pip install pillow numpy pyelftools unicorn==2.1.4+ - name: Build and test Dune+ run: |+ make build/apps/Dune.nwa NWLINK=nwlink+ make -C games/dune check test NWLINK=nwlink+ make -C games/dune test-assets+ - name: Compare with the pinned original+ run: |+ mkdir -p build/dune-reference/js+ curl -fsSL "https://raw.githubusercontent.com/Gr4ys0n/Gr4ys0n.github.io/29006b0f11904704c390b457f7055c9fa1e53484/public/assets/games/dune/js/game.js" -o build/dune-reference/js/game.js+ make -C games/dune fidelity HOST_CC=cc+ - name: ARM profiles, saves and safe exit+ run: python3 games/dune/tests/test_arm.py --nwlink nwlink+ - uses: actions/upload-artifact@v4+ with:+ name: Dune+ path: build/apps/Dune.nwadiff --git a/Makefile b/Makefileindex 2b480adb..c0017452 100644--- a/Makefile+++ b/Makefile@@ -222,6 +222,7 @@ APP_sonic = games/sonic/output/sonic.nwa:SonicTheHedgehog.nwaAPP_cookieclicker = games/cookieclicker/output/cookieclicker.nwa:CookieClicker.nwaAPP_leveldevil = games/leveldevil/output/leveldevil.nwa:LevelDevil.nwaAPP_jetpackjoyride = games/jetpackjoyride/output/jetpackjoyride.nwa:JetpackJoyride.nwa+APP_dune = games/dune/output/dune.nwa:Dune.nwaapps: | $(B)$(MAKE) -C games/numdash build NWLINK="node node_modules/nwlink/bin/nwlink"@@ -282,6 +283,17 @@ $(STD_APPS): $(B)/apps/%.nwa: FORCE | $(B)$(MAKE) --no-print-directory -C games/$(APPID_$*) build NWLINK="$(NWLINK)"cp games/$(APPID_$*)/output/$(APPID_$*).nwa $@+# Dune is published as its own app.+.PHONY: check-dune+apps: $(B)/apps/Dune.nwa+$(B)/apps/Dune.nwa: FORCE | $(B)+ $(MAKE) --no-print-directory -C games/dune build NWLINK="$(NWLINK)"+ mkdir -p $(B)/apps+ cp games/dune/output/dune.nwa $@+check: check-dune+check-dune: $(B)/apps/Dune.nwa+ $(NWLINK) nwa-bin $< $(B)/apps/Dune.bin --ram-length $(UPSILON_RAM)+# ------------------------------------------------------------------ simulatorSIM_numdash = games/numdash/build/sim-module.oSIM_crossyroad = games/crossyroad/output/sim-module.o@@ -340,5 +352,6 @@ clean:-$(MAKE) -C games/cookieclicker clean-$(MAKE) -C games/leveldevil clean-$(MAKE) -C games/jetpackjoyride clean+ -$(MAKE) -C games/dune clean-cd games/tetris/tetris && $(CARGO) clean-$(foreach g,$(STD_GAMES),$(MAKE) -C games/$(g) clean;)diff --git a/README.md b/README.mdindex 5364bc78..08b5d686 100644--- a/README.md+++ b/README.md@@ -279,6 +279,7 @@ NumPlay is a fan project, made out of love for these games and for the NumWorks- **Subway Surfers** by SYBO and Kiloo inspired NumPlay's Subway Surfers: its people are fitted to the game's own 3D models and wear their textures, and its logo and item icons are the game's, as the [Subway Surfers Wiki](https://subwaysurf.fandom.com) shows them; the yard and the trains are drawn after the game. It is lettered in the **Lilita One** font by Juan Montoreano (SIL Open Font License, [license](LICENSES/OFL-1.1-LilitaOne.txt)). Not affiliated with them.- **Hill Climb Racing** by Fingersoft inspired NumPlay's Hill Climb Racing, which uses the game's own pictures from the [Hill Climb Racing Wiki](https://hillclimbracing.fandom.com), the **Teko** font (SIL Open Font License, [license](LICENSES/OFL-1.1-Teko.txt)) and **Box2D 2.2.1** by Erin Catto (zlib license, [license](games/hillclimb/src/box2d/License.txt)), the physics engine the game is built on. Not affiliated with Fingersoft.- **Jetpack Joyride** by Halfbrick inspired NumPlay's Jetpack Joyride, written in C for NumPlay with the game's own pictures (from Halfbrick's Facebook asset archive and the Android game) and its numbers, read from the game's files. **[Bobydeluxe](https://github.com/Bobydeluxe)** brought it to NumPlay. Not affiliated with Halfbrick.+- **[Bobydeluxe](https://github.com/Bobydeluxe)** made the **[Dune](games/dune/README.md)** NumWorks adaptation: Mountains and seven cosmetic balls with an English interface. It installs on its own as **Dune.nwa**, available from the releases once included. **Inlogic Software** made the original **Dune Rider**; the retained artwork and game data are credited in the game README. Not affiliated with Inlogic Software.- **[Level Devil](https://store.steampowered.com/app/3242750/)** by Unept: NumPlay's Level Devil is written in C with no code from the game, but its 80 rooms (their tiles, traps and timing) are the game's own, taken from its web build by games/leveldevil/tools/fetch.py, and its runner is drawn from the game's sprites.- **Pong** by Atari (1972) inspired NumPlay's 2 Players, with air hockey, tanks in a maze in the spirit of Tank Trouble and the light cycles of Tron. All four are written in C for NumPlay and drawn from shapes, with no code or art from them.diff --git a/games/dune/.gitignore b/games/dune/.gitignorenew file mode 100644index 00000000..fd6aad7f--- /dev/null+++ b/games/dune/.gitignore@@ -0,0 +1,2 @@+output/+__pycache__/diff --git a/games/dune/Makefile b/games/dune/Makefilenew file mode 100644index 00000000..a406356f--- /dev/null+++ b/games/dune/Makefile@@ -0,0 +1,53 @@+# Dune: native standalone arcade adaptation by Bobydeluxe.+.DEFAULT_GOAL := build+CC = arm-none-eabi-gcc+NWLINK ?= npx --yes -- [email protected]+PYTHON ?= python3+HOST_CC ?= cc+ARM_LD ?= arm-none-eabi-ld+OBJCOPY ?= arm-none-eabi-objcopy+SRC = src/main.c src/game.c src/save.c src/render.c src/assets.c+OBJECTS = $(patsubst src/%.c,output/%.o,$(SRC))+HEADERS = $(wildcard src/*.h) ../common/epsilon_app.h ../common/epsilon_files.h+PACKER = tools/compact_nwa.py tools/standalone.ld+ASSET_FILES = $(wildcard assets/*.png assets/*.json assets/sprites/*.png)+src/assets.c: tools/assets.py $(ASSET_FILES)+ $(PYTHON) tools/assets.py+CFLAGS = -std=c11 $(shell $(NWLINK) eadk-cflags-device) -Os -Wall -Wextra -Werror+CFLAGS += -ffunction-sections -fdata-sections -fstack-usage -fno-tree-loop-distribute-patterns+CFLAGS += -flto -fno-fat-lto-objects -fvisibility=internal+LINK = -nostartfiles --specs=nano.specs -Wl,--relocatable,--gc-sections,-e,main -flinker-output=nolto-rel+.PHONY: build check test test-arm fidelity test-assets assets clean+build: output/dune.nwa+output:+ mkdir -p $@+output/%.o: src/%.c $(HEADERS) | output+ $(CC) $(CFLAGS) -c $< -o $@+output/icon.o: src/icon.png | output+ $(NWLINK) png-icon-o $< $@+output/icon-compact.o: output/icon.o $(PACKER)+ $(PYTHON) tools/compact_nwa.py icon $< $@ --objcopy $(OBJCOPY)+output/dune-debug.nwa: $(OBJECTS) output/icon-compact.o $(PACKER)+ $(CC) $(CFLAGS) $(LINK) -Wl,-u,eadk_app_name,-u,eadk_app_icon,-u,eadk_api_level $(OBJECTS) output/icon-compact.o -lm -o output/standalone.o+ $(PYTHON) tools/compact_nwa.py app output/standalone.o $@ --ld $(ARM_LD)+output/dune.nwa: output/dune-debug.nwa $(PACKER)+ $(PYTHON) tools/compact_nwa.py release $< $@ --objcopy $(OBJCOPY)+check: build+ $(NWLINK) nwa-bin output/dune.nwa output/dune.bin --ram-length 107674+ $(NWLINK) nwa-bin output/dune-debug.nwa output/dune-debug.bin --ram-length 107674+ $(PYTHON) -c "from pathlib import Path; assert Path('output/dune.bin').read_bytes() == Path('output/dune-debug.bin').read_bytes()"+test: | output+ $(HOST_CC) -std=c11 -O2 -Wall -Wextra -Werror -Isrc tests/test.c src/game.c src/save.c src/render.c src/assets.c -lm -o output/test+ cd output && ./test+test-arm:+ $(PYTHON) tests/test_arm.py --nwlink "$(NWLINK)"+test-assets:+ $(PYTHON) tests/test_assets.py+fidelity: | output+ node tests/reference.cjs $(REFERENCE_JS)+ $(HOST_CC) -std=c11 -O2 -Wall -Wextra -Werror -Isrc tests/fidelity.c src/game.c src/assets.c -lm -o output/fidelity+ cd output && ./fidelity+assets:+ $(PYTHON) tools/assets.py+clean:+ rm -rf outputdiff --git a/games/dune/README.md b/games/dune/README.mdnew file mode 100644index 00000000..accc40b4--- /dev/null+++ b/games/dune/README.md@@ -0,0 +1,44 @@+# Dune++Native NumWorks adaptation **By Bobydeluxe**, based on the supplied [Dune Rider reference by Inlogic Software](https://github.com/Gr4ys0n/Gr4ys0n.github.io/tree/29006b0f11904704c390b457f7055c9fa1e53484/public/assets/games/dune).++Ride the dunes, release before the climb to take off, and hold in the air to dive onto a downslope. Crossing the height line gives 1–3 points according to launch speed. Long, fast slides earn the original Nice/Perfect Slide bonuses and momentum boosts. A hard landing on an uphill face ends the run. This compact edition retains only the original **second landscape, Mountains**, now free and always active. The shop contains **seven balls**: Basic Ball, Basketball, 8-Ball, Football, Donut, Smiley and Rainbow Bubble. Their original coin prices and cosmetic behaviour are retained.++| Key | Action |+| --- | --- |+| Hold OK, EXE or Shift | Speed up downhill / dive in the air |+| Release | Take off and preserve momentum |+| Back | Pause / return |+| Arrows and OK | Menu, shop, purchase and equip |+| 0 on the title screen | Controls |+| Home or Power | Save and exit |++Ball sprites, the Mountains artwork, terrain textures, icons, rotation flags, trail patterns, score rules and retained shop entries come from the reference. UI/title lettering uses antialiased Segoe UI rasterized independently at 13, 22 and 32 pixels, with no bitmap enlargement and no displaced text shadow. Single-pass labels and solid HUD backgrounds improve contrast. There are no browser, audio, advert or network dependencies. Coins, record, purchases and equipped items persist in a versioned, checked **40-byte** save. Purchases ask for confirmation; equipping an owned item is free. Storage-full handling preserves other calculator files.++The `DUN2` save format imports the original `DUN1` file automatically. Record, coins, runs and retained purchases survive. A removed equipped ball returns to Basic Ball. Removed ball purchases and previously purchased landscapes are refunded once in coins; the refund saturates safely at the wallet limit. Subsequent saves use the new catalog indices and cannot repeat the refund.++## Native physics and rendering++The world retains the original 665-pixel height, gravity 1,000, physical ball radius 42, terrain formula and coarse collision segments. Input acceleration, speed thresholds, altitude corrections, score thresholds, slide boosts and landing conditions follow the supplied JavaScript. A bounded circle/segment contact solver with four substeps replaces Phaser/p2. It preserves the mechanics and momentum but is not a bit-for-bit copy of p2's iterative contact solver. The camera keeps the original zoom rules and a view ahead of the ball. Simulation runs at 60 Hz; display updates target 30 Hz on all three calculator models.++Endless terrain uses nine reusable shapes and eight active segments. Coins use a fixed 32-entry pool. Long runs periodically shift world coordinates together to retain floating-point precision. Rotating balls and coloured triangular trails remain animated, including the Donut's hollow trail after catalog reindexing. The sole background is resized, precomposed and slowly scrolled; the original browser's separate moving layers/particles are consolidated for memory and storage. Terrain and ball movement remain continuous.++The release file is **71,444 bytes**, down from 211,996 bytes (**66.3% smaller**), including the new native-size font coverage masks. Removed landscapes, textures, thumbnails and ball sprites are omitted from both the source assets and compiled image. The retained background uses row-indexed RLE and a 32-colour RGB565 palette; sprites/textures use four-bit palette indices, and the icon uses the compact NWA packer. The renderer uses one 5,120-byte strip and a 460-byte row decoder; it never expands a complete background or framebuffer into RAM. Static app RAM remains **8,173 bytes**. No heap allocation is used during play.++## Build and validation++Requires Python with Pillow, Node.js, `[email protected]` and ARM embedded GCC. All imported PNG/JSON assets and generated C data are included. Building does not download the original game.++```sh+python build.py --arm-bin /path/to/arm/bin --nwlink /path/to/nwlink/bin/nwlink+make test HOST_CC=cc+make test-assets+make test-arm NWLINK=nwlink+make fidelity HOST_CC=cc REFERENCE_JS=/path/to/pinned/dune/js/game.js+```++The build produces `output/dune.nwa` and copies it to the repository's `build/apps/Dune.nwa`. Run host tests before ARM tests. The ARM tests use NumPlay's emulator and require Unicorn, pyelftools and Pillow. Fidelity tests execute the pinned original JavaScript's terrain generator and input handler, verifying their source digest first. They compare 100 full terrain curves/contact meshes and 1,000 control cases. These checks do not claim that the replacement contact solver reproduces every p2 trajectory. See [VALIDATION.md](VALIDATION.md).++The adaptation is local and independent of the launcher. Original game assets and data remain credited to their original authors and retain their rights. Inlogic's game is identified as Dune Rider, version 1.0.1, dated 20 April 2020 in its supplied script. Source revision/digest are recorded in `assets/provenance.json`; original catalog IDs are retained for migration. UI font masks are pre-baked in `assets/ui-fonts.json`; an installed font is not needed to build. `tools/import_fonts.py` regenerates these masks from supplied regular/bold TTF files. NumPlay's common app/file helpers and compact packaging tools retain their existing notices.++This fan adaptation is not affiliated with Inlogic Software. UI masks are rasterized from Microsoft Segoe UI; no TTF files are distributed. Borrowed artwork and lettering retain their original rights.diff --git a/games/dune/VALIDATION.md b/games/dune/VALIDATION.mdnew file mode 100644index 00000000..9d5a2393--- /dev/null+++ b/games/dune/VALIDATION.md@@ -0,0 +1,32 @@+# Validation — Dune++Validated on 21 October 2026 with GCC 15.2.1 (ARM), GCC 16.2 (host), nwlink 1.0.0 and NumPlay's Unicorn-based ARM emulator. The supplied Dune Rider script is pinned in `assets/provenance.json`.++| Check | Result |+| --- | --- |+| Actual original JavaScript | 100 terrain curves/contact meshes match within 0.000164 world pixels; 1,000 original input cases match |+| Playability | 120 deterministic terrain seeds, 73,448 simulated frames; jumps, uphill crash conditions, score and coins all exercised |+| Recorded extremes | Best bot score 50, 90 coins in one run, 70 recycled segments; maximum surviving run 2,175 frames |+| Endless state | Bounded terrain/coin pools; coordinate rebasing retains valid world state |+| Shop | Exactly seven balls, original prices, ownership, free equip and insufficient-funds rules checked; Mountains is the only landscape |+| Actual ARM shop | Buy, cancel, insufficient funds, balance deduction and free equip pass; the removed landscape category cannot be reopened |+| Original saves | Every old ball selection tested, retained IDs mapped, removed purchases refunded once, saturated wallet safe; actual ARM save/reload migration passes |+| Packed background | All 110,400 Mountains pixels decode to the expected palette indices; row offsets/runs and RGB565 palette checked |+| Save data | Round-trip and every-byte corruption rejection; invalid ownership/equipment rejected |+| Actual ARM app | N0110, N0115, N0120 Epsilon memory profiles and the smaller Upsilon profile pass |+| Pause / exit | Frozen physics; save reload; held-key handling; clean app RAM and unchanged firmware RAM |+| Filesystem | Other files preserved, including on a completely full storage volume |+| Rendering | Seven balls and Mountains, rotating patterned trails and 32 visible coins; maximum observed draw time 20 ms |+| Release packing | Installed release/debug bytes are identical at the 107,674-byte RAM budget |++Text uses separate native-size 13/22/32-pixel antialiased masks. The old one-pixel text shadow and bitmap enlargement are removed. Menus, help, HUD, purchase dialog and shop were inspected at native resolution. Gameplay input and terrain tests retain the same results as the previous build.++Release: **71,444 bytes**; installed image: **63,857 bytes**; static app RAM (`.data` + `.bss`): **8,173 bytes**; deepest measured stack: **448 bytes**. No heap is used. The icon remains in flash and is not counted as static RAM. The release is **66.3% smaller** than the previous 211,996-byte version.++SHA-256: `06518c09f8fea232bf1a6d3723c26feb38b0f422338a0a7087efbe970d59c5cf`.++The retained 32-colour Mountains background differs from its intermediate 64-colour rendering by an average of **1.635 per RGB channel out of 255**. Quantization affects scenery; physics uses independent world coordinates. Ball artwork is resized and palette-packed. Full p2 trajectory equality is not claimed: the native bounded circle/segment contact solver replaces the browser engine.++Machine-readable results are in [docs/validation.json](docs/validation.json). ARM timing is measured in the emulator; actual LCD/firmware overhead is not a hardware benchmark. N0115 testing uses its memory budget with the emulator's compatible N0110 processor profile. The target is a 60 Hz simulation and 30 Hz display; physical playtesting is the final check for perceived smoothness.++The published artifact is built against the upstream common safety helpers at `979c19e828fee928d2d9b2843f8a2f6f2fea500e`.diff --git a/games/dune/assets/background1.png b/games/dune/assets/background1.pngnew file mode 100644index 00000000..9a9dcc27Binary files /dev/null and b/games/dune/assets/background1.png differdiff --git a/games/dune/assets/catalog.json b/games/dune/assets/catalog.jsonnew file mode 100644index 00000000..ae3f9230--- /dev/null+++ b/games/dune/assets/catalog.json@@ -0,0 +1,118 @@+{+ "balls": [+ {+ "rotates": false,+ "spriteName": "",+ "name": "Basic_Ball",+ "price": 0,+ "trailData": {+ "gradient_type": 0,+ "colors": [+ "#ffffff"+ ]+ },+ "original_id": 0+ },+ {+ "rotates": true,+ "spriteName": "",+ "name": "Basketball",+ "price": 100,+ "trailData": {+ "gradient_type": 0,+ "colors": [+ "#ff5900"+ ]+ },+ "original_id": 5+ },+ {+ "rotates": true,+ "spriteName": "",+ "name": "8-Ball",+ "price": 100,+ "trailData": {+ "gradient_type": 1,+ "height": 50,+ "colors": [+ "#89ceff",+ "#000000",+ "#89ceff"+ ]+ },+ "original_id": 6+ },+ {+ "rotates": true,+ "spriteName": "",+ "name": "Football",+ "price": 100,+ "trailData": {+ "gradient_type": 2,+ "colors": [+ "#ffffff",+ "#000000"+ ]+ },+ "original_id": 7+ },+ {+ "rotates": true,+ "spriteName": "",+ "name": "Donut",+ "price": 500,+ "trailData": {+ "gradient_type": 0,+ "colors": [+ "#ffffff",+ "#e91e7f",+ "#ec8d45",+ "#ec8d45"+ ]+ },+ "original_id": 13+ },+ {+ "rotates": false,+ "spriteName": "",+ "name": "Smiley",+ "price": 1000,+ "trailData": {+ "gradient_type": 1,+ "colors": [+ "#f8ba1e"+ ]+ },+ "original_id": 18+ },+ {+ "rotates": true,+ "spriteName": "",+ "name": "Rainbow Bubble",+ "price": 1500,+ "trailData": {+ "gradient_type": 0,+ "height": 52,+ "colors": [+ "#0042ff",+ "#b900ff",+ "#ff0058",+ "#ffe700",+ "#90ff61"+ ]+ },+ "original_id": 23+ }+ ],+ "landscapes": [+ {+ "name": "Mountains",+ "price": 0,+ "surfaceColor": "#ccf173",+ "lineColor": "#ccf173",+ "skyColor": "#56a5d2",+ "groundColor": "#332a21",+ "original_id": 1+ }+ ]+}diff --git a/games/dune/assets/earth1.png b/games/dune/assets/earth1.pngnew file mode 100644index 00000000..845c0b65Binary files /dev/null and b/games/dune/assets/earth1.png differdiff --git a/games/dune/assets/legacy-shop.json b/games/dune/assets/legacy-shop.jsonnew file mode 100644index 00000000..c5d846c4--- /dev/null+++ b/games/dune/assets/legacy-shop.json@@ -0,0 +1,39 @@+{+ "ball_prices": [+ 0,+ 50,+ 50,+ 50,+ 50,+ 100,+ 100,+ 100,+ 250,+ 250,+ 250,+ 500,+ 500,+ 500,+ 500,+ 750,+ 750,+ 750,+ 1000,+ 1000,+ 1000,+ 1500,+ 1500,+ 1500,+ 3000,+ 5000+ ],+ "scene_prices": [+ 0,+ 100,+ 150,+ 300,+ 400,+ 500,+ 600+ ]+}diff --git a/games/dune/assets/provenance.json b/games/dune/assets/provenance.jsonnew file mode 100644index 00000000..e3942b38--- /dev/null+++ b/games/dune/assets/provenance.json@@ -0,0 +1,6 @@+{+ "repository": "https://github.com/Gr4ys0n/Gr4ys0n.github.io",+ "path": "public/assets/games/dune",+ "commit": "29006b0f11904704c390b457f7055c9fa1e53484",+ "javascript_sha256": "436da2b98af4b7963237066679a8c4a9f41ef69e78a51ea426d018517d691f76"+}diff --git a/games/dune/assets/sprites.json b/games/dune/assets/sprites.jsonnew file mode 100644index 00000000..72c7a128--- /dev/null+++ b/games/dune/assets/sprites.json@@ -0,0 +1,80 @@+[+ {+ "name": "B_8-Ball",+ "file": "B_8-Ball.png",+ "w": 22,+ "h": 22+ },+ {+ "name": "B_Basic_Ball",+ "file": "B_Basic_Ball.png",+ "w": 22,+ "h": 22+ },+ {+ "name": "B_Basketball",+ "file": "B_Basketball.png",+ "w": 22,+ "h": 22+ },+ {+ "name": "B_Donut",+ "file": "B_Donut.png",+ "w": 22,+ "h": 22+ },+ {+ "name": "B_Football",+ "file": "B_Football.png",+ "w": 22,+ "h": 22+ },+ {+ "name": "B_Rainbow Bubble",+ "file": "B_Rainbow_Bubble.png",+ "w": 22,+ "h": 22+ },+ {+ "name": "B_Smiley",+ "file": "B_Smiley.png",+ "w": 22,+ "h": 22+ },+ {+ "name": "PLAY",+ "file": "PLAY.png",+ "w": 60,+ "h": 60+ },+ {+ "name": "Shop",+ "file": "Shop.png",+ "w": 60,+ "h": 60+ },+ {+ "name": "Score_Coin",+ "file": "Score_Coin.png",+ "w": 14,+ "h": 14+ },+ {+ "name": "crown",+ "file": "crown.png",+ "w": 15,+ "h": 10+ },+ {+ "name": "Pause",+ "file": "Pause.png",+ "w": 13,+ "h": 13+ },+ {+ "name": "Balls",+ "file": "Balls.png",+ "w": 28,+ "h": 28+ }+]diff --git a/games/dune/assets/sprites/B_8-Ball.png b/games/dune/assets/sprites/B_8-Ball.pngnew file mode 100644index 00000000..035a4aa6Binary files /dev/null and b/games/dune/assets/sprites/B_8-Ball.png differdiff --git a/games/dune/assets/sprites/B_Basic_Ball.png b/games/dune/assets/sprites/B_Basic_Ball.pngnew file mode 100644index 00000000..8acb02aeBinary files /dev/null and b/games/dune/assets/sprites/B_Basic_Ball.png differdiff --git a/games/dune/assets/sprites/B_Basketball.png b/games/dune/assets/sprites/B_Basketball.pngnew file mode 100644index 00000000..ba1fc237Binary files /dev/null and b/games/dune/assets/sprites/B_Basketball.png differdiff --git a/games/dune/assets/sprites/B_Donut.png b/games/dune/assets/sprites/B_Donut.pngnew file mode 100644index 00000000..f50d3efcBinary files /dev/null and b/games/dune/assets/sprites/B_Donut.png differdiff --git a/games/dune/assets/sprites/B_Football.png b/games/dune/assets/sprites/B_Football.pngnew file mode 100644index 00000000..cdca72a5Binary files /dev/null and b/games/dune/assets/sprites/B_Football.png differdiff --git a/games/dune/assets/sprites/B_Rainbow_Bubble.png b/games/dune/assets/sprites/B_Rainbow_Bubble.pngnew file mode 100644index 00000000..4ac96549Binary files /dev/null and b/games/dune/assets/sprites/B_Rainbow_Bubble.png differdiff --git a/games/dune/assets/sprites/B_Smiley.png b/games/dune/assets/sprites/B_Smiley.pngnew file mode 100644index 00000000..74b3fb05Binary files /dev/null and b/games/dune/assets/sprites/B_Smiley.png differdiff --git a/games/dune/assets/sprites/Balls.png b/games/dune/assets/sprites/Balls.pngnew file mode 100644index 00000000..8d8a3668Binary files /dev/null and b/games/dune/assets/sprites/Balls.png differdiff --git a/games/dune/assets/sprites/PLAY.png b/games/dune/assets/sprites/PLAY.pngnew file mode 100644index 00000000..b24fc36fBinary files /dev/null and b/games/dune/assets/sprites/PLAY.png differdiff --git a/games/dune/assets/sprites/Pause.png b/games/dune/assets/sprites/Pause.pngnew file mode 100644index 00000000..638073eeBinary files /dev/null and b/games/dune/assets/sprites/Pause.png differdiff --git a/games/dune/assets/sprites/Score_Coin.png b/games/dune/assets/sprites/Score_Coin.pngnew file mode 100644index 00000000..b826de69Binary files /dev/null and b/games/dune/assets/sprites/Score_Coin.png differdiff --git a/games/dune/assets/sprites/Shop.png b/games/dune/assets/sprites/Shop.pngnew file mode 100644index 00000000..086e0414Binary files /dev/null and b/games/dune/assets/sprites/Shop.png differdiff --git a/games/dune/assets/sprites/crown.png b/games/dune/assets/sprites/crown.pngnew file mode 100644index 00000000..626b9e29Binary files /dev/null and b/games/dune/assets/sprites/crown.png differdiff --git a/games/dune/assets/ui-fonts.json b/games/dune/assets/ui-fonts.jsonnew file mode 100644index 00000000..bceaac94--- /dev/null+++ b/games/dune/assets/ui-fonts.json@@ -0,0 +1 @@+[{"size":13,"source":"segoeui.ttf","glyphs":[[0,0,0,0,0,5],[0,2,9,1,0,5],[9,4,3,1,0,6],[15,8,8,0,0,9],[47,6,11,1,-1,8],[80,11,9,0,0,12],[130,11,9,0,0,11],[180,1,3,1,0,4],[182,4,11,0,0,5],[204,4,11,0,0,5],[226,5,4,0,0,6],[236,7,7,1,1,10],[261,2,3,0,8,4],[264,5,1,0,4,6],[267,3,2,0,7,4],[270,7,11,-1,0,6],[309,7,9,0,0,8],[341,4,9,1,0,8],[359,7,9,0,0,8],[391,7,9,0,0,8],[423,7,9,0,0,8],[455,6,9,1,0,8],[482,7,9,0,0,8],[514,7,9,0,0,8],[546,7,9,0,0,8],[578,7,9,0,0,8],[610,3,7,0,2,4],[621,3,9,0,2,4],[635,7,6,1,2,10],[656,7,4,1,3,10],[670,7,6,1,2,10],[691,6,9,0,0,7],[718,11,10,1,0,13],[773,9,9,0,0,9],[814,6,9,1,0,8],[841,8,9,0,0,9],[877,8,9,1,0,10],[913,6,9,1,0,8],[940,5,9,1,0,7],[963,8,9,0,0,10],[999,8,9,1,0,10],[1035,2,9,1,0,4],[1044,4,9,0,0,6],[1062,7,9,1,0,9],[1094,5,9,1,0,7],[1117,10,9,1,0,13],[1162,8,9,1,0,11],[1198,10,9,0,0,11],[1243,6,9,1,0,8],[1270,10,10,0,0,11],[1320,7,9,1,0,9],[1352,7,9,0,0,8],[1384,7,9,0,0,8],[1416,7,9,1,0,10],[1448,8,9,0,0,9],[1484,12,9,0,0,13],[1538,8,9,0,0,9],[1574,8,9,0,0,8],[1610,8,9,0,0,8],[1646,3,11,1,0,5],[1663,7,11,-1,0,6],[1702,3,11,0,0,5],[1719,7,5,1,0,10],[1737,6,1,0,10,6],[1740,3,2,0,-1,4],[1743,6,7,0,2,8],[1764,7,10,1,-1,9],[1799,6,7,0,2,7],[1820,7,10,0,-1,9],[1855,7,7,0,2,8],[1880,5,10,0,-1,5],[1905,7,10,0,2,9],[1940,6,10,1,-1,8],[1970,3,10,0,-1,4],[1985,5,13,-2,-1,4],[2018,6,10,1,-1,7],[2048,2,10,1,-1,4],[2058,10,7,1,2,12],[2093,6,7,1,2,8],[2114,7,7,0,2,9],[2139,7,10,1,2,9],[2174,7,10,0,2,9],[2209,4,7,1,2,6],[2223,5,7,0,2,7],[2241,5,9,0,0,5],[2264,7,7,0,2,8],[2289,7,7,0,2,7],[2314,10,7,0,2,10],[2349,6,7,0,2,7],[2370,7,10,0,2,7],[2405,6,7,0,2,7],[2426,4,11,0,0,5],[2448,2,13,1,-1,4],[2461,4,11,0,0,5],[2483,7,2,1,4,10]],"pixels":"b5a5a5a5949400a5a5e0d1e0d1e0d1001b0a2000570c004ffffff500a2470000c07400bfffffd00480c0000842a00000a0002bfe60b8a370e3a000abb00008e81000aac000a0e292a5e18efc3000a00009ec20095004b17904a0007602a0c10005a1788600000aeb4b4de600000b2d32d0000771c00b2002b00d32d000b2005ed500006de90000001e31c5000001e00b30c30008cc500c2004c7bb11d001e2008c78003d0000be1001e6115de51003ceea33de20eee0008702c009500d100d001c001d000d10095002c0008687000c20068002c000e000d100e002c006800c20770000a205ab7b04b9109182000d000000d000000d0008fffff7000d000000d000000d00002c67921fff602d02d000001d000006800000c200003c000009600001d100006900000c300003c000009600001d10000002bfd300c717e03d000d46a000a679000976a000a53d000d30d717c002cfb20015a97989007900790079007900790079007906deb2009218b000002e000005b00003d20006c20008900002d000004fffff5007dea100821b8000006a00002c4005ff90000029b000001f037118b01beea1000001e600008e60003ca6001c396009709607a00960efffff80000960000096008fffb0960000a40000bfea200029c00000f10001f1921ab0aee910006dfc005c30000d300002d9ed604f714e34e000a62e000a60b814e101bfc4006fffff600002d10000a600002d000009700001e100005b00000a600000d3000002bec300c717d00f100f10a716b003eff302e414d26b000b63e414e305ded50003cec201d517c05b000d35b000c52e516f504dfac400001e10002b700bed70002d02d00000000002d02d002d02d00000000000002c0670920000002930018c4007c60002ba3000003ab4000003a38fffff7000000000000008fffff7491000005c71000006c600003ba104ba30049200001aee702713e20001d1001b4000b40000e00000000000c30000c300003aefd920006d51138d303d13ceb64c0a50d41c40b3d04a0093085d05800c20a3b33c15d44c05b09ea4ec3009c41000000005befeb0000009e0000000eb5000005b6b00000b61f20002f10b70008b006d000dfffff404e1000aa0a800003f10cffd70c403e3c400c4c405c0cfff70c402b8c4005bc402b8cffe80003aeea104e721650d5000004e0000006b0000005d0000001f40000007e61165005cfd91cffec600c4025da0c40002e3c40000b7c40000a7c40000c6c40003e1c4026e60cffea300cfffc0c40000c40000c40000cfff80c40000c40000c40000cffff0cfffcc4000c4000c4000cfff8c4000c4000c4000c40000003aefd704e721490d5000004d0000006b001fff5d00001f1e40001f07e6114f005ceec6c40000f0c40000f0c40000f0c40000f0cffffff0c40000f0c40000f0c40000f0c40000f0c4c4c4c4c4c4c4c4c400880088008800880088008800a602e2cd60c4008b0c406c10c44d200c6d2000cd90000c5d6000c42e500c404e30c4006e20c4000c4000c4000c4000c4000c4000c4000c4000cfffe0cc000002f7ce400008e7c9b0001da7c4d3007997c37900d297c31e15a097c3087c3097c302ec0097c300a50097cd100088cd800088c5e30088c46c0088c40b7088c402e288c4006c88c4000bd8c40002e8005ceeb40006e6116e401e400006d04d000001f26b000000e35d000001f11f400006c007e5127e40005cfeb300cffd80c403d6c4006bc4007ac404d4cffc50c40000c40000c40000005ceeb40006e6116e401e400006d04d000001f26b000000e35d000001f11f400006c007e5127e30005cfeec1000000019e5cffe900c402c70c400790c403d50cffe400c41b800c401e30c4006c0c4000c6003bee701e512902e000000cb2000018e9100001ac000000e337204e21aeec400bfffff9002e000002e000002e000002e000002e000002e000002e000002e0000e20003de20003de20003de20003de20003de30004cc50006a6d313d507dec600b700006b5c0000b60e3002e1098007a004d00c4000d33d0000898800002dd200000cb000a70007c0005d6b000ce200981f101ea600d40c505a6a02e00890a52e06a003d0e10d3a6000e6c0087e20009d7004dd00005f3000e8004e1002e20a900b7001e35c00006bd300000eb000007ad40003e25d000c600b807c0002e3a80004d02e100b500a703d0003e1b50000a9d000003f5000000e2000000e2000000e20005fffffe100000c40000089000003d100001d30000098000004c000001d300000affffff0bf9b30b30b30b30b30b30b30b30b30bf901d10000096000003c000000c20000068000001d000000a5000004b000000d20000077000002d00afa04a04a04a04a04a04a04a04a04aafa0002c00000ab60003b1c100b306904a000c30fffff62c104906deb10831b800006a05adfb4d426b5c22bb1bec7be100000e100000e100000e4cea10eb21a90e3002e0e1001f0e3004d0ea12c70e6ee80001aee50b91363d00005b00004d00000d813602bed400000790000079000007902bec890c713e93d000895b000794c000991e614d904cea7902bec300c715d03d000d35fffff44c000000d6100003cee90001be407a0008700afff008700087000870008700087000870002cfc890c813e93d000895b000794c000991e614d904cea8900000a700016e10beec30e10000e10000e10000e5de90ea13e4e300a6e10097e10097e10097e100970c20000000e10e10e10e10e10e10e1000c20000000000000e1000e1000e1000e1000e1000e1000e1001f0007b03ec200e10000e10000e10000e109b0e16c10e6d200ee7000e4e400e15e30e107d2e1e1e1e1e1e1e1e1e1e1e5de54de70e915eb13f1e300e400c4e100d300b4e100d300b4e100d300b4e100d300b4e5de80ea13e3e300a6e10097e10097e10097e1009702aed800c812c83d0003d5b0001f4d0003d0d812c702bed700e4cea10eb21a90e3002e0e1001f0e3004d0ea12c70e6de800e100000e100000e10000002bec890d713e93d000895b000794c000991e614d904cea79000007900000790000079e6e6ea10e300e200e100e100e10007ee83d1003e30006db20007c0005d4efc400760009700bfff1097000970009700097000890003de101e000b51e000b51e000b51e000b50f000d50d716e504de8b50b6002e06b007901e10c400a52d0005a770000eb200009b0000b600c600e26901ea02c02d068d06800d2a3b3a40096c077d0005c903cb0001f500e7007b00970c43d004cb4000cc0003cc300d44c08a00b7b6001e15b006a01e10b500a61d0004a680000db300008c000009700004e1000ad400006ffff70004c0001d2000a70005b0001d2000affff801b705b0068006800a606d100a600680068005b001b7e0e0e0e0e0e0e0e0e0e0e0e0e08b001b4008500850069001d50790085008500b408b002de82779629ec1"},{"size":22,"source":"segoeuib.ttf","glyphs":[[0,0,0,0,0,6],[0,5,16,1,0,7],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[40,12,10,2,5,16],[1132,10,16,0,0,10],[100,7,2,1,9,9],[107,4,4,1,12,6],[115,11,18,-1,0,10],[214,12,16,0,0,13],[310,7,16,2,0,13],[366,12,16,0,0,13],[462,11,16,1,0,13],[550,13,16,0,0,13],[654,11,16,1,0,13],[742,11,16,1,0,13],[830,11,16,1,0,13],[918,12,16,0,0,13],[1014,12,16,0,0,13],[1110,4,11,1,5,6],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1212,16,16,0,0,15],[1340,13,16,1,0,14],[1444,13,16,0,0,14],[1548,15,16,1,0,16],[1668,10,16,1,0,12],[1748,10,16,1,0,11],[1828,15,16,0,0,16],[1948,15,16,1,0,17],[2068,5,16,1,0,7],[2108,9,16,0,0,10],[2180,14,16,1,0,14],[2292,10,16,1,0,11],[2372,19,16,1,0,21],[2524,15,16,1,0,17],[2644,16,16,0,0,17],[2772,12,16,1,0,14],[2868,18,18,0,0,17],[3030,14,16,1,0,14],[3142,11,16,1,0,12],[3230,13,16,0,0,13],[3334,14,16,1,0,16],[3446,15,16,0,0,15],[3566,22,16,0,0,22],[3742,15,16,0,0,14],[3862,14,16,0,0,13],[3974,13,16,0,0,13],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10],[1132,10,16,0,0,10]],"pixels":"3fff52fff51fff41fff30fff30fff20eff10eff10dff00cff0000000000009eb14fff74fff709eb100004fd0000000004fd0000000004fd0000000004fd000007ffffffffff07ffffffffff000004fd0000000004fd0000000004fd0000000004fd000007fffff67fffff65ed4effdeffd5ed400000004ffc0000000aff60000002ffe10000008ff80000000eff20000005ffb0000000bff40000002ffd00000009ff70000001eff10000006ff90000000cff30000004ffc0000000aff60000001ffe00000007ff80000000dff20000005ffb000000000029dfd9200004efffffe3001efffffffc007fff519fff40cffa001eff81fff6000bffb3fff40009ffd3fff30008ffd4fff30008ffd3fff40009ffc2fff6000bffa0eff9001eff70afff419fff203ffffffffa0007ffffffc100005befd81000004cfe16bfffebfffffebffeffeab57ffe0007ffe0007ffe0007ffe0007ffe0007ffe0007ffe0007ffe0007ffe0007ffe0007ffe0007ffe0039defd920005fffffffe2005ffffffffb005a4203cfff100000005fff200000006fff10000001dffb0000001bfff3000003dfff6000005effe5000005fffc2000002eff90000000affc00000000efffffffff21ffffffffff22ffffffffff205bdfec60002fffffffb002ffffffff602a4116fff90000000eff70000028fff2003fffffe50003ffffe600003ffffffc20000027fffa00000008ffe00000008fff1973115effd0bffffffff70bfffffffa0039defda40000000003fff400000000bfff400000004ffff40000000dffff40000008ffeff4000003ff9dff400001dfe1dff40000aff50dff40007ff900dff4004ffc100dff4009fffffffffff19fffffffffff19fffffffffff10000000dff4000000000dff4000000000dff4000afffffff800bfffffff800cfffffff800dfe00000000efc00000000ffb00000001fffffd81002fffffffe203ffffffffb0121015efff10000005fff30000006fff2683115effd07ffffffff607fffffff80029defda400000017ceed80003dfffffc002effffffc00bfff8213602fff70000007ffd0000000bff94cee910dffafffffd1efffffffff7dffe413dffccff90007ffd9ffa0007ffd5fff514eff90cffffffff202effffff500019dfea300ffffffffffbffffffffffbffffffffff80000002ffe1000000aff80000003ffe1000000bff80000003fff2000000affa0000001fff50000006ffe1000000bffa0000001fff60000005fff20000008ffe0000000bffc000000004befd9200007fffffff4003ffffffffe008ffe416fff408ff9000cff404ffc002efe1009ffdaefe400009fffff300009fffffff5008ffc204eff30eff30008ff92fff30008ffb1fffb214effa0afffffffff401cfffffff800006cefda4000004befd7000007ffffffc1004ffffffff900bffd31afff10fff5001eff52fff3000cff82fff5000dff90effd318fffa08fffffffff901dffffdcff70019eeb2dff500000005ffe10372016eff9004fffffffe1004ffffffd300029deec810005ed4effdeffd5ed40000000000005ed4effdeffd5ed416bdfda4005fffffff605fffffffe05a411afff2000003fff2000008ffc000006fff300007ffe400002ffe2000006ff70000005ff700000000000000001be90000008fff4000008fff4000001be90000000007fffe10000000000cffff50000000002fffffa0000000008ffafff100000000dff4eff600000003ffe0affb00000008ffb06fff1000000eff601fff6000004fff200cffb000009ffd0008fff10000effffffffff60005fffffffffffc000affffffffffff201effc000006fff706fff6000001effc0bfff1000000afff24ffffffec71004fffffffffd104ffffffffff804fff4017fffa04fff4000fff804fff4018ffe104ffffffffb2004ffffffffa4004ffffffffff604fff4014effe14fff40006fff34fff40007fff44fff4015efff24ffffffffffb04fffffffffd104ffffffec7100000005adefdb60002cfffffffc002effffffffc00cfffc51126a06fffa00000000cffe100000001fffa000000002fff7000000003fff7000000002fff9000000000effe100000000afff9000000003ffffb41137a007fffffffffc0007ffffffffc000028cefeda44ffffffec9300004ffffffffffa1004fffffffffffc004fff40139ffff704fff400005fffe04fff400000bfff34fff4000006fff54fff4000004fff64fff4000004fff54fff4000006fff44fff400000cfff14fff400007fffa04fff40139ffff304fffffffffff6004fffffffffe50004ffffffeb7100004ffffffffa4ffffffffa4ffffffffa4fff4000004fff4000004fff4000004ffffffff44ffffffff44ffffffff44fff4000004fff4000004fff4000004fff4000004fffffffff4fffffffff4fffffffff4ffffffffa4ffffffffa4ffffffffa4fff4000004fff4000004fff4000004fff4000004ffffffff44ffffffff44ffffffff44fff4000004fff4000004fff4000004fff4000004fff4000004fff4000000000049cefec9400001bffffffffa0002dfffffffffa000cfffc5102489006fffb0000000000cffe10000000001fffa00000000002fff7002ffffff63fff7002ffffff62fff9002ffffff60effd000001fff609fff800001fff602ffffa3114fff6006fffffffffff60006efffffffff5000017beffdb7204fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fffffffffffff14fffffffffffff14fffffffffffff14fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fff4000006fff14fff44fff44fff44fff44fff44fff44fff44fff44fff44fff44fff44fff44fff44fff44fff44fff400004fff300004fff300004fff300004fff300004fff300004fff300004fff300004fff300004fff300004fff300006fff200009fff07316fffb0affffff40afffff8006dfeb50004fff40005fffb04fff4001effe204fff4009fff5004fff404fffa0004fff41dffd10004fff48fff400004fff6fff8000004fffdffe0000004fffcfff5000004fff5effe200004fff45fffb00004fff40bfff60004fff402effe2004fff4006fffc004fff4000cfff804fff40002ffff34fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004fff4000004ffffffffe4ffffffffe4ffffffffe4ffffe1000000cffff54fffff5000002fffff54fffffa000007fffff54ffdffe10000cfdfff54ffcdff50002ffafff54ffd9ffa0007ff6fff54ffd4ffe100cfe2fff54ffd0dff502ffa2fff54ffd08ffa07ff52fff54ffd03ffe0cfe12fff54ffd00dff5ffa02fff54ffd008ffcff502fff54ffd003ffffe102fff54ffd000dfffa002fff54ffd0008fff5002fff54ffd0003ffe1002fff54fffc000000aff94ffff700000aff94ffffe20000aff94fffffa0000aff94fffeff5000aff94fff8ffd100aff94fff1dff900aff94fff04fff30aff94fff009ffc0aff94fff001eff7aff94fff0005ffebff94fff0000bfffff94fff00002effff94fff000007ffff94fff000000cfff94fff0000003fff9000017befeb600000004efffffffd300004ffffffffffe2001efff8203afffc007fff700000bfff40dffd0000003fff91fff90000000effc2fff70000000cffd3fff70000000cffd2fff90000000effb0effd0000003fff809fff600000bfff302ffff8203afffb0006ffffffffffd100006efffffffc200000018cefda500004ffffffeb5004fffffffffa04ffffffffff64fff4029fffc4fff4000cffe4fff4000afff4fff4000cffd4fff4029fff94fffffffffe24ffffffffe404fffffec82004fff400000004fff400000004fff400000004fff400000004fff40000000000017befeb60000000004efffffffd30000004ffffffffffe200001efff8203afffc00007fff700000bfff4000dffd0000003fff9001fff90000000effc002fff70000000cffd003fff70000000cffd001fff90000000effb000effd0000002fff80009fff700000afff30002ffff8203afffb000006ffffffffffd10000006effffffffd1000000018cefedfffd10000000000001cfffc10000000000001dfffc14ffffffeb600004fffffffffc1004ffffffffff7004fff4017fffc004fff4000dffd004fff4000effb004fff402afff5004fffffffffa0004fffffffd600004fffffffe400004fff41bfff30004fff401effd0004fff4006fff7004fff4000cfff204fff40003fffb04fff400009fff6004adffeb600afffffffd07ffffffffd0dffe51026a0fffb0000000dfff60000008ffffc500001bfffffd400008efffff6000017effff2000001bfff78000002fff8ec51029fff6effffffffe1effffffff5039cefdc8200afffffffffff9afffffffffff9afffffffffff900004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff3000000004fff300006fff100002fff56fff100002fff56fff100002fff56fff100002fff56fff100002fff56fff100002fff56fff100002fff56fff100002fff56fff100002fff56fff100003fff45fff300004fff32fff800009fff00dfff6117fffb006ffffffffff30009ffffffff6000004adfed92000bffe0000003fff66fff4000007fff21fff800000bffb00bffd00001fff6006fff20005fff2001fff60009ffb0000bffb000eff600007fff103fff200002fff407ffc000000cff90cff70000007ffd1fff20000002fff7ffc00000000cffdff7000000007fffff2000000002ffffc0000000000cfff700000afff100009fff50000affc7fff40000dfff90000dff83fff70002ffffd0001fff40effa0006fffff1004fff10affe000affcff5007ffc006fff200efe9ff800aff8003fff503ffa6ffc00dff4000eff807ff62fff01fff1000affb0bff20dff44ffb00006ffe0efe009ff77ff700002fff5ffa006ffbaff400000effaff6002ffdcfe000000affeff2000dffefb0000006ffffd00009ffff70000002ffff900006ffff30000000dfff600002fffe00004fffe00000dffd10afff60007fff5002fffd001effb00008fff507fff300001effc1eff90000007fff8ffe10000000dfffff6000000005ffffd0000000005ffffd100000001dfffff800000009ffe8fff2000003fff81effa00000cffe108fff40006fff7001effd001effe10008fff70afff700001effe1cfff300008fff24fff90000effa00cffe1005fff2005fff600cffa0000dffc03fff300006fff49ffa000000eff9eff30000007fffffb00000001effff4000000008fffb0000000002fff60000000002fff50000000002fff50000000002fff50000000002fff50000000002fff5000000fffffffffffc0fffffffffffc0fffffffffff800000001effc00000000bffe200000007fff600000003fffa00000001dffe10000000afff400000006fff900000002effd10000000cfff300000009fff700000004fffffffffffd8fffffffffffd8fffffffffffd"},{"size":32,"source":"segoeuib.ttf","glyphs":[[0,0,0,0,0,9],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[0,17,23,1,0,18],[196,10,23,3,0,18],[311,16,23,1,0,18],[495,16,23,1,0,18],[679,18,23,0,0,18],[886,15,23,2,0,18],[1059,17,23,1,0,18],[1255,17,23,1,0,18],[1451,17,23,1,0,18],[1647,16,23,1,0,18],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1992,21,23,2,0,24],[2234,14,23,2,0,17],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[2395,21,23,2,0,25],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[2637,19,23,2,0,23],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14],[1831,14,23,0,0,14]],"pixels":"000017bdfeb6100000005efffffffd3000004ffffffffffe20001effffecfffffb0009ffffa104fffff300efffe10008ffff804ffffa00003ffffd08ffff600000fffff0affff400000dffff2cffff300000cffff4dffff200000bffff4effff100000bffff5dffff200000bffff4dffff200000cffff3cffff400000dffff29ffff600000ffffe07ffff900003ffffb03ffffe10009ffff600cffffa004ffffe1005fffffedfffff70000affffffffffb0000009ffffffffa1000000039deed940000000000009fff00003cffff0019ffffff39efffffffafffffffffafffffffffaffe5effffab610effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00000effff00038befeda5000003cfffffffffc20009fffffffffffd1009ffffffffffff9009fb51003cffffe00740000002fffff20000000000dffff30000000000effff20000000002ffffe0000000000bffff9000000000affffe200000001bfffff500000003dfffff600000007fffffe500000008fffffc200000007fffff9000000003fffff6000000000cffff60000000003ffffd11111111107ffffffffffffff3affffffffffffff3affffffffffffff3bffffffffffffff30038bdffec82000005ffffffffff700005fffffffffff70005ffecceffffff10059300007fffff50000000000bffff600000000009ffff50000000001dffff1000000025cffff800000dffffffff8000000dffffffa20000000dfffffffd7000000acceffffffa00000000028fffff700000000006ffffd00000000000fffff10000000000fffff10000000004ffffe02a5100005effffa03fffdcdeffffff303ffffffffffff7003ffffffffffe5000038bdffeda6100000000000001efffd0000000000007ffffd000000000001effffd000000000008fffffd00000000003ffffffd0000000000cffffffd0000000007fffdfffd000000003fffb9fffd00000001dfff39fffd0000000afff809fffd0000006fffc009fffd000003ffff3009fffd00001dfff60009fffd0001cfffa00009fffd0006ffffbaaaadfffeaa66ffffffffffffffff86ffffffffffffffff86ffffffffffffffff800000000009fffd00000000000009fffd00000000000009fffd00000000000009fffd00000000000009fffd00009fffffffffff400bfffffffffff400cfffffffffff400dfffffffffff400efff20000000000ffff10000000001ffff00000000002fffe00000000003ffffefeda400004ffffffffffb1005fffffffffffc106fedcdfffffff7000000016effffe0000000004fffff2000000000dffff4000000000bffff4000000000dffff2000000004ffffe0a7200005effff80cffeccefffffe10cffffffffffe300cfffffffffc300027bdefed9500000000000017bdffeb600000007efffffffb000000bfffffffffb00000afffffeccefb00005ffffe61000370000efffe200000000005ffff600000000000bfffe000000000000efffa06befd810003ffff8bffffffe4005ffffeffffffffe205ffffffdadfffff906fffff90006ffffe06ffffe10000cffff35ffffa000009ffff53ffffa000008ffff50ffffc00000affff30bffff30001efffe005ffffc201affff9000cfffffceffffe20002effffffffff5000003dfffffffe4000000006bdfeb71000008fffffffffffffff18fffffffffffffff18fffffffffffffff18ffffffffffffffb000000000006ffff300000000000dfffa000000000007ffff300000000001efffa000000000009ffff300000000001efffb000000000007ffff400000000001efffd000000000006ffff700000000000cffff200000000002ffffb000000000007ffff600000000000dffff200000000003ffffc000000000007ffff900000000000bffff500000000000effff200000000002ffffe000000000005ffffc000000000000039cefeb6100000009ffffffffd400000afffffffffff40005fffffb9dffffd000bffff5001bffff400dfffc00003ffff700dfffa00001ffff600afffd00005ffff2003ffff9003dfff900006ffffedffffa0000004dffffffe600000018efffffffc400002dfffffffffff6000cffff7103cffff405ffff700001efffb09ffff1000009ffff1bffff0000008ffff2affff300000bffff16ffffb10007ffffc01effffea9cfffff6004ffffffffffffa00004dfffffffff800000005adefeb7200000000039deed930000001affffffff900001cffffffffff90009fffffddfffff502ffffe4005ffffd07ffff800008ffff4affff300003ffff8bffff100001ffffbbffff300002ffffd9ffff800007ffffe5fffff7216ffffff0dfffffffffffffe03efffffffeefffd003dfffffd3dfffb000058a9610ffff900000000004ffff50000000000affff10000000005ffffa0066100017fffff2008ffdcdffffff70008ffffffffff900008ffffffffe60000016bdefdb61000000049cefec930000dfffffffff9000fffffffffff800ffffffffffff10fe94239fffff40a100000bffff5000000009ffff400000000cffff100000007ffff900000008ffffc10000009ffffc10000006ffffb10000000efffa000000002ffff1000000003fffd0000000001fffe100000000000000000000000000000000000005dec3000000004ffffe100000007fffff300000003ffffe1000000005dec3000007ffffffffedc8510000007fffffffffffffe8100007fffffffffffffffd30007ffffffffffffffffe2007ffffa22237cffffffc007ffff90000006ffffff407ffff900000006fffffb07ffff900000000bffffe07ffff9000000004fffff37ffff9000000001fffff57ffff9000000000effff67ffff9000000000dffff67ffff9000000000effff57ffff9000000002fffff47ffff9000000006fffff17ffff900000000cffffb07ffff900000007fffff607ffff90000007fffffd007ffffa11237dffffff4007ffffffffffffffff60007ffffffffffffffe500007fffffffffffffa2000007ffffffffeda62000000007ffffffffffff77ffffffffffff77ffffffffffff77ffffffffffff77ffffa222222217ffff9000000007ffff9000000007ffff9000000007ffff9000000007fffffffffffe07fffffffffffe07fffffffffffe07fffffffffffe07ffffa111111107ffff9000000007ffff9000000007ffff9000000007ffff9000000007ffffa111111117fffffffffffff7fffffffffffff7fffffffffffff7fffffffffffff7fffff5000000001ffffb7fffffd100000001ffffb7ffffff900000001ffffb7fffffff30000001ffffb7fffffffd0000001ffffb7ffffffff7000001ffffb7ffffeffff200001ffffb7ffff8ffffb00001ffffb7ffff5affff60001ffffb7ffff51efffe1001ffffb7ffff505ffffa001ffffb7ffff500bffff501ffffb7ffff5002efffd11ffffb7ffff50007ffff91ffffb7ffff50000cffff3ffffb7ffff500003ffffcffffb7ffff5000008ffffffffb7ffff5000000dfffffffb7ffff50000004fffffffb7ffff500000009ffffffb7ffff500000001efffffb7ffff5000000005fffffb7ffff5000000000affffb0bffff500000003ffffcbffff500000003ffffcbffff500000003ffffcbffff500000003ffffcbffff500000003ffffcbffff500000003ffffcbffff500000003ffffcbffff500000003ffffcbffff500000003ffffcbffff500000003ffffcbffff500000003ffffcbffff500000003ffffcbffff500000003ffffcaffff600000003ffffc9ffff700000004ffffb8ffffa00000007ffff95ffffe1000000cffff61fffffa000007fffff20afffffd767bfffffb003fffffffffffffff30006fffffffffffff6000005dfffffffffd4000000006adefed95000000"}]diff --git a/games/dune/build.py b/games/dune/build.pynew file mode 100644index 00000000..f41f431f--- /dev/null+++ b/games/dune/build.py@@ -0,0 +1,82 @@+#!/usr/bin/env python3+"""Build a standalone Dune .nwa, without changing the NumPlay launcher.++python build.py --arm-bin /path/to/arm/bin --nwlink /path/to/nwlink+NWLINK may also name the nwlink JavaScript entry point (run with Node).+"""+import argparse+import hashlib+import struct+import json+import os+from pathlib import Path+import re+import shlex+import shutil+import subprocess+import sys++ROOT = Path(__file__).resolve().parent+REPO = ROOT.parents[1]+OUT = ROOT/'output'++def run(args):+ args = [str(x) for x in args]+ subprocess.run(args, cwd=ROOT, check=True)++def main():+ ap = argparse.ArgumentParser(description=__doc__)+ ap.add_argument('--arm-bin', default=os.environ.get('ARM_BIN',''))+ ap.add_argument('--nwlink', default=os.environ.get('NWLINK','nwlink'))+ a = ap.parse_args()+ OUT.mkdir(exist_ok=True)+ arm = lambda name: str(Path(a.arm_bin)/('arm-none-eabi-'+name)) if a.arm_bin else 'arm-none-eabi-'+name+ if Path(a.nwlink).is_file():+ nw = [a.nwlink] if a.nwlink.endswith(('.exe','.cmd')) else ['node',a.nwlink]+ else:+ nw = ([v.replace('"','') for v in re.findall(r'(?:[^\s"]|"[^"]*")+',a.nwlink)]+ if os.name=='nt' else shlex.split(a.nwlink))+ flags = subprocess.check_output(nw+['eadk-cflags-device'],cwd=ROOT,text=True).strip()+ # nwlink quotes the include directory. Preserve backslashes inside Windows paths.+ target = ([v.replace('"','') for v in re.findall(r'(?:[^\s"]|"[^"]*")+',flags)]+ if os.name=='nt' else shlex.split(flags))+ opts = ['-std=c11',*target,'-Os','-Wall','-Wextra','-Werror','-ffunction-sections',+ '-fdata-sections','-fstack-usage','-fno-tree-loop-distribute-patterns',+ '-flto','-fno-fat-lto-objects','-fvisibility=internal']+ run([sys.executable,'tools/assets.py'])+ objects = []+ for name in ('main','game','save','render','assets'):+ obj = OUT/(name+'.o')+ run([arm('gcc'),*opts,'-c','src/'+name+'.c','-o',obj]);objects.append(obj)+ packer = ROOT/'tools/compact_nwa.py'+ run([*nw,'png-icon-o','src/icon.png',OUT/'icon.o'])+ run([sys.executable,packer,'icon',OUT/'icon.o',OUT/'icon-compact.o','--objcopy',arm('objcopy')])+ run([arm('gcc'),*opts,'-nostartfiles','--specs=nano.specs',+ '-Wl,--relocatable,--gc-sections,-e,main','-flinker-output=nolto-rel',+ '-Wl,-u,eadk_app_name,-u,eadk_app_icon,-u,eadk_api_level',+ *objects,OUT/'icon-compact.o','-lm','-o',OUT/'standalone.o'])+ run([sys.executable,packer,'app',OUT/'standalone.o',OUT/'dune-debug.nwa','--ld',arm('ld')])+ run([sys.executable,packer,'release',OUT/'dune-debug.nwa',OUT/'dune.nwa','--objcopy',arm('objcopy')])+ for name in ('dune','dune-debug'):+ run([*nw,'nwa-bin',OUT/(name+'.nwa'),OUT/(name+'.bin'),'--ram-length','107674'])+ installed = (OUT/'dune.bin').read_bytes()+ assert installed == (OUT/'dune-debug.bin').read_bytes(), 'Release changes installed bytes'+ apps = REPO/'build/apps';apps.mkdir(parents=True,exist_ok=True)+ shutil.copyfile(OUT/'dune.nwa',apps/'Dune.nwa')+ elf=(OUT/('dune-debug.nwa')).read_bytes()+ shoff=struct.unpack_from('<I',elf,32)[0];shsize,shcount=struct.unpack_from('<HH',elf,46)+ names_index=struct.unpack_from('<H',elf,50)[0]+ names_header=struct.unpack_from('<10I',elf,shoff+names_index*shsize)+ names=elf[names_header[4]:names_header[4]+names_header[5]]+ static_ram=0+ for i in range(shcount):+ header=struct.unpack_from('<10I',elf,shoff+i*shsize)+ name=names[header[0]:].split(b'\0',1)[0]+ if name in (b'.data',b'.bss'):static_ram+=header[5]+ report = dict(static_ram_bytes=static_ram, sha256=hashlib.sha256((OUT/'dune.nwa').read_bytes()).hexdigest(), nwa_bytes=(OUT/'dune.nwa').stat().st_size, installed_bytes=len(installed),+ release_installed_matches_debug=True, artifact=str(apps/'Dune.nwa'))+ (OUT/'build-report.json').write_text(json.dumps(report,indent=2)+'\n')+ print(json.dumps(report,indent=2))++if __name__=='__main__':+ main()diff --git a/games/dune/docs/gameplay.png b/games/dune/docs/gameplay.pngnew file mode 100644index 00000000..7bc8ecefBinary files /dev/null and b/games/dune/docs/gameplay.png differdiff --git a/games/dune/docs/help.png b/games/dune/docs/help.pngnew file mode 100644index 00000000..164656d0Binary files /dev/null and b/games/dune/docs/help.png differdiff --git a/games/dune/docs/shop-purchased.png b/games/dune/docs/shop-purchased.pngnew file mode 100644index 00000000..6262f114Binary files /dev/null and b/games/dune/docs/shop-purchased.png differdiff --git a/games/dune/docs/shop.png b/games/dune/docs/shop.pngnew file mode 100644index 00000000..e15d3b7fBinary files /dev/null and b/games/dune/docs/shop.png differdiff --git a/games/dune/docs/title.png b/games/dune/docs/title.pngnew file mode 100644index 00000000..2eb34cd2Binary files /dev/null and b/games/dune/docs/title.png differdiff --git a/games/dune/docs/validation.json b/games/dune/docs/validation.jsonnew file mode 100644index 00000000..12932ddd--- /dev/null+++ b/games/dune/docs/validation.json@@ -0,0 +1,111 @@+{+ "date": "2026-10-21",+ "build": {+ "static_ram_bytes": 8173,+ "sha256": "06518c09f8fea232bf1a6d3723c26feb38b0f422338a0a7087efbe970d59c5cf",+ "nwa_bytes": 71444,+ "installed_bytes": 63857,+ "release_installed_matches_debug": true+ },+ "host": {+ "simulation_frames": 73448,+ "seeds": 120,+ "deaths": 120,+ "max_score": 50,+ "max_coins": 90,+ "recycled_terrains": 70,+ "longest_frames": 2175,+ "game_bytes": 1012,+ "stats_bytes": 28,+ "legacy_refund": 19750,+ "retained_balls": 7,+ "retained_original_landscape": 2+ },+ "arm": [+ {+ "profile": "n0120",+ "pause_save_reload_exit": "pass",+ "stack_bytes": 448,+ "frames": 64,+ "slowest_draw_ms": 19,+ "frames_over_33ms": 0+ },+ {+ "profile": "n0110",+ "pause_save_reload_exit": "pass",+ "stack_bytes": 448,+ "frames": 64,+ "slowest_draw_ms": 19,+ "frames_over_33ms": 0+ },+ {+ "profile": "n0115",+ "pause_save_reload_exit": "pass",+ "stack_bytes": 448,+ "frames": 64,+ "slowest_draw_ms": 19,+ "frames_over_33ms": 0+ },+ {+ "profile": "upsilon",+ "pause_save_reload_exit": "pass",+ "stack_bytes": 448,+ "frames": 64,+ "slowest_draw_ms": 19,+ "frames_over_33ms": 0+ },+ {+ "scenes": "7 retained balls, original landscape 2 (Mountains)",+ "slowest_draw_ms": 20,+ "stack_bytes": 448+ },+ {+ "shop": "Seven balls only: insufficient funds, cancel, purchase and free equip pass; no landscape category"+ },+ {+ "migration": "DUN1 -> DUN2: retained ball mapped, old purchases refunded once, other files preserved"+ },+ {+ "full_storage": "continue and exit preserve other files"+ }+ ],+ "source": {+ "repository": "https://github.com/Gr4ys0n/Gr4ys0n.github.io",+ "path": "public/assets/games/dune",+ "commit": "29006b0f11904704c390b457f7055c9fa1e53484",+ "javascript_sha256": "436da2b98af4b7963237066679a8c4a9f41ef69e78a51ea426d018517d691f76"+ },+ "source_comparison": {+ "terrain_shapes": 100,+ "control_samples": 1000,+ "max_terrain_error": 0.000164,+ "background_pixels": 110400,+ "mean_rgb_error_vs_64_colours": 1.635+ },+ "text_rendering": {+ "coverage_bits": 4,+ "native_font_sizes": [+ 13,+ 22,+ 32+ ],+ "bitmap_scaling": false,+ "offset_text_shadow": false+ },+ "catalog": {+ "balls": [+ "Basic_Ball",+ "Basketball",+ "8-Ball",+ "Football",+ "Donut",+ "Smiley",+ "Rainbow Bubble"+ ],+ "landscape": "Mountains",+ "original_landscape_number": 2,+ "legacy_migration": "DUN1 -> DUN2",+ "one_time_refund": true+ },+ "upstream_base": "979c19e828fee928d2d9b2843f8a2f6f2fea500e"+}diff --git a/games/dune/src/assets.c b/games/dune/src/assets.cnew file mode 100644index 00000000..b4192e34--- /dev/null+++ b/games/dune/src/assets.c@@ -0,0 +1,2042 @@+#include "assets.h"+const uint8_t font0_pixels[]={+181,165,165,165,148,148,0,165,165,224,209,224,209,224,209,0,27,10,32,0,87,12,0,79,+255,255,245,0,162,71,0,0,192,116,0,191,255,255,208,4,128,192,0,8,66,160,0,0,+160,0,43,254,96,184,163,112,227,160,0,171,176,0,8,232,16,0,170,192,0,160,226,146,+165,225,142,252,48,0,160,0,9,236,32,9,80,4,177,121,4,160,0,118,2,160,193,0,+5,161,120,134,0,0,10,235,75,77,230,0,0,11,45,50,208,0,7,113,192,11,32,2,+176,13,50,208,0,178,0,94,213,0,0,109,233,0,0,0,30,49,197,0,0,1,224,11,+48,195,0,8,204,80,12,32,4,199,187,17,208,1,226,0,140,120,0,61,0,0,190,16,+1,230,17,93,229,16,3,206,234,51,222,32,238,224,0,135,2,192,9,80,13,16,13,0,+28,0,29,0,13,16,9,80,2,192,0,134,135,0,12,32,6,128,2,192,0,224,0,209,+0,224,2,192,6,128,12,32,119,0,0,162,5,171,123,4,185,16,145,130,0,13,0,0,+0,208,0,0,13,0,8,255,255,247,0,13,0,0,0,208,0,0,13,0,0,44,103,146,+31,255,96,45,2,208,0,0,29,0,0,6,128,0,0,194,0,0,60,0,0,9,96,0,+1,209,0,0,105,0,0,12,48,0,3,192,0,0,150,0,0,29,16,0,0,2,191,211,+0,199,23,224,61,0,13,70,160,0,166,121,0,9,118,160,0,165,61,0,13,48,215,23,+192,2,207,178,0,21,169,121,137,0,121,0,121,0,121,0,121,0,121,0,121,0,121,6,+222,178,0,146,24,176,0,0,46,0,0,5,176,0,3,210,0,6,194,0,8,144,0,2,+208,0,0,79,255,255,80,7,222,161,0,130,27,128,0,0,106,0,0,44,64,5,255,144,+0,0,41,176,0,0,31,3,113,24,176,27,238,161,0,0,1,230,0,0,142,96,0,60,+166,0,28,57,96,9,112,150,7,160,9,96,239,255,255,128,0,9,96,0,0,150,0,143,+255,176,150,0,0,164,0,0,191,234,32,0,41,192,0,0,241,0,1,241,146,26,176,174,+233,16,0,109,252,0,92,48,0,13,48,0,2,217,237,96,79,113,78,52,224,0,166,46,+0,10,96,184,20,225,1,191,196,0,111,255,255,96,0,2,209,0,0,166,0,0,45,0,+0,9,112,0,1,225,0,0,91,0,0,10,96,0,0,211,0,0,2,190,195,0,199,23,+208,15,16,15,16,167,22,176,3,239,243,2,228,20,210,107,0,11,99,228,20,227,5,222,+213,0,3,206,194,1,213,23,192,91,0,13,53,176,0,197,46,81,111,80,77,250,196,0,+0,30,16,0,43,112,11,237,112,0,45,2,208,0,0,0,0,2,208,45,0,45,2,208,+0,0,0,0,0,0,44,6,112,146,0,0,0,41,48,1,140,64,7,198,0,2,186,48,+0,0,58,180,0,0,3,163,143,255,255,112,0,0,0,0,0,0,8,255,255,247,73,16,+0,0,92,113,0,0,6,198,0,0,59,161,4,186,48,4,146,0,0,26,238,112,39,19,+226,0,1,209,0,27,64,0,180,0,0,224,0,0,0,0,0,195,0,0,195,0,0,58,+239,217,32,0,109,81,19,141,48,61,19,206,182,76,10,80,212,28,64,179,208,74,0,147,+8,93,5,128,12,32,163,179,60,21,212,76,5,176,158,164,236,48,9,196,16,0,0,0,+5,190,254,176,0,0,9,224,0,0,0,235,80,0,0,91,107,0,0,11,97,242,0,2,+241,11,112,0,139,0,109,0,13,255,255,244,4,225,0,10,160,168,0,0,63,16,207,253,+112,196,3,227,196,0,196,196,5,192,207,255,112,196,2,184,196,0,91,196,2,184,207,254,+128,0,58,238,161,4,231,33,101,13,80,0,0,78,0,0,0,107,0,0,0,93,0,0,+0,31,64,0,0,7,230,17,101,0,92,253,145,207,254,198,0,196,2,93,160,196,0,2,+227,196,0,0,183,196,0,0,167,196,0,0,198,196,0,3,225,196,2,110,96,207,254,163,+0,207,255,192,196,0,0,196,0,0,196,0,0,207,255,128,196,0,0,196,0,0,196,0,+0,207,255,240,207,255,204,64,0,196,0,12,64,0,207,255,140,64,0,196,0,12,64,0,+196,0,0,0,58,239,215,4,231,33,73,13,80,0,0,77,0,0,0,107,0,31,255,93,+0,0,31,30,64,0,31,7,230,17,79,0,92,238,198,196,0,0,240,196,0,0,240,196,+0,0,240,196,0,0,240,207,255,255,240,196,0,0,240,196,0,0,240,196,0,0,240,196,+0,0,240,196,196,196,196,196,196,196,196,196,0,136,0,136,0,136,0,136,0,136,0,136,+0,166,2,226,205,96,196,0,139,12,64,108,16,196,77,32,12,109,32,0,205,144,0,12,+93,96,0,196,46,80,12,64,78,48,196,0,110,32,196,0,12,64,0,196,0,12,64,0,+196,0,12,64,0,196,0,12,64,0,207,255,224,204,0,0,2,247,206,64,0,8,231,201,+176,0,29,167,196,211,0,121,151,195,121,0,210,151,195,30,21,160,151,195,8,124,48,151,+195,2,236,0,151,195,0,165,0,151,205,16,0,136,205,128,0,136,197,227,0,136,196,108,+0,136,196,11,112,136,196,2,226,136,196,0,108,136,196,0,11,216,196,0,2,232,0,92,+238,180,0,6,230,17,110,64,30,64,0,6,208,77,0,0,1,242,107,0,0,0,227,93,+0,0,1,241,31,64,0,6,192,7,229,18,126,64,0,92,254,179,0,207,253,128,196,3,+214,196,0,107,196,0,122,196,4,212,207,252,80,196,0,0,196,0,0,196,0,0,0,92,+238,180,0,6,230,17,110,64,30,64,0,6,208,77,0,0,1,242,107,0,0,0,227,93,+0,0,1,241,31,64,0,6,192,7,229,18,126,48,0,92,254,236,16,0,0,0,25,229,+207,254,144,12,64,44,112,196,0,121,12,64,61,80,207,254,64,12,65,184,0,196,1,227,+12,64,6,192,196,0,12,96,3,190,231,1,229,18,144,46,0,0,0,203,32,0,1,142,+145,0,0,26,192,0,0,14,51,114,4,226,26,238,196,0,191,255,255,144,2,224,0,0,+46,0,0,2,224,0,0,46,0,0,2,224,0,0,46,0,0,2,224,0,0,46,0,0,+226,0,3,222,32,0,61,226,0,3,222,32,0,61,226,0,3,222,48,0,76,197,0,6,+166,211,19,213,7,222,198,0,183,0,0,107,92,0,0,182,14,48,2,225,9,128,7,160,+4,208,12,64,0,211,61,0,0,137,136,0,0,45,210,0,0,12,176,0,167,0,7,192,+0,93,107,0,12,226,0,152,31,16,30,166,0,212,12,80,90,106,2,224,8,144,165,46,+6,160,3,208,225,13,58,96,0,230,192,8,126,32,0,157,112,4,221,0,0,95,48,0,+232,0,78,16,2,226,10,144,11,112,1,227,92,0,0,107,211,0,0,14,176,0,0,122,+212,0,3,226,93,0,12,96,11,128,124,0,2,227,168,0,4,208,46,16,11,80,10,112,+61,0,3,225,181,0,0,169,208,0,0,63,80,0,0,14,32,0,0,14,32,0,0,14,+32,0,95,255,255,225,0,0,12,64,0,0,137,0,0,3,209,0,0,29,48,0,0,152,+0,0,4,192,0,0,29,48,0,0,175,255,255,240,191,155,48,179,11,48,179,11,48,179,+11,48,179,11,48,191,144,29,16,0,0,150,0,0,3,192,0,0,12,32,0,0,104,0,+0,1,208,0,0,10,80,0,0,75,0,0,0,210,0,0,7,112,0,0,45,0,175,160,+74,4,160,74,4,160,74,4,160,74,4,160,74,175,160,0,44,0,0,10,182,0,3,177,+193,0,179,6,144,74,0,12,48,255,255,246,44,16,73,6,222,177,8,49,184,0,0,106,+5,173,251,77,66,107,92,34,187,27,236,123,225,0,0,14,16,0,0,225,0,0,14,76,+234,16,235,33,169,14,48,2,224,225,0,31,14,48,4,208,234,18,199,14,110,232,0,1,+174,229,11,145,54,61,0,0,91,0,0,77,0,0,13,129,54,2,190,212,0,0,7,144,+0,0,121,0,0,7,144,43,236,137,12,113,62,147,208,0,137,91,0,7,148,192,0,153,+30,97,77,144,76,234,121,2,190,195,0,199,21,208,61,0,13,53,255,255,244,76,0,0,+0,214,16,0,3,206,233,0,1,190,64,122,0,8,112,10,255,240,8,112,0,135,0,8,+112,0,135,0,8,112,0,135,0,2,207,200,144,200,19,233,61,0,8,149,176,0,121,76,+0,9,145,230,20,217,4,206,168,144,0,0,167,0,1,110,16,190,236,48,225,0,0,225,+0,0,225,0,0,229,222,144,234,19,228,227,0,166,225,0,151,225,0,151,225,0,151,225,+0,151,12,32,0,0,0,225,14,16,225,14,16,225,14,16,225,0,12,32,0,0,0,0,+0,0,225,0,14,16,0,225,0,14,16,0,225,0,14,16,0,225,0,31,0,7,176,62,+194,0,225,0,0,225,0,0,225,0,0,225,9,176,225,108,16,230,210,0,238,112,0,228,+228,0,225,94,48,225,7,210,225,225,225,225,225,225,225,225,225,225,229,222,84,222,112,233,+21,235,19,241,227,0,228,0,196,225,0,211,0,180,225,0,211,0,180,225,0,211,0,180,+225,0,211,0,180,229,222,128,234,19,227,227,0,166,225,0,151,225,0,151,225,0,151,225,+0,151,2,174,216,0,200,18,200,61,0,3,213,176,0,31,77,0,3,208,216,18,199,2,+190,215,0,228,206,161,14,178,26,144,227,0,46,14,16,1,240,227,0,77,14,161,44,112,+230,222,128,14,16,0,0,225,0,0,14,16,0,0,2,190,200,144,215,19,233,61,0,8,+149,176,0,121,76,0,9,145,230,20,217,4,206,167,144,0,0,121,0,0,7,144,0,0,+121,230,230,234,16,227,0,226,0,225,0,225,0,225,0,7,238,131,209,0,62,48,0,109,+178,0,7,192,0,93,78,252,64,7,96,0,151,0,191,255,16,151,0,9,112,0,151,0,+9,112,0,137,0,3,222,16,30,0,11,81,224,0,181,30,0,11,81,224,0,181,15,0,+13,80,215,22,229,4,222,139,80,182,0,46,6,176,7,144,30,16,196,0,165,45,0,5,+167,112,0,14,178,0,0,155,0,0,182,0,198,0,226,105,1,234,2,192,45,6,141,6,+128,13,42,59,58,64,9,108,7,125,0,5,201,3,203,0,1,245,0,231,0,123,0,151,+12,67,208,4,203,64,0,204,0,3,204,48,13,68,192,138,0,183,182,0,30,21,176,6,+160,30,16,181,0,166,29,0,4,166,128,0,13,179,0,0,140,0,0,9,112,0,4,225,+0,10,212,0,0,111,255,247,0,4,192,0,29,32,0,167,0,5,176,0,29,32,0,175,+255,248,1,183,5,176,6,128,6,128,10,96,109,16,10,96,6,128,6,128,5,176,1,183,+224,224,224,224,224,224,224,224,224,224,224,224,224,139,0,27,64,8,80,8,80,6,144,1,+213,7,144,8,80,8,80,11,64,139,0,45,232,39,121,98,158,193,+};+const Glyph font0_glyphs[]={+{0,0,0,0,0,5},+{0,2,9,1,0,5},+{9,4,3,1,0,6},+{15,8,8,0,0,9},+{47,6,11,1,-1,8},+{80,11,9,0,0,12},+{130,11,9,0,0,11},+{180,1,3,1,0,4},+{182,4,11,0,0,5},+{204,4,11,0,0,5},+{226,5,4,0,0,6},+{236,7,7,1,1,10},+{261,2,3,0,8,4},+{264,5,1,0,4,6},+{267,3,2,0,7,4},+{270,7,11,-1,0,6},+{309,7,9,0,0,8},+{341,4,9,1,0,8},+{359,7,9,0,0,8},+{391,7,9,0,0,8},+{423,7,9,0,0,8},+{455,6,9,1,0,8},+{482,7,9,0,0,8},+{514,7,9,0,0,8},+{546,7,9,0,0,8},+{578,7,9,0,0,8},+{610,3,7,0,2,4},+{621,3,9,0,2,4},+{635,7,6,1,2,10},+{656,7,4,1,3,10},+{670,7,6,1,2,10},+{691,6,9,0,0,7},+{718,11,10,1,0,13},+{773,9,9,0,0,9},+{814,6,9,1,0,8},+{841,8,9,0,0,9},+{877,8,9,1,0,10},+{913,6,9,1,0,8},+{940,5,9,1,0,7},+{963,8,9,0,0,10},+{999,8,9,1,0,10},+{1035,2,9,1,0,4},+{1044,4,9,0,0,6},+{1062,7,9,1,0,9},+{1094,5,9,1,0,7},+{1117,10,9,1,0,13},+{1162,8,9,1,0,11},+{1198,10,9,0,0,11},+{1243,6,9,1,0,8},+{1270,10,10,0,0,11},+{1320,7,9,1,0,9},+{1352,7,9,0,0,8},+{1384,7,9,0,0,8},+{1416,7,9,1,0,10},+{1448,8,9,0,0,9},+{1484,12,9,0,0,13},+{1538,8,9,0,0,9},+{1574,8,9,0,0,8},+{1610,8,9,0,0,8},+{1646,3,11,1,0,5},+{1663,7,11,-1,0,6},+{1702,3,11,0,0,5},+{1719,7,5,1,0,10},+{1737,6,1,0,10,6},+{1740,3,2,0,-1,4},+{1743,6,7,0,2,8},+{1764,7,10,1,-1,9},+{1799,6,7,0,2,7},+{1820,7,10,0,-1,9},+{1855,7,7,0,2,8},+{1880,5,10,0,-1,5},+{1905,7,10,0,2,9},+{1940,6,10,1,-1,8},+{1970,3,10,0,-1,4},+{1985,5,13,-2,-1,4},+{2018,6,10,1,-1,7},+{2048,2,10,1,-1,4},+{2058,10,7,1,2,12},+{2093,6,7,1,2,8},+{2114,7,7,0,2,9},+{2139,7,10,1,2,9},+{2174,7,10,0,2,9},+{2209,4,7,1,2,6},+{2223,5,7,0,2,7},+{2241,5,9,0,0,5},+{2264,7,7,0,2,8},+{2289,7,7,0,2,7},+{2314,10,7,0,2,10},+{2349,6,7,0,2,7},+{2370,7,10,0,2,7},+{2405,6,7,0,2,7},+{2426,4,11,0,0,5},+{2448,2,13,1,-1,4},+{2461,4,11,0,0,5},+{2483,7,2,1,4,10},+};+const uint8_t font1_pixels[]={+63,255,82,255,245,31,255,65,255,243,15,255,48,255,242,14,255,16,239,241,13,255,0,207,+240,0,0,0,0,0,9,235,20,255,247,79,255,112,158,177,0,0,79,208,0,0,0,0,+79,208,0,0,0,0,79,208,0,0,0,0,79,208,0,0,127,255,255,255,255,240,127,255,+255,255,255,240,0,0,79,208,0,0,0,0,79,208,0,0,0,0,79,208,0,0,0,0,+79,208,0,0,127,255,255,103,255,255,246,94,212,239,253,239,253,94,212,0,0,0,4,255,+192,0,0,0,175,246,0,0,0,47,254,16,0,0,8,255,128,0,0,0,239,242,0,0,+0,95,251,0,0,0,11,255,64,0,0,2,255,208,0,0,0,159,247,0,0,0,30,255,+16,0,0,6,255,144,0,0,0,207,243,0,0,0,79,252,0,0,0,10,255,96,0,0,+1,255,224,0,0,0,127,248,0,0,0,13,255,32,0,0,5,255,176,0,0,0,0,2,+157,253,146,0,0,78,255,255,254,48,1,239,255,255,255,192,7,255,245,25,255,244,12,255,+160,1,239,248,31,255,96,0,191,251,63,255,64,0,159,253,63,255,48,0,143,253,79,255,+48,0,143,253,63,255,64,0,159,252,47,255,96,0,191,250,14,255,144,1,239,247,10,255,+244,25,255,242,3,255,255,255,255,160,0,127,255,255,252,16,0,5,190,253,129,0,0,4,+207,225,107,255,254,191,255,255,235,255,239,254,171,87,255,224,0,127,254,0,7,255,224,0,+127,254,0,7,255,224,0,127,254,0,7,255,224,0,127,254,0,7,255,224,0,127,254,0,+7,255,224,0,127,254,0,57,222,253,146,0,5,255,255,255,254,32,5,255,255,255,255,176,+5,164,32,60,255,241,0,0,0,5,255,242,0,0,0,6,255,241,0,0,0,29,255,176,+0,0,1,191,255,48,0,0,61,255,246,0,0,5,239,254,80,0,0,95,255,194,0,0,+2,239,249,0,0,0,10,255,192,0,0,0,14,255,255,255,255,242,31,255,255,255,255,242,+47,255,255,255,255,242,5,189,254,198,0,2,255,255,255,251,0,47,255,255,255,246,2,164,+17,111,255,144,0,0,0,239,247,0,0,2,143,255,32,3,255,255,254,80,0,63,255,254,+96,0,3,255,255,255,194,0,0,2,127,255,160,0,0,0,143,254,0,0,0,8,255,241,+151,49,21,239,253,11,255,255,255,255,112,191,255,255,255,160,3,157,239,218,64,0,0,0,+0,63,255,64,0,0,0,11,255,244,0,0,0,4,255,255,64,0,0,0,223,255,244,0,+0,0,143,254,255,64,0,0,63,249,223,244,0,0,29,254,29,255,64,0,10,255,80,223,+244,0,7,255,144,13,255,64,4,255,193,0,223,244,0,159,255,255,255,255,255,25,255,255,+255,255,255,241,159,255,255,255,255,255,16,0,0,0,223,244,0,0,0,0,13,255,64,0,+0,0,0,223,244,0,10,255,255,255,248,0,191,255,255,255,128,12,255,255,255,248,0,223,+224,0,0,0,14,252,0,0,0,0,255,176,0,0,0,31,255,255,216,16,2,255,255,255,+254,32,63,255,255,255,251,1,33,1,94,255,241,0,0,0,95,255,48,0,0,6,255,242,+104,49,21,239,253,7,255,255,255,255,96,127,255,255,255,128,2,157,239,218,64,0,0,1,+124,238,216,0,3,223,255,255,192,2,239,255,255,252,0,191,255,130,19,96,47,255,112,0,+0,7,255,208,0,0,0,191,249,76,238,145,13,255,175,255,255,209,239,255,255,255,255,125,+255,228,19,223,252,207,249,0,7,255,217,255,160,0,127,253,95,255,81,78,255,144,207,255,+255,255,242,2,239,255,255,245,0,1,157,254,163,0,255,255,255,255,255,191,255,255,255,255,+251,255,255,255,255,255,128,0,0,2,255,225,0,0,0,175,248,0,0,0,63,254,16,0,+0,11,255,128,0,0,3,255,242,0,0,0,175,250,0,0,0,31,255,80,0,0,6,255,+225,0,0,0,191,250,0,0,0,31,255,96,0,0,5,255,242,0,0,0,143,254,0,0,+0,11,255,192,0,0,0,4,190,253,146,0,0,127,255,255,255,64,3,255,255,255,255,224,+8,255,228,22,255,244,8,255,144,0,207,244,4,255,192,2,239,225,0,159,253,174,254,64,+0,9,255,255,243,0,0,159,255,255,255,80,8,255,194,4,239,243,14,255,48,0,143,249,+47,255,48,0,143,251,31,255,178,20,239,250,10,255,255,255,255,244,1,207,255,255,255,128,+0,6,206,253,164,0,0,4,190,253,112,0,0,127,255,255,252,16,4,255,255,255,255,144,+11,255,211,26,255,241,15,255,80,1,239,245,47,255,48,0,207,248,47,255,80,0,223,249,+14,255,211,24,255,250,8,255,255,255,255,249,1,223,255,253,207,247,0,25,238,178,223,245,+0,0,0,5,255,225,3,114,1,110,255,144,4,255,255,255,254,16,4,255,255,255,211,0,+2,157,238,200,16,0,94,212,239,253,239,253,94,212,0,0,0,0,0,0,94,212,239,253,+239,253,94,212,22,189,253,164,0,95,255,255,255,96,95,255,255,255,224,90,65,26,255,242,+0,0,3,255,242,0,0,8,255,192,0,0,111,255,48,0,7,255,228,0,0,47,254,32,+0,0,111,247,0,0,0,95,247,0,0,0,0,0,0,0,0,27,233,0,0,0,143,255,+64,0,0,143,255,64,0,0,27,233,0,0,0,0,7,255,254,16,0,0,0,0,12,255,+255,80,0,0,0,0,47,255,255,160,0,0,0,0,143,250,255,241,0,0,0,0,223,244,+239,246,0,0,0,3,255,224,175,251,0,0,0,8,255,176,111,255,16,0,0,14,255,96,+31,255,96,0,0,79,255,32,12,255,176,0,0,159,253,0,8,255,241,0,0,239,255,255,+255,255,246,0,5,255,255,255,255,255,252,0,10,255,255,255,255,255,255,32,30,255,192,0,+0,111,255,112,111,255,96,0,0,30,255,192,191,255,16,0,0,10,255,242,79,255,255,254,+199,16,4,255,255,255,255,253,16,79,255,255,255,255,248,4,255,244,1,127,255,160,79,255,+64,0,255,248,4,255,244,1,143,254,16,79,255,255,255,251,32,4,255,255,255,255,164,0,+79,255,255,255,255,246,4,255,244,1,78,255,225,79,255,64,0,111,255,52,255,244,0,7,+255,244,79,255,64,21,239,255,36,255,255,255,255,255,176,79,255,255,255,255,209,4,255,255,+255,236,113,0,0,0,5,173,239,219,96,0,44,255,255,255,252,0,46,255,255,255,255,192,+12,255,252,81,18,106,6,255,250,0,0,0,0,207,254,16,0,0,0,31,255,160,0,0,+0,2,255,247,0,0,0,0,63,255,112,0,0,0,2,255,249,0,0,0,0,14,255,225,+0,0,0,0,175,255,144,0,0,0,3,255,255,180,17,55,160,7,255,255,255,255,252,0,+7,255,255,255,255,192,0,2,140,239,237,164,79,255,255,254,201,48,0,4,255,255,255,255,+255,161,0,79,255,255,255,255,255,192,4,255,244,1,57,255,255,112,79,255,64,0,5,255,+254,4,255,244,0,0,11,255,243,79,255,64,0,0,111,255,84,255,244,0,0,4,255,246,+79,255,64,0,0,79,255,84,255,244,0,0,6,255,244,79,255,64,0,0,207,255,20,255,+244,0,0,127,255,160,79,255,64,19,159,255,243,4,255,255,255,255,255,246,0,79,255,255,+255,255,229,0,4,255,255,255,235,113,0,0,79,255,255,255,250,79,255,255,255,250,79,255,+255,255,250,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,255,255,244,79,+255,255,255,244,79,255,255,255,244,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,+79,255,64,0,0,79,255,255,255,255,79,255,255,255,255,79,255,255,255,255,79,255,255,255,+250,79,255,255,255,250,79,255,255,255,250,79,255,64,0,0,79,255,64,0,0,79,255,64,+0,0,79,255,64,0,0,79,255,255,255,244,79,255,255,255,244,79,255,255,255,244,79,255,+64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,+255,64,0,0,0,0,4,156,239,236,148,0,0,27,255,255,255,255,160,0,45,255,255,255,+255,250,0,12,255,252,81,2,72,144,6,255,251,0,0,0,0,0,207,254,16,0,0,0,+0,31,255,160,0,0,0,0,2,255,247,0,47,255,255,246,63,255,112,2,255,255,255,98,+255,249,0,47,255,255,246,14,255,208,0,0,31,255,96,159,255,128,0,1,255,246,2,255,+255,163,17,79,255,96,6,255,255,255,255,255,246,0,6,239,255,255,255,255,80,0,1,123,+239,253,183,32,79,255,64,0,0,111,255,20,255,244,0,0,6,255,241,79,255,64,0,0,+111,255,20,255,244,0,0,6,255,241,79,255,64,0,0,111,255,20,255,244,0,0,6,255,+241,79,255,255,255,255,255,255,20,255,255,255,255,255,255,241,79,255,255,255,255,255,255,20,+255,244,0,0,6,255,241,79,255,64,0,0,111,255,20,255,244,0,0,6,255,241,79,255,+64,0,0,111,255,20,255,244,0,0,6,255,241,79,255,64,0,0,111,255,20,255,244,0,+0,6,255,241,79,255,68,255,244,79,255,68,255,244,79,255,68,255,244,79,255,68,255,244,+79,255,68,255,244,79,255,68,255,244,79,255,68,255,244,79,255,68,255,244,0,0,79,255,+48,0,4,255,243,0,0,79,255,48,0,4,255,243,0,0,79,255,48,0,4,255,243,0,+0,79,255,48,0,4,255,243,0,0,79,255,48,0,4,255,243,0,0,111,255,32,0,9,+255,240,115,22,255,251,10,255,255,255,64,175,255,255,128,6,223,235,80,0,79,255,64,0,+95,255,176,79,255,64,1,239,254,32,79,255,64,9,255,245,0,79,255,64,79,255,160,0,+79,255,65,223,253,16,0,79,255,72,255,244,0,0,79,255,111,255,128,0,0,79,255,223,+254,0,0,0,79,255,207,255,80,0,0,79,255,94,255,226,0,0,79,255,69,255,251,0,+0,79,255,64,191,255,96,0,79,255,64,46,255,226,0,79,255,64,6,255,252,0,79,255,+64,0,207,255,128,79,255,64,0,47,255,243,79,255,64,0,0,79,255,64,0,0,79,255,+64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,+255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,79,255,64,0,0,+79,255,64,0,0,79,255,255,255,254,79,255,255,255,254,79,255,255,255,254,79,255,254,16,+0,0,12,255,255,84,255,255,245,0,0,2,255,255,245,79,255,255,160,0,0,127,255,255,+84,255,223,254,16,0,12,253,255,245,79,252,223,245,0,2,255,175,255,84,255,217,255,160,+0,127,246,255,245,79,253,79,254,16,12,254,47,255,84,255,208,223,245,2,255,162,255,245,+79,253,8,255,160,127,245,47,255,84,255,208,63,254,12,254,18,255,245,79,253,0,223,245,+255,160,47,255,84,255,208,8,255,207,245,2,255,245,79,253,0,63,255,254,16,47,255,84,+255,208,0,223,255,160,2,255,245,79,253,0,8,255,245,0,47,255,84,255,208,0,63,254,+16,2,255,245,79,255,192,0,0,10,255,148,255,255,112,0,0,175,249,79,255,254,32,0,+10,255,148,255,255,250,0,0,175,249,79,255,239,245,0,10,255,148,255,248,255,209,0,175,+249,79,255,29,255,144,10,255,148,255,240,79,255,48,175,249,79,255,0,159,252,10,255,148,+255,240,1,239,247,175,249,79,255,0,5,255,235,255,148,255,240,0,11,255,255,249,79,255,+0,0,46,255,255,148,255,240,0,0,127,255,249,79,255,0,0,0,207,255,148,255,240,0,+0,3,255,249,0,0,23,190,254,182,0,0,0,4,239,255,255,255,211,0,0,79,255,255,+255,255,254,32,1,239,255,130,3,175,255,192,7,255,247,0,0,11,255,244,13,255,208,0,+0,3,255,249,31,255,144,0,0,0,239,252,47,255,112,0,0,0,207,253,63,255,112,0,+0,0,207,253,47,255,144,0,0,0,239,251,14,255,208,0,0,3,255,248,9,255,246,0,+0,11,255,243,2,255,255,130,3,175,255,176,0,111,255,255,255,255,253,16,0,6,239,255,+255,255,194,0,0,0,24,206,253,165,0,0,79,255,255,254,181,0,79,255,255,255,255,160,+79,255,255,255,255,246,79,255,64,41,255,252,79,255,64,0,207,254,79,255,64,0,175,255,+79,255,64,0,207,253,79,255,64,41,255,249,79,255,255,255,255,226,79,255,255,255,254,64,+79,255,255,236,130,0,79,255,64,0,0,0,79,255,64,0,0,0,79,255,64,0,0,0,+79,255,64,0,0,0,79,255,64,0,0,0,0,0,23,190,254,182,0,0,0,0,4,239,+255,255,255,211,0,0,0,79,255,255,255,255,254,32,0,1,239,255,130,3,175,255,192,0,+7,255,247,0,0,11,255,244,0,13,255,208,0,0,3,255,249,0,31,255,144,0,0,0,+239,252,0,47,255,112,0,0,0,207,253,0,63,255,112,0,0,0,207,253,0,31,255,144,+0,0,0,239,251,0,14,255,208,0,0,2,255,248,0,9,255,247,0,0,10,255,243,0,+2,255,255,130,3,175,255,176,0,0,111,255,255,255,255,253,16,0,0,6,239,255,255,255,+253,16,0,0,0,24,206,254,223,255,209,0,0,0,0,0,0,28,255,252,16,0,0,0,+0,0,1,223,255,193,79,255,255,254,182,0,0,79,255,255,255,255,193,0,79,255,255,255,+255,247,0,79,255,64,23,255,252,0,79,255,64,0,223,253,0,79,255,64,0,239,251,0,+79,255,64,42,255,245,0,79,255,255,255,255,160,0,79,255,255,255,214,0,0,79,255,255,+255,228,0,0,79,255,65,191,255,48,0,79,255,64,30,255,208,0,79,255,64,6,255,247,+0,79,255,64,0,207,255,32,79,255,64,0,63,255,176,79,255,64,0,9,255,246,0,74,+223,254,182,0,175,255,255,255,208,127,255,255,255,253,13,255,229,16,38,160,255,251,0,0,+0,13,255,246,0,0,0,143,255,252,80,0,1,191,255,255,212,0,0,142,255,255,246,0,+0,23,239,255,242,0,0,1,191,255,120,0,0,2,255,248,236,81,2,159,255,110,255,255,+255,255,225,239,255,255,255,245,3,156,239,220,130,0,175,255,255,255,255,255,154,255,255,255,+255,255,249,175,255,255,255,255,255,144,0,4,255,243,0,0,0,0,79,255,48,0,0,0,+4,255,243,0,0,0,0,79,255,48,0,0,0,4,255,243,0,0,0,0,79,255,48,0,+0,0,4,255,243,0,0,0,0,79,255,48,0,0,0,4,255,243,0,0,0,0,79,255,+48,0,0,0,4,255,243,0,0,0,0,79,255,48,0,0,0,4,255,243,0,0,111,255,+16,0,2,255,245,111,255,16,0,2,255,245,111,255,16,0,2,255,245,111,255,16,0,2,+255,245,111,255,16,0,2,255,245,111,255,16,0,2,255,245,111,255,16,0,2,255,245,111,+255,16,0,2,255,245,111,255,16,0,2,255,245,111,255,16,0,3,255,244,95,255,48,0,+4,255,243,47,255,128,0,9,255,240,13,255,246,17,127,255,176,6,255,255,255,255,255,48,+0,159,255,255,255,246,0,0,4,173,254,217,32,0,191,254,0,0,0,63,255,102,255,244,+0,0,7,255,242,31,255,128,0,0,191,251,0,191,253,0,0,31,255,96,6,255,242,0,+5,255,242,0,31,255,96,0,159,251,0,0,191,251,0,14,255,96,0,7,255,241,3,255,+242,0,0,47,255,64,127,252,0,0,0,207,249,12,255,112,0,0,7,255,209,255,242,0,+0,0,47,255,127,252,0,0,0,0,207,253,255,112,0,0,0,7,255,255,242,0,0,0,+0,47,255,252,0,0,0,0,0,207,255,112,0,0,175,255,16,0,9,255,245,0,0,175,+252,127,255,64,0,13,255,249,0,0,223,248,63,255,112,0,47,255,253,0,1,255,244,14,+255,160,0,111,255,255,16,4,255,241,10,255,224,0,175,252,255,80,7,255,192,6,255,242,+0,239,233,255,128,10,255,128,3,255,245,3,255,166,255,192,13,255,64,0,239,248,7,255,+98,255,240,31,255,16,0,175,251,11,255,32,223,244,79,251,0,0,111,254,14,254,0,159,+247,127,247,0,0,47,255,95,250,0,111,251,175,244,0,0,14,255,175,246,0,47,253,207,+224,0,0,10,255,239,242,0,13,255,239,176,0,0,6,255,255,208,0,9,255,255,112,0,+0,2,255,255,144,0,6,255,255,48,0,0,0,223,255,96,0,2,255,254,0,0,79,255,+224,0,0,223,253,16,175,255,96,0,127,255,80,2,255,253,0,30,255,176,0,8,255,245,+7,255,243,0,0,30,255,193,239,249,0,0,0,127,255,143,254,16,0,0,0,223,255,255,+96,0,0,0,5,255,255,208,0,0,0,0,95,255,253,16,0,0,0,29,255,255,248,0,+0,0,9,255,232,255,242,0,0,3,255,248,30,255,160,0,0,207,254,16,143,255,64,0,+111,255,112,1,239,253,0,30,255,225,0,8,255,247,10,255,247,0,0,30,255,225,207,255,+48,0,8,255,242,79,255,144,0,14,255,160,12,255,225,0,95,255,32,5,255,246,0,207,+250,0,0,223,252,3,255,243,0,0,111,255,73,255,160,0,0,14,255,158,255,48,0,0,+7,255,255,251,0,0,0,1,239,255,244,0,0,0,0,143,255,176,0,0,0,0,47,255,+96,0,0,0,0,47,255,80,0,0,0,0,47,255,80,0,0,0,0,47,255,80,0,0,+0,0,47,255,80,0,0,0,0,47,255,80,0,0,15,255,255,255,255,255,192,255,255,255,+255,255,252,15,255,255,255,255,255,128,0,0,0,30,255,192,0,0,0,11,255,226,0,0,+0,7,255,246,0,0,0,3,255,250,0,0,0,1,223,254,16,0,0,0,175,255,64,0,+0,0,111,255,144,0,0,0,46,255,209,0,0,0,12,255,243,0,0,0,9,255,247,0,+0,0,4,255,255,255,255,255,253,143,255,255,255,255,255,216,255,255,255,255,255,253,+};+const Glyph font1_glyphs[]={+{0,0,0,0,0,6},+{0,5,16,1,0,7},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{40,12,10,2,5,16},+{1132,10,16,0,0,10},+{100,7,2,1,9,9},+{107,4,4,1,12,6},+{115,11,18,-1,0,10},+{214,12,16,0,0,13},+{310,7,16,2,0,13},+{366,12,16,0,0,13},+{462,11,16,1,0,13},+{550,13,16,0,0,13},+{654,11,16,1,0,13},+{742,11,16,1,0,13},+{830,11,16,1,0,13},+{918,12,16,0,0,13},+{1014,12,16,0,0,13},+{1110,4,11,1,5,6},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1212,16,16,0,0,15},+{1340,13,16,1,0,14},+{1444,13,16,0,0,14},+{1548,15,16,1,0,16},+{1668,10,16,1,0,12},+{1748,10,16,1,0,11},+{1828,15,16,0,0,16},+{1948,15,16,1,0,17},+{2068,5,16,1,0,7},+{2108,9,16,0,0,10},+{2180,14,16,1,0,14},+{2292,10,16,1,0,11},+{2372,19,16,1,0,21},+{2524,15,16,1,0,17},+{2644,16,16,0,0,17},+{2772,12,16,1,0,14},+{2868,18,18,0,0,17},+{3030,14,16,1,0,14},+{3142,11,16,1,0,12},+{3230,13,16,0,0,13},+{3334,14,16,1,0,16},+{3446,15,16,0,0,15},+{3566,22,16,0,0,22},+{3742,15,16,0,0,14},+{3862,14,16,0,0,13},+{3974,13,16,0,0,13},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+{1132,10,16,0,0,10},+};+const uint8_t font2_pixels[]={+0,0,23,189,254,182,16,0,0,0,94,255,255,255,253,48,0,0,79,255,255,255,255,254,+32,0,30,255,255,236,255,255,251,0,9,255,255,161,4,255,255,243,0,239,255,225,0,8,+255,255,128,79,255,250,0,0,63,255,253,8,255,255,96,0,0,255,255,240,175,255,244,0,+0,13,255,255,44,255,255,48,0,0,207,255,244,223,255,242,0,0,11,255,255,78,255,255,+16,0,0,191,255,245,223,255,242,0,0,11,255,255,77,255,255,32,0,0,207,255,243,207,+255,244,0,0,13,255,255,41,255,255,96,0,0,255,255,224,127,255,249,0,0,63,255,251,+3,255,255,225,0,9,255,255,96,12,255,255,160,4,255,255,225,0,95,255,255,237,255,255,+247,0,0,175,255,255,255,255,251,0,0,0,159,255,255,255,250,16,0,0,0,57,222,237,+148,0,0,0,0,0,0,159,255,0,0,60,255,255,0,25,255,255,255,57,239,255,255,255,+175,255,255,255,255,175,255,255,255,255,175,254,94,255,255,171,97,14,255,255,0,0,14,255,+255,0,0,14,255,255,0,0,14,255,255,0,0,14,255,255,0,0,14,255,255,0,0,14,+255,255,0,0,14,255,255,0,0,14,255,255,0,0,14,255,255,0,0,14,255,255,0,0,+14,255,255,0,0,14,255,255,0,0,14,255,255,0,0,14,255,255,0,0,14,255,255,0,+3,139,239,237,165,0,0,3,207,255,255,255,255,194,0,9,255,255,255,255,255,253,16,9,+255,255,255,255,255,255,144,9,251,81,0,60,255,255,224,7,64,0,0,2,255,255,242,0,+0,0,0,0,223,255,243,0,0,0,0,0,239,255,242,0,0,0,0,2,255,255,224,0,+0,0,0,11,255,255,144,0,0,0,0,175,255,254,32,0,0,0,27,255,255,245,0,0,+0,3,223,255,255,96,0,0,0,127,255,255,229,0,0,0,8,255,255,252,32,0,0,0,+127,255,255,144,0,0,0,3,255,255,246,0,0,0,0,12,255,255,96,0,0,0,0,63,+255,253,17,17,17,17,16,127,255,255,255,255,255,255,243,175,255,255,255,255,255,255,243,175,+255,255,255,255,255,255,243,191,255,255,255,255,255,255,243,0,56,189,255,236,130,0,0,5,+255,255,255,255,255,112,0,5,255,255,255,255,255,247,0,5,255,236,206,255,255,255,16,5,+147,0,0,127,255,255,80,0,0,0,0,11,255,255,96,0,0,0,0,9,255,255,80,0,+0,0,0,29,255,255,16,0,0,0,37,207,255,248,0,0,13,255,255,255,255,128,0,0,+13,255,255,255,162,0,0,0,13,255,255,255,253,112,0,0,10,204,239,255,255,250,0,0,+0,0,2,143,255,255,112,0,0,0,0,6,255,255,208,0,0,0,0,0,255,255,241,0,+0,0,0,0,255,255,241,0,0,0,0,4,255,255,224,42,81,0,0,94,255,255,160,63,+255,220,222,255,255,255,48,63,255,255,255,255,255,247,0,63,255,255,255,255,254,80,0,3,+139,223,254,218,97,0,0,0,0,0,0,1,239,255,208,0,0,0,0,0,7,255,255,208,+0,0,0,0,0,30,255,255,208,0,0,0,0,0,143,255,255,208,0,0,0,0,3,255,+255,255,208,0,0,0,0,12,255,255,255,208,0,0,0,0,127,255,223,255,208,0,0,0,+3,255,251,159,255,208,0,0,0,29,255,243,159,255,208,0,0,0,175,255,128,159,255,208,+0,0,6,255,252,0,159,255,208,0,0,63,255,243,0,159,255,208,0,1,223,255,96,0,+159,255,208,0,28,255,250,0,0,159,255,208,0,111,255,251,170,170,223,255,234,166,111,255,+255,255,255,255,255,255,248,111,255,255,255,255,255,255,255,248,111,255,255,255,255,255,255,255,+248,0,0,0,0,0,159,255,208,0,0,0,0,0,0,159,255,208,0,0,0,0,0,0,+159,255,208,0,0,0,0,0,0,159,255,208,0,0,0,0,0,0,159,255,208,0,9,255,+255,255,255,255,244,0,191,255,255,255,255,255,64,12,255,255,255,255,255,244,0,223,255,255,+255,255,255,64,14,255,242,0,0,0,0,0,255,255,16,0,0,0,0,31,255,240,0,0,+0,0,2,255,254,0,0,0,0,0,63,255,254,254,218,64,0,4,255,255,255,255,255,177,+0,95,255,255,255,255,255,193,6,254,220,223,255,255,255,112,0,0,0,22,239,255,254,0,+0,0,0,4,255,255,242,0,0,0,0,13,255,255,64,0,0,0,0,191,255,244,0,0,+0,0,13,255,255,32,0,0,0,4,255,255,224,167,32,0,5,239,255,248,12,255,236,206,+255,255,254,16,207,255,255,255,255,254,48,12,255,255,255,255,252,48,0,39,189,239,237,149,+0,0,0,0,0,0,23,189,255,235,96,0,0,0,126,255,255,255,251,0,0,0,191,255,+255,255,255,176,0,0,175,255,255,236,206,251,0,0,95,255,254,97,0,3,112,0,14,255,+254,32,0,0,0,0,5,255,255,96,0,0,0,0,0,191,255,224,0,0,0,0,0,14,+255,250,6,190,253,129,0,3,255,255,139,255,255,255,228,0,95,255,254,255,255,255,255,226,+5,255,255,255,218,223,255,255,144,111,255,255,144,0,111,255,254,6,255,255,225,0,0,207,+255,243,95,255,250,0,0,9,255,255,83,255,255,160,0,0,143,255,245,15,255,252,0,0,+10,255,255,48,191,255,243,0,1,239,255,224,5,255,255,194,1,175,255,249,0,12,255,255,+252,239,255,254,32,0,46,255,255,255,255,255,80,0,0,61,255,255,255,254,64,0,0,0,+6,189,254,183,16,0,0,143,255,255,255,255,255,255,255,24,255,255,255,255,255,255,255,241,+143,255,255,255,255,255,255,255,24,255,255,255,255,255,255,255,176,0,0,0,0,0,111,255,+243,0,0,0,0,0,13,255,250,0,0,0,0,0,7,255,255,48,0,0,0,0,1,239,+255,160,0,0,0,0,0,159,255,243,0,0,0,0,0,30,255,251,0,0,0,0,0,7,+255,255,64,0,0,0,0,1,239,255,208,0,0,0,0,0,111,255,247,0,0,0,0,0,+12,255,255,32,0,0,0,0,2,255,255,176,0,0,0,0,0,127,255,246,0,0,0,0,+0,13,255,255,32,0,0,0,0,3,255,255,192,0,0,0,0,0,127,255,249,0,0,0,+0,0,11,255,255,80,0,0,0,0,0,239,255,242,0,0,0,0,0,47,255,254,0,0,+0,0,0,5,255,255,192,0,0,0,0,0,0,57,206,254,182,16,0,0,0,159,255,255,+255,253,64,0,0,175,255,255,255,255,255,64,0,95,255,255,185,223,255,253,0,11,255,255,+80,1,191,255,244,0,223,255,192,0,3,255,255,112,13,255,250,0,0,31,255,246,0,175,+255,208,0,5,255,255,32,3,255,255,144,3,223,255,144,0,6,255,255,237,255,255,160,0,+0,4,223,255,255,254,96,0,0,1,142,255,255,255,252,64,0,2,223,255,255,255,255,255,+96,0,207,255,247,16,60,255,255,64,95,255,247,0,0,30,255,251,9,255,255,16,0,0,+159,255,241,191,255,240,0,0,8,255,255,42,255,255,48,0,0,191,255,241,111,255,251,16,+0,127,255,252,1,239,255,254,169,207,255,255,96,4,255,255,255,255,255,255,160,0,4,223,+255,255,255,255,128,0,0,0,90,222,254,183,32,0,0,0,0,57,222,237,147,0,0,0,+26,255,255,255,255,144,0,1,207,255,255,255,255,249,0,9,255,255,253,223,255,255,80,47,+255,254,64,5,255,255,208,127,255,248,0,0,143,255,244,175,255,243,0,0,63,255,248,191,+255,241,0,0,31,255,251,191,255,243,0,0,47,255,253,159,255,248,0,0,127,255,254,95,+255,255,114,22,255,255,255,13,255,255,255,255,255,255,254,3,239,255,255,255,238,255,253,0,+61,255,255,253,61,255,251,0,0,88,169,97,15,255,249,0,0,0,0,0,79,255,245,0,+0,0,0,0,175,255,241,0,0,0,0,5,255,255,160,6,97,0,1,127,255,255,32,8,+255,220,223,255,255,247,0,8,255,255,255,255,255,144,0,8,255,255,255,255,230,0,0,1,+107,222,253,182,16,0,0,0,73,206,254,201,48,0,13,255,255,255,255,249,0,15,255,255,+255,255,255,128,15,255,255,255,255,255,241,15,233,66,57,255,255,244,10,16,0,0,191,255,+245,0,0,0,0,159,255,244,0,0,0,0,207,255,241,0,0,0,7,255,255,144,0,0,+0,143,255,252,16,0,0,9,255,255,193,0,0,0,111,255,251,16,0,0,0,239,255,160,+0,0,0,2,255,255,16,0,0,0,3,255,253,0,0,0,0,1,255,254,16,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,93,236,48,0,0,0,4,255,255,+225,0,0,0,7,255,255,243,0,0,0,3,255,255,225,0,0,0,0,93,236,48,0,0,+127,255,255,255,254,220,133,16,0,0,7,255,255,255,255,255,255,254,129,0,0,127,255,255,+255,255,255,255,255,211,0,7,255,255,255,255,255,255,255,255,226,0,127,255,250,34,35,124,+255,255,255,192,7,255,255,144,0,0,6,255,255,255,64,127,255,249,0,0,0,6,255,255,+251,7,255,255,144,0,0,0,11,255,255,224,127,255,249,0,0,0,0,79,255,255,55,255,+255,144,0,0,0,1,255,255,245,127,255,249,0,0,0,0,14,255,255,103,255,255,144,0,+0,0,0,223,255,246,127,255,249,0,0,0,0,14,255,255,87,255,255,144,0,0,0,2,+255,255,244,127,255,249,0,0,0,0,111,255,255,23,255,255,144,0,0,0,12,255,255,176,+127,255,249,0,0,0,7,255,255,246,7,255,255,144,0,0,7,255,255,253,0,127,255,250,+17,35,125,255,255,255,64,7,255,255,255,255,255,255,255,255,96,0,127,255,255,255,255,255,+255,254,80,0,7,255,255,255,255,255,255,250,32,0,0,127,255,255,255,254,218,98,0,0,+0,0,127,255,255,255,255,255,247,127,255,255,255,255,255,247,127,255,255,255,255,255,247,127,+255,255,255,255,255,247,127,255,250,34,34,34,33,127,255,249,0,0,0,0,127,255,249,0,+0,0,0,127,255,249,0,0,0,0,127,255,249,0,0,0,0,127,255,255,255,255,255,224,+127,255,255,255,255,255,224,127,255,255,255,255,255,224,127,255,255,255,255,255,224,127,255,250,+17,17,17,16,127,255,249,0,0,0,0,127,255,249,0,0,0,0,127,255,249,0,0,0,+0,127,255,249,0,0,0,0,127,255,250,17,17,17,17,127,255,255,255,255,255,255,127,255,+255,255,255,255,255,127,255,255,255,255,255,255,127,255,255,255,255,255,255,127,255,255,80,0,+0,0,1,255,255,183,255,255,253,16,0,0,0,31,255,251,127,255,255,249,0,0,0,1,+255,255,183,255,255,255,243,0,0,0,31,255,251,127,255,255,255,208,0,0,1,255,255,183,+255,255,255,255,112,0,0,31,255,251,127,255,254,255,255,32,0,1,255,255,183,255,255,143,+255,251,0,0,31,255,251,127,255,245,175,255,246,0,1,255,255,183,255,255,81,239,255,225,+0,31,255,251,127,255,245,5,255,255,160,1,255,255,183,255,255,80,11,255,255,80,31,255,+251,127,255,245,0,46,255,253,17,255,255,183,255,255,80,0,127,255,249,31,255,251,127,255,+245,0,0,207,255,243,255,255,183,255,255,80,0,3,255,255,207,255,251,127,255,245,0,0,+8,255,255,255,255,183,255,255,80,0,0,13,255,255,255,251,127,255,245,0,0,0,79,255,+255,255,183,255,255,80,0,0,0,159,255,255,251,127,255,245,0,0,0,1,239,255,255,183,+255,255,80,0,0,0,5,255,255,251,127,255,245,0,0,0,0,10,255,255,176,191,255,245,+0,0,0,3,255,255,203,255,255,80,0,0,0,63,255,252,191,255,245,0,0,0,3,255,+255,203,255,255,80,0,0,0,63,255,252,191,255,245,0,0,0,3,255,255,203,255,255,80,+0,0,0,63,255,252,191,255,245,0,0,0,3,255,255,203,255,255,80,0,0,0,63,255,+252,191,255,245,0,0,0,3,255,255,203,255,255,80,0,0,0,63,255,252,191,255,245,0,+0,0,3,255,255,203,255,255,80,0,0,0,63,255,252,191,255,245,0,0,0,3,255,255,+202,255,255,96,0,0,0,63,255,252,159,255,247,0,0,0,4,255,255,184,255,255,160,0,+0,0,127,255,249,95,255,254,16,0,0,12,255,255,97,255,255,250,0,0,7,255,255,242,+10,255,255,253,118,123,255,255,251,0,63,255,255,255,255,255,255,255,48,0,111,255,255,255,+255,255,255,96,0,0,93,255,255,255,255,253,64,0,0,0,6,173,239,237,149,0,0,0,+};+const Glyph font2_glyphs[]={+{0,0,0,0,0,9},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{0,17,23,1,0,18},+{196,10,23,3,0,18},+{311,16,23,1,0,18},+{495,16,23,1,0,18},+{679,18,23,0,0,18},+{886,15,23,2,0,18},+{1059,17,23,1,0,18},+{1255,17,23,1,0,18},+{1451,17,23,1,0,18},+{1647,16,23,1,0,18},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1992,21,23,2,0,24},+{2234,14,23,2,0,17},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{2395,21,23,2,0,25},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{2637,19,23,2,0,23},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+{1831,14,23,0,0,14},+};+const Font fonts[]={{font0_glyphs,font0_pixels},{font1_glyphs,font1_pixels},{font2_glyphs,font2_pixels}};+const uint16_t ball0_pal[]={+0,65535,65535,63422,61309,61277,0,0,0,0,0,0,0,0,0,0,+};+const uint8_t ball0_pix[]={+0,0,0,1,33,17,18,16,0,0,0,0,0,2,17,17,17,17,17,16,0,0,0,0,+33,17,17,17,17,17,17,0,0,0,2,17,17,17,17,17,17,17,16,0,0,33,17,17,+17,17,17,17,17,17,0,1,17,17,17,17,17,17,17,17,17,16,2,17,17,17,17,17,+17,17,17,17,16,17,17,17,17,17,17,17,17,17,17,17,33,17,17,17,17,17,17,17,+17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,+18,17,17,17,17,17,17,17,17,17,17,18,17,17,17,17,17,17,17,17,17,17,17,17,+17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,1,17,17,+17,17,17,17,17,17,17,16,1,17,17,17,17,17,17,17,17,17,16,0,33,17,17,17,+17,17,17,17,17,0,0,1,17,17,17,17,17,17,17,16,0,0,0,33,17,17,17,17,+17,17,0,0,0,0,1,17,17,17,17,17,16,0,0,0,0,0,1,17,18,17,16,0,+0,0,+};+const Image ball0={22,22,ball0_pix,ball0_pal};+const uint16_t ball1_pal[]={+0,58117,53925,53860,45637,51716,51684,45540,29157,47523,49443,41315,29059,26785,10466,0,+};+const uint8_t ball1_pix[]={+0,0,0,6,150,203,85,0,0,0,0,0,0,14,196,65,72,34,37,80,0,0,0,0,+184,136,136,136,18,34,43,0,0,0,9,82,33,78,136,65,68,132,112,0,0,150,34,72,+132,20,136,132,34,57,0,9,156,136,132,33,20,136,130,34,86,144,12,220,181,33,33,72,+33,136,34,85,144,236,181,85,83,60,177,34,28,235,203,105,185,150,101,51,199,19,51,60,+236,124,182,153,150,85,60,113,33,33,203,126,85,203,185,150,99,187,19,17,23,195,61,197,+156,185,150,87,195,49,17,27,195,59,229,107,185,150,92,83,51,18,23,195,85,231,105,185,+118,188,53,51,51,51,197,83,204,103,185,153,198,85,51,51,51,199,85,204,107,11,155,197,+101,85,51,83,188,86,188,144,11,156,182,102,85,85,85,188,102,188,144,0,188,153,150,102,+102,101,188,105,189,0,0,11,155,153,150,102,150,204,153,176,0,0,0,153,153,153,153,155,+235,153,0,0,0,0,11,153,153,185,189,185,176,0,0,0,0,0,9,187,155,220,96,0,+0,0,+};+const Image ball1={22,22,ball1_pix,ball1_pal};+const uint16_t ball2_pal[]={+0,65503,57116,27567,10696,4357,4325,2245,2244,2212,2212,2212,2244,2212,100,0,+};+const uint8_t ball2_pix[]={+0,0,0,12,102,85,102,96,0,0,0,0,0,5,68,87,119,118,86,96,0,0,0,0,+68,68,93,138,173,183,86,0,0,0,4,68,69,136,238,167,173,214,96,0,0,84,68,93,+237,85,222,168,173,118,0,7,68,69,234,50,34,35,221,138,214,96,6,68,94,98,17,17,+17,39,216,169,96,102,85,174,49,33,17,18,19,231,173,118,102,218,228,17,18,68,50,18,+78,139,134,103,215,227,18,20,68,66,17,62,122,151,87,215,227,18,19,68,66,17,62,122,+167,87,215,227,17,47,51,242,17,62,122,167,103,216,228,33,36,84,49,18,93,138,167,102,+218,126,49,17,34,17,19,231,170,135,101,170,170,227,17,17,17,62,138,173,118,6,125,168,+174,67,34,52,234,138,170,112,6,93,170,136,238,221,238,138,170,215,112,0,102,218,170,119,+170,120,170,173,135,0,0,5,125,170,170,170,170,170,216,112,0,0,0,102,157,186,170,170,+218,119,0,0,0,0,5,103,138,170,168,119,96,0,0,0,0,0,6,103,119,119,96,0,+0,0,+};+const Image ball2={22,22,ball2_pix,ball2_pal};+const uint16_t ball3_pal[]={+0,65535,65535,63422,61244,57018,52793,48599,44405,42227,35921,25388,14791,4258,32,0,+};+const uint8_t ball3_pix[]={+0,0,0,7,206,221,236,160,0,0,0,0,0,5,69,188,255,203,151,144,0,0,0,0,+65,33,17,121,51,86,121,0,0,0,3,17,18,33,17,36,69,104,144,0,0,169,34,17,+18,51,35,69,103,187,0,11,235,18,17,33,18,19,69,102,190,192,12,251,18,18,19,154,+65,68,102,191,192,173,252,51,33,108,239,217,36,103,207,219,190,213,51,58,223,238,255,181,+103,157,235,191,129,34,27,253,238,239,180,103,123,252,139,34,34,23,254,238,239,132,103,153,+201,84,50,17,35,207,238,253,85,104,153,134,101,67,33,33,173,221,218,70,120,153,117,101,+83,51,34,68,69,86,102,137,153,100,133,99,68,52,67,52,86,119,153,136,69,7,138,84,+69,69,85,102,137,153,185,48,8,159,220,165,85,102,120,139,205,249,32,0,173,255,216,103,+120,137,157,255,217,0,0,12,238,236,136,137,153,206,238,176,0,0,0,205,255,201,169,155,+255,219,0,0,0,0,11,203,152,136,118,155,144,0,0,0,0,0,7,119,118,84,48,0,+0,0,+};+const Image ball3={22,22,ball3_pix,ball3_pal};+const uint16_t ball4_pal[]={+0,63141,64520,62254,58153,60013,59887,59794,57741,59664,59569,59599,57551,0,0,0,+};+const uint8_t ball4_pix[]={+0,0,0,2,72,197,84,64,0,0,0,0,0,2,88,203,188,204,136,32,0,0,0,0,+73,170,156,187,185,156,132,0,0,0,5,151,119,119,119,183,121,155,128,0,0,73,119,163,+121,51,121,179,59,152,0,2,151,119,203,119,170,121,201,155,187,128,5,119,124,203,152,136,+134,185,121,203,128,41,122,51,181,64,0,2,87,57,188,196,73,151,51,98,0,0,0,73,+185,155,200,92,185,203,80,0,0,0,8,167,59,200,92,155,201,80,0,0,0,4,151,123,+200,92,187,185,80,0,0,0,4,153,185,152,87,59,121,32,0,0,0,4,169,179,120,73,+119,123,81,0,0,0,75,119,203,196,44,179,188,180,16,0,2,87,51,185,196,5,204,187,+119,82,34,69,163,121,59,128,1,60,179,55,121,153,154,123,115,123,128,0,76,183,115,124,+155,55,187,51,184,0,0,4,204,121,185,185,119,156,188,80,0,0,0,72,203,187,183,153,+156,133,0,0,0,0,2,140,140,204,204,200,32,0,0,0,0,0,4,36,136,84,64,0,+0,0,+};+const Image ball4={22,22,ball4_pix,ball4_pal};+const uint16_t ball5_pal[]={+0,65323,65194,65162,65128,65095,64996,62950,62819,60707,56645,54500,46020,18850,10433,0,+};+const uint8_t ball5_pix[]={+0,0,0,6,85,85,85,96,0,0,0,0,0,9,148,19,84,68,86,96,0,0,0,0,+152,114,36,68,68,85,102,0,0,0,9,153,49,36,51,52,85,102,96,0,0,153,167,60,+195,34,51,69,92,198,0,10,138,165,206,236,18,35,69,125,232,128,9,170,139,237,237,17,+34,68,190,236,96,168,170,108,237,222,113,34,52,206,221,136,153,169,189,199,124,193,18,52,+203,108,184,153,169,186,66,17,49,18,52,118,102,136,170,170,101,67,33,17,17,36,86,104,+136,170,170,101,67,33,26,171,187,118,104,136,153,170,101,67,33,62,238,238,166,104,136,153,+170,101,67,33,29,237,237,86,104,104,168,170,133,67,34,28,237,236,86,104,103,9,154,149,+84,34,27,237,235,86,136,96,11,106,167,84,50,34,222,212,102,134,112,0,184,167,84,51,+50,189,117,104,103,0,0,11,153,85,67,51,52,71,101,64,0,0,0,202,117,84,68,69,+85,35,0,0,0,0,12,183,51,51,50,34,48,0,0,0,0,0,12,187,115,51,48,0,+0,0,+};+const Image ball5={22,22,ball5_pix,ball5_pal};+const uint16_t ball6_pal[]={+0,59147,62956,56463,60303,54229,48086,39863,60142,60011,57802,59624,29265,14343,9,0,+};+const uint8_t ball6_pix[]={+0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,199,119,124,192,0,0,0,0,0,+12,119,119,119,119,119,192,0,0,0,0,199,119,119,119,119,119,119,0,0,0,12,119,119,+102,102,102,102,102,112,0,0,118,102,102,102,102,102,102,102,102,0,0,102,102,102,102,101,+85,85,102,102,0,6,85,85,85,85,85,85,85,85,85,80,5,85,85,85,85,69,68,69,+85,85,80,5,72,68,72,136,136,136,136,68,69,80,8,153,136,153,153,153,153,153,136,132,+80,8,170,154,170,170,170,186,170,169,152,64,9,187,171,187,187,170,171,187,186,169,128,9,+171,170,169,153,153,153,154,170,169,128,10,154,153,132,67,51,52,72,153,169,128,0,169,132,+50,34,34,34,35,72,154,0,0,169,50,34,34,34,34,34,35,137,0,0,9,34,34,17,+17,17,34,34,64,0,0,0,50,33,17,17,17,18,34,0,0,0,0,2,33,17,17,17,+18,32,0,0,0,0,0,2,17,17,17,32,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,+};+const Image ball6={22,22,ball6_pix,ball6_pal};+const Image *const balls[]={&ball0,&ball1,&ball2,&ball3,&ball4,&ball5,&ball6};+const uint16_t PlayIcon_pal[]={+0,65535,65535,65535,65503,63422,61277,54970,48599,33808,14791,2113,32,32,0,0,+};+const uint8_t PlayIcon_pix[]={+0,0,0,0,0,0,0,0,0,0,0,0,51,19,67,51,49,51,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,49,17,17,17,17,17,17,+19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,17,17,+17,85,102,102,84,17,17,17,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,17,17,20,104,153,171,0,0,186,153,118,65,17,17,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,17,17,22,138,0,0,0,0,0,0,0,0,152,97,17,19,0,+0,0,0,0,0,0,0,0,0,0,0,0,17,17,22,155,0,11,192,0,0,0,0,12,+192,0,185,97,17,16,0,0,0,0,0,0,0,0,0,0,0,1,17,21,128,0,176,0,+0,0,0,0,0,0,0,11,0,8,81,17,16,0,0,0,0,0,0,0,0,0,0,49,+17,122,0,192,0,0,0,0,0,0,0,0,0,0,12,0,167,17,17,0,0,0,0,0,+0,0,0,0,1,17,72,0,192,0,0,0,0,0,0,0,0,0,0,0,0,11,0,132,+17,16,0,0,0,0,0,0,0,0,17,21,144,192,0,0,0,192,0,0,0,0,0,0,+0,0,0,0,12,9,81,17,0,0,0,0,0,0,0,1,17,90,11,0,0,10,144,12,+0,0,0,0,0,0,0,0,0,0,0,176,149,17,48,0,0,0,0,0,0,17,21,160,+176,0,0,149,54,144,12,0,0,0,0,0,0,0,0,0,0,11,10,81,19,0,0,0,+0,0,1,17,73,11,0,0,192,113,49,39,160,12,0,0,0,0,0,0,0,0,0,0,+176,148,49,0,0,0,0,0,3,17,144,176,0,0,0,113,51,17,88,176,13,0,0,0,+0,0,0,0,0,0,11,8,19,16,0,0,0,0,49,23,11,0,0,0,0,113,49,19,+17,105,0,192,0,0,0,0,0,0,0,0,0,176,113,19,0,0,0,0,17,90,0,0,+0,0,0,113,49,17,19,17,121,0,192,0,0,0,0,0,0,0,0,0,165,17,0,0,+0,3,17,144,192,0,0,0,0,113,49,17,17,49,20,122,0,192,0,0,0,0,0,0,+0,12,8,17,16,0,0,1,22,0,0,0,0,0,0,113,49,17,17,17,49,21,139,0,+0,0,0,0,0,0,0,0,0,97,16,0,0,49,25,12,0,0,0,0,0,113,49,17,+17,17,18,65,22,144,12,0,0,0,0,0,0,0,192,145,19,0,0,50,96,0,0,0,+0,0,0,113,49,17,17,17,17,17,49,23,144,12,0,0,0,0,0,0,0,181,35,0,+1,17,128,176,0,0,0,0,0,113,49,17,17,17,17,17,19,17,72,160,12,0,0,0,+0,0,11,8,17,16,3,20,160,0,0,0,0,0,0,113,49,17,17,17,17,17,17,19,+17,88,0,192,0,0,0,0,13,9,49,16,3,22,0,0,0,0,0,0,0,113,49,17,+17,17,17,17,17,17,35,17,105,0,192,0,0,0,0,0,97,48,1,24,11,0,0,0,+0,0,0,113,49,17,17,17,17,17,17,17,17,51,17,122,0,192,0,0,0,192,129,16,+17,25,12,0,0,0,0,0,0,113,49,17,17,17,17,17,17,17,17,17,17,20,138,0,+208,0,0,176,145,17,49,58,0,0,0,0,0,0,0,113,49,17,17,17,17,17,17,17,+17,17,17,49,22,144,12,0,0,208,145,19,49,90,0,0,0,0,0,0,0,113,49,17,+17,17,17,17,17,17,17,17,17,17,49,23,144,13,0,0,164,19,65,96,0,0,0,0,+0,0,0,113,49,17,17,17,17,17,17,17,17,17,17,17,19,17,71,160,0,0,197,19,+49,96,0,0,0,0,0,0,0,113,49,17,17,17,17,17,17,17,17,17,17,17,17,19,+17,89,13,0,6,20,49,112,0,0,0,0,0,0,0,113,49,17,17,17,17,17,17,17,+17,17,17,17,17,17,36,21,176,0,6,19,65,112,0,0,0,0,0,0,0,113,49,17,+17,17,17,17,17,17,17,17,17,17,17,17,52,22,0,0,6,19,49,96,0,0,0,0,+0,0,0,113,49,17,17,17,17,17,17,17,17,17,17,17,17,19,17,122,0,0,6,19,+49,96,0,0,0,0,0,0,0,113,49,17,17,17,17,17,17,17,17,17,17,17,19,17,+105,0,0,0,197,17,49,90,0,0,0,0,0,0,0,113,49,17,17,17,17,17,17,17,+17,17,17,19,33,88,176,0,0,0,164,17,49,74,0,0,0,0,0,0,0,113,49,17,+17,17,17,17,17,17,17,17,19,49,39,160,12,0,0,192,145,19,49,25,12,0,0,0,+0,0,0,113,49,17,17,17,17,17,17,17,17,17,49,22,144,12,0,0,0,192,145,17,+1,24,11,0,0,0,0,0,0,113,49,17,17,17,17,17,17,17,17,49,21,128,13,0,+0,0,0,192,129,16,4,22,0,0,0,0,0,0,0,113,49,17,17,17,17,17,17,17,+49,20,138,0,192,0,0,0,0,0,97,48,3,20,160,0,0,0,0,0,0,113,49,17,+17,17,17,17,17,19,17,122,0,192,0,0,0,0,13,9,65,16,1,17,128,176,0,0,+0,0,0,113,49,17,17,17,17,17,35,17,105,0,192,0,0,0,0,0,11,8,17,16,+0,18,96,0,0,0,0,0,0,113,49,17,17,17,17,19,17,88,0,13,0,0,0,0,+0,0,0,181,35,0,0,17,25,12,0,0,0,0,0,113,49,17,17,17,19,49,72,160,+12,0,0,0,0,0,0,0,192,145,19,0,0,1,22,0,0,0,0,0,0,113,49,17,+17,17,49,23,144,12,0,0,0,0,0,0,0,0,0,97,16,0,0,3,17,144,192,0,+0,0,0,113,49,17,18,49,22,144,12,0,0,0,0,0,0,0,0,12,8,17,48,0,+0,0,17,90,0,0,0,0,0,113,49,17,49,21,139,0,208,0,0,0,0,0,0,0,+0,0,165,17,0,0,0,0,17,23,11,0,0,0,0,113,49,51,19,122,0,192,0,0,+0,0,0,0,0,0,0,176,113,19,0,0,0,0,3,17,144,176,0,0,0,115,67,17,+105,0,176,0,0,0,0,0,0,0,0,0,11,8,17,16,0,0,0,0,1,17,73,11,+0,0,192,129,17,89,0,192,0,0,0,0,0,0,0,0,0,0,176,148,49,0,0,0,+0,0,0,49,21,160,176,0,0,167,88,160,12,0,0,0,0,0,0,0,0,0,0,11,+9,81,19,0,0,0,0,0,0,1,17,90,11,0,0,0,176,12,0,0,0,0,0,0,+0,0,0,0,0,176,149,17,48,0,0,0,0,0,0,0,17,21,144,192,0,0,12,0,+0,0,0,0,0,0,0,0,0,0,12,9,81,19,0,0,0,0,0,0,0,0,1,17,+72,0,192,0,0,0,0,0,0,0,0,0,0,0,0,11,0,132,17,48,0,0,0,0,+0,0,0,0,0,49,17,122,0,192,0,0,0,0,0,0,0,0,0,0,12,0,167,17,+17,0,0,0,0,0,0,0,0,0,0,3,17,21,128,0,176,0,0,0,0,0,0,0,+0,11,0,8,81,17,48,0,0,0,0,0,0,0,0,0,0,0,1,17,22,155,0,11,+205,0,0,0,0,220,176,0,185,97,17,16,0,0,0,0,0,0,0,0,0,0,0,0,+0,17,17,22,138,0,0,0,0,0,0,0,0,152,81,17,17,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,17,17,19,104,153,172,0,0,186,153,134,17,17,17,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49,17,17,17,70,102,102,84,17,+17,17,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,49,+17,17,17,17,17,17,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,19,51,51,52,49,49,0,0,0,0,0,0,0,0,0,0,0,0,+};+const Image PlayIcon={60,60,PlayIcon_pix,PlayIcon_pal};+const uint16_t Shop_pal[]={+0,65535,65535,65503,63422,63390,59164,50744,46486,33840,16936,2145,32,32,0,0,+};+const uint8_t Shop_pix[]={+0,0,0,0,0,0,0,0,0,0,0,0,17,18,51,34,34,18,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,33,17,17,17,17,17,17,+18,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17,17,+17,69,86,101,84,17,17,17,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,17,17,18,103,154,171,0,0,186,169,117,49,17,18,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,33,17,21,138,0,0,0,0,0,0,0,0,168,81,17,17,0,+0,0,0,0,0,0,0,0,0,0,0,0,18,17,22,155,0,11,192,0,0,0,0,12,+192,0,184,97,17,16,0,0,0,0,0,0,0,0,0,0,0,1,17,21,128,0,176,0,+0,0,0,0,0,0,0,11,0,8,81,17,32,0,0,0,0,0,0,0,0,0,0,33,+17,122,0,192,0,0,0,0,0,0,0,0,0,0,12,0,167,17,17,0,0,0,0,0,+0,0,0,0,1,17,56,0,192,0,0,0,0,0,0,0,0,0,0,0,0,11,0,131,+17,16,0,0,0,0,0,0,0,0,17,21,144,192,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,12,9,65,17,0,0,0,0,0,0,0,1,17,90,11,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,176,165,17,32,0,0,0,0,0,0,17,21,160,+188,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,10,65,17,0,0,0,+0,0,1,17,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+176,147,33,0,0,0,0,0,1,17,144,167,105,176,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,11,8,17,16,0,0,0,0,17,23,0,145,17,89,0,0,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,176,97,18,0,0,0,0,18,90,0,166,+49,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,17,0,0,+0,2,17,144,192,0,149,35,160,187,187,187,187,187,187,187,187,187,187,187,187,187,187,188,+0,12,8,17,16,0,0,1,22,0,0,11,8,17,128,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,0,81,16,0,0,17,25,12,0,0,10,49,88,136,136,136,+136,136,136,136,136,136,136,136,136,136,136,137,0,0,192,145,18,0,0,34,80,0,0,0,+0,98,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,144,192,0,181,33,0,+1,17,128,176,0,0,176,129,51,17,17,17,17,34,33,17,17,18,33,17,17,17,19,49,+144,192,11,8,17,16,2,19,160,0,0,0,0,164,21,153,153,153,153,49,105,153,153,129,+23,153,153,153,149,21,176,0,13,10,49,16,2,22,0,0,0,0,12,6,19,160,0,0,+10,49,112,0,0,145,24,0,0,0,163,23,13,0,0,0,81,48,1,23,11,0,0,0,+12,9,17,112,0,0,10,65,112,0,0,145,24,0,0,0,129,25,12,0,0,176,113,32,+17,25,12,0,0,0,0,10,65,70,102,102,102,33,86,102,102,97,21,102,102,102,65,74,+0,0,0,192,145,17,17,42,0,0,0,0,0,0,113,17,17,17,17,17,17,17,17,17,+17,17,17,17,17,96,0,0,0,192,145,17,33,74,0,0,0,0,0,176,145,36,85,85,+85,33,69,85,85,81,20,85,85,84,33,144,192,0,0,0,164,17,33,80,0,0,0,0,+0,0,181,21,187,187,10,49,112,187,176,145,24,11,187,6,20,160,0,0,0,0,197,18,+33,96,0,0,0,0,0,12,7,17,144,188,10,49,112,176,176,145,24,11,192,163,22,0,+0,0,0,0,6,18,33,96,0,0,0,0,0,12,9,17,112,0,10,65,112,0,0,145,+24,0,0,129,24,11,0,0,0,0,6,18,49,96,0,0,0,0,0,0,11,81,71,118,+118,49,87,103,103,97,21,118,103,81,58,0,0,0,0,0,6,19,49,96,0,0,0,0,+0,0,192,113,33,17,17,17,17,17,17,17,17,17,17,17,96,0,0,0,0,0,6,18,+33,80,0,0,0,0,0,0,192,146,35,68,68,17,52,68,68,49,19,68,67,49,128,176,+0,0,0,0,197,18,33,74,0,0,0,0,0,0,0,5,20,170,169,49,122,170,170,145,+24,170,166,19,160,0,0,0,0,0,164,18,17,42,0,0,0,0,0,0,12,7,17,144,+10,65,112,0,0,145,24,0,180,22,0,0,0,0,0,192,145,17,17,25,12,0,0,0,+0,0,0,10,49,106,169,49,122,170,170,145,24,170,129,24,11,0,0,0,0,192,145,17,+1,23,11,0,0,0,0,0,0,10,67,52,68,35,52,52,52,51,51,68,50,58,12,0,+0,0,0,192,113,32,2,22,0,0,0,0,0,0,12,6,17,17,17,17,17,17,17,17,+17,17,17,80,0,0,0,0,0,0,81,32,1,19,160,0,0,0,0,0,0,164,22,119,+119,119,119,119,119,119,119,119,119,160,0,0,0,0,13,10,33,16,3,17,128,176,0,0,+0,0,192,129,75,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,8,17,16,+0,18,80,0,0,0,0,0,0,97,112,0,0,0,0,0,0,0,0,0,0,192,0,0,+0,0,0,181,33,0,0,17,25,12,0,0,0,0,10,50,154,170,170,170,170,170,170,170,+170,170,170,0,0,0,0,0,192,145,18,0,0,1,22,0,0,0,0,12,8,18,68,51,+51,51,51,51,51,51,51,51,52,128,192,0,0,0,0,81,16,0,0,1,17,144,192,0,+0,12,8,35,17,17,18,17,17,17,17,17,17,17,49,128,192,0,0,12,8,17,32,0,+0,0,18,90,0,0,0,0,0,166,17,49,21,153,153,153,153,65,19,17,122,0,0,0,+0,0,164,17,0,0,0,0,33,23,11,0,0,0,208,146,56,168,49,144,0,0,8,20,+154,113,75,0,0,0,0,176,97,17,0,0,0,0,1,17,144,176,0,0,176,129,96,0,+97,112,189,219,6,24,0,180,25,12,0,0,11,8,17,16,0,0,0,0,1,17,57,11,+0,0,176,129,91,0,97,128,176,0,6,39,0,164,25,12,0,0,176,147,33,0,0,0,+0,0,0,17,21,160,176,0,0,163,22,134,17,144,208,11,8,19,120,81,91,0,0,11,+10,65,17,0,0,0,0,0,0,2,17,90,11,0,13,8,17,17,24,0,0,0,0,97,+17,19,144,208,0,176,165,17,32,0,0,0,0,0,0,0,33,21,144,176,0,0,150,86,+144,0,0,0,0,8,101,105,0,0,12,9,65,17,0,0,0,0,0,0,0,0,1,17,+56,0,192,0,0,176,0,0,0,0,0,0,12,0,208,11,0,131,17,32,0,0,0,0,+0,0,0,0,0,17,17,122,0,192,192,0,192,0,0,0,0,12,0,13,12,0,166,17,+17,0,0,0,0,0,0,0,0,0,0,1,17,21,128,0,188,0,0,0,0,0,0,0,+0,203,0,8,65,17,32,0,0,0,0,0,0,0,0,0,0,0,1,17,21,155,0,11,+205,0,0,0,0,220,176,0,184,81,17,16,0,0,0,0,0,0,0,0,0,0,0,0,+0,33,17,21,138,0,0,0,0,0,0,0,0,168,81,17,17,0,0,0,0,0,0,0,+0,0,0,0,0,0,0,0,17,17,18,87,153,172,0,0,186,153,117,17,17,18,0,0,+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,17,17,17,69,86,102,84,17,+17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,49,+17,17,17,17,17,17,18,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+0,0,0,0,0,0,18,34,35,34,33,17,0,0,0,0,0,0,0,0,0,0,0,0,+};+const Image Shop={60,60,Shop_pix,Shop_pal};+const uint16_t Score_Coin_pal[]={+0,65500,65459,65363,65321,65286,65191,65184,65131,65031,65090,64962,64902,64865,64705,0,+};+const uint8_t Score_Coin_pix[]={+0,0,36,65,17,0,0,0,52,90,131,17,131,0,3,74,187,137,204,212,0,4,171,219,+51,222,186,128,53,187,185,52,221,235,33,53,147,51,71,119,121,35,56,185,52,119,119,185,+67,19,187,183,119,123,187,163,18,157,183,122,40,219,83,50,190,167,217,57,234,83,8,186,+190,219,219,165,48,8,69,168,138,170,88,0,0,152,34,69,84,128,0,0,0,136,136,137,+0,0,+};+const Image Score_Coin={14,14,Score_Coin_pix,Score_Coin_pal};+const uint16_t crown_pal[]={+0,65535,65535,65535,65503,65503,65503,0,0,0,0,0,0,0,0,0,+};+const uint8_t crown_pix[]={+0,0,0,1,0,0,0,0,0,0,1,17,0,0,0,17,0,1,17,17,0,1,33,17,+34,17,17,17,17,17,17,17,17,17,17,17,17,16,17,17,17,17,17,17,16,1,17,17,+17,17,17,18,0,17,17,17,17,17,17,16,0,17,17,17,17,17,32,0,1,17,17,17,+18,17,0,+};+const Image crown={15,10,crown_pix,crown_pal};+const uint16_t Pause_pal[]={+0,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,+};+const uint8_t Pause_pix[]={+17,17,16,1,17,17,17,17,17,16,17,17,17,17,17,17,1,17,17,17,17,17,16,17,+17,17,17,17,17,1,17,17,17,17,17,16,17,17,17,17,17,17,1,17,17,17,17,17,+16,17,17,17,17,17,17,1,17,17,17,17,17,16,17,17,17,17,17,17,1,17,17,17,+17,17,16,17,17,17,17,17,16,2,17,17,16,+};+const Image Pause={13,13,Pause_pix,Pause_pal};+const uint16_t Balls_pal[]={+0,65535,65535,65535,65503,65503,65503,65503,63422,63422,61309,59196,52825,44373,31727,0,+};+const uint8_t Balls_pix[]={+0,0,0,0,3,17,17,17,34,0,0,0,0,0,0,0,0,2,17,17,33,17,33,17,+48,0,0,0,0,0,0,17,16,0,0,0,0,18,17,0,0,0,0,0,49,16,0,0,+0,0,0,0,50,16,0,0,0,3,17,0,0,0,0,0,0,0,0,17,0,0,0,1,+32,0,0,0,0,1,34,19,0,2,16,0,0,33,0,0,0,0,0,33,17,17,33,0,+17,0,2,16,0,0,0,0,49,17,17,17,17,48,49,0,2,32,0,0,0,0,17,17,+17,17,17,16,2,16,49,0,0,0,0,2,17,17,17,17,17,17,3,16,33,0,0,0,+0,2,17,17,17,17,17,17,0,18,33,0,0,0,0,2,17,17,17,17,17,17,0,17,+34,0,0,0,0,2,17,17,17,17,17,17,0,33,17,0,0,0,0,2,17,17,17,17,+17,18,0,17,17,0,0,0,1,1,17,17,17,17,17,19,0,17,33,0,0,0,1,0,+33,17,17,17,17,32,0,33,33,0,0,0,16,0,18,17,17,17,17,0,0,33,33,0,+0,1,0,0,0,18,17,17,16,0,0,17,1,48,0,17,17,17,17,0,0,0,0,0,+1,16,2,32,0,0,0,0,0,0,0,0,0,0,1,32,3,19,0,0,0,0,0,0,+0,0,0,0,17,0,0,33,0,0,0,0,0,0,0,0,0,0,18,0,0,2,16,0,+0,0,0,0,0,0,0,1,16,0,0,0,17,0,0,0,0,0,0,0,0,18,0,0,+0,0,1,35,0,0,0,0,0,0,17,32,0,0,0,0,0,33,17,0,0,0,0,17,+17,0,0,0,0,0,0,0,17,18,18,18,17,18,0,0,0,0,0,0,0,0,0,33,+17,17,33,0,0,0,0,0,+};+const Image Balls={28,28,Balls_pix,Balls_pal};+const BallStyle ball_styles[]={+{.name="Basic Ball",.price=0,.colors={65535},.rotates=0,.type=0,.count=1,.height=56,.offset_x=0,.offset_y=0},+{.name="Basketball",.price=100,.colors={64192},.rotates=1,.type=0,.count=1,.height=56,.offset_x=0,.offset_y=0},+{.name="8-Ball",.price=100,.colors={36479,0,36479},.rotates=1,.type=1,.count=3,.height=50,.offset_x=0,.offset_y=0},+{.name="Football",.price=100,.colors={65535,0},.rotates=1,.type=2,.count=2,.height=56,.offset_x=0,.offset_y=0},+{.name="Donut",.price=500,.colors={65535,59631,60520,60520},.rotates=1,.type=0,.count=4,.height=56,.offset_x=0,.offset_y=0},+{.name="Smiley",.price=1000,.colors={64963},.rotates=0,.type=1,.count=1,.height=56,.offset_x=0,.offset_y=0},+{.name="Rainbow Bubble",.price=1500,.colors={543,47135,63499,65312,38892},.rotates=1,.type=0,.count=5,.height=52,.offset_x=0,.offset_y=0},+};+const Landscape landscapes[]={+{"Mountains",0,53134,53134,12612},+};+const uint16_t earth0_pal[]={+0,25094,12612,12612,12612,12612,12612,12612,10531,8451,8418,8419,8418,8418,8418,6338,+};+const uint8_t earth0_pix[]={+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,34,37,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,137,151,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,82,34,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,82,137,133,85,85,85,85,85,85,85,85,82,37,85,85,85,85,85,85,85,85,+85,85,85,85,85,87,82,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,88,152,101,85,85,85,85,85,82,34,37,85,85,82,37,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,34,37,85,85,85,85,85,85,85,85,120,133,+85,85,85,85,85,85,85,85,85,85,85,85,82,142,185,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,34,34,85,85,85,85,85,85,41,238,146,85,85,85,85,85,40,153,133,+85,85,121,133,83,53,85,85,85,85,85,85,35,119,85,85,85,85,85,85,85,85,85,85,+82,85,85,85,85,82,142,235,117,85,85,85,85,85,85,85,85,85,85,85,85,120,153,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,137,153,117,85,85,85,85,85,82,120,117,+85,85,85,85,85,88,156,151,85,85,88,135,120,136,82,37,85,85,85,82,138,234,117,85,+85,85,85,85,85,85,85,85,121,130,85,85,85,85,88,136,117,85,85,85,82,34,37,85,+85,85,85,85,85,82,34,85,85,85,85,85,82,85,85,85,85,85,85,85,87,158,234,133,+85,85,85,85,85,85,82,85,85,85,85,85,85,82,37,85,85,82,120,153,172,204,169,133,+37,85,85,85,137,152,85,85,85,85,82,37,85,85,85,85,120,117,85,85,85,85,82,34,+85,85,85,85,88,154,133,85,85,85,85,85,85,85,85,85,85,85,85,85,153,117,85,85,+85,85,85,85,85,88,133,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+82,89,174,236,204,204,206,233,133,37,85,85,34,34,85,85,85,85,136,151,85,85,34,34,+34,85,85,85,85,85,85,85,85,85,85,85,89,153,133,85,85,85,85,85,85,85,85,85,+85,85,85,85,136,85,85,85,85,85,85,85,85,83,53,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,40,190,204,204,204,204,204,204,233,130,85,85,85,85,85,85,+85,87,33,18,114,39,136,136,136,82,34,85,85,85,85,85,85,85,85,85,82,34,37,85,+85,85,85,85,85,85,85,85,85,85,85,85,82,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,82,138,156,236,204,204,204,204,204,+206,217,85,85,85,85,85,85,85,40,17,18,120,154,206,238,204,153,136,133,34,37,85,85,+85,85,85,85,85,85,85,82,34,34,34,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,40,+234,17,173,204,204,204,204,204,204,206,151,37,85,85,85,85,85,85,136,136,158,236,202,172,+204,206,238,201,152,133,37,85,85,85,85,85,85,85,82,88,137,153,136,114,37,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,82,142,205,152,172,204,204,204,204,204,204,204,234,130,85,85,85,85,+85,85,34,138,236,204,207,252,204,204,204,204,238,201,130,85,85,85,85,85,85,82,88,156,+238,238,238,169,130,37,85,85,85,85,85,85,82,87,82,34,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,53,50,41,236,204,238,204,206,236,204,204,204,+204,204,206,232,34,85,85,85,85,82,137,236,204,204,193,30,204,204,204,204,204,255,233,82,+82,85,85,85,82,40,174,236,204,204,204,204,201,130,85,85,85,85,85,85,89,172,201,136,+130,37,85,85,85,85,85,85,85,85,85,85,35,85,85,85,85,34,85,83,136,137,158,204,+204,204,204,206,254,204,204,204,204,204,204,206,152,82,85,85,34,121,206,204,204,204,162,46,+204,204,204,204,204,236,206,249,136,117,85,82,40,158,204,204,204,204,204,223,254,200,40,153,+85,85,85,85,41,255,255,238,201,130,85,85,85,82,34,85,85,85,87,155,152,85,85,85,+85,137,130,40,17,17,236,204,204,204,204,204,204,204,204,204,204,204,204,204,238,152,114,34,+137,174,204,204,204,204,207,252,204,204,204,204,204,204,174,49,17,37,34,120,156,236,204,204,+204,204,205,145,41,238,146,136,85,85,85,39,154,204,202,204,204,233,114,85,85,88,153,117,+85,85,85,137,152,37,85,85,85,153,117,39,33,17,158,172,204,204,204,204,205,236,204,204,+204,205,236,204,204,238,169,136,238,204,204,204,238,204,202,172,204,204,204,204,204,204,175,17,+18,153,153,158,236,204,206,204,204,204,206,145,25,234,233,114,85,85,82,138,236,204,204,204,+238,174,168,34,85,142,232,85,85,85,85,34,34,85,85,85,85,34,34,137,255,255,236,239,+236,204,204,202,153,153,172,204,204,17,63,172,204,204,206,238,204,204,204,205,255,204,204,204,+204,204,204,204,204,204,202,255,255,238,238,204,204,204,207,252,204,204,204,239,254,204,206,168,+82,34,88,205,204,204,204,206,152,250,206,152,50,120,82,85,85,85,85,85,85,85,85,85,+85,37,137,206,170,170,204,239,236,206,173,135,117,85,120,239,237,130,158,204,204,170,204,204,+204,204,204,204,204,204,204,204,204,204,204,170,204,204,204,170,170,204,204,204,204,204,204,236,+204,204,204,202,172,204,204,206,153,153,158,204,204,204,204,174,145,31,172,238,152,82,37,85,+85,85,85,85,85,85,83,34,39,137,206,204,204,204,204,202,206,168,33,39,85,85,40,152,+140,255,236,204,202,255,204,204,204,204,204,204,204,204,206,238,237,204,202,255,172,204,204,204,+204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,238,238,220,202,170,204,204,202,+248,46,172,204,238,152,133,34,37,85,85,85,85,82,40,152,154,238,204,204,204,204,204,204,+233,114,129,24,37,85,85,34,40,156,204,204,175,33,31,172,204,204,204,204,204,237,153,153,+153,173,207,17,47,172,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,+204,204,204,207,255,220,204,204,174,250,204,204,204,238,201,152,135,85,34,37,87,120,146,18,+250,204,204,204,204,204,204,206,149,37,120,35,85,85,85,85,82,40,204,204,175,17,142,204,+204,204,170,204,236,152,82,34,37,120,137,18,206,236,204,204,204,204,204,204,202,204,204,206,+238,238,238,204,204,204,204,204,204,204,204,232,35,206,204,204,202,172,204,204,204,204,206,238,+202,153,153,153,154,172,241,25,234,204,204,204,204,202,172,233,37,85,82,117,85,85,85,85,+85,82,138,236,202,255,236,204,204,204,255,236,152,34,85,85,85,82,34,136,136,156,236,204,+204,204,204,204,207,234,206,201,152,136,137,174,236,204,204,204,169,204,175,17,17,25,218,204,+204,204,204,202,172,204,204,204,239,254,238,238,220,204,175,254,204,204,204,204,204,239,254,146,+85,85,85,85,85,34,85,85,85,85,39,158,204,170,204,204,204,204,98,136,35,85,85,85,+85,85,85,34,34,40,158,204,204,204,204,204,226,159,169,133,34,34,34,120,156,236,204,202,+255,234,206,33,17,28,238,238,236,204,204,239,252,204,204,204,239,220,204,204,204,204,202,172,+204,204,204,204,206,130,137,37,85,85,85,85,85,136,117,85,85,85,82,89,238,204,204,204,+202,217,17,39,85,85,85,85,85,85,85,85,85,82,40,174,204,204,204,202,241,21,130,53,+85,85,85,82,40,158,204,175,17,110,170,255,255,249,153,153,159,252,206,145,30,204,204,204,+204,204,204,204,204,204,204,204,204,204,204,204,175,33,24,53,85,85,85,85,85,17,39,85,+85,85,85,82,137,206,204,204,238,233,136,133,85,85,85,85,85,50,37,85,85,85,82,121,+236,204,204,206,237,18,117,85,82,82,37,85,82,89,236,174,33,142,204,170,201,133,34,34,+88,158,175,17,47,172,204,204,204,204,204,204,204,204,204,204,204,204,204,204,236,152,133,85,+85,85,85,82,130,17,85,85,85,85,85,85,34,137,156,238,153,133,34,53,85,85,85,85,+40,169,133,85,85,85,85,53,138,206,236,169,130,136,85,85,57,185,133,85,85,82,141,234,+255,236,204,234,130,37,85,85,82,40,174,175,252,204,204,204,204,204,202,204,204,204,204,204,+204,204,204,238,152,34,85,85,85,34,85,85,82,136,85,85,85,85,34,85,85,34,88,153,+34,37,85,85,85,85,85,85,87,153,152,53,85,85,85,85,39,136,136,114,37,37,85,85,+88,154,146,85,85,85,40,174,169,172,206,151,37,85,85,85,85,82,121,236,172,204,204,204,+204,204,207,237,204,204,204,204,204,204,238,152,82,85,85,85,87,136,117,85,85,82,85,85,+85,88,136,117,85,85,82,34,85,85,85,34,37,85,85,85,85,34,37,85,85,85,85,85,+85,34,34,85,85,85,85,85,82,34,37,85,85,85,82,89,206,238,201,85,85,85,82,34,+85,85,82,137,222,204,204,204,204,204,225,17,236,204,204,204,204,237,152,82,85,85,85,83,+139,236,130,85,85,85,85,85,82,139,235,130,85,85,85,85,85,85,85,137,149,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,82,+136,136,130,85,85,85,88,136,85,85,85,34,137,206,236,204,204,204,209,19,236,204,204,206,+234,152,34,85,85,85,85,85,88,133,53,85,85,85,85,85,85,88,133,53,85,85,85,85,+85,85,40,251,130,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,50,34,85,85,85,82,158,233,37,85,85,85,34,136,156,238,+236,204,207,255,204,206,238,169,135,34,85,85,85,85,85,85,82,37,85,85,85,85,85,85,+85,82,37,85,85,85,85,85,85,85,88,133,37,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,136,133,+85,85,85,85,85,82,88,137,153,204,234,172,202,169,152,114,37,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,82,37,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,50,53,85,85,85,85,85,85,83,34,37,136,136,136,135,83,34,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+84,66,34,34,36,69,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,+85,85,85,85,85,85,85,85,+};+const Image earth0={160,34,earth0_pix,earth0_pal};+const uint16_t bg0_pal[]={+46811,40605,36509,36445,34365,32284,30172,28091,25979,25913,23898,21818,29847,27767,27767,23661,27734,23626,23626,21578,21578,25654,25649,23571,+19340,15079,15046,15046,15046,15046,15046,15046,+};+const uint32_t bg0_offset[]={+0,34,70,109,152,194,234,523,559,595,628,663,696,726,758,790,814,833,853,1194,1210,1224,1238,1258,+1280,1314,1346,1373,1452,1479,1505,1565,1592,1620,1647,1839,1866,1892,1916,1948,1979,2010,2042,2228,2262,2298,2332,2366,+2408,2452,2499,2591,2667,2749,2801,2854,2909,2976,3053,3142,3225,3456,3543,3634,3714,3782,3917,3973,4019,4107,4264,4497,+4625,4672,4716,4757,4803,4840,4880,4918,4965,5002,5051,5091,5142,5191,5240,5293,5342,5387,5439,5497,5559,5637,5712,5840,+5935,6034,6134,6240,6356,6483,6631,6784,6947,7113,7279,7467,7672,7904,8127,8354,8595,8872,9139,9431,9712,10004,10296,10584,+10878,11149,11438,11735,12040,12362,12669,12985,13275,13548,13777,14002,14235,14461,14651,14838,15012,15207,15419,15623,15838,16066,16290,16499,+16708,16916,17120,17344,17568,17780,17997,18210,18433,18630,18823,19001,19181,19324,19439,19535,19638,19715,19770,19802,19819,19832,19840,19848,+19856,19864,19872,19880,19888,19896,19904,19912,19920,19928,19936,19944,19952,19960,19968,19976,19984,19992,20000,20008,20016,20024,20032,20040,+20048,20056,20064,20072,20080,20088,20096,20104,20112,20120,20128,20136,20144,20152,20160,20168,20176,20184,20192,20200,20208,20216,20224,20232,+20240,20248,20256,20264,20272,20280,20288,20296,20304,20312,20320,20328,20336,20344,20352,20360,20368,20376,20384,20392,20400,20408,20416,20424,+};+const uint8_t bg0_rle[]={+187,11,0,9,134,1,0,12,145,21,0,12,135,1,0,21,135,23,0,9,138,1,0,9,+131,1,0,3,255,11,255,11,208,11,186,11,0,9,134,1,0,12,147,21,0,12,133,1,+0,5,136,23,0,21,137,1,2,3,23,12,131,1,0,6,255,11,255,11,207,11,186,11,+0,5,133,1,0,12,149,21,0,12,132,1,2,13,23,21,135,23,0,12,136,1,3,5,+23,23,12,131,1,0,8,255,11,255,11,206,11,185,11,0,7,132,1,1,4,16,151,21,+0,12,130,1,1,4,21,135,23,3,21,23,21,3,135,1,4,6,23,21,23,12,130,1,+0,3,255,11,255,11,206,11,184,11,0,9,132,1,0,6,154,21,5,12,1,1,12,23,+21,135,23,2,21,23,12,135,1,5,9,23,21,21,23,12,130,1,0,6,255,11,255,11,+205,11,182,11,2,10,11,4,131,1,0,9,156,21,2,12,5,21,140,23,0,4,134,1,+6,12,23,21,23,21,23,12,130,1,0,8,255,11,255,11,204,11,3,11,10,11,10,139,+11,3,10,11,11,10,130,11,0,10,133,11,130,10,130,11,5,10,10,11,11,10,11,130,+10,2,11,11,10,132,11,3,10,10,11,6,131,1,0,12,159,21,2,23,21,21,130,23,+0,21,132,23,2,21,23,13,134,1,0,13,131,23,8,21,23,12,1,1,3,10,11,10,+136,11,130,10,130,11,11,10,11,10,11,11,10,10,11,11,10,11,10,133,11,130,10,2,+11,10,10,133,11,3,10,11,11,10,141,11,2,10,11,10,131,11,6,10,11,11,10,11,+10,10,131,11,4,10,10,11,11,10,131,11,3,10,11,11,10,130,11,3,10,11,11,10,+131,11,6,10,11,11,10,11,11,10,130,11,8,10,11,11,10,11,10,11,10,10,130,11,+2,10,11,10,134,11,0,10,154,11,130,10,131,11,0,10,131,11,2,10,11,10,130,11,+14,10,10,11,10,11,11,10,11,11,10,11,11,10,11,10,147,11,1,10,10,139,11,130,+10,130,11,7,10,10,11,11,10,11,11,10,137,11,0,10,130,11,2,10,11,10,130,11,+0,10,130,11,3,10,11,11,10,132,11,130,10,11,11,11,10,11,11,10,11,10,11,10,+11,10,136,11,5,10,11,10,10,11,11,130,10,141,11,0,10,130,11,181,10,1,11,9,+131,1,0,13,174,21,1,23,5,133,1,1,21,23,132,21,5,23,13,1,1,5,11,255,+10,255,10,201,10,0,11,181,10,5,11,3,1,1,5,13,175,21,1,23,13,133,1,1,+21,23,133,21,5,23,13,1,1,8,11,255,10,255,10,200,10,0,11,180,10,4,11,6,+1,1,6,178,21,1,23,6,132,1,1,21,23,134,21,3,23,16,1,1,255,10,255,10,+201,10,0,11,179,10,4,11,8,1,1,9,179,21,1,23,21,131,1,2,4,21,23,135,+21,4,23,21,1,5,11,255,10,255,10,199,10,0,11,180,10,2,1,1,12,160,21,0,+23,147,21,1,23,12,130,1,0,5,138,21,4,23,21,1,7,11,255,10,255,10,199,10,+178,10,3,11,5,1,13,182,21,1,23,21,130,1,1,9,23,138,21,3,23,21,5,8,+255,10,255,10,199,10,177,10,3,11,6,5,13,168,21,0,23,142,21,5,23,12,1,1,+12,23,139,21,2,23,21,9,255,10,255,10,199,10,177,10,1,8,9,166,21,0,23,130,+21,0,23,144,21,3,3,1,12,23,140,21,2,23,21,9,255,10,255,10,198,10,177,10,+0,13,188,21,4,23,12,1,12,23,141,21,2,23,13,8,255,10,255,10,197,10,175,10,+1,8,9,191,21,2,6,13,23,143,21,255,10,255,10,198,10,174,10,1,8,9,194,21,+0,23,143,21,1,9,8,255,10,255,10,196,10,1,10,8,130,10,16,8,10,10,8,8,+10,8,10,8,10,10,8,8,10,10,8,8,130,10,2,8,10,10,130,8,5,10,8,10,+10,8,8,130,10,7,8,8,10,8,10,10,8,10,213,21,134,8,4,10,10,8,8,10,+130,8,133,10,4,8,10,8,10,10,130,8,7,10,10,8,8,10,8,10,10,133,8,10,+10,10,8,8,10,10,8,10,10,8,8,130,10,0,8,130,10,14,8,10,10,8,8,10,+8,10,10,8,10,8,10,8,8,130,10,6,8,8,10,10,8,10,8,130,10,130,8,4,+10,8,8,10,8,132,10,6,8,10,8,10,10,8,10,131,8,6,10,8,8,10,10,8,+8,130,10,1,8,10,130,8,132,10,0,8,130,10,0,8,130,10,130,8,1,10,8,130,+10,0,8,130,10,130,8,6,10,10,8,8,10,8,8,130,10,1,8,8,131,10,0,8,+130,10,4,8,8,10,10,8,130,10,14,8,8,10,10,8,10,8,10,10,8,8,10,8,+8,10,130,8,4,10,8,10,10,8,131,10,8,8,8,10,8,10,10,8,10,8,130,10,+130,8,3,10,10,8,8,135,10,29,8,10,10,8,10,10,8,8,10,8,10,10,8,10,+8,10,8,10,8,10,8,10,10,8,10,8,8,10,8,8,130,10,130,8,134,10,2,8,+10,8,131,10,6,8,8,10,8,8,10,10,130,8,9,10,8,8,10,8,8,10,8,10,+8,130,10,130,8,7,10,8,8,10,10,8,8,10,130,8,0,10,174,8,0,13,213,21,+0,9,255,8,255,8,195,8,0,10,173,8,0,9,214,21,0,13,255,8,255,8,196,8,+173,8,0,13,215,21,236,8,134,7,255,8,208,8,172,8,0,13,216,21,0,9,231,8,+130,7,137,6,130,7,255,8,203,8,171,8,0,9,218,21,228,8,130,7,132,6,132,5,+133,6,130,7,255,8,200,8,171,8,0,13,218,21,0,9,224,8,3,7,8,7,7,131,+6,1,5,1,134,0,2,1,1,5,131,6,130,7,255,8,198,8,170,8,0,13,219,21,+1,13,7,223,8,1,7,7,130,6,1,5,1,141,0,0,5,131,6,1,7,7,255,8,+197,8,168,8,1,7,9,221,21,221,8,131,7,130,6,0,1,145,0,0,5,130,6,131,+7,255,8,194,8,0,8,136,7,0,8,146,7,0,8,137,7,2,8,13,16,168,21,0,+16,178,21,2,9,7,8,137,7,1,8,8,134,7,3,8,7,7,8,198,7,2,6,6,+5,148,0,3,1,5,6,6,224,7,0,8,132,7,0,8,139,7,0,8,143,7,0,8,+148,7,0,8,147,7,0,8,147,7,0,8,168,7,1,13,21,170,16,178,21,0,13,221,+7,130,6,0,5,151,0,2,5,6,6,255,7,196,7,167,7,0,9,172,16,179,21,0,+8,219,7,130,6,0,5,153,0,2,5,6,6,255,7,195,7,166,7,1,8,13,132,16,+7,13,16,13,13,16,16,13,13,136,16,130,13,131,16,7,13,13,16,13,13,16,13,13,+130,16,4,13,16,13,13,16,179,21,0,9,218,7,130,6,0,5,154,0,3,1,5,6,+6,255,7,194,7,166,7,1,13,16,172,13,180,21,217,7,130,6,1,5,1,155,0,1,+1,5,130,6,255,7,192,7,165,7,1,9,16,173,13,180,21,0,9,216,7,3,6,6,+5,1,157,0,0,5,130,6,255,7,192,7,164,7,0,8,175,13,180,21,0,13,214,7,+131,6,0,5,158,0,1,1,5,130,6,255,7,191,7,130,7,0,6,135,7,1,6,6,+132,7,0,6,130,7,0,6,130,7,4,6,6,7,7,6,132,7,1,13,16,174,13,181,+21,1,8,6,130,7,130,6,2,7,7,6,143,7,130,6,137,7,0,6,131,7,0,6,+139,7,6,6,7,7,6,7,7,6,130,7,0,6,136,7,7,6,7,7,6,7,6,7,+7,131,6,1,5,1,159,0,0,5,131,6,133,7,1,6,6,135,7,1,6,6,148,7,+1,6,6,133,7,0,6,135,7,3,6,6,7,6,133,7,3,6,7,7,6,130,7,1,+6,6,138,7,0,6,136,7,0,6,140,7,2,6,7,6,131,7,0,6,130,7,0,6,+131,7,0,6,130,7,0,6,136,7,3,6,7,7,6,132,7,4,6,7,7,6,6,135,+7,130,6,134,7,2,6,7,6,130,7,130,6,137,7,163,6,1,9,16,174,13,182,21,+0,9,215,6,1,5,5,160,0,1,1,5,255,6,192,6,0,7,162,6,0,8,176,13,+183,21,0,7,214,6,1,5,5,161,0,1,5,5,255,6,191,6,0,7,162,6,177,13,+183,21,0,9,214,6,1,5,1,161,0,1,5,5,255,6,191,6,0,7,161,6,1,9,+16,176,13,145,21,1,13,13,163,21,0,13,213,6,2,5,5,1,161,0,2,1,5,5,+255,6,191,6,160,6,0,8,178,13,144,21,1,12,12,165,21,0,7,212,6,2,5,5,+1,161,0,2,1,5,5,255,6,191,6,160,6,179,13,142,21,2,12,1,12,166,21,1,+9,5,210,6,2,5,5,4,162,0,0,1,130,5,255,6,190,6,159,6,0,9,179,13,+141,21,2,5,1,12,167,21,0,13,210,6,130,5,0,4,162,0,0,1,130,5,255,6,+190,6,4,6,6,5,6,5,131,6,0,5,146,6,2,5,5,7,180,13,139,21,3,12,+1,1,12,169,21,1,8,5,130,6,1,5,5,134,6,130,5,6,6,6,5,6,6,5,+5,143,6,2,5,6,6,130,5,1,6,6,130,5,144,6,0,5,132,6,5,5,6,5,+6,5,5,130,6,130,5,1,4,1,161,0,1,1,4,130,5,2,6,5,5,138,6,0,+5,134,6,1,5,5,132,6,2,5,6,5,139,6,4,5,5,6,6,5,131,6,0,5,+147,6,131,5,133,6,3,5,6,6,5,131,6,2,5,6,5,132,6,130,5,3,6,5,+6,5,130,6,0,5,132,6,0,5,139,6,1,5,5,130,6,3,5,6,5,5,142,6,+4,5,6,5,6,5,140,6,0,5,135,6,0,5,131,6,0,5,131,6,157,5,0,6,+181,13,137,21,0,12,130,1,0,13,170,21,0,13,212,5,1,4,1,161,0,1,1,4,+255,5,191,5,0,6,157,5,1,9,14,179,13,0,16,135,21,4,16,6,1,0,1,173,+21,0,6,211,5,1,4,1,161,0,0,1,255,5,192,5,0,6,156,5,0,7,181,13,+0,16,134,21,4,12,1,1,0,4,174,21,0,9,211,5,1,4,1,161,0,1,3,4,+255,5,192,5,155,5,1,6,12,181,13,133,21,5,12,1,1,0,1,5,175,21,0,13,+211,5,1,4,1,160,0,1,1,3,255,5,193,5,155,5,0,12,182,13,0,16,130,21,+6,12,5,1,0,1,1,12,177,21,0,7,142,5,0,3,194,5,2,4,3,1,159,0,+2,1,4,4,255,5,192,5,154,5,0,9,182,13,10,12,21,21,16,6,1,0,1,1,+12,16,178,21,0,12,141,5,2,4,1,1,193,5,2,4,3,1,159,0,2,1,4,4,+255,5,192,5,152,5,1,4,6,183,13,8,16,16,9,1,1,0,1,6,14,181,21,1,+6,4,139,5,3,1,0,1,4,192,5,3,4,4,3,1,157,0,3,1,3,4,4,255,+5,192,5,146,5,1,1,3,130,5,4,4,5,12,13,12,130,13,0,12,133,13,1,12,+12,130,13,3,12,13,13,12,131,13,0,12,130,13,3,12,13,13,12,139,13,0,12,130,+13,3,12,13,13,12,130,13,0,6,131,1,1,5,12,183,21,1,9,4,138,5,0,3,+131,1,191,5,130,4,1,3,1,157,0,1,1,3,130,4,255,5,189,5,1,4,5,1,+5,4,138,5,4,4,4,5,5,3,132,1,5,3,4,9,13,12,12,130,13,174,12,8,+13,12,12,1,1,0,1,1,12,185,21,0,13,139,5,132,1,0,3,175,5,0,4,142,+5,130,4,1,3,1,155,0,1,1,3,130,4,222,5,0,4,176,5,0,4,171,5,2,+4,5,9,141,4,1,5,3,136,1,178,12,3,13,13,12,12,132,1,0,12,188,21,0,+7,130,4,0,5,132,4,1,5,3,133,1,146,4,0,5,132,4,0,5,168,4,2,3,+1,1,153,0,2,1,3,3,134,4,0,5,179,4,0,5,190,4,0,5,140,4,0,5,+168,4,3,5,4,4,5,136,4,2,6,12,21,140,4,0,3,138,1,1,12,13,174,12,+3,13,13,12,6,132,1,0,12,190,21,0,12,137,4,134,1,1,3,5,193,4,2,3,+1,1,151,0,2,1,1,3,255,4,192,4,3,6,13,16,13,139,4,140,1,1,12,13,+172,12,9,13,13,12,6,1,1,0,0,1,6,193,21,0,6,135,4,1,1,0,134,1,+194,4,3,3,3,1,1,149,0,2,1,1,3,255,4,191,4,1,5,9,131,13,137,4,+0,3,141,1,1,12,13,168,12,130,13,1,12,12,133,1,1,6,13,194,21,0,9,134,+4,0,3,137,1,194,4,3,3,3,1,1,147,0,3,1,1,3,3,255,4,190,4,2,+6,12,16,131,13,136,4,139,1,5,0,0,1,1,12,13,165,12,130,13,2,12,12,5,+131,1,3,0,1,5,12,196,21,0,13,134,4,130,1,2,0,3,12,132,1,0,3,194,+4,3,3,3,1,1,144,0,1,1,1,130,3,255,4,189,4,3,5,9,13,16,132,13,+134,4,2,3,1,0,136,1,6,0,1,1,5,12,16,13,162,12,130,13,2,12,12,5,+136,1,0,12,199,21,0,6,132,4,0,3,130,1,8,5,21,13,1,0,5,1,0,1,+194,4,131,3,130,1,139,0,130,1,131,3,255,4,173,4,134,3,132,2,5,1,1,3,+9,13,16,134,13,133,4,2,2,1,0,132,1,1,0,0,130,1,2,12,12,16,130,21,+159,12,130,13,2,12,12,6,130,1,1,0,0,130,1,3,0,1,1,12,201,21,1,12,+3,131,4,13,1,0,1,6,21,21,14,1,0,12,16,1,0,3,195,4,131,3,132,1,+131,0,132,1,131,3,255,4,149,4,134,3,132,2,154,1,2,6,12,16,136,13,132,4,+134,1,5,0,1,1,3,12,14,131,21,2,16,21,16,156,12,130,13,2,12,12,5,130,+1,1,0,0,130,1,4,0,0,1,5,12,203,21,8,16,5,3,4,4,2,0,1,12,+130,21,7,16,1,0,12,21,12,1,1,196,4,133,3,136,1,132,3,255,4,148,4,0,+3,165,1,2,9,13,16,138,13,3,4,3,4,4,132,1,5,0,0,1,1,12,13,131,+21,1,16,16,130,21,0,16,152,12,1,13,13,130,12,0,5,130,1,0,0,132,1,5,+0,0,1,1,12,13,130,21,0,16,202,21,8,9,3,4,3,1,1,12,21,16,130,21,+8,5,0,12,21,21,12,1,1,4,134,3,0,4,139,3,130,4,3,3,3,4,4,131,+3,1,4,4,130,3,130,4,7,3,3,4,3,3,4,3,4,140,3,0,4,153,3,130,+4,5,3,4,3,4,4,3,131,4,1,3,4,131,3,1,4,4,138,3,8,4,3,4,+3,4,3,3,4,4,130,3,3,4,4,3,4,138,3,5,4,4,3,4,3,4,130,3,+0,4,132,3,2,4,3,4,130,3,0,4,131,3,0,4,132,3,5,4,3,3,4,3,+4,135,3,1,4,3,130,4,11,3,4,3,4,4,3,4,3,3,4,3,4,133,3,0,+4,135,3,3,4,3,3,4,130,3,3,4,3,4,4,164,1,3,5,12,13,16,140,13,+11,4,3,3,1,0,1,1,0,0,1,5,12,130,21,1,16,16,134,21,0,16,149,12,+4,13,13,12,12,6,131,1,0,0,133,1,4,0,0,1,3,12,130,21,0,16,203,21,+21,16,21,13,4,4,1,1,12,21,16,21,21,16,21,6,1,13,21,16,21,6,1,255,+3,232,3,1,4,3,161,1,3,4,6,12,12,144,13,9,4,3,1,0,1,0,1,1,+6,13,130,21,1,16,16,136,21,0,16,145,12,130,13,4,12,6,3,1,1,130,0,134,+1,4,0,0,1,5,12,130,21,1,16,16,205,21,7,16,21,6,2,1,12,21,16,130,+21,3,16,21,12,1,130,21,4,16,21,5,1,4,255,3,228,3,1,4,3,156,1,7,+3,5,6,9,9,12,13,21,147,13,10,3,1,0,0,1,1,12,12,21,21,16,140,21,+0,16,146,12,0,5,130,1,130,0,134,1,8,0,0,1,1,12,12,16,21,16,211,21,+4,12,5,14,21,16,131,21,3,16,21,12,1,132,21,3,16,1,2,4,255,3,226,3,+1,4,3,148,1,2,3,5,9,132,12,130,13,1,16,16,151,13,6,1,0,1,5,12,+12,13,130,16,141,21,0,16,142,12,3,13,12,1,1,130,0,136,1,8,0,0,1,5,+12,12,13,12,14,213,21,3,16,16,21,16,132,21,3,16,21,12,6,131,21,2,16,21,+13,255,3,228,3,143,1,1,5,6,130,12,166,13,7,1,6,12,13,12,12,14,21,130,+16,3,21,21,16,21,133,16,0,21,130,16,141,12,4,13,6,1,0,0,136,1,6,0,+0,1,1,6,12,13,131,12,130,16,0,21,134,16,3,21,16,16,21,130,16,3,21,16,+21,21,131,16,3,21,16,16,21,140,16,6,21,16,16,21,21,16,21,130,16,2,21,16,+21,137,16,2,21,16,21,141,16,0,21,130,16,3,21,14,16,21,132,16,6,21,21,12,+12,21,16,21,130,16,1,21,12,255,3,225,3,0,2,137,1,0,3,131,12,4,13,16,+21,16,16,168,13,1,12,13,130,12,1,14,21,145,16,140,12,3,13,6,1,0,136,1,+6,0,0,1,1,12,12,13,132,12,1,13,21,213,16,2,21,16,12,144,16,1,21,12,+255,3,223,3,138,1,3,12,13,16,16,175,13,131,12,0,13,147,16,140,12,2,5,1,+0,134,1,130,0,3,1,5,12,13,135,12,217,16,1,12,12,144,16,2,21,6,2,255,+3,219,3,0,2,137,1,0,6,180,13,130,12,1,13,21,138,16,0,21,135,16,139,12,+5,5,0,0,1,1,0,130,1,6,0,0,1,1,12,12,13,137,12,133,16,0,21,156,+16,3,21,16,16,21,131,16,130,21,131,16,0,21,148,16,3,21,16,16,21,139,16,3,+21,14,12,12,132,16,0,21,137,16,3,21,13,3,2,255,3,217,3,137,1,2,9,13,+16,180,13,130,12,14,16,21,16,16,21,16,16,21,16,21,16,21,16,16,21,130,16,3,+21,21,16,16,138,12,2,4,0,0,133,1,2,0,1,4,141,12,0,13,130,16,130,21,+1,16,21,131,16,4,21,21,16,16,21,132,16,130,21,3,16,16,21,16,131,21,4,16,+16,21,21,16,132,21,18,16,16,21,21,16,21,16,21,16,21,16,21,16,16,21,21,16,+21,21,132,16,1,21,16,130,21,7,16,16,21,16,16,21,21,16,130,21,130,16,1,21,+21,130,16,2,12,12,13,130,16,1,21,16,130,21,130,16,1,21,21,130,16,2,21,9,+2,255,3,215,3,0,2,133,1,3,0,1,1,12,184,13,1,12,12,150,16,137,12,3,+1,0,0,1,133,0,2,1,12,13,141,12,1,14,21,217,16,130,12,0,13,143,16,18,+13,4,2,3,2,3,3,2,3,3,2,3,3,2,2,3,2,3,3,132,2,130,3,1,+2,2,130,3,2,2,3,2,130,3,14,2,3,2,3,3,2,3,2,3,2,2,3,2,+3,3,130,2,130,3,3,2,3,2,3,130,2,130,3,130,2,1,3,3,130,2,0,3,+131,2,0,3,132,2,6,3,3,2,2,3,3,2,130,3,6,2,2,3,3,2,3,3,+130,2,20,3,2,2,3,2,3,3,2,2,3,2,3,3,2,2,3,2,2,3,2,3,+130,2,1,3,2,132,3,1,2,2,132,3,8,2,2,3,3,2,3,2,3,3,132,2,+131,3,131,2,130,3,2,2,2,3,131,2,130,3,3,2,3,3,2,131,3,130,2,11,+3,2,3,2,3,3,2,2,3,3,2,2,131,3,8,2,2,3,2,3,3,2,3,2,+135,1,3,5,12,13,16,184,13,0,12,150,16,137,12,0,1,136,0,0,5,144,12,220,+16,130,12,0,14,142,16,4,21,9,2,2,3,133,2,1,3,3,154,2,0,3,132,2,+8,3,2,2,3,2,2,3,2,3,144,2,0,3,147,2,0,3,131,2,3,3,2,2,+3,130,2,130,3,2,2,2,3,133,2,0,3,154,2,0,3,138,2,3,3,2,2,3,+130,2,6,3,3,2,2,3,2,3,136,2,0,3,135,2,3,3,2,2,3,132,2,0,+3,140,2,130,3,0,2,131,1,4,0,1,1,6,12,188,13,149,16,0,13,137,12,0,+1,135,0,0,1,145,12,0,13,220,16,131,12,0,14,143,16,0,5,255,2,202,2,1,+3,2,130,3,1,2,2,134,1,3,4,12,13,16,189,13,148,16,138,12,0,1,135,0,+0,1,146,12,0,14,220,16,0,13,131,12,142,16,1,21,12,255,2,197,2,0,3,132,+2,134,1,5,0,0,1,1,6,12,193,13,146,16,0,13,138,12,0,1,134,0,1,1,+6,147,12,220,16,1,21,16,132,12,142,16,1,21,6,255,2,195,2,139,1,4,0,1,+1,5,12,196,13,145,16,139,12,0,1,134,0,0,1,148,12,0,13,221,16,0,21,133,+12,141,16,2,21,12,3,255,2,188,2,135,1,0,0,133,1,6,0,1,1,3,12,12,+16,197,13,143,16,0,14,139,12,0,1,133,0,1,1,6,149,12,223,16,0,13,133,12,+141,16,1,21,7,255,2,183,2,148,1,1,6,12,201,13,142,16,0,13,139,12,0,1,+133,0,0,1,151,12,224,16,133,12,0,13,141,16,1,13,4,255,2,181,2,1,1,0,+145,1,2,12,16,16,202,13,141,16,140,12,0,1,132,0,1,1,5,151,12,0,13,224,+16,134,12,0,14,140,16,1,21,9,255,2,180,2,149,1,2,12,12,16,201,13,139,16,+0,14,140,12,0,1,132,0,0,1,153,12,0,14,224,16,0,14,134,12,0,14,141,16,+0,5,255,2,178,2,137,1,0,0,138,1,5,0,0,1,6,12,16,199,13,138,16,140,+12,0,6,133,0,0,5,154,12,226,16,135,12,0,14,139,16,1,21,12,255,2,176,2,+153,1,4,0,0,1,5,12,198,13,136,16,0,14,140,12,0,6,132,0,0,1,155,12,+0,14,226,16,0,13,135,12,0,14,139,16,1,21,6,255,2,174,2,139,1,133,13,135,+12,6,9,9,6,5,5,6,12,197,13,135,16,141,12,0,5,132,0,0,1,156,12,228,+16,136,12,140,16,1,13,3,255,2,172,2,1,1,0,136,1,1,0,1,144,13,1,16,+16,199,13,133,16,0,14,141,12,0,5,131,0,1,1,6,157,12,228,16,137,12,139,16,+1,21,7,255,2,171,2,1,1,0,130,1,2,0,1,0,131,1,1,0,3,141,13,1,+12,13,131,12,198,13,132,16,0,13,141,12,0,3,131,0,0,1,158,12,0,14,228,16,+0,14,137,12,139,16,1,14,4,255,2,169,2,9,1,0,1,1,0,0,1,9,1,0,+130,1,1,0,6,218,13,130,16,0,14,142,12,0,1,130,0,1,1,6,159,12,230,16,+137,12,0,13,138,16,1,21,9,255,2,168,2,15,1,0,1,1,0,1,5,12,13,12,+1,0,0,1,0,12,218,13,2,16,16,14,142,12,0,1,130,0,0,1,161,12,230,16,+0,14,137,12,0,14,139,16,0,5,255,2,165,2,19,1,1,0,1,1,0,1,12,14,+13,12,13,13,6,1,0,1,12,14,12,216,13,0,16,143,12,0,1,130,0,0,5,161,+12,0,14,231,16,138,12,0,14,137,16,1,21,12,255,2,164,2,9,1,1,0,1,0,+0,1,12,13,12,132,13,3,12,1,1,12,218,13,143,12,3,1,0,0,1,163,12,232,+16,139,12,0,14,137,16,1,21,6,255,2,162,2,9,1,0,1,1,0,1,6,13,13,+12,132,13,4,12,13,12,5,12,218,13,142,12,3,1,0,0,4,164,12,232,16,0,14,+139,12,138,16,1,13,3,255,2,145,2,1,14,22,140,2,0,1,131,0,4,1,12,13,+13,12,134,13,0,12,130,13,3,22,24,13,14,214,13,141,12,2,1,0,1,165,12,0,+14,233,16,140,12,138,16,0,7,255,2,145,2,1,24,24,139,2,0,1,131,0,3,5,+12,13,12,137,13,130,14,3,25,24,13,14,147,13,1,23,16,170,13,0,14,147,13,0,+14,140,12,2,1,0,1,166,12,234,16,0,14,140,12,137,16,1,14,3,255,2,143,2,+3,9,25,25,3,137,2,0,1,130,0,2,1,12,14,140,13,7,14,13,22,25,25,16,+13,14,144,13,5,14,16,25,23,13,14,189,13,0,14,139,12,1,0,1,168,12,234,16,+0,14,140,12,0,14,136,16,1,21,12,189,2,1,3,22,207,2,3,24,25,25,12,135,+2,1,1,1,130,0,2,1,12,16,140,13,2,14,13,14,130,25,2,23,14,14,143,13,+6,14,13,24,25,22,13,14,166,13,5,14,13,16,23,14,14,144,13,0,14,136,12,3,+14,12,0,1,168,12,0,14,235,16,141,12,138,16,0,5,188,2,2,12,26,4,205,2,+0,9,130,25,0,24,134,2,0,1,130,0,1,1,12,143,13,8,14,13,22,25,26,25,+24,13,14,142,13,6,14,13,23,25,25,24,14,167,13,3,14,13,22,25,146,13,0,14,+135,12,3,14,6,1,6,169,12,236,16,0,14,140,12,0,14,136,16,1,21,12,188,2,+2,24,25,9,204,2,6,3,24,25,26,26,25,6,132,2,8,1,0,1,4,9,13,14,+13,12,134,13,14,14,13,14,13,14,13,14,14,16,25,26,26,27,25,23,130,13,2,14,+13,14,136,13,130,14,8,24,25,27,25,23,14,14,13,14,139,13,2,14,13,14,130,13,+1,14,14,133,13,16,14,14,13,14,13,14,14,13,14,13,14,13,24,25,23,14,14,134,+12,1,13,13,134,14,0,16,135,12,3,6,1,12,14,169,12,237,16,141,12,0,14,136,+16,1,21,6,137,2,1,5,6,174,2,3,12,25,25,22,204,2,6,22,25,27,28,27,+25,24,131,2,7,1,1,6,12,14,16,14,12,130,14,3,13,14,14,13,137,14,6,24,+25,27,28,31,25,24,144,14,6,22,25,27,26,25,25,16,168,14,2,25,25,24,131,14,+131,16,1,14,14,136,12,135,12,0,5,171,12,0,14,177,16,0,24,186,16,141,12,0,+14,137,16,0,14,137,2,1,24,15,173,2,5,3,25,26,26,25,3,202,2,12,9,26,+26,27,28,28,27,25,22,2,2,3,12,130,14,1,12,12,145,14,2,22,25,27,130,28,+2,27,25,22,142,14,7,23,25,26,27,28,27,25,24,167,14,4,23,26,27,26,23,130,+12,3,6,6,5,5,134,1,131,0,180,12,177,16,2,22,25,23,185,16,0,14,141,12,+0,14,136,16,1,21,9,135,2,2,4,26,24,173,2,5,22,25,27,27,25,22,201,2,+3,4,25,26,27,130,28,4,27,26,25,12,12,130,14,0,12,147,14,3,16,25,26,27,+130,28,3,27,26,25,23,140,14,3,23,25,26,31,130,28,2,27,25,24,162,14,0,12,+130,14,0,24,130,25,1,24,1,142,0,1,1,5,142,12,0,16,163,12,0,14,177,16,+2,24,25,22,186,16,142,12,138,16,0,3,134,2,3,22,25,25,5,171,2,7,6,25,+26,27,27,26,25,5,199,2,2,3,24,25,133,28,3,31,26,25,23,150,14,3,16,25,+25,31,132,28,3,31,26,25,23,136,14,5,12,12,23,25,26,27,132,28,3,27,25,24,+16,158,14,0,12,130,14,2,12,12,25,130,26,1,25,12,139,0,4,1,1,12,12,16,+141,12,1,22,24,163,12,177,16,3,22,25,25,24,177,16,1,22,22,134,16,0,14,141,+12,0,14,137,16,0,12,133,2,4,6,26,27,25,22,170,2,2,4,24,25,131,28,1,+25,24,198,2,3,3,24,25,27,134,28,3,31,26,25,23,148,14,3,16,24,25,27,134,+28,3,31,25,25,23,132,14,131,12,1,22,25,130,26,133,28,130,25,0,22,159,14,10,+12,1,0,24,25,28,28,26,26,25,1,136,0,3,1,6,12,16,130,14,141,12,1,25,+25,163,12,177,16,4,25,25,30,25,23,176,16,1,25,24,135,16,142,12,138,16,0,5,+132,2,5,24,25,27,26,25,4,169,2,2,24,25,27,131,28,2,27,25,15,196,2,4,+6,24,25,27,27,134,28,4,27,26,26,25,24,146,14,4,23,25,25,27,27,134,28,4,+27,26,26,25,22,133,12,11,14,24,25,25,26,25,25,26,31,28,27,25,132,24,0,16,+154,14,8,16,12,6,1,0,0,22,25,26,131,28,1,25,24,133,0,4,1,3,12,14,+16,132,14,140,12,3,22,25,27,23,161,12,0,14,132,16,1,22,23,169,16,5,24,25,+28,27,25,24,175,16,2,22,25,25,135,16,142,12,0,14,136,16,1,21,12,131,2,6,+22,25,27,28,27,25,15,168,2,2,22,25,27,133,28,2,27,25,22,194,2,5,12,25,+25,26,27,25,134,28,6,26,25,26,25,25,24,23,143,14,5,22,25,26,27,31,25,134,+28,8,26,25,26,25,25,24,16,12,12,130,14,12,23,23,22,23,22,25,26,27,28,28,+27,25,24,156,14,3,16,12,5,1,130,0,2,12,25,25,132,28,9,26,25,22,0,0,+1,1,6,12,16,135,14,139,12,4,14,25,26,25,24,161,12,133,16,1,26,24,168,16,+7,23,25,27,28,28,26,25,22,174,16,3,24,25,26,23,134,16,0,14,142,12,138,16,+11,6,2,2,9,25,26,27,28,28,27,25,22,165,2,4,3,15,25,27,31,133,28,4,+27,25,25,15,3,190,2,1,9,24,132,25,9,24,25,26,27,28,28,27,26,25,24,132,+25,0,16,140,14,0,22,135,25,7,26,27,28,28,27,26,25,24,132,25,0,16,133,14,+4,23,24,26,26,27,132,28,3,25,25,22,16,150,14,4,16,14,12,1,1,131,0,3,+6,25,26,26,133,28,6,26,25,22,6,12,14,16,137,14,139,12,5,22,25,27,26,25,+14,160,12,132,16,2,22,25,24,149,16,0,22,145,16,8,25,25,31,28,28,31,26,25,+23,172,16,4,22,25,26,25,24,135,16,143,12,137,16,4,14,2,5,25,26,131,28,3,+27,26,26,9,163,2,5,5,24,25,25,28,25,133,28,5,26,25,28,25,25,12,189,2,+9,9,15,15,24,24,22,9,22,25,27,130,28,6,27,27,25,22,14,14,16,143,14,9,+22,24,24,25,24,24,23,24,25,27,130,28,6,27,27,25,22,12,12,16,133,14,1,22,+24,130,25,0,26,133,28,0,26,131,25,0,24,147,14,3,16,12,6,1,133,0,3,12,+25,26,27,135,28,2,26,25,24,140,14,138,12,1,16,25,130,27,1,25,24,159,12,0,+14,131,16,0,23,130,25,0,23,147,16,1,22,25,144,16,1,24,25,132,28,3,31,25,+25,21,170,16,6,23,25,26,31,28,26,23,134,16,0,14,142,12,0,14,136,16,3,21,+12,24,25,133,28,3,31,26,25,12,160,2,1,5,15,131,25,2,26,24,27,130,28,3,+27,26,24,24,131,25,0,22,193,2,4,4,22,26,26,27,132,28,3,26,25,24,23,146,+14,131,12,2,22,26,27,133,28,3,26,25,24,16,134,14,6,22,25,28,31,25,25,26,+130,28,2,31,26,25,131,24,0,22,146,14,2,12,1,1,134,0,1,22,25,130,26,135,+28,4,27,27,25,24,16,138,14,138,12,7,25,25,31,28,27,26,25,22,158,12,132,16,+4,24,25,26,25,22,147,16,2,24,26,23,142,16,1,24,25,134,28,3,31,25,25,23,+169,16,6,24,25,28,28,31,25,25,135,16,143,12,136,16,3,23,25,25,27,134,28,3,+27,26,25,22,159,2,0,6,131,24,15,22,12,24,25,26,28,28,27,27,25,22,3,3,+4,4,3,191,2,3,4,22,25,25,135,28,5,27,27,25,25,24,16,143,14,5,12,12,+14,22,25,25,135,28,5,31,27,25,25,24,16,134,14,11,23,16,23,24,26,27,28,28,+27,26,25,22,145,14,4,16,14,12,5,1,135,0,0,22,133,25,133,28,7,27,26,25,+28,26,25,25,22,137,14,137,12,2,24,25,27,130,28,3,27,26,25,23,157,12,131,16,+5,23,25,27,28,25,25,146,16,3,22,26,25,22,141,16,3,24,25,27,31,134,28,3,+26,25,25,23,167,16,2,22,25,27,131,28,1,25,24,134,16,143,12,0,14,134,16,5,+24,25,26,27,25,26,133,28,131,25,1,24,9,162,2,2,4,15,25,133,28,3,26,25,+15,3,140,2,1,6,22,175,2,7,4,9,22,24,25,25,26,26,135,28,8,26,28,26,+27,25,25,24,22,16,138,14,7,16,22,24,24,25,25,26,26,135,28,8,26,28,26,28,+25,25,24,22,16,132,14,3,22,25,25,27,131,28,4,31,28,25,24,16,140,14,4,16,+16,12,5,1,138,0,132,22,3,14,24,25,27,130,28,4,27,25,24,24,26,131,25,0,+24,136,14,136,12,2,24,25,27,132,28,3,31,25,25,16,155,12,0,14,131,16,1,24,+25,130,28,1,25,24,145,16,3,25,26,25,24,139,16,5,23,24,25,27,28,25,134,28,+5,25,26,25,26,24,23,164,16,2,22,25,26,132,28,2,26,25,22,133,16,0,14,143,+12,132,16,0,23,132,25,9,24,24,26,27,28,28,27,25,24,22,130,24,0,22,159,2,+4,3,9,15,25,25,134,28,0,27,130,25,1,22,5,138,2,1,22,25,175,2,0,22,+130,25,4,26,28,25,25,31,133,28,2,26,25,27,133,25,0,24,137,14,1,12,24,130,+25,4,26,28,25,25,31,134,28,1,25,27,133,25,8,22,14,23,22,24,25,25,26,31,+132,28,5,26,25,28,25,25,22,135,14,5,16,16,14,12,6,1,144,0,3,1,12,24,+26,132,28,9,27,26,25,23,23,22,24,22,23,23,136,14,135,12,3,24,25,26,27,133,+28,3,27,25,25,23,154,12,131,16,1,24,25,131,28,2,26,25,22,143,16,5,24,25,+28,31,25,22,136,16,1,21,24,131,25,2,26,25,27,131,28,2,26,25,24,131,25,0,+24,163,16,3,22,25,26,31,134,28,1,26,22,133,16,143,12,0,14,131,16,1,23,22,+130,24,10,23,22,25,26,27,28,28,27,26,25,12,131,2,139,1,144,2,6,3,22,24,+25,26,25,27,135,28,7,26,25,28,26,25,27,24,14,136,2,2,25,25,9,156,2,1,+6,4,143,2,2,6,22,24,130,25,4,24,24,25,26,27,130,28,9,27,26,25,22,22,+24,24,22,23,16,137,14,130,12,1,22,24,130,25,4,24,24,25,26,27,130,28,12,27,+26,25,22,22,24,24,22,23,16,14,14,24,131,25,1,28,31,130,28,4,27,26,25,24,+26,131,25,0,23,130,14,5,16,16,14,12,5,1,144,0,5,1,6,14,22,25,25,134,+28,3,31,25,25,22,141,14,133,12,4,14,24,25,26,27,134,28,4,26,27,26,25,22,+152,12,0,14,130,16,2,22,26,26,132,28,2,26,25,23,141,16,6,23,25,27,28,28,+25,25,137,16,132,24,3,22,24,25,31,130,28,3,27,25,24,23,130,16,0,21,162,16,+2,22,25,26,136,28,2,26,26,24,132,16,144,12,135,16,4,23,24,26,26,27,131,28,+5,27,25,25,15,4,1,141,0,1,1,1,141,2,1,3,24,134,25,131,28,3,27,26,+25,24,131,25,1,24,22,135,2,3,14,25,25,24,156,2,1,24,22,141,2,4,3,12,+16,14,14,131,16,2,24,25,31,132,28,3,31,25,25,16,141,14,133,12,6,14,14,12,+12,24,25,31,132,28,3,31,25,24,16,135,14,0,23,130,22,2,24,25,27,130,28,3,+27,25,24,23,131,22,6,23,16,14,14,12,3,1,144,0,9,1,5,12,16,22,25,25,+26,26,31,134,28,6,31,26,25,25,24,23,16,137,14,131,12,7,14,23,24,25,27,26,+25,27,133,28,1,25,26,130,25,1,24,23,150,12,6,14,16,16,22,26,26,31,132,28,+3,31,25,25,23,140,16,1,25,25,130,28,2,31,25,24,140,16,3,23,24,25,27,133,+28,2,25,25,23,164,16,1,24,25,131,26,133,28,132,25,0,22,130,16,144,12,0,14,+131,16,6,23,22,24,25,25,28,27,134,28,130,25,0,22,144,0,1,1,1,140,2,7,+9,22,24,22,12,15,25,26,131,28,6,26,25,22,3,4,4,3,137,2,4,25,26,27,+25,22,154,2,2,12,25,15,140,2,4,6,14,16,14,16,130,14,3,23,25,25,31,134,+28,3,31,25,25,22,139,14,3,12,12,22,22,132,12,3,23,25,25,31,134,28,3,31,+25,25,22,136,14,4,16,24,25,26,27,132,28,8,25,24,22,22,16,14,12,6,1,146,+0,4,1,12,14,23,24,130,25,3,27,26,25,25,134,28,131,26,4,25,28,25,24,24,+135,14,131,12,16,22,25,25,26,25,25,24,25,26,31,28,28,27,26,24,22,22,130,24,+0,22,150,12,4,16,16,22,25,26,135,28,3,27,26,25,22,138,16,1,24,25,132,28,+2,26,25,22,136,16,5,23,22,24,26,25,31,134,28,4,26,25,26,24,22,160,16,0,+22,134,25,0,26,131,28,2,26,24,24,131,25,2,23,16,14,145,12,6,16,16,22,25,+28,25,25,130,26,133,28,1,26,26,132,25,2,24,0,0,131,1,138,0,1,1,1,142,+2,3,22,25,28,27,133,28,1,25,22,139,2,6,22,25,27,28,27,25,14,153,2,130,+25,0,4,137,2,2,4,12,16,132,14,4,23,24,26,25,27,134,28,6,27,31,27,26,+25,24,23,136,14,130,12,1,17,15,130,12,4,23,24,25,25,27,134,28,6,27,31,27,+26,26,24,16,132,14,4,23,24,25,25,26,134,28,5,27,25,20,19,22,1,146,0,16,+1,6,12,16,16,14,23,24,25,25,27,26,25,24,24,26,27,132,28,0,26,134,25,0,+24,135,14,131,12,8,14,23,22,22,23,14,22,25,27,131,28,3,27,26,24,16,153,12,+6,14,23,24,26,26,27,26,134,28,5,25,26,26,25,24,23,135,16,1,24,25,133,28,+3,31,25,25,22,132,16,2,23,24,24,130,25,137,28,2,25,26,26,130,25,1,24,23,+157,16,0,22,131,24,3,22,22,25,26,131,28,2,26,25,22,133,16,0,14,145,12,6,+14,16,16,22,25,25,31,130,25,132,28,3,27,25,24,22,130,24,7,22,23,14,14,16,+16,23,12,130,0,2,12,16,14,134,0,0,1,139,2,3,9,24,25,27,134,28,4,26,+26,25,24,5,136,2,8,6,25,26,27,28,27,25,26,22,151,2,0,15,130,25,0,22,+136,2,12,9,14,16,14,14,23,23,24,24,27,25,31,27,136,28,7,25,28,26,26,25,+25,24,16,133,14,130,12,9,22,17,15,22,24,24,26,25,27,27,135,28,16,26,25,28,+26,27,25,25,22,16,14,22,24,28,25,26,27,27,135,28,4,25,17,20,25,25,136,15,+130,22,8,14,12,0,0,1,5,12,14,16,130,14,11,22,15,14,14,16,23,23,16,23,+25,26,27,131,28,3,27,25,24,22,131,24,0,16,136,14,135,12,2,22,24,25,134,28,+4,31,25,26,24,16,151,12,0,24,134,25,0,26,131,28,1,26,24,130,25,2,26,25,+23,133,16,3,24,25,27,31,133,28,3,31,26,25,24,131,16,1,23,24,134,25,132,28,+2,26,25,24,131,25,2,24,24,23,162,16,2,22,25,26,133,28,2,25,26,24,132,16,+0,14,146,12,0,14,130,16,5,23,23,21,22,25,27,133,28,1,25,22,134,21,11,16,+16,21,6,0,0,5,21,22,27,16,1,133,0,0,1,135,2,5,5,22,24,26,25,27,+134,28,2,26,26,27,130,25,0,22,134,2,3,5,25,25,27,130,28,4,27,26,25,24,+9,148,2,6,14,25,26,27,25,25,9,133,2,2,5,12,16,130,14,0,16,131,25,3,+26,27,25,25,133,28,4,27,26,25,24,27,133,25,1,22,16,130,14,131,12,2,17,17,+19,130,25,3,26,28,25,25,133,28,16,27,26,25,24,26,25,25,28,26,25,24,22,23,+24,25,27,27,137,28,4,20,17,17,25,26,141,25,12,26,25,25,24,24,22,23,16,14,+14,15,17,23,131,14,3,22,25,25,31,133,28,2,26,25,22,141,14,130,12,3,14,16,+22,24,130,25,0,27,134,28,7,26,27,26,25,25,24,22,14,146,12,2,14,12,22,131,+24,3,22,24,25,27,130,28,2,30,26,24,132,23,132,16,5,23,24,25,26,28,26,133,+28,5,26,28,28,25,24,23,131,16,0,23,130,24,3,22,24,25,27,131,28,2,31,26,+24,131,23,162,16,5,23,24,25,25,26,31,134,28,6,27,25,25,24,23,16,16,147,12,+0,14,132,16,3,24,25,26,31,132,28,4,31,26,25,24,23,134,16,11,23,6,0,0,+16,21,25,25,24,21,12,1,133,0,0,1,131,2,0,14,131,25,2,27,26,25,133,28,+0,26,130,25,0,20,131,25,0,14,131,2,3,6,25,25,26,132,28,131,25,0,12,146,+2,8,12,25,25,27,28,26,25,25,4,130,2,2,3,12,16,133,14,9,23,22,24,25,+25,26,25,24,25,27,132,28,4,27,25,24,23,22,133,24,2,23,14,14,131,12,0,22,+130,17,8,15,24,24,25,26,25,24,25,27,132,28,13,27,25,24,23,22,24,25,25,27,+25,26,25,25,27,138,28,4,25,17,20,17,20,140,26,3,27,27,28,26,131,25,13,26,+25,24,15,17,17,22,14,14,16,24,25,26,31,134,28,4,27,28,25,24,23,139,14,3,+14,12,12,22,131,25,3,26,25,26,31,132,28,0,27,134,25,0,24,146,12,9,14,1,+0,12,21,16,16,24,25,26,132,28,3,31,25,25,22,134,16,3,24,25,25,28,130,25,+0,31,131,28,2,27,25,27,131,25,0,24,134,16,1,24,26,135,28,2,25,24,23,161,+16,7,22,24,25,31,25,26,28,26,134,28,9,26,25,26,25,25,27,24,22,12,14,146,+12,5,14,16,23,24,25,25,137,28,3,27,25,25,22,133,16,13,23,6,0,12,21,24,+25,26,25,23,21,21,12,1,132,0,0,1,130,2,8,3,22,24,24,25,26,25,24,25,+132,28,5,26,25,22,14,17,19,131,24,3,12,2,2,14,130,25,9,24,25,26,27,27,+26,25,14,3,3,146,2,3,14,25,25,27,131,28,6,25,24,4,2,6,14,16,138,14,+5,16,16,23,24,26,27,134,28,1,25,24,135,14,133,12,131,17,8,15,14,14,16,16,+23,24,25,27,133,28,11,26,26,24,24,25,25,27,27,31,27,26,26,137,28,7,26,26,+20,17,18,17,20,25,142,28,1,27,31,130,27,13,28,25,25,20,17,17,19,23,22,25,+25,27,31,27,135,28,6,27,27,25,26,24,22,16,136,14,131,14,0,22,131,25,3,24,+24,26,27,130,28,3,27,25,25,22,130,24,2,22,23,14,145,12,1,14,12,130,0,3,+12,24,25,25,135,28,5,27,26,25,25,22,21,130,16,0,22,132,25,10,24,24,26,28,+26,28,28,27,25,22,23,130,22,0,23,131,16,3,21,22,25,25,135,28,4,31,27,25,+25,22,160,16,0,22,132,25,2,27,25,26,132,28,0,27,133,25,3,24,22,12,14,143,+12,3,14,12,22,24,130,25,2,26,27,26,134,28,7,26,25,25,28,25,25,24,23,131,+16,15,23,5,1,21,24,26,26,31,26,25,22,16,21,23,12,1,131,0,0,1,133,2,+5,3,4,9,24,25,27,131,28,5,27,26,25,15,17,22,134,2,5,6,14,9,6,15,+25,130,28,4,27,26,25,22,5,144,2,5,4,15,25,25,26,27,131,28,4,26,25,26,+22,16,137,14,6,16,14,14,16,24,25,25,136,28,3,31,25,25,22,130,14,1,16,14,+133,12,11,15,17,18,18,19,17,22,14,16,24,25,25,137,28,130,25,0,26,131,28,1,+27,27,138,28,6,25,17,20,18,18,17,25,148,28,13,31,25,17,18,20,17,25,26,25,+27,28,28,26,27,136,28,1,26,27,130,25,2,24,24,23,132,14,0,16,0,14,131,12,+7,14,16,14,14,22,25,26,27,131,28,3,31,26,24,14,137,12,0,14,139,12,9,14,+1,12,15,24,25,25,26,28,26,134,28,2,25,26,28,130,25,3,24,23,16,16,130,23,+4,16,23,24,25,27,131,28,3,31,25,25,22,132,16,2,23,22,24,130,25,0,27,135,+28,6,25,28,27,26,25,24,23,159,16,8,23,22,24,24,22,22,25,26,31,131,28,8,+26,25,22,16,23,23,16,16,14,145,12,4,14,12,22,24,26,133,25,131,28,10,27,26,+25,24,25,25,27,26,25,25,24,130,16,17,21,12,16,24,25,27,28,28,31,25,25,23,+16,16,21,21,12,1,130,0,0,1,132,2,3,3,22,25,25,134,28,1,27,25,130,17,+136,2,2,12,24,25,133,28,131,25,0,14,142,2,9,15,25,25,24,24,25,27,28,27,+27,131,24,0,23,138,14,5,23,24,25,25,26,27,137,28,6,27,25,25,24,22,16,14,+133,12,1,22,17,131,18,6,17,17,24,25,25,26,31,137,28,1,27,27,143,28,4,26,+28,25,18,17,130,18,4,17,20,25,28,26,145,28,8,25,19,17,18,20,17,20,27,31,+130,28,3,24,24,26,27,132,28,1,27,31,132,25,4,27,24,23,14,16,130,14,0,16,+11,14,12,12,14,14,12,12,14,24,26,26,31,133,28,7,31,25,25,23,12,12,14,14,+144,12,4,14,5,0,22,26,131,25,1,27,27,133,28,130,25,0,26,130,25,1,24,23,+131,16,3,23,24,25,25,130,28,0,25,130,28,7,31,26,25,24,22,16,16,22,131,25,+2,28,26,25,133,28,3,26,26,25,26,131,25,2,26,24,23,144,16,1,24,23,142,16,+3,23,25,25,31,132,28,3,31,25,25,22,131,16,0,14,149,12,0,16,130,22,2,24,+24,20,132,28,9,27,26,24,16,23,23,22,22,23,23,132,16,9,23,24,24,25,28,28,+26,25,24,23,131,16,5,21,21,12,1,0,0,130,2,4,5,22,25,25,26,135,28,6,+26,20,17,20,17,24,12,131,2,5,5,24,26,25,25,26,132,28,5,25,24,24,15,22,+5,144,2,9,4,12,24,25,27,28,27,27,25,22,138,14,7,23,22,24,25,25,26,26,+27,138,28,130,27,130,25,1,24,22,132,12,2,17,17,19,131,18,3,17,20,26,27,157,+28,4,26,28,20,17,20,130,18,3,20,17,20,26,143,28,10,26,28,28,20,17,20,18,+18,20,17,20,131,28,1,25,26,134,28,2,25,24,22,130,24,1,22,23,134,14,0,16,+10,14,12,14,12,14,23,24,25,25,27,31,134,28,5,31,27,25,25,24,16,130,14,16,+12,12,14,14,24,14,14,12,12,14,12,14,14,12,12,14,12,131,0,6,12,22,22,12,+22,25,26,131,28,2,31,26,24,131,23,130,16,6,23,22,24,24,25,25,26,130,28,17,+25,20,25,28,26,26,28,26,25,28,25,24,23,22,24,24,25,26,130,25,132,28,3,27,+25,24,22,132,24,1,25,22,143,16,2,22,25,23,140,16,4,23,24,25,25,31,135,28,+5,26,25,24,23,16,16,130,14,0,12,139,14,0,12,133,14,9,12,14,16,22,25,20,+20,25,28,26,131,28,2,25,25,22,137,16,2,22,25,25,131,28,2,27,26,24,133,16,+10,21,21,12,1,1,22,24,25,25,28,25,136,28,23,25,17,18,18,17,20,25,25,22,+9,3,2,22,24,24,22,15,25,27,28,28,26,25,15,145,2,6,6,9,22,24,26,25,+27,131,28,4,26,25,24,22,16,134,14,0,16,131,25,3,26,26,25,25,138,28,1,25,+25,130,26,131,25,5,22,12,12,15,17,19,133,18,1,17,25,159,28,1,20,17,134,18,+3,17,25,28,26,143,28,1,20,17,133,18,5,17,25,28,26,28,26,135,28,3,26,25,+24,23,138,14,0,16,8,14,14,22,24,24,26,25,28,26,135,28,7,27,25,25,28,27,+25,25,22,132,14,2,22,25,22,135,14,2,12,14,1,135,0,2,25,26,31,132,28,3,+31,25,25,23,132,16,0,22,131,25,11,26,25,28,31,28,20,17,25,28,28,25,26,131,+25,1,26,24,130,16,5,21,23,23,24,26,31,133,28,1,25,24,149,16,3,23,25,25,+24,136,16,6,23,23,22,24,26,25,27,135,28,7,26,26,27,27,25,25,22,16,151,14,+0,22,130,25,2,17,17,25,134,28,4,25,26,24,22,21,135,16,8,22,24,25,28,31,+26,25,22,23,135,16,2,21,21,22,133,25,1,27,25,133,28,2,25,20,17,130,18,0,+17,131,25,0,22,131,2,3,12,25,26,27,131,28,2,25,24,14,143,2,0,22,130,25,+1,28,25,131,28,1,31,26,131,25,0,16,134,14,2,23,22,24,131,25,2,24,25,27,+133,28,3,31,26,25,24,131,25,130,24,4,22,22,23,15,17,135,18,2,17,19,25,157,+28,1,25,17,135,18,2,17,18,25,143,28,1,20,17,133,18,3,19,17,17,25,140,28,+3,25,25,24,23,130,14,0,16,132,14,0,16,2,14,14,24,133,25,1,26,27,131,28,+3,27,26,25,24,133,25,7,24,16,14,14,16,25,25,24,134,14,2,12,14,12,134,0,+0,22,130,26,135,28,2,25,25,24,132,16,1,23,24,130,25,10,24,24,25,25,20,17,+25,28,28,25,24,131,22,0,23,131,16,3,23,24,25,25,135,28,4,31,25,25,24,23,+146,16,4,24,25,27,25,24,134,16,0,23,131,25,3,26,28,25,26,133,28,0,26,135,+25,0,22,146,14,12,16,22,24,25,25,26,25,20,17,17,20,28,26,132,28,1,26,27,+130,25,2,24,22,23,130,16,11,23,24,24,26,26,28,28,31,25,25,24,21,136,16,2,+21,16,12,131,22,2,24,25,27,130,28,3,26,28,20,17,130,18,5,20,17,17,22,9,+3,130,2,3,6,15,25,26,133,28,131,25,0,22,142,2,0,6,130,22,6,25,27,28,+28,27,26,24,130,22,0,23,138,14,130,16,3,22,24,26,27,133,28,15,27,27,25,22,+12,14,16,23,22,22,24,24,25,25,17,17,135,18,5,20,17,18,25,28,26,151,28,2,+26,28,25,137,18,5,20,17,18,25,28,26,138,28,2,26,20,17,135,18,4,20,17,17,+25,26,139,28,4,26,25,25,24,23,134,14,0,16,131,14,7,22,22,24,24,22,25,26,+27,131,28,4,31,25,24,16,14,132,22,130,14,4,24,25,30,25,24,135,14,132,0,5,+12,15,25,25,27,27,134,28,6,26,28,27,28,25,24,22,132,16,14,23,23,16,22,25,+26,20,17,17,20,26,31,25,25,23,133,16,5,23,24,25,25,26,31,137,28,4,26,25,+25,24,23,142,16,8,23,24,25,28,28,27,25,24,23,131,16,4,23,15,23,24,24,132,+25,0,27,131,28,4,31,26,25,22,22,133,24,146,14,0,22,133,25,6,17,18,17,20,+25,28,26,131,28,134,25,7,24,23,16,16,21,24,24,25,130,28,0,26,130,24,138,16,+7,21,16,4,1,4,15,25,26,132,28,1,25,17,132,18,2,17,17,22,130,2,1,22,+24,130,25,0,30,130,28,4,27,26,24,15,15,130,24,0,4,142,2,3,1,22,25,26,+131,28,2,27,25,24,130,14,1,16,14,131,16,0,14,131,16,4,14,16,24,26,25,137,+28,5,26,26,24,24,25,26,132,25,1,17,17,137,18,6,20,17,20,25,28,26,26,150,+28,3,25,18,17,20,136,18,6,20,17,17,25,28,26,26,135,28,5,25,20,17,20,18,+17,133,18,131,17,1,20,25,139,28,11,26,28,25,27,25,24,23,16,16,14,14,16,134,+14,2,23,24,26,134,28,3,31,25,25,22,133,14,8,23,25,25,27,28,27,25,24,16,+130,14,2,12,14,5,130,0,0,24,130,25,3,26,28,25,26,133,28,9,26,25,28,25,+25,26,25,25,24,23,131,16,25,23,24,25,26,25,17,18,18,17,25,28,30,25,25,24,+21,16,23,24,25,26,25,28,27,28,26,135,28,9,26,28,26,27,26,25,25,24,24,22,+139,16,2,24,25,25,130,28,2,25,24,22,131,16,4,22,17,23,16,16,130,23,2,24,+25,26,132,28,3,31,25,25,22,131,16,149,14,1,16,22,130,24,5,19,17,18,18,17,+25,130,28,1,27,25,134,24,1,22,23,130,21,3,23,22,24,25,130,28,6,26,26,24,+22,23,21,21,136,16,4,21,22,24,25,25,131,28,4,26,28,25,17,17,133,18,11,17,+17,14,2,2,12,15,24,15,24,25,27,130,28,3,27,25,15,4,143,2,5,9,12,22,+25,25,26,132,28,4,26,26,25,25,22,137,14,6,16,22,24,25,25,28,30,138,28,4,+27,25,25,26,28,130,27,3,25,17,17,19,138,18,3,20,17,20,25,151,28,3,25,18,+17,20,138,18,3,20,17,18,25,135,28,1,26,20,132,17,0,20,132,18,0,17,133,20,+2,25,28,26,136,28,131,25,2,27,25,23,131,14,0,16,132,14,4,23,24,26,25,27,+135,28,16,27,25,26,24,23,14,16,14,14,22,24,25,27,31,27,25,24,130,14,2,12,+14,12,131,0,0,14,130,24,4,26,25,24,25,26,131,28,5,26,26,24,22,24,24,131,+25,23,24,16,23,22,24,25,25,31,26,20,17,20,18,17,20,26,28,26,26,25,24,22,+23,24,132,25,1,26,25,135,28,1,26,28,133,25,2,26,24,23,137,16,3,23,22,24,+25,130,28,2,25,24,23,131,16,2,17,17,22,130,16,3,22,25,25,26,134,28,6,31,+26,25,24,23,21,16,138,14,1,23,22,140,14,1,15,17,130,18,2,17,18,25,130,28,+2,26,25,22,137,16,3,22,25,25,26,130,28,0,27,130,25,0,24,136,16,6,23,24,+24,27,25,28,27,130,28,5,26,28,25,20,17,19,134,18,2,17,17,12,131,2,3,5,+24,25,27,132,28,4,25,25,15,12,3,138,2,2,1,2,22,130,25,1,28,26,131,28,+8,26,25,25,26,25,25,24,16,14,130,16,8,23,23,22,24,25,26,25,26,27,141,28,+12,27,30,27,27,28,26,20,17,18,19,18,20,17,134,18,7,17,18,18,20,18,17,20,+25,148,28,6,20,17,17,20,18,20,17,135,18,6,17,18,20,18,17,20,25,134,28,0,+25,130,20,3,25,25,20,17,133,18,133,25,136,28,1,26,25,130,24,1,22,23,133,14,+0,16,8,14,14,23,22,24,27,25,31,27,136,28,130,27,8,25,28,24,19,23,14,24,+25,25,130,28,7,27,25,24,14,14,12,14,1,130,0,3,1,21,23,12,130,0,1,22,+25,133,28,5,27,25,25,23,16,16,130,21,24,24,25,25,26,25,28,26,26,25,17,20,+18,18,19,17,25,26,25,26,28,25,25,24,23,23,132,24,0,25,135,28,0,25,132,24,+2,22,23,23,139,16,3,23,25,25,27,130,28,11,25,25,24,21,16,16,22,17,17,15,+23,24,130,25,137,28,5,31,31,25,26,24,22,138,14,1,24,25,138,14,3,22,24,17,+20,131,18,8,17,20,26,26,28,31,26,25,24,133,23,0,22,132,24,0,26,130,28,1,+26,25,131,24,0,22,132,23,0,24,131,25,135,28,3,25,20,17,20,137,18,6,17,22,+2,5,15,25,25,134,28,1,27,28,130,25,1,24,6,136,2,7,1,2,5,16,22,24,+24,25,131,28,2,26,25,24,137,25,3,27,26,25,25,130,27,145,28,9,26,25,20,17,+20,18,18,17,17,20,134,18,1,20,20,131,17,2,15,18,25,145,28,9,25,20,17,18,+20,18,17,17,20,19,133,18,1,19,20,133,17,1,20,26,136,28,2,25,20,17,133,18,+3,17,17,20,25,139,28,3,27,25,24,16,130,14,1,16,16,131,14,0,16,1,14,24,+130,25,4,26,28,25,26,27,135,28,7,26,25,28,26,26,20,17,25,130,24,6,25,27,+27,26,25,22,23,130,14,0,12,130,0,1,5,23,130,16,4,0,12,24,25,26,135,28,+3,25,26,24,23,130,16,3,22,24,25,26,131,25,1,17,17,130,18,17,20,17,20,24,+24,25,25,27,27,25,25,23,16,16,23,24,25,26,134,28,3,31,25,25,23,146,16,7,+23,24,25,28,31,26,25,22,130,16,0,23,130,17,0,19,130,25,2,26,28,26,136,28,+9,26,31,27,31,25,26,25,24,22,16,133,14,3,23,25,25,16,134,14,6,23,22,24,+25,18,17,20,132,18,1,17,20,131,28,0,31,130,25,3,26,27,26,26,133,25,132,28,+0,26,132,25,130,26,4,28,27,26,25,26,136,28,3,25,20,17,20,137,18,7,20,18,+17,17,25,25,28,27,134,28,7,25,27,27,25,25,24,14,12,131,14,130,22,134,24,1,+25,26,132,28,1,26,26,131,28,0,26,131,25,4,26,28,28,27,31,145,28,4,26,28,+25,20,15,132,17,130,20,0,17,134,18,1,20,25,133,20,0,26,142,28,2,27,20,15,+132,17,3,19,20,20,17,133,18,2,17,20,25,133,20,2,25,28,31,130,28,6,26,25,+25,20,17,17,20,134,18,4,19,17,20,20,25,139,28,4,25,25,23,14,16,133,14,0,+16,5,14,16,22,24,25,26,131,25,0,27,132,28,3,27,26,25,24,130,25,12,20,17,+24,24,25,25,27,27,28,27,26,24,22,130,14,130,0,11,6,23,16,16,23,24,24,25,+25,26,25,25,135,28,4,26,25,25,24,23,130,16,0,23,130,22,3,24,19,17,20,131,+18,4,20,17,20,22,16,133,23,3,22,24,26,25,137,28,4,31,26,25,24,23,142,16,+3,23,24,25,26,131,28,130,25,6,23,16,15,17,18,18,17,131,25,1,26,25,135,28,+0,27,134,25,2,26,25,22,132,14,4,16,25,26,25,24,132,14,0,22,131,25,2,20,+17,20,134,18,3,17,25,28,26,130,28,1,26,26,131,28,0,31,130,27,1,28,31,136,+28,1,27,31,132,28,1,31,31,135,28,7,26,20,17,17,20,18,17,17,134,18,7,17,+17,18,18,17,20,25,25,135,28,6,25,26,28,27,25,25,26,142,25,0,26,134,28,0,+31,131,28,132,31,152,28,2,27,25,25,131,20,4,25,25,20,17,20,133,18,2,17,20,+25,150,28,1,25,25,131,20,130,25,0,17,134,18,2,17,18,25,138,28,6,25,20,20,+17,17,18,17,135,18,132,17,3,20,25,28,26,136,28,6,25,25,22,14,14,16,16,130,+14,0,16,131,14,130,16,3,24,25,27,27,132,28,16,27,26,25,22,16,23,15,17,17,+15,23,24,25,27,28,27,26,130,24,9,12,14,5,0,0,12,23,23,24,24,130,25,4,+26,26,25,17,25,135,28,7,27,28,26,25,27,24,24,22,130,16,3,22,20,17,20,134,+18,2,17,20,24,131,22,4,24,24,26,25,26,139,28,5,31,28,25,25,24,23,141,16,+2,23,24,25,130,28,0,26,130,24,7,23,22,17,18,18,19,17,19,131,24,1,25,26,+133,28,3,31,26,24,22,131,24,1,22,16,133,14,7,16,24,25,27,31,25,24,16,131,+14,4,22,24,25,20,17,137,18,1,17,25,167,28,10,25,25,20,17,18,18,17,17,20,+20,17,132,18,10,17,20,20,17,17,18,17,17,20,28,26,138,28,1,26,26,131,27,3,+26,26,27,27,132,28,1,31,31,177,28,2,26,20,17,135,18,8,20,17,17,20,25,28,+28,26,26,147,28,0,26,130,28,2,25,17,17,135,18,5,17,17,20,25,28,28,130,26,+130,28,2,26,25,20,130,17,3,18,20,20,17,131,18,0,17,133,20,3,25,25,28,26,+136,28,6,31,26,25,24,23,14,14,131,16,132,14,3,22,24,25,26,135,28,5,31,26,+25,22,22,17,130,18,3,22,24,25,26,130,28,20,25,24,22,16,12,0,0,12,23,16,+23,24,25,27,28,31,28,26,20,15,25,137,28,5,27,30,28,25,25,28,130,25,1,20,+17,137,18,1,17,20,133,25,145,28,2,26,25,25,131,24,0,22,130,23,132,16,3,23,+24,25,26,131,28,15,25,25,24,22,15,17,19,18,18,19,17,15,16,24,25,26,135,28,+5,27,25,24,16,21,16,135,14,16,23,25,26,26,28,28,25,25,24,14,14,16,22,22,+24,20,17,137,18,6,20,18,17,20,28,28,27,161,28,2,26,28,25,134,20,2,25,20,+17,132,18,1,17,20,134,25,0,26,204,28,4,25,25,20,17,20,138,18,3,17,20,25,+26,130,28,0,26,146,28,3,25,25,20,17,139,18,3,17,19,25,25,130,28,0,26,131,+28,132,25,1,20,17,133,18,2,17,20,26,144,28,5,31,31,25,25,24,16,130,14,0,+16,130,23,4,22,24,25,25,31,137,28,10,31,28,25,19,17,19,18,17,19,25,26,131,+28,6,25,28,25,24,5,0,14,133,24,7,25,26,26,28,25,20,17,20,142,28,4,26,+25,25,20,17,139,18,5,17,20,26,28,26,27,146,28,2,31,28,26,132,25,1,26,28,+130,25,131,24,130,25,8,26,28,28,26,25,24,24,15,17,133,18,0,17,130,25,0,31,+136,28,4,27,25,25,22,16,135,14,6,16,24,24,25,28,31,26,131,24,130,25,5,20,+17,19,18,18,17,134,18,5,17,18,20,17,20,25,165,28,0,31,131,25,4,28,25,20,+17,20,132,18,3,20,17,17,25,145,28,1,25,25,186,28,6,26,25,25,20,20,17,17,+138,18,7,19,18,18,17,17,20,25,25,144,28,6,26,25,25,20,20,17,17,141,18,4,+17,17,20,20,25,132,28,0,26,130,28,2,25,20,17,135,18,5,17,20,25,28,28,26,+143,28,6,27,25,25,24,22,23,23,130,26,3,25,25,31,31,140,28,1,25,17,131,18,+2,17,25,26,131,28,132,25,1,26,26,133,25,8,28,28,26,26,20,17,18,20,25,142,+28,5,25,20,17,18,18,20,137,18,3,20,17,20,25,152,28,6,27,27,28,31,28,28,+26,135,25,0,27,130,28,5,26,25,24,24,17,17,132,18,3,20,17,20,25,140,28,3,+25,27,24,22,134,14,1,24,25,132,28,132,25,7,20,17,17,20,17,17,18,20,133,18,+1,20,20,131,17,1,15,20,168,28,4,25,25,20,17,20,134,18,4,20,18,17,20,25,+130,28,0,26,138,28,2,26,20,25,163,28,0,26,145,28,2,26,28,25,130,20,130,17,+3,20,20,18,17,136,18,4,17,17,18,19,20,130,17,3,20,25,28,26,136,28,2,26,+28,25,130,20,130,17,3,20,20,18,17,136,18,4,17,17,18,18,20,130,17,2,20,25,+26,130,28,5,26,25,20,17,17,20,134,18,5,20,20,17,20,25,26,146,28,4,26,25,+25,26,26,130,28,1,27,27,141,28,2,25,18,17,130,18,3,20,17,20,26,133,28,1,+26,26,135,28,0,31,130,28,5,25,17,20,18,17,25,140,28,8,26,25,20,17,20,18,+18,17,20,134,18,133,17,1,20,25,157,28,7,31,28,28,27,28,31,28,26,132,28,4,+26,25,17,17,20,133,18,3,20,17,20,25,139,28,6,31,28,25,26,25,24,22,131,24,+1,25,26,132,28,4,31,26,27,25,20,131,17,3,19,20,20,19,134,18,2,20,25,25,+130,20,0,25,164,28,7,26,25,25,20,20,17,17,20,136,18,6,20,18,17,17,20,25,+25,139,28,2,25,15,20,184,28,1,25,20,135,17,1,20,17,133,18,0,17,130,20,0,+18,130,17,130,20,2,25,28,26,138,28,1,25,20,130,17,0,18,131,17,0,20,135,18,+130,20,0,19,130,17,130,20,9,25,28,25,25,20,20,18,17,20,20,135,18,6,17,17,+18,17,17,20,25,145,28,4,31,27,31,28,28,143,28,5,26,28,25,20,17,20,131,18,+3,20,17,20,26,133,28,0,27,137,28,10,26,25,20,17,20,19,17,20,25,26,26,136,+28,1,25,20,133,17,2,20,20,17,132,18,0,17,134,20,0,25,168,28,5,26,28,25,+18,17,20,136,18,4,17,20,25,28,26,138,28,1,27,28,134,25,137,28,0,26,134,25,+1,20,17,133,18,2,17,17,25,167,28,0,25,130,20,5,17,17,18,20,20,17,135,18,+1,17,17,130,18,4,17,17,20,20,25,137,28,4,20,17,20,25,26,161,28,1,25,25,+148,28,0,25,133,20,2,25,20,17,134,18,1,17,20,134,25,144,28,0,25,133,20,2,+25,20,17,133,18,2,20,17,20,134,25,130,28,1,25,20,132,17,1,18,20,132,18,0,+17,130,20,132,17,2,20,28,26,147,28,142,28,4,26,28,28,20,17,135,18,1,17,25,+145,28,1,25,17,131,18,1,17,20,138,28,0,25,132,20,4,25,25,20,17,20,133,18,+7,20,25,28,28,26,27,26,26,167,28,5,26,28,25,18,17,20,138,18,5,17,20,25,+28,28,26,138,28,0,31,133,27,136,28,1,26,26,131,28,4,26,25,20,17,20,135,18,+2,17,20,25,131,28,0,26,160,28,1,25,20,134,17,0,20,134,18,2,17,20,20,131,+17,130,20,0,25,136,28,4,25,17,20,17,25,161,28,2,25,17,25,150,28,130,25,4,+28,25,20,17,20,135,18,1,17,20,133,28,1,26,26,144,28,130,25,4,28,26,20,17,+20,134,18,3,20,17,20,26,132,28,1,26,26,130,28,132,25,0,20,134,18,1,17,20,+134,25,0,26,148,28,144,28,1,20,17,136,18,4,17,17,25,28,26,141,28,1,25,17,+134,18,0,25,143,28,2,26,20,17,135,18,3,17,17,20,25,130,28,0,27,168,28,6,+25,17,17,20,18,18,17,134,18,6,17,18,20,17,18,20,25,158,28,130,25,3,20,17,+17,20,135,18,6,20,18,17,17,20,25,26,164,28,0,25,132,20,2,25,20,17,135,18,+133,25,0,26,136,28,9,26,28,20,17,18,18,17,25,28,26,157,28,3,27,20,15,20,+148,28,0,26,131,28,3,25,20,17,20,137,18,6,17,20,25,28,28,26,26,145,28,0,+26,130,28,3,25,20,17,20,136,18,4,20,17,20,25,28,130,26,135,28,2,26,20,20,+135,18,2,17,20,25,132,28,138,26,138,28,142,28,2,26,20,17,139,18,1,17,20,141,+28,3,25,20,17,20,131,18,3,20,17,20,25,140,28,3,25,25,20,17,138,18,3,17,+20,25,25,167,28,5,26,25,20,17,18,18,130,17,0,20,132,18,2,17,20,20,131,17,+4,15,18,25,28,26,150,28,2,26,28,25,130,20,5,18,17,17,20,18,17,135,18,0,+17,130,18,6,17,17,20,20,25,28,26,162,28,6,25,26,28,25,20,17,20,134,18,2,+17,17,25,132,28,0,26,136,28,9,25,17,18,18,20,17,18,25,28,26,156,28,5,25,+17,17,20,26,26,149,28,4,25,20,17,17,20,139,18,2,17,19,25,130,28,0,26,146,+28,3,25,20,17,17,140,18,6,17,18,25,28,28,26,26,132,28,4,25,20,18,17,17,+135,18,5,20,17,17,20,25,26,148,28,2,26,28,28,141,28,5,25,20,17,18,18,19,+138,18,2,17,20,25,136,28,4,26,28,27,20,17,135,18,2,17,20,26,135,28,6,26,+25,25,20,20,17,17,139,18,5,20,17,17,20,20,25,165,28,0,25,132,17,2,18,20,+20,135,18,0,20,134,25,1,28,26,150,28,4,26,28,25,20,15,132,17,1,18,20,133,+18,3,17,20,20,18,131,17,4,20,20,25,28,26,158,28,2,26,28,26,130,28,3,25,+20,17,20,135,18,7,20,17,17,25,25,28,26,26,136,28,12,25,20,17,20,18,18,20,+17,20,25,28,26,26,151,28,7,26,28,25,20,17,20,17,25,147,28,6,25,25,20,17,+17,20,20,137,18,7,20,20,18,18,17,17,20,25,145,28,6,25,25,20,18,17,18,20,+138,18,6,20,18,20,18,17,20,25,130,28,6,26,25,25,20,20,17,17,138,18,5,20,+18,17,17,20,20,139,25,130,26,135,28,140,28,7,25,20,17,20,18,18,17,19,134,18,+132,17,2,18,20,26,136,28,1,20,17,137,18,2,17,20,25,133,28,1,25,19,130,17,+4,18,20,20,17,17,135,18,135,17,1,20,25,164,28,134,25,2,20,17,20,133,18,2,+17,20,25,161,28,0,25,133,20,134,18,2,20,17,20,133,25,139,28,3,26,28,25,25,+149,28,5,26,25,20,17,17,20,139,18,2,17,20,25,135,28,4,26,28,28,20,17,132,+18,3,20,17,18,25,155,28,7,20,17,20,18,17,20,25,26,141,28,10,27,25,25,20,+20,17,17,18,18,20,19,136,18,2,20,17,17,130,18,4,20,17,17,20,25,140,28,9,+25,25,20,20,17,17,18,18,20,20,136,18,2,20,17,17,130,18,9,20,17,17,20,25,+28,26,20,17,17,145,18,130,17,0,20,134,18,1,20,18,134,20,130,25,1,26,28,136,+28,3,26,28,25,20,133,17,2,20,20,17,132,18,0,17,133,20,1,17,25,134,28,2,+25,20,17,139,18,2,17,20,25,132,28,2,25,20,18,132,17,2,20,20,17,133,18,0,+17,135,20,1,25,26,162,28,0,26,133,28,3,25,20,17,20,134,18,3,20,17,20,25,+158,28,0,26,130,28,5,25,28,28,25,18,17,135,18,1,17,20,133,28,0,27,136,28,+4,26,28,25,17,20,146,28,7,25,25,20,20,17,17,20,20,136,18,8,17,17,18,18,+19,17,17,20,25,135,28,1,20,17,135,18,3,17,17,20,25,152,28,1,25,17,131,18,+1,17,20,140,28,9,26,28,25,20,15,15,17,17,19,18,130,17,137,18,1,20,20,134,+17,2,20,20,25,137,28,5,26,20,15,15,17,17,130,18,1,17,17,136,18,2,17,20,+20,132,17,7,18,17,20,20,25,25,20,20,145,18,0,20,139,18,136,17,130,20,136,28,+2,26,28,25,133,20,3,25,20,17,20,132,18,3,17,20,25,26,131,25,0,26,130,28,+8,26,28,28,25,20,17,18,18,20,135,18,6,17,18,20,17,19,25,31,132,28,133,25,+1,20,17,134,18,3,17,20,25,28,130,25,0,27,168,28,6,26,25,25,20,17,17,20,+137,18,4,17,17,20,25,25,155,28,9,26,28,26,28,28,25,20,17,17,20,135,18,6,+20,17,20,25,28,28,26,140,28,3,20,17,20,25,143,28,1,27,20,131,17,130,20,1,+17,17,134,18,2,17,20,20,130,17,5,20,18,17,20,25,26,132,28,3,20,17,20,17,+133,18,1,20,18,130,17,0,25,150,28,1,25,17,133,18,1,17,25,142,28,1,25,25,+130,20,1,19,17,131,20,134,18,2,20,17,20,130,25,134,20,0,25,138,28,2,26,25,+25,130,20,1,17,17,130,20,134,18,2,19,17,20,130,25,131,20,4,18,17,17,20,20,+161,18,130,20,131,18,0,20,130,17,140,28,6,26,26,28,28,26,20,17,135,18,3,17,+17,20,26,133,28,10,26,28,25,20,20,17,20,18,17,17,20,134,18,0,20,131,17,2,+15,20,25,130,28,0,26,132,28,1,25,17,136,18,2,17,17,25,167,28,9,26,28,25,+25,20,20,18,17,17,20,137,18,9,17,18,20,20,17,17,20,20,25,25,155,28,3,25,+25,20,17,137,18,9,19,18,18,17,20,20,25,28,28,26,135,28,9,26,28,25,17,18,+17,20,28,28,26,141,28,3,25,20,20,18,131,17,1,20,20,134,18,16,17,20,25,25,+20,20,18,19,20,18,17,20,25,28,28,25,20,130,17,2,20,20,17,130,18,1,17,20,+132,25,146,28,4,26,28,28,25,17,135,18,1,17,25,145,28,0,27,131,25,1,20,17,+135,18,9,20,17,20,25,28,28,26,28,26,26,145,28,0,26,131,25,1,20,17,135,18,+4,20,17,20,25,25,131,20,130,18,1,17,17,170,18,1,20,18,142,28,3,25,25,20,+17,136,18,5,20,18,17,20,25,26,130,28,4,26,28,25,20,15,131,17,3,19,20,20,+17,132,18,2,19,20,25,132,20,0,25,130,28,0,26,130,28,2,25,20,17,137,18,7,+19,18,17,20,25,28,28,26,162,28,11,26,28,25,17,15,17,20,20,18,17,17,20,135,+18,0,20,134,17,1,20,25,151,28,130,25,5,20,20,17,17,18,20,136,18,7,17,18,+18,20,18,17,20,25,136,28,8,26,28,25,20,17,19,18,17,20,145,28,133,25,0,20,+135,18,4,20,17,20,25,28,134,25,3,26,28,28,25,130,20,2,25,20,17,132,18,3,+17,20,25,26,149,28,5,26,20,17,20,18,17,133,18,2,17,17,20,142,28,8,26,26,+28,28,25,25,17,17,20,136,18,4,20,17,18,25,26,147,28,8,26,26,28,28,26,25,+20,17,19,136,18,0,20,133,17,178,18,138,28,6,26,25,25,20,20,17,17,139,18,5,+19,17,17,20,25,25,130,28,135,25,1,20,17,134,18,1,17,20,137,28,4,26,25,20,+17,17,137,18,9,20,20,18,18,17,20,25,27,28,26,164,28,4,25,20,20,17,17,131,+20,0,17,133,18,1,17,20,134,25,152,28,1,26,20,131,17,3,20,18,17,17,134,18,+3,17,20,20,19,133,17,2,20,25,26,133,28,10,26,25,20,17,20,18,18,20,17,20,+25,147,28,3,25,20,17,17,135,18,3,20,17,19,25,140,28,3,27,25,17,17,133,18,+5,17,17,20,20,25,25,143,28,9,26,28,25,19,15,17,17,18,20,17,131,18,7,20,+18,17,15,20,25,28,26,135,28,0,26,131,28,5,25,25,20,17,18,20,138,18,5,20,+17,17,20,25,26,131,28,0,26,137,28,0,26,131,28,5,25,25,20,17,17,20,141,18,+0,20,180,18,135,28,4,26,28,25,19,18,130,17,2,20,18,17,135,18,0,19,135,17,+1,20,25,134,28,2,25,20,17,136,18,2,17,20,25,130,28,7,26,27,25,25,20,20,+17,17,139,18,8,17,17,18,18,20,17,17,20,25,150,28,0,27,143,28,132,25,1,20,+17,134,18,2,19,17,20,157,28,8,26,28,25,25,20,20,18,20,18,130,20,0,17,132,+18,4,20,17,20,25,25,134,20,0,27,133,28,3,25,17,20,20,131,18,4,20,20,25,+28,26,143,28,3,25,20,20,17,138,18,5,20,17,17,20,25,26,130,28,8,26,26,28,+26,25,25,20,20,17,135,18,130,17,4,15,17,20,28,26,141,28,2,26,26,25,130,20,+2,25,20,17,131,18,1,17,20,132,25,1,28,26,138,28,4,25,20,20,17,17,144,18,+4,17,17,20,25,25,139,28,0,26,130,28,4,25,25,20,17,17,198,18,137,28,1,25,+20,133,17,1,20,20,134,18,0,17,135,20,1,25,27,131,28,5,25,25,20,17,17,20,+137,18,15,17,17,20,25,28,28,25,19,15,15,17,17,18,18,17,17,135,18,2,17,20,+20,134,17,1,20,25,147,28,1,25,20,146,28,3,25,20,17,20,136,18,5,17,20,25,+28,28,26,157,28,132,25,1,20,17,134,18,3,20,17,20,26,130,28,1,25,25,136,28,+10,25,25,20,19,17,18,18,17,20,25,25,142,28,5,26,25,20,19,17,17,141,18,5,+20,17,17,20,25,25,131,28,1,25,20,132,17,134,18,130,20,130,25,148,28,4,25,25,+20,17,20,131,18,2,17,20,25,139,28,3,26,25,25,20,130,17,3,18,20,18,19,139,+18,16,20,18,18,20,18,17,17,20,20,25,25,28,28,26,28,28,26,131,28,7,25,25,+20,18,17,17,18,19,198,18,139,28,133,25,2,20,17,20,133,18,3,17,20,25,26,130,+25,0,26,130,28,130,25,5,20,20,17,17,18,20,136,18,6,17,18,20,20,17,18,20,+131,25,130,20,1,17,18,130,20,133,18,2,19,17,20,130,25,133,20,0,25,147,28,4,+20,17,25,28,26,136,28,0,26,131,28,4,25,20,17,17,20,138,18,6,17,20,25,28,+28,26,26,152,28,130,26,5,28,28,25,25,20,17,136,18,3,20,17,20,25,131,28,0,+26,134,28,3,26,20,17,17,133,18,2,17,18,25,138,28,9,26,25,25,20,18,17,18,+19,20,20,140,18,11,19,18,18,17,17,20,20,25,25,28,26,25,132,20,0,17,131,18,+3,20,17,20,25,148,28,130,25,3,20,20,17,17,133,18,4,20,17,17,20,25,137,28,+3,25,17,15,17,132,18,1,17,17,139,18,12,17,17,18,18,20,18,18,17,17,15,17,+20,25,132,28,2,26,25,25,130,17,2,18,18,20,200,18,137,28,1,26,26,132,28,1,+25,17,135,18,3,19,17,17,25,132,28,2,26,28,25,131,17,1,18,20,130,17,135,18,+0,20,134,17,4,20,25,28,28,26,131,25,1,20,17,134,18,7,20,17,19,25,28,28,+26,26,150,28,5,25,17,17,25,28,26,138,28,6,25,25,20,18,17,18,20,136,18,10,+17,18,20,18,17,17,20,25,28,28,26,154,28,5,25,25,20,17,17,20,138,18,4,17,+17,20,25,26,131,28,0,26,132,28,11,25,25,20,20,17,18,18,17,20,25,25,26,138,+28,1,25,20,130,17,0,18,131,17,0,20,138,18,132,17,5,18,17,15,15,17,25,132,+28,2,25,20,17,132,18,7,20,17,20,20,25,28,28,26,141,28,3,26,28,20,15,131,+17,133,18,0,20,130,17,5,15,17,20,25,28,26,133,28,5,26,25,25,20,18,18,130,+17,130,20,136,18,3,17,19,20,20,132,17,131,20,132,25,130,20,2,18,17,17,205,18,+136,28,2,26,28,26,130,28,2,25,20,17,137,18,7,20,17,17,20,25,28,26,26,130,+28,1,25,20,131,17,130,20,0,17,133,18,2,17,20,25,132,20,130,25,0,26,130,28,+3,25,25,19,17,136,18,4,20,17,17,20,25,149,28,7,26,28,25,20,17,18,17,25,+136,28,0,25,130,20,6,17,17,18,20,18,18,17,134,18,10,20,20,17,17,18,18,20,+17,19,20,25,152,28,7,26,25,20,20,17,17,18,19,139,18,7,20,20,17,17,20,25,+25,26,133,28,130,25,1,20,17,130,18,3,17,17,20,25,141,28,0,25,135,20,136,18,+0,17,136,20,130,25,130,28,3,25,20,17,17,133,18,6,17,18,18,17,20,25,25,144,+28,1,26,25,132,20,0,17,131,18,2,17,20,25,130,20,1,25,25,138,28,0,26,133,+25,0,20,137,18,2,20,17,20,137,25,130,20,132,17,1,18,19,206,18,139,28,4,26,+25,20,17,17,139,18,4,19,18,17,20,25,133,28,0,26,132,25,1,20,17,135,18,1,+17,20,137,28,5,25,20,20,17,17,20,137,18,5,20,18,17,20,20,25,130,28,0,26,+144,28,7,25,20,17,20,19,17,20,25,133,28,4,26,28,25,20,20,133,17,1,18,20,+133,18,5,20,17,20,25,20,18,133,17,2,25,28,26,147,28,2,25,20,20,130,17,4,+20,20,18,17,17,136,18,7,17,17,18,18,20,20,17,17,130,20,7,25,28,28,26,28,+20,17,17,131,18,5,17,20,20,17,17,25,142,28,0,26,131,25,1,20,17,137,18,0,+17,133,25,0,26,131,28,4,25,25,20,19,17,135,18,1,20,20,131,17,3,18,25,28,+26,141,28,6,26,28,28,25,25,20,17,133,18,1,19,25,143,28,0,26,130,28,3,25,+20,17,17,138,18,2,20,17,20,130,25,131,20,132,17,131,18,0,20,208,18,135,28,8,+27,25,25,20,20,17,17,18,19,137,18,8,17,17,18,18,20,17,17,20,25,136,28,1,+20,17,136,18,14,20,17,20,26,28,28,26,28,28,26,25,20,20,17,17,143,18,5,17,+17,20,20,25,26,143,28,11,26,25,20,17,20,18,18,20,17,17,25,26,135,28,130,25,+132,20,136,18,2,17,25,28,135,25,1,28,26,136,28,0,26,137,28,3,26,25,20,20,+132,17,1,20,20,135,18,2,17,20,20,134,17,4,20,20,25,28,26,130,28,3,25,25,+20,17,130,18,1,20,20,130,25,140,28,7,26,26,28,28,25,20,17,17,139,18,2,17,+20,26,134,28,3,27,20,15,15,130,17,0,20,132,18,1,17,20,134,25,1,28,26,142,+28,4,26,25,25,20,17,133,18,4,20,18,17,20,25,136,28,1,26,26,132,28,5,25,+20,20,17,18,19,139,18,0,20,135,17,3,20,18,18,20,214,18,135,28,2,25,17,15,+130,17,3,20,18,17,17,135,18,2,17,20,20,133,17,2,18,20,25,131,28,4,26,25,+20,17,19,138,18,15,17,20,25,28,28,25,20,20,19,17,18,20,18,20,18,17,137,18,+0,17,130,18,7,20,18,17,17,20,20,25,25,138,28,2,26,28,25,131,20,6,18,18,+17,20,20,25,26,134,28,0,26,132,28,3,25,20,20,17,136,18,2,17,20,25,159,28,+1,25,25,133,20,136,18,2,17,25,25,131,20,130,25,9,28,28,26,28,28,25,25,20,+20,17,131,18,7,17,17,20,20,25,26,28,26,133,28,1,26,26,131,28,5,25,20,18,+17,18,20,139,18,12,20,17,20,25,28,28,26,28,26,28,26,25,25,132,20,132,18,4,+19,17,20,25,26,131,28,0,26,140,28,7,26,25,25,20,20,17,17,20,133,18,8,17,+17,18,17,20,25,28,28,26,136,28,5,26,25,20,20,17,17,143,18,2,20,18,20,223,+18,135,28,2,26,25,25,130,20,1,17,18,130,20,133,18,2,20,17,20,130,25,132,20,+9,18,25,28,26,25,25,20,17,17,20,137,18,9,20,18,18,17,17,20,25,27,20,18,+133,17,1,20,20,137,18,0,20,136,17,3,20,25,28,26,138,28,3,26,25,20,20,131,+18,3,17,20,25,25,138,28,4,25,25,20,17,17,137,18,7,20,17,18,25,26,28,28,+26,140,28,1,25,25,143,28,2,25,20,17,137,18,2,17,18,25,139,28,0,26,131,20,+131,18,132,20,0,25,138,28,2,25,25,20,130,17,144,18,3,17,17,20,25,136,28,2,+25,20,17,133,18,6,20,17,17,20,20,25,25,132,28,133,26,130,28,4,26,25,20,17,+15,130,17,0,20,132,18,8,17,20,20,17,18,17,17,20,25,132,28,0,26,130,25,1,+20,20,130,17,244,18,139,28,0,26,131,25,1,20,17,134,18,6,19,17,20,25,28,28,+25,130,26,1,25,25,130,20,4,17,17,18,18,19,137,18,10,17,17,20,20,18,17,20,+25,28,25,25,133,20,0,19,136,18,2,17,20,25,132,20,130,25,0,31,141,28,2,25,+17,17,132,18,3,20,17,17,25,136,28,4,25,25,20,17,17,141,18,4,17,17,20,20,+25,138,28,4,26,26,25,17,25,140,28,5,26,25,20,17,17,20,137,18,6,20,17,17,+20,25,28,28,130,26,135,25,1,20,17,131,18,1,17,20,134,25,1,26,25,130,26,6,+25,20,20,18,17,17,20,146,18,6,20,18,17,19,20,25,25,131,28,4,25,20,17,17,+20,136,18,130,17,130,20,0,27,141,28,130,25,130,20,0,17,131,18,0,17,133,20,0,+17,136,20,130,17,247,18,137,28,0,26,130,28,3,25,20,20,17,136,18,4,20,17,17,+20,25,131,28,1,25,20,135,17,0,20,133,18,4,20,17,20,20,18,132,17,2,15,18,+25,131,28,3,25,20,17,17,137,18,1,17,25,136,28,0,27,140,28,10,27,25,20,20,+17,18,18,17,20,25,25,134,28,7,25,25,20,20,17,17,18,20,141,18,7,19,18,17,+17,20,20,25,25,137,28,2,20,15,20,138,28,6,25,25,20,17,17,20,20,140,18,1,+20,17,135,20,0,18,133,17,133,18,133,17,135,20,4,17,17,18,18,20,151,18,9,17,+17,20,20,25,25,20,17,17,20,136,18,0,19,130,18,131,20,145,25,2,20,20,17,133,+18,1,17,18,130,20,1,18,19,136,17,2,18,18,20,247,18,134,28,0,26,131,28,5,+25,25,20,17,17,20,137,18,5,20,18,17,20,25,25,130,28,2,26,25,25,134,20,0,+17,135,18,131,25,132,20,6,25,28,28,25,20,17,17,140,18,8,17,20,25,28,28,26,+26,28,26,141,28,4,26,25,25,20,17,131,18,3,17,20,25,26,132,28,3,25,19,15,+17,131,18,1,17,17,138,18,1,17,17,131,18,130,17,4,18,20,25,28,26,130,28,8,+26,28,25,18,17,17,25,28,26,131,28,8,26,25,25,20,20,17,17,20,20,144,18,135,+17,6,18,20,19,20,18,18,19,137,18,1,19,18,135,17,1,18,20,156,18,130,20,3,+17,17,20,20,137,18,3,20,20,18,18,138,20,1,18,20,138,17,136,18,1,17,17,136,+18,0,20,252,18,137,28,4,25,20,20,17,17,143,18,5,17,17,20,20,25,27,133,28,+3,26,25,20,17,135,18,3,17,17,20,27,134,28,5,25,20,18,17,17,20,141,18,3,+17,20,25,25,135,28,130,26,134,28,4,25,20,17,20,20,130,18,130,20,3,17,20,28,+26,131,28,2,25,20,20,131,17,2,20,20,19,137,18,1,20,20,132,17,130,20,1,25,+25,133,28,6,25,20,17,18,17,20,25,131,28,2,26,25,20,130,17,1,18,20,149,18,+130,20,0,19,149,18,0,19,131,20,161,18,2,17,20,20,139,18,0,17,131,18,138,17,+255,18,157,18,130,28,6,26,28,26,28,25,20,20,130,17,145,18,1,19,18,130,17,0,+20,133,25,2,20,17,17,138,18,3,17,20,20,25,132,20,1,17,17,146,18,4,17,17,+20,25,25,137,28,1,26,26,130,28,5,26,28,26,25,20,17,130,18,1,17,20,130,25,+135,28,133,25,1,20,17,136,18,1,17,20,134,25,136,28,8,25,20,17,20,18,20,17,+18,25,130,26,5,28,28,29,25,25,20,216,18,0,20,148,18,130,20,255,18,163,18,134,+28,2,25,20,20,133,18,1,19,20,145,18,130,17,130,20,3,18,17,18,20,139,18,135,+17,148,18,3,19,18,17,17,131,20,133,25,134,28,3,25,20,20,17,132,18,4,17,17,+20,25,25,133,28,0,26,130,28,3,25,20,18,17,137,18,3,20,17,20,25,140,28,6,+25,17,17,20,18,18,17,130,20,2,25,28,28,130,25,130,20,255,18,255,18,149,18,1,+28,26,135,25,1,20,20,130,18,130,20,145,18,2,20,18,20,130,17,143,18,0,20,133,+18,0,20,150,18,1,20,18,134,17,0,18,133,20,130,25,3,20,18,20,20,131,18,0,+17,131,20,2,25,28,26,133,28,5,25,20,20,17,17,20,138,18,7,20,17,20,25,26,+28,28,26,130,28,132,26,3,25,25,20,20,130,18,1,17,20,130,25,1,20,20,132,17,+255,18,255,18,149,18,130,20,0,18,133,17,0,20,132,18,0,17,150,18,1,19,19,181,+18,2,20,18,18,136,17,131,20,131,18,4,17,20,25,25,26,133,28,5,25,25,20,20,+17,17,142,18,5,20,17,17,20,25,26,136,28,3,25,20,20,17,131,18,1,17,18,131,+17,130,18,0,20,255,18,255,18,150,18,130,17,230,18,1,20,18,131,17,132,18,1,17,+17,131,20,130,25,1,20,20,130,17,145,18,8,19,20,17,17,20,25,25,28,26,132,25,+2,20,17,17,132,18,0,19,131,18,0,20,255,18,255,18,154,18,1,20,20,235,18,0,+19,135,18,136,17,0,20,151,18,1,17,17,132,20,4,18,17,17,20,20,255,18,255,18,+166,18,247,18,0,20,159,18,1,20,18,132,17,255,18,255,18,171,18,255,18,155,18,1,+20,20,255,18,255,18,173,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,255,18,255,18,255,18,203,18,+255,18,255,18,255,18,203,18,+};+const Image *const earths[]={&earth0};+const Background backgrounds[]={{bg0_rle,bg0_pal,bg0_offset}};+const uint8_t original_ball_ids[]={+0,5,6,7,13,18,23,+};+const uint16_t legacy_ball_prices[]={+0,50,50,50,50,100,100,100,250,250,250,500,500,500,500,750,750,750,1000,1000,1000,1500,1500,1500,+3000,5000,+};+const uint16_t legacy_scene_prices[]={+0,100,150,300,400,500,600,+};diff --git a/games/dune/src/assets.h b/games/dune/src/assets.hnew file mode 100644index 00000000..f449c7fb--- /dev/null+++ b/games/dune/src/assets.h@@ -0,0 +1,18 @@+#ifndef ASSETS_H+#define ASSETS_H+#include <stdint.h>+typedef struct {uint16_t w,h;const uint8_t*pixels;const uint16_t*palette;} Image;+typedef struct {const uint8_t*data;const uint16_t*palette;const uint32_t*offset;} Background;+typedef struct {const char*name;uint16_t price,colors[18];uint8_t rotates,type,count,height;int8_t offset_x,offset_y;} BallStyle;+typedef struct {const char*name;uint16_t price,surface,line,ground;} Landscape;+typedef struct {uint16_t offset;uint8_t w,h;int8_t xoff,yoff;uint8_t advance;} Glyph;+typedef struct {const Glyph*glyphs;const uint8_t*pixels;} Font;+extern const Font fonts[3];+extern const Image PlayIcon,Shop,Score_Coin,crown,Pause,Balls;+extern const Image *const balls[],*const earths[];+extern const Background backgrounds[];+extern const BallStyle ball_styles[];+extern const Landscape landscapes[];+extern const uint8_t original_ball_ids[7];+extern const uint16_t legacy_ball_prices[26],legacy_scene_prices[7];+#endifdiff --git a/games/dune/src/canvas.h b/games/dune/src/canvas.hnew file mode 100644index 00000000..4b5f2db8--- /dev/null+++ b/games/dune/src/canvas.h@@ -0,0 +1,41 @@+#ifndef CANVAS_H+#define CANVAS_H+#include "assets.h"+#include <stdbool.h>+#include <stdint.h>+#define RGB(r,g,b) ((((r)>>3)<<11)|(((g)>>2)<<5)|((b)>>3))+typedef void (*Push)(int,int,int,int,const uint16_t *);+static uint16_t strip[320*8];+static uint32_t hashes[30];+static int band;+static inline void invalidate(void){for(int i=0;i<30;i++)hashes[i]=0;}+static inline void pixel(int x,int y,uint16_t c){if((unsigned)x<320&&(unsigned)(y-band)<8)strip[(y-band)*320+x]=c;}+static inline void rect(int x,int y,int w,int h,uint16_t c){int x0=x<0?0:x,x1=x+w>320?320:x+w,y0=y<band?band:y,y1=y+h>band+8?band+8:y+h;for(int j=y0;j<y1;j++)for(int i=x0;i<x1;i++)strip[(j-band)*320+i]=c;}+static inline void line(int x,int y,int x1,int y1,uint16_t c){int dx=x1>x?x1-x:x-x1,sx=x<x1?1:-1,dy=y1>y?y-y1:y1-y,sy=y<y1?1:-1,e=dx+dy;for(;;){pixel(x,y,c);if(x==x1&&y==y1)break;int v=2*e;if(v>=dy){e+=dy;x+=sx;}if(v<=dx){e+=dx;y+=sy;}}}+static inline void circle(int cx,int cy,int r,uint16_t c){int y0=cy-r<band?band:cy-r,y1=cy+r>band+7?band+7:cy+r;for(int y=y0;y<=y1;y++)for(int x=cx-r;x<=cx+r;x++)if((x-cx)*(x-cx)+(y-cy)*(y-cy)<=r*r)pixel(x,y,c);}+static inline uint16_t blend(uint16_t a,uint16_t b,unsigned n){unsigned r=(((a>>11)*n+(b>>11)*(3-n))+1)/3,g=((((a>>5)&63)*n+((b>>5)&63)*(3-n))+1)/3,v=(((a&31)*n+(b&31)*(3-n))+1)/3;return (uint16_t)((r<<11)|(g<<5)|v);}+static inline const Font* text_font(int size){return &fonts[size<1?0:size>3?2:size-1];}+static inline uint16_t blend_alpha(uint16_t a,uint16_t b,unsigned n){+ unsigned inv=15-n,r=((a>>11)*n+(b>>11)*inv+7)/15;+ unsigned g=(((a>>5)&63)*n+((b>>5)&63)*inv+7)/15,v=((a&31)*n+(b&31)*inv+7)/15;+ return (uint16_t)((r<<11)|(g<<5)|v);+}+static inline unsigned glyph_index(unsigned ch){return ch<32||ch>126?'?'-32:ch-32;}+static inline void glyph(int x,int y,unsigned ch,uint16_t color,int size){+ const Font*f=text_font(size);const Glyph*g=&f->glyphs[glyph_index(ch)];x+=g->xoff;y+=g->yoff;+ int y0=y<band?band:y,y1=y+g->h>band+8?band+8:y+g->h;+ for(int py=y0;py<y1;py++)for(unsigned k=0;k<g->w;k++){+ int px=x+(int)k;if((unsigned)px>=320)continue;+ unsigned i=(py-y)*g->w+k,v=f->pixels[g->offset+i/2],a=(i&1)?v&15:v>>4;+ if(a){uint16_t*p=&strip[(py-band)*320+px];*p=a==15?color:blend_alpha(color,*p,a);}+ }+}+static inline int text_width(const char*s,int size){const Font*f=text_font(size);int w=0;for(;*s;s++)w+=f->glyphs[glyph_index((unsigned char)*s)].advance;return w;}+static inline void text(int x,int y,const char*s,uint16_t c,int size){const Font*f=text_font(size);for(;*s;s++){unsigned i=glyph_index((unsigned char)*s);glyph(x,y,(unsigned char)*s,c,size);x+=f->glyphs[i].advance;}}+static inline void center(int x,int y,const char*s,uint16_t c,int scale){text(x-text_width(s,scale)/2,y,s,c,scale);}+static inline void number(int x,int y,uint32_t n,uint16_t c,int scale,bool centered){char s[11],rev[10];int count=0;do{rev[count++]=(char)('0'+n%10);n/=10;}while(n);for(int i=0;i<count;i++)s[i]=rev[count-1-i];s[count]=0;if(centered)center(x,y,s,c,scale);else text(x,y,s,c,scale);}+static inline uint16_t image_color(const Image *im,int x,int y){unsigned i=y*im->w+x,v=im->pixels[i/2];return im->palette[(i&1)?v&15:v>>4];}+static inline void image(const Image*im,int x,int y,int width,int height){int y0=y<band?band:y,y1=y+height>band+8?band+8:y+height;for(int py=y0;py<y1;py++)for(int px=x<0?0:x;px<x+width&&px<320;px++){unsigned sx=(unsigned)((px-x)*im->w/width),sy=(unsigned)((py-y)*im->h/height),i=sy*im->w+sx,v=im->pixels[i/2],n=(i&1)?v&15:v>>4;if(n)pixel(px,py,im->palette[n]);}}+static inline void outline(int x,int y,int w,int h,uint16_t c){rect(x,y,w,1,c);rect(x,y+h-1,w,1,c);rect(x,y,1,h,c);rect(x+w-1,y,1,h,c);}+static inline void present(Push push){uint32_t h=2166136261u;for(unsigned i=0;i<320*8;i++)h=(h^strip[i])*16777619u;if(h!=hashes[band/8]){hashes[band/8]=h;push(0,band,320,8,strip);}}+#endifdiff --git a/games/dune/src/game.c b/games/dune/src/game.cnew file mode 100644index 00000000..4de69a05--- /dev/null+++ b/games/dune/src/game.c@@ -0,0 +1,59 @@+#include "game.h"+#include "assets.h"+#include <math.h>+#include <string.h>+static float clamp(float v,float a,float b){return v<a?a:v>b?b:v;}+static uint32_t random_u(Game*g){uint32_t x=g->rng;x^=x<<13;x^=x>>17;x^=x<<5;return g->rng=x;}+static float random_f(Game*g){return (random_u(g)>>8)*(1.f/16777216.f);}+static float curve(const Terrain*t,float n){return t->flat||n>=63?0:sinf(n/20.f)*t->height*n/t->divisor;}+void terrain_shape(Terrain*t,float r0,float r1,float r2,bool flat){t->raw_width=fminf(2048,700+1700*r0+(flat?1000:0));t->width=t->raw_width*.7f;t->height=t->raw_width/10+220*r1-50;t->divisor=42+15*r2;t->flat=flat;for(unsigned j=0;j<9;j++)t->contact[j]=curve(t,j<8?j*8:63)+407.5f;}+static void shape(Game*g,unsigned i,bool flat){float a=random_f(g),b=random_f(g),c=random_f(g);terrain_shape(&g->terrain[i],a,b,c,flat);}+float terrain_u(const Terrain*t,float x){return (x-t->x)/t->width;}+float terrain_surface(const Terrain*t,float x){float n=clamp((x-t->x)*90/t->raw_width,0,63);unsigned i=(unsigned)n;return 392.5f+curve(t,(float)i)*(1-(n-i))+curve(t,(float)i+1)*(n-i);}+unsigned game_terrain(const Game*g,float x){for(unsigned j=0;j<8;j++){unsigned i=g->order[j];if(x>=g->terrain[i].x&&x<=g->terrain[i].x+g->terrain[i].width)return i;}return x<g->terrain[g->order[0]].x?g->order[0]:g->order[7];}+static void add_coin(Game*g,float x,float y){for(unsigned i=0;i<COIN_COUNT;i++)if(!g->coins[i].active){g->coins[i]=(Coin){x,y,1};return;}}+static void populate(Game*g,Terrain*t){if(random_f(g)>=.6f)return;unsigned count=2+random_u(g)%3,start=8+random_u(g)%30;for(unsigned i=0;i<count;i++){float x=t->x+t->raw_width*(start+i*5)/90.f;add_coin(g,x,terrain_surface(t,x)-70);}}+void game_new(Game*g,uint32_t seed){memset(g,0,sizeof(*g));g->rng=seed?seed:0x44554e45;g->x=700;g->y=200;g->zoom=1;g->trail_scale=1;g->spare=8;g->slide_terrain=255;float x=-300;for(unsigned i=0;i<9;i++){shape(g,i,i==0);if(i<8){g->order[i]=i;g->terrain[i].x=x;x=floorf(x-1)+g->terrain[i].width;if(i>1)populate(g,&g->terrain[i]);}}}+typedef struct {float px,py,nx,ny,dist,u;unsigned terrain;} Contact;+static Contact nearest(const Game*g,float x,float y){Contact c={.dist=1e20f};for(unsigned j=0;j<8;j++){unsigned id=g->order[j];const Terrain*t=&g->terrain[id];if(x<t->x-100||x>t->x+t->width+100)continue;for(unsigned k=0;k<8;k++){float ax=t->x+t->raw_width*(k*8)/90.f,bx=t->x+t->raw_width*(k<7?(k+1)*8:63)/90.f,ay=t->contact[k],by=t->contact[k+1],dx=bx-ax,dy=by-ay,l2=dx*dx+dy*dy,u=clamp(((x-ax)*dx+(y-ay)*dy)/l2,0,1),px=ax+u*dx,py=ay+u*dy,vx=x-px,vy=y-py,d=vx*vx+vy*vy;if(d<c.dist){float inv=1/sqrtf(l2);c=(Contact){px,py,dy*inv,-dx*inv,d,terrain_u(t,x),id};}}}return c;}+static void score_add(Game*g,unsigned n,unsigned popup){g->score=UINT32_MAX-g->score<n?UINT32_MAX:g->score+n;g->popup=popup;g->popup_age=90;}+void game_input(Game*g,bool held){if(held){if(g->vx<2700){g->vx+=16;if(g->grounded){g->vx+=12;if(g->vx<250){g->vx+=30;g->vy-=30;}else g->vy+=g->vx/80;}}if(g->vy<2300&&!g->grounded){g->vy+=80;g->vy+=g->vx/50;}}}+void game_step(Game*g,bool held){+ if(g->ready)return;+ ++g->tick;+ if(g->popup_age)--g->popup_age;+ if(g->phase==CRASHED){if(++g->phase_age>=45)g->ready=1;return;}+ float previous_vx=g->vx,previous_vy=g->vy;unsigned airborne=g->airborne;+ Contact before=nearest(g,g->x,g->y);g->grounded=before.dist<=70*70;+ game_input(g,held);+ if(g->vx<1800)g->vx*=1.005f;+ if(g->y< -650&&g->vy<0){g->vx+=.15f*-g->vy;g->vy*=.8f;}else if(g->y< -300&&g->vy<0)g->vy+=30;+ bool landed=false;Contact c=before;+ for(unsigned sub=0;sub<4;sub++){+ g->vy+=1000.f/240;g->x+=g->vx/240;g->y+=g->vy/240;c=nearest(g,g->x,g->y);+ float signed_d=(g->x-c.px)*c.nx+(g->y-c.py)*c.ny;+ if(c.dist<42*42&&signed_d>=-20){float penetration=42-signed_d;g->x+=c.nx*penetration;g->y+=c.ny*penetration;float vn=g->vx*c.nx+g->vy*c.ny;if(vn<0){g->vx-=c.nx*vn;g->vy-=c.ny*vn;landed=true;}}+ }+ g->vx*=.9998325f;g->vy*=.9998325f;c=nearest(g,g->x,g->y);bool touching=c.dist<=70*70;+ if(g->grounded&&!touching&&held&&g->vx>0)g->vx*=1.03f,g->vy*=1.03f;+ g->grounded=touching;if(touching)g->airborne=0;else if(g->airborne<65535)++g->airborne;+ if(landed&&previous_vx>10&&previous_vy>30&&fabsf(previous_vx-g->vx)>70&&fabsf(previous_vy-g->vy)>70&&c.u>.7f&&airborne>20&&!g->terrain[c.terrain].flat){g->phase=CRASHED;g->phase_age=0;}+ if(landed&&g->vy>1000)g->vy=1000;+ Contact small=nearest(g,g->x,g->y+30);bool slide=small.dist<=35*35;+ if(slide&&!g->sliding&&small.u<.4f&&previous_vy>10&&!g->terrain[small.terrain].flat){g->slide_start=small.u;g->slide_terrain=small.terrain;}+ if(slide&&g->slide_terrain==small.terrain&&!g->terrain[small.terrain].slid&&small.u-g->slide_start>.4f&&g->slide_start<.45f&&hypotf(g->vx,g->vy)>1900){bool perfect=g->slide_start<.2f;score_add(g,perfect?3:1,perfect?4:5);float boost=perfect?1.2f:1.05f;g->vx*=boost;g->vy*=boost;g->terrain[small.terrain].slid=1;}+ if(!slide)g->slide_terrain=255;+ g->sliding=slide;+ if(!g->above_line&&g->y<222&&g->vy<0){unsigned n=g->vy> -800?1:g->vy> -1300?2:3;score_add(g,n,n);g->above_line=1;unsigned count=3+(unsigned)(2*random_f(g)+.999999f);for(unsigned i=0;i<count;i++){float x=g->x+i*.1f*g->vx,y=g->y+i*.1f*g->vy+i*i*i;if(y<=170)add_coin(g,x,y);}}+ if(g->above_line&&g->y>222)g->above_line=0;+ for(unsigned i=0;i<COIN_COUNT;i++)if(g->coins[i].active){float dx=g->x-g->coins[i].x,dy=g->y-g->coins[i].y;if(dx*dx+dy*dy<72.8f*72.8f){g->coins[i].active=0;if(g->earned<UINT32_MAX)++g->earned;}else if(dx>2200)g->coins[i].active=0;}+ while(g->terrain[g->order[1]].x+g->terrain[g->order[1]].width<g->x-2000){unsigned old=g->order[1],id=old;if(random_f(g)<.6f){id=g->spare;g->spare=old;}Terrain*t=&g->terrain[id],*last=&g->terrain[g->order[7]];t->x=floorf(last->x-1)+last->width;t->slid=0;for(unsigned i=1;i<7;i++)g->order[i]=g->order[i+1];g->order[7]=id;++g->terrains;populate(g,t);}+ float target=clamp((g->y+392.5f)/750,.4f,1),blend=.2f+clamp(-.0004f*g->vy,.2f,.8f);g->zoom+=(target-g->zoom)*blend;float cy=100*g->zoom+(g->zoom-1)*665;g->camera_y+=(cy-g->camera_y)*.4f;g->camera_x=g->x-300/g->zoom;g->rotation+=g->vx/8000;+ g->trail_scale+=(clamp((g->vx+g->vy)/(touching?400:160),.2f,4.5f)-g->trail_scale)*.03f;g->trail_angle+=(atan2f(g->vy,g->vx)-g->trail_angle)*.3f;+ if(g->x>100000){g->x-=90000;g->camera_x-=90000;for(unsigned i=0;i<9;i++)g->terrain[i].x-=90000;for(unsigned i=0;i<COIN_COUNT;i++)g->coins[i].x-=90000;}+ if(!isfinite(g->x)||!isfinite(g->y)||fabsf(g->y)>10000||g->vx< -1){g->phase=CRASHED;g->phase_age=0;}+}+void game_finish(Stats*s,const Game*g){if(g->score>s->best)s->best=g->score;s->coins=UINT32_MAX-s->coins<g->earned?UINT32_MAX:s->coins+g->earned;s->seed=g->rng;}+bool game_valid(const Game*g){if(!isfinite(g->x)||!isfinite(g->y)||!isfinite(g->vx)||!isfinite(g->vy)||g->zoom<.39f||g->zoom>1.01f||g->phase>CRASHED)return false;unsigned mask=1u<<g->spare;for(unsigned i=0;i<8;i++){if(g->order[i]>=9||mask&(1u<<g->order[i]))return false;mask|=1u<<g->order[i];}return mask==511;}+bool shop_owned(const Stats*s,bool scene,unsigned i){return i<(scene?LANDSCAPE_COUNT:BALL_COUNT)&&((scene?s->scenes:s->unlocked)&(1u<<i));}+bool shop_buy(Stats*s,bool scene,unsigned i){if(i>=(scene?LANDSCAPE_COUNT:BALL_COUNT))return false;unsigned price=scene?landscapes[i].price:ball_styles[i].price;if(!shop_owned(s,scene,i)){if(s->coins<price)return false;s->coins-=price;if(scene)s->scenes|=1u<<i;else s->unlocked|=1u<<i;}if(scene)s->landscape=i;else s->ball=i;return true;}diff --git a/games/dune/src/game.h b/games/dune/src/game.hnew file mode 100644index 00000000..7ceeaa8d--- /dev/null+++ b/games/dune/src/game.h@@ -0,0 +1,38 @@+#ifndef GAME_H+#define GAME_H+#include <stdbool.h>+#include <stddef.h>+#include <stdint.h>+#define SAVE_BYTES 40+#define BALL_COUNT 7+#define LANDSCAPE_COUNT 1+#define COIN_COUNT 32+#define WORLD_SCALE (240.f/665.f)+enum {TITLE,PLAY,PAUSE,RESULT,SHOP,HELP,SAVE_ERROR,BUY};+enum {RUNNING,CRASHED};+typedef struct {uint32_t best,coins,unlocked,scenes,runs,seed;uint8_t ball,landscape;} Stats;+typedef struct {float raw_width,width,height,divisor,x,contact[9];uint8_t flat,slid;} Terrain;+typedef struct {float x,y;uint8_t active;} Coin;+typedef struct {+ float x,y,vx,vy,camera_x,camera_y,zoom,rotation,slide_start;+ uint32_t rng,tick,score,earned,terrains;+ uint16_t airborne,phase_age,popup_age;+ uint8_t phase,grounded,sliding,slide_terrain,above_line,popup,ready;+ uint8_t order[8],spare;+ Terrain terrain[9];Coin coins[COIN_COUNT];+ float trail_scale,trail_angle;+} Game;+void game_new(Game*,uint32_t seed);+void game_step(Game*,bool held);+void game_input(Game*,bool held);+void terrain_shape(Terrain*,float,float,float,bool);+bool game_valid(const Game*);+float terrain_surface(const Terrain*,float x);+unsigned game_terrain(const Game*,float x);+float terrain_u(const Terrain*,float x);+void game_finish(Stats*,const Game*);+bool shop_owned(const Stats*,bool scene,unsigned index);+bool shop_buy(Stats*,bool scene,unsigned index);+void save_encode(const Stats*,uint8_t*);+bool save_decode(Stats*,const uint8_t*,size_t);+#endifdiff --git a/games/dune/src/icon.png b/games/dune/src/icon.pngnew file mode 100644index 00000000..0a0db44cBinary files /dev/null and b/games/dune/src/icon.png differdiff --git a/games/dune/src/main.c b/games/dune/src/main.cnew file mode 100644index 00000000..5da5684a--- /dev/null+++ b/games/dune/src/main.c@@ -0,0 +1,58 @@+#include <eadk.h>+#include "render.h"+#include "assets.h"+#include "../../common/epsilon_app.h"+#include "../../common/epsilon_files.h"+#ifdef __ELF__+const char eadk_app_name[] __attribute__((section(".rodata.eadk_app_name")))="Dune";+const uint32_t eadk_api_level __attribute__((section(".rodata.eadk_api_level")))=0;+#endif+#define KEY(k) (UINT64_C(1)<<(k))+static Game game;+static Stats stats;+static uint8_t save_data[SAVE_BYTES];+static bool saved,save_failed;+static uint32_t last_hash;+uint32_t perf_frames,perf_max,perf_slow,current_view;+static void push(int x,int y,int w,int h,const uint16_t*p){eadk_display_push_rect((eadk_rect_t){x,y,w,h},p);}+static void bank(void){game_finish(&stats,&game);game.earned=0;}+static bool save(void){bank();save_encode(&stats,save_data);uint32_t h=0;for(unsigned i=SAVE_BYTES-4;i<SAVE_BYTES;i++)h=(h<<8)|save_data[i];if(saved&&h==last_hash&&!save_failed)return true;save_failed=!ef_write("dune.sav",save_data,SAVE_BYTES);if(!save_failed)saved=true,last_hash=h;return !save_failed;}+static void fresh(void){if(stats.runs<UINT32_MAX)++stats.runs;uint32_t seed=stats.seed^(stats.runs*2654435761u);game_new(&game,seed);}+int main(void){+ np_app_begin();stats=(Stats){.unlocked=1,.scenes=1,.seed=0x44554e45};uint32_t n=0;const uint8_t*p=ef_read("dune.sav",&n);if(!save_decode(&stats,p,n))stats.seed^=(uint32_t)eadk_random();if(!stats.seed)stats.seed=1;game_new(&game,stats.seed);+ unsigned view=TITLE,selected=0,error_return=TITLE,error_selection=0;bool ongoing=false;+ uint64_t previous=0,keys=eadk_keyboard_scan(),stale=keys;uint32_t now=(uint32_t)eadk_timing_millis(),last=now,draw_at=now,accum=0;+ render_invalidate();+ for(;;){+ now=(uint32_t)eadk_timing_millis();uint32_t elapsed=now-last;last=now;keys=eadk_keyboard_scan();stale&=keys;uint64_t active=keys&~stale,hit=active&~previous;previous=active;+ bool ok=(hit&(KEY(eadk_key_ok)|KEY(eadk_key_exe)))!=0,back=(hit&KEY(eadk_key_back))!=0,right=(hit&KEY(eadk_key_right))!=0,left=(hit&KEY(eadk_key_left))!=0,down=(hit&KEY(eadk_key_down))!=0,up=(hit&KEY(eadk_key_up))!=0;+ if(view!=SAVE_ERROR&&(keys&(KEY(eadk_key_home)|KEY(eadk_key_on_off)))){if(save())break;error_return=view==PLAY?PAUSE:view;error_selection=selected;view=SAVE_ERROR;ok=back=right=left=up=down=false;stale=keys;}+ if(view==PLAY){+ if(back){view=PAUSE;selected=0;save();}+ else{if(elapsed>100)elapsed=100;accum+=elapsed*60;bool held=(active&(KEY(eadk_key_ok)|KEY(eadk_key_exe)|KEY(eadk_key_shift)))!=0;+ while(accum>=1000){unsigned phase=game.phase;game_step(&game,held);accum-=1000;if(phase==RUNNING&&game.phase==CRASHED)save();}+ if(game.ready)view=RESULT,selected=0,ongoing=false;+ }+ }else{+ accum=0;+ if(view==TITLE){if(right||down||left||up)selected^=1;if(back){if(save())break;error_return=TITLE;error_selection=selected;view=SAVE_ERROR;}+ else if(hit&KEY(eadk_key_zero))view=HELP;+ else if(ok){if(selected==0){if(!ongoing)fresh();ongoing=true;view=PLAY;stale|=keys;}else view=SHOP,selected=stats.ball;}}+ else if(view==PAUSE){if(down||right)selected=(selected+1)%3;if(up||left)selected=(selected+2)%3;if(back||(ok&&selected==0))view=PLAY,stale|=keys;else if(ok&&selected==1)save(),fresh(),view=PLAY,stale|=keys;else if(ok&&selected==2)view=TITLE,selected=0;}+ else if(view==RESULT){if(up||down||left||right)selected^=1;if(back||(ok&&selected==1))view=TITLE,selected=0;else if(ok){fresh();ongoing=true;view=PLAY;stale|=keys;}}+ else if(view==SHOP){+ if(right)selected=(selected+1)%BALL_COUNT;+ if(left)selected=(selected+BALL_COUNT-1)%BALL_COUNT;+ if(down||up)selected=selected>=4?selected-4:selected+4<BALL_COUNT?selected+4:BALL_COUNT-1;+ if(back)view=TITLE,selected=1;+ else if(ok){if(shop_owned(&stats,false,selected))shop_buy(&stats,false,selected),save();else if(stats.coins>=ball_styles[selected].price)view=BUY;}+ }else if(view==BUY){if(back)view=SHOP;else if(ok)shop_buy(&stats,false,selected),save(),view=SHOP;}+ else if(view==HELP){if(back||ok)view=TITLE,selected=0;}+ else if(view==SAVE_ERROR){if(back)break;if(ok&&save())break;if(hit&KEY(eadk_key_one))view=error_return,selected=error_selection;}+ }+ current_view=view;+ if(now-draw_at>=33||hit||!perf_frames){uint32_t start=(uint32_t)eadk_timing_millis();render(&game,&stats,view,selected,false,save_failed,now,push);uint32_t spent=(uint32_t)eadk_timing_millis()-start;if(spent>perf_max)perf_max=spent;if(spent>33)++perf_slow;++perf_frames;draw_at=now;}+ eadk_timing_msleep(2);+ }+ uint32_t released=(uint32_t)eadk_timing_millis();while(eadk_keyboard_scan()&&(uint32_t)eadk_timing_millis()-released<2000)eadk_timing_msleep(10);return np_app_end();+}diff --git a/games/dune/src/render.c b/games/dune/src/render.cnew file mode 100644index 00000000..e13a7419--- /dev/null+++ b/games/dune/src/render.c@@ -0,0 +1,76 @@+#include "render.h"+#include "canvas.h"+#include <math.h>+#define WHITE 65535+#define GOLD RGB(255,222,38)+#define DARK RGB(24,28,73)+static uint8_t decoded[460];+static int16_t surface_y[320],texture_x[320];+static int floor_int(float x){int i=(int)x;return x<i?i-1:i;}+static void background_row(unsigned scene,int row){const Background*b=&backgrounds[scene];const uint8_t*p=b->data+b->offset[row];unsigned x=0;while(x<460){unsigned token=*p++,n=token>=128?token-127:token+1;if(token>=128){uint8_t v=*p++;for(unsigned i=0;i<n;i++)decoded[x++]=v;}else for(unsigned i=0;i<n;i++)decoded[x++]=*p++;}}+static void background(unsigned scene,int offset,bool dark){const Background*b=&backgrounds[scene];offset%=460;if(offset<0)offset+=460;for(int y=band;y<band+8;y++){background_row(scene,y);for(int x=0;x<320;x++){int u=x+offset;if(u>=460)u-=460;uint16_t c=b->palette[decoded[u]];strip[(y-band)*320+x]=dark?blend(DARK,c,2):c;}}}+static void button(int x,int y,int w,const char*s,bool selected){rect(x,y,w,29,selected?GOLD:DARK);center(x+w/2,y+6,s,selected?DARK:WHITE,1);}+static unsigned digits(unsigned n){unsigned count=1;while(n>=10){n/=10;++count;}return count;}+static int digit_width(unsigned n,int size){return (int)digits(n)*text_font(size)->glyphs['0'-32].advance;}+static void wallet(unsigned coins){rect(6,6,29+digit_width(coins,1),22,DARK);image(&Score_Coin,10,10,14,14);number(29,11,coins,WHITE,1,false);}+static void ball_draw(unsigned style,int cx,int cy,int size,float angle){const Image*im=balls[style];if(!ball_styles[style].rotates){image(im,cx-size/2,cy-size/2,size,size);return;}float co=cosf(angle),si=sinf(angle);int r=size/2+2;for(int y=cy-r<band?band:cy-r;y<=cy+r&&y<band+8;y++)for(int x=cx-r;x<=cx+r;x++){float dx=(x-cx)*22.f/size,dy=(y-cy)*22.f/size;int sx=(int)(11+dx*co+dy*si),sy=(int)(11-dx*si+dy*co);if((unsigned)sx<22&&(unsigned)sy<22){unsigned i=sy*22+sx,v=im->pixels[i/2],n=i&1?v&15:v>>4;if(n)pixel(x,y,im->palette[n]);}}}+static uint16_t mix_color(uint16_t a,uint16_t b,float t){unsigned n=(unsigned)(t*256);if(n>256)n=256;unsigned r=((a>>11)*(256-n)+(b>>11)*n)>>8,g=(((a>>5)&63)*(256-n)+((b>>5)&63)*n)>>8,v=((a&31)*(256-n)+(b&31)*n)>>8;return (uint16_t)((r<<11)|(g<<5)|v);}+static void trail_draw(const Game*g,unsigned style,float scale){+ const BallStyle*b=&ball_styles[style];float h=b->height*scale,w=h*g->trail_scale;if(w<1||h<1)return;+ float co=cosf(g->trail_angle),si=sinf(g->trail_angle),cx=(g->x+g->vx/75-g->camera_x)*scale,cy=(g->y+g->vy/75-g->camera_y)*scale;+ float px[3]={cx-co*w,cx-si*h*.5f,cx+si*h*.5f},py[3]={cy-si*w,cy+co*h*.5f,cy-co*h*.5f};float minx=fminf(px[0],fminf(px[1],px[2])),maxx=fmaxf(px[0],fmaxf(px[1],px[2])),miny=fminf(py[0],fminf(py[1],py[2])),maxy=fmaxf(py[0],fmaxf(py[1],py[2]));+ int x0=(int)floorf(minx)-2,x1=(int)ceilf(maxx)+2,y0=(int)floorf(miny)-3,y1=(int)ceilf(maxy)+3;if(x0<0)x0=0;if(x1>319)x1=319;if(y0<band)y0=band;if(y1>band+7)y1=band+7;+ for(int y=y0;y<=y1;y++)for(int x=x0;x<=x1;x++){+ float dx=x-cx,dy=y-cy,u=1+(dx*co+dy*si)/w,v=(-dx*si+dy*co)/h+.5f+b->offset_y*.01f;+ if(u<0||u>1||fabsf(v-.5f)>u*.5f)continue;+ if(original_ball_ids[style]==13&&u>.5f&&fabsf(v-.5f)<(u-.5f)*.75f)continue;+ uint16_t color;+ if(b->type==2)color=b->colors[((int)(u*10)+(int)(v*10))%2];+ else if(b->type==4)color=b->colors[((unsigned)(u*123)+(unsigned)(v*57))%13==0?1:0];+ else{float t=b->type==1?u:v;if(b->type==3){float rx=u-(b->offset_x?.5f+b->offset_x/(float)b->height:0),ry=v-.5f;t=sqrtf(rx*rx+ry*ry)/.8f;}if(t<0)t=0;if(t>1)t=1;+ if(b->count==1){float blend=t<.45f?t/.45f:t>.55f?(1-t)/.45f:1;color=mix_color(WHITE,b->colors[0],blend);}+ else{float p=t*(b->count-1);unsigned i=(unsigned)p;color=i>=(unsigned)b->count-1?b->colors[b->count-1]:mix_color(b->colors[i],b->colors[i+1],p-i);}+ }pixel(x,y,color);+ }+}+/* One native-size pass: no enlarged bitmap and no displaced shadow. */+static void label(const char*s,int y,uint16_t c){center(160,y,s,c,1);}+void render_invalidate(void){invalidate();}+void render(const Game*g,const Stats*s,unsigned view,unsigned selected,bool reserved,bool failed,uint32_t now,Push push){+ (void)reserved;+ unsigned scene=0,ball=s->ball<BALL_COUNT?s->ball:0;float scale=WORLD_SCALE*g->zoom;int bx=(int)((g->x-g->camera_x)*scale),by=(int)((g->y-g->camera_y)*scale),radius=(int)(28*scale);if(radius<3)radius=3;+ if(view==PLAY){for(int x=0;x<320;x++){float wx=g->camera_x+x/scale;unsigned i=game_terrain(g,wx);float y=(terrain_surface(&g->terrain[i],wx)-g->camera_y)*scale;surface_y[x]=(int16_t)(y< -1000?-1000:y>1000?1000:y);int tx=floor_int(wx*.125f)%160;texture_x[x]=(int16_t)(tx<0?tx+160:tx);}}+ for(band=0;band<240;band+=8){+ background(scene,view==PLAY?floor_int(g->camera_x*WORLD_SCALE*.1f):(int)(now/100),view!=PLAY&&view!=TITLE);+ if(view==PLAY){+ const Image*earth=earths[scene];const Landscape*l=&landscapes[scene];+ int line_y=(int)((200-g->camera_y)*scale);for(int x=0;x<320;x+=8)rect(x,line_y,4,1,WHITE);+ for(int x=0;x<320;x++){int y=surface_y[x];for(int py=y<band?band:y;py<band+8;py++){uint16_t c=l->ground;if(py-y<3)c=py==y?l->line:l->surface;else if(py-y<37){int tx=texture_x[x],ty=(py-y-3)%34;c=image_color(earth,tx,ty);}pixel(x,py,c);}}+ trail_draw(g,ball,scale);+ for(unsigned i=0;i<COIN_COUNT;i++)if(g->coins[i].active){int x=(int)((g->coins[i].x-g->camera_x)*scale),y=(int)((g->coins[i].y-g->camera_y)*scale),sz=(int)(43*scale);if(sz<5)sz=5;if(x> -sz&&x<320+sz&&y>band-sz&&y<band+8+sz)image(&Score_Coin,x-sz/2,y-sz/2,sz,sz);}+ ball_draw(ball,bx,by,radius*2,g->rotation);if(g->phase==CRASHED)circle(bx,by,2,GOLD);+ wallet(s->coins>UINT32_MAX-g->earned?UINT32_MAX:s->coins+g->earned);int score_width=digit_width(g->score,2);rect(153-score_width/2,8,14+score_width,28,DARK);number(160,13,g->score,WHITE,2,true);image(&Pause,295,12,13,13);+ if(g->popup_age){const char*msg=g->popup==4?"PERFECT SLIDE! +3":g->popup==5?"NICE SLIDE! +1":g->popup==3?"AWESOME! +3":g->popup==2?"GREAT! +2":"+1";int w=text_width(msg,1);rect(154-w/2,69,w+12,22,DARK);label(msg,74,GOLD);}+ if(g->tick<120&&s->runs<=1)label("HOLD OK TO SPEED UP",205,WHITE);+ }else if(view==TITLE){+ wallet(s->coins);int w=digit_width(s->best,1);rect(279-w,6,w+35,22,DARK);image(&crown,284-w,11,15,10);number(305-w,11,s->best,WHITE,1,false);+ center(160,48+(int)(now/600%2),"DUNE",WHITE,3);+ if(selected==0)circle(120,154,35,GOLD);else circle(200,154,35,GOLD);+ image(&PlayIcon,90,124,60,60);image(&Shop,170,124,60,60);center(120,190,"PLAY",WHITE,1);center(200,190,"SHOP",WHITE,1);+ text(10,222,"By Bobydeluxe",WHITE,1);text(230,222,"0: HOW TO",WHITE,1);+ }else if(view==SHOP||view==BUY){+ wallet(s->coins);center(172,11,"BALLS",WHITE,1);image(&Balls,279,3,26,26);+ if(selected>=BALL_COUNT)selected=0;+ for(unsigned i=0;i<BALL_COUNT;i++){int x=12+(int)(i%4)*76,y=40+(int)(i/4)*57;bool owned=shop_owned(s,false,i);rect(x,y,68,49,DARK);if(i==selected)outline(x-1,y-1,70,51,GOLD);image(balls[i],x+22,y+3,24,24);if(owned)center(x+34,y+32,s->ball==i?"EQUIPPED":"OWNED",WHITE,1);else number(x+34,y+32,ball_styles[i].price,GOLD,1,true);}+ label(ball_styles[selected].name,159,WHITE);+ unsigned price=ball_styles[selected].price;+ button(75,180,170,shop_owned(s,false,selected)?"OK: EQUIP":s->coins<price?"NOT ENOUGH COINS":"OK: BUY",true);center(160,220,"ARROWS: SELECT BACK: MENU",WHITE,1);+ if(view==BUY){rect(31,68,258,102,DARK);outline(31,68,258,102,GOLD);center(160,81,"BUY THIS ITEM?",WHITE,1);number(160,111,price,GOLD,1,true);center(160,144,"OK: BUY BACK: CANCEL",WHITE,1);}+ }else if(view==HELP){label("HOW TO PLAY",25,GOLD);label("HOLD OK, EXE OR SHIFT",68,WHITE);label("Speed up downhill. Dive in the air.",96,WHITE);label("Release uphill to take off.",122,WHITE);label("Cross the line. Land on the downslope.",148,WHITE);label("Collect coins to buy new balls.",174,WHITE);label("BACK pauses. HOME saves and exits.",199,WHITE);label("OK / BACK: RETURN",222,GOLD);+ }else if(view==PAUSE){label("PAUSED",47,GOLD);button(86,94,148,"RESUME",selected==0);button(86,134,148,"RESTART",selected==1);button(86,174,148,"MENU",selected==2);+ }else if(view==RESULT){label("GAME OVER",34,GOLD);number(160,79,g->score,WHITE,3,true);label("BEST",130,WHITE);number(160,151,s->best,GOLD,1,true);wallet(s->coins);button(41,184,112,"RETRY",selected==0);button(167,184,112,"MENU",selected==1);+ }else{label("STORAGE FULL",42,GOLD);label("Progress could not be saved.",100,WHITE);label("OK: RETRY SAVE AND EXIT",146,WHITE);label("1: KEEP PLAYING",175,WHITE);label("BACK: EXIT WITHOUT SAVING",204,WHITE);}+ if(failed&&view!=SAVE_ERROR)text(104,222,"SAVE FAILED",GOLD,1);+ present(push);+ }+}diff --git a/games/dune/src/render.h b/games/dune/src/render.hnew file mode 100644index 00000000..f74d0936--- /dev/null+++ b/games/dune/src/render.h@@ -0,0 +1,7 @@+#ifndef RENDER_H+#define RENDER_H+#include "game.h"+typedef void (*Push)(int,int,int,int,const uint16_t*);+void render(const Game*,const Stats*,unsigned,unsigned,bool,bool,uint32_t,Push);+void render_invalidate(void);+#endifdiff --git a/games/dune/src/save.c b/games/dune/src/save.cnew file mode 100644index 00000000..e01d8a67--- /dev/null+++ b/games/dune/src/save.c@@ -0,0 +1,36 @@+#include "game.h"+#include "assets.h"+#include <string.h>+static void put(uint8_t*p,uint32_t v){for(int i=0;i<4;i++)p[i]=(uint8_t)(v>>(i*8));}+static uint32_t get(const uint8_t*p){return (uint32_t)p[0]|(uint32_t)p[1]<<8|(uint32_t)p[2]<<16|(uint32_t)p[3]<<24;}+static uint32_t checksum(const uint8_t*p){uint32_t h=2166136261u;for(int i=0;i<36;i++)h=(h^p[i])*16777619u;return h;}+void save_encode(const Stats*s,uint8_t*out){+ memset(out,0,SAVE_BYTES);memcpy(out,"DUN2",4);+ put(out+4,s->best);put(out+8,s->coins);put(out+12,s->unlocked);put(out+16,s->scenes);+ put(out+20,s->runs);put(out+24,s->seed);out[28]=s->ball;out[29]=s->landscape;+ put(out+36,checksum(out));+}+bool save_decode(Stats*s,const uint8_t*p,size_t n){+ if(!p||n!=SAVE_BYTES||get(p+36)!=checksum(p))return false;+ bool legacy=memcmp(p,"DUN1",4)==0;+ if(!legacy&&memcmp(p,"DUN2",4))return false;+ Stats t={get(p+4),get(p+8),get(p+12),get(p+16),get(p+20),get(p+24),p[28],p[29]};+ if(!t.seed||!(t.unlocked&1)||!(t.scenes&1))return false;+ if(legacy){+ if(t.ball>=26||t.landscape>=7||t.unlocked>>26||t.scenes>>7||+ !(t.unlocked&(1u<<t.ball))||!(t.scenes&(1u<<t.landscape)))return false;+ uint32_t retained=0,new_mask=1,refund=0;uint8_t selected=0;+ for(unsigned i=0;i<BALL_COUNT;i++){+ unsigned original=original_ball_ids[i];retained|=1u<<original;+ if(t.unlocked&(1u<<original))new_mask|=1u<<i;+ if(t.ball==original)selected=(uint8_t)i;+ }+ /* Keep the value of removed purchases. Mountains is now free for everyone. */+ for(unsigned i=1;i<26;i++)if((t.unlocked&(1u<<i))&&!(retained&(1u<<i)))refund+=legacy_ball_prices[i];+ for(unsigned i=1;i<7;i++)if(t.scenes&(1u<<i))refund+=legacy_scene_prices[i];+ t.coins=UINT32_MAX-t.coins<refund?UINT32_MAX:t.coins+refund;+ t.unlocked=new_mask;t.ball=selected;t.scenes=1;t.landscape=0;+ }else if(t.ball>=BALL_COUNT||t.landscape||t.scenes!=1||t.unlocked>>BALL_COUNT||+ !(t.unlocked&(1u<<t.ball)))return false;+ *s=t;return true;+}diff --git a/games/dune/tests/fidelity.c b/games/dune/tests/fidelity.cnew file mode 100644index 00000000..48fd8332--- /dev/null+++ b/games/dune/tests/fidelity.c@@ -0,0 +1,8 @@+#include "game.h"+#include <assert.h>+#include <math.h>+#include <stdio.h>+static FILE*f;+static float read_float(void){float v;assert(fread(&v,4,1,f)==1);return v;}+int main(void){f=fopen("reference.bin","rb");assert(f);float worst=0;for(unsigned i=0;i<100;i++){Terrain t={0};float a=read_float(),b=read_float(),c=read_float(),flat=read_float(),width=read_float();terrain_shape(&t,a,b,c,flat!=0);assert(fabsf(t.width-width)<.001f);for(unsigned n=0;n<=63;n++){float expected=read_float();float x=t.raw_width*n/90.f,y=terrain_surface(&t,x)-392.5f,error=fabsf(y-expected);if(error>worst)worst=error;assert(error<.001f);if(n%8==0)assert(fabsf(t.contact[n/8]-407.5f-expected)<.001f);}}+ for(unsigned i=0;i<1000;i++){Game g={0};g.vx=read_float();g.vy=read_float();g.grounded=read_float()!=0;bool held=read_float()!=0;float x=read_float(),y=read_float();game_input(&g,held);assert(fabsf(g.vx-x)<.001f&&fabsf(g.vy-y)<.001f);}fclose(f);printf("PASS: 100 original terrain curves + contact meshes (error %.7f), 1000 original control samples\n",worst);return 0;}diff --git a/games/dune/tests/reference.cjs b/games/dune/tests/reference.cjsnew file mode 100644index 00000000..a85f5926--- /dev/null+++ b/games/dune/tests/reference.cjs@@ -0,0 +1,22 @@+/* Compare native controls and collision terrain with the pinned original JS. */+const fs=require('fs'),vm=require('vm'),crypto=require('crypto'),path=require('path');+const root=path.resolve(__dirname,'..'),file=process.argv[2]||path.resolve(root,'../../build/dune-reference/js/game.js');+const source=fs.readFileSync(file,'utf8'),provenance=JSON.parse(fs.readFileSync(path.join(root,'assets/provenance.json'),'utf8'));+if(crypto.createHash('sha256').update(source).digest('hex')!==provenance.javascript_sha256)throw Error('Wrong source revision');+const terrainCode=source.slice(source.indexOf('function CreateTerrainSegment('),source.indexOf('function ReskinSegment('));+const inputStart=source.indexOf('update: function () {',source.indexOf('var InputHandler ='));+const inputCode='({'+source.slice(inputStart,source.indexOf(' OnDown: function',inputStart)).trim().replace(/,$/,'')+'})';+const values=[];let seed=1234567;function rand(){seed^=seed<<13;seed^=seed>>>17;seed^=seed<<5;return ((seed>>>0)>>>8)/16777216;}+for(let i=0;i<100;i++){+ const r=[rand(),rand(),rand()],flat=i%11===0,q=[...r];const math=Object.create(Math);math.random=()=>q.shift();+ const ctx={TERRAIN_RES_FACTOR:1,Math:math,currentLevel:0,DrawTerrainToBitmap(){},makeSprite:()=>({}),game:{add:{bitmapData:()=>({generateTexture(){}})},rnd:{uuid:()=>''}}};+ vm.runInNewContext('Array.prototype.last=function(){return this[this.length-1]};'+terrainCode,ctx);+ const t=ctx.CreateTerrainSegment(false,flat,0);values.push(...r,+flat,t.width);+ for(let n=0;n<=63;n++)values.push(t.points[n].y);+}+for(let i=0;i<1000;i++){+ const vx=Math.fround(rand()*4000),vy=Math.fround(rand()*6000-2500),grounded=i%2===0,held=i%7!==0;+ const ctx={levelRunning:true,gameRunning:true,clickValid:true,ballMoveInput:false,cursors:{right:{justDown:false,isDown:held}},game:{input:{activePointer:{isDown:false}}},ball:{body:{velocity:{x:vx,y:vy}},touchingGround:grounded},currentTerrain:{curveFunction:()=>({x:1,y:2})},BallOnCurrentTerrainNormalized:()=>.7};+ const update=vm.runInNewContext(inputCode,ctx).update;update();values.push(vx,vy,+grounded,+held,ctx.ball.body.velocity.x,ctx.ball.body.velocity.y);+}+const bytes=Buffer.alloc(values.length*4);values.forEach((v,i)=>bytes.writeFloatLE(v,i*4));fs.mkdirSync(path.join(root,'output'),{recursive:true});fs.writeFileSync(path.join(root,'output/reference.bin'),bytes);console.log('Actual source: 100 terrains and 1000 control samples');diff --git a/games/dune/tests/test.c b/games/dune/tests/test.cnew file mode 100644index 00000000..896a27f1--- /dev/null+++ b/games/dune/tests/test.c@@ -0,0 +1,47 @@+#include "game.h"+#include "assets.h"+#include "render.h"+#include <assert.h>+#include <math.h>+#include <stdio.h>+#include <string.h>+static uint16_t frame[320*240];+static void push(int x,int y,int w,int h,const uint16_t*p){assert(x>=0&&y>=0&&x+w<=320&&y+h<=240);for(int j=0;j<h;j++)memcpy(frame+(y+j)*320+x,p+j*w,w*2);}+static void screenshot(const char*name,Game*g,Stats*s,unsigned view,unsigned selected,bool scenes){render_invalidate();render(g,s,view,selected,scenes,false,400,push);FILE*f=fopen(name,"wb");assert(f);fprintf(f,"P6\n320 240\n255\n");for(int i=0;i<320*240;i++){uint16_t c=frame[i];uint8_t p[3]={(c>>11)*255/31,((c>>5)&63)*255/63,(c&31)*255/31};fwrite(p,1,3,f);}fclose(f);}+static Stats fresh_stats(void){return (Stats){.unlocked=1,.scenes=1,.seed=1234567};}+static void legacy_save(const Stats*s,uint8_t*out){save_encode(s,out);memcpy(out,"DUN1",4);uint32_t hash=2166136261u;for(unsigned i=0;i<36;i++)hash=(hash^out[i])*16777619u;for(unsigned i=0;i<4;i++)out[36+i]=(uint8_t)(hash>>(i*8));}+int main(void){+ Stats s=fresh_stats(),decoded={0};uint8_t bytes[SAVE_BYTES];save_encode(&s,bytes);assert(save_decode(&decoded,bytes,sizeof bytes));for(unsigned i=0;i<sizeof bytes;i++){bytes[i]^=1;assert(!save_decode(&decoded,bytes,sizeof bytes));bytes[i]^=1;}assert(!save_decode(&decoded,NULL,0));+ assert(!save_decode(&decoded,bytes,SAVE_BYTES-1));Stats invalid=s;invalid.ball=26;save_encode(&invalid,bytes);assert(!save_decode(&decoded,bytes,sizeof bytes));invalid=s;invalid.ball=1;save_encode(&invalid,bytes);assert(!save_decode(&decoded,bytes,sizeof bytes));invalid=s;invalid.landscape=1;save_encode(&invalid,bytes);assert(!save_decode(&decoded,bytes,sizeof bytes));invalid=s;invalid.seed=0;save_encode(&invalid,bytes);assert(!save_decode(&decoded,bytes,sizeof bytes));+ assert(!shop_buy(&s,false,1));s.coins=50000;for(unsigned i=0;i<BALL_COUNT;i++){unsigned before=s.coins;assert(shop_buy(&s,false,i));assert(shop_owned(&s,false,i));assert(s.coins==before-ball_styles[i].price);assert(shop_buy(&s,false,i)&&s.coins==before-ball_styles[i].price);}assert(shop_buy(&s,true,0));assert(!shop_buy(&s,false,BALL_COUNT)&&!shop_buy(&s,true,1));save_encode(&s,bytes);assert(save_decode(&decoded,bytes,sizeof bytes));assert(decoded.ball==6&&decoded.landscape==0);+ uint32_t refund=0;for(unsigned i=1;i<26;i++){bool retained=false;for(unsigned j=0;j<BALL_COUNT;j++)retained|=original_ball_ids[j]==i;if(!retained)refund+=legacy_ball_prices[i];}for(unsigned i=1;i<7;i++)refund+=legacy_scene_prices[i];+ for(unsigned original=0;original<26;original++){+ Stats old={.best=987,.coins=123,.unlocked=(1u<<26)-1,.scenes=127,.runs=42,.seed=1234,.ball=original,.landscape=6};legacy_save(&old,bytes);assert(save_decode(&decoded,bytes,sizeof bytes));unsigned equipped=0;for(unsigned i=0;i<BALL_COUNT;i++)if(original_ball_ids[i]==original)equipped=i;+ assert(decoded.coins==123+refund&&decoded.best==987&&decoded.runs==42&&decoded.seed==1234&&decoded.ball==equipped&&decoded.unlocked==127&&decoded.landscape==0&&decoded.scenes==1);+ save_encode(&decoded,bytes);assert(!memcmp(bytes,"DUN2",4));Stats again;assert(save_decode(&again,bytes,sizeof bytes)&&again.coins==decoded.coins);+ }+ Stats old={.best=987,.coins=123,.unlocked=(1u<<26)-1,.scenes=127,.runs=42,.seed=1234,.ball=23,.landscape=6};legacy_save(&old,bytes);FILE*legacy=fopen("legacy-save.bin","wb");fwrite(bytes,1,sizeof bytes,legacy);fclose(legacy);+ old.coins=UINT32_MAX-1;legacy_save(&old,bytes);assert(save_decode(&decoded,bytes,sizeof bytes)&&decoded.coins==UINT32_MAX);+ Game g;game_new(&g,1234567);for(unsigned i=0;i<120;i++)game_step(&g,false);assert(fabsf(g.x-700)<.01f&&g.grounded&&game_valid(&g));float atrest=g.x;for(unsigned i=0;i<60;i++)game_step(&g,true);assert(g.x>atrest+100);+ unsigned deaths=0,score=0,coins=0,frames=0,longest=0,maxterrain=0;float maxspeed=0;+ for(unsigned seed=1;seed<=120;seed++){+ game_new(&g,seed*98765);unsigned t;+ for(t=0;t<9000&&g.phase==RUNNING;t++){+ unsigned id=game_terrain(&g,g.x);float u=terrain_u(&g.terrain[id],g.x);bool held=seed%3==0?true:seed%3==1?g.vy>0||g.vx<300:g.vy>100||(g.grounded&&u<.45f)||g.vx<200;+ game_step(&g,held);assert(game_valid(&g));if(g.vx>maxspeed)maxspeed=g.vx;++frames;+ if(seed==2&&t==220){FILE*f=fopen("fixture.bin","wb");fwrite(&g,1,sizeof g,f);fclose(f);Stats st=fresh_stats();screenshot("gameplay.ppm",&g,&st,PLAY,0,false);}+ }+ if(g.phase==CRASHED)++deaths;+ if(t>longest)longest=t;+ if(g.score>score)score=g.score;+ if(g.earned>coins)coins=g.earned;+ if(g.terrains>maxterrain)maxterrain=g.terrains;+ }+ printf("playability: deaths %u score %u coins %u frames %u longest %u terrain %u speed %.1f\n",deaths,score,coins,frames,longest,maxterrain,maxspeed);+ assert(deaths>10&&score>5&&coins>0&&maxterrain>3);+ game_new(&g,1234);g.coins[0]=(Coin){g.x,g.y,1};game_step(&g,false);assert(g.earned==1);game_finish(&s,&g);assert(s.best>=g.score);+ game_new(&g,1234);g.x+=100000;for(unsigned i=0;i<9;i++)g.terrain[i].x+=100000;for(unsigned i=0;i<COIN_COUNT;i++)g.coins[i].x+=100000;game_step(&g,false);assert(g.x<100000&&game_valid(&g));+ game_new(&g,1234);g.x=1300;g.y=300;g.zoom=1;g.camera_x=g.x-300;g.camera_y=100;g.phase=CRASHED;g.trail_scale=4.5f;g.trail_angle=-.6f;g.vx=4000;g.vy=1000;for(unsigned i=0;i<COIN_COUNT;i++)g.coins[i]=(Coin){g.camera_x+40+(i%8)*95.f,110+(i/8)*125.f,1};FILE*stress=fopen("stress.bin","wb");fwrite(&g,1,sizeof g,stress);fclose(stress);+ s=fresh_stats();game_new(&g,s.seed);screenshot("title.ppm",&g,&s,TITLE,0,false);screenshot("shop.ppm",&g,&s,SHOP,5,false);screenshot("help.ppm",&g,&s,HELP,0,false);+ FILE*f=fopen("host-report.json","w");fprintf(f,"{\"simulation_frames\":%u,\"seeds\":120,\"deaths\":%u,\"max_score\":%u,\"max_coins\":%u,\"recycled_terrains\":%u,\"longest_frames\":%u,\"game_bytes\":%u,\"stats_bytes\":%u,\"legacy_refund\":%u,\"retained_balls\":7,\"retained_original_landscape\":2}\n",frames,deaths,score,coins,maxterrain,longest,(unsigned)sizeof g,(unsigned)sizeof s,refund);fclose(f);puts("PASS: physics, seven balls, Mountains, original save migration and no duplicate refunds");return 0;+}diff --git a/games/dune/tests/test_arm.py b/games/dune/tests/test_arm.pynew file mode 100644index 00000000..4e74e672--- /dev/null+++ b/games/dune/tests/test_arm.py@@ -0,0 +1,125 @@+#!/usr/bin/env python3+"""Actual ARM .nwa tests: three calculator profiles, physics, save/reload and safe exit.+Requires the repository emulator's dependencies (Unicorn, pyelftools, Pillow).+"""+import argparse+import io+import json+import os+from pathlib import Path+import re+import shlex+import struct+import tempfile+import types++ROOT = Path(__file__).resolve().parents[1]+REPO = ROOT.parents[1]+emu_path = REPO/'tools/emu.py'+emu = types.ModuleType('arcade_emu');emu.__file__=str(emu_path);emu.io=io+source = emu_path.read_text().replace('ELFFile(open(elf, "rb"))','ELFFile(io.BytesIO(open(elf, "rb").read()))')+source = source.replace('cmd = [nwlink, "nwa-elf",','cmd = nwlink + ["nwa-elf",')+source = source.replace('chunk = CPU_HZ // 1000','chunk = CPU_HZ // 10000')+source = source.replace('self.now_ms += 1\n','self.now_ms += 0.1\n')+source = source.replace(' next_frame = self.now_ms if frame_ms else None',+ ' self.checkpoint = until_ms\n next_frame = self.now_ms if frame_ms else None')+source = source.replace(' self.slept_ms += r0\n',+ ' self.slept_ms += r0\n if self.now_ms >= self.checkpoint: uc.emu_stop()\n')+exec(compile(source,str(emu_path),'exec'),emu.__dict__)++def presses(*items):+ return [(t,t+d,emu.KEYS[k]) for t,k,d in items]++def storage(path,items):+ data=bytearray(emu.STORAGE_SIZE);offset=0+ for name,value in items:+ record=name.encode()+b'\0'+value;size=2+len(record)+ struct.pack_into('<H',data,offset,size);data[offset+2:offset+size]=record;offset+=size+ assert offset+2<=len(data)+ path.write_bytes(data)++def records(data):+ result={};offset=0+ while offset+2<=len(data):+ n=struct.unpack_from('<H',data,offset)[0]+ if not n:break+ assert n>=3 and offset+n<=len(data)+ name,value=data[offset+2:offset+n].split(b'\0',1);result[name.decode()]=value;offset+=n+ return result++def check_exit(c,upsilon=False):+ assert c.exited,'App did not exit'+ assert not c.violations,sorted(set(c.violations))+ assert not c.firmware_ram_changes(),'Firmware RAM changed'+ assert c.app_ram_clean(),'App RAM not cleared'+ assert c.locks==0 and c.max_locks==(0 if upsilon else 1)+ assert c.stack_used()<4096,c.stack_used()++def uint(c,name):+ return struct.unpack('<I',bytes(c.uc.mem_read(c.symbols[name],4)))[0]++def main():+ ap=argparse.ArgumentParser(description=__doc__);ap.add_argument('--nwlink',default='nwlink');a=ap.parse_args()+ nw=['node',a.nwlink] if Path(a.nwlink).is_file() and not a.nwlink.endswith(('.exe','.cmd')) else shlex.split(a.nwlink)+ slug=ROOT.name;dune=slug=='dune';out=ROOT/'output/arm';out.mkdir(parents=True,exist_ok=True);tempfile.tempdir=str(out)+ host=json.loads((ROOT/'output/host-report.json').read_text());size=host['game_bytes'];stats_size=host['stats_bytes']+ nwa=str(ROOT/f'output/{slug}-debug.nwa');report=[];sentinel=b'print(42)\n';save_size=40 if dune else 24+ profiles=[('n0120','n0120','epsilon',153676),('n0110','n0110','epsilon',148928),('n0115','n0110','epsilon',133652),('upsilon','n0110','upsilon',107674)]+ for profile,model,system,ram in profiles:+ emu.configure(model,system,ram);st=out/(profile+'.bin');storage(st,[('keep.py',sentinel)])+ c=emu.Calculator(nwa,storage_file=str(st),nwlink=nw);c.enable_checks()+ c.keys=presses((300,'ok',80),(500,'ok',180),(850,'back',80),(1750,'back',80),(2400,'home',180))+ c.run(250);c.save_png(str(out/(profile+'-title.png')))+ c.run(1200);assert uint(c,'current_view')==2,('Pause menu did not open',uint(c,'current_view'))+ c.save_png(str(out/(profile+'-pause.png')));before=bytes(c.uc.mem_read(c.symbols['game'],size));c.run(1600)+ assert bytes(c.uc.mem_read(c.symbols['game'],size))==before,'Pause advanced physics'+ c.run(2100);c.save_png(str(out/(profile+'-play.png')))+ frames=uint(c,'perf_frames');slowest=uint(c,'perf_max');slow=uint(c,'perf_slow')+ c.run(3000);check_exit(c,system=='upsilon');r=records(st.read_bytes())+ assert r['keep.py']==sentinel and len(r[slug+'.sav'])==save_size+ expected=r[slug+'.sav'][4:4+(26 if dune else 16)]+ d=emu.Calculator(nwa,storage_file=str(st),nwlink=nw);d.enable_checks();d.keys=presses((400,'onoff',150));d.run(250)+ assert bytes(d.uc.mem_read(d.symbols['stats'],len(expected)))==expected,'Saved progress was not restored'+ d.run(900);check_exit(d,system=='upsilon');assert records(st.read_bytes())['keep.py']==sentinel+ report.append(dict(profile=profile,pause_save_reload_exit='pass',stack_bytes=max(c.stack_used(),d.stack_used()),frames=frames,slowest_draw_ms=slowest,frames_over_33ms=slow));print(profile,report[-1],flush=True)+ emu.configure();c=emu.Calculator(nwa,nwlink=nw);c.enable_checks();c.keys=presses((200,'ok',60));c.run(400)+ for i in range(7):+ fixture=(ROOT/('output/stress.bin' if dune else f'output/fixture{i}.bin')).read_bytes();assert len(fixture)==size+ c.uc.mem_write(c.symbols['game'],fixture)+ c.uc.mem_write(c.symbols['stats'],struct.pack('<IIIIIIBBxx',100,50000,127,1,1,1234,i,0))+ c.run(c.now_ms+75);assert not c.violations,sorted(set(c.violations))+ c.save_png(str(out/f'scene{i}.png'))+ if not dune:+ c.uc.mem_write(c.symbols['game'],(ROOT/'output/stress.bin').read_bytes());c.run(c.now_ms+180);assert not c.violations+ report.append(dict(scenes='7 retained balls, original landscape 2 (Mountains)',slowest_draw_ms=uint(c,'perf_max'),stack_bytes=c.stack_used()))+ c.keys=presses((c.now_ms+100,'home',180));c.run(c.now_ms+700);check_exit(c)+ # Purchases, cancellation, equipped cosmetics and insufficient-funds path.+ c=emu.Calculator(nwa,nwlink=nw);c.enable_checks();c.keys=presses((200,'right',60),(400,'ok',60),(600,'right',60),(800,'ok',60));c.run(1000)+ assert uint(c,'current_view')==4 and uint(c,'stats')==0+ c.uc.mem_write(c.symbols['stats']+4,struct.pack('<I',200));now=c.now_ms+ c.keys=presses((now+100,'ok',60),(now+350,'back',60),(now+600,'ok',60),(now+850,'ok',60));c.run(now+500)+ assert uint(c,'current_view')==4 and struct.unpack('<I',bytes(c.uc.mem_read(c.symbols['stats']+4,4)))[0]==200+ c.run(now+1100);assert uint(c,'current_view')==4+ assert struct.unpack('<II',bytes(c.uc.mem_read(c.symbols['stats']+4,8)))==(100,3)+ assert bytes(c.uc.mem_read(c.symbols['stats']+24,1))==bytes([1])+ now=c.now_ms;c.keys=presses((now+100,'shift',60),(now+350,'0',60),(now+600,'left',60),(now+850,'ok',60));c.run(now+1100)+ assert uint(c,'current_view')==4+ assert struct.unpack('<I',bytes(c.uc.mem_read(c.symbols['stats']+4,4)))[0]==100+ assert bytes(c.uc.mem_read(c.symbols['stats']+24,2))==bytes([0,0]);c.save_png(str(out/'shop-purchased.png'))+ c.keys=presses((c.now_ms+100,'home',180));c.run(c.now_ms+600);check_exit(c)+ report.append(dict(shop='Seven balls only: insufficient funds, cancel, purchase and free equip pass; no landscape category'))+ st=out/'legacy.bin';legacy=(ROOT/'output/legacy-save.bin').read_bytes();storage(st,[('keep.py',sentinel),('dune.sav',legacy)])+ for attempt in range(2):+ c=emu.Calculator(nwa,storage_file=str(st),nwlink=nw);c.enable_checks();c.keys=presses((500,'home',150));c.run(250)+ assert uint(c,'stats')==987+ assert struct.unpack('<I',bytes(c.uc.mem_read(c.symbols['stats']+4,4)))[0]==123+host['legacy_refund']+ assert bytes(c.uc.mem_read(c.symbols['stats']+24,2))==bytes([6,0])+ c.run(1000);check_exit(c);saved=records(st.read_bytes());assert saved['keep.py']==sentinel and saved['dune.sav'][:4]==b'DUN2'+ report.append(dict(migration='DUN1 -> DUN2: retained ball mapped, old purchases refunded once, other files preserved'))+ st=out/'full.bin';payload=b'x'*(emu.STORAGE_SIZE-2-2-len('keep.py')-1);storage(st,[('keep.py',payload)])+ c=emu.Calculator(nwa,storage_file=str(st),nwlink=nw);c.enable_checks();c.keys=presses((400,'home',180),(1100,'1',80),(1600,'home',100),(2200,'back',80))+ c.run(900);assert not c.exited and uint(c,'current_view')==6;c.save_png(str(out/'storage-full.png'));c.run(1400);assert not c.exited;c.run(2800);check_exit(c)+ assert records(st.read_bytes())=={'keep.py':payload};report.append(dict(full_storage='continue and exit preserve other files'))+ c=emu.Calculator(nwa,nwlink=nw);c.enable_checks();c.keys=presses((0,'ok',600),(850,'home',180));c.run(700);assert uint(c,'current_view')==0;c.run(1500);check_exit(c)+ (out/'report.json').write_text(json.dumps(report,indent=2)+'\n');print(json.dumps(report,indent=2))+if __name__=='__main__':main()diff --git a/games/dune/tests/test_assets.py b/games/dune/tests/test_assets.pynew file mode 100644index 00000000..e2733baa--- /dev/null+++ b/games/dune/tests/test_assets.py@@ -0,0 +1,35 @@+#!/usr/bin/env python3+"""Verify the sole retained Mountains background, catalog and packed rows."""+from pathlib import Path+import re,json+from PIL import Image,ImageChops,ImageStat+ROOT=Path(__file__).resolve().parents[1]+source=(ROOT/'src/assets.c').read_text()+def array(name):return list(map(int,re.search(r'\b'+name+r'\[\]=\{([^}]+)\}',source,re.S)[1].replace('\n','').strip(',').split(',')))+def rgb(c):return ((c[0]>>3)<<11)|((c[1]>>2)<<5)|(c[2]>>3)+errors=[]+catalog=json.loads((ROOT/'assets/catalog.json').read_text())+assert len(catalog['balls'])==7 and len(catalog['landscapes'])==1+assert catalog['landscapes'][0]['original_id']==1 and catalog['landscapes'][0]['name']=='Mountains'+assert len(list((ROOT/'assets').glob('background*.png')))==1+for scene in range(1):+ im=Image.open(ROOT/'assets/background1.png').convert('RGB')+ expected=im.quantize(colors=32,method=Image.Quantize.MEDIANCUT,dither=Image.Dither.NONE)+ data=array(f'bg{scene}_rle');offsets=array(f'bg{scene}_offset');pal=array(f'bg{scene}_pal');pixels=[]+ for y in range(240):+ i=offsets[y];row=[]+ while len(row)<460:+ token=data[i];i+=1+ if token>=128:row.extend([data[i]]*(token-127));i+=1+ else:row.extend(data[i:i+token+1]);i+=token+1+ assert len(row)==460 and max(row)<32+ if y<239:assert i==offsets[y+1]+ else:assert i==len(data)+ pixels.extend(row)+ assert pixels==list(expected.getdata())+ raw=expected.getpalette();assert pal==[rgb(raw[j*3:j*3+3]) for j in range(32)]+ baseline=im.quantize(colors=64,method=Image.Quantize.MEDIANCUT,dither=Image.Dither.NONE).convert('RGB')+ error=ImageStat.Stat(ImageChops.difference(expected.convert('RGB'),baseline)).mean+ errors.append(sum(error)/3)+print('PASS: 110400 Mountains pixels, seven balls, bounded RLE rows, exact RGB565 palettes')+print('Mean RGB channel difference vs 64-colour baseline:',round(sum(errors),3),'/ 255')diff --git a/games/dune/tools/assets.py b/games/dune/tools/assets.pynew file mode 100644index 00000000..f5b8088a--- /dev/null+++ b/games/dune/tools/assets.py@@ -0,0 +1,69 @@+#!/usr/bin/env python3+"""Reproducible compact assets; no web engine is shipped in the application."""+import json+from pathlib import Path+from PIL import Image+ROOT=Path(__file__).resolve().parents[1]+def rgb(c):return ((c[0]>>3)<<11)|((c[1]>>2)<<5)|(c[2]>>3)+def arr(f,typ,name,values):+ f.write('const '+typ+' '+name+'[]={\n')+ for i in range(0,len(values),24):f.write(','.join(str(x) for x in values[i:i+24])+',\n')+ f.write('};\n')+def image(f,name,im):+ im=im.convert('RGBA'); colors=im.convert('RGB').quantize(colors=15,method=Image.Quantize.MEDIANCUT)+ pal=colors.getpalette()+[0]*768; palette=[0]+[rgb(pal[i*3:i*3+3]) for i in range(15)]+ p=[0 if a<96 else c+1 for c,(_,_,_,a) in zip(colors.getdata(),im.getdata())]+ arr(f,'uint16_t',name+'_pal',palette)+ arr(f,'uint8_t',name+'_pix',[(p[i]<<4)|(p[i+1] if i+1<len(p) else 0) for i in range(0,len(p),2)])+ f.write('const Image '+name+'={'+str(im.width)+','+str(im.height)+','+name+'_pix,'+name+'_pal};\n')+def font(f):+ fonts=json.loads((ROOT/'assets/ui-fonts.json').read_text(encoding='utf8'))+ for i,font in enumerate(fonts):+ arr(f,'uint8_t',f'font{i}_pixels',list(bytes.fromhex(font['pixels'])))+ f.write(f'const Glyph font{i}_glyphs[]={{\n')+ for glyph in font['glyphs']:f.write('{'+','.join(map(str,glyph))+'},\n')+ f.write('};\n')+ f.write('const Font fonts[]={'+','.join('{font'+str(i)+'_glyphs,font'+str(i)+'_pixels}' for i in range(3))+'};\n')+def main():+ with (ROOT/'src/assets.c').open('w',encoding='utf8',newline='\n') as f:+ f.write('#include "assets.h"\n');font(f)+ catalog=json.loads((ROOT/'assets/catalog.json').read_text())+ entries=[]+ for i,b in enumerate(catalog['balls']):+ name='ball'+str(i);image(f,name,Image.open(ROOT/'assets/sprites'/('B_'+b['name'].replace(' ','_')+'.png')));entries.append('&'+name)+ f.write('const Image *const balls[]={'+','.join(entries)+'};\n')+ for name in ('PLAY','Shop','Score_Coin','crown','Pause','Balls'):+ image(f,'PlayIcon' if name=='PLAY' else name,Image.open(ROOT/'assets/sprites'/(name+'.png')))+ f.write('const BallStyle ball_styles[]={\n')+ for b in catalog['balls']:+ t=b['trailData'];cols=[rgb(tuple(bytes.fromhex(c[1:]))) for c in t['colors']]+ f.write('{.name='+json.dumps(b['name'].replace('_',' '))+',.price='+str(b['price'])+',.colors={'+','.join(map(str,cols))+'},.rotates='+str(int(b['rotates']))+',.type='+str(t['gradient_type'])+',.count='+str(len(cols))+',.height='+str(t.get('height',56))+',.offset_x='+str(t.get('gradient_offsetX',0))+',.offset_y='+str(round(t.get('offsetY',0)*100))+'},\n')+ f.write('};\nconst Landscape landscapes[]={\n')+ for b in catalog['landscapes']:+ f.write('{'+json.dumps(b['name'])+','+str(b['price'])+','+','.join(str(rgb(tuple(bytes.fromhex(b[k][1:])))) for k in ['surfaceColor','lineColor','groundColor'])+'},\n')+ f.write('};\n')+ for i,scene in enumerate(catalog['landscapes']):+ original=scene['original_id']+ image(f,'earth'+str(i),Image.open(ROOT/f'assets/earth{original}.png'))+ im=Image.open(ROOT/f'assets/background{original}.png').convert('RGB').quantize(colors=32,method=Image.Quantize.MEDIANCUT,dither=Image.Dither.NONE)+ pal=im.getpalette()+[0]*768;arr(f,'uint16_t',f'bg{i}_pal',[rgb(pal[j*3:j*3+3]) for j in range(32)])+ data=[];offsets=[];px=list(im.getdata())+ for y in range(240):+ offsets.append(len(data));row=px[y*460:(y+1)*460];x=0+ while x<460:+ end=x+1+ while end<460 and row[end]==row[x] and end-x<128:end+=1+ if end-x>=3:data.extend([127+end-x,row[x]]);x=end+ else:+ start=x;x=end+ while x<460 and x-start<128:+ if x+2<460 and row[x]==row[x+1]==row[x+2]:break+ x+=1+ data.extend([x-start-1]+row[start:x])+ arr(f,'uint32_t',f'bg{i}_offset',offsets);arr(f,'uint8_t',f'bg{i}_rle',data)+ f.write('const Image *const earths[]={'+','.join('&earth'+str(i) for i in range(len(catalog['landscapes'])))+'};\n')+ f.write('const Background backgrounds[]={'+','.join('{bg'+str(i)+'_rle,bg'+str(i)+'_pal,bg'+str(i)+'_offset}' for i in range(len(catalog['landscapes'])))+'};\n')+ legacy=json.loads((ROOT/'assets/legacy-shop.json').read_text())+ arr(f,'uint8_t','original_ball_ids',[b['original_id'] for b in catalog['balls']])+ arr(f,'uint16_t','legacy_ball_prices',legacy['ball_prices']);arr(f,'uint16_t','legacy_scene_prices',legacy['scene_prices'])+if __name__=='__main__':main()diff --git a/games/dune/tools/compact_nwa.py b/games/dune/tools/compact_nwa.pynew file mode 100644index 00000000..f320bb54--- /dev/null+++ b/games/dune/tools/compact_nwa.py@@ -0,0 +1,228 @@+#!/usr/bin/env python3+"""Lossless standalone NWA packing. Python standard library + ARM binutils.++Keep the standard ELF/NWI formats: no runtime decoder, extra RAM, or archive.+"""+import argparse+from bisect import bisect_left, insort+import json+from pathlib import Path+import subprocess+import tempfile++ICON_BYTES = 55 * 56 * 2+++def decode_lz4(data, expected_size):+ """Decode a raw LZ4 block, with an exact output bound for launcher icons."""+ out = bytearray()+ pos = 0++ def length(value):+ nonlocal pos+ if value == 15:+ while True:+ if pos >= len(data):+ raise ValueError('Truncated LZ4 length')+ extra = data[pos]+ pos += 1+ value += extra+ if extra != 255:+ break+ return value++ while pos < len(data):+ token = data[pos]+ pos += 1+ size = length(token >> 4)+ if pos + size > len(data) or len(out) + size > expected_size:+ raise ValueError('Invalid LZ4 literal run')+ out += data[pos:pos + size]+ pos += size+ if pos == len(data):+ break+ if pos + 2 > len(data):+ raise ValueError('Truncated LZ4 offset')+ distance = data[pos] | data[pos + 1] << 8+ pos += 2+ size = length(token & 15) + 4+ if not distance or distance > len(out) or len(out) + size > expected_size:+ raise ValueError('Invalid LZ4 match')+ for _ in range(size):+ out.append(out[-distance])+ if len(out) != expected_size:+ raise ValueError('Unexpected decoded icon size')+ return bytes(out)+++def _extension_cost(value, threshold):+ return 0 if value < threshold else 1 + (value - threshold) // 255+++def compress_lz4(data):+ """Find a minimum-size raw LZ4 parse for a small (<= 65535 byte) image.++ A suffix array finds the longest legal previous match. Dynamic programming+ chooses literal/match lengths, including extension-byte costs. The final+ five bytes are literals; the last match starts at least twelve bytes from+ the end, as required by standard LZ4 block decoders.+ """+ n = len(data)+ if n > 65535:+ raise ValueError('Only small build-time assets are supported')+ if not n:+ return b'\0'+ suffixes = sorted(range(n), key=lambda i: data[i:])+ rank = [0] * n+ for r, pos in enumerate(suffixes):+ rank[pos] = r+ seen = []+ matches = [(0, 0)] * n+ for i in range(n - 11):+ r = rank[i]+ at = bisect_left(seen, r)+ best, distance = 0, 0+ # Among earlier suffixes, a lexicographic neighbour has the longest+ # common prefix. Overlapping matches are legal in LZ4.+ for q in seen[max(0, at - 1):at + 1]:+ j = suffixes[q]+ lo, hi = 0, n - i - 5+ while lo < hi:+ mid = (lo + hi + 1) // 2+ if data[i:i + mid] == data[j:j + mid]:+ lo = mid+ else:+ hi = mid - 1+ if lo > best:+ best, distance = lo, i - j+ matches[i] = best, distance+ insort(seen, r)++ dp = [0] * (n + 1)+ plan = [None] * n+ match_cost = [0] * n+ match_length = [0] * n+ starts = []+ for i in range(n - 1, -1, -1):+ best = n - i + 1 + _extension_cost(n - i, 15)+ longest, _ = matches[i]+ if longest >= 4:+ cost, size = min((2 + _extension_cost(size, 19) + dp[i + size], size)+ for size in range(4, longest + 1))+ match_cost[i], match_length[i] = cost, size+ starts.append(i)+ for j in reversed(starts):+ literal = j - i+ if literal + 3 >= best:+ break+ cost = 1 + literal + _extension_cost(literal, 15) + match_cost[j]+ if cost < best:+ best = cost+ plan[i] = j, match_length[j], matches[j][1]+ dp[i] = best++ out = bytearray()++ def emit_length(value):+ while value >= 255:+ out.append(255)+ value -= 255+ out.append(value)++ anchor = 0+ while anchor < n:+ entry = plan[anchor]+ if entry is None:+ literal = n - anchor+ out.append(min(literal, 15) << 4)+ if literal >= 15:+ emit_length(literal - 15)+ out += data[anchor:]+ break+ j, size, distance = entry+ literal = j - anchor+ out.append(min(literal, 15) << 4 | min(size - 4, 15))+ if literal >= 15:+ emit_length(literal - 15)+ out += data[anchor:j]+ out += bytes((distance & 255, distance >> 8))+ if size >= 19:+ emit_length(size - 19)+ anchor = j + size+ if len(out) != dp[0] or decode_lz4(out, n) != data:+ raise ValueError('Lossless compression verification failed')+ return bytes(out)+++def compact_icon(source, output, objcopy):+ output.parent.mkdir(parents=True, exist_ok=True)+ with tempfile.TemporaryDirectory(dir=output.parent) as folder:+ folder = Path(folder)+ original, packed, obj = folder/'original.nwi', folder/'packed.nwi', folder/'icon.o'+ section = '.rodata.eadk_app_icon'+ subprocess.run([objcopy, '--dump-section=' + section + '=' + str(original),+ str(source), str(obj)], check=True)+ before = original.read_bytes()+ pixels = decode_lz4(before, ICON_BYTES)+ after = compress_lz4(pixels)+ if len(after) > len(before):+ after = before+ packed.write_bytes(after)+ subprocess.run([objcopy, '--update-section=' + section + '=' + str(packed),+ str(obj), str(output)], check=True)+ # Verify the bytes actually stored in the resulting ELF, too.+ subprocess.run([objcopy, '--dump-section=' + section + '=' + str(packed),+ str(output), str(folder/'verify.o')], check=True)+ if decode_lz4(packed.read_bytes(), ICON_BYTES) != pixels:+ raise ValueError('Packed icon pixels changed')+ return dict(source_icon_bytes=len(before), icon_bytes=len(after), decoded_icon_bytes=ICON_BYTES)+++def compact_app(source, output, linker):+ output.parent.mkdir(parents=True, exist_ok=True)+ script = Path(__file__).with_name('standalone.ld')+ with tempfile.TemporaryDirectory(dir=output.parent) as folder:+ packed = Path(folder)/'packed.nwa'+ subprocess.run([linker, '--relocatable', '--script', str(script), str(source),+ '-o', str(packed)], check=True)+ output.write_bytes(packed.read_bytes())+++def compact_release(source, output, objcopy):+ """Remove unused ARM mapping symbols from the transport ELF only.++ GNU objcopy preserves $t/$d symbols specially even when unused. Rename+ them in a temporary release copy, then let objcopy decide which symbols+ relocations still need. Keep the debug ELF intact for ARM disassembly.+ Python builders compare release/debug bytes on all supported profiles;+ Make's check target compares them on the smallest RAM profile.+ """+ output.parent.mkdir(parents=True, exist_ok=True)+ with tempfile.TemporaryDirectory(dir=output.parent) as folder:+ folder = Path(folder)+ stripped, renamed = folder/'stripped.nwa', folder/'renamed.nwa'+ subprocess.run([objcopy, '--strip-unneeded', str(source), str(stripped)], check=True)+ subprocess.run([objcopy, '--redefine-sym=$t=unused_thumb_marker',+ '--redefine-sym=$d=unused_data_marker', str(stripped),+ str(renamed)], check=True)+ subprocess.run([objcopy, '--strip-unneeded', str(renamed), str(output)], check=True)+++def main():+ ap = argparse.ArgumentParser(description=__doc__)+ ap.add_argument('kind', choices=('icon', 'app', 'release'))+ ap.add_argument('source', type=Path)+ ap.add_argument('output', type=Path)+ ap.add_argument('--objcopy', default='arm-none-eabi-objcopy')+ ap.add_argument('--ld', default='arm-none-eabi-ld')+ args = ap.parse_args()+ if args.kind == 'icon':+ print(json.dumps(compact_icon(args.source, args.output, args.objcopy)))+ elif args.kind == 'release':+ compact_release(args.source, args.output, args.objcopy)+ else:+ compact_app(args.source, args.output, args.ld)+++if __name__ == '__main__':+ main()diff --git a/games/dune/tools/import_fonts.py b/games/dune/tools/import_fonts.pynew file mode 100644index 00000000..e20c7caf--- /dev/null+++ b/games/dune/tools/import_fonts.py@@ -0,0 +1,48 @@+#!/usr/bin/env python3+"""Bake native-size antialiased glyphs; the build needs no installed fonts."""+import argparse+import json+import math+from pathlib import Path+from PIL import Image, ImageDraw, ImageFont++ROOT = Path(__file__).resolve().parents[1]++def rasterize(path, size, chars):+ font = ImageFont.truetype(str(path), size)+ cap_top = font.getbbox('H')[1]+ data, glyphs = [], []+ for code in range(32, 127):+ ch = chr(code)+ if ch not in chars:+ glyphs.append(None)+ continue+ left, top, right, bottom = font.getbbox(ch)+ im = Image.new('L', (max(1, right-left), max(1, bottom-top)))+ ImageDraw.Draw(im).text((-left, -top), ch, font=font, fill=255)+ bounds = im.getbbox()+ advance = math.ceil(font.getlength(ch)) + (1 if size == 13 else 0)+ if not bounds:+ glyphs.append([len(data), 0, 0, 0, 0, advance])+ continue+ ink = im.crop(bounds)+ xoff, yoff = left+bounds[0], top-cap_top+bounds[1]+ pixels = [(p+8)//17 for p in ink.getdata()]+ glyphs.append([len(data), ink.width, ink.height, xoff, yoff, advance])+ data.extend((pixels[i]<<4)|(pixels[i+1] if i+1<len(pixels) else 0)+ for i in range(0, len(pixels), 2))+ fallback = glyphs[ord('?')-32]+ glyphs = [g if g is not None else fallback for g in glyphs]+ return dict(size=size, source=Path(path).name, glyphs=glyphs, pixels=bytes(data).hex())++def main():+ parser=argparse.ArgumentParser(description=__doc__)+ parser.add_argument('--regular-font', default='C:/Windows/Fonts/segoeui.ttf')+ parser.add_argument('--bold-font', default='C:/Windows/Fonts/segoeuib.ttf')+ args=parser.parse_args()+ fonts=[rasterize(args.regular_font,13,''.join(map(chr,range(32,127)))),+ rasterize(args.bold_font,22,'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 !?+-.:/'),+ rasterize(args.bold_font,32,'0123456789? DUNE')]+ (ROOT/'assets/ui-fonts.json').write_text(json.dumps(fonts,separators=(',',':'))+'\n',encoding='utf8')+ print(ROOT.name, 'native-size font pixels:',sum(len(f['pixels'])//2 for f in fonts))+if __name__=='__main__': main()diff --git a/games/dune/tools/standalone.ld b/games/dune/tools/standalone.ldnew file mode 100644index 00000000..28679582--- /dev/null+++ b/games/dune/tools/standalone.ld@@ -0,0 +1,15 @@+/* Compact a standalone NWA after the first link has removed unused code.+ * Keep EADK metadata separate, and preserve mergeable strings for nwlink.+ * NumPlay modules retain their original sections for launcher garbage collection.+ */+SECTIONS {+ .rodata.eadk_app_name : { *(.rodata.eadk_app_name) }+ .rodata.eadk_app_icon : { *(.rodata.eadk_app_icon) }+ .rodata.eadk_api_level : { *(.rodata.eadk_api_level) }+ .text : { *(.text.startup.main) *(.text .text.*) }+ .rodata.str1.1 : { *(.rodata*.str1.1) }+ .rodata : { *(.rodata .rodata.*) }+ .data : { *(.data .data.*) }+ .bss : { *(.bss .bss.*) *(COMMON) }+ /DISCARD/ : { *(.comment) *(.note.GNU-stack) }+}diff --git a/tools/release.py b/tools/release.pyindex 24ec1a8c..716bc048 100644--- a/tools/release.py+++ b/tools/release.py@@ -40,6 +40,7 @@ ALONE = {"numvisuals": ("NumVisuals", "moving backgrounds with a clock, a stopwatch, a timer, a counter or your own words"),"cookieclicker": ("Cookie Clicker", "the whole game, to the grandmapocalypse, ascension and the dragon"),"jetpackjoyride": ("Jetpack Joyride", "Barry's run through the lab, with five vehicles and the Final Spin"),+ "dune": ("Dune", "Mountains and seven cosmetic balls with an English interface, adapted by Bobydeluxe; installed separately"),}VARIANTS = [("NumPlay-Invisible.nwa", "The same app, hidden: a blank icon with no name"),