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
Hollow Knight: the soul orb fills with soul
Mason363a60cae6d3273
diff --git a/games/hollowknight/src/hud.c b/games/hollowknight/src/hud.cindex ac86ad40..783feed3 100644--- a/games/hollowknight/src/hud.c+++ b/games/hollowknight/src/hud.c@@ -142,14 +142,14 @@ void hud_draw(void) {if (!hd.started || hd.off) return;float k = hd.scale;uint8_t white = gfx_dyn_tint(16, 255, 255, 255, 255);- /* the soul orb: its liquid (in the orb's circle), the frame over it */+ /* the soul orb: the frame (its dark glass filling the orb), its liquid over that, in the orb's circle */+ hud_sprite(hd.frame.sprite, ORB_X + 0.12f, ORB_Y + 0.92f, 1, white, 0);if (g_pd.mp > 1 && !hd.out) { /* (the liquid's renderer off while the HUD is out) */float y = FILL_Y + LIQUID_BOTTOM_Y + g_pd.mp * LIQUID_Y_PER_MP;uint8_t g = (uint8_t)(255 - (255 - 110) * hd.liquid_grey);gfx_hud_clip(1, CANVAS_X + (FILL_X - 2.28f - CANVAS_X) * k, CANVAS_Y + (FILL_Y + 1.32f - CANVAS_Y) * k, 0.97f * k);hud_sprite(hd.liquid.sprite, FILL_X - 2.23f, y, 1, gfx_dyn_tint(17, g, g, g, 255), 1);}- hud_sprite(hd.frame.sprite, ORB_X + 0.12f, ORB_Y + 0.92f, 1, white, 0);if (hd.burst_on) hud_sprite(hd.burst.sprite, ORB_X - 0.715f, ORB_Y + 0.4318f, 1, white, 0);/* the masks */int max = g_pd.max_health > MAX_MASKS ? MAX_MASKS : g_pd.max_health;diff --git a/games/hollowknight/tests/check.py b/games/hollowknight/tests/check.pyindex 5aac72fb..cb6856c3 100644--- a/games/hollowknight/tests/check.py+++ b/games/hollowknight/tests/check.py@@ -12,6 +12,7 @@- a long walk of made up keys from every room: the Knight never out of the room, without control, wedged, undrawn orout of the view, and the view never jumping- a bench: sat on, the inventory opened, a charm equipped, then up again (atBench off)+- the soul orb: dark with no soul, white with its liquid when full- the charms: OK changes none away from a bench; at one, equipped (its effect on), none past the notches, unequipped,overcharmed on the fifth try and off again, kept by Home in the inventory and a load- the stag stations: each seen (their blanker faded out), come in by its gate, by the stag (called by its bell) and@@ -82,6 +83,19 @@ def main():results.append(report("stag stations: seen, the rides", rc, out, ("FAIL",)))rc, out = play("--gates", "way")results.append(report("the way to the False Knight", rc, out, ("FAIL",)))+ # the soul orb: dark inside with no soul, its liquid white in it when full (in the screen's pixels at its middle)+ shades = []+ with tempfile.TemporaryDirectory() as d:+ for mp in (0, 99):+ path = os.path.join(d, "orb%d.ppm" % mp)+ rc, out = play("--room", "Town", "--at", "60,12", "--play", "_*130", "--shot", path, env={"HKMP": str(mp)})+ with open(path, "rb") as f:+ _, size, _, px = f.read().split(b"\n", 3)+ w = int(size.split()[0])+ shades.append(sum(px[(y * w + x) * 3 + c] for y in range(42, 52) for x in range(12, 22) for c in range(3)) / 300)+ orb = shades[0] < 80 and shades[1] > 200+ results.append(report("the soul orb filled", rc, out if orb else out + "\nFAIL its middle: %.0f empty, %.0f full" % tuple(shades),+ ("FAIL",)))with ThreadPoolExecutor(JOBS) as pool:walks = list(pool.map(lambda w: play("--gates", "wander:all:%d:%d" % w, env={"HKFAST": "1"} if w[0] % 2 else None), WALKS))for (seed, ticks), (rc, out) in zip(WALKS, walks):