Use for loops to declare dw sequences

This commit is contained in:
Rangi
2026-05-14 15:19:30 -04:00
parent 9ca05ca3fc
commit f9b388bafa
3 changed files with 10 additions and 24 deletions

View File

@@ -2784,17 +2784,9 @@ StereoTracks:
ChannelPointers:
table_width 2
; music channels
dw wChannel1
dw wChannel2
dw wChannel3
dw wChannel4
assert_table_length NUM_MUSIC_CHANS
; sfx channels
dw wChannel5
dw wChannel6
dw wChannel7
dw wChannel8
for n, 1, NUM_CHANNELS + 1
dw wChannel{d:n}
endr
assert_table_length NUM_CHANNELS
ClearChannels::

View File

@@ -2959,16 +2959,10 @@ InitSprites:
ret
.Addresses:
table_width 2
dw wPlayerStruct
dw wObject1Struct
dw wObject2Struct
dw wObject3Struct
dw wObject4Struct
dw wObject5Struct
dw wObject6Struct
dw wObject7Struct
dw wObject8Struct
dw wObject9Struct
dw wObject10Struct
dw wObject11Struct
dw wObject12Struct
; wObjectStruct1 - wObjectStruct12
for n, 1, NUM_OBJECT_STRUCTS
dw wObject{d:n}Struct
endr
assert_table_length NUM_OBJECT_STRUCTS

View File

@@ -2361,7 +2361,7 @@ wFollowMovementQueue:: ds 5
UNION
wObjectStructs::
wPlayerStruct:: object_struct wPlayer ; player is object struct 0
; wObjectStruct1 - wObjectStruct12
; wObject1Struct - wObject12Struct
for n, 1, NUM_OBJECT_STRUCTS
wObject{d:n}Struct:: object_struct wObject{d:n}
endr