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.

Famidash: the level's columns past the NES's right edge are drawn too

Mason363f0414d0f6fcc
diff --git a/games/famidash/src/game.c b/games/famidash/src/game.c
index 400d2626..faf6cbaa 100644
--- a/games/famidash/src/game.c
+++ b/games/famidash/src/game.c
@@ -2807,6 +2807,13 @@ static void draw_margin_objects(void) {
void game_draw(void) {
oam_clear();
build_tables();
+ /* the columns this wider screen shows past the NES's right edge (the decoder runs ahead; the
+ * collision map still takes them in at the NES's pace) */
+ if (!(scroll_x & 0x80000000u)) {
+ int32_t want = (int32_t)((scroll_x + NES_X0 + 256 + 15) >> 4) + 1;
+ if (want > coll_cols + 15) want = coll_cols + 15;
+ decode_to(want);
+ }
if (!(invisible | player_invis)) {
playerSpriteFirst = process_player_sprite(0);
if (dual) {
diff --git a/games/famidash/tests/bot.c b/games/famidash/tests/bot.c
index a73a169c..427c8c5f 100644
--- a/games/famidash/tests/bot.c
+++ b/games/famidash/tests/bot.c
@@ -36,7 +36,7 @@ static uint64_t hash_state(void) {
}
#define MAXF 9000
-#define HSIZE (1 << 24)
+#define HSIZE (1 << 25)
static uint64_t *seen;
static uint8_t hold[MAXF];
static long nodes;