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
FNAF: the TI-84 Plus CE version in the README, the monitor drawn straight on the screen
Mason3638d32d70c8cc5
diff --git a/games/fnaf/README.md b/games/fnaf/README.mdindex a614884e..26c68cda 100644--- a/games/fnaf/README.md+++ b/games/fnaf/README.md@@ -76,6 +76,25 @@ Back pauses: from there you can go on, read how to play again, or quit the nightThe 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.+## TI-84 Plus CE++Five Nights at Freddy's also runs on the TI-84 Plus CE, CE Python and TI-83 Premium CE: the same nights, the same AI and the game's pictures, in 8-bit colour.++1. Send `FNAF.8xp` and `FNAFD0.8xv` to `FNAFD9.8xv` (11 files, about 630 KB of archive) with TI Connect CE, and the [CE C libraries](https://github.com/CE-Programming/libraries/releases/latest) if they aren't on the calculator yet.+2. Run `prgmFNAF` (on OS 5.5 or later through [arTIfiCE](https://yvantt.github.io/arTIfiCE/)). It needs nearly all the RAM: archive your programs and lists first.++| CE key | What it does |+| --- | --- |+| ← → or 4 6 | Look left and right |+| 7 and 1 | The left door and light |+| 9 and 3 | The right door and light |+| 2nd, enter or 8 | The monitor up and down |+| 1 to 7 | On the monitor: that camera |+| Arrows | On the monitor: the camera next to it on the map |+| 0 or del | Mute the call |+| clear | Pause |+| mode | Keep the night and quit |+## 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.@@ -97,4 +116,4 @@ Made by Mason Chen as part of NumPlay.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.+Build: `make` (needs `arm-none-eabi-gcc` and Node.js for nwlink), `make test` on a computer. The TI-84 Plus CE version: `make port TARGET=ti84ce` (the CE C toolchain), `make -C ce -f host.mk test` on a computer.diff --git a/games/fnaf/ce/src/view.c b/games/fnaf/ce/src/view.cindex 33809dfc..7d51ea30 100644--- a/games/fnaf/ce/src/view.c+++ b/games/fnaf/ce/src/view.c@@ -484,6 +484,21 @@ static int hallucination(int grp) {return pic_group_of(pic);}+/* a frame of the monitor coming up or down (half the screen's size, independent): straight onto the screen, twice+ * across into every other row, then each row twice */+static int monitor(int pic) {+ const uint8_t *p = asset(PIC_FIRST + pic);+ if (pic_base(p) >= 0 || pic_keeps(p)) {+ extra_want(pic, 160);+ d_blit2(extra, 160, 0, UI_BLACK);+ } else {+ pic_into_wide(pic, scr, 2 * SCR_W);+ for (uint8_t *r = scr; r < scr + SCR_W * SCR_H; r += 2 * SCR_W) memcpy(r + SCR_W, r, SCR_W);+ d_touch = BOX_ALL;+ }+ return pic_group_of(pic);+}+/* the night: paused, the picture only, darker */static void night_draw(bool paused);static void office_frame(void) { night_draw(false); }@@ -495,18 +510,18 @@ static void night_frame(bool paused) {static void night_draw(bool paused) {bool cams = N.flip >= 1 && !N.dark;- int grp;+ int grp, k = (int)(N.flip * FLIP_N); /* (the monitor's frame coming up or down) */+ k = k < FLIP_N ? k : FLIP_N - 1;if (cams) {grp = cameras(paused);+ } else if (N.flip > 0 && !N.dark) { /* the monitor over the whole screen: the office only made ready behind */+ office_pictures();+ scene_want(PIC_OFFICE);+ grp = monitor(PIC_FLIP0 + k);+ pal_set(grp, paused ? 9 : 32, 0);} else {grp = office();- if (N.flip > 0) { /* the monitor coming up, or down */- int k = (int)(N.flip * FLIP_N);- k = k < FLIP_N ? k : FLIP_N - 1;- extra_want(PIC_FLIP0 + k, 160);- d_blit2(extra, 160, 0, UI_BLACK);- grp = pic_group_of(PIC_FLIP0 + k);- }+ if (N.flip > 0) grp = monitor(PIC_FLIP0 + k);pal_set(grp, paused ? 9 : 32, 0);}if (paused) return;