Documentation

This commit is contained in:
xCrystal 2023-11-17 14:22:28 +01:00
parent 6613cd5386
commit 2596e3c93e
2 changed files with 2 additions and 1 deletions

View File

@ -373,6 +373,7 @@ $~~~~$<c>then always returns PLAYERMOVEMENT_FINISH but often is overwritten by c
8) The player may need to turn to a different direction through the ``ChangeDirectionScript`` (when ``DoPlayerMovement`` returns with ``PLAYERMOVEMENT_TURN``). Otherwise or after that, ``CheckPlayerState`` sets ``wMapEventStatus`` to ``MAPEVENTS_OFF``,
9) When the step finishes (i.e. ``PLAYERSTEP_STOP_F`` becomes set) in some ``HandleMap`` iteration, ``CheckPlayerState`` sets ``wScriptFlags2`` to $ff and ``wMapEventStatus`` to ``MAPEVENTS_ON``.
10) In the next ``HandleMap`` iteration, ``CheckBoardEvent.board`` is called with ``wScriptFlags2[4]`` set.
- If ``wCurSpaceNextSpace`` matches ``NEXT_SPACE_IS_ANCHOR_POINT``: If player is at a tile with an anchor event, ``wCurSpaceNextSpace`` is updated with the next space byte of salid anchor event. ``wScriptFlags2[4]`` is reset. **Go back to 7**.
- If player is not above a tile (``wPlayerTile``) with a space collision: ``wScriptFlags2[4]`` is reset. **Go back to 7**.
- If player is above a tile, the corresponding space script is queued to be executed by ``ScriptEvents`` in the current ``HandleMap`` iteration. ``wScriptFlags2[4]`` is reset. **Continue to 11**.
11) The space script loads the value of ``wCurSpaceNextSpace`` into ``wCurSpace``, and loads the new space data to ``wCurSpaceStruct[]``. Unless the space is a Branch Space or a Union Space, ``wSpacesLeft`` is decreased.

View File

@ -359,7 +359,7 @@ CheckBoardEvent:
jr z, .no_space_effect
; anchor point handler
; if wCurSpaceNextSpace is not an anchor point, override any anchor point we pass though
; if wCurSpaceNextSpace is not an anchor point, override any anchor point we pass through
ld a, [wCurSpaceNextSpace]
cp NEXT_SPACE_IS_ANCHOR_POINT
jr c, .next