Repository navigation
Item wheel for the R/L item row, and Cycle items (Gameplay, off by default) - #57
Conversation
451315c to
560c19d
Compare
…meplay, off by default) Ported from Longshot (MagicBeanDev/Longshot#822, from Hookshot): hold R or L for a wheel of the items, pages of 8 slots per age, the game's own icons, names and sounds; Cycle items changes the ZR item with a tap of R or L. ReLink draws its menu with GDI, so the wheel is drawn on the CPU (gpu/vk/vk_wheel.cpp) and laid over the scene blurred and dimmed (vk_framegen.cpp). The icons keep the game's ASTC blocks (nx2/wheel_assets.py, zstandard only) and are decoded by suyu's decoder at run time. Co-authored-by: tapxgamestudio <311386025+tapxgamestudio-coder@users.noreply.github.com> Co-authored-by: getzabelz <7135417+getzabelz@users.noreply.github.com> Feito com Claude Code
|
Merged, and released in 0.7.8. Thanks for this one, it's a real addition. What I tested in game before merging (RTX 3060 Ti, a player's save at Lake Hylia, scripted pad input): the wheel opens on R and on L, with the game's icons, counts and names (French here); an item pointed at with the stick is put on ZR when R is let go (the HUD shows it); Y picks an item up and puts it down in another slot; D-pad Right turns the page. With both rows off (the default) nothing of it runs. On top of your commit, as said in the review: Not tested here: the mouse on the wheel, Linux, AMD and Intel cards. One thing I noticed: the very first time the wheel opens in a session, the game's own row shows for about a second while the icons load. |
Summary:
wheel_layout.txtbesiderelink_options.ini.<game folder>/wheel/. Nothing of the game is in the repository.Why:
Getting to one item in the R/L row means tapping through all the others. This is a port of the item wheel from Longshot (MagicBeanDev/Longshot#822, originally Hookshot), which players there tested and used. With the row off nothing changes: no hook acts, nothing is drawn or recorded.
How it fits ReLink:
host/oot_wheel.c(new) is the wheel's state, pages and input, instant equip throughPouchMgr::setAssignableItem/getAssignableItem, and Cycle items;nx2/oot_patches.pycallshos_wheel_menu_tickfirst inf_802f1380(each menu screen's update);host/nn_hid.chands it the pad;host/nn_audio.cplays the row's sounds;host/display.cthe mouse;host/hos_mem.cgetshos_mem_region(the pouch lives in an address region);host/hos_main.cpublishes Link's age with the inventory counts.gpu/vk/vk_wheel.cppdraws the wheel on the CPU (shapes anti-aliased by distance, text with GDI) into a picture thatgpu/vk/vk_framegen.cpplays over the scene before the HUD, blurred and dimmed (three small compute passes built with Sirit at run time).vk_draw.cppcopies the gameplay upscale's output while the row is on;vk_replay.cppcovers the window texture while the wheel is open.nx2/wheel_assets.pykeeps the icons' ASTC blocks as they are (zstandard only, no image library), decoded at run time by suyu's ASTC decoder;nx2/wheel_names.pyandnx2/wheel_sounds.pyread the messages and the row's sounds. Without them the wheel shows English labels, silently.MkwVkHost.wheel(MKWVK_API_VERSION11); option ids 40 and 41.One fix over Longshot's: two bottles of the same content (two fairies) are two places of the row with one name; the wheel took one for a stale copy of the other, never knew the whole row, and its survey stuck between them (items missing from the wheel). They are two items now. And, as on Hookshot: the bottles are in the inventory's order (read at each opening), and a bottle moved with Y keeps its own slot (each bottle's slot is its content's; the ones left over fill the bottle slots still empty).
Tested on Windows 11, RTX 4070 SUPER, on ReLink 0.7.5 to 0.7.6, rebased on 0.7.7 (builds):
Not tested: Linux (the mouse part of the wheel is a stub there, the stick works), AMD and Intel GPUs.