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.

Level Devil: warps drawn as rings, the menus pictured on a computer

Mason3633729178450c2
diff --git a/games/leveldevil/src/main.c b/games/leveldevil/src/main.c
index 73cf3645..3d9f1da9 100644
--- a/games/leveldevil/src/main.c
+++ b/games/leveldevil/src/main.c
@@ -489,7 +489,7 @@ static void draw_object(const obj_t *o, int blocks) {
for (int e = 0; e < 2; e++) {
int ex = (e ? r[3] : x) * G + 8, ey = (e ? r[4] : y) * G + 12;
gfx_rrect(ex - 8, ey - 12, 16, 24, 8, WHITE, 256);
- gfx_rrect(ex - 5, ey - 9, 10, 18, 5, fg, 256);
+ gfx_rrect(ex - 5, ey - 9, 10, 18, 5, bg, 256);
}
} else if (kind == K_BUTTON) { /* (a ghost one: on a ceiling) */
int down = touching(o), up = r[0] & F_GHOST;
diff --git a/games/leveldevil/tests/play.c b/games/leveldevil/tests/play.c
index 9cab617e..06b4c9cc 100644
--- a/games/leveldevil/tests/play.c
+++ b/games/leveldevil/tests/play.c
@@ -268,6 +268,23 @@ int main(int argc, char **argv) {
return 0;
}
if (argc < 2) return 2;
+ if (!strcmp(argv[1], "screens") && argc > 2) { /* the map, the menus and the end, with some progress */
+ static const struct {
+ int scr, ov, sel;
+ const char *name;
+ } screens[] = {{SC_HUB, OV_NONE, 0, "map"}, {SC_HUB, OV_HELP, 0, "help"}, {SC_PLAY, OV_PAUSE, 1, "pause"},
+ {SC_PLAY, OV_QUIT, 1, "quit"}, {SC_HUB, OV_END, 0, "end"}, {SC_HUB, OV_NONE, 0, "banner"}};
+ setup(15, 4, 0);
+ sv.open = 12, sv.done = 0x7FF, sv.deaths = 173, sv.sel = 6, sv.run = 4;
+ for (int i = 0; i < LEVELS; i++) sv.best[i] = (uint16_t)(i * 3 % 7);
+ for (unsigned i = 0; i < sizeof screens / sizeof screens[0]; i++) {
+ scr = screens[i].scr, ov = screens[i].ov, sel = screens[i].sel, banner = i == 5 ? 4 : 0;
+ gfx_render(scr == SC_HUB ? hub_scene : play_scene, 0, 0, SCREEN_H);
+ snprintf(path, sizeof path, "%s/%s.ppm", argv[2], screens[i].name);
+ picture(path);
+ }
+ return 0;
+ }
if (!strcmp(argv[1], "rooms") && argc > 2) {
for (int i = 0; i < ROOM_COUNT; i++) {
setup(i / ROOMS, i % ROOMS, 0);