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
Friday Night Funkin': the game's own rules and charts, its pictures fetched when it's built
Mason3636f116fb64a13
diff --git a/.github/workflows/fnf.yml b/.github/workflows/fnf.ymldeleted file mode 100644index ea66d028..00000000--- a/.github/workflows/fnf.yml+++ /dev/null@@ -1,53 +0,0 @@-name: Friday Night Funkin--on:- pull_request:- paths:- - 'games/fnf/**'- - 'games/common/**'- - 'launcher/src/font*'- - 'tools/emu.py'- - 'Makefile'- - '.github/workflows/fnf.yml'- push:- branches: [main]- paths:- - 'games/fnf/**'- - 'games/common/**'- - 'launcher/src/font*'- - '.github/workflows/fnf.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==11.3.0 numpy pyelftools unicorn==2.1.4- - name: Standalone build and all 166 charts- run: |- make build/data/apps/FridayNightFunkin.nwa NWLINK=nwlink- make -C games/fnf check test test-assets NWLINK=nwlink- - name: ARM controls, saves and firmware safety- run: python3 games/fnf/tests/test_arm.py --nwlink nwlink- - uses: actions/upload-artifact@v4- with:- name: Friday Night Funkin- path: build/data/apps/FridayNightFunkin.nwadiff --git a/games/fnf/.gitattributes b/games/fnf/.gitattributesdeleted file mode 100644index d2a62023..00000000--- a/games/fnf/.gitattributes+++ /dev/null@@ -1,4 +0,0 @@-* text=auto eol=lf-*.png -text-*.bin -text-*.zlib -textdiff --git a/games/fnf/.gitignore b/games/fnf/.gitignoreindex 72201efa..643bd909 100644--- a/games/fnf/.gitignore+++ b/games/fnf/.gitignore@@ -1,5 +1,3 @@output/+build/__pycache__/-*.pyc-/src/data.c-/src/ids.hdiff --git a/games/fnf/ASSETS.md b/games/fnf/ASSETS.mddeleted file mode 100644index a4c5d0a9..00000000--- a/games/fnf/ASSETS.md+++ /dev/null@@ -1,17 +0,0 @@-# Source provenance--| Project | Pinned revision | Use |-| --- | --- | --- |-| [FunkinCrew/Funkin](https://github.com/FunkinCrew/Funkin/tree/d05659bbdcf0d83073c900207cf410472afbbede) | `d05659bbdcf0d83073c900207cf410472afbbede` | Timing, note/score rules, original credits and license |-| [FunkinCrew/Funkin.art](https://github.com/FunkinCrew/Funkin.art/tree/429ab728b19272dca834c83d97b1646455b22579) | `429ab728b19272dca834c83d97b1646455b22579` | Original art project and chart format reference |-| [FunkinCrew/Funkin.assets](https://github.com/FunkinCrew/Funkin.assets/tree/724eba9de9e76761d9cefd52169926bc51c760a5) | `724eba9de9e76761d9cefd52169926bc51c760a5` | Published game charts, metadata, character/stage configs and compiled artwork |--The game source's asset/art submodule revisions match the user-provided links. Reference downloads were checked against their Git blob hashes and lengths. Music, sound effects, voices and video were neither imported into the game nor embedded in the `.nwa`. No ROM, browser runtime, web page or emulator of the original game is embedded.--`assets/model.json.zlib` preserves the original metadata, events and note arrays for all 61 song variations, plus converted character/stage/UI tables. `assets/chart-manifest.json` identifies the 166 selectable charts and their binary note stream hashes. `tests/test_assets.py` verifies every original time, duration, direction and kind against the compiled streams. `output/asset-report.json` records the exact hashes of the packed build inputs.--`tools/reference_art.py` reads Sparrow XML, packed text atlases and Adobe Animate JSON, including nested symbols, transformations, alpha and clipping masks. `tools/import_reference.py` extracts selected frames, crops transparency, resizes to calculator scale, quantizes to 15 opaque colours and transparency, and deduplicates exact frames. Character offsets are retained relative to their native idle centre and foot position. Stage props are composited into 160×120 cached backgrounds. Desktop shader colour filters and parallax are simplified. The game icon is derived from the original Boyfriend artwork.--Ordinary sprites use independently addressable row RLE with 4-bit palette indices. Stage/menu backgrounds use bounded raw DEFLATE and decode to exactly 9,600 bytes. Notes use delta timestamps and unsigned LEB128, with optional hold duration. No lossy chart simplification is used. The ARM build runs the same score and chart engine as the host tests.--Original license texts are in `LICENSES/Funkin.md`, `LICENSES/funkin.art.md` and `LICENSES/funkin.assets.md`. Nunito's font license is `LICENSES/OFL-1.1-Nunito.txt`. The upstream art and assets are proprietary; their conversion does not remove their copyright or permit public redistribution. The public contribution keeps these license texts and flags this restriction for maintainer review; it does not assert additional redistribution permission.diff --git a/games/fnf/LICENSES/Funkin.md b/games/fnf/LICENSES/Funkin.mddeleted file mode 100644index c4d5ba1e..00000000--- a/games/fnf/LICENSES/Funkin.md+++ /dev/null@@ -1,213 +0,0 @@-# Friday Night Funkin'--The Friday Night Funkin' source code is licensed under the Apache 2.0 license: (https://www.apache.org/licenses/LICENSE-2.0)--Friday Night Funkin' Copyright 2020-2024 The Funkin' Crew Inc.-All Rights Reserved. "Friday Night Funkin'" and the "Friday Night Funkin'" logo are trademarks of The Funkin' Crew Inc.--You can view the `funkin-assets` license here: (https://github.com/FunkinCrew/funkin.assets/blob/main/LICENSE.md)--## Apache 2.0 License-```- Apache License- Version 2.0, January 2004- http://www.apache.org/licenses/-- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION-- 1. Definitions.-- "License" shall mean the terms and conditions for use, reproduction,- and distribution as defined by Sections 1 through 9 of this document.-- "Licensor" shall mean the copyright owner or entity authorized by- the copyright owner that is granting the License.-- "Legal Entity" shall mean the union of the acting entity and all- other entities that control, are controlled by, or are under common- control with that entity. For the purposes of this definition,- "control" means (i) the power, direct or indirect, to cause the- direction or management of such entity, whether by contract or- otherwise, or (ii) ownership of fifty percent (50%) or more of the- outstanding shares, or (iii) beneficial ownership of such entity.-- "You" (or "Your") shall mean an individual or Legal Entity- exercising permissions granted by this License.-- "Source" form shall mean the preferred form for making modifications,- including but not limited to software source code, documentation- source, and configuration files.-- "Object" form shall mean any form resulting from mechanical- transformation or translation of a Source form, including but- not limited to compiled object code, generated documentation,- and conversions to other media types.-- "Work" shall mean the work of authorship, whether in Source or- Object form, made available under the License, as indicated by a- copyright notice that is included in or attached to the work- (an example is provided in the Appendix below).-- "Derivative Works" shall mean any work, whether in Source or Object- form, that is based on (or derived from) the Work and for which the- editorial revisions, annotations, elaborations, or other modifications- represent, as a whole, an original work of authorship. For the purposes- of this License, Derivative Works shall not include works that remain- separable from, or merely link (or bind by name) to the interfaces of,- the Work and Derivative Works thereof.-- "Contribution" shall mean any work of authorship, including- the original version of the Work and any modifications or additions- to that Work or Derivative Works thereof, that is intentionally- submitted to Licensor for inclusion in the Work by the copyright owner- or by an individual or Legal Entity authorized to submit on behalf of- the copyright owner. For the purposes of this definition, "submitted"- means any form of electronic, verbal, or written communication sent- to the Licensor or its representatives, including but not limited to- communication on electronic mailing lists, source code control systems,- and issue tracking systems that are managed by, or on behalf of, the- Licensor for the purpose of discussing and improving the Work, but- excluding communication that is conspicuously marked or otherwise- designated in writing by the copyright owner as "Not a Contribution."-- "Contributor" shall mean Licensor and any individual or Legal Entity- on behalf of whom a Contribution has been received by Licensor and- subsequently incorporated within the Work.-- 2. Grant of Copyright License. Subject to the terms and conditions of- this License, each Contributor hereby grants to You a perpetual,- worldwide, non-exclusive, no-charge, royalty-free, irrevocable- copyright license to reproduce, prepare Derivative Works of,- publicly display, publicly perform, sublicense, and distribute the- Work and such Derivative Works in Source or Object form.-- 3. Grant of Patent License. Subject to the terms and conditions of- this License, each Contributor hereby grants to You a perpetual,- worldwide, non-exclusive, no-charge, royalty-free, irrevocable- (except as stated in this section) patent license to make, have made,- use, offer to sell, sell, import, and otherwise transfer the Work,- where such license applies only to those patent claims licensable- by such Contributor that are necessarily infringed by their- Contribution(s) alone or by combination of their Contribution(s)- with the Work to which such Contribution(s) was submitted. If You- institute patent litigation against any entity (including a- cross-claim or counterclaim in a lawsuit) alleging that the Work- or a Contribution incorporated within the Work constitutes direct- or contributory patent infringement, then any patent licenses- granted to You under this License for that Work shall terminate- as of the date such litigation is filed.-- 4. Redistribution. You may reproduce and distribute copies of the- Work or Derivative Works thereof in any medium, with or without- modifications, and in Source or Object form, provided that You- meet the following conditions:-- (a) You must give any other recipients of the Work or- Derivative Works a copy of this License; and-- (b) You must cause any modified files to carry prominent notices- stating that You changed the files; and-- (c) You must retain, in the Source form of any Derivative Works- that You distribute, all copyright, patent, trademark, and- attribution notices from the Source form of the Work,- excluding those notices that do not pertain to any part of- the Derivative Works; and-- (d) If the Work includes a "NOTICE" text file as part of its- distribution, then any Derivative Works that You distribute must- include a readable copy of the attribution notices contained- within such NOTICE file, excluding those notices that do not- pertain to any part of the Derivative Works, in at least one- of the following places: within a NOTICE text file distributed- as part of the Derivative Works; within the Source form or- documentation, if provided along with the Derivative Works; or,- within a display generated by the Derivative Works, if and- wherever such third-party notices normally appear. The contents- of the NOTICE file are for informational purposes only and- do not modify the License. You may add Your own attribution- notices within Derivative Works that You distribute, alongside- or as an addendum to the NOTICE text from the Work, provided- that such additional attribution notices cannot be construed- as modifying the License.-- You may add Your own copyright statement to Your modifications and- may provide additional or different license terms and conditions- for use, reproduction, or distribution of Your modifications, or- for any such Derivative Works as a whole, provided Your use,- reproduction, and distribution of the Work otherwise complies with- the conditions stated in this License.-- 5. Submission of Contributions. Unless You explicitly state otherwise,- any Contribution intentionally submitted for inclusion in the Work- by You to the Licensor shall be under the terms and conditions of- this License, without any additional terms or conditions.- Notwithstanding the above, nothing herein shall supersede or modify- the terms of any separate license agreement you may have executed- with Licensor regarding such Contributions.-- 6. Trademarks. This License does not grant permission to use the trade- names, trademarks, service marks, or product names of the Licensor,- except as required for reasonable and customary use in describing the- origin of the Work and reproducing the content of the NOTICE file.-- 7. Disclaimer of Warranty. Unless required by applicable law or- agreed to in writing, Licensor provides the Work (and each- Contributor provides its Contributions) on an "AS IS" BASIS,- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or- implied, including, without limitation, any warranties or conditions- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A- PARTICULAR PURPOSE. You are solely responsible for determining the- appropriateness of using or redistributing the Work and assume any- risks associated with Your exercise of permissions under this License.-- 8. Limitation of Liability. In no event and under no legal theory,- whether in tort (including negligence), contract, or otherwise,- unless required by applicable law (such as deliberate and grossly- negligent acts) or agreed to in writing, shall any Contributor be- liable to You for damages, including any direct, indirect, special,- incidental, or consequential damages of any character arising as a- result of this License or out of the use or inability to use the- Work (including but not limited to damages for loss of goodwill,- work stoppage, computer failure or malfunction, or any and all- other commercial damages or losses), even if such Contributor- has been advised of the possibility of such damages.-- 9. Accepting Warranty or Additional Liability. While redistributing- the Work or Derivative Works thereof, You may choose to offer,- and charge a fee for, acceptance of support, warranty, indemnity,- or other liability obligations and/or rights consistent with this- License. However, in accepting such obligations, You may act only- on Your own behalf and on Your sole responsibility, not on behalf- of any other Contributor, and only if You agree to indemnify,- defend, and hold each Contributor harmless for any liability- incurred by, or claims asserted against, such Contributor by reason- of your accepting any such warranty or additional liability.-- END OF TERMS AND CONDITIONS-- APPENDIX: How to apply the Apache License to your work.-- To apply the Apache License to your work, attach the following- boilerplate notice, with the fields enclosed by brackets "[]"- replaced with your own identifying information. (Don't include- the brackets!) The text should be enclosed in the appropriate- comment syntax for the file format. We also recommend that a- file or class name and description of purpose be included on the- same "printed page" as the copyright notice for easier- identification within third-party archives.-- Copyright 2020-2026 The Funkin' Crew Inc.-- Licensed under the Apache License, Version 2.0 (the "License");- you may not use this file except in compliance with the License.- You may obtain a copy of the License at-- http://www.apache.org/licenses/LICENSE-2.0-- Unless required by applicable law or agreed to in writing, software- distributed under the License is distributed on an "AS IS" BASIS,- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- See the License for the specific language governing permissions and- limitations under the License.-```diff --git a/games/fnf/LICENSES/OFL-1.1-Nunito.txt b/games/fnf/LICENSES/OFL-1.1-Nunito.txtdeleted file mode 100644index 4950a581..00000000--- a/games/fnf/LICENSES/OFL-1.1-Nunito.txt+++ /dev/null@@ -1,93 +0,0 @@-Copyright 2014 The Nunito Project Authors (https://github.com/googlefonts/nunito)--This Font Software is licensed under the SIL Open Font License, Version 1.1.-This license is copied below, and is also available with a FAQ at:-http://scripts.sil.org/OFL---------------------------------------------------------------SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007--------------------------------------------------------------PREAMBLE-The goals of the Open Font License (OFL) are to stimulate worldwide-development of collaborative font projects, to support the font creation-efforts of academic and linguistic communities, and to provide a free and-open framework in which fonts may be shared and improved in partnership-with others.--The OFL allows the licensed fonts to be used, studied, modified and-redistributed freely as long as they are not sold by themselves. The-fonts, including any derivative works, can be bundled, embedded,-redistributed and/or sold with any software provided that any reserved-names are not used by derivative works. The fonts and derivatives,-however, cannot be released under any other type of license. The-requirement for fonts to remain under this license does not apply-to any document created using the fonts or their derivatives.--DEFINITIONS-"Font Software" refers to the set of files released by the Copyright-Holder(s) under this license and clearly marked as such. This may-include source files, build scripts and documentation.--"Reserved Font Name" refers to any names specified as such after the-copyright statement(s).--"Original Version" refers to the collection of Font Software components as-distributed by the Copyright Holder(s).--"Modified Version" refers to any derivative made by adding to, deleting,-or substituting -- in part or in whole -- any of the components of the-Original Version, by changing formats or by porting the Font Software to a-new environment.--"Author" refers to any designer, engineer, programmer, technical-writer or other person who contributed to the Font Software.--PERMISSION & CONDITIONS-Permission is hereby granted, free of charge, to any person obtaining-a copy of the Font Software, to use, study, copy, merge, embed, modify,-redistribute, and sell modified and unmodified copies of the Font-Software, subject to the following conditions:--1) Neither the Font Software nor any of its individual components,-in Original or Modified Versions, may be sold by itself.--2) Original or Modified Versions of the Font Software may be bundled,-redistributed and/or sold with any software, provided that each copy-contains the above copyright notice and this license. These can be-included either as stand-alone text files, human-readable headers or-in the appropriate machine-readable metadata fields within text or-binary files as long as those fields can be easily viewed by the user.--3) No Modified Version of the Font Software may use the Reserved Font-Name(s) unless explicit written permission is granted by the corresponding-Copyright Holder. This restriction only applies to the primary font name as-presented to the users.--4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font-Software shall not be used to promote, endorse or advertise any-Modified Version, except to acknowledge the contribution(s) of the-Copyright Holder(s) and the Author(s) or with their explicit written-permission.--5) The Font Software, modified or unmodified, in part or in whole,-must be distributed entirely under this license, and must not be-distributed under any other license. The requirement for fonts to-remain under this license does not apply to any document created-using the Font Software.--TERMINATION-This license becomes null and void if any of the above conditions are-not met.--DISCLAIMER-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT-OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE-COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,-INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL-DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING-FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM-OTHER DEALINGS IN THE FONT SOFTWARE.diff --git a/games/fnf/LICENSES/funkin.art.md b/games/fnf/LICENSES/funkin.art.mddeleted file mode 100644index 138c4c82..00000000--- a/games/fnf/LICENSES/funkin.art.md+++ /dev/null@@ -1,9 +0,0 @@-"Friday Night Funkin'" and the "Friday Night Funkin'" logo are trademarks of The Funkin' Crew Inc.--Copyright 2020-2026 The Funkin' Crew Inc.--All rights reserved.--This game's Content is proprietary and protected by national and international copyright and trademark laws, and may not be publicly distributed for free or for profit by anyone but the copyright owner. "Content" includes but is not limited to the art, visual assets, audio assets, sound effects, music, and any other creative works.--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.diff --git a/games/fnf/LICENSES/funkin.assets.md b/games/fnf/LICENSES/funkin.assets.mddeleted file mode 100644index 138c4c82..00000000--- a/games/fnf/LICENSES/funkin.assets.md+++ /dev/null@@ -1,9 +0,0 @@-"Friday Night Funkin'" and the "Friday Night Funkin'" logo are trademarks of The Funkin' Crew Inc.--Copyright 2020-2026 The Funkin' Crew Inc.--All rights reserved.--This game's Content is proprietary and protected by national and international copyright and trademark laws, and may not be publicly distributed for free or for profit by anyone but the copyright owner. "Content" includes but is not limited to the art, visual assets, audio assets, sound effects, music, and any other creative works.--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.diff --git a/games/fnf/Makefile b/games/fnf/Makefileindex dea84940..b1937c26 100644--- a/games/fnf/Makefile+++ b/games/fnf/Makefile@@ -1,52 +1,79 @@-.DEFAULT_GOAL := build+# Friday Night Funkin' on the NumWorks calculator.+# make output/fnf.nwa+# make check link it like the calculator does (output/fnf.bin)+# make host build/play: the game on a computer, for tests and pictures+# make test the rules against the game's own numbers (PBOT1, health, holds, ghost misses), every chart+# played by a bot to a full combo, random keys, saves (with the sanitizers)+#+# The charts and pictures are the Funkin' Crew's, and are not in this repository: tools/fetch.py fetches the files+# tools/ref.txt lists from their funkin.assets repository, at its pinned commit, into REF (git, nothing run), and+# tools/data.py packs them into $(BUILD_DIR)/gen (Python 3 with Pillow and numpy; zopfli packs them smaller).+# REF=DIR uses a copy of funkin.assets already there (its files are checked against tools/ref.txt).+Q ?= @CC = arm-none-eabi-gcc-NWLINK ?= nwlink+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/inflate.c src/save.c src/render.c src/font.c src/data.c-OBJECTS = $(patsubst src/%.c,output/%.o,$(SRC))-HEADERS = $(wildcard src/*.h) ../common/epsilon_app.h ../common/epsilon_files.h ../../launcher/src/font.h ../../launcher/src/font_data.c-PACKER = tools/compact_nwa.py tools/standalone.ld-ASSET_FILES = assets/model.json.zlib assets/art.json assets/art.bin-src/data.c: tools/assets.py $(ASSET_FILES)- $(PYTHON) tools/assets.py-src/ids.h: src/data.c- @test -f $@ || $(PYTHON) tools/assets.py-$(OBJECTS): src/data.c src/ids.h-CFLAGS = -std=c11 $(shell $(NWLINK) eadk-cflags-device) -Os -Wall -Wextra -Werror -Wno-misleading-indentation-CFLAGS += -DEPSILON_XL=1 -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 test-assets assets clean host-build: output/fnf.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/fnf-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/fnf.nwa: output/fnf-debug.nwa $(PACKER)- $(PYTHON) tools/compact_nwa.py release $< $@ --objcopy $(OBJCOPY)-check: build- $(NWLINK) nwa-bin output/fnf.nwa output/fnf.bin --ram-length 107674- $(NWLINK) nwa-bin output/fnf-debug.nwa output/fnf-debug.bin --ram-length 107674- $(PYTHON) -c "from pathlib import Path; a=Path('output/fnf.bin').read_bytes(); assert a == Path('output/fnf-debug.bin').read_bytes(); assert len(a)<=2031616"-host: test-test: src/data.c src/ids.h | output- $(HOST_CC) -std=c11 -O2 -Wall -Wextra -Werror -Wno-misleading-indentation -DFNF_TEST -Isrc tests/test.c src/game.c src/save.c src/render.c src/font.c src/inflate.c src/data.c -lm -o output/test- cd output && ./test-test-arm:- $(PYTHON) tests/test_arm.py --nwlink "$(NWLINK)"-test-assets: src/data.c src/ids.h- $(PYTHON) tests/test_assets.py-assets:- $(PYTHON) tools/assets.py+BUILD_DIR = output+REF ?= $(BUILD_DIR)/ref+GEN = $(BUILD_DIR)/gen+L = ../../launcher/src++SRC = src/main.c src/app.c src/game.c src/draw.c src/screens.c src/save.c src/inflate.c src/plat_eadk.c \+ $(L)/gfx.c $(L)/font_data.c $(L)/xfont.c $(GEN)/data.c+HEADERS = $(wildcard src/*.h) $(GEN)/ids.h $(L)/gfx.h $(L)/font.h $(L)/np.h ../common/epsilon_app.h \+ ../common/epsilon_files.h++CFLAGS = -std=gnu11 $(shell $(NWLINK) eadk-cflags-device) -DPLATFORM_DEVICE=1 -DEPSILON_XL=1 -I$(L) -Isrc -I$(GEN)+CFLAGS += -Os -Wall -Wextra -Wno-unused-parameter -fno-math-errno -fsingle-precision-constant+CFLAGS += -fno-tree-loop-distribute-patterns -flto -fno-fat-lto-objects -fwhole-program -fvisibility=internal+CFLAGS += -ffunction-sections -fdata-sections+LDFLAGS = -Wl,--relocatable -nostartfiles --specs=nano.specs+LDFLAGS += -Wl,-e,main -Wl,-u,eadk_app_name -Wl,-u,eadk_app_icon -Wl,-u,eadk_api_level+LDFLAGS += -Wl,--gc-sections -flinker-output=nolto-rel++.PHONY: build check clean host test data fetch+build: $(BUILD_DIR)/fnf.nwa++# apps get 133652 bytes of RAM on custom builds of Epsilon 25.2 (148928 or more on official ones)+check: $(BUILD_DIR)/fnf.nwa+ $(Q) $(NWLINK) nwa-bin --ram-length 133652 $< $(BUILD_DIR)/fnf.bin+ @echo "BIN $(BUILD_DIR)/fnf.bin: $$(wc -c < $(BUILD_DIR)/fnf.bin) bytes"++$(BUILD_DIR)/fnf.nwa: $(SRC) $(HEADERS) $(BUILD_DIR)/icon.o+ @echo "LD $@"+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(SRC) $(BUILD_DIR)/icon.o -lm -o $@+ $(Q) arm-none-eabi-strip --strip-unneeded $@++$(BUILD_DIR)/icon.o: src/icon.png | $(BUILD_DIR)+ @echo "ICON $<"+ $(Q) $(NWLINK) png-icon-o $< $@++$(BUILD_DIR):+ $(Q) mkdir -p $@++# the game's files: fetched (or checked), then packed+$(GEN)/ref.ok: tools/fetch.py tools/ref.txt | $(BUILD_DIR)+ @echo "FETCH $(REF)"+ $(Q) $(PYTHON) -I tools/fetch.py $(REF)+ $(Q) mkdir -p $(GEN) && touch $@+$(GEN)/data.c: tools/data.py tools/atlas.py $(GEN)/ref.ok+ @echo "DATA $(GEN)"+ $(Q) $(PYTHON) -I tools/data.py $(REF) $(GEN)+$(GEN)/ids.h: $(GEN)/data.c+fetch: $(GEN)/ref.ok+data: $(GEN)/data.c++# on a computer: tests/play.c checks the rules, plays every chart with a bot, random keys, saves, and takes pictures+HOST_SRC = tests/play.c src/app.c src/game.c src/draw.c src/screens.c src/save.c src/inflate.c \+ $(L)/gfx.c $(L)/font_data.c $(L)/xfont.c $(GEN)/data.c+HOST_FLAGS = -std=gnu11 -O2 -g -Wall -Wextra -Wno-unused-parameter -ffp-contract=off -Isrc -I$(L) -I$(GEN) -DHOST+host: build/play+build/play: $(HOST_SRC) src/main.c $(wildcard src/*.h) $(GEN)/ids.h+ $(Q) mkdir -p build+ $(Q) cc $(HOST_FLAGS) -fsanitize=address,undefined -fno-sanitize-recover=undefined $(HOST_SRC) -lm -o $@+ @echo "HOST $@"+test: build/play+ build/play test build+clean:- rm -rf output+ $(Q) rm -rf $(BUILD_DIR) builddiff --git a/games/fnf/NOTICE b/games/fnf/NOTICEdeleted file mode 100644index df8f6cd1..00000000--- a/games/fnf/NOTICE+++ /dev/null@@ -1,13 +0,0 @@-Friday Night Funkin' calculator adaptation by Bobydeluxe.--Original game: The Funkin' Crew Inc. and the original contributors.-Original creators include ninjamuffin99, PhantomArcade, evilsk8r and Kawai Sprite.-PBOT1 scoring and gameplay constants follow the pinned Funkin source (Apache 2.0).-Copyright and license text: LICENSES/Funkin.md.--Original characters, artwork, charts and trademarks remain with their owners.-The separate upstream art/assets license restricts public redistribution.-See LICENSES/funkin.art.md, LICENSES/funkin.assets.md and ASSETS.md.--Nunito font, from the NumPlay launcher: SIL Open Font License 1.1.-See LICENSES/OFL-1.1-Nunito.txt.diff --git a/games/fnf/VALIDATION.md b/games/fnf/VALIDATION.mddeleted file mode 100644index d4160c95..00000000--- a/games/fnf/VALIDATION.md+++ /dev/null@@ -1,63 +0,0 @@-# Validation — 23 October 2026--This is a native, silent calculator adaptation. The chart content is complete for the pinned assets; desktop presentation is adapted as described in README.md. No physical calculator was connected for these checks.--## Build and limits--| Measurement | Result |-| --- | ---: |-| Released `.nwa` | 1,840,140 bytes |-| Installed flash bytes | 1,829,516 bytes |-| Shared flash limit | 2,031,616 bytes |-| Static app RAM | 23,396 bytes |-| Highest measured ARM stack after final input change | 2,608 bytes |-| Minimum tested installer RAM allocation | 107,674 bytes |-| Background cache | 9,600 bytes |-| LCD strip | 5,120 bytes |-| Game state including records and notes | 2,352 bytes |-| Save payload | 1,344 bytes |--Release SHA-256: `a3a90cd6895cb820578e9a7a5a71813c8d4d16cacb17244881e839c689ad3a43`.--Both the Python build and `make check` passed the real nwlink conversion with the minimum RAM allocation. Release and debug packages produce **identical installed bytes**. Generated ROM C tables, IDs and the chart manifest reproduce byte for byte from the checked-in packed inputs.--## Chart and engine checks--- 27 songs, 61 variations, 166 selectable charts, 90,437 notes, 21 stage backgrounds and 46 character configurations.-- Every note's direction, kind, head time and hold duration were compared against the preserved source JSON. Maximum time/duration quantization error: 0.03125 ms.-- All 166 charts were completed with a host-side input oracle using the actual native engine. Every scoreable player head received Sick; no missed player heads, queue overflow or forced completion. Opponent notes and chart events were processed during these runs.-- The worst observed working queue was 47 notes. A separate conservative interval sweep, retaining missed holds through their entire duration, bounds it at 49 including the one-note lookahead, below the fixed 64 slots.-- All 166 charts also fail normally with no input. Random inputs were checked for bounded note count and health; restart resets per-run state.-- Judgement boundaries, the symmetric/monotonic PBOT1 curve, empty taps, ghost tapping, same-lane key aliases, long-note rewards, early hold release penalties and the 160 ms tail grace were tested.-- Save round trips, inert backup recovery, rejection of every individual flipped save bit, truncated saves and rejection without changing the existing progress were tested.--## Rendering and input--Native font text has measured pixel bounds; it is not taken from a scaled browser screenshot or a large text atlas. Menu choices, every freeplay song/variation/difficulty, every story group and each referenced stage were rendered through the actual eight-line strip renderer. Screenshots were inspected, including the logo, health HUD, pixel characters and the six-character collaboration scene. Adobe clipping masks were corrected during asset conversion.--A regression test verifies **30 keypad polls per frame even when all 30 LCD strips are unchanged and no LCD push is needed**. Rendering reads a fixed game snapshot; timestamped key transitions are consumed afterward. The chart clock never advances according to frame count.--The final ARM smoke run passed all four memory profiles and rechecks both key layouts after this input fix and the final logo sizing. The 16-note real-key sequences received 16 Sick judgements on every profile; the measured gameplay sampling interval was at most 2 ms in those runs. Ordinary Bopeebo frame work was at most 13 ms on N0120 and 31 ms on the older processor profile. Dense/crowded rendering fixtures reached 16 ms / 41 ms respectively, including a fixture-only background cache switch. These are instruction-driven emulator estimates, not hardware frame-rate guarantees. Exact per-profile measurements are in `output/arm/smoke-report.json`.--The earlier complete Bopeebo run used 51 real player note presses and cleared the song. After the final input and logo adjustments, the complete 166-chart host regression, real-key smoke runs, pause/retry, persistence, full-storage checks, firmware guards and both heavy rendering fixtures passed again. Static RAM plus the highest measured stack use totals **26,004 bytes**.--## ARM / firmware checks--The compiled Cortex-M app ran against Epsilon N0120, Epsilon N0110, the smaller N0115 RAM profile and Upsilon memory layouts. The test drives the real menus and keys. It checks:--- Arrow controls and 7 / 8 / ( / ) controls, including simultaneous aliases for one lane.-- Song selection, accurate notes, frozen pause clock, resume and retry countdown.-- Home and Power exits, save/backup round trips and recovery when only the Python backup remains.-- Full storage: failed-save message, retry, return to menu and explicit unsaved exit; unrelated records remain intact.-- A held confirm key at launch does not enter a menu accidentally.-- Firmware RAM guards, clean application RAM on exit and balanced Home locks; Upsilon makes no Epsilon-only system calls.--Host-engine snapshots explicitly exercise the dense 2hot chart and the collaboration's larger visible cast on both processor profiles. These fixtures test rendering, input sampling and safe exits; they are not presented as real-key song completions.--CPU emulation uses 216 million instructions/second for the N0120 profile and 86.4 million for the older processor profile to preserve their relative speed. It does not model LCD transfer cost or every cache/pipeline effect. Physical play testing remains necessary to confirm frame pacing on a particular firmware and calculator.--## Reports and scope--Reproducible commands are in README.md. Reports and screenshots are generated under ignored `output/`: `build-report.json`, `asset-report.json`, `host-report.json`, `autoplay-report.json`, `arm/report.json` and `arm/smoke-report.json`.--This contribution creates a standalone `.nwa`, registers its build and release output, adds a big-game download card and credits, and provides focused CI. It leaves the launcher manifest and all other game directories unchanged. The source art/assets' redistribution restrictions remain in force; see ASSETS.md and the original license texts.diff --git a/games/fnf/assets/art.bin b/games/fnf/assets/art.bindeleted file mode 100644index 34053e63..00000000Binary files a/games/fnf/assets/art.bin and /dev/null differdiff --git a/games/fnf/assets/art.json b/games/fnf/assets/art.jsondeleted file mode 100644index 681336b1..00000000--- a/games/fnf/assets/art.json+++ /dev/null@@ -1 +0,0 @@-{"sprites":[{"name":"char/bf/idle/0","w":63,"h":61,"palette":0,"offset":0,"ox":-32,"oy":-61,"compressed":false,"packed_size":1471},{"name":"char/bf/idle/1","w":63,"h":62,"palette":1,"offset":1593,"ox":-32,"oy":-62,"compressed":false,"packed_size":1480},{"name":"char/bf/idle/2","w":64,"h":64,"palette":2,"offset":3197,"ox":-33,"oy":-64,"compressed":false,"packed_size":1516},{"name":"char/bf/singLEFT/0","w":60,"h":63,"palette":3,"offset":4841,"ox":-27,"oy":-63,"compressed":false,"packed_size":1421},{"name":"char/bf/singLEFT/1","w":58,"h":63,"palette":4,"offset":6388,"ox":-27,"oy":-63,"compressed":false,"packed_size":1418},{"name":"char/bf/singDOWN/0","w":58,"h":56,"palette":5,"offset":7932,"ox":-29,"oy":-56,"compressed":false,"packed_size":1320},{"name":"char/bf/singDOWN/1","w":58,"h":56,"palette":6,"offset":9364,"ox":-29,"oy":-56,"compressed":false,"packed_size":1317},{"name":"char/bf/singUP/0","w":57,"h":69,"palette":7,"offset":10793,"ox":-33,"oy":-68,"compressed":false,"packed_size":1529},{"name":"char/bf/singUP/1","w":58,"h":69,"palette":8,"offset":12460,"ox":-33,"oy":-68,"compressed":false,"packed_size":1528},{"name":"char/bf/singRIGHT/0","w":64,"h":63,"palette":9,"offset":14126,"ox":-40,"oy":-63,"compressed":false,"packed_size":1413},{"name":"char/bf/singRIGHT/1","w":63,"h":63,"palette":10,"offset":15665,"ox":-39,"oy":-63,"compressed":false,"packed_size":1408},{"name":"char/bf/hey/0","w":61,"h":65,"palette":11,"offset":17199,"ox":-30,"oy":-65,"compressed":false,"packed_size":1524},{"name":"char/bf/hey/1","w":64,"h":64,"palette":12,"offset":18853,"ox":-33,"oy":-64,"compressed":false,"packed_size":1525},{"name":"char/bf/cheer/0","w":67,"h":71,"palette":13,"offset":20506,"ox":-40,"oy":-67,"compressed":false,"packed_size":1741},{"name":"char/bf/cheer/1","w":67,"h":70,"palette":14,"offset":22389,"ox":-40,"oy":-65,"compressed":false,"packed_size":1697},{"name":"char/bf/scared/0","w":64,"h":64,"palette":15,"offset":24226,"ox":-33,"oy":-64,"compressed":false,"packed_size":1514},{"name":"char/bf/scared/1","w":64,"h":64,"palette":16,"offset":25868,"ox":-33,"oy":-64,"compressed":false,"packed_size":1518},{"name":"char/bf-car/idle/0","w":63,"h":61,"palette":17,"offset":27514,"ox":-32,"oy":-61,"compressed":false,"packed_size":1474},{"name":"char/bf-car/idle/1","w":64,"h":62,"palette":18,"offset":29110,"ox":-33,"oy":-62,"compressed":false,"packed_size":1488},{"name":"char/bf-car/idle/2","w":64,"h":64,"palette":19,"offset":30722,"ox":-33,"oy":-64,"compressed":false,"packed_size":1521},{"name":"char/bf-car/singLEFT/0","w":60,"h":63,"palette":20,"offset":32371,"ox":-27,"oy":-63,"compressed":false,"packed_size":1426},{"name":"char/bf-car/singLEFT/1","w":58,"h":63,"palette":21,"offset":33923,"ox":-27,"oy":-63,"compressed":false,"packed_size":1419},{"name":"char/bf-car/singDOWN/0","w":58,"h":56,"palette":22,"offset":35468,"ox":-29,"oy":-56,"compressed":false,"packed_size":1320},{"name":"char/bf-car/singDOWN/1","w":58,"h":56,"palette":23,"offset":36900,"ox":-29,"oy":-56,"compressed":false,"packed_size":1324},{"name":"char/bf-car/singUP/0","w":57,"h":69,"palette":24,"offset":38336,"ox":-33,"oy":-68,"compressed":false,"packed_size":1531},{"name":"char/bf-car/singUP/1","w":58,"h":69,"palette":25,"offset":40005,"ox":-33,"oy":-68,"compressed":false,"packed_size":1533},{"name":"char/bf-car/singRIGHT/0","w":64,"h":63,"palette":26,"offset":41676,"ox":-40,"oy":-63,"compressed":false,"packed_size":1416},{"name":"char/bf-car/singRIGHT/1","w":64,"h":63,"palette":27,"offset":43218,"ox":-40,"oy":-63,"compressed":false,"packed_size":1418},{"name":"char/bf-car/hey/0","w":61,"h":65,"palette":11,"offset":44762,"ox":-30,"oy":-65,"compressed":false,"packed_size":1523},{"name":"char/bf-car/hey/1","w":64,"h":64,"palette":28,"offset":46415,"ox":-33,"oy":-64,"compressed":false,"packed_size":1531},{"name":"char/bf-christmas/hey/0","w":64,"h":68,"palette":29,"offset":48074,"ox":-30,"oy":-68,"compressed":false,"packed_size":1658},{"name":"char/bf-christmas/hey/1","w":68,"h":67,"palette":30,"offset":49868,"ox":-34,"oy":-67,"compressed":false,"packed_size":1672},{"name":"char/bf-christmas/idle/0","w":66,"h":64,"palette":31,"offset":51674,"ox":-33,"oy":-64,"compressed":false,"packed_size":1612},{"name":"char/bf-christmas/idle/1","w":66,"h":65,"palette":32,"offset":53414,"ox":-33,"oy":-65,"compressed":false,"packed_size":1636},{"name":"char/bf-christmas/idle/2","w":66,"h":67,"palette":33,"offset":55180,"ox":-33,"oy":-67,"compressed":false,"packed_size":1678},{"name":"char/bf-christmas/singLEFT/0","w":61,"h":66,"palette":34,"offset":56992,"ox":-25,"oy":-66,"compressed":false,"packed_size":1564},{"name":"char/bf-christmas/singLEFT/1","w":60,"h":66,"palette":35,"offset":58688,"ox":-26,"oy":-66,"compressed":false,"packed_size":1560},{"name":"char/bf-christmas/singDOWN/0","w":61,"h":59,"palette":36,"offset":60380,"ox":-29,"oy":-58,"compressed":false,"packed_size":1472},{"name":"char/bf-christmas/singDOWN/1","w":60,"h":60,"palette":37,"offset":61970,"ox":-28,"oy":-59,"compressed":false,"packed_size":1456},{"name":"char/bf-christmas/singUP/0","w":59,"h":72,"palette":38,"offset":63546,"ox":-31,"oy":-71,"compressed":false,"packed_size":1663},{"name":"char/bf-christmas/singUP/1","w":61,"h":72,"palette":39,"offset":65353,"ox":-32,"oy":-71,"compressed":false,"packed_size":1671},{"name":"char/bf-christmas/singRIGHT/0","w":66,"h":67,"palette":40,"offset":67168,"ox":-38,"oy":-66,"compressed":false,"packed_size":1571},{"name":"char/bf-christmas/singRIGHT/1","w":66,"h":67,"palette":41,"offset":68873,"ox":-38,"oy":-66,"compressed":false,"packed_size":1574},{"name":"char/bf-christmas/singDOWN-censor/0","w":61,"h":59,"palette":42,"offset":70581,"ox":-29,"oy":-58,"compressed":false,"packed_size":1472},{"name":"char/bf-christmas/singDOWN-censor/1","w":60,"h":60,"palette":43,"offset":72171,"ox":-28,"oy":-59,"compressed":false,"packed_size":1457},{"name":"char/bf-christmas/singRIGHT-censor/0","w":66,"h":67,"palette":44,"offset":73748,"ox":-38,"oy":-66,"compressed":false,"packed_size":1571},{"name":"char/bf-christmas/singRIGHT-censor/1","w":66,"h":67,"palette":45,"offset":75453,"ox":-38,"oy":-66,"compressed":false,"packed_size":1574},{"name":"char/bf-christmas/singLEFTmiss/0","w":61,"h":67,"palette":46,"offset":77161,"ox":-25,"oy":-67,"compressed":false,"packed_size":1581},{"name":"char/bf-christmas/singDOWNmiss/0","w":61,"h":59,"palette":47,"offset":78876,"ox":-29,"oy":-58,"compressed":false,"packed_size":1458},{"name":"char/bf-christmas/singUPmiss/0","w":59,"h":72,"palette":48,"offset":80452,"ox":-32,"oy":-71,"compressed":false,"packed_size":1663},{"name":"char/bf-christmas/singRIGHTmiss/0","w":65,"h":67,"palette":49,"offset":82259,"ox":-38,"oy":-66,"compressed":false,"packed_size":1566},{"name":"char/bf-dark/idle/0","w":63,"h":61,"palette":50,"offset":83959,"ox":-32,"oy":-61,"compressed":false,"packed_size":1469},{"name":"char/bf-dark/idle/1","w":63,"h":62,"palette":51,"offset":85550,"ox":-32,"oy":-62,"compressed":false,"packed_size":1480},{"name":"char/bf-dark/idle/2","w":64,"h":64,"palette":52,"offset":87154,"ox":-33,"oy":-64,"compressed":false,"packed_size":1516},{"name":"char/bf-dark/singLEFT/0","w":60,"h":63,"palette":53,"offset":88798,"ox":-27,"oy":-63,"compressed":false,"packed_size":1421},{"name":"char/bf-dark/singLEFT/1","w":58,"h":63,"palette":54,"offset":90345,"ox":-27,"oy":-63,"compressed":false,"packed_size":1417},{"name":"char/bf-dark/singDOWN/0","w":58,"h":56,"palette":55,"offset":91888,"ox":-29,"oy":-56,"compressed":false,"packed_size":1320},{"name":"char/bf-dark/singDOWN/1","w":58,"h":56,"palette":56,"offset":93320,"ox":-29,"oy":-56,"compressed":false,"packed_size":1317},{"name":"char/bf-dark/singUP/0","w":57,"h":69,"palette":57,"offset":94749,"ox":-33,"oy":-68,"compressed":false,"packed_size":1529},{"name":"char/bf-dark/singUP/1","w":58,"h":69,"palette":58,"offset":96416,"ox":-33,"oy":-68,"compressed":false,"packed_size":1528},{"name":"char/bf-dark/singRIGHT/0","w":64,"h":63,"palette":59,"offset":98082,"ox":-40,"oy":-63,"compressed":false,"packed_size":1413},{"name":"char/bf-dark/singRIGHT/1","w":63,"h":63,"palette":60,"offset":99621,"ox":-39,"oy":-63,"compressed":false,"packed_size":1406},{"name":"char/bf-dark/singLEFTmiss/0","w":60,"h":63,"palette":61,"offset":101153,"ox":-27,"oy":-63,"compressed":false,"packed_size":1421},{"name":"char/bf-dark/singRIGHTmiss/0","w":64,"h":63,"palette":59,"offset":102700,"ox":-40,"oy":-63,"compressed":false,"packed_size":1413},{"name":"char/bf-dark/hey/0","w":61,"h":65,"palette":62,"offset":104239,"ox":-30,"oy":-65,"compressed":false,"packed_size":1524},{"name":"char/bf-dark/hey/1","w":64,"h":64,"palette":63,"offset":105893,"ox":-33,"oy":-64,"compressed":false,"packed_size":1525},{"name":"char/bf-dark/scared/0","w":64,"h":64,"palette":64,"offset":107546,"ox":-33,"oy":-64,"compressed":false,"packed_size":1514},{"name":"char/bf-dark/scared/1","w":64,"h":64,"palette":65,"offset":109188,"ox":-33,"oy":-64,"compressed":false,"packed_size":1518},{"name":"char/bf-holding-gf/singUP/0","w":80,"h":68,"palette":66,"offset":110834,"ox":-43,"oy":-67,"compressed":false,"packed_size":2212},{"name":"char/bf-holding-gf/singUP/1","w":82,"h":67,"palette":67,"offset":113182,"ox":-44,"oy":-66,"compressed":false,"packed_size":2195},{"name":"char/bf-holding-gf/idle/0","w":83,"h":64,"palette":68,"offset":115511,"ox":-41,"oy":-64,"compressed":false,"packed_size":2168},{"name":"char/bf-holding-gf/idle/1","w":84,"h":64,"palette":69,"offset":117807,"ox":-42,"oy":-64,"compressed":false,"packed_size":2156},{"name":"char/bf-holding-gf/idle/2","w":85,"h":65,"palette":70,"offset":120091,"ox":-43,"oy":-65,"compressed":false,"packed_size":2210},{"name":"char/bf-holding-gf/idle/3","w":85,"h":65,"palette":71,"offset":122431,"ox":-43,"oy":-65,"compressed":false,"packed_size":2212},{"name":"char/bf-holding-gf/singLEFT/0","w":78,"h":66,"palette":72,"offset":124773,"ox":-34,"oy":-66,"compressed":false,"packed_size":2077},{"name":"char/bf-holding-gf/singLEFT/1","w":77,"h":66,"palette":73,"offset":126982,"ox":-35,"oy":-66,"compressed":false,"packed_size":2069},{"name":"char/bf-holding-gf/singDOWN/0","w":78,"h":64,"palette":74,"offset":129183,"ox":-38,"oy":-62,"compressed":false,"packed_size":1967},{"name":"char/bf-holding-gf/singDOWN/1","w":78,"h":64,"palette":75,"offset":131278,"ox":-38,"oy":-63,"compressed":false,"packed_size":1982},{"name":"char/bf-holding-gf/singRIGHT/0","w":78,"h":68,"palette":76,"offset":133388,"ox":-42,"oy":-68,"compressed":false,"packed_size":2065},{"name":"char/bf-holding-gf/singRIGHT/1","w":77,"h":68,"palette":77,"offset":135589,"ox":-41,"oy":-68,"compressed":false,"packed_size":2070},{"name":"char/bf-holding-gf/singLEFTmiss/0","w":78,"h":66,"palette":78,"offset":137795,"ox":-34,"oy":-66,"compressed":false,"packed_size":2081},{"name":"char/bf-holding-gf/singDOWNmiss/0","w":78,"h":64,"palette":79,"offset":140008,"ox":-38,"oy":-62,"compressed":false,"packed_size":1977},{"name":"char/bf-holding-gf/singUPmiss/0","w":80,"h":68,"palette":80,"offset":142113,"ox":-44,"oy":-67,"compressed":false,"packed_size":2207},{"name":"char/bf-holding-gf/singRIGHTmiss/0","w":78,"h":68,"palette":81,"offset":144456,"ox":-43,"oy":-66,"compressed":false,"packed_size":2061},{"name":"char/bf-holding-gf/bfCatch/0","w":87,"h":77,"palette":82,"offset":146653,"ox":-51,"oy":-51,"compressed":false,"packed_size":2202},{"name":"char/bf-holding-gf/bfCatch/1","w":79,"h":79,"palette":83,"offset":149009,"ox":-37,"oy":-65,"compressed":false,"packed_size":2068},{"name":"char/bf-pixel/idle/0","w":70,"h":64,"palette":84,"offset":151235,"ox":-35,"oy":-64,"compressed":false,"packed_size":1617},{"name":"char/bf-pixel/idle/1","w":68,"h":67,"palette":85,"offset":152980,"ox":-36,"oy":-67,"compressed":false,"packed_size":1671},{"name":"char/bf-pixel/idle/2","w":67,"h":67,"palette":86,"offset":154785,"ox":-36,"oy":-67,"compressed":false,"packed_size":1693},{"name":"char/bf-pixel/singLEFT/0","w":62,"h":66,"palette":87,"offset":156612,"ox":-29,"oy":-66,"compressed":false,"packed_size":1533},{"name":"char/bf-pixel/singLEFT/1","w":64,"h":66,"palette":88,"offset":158277,"ox":-32,"oy":-66,"compressed":false,"packed_size":1546},{"name":"char/bf-pixel/singDOWN/0","w":64,"h":61,"palette":89,"offset":159955,"ox":-34,"oy":-61,"compressed":false,"packed_size":1458},{"name":"char/bf-pixel/singDOWN/1","w":63,"h":62,"palette":90,"offset":161535,"ox":-33,"oy":-62,"compressed":false,"packed_size":1491},{"name":"char/bf-pixel/singUP/0","w":66,"h":74,"palette":91,"offset":163150,"ox":-43,"oy":-74,"compressed":false,"packed_size":1709},{"name":"char/bf-pixel/singUP/1","w":67,"h":73,"palette":92,"offset":165007,"ox":-43,"oy":-73,"compressed":false,"packed_size":1687},{"name":"char/bf-pixel/singRIGHT/0","w":66,"h":65,"palette":93,"offset":166840,"ox":-47,"oy":-65,"compressed":false,"packed_size":1475},{"name":"char/bf-pixel/singRIGHT/1","w":63,"h":65,"palette":94,"offset":168445,"ox":-44,"oy":-65,"compressed":false,"packed_size":1478},{"name":"char/dad/idle/0","w":46,"h":84,"palette":95,"offset":170053,"ox":-23,"oy":-84,"compressed":false,"packed_size":1158},{"name":"char/dad/idle/1","w":47,"h":83,"palette":96,"offset":171379,"ox":-24,"oy":-83,"compressed":false,"packed_size":1145},{"name":"char/dad/idle/2","w":47,"h":83,"palette":97,"offset":172690,"ox":-24,"oy":-83,"compressed":false,"packed_size":1143},{"name":"char/dad/idle/3","w":46,"h":84,"palette":95,"offset":173999,"ox":-23,"oy":-84,"compressed":false,"packed_size":1158},{"name":"char/dad/singUP/0","w":45,"h":90,"palette":98,"offset":175325,"ox":-23,"oy":-90,"compressed":false,"packed_size":1305},{"name":"char/dad/singUP/1","w":45,"h":89,"palette":99,"offset":176810,"ox":-23,"oy":-89,"compressed":false,"packed_size":1283},{"name":"char/dad/singDOWN/0","w":51,"h":80,"palette":100,"offset":178271,"ox":-24,"oy":-80,"compressed":false,"packed_size":1189},{"name":"char/dad/singDOWN/1","w":51,"h":81,"palette":101,"offset":179620,"ox":-24,"oy":-81,"compressed":false,"packed_size":1187},{"name":"char/dad/singLEFT/0","w":41,"h":85,"palette":102,"offset":180969,"ox":-23,"oy":-85,"compressed":false,"packed_size":1219},{"name":"char/dad/singLEFT/1","w":42,"h":85,"palette":103,"offset":182358,"ox":-23,"oy":-85,"compressed":false,"packed_size":1224},{"name":"char/dad/singRIGHT/0","w":51,"h":87,"palette":104,"offset":183752,"ox":-23,"oy":-87,"compressed":false,"packed_size":1304},{"name":"char/dad/singRIGHT/1","w":49,"h":87,"palette":105,"offset":185230,"ox":-23,"oy":-87,"compressed":false,"packed_size":1294},{"name":"char/darnell/idle/0","w":59,"h":75,"palette":106,"offset":186698,"ox":-30,"oy":-74,"compressed":false,"packed_size":1716},{"name":"char/darnell/idle/1","w":61,"h":76,"palette":107,"offset":188564,"ox":-29,"oy":-75,"compressed":false,"packed_size":1756},{"name":"char/darnell/idle/2","w":60,"h":77,"palette":108,"offset":190472,"ox":-29,"oy":-76,"compressed":false,"packed_size":1758},{"name":"char/darnell/idle/3","w":60,"h":77,"palette":109,"offset":192384,"ox":-29,"oy":-76,"compressed":false,"packed_size":1761},{"name":"char/darnell/singLEFT/0","w":67,"h":73,"palette":110,"offset":194299,"ox":-38,"oy":-72,"compressed":false,"packed_size":1725},{"name":"char/darnell/singLEFT/1","w":65,"h":74,"palette":111,"offset":196170,"ox":-35,"oy":-73,"compressed":false,"packed_size":1746},{"name":"char/darnell/singDOWN/0","w":67,"h":66,"palette":112,"offset":198064,"ox":-31,"oy":-68,"compressed":false,"packed_size":1746},{"name":"char/darnell/singDOWN/1","w":66,"h":67,"palette":113,"offset":199942,"ox":-30,"oy":-69,"compressed":false,"packed_size":1769},{"name":"char/darnell/singUP/0","w":59,"h":87,"palette":114,"offset":201845,"ox":-31,"oy":-86,"compressed":false,"packed_size":1833},{"name":"char/darnell/singUP/1","w":55,"h":86,"palette":115,"offset":203852,"ox":-27,"oy":-85,"compressed":false,"packed_size":1834},{"name":"char/darnell/singRIGHT/0","w":68,"h":77,"palette":116,"offset":205858,"ox":-31,"oy":-76,"compressed":false,"packed_size":1844},{"name":"char/darnell/singRIGHT/1","w":67,"h":77,"palette":117,"offset":207856,"ox":-29,"oy":-76,"compressed":false,"packed_size":1845},{"name":"char/darnell/laugh/0","w":62,"h":76,"palette":118,"offset":209855,"ox":-30,"oy":-75,"compressed":false,"packed_size":1760},{"name":"char/darnell/laugh/1","w":60,"h":77,"palette":119,"offset":211767,"ox":-29,"oy":-76,"compressed":false,"packed_size":1764},{"name":"char/darnell/lightCan/0","w":76,"h":74,"palette":120,"offset":213685,"ox":-26,"oy":-65,"compressed":false,"packed_size":1512},{"name":"char/darnell/lightCan/1","w":78,"h":75,"palette":121,"offset":215345,"ox":-26,"oy":-67,"compressed":false,"packed_size":1581},{"name":"char/darnell/kickCan/0","w":66,"h":81,"palette":122,"offset":217076,"ox":-31,"oy":-78,"compressed":false,"packed_size":1834},{"name":"char/darnell/kickCan/1","w":66,"h":80,"palette":123,"offset":219072,"ox":-30,"oy":-77,"compressed":false,"packed_size":1830},{"name":"char/darnell/kneeCan/0","w":61,"h":72,"palette":124,"offset":221062,"ox":-24,"oy":-69,"compressed":false,"packed_size":1702},{"name":"char/darnell/kneeCan/1","w":62,"h":72,"palette":125,"offset":222908,"ox":-25,"oy":-70,"compressed":false,"packed_size":1710},{"name":"char/darnell/pissed/1","w":59,"h":77,"palette":126,"offset":224762,"ox":-29,"oy":-76,"compressed":false,"packed_size":1644},{"name":"char/darnell-blazin/idle/0","w":60,"h":77,"palette":127,"offset":226560,"ox":-30,"oy":-77,"compressed":false,"packed_size":1736},{"name":"char/darnell-blazin/idle/1","w":61,"h":77,"palette":128,"offset":228450,"ox":-30,"oy":-77,"compressed":false,"packed_size":1746},{"name":"char/darnell-blazin/idle/2","w":60,"h":79,"palette":129,"offset":230350,"ox":-29,"oy":-79,"compressed":false,"packed_size":1759},{"name":"char/darnell-blazin/idle/3","w":60,"h":79,"palette":130,"offset":232267,"ox":-30,"oy":-79,"compressed":false,"packed_size":1763},{"name":"char/darnell-blazin/pissed/0","w":52,"h":75,"palette":131,"offset":234188,"ox":-27,"oy":-76,"compressed":false,"packed_size":1603},{"name":"char/darnell-blazin/pissed/1","w":51,"h":76,"palette":132,"offset":235941,"ox":-26,"oy":-77,"compressed":false,"packed_size":1582},{"name":"char/darnell-blazin/cringe/0","w":51,"h":78,"palette":133,"offset":237675,"ox":-26,"oy":-78,"compressed":false,"packed_size":1612},{"name":"char/darnell-blazin/cringe/1","w":53,"h":79,"palette":134,"offset":239443,"ox":-27,"oy":-79,"compressed":false,"packed_size":1655},{"name":"char/darnell-blazin/fakeout/0","w":75,"h":67,"palette":135,"offset":241256,"ox":-30,"oy":-68,"compressed":false,"packed_size":1636},{"name":"char/darnell-blazin/fakeout/1","w":72,"h":67,"palette":136,"offset":243026,"ox":-30,"oy":-68,"compressed":false,"packed_size":1643},{"name":"char/darnell-blazin/block/0","w":64,"h":81,"palette":137,"offset":244803,"ox":-36,"oy":-80,"compressed":false,"packed_size":1743},{"name":"char/darnell-blazin/block/1","w":61,"h":81,"palette":138,"offset":246708,"ox":-33,"oy":-80,"compressed":false,"packed_size":1741},{"name":"char/darnell-blazin/dodge/0","w":58,"h":71,"palette":139,"offset":248611,"ox":-23,"oy":-72,"compressed":false,"packed_size":1507},{"name":"char/darnell-blazin/dodge/1","w":58,"h":72,"palette":140,"offset":250260,"ox":-23,"oy":-73,"compressed":false,"packed_size":1541},{"name":"char/darnell-blazin/uppercutPrep/0","w":74,"h":51,"palette":141,"offset":251945,"ox":-38,"oy":-53,"compressed":false,"packed_size":1522},{"name":"char/darnell-blazin/uppercutPrep/1","w":74,"h":53,"palette":142,"offset":253569,"ox":-37,"oy":-55,"compressed":false,"packed_size":1572},{"name":"char/darnell-blazin/uppercut/0","w":74,"h":83,"palette":143,"offset":255247,"ox":-29,"oy":-85,"compressed":false,"packed_size":2056},{"name":"char/darnell-blazin/uppercut/1","w":72,"h":81,"palette":144,"offset":257469,"ox":-30,"oy":-83,"compressed":false,"packed_size":2040},{"name":"char/darnell-blazin/uppercutHit/0","w":70,"h":90,"palette":145,"offset":259671,"ox":-32,"oy":-91,"compressed":false,"packed_size":2029},{"name":"char/darnell-blazin/uppercutHit/1","w":65,"h":77,"palette":146,"offset":261880,"ox":-34,"oy":-76,"compressed":false,"packed_size":1784},{"name":"char/darnell-blazin/punchHigh1/0","w":83,"h":79,"palette":147,"offset":263818,"ox":-22,"oy":-79,"compressed":false,"packed_size":1783},{"name":"char/darnell-blazin/punchHigh1/1","w":80,"h":79,"palette":148,"offset":265759,"ox":-23,"oy":-79,"compressed":false,"packed_size":1767},{"name":"char/darnell-blazin/punchHigh2/0","w":82,"h":74,"palette":149,"offset":267684,"ox":-23,"oy":-75,"compressed":false,"packed_size":1759},{"name":"char/darnell-blazin/punchHigh2/1","w":79,"h":73,"palette":150,"offset":269591,"ox":-23,"oy":-74,"compressed":false,"packed_size":1748},{"name":"char/darnell-blazin/punchLow1/0","w":80,"h":69,"palette":151,"offset":271485,"ox":-20,"oy":-69,"compressed":false,"packed_size":1727},{"name":"char/darnell-blazin/punchLow1/1","w":76,"h":70,"palette":152,"offset":273350,"ox":-20,"oy":-70,"compressed":false,"packed_size":1709},{"name":"char/darnell-blazin/punchLow2/0","w":82,"h":70,"palette":153,"offset":275199,"ox":-21,"oy":-72,"compressed":false,"packed_size":1714},{"name":"char/darnell-blazin/punchLow2/1","w":80,"h":71,"palette":154,"offset":277053,"ox":-22,"oy":-73,"compressed":false,"packed_size":1733},{"name":"char/darnell-blazin/hitHigh/0","w":70,"h":89,"palette":155,"offset":278928,"ox":-35,"oy":-92,"compressed":false,"packed_size":1975},{"name":"char/darnell-blazin/hitHigh/1","w":66,"h":89,"palette":156,"offset":281081,"ox":-32,"oy":-91,"compressed":false,"packed_size":1921},{"name":"char/darnell-blazin/hitLow/0","w":98,"h":71,"palette":157,"offset":283180,"ox":-49,"oy":-71,"compressed":false,"packed_size":1845},{"name":"char/darnell-blazin/hitLow/1","w":64,"h":75,"palette":158,"offset":285167,"ox":-27,"oy":-75,"compressed":false,"packed_size":1714},{"name":"char/darnell-blazin/hitSpin/0","w":59,"h":86,"palette":159,"offset":287031,"ox":-22,"oy":-84,"compressed":false,"packed_size":1792},{"name":"char/darnell-blazin/hitSpin/1","w":66,"h":84,"palette":160,"offset":288995,"ox":-30,"oy":-85,"compressed":false,"packed_size":1775},{"name":"char/gf/danceLeft/0","w":61,"h":56,"palette":161,"offset":290938,"ox":-31,"oy":-55,"compressed":false,"packed_size":1181},{"name":"char/gf/danceLeft/1","w":61,"h":56,"palette":161,"offset":292231,"ox":-31,"oy":-55,"compressed":false,"packed_size":1192},{"name":"char/gf/danceLeft/2","w":61,"h":57,"palette":162,"offset":293535,"ox":-31,"oy":-56,"compressed":false,"packed_size":1196},{"name":"char/gf/danceLeft/3","w":61,"h":57,"palette":163,"offset":294845,"ox":-31,"oy":-56,"compressed":false,"packed_size":1201},{"name":"char/gf/danceRight/0","w":61,"h":56,"palette":164,"offset":296160,"ox":-31,"oy":-55,"compressed":false,"packed_size":1193},{"name":"char/gf/danceRight/1","w":61,"h":56,"palette":165,"offset":297465,"ox":-31,"oy":-55,"compressed":false,"packed_size":1190},{"name":"char/gf/danceRight/2","w":61,"h":56,"palette":166,"offset":298767,"ox":-31,"oy":-55,"compressed":false,"packed_size":1193},{"name":"char/gf/danceRight/3","w":61,"h":56,"palette":167,"offset":300072,"ox":-31,"oy":-55,"compressed":false,"packed_size":1193},{"name":"char/gf/singLEFT/0","w":61,"h":56,"palette":168,"offset":301377,"ox":-31,"oy":-55,"compressed":false,"packed_size":1182},{"name":"char/gf/singLEFT/1","w":61,"h":56,"palette":169,"offset":302671,"ox":-31,"oy":-55,"compressed":false,"packed_size":1191},{"name":"char/gf/singDOWN/0","w":61,"h":55,"palette":168,"offset":303974,"ox":-31,"oy":-54,"compressed":false,"packed_size":1182},{"name":"char/gf/singDOWN/1","w":61,"h":56,"palette":170,"offset":305266,"ox":-31,"oy":-55,"compressed":false,"packed_size":1191},{"name":"char/gf/singUP/0","w":61,"h":58,"palette":171,"offset":306569,"ox":-31,"oy":-57,"compressed":false,"packed_size":1219},{"name":"char/gf/singUP/1","w":61,"h":58,"palette":172,"offset":307904,"ox":-31,"oy":-57,"compressed":false,"packed_size":1216},{"name":"char/gf/singRIGHT/0","w":61,"h":55,"palette":173,"offset":309236,"ox":-31,"oy":-54,"compressed":false,"packed_size":1183},{"name":"char/gf/singRIGHT/1","w":61,"h":56,"palette":174,"offset":310529,"ox":-31,"oy":-55,"compressed":false,"packed_size":1186},{"name":"char/gf/cheer/0","w":61,"h":58,"palette":175,"offset":311827,"ox":-31,"oy":-57,"compressed":false,"packed_size":1210},{"name":"char/gf/cheer/1","w":61,"h":57,"palette":172,"offset":313153,"ox":-31,"oy":-56,"compressed":false,"packed_size":1207},{"name":"char/gf/drop70/0","w":61,"h":55,"palette":176,"offset":314474,"ox":-31,"oy":-54,"compressed":false,"packed_size":1183},{"name":"char/gf/drop70/1","w":61,"h":56,"palette":177,"offset":315767,"ox":-31,"oy":-55,"compressed":false,"packed_size":1187},{"name":"char/gf/hairBlow/0","w":61,"h":56,"palette":178,"offset":317066,"ox":-31,"oy":-55,"compressed":false,"packed_size":1300},{"name":"char/gf/hairBlow/1","w":61,"h":55,"palette":179,"offset":318478,"ox":-31,"oy":-54,"compressed":false,"packed_size":1283},{"name":"char/gf/hairFall/0","w":61,"h":56,"palette":180,"offset":319871,"ox":-31,"oy":-55,"compressed":false,"packed_size":1262},{"name":"char/gf/hairFall/1","w":61,"h":57,"palette":181,"offset":321245,"ox":-31,"oy":-56,"compressed":false,"packed_size":1203},{"name":"char/gf/scared/1","w":61,"h":56,"palette":177,"offset":322562,"ox":-31,"oy":-55,"compressed":false,"packed_size":1188},{"name":"char/gf-car/danceLeft/0","w":63,"h":58,"palette":182,"offset":323862,"ox":-31,"oy":-58,"compressed":false,"packed_size":1400},{"name":"char/gf-car/danceLeft/1","w":63,"h":58,"palette":183,"offset":325378,"ox":-31,"oy":-58,"compressed":false,"packed_size":1407},{"name":"char/gf-car/danceLeft/2","w":63,"h":58,"palette":184,"offset":326901,"ox":-31,"oy":-58,"compressed":false,"packed_size":1401},{"name":"char/gf-car/danceLeft/3","w":68,"h":58,"palette":185,"offset":328418,"ox":-31,"oy":-58,"compressed":false,"packed_size":1410},{"name":"char/gf-car/danceRight/0","w":65,"h":57,"palette":186,"offset":329944,"ox":-31,"oy":-57,"compressed":false,"packed_size":1410},{"name":"char/gf-car/danceRight/1","w":70,"h":57,"palette":187,"offset":331468,"ox":-31,"oy":-57,"compressed":false,"packed_size":1405},{"name":"char/gf-car/danceRight/2","w":69,"h":58,"palette":188,"offset":332987,"ox":-31,"oy":-58,"compressed":false,"packed_size":1421},{"name":"char/gf-car/danceRight/3","w":65,"h":59,"palette":189,"offset":334524,"ox":-31,"oy":-59,"compressed":false,"packed_size":1427},{"name":"char/gf-car/duck/0","w":65,"h":50,"palette":190,"offset":336069,"ox":-32,"oy":-50,"compressed":false,"packed_size":1189},{"name":"char/gf-car/duck/1","w":65,"h":52,"palette":191,"offset":337358,"ox":-32,"oy":-52,"compressed":false,"packed_size":1208},{"name":"char/gf-christmas/danceLeft/0","w":64,"h":56,"palette":192,"offset":338670,"ox":-32,"oy":-56,"compressed":false,"packed_size":1089},{"name":"char/gf-christmas/danceLeft/1","w":64,"h":56,"palette":193,"offset":339871,"ox":-32,"oy":-56,"compressed":false,"packed_size":1095},{"name":"char/gf-christmas/danceLeft/2","w":64,"h":57,"palette":194,"offset":341078,"ox":-32,"oy":-57,"compressed":false,"packed_size":1101},{"name":"char/gf-christmas/danceLeft/3","w":64,"h":56,"palette":195,"offset":342293,"ox":-32,"oy":-56,"compressed":false,"packed_size":1107},{"name":"char/gf-christmas/danceRight/0","w":64,"h":56,"palette":196,"offset":343512,"ox":-32,"oy":-56,"compressed":false,"packed_size":1091},{"name":"char/gf-christmas/danceRight/1","w":64,"h":56,"palette":197,"offset":344715,"ox":-32,"oy":-56,"compressed":false,"packed_size":1096},{"name":"char/gf-christmas/danceRight/2","w":64,"h":56,"palette":198,"offset":345923,"ox":-32,"oy":-56,"compressed":false,"packed_size":1096},{"name":"char/gf-christmas/danceRight/3","w":64,"h":56,"palette":199,"offset":347131,"ox":-32,"oy":-56,"compressed":false,"packed_size":1096},{"name":"char/gf-christmas/combo50/0","w":64,"h":57,"palette":200,"offset":348339,"ox":-32,"oy":-56,"compressed":false,"packed_size":1104},{"name":"char/gf-christmas/combo50/1","w":64,"h":57,"palette":201,"offset":349557,"ox":-32,"oy":-56,"compressed":false,"packed_size":1103},{"name":"char/gf-christmas/drop70/0","w":64,"h":55,"palette":202,"offset":350774,"ox":-36,"oy":-29,"compressed":false,"packed_size":1091},{"name":"char/gf-christmas/drop70/1","w":64,"h":55,"palette":203,"offset":351975,"ox":-36,"oy":-29,"compressed":false,"packed_size":1100},{"name":"char/gf-dark/danceLeft/0","w":61,"h":56,"palette":204,"offset":353185,"ox":-31,"oy":-55,"compressed":false,"packed_size":1181},{"name":"char/gf-dark/danceLeft/1","w":61,"h":56,"palette":205,"offset":354478,"ox":-31,"oy":-55,"compressed":false,"packed_size":1192},{"name":"char/gf-dark/danceLeft/2","w":61,"h":57,"palette":206,"offset":355782,"ox":-31,"oy":-56,"compressed":false,"packed_size":1196},{"name":"char/gf-dark/danceLeft/3","w":61,"h":57,"palette":207,"offset":357092,"ox":-31,"oy":-56,"compressed":false,"packed_size":1201},{"name":"char/gf-dark/danceRight/0","w":61,"h":56,"palette":208,"offset":358407,"ox":-31,"oy":-55,"compressed":false,"packed_size":1193},{"name":"char/gf-dark/danceRight/1","w":61,"h":56,"palette":209,"offset":359712,"ox":-31,"oy":-55,"compressed":false,"packed_size":1190},{"name":"char/gf-dark/danceRight/2","w":61,"h":56,"palette":207,"offset":361014,"ox":-31,"oy":-55,"compressed":false,"packed_size":1192},{"name":"char/gf-dark/danceRight/3","w":61,"h":56,"palette":204,"offset":362318,"ox":-31,"oy":-55,"compressed":false,"packed_size":1191},{"name":"char/gf-dark/combo50/0","w":61,"h":58,"palette":210,"offset":363621,"ox":-31,"oy":-57,"compressed":false,"packed_size":1210},{"name":"char/gf-dark/combo50/1","w":61,"h":57,"palette":211,"offset":364947,"ox":-31,"oy":-56,"compressed":false,"packed_size":1207},{"name":"char/gf-dark/drop70/0","w":61,"h":55,"palette":212,"offset":366268,"ox":-31,"oy":-54,"compressed":false,"packed_size":1183},{"name":"char/gf-dark/drop70/1","w":61,"h":56,"palette":213,"offset":367561,"ox":-31,"oy":-55,"compressed":false,"packed_size":1187},{"name":"char/gf-dark/scared/1","w":61,"h":56,"palette":214,"offset":368860,"ox":-31,"oy":-55,"compressed":false,"packed_size":1191},{"name":"char/gf-pixel/danceLeft/0","w":66,"h":59,"palette":215,"offset":370163,"ox":-33,"oy":-59,"compressed":false,"packed_size":1320},{"name":"char/gf-pixel/danceLeft/1","w":65,"h":60,"palette":216,"offset":371601,"ox":-33,"oy":-60,"compressed":false,"packed_size":1321},{"name":"char/gf-pixel/danceLeft/2","w":63,"h":61,"palette":217,"offset":373042,"ox":-32,"oy":-61,"compressed":false,"packed_size":1324},{"name":"char/gf-pixel/danceLeft/3","w":63,"h":60,"palette":218,"offset":374488,"ox":-32,"oy":-60,"compressed":false,"packed_size":1302},{"name":"char/gf-pixel/danceRight/0","w":66,"h":58,"palette":219,"offset":375910,"ox":-33,"oy":-58,"compressed":false,"packed_size":1314},{"name":"char/gf-pixel/danceRight/1","w":63,"h":61,"palette":220,"offset":377340,"ox":-32,"oy":-61,"compressed":false,"packed_size":1311},{"name":"char/gf-pixel/danceRight/3","w":63,"h":61,"palette":221,"offset":378773,"ox":-32,"oy":-61,"compressed":false,"packed_size":1307},{"name":"char/gf-tankmen/danceLeft/0","w":83,"h":58,"palette":222,"offset":380202,"ox":-42,"oy":-58,"compressed":false,"packed_size":2039},{"name":"char/gf-tankmen/danceLeft/1","w":83,"h":58,"palette":223,"offset":382357,"ox":-42,"oy":-58,"compressed":false,"packed_size":2047},{"name":"char/gf-tankmen/danceLeft/2","w":83,"h":59,"palette":224,"offset":384520,"ox":-42,"oy":-59,"compressed":false,"packed_size":2073},{"name":"char/gf-tankmen/danceLeft/3","w":83,"h":59,"palette":225,"offset":386711,"ox":-42,"oy":-59,"compressed":false,"packed_size":2069},{"name":"char/gf-tankmen/danceRight/0","w":83,"h":58,"palette":226,"offset":388898,"ox":-42,"oy":-58,"compressed":false,"packed_size":2036},{"name":"char/gf-tankmen/danceRight/1","w":83,"h":58,"palette":227,"offset":391050,"ox":-42,"oy":-58,"compressed":false,"packed_size":2041},{"name":"char/gf-tankmen/danceRight/2","w":83,"h":59,"palette":228,"offset":393207,"ox":-42,"oy":-59,"compressed":false,"packed_size":2076},{"name":"char/gf-tankmen/danceRight/3","w":83,"h":59,"palette":229,"offset":395401,"ox":-42,"oy":-59,"compressed":false,"packed_size":2060},{"name":"char/gf-tankmen/sad/0","w":83,"h":58,"palette":230,"offset":397579,"ox":-42,"oy":-58,"compressed":false,"packed_size":2022},{"name":"char/gf-tankmen/sad/1","w":83,"h":58,"palette":231,"offset":399717,"ox":-42,"oy":-58,"compressed":false,"packed_size":2025},{"name":"char/mom-car/idle/0","w":48,"h":84,"palette":232,"offset":401858,"ox":-24,"oy":-84,"compressed":false,"packed_size":1307},{"name":"char/mom-car/idle/1","w":47,"h":83,"palette":233,"offset":403333,"ox":-23,"oy":-83,"compressed":false,"packed_size":1302},{"name":"char/mom-car/idle/2","w":49,"h":83,"palette":234,"offset":404801,"ox":-23,"oy":-83,"compressed":false,"packed_size":1313},{"name":"char/mom-car/idle/3","w":49,"h":84,"palette":235,"offset":406280,"ox":-23,"oy":-84,"compressed":false,"packed_size":1316},{"name":"char/mom-car/singLEFT/0","w":58,"h":83,"palette":236,"offset":407764,"ox":-10,"oy":-30,"compressed":false,"packed_size":1434},{"name":"char/mom-car/singLEFT/1","w":58,"h":84,"palette":237,"offset":409364,"ox":-10,"oy":-31,"compressed":false,"packed_size":1414},{"name":"char/mom-car/singDOWN/0","w":46,"h":62,"palette":238,"offset":410946,"ox":10,"oy":-20,"compressed":false,"packed_size":1123},{"name":"char/mom-car/singDOWN/1","w":46,"h":64,"palette":239,"offset":412193,"ox":11,"oy":-22,"compressed":false,"packed_size":1137},{"name":"char/mom-car/singUP/0","w":47,"h":87,"palette":240,"offset":413458,"ox":-30,"oy":-101,"compressed":false,"packed_size":1270},{"name":"char/mom-car/singUP/1","w":47,"h":89,"palette":241,"offset":414902,"ox":-29,"oy":-102,"compressed":false,"packed_size":1288},{"name":"char/mom-car/singRIGHT/0","w":69,"h":79,"palette":242,"offset":416368,"ox":7,"oy":-31,"compressed":false,"packed_size":1332},{"name":"char/mom-car/singRIGHT/1","w":68,"h":77,"palette":243,"offset":417858,"ox":7,"oy":-29,"compressed":false,"packed_size":1315},{"name":"char/monster/idle/0","w":57,"h":84,"palette":244,"offset":419327,"ox":-29,"oy":-84,"compressed":false,"packed_size":1644},{"name":"char/monster/idle/1","w":58,"h":88,"palette":245,"offset":421139,"ox":-30,"oy":-88,"compressed":false,"packed_size":1571},{"name":"char/monster/idle/2","w":65,"h":93,"palette":246,"offset":422886,"ox":-35,"oy":-93,"compressed":false,"packed_size":1594},{"name":"char/monster/idle/3","w":65,"h":94,"palette":247,"offset":424666,"ox":-35,"oy":-94,"compressed":false,"packed_size":1607},{"name":"char/monster/singLEFT/0","w":50,"h":95,"palette":248,"offset":426461,"ox":-30,"oy":-95,"compressed":false,"packed_size":1629},{"name":"char/monster/singLEFT/1","w":50,"h":94,"palette":249,"offset":428280,"ox":-30,"oy":-94,"compressed":false,"packed_size":1617},{"name":"char/monster/singDOWN/0","w":57,"h":81,"palette":250,"offset":430085,"ox":-27,"oy":-81,"compressed":false,"packed_size":1632},{"name":"char/monster/singDOWN/1","w":58,"h":82,"palette":251,"offset":431879,"ox":-29,"oy":-82,"compressed":false,"packed_size":1558},{"name":"char/monster/singUP/0","w":54,"h":99,"palette":252,"offset":433601,"ox":-30,"oy":-101,"compressed":false,"packed_size":1573},{"name":"char/monster/singUP/1","w":56,"h":96,"palette":253,"offset":435372,"ox":-31,"oy":-97,"compressed":false,"packed_size":1517},{"name":"char/monster/singRIGHT/0","w":61,"h":94,"palette":254,"offset":437081,"ox":-28,"oy":-95,"compressed":false,"packed_size":1689},{"name":"char/monster/singRIGHT/1","w":63,"h":94,"palette":255,"offset":438958,"ox":-30,"oy":-94,"compressed":false,"packed_size":1618},{"name":"char/nene/danceLeft/0","w":49,"h":71,"palette":256,"offset":440764,"ox":-22,"oy":-73,"compressed":false,"packed_size":1261},{"name":"char/nene/danceLeft/1","w":64,"h":73,"palette":257,"offset":442167,"ox":-37,"oy":-73,"compressed":false,"packed_size":1290},{"name":"char/nene/danceLeft/2","w":68,"h":73,"palette":258,"offset":443603,"ox":-37,"oy":-74,"compressed":false,"packed_size":1310},{"name":"char/nene/danceLeft/3","w":67,"h":73,"palette":259,"offset":445059,"ox":-36,"oy":-74,"compressed":false,"packed_size":1307},{"name":"char/nene/danceRight/0","w":61,"h":61,"palette":260,"offset":446512,"ox":-27,"oy":-71,"compressed":false,"packed_size":1260},{"name":"char/nene/danceRight/1","w":55,"h":54,"palette":261,"offset":447894,"ox":-22,"oy":-71,"compressed":false,"packed_size":1175},{"name":"char/nene/danceRight/2","w":53,"h":57,"palette":262,"offset":449177,"ox":-22,"oy":-74,"compressed":false,"packed_size":1144},{"name":"char/nene/danceRight/3","w":53,"h":62,"palette":263,"offset":450435,"ox":-22,"oy":-74,"compressed":false,"packed_size":1215},{"name":"char/nene/combo50/0","w":45,"h":67,"palette":264,"offset":451774,"ox":-18,"oy":-75,"compressed":false,"packed_size":1120},{"name":"char/nene/combo50/1","w":48,"h":67,"palette":265,"offset":453028,"ox":-20,"oy":-75,"compressed":false,"packed_size":1181},{"name":"char/nene/drop70/0","w":73,"h":70,"palette":266,"offset":454343,"ox":-38,"oy":-68,"compressed":false,"packed_size":1415},{"name":"char/nene/drop70/1","w":58,"h":69,"palette":267,"offset":455898,"ox":-32,"oy":-74,"compressed":false,"packed_size":1214},{"name":"char/nene/combo200/0","w":64,"h":71,"palette":268,"offset":457250,"ox":-30,"oy":-71,"compressed":false,"packed_size":1186},{"name":"char/nene/combo200/1","w":63,"h":69,"palette":269,"offset":458578,"ox":-29,"oy":-71,"compressed":false,"packed_size":1203},{"name":"char/nene/raiseKnife/0","w":68,"h":73,"palette":270,"offset":459919,"ox":-37,"oy":-74,"compressed":false,"packed_size":1323},{"name":"char/nene/raiseKnife/1","w":52,"h":80,"palette":271,"offset":461388,"ox":-22,"oy":-81,"compressed":false,"packed_size":1387},{"name":"char/nene/lowerKnife/0","w":52,"h":80,"palette":272,"offset":462935,"ox":-22,"oy":-81,"compressed":false,"packed_size":1385},{"name":"char/nene/lowerKnife/1","w":55,"h":56,"palette":273,"offset":464480,"ox":-22,"oy":-71,"compressed":false,"packed_size":1215},{"name":"char/nene/hairBlowNormal/0","w":62,"h":69,"palette":274,"offset":465807,"ox":-36,"oy":-70,"compressed":false,"packed_size":1270},{"name":"char/nene/hairBlowNormal/1","w":62,"h":69,"palette":275,"offset":467215,"ox":-36,"oy":-70,"compressed":false,"packed_size":1244},{"name":"char/nene/hairBlowKnife/0","w":50,"h":78,"palette":276,"offset":468597,"ox":-23,"oy":-79,"compressed":false,"packed_size":1336},{"name":"char/nene/hairBlowKnife/1","w":49,"h":78,"palette":277,"offset":470089,"ox":-23,"oy":-79,"compressed":false,"packed_size":1303},{"name":"char/nene/hairFallKnife/1","w":52,"h":80,"palette":271,"offset":471548,"ox":-22,"oy":-81,"compressed":false,"packed_size":1387},{"name":"char/nene-christmas/danceLeft/0","w":47,"h":70,"palette":278,"offset":473095,"ox":-21,"oy":-73,"compressed":false,"packed_size":1273},{"name":"char/nene-christmas/danceLeft/1","w":62,"h":71,"palette":279,"offset":474508,"ox":-36,"oy":-73,"compressed":false,"packed_size":1285},{"name":"char/nene-christmas/danceLeft/2","w":66,"h":71,"palette":280,"offset":475935,"ox":-37,"oy":-74,"compressed":false,"packed_size":1304},{"name":"char/nene-christmas/danceLeft/3","w":66,"h":71,"palette":281,"offset":477381,"ox":-36,"oy":-74,"compressed":false,"packed_size":1306},{"name":"char/nene-christmas/danceRight/0","w":59,"h":60,"palette":282,"offset":478829,"ox":-27,"oy":-72,"compressed":false,"packed_size":1256},{"name":"char/nene-christmas/danceRight/1","w":52,"h":53,"palette":283,"offset":480205,"ox":-20,"oy":-72,"compressed":false,"packed_size":1164},{"name":"char/nene-christmas/danceRight/2","w":50,"h":55,"palette":284,"offset":481475,"ox":-20,"oy":-74,"compressed":false,"packed_size":1130},{"name":"char/nene-christmas/danceRight/3","w":49,"h":60,"palette":285,"offset":482715,"ox":-20,"oy":-74,"compressed":false,"packed_size":1182},{"name":"char/nene-christmas/combo50/0","w":44,"h":64,"palette":286,"offset":484017,"ox":-18,"oy":-76,"compressed":false,"packed_size":1111},{"name":"char/nene-christmas/combo50/1","w":47,"h":64,"palette":287,"offset":485256,"ox":-20,"oy":-75,"compressed":false,"packed_size":1148},{"name":"char/nene-christmas/drop70/0","w":72,"h":69,"palette":288,"offset":486532,"ox":-38,"oy":-68,"compressed":false,"packed_size":1431},{"name":"char/nene-christmas/drop70/1","w":57,"h":67,"palette":289,"offset":488101,"ox":-32,"oy":-75,"compressed":false,"packed_size":1196},{"name":"char/nene-christmas/combo200/0","w":56,"h":69,"palette":290,"offset":489431,"ox":-23,"oy":-71,"compressed":false,"packed_size":1182},{"name":"char/nene-christmas/combo200/1","w":54,"h":68,"palette":291,"offset":490751,"ox":-22,"oy":-72,"compressed":false,"packed_size":1183},{"name":"char/nene-christmas/raiseKnife/0","w":66,"h":72,"palette":292,"offset":492070,"ox":-37,"oy":-74,"compressed":false,"packed_size":1328},{"name":"char/nene-christmas/raiseKnife/1","w":49,"h":80,"palette":293,"offset":493542,"ox":-20,"oy":-82,"compressed":false,"packed_size":1386},{"name":"char/nene-christmas/lowerKnife/0","w":49,"h":80,"palette":294,"offset":495088,"ox":-20,"oy":-82,"compressed":false,"packed_size":1394},{"name":"char/nene-christmas/lowerKnife/1","w":52,"h":54,"palette":295,"offset":496642,"ox":-20,"oy":-72,"compressed":false,"packed_size":1177},{"name":"char/nene-dark/danceLeft/0","w":49,"h":71,"palette":296,"offset":497927,"ox":-22,"oy":-73,"compressed":false,"packed_size":1261},{"name":"char/nene-dark/danceLeft/1","w":64,"h":73,"palette":297,"offset":499330,"ox":-37,"oy":-73,"compressed":false,"packed_size":1290},{"name":"char/nene-dark/danceLeft/2","w":68,"h":73,"palette":298,"offset":500766,"ox":-37,"oy":-74,"compressed":false,"packed_size":1310},{"name":"char/nene-dark/danceLeft/3","w":67,"h":73,"palette":299,"offset":502222,"ox":-36,"oy":-74,"compressed":false,"packed_size":1307},{"name":"char/nene-dark/danceRight/0","w":61,"h":61,"palette":300,"offset":503675,"ox":-27,"oy":-71,"compressed":false,"packed_size":1260},{"name":"char/nene-dark/danceRight/1","w":55,"h":54,"palette":301,"offset":505057,"ox":-22,"oy":-71,"compressed":false,"packed_size":1175},{"name":"char/nene-dark/danceRight/2","w":53,"h":57,"palette":301,"offset":506340,"ox":-22,"oy":-74,"compressed":false,"packed_size":1144},{"name":"char/nene-dark/danceRight/3","w":53,"h":62,"palette":302,"offset":507598,"ox":-22,"oy":-74,"compressed":false,"packed_size":1215},{"name":"char/nene-dark/combo50/0","w":45,"h":67,"palette":303,"offset":508937,"ox":-18,"oy":-75,"compressed":false,"packed_size":1120},{"name":"char/nene-dark/combo50/1","w":48,"h":67,"palette":304,"offset":510191,"ox":-20,"oy":-75,"compressed":false,"packed_size":1181},{"name":"char/nene-dark/drop70/0","w":73,"h":70,"palette":305,"offset":511506,"ox":-38,"oy":-68,"compressed":false,"packed_size":1415},{"name":"char/nene-dark/drop70/1","w":58,"h":69,"palette":306,"offset":513061,"ox":-32,"oy":-74,"compressed":false,"packed_size":1214},{"name":"char/nene-dark/combo200/0","w":64,"h":71,"palette":307,"offset":514413,"ox":-30,"oy":-71,"compressed":false,"packed_size":1186},{"name":"char/nene-dark/combo200/1","w":63,"h":69,"palette":308,"offset":515741,"ox":-29,"oy":-71,"compressed":false,"packed_size":1203},{"name":"char/nene-dark/raiseKnife/0","w":68,"h":73,"palette":309,"offset":517082,"ox":-37,"oy":-74,"compressed":false,"packed_size":1323},{"name":"char/nene-dark/raiseKnife/1","w":52,"h":80,"palette":310,"offset":518551,"ox":-22,"oy":-81,"compressed":false,"packed_size":1387},{"name":"char/nene-dark/lowerKnife/0","w":52,"h":80,"palette":310,"offset":520098,"ox":-22,"oy":-81,"compressed":false,"packed_size":1385},{"name":"char/nene-dark/lowerKnife/1","w":55,"h":56,"palette":311,"offset":521643,"ox":-22,"oy":-71,"compressed":false,"packed_size":1215},{"name":"char/nene-pixel/danceLeft/0","w":76,"h":76,"palette":312,"offset":522970,"ox":-38,"oy":-76,"compressed":false,"packed_size":1480},{"name":"char/nene-pixel/danceLeft/1","w":76,"h":60,"palette":313,"offset":524602,"ox":-36,"oy":-74,"compressed":false,"packed_size":1378},{"name":"char/nene-pixel/danceLeft/2","w":54,"h":60,"palette":314,"offset":526100,"ox":-17,"oy":-77,"compressed":false,"packed_size":1342},{"name":"char/nene-pixel/danceLeft/3","w":54,"h":60,"palette":315,"offset":527562,"ox":-17,"oy":-77,"compressed":false,"packed_size":1333},{"name":"char/nene-pixel/danceRight/0","w":54,"h":60,"palette":316,"offset":529015,"ox":-17,"oy":-77,"compressed":false,"packed_size":1343},{"name":"char/nene-pixel/danceRight/1","w":54,"h":72,"palette":317,"offset":530478,"ox":-19,"oy":-75,"compressed":false,"packed_size":1459},{"name":"char/nene-pixel/danceRight/2","w":74,"h":77,"palette":318,"offset":532081,"ox":-37,"oy":-77,"compressed":false,"packed_size":1491},{"name":"char/nene-pixel/danceRight/3","w":75,"h":77,"palette":319,"offset":533726,"ox":-38,"oy":-77,"compressed":false,"packed_size":1492},{"name":"char/nene-pixel/raiseKnife/0","w":74,"h":77,"palette":320,"offset":535372,"ox":-36,"oy":-77,"compressed":false,"packed_size":1485},{"name":"char/nene-pixel/raiseKnife/1","w":55,"h":87,"palette":321,"offset":537011,"ox":-17,"oy":-87,"compressed":false,"packed_size":1568},{"name":"char/nene-pixel/idleKnifeBlink/0","w":54,"h":87,"palette":322,"offset":538753,"ox":-16,"oy":-87,"compressed":false,"packed_size":1563},{"name":"char/nene-pixel/idleKnifeBlink/1","w":54,"h":87,"palette":323,"offset":540490,"ox":-16,"oy":-87,"compressed":false,"packed_size":1563},{"name":"char/nene-pixel/lowerKnife/0","w":55,"h":86,"palette":324,"offset":542227,"ox":-17,"oy":-86,"compressed":false,"packed_size":1572},{"name":"char/otis-speaker/idle/0","w":69,"h":55,"palette":325,"offset":543971,"ox":-34,"oy":-55,"compressed":false,"packed_size":1335},{"name":"char/otis-speaker/idle/1","w":71,"h":54,"palette":326,"offset":545416,"ox":-36,"oy":-54,"compressed":false,"packed_size":1359},{"name":"char/otis-speaker/idle/2","w":73,"h":54,"palette":327,"offset":546883,"ox":-36,"oy":-54,"compressed":false,"packed_size":1361},{"name":"char/otis-speaker/shoot1/0","w":125,"h":55,"palette":328,"offset":548352,"ox":-36,"oy":-55,"compressed":false,"packed_size":1576},{"name":"char/otis-speaker/shoot1/1","w":106,"h":56,"palette":329,"offset":550038,"ox":-29,"oy":-56,"compressed":false,"packed_size":1496},{"name":"char/otis-speaker/shoot2/0","w":109,"h":58,"palette":330,"offset":551646,"ox":-23,"oy":-58,"compressed":false,"packed_size":1330},{"name":"char/otis-speaker/shoot2/1","w":103,"h":57,"palette":331,"offset":553092,"ox":-26,"oy":-57,"compressed":false,"packed_size":1322},{"name":"char/otis-speaker/shoot3/0","w":110,"h":54,"palette":332,"offset":554528,"ox":-70,"oy":-54,"compressed":false,"packed_size":1471},{"name":"char/otis-speaker/shoot3/1","w":90,"h":61,"palette":333,"offset":556107,"ox":-49,"oy":-61,"compressed":false,"packed_size":1469},{"name":"char/otis-speaker/shoot4/0","w":104,"h":58,"palette":334,"offset":557698,"ox":-73,"oy":-58,"compressed":false,"packed_size":1295},{"name":"char/otis-speaker/shoot4/1","w":96,"h":57,"palette":335,"offset":559109,"ox":-64,"oy":-57,"compressed":false,"packed_size":1295},{"name":"char/parents-christmas/idle/0","w":94,"h":83,"palette":336,"offset":560518,"ox":-47,"oy":-83,"compressed":false,"packed_size":2753},{"name":"char/parents-christmas/idle/1","w":94,"h":82,"palette":337,"offset":563437,"ox":-47,"oy":-82,"compressed":false,"packed_size":2736},{"name":"char/parents-christmas/idle/2","w":93,"h":84,"palette":338,"offset":566337,"ox":-46,"oy":-84,"compressed":false,"packed_size":2738},{"name":"char/parents-christmas/idle/3","w":93,"h":84,"palette":338,"offset":569243,"ox":-46,"oy":-84,"compressed":false,"packed_size":2736},{"name":"char/parents-christmas/singLEFT/0","w":84,"h":86,"palette":339,"offset":572147,"ox":-44,"oy":-86,"compressed":false,"packed_size":2583},{"name":"char/parents-christmas/singLEFT/1","w":86,"h":86,"palette":340,"offset":574902,"ox":-45,"oy":-86,"compressed":false,"packed_size":2614},{"name":"char/parents-christmas/singDOWN/0","w":91,"h":81,"palette":341,"offset":577688,"ox":-43,"oy":-81,"compressed":false,"packed_size":2646},{"name":"char/parents-christmas/singDOWN/1","w":91,"h":82,"palette":342,"offset":580496,"ox":-44,"oy":-82,"compressed":false,"packed_size":2652},{"name":"char/parents-christmas/singUP/0","w":85,"h":87,"palette":343,"offset":583312,"ox":-42,"oy":-87,"compressed":false,"packed_size":2606},{"name":"char/parents-christmas/singUP/1","w":86,"h":87,"palette":344,"offset":586092,"ox":-43,"oy":-87,"compressed":false,"packed_size":2618},{"name":"char/parents-christmas/singRIGHT/0","w":102,"h":80,"palette":345,"offset":588884,"ox":-47,"oy":-80,"compressed":false,"packed_size":2867},{"name":"char/parents-christmas/singRIGHT/1","w":103,"h":82,"palette":346,"offset":591911,"ox":-48,"oy":-82,"compressed":false,"packed_size":2863},{"name":"char/parents-christmas/singLEFT-alt/0","w":84,"h":86,"palette":347,"offset":594938,"ox":-44,"oy":-86,"compressed":false,"packed_size":2586},{"name":"char/parents-christmas/singLEFT-alt/1","w":86,"h":86,"palette":348,"offset":597696,"ox":-45,"oy":-86,"compressed":false,"packed_size":2612},{"name":"char/parents-christmas/singDOWN-alt/0","w":91,"h":81,"palette":349,"offset":600480,"ox":-43,"oy":-81,"compressed":false,"packed_size":2651},{"name":"char/parents-christmas/singDOWN-alt/1","w":91,"h":82,"palette":350,"offset":603293,"ox":-44,"oy":-82,"compressed":false,"packed_size":2650},{"name":"char/parents-christmas/singUP-alt/0","w":85,"h":88,"palette":351,"offset":606107,"ox":-42,"oy":-87,"compressed":false,"packed_size":2609},{"name":"char/parents-christmas/singUP-alt/1","w":86,"h":87,"palette":352,"offset":608892,"ox":-43,"oy":-86,"compressed":false,"packed_size":2620},{"name":"char/parents-christmas/singRIGHT-alt/0","w":102,"h":81,"palette":353,"offset":611686,"ox":-47,"oy":-81,"compressed":false,"packed_size":2870},{"name":"char/parents-christmas/singRIGHT-alt/1","w":103,"h":82,"palette":354,"offset":614718,"ox":-48,"oy":-82,"compressed":false,"packed_size":2868},{"name":"char/pico/idle/0","w":60,"h":63,"palette":355,"offset":617750,"ox":-32,"oy":-63,"compressed":false,"packed_size":1442},{"name":"char/pico/idle/1","w":62,"h":64,"palette":356,"offset":619318,"ox":-31,"oy":-64,"compressed":false,"packed_size":1520},{"name":"char/pico/idle/2","w":61,"h":66,"palette":357,"offset":620966,"ox":-30,"oy":-65,"compressed":false,"packed_size":1546},{"name":"char/pico/singRIGHT/0","w":62,"h":64,"palette":358,"offset":622644,"ox":-20,"oy":-63,"compressed":false,"packed_size":1297},{"name":"char/pico/singRIGHT/1","w":63,"h":64,"palette":359,"offset":624069,"ox":-20,"oy":-63,"compressed":false,"packed_size":1326},{"name":"char/pico/singDOWN/0","w":100,"h":53,"palette":360,"offset":625523,"ox":-58,"oy":-52,"compressed":false,"packed_size":1245},{"name":"char/pico/singDOWN/1","w":69,"h":54,"palette":361,"offset":626874,"ox":-25,"oy":-53,"compressed":false,"packed_size":1274},{"name":"char/pico/singUP/0","w":60,"h":69,"palette":362,"offset":628256,"ox":-27,"oy":-69,"compressed":false,"packed_size":1402},{"name":"char/pico/singUP/1","w":59,"h":68,"palette":363,"offset":629796,"ox":-27,"oy":-68,"compressed":false,"packed_size":1441},{"name":"char/pico/singLEFT/0","w":63,"h":66,"palette":364,"offset":631373,"ox":-40,"oy":-65,"compressed":false,"packed_size":1318},{"name":"char/pico/singLEFT/1","w":61,"h":65,"palette":365,"offset":632823,"ox":-37,"oy":-64,"compressed":false,"packed_size":1323},{"name":"char/pico-blazin/idle/0","w":52,"h":63,"palette":366,"offset":634276,"ox":-26,"oy":-63,"compressed":false,"packed_size":1195},{"name":"char/pico-blazin/idle/1","w":52,"h":64,"palette":367,"offset":635597,"ox":-26,"oy":-64,"compressed":false,"packed_size":1192},{"name":"char/pico-blazin/idle/2","w":52,"h":64,"palette":368,"offset":636917,"ox":-26,"oy":-64,"compressed":false,"packed_size":1191},{"name":"char/pico-blazin/idle/3","w":52,"h":63,"palette":369,"offset":638236,"ox":-26,"oy":-63,"compressed":false,"packed_size":1195},{"name":"char/pico-blazin/block/0","w":58,"h":64,"palette":370,"offset":639557,"ox":-35,"oy":-64,"compressed":false,"packed_size":1274},{"name":"char/pico-blazin/block/1","w":57,"h":64,"palette":371,"offset":640959,"ox":-34,"oy":-64,"compressed":false,"packed_size":1287},{"name":"char/pico-blazin/dodge/0","w":46,"h":62,"palette":372,"offset":642374,"ox":-24,"oy":-62,"compressed":false,"packed_size":1155},{"name":"char/pico-blazin/dodge/1","w":46,"h":62,"palette":373,"offset":643653,"ox":-24,"oy":-61,"compressed":false,"packed_size":1170},{"name":"char/pico-blazin/fakeout/0","w":58,"h":60,"palette":374,"offset":644947,"ox":-25,"oy":-60,"compressed":false,"packed_size":1200},{"name":"char/pico-blazin/fakeout/1","w":59,"h":61,"palette":375,"offset":646267,"ox":-25,"oy":-61,"compressed":false,"packed_size":1188},{"name":"char/pico-blazin/taunt/0","w":52,"h":62,"palette":376,"offset":647577,"ox":-21,"oy":-62,"compressed":false,"packed_size":1208},{"name":"char/pico-blazin/taunt/1","w":47,"h":63,"palette":377,"offset":648909,"ox":-21,"oy":-63,"compressed":false,"packed_size":1188},{"name":"char/pico-blazin/punchHigh1/0","w":72,"h":62,"palette":378,"offset":650223,"ox":-25,"oy":-62,"compressed":false,"packed_size":1283},{"name":"char/pico-blazin/punchHigh1/1","w":67,"h":62,"palette":379,"offset":651630,"ox":-25,"oy":-62,"compressed":false,"packed_size":1256},{"name":"char/pico-blazin/punchHigh2/0","w":68,"h":62,"palette":380,"offset":653010,"ox":-23,"oy":-60,"compressed":false,"packed_size":1240},{"name":"char/pico-blazin/punchHigh2/1","w":66,"h":62,"palette":381,"offset":654374,"ox":-24,"oy":-60,"compressed":false,"packed_size":1236},{"name":"char/pico-blazin/punchLow1/0","w":73,"h":61,"palette":382,"offset":655734,"ox":-26,"oy":-60,"compressed":false,"packed_size":1280},{"name":"char/pico-blazin/punchLow1/1","w":70,"h":61,"palette":383,"offset":657136,"ox":-26,"oy":-60,"compressed":false,"packed_size":1270},{"name":"char/pico-blazin/punchLow2/0","w":70,"h":62,"palette":384,"offset":658528,"ox":-23,"oy":-60,"compressed":false,"packed_size":1258},{"name":"char/pico-blazin/punchLow2/1","w":67,"h":63,"palette":385,"offset":659910,"ox":-23,"oy":-61,"compressed":false,"packed_size":1272},{"name":"char/pico-blazin/hitHigh/0","w":57,"h":70,"palette":386,"offset":661308,"ox":-35,"oy":-68,"compressed":false,"packed_size":1376},{"name":"char/pico-blazin/hitHigh/1","w":51,"h":71,"palette":387,"offset":662824,"ox":-27,"oy":-70,"compressed":false,"packed_size":1287},{"name":"char/pico-blazin/hitLow/0","w":71,"h":65,"palette":388,"offset":664253,"ox":-34,"oy":-61,"compressed":false,"packed_size":1314},{"name":"char/pico-blazin/hitLow/1","w":54,"h":65,"palette":389,"offset":665697,"ox":-26,"oy":-60,"compressed":false,"packed_size":1196},{"name":"char/pico-blazin/hitSpin/0","w":51,"h":63,"palette":390,"offset":667023,"ox":-26,"oy":-65,"compressed":false,"packed_size":1191},{"name":"char/pico-blazin/hitSpin/1","w":41,"h":59,"palette":391,"offset":668340,"ox":-26,"oy":-61,"compressed":false,"packed_size":1024},{"name":"char/pico-blazin/uppercutPrep/0","w":61,"h":44,"palette":392,"offset":669482,"ox":-35,"oy":-44,"compressed":false,"packed_size":1018},{"name":"char/pico-blazin/uppercutPrep/1","w":61,"h":45,"palette":393,"offset":670588,"ox":-34,"oy":-45,"compressed":false,"packed_size":1045},{"name":"char/pico-blazin/uppercut/0","w":62,"h":71,"palette":394,"offset":671723,"ox":-27,"oy":-70,"compressed":false,"packed_size":1512},{"name":"char/pico-blazin/uppercut/1","w":59,"h":69,"palette":395,"offset":673377,"ox":-27,"oy":-68,"compressed":false,"packed_size":1477},{"name":"char/pico-blazin/uppercutHit/0","w":57,"h":76,"palette":396,"offset":674992,"ox":-22,"oy":-75,"compressed":false,"packed_size":1608},{"name":"char/pico-blazin/uppercutHit/1","w":55,"h":66,"palette":397,"offset":676752,"ox":-25,"oy":-64,"compressed":false,"packed_size":1345},{"name":"char/pico-christmas/idle/0","w":60,"h":63,"palette":398,"offset":678229,"ox":-32,"oy":-63,"compressed":false,"packed_size":1467},{"name":"char/pico-christmas/idle/1","w":62,"h":64,"palette":399,"offset":679822,"ox":-31,"oy":-64,"compressed":false,"packed_size":1520},{"name":"char/pico-christmas/idle/2","w":61,"h":66,"palette":400,"offset":681470,"ox":-30,"oy":-65,"compressed":false,"packed_size":1565},{"name":"char/pico-christmas/singRIGHT/0","w":64,"h":66,"palette":401,"offset":683167,"ox":-40,"oy":-65,"compressed":false,"packed_size":1346},{"name":"char/pico-christmas/singRIGHT/1","w":61,"h":65,"palette":402,"offset":684645,"ox":-37,"oy":-64,"compressed":false,"packed_size":1349},{"name":"char/pico-christmas/singDOWN/0","w":68,"h":53,"palette":403,"offset":686124,"ox":-26,"oy":-52,"compressed":false,"packed_size":1263},{"name":"char/pico-christmas/singDOWN/1","w":69,"h":54,"palette":404,"offset":687493,"ox":-25,"oy":-53,"compressed":false,"packed_size":1296},{"name":"char/pico-christmas/singUP/0","w":61,"h":68,"palette":405,"offset":688897,"ox":-28,"oy":-69,"compressed":false,"packed_size":1432},{"name":"char/pico-christmas/singUP/1","w":59,"h":68,"palette":406,"offset":690465,"ox":-27,"oy":-68,"compressed":false,"packed_size":1471},{"name":"char/pico-christmas/singLEFT/0","w":62,"h":64,"palette":407,"offset":692072,"ox":-20,"oy":-63,"compressed":false,"packed_size":1337},{"name":"char/pico-christmas/singLEFT/1","w":63,"h":64,"palette":408,"offset":693537,"ox":-20,"oy":-63,"compressed":false,"packed_size":1368},{"name":"char/pico-dark/idle/0","w":60,"h":63,"palette":409,"offset":695033,"ox":-32,"oy":-63,"compressed":false,"packed_size":1441},{"name":"char/pico-dark/idle/1","w":62,"h":64,"palette":410,"offset":696600,"ox":-31,"oy":-64,"compressed":false,"packed_size":1522},{"name":"char/pico-dark/idle/2","w":61,"h":66,"palette":411,"offset":698250,"ox":-30,"oy":-65,"compressed":false,"packed_size":1547},{"name":"char/pico-dark/singRIGHT/0","w":63,"h":66,"palette":412,"offset":699929,"ox":-40,"oy":-65,"compressed":false,"packed_size":1318},{"name":"char/pico-dark/singRIGHT/1","w":61,"h":65,"palette":413,"offset":701379,"ox":-37,"oy":-64,"compressed":false,"packed_size":1323},{"name":"char/pico-dark/singDOWN/0","w":100,"h":53,"palette":414,"offset":702832,"ox":-58,"oy":-52,"compressed":false,"packed_size":1245},{"name":"char/pico-dark/singDOWN/1","w":69,"h":54,"palette":415,"offset":704183,"ox":-25,"oy":-53,"compressed":false,"packed_size":1274},{"name":"char/pico-dark/singUP/0","w":60,"h":69,"palette":416,"offset":705565,"ox":-27,"oy":-69,"compressed":false,"packed_size":1402},{"name":"char/pico-dark/singUP/1","w":59,"h":68,"palette":417,"offset":707105,"ox":-27,"oy":-68,"compressed":false,"packed_size":1439},{"name":"char/pico-dark/singLEFT/0","w":62,"h":64,"palette":418,"offset":708680,"ox":-20,"oy":-63,"compressed":false,"packed_size":1297},{"name":"char/pico-dark/singLEFT/1","w":63,"h":64,"palette":419,"offset":710105,"ox":-20,"oy":-63,"compressed":false,"packed_size":1326},{"name":"char/pico-dark/singLEFTmiss/0","w":62,"h":64,"palette":412,"offset":711559,"ox":-20,"oy":-63,"compressed":false,"packed_size":1297},{"name":"char/pico-dark/hey/0","w":71,"h":65,"palette":420,"offset":712984,"ox":-35,"oy":-65,"compressed":false,"packed_size":1491},{"name":"char/pico-dark/hey/1","w":69,"h":66,"palette":421,"offset":714605,"ox":-33,"oy":-65,"compressed":false,"packed_size":1502},{"name":"char/pico-dark/cheer/0","w":71,"h":71,"palette":422,"offset":716239,"ox":-34,"oy":-66,"compressed":false,"packed_size":1618},{"name":"char/pico-dark/cheer/1","w":73,"h":69,"palette":423,"offset":717999,"ox":-33,"oy":-64,"compressed":false,"packed_size":1626},{"name":"char/pico-dark/burpShit/0","w":61,"h":65,"palette":424,"offset":719763,"ox":-25,"oy":-64,"compressed":false,"packed_size":1519},{"name":"char/pico-dark/burpShit/1","w":61,"h":66,"palette":425,"offset":721412,"ox":-30,"oy":-65,"compressed":false,"packed_size":1547},{"name":"char/pico-dark/burpSmile/0","w":61,"h":65,"palette":426,"offset":723091,"ox":-36,"oy":-64,"compressed":false,"packed_size":1431},{"name":"char/pico-dark/burpSmile/1","w":61,"h":66,"palette":427,"offset":724652,"ox":-30,"oy":-65,"compressed":false,"packed_size":1547},{"name":"char/pico-dark/shit/0","w":61,"h":66,"palette":428,"offset":726331,"ox":-30,"oy":-65,"compressed":false,"packed_size":1547},{"name":"char/pico-holding-nene/idle/0","w":63,"h":64,"palette":429,"offset":728010,"ox":-33,"oy":-64,"compressed":false,"packed_size":1626},{"name":"char/pico-holding-nene/idle/1","w":66,"h":65,"palette":430,"offset":729764,"ox":-34,"oy":-65,"compressed":false,"packed_size":1668},{"name":"char/pico-holding-nene/idle/2","w":67,"h":65,"palette":431,"offset":731562,"ox":-35,"oy":-65,"compressed":false,"packed_size":1706},{"name":"char/pico-holding-nene/idle/3","w":67,"h":65,"palette":432,"offset":733398,"ox":-35,"oy":-65,"compressed":false,"packed_size":1706},{"name":"char/pico-holding-nene/singRIGHT/0","w":69,"h":62,"palette":433,"offset":735234,"ox":-43,"oy":-62,"compressed":false,"packed_size":1622},{"name":"char/pico-holding-nene/singRIGHT/1","w":68,"h":62,"palette":434,"offset":736980,"ox":-42,"oy":-62,"compressed":false,"packed_size":1635},{"name":"char/pico-holding-nene/singDOWN/0","w":74,"h":57,"palette":435,"offset":738739,"ox":-32,"oy":-56,"compressed":false,"packed_size":1473},{"name":"char/pico-holding-nene/singDOWN/1","w":75,"h":59,"palette":436,"offset":740326,"ox":-32,"oy":-57,"compressed":false,"packed_size":1498},{"name":"char/pico-holding-nene/singUP/0","w":72,"h":64,"palette":437,"offset":741942,"ox":-35,"oy":-65,"compressed":false,"packed_size":1685},{"name":"char/pico-holding-nene/singUP/1","w":74,"h":64,"palette":438,"offset":743755,"ox":-35,"oy":-65,"compressed":false,"packed_size":1710},{"name":"char/pico-holding-nene/singLEFT/0","w":63,"h":62,"palette":439,"offset":745593,"ox":-29,"oy":-62,"compressed":false,"packed_size":1593},{"name":"char/pico-holding-nene/singLEFT/1","w":64,"h":63,"palette":440,"offset":747310,"ox":-29,"oy":-63,"compressed":false,"packed_size":1606},{"name":"char/pico-holding-nene/singRIGHTmiss/0","w":69,"h":62,"palette":441,"offset":749042,"ox":-43,"oy":-62,"compressed":false,"packed_size":1622},{"name":"char/pico-holding-nene/singDOWNmiss/0","w":74,"h":57,"palette":442,"offset":750788,"ox":-32,"oy":-56,"compressed":false,"packed_size":1478},{"name":"char/pico-holding-nene/singUPmiss/0","w":71,"h":64,"palette":443,"offset":752380,"ox":-34,"oy":-65,"compressed":false,"packed_size":1679},{"name":"char/pico-holding-nene/singLEFTmiss/0","w":62,"h":62,"palette":444,"offset":754187,"ox":-28,"oy":-62,"compressed":false,"packed_size":1590},{"name":"char/pico-holding-nene/knifeToss/1","w":65,"h":64,"palette":445,"offset":755901,"ox":-31,"oy":-64,"compressed":false,"packed_size":1501},{"name":"char/pico-holding-nene/laughEnd/1","w":68,"h":65,"palette":446,"offset":757530,"ox":-36,"oy":-65,"compressed":false,"packed_size":1712},{"name":"char/pico-holding-nene/laughEnd-loop/0","w":68,"h":64,"palette":447,"offset":759372,"ox":-36,"oy":-64,"compressed":false,"packed_size":1696},{"name":"char/pico-holding-nene/laughEnd-loop/1","w":68,"h":64,"palette":448,"offset":761196,"ox":-36,"oy":-64,"compressed":false,"packed_size":1714},{"name":"char/pico-pixel/idle/0","w":58,"h":65,"palette":449,"offset":763038,"ox":-29,"oy":-64,"compressed":false,"packed_size":1432},{"name":"char/pico-pixel/idle/1","w":63,"h":63,"palette":450,"offset":764600,"ox":-32,"oy":-62,"compressed":false,"packed_size":1533},{"name":"char/pico-pixel/idle/2","w":59,"h":63,"palette":451,"offset":766259,"ox":-28,"oy":-62,"compressed":false,"packed_size":1546},{"name":"char/pico-pixel/singLEFT/0","w":63,"h":61,"palette":452,"offset":767931,"ox":-20,"oy":-60,"compressed":false,"packed_size":1274},{"name":"char/pico-pixel/singLEFT/1","w":63,"h":63,"palette":453,"offset":769327,"ox":-20,"oy":-62,"compressed":false,"packed_size":1314},{"name":"char/pico-pixel/singDOWN/0","w":69,"h":55,"palette":454,"offset":770767,"ox":-26,"oy":-54,"compressed":false,"packed_size":1275},{"name":"char/pico-pixel/singDOWN/1","w":70,"h":56,"palette":455,"offset":772152,"ox":-26,"oy":-55,"compressed":false,"packed_size":1293},{"name":"char/pico-pixel/singUP/0","w":61,"h":68,"palette":456,"offset":773557,"ox":-29,"oy":-67,"compressed":false,"packed_size":1380},{"name":"char/pico-pixel/singUP/1","w":60,"h":68,"palette":457,"offset":775073,"ox":-28,"oy":-67,"compressed":false,"packed_size":1425},{"name":"char/pico-pixel/singRIGHT/0","w":65,"h":64,"palette":458,"offset":776634,"ox":-41,"oy":-63,"compressed":false,"packed_size":1307},{"name":"char/pico-pixel/singRIGHT/1","w":64,"h":64,"palette":459,"offset":778069,"ox":-40,"oy":-63,"compressed":false,"packed_size":1323},{"name":"char/pico-pixel/singLEFTmiss/0","w":63,"h":62,"palette":460,"offset":779520,"ox":-20,"oy":-61,"compressed":false,"packed_size":1320},{"name":"char/pico-pixel/singDOWNmiss/0","w":66,"h":56,"palette":461,"offset":780964,"ox":-25,"oy":-55,"compressed":false,"packed_size":1279},{"name":"char/pico-pixel/singUPmiss/0","w":62,"h":65,"palette":462,"offset":782355,"ox":-29,"oy":-64,"compressed":false,"packed_size":1426},{"name":"char/pico-pixel/singRIGHTmiss/0","w":64,"h":63,"palette":463,"offset":783911,"ox":-40,"oy":-62,"compressed":false,"packed_size":1334},{"name":"char/pico-playable/singRIGHT-censor/0","w":63,"h":65,"palette":464,"offset":785371,"ox":-55,"oy":-56,"compressed":false,"packed_size":1326},{"name":"char/pico-playable/singRIGHT-censor/1","w":61,"h":65,"palette":465,"offset":786827,"ox":-53,"oy":-56,"compressed":false,"packed_size":1327},{"name":"char/pico-playable/singDOWN-censor/0","w":68,"h":52,"palette":466,"offset":788284,"ox":-42,"oy":-43,"compressed":false,"packed_size":1232},{"name":"char/pico-playable/singDOWN-censor/1","w":69,"h":54,"palette":467,"offset":789620,"ox":-41,"oy":-45,"compressed":false,"packed_size":1262},{"name":"char/pico-playable/singUP-censor/0","w":60,"h":68,"palette":468,"offset":790990,"ox":-43,"oy":-60,"compressed":false,"packed_size":1414},{"name":"char/pico-playable/singUP-censor/1","w":60,"h":67,"palette":469,"offset":792540,"ox":-43,"oy":-59,"compressed":false,"packed_size":1446},{"name":"char/pico-playable/singLEFT-censor/0","w":61,"h":63,"palette":470,"offset":794120,"ox":-35,"oy":-54,"compressed":false,"packed_size":1300},{"name":"char/pico-playable/singLEFT-censor/1","w":62,"h":64,"palette":471,"offset":795546,"ox":-35,"oy":-55,"compressed":false,"packed_size":1336},{"name":"char/pico-playable/singLEFTmiss/0","w":62,"h":63,"palette":472,"offset":797010,"ox":-1,"oy":-86,"compressed":false,"packed_size":1293},{"name":"char/pico-playable/singDOWNmiss/0","w":68,"h":52,"palette":473,"offset":798429,"ox":-7,"oy":-75,"compressed":false,"packed_size":1231},{"name":"char/pico-playable/singUPmiss/0","w":60,"h":68,"palette":474,"offset":799764,"ox":-8,"oy":-92,"compressed":false,"packed_size":1402},{"name":"char/pico-playable/singRIGHTmiss/0","w":63,"h":65,"palette":475,"offset":801302,"ox":-21,"oy":-88,"compressed":false,"packed_size":1314},{"name":"char/pico-playable/shootMISS/0","w":75,"h":62,"palette":476,"offset":802746,"ox":-45,"oy":-84,"compressed":false,"packed_size":1574},{"name":"char/pico-playable/shootMISS/1","w":74,"h":64,"palette":477,"offset":804444,"ox":-44,"oy":-86,"compressed":false,"packed_size":1570},{"name":"char/pico-playable/hey/0","w":70,"h":65,"palette":478,"offset":806142,"ox":-16,"oy":-88,"compressed":false,"packed_size":1483},{"name":"char/pico-playable/hey/1","w":69,"h":65,"palette":479,"offset":807755,"ox":-14,"oy":-88,"compressed":false,"packed_size":1500},{"name":"char/pico-playable/cheer/0","w":71,"h":71,"palette":480,"offset":809385,"ox":-15,"oy":-89,"compressed":false,"packed_size":1618},{"name":"char/pico-playable/cheer/1","w":73,"h":69,"palette":481,"offset":811145,"ox":-14,"oy":-87,"compressed":false,"packed_size":1628},{"name":"char/pico-playable/cock/0","w":62,"h":65,"palette":482,"offset":812911,"ox":-19,"oy":-87,"compressed":false,"packed_size":1263},{"name":"char/pico-playable/cock/1","w":61,"h":65,"palette":483,"offset":814304,"ox":-18,"oy":-87,"compressed":false,"packed_size":1260},{"name":"char/pico-playable/shoot/0","w":85,"h":81,"palette":484,"offset":815694,"ox":-21,"oy":-105,"compressed":false,"packed_size":1984},{"name":"char/pico-playable/shoot/1","w":65,"h":60,"palette":485,"offset":817840,"ox":-20,"oy":-84,"compressed":false,"packed_size":1538},{"name":"char/pico-playable/intro1/0","w":60,"h":63,"palette":486,"offset":819498,"ox":-13,"oy":-86,"compressed":false,"packed_size":1445},{"name":"char/pico-playable/intro1/1","w":61,"h":65,"palette":487,"offset":821069,"ox":-6,"oy":-88,"compressed":false,"packed_size":1318},{"name":"char/pico-playable/intro2/1","w":61,"h":65,"palette":488,"offset":822517,"ox":-11,"oy":-88,"compressed":false,"packed_size":1540},{"name":"char/pico-playable/burpShit/0","w":61,"h":64,"palette":489,"offset":824187,"ox":-6,"oy":-87,"compressed":false,"packed_size":1518},{"name":"char/pico-playable/burpShit/1","w":61,"h":65,"palette":490,"offset":825833,"ox":-11,"oy":-88,"compressed":false,"packed_size":1540},{"name":"char/pico-playable/burpSmile/0","w":61,"h":64,"palette":491,"offset":827503,"ox":-17,"oy":-87,"compressed":false,"packed_size":1424},{"name":"char/pico-playable/burpSmile/1","w":61,"h":65,"palette":492,"offset":829055,"ox":-11,"oy":-88,"compressed":false,"packed_size":1540},{"name":"char/pico-playable/shit/0","w":61,"h":65,"palette":493,"offset":830725,"ox":-11,"oy":-88,"compressed":false,"packed_size":1540},{"name":"char/pico-speaker/idle/0","w":62,"h":60,"palette":494,"offset":832395,"ox":-31,"oy":-60,"compressed":false,"packed_size":1400},{"name":"char/pico-speaker/idle/2","w":58,"h":60,"palette":495,"offset":833915,"ox":-31,"oy":-60,"compressed":false,"packed_size":1330},{"name":"char/pico-speaker/shoot1/0","w":73,"h":60,"palette":496,"offset":835365,"ox":-31,"oy":-60,"compressed":false,"packed_size":1384},{"name":"char/pico-speaker/shoot2/0","w":71,"h":55,"palette":497,"offset":836869,"ox":-31,"oy":-55,"compressed":false,"packed_size":1315},{"name":"char/pico-speaker/shoot2/1","w":58,"h":56,"palette":498,"offset":838294,"ox":-31,"oy":-56,"compressed":false,"packed_size":1252},{"name":"char/pico-speaker/shoot3/0","w":67,"h":56,"palette":499,"offset":839658,"ox":-39,"oy":-56,"compressed":false,"packed_size":1345},{"name":"char/pico-speaker/shoot3/1","w":58,"h":55,"palette":500,"offset":841115,"ox":-31,"oy":-55,"compressed":false,"packed_size":1256},{"name":"char/pico-speaker/shoot4/0","w":74,"h":55,"palette":501,"offset":842481,"ox":-46,"oy":-55,"compressed":false,"packed_size":1393},{"name":"char/pico-speaker/shoot4/1","w":58,"h":63,"palette":502,"offset":843984,"ox":-31,"oy":-63,"compressed":false,"packed_size":1355},{"name":"char/senpai/idle/0","w":50,"h":85,"palette":503,"offset":845465,"ox":-25,"oy":-84,"compressed":false,"packed_size":1381},{"name":"char/senpai/idle/1","w":50,"h":86,"palette":504,"offset":847016,"ox":-24,"oy":-85,"compressed":false,"packed_size":1404},{"name":"char/senpai/idle/2","w":49,"h":84,"palette":505,"offset":848592,"ox":-24,"oy":-83,"compressed":false,"packed_size":1362},{"name":"char/senpai/idle/3","w":50,"h":86,"palette":506,"offset":850122,"ox":-24,"oy":-85,"compressed":false,"packed_size":1392},{"name":"char/senpai/singLEFT/0","w":45,"h":86,"palette":507,"offset":851686,"ox":-27,"oy":-85,"compressed":false,"packed_size":1345},{"name":"char/senpai/singLEFT/1","w":46,"h":86,"palette":508,"offset":853203,"ox":-27,"oy":-85,"compressed":false,"packed_size":1345},{"name":"char/senpai/singDOWN/0","w":48,"h":80,"palette":509,"offset":854720,"ox":-24,"oy":-79,"compressed":false,"packed_size":1248},{"name":"char/senpai/singDOWN/1","w":47,"h":81,"palette":510,"offset":856128,"ox":-23,"oy":-80,"compressed":false,"packed_size":1240},{"name":"char/senpai/singUP/0","w":49,"h":91,"palette":511,"offset":857530,"ox":-25,"oy":-90,"compressed":false,"packed_size":1376},{"name":"char/senpai/singUP/1","w":49,"h":91,"palette":512,"offset":859088,"ox":-25,"oy":-90,"compressed":false,"packed_size":1420},{"name":"char/senpai/singRIGHT/0","w":49,"h":85,"palette":513,"offset":860690,"ox":-20,"oy":-84,"compressed":false,"packed_size":1364},{"name":"char/senpai/singRIGHT/1","w":47,"h":85,"palette":514,"offset":862224,"ox":-21,"oy":-84,"compressed":false,"packed_size":1342},{"name":"char/senpai-angry/idle/0","w":50,"h":85,"palette":515,"offset":863736,"ox":-25,"oy":-84,"compressed":false,"packed_size":1390},{"name":"char/senpai-angry/idle/1","w":48,"h":86,"palette":516,"offset":865296,"ox":-25,"oy":-85,"compressed":false,"packed_size":1384},{"name":"char/senpai-angry/idle/2","w":51,"h":87,"palette":517,"offset":866852,"ox":-25,"oy":-86,"compressed":false,"packed_size":1408},{"name":"char/senpai-angry/singLEFT/0","w":42,"h":87,"palette":518,"offset":868434,"ox":-28,"oy":-86,"compressed":false,"packed_size":1368},{"name":"char/senpai-angry/singLEFT/1","w":44,"h":87,"palette":519,"offset":869976,"ox":-28,"oy":-86,"compressed":false,"packed_size":1357},{"name":"char/senpai-angry/singDOWN/0","w":45,"h":81,"palette":520,"offset":871507,"ox":-25,"oy":-80,"compressed":false,"packed_size":1251},{"name":"char/senpai-angry/singDOWN/1","w":44,"h":82,"palette":521,"offset":872920,"ox":-24,"oy":-81,"compressed":false,"packed_size":1239},{"name":"char/senpai-angry/singUP/0","w":45,"h":93,"palette":522,"offset":874323,"ox":-25,"oy":-92,"compressed":false,"packed_size":1412},{"name":"char/senpai-angry/singUP/1","w":47,"h":93,"palette":523,"offset":875921,"ox":-26,"oy":-92,"compressed":false,"packed_size":1451},{"name":"char/senpai-angry/singRIGHT/0","w":47,"h":87,"palette":524,"offset":877558,"ox":-21,"oy":-86,"compressed":false,"packed_size":1395},{"name":"char/senpai-angry/singRIGHT/1","w":46,"h":87,"palette":525,"offset":879127,"ox":-22,"oy":-86,"compressed":false,"packed_size":1366},{"name":"char/spirit/idle/0","w":39,"h":84,"palette":526,"offset":880667,"ox":-20,"oy":-83,"compressed":false,"packed_size":1530},{"name":"char/spirit/idle/1","w":39,"h":84,"palette":527,"offset":882365,"ox":-20,"oy":-81,"compressed":false,"packed_size":1561},{"name":"char/spirit/idle/2","w":40,"h":87,"palette":528,"offset":884094,"ox":-21,"oy":-83,"compressed":false,"packed_size":1571},{"name":"char/spirit/idle/3","w":40,"h":84,"palette":529,"offset":885839,"ox":-21,"oy":-82,"compressed":false,"packed_size":1586},{"name":"char/spirit/singLEFT/0","w":34,"h":79,"palette":530,"offset":887593,"ox":-24,"oy":-78,"compressed":false,"packed_size":1168},{"name":"char/spirit/singLEFT/1","w":41,"h":82,"palette":531,"offset":888919,"ox":-23,"oy":-79,"compressed":false,"packed_size":1404},{"name":"char/spirit/singDOWN/0","w":39,"h":105,"palette":532,"offset":890487,"ox":-21,"oy":-80,"compressed":false,"packed_size":1861},{"name":"char/spirit/singDOWN/1","w":37,"h":91,"palette":533,"offset":892558,"ox":-19,"oy":-85,"compressed":false,"packed_size":1600},{"name":"char/spirit/singUP/0","w":35,"h":94,"palette":534,"offset":894340,"ox":-17,"oy":-95,"compressed":false,"packed_size":1559},{"name":"char/spirit/singUP/1","w":35,"h":101,"palette":535,"offset":896087,"ox":-18,"oy":-98,"compressed":false,"packed_size":1752},{"name":"char/spirit/singRIGHT/0","w":48,"h":87,"palette":536,"offset":898041,"ox":-18,"oy":-85,"compressed":false,"packed_size":1560},{"name":"char/spirit/singRIGHT/1","w":41,"h":84,"palette":537,"offset":899775,"ox":-19,"oy":-83,"compressed":false,"packed_size":1451},{"name":"char/spooky/danceLeft/0","w":53,"h":76,"palette":538,"offset":901394,"ox":-26,"oy":-76,"compressed":false,"packed_size":1548},{"name":"char/spooky/danceLeft/1","w":52,"h":75,"palette":539,"offset":903094,"ox":-25,"oy":-75,"compressed":false,"packed_size":1522},{"name":"char/spooky/danceLeft/2","w":49,"h":67,"palette":540,"offset":904766,"ox":-22,"oy":-68,"compressed":false,"packed_size":1303},{"name":"char/spooky/danceLeft/3","w":49,"h":69,"palette":541,"offset":906203,"ox":-22,"oy":-69,"compressed":false,"packed_size":1319},{"name":"char/spooky/danceRight/0","w":68,"h":74,"palette":542,"offset":907660,"ox":-33,"oy":-74,"compressed":false,"packed_size":1440},{"name":"char/spooky/danceRight/1","w":67,"h":72,"palette":543,"offset":909248,"ox":-32,"oy":-73,"compressed":false,"packed_size":1447},{"name":"char/spooky/singLEFT/0","w":77,"h":73,"palette":544,"offset":910839,"ox":-51,"oy":-74,"compressed":false,"packed_size":1657},{"name":"char/spooky/singLEFT/1","w":77,"h":74,"palette":545,"offset":912642,"ox":-50,"oy":-74,"compressed":false,"packed_size":1640},{"name":"char/spooky/singDOWN/0","w":64,"h":56,"palette":546,"offset":914430,"ox":-26,"oy":-56,"compressed":false,"packed_size":1357},{"name":"char/spooky/singDOWN/1","w":62,"h":57,"palette":547,"offset":915899,"ox":-25,"oy":-57,"compressed":false,"packed_size":1358},{"name":"char/spooky/singUP/0","w":55,"h":79,"palette":548,"offset":917371,"ox":-30,"oy":-80,"compressed":false,"packed_size":1701},{"name":"char/spooky/singUP/1","w":56,"h":78,"palette":549,"offset":919230,"ox":-30,"oy":-79,"compressed":false,"packed_size":1702},{"name":"char/spooky/singRIGHT/0","w":61,"h":73,"palette":550,"offset":921088,"ox":-15,"oy":-73,"compressed":false,"packed_size":1632},{"name":"char/spooky/singRIGHT/1","w":60,"h":74,"palette":551,"offset":922866,"ox":-15,"oy":-74,"compressed":false,"packed_size":1620},{"name":"char/spooky/cheer/0","w":89,"h":80,"palette":552,"offset":924634,"ox":-41,"oy":-80,"compressed":false,"packed_size":1932},{"name":"char/spooky/cheer/1","w":87,"h":78,"palette":553,"offset":926726,"ox":-40,"oy":-78,"compressed":false,"packed_size":1883},{"name":"char/spooky-dark/danceLeft/0","w":53,"h":76,"palette":554,"offset":928765,"ox":-26,"oy":-76,"compressed":false,"packed_size":1548},{"name":"char/spooky-dark/danceLeft/1","w":52,"h":75,"palette":555,"offset":930465,"ox":-25,"oy":-75,"compressed":false,"packed_size":1522},{"name":"char/spooky-dark/danceLeft/2","w":49,"h":67,"palette":556,"offset":932137,"ox":-22,"oy":-68,"compressed":false,"packed_size":1303},{"name":"char/spooky-dark/danceLeft/3","w":49,"h":69,"palette":557,"offset":933574,"ox":-22,"oy":-69,"compressed":false,"packed_size":1318},{"name":"char/spooky-dark/danceRight/0","w":68,"h":74,"palette":558,"offset":935030,"ox":-33,"oy":-74,"compressed":false,"packed_size":1440},{"name":"char/spooky-dark/danceRight/1","w":67,"h":72,"palette":559,"offset":936618,"ox":-32,"oy":-73,"compressed":false,"packed_size":1447},{"name":"char/spooky-dark/singLEFT/0","w":77,"h":73,"palette":560,"offset":938209,"ox":-51,"oy":-74,"compressed":false,"packed_size":1657},{"name":"char/spooky-dark/singLEFT/1","w":77,"h":74,"palette":561,"offset":940012,"ox":-50,"oy":-74,"compressed":false,"packed_size":1640},{"name":"char/spooky-dark/singDOWN/0","w":64,"h":56,"palette":562,"offset":941800,"ox":-26,"oy":-56,"compressed":false,"packed_size":1357},{"name":"char/spooky-dark/singDOWN/1","w":62,"h":57,"palette":563,"offset":943269,"ox":-25,"oy":-57,"compressed":false,"packed_size":1358},{"name":"char/spooky-dark/singUP/0","w":55,"h":79,"palette":564,"offset":944741,"ox":-30,"oy":-80,"compressed":false,"packed_size":1702},{"name":"char/spooky-dark/singUP/1","w":56,"h":78,"palette":565,"offset":946601,"ox":-30,"oy":-79,"compressed":false,"packed_size":1703},{"name":"char/spooky-dark/singRIGHT/0","w":61,"h":73,"palette":566,"offset":948460,"ox":-15,"oy":-73,"compressed":false,"packed_size":1632},{"name":"char/spooky-dark/singRIGHT/1","w":60,"h":74,"palette":567,"offset":950238,"ox":-15,"oy":-74,"compressed":false,"packed_size":1624},{"name":"char/spooky-dark/cheer/0","w":89,"h":80,"palette":568,"offset":952010,"ox":-41,"oy":-80,"compressed":false,"packed_size":1932},{"name":"char/spooky-dark/cheer/1","w":87,"h":78,"palette":569,"offset":954102,"ox":-40,"oy":-78,"compressed":false,"packed_size":1883},{"name":"char/sserafim-chaewon/idle/0","w":47,"h":76,"palette":570,"offset":956141,"ox":-23,"oy":-76,"compressed":false,"packed_size":1309},{"name":"char/sserafim-chaewon/idle/1","w":47,"h":76,"palette":571,"offset":957602,"ox":-23,"oy":-76,"compressed":false,"packed_size":1298},{"name":"char/sserafim-chaewon/idle/2","w":47,"h":77,"palette":572,"offset":959052,"ox":-23,"oy":-77,"compressed":false,"packed_size":1316},{"name":"char/sserafim-chaewon/idle/3","w":47,"h":77,"palette":573,"offset":960522,"ox":-23,"oy":-77,"compressed":false,"packed_size":1317},{"name":"char/sserafim-chaewon/singLEFT/0","w":48,"h":76,"palette":574,"offset":961993,"ox":-24,"oy":-76,"compressed":false,"packed_size":1298},{"name":"char/sserafim-chaewon/singLEFT/1","w":48,"h":76,"palette":575,"offset":963443,"ox":-24,"oy":-76,"compressed":false,"packed_size":1308},{"name":"char/sserafim-chaewon/singDOWN/0","w":47,"h":74,"palette":576,"offset":964903,"ox":-23,"oy":-76,"compressed":false,"packed_size":1263},{"name":"char/sserafim-chaewon/singDOWN/1","w":47,"h":74,"palette":577,"offset":966314,"ox":-23,"oy":-76,"compressed":false,"packed_size":1270},{"name":"char/sserafim-chaewon/singUP/0","w":46,"h":79,"palette":578,"offset":967732,"ox":-23,"oy":-78,"compressed":false,"packed_size":1366},{"name":"char/sserafim-chaewon/singUP/1","w":46,"h":79,"palette":579,"offset":969256,"ox":-23,"oy":-78,"compressed":false,"packed_size":1356},{"name":"char/sserafim-chaewon/singRIGHT/0","w":47,"h":76,"palette":580,"offset":970770,"ox":-23,"oy":-77,"compressed":false,"packed_size":1325},{"name":"char/sserafim-chaewon/singRIGHT/1","w":47,"h":76,"palette":581,"offset":972247,"ox":-23,"oy":-77,"compressed":false,"packed_size":1316},{"name":"char/sserafim-chaewon/singLEFTmiss/0","w":48,"h":76,"palette":582,"offset":973715,"ox":-24,"oy":-76,"compressed":false,"packed_size":1300},{"name":"char/sserafim-chaewon/singDOWNmiss/0","w":47,"h":74,"palette":583,"offset":975167,"ox":-23,"oy":-76,"compressed":false,"packed_size":1263},{"name":"char/sserafim-chaewon/singUPmiss/0","w":46,"h":79,"palette":584,"offset":976578,"ox":-23,"oy":-78,"compressed":false,"packed_size":1366},{"name":"char/sserafim-chaewon/singRIGHTmiss/0","w":47,"h":76,"palette":580,"offset":978102,"ox":-23,"oy":-77,"compressed":false,"packed_size":1327},{"name":"char/sserafim-eunchae/idle/0","w":95,"h":75,"palette":585,"offset":979581,"ox":-47,"oy":-75,"compressed":false,"packed_size":2027},{"name":"char/sserafim-eunchae/idle/1","w":95,"h":76,"palette":586,"offset":981758,"ox":-47,"oy":-76,"compressed":false,"packed_size":2036},{"name":"char/sserafim-eunchae/idle/2","w":95,"h":76,"palette":587,"offset":983946,"ox":-47,"oy":-76,"compressed":false,"packed_size":2033},{"name":"char/sserafim-eunchae/singLEFT/0","w":93,"h":76,"palette":588,"offset":986131,"ox":-47,"oy":-76,"compressed":false,"packed_size":2032},{"name":"char/sserafim-eunchae/singLEFT/1","w":94,"h":77,"palette":589,"offset":988315,"ox":-47,"oy":-76,"compressed":false,"packed_size":2029},{"name":"char/sserafim-eunchae/singDOWN/0","w":95,"h":77,"palette":590,"offset":990498,"ox":-48,"oy":-76,"compressed":false,"packed_size":2018},{"name":"char/sserafim-eunchae/singDOWN/1","w":95,"h":78,"palette":591,"offset":992670,"ox":-48,"oy":-77,"compressed":false,"packed_size":2030},{"name":"char/sserafim-eunchae/singUP/0","w":93,"h":77,"palette":592,"offset":994856,"ox":-46,"oy":-76,"compressed":false,"packed_size":2037},{"name":"char/sserafim-eunchae/singUP/1","w":94,"h":78,"palette":593,"offset":997047,"ox":-47,"oy":-77,"compressed":false,"packed_size":2050},{"name":"char/sserafim-eunchae/singRIGHT/0","w":96,"h":78,"palette":594,"offset":999253,"ox":-47,"oy":-77,"compressed":false,"packed_size":2041},{"name":"char/sserafim-eunchae/singRIGHT/1","w":96,"h":78,"palette":595,"offset":1001450,"ox":-47,"oy":-77,"compressed":false,"packed_size":2036},{"name":"char/sserafim-eunchae/singLEFTmiss/0","w":93,"h":76,"palette":596,"offset":1003642,"ox":-47,"oy":-76,"compressed":false,"packed_size":2033},{"name":"char/sserafim-eunchae/singDOWNmiss/0","w":95,"h":77,"palette":597,"offset":1005827,"ox":-48,"oy":-76,"compressed":false,"packed_size":2017},{"name":"char/sserafim-eunchae/singUPmiss/0","w":93,"h":77,"palette":598,"offset":1007998,"ox":-46,"oy":-76,"compressed":false,"packed_size":2036},{"name":"char/sserafim-eunchae/singRIGHTmiss/0","w":96,"h":78,"palette":599,"offset":1010188,"ox":-47,"oy":-77,"compressed":false,"packed_size":2044},{"name":"char/sserafim-gf/danceLeft/0","w":51,"h":76,"palette":600,"offset":1012388,"ox":-25,"oy":-76,"compressed":false,"packed_size":1575},{"name":"char/sserafim-gf/danceLeft/1","w":50,"h":76,"palette":601,"offset":1014115,"ox":-26,"oy":-76,"compressed":false,"packed_size":1557},{"name":"char/sserafim-gf/danceLeft/2","w":50,"h":77,"palette":602,"offset":1015824,"ox":-26,"oy":-77,"compressed":false,"packed_size":1548},{"name":"char/sserafim-gf/danceLeft/3","w":52,"h":78,"palette":603,"offset":1017526,"ox":-28,"oy":-78,"compressed":false,"packed_size":1550},{"name":"char/sserafim-gf/danceRight/0","w":53,"h":77,"palette":604,"offset":1019232,"ox":-26,"oy":-77,"compressed":false,"packed_size":1539},{"name":"char/sserafim-gf/danceRight/1","w":53,"h":76,"palette":605,"offset":1020925,"ox":-25,"oy":-76,"compressed":false,"packed_size":1524},{"name":"char/sserafim-gf/danceRight/2","w":49,"h":77,"palette":606,"offset":1022601,"ox":-24,"oy":-77,"compressed":false,"packed_size":1560},{"name":"char/sserafim-gf/danceRight/3","w":49,"h":77,"palette":607,"offset":1024315,"ox":-24,"oy":-77,"compressed":false,"packed_size":1588},{"name":"char/sserafim-gf/singLEFT/0","w":49,"h":77,"palette":608,"offset":1026057,"ox":-26,"oy":-78,"compressed":false,"packed_size":1582},{"name":"char/sserafim-gf/singLEFT/1","w":49,"h":76,"palette":609,"offset":1027793,"ox":-26,"oy":-77,"compressed":false,"packed_size":1576},{"name":"char/sserafim-gf/singDOWN/0","w":50,"h":74,"palette":610,"offset":1029521,"ox":-24,"oy":-75,"compressed":false,"packed_size":1548},{"name":"char/sserafim-gf/singDOWN/1","w":49,"h":75,"palette":611,"offset":1031217,"ox":-24,"oy":-76,"compressed":false,"packed_size":1547},{"name":"char/sserafim-gf/singUP/0","w":48,"h":79,"palette":612,"offset":1032914,"ox":-24,"oy":-78,"compressed":false,"packed_size":1576},{"name":"char/sserafim-gf/singUP/1","w":49,"h":79,"palette":613,"offset":1034648,"ox":-24,"oy":-78,"compressed":false,"packed_size":1591},{"name":"char/sserafim-gf/singRIGHT/0","w":49,"h":77,"palette":614,"offset":1036397,"ox":-23,"oy":-77,"compressed":false,"packed_size":1567},{"name":"char/sserafim-gf/singRIGHT/1","w":50,"h":77,"palette":615,"offset":1038118,"ox":-24,"oy":-77,"compressed":false,"packed_size":1575},{"name":"char/sserafim-gf/singLEFTmiss/0","w":49,"h":77,"palette":616,"offset":1039847,"ox":-26,"oy":-78,"compressed":false,"packed_size":1581},{"name":"char/sserafim-gf/singDOWNmiss/0","w":50,"h":74,"palette":617,"offset":1041582,"ox":-24,"oy":-75,"compressed":false,"packed_size":1548},{"name":"char/sserafim-gf/singUPmiss/0","w":48,"h":79,"palette":618,"offset":1043278,"ox":-24,"oy":-78,"compressed":false,"packed_size":1576},{"name":"char/sserafim-gf/singRIGHTmiss/0","w":49,"h":77,"palette":619,"offset":1045012,"ox":-23,"oy":-77,"compressed":false,"packed_size":1568},{"name":"char/sserafim-gf/singLEFT-beautiful/0","w":49,"h":77,"palette":620,"offset":1046734,"ox":-26,"oy":-78,"compressed":false,"packed_size":1577},{"name":"char/sserafim-gf/singLEFT-beautiful/1","w":49,"h":76,"palette":621,"offset":1048465,"ox":-26,"oy":-77,"compressed":false,"packed_size":1575},{"name":"char/sserafim-gf/singDOWN-beautiful/0","w":50,"h":74,"palette":622,"offset":1050192,"ox":-24,"oy":-75,"compressed":false,"packed_size":1547},{"name":"char/sserafim-gf/singDOWN-beautiful/1","w":49,"h":75,"palette":623,"offset":1051887,"ox":-24,"oy":-76,"compressed":false,"packed_size":1546},{"name":"char/sserafim-gf/singUP-beautiful/0","w":48,"h":79,"palette":624,"offset":1053583,"ox":-24,"oy":-78,"compressed":false,"packed_size":1573},{"name":"char/sserafim-gf/singUP-beautiful/1","w":50,"h":78,"palette":625,"offset":1055314,"ox":-25,"oy":-78,"compressed":false,"packed_size":1587},{"name":"char/sserafim-gf/singRIGHT-beautiful/0","w":49,"h":77,"palette":626,"offset":1057057,"ox":-23,"oy":-77,"compressed":false,"packed_size":1567},{"name":"char/sserafim-gf/singRIGHT-beautiful/1","w":50,"h":77,"palette":627,"offset":1058778,"ox":-24,"oy":-77,"compressed":false,"packed_size":1575},{"name":"char/sserafim-gf/singLEFTmiss-beautiful/0","w":49,"h":77,"palette":628,"offset":1060507,"ox":-26,"oy":-78,"compressed":false,"packed_size":1578},{"name":"char/sserafim-gf/singDOWNmiss-beautiful/0","w":50,"h":74,"palette":629,"offset":1062239,"ox":-24,"oy":-75,"compressed":false,"packed_size":1547},{"name":"char/sserafim-gf/singUPmiss-beautiful/0","w":48,"h":79,"palette":630,"offset":1063934,"ox":-24,"oy":-78,"compressed":false,"packed_size":1573},{"name":"char/sserafim-gf/singRIGHTmiss-beautiful/0","w":49,"h":77,"palette":631,"offset":1065665,"ox":-23,"oy":-77,"compressed":false,"packed_size":1566},{"name":"char/sserafim-kazuha/idle/0","w":39,"h":75,"palette":632,"offset":1067385,"ox":-19,"oy":-75,"compressed":false,"packed_size":984},{"name":"char/sserafim-kazuha/idle/1","w":38,"h":75,"palette":633,"offset":1068519,"ox":-18,"oy":-75,"compressed":false,"packed_size":982},{"name":"char/sserafim-kazuha/idle/2","w":38,"h":75,"palette":634,"offset":1069651,"ox":-18,"oy":-75,"compressed":false,"packed_size":987},{"name":"char/sserafim-kazuha/idle/3","w":38,"h":75,"palette":635,"offset":1070788,"ox":-18,"oy":-75,"compressed":false,"packed_size":984},{"name":"char/sserafim-kazuha/singLEFT/0","w":36,"h":75,"palette":636,"offset":1071922,"ox":-18,"oy":-75,"compressed":false,"packed_size":973},{"name":"char/sserafim-kazuha/singLEFT/1","w":37,"h":75,"palette":637,"offset":1073045,"ox":-18,"oy":-75,"compressed":false,"packed_size":982},{"name":"char/sserafim-kazuha/singDOWN/0","w":40,"h":74,"palette":638,"offset":1074177,"ox":-20,"oy":-74,"compressed":false,"packed_size":980},{"name":"char/sserafim-kazuha/singDOWN/1","w":38,"h":74,"palette":639,"offset":1075305,"ox":-19,"oy":-74,"compressed":false,"packed_size":969},{"name":"char/sserafim-kazuha/singUP/0","w":36,"h":77,"palette":640,"offset":1076422,"ox":-17,"oy":-77,"compressed":false,"packed_size":1010},{"name":"char/sserafim-kazuha/singUP/1","w":36,"h":77,"palette":641,"offset":1077586,"ox":-17,"oy":-77,"compressed":false,"packed_size":1003},{"name":"char/sserafim-kazuha/singRIGHT/0","w":40,"h":75,"palette":642,"offset":1078743,"ox":-19,"oy":-75,"compressed":false,"packed_size":987},{"name":"char/sserafim-kazuha/singRIGHT/1","w":39,"h":75,"palette":643,"offset":1079880,"ox":-19,"oy":-75,"compressed":false,"packed_size":979},{"name":"char/sserafim-kazuha/singLEFTmiss/0","w":36,"h":75,"palette":644,"offset":1081009,"ox":-18,"oy":-75,"compressed":false,"packed_size":973},{"name":"char/sserafim-kazuha/singDOWNmiss/0","w":40,"h":74,"palette":645,"offset":1082132,"ox":-20,"oy":-74,"compressed":false,"packed_size":980},{"name":"char/sserafim-kazuha/singUPmiss/0","w":36,"h":77,"palette":646,"offset":1083260,"ox":-17,"oy":-77,"compressed":false,"packed_size":1008},{"name":"char/sserafim-kazuha/singRIGHTmiss/0","w":40,"h":75,"palette":647,"offset":1084422,"ox":-19,"oy":-75,"compressed":false,"packed_size":987},{"name":"char/sserafim-sakura/idle/0","w":64,"h":76,"palette":648,"offset":1085559,"ox":-32,"oy":-76,"compressed":false,"packed_size":1728},{"name":"char/sserafim-sakura/idle/1","w":64,"h":76,"palette":649,"offset":1087439,"ox":-32,"oy":-76,"compressed":false,"packed_size":1728},{"name":"char/sserafim-sakura/idle/2","w":64,"h":77,"palette":650,"offset":1089319,"ox":-32,"oy":-77,"compressed":false,"packed_size":1730},{"name":"char/sserafim-sakura/idle/3","w":64,"h":77,"palette":651,"offset":1091203,"ox":-32,"oy":-77,"compressed":false,"packed_size":1731},{"name":"char/sserafim-sakura/singLEFT/0","w":64,"h":75,"palette":652,"offset":1093088,"ox":-32,"oy":-75,"compressed":false,"packed_size":1707},{"name":"char/sserafim-sakura/singLEFT/1","w":64,"h":76,"palette":653,"offset":1094945,"ox":-32,"oy":-76,"compressed":false,"packed_size":1713},{"name":"char/sserafim-sakura/singDOWN/0","w":65,"h":74,"palette":654,"offset":1096810,"ox":-33,"oy":-74,"compressed":false,"packed_size":1711},{"name":"char/sserafim-sakura/singDOWN/1","w":64,"h":75,"palette":655,"offset":1098669,"ox":-32,"oy":-75,"compressed":false,"packed_size":1735},{"name":"char/sserafim-sakura/singUP/0","w":64,"h":78,"palette":656,"offset":1100554,"ox":-32,"oy":-78,"compressed":false,"packed_size":1736},{"name":"char/sserafim-sakura/singUP/1","w":64,"h":78,"palette":657,"offset":1102446,"ox":-32,"oy":-78,"compressed":false,"packed_size":1745},{"name":"char/sserafim-sakura/singRIGHT/0","w":64,"h":77,"palette":658,"offset":1104347,"ox":-32,"oy":-77,"compressed":false,"packed_size":1729},{"name":"char/sserafim-sakura/singRIGHT/1","w":64,"h":77,"palette":659,"offset":1106230,"ox":-32,"oy":-77,"compressed":false,"packed_size":1731},{"name":"char/sserafim-sakura/singLEFT-joint/0","w":64,"h":75,"palette":660,"offset":1108115,"ox":-32,"oy":-75,"compressed":false,"packed_size":1733},{"name":"char/sserafim-sakura/singLEFT-joint/1","w":63,"h":75,"palette":661,"offset":1109998,"ox":-32,"oy":-75,"compressed":false,"packed_size":1736},{"name":"char/sserafim-sakura/singDOWN-joint/0","w":64,"h":73,"palette":662,"offset":1111884,"ox":-32,"oy":-72,"compressed":false,"packed_size":1674},{"name":"char/sserafim-sakura/singDOWN-joint/1","w":64,"h":73,"palette":663,"offset":1113704,"ox":-32,"oy":-72,"compressed":false,"packed_size":1685},{"name":"char/sserafim-sakura/singUP-joint/0","w":59,"h":80,"palette":664,"offset":1115535,"ox":-32,"oy":-79,"compressed":false,"packed_size":1699},{"name":"char/sserafim-sakura/singUP-joint/1","w":59,"h":80,"palette":665,"offset":1117394,"ox":-32,"oy":-79,"compressed":false,"packed_size":1699},{"name":"char/sserafim-sakura/singRIGHT-joint/0","w":60,"h":77,"palette":666,"offset":1119253,"ox":-32,"oy":-77,"compressed":false,"packed_size":1639},{"name":"char/sserafim-sakura/singRIGHT-joint/1","w":60,"h":77,"palette":667,"offset":1121046,"ox":-32,"oy":-77,"compressed":false,"packed_size":1647},{"name":"char/sserafim-sakura/singLEFT-bf1/0","w":65,"h":76,"palette":668,"offset":1122847,"ox":-32,"oy":-76,"compressed":false,"packed_size":1748},{"name":"char/sserafim-sakura/singLEFT-bf1/1","w":65,"h":76,"palette":669,"offset":1124747,"ox":-32,"oy":-76,"compressed":false,"packed_size":1742},{"name":"char/sserafim-sakura/singDOWN-bf1/0","w":63,"h":75,"palette":670,"offset":1126641,"ox":-32,"oy":-74,"compressed":false,"packed_size":1671},{"name":"char/sserafim-sakura/singDOWN-bf1/1","w":63,"h":75,"palette":671,"offset":1128462,"ox":-32,"oy":-74,"compressed":false,"packed_size":1666},{"name":"char/sserafim-sakura/singUP-bf1/0","w":59,"h":79,"palette":672,"offset":1130278,"ox":-32,"oy":-78,"compressed":false,"packed_size":1681},{"name":"char/sserafim-sakura/singUP-bf1/1","w":59,"h":79,"palette":673,"offset":1132117,"ox":-32,"oy":-78,"compressed":false,"packed_size":1677},{"name":"char/sserafim-sakura/singRIGHT-bf1/0","w":60,"h":77,"palette":674,"offset":1133952,"ox":-32,"oy":-77,"compressed":false,"packed_size":1625},{"name":"char/sserafim-sakura/singRIGHT-bf1/1","w":60,"h":77,"palette":675,"offset":1135731,"ox":-32,"oy":-77,"compressed":false,"packed_size":1641},{"name":"char/sserafim-sakura/singLEFT-bf2/0","w":65,"h":76,"palette":676,"offset":1137526,"ox":-32,"oy":-76,"compressed":false,"packed_size":1749},{"name":"char/sserafim-sakura/singLEFT-bf2/1","w":64,"h":76,"palette":677,"offset":1139427,"ox":-32,"oy":-76,"compressed":false,"packed_size":1733},{"name":"char/sserafim-sakura/singDOWN-bf2/0","w":63,"h":75,"palette":678,"offset":1141312,"ox":-32,"oy":-74,"compressed":false,"packed_size":1677},{"name":"char/sserafim-sakura/singDOWN-bf2/1","w":63,"h":75,"palette":679,"offset":1143139,"ox":-32,"oy":-74,"compressed":false,"packed_size":1672},{"name":"char/sserafim-sakura/singUP-bf2/0","w":59,"h":79,"palette":680,"offset":1144961,"ox":-32,"oy":-78,"compressed":false,"packed_size":1691},{"name":"char/sserafim-sakura/singUP-bf2/1","w":59,"h":79,"palette":681,"offset":1146810,"ox":-32,"oy":-78,"compressed":false,"packed_size":1688},{"name":"char/sserafim-sakura/singRIGHT-bf2/0","w":60,"h":77,"palette":682,"offset":1148656,"ox":-32,"oy":-77,"compressed":false,"packed_size":1639},{"name":"char/sserafim-sakura/singRIGHT-bf2/1","w":60,"h":77,"palette":683,"offset":1150449,"ox":-32,"oy":-77,"compressed":false,"packed_size":1652},{"name":"char/sserafim-yunjin/doorclosed/0","w":52,"h":82,"palette":684,"offset":1152255,"ox":-27,"oy":-82,"compressed":false,"packed_size":1285},{"name":"char/sserafim-yunjin/kick1/0","w":51,"h":82,"palette":685,"offset":1153704,"ox":-27,"oy":-82,"compressed":false,"packed_size":1268},{"name":"char/sserafim-yunjin/kick2/0","w":52,"h":82,"palette":686,"offset":1155136,"ox":-27,"oy":-82,"compressed":false,"packed_size":1284},{"name":"char/sserafim-yunjin/kick2/1","w":1,"h":1,"palette":687,"offset":1156584,"ox":-61,"oy":-110,"compressed":false,"packed_size":1},{"name":"char/sserafim-yunjin/idle/0","w":74,"h":75,"palette":688,"offset":1156587,"ox":-37,"oy":-75,"compressed":false,"packed_size":1707},{"name":"char/sserafim-yunjin/idle/1","w":73,"h":76,"palette":689,"offset":1158444,"ox":-36,"oy":-76,"compressed":false,"packed_size":1700},{"name":"char/sserafim-yunjin/idle/2","w":73,"h":76,"palette":690,"offset":1160296,"ox":-36,"oy":-76,"compressed":false,"packed_size":1702},{"name":"char/sserafim-yunjin/idle/3","w":73,"h":76,"palette":691,"offset":1162150,"ox":-36,"oy":-76,"compressed":false,"packed_size":1702},{"name":"char/sserafim-yunjin/singLEFT/0","w":73,"h":77,"palette":692,"offset":1164004,"ox":-36,"oy":-77,"compressed":false,"packed_size":1685},{"name":"char/sserafim-yunjin/singLEFT/1","w":73,"h":77,"palette":693,"offset":1165843,"ox":-36,"oy":-77,"compressed":false,"packed_size":1697},{"name":"char/sserafim-yunjin/singDOWN/0","w":74,"h":74,"palette":694,"offset":1167694,"ox":-37,"oy":-74,"compressed":false,"packed_size":1701},{"name":"char/sserafim-yunjin/singDOWN/1","w":74,"h":75,"palette":695,"offset":1169543,"ox":-37,"oy":-75,"compressed":false,"packed_size":1700},{"name":"char/sserafim-yunjin/singUP/0","w":72,"h":78,"palette":696,"offset":1171393,"ox":-36,"oy":-78,"compressed":false,"packed_size":1665},{"name":"char/sserafim-yunjin/singUP/1","w":72,"h":77,"palette":697,"offset":1173214,"ox":-36,"oy":-77,"compressed":false,"packed_size":1667},{"name":"char/sserafim-yunjin/singRIGHT/0","w":74,"h":76,"palette":698,"offset":1175035,"ox":-37,"oy":-76,"compressed":false,"packed_size":1706},{"name":"char/sserafim-yunjin/singRIGHT/1","w":74,"h":76,"palette":699,"offset":1176893,"ox":-37,"oy":-76,"compressed":false,"packed_size":1696},{"name":"char/sserafim-yunjin/singDOWNmiss/0","w":74,"h":74,"palette":694,"offset":1178741,"ox":-37,"oy":-74,"compressed":false,"packed_size":1701},{"name":"char/tankman/idle/0","w":63,"h":83,"palette":700,"offset":1180590,"ox":-32,"oy":-83,"compressed":false,"packed_size":2107},{"name":"char/tankman/idle/1","w":64,"h":84,"palette":701,"offset":1182863,"ox":-33,"oy":-84,"compressed":false,"packed_size":2125},{"name":"char/tankman/idle/2","w":64,"h":86,"palette":702,"offset":1185156,"ox":-33,"oy":-86,"compressed":false,"packed_size":2148},{"name":"char/tankman/singLEFT/0","w":73,"h":83,"palette":703,"offset":1187476,"ox":-47,"oy":-83,"compressed":false,"packed_size":2081},{"name":"char/tankman/singLEFT/1","w":72,"h":84,"palette":704,"offset":1189723,"ox":-45,"oy":-84,"compressed":false,"packed_size":2109},{"name":"char/tankman/singDOWN/0","w":84,"h":67,"palette":705,"offset":1192000,"ox":-43,"oy":-66,"compressed":false,"packed_size":2069},{"name":"char/tankman/singDOWN/1","w":87,"h":70,"palette":706,"offset":1194203,"ox":-44,"oy":-69,"compressed":false,"packed_size":2133},{"name":"char/tankman/singUP/0","w":73,"h":93,"palette":707,"offset":1196476,"ox":-38,"oy":-94,"compressed":false,"packed_size":2340},{"name":"char/tankman/singUP/1","w":74,"h":91,"palette":708,"offset":1199002,"ox":-40,"oy":-92,"compressed":false,"packed_size":2326},{"name":"char/tankman/singRIGHT/0","w":75,"h":78,"palette":709,"offset":1201510,"ox":-29,"oy":-79,"compressed":false,"packed_size":2139},{"name":"char/tankman/singRIGHT/1","w":73,"h":81,"palette":710,"offset":1203805,"ox":-29,"oy":-82,"compressed":false,"packed_size":2250},{"name":"char/tankman/hehPrettyGood/0","w":65,"h":84,"palette":711,"offset":1206217,"ox":-34,"oy":-78,"compressed":false,"packed_size":2146},{"name":"char/tankman/hehPrettyGood/1","w":78,"h":84,"palette":712,"offset":1208531,"ox":-33,"oy":-78,"compressed":false,"packed_size":2216},{"name":"char/tankman/ugh/0","w":59,"h":83,"palette":713,"offset":1210915,"ox":-31,"oy":-77,"compressed":false,"packed_size":2033},{"name":"char/tankman/ugh/1","w":60,"h":84,"palette":714,"offset":1213114,"ox":-32,"oy":-78,"compressed":false,"packed_size":2057},{"name":"char/tankman/laugh/0","w":57,"h":86,"palette":715,"offset":1215339,"ox":-30,"oy":-80,"compressed":false,"packed_size":2048},{"name":"char/tankman/laugh/1","w":57,"h":87,"palette":716,"offset":1217559,"ox":-30,"oy":-81,"compressed":false,"packed_size":2053},{"name":"char/tankman/beat it/0","w":75,"h":83,"palette":717,"offset":1219786,"ox":-47,"oy":-77,"compressed":false,"packed_size":2246},{"name":"char/tankman/beat it/1","w":72,"h":83,"palette":718,"offset":1222198,"ox":-44,"oy":-77,"compressed":false,"packed_size":2226},{"name":"char/tankman/augh/0","w":75,"h":86,"palette":719,"offset":1224590,"ox":-42,"oy":-80,"compressed":false,"packed_size":2259},{"name":"char/tankman/augh/1","w":74,"h":86,"palette":720,"offset":1227021,"ox":-41,"oy":-80,"compressed":false,"packed_size":2290},{"name":"char/tankman-bloody/idle/0","w":61,"h":79,"palette":721,"offset":1229483,"ox":-30,"oy":-79,"compressed":false,"packed_size":1934},{"name":"char/tankman-bloody/idle/1","w":61,"h":80,"palette":722,"offset":1231575,"ox":-31,"oy":-80,"compressed":false,"packed_size":1949},{"name":"char/tankman-bloody/idle/2","w":61,"h":82,"palette":723,"offset":1233684,"ox":-31,"oy":-82,"compressed":false,"packed_size":1977},{"name":"char/tankman-bloody/singLEFT/0","w":69,"h":79,"palette":724,"offset":1235825,"ox":-44,"oy":-79,"compressed":false,"packed_size":1906},{"name":"char/tankman-bloody/singLEFT/1","w":69,"h":80,"palette":725,"offset":1237889,"ox":-42,"oy":-80,"compressed":false,"packed_size":1938},{"name":"char/tankman-bloody/singDOWN/0","w":81,"h":64,"palette":726,"offset":1239987,"ox":-41,"oy":-63,"compressed":false,"packed_size":1903},{"name":"char/tankman-bloody/singDOWN/1","w":83,"h":67,"palette":727,"offset":1242018,"ox":-41,"oy":-66,"compressed":false,"packed_size":1953},{"name":"char/tankman-bloody/singUP/0","w":70,"h":89,"palette":728,"offset":1244105,"ox":-36,"oy":-90,"compressed":false,"packed_size":2159},{"name":"char/tankman-bloody/singUP/1","w":71,"h":87,"palette":729,"offset":1246442,"ox":-38,"oy":-88,"compressed":false,"packed_size":2154},{"name":"char/tankman-bloody/singRIGHT/0","w":72,"h":74,"palette":730,"offset":1248770,"ox":-27,"oy":-75,"compressed":false,"packed_size":1962},{"name":"char/tankman-bloody/singRIGHT/1","w":69,"h":77,"palette":731,"offset":1250880,"ox":-27,"oy":-78,"compressed":false,"packed_size":2068},{"name":"char/tankman-bloody/idle-bloody/0","w":62,"h":83,"palette":732,"offset":1253102,"ox":-40,"oy":-99,"compressed":false,"packed_size":2016},{"name":"char/tankman-bloody/idle-bloody/1","w":60,"h":89,"palette":733,"offset":1255284,"ox":-40,"oy":-105,"compressed":false,"packed_size":2064},{"name":"char/tankman-bloody/singLEFT-bloody/0","w":69,"h":81,"palette":734,"offset":1257526,"ox":-54,"oy":-97,"compressed":false,"packed_size":1981},{"name":"char/tankman-bloody/singLEFT-bloody/1","w":69,"h":83,"palette":735,"offset":1259669,"ox":-52,"oy":-99,"compressed":false,"packed_size":2014},{"name":"char/tankman-bloody/singDOWN-bloody/0","w":80,"h":65,"palette":736,"offset":1261849,"ox":-50,"oy":-79,"compressed":false,"packed_size":1910},{"name":"char/tankman-bloody/singDOWN-bloody/1","w":83,"h":66,"palette":737,"offset":1263889,"ox":-51,"oy":-81,"compressed":false,"packed_size":1954},{"name":"char/tankman-bloody/singUP-bloody/0","w":71,"h":104,"palette":738,"offset":1265975,"ox":-46,"oy":-121,"compressed":false,"packed_size":2290},{"name":"char/tankman-bloody/singUP-bloody/1","w":71,"h":101,"palette":739,"offset":1268473,"ox":-47,"oy":-118,"compressed":false,"packed_size":2264},{"name":"char/tankman-bloody/singRIGHT-bloody/0","w":75,"h":81,"palette":740,"offset":1270939,"ox":-36,"oy":-97,"compressed":false,"packed_size":2090},{"name":"char/tankman-bloody/singRIGHT-bloody/1","w":72,"h":84,"palette":741,"offset":1273191,"ox":-37,"oy":-100,"compressed":false,"packed_size":2189},{"name":"char/tankman-bloody/hehPrettyGood-bloody/0","w":63,"h":84,"palette":742,"offset":1275548,"ox":-40,"oy":-100,"compressed":false,"packed_size":2042},{"name":"char/tankman-bloody/hehPrettyGood-bloody/1","w":74,"h":81,"palette":743,"offset":1277758,"ox":-40,"oy":-97,"compressed":false,"packed_size":2106},{"name":"char/tankman-bloody/redheadsAnim/0","w":71,"h":80,"palette":744,"offset":1280026,"ox":-43,"oy":-96,"compressed":false,"packed_size":2052},{"name":"char/tankman-bloody/redheadsAnim/1","w":72,"h":95,"palette":745,"offset":1282238,"ox":-52,"oy":-111,"compressed":false,"packed_size":2031},{"name":"char/tankman-bloody/stressPicoEnding/0","w":60,"h":88,"palette":746,"offset":1284459,"ox":-13,"oy":-55,"compressed":false,"packed_size":2056},{"name":"char/tankman-bloody/stressPicoEnding/1","w":65,"h":86,"palette":747,"offset":1286691,"ox":-10,"oy":-53,"compressed":false,"packed_size":1856},{"name":"stage/limoRide","w":160,"h":120,"palette":748,"offset":1288719,"ox":0,"oy":0,"compressed":true,"packed_size":3399},{"name":"stage/limoRideErect","w":160,"h":120,"palette":749,"offset":1292118,"ox":0,"oy":0,"compressed":true,"packed_size":3280},{"name":"stage/mainStage","w":160,"h":120,"palette":750,"offset":1295398,"ox":0,"oy":0,"compressed":true,"packed_size":1628},{"name":"stage/mainStageErect","w":160,"h":120,"palette":751,"offset":1297026,"ox":0,"oy":0,"compressed":true,"packed_size":2292},{"name":"stage/mallEvil","w":160,"h":120,"palette":752,"offset":1299318,"ox":0,"oy":0,"compressed":true,"packed_size":2963},{"name":"stage/mallXmas","w":160,"h":120,"palette":753,"offset":1302281,"ox":0,"oy":0,"compressed":true,"packed_size":3360},{"name":"stage/mallXmasErect","w":160,"h":120,"palette":754,"offset":1305641,"ox":0,"oy":0,"compressed":true,"packed_size":2836},{"name":"stage/phillyBlazin","w":160,"h":120,"palette":755,"offset":1308477,"ox":0,"oy":0,"compressed":true,"packed_size":2117},{"name":"stage/phillyStreets","w":160,"h":120,"palette":756,"offset":1310594,"ox":0,"oy":0,"compressed":true,"packed_size":3346},{"name":"stage/phillyStreetsErect","w":160,"h":120,"palette":757,"offset":1313940,"ox":0,"oy":0,"compressed":true,"packed_size":3073},{"name":"stage/phillyTrain","w":160,"h":120,"palette":758,"offset":1317013,"ox":0,"oy":0,"compressed":true,"packed_size":1658},{"name":"stage/phillyTrainErect","w":160,"h":120,"palette":759,"offset":1318671,"ox":0,"oy":0,"compressed":true,"packed_size":1676},{"name":"stage/school","w":160,"h":120,"palette":760,"offset":1320347,"ox":0,"oy":0,"compressed":true,"packed_size":4964},{"name":"stage/schoolErect","w":160,"h":120,"palette":761,"offset":1325311,"ox":0,"oy":0,"compressed":true,"packed_size":4006},{"name":"stage/schoolEvil","w":160,"h":120,"palette":762,"offset":1329317,"ox":0,"oy":0,"compressed":true,"packed_size":3836},{"name":"stage/schoolEvilErect","w":160,"h":120,"palette":763,"offset":1333153,"ox":0,"oy":0,"compressed":true,"packed_size":2812},{"name":"stage/spookyMansion","w":160,"h":120,"palette":764,"offset":1335965,"ox":0,"oy":0,"compressed":true,"packed_size":1454},{"name":"stage/spookyMansionErect","w":160,"h":120,"palette":765,"offset":1337419,"ox":0,"oy":0,"compressed":true,"packed_size":5612},{"name":"stage/sserafim","w":160,"h":120,"palette":766,"offset":1343031,"ox":0,"oy":0,"compressed":true,"packed_size":2372},{"name":"stage/tankmanBattlefield","w":160,"h":120,"palette":767,"offset":1345403,"ox":0,"oy":0,"compressed":true,"packed_size":2648},{"name":"stage/tankmanBattlefieldErect","w":160,"h":120,"palette":768,"offset":1348051,"ox":0,"oy":0,"compressed":true,"packed_size":2364},{"name":"note0","w":22,"h":22,"palette":769,"offset":1350415,"ox":0,"oy":0,"compressed":false,"packed_size":207},{"name":"static0","w":23,"h":23,"palette":770,"offset":1350666,"ox":0,"oy":0,"compressed":false,"packed_size":227},{"name":"press0","w":23,"h":23,"palette":771,"offset":1350939,"ox":0,"oy":0,"compressed":false,"packed_size":228},{"name":"confirm0","w":23,"h":23,"palette":772,"offset":1351213,"ox":0,"oy":0,"compressed":false,"packed_size":196},{"name":"note1","w":22,"h":22,"palette":773,"offset":1351455,"ox":0,"oy":0,"compressed":false,"packed_size":219},{"name":"static1","w":23,"h":23,"palette":774,"offset":1351718,"ox":0,"oy":0,"compressed":false,"packed_size":235},{"name":"press1","w":23,"h":23,"palette":775,"offset":1351999,"ox":0,"oy":0,"compressed":false,"packed_size":238},{"name":"confirm1","w":23,"h":23,"palette":776,"offset":1352283,"ox":0,"oy":0,"compressed":false,"packed_size":186},{"name":"note2","w":22,"h":22,"palette":777,"offset":1352515,"ox":0,"oy":0,"compressed":false,"packed_size":218},{"name":"static2","w":23,"h":23,"palette":778,"offset":1352777,"ox":0,"oy":0,"compressed":false,"packed_size":237},{"name":"press2","w":23,"h":23,"palette":779,"offset":1353060,"ox":0,"oy":0,"compressed":false,"packed_size":238},{"name":"confirm2","w":23,"h":23,"palette":780,"offset":1353344,"ox":0,"oy":0,"compressed":false,"packed_size":184},{"name":"note3","w":22,"h":22,"palette":781,"offset":1353574,"ox":0,"oy":0,"compressed":false,"packed_size":206},{"name":"static3","w":23,"h":23,"palette":782,"offset":1353824,"ox":0,"oy":0,"compressed":false,"packed_size":228},{"name":"press3","w":23,"h":23,"palette":783,"offset":1354098,"ox":0,"oy":0,"compressed":false,"packed_size":228},{"name":"confirm3","w":23,"h":23,"palette":784,"offset":1354372,"ox":0,"oy":0,"compressed":false,"packed_size":195},{"name":"logo","w":167,"h":104,"palette":785,"offset":1354613,"ox":0,"oy":0,"compressed":false,"packed_size":7052},{"name":"menu","w":160,"h":120,"palette":786,"offset":1361873,"ox":0,"oy":0,"compressed":true,"packed_size":6794},{"name":"icon/icon-bf-old/0","w":18,"h":16,"palette":787,"offset":1368667,"ox":0,"oy":2,"compressed":false,"packed_size":101},{"name":"icon/icon-bf-old/1","w":18,"h":17,"palette":788,"offset":1368800,"ox":0,"oy":2,"compressed":false,"packed_size":109},{"name":"icon/icon-bf-pixel/0","w":15,"h":11,"palette":789,"offset":1368943,"ox":2,"oy":5,"compressed":false,"packed_size":95},{"name":"icon/icon-bf-pixel/1","w":15,"h":12,"palette":790,"offset":1369060,"ox":2,"oy":5,"compressed":false,"packed_size":102},{"name":"icon/icon-bf/0","w":20,"h":16,"palette":791,"offset":1369186,"ox":0,"oy":2,"compressed":false,"packed_size":111},{"name":"icon/icon-bf/1","w":20,"h":17,"palette":792,"offset":1369329,"ox":0,"oy":2,"compressed":false,"packed_size":117},{"name":"icon/icon-chaewon/0","w":20,"h":20,"palette":793,"offset":1369480,"ox":0,"oy":0,"compressed":false,"packed_size":174},{"name":"icon/icon-chaewon/1","w":20,"h":20,"palette":794,"offset":1369694,"ox":0,"oy":0,"compressed":false,"packed_size":174},{"name":"icon/icon-dad/0","w":20,"h":20,"palette":795,"offset":1369908,"ox":0,"oy":0,"compressed":false,"packed_size":143},{"name":"icon/icon-darnell/0","w":19,"h":18,"palette":796,"offset":1370091,"ox":0,"oy":1,"compressed":false,"packed_size":117},{"name":"icon/icon-darnell/1","w":19,"h":18,"palette":797,"offset":1370244,"ox":0,"oy":1,"compressed":false,"packed_size":121},{"name":"icon/icon-eunchae/0","w":20,"h":19,"palette":798,"offset":1370401,"ox":0,"oy":0,"compressed":false,"packed_size":183},{"name":"icon/icon-eunchae/1","w":20,"h":19,"palette":799,"offset":1370622,"ox":0,"oy":0,"compressed":false,"packed_size":183},{"name":"icon/icon-face/0","w":16,"h":16,"palette":800,"offset":1370843,"ox":2,"oy":2,"compressed":false,"packed_size":95},{"name":"icon/icon-face/1","w":16,"h":16,"palette":801,"offset":1370970,"ox":2,"oy":2,"compressed":false,"packed_size":95},{"name":"icon/icon-gf/0","w":20,"h":18,"palette":802,"offset":1371097,"ox":0,"oy":1,"compressed":false,"packed_size":110},{"name":"icon/icon-kazuha/0","w":20,"h":19,"palette":803,"offset":1371243,"ox":0,"oy":0,"compressed":false,"packed_size":162},{"name":"icon/icon-kazuha/1","w":20,"h":19,"palette":804,"offset":1371443,"ox":0,"oy":0,"compressed":false,"packed_size":162},{"name":"icon/icon-mom/0","w":20,"h":20,"palette":805,"offset":1371643,"ox":0,"oy":0,"compressed":false,"packed_size":135},{"name":"icon/icon-mom/1","w":20,"h":20,"palette":806,"offset":1371818,"ox":0,"oy":0,"compressed":false,"packed_size":135},{"name":"icon/icon-monster/0","w":20,"h":16,"palette":807,"offset":1371993,"ox":0,"oy":2,"compressed":false,"packed_size":102},{"name":"icon/icon-monster/1","w":20,"h":17,"palette":808,"offset":1372127,"ox":0,"oy":2,"compressed":false,"packed_size":109},{"name":"icon/icon-parents/0","w":20,"h":20,"palette":809,"offset":1372270,"ox":0,"oy":0,"compressed":false,"packed_size":147},{"name":"icon/icon-pico-pixel/0","w":14,"h":13,"palette":810,"offset":1372457,"ox":3,"oy":4,"compressed":false,"packed_size":98},{"name":"icon/icon-pico-pixel/1","w":14,"h":13,"palette":810,"offset":1372581,"ox":3,"oy":4,"compressed":false,"packed_size":99},{"name":"icon/icon-pico/0","w":20,"h":18,"palette":811,"offset":1372706,"ox":0,"oy":0,"compressed":false,"packed_size":116},{"name":"icon/icon-pico/1","w":20,"h":19,"palette":812,"offset":1372858,"ox":0,"oy":0,"compressed":false,"packed_size":121},{"name":"icon/icon-sakura/0","w":20,"h":20,"palette":813,"offset":1373017,"ox":0,"oy":0,"compressed":false,"packed_size":185},{"name":"icon/icon-sakura/1","w":20,"h":20,"palette":814,"offset":1373242,"ox":0,"oy":0,"compressed":false,"packed_size":185},{"name":"icon/icon-senpai-angry/0","w":13,"h":14,"palette":815,"offset":1373467,"ox":4,"oy":3,"compressed":false,"packed_size":102},{"name":"icon/icon-senpai-angry/1","w":13,"h":14,"palette":816,"offset":1373597,"ox":4,"oy":3,"compressed":false,"packed_size":107},{"name":"icon/icon-senpai/0","w":13,"h":14,"palette":815,"offset":1373732,"ox":4,"oy":3,"compressed":false,"packed_size":102},{"name":"icon/icon-spirit/0","w":10,"h":19,"palette":817,"offset":1373862,"ox":4,"oy":1,"compressed":false,"packed_size":114},{"name":"icon/icon-spirit/1","w":10,"h":19,"palette":817,"offset":1374014,"ox":4,"oy":1,"compressed":false,"packed_size":115},{"name":"icon/icon-spooky/0","w":19,"h":16,"palette":818,"offset":1374167,"ox":1,"oy":2,"compressed":false,"packed_size":97},{"name":"icon/icon-spooky/1","w":19,"h":16,"palette":819,"offset":1374296,"ox":1,"oy":2,"compressed":false,"packed_size":97},{"name":"icon/icon-tankman-bloody/0","w":18,"h":16,"palette":820,"offset":1374425,"ox":1,"oy":2,"compressed":false,"packed_size":98},{"name":"icon/icon-tankman-bloody/1","w":18,"h":16,"palette":821,"offset":1374555,"ox":1,"oy":2,"compressed":false,"packed_size":98},{"name":"icon/icon-tankman/0","w":18,"h":16,"palette":822,"offset":1374685,"ox":1,"oy":2,"compressed":false,"packed_size":96},{"name":"icon/icon-tankman/1","w":18,"h":16,"palette":823,"offset":1374813,"ox":1,"oy":2,"compressed":false,"packed_size":96},{"name":"icon/icon-yunjin/0","w":20,"h":20,"palette":824,"offset":1374941,"ox":0,"oy":0,"compressed":false,"packed_size":177},{"name":"icon/icon-yunjin/1","w":20,"h":20,"palette":825,"offset":1375158,"ox":0,"oy":0,"compressed":false,"packed_size":177}],"palettes":[[0,65406,65271,34782,58582,15515,63879,63846,63846,63846,51431,43177,12749,12388,28672,0],[0,65406,65271,32735,60662,15515,63911,63846,63846,51431,43177,10669,12355,36864,0,0],[0,65406,65271,36798,58582,15515,63911,63846,63846,49351,43177,10668,10307,32768,0,0],[0,65406,65271,36765,32059,56436,9079,63846,63814,51399,43177,10635,12355,43008,0,0],[0,65407,65271,36733,60597,25818,9078,63846,63846,51431,43177,12651,8258,36864,0,0],[0,65338,65174,28221,60566,23444,63878,63846,63846,49384,43177,20710,2183,36864,0,0],[0,65305,28221,60565,23444,63878,63846,63813,47336,43236,43177,18661,2184,28672,0,0],[0,65406,65271,64950,30301,60533,9078,63846,63846,51431,43177,10635,14435,34816,0,0],[0,65406,65271,30301,60565,11126,63878,63846,63846,49351,43177,10667,10339,43008,0,0],[0,65406,65272,38748,60565,25851,9078,63846,61798,49352,43177,10635,12355,32768,0,0],[0,65406,65271,38749,60565,25850,6999,63846,63814,49351,43177,10603,14403,30720,0,0],[0,65405,65271,30719,62741,23900,64008,63846,63846,27375,49351,43177,10341,38912,0,0],[0,65406,65271,30719,36251,56469,64073,63846,63846,51431,43177,12846,10307,45056,0,0],[0,65405,65271,28671,62772,58522,21821,19771,64171,63846,63846,25361,47304,6310,0,0],[0,65406,65271,28671,62739,58522,23868,64073,63846,63846,23313,47304,8358,32768,0,0],[0,65406,65271,34782,58582,15515,63879,63846,63846,51399,43177,10668,12355,38912,0,0],[0,65406,65304,34782,58582,15515,63878,63846,63846,49351,43177,12749,12388,36864,0,0],[0,65406,65303,34782,58581,13467,63911,63846,63846,51431,43177,12748,10307,32768,0,0],[0,65406,65271,30719,60662,13435,63911,63846,63846,49352,43177,10668,10307,36864,0,0],[0,65406,65271,36798,58582,15515,63911,63846,63814,49351,43177,10668,10307,36864,0,0],[0,65406,65271,36766,30011,56436,9079,63846,63846,51431,43177,10635,12355,40960,0,0],[0,65406,65271,36733,40217,52277,9079,63846,63846,51430,43177,14699,8258,34816,0,0],[0,65338,65142,28221,60566,23444,63878,63846,63846,47304,43177,20710,2182,28672,0,0],[0,65338,65112,26173,60565,23444,63878,63846,63813,49383,43177,18662,2183,28672,0,0],[0,65406,65271,64950,30300,60533,9079,63911,63846,63846,43177,10636,12355,36864,0,0],[0,65406,65271,30301,60565,11126,63911,63846,63846,49383,43177,10667,12388,43008,0,0],[0,65406,65271,38748,60565,25851,9078,63846,61830,49351,43177,10635,12355,28672,0,0],[0,65406,65271,36701,60565,25850,9079,63846,63814,49351,43177,10636,12355,26624,0,0],[0,65406,65271,65271,30719,62741,25915,62090,63846,53479,43177,12847,10307,40960,0,0],[0,65404,65271,28671,64813,64688,30042,64430,63846,60300,21198,45256,6274,0,0,0],[0,65404,65271,65271,38781,64717,31992,62284,63846,61734,43305,14892,8258,0,0,0],[0,65338,65107,36669,21821,64685,50159,60077,63846,63846,47273,17039,8291,0,0,0],[0,65338,65042,28221,64717,52206,60110,63846,63846,63846,47273,14959,10339,0,0,0],[0,65406,65271,30719,32123,64717,54254,60110,63846,63846,47272,17007,10338,0,0,0],[0,65337,65140,26173,64717,52206,60141,63846,63846,63846,47273,17072,10371,0,0,0],[0,65305,26173,64717,52207,60109,63846,63846,63846,63846,47273,17039,8323,0,0,0],[0,65338,61047,26494,21821,64686,52174,58094,63846,63845,47273,17039,8291,0,0,0],[0,65338,63093,28542,21821,64686,52174,60142,63846,63846,47273,17039,10371,0,0,0],[0,65338,65142,28510,21821,64747,62575,50159,60142,63846,47273,17105,10371,0,0,0],[0,65338,60982,28478,21821,64747,62576,50159,60141,63846,47273,17073,8323,2048,0,0],[0,65338,30719,30075,64717,52206,60142,63846,63846,63846,47272,17039,10339,0,0,0],[0,65338,65109,26173,64685,52175,60142,63846,63846,63846,47273,19087,8323,0,0,0],[0,65338,63130,26495,21821,64747,62544,52174,58094,63846,47273,17006,8323,0,0,0],[0,65338,65177,28542,21821,64686,50126,60142,63846,63846,47273,17006,10371,0,0,0],[0,65338,28671,34236,64717,52207,58094,63846,63846,63846,47273,14991,10371,0,0,0],[0,65274,24126,64747,64624,50159,58094,63846,63846,61798,47273,19086,8323,2048,0,0],[0,65337,65075,26173,64717,54254,60141,63846,63846,63846,47272,14991,8323,0,0,0],[0,65337,58933,26527,21821,62638,52174,60109,63846,63846,47273,17039,8323,4096,0,0],[0,65305,24094,64747,62576,50127,60141,63846,63846,63845,47273,17105,8323,0,0,0],[0,65338,63061,28478,21821,64717,52207,60142,63846,63846,47272,17039,10371,0,0,0],[0,10763,34,34,33,34,33,33,33,33,33,1,0,0,0,0],[0,8683,34,34,33,34,33,33,33,33,33,1,0,0,0,0],[0,8650,34,34,34,33,34,33,33,33,33,33,1,0,0,0],[0,10764,34,34,34,34,33,33,33,33,33,1,0,0,0,0],[0,10699,34,34,33,34,33,33,33,33,33,1,0,0,0,0],[0,4326,34,34,98,33,33,33,33,33,1,0,0,0,0,0],[0,4326,34,34,66,33,33,33,33,33,1,0,0,0,0,0],[0,10699,34,34,33,33,33,33,33,1,1,1,0,0,0,0],[0,10699,34,34,33,33,33,33,33,1,1,0,0,0,0,0],[0,10699,34,33,34,33,33,33,33,33,1,1,0,0,0,0],[0,8618,34,34,34,33,33,33,33,33,1,0,0,0,0,0],[0,10731,34,34,34,34,33,33,33,33,33,1,0,0,0,0],[0,12877,34,34,34,34,33,33,33,33,33,1,0,0,0,0],[0,10731,34,34,34,33,34,33,33,33,33,1,0,0,0,0],[0,8618,34,34,34,33,34,33,33,33,33,33,1,0,0,0],[0,8650,34,34,33,34,33,33,33,33,33,1,0,0,0,0],[0,65372,65210,57179,46392,35632,63846,55555,41127,26721,26721,6376,14369,0,0,0],[0,65373,65210,65145,52986,62645,63911,27439,45223,26721,26721,26721,12454,14369,0,0],[0,65373,65210,65178,53018,64593,63846,33616,45223,26754,26721,26721,6375,14369,0,0],[0,65373,65210,65146,55066,62644,23704,53637,45222,26721,26721,14500,12321,0,0,0],[0,65373,65210,65113,46746,64171,37614,45223,26725,26721,26721,14499,10273,0,0,0],[0,65373,65210,65113,46746,64171,37613,45223,26725,26721,26721,14499,10273,0,0,0],[0,65242,57179,46392,37679,63782,43238,28803,28769,26721,26721,14500,12321,0,0,0],[0,65340,65210,57179,46392,37679,59717,41127,28775,28769,26721,26721,8422,14369,0,0],[0,65339,65210,53082,46392,41809,63846,53539,39079,26721,26721,26721,14499,6144,0,0],[0,65210,53082,46392,39760,59716,41128,26756,26721,26721,26721,18595,8225,0,0,0],[0,65340,65210,65145,57114,62645,63911,23671,37284,45223,26721,26721,12386,12288,0,0],[0,65339,65210,65115,57147,62644,29913,47526,45222,26721,26721,14468,8192,0,0,0],[0,65242,55131,48440,37679,63782,43238,28833,28774,28769,26721,26721,14532,12320,0,0],[0,65307,65210,53082,64788,27996,39760,59748,59558,39079,26853,26721,26721,14466,6144,0],[0,65372,65210,64951,55067,62645,63878,27439,45223,26721,26721,6376,14368,0,0,0],[0,65372,65210,65210,57115,62645,63911,25719,37284,45222,26721,26721,14467,10240,0,0],[0,65339,65210,57179,44344,37713,63782,43238,28806,28769,26721,26721,10339,28672,0,0],[0,65339,65210,65210,57147,64723,36123,57765,21198,45222,26721,26721,10338,40960,0,0],[0,65437,65275,46845,58678,31929,60142,53771,37551,15060,45353,32968,10471,100,12,0],[0,65437,65275,48861,58678,31962,60142,53771,39598,15060,45353,35049,12650,8292,34,0],[0,65372,48861,58710,34042,60174,55852,39631,15093,47433,35081,18729,6342,65,2,0],[0,65436,65243,46845,58678,29914,60142,55819,37550,15027,49514,37097,22793,6374,38,0],[0,65340,44765,58646,29881,60141,55819,37550,12979,47433,35017,22760,6374,38,64,0],[0,65339,44765,58646,29913,56144,62125,55852,37550,15092,47531,41128,22793,6342,35,0],[0,65372,60823,34461,38039,56144,62124,55852,39630,15093,45515,41128,22793,4294,37,0],[0,65437,65243,46781,58646,33944,60174,60044,53771,39566,14994,39112,10439,67,8,0],[0,65436,65242,44733,58646,31863,60142,60044,53739,39534,14962,39112,10439,36,32,0],[0,65437,65209,50909,30334,56501,27736,62124,53739,39501,14961,39080,10405,35,0,0],[0,65437,65242,55004,32478,56566,27769,62157,53771,39566,14994,41193,12519,37,0,0],[0,65150,60859,44122,19117,10535,8454,6438,6372,6372,6372,6372,4227,18432,0,0],[0,65149,60859,54463,33716,21198,16939,10535,8454,6404,6372,6372,4259,26624,0,0],[0,65117,60858,54463,33749,19117,10535,8551,8453,6404,6372,6372,4226,47104,0,0],[0,65117,54495,37879,19085,10535,10535,10535,8421,6372,6372,6372,4259,34816,0,0],[0,65085,54463,35798,19085,10567,10535,10535,10535,8453,6404,6372,6372,4259,22528,0],[0,65085,54494,33717,19085,10535,10535,10535,6405,6404,6372,6372,4259,0,0,0],[0,65084,54495,31669,17036,10535,8486,6405,6404,6372,6372,6372,4227,0,0,0],[0,65118,56573,33717,19182,16874,10535,8486,6373,6372,6372,6372,2178,40960,0,0],[0,65118,56541,33717,19182,14826,10535,8454,6405,6404,6372,6372,4227,47104,0,0],[0,65085,54463,35798,19085,10535,10535,10535,8453,6404,6372,6340,4227,36864,0,0],[0,65085,54463,35798,19085,10535,10535,8453,6404,6372,6372,6372,4226,40960,0,0],[0,63261,39979,29263,21041,21008,21008,21008,18989,43495,29099,12713,6307,0,0,0],[0,63228,37932,25168,21041,21008,21008,21007,18989,43495,29099,12713,6340,0,0,0],[0,63228,39980,23121,21041,21008,21008,21033,17002,41448,29099,14762,6372,0,0,0],[0,63228,39979,23121,21041,21008,21008,17003,43495,20973,29099,14762,6372,0,0,0],[0,63228,39979,33324,21040,21008,21008,18958,43495,37325,20874,12713,4226,6144,0,0],[0,63261,39979,25169,21041,21008,21008,17003,41448,27051,14762,8550,2114,2048,0,0],[0,63228,42026,23121,21041,21008,21008,14923,41448,27051,14762,6372,4096,0,0,0],[0,63228,39947,25167,21008,21008,21008,14922,41448,27051,14762,10598,4161,9,0,0],[0,65401,61051,50281,33388,21041,21008,21008,17069,45512,27052,12713,6307,34816,9,0],[0,63257,37802,25167,21008,21008,21008,21065,17006,43464,27052,12713,6308,6144,10,0],[0,63260,50313,31341,21008,21008,21008,21008,17037,45511,25004,12713,6307,38912,8,0],[0,63260,42027,31278,21041,21008,21008,21033,16941,43464,25003,12713,6340,2048,4,0],[0,65470,63099,39979,27216,21040,21008,21008,21008,16973,43496,29100,12713,6307,0,0],[0,63261,39979,27215,21041,21008,21008,21008,18990,43496,27051,12713,4227,0,0,0],[0,58993,52394,58340,31561,45543,27116,21041,21008,21008,20908,14793,14663,20512,0,0],[0,63089,46348,60388,35753,45543,33353,21008,21127,20907,14827,14728,36962,2113,13,0],[0,61079,17175,25168,21041,21008,21008,16976,43496,29099,14762,10601,4196,0,0,0],[0,61078,17175,25168,21070,21008,21008,21008,16975,41416,16810,10601,4230,0,0,0],[0,63258,27468,23120,21008,21008,21008,21003,18990,43496,22922,12713,6307,0,0,0],[0,63261,31659,25168,21041,21008,21008,20994,18989,43495,22922,12713,4259,0,0,0],[0,63228,33739,25168,21041,21008,21008,21033,16941,45511,27051,12714,6307,0,0,0],[0,63158,39816,25168,21041,21008,21008,18989,45544,43495,43463,25002,12714,8420,0,0],[0,63158,39849,27215,21008,21008,21008,18990,45544,43495,43463,29098,12714,8420,0,0],[0,63191,37737,29229,21041,21008,21008,21008,18958,43495,27050,14762,10630,6307,0,0],[0,63159,37736,29263,21041,21008,21008,21008,18957,43495,25002,12713,6307,0,0,0],[0,65305,39817,25134,21041,21008,21008,21008,18988,43495,29132,14794,12647,4194,0,0],[0,65305,37738,27150,21040,21008,21008,21008,45543,43495,29099,14795,14695,4162,0,0],[0,63193,35626,25103,21008,21008,18956,45544,43496,43495,29099,14795,12647,2081,0,0],[0,63193,33579,31244,21008,21008,21008,23055,45544,43495,29100,14795,10469,0,0,0],[0,63161,31529,23120,21073,21008,21008,17003,39401,24970,12714,12583,8453,0,0,0],[0,63226,31562,23088,21041,21008,21008,14954,43495,20974,22955,12714,12682,6404,0,0],[0,63261,65033,62564,19115,25168,21008,17003,45544,43495,25003,14795,8420,0,0,0],[0,65206,41863,23120,21040,21008,21008,17004,45543,43495,25003,14762,8453,0,0,0],[0,65502,63099,62888,31373,21041,21008,21008,17068,43495,25004,14795,10631,6307,0,0],[0,63261,62888,23120,21041,21008,21008,20994,17068,43495,27052,12713,6340,0,0,0],[0,65273,48072,23055,21041,21008,21008,21008,31178,20974,14763,10630,8388,0,0,0],[0,65272,48040,21008,21008,21008,21008,43495,20908,20941,12746,10631,4194,0,0,0],[0,65203,35689,23121,21072,21008,21008,21008,19024,41418,20874,12713,8388,0,0,0],[0,65204,35656,25168,21041,21008,21008,21008,18991,41418,20874,12713,8388,0,0,0],[0,65535,63131,62855,35564,21041,21008,21008,17036,43495,25004,14795,12714,8452,0,0],[0,65341,65034,54342,17068,45544,43495,21039,37327,22955,14762,10630,6307,0,0,0],[0,63159,41863,31277,21008,21008,21008,21008,18958,43495,27052,14762,8420,0,0,0],[0,63158,39783,27183,21041,21008,21008,21008,18958,43495,27051,14762,8452,0,0,0],[0,65238,37768,23120,21008,21008,17002,39401,27052,20873,12714,16712,8452,0,0,0],[0,65238,37736,23121,21041,21008,21008,17035,39401,27052,20873,14762,8452,0,0,0],[0,63192,35689,25134,21040,21008,21008,16969,43495,23022,25004,14762,8452,0,0,0],[0,63192,37737,25136,21008,21008,16971,45544,43495,20974,27052,14762,6404,0,0,0],[0,65238,39816,25168,21107,21008,21008,21065,17003,39401,22922,12714,6404,0,0,0],[0,65238,39816,23120,21041,21008,21008,21065,17003,39401,22922,12714,8453,0,0,0],[0,63261,41994,25168,21040,21008,16971,39401,27051,20873,14762,10630,4194,0,0,0],[0,63260,39849,23120,21008,16971,43495,23022,29099,18826,12714,14631,6372,2,0,0],[0,65272,25393,39402,21040,21008,21008,21008,18959,35279,20874,12714,8453,0,0,0],[0,65373,39983,23154,21041,21008,21008,16974,39401,33230,20874,14762,8453,0,0,0],[0,65272,31562,25168,21040,21008,16973,43495,23022,29098,14762,10631,6307,18432,0,0],[0,52627,19118,25136,21041,21008,21008,21008,21008,18959,39373,20875,12714,8485,0,0],[0,56727,16906,16906,16906,27013,10566,10533,10533,10566,30850,26721,6274,0,0,0],[0,58807,16906,16906,16906,27013,10566,10533,10533,10566,47270,26721,6274,0,0,0],[0,56727,16906,16906,16906,29061,10566,10533,10533,10566,47269,26721,6274,0,0,0],[0,56726,16906,16906,16906,24966,10566,10533,10533,10566,45221,26721,6274,0,0,0],[0,56726,16906,16906,16906,24965,10566,10533,10533,10566,30850,26721,6274,0,0,0],[0,56726,16906,16906,16906,27013,10566,10533,10533,10566,30850,26721,6274,0,0,0],[0,58807,41483,16906,16906,27013,10566,10533,10533,10566,30850,26721,6274,0,0,0],[0,56726,16906,16906,16906,27046,10566,10533,10533,10566,30850,26721,6274,0,0,0],[0,56694,16906,16906,16906,24966,10566,10533,10533,10566,30849,24673,4226,0,0,0],[0,56726,16906,16906,16906,24998,10566,10533,10533,10566,30850,26721,6274,0,0,0],[0,56694,16906,16906,16906,24965,10566,10533,10533,10566,43141,26721,6274,0,0,0],[0,56726,16906,16906,16906,24966,10566,10533,10533,10566,30850,26721,6274,0,0,0],[0,56694,16906,16906,16906,24966,10566,10533,10533,10566,30850,26721,6274,0,0,0],[0,56662,16906,16906,16906,24966,10566,10533,10533,10566,30849,24673,4226,0,0,0],[0,56759,18953,16906,16906,24966,10566,10533,10533,10566,30850,24673,6274,0,0,0],[0,54678,16906,16906,16906,24965,10566,10533,10533,10566,30850,26721,6275,0,0,0],[0,56662,16906,16906,16906,24998,10566,10533,10533,10566,30850,24673,4226,0,0,0],[0,56727,16906,16906,16906,29061,10566,10533,10533,10566,45222,26721,6339,6176,0,0],[0,65210,41936,16906,16906,16906,27013,10566,10533,10566,45221,26721,6339,6176,0,0],[0,56727,16906,16906,16906,27013,10566,10533,10533,10566,45221,26721,6339,6176,0,0],[0,56727,41483,16906,16906,27013,10566,10533,10533,10566,30850,26721,6274,0,0,0],[0,65210,39856,16906,16906,37284,12679,10533,10566,45221,26721,26721,6340,4226,8257,0],[0,65210,37775,16906,16906,37284,12679,10533,10566,45221,26721,26721,6340,4227,8257,0],[0,65210,37743,16906,16906,37284,12679,10533,10566,45221,26721,10500,6307,4259,8225,0],[0,65210,37775,16906,16906,22918,10533,10566,47269,26721,26721,26721,10435,4259,4128,0],[0,65210,41969,16906,16906,39332,12680,10533,10566,47269,26721,26721,8388,4259,8257,0],[0,65210,39856,16906,16906,22950,10533,10566,47269,26721,26721,14531,6307,4226,4128,0],[0,65210,37775,16906,16906,22950,10533,10566,45221,26721,26721,26721,10435,4226,4128,0],[0,65210,37775,16906,16906,35236,12679,10533,10566,45221,26721,26721,6340,4227,6176,0],[0,65210,43985,16906,16906,20870,43173,26721,22690,10533,8453,6307,4226,4128,0,0],[0,65210,44017,16906,16906,16906,24966,10566,10534,10533,10566,32898,14531,4226,0,0],[0,48756,19175,23081,16906,12844,16841,49351,26721,24707,10534,14565,4260,22531,21,0],[0,48756,19174,21033,16906,12843,16841,49351,26721,22724,10533,14564,4260,22531,21,0],[0,50805,19207,23112,16906,12844,20936,49320,26721,22692,10533,14565,4259,24579,21,0],[0,48756,17126,21033,16906,12844,18888,49320,26721,24739,10534,14565,4259,26627,21,0],[0,50837,19174,21033,16906,12844,18888,49320,26721,24739,10534,14565,4259,26627,21,0],[0,48756,19174,21033,16906,12843,20936,49321,26721,22691,10533,14565,4259,24579,21,0],[0,48724,19175,21033,16906,12844,18888,49320,26721,24739,10533,14565,4259,22530,21,0],[0,50805,17126,23080,16906,12844,16840,49351,26721,24706,10534,14597,4260,22531,21,0],[0,46611,19143,21033,16906,10796,18888,49320,26721,24739,10533,14565,4260,28675,23,0],[0,46611,19143,21033,16906,10796,20936,49320,26721,24707,10533,14565,4260,28675,23,0],[0,50838,19175,25129,16906,10795,18856,47304,26721,22724,10533,14597,4259,12289,23,0],[0,52918,19207,23113,16906,10795,18856,47304,26721,24740,10533,14565,4259,20482,23,0],[0,17104,34,34,34,33,1,1,0,0,0,0,0,0,0,0],[0,19283,34,34,33,33,1,1,0,0,0,0,0,0,0,0],[0,17104,34,34,33,33,1,1,0,0,0,0,0,0,0,0],[0,14990,34,34,33,33,1,1,0,0,0,0,0,0,0,0],[0,12909,34,34,33,33,1,1,0,0,0,0,0,0,0,0],[0,12910,34,34,34,34,33,1,1,0,0,0,0,0,0,0],[0,14990,34,34,33,33,1,1,1,0,0,0,0,0,0,0],[0,14925,34,34,34,33,1,1,0,1,0,0,0,0,0,0],[0,14958,34,34,33,33,1,1,0,0,0,0,0,0,0,0],[0,17104,34,34,34,33,33,1,1,0,0,0,0,0,0,0],[0,17104,34,34,33,33,1,1,1,0,0,0,0,0,0,0],[0,65275,41936,31339,31242,14825,22792,10566,8453,6373,6373,6340,2082,33,0,0],[0,65340,46129,39498,21164,27146,14793,22824,8486,6373,4260,4131,1,33,0,0],[0,56791,31405,33290,14825,24873,10599,8453,6373,8388,6340,8260,33,33,0,0],[0,56791,31404,31242,14825,24873,10599,8453,6373,6372,4259,8260,33,33,0,0],[0,56791,29324,33290,14825,26921,10567,8453,6373,8388,6340,6211,1,33,0,0],[0,56791,31405,33290,14825,24840,10599,8453,6373,8388,6340,4259,4130,33,0,0],[0,58872,31404,33290,14825,31017,14664,8486,6373,6373,6340,8260,33,33,0,0],[0,65276,41938,18986,16906,16906,22987,20873,16745,12647,10534,10534,10533,18562,0,0],[0,65276,41937,21035,16906,22987,20873,16745,12647,10534,10533,8486,30850,4226,0,0],[0,65276,41937,18986,16906,16906,22987,20873,16745,12647,10534,10533,32898,6275,0,0],[0,65276,41937,18986,16906,16906,22987,20873,16745,12647,10534,10533,30850,6275,0,0],[0,65276,41937,18987,16906,16906,16906,22987,20873,16745,12647,10534,10533,18562,0,0],[0,65276,41937,21035,16906,16906,22987,20873,16745,12647,10534,10533,30850,6274,0,0],[0,65276,41937,18954,16906,16906,22987,20873,16745,12647,10534,10533,32898,6275,0,0],[0,65276,41937,18954,16906,22987,20873,16745,12647,10534,10533,10532,32898,6275,0,0],[0,65276,42002,21003,16906,16906,16906,22987,20873,16745,12647,10533,10533,18562,0,0],[0,65276,42002,21003,16906,16906,16906,22987,22921,16745,12647,10534,10533,18562,0,0],[0,60861,37716,26981,10535,10534,45255,4259,32866,26721,26721,26721,10305,16384,0,0],[0,60860,39797,26982,10535,10632,59558,20711,4259,34914,26721,26721,26721,10305,14336,0],[0,58781,39796,29061,10535,10535,8518,59558,16614,6340,4259,32866,26721,8257,14336,0],[0,58781,39796,29061,10535,10535,8518,59558,16614,6340,4259,32866,26721,8257,16384,0],[0,65147,54462,35370,10535,10567,55463,8421,39043,26721,26721,8322,2113,24576,0,0],[0,65179,54495,39564,10535,57511,8421,36995,26721,26721,26721,8322,2113,18432,0,0],[0,65115,54462,43660,10568,53415,10469,4259,32866,26721,26721,18497,2113,20480,0,0],[0,65115,54462,41644,10568,51367,12517,4259,32866,26721,26721,26721,10305,22528,0,0],[0,60830,41910,14663,10567,55463,8421,36995,26721,26721,26721,10370,2113,18432,0,0],[0,60829,39829,27014,10535,10600,55463,8421,36995,26721,18529,4259,2113,18432,0,0],[0,63036,54463,43990,27080,10535,8551,43208,4259,32898,26721,26721,8257,20480,0,0],[0,58750,41943,27047,10535,8552,57511,28872,4259,30850,26721,26721,8257,14336,0,0],[0,55067,63181,60888,50358,47630,45418,45418,59656,22887,8355,4161,2048,0,0,0],[0,57181,55036,63213,61168,63181,60888,43889,43402,24838,8290,2113,2080,0,0,0],[0,61269,55036,52988,63181,60858,45904,39371,47465,16613,10338,4161,0,0,0,0],[0,57181,55036,65326,59124,63181,60857,43824,43401,24838,14467,4161,2080,0,0,0],[0,61269,55036,59123,63181,56848,47630,27368,37127,10403,6210,2081,0,0,0,0],[0,55066,55032,63181,58960,46160,45648,27113,41256,10435,8290,4161,0,0,0,0],[0,55068,63247,63181,63181,56942,60796,39855,45418,26950,18628,4161,32,0,0,0],[0,57114,57078,52955,63181,61135,62875,58682,39531,24837,8290,2081,0,0,0,0],[0,59156,63181,60887,52499,43950,47696,35306,41223,10435,8258,2081,0,0,0,0],[0,59156,63181,58930,62814,50357,37547,45648,43337,12516,10338,2081,0,0,0,0],[0,57213,55036,65326,59124,63181,58778,45808,45450,59656,20742,8322,4161,0,0,0],[0,61270,55035,55033,63181,60858,56634,45841,37289,26853,6210,2081,0,0,0,0],[0,65343,65110,54418,60276,53643,25066,12681,12649,12649,12649,12516,6308,28672,0,0],[0,65343,63062,62577,62292,37875,53643,20969,12681,12649,12649,12419,4227,28672,0,0],[0,65503,63135,65110,62577,60276,64333,37843,53675,22985,12681,12649,12649,6275,26624,0],[0,65343,63062,62577,60276,64302,39890,51595,20937,12681,12649,12649,6308,30720,0,0],[0,65503,63103,63062,64494,50100,35306,12681,12649,12649,12649,12418,6308,36864,0,0],[0,65503,61054,62997,62576,64300,50100,51626,18921,12649,12649,12648,6308,22528,0,0],[0,65471,63103,65077,58805,62544,64300,50067,51626,18921,12649,12649,6307,26624,0,0],[0,65343,63030,64462,50068,51659,18921,12681,12649,12649,12649,12452,4227,26624,0,0],[0,65439,65110,62641,60276,38004,33453,45385,12713,12649,12649,12484,6307,36864,0,0],[0,65470,65109,61053,62610,60276,33877,55789,25066,12682,12649,12516,4259,30720,0,0],[0,65535,65142,56991,62482,35795,53610,26984,12682,12649,12649,12649,6308,22528,0,0],[0,65407,65109,62609,60276,35923,53741,25098,12682,12649,12679,12549,6308,30720,0,0],[0,65535,63198,65110,54482,58228,53708,25098,12713,12649,12649,12515,6308,36864,0,0],[0,65503,63097,62673,60276,40020,53708,25066,12714,12649,14693,12515,6307,30720,0,0],[0,65343,63030,62545,60276,64333,35795,53675,20970,12649,12649,12354,6275,22528,0,0],[0,65535,63102,63062,62545,60276,39924,51627,20969,12907,12649,12649,12649,6307,32768,0],[0,65343,63062,62577,60276,37875,51627,20969,12681,12649,12649,12354,4227,24576,0,0],[0,65342,63030,62576,64300,50100,51659,18954,12681,12649,12649,12649,6307,26624,0,0],[0,65343,63030,62419,64301,33650,53610,24969,12777,12649,12649,12649,6308,30720,0,0],[0,65343,63062,62577,60276,64302,39859,51562,22985,12712,12649,12649,6308,32768,0,0],[0,63295,63030,62576,60276,35828,53707,23018,12713,12649,12649,12517,6307,20480,0,0],[0,65503,61055,63062,62608,60276,35892,37517,45385,12746,12649,12484,4227,24576,0,0],[0,65503,63063,50224,23277,21523,55687,16873,12681,12649,12679,12450,4259,36864,0,0],[0,65535,63063,50224,23277,19313,55686,18921,12681,12649,12649,12678,6307,24576,0,0],[0,65535,65439,65109,61019,52304,23277,21425,55687,18921,12649,12649,4259,20480,0,0],[0,65535,65471,63063,52304,23277,21361,55687,20968,12777,12649,12649,12550,4227,32768,0],[0,65503,63064,58642,33647,19181,16873,59815,22855,12681,12649,12649,6307,32768,0,0],[0,65407,65109,60658,31534,19181,16873,43367,12681,12649,12649,12648,6307,30720,0,0],[0,65406,65109,60657,29486,19181,16873,59815,24903,12681,12649,12648,8453,2081,20480,0],[0,65406,65109,60658,29486,16873,59815,22855,12681,12649,12649,12649,4227,26624,0,0],[0,65503,65109,56724,52305,23277,21425,53638,18986,12713,12649,12515,4259,38912,0,0],[0,65503,65109,56660,52305,23478,23277,23277,21426,53638,18986,12649,6307,24576,0,0],[0,65535,61047,50258,25325,21263,51558,14792,12681,12649,12649,12646,4259,28672,0,0],[0,65535,65110,58577,37808,23275,23277,21394,53639,16938,12649,12353,6308,26624,0,0],[0,65503,63064,48241,23277,23277,17133,51558,18953,12681,12649,12678,12548,4259,43008,0],[0,65535,63064,50257,23277,23277,21424,51590,16873,12680,12649,12582,6307,34816,0,0],[0,65535,65535,63097,52304,23277,21458,55687,18921,12649,12649,12678,4259,26624,0,0],[0,65535,63065,52304,23277,21458,55687,18921,12681,12649,12647,12517,4259,24576,0,0],[0,65535,65503,63065,52304,23277,21394,55687,18921,12681,12649,12484,4259,20480,0,0],[0,65406,65109,60658,29486,16905,41318,12681,12649,12649,12679,12550,6308,24576,0,0],[0,6472,34,2082,33,33,33,33,33,33,1,1,0,0,0,0],[0,6439,2082,34,33,33,33,33,33,1,1,0,0,0,0,0],[0,2147,2082,33,33,33,33,33,33,1,1,0,0,0,0,0],[0,2147,2082,33,33,33,33,33,1,1,0,1,0,0,0,0],[0,2147,2082,33,33,33,33,33,33,1,0,1,0,0,0,0],[0,2147,2082,33,33,33,33,33,33,1,1,0,1,0,0,0],[0,2147,2082,33,33,33,33,33,33,1,0,0,0,0,0,0],[0,12487,34,66,33,33,33,33,33,1,0,0,0,0,0,0],[0,6375,34,4132,131,33,33,33,33,33,1,0,0,0,0,0],[0,6472,6181,34,33,34,33,33,33,33,33,1,0,0,0,0],[0,6505,2082,2082,33,33,33,33,1,1,0,0,0,0,0,0],[0,4261,2082,2082,33,33,33,33,33,1,1,0,1,0,0,0],[0,8553,2082,2082,33,33,33,33,1,1,0,1,0,0,0,0],[0,2179,2082,33,33,33,33,33,1,1,0,0,0,0,0,0],[0,2180,2082,33,33,33,33,33,33,1,1,0,0,0,0,0],[0,2147,34,33,33,33,33,33,1,1,0,1,0,0,0,0],[0,65371,63095,62741,50423,58260,35697,45678,39307,23117,26856,16842,6308,20482,2,0],[0,65404,65175,62772,50488,60337,37778,43598,37259,25197,26856,16875,6308,18435,2,0],[0,65404,65238,58840,62546,44084,54000,39599,25263,21036,35146,22727,10568,4195,2,0],[0,65404,65206,58840,62546,44117,54000,41647,25230,19021,35146,22727,12616,4195,3,0],[0,65404,65238,58840,62546,44116,54000,39599,25262,18956,35113,22727,10567,4195,2,0],[0,65371,65174,56696,60533,58293,37876,51953,49742,37453,25197,16875,26791,6308,1,0],[0,65371,63063,62741,48376,58357,56114,35665,45678,39307,27050,18923,6308,20483,2,0],[0,65371,63063,62709,50424,58358,56114,35665,45678,39339,27050,18923,6308,20483,2,0],[0,65371,63063,62709,48375,56212,35665,45646,39307,23117,26856,16875,6308,22531,2,0],[0,65371,63063,56599,58390,56179,37778,47759,43500,31147,21036,8422,14371,33,1,0],[0,65370,63063,56599,58325,37811,47759,43501,31147,23117,18956,10502,12323,1,0,0],[0,65338,63063,56599,60438,56180,37811,47759,43501,31147,21036,10502,12323,1,1,0],[0,65371,63063,56631,58325,37811,47759,43501,31147,23117,18988,10535,12323,33,1,0],[0,63355,65173,52787,42127,62439,27503,29326,16905,16679,8486,6340,2113,0,0,0],[0,65370,65173,52787,42160,62439,27535,27311,25064,12712,8486,6341,33,0,0,0],[0,65370,65173,54835,40113,62439,29583,29394,27079,16938,12616,8454,2146,0,0,0],[0,65436,65173,65141,54801,38099,62439,33745,25394,33321,16875,8486,4195,0,0,0],[0,65239,63052,44404,64486,33745,25422,27276,31174,14792,8486,6341,33,0,0,0],[0,65369,65173,61047,54801,38098,50155,25422,29324,27111,12712,8486,8390,2113,0,0],[0,65402,65173,63092,54801,38099,64486,33778,25422,29290,18824,8486,2146,0,0,0],[0,65403,65173,63094,54834,38099,52203,23349,37416,21034,10566,12558,4227,0,0,0],[0,65239,61046,52754,38099,56298,27506,35336,21034,10566,12525,6340,2113,0,0,0],[0,65403,65173,52755,64486,38033,27506,31339,22951,10534,12525,6340,2081,0,0,0],[0,65370,65173,52788,42160,64487,29584,39561,21169,18793,8486,8453,2146,0,0,0],[0,63354,62972,56498,37846,47783,59815,14954,43206,26721,20740,6437,4226,16384,0,0],[0,63386,62972,56498,37846,47783,59815,14953,43206,26721,18692,6437,4226,20480,0,0],[0,65307,54647,56498,37845,47783,59815,19052,6727,43205,26721,18692,6437,4194,12288,0],[0,65275,56727,56529,37845,47783,57767,14954,43206,26721,18660,6437,4226,10240,0,0],[0,65275,56590,46167,53831,45703,19052,6727,43206,26721,18660,6437,4226,22528,0,0],[0,65276,54646,50292,53799,37548,10857,43206,26721,18692,6437,6307,4096,0,0,0],[0,65276,56694,56499,37877,53799,37549,12905,43206,26721,18692,6437,4226,12288,0,0],[0,65275,56727,52370,53799,41645,15019,12776,43206,26721,20741,6437,4226,20480,0,0],[0,65275,56590,48216,53799,41643,12971,12776,43206,26721,20741,6437,4226,22528,0,0],[0,65277,56591,42007,47783,61831,16969,43206,26721,22789,12581,4389,6274,24576,0,0],[0,65309,56592,37845,47783,59783,16936,43206,26721,22789,12549,4389,6274,18432,0,0],[0,63322,60923,56523,44089,47783,57767,14954,43206,26721,18660,6437,4226,18432,0,0],[0,65275,56590,46168,47783,59815,19052,6727,43206,26721,18660,6437,4226,16384,0,0],[0,65276,54646,50291,53799,37515,10857,43206,26721,18692,6437,4226,14336,0,0,0],[0,65276,54678,50323,53799,37549,12970,12776,43206,26721,18692,6437,4226,14336,0,0],[0,63321,62972,56530,39924,51784,12906,43206,26721,20741,6437,2341,4226,20480,0,0],[0,63226,52665,56499,39924,51784,12906,43206,26721,20741,6437,2341,4226,22528,0,0],[0,65277,56591,44055,47783,61831,16969,43206,26721,22789,12581,4389,6274,24576,0,0],[0,65277,56591,42007,47783,61831,16969,43206,26721,22789,12581,4389,6274,16384,0,0],[0,65304,65173,65173,65076,42704,64557,64324,44171,55782,25001,12777,4226,0,0,0],[0,65369,65173,64974,42704,64526,64324,64324,42091,53701,24969,12777,6274,0,0,0],[0,65337,65173,65075,42703,64524,64324,64324,40043,53701,22953,12744,4226,0,0,0],[0,65303,65173,61304,60879,64461,64324,64324,33834,45672,35014,12777,6307,14338,0,0],[0,65337,65173,65074,58996,64557,64324,64324,37962,43624,35014,10728,6307,12290,0,0],[0,65305,65173,65074,54932,64556,64324,27819,47848,19184,41222,22821,12777,6306,16387,0],[0,65337,65173,65170,65039,50834,64556,64324,33964,27374,39173,12777,6306,18435,0,0],[0,65336,65173,65173,64974,48753,64461,64324,52299,43624,35015,12777,6339,4096,0,0],[0,65271,65173,65169,36687,58832,64461,64324,52299,43624,35014,12777,6307,18435,0,0],[0,65369,65173,65173,65073,48818,64525,64324,31883,33484,41190,12778,4226,10242,0,0],[0,65402,65173,65073,50865,64589,64324,64324,33899,31436,41222,12777,6274,12290,0,0],[0,65337,65173,65106,61043,62541,11369,64392,64324,62312,59942,35111,8743,6209,0,0],[0,65337,65173,65173,65073,61043,60493,11368,64324,60265,59974,35111,8775,10338,0,0],[0,65336,65173,65074,61043,62541,11369,64393,64324,64324,59942,35079,10791,8290,0,0],[0,65336,65173,65108,61075,62542,11368,64393,64324,64324,59974,35111,8775,10305,0,0],[0,65337,65173,65141,44849,64655,40042,64393,64324,62379,57926,39207,8775,10337,0,0],[0,65337,65173,65109,44849,64623,40042,64429,64324,64324,59941,39239,8775,8289,0,0],[0,65304,65173,65108,48979,58604,64495,15432,64357,64324,60263,53670,24966,10337,8193,0],[0,65369,65173,65141,48979,58604,64495,15464,64356,64324,59974,39175,10758,12386,8193,0],[0,65304,65173,65109,46898,60589,11401,64395,64324,62347,59909,35111,10791,12386,0,0],[0,65239,65173,65141,44882,60622,11401,64395,64324,64324,59908,35111,10790,12386,0,0],[0,65304,65174,65173,65141,59222,58637,64462,13384,64324,59942,35046,8775,8257,0,0],[0,65336,65173,65173,65141,55125,58637,64462,17481,64324,55782,28967,10758,10337,0,0],[0,65304,65173,65141,46930,58637,64464,19594,64324,58217,59909,35079,8807,10338,0,0],[0,65304,65173,64975,52817,64462,64324,56395,15367,63938,49769,35046,6792,10370,0,0],[0,65206,62894,50476,11595,64462,64324,64324,13287,53896,57668,6760,26855,8290,0,0],[0,65206,62894,30027,64461,64324,64324,64324,11238,63970,51817,47333,18855,8289,0,0],[0,65337,65173,65141,44882,58637,64464,21642,64324,60300,59909,37159,8775,10338,0,0],[0,65336,65173,65173,65141,44882,64687,40075,64324,64324,59909,35111,8775,8290,0,0],[0,65206,62894,19915,50315,64462,64324,64324,13287,55911,55620,6759,26855,8290,0,0],[0,65206,62894,32075,64462,64324,64324,17383,63971,51817,49413,8775,26855,8290,0,0],[0,65338,65173,65141,50995,64559,42155,64324,64325,59942,39367,41191,39109,8484,6145,0],[0,65337,65173,65171,64946,54865,64463,64324,39977,57926,49382,22951,8289,0,0,0],[0,65370,65173,65108,40752,58604,64496,13514,64325,62347,59910,39207,8807,10338,26628,0],[0,65206,65108,36655,60557,13514,64430,64324,64324,62313,59942,45383,18855,12386,10241,0],[0,65370,65173,64882,60848,23882,64462,64324,64324,13287,61988,51461,18887,6209,0,0],[0,65336,62861,54444,17995,64427,64324,64324,27623,63970,63874,55912,16999,24739,0,0],[0,65174,63124,29833,64463,64324,64324,39815,55976,63874,47720,49382,6760,18596,0,0],[0,65238,60945,27785,64463,64324,43945,63971,49769,49382,4809,12774,26823,6209,0,0],[0,65174,65075,63189,22315,56491,64496,11304,64325,60299,57863,39207,8775,8289,12290,0],[0,65336,65173,65076,44816,56491,64464,9288,64325,62347,57895,39239,8807,6209,8193,0],[0,65305,64943,58670,17963,64463,64324,64324,64324,21448,59909,49382,18887,10338,0,0],[0,65271,65173,65107,42670,56459,64464,15529,64359,53897,55589,14951,28903,12386,10241,0],[0,65239,57243,56785,64325,11273,31435,14792,4775,47334,20807,10598,2145,0,0,0],[0,65502,65173,64941,52949,64357,13321,23114,6823,47334,20807,10598,2145,0,0,0],[0,65502,65173,64940,52982,64357,13353,23114,6823,47334,20807,10598,2145,0,0,0],[0,65501,65173,55189,31916,64324,56070,13004,49382,32998,16808,12712,8550,4258,22531,0],[0,65501,65173,51062,33932,64324,56037,13004,49382,35046,16808,10631,4259,22532,0,0],[0,65501,65173,64909,34191,64324,17165,51494,33062,14825,12679,8678,4259,30725,0,0],[0,65502,65173,49044,40206,64324,64293,15085,43270,49287,14792,8614,2178,6145,0,0],[0,65239,64973,52949,64356,19500,23114,6823,49382,55401,22855,10598,4226,5,0,0],[0,65239,50902,64357,21515,23113,8870,47334,55400,32998,12680,10598,4226,24580,1,0],[0,65468,65173,64939,52884,64357,15402,31403,14792,8870,45286,16743,10598,2146,14338,0],[0,65239,64978,50933,64389,17451,31435,14792,6791,45286,14727,10598,2146,22532,0,0],[0,4391,34,34,34,34,34,33,33,33,33,33,0,0,0,0],[0,6504,34,34,34,33,34,33,33,33,33,33,0,0,0,0],[0,4424,34,34,34,33,33,33,33,33,33,0,0,0,0,0],[0,6472,34,34,34,33,33,33,33,1,0,0,0,0,0,0],[0,6440,34,34,34,33,33,33,33,33,1,0,0,0,0,0],[0,6439,34,34,33,33,33,33,33,1,1,0,0,0,0,0],[0,6439,34,34,34,33,33,33,33,33,33,1,0,0,0,0],[0,4326,34,34,34,34,33,33,33,33,33,0,0,0,0,0],[0,6407,34,34,34,33,33,33,33,33,33,0,0,0,0,0],[0,4326,34,34,34,33,33,33,33,1,0,0,0,0,0,0],[0,6472,34,34,34,34,33,33,33,33,1,0,0,0,0,0],[0,4391,34,34,33,33,33,33,33,33,0,0,0,0,0,0],[0,6472,34,34,34,33,33,33,33,33,0,0,0,0,0,0],[0,8553,34,34,34,34,33,33,33,33,33,1,0,0,0,0],[0,8585,34,34,34,34,34,33,33,33,33,1,0,0,0,0],[0,14893,34,33,34,33,33,33,33,33,1,1,0,0,0,0],[0,4456,34,34,34,33,33,33,33,33,33,0,0,0,0,0],[0,2245,34,34,34,34,33,33,33,33,33,1,0,0,0,0],[0,4423,34,34,33,33,33,33,33,33,1,0,0,0,0,0],[0,6440,34,34,34,33,33,33,33,33,33,0,0,0,0,0],[0,65305,65076,52661,64393,64300,52146,43400,16874,12712,12649,8453,2081,0,0,0],[0,65305,65076,52660,64392,64300,52146,51689,35047,16874,10664,12649,4259,0,0,0],[0,65305,65075,48693,64459,64300,60276,41998,51689,37095,16873,12680,12649,6307,0,0],[0,65305,65075,48693,64459,64300,60276,41998,51689,35047,16874,12680,12649,4259,0,0],[0,65272,65075,54741,64359,64300,54163,51689,35014,16972,10664,12649,10599,4227,4096,0],[0,65273,65075,56789,64359,64300,54163,43368,16972,12712,12649,6307,6145,0,0,0],[0,65272,65108,56920,64330,52210,39240,17005,10696,12649,12649,12649,4227,0,0,0],[0,65305,65108,54839,64393,64300,50161,51593,26919,16972,8680,12649,4227,6145,0,0],[0,65370,65108,62871,34414,64331,52145,49641,35015,14859,12712,12649,4227,4097,0,0],[0,65338,65108,44757,54544,64363,52145,51689,37063,14859,10664,12649,4259,4097,0,0],[0,65305,65107,54902,62418,64324,42062,62155,31145,12777,12649,8421,6177,0,0,0],[0,65305,65076,62904,36366,64359,64300,52145,43368,16907,12680,12649,8582,6340,6145,0],[0,65272,65075,54741,64359,64300,52114,43368,16972,10664,12649,10599,4227,14338,0,0],[0,65272,65108,56920,64330,52210,49544,26919,17005,10664,12649,10599,4259,6145,0,0],[0,65338,65076,62871,34414,62320,64300,41998,49641,37063,16907,10664,12649,4259,0,0],[0,65305,65141,54934,62450,64324,42094,62155,31145,12778,12649,10534,6177,0,0,0],[0,65436,65109,61086,56625,62323,64299,44047,45416,16874,12681,12649,6307,0,0,0],[0,65305,65109,44757,64523,64300,48208,51689,39111,14728,6663,12649,4227,10241,0,0],[0,65305,65109,44758,64458,64300,60527,27728,49512,18824,8648,12649,6275,12289,0,0],[0,65305,65109,44757,64490,64300,60527,27727,51689,39111,16841,12681,6275,12290,0,0],[0,65239,52884,64685,48369,56269,49836,25456,21004,37194,30953,12648,12453,133,3,0],[0,65271,64750,58738,38355,56301,49836,29455,12877,37226,30953,12649,10405,99,3,0],[0,65239,52885,62670,46321,56333,51916,31535,14990,39274,28905,10666,10437,165,2,0],[0,65304,63159,62899,48499,64587,42065,52012,41451,19119,14762,30888,8389,66,3,0],[0,65336,63159,62899,48467,64619,42064,56140,43756,41419,17071,14729,28840,6340,3,0],[0,65239,55029,54675,64651,64587,42065,52012,39339,21328,14925,14730,18566,66,2,0],[0,65304,65109,62900,38451,64652,64555,40017,52044,39371,17103,14729,20614,97,2,0],[0,65336,61110,64979,52594,64619,44144,56140,43756,41387,23311,12878,16777,18566,3,0],[0,65336,59094,58835,64620,46224,58220,45869,43499,21328,16973,18858,30888,8389,3,0],[0,65303,54997,56723,64652,62507,39985,54060,41676,37258,19184,14697,18501,34,1,0],[0,65303,57045,56755,64652,62507,40017,56140,43756,39339,19216,14729,18534,66,1,0],[0,50783,46589,46524,44476,42363,33879,25459,23314,21201,17007,10636,6410,2184,8,0],[0,50782,46557,44476,44476,40250,31766,23346,21233,21200,17007,14862,8523,4299,2151,0],[0,50783,46589,44476,44476,44411,36024,29685,25427,21233,19088,14862,8490,4296,9,0],[0,50782,46589,46524,44476,44444,40250,33879,25459,23314,21233,19088,16975,10668,4264,0],[0,65339,65173,65107,50866,64523,64324,64324,31851,55878,19184,35046,12777,6307,0,0],[0,65339,65173,65107,52915,64556,64324,33964,57893,35047,19086,12777,6307,0,0,0],[0,65307,65173,65009,52850,64556,64324,64324,31915,55845,30951,19118,12778,8388,0,0],[0,65339,65173,65141,52882,64587,64324,33932,55845,30950,19119,12777,6307,0,0,0],[0,65207,42834,56590,64429,64324,41931,57892,32999,41157,19020,12745,6275,0,0,0],[0,65338,65173,64975,56557,30350,64462,64324,48108,53701,22953,12745,6340,0,0,0],[0,65338,65173,60880,64461,64324,64324,31818,53701,22954,12745,12713,6307,0,0,0],[0,65339,65173,59255,60881,64461,64324,37930,45413,39109,19020,12745,6307,0,0,0],[0,65370,65173,64973,58996,64462,64324,64324,33834,43624,32966,12777,6307,18435,0,0],[0,65336,65173,65074,52915,64589,64324,29836,47848,19184,39173,12777,4226,18435,0,0],[0,65271,65173,65173,64974,48752,64462,64324,64324,50251,43624,35015,12777,6307,10241,0],[0,65337,65173,65042,50866,64524,64324,64324,33931,55909,19184,35046,12810,4226,30725,0],[0,65490,65393,59247,65198,65131,54989,60908,50636,44491,42314,42313,42313,42313,31687,0],[0,48474,48312,40118,47856,33682,41552,31087,16913,10573,10476,10476,10476,10475,6313,0],[0,65304,65173,64972,44752,64494,64324,64324,46187,43625,35046,12745,6307,6145,0,0],[0,65337,65173,65006,44752,64462,64324,64324,44139,43625,37094,12745,4226,8193,0,0],[0,65370,65173,65173,65169,65074,52914,64619,64324,33964,53863,39110,12745,10241,0,0],[0,65336,65173,64938,52849,64494,64324,64324,33931,39627,41221,12777,6307,22532,0,0],[0,65239,65173,64973,56688,64462,64324,64324,21480,53702,24969,12777,6307,0,0,0],[0,65336,65173,65173,65006,52851,64461,64324,64324,31785,53701,24969,12777,6307,0,0],[0,65535,65434,65173,64975,44560,14142,64359,64292,49834,13101,37158,8453,6145,0,0],[0,65337,65173,65173,64973,44720,64494,64324,40011,55945,53573,25034,12777,6339,0,0],[0,65337,65173,65173,65007,42704,64493,64324,42091,55782,24969,12777,4226,0,0,0],[0,65304,65173,65042,40688,64556,64324,33898,55813,32999,19118,12745,4259,0,0,0],[0,65369,65173,65173,65005,42704,64493,64324,42091,53702,25001,10729,6307,0,0,0],[0,65436,65173,65173,65007,42704,64494,64324,40043,45672,37063,12745,6339,8193,0,0],[0,65337,65173,65073,42704,64524,64324,64324,42091,53701,25001,12777,6307,0,0,0],[0,65271,65173,65005,44752,64493,64324,64324,42091,57925,49413,24969,12777,6274,0,0],[0,65337,65173,65006,42704,64493,64324,64324,42091,53701,25001,12777,6307,0,0,0],[0,65337,65173,65006,42704,64493,64324,64324,42091,45672,35014,12777,6339,10241,0,0],[0,54995,48334,58119,15054,29124,16906,14825,22855,12647,10533,6372,2113,0,0,0],[0,52947,48366,60166,17102,16906,14792,26918,10533,8453,6307,2145,0,0,0,0],[0,62962,22261,62280,17165,27178,16906,10828,33095,12680,10533,6372,2113,30725,0,0],[0,44596,39690,21034,16906,16906,8745,14792,28966,10534,10533,6372,2113,0,0,0],[0,58998,60361,25325,12939,25093,16906,12811,29031,12712,12647,10533,6340,2113,0,0],[0,46612,41739,21034,16906,16906,14858,20839,10534,10533,10304,6372,2113,0,0,0],[0,61045,56266,29390,17036,16906,24967,12712,12647,10533,8453,6307,2113,64,0,0],[0,62994,24247,39723,25129,16906,16906,14858,22855,10599,10534,10533,6340,2113,0,0],[0,59060,48302,56102,17070,16906,14859,16873,24935,12647,10533,6340,2113,0,0,0],[0,65436,59034,52600,56335,46001,33816,29490,43694,27376,39308,18989,12551,30724,2,0],[0,65436,59002,52600,52338,50030,31670,41647,27376,39308,21102,16875,12551,26629,1,0],[0,65404,56954,62833,42365,52176,31670,41647,27376,45484,33130,18989,10471,36867,2,0],[0,65404,56954,60753,42365,50259,50030,31735,29458,35536,39308,18989,12551,26629,1,0],[0,65403,59001,52599,54354,50030,31670,39631,27376,39308,21069,14664,14371,2,64,0],[0,65404,59001,62834,42365,54352,52078,31670,41680,27376,39308,18989,12519,26629,2,0],[0,65371,58969,54582,56303,46000,31637,43694,27376,39308,23182,16875,10471,24580,2,0],[0,65371,59001,62833,44378,56303,43987,31636,43694,27344,39339,18988,12519,28678,1,0],[0,65403,56921,50552,58351,46000,31702,41648,27376,39307,23150,16907,12552,22532,1,0],[0,63355,56922,60754,42365,56303,43986,31637,41648,27344,37259,18988,12519,24580,1,0],[0,65370,64979,48571,56335,43988,31670,37584,27376,45516,31083,19021,12551,22534,1,0],[0,65404,59001,52567,56335,46002,31670,39632,27376,39340,21101,16875,10439,20488,1,0],[0,63356,56922,50520,48114,29556,41615,27344,45484,31082,21102,16843,10471,24580,2,0],[0,63356,56922,60756,42365,56304,43955,31637,39599,27344,37259,18988,10471,24581,2,0],[0,63324,54875,58708,40285,56304,43988,31670,35536,25296,39308,18956,10471,22533,2,0],[0,63355,54875,60756,42365,52209,33751,47790,43436,27377,31216,21102,16810,16518,1,0],[0,63324,54842,60755,42365,58352,46002,31670,45580,29295,23183,18956,14665,14404,2,0],[0,63323,56890,62803,42300,56304,45969,31637,43565,29263,23183,16908,14697,10308,2,0],[0,63355,56922,62802,42333,52176,31670,45709,43404,29295,23182,16908,14632,12324,3,0],[0,63323,54843,50520,56304,43988,29589,39600,25296,39308,18988,12552,18436,3,0,0],[0,63323,52795,58676,40285,56272,43989,29557,33456,37259,21069,16843,12519,22533,1,0],[0,63323,54875,60755,42333,56336,44021,33816,29491,43533,27248,21069,14665,14405,2,0],[0,63323,54843,52568,56304,41973,29589,41648,27376,37259,23183,16908,14665,12324,2,0],[0,64111,64078,64078,64045,59851,51593,41223,32965,24643,20515,20515,20515,20515,18434,0],[0,64046,64013,61933,53610,39143,26724,22595,20515,20515,20515,20515,20515,20482,16385,0],[0,64111,64078,64045,59851,51594,41255,28804,22595,20515,20515,20515,20515,20515,16386,0],[0,64078,64046,61965,53642,41223,26724,22595,20515,20515,20515,20515,20514,20482,16385,0],[0,64111,64078,64078,61964,53674,47464,35045,26724,22595,20515,20515,20515,20515,16386,0],[0,64046,64046,64046,64013,59852,53642,41223,24644,22563,20515,20514,20515,20514,16386,0],[0,64014,63949,63949,63949,63949,59820,51530,37063,24643,20515,20515,20515,18466,16385,0],[0,63982,63949,63949,63949,63949,57739,41191,28772,22595,20515,20515,20515,20515,16386,0],[0,64111,64078,64078,59883,41255,26724,22595,20515,20514,20515,20515,20515,20515,16386,0],[0,64078,64046,64046,64013,59852,45352,28772,22563,20515,20515,20515,20515,20514,16385,0],[0,64143,64078,64078,64078,64078,57803,39174,26692,22595,20515,20515,20515,18466,16385,0],[0,64078,64046,64013,53642,35014,22595,20515,20515,20546,20515,20515,20515,20482,14337,0],[0,65535,59259,44471,64804,64803,58309,49703,25455,22983,10404,8293,8261,4162,2050,0],[0,65535,59228,44470,64804,64803,32053,51847,25423,29160,8325,8293,4162,2050,0,0],[0,65535,48849,64836,64804,64803,36316,53927,21422,20806,8293,6244,2081,2050,0,0],[0,65535,63422,38440,64867,64804,36315,53959,19275,33222,10470,8293,6244,2081,2,0],[0,65535,59262,36351,64836,64804,53959,31925,23212,12582,8293,6276,2081,2050,0,0],[0,65535,65535,59230,36351,64836,64804,64803,36284,53959,25423,18790,8293,4162,0,0],[0,65535,57180,34303,42457,64836,64804,64803,33708,51751,16807,8293,4163,0,0,0],[0,65535,65535,55100,34303,38364,64836,64804,64803,31660,37351,8293,6244,2081,0,0],[0,65535,46745,34303,36318,64836,64804,64803,64741,40078,47688,41414,8486,0,0,0],[0,65535,50937,34303,64835,64804,64803,40177,51783,27402,41414,12809,4163,0,0,0],[0,65535,65535,55132,38364,64803,64804,64461,55947,49703,23374,22919,8293,4162,2049,0],[0,65535,65535,46746,64868,64804,64372,35985,60143,49703,21229,24998,8293,4195,2049,0],[0,65535,65535,50741,64772,56071,51751,49703,49703,21262,27046,8325,4162,4098,0,0],[0,65535,63422,64804,64613,42357,53959,49703,21229,24966,8293,4226,2081,2050,0,0],[0,65535,50932,36350,64836,64804,64803,35983,53832,49703,19182,24999,8293,4163,2049,0],[0,65535,48854,36350,64836,64804,64771,53990,49703,23407,24999,8325,4195,2050,0,0],[0,40233,2278,2277,164,131,34,34,34,33,33,33,1,0,0,0],[0,57067,2278,2277,2277,2278,164,131,34,34,34,33,33,0,0,0],[0,2278,2277,2277,164,34,34,34,33,33,33,1,0,0,0,0],[0,2278,2278,2277,2277,164,34,34,33,33,33,33,1,0,0,0],[0,36041,2278,2277,2277,2277,2212,131,34,34,34,34,33,0,0,0],[0,42314,2278,2277,2277,2277,2212,131,34,34,34,33,33,1,0,0],[0,2245,34,34,34,33,34,33,33,33,33,1,0,0,0,0],[0,2245,34,34,33,34,33,33,33,33,1,0,0,0,0,0],[0,4358,164,34,34,34,33,34,33,33,33,33,33,0,0,0],[0,4358,164,34,34,33,34,33,33,33,33,33,0,0,0,0],[0,29550,2277,2277,2212,131,34,34,34,34,33,1,0,0,0,0],[0,31661,2277,2277,164,131,34,34,34,34,33,1,0,0,0,0],[0,33965,2278,2277,2277,2277,164,99,34,34,33,33,1,0,0,0],[0,36045,2277,2277,2277,164,99,34,34,34,34,33,1,0,0,0],[0,54987,2278,2277,2277,2278,2245,132,34,34,34,33,1,0,0,0],[0,40234,2278,2277,2278,2245,132,34,34,34,33,33,1,0,0,0],[0,63128,60591,60100,16906,63943,63911,16808,57670,47270,22788,6437,4258,2113,0,0],[0,63128,60590,60068,14857,63911,63911,14761,49350,22821,6437,4258,2113,0,0,0],[0,63096,60558,62116,16905,63943,63911,16840,49350,47238,22789,8485,4258,2113,0,0],[0,63096,58510,64164,18953,63943,63911,16808,49350,47238,22789,6437,4258,2113,0,0],[0,63128,60623,60100,14825,63943,63911,12713,49350,47238,18725,6437,4258,2080,0,0],[0,63096,60558,60068,14825,63911,63911,16808,49350,47238,20772,6437,4258,2113,0,0],[0,63095,58412,51813,14825,63911,63911,12713,57702,47270,20740,6404,4258,2113,0,0],[0,63128,58510,62116,14858,63943,63911,18857,57702,47270,22788,6404,4258,2112,0,0],[0,63096,62671,62148,16906,63943,63911,14761,57670,47270,22789,6436,4258,2080,0,0],[0,63128,60590,62148,14858,63911,63911,14761,49350,47238,22788,6437,4258,2113,0,0],[0,63096,58511,62116,16905,63911,63911,63911,14760,49350,20740,6437,4258,2113,0,0],[0,65175,60786,56299,49765,14825,63943,63911,16809,49350,20741,6437,4258,2113,0,0],[0,63128,60591,60068,14857,63943,63911,12713,49350,47238,18725,6437,4258,2080,0,0],[0,63095,58412,49765,14793,63911,63911,12713,57702,47270,20740,6404,4258,2113,0,0],[0,65011,58707,62148,16906,63943,63911,12713,57670,47270,22789,6436,4258,2080,0,0],[0,65143,37677,63911,63911,63911,25032,57703,47270,47270,47238,22757,2246,0,0,0],[0,65143,37676,63911,63911,31176,57670,49318,47270,47270,47238,22757,2278,0,0,0],[0,65143,37644,63943,63911,27080,57671,49318,47270,47270,47238,22757,2246,0,0,0],[0,65175,37709,63911,63911,63911,18888,57703,47270,47270,47238,22757,2246,0,0,0],[0,65176,39725,63911,63911,20936,57703,49318,47270,47270,47238,22757,2279,0,0,0],[0,65175,37644,63943,63911,63911,25032,57670,47270,47270,47238,22757,2246,0,0,0],[0,65175,37644,63943,63911,63911,22984,57703,47270,47270,47238,22757,2246,0,0,0],[0,65175,39725,63943,63911,16840,59751,49318,47270,47270,47238,20709,2279,0,0,0],[0,65175,39757,63911,63911,22984,57703,49318,47270,47270,47238,20708,2279,0,0,0],[0,65175,39725,63911,63911,63911,22952,57671,49318,47270,47238,24773,2246,0,0,0],[0,65143,37677,63911,63911,63911,25032,59751,49318,47270,49286,26853,2278,0,0,0],[0,65143,37677,63911,63911,20936,59751,49318,47270,47270,47238,22757,2246,0,0,0],[0,65175,37644,63943,63911,63911,35272,57671,47270,47270,47238,22757,2246,0,0,0],[0,65143,37676,63911,63911,63911,22984,57703,47270,47270,47238,22757,2279,0,0,0],[0,65176,65143,39725,63943,63911,27080,57703,49318,47270,49286,24773,2246,0,0,0],[0,65275,65210,64822,47720,41250,63655,59558,34982,39043,26721,26721,26721,24673,12320,0],[0,65308,65210,65210,62774,49768,43267,59558,37031,39043,26721,26721,26721,24673,12320,0],[0,65275,65210,62774,45639,41251,61606,59558,34985,39043,26721,26721,26721,24673,10272,0],[0,65275,65210,64822,47720,43268,61606,59558,53415,32866,26721,26721,26721,18496,0,0],[0,65275,65210,65210,64822,49735,43267,59558,39043,30817,26721,26721,26721,18497,0,0],[0,65275,65210,62774,49767,39171,59558,51366,30817,26721,26721,26721,26721,10272,0,0],[0,65275,65210,64822,47687,41220,61606,59558,32936,39043,26721,26721,26721,24673,12320,0],[0,65275,65210,62774,47687,41220,61606,59558,37030,41091,26721,26721,22657,26721,6144,0],[0,65275,65210,62806,49800,39202,61606,59558,41129,39043,26721,26721,18561,26721,6176,0],[0,65275,65210,65210,64854,49800,45315,59558,37031,39043,26721,26721,14465,26721,6176,0],[0,65275,65210,65210,62774,47720,45378,59558,35014,36995,26721,26721,24673,26721,6176,0],[0,65275,65210,64822,47719,43267,61606,59558,28838,41091,26721,26721,18561,26721,6176,0],[0,65275,65210,64822,49800,41250,61606,59558,39081,41091,26721,26721,26721,24673,12320,0],[0,65275,65210,65210,62774,47720,43236,59558,37030,39043,26721,26721,26721,24673,12320,0],[0,65275,65210,65210,62774,49735,41219,59558,43175,41091,26721,26721,26721,24673,12320,0],[0,65275,65210,62806,47687,45316,61606,59558,37029,39043,26721,26721,26721,24673,12321,0],[0,65275,65210,62806,49800,41250,61606,59558,34983,39043,26721,26721,18561,26721,6144,0],[0,65275,65210,65210,62774,47720,45378,59558,37030,36995,26721,26721,18561,26721,6176,0],[0,65275,65210,64822,49800,37122,61606,59558,39080,43139,26721,26721,22657,26721,6176,0],[0,65275,65210,65210,62774,49767,43268,59558,39078,41091,26721,26721,26721,24673,12320,0],[0,65275,65210,63033,64693,47589,63655,59558,35076,39043,26721,26721,18561,26721,6176,0],[0,65275,65210,63000,62645,45606,63655,59558,41219,39043,26721,26721,20609,26721,6176,0],[0,65275,65210,65210,63065,62645,45574,59558,39171,36994,26721,26721,18561,26721,6176,0],[0,65275,65210,65210,65145,62677,47687,53445,39043,26721,26721,22657,26721,6176,0,0],[0,65275,65210,65210,64822,49800,37154,59558,32935,41091,26721,26721,20609,26721,6176,0],[0,65275,65210,64822,47752,39202,63655,59558,39080,39043,26721,26721,26721,24673,12320,0],[0,65275,65210,65210,63000,64693,47556,59558,35045,41091,26721,26721,18561,26721,6176,0],[0,65275,65210,65081,64693,47654,63655,59558,41219,39043,26721,26721,26721,24673,12321,0],[0,65275,65210,63033,64693,47589,63655,59558,35076,39043,26721,26721,14465,26721,6176,0],[0,65275,65210,65210,65145,62677,45606,59558,39171,36995,26721,26721,16513,26721,6176,0],[0,65275,65210,65210,62774,49801,41282,59558,30886,41091,26721,26721,22625,26721,6176,0],[0,65275,65210,65210,63000,64693,47654,59558,39171,39043,26721,26721,18561,26721,6176,0],[0,65176,48014,63911,63911,63911,57703,47270,47270,47238,37157,24868,14629,6210,0,0],[0,65176,50094,63911,63911,51623,57671,49318,47270,47238,37156,24868,14628,8290,0,0],[0,65176,48014,63911,63911,63911,57703,47270,47270,47238,37157,24868,14629,6242,0,0],[0,65176,48014,63911,63911,51622,57703,47270,47270,47238,35077,24868,14629,6241,0,0],[0,65143,57083,48014,63911,63911,63911,59751,47270,47238,37156,24868,14597,8290,0,0],[0,65176,50061,63911,63911,63911,63911,35237,51398,47238,28932,14597,6210,0,0,0],[0,65176,48014,63911,63911,63911,39334,57703,47270,49286,39173,24868,10598,10370,0,0],[0,65176,48046,63911,63911,49574,59751,47270,47270,47238,37156,24868,14629,10338,0,0],[0,65176,48014,63911,63911,47525,57703,47270,47238,37125,24868,10598,10370,0,0,0],[0,65176,50094,63911,63911,14760,59751,47270,47270,47238,37157,24868,14596,6209,0,0],[0,65176,47949,63911,63911,63911,41381,51398,47334,47238,37156,24868,14629,8290,0,0],[0,65176,65078,50029,63911,63911,39335,59751,47270,47238,37189,24868,14629,8290,0,0],[0,65143,59131,48014,63911,63911,57703,49318,47270,47238,37156,24868,14597,8290,0,0],[0,65176,48014,63911,63911,63911,39336,57703,47270,49285,37125,24868,10598,10370,0,0],[0,65176,48014,63911,63911,63911,57703,47270,47238,39173,24868,10598,12418,0,0,0],[0,65176,47981,63911,63911,63911,43429,51398,47334,47238,37157,24868,14629,8290,0,0],[0,65373,65143,64981,53082,38298,64202,27474,63846,43177,47270,18694,4261,20480,0,0],[0,65373,65143,64818,65272,28285,64170,29554,63846,47270,51334,43176,18695,4228,32768,0],[0,65339,65143,36476,64591,63911,27507,63846,47270,43176,24741,10600,4261,28672,0,0],[0,65339,65143,36476,64591,63911,27507,63846,47270,43176,26789,10600,4260,28672,0,0],[0,65373,65143,65045,65239,24158,64202,29522,63846,43177,47270,18694,4261,28672,0,0],[0,65339,65143,34428,64591,63911,29522,63846,47270,57476,43176,18694,4260,26624,0,0],[0,65339,65143,34396,64559,63911,29555,61798,47270,47238,43176,18695,4260,32768,0,0],[0,65373,65143,65143,65272,28285,64170,29555,63846,47270,43176,18695,4228,34816,0,0],[0,65373,65143,64981,53018,62511,63911,25525,63846,47270,43176,18695,4261,38912,0,0],[0,65374,65143,53018,62511,63911,25558,63846,47270,49286,43176,16679,4260,32768,0,0],[0,65373,65143,65111,65240,26269,64170,27474,63846,45256,47270,18695,4261,28672,0,0],[0,65339,32735,65143,38298,64559,63911,27474,63846,47270,43176,18695,4260,28672,0,0],[0,65373,65143,65013,49019,40378,64170,27474,63846,43177,47270,24741,10600,4261,30720,0],[0,65373,65143,51035,36250,64170,29522,61766,47270,55428,43176,16646,4260,28672,0,0],[0,65338,65143,65078,34428,64203,63911,31602,63846,43177,47270,18694,4260,12288,0,0],[0,65338,65143,65111,34396,64170,63911,31569,63846,43177,47270,18695,4260,18432,0,0],[0,65373,65143,64916,44731,64526,63911,25427,63846,47270,43176,18695,4261,30720,0,0],[0,65373,65143,65013,65240,26237,64203,23346,63846,43177,47270,18727,4261,18432,0,0],[0,65374,65143,65240,26205,64170,29554,63846,47270,43176,28837,10633,4260,26624,0,0],[0,65339,65143,34428,64591,63911,29554,63846,47270,43176,24741,10600,4261,22528,0,0],[0,65373,65143,65143,46778,64591,63911,33649,63846,47270,49286,43176,16679,4260,38912,0],[0,65373,65143,51035,38298,64559,63911,31569,63846,43208,47270,16647,4260,26624,0,0],[0,65209,51035,36186,64591,63911,39825,10699,63846,43208,47270,18661,4228,16384,0,0],[0,65209,51035,36186,64267,63911,41906,12780,63846,45256,47270,20709,4228,14336,0,0],[0,65339,65143,34396,64494,63911,50228,12975,63846,49318,43176,24773,10633,4261,34816,0],[0,65339,65143,34428,64203,63911,29522,63846,45256,47270,24773,10633,4229,30720,0,0],[0,65373,65143,55130,34170,62286,23311,63846,49318,43176,26789,10600,4261,30720,0,0],[0,65373,65143,53017,62643,63976,23475,63846,45256,47270,26789,10633,4261,20480,0,0],[0,65373,65143,65078,46778,64591,63911,31601,63846,47270,49286,43176,16679,4228,32768,0],[0,65373,65143,53082,40346,64591,63911,29521,63846,43208,47270,16647,4260,24576,0,0],[0,65306,65143,34428,64235,63911,31601,63846,45256,47270,24741,10600,4228,14336,0,0],[0,65338,65143,65014,34396,64591,63911,33649,63846,45256,47270,18695,4260,14336,0,0],[0,65338,65143,34428,64494,63911,46100,10960,63846,49318,43176,24773,10633,4261,38912,0],[0,65338,65143,34428,64235,29521,63846,45256,47270,24773,10633,6376,2081,28672,0,0],[0,65373,65143,55130,34171,64332,27473,63846,49318,43176,26789,10600,4260,34816,0,0],[0,65338,65143,32380,64267,27441,63846,43209,47270,24741,10633,6407,2081,22528,0,0],[0,63422,63422,59197,57116,54971,52857,52857,50809,50777,46519,31761,27501,21163,12710,0],[0,63422,61277,59164,59164,57116,57116,55003,52857,48632,33906,27501,21163,12710,12678,0],[0,63422,61309,59164,59164,59164,57116,55003,52857,48631,33841,27501,21163,12710,12678,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,65240,65175,65175,43950,63943,63911,22984,51398,47238,33061,20677,12613,10338,0,0],[0,65273,65175,65175,65175,43917,63911,63911,63911,25032,49350,26885,10565,10338,0,0],[0,65273,65175,65175,65175,43917,63943,63911,20936,51398,47238,26853,12613,10338,2048,0],[0,65273,65175,65175,43917,63943,63911,20936,57703,47270,47238,26853,10565,10338,4096,0],[0,65240,65175,43918,63911,63911,63911,18888,57703,47270,35110,20677,12613,10338,0,0],[0,65240,65175,65175,65175,45965,63943,63911,25032,49350,26885,12613,10306,2048,0,0],[0,65273,65175,43917,63943,63911,63911,25032,57703,47270,49286,33029,14629,12386,2048,0],[0,65273,65175,65175,43917,63911,63911,22984,57671,47270,33061,20677,12613,12386,0,0],[0,65241,65175,65175,65175,45998,63911,63911,25032,51398,28901,10565,10338,0,0,0],[0,65240,65175,65175,43950,63943,63911,20936,59751,47270,47238,26853,12613,10338,0,0],[0,65272,65175,65175,43917,63943,63911,63911,20936,51398,47238,26853,10565,10338,0,0],[0,65240,65175,65175,43918,63911,63911,16840,49350,47238,30981,20677,10565,12386,2048,0],[0,65535,50777,21296,14891,10632,10600,10600,10599,8584,10600,8486,2146,3,0,0],[0,65535,57116,29714,17037,10632,10600,10600,10597,8552,10600,8486,2178,6147,0,0],[0,65535,52890,21296,14891,12680,10600,10599,8552,10599,8486,4259,32,12294,0,0],[0,65535,31827,14826,10600,10600,10600,10599,10599,10599,8519,4227,32,12294,1,0],[0,65535,48697,19216,14859,10600,10600,10600,10631,8552,10600,8487,4259,33,2,0],[0,65535,48632,19184,17136,14826,12680,10600,10600,10600,10600,10567,6372,33,0,0],[0,65535,59196,25489,14858,10600,10600,10600,8584,10599,10599,8486,4259,32,0,0],[0,65535,61309,46292,21264,14859,10632,10600,10600,10599,10599,8486,4259,33,0,0],[0,65535,52760,19216,14826,10600,10600,10600,10598,8552,10599,8453,4226,32,0,0],[0,65535,48729,19216,14858,12680,10600,10600,10600,10599,10600,8519,4260,32,0,0],[0,65535,52890,19216,17004,12680,10600,10600,10600,10599,10600,10567,8487,4260,33,0],[0,65535,55035,29681,19184,14825,10632,10600,10600,8551,10600,8486,4227,0,1,0],[0,65535,48664,19216,14858,10632,10600,10600,10600,10600,10599,8486,4227,0,0,0],[0,65535,50777,21264,14859,10600,10600,10600,12679,8552,10600,8486,4259,0,0,0],[0,65535,48664,19184,14858,10600,10600,10600,10600,8584,10599,8486,4227,32,0,0],[0,65535,48664,19216,14891,10632,10600,10600,10600,10600,8551,10567,2146,10245,2,0],[0,65535,52857,23344,14858,10632,10600,10600,10600,4487,10599,8486,4259,33,0,0],[0,65535,36021,14826,10600,10600,10600,10600,12678,10600,10599,8519,6340,33,1,0],[0,65535,52890,19216,14826,10600,10600,10600,10598,8552,10600,8519,4227,0,0,0],[0,65535,50745,19216,14859,10600,10600,10600,10600,8584,10600,8519,4292,32,1,0],[0,65535,52890,21264,14858,10665,10600,10600,10600,10599,10600,8486,4259,32,2,0],[0,65535,57084,31826,19184,14891,12680,10600,10600,10600,8583,10600,8486,2146,0,0],[0,65535,50745,19216,14923,10632,10600,10600,10599,10599,10567,8454,4259,33,2,0],[0,65535,52890,19215,17037,12745,10632,10600,10600,8584,10567,8454,4259,32,4,0],[0,65535,48632,19216,14826,10600,10600,10600,10632,10599,10600,8487,6340,33,0,0],[0,65535,50745,19216,12778,10600,10600,10600,10598,8552,10599,8519,4259,32,3,0],[0,65535,50745,19216,14891,12680,10600,10600,10600,10600,8486,4260,32,0,0,0],[0,65535,57083,25457,14858,10632,10600,10600,10599,8584,10567,6405,4227,32,1,0],[0,65535,63390,46260,19216,14891,10632,10600,10600,10600,8486,4260,33,3,0,0],[0,65535,54873,19216,14826,10600,10600,10600,10600,8551,10567,8454,4227,32,0,0],[0,65535,50777,19184,12778,10600,10600,10600,8552,10567,8486,4259,33,4100,7,0],[0,65535,31828,12778,12648,10600,10600,10600,10599,10599,8486,6340,33,0,0,0],[0,65535,55003,31762,19184,17101,31241,12680,28870,10600,10600,10599,6405,2113,59392,0],[0,65535,59164,29714,17134,29193,10632,41093,10600,10599,10600,8453,2113,53248,0,0],[0,65535,61309,31859,19184,27243,12680,10600,8583,18727,8486,4292,32,61440,4,0],[0,65535,57018,23376,41448,17036,10632,10600,10599,20743,8486,4292,32,59392,0,0],[0,65535,44438,19216,25195,28967,12680,10600,10600,10600,10600,8519,2113,51200,0,0],[0,65535,40246,17135,35240,12777,10632,10600,10600,10599,10567,8519,2113,53248,2,0],[0,65535,65535,50745,29552,31340,17069,14728,10600,10600,8584,16678,2146,57344,0,0],[0,65535,65535,31795,25163,14728,10600,10600,10600,10600,8583,16678,2146,49152,0,0],[0,65535,44374,27310,41254,17101,14923,12680,10600,10600,10599,10567,2146,59392,2,0],[0,65535,44471,29227,14955,10632,10600,10600,10600,10599,10599,8519,2113,53248,1,0],[0,65535,52858,23344,39465,17068,12777,24839,10600,10568,10599,8454,2113,57344,0,0],[0,65535,65503,36020,17102,29193,10632,32933,10600,10568,10600,8486,2113,57344,0,0],[0,65535,50745,19184,14858,12745,10632,10600,10600,10600,10599,8486,4227,32,2,0],[0,65535,50777,23278,31111,10632,10600,10567,4259,2113,2113,4128,32,57344,7,0],[0,65535,48696,21264,27243,12745,28902,10600,10600,10600,10600,6405,2113,61440,1,0],[0,65535,42326,17101,33289,22791,10600,6373,0,0,0,0,0,51200,2,0],[0,61009,29981,31896,13437,54094,31440,15320,19020,20808,12616,8487,6373,4260,4227,2147],[0,63388,59195,57018,42458,42297,34073,29359,8648,20711,4292,163,33,1,0,0],[0,50609,37836,37836,37836,37836,35661,29358,29358,29358,27117,18826,14728,20843,20843,12582],[0,50221,48043,45708,37578,47722,43594,33254,18920,33157,24966,22887,22887,18693,10534,6308],[0,54873,54648,54166,48021,27314,23154,21073,30986,22796,16783,18699,12585,12458,6309,12359],[0,65535,63422,65460,53117,42655,40415,21757,21597,48087,25495,17403,21206,21103,6309,0],[0,65535,65535,65535,65535,63455,65471,63422,63391,65498,57246,57116,32216,41911,13072,10535],[0,48599,23243,19050,19049,19017,19017,19017,14791,8483,6371,4291,6309,4258,4258,2177],[0,29646,21160,14855,14789,10661,12678,10629,10629,10597,10597,8581,8516,6372,4323,2113],[0,42260,35953,31727,27534,25356,19082,10596,10563,8451,6371,6371,6371,6403,4290,2177],[0,21298,12814,12749,33003,14600,6442,6309,6309,6347,26761,14469,6281,4198,4163,4162],[0,13039,2376,10438,6341,6309,6309,6309,198,6276,132,67,2081,1,1,0],[0,65470,63261,49023,46877,61050,56856,52791,44635,56759,54615,50519,42364,46201,39863,6309],[0,60820,58382,52076,45738,43690,41577,37416,37351,31142,31045,26853,22883,24739,6309,20610],[0,18575,12367,8238,8230,6223,6309,6181,6180,6194,4143,4112,2056,4131,4,3],[0,14447,8233,6309,6309,6309,6214,4139,2060,5,5,2052,4098,2,2,0],[0,24939,16750,12692,12692,12692,12691,12689,12686,12683,12683,10574,10542,10569,8454,8454],[0,65535,40272,33486,6764,10506,6407,4358,4294,4327,6309,4229,4261,4228,4228,2115],[0,61209,63083,52857,50809,48531,38132,38100,38132,37969,27535,29418,37384,14791,6309,2113],[0,65166,65036,62858,58701,60640,60640,58599,60544,58432,58432,58400,46188,54114,27172,8389],[0,50893,34285,29964,29741,19402,17386,23372,17161,17130,17130,15145,15017,10857,10792,10630],[0,48182,45747,49779,49779,49747,41586,49714,27086,16651,20490,12457,8231,16,0,0],[0,44569,38295,38230,36149,36117,34069,34069,34069,31923,23308,8484,32,0,1,0],[0,42200,33686,31574,31574,31573,31574,29492,25296,14761,6373,4228,2114,10247,9,0],[0,65535,65535,65535,65503,63101,50103,35376,29231,25070,22925,18764,12457,8199,8,0],[0,12287,2047,2047,2047,16222,2015,19740,11161,8791,599,2486,340,24,0,0],[0,46681,38295,36150,36117,34069,34069,34069,34069,34004,27534,8452,32,0,0,0],[0,34393,21976,19928,21943,23926,19830,27665,14793,8422,6309,4196,33,12294,10,0],[0,53247,40959,38911,38911,30719,26271,11387,9177,11129,9016,8887,2550,374,24,0],[0,16357,6080,6080,4064,18217,3968,19725,9101,4746,520,456,326,4,0,0],[0,46682,38295,36150,38165,34069,34069,34069,34069,34004,23341,6371,32,0,0,0],[0,32434,24078,20044,21997,21997,26063,21965,27695,14825,8422,6277,2115,8,0,0],[0,57342,49146,45049,45047,32756,22127,11433,9224,9129,9034,6889,2568,327,8,0],[0,56402,54094,53834,63976,63944,63943,59848,63911,43368,30790,24646,20486,12292,0,0],[0,48762,38295,36150,36117,34069,34069,34069,34069,31891,23308,6371,32,0,0,0],[0,48307,45967,47951,47951,47950,45902,45870,45838,23082,6374,4261,2114,4098,9,0],[0,65535,65535,65535,65309,64758,60338,41451,41322,31049,35048,26823,22694,22532,16386,0],[0,65535,65535,65535,63390,38133,29269,63989,25110,55697,20714,4262,2048,17,0,0],[0,59196,59196,59164,59164,59164,59164,57083,57051,54970,54938,52857,52825,50744,48599,42292],[0,65522,65513,59304,52904,44427,38120,31779,23496,21220,19076,12705,2144,0,0,0],[0,65517,63462,59272,50950,48714,44486,35975,29638,23331,14945,4322,0,3,0,0],[0,32446,23580,12880,4260,0,0,0,0,0,0,0,0,0,0,0],[0,65535,32446,23580,12880,4260,0,0,0,0,0,0,0,0,0,0],[0,17948,13722,11576,11413,7123,6926,4715,4585,2439,228,32,0,0,7,0],[0,17980,13755,11673,11511,13461,9234,6926,4683,2569,2439,195,33,0,2,0],[0,63165,52535,56213,47632,33260,45164,45067,32873,18533,2048,49163,18435,2048,0,0],[0,58906,56245,53842,43502,35308,45164,45067,32873,18533,2048,49163,18435,2048,0,0],[0,54998,48089,43865,41719,31346,22990,18795,14759,12550,8357,4194,0,16392,4,0],[0,46456,31543,29462,29429,27347,23121,18926,16843,14699,10537,4227,0,26637,2,0],[0,39993,31511,29430,27349,23185,21039,16845,14731,10536,6309,2114,0,4098,3,0],[0,63132,50454,33356,49261,32905,47180,36938,30760,22566,4097,40972,22534,4097,0,0],[0,63132,54583,33389,51341,45164,32937,43083,32808,22566,4097,43020,22534,4097,0,0],[0,50712,44373,42292,42260,40147,33840,31695,25388,16936,10597,6339,32,0,0,0],[0,50712,44373,40179,38034,35921,31695,25388,23243,16904,10597,6371,32,0,0,0],[0,47116,49159,40969,36872,32774,28678,24581,18436,14339,8194,6145,2048,0,0,0],[0,65246,58874,44018,55567,41293,51406,47277,39083,26727,8226,36877,6145,0,0,0],[0,63100,44050,55567,41325,51406,41131,28808,26727,10275,53268,18437,6145,0,0,0],[0,62421,55985,45646,37324,33162,22824,18662,14532,8323,2081,32,0,43014,0,0],[0,46163,60147,45679,41453,35275,31146,20839,22791,16581,10371,4129,0,38922,0,0],[0,65520,57132,46570,42313,38056,31750,27526,25156,14852,18625,2144,0,0,36864,0],[0,65520,61322,52875,44458,38088,35943,33764,27494,37379,21124,8482,2112,0,0,0],[0,52538,45945,45781,43534,35343,25101,20876,26953,18696,14566,6274,0,16389,0,0],[0,65535,36843,11755,4937,4260,0,0,0,0,0,0,0,0,0,0],[0,55181,55143,46794,42473,38248,31879,25509,19140,10691,2177,0,0,10240,0,0],[0,53101,55142,48812,44555,38249,36104,33960,29703,23366,19077,8546,4225,32,0,0],[0,56761,35405,49390,24775,47148,45099,41002,24614,8194,40971,16387,2048,0,0,0],[0,56761,35437,49358,26856,47148,45099,41002,24614,8194,43019,18436,2048,0,0,0],[0,64845,49901,28998,4260,0,0,0,0,0,0,0,0,0,0,0],[0,64845,49901,63981,28998,4260,0,0,0,0,0,0,0,0,0,0],[0,63981,43272,4260,0,0,0,0,0,0,0,0,0,0,0,0],[0,52815,37800,39648,23275,29184,18917,12579,6338,2112,0,0,0,12288,1,0],[0,52751,46052,39749,35456,25189,19049,25024,14757,8386,32,0,0,20480,1,0],[0,61244,46453,46128,29615,43593,27307,14857,26786,8387,4193,0,0,4096,0,0],[0,48501,42032,39854,25454,37352,21098,10663,24706,6274,32,0,0,8192,0,0],[0,63422,61309,57051,48599,40179,35921,31695,25388,21162,8484,2113,0,0,0,0],[0,61309,54970,42292,35953,31727,27501,23243,16904,10597,2145,32,0,0,0,0],[0,63165,50486,37679,59793,43341,49293,41131,34986,18566,45071,16420,2048,0,0,0],[0,63197,52599,35598,59793,43373,49325,49229,41132,34986,20614,30729,2048,0,0,0]],"names":{"char/bf/idle/0":0,"char/bf/idle/1":1,"char/bf/idle/2":2,"char/bf/idle/3":2,"char/bf/singLEFT/0":3,"char/bf/singLEFT/1":4,"char/bf/singDOWN/0":5,"char/bf/singDOWN/1":6,"char/bf/singUP/0":7,"char/bf/singUP/1":8,"char/bf/singRIGHT/0":9,"char/bf/singRIGHT/1":10,"char/bf/singLEFTmiss/0":3,"char/bf/singDOWNmiss/0":5,"char/bf/singUPmiss/0":7,"char/bf/singRIGHTmiss/0":9,"char/bf/hey/0":11,"char/bf/hey/1":12,"char/bf/cheer/0":13,"char/bf/cheer/1":14,"char/bf/scared/0":15,"char/bf/scared/1":16,"char/bf-car/idle/0":17,"char/bf-car/idle/1":18,"char/bf-car/idle/2":19,"char/bf-car/idle/3":19,"char/bf-car/singLEFT/0":20,"char/bf-car/singLEFT/1":21,"char/bf-car/singDOWN/0":22,"char/bf-car/singDOWN/1":23,"char/bf-car/singUP/0":24,"char/bf-car/singUP/1":25,"char/bf-car/singRIGHT/0":26,"char/bf-car/singRIGHT/1":27,"char/bf-car/singLEFTmiss/0":20,"char/bf-car/singDOWNmiss/0":22,"char/bf-car/singUPmiss/0":24,"char/bf-car/singRIGHTmiss/0":26,"char/bf-car/hey/0":28,"char/bf-car/hey/1":29,"char/bf-christmas/hey/0":30,"char/bf-christmas/hey/1":31,"char/bf-christmas/idle/0":32,"char/bf-christmas/idle/1":33,"char/bf-christmas/idle/2":34,"char/bf-christmas/idle/3":34,"char/bf-christmas/singLEFT/0":35,"char/bf-christmas/singLEFT/1":36,"char/bf-christmas/singDOWN/0":37,"char/bf-christmas/singDOWN/1":38,"char/bf-christmas/singUP/0":39,"char/bf-christmas/singUP/1":40,"char/bf-christmas/singRIGHT/0":41,"char/bf-christmas/singRIGHT/1":42,"char/bf-christmas/singDOWN-censor/0":43,"char/bf-christmas/singDOWN-censor/1":44,"char/bf-christmas/singRIGHT-censor/0":45,"char/bf-christmas/singRIGHT-censor/1":46,"char/bf-christmas/singLEFTmiss/0":47,"char/bf-christmas/singDOWNmiss/0":48,"char/bf-christmas/singUPmiss/0":49,"char/bf-christmas/singRIGHTmiss/0":50,"char/bf-dark/idle/0":51,"char/bf-dark/idle/1":52,"char/bf-dark/idle/2":53,"char/bf-dark/idle/3":53,"char/bf-dark/singLEFT/0":54,"char/bf-dark/singLEFT/1":55,"char/bf-dark/singDOWN/0":56,"char/bf-dark/singDOWN/1":57,"char/bf-dark/singUP/0":58,"char/bf-dark/singUP/1":59,"char/bf-dark/singRIGHT/0":60,"char/bf-dark/singRIGHT/1":61,"char/bf-dark/singLEFTmiss/0":62,"char/bf-dark/singDOWNmiss/0":56,"char/bf-dark/singUPmiss/0":58,"char/bf-dark/singRIGHTmiss/0":63,"char/bf-dark/hey/0":64,"char/bf-dark/hey/1":65,"char/bf-dark/scared/0":66,"char/bf-dark/scared/1":67,"char/bf-holding-gf/singUP/0":68,"char/bf-holding-gf/singUP/1":69,"char/bf-holding-gf/idle/0":70,"char/bf-holding-gf/idle/1":71,"char/bf-holding-gf/idle/2":72,"char/bf-holding-gf/idle/3":73,"char/bf-holding-gf/singLEFT/0":74,"char/bf-holding-gf/singLEFT/1":75,"char/bf-holding-gf/singDOWN/0":76,"char/bf-holding-gf/singDOWN/1":77,"char/bf-holding-gf/singRIGHT/0":78,"char/bf-holding-gf/singRIGHT/1":79,"char/bf-holding-gf/singLEFTmiss/0":80,"char/bf-holding-gf/singDOWNmiss/0":81,"char/bf-holding-gf/singUPmiss/0":82,"char/bf-holding-gf/singRIGHTmiss/0":83,"char/bf-holding-gf/bfCatch/0":84,"char/bf-holding-gf/bfCatch/1":85,"char/bf-pixel/idle/0":86,"char/bf-pixel/idle/1":87,"char/bf-pixel/idle/2":88,"char/bf-pixel/idle/3":88,"char/bf-pixel/singLEFT/0":89,"char/bf-pixel/singLEFT/1":90,"char/bf-pixel/singDOWN/0":91,"char/bf-pixel/singDOWN/1":92,"char/bf-pixel/singUP/0":93,"char/bf-pixel/singUP/1":94,"char/bf-pixel/singRIGHT/0":95,"char/bf-pixel/singRIGHT/1":96,"char/bf-pixel/singLEFTmiss/0":89,"char/bf-pixel/singDOWNmiss/0":91,"char/bf-pixel/singUPmiss/0":93,"char/bf-pixel/singRIGHTmiss/0":95,"char/dad/idle/0":97,"char/dad/idle/1":98,"char/dad/idle/2":99,"char/dad/idle/3":100,"char/dad/singUP/0":101,"char/dad/singUP/1":102,"char/dad/singDOWN/0":103,"char/dad/singDOWN/1":104,"char/dad/singLEFT/0":105,"char/dad/singLEFT/1":106,"char/dad/singRIGHT/0":107,"char/dad/singRIGHT/1":108,"char/darnell/idle/0":109,"char/darnell/idle/1":110,"char/darnell/idle/2":111,"char/darnell/idle/3":112,"char/darnell/singLEFT/0":113,"char/darnell/singLEFT/1":114,"char/darnell/singDOWN/0":115,"char/darnell/singDOWN/1":116,"char/darnell/singUP/0":117,"char/darnell/singUP/1":118,"char/darnell/singRIGHT/0":119,"char/darnell/singRIGHT/1":120,"char/darnell/laugh/0":121,"char/darnell/laugh/1":122,"char/darnell/lightCan/0":123,"char/darnell/lightCan/1":124,"char/darnell/kickCan/0":125,"char/darnell/kickCan/1":126,"char/darnell/kneeCan/0":127,"char/darnell/kneeCan/1":128,"char/darnell/pissed/0":109,"char/darnell/pissed/1":129,"char/darnell-blazin/idle/0":130,"char/darnell-blazin/idle/1":131,"char/darnell-blazin/idle/2":132,"char/darnell-blazin/idle/3":133,"char/darnell-blazin/pissed/0":134,"char/darnell-blazin/pissed/1":135,"char/darnell-blazin/cringe/0":136,"char/darnell-blazin/cringe/1":137,"char/darnell-blazin/fakeout/0":138,"char/darnell-blazin/fakeout/1":139,"char/darnell-blazin/block/0":140,"char/darnell-blazin/block/1":141,"char/darnell-blazin/dodge/0":142,"char/darnell-blazin/dodge/1":143,"char/darnell-blazin/uppercutPrep/0":144,"char/darnell-blazin/uppercutPrep/1":145,"char/darnell-blazin/uppercut/0":146,"char/darnell-blazin/uppercut/1":147,"char/darnell-blazin/uppercutHit/0":148,"char/darnell-blazin/uppercutHit/1":149,"char/darnell-blazin/punchHigh1/0":150,"char/darnell-blazin/punchHigh1/1":151,"char/darnell-blazin/punchHigh2/0":152,"char/darnell-blazin/punchHigh2/1":153,"char/darnell-blazin/punchLow1/0":154,"char/darnell-blazin/punchLow1/1":155,"char/darnell-blazin/punchLow2/0":156,"char/darnell-blazin/punchLow2/1":157,"char/darnell-blazin/hitHigh/0":158,"char/darnell-blazin/hitHigh/1":159,"char/darnell-blazin/hitLow/0":160,"char/darnell-blazin/hitLow/1":161,"char/darnell-blazin/hitSpin/0":162,"char/darnell-blazin/hitSpin/1":163,"char/gf/danceLeft/0":164,"char/gf/danceLeft/1":165,"char/gf/danceLeft/2":166,"char/gf/danceLeft/3":167,"char/gf/danceRight/0":168,"char/gf/danceRight/1":169,"char/gf/danceRight/2":170,"char/gf/danceRight/3":171,"char/gf/singLEFT/0":172,"char/gf/singLEFT/1":173,"char/gf/singDOWN/0":174,"char/gf/singDOWN/1":175,"char/gf/singUP/0":176,"char/gf/singUP/1":177,"char/gf/singRIGHT/0":178,"char/gf/singRIGHT/1":179,"char/gf/cheer/0":180,"char/gf/cheer/1":181,"char/gf/combo50/0":180,"char/gf/combo50/1":181,"char/gf/drop70/0":182,"char/gf/drop70/1":183,"char/gf/hairBlow/0":184,"char/gf/hairBlow/1":185,"char/gf/hairFall/0":186,"char/gf/hairFall/1":187,"char/gf/scared/0":183,"char/gf/scared/1":188,"char/gf-car/danceLeft/0":189,"char/gf-car/danceLeft/1":190,"char/gf-car/danceLeft/2":191,"char/gf-car/danceLeft/3":192,"char/gf-car/danceRight/0":193,"char/gf-car/danceRight/1":194,"char/gf-car/danceRight/2":195,"char/gf-car/danceRight/3":196,"char/gf-car/duck/0":197,"char/gf-car/duck/1":198,"char/gf-christmas/danceLeft/0":199,"char/gf-christmas/danceLeft/1":200,"char/gf-christmas/danceLeft/2":201,"char/gf-christmas/danceLeft/3":202,"char/gf-christmas/danceRight/0":203,"char/gf-christmas/danceRight/1":204,"char/gf-christmas/danceRight/2":205,"char/gf-christmas/danceRight/3":206,"char/gf-christmas/combo50/0":207,"char/gf-christmas/combo50/1":208,"char/gf-christmas/drop70/0":209,"char/gf-christmas/drop70/1":210,"char/gf-dark/danceLeft/0":211,"char/gf-dark/danceLeft/1":212,"char/gf-dark/danceLeft/2":213,"char/gf-dark/danceLeft/3":214,"char/gf-dark/danceRight/0":215,"char/gf-dark/danceRight/1":216,"char/gf-dark/danceRight/2":217,"char/gf-dark/danceRight/3":218,"char/gf-dark/combo50/0":219,"char/gf-dark/combo50/1":220,"char/gf-dark/drop70/0":221,"char/gf-dark/drop70/1":222,"char/gf-dark/scared/0":222,"char/gf-dark/scared/1":223,"char/gf-pixel/danceLeft/0":224,"char/gf-pixel/danceLeft/1":225,"char/gf-pixel/danceLeft/2":226,"char/gf-pixel/danceLeft/3":227,"char/gf-pixel/danceRight/0":228,"char/gf-pixel/danceRight/1":229,"char/gf-pixel/danceRight/2":229,"char/gf-pixel/danceRight/3":230,"char/gf-tankmen/danceLeft/0":231,"char/gf-tankmen/danceLeft/1":232,"char/gf-tankmen/danceLeft/2":233,"char/gf-tankmen/danceLeft/3":234,"char/gf-tankmen/danceRight/0":235,"char/gf-tankmen/danceRight/1":236,"char/gf-tankmen/danceRight/2":237,"char/gf-tankmen/danceRight/3":238,"char/gf-tankmen/sad/0":239,"char/gf-tankmen/sad/1":240,"char/gf-tankmen/drop70/0":239,"char/gf-tankmen/drop70/1":240,"char/mom-car/idle/0":241,"char/mom-car/idle/1":242,"char/mom-car/idle/2":243,"char/mom-car/idle/3":244,"char/mom-car/singLEFT/0":245,"char/mom-car/singLEFT/1":246,"char/mom-car/singDOWN/0":247,"char/mom-car/singDOWN/1":248,"char/mom-car/singUP/0":249,"char/mom-car/singUP/1":250,"char/mom-car/singRIGHT/0":251,"char/mom-car/singRIGHT/1":252,"char/monster/idle/0":253,"char/monster/idle/1":254,"char/monster/idle/2":255,"char/monster/idle/3":256,"char/monster/singLEFT/0":257,"char/monster/singLEFT/1":258,"char/monster/singDOWN/0":259,"char/monster/singDOWN/1":260,"char/monster/singUP/0":261,"char/monster/singUP/1":262,"char/monster/singRIGHT/0":263,"char/monster/singRIGHT/1":264,"char/monster-christmas/idle/0":253,"char/monster-christmas/idle/1":254,"char/monster-christmas/idle/2":255,"char/monster-christmas/idle/3":256,"char/monster-christmas/singLEFT/0":257,"char/monster-christmas/singLEFT/1":258,"char/monster-christmas/singDOWN/0":259,"char/monster-christmas/singDOWN/1":260,"char/monster-christmas/singUP/0":261,"char/monster-christmas/singUP/1":262,"char/monster-christmas/singRIGHT/0":263,"char/monster-christmas/singRIGHT/1":264,"char/nene/danceLeft/0":265,"char/nene/danceLeft/1":266,"char/nene/danceLeft/2":267,"char/nene/danceLeft/3":268,"char/nene/danceRight/0":269,"char/nene/danceRight/1":270,"char/nene/danceRight/2":271,"char/nene/danceRight/3":272,"char/nene/combo50/0":273,"char/nene/combo50/1":274,"char/nene/drop70/0":275,"char/nene/drop70/1":276,"char/nene/combo200/0":277,"char/nene/combo200/1":278,"char/nene/raiseKnife/0":279,"char/nene/raiseKnife/1":280,"char/nene/idleKnife/0":280,"char/nene/idleKnife/1":280,"char/nene/lowerKnife/0":281,"char/nene/lowerKnife/1":282,"char/nene/hairBlowNormal/0":283,"char/nene/hairBlowNormal/1":284,"char/nene/hairFallNormal/0":283,"char/nene/hairFallNormal/1":268,"char/nene/hairBlowKnife/0":285,"char/nene/hairBlowKnife/1":286,"char/nene/hairFallKnife/0":285,"char/nene/hairFallKnife/1":287,"char/nene-christmas/danceLeft/0":288,"char/nene-christmas/danceLeft/1":289,"char/nene-christmas/danceLeft/2":290,"char/nene-christmas/danceLeft/3":291,"char/nene-christmas/danceRight/0":292,"char/nene-christmas/danceRight/1":293,"char/nene-christmas/danceRight/2":294,"char/nene-christmas/danceRight/3":295,"char/nene-christmas/combo50/0":296,"char/nene-christmas/combo50/1":297,"char/nene-christmas/drop70/0":298,"char/nene-christmas/drop70/1":299,"char/nene-christmas/combo200/0":300,"char/nene-christmas/combo200/1":301,"char/nene-christmas/raiseKnife/0":302,"char/nene-christmas/raiseKnife/1":303,"char/nene-christmas/idleKnife/0":303,"char/nene-christmas/idleKnife/1":303,"char/nene-christmas/lowerKnife/0":304,"char/nene-christmas/lowerKnife/1":305,"char/nene-dark/danceLeft/0":306,"char/nene-dark/danceLeft/1":307,"char/nene-dark/danceLeft/2":308,"char/nene-dark/danceLeft/3":309,"char/nene-dark/danceRight/0":310,"char/nene-dark/danceRight/1":311,"char/nene-dark/danceRight/2":312,"char/nene-dark/danceRight/3":313,"char/nene-dark/combo50/0":314,"char/nene-dark/combo50/1":315,"char/nene-dark/drop70/0":316,"char/nene-dark/drop70/1":317,"char/nene-dark/combo200/0":318,"char/nene-dark/combo200/1":319,"char/nene-dark/raiseKnife/0":320,"char/nene-dark/raiseKnife/1":321,"char/nene-dark/idleKnife/0":321,"char/nene-dark/idleKnife/1":321,"char/nene-dark/lowerKnife/0":322,"char/nene-dark/lowerKnife/1":323,"char/nene-pixel/danceLeft/0":324,"char/nene-pixel/danceLeft/1":325,"char/nene-pixel/danceLeft/2":326,"char/nene-pixel/danceLeft/3":327,"char/nene-pixel/danceRight/0":328,"char/nene-pixel/danceRight/1":329,"char/nene-pixel/danceRight/2":330,"char/nene-pixel/danceRight/3":331,"char/nene-pixel/raiseKnife/0":332,"char/nene-pixel/raiseKnife/1":333,"char/nene-pixel/idleKnife/0":333,"char/nene-pixel/idleKnife/1":333,"char/nene-pixel/idleKnifeBlink/0":334,"char/nene-pixel/idleKnifeBlink/1":335,"char/nene-pixel/lowerKnife/0":336,"char/nene-pixel/lowerKnife/1":332,"char/nene-tankmen/danceLeft/0":265,"char/nene-tankmen/danceLeft/1":266,"char/nene-tankmen/danceLeft/2":267,"char/nene-tankmen/danceLeft/3":268,"char/nene-tankmen/danceRight/0":269,"char/nene-tankmen/danceRight/1":270,"char/nene-tankmen/danceRight/2":271,"char/nene-tankmen/danceRight/3":272,"char/nene-tankmen/combo50/0":273,"char/nene-tankmen/combo50/1":274,"char/nene-tankmen/drop70/0":275,"char/nene-tankmen/drop70/1":276,"char/nene-tankmen/combo200/0":277,"char/nene-tankmen/combo200/1":278,"char/nene-tankmen/raiseKnife/0":279,"char/nene-tankmen/raiseKnife/1":280,"char/nene-tankmen/idleKnife/0":280,"char/nene-tankmen/idleKnife/1":280,"char/nene-tankmen/lowerKnife/0":281,"char/nene-tankmen/lowerKnife/1":282,"char/otis-speaker/idle/0":337,"char/otis-speaker/idle/1":338,"char/otis-speaker/idle/2":339,"char/otis-speaker/idle/3":339,"char/otis-speaker/shoot1/0":340,"char/otis-speaker/shoot1/1":341,"char/otis-speaker/shoot2/0":342,"char/otis-speaker/shoot2/1":343,"char/otis-speaker/shoot3/0":344,"char/otis-speaker/shoot3/1":345,"char/otis-speaker/shoot4/0":346,"char/otis-speaker/shoot4/1":347,"char/parents-christmas/idle/0":348,"char/parents-christmas/idle/1":349,"char/parents-christmas/idle/2":350,"char/parents-christmas/idle/3":351,"char/parents-christmas/singLEFT/0":352,"char/parents-christmas/singLEFT/1":353,"char/parents-christmas/singDOWN/0":354,"char/parents-christmas/singDOWN/1":355,"char/parents-christmas/singUP/0":356,"char/parents-christmas/singUP/1":357,"char/parents-christmas/singRIGHT/0":358,"char/parents-christmas/singRIGHT/1":359,"char/parents-christmas/singLEFT-alt/0":360,"char/parents-christmas/singLEFT-alt/1":361,"char/parents-christmas/singDOWN-alt/0":362,"char/parents-christmas/singDOWN-alt/1":363,"char/parents-christmas/singUP-alt/0":364,"char/parents-christmas/singUP-alt/1":365,"char/parents-christmas/singRIGHT-alt/0":366,"char/parents-christmas/singRIGHT-alt/1":367,"char/pico/idle/0":368,"char/pico/idle/1":369,"char/pico/idle/2":370,"char/pico/idle/3":370,"char/pico/singRIGHT/0":371,"char/pico/singRIGHT/1":372,"char/pico/singDOWN/0":373,"char/pico/singDOWN/1":374,"char/pico/singUP/0":375,"char/pico/singUP/1":376,"char/pico/singLEFT/0":377,"char/pico/singLEFT/1":378,"char/pico-blazin/idle/0":379,"char/pico-blazin/idle/1":380,"char/pico-blazin/idle/2":381,"char/pico-blazin/idle/3":382,"char/pico-blazin/block/0":383,"char/pico-blazin/block/1":384,"char/pico-blazin/dodge/0":385,"char/pico-blazin/dodge/1":386,"char/pico-blazin/fakeout/0":387,"char/pico-blazin/fakeout/1":388,"char/pico-blazin/taunt/0":389,"char/pico-blazin/taunt/1":390,"char/pico-blazin/punchHigh1/0":391,"char/pico-blazin/punchHigh1/1":392,"char/pico-blazin/punchHigh2/0":393,"char/pico-blazin/punchHigh2/1":394,"char/pico-blazin/punchLow1/0":395,"char/pico-blazin/punchLow1/1":396,"char/pico-blazin/punchLow2/0":397,"char/pico-blazin/punchLow2/1":398,"char/pico-blazin/hitHigh/0":399,"char/pico-blazin/hitHigh/1":400,"char/pico-blazin/hitLow/0":401,"char/pico-blazin/hitLow/1":402,"char/pico-blazin/hitSpin/0":403,"char/pico-blazin/hitSpin/1":404,"char/pico-blazin/uppercutPrep/0":405,"char/pico-blazin/uppercutPrep/1":406,"char/pico-blazin/uppercut/0":407,"char/pico-blazin/uppercut/1":408,"char/pico-blazin/uppercutHit/0":409,"char/pico-blazin/uppercutHit/1":410,"char/pico-christmas/idle/0":411,"char/pico-christmas/idle/1":412,"char/pico-christmas/idle/2":413,"char/pico-christmas/idle/3":413,"char/pico-christmas/singRIGHT/0":414,"char/pico-christmas/singRIGHT/1":415,"char/pico-christmas/singDOWN/0":416,"char/pico-christmas/singDOWN/1":417,"char/pico-christmas/singUP/0":418,"char/pico-christmas/singUP/1":419,"char/pico-christmas/singLEFT/0":420,"char/pico-christmas/singLEFT/1":421,"char/pico-christmas/singLEFTmiss/0":421,"char/pico-christmas/singDOWNmiss/0":416,"char/pico-christmas/singUPmiss/0":418,"char/pico-christmas/singRIGHTmiss/0":414,"char/pico-dark/idle/0":422,"char/pico-dark/idle/1":423,"char/pico-dark/idle/2":424,"char/pico-dark/idle/3":424,"char/pico-dark/singRIGHT/0":425,"char/pico-dark/singRIGHT/1":426,"char/pico-dark/singDOWN/0":427,"char/pico-dark/singDOWN/1":428,"char/pico-dark/singUP/0":429,"char/pico-dark/singUP/1":430,"char/pico-dark/singLEFT/0":431,"char/pico-dark/singLEFT/1":432,"char/pico-dark/singLEFTmiss/0":433,"char/pico-dark/singDOWNmiss/0":427,"char/pico-dark/singUPmiss/0":429,"char/pico-dark/singRIGHTmiss/0":425,"char/pico-dark/hey/0":434,"char/pico-dark/hey/1":435,"char/pico-dark/cheer/0":436,"char/pico-dark/cheer/1":437,"char/pico-dark/burpShit/0":438,"char/pico-dark/burpShit/1":439,"char/pico-dark/burpSmile/0":440,"char/pico-dark/burpSmile/1":441,"char/pico-dark/burpSmileLong/0":440,"char/pico-dark/burpSmileLong/1":441,"char/pico-dark/shit/0":442,"char/pico-dark/shit/1":439,"char/pico-holding-nene/idle/0":443,"char/pico-holding-nene/idle/1":444,"char/pico-holding-nene/idle/2":445,"char/pico-holding-nene/idle/3":446,"char/pico-holding-nene/singRIGHT/0":447,"char/pico-holding-nene/singRIGHT/1":448,"char/pico-holding-nene/singDOWN/0":449,"char/pico-holding-nene/singDOWN/1":450,"char/pico-holding-nene/singUP/0":451,"char/pico-holding-nene/singUP/1":452,"char/pico-holding-nene/singLEFT/0":453,"char/pico-holding-nene/singLEFT/1":454,"char/pico-holding-nene/singRIGHTmiss/0":455,"char/pico-holding-nene/singDOWNmiss/0":456,"char/pico-holding-nene/singUPmiss/0":457,"char/pico-holding-nene/singLEFTmiss/0":458,"char/pico-holding-nene/knifeToss/0":446,"char/pico-holding-nene/knifeToss/1":459,"char/pico-holding-nene/laughEnd/0":446,"char/pico-holding-nene/laughEnd/1":460,"char/pico-holding-nene/laughEnd-loop/0":461,"char/pico-holding-nene/laughEnd-loop/1":462,"char/pico-pixel/idle/0":463,"char/pico-pixel/idle/1":464,"char/pico-pixel/idle/2":465,"char/pico-pixel/idle/3":465,"char/pico-pixel/singLEFT/0":466,"char/pico-pixel/singLEFT/1":467,"char/pico-pixel/singDOWN/0":468,"char/pico-pixel/singDOWN/1":469,"char/pico-pixel/singUP/0":470,"char/pico-pixel/singUP/1":471,"char/pico-pixel/singRIGHT/0":472,"char/pico-pixel/singRIGHT/1":473,"char/pico-pixel/singLEFTmiss/0":474,"char/pico-pixel/singDOWNmiss/0":475,"char/pico-pixel/singUPmiss/0":476,"char/pico-pixel/singRIGHTmiss/0":477,"char/pico-playable/idle/0":368,"char/pico-playable/idle/1":369,"char/pico-playable/idle/2":370,"char/pico-playable/idle/3":370,"char/pico-playable/singRIGHT/0":377,"char/pico-playable/singRIGHT/1":378,"char/pico-playable/singDOWN/0":373,"char/pico-playable/singDOWN/1":374,"char/pico-playable/singUP/0":375,"char/pico-playable/singUP/1":376,"char/pico-playable/singLEFT/0":371,"char/pico-playable/singLEFT/1":372,"char/pico-playable/singRIGHT-censor/0":478,"char/pico-playable/singRIGHT-censor/1":479,"char/pico-playable/singDOWN-censor/0":480,"char/pico-playable/singDOWN-censor/1":481,"char/pico-playable/singUP-censor/0":482,"char/pico-playable/singUP-censor/1":483,"char/pico-playable/singLEFT-censor/0":484,"char/pico-playable/singLEFT-censor/1":485,"char/pico-playable/singLEFTmiss/0":486,"char/pico-playable/singDOWNmiss/0":487,"char/pico-playable/singUPmiss/0":488,"char/pico-playable/singRIGHTmiss/0":489,"char/pico-playable/shootMISS/0":490,"char/pico-playable/shootMISS/1":491,"char/pico-playable/hey/0":492,"char/pico-playable/hey/1":493,"char/pico-playable/cheer/0":494,"char/pico-playable/cheer/1":495,"char/pico-playable/cock/0":496,"char/pico-playable/cock/1":497,"char/pico-playable/shoot/0":498,"char/pico-playable/shoot/1":499,"char/pico-playable/intro1/0":500,"char/pico-playable/intro1/1":501,"char/pico-playable/intro2/0":498,"char/pico-playable/intro2/1":502,"char/pico-playable/burpShit/0":503,"char/pico-playable/burpShit/1":504,"char/pico-playable/burpSmile/0":505,"char/pico-playable/burpSmile/1":506,"char/pico-playable/burpSmileLong/0":505,"char/pico-playable/burpSmileLong/1":506,"char/pico-playable/shit/0":507,"char/pico-playable/shit/1":504,"char/pico-speaker/idle/0":508,"char/pico-speaker/idle/1":508,"char/pico-speaker/idle/2":509,"char/pico-speaker/idle/3":509,"char/pico-speaker/shoot1/0":510,"char/pico-speaker/shoot1/1":509,"char/pico-speaker/shoot2/0":511,"char/pico-speaker/shoot2/1":512,"char/pico-speaker/shoot3/0":513,"char/pico-speaker/shoot3/1":514,"char/pico-speaker/shoot4/0":515,"char/pico-speaker/shoot4/1":516,"char/senpai/idle/0":517,"char/senpai/idle/1":518,"char/senpai/idle/2":519,"char/senpai/idle/3":520,"char/senpai/singLEFT/0":521,"char/senpai/singLEFT/1":522,"char/senpai/singDOWN/0":523,"char/senpai/singDOWN/1":524,"char/senpai/singUP/0":525,"char/senpai/singUP/1":526,"char/senpai/singRIGHT/0":527,"char/senpai/singRIGHT/1":528,"char/senpai-angry/idle/0":529,"char/senpai-angry/idle/1":530,"char/senpai-angry/idle/2":531,"char/senpai-angry/idle/3":531,"char/senpai-angry/singLEFT/0":532,"char/senpai-angry/singLEFT/1":533,"char/senpai-angry/singDOWN/0":534,"char/senpai-angry/singDOWN/1":535,"char/senpai-angry/singUP/0":536,"char/senpai-angry/singUP/1":537,"char/senpai-angry/singRIGHT/0":538,"char/senpai-angry/singRIGHT/1":539,"char/spirit/idle/0":540,"char/spirit/idle/1":541,"char/spirit/idle/2":542,"char/spirit/idle/3":543,"char/spirit/singLEFT/0":544,"char/spirit/singLEFT/1":545,"char/spirit/singDOWN/0":546,"char/spirit/singDOWN/1":547,"char/spirit/singUP/0":548,"char/spirit/singUP/1":549,"char/spirit/singRIGHT/0":550,"char/spirit/singRIGHT/1":551,"char/spooky/danceLeft/0":552,"char/spooky/danceLeft/1":553,"char/spooky/danceLeft/2":554,"char/spooky/danceLeft/3":555,"char/spooky/danceRight/0":556,"char/spooky/danceRight/1":557,"char/spooky/danceRight/2":554,"char/spooky/danceRight/3":555,"char/spooky/singLEFT/0":558,"char/spooky/singLEFT/1":559,"char/spooky/singDOWN/0":560,"char/spooky/singDOWN/1":561,"char/spooky/singUP/0":562,"char/spooky/singUP/1":563,"char/spooky/singRIGHT/0":564,"char/spooky/singRIGHT/1":565,"char/spooky/cheer/0":566,"char/spooky/cheer/1":567,"char/spooky-dark/danceLeft/0":568,"char/spooky-dark/danceLeft/1":569,"char/spooky-dark/danceLeft/2":570,"char/spooky-dark/danceLeft/3":571,"char/spooky-dark/danceRight/0":572,"char/spooky-dark/danceRight/1":573,"char/spooky-dark/danceRight/2":570,"char/spooky-dark/danceRight/3":571,"char/spooky-dark/singLEFT/0":574,"char/spooky-dark/singLEFT/1":575,"char/spooky-dark/singDOWN/0":576,"char/spooky-dark/singDOWN/1":577,"char/spooky-dark/singUP/0":578,"char/spooky-dark/singUP/1":579,"char/spooky-dark/singRIGHT/0":580,"char/spooky-dark/singRIGHT/1":581,"char/spooky-dark/cheer/0":582,"char/spooky-dark/cheer/1":583,"char/sserafim-chaewon/idle/0":584,"char/sserafim-chaewon/idle/1":585,"char/sserafim-chaewon/idle/2":586,"char/sserafim-chaewon/idle/3":587,"char/sserafim-chaewon/singLEFT/0":588,"char/sserafim-chaewon/singLEFT/1":589,"char/sserafim-chaewon/singDOWN/0":590,"char/sserafim-chaewon/singDOWN/1":591,"char/sserafim-chaewon/singUP/0":592,"char/sserafim-chaewon/singUP/1":593,"char/sserafim-chaewon/singRIGHT/0":594,"char/sserafim-chaewon/singRIGHT/1":595,"char/sserafim-chaewon/singLEFTmiss/0":596,"char/sserafim-chaewon/singDOWNmiss/0":597,"char/sserafim-chaewon/singUPmiss/0":598,"char/sserafim-chaewon/singRIGHTmiss/0":599,"char/sserafim-eunchae/idle/0":600,"char/sserafim-eunchae/idle/1":601,"char/sserafim-eunchae/idle/2":602,"char/sserafim-eunchae/idle/3":602,"char/sserafim-eunchae/singLEFT/0":603,"char/sserafim-eunchae/singLEFT/1":604,"char/sserafim-eunchae/singDOWN/0":605,"char/sserafim-eunchae/singDOWN/1":606,"char/sserafim-eunchae/singUP/0":607,"char/sserafim-eunchae/singUP/1":608,"char/sserafim-eunchae/singRIGHT/0":609,"char/sserafim-eunchae/singRIGHT/1":610,"char/sserafim-eunchae/singLEFTmiss/0":611,"char/sserafim-eunchae/singDOWNmiss/0":612,"char/sserafim-eunchae/singUPmiss/0":613,"char/sserafim-eunchae/singRIGHTmiss/0":614,"char/sserafim-gf/danceLeft/0":615,"char/sserafim-gf/danceLeft/1":616,"char/sserafim-gf/danceLeft/2":617,"char/sserafim-gf/danceLeft/3":618,"char/sserafim-gf/danceRight/0":619,"char/sserafim-gf/danceRight/1":620,"char/sserafim-gf/danceRight/2":621,"char/sserafim-gf/danceRight/3":622,"char/sserafim-gf/danceLeft-beautiful/0":615,"char/sserafim-gf/danceLeft-beautiful/1":618,"char/sserafim-gf/danceRight-beautiful/0":619,"char/sserafim-gf/danceRight-beautiful/1":622,"char/sserafim-gf/singLEFT/0":623,"char/sserafim-gf/singLEFT/1":624,"char/sserafim-gf/singDOWN/0":625,"char/sserafim-gf/singDOWN/1":626,"char/sserafim-gf/singUP/0":627,"char/sserafim-gf/singUP/1":628,"char/sserafim-gf/singRIGHT/0":629,"char/sserafim-gf/singRIGHT/1":630,"char/sserafim-gf/singLEFTmiss/0":631,"char/sserafim-gf/singDOWNmiss/0":632,"char/sserafim-gf/singUPmiss/0":633,"char/sserafim-gf/singRIGHTmiss/0":634,"char/sserafim-gf/singLEFT-beautiful/0":635,"char/sserafim-gf/singLEFT-beautiful/1":636,"char/sserafim-gf/singDOWN-beautiful/0":637,"char/sserafim-gf/singDOWN-beautiful/1":638,"char/sserafim-gf/singUP-beautiful/0":639,"char/sserafim-gf/singUP-beautiful/1":640,"char/sserafim-gf/singRIGHT-beautiful/0":641,"char/sserafim-gf/singRIGHT-beautiful/1":642,"char/sserafim-gf/singLEFTmiss-beautiful/0":643,"char/sserafim-gf/singDOWNmiss-beautiful/0":644,"char/sserafim-gf/singUPmiss-beautiful/0":645,"char/sserafim-gf/singRIGHTmiss-beautiful/0":646,"char/sserafim-kazuha/idle/0":647,"char/sserafim-kazuha/idle/1":648,"char/sserafim-kazuha/idle/2":649,"char/sserafim-kazuha/idle/3":650,"char/sserafim-kazuha/singLEFT/0":651,"char/sserafim-kazuha/singLEFT/1":652,"char/sserafim-kazuha/singDOWN/0":653,"char/sserafim-kazuha/singDOWN/1":654,"char/sserafim-kazuha/singUP/0":655,"char/sserafim-kazuha/singUP/1":656,"char/sserafim-kazuha/singRIGHT/0":657,"char/sserafim-kazuha/singRIGHT/1":658,"char/sserafim-kazuha/singLEFTmiss/0":659,"char/sserafim-kazuha/singDOWNmiss/0":660,"char/sserafim-kazuha/singUPmiss/0":661,"char/sserafim-kazuha/singRIGHTmiss/0":662,"char/sserafim-sakura/idle/0":663,"char/sserafim-sakura/idle/1":664,"char/sserafim-sakura/idle/2":665,"char/sserafim-sakura/idle/3":666,"char/sserafim-sakura/singLEFT/0":667,"char/sserafim-sakura/singLEFT/1":668,"char/sserafim-sakura/singDOWN/0":669,"char/sserafim-sakura/singDOWN/1":670,"char/sserafim-sakura/singUP/0":671,"char/sserafim-sakura/singUP/1":672,"char/sserafim-sakura/singRIGHT/0":673,"char/sserafim-sakura/singRIGHT/1":674,"char/sserafim-sakura/singLEFTmiss/0":667,"char/sserafim-sakura/singDOWNmiss/0":669,"char/sserafim-sakura/singUPmiss/0":671,"char/sserafim-sakura/singRIGHTmiss/0":673,"char/sserafim-sakura/singLEFT-joint/0":675,"char/sserafim-sakura/singLEFT-joint/1":676,"char/sserafim-sakura/singDOWN-joint/0":677,"char/sserafim-sakura/singDOWN-joint/1":678,"char/sserafim-sakura/singUP-joint/0":679,"char/sserafim-sakura/singUP-joint/1":680,"char/sserafim-sakura/singRIGHT-joint/0":681,"char/sserafim-sakura/singRIGHT-joint/1":682,"char/sserafim-sakura/singLEFTmiss-joint/0":675,"char/sserafim-sakura/singDOWNmiss-joint/0":677,"char/sserafim-sakura/singUPmiss-joint/0":679,"char/sserafim-sakura/singRIGHTmiss-joint/0":681,"char/sserafim-sakura/singLEFT-bf1/0":683,"char/sserafim-sakura/singLEFT-bf1/1":684,"char/sserafim-sakura/singDOWN-bf1/0":685,"char/sserafim-sakura/singDOWN-bf1/1":686,"char/sserafim-sakura/singUP-bf1/0":687,"char/sserafim-sakura/singUP-bf1/1":688,"char/sserafim-sakura/singRIGHT-bf1/0":689,"char/sserafim-sakura/singRIGHT-bf1/1":690,"char/sserafim-sakura/singLEFT-bf2/0":691,"char/sserafim-sakura/singLEFT-bf2/1":692,"char/sserafim-sakura/singDOWN-bf2/0":693,"char/sserafim-sakura/singDOWN-bf2/1":694,"char/sserafim-sakura/singUP-bf2/0":695,"char/sserafim-sakura/singUP-bf2/1":696,"char/sserafim-sakura/singRIGHT-bf2/0":697,"char/sserafim-sakura/singRIGHT-bf2/1":698,"char/sserafim-sakura/singLEFTmiss-bf2/0":683,"char/sserafim-sakura/singDOWNmiss-bf2/0":685,"char/sserafim-sakura/singUPmiss-bf2/0":687,"char/sserafim-sakura/singRIGHTmiss-bf2/0":689,"char/sserafim-yunjin/doorclosed/0":699,"char/sserafim-yunjin/doorclosed/1":699,"char/sserafim-yunjin/kick1/0":700,"char/sserafim-yunjin/kick1/1":699,"char/sserafim-yunjin/kick2/0":701,"char/sserafim-yunjin/kick2/1":702,"char/sserafim-yunjin/idle/0":703,"char/sserafim-yunjin/idle/1":704,"char/sserafim-yunjin/idle/2":705,"char/sserafim-yunjin/idle/3":706,"char/sserafim-yunjin/singLEFT/0":707,"char/sserafim-yunjin/singLEFT/1":708,"char/sserafim-yunjin/singDOWN/0":709,"char/sserafim-yunjin/singDOWN/1":710,"char/sserafim-yunjin/singUP/0":711,"char/sserafim-yunjin/singUP/1":712,"char/sserafim-yunjin/singRIGHT/0":713,"char/sserafim-yunjin/singRIGHT/1":714,"char/sserafim-yunjin/singLEFTmiss/0":707,"char/sserafim-yunjin/singDOWNmiss/0":715,"char/sserafim-yunjin/singUPmiss/0":711,"char/sserafim-yunjin/singRIGHTmiss/0":713,"char/tankman/idle/0":716,"char/tankman/idle/1":717,"char/tankman/idle/2":718,"char/tankman/idle/3":718,"char/tankman/singLEFT/0":719,"char/tankman/singLEFT/1":720,"char/tankman/singDOWN/0":721,"char/tankman/singDOWN/1":722,"char/tankman/singUP/0":723,"char/tankman/singUP/1":724,"char/tankman/singRIGHT/0":725,"char/tankman/singRIGHT/1":726,"char/tankman/hehPrettyGood/0":727,"char/tankman/hehPrettyGood/1":728,"char/tankman/ugh/0":729,"char/tankman/ugh/1":730,"char/tankman/laugh/0":731,"char/tankman/laugh/1":732,"char/tankman/beat it/0":733,"char/tankman/beat it/1":734,"char/tankman/augh/0":735,"char/tankman/augh/1":736,"char/tankman-bloody/idle/0":737,"char/tankman-bloody/idle/1":738,"char/tankman-bloody/idle/2":739,"char/tankman-bloody/idle/3":739,"char/tankman-bloody/singLEFT/0":740,"char/tankman-bloody/singLEFT/1":741,"char/tankman-bloody/singDOWN/0":742,"char/tankman-bloody/singDOWN/1":743,"char/tankman-bloody/singUP/0":744,"char/tankman-bloody/singUP/1":745,"char/tankman-bloody/singRIGHT/0":746,"char/tankman-bloody/singRIGHT/1":747,"char/tankman-bloody/idle-bloody/0":748,"char/tankman-bloody/idle-bloody/1":749,"char/tankman-bloody/singLEFT-bloody/0":750,"char/tankman-bloody/singLEFT-bloody/1":751,"char/tankman-bloody/singDOWN-bloody/0":752,"char/tankman-bloody/singDOWN-bloody/1":753,"char/tankman-bloody/singUP-bloody/0":754,"char/tankman-bloody/singUP-bloody/1":755,"char/tankman-bloody/singRIGHT-bloody/0":756,"char/tankman-bloody/singRIGHT-bloody/1":757,"char/tankman-bloody/hehPrettyGood-bloody/0":758,"char/tankman-bloody/hehPrettyGood-bloody/1":759,"char/tankman-bloody/redheadsAnim/0":760,"char/tankman-bloody/redheadsAnim/1":761,"char/tankman-bloody/stressPicoEnding/0":762,"char/tankman-bloody/stressPicoEnding/1":763,"stage/limoRide":764,"stage/limoRideErect":765,"stage/mainStage":766,"stage/mainStageErect":767,"stage/mallEvil":768,"stage/mallXmas":769,"stage/mallXmasErect":770,"stage/phillyBlazin":771,"stage/phillyStreets":772,"stage/phillyStreetsErect":773,"stage/phillyTrain":774,"stage/phillyTrainErect":775,"stage/school":776,"stage/schoolErect":777,"stage/schoolEvil":778,"stage/schoolEvilErect":779,"stage/spookyMansion":780,"stage/spookyMansionErect":781,"stage/sserafim":782,"stage/tankmanBattlefield":783,"stage/tankmanBattlefieldErect":784,"note0":785,"static0":786,"press0":787,"confirm0":788,"note1":789,"static1":790,"press1":791,"confirm1":792,"note2":793,"static2":794,"press2":795,"confirm2":796,"note3":797,"static3":798,"press3":799,"confirm3":800,"logo":801,"menu":802,"icon/icon-bf-old/0":803,"icon/icon-bf-old/1":804,"icon/icon-bf-pixel/0":805,"icon/icon-bf-pixel/1":806,"icon/icon-bf/0":807,"icon/icon-bf/1":808,"icon/icon-chaewon/0":809,"icon/icon-chaewon/1":810,"icon/icon-dad/0":811,"icon/icon-darnell/0":812,"icon/icon-darnell/1":813,"icon/icon-eunchae/0":814,"icon/icon-eunchae/1":815,"icon/icon-face/0":816,"icon/icon-face/1":817,"icon/icon-gf/0":818,"icon/icon-kazuha/0":819,"icon/icon-kazuha/1":820,"icon/icon-mom/0":821,"icon/icon-mom/1":822,"icon/icon-monster/0":823,"icon/icon-monster/1":824,"icon/icon-parents/0":825,"icon/icon-pico-pixel/0":826,"icon/icon-pico-pixel/1":827,"icon/icon-pico/0":828,"icon/icon-pico/1":829,"icon/icon-sakura/0":830,"icon/icon-sakura/1":831,"icon/icon-senpai-angry/0":832,"icon/icon-senpai-angry/1":833,"icon/icon-senpai/0":834,"icon/icon-senpai/1":832,"icon/icon-spirit/0":835,"icon/icon-spirit/1":836,"icon/icon-spooky/0":837,"icon/icon-spooky/1":838,"icon/icon-tankman-bloody/0":839,"icon/icon-tankman-bloody/1":840,"icon/icon-tankman/0":841,"icon/icon-tankman/1":842,"icon/icon-yunjin/0":843,"icon/icon-yunjin/1":844}}diff --git a/games/fnf/assets/chart-manifest.json b/games/fnf/assets/chart-manifest.jsondeleted file mode 100644index 428a30cd..00000000--- a/games/fnf/assets/chart-manifest.json+++ /dev/null@@ -1,1520 +0,0 @@-{- "SPRITE_COUNT": 845,- "PALETTE_COUNT": 826,- "ART_BYTES": 1375375,- "NOTE_BYTES": 281891,- "ANIMATION_COUNT": 444,- "CHARACTER_COUNT": 46,- "KIND_COUNT": 36,- "TEMPO_COUNT": 75,- "EVENT_COUNT": 3638,- "CHART_COUNT": 166,- "TRACK_COUNT": 61,- "SONG_COUNT": 27,- "LEVEL_COUNT": 10,- "STAGE_COUNT": 21,- "UI_LOGO": 801,- "UI_MENU": 802,- "auxiliary_npc_notes": 1130,- "charts": [- {- "chart": 0,- "song": "tutorial",- "variation": "default",- "difficulty": "easy",- "notes": 55,- "player_notes": 32,- "sha256": "23efe01582c7a6e2ca6f47aacd97df2823e935ef7815ac7174906394e80a982f"- },- {- "chart": 1,- "song": "tutorial",- "variation": "default",- "difficulty": "normal",- "notes": 55,- "player_notes": 32,- "sha256": "23efe01582c7a6e2ca6f47aacd97df2823e935ef7815ac7174906394e80a982f"- },- {- "chart": 2,- "song": "tutorial",- "variation": "default",- "difficulty": "hard",- "notes": 71,- "player_notes": 48,- "sha256": "c0e0b13fe6d8a3f981f9f6ae6dc5201d7d143768cca8917f59e56e546e5ce8bd"- },- {- "chart": 3,- "song": "bopeebo",- "variation": "default",- "difficulty": "easy",- "notes": 88,- "player_notes": 44,- "sha256": "6e155c74c2d5a7e4d0c86d32018c332aa240860f6a391fa61e6c124414dc69a4"- },- {- "chart": 4,- "song": "bopeebo",- "variation": "default",- "difficulty": "normal",- "notes": 102,- "player_notes": 51,- "sha256": "a052d468e8febb90b923150bb90bee3590f917afc228053a0b4b781c4fdbbbb5"- },- {- "chart": 5,- "song": "bopeebo",- "variation": "default",- "difficulty": "hard",- "notes": 124,- "player_notes": 62,- "sha256": "95c0f61abb8c8bc5e9ce667ee63dbca48c2bb94120d2c6191d4391ede266755c"- },- {- "chart": 6,- "song": "bopeebo",- "variation": "erect",- "difficulty": "erect",- "notes": 532,- "player_notes": 410,- "sha256": "fd144636d04b4ac464460cafd7817ea81b3487ec3678f1818df3e76874c30097"- },- {- "chart": 7,- "song": "bopeebo",- "variation": "erect",- "difficulty": "nightmare",- "notes": 558,- "player_notes": 436,- "sha256": "cc26603f1ae857d76ae516a43b5c1a4bddd92fdfe15989e8eb8dbf461f1133d2"- },- {- "chart": 8,- "song": "bopeebo",- "variation": "pico",- "difficulty": "easy",- "notes": 220,- "player_notes": 122,- "sha256": "f9836b4a77a504a91bcb30fc905a2377f1506382edfd29c7ebc32c7f3109d640"- },- {- "chart": 9,- "song": "bopeebo",- "variation": "pico",- "difficulty": "normal",- "notes": 283,- "player_notes": 185,- "sha256": "6e44162ab49552568b91dd9aa0763425e4e734c1cd5870ae520a9c5f802de439"- },- {- "chart": 10,- "song": "bopeebo",- "variation": "pico",- "difficulty": "hard",- "notes": 343,- "player_notes": 243,- "sha256": "58180551eefca19eb9b50e1f7ca1ff67f305cb2de5c976cd74308e276bb87b23"- },- {- "chart": 11,- "song": "fresh",- "variation": "default",- "difficulty": "easy",- "notes": 169,- "player_notes": 85,- "sha256": "bf6cfc12ea3007f0650a388f21f5ef60e5ce3beed95d5274697a5043edb0125d"- },- {- "chart": 12,- "song": "fresh",- "variation": "default",- "difficulty": "normal",- "notes": 210,- "player_notes": 105,- "sha256": "c952af10d6891dfe5f2e035875ed53ab05762c2403773c0a748af49a8a4ea88d"- },- {- "chart": 13,- "song": "fresh",- "variation": "default",- "difficulty": "hard",- "notes": 267,- "player_notes": 141,- "sha256": "09bf2beeed08c383c9ee077c065af1950567023b57c2103a77908565adfb55b9"- },- {- "chart": 14,- "song": "fresh",- "variation": "erect",- "difficulty": "erect",- "notes": 464,- "player_notes": 283,- "sha256": "cfef4c9b1dd205c8bf61c52f08204b1c295af65d0d575facb16838bea7d5d346"- },- {- "chart": 15,- "song": "fresh",- "variation": "erect",- "difficulty": "nightmare",- "notes": 473,- "player_notes": 289,- "sha256": "66b2c353eab89ed38b6da4168087f345e1b1f7f6c70b8a50a5c0de86f03f0356"- },- {- "chart": 16,- "song": "fresh",- "variation": "pico",- "difficulty": "easy",- "notes": 246,- "player_notes": 139,- "sha256": "24eafd07c4ed73d6b6adb7c601cc5236060536f57cf29ea39b3a082019bf0786"- },- {- "chart": 17,- "song": "fresh",- "variation": "pico",- "difficulty": "normal",- "notes": 318,- "player_notes": 207,- "sha256": "d73ba98ba74427139c660196eaca12efb8511f078f0b64cded51c524547e1176"- },- {- "chart": 18,- "song": "fresh",- "variation": "pico",- "difficulty": "hard",- "notes": 341,- "player_notes": 230,- "sha256": "3bd0abbea2744ed9b0d4df4efcba46b528cb542aeab9001d247c5d87e162c88b"- },- {- "chart": 19,- "song": "dadbattle",- "variation": "default",- "difficulty": "easy",- "notes": 144,- "player_notes": 72,- "sha256": "bd43572c00838e6ed83653dcdc4e8b1d173a33bb72e59a403163381a28f3feb0"- },- {- "chart": 20,- "song": "dadbattle",- "variation": "default",- "difficulty": "normal",- "notes": 263,- "player_notes": 131,- "sha256": "983ce3bf3f9e717d7260ef4e8951ae2d7588793a0e19d3029af2f257f93a161f"- },- {- "chart": 21,- "song": "dadbattle",- "variation": "default",- "difficulty": "hard",- "notes": 327,- "player_notes": 164,- "sha256": "1f2057fcebb12229e150d606a3101ea354ec5f04092b4983941952bb0cee7176"- },- {- "chart": 22,- "song": "dadbattle",- "variation": "erect",- "difficulty": "erect",- "notes": 948,- "player_notes": 697,- "sha256": "69bcc99d8fe7e576cca83ebe307f4a7da49f87fb38bed89d1f39420e2d293855"- },- {- "chart": 23,- "song": "dadbattle",- "variation": "erect",- "difficulty": "nightmare",- "notes": 951,- "player_notes": 700,- "sha256": "e0d647789e14ec79d2596a4cf8da41dcbf6639f941fe05ee55953a786e475ca5"- },- {- "chart": 24,- "song": "dadbattle",- "variation": "pico",- "difficulty": "easy",- "notes": 398,- "player_notes": 231,- "sha256": "3c42f266e123fccb78535be6018c007430ac7fab50269d4e6b723a5c2f38245a"- },- {- "chart": 25,- "song": "dadbattle",- "variation": "pico",- "difficulty": "normal",- "notes": 499,- "player_notes": 332,- "sha256": "52e15313636e275c671229c32572a6fa26dfd9634dc5e4802d3c0be83c435d35"- },- {- "chart": 26,- "song": "dadbattle",- "variation": "pico",- "difficulty": "hard",- "notes": 526,- "player_notes": 359,- "sha256": "8d3ba3a82f1f393df498ad9ab9b0f4db313340cbbba2b5c5b7d4f04ed87da535"- },- {- "chart": 27,- "song": "spookeez",- "variation": "default",- "difficulty": "easy",- "notes": 273,- "player_notes": 136,- "sha256": "9fdb7906880ae71c22cb858a306f5c9d69398cabd8fcbcdb8c40e82284fd3376"- },- {- "chart": 28,- "song": "spookeez",- "variation": "default",- "difficulty": "normal",- "notes": 347,- "player_notes": 172,- "sha256": "2542849396a8a3191b1b10e9eebf50e75758549115cff45681ae5de89505b2e4"- },- {- "chart": 29,- "song": "spookeez",- "variation": "default",- "difficulty": "hard",- "notes": 406,- "player_notes": 202,- "sha256": "637abd0857c2c3ce92d4e47b08111265564d57b28eed9eed2fd880f056440b07"- },- {- "chart": 30,- "song": "spookeez",- "variation": "erect",- "difficulty": "erect",- "notes": 1190,- "player_notes": 887,- "sha256": "2bcaa1bb2bf006fc69e1121849960e04a67b0efcca69a25d57a928e365101d6d"- },- {- "chart": 31,- "song": "spookeez",- "variation": "erect",- "difficulty": "nightmare",- "notes": 1216,- "player_notes": 913,- "sha256": "f3e6621a22845f89943eb969fe8227c2a3c0c2ba45b05de59cde7ec226736dcf"- },- {- "chart": 32,- "song": "spookeez",- "variation": "pico",- "difficulty": "easy",- "notes": 408,- "player_notes": 197,- "sha256": "60ed50efc0401c6465f893a7698c49b7e99499fc233ecdd3f301a297a17e6dd4"- },- {- "chart": 33,- "song": "spookeez",- "variation": "pico",- "difficulty": "normal",- "notes": 443,- "player_notes": 232,- "sha256": "2589eff341bd781b73bebdfddcfbf6e9aa3428c7786acac6b70deec76036d632"- },- {- "chart": 34,- "song": "spookeez",- "variation": "pico",- "difficulty": "hard",- "notes": 497,- "player_notes": 286,- "sha256": "244331b599af217e751ca13b9ea2161c04bfeb85dfbea6b61f26e75521a09d40"- },- {- "chart": 35,- "song": "south",- "variation": "default",- "difficulty": "easy",- "notes": 206,- "player_notes": 103,- "sha256": "26ca9a79c889a47da9d547cf57f218a17646590cd23455143fbc5b8245349bba"- },- {- "chart": 36,- "song": "south",- "variation": "default",- "difficulty": "normal",- "notes": 312,- "player_notes": 156,- "sha256": "85fed66542cf5e286f55c7a30e70d119d0aabcff869655c74effd6c143545f73"- },- {- "chart": 37,- "song": "south",- "variation": "default",- "difficulty": "hard",- "notes": 350,- "player_notes": 175,- "sha256": "71e5f24185a0bebdf1e5faeea57dc454d50c93c1b47168188977bf05362229ff"- },- {- "chart": 38,- "song": "south",- "variation": "erect",- "difficulty": "erect",- "notes": 742,- "player_notes": 522,- "sha256": "539ca86b76981f5a67bd9024a6e5bcd0365b2dc645981c3ae5a197ae51b0cd2c"- },- {- "chart": 39,- "song": "south",- "variation": "erect",- "difficulty": "nightmare",- "notes": 746,- "player_notes": 526,- "sha256": "5d8afa2a29d97500943d61db308f7d592af6244874842f6e95fdbc03ee76fffe"- },- {- "chart": 40,- "song": "south",- "variation": "pico",- "difficulty": "easy",- "notes": 283,- "player_notes": 146,- "sha256": "5e346851f1bc7d578414b6bfe5cadf4df38af8986aba9c493419c22fc4a64b39"- },- {- "chart": 41,- "song": "south",- "variation": "pico",- "difficulty": "normal",- "notes": 391,- "player_notes": 211,- "sha256": "2a4a7d7d83ccaa5d5635e5689effa17d56302b773ffef15c538ca8fba8f0d0f2"- },- {- "chart": 42,- "song": "south",- "variation": "pico",- "difficulty": "hard",- "notes": 439,- "player_notes": 256,- "sha256": "1fd6748ab54eb10baa1dfa28a857c860d6330e6d7d9dafcfbb03a43dd3a57cca"- },- {- "chart": 43,- "song": "monster",- "variation": "default",- "difficulty": "easy",- "notes": 395,- "player_notes": 169,- "sha256": "e405d812801a0889c184ef34a7b70571f9b33629bdb26f990ff63d7f55fa29be"- },- {- "chart": 44,- "song": "monster",- "variation": "default",- "difficulty": "normal",- "notes": 419,- "player_notes": 193,- "sha256": "3192f3013a65959fbaeab3047f278b7b1ef299473f40fc69032cf42009863446"- },- {- "chart": 45,- "song": "monster",- "variation": "default",- "difficulty": "hard",- "notes": 443,- "player_notes": 217,- "sha256": "70cd53fff7883e3833bdeda36adb8f1ba6411bdd454fa6cfe294bc5fe4afbadd"- },- {- "chart": 46,- "song": "pico",- "variation": "default",- "difficulty": "easy",- "notes": 170,- "player_notes": 92,- "sha256": "7e6354ab4360781dba424035f41004f8901a9959af917069b123947d680184d4"- },- {- "chart": 47,- "song": "pico",- "variation": "default",- "difficulty": "normal",- "notes": 263,- "player_notes": 142,- "sha256": "a35b38366f9a40193405a71191bae1008883d336db77fc7883da4128d2e152cf"- },- {- "chart": 48,- "song": "pico",- "variation": "default",- "difficulty": "hard",- "notes": 327,- "player_notes": 175,- "sha256": "0f2c8c1372bf16d526611a1d05483e613928679bfd6f9ad012d2a5bc60002c3a"- },- {- "chart": 49,- "song": "pico",- "variation": "erect",- "difficulty": "erect",- "notes": 702,- "player_notes": 459,- "sha256": "c3a33836a000a0e6acf6138f5188c07fb73e1c41631e6fa60555dd727c8f2758"- },- {- "chart": 50,- "song": "pico",- "variation": "erect",- "difficulty": "nightmare",- "notes": 827,- "player_notes": 576,- "sha256": "636e14376c1564333acd06e8357eb01f8b767ed026754b3dfc375ef45a170d19"- },- {- "chart": 51,- "song": "pico",- "variation": "pico",- "difficulty": "easy",- "notes": 349,- "player_notes": 206,- "sha256": "c5239f5a7a2d8837d3074d23452c233f82606d91e369a5957c9dcbdf92d19c1a"- },- {- "chart": 52,- "song": "pico",- "variation": "pico",- "difficulty": "normal",- "notes": 369,- "player_notes": 217,- "sha256": "de69ff53326f0288ba2f8d7b126c06e2aedfd831ee92fe4d59703ad31f62f07b"- },- {- "chart": 53,- "song": "pico",- "variation": "pico",- "difficulty": "hard",- "notes": 423,- "player_notes": 255,- "sha256": "ea4fc020dc723362a55bc2d652098e3b9976b3b8d188a0497f34365393923889"- },- {- "chart": 54,- "song": "philly-nice",- "variation": "default",- "difficulty": "easy",- "notes": 227,- "player_notes": 114,- "sha256": "fe01a4c0c270fbdf41f84ebd5a73777f5256d25e6701acc87e9b0d6600f318f0"- },- {- "chart": 55,- "song": "philly-nice",- "variation": "default",- "difficulty": "normal",- "notes": 323,- "player_notes": 162,- "sha256": "3a9ca0a6980c5017905913de9d28cd0c002c6b0d6b128e54fc6a19ac99df8177"- },- {- "chart": 56,- "song": "philly-nice",- "variation": "default",- "difficulty": "hard",- "notes": 451,- "player_notes": 224,- "sha256": "99ef299d6eb96f630349648f42644455cf01f823c040281d690e3dabd6e203fa"- },- {- "chart": 57,- "song": "philly-nice",- "variation": "erect",- "difficulty": "erect",- "notes": 782,- "player_notes": 474,- "sha256": "395e750ff7a4ad667c0181c070bf18648274d154400f97885db2486c81b1a575"- },- {- "chart": 58,- "song": "philly-nice",- "variation": "erect",- "difficulty": "nightmare",- "notes": 792,- "player_notes": 484,- "sha256": "d08c001a63f8843f0561ebe0940ded088f5f13809ca3aeece7c4681fe22a117d"- },- {- "chart": 59,- "song": "philly-nice",- "variation": "pico",- "difficulty": "easy",- "notes": 423,- "player_notes": 177,- "sha256": "2e2d5aab9dc6a0ea290b0c3ef3d4d2b50bb26dc11763d3871b28bdf2dda785b2"- },- {- "chart": 60,- "song": "philly-nice",- "variation": "pico",- "difficulty": "normal",- "notes": 533,- "player_notes": 287,- "sha256": "12bc056216f10cccf58e350ae00475f4fe7ab6ce7096bf37e5914f5bde2acae7"- },- {- "chart": 61,- "song": "philly-nice",- "variation": "pico",- "difficulty": "hard",- "notes": 570,- "player_notes": 324,- "sha256": "13b5cdc568fbb0b18cfcd1ae720ed0acfc6ebf487d9681754effd591d794bae8"- },- {- "chart": 62,- "song": "blammed",- "variation": "default",- "difficulty": "easy",- "notes": 235,- "player_notes": 115,- "sha256": "594c9e7331f6398ca6cce02db327aae42c0120d9f7598c85ef1d8d469dc2cf15"- },- {- "chart": 63,- "song": "blammed",- "variation": "default",- "difficulty": "normal",- "notes": 301,- "player_notes": 147,- "sha256": "445217a15ed13a9c32900feb299bdd4eb92600a1df6eed32e379d40cadf218cc"- },- {- "chart": 64,- "song": "blammed",- "variation": "default",- "difficulty": "hard",- "notes": 398,- "player_notes": 196,- "sha256": "e175de1f6a8169c38dc2559d77790f0b89fe6730841dfc2dff6820f949fb596f"- },- {- "chart": 65,- "song": "blammed",- "variation": "erect",- "difficulty": "erect",- "notes": 575,- "player_notes": 318,- "sha256": "ba43e0728ad4988a1e68ecdd4a83e0aca52f51caf3d21f9e51ca783dd477cab4"- },- {- "chart": 66,- "song": "blammed",- "variation": "erect",- "difficulty": "nightmare",- "notes": 649,- "player_notes": 392,- "sha256": "f40f2fd4fa2a7ca123cbd6d4a57f34fda64bee1b99acd9add9cc78d5deeccee1"- },- {- "chart": 67,- "song": "blammed",- "variation": "pico",- "difficulty": "easy",- "notes": 508,- "player_notes": 208,- "sha256": "ae05946877451d5ea8c26e39204b23b505d580183f7c7ea52dfa6fc5cc5de0f3"- },- {- "chart": 68,- "song": "blammed",- "variation": "pico",- "difficulty": "normal",- "notes": 629,- "player_notes": 322,- "sha256": "efa370704e68722eafa662b156a039bf8a21525b6d7d38a318d8186ce9a9b2af"- },- {- "chart": 69,- "song": "blammed",- "variation": "pico",- "difficulty": "hard",- "notes": 674,- "player_notes": 367,- "sha256": "0a05c1402f27467fe7669eaa51f7fd60fc519e13b33867c678ff7e12fb0cc680"- },- {- "chart": 70,- "song": "satin-panties",- "variation": "default",- "difficulty": "easy",- "notes": 313,- "player_notes": 156,- "sha256": "73cce9d298be7b847c8770599968c3566facf0e85f61d49bc6e02422e99ecddc"- },- {- "chart": 71,- "song": "satin-panties",- "variation": "default",- "difficulty": "normal",- "notes": 428,- "player_notes": 216,- "sha256": "d9389abea12a00114ea7a5268036175e3da52846ec41e69ffe7a954e7c07d827"- },- {- "chart": 72,- "song": "satin-panties",- "variation": "default",- "difficulty": "hard",- "notes": 525,- "player_notes": 266,- "sha256": "516e4077115d938f8ca693ef22009133f770d5f1ffafab26e2402809e0e56d1c"- },- {- "chart": 73,- "song": "satin-panties",- "variation": "erect",- "difficulty": "erect",- "notes": 1125,- "player_notes": 693,- "sha256": "7eeb7ddab90d285463cceff4d6dadf4b0915193866d610904da08a40697e19f3"- },- {- "chart": 74,- "song": "satin-panties",- "variation": "erect",- "difficulty": "nightmare",- "notes": 1151,- "player_notes": 719,- "sha256": "e8faa0c3d4b4b76689dd716a54f069d066c2b2888b7c410e6467ee08b95555fa"- },- {- "chart": 75,- "song": "high",- "variation": "default",- "difficulty": "easy",- "notes": 319,- "player_notes": 154,- "sha256": "83767196bf2ad27d8ed496943adc45cb0ac78506dd296ea7197b624b59b24b18"- },- {- "chart": 76,- "song": "high",- "variation": "default",- "difficulty": "normal",- "notes": 382,- "player_notes": 183,- "sha256": "462b6acf80e24c46502a9f36ca53a65c23eed83986fc17d0d43e3a8de880dbfa"- },- {- "chart": 77,- "song": "high",- "variation": "default",- "difficulty": "hard",- "notes": 491,- "player_notes": 236,- "sha256": "d9bd1c6591faca6c6a41bede057f8ce80d9331c49187dbdbea71372e4e0c2b20"- },- {- "chart": 78,- "song": "high",- "variation": "erect",- "difficulty": "erect",- "notes": 636,- "player_notes": 381,- "sha256": "30cad0cd8ab597a04c849194c8e0cc08a1274573d4effd1868a762c3d5de3f76"- },- {- "chart": 79,- "song": "high",- "variation": "erect",- "difficulty": "nightmare",- "notes": 641,- "player_notes": 386,- "sha256": "2524c4ffdfcbbd339bd399adb8ce100ef2d8a30aab1b3050cdd08f00a233ea51"- },- {- "chart": 80,- "song": "milf",- "variation": "default",- "difficulty": "easy",- "notes": 397,- "player_notes": 187,- "sha256": "443af8b70fbbc6af244d49cd03b7cffe5ca22f1901f1a3f224828546e5daecf6"- },- {- "chart": 81,- "song": "milf",- "variation": "default",- "difficulty": "normal",- "notes": 518,- "player_notes": 247,- "sha256": "c30b592deb76385b9bb99b29be2154557371346a9f89c7627e3a7660bfa6506a"- },- {- "chart": 82,- "song": "milf",- "variation": "default",- "difficulty": "hard",- "notes": 674,- "player_notes": 326,- "sha256": "c2b481ef808d214d3fb684c34f2851a994f75aed91396470f777507c0fa572ab"- },- {- "chart": 83,- "song": "cocoa",- "variation": "default",- "difficulty": "easy",- "notes": 279,- "player_notes": 139,- "sha256": "02f82582fe9a4c4ca98b022e35ac8fb8491559ea616390d8df2a912eed9e341e"- },- {- "chart": 84,- "song": "cocoa",- "variation": "default",- "difficulty": "normal",- "notes": 324,- "player_notes": 162,- "sha256": "543b63e293a9091938d815dabac4757c9a4ae54523170995dc73b2aa59de9783"- },- {- "chart": 85,- "song": "cocoa",- "variation": "default",- "difficulty": "hard",- "notes": 447,- "player_notes": 223,- "sha256": "ddd85cc9153f50040e63386c75c13cbb02283951d4bd1f146c6336ce3b8d31a1"- },- {- "chart": 86,- "song": "cocoa",- "variation": "erect",- "difficulty": "erect",- "notes": 617,- "player_notes": 410,- "sha256": "8c1686eeb7475c76f9ea1cdbf424378d74e750c6ffdef31f7ccb6c320f0eb4f2"- },- {- "chart": 87,- "song": "cocoa",- "variation": "erect",- "difficulty": "nightmare",- "notes": 647,- "player_notes": 440,- "sha256": "74e8b9998e15b4ecd5c5dd07e2b8fc27edbb612d4221fa2fd4381894e1655744"- },- {- "chart": 88,- "song": "cocoa",- "variation": "pico",- "difficulty": "easy",- "notes": 597,- "player_notes": 277,- "sha256": "f009d8c513215de5daf687336ba66bc657579cd1f9e288716d58c2757e193f83"- },- {- "chart": 89,- "song": "cocoa",- "variation": "pico",- "difficulty": "normal",- "notes": 705,- "player_notes": 385,- "sha256": "28fe85404389ac85b6ac131ec967a4c514327e5600d329352e83a1314202b771"- },- {- "chart": 90,- "song": "cocoa",- "variation": "pico",- "difficulty": "hard",- "notes": 762,- "player_notes": 442,- "sha256": "0de5b874973cf2dce1f7be6d631959a3cc5cb3966d859cf422578e67ff68ebae"- },- {- "chart": 91,- "song": "eggnog",- "variation": "default",- "difficulty": "easy",- "notes": 288,- "player_notes": 153,- "sha256": "8c6f547ef06e663296449041df7975ec4f4a75152be0f0f95e423c1411b68c3b"- },- {- "chart": 92,- "song": "eggnog",- "variation": "default",- "difficulty": "normal",- "notes": 354,- "player_notes": 185,- "sha256": "a2783db88c1bd295043166b7d97a516cc3597b50dac6ba0df862907db50d3655"- },- {- "chart": 93,- "song": "eggnog",- "variation": "default",- "difficulty": "hard",- "notes": 458,- "player_notes": 240,- "sha256": "e1d4be1e007c9eee548175950f7683ca21998b593fd350d4d501530dc20cf172"- },- {- "chart": 94,- "song": "eggnog",- "variation": "erect",- "difficulty": "erect",- "notes": 809,- "player_notes": 441,- "sha256": "60d7523d90a6d0430aa8b5744ac8952b1c038da076d34f1fc2dfa3d92fdc74b6"- },- {- "chart": 95,- "song": "eggnog",- "variation": "erect",- "difficulty": "nightmare",- "notes": 814,- "player_notes": 446,- "sha256": "b860095e948002e9395594f00770e2a3c96ff69c8c2fe09449ade76576a50300"- },- {- "chart": 96,- "song": "eggnog",- "variation": "pico",- "difficulty": "easy",- "notes": 441,- "player_notes": 196,- "sha256": "0788caa79e33315a9d4fa4636bf5a171f1a90d52510e75b551363698dc033d99"- },- {- "chart": 97,- "song": "eggnog",- "variation": "pico",- "difficulty": "normal",- "notes": 568,- "player_notes": 323,- "sha256": "0e4e60f827097bb4b768b4490be9bab3e31635215b1cf2bcf765e13c1b544b72"- },- {- "chart": 98,- "song": "eggnog",- "variation": "pico",- "difficulty": "hard",- "notes": 640,- "player_notes": 390,- "sha256": "9ad9ba0942c2d2aca3acc7747ee377313b42a28170df3fe44a932071eee65b0c"- },- {- "chart": 99,- "song": "winter-horrorland",- "variation": "default",- "difficulty": "easy",- "notes": 372,- "player_notes": 151,- "sha256": "8446c4af44b3645eeda65e32052e619d6b6bc9302ff2c7646795e821c9e2d07a"- },- {- "chart": 100,- "song": "winter-horrorland",- "variation": "default",- "difficulty": "normal",- "notes": 414,- "player_notes": 193,- "sha256": "cabae9a7dd6648f5bee64b92334519645dbf0f50996ab1167a670e45b3f2f520"- },- {- "chart": 101,- "song": "winter-horrorland",- "variation": "default",- "difficulty": "hard",- "notes": 445,- "player_notes": 224,- "sha256": "ba4a7f6b76b0f9d18ac8fd424da50ed192f3e0ec46ab3b0e820f5d496891bae7"- },- {- "chart": 102,- "song": "senpai",- "variation": "default",- "difficulty": "easy",- "notes": 285,- "player_notes": 150,- "sha256": "ef5604d17af24b7ec8bb46fedb86dfe4aa1b0d154f425771d6cd6cfc81e05eb6"- },- {- "chart": 103,- "song": "senpai",- "variation": "default",- "difficulty": "normal",- "notes": 341,- "player_notes": 177,- "sha256": "d98fed6e88d8873a0f9b16d052e1a94932f71b5ce5f4647c7727d765f897f409"- },- {- "chart": 104,- "song": "senpai",- "variation": "default",- "difficulty": "hard",- "notes": 385,- "player_notes": 200,- "sha256": "c3894ce5cf38614c9ec3e850e5389883559bf39a71e6c83e4fc0017b61e11a53"- },- {- "chart": 105,- "song": "senpai",- "variation": "erect",- "difficulty": "erect",- "notes": 598,- "player_notes": 358,- "sha256": "d79837cf3110de59cafba3783b2bc4079d63f49b905ec3d037fd93e2f4ac1797"- },- {- "chart": 106,- "song": "senpai",- "variation": "erect",- "difficulty": "nightmare",- "notes": 661,- "player_notes": 412,- "sha256": "502bb8407bbff6b3a2107135c41be20f849e113d4ee2653f2c8a24053c112467"- },- {- "chart": 107,- "song": "senpai",- "variation": "pico",- "difficulty": "easy",- "notes": 440,- "player_notes": 192,- "sha256": "4a650a214bc0fe120c814ab472a01c47721ea837168436d74ba13bf48a729aee"- },- {- "chart": 108,- "song": "senpai",- "variation": "pico",- "difficulty": "normal",- "notes": 514,- "player_notes": 266,- "sha256": "ef8ccd1a311ff297aab9ec462c1af6bc56fb917698db54a8743c73e63b2fe3d0"- },- {- "chart": 109,- "song": "senpai",- "variation": "pico",- "difficulty": "hard",- "notes": 559,- "player_notes": 311,- "sha256": "3c2e744f3cecd6cb54c263ce2325334252407186e8e3214ba6923c21fdfbb724"- },- {- "chart": 110,- "song": "roses",- "variation": "default",- "difficulty": "easy",- "notes": 255,- "player_notes": 127,- "sha256": "31d2bb637ce92262acf594ed59cd0e0616592ab47b2916228bb830896c6dd93c"- },- {- "chart": 111,- "song": "roses",- "variation": "default",- "difficulty": "normal",- "notes": 382,- "player_notes": 191,- "sha256": "10d0c1b07671a08b3ba474cfddb065c7ca72bcaf6ba66a43844dc7bcf479106a"- },- {- "chart": 112,- "song": "roses",- "variation": "default",- "difficulty": "hard",- "notes": 465,- "player_notes": 234,- "sha256": "9b0356d40f01fc451c7a98de1cccb50d56e36e7adce8012b3dcfbc23dc94f192"- },- {- "chart": 113,- "song": "roses",- "variation": "erect",- "difficulty": "erect",- "notes": 720,- "player_notes": 365,- "sha256": "c4227c8e50281dc030972c446d4b2a2a0548d39647fbdca375d14a43706b2cc7"- },- {- "chart": 114,- "song": "roses",- "variation": "erect",- "difficulty": "nightmare",- "notes": 744,- "player_notes": 389,- "sha256": "98c1651a48770f4bbc47a9035cbaae8e28ea7ca17b58470b33770e87fcf0820c"- },- {- "chart": 115,- "song": "roses",- "variation": "pico",- "difficulty": "easy",- "notes": 562,- "player_notes": 188,- "sha256": "09306d0bcb755bd9900c2e466058632c67d7a5bbfcc4f6f802aa611bbd101e37"- },- {- "chart": 116,- "song": "roses",- "variation": "pico",- "difficulty": "normal",- "notes": 622,- "player_notes": 248,- "sha256": "08cbc7159a2f6766a5207a2a5e8af91c8823878cebb59799cb69a198b68b6464"- },- {- "chart": 117,- "song": "roses",- "variation": "pico",- "difficulty": "hard",- "notes": 641,- "player_notes": 267,- "sha256": "3c601cdedcb7dfcd879f9c94ca023022af40a5eb4254b44ef6664f8943343221"- },- {- "chart": 118,- "song": "thorns",- "variation": "default",- "difficulty": "easy",- "notes": 309,- "player_notes": 155,- "sha256": "0a42f5edb6791b2876a3e8bce7b015364b9063fd53233646c701d1f572645f51"- },- {- "chart": 119,- "song": "thorns",- "variation": "default",- "difficulty": "normal",- "notes": 417,- "player_notes": 210,- "sha256": "f66a28c88d70a9ba34bcbbbf43fde9abf5f992e9ffedf668ff85dd53e87f6ebf"- },- {- "chart": 120,- "song": "thorns",- "variation": "default",- "difficulty": "hard",- "notes": 557,- "player_notes": 280,- "sha256": "0877f792bd1568151bafb2398573fa76c0e722e365993a32598cb83ae09c1ca0"- },- {- "chart": 121,- "song": "thorns",- "variation": "erect",- "difficulty": "erect",- "notes": 859,- "player_notes": 491,- "sha256": "f7cf7ee99ea04d90b73fcd451a946ef592fc9b3bcedabbf2656f5700eacfca5f"- },- {- "chart": 122,- "song": "thorns",- "variation": "erect",- "difficulty": "nightmare",- "notes": 876,- "player_notes": 508,- "sha256": "4929b7aa1cc14ba5e4570c3142ef3183e616ce5e2a2b56d4bb2892270eaff0e6"- },- {- "chart": 123,- "song": "ugh",- "variation": "default",- "difficulty": "easy",- "notes": 284,- "player_notes": 135,- "sha256": "9e7082430a4ce677ad0be2ff9d21315cba429348a0b76650ea18468857bf8bcf"- },- {- "chart": 124,- "song": "ugh",- "variation": "default",- "difficulty": "normal",- "notes": 469,- "player_notes": 227,- "sha256": "d78bc95776f63692ef9daf35eda931b8cb7a262d7e73ba3e1881ec25b8eb02a7"- },- {- "chart": 125,- "song": "ugh",- "variation": "default",- "difficulty": "hard",- "notes": 525,- "player_notes": 254,- "sha256": "e9514394085472849c47f3c5e87d82fce7325ce9f2124be626a64d7e69a3d248"- },- {- "chart": 126,- "song": "ugh",- "variation": "erect",- "difficulty": "erect",- "notes": 673,- "player_notes": 362,- "sha256": "461c9202ccfdbdf77d337b4de7171f72479ae7f5407d5d3d8de1a74b30248f2f"- },- {- "chart": 127,- "song": "ugh",- "variation": "erect",- "difficulty": "nightmare",- "notes": 695,- "player_notes": 384,- "sha256": "6c134445c32bd61105a8324ef16c446a66fc48ad78e0f5f65b0533cd4bfeefc1"- },- {- "chart": 128,- "song": "ugh",- "variation": "pico",- "difficulty": "easy",- "notes": 543,- "player_notes": 237,- "sha256": "b0eb8e207957415cb9c311cb95c0055dc56cf90342bd41024b753b9142fe6914"- },- {- "chart": 129,- "song": "ugh",- "variation": "pico",- "difficulty": "normal",- "notes": 697,- "player_notes": 344,- "sha256": "ef3e9af009b77004723ec637c6902f78ba39fe07a093e22b68cf4b823e90f6dc"- },- {- "chart": 130,- "song": "ugh",- "variation": "pico",- "difficulty": "hard",- "notes": 781,- "player_notes": 428,- "sha256": "fade9887b8c9461bd22a8cf26456976a4b4b6dd150bcadfd27e4fb9feae92f7d"- },- {- "chart": 131,- "song": "guns",- "variation": "default",- "difficulty": "easy",- "notes": 488,- "player_notes": 247,- "sha256": "2ace2f2c4b5214ce586d912394aa7fb2a28ee1d65739f8fa3b452787d38a27dc"- },- {- "chart": 132,- "song": "guns",- "variation": "default",- "difficulty": "normal",- "notes": 766,- "player_notes": 388,- "sha256": "d81aa830c1ead0bb0533e9c87d6c575f4c76f3428ade289e4fe619ab4dec75b2"- },- {- "chart": 133,- "song": "guns",- "variation": "default",- "difficulty": "hard",- "notes": 903,- "player_notes": 456,- "sha256": "f38619b98003ed49f98e39408988a8406264640e85d731171053d1a1b157cf7a"- },- {- "chart": 134,- "song": "guns",- "variation": "pico",- "difficulty": "easy",- "notes": 796,- "player_notes": 303,- "sha256": "8ed05a09188f2727b11d2c658f8cc2696386802b4346484ab1a54077d2c1723d"- },- {- "chart": 135,- "song": "guns",- "variation": "pico",- "difficulty": "normal",- "notes": 890,- "player_notes": 397,- "sha256": "82a1802a556642d8516431b13b41cfa657eac10d7ae096e294b34c74c058290e"- },- {- "chart": 136,- "song": "guns",- "variation": "pico",- "difficulty": "hard",- "notes": 972,- "player_notes": 476,- "sha256": "d8e0fc0ba7f7f243cacd2264cbc331eeb6a71caa82d252523606dab67e09bea5"- },- {- "chart": 137,- "song": "stress",- "variation": "default",- "difficulty": "easy",- "notes": 715,- "player_notes": 264,- "sha256": "4f528280e15db8eb597fc5929b512d33deb3b7c63625f1ba70587432849ba82b"- },- {- "chart": 138,- "song": "stress",- "variation": "default",- "difficulty": "normal",- "notes": 830,- "player_notes": 379,- "sha256": "c5e9942a13d905d5df3761b2d24871239c390ccc261b3b28c84183f7c3c046b3"- },- {- "chart": 139,- "song": "stress",- "variation": "default",- "difficulty": "hard",- "notes": 905,- "player_notes": 453,- "sha256": "826a1abb9d0bcf73d1e325242206aae16a39ffc362088c3855cc32156530f39c"- },- {- "chart": 140,- "song": "stress",- "variation": "pico",- "difficulty": "easy",- "notes": 898,- "player_notes": 431,- "sha256": "53905d39b84c16a209063ae0b35859dbd0089ef87a624279bc5795c4d81ea2c0"- },- {- "chart": 141,- "song": "stress",- "variation": "pico",- "difficulty": "normal",- "notes": 954,- "player_notes": 487,- "sha256": "b2241979296366cabcb293c6b3081cbecaf791da9aa4464c53d09defa042ddee"- },- {- "chart": 142,- "song": "stress",- "variation": "pico",- "difficulty": "hard",- "notes": 1024,- "player_notes": 557,- "sha256": "5384c1891fc8edbcaa86cf59507a33bfb14d452e1823e394322d30953c5fe3a9"- },- {- "chart": 143,- "song": "darnell",- "variation": "default",- "difficulty": "easy",- "notes": 550,- "player_notes": 260,- "sha256": "937cce388f1de4e390f8af9df08662fd2510be32d07d43bb70ef7fc527a7c348"- },- {- "chart": 144,- "song": "darnell",- "variation": "default",- "difficulty": "normal",- "notes": 620,- "player_notes": 310,- "sha256": "f70e810c14105fe7e731f7a5ccc6ddd320d4952092037e1f89dcf1976c9d6e71"- },- {- "chart": 145,- "song": "darnell",- "variation": "default",- "difficulty": "hard",- "notes": 725,- "player_notes": 363,- "sha256": "808f48d9b51a73c7342da75f00f2399f814cde9951362ed3eb4c002e85fc055a"- },- {- "chart": 146,- "song": "darnell",- "variation": "erect",- "difficulty": "erect",- "notes": 917,- "player_notes": 451,- "sha256": "2555d3ccf6cbd527d6ab492ee45d6ab566b66edfcebe5697fa39f7b3a06ece0b"- },- {- "chart": 147,- "song": "darnell",- "variation": "erect",- "difficulty": "nightmare",- "notes": 978,- "player_notes": 512,- "sha256": "ceadb2355fa32f9f2245331487e9414a5449b0b7d34cb572a9768bc0fc6bd016"- },- {- "chart": 148,- "song": "darnell",- "variation": "bf",- "difficulty": "easy",- "notes": 637,- "player_notes": 284,- "sha256": "669ea4d05f2d84234f529d594cdf8272d2d78a49b7232a7bad314e836f55bfbc"- },- {- "chart": 149,- "song": "darnell",- "variation": "bf",- "difficulty": "normal",- "notes": 728,- "player_notes": 375,- "sha256": "e54b122e14abd76634bf345fae1dc1edbb7abe32b0c617cdc8f84e11ada2ea7d"- },- {- "chart": 150,- "song": "darnell",- "variation": "bf",- "difficulty": "hard",- "notes": 773,- "player_notes": 420,- "sha256": "180864e8179e48ce7837d8b231760c9bc220ee140f1452cc7ec89ee9dbdc9751"- },- {- "chart": 151,- "song": "lit-up",- "variation": "default",- "difficulty": "easy",- "notes": 663,- "player_notes": 301,- "sha256": "1328e851d804f36e1d040807f1f5aa0245554998d3465dc9af7116c544575555"- },- {- "chart": 152,- "song": "lit-up",- "variation": "default",- "difficulty": "normal",- "notes": 756,- "player_notes": 394,- "sha256": "19c72f0492a7a2757a2d88054b1ca08ce7be2ab43afa7969eef5dc7a2faf9d49"- },- {- "chart": 153,- "song": "lit-up",- "variation": "default",- "difficulty": "hard",- "notes": 830,- "player_notes": 468,- "sha256": "474a11c329d6713344046ee4291d4fb8d2a173dda2ad7fe6717d032f0c65a4b2"- },- {- "chart": 154,- "song": "lit-up",- "variation": "bf",- "difficulty": "easy",- "notes": 893,- "player_notes": 420,- "sha256": "dd97c7f79d02b34912176387e28b6e71fbdb185a3e189fb970b3440bf70a868e"- },- {- "chart": 155,- "song": "lit-up",- "variation": "bf",- "difficulty": "normal",- "notes": 982,- "player_notes": 509,- "sha256": "c22546d01c5d706d562f5b37dd131bc701ecea6c6652aaf7357c826e49c604b8"- },- {- "chart": 156,- "song": "lit-up",- "variation": "bf",- "difficulty": "hard",- "notes": 1072,- "player_notes": 599,- "sha256": "c80f63ffd2d8245f8427c41d812ae54e2aa1a7c3fb1825f3aad0b858590aafbb"- },- {- "chart": 157,- "song": "2hot",- "variation": "default",- "difficulty": "easy",- "notes": 821,- "player_notes": 371,- "sha256": "a6eff8698bca8537159af9493fa851fd469cb339b5a643fd6c1c7e07092aa608"- },- {- "chart": 158,- "song": "2hot",- "variation": "default",- "difficulty": "normal",- "notes": 906,- "player_notes": 456,- "sha256": "d46ba7382f98fed62f40029a20d20065ffc41993c016e234c97b9e622c973ce4"- },- {- "chart": 159,- "song": "2hot",- "variation": "default",- "difficulty": "hard",- "notes": 1035,- "player_notes": 585,- "sha256": "8d7c19f5a72fb04506207705a92c7648717b4f2057f169d3b7ee1488d78940a8"- },- {- "chart": 160,- "song": "blazin",- "variation": "default",- "difficulty": "easy",- "notes": 422,- "player_notes": 368,- "sha256": "948120d38ea695ca0396acee2cc778d05fbeb98256d0ee18502a2762f32459eb"- },- {- "chart": 161,- "song": "blazin",- "variation": "default",- "difficulty": "normal",- "notes": 426,- "player_notes": 372,- "sha256": "ab1ed50dce99f5e1a91665bd48eb839a746194a02a2655a8b752dd8a8872561a"- },- {- "chart": 162,- "song": "blazin",- "variation": "default",- "difficulty": "hard",- "notes": 440,- "player_notes": 386,- "sha256": "bb61753d6fb856be0bcd2d820e8619242f02cf17fe762c86c4157ea525841b2c"- },- {- "chart": 163,- "song": "spaghetti",- "variation": "default",- "difficulty": "easy",- "notes": 435,- "player_notes": 434,- "sha256": "0dd8723d94856e25ec1d6d765177383c144057f925c4dcb4605ee99934535314"- },- {- "chart": 164,- "song": "spaghetti",- "variation": "default",- "difficulty": "normal",- "notes": 559,- "player_notes": 558,- "sha256": "e7071f3232880f128f7deff4dc9504a4e453b2402010851e52fb0355c22003ba"- },- {- "chart": 165,- "song": "spaghetti",- "variation": "default",- "difficulty": "hard",- "notes": 707,- "player_notes": 706,- "sha256": "9ae21cee2ac2c62382145e3af0d61bd9c73eb8bff0174f109c3a02aaf4da46d8"- }- ],- "refs": {- "Funkin": "d05659bbdcf0d83073c900207cf410472afbbede",- "funkin.art": "429ab728b19272dca834c83d97b1646455b22579",- "funkin.assets": "724eba9de9e76761d9cefd52169926bc51c760a5"- }-}diff --git a/games/fnf/assets/model.json.zlib b/games/fnf/assets/model.json.zlibdeleted file mode 100644index d678de4b..00000000Binary files a/games/fnf/assets/model.json.zlib and /dev/null differdiff --git a/games/fnf/build.py b/games/fnf/build.pydeleted file mode 100644index 27459b54..00000000--- a/games/fnf/build.py+++ /dev/null@@ -1,83 +0,0 @@-#!/usr/bin/env python3-"""Build a standalone FridayNightFunkin .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,'-DEPSILON_XL=1','-Os','-Wall','-Wextra','-Werror','-Wno-misleading-indentation','-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','inflate','save','render','font','data'):- 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/'fnf-debug.nwa','--ld',arm('ld')])- run([sys.executable,packer,'release',OUT/'fnf-debug.nwa',OUT/'fnf.nwa','--objcopy',arm('objcopy')])- for name in ('fnf','fnf-debug'):- run([*nw,'nwa-bin',OUT/(name+'.nwa'),OUT/(name+'.bin'),'--ram-length','107674'])- installed = (OUT/'fnf.bin').read_bytes()- assert len(installed)<=2031616, 'App exceeds the shared model flash budget'- assert installed == (OUT/'fnf-debug.bin').read_bytes(), 'Release changes installed bytes'- apps = REPO/'build/apps';apps.mkdir(parents=True,exist_ok=True)- shutil.copyfile(OUT/'fnf.nwa',apps/'FridayNightFunkin.nwa')- elf=(OUT/('fnf-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/'fnf.nwa').read_bytes()).hexdigest(), nwa_bytes=(OUT/'fnf.nwa').stat().st_size, installed_bytes=len(installed),- release_installed_matches_debug=True, artifact=str(apps/'FridayNightFunkin.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/fnf/docs/freeplay.png b/games/fnf/docs/freeplay.pngdeleted file mode 100644index 2f0884b0..00000000Binary files a/games/fnf/docs/freeplay.png and /dev/null differdiff --git a/games/fnf/docs/gameplay.png b/games/fnf/docs/gameplay.pngdeleted file mode 100644index 97a3b75a..00000000Binary files a/games/fnf/docs/gameplay.png and /dev/null differdiff --git a/games/fnf/docs/menu.png b/games/fnf/docs/menu.pngdeleted file mode 100644index 29fe6ae4..00000000Binary files a/games/fnf/docs/menu.png and /dev/null differdiff --git a/games/fnf/src/app.c b/games/fnf/src/app.cnew file mode 100644index 00000000..c0f15e7d--- /dev/null+++ b/games/fnf/src/app.c@@ -0,0 +1,65 @@+/* The songs on offer (app.h): story mode plays a week's songs as the game made them (the default variation, or the+ * Erect one for Erect and Nightmare); freeplay lists Boyfriend's songs or Pico's, as the game's two freeplay+ * characters do (data/players: the characters each one owns). */+#include "app.h"++const char *const DIFF_NAME[FNF_DIFFS] = {"EASY", "NORMAL", "HARD", "ERECT", "NIGHTMARE"};++int app_owner(unsigned chr) {+ if (chr >= FNF_CHARS) return 0;+ return fnf_char[chr].flags & FNF_CHAR_BF ? 1 : fnf_char[chr].flags & FNF_CHAR_PICO ? 2 : 0;+}++static int chart_in(const fnf_var_t *v, int diff) {+ for (int c = v->chart; c < v->chart + v->ncharts; c++)+ if (fnf_chart[c].diff == diff) return c;+ return -1;+}++int app_chart(unsigned song, int list, int diff) {+ if (song >= FNF_SONGS) return -1;+ const fnf_song_t *s = &fnf_song[song];+ for (int i = s->var; i < s->var + s->nvar; i++) {+ const fnf_var_t *v = &fnf_var[i];+ int owner = app_owner(v->chr[0]);+ /* Boyfriend's list has his songs and those of nobody's characters (LE SSERAFIM's), Pico's has his */+ if (list == LIST_PICO ? owner != 2 : owner == 2) continue;+ int c = chart_in(v, diff);+ if (c >= 0) return c;+ }+ return -1;+}++int app_story_chart(unsigned song, int diff) {+ if (song >= FNF_SONGS) return -1;+ const fnf_song_t *s = &fnf_song[song];+ for (int i = s->var; i < s->var + s->nvar; i++) {+ const fnf_var_t *v = &fnf_var[i];+ if (v->kind != FNF_VAR_DEFAULT && v->kind != FNF_VAR_ERECT) continue;+ int c = chart_in(v, diff);+ if (c >= 0) return c;+ }+ return -1;+}++/* Level.getDifficulties: those every song of the week has */+unsigned app_story_diffs(unsigned level) {+ unsigned bits = 0;+ for (int d = 0; d < FNF_DIFFS; d++) {+ bool all = true;+ for (int i = 0; i < fnf_level[level].n; i++)+ if (app_story_chart(fnf_level[level].song[i], d) < 0) all = false;+ if (all) bits |= 1u << d;+ }+ return bits ? bits : 1u << FNF_DIFF_NORMAL;+}++void app_build_list(app_t *a) {+ a->list_n = 0;+ for (unsigned s = 0; s < FNF_SONGS; s++)+ for (int d = 0; d < FNF_DIFFS; d++)+ if (app_chart(s, a->p->list, d) >= 0) {+ a->list[a->list_n++] = (uint8_t)s;+ break;+ }+}diff --git a/games/fnf/src/app.h b/games/fnf/src/app.hnew file mode 100644index 00000000..248c66f7--- /dev/null+++ b/games/fnf/src/app.h@@ -0,0 +1,44 @@+/* The app: its screens (main.c moves between them, screens.c draws them). */+#ifndef FNF_APP_H+#define FNF_APP_H+#include "game.h"+#include "save.h"++enum { V_TITLE, V_MAIN, V_STORY, V_FREEPLAY, V_OPTIONS, V_HELP, V_CREDITS, V_PLAY, V_PAUSE, V_QUIT, V_RESULTS,+ V_GAMEOVER, V_ERROR };+enum { MAIN_STORY, MAIN_FREEPLAY, MAIN_OPTIONS, MAIN_HELP, MAIN_CREDITS, MAIN_COUNT };+enum { PAUSE_RESUME, PAUSE_RESTART, PAUSE_EXIT, PAUSE_OPTIONS, PAUSE_HELP, PAUSE_QUIT, PAUSE_COUNT };+enum { OPT_DOWNSCROLL, OPT_OFFSET, OPT_COUNT };+#define HELP_PAGES 3+enum { LIST_BF, LIST_PICO };++typedef struct {+ uint8_t view, under; /* the screen, and what a pause, options or how to play sits on */+ uint8_t sel; /* the menu's choice */+ uint8_t page, first_run; /* how to play; first_run: before the first song (OK starts it) */+ uint8_t story, story_song; /* a week being played, and which of its songs */+ uint8_t list_n; /* freeplay: the songs in the list */+ uint8_t list[FNF_SONGS];+ int32_t campaign; /* the week's score so far */+ uint16_t week_tally[5], week_total, week_max_combo;+ uint8_t result_rank, result_new; /* the results screen: its rank, a new best */+ int32_t result_score, result_completion;+ uint16_t result_tally[5], result_total, result_max_combo;+ uint32_t clock; /* ms, for the menus' beat */+ uint32_t menu_at; /* when the screen came up */+ uint32_t play_t0; /* when the song's screen came up (its arrows fade in) */+ fnf_progress_t *p;+ fnf_game_t *g;+} app_t;++/* the songs and charts on offer */+int app_owner(unsigned chr); /* 0 nobody's, 1 Boyfriend's, 2 Pico's */+int app_chart(unsigned song, int list, int diff); /* freeplay: a chart, or -1 */+int app_story_chart(unsigned song, int diff); /* story mode: a chart, or -1 */+unsigned app_story_diffs(unsigned level); /* the difficulties a week has (bits) */+void app_build_list(app_t *a);++void screens_draw(app_t *a);+const char *app_keys(const app_t *a);+extern const char *const DIFF_NAME[FNF_DIFFS];+#endifdiff --git a/games/fnf/src/data.h b/games/fnf/src/data.hindex 92b5ccd4..4ba65fe5 100644--- a/games/fnf/src/data.h+++ b/games/fnf/src/data.h@@ -1,29 +1,126 @@+/* The game's charts and pictures, as tools/data.py packs them from the Funkin' Crew's files (data.c and ids.h are+ * made at build time, in the build folder: they are not in this repository). */#ifndef FNF_DATA_H#define FNF_DATA_H#include <stdint.h>#include "ids.h"-#define NONE 65535u-typedef struct { uint32_t offset,size; uint16_t w,h,palette; int16_t ox,oy; uint8_t compressed; } Sprite;-typedef struct { uint16_t frame[4],name; uint8_t count; } Animation;-typedef struct { const char *name; uint16_t first,count,idle,dance,sing[4],miss[4],icon[2],sing_time; } Character;-typedef struct { int32_t time; float bpm,beat; } Tempo;-typedef struct { int32_t time; float value,duration; int16_t a,b,c; uint16_t kind; } Event;-typedef struct { uint32_t offset,bytes; int32_t end; uint16_t count,players,track; uint8_t difficulty; float speed; } Chart;-typedef struct { uint16_t song,first,count,stage,character[6],tempo_first,tempo_count,event_first,event_count; uint8_t variant; } Track;-typedef struct { const char *name; uint16_t first,count; } Song;-typedef struct { const char *name; uint16_t song[4]; uint8_t count; } Level;-extern const Sprite sprites[SPRITE_COUNT];-extern const uint16_t palettes[PALETTE_COUNT][16],stage_sprites[STAGE_COUNT],ui_notes[4][4];-extern const uint8_t art_pixels[ART_BYTES],note_bytes[NOTE_BYTES];-extern const Animation animations[ANIMATION_COUNT];-extern const uint16_t beautiful_animation[ANIMATION_COUNT];-extern const Character characters[CHARACTER_COUNT];-extern const uint16_t kind_anim[CHARACTER_COUNT][KIND_COUNT][4];-extern const Tempo tempos[TEMPO_COUNT];-extern const Event events[EVENT_COUNT];-extern const Chart charts[CHART_COUNT];-extern const Track tracks[TRACK_COUNT];-extern const Song songs[SONG_COUNT];-extern const Level levels[LEVEL_COUNT];-extern const char *const difficulties[5],*const variants[4];++#define FNF_NONE 0xFFFF++/* A picture: 4 bits a pixel (0 transparent, unless it's a stage's background), rows of (w + 1) / 2 bytes,+ * DEFLATE-packed at fnf_blob + at; (x, y): its top left from its anchor (a character's feet, a note's middle). */+typedef struct {+ uint16_t w, h;+ int16_t x, y;+ uint16_t pal, flags;+ uint32_t at, size;+} fnf_sprite_t;++/* An animation: n frames (sprites sprite.. sprite + n - 1), frame i shown from the original's frame at[i]+ * (of len, at fps). */+enum { FNF_AF_LOOP = 1, FNF_AF_SING = 2, FNF_AF_MISS = 4, FNF_AF_DANCE = 8 };+typedef struct {+ uint16_t sprite;+ uint8_t n, len, fps, flags;+ uint8_t at[6];+} fnf_anim_t;++enum { FNF_SLOT_DANCE_L, FNF_SLOT_DANCE_R, FNF_SLOT_SING, FNF_SLOT_MISS = FNF_SLOT_SING + 4, FNF_SLOTS = FNF_SLOT_MISS + 4 };+enum { FNF_CHAR_ALTERNATE = 1, FNF_CHAR_PIXEL = 2, FNF_CHAR_BF = 4, FNF_CHAR_PICO = 8, FNF_CHAR_ICON_FLIP = 16 };+/* A character: its animations fnf_anim[anim .. anim + count - 1] (their names: fnf_anim_name), which of them dance,+ * sing and miss (slot: an animation of its own, 255 none); it dances every `dance` steps and stops singing after+ * `sing` steps. */+typedef struct {+ uint16_t anim;+ uint8_t count, dance, sing, flags, icon;+ uint8_t slot[FNF_SLOTS];+ uint16_t frame_max; /* its biggest frame, unpacked (bytes) */+} fnf_char_t;++/* A note kind a character sings its own way: the animation for each direction (255: the usual one, 254: none). */+typedef struct {+ uint8_t chr, kind;+ uint8_t anim[4];+} fnf_kind_t;++/* A stage: its background (320x240), the pictures in front of the characters (after the first, second and third of+ * them in `order`, FNF_NONE none), where the player's, the opponent's and Girlfriend's feet are on the screen (and+ * LE SSERAFIM's other members'), and its scale (world units to pixels, x 10000). */+typedef struct {+ uint16_t bg, front[3];+ int16_t feet[3][2], extra[3][2];+ uint8_t order[3];+ uint16_t scale;+} fnf_stage_t;++/* A change of tempo: from time t (us), a step lasts step / 256 us; steps0: the steps before it (16.16). */+typedef struct {+ int32_t t;+ uint32_t step;+ int32_t steps0;+} fnf_tempo_t;++/* A song event (FNF_EV_...). */+typedef struct {+ int32_t t;+ uint8_t type, a, b, c;+ int32_t v, d;+} fnf_event_t;++/* A chart: one difficulty of a variation; its notes DEFLATE-packed (raw bytes once unpacked): per note, LEB128+ * numbers: the time since the last note (us), lane (0-3 the player's, 4-7 the opponent's) | hold << 3 | kind << 4,+ * and for a hold its length (us). total: the player's notes that count; speed: scroll speed x 1000. */+typedef struct {+ uint16_t var;+ uint8_t diff, pad;+ uint32_t at;+ uint16_t size, raw, notes, total, speed;+} fnf_chart_t;++enum { FNF_DIFF_EASY, FNF_DIFF_NORMAL, FNF_DIFF_HARD, FNF_DIFF_ERECT, FNF_DIFF_NIGHTMARE, FNF_DIFFS };+enum { FNF_VAR_DEFAULT, FNF_VAR_ERECT, FNF_VAR_PICO, FNF_VAR_BF };+/* A variation of a song: its stage, note style (0 Funkin', 1 pixel), characters (player, opponent, Girlfriend;+ * 255 none), tempo, events, charts and length (ms). extra: LE SSERAFIM's other three members; flags:+ * FNF_VF_OPPONENT_AT_GF (Girlfriend sings against you, from her place: the Tutorial), FNF_VF_SOLO (only your arrows,+ * in the middle: Blazin', as its script does). */+enum { FNF_VF_OPPONENT_AT_GF = 1, FNF_VF_SOLO = 2 };+typedef struct {+ uint8_t song, kind, stage, style;+ uint8_t chr[3], extra;+ uint16_t tempo, ntempo, event, nevent, chart;+ uint8_t ncharts, flags;+ uint32_t length;+} fnf_var_t;++typedef struct {+ const char *name;+ uint8_t level, var, nvar, icon;+} fnf_song_t;++typedef struct {+ const char *name;+ uint8_t song[4], n;+} fnf_level_t;++/* A letter of the menus' bold font: its sprite (FNF_NONE: none) and how far it moves the pen. */+typedef struct {+ uint16_t sprite, advance;+} fnf_glyph_t;++extern const uint16_t fnf_palette[FNF_PALETTES][16];+extern const fnf_sprite_t fnf_sprite[FNF_SPRITES];+extern const fnf_anim_t fnf_anim[FNF_ANIMS];+extern const uint8_t fnf_anim_name[FNF_ANIMS];+extern const fnf_char_t fnf_char[FNF_CHARS];+extern const fnf_kind_t fnf_kind[FNF_KINDS];+extern const uint16_t fnf_icon[FNF_ICONS][3];+extern const fnf_stage_t fnf_stage[FNF_STAGES];+extern const fnf_tempo_t fnf_tempo[FNF_TEMPOS];+extern const fnf_event_t fnf_event[FNF_EVENTS];+extern const fnf_chart_t fnf_chart[FNF_CHARTS];+extern const fnf_var_t fnf_var[FNF_VARS];+extern const fnf_song_t fnf_song[FNF_SONGS];+extern const fnf_level_t fnf_level[FNF_LEVELS];+extern const fnf_glyph_t fnf_bold[95];+extern const uint8_t fnf_blob[FNF_BLOB];#endifdiff --git a/games/fnf/src/draw.c b/games/fnf/src/draw.cnew file mode 100644index 00000000..a814a4d0--- /dev/null+++ b/games/fnf/src/draw.c@@ -0,0 +1,540 @@+/* Pictures and the song's screen (draw.h). The game's 1280 x 720 screen is drawn at a quarter across and a third+ * down: the notes cross the screen in the same time as in the game. */+#include <math.h>+#include <string.h>+#include "draw.h"+#include "inflate.h"++void plat_push(int x, int y, int w, int h, const uint16_t *px);+void np_push(int x, int y, int w, int h, const color_t *px) { plat_push(x, y, w, h, px); }++/* ------------------------------------------------------------------------------------------------ RAM */+/* the bold letters (kept), then a song's or the menus' pictures */+#define POOL (FNF_BOLD_BYTES + FNF_CAST_MAX + FNF_HUD_MAX + 2 * FNF_ICON_MAX + FNF_TRANSIENT_MAX + 1024)+static uint8_t bg_px[FNF_BG_BYTES];+static uint8_t pool[POOL];+static uint32_t used, base;+static color_t *strip; /* (on main's stack: draw_strip_buffer) */+void draw_strip_buffer(color_t *p) { strip = p; }++void ram_reset(void) { used = base; }++uint8_t *ram_take(uint32_t n) {+ n = (n + 3) & ~3u;+ if (used + n > POOL) return 0;+ uint8_t *p = pool + used;+ used += n;+ return p;+}++uint8_t *bg_pixels(void) { return bg_px; }++bool pic_load(pic_t *p, unsigned id, uint8_t *dst, uint32_t cap) {+ if (id >= FNF_SPRITES || !dst) return false;+ const fnf_sprite_t *s = &fnf_sprite[id];+ uint32_t stride = (s->w + 1u) / 2, n = stride * s->h;+ if (n > cap || fnf_inflate(fnf_blob + s->at, s->size, dst, cap) != (int32_t)n) return false;+ p->id = (uint16_t)id, p->w = s->w, p->h = s->h, p->stride = (uint16_t)stride, p->x = s->x, p->y = s->y;+ p->pal = fnf_palette[s->pal], p->px = dst;+ return true;+}++bool pic_new(pic_t *p, unsigned id) {+ if (id >= FNF_SPRITES) return false;+ const fnf_sprite_t *s = &fnf_sprite[id];+ uint32_t n = (s->w + 1u) / 2 * s->h;+ uint8_t *d = ram_take(n);+ return d && pic_load(p, id, d, n);+}++static pic_t bg;+bool bg_load(unsigned id) { return pic_load(&bg, id, bg_px, sizeof bg_px) && bg.w == SCREEN_W && bg.h == SCREEN_H; }++/* ------------------------------------------------------------------------------------------------ drawing */+void push_strip(void) { np_push(0, gfx_y0, SCREEN_W, gfx_y1 - gfx_y0, gfx_buf); }++void blit(const pic_t *p, int x, int y, int alpha, bool flip_y) {+ if (!p->px || alpha <= 0) return;+ int y0 = y < gfx_y0 ? gfx_y0 : y, y1 = y + p->h > gfx_y1 ? gfx_y1 : y + p->h;+ int x0 = x < 0 ? 0 : x, x1 = x + p->w > SCREEN_W ? SCREEN_W : x + p->w;+ if (y0 >= y1 || x0 >= x1) return;+ const uint16_t *pal = p->pal;+ for (int r = y0; r < y1; r++) {+ int sy = flip_y ? p->h - 1 - (r - y) : r - y;+ const uint8_t *src = p->px + sy * p->stride;+ color_t *dst = gfx_buf + (r - gfx_y0) * SCREEN_W;+ for (int c = x0; c < x1; c++) {+ int sx = c - x;+ unsigned v = src[sx >> 1];+ if (!v) { /* two clear pixels */+ if (!(sx & 1)) c++;+ continue;+ }+ v = sx & 1 ? v >> 4 : v & 15;+ if (!v) continue;+ dst[c] = alpha >= 32 ? pal[v] : gfx_mix(dst[c], pal[v], alpha);+ }+ }+}++void blit_at(const pic_t *p, int ax, int ay, int alpha) { blit(p, ax + p->x, ay + p->y, alpha, false); }++void blit_tinted(const pic_t *p, int x, int y, color_t tint, int t32) {+ if (!p->px) return;+ int y0 = y < gfx_y0 ? gfx_y0 : y, y1 = y + p->h > gfx_y1 ? gfx_y1 : y + p->h;+ int x0 = x < 0 ? 0 : x, x1 = x + p->w > SCREEN_W ? SCREEN_W : x + p->w;+ for (int r = y0; r < y1; r++) {+ const uint8_t *src = p->px + (r - y) * p->stride;+ color_t *dst = gfx_buf + (r - gfx_y0) * SCREEN_W;+ for (int c = x0; c < x1; c++) {+ int sx = c - x;+ unsigned v = src[sx >> 1];+ v = sx & 1 ? v >> 4 : v & 15;+ if (v) dst[c] = gfx_mix(p->pal[v], tint, t32);+ }+ }+}++static void blit_scaled_flip(const pic_t *p, int x, int y, int w, int h, int alpha, bool flip);+void blit_scaled(const pic_t *p, int x, int y, int w, int h, int alpha) { blit_scaled_flip(p, x, y, w, h, alpha, false); }+static void blit_scaled_flip(const pic_t *p, int x, int y, int w, int h, int alpha, bool flip) {+ if (!p->px || w <= 0 || h <= 0 || alpha <= 0) return;+ int y0 = y < gfx_y0 ? gfx_y0 : y, y1 = y + h > gfx_y1 ? gfx_y1 : y + h;+ int x0 = x < 0 ? 0 : x, x1 = x + w > SCREEN_W ? SCREEN_W : x + w;+ for (int r = y0; r < y1; r++) {+ int sy = (r - y) * p->h / h;+ const uint8_t *src = p->px + sy * p->stride;+ color_t *dst = gfx_buf + (r - gfx_y0) * SCREEN_W;+ for (int c = x0; c < x1; c++) {+ int sx = (c - x) * p->w / w;+ if (flip) sx = p->w - 1 - sx;+ unsigned v = src[sx >> 1];+ v = sx & 1 ? v >> 4 : v & 15;+ if (v) dst[c] = alpha >= 32 ? p->pal[v] : gfx_mix(dst[c], p->pal[v], alpha);+ }+ }+}++/* the background, 16 colours (darkened by dark1000 thousandths), zoomed round the screen's middle */+void draw_bg(const uint16_t *pal, int dark1000, float zoom) {+ color_t lut[16];+ int t = dark1000 * 32 / 1000;+ for (int i = 0; i < 16; i++) lut[i] = t > 0 ? gfx_mix(pal[i], 0, t) : pal[i];+ if (zoom <= 1.0005f) {+ for (int r = gfx_y0; r < gfx_y1; r++) {+ const uint8_t *src = bg_px + r * (SCREEN_W / 2);+ uint32_t *dst = (uint32_t *)(gfx_buf + (r - gfx_y0) * SCREEN_W);+ for (int i = 0; i < SCREEN_W / 2; i++) {+ unsigned v = src[i];+ dst[i] = lut[v & 15] | (uint32_t)lut[v >> 4] << 16;+ }+ }+ return;+ }+ int32_t step = (int32_t)(65536.0f / zoom);+ int32_t sx0 = (int32_t)((160.0f - 160.0f / zoom) * 65536.0f);+ for (int r = gfx_y0; r < gfx_y1; r++) {+ int sy = (int)(120.0f + (r - 120) / zoom);+ sy = sy < 0 ? 0 : sy > SCREEN_H - 1 ? SCREEN_H - 1 : sy;+ const uint8_t *src = bg_px + sy * (SCREEN_W / 2);+ color_t *dst = gfx_buf + (r - gfx_y0) * SCREEN_W;+ int32_t sx = sx0;+ for (int c = 0; c < SCREEN_W; c++, sx += step) {+ int x = sx >> 16;+ unsigned v = src[x >> 1];+ dst[c] = lut[x & 1 ? v >> 4 : v & 15];+ }+ }+}++/* ------------------------------------------------------------------------------------------------ the bold font */+static pic_t bold[95];+static bool bold_ready;++bool bold_load(void) {+ used = base = 0;+ bold_ready = true;+ for (int i = 0; i < 95; i++) {+ bold[i].px = 0;+ for (int j = 0; j < i && !bold[i].px; j++) /* (lower case: the same letters as the capitals) */+ if (fnf_bold[j].sprite == fnf_bold[i].sprite) bold[i] = bold[j];+ if (!bold[i].px && fnf_bold[i].sprite != FNF_NONE && !pic_new(&bold[i], fnf_bold[i].sprite)) bold_ready = false;+ }+ base = used;+ return bold_ready;+}++int bold_width(const char *s, int scale256) {+ int w = 0;+ for (; *s; s++) {+ unsigned c = (unsigned char)*s;+ if (c >= 32 && c < 127) w += fnf_bold[c - 32].advance;+ }+ return w * scale256 / 256;+}++void bold_text(int x, int y, const char *s, int alpha, int scale256) {+ for (; *s; s++) {+ unsigned c = (unsigned char)*s;+ if (c < 32 || c >= 127) continue;+ const pic_t *g = &bold[c - 32];+ if (g->px) {+ if (scale256 == 256) blit(g, x + g->x, y + g->y, alpha, false);+ else blit_scaled(g, x + g->x * scale256 / 256, y + g->y * scale256 / 256, g->w * scale256 / 256,+ g->h * scale256 / 256, alpha);+ }+ x += fnf_bold[c - 32].advance * scale256 / 256;+ }+}++/* ------------------------------------------------------------------------------------------------ the song */+#define HUD_X(x) ((x) / 4) /* the game's HUD, 1280 x 720 */+#define HUD_Y(y) ((y) / 3)+#define PX_PER_MS 0.15f /* Constants.PIXELS_PER_MS (0.45) a third down */++static struct {+ pic_t actor[FNF_ACTORS]; /* each character's frame now */+ uint32_t actor_cap[FNF_ACTORS];+ pic_t front[3];+ pic_t note[4], strum[3][4], hold[4], end[4], rating[4], digit[10];+ pic_t icon[2][3];+ uint8_t icon_id[2];+ pic_t trans; /* the countdown's picture, or the four splashes */+ pic_t splash[4];+ uint8_t *trans_px;+ uint16_t splash_id[4];+ bool splashes;+ bool ok;+} S;++static const uint16_t *sprite_pal(unsigned id) { return fnf_palette[fnf_sprite[id].pal]; }++static bool style_pic(pic_t *p, const uint16_t *ids, int i) { return pic_new(p, ids[i]); }++#define STYLE(name) (g->style ? FNF_SPR_PIXEL_##name : FNF_SPR_FUNKIN_##name)++static bool load_icons(const fnf_game_t *g, int who) {+ S.icon_id[who] = g->icon[who];+ for (int f = 0; f < 3; f++) {+ unsigned id = fnf_icon[g->icon[who]][f];+ if (!S.icon[who][f].px) return false;+ uint32_t cap = FNF_ICON_MAX / 3;+ if (!pic_load(&S.icon[who][f], id, S.icon[who][f].px, cap)) return false;+ }+ return true;+}++void play_icons(const fnf_game_t *g) {+ for (int w = 0; w < 2; w++)+ if (S.icon_id[w] != g->icon[w]) load_icons(g, w);+}++bool play_load(const fnf_game_t *g) {+ const fnf_var_t *v = &fnf_var[g->var];+ const fnf_stage_t *st = &fnf_stage[v->stage];+ memset(&S, 0, sizeof S);+ ram_reset();+ bool ok = bg_load(st->bg);+ for (int i = 0; i < FNF_ACTORS; i++) {+ const fnf_actor_t *a = &g->actor[i];+ if (a->chr == 255) continue;+ S.actor_cap[i] = fnf_char[a->chr].frame_max;+ S.actor[i].px = ram_take(S.actor_cap[i]);+ S.actor[i].id = FNF_NONE;+ ok &= S.actor[i].px != 0;+ }+ for (int k = 0; k < 3; k++)+ if (st->front[k] != FNF_NONE) ok &= pic_new(&S.front[k], st->front[k]);+ static const uint16_t funkin[] = {+ FNF_SPR_FUNKIN_NOTE0, FNF_SPR_FUNKIN_NOTE1, FNF_SPR_FUNKIN_NOTE2, FNF_SPR_FUNKIN_NOTE3,+ FNF_SPR_FUNKIN_STATIC0, FNF_SPR_FUNKIN_STATIC1, FNF_SPR_FUNKIN_STATIC2, FNF_SPR_FUNKIN_STATIC3,+ FNF_SPR_FUNKIN_PRESS0, FNF_SPR_FUNKIN_PRESS1, FNF_SPR_FUNKIN_PRESS2, FNF_SPR_FUNKIN_PRESS3,+ FNF_SPR_FUNKIN_CONFIRM0, FNF_SPR_FUNKIN_CONFIRM1, FNF_SPR_FUNKIN_CONFIRM2, FNF_SPR_FUNKIN_CONFIRM3,+ FNF_SPR_FUNKIN_HOLD0, FNF_SPR_FUNKIN_HOLD1, FNF_SPR_FUNKIN_HOLD2, FNF_SPR_FUNKIN_HOLD3,+ FNF_SPR_FUNKIN_END0, FNF_SPR_FUNKIN_END1, FNF_SPR_FUNKIN_END2, FNF_SPR_FUNKIN_END3,+ FNF_SPR_FUNKIN_SICK, FNF_SPR_FUNKIN_GOOD, FNF_SPR_FUNKIN_BAD, FNF_SPR_FUNKIN_SHIT,+ FNF_SPR_FUNKIN_NUM0, FNF_SPR_FUNKIN_NUM1, FNF_SPR_FUNKIN_NUM2, FNF_SPR_FUNKIN_NUM3, FNF_SPR_FUNKIN_NUM4,+ FNF_SPR_FUNKIN_NUM5, FNF_SPR_FUNKIN_NUM6, FNF_SPR_FUNKIN_NUM7, FNF_SPR_FUNKIN_NUM8, FNF_SPR_FUNKIN_NUM9,+ FNF_SPR_FUNKIN_SPLASH0_0, FNF_SPR_FUNKIN_SPLASH1_0, FNF_SPR_FUNKIN_SPLASH2_0, FNF_SPR_FUNKIN_SPLASH3_0};+ static const uint16_t pixel[] = {+ FNF_SPR_PIXEL_NOTE0, FNF_SPR_PIXEL_NOTE1, FNF_SPR_PIXEL_NOTE2, FNF_SPR_PIXEL_NOTE3,+ FNF_SPR_PIXEL_STATIC0, FNF_SPR_PIXEL_STATIC1, FNF_SPR_PIXEL_STATIC2, FNF_SPR_PIXEL_STATIC3,+ FNF_SPR_PIXEL_PRESS0, FNF_SPR_PIXEL_PRESS1, FNF_SPR_PIXEL_PRESS2, FNF_SPR_PIXEL_PRESS3,+ FNF_SPR_PIXEL_CONFIRM0, FNF_SPR_PIXEL_CONFIRM1, FNF_SPR_PIXEL_CONFIRM2, FNF_SPR_PIXEL_CONFIRM3,+ FNF_SPR_PIXEL_HOLD0, FNF_SPR_PIXEL_HOLD1, FNF_SPR_PIXEL_HOLD2, FNF_SPR_PIXEL_HOLD3,+ FNF_SPR_PIXEL_END0, FNF_SPR_PIXEL_END1, FNF_SPR_PIXEL_END2, FNF_SPR_PIXEL_END3,+ FNF_SPR_PIXEL_SICK, FNF_SPR_PIXEL_GOOD, FNF_SPR_PIXEL_BAD, FNF_SPR_PIXEL_SHIT,+ FNF_SPR_PIXEL_NUM0, FNF_SPR_PIXEL_NUM1, FNF_SPR_PIXEL_NUM2, FNF_SPR_PIXEL_NUM3, FNF_SPR_PIXEL_NUM4,+ FNF_SPR_PIXEL_NUM5, FNF_SPR_PIXEL_NUM6, FNF_SPR_PIXEL_NUM7, FNF_SPR_PIXEL_NUM8, FNF_SPR_PIXEL_NUM9,+ FNF_SPR_PIXEL_SPLASH0_0, FNF_SPR_PIXEL_SPLASH1_0, FNF_SPR_PIXEL_SPLASH2_0, FNF_SPR_PIXEL_SPLASH3_0};+ const uint16_t *ids = g->style ? pixel : funkin;+ for (int d = 0; d < 4; d++) {+ ok &= style_pic(&S.note[d], ids, d);+ for (int s = 0; s < 3; s++) ok &= style_pic(&S.strum[s][d], ids, 4 + 4 * s + d);+ ok &= style_pic(&S.hold[d], ids, 16 + d);+ ok &= style_pic(&S.end[d], ids, 20 + d);+ ok &= style_pic(&S.rating[d], ids, 24 + d);+ S.splash_id[d] = ids[38 + d];+ }+ for (int n = 0; n < 10; n++) ok &= style_pic(&S.digit[n], ids, 28 + n);+ for (int w = 0; w < 2; w++)+ for (int f = 0; f < 3; f++) {+ S.icon[w][f].px = ram_take(FNF_ICON_MAX / 3);+ ok &= S.icon[w][f].px != 0;+ }+ ok &= load_icons(g, 0) && load_icons(g, 1);+ S.trans_px = ram_take(FNF_TRANSIENT_MAX);+ S.trans.id = FNF_NONE;+ ok &= S.trans_px != 0;+ S.ok = ok;+ (void)sprite_pal;+ return ok;+}++/* the countdown's picture and the splashes take turns in the same RAM */+static void trans_show(unsigned id) {+ if (S.trans.id == id && S.trans.px) return;+ S.splashes = false;+ if (!pic_load(&S.trans, id, S.trans_px, FNF_TRANSIENT_MAX)) S.trans.px = 0, S.trans.id = FNF_NONE;+}++static bool splashes_show(void) {+ if (S.splashes) return true;+ S.trans.id = FNF_NONE;+ uint32_t at = 0;+ for (int d = 0; d < 4; d++) {+ const fnf_sprite_t *s = &fnf_sprite[S.splash_id[d]];+ uint32_t n = (s->w + 1u) / 2 * s->h;+ if (!pic_load(&S.splash[d], S.splash_id[d], S.trans_px + at, FNF_TRANSIENT_MAX - at)) return false;+ at += n;+ }+ return S.splashes = true;+}++static float ease_cube_in_out(float x) { return x < 0.5f ? 4 * x * x * x : 1 - powf(-2 * x + 2, 3) / 2; }+static float ease_circ_out(float x) { return sqrtf(1 - (x - 1) * (x - 1)); }++/* a camera bop's leftover: lerp(1, m, 0.95^(dt x 60)) (PlayState.update) */+static float decay(int32_t dt) { return dt <= 0 ? 1.0f : powf(0.95f, dt * 60e-6f); }++static int hud_tx(int x, float z) { return (int)lroundf(160 + (x - 160) * z); }+static int hud_ty(int y, float z) { return (int)lroundf(120 + (y - 120) * z); }++static color_t RED, GREEN, BLACK;++typedef struct {+ const fnf_game_t *g;+ bool down;+ int32_t since;+ float cam, hud;+} scene_t;++static void strip_scene(const scene_t *sc) {+ const fnf_game_t *g = sc->g;+ const fnf_var_t *v = &fnf_var[g->var];+ const fnf_stage_t *st = &fnf_stage[v->stage];+ int32_t now = g->now;+ /* LE SSERAFIM's dimming */+ int dark = 0;+ if (g->dark_t1 > g->dark_t0 || g->dark_to) {+ float x = g->dark_t1 > g->dark_t0 ? (float)(now - g->dark_t0) / (float)(g->dark_t1 - g->dark_t0) : 1;+ x = x < 0 ? 0 : x > 1 ? 1 : x;+ x = -(cosf(3.14159265f * x) - 1) / 2; /* sineInOut */+ dark = (int)(g->dark_from + (g->dark_to - g->dark_from) * x);+ }+ float z = sc->cam;+ draw_bg(bg.pal, dark, z);+ /* the characters, in the stage's order, and what stands in front of them */+ for (int k = 0; k < 3; k++) {+ int i = st->order[k];+ const fnf_actor_t *a = &g->actor[i];+ if (a->chr != 255 && a->visible && S.actor[i].px && S.actor[i].id != FNF_NONE) {+ int fx = hud_tx(a->x, z), fy = hud_ty(a->y, z);+ if (dark) blit_tinted(&S.actor[i], fx + S.actor[i].x, fy + S.actor[i].y, 0, dark * 32 / 1000);+ else blit(&S.actor[i], fx + S.actor[i].x, fy + S.actor[i].y, 32, false);+ }+ if (S.front[k].px) blit(&S.front[k], hud_tx(S.front[k].x, z), hud_ty(S.front[k].y, z), 32, false);+ }+ for (int i = 3; i < FNF_ACTORS; i++) { /* LE SSERAFIM's other members, in front */+ const fnf_actor_t *a = &g->actor[i];+ if (a->chr == 255 || !a->visible || !S.actor[i].px || S.actor[i].id == FNF_NONE) continue;+ int fx = hud_tx(a->x, z), fy = hud_ty(a->y, z);+ if (dark) blit_tinted(&S.actor[i], fx + S.actor[i].x, fy + S.actor[i].y, 0, dark * 32 / 1000);+ else blit(&S.actor[i], fx + S.actor[i].x, fy + S.actor[i].y, 32, false);+ }+ /* ---- the HUD */+ float h = sc->hud;+ bool down = sc->down;+ int strum_y = down ? 219 : 21;+ float speed = g->speed / 1000.0f;+ bool solo = (v->flags & FNF_VF_SOLO) != 0;+ int px0 = solo ? 118 : 185; /* your arrows' first (centred when alone) */+ /* the arrows fade in, one after the other, as the song comes up (Strumline.fadeInArrow) */+ for (int lane = 0; lane < 8; lane++) {+ int d = lane & 3;+ if (solo && lane >= 4) continue;+ int cx = lane < 4 ? px0 + 28 * d : 25 + 28 * d;+ int alpha = 32, dy = 0;+ float ft = (sc->since - 500000 - 200000 * d) / 1e6f;+ if (ft < 1) {+ float e = ft <= 0 ? 0 : ease_circ_out(ft);+ alpha = (int)(e * 32), dy = (int)lroundf((1 - e) * -3);+ }+ const pic_t *p = &S.strum[g->strum[lane]][d];+ blit_at(p, hud_tx(cx, h), hud_ty(strum_y + dy, h), alpha);+ }+ /* holds, then notes */+ for (int pass = 0; pass < 2; pass++)+ for (int i = 0; i < FNF_ACTIVE; i++) {+ const fnf_note_t *n = &g->note[i];+ if (n->state == NOTE_GONE && n->hold != HOLD_ON) continue;+ if (solo && n->lane >= 4) continue;+ int d = n->lane & 3;+ int cx = hud_tx(n->lane < 4 ? px0 + 28 * d : 25 + 28 * d, h);+ float dist = (n->t - now) / 1000.0f * PX_PER_MS * speed;+ int y = down ? strum_y - (int)lroundf(dist) : strum_y + (int)lroundf(dist);+ if (pass == 0) {+ if (n->len <= 0 || n->hold == HOLD_DONE || n->hold == HOLD_DROPPED) continue;+ float tail = (n->t + n->len - now) / 1000.0f * PX_PER_MS * speed;+ int ye = down ? strum_y - (int)lroundf(tail) : strum_y + (int)lroundf(tail);+ int ys = n->hold == HOLD_ON ? strum_y : y; /* held: from the arrow on */+ if (n->hold == HOLD_ON && (down ? ye > ys : ye < ys)) continue;+ ys = hud_ty(ys, h), ye = hud_ty(ye, h);+ const pic_t *body = &S.hold[d], *end = &S.end[d];+ int top = down ? ye : ys, bottom = down ? ys : ye;+ int x0 = cx + body->x;+ /* the body down to the end's start, then the end */+ int body_top = down ? top + end->h : top, body_bottom = down ? bottom : bottom - end->h;+ for (int r = body_top < gfx_y0 ? gfx_y0 : body_top; r < body_bottom && r < gfx_y1; r++) {+ pic_t row = *body;+ row.h = 1;+ blit(&row, x0, r, 32, false);+ }+ if (down) blit(end, cx + end->x, top, 32, true);+ else blit(end, cx + end->x, bottom - end->h, 32, false);+ } else if (n->state != NOTE_GONE) {+ if (y < -20 || y > 260) continue;+ blit_at(&S.note[d], cx, hud_ty(y, h), n->state == NOTE_FADED ? 16 : 32);+ }+ }+ /* splashes on Sick hits (167 ms, at 80%) */+ int32_t cd_age;+ bool counting = fnf_countdown(g, &cd_age) != 0;+ for (int d = 0; d < 4 && !counting; d++) {+ if (!g->splash_at[d] || now - g->splash_at[d] > 167000 || now < g->splash_at[d]) continue;+ if (splashes_show()) blit_at(&S.splash[d], hud_tx(px0 + 28 * d, h), hud_ty(strum_y, h), 26);+ }+ /* the health bar: red for the opponent on the left, green for you on the right */+ int bar_y = down ? 24 : 216;+ int bx = hud_tx(85, h), bw = (int)lroundf(150 * h), by = hud_ty(bar_y - 3, h), bh = 6;+ gfx_fill(bx - 1, by - 1, bw + 2, bh + 2, BLACK);+ int split = bw - (int)((int64_t)g->health_shown * bw / FNF_HEALTH_MAX);+ gfx_fill(bx, by, split, bh, RED);+ gfx_fill(bx + split, by, bw - split, bh, GREEN);+ /* the icons, bopping on the beat: 1.2 times wider, back over min(a step x 0.002 s, 0.175 s) */+ int32_t bop_len = fnf_step_len(g, now) * 2 / 1000;+ if (bop_len > 175000) bop_len = 175000;+ float grow = 1;+ if (g->icon_at && now >= g->icon_at && now - g->icon_at < bop_len) grow = 1.2f - 0.2f * (now - g->icon_at) / bop_len;+ for (int w = 0; w < 2; w++) {+ if (w == 1 && g->icon_hidden) continue;+ int32_t hp = w == 0 ? g->health_shown : FNF_HEALTH_MAX - g->health_shown;+ int frame = hp < 400000 ? 1 : hp > 1600000 && S.icon[w][2].id != S.icon[w][0].id ? 2 : 0;+ const pic_t *ic = &S.icon[w][frame];+ int size = (int)lroundf(37.5f * grow);+ int cx = bx + split;+ /* (iconP1 from 26 left of the split, iconP2 ending 26 right of it, both on the bar's middle) */+ int x = w == 0 ? cx - 6 : cx + 6 - size;+ int y = by + bh / 2 - size / 2;+ int sx = ic->w * size / 38, sy = ic->h * size / 38;+ /* (mirrored: the picture's place in its square mirrors too) */+ int left = g->icon_flip[w] ? 38 - (ic->x + 19) - ic->w : ic->x + 19;+ blit_scaled_flip(ic, x + left * size / 38, y + (ic->y + 19) * size / 38, sx, sy, 32, g->icon_flip[w]);+ }+ /* Score: 12,345 */+ char buf[32], *p = buf + sizeof buf - 1;+ int32_t sc_ = fnf_score(g);+ bool neg = sc_ < 0;+ uint32_t u = (uint32_t)(neg ? -sc_ : sc_);+ *p = 0;+ int digits = 0;+ do {+ if (digits && digits % 3 == 0) *--p = ',';+ *--p = (char)('0' + u % 10), u /= 10, digits++;+ } while (u);+ if (neg) *--p = '-';+ char line[48] = "Score: ";+ strcat(line, p);+ int tx = hud_tx(85 + 150 - 48, h), ty = hud_ty(bar_y + 11, h);+ for (int oy = -1; oy <= 1; oy++)+ for (int ox = -1; ox <= 1; ox++)+ if (ox || oy) gfx_text(&np_font_small, tx + ox, ty + oy, line, BLACK, 256);+ gfx_text(&np_font_small, tx, ty, line, 0xFFFF, 256);+ /* the ratings and combo popping up */+ for (int i = 0; i < FNF_POPS; i++) {+ const fnf_pop_t *pp = &g->pop[i];+ if (pp->what == 255 || !pp->at || now < pp->at || now > pp->fade + 200000) continue;+ float t = (now - pp->at) / 1e6f;+ int x = (int)lroundf(pp->x + pp->vx * t), y = (int)lroundf(pp->y + pp->vy * t + pp->ay * t * t / 2);+ int alpha = now < pp->fade ? 32 : (int)(32 - 32 * (now - pp->fade) / 200000);+ if (g->style && alpha < 32) alpha = alpha >= 16 ? 32 : 0; /* (pixel: stepped(2)) */+ const pic_t *pic = pp->what < 4 ? &S.rating[pp->what] : &S.digit[pp->what - 10];+ blit_at(pic, hud_tx(x, h), hud_ty(y, h), alpha);+ }+ /* the countdown: Ready, Set, Go, each fading over its beat */+ int32_t age;+ int cd = fnf_countdown(g, &age);+ if (cd) {+ static const uint16_t funkin_cd[3] = {FNF_SPR_FUNKIN_COUNTTWO, FNF_SPR_FUNKIN_COUNTONE, FNF_SPR_FUNKIN_COUNTGO};+ static const uint16_t pixel_cd[3] = {FNF_SPR_PIXEL_COUNTTWO, FNF_SPR_PIXEL_COUNTONE, FNF_SPR_PIXEL_COUNTGO};+ trans_show((g->style ? pixel_cd : funkin_cd)[cd - 1]);+ float x = age / (float)(fnf_step_len(g, now) * 4);+ x = x < 0 ? 0 : x > 1 ? 1 : x;+ float a = g->style ? 1 - floorf(x * 8) / 8 : 1 - ease_cube_in_out(x);+ if (S.trans.px) blit_at(&S.trans, hud_tx(160, h), hud_ty(120, h), (int)(a * 32));+ }+}++static scene_t scene;++static void actor_frames(const fnf_game_t *g) {+ for (int i = 0; i < FNF_ACTORS; i++) {+ if (g->actor[i].chr == 255 || !S.actor[i].px) continue;+ unsigned id = fnf_actor_sprite(g, i);+ if (id == FNF_NONE || id == S.actor[i].id) continue;+ uint8_t *px = S.actor[i].px;+ if (!pic_load(&S.actor[i], id, px, S.actor_cap[i])) S.actor[i].px = px, S.actor[i].id = FNF_NONE;+ }+}++void (*draw_between)(void); /* (main.c: the keyboard, read between strips) */++void draw_frame(void (*strip_fn)(void *), void *ctx) {+ gfx_buf = strip;+ for (int y = 0; y < SCREEN_H; y += STRIP_H) {+ gfx_y0 = y, gfx_y1 = y + STRIP_H;+ strip_fn(ctx);+ push_strip();+ if (draw_between) draw_between();+ }+}++void play_prepare(const fnf_game_t *g, bool downscroll, int32_t since_start) {+ RED = HEX(0xFF0000), GREEN = HEX(0x66FF33), BLACK = 0;+ play_icons(g);+ actor_frames(g);+ scene.g = g, scene.down = downscroll, scene.since = since_start;+ float cd = decay(g->now - g->bop_at);+ scene.cam = g->bop_at ? 1 + g->bop_cam / 1e6f * cd : 1;+ scene.hud = g->bop_at ? 1 + g->bop_hud / 1e6f * cd : 1;+}++void play_strip(void) { strip_scene(&scene); }++/* one character alone, on black (the game over) */+void play_actor_strip(const fnf_game_t *g, int i) {+ gfx_fill(0, gfx_y0, SCREEN_W, gfx_y1 - gfx_y0, 0);+ const fnf_actor_t *a = &g->actor[i];+ if (a->chr != 255 && S.actor[i].px && S.actor[i].id != FNF_NONE)+ blit(&S.actor[i], a->x + S.actor[i].x, a->y + S.actor[i].y, 32, false);+}diff --git a/games/fnf/src/draw.h b/games/fnf/src/draw.hnew file mode 100644index 00000000..c6e34598--- /dev/null+++ b/games/fnf/src/draw.h@@ -0,0 +1,49 @@+/* Drawing: the game's pictures unpacked into RAM and drawn in strips of the screen, with NumPlay's launcher graphics+ * for text and boxes (gfx.h). */+#ifndef FNF_DRAW_H+#define FNF_DRAW_H+#include <stdbool.h>+#include "gfx.h"+#include "game.h"++/* an unpacked picture */+typedef struct {+ uint16_t id, w, h, stride;+ int16_t x, y;+ const uint16_t *pal;+ uint8_t *px;+} pic_t;++/* RAM for pictures: a song's (its stage, characters, notes...) or the menus'. */+void ram_reset(void);+uint8_t *ram_take(uint32_t n); /* NULL when full */+bool pic_load(pic_t *p, unsigned sprite, uint8_t *dst, uint32_t cap);+bool pic_new(pic_t *p, unsigned sprite); /* into RAM taken for it */+uint8_t *bg_pixels(void); /* the 320x240 background's (38400 bytes) */+bool bg_load(unsigned sprite);++/* drawing into the strip (gfx_y0..gfx_y1): (x, y) the picture's top left; alpha 0-32 */+void blit(const pic_t *p, int x, int y, int alpha, bool flip_y);+void blit_at(const pic_t *p, int ax, int ay, int alpha); /* at its anchor */+void blit_scaled(const pic_t *p, int x, int y, int w, int h, int alpha);+void blit_tinted(const pic_t *p, int x, int y, color_t tint, int t32);+void draw_bg(const uint16_t *pal, int dark1000, float zoom);+void push_strip(void);++/* the menus' bold letters (white, outlined): their width, and drawn with their top at y */+bool bold_load(void);+int bold_width(const char *s, int scale256);+void bold_text(int x, int y, const char *s, int alpha, int scale256);++void draw_strip_buffer(color_t *p); /* SCREEN_W x STRIP_H, for the frames */+/* a frame: strip_fn draws each strip in turn (gfx_y0..gfx_y1), which is sent to the screen */+void draw_frame(void (*strip_fn)(void *), void *ctx);+extern void (*draw_between)(void); /* called between strips (to read the keys) */++/* a song: what it shows, unpacked when it starts; then each frame, prepared and drawn strip by strip */+bool play_load(const fnf_game_t *g);+void play_prepare(const fnf_game_t *g, bool downscroll, int32_t since_start);+void play_strip(void);+void play_actor_strip(const fnf_game_t *g, int i);+void play_icons(const fnf_game_t *g); /* (after a SetHealthIcon) */+#endifdiff --git a/games/fnf/src/font.c b/games/fnf/src/font.cdeleted file mode 100644index 509f5e1d..00000000--- a/games/fnf/src/font.c+++ /dev/null@@ -1,2 +0,0 @@-/* Reuse NumPlay's native-size Nunito glyphs (SIL OFL 1.1, LICENSES/). */-#include "../../../launcher/src/font_data.c"diff --git a/games/fnf/src/game.c b/games/fnf/src/game.cindex 1b3a0e46..33dfbde6 100644--- a/games/fnf/src/game.c+++ b/games/fnf/src/game.c@@ -1,123 +1,744 @@-#include "game.h"+/* The song (game.h): Friday Night Funkin's rules, after its own code (FunkinCrew/Funkin, Apache-2.0: PlayState,+ * Scoring, Strumline, BaseCharacter, Conductor, Countdown, PopUpStuff, Constants). */#include <math.h>#include <string.h>-#include <stdlib.h>--uint32_t game_varint(uint32_t *at,uint32_t end,bool *ok){- uint32_t v=0;for(unsigned shift=0;shift<28;shift+=7){if(*at>=end){*ok=false;return 0;}unsigned b=note_bytes[(*at)++];v|=(b&127u)<<shift;if(!(b&128))return v;}*ok=false;return 0;-}-/* Alias before edge detection: using both keys for one lane never double-taps. */-uint8_t game_lanes(uint64_t k){return ((k&((UINT64_C(1)<<0)|(UINT64_C(1)<<30)))?1:0)|((k&((UINT64_C(1)<<2)|(UINT64_C(1)<<31)))?2:0)|((k&((UINT64_C(1)<<1)|(UINT64_C(1)<<33)))?4:0)|((k&((UINT64_C(1)<<3)|(UINT64_C(1)<<34)))?8:0);}-void game_init(Game*g){memset(g,0,sizeof(*g));g->p.beat=1;}-unsigned game_chart(unsigned song,unsigned variant,unsigned difficulty){- if(song>=SONG_COUNT)return NONE;const Song*s=&songs[song];- for(unsigned t=s->first;t<s->first+s->count;t++)if(tracks[t].variant==variant){const Track*r=&tracks[t];for(unsigned c=r->first;c<r->first+r->count;c++)if(charts[c].difficulty==difficulty)return c;}return NONE;-}-static void animate(Game*g,unsigned actor,unsigned animation,int32_t until){- if(actor>=6||g->actors[actor].character==NONE||animation>=ANIMATION_COUNT)return;- g->actors[actor].animation=animation;g->actors[actor].since=g->time;g->actors[actor].until=until;-}-static void sing(Game*g,const Note*n,bool miss){- if(n->kind==KIND_NOANIM)return;- for(unsigned a=0;a<6;a++){Actor*r=&g->actors[a];if(r->character==NONE||r->side!=(n->direction<4))continue;- const Character*c=&characters[r->character];unsigned anim=miss?c->miss[n->direction&3]:kind_anim[r->character][n->kind][n->direction&3];- int32_t duration=(int32_t)(60000.0f/g->bpm*c->sing_time*.25f*16);int32_t until=g->time+duration;if(!miss&&n->end>until)until=n->end;animate(g,a,anim,until);+#include "game.h"+#include "inflate.h"++/* PBOT1's points for a press |ms| off: 500 under 5 ms, then int(500 * (1 - 1 / (1 + e^(-0.08 (ms - 54.99)))) + 9)+ * (Scoring.scoreNotePBOT1, worked out in double precision as the game does) */+static const int16_t PBOT1[161] = {+ 500, 500, 500, 500, 500, 499, 499, 498, 497, 496, 495, 494, 493, 492, 490, 489,+ 487, 486, 484, 482, 480, 478, 475, 473, 470, 467, 464, 460, 457, 453, 449, 445,+ 440, 435, 430, 424, 419, 413, 406, 400, 393, 385, 378, 370, 362, 353, 345, 336,+ 327, 317, 308, 298, 288, 278, 268, 258, 248, 238, 229, 219, 209, 200, 190, 181,+ 172, 163, 155, 147, 139, 131, 124, 117, 111, 104, 98, 92, 87, 82, 77, 72,+ 68, 64, 60, 57, 53, 50, 47, 44, 42, 39, 37, 35, 33, 31, 30, 28,+ 27, 25, 24, 23, 22, 21, 20, 19, 18, 17, 17, 16, 16, 15, 15, 14,+ 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 11, 11, 10, 10, 10, 10,+ 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,+ 9,+};++/* health (millionths of the bar's 2.0): Constants.HEALTH_* */+#define H_SICK 30000 /* +1.5% of the bar */+#define H_GOOD 15000+#define H_SHIT (-20000)+#define H_MISS (-80000) /* -4%, a ghost miss too */+#define MISS_POINTS 100+#define GHOST_POINTS 10+#define HOLD_DROP_MIN 160000 /* a hold let go of with more than this left costs points */++int fnf_judge(int32_t ms) {+ int32_t a = ms < 0 ? -ms : ms;+ return a <= 45 ? J_SICK : a <= 90 ? J_GOOD : a <= 135 ? J_BAD : a <= 160 ? J_SHIT : J_MISS;+}++int fnf_points(int32_t ms) {+ int32_t a = ms < 0 ? -ms : ms;+ return a > 160 ? -MISS_POINTS : PBOT1[a];+}++int32_t fnf_completion(const fnf_game_t *g) {+ if (!g->total) return 0;+ int32_t n = (int32_t)g->tally[J_SICK] + g->tally[J_GOOD] - g->tally[J_MISS];+ if (n <= 0) return 0;+ int32_t c = (int32_t)((int64_t)n * 10000 / g->total);+ return c > 10000 ? 10000 : c;+}++int fnf_rank(const fnf_game_t *g) {+ if (!g->total) return 0;+ if (g->tally[J_SICK] == g->total) return 5;+ /* (Scoring.tallyCompletion is a float: 0.9 is reached at 90%, so compare exactly) */+ int64_t n = (int64_t)g->tally[J_SICK] + g->tally[J_GOOD] - g->tally[J_MISS], t = g->total;+ if (n >= t) return 4;+ if (n * 10 >= t * 9) return 3;+ if (n * 10 >= t * 8) return 2;+ if (n * 10 >= t * 6) return 1;+ return 0;+}++int32_t fnf_score(const fnf_game_t *g) { return (int32_t)(g->score / 1000); } /* (Std.int: toward 0) */++/* ------------------------------------------------------------------------------------------------ the beat */+static int64_t floor_div(int64_t a, int64_t b) { return a >= 0 ? a / b : -((-a + b - 1) / b); }++static const fnf_tempo_t *tempo_at(const fnf_game_t *g, int32_t t) {+ const fnf_var_t *v = &fnf_var[g->var];+ const fnf_tempo_t *tp = &fnf_tempo[v->tempo];+ for (int i = 1; i < v->ntempo; i++)+ if (fnf_tempo[v->tempo + i].t <= t) tp = &fnf_tempo[v->tempo + i];+ return tp;+}++int32_t fnf_steps(const fnf_game_t *g, int32_t t) {+ const fnf_tempo_t *tp = tempo_at(g, t);+ return tp->steps0 + (int32_t)floor_div((int64_t)(t - tp->t) * (1 << 24), tp->step);+}++int32_t fnf_step_len(const fnf_game_t *g, int32_t t) { return (int32_t)(tempo_at(g, t)->step >> 8); }++/* when step k starts */+static int32_t step_time(const fnf_game_t *g, int32_t k) {+ const fnf_var_t *v = &fnf_var[g->var];+ const fnf_tempo_t *tp = &fnf_tempo[v->tempo];+ int64_t s = (int64_t)k * 65536;+ for (int i = 1; i < v->ntempo; i++)+ if (fnf_tempo[v->tempo + i].steps0 <= s) tp = &fnf_tempo[v->tempo + i];+ int64_t num = (s - tp->steps0) * (int64_t)tp->step;+ return tp->t + (int32_t)-floor_div(-num, (int64_t)1 << 24); /* (rounded up: the first microsecond in it) */+}++int32_t fnf_start_time(const fnf_game_t *g) {+ /* the countdown starts 5 beats before the song (Countdown.performCountdown), after half a second of the notes+ * coming in (PlayState's vwoosh) */+ return step_time(g, -20) - 500000;+}++/* ------------------------------------------------------------------------------------------------ characters */+static const fnf_anim_t *anim_of(const fnf_actor_t *a) {+ return a->anim == 255 ? 0 : &fnf_anim[fnf_char[a->chr].anim + a->anim];+}++static bool finished(const fnf_actor_t *a, int32_t t) {+ const fnf_anim_t *an = anim_of(a);+ if (!an) return true;+ if (an->flags & FNF_AF_LOOP) return false;+ return (int64_t)(t - a->since) * an->fps >= (int64_t)an->len * 1000000;+}++/* Bopper.playAnimation */+static void play(fnf_actor_t *a, int anim, bool restart, bool exclusive, int32_t t) {+ if (a->chr == 255 || anim == 255) return;+ if (a->locked && finished(a, t)) a->locked = 0;+ if (a->locked && !(anim == a->anim && restart)) return;+ if (!restart && anim == a->anim && !finished(a, t)) return;+ a->anim = (uint8_t)anim, a->since = t;+ const fnf_anim_t *an = anim_of(a);+ a->singing = an->flags & FNF_AF_SING ? (an->flags & FNF_AF_MISS ? 2 : 1) : 0;+ if (exclusive) a->locked = 1;+}++/* BaseCharacter.dance */+static void dance(fnf_actor_t *a, bool force, int32_t t) {+ if (a->chr == 255) return;+ const fnf_char_t *c = &fnf_char[a->chr];+ if (!force) {+ if (a->singing) return;+ const fnf_anim_t *an = anim_of(a);+ if (an && !(an->flags & FNF_AF_DANCE) && !finished(a, t)) return;+ }+ if (c->flags & FNF_CHAR_ALTERNATE) {+ play(a, c->slot[a->danced ? FNF_SLOT_DANCE_R : FNF_SLOT_DANCE_L], false, false, t);+ a->danced ^= 1;+ } else {+ play(a, c->slot[FNF_SLOT_DANCE_L], false, false, t);+ }+}++static int find_anim(const fnf_actor_t *a, int name) {+ const fnf_char_t *c = &fnf_char[a->chr];+ for (int i = 0; i < c->count; i++)+ if (fnf_anim_name[c->anim + i] == name) return i;+ return 255;+}++/* singing a note (BaseCharacter.onNoteHit, and the characters' scripts for note kinds) */+static void sing(fnf_actor_t *a, int dir, int kind, int32_t t) {+ if (a->chr == 255) return;+ const fnf_char_t *c = &fnf_char[a->chr];+ int anim = c->slot[FNF_SLOT_SING + dir];+ if (kind) {+ for (int i = 0; i < FNF_KINDS; i++)+ if (fnf_kind[i].chr == a->chr && fnf_kind[i].kind == kind) {+ int k = fnf_kind[i].anim[dir];+ if (k == 254) return; /* noanim */+ if (k != 255) {+ if (!(fnf_anim[c->anim + k].flags & FNF_AF_SING)) { /* "ugh", "hehPrettyGood", a punch... */+ play(a, k, true, true, t);+ return;+ }+ anim = k;+ }+ break;+ }+ }+ play(a, anim, true, false, t);+ a->hold = t;+}++static void miss_anim(fnf_actor_t *a, int dir, int32_t t) {+ if (a->chr == 255) return;+ bool was = a->singing;+ play(a, fnf_char[a->chr].slot[FNF_SLOT_MISS + dir], true, false, t);+ if (!was) a->hold = t; /* (the hold timer only runs while singing) */+}++/* Girlfriend cheering a combo, or crying over a lost one (BaseCharacter.playComboAnimation, playComboDropAnimation) */+static void gf_combo(fnf_game_t *g, unsigned combo, bool drop, int32_t t) {+ for (int i = 0; i < FNF_ACTORS; i++) {+ fnf_actor_t *a = &g->actor[i];+ if (a->chr == 255 || a->side != 2) continue;+ int best = 255;+ if (!drop) {+ int name = combo == 50 ? FNF_ANIM_COMBO50 : combo == 200 ? FNF_ANIM_COMBO200 : -1;+ if (name >= 0) best = find_anim(a, name);+ } else if (combo >= 70) {+ best = find_anim(a, FNF_ANIM_DROP70);}+ if (best != 255) play(a, best, true, true, t);+ }+}++static bool any_held(const fnf_game_t *g) { return (g->held & 15) != 0; }++/* the hold timer: singing stops singTime steps after the last note (twice that for a miss), unless the player+ * still holds a key (BaseCharacter.onUpdate) */+static void stop_singing(fnf_game_t *g, int32_t t) {+ int32_t step = fnf_step_len(g, t);+ for (int i = 0; i < FNF_ACTORS; i++) {+ fnf_actor_t *a = &g->actor[i];+ if (a->chr == 255 || !a->singing) continue;+ int64_t limit = (int64_t)fnf_char[a->chr].sing * step * (a->singing == 2 ? 2 : 1);+ if (t - a->hold <= limit) continue;+ if (a->side == 0 && any_held(g)) continue;+ a->singing = 0;+ a->locked = 0;+ dance(a, true, t);+ }+}++/* ------------------------------------------------------------------------------------------------ pop ups */+static uint32_t rnd(fnf_game_t *g, uint32_t lo, uint32_t hi) { /* lo..hi, as FlxG.random.int */+ g->rng = g->rng * 1664525u + 1013904223u;+ return lo + (g->rng >> 8) % (hi - lo + 1);}-static void fill(Game*g){- while(g->read<g->end&&g->stream_time<=g->time+40000){- unsigned slot=0;for(;slot<NOTE_CAP;slot++)if(g->notes[slot].state==FINISHED)break;- if(slot==NOTE_CAP){g->fault=g->lost=1;return;}- bool ok=true;uint32_t at=g->read;uint32_t delta=game_varint(&at,g->end,&ok),info=game_varint(&at,g->end,&ok);uint32_t length=(info&1)?game_varint(&at,g->end,&ok):0;- if(!ok||delta>10000000||length>10000000||(info>>4)>=KIND_COUNT){g->fault=g->lost=1;return;}- g->stream_time+=(int32_t)delta;Note*n=&g->notes[slot];*n=(Note){g->stream_time,g->stream_time+(int32_t)length,(info>>1)&7,info>>4,WAITING};g->read=at;g->decoded++;g->count++;if(g->count>g->peak)g->peak=g->count;++static fnf_pop_t *new_pop(fnf_game_t *g) {+ fnf_pop_t *p = &g->pop[g->popn];+ g->popn = (uint8_t)((g->popn + 1) % FNF_POPS);+ return p;+}++/* PopUpStuff, in screen pixels: the HUD's 1280 x 720 at a quarter across and a third down */+static void pop_rating(fnf_game_t *g, int j, int32_t t) {+ fnf_pop_t *p = new_pop(g);+ p->what = (uint8_t)j, p->at = t;+ p->x = (int16_t)(1280 * 474 / 1000 / 4), p->y = (int16_t)((720 * 45 / 100 - 60) / 3);+ p->ay = 550 / 3;+ p->vy = (int16_t)-((int32_t)rnd(g, 140, 175) / 3);+ p->vx = (int16_t)-((int32_t)rnd(g, 0, 10) / 4);+ p->fade = t + fnf_step_len(g, t) * 4;+}++static void pop_combo(fnf_game_t *g, unsigned combo, int32_t t) {+ int digits[6], n = 0;+ unsigned c = combo;+ while (c && n < 6) digits[n++] = (int)(c % 10), c /= 10;+ while (n < 3) digits[n++] = 0;+ for (int i = 0; i < n; i++) {+ fnf_pop_t *p = new_pop(g);+ p->what = (uint8_t)(10 + digits[i]), p->at = t;+ p->x = (int16_t)((1280 * 507 / 1000 - 36 * (i + 1) - 65 + 47 * 45 / 100) / 4);+ p->y = (int16_t)((720 * 44 / 100 + 119 * 45 / 200) / 3);+ p->ay = (int16_t)(rnd(g, 250, 300) / 3);+ p->vy = (int16_t)-((int32_t)rnd(g, 130, 150) / 3);+ p->vx = (int16_t)(((int32_t)rnd(g, 0, 10) - 5) / 4);+ p->fade = t + fnf_step_len(g, t) * 8;+ }+}++/* ------------------------------------------------------------------------------------------------ scoring */+static void health(fnf_game_t *g, int32_t d) {+ g->health += d;+ if (g->health > FNF_HEALTH_MAX) g->health = FNF_HEALTH_MAX;+ if (g->health <= 0) g->health = 0;+}++/* PlayState.applyScore */+static void apply(fnf_game_t *g, int32_t points_milli, int j, int32_t dh, bool breaks, int32_t t) {+ if (j >= 0) g->tally[j]++;+ health(g, dh);+ if (breaks) {+ if (g->combo >= 10) pop_combo(g, 0, t);+ g->combo = 0;+ } else {+ g->combo++;+ if (g->combo > g->max_combo) g->max_combo = g->combo;+ }+ g->score += points_milli;+}++static void actors_on(fnf_game_t *g, int side, int dir, int kind, bool miss, int32_t t) {+ for (int i = 0; i < FNF_ACTORS; i++) {+ fnf_actor_t *a = &g->actor[i];+ if (a->chr == 255 || a->side != side) continue;+ if (miss) miss_anim(a, dir, t);+ else sing(a, dir, kind, t);+ }+}++static bool scoreable(const fnf_note_t *n) { return n->kind != FNF_KIND_NON_SCOREABLE; }++static bool holding(const fnf_note_t *n) { return n->hold == HOLD_ON; }++static void hit(fnf_game_t *g, fnf_note_t *n, int32_t judged) {+ int32_t t = g->now;+ int32_t ms = (judged - n->t) / 1000; /* (Std.int: toward 0) */+ int j = fnf_judge(ms);+ int32_t dh = j == J_SICK ? H_SICK : j == J_GOOD ? H_GOOD : j == J_SHIT ? H_SHIT : 0;+ bool breaks = j == J_BAD || j == J_SHIT;+ unsigned gf_count = scoreable(n) ? g->combo + 1u : g->combo;+ actors_on(g, 0, n->lane & 3, n->kind, false, t);+ if (scoreable(n)) gf_combo(g, gf_count, breaks, t);+ g->strum[n->lane] = STRUM_CONFIRM, g->strum_at[n->lane] = t;+ if (j == J_SICK) g->splash_at[n->lane & 3] = t;+ n->state = breaks ? NOTE_FADED : NOTE_GONE; /* (Strumline.hitNote: a combo break leaves it, faded) */+ n->hit = t;+ if (n->len > 0) n->hold = HOLD_ON;+ if (scoreable(n)) {+ g->hits++;+ apply(g, fnf_points(ms) * 1000, j, dh, breaks, t);+ pop_rating(g, j, t);+ if (g->combo >= 10) pop_combo(g, g->combo, t);+ }+}++static void miss(fnf_game_t *g, fnf_note_t *n, int32_t t) {+ if (!scoreable(n)) { /* (NonScoreableNoteKind: hidden, no penalty) */+ n->state = NOTE_GONE;+ return;+ }+ unsigned before = g->combo;+ n->state = NOTE_MISSED;+ actors_on(g, 0, n->lane & 3, 0, true, t);+ gf_combo(g, before, true, t);+ apply(g, -MISS_POINTS * 1000, J_MISS, H_MISS, true, t);+ /* its hold goes with it: never held, its whole length counts */+ if (n->len > 0) n->hold = HOLD_MISSED;+ if (n->len > HOLD_DROP_MIN) {+ g->score -= (int64_t)n->len / 8; /* -125 points a second left */+ if (g->combo >= 10) pop_combo(g, 0, t);+ g->combo = 0;+ actors_on(g, 0, n->lane & 3, 0, true, t);+ }+}++/* a hold let go of at time t (Strumline: noticed once the note's time has passed) */+static void drop(fnf_game_t *g, fnf_note_t *n, int32_t t) {+ int32_t left = n->t + n->len - t;+ n->hold = HOLD_DROPPED;+ if (!scoreable(n) || left <= HOLD_DROP_MIN) return;+ g->score -= (int64_t)left / 8;+ unsigned before = g->combo;+ if (g->combo >= 10) pop_combo(g, 0, t);+ g->combo = 0;+ actors_on(g, 0, n->lane & 3, 0, true, t);+ gf_combo(g, before, true, t);+}++/* ------------------------------------------------------------------------------------------------ the notes */+static uint32_t leb(fnf_game_t *g, bool *ok) {+ uint32_t v = 0;+ for (int s = 0; s < 35; s += 7) {+ if (g->pos >= g->end) {+ *ok = false;+ return 0;+ }+ uint8_t b = g->notes[g->pos++];+ v |= (uint32_t)(b & 127) << s;+ if (!(b & 128)) return v;+ }+ *ok = false;+ return 0;+}++/* the next note out of the chart into a free place */+static bool next_note(fnf_game_t *g, fnf_note_t *out) {+ bool ok = true;+ uint32_t dt = leb(g, &ok), info = leb(g, &ok);+ uint32_t len = info & 8 ? leb(g, &ok) : 0;+ if (!ok || (info >> 4) >= FNF_NOTE_KINDS || dt > 600000000u || len > 600000000u) return false;+ out->t = g->next + (int32_t)dt;+ out->len = (int32_t)len;+ out->lane = (uint8_t)(info & 7), out->kind = (uint8_t)(info >> 4);+ out->state = NOTE_WAIT, out->hold = HOLD_NONE, out->hit = 0;+ return true;+}++/* a place a note no longer needs: gone with no hold going on, or scrolled off the screen */+static bool slot_free(const fnf_note_t *n, int32_t now) {+ if (n->state == NOTE_WAIT || n->hold == HOLD_ON) return false;+ if (n->state == NOTE_GONE) return n->len == 0 || n->hold != HOLD_MISSED;+ return now - (n->t + n->len) > 2000000;+}++/* notes come on when they are this far ahead: the screen's height at the slowest speed they may scroll at */+static int32_t lookahead(const fnf_game_t *g) {+ int32_t s = g->speed < g->speed_to ? g->speed : g->speed_to;+ if (s < 300) s = 300;+ return (int32_t)(1700000LL * 1000 / s);+}++static void bring_notes(fnf_game_t *g) {+ int32_t ahead = lookahead(g);+ while (g->pos < g->end) {+ /* (peek: the next note's time) */+ uint32_t save = g->pos;+ bool ok = true;+ uint32_t dt = leb(g, &ok);+ g->pos = save;+ if (!ok) return;+ if ((int64_t)g->next + dt > (int64_t)g->now + ahead) return;+ int free = -1;+ for (int i = 0; i < FNF_ACTIVE; i++)+ if (slot_free(&g->note[i], g->now)) {+ free = i;+ break;+ }+ if (free < 0) return; /* (never: 128 places, the busiest charts use 70) */+ fnf_note_t n;+ if (!next_note(g, &n)) {+ g->pos = g->end;+ return;+ }+ g->next = n.t;+ g->note[free] = n;+ unsigned busy = 0;+ for (int i = 0; i < FNF_ACTIVE; i++) busy += !slot_free(&g->note[i], g->now);+ if (busy > g->peak) g->peak = (uint16_t)busy;+ }+}++/* ------------------------------------------------------------------------------------------------ events */+static void event(fnf_game_t *g, const fnf_event_t *e) {+ int32_t t = e->t;+ switch (e->type) {+ case FNF_EV_SETCAMERABOP: /* SetCameraBopSongEvent */+ g->bop_intensity = e->v, g->bop_rate = (uint16_t)e->d, g->bop_offset = e->b;+ break;+ case FNF_EV_PLAYANIMATION:+ if (e->a < 3) {+ fnf_actor_t *a = &g->actor[e->a];+ if (a->chr != 255) {+ int k = find_anim(a, e->b);+ if (k != 255) {+ play(a, k, e->c, e->c, t);+ }+ }+ }+ break;+ case FNF_EV_SCROLLSPEED: {+ int32_t to = e->a ? e->v : (int32_t)((int64_t)fnf_chart[g->chart].speed * e->v / 1000);+ int32_t dur = (int32_t)((int64_t)e->d * fnf_step_len(g, t) / 1000);+ g->speed_from = g->speed, g->speed_to = to, g->speed_t0 = t, g->speed_t1 = t + dur;+ g->speed_ease = e->b;+ if ((e->b & 15) == 1 || dur <= 0) g->speed = to, g->speed_t1 = t; /* INSTANT */+ break;+ }+ case FNF_EV_SETHEALTHICON:+ if (e->a < 2) g->icon[e->a] = e->b, g->icon_flip[e->a] = (uint8_t)(e->c ^ (e->a == 0));+ break;+ case FNF_EV_SSERAFIMSING: { /* (sserafim.hxc: yunjin, kazuha, chaewon, eunchae, sakura, gf) */+ static const uint8_t who[6] = {3, 1, 4, 5, 0, 2};+ for (int i = 0; i < 6; i++) g->actor[who[i]].side = (uint8_t)(e->a >> i & 1 ? 0 : 1);+ break;}+ case FNF_EV_SSERAFIMSHOW: {+ static const uint8_t who[5] = {3, 1, 4, 5, 0};+ for (int i = 0; i < 5; i++) g->actor[who[i]].visible = (uint8_t)(e->a >> i & 1);+ break;+ }+ case FNF_EV_SSERAFIMDARK: {+ int32_t now_dark = g->dark_to; /* (where it was heading: close enough as a start) */+ g->dark_from = now_dark, g->dark_to = e->v, g->dark_t0 = t, g->dark_t1 = t + e->d * 1000;+ break;+ }+ default: break;+ }}-bool game_start(Game*g,unsigned id){- if(id>=CHART_COUNT)return false;Progress p=g->p;memset(g,0,sizeof(*g));g->p=p;g->chart=id;- const Chart*c=&charts[id];const Track*t=&tracks[c->track];g->read=c->offset;g->end=c->offset+c->bytes;g->tempo=t->tempo_first;g->bpm=tempos[g->tempo].bpm;g->time=-(int32_t)(240000/g->bpm*16);g->last_hit=g->judgement_at=-10000000;- g->health=1;g->speed=g->speed_from=g->speed_to=c->speed;g->zoom=1;g->bop=1;g->event=t->event_first;- for(unsigned i=0;i<NOTE_CAP;i++)g->notes[i].state=FINISHED;- for(unsigned a=0;a<6;a++){Actor*r=&g->actors[a];r->character=t->character[a];r->visible=1;r->side=a==0;if(r->character!=NONE){const Character*q=&characters[r->character];r->animation=q->idle;memcpy(r->icon,q->icon,sizeof(r->icon));}}- if(t->character[3]!=NONE){g->actors[2].side=0;g->actors[3].side=1;g->actors[0].side=0;g->actors[4].visible=g->actors[5].visible=0;}- fill(g);return !g->fault;-}-int game_judge(int32_t error){int32_t e=abs(error);return e<=45*16?SICK:e<=90*16?GOOD:e<=135*16?BAD:e<=160*16?SHIT:MISS;}-int game_points(int32_t error){float e=abs(error)/16.0f;if(e>160)return -100;if(e<5)return 500;return (int)(500*(1-1/(1+expf(-.080f*(e-54.99f))))+9);}-static void retire(Game*g,Note*n){n->state=FINISHED;if(g->count)g->count--;}-static void miss_note(Game*g,Note*n){- n->state=MISSED;sing(g,n,true);if(n->kind==KIND_NON_SCOREABLE)return;- g->judged[MISS]++;g->combo=0;g->health-=.08f;g->score_milli-=100000;g->judgement=MISS;g->judgement_at=g->time;- if(n->end-g->time>WINDOW)g->score_milli-=(int64_t)(n->end-g->time)*125000/16000;-}-static void hit_note(Game*g,Note*n){- sing(g,n,false);n->state=n->end>n->time?HOLDING:FINISHED;if(n->state==FINISHED&&g->count)g->count--;- if(n->kind==KIND_NON_SCOREABLE)return;- int j=game_judge(g->time-n->time);g->judged[j]++;g->score_milli+=(int64_t)game_points(g->time-n->time)*1000;g->health+=j==SICK?.03f:j==GOOD?.015f:j==BAD?0:-.02f;- if(j<=GOOD){g->combo++;if(g->combo>g->max_combo)g->max_combo=g->combo;}else g->combo=0;- g->judgement=(uint8_t)j;g->judgement_at=g->last_hit=g->time;-}-static unsigned find_animation(unsigned character,unsigned name){- const Character*c=&characters[character];for(unsigned a=c->first;a<c->first+c->count;a++)if(animations[a].name==name)return a;return NONE;-}-static void event(Game*g,const Event*e){- switch(e->kind){- case EVENT_FOCUSCAMERA:g->focus=(uint16_t)e->a;break;- case EVENT_ZOOMCAMERA:g->zoom=fminf(1.15f,fmaxf(.8f,e->value));break;- case EVENT_SETCAMERABOP:g->bop=e->value;break;- case EVENT_PLAYANIMATION:if((unsigned)e->b<6&&g->actors[e->b].character!=NONE)animate(g,e->b,find_animation(g->actors[e->b].character,(uint16_t)e->a),g->time+(int32_t)(960000/g->bpm));break;- case EVENT_SCROLLSPEED:g->speed_from=g->speed;g->speed_to=e->a?e->value:charts[g->chart].speed*e->value;g->speed_start=g->time;g->speed_end=g->time+(int32_t)(e->duration*960000/g->bpm);break;- case EVENT_SETHEALTHICON:if((unsigned)e->a<2){g->actors[e->a].icon[0]=(uint16_t)e->b;g->actors[e->a].icon[1]=(uint16_t)e->c;}break;- case EVENT_SSERAFIMSING:{static const uint8_t map[6]={3,1,4,5,0,2};for(unsigned i=0;i<6;i++)g->actors[map[i]].side=(e->a>>i)&1;break;}- case EVENT_SSERAFIMSHOW:{static const uint8_t map[5]={3,1,4,5,0};for(unsigned i=0;i<5;i++)g->actors[map[i]].visible=(e->a>>i)&1;break;}- case EVENT_SSERAFIMDARK:g->dark=e->value;break;- case EVENT_SSERAFIMFLASH:g->flash_until=g->time+(int32_t)(e->duration*16000);break;- case EVENT_SSERAFIMPULSELIGHTS:g->pulse=e->a!=0;break;- case EVENT_SSERAFIMBEAUTIFUL:g->beautiful=e->a!=0;break;- case EVENT_SSERAFIMCOVER:g->cover=e->a!=0;break;- case EVENT_SSERAFIMLIGHTS:g->bop=e->value;break;- case EVENT_SSERAFIMKICK:case EVENT_SSERAFIMGUITARVIBRATION:g->flash_until=g->time+4000;break;- case EVENT_ENABLEMASK:case EVENT_SSERAFIMEND:break;++/* ------------------------------------------------------------------------------------------------ a step */+static void step_hit(fnf_game_t *g, int32_t k, int32_t t) {+ stop_singing(g, t);+ /* the camera and the HUD bop (PlayState.stepHit) */+ if (g->bop_rate && (k + g->bop_offset) % g->bop_rate == 0) {+ /* what's left of the HUD's last bop: lerp(1, zoom, 0.95^(dt x 60)) each frame; no bop past 1.35 */+ float left = g->bop_at ? g->bop_hud * powf(0.95f, (float)(t - g->bop_at) * 60e-6f) : 0;+ if (left < 350000) {+ g->bop_at = t;+ g->bop_cam = g->bop_intensity * 15; /* (Constants.DEFAULT_BOP_INTENSITY - 1) x intensity */+ g->bop_hud = (int32_t)left + g->bop_intensity * 30; /* twice that, added to the HUD's zoom */}+ }+ if (k % 4 == 0) g->icon_at = t; /* HealthIcon.onStepHit: every beat */+ for (int i = 0; i < FNF_ACTORS; i++) {+ fnf_actor_t *a = &g->actor[i];+ if (a->chr == 255) continue;+ int every = fnf_char[a->chr].dance;+ if (every && k % every == 0) dance(a, false, t);+ }}-unsigned game_completion(const Game*g){int n=(int)g->judged[SICK]+g->judged[GOOD]-g->judged[MISS];return n>0?(unsigned)((uint32_t)n*10000/charts[g->chart].players):0;}-const char*game_rank(const Game*g){unsigned c=game_completion(g);if(g->judged[SICK]==charts[g->chart].players)return "PERFECT GOLD";return c==10000?"PERFECT":c>=9000?"EXCELLENT":c>=8000?"GREAT":c>=6000?"GOOD":"SHIT";}-static void clear(Game*g){- g->won=1;Record*r=&g->p.record[g->chart];int32_t s=(int32_t)(g->score_milli/1000);unsigned c=game_completion(g);- if(s>r->score)r->score=s;if(c>r->completion)r->completion=(uint16_t)c;if(g->max_combo>r->combo)r->combo=g->max_combo;g->dirty=1;-}-static void tick(Game*g,int32_t time,uint8_t held){- int32_t previous=g->time;g->time=time;const Track*t=&tracks[charts[g->chart].track];- while(g->tempo+1<t->tempo_first+t->tempo_count&&tempos[g->tempo+1].time<=time)g->tempo++;- const Tempo*tempo=&tempos[g->tempo];g->bpm=tempo->bpm;g->beat=tempo->beat+(time-tempo->time)*g->bpm/960000;- while(g->event<t->event_first+t->event_count&&events[g->event].time<=time)event(g,&events[g->event++]);- if(time>=g->speed_end)g->speed=g->speed_to;else if(time>=g->speed_start&&g->speed_end>g->speed_start){float x=(float)(time-g->speed_start)/(g->speed_end-g->speed_start);x=x*x*(3-2*x);g->speed=g->speed_from+(g->speed_to-g->speed_from)*x;}- fill(g);if(g->fault)return;- bool near=false,active_hold=false;uint8_t pressed=held&~g->held;- for(unsigned i=0;i<NOTE_CAP;i++){Note*n=&g->notes[i];if(n->state==FINISHED)continue;- if(n->direction>=4){if(n->state==WAITING&&time>=n->time){sing(g,n,false);n->state=HOLDING;}if(time>=n->end)retire(g,n);continue;}- if(n->state==WAITING&&abs(time-n->time)<=WINDOW)near=true;- if(n->state==HOLDING){active_hold=true;int32_t start=previous>n->time?previous:n->time,end=time<n->end?time:n->end;- if((g->held&(1u<<n->direction))&&end>start&&n->kind!=KIND_NON_SCOREABLE){g->score_milli+=(int64_t)(end-start)*250000/16000;g->health+=(end-start)*(.12f/16000);}- if(time>=n->end){retire(g,n);continue;}- if(!(held&(1u<<n->direction))){if(n->end-time>WINDOW&&n->kind!=KIND_NON_SCOREABLE){g->score_milli-=(int64_t)(n->end-time)*125000/16000;g->combo=0;sing(g,n,true);}n->state=MISSED;}++/* ------------------------------------------------------------------------------------------------ time passing */+static void bonus(fnf_game_t *g, int32_t from, int32_t to) {+ /* holds held: +250 points and +6% of the bar a second (Constants.SCORE_HOLD_BONUS_PER_SECOND, ...) */+ for (int i = 0; i < FNF_ACTIVE; i++) {+ fnf_note_t *n = &g->note[i];+ if (!holding(n) || n->lane >= 4 || !scoreable(n)) continue;+ int32_t a = from > n->hit ? from : n->hit, b = to < n->t + n->len ? to : n->t + n->len;+ if (b <= a) continue;+ int32_t d = b - a;+ /* (the game adds these as fractions, each frame: kept whole here, the leftovers carried on) */+ int64_t sc = (int64_t)d + g->score_rest;+ g->score += sc / 4;+ g->score_rest = (int32_t)(sc % 4);+ int64_t h = (int64_t)d * 12 + g->bonus_rest;+ g->bonus_rest = (int32_t)(h % 100);+ health(g, (int32_t)(h / 100));+ }+}++/* the earliest thing to happen after the clock's now: a step, an event or a note's deadline */+static int32_t next_thing(fnf_game_t *g) {+ int32_t t = step_time(g, g->step + 1);+ const fnf_var_t *v = &fnf_var[g->var];+ if (g->event < v->event + v->nevent && fnf_event[g->event].t < t) t = fnf_event[g->event].t;+ for (int i = 0; i < FNF_ACTIVE; i++) {+ const fnf_note_t *n = &g->note[i];+ int32_t d = INT32_MAX;+ if (n->state == NOTE_WAIT) d = n->lane >= 4 ? n->t : n->t + FNF_WINDOW + g->offset + 1;+ else if (holding(n)) {+ d = n->t + n->len;+ if (n->lane < 4 && !(g->held >> n->lane & 1) && n->t + 1 < d) d = n->t + 1 > g->now ? n->t + 1 : g->now;+ }+ if (d < t) t = d;+ }+ if (g->length < t) t = g->length;+ return t;+}++static void at(fnf_game_t *g, int32_t t) {+ bonus(g, g->now, t);+ g->now = t;+}++static void settle(fnf_game_t *g) {+ int32_t t = g->now;+ const fnf_var_t *v = &fnf_var[g->var];+ while (g->event < v->event + v->nevent && fnf_event[g->event].t <= t) event(g, &fnf_event[g->event++]);+ for (int32_t k = (int32_t)floor_div(fnf_steps(g, t), 1 << 16); g->step < k;) {+ g->step++;+ step_hit(g, g->step, step_time(g, g->step));+ }+ for (int i = 0; i < FNF_ACTIVE; i++) {+ fnf_note_t *n = &g->note[i];+ if (n->state == NOTE_WAIT) {+ if (n->lane >= 4) {+ if (t >= n->t) { /* the opponent hits its notes on time */+ actors_on(g, 1, n->lane & 3, n->kind, false, t);+ g->strum[n->lane] = STRUM_CONFIRM, g->strum_at[n->lane] = t;+ n->hit = t;+ n->state = NOTE_GONE;+ if (n->len > 0) n->hold = HOLD_ON;}- if(n->state==WAITING&&time>n->time+WINDOW)miss_note(g,n);- if(n->state==MISSED){if(n->end>time)active_hold=true;if(time>n->end+WINDOW)retire(g,n);}+ } else if (t - g->offset > n->t + FNF_WINDOW) {+ miss(g, n, t);+ }+ } else if (holding(n)) {+ int32_t end = n->t + n->len;+ if (n->lane >= 4) {+ for (int k = 0; k < FNF_ACTORS; k++) /* the opponent sings on through its holds */+ if (g->actor[k].side == 1 && g->actor[k].singing) g->actor[k].hold = t < end ? t : end;+ if (t >= end) n->hold = HOLD_DONE;+ } else if (t >= end) {+ n->hold = HOLD_DONE;+ } else if (t > n->t && !(g->held >> n->lane & 1)) {+ drop(g, n, t);+ }}- for(unsigned lane=0;lane<4;lane++)if(pressed&(1u<<lane)){- Note*best=NULL;for(unsigned i=0;i<NOTE_CAP;i++){Note*n=&g->notes[i];if(n->direction==lane&&n->state==WAITING&&abs(time-n->time)<=WINDOW&&(!best||n->time<best->time))best=n;}- if(best){int32_t head=best->time;hit_note(g,best);/* Same-lane stacked notes are one press, as in the original. */- for(unsigned i=0;i<NOTE_CAP;i++){Note*n=&g->notes[i];if(n->direction==lane&&n->state==WAITING&&abs(n->time-head)<16)hit_note(g,n);}}- else if(!g->p.ghost||near||active_hold||time-g->last_hit<6000){if(time>=0){g->score_milli-=10000;g->health-=.08f;g->judgement=MISS;g->judgement_at=time;Note fake={.direction=(uint8_t)lane};sing(g,&fake,true);}}+ }+ if (g->health <= 0 && g->over == FNF_PLAYING) g->over = FNF_DIED, g->over_at = t;+ if (t >= g->length && g->over == FNF_PLAYING) g->over = FNF_WON, g->over_at = t;+}++static void visuals(fnf_game_t *g, int32_t t) {+ /* the health bar catches up: lerp(shown, health, 0.15) each frame at 60 a second */+ if (t > g->shown_at) {+ float k = 1 - powf(0.85f, (float)(t - g->shown_at) * 60e-6f);+ g->health_shown += (int32_t)((g->health - g->health_shown) * k);+ g->shown_at = t;+ }+ /* the scroll speed's change */+ if (g->speed_t1 > g->speed_t0 && t < g->speed_t1) {+ int64_t x = (int64_t)(t - g->speed_t0) * 1000 / (g->speed_t1 - g->speed_t0);+ if (x < 0) x = 0;+ g->speed = g->speed_from + (int32_t)((g->speed_to - g->speed_from) * x / 1000); /* (linear; drawn eased) */+ } else {+ g->speed = g->speed_to;+ }+ stop_singing(g, t);+ for (int i = 0; i < FNF_ACTORS; i++)+ if (g->actor[i].locked && finished(&g->actor[i], t)) g->actor[i].locked = 0;+ /* the opponent's arrows light up 0.15 s (after the strum's confirm), the player's go back after theirs if held */+ for (int l = 0; l < 8; l++) {+ if (g->strum[l] != STRUM_CONFIRM) continue;+ bool on = false;+ for (int i = 0; i < FNF_ACTIVE; i++)+ if (g->note[i].lane == l && holding(&g->note[i])) on = true;+ if (on) continue;+ int32_t limit = l >= 4 ? 150000 : 167000 + 150000; /* (confirm: 4 frames at 24 fps) */+ if (t - g->strum_at[l] >= limit) g->strum[l] = l < 4 && (g->held >> l & 1) ? STRUM_PRESS : STRUM_STATIC;+ }+}++void fnf_advance(fnf_game_t *g, int32_t t) {+ if (t < g->now) return;+ while (g->over == FNF_PLAYING) {+ bring_notes(g);+ int32_t n = next_thing(g);+ if (n > t) break;+ if (n < g->now) n = g->now;+ at(g, n);+ settle(g);+ if (n == t) break;+ }+ if (g->over == FNF_PLAYING && g->now < t) {+ at(g, t);+ settle(g);+ } else if (g->now < t) {+ g->now = t;+ }+ bring_notes(g);+ visuals(g, g->now);+}++/* ------------------------------------------------------------------------------------------------ keys */+void fnf_press(fnf_game_t *g, int lane, int32_t t) {+ if (lane < 0 || lane > 3 || (g->held >> lane & 1)) return;+ fnf_advance(g, t);+ if (g->over != FNF_PLAYING) return;+ g->held |= (uint8_t)(1 << lane);+ for (int i = 0; i < FNF_ACTORS; i++)+ if (g->actor[i].side == 0 && g->actor[i].singing) g->actor[i].hold = t; /* (justPressedNote) */+ int32_t judged = t - g->offset;+ fnf_note_t *best = 0;+ for (int i = 0; i < FNF_ACTIVE; i++) {+ fnf_note_t *n = &g->note[i];+ if (n->state != NOTE_WAIT || n->lane != lane) continue;+ int32_t d = judged - n->t;+ if (d < -FNF_WINDOW || d > FNF_WINDOW) continue;+ if (!best || n->t < best->t) best = n;+ }+ if (best) {+ hit(g, best, judged);+ } else { /* a ghost miss (no ghost tapping in the game: PlayState.ghostNoteMiss) */+ health(g, H_MISS);+ g->score -= GHOST_POINTS * 1000;+ actors_on(g, 0, lane, 0, true, t);+ g->strum[lane] = STRUM_PRESS, g->strum_at[lane] = t;+ }+ settle(g);+ visuals(g, g->now);+}++void fnf_release(fnf_game_t *g, int lane, int32_t t) {+ if (lane < 0 || lane > 3 || !(g->held >> lane & 1)) return;+ fnf_advance(g, t);+ g->held &= (uint8_t)~(1 << lane);+ g->strum[lane] = STRUM_STATIC, g->strum_at[lane] = t;+ if (g->over == FNF_PLAYING) settle(g);+ visuals(g, g->now);+}++/* ------------------------------------------------------------------------------------------------ the start */+static bool check(fnf_game_t *g, const fnf_chart_t *c) {+ /* every note readable, in order, as many as the chart says */+ unsigned count = 0;+ int32_t t = 0;+ g->pos = 0;+ while (g->pos < g->end) {+ fnf_note_t n;+ g->next = t;+ if (!next_note(g, &n)) return false;+ t = n.t;+ count++;+ }+ g->pos = 0, g->next = 0;+ return count == c->notes;+}++bool fnf_start(fnf_game_t *g, unsigned chart, uint8_t *buf, int32_t offset_ms, bool story) {+ memset(g, 0, sizeof *g);+ if (chart >= FNF_CHARTS) return false;+ const fnf_chart_t *c = &fnf_chart[chart];+ const fnf_var_t *v = &fnf_var[c->var];+ const fnf_stage_t *st = &fnf_stage[v->stage];+ if (c->raw > FNF_CHART_RAW_MAX ||+ fnf_inflate(fnf_blob + c->at, c->size, buf, FNF_CHART_RAW_MAX) != (int32_t)c->raw)+ return false;+ g->chart = (uint16_t)chart, g->var = (uint8_t)c->var, g->style = v->style, g->story = story;+ g->notes = buf, g->pos = 0, g->end = c->raw;+ if (!check(g, c)) return false;+ for (int i = 0; i < FNF_ACTIVE; i++) g->note[i].state = NOTE_GONE;+ g->offset = offset_ms * 1000;+ g->total = c->total;+ g->health = g->health_shown = FNF_HEALTH_MAX / 2;+ g->length = (int32_t)(v->length * 1000);+ g->tempo = v->tempo, g->event = v->event;+ g->speed = g->speed_from = g->speed_to = c->speed;+ g->bop_intensity = 1000, g->bop_rate = 16, g->bop_offset = 0;+ g->rng = 0x9E3779B9u ^ chart;+ for (int i = 0; i < FNF_ACTORS; i++) g->actor[i].chr = 255, g->actor[i].anim = 255;+ for (int r = 0; r < 3; r++) {+ fnf_actor_t *a = &g->actor[r];+ a->chr = v->chr[r], a->side = (uint8_t)r, a->visible = 1;+ int place = r == ROLE_OPPONENT && (v->flags & FNF_VF_OPPONENT_AT_GF) ? ROLE_GF : r;+ a->x = st->feet[place][0], a->y = st->feet[place][1];+ }+ for (int w = 0; w < 2; w++) {+ unsigned c = v->chr[w];+ g->icon[w] = c != 255 ? fnf_char[c].icon : 0;+ g->icon_flip[w] = (uint8_t)((c != 255 && (fnf_char[c].flags & FNF_CHAR_ICON_FLIP) ? 1 : 0) ^ (w == 0));+ }+ if (v->extra) { /* LE SSERAFIM: six of them, who sings and who's seen set by the song's events */+ static const uint8_t extra[3] = {FNF_CHR_SSERAFIM_YUNJIN, FNF_CHR_SSERAFIM_CHAEWON, FNF_CHR_SSERAFIM_EUNCHAE};+ for (int i = 0; i < 3; i++) {+ fnf_actor_t *a = &g->actor[3 + i];+ a->chr = extra[i], a->side = 1, a->x = st->extra[i][0], a->y = st->extra[i][1];}- g->held=held;if(g->health>2)g->health=2;- if(g->health<=0){g->health=0;g->lost=1;return;}- if(time>=charts[g->chart].end)clear(g);+ /* baseVisible: yunjin only (Girlfriend's stays); baseSinging: none sing yours */+ g->actor[3].visible = 1, g->actor[1].visible = 0, g->actor[0].visible = 0, g->actor[2].visible = 1;+ for (int i = 0; i < FNF_ACTORS; i++) g->actor[i].side = 1;+ g->icon_hidden = 1;+ }+ g->now = g->shown_at = fnf_start_time(g);+ g->step = (int32_t)floor_div(fnf_steps(g, g->now), 1 << 16);+ g->next = 0;+ for (int i = 0; i < FNF_ACTORS; i++) dance(&g->actor[i], true, g->now);+ bring_notes(g);+ return true;}-void game_advance(Game*g,int32_t time,uint8_t held){- if(time<g->time||g->won||g->lost)return;- while(time-g->time>256&&!g->won&&!g->lost)tick(g,g->time+256,g->held);- if(!g->won&&!g->lost)tick(g,time,held);++/* ------------------------------------------------------------------------------------------------ for the screen */+unsigned fnf_actor_sprite(const fnf_game_t *g, int i) {+ const fnf_actor_t *a = &g->actor[i];+ const fnf_anim_t *an = anim_of(a);+ if (!an) return FNF_NONE;+ int64_t f = (int64_t)(g->now - a->since) * an->fps / 1000000;+ if (f < 0) f = 0;+ if (an->flags & FNF_AF_LOOP) f %= an->len ? an->len : 1;+ int k = 0;+ for (int j = 1; j < an->n; j++)+ if (an->at[j] <= f) k = j;+ return an->sprite + (unsigned)k;+}++int fnf_countdown(const fnf_game_t *g, int32_t *age) {+ int32_t beat = (int32_t)floor_div(fnf_steps(g, g->now), 1 << 18);+ if (beat < -3 || beat > -1) return 0;+ *age = g->now - step_time(g, beat * 4);+ return beat + 4;}-void game_set_held(Game*g,uint8_t held){g->held=held;}diff --git a/games/fnf/src/game.h b/games/fnf/src/game.hindex 81fefa41..22ca972e 100644--- a/games/fnf/src/game.h+++ b/games/fnf/src/game.h@@ -1,36 +1,118 @@+/* A song being played: the chart's notes against your presses, scored as the game scores them (PBOT1: the+ * points follow how close each press is, the judgement is Sick, Good, Bad or Shit), the health, the combo, the+ * holds, the misses and the characters singing and dancing to the beat. Times are microseconds of the song (0: its+ * first beat; the countdown is before). Everything is whole numbers, so a song plays the same everywhere. */#ifndef FNF_GAME_H#define FNF_GAME_H#include <stdbool.h>#include "data.h"-#define NOTE_CAP 64-#define WINDOW (160*16)-enum { TITLE,STORY,FREEPLAY,OPTIONS,CREDITS,PLAY,PAUSE,RESULT,QUIT,SAVE_ERROR };-enum { WAITING,HOLDING,FINISHED,MISSED };-enum { SICK,GOOD,BAD,SHIT,MISS };-typedef struct { int32_t score; uint16_t completion,combo; } Record;-typedef struct { Record record[CHART_COUNT]; uint16_t weeks; uint8_t downscroll,ghost,beat; } Progress;-typedef struct { int32_t time,end; uint8_t direction,kind,state; } Note;-typedef struct { uint16_t character,animation,icon[2]; int32_t since,until; uint8_t visible,side; } Actor;++#define FNF_ACTIVE 128 /* notes on their way at once */+#define FNF_WINDOW 160000 /* the hit window, each side (us) */+#define FNF_HEALTH_MAX 2000000 /* health, in millionths */+#define FNF_ACTORS 6+#define FNF_POPS 12++enum { J_SICK, J_GOOD, J_BAD, J_SHIT, J_MISS };+/* a note's head: on its way, gone (hit, or the place is free), hit late or early (Bad, Shit: it scrolls on, faded),+ * missed (it scrolls on); its hold: none (or not reached yet), held, done, let go of (hidden), missed (scrolls on) */+enum { NOTE_WAIT, NOTE_GONE, NOTE_FADED, NOTE_MISSED };+enum { HOLD_NONE, HOLD_ON, HOLD_DONE, HOLD_DROPPED, HOLD_MISSED };+enum { FNF_PLAYING, FNF_WON, FNF_DIED };+enum { ROLE_PLAYER, ROLE_OPPONENT, ROLE_GF };+enum { STRUM_STATIC, STRUM_PRESS, STRUM_CONFIRM };+typedef struct {- Progress p;- Note notes[NOTE_CAP];- Actor actors[6];- uint32_t read,end,decoded; int32_t stream_time,time,last_hit,judgement_at;- int64_t score_milli;- float bpm,beat,health,speed,speed_from,speed_to,zoom,dark,bop;- int32_t speed_start,speed_end,flash_until;- uint16_t chart,event,tempo,combo,max_combo,judged[5],peak;- uint16_t count,focus; uint8_t held,judgement,won,lost,fault,dirty,beautiful,cover,pulse;-} Game;-void game_init(Game*);-bool game_start(Game*,unsigned);-void game_advance(Game*,int32_t,uint8_t);-void game_set_held(Game*,uint8_t);-int game_judge(int32_t);-int game_points(int32_t);-unsigned game_completion(const Game*);-const char* game_rank(const Game*);-unsigned game_chart(unsigned,unsigned,unsigned);-uint8_t game_lanes(uint64_t);-uint32_t game_varint(uint32_t*,uint32_t,bool*);+ int32_t t, len; /* when, and a hold's length */+ int32_t hit; /* when it was hit */+ uint8_t lane, kind, state, hold;+} fnf_note_t;++typedef struct {+ uint8_t chr; /* fnf_char, 255: nobody */+ uint8_t side; /* sings the player's notes (0), the opponent's (1), or neither (2) */+ uint8_t visible, danced; /* danced: the last dance was danceLeft (next: danceRight) */+ uint8_t anim; /* its own animation number, 255: none yet */+ uint8_t locked; /* a special animation nothing else may cut until it ends */+ uint8_t singing; /* 1: a sing animation, 2: a miss one */+ int32_t since; /* when the animation started */+ int32_t hold; /* the hold timer's start (it sings on until singTime after it) */+ int16_t x, y; /* its feet on the screen */+} fnf_actor_t;++typedef struct {+ uint8_t what; /* 0-3 a judgement, 10-19 a digit, 255 none */+ int32_t at; /* when it popped */+ int16_t x, y, vx, vy, ay; /* pixels, pixels a second, pixels a second squared */+ int32_t fade; /* when it starts fading (0.2 s) */+} fnf_pop_t;++typedef struct {+ /* what's played */+ uint16_t chart;+ uint8_t var, style;+ const uint8_t *notes; /* the chart, unpacked */+ uint32_t pos, end;+ int32_t next; /* the next note's time, not on its way yet (INT32_MAX: none left) */+ fnf_note_t note[FNF_ACTIVE];+ uint16_t active, peak;+ /* time */+ int32_t now, length;+ int32_t step; /* the last step reached (whole steps, can be negative) */+ uint16_t tempo, event;+ int32_t offset; /* the note offset: presses count this much earlier (us) */+ /* the score */+ int64_t score; /* thousandths of a point */+ int32_t health;+ int32_t bonus_rest, score_rest; /* (the hold bonus's leftover fractions) */+ uint16_t combo, max_combo, tally[5], hits, total;+ uint8_t held; /* the lanes held down */+ uint8_t over; /* FNF_PLAYING, FNF_WON, FNF_DIED */+ int32_t over_at;+ /* what's seen */+ fnf_actor_t actor[FNF_ACTORS];+ int32_t bop_at; /* the last camera bop */+ int32_t bop_cam, bop_hud; /* its strength: the camera's zoom - 1 and the HUD's, millionths */+ int32_t bop_intensity; /* SetCameraBop's, thousandths */+ uint16_t bop_rate; /* a bop every bop_rate steps (0: never), from bop_offset */+ uint8_t bop_offset;+ int32_t icon_at; /* the icons' last bop */+ uint8_t icon[2]; /* the player's and the opponent's health icons */+ uint8_t icon_flip[2]; /* (facing the other way: the player's faces left, HealthIcon) */+ uint8_t icon_hidden; /* (LE SSERAFIM hides the opponent's) */+ int32_t health_shown; /* the health bar, catching up with the health */+ int32_t shown_at;+ fnf_pop_t pop[FNF_POPS];+ uint8_t popn;+ uint32_t rng;+ int32_t splash_at[4];+ uint8_t strum[8]; /* STRUM_..., each lane */+ int32_t strum_at[8];+ int32_t speed, speed_from, speed_to, speed_t0, speed_t1; /* scroll speed x 1000, and its change */+ uint8_t speed_ease;+ int32_t dark_from, dark_to, dark_t0, dark_t1; /* LE SSERAFIM's dimming, thousandths */+ uint8_t story; /* (no arrows fading in, in story mode) */+} fnf_game_t;++/* The chart's notes are unpacked into buf (FNF_CHART_RAW_MAX bytes). False if the chart is damaged. */+bool fnf_start(fnf_game_t *g, unsigned chart, uint8_t *buf, int32_t offset_ms, bool story);+void fnf_advance(fnf_game_t *g, int32_t t); /* to time t (never back) */+void fnf_press(fnf_game_t *g, int lane, int32_t t); /* a lane's key down at time t */+void fnf_release(fnf_game_t *g, int lane, int32_t t);+int32_t fnf_start_time(const fnf_game_t *g); /* the countdown's start */+/* the song's beat at time t (16.16 steps: 4 a beat), and a step's length (us) */+int32_t fnf_steps(const fnf_game_t *g, int32_t t);+int32_t fnf_step_len(const fnf_game_t *g, int32_t t);++/* the rules, on their own */+int fnf_judge(int32_t ms); /* J_... for a press ms off (whole ms, signed) */+int fnf_points(int32_t ms);+int32_t fnf_completion(const fnf_game_t *g); /* (sick + good - missed) / total, ten-thousandths, 0-10000 */+int fnf_rank(const fnf_game_t *g); /* 0 LOSS, 1 GOOD, 2 GREAT, 3 EXCELLENT, 4 PERFECT, 5 PERFECT GOLD */+int32_t fnf_score(const fnf_game_t *g); /* whole points, as the game shows and keeps them */++/* a character's frame now: its sprite (FNF_NONE: none) */+unsigned fnf_actor_sprite(const fnf_game_t *g, int i);+/* the combo's sound-free cues: the countdown picture showing (0 none, 1 ready, 2 set, 3 go) and its age (us) */+int fnf_countdown(const fnf_game_t *g, int32_t *age);#endifdiff --git a/games/fnf/src/icon.png b/games/fnf/src/icon.pngindex fabe7cf8..efd1ecf0 100644Binary files a/games/fnf/src/icon.png and b/games/fnf/src/icon.png differdiff --git a/games/fnf/src/inflate.c b/games/fnf/src/inflate.cindex b3b7905a..fa858929 100644--- a/games/fnf/src/inflate.c+++ b/games/fnf/src/inflate.c@@ -1,44 +1,170 @@-/* Bounded RFC 1951 decoder. A level's output is its own history window. */-#include "inflate.h"+/* Raw DEFLATE (RFC 1951) into a buffer, for the pictures and the charts. Huffman codes up to 9 bits long are read+ * through a table of the next 9 bits, longer ones bit by bit; a damaged stream is refused, never overrun. */#include <string.h>-typedef struct {const uint8_t *p,*end; uint32_t bits; unsigned count; bool bad;} Bits;-typedef struct {uint16_t counts[16],symbols[288];} Tree;-static unsigned bits(Bits *b,unsigned n){- while(b->count<n){if(b->p==b->end){b->bad=true;return 0;}b->bits|=(uint32_t)*b->p++<<b->count;b->count+=8;}- unsigned v=b->bits&((1u<<n)-1);b->bits>>=n;b->count-=n;return v;+#include "inflate.h"++#define FAST 9++typedef struct {+ uint16_t count[16], symbol[288];+ uint16_t fast[1 << FAST]; /* length << 9 | symbol, 0: longer than FAST bits */+} huff_t;++typedef struct {+ const uint8_t *in, *end;+ uint32_t bits;+ int nbits, pad; /* pad: zero bytes read past the end (a look ahead may; using them is a damaged stream) */+ int bad;+} reader_t;++static void need(reader_t *r, int n) {+ while (r->nbits < n) {+ uint32_t b = 0;+ if (r->in < r->end) b = *r->in++;+ else if (++r->pad > 4) r->bad = 1;+ r->bits |= b << r->nbits;+ r->nbits += 8;+ }}-static bool tree(Tree *t,const uint8_t *lengths,unsigned n){- memset(t->counts,0,sizeof(t->counts));- for(unsigned i=0;i<n;i++){if(lengths[i]>15)return false;t->counts[lengths[i]]++;}- int left=1;for(unsigned i=1;i<=15;i++){left=(left<<1)-t->counts[i];if(left<0)return false;}- uint16_t offsets[16]={0};for(unsigned i=1;i<15;i++)offsets[i+1]=offsets[i]+t->counts[i];- for(unsigned i=0;i<n;i++)if(lengths[i])t->symbols[offsets[lengths[i]]++]=(uint16_t)i;- return t->counts[0]!=n;++static uint32_t take(reader_t *r, int n) {+ if (!n) return 0;+ need(r, n);+ uint32_t v = r->bits & ((1u << n) - 1);+ r->bits >>= n, r->nbits -= n;+ return v;+}++static int build(huff_t *h, const uint8_t *len, int n) {+ uint16_t offs[16];+ memset(h->count, 0, sizeof h->count);+ memset(h->fast, 0, sizeof h->fast);+ for (int i = 0; i < n; i++) h->count[len[i]]++;+ h->count[0] = 0;+ int left = 1;+ for (int l = 1; l < 16; l++) {+ left = (left << 1) - h->count[l];+ if (left < 0) return 0;+ }+ offs[1] = 0;+ for (int l = 1; l < 15; l++) offs[l + 1] = (uint16_t)(offs[l] + h->count[l]);+ for (int i = 0; i < n; i++)+ if (len[i]) h->symbol[offs[len[i]]++] = (uint16_t)i;+ /* the table: the canonical codes, bit-reversed (the stream gives a code's first bit first) */+ int code = 0, k = 0;+ for (int l = 1; l <= FAST; l++) {+ for (int c = 0; c < h->count[l]; c++, k++, code++) {+ int rev = 0;+ for (int b = 0; b < l; b++) rev |= ((code >> b) & 1) << (l - 1 - b);+ for (int i = rev; i < (1 << FAST); i += 1 << l) h->fast[i] = (uint16_t)(l << 9 | h->symbol[k]);+ }+ code <<= 1;+ }+ return 1;}-static int symbol(Bits *b,const Tree *t){- unsigned code=0,first=0,index=0;- for(unsigned n=1;n<=15;n++){code|=bits(b,1);unsigned count=t->counts[n];if(code>=first&&code-first<count)return t->symbols[index+code-first];index+=count;first=(first+count)<<1;code<<=1;}- b->bad=true;return -1;++static int decode(reader_t *r, const huff_t *h) {+ need(r, FAST);+ uint16_t f = h->fast[r->bits & ((1 << FAST) - 1)];+ if (f) {+ int l = f >> 9;+ r->bits >>= l, r->nbits -= l;+ return f & 511;+ }+ int code = 0, first = 0, index = 0;+ for (int l = 1; l < 16; l++) {+ code |= (int)take(r, 1);+ int count = h->count[l];+ if (code - count < first) return h->symbol[index + (code - first)];+ index += count;+ first = (first + count) << 1;+ code <<= 1;+ }+ r->bad = 1;+ return -1;}-bool inflate_raw(const uint8_t *src,size_t length,uint8_t *out,size_t capacity){- static const uint16_t lb[]={3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258};- static const uint8_t le[]={0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};- static const uint16_t db[]={1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577};- static const uint8_t de[]={0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};- Bits b={src,src+length,0,0,false};size_t used=0;bool final=false;Tree lit,dist;- while(!final&&!b.bad){- final=bits(&b,1);unsigned type=bits(&b,2);- if(type==0){b.bits=0;b.count=0;if((size_t)(b.end-b.p)<4)return false;unsigned n=b.p[0]|b.p[1]<<8,inv=b.p[2]|b.p[3]<<8;b.p+=4;if((n^65535)!=inv||n>capacity-used||(size_t)(b.end-b.p)<n)return false;memcpy(out+used,b.p,n);b.p+=n;used+=n;continue;}- uint8_t lens[320]={0};unsigned nl=288,nd=32;- if(type==1){for(unsigned i=0;i<288;i++)lens[i]=i<144?8:i<256?9:i<280?7:8;for(unsigned i=288;i<320;i++)lens[i]=5;}- else if(type==2){- static const uint8_t order[]={16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};- nl=257+bits(&b,5);nd=1+bits(&b,5);unsigned nc=4+bits(&b,4);uint8_t cl[19]={0};Tree codes;- if(nl>286||nd>32)return false;for(unsigned i=0;i<nc;i++)cl[order[i]]=bits(&b,3);if(!tree(&codes,cl,19))return false;- unsigned n=0;while(n<nl+nd&&!b.bad){int s=symbol(&b,&codes);if(s<0)return false;if(s<16)lens[n++]=(uint8_t)s;else{unsigned repeat=s==16?3+bits(&b,2):s==17?3+bits(&b,3):11+bits(&b,7);if(s==16&&!n)return false;uint8_t value=s==16?lens[n-1]:0;if(n+repeat>nl+nd)return false;while(repeat--)lens[n++]=value;}}- }else return false;- if(!lens[256]||!tree(&lit,lens,nl)||!tree(&dist,lens+nl,nd))return false;- for(;;){int s=symbol(&b,&lit);if(b.bad)return false;if(s<256){if(used==capacity)return false;out[used++]=(uint8_t)s;}else if(s==256)break;else{if(s>285)return false;unsigned n=lb[s-257]+bits(&b,le[s-257]);int d=symbol(&b,&dist);if(d<0||d>=30)return false;unsigned back=db[d]+bits(&b,de[d]);if(b.bad||back>used||n>capacity-used)return false;while(n--){out[used]=out[used-back];used++;}}}++static const uint16_t LEN_BASE[29] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99,+ 115, 131, 163, 195, 227, 258};+static const uint8_t LEN_EXTRA[29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0};+static const uint16_t DIST_BASE[30] = {1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769,+ 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577};+static const uint8_t DIST_EXTRA[30] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11,+ 12, 12, 13, 13};++static huff_t lit, dist; /* (static: 2.6 KB off the stack) */++int32_t fnf_inflate(const uint8_t *in, uint32_t n, uint8_t *out, uint32_t cap) {+ static const uint8_t ORDER[19] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};+ reader_t r = {in, in + n, 0, 0, 0, 0};+ uint32_t o = 0;+ int last;+ do {+ last = (int)take(&r, 1);+ int type = (int)take(&r, 2);+ if (type == 0) { /* stored */+ r.bits >>= r.nbits & 7, r.nbits -= r.nbits & 7;+ uint32_t len = take(&r, 16), nlen = take(&r, 16);+ if ((len ^ 0xFFFF) != nlen || o + len > cap) return -1;+ for (uint32_t i = 0; i < len; i++) out[o++] = (uint8_t)take(&r, 8);+ } else if (type == 1 || type == 2) {+ uint8_t len[320];+ int nlit = 288, ndist = 30;+ if (type == 1) {+ for (int i = 0; i < 288; i++) len[i] = i < 144 ? 8 : i < 256 ? 9 : i < 280 ? 7 : 8;+ for (int i = 0; i < 30; i++) len[288 + i] = 5;+ } else {+ nlit = (int)take(&r, 5) + 257, ndist = (int)take(&r, 5) + 1;+ int ncode = (int)take(&r, 4) + 4;+ if (nlit > 286 || ndist > 30) return -1;+ memset(len, 0, 19);+ for (int i = 0; i < ncode; i++) len[ORDER[i]] = (uint8_t)take(&r, 3);+ if (!build(&lit, len, 19)) return -1;+ for (int i = 0; i < nlit + ndist;) {+ int s = decode(&r, &lit);+ if (s < 0 || r.bad) return -1;+ if (s < 16) {+ len[i++] = (uint8_t)s;+ continue;+ }+ int rep, v = 0;+ if (s == 16) {+ if (!i) return -1;+ v = len[i - 1], rep = 3 + (int)take(&r, 2);+ } else if (s == 17) {+ rep = 3 + (int)take(&r, 3);+ } else {+ rep = 11 + (int)take(&r, 7);+ }+ if (i + rep > nlit + ndist) return -1;+ while (rep--) len[i++] = (uint8_t)v;+ }+ if (!len[256]) return -1;+ }+ if (!build(&lit, len, nlit) || !build(&dist, len + nlit, ndist)) return -1;+ for (;;) {+ int s = decode(&r, &lit);+ if (s < 0 || r.bad) return -1;+ if (s < 256) {+ if (o >= cap) return -1;+ out[o++] = (uint8_t)s;+ } else if (s == 256) {+ break;+ } else {+ s -= 257;+ if (s >= 29) return -1;+ uint32_t l = LEN_BASE[s] + take(&r, LEN_EXTRA[s]);+ int d = decode(&r, &dist);+ if (d < 0 || d >= 30) return -1;+ uint32_t back = DIST_BASE[d] + take(&r, DIST_EXTRA[d]);+ if (r.bad || back > o || o + l > cap) return -1;+ for (uint32_t i = 0; i < l; i++, o++) out[o] = out[o - back];+ }+ }+ } else {+ return -1;}- return !b.bad&&used==capacity;+ if (r.bad || r.pad * 8 > r.nbits) return -1;+ } while (!last);+ return (int32_t)o;}diff --git a/games/fnf/src/inflate.h b/games/fnf/src/inflate.hindex acff3556..1c316db7 100644--- a/games/fnf/src/inflate.h+++ b/games/fnf/src/inflate.h@@ -1,7 +1,7 @@-#ifndef ANGRY_INFLATE_H-#define ANGRY_INFLATE_H-#include <stdbool.h>-#include <stddef.h>+#ifndef FNF_INFLATE_H+#define FNF_INFLATE_H#include <stdint.h>-bool inflate_raw(const uint8_t *src,size_t length,uint8_t *out,size_t capacity);++/* Unpacks n bytes of raw DEFLATE into out (cap bytes at most); returns the size unpacked, or -1 if damaged. */+int32_t fnf_inflate(const uint8_t *in, uint32_t n, uint8_t *out, uint32_t cap);#endifdiff --git a/games/fnf/src/main.c b/games/fnf/src/main.cindex 86888a1a..24925e77 100644--- a/games/fnf/src/main.c+++ b/games/fnf/src/main.c@@ -1,108 +1,388 @@-#include <eadk.h>+/* Friday Night Funkin' on the NumWorks calculator: the songs of the game's weeks against their singers, as the+ * game plays them (game.c), silent (the calculator has no speaker): the notes, the characters and the camera keep+ * the beat. The screens: screens.c and draw.c.+ *+ * Keys: Left, Down, Up and Right (or 7, 8, ( and )) hit the notes; Back pauses; Home saves and quits. */#include <string.h>-#include "render.h"-#include "save.h"-#include "../../common/epsilon_app.h"-#include "../../common/epsilon_files.h"-#ifdef __ELF__-const char eadk_app_name[] __attribute__((section(".rodata.eadk_app_name")))="Friday Night Funkin'";-const uint32_t eadk_api_level __attribute__((section(".rodata.eadk_api_level")))=0;+#include "app.h"+#include "draw.h"+#include "plat.h"++/* (seen by tools/emu.py: the frames drawn in songs, the slowest (ms), those over 33 ms, the longest time between+ * two readings of the keys in a song (ms); and the song, its clock and the app's screen, for tests that play it) */+#ifndef HOST+#define SEEN __attribute__((used, externally_visible))+#else+#define SEEN#endif-#define KEY(k) (UINT64_C(1)<<(k))-static Game game;-static Menu menu;-static uint8_t save_bytes[SAVE_BYTES];-static char backup[BACKUP_BYTES];-static uint32_t saved_crc;+SEEN uint32_t perf_frames, perf_max, perf_slow, perf_gap;+SEEN fnf_game_t G;+SEEN app_t A;+SEEN uint32_t origin; /* the song's clock: plat_millis() at its start */+SEEN int32_t start_us;+static fnf_progress_t P;+static uint8_t *chart_buf; /* the chart, unpacked (on main's stack) */+static uint32_t pause_at;static bool saved;-static uint64_t stale,previous,pending,keys;-typedef struct { uint32_t at; uint8_t lanes; } Input;-static Input inputs[64];-static unsigned input_first,input_count;-static uint8_t last_lanes;-static bool queue_fault;-static uint32_t origin;-uint32_t current_view,perf_frames,perf_max,perf_input_max,input_sample_at,perf_queue_max,perf_updates;-uint32_t perf_play_draw_max,perf_play_input_max;-static void poll(void){- uint32_t at=(uint32_t)eadk_timing_millis();if(input_sample_at&&at-input_sample_at>perf_input_max)perf_input_max=at-input_sample_at;if(menu.view==PLAY&&input_sample_at&&at-input_sample_at>perf_play_input_max)perf_play_input_max=at-input_sample_at;input_sample_at=at;- keys=eadk_keyboard_scan();stale&=keys;uint64_t active=keys&~stale;pending|=active&~previous;previous=active;- uint8_t lanes=game_lanes(active);if(menu.view==PLAY&&lanes!=last_lanes){if(input_count<64){inputs[(input_first+input_count)%64]=(Input){at*16,lanes};input_count++;if(input_count>perf_queue_max)perf_queue_max=input_count;}else queue_fault=true;}last_lanes=lanes;++/* ------------------------------------------------------------------------------------------------ the keys */+typedef struct {+ uint32_t t;+ uint8_t lane, down;+} key_event_t;+static key_event_t queue[64];+static unsigned q_head, q_len;+static uint8_t lanes, stale_lanes;+static uint32_t keys_now, last_poll;++static uint8_t lanes_of(uint32_t k) {+ /* both keys of a lane count as one: holding the other keeps a hold going */+ return (uint8_t)((k & (FK_LEFT | FK_7) ? 1 : 0) | (k & (FK_DOWN | FK_8) ? 2 : 0) | (k & (FK_UP | FK_LPAR) ? 4 : 0) |+ (k & (FK_RIGHT | FK_RPAR) ? 8 : 0));}-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 bool save(void){- save_encode(&game.p,save_bytes);uint32_t crc;memcpy(&crc,save_bytes+SAVE_BYTES-4,4);if(saved&&saved_crc==crc)return true;- unsigned n=save_backup(save_bytes,backup);bool a=ef_write("fnf.sav",save_bytes,SAVE_BYTES),b=ef_write("fnf_save.py",backup,n);- if(a&&b){saved=true;saved_crc=crc;game.dirty=0;}else saved=false;return a&&b;++/* read the keys and time-stamp the lanes' changes (also between the strips of a frame being drawn) */+static void poll(void) {+ uint32_t t = plat_millis();+ if (last_poll && t - last_poll > perf_gap && A.view == V_PLAY) perf_gap = t - last_poll;+ last_poll = t;+ keys_now = plat_keys();+ uint8_t l = lanes_of(keys_now);+ stale_lanes &= l; /* a key held from before counts once let go of */+ l &= (uint8_t)~stale_lanes;+ if (A.view == V_PLAY) {+ uint8_t changed = l ^ lanes;+ for (int i = 0; i < 4; i++)+ if (changed >> i & 1 && q_len < 64) {+ queue[(q_head + q_len) % 64] = (key_event_t){t, (uint8_t)i, (uint8_t)(l >> i & 1)};+ q_len++;+ }+ }+ lanes = l;}-static void begin(unsigned chart){- if(!game_start(&game,chart)){menu.view=RESULT;menu.selected=0;return;}- render_prepare(stage_sprites[tracks[charts[chart].track].stage]);origin=(uint32_t)eadk_timing_millis()*16-(uint32_t)game.time;- input_first=input_count=0;queue_fault=false;menu.view=PLAY;menu.selected=0;stale|=keys;last_lanes=0;game_set_held(&game,0);input_sample_at=(uint32_t)eadk_timing_millis();render_invalidate();+extern void (*draw_between)(void);++static int32_t song_time(uint32_t ms) { return (int32_t)(ms - origin) * 1000 + start_us; }++/* ------------------------------------------------------------------------------------------------ saving */+static void save(void) {+ save_write(&P);+ saved = true;}-static void normalize(void){- if(game_chart(menu.song,menu.variant,menu.difficulty)!=NONE)return;- for(unsigned d=0;d<5;d++)if(game_chart(menu.song,menu.variant,d)!=NONE){menu.difficulty=d;return;}- menu.variant=0;menu.difficulty=1;++/* ------------------------------------------------------------------------------------------------ songs */+static void go(int view) {+ A.view = (uint8_t)view;+ A.menu_at = A.clock;}-static void change_difficulty(int step){- for(unsigned i=0;i<5;i++){menu.difficulty=(menu.difficulty+5+step)%5;if(game_chart(menu.song,menu.variant,menu.difficulty)!=NONE)return;}++static void menu_back(void) {+ go(A.story ? V_STORY : V_FREEPLAY);+ A.story = 0;}-static void select_songs(void){menu.view=menu.story?STORY:FREEPLAY;menu.selected=0;input_count=0;stale|=keys;}-int main(void){- np_app_begin();game_init(&game);menu=(Menu){.view=TITLE,.difficulty=1};uint32_t n=0;const uint8_t*p=ef_read("fnf.sav",&n);bool loaded=save_decode(&game.p,p,n);- if(!loaded){p=ef_read("fnf_save.py",&n);save_restore(&game.p,p,n);}- keys=eadk_keyboard_scan();stale=keys;previous=pending=0;unsigned painted=999;bool exiting=false;uint32_t draw_at=0;unsigned quit_return=TITLE;- while(!exiting){- poll();uint32_t now=(uint32_t)eadk_timing_millis();uint64_t hit=pending;pending=0;- bool ok=hit&(KEY(eadk_key_ok)|KEY(eadk_key_exe)),back=hit&KEY(eadk_key_back),up=hit&KEY(eadk_key_up),down=hit&KEY(eadk_key_down),left=hit&KEY(eadk_key_left),right=hit&KEY(eadk_key_right);- if(menu.view!=SAVE_ERROR&&(keys&(KEY(eadk_key_home)|KEY(eadk_key_on_off)))){if(save())break;menu.view=SAVE_ERROR;menu.selected=0;stale|=keys;hit=0;ok=back=up=down=left=right=false;}- if(menu.view==PLAY){- /* Process actual timestamps sampled between LCD strips. Rendering never- * advances the song, and a slow frame never changes the judgement window. */- while(input_count){Input in=inputs[input_first];input_first=(input_first+1)%64;input_count--;int32_t time=(int32_t)(in.at-origin);if(time>=game.time)game_advance(&game,time,in.lanes);}- game_advance(&game,(int32_t)(now*16-origin),last_lanes);perf_updates++;- if(queue_fault){game.fault=game.lost=1;}- if(game.won||game.lost){menu.view=RESULT;menu.selected=0;- if(game.won&&menu.story&&menu.story_song+1==levels[menu.week].count){game.p.weeks|=1u<<menu.week;game.dirty=1;}- if(game.dirty&&!save())menu.view=SAVE_ERROR;stale|=keys;- }else if(back){menu.view=PAUSE;menu.selected=0;input_count=0;stale|=keys;}- }else if(menu.view==TITLE){- if(up)menu.selected=(menu.selected+2)%3;if(down)menu.selected=(menu.selected+1)%3;- if(hit&KEY(eadk_key_zero))menu.view=CREDITS;- else if(back){quit_return=TITLE;menu.view=QUIT;menu.selected=0;}- else if(ok){if(menu.selected==0){menu.view=STORY;menu.difficulty=1;}else if(menu.selected==1){menu.view=FREEPLAY;normalize();}else {menu.view=OPTIONS;menu.selected=0;}}- }else if(menu.view==STORY){- if(up)menu.week=(menu.week+LEVEL_COUNT-1)%LEVEL_COUNT;if(down)menu.week=(menu.week+1)%LEVEL_COUNT;- if(left)menu.difficulty=(menu.difficulty+2)%3;if(right)menu.difficulty=(menu.difficulty+1)%3;- if(back){menu.view=TITLE;menu.selected=0;}else if(ok){menu.story=true;menu.story_song=0;menu.song=levels[menu.week].song[0];menu.variant=0;begin(game_chart(menu.song,0,menu.difficulty));}- }else if(menu.view==FREEPLAY){- if(up){menu.song=(menu.song+SONG_COUNT-1)%SONG_COUNT;menu.variant=0;normalize();}if(down){menu.song=(menu.song+1)%SONG_COUNT;menu.variant=0;normalize();}- if(left)change_difficulty(-1);if(right)change_difficulty(1);- if(hit&KEY(eadk_key_one)){for(unsigned i=0;i<4;i++){menu.variant=(menu.variant+1)%4;bool found=false;for(unsigned d=0;d<5;d++)if(game_chart(menu.song,menu.variant,d)!=NONE)found=true;if(found)break;}normalize();}- if(back){menu.view=TITLE;menu.selected=1;}else if(ok){menu.story=false;begin(game_chart(menu.song,menu.variant,menu.difficulty));}- }else if(menu.view==OPTIONS){- if(up)menu.selected=(menu.selected+2)%3;if(down)menu.selected=(menu.selected+1)%3;- if(ok||left||right){uint8_t*v=menu.selected==0?&game.p.downscroll:menu.selected==1?&game.p.ghost:&game.p.beat;*v^=1;game.dirty=1;}- if(back){menu.view=TITLE;menu.selected=2;}- }else if(menu.view==CREDITS){if(ok||back){menu.view=TITLE;menu.selected=0;}}- else if(menu.view==PAUSE){- if(up)menu.selected=(menu.selected+3)%4;if(down)menu.selected=(menu.selected+1)%4;- if(back||(ok&&menu.selected==0)){menu.view=PLAY;input_count=0;queue_fault=false;origin=now*16-(uint32_t)game.time;game_set_held(&game,last_lanes);stale|=keys&(KEY(eadk_key_ok)|KEY(eadk_key_exe)|KEY(eadk_key_back));}- else if(ok&&menu.selected==1)begin(game.chart);- else if(ok&&menu.selected==2)select_songs();- else if(ok){quit_return=PAUSE;menu.view=QUIT;menu.selected=0;}- }else if(menu.view==RESULT){- if(up||down||left||right)menu.selected^=1;- if(back||(ok&&menu.selected==1))select_songs();else if(ok){if(game.won&&menu.story){menu.story_song++;if(menu.story_song>=levels[menu.week].count)select_songs();else{menu.song=levels[menu.week].song[menu.story_song];begin(game_chart(menu.song,0,menu.difficulty));}}else begin(game.chart);}- }else if(menu.view==QUIT){- if(up||down||left||right)menu.selected^=1;if(back||(ok&&menu.selected==0)){menu.view=quit_return;menu.selected=0;}else if(ok){if(save())exiting=true;else menu.view=SAVE_ERROR;}- }else if(menu.view==SAVE_ERROR){if(ok&&save())exiting=true;if(back)exiting=true;if(hit&KEY(eadk_key_one)){menu.view=TITLE;menu.selected=0;}}- current_view=menu.view;- if(painted!=menu.view||hit||!perf_frames||(menu.view==PLAY&&now-draw_at>=16)){- if(painted!=menu.view)render_invalidate();uint32_t at=(uint32_t)eadk_timing_millis();render(&game,&menu,push,poll);uint32_t used=(uint32_t)eadk_timing_millis()-at;if(used>perf_max)perf_max=used;if(menu.view==PLAY&&used>perf_play_draw_max)perf_play_draw_max=used;perf_frames++;draw_at=now;painted=menu.view;++static unsigned current_chart(void) {+ if (A.story) return (unsigned)app_story_chart(fnf_level[P.week].song[A.story_song], P.week_diff);+ return (unsigned)app_chart(A.list[P.song < A.list_n ? P.song : 0], P.list, P.song_diff);+}++static void start_song(bool fresh) {+ unsigned chart = current_chart();+ if (chart >= FNF_CHARTS || !fnf_start(&G, chart, chart_buf, P.offset, A.story) || !play_load(&G)) {+ go(V_ERROR);+ return;+ }+ origin = last_poll = plat_millis(); /* (the time unpacking took isn't a gap in the keys' reading) */+ if (fresh) A.play_t0 = origin;+ else A.play_t0 = origin - 5000; /* (a restart: the arrows are there already) */+ start_us = G.now;+ q_len = 0;+ stale_lanes = lanes_of(keys_now);+ lanes = 0;+ go(V_PLAY);+}++/* the guide the first time, then the song */+static void begin(void) {+ if (!P.guide) {+ P.guide = 1;+ A.first_run = 1, A.page = 0, A.under = V_PLAY;+ go(V_HELP);+ return;+ }+ start_song(true);+}++static void results(const fnf_game_t *g, bool week) {+ if (week) {+ fnf_game_t sum;+ memset(&sum, 0, sizeof sum);+ memcpy(sum.tally, A.week_tally, sizeof sum.tally);+ sum.total = A.week_total;+ A.result_rank = (uint8_t)fnf_rank(&sum);+ A.result_completion = fnf_completion(&sum);+ memcpy(A.result_tally, A.week_tally, sizeof A.result_tally);+ A.result_total = A.week_total, A.result_max_combo = A.week_max_combo;+ A.result_score = A.campaign;+ } else {+ A.result_rank = (uint8_t)fnf_rank(g);+ A.result_completion = fnf_completion(g);+ memcpy(A.result_tally, g->tally, sizeof A.result_tally);+ A.result_total = g->total, A.result_max_combo = g->max_combo;+ A.result_score = fnf_score(g);+ }+ go(V_RESULTS);+}++static void song_won(void) {+ int32_t score = fnf_score(&G);+ int32_t *best = A.story ? &P.week_score[P.week][P.week_diff] : &P.chart[G.chart].score;+ int32_t before = *best;+ bool had = A.story ? true : P.chart[G.chart].rank != 0;+ fnf_record(&P, G.chart, score, fnf_rank(&G), fnf_completion(&G));+ if (A.story) {+ A.campaign += score;+ for (int j = 0; j < 5; j++) A.week_tally[j] = (uint16_t)(A.week_tally[j] + G.tally[j]);+ A.week_total = (uint16_t)(A.week_total + G.total);+ if (G.max_combo > A.week_max_combo) A.week_max_combo = G.max_combo;+ if (A.story_song + 1 < fnf_level[P.week].n) {+ A.story_song++;+ save();+ start_song(true);+ return;+ }+ A.result_new = A.campaign > before || !before;+ if (A.campaign > *best || !*best) *best = A.campaign;+ save();+ results(&G, true);+ return;+ }+ A.result_new = !had || score > before;+ save();+ results(&G, false);+}++static void resume(void) {+ uint32_t now = last_poll = plat_millis();+ origin += now - pause_at;+ /* keys let go of during the pause: let go of now; keys pressed during it: not until let go of */+ uint8_t l = lanes_of(keys_now);+ int32_t t = song_time(now);+ for (int i = 0; i < 4; i++)+ if ((G.held >> i & 1) && !(l >> i & 1)) fnf_release(&G, i, t);+ stale_lanes = (uint8_t)(l & ~G.held);+ lanes = (uint8_t)(l & G.held);+ q_len = 0;+ G.offset = P.offset * 1000;+ go(V_PLAY);+}++/* ------------------------------------------------------------------------------------------------ menus */+static int wrap(int v, int n) { return ((v % n) + n) % n; }++static void story_diff_fix(void) {+ unsigned diffs = app_story_diffs(P.week);+ for (int i = 0; i < FNF_DIFFS && !(diffs >> P.week_diff & 1); i++) P.week_diff = (uint8_t)((P.week_diff + 1) % FNF_DIFFS);+}++static void song_diff_fix(void) {+ if (!A.list_n) return;+ if (P.song >= A.list_n) P.song = 0;+ for (int i = 0; i < FNF_DIFFS && app_chart(A.list[P.song], P.list, P.song_diff) < 0; i++)+ P.song_diff = (uint8_t)((P.song_diff + 1) % FNF_DIFFS);+}++static void play_keys(uint32_t hit) {+ if (hit & FK_BACK) {+ pause_at = plat_millis();+ A.sel = PAUSE_RESUME;+ go(V_PAUSE);+ }+}++int main(void) {+ /* (the big buffers on the stack: the app's RAM stays under what custom builds of Epsilon give it) */+ uint8_t chart[FNF_CHART_RAW_MAX];+ color_t strip[SCREEN_W * STRIP_H];+ if (!chart_buf) chart_buf = chart;+ draw_strip_buffer(strip);+ plat_begin();+ memset(&A, 0, sizeof A);+ A.p = &P, A.g = &G;+ save_load(&P);+ bold_load();+ draw_between = poll;+ keys_now = plat_keys();+ uint32_t stale = keys_now, prev = stale, rep_at = 0;+ uint8_t shown = 0xFF;+ go(V_TITLE);+ app_build_list(&A);+ bool quit = false;+ while (!quit) {+ poll();+ uint32_t now = plat_millis();+ A.clock = now;+ uint32_t keys = keys_now;+ stale &= keys; /* keys still down from the screen before don't count */+ uint32_t live = keys & ~stale, hit = live & ~prev;+ /* arrows held: again after 350 ms, then every 110 ms (not in a song) */+ uint32_t arrows = live & (FK_LEFT | FK_RIGHT | FK_UP | FK_DOWN);+ if (A.view != V_PLAY) {+ if (hit & arrows) rep_at = now + 350;+ else if (arrows && (int32_t)(now - rep_at) >= 0) hit |= arrows, rep_at = now + 110;+ }+ prev = live;+ if (keys & FK_HOME) break; /* Home: saved below, then out */+ int up = hit & FK_UP ? -1 : 0, down = hit & FK_DOWN ? 1 : 0, ud = up + down;+ int lr = (hit & FK_RIGHT ? 1 : 0) - (hit & FK_LEFT ? 1 : 0);+ switch (A.view) {+ case V_TITLE:+ if (hit & FK_OK) A.sel = MAIN_STORY, go(V_MAIN);+ else if (hit & FK_BACK) quit = true;+ break;+ case V_MAIN:+ A.sel = (uint8_t)wrap(A.sel + ud, MAIN_COUNT);+ if (hit & FK_BACK) go(V_TITLE);+ else if (hit & FK_OK) switch (A.sel) {+ case MAIN_STORY: story_diff_fix(), go(V_STORY); break;+ case MAIN_FREEPLAY: app_build_list(&A), song_diff_fix(), go(V_FREEPLAY); break;+ case MAIN_OPTIONS: A.under = V_MAIN, A.sel = 0, go(V_OPTIONS); break;+ case MAIN_HELP: A.under = V_MAIN, A.page = 0, A.first_run = 0, go(V_HELP); break;+ default: go(V_CREDITS); break;}- eadk_timing_msleep(1);+ break;+ case V_STORY:+ if (ud) P.week = (uint8_t)wrap(P.week + ud, FNF_LEVELS), story_diff_fix();+ if (lr) {+ unsigned diffs = app_story_diffs(P.week);+ for (int i = 0; i < FNF_DIFFS; i++) {+ P.week_diff = (uint8_t)wrap(P.week_diff + lr, FNF_DIFFS);+ if (diffs >> P.week_diff & 1) break;+ }+ }+ if (hit & FK_BACK) A.sel = MAIN_STORY, go(V_MAIN);+ else if (hit & FK_OK) {+ A.story = 1, A.story_song = 0, A.campaign = 0;+ memset(A.week_tally, 0, sizeof A.week_tally);+ A.week_total = A.week_max_combo = 0;+ begin();+ }+ break;+ case V_FREEPLAY:+ if (ud && A.list_n) P.song = (uint8_t)wrap(P.song + ud, A.list_n), song_diff_fix();+ if (lr && A.list_n)+ for (int i = 0; i < FNF_DIFFS; i++) {+ P.song_diff = (uint8_t)wrap(P.song_diff + lr, FNF_DIFFS);+ if (app_chart(A.list[P.song], P.list, P.song_diff) >= 0) break;+ }+ if (hit & FK_SHIFT) { /* Boyfriend's songs, or Pico's */+ unsigned song = A.list_n ? A.list[P.song] : 0;+ P.list ^= 1;+ app_build_list(&A);+ P.song = 0;+ for (int i = 0; i < A.list_n; i++)+ if (A.list[i] == song) P.song = (uint8_t)i;+ song_diff_fix();+ }+ if (hit & FK_BACK) A.sel = MAIN_FREEPLAY, go(V_MAIN);+ else if ((hit & FK_OK) && A.list_n) A.story = 0, begin();+ break;+ case V_OPTIONS:+ A.sel = (uint8_t)wrap(A.sel + ud, OPT_COUNT);+ if (A.sel == OPT_DOWNSCROLL && (lr || (hit & FK_OK))) P.downscroll ^= 1;+ if (A.sel == OPT_OFFSET && lr) {+ int o = P.offset + lr;+ P.offset = (int16_t)(o < -FNF_OFFSET_MAX ? -FNF_OFFSET_MAX : o > FNF_OFFSET_MAX ? FNF_OFFSET_MAX : o);+ }+ if (hit & FK_BACK) {+ save();+ A.sel = A.under == V_PAUSE ? PAUSE_OPTIONS : MAIN_OPTIONS;+ go(A.under);+ }+ break;+ case V_HELP:+ if (A.first_run && (hit & FK_BACK)) {+ A.first_run = 0;+ save();+ start_song(true);+ } else if ((lr > 0 || (A.first_run && (hit & FK_OK))) && A.page + 1 < HELP_PAGES) {+ A.page++;+ } else if (lr < 0 && A.page) {+ A.page--;+ } else if (A.first_run && (hit & FK_OK)) {+ A.first_run = 0;+ save();+ start_song(true);+ } else if (hit & (FK_BACK | FK_OK)) {+ A.sel = A.under == V_PAUSE ? PAUSE_HELP : MAIN_HELP;+ go(A.under);+ }+ break;+ case V_CREDITS:+ if (hit & (FK_BACK | FK_OK)) A.sel = MAIN_CREDITS, go(V_MAIN);+ break;+ case V_PLAY: {+ while (q_len) {+ key_event_t e = queue[q_head];+ q_head = (q_head + 1) % 64, q_len--;+ int32_t t = song_time(e.t);+ if (t < G.now) t = G.now;+ if (e.down) fnf_press(&G, e.lane, t);+ else fnf_release(&G, e.lane, t);+ }+ fnf_advance(&G, song_time(plat_millis()));+ if (G.over == FNF_WON) song_won();+ else if (G.over == FNF_DIED) A.sel = 0, go(V_GAMEOVER);+ else play_keys(hit);+ break;+ }+ case V_PAUSE:+ A.sel = (uint8_t)wrap(A.sel + ud, PAUSE_COUNT);+ if (hit & FK_BACK) resume();+ else if (hit & FK_OK) switch (A.sel) {+ case PAUSE_RESUME: resume(); break;+ case PAUSE_RESTART: start_song(false); break;+ case PAUSE_EXIT: menu_back(); break;+ case PAUSE_OPTIONS: A.under = V_PAUSE, A.sel = 0, go(V_OPTIONS); break;+ case PAUSE_HELP: A.under = V_PAUSE, A.page = 0, A.first_run = 0, go(V_HELP); break;+ default: A.sel = 0, go(V_QUIT); break;+ }+ break;+ case V_QUIT:+ if (hit & (FK_LEFT | FK_RIGHT | FK_UP | FK_DOWN)) A.sel ^= 1;+ if (hit & FK_BACK) A.sel = PAUSE_QUIT, go(V_PAUSE);+ else if (hit & FK_OK) {+ if (A.sel) quit = true;+ else A.sel = PAUSE_QUIT, go(V_PAUSE);+ }+ break;+ case V_RESULTS:+ if (hit & (FK_OK | FK_BACK)) menu_back();+ break;+ case V_GAMEOVER:+ if (hit & FK_OK) start_song(false);+ else if (hit & FK_BACK) menu_back();+ break;+ default:+ if (hit & (FK_OK | FK_BACK)) A.story = 0, go(V_MAIN);+ break;+ }+ if (A.view != shown) {+ stale = keys, prev = 0; /* a new screen starts with all keys up */+ shown = A.view;+ }+ uint32_t t0 = plat_millis();+ screens_draw(&A);+ uint32_t spent = plat_millis() - t0;+ if (A.view == V_PLAY) {+ perf_frames++;+ if (spent > perf_max) perf_max = spent;+ if (spent > 33) perf_slow++;+ } else {+ plat_sleep(8);}- uint32_t release=(uint32_t)eadk_timing_millis();while(eadk_keyboard_scan()&&(uint32_t)eadk_timing_millis()-release<2000)eadk_timing_msleep(10);return np_app_end();+ }+ save();+ (void)saved;+ return plat_end();}diff --git a/games/fnf/src/plat.h b/games/fnf/src/plat.hnew file mode 100644index 00000000..6661a86a--- /dev/null+++ b/games/fnf/src/plat.h@@ -0,0 +1,18 @@+/* What the game needs from the calculator (plat_eadk.c), or from a computer for the tests. */+#ifndef FNF_PLAT_H+#define FNF_PLAT_H+#include <stdbool.h>+#include <stdint.h>++/* the four lanes: the arrows, or 7 8 ( ) */+enum { FK_LEFT = 1, FK_DOWN = 2, FK_UP = 4, FK_RIGHT = 8, FK_7 = 16, FK_8 = 32, FK_LPAR = 64, FK_RPAR = 128,+ FK_OK = 256, FK_BACK = 512, FK_HOME = 1024, FK_SHIFT = 2048 };+uint32_t plat_keys(void);+uint32_t plat_millis(void);+void plat_sleep(uint32_t ms);+void plat_push(int x, int y, int w, int h, const uint16_t *px);+bool plat_save(const char *name, const void *data, uint32_t len);+const uint8_t *plat_load(const char *name, uint32_t *len);+void plat_begin(void);+int plat_end(void);+#endifdiff --git a/games/fnf/src/plat_eadk.c b/games/fnf/src/plat_eadk.cnew file mode 100644index 00000000..7c4cadc9--- /dev/null+++ b/games/fnf/src/plat_eadk.c@@ -0,0 +1,37 @@+/* The calculator: keys, time, the screen and files (EADK, and NumPlay's careful file helpers). */+#include <eadk.h>+#include "../../common/epsilon_app.h"+#include "../../common/epsilon_files.h"+#include "plat.h"++const char eadk_app_name[] __attribute__((section(".rodata.eadk_app_name"))) = "Friday Night Funkin'";+const uint32_t eadk_api_level __attribute__((section(".rodata.eadk_api_level"))) = 0;++#define KEY(k) ((uint64_t)1 << (k))++uint32_t plat_keys(void) {+ uint64_t k = eadk_keyboard_scan();+ uint32_t r = 0;+ if (k & KEY(eadk_key_left)) r |= FK_LEFT;+ if (k & KEY(eadk_key_down)) r |= FK_DOWN;+ if (k & KEY(eadk_key_up)) r |= FK_UP;+ if (k & KEY(eadk_key_right)) r |= FK_RIGHT;+ if (k & KEY(eadk_key_seven)) r |= FK_7;+ if (k & KEY(eadk_key_eight)) r |= FK_8;+ if (k & KEY(eadk_key_left_parenthesis)) r |= FK_LPAR;+ if (k & KEY(eadk_key_right_parenthesis)) r |= FK_RPAR;+ if (k & (KEY(eadk_key_ok) | KEY(eadk_key_exe))) r |= FK_OK;+ if (k & (KEY(eadk_key_back) | KEY(eadk_key_backspace))) r |= FK_BACK;+ if (k & (KEY(eadk_key_home) | KEY(eadk_key_on_off))) r |= FK_HOME;+ if (k & KEY(eadk_key_shift)) r |= FK_SHIFT;+ return r;+}+uint32_t plat_millis(void) { return (uint32_t)eadk_timing_millis(); }+void plat_sleep(uint32_t ms) { eadk_timing_msleep(ms); }+void plat_push(int x, int y, int w, int h, const uint16_t *px) {+ eadk_display_push_rect((eadk_rect_t){(uint16_t)x, (uint16_t)y, (uint16_t)w, (uint16_t)h}, (const eadk_color_t *)px);+}+bool plat_save(const char *name, const void *data, uint32_t len) { return ef_write(name, data, len); }+const uint8_t *plat_load(const char *name, uint32_t *len) { return ef_read(name, len); }+void plat_begin(void) { np_app_begin(); }+int plat_end(void) { return np_app_end(); }diff --git a/games/fnf/src/render.c b/games/fnf/src/render.cdeleted file mode 100644index 501e9e9e..00000000--- a/games/fnf/src/render.c+++ /dev/null@@ -1,104 +0,0 @@-#include "render.h"-#include "inflate.h"-#include "../../../launcher/src/font.h"-#include <stdio.h>-#include <string.h>-#include <math.h>-#ifdef FNF_TEST-#include <assert.h>-#endif-#define C(r,g,b) (((r)>>3)<<11|((g)>>2)<<5|((b)>>3))-enum { BLACK=0,WHITE=65535,INK=C(19,15,31),PINK=C(249,54,143),YELLOW=C(255,220,63),CYAN=C(52,223,243),GREY=C(134,140,160) };-static uint16_t strip[320*8];-static uint8_t background[9600];-static uint32_t hashes[30];-static unsigned loaded=NONE;static int top;static bool invalid=true;-static uint16_t ink=WHITE;-static uint16_t mix(uint16_t bg,uint16_t fg,unsigned a){return (uint16_t)(((((bg>>11)*(15-a)+(fg>>11)*a)/15)<<11)|(((((bg>>5)&63)*(15-a)+((fg>>5)&63)*a)/15)<<5)|(((bg&31)*(15-a)+(fg&31)*a)/15));}-void render_invalidate(void){invalid=true;}-bool render_prepare(unsigned id){if(id==loaded)return true;if(id>=SPRITE_COUNT||!sprites[id].compressed)return false;const Sprite*s=&sprites[id];if(!inflate_raw(art_pixels+s->offset,s->size,background,sizeof(background)))return false;loaded=id;render_invalidate();return true;}-static 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<top?top:y,y1=y+h>top+8?top+8:y+h;for(int yy=y0;yy<y1;yy++)for(int xx=x0;xx<x1;xx++)strip[(yy-top)*320+xx]=c;}-static void panel(int x,int y,int w,int h,uint16_t c){rect(x+2,y+2,w,h,BLACK);rect(x,y,w,h,c);}-static void shade(int y,int h,unsigned a){int y0=y<top?top:y,y1=y+h>top+8?top+8:y+h;for(int yy=y0;yy<y1;yy++)for(int x=0;x<320;x++){unsigned p=(yy-top)*320+x;strip[p]=mix(strip[p],INK,a);}}-static void image(unsigned id,int x,int y){- if(id>=SPRITE_COUNT)return;const Sprite*s=&sprites[id];if(s->compressed||x+s->w<=0||x>=320||y+s->h<=top||y>=top+8)return;- const uint8_t*base=art_pixels+s->offset,*data=base+s->h*2;const uint16_t*pal=palettes[s->palette];int start=top>y?top-y:0,end=top+8-y;if(end>s->h)end=s->h;- for(int yy=start;yy<end;yy++){unsigned off=base[yy*2]|base[yy*2+1]<<8;const uint8_t*p=data+off;unsigned at=0;uint16_t*row=strip+(yy+y-top)*320;- while(at<s->w){unsigned token=*p++,len=token>>1;if(!len)return;- if(token&1){for(unsigned i=0;i<len;i++){int xx=x+(int)(at+i);if((unsigned)xx<320)row[xx]=pal[(p[i/2]>>((i&1)*4))&15];}p+=(len+1)/2;}at+=len;- }- }-}-static const np_glyph_t*glyph(unsigned c){return &np_font_body.glyphs[(c>=32&&c<=126?c:'?')-32];}-static int width(const char*s){int n=0;for(;*s;s++)n+=glyph((unsigned char)*s)->advance;return n;}-static void text(int x,int y,const char*s){-#ifdef FNF_TEST- assert(x>=0&&x+width(s)<=320&&y>=0&&y+13<=240);-#endif- if(y+13<=top||y>=top+8)return;- for(;*s;s++){const np_glyph_t*g=glyph((unsigned char)*s);int xx=x+g->x,yy=y+np_font_body.ascent+g->y;- for(unsigned j=0;j<g->h;j++){int row=yy+(int)j;if(row<top||row>=top+8)continue;for(unsigned i=0;i<g->w;i++){int col=xx+(int)i;if((unsigned)col>=320)continue;unsigned at=j*g->w+i,a=(np_font_body.data[g->offset+at/2]>>((at&1)*4))&15;if(a){unsigned p=(row-top)*320+col;strip[p]=a==15?ink:mix(strip[p],ink,a);}}}x+=g->advance;- }-}-static void fit(int x,int y,int max,const char*s){char buf[128];unsigned n=0;int w=0;for(;s[n]&&n<sizeof(buf)-4;n++){int a=glyph((unsigned char)s[n])->advance;if(w+a>max-12)break;buf[n]=s[n];w+=a;}if(s[n]){buf[n++]='.';buf[n++]='.';buf[n++]='.';}buf[n]=0;text(x,y,buf);}-static void center(int y,const char*s){int w=width(s);if(w>304)fit(8,y,304,s);else text((320-w)/2,y,s);}-static void heading(const char*s){panel(0,0,320,30,INK);ink=PINK;fit(12,8,296,s);ink=WHITE;}-static void footer(const char*s){rect(0,218,320,22,INK);ink=WHITE;center(222,s);}-static void choice(int y,const char*s,bool active){panel(52,y,216,23,active?PINK:INK);ink=WHITE;center(y+5,s);}-static void draw_background(bool menu,float dark){- if(loaded==NONE){rect(0,top,320,8,INK);return;}const uint16_t*pal=palettes[sprites[loaded].palette];uint16_t lut[16];unsigned a=menu?8:(unsigned)fminf(14,fmaxf(0,dark*15));- for(unsigned i=0;i<16;i++)lut[i]=mix(pal[i],menu?C(246,170,38):BLACK,a);- for(int yy=0;yy<8;yy++){unsigned row=(top+yy)/2*160;uint16_t*out=strip+yy*320;for(unsigned x=0;x<160;x++){unsigned at=row+x;uint16_t c=lut[(background[at/2]>>((at&1)*4))&15];out[x*2]=out[x*2+1]=c;}}-}-static void actor(const Game*g,unsigned i){const Actor*a=&g->actors[i];if(a->character==NONE||!a->visible)return;const Character*c=&characters[a->character];unsigned anim=a->animation;int32_t age=g->time-a->since;- if(g->time>=a->until){anim=((int)floorf(g->beat)&1)?c->dance:c->idle;age=(int32_t)((g->beat-floorf(g->beat))*60000/g->bpm*16);}- if(g->beautiful)anim=beautiful_animation[anim];const Animation*d=&animations[anim];unsigned frame=(unsigned)(age<0?0:age)/1600;if(frame>=d->count)frame=d->count-1;unsigned id=d->frame[frame];const Sprite*s=&sprites[id];- static const int x[6]={252,64,160,34,114,214};static const int foot[6]={191,186,171,171,177,182};int px=x[i],py=foot[i];- if(g->actors[3].character!=NONE){static const int xx[6]={265,88,170,28,144,209};px=xx[i];py=i==2?157:190;}- int cam=g->focus==0?-2:g->focus==1?2:0;px+=cam;py-=(g->p.beat&&g->beat>=0&&g->beat-floorf(g->beat)<.12f)?(int)fminf(2,g->bop):0;- image(id,px+s->ox,py+s->oy);-}-static int notey(const Game*g,int32_t time){float d=(time-g->time)/16.0f*.16f*g->speed;return g->p.downscroll?193-(int)d:43+(int)d;}-static void gameplay(const Game*g){- actor(g,2);actor(g,3);actor(g,4);actor(g,5);actor(g,1);actor(g,0);- if(g->cover)shade(70,135,9);- if(g->pulse&&((int)g->beat&1)){rect(0,68,3,133,PINK);rect(317,68,3,133,CYAN);}- shade(0,71,10);shade(204,36,14);const uint16_t colour[4]={C(198,75,230),CYAN,C(87,235,92),C(249,67,70)};int receptor=g->p.downscroll?193:43;- for(unsigned i=0;i<NOTE_CAP;i++){const Note*n=&g->notes[i];if(n->state==FINISHED)continue;int x=(n->direction<4?194:20)+(n->direction&3)*34,y=notey(g,n->time),end=notey(g,n->end);- if(n->end>n->time){int a=y<end?y:end,b=y>end?y:end;if(n->state==HOLDING){if(g->p.downscroll)b=receptor;else a=receptor;}if(a<26)a=26;if(b>204)b=204;if(b>a){rect(x-3,a,7,b-a,INK);rect(x-2,a,5,b-a,n->state==MISSED?GREY:colour[n->direction&3]);}}- if(n->state==WAITING&&y>=24&&y<=205)image(ui_notes[0][n->direction&3],x-11,y-11);- }- for(unsigned side=0;side<2;side++)for(unsigned d=0;d<4;d++){unsigned state=1;if(side==1&&(g->held&(1u<<d)))state=2;for(unsigned i=0;i<NOTE_CAP;i++){const Note*n=&g->notes[i];if(n->state==HOLDING&&n->direction==d+(side?0:4))state=3;}image(ui_notes[state][d],(side?194:20)+d*34-11,receptor-11);}- char buf[96];ink=WHITE;const Track*t=&tracks[charts[g->chart].track];fit(8,3,180,songs[t->song].name);ink=CYAN;text(210,3,difficulties[charts[g->chart].difficulty]);- if(g->time>=0){rect(0,20,(int)((int64_t)g->time*320/charts[g->chart].end),2,CYAN);if(g->p.beat&&g->beat-floorf(g->beat)<.12f)rect(156,24,8,2,YELLOW);}- int fill=(int)(g->health*106);rect(52,209,216,7,BLACK);rect(54,211,212,3,C(220,50,60));rect(266-fill,211,fill,3,C(88,226,72));- image(g->actors[1].icon[g->health>1.6f?1:0],30,202);image(g->actors[0].icon[g->health<.4f?1:0],270,202);- snprintf(buf,sizeof(buf),"Score: %ld Misses: %u Combo: %u",(long)(g->score_milli/1000),g->judged[MISS],g->combo);ink=WHITE;center(225,buf);- if(g->time-g->judgement_at<6500){static const char*const names[]={"SICK!!","GOOD!","BAD","SHIT","MISS"};ink=g->judgement==SICK?CYAN:g->judgement==GOOD?YELLOW:PINK;center(85,names[g->judgement]);snprintf(buf,sizeof(buf),"%u",g->combo);center(100,buf);}- if(g->time<0){int beat=(int)ceilf(-g->time*g->bpm/960000);const char*s=beat>=3?"READY?":beat==2?"SET!":"GO!";panel(106,94,108,28,INK);ink=beat==1?CYAN:YELLOW;center(102,s);}- /* A bounded visual pulse replaces neither note timing nor input sampling. */- if(g->flash_until>g->time){rect(0,72,2,131,WHITE);rect(318,72,2,131,WHITE);}-}-static void menus(const Game*g,const Menu*m){- char b[112];- if(m->view==TITLE){image(UI_LOGO,(320-sprites[UI_LOGO].w)/2,4);choice(116,"STORY MODE",m->selected==0);choice(144,"FREEPLAY",m->selected==1);choice(172,"OPTIONS",m->selected==2);ink=INK;text(9,201,"By Bobydeluxe");text(220,201,"0: Credits");footer("OK: Select Back: Quit");}- else if(m->view==STORY){heading("STORY MODE");const Level*l=&levels[m->week];snprintf(b,sizeof(b),"< %s >",difficulties[m->difficulty]);ink=CYAN;center(38,b);- panel(12,60,296,117,INK);ink=PINK;snprintf(b,sizeof(b),"%02u / %02u",m->week+1,LEVEL_COUNT);text(23,69,b);ink=WHITE;fit(23,89,274,l->name);- for(unsigned i=0;i<l->count;i++){ink=GREY;fit(25,109+i*15,270,songs[l->song[i]].name);}ink=INK;center(190,"Up / Down: Week Left / Right: Difficulty");footer("OK: Start week Back: Menu");- }else if(m->view==FREEPLAY){heading("FREEPLAY");for(int row=-2;row<=2;row++){int song=(int)m->song+row,y=91+row*23;if(song<0||song>=SONG_COUNT)continue;panel(14,y,292,21,row==0?PINK:INK);ink=WHITE;fit(24,y+4,271,songs[song].name);}- panel(14,167,292,45,INK);unsigned id=game_chart(m->song,m->variant,m->difficulty);ink=CYAN;snprintf(b,sizeof(b),"< %s > 1: %s",difficulties[m->difficulty],variants[m->variant]);center(172,b);ink=WHITE;if(id!=NONE){snprintf(b,sizeof(b),"Best: %ld Completion: %u.%02u%%",(long)g->p.record[id].score,g->p.record[id].completion/100,g->p.record[id].completion%100);center(191,b);}footer("Up / Down: Song OK: Play Back: Menu");- }else if(m->view==OPTIONS){heading("OPTIONS");const char*labels[]={"DOWNSCROLL","GHOST TAPPING","BEAT ANIMATION"};const unsigned values[]={g->p.downscroll,g->p.ghost,g->p.beat};for(unsigned i=0;i<3;i++){snprintf(b,sizeof(b),"%s: %s",labels[i],values[i]?"ON":"OFF");choice(46+i*32,b,m->selected==i);}panel(12,150,296,58,INK);ink=WHITE;center(158,"Left / Down / Up / Right");center(175,"or 7 / 8 / ( / )");ink=GREY;center(192,"All levels are played without audio.");footer("OK / Left / Right: Change Back: Menu");- }else if(m->view==CREDITS){heading("CREDITS");panel(12,44,296,164,INK);ink=PINK;center(53,"FRIDAY NIGHT FUNKIN'");ink=WHITE;center(77,"Original game by The Funkin' Crew");center(96,"Art and charts: original contributors");center(115,"Calculator adaptation by Bobydeluxe");ink=GREY;center(144,"27 songs / 166 charts / no audio");center(162,"Original art remains with its owners.");center(185,"See README and LICENSES for credits.");footer("OK / Back: Menu");- }else if(m->view==PAUSE){shade(0,240,11);heading("PAUSED");choice(63,"RESUME",m->selected==0);choice(95,"RETRY",m->selected==1);choice(127,"SONG SELECT",m->selected==2);choice(159,"QUIT",m->selected==3);footer("OK: Select Back: Resume");- }else if(m->view==RESULT){shade(0,240,11);heading(g->won?"SONG COMPLETE":"GAME OVER");panel(26,42,268,99,INK);ink=g->won?CYAN:PINK;center(51,g->fault?"DATA ERROR":g->won?game_rank(g):"TRY AGAIN");ink=WHITE;snprintf(b,sizeof(b),"Score: %ld Best combo: %u",(long)(g->score_milli/1000),g->max_combo);center(75,b);snprintf(b,sizeof(b),"Sick: %u Good: %u Misses: %u",g->judged[SICK],g->judged[GOOD],g->judged[MISS]);center(95,b);snprintf(b,sizeof(b),"Completion: %u.%02u%%",game_completion(g)/100,game_completion(g)%100);center(115,b);choice(151,g->won&&m->story?"NEXT SONG":"RETRY",m->selected==0);choice(181,"SONG SELECT",m->selected==1);footer("OK: Select Back: Song select");- }else if(m->view==QUIT){shade(0,240,11);heading("QUIT GAME?");choice(90,"KEEP PLAYING",m->selected==0);choice(125,"SAVE AND QUIT",m->selected==1);footer("OK: Select Back: Menu");- }else if(m->view==SAVE_ERROR){shade(0,240,12);heading("SAVE INCOMPLETE");panel(14,65,292,111,INK);ink=WHITE;center(75,"There is not enough free storage.");center(98,"OK: Retry saving");center(121,"1: Return to the menu");center(144,"Back: Exit without saving");footer("Free space in the calculator's Python app.");}-}-void render(const Game*g,const Menu*m,DisplayPush push,void (*poll)(void)){- unsigned bg=(m->view==PLAY||m->view==PAUSE||m->view==RESULT)?stage_sprites[tracks[charts[g->chart].track].stage]:UI_MENU;- if(!render_prepare(bg)){loaded=NONE;invalid=true;}- bool play=m->view==PLAY||m->view==PAUSE||m->view==RESULT;- for(top=0;top<240;top+=8){draw_background(!play,play?g->dark:0);if(play)gameplay(g);if(m->view!=PLAY)menus(g,m);- uint32_t hash=2166136261u;for(unsigned i=0;i<320*8;i++)hash=(hash^strip[i])*16777619u;unsigned row=(unsigned)top/8;if(invalid||hash!=hashes[row]){push(0,top,320,8,strip);hashes[row]=hash;}if(poll)poll();- }invalid=false;-}diff --git a/games/fnf/src/render.h b/games/fnf/src/render.hdeleted file mode 100644index db27fe1c..00000000--- a/games/fnf/src/render.h+++ /dev/null@@ -1,9 +0,0 @@-#ifndef FNF_RENDER_H-#define FNF_RENDER_H-#include "game.h"-typedef struct { unsigned view,selected,song,week,variant,difficulty,story_song; bool story; } Menu;-typedef void (*DisplayPush)(int,int,int,int,const uint16_t*);-void render_invalidate(void);-bool render_prepare(unsigned);-void render(const Game*,const Menu*,DisplayPush,void (*poll)(void));-#endifdiff --git a/games/fnf/src/save.c b/games/fnf/src/save.cindex 68ebd4ec..aa95db02 100644--- a/games/fnf/src/save.c+++ b/games/fnf/src/save.c@@ -1,21 +1,134 @@-#include "save.h"+/* The save (save.h): a bytes file with a magic, a version, its size and a checksum, every value checked; anything+ * else (damaged, cut short, from elsewhere) is not read: the copy in the Python script is tried, then a fresh+ * start. */+#include <stddef.h>#include <string.h>-static uint32_t crc(const uint8_t*p,unsigned n){uint32_t c=~0u;while(n--){c^=*p++;for(unsigned i=0;i<8;i++)c=(c>>1)^((c&1)?0xedb88320u:0);}return ~c;}-static void put(uint8_t*p,uint32_t v,unsigned n){while(n--){*p++=(uint8_t)v;v>>=8;}}-static uint32_t get(const uint8_t*p,unsigned n){uint32_t v=0;for(unsigned i=0;i<n;i++)v|=(uint32_t)p[i]<<(i*8);return v;}-void save_encode(const Progress*p,uint8_t*b){- memset(b,0,SAVE_BYTES);memcpy(b,"FNF1",4);put(b+4,CHART_COUNT,2);put(b+6,p->weeks,2);b[8]=p->downscroll;b[9]=p->ghost;b[10]=p->beat;- for(unsigned i=0;i<CHART_COUNT;i++){uint8_t*r=b+12+i*8;put(r,(uint32_t)p->record[i].score,4);put(r+4,p->record[i].completion,2);put(r+6,p->record[i].combo,2);}put(b+SAVE_BYTES-4,crc(b,SAVE_BYTES-4),4);-}-bool save_decode(Progress*p,const uint8_t*b,unsigned n){- if(!b||n!=SAVE_BYTES||memcmp(b,"FNF1",4)||get(b+4,2)!=CHART_COUNT||get(b+SAVE_BYTES-4,4)!=crc(b,SAVE_BYTES-4)||b[8]>1||b[9]>1||b[10]>1)return false;- for(unsigned i=0;i<CHART_COUNT;i++){const uint8_t*r=b+12+i*8;if(get(r+4,2)>10000||get(r+6,2)>charts[i].players||get(r,4)>5000000)return false;}- memset(p,0,sizeof(*p));p->weeks=(uint16_t)get(b+6,2);p->downscroll=b[8];p->ghost=b[9];p->beat=b[10];for(unsigned i=0;i<CHART_COUNT;i++){const uint8_t*r=b+12+i*8;p->record[i]=(Record){(int32_t)get(r,4),(uint16_t)get(r+4,2),(uint16_t)get(r+6,2)};}return true;-}-unsigned save_backup(const uint8_t*b,char*out){static const char head[]="# Friday Night Funkin' save backup\n# FNF1:";static const char hex[]="0123456789abcdef";unsigned n=sizeof(head)-1;memcpy(out,head,n);for(unsigned i=0;i<SAVE_BYTES;i++){out[n++]=hex[b[i]>>4];out[n++]=hex[b[i]&15];}memcpy(out+n,"\npass\n",7);return n+7;}-static int digit(unsigned c){return c>='0'&&c<='9'?(int)c-'0':c>='a'&&c<='f'?(int)c-'a'+10:-1;}-bool save_restore(Progress*p,const uint8_t*b,unsigned n){- static uint8_t raw[SAVE_BYTES];static const char head[]="# Friday Night Funkin' save backup\n# FNF1:";unsigned h=sizeof(head)-1;- if(!b||n!=h+SAVE_BYTES*2+7||memcmp(b,head,h)||memcmp(b+h+SAVE_BYTES*2,"\npass\n",7))return false;- for(unsigned i=0;i<SAVE_BYTES;i++){int a=digit(b[h+i*2]),c=digit(b[h+i*2+1]);if(a<0||c<0)return false;raw[i]=(uint8_t)(a*16+c);}return save_decode(p,raw,SAVE_BYTES);+#include "plat.h"+#include "save.h"++void fnf_fresh(fnf_progress_t *p) {+ memset(p, 0, sizeof *p);+ p->week = 1, p->week_diff = FNF_DIFF_NORMAL, p->song_diff = FNF_DIFF_NORMAL;+}++uint32_t fnf_sum(const void *data, uint32_t n) {+ const uint8_t *p = data;+ uint32_t h = 2166136261u;+ for (uint32_t i = 0; i < n; i++) h = (h ^ p[i]) * 16777619u;+ return h;+}++bool fnf_file_ok(const fnf_file_t *f) {+ if (f->magic != FNF_MAGIC || f->version != FNF_VERSION || f->size != sizeof *f) return false;+ if (f->sum != fnf_sum(f, offsetof(fnf_file_t, sum))) return false;+ const fnf_progress_t *p = &f->p;+ if (p->downscroll > 1 || p->guide > 1 || p->offset < -FNF_OFFSET_MAX || p->offset > FNF_OFFSET_MAX) return false;+ if (p->week >= FNF_LEVELS || p->week_diff >= FNF_DIFFS || p->song >= FNF_SONGS || p->song_diff >= FNF_DIFFS ||+ p->list > 1)+ return false;+ for (int i = 0; i < FNF_CHARTS; i++)+ if (p->chart[i].rank > 6 || p->chart[i].completion > 10000) return false;+ return true;+}++static const char head[] = "# Friday Night Funkin' keeps a copy of your scores here,\n"+ "# so that installing it again doesn't erase them.\n";+static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";+static uint8_t copy[1 + sizeof head + 2 + sizeof FNF_SAVE_NAME + 1 + (sizeof(fnf_file_t) + 2) / 3 * 4 + 2];++/* the copy: the file in base 64, in a comment line of a script */+static bool copy_write(const fnf_file_t *f) {+ const uint8_t *bytes = (const uint8_t *)f;+ uint32_t len = sizeof *f, nl = sizeof FNF_SAVE_NAME - 1;+ uint8_t *p = copy;+ *p++ = 0; /* (a script's first byte: not imported) */+ memcpy(p, head, sizeof head - 1), p += sizeof head - 1;+ *p++ = '#', *p++ = '>';+ memcpy(p, FNF_SAVE_NAME, nl), p += nl;+ *p++ = ':';+ for (uint32_t i = 0; i < len; i += 3, p += 4) {+ uint32_t left = len - i;+ uint32_t v = (uint32_t)bytes[i] << 16 | (left > 1 ? (uint32_t)bytes[i + 1] << 8 : 0) | (left > 2 ? bytes[i + 2] : 0);+ p[0] = (uint8_t)b64[v >> 18 & 63];+ p[1] = (uint8_t)b64[v >> 12 & 63];+ p[2] = left > 1 ? (uint8_t)b64[v >> 6 & 63] : '=';+ p[3] = left > 2 ? (uint8_t)b64[v & 63] : '=';+ }+ *p++ = '\n';+ return plat_save(FNF_COPY_NAME, copy, (uint32_t)(p - copy));+}++static int b64v(uint8_t c) {+ for (int i = 0; i < 64; i++)+ if ((uint8_t)b64[i] == c) return i;+ return -1;+}++static bool copy_read(fnf_file_t *f) {+ uint32_t n, nl = sizeof FNF_SAVE_NAME - 1;+ const uint8_t *c = plat_load(FNF_COPY_NAME, &n);+ if (!c) return false;+ for (uint32_t i = 0; i + nl + 3 <= n; i++) {+ if (c[i] != '#' || c[i + 1] != '>' || memcmp(c + i + 2, FNF_SAVE_NAME, nl) || c[i + 2 + nl] != ':') continue;+ const uint8_t *l = c + i + 3 + nl;+ uint32_t m = 0;+ while (l + m < c + n && l[m] != '\n' && l[m]) m++;+ if (m != (sizeof *f + 2) / 3 * 4) return false;+ uint8_t *bytes = (uint8_t *)f;+ uint32_t o = 0;+ for (uint32_t k = 0; k < m; k += 4) {+ int v0 = b64v(l[k]), v1 = b64v(l[k + 1]), v2 = l[k + 2] == '=' ? 0 : b64v(l[k + 2]),+ v3 = l[k + 3] == '=' ? 0 : b64v(l[k + 3]);+ if (v0 < 0 || v1 < 0 || v2 < 0 || v3 < 0) return false;+ uint32_t w = (uint32_t)(v0 << 18 | v1 << 12 | v2 << 6 | v3);+ if (o < sizeof *f) bytes[o++] = (uint8_t)(w >> 16);+ if (o < sizeof *f) bytes[o++] = (uint8_t)(w >> 8);+ if (o < sizeof *f) bytes[o++] = (uint8_t)w;+ }+ return true;+ }+ return false;+}++static fnf_file_t file; /* (static: the stack stays small) */++bool save_load(fnf_progress_t *p) {+ uint32_t n;+ const uint8_t *d = plat_load(FNF_SAVE_NAME, &n);+ bool ok = false;+ if (d && n == sizeof file) {+ memcpy(&file, d, sizeof file);+ ok = fnf_file_ok(&file);+ }+ if (!ok && copy_read(&file) && fnf_file_ok(&file)) {+ ok = true;+ plat_save(FNF_SAVE_NAME, &file, sizeof file); /* back where it belongs */+ }+ if (!ok) {+ fnf_fresh(p);+ return false;+ }+ *p = file.p;+ return true;+}++bool save_write(const fnf_progress_t *p) {+ memset(&file, 0, sizeof file);+ file.magic = FNF_MAGIC, file.version = FNF_VERSION, file.size = sizeof file;+ file.p = *p;+ file.sum = fnf_sum(&file, offsetof(fnf_file_t, sum));+ bool ok = plat_save(FNF_SAVE_NAME, &file, sizeof file);+ copy_write(&file);+ return ok;+}++void fnf_record(fnf_progress_t *p, unsigned chart, int32_t score, int rank, int32_t completion) {+ if (chart >= FNF_CHARTS) return;+ fnf_record_t *r = &p->chart[chart];+ if (!r->rank) {+ r->score = score, r->rank = (uint8_t)(rank + 1), r->completion = (uint16_t)completion;+ return;+ }+ if (score > r->score) r->score = score;+ if (!(r->rank > rank + 1 || r->completion > completion)) r->rank = (uint8_t)(rank + 1), r->completion = (uint16_t)completion;}diff --git a/games/fnf/src/save.h b/games/fnf/src/save.hindex 01a947be..12925344 100644--- a/games/fnf/src/save.h+++ b/games/fnf/src/save.h@@ -1,10 +1,44 @@+/* What's kept, in fnf.sav, and a copy of it in a Python script, fnf_saves.py (installing apps from the NumWorks+ * website keeps only scripts, so the save comes back from it): the options, how to play seen, the menus' last+ * choices, each chart's best score and rank, and each week's best score. */#ifndef FNF_SAVE_H#define FNF_SAVE_H-#include "game.h"-#define SAVE_BYTES (16+CHART_COUNT*8)-#define BACKUP_BYTES (SAVE_BYTES*2+64)-void save_encode(const Progress*,uint8_t*);-bool save_decode(Progress*,const uint8_t*,unsigned);-unsigned save_backup(const uint8_t*,char*);-bool save_restore(Progress*,const uint8_t*,unsigned);+#include <stdbool.h>+#include "data.h"++#define FNF_SAVE_NAME "fnf.sav"+#define FNF_COPY_NAME "fnf_saves.py"+#define FNF_MAGIC 0x53464E46u /* "FNFS" */+#define FNF_VERSION 1+#define FNF_OFFSET_MAX 300 /* the note offset: -300..300 ms */++typedef struct {+ int32_t score; /* the best score */+ uint16_t completion; /* the best clear's completion (ten-thousandths) */+ uint8_t rank; /* its rank + 1 (fnf_rank), 0: never cleared */+ uint8_t spare;+} fnf_record_t;++typedef struct {+ uint8_t downscroll, guide; /* the options; how to play shown before the first song */+ int16_t offset; /* the note offset (ms) */+ uint8_t week, week_diff, song, song_diff, list, spare[3]; /* the menus' last choices */+ int32_t week_score[FNF_LEVELS][FNF_DIFFS];+ fnf_record_t chart[FNF_CHARTS];+} fnf_progress_t;++typedef struct {+ uint32_t magic;+ uint16_t version, size;+ fnf_progress_t p;+ uint32_t sum; /* FNV-1a of everything before it */+} fnf_file_t;++void fnf_fresh(fnf_progress_t *p);+uint32_t fnf_sum(const void *data, uint32_t n);+bool fnf_file_ok(const fnf_file_t *f);+bool save_load(fnf_progress_t *p); /* the save, its copy, or a fresh start; false: a fresh start */+bool save_write(const fnf_progress_t *p);+/* a song cleared: the best score and the best rank kept (Save.applySongRank) */+void fnf_record(fnf_progress_t *p, unsigned chart, int32_t score, int rank, int32_t completion);#endifdiff --git a/games/fnf/src/screens.c b/games/fnf/src/screens.cnew file mode 100644index 00000000..5a877b6b--- /dev/null+++ b/games/fnf/src/screens.c@@ -0,0 +1,437 @@+/* The screens (app.h): the game's title, main menu, story menu and freeplay, with its own pictures and letters, the+ * pause menu over the song, and NumPlay's key line along the bottom of the menus. */+#include <string.h>+#include "app.h"+#include "draw.h"++#define WHITE 0xFFFF+#define FOCUS HEX(0xFFD43B)+#define INK HEX(0x0A0F1A)+#define MUTED HEX(0xA8B3C7)+#define PINK HEX(0xE55777)+#define YELLOW HEX(0xF9CF51)++/* ------------------------------------------------------------------------------------------------ text */+static char *cat(char *p, const char *s) {+ while (*s) *p++ = *s++;+ *p = 0;+ return p;+}+static char *num(char *p, int32_t v, bool commas) {+ char t[16];+ int n = 0;+ bool neg = v < 0;+ uint32_t u = (uint32_t)(neg ? -v : v);+ do {+ if (commas && n && (n + 1) % 4 == 0) t[n++] = ',';+ t[n++] = (char)('0' + u % 10), u /= 10;+ } while (u && n < 15);+ if (neg) *p++ = '-';+ while (n) *p++ = t[--n];+ *p = 0;+ return p;+}+static void upper(char *d, const char *s, int n) {+ int i = 0;+ for (; s[i] && i < n - 1; i++) d[i] = (char)(s[i] >= 'a' && s[i] <= 'z' ? s[i] - 32 : s[i]);+ d[i] = 0;+}++static void text(int x, int base, const char *s, color_t c) { gfx_text(&np_font_body, x, base, s, c, 256); }+static void text_c(int cx, int base, const char *s, color_t c) { gfx_text_center(&np_font_body, cx, base, s, c, 256); }+static void small_c(int cx, int base, const char *s, color_t c) { gfx_text_center(&np_font_small, cx, base, s, c, 256); }++/* the key line: "key|what|key|what...", keys in yellow */+static void keyline(const char *s) {+ gfx_fill(0, 226, SCREEN_W, 14, INK);+ char b[24];+ int x = 6, i = 0;+ while (*s) {+ int n = 0;+ while (*s && *s != '|' && n < 23) b[n++] = *s++;+ b[n] = 0;+ if (*s == '|') s++;+ gfx_text(&np_font_small, x, 236, b, i % 2 ? WHITE : FOCUS, 256);+ x += gfx_text_width(&np_font_small, b) + (i % 2 ? 9 : 4);+ i++;+ }+}++static int bold_c(int cx, int y, const char *s, int alpha, int scale) {+ int w = bold_width(s, scale);+ bold_text(cx - w / 2, y, s, alpha, scale);+ return w;+}++/* a difficulty, between arrows */+static void diff_line(int cx, int y, const char *name, int scale) {+ int w = bold_c(cx, y, name, 32, scale);+ int mid = y + FNF_BOLD_HEIGHT * scale / 512 + 7;+ gfx_text_center(&np_font_title, cx - w / 2 - 12, mid, "<", FOCUS, 256);+ gfx_text_center(&np_font_title, cx + w / 2 + 12, mid, ">", FOCUS, 256);+}++/* a choice of a list: bright, on a dark band with arrows, or dimmed */+static void item(int cx, int y, const char *s, bool focus) {+ int scale = focus ? 256 : 220;+ int w = bold_width(s, scale);+ if (focus) {+ gfx_rrect(cx - w / 2 - 14, y - 4, w + 28, FNF_BOLD_HEIGHT + 8, 8, INK, 200);+ gfx_rrect_outline(cx - w / 2 - 14, y - 4, w + 28, FNF_BOLD_HEIGHT + 8, 8, 2, FOCUS, 256);+ }+ bold_text(cx - w / 2, y + (focus ? 0 : 2), s, focus ? 32 : 18, scale);+}++/* ------------------------------------------------------------------------------------------------ pictures */+static struct {+ int view; /* the screen they were unpacked for (-1: none) */+ int bg; /* the background unpacked */+ pic_t logo[2], gf;+ uint8_t *gf_px;+ int gf_frame;+ pic_t icon[5];+ int icon_id[5];+ uint8_t *icon_px[5];+} M = {.view = -1, .bg = -1};++static void bg_use(int id) {+ if (M.bg == id) return;+ M.bg = bg_load((unsigned)id) ? id : -1;+}++static const pic_t *icon_slot(int slot, unsigned icon) {+ if (slot < 0 || slot >= 5 || !M.icon_px[slot]) return 0;+ if (M.icon_id[slot] != (int)icon) {+ M.icon_id[slot] = -1;+ if (!pic_load(&M.icon[slot], fnf_icon[icon][0], M.icon_px[slot], FNF_ICON_MAX / 3)) return 0;+ M.icon_id[slot] = (int)icon;+ }+ return &M.icon[slot];+}++static void menus_load(int view) {+ ram_reset();+ memset(&M, 0, sizeof M);+ M.view = view, M.bg = -1, M.gf_frame = -1;+ for (int i = 0; i < 5; i++) M.icon_id[i] = -1;+ if (view == V_TITLE) {+ pic_new(&M.logo[0], FNF_SPR_LOGO0);+ pic_new(&M.logo[1], FNF_SPR_LOGO1);+ uint32_t big = 0;+ for (int f = 0; f < 4; f++) {+ const fnf_sprite_t *s = &fnf_sprite[FNF_SPR_GFTITLE0 + f];+ uint32_t n = (s->w + 1u) / 2 * s->h;+ if (n > big) big = n;+ }+ M.gf_px = ram_take(big);+ }+ for (int i = 0; i < 5; i++) M.icon_px[i] = ram_take(FNF_ICON_MAX / 3);+}++/* ------------------------------------------------------------------------------------------------ each screen */+typedef struct {+ app_t *a;+} ctx_t;++static void dim(int a256) { gfx_fill_alpha(0, gfx_y0, SCREEN_W, gfx_y1 - gfx_y0, 0, a256); }++/* the menus' beat: freakyMenu, 102 a minute */+static uint32_t menu_beat(const app_t *a, uint32_t *into) {+ uint32_t ms = a->clock;+ uint32_t b = ms * 102 / 60000;+ if (into) *into = ms - b * 60000 / 102;+ return b;+}++static void title_strip(app_t *a) {+ gfx_fill(0, gfx_y0, SCREEN_W, gfx_y1 - gfx_y0, 0);+ uint32_t into;+ uint32_t beat = menu_beat(a, &into);+ /* Girlfriend dances left, then right, on each beat; the logo bumps */+ int f = (beat & 1 ? 2 : 0) + (into > 294 ? 1 : 0);+ if (M.gf_px && f != M.gf_frame) {+ M.gf_frame = pic_load(&M.gf, FNF_SPR_GFTITLE0 + (unsigned)f, M.gf_px, 1u << 20) ? f : -1;+ }+ if (M.gf_frame >= 0) blit_at(&M.gf, 218, 104, 32);+ blit_at(&M.logo[into < 160 ? 0 : 1], 100, 66, 32);+ int alpha = 20 + (int)(12 * (into < 294 ? 294 - into : into - 294) / 294);+ bold_c(160, 194, "PRESS OK TO BEGIN", alpha, 230);+ keyline("OK|start|Back|quit");+}++static const char *const MAIN_ITEMS[MAIN_COUNT] = {"STORY MODE", "FREEPLAY", "OPTIONS", "HOW TO PLAY", "CREDITS"};++static void main_strip(app_t *a) {+ bg_use(FNF_SPR_MENUBG);+ draw_bg(fnf_palette[fnf_sprite[FNF_SPR_MENUBG].pal], 0, 1);+ for (int i = 0; i < MAIN_COUNT; i++) item(160, 30 + i * 38, MAIN_ITEMS[i], a->sel == i);+ keyline("Up Down|choose|OK|select|Back|title");+}++static const char *const WEEK_TITLE[FNF_LEVELS] = {"TUTORIAL", "WEEK 1", "WEEK 2", "WEEK 3", "WEEK 4",+ "WEEK 5", "WEEK 6", "WEEK 7", "WEEKEND 1", "LE SSERAFIM"};++static void story_strip(app_t *a) {+ const fnf_progress_t *p = a->p;+ gfx_fill(0, gfx_y0, SCREEN_W, gfx_y1 - gfx_y0, 0);+ char b[64];+ char *q = cat(b, "WEEK SCORE: ");+ num(q, p->week_score[p->week][p->week_diff], false);+ gfx_text(&np_font_small, 6, 13, b, WHITE, 256);+ upper(b, fnf_level[p->week].name, sizeof b);+ gfx_text_right(&np_font_small, 314, 13, b, MUTED, 256);+ /* the yellow band, with the week's singers: the opponent and you */+ gfx_fill(0, 18, SCREEN_W, 84, YELLOW);+ const fnf_level_t *lv = &fnf_level[p->week];+ int c = app_story_chart(lv->song[0], p->week_diff);+ if (c >= 0) {+ const fnf_var_t *v = &fnf_var[fnf_chart[c].var];+ for (int r = 0; r < 2; r++) {+ if (v->chr[r] == 255) continue;+ const pic_t *ic = icon_slot(r, fnf_char[v->chr[r]].icon);+ if (ic) blit_scaled(ic, (r ? 84 : 236) - 38 + (ic->x + 19) * 2, 60 - 38 + (ic->y + 19) * 2, ic->w * 2, ic->h * 2, 32);+ }+ }+ /* the weeks */+ for (int k = -1; k <= 1; k++) {+ int w = p->week + k;+ if (w < 0 || w >= FNF_LEVELS) continue;+ int y = 128 + k * 30;+ if (!k) item(160, y, WEEK_TITLE[w], true);+ else bold_c(160, y + 2, WEEK_TITLE[w], 12, 200);+ }+ /* the tracks, and the difficulty */+ gfx_text(&np_font_small, 14, 184, "TRACKS", PINK, 256);+ for (int i = 0; i < lv->n; i++) {+ upper(b, fnf_song[lv->song[i]].name, sizeof b);+ gfx_text(&np_font_small, 14, 197 + i * 9, b, PINK, 256);+ }+ diff_line(236, 186, DIFF_NAME[p->week_diff], 200);+ keyline("Up Down|week|Left Right|difficulty|OK|play|Back|menu");+}++/* freeplay's colours, a week each (the game's FreeplayState) */+static const uint32_t WEEK_COLOR[FNF_LEVELS] = {0x9271FD, 0x9271FD, 0x223344, 0x941653, 0xFC96D7, 0xA0D1FF, 0xFF78BF,+ 0xF6B604, 0x413CAE, 0xF9CF51};++static void freeplay_strip(app_t *a) {+ const fnf_progress_t *p = a->p;+ bg_use(FNF_SPR_MENUDESAT);+ unsigned song = a->list_n ? a->list[p->song] : 0;+ color_t tint = gfx_rgb(WEEK_COLOR[fnf_song[song].level]);+ uint16_t pal[16];+ const uint16_t *src = fnf_palette[fnf_sprite[FNF_SPR_MENUDESAT].pal];+ for (int i = 0; i < 16; i++) pal[i] = gfx_mix(src[i], tint, 20);+ draw_bg(pal, 0, 1);+ char b[64];+ /* the songs, the chosen one in the middle, with their opponents' icons */+ for (int k = -2; k <= 2; k++) {+ int i = p->song + k;+ if (i < 0 || i >= a->list_n) continue;+ int y = 104 + k * 34;+ upper(b, fnf_song[a->list[i]].name, sizeof b);+ int scale = k ? 200 : 240;+ int w = bold_width(b, scale);+ int x = 22 + (k < 0 ? -k : k) * 6;+ if (!k) {+ gfx_rrect(x - 8, y - 5, w + 58, FNF_BOLD_HEIGHT + 10, 8, INK, 190);+ gfx_rrect_outline(x - 8, y - 5, w + 58, FNF_BOLD_HEIGHT + 10, 8, 2, FOCUS, 256);+ }+ bold_text(x, y, b, k ? 14 : 32, scale);+ const pic_t *ic = icon_slot(k + 2, fnf_song[a->list[i]].icon);+ if (ic) blit_scaled(ic, x + w + 6 + (ic->x + 19) * 26 / 38, y - 4 + (ic->y + 19) * 26 / 38, ic->w * 26 / 38,+ ic->h * 26 / 38, k ? 18 : 32);+ }+ /* the best score and the difficulty, top right */+ gfx_rrect(196, 4, 120, 46, 6, INK, 200);+ int chart = a->list_n ? app_chart(song, p->list, p->song_diff) : -1;+ char *q = cat(b, "BEST ");+ num(q, chart >= 0 ? p->chart[chart].score : 0, true);+ gfx_text_center(&np_font_small, 256, 16, b, WHITE, 256);+ q = cat(b, "< ");+ q = cat(q, DIFF_NAME[p->song_diff]);+ cat(q, " >");+ gfx_text_center(&np_font_body, 256, 31, b, FOCUS, 256);+ if (chart >= 0 && p->chart[chart].rank) {+ static const char *const RANK[6] = {"LOSS", "GOOD", "GREAT", "EXCELLENT", "PERFECT", "PERFECT"};+ q = cat(b, RANK[p->chart[chart].rank - 1]);+ q = cat(q, " ");+ q = num(q, p->chart[chart].completion / 100, false);+ cat(q, "%");+ gfx_text_center(&np_font_small, 256, 45, b, p->chart[chart].rank >= 5 ? FOCUS : MUTED, 256);+ }+ gfx_text(&np_font_small, 8, 14, p->list == LIST_PICO ? "PICO" : "BOYFRIEND", WHITE, 256);+ keyline(p->list == LIST_PICO ? "Up Down|song|Left Right|difficulty|shift|Boyfriend|OK|play"+ : "Up Down|song|Left Right|difficulty|shift|Pico|OK|play");+}++static void options_body(app_t *a) {+ const fnf_progress_t *p = a->p;+ char b[48];+ bold_c(160, 30, "OPTIONS", 32, 256);+ char *q = cat(b, "DOWNSCROLL ");+ cat(q, p->downscroll ? "ON" : "OFF");+ item(160, 82, b, a->sel == OPT_DOWNSCROLL);+ q = cat(b, "NOTE OFFSET ");+ if (p->offset > 0) *q++ = '+';+ q = num(q, p->offset, false);+ cat(q, " MS");+ item(160, 126, b, a->sel == OPT_OFFSET);+ small_c(160, 178, a->sel == OPT_DOWNSCROLL ? "The notes come down to the arrows at the bottom."+ : "Raise it if your hits come out late.", WHITE);+ keyline(a->sel == OPT_DOWNSCROLL ? "Up Down|choose|OK|on or off|Back|done" : "Up Down|choose|Left Right|change|Back|done");+}++static const char *const HELP[HELP_PAGES][4] = {+ {"HOW TO PLAY", "Press each note's key as it reaches", "the arrows at the top of the screen:",+ "Left Down Up Right, or 7 8 ( )."},+ {"HOLDS AND MISSES", "Long notes: keep the key down to the end.", "A key with no note there costs health,",+ "and so does a missed note."},+ {"THE HEALTH BAR", "Yours is the green side. Empty it and", "it's game over. Sick, Good, Bad, Shit:",+ "how close to the beat you hit."},+};++static void help_body(app_t *a) {+ bold_c(160, 46, HELP[a->page][0], 32, 240);+ for (int i = 1; i < 4; i++) text_c(160, 96 + i * 20, HELP[a->page][i], WHITE);+ char b[16];+ char *q = num(b, a->page + 1, false);+ q = cat(q, " / ");+ num(q, HELP_PAGES, false);+ small_c(160, 210, b, MUTED);+ keyline(a->first_run ? "OK|next|Back|skip" : "Left Right|pages|Back|close");+}++static void credits_strip(app_t *a) {+ (void)a;+ bg_use(FNF_SPR_MENUDESAT);+ draw_bg(fnf_palette[fnf_sprite[FNF_SPR_MENUDESAT].pal], 600, 1);+ bold_c(160, 16, "CREDITS", 32, 240);+ static const char *const L[] = {"Friday Night Funkin' by the Funkin' Crew:", "ninjamuffin99, PhantomArcade,",+ "evilsk8r and Kawai Sprite.", "Its charts and pictures, not affiliated with them.",+ "Calculator adaptation by Bobydeluxe.", "Made by Mason Chen as part of NumPlay."};+ for (int i = 0; i < 6; i++) text_c(160, 66 + i * 24 + (i >= 4 ? 10 : 0), L[i], i == 0 || i == 4 ? FOCUS : WHITE);+ keyline("Back|menu");+}++static void pause_body(app_t *a) {+ static const char *const PAUSE_ITEMS[PAUSE_COUNT] = {"RESUME", "RESTART SONG", "EXIT TO MENU", "OPTIONS",+ "HOW TO PLAY", "QUIT GAME"};+ const fnf_game_t *g = a->g;+ char b[64];+ upper(b, fnf_song[fnf_var[g->var].song].name, sizeof b);+ gfx_text_right(&np_font_body, 314, 16, b, WHITE, 256);+ gfx_text_right(&np_font_small, 314, 30, DIFF_NAME[fnf_chart[g->chart].diff], FOCUS, 256);+ for (int i = 0; i < PAUSE_COUNT; i++) item(160, 30 + i * 32, PAUSE_ITEMS[i], a->sel == i);+ keyline("Up Down|choose|OK|select|Back|resume");+}++static void quit_body(app_t *a) {+ bold_c(160, 60, "QUIT THE GAME?", 32, 256);+ item(160, 112, "KEEP PLAYING", a->sel == 0);+ item(160, 150, "QUIT", a->sel == 1);+ small_c(160, 196, "Your scores are saved.", MUTED);+ keyline("Up Down|choose|OK|select|Back|pause");+}++static void results_strip(app_t *a) {+ static const char *const RANK[6] = {"LOSS", "GOOD", "GREAT", "EXCELLENT", "PERFECT", "PERFECT!"};+ bg_use(FNF_SPR_MENUBG);+ draw_bg(fnf_palette[fnf_sprite[FNF_SPR_MENUBG].pal], 450, 1);+ bold_c(160, 10, RANK[a->result_rank], 32, 280);+ char b[48];+ char *q = cat(b, "SCORE ");+ num(q, a->result_score, true);+ bold_c(160, 44, b, 32, 220);+ if (a->result_new) small_c(160, 82, "NEW BEST!", FOCUS);+ static const char *const LABEL[7] = {"TOTAL NOTES", "MAX COMBO", "SICK", "GOOD", "BAD", "SHIT", "MISSED"};+ int32_t v[7] = {a->result_total, a->result_max_combo, a->result_tally[0], a->result_tally[1], a->result_tally[2],+ a->result_tally[3], a->result_tally[4]};+ static const uint32_t COLOR[7] = {0xFFFFFF, 0xFFFFFF, 0x89E59E, 0x89C9E5, 0xE6CF8A, 0xE68C8A, 0xC68AE6};+ gfx_rrect(56, 90, 208, 112, 8, INK, 210);+ for (int i = 0; i < 7; i++) {+ text(70, 107 + i * 14, LABEL[i], gfx_rgb(COLOR[i]));+ num(b, v[i], false);+ gfx_text_right(&np_font_body, 250, 107 + i * 14, b, gfx_rgb(COLOR[i]), 256);+ }+ q = cat(b, "CLEAR ");+ q = num(q, a->result_completion / 100, false);+ cat(q, "%");+ text_c(160, 218, b, WHITE);+ keyline("OK|continue");+}++static void error_strip(app_t *a) {+ (void)a;+ gfx_fill(0, gfx_y0, SCREEN_W, gfx_y1 - gfx_y0, INK);+ text_c(160, 110, "This song's data is damaged.", WHITE);+ small_c(160, 130, "Install the game again from NumPlay's page.", MUTED);+ keyline("OK|menu");+}++/* ------------------------------------------------------------------------------------------------ in a song */+static bool in_song(const app_t *a) {+ int v = a->view;+ return v == V_PLAY || v == V_PAUSE || v == V_QUIT || v == V_GAMEOVER ||+ ((v == V_HELP || v == V_OPTIONS) && a->under == V_PAUSE);+}++static void song_strip(void *ctx) {+ app_t *a = ((ctx_t *)ctx)->a;+ switch (a->view) {+ case V_PLAY: play_strip(); break;+ case V_GAMEOVER:+ play_actor_strip(a->g, ROLE_PLAYER);+ bold_c(160, 30, "GAME OVER", 32, 256);+ keyline("OK|retry|Back|menu");+ break;+ default:+ play_strip();+ dim(150);+ if (a->view == V_PAUSE) pause_body(a);+ else if (a->view == V_QUIT) quit_body(a);+ else if (a->view == V_HELP) help_body(a);+ else options_body(a);+ break;+ }+}++static void menu_strip(void *ctx) {+ app_t *a = ((ctx_t *)ctx)->a;+ switch (a->view) {+ case V_TITLE: title_strip(a); break;+ case V_MAIN: main_strip(a); break;+ case V_STORY: story_strip(a); break;+ case V_FREEPLAY: freeplay_strip(a); break;+ case V_OPTIONS:+ bg_use(FNF_SPR_MENUDESAT);+ draw_bg(fnf_palette[fnf_sprite[FNF_SPR_MENUDESAT].pal], 500, 1);+ options_body(a);+ break;+ case V_HELP:+ gfx_fill(0, gfx_y0, SCREEN_W, gfx_y1 - gfx_y0, INK);+ help_body(a);+ break;+ case V_CREDITS: credits_strip(a); break;+ case V_RESULTS: results_strip(a); break;+ default: error_strip(a); break;+ }+}++static bool was_in_song;++void screens_draw(app_t *a) {+ ctx_t c = {a};+ bool song = in_song(a);+ if (song) {+ if (!was_in_song) M.view = -1;+ was_in_song = true;+ const fnf_game_t *g = a->g;+ play_prepare(g, a->p->downscroll, (int32_t)((a->clock - a->play_t0) * 1000));+ draw_frame(song_strip, &c);+ return;+ }+ if (was_in_song || M.view != a->view) menus_load(a->view);+ was_in_song = false;+ draw_frame(menu_strip, &c);+}diff --git a/games/fnf/tests/play.c b/games/fnf/tests/play.cnew file mode 100644index 00000000..fb1e4c6d--- /dev/null+++ b/games/fnf/tests/play.c@@ -0,0 +1,791 @@+/* Friday Night Funkin' on a computer, for tests and pictures (make host, make test).+ *+ * play test DIR the rules against the game's own numbers (the PBOT1 points and judgements, health, combo,+ * holds and their drops, misses, ghost misses, the note offset, ranks); every chart unpacked and+ * read; a bot playing every chart on time to a full combo (and the same scores on every+ * computer: a hash of them); bots hitting late and missing; a few hundred sessions of the whole+ * app with random keys; saves written and read back, damaged, and back from their copy+ * play shots DIR pictures of the screens (DIR/<name>.ppm)+ * play film DIR CHART MS MS milliseconds of a chart, a bot playing (DIR/<frame>_<ms>.raw, for tools/record.py)+ */+#define main fnf_app_main+#include "../src/main.c"+#undef main+#include <math.h>+#include <stdio.h>+#include "inflate.h"+#include <stdlib.h>++/* ---------------------------------------------------------------- the calculator, on a computer */+static uint16_t fb[240][320];+static void (*on_push)(int y, int h);+void plat_push(int x, int y, int w, int h, const uint16_t *px) {+ for (int j = 0; j < h; j++)+ for (int i = 0; i < w; i++) fb[y + j][x + i] = px[j * w + i];+ if (on_push) on_push(y, h);+}+void *np_alloc(uint32_t n) { (void)n; return 0; }+static uint32_t clock_ms;+static uint32_t (*script)(uint32_t ms);+static uint32_t quit_at;+static void (*watch)(void);+uint32_t plat_keys(void) {+ clock_ms += 1;+ if (watch) watch();+ if (clock_ms >= quit_at) return FK_HOME;+ return script ? script(clock_ms) : 0;+}+uint32_t plat_millis(void) { return clock_ms; }+void plat_sleep(uint32_t ms) { clock_ms += ms; }+void plat_begin(void) {}+int plat_end(void) { return 0; }++static struct { char name[32]; uint8_t data[4096]; uint32_t len; bool on; } files[4];+static bool storage_full;+bool plat_save(const char *name, const void *data, uint32_t len) {+ if (storage_full) return false;+ int k = -1;+ for (int i = 0; i < 4; i++)+ if (files[i].on && !strcmp(files[i].name, name)) k = i;+ for (int i = 0; i < 4 && k < 0; i++)+ if (!files[i].on) k = i;+ if (k < 0 || len > sizeof files[k].data) return false;+ strcpy(files[k].name, name), memcpy(files[k].data, data, len), files[k].len = len, files[k].on = true;+ return true;+}+const uint8_t *plat_load(const char *name, uint32_t *len) {+ for (int i = 0; i < 4; i++)+ if (files[i].on && !strcmp(files[i].name, name)) return *len = files[i].len, files[i].data;+ return 0;+}+static void forget(const char *name) {+ for (int i = 0; i < 4; i++)+ if (files[i].on && !strcmp(files[i].name, name)) files[i].on = false;+}+static uint8_t *file_data(const char *name, uint32_t *len) {+ for (int i = 0; i < 4; i++)+ if (files[i].on && !strcmp(files[i].name, name)) return *len = files[i].len, files[i].data;+ return 0;+}++static void shot(const char *dir, const char *name) {+ char path[512];+ snprintf(path, sizeof path, "%s/%s.ppm", dir, name);+ FILE *f = fopen(path, "wb");+ if (!f) exit(2);+ fprintf(f, "P6 320 240 255\n");+ for (int y = 0; y < 240; y++)+ for (int x = 0; x < 320; x++) {+ uint16_t c = fb[y][x];+ fputc((c >> 11) * 255 / 31, f), fputc((c >> 5 & 63) * 255 / 63, f), fputc((c & 31) * 255 / 31, f);+ }+ fclose(f);+}++static int fails;+#define CHECK(c, ...) do { if (!(c)) { fails++; printf("FAIL %s:%d: ", __FILE__, __LINE__); printf(__VA_ARGS__); printf("\n"); } } while (0)++/* ---------------------------------------------------------------- a chart's notes, read on their own */+typedef struct { int32_t t, len; uint8_t lane, kind; } note_t;+static note_t notes[FNF_CHART_NOTES_MAX];+static uint8_t raw[FNF_CHART_RAW_MAX];++static int read_chart(unsigned c) {+ const fnf_chart_t *ch = &fnf_chart[c];+ if (fnf_inflate(fnf_blob + ch->at, ch->size, raw, sizeof raw) != ch->raw) return -1;+ uint32_t pos = 0;+ int n = 0;+ int32_t t = 0;+ while (pos < ch->raw && n < FNF_CHART_NOTES_MAX) {+ uint32_t v[3] = {0, 0, 0};+ for (int k = 0; k < 3; k++) {+ if (k == 2 && !(v[1] & 8)) break;+ int s = 0;+ for (;;) {+ uint8_t b = raw[pos++];+ v[k] |= (uint32_t)(b & 127) << s;+ s += 7;+ if (!(b & 128)) break;+ }+ }+ t += (int32_t)v[0];+ notes[n++] = (note_t){t, (int32_t)v[2], (uint8_t)(v[1] & 7), (uint8_t)(v[1] >> 4)};+ }+ return pos == ch->raw ? n : -1;+}++static fnf_game_t T;+static uint8_t buf[FNF_CHART_RAW_MAX], app_chart_buf[FNF_CHART_RAW_MAX];+static color_t test_strip[SCREEN_W * STRIP_H];++/* the n-th player note (lane 0-3, scoreable) of chart c */+static note_t player_note(int n_notes, int k) {+ for (int i = 0; i < n_notes; i++)+ if (notes[i].lane < 4 && notes[i].kind != FNF_KIND_NON_SCOREABLE && !k--) return notes[i];+ return (note_t){0};+}++static int find_chart(const char *song, int kind, int diff) {+ for (int c = 0; c < FNF_CHARTS; c++) {+ const fnf_var_t *v = &fnf_var[fnf_chart[c].var];+ if (!strcmp(fnf_song[v->song].name, song) && v->kind == kind && fnf_chart[c].diff == diff) return c;+ }+ return -1;+}++/* a bot: each player note pressed on time (chords together), each hold kept to its end, other notes let go of+ 30 ms on or just before the lane's next note */+typedef struct { int32_t t; uint8_t lane, down; uint16_t i; } bot_ev;+static bot_ev evs[2 * FNF_CHART_NOTES_MAX];+static int cmp_ev(const void *a, const void *b) {+ const bot_ev *x = a, *y = b;+ if (x->t != y->t) return x->t < y->t ? -1 : 1;+ if (x->down != y->down) return x->down < y->down ? -1 : 1; /* (releases first) */+ if (x->lane != y->lane) return x->lane < y->lane ? -1 : 1;+ return x->i < y->i ? -1 : x->i > y->i; /* (no ties left: the same order everywhere) */+}++static int bot_events(int n, int32_t late) {+ int k = 0;+ for (int i = 0; i < n; i++) {+ const note_t *a = ¬es[i];+ if (a->lane >= 4) continue;+ int32_t next = INT32_MAX;+ for (int j = i + 1; j < n; j++)+ if (notes[j].lane == a->lane) {+ next = notes[j].t;+ break;+ }+ int32_t up = a->len > 0 ? a->t + a->len + 1000 : a->t + 30000;+ if (up > next - 2000) up = next - 2000;+ if (up <= a->t + late) up = a->t + late + 1;+ evs[k] = (bot_ev){a->t + late, a->lane, 1, (uint16_t)k};+ k++;+ evs[k] = (bot_ev){up, a->lane, 0, (uint16_t)k};+ k++;+ }+ qsort(evs, (size_t)k, sizeof evs[0], cmp_ev);+ return k;+}++/* ---------------------------------------------------------------- the rules */+static void judgements_and_points(void) {+ CHECK(fnf_judge(0) == J_SICK && fnf_judge(45) == J_SICK && fnf_judge(-45) == J_SICK, "Sick: up to 45 ms");+ CHECK(fnf_judge(46) == J_GOOD && fnf_judge(90) == J_GOOD && fnf_judge(-90) == J_GOOD, "Good: up to 90 ms");+ CHECK(fnf_judge(91) == J_BAD && fnf_judge(135) == J_BAD && fnf_judge(-135) == J_BAD, "Bad: up to 135 ms");+ CHECK(fnf_judge(136) == J_SHIT && fnf_judge(160) == J_SHIT && fnf_judge(-160) == J_SHIT, "Shit: up to 160 ms");+ CHECK(fnf_judge(161) == J_MISS && fnf_judge(-161) == J_MISS, "a miss past 160 ms");+ /* Scoring.scoreNotePBOT1, in double precision */+ for (int d = 0; d <= 160; d++) {+ int want = d < 5 ? 500 : (int)(500.0 * (1.0 - 1.0 / (1.0 + exp(-0.080 * (d - 54.99)))) + 9.0);+ CHECK(fnf_points(d) == want && fnf_points(-d) == want, "PBOT1 at %d ms: %d, not %d", d, fnf_points(d), want);+ }+ CHECK(fnf_points(161) == -100, "past the window: -100");+ CHECK(fnf_points(0) == 500 && fnf_points(4) == 500 && fnf_points(160) == 9, "500 to 9 points");+}++/* Tutorial, Normal: its first player notes, played by hand */+static void scoring(void) {+ int c = find_chart("Tutorial", FNF_VAR_DEFAULT, FNF_DIFF_NORMAL);+ CHECK(c >= 0, "Tutorial, Normal");+ if (c < 0) return;+ int n = read_chart((unsigned)c);+ CHECK(fnf_start(&T, (unsigned)c, buf, 0, false), "starts");+ CHECK(T.health == 1000000 && T.score == 0 && T.combo == 0, "health at half, no score");+ note_t a = player_note(n, 0), b = player_note(n, 1), d = player_note(n, 2), e = player_note(n, 3);+ CHECK(a.t > 0 && b.t > a.t, "notes");+ /* on time: Sick, 500, +1.5% of the bar */+ fnf_press(&T, a.lane, a.t);+ CHECK(T.tally[J_SICK] == 1 && fnf_score(&T) == 500 && T.health == 1030000 && T.combo == 1, "Sick: 500, +0.03");+ fnf_release(&T, a.lane, a.t + 20000);+ /* 50 ms late: Good, +0.015 */+ fnf_press(&T, b.lane, b.t + 50000);+ CHECK(T.tally[J_GOOD] == 1 && fnf_score(&T) == 500 + fnf_points(50) && T.health == 1045000 && T.combo == 2,+ "Good at 50 ms: %d points, health %d", fnf_score(&T) - 500, (int)T.health);+ fnf_release(&T, b.lane, b.t + 70000);+ /* 100 ms early: Bad, no health, the combo broken */+ int before = fnf_score(&T);+ fnf_press(&T, d.lane, d.t - 100000);+ CHECK(T.tally[J_BAD] == 1 && fnf_score(&T) == before + fnf_points(100) && T.health == 1045000 && T.combo == 0,+ "Bad 100 ms early: combo broken, health kept");+ fnf_release(&T, d.lane, d.t - 80000);+ /* 150 ms late: Shit, -0.02 */+ before = fnf_score(&T);+ fnf_press(&T, e.lane, e.t + 150000);+ CHECK(T.tally[J_SHIT] == 1 && fnf_score(&T) == before + fnf_points(150) && T.health == 1025000, "Shit: -0.02");+ fnf_release(&T, e.lane, e.t + 160000);+ /* a ghost miss: a key with no note near: -0.08 and -10, no miss counted, the combo kept */+ fnf_press(&T, 0, e.t + 170000); /* (no note a lane's window away) */+ fnf_release(&T, 0, e.t + 180000);+ T.combo = 7;+ int32_t h = T.health;+ before = fnf_score(&T);+ int32_t far = e.t + 400000;+ bool clear = true;+ for (int i = 0; i < n; i++)+ if (notes[i].lane == 1 && notes[i].t > far - 400000 && notes[i].t < far + 400000) clear = false;+ if (clear) {+ fnf_press(&T, 1, far);+ CHECK(T.health == h - 80000 && fnf_score(&T) == before - 10 && T.combo == 7 && T.tally[J_MISS] == 0,+ "ghost miss: -0.08, -10, combo kept");+ fnf_release(&T, 1, far + 10000);+ }+ /* a note let by: a miss once 160 ms have gone, -0.08, -100, the combo broken */+ note_t m = player_note(n, 6);+ int chord = 0;+ for (int i = 0; i < n; i++) chord += notes[i].lane < 4 && notes[i].t == m.t;+ fnf_advance(&T, m.t + 160000);+ int missed = T.tally[J_MISS];+ h = T.health, before = fnf_score(&T);+ fnf_advance(&T, m.t + 160001);+ CHECK(T.tally[J_MISS] == missed + chord && T.combo == 0 && T.health == h - 80000 * chord &&+ fnf_score(&T) == before - 100 * chord, "missed past 160 ms, not at 160 ms: -0.08, -100");+}++/* the edges of the window, and the note offset */+static void window_edges(void) {+ int c = find_chart("Bopeebo", FNF_VAR_DEFAULT, FNF_DIFF_EASY);+ if (c < 0) return;+ int n = read_chart((unsigned)c);+ note_t a = player_note(n, 0), b = player_note(n, 1);+ fnf_start(&T, (unsigned)c, buf, 0, false);+ fnf_press(&T, a.lane, a.t + 160000);+ CHECK(T.tally[J_SHIT] == 1, "hit at 160 ms: Shit");+ fnf_release(&T, a.lane, a.t + 170000);+ fnf_press(&T, b.lane, b.t - 160999);+ CHECK(T.tally[J_SHIT] == 1, "160.999 ms early: out of the window");+ fnf_release(&T, b.lane, b.t - 160500);+ fnf_press(&T, b.lane, b.t - 135900);+ CHECK(T.tally[J_BAD] == 1, "135.9 ms early: Bad (whole ms, toward 0)");+ fnf_start(&T, (unsigned)c, buf, 0, false);+ fnf_press(&T, a.lane, a.t + 160001);+ CHECK(T.tally[J_SHIT] == 0 && T.tally[J_MISS] == 1, "160.001 ms late: missed, then a ghost miss");+ /* a 30 ms note offset: a press 30 ms late counts as on time */+ fnf_start(&T, (unsigned)c, buf, 30, false);+ fnf_press(&T, a.lane, a.t + 30000);+ CHECK(T.tally[J_SICK] == 1 && fnf_score(&T) == 500, "offset 30 ms: Sick");+ fnf_release(&T, a.lane, a.t + 60000);+ fnf_advance(&T, b.t + 190000);+ CHECK(T.tally[J_MISS] == 0, "offset 30 ms: not missed before 190 ms");+ fnf_advance(&T, b.t + 190001);+ CHECK(T.tally[J_MISS] == 1, "offset 30 ms: missed past 190 ms");+}++/* holds: +250 a second and +6% of the bar a second held; let go of with more than 160 ms left: -125 a second left,+ the combo broken; a missed hold: its whole length lost too */+/* the bot's presses before time t: the song up to there played on time */+static void bot_until(unsigned c, int32_t t) {+ int n = read_chart(c);+ int k = bot_events(n, 0);+ fnf_start(&T, c, buf, 0, false);+ for (int i = 0; i < k && evs[i].t < t; i++) {+ if (evs[i].down) fnf_press(&T, evs[i].lane, evs[i].t);+ else fnf_release(&T, evs[i].lane, evs[i].t);+ }+ fnf_advance(&T, t);+ read_chart(c);+}++static void holds(void) {+ for (int c = 0; c < FNF_CHARTS; c++) {+ int n = read_chart((unsigned)c);+ int k = -1;+ for (int i = 0; i < n && k < 0; i++)+ if (notes[i].lane < 4 && notes[i].len > 1000000 && notes[i].kind == 0 && notes[i].t > 3000000) k = i;+ if (k < 0) continue;+ note_t h = notes[k];+ /* nothing else in that lane near it */+ bool alone = true;+ for (int i = 0; i < n; i++)+ if (i != k && notes[i].lane == h.lane && notes[i].t > h.t - 400000 && notes[i].t < h.t + h.len + 400000) alone = false;+ if (!alone) continue;+ bot_until((unsigned)c, h.t - 300000);+ T.health = 400000, T.combo = 12;+ int64_t s0 = T.score;+ fnf_press(&T, h.lane, h.t);+ fnf_advance(&T, h.t + h.len);+ int64_t got = T.score - s0 - 500000;+ CHECK(got == h.len / 4, "a hold held: %lld thousandths for %d us, not %d", (long long)got, (int)h.len, (int)(h.len / 4));+ CHECK(T.health == 400000 + 30000 + (int32_t)((int64_t)h.len * 12 / 100) || T.health == FNF_HEALTH_MAX,+ "a hold held: +0.12 a second (%d)", (int)T.health);+ CHECK(T.combo == 13, "a hold held: the combo kept");+ fnf_release(&T, h.lane, h.t + h.len + 10000);+ /* let go of 300 ms before its end */+ bot_until((unsigned)c, h.t - 300000);+ T.combo = 12;+ s0 = T.score;+ fnf_press(&T, h.lane, h.t);+ fnf_release(&T, h.lane, h.t + h.len - 300000);+ got = T.score - s0 - 500000;+ int64_t want = (h.len - 300000) / 4 - 300000 / 8;+ CHECK(got == want, "a hold let go of 0.3 s early: %lld, not %lld", (long long)got, (long long)want);+ CHECK(T.combo == 0, "let go of early: the combo broken");+ /* let go of 100 ms before its end: no penalty */+ bot_until((unsigned)c, h.t - 300000);+ T.combo = 12;+ s0 = T.score;+ fnf_press(&T, h.lane, h.t);+ fnf_release(&T, h.lane, h.t + h.len - 100000);+ got = T.score - s0 - 500000;+ CHECK(got == (h.len - 100000) / 4 && T.combo == 13, "let go of 0.1 s early: no penalty");+ /* missed altogether */+ bot_until((unsigned)c, h.t - 300000);+ s0 = T.score;+ int32_t hp = T.health;+ fnf_advance(&T, h.t + 170000);+ got = T.score - s0;+ CHECK(got == -100000 - h.len / 8 && T.health == hp - 80000, "a missed hold: -100 and -125 a second of it");+ return;+ }+ CHECK(0, "no chart with a long hold");+}++static void health_limits(void) {+ int c = find_chart("Fresh", FNF_VAR_DEFAULT, FNF_DIFF_HARD);+ if (c < 0) return;+ fnf_start(&T, (unsigned)c, buf, 0, false);+ int32_t t = fnf_start_time(&T) + 1000;+ for (int i = 0; i < 12 && T.over == FNF_PLAYING; i++, t += 20000) { /* ghost misses during the countdown */+ fnf_press(&T, 0, t);+ fnf_release(&T, 0, t + 5000);+ }+ CHECK(T.over == FNF_PLAYING && T.health == 1000000 - 12 * 80000, "12 ghost misses: %d", (int)T.health);+ for (int i = 0; i < 2 && T.over == FNF_PLAYING; i++, t += 20000) fnf_press(&T, 0, t), fnf_release(&T, 0, t + 5000);+ CHECK(T.over == FNF_DIED && T.health == 0, "the bar emptied: game over");+ /* never past 2.0 */+ int n = read_chart((unsigned)c);+ fnf_start(&T, (unsigned)c, buf, 0, false);+ T.health = 1990000;+ note_t a = player_note(n, 0);+ fnf_press(&T, a.lane, a.t);+ CHECK(T.health == FNF_HEALTH_MAX, "capped at 2.0");+}++static void ranks(void) {+ fnf_game_t g;+ memset(&g, 0, sizeof g);+ g.total = 100;+ g.tally[J_SICK] = 100;+ CHECK(fnf_rank(&g) == 5 && fnf_completion(&g) == 10000, "all Sick: PERFECT GOLD");+ g.tally[J_SICK] = 99, g.tally[J_GOOD] = 1;+ CHECK(fnf_rank(&g) == 4, "Sick and Good only: PERFECT");+ g.tally[J_SICK] = 80, g.tally[J_GOOD] = 10, g.tally[J_BAD] = 10;+ CHECK(fnf_rank(&g) == 3 && fnf_completion(&g) == 9000, "90%%: EXCELLENT");+ g.tally[J_SICK] = 80, g.tally[J_GOOD] = 5, g.tally[J_MISS] = 5;+ CHECK(fnf_rank(&g) == 2 && fnf_completion(&g) == 8000, "(85 - 5) %%: GREAT");+ g.tally[J_SICK] = 60, g.tally[J_GOOD] = 0, g.tally[J_MISS] = 0;+ CHECK(fnf_rank(&g) == 1, "60%%: GOOD");+ g.tally[J_SICK] = 59;+ CHECK(fnf_rank(&g) == 0, "59%%: LOSS");+ g.tally[J_SICK] = 0, g.tally[J_MISS] = 50;+ CHECK(fnf_completion(&g) == 0, "never below 0");+}++/* ---------------------------------------------------------------- every chart */+static uint32_t hash = 2166136261u;+static void mix(uint32_t v) {+ for (int i = 0; i < 4; i++) hash = (hash ^ (v >> (8 * i) & 255)) * 16777619u;+}++static void play_bot(unsigned c, int32_t late, fnf_game_t *g) {+ int n = read_chart(c);+ int k = bot_events(n, late);+ fnf_start(g, c, buf, 0, false);+ for (int i = 0; i < k && g->over == FNF_PLAYING; i++) {+ if (evs[i].down) fnf_press(g, evs[i].lane, evs[i].t);+ else fnf_release(g, evs[i].lane, evs[i].t);+ }+ while (g->over == FNF_PLAYING) fnf_advance(g, g->now + 50000);+}++static void every_chart(void) {+ int fc = 0, peak = 0;+ for (unsigned c = 0; c < FNF_CHARTS; c++) {+ const fnf_chart_t *ch = &fnf_chart[c];+ int n = read_chart(c);+ CHECK(n == ch->notes, "chart %u: %d notes read, %d listed", c, n, ch->notes);+ int total = 0;+ for (int i = 0; i < n; i++) {+ CHECK(!i || notes[i].t >= notes[i - 1].t, "chart %u: notes in order", c);+ CHECK(notes[i].kind < FNF_NOTE_KINDS && notes[i].len >= 0, "chart %u: a note's kind and length", c);+ if (notes[i].lane < 4 && notes[i].kind != FNF_KIND_NON_SCOREABLE) total++;+ }+ CHECK(total == ch->total, "chart %u: %d notes count, %d listed", c, total, ch->total);+ CHECK(n > 0 && notes[n - 1].t + notes[n - 1].len < (int32_t)fnf_var[ch->var].length * 1000,+ "chart %u: its notes within the song", c);+ fnf_game_t g;+ play_bot(c, 0, &g);+ bool ok = g.over == FNF_WON && g.tally[J_SICK] == total && g.max_combo == total && !g.tally[J_MISS] &&+ fnf_rank(&g) == 5;+ CHECK(ok, "chart %u (%s, %s): bot: over %d, sick %d/%d, max combo %d, misses %d", c,+ fnf_song[fnf_var[ch->var].song].name, DIFF_NAME[ch->diff], g.over, g.tally[J_SICK], total, g.max_combo,+ g.tally[J_MISS]);+ /* the points: 500 a note, and 250 a second of the holds, all held */+ int64_t want = (int64_t)total * 500000, held = 0;+ for (int i = 0; i < n; i++)+ if (notes[i].lane < 4 && notes[i].kind != FNF_KIND_NON_SCOREABLE) held += notes[i].len;+ want += held / 4;+ CHECK(g.score == want, "chart %u: %lld points, not %lld", c, (long long)g.score, (long long)want);+ if (g.peak > peak) peak = g.peak;+ fc += ok;+ mix((uint32_t)g.score), mix(g.max_combo), mix((uint32_t)g.health);+ }+ printf("every chart: %d of %d to a full combo, all Sick; at most %d notes on their way at once\n", fc, FNF_CHARTS, peak);+ CHECK(peak < FNF_ACTIVE, "room for the notes on their way");+}++/* bots hitting late, and missing: the song goes on, the tallies add up */+static void late_and_missing(void) {+ int c = find_chart("Dadbattle", FNF_VAR_DEFAULT, FNF_DIFF_HARD);+ if (c < 0) return;+ fnf_game_t g;+ play_bot((unsigned)c, 70000, &g);+ CHECK(g.tally[J_GOOD] == g.total && g.over == FNF_WON && g.max_combo == g.total, "70 ms late: all Good");+ play_bot((unsigned)c, 120000, &g);+ CHECK(g.tally[J_BAD] == g.total && g.combo == 0 && g.max_combo == 0, "120 ms late: all Bad, no combo");+ mix((uint32_t)g.score), mix((uint32_t)g.health), mix(g.over);+ /* nobody playing: the bar empties */+ fnf_start(&g, (unsigned)c, buf, 0, false);+ while (g.over == FNF_PLAYING) fnf_advance(&g, g.now + 100000);+ CHECK(g.over == FNF_DIED, "nobody playing: game over");+}++/* ---------------------------------------------------------------- the app, with random keys */+static uint32_t rng = 12345;+static uint32_t rnd(void) {+ rng ^= rng << 13, rng ^= rng >> 17, rng ^= rng << 5;+ return rng;+}+static uint32_t held_keys;+static uint32_t random_keys(uint32_t ms) {+ (void)ms;+ if (rnd() % 23 == 0) {+ static const uint32_t K[] = {FK_LEFT, FK_DOWN, FK_UP, FK_RIGHT, FK_7, FK_8, FK_LPAR, FK_RPAR, FK_OK, FK_OK, FK_BACK, FK_SHIFT};+ held_keys ^= K[rnd() % (sizeof K / sizeof K[0])];+ }+ return held_keys & ~FK_HOME;+}++static void app_session(uint32_t length, uint32_t (*keys)(uint32_t)) {+ clock_ms = 1000;+ quit_at = clock_ms + length;+ script = keys;+ held_keys = 0;+ fnf_app_main();+ script = 0;+}++static void fuzz(void) {+ for (int s = 0; s < 300; s++) {+ rng = 0x1234567u + (uint32_t)s * 7919u;+ memset(files, 0, sizeof files);+ app_session(4000 + rnd() % 26000, random_keys);+ uint32_t n;+ uint8_t *d = file_data(FNF_SAVE_NAME, &n);+ CHECK(d && n == sizeof(fnf_file_t) && fnf_file_ok((const fnf_file_t *)d), "session %d: the save is good", s);+ mix(n), mix((uint32_t)G.score);+ }+ /* the engine on its own: random presses through random charts */+ for (int s = 0; s < 200; s++) {+ unsigned c = rnd() % FNF_CHARTS;+ fnf_game_t g;+ fnf_start(&g, c, buf, (int32_t)(rnd() % 61) - 30, s & 1);+ int32_t t = g.now;+ while (g.over == FNF_PLAYING && t < g.length + 1000000) {+ t += (int32_t)(rnd() % 40000);+ int lane = (int)(rnd() % 4);+ if (rnd() & 1) fnf_press(&g, lane, t);+ else fnf_release(&g, lane, t);+ CHECK(g.health >= 0 && g.health <= FNF_HEALTH_MAX && g.combo <= g.total, "chart %u: health and combo in range", c);+ }+ mix((uint32_t)g.score), mix(g.tally[J_SICK]), mix(g.tally[J_MISS]);+ }+}++/* ---------------------------------------------------------------- a whole session, by the keys */+static uint32_t seq_at[64], seq_key[64];+static int seq_n;+static uint32_t scripted(uint32_t ms) {+ for (int i = 0; i < seq_n; i++)+ if (ms >= seq_at[i] && ms < seq_at[i] + 80) return seq_key[i];+ return 0;+}+static void keys_at(int n, const uint32_t *at, const uint32_t *k) {+ seq_n = n;+ for (int i = 0; i < n; i++) seq_at[i] = at[i], seq_key[i] = k[i];+}++static void sessions(void) {+ memset(files, 0, sizeof files);+ /* the title, the menu, Freeplay, a song: the guide the first time (Back skips it), then Tutorial plays; Back+ pauses, Quit game asks, Quit */+ uint32_t at[] = {1500, 2000, 2400, 2800, 3200, 3600, 9000, 9400, 9800, 10200, 10600, 11000, 11400, 11800},+ k[] = {FK_OK, FK_DOWN, FK_OK, FK_OK, FK_BACK, 0, FK_BACK, FK_DOWN, FK_DOWN, FK_DOWN, FK_DOWN, FK_DOWN, FK_OK, FK_DOWN};+ keys_at(14, at, k);+ app_session(14000, scripted);+ CHECK(A.view == V_QUIT || A.view == V_PAUSE, "paused, quitting: %d", A.view);+ uint32_t n;+ uint8_t *d = file_data(FNF_SAVE_NAME, &n);+ CHECK(d && fnf_file_ok((const fnf_file_t *)d) && ((const fnf_file_t *)d)->p.guide == 1, "the guide seen, saved");+}++/* ---------------------------------------------------------------- saves */+static void saves(void) {+ memset(files, 0, sizeof files);+ fnf_progress_t p, q;+ fnf_fresh(&p);+ p.downscroll = 1, p.offset = -25, p.guide = 1, p.week = 3, p.song = 5, p.list = 1;+ p.week_score[2][1] = 123456;+ fnf_record(&p, 7, 54321, 3, 9123);+ fnf_record(&p, 7, 50000, 4, 10000); /* a better rank, a lower score: both best kept */+ CHECK(p.chart[7].score == 54321 && p.chart[7].rank == 5 && p.chart[7].completion == 10000, "best score, best rank");+ fnf_record(&p, 7, 60000, 1, 6000);+ CHECK(p.chart[7].score == 60000 && p.chart[7].rank == 5, "a better score kept, the rank too");+ CHECK(save_write(&p), "written");+ CHECK(save_load(&q) && !memcmp(&p, &q, sizeof p), "read back the same");+ /* damaged: each byte changed in turn: never read, the copy instead */+ uint32_t n;+ uint8_t *d = file_data(FNF_SAVE_NAME, &n);+ CHECK(n == sizeof(fnf_file_t), "%u bytes", n);+ for (uint32_t i = 0; i < n; i += 7) {+ d[i] ^= 0x5A;+ fnf_file_t f;+ memcpy(&f, d, sizeof f);+ CHECK(!fnf_file_ok(&f), "byte %u changed: refused", i);+ CHECK(save_load(&q) && !memcmp(&p, &q, sizeof p), "byte %u changed: the copy read", i);+ d = file_data(FNF_SAVE_NAME, &n); /* (put back from the copy) */+ }+ /* only the copy left (installed again) */+ forget(FNF_SAVE_NAME);+ CHECK(save_load(&q) && !memcmp(&p, &q, sizeof p), "from the copy alone");+ CHECK(file_data(FNF_SAVE_NAME, &n), "and put back");+ /* both damaged: a fresh start */+ uint8_t *c = file_data(FNF_COPY_NAME, &n);+ c[n / 2] = c[n / 2] == 'A' ? 'B' : 'A';+ d = file_data(FNF_SAVE_NAME, &n);+ d[20] ^= 1;+ CHECK(!save_load(&q) && q.guide == 0 && q.chart[7].score == 0, "both damaged: a fresh start");+ /* cut short, too long, nothing */+ memset(files, 0, sizeof files);+ save_write(&p);+ forget(FNF_COPY_NAME);+ d = file_data(FNF_SAVE_NAME, &n);+ files[0].len = n - 1;+ CHECK(!save_load(&q), "cut short: refused");+ memset(files, 0, sizeof files);+ CHECK(!save_load(&q), "nothing: a fresh start");+ /* the storage full: the game goes on */+ storage_full = true;+ CHECK(!save_write(&p), "full: not written");+ storage_full = false;+}++/* ---------------------------------------------------------------- pictures */+/* a player a little off the beat: each press up to 60 ms early or late (the same everywhere: xorshift) */+static void play_human(unsigned c, fnf_game_t *g, uint8_t *b, int32_t until) {+ int n = read_chart(c);+ int k = 0;+ uint32_t r = 2463534242u;+ for (int i = 0; i < n; i++) { /* (each press and its release moved together) */+ const note_t *a = ¬es[i];+ if (a->lane >= 4) continue;+ r ^= r << 13, r ^= r >> 17, r ^= r << 5;+ int32_t off = (int32_t)(r % 121000) - 60000, next = INT32_MAX;+ for (int j = i + 1; j < n; j++)+ if (notes[j].lane == a->lane) {+ next = notes[j].t;+ break;+ }+ int32_t down = a->t + off, up = a->len > 0 ? a->t + a->len + 1000 : down + 30000;+ if (up > next - 61000) up = next - 61000;+ if (up <= down) up = down + 1;+ evs[k] = (bot_ev){down, a->lane, 1, (uint16_t)k};+ k++;+ evs[k] = (bot_ev){up, a->lane, 0, (uint16_t)k};+ k++;+ }+ qsort(evs, (size_t)k, sizeof evs[0], cmp_ev);+ fnf_start(g, c, b, 0, false);+ for (int i = 0; i < k && g->over == FNF_PLAYING && evs[i].t <= until; i++) {+ if (evs[i].down) fnf_press(g, evs[i].lane, evs[i].t);+ else fnf_release(g, evs[i].lane, evs[i].t);+ }+ while (g->over == FNF_PLAYING && g->now < until) fnf_advance(g, g->now + 50000 < until ? g->now + 50000 : until);+}++static void shots(const char *dir) {+ memset(files, 0, sizeof files);+ A.p = &P, A.g = &G;+ fnf_fresh(&P);+ P.guide = 1;+ bold_load();+ /* a real result first: Bopeebo, Hard, played a little off the beat */+ int c = find_chart("Bopeebo", FNF_VAR_DEFAULT, FNF_DIFF_HARD);+ play_human((unsigned)c, &G, chart_buf, INT32_MAX);+ fnf_record(&P, G.chart, fnf_score(&G), fnf_rank(&G), fnf_completion(&G));+ A.result_rank = (uint8_t)fnf_rank(&G), A.result_score = fnf_score(&G), A.result_total = G.total;+ A.result_max_combo = G.max_combo, A.result_completion = fnf_completion(&G), A.result_new = 1;+ memcpy(A.result_tally, G.tally, sizeof A.result_tally);+ P.week_score[1][FNF_DIFF_HARD] = fnf_score(&G) * 3;+ A.view = V_RESULTS;+ screens_draw(&A);+ shot(dir, "results");+ A.clock = 1000;+ app_build_list(&A);+ A.view = V_TITLE, A.clock = 1000 + 60000 / 102 * 4 + 100;+ screens_draw(&A);+ shot(dir, "title");+ A.view = V_MAIN, A.sel = MAIN_FREEPLAY;+ screens_draw(&A);+ shot(dir, "menu");+ A.view = V_STORY, P.week = 1, P.week_diff = FNF_DIFF_HARD;+ screens_draw(&A);+ shot(dir, "story");+ A.view = V_FREEPLAY, P.list = 0;+ app_build_list(&A);+ P.song = 1, P.song_diff = FNF_DIFF_HARD;+ screens_draw(&A);+ shot(dir, "freeplay");+ /* songs, at moments */+ static const struct { const char *song; int kind, diff; int32_t at; const char *name; } S[] = {+ {"Bopeebo", FNF_VAR_DEFAULT, FNF_DIFF_HARD, 21300000, "shot"},+ {"Senpai", FNF_VAR_DEFAULT, FNF_DIFF_HARD, 30000000, "school"},+ {"Cocoa", FNF_VAR_DEFAULT, FNF_DIFF_HARD, 25000000, "mall"},+ {"Ugh", FNF_VAR_DEFAULT, FNF_DIFF_HARD, 33000000, "tankman"},+ {"Philly Nice", FNF_VAR_PICO, FNF_DIFF_HARD, 40000000, "pico"},+ {"Spookeez", FNF_VAR_DEFAULT, FNF_DIFF_NORMAL, -1000000, "countdown"},+ {"Monster", FNF_VAR_DEFAULT, FNF_DIFF_HARD, 40000000, "monster"},+ {"Blazin'", FNF_VAR_DEFAULT, FNF_DIFF_NORMAL, 30000000, "blazin"},+ };+ for (unsigned s = 0; s < sizeof S / sizeof S[0]; s++) {+ c = find_chart(S[s].song, S[s].kind, S[s].diff);+ if (c < 0) {+ printf("no %s\n", S[s].song);+ continue;+ }+ play_human((unsigned)c, &G, chart_buf, S[s].at);+ if (!play_load(&G)) printf("%s: not enough RAM for its pictures\n", S[s].song);+ A.view = V_PLAY, A.play_t0 = 0, A.clock = 100000;+ screens_draw(&A);+ shot(dir, S[s].name);+ if (s == 0) {+ A.view = V_PAUSE, A.sel = PAUSE_OPTIONS;+ screens_draw(&A);+ shot(dir, "pause");+ P.downscroll = 1;+ A.view = V_PLAY;+ screens_draw(&A);+ shot(dir, "downscroll");+ P.downscroll = 0;+ }+ }+ A.view = V_HELP, A.page = 0, A.first_run = 1, A.under = V_PLAY;+ screens_draw(&A);+ shot(dir, "help");+}++/* ---------------------------------------------------------------- a film */+static const char *film_dir;+static int film_k;+static int32_t film_t0 = INT32_MIN;+static void film(const char *dir, unsigned c, int32_t ms) {+ film_dir = dir;+ memset(files, 0, sizeof files);+ A.p = &P, A.g = &G;+ fnf_fresh(&P);+ bold_load();+ int n = read_chart(c);+ int k = bot_events(n, 0);+ fnf_start(&G, c, chart_buf, 0, false);+ play_load(&G);+ int32_t t = G.now, end = G.now + ms * 1000;+ int i = 0;+ A.view = V_PLAY, A.play_t0 = 0;+ for (; t <= end; t += 33333) { /* 30 a second */+ while (i < k && evs[i].t <= t) {+ if (evs[i].down) fnf_press(&G, evs[i].lane, evs[i].t);+ else fnf_release(&G, evs[i].lane, evs[i].t);+ i++;+ }+ fnf_advance(&G, t);+ A.clock = (uint32_t)((t - fnf_start_time(&G)) / 1000) + 1;+ screens_draw(&A);+ if (film_t0 == INT32_MIN) film_t0 = t;+ char path[512];+ snprintf(path, sizeof path, "%s/%06d_%06d.raw", film_dir, film_k++, (int)((t - film_t0) / 1000));+ FILE *f = fopen(path, "wb");+ if (!f) exit(2);+ fwrite(fb, 2, 320 * 240, f);+ fclose(f);+ }+}++/* every variation, 25 s in, a bot playing (to look at) */+static void scenes(const char *dir) {+ A.p = &P, A.g = &G;+ fnf_fresh(&P);+ bold_load();+ for (int v = 0; v < FNF_VARS; v++) {+ unsigned c = fnf_var[v].chart + fnf_var[v].ncharts - 1;+ int n = read_chart(c);+ int k = bot_events(n, 0);+ fnf_start(&G, c, chart_buf, 0, false);+ play_load(&G);+ int32_t at = 25000000;+ for (int i = 0; i < k && evs[i].t <= at; i++) {+ if (evs[i].down) fnf_press(&G, evs[i].lane, evs[i].t);+ else fnf_release(&G, evs[i].lane, evs[i].t);+ }+ fnf_advance(&G, at);+ A.view = V_PLAY, A.play_t0 = 0, A.clock = 100000;+ screens_draw(&A);+ char name[64];+ snprintf(name, sizeof name, "v%02d", v);+ shot(dir, name);+ }+}++int main(int argc, char **argv) {+ chart_buf = app_chart_buf;+ if (argc >= 3 && !strcmp(argv[1], "notes")) { /* a chart's notes (us): time lane length */+ unsigned c = (unsigned)atoi(argv[2]);+ int n = read_chart(c);+ fnf_start(&T, c, buf, 0, false);+ printf("start %d total %d\n", (int)T.now, fnf_chart[c].total);+ for (int i = 0; i < n; i++)+ if (notes[i].lane < 4) printf("%d %d %d %d\n", (int)notes[i].t, notes[i].lane, (int)notes[i].len, notes[i].kind);+ return 0;+ }+ if (argc >= 3 && !strcmp(argv[1], "scenes")) {+ draw_strip_buffer(test_strip);+ scenes(argv[2]);+ return 0;+ }+ draw_strip_buffer(test_strip);+ if (argc >= 3 && !strcmp(argv[1], "shots")) {+ shots(argv[2]);+ return 0;+ }+ if (argc >= 5 && !strcmp(argv[1], "film")) {+ film(argv[2], (unsigned)atoi(argv[3]), atoi(argv[4]));+ return 0;+ }+ if (argc < 3 || strcmp(argv[1], "test")) {+ printf("play test DIR | shots DIR | film DIR CHART MS\n");+ return 1;+ }+ judgements_and_points();+ scoring();+ window_edges();+ holds();+ health_limits();+ ranks();+ every_chart();+ late_and_missing();+ saves();+ sessions();+ fuzz();+ printf("hash %08x (the same on every computer)\n", hash);+ printf(fails ? "%d FAILED\n" : "all good\n", fails);+ return fails != 0;+}diff --git a/games/fnf/tests/test.c b/games/fnf/tests/test.cdeleted file mode 100644index f27b60d0..00000000--- a/games/fnf/tests/test.c+++ /dev/null@@ -1,75 +0,0 @@-#include "game.h"-#include "save.h"-#include "render.h"-#include <assert.h>-#include <stdio.h>-#include <stdlib.h>-#include <string.h>-#include <stddef.h>-#include <math.h>-static Game g;-static bool dense_fixture,crowded_fixture;-typedef struct { int32_t time; uint8_t lane,on; } Press;-static Press presses[10000];-static uint16_t screen[320*240];-static unsigned poll_count,push_count;-static void sample_input(void){poll_count++;}-static void display(int x,int y,int w,int h,const uint16_t*p){push_count++;assert(x>=0&&y>=0&&x+w<=320&&y+h<=240);for(int j=0;j<h;j++)memcpy(screen+(y+j)*320+x,p+j*w,w*2);}-static void shot(const char*path){FILE*f=fopen(path,"wb");assert(f);fprintf(f,"P6\n320 240\n255\n");for(unsigned i=0;i<320*240;i++){uint16_t c=screen[i];unsigned char b[3]={(unsigned char)((c>>11)*255/31),(unsigned char)(((c>>5)&63)*255/63),(unsigned char)((c&31)*255/31)};fwrite(b,1,3,f);}fclose(f);}-static int compare(const void*a,const void*b){const Press*x=a,*y=b;return x->time!=y->time?(x->time>y->time?1:-1):(int)x->on-y->on;}-static unsigned decode(unsigned id,Note*out){const Chart*c=&charts[id];uint32_t at=c->offset,end=at+c->bytes;int32_t time=0;unsigned n=0;bool ok=true;while(at<end){time+=(int32_t)game_varint(&at,end,&ok);unsigned info=game_varint(&at,end,&ok),length=info&1?game_varint(&at,end,&ok):0;out[n++]=(Note){time,time+(int32_t)length,(info>>1)&7,info>>4,0};}assert(ok&&n==c->count);return n;}-static unsigned perfect(unsigned id){- static Note notes[4000];unsigned n=decode(id,notes),np=0;int32_t last_release[4]={-1,-1,-1,-1};- for(unsigned i=0;i<n;i++){Note*p=¬es[i];if(p->direction>=4)continue;unsigned d=p->direction;int32_t end=p->end+1;- for(unsigned j=i+1;j<n;j++)if(notes[j].direction==d&¬es[j].time>p->time){if(end>=notes[j].time)end=notes[j].time-1;break;}- if(p->time==last_release[d])continue;- presses[np++]=(Press){p->time,(uint8_t)d,1};presses[np++]=(Press){end,(uint8_t)d,0};last_release[d]=p->time;- }- qsort(presses,np,sizeof(*presses),compare);assert(game_start(&g,id));uint8_t held=0;- for(unsigned p=0;p<np;){int32_t at=presses[p].time;do{unsigned bit=1u<<presses[p].lane;if(presses[p].on)held|=bit;else held&=~bit;p++;}while(p<np&&presses[p].time==at);unsigned misses=g.judged[MISS];game_advance(&g,at,held);if(g.judged[MISS]!=misses)fprintf(stderr,"MISS chart%u at%f held%u\n",id,at/16.0,held);if(g.lost){fprintf(stderr,"chart %u lost at %.3f health %f fault %u peak %u\n",id,g.time/16.0,g.health,g.fault,g.peak);abort();}- const char*fixture=NULL;- if(!dense_fixture&&g.peak>=47){fixture="dense-chart.game";dense_fixture=true;}- if(!crowded_fixture&&id==CHART_COUNT-1&&g.time>480000&&g.actors[4].visible&&g.actors[5].visible){fixture="crowded-scene.game";crowded_fixture=true;}- if(fixture){FILE*file=fopen(fixture,"wb");assert(file);assert(fwrite(&g,1,sizeof(g),file)==sizeof(g));fclose(file);}- }- game_advance(&g,charts[id].end+1,0);unsigned total=0;for(unsigned i=0;i<5;i++)total+=g.judged[i];- if(!g.won||g.lost||g.fault||g.judged[MISS]||total!=charts[id].players||g.judged[SICK]!=charts[id].players){fprintf(stderr,"chart %u: won%u lost%u fault%u judged%u expected%u sick%u miss%u decoded%lu/%u\n",id,g.won,g.lost,g.fault,total,charts[id].players,g.judged[SICK],g.judged[MISS],(unsigned long)g.decoded,charts[id].count);abort();}- assert(game_completion(&g)==10000);assert(!strcmp(game_rank(&g),"PERFECT GOLD"));assert(g.p.record[id].completion==10000);return g.peak;-}-static void test_save(void){static uint8_t b[SAVE_BYTES],bad[SAVE_BYTES];static char backup[BACKUP_BYTES];Progress p={0},r={0};p.beat=1;p.record[0]=(Record){30000,10000,charts[0].players};save_encode(&p,b);assert(save_decode(&r,b,sizeof(b)));assert(!memcmp(&p,&r,sizeof(p)));unsigned n=save_backup(b,backup);assert(n<sizeof(backup));assert(save_restore(&r,(uint8_t*)backup,n));- for(unsigned i=0;i<SAVE_BYTES;i++)for(unsigned j=0;j<8;j++){memcpy(bad,b,sizeof(b));bad[i]^=1u<<j;Progress before=r;assert(!save_decode(&r,bad,sizeof(bad)));assert(!memcmp(&r,&before,sizeof(r)));}- backup[45]='x';assert(!save_restore(&r,(uint8_t*)backup,n));assert(!save_decode(&r,b,sizeof(b)-1));-}-static void test_score(void){assert(game_judge(45*16)==SICK);assert(game_judge(45*16+1)==GOOD);assert(game_judge(90*16)==GOOD);assert(game_judge(135*16)==BAD);assert(game_judge(160*16)==SHIT);assert(game_judge(160*16+1)==MISS);assert(game_points(0)==500);assert(game_points(161*16)==-100);- for(int i=0;i<160*16;i++){assert(game_points(i)==game_points(-i));assert(game_points(i)>=game_points(i+1));}- assert(game_lanes(UINT64_C(1)<<0)==1);assert(game_lanes(UINT64_C(1)<<2)==2);assert(game_lanes(UINT64_C(1)<<1)==4);assert(game_lanes(UINT64_C(1)<<3)==8);assert(game_lanes((UINT64_C(1)<<30)|(UINT64_C(1)<<0))==1);assert(game_lanes((UINT64_C(1)<<30)|(UINT64_C(1)<<31)|(UINT64_C(1)<<33)|(UINT64_C(1)<<34))==15);- assert(game_start(&g,0));game_advance(&g,0,1);assert(g.score_milli==-10000);assert(g.health<1);g.p.ghost=1;assert(game_start(&g,0));game_advance(&g,0,1);assert(g.score_milli==0);g.p.ghost=0;-}-static void test_holds(void){- for(unsigned test=0;test<2;test++){- assert(game_start(&g,0));g.read=g.end;g.time=0;g.count=1;for(unsigned i=0;i<NOTE_CAP;i++)g.notes[i].state=FINISHED;- g.notes[0]=(Note){16000,32000,0,KIND_NORMAL,WAITING};game_advance(&g,16000,1);assert(g.judged[SICK]==1&&g.combo==1&&g.score_milli==500000);- int32_t release=test?30400:24000;game_advance(&g,release,1);int64_t before=g.score_milli;float hp=g.health;game_advance(&g,release,0);- if(test){assert(g.combo==1&&g.score_milli==725000);}else{assert(g.combo==0&&before-g.score_milli==62500);}- assert(fabsf(g.health-hp)<.00001f);int64_t dropped=g.score_milli;game_advance(&g,40000,0);assert(g.score_milli==dropped);- }- assert(game_start(&g,0));g.combo=3;game_advance(&g,0,1);assert(g.combo==3);/* Empty taps subtract score/health, not a chart judgement. */-}-static void test_render(void){- Menu m={.view=TITLE,.difficulty=1};render_invalidate();poll_count=push_count=0;render(&g,&m,display,sample_input);assert(poll_count==30&&push_count==30);poll_count=push_count=0;render(&g,&m,display,sample_input);assert(poll_count==30&&!push_count);shot("title.ppm");- for(unsigned v=0;v<=SAVE_ERROR;v++){m.view=v;for(unsigned sel=0;sel<4;sel++){m.selected=sel;render(&g,&m,display,NULL);}}- for(unsigned s=0;s<SONG_COUNT;s++)for(unsigned v=0;v<4;v++)for(unsigned d=0;d<5;d++){unsigned c=game_chart(s,v,d);if(c==NONE)continue;assert(game_start(&g,c));m=(Menu){.view=FREEPLAY,.song=s,.variant=v,.difficulty=d};render(&g,&m,display,NULL);}- for(unsigned w=0;w<LEVEL_COUNT;w++){m=(Menu){.view=STORY,.week=w,.difficulty=1};render(&g,&m,display,NULL);}shot("story.ppm");- for(unsigned t=0;t<TRACK_COUNT;t++){assert(game_start(&g,tracks[t].first));m=(Menu){.view=PLAY};g.time=50000;g.beat=6.5f;g.combo=g.max_combo=9999;g.score_milli=999999000;render(&g,&m,display,NULL);char path[64];snprintf(path,sizeof(path),"stage-%u.ppm",tracks[t].stage);shot(path);}- assert(game_start(&g,0));m=(Menu){.view=FREEPLAY,.song=0,.difficulty=1};render(&g,&m,display,NULL);shot("freeplay.ppm");-}-int main(void){- game_init(&g);test_score();test_holds();test_save();unsigned peak=0,total=0;- FILE*f=fopen("autoplay-report.json","w");assert(f);fprintf(f,"{\"charts\":[");- for(unsigned i=0;i<CHART_COUNT;i++){unsigned p=perfect(i);if(p>peak)peak=p;total+=charts[i].count;fprintf(f,"%s{\"chart\":%u,\"peak_notes\":%u,\"sick\":%u,\"score\":%ld}",i?",":"",i,p,g.judged[SICK],(long)(g.score_milli/1000));}- fprintf(f,"],\"total_notes\":%u,\"peak_notes\":%u}\n",total,peak);fclose(f);assert(dense_fixture&&crowded_fixture);- for(unsigned i=0;i<CHART_COUNT;i++){assert(game_start(&g,i));game_advance(&g,charts[i].end+1,0);assert(g.lost&&!g.fault);assert(g.health==0);}- for(unsigned i=0;i<100;i++){assert(game_start(&g,i%CHART_COUNT));uint32_t seed=i+1;for(int32_t t=g.time;t<charts[g.chart].end&&!g.won&&!g.lost;t+=123){seed=seed*1664525u+1013904223u;game_advance(&g,t,(seed>>24)&15);assert(g.count<=NOTE_CAP&&g.health>=0&&g.health<=2);}}- test_render();f=fopen("host-report.json","w");assert(f);fprintf(f,"{\"charts\":%u,\"notes\":%u,\"peak_queue\":%u,\"game_size\":%u,\"progress_size\":%u,\"save_bytes\":%u,\"time\":%u,\"held\":%u,\"health\":%u,\"chart\":%u,\"won\":%u,\"lost\":%u,\"score\":%u,\"judged\":%u}\n",CHART_COUNT,total,peak,(unsigned)sizeof(Game),(unsigned)sizeof(Progress),SAVE_BYTES,(unsigned)offsetof(Game,time),(unsigned)offsetof(Game,held),(unsigned)offsetof(Game,health),(unsigned)offsetof(Game,chart),(unsigned)offsetof(Game,won),(unsigned)offsetof(Game,lost),(unsigned)offsetof(Game,score_milli),(unsigned)offsetof(Game,judged));fclose(f);- printf("All %u charts: perfect autoplay; %u notes, peak queue %u/%u. Save, random-input and render bounds passed.\n",CHART_COUNT,total,peak,NOTE_CAP);return 0;-}diff --git a/games/fnf/tests/test_arm.py b/games/fnf/tests/test_arm.pydeleted file mode 100644index 9a3db4ff..00000000--- a/games/fnf/tests/test_arm.py+++ /dev/null@@ -1,82 +0,0 @@-"""Execute the actual ARM app, including firmware memory and clean-exit checks."""-import argparse,io,json,os,re,shlex,struct,tempfile,types-from pathlib import Path-ROOT=Path(__file__).resolve().parents[1];REPO=ROOT.parents[1]-emu_path=REPO/'tools/emu.py';emu=types.ModuleType('fnf_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').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);at=0- for name,value in items:- r=name.encode()+b'\0'+value;n=2+len(r);struct.pack_into('<H',data,at,n);data[at+2:at+n]=r;at+=n- assert at+2<=len(data);path.write_bytes(data)-def records(data):- result={};at=0- while at+2<=len(data):- n=struct.unpack_from('<H',data,at)[0]- if not n:break- assert n>=3 and at+n<=len(data);name,value=data[at+2:at+n].split(b'\0',1);result[name.decode()]=value;at+=n- return result-def uint(c,name):return struct.unpack('<I',bytes(c.uc.mem_read(c.symbols[name],4)))[0]-def exited(c,upsilon=False):- assert c.exited,'App did not exit';assert not c.violations,sorted(set(c.violations));assert not c.firmware_ram_changes();assert c.app_ram_clean();assert c.locks==0 and c.max_locks==(0 if upsilon else 1)--def main():- ap=argparse.ArgumentParser();ap.add_argument('--nwlink',default='nwlink');ap.add_argument('--quick',action='store_true');ap.add_argument('--smoke',action='store_true',help='First 16 notes per profile instead of a full N0120 song');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)- out=ROOT/'output/arm';out.mkdir(parents=True,exist_ok=True);tempfile.tempdir=str(out);app=str(ROOT/'output/fnf-debug.nwa');report=[];sentinel=b'print(42)\n'- offsets=json.loads((ROOT/'output/host-report.json').read_text());schedules=json.loads((ROOT/'output/key-schedules.json').read_text());schedule=next(s for s in schedules if s['song']=='bopeebo')- def field(c,key,fmt):return struct.unpack(fmt,bytes(c.uc.mem_read(c.symbols['game']+offsets[key],struct.calcsize(fmt))))[0]- profiles=[('n0120','n0120','epsilon',153676),('n0110','n0110','epsilon',148928),('n0115','n0110','epsilon',133652),('upsilon','n0110','upsilon',107674)]- for profile,model,system,ram in profiles[:1]if a.quick else profiles:- emu.configure(model,system,ram);emu.CPU_HZ=216_000_000 if model=='n0120'else 86_400_000;st=out/(profile+'.bin');storage(st,[('keep.py',sentinel)])- c=emu.Calculator(app,storage_file=str(st),nwlink=nw);c.enable_checks()- # Title -> Freeplay -> Bopeebo (Normal), entirely through the keypad.- c.keys=presses((400,'down',65),(650,'ok',65),(950,'down',65),(1250,'ok',65));c.run(300);c.save_png(str(out/(profile+'-title.png')));c.run(1150);assert uint(c,'current_view')==2;c.save_png(str(out/(profile+'-freeplay.png')));c.run(1500);assert uint(c,'current_view')==5;assert field(c,'chart','<H')==schedule['chart']- origin=uint(c,'origin')/16;lane_keys=['left','down','up','right'] if profile in ['n0120','n0115']else ['7','8','lparen','rparen']- full_song=profile=='n0120'and not a.smoke- chosen=schedule['notes'] if full_song else schedule['notes'][:16]- # Keep exact original head and tail times; avoid release collisions with the next head.- for i,n in enumerate(chosen):- start=origin+n['time']/16;end=max(start+16,origin+n['end']/16+1)- for nxt in chosen[i+1:]:- if nxt['lane']==n['lane']:- end=min(end,origin+nxt['time']/16-14);break- c.keys.append((start,end,emu.KEYS[lane_keys[n['lane']]]))- stop=origin+schedule['end']/16+250 if full_song else origin+chosen[-1]['time']/16+40- # A held arrow plus its number alias is still exactly one input.- n=chosen[0];c.keys.append((origin+n['time']/16+3,origin+n['time']/16+10,emu.KEYS['7'if n['lane']==0 else '8'if n['lane']==1 else 'lparen'if n['lane']==2 else 'rparen']))- while c.now_ms<stop:- c.run(min(stop,c.now_ms+5000))- assert not field(c,'lost','<B'),(profile,'unexpected failure');assert field(c,'judged','<H')>=len(chosen)-1,(profile,field(c,'judged','<H'),len(chosen));c.save_png(str(out/(profile+'-play.png')))- sick=field(c,'judged','<H')- if full_song:assert field(c,'won','<B')and uint(c,'current_view')==7- else:- t=int(c.now_ms)+20;c.keys+=presses((t,'back',65));c.run(t+180);assert uint(c,'current_view')==6;frozen=field(c,'time','<i');c.run(t+680);assert field(c,'time','<i')==frozen- c.keys+=presses((t+750,'back',65));c.run(t+950);assert uint(c,'current_view')==5- c.keys+=presses((t+1000,'back',65),(t+1200,'down',65),(t+1400,'ok',65));c.run(t+1650);assert uint(c,'current_view')==5 and field(c,'time','<i')<0- r=dict(profile=profile,real_key_song_clear=full_song,keys=lane_keys,frames=uint(c,'perf_frames'),draw_max_ms=uint(c,'perf_max'),play_draw_max_ms=uint(c,'perf_play_draw_max'),input_sample_max_ms=uint(c,'perf_input_max'),play_input_max_ms=uint(c,'perf_play_input_max'),queue_peak=uint(c,'perf_queue_max'),stack_bytes=c.stack_used(),sick=sick)- t=int(c.now_ms)+40;c.keys+=presses((t,'home',150));c.run(t+900);exited(c,system=='upsilon');recs=records(st.read_bytes());assert recs['keep.py']==sentinel and len(recs['fnf.sav'])==offsets['save_bytes'] and b'FNF1:'in recs['fnf_save.py']- # Reinstallation can erase .sav; restore from the inert Python comment backup.- restored=out/(profile+'-backup.bin');storage(restored,[('keep.py',sentinel),('fnf_save.py',recs['fnf_save.py'])]);d=emu.Calculator(app,storage_file=str(restored),nwlink=nw);d.enable_checks();d.keys=presses((400,'onoff',100));d.run(1100);exited(d,system=='upsilon');assert records(restored.read_bytes())['fnf.sav']==recs['fnf.sav'];report.append(r);print(json.dumps(r),flush=True)- if not a.quick:- # Explicit host-engine fixtures exercise the largest on-screen cast and- # densest working queue. These are rendering/performance tests, not clears.- for profile,model,ram in [('n0120','n0120',153676),('n0110','n0110',148928)]:- emu.configure(model,'epsilon',ram);emu.CPU_HZ=216_000_000 if model=='n0120'else 86_400_000- for name in ['dense-chart','crowded-scene']:- c=emu.Calculator(app,nwlink=nw);c.enable_checks();c.keys=presses((300,'down',65),(550,'ok',65),(850,'down',65),(1150,'ok',65));c.run(1450);assert uint(c,'current_view')==5- raw=(ROOT/'output'/(name+'.game')).read_bytes();assert len(raw)==offsets['game_size'];c.uc.mem_write(c.symbols['game'],raw);clock=field(c,'time','<i');c.uc.mem_write(c.symbols['origin'],struct.pack('<I',(int(c.now_ms)*16-clock)&0xffffffff))- for metric in ['perf_play_draw_max','perf_play_input_max']:c.uc.mem_write(c.symbols[metric],bytes(4))- c.run(c.now_ms+140);assert uint(c,'current_view')==5;c.save_png(str(out/(profile+'-'+name+'.png')))- report.append(dict(profile=profile,fixture=name,play_draw_max_ms=uint(c,'perf_play_draw_max'),play_input_max_ms=uint(c,'perf_play_input_max'),stack_bytes=c.stack_used()));t=int(c.now_ms)+20;c.keys+=presses((t,'home',120));c.run(t+800);exited(c)- emu.configure();st=out/'full.bin';filler=b'x'*(emu.STORAGE_SIZE-24);storage(st,[('full.py',filler)]);c=emu.Calculator(app,storage_file=str(st),nwlink=nw);c.enable_checks();c.keys=presses((400,'home',65),(800,'ok',65),(1200,'1',65),(1600,'home',65),(2000,'back',65));c.run(700);assert uint(c,'current_view')==9;c.run(1000);assert uint(c,'current_view')==9;c.run(1400);assert uint(c,'current_view')==0;c.run(2600);exited(c);assert records(st.read_bytes())['full.py']==filler- c=emu.Calculator(app,nwlink=nw);c.enable_checks();c.keys=presses((0,'ok',900),(1300,'home',120));c.run(500);assert uint(c,'current_view')==0;c.run(2000);exited(c)- report.append(dict(full_storage_retry_menu_unsaved_exit='pass',launch_held_key='pass'))- (out/('smoke-report.json'if a.smoke else'report.json')).write_text(json.dumps(report,indent=2)+'\n');print('ARM tests passed',flush=True)-if __name__=='__main__':main()diff --git a/games/fnf/tests/test_assets.py b/games/fnf/tests/test_assets.pydeleted file mode 100644index 66b96af5..00000000--- a/games/fnf/tests/test_assets.py+++ /dev/null@@ -1,53 +0,0 @@-"""Verify all imported chart data, lossless note streams and bounded artwork."""-from pathlib import Path-import json,zlib,re,hashlib,collections-ROOT=Path(__file__).resolve().parents[1]-def main():- model=json.loads(zlib.decompress((ROOT/'assets/model.json.zlib').read_bytes()));art=json.loads((ROOT/'assets/art.json').read_text());manifest=json.loads((ROOT/'assets/chart-manifest.json').read_text());c=(ROOT/'src/data.c').read_text()- data=bytes(map(int,re.search(r'const uint8_t note_bytes\[\d+\]=\{(.*?)\};',c,re.S)[1].replace('\n','').split(',')))- rows=re.search(r'const Chart charts\[\d+\]=\{(.*?)\n\};',c,re.S)[1].strip().splitlines();rows=[r.strip('{},').split(',')for r in rows]- def var(at,end):- v=0;shift=0- while True:- assert at<end and shift<28;b=data[at];at+=1;v|=(b&127)<<shift;shift+=7- if not b&128:return v,at- total=0;maxerror=0;peak=0;key_schedules=[]- for entry,row in zip(manifest['charts'],rows,strict=True):- track=next(t for t in model['tracks'] if t['id']==entry['song']and t['variation']==entry['variation']);original=sorted(track['chart']['notes'][entry['difficulty']],key=lambda n:n['t'])- at=int(row[0]);end=at+int(row[1]);assert hashlib.sha256(data[at:end]).hexdigest()==entry['sha256'];time=0;intervals=[]- schedule=[]- for n in original:- dt,at=var(at,end);info,at=var(at,end);length=0- if info&1:length,at=var(at,end)- time+=dt;assert time==round(n['t']*16);assert length==round(n.get('l',0)*16);assert(info>>1)&7==n['d'];assert model['kinds'][info>>4]==n.get('k','');maxerror=max(maxerror,abs(time/16-n['t']),abs(length/16-n.get('l',0)))- intervals.extend([(time-40000,1),(time+length+2561,-1)])- if n['d']<4:schedule.append(dict(time=time,end=time+length,lane=n['d']))- assert at==end and len(original)==entry['notes'];total+=len(original)- # Even retaining every missed hold until its end must fit, without a life-bar cutoff.- concurrent=0- for _,change in sorted(intervals):concurrent+=change;peak=max(peak,concurrent+1)- if entry['variation']=='default'and entry['difficulty']=='normal'and entry['song']in ['tutorial','bopeebo']:key_schedules.append(dict(chart=entry['chart'],song=entry['song'],end=int(row[2]),notes=schedule))- capacity=int(re.search(r'#define NOTE_CAP (\d+)',(ROOT/'src/game.h').read_text())[1])- assert len(rows)==len(manifest['charts'])==166 and total==90437 and peak<capacity and maxerror<=.03125001- blob=(ROOT/'assets/art.bin').read_bytes()- for sprite in art['sprites']:- off=sprite['offset'];w=sprite['w'];h=sprite['h'];assert sprite['palette']<len(art['palettes'])- if sprite['compressed']:- assert(w,h)==(160,120);raw=zlib.decompress(blob[off:off+sprite['packed_size']],-15);assert len(raw)==9600- else:- start=off+h*2;end=start+sprite['packed_size'];assert end<=len(blob)- for y in range(h):- at=start+int.from_bytes(blob[off+y*2:off+y*2+2],'little');x=0- while x<w:- assert at<end;token=blob[at];at+=1;length=token>>1;assert length and x+length<=w- if token&1:at+=(length+1)//2- x+=length- assert at<=end- ids=range(len(art['sprites']))- for ch in model['characters']:- for frames in ch['anims'].values():assert 1<=len(frames)<=4 and all(i in ids for i in frames)- for stage in model['stages']:assert not stage['missing'] and stage['sprite']in ids- out=ROOT/'output';out.mkdir(exist_ok=True);(out/'key-schedules.json').write_text(json.dumps(key_schedules)+'\n')- inputs=['model.json.zlib','art.json','art.bin'];report=dict(charts=166,songs=27,notes=total,max_time_quantization_ms=maxerror,worst_case_queue_bound=peak,sprites=len(art['sprites']),input_sha256={p:hashlib.sha256((ROOT/'assets'/p).read_bytes()).hexdigest()for p in inputs})- (out/'asset-report.json').write_text(json.dumps(report,indent=2)+'\n');print(json.dumps(report,indent=2))-if __name__=='__main__':main()diff --git a/games/fnf/tools/assets.py b/games/fnf/tools/assets.pydeleted file mode 100644index a1f39733..00000000--- a/games/fnf/tools/assets.py+++ /dev/null@@ -1,110 +0,0 @@-"""Pack all pinned charts and converted artwork into immutable native ROM tables."""-from pathlib import Path-import json,zlib,struct,math,hashlib,re-ROOT=Path(__file__).resolve().parents[1]-def ident(s): return re.sub('[^A-Z0-9]+','_',s.upper()).strip('_')-def q(t):return round(float(t)*16)-def leb(v):- assert v>=0- b=bytearray()- while v>=128:b.append((v&127)|128);v>>=7- b.append(v);return b-def f(x):- x=float(x)- assert math.isfinite(x)- return f'{x:.8f}f'-def arr(x):return '{'+','.join(arr(y) if isinstance(y,(list,tuple)) else str(y) for y in x)+'}'-def main():- model=json.loads(zlib.decompress((ROOT/'assets/model.json.zlib').read_bytes()));art=json.loads((ROOT/'assets/art.json').read_text());src=ROOT/'src';src.mkdir(exist_ok=True)- kinds=model['kinds']; chars=model['characters']; charmap={c['id']:i for i,c in enumerate(chars)}; stage={s['id']:i for i,s in enumerate(model['stages'])}- order=[s for l in model['levels'] for s in l['songs']]; diffs=['easy','normal','hard','erect','nightmare']; variants=['default','erect','pico','bf']- tt=sorted(model['tracks'],key=lambda t:(order.index(t['id']),variants.index(t['variation'])))- animnames=sorted({a for c in chars for a in c['anims']}); anims=[]; charrows=[]; kindrows=[]; allmaps=[]- for c in chars:- first=len(anims);am={}- for name,frames in c['anims'].items():- am[name]=len(anims);anims.append([frames+[frames[-1]]*(4-len(frames)),animnames.index(name),len(frames)])- allmaps.append(am);idle=am.get('idle',am.get('danceLeft',first));dance=am.get('danceRight',idle)- sing=[am.get('sing'+d,idle) for d in ['LEFT','DOWN','UP','RIGHT']];miss=[am.get('sing'+d+'miss',sing[i]) for i,d in enumerate(['LEFT','DOWN','UP','RIGHT'])]- icons=model['icons'].get(c['icon'],model['icons']['face']);charrows.append([json.dumps(c['id']),first,len(am),idle,dance,sing,miss,[icons[0],icons[min(1,len(icons)-1)]],int(c['singTime'])])- km=[]- weekend={'blockhigh':'block','blocklow':'block','blockspin':'block','cockgun':'cock','dodgehigh':'dodge','dodgelow':'duck','fakeout':'fakeout','firegun':'shoot','hithigh':'hitHigh','hitlow':'hitLow','idle':'idle','kickcan':'kickCan','kneecan':'kneeCan','lightcan':'lightCan','picouppercut':'uppercut','picouppercutprep':'uppercutPrep','darnelluppercut':'uppercut','darnelluppercutprep':'uppercutPrep','punchhigh':'punchHigh1','punchhighblocked':'punchHigh2','punchhighspin':'punchHigh2','punchlow':'punchLow1','punchlowblocked':'punchLow2','punchlowdodged':'punchLow2','punchlowspin':'punchLow2','taunt':'taunt'}- for k in kinds:- row=[]- for di,d in enumerate(['LEFT','DOWN','UP','RIGHT']):- name='sing'+d- if k=='mom':name+='-alt'- elif k.startswith('sakura-'):name+='-'+k[7:]- elif k=='censor':name+='-censor'- elif k in ['ugh','hehPrettyGood']:name=k- elif k.startswith('weekend-1-'):name=weekend.get(k[10:],name)- row.append(65535 if k=='noanim' else am.get(name,sing[di]))- km.append(row)- kindrows.append(km)- beautiful=[]- for c,am in zip(chars,allmaps):- for name in c['anims']:beautiful.append(am.get(name+'-beautiful',am[name]))- eventnames=sorted({e['e'] for t in tt for e in t['chart'].get('events',[])})- ev=[];tempos=[];trackrows=[];chartrows=[];songrows=[];notes=bytearray();streams={};manifest=[];aux=0- for si,song in enumerate(order):- firsttrack=len(trackrows);songtracks=[t for t in tt if t['id']==song]- for t in songtracks:- ti=len(trackrows);meta=t['metadata'];pd=meta['playData'];ch=t['chart'];tc=meta['timeChanges'];tf=len(tempos);beat=0;last=0;lastbpm=float(tc[0]['bpm'])- for change in tc:- time=float(change['t']);beat=float(change.get('b',beat+(time-last)*lastbpm/60000));last=time;lastbpm=float(change['bpm']);tempos.append([q(time),f(lastbpm),f(beat)])- ef=len(ev)- for e in sorted(ch.get('events',[]),key=lambda e:e['t']):- v=e.get('v');kind=e['e'];v=v if isinstance(v,dict)else {'char':v or 0};a=b=c=0;value=0;duration=float(v.get('duration',0));- if kind=='FocusCamera':a=int(v.get('char',0));b=round(float(v.get('x',0))/8);c=round(float(v.get('y',0))/8)- elif kind=='ZoomCamera':value=float(v.get('zoom',1))- elif kind=='SetCameraBop':value=float(v.get('intensity',1));a=int(v.get('rate',4))- elif kind=='ScrollSpeed':value=float(v.get('scroll',1));a=int(v.get('absolute',False))- elif kind=='PlayAnimation':a=animnames.index(v['anim']) if v.get('anim')in animnames else 65535;b={'boyfriend':0,'bf':0,'dad':1,'opponent':1,'girlfriend':2,'gf':2}.get(v.get('target'),0)- elif kind=='SetHealthIcon':a=int(v.get('char',0));ic=model['icons'].get(v.get('id'),model['icons']['face']);b=ic[0];c=ic[min(1,len(ic)-1)]- elif kind in ['sserafimSing','sserafimShow']:a=sum(1<<i for i,x in enumerate(v.get('singing',v.get('visible',[]))) if x)- elif kind in ['sserafimDark','sserafimLights']:value=float(v.get('amount',0))- elif kind=='sserafimBeautiful':a=int(v.get('beautiful',False))- elif kind=='sserafimCover':a=int(v.get('visible',False))- elif kind=='sserafimKick':a=int(v.get('final',False))- elif kind=='sserafimPulseLights':a=int(v.get('enabled',False))- ev.append([q(e['t']),f(value),f(duration),a,b,c,eventnames.index(kind)])- cf=len(chartrows)- for diff in pd['difficulties']:- ns=ch['notes'].get(diff,[])- if diff not in diffs or not ns:continue- data=bytearray();prev=0;players=0- for n in sorted(ns,key=lambda n:n['t']):- time=q(n['t']);length=q(n.get('l',0));kind=kinds.index(n.get('k',''));data+=leb(time-prev)+leb((kind<<4)|(int(n['d'])<<1)|bool(length));prev=time- if length:data+=leb(length)- if n['d']<4 and n.get('k','')!='non_scoreable':players+=1- key=bytes(data)- if key not in streams:streams[key]=len(notes);notes+=data- off=streams[key];end=max([n['t']+n.get('l',0) for n in ns]+[e['t'] for e in ch.get('events',[])])+1200- speed=ch.get('scrollSpeed',{}).get(diff,ch.get('scrollSpeed',{}).get('default',1))- chartrows.append([off,len(data),q(end),len(ns),players,ti,diffs.index(diff),f(speed)])- manifest.append(dict(chart=len(chartrows)-1,song=song,variation=t['variation'],difficulty=diff,notes=len(ns),player_notes=players,sha256=hashlib.sha256(data).hexdigest()))- aux+=sum(len(ns) for d,ns in ch['notes'].items() if d=='picospeaker')- ids=pd['characters'];actors=[charmap.get(ids.get(k,''),65535) for k in ['player','opponent','girlfriend']]- actors += [charmap.get('sserafim-yunjin',65535),charmap.get('sserafim-chaewon',65535),charmap.get('sserafim-eunchae',65535)] if song=='spaghetti' else [65535]*3- trackrows.append([si,cf,len(chartrows)-cf,stage[pd['stage']],actors,tf,len(tc),ef,len(ev)-ef,variants.index(t['variation'])])- name=songtracks[0]['metadata']['songName'];name='SPAGHETTI' if song=='spaghetti' else name- songrows.append([json.dumps(name),firsttrack,len(songtracks)])- levelrows=[[json.dumps(l['name']),[order.index(s) for s in l['songs']]+[65535]*(4-len(l['songs'])),len(l['songs'])] for l in model['levels']]- counts=dict(SPRITE_COUNT=len(art['sprites']),PALETTE_COUNT=len(art['palettes']),ART_BYTES=(ROOT/'assets/art.bin').stat().st_size,NOTE_BYTES=len(notes),ANIMATION_COUNT=len(anims),CHARACTER_COUNT=len(chars),KIND_COUNT=len(kinds),TEMPO_COUNT=len(tempos),EVENT_COUNT=len(ev),CHART_COUNT=len(chartrows),TRACK_COUNT=len(trackrows),SONG_COUNT=len(songrows),LEVEL_COUNT=len(levelrows),STAGE_COUNT=len(stage),UI_LOGO=model['ui']['logo'],UI_MENU=model['ui']['menu'])- h=['/* Generated by tools/assets.py. */','#ifndef FNF_IDS_H','#define FNF_IDS_H']+[f'#define {k} {v}' for k,v in counts.items()]- h += [f'#define KIND_{ident(k or "NORMAL")} {i}' for i,k in enumerate(kinds)] + [f'#define EVENT_{ident(k)} {i}' for i,k in enumerate(eventnames)]- h += [f'#define CHAR_{ident(c["id"])} {i}' for i,c in enumerate(chars)]+['#endif','']- (src/'ids.h').write_text('\n'.join(h),newline='\n')- lines=['/* Generated from the pinned official assets; see ASSETS.md. */','#include "data.h"']- def table(typ,name,rows,suffix=''):- lines.append(f'const {typ} {name}[{len(rows)}]{suffix}={{\n'+',\n'.join(arr(r) if isinstance(r,(list,tuple))else str(r) for r in rows)+'\n};')- table('Sprite','sprites',[[s['offset'],s['packed_size'],s['w'],s['h'],s['palette'],s['ox'],s['oy'],int(s['compressed'])]for s in art['sprites']])- table('uint16_t','palettes',art['palettes'],'[16]');table('uint16_t','stage_sprites',[s['sprite']for s in model['stages']]);table('uint16_t','ui_notes',[[model['ui'][s+str(i)]for i in range(4)] for s in ['note','static','press','confirm']],'[4]')- table('Animation','animations',anims);table('uint16_t','beautiful_animation',beautiful);table('Character','characters',charrows);table('uint16_t','kind_anim',kindrows,f'[{len(kinds)}][4]');table('Tempo','tempos',tempos);table('Event','events',ev);table('Chart','charts',chartrows);table('Track','tracks',trackrows);table('Song','songs',songrows);table('Level','levels',levelrows)- lines.append('const char *const difficulties[5]={"EASY","NORMAL","HARD","ERECT","NIGHTMARE"};\nconst char *const variants[4]={"ORIGINAL","ERECT","PICO","BOYFRIEND"};')- for name,data in [('art_pixels',(ROOT/'assets/art.bin').read_bytes()),('note_bytes',notes)]:- lines.append(f'const uint8_t {name}[{len(data)}]={{\n'+',\n'.join(','.join(str(x)for x in data[i:i+32])for i in range(0,len(data),32))+'\n};')- (src/'data.c').write_text('\n'.join(lines)+'\n',newline='\n')- report=dict(counts,auxiliary_npc_notes=aux,charts=manifest,refs=model['refs']);(ROOT/'assets/chart-manifest.json').write_text(json.dumps(report,indent=2)+'\n',newline='\n')- print(json.dumps({k:v for k,v in report.items()if k not in ['charts','refs']},indent=2))-if __name__=='__main__':main()diff --git a/games/fnf/tools/atlas.py b/games/fnf/tools/atlas.pynew file mode 100644index 00000000..e7ba8baf--- /dev/null+++ b/games/fnf/tools/atlas.py@@ -0,0 +1,261 @@+"""The game's pictures, read from its own files (Friday Night Funkin' keeps them in three formats): Sparrow sheets+(a PNG and an XML of named frames), packer sheets (a PNG and a text list) and Adobe Animate texture atlases+(Animation.json, spritemap*.json and their PNGs: symbols made of placed pieces). A frame comes back as a list of+leaves, (piece, 2x3 matrix, alpha), that flatten() draws into one image. Nothing in the reference is run.++After Bobydeluxe's reader for the first port. Used by tools/data.py."""+import json+import math+import re+from pathlib import Path++from PIL import Image, ImageChops++IDENTITY = (1, 0, 0, 1, 0, 0)+opened = set() # every file read, for tools/ref.txt+++def read_json(path):+ opened.add(Path(path))+ return json.loads(Path(path).read_text(encoding="utf-8-sig"))+++def open_image(path):+ opened.add(Path(path))+ return Image.open(path).convert("RGBA")+++def matrix(d):+ if "MX" in d:+ return tuple(d["MX"])+ if "M3D" in d:+ a = d["M3D"]+ return (a[0], a[1], a[4], a[5], a[12], a[13])+ return IDENTITY+++def multiply(a, b):+ return (a[0] * b[0] + a[2] * b[1], a[1] * b[0] + a[3] * b[1], a[0] * b[2] + a[2] * b[3], a[1] * b[2] + a[3] * b[3],+ a[0] * b[4] + a[2] * b[5] + a[4], a[1] * b[4] + a[3] * b[5] + a[5])+++def point(m, x, y):+ return (m[0] * x + m[2] * y + m[4], m[1] * x + m[3] * y + m[5])+++def bounds(leaves):+ """The box round the visible pixels of a frame, in its own units."""+ pts = []+ for im, m, a in leaves:+ b = im.getbbox()+ if b and a > 0:+ pts.extend(point(m, x, y) for x, y in ((b[0], b[1]), (b[2], b[1]), (b[2], b[3]), (b[0], b[3])))+ if not pts:+ return (0, 0, 1, 1)+ return (min(p[0] for p in pts), min(p[1] for p in pts), max(p[0] for p in pts), max(p[1] for p in pts))+++def flatten(leaves, scale=1.0, box=None, resample=Image.Resampling.BICUBIC):+ """Draws the leaves scaled into one RGBA image; returns it and where its top left falls (in scaled units)."""+ box = box or bounds(leaves)+ x0, y0 = math.floor(box[0] * scale), math.floor(box[1] * scale)+ x1, y1 = math.ceil(box[2] * scale), math.ceil(box[3] * scale)+ out = Image.new("RGBA", (max(1, x1 - x0), max(1, y1 - y0)))+ for im, m, alpha in leaves:+ a, b, c, d, tx, ty = m+ a, b, c, d = a * scale, b * scale, c * scale, d * scale+ tx, ty = tx * scale - x0, ty * scale - y0+ det = a * d - b * c+ if abs(det) < 1e-8:+ continue+ inv = (d / det, -c / det, (c * ty - d * tx) / det, -b / det, a / det, (b * tx - a * ty) / det)+ src = im+ # shrinking a lot: shrink the piece first, so that the affine sampling doesn't alias+ shrink = min(math.hypot(a, b), math.hypot(c, d))+ if shrink < 0.5 and resample != Image.Resampling.NEAREST:+ f = max(1, int(1 / shrink / 2))+ if f > 1 and im.width >= 2 * f and im.height >= 2 * f:+ src = im.resize((max(1, im.width // f), max(1, im.height // f)), Image.Resampling.BOX)+ sx, sy = im.width / src.width, im.height / src.height+ inv = (inv[0] / sx, inv[1] / sx, inv[2] / sx, inv[3] / sy, inv[4] / sy, inv[5] / sy)+ layer = src.transform(out.size, Image.Transform.AFFINE, inv, resample)+ if alpha < 0.999:+ layer.putalpha(layer.getchannel("A").point(lambda v: round(v * alpha)))+ out.alpha_composite(layer)+ return out, x0, y0+++class Atlas:+ """An Adobe Animate texture atlas (a folder with Animation.json)."""++ def __init__(self, path):+ self.path = Path(path)+ self.d = read_json(self.path / "Animation.json")+ self.symbols = {x["SN"]: x["TL"] for x in self.d.get("SD", {}).get("S", [])}+ self.textures, self.labels = {}, {}+ for p in sorted(self.path.glob("spritemap*.json")):+ im = open_image(p.with_suffix(".png"))+ for item in read_json(p)["ATLAS"]["SPRITES"]:+ s = item["SPRITE"]+ piece = im.crop((s["x"], s["y"], s["x"] + s["w"], s["y"] + s["h"]))+ if s.get("rotated"):+ piece = piece.transpose(Image.Transpose.ROTATE_90)+ self.textures[str(s["name"])] = piece+ for layer in self.d["AN"]["TL"]["L"]:+ for f in layer["FR"]:+ if f.get("N"):+ self.labels[f["N"]] = (f["I"], f["DU"])++ @staticmethod+ def duration(tl):+ return max((f["I"] + f["DU"] for l in tl["L"] for f in l["FR"]), default=1)++ def sequence(self, prefix, symbol=False):+ """(timeline, first frame, frame count) of an animation, by frame label or by symbol name."""+ def match(keys):+ exact = next((k for k in keys if k.lower() == prefix.lower()), None)+ return exact or next((k for k in keys if k.lower().startswith(prefix.lower())), None)+ if symbol:+ k = match(self.symbols)+ if k:+ return self.symbols[k], 0, self.duration(self.symbols[k])+ if self.d["AN"].get("SN", "").lower().startswith(prefix.lower()):+ return self.d["AN"]["TL"], 0, self.duration(self.d["AN"]["TL"])+ k = match(self.labels)+ if k:+ return (self.d["AN"]["TL"], *self.labels[k])+ k = match(self.symbols)+ if k:+ return self.symbols[k], 0, self.duration(self.symbols[k])+ raise KeyError((self.path.name, prefix))++ def walk(self, tl, frame, transform=IDENTITY, alpha=1.0, depth=0):+ if depth > 40:+ raise ValueError("cyclic symbols")+ result = []+ for l in reversed(tl["L"]):+ if l.get("LT") == "Clp":+ continue+ f = next((f for f in l["FR"] if f["I"] <= frame < f["I"] + f["DU"]), None)+ if not f:+ continue+ leaves = []+ for e in f.get("E", []):+ if "ASI" in e:+ d = e["ASI"]+ im = self.textures.get(str(d["N"]))+ if im is not None:+ leaves.append((im, multiply(transform, matrix(d)), alpha))+ elif "SI" in e:+ d = e["SI"]+ child = self.symbols.get(d["SN"])+ if child is None:+ continue+ t, loop = d.get("FF", 0), d.get("LP", "LP")+ if loop != "SF":+ t += frame - f["I"]+ length = self.duration(child)+ t = t % length if loop == "LP" else min(t, length - 1)+ a = alpha * d.get("C", {}).get("AM", 1)+ leaves.extend(self.walk(child, t, multiply(transform, matrix(d)), a, depth + 1))+ if l.get("Clpb") and leaves: # a clipping mask over this layer+ mask = next((x for x in tl["L"] if x.get("LN") == l["Clpb"]), None)+ if mask:+ masks = self.walk({"L": [{"LN": mask["LN"], "FR": mask["FR"]}]}, frame, transform, alpha, depth + 1)+ box = bounds(leaves)+ im, x, y = flatten(leaves, box=box)+ matte, _, _ = flatten(masks, box=box)+ im.putalpha(ImageChops.multiply(im.getchannel("A"), matte.getchannel("A")))+ b = im.getbbox()+ leaves = [(im.crop(b), (1, 0, 0, 1, x + b[0], y + b[1]), 1)] if b else []+ result.extend(leaves)+ return result++ def frames(self, animation, picks):+ """The frames at the given indices of an animation (indices into its frameIndices, if it has any)."""+ tl, start, duration = self.sequence(animation["prefix"], animation.get("animType") == "symbol")+ ids = animation.get("frameIndices") or list(range(duration))+ return [self.walk(tl, start + ids[min(i, len(ids) - 1)]) for i in picks], len(ids)+++class Reference:+ """The game's assets folder (funkin.assets)."""++ def __init__(self, root):+ self.root = Path(root)+ self.atlases, self.sparrows = {}, {}+ self.boxes = [] # the untrimmed boxes of the Sparrow frames frames() returned last++ def json(self, rel):+ return read_json(self.root / rel)++ def path(self, name, library="shared"):+ if ":" in name:+ library, name = name.split(":", 1)+ choices = [self.root / lib / "images" / name for lib in dict.fromkeys([library, "shared", "preload"])]+ return next((p for p in choices if p.is_dir() or p.with_suffix(".png").exists()), choices[0])++ def atlas(self, path):+ path = Path(path)+ if path not in self.atlases:+ self.atlases[path] = Atlas(path)+ return self.atlases[path]++ def sparrow(self, path):+ path = Path(path)+ if path not in self.sparrows:+ opened.add(path.with_suffix(".xml"))+ text = path.with_suffix(".xml").read_text(encoding="utf-8-sig")+ im = open_image(path.with_suffix(".png"))+ frames = []+ # (read with a pattern, not an XML parser: some names have a bare < or & in them)+ for tag in re.findall(r"<SubTexture\s(.*?)/>", text, re.S):+ d = dict(re.findall(r'(\w+)="(.*?)"', tag))+ x, y, w, h = (int(d[k]) for k in ("x", "y", "width", "height"))+ piece = im.crop((x, y, x + w, y + h))+ if d.get("rotated") == "true":+ piece = piece.transpose(Image.Transpose.ROTATE_90)+ fw, fh = int(d.get("frameWidth", w)), int(d.get("frameHeight", h))+ name = d["name"].replace("&", "&").replace("<", "<").replace(">", ">").replace(""", '"')+ frames.append((name, piece, (1, 0, 0, 1, -int(d.get("frameX", 0)), -int(d.get("frameY", 0))), fw, fh))+ self.sparrows[path] = frames+ return self.sparrows[path]++ def frames(self, path, animation, picks=(0,)):+ """The frames at indices `picks` of an animation (a dict with prefix, and maybe frameIndices, animType), as+ leaves; and the animation's length in frames. (Its offsets are the caller's.)"""+ path = Path(path)+ if path.with_suffix(".xml").exists():+ frames = [f for f in self.sparrow(path) if f[0].startswith(animation.get("prefix", ""))]+ if not frames:+ raise KeyError((str(path), animation.get("prefix")))+ ids = animation.get("frameIndices") or list(range(len(frames)))+ out, self.boxes = [], []+ for i in picks:+ _, im, m, fw, fh = frames[ids[min(i, len(ids) - 1)] % len(frames)]+ out.append([(im, m, 1)])+ self.boxes.append((0, 0, fw, fh))+ return out, len(ids)+ if path.with_suffix(".txt").exists():+ opened.add(path.with_suffix(".txt"))+ im = open_image(path.with_suffix(".png"))+ items = []+ for line in path.with_suffix(".txt").read_text().splitlines():+ m = re.match(r"(.+?)\s*=\s*(\d+)\s+(\d+)\s+(\d+)\s+(\d+)", line)+ if m and m[1].startswith(animation.get("prefix", "")):+ x, y, w, h = map(int, m.groups()[1:])+ items.append((m[1], im.crop((x, y, x + w, y + h))))+ if not items:+ raise KeyError((str(path), animation.get("prefix")))+ items.sort(key=lambda it: it[0])+ ids = animation.get("frameIndices") or list(range(len(items)))+ return [[(items[ids[min(i, len(ids) - 1)] % len(items)][1], IDENTITY, 1)] for i in picks], len(ids)+ if path.is_dir():+ for p in sorted(path.rglob("Animation.json")):+ try:+ return self.atlas(p.parent).frames(animation, picks)+ except KeyError:+ pass+ raise KeyError((str(path), animation.get("prefix")))+ im = open_image(path.with_suffix(".png"))+ return [[(im, IDENTITY, 1)] for _ in picks], 1diff --git a/games/fnf/tools/compact_nwa.py b/games/fnf/tools/compact_nwa.pydeleted file mode 100644index f320bb54..00000000--- a/games/fnf/tools/compact_nwa.py+++ /dev/null@@ -1,228 +0,0 @@-#!/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/fnf/tools/data.py b/games/fnf/tools/data.pynew file mode 100644index 00000000..6b50d9e7--- /dev/null+++ b/games/fnf/tools/data.py@@ -0,0 +1,1020 @@+#!/usr/bin/env python3+"""Friday Night Funkin' for the calculator, from the game's own files: its charts, characters, stages, notes and+menus, packed into C tables (data.c and ids.h in OUT). The pictures and charts are the Funkin' Crew's and are not+in this repository: tools/fetch.py brings the files this reads (tools/ref.txt) from their funkin.assets repository.++ python3 -I tools/data.py REF OUT REF: funkin.assets at the pinned commit (tools/fetch.py)+ [--list FILE] also write the files read, with their git blob hashes (tools/ref.txt)++Pictures are drawn at the calculator's scale, 16 colours each (one palette per character), 4 bits a pixel, and+each is DEFLATE-packed (zopfli when it's installed). The charts keep every note: times in microseconds, deltas in+LEB128, each chart DEFLATE-packed. Nothing in REF is run. Needs Python 3 and Pillow."""+import argparse+import hashlib+import json+import math+import os+import re+import struct+import sys+import zlib+from pathlib import Path++sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))+import atlas # noqa: E402+from atlas import Reference, bounds, flatten, multiply # noqa: E402++import numpy as np # noqa: E402+from PIL import Image # noqa: E402++try:+ import zopfli.zlib as _zopfli+except ImportError:+ _zopfli = None++# ------------------------------------------------------------------------------------------------- what's played+LEVELS = ["tutorial", "week1", "week2", "week3", "week4", "week5", "week6", "week7", "weekend1", "sserafim"]+VARIATIONS = ["default", "erect", "pico", "bf"]+DIFFICULTIES = ["easy", "normal", "hard", "erect", "nightmare"]+# the instrumental's length (ms), measured from the game's own audio files (songs/<song>/Inst[-variation].ogg):+# the song ends with it, after its last note+INST_MS = {+ "2hot": 120000, "blammed": 106970, "blammed-erect": 107294, "blammed-pico": 106909, "blazin": 122667,+ "bopeebo": 81600, "bopeebo-erect": 113659, "bopeebo-pico": 84000, "cocoa": 112800, "cocoa-erect": 115862,+ "cocoa-pico": 122688, "dadbattle": 89361, "dadbattle-erect": 133263, "dadbattle-pico": 89361,+ "darnell": 126968, "darnell-bf": 126968, "darnell-erect": 149635, "eggnog": 95200, "eggnog-erect": 130282,+ "eggnog-pico": 96031, "fresh": 84000, "fresh-erect": 78720, "fresh-pico": 84099, "guns": 140473,+ "guns-pico": 140432, "high": 105665, "high-erect": 105600, "lit-up": 114546, "lit-up-bf": 135000,+ "milf": 124736, "monster": 177679, "philly-nice": 98058, "philly-nice-erect": 115200,+ "philly-nice-pico": 102857, "pico": 84871, "pico-erect": 109630, "pico-pico": 86400, "roses": 92000,+ "roses-erect": 99375, "roses-pico": 96005, "satin-panties": 96080, "satin-panties-erect": 113778,+ "senpai": 98292, "senpai-erect": 116952, "senpai-pico": 102869, "south": 88792, "south-erect": 118644,+ "south-pico": 90182, "spaghetti": 173587, "spookeez": 99180, "spookeez-erect": 141687, "spookeez-pico": 97600,+ "stress": 124009, "stress-pico": 124045, "thorns": 103579, "thorns-erect": 113684, "tutorial": 67200,+ "ugh": 86617, "ugh-erect": 83294, "ugh-pico": 85875, "winter-horrorland": 132830,+}+EVENTS = ["SetCameraBop", "PlayAnimation", "ScrollSpeed", "SetHealthIcon", "sserafimSing", "sserafimShow",+ "sserafimDark"]+EASES = ["linear", "INSTANT", "quad", "cube", "quart", "quint", "sine", "expo", "circ", "back", "elastic", "bounce",+ "smoothStep", "smootherStep"]+EASE_DIRS = ["In", "Out", "InOut"]++# ------------------------------------------------------------------------------------------------- the screen+SCREEN_W, SCREEN_H = 320, 240+HUD = 0.25 # 1280x720 -> 320 wide+CHAR_SCALE = 0.17 # characters: world units -> pixels+# the frames kept of each animation (sampled over it, each shown when the original shows it)+DANCE_FRAMES, SING_FRAMES, MISS_FRAMES, OTHER_FRAMES = 4, 2, 2, 2+ALPHA_CUT = 110 # below: transparent+++def die(msg):+ sys.exit(f"data.py: {msg}")+++# ------------------------------------------------------------------------------------------------- packing+def deflate(raw):+ if _zopfli:+ z = _zopfli.compress(raw, numiterations=15)+ return z[2:-4] # (raw DEFLATE: no zlib header or checksum)+ return zlib.compress(raw, 9, wbits=-15)+++class Blob:+ def __init__(self):+ self.data = bytearray()+ self.seen = {}++ def add(self, b):+ b = bytes(b)+ if b in self.seen:+ return self.seen[b]+ at = len(self.data)+ self.data += b+ self.seen[b] = at+ return at+++def rgb565(r, g, b):+ return (r >> 3) << 11 | (g >> 2) << 5 | b >> 3+++class Pictures:+ """Every picture: 4-bit pixels (0 transparent), a palette of 15 colours, DEFLATE-packed."""++ def __init__(self, blob):+ self.blob = blob+ self.palettes = []+ self.sprites = [] # (w, h, x, y, palette, at, size)+ self.bytes = {}++ def palette(self, colors, opaque=False):+ """A palette: 15 colours after the transparent 0, or (opaque) 16 colours."""+ p = ([] if opaque else [0]) + [rgb565(*c) for c in colors][:16 if opaque else 15]+ p += [0] * (16 - len(p))+ if p not in self.palettes:+ self.palettes.append(p)+ return self.palettes.index(p)++ def add(self, idx, w, h, x, y, pal, group, opaque=False):+ """idx: bytes, one palette index per pixel (0 transparent, unless opaque)."""+ row = (w + 1) // 2+ raw = bytearray(row * h)+ for j in range(h):+ line = idx[j * w:(j + 1) * w]+ for i in range(0, w, 2):+ a = line[i]+ b = line[i + 1] if i + 1 < w else 0+ raw[j * row + i // 2] = a | b << 4+ z = deflate(bytes(raw))+ at = self.blob.add(z)+ self.bytes[group] = self.bytes.get(group, 0) + len(z)+ key = (w, h, x, y, pal, at, len(z))+ self.sprites.append(key)+ return len(self.sprites) - 1+++def quantize(images, colors=15, transparent=True):+ """One palette for all the images: (palette [(r,g,b)], [index bytes per image]). Index 0 is transparent+ (alpha below ALPHA_CUT) when transparent, else the 16 colours are all used."""+ n = colors if transparent else 16+ pixels = []+ for im in images:+ a = im.getchannel("A").tobytes()+ rgb = im.convert("RGB").tobytes()+ pixels += [rgb[i * 3:i * 3 + 3] for i in range(im.width * im.height) if not transparent or a[i] >= ALPHA_CUT]+ if not pixels:+ pixels = [b"\0\0\0"]+ strip = Image.frombytes("RGB", (len(pixels), 1), b"".join(pixels))+ q = strip.quantize(colors=n, method=Image.Quantize.MEDIANCUT, dither=Image.Dither.NONE)+ pal = q.getpalette()[:n * 3]+ pal += [0] * (n * 3 - len(pal))+ colours = [tuple(pal[i * 3:i * 3 + 3]) for i in range(n)]+ lut = np.array(colours, dtype=np.int32)+ out = []+ for im in images:+ rgb = np.asarray(im.convert("RGB"), dtype=np.int32).reshape(-1, 3)+ d = ((rgb[:, None, :] - lut[None, :, :]) ** 2).sum(axis=2)+ q = d.argmin(axis=1).astype(np.uint8) # (argmin: the first of equals)+ if transparent:+ a = np.asarray(im.getchannel("A")).reshape(-1)+ q = np.where(a >= ALPHA_CUT, q + 1, 0).astype(np.uint8)+ out.append(q.tobytes())+ return colours, out+++# ------------------------------------------------------------------------------------------------- charts+def leb(v):+ assert v >= 0+ out = bytearray()+ while v >= 128:+ out.append(v & 127 | 128)+ v >>= 7+ out.append(v)+ return out+++def us(ms):+ return int(round(float(ms) * 1000))+++class Songs:+ def __init__(self, ref):+ self.ref = ref+ self.levels = [dict(id=l, **ref.json(f"preload/data/levels/{l}.json")) for l in LEVELS]+ self.order = [s for l in self.levels for s in l["songs"]]+ self.songs = []+ for song in self.order:+ variations = []+ for v in VARIATIONS:+ suffix = "" if v == "default" else "-" + v+ mp = ref.root / f"preload/data/songs/{song}/{song}-metadata{suffix}.json"+ if not mp.exists():+ continue+ meta = ref.json(mp.relative_to(ref.root))+ chart = ref.json(f"preload/data/songs/{song}/{song}-chart{suffix}.json")+ variations.append(dict(kind=v, meta=meta, chart=chart))+ self.songs.append(dict(id=song, variations=variations,+ level=next(i for i, l in enumerate(self.levels) if song in l["songs"])))++ def characters(self):+ names = set()+ for s in self.songs:+ for v in s["variations"]:+ c = v["meta"]["playData"]["characters"]+ for k in ("player", "opponent", "girlfriend"):+ if c.get(k):+ names.add(c[k])+ names |= set(SSERAFIM_EXTRA)+ return sorted(names)++ def stages(self):+ return sorted({v["meta"]["playData"]["stage"] for s in self.songs for v in s["variations"]})+++OWNED = {} # the characters Boyfriend's and Pico's freeplay lists are for (data/players)+SSERAFIM_EXTRA = ["sserafim-yunjin", "sserafim-chaewon", "sserafim-eunchae"]+SSERAFIM_FEET = [(-621, 154), (687, 98), (770, 675)]++# note kinds: the animation each one plays instead of sing<DIR> (as the characters' own scripts do)+WEEKEND = {"blockhigh": "block", "blocklow": "block", "blockspin": "block", "cockgun": "cock", "dodgehigh": "dodge",+ "dodgelow": "duck", "fakeout": "fakeout", "firegun": "shoot", "hithigh": "hitHigh", "hitlow": "hitLow",+ "idle": "idle", "kickcan": "kickCan", "kneecan": "kneeCan", "lightcan": "lightCan",+ "picouppercut": "uppercut", "picouppercutprep": "uppercutPrep", "darnelluppercut": "uppercut",+ "darnelluppercutprep": "uppercutPrep", "punchhigh": "punchHigh1", "punchhighblocked": "punchHigh2",+ "punchhighspin": "punchHigh2", "punchlow": "punchLow1", "punchlowblocked": "punchLow2",+ "punchlowdodged": "punchLow2", "punchlowspin": "punchLow2", "taunt": "taunt"}+DIRS = ["LEFT", "DOWN", "UP", "RIGHT"]+++def kind_anims(kind):+ """The four animation names a note kind plays (None: the plain sing<DIR>; "": none at all)."""+ if kind in ("", "non_scoreable"):+ return None+ if kind == "noanim":+ return [""] * 4+ if kind == "mom":+ return [f"sing{d}-alt" for d in DIRS]+ if kind.startswith("sakura-"):+ return [f"sing{d}-{kind[7:]}" for d in DIRS]+ if kind == "censor":+ return [f"sing{d}-censor" for d in DIRS]+ if kind in ("ugh", "hehPrettyGood"):+ return [kind] * 4+ if kind.startswith("weekend-1-"):+ return [WEEKEND.get(kind[10:], f"sing{d}") for d in DIRS]+ return None+++# ------------------------------------------------------------------------------------------------- characters+class Characters:+ def __init__(self, ref, pics, names, wanted_anims, stage_scale):+ self.ref, self.pics = ref, pics+ self.rows, self.anims, self.anim_names, self.kinds = [], [], [], []+ self.index = {n: i for i, n in enumerate(names)}+ self.icons, self.icon_rows = {}, []+ self.preview = {}+ self.name_ids = {}+ self.stage_scale = stage_scale+ self.world = {}+ for n in names:+ self.convert(n, wanted_anims.get(n, set()))++ def name_id(self, name):+ if name not in self.name_ids:+ self.name_ids[name] = len(self.name_ids)+ return self.name_ids[name]++ def icon(self, ident):+ """A health icon (its frames: normal, losing, winning), by its id."""+ if ident in self.icons:+ return self.icons[ident]+ path = self.ref.root / f"preload/images/icons/icon-{ident}.png"+ if not path.exists():+ ident = "face"+ path = self.ref.root / "preload/images/icons/icon-face.png"+ if ident in self.icons:+ return self.icons[ident]+ im = atlas.open_image(path)+ size = im.height+ pixel = size < 50+ frames = []+ n = max(1, min(3, im.width // size))+ target = round(150 * HUD)+ for i in range(n):+ f = im.crop((i * size, 0, (i + 1) * size, size))+ f = f.resize((target, target), Image.Resampling.NEAREST if pixel else Image.Resampling.LANCZOS)+ frames.append(f)+ colours, idx = quantize(frames)+ pal = self.pics.palette(colours)+ ids = []+ for f, ix in zip(frames, idx):+ b = f.getbbox() or (0, 0, 1, 1)+ ids.append(self.pics.add(crop_idx(ix, target, target, b), b[2] - b[0], b[3] - b[1], b[0] - target // 2,+ b[1] - target // 2, pal, "icons"))+ while len(ids) < 3:+ ids.append(ids[0])+ self.icons[ident] = len(self.icon_rows)+ self.icon_rows.append(ids)+ return self.icons[ident]++ def convert(self, name, wanted):+ cfg = self.ref.json(f"preload/data/characters/{name}.json")+ scale = float(cfg.get("scale", 1)) * self.stage_scale.get(name, 1.0)+ flip = bool(cfg.get("flipX", False))+ base = self.ref.path(cfg["assetPath"])+ anims = {a["name"]: a for a in cfg["animations"]}+ alternate = "danceLeft" in anims+ keep = (["danceLeft", "danceRight"] if alternate else ["idle"]) + [f"sing{d}" for d in DIRS] + \+ [f"sing{d}miss" for d in DIRS]+ keep += sorted(a for a in wanted if a in anims and a not in keep)+ picked = {}+ for a in keep:+ if a not in anims:+ continue+ spec = anims[a]+ path = self.ref.path(spec["assetPath"]) if spec.get("assetPath") else base+ count = DANCE_FRAMES if a in ("idle", "danceLeft", "danceRight") else \+ MISS_FRAMES if a.endswith("miss") else SING_FRAMES if a.startswith("sing") else OTHER_FRAMES+ try:+ _, length = self.ref.frames(path, spec, [0])+ except (KeyError, FileNotFoundError) as e:+ print(f" {name}: no {a} ({e})", file=sys.stderr)+ continue+ count = min(count, length)+ picks = sorted({round(i * (length - 1) / max(1, count - 1)) for i in range(count)}) if count > 1 else [0]+ leaves, _ = self.ref.frames(path, spec, picks)+ ox, oy = spec.get("offsets", [0, 0])+ picked[a] = (picks, leaves, length, (ox, oy), spec.get("frameRate", 24), bool(spec.get("looped", False)))+ if not picked:+ die(f"{name}: no animation")+ idle = "danceLeft" if alternate else "idle"+ if idle not in picked:+ idle = next(iter(picked))+ box = bounds(picked[idle][1][0])+ cx, foot = (box[0] + box[2]) / 2, box[3]+ # the animations' offsets, from the idle one's: the idle frame stands on the anchor (its feet), the others+ # where the game puts them from there (the character's own global offsets only move them all together)+ iox, ioy = picked[idle][3]+ k = scale * CHAR_SCALE+ images = []+ for a, (picks, leaves, length, (ox, oy), fps, loop) in picked.items():+ for lv in leaves:+ if flip: # mirrored round the idle frame's middle; the offsets are not+ lv = [(im, multiply((-1, 0, 0, 1, 2 * cx, 0), m), al) for im, m, al in lv]+ lv = [(im, multiply((1, 0, 0, 1, -(ox - iox), -(oy - ioy)), m), al) for im, m, al in lv]+ pixel = cfg.get("isPixel", False)+ im, x, y = flatten(lv, k, resample=Image.Resampling.NEAREST if pixel else Image.Resampling.BICUBIC)+ b = im.getbbox() or (0, 0, 1, 1)+ images.append((a, im.crop(b), x + b[0] - round(cx * k), y + b[1] - round(foot * k)))+ colours, idx = quantize([im for _, im, _, _ in images])+ pal = self.pics.palette(colours)+ first = len(self.anims)+ self.preview[name] = images[0][1:]+ slots = {}+ it = iter(zip(images, idx))+ for a, (picks, leaves, length, offsets, fps, loop) in picked.items():+ sprite0 = None+ for _ in picks:+ (_, im, x, y), ix = next(it)+ s = self.pics.add(ix, im.width, im.height, x, y, pal, "characters")+ sprite0 = s if sprite0 is None else sprite0+ slots[a] = len(self.anims) - first+ flags = int(loop) | (a.startswith("sing") and not a.endswith("-end")) << 1 | a.endswith("miss") << 2 | \+ (a.startswith("dance") or a.startswith("idle")) << 3+ self.anims.append([sprite0, len(picks), min(255, length), int(fps), flags, picks + [0] * (6 - len(picks))])+ self.anim_names.append(self.name_id(a))+ slot_names = ["danceLeft" if alternate else "idle", "danceRight" if alternate else "idle"] + \+ [f"sing{d}" for d in DIRS] + [f"sing{d}miss" for d in DIRS]+ slot = [slots.get(s, 255) for s in slot_names]+ hi = cfg.get("healthIcon") or {}+ icon = self.icon(hi.get("id", name.split("-")[0] if not (self.ref.root / f"preload/images/icons/icon-{name}.png").exists() else name))+ dance = float(cfg.get("danceEvery", 1))+ sing = float(cfg.get("singTime", 8))+ owner = 4 if name in OWNED["bf"] else 8 if name in OWNED["pico"] else 0+ owner |= 16 if hi.get("flipX", False) else 0 # (its health icon faces the other way)+ self.rows.append(dict(name=name, owner=owner, anim=first, count=len(self.anims) - first, dance=round(dance * 4),+ sing=min(255, round(sing)), alternate=alternate, slot=slot, icon=icon,+ pixel=bool(cfg.get("isPixel", False))))+ self.world[name] = (box[2] - box[0]) * scale, (box[3] - box[1]) * scale+ print(f" {name}: {len(picked)} animations, {len(images)} frames, {self.pics.bytes.get('characters', 0)} bytes so far",+ file=sys.stderr)++ def kind_rows(self, kinds):+ """(character, kind, four animations) for each note kind a character has its own animations for."""+ for ci, row in enumerate(self.rows):+ names = {self.anim_names[row["anim"] + i]: i for i in range(row["count"])}+ inv = {v: k for k, v in self.name_ids.items()}+ have = {inv[n]: i for n, i in names.items()}+ for ki, kind in enumerate(kinds):+ want = kind_anims(kind)+ if want is None:+ continue+ anims = [254 if w == "" else have.get(w, 255) for w in want]+ if all(a == 255 for a in anims):+ continue+ self.kinds.append((ci, ki, anims))+++def crop_idx(idx, w, h, b):+ x0, y0, x1, y1 = b+ return bytes(idx[y * w + x] for y in range(y0, y1) for x in range(x0, x1))+++# ------------------------------------------------------------------------------------------------- stages+class Stages:+ def __init__(self, ref, pics, names, chars, cast):+ self.ref, self.pics, self.rows = ref, pics, []+ for n in names:+ self.convert(n, chars, cast.get(n, []))++ def convert(self, name, chars, cast):+ """cast: the (player, opponent) pairs of the songs on this stage."""+ cfg = self.ref.json(f"preload/data/stages/{name}.json")+ roles = cfg.get("characters", {})+ pos = {r: roles.get(r, {}).get("position", d) for r, d in (("bf", [990, 885]), ("dad", [335, 885]),+ ("gf", [750, 787]))}+ z = {r: roles.get(r, {}).get("zIndex", d) for r, d in (("bf", 300), ("dad", 200), ("gf", 100))}+ # the view: both singers whole, their feet low on the screen+ xs = []+ for pair in cast:+ for who, role in zip(pair, ("bf", "dad")):+ if who in chars.world:+ w, _ = chars.world[who]+ xs += [pos[role][0] - w / 2, pos[role][0] + w / 2]+ if not xs:+ xs = [pos["dad"][0] - 200, pos["bf"][0] + 200]+ if name == "sserafim":+ xs += [x - 150 for x, _ in SSERAFIM_FEET] + [x + 150 for x, _ in SSERAFIM_FEET]+ span = max(1440, (max(xs) - min(xs)) * 1.12)+ s = SCREEN_W / span+ left = (max(xs) + min(xs)) / 2 - span / 2+ top = max(pos["bf"][1], pos["dad"][1]) - 205 / s+ view = (left, top, left + span, top + SCREEN_H / s)+ order = sorted(z, key=lambda r: (z[r], r))+ layers = [Image.new("RGBA", (SCREEN_W, SCREEN_H), (0, 0, 0, 0)) for _ in range(4)]+ for prop in sorted(cfg.get("props", []), key=lambda p: p.get("zIndex", 0)):+ path = prop.get("assetPath", "")+ if not path or prop.get("alpha", 1) == 0:+ continue+ if name == "sserafim" and prop.get("name") in ("backTablesCutscene", "burgerCutscene", "truckDoor"):+ continue # (the intro's)+ if prop.get("name") == "additionalLighten":+ continue # (a flash the stage's script turns on)+ depth = sum(prop.get("zIndex", 0) > z[r] for r in order)+ if path.startswith("#"): # a box of colour, scale = its size+ c = tuple(int(path[i:i + 2], 16) for i in (1, 3, 5))+ w, h = prop.get("scale", [1, 1])+ fx, fy = prop.get("scroll", [1, 1])+ px, py = prop.get("position", [0, 0])+ cxm, cym = (view[0] + view[2]) / 2, (view[1] + view[3]) / 2+ px -= (cxm - 640) * (fx - 1)+ py -= (cym - 360) * (fy - 1)+ x0, y0 = round((px - view[0]) * s), round((py - view[1]) * s)+ x1, y1 = round((px + w - view[0]) * s), round((py + h - view[1]) * s)+ box = Image.new("RGBA", (SCREEN_W, SCREEN_H), (0, 0, 0, 0))+ box.paste((*c, round(255 * prop.get("alpha", 1))), (max(0, x0), max(0, y0), min(SCREEN_W, x1), min(SCREEN_H, y1)))+ layers[depth].alpha_composite(box)+ continue+ try:+ anim = (prop.get("animations") or [dict(prefix="")])[0]+ start = prop.get("startingAnimation")+ if start:+ anim = next((a for a in prop.get("animations", []) if a["name"] == start), anim)+ leaves = self.ref.frames(self.ref.path(path, cfg.get("directory", "shared")), anim, [0])[0][0]+ except (FileNotFoundError, KeyError) as e:+ print(f" {name}: prop {path} ({e})", file=sys.stderr)+ continue+ sc = prop.get("scale", [1, 1])+ sc = [sc, sc] if isinstance(sc, (int, float)) else sc+ px, py = prop.get("position", [0, 0])+ fx, fy = prop.get("scroll", [1, 1])+ # parallax: the camera looks at the view's middle+ cxm, cym = (view[0] + view[2]) / 2, (view[1] + view[3]) / 2+ camx, camy = cxm - 640, cym - 360+ px -= camx * (fx - 1)+ py -= camy * (fy - 1)+ flip = -1 if prop.get("flipX") else 1+ m = (sc[0] * flip, 0, 0, sc[1], px, py)+ alpha = prop.get("alpha", 1)+ lv = [(im, multiply(m, mm), a * alpha) for im, mm, a in leaves]+ pixel = prop.get("isPixel", False)+ layer, _, _ = flatten(lv, s, view, Image.Resampling.NEAREST if pixel else Image.Resampling.BICUBIC)+ layers[depth].alpha_composite(layer.crop((0, 0, SCREEN_W, SCREEN_H)))+ bg = Image.new("RGBA", (SCREEN_W, SCREEN_H), (0, 0, 0, 255))+ bg.alpha_composite(layers[0])+ colours, idx = quantize([bg], transparent=False)+ pal = self.pics.palette(colours, opaque=True)+ bgid = self.pics.add(idx[0], SCREEN_W, SCREEN_H, 0, 0, pal, "stages", opaque=True)+ fronts = []+ for d in (1, 2, 3):+ im = layers[d]+ b = im.getbbox()+ if not b:+ fronts.append(0xFFFF)+ continue+ im = im.crop(b)+ colours, ix = quantize([im])+ fronts.append(self.pics.add(ix[0], im.width, im.height, b[0], b[1], self.pics.palette(colours), "stages"))+ feet = {r: (round((pos[r][0] - view[0]) * s), round((pos[r][1] - view[1]) * s)) for r in pos}+ if name == "phillyBlazin": # (the two fighters share a place: their art stands them side by side)+ feet["dad"], feet["bf"] = (104, 214), (214, 214)+ extra = [(0, 0)] * 3+ if name == "sserafim":+ extra = [(round((x - view[0]) * s), round((y - view[1]) * s)) for x, y in SSERAFIM_FEET]+ self.rows.append(dict(name=name, bg=bgid, front=fronts, feet=feet, extra=extra, order=order, scale=s, view=view,+ zoom=float(cfg.get("cameraZoom", 1))))+ if DEBUG:+ for d in (1, 2, 3):+ bg.alpha_composite(layers[d])+ bg.save(DEBUG / f"stage-{name}.png")+++# ------------------------------------------------------------------------------------------------- HUD and menus+class Art:+ """The notes, the HUD and the menus' pictures; ids by name."""++ def __init__(self, ref, pics):+ self.ref, self.pics, self.ids = ref, pics, {}++ def put(self, name, im, ax, ay, group, colours=None):+ """An image, its top left (ax, ay) from its anchor."""+ b = im.getbbox() or (0, 0, 1, 1)+ im = im.crop(b)+ pal_colours, idx = quantize([im]) if colours is None else colours+ self.ids[name] = self.pics.add(idx[0], im.width, im.height, ax + b[0], ay + b[1],+ self.pics.palette(pal_colours), group)+ return self.ids[name]++ def sparrow(self, name, path, prefix, scale, pixel, group, pick=0, center=True):+ """A Sparrow frame, centred on its untrimmed box (as the game centres strum and splash frames)."""+ leaves, _ = self.ref.frames(path, dict(prefix=prefix), [pick])+ box = self.ref.boxes[0] if self.ref.boxes else bounds(leaves[0])+ im, x, y = flatten(leaves[0], scale, box, Image.Resampling.NEAREST if pixel else Image.Resampling.BICUBIC)+ ax = x - round((box[0] + box[2]) / 2 * scale) if center else x+ ay = y - round((box[1] + box[3]) / 2 * scale) if center else y+ return self.put(name, im, ax, ay, group)++ def image(self, name, path, scale, pixel, group, center=True, size=None):+ im = atlas.open_image(path)+ w, h = size or (max(1, round(im.width * scale)), max(1, round(im.height * scale)))+ im = im.resize((w, h), Image.Resampling.NEAREST if pixel else Image.Resampling.LANCZOS)+ return self.put(name, im, -(w // 2) if center else 0, -(h // 2) if center else 0, group)++ def styles(self):+ for style in ("funkin", "pixel"):+ a = self.ref.json(f"preload/data/notestyles/{style}.json")["assets"]+ base = self.ref.json("preload/data/notestyles/funkin.json")["assets"]+ pixel = style == "pixel"+ hud = HUD * 1.0+ # (pixel art at a whole number of pixels: the notes at 1.5 screen pixels for each of theirs)+ for d, dn in enumerate(["left", "down", "up", "right"]):+ Dn = dn.capitalize()+ n = a["note"]+ self.sparrow(f"{style}.note{d}", self.ref.path(n["assetPath"]), n["data"][dn]["prefix"],+ n.get("scale", 1) * hud, pixel, "hud")+ st = a["noteStrumline"]+ for state in ("Static", "Press", "Confirm"):+ self.sparrow(f"{style}.{state.lower()}{d}", self.ref.path(st["assetPath"]),+ st["data"][f"{dn}{state}"]["prefix"], st.get("scale", 1) * hud, pixel, "hud")+ # holds: a row of the body (stretched down the screen) and the end, for each direction+ h = a["holdNote"]+ im = atlas.open_image(self.ref.path(h["assetPath"]).with_suffix(".png"))+ cw = im.width // 8+ z = h.get("scale", 1) * hud+ for d in range(4):+ body = im.crop((2 * d * cw, 0, 2 * d * cw + cw, im.height))+ end = im.crop(((2 * d + 1) * cw, 0, (2 * d + 2) * cw, im.height))+ w = max(1, round(cw * z))+ rs = Image.Resampling.NEAREST if pixel else Image.Resampling.LANCZOS+ row = body.crop((0, body.height // 2, cw, body.height // 2 + 1)).resize((w, 1), rs)+ self.put(f"{style}.hold{d}", row, -(w // 2), 0, "hud")+ eh = max(1, round(end.height * z))+ self.put(f"{style}.end{d}", end.resize((w, eh), rs), -(w // 2), 0, "hud")+ # the splash on a Sick hit (its first two frames)+ sp = a.get("noteSplash", base["noteSplash"])+ for d, dn in enumerate(["left", "down", "up", "right"]):+ prefix = sp["data"][f"{dn}Splashes"][0]["prefix"]+ self.sparrow(f"{style}.splash{d}_0", self.ref.path(sp["assetPath"]), prefix,+ sp.get("scale", 1) * hud, pixel, "hud", pick=1)+ # ratings, combo digits, countdown+ for r in ("sick", "good", "bad", "shit"):+ j = a[f"judgement{r.capitalize()}"]+ self.image(f"{style}.{r}", self.ref.path(j["assetPath"].replace("default:", "preload:")).with_suffix(".png"),+ j.get("scale", 1) * hud, pixel, "hud")+ for n in range(10):+ j = a[f"comboNumber{n}"]+ self.image(f"{style}.num{n}", self.ref.path(j["assetPath"].replace("default:", "preload:")).with_suffix(".png"),+ j.get("scale", 1) * hud, pixel, "hud")+ for c in ("Two", "One", "Go"):+ j = a[f"countdown{c}"]+ self.image(f"{style}.count{c}", self.ref.path(j["assetPath"]).with_suffix(".png"),+ j.get("scale", 1) * hud, pixel, "hud")++ def menus(self):+ p = self.ref.path+ # the title: the logo (two frames of its bump) and Girlfriend dancing+ for i, f in enumerate((0, 6)):+ self.sparrow(f"logo{i}", p("logoBumpin", "preload"), "logo bumpin", HUD, False, "menus", pick=f)+ for i, f in enumerate((0, 7, 15, 22)):+ self.sparrow(f"gftitle{i}", p("gfDanceTitle", "preload"), "gfDance", HUD, False, "menus", pick=f)+ for name in ("menuBG", "menuDesat"):+ im = atlas.open_image(p(name, "preload").with_suffix(".png")).resize((SCREEN_W, SCREEN_H), Image.Resampling.LANCZOS)+ colours, idx = quantize([im], transparent=False)+ self.ids[name] = self.pics.add(idx[0], SCREEN_W, SCREEN_H, 0, 0, self.pics.palette(colours, opaque=True), "menus")++ def alphabet(self, scale=0.28):+ """The menus' bold letters (fonts/bold: white with a black outline), A-Z and signs; the digits, which it+ doesn't have, from fonts/default, filled white and outlined the same way. One palette for all; returns+ the sprite (or 0xFFFF) and the advance of each of ASCII 32..126."""+ from PIL import ImageFilter+ signs = {"-": "-dash-", "'": "-apostraphie-", "!": "-exclamation point-", "?": "-question mark-",+ ".": "-period-", ",": "-comma-", "&": "-andpersand-", ":": ":", "(": "(", ")": ")", "+": "+",+ "/": "-forward slash-", "*": "*", "%": "%", "#": "#", "$": "$"}+ bold = self.ref.path("fonts/bold", "preload")+ default = self.ref.path("fonts/default", "preload")+ frames = {}+ for path in (bold, default):+ for name, piece, m, fw, fh in self.ref.sparrow(path):+ frames.setdefault((path, re.sub(r"\d{4}$", "", name)), (piece, m, fw, fh))+ glyphs = {}+ for code in range(33, 127):+ c = chr(code)+ key = (bold, c if c.isalpha() and c.isupper() else signs.get(c, "\0"))+ if key in frames:+ piece, m, fw, fh = frames[key]+ im, x, y = flatten([(piece, m, 1)], scale, (0, 0, fw, fh))+ elif c.isdigit() and (default, c) in frames:+ piece, m, fw, fh = frames[(default, c)]+ pad = 8+ mask = Image.new("L", (fw + 2 * pad, fh + 2 * pad))+ mask.paste(piece.getchannel("A"), (pad + int(m[4]), pad + int(m[5])))+ outline = mask.filter(ImageFilter.MaxFilter(11))+ big = Image.new("RGBA", mask.size, (0, 0, 0, 0))+ big.paste((0, 0, 0, 255), (0, 0), outline)+ big.paste((255, 255, 255, 255), (0, 0), mask)+ im, x, y = flatten([(big, (1, 0, 0, 1, -pad, -pad), 1)], scale, (-pad, -pad, fw + pad, fh + pad))+ y += round(pad * scale)+ else:+ continue+ glyphs[c] = (im, x, y)+ # lower case: the capitals+ colours, idx = quantize([g[0] for g in glyphs.values()])+ pal = self.pics.palette(colours)+ table = []+ height = max(g[0].height + g[2] for g in glyphs.values())+ for code in range(32, 127):+ c = chr(code)+ c = c.upper() if c.isalpha() else c+ if c not in glyphs:+ table.append((0xFFFF, round(height * 0.5)))+ continue+ im, x, y = glyphs[c]+ ix = idx[list(glyphs).index(c)]+ b = im.getbbox() or (0, 0, 1, 1)+ sid = self.pics.add(crop_idx(ix, im.width, im.height, b), b[2] - b[0], b[3] - b[1], x + b[0], y + b[1],+ pal, "menus") if (c not in self.ids) else self.ids[c]+ self.ids.setdefault(c, sid)+ table.append((sid, b[2] - b[0] + max(1, round(height * 0.04))))+ self.bold, self.bold_height = table, height+ return table+++# ------------------------------------------------------------------------------------------------- the songs+def ease_code(ease, easedir):+ if ease in ("linear", "INSTANT"):+ return EASES.index(ease)+ base = re.sub("(InOut|In|Out)$", "", ease)+ d = ease[len(base):] or easedir or "Out"+ e = EASES.index(base) if base in EASES else 0+ return e | (EASE_DIRS.index(d) if d in EASE_DIRS else 1) << 4+++def step_us(bpm):+ return 60e6 / bpm / 4+++class Charts:+ def __init__(self, songs, chars, stages, blob, anim_name):+ self.songs, self.blob = songs, blob+ self.kinds = [""]+ for s in songs.songs:+ for v in s["variations"]:+ for d, ns in v["chart"]["notes"].items():+ for n in ns:+ k = n.get("k", "") or ""+ if k not in self.kinds:+ self.kinds.append(k)+ self.kinds = [""] + sorted(k for k in self.kinds if k)+ self.tempos, self.events, self.charts, self.vars, self.rows = [], [], [], [], []+ self.max_raw = self.max_notes = 0+ self.stats = dict(raw=0, packed=0, notes=0)+ for si, s in enumerate(songs.songs):+ v0 = len(self.vars)+ for v in s["variations"]:+ self.variation(si, s, v, chars, stages, anim_name)+ meta = s["variations"][0]["meta"]+ opp = meta["playData"]["characters"]["opponent"]+ name = meta["songName"]+ if len(name) > 18: # ("SPAGHETTI (feat. j-hope of BTS) (Clean Version)": its title alone)+ name = re.sub(r"\s*\(.*$", "", name)+ self.rows.append(dict(name=name, level=s["level"], var=v0, nvar=len(self.vars) - v0,+ icon=chars.rows[chars.index[opp]]["icon"]))++ def variation(self, si, s, v, chars, stages, anim_name):+ meta, chart = v["meta"], v["chart"]+ pd = meta["playData"]+ c = pd["characters"]+ # the tempo: each change's time (us), its step length (1/256 us) and the steps before it (16.16)+ t0 = len(self.tempos)+ steps, last_t, last_len = 0.0, 0.0, None+ for tc in meta["timeChanges"]:+ t = float(tc["t"])+ if last_len is not None:+ steps += (t - last_t) * 1000 / last_len+ if "b" in tc and tc["b"] is not None and last_len is not None:+ steps = float(tc["b"]) * 4+ last_t, last_len = t, step_us(float(tc["bpm"]))+ self.tempos.append((us(t), round(last_len * 256), round(steps * 65536)))+ e0 = len(self.events)+ for e in sorted(chart.get("events", []), key=lambda e: float(e["t"])):+ ev = self.event(e, chars, anim_name, c, meta)+ if ev:+ self.events.append(ev)+ ch0 = len(self.charts)+ speeds = chart.get("scrollSpeed", {})+ for di, diff in enumerate(DIFFICULTIES):+ ns = chart["notes"].get(diff)+ if diff not in pd["difficulties"] or not ns:+ continue+ ns = sorted(ns, key=lambda n: (float(n["t"]), int(n["d"])))+ data, prev, total, players = bytearray(), 0, 0, 0+ for n in ns:+ t = us(n["t"])+ length = us(n.get("l", 0) or 0)+ k = self.kinds.index(n.get("k", "") or "")+ d = int(n["d"])+ assert 0 <= d < 8 and t >= prev+ data += leb(t - prev) + leb(d | (length > 0) << 3 | k << 4)+ if length > 0:+ data += leb(length)+ prev = t+ if d < 4:+ players += 1+ if (n.get("k") or "") != "non_scoreable":+ total += 1+ z = deflate(bytes(data))+ at = self.blob.add(z)+ self.stats["raw"] += len(data)+ self.stats["packed"] += len(z)+ self.stats["notes"] += len(ns)+ self.max_raw = max(self.max_raw, len(data))+ self.max_notes = max(self.max_notes, len(ns))+ speed = float(speeds.get(diff, speeds.get("default", 1)))+ self.charts.append(dict(var=len(self.vars), diff=di, at=at, size=len(z), raw=len(data), notes=len(ns),+ total=total, speed=round(speed * 1000)))+ stage = stages.index(pd["stage"])+ role = [c.get("player"), c.get("opponent"), c.get("girlfriend")]+ inst = s["id"] + ("" if v["kind"] == "default" else "-" + (c.get("instrumental") or v["kind"]))+ if inst not in INST_MS:+ inst = s["id"]+ last = max([float(n["t"]) + float(n.get("l", 0) or 0) for d in chart["notes"].values() for n in d] + [0])+ length = max(INST_MS.get(inst, 0), last + 1200)+ style = 1 if pd.get("noteStyle") == "pixel" else 0+ self.vars.append(dict(song=si, kind=VARIATIONS.index(v["kind"]), stage=stage, style=style,+ chr=[chars.index[r] if r else 255 for r in role],+ extra=1 if s["id"] == "spaghetti" else 0, tempo=t0, ntempo=len(self.tempos) - t0,+ event=e0, nevent=len(self.events) - e0, chart=ch0, ncharts=len(self.charts) - ch0,+ flags=(1 if c.get("opponent") in ("gf",) else 0) | (2 if s["id"] == "blazin" else 0),+ length=round(length)))++ def event(self, e, chars, anim_name, c, meta):+ kind = e["e"]+ if kind not in EVENTS:+ return None+ v = e.get("v")+ v = v if isinstance(v, dict) else {"char": v}+ t = us(e["t"])+ typ = EVENTS.index(kind)+ a = b = cc = 0+ val = dur = 0+ if kind == "SetCameraBop":+ val = round(float(v.get("intensity", 1.0)) * 1000)+ dur = max(0, round(float(v.get("rate", 4)) * 4)) # every this many steps+ b = round(float(v.get("offset", 0) or 0) * 4) & 255+ elif kind == "PlayAnimation":+ target = v.get("target", "bf")+ a = {"boyfriend": 0, "bf": 0, "player": 0, "dad": 1, "opponent": 1, "girlfriend": 2, "gf": 2}.get(target, 255)+ if a == 255 or v.get("anim") not in anim_name:+ return None+ b = anim_name[v["anim"]]+ cc = 1 if v.get("force", False) else 0+ elif kind == "ScrollSpeed":+ val = round(float(v.get("scroll", 1)) * 1000)+ a = 1 if v.get("absolute", False) else 0+ b = ease_code(v.get("ease", "linear"), v.get("easeDir", ""))+ dur = round(float(v.get("duration", 4)) * 1000) # steps x 1000+ cc = {"both": 0, "player": 1, "opponent": 2}.get(v.get("strumline", "both"), 0)+ elif kind == "SetHealthIcon":+ a = int(v.get("char", 0))+ b = chars.icon(v.get("id", "face"))+ cc = 1 if v.get("flipX", False) else 0+ elif kind == "sserafimSing":+ a = sum(1 << i for i, x in enumerate(v.get("singing", [])) if x)+ elif kind == "sserafimShow":+ a = sum(1 << i for i, x in enumerate(v.get("visible", [])) if x)+ elif kind == "sserafimDark":+ val = round(float(v.get("amount", 0)) * 1000)+ dur = round(float(v.get("duration", 0)) * 1000) # seconds x 1000+ return (t, typ, a, b, cc, val, dur)+++# ------------------------------------------------------------------------------------------------- C+def c_array(ctype, name, rows, dims=""):+ def lit(x):+ if isinstance(x, (list, tuple)):+ return "{" + ",".join(lit(y) for y in x) + "}"+ if isinstance(x, str):+ return x+ return str(x)+ out = [f"const {ctype} {name}[{len(rows)}]{dims} = {{"]+ out += [" " + lit(r) + "," for r in rows]+ out.append("};")+ return out+++def cstr(s):+ return json.dumps(s)+++def ident(s):+ return re.sub("[^A-Z0-9]+", "_", s.upper()).strip("_")+++def git_blob_sha(path):+ data = Path(path).read_bytes()+ return hashlib.sha1(b"blob %d\0" % len(data) + data).hexdigest()+++DEBUG = None+++def main():+ global DEBUG+ ap = argparse.ArgumentParser()+ ap.add_argument("ref")+ ap.add_argument("out")+ ap.add_argument("--list", help="write the files read, with their git blob hashes, here")+ ap.add_argument("--debug", help="save pictures of the stages here")+ args = ap.parse_args()+ if args.debug:+ DEBUG = Path(args.debug)+ DEBUG.mkdir(parents=True, exist_ok=True)+ ref = Reference(args.ref)+ out = Path(args.out)+ out.mkdir(parents=True, exist_ok=True)+ blob = Blob()+ pics = Pictures(blob)+ songs = Songs(ref)+ # the animations the charts' events and note kinds ask for, by character+ wanted = {}+ for s in songs.songs:+ for v in s["variations"]:+ c = v["meta"]["playData"]["characters"]+ roles = {0: c.get("player"), 1: c.get("opponent"), 2: c.get("girlfriend")}+ for e in v["chart"].get("events", []):+ if e["e"] == "PlayAnimation" and isinstance(e.get("v"), dict):+ t = {"boyfriend": 0, "bf": 0, "player": 0, "dad": 1, "opponent": 1, "girlfriend": 2,+ "gf": 2}.get(e["v"].get("target"), None)+ if t is not None and roles.get(t):+ wanted.setdefault(roles[t], set()).add(e["v"].get("anim"))+ for ns in v["chart"]["notes"].values():+ for n in ns:+ names = kind_anims(n.get("k", "") or "")+ if not names:+ continue+ who = roles[0] if int(n["d"]) < 4 else roles[1]+ targets = [who] + (SSERAFIM_EXTRA + [c.get("player"), c.get("opponent"), c.get("girlfriend")]+ if s["id"] == "spaghetti" else [])+ for wname in targets:+ if wname:+ wanted.setdefault(wname, set()).update(x for x in names if x)+ for c in songs.characters(): # Girlfriend's cheers and tears+ wanted.setdefault(c, set()).update(("combo50", "combo200", "drop70", "hey", "cheer"))+ # the stages' own scale for characters (Blazin's), where a character is only ever on such a stage+ seen = {}+ cast = {}+ for s in songs.songs:+ for v in s["variations"]:+ pd = v["meta"]["playData"]+ st = ref.json(f"preload/data/stages/{pd['stage']}.json").get("characters", {})+ c = pd["characters"]+ for k, role in (("player", "bf"), ("opponent", "dad"), ("girlfriend", "gf")):+ if c.get(k):+ seen.setdefault(c[k], set()).add(float(st.get(role, {}).get("scale", 1)))+ cast.setdefault(pd["stage"], []).append((c.get("player"), c.get("opponent")))+ stage_scale = {n: next(iter(v)) for n, v in seen.items() if len(v) == 1 and next(iter(v)) != 1}+ for who in ("bf", "pico"):+ OWNED[who] = set(ref.json(f"preload/data/players/{who}.json").get("ownedChars", []))+ print("characters", file=sys.stderr)+ chars = Characters(ref, pics, songs.characters(), wanted, stage_scale)+ print("stages", file=sys.stderr)+ stage_names = songs.stages()+ stages = Stages(ref, pics, stage_names, chars, cast)+ print("HUD and menus", file=sys.stderr)+ art = Art(ref, pics)+ art.styles()+ art.menus()+ glyphs = art.alphabet()+ charts = Charts(songs, chars, stage_names, blob, chars.name_ids)+ if DEBUG: # each stage with its first song's characters+ done = set()+ for v in charts.vars:+ st = stages.rows[v["stage"]]+ if st["name"] in done:+ continue+ done.add(st["name"])+ im = Image.open(DEBUG / f"stage-{st['name']}.png").convert("RGBA")+ for role, key in ((2, "gf"), (1, "dad"), (0, "bf")):+ ci = v["chr"][role]+ if ci == 255:+ continue+ pim, x, y = chars.preview[chars.rows[ci]["name"]]+ fx, fy = st["feet"][key]+ im.alpha_composite(pim, (max(0, fx + x), max(0, fy + y)))+ im.save(DEBUG / f"scene-{st['name']}.png")+ chars.kind_rows(charts.kinds)+ # ---- write+ h = ["/* Made by tools/data.py from the game's own files (see tools/ref.txt). */", "#ifndef FNF_IDS_H",+ "#define FNF_IDS_H"]+ counts = dict(SPRITES=len(pics.sprites), PALETTES=len(pics.palettes), ANIMS=len(chars.anims),+ CHARS=len(chars.rows), KINDS=len(chars.kinds), NOTE_KINDS=len(charts.kinds),+ ICONS=len(chars.icon_rows), STAGES=len(stages.rows), TEMPOS=len(charts.tempos),+ EVENTS=len(charts.events), CHARTS=len(charts.charts), VARS=len(charts.vars),+ SONGS=len(charts.rows), LEVELS=len(songs.levels), BLOB=len(blob.data),+ CHART_RAW_MAX=charts.max_raw, CHART_NOTES_MAX=charts.max_notes)+ # RAM: what a song needs unpacked (tools/data.py works it out; draw.c lays it out)+ def raw(i):+ w, hh = pics.sprites[i][0], pics.sprites[i][1]+ return (w + 1) // 2 * hh+ frame_max = []+ for r in chars.rows:+ m = 0+ for a in range(r["anim"], r["anim"] + r["count"]):+ s0, n = chars.anims[a][0], chars.anims[a][1]+ m = max([m] + [raw(s0 + k) for k in range(n)])+ frame_max.append(m)+ front = [sum(raw(f) for f in st["front"] if f != 0xFFFF) for st in stages.rows]+ cast = 0+ for v in charts.vars:+ ids = [c for c in v["chr"] if c != 255]+ if v["extra"]:+ ids += [chars.index[n] for n in SSERAFIM_EXTRA]+ cast = max(cast, sum(frame_max[c] for c in ids) + front[v["stage"]])+ def style_bytes(style, names):+ return sum(raw(art.ids[f"{style}.{n}"]) for n in names)+ hud_names = [f"{k}{d}" for k in ("note", "static", "press", "confirm", "hold", "end") for d in range(4)] + \+ ["sick", "good", "bad", "shit"] + [f"num{n}" for n in range(10)]+ hud = max(style_bytes(st, hud_names) for st in ("funkin", "pixel"))+ transient = max(max(style_bytes(st, [f"splash{d}_0" for d in range(4)]),+ max(raw(art.ids[f"{st}.count{c}"]) for c in ("Two", "One", "Go"))) for st in ("funkin", "pixel"))+ icon = 3 * max(raw(i) for row in chars.icon_rows for i in row)+ bold_bytes = sum((raw(i) + 3) & ~3 for i in sorted({g[0] for g in glyphs if g[0] != 0xFFFF}))+ counts.update(CAST_MAX=cast, HUD_MAX=hud, TRANSIENT_MAX=transient, ICON_MAX=icon, BOLD_BYTES=bold_bytes,+ BG_BYTES=SCREEN_W * SCREEN_H // 2)+ for r, m in zip(chars.rows, frame_max):+ r["frame_max"] = m+ h += [f"#define FNF_{k} {v}" for k, v in counts.items()]+ h += [f"#define FNF_SPR_{ident(k)} {v}" for k, v in art.ids.items() if len(k) > 1]+ h.append(f"#define FNF_BOLD_HEIGHT {art.bold_height}")+ h += [f"#define FNF_CHR_{ident(r['name'])} {i}" for i, r in enumerate(chars.rows)]+ h += [f"#define FNF_ANIM_{ident(k)} {v}" for k, v in chars.name_ids.items()]+ h += [f"#define FNF_EV_{ident(k)} {i}" for i, k in enumerate(EVENTS)]+ h += [f"#define FNF_KIND_{ident(k or 'normal')} {i}" for i, k in enumerate(charts.kinds)]+ h += [f"#define FNF_STAGE_{ident(k)} {i}" for i, k in enumerate(stage_names)]+ h += ["#endif", ""]+ (out / "ids.h").write_text("\n".join(h), newline="\n")+ c = ["/* Made by tools/data.py from the game's own files (see tools/ref.txt): the Funkin' Crew's charts and",+ " * pictures, which are not in this repository. */", '#include "data.h"']+ c += c_array("uint16_t", "fnf_palette", pics.palettes, "[16]")+ c += c_array("fnf_sprite_t", "fnf_sprite", [[w, h_, x, y, p, 0, at, size] for w, h_, x, y, p, at, size in pics.sprites])+ c += c_array("fnf_anim_t", "fnf_anim", [[s, n, ln, fps, loop, picks] for s, n, ln, fps, loop, picks in chars.anims])+ c += c_array("uint8_t", "fnf_anim_name", chars.anim_names)+ c += c_array("fnf_char_t", "fnf_char", [[r["anim"], r["count"], r["dance"], r["sing"],+ (1 if r["alternate"] else 0) | (2 if r["pixel"] else 0) | r["owner"],+ r["icon"],+ r["slot"], r["frame_max"]] for r in chars.rows])+ c += c_array("fnf_kind_t", "fnf_kind", [[ci, ki, an] for ci, ki, an in chars.kinds] or [[255, 255, [255] * 4]])+ c += c_array("uint16_t", "fnf_icon", chars.icon_rows, "[3]")+ order_ix = {"bf": 0, "dad": 1, "gf": 2}+ c += c_array("fnf_stage_t", "fnf_stage", [[r["bg"], r["front"], [list(r["feet"][k]) for k in ("bf", "dad", "gf")],+ [list(e) for e in r["extra"]], [order_ix[o] for o in r["order"]],+ round(r["scale"] * 10000)]+ for r in stages.rows])+ c += c_array("fnf_tempo_t", "fnf_tempo", charts.tempos)+ c += c_array("fnf_event_t", "fnf_event", [[t, typ, a_, b, cc, val, dur] for t, typ, a_, b, cc, val, dur in charts.events])+ c += c_array("fnf_chart_t", "fnf_chart", [[r["var"], r["diff"], 0, r["at"], r["size"], r["raw"], r["notes"],+ r["total"], r["speed"]] for r in charts.charts])+ c += c_array("fnf_var_t", "fnf_var", [[r["song"], r["kind"], r["stage"], r["style"], r["chr"], r["extra"],+ r["tempo"], r["ntempo"], r["event"], r["nevent"], r["chart"],+ r["ncharts"], r["flags"], r["length"]] for r in charts.vars])+ c += c_array("fnf_song_t", "fnf_song", [[cstr(r["name"]), r["level"], r["var"], r["nvar"], r["icon"]]+ for r in charts.rows])+ c += c_array("fnf_level_t", "fnf_level", [[cstr(l["name"]), [songs.order.index(s) for s in l["songs"]] ++ [255] * (4 - len(l["songs"])), len(l["songs"])] for l in songs.levels])+ c += c_array("fnf_glyph_t", "fnf_bold", [list(g) for g in glyphs])+ c.append(f"const uint8_t fnf_blob[{len(blob.data)}] = {{")+ d = blob.data+ c += [" " + ",".join(str(x) for x in d[i:i + 40]) + "," for i in range(0, len(d), 40)]+ c.append("};")+ (out / "data.c").write_text("\n".join(c) + "\n", newline="\n")+ print(f"pictures {sum(pics.bytes.values())} bytes {pics.bytes}; charts {charts.stats}, the longest "+ f"{charts.max_raw} bytes unpacked ({charts.max_notes} notes); blob {len(blob.data)}", file=sys.stderr)+ if args.list:+ root = ref.root.resolve()+ files = sorted({str(p.resolve().relative_to(root)) for p in atlas.opened})+ Path(args.list).write_text("".join(f"{git_blob_sha(root / f)} {f}\n" for f in files), newline="\n")+++if __name__ == "__main__":+ main()diff --git a/games/fnf/tools/fetch.py b/games/fnf/tools/fetch.pynew file mode 100644index 00000000..ab2dd6a7--- /dev/null+++ b/games/fnf/tools/fetch.py@@ -0,0 +1,56 @@+#!/usr/bin/env python3+"""Brings the Funkin' Crew's files the game is made from (tools/ref.txt: each file's git blob hash and path) from+their funkin.assets repository, at the commit below, into DIR: a sparse, blobless git checkout of just those files+(no audio, nothing else). A DIR that already holds them (a copy of funkin.assets) is only checked. Nothing in it is+run.++ python3 -I tools/fetch.py DIR"""+import hashlib+import subprocess+import sys+from pathlib import Path++REPO = "https://github.com/FunkinCrew/funkin.assets.git"+COMMIT = "724eba9de9e76761d9cefd52169926bc51c760a5" # the one FunkinCrew/Funkin d05659bb uses+LIST = Path(__file__).resolve().parent / "ref.txt"+++def blob(path):+ data = path.read_bytes()+ return hashlib.sha1(b"blob %d\0" % len(data) + data).hexdigest()+++def wrong(root, files):+ return [p for sha, p in files if not (root / p).is_file() or blob(root / p) != sha]+++def git(root, *args):+ subprocess.run(["git", "-C", str(root), *args], check=True, stdout=subprocess.DEVNULL)+++def main():+ if len(sys.argv) != 2:+ sys.exit(__doc__)+ root = Path(sys.argv[1])+ files = [line.split(" ", 1) for line in LIST.read_text().splitlines() if line.strip()]+ bad = wrong(root, files)+ if not bad:+ return+ if root.exists() and any(root.iterdir()) and not (root / ".git").exists():+ sys.exit(f"fetch.py: {root} isn't funkin.assets at {COMMIT[:8]}: {len(bad)} files differ, first {bad[0]}")+ print(f"fetch.py: {len(bad)} of the game's {len(files)} files, from {REPO} at {COMMIT[:8]}", file=sys.stderr)+ root.mkdir(parents=True, exist_ok=True)+ if not (root / ".git").exists():+ git(root, "init", "-q")+ git(root, "remote", "add", "origin", REPO)+ git(root, "sparse-checkout", "init", "--no-cone")+ (root / ".git" / "info" / "sparse-checkout").write_text("".join(f"/{p}\n" for _, p in files))+ git(root, "fetch", "-q", "--depth", "1", "--filter=blob:none", "origin", COMMIT)+ git(root, "-c", "advice.detachedHead=false", "checkout", "-q", "--force", COMMIT)+ bad = wrong(root, files)+ if bad:+ sys.exit(f"fetch.py: {len(bad)} files don't match tools/ref.txt, first {bad[0]}")+++if __name__ == "__main__":+ main()diff --git a/games/fnf/tools/import_reference.py b/games/fnf/tools/import_reference.pydeleted file mode 100644index f16d9de9..00000000--- a/games/fnf/tools/import_reference.py+++ /dev/null@@ -1,118 +0,0 @@-"""Convert the pinned, locally extracted official assets. No audio is read."""-from pathlib import Path-import argparse,json,zlib,hashlib,math,struct,re-import numpy as np-from PIL import Image,ImageDraw-from reference_art import ReferenceArt,read,bounds,flatten,multiply,IDENTITY--ROOT=Path(__file__).resolve().parents[1]-def main():- ap=argparse.ArgumentParser();ap.add_argument('--reference',type=Path,required=True);ap.add_argument('--quick',action='store_true');args=ap.parse_args()- ref=args.reference.resolve();source=ref/'original/funkin.assets';a=ROOT/'assets';a.mkdir(exist_ok=True);(ROOT/'output').mkdir(exist_ok=True);art=ReferenceArt(source)- chartfiles=sorted((source/'preload/data/songs').rglob('*-chart*.json'));tracks=[];kinds={''};char_names=set();stage_names=set()- for p in chartfiles:- d=read(p);m=read(p.with_name(p.name.replace('-chart','-metadata')));song=p.parent.name;variant=p.stem[len(song+'-chart'):].lstrip('-')or'default'- tracks.append(dict(id=song,variation=variant,metadata=m,chart=d));kinds.update(n.get('k','')for ns in d['notes'].values()for n in ns);stage_names.add(m['playData']['stage'])- char_names.update(v for k,v in m['playData']['characters'].items()if k in ['player','opponent','girlfriend']and isinstance(v,str))- char_names.update(p.stem for p in (source/'preload/data/characters').glob('*.json'));char_names=sorted(char_names);stage_names=sorted(stage_names)- levels=[dict(id=key,**read(source/'preload/data/levels'/(key+'.json')))for key in ['tutorial']+['week'+str(i)for i in range(1,8)]+['weekend1','sserafim']]- model=dict(refs=read(ref/'refs.json'),tracks=tracks,levels=levels,kinds=['']+sorted(kinds-{''}),characters=[],stages=[],ui={})- frames=[];palettes=[];blob=bytearray();sprite_names={};dedup={}- def sprite(name,im,ox=0,oy=0):- im=im.convert('RGBA');mask=np.asarray(im.getchannel('A'));bbox=im.getbbox()- if bbox:- im=im.crop(bbox);ox+=bbox[0];oy+=bbox[1]- else:im=Image.new('RGBA',(1,1))- assert im.width<=320 and im.height<=240,(name,im.size)- rgb=im.convert('RGB');q=rgb.quantize(colors=15,method=Image.Quantize.MEDIANCUT,dither=Image.Dither.NONE);pal=q.getpalette();pal.extend([0]*max(0,45-len(pal)));palette=[0]+[((pal[i*3]>>3)<<11)|((pal[i*3+1]>>2)<<5)|(pal[i*3+2]>>3)for i in range(15)]- if palette not in palettes:palettes.append(palette)- palette_id=palettes.index(palette);pix=np.asarray(q).astype(np.uint8)+1;pix[np.asarray(im.getchannel('A'))<96]=0- data=bytearray();offsets=[]- for row in pix:- offsets.append(len(data));at=0- while at<len(row):- opaque=bool(row[at]);end=at+1- while end<len(row)and bool(row[end])==opaque and end-at<127:end+=1- data.append(((end-at)<<1)|int(opaque))- if opaque:- for x in range(at,end,2):data.append(int(row[x])|((int(row[x+1])if x+1<end else 0)<<4))- at=end- compressed=name.startswith('stage/')or name=='menu'- if compressed:- flat=pix.reshape(-1);assert len(flat)%2==0;raw=bytes(int(flat[i])|(int(flat[i+1])<<4)for i in range(0,len(flat),2));data=bytearray(zlib.compress(raw,9,wbits=-15));offsets=[]- key=(im.width,im.height,palette_id,bytes(data),tuple(offsets),ox,oy)- if key in dedup:idx=dedup[key]- else:- idx=len(frames);offset=len(blob);blob.extend(struct.pack('<'+'H'*len(offsets),*offsets));blob.extend(data)- frames.append(dict(name=name,w=im.width,h=im.height,palette=palette_id,offset=offset,ox=int(ox),oy=int(oy),compressed=compressed,packed_size=len(data)));dedup[key]=idx- sprite_names[name]=idx;return idx- def resize(im,w,h=None,pixel=False):return im.resize((w,h if h else max(1,round(im.height*w/im.width))),Image.Resampling.NEAREST if pixel else Image.Resampling.LANCZOS)- anim_fail=[]- for cid,name in enumerate(char_names):- config=read(source/'preload/data/characters'/(name+'.json'));path=art.path(config['assetPath']);anims={};leaves_by_anim={}- for anim in config['animations']:- n=anim['name']- if any(w in n.lower()for w in ['death','cutscene','-hold']):continue- count=4 if n in ['idle','danceLeft','danceRight']else 1 if'miss'in n else 2- try:leaves_by_anim[n]=art.frames(art.path(anim['assetPath'])if anim.get('assetPath')else path,anim,count)- except (KeyError,FileNotFoundError,ValueError)as e:anim_fail.append((name,n,str(e)))- assert leaves_by_anim,(name,'no usable animation')- idle='idle'if'idle'in leaves_by_anim else'danceLeft'if'danceLeft'in leaves_by_anim else next(iter(leaves_by_anim));bb=bounds(leaves_by_anim[idle][0]);height=max(1,bb[3]-bb[1]);cx=(bb[0]+bb[2])*.5;foot=bb[3]- target=64 if name.startswith(('bf','pico'))else 58 if name.startswith(('gf','otis'))else 76 if name.startswith(('nene','spooky','darnell'))else 84- if name.startswith('sserafim'):target=76- scale=target/height- allboxes=[bounds(x)for v in leaves_by_anim.values()for x in v];scale=min(scale,126/max(b[2]-b[0]for b in allboxes),104/max(b[3]-b[1]for b in allboxes))- for n,leaves_set in leaves_by_anim.items():- ids=[]- for i,leaves in enumerate(leaves_set):- im,x,y=flatten(leaves,scale);ox=x-round(cx*scale);oy=y-round(foot*scale)- if config.get('flipX'):im=im.transpose(Image.Transpose.FLIP_LEFT_RIGHT);ox=-ox-im.width- if n==idle and i==0:im.save(ROOT/'output'/('character-'+name+'.png'))- ids.append(sprite('char/'+name+'/'+n+'/'+str(i),im,ox,oy))- anims[n]=ids- if'danceLeft'in anims and'danceRight'in anims:anims['idle']=anims['danceLeft'][:2]+anims['danceRight'][:2]- elif'idle'not in anims:anims['idle']=anims[idle]- model['characters'].append(dict(id=name,anims=anims,icon=config.get('healthIcon',{}).get('id',name.split('-')[0]),singTime=config.get('singTime',4),isPixel=config.get('isPixel',False)))- print('Character',name,len(anims),'animations;',len(blob),'art bytes',flush=True)- if args.quick and cid==2:break- for name in stage_names:- config=read(source/'preload/data/stages'/(name+'.json'));chars=config.get('characters',{});feet=[chars.get(k,{}).get('position',[x,885])for k,x in [('bf',990),('dad',335)]];span=max(1440,abs(feet[0][0]-feet[1][0])+650);s=320/span;left=(feet[0][0]+feet[1][0])*.5-span*.5;top=max(v[1]for v in feet)-190/s- im=Image.new('RGBA',(160,120),(28,23,42,255));missing=[]- for prop in sorted(config.get('props',[]),key=lambda x:x.get('zIndex',0)):- path=prop.get('assetPath','')- if not path or path.startswith('#')or prop.get('alpha',1)==0:continue- # These are enabled by the desktop intro script only, not during play.- if name=='sserafim'and prop.get('name')in ['backTablesCutscene','burgerCutscene','truckDoor']:continue- try:- anim=(prop.get('animations')or[dict(prefix='')])[0];leaves=art.frames(art.path(path,config.get('directory','shared')),anim,1)[0]- scale=prop.get('scale',[1,1]);scale=[scale,scale]if isinstance(scale,(int,float))else scale;pos=prop.get('position',[0,0]);m=(scale[0],0,0,scale[1],pos[0],pos[1]);leaves=[(part,multiply(m,mat),opacity*prop.get('alpha',1))for part,mat,opacity in leaves]- layer,_,_=flatten(leaves,s*.5,(left,top,left+span,top+240/s));im.alpha_composite(layer,(0,0))- except (FileNotFoundError,KeyError,ValueError)as e:missing.append((path,str(e)))- bg=sprite('stage/'+name,im);model['stages'].append(dict(id=name,sprite=bg,missing=missing))- (ROOT/'output'/('stage-'+name+'.png')).write_bytes(b'')if False else None- im.save(ROOT/'output'/('stage-'+name+'.png'))- # Native notes and receptor artwork, extracted without rescaling at runtime.- for direction,label in enumerate(['Left','Down','Up','Right']):- note=art.frames(art.path('notes'),dict(prefix='note'+label),1)[0];im,_,_=flatten(note);model['ui']['note'+str(direction)]=sprite('note'+str(direction),resize(im,22,22))- for state,prefix in [('static','static'),('press','press'),('confirm','confirm')]:- frame=art.frames(art.path('noteStrumline'),dict(prefix=prefix+label+'0'),1)[0];im,_,_=flatten(frame);model['ui'][state+str(direction)]=sprite(state+str(direction),resize(im,23,23))- for n,name in [('logo','logoBumpin'),('menu','menuDesat')]:- p=art.path(name,'preload');leaves=art.frames(p,dict(prefix=''),1)[0];im,_,_=flatten(leaves)- if n=='logo':im.thumbnail((240,104),Image.Resampling.LANCZOS)- else:im=resize(im,160,120)- model['ui'][n]=sprite(n,im)- icons={}- for p in sorted((source/'preload/images/icons').glob('icon-*.png')):- im=Image.open(p).convert('RGBA');size=im.height;ids=[]- for i in range(min(3,im.width//size)):ids.append(sprite('icon/'+p.stem+'/'+str(i),resize(im.crop((i*size,0,(i+1)*size,size)),20,20,im.height<50)))- icons[p.stem[5:]]=ids- model['icons']=icons- (a/'model.json.zlib').write_bytes(zlib.compress(json.dumps(model,separators=(',',':')).encode(),9));(a/'art.bin').write_bytes(blob)- (a/'art.json').write_text(json.dumps(dict(sprites=frames,palettes=palettes,names=sprite_names),separators=(',',':'))+'\n',encoding='utf-8',newline='\n')- report=dict(chars=len(model['characters']),stages=len(model['stages']),sprites=len(frames),art_bytes=len(blob),animation_failures=anim_fail,missing_props={s['id']:s['missing']for s in model['stages']if s['missing']})- (ROOT/'output/import-report.json').write_text(json.dumps(report,indent=2)+'\n',encoding='utf-8')- print('Imported',len(tracks),'variations;',report,flush=True)- for item in ['Funkin','funkin.art','funkin.assets']:- target=ROOT/'LICENSES';target.mkdir(exist_ok=True);(target/(item+'.md')).write_bytes((ref/(item+'.license.md')).read_bytes())--if __name__=='__main__':main()diff --git a/games/fnf/tools/ref.txt b/games/fnf/tools/ref.txtnew file mode 100644index 00000000..f698ffe3--- /dev/null+++ b/games/fnf/tools/ref.txt@@ -0,0 +1,572 @@+7b1257b76a544a828b3d8037d70926297d89b930 preload/data/characters/bf-car.json+a4e7e04bbb8bbd90f7cef3d8d895f883e6701236 preload/data/characters/bf-christmas.json+c3d4c2871544b16f39d511903a5106d658ec4a27 preload/data/characters/bf-dark.json+d7c4cc4cc85aee039c4e11489a0ef5d25b5e5f9e preload/data/characters/bf-holding-gf.json+1f20f6f286566aaf200a24399bc040aa5968b598 preload/data/characters/bf-pixel.json+d49941884acaa21b05783e57d13b005cf64c2792 preload/data/characters/bf.json+342e433d98db42808a367c84f8c137dba40b87ca preload/data/characters/dad.json+1bb2618444428f20487bbd0d1d8e6b0d484c7fd6 preload/data/characters/darnell-blazin.json+819019c0b1c4a91879be10b746108ccd624665f7 preload/data/characters/darnell.json+52d3cfc2a5a1d601bf33423641288580c15c8d3e preload/data/characters/gf-car.json+ae8fa1e6b868f8d10e534ad88e2b630e6a860afc preload/data/characters/gf-christmas.json+10a9b84e528b6fc03dcf8b58fe9cce2902b2f42a preload/data/characters/gf-dark.json+e7fe9b44b5d971fa25981e850d8d3d43dbcf4a7a preload/data/characters/gf-pixel.json+aba10debd26a2a915c1026487878ded807dbb3b2 preload/data/characters/gf-tankmen.json+878c8708e09acb2ceeda71a0cd0b91ab131d1a2d preload/data/characters/gf.json+45a2d5488085179707f26c3ef8d2aecf42741105 preload/data/characters/mom-car.json+9f3f4cfae20c74fa20836ca2970b9bfb21a02b8a preload/data/characters/monster-christmas.json+58b45b59804665c9690b2785d790c3912a17f764 preload/data/characters/monster.json+f956502d7faa6240aa579287ea1251a7b5c3e5aa preload/data/characters/nene-christmas.json+4475a95a1a8adb26482f4aaedc7d874d5015d73f preload/data/characters/nene-dark.json+fc9bb16cd5e1a60b6f5ca76fe6d43b808164becb preload/data/characters/nene-pixel.json+9a51da1ec7a8f8784c17bd02d7ec4dc76cd4df3d preload/data/characters/nene-tankmen.json+4e99cac7c1456b348f39a6a1c37bc81e019c024d preload/data/characters/nene.json+f8829c438926f8fdd20dfbda3b2d20ccedb8d983 preload/data/characters/otis-speaker.json+b1c17a0eda25dea02df58b9e7800c2406646e3c9 preload/data/characters/parents-christmas.json+fadaa27b3e3e84fc1b4e162aaecf619dd654edc9 preload/data/characters/pico-blazin.json+6845909cf594d6d12d6048482552d11a1e47fde3 preload/data/characters/pico-christmas.json+8814c649a17ad2ef327168da556456023df9d34f preload/data/characters/pico-dark.json+bc0b291d8f050f42fe293f09ddb41df739fd974a preload/data/characters/pico-holding-nene.json+467db89e368bfb3007a53afef41e137049a5e5a8 preload/data/characters/pico-pixel.json+0562491a35e546ced6fe1987d77112e38ae2287a preload/data/characters/pico-playable.json+359ceb1d7cfa00dc5ed6fffd76e316d7382edba7 preload/data/characters/pico-speaker.json+9caefb7e41f2fe23241cec318d740904f145105b preload/data/characters/pico.json+de7fe4d0634550afaa5ebbe6f84eaa93010598d6 preload/data/characters/senpai-angry.json+25f9d01ed6bfc29d795dbeb27e7ca9660b007dce preload/data/characters/senpai.json+21774d36fd6a31a58583ec9bc9e463d3d32d9762 preload/data/characters/spirit.json+47321fcaf0b7f0ff5094ac4bf47ceaf2bfa6ca21 preload/data/characters/spooky-dark.json+757ef7e53b709cafc3cd20b8bee011eb3a7efcfb preload/data/characters/spooky.json+72c2d2c9e944b6a8d7bc13b59646d20594fcd37c preload/data/characters/sserafim-chaewon.json+f497b509846ecf1d797edda94c8f9e36cab5fbfb preload/data/characters/sserafim-eunchae.json+1bcfe86ed920837eb85ebd2bbc6fe54a5e435b94 preload/data/characters/sserafim-gf.json+1bfd2a56d72813aec5f4193c6b915550474765d7 preload/data/characters/sserafim-kazuha.json+20aecf6c3ca50e1dad7f744fa82994b23dfab193 preload/data/characters/sserafim-sakura.json+63b85ac5a216da8a2983e179d6857204a294cf88 preload/data/characters/sserafim-yunjin.json+6392bc0170507bbad16cade19371180697a61d36 preload/data/characters/tankman-bloody.json+c980e7a28e23e7bf5d9c2b1368b9c4eae97abdb9 preload/data/characters/tankman.json+bbb744a223b0bd88ce1d61fab3b24e0d6f956006 preload/data/levels/sserafim.json+8b004e213e3b26a8ac03ae622aa94d783cabceab preload/data/levels/tutorial.json+00da3f488d82cae4adf0eda86e7250f904573336 preload/data/levels/week1.json+f6adfc1053e1dcd1ca05993c39dca4772828f0ae preload/data/levels/week2.json+494050c2dbbea9f713c4a70b52c5d30ca475ec5c preload/data/levels/week3.json+16f6bce7c6adb84e427bb0f61a485f6921168cb3 preload/data/levels/week4.json+f1d9f504da242bf899a823635060916bb02723d6 preload/data/levels/week5.json+16d51229be72a8b938fed1656d48a559de1b9c71 preload/data/levels/week6.json+5634c3b0f06b1308d38e078b770c3e862b296cea preload/data/levels/week7.json+15203d12e456e7a79b1335256713bf88df195959 preload/data/levels/weekend1.json+9f82238182a94a76e1b3f0067cc006e88277040b preload/data/notestyles/funkin.json+f4cb51a368f964eface1fb193c3e12aab042a681 preload/data/notestyles/pixel.json+72a6dd9967866ee89fd29f8dc78b8ae634641547 preload/data/players/bf.json+e4bfb096b2aaf07bc75bdd921baf88b1c6d5a366 preload/data/players/pico.json+a9cf6e6c767667033a5b7399adf41f201ed5ec62 preload/data/songs/2hot/2hot-chart.json+c01283a3b81140fcb80874cc67dd3321638c86d0 preload/data/songs/2hot/2hot-metadata.json+cd847762d06fbe20f743da37452495ac48e3706a preload/data/songs/blammed/blammed-chart-erect.json+2a01a99efc946aca757888c391977080db574afa preload/data/songs/blammed/blammed-chart-pico.json+fabf10538831c08f1bb91f31ff4320f2db4b8351 preload/data/songs/blammed/blammed-chart.json+9388ef84a0f0d096b3afd33bd6d45797a34c5e1f preload/data/songs/blammed/blammed-metadata-erect.json+7320a640ac445d1f2c24186f567cf007a71b441c preload/data/songs/blammed/blammed-metadata-pico.json+4f77d0b00f53589001949f592c7722176be3fad9 preload/data/songs/blammed/blammed-metadata.json+317a41b539b2bf0c94a76391d735beefc88104a0 preload/data/songs/blazin/blazin-chart.json+abe9abee6be24d8074049cea1c21eb0a73e8fb75 preload/data/songs/blazin/blazin-metadata.json+2906c0ebd82657eb45d5ed682e311bee6331ff60 preload/data/songs/bopeebo/bopeebo-chart-erect.json+1a95fe991b945baf97aea9405e148c8262d6eb9e preload/data/songs/bopeebo/bopeebo-chart-pico.json+4f2eb0de72385c0df98da6060f4503570b3908fb preload/data/songs/bopeebo/bopeebo-chart.json+fc82c17201f8c22de83b423803bd658daed90116 preload/data/songs/bopeebo/bopeebo-metadata-erect.json+bdc86ace8bca1fd96d8818ba9f147da072de079a preload/data/songs/bopeebo/bopeebo-metadata-pico.json+273fb186b07ed6406f6f889603b39af7e2c08fa9 preload/data/songs/bopeebo/bopeebo-metadata.json+30bf5018d5bdc0c3cac955d0d415b07f3a27249f preload/data/songs/cocoa/cocoa-chart-erect.json+f2aaac2a83754d6743e7733dc604b014ad3a92c9 preload/data/songs/cocoa/cocoa-chart-pico.json+33e43e3e826008d2b3401216774b93e7dd84f884 preload/data/songs/cocoa/cocoa-chart.json+9964a4baeeb639f0609f8acf286b1bdf08cafee9 preload/data/songs/cocoa/cocoa-metadata-erect.json+e772b83ae593086d706869c8edc4655b01433d19 preload/data/songs/cocoa/cocoa-metadata-pico.json+5c3d76e21aa3314d7339b93a1fcd95ddeb6e5968 preload/data/songs/cocoa/cocoa-metadata.json+d5de8043ebb36b4d3db416772ee222c85fa1e591 preload/data/songs/dadbattle/dadbattle-chart-erect.json+be8a9baef37ac346392541350e977418c494fcc9 preload/data/songs/dadbattle/dadbattle-chart-pico.json+d8448ccd1e7c544b9165869ec6f7bad504888952 preload/data/songs/dadbattle/dadbattle-chart.json+d012473641603a34784f2a49ad4de886cfb0c7e8 preload/data/songs/dadbattle/dadbattle-metadata-erect.json+70794d9a88b9faaa0010da12e19d07980d925ba9 preload/data/songs/dadbattle/dadbattle-metadata-pico.json+08465ae960873dea6699c7f1b7e0772d53c4c374 preload/data/songs/dadbattle/dadbattle-metadata.json+af0c73080d2916f51d462aaa63f4d4448b3308c4 preload/data/songs/darnell/darnell-chart-bf.json+4264a0b70072337c1e9fa4c3d19e9487caac97a6 preload/data/songs/darnell/darnell-chart-erect.json+b8f31e35e84ebe23d79167e0d8df6fd4c836f19b preload/data/songs/darnell/darnell-chart.json+0f6fe4ce4af002ecd82e6dcd97ba65660b841ea8 preload/data/songs/darnell/darnell-metadata-bf.json+1bcc871ca4cdfe23842b619bb72a77677add5d12 preload/data/songs/darnell/darnell-metadata-erect.json+77b3490ff532f19463dff0b989b38c7d0085ffc9 preload/data/songs/darnell/darnell-metadata.json+d47cc2c871ea4f41bf78371206a3d7469fe86bac preload/data/songs/eggnog/eggnog-chart-erect.json+3852974c466a545e785d68c0a30d20862d8cacae preload/data/songs/eggnog/eggnog-chart-pico.json+d1ba9482d95d031d210703b33b37378da3b5e95c preload/data/songs/eggnog/eggnog-chart.json+e3cf3b45cdb108e1465eca459b3b9640e83870d5 preload/data/songs/eggnog/eggnog-metadata-erect.json+0ebcb2044e4489590944b54e2d04b58e7eb8c118 preload/data/songs/eggnog/eggnog-metadata-pico.json+a4ca421113a04b37e9bb0c736aab443ae6de7286 preload/data/songs/eggnog/eggnog-metadata.json+3c9149c8de104085e21bf4c20a1137bd38173fec preload/data/songs/fresh/fresh-chart-erect.json+cc6761be3ace505e2c471db3c7ca8e394c833243 preload/data/songs/fresh/fresh-chart-pico.json+c34e8f200df028daf47ce994938118f28875b8bc preload/data/songs/fresh/fresh-chart.json+1053b7835c6b2d8bb3f7c44d33831859550839ce preload/data/songs/fresh/fresh-metadata-erect.json+232bd252a426b63fda7f0f931eacd5a76f04dc82 preload/data/songs/fresh/fresh-metadata-pico.json+f9660a8f22114a4861e11290e7359f52fd054a07 preload/data/songs/fresh/fresh-metadata.json+7bb5052e4ff5fe7b53f22519663dff1b19035c63 preload/data/songs/guns/guns-chart-pico.json+df4f23c86fcfbc78b75b1f3bcdb2062df5020d44 preload/data/songs/guns/guns-chart.json+47cadc1ee9a298fd9b49d4a925bc8fa9eb71b1a3 preload/data/songs/guns/guns-metadata-pico.json+a95f35071721a8ce226b6191f2883b41b95c53a9 preload/data/songs/guns/guns-metadata.json+6f68a957377d9655ed987b9325c8a4e3b2591365 preload/data/songs/high/high-chart-erect.json+a661a0d8e04be5c64f5a5fc49840d73275adf66e preload/data/songs/high/high-chart.json+3e26b533ef11cbb55fbe8ebadc6434df5949844e preload/data/songs/high/high-metadata-erect.json+559fa241a9a994bdfbaeb5c847d9057c7ab667f6 preload/data/songs/high/high-metadata.json+8f4831c2b6b0a2f4ca2f432eff7008d24b5d0e1a preload/data/songs/lit-up/lit-up-chart-bf.json+e503c6d76a1fc0fd1ad66c4154ef7319afc409a5 preload/data/songs/lit-up/lit-up-chart.json+0246e6ef02d08e6f745fb02093f1a10a81965149 preload/data/songs/lit-up/lit-up-metadata-bf.json+2d49f6249fea80f42e0920cd4bb07c644633dcc4 preload/data/songs/lit-up/lit-up-metadata.json+74cb4f458a61c3e35cc1819136f5a7a3e3dc2bf5 preload/data/songs/milf/milf-chart.json+717f9f8e61c1230eb7936ec23fa2043ae66ef2e4 preload/data/songs/milf/milf-metadata.json+6068612a4a6f65b5087dcbf21b097b85269eddc9 preload/data/songs/monster/monster-chart.json+ed302604fbcc9ad99413b7abe6709768d28abdef preload/data/songs/monster/monster-metadata.json+50559630577ef59f4cb21c8b019c417b47bccbfd preload/data/songs/philly-nice/philly-nice-chart-erect.json+dc1093d5da238b914d6b42688b566a24dd8ac326 preload/data/songs/philly-nice/philly-nice-chart-pico.json+821f2084f78742572589b3040194aa96fbed05fc preload/data/songs/philly-nice/philly-nice-chart.json+a27365b50c77990ffead0a1f97c8736d3b031f3e preload/data/songs/philly-nice/philly-nice-metadata-erect.json+d10949f8fb8b59148eede9cbe3856f9f94a9bfc5 preload/data/songs/philly-nice/philly-nice-metadata-pico.json+aba85c9d7c2bf8067d587d85d0a1092145caa13d preload/data/songs/philly-nice/philly-nice-metadata.json+e31f7c1d8426cb80d53f4ec2634f785c5267ccf2 preload/data/songs/pico/pico-chart-erect.json+5ab397a086a41af5b07abe30bd9a403cdf66164a preload/data/songs/pico/pico-chart-pico.json+ff3701d8675aeb0e1f25cc22fd7219707c5263da preload/data/songs/pico/pico-chart.json+baa4c9aed91f29b4eacdb10e23e95ff6343a51d9 preload/data/songs/pico/pico-metadata-erect.json+080c736b90fe813864ce6ad538a64e65e2598ea3 preload/data/songs/pico/pico-metadata-pico.json+aaaf135b64adeb0026aae6797254a62c4dd3712f preload/data/songs/pico/pico-metadata.json+766b77001094cbfa3f679ce3070d4fb12a6ca818 preload/data/songs/roses/roses-chart-erect.json+9521f955f303d91809d46795603580572631d678 preload/data/songs/roses/roses-chart-pico.json+c287d66c21fe3c2d81929001e0c2b97779bc31b1 preload/data/songs/roses/roses-chart.json+65d90d4afd893b1fa938eab51883fec64a877b91 preload/data/songs/roses/roses-metadata-erect.json+9ac9406cd834ed9f80a0ce167e48dfd8fc70b599 preload/data/songs/roses/roses-metadata-pico.json+510b49c4f4e49f56db68aea71386bdc2ab58c620 preload/data/songs/roses/roses-metadata.json+183ab4aeb6527f05fc451cd048bec5ae60fdbe10 preload/data/songs/satin-panties/satin-panties-chart-erect.json+75533a2338c0916a6de00fd5c72079deec642a0b preload/data/songs/satin-panties/satin-panties-chart.json+a9f2368b5cabc67fbfb681831a11b0dd6f3912a6 preload/data/songs/satin-panties/satin-panties-metadata-erect.json+4bfd21f0c4661c249c8d0861e0d53af3fe62dd8f preload/data/songs/satin-panties/satin-panties-metadata.json+88e81b5e246b5aab1b58cc7beb350a7ae83a2f4e preload/data/songs/senpai/senpai-chart-erect.json+bdedf9dc6d5f10bd85fdff2e7f08962b9bfb3c71 preload/data/songs/senpai/senpai-chart-pico.json+fd953b7a5c88a83a310d42262615b0fa6469a12b preload/data/songs/senpai/senpai-chart.json+f80242cab212f26d2528de36e7d2a06ee71dd44d preload/data/songs/senpai/senpai-metadata-erect.json+4424db3ecd19cc87e8d95a1552761dccfd71395a preload/data/songs/senpai/senpai-metadata-pico.json+b73ccd1398837f9eafbb46252d97f00155e8464e preload/data/songs/senpai/senpai-metadata.json+fd671dfcd4df0198151bdeda0e71e21d09fb0661 preload/data/songs/south/south-chart-erect.json+13fda7e21c391e56565e946dc4eac538cb07f0e1 preload/data/songs/south/south-chart-pico.json+b9855869b70c7934703895eff568ea9ebd0a6215 preload/data/songs/south/south-chart.json+0cc370f30ba78e777e6c0c7f3dfd940037305eb4 preload/data/songs/south/south-metadata-erect.json+22be78a7fab3729689a86b19d39ce83fc0d38378 preload/data/songs/south/south-metadata-pico.json+bc87411ba19ec8d4925922f4943bda56b7f7b5f3 preload/data/songs/south/south-metadata.json+c8db2845fe0831c71f35b924401512de8f38a50c preload/data/songs/spaghetti/spaghetti-chart.json+a9f12234209e1d6d6f95fcd495f8abe6f5633795 preload/data/songs/spaghetti/spaghetti-metadata.json+7416843ff7dfe2efb12f2b6e0bd98f55987655ef preload/data/songs/spookeez/spookeez-chart-erect.json+8ff8be88e084f4d36424fa9417d75afad6d81fed preload/data/songs/spookeez/spookeez-chart-pico.json+0cbdac16e610abb3491ecff89196d205dac4da85 preload/data/songs/spookeez/spookeez-chart.json+00983d280eb581989d1b8a053fd2e7b32853f41e preload/data/songs/spookeez/spookeez-metadata-erect.json+d557b08fd4dfed40c51746e71d32dcd6db856770 preload/data/songs/spookeez/spookeez-metadata-pico.json+bc382c7b40261a2d3bfe7b4492a4c6a319def605 preload/data/songs/spookeez/spookeez-metadata.json+2ce31cf790d6d579084030f603738af84b6d0e06 preload/data/songs/stress/stress-chart-pico.json+f41ac97156fdd27f9d2a3196b25bcae5c1b26a27 preload/data/songs/stress/stress-chart.json+ee68edb8a2e5fa53d72a2bb001db4d4efb714631 preload/data/songs/stress/stress-metadata-pico.json+18700e00f71306e9ae38a0bdaab30f549ba34d8c preload/data/songs/stress/stress-metadata.json+b10dc4f16556c034dd434c8fecbf420afb96633a preload/data/songs/thorns/thorns-chart-erect.json+eb7935840011e1b14522fc5514aa67f65b73bf05 preload/data/songs/thorns/thorns-chart.json+f572257af16b92df525ea0391c80652b2c28ac4a preload/data/songs/thorns/thorns-metadata-erect.json+e908f55bc5a3d726808d9ec4a9ed9098cac629b8 preload/data/songs/thorns/thorns-metadata.json+5c7fed61dd5acc3c9531050cf2587ebcaab61883 preload/data/songs/tutorial/tutorial-chart.json+c1171a746bb0ff8d8ca7b68e3fe421b12d5530cf preload/data/songs/tutorial/tutorial-metadata.json+1b88ac6db4d956dea65ade22fa76b3b54c457018 preload/data/songs/ugh/ugh-chart-erect.json+adf7a862f02e45c9dce750e20556b2549068809b preload/data/songs/ugh/ugh-chart-pico.json+1f044c67601c996f1dece438bc7f68207fc0d6fb preload/data/songs/ugh/ugh-chart.json+8eeb2f27bfda3e5e8984d4e76c9c11ee3fa0bbc6 preload/data/songs/ugh/ugh-metadata-erect.json+7fbe97782ed1a85d63bbe6a423c6e852abfbcfc5 preload/data/songs/ugh/ugh-metadata-pico.json+c68ed0d0eb9017e91462d358707537c5fa0a1f23 preload/data/songs/ugh/ugh-metadata.json+54cd736ea718995ec25536bd46d4be597b657fe6 preload/data/songs/winter-horrorland/winter-horrorland-chart.json+3036978d892275b9278496467d5f34f4bd60ff85 preload/data/songs/winter-horrorland/winter-horrorland-metadata.json+36b23862861286c353ed1297df4d066745d82b35 preload/data/stages/limoRide.json+e66ed2153bac40b2a80af9d2d6891ec3adf46511 preload/data/stages/limoRideErect.json+cb5fdf2ba61f2eea5a6921d1a2adfaa6d1ce0ff6 preload/data/stages/mainStage.json+4862bbc2d460037d34724bbade1d68560da2293e preload/data/stages/mainStageErect.json+a0bb173ca23d420876f7fb2ba94571bf462d4415 preload/data/stages/mallEvil.json+67ac2ace41ba18f6ce2fd18a65f37073c879e056 preload/data/stages/mallXmas.json+72a66e211945972a27776b8af0cf7486101a6c38 preload/data/stages/mallXmasErect.json+a61846d8d4fb6ce4248c2367145ff3a6924fe033 preload/data/stages/phillyBlazin.json+e5de132d914e1fc0bac38f8466df34a3d712ea37 preload/data/stages/phillyStreets.json+39cc7205b1bbfa0baddbe7b3a016f1a963779bcb preload/data/stages/phillyStreetsErect.json+fe52f6b0396614ac1af5dd891edfa9bc87cc6bc1 preload/data/stages/phillyTrain.json+a580e0c54ea5914d61f52c5a9b163b2262c0fa8c preload/data/stages/phillyTrainErect.json+491198044714f86c5b87a3c19820dd5e8cbbd569 preload/data/stages/school.json+425a065c546a178a75b32f9c20a939906feeabf9 preload/data/stages/schoolErect.json+6cfa579d767741eebc26529a976e0df252cb1f56 preload/data/stages/schoolEvil.json+7645c1ecb7fbd605fdb1a604aa6acfbccf501245 preload/data/stages/schoolEvilErect.json+8f92e3a3c6234e4b7a8156e2572cbb05aef2ed41 preload/data/stages/spookyMansion.json+43ff86081074b8bf5481d8a62f577b36b2df3dcf preload/data/stages/spookyMansionErect.json+587b51a4af31e09fdb65c48dd97b860c95e0d383 preload/data/stages/sserafim.json+c5458f69949b38036e939c194e640505d9eab262 preload/data/stages/tankmanBattlefield.json+e761dbec5fb18e6990a53bfd002d0baf9360b399 preload/data/stages/tankmanBattlefieldErect.json+3989554802b77893a4ed8180292cd8c353dea1cb preload/images/fonts/bold.png+00982dad5b23e694f2a519479fe9e9fb1b7695f0 preload/images/fonts/bold.xml+3af3314fced55f3907c3f6ff778cc70b47fe03ce preload/images/fonts/default.png+e4bc98eb571f38fa60379d4b62fdb2bf91cf5491 preload/images/fonts/default.xml+096d090b357e555a890295e15833d269ec3f73bb preload/images/gfDanceTitle.png+1a046a5719a347b867a74fd03604886c149690cb preload/images/gfDanceTitle.xml+ad112170ecd8506d562efaa8b9c1ffd1dea45675 preload/images/icons/icon-bf-pixel.png+065f2a8e0f854de8fa783dfc2756a98588ce5421 preload/images/icons/icon-bf.png+7bd414ba48ccbde725bf00becb37841649a8e8c9 preload/images/icons/icon-chaewon.png+33a54b11429870860b4f2c0e2b64fc720442b875 preload/images/icons/icon-dad.png+a08bda4bbf6d9f1e492cc6fb3498a1b231451d27 preload/images/icons/icon-darnell.png+3cc64d74972e8c1551ca9344346c837b0cb6dd2d preload/images/icons/icon-eunchae.png+965356ae10917ab5c8ca7b5bd3cc3e0365547b48 preload/images/icons/icon-face.png+703bd24d52e86259e26b2ddfe93a957e932b14a0 preload/images/icons/icon-gf.png+fd2b43fce614c44b31431815e3362fc7a1671580 preload/images/icons/icon-kazuha.png+201c37a616e430365da91a358fc31f76d059235b preload/images/icons/icon-mom.png+dbc2117f7df0302ede2c19fd9192944495f9e898 preload/images/icons/icon-monster.png+a20bf37ee104a976566e9d238fbf948fc27b6fb4 preload/images/icons/icon-parents.png+027eae1511ea253d508140f02abde4c692058805 preload/images/icons/icon-pico-pixel.png+185759aa6492313ea75ae179fc65dc58bbd61a21 preload/images/icons/icon-pico.png+b27ab6f5949338917fa72c6474894093012193ae preload/images/icons/icon-sakura.png+e6043999184afecc2ed053c23337ec6c6fa8c01e preload/images/icons/icon-senpai-angry.png+dde5803191ce1c93acea7fb5acd71963acb1c2fd preload/images/icons/icon-senpai.png+1b86e81e1350e472e52b6103b34576f7d23f1ca4 preload/images/icons/icon-spirit.png+62a53e9f5399f4e62f491cc6f0beb4db269f883b preload/images/icons/icon-spooky.png+fac050b92a3721416ba7a0dca7d4c9d28f0cf3d7 preload/images/icons/icon-tankman-bloody.png+412378e38c7ca897ab5f971d80990b4ff223e9d3 preload/images/icons/icon-tankman.png+e8f8c33bbfcfefaeb917d7b88140f7462088251f preload/images/icons/icon-yunjin.png+14479df32687389942636e0243563a91b96e0656 preload/images/logoBumpin.png+9dea8d3ab6fd5cc32e1207d25ae4d16776dac515 preload/images/logoBumpin.xml+35458e804c23987f1255155ced4f1b2869eae8f9 preload/images/menuBG.png+0f923397330482aff6f8160be22fb0827df994ef preload/images/menuDesat.png+eba705cdc41baf33d1dccdbdc9e636fe37596878 preload/images/ui/popup/funkin/bad.png+a88f820cfd660fb2087ef0f9beed094af8391505 preload/images/ui/popup/funkin/good.png+e1c74e62b8c8b8eff48ca49841325c34e96f4239 preload/images/ui/popup/funkin/num0.png+fcaac3c216a26e36ec6cae5eb673a371e840e18e preload/images/ui/popup/funkin/num1.png+cd0f34fd509bd976fd42a0244d5406c5614ee311 preload/images/ui/popup/funkin/num2.png+754c5f90cc7127c0eba76fdaa25d950ca99840b5 preload/images/ui/popup/funkin/num3.png+c7187ce442f0780add52f0a4035f361167512a77 preload/images/ui/popup/funkin/num4.png+313f05345c0099ca9ac97d4ac4100ce01395c8ba preload/images/ui/popup/funkin/num5.png+59599d0bffd4b60722fc0f0ce0cd1e48360d108a preload/images/ui/popup/funkin/num6.png+7090cc0247396148cb85d46a7c0cf4b35cde7843 preload/images/ui/popup/funkin/num7.png+0fc0a114831d30543a3a21ca9711bfac032886e4 preload/images/ui/popup/funkin/num8.png+a59dc0159ab2f27b513f1e5fe78798bea75d2d2b preload/images/ui/popup/funkin/num9.png+8603b7bc567e296e76797105fffdcbc943a86c0a preload/images/ui/popup/funkin/shit.png+e6a7c617fd9ffd3c2c027af3059bc8ad15e13e95 preload/images/ui/popup/funkin/sick.png+777214e3b09e8ca8518c8dca0415ff123ed0e3fd preload/images/ui/popup/pixel/bad.png+302986dc9b32e9619c4b81f215d1a9d225a93231 preload/images/ui/popup/pixel/good.png+d002c36cf000bccebf938322c99363b19b5a569e preload/images/ui/popup/pixel/num0.png+d7b9f424f88cdcf699a4ebd091b8b83a0c19debd preload/images/ui/popup/pixel/num1.png+29396f94d1a5473b699c49bf6e3132b90682db29 preload/images/ui/popup/pixel/num2.png+00dde82eb6c1887e9a50ec950023b5a3fb83dc40 preload/images/ui/popup/pixel/num3.png+d3be8b8cbfad365df704b2e85c851a39c21a907e preload/images/ui/popup/pixel/num4.png+cde2a204003f01782affbb47bf1f2a5a6aceeb04 preload/images/ui/popup/pixel/num5.png+cea53eb9cc4b1159b8e37856418502a107eed38d preload/images/ui/popup/pixel/num6.png+f43639e7086f9cadbd83028669266c00df1404e4 preload/images/ui/popup/pixel/num7.png+63531c584c5486df577a9ca56c660966194396cf preload/images/ui/popup/pixel/num8.png+91b05b66d389558bbbe618f341fb36fdc01c0b77 preload/images/ui/popup/pixel/num9.png+46f415ebd6060bb22159189ffc0fa71fd7a64ba3 preload/images/ui/popup/pixel/shit.png+3d7de62442b2e90a0c0820495c9b21dae79fd494 preload/images/ui/popup/pixel/sick.png+98e6a4b2f0d7d607e06e6a68312d6f4a96c23ea6 shared/images/NOTE_hold_assets.png+0b4db7f5c453014ee16ca2059e43bf3670c0e92f shared/images/characters/Pico_Censored.png+e8b39d63caab5bdffa6b788fe2fd79125b4c3ae0 shared/images/characters/Pico_Censored.xml+732a72cd78c4ee834252726b69c2b048cbdf9589 shared/images/characters/SpookyKids.png+757d3fda478ef5599e106485c656a93de20bedce shared/images/characters/SpookyKids.xml+4dee54f4b2a12ff292a88ac004a01ba794e6c017 shared/images/characters/bf-car/Animation.json+f9fd0eb038e4ac6129f4d7692f4b24c95b014286 shared/images/characters/bf-car/spritemap1.json+932d65ce4aaf85f9cd65d3635ebe2b06598677d9 shared/images/characters/bf-car/spritemap1.png+259d2464d42f5ddd8a10865e80b63f29a2eb5073 shared/images/characters/bf-dark/Animation.json+61565d1169616ff8836fe9749d6ec76a767bebf9 shared/images/characters/bf-dark/spritemap1.json+cbf86aaeda834ee4970c06995101814dc733193b shared/images/characters/bf-dark/spritemap1.png+590c0488b6dcf50018c6b2b292eb4f3cf4bb8070 shared/images/characters/bf/Animation.json+bfbc40cf468a51259e2a94a6f38cfdd74212c734 shared/images/characters/bf/spritemap1.json+556d44cccd43028815eac3245c441027b0c73939 shared/images/characters/bf/spritemap1.png+0549ae76639659f6bfa5a683dcffe5a8ca34dc87 shared/images/characters/bfAndGF.png+1175695a38fd58daa02a83a631d7533bc047d996 shared/images/characters/bfAndGF.xml+006ac41ab69c228a6423ea27c78138ea67719321 shared/images/characters/bfChristmas.png+edcf83f8240d1b45542e24db7a98033b1f1ea210 shared/images/characters/bfChristmas.xml+0e9e2ebcc085fe4c107b91ec979a5a4e28d7990a shared/images/characters/bfChristmas_Censored.png+9609f53578310b317bb2e7898533936054b9e4d1 shared/images/characters/bfChristmas_Censored.xml+c3cbeb3734c7a15b0bf871cfbb8d85aee9eae65f shared/images/characters/bfPixel.png+244779a685916b405ac4240a6d505451837d31b5 shared/images/characters/bfPixel.xml+8cf41ce0bb9abd2a8a73508e6a83a24111bbdf11 shared/images/characters/dad/Animation.json+0874415f302fb8b15191a9df211209eea92d7bac shared/images/characters/dad/spritemap1.json+9f75de7aa2d23275e05d3df6ce416d47de4eea76 shared/images/characters/dad/spritemap1.png+2bba55530f4ca694f4a1fcd514793fd33e06bf0c shared/images/characters/darnell/Animation.json+61b8c35ad5af5125f5bf02a3b53472efaf46b4b1 shared/images/characters/darnell/spritemap1.json+a2e21f5a09881541394be44f4fdcff49ea404546 shared/images/characters/darnell/spritemap1.png+78449006105ac3275b0d940ae6fb071f1e2a8095 shared/images/characters/darnellBlazin/Animation.json+2254b89c501298bf2d6d8ba2ea6d03fbcec45d03 shared/images/characters/darnellBlazin/spritemap1.json+67c3e1d14b336a65daa61cc88133e77b6c2206e5 shared/images/characters/darnellBlazin/spritemap1.png+16b73add41287609b9d81c5780802fe87540bf7f shared/images/characters/gf-christmas/Animation.json+3c4aa0b9ec3c48ea8a42b2740c91066b2e1ba1dc shared/images/characters/gf-christmas/spritemap1.json+b7f5626ec79f235f4e3871270a6b99fd2596589a shared/images/characters/gf-christmas/spritemap1.png+fcb8ab733b9ea8fb49173d7b371ac17b3f24fe0f shared/images/characters/gf-dark/Animation.json+fcd3a98b5ae16add121a0e682494e448f0fd83fd shared/images/characters/gf-dark/spritemap1.json+34727771ed9300df29fdc54e97034a78e2d89273 shared/images/characters/gf-dark/spritemap1.png+6917329fcb6755d15d46044ddd8e2362170e46bf shared/images/characters/gf/Animation.json+82bf5630970988ccf1352d37aff17d0a9f87547b shared/images/characters/gf/spritemap1.json+be32ffb6df606bbaa34a8dbdcf9dd1df3d7a74ad shared/images/characters/gf/spritemap1.png+4905bfa4d5001ef58ceec969dd724b552eb62b66 shared/images/characters/gfCar/Animation.json+a465b8bfba0cb78ee074c6716f27fada75a0c1b0 shared/images/characters/gfCar/spritemap1.json+ac12d24fa0dae2fb65c000594ab8647fbeeedb39 shared/images/characters/gfCar/spritemap1.png+22c984c8a40df78f15c329f803d03a54cea278b0 shared/images/characters/gfPixel.png+c2f2e8b55e116042ae4a652580b6530e198b0561 shared/images/characters/gfPixel.xml+445420642ab12597bbca625bc188b529c77f8bde shared/images/characters/gfTankmen.png+e6218f29b16e727cc78186c49a29d210518470ee shared/images/characters/gfTankmen.xml+6e9cf352a01d59e74cc05b0290107525ebca343f shared/images/characters/momCar/Animation.json+987a95316f2b5fefeaae7959c062a4f36fec1711 shared/images/characters/momCar/spritemap1.json+a26af5d7be3335301fe656e491e255fd5883c644 shared/images/characters/momCar/spritemap1.png+0810216147ed42e2c9d93a874bbdb97a4765845a shared/images/characters/monster/Animation.json+376b032bfbb8be0bd30bb15a2b49aeaca14ba46d shared/images/characters/monster/spritemap1.json+72159e95107e69505cea7f5a032706f4b327a992 shared/images/characters/monster/spritemap1.png+18023cc198b4bc842b6787a3c9d535bef01bc1c3 shared/images/characters/nene-christmas/Animation.json+678e92b746912d6571ac3391875eb15d841a29a5 shared/images/characters/nene-christmas/spritemap1.json+6570dcc5968b06498baee8d51eb694eb7ed6cd87 shared/images/characters/nene-christmas/spritemap1.png+6eb37594ee74ced6b0817a5f858f50c9003d7515 shared/images/characters/nene-dark/Animation.json+c0d20b653a13a4d84c1194cf400f64f56cb375c3 shared/images/characters/nene-dark/spritemap1.json+7e3d04884ae44cf4a7db10d413ae3f5d847be5a1 shared/images/characters/nene-dark/spritemap1.png+4a5fbad936f13c0b9d584010d04a36298f45c105 shared/images/characters/nene/Animation.json+2389b6ab259d042536c1a87e6d0e2344d5ae7d50 shared/images/characters/nene/spritemap1.json+257a4ed624d9a695ea447dd27ac5a010737af3be shared/images/characters/nene/spritemap1.png+0289ed4372e2d0ee11902ac43305dd158954914d shared/images/characters/nenePixel/nenePixel.png+ce95eee7f530899e0c36fa37b5c182b319393aaf shared/images/characters/nenePixel/nenePixel.xml+aa8d40b88c20c39d9824ceb59b4f993661d8ffaa shared/images/characters/otis/Animation.json+d9a891b24f0d041e2e86078122f658e687376e35 shared/images/characters/otis/spritemap1.json+fa3d67f097d8833b6c86d7e42876a8d6d1ef1ebb shared/images/characters/otis/spritemap1.png+eced25a2a9cc9418c0955f977c1cb18108a4c3c5 shared/images/characters/parents-christmas/Animation.json+7deb95c0f1e022f7393219a52522bb729fb2b672 shared/images/characters/parents-christmas/spritemap1.json+c8955d23c7210a60be55381f3b7a26f093ce8b4e shared/images/characters/parents-christmas/spritemap1.png+62f99e9187970628597ffd12da890b26768f826f shared/images/characters/pico-christmas/Animation.json+dfb3174448a6e69311482b8547d13600f2de2170 shared/images/characters/pico-christmas/spritemap1.json+04f4d8e70266b3dca40a1ba0166f0855e48866bc shared/images/characters/pico-christmas/spritemap1.png+a22257961280541109e5c0739afb0eedd7d254c1 shared/images/characters/pico-dark/Animation.json+6cb17fd55a6bd006165688dc382cb57e5a079f27 shared/images/characters/pico-dark/spritemap1.json+5c626ff73104ccdbf49e36f697742807d5fa7de9 shared/images/characters/pico-dark/spritemap1.png+596aae18ade136ad0f0e043167022199aeda0f9b shared/images/characters/pico-holding-nene/Animation.json+cd02b83ad0cbcc742c6243be64c2eab27e77d38d shared/images/characters/pico-holding-nene/spritemap1.json+2766eb8019618fe84cab3129afd24755cd61cbcb shared/images/characters/pico-holding-nene/spritemap1.png+2a796eaddbce69d5078f49b5920da8c1eac76451 shared/images/characters/pico-speaker/Animation.json+105725e939295830b72ad004c93497b3729f7ca5 shared/images/characters/pico-speaker/spritemap1.json+42b64b5ae2ae470e023e018b3ec4271133ad8d9d shared/images/characters/pico-speaker/spritemap1.png+69caab3dd6e465a3b784f746808ff06f8519bfcb shared/images/characters/pico/basic-animations/Animation.json+530a548ec538bf7782839133210ec57bd16d33a3 shared/images/characters/pico/basic-animations/spritemap1.json+808d80e8dac71f3e4f191fca02ef134dc3bdafd4 shared/images/characters/pico/basic-animations/spritemap1.png+18abb77d1b62674da1c9e9974e497d2c7a30cde7 shared/images/characters/pico/playable-animations/Animation.json+591d4af09f7aeb17c23eb1aaff759f5fa0f701a1 shared/images/characters/pico/playable-animations/spritemap1.json+4d2de37e50f329d7612345149da7d598b5bd4206 shared/images/characters/pico/playable-animations/spritemap1.png+976a29389bd794fcd46c41c1d10a12d58d8c2dea shared/images/characters/picoBlazin/Animation.json+de296564163c1e1b52a1f5edd9ee17ac850d6769 shared/images/characters/picoBlazin/spritemap1.json+49c767a595fe12f2ec58acf03ab298b5ce8da516 shared/images/characters/picoBlazin/spritemap1.png+1c79bf6afb13a6f3a7ba35b69567ebb354c46dde shared/images/characters/picoPixel/picoPixel.png+c359068cca5b93d32225aa50c641df580d2d0e29 shared/images/characters/picoPixel/picoPixel.xml+fa5a3293d7bf8657e5c8dfc9b4205647a052c34f shared/images/characters/senpai.png+e51215e130a194581478ac76e93f50e6f837e399 shared/images/characters/senpai.xml+d9b13396d2328bb2e8fd70fbd19245b12d5de98b shared/images/characters/spirit.png+c5d79cfa517c23f359e33be5372b8c6abde1d1e5 shared/images/characters/spirit.txt+d5ebd9df834350298a9ed610034a0cf2f37e7536 shared/images/characters/spooky_dark.png+d252fb8789056b423ad6e04d8b398ab489ab38d5 shared/images/characters/spooky_dark.xml+e8ce587d45e1ce2cd5412e0c881790b225ac0f98 shared/images/characters/sserafim/chaewon/Animation.json+77b7696a3d0d61796fb9c1e526d0c6bfd542392b shared/images/characters/sserafim/chaewon/spritemap1.json+87d0fac7dc3f6c5caf220f3e72bd7d3337f7feba shared/images/characters/sserafim/chaewon/spritemap1.png+124e6e0dca1b9c3a1af06d670e93142835643519 shared/images/characters/sserafim/eunchae/Animation.json+75af1cc915eae4a2652afe9f2f493c1566153e28 shared/images/characters/sserafim/eunchae/spritemap1.json+c7e0189e0e93af9bbac6823476489f3ab06e5d01 shared/images/characters/sserafim/eunchae/spritemap1.png+83fdc0a68530301b625303410120f7ca17f34e38 shared/images/characters/sserafim/kazuha/Animation.json+63d5eb8f6082570802e759dea7982dc542bb68bc shared/images/characters/sserafim/kazuha/spritemap1.json+4fa9bf7e3687c065253becb3ae86914bf06b1f92 shared/images/characters/sserafim/kazuha/spritemap1.png+5036423af1c228e0f0186898814d8fa87c8ea177 shared/images/characters/sserafim/sakura/Animation.json+00acf7aadef4d25b6a0bfc5d9976a479ff60cc03 shared/images/characters/sserafim/sakura/spritemap1.json+f0ee58a2d670c8eeb235283f466f7bcfdf8e9505 shared/images/characters/sserafim/sakura/spritemap1.png+952df5f122ad39d0e682d043f0c851bdd9ec5614 shared/images/characters/sserafim/sserafim-gf/Animation.json+474052ff28da70717704f4656b4c35e190341089 shared/images/characters/sserafim/sserafim-gf/spritemap1.json+ecf3a847188f8e766eb76988d40991563ab41c83 shared/images/characters/sserafim/sserafim-gf/spritemap1.png+7df01fbc2f56cf6f3777752b7326a3fee10c19b9 shared/images/characters/sserafim/yunjin/Animation.json+784f0e40ae8cd578e96223f1a19a44113059bd7c shared/images/characters/sserafim/yunjin/spritemap1.json+c7f686acf4ba4133b464f384f223c68813d8634c shared/images/characters/sserafim/yunjin/spritemap1.png+7e7a1c22a009d39c881772e50cd6f2c5cff4b3e4 shared/images/characters/tankman/basic/Animation.json+12f082128d04fa70e9f74797fcba1312082041e3 shared/images/characters/tankman/basic/spritemap1.json+1336a39cdfba32cb6257c733e7c529c987c5af7e shared/images/characters/tankman/basic/spritemap1.png+49761cd7daaca2ff31939b46a1cbf9c280c6b3db shared/images/characters/tankman/bloody/Animation.json+e939057ce2ffa72dcbb5bfe47479b07d83f1f336 shared/images/characters/tankman/bloody/spritemap1.json+9f549b8deec536d03a7235ce6edc25401f68dd6c shared/images/characters/tankman/bloody/spritemap1.png+fb756b9c15029f734a26ee93a4757f72f9fbb787 shared/images/characters/tankman/extra-animations/Animation.json+64b91cf39e97f425522f3bd5995f3a739aab922e shared/images/characters/tankman/extra-animations/spritemap1.json+5a453d3ac91df313ed3ee4b864b5461757098a58 shared/images/characters/tankman/extra-animations/spritemap1.png+b34ed815def1a25bb2537c20b170db6d5e19d084 shared/images/noteSplashes.png+857ce022b80f8006299f8720594a1fa23dffb34e shared/images/noteSplashes.xml+b15485ecb31c884aa5527fdca9b7aacb23118499 shared/images/noteStrumline.png+dd5a2d3b8ab4ddcbce557fdb778e065aac5b6100 shared/images/noteStrumline.xml+7abe4fb53651ff8ec04c6a76730a98a40641a5dd shared/images/notes.png+a3f7297548b0846a264f9849b2ea03a67977149b shared/images/notes.xml+bffdda1384a0a421d5bdf8a579e70d766e0b182d shared/images/stageback.png+de33c06e5fb30667f58a27caa83d36546bbd953b shared/images/stagecurtains.png+de26bfe1129a001ef0e6bf87b9384f4457729d65 shared/images/stagefront.png+78cc7f68cffd458477c7d8af9b6e2180a961e318 shared/images/ui/countdown/funkin/go.png+380ed37f0fe11343c3c8e42ac0c7b143241866d7 shared/images/ui/countdown/funkin/ready.png+c10518e277d71109ce5a95330e2d17c6bb0c652b shared/images/ui/countdown/funkin/set.png+ee331059d2097e177c8dcfeae2015aed61b482a5 shared/images/ui/countdown/pixel/go.png+7de73278c50d87601dde07064ed422620e3e39c1 shared/images/ui/countdown/pixel/ready.png+02d89d6e7526314517a421b9e35de762361f4b5d shared/images/ui/countdown/pixel/set.png+e0b107dd2f476df5e7380fc704b3ea428d9c33c1 sserafim/images/back-stools.png+692b8efa5ad837892155e9ecaf25ea26764fca61 sserafim/images/back-tables.png+8ac8f05492f07f9866bd6b54979b0cc4282d4c96 sserafim/images/bg.png+d463e26631e16c04f1bfa5a5549d7521296d4a3d sserafim/images/front-stool.png+b8c5979dd3b0018bcd78234bbabd6dd56464c288 sserafim/images/truck-stuff.png+8172b3ce008ea844f2e14167c89b9215b39e0eea week1/images/erect/bg.png+09e68a6966554a85a5e820a952cfea2f8d202d7e week1/images/erect/brightLightSmall.png+4cacf42f39ef8f6dc34e08b3d6adc2118864bca7 week1/images/erect/crowd.png+e16595e7d5e95a222ade568b9de5f7dcfe5e4101 week1/images/erect/crowd.xml+98ea28768c296028fcabd5d7e3257968a8984cf7 week1/images/erect/lightAbove.png+ef9788ba430388ef4b5320bcf275746a2a7fa72b week1/images/erect/lightgreen.png+686ffb36df552ccfce75eacc9ba01791acf43467 week1/images/erect/lightred.png+164fce0b542fcf8486486e804088144ce645da50 week1/images/erect/lights.png+848c9291c76f7fd056d33b658a2911cf74331d3f week1/images/erect/orangeLight.png+1040c127f25fef594a3cf4a828edd16c4090408a week1/images/erect/server.png+7d0a288579d8c8866e5b7f1b2abaa8837a700549 week2/images/erect/bgDark.png+7fd0aec9d072e66b586c2637fbe104209d063dbb week2/images/erect/bgLight.png+e7dd264c05df2b8af0293cb28d2fe0fc13280b45 week2/images/erect/bgtrees.png+61ae310932e47d00241e112c7bca9a5aac5d7da2 week2/images/erect/bgtrees.xml+d1ab22896a3ed3c7b3bd56883eece775c1c528f2 week2/images/erect/stairsDark.png+84bde1daa3a7de4b02c8c9c4a1b1af2c983b44d5 week2/images/erect/stairsLight.png+5681779464e4f8db3f92566b5d89289fad1c14b3 week2/images/halloween_bg/Animation.json+e0930c60395655511e41b334689cc42103ffe6d1 week2/images/halloween_bg/spritemap1.json+515bdc3c524518b62589f5d0d2939a1d54446a36 week2/images/halloween_bg/spritemap1.png+975338ce227a7409cce14e487c63dca8bdc49280 week3/images/philly/behindTrain.png+c1d1b22ce933db4c33deff58cae8deca888a15ef week3/images/philly/city.png+2f1bbb8aa150b18d4fd2359b1b525790c5c28b46 week3/images/philly/erect/behindTrain.png+6de17ee853721495c3e57a62599e5edbb52c9eac week3/images/philly/erect/city.png+19f18f2d2229a863b9a3d3dd28ffbdf4fa73b2bc week3/images/philly/erect/sky.png+85462a8fb6bfe4f9f2d96d95a8ac36659fe7246f week3/images/philly/erect/street.png+cf502063755e9cb3b6b441538a1f0009b1e4529b week3/images/philly/sky.png+f684d1e5bbef10503af9318c24646e83cc095a93 week3/images/philly/street.png+7a89e6e47dd9f18ea12bf0e580fce27a42c03807 week3/images/philly/train.png+92647b5b75748dc611f0334d9009f5cba70343c3 week3/images/philly/win.png+fc9db85ab2346bc08c4d47c43ad467be885414e4 week4/images/limo/bgLimo.png+6034dc79d9c39edd9e6285576e3a5ca7c2e11c45 week4/images/limo/bgLimo.xml+5e5111c49b76aaa5841d0b7762944929b4ad8aee week4/images/limo/erect/bgLimo.png+bba550ab5d7a11d07fcfc9265dd40f9159a5964d week4/images/limo/erect/bgLimo.xml+fd8d52ec938a8c4f3f2e96c401898a323eb10a62 week4/images/limo/erect/limoDrive.png+f8db7fabc069af0b1b959c676d336c0a0e460975 week4/images/limo/erect/limoDrive.xml+ae41686c17a77bb1f9e74be1800c43cdcb98d32d week4/images/limo/erect/limoSunset.png+c904f5bf79db6d4a709d37db687155127a1c5c93 week4/images/limo/erect/shooting star.png+64dff2f4d59ea11b9e8c67ac4566734b98abbf69 week4/images/limo/erect/shooting star.xml+392bc8e4a6f9223f6c53feb41c06aef72b3e6192 week4/images/limo/fastCarLol.png+4df9fbeeabaa1c5e1472d298face97c9ddf0c666 week4/images/limo/henchmen.png+8a84a9a74f95ebb05b11933b55c348374dd68305 week4/images/limo/henchmen.xml+bbc0e21ec78bf0fc64b55ae6a169239098b1f9ce week4/images/limo/limoDrive.png+7c7a1b8ce1c073331f3e796d0bc2ffa5dc08398b week4/images/limo/limoDrive.xml+f15d75e4883d818834671799732175ae0cfcf170 week4/images/limo/limoSunset.png+e836207b615ff99517f26eb9f8d7d0a95006bc5e week5/images/christmas/bgEscalator.png+e5221c5c626b1152daf372891234baffcf59e499 week5/images/christmas/bgWalls.png+623018fbaec4e1d8c3da8964aa52754332dfff00 week5/images/christmas/bottomBop.png+6ca44150325e5751f4fc8e4b4d1bea9eeca67d74 week5/images/christmas/bottomBop.xml+0d7413d7b0c63150ec5e4faa4149f420291ce982 week5/images/christmas/christmasTree.png+25f361eb290f1100a65316b5596473e98304d383 week5/images/christmas/erect/bgEscalator.png+fb1e93ea8750c90f95b3bf3c2fa23dbacde17996 week5/images/christmas/erect/bgWalls.png+848cc22e4280bfd1b962c570430b54448db0f3b6 week5/images/christmas/erect/bottomBop/Animation.json+b874ee876ec7ffa3175b7e890730e9d362f766e1 week5/images/christmas/erect/bottomBop/spritemap1.json+2da235f0108ababa89a7a4bb5ad0b3d9cd9ce15d week5/images/christmas/erect/bottomBop/spritemap1.png+fb99871ae85481c7c06b3f5e35b0675420ff9735 week5/images/christmas/erect/christmasTree.png+1218d965492f1df1b1133d155ef3ec740c5dc881 week5/images/christmas/erect/upperBop.png+6e6b6c2db4e26d32e519783871a1592d1c6aa7cf week5/images/christmas/erect/upperBop.xml+fda05f648603dd7c1ed17bcf1450afb17854565b week5/images/christmas/erect/white.png+a08b4b8ef8e86a1438fc1861cda99825d6779bfc week5/images/christmas/evilBG.png+29e4c940b1926bfdd40f45556911889aac4710f8 week5/images/christmas/evilSnow.png+2a538a1060636f01c85a2632a13aee51e1431ed8 week5/images/christmas/evilTree.png+2223ac5864962990309c4c2ac84c0a2a6b80718b week5/images/christmas/fgSnow.png+e05fd0d7e7721f9fd2f281b83296d2c732b38db5 week5/images/christmas/santa.png+b0c971d9e2e42d0240036e0d3332f1166d2fefe4 week5/images/christmas/santa.xml+18941bddd7ba44e56606fd7c4e6b6a9ecf144c48 week5/images/christmas/upperBop.png+e2b2c8d65d4546343fb2e53dce683d0da691e4c6 week5/images/christmas/upperBop.xml+5ae10c3c092b5057835b66848f293fe4f01108d0 week6/images/pixelNoteSplash.png+02dd61d0f5ae926798b45aa638a0d49a3a7ae02f week6/images/pixelNoteSplash.xml+12800cadc03dfbb7183c1ad3cd7174667519aa20 week6/images/weeb/bgFreaks.png+40c04f485ed0a4f3bb9d0296fae8c497681f0adc week6/images/weeb/bgFreaks.xml+c03a056fad2e69bdff162839631a26f21a2bef75 week6/images/weeb/erect/evil/backSpike.png+c54a582398a7a7a39c06652ba5f5b32e3f5a3cc8 week6/images/weeb/erect/evil/weebBackSpikes.png+0caefd779767de74549819ceec8d57336d88f0de week6/images/weeb/erect/evil/weebSchool.png+89681ba01a5774510fa8f54267b7998126729ddb week6/images/weeb/erect/evil/weebStreet.png+898ea213e4136a75977add6e941bcc250b6fb989 week6/images/weeb/erect/petals.png+4fc02caf4a17353c650a5fa6e838d9c4fcd2333e week6/images/weeb/erect/petals.xml+8ee051721bbb4e7ae30246f3109a73709df540c4 week6/images/weeb/erect/weebBackTrees.png+e17c6a5796b0c77097855b8c1ef919baffa7a49b week6/images/weeb/erect/weebSchool.png+b5bfcf59c206a3620ebd5184913a80bb0b942741 week6/images/weeb/erect/weebSky.png+c9ef46b2f0b941a24e1fd61d82a6ffdcd1d80f0d week6/images/weeb/erect/weebStreet.png+c2f8257f919972ee7f891e24480c56807a51d9d8 week6/images/weeb/erect/weebTrees.png+7846c0084ddcd5c9b88b59dd4c37117a24811c9f week6/images/weeb/erect/weebTrees.txt+fb933d2b41a032d0e09d63eb7ae5475eebc2c94a week6/images/weeb/erect/weebTreesBack.png+50b1acab390098a0a238a12069371bce57b52516 week6/images/weeb/evil/weebBackTrees.png+00a698c2ce7d2714ee18cd504802d412abff8732 week6/images/weeb/evil/weebSchool.png+31f3df3f773221b36c69f57814a3863204631ae4 week6/images/weeb/evil/weebStreet.png+6dcc14455517f98e2a909907614c145ace89c67d week6/images/weeb/evil/weebTrees.png+3c597ff1aa4f99ad60e0b91ef3a0fe51137aa943 week6/images/weeb/petals.png+4fc02caf4a17353c650a5fa6e838d9c4fcd2333e week6/images/weeb/petals.xml+a468c83a9e87d2652b763c74b096f322adbbdeee week6/images/weeb/pixelUI/arrowEndsNew.png+d4469d6bd03ac086ecfafad0e578f00c2af3c44c week6/images/weeb/pixelUI/arrows-pixels.png+2779acc776142ac93099a3242ea668e4ea575f91 week6/images/weeb/pixelUI/arrows-pixels.xml+29d45059f64d41f021fda364e2ee3f5e308c3e6d week6/images/weeb/weebBackTrees.png+c04d0a7ef4ff55cc1bec1328c7d4e30ebc117860 week6/images/weeb/weebSchool.png+ef3eec1322d8a2f2b6bf1fcaeb057425e3a1234c week6/images/weeb/weebSky.png+de1e4586fffc47b254ae4fbc5d74fdba0ef476e2 week6/images/weeb/weebStreet.png+627f2e083e7f2a8ade12cc16ec5c3588c6f3513d week6/images/weeb/weebTrees.png+7846c0084ddcd5c9b88b59dd4c37117a24811c9f week6/images/weeb/weebTrees.txt+2bb981bb30309eb67983d729d4b9246d9a22fede week6/images/weeb/weebTreesBack.png+ad440dce1a10b89c79f9868440ef08e391701a11 week7/images/bricksGround.png+81714721bfbce218a45d21ff83874aad22767431 week7/images/cityruins2.png+24accd57ce702cced9226f848519d09766070e39 week7/images/erect/bg.png+953e2d7b2eb2f9cb30abdb835afa37714fafd461 week7/images/erect/bricksGround.png+015320a3b0f6601c70b5387a59e5d1079232ec4e week7/images/erect/rando/Animation.json+f53fccd7976bfbfdf819c1c3817ccc9550d4d6ef week7/images/erect/rando/spritemap1.json+5bb0b0ce423b0066f21cfd73095ab693c506716d week7/images/erect/rando/spritemap1.png+028fa83adc59bc105f3456e6d31b77d4b28d192f week7/images/erect/sniper/Animation.json+cd4915b2b69dd4d9ddda3733d81ad078389616f4 week7/images/erect/sniper/spritemap1.json+c855fccdd6efdad67179997311f1de720c3206c1 week7/images/erect/sniper/spritemap1.png+32b2016646ed35a6329c047668269f01df2fe3e3 week7/images/mountains2.png+f8c9dc4ba8da7bc1bd28f57b5223ec96b17cc1af week7/images/smokeLeft.png+ebe22df53d6b5f503ad45a7b290e1cb7690647cc week7/images/smokeLeft.xml+8f93375a849d46e272e70677bffc343c008cd9c7 week7/images/smokeRight.png+ed9bd87c05e0a41b53dc71ef26979fc5ae5da1a8 week7/images/smokeRight.xml+d3387f66e467eedcfe790cf2fc160ad95373fda6 week7/images/tank0.png+6d8b68e5ef7101b0e81cba089287d1066862021d week7/images/tank0.xml+ad82dec4e12ed7b6e70b671c9491fd97099c32f4 week7/images/tank1.png+6fd8bec54403d8398c3c1469ec154e5accd4a8a0 week7/images/tank1.xml+15f280e3a3cda6ab9110a4d24e92001d36889ee4 week7/images/tank2.png+34d9b18f2be0600abc201f457637bde4e8f5090c week7/images/tank2.xml+d3281b8670f14b0d385772bb297ae14d22797b19 week7/images/tank3.png+38d1a4e64f3e919dc3a53e4ff4725d8d3e184060 week7/images/tank3.xml+a111eef4613a2d621e8a673047f4bd44554283e1 week7/images/tank4.png+671526a9231ccdbf2a21b5f1f6e0f2fd181dd09a week7/images/tank4.xml+b955747c6239783e1f62ddcbc5e15ed47e71b8fc week7/images/tank5.png+68dbf8e7cbbc3aafca0d91bd7b5c61718f835c78 week7/images/tank5.xml+7ebdcc195acf87f4a2baf925f953c05518b31f52 week7/images/tankBuildings.png+956b9e9e577de33f8060ae6160299d79417cdb8f week7/images/tankGround.png+3575f6c2858091957d9eb08841cb8edf7cf5701a week7/images/tankRolling.png+52fadf56d679fbe805a9c2656e9946e673859eb2 week7/images/tankRolling.xml+606d4f6d02153caa35db92ef05f3a8e06181249a week7/images/tankSky.png+30a72b46374633b75687dc8c52fef7aa090d9030 week7/images/tankWatchtower.png+7dc554733c1330fde8a211c08c8629c01a606cee week7/images/tankWatchtower.xml+ded70d2091d854f6202a8014fff4633fdb9aabeb weekend1/images/SpraycanPile.png+dbe099974d808e0db8efc58f6e30fb2637a39819 weekend1/images/phillyBlazin/lightning.png+1dd202d5fc632113fddc303a5f40a22f4e20b8a2 weekend1/images/phillyBlazin/lightning.xml+edaf14f527bc78f9afd16b3775d1fc5b6b32c992 weekend1/images/phillyBlazin/skyBlur.png+92ebd45710395c967b9819a5b1580ffd39c9c035 weekend1/images/phillyBlazin/streetBlur.png+b958b08cd75ca10014a4c14ffbfe8bb163f20f67 weekend1/images/phillyStreets/erect/greyGradient.png+ecd3b31eabd528d36b2412cd43e7d2c996eaa18c weekend1/images/phillyStreets/erect/phillyCars.png+f5aef9ad24cb82163172443c22f92f2ea182be82 weekend1/images/phillyStreets/erect/phillyCars.xml+a342f8bea5ba41dc72d7bb27c7583c8de9ca6562 weekend1/images/phillyStreets/erect/phillyConstruction.png+6d928f7ece7b17eba3f05521d2af474fe92a950c weekend1/images/phillyStreets/erect/phillyForeground.png+6cca558de6480f3e4f1bd2671e7ee0c9e81553be weekend1/images/phillyStreets/erect/phillyForegroundCity.png+7d9fbf454dffca43714b9003191304fb35f92189 weekend1/images/phillyStreets/erect/phillyHighway.png+dfec01f54a965975ed84c9f7b6463d0b494e2d1f weekend1/images/phillyStreets/erect/phillyHighwayLights.png+608b885e583e252afb8c2a27f5d7000844824f68 weekend1/images/phillyStreets/erect/phillySkyline.png+ba5823cfa2e45a569a7d157844e1c77dcd23c14e weekend1/images/phillyStreets/erect/phillyTraffic.png+d1c1c9b1ac7c613fd78f62a319507ada34d3ef88 weekend1/images/phillyStreets/erect/phillyTraffic.xml+44c1eadf97a841bd8910664b4c72629ed4a48a19 weekend1/images/phillyStreets/erect/phillyTraffic_lightmap.png+0d1d09b1dae7ae4062dcb155707eaf5b5a41fcdf weekend1/images/phillyStreets/phillyCars.png+ac642a55e8bf9435a3d1aff3c1f70f01afb69667 weekend1/images/phillyStreets/phillyCars.xml+57297dab6313092d94230443c2eb0eedf3596939 weekend1/images/phillyStreets/phillyConstruction.png+599a18af3ae8f254f8564bb9dfe2c4d538e9b6e1 weekend1/images/phillyStreets/phillyForeground.png+8ed54dc68b5a73c02053e09e284c390c9b481554 weekend1/images/phillyStreets/phillyForegroundCity.png+dd30ffe0a92ee4c783c5ad4bd16e1bcf8d5895b3 weekend1/images/phillyStreets/phillyHighway.png+bbe325362649a884f2937f42959cd076842dc2ce weekend1/images/phillyStreets/phillyHighwayLights.png+168989235c9b7a1b4f7c701a74e4a2044f91fc27 weekend1/images/phillyStreets/phillyHighwayLights_lightmap.png+669cb7088efd98806f6665318c9b3c1db5be07cf weekend1/images/phillyStreets/phillySkyline.png+700b3a717ab6e0919a7af642ab24f9bceeaa87c6 weekend1/images/phillyStreets/phillySmog.png+5f3da3cec81b111b7c7ca541c2d00e7b039b00bc weekend1/images/phillyStreets/phillyTraffic.png+38b7d6bb61232a8fb5a71074ad01ee8e8f0972e9 weekend1/images/phillyStreets/phillyTraffic.xml+0f00f0e140f91dbd473a8f363583435337e5df06 weekend1/images/phillyStreets/phillyTraffic_lightmap.pngdiff --git a/games/fnf/tools/reference_art.py b/games/fnf/tools/reference_art.pydeleted file mode 100644index 6af8fe15..00000000--- a/games/fnf/tools/reference_art.py+++ /dev/null@@ -1,141 +0,0 @@-"""Flatten the reference's Sparrow/Adobe Animate atlases offline, never on device."""-from pathlib import Path-import json,math,xml.etree.ElementTree as ET-from functools import lru_cache-from PIL import Image,ImageEnhance,ImageChops--IDENTITY=(1,0,0,1,0,0)-def read(p):return json.loads(Path(p).read_text(encoding='utf-8-sig'))-def matrix(d):- if 'MX'in d:return tuple(d['MX'])- if 'M3D'in d:- a=d['M3D'];return(a[0],a[1],a[4],a[5],a[12],a[13])- return IDENTITY-def multiply(a,b):return(a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5])-def point(m,x,y):return(m[0]*x+m[2]*y+m[4],m[1]*x+m[3]*y+m[5])-def bounds(leaves):- if not leaves:return(0,0,1,1)- pts=[]- for im,m,a in leaves:- b=im.getbbox()- if b and a>0:pts.extend(point(m,x,y)for x,y in [(b[0],b[1]),(b[2],b[1]),(b[2],b[3]),(b[0],b[3])])- if not pts:return(0,0,1,1)- return(min(p[0]for p in pts),min(p[1]for p in pts),max(p[0]for p in pts),max(p[1]for p in pts))-def flatten(leaves,scale=1,box=None):- box=box or bounds(leaves);x0,y0=math.floor(box[0]*scale),math.floor(box[1]*scale);x1,y1=math.ceil(box[2]*scale),math.ceil(box[3]*scale)- out=Image.new('RGBA',(max(1,x1-x0),max(1,y1-y0)))- for im,m,alpha in leaves:- a,b,c,d,tx,ty=m;a*=scale;b*=scale;c*=scale;d*=scale;tx=tx*scale-x0;ty=ty*scale-y0;det=a*d-b*c- if abs(det)<1e-8:continue- inv=(d/det,-c/det,(c*ty-d*tx)/det,-b/det,a/det,(b*tx-a*ty)/det)- layer=im.transform(out.size,Image.Transform.AFFINE,inv,Image.Resampling.BICUBIC)- if alpha<.999:layer.putalpha(layer.getchannel('A').point(lambda x:round(x*alpha)))- out.alpha_composite(layer)- return out,x0,y0--class Atlas:- def __init__(self,path):- self.path=Path(path);self.d=read(self.path/'Animation.json');self.symbols={x['SN']:x['TL']for x in self.d.get('SD',{}).get('S',[])};self.textures={};self.labels={}- for p in sorted(self.path.glob('spritemap*.json')):- im=Image.open(p.with_suffix('.png')).convert('RGBA');data=read(p)- for item in data['ATLAS']['SPRITES']:- s=item['SPRITE'];sprite=im.crop((s['x'],s['y'],s['x']+s['w'],s['y']+s['h']))- if s.get('rotated'):sprite=sprite.transpose(Image.Transpose.ROTATE_90)- self.textures[str(s['name'])]=sprite- for layer in self.d['AN']['TL']['L']:- for f in layer['FR']:- if f.get('N'):self.labels[f['N']]=(f['I'],f['DU'])- def duration(self,tl):return max((f['I']+f['DU']for l in tl['L']for f in l['FR']),default=1)- def sequence(self,prefix,symbol=False):- match=lambda keys:next((k for k in keys if k.lower()==prefix.lower()),next((k for k in keys if k.lower().startswith(prefix.lower())),None))- if symbol:- k=match(self.symbols)- if k:return self.symbols[k],0,self.duration(self.symbols[k])- if self.d['AN'].get('SN','').lower().startswith(prefix.lower()):return self.d['AN']['TL'],0,self.duration(self.d['AN']['TL'])- k=match(self.labels)- if k:return self.d['AN']['TL'],*self.labels[k]- k=match(self.symbols)- if k:return self.symbols[k],0,self.duration(self.symbols[k])- raise KeyError((self.path.name,prefix))- def walk(self,tl,frame,transform=IDENTITY,alpha=1,depth=0):- if depth>40:raise ValueError('Cyclic symbol hierarchy')- result=[]- for l in reversed(tl['L']):- if l.get('LT')=='Clp':continue- f=next((f for f in l['FR']if f['I']<=frame<f['I']+f['DU']),None)- if not f:continue- leaves=[]- for e in f.get('E',[]):- if 'ASI'in e:- d=e['ASI'];im=self.textures.get(str(d['N']))- if im is not None:leaves.append((im,multiply(transform,matrix(d)),alpha))- elif 'SI'in e:- d=e['SI'];child=self.symbols.get(d['SN'])- if child is None:continue- t=d.get('FF',0);loop=d.get('LP','LP')- if loop!='SF':t+=frame-f['I']- length=self.duration(child);t=t%length if loop=='LP'else min(t,length-1)- a=alpha*d.get('C',{}).get('AM',1)- leaves.extend(self.walk(child,t,multiply(transform,matrix(d)),a,depth+1))- if l.get('Clpb')and leaves:- mask=next((x for x in tl['L']if x.get('LN')==l['Clpb']),None)- if mask:- masks=self.walk({'L':[{'LN':mask['LN'],'FR':mask['FR']}]},frame,transform,alpha,depth+1)- box=bounds(leaves);im,x,y=flatten(leaves,box=box);matte,_,_=flatten(masks,box=box)- im.putalpha(ImageChops.multiply(im.getchannel('A'),matte.getchannel('A')))- b=im.getbbox()- leaves=[(im.crop(b),(1,0,0,1,x+b[0],y+b[1]),1)]if b else[]- result.extend(leaves)- return result- def frames(self,animation,count=2):- tl,start,duration=self.sequence(animation['prefix'],animation.get('animType')=='symbol');indices=animation.get('frameIndices')- ids=indices or list(range(duration));samples=[ids[min(len(ids)-1,round(i*(len(ids)-1)/max(1,count-1)))]for i in range(count)]- ox,oy=animation.get('offsets',[0,0]);transform=(1,0,0,1,-ox,-oy)- return[self.walk(tl,start+i,transform)for i in samples]--class ReferenceArt:- def __init__(self,root):self.root=Path(root);self.atlases={};self.sparrows={}- def path(self,name,library='shared'):- if ':'in name:library,name=name.split(':',1)- choices=[self.root/lib/'images'/name for lib in dict.fromkeys([library,'shared','preload'])]- return next((p for p in choices if p.is_dir()or p.with_suffix('.png').exists()),choices[0])- def atlas(self,path):- path=Path(path)- if path not in self.atlases:self.atlases[path]=Atlas(path)- return self.atlases[path]- def sparrow(self,path):- path=Path(path)- if path not in self.sparrows:- xml=ET.parse(path.with_suffix('.xml')).getroot();im=Image.open(path.with_suffix('.png')).convert('RGBA');frames=[]- for item in xml:- d=item.attrib;x,y,w,h=[int(d[k])for k in ['x','y','width','height']];sprite=im.crop((x,y,x+w,y+h))- if d.get('rotated')=='true':sprite=sprite.transpose(Image.Transpose.ROTATE_90)- frames.append((d['name'],sprite,(1,0,0,1,-int(d.get('frameX',0)),-int(d.get('frameY',0)))))- self.sparrows[path]=frames- return self.sparrows[path]- def frames(self,path,animation,count=2):- path=Path(path)- if path.with_suffix('.xml').exists():- allframes=[f for f in self.sparrow(path)if f[0].startswith(animation.get('prefix',''))]- if not allframes:raise KeyError((str(path),animation))- ids=animation.get('frameIndices')or list(range(len(allframes)));ox,oy=animation.get('offsets',[0,0]);result=[]- for i in range(count):- n=ids[min(len(ids)-1,round(i*(len(ids)-1)/max(1,count-1)))];_,im,m=allframes[n%len(allframes)];m=multiply((1,0,0,1,-ox,-oy),m);result.append([(im,m,1)])- return result- if path.with_suffix('.txt').exists():- import re- im=Image.open(path.with_suffix('.png')).convert('RGBA');items=[]- for line in path.with_suffix('.txt').read_text().splitlines():- m=re.match(r'(.+?)\s*=\s*(\d+)\s+(\d+)\s+(\d+)\s+(\d+)',line)- if m and m[1].startswith(animation.get('prefix','')):- x,y,w,h=map(int,m.groups()[1:]);items.append((m[1],im.crop((x,y,x+w,y+h))))- items.sort(key=lambda x:x[0]);ids=animation.get('frameIndices')or list(range(len(items)))- if not items:raise KeyError((path,animation))- ox,oy=animation.get('offsets',[0,0]);return[[(items[ids[min(len(ids)-1,round(i*(len(ids)-1)/max(1,count-1))) ]%len(items)][1],(1,0,0,1,-ox,-oy),1)]for i in range(count)]- if path.is_dir():- candidates=sorted(path.rglob('Animation.json'))- for p in candidates:- try:return self.atlas(p.parent).frames(animation,count)- except KeyError:pass- raise KeyError((str(path),animation))- im=Image.open(path.with_suffix('.png')).convert('RGBA');return[[(im,IDENTITY,1)]]*countdiff --git a/games/fnf/tools/standalone.ld b/games/fnf/tools/standalone.lddeleted file mode 100644index 28679582..00000000--- a/games/fnf/tools/standalone.ld+++ /dev/null@@ -1,15 +0,0 @@-/* 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) }-}