From 5ae81ba8e6a275d2dcc44db697bc3adba2d32d5a Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Wed, 4 Nov 2026 08:44:55 +0300 Subject: [PATCH] Fix the left stick HUD images of the PC prompts and draw the shake key In the 1.4.3 Common archive Nt_KeyTexLSt_00 is the left stick tilted up (U+E052) and Nt_KeyTexLSt_01 the left stick (U+E05E): they showed WASD and Ctrl, now W and WASD. U+E068 (the right stick shaken) showed the mouse, which never shakes the stick; it shows the SHAKE key (G by default). Co-Authored-By: Claude Opus 5.5 --- tests/romfs_prompts_test.py | 2 +- tools/button_icons.py | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/romfs_prompts_test.py b/tests/romfs_prompts_test.py index 7f5c13c3..a21cdd50 100644 --- a/tests/romfs_prompts_test.py +++ b/tests/romfs_prompts_test.py @@ -299,7 +299,7 @@ LETTERS_2 = {ord('T'): (560, polygon((230, 0), (330, 0), (330, 600), (520, 600), # The other characters the PC prompts' keys show (button_icons.PC_LABELS of the defaults): a block with a counter, each # its own size. LETTERS_2.update({ord(ch): (560, lambda pen, i=i: [rect(pen, 60, 0, 300 + 10 * i, 700), rect(pen, 120, 100, 240, 600, True)]) - for i, ch in enumerate('ACDEFMQSW1234⇧')}) + for i, ch in enumerate('ACDEFMQSW1234⇧G')}) PC_PANES = {'A': 'E', 'B': '↑', 'X': '▬', 'Y': 'L'} # the diamond's letters with the default keys diff --git a/tools/button_icons.py b/tools/button_icons.py index 0a04f684..813a174c 100644 --- a/tools/button_icons.py +++ b/tools/button_icons.py @@ -187,11 +187,11 @@ def xbox_icons(g): # bound to it, in the same filled-shape style. Each glyph keeps the advance of the game's own (a wider glyph runs into # the text of a right-aligned guide). # The keyboard defaults of runtime/input_map.c (input_map_reset; the totk.ini bind_ lines apply on top, pc_binds). The -# right stick is the camera, which the mouse drives. +# right stick is the camera, which the mouse drives; SHAKE is the key that shakes it (the mouse never does). PC_BINDS = { 'A': 'e', 'B': 'lshift', 'X': 'space', 'Y': 'mouse_l', 'L': 'q', 'R': 'r', 'ZL': 'mouse_r', 'ZR': 'f', 'PLUS': 'tab', 'MINUS': 'm', 'LEFT': '1', 'UP': '2', 'RIGHT': '3', 'DOWN': '4', 'LCLICK': 'lctrl', 'RCLICK': 'c', - 'LSTICK_UP': 'w', 'LSTICK_LEFT': 'a', 'LSTICK_DOWN': 's', 'LSTICK_RIGHT': 'd', + 'LSTICK_UP': 'w', 'LSTICK_LEFT': 'a', 'LSTICK_DOWN': 's', 'LSTICK_RIGHT': 'd', 'SHAKE': 'g', } # What a key shows: its letter, a symbol or a short name (key names as in totk.ini; the rest show their name). PC_LABELS = { @@ -206,11 +206,11 @@ PC_LABELS = { # of it per key. PC_LETTER_LABELS = {'lshift': '↑', 'rshift': '↑', 'space': '▬', 'mouse_l': 'L', 'mouse_r': 'R', 'mouse_m': 'M', 'lctrl': 'C', 'rctrl': 'C', 'tab': 'T'} -# The button guide's images in the pc style: every symbol mask of the action prompt (LSt_00 the stick tilted, LSt_01 -# the stick pressed). +# The button guide's images in the pc style: every symbol mask of the action prompt. In the 1.4.3 Common archive +# LSt_00 shows the left stick tilted up (as U+E052) and LSt_01 the left stick (as U+E05E). PC_HUD_TEXTURES = {'Nt_KeyTexA_00': 0xE040, 'Nt_KeyTexB_00': 0xE041, 'Nt_KeyTexX_00': 0xE042, 'Nt_KeyTexY_00': 0xE043, - 'Nt_KeyTexL_00': 0xE044, 'Nt_KeyTexZL_00': 0xE046, 'Nt_KeyTexLSt_00': 0xE05E, - 'Nt_KeyTexLSt_01': 0xE056} + 'Nt_KeyTexL_00': 0xE044, 'Nt_KeyTexZL_00': 0xE046, 'Nt_KeyTexLSt_00': 0xE052, + 'Nt_KeyTexLSt_01': 0xE05E} PC_MOUSE = ('mouse_l', 'mouse_r', 'mouse_m') @@ -345,7 +345,9 @@ def pc_icons(g, adv, binds=PC_BINDS): 0xE05F: mouse_move(adv[0xE05F]), 0xE053: mouse_move(adv[0xE053], 'up'), 0xE051: mouse_move(adv[0xE051], 'down'), 0xE05B: mouse_move(adv[0xE05B], 'left'), 0xE059: mouse_move(adv[0xE059], 'right'), 0xE05D: mouse_move(adv[0xE05D], 'up', 'down'), - 0xE055: mouse_move(adv[0xE055], 'left', 'right'), 0xE068: mouse_move(adv[0xE068], 'left', 'right'), + 0xE055: mouse_move(adv[0xE055], 'left', 'right'), + # the right stick shaken: the shake key + 0xE068: one(b['SHAKE'], adv[0xE068]), }