Implement cyclic animation reset opcode
This commit is contained in:
@@ -1371,7 +1371,10 @@ active flag bit 2, and zeroes five start/period pairs:
|
||||
It does not change the object's current/base transforms. Five DEBUGADV calls reset an effect object before
|
||||
demonstrating a new looping asset; FIELD's sole ordinary call resets the temporary moving-unit handle
|
||||
between its one-shot translation setup and `0x239` source-cell animation. This is a bounded retained-state
|
||||
operation and is the recommended follow-up after the black-fade pair below.
|
||||
operation. The port now exposes the same get-or-create reset on `GfxState`: it disables cyclic color,
|
||||
scale, rotation, and source-rectangle sampling; clears all ten native timing dwords in the preserved
|
||||
numbered-save record, including the unmodeled second cyclic matrix; and leaves base/current transforms,
|
||||
cyclic targets, and finite one-shot channels intact.
|
||||
|
||||
**Follow-up resolution (2026-07-10):** `0x21f` is the one-shot axis-angle channel and is implemented with
|
||||
affine rasterization. `0x223` is **not affine**: `gfx_queue_surface_alpha_transition` (`0x47f440`) inserts
|
||||
|
||||
@@ -942,6 +942,8 @@ Implemented through IHost.PlayModalMovieToSurface. Its operand uses the same nat
|
||||
- **grounding:** source=investigation, confidence=high
|
||||
- **evidence:** Ghidra /v2: op_0x230_reset_gfx_cyclic_animations@0x423ba0 fetches the handle and calls gfx_object_reset_cyclic_animation_channels@0x47ee60. The worker clears object flag bit 2 and zeroes starts obj+0x20c/+0x210/+0x214/+0x218/+0x21c plus periods obj+0x220/+0x224/+0x228/+0x22c/+0x230, covering looping color, scale, rotation, the second cyclic matrix, and source-rectangle channels. Corpus: five DEBUGADV effect demonstrations plus one FIELD movement setup before 0x239.
|
||||
|
||||
Port status (2026-07-29): implemented as one retained-state reset covering cyclic color, scale, rotation, secondary-matrix, and source-rectangle timing. It disables the four modeled looping channels, clears the complete native raw timing block for drop-in persistence, and preserves base/current transforms, cyclic targets, and one-shot channels.
|
||||
|
||||
### 0x231 `animate-gfx-srcrect-loop` (u00421EA0, argc 4)
|
||||
- **summary:** (handle)(frame_period_ms)(frame_count)(column_count) — loop row-major through the spritesheet. Every sample preserves draw-texture's source-rectangle width/height; frame=floor((shared_frame_time-object_start)/frame_period)%frame_count, src offset=(frame%columns*width, frame/columns*height). All objects use the retained manager's shared current/previous millisecond timestamps but retain their own start and period. The native consumer raises redraw dirty only when the current and previous samples select different cells. Worker gfx_worker_anim_srcrect @0x47eec0; consumer gfx_object_anim_interpolate @0x473ed0.
|
||||
- **grounding:** source=investigation, confidence=high
|
||||
|
||||
@@ -849,11 +849,15 @@ conversion and exact terminal-frame publication, and closes all 11 sites. The re
|
||||
is 16 distinct opcodes / 28 instructions. All 477 engine tests, opcode build/lint, the zero-warning Godot
|
||||
build, and the Himegari-targeted threaded selftest pass.
|
||||
|
||||
The follow-up `0x230(handle)` is decoded: it clears the retained object's cyclic active flag and five
|
||||
looping-channel start/period pairs without changing current/base transforms. Its six calls are five
|
||||
DEBUGADV effect demonstrations plus one FIELD movement setup.
|
||||
**Cyclic reset implemented (2026-07-29):** `0x230(handle)` now gets or creates the retained object,
|
||||
disables the four looping channels represented by the compositor, and clears the complete native
|
||||
start/period block—including the preserved raw state for the currently unmodeled second cyclic matrix.
|
||||
Base/current transforms, cyclic targets, and finite one-shot channels remain intact. This closes its six
|
||||
sites (five DEBUGADV demonstrations and one FIELD movement setup), reducing the remaining effectful
|
||||
inventory to 15 distinct opcodes / 22 instructions. All 479 engine tests, opcode build/lint, the
|
||||
zero-warning Godot build, and the Himegari-targeted threaded selftest pass.
|
||||
|
||||
**NEXT:** implement `0x230`.
|
||||
**NEXT:** investigate `0x1b2`, the widest remaining unknown at three sites.
|
||||
|
||||
## Later Phase B breadth
|
||||
|
||||
|
||||
Reference in New Issue
Block a user