Entry 66
The HUD in Mac Anu: the field UI over the town, the menu buttons, and talking
Filescrates/piney-game/src/world.rscrates/piney-game/src/main.rscrates/piney-world/src/talk.rscrates/piney-world/src/lib.rscrates/piney-fieldui/src/lib.rscrates/piney-fieldui/src/render.rsdocs/engine/field-game.mddocs/engine/field-ui.md
The user reported no HUD in Mac Anu. 64 ported the field UI and
65 the town's people and the command target, but nothing put the two
together. The runtime now does that, and the rest of ccThGameCtrl's
buttons are ported, so the menus open as in the game.
The field UI in the runtime
- Order.
piney-game's world mode steps the world, then the field UI, from the town's first task frame on. - One frame. Both draw into one frame, the HUD under the world's fade:
World::step_intoand the newFieldUi::step_into/render::draw. - What the UI reads (its
World):- Kite in party slot 0 from
spcParam[0], named byplName. The save keeps no current HP or SP, so he shows full: 63/63 and 13/13 on a new game. - The command target and the one before it, with the world's
ccCalcTagPosCharpoints. cmndSortRoot's chain.
- Kite in party slot 0 from
- The face. Found in the constructor:
ccCheckMenuFaceNameParty(gcmn 0x0056a930) gives member 0 face 18 until the bracelet's colours (saveData+0x6771). The event opcode'sSetMenuFaceis the only other path. The runtime sets it at entry. - What comes back.
- Sounds and voices go to the sound driver.
SleepAllandWakeAllput the world to sleep and wake it.- An unported menu is named in the window title.
The rest of ccThGameCtrl's buttons
Read from gcmn 0x00517ff0-0x00518a98 and added to
talk::Targeting::step, in the game's order after the target:
- the menu ban (chat only, with
forbidChatExcept); - chat (3);
- option (12);
- the held conditions (sleep, paralysis, confusion, charm);
- personal (0 in a town; fields and dungeons by number and floor type);
- dead;
- the action button.
Each goes through its ccEvent::CheckOperate number. Three guards come
first:
ccPlayerMenuCheck(gcmn 0x0059cd70);- no menu open;
openReqNumnot 74.
How the menus open.
- By a button. The chat, option and personal buttons open with
mode0, so the town sleeps. - By the action button. Its menus open with
mode1: the town keeps moving while Kite is held. The exceptions are a party member outside a town and a fountain. - Closing. Every state waits for the menu type to return to -1, then releases Kite.
The map button (SELECT) is left out: it needs the minimap.
A world start mode
piney-game --mode world starts in Mac Anu on a new game's save, with the
player named Kite. --press now takes held ranges and the left stick
(200-310:lup), so a shot can walk.
Checked
- Unit tests.
menu_buttons_in_the_game_order: priorities, the ban, operation locks, each area's personal menu, the held conditions, and the guards.- The earlier targeting test, now through the new input.
- The runtime's handles and Kite's panel.
- Shots from the runtime.
- The HUD over the town at the Chaos Gate, with Kite's face, name and bars.
- Triangle opens PERSONAL.
- Square opens CHAT ("You cannot use this command unless in a party.").
- Circle closes PERSONAL.
- Walking up the bridge, the target window names Bell ("X Talk") with the cursor frame on her. X holds Kite, the talk menu (22) closes at once, unported, and he runs on.
- In a clean worktree. The workspace's tests, clippy (with
traceforpiney-fieldui), fmt, the docs check,test_world_rsandtest_fieldui_rs.
- Not checked against the game. The menu buttons were read from the code, not run in eemu.
TalkAgainstGamechecks only the targeting functions. - One frame late. A menu a button opens stops the camera and player one frame later than in the game: the world steps all its tasks before the menu task (priority 34). - The target requests are dropped. The menus' own target changes (TargetFix,Target,TargetClear) are not passed to the world; they matter in battle. - Not ported: - the talk, shop and gate menus that the action button opens; - the map button. - A drawing bug. PERSONAL's last row draws as " og Out": the "L" glyph is lost in the list's text texture. It is reported to the field UI agent.