Skip to content

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

Five Nights at Freddy's: README, media, in the releases and tests

Mason363f0bab97657a4
diff --git a/LICENSES/DejaVu.txt b/LICENSES/DejaVu.txt
new file mode 100644
index 00000000..da8fb3f3
--- /dev/null
+++ b/LICENSES/DejaVu.txt
@@ -0,0 +1,45 @@
+DejaVu fonts (https://dejavu-fonts.github.io), whose letters Five Nights at Freddy's (games/fnaf) draws its words in.
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc.
+DejaVu changes are in public domain.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of the fonts accompanying this license ("Fonts") and associated
+documentation files (the "Font Software"), to reproduce and distribute the
+Font Software, including without limitation the rights to use, copy, merge,
+publish, distribute, and/or sell copies of the Font Software, and to permit
+persons to whom the Font Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright and trademark notices and this permission notice shall
+be included in all copies of one or more of the Font Software typefaces.
+
+The Font Software may be modified, altered, or added to, and in particular
+the designs of glyphs or characters in the Fonts may be modified and
+additional glyphs or characters may be added to the Fonts, only if the fonts
+are renamed to names not containing either the words "Bitstream" or the word
+"Vera".
+
+This License becomes null and void to the extent applicable to Fonts or Font
+Software that has been modified and is distributed under the "Bitstream
+Vera" names.
+
+The Font Software may be sold as part of a larger software package but no
+copy of one or more of the Font Software typefaces may be sold by itself.
+
+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 BITSTREAM OR THE GNOME
+FOUNDATION 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.
+
+Except as contained in this notice, the names of Gnome, the Gnome
+Foundation, and Bitstream Inc., shall not be used in advertising or
+otherwise to promote the sale, use or other dealings in this Font Software
+without prior written authorization from the Gnome Foundation or Bitstream
+Inc., respectively. For further information, contact: fonts at gnome dot
+org.
diff --git a/Makefile b/Makefile
index 60bd974b..9f7439ef 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ RAM_LIMIT = 148928
# custom builds of Epsilon 25.2's source give apps less: 133652 bytes; every game fits there too, in NumPlay and on
# its own (their big buffers are on the stack, 32 KB apart from that RAM, or in the RAM the software has left)
CUSTOM_RAM = 133652
-BIG_APPS = Celeste HollowKnight Undertale ChampionIsland FinalEarth2 NumPowder NumBlocks NumDrive SubwaySurfers
+BIG_APPS = Celeste HollowKnight Undertale ChampionIsland FinalEarth2 NumPowder NumBlocks NumDrive SubwaySurfers FiveNightsAtFreddys
# the calculator's space for installed apps (0x90200000 to 0x903F0000 in its flash)
APP_SPACE = 2031616
# Upsilon, the N0110 and N0115's custom software, gives .nwa apps less RAM: NumPlay-Upsilon.nwa has
@@ -207,6 +207,7 @@ APP_championisland = games/championisland/output/championisland.nwa:ChampionIsla
APP_hollowknight = games/hollowknight/output/hollowknight.nwa:HollowKnight.nwa
APP_undertale = games/undertale/output/undertale.nwa:Undertale.nwa
APP_subway = games/subway/output/subway.nwa:SubwaySurfers.nwa
+APP_fnaf = games/fnaf/output/fnaf.nwa:FiveNightsAtFreddys.nwa
APP_finalearth2 = games/finalearth2/output/finalearth2.nwa:FinalEarth2.nwa
APP_numpowder = games/numpowder/output/numpowder.nwa:NumPowder.nwa
@@ -224,6 +225,7 @@ apps: | $(B)
$(MAKE) -C games/hollowknight build NWLINK="$(NWLINK)"
$(MAKE) -C games/undertale build NWLINK="$(NWLINK)"
$(MAKE) -C games/subway build NWLINK="$(NWLINK)"
+ $(MAKE) -C games/fnaf build NWLINK="$(NWLINK)"
$(MAKE) -C games/finalearth2 build NWLINK="$(NWLINK)"
$(MAKE) -C games/numpowder build NWLINK="$(NWLINK)"
cd games/tetris/tetris && NWLINK="$(NWLINK)" $(CARGO) build --release --quiet
@@ -241,6 +243,7 @@ apps: | $(B)
cp $(word 1,$(subst :, ,$(APP_hollowknight))) $(B)/apps/$(word 2,$(subst :, ,$(APP_hollowknight)))
cp $(word 1,$(subst :, ,$(APP_undertale))) $(B)/apps/$(word 2,$(subst :, ,$(APP_undertale)))
cp $(word 1,$(subst :, ,$(APP_subway))) $(B)/apps/$(word 2,$(subst :, ,$(APP_subway)))
+ cp $(word 1,$(subst :, ,$(APP_fnaf))) $(B)/apps/$(word 2,$(subst :, ,$(APP_fnaf)))
cp $(word 1,$(subst :, ,$(APP_finalearth2))) $(B)/apps/$(word 2,$(subst :, ,$(APP_finalearth2)))
cp $(word 1,$(subst :, ,$(APP_numpowder))) $(B)/apps/$(word 2,$(subst :, ,$(APP_numpowder)))
arm-none-eabi-strip --strip-unneeded $(B)/apps/Tetris.nwa
@@ -299,6 +302,7 @@ clean:
-$(MAKE) -C games/hollowknight clean
-$(MAKE) -C games/undertale clean
-$(MAKE) -C games/subway clean
+ -$(MAKE) -C games/fnaf clean
-$(MAKE) -C games/finalearth2 clean
-$(MAKE) -C games/numpowder clean
-cd games/tetris/tetris && $(CARGO) clean
diff --git a/docs/media/fnaf.gif b/docs/media/fnaf.gif
new file mode 100644
index 00000000..f9f3b476
Binary files /dev/null and b/docs/media/fnaf.gif differ
diff --git a/docs/media/gallery/fnaf.gif b/docs/media/gallery/fnaf.gif
new file mode 100644
index 00000000..d7e57ba1
Binary files /dev/null and b/docs/media/gallery/fnaf.gif differ
diff --git a/docs/media/thumb_fnaf.png b/docs/media/thumb_fnaf.png
new file mode 100644
index 00000000..54034fdc
Binary files /dev/null and b/docs/media/thumb_fnaf.png differ
diff --git a/games/fnaf/README.md b/games/fnaf/README.md
new file mode 100644
index 00000000..a614884e
--- /dev/null
+++ b/games/fnaf/README.md
@@ -0,0 +1,100 @@
+> **Five Nights at Freddy's is a [NumPlay](../../README.md) game that comes on its own.** It is too big to sit next to NumPlay. Get `FiveNightsAtFreddys.nwa` from the [latest release](https://github.com/Mason363/NumPlay/releases/latest).
+
+<p align="center">
+ <img src="src/icon.png" width="84" alt="Five Nights at Freddy's icon">
+</p>
+
+<h1 align="center">Five Nights at Freddy's</h1>
+
+<p align="center">
+ <b>Survive the night shift at Freddy Fazbear's Pizza, on the NumWorks calculator.</b><br>
+ All five nights, the 6th and the Custom Night, with the game's own pictures.
+</p>
+
+<p align="center">
+ <a href="https://github.com/Mason363/NumPlay/releases/latest/download/FiveNightsAtFreddys.nwa"><b>Download FiveNightsAtFreddys.nwa</b></a>
+ &nbsp;·&nbsp; <a href="#controls">Controls</a>
+</p>
+
+## Highlights
+
+* **The whole game:** nights 1 to 5, the 6th night once the 5th is beaten, then the Custom Night with its four AI levels and the 4/20 mode. The paycheck, the overtime and the pink slip, and the three stars on the title screen.
+* **The office as you know it:** turn left and right, close the doors, light the doorways to see who is standing there. The buttons light up, the fan turns, the lights flicker.
+* **The monitor and its eleven cameras:** the Show Stage, the Dining Area, Pirate Cove, the West and East Halls and their corners, the Supply Closet, Backstage, the Restrooms and the Kitchen (audio only), on the map, each slowly turning with its static. Cameras cut out when someone moves on the one you watch.
+* **Freddy, Bonnie, Chica and Foxy as the game moves them:** their AI levels for each night and their rises at 2, 3 and 4 AM, a movement opportunity every 3.02, 4.97, 4.98 and 5.01 seconds, their paths through the building. Freddy only moves while the monitor is down (but for his last step), Foxy comes out when the cameras stay down and runs down the West Hall, bangs on a closed door and takes your power.
+* **The power:** a point a second for each bar of usage, a little more each night, Foxy's bangs. When it runs out the doors open, Freddy's face lights up at the left door to the Toreador March, then the dark.
+* **The Phone Guy's calls as subtitles,** each line when it is said, and what can be heard as captions: footsteps, Freddy's laugh, pots and pans in the kitchen, the music box, Foxy's humming and running. Mute the call with 0.
+* **The secrets:** Golden Freddy's poster on 2B and what follows, the hallucinations, 1/9/8/7 on the Custom Night, Freddy's nose.
+* **Saved like in the game:** the night you reached and your stars. Home keeps the night as it is, and the next start puts you back in it, paused. Your saves are also copied into `fnaf_saves.py`, so installing the app again doesn't erase them.
+
+<table>
+ <tr>
+ <td align="center"><img src="docs/office.png" width="390" alt="The office"><br><sub>The office</sub></td>
+ <td align="center"><img src="docs/light.png" width="390" alt="Bonnie at the left door"><br><sub>The left light: Bonnie</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/stage.png" width="390" alt="The Show Stage on camera"><br><sub>The Show Stage, on the monitor</sub></td>
+ <td align="center"><img src="docs/easthall.png" width="390" alt="Chica in the East Hall"><br><sub>Chica in the East Hall</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/door.png" width="390" alt="The left door closing"><br><sub>A door coming down</sub></td>
+ <td align="center"><img src="docs/chica.png" width="390" alt="Chica at the right door"><br><sub>The right light: Chica</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/dark.png" width="390" alt="The power is out: Freddy at the left door"><br><sub>Out of power</sub></td>
+ <td align="center"><img src="docs/jumpscare.png" width="390" alt="Bonnie's jumpscare"><br><sub>Too late</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/title.png" width="390" alt="The title screen"><br><sub>The title screen</sub></td>
+ <td align="center"><img src="docs/custom.png" width="390" alt="The Custom Night"><br><sub>The Custom Night</sub></td>
+ </tr>
+</table>
+
+## How to play
+
+New Game shows the newspaper and, the first time, which key does what. Then it is 12 AM and your shift starts. You have to last until 6 AM: an hour is about a minute and a half.
+
+Watch the cameras to know where everyone is, but not too much: the monitor drains power, and Foxy comes out when it is down for long. Freddy, Bonnie and Chica come to the doors, where the cameras can't see: light the doorways, and close a door when someone is there. Every door, light and the monitor drain the power, and when it is gone you have nothing left.
+
+Back pauses: from there you can go on, read how to play again, or quit the night.
+
+## Controls
+
+| Key | What it does |
+| --- | --- |
+| ← → or 4 6 | Look left and right |
+| 7 | The left door |
+| 1 | The left light |
+| 9 | The right door |
+| 3 | The right light |
+| OK, EXE or 8 (or ↑ in the office) | The monitor up and down |
+| 1 to 7 | On the monitor: that camera; 1, 2 and 4 again for 1B, 1C, 2B, 4B |
+| Arrows | On the monitor: the camera next to it on the map |
+| 0 or ⌫ | Mute the call |
+| Back | Pause |
+| Home | Keep the night and quit |
+
+The left keys work the left door and light, the right keys the right ones. If you press one while looking the other way, you turn to that side first. On the title and the Custom Night, the arrows choose and OK starts.
+
+## Good to know
+
+* **One app at a time:** Five Nights at Freddy's takes about half of the room the calculator has for apps, so it can't share it with NumPlay. Install it on its own; your saves in each one are kept.
+* **No sound:** the calculator has no speaker. The calls are subtitles, and what you would hear is written at the bottom left: footsteps get "close by" when someone is near a door.
+* **The pictures are the game's,** at a third of their size. The screen is 4:3 where the game is wide, so the office and the cameras turn a little further. A few rare pictures are drawn from the others: Golden Freddy in the office and on the poster, and the West Hall in the dark.
+
+## Credits
+
+Inspired by Five Nights at Freddy's by Scott Cawthon, not affiliated with him.
+
+* The pictures (the office, the cameras, the jumpscares, the title, the newspaper, the clock's digits) come from the game, as two fan ports keep them: wellsousaaa's [Five Nights at Freddy's Web](https://github.com/souwell/Five-Nights-at-Freddys-Web) and BaranMuzu's [HX-NAF](https://github.com/BaranMuzu/HX-NAF). `tools/fetch.py` gets them, `tools/pack.py` makes them into `src/data.bin`.
+* The Phone Guy's words are the game's.
+* How the animatronics move, the power and the hours follow what the game's players found in it, and the recreations that read them out of its files: RosieSapphire's [FNaF64](https://github.com/RosieSapphire/FNaF64) and LOUDO2's [fnaf-1-godot](https://github.com/LOUDO2/fnaf-1-godot).
+* The words are drawn in the DejaVu fonts ([license](../../LICENSES/DejaVu.txt)), and the paychecks with them.
+
+Made by Mason Chen as part of NumPlay.
+
+## License
+
+The game's code is licensed under the GNU General Public License v3.0: see the `LICENSE` file at the root of the repository. The game's pictures and words keep their own terms (see Credits).
+
+Build: `make` (needs `arm-none-eabi-gcc` and Node.js for nwlink), `make test` on a computer.
diff --git a/games/fnaf/docs/chica.png b/games/fnaf/docs/chica.png
new file mode 100644
index 00000000..628ecd39
Binary files /dev/null and b/games/fnaf/docs/chica.png differ
diff --git a/games/fnaf/docs/custom.png b/games/fnaf/docs/custom.png
new file mode 100644
index 00000000..4acb3f78
Binary files /dev/null and b/games/fnaf/docs/custom.png differ
diff --git a/games/fnaf/docs/dark.png b/games/fnaf/docs/dark.png
new file mode 100644
index 00000000..066f2edb
Binary files /dev/null and b/games/fnaf/docs/dark.png differ
diff --git a/games/fnaf/docs/door.png b/games/fnaf/docs/door.png
new file mode 100644
index 00000000..b431097d
Binary files /dev/null and b/games/fnaf/docs/door.png differ
diff --git a/games/fnaf/docs/easthall.png b/games/fnaf/docs/easthall.png
new file mode 100644
index 00000000..e72e8f4a
Binary files /dev/null and b/games/fnaf/docs/easthall.png differ
diff --git a/games/fnaf/docs/golden.png b/games/fnaf/docs/golden.png
new file mode 100644
index 00000000..26cbaf8e
Binary files /dev/null and b/games/fnaf/docs/golden.png differ
diff --git a/games/fnaf/docs/jumpscare.png b/games/fnaf/docs/jumpscare.png
new file mode 100644
index 00000000..430639ce
Binary files /dev/null and b/games/fnaf/docs/jumpscare.png differ
diff --git a/games/fnaf/docs/light.png b/games/fnaf/docs/light.png
new file mode 100644
index 00000000..83193f21
Binary files /dev/null and b/games/fnaf/docs/light.png differ
diff --git a/games/fnaf/docs/office.png b/games/fnaf/docs/office.png
new file mode 100644
index 00000000..36fe4d45
Binary files /dev/null and b/games/fnaf/docs/office.png differ
diff --git a/games/fnaf/docs/stage.png b/games/fnaf/docs/stage.png
new file mode 100644
index 00000000..39aa41ea
Binary files /dev/null and b/games/fnaf/docs/stage.png differ
diff --git a/games/fnaf/docs/title.png b/games/fnaf/docs/title.png
new file mode 100644
index 00000000..26d47b3b
Binary files /dev/null and b/games/fnaf/docs/title.png differ
diff --git a/games/fnaf/tests/check.py b/games/fnaf/tests/check.py
index d17b4d36..c092a568 100644
--- a/games/fnaf/tests/check.py
+++ b/games/fnaf/tests/check.py
@@ -158,23 +158,26 @@ s, ev = run(["--stars", "3", "--keys", "100:down,120:down,140:down,160:ok,200:up
if s:
check(s["running"] == 0 and any(e["kind"] == "golden" for e in ev), f"custom night 1/9/8/7: {s} {ev}")
-# Home keeps the night: the next start is back in it, paused, at the same moment
+# Home keeps the night: the next start is back in it, paused, at the same moment; installing apps keeps only the
+# scripts, and it comes back from the copy
saves = tempfile.mkdtemp(prefix="fnaf_check_")
s, _ = run(["--night", "2", "--keys", "200:7,1500:home"], 1600, saves, "Home")
if s:
check(s["running"] == 0 and record(saves, "fnafres.sav") is not None, f"Home: {s}")
+ os.remove(os.path.join(saves, "fnafres.sav"))
s2, _ = run([], 30, saves, "back after Home")
if s2:
check(s2["scene"] == SC_NIGHT and s2["paused"] == 1 and s2["night"] == 2 and abs(s2["t"] - s["t"]) < 0.5
- and s2["doors"][0] == 1, f"back after Home: {s2} (left at {s})")
+ and s2["doors"][0] == 1, f"back after Home, from the copy: {s2} (left at {s})")
check(record(saves, "fnafres.sav") is None, "the kept night is read once")
- # installing apps leaves only the scripts: the saves come back from the copy
- for name in ("fnaf.sav", "fnafres.sav"):
- if os.path.exists(os.path.join(saves, name)):
- os.remove(os.path.join(saves, name))
- s3, _ = run([], 30, saves, "after a reinstall")
- if s3:
- check(record(saves, "fnaf.sav") is not None, "after a reinstall: fnaf.sav not restored from fnaf_saves.py")
+shutil.rmtree(saves, ignore_errors=True)
+# the progress too
+saves = tempfile.mkdtemp(prefix="fnaf_check_")
+s, _ = run(["--keys", "60:ok,200:ok,700:ok"], 900, saves, "a new game")
+if s and record(saves, "fnaf.sav"):
+ os.remove(os.path.join(saves, "fnaf.sav"))
+ run([], 30, saves, "after a reinstall")
+ check(record(saves, "fnaf.sav") is not None, "after a reinstall: fnaf.sav not restored from fnaf_saves.py")
shutil.rmtree(saves, ignore_errors=True)
# the call: 0 mutes it
diff --git a/games/fnaf/tests/play.c b/games/fnaf/tests/play.c
index ae03c0b9..5fb19e76 100644
--- a/games/fnaf/tests/play.c
+++ b/games/fnaf/tests/play.c
@@ -1,12 +1,14 @@
/* Plays Five Nights at Freddy's on a computer, with scripted keys (or a player of its own), and saves frames.
*
* play [--frames N] [--keys "10-40:left,50:ok,..."] [--shots 30,60|all|every:N] [--out DIR] [--saves DIR]
- * [--night N] [--ai F,B,C,X] [--power P] [--hour H] [--seed S] [--bot] [--resume]
+ * [--night N] [--ai F,B,C,X] [--power P] [--hour H] [--pos F,B,C] [--foxy N] [--gold] [--stars S]
+ * [--seed S] [--bot]
*
* Keys: left right up down ok back home del 0 to 9. "a-b:key" holds the key from frame (step) a to b, "a:key" for
- * one step. --night starts that night (its card first); --ai, --power and --hour then set its AI levels, power
- * and hour. --bot plays the night itself (it knows where everyone is): doors when someone is at them, a look
- * at Pirate Cove now and then. Frames are steps (60 a second); the screen is drawn every second step.
+ * one step. --night starts that night (its card first); --ai, --power, --hour, --pos (Freddy, Bonnie, Chica:
+ * where they are), --foxy (his step out of the cove) and --gold (Golden Freddy's poster up) then set the night;
+ * --stars the stars won. --bot plays the night itself (it knows where everyone is): doors when someone is at them,
+ * a look at Pirate Cove now and then. Frames are steps (60 a second); the screen is drawn every second step.
* Screenshots are DIR/shot_<frame>.ppm. At the end it prints the state: "END scene ... night ... hour ...". */
#include <stdio.h>
#include <stdlib.h>
@@ -80,7 +82,7 @@ static uint32_t bot(int f) {
int main(int argc, char **argv) {
int frames = 600, night = 0, power = -1, hour = -1, ai[4] = {-1, -1, -1, -1}, gold = 0, stars = -1;
- int pos[3] = {-1, -1, -1};
+ int pos[3] = {-1, -1, -1}, foxy = -1;
bool use_bot = false, all = false;
int every = 0;
const char *out = "build/shots", *saves = "build/host-saves";
@@ -107,6 +109,7 @@ int main(int argc, char **argv) {
for (unsigned k = 0; k < s % 1000; k++) rnd();
} else if (!strcmp(a, "--bot")) use_bot = true;
else if (!strcmp(a, "--gold")) gold = 1;
+ else if (!strcmp(a, "--foxy")) foxy = atoi(argv[++i]);
else if (!strcmp(a, "--pos")) sscanf(argv[++i], "%d,%d,%d", &pos[0], &pos[1], &pos[2]);
else if (!strcmp(a, "--stars")) stars = atoi(argv[++i]);
else {
@@ -140,6 +143,7 @@ int main(int argc, char **argv) {
if (gold) g.n.gold = 1;
for (int k = 0; k < 3; k++)
if (pos[k] >= 0) g.n.pos[k] = (uint8_t)pos[k];
+ if (foxy >= 0) g.n.foxy = (uint8_t)foxy;
}
uint32_t k = 0;
for (int i = 0; i < nholds; i++)
diff --git a/tests/test_games.py b/tests/test_games.py
index 2d2790ae..2aabb77a 100644
--- a/tests/test_games.py
+++ b/tests/test_games.py
@@ -137,6 +137,10 @@ GAMES = {
# straight from the title into another run, quit with On/Off
"subway": ("SubwaySurfers.nwa", "subway.sav", presses((1500, "ok"), (2500, "ok")), 8000,
presses((1500, "ok")), 6000),
+ # Continue: the first night's card, then the office; Home keeps the night, and the next start is back in it,
+ # paused: Back, and the night goes on
+ "fnaf": ("FiveNightsAtFreddys.nwa", "fnafres.sav", presses((1500, "down"), (1800, "ok")), 9000,
+ presses((1500, "back")), 5000),
# the intro, then OK draws for a while (the autosave on Home); next time it comes back and more is drawn
"numpowder": ("NumPowder.nwa", "numpowder.sav", presses((2000, "ok"), (3000, "ok", 1500)), 6000,
presses((2000, "ok"), (2500, "right", 600), (3200, "ok", 800)), 5000),
@@ -171,8 +175,8 @@ SEEDS = {
# the app again, only the scripts are left, and the save must come back
COPIES = {"championisland": "champion_saves.py", "numblocks": "numblocks_saves.py", "celeste": "celeste_saves.py",
"hollowknight": "hollowknight_saves.py", "finalearth2": "finalearth2_saves.py",
- "numpowder": "numpowder_saves.py", "undertale": "undertale_saves.py",
- "subway": "subway_saves.py"}
+ "numpowder": "numpowder_saves.py", "undertale": "undertale_saves.py", "subway": "subway_saves.py",
+ "fnaf": "fnaf_saves.py"}
CHECKS = {
# the island remembers where Lucky was; after the reinstall, from the copy
"championisland": (lambda v: v[:3] == b"CI1" and b"PLAYER_LOC" in v,) * 2,
@@ -189,6 +193,9 @@ CHECKS = {
# the progress ("SUB1"): a run played, its coins banked (offset 8), runs at 20; then a second run
"subway": (lambda v: v[:4] == b"SUB1" and struct.unpack_from("<I", v, 8)[0] > 0 and struct.unpack_from("<I", v, 20)[0] == 1,
lambda v: v[:4] == b"SUB1" and struct.unpack_from("<I", v, 20)[0] == 2),
+ # the night kept ("FNAF", its seconds at 40); after the reinstall, from the copy, it goes on
+ "fnaf": (lambda v: v[:4] == b"FNAF" and struct.unpack_from("<f", v, 40)[0] > 2,
+ lambda v: v[:4] == b"FNAF" and struct.unpack_from("<f", v, 40)[0] > 6.5),
# a simulation saved ("NPWD"); after the reinstall, from the copy, it goes on and is saved again
"numpowder": (lambda v: v[:4] == b"NPWD",) * 2,
# a game saved ("HKSV", then the play time at 152); after the reinstall, from the copy, it goes on
diff --git a/tools/release.py b/tools/release.py
index 599c5e11..b4196ac6 100644
--- a/tools/release.py
+++ b/tools/release.py
@@ -33,6 +33,8 @@ ALONE = {
"subway": ("Subway Surfers", "the endless run down the subway's tracks in 3D: trains, ramps, barriers, coins, "
"power-ups, hoverboards, the Inspector and his dog, the shop and the missions. Too big to share the "
"calculator with NumPlay: install it on its own"),
+ "fnaf": ("Five Nights at Freddy's", "survive five nights at Freddy Fazbear's Pizza, then the 6th and the Custom "
+ "Night, with the game's own pictures. Too big to share the calculator with NumPlay: install it on its own"),
"championisland": ("Champion Island", "the Doodle Champion Island Games. Too big to share the calculator with "
"NumPlay: install it on its own"),
"numpowder": ("NumPowder", "The Powder Toy on the calculator: sand, water, fire, acid, electricity and nearly 200 "