0x328 set-3d-effect-leaf
Opcode 0x328 (808), draw. Investigated by OME, with high confidence (from investigation).
(leaves)(mesh_slots)(count) — native's Set3DEffectLeaf: build the display's leaf effect with that many leaves and give it the meshes of count mesh slots, read from integer cells. The engine then moves and draws the leaves.
Operands
| # | Role | Types seen | Access |
|---|---|---|---|
| 1 | leaf count | imm | read |
| 2 | mesh slots (integer cells) | l-int | address |
| 3 | how many | imm | read |
In the port
OME’s port implements it. It never waits: a wait parks the engine until input, a sleep, a transition, a dialog or a movie ends. What it can do with control besides waiting:
falls: it returns to the next instruction
OME derives these facts from the port’s handler (its tools/opcode_flow.py), and they over-approximate: a fact some path can reach is given.
By build
Whether each build’s scripts use it, as OME’s survey of the game’s scripts saw them, and how many evidence items name the build.
| Build | Game | Used by its scripts | Evidence |
|---|---|---|---|
4.24J (SYS4422) | Himegari Dungeon Meister | no | — |
4.33G (SYS4433) | Kamidori Alchemy Meister | no | — |
4.38D (SYS4438) | Soukoku no Arterial | yes | 1 |
Evidence
- native-re on SYS4438, high confidence; Arterial SYS4438 Ghidra /arterial/4.38D and the complete Arterial catalog (
vm-map/opcodes.toml opcode 0x328): op_0x328_set_3d_effect_leaf@0x42e650 resolves operand 2's address, decodes operand 3 integer cells from it and calls gfx_set_3d_effect_leaf@0x4176f0, which builds the effect object at the display's +0x410 (effect_leaf_construct@0x472020) in place of the one there and adds the mesh of each slot (manager +0xc5f4 + slot * 4, indexed unchecked); a slot with no mesh is traced as 「関数:Set3DEffectLeaf エラー:メッシュが作成されていません. MESH=%d」. The first operand is the number of leaves (leaf_effect_create_particles@0x472440 allocates that many); the leaves' birth, step and draw are read in docs/superpowers/specs/2026-11-20-title-leaves-design.md §2. TITLE@0x692 gives it 30 leaves and the two meshes LEAF0.X and LEAF1.X: the white leaves that drift over the title.
Details
OME’s notes on it, as the registry keeps them.
The port builds the leaves on the game's generator (Hosting/CrtRandom.cs), drawing in native's order so that they advance op 0x60's stream as native's do, steps them 60 times a second after each frame, and lowers each into a polygon item where the walk reaches the second effect handle (Natives/Scene3DLeaves.cs, Graphics.Scene3DLowering.cs; docs/superpowers/specs/2026-11-20-title-leaves-design.md). A leaf count above 2^20 halts the VM.