Skip to content

tempest.asm useful comment change#14

Open
ScriptCoolestIdkSomeOne wants to merge 1 commit into
PlummersSoftwareLLC:mainfrom
ScriptCoolestIdkSomeOne:patch-1
Open

tempest.asm useful comment change#14
ScriptCoolestIdkSomeOne wants to merge 1 commit into
PlummersSoftwareLLC:mainfrom
ScriptCoolestIdkSomeOne:patch-1

Conversation

@ScriptCoolestIdkSomeOne

Copy link
Copy Markdown

updated
; There appears to be a loop beginning here
; for ($37=7;$37>=0;$37--) running from here through a827. I'm not sure ; just what goes on inside it, yet, though.
comment to the useful comment

updated
; There appears to be a loop beginning here
; for ($37=7;$37>=0;$37--) running from here through a827.  I'm not sure
; just what goes on inside it, yet, though.
comment to the useful comment
Comment thread Code/tempest.asm
Comment on lines +4336 to +4344
; Decrement animation timers for 8 slots at $03FE-$0405
; (likely sprite/effect states during level transitions)
; LOGIC: non zero values: subtract 7 (countdown), clamp based on $0115:
; $0115.7=1 (zoom active): expired timers reset to $F0 (full)
; $0115.7=0 (normal): expired timers clear to $00
; zero values: if $0115.7=1, inherit from next slot (circular,
; $03FE[0] wraps to $03FE[7]); values <$D5 become $F0, >=$D5 become $00
; $29 accumulates OR of all results; if zero after loop, clears $0115
; called during level transitions (zoom in/out effects).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new comment seems more specific than the code here supports. In particular, the $0115.7=1 claim looks inconsistent with nearby code that sets $0115 to $01, not a bit-7 value. The rest of the comment also assigns high-level meaning (“animation timers”, “zoom active”, “level transitions”) that may be plausible, but doesn’t look clearly established from this routine alone. I’d suggest rewriting it more conservatively unless those behaviors were verified from the full loop and its callers.

Phrased differently: please explain how you came to the conclusions your comment documents, and include specific references to the supporting source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants