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.

Celeste, Hollow Knight: icons rounded as NumPlay's, on black; Hollow Knight: how to play (the keys, as the Keyboard screen shows them, then the basics) before a new game, and from the title and the pause menu

Mason Chend0879846b88b
diff --git a/games/celeste/src/icon.png b/games/celeste/src/icon.png
index 3a49a8ab..e7a279e6 100644
Binary files a/games/celeste/src/icon.png and b/games/celeste/src/icon.png differ
diff --git a/games/hollowknight/README.md b/games/hollowknight/README.md
index d8ba127c..0c9ab7a9 100644
--- a/games/hollowknight/README.md
+++ b/games/hollowknight/README.md
@@ -46,7 +46,7 @@
## How to play
-Choose Start Game, then a save. A new game starts with the Knight falling into King's Pass. Walk on to Dirtmouth and down the well into the Forgotten Crossroads.
+Choose Start Game, then a save. A new game first shows how to play: which key does what, then the basics. You can see them again with How to Play, on the title screen and in the pause menu. Then the Knight falls into King's Pass. Walk on to Dirtmouth and down the well into the Forgotten Crossroads.
Hit enemies with the nail to fill your soul, then hold the spell key to focus it into health. Rest at benches to save and to change charms. When you die you lose your geo and leave a shade behind: defeat it to get them back.
diff --git a/games/hollowknight/src/data.bin b/games/hollowknight/src/data.bin
index 5170b569..7dce8cfd 100644
Binary files a/games/hollowknight/src/data.bin and b/games/hollowknight/src/data.bin differ
diff --git a/games/hollowknight/src/data.h b/games/hollowknight/src/data.h
index 58fc504d..f6e0b9c4 100644
--- a/games/hollowknight/src/data.h
+++ b/games/hollowknight/src/data.h
@@ -996,7 +996,8 @@
#define MENU_LOGO {2903, 0.0000f, 0.0000f, 1.0000f, 1.0000f}
#define MENU_LOGO_Y 3.6585f
#define MENU_START_Y -1.4181f
-#define MENU_QUIT_Y -2.3582f
+#define MENU_HELP_Y -2.3582f
+#define MENU_QUIT_Y -3.2982f
#define MENU_POINTER {2904, 0.0000f, 0.0000f, 1.0023f, 1.0000f}
#define MENU_POINTER_GAP 0.7525f
#define MENU_PROFILES_TITLE_Y 6.4481f
@@ -1045,8 +1046,15 @@
#define MENU_PAUSE_TOP_Y 2.3653f
#define MENU_PAUSE_BOT {2918, 0.0000f, 0.0000f, 1.0000f, 1.0000f}
#define MENU_PAUSE_BOT_Y -1.8877f
-#define MENU_PAUSE_CONTINUE_Y 0.6428f
-#define MENU_PAUSE_QUIT_Y -0.4548f
+#define MENU_PAUSE_CONTINUE_Y 1.1916f
+#define MENU_PAUSE_HELP_Y 0.0940f
+#define MENU_PAUSE_QUIT_Y -1.0035f
+#define MENU_KEYS_TITLE_Y 5.7763f
+#define MENU_KEYS_FLEUR {2905, 0.0000f, 0.0000f, 1.0000f, 1.0807f}
+#define MENU_KEYS_FLEUR_Y 4.7346f
+#define MENU_KEYS_ROW_Y 3.1809f
+#define MENU_KEYS_DY -1.0162f
+#define MENU_KEYS_BUTTON_Y -5.8306f
#define TXT_MAIN_START 201
#define TXT_MAIN_QUIT 202
#define TXT_PROFILE_NEW_GAME 203
@@ -1059,7 +1067,14 @@
#define TXT_PAUSE_MAIN 210
#define TXT_PROFILE_CORRUPTED 211
#define TXT_SCREEN_SAVE_PROFILES 212
-#define TXT_ZONES {213, 214, 215, 216, 217}
+#define TXT_SCREEN_KEYBOARD 213
+#define MENU_KEYS {{214, 225}, {215, 226}, {216, 227}, {217, 228}, {218, 229}, {219, 230}, {220, 231}, {221, 232}, {222, 233}, {223, 234}, {224, 235}}
+#define MENU_NKEYS 11
+#define TXT_HELP 236
+#define TXT_HELP_TITLE 237
+#define TXT_NEXT 238
+#define TXT_HELP_LINES 239
+#define TXT_ZONES {240, 241, 242, 243, 244}
#define INV_X -4.0500f
#define INV_Y 7.5500f
#define INV_BORDER {{2919, -8.0000f, -2.8100f, 1.0000f, 1.0000f}, {2919, 16.1400f, -2.8100f, -1.0000f, 1.0000f}, {2920, -8.0000f, -12.8700f, 0.9877f, -1.0000f}, {2921, 16.2400f, -12.8700f, -1.0000f, -1.0000f}, {2922, 3.9400f, -0.6200f, 1.0000f, 1.0000f}, {2923, 4.0000f, -14.3600f, 1.0000f, 1.0000f}}
@@ -1072,7 +1087,7 @@
#define INV_PANE_NAME {3.9500f, -0.0745f, 8.3290f}
#define INV_PANE_NAME_L {-9.4745f, -0.0646f, 8.3290f}
#define INV_PANE_NAME_R {17.6945f, -0.0646f, 8.3290f}
-#define TXT_INV_PANES {220, 221, 222, 223}
+#define TXT_INV_PANES {247, 248, 249, 250}
#define CH_BB {2927, -7.9200f, -8.3700f, 1.0000f, 1.0000f}
#define CH_BB_POS {{-7.9200f, -8.3700f}, {-6.4200f, -8.3700f}, {-4.9200f, -8.3400f}, {-3.4200f, -8.3400f}, {-1.9200f, -8.3400f}, {-0.4200f, -8.3400f}, {1.0800f, -8.3400f}, {2.5800f, -8.3400f}, {4.0800f, -8.3400f}, {5.5800f, -8.3400f}, {-7.0100f, -9.7900f}, {-5.5100f, -9.7900f}, {-4.0100f, -9.7900f}, {-2.5100f, -9.7900f}, {-1.0100f, -9.7900f}, {0.4900f, -9.7900f}, {1.9900f, -9.7900f}, {3.4900f, -9.7900f}, {4.9900f, -9.7900f}, {6.4900f, -9.7900f}, {-7.9200f, -11.2600f}, {-6.4200f, -11.2600f}, {-4.9200f, -11.2600f}, {-3.4200f, -11.2600f}, {-1.9200f, -11.2600f}, {-0.4200f, -11.2600f}, {1.0800f, -11.2600f}, {2.5800f, -11.2600f}, {4.0800f, -11.2600f}, {5.5800f, -11.2600f}, {-7.0100f, -12.7200f}, {-5.5100f, -12.7200f}, {-4.0100f, -12.7200f}, {-2.5100f, -12.7200f}, {-1.0100f, -12.7200f}, {0.4900f, -12.7200f}, {1.9900f, -12.7200f}, {3.4900f, -12.7200f}, {4.9900f, -12.7200f}, {6.4900f, -12.7200f}}
#define CH_BB_BOX {1.5002f, 1.4969f, -0.0257f, 0.0685f}
@@ -1108,17 +1123,17 @@
#define CH_CURSOR {2934, 0.0000f, 0.0000f, 1.0000f, 0.9756f}
#define CH_CURSOR_K {1.0720f, 1.0458f}
#define CH_CURSOR_CORNERS {{1.0000f, 1.0000f}, {-1.1000f, 1.0000f}, {1.0000f, -1.0089f}, {-1.1000f, -1.0089f}}
-#define TXT_CHARM_TXT_EQUIPPED 224
-#define TXT_CHARM_TXT_OVERCHARMED 225
-#define TXT_CHARM_TXT_COST 226
-#define TXT_CTRL_EQUIP 227
-#define TXT_CTRL_UNEQUIP 228
-#define TXT_CHARM_ALERT_NONE 229
-#define TXT_CHARM_ALERT_NONE_BENCH 230
-#define TXT_CHARM_NOTCHES 231
-#define TXT_CHARM_NAMES_INV {-1, 232, 233, 234, 235, -1, 236, 237, 238, -1, -1, -1, -1, -1, 239, -1, -1, -1, 240, 241, 242, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}
-#define TXT_CHARM_DESCS {-1, 243, 244, 245, 246, -1, 247, 248, 249, -1, -1, -1, -1, -1, 250, -1, -1, -1, 251, 252, 253, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}
-#define TXT_KEY_OK 254
+#define TXT_CHARM_TXT_EQUIPPED 251
+#define TXT_CHARM_TXT_OVERCHARMED 252
+#define TXT_CHARM_TXT_COST 253
+#define TXT_CTRL_EQUIP 254
+#define TXT_CTRL_UNEQUIP 255
+#define TXT_CHARM_ALERT_NONE 256
+#define TXT_CHARM_ALERT_NONE_BENCH 257
+#define TXT_CHARM_NOTCHES 258
+#define TXT_CHARM_NAMES_INV {-1, 259, 260, 261, 262, -1, 263, 264, 265, -1, -1, -1, -1, -1, 266, -1, -1, -1, 267, 268, 269, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}
+#define TXT_CHARM_DESCS {-1, 270, 271, 272, 273, -1, 274, 275, 276, -1, -1, -1, -1, -1, 277, -1, -1, -1, 278, 279, 280, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}
+#define TXT_KEY_OK 281
#define INV_FIXED {{2935, -7.1600f, -3.8300f, 1.0000f, 1.0000f}, {2936, -3.2500f, -4.2100f, 1.0000f, 1.0000f}, {2937, -7.2900f, -9.4400f, 1.0000f, 1.0000f}, {2938, -4.7200f, -6.2100f, 1.0000f, 1.0000f}, {2939, -3.2700f, -7.4600f, 1.0000f, 1.0000f}, {2940, -5.7200f, -13.3200f, 1.0000f, 1.0000f}}
#define INV_FIXED_BG {{-1, 0, 0, 0, 0}, {-1, 0, 0, 0, 0}, {-1, 0, 0, 0, 0}, {2941, -4.6374f, -6.2413f, 1.0000f, 1.0000f}, {2942, -3.2774f, -7.4713f, 1.0000f, 1.0000f}, {-1, 0, 0, 0, 0}}
#define INV_FIXED_BOX {{1.9363f, 2.9287f, -0.0651f, 0.0923f}, {1.4420f, 1.4140f, -0.0546f, 0.0682f}, {1.6244f, 5.3245f, 0.0126f, 0.1884f}, {1.7500f, 1.7500f, 0.0000f, 0.0000f}, {1.8505f, 1.8756f, -0.0503f, 0.0629f}, {7.8215f, 1.4409f, 1.7816f, -0.0205f}}
@@ -1138,12 +1153,12 @@
#define INV_DIVIDERS {{2961, -0.1800f, -7.5100f, 1.0000f, 0.2443f, -90.0000f}, {2961, 8.7300f, -7.5100f, 1.0000f, 0.2443f, -90.0000f}}
#define INV_NAME {12.9500f, -1.9345f, 8.3290f}
#define INV_DESC {9.2144f, -3.1678f, 7.6475f}
-#define TXT_INV_HEART {{255, 256}, {257, 258}, {259, 260}, {257, 261}, {257, 262}, {263, 264}}
-#define TXT_INV_VESSEL {{255, 256}, {265, 266}, {267, 268}, {265, 269}, {270, 271}}
-#define TXT_INV_FIXED {{272, 273}, {274, 275}, {276, 277}, {278, 279}}
-#define TXT_INV_EQ {{280, 281}, {282, 283}, {284, 285}, {286, 287}, {288, 289}, {290, 291}}
-#define TXT_INV_QUILL {292, 293, 294, 295}
-#define TXT_INV_TRINKETS {{296, 297}, {298, 299}, {300, 301}, {302, 303}}
+#define TXT_INV_HEART {{282, 283}, {284, 285}, {286, 287}, {284, 288}, {284, 289}, {290, 291}}
+#define TXT_INV_VESSEL {{282, 283}, {292, 293}, {294, 295}, {292, 296}, {297, 298}}
+#define TXT_INV_FIXED {{299, 300}, {301, 302}, {303, 304}, {305, 306}}
+#define TXT_INV_EQ {{307, 308}, {309, 310}, {311, 312}, {313, 314}, {315, 316}, {317, 318}}
+#define TXT_INV_QUILL {319, 320, 321, 322}
+#define TXT_INV_TRINKETS {{323, 324}, {325, 326}, {327, 328}, {329, 330}}
#define SHOP_BACKBOARD {2962, 4.9000f, -0.3200f, 0.8667f, 1.0000f}
#define SHOP_MASK_TOP {2963, 5.1230f, 4.8800f, 1.0000f, 0.9013f}
#define SHOP_MASK_BOTTOM {2964, 5.1537f, -5.6200f, 1.0000f, 0.8820f}
@@ -1155,7 +1170,7 @@
#define SHOP_POINTER_R {2968, 6.6249f, -2.0798f, -1.0000f, 1.0000f}
#define SHOP_MASK_A {0, 0, 255, 255, 255, 255, 255, 254, 249, 230, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 73, 134, 178, 204, 226, 223, 0, 0, 0, 0, 0, 0}
#define SHOP_CONFIRM_ITEM {5.0900f, 2.4700f}
-#define TXT_KEY_BACK 305
+#define TXT_KEY_BACK 332
#define SHOP_BACKBOARD_A 0.8910f
#define SHOP_BORDERS {{5.1437f, 3.6600f, 1.1244f, 1.0000f, CLIP_SHOPUI_SHOP_MENU_TOP_UP, CLIP_SHOPUI_SHOP_MENU_TOP_DOWN, 0.0000f}, {5.1937f, -5.7000f, 1.1338f, 1.0000f, CLIP_SHOPUI_SHOP_MENU_BOTTOM_UP, CLIP_SHOPUI_SHOP_MENU_BOTTOM_DOWN, 0.0000f}}
#define SHOP_FIGUREHEADS {{5.1437f, 6.6400f, 1.0000f, 1.0000f, CLIP_SHOPUI_SHOP_FIGUREHEAD_SLY_UP, CLIP_SHOPUI_SHOP_FIGUREHEAD_SLY_DOWN, 0.3500f}, {5.1437f, 6.7400f, 1.0000f, 1.0000f, CLIP_SHOPUI_SHOP_FIGUREHEAD_MAPPERWIFE_UP, CLIP_SHOPUI_SHOP_FIGUREHEAD_MAPPERWIFE_DOWN, 0.3500f}, {5.1437f, 6.8300f, 1.0000f, 1.0000f, CLIP_SHOPUI_SHOP_FIGUREHEAD_SLUG_UP, CLIP_SHOPUI_SHOP_FIGUREHEAD_SLUG_DOWN, 0.3500f}}
@@ -1183,24 +1198,24 @@
#define SHOP_ROW_TOP 4.9000f
#define SHOP_ROW_BOTTOM -5.2500f
#define SHOP_ARROW_BOB 0.1500f
-#define TXT_SHOP_CTRL_BUY 308
-#define TXT_SHOP_CTRL_EXIT 309
-#define TXT_SHOP_CTRL_CONFIRM 310
-#define TXT_SHOP_CTRL_CANCEL 311
-#define TXT_SHOP_SHOP_PURCHASE_CONFIRM 312
-#define TXT_SHOP_SHOP_PURCHASE_COMPLETE 313
-#define TXT_SHOP_CHARM_TXT_NOTCHCOST 314
-#define TXT_SHOP_YES 315
-#define TXT_SHOP_NO 316
+#define TXT_SHOP_CTRL_BUY 335
+#define TXT_SHOP_CTRL_EXIT 336
+#define TXT_SHOP_CTRL_CONFIRM 337
+#define TXT_SHOP_CTRL_CANCEL 338
+#define TXT_SHOP_SHOP_PURCHASE_CONFIRM 339
+#define TXT_SHOP_SHOP_PURCHASE_COMPLETE 340
+#define TXT_SHOP_CHARM_TXT_NOTCHCOST 341
+#define TXT_SHOP_YES 342
+#define TXT_SHOP_NO 343
#define SHOP_DESC_BOTTOM -5.0500f
-#define SHOP_ITEMS {{2971, 0.5714f, 317, 318, 150, 1, 125, -1, 0, 0}, {2971, 0.5714f, 317, 319, 500, 1, 126, 125, 0, 0}, {2972, 0.5714f, 320, 321, 550, 3, 127, -1, 0, 0}, {2973, 0.5714f, 322, 323, 950, 10, 128, -1, 0, 0}, {2974, 0.5714f, 324, 325, 300, 2, 37, -1, 0, 1}, {2975, 0.5714f, 326, 327, 200, 2, 40, -1, 0, 4}, {2976, 0.5714f, 328, 329, 1800, 0, 119, -1, 0, 0}, {2977, 0.5714f, 330, 331, 60, 11, 129, -1, 0, 0}, {2978, 0.5714f, 332, 333, 220, 2, 38, -1, 0, 2}, {2979, 0.5714f, 334, 335, 120, 0, 2, -1, 0, 0}, {2980, 0.5714f, 336, 337, 40, 9, 130, 10, 0, 0}, {2980, 0.5714f, 338, 339, 80, 9, 131, 28, 0, 0}, {2981, 0.5714f, 340, 341, 100, 16, 133, -1, 0, 0}, {2982, 0.5714f, 342, 343, 100, 16, 134, -1, 0, 0}, {2983, 0.5714f, 344, 345, 100, 16, 135, -1, 0, 0}, {2984, 0.5714f, 346, 347, 100, 16, 137, 147, 0, 0}, {2985, 0.5714f, 348, 349, 100, 16, 136, -1, 0, 0}, {2986, 0.5714f, 350, 351, 100, 17, 139, -1, 0, 0}, {2987, 0.5714f, 352, 353, 100, 17, 140, -1, 0, 0}, {2988, 0.5714f, 354, 355, 100, 17, 141, 14, 0, 0}, {2989, 0.5714f, 356, 357, 210, 17, 142, 14, 0, 0}, {2990, 0.5714f, 358, 359, 250, 2, 44, -1, 0, 8}, {2991, 0.5714f, 360, 361, 300, 2, 54, -1, 0, 18}, {2992, 0.5714f, 362, 363, 120, 2, 50, -1, 0, 14}, {2993, 0.5714f, 364, 365, 220, 2, 55, -1, 0, 19}, {2994, 0.5714f, 366, 367, 800, 2, 43, -1, 0, 7}, {2995, 0.5714f, 368, 369, 120, 8, 143, -1, 5, 0}, {2995, 0.5714f, 368, 369, 500, 8, 144, -1, 10, 0}, {2995, 0.5714f, 368, 369, 900, 8, 145, -1, 18, 0}, {2995, 0.5714f, 368, 370, 1400, 8, 146, -1, 25, 0}}
+#define SHOP_ITEMS {{2971, 0.5714f, 344, 345, 150, 1, 125, -1, 0, 0}, {2971, 0.5714f, 344, 346, 500, 1, 126, 125, 0, 0}, {2972, 0.5714f, 347, 348, 550, 3, 127, -1, 0, 0}, {2973, 0.5714f, 349, 350, 950, 10, 128, -1, 0, 0}, {2974, 0.5714f, 351, 352, 300, 2, 37, -1, 0, 1}, {2975, 0.5714f, 353, 354, 200, 2, 40, -1, 0, 4}, {2976, 0.5714f, 355, 356, 1800, 0, 119, -1, 0, 0}, {2977, 0.5714f, 357, 358, 60, 11, 129, -1, 0, 0}, {2978, 0.5714f, 359, 360, 220, 2, 38, -1, 0, 2}, {2979, 0.5714f, 361, 362, 120, 0, 2, -1, 0, 0}, {2980, 0.5714f, 363, 364, 40, 9, 130, 10, 0, 0}, {2980, 0.5714f, 365, 366, 80, 9, 131, 28, 0, 0}, {2981, 0.5714f, 367, 368, 100, 16, 133, -1, 0, 0}, {2982, 0.5714f, 369, 370, 100, 16, 134, -1, 0, 0}, {2983, 0.5714f, 371, 372, 100, 16, 135, -1, 0, 0}, {2984, 0.5714f, 373, 374, 100, 16, 137, 147, 0, 0}, {2985, 0.5714f, 375, 376, 100, 16, 136, -1, 0, 0}, {2986, 0.5714f, 377, 378, 100, 17, 139, -1, 0, 0}, {2987, 0.5714f, 379, 380, 100, 17, 140, -1, 0, 0}, {2988, 0.5714f, 381, 382, 100, 17, 141, 14, 0, 0}, {2989, 0.5714f, 383, 384, 210, 17, 142, 14, 0, 0}, {2990, 0.5714f, 385, 386, 250, 2, 44, -1, 0, 8}, {2991, 0.5714f, 387, 388, 300, 2, 54, -1, 0, 18}, {2992, 0.5714f, 389, 390, 120, 2, 50, -1, 0, 14}, {2993, 0.5714f, 391, 392, 220, 2, 55, -1, 0, 19}, {2994, 0.5714f, 393, 394, 800, 2, 43, -1, 0, 7}, {2995, 0.5714f, 395, 396, 120, 8, 143, -1, 5, 0}, {2995, 0.5714f, 395, 396, 500, 8, 144, -1, 10, 0}, {2995, 0.5714f, 395, 396, 900, 8, 145, -1, 18, 0}, {2995, 0.5714f, 395, 397, 1400, 8, 146, -1, 25, 0}}
#define SHOP_FIRST {0, 8, 21, 30}
#define SHOP_ROW_GEO {2970, 1.4551f, 0.0000f, 1.0000f, 1.0000f}
#define SHOP_ROW_COST {1.8423f, 0.2885f}
#define SHOP_ACTIVE_RGB {255, 255, 255}
#define SHOP_INACTIVE_RGB {141, 141, 141}
#define SHOP_ROOMS {"Room_shop", "Room_mapper", "Room_Charm_Shop"}
-#define SHOP_NOSTOCK {372, 373, 374}
+#define SHOP_NOSTOCK {399, 400, 401}
#define SHOP_TITLES {TITLE_SLY, TITLE_ISELDA, TITLE_CHARM_SLUG}
#define SHOP_N 3
#define COLLECT_FLEUR {0.0000f, 0.0000f, 0.0000f, 1.0000f}
@@ -1226,24 +1241,24 @@
#define STAG_LIST_KNIGHT {3001, -10.5102f, 4.6056f, 1.0000f, 1.0000f}
#define STAG_DIVIDER {3004, -7.6003f, 5.2734f, -1.0000f, -0.8696f}
#define STAG_T_STATIONS {-7.5992f, 6.0194f, 5.8145f}
-#define TXT_STAG_STATIONS 375
-#define TXT_STAG_NAMES {376, 336, 338}
+#define TXT_STAG_STATIONS 402
+#define TXT_STAG_NAMES {403, 363, 365}
#define STAG_NAMES_STR {124, 123, 127}
#define STAG_BORDER_TOP {-0.0963f, 7.0185f, 0.9784f, 1.0028f, CLIP_STAGUI_STAG_BORDER_TOP_UP, CLIP_STAGUI_STAG_BORDER_TOP_DOWN, 0}
#define STAG_BORDER_BOTTOM {-0.0638f, -6.5632f, 0.9165f, 0.9394f, CLIP_STAGUI_STAG_BORDER_BOTTOM_UP, CLIP_STAGUI_STAG_BORDER_BOTTOM_DOWN, 0}
#define STAG_T_ACT_CONFIRM {11.1713f, -4.5306f, 15.3500f}
#define STAG_KEY_CONFIRM {11.7464f, -4.7993f}
-#define TXT_STAG_CTRL_TRAVEL 377
+#define TXT_STAG_CTRL_TRAVEL 404
#define STAG_T_ACT_CANCEL {11.1713f, -5.3525f, 15.3500f}
#define STAG_KEY_CANCEL {11.7464f, -5.6213f}
-#define TXT_STAG_CTRL_CANCEL 311
+#define TXT_STAG_CTRL_CANCEL 338
#define STAG_SCENES_STR {137, 136, 138}
#define STAG_SCENES_ROOM {4, 19, 36}
-#define MAP_AREAS {{0, 2, -1, 4.0700f, -11.6200f, 381, 0x14u}, {2, 24, 130, -0.0400f, -7.8800f, 384, 0x400020u}, {26, 16, 131, 16.3100f, -7.8700f, 385, 0x40u}}
+#define MAP_AREAS {{0, 2, -1, 4.0700f, -11.6200f, 408, 0x14u}, {2, 24, 130, -0.0400f, -7.8800f, 411, 0x400020u}, {26, 16, 131, 16.3100f, -7.8700f, 412, 0x40u}}
#define MAP_ROOMS {{0, 1, 3005, 3006, -1.9230f, 7.6490f, 4.0800f, 2.1400f, 0xB6B6B6, 1}, {0, 0, 3012, 3013, -5.4430f, 7.4690f, 2.9600f, 1.4800f, 0x636363, 1}, {1, 12, -1, -1, -1.5030f, 5.1050f, 0.0000f, 0.0000f, 0x000000, 0}, {1, 38, 3015, -1, 0.8660f, 4.8850f, 1.8700f, 0.4300f, 0xB5DDFB, 0}, {1, 255, 3016, 3017, 3.3290f, 6.5270f, 0.8900f, 0.3800f, 0xB5DDFB, 1}, {1, 19, 3018, -1, 1.4650f, 4.4640f, 0.6500f, 0.3100f, 0xB5DDFB, 0}, {1, 255, 3019, 3020, 0.9410f, 4.0880f, 1.3600f, 0.3900f, 0xB5DDFB, 1}, {1, 15, 3021, 3022, 1.6660f, 6.5240f, 1.3000f, 0.3400f, 0xB5DDFB, 1}, {1, 9, 3023, -1, -3.0980f, 6.4880f, 1.1110f, 0.4800f, 0xB5DDFB, 0}, {1, 10, 3025, 3026, -2.2270f, 4.6390f, 0.6800f, 0.8600f, 0xB5DDFB, 1}, {1, 25, 3027, -1, -0.6440f, 4.4430f, 0.7000f, 0.3700f, 0xB5DDFB, 0}, {1, 14, 3029, 3030, 0.8660f, 4.8850f, 1.8584f, 0.5000f, 0xB5DDFB, 1}, {1, 20, 3031, 3032, 2.0720f, 3.8620f, 0.9500f, 0.7900f, 0xB5DDFB, 1}, {1, 17, 3033, 3034, 1.6240f, 5.9190f, 1.3800f, 0.5200f, 0xB5DDFB, 1}, {1, 16, 3035, 3036, 2.6280f, 6.1870f, 0.7000f, 1.0300f, 0xB5DDFB, 1}, {1, 255, 3037, 3038, -0.3640f, 4.0580f, 1.2500f, 0.3500f, 0xB5DDFB, 1}, {1, 255, 3039, 3040, -3.1500f, 4.3130f, 1.1700f, 0.3500f, 0xB5DDFB, 1}, {1, 26, 3041, -1, -3.7180f, 5.7650f, 2.3517f, 0.4300f, 0xB5DDFB, 0}, {1, 13, 3043, 3044, -0.5860f, 5.0990f, 1.1900f, 0.8800f, 0xB5DDFB, 1}, {1, 24, 3045, 3046, -1.4530f, 4.2330f, 0.9600f, 0.6900f, 0xB5DDFB, 1}, {1, 8, 3047, 3048, -2.2170f, 5.8440f, 0.6800f, 1.5700f, 0xB5DDFB, 1}, {1, 11, 3049, -1, -1.5030f, 5.1050f, 0.8500f, 0.8900f, 0xB5DDFB, 0}, {1, 21, 3050, -1, 3.7290f, 3.4460f, 2.4100f, 0.6600f, 0xB5DDFB, 0}, {1, 18, 3052, 3053, 2.0240f, 4.9490f, 0.5900f, 1.4673f, 0xB5DDFB, 1}, {1, 6, 3054, 3055, 0.3470f, 6.6100f, 1.3800f, 0.5000f, 0xB5DDFB, 1}, {1, 5, 3056, 3057, -1.1130f, 6.6140f, 1.5800f, 0.7500f, 0xB5DDFB, 1}, {2, 255, 3058, 3059, -6.5180f, 4.0350f, 1.0100f, 0.8900f, 0xCFFFC3, 1}, {2, 33, 3060, 3061, -10.8980f, 6.4740f, 1.3600f, 0.7100f, 0xCFFFC3, 1}, {2, 32, 3062, 3063, -11.2830f, 5.0920f, 0.5900f, 2.1300f, 0xCFFFC3, 1}, {2, 255, 3064, 3065, -11.8520f, 3.8320f, 1.6500f, 0.4800f, 0xCFFFC3, 1}, {2, 35, 3066, -1, -12.3910f, 5.0270f, 0.5700f, 1.9700f, 0xCFFFC3, 0}, {2, 34, 3067, 3068, -12.2580f, 6.4100f, 1.3800f, 0.8200f, 0xCFFFC3, 1}, {2, 255, 3069, 3070, -7.6750f, 3.7830f, 1.3400f, 0.4200f, 0xCFFFC3, 1}, {2, 30, 3071, -1, -9.2170f, 5.6940f, 1.2300f, 0.4400f, 0xCFFFC3, 0}, {2, 36, 3072, -1, -12.9760f, 5.8120f, 0.6000f, 0.3000f, 0xCFFFC3, 0}, {2, 255, 3073, 3074, -9.6830f, 3.8190f, 2.6800f, 0.4600f, 0xCFFFC3, 1}, {2, 255, 3075, 3076, -6.8080f, 4.7040f, 2.3200f, 0.5100f, 0xCFFFC3, 1}, {2, 37, 3077, 3078, -13.6530f, 6.1350f, 1.4100f, 1.0200f, 0xCFFFC3, 1}, {2, 31, 3079, -1, -10.4130f, 5.6780f, 1.1700f, 0.5500f, 0xCFFFC3, 0}, {2, 29, 3080, 3081, -8.2930f, 5.2090f, 0.6700f, 1.2200f, 0xCFFFC3, 1}, {2, 28, 3082, 3083, -7.6430f, 5.9550f, 0.6700f, 0.7500f, 0xCFFFC3, 1}, {2, 27, 3084, 3085, -6.1000f, 5.8290f, 2.4400f, 0.6700f, 0xCFFFC3, 1}}
#define MAP_PINS {{0, 0, 3007, -2.0390f, 7.7500f, 133, -1}, {0, 0, 3008, -1.6430f, 7.7500f, 137, -1}, {0, 0, 3009, -2.4700f, 7.7500f, 135, 122}, {0, 0, 3010, -1.2540f, 7.7600f, 135, 123}, {1, 1, 3014, -6.2100f, 7.6800f, 134, -1}, {2, 1, 3014, -1.3150f, 5.0920f, 134, -1}, {5, 0, 3008, 1.2400f, 4.4520f, 137, -1}, {5, 0, 3007, 1.6210f, 4.4490f, 133, -1}, {8, 0, 3024, -3.0697f, 6.4597f, 135, -1}, {10, 0, 3007, -0.3430f, 4.4060f, 133, -1}, {10, 0, 3028, -0.7200f, 4.3930f, 136, -1}, {21, 0, 3007, -1.6940f, 5.0880f, 133, -1}, {22, 0, 3051, 4.5530f, 3.3700f, 135, 124}, {22, 0, 3007, 4.9480f, 3.3820f, 133, -1}, {27, 1, 3014, -10.9970f, 6.6240f, 134, -1}, {28, 0, 3007, -11.2580f, 4.9690f, 133, -1}, {34, 0, 3007, -12.8160f, 5.7890f, 133, -1}, {34, 0, 3008, -13.1960f, 5.7970f, 137, -1}, {40, 0, 3007, -7.6610f, 6.0700f, 133, -1}}
-#define MAP_NEXT {{0, 3011, -1.0730f, 6.4850f, 180.0000f, 380, -1.0730f, 6.1870f, 1, -1}, {17, 3042, -5.2607f, 5.8454f, 90.0000f, 382, -5.5969f, 6.0434f, 2, 16}, {25, 3011, -1.0730f, 7.2500f, 0.0000f, 379, -1.0930f, 7.9120f, 1, -1}, {41, 3011, -4.5300f, 5.8450f, -90.0000f, 380, -4.1075f, 6.0470f, 0, 6}}
-#define MAP_NAMES {{0, -1, 378, -0.2000f, 8.3901f, 0xFFFFFF, 1, 0}, {0, -1, 379, 3.3200f, 8.4801f, 0xFFFFFF, 1, 1}, {1, -1, 380, 6.7700f, 3.3701f, 0xB5DCFB, 1, 1}, {1, 21, 383, 3.4800f, 5.6971f, 0xB5DCFB, 1, 0}, {2, -1, 382, -5.0993f, 5.4501f, 0xCFFFC3, 0, 1}}
+#define MAP_NEXT {{0, 3011, -1.0730f, 6.4850f, 180.0000f, 407, -1.0730f, 6.1870f, 1, -1}, {17, 3042, -5.2607f, 5.8454f, 90.0000f, 409, -5.5969f, 6.0434f, 2, 16}, {25, 3011, -1.0730f, 7.2500f, 0.0000f, 406, -1.0930f, 7.9120f, 1, -1}, {41, 3011, -4.5300f, 5.8450f, -90.0000f, 407, -4.1075f, 6.0470f, 0, 6}}
+#define MAP_NAMES {{0, -1, 405, -0.2000f, 8.3901f, 0xFFFFFF, 1, 0}, {0, -1, 406, 3.3200f, 8.4801f, 0xFFFFFF, 1, 1}, {1, -1, 407, 6.7700f, 3.3701f, 0xB5DCFB, 1, 1}, {1, 21, 410, 3.4800f, 5.6971f, 0xB5DCFB, 1, 0}, {2, -1, 409, -5.0993f, 5.4501f, 0xCFFFC3, 0, 1}}
#define MAP_QUICK_K 1.5500f
#define MAP_SHADE {{3086, 0.0055f, -0.0110f, 178}, {3087, 0.0000f, 0.0000f, 255}}
#define MAP_MARKERS {3088, 3089, 3090, 3091}
@@ -1252,14 +1267,14 @@
#define MAP_TITLE {0.0000f, 7.5363f}
#define MAP_TITLE_BACK {3092, 0.2520f, 7.1073f, 1.0000f, 0.6696f, 246}
#define MAP_NO_MAP {3093, 0.0000f, 0.9400f}
-#define MAP_NO_MAP_MSG {386, -0.0600f, -1.2932f}
-#define MAP_MSG {-1.2900f, -6.8300f, 0.0000f, 0.0420f, 0.9865f, -0.0210f, 387, 3094, 1.9740f, -0.0840f, 1.0000f, 0.6931f, 179}
+#define MAP_NO_MAP_MSG {413, -0.0600f, -1.2932f}
+#define MAP_MSG {-1.2900f, -6.8300f, 0.0000f, 0.0420f, 0.9865f, -0.0210f, 414, 3094, 1.9740f, -0.0840f, 1.0000f, 0.6931f, 179}
#define MAP_MSG_K 0.7000f
#define FIRSTMAP_BG_A 0.6410f
-#define FIRSTMAP_TEXTS {{388, 0.0000f, 5.0305f}, {182, 0.0000f, -0.8796f}, {389, 0.0000f, -3.2895f}, {390, 0.0000f, -4.6996f}}
+#define FIRSTMAP_TEXTS {{415, 0.0000f, 5.0305f}, {182, 0.0000f, -0.8796f}, {416, 0.0000f, -3.2895f}, {417, 0.0000f, -4.6996f}}
#define FIRSTMAP_PIECES {{3095, 0.0000f, 2.1300f, 1.0000f, 1.0000f}, {3096, 0.0000f, 0.0200f, 1.0000f, 0.0771f}, {3097, 0.0000f, -6.4000f, 1.0000f, 1.0000f}}
-#define FIRSTMAP_KEY {391, 0.0900f, -2.3200f}
-#define MAP_WIDE {{{3098, 3.0400f, -6.6800f, 1.0000f, 1.0000f}, 392, {8.7184f, -6.2919f, 11.0476f}, 4.0000f, -8.6420f, 3.3800f, -7.0700f, {1000.0000f, -1000.0000f, 1000.0000f, -1000.0000f}}, {{3099, 4.2300f, -8.2600f, 1.0000f, 1.0000f}, 393, {9.9990f, -7.8578f, 11.7784f}, -0.0400f, -7.5800f, 3.0300f, -8.2300f, {1000.0000f, -1000.0000f, 1000.0000f, -1000.0000f}}, {{3100, -0.6100f, -7.9700f, 1.0000f, 1.0000f}, 394, {5.6452f, -7.7738f, 11.8448f}, 16.4200f, -7.3200f, 0.4000f, -8.5800f, {1000.0000f, 17.2600f, 1000.0000f, -6.2200f}}}
+#define FIRSTMAP_KEY {418, 0.0900f, -2.3200f}
+#define MAP_WIDE {{{3098, 3.0400f, -6.6800f, 1.0000f, 1.0000f}, 419, {8.7184f, -6.2919f, 11.0476f}, 4.0000f, -8.6420f, 3.3800f, -7.0700f, {1000.0000f, -1000.0000f, 1000.0000f, -1000.0000f}}, {{3099, 4.2300f, -8.2600f, 1.0000f, 1.0000f}, 420, {9.9990f, -7.8578f, 11.7784f}, -0.0400f, -7.5800f, 3.0300f, -8.2300f, {1000.0000f, -1000.0000f, 1000.0000f, -1000.0000f}}, {{3100, -0.6100f, -7.9700f, 1.0000f, 1.0000f}, 421, {5.6452f, -7.7738f, 11.8448f}, 16.4200f, -7.3200f, 0.4000f, -8.5800f, {1000.0000f, 17.2600f, 1000.0000f, -6.2200f}}}
#define MAP_WIDE_GREY 0x5C
#define MAP_WIDE_NAME_GREY 0x5B
#define MAP_WIDE_COMPASS_K 0.8700f
@@ -1267,14 +1282,14 @@
#define MAP_PAN {-1.4400f, 4.5500f, -8.6420f, -5.5800f}
#define MAP_PAN_SPEED 8.0000f
#define MAP_PAN_ARROWS {{3101, 3.9700f, -2.1900f, 1.0f, 0.0000f}, {3101, 4.0400f, -13.4900f, 1.0f, 180.0000f}, {3101, -9.0000f, -7.1700f, 1.0f, 90.0000f}, {3101, 17.1900f, -7.1700f, 1.0f, -90.0000f}}
-#define MAP_ACT_CONFIRM {{3102, 15.3897f, -13.3139f, 1.0000f, 0.8889f}, {16.9008f, -13.2878f}, {16.1269f, -13.0221f, 15.3500f}, {395, 396, 396}}
-#define MAP_ACT_MARKER {{3102, -6.9500f, -13.3138f, 1.0000f, 0.8889f}, {-8.5394f, -13.2877f}, {-7.7259f, -13.0223f, 7.6740f}, {397, 398, 399}}
-#define MAP_ACT_CANCEL {{3102, 15.3897f, -13.3138f, 1.0000f, 0.8889f}, {16.9008f, -13.2877f}, {16.1259f, -13.0223f, 15.3480f}, {311, 311, 311}}
-#define MAP_ACT_CHANGE {{3102, -6.9500f, -12.0238f, 1.0000f, 0.8889f}, {-8.5394f, -11.9977f}, {-7.7259f, -11.7323f, 7.6740f}, {400, 400, 400}}
-#define MAP_ACT_KEY {{3102, 15.3897f, -12.2039f, 1.0000f, 0.8889f}, {16.9008f, -12.1778f}, {16.3265f, -11.9122f, 15.3500f}, {401, 402, 403}}
+#define MAP_ACT_CONFIRM {{3102, 15.3897f, -13.3139f, 1.0000f, 0.8889f}, {16.9008f, -13.2878f}, {16.1269f, -13.0221f, 15.3500f}, {422, 423, 423}}
+#define MAP_ACT_MARKER {{3102, -6.9500f, -13.3138f, 1.0000f, 0.8889f}, {-8.5394f, -13.2877f}, {-7.7259f, -13.0223f, 7.6740f}, {424, 425, 426}}
+#define MAP_ACT_CANCEL {{3102, 15.3897f, -13.3138f, 1.0000f, 0.8889f}, {16.9008f, -13.2877f}, {16.1259f, -13.0223f, 15.3480f}, {338, 338, 338}}
+#define MAP_ACT_CHANGE {{3102, -6.9500f, -12.0238f, 1.0000f, 0.8889f}, {-8.5394f, -11.9977f}, {-7.7259f, -11.7323f, 7.6740f}, {427, 427, 427}}
+#define MAP_ACT_KEY {{3102, 15.3897f, -12.2039f, 1.0000f, 0.8889f}, {16.9008f, -12.1778f}, {16.3265f, -11.9122f, 15.3500f}, {428, 429, 430}}
#define MAP_KEY_BB {3103, 13.6200f, 3.4200f, 0.3781f, 1.0000f}
#define MAP_KEY_STEP -0.8250f
-#define MAP_KEY_ROWS {{{3104, 11.8600f, -1.7400f, 1.0000f, 1.0000f}, 404, {12.7550f, -1.5413f, 15.3500f}}, {{3105, 11.8600f, -1.7400f, 1.0000f, 1.0000f}, 405, {12.7550f, -1.5413f, 15.3500f}}, {{3106, 11.7720f, -1.7460f, 1.0000f, 1.0000f}, 406, {12.7550f, -1.5413f, 15.3500f}}, {{3107, 11.8600f, -1.7400f, 1.0000f, 1.0000f}, 407, {12.7550f, -1.5413f, 15.3500f}}, {{3108, 11.8600f, -1.7400f, 1.0000f, 1.0000f}, 408, {12.7550f, -1.5413f, 15.3500f}}}
+#define MAP_KEY_ROWS {{{3104, 11.8600f, -1.7400f, 1.0000f, 1.0000f}, 431, {12.7550f, -1.5413f, 15.3500f}}, {{3105, 11.8600f, -1.7400f, 1.0000f, 1.0000f}, 432, {12.7550f, -1.5413f, 15.3500f}}, {{3106, 11.7720f, -1.7460f, 1.0000f, 1.0000f}, 433, {12.7550f, -1.5413f, 15.3500f}}, {{3107, 11.8600f, -1.7400f, 1.0000f, 1.0000f}, 434, {12.7550f, -1.5413f, 15.3500f}}, {{3108, 11.8600f, -1.7400f, 1.0000f, 1.0000f}, 435, {12.7550f, -1.5413f, 15.3500f}}}
#define MAP_KEY_FLAGS {133, 134, 135, 136, 137}
#define MAP_KEY_N 5
#define MAP_MM_PIECES {{3109, 4.0500f, -12.3700f, 1.0000f, 1.0000f}, {3110, 4.0100f, -12.9500f, 0.7510f, 1.0000f}, {3111, 1.9000f, -12.3700f, 1.0000f, 1.0000f}, {3112, 1.9000f, -12.3700f, 1.0000f, 1.0000f}}
@@ -1284,7 +1299,7 @@
#define MAP_MM_PLACE {3117, 4.0500f, -7.9900f, -4.9500f, 13.0500f, -10.5500f, -3.5500f, 7.0000f, 20.0000f}
#define MAP_MM_RADII 0.8900f
#define MAP_MM_UI_PAUSE 0.2000f
-#define TXT_KEY_SHIFT 409
+#define TXT_KEY_SHIFT 436
#define ROOM_ZONES {2, 4, 5, 4, 4, 5, 5, 5, 5, 5, 5, 5, 22, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6}
#define MSG_FIREBALL 0
#define MSG_DASH 1
diff --git a/games/hollowknight/src/icon.png b/games/hollowknight/src/icon.png
index bdef12f7..0c691deb 100644
Binary files a/games/hollowknight/src/icon.png and b/games/hollowknight/src/icon.png differ
diff --git a/games/hollowknight/src/menu.c b/games/hollowknight/src/menu.c
index af63a60e..b457fd8d 100644
--- a/games/hollowknight/src/menu.c
+++ b/games/hollowknight/src/menu.c
@@ -1,5 +1,7 @@
/* The title screen, the save profiles and the pause menu (UIManager: Menu_Title's MainMenuScreen, SaveProfileScreen and
- * PauseMenuScreen, their pieces where tools/menu.py found them): what is selected, what the keys do. */
+ * PauseMenuScreen, their pieces where tools/menu.py found them): what is selected, what the keys do. And how to play
+ * on the calculator (its keys, as the Options' Keyboard screen shows them, then the basics): before a new game, and
+ * from the title and the pause menu, where Options is. */
#pragma GCC optimize("Os") /* (its code small: not where a frame's time goes) */
#include "game.h"
@@ -19,16 +21,18 @@ typedef struct {
static const Piece logo = MENU_LOGO, pointer = MENU_POINTER, profiles_fleur = MENU_PROFILES_FLEUR,
slot_fleur = MENU_SLOT_FLEUR, slot_selector = MENU_SLOT_SELECTOR, slot_cursor = MENU_SLOT_CURSOR,
slot_orb = MENU_SLOT_ORB, slot_geo = MENU_SLOT_GEO, slot_health = MENU_SLOT_HEALTH,
- pause_top = MENU_PAUSE_TOP, pause_bot = MENU_PAUSE_BOT;
+ pause_top = MENU_PAUSE_TOP, pause_bot = MENU_PAUSE_BOT, keys_fleur = MENU_KEYS_FLEUR;
+static const int16_t key_texts[MENU_NKEYS][2] = MENU_KEYS; /* (what a key does, the key) */
static const ZonePiece zone_bgs[MENU_SLOT_NZONES] = MENU_SLOT_ZONES;
static const int16_t zone_texts[MENU_SLOT_NZONES] = TXT_ZONES;
-enum { MS_TITLE, MS_PROFILES, MS_GAME, MS_PAUSE };
+enum { MS_TITLE, MS_PROFILES, MS_GAME, MS_PAUSE, MS_HELP };
/* (the save profiles' rows: the slots, then Back; a slot's Clear Save, its prompt's Yes and No) */
enum { PS_SLOT, PS_CLEAR, PS_PROMPT_NO, PS_PROMPT_YES };
static struct {
uint8_t screen, sel, part;
+ uint8_t page, from, slot; /* (how to play: its page; the screen it was opened from, the new game's slot) */
uint32_t prev_keys;
float t; /* (time on this screen: its fade in) */
int8_t state[SAVE_SLOTS]; /* (save_stats: 0 none, 1 a game, -1 corrupted) */
@@ -75,7 +79,9 @@ void menu_start(void) {
}
bool menu_quit(void) { return mn.quit; }
-bool menu_in_game(void) { return mn.screen == MS_GAME || mn.screen == MS_PAUSE; }
+bool menu_in_game(void) {
+ return mn.screen == MS_GAME || mn.screen == MS_PAUSE || (mn.screen == MS_HELP && mn.from == MS_PAUSE);
+}
/* a new game in a slot: the Knight at King's Pass' respawn point */
static void new_game(int slot) {
@@ -91,6 +97,15 @@ static void new_game(int slot) {
game_enter(ROOM_TUTORIAL_01, x, y, right);
}
+static void help_open(int from, int slot) {
+ go(MS_HELP, 0);
+ mn.from = (uint8_t)from, mn.slot = (uint8_t)slot, mn.page = 0;
+}
+static void help_close(void) { /* (back where it was opened, on its How to Play) */
+ if (mn.from == MS_PROFILES) go(MS_PROFILES, mn.slot);
+ else go(mn.from, 1);
+}
+
/* (a slot chosen: its game loaded, at its bench; or a new one) */
static void pick_slot(int slot) {
if (mn.state[slot] == 1) {
@@ -100,9 +115,10 @@ static void pick_slot(int slot) {
mn.state[slot] = -1;
return;
}
- } else if (mn.state[slot] == 0)
- new_game(slot);
- else
+ } else if (mn.state[slot] == 0) {
+ help_open(MS_PROFILES, slot); /* (how to play first) */
+ return;
+ } else
return; /* (a corrupted save: only cleared) */
go(MS_GAME, 0);
}
@@ -116,10 +132,12 @@ bool menu_tick(uint32_t keys) {
mn.t += DT;
switch (mn.screen) {
case MS_TITLE:
- /* Start Game, Quit Game */
- if (p & (K_UP | K_DOWN)) mn.sel ^= 1;
+ /* Start Game, How to Play, Quit Game */
+ if (p & K_UP) mn.sel = (uint8_t)((mn.sel + 2) % 3);
+ if (p & K_DOWN) mn.sel = (uint8_t)((mn.sel + 1) % 3);
if (p & K_OK) {
if (mn.sel == 0) go(MS_PROFILES, 0);
+ else if (mn.sel == 1) help_open(MS_TITLE, 0);
else mn.quit = true;
}
return true;
@@ -153,11 +171,24 @@ bool menu_tick(uint32_t keys) {
return true;
}
return false;
+ case MS_HELP:
+ /* its two pages; Back goes back, OK past the second starts the new game (or goes back) */
+ if (p & K_BACK) help_close();
+ else if (mn.page == 0 && (p & (K_OK | K_RIGHT))) mn.page = 1;
+ else if (mn.page == 1 && (p & K_LEFT)) mn.page = 0;
+ else if (mn.page == 1 && (p & K_OK)) {
+ if (mn.from == MS_PROFILES) new_game(mn.slot), go(MS_GAME, 0);
+ else help_close();
+ }
+ return true;
case MS_PAUSE:
- if (p & (K_UP | K_DOWN)) mn.sel ^= 1;
+ /* Continue, How to Play, Quit to Menu */
+ if (p & K_UP) mn.sel = (uint8_t)((mn.sel + 2) % 3);
+ if (p & K_DOWN) mn.sel = (uint8_t)((mn.sel + 1) % 3);
if (p & (K_PAUSE | K_BACK)) go(MS_GAME, 0);
else if (p & K_OK) {
if (mn.sel == 0) go(MS_GAME, 0);
+ else if (mn.sel == 1) help_open(MS_PAUSE, 0);
else {
/* Quit to Menu: the game saved (the Knight at his bench as it loads), the title */
save_game();
@@ -255,6 +286,34 @@ static void draw_slot(int i, float a) {
}
}
+/* how to play: the keys (two columns: what a key does, the key), or the basics; under them Next, then Start Game (a
+ * new game) or Back */
+static void draw_help(float a) {
+ float hw = VIEW_W / 2 / HUD_PX - 0.6f; /* (the columns: from the screen's edges to its middle) */
+ text_id(STYLE_MENU_TITLE, mn.page ? TXT_HELP_TITLE : TXT_SCREEN_KEYBOARD, 0, MENU_KEYS_TITLE_Y, 0, a);
+ piece(&keys_fleur, 0, MENU_KEYS_FLEUR_Y, false, white(0, a));
+ if (mn.page == 0) {
+ for (int i = 0; i < MENU_NKEYS; i++) {
+ int col = i < 6 ? 0 : 1, row = col ? i - 6 : i;
+ float y = MENU_KEYS_ROW_Y + row * MENU_KEYS_DY, x0 = col ? 0.5f : -hw, x1 = col ? hw : -0.5f;
+ text_id(STYLE_MENU_SMALL, key_texts[i][0], x0, y, 1, a);
+ text_id(STYLE_MENU_SMALL, key_texts[i][1], x1, y, 2, a * 0.75f);
+ }
+ } else {
+ /* (the lines, from the first row down) */
+ const uint8_t *s = text_get(TXT_HELP_LINES);
+ float line = font_line(font_style(STYLE_TUTE)) / HUD_PX, y = MENU_KEYS_ROW_Y + 0.2f;
+ while (*s) {
+ int n = 0;
+ while (s[n] && s[n] != TEXT_BR) n++;
+ text_at(STYLE_TUTE, s, n, 0, y, 0, a);
+ s += n + (s[n] == TEXT_BR);
+ y -= line;
+ }
+ }
+ button(mn.page == 0 ? TXT_NEXT : mn.from == MS_PROFILES ? TXT_MAIN_START : TXT_NAV_BACK, 0, MENU_KEYS_BUTTON_Y, true, a);
+}
+
void menu_draw(void) {
float a = mn.t / FADE_TIME;
if (a > 1) a = 1;
@@ -262,7 +321,8 @@ void menu_draw(void) {
case MS_TITLE:
piece(&logo, 0, MENU_LOGO_Y, false, white(0, a));
button(TXT_MAIN_START, 0, MENU_START_Y, mn.sel == 0, a);
- button(TXT_MAIN_QUIT, 0, MENU_QUIT_Y, mn.sel == 1, a);
+ button(TXT_HELP, 0, MENU_HELP_Y, mn.sel == 1, a);
+ button(TXT_MAIN_QUIT, 0, MENU_QUIT_Y, mn.sel == 2, a);
break;
case MS_PROFILES:
text_id(STYLE_MENU_TITLE, TXT_SCREEN_SAVE_PROFILES, 0, MENU_PROFILES_TITLE_Y, 0, a);
@@ -276,7 +336,12 @@ void menu_draw(void) {
piece(&pause_top, 0, MENU_PAUSE_TOP_Y, false, white(0, a));
piece(&pause_bot, 0, MENU_PAUSE_BOT_Y, false, white(0, a));
button(TXT_PAUSE_CONTINUE, 0, MENU_PAUSE_CONTINUE_Y, mn.sel == 0, a);
- button(TXT_PAUSE_MAIN, 0, MENU_PAUSE_QUIT_Y, mn.sel == 1, a);
+ button(TXT_HELP, 0, MENU_PAUSE_HELP_Y, mn.sel == 1, a);
+ button(TXT_PAUSE_MAIN, 0, MENU_PAUSE_QUIT_Y, mn.sel == 2, a);
+ break;
+ case MS_HELP:
+ if (mn.from == MS_PAUSE) gfx_hud_fill(-15, -9, 15, 9, gfx_dyn_tint(31, 0, 0, 0, (uint8_t)(0.8f * 255 + 0.5f)));
+ draw_help(a);
break;
}
}
diff --git a/games/hollowknight/tools/menu.py b/games/hollowknight/tools/menu.py
index 185539a6..ac8bbe0c 100644
--- a/games/hollowknight/tools/menu.py
+++ b/games/hollowknight/tools/menu.py
@@ -120,7 +120,8 @@ def build(sprites, texts):
out["MENU_LOGO_Y"] = U(100 / actors.HUD_K - 0.29 * 200 / actors.HUD_K)
btn = "MainMenuScreen/MainMenuButtons/%sButton"
out["MENU_START_Y"] = U(at(btn % "StartGame")[1])
- out["MENU_QUIT_Y"] = U(at(btn % "Options")[1]) # (the second of the buttons shown)
+ out["MENU_HELP_Y"] = U(at(btn % "Options")[1]) # (How to Play, where Options is)
+ out["MENU_QUIT_Y"] = U(at(btn % "Achievements")[1]) # (the third of the buttons shown)
cx, cy, cw, ch = at(btn % "StartGame" + "/Text/CursorLeft")
tx, ty, tw, th = at(btn % "StartGame" + "/Text")
# (the pointers as big as the text is made)
@@ -178,7 +179,16 @@ def build(sprites, texts):
out["MENU_PAUSE_BOT"] = obj_piece("PauseMenuScreen/BottomFleur", frame_of="NewPauseMenuScreen/BottomFleur")
out["MENU_PAUSE_BOT_Y"] = U(at("PauseMenuScreen/BottomFleur")[1])
yc, yo, yq = (at("PauseMenuScreen/Controls/%sButton" % b)[1] for b in ("Continue", "Options", "Quit"))
- out["MENU_PAUSE_CONTINUE_Y"], out["MENU_PAUSE_QUIT_Y"] = U((yc + yo) / 2), U((yo + yq) / 2)
+ out["MENU_PAUSE_CONTINUE_Y"], out["MENU_PAUSE_HELP_Y"], out["MENU_PAUSE_QUIT_Y"] = U(yc), U(yo), U(yq)
+ # how to play: the keyboard (the Options' Keyboard screen: its title, its fleur, its rows, its buttons' place), then
+ # the basics, as that screen
+ kb = "KeyboardMenuScreen/"
+ out["MENU_KEYS_TITLE_Y"] = U(at(kb + "Title")[1])
+ out["MENU_KEYS_FLEUR"] = obj_piece(kb + "TopFleur")
+ out["MENU_KEYS_FLEUR_Y"] = U(at(kb + "TopFleur")[1])
+ y0, y1 = at(kb + "Content/MappableKeys/UpButton")[1], at(kb + "Content/MappableKeys/DownButton")[1]
+ out["MENU_KEYS_ROW_Y"], out["MENU_KEYS_DY"] = U(y0), U(y1 - y0)
+ out["MENU_KEYS_BUTTON_Y"] = U(at(kb + "Controls/ApplyButton")[1])
# the texts
sh = text.sheets()
mm = lambda k, st="MENU": texts.add(text.clean(sh["MainMenu"][k]), st)
@@ -186,6 +196,26 @@ def build(sprites, texts):
"NAV_NO", "NAV_BACK", "PAUSE_CONTINUE", "PAUSE_MAIN", "PROFILE_CORRUPTED"):
out["TXT_" + k] = mm(k)
out["TXT_SCREEN_SAVE_PROFILES"] = mm("SCREEN_SAVE_PROFILES", "MENU_TITLE")
+ out["TXT_SCREEN_KEYBOARD"] = mm("SCREEN_KEYBOARD", "MENU_TITLE")
+ # how to play: the game's names for what the keys do, then the calculator's keys
+ keys = [(mm("BUTTON_MOVE", "MENU_SMALL"), "left, right"), (mm("BUTTON_LOOK", "MENU_SMALL"), "up, down"),
+ (mm("BUTTON_JUMP", "MENU_SMALL"), "OK"), (mm("BUTTON_ATTACK", "MENU_SMALL"), "back"),
+ (mm("BUTTON_DASH", "MENU_SMALL"), "shift"), (mm("BUTTON_CAST", "MENU_SMALL"), "alpha"),
+ (texts.add("Listen / Rest / Enter", "MENU_SMALL"), "up"), (mm("BUTTON_MAP", "MENU_SMALL"), "var"),
+ (mm("BUTTON_INVENTORY", "MENU_SMALL"), "toolbox"), (mm("BUTTON_PAUSE", "MENU_SMALL"), "backspace"),
+ (texts.add("Save and Quit", "MENU_SMALL"), "home")]
+ out["MENU_KEYS"] = "{%s}" % ", ".join("{%d, %d}" % (t, texts.add(k, "MENU_SMALL")) for t, k in keys)
+ out["MENU_NKEYS"] = len(keys)
+ out["TXT_HELP"] = texts.add("How to Play", "MENU")
+ out["TXT_HELP_TITLE"] = texts.add("How to Play", "MENU_TITLE")
+ out["TXT_NEXT"] = texts.add("Next", "MENU")
+ out["TXT_HELP_LINES"] = texts.add("Strike enemies with your nail to gather Soul.\n"
+ "Hold alpha to focus Soul and heal your masks.\n"
+ "Rest at a bench to heal and to save your game.\n"
+ "If you fall, your shade keeps your geo:\n"
+ "strike it down to win them back.\n"
+ "Spend geo in Dirtmouth's shops, and find\n"
+ "Cornifer in the Crossroads for a map.", "TUTE")
out["TXT_ZONES"] = "{%s}" % ", ".join("%d" % texts.add(text.clean(sh["Map Zones"][ZONES[z]]), "MENU_SMALL")
for z in sorted(ZONES))
# (the characters the numbers need: slots, geo, play time)
diff --git a/tests/test_games.py b/tests/test_games.py
index 7e4276f6..ba778fcb 100644
--- a/tests/test_games.py
+++ b/tests/test_games.py
@@ -111,10 +111,11 @@ GAMES = {
"celeste": ("Celeste.nwa", "celeste.sav",
presses((2500, "ok"), (4000, "ok"), (5500, "ok"), (7000, "ok"), (8500, "ok"), (11000, "right", 2500)), 15000,
presses((2500, "ok"), (4000, "ok"), (5500, "ok"), (7500, "right", 1500)), 11000),
- # Start Game, the first profile (a new game: the Knight falls into King's Pass), then Home, which saves as Quit
- # to Menu; then the same profile, loaded
+ # Start Game, the first profile (a new game: past how to play's two pages, the Knight falls into King's Pass), then
+ # Home, which saves as Quit to Menu; then the same profile, loaded
"hollowknight": ("HollowKnight.nwa", "hk1.sav",
- presses((2500, "ok"), (4500, "ok")) + every(12000, 16000, 600, "right", 400), 20000,
+ presses((2500, "ok"), (4500, "ok"), (5500, "ok"), (6500, "ok")) + every(12000, 16000, 600, "right", 400),
+ 20000,
presses((2500, "ok"), (4500, "ok")) + every(9000, 11000, 600, "left", 400), 14000),
# a level, its message, then play; then back to the level select
"portal": ("PortalReturns.nwa", "portal.sav",