summaryrefslogtreecommitdiff
path: root/src/wram.asm
diff options
context:
space:
mode:
Diffstat (limited to 'src/wram.asm')
-rw-r--r--src/wram.asm124
1 files changed, 89 insertions, 35 deletions
diff --git a/src/wram.asm b/src/wram.asm
index dc1d91f..30ea0e3 100644
--- a/src/wram.asm
+++ b/src/wram.asm
@@ -571,11 +571,11 @@ wTempSGBPacket:: ; cae0
; temporary CGB palette data buffer to eventually save into BGPD registers.
wBackgroundPalettesCGB:: ; caf0
- ds 8 palettes
+ ds NUM_BACKGROUND_PALETTES palettes
; temporary CGB palette data buffer to eventually save into OBPD registers.
wObjectPalettesCGB:: ; cb30
- ds 8 palettes
+ ds NUM_OBJECT_PALETTES palettes
ds $2
@@ -1203,17 +1203,20 @@ wDefaultYesOrNo:: ; cd9a
wcd9b:: ; cd9b
ds $1
-wcd9c:: ; cd9c
+; stores the total number of coins to flip
+wCoinTossTotalNum:: ; cd9c
ds $1
; this stores the result from a coin toss (number of heads)
wCoinTossNumHeads:: ; cd9d
ds $1
-wcd9e:: ; cd9e
+; stores type of the duelist that is tossing coins
+wCoinTossDuelistType:: ; cd9e
ds $1
-wcd9f:: ; cd9f
+; holds the number of coins that have already been tossed
+wCoinTossNumTossed:: ; cd9f
ds $1
ds $5
@@ -2143,7 +2146,12 @@ wd291:: ; d291
wd292:: ; d292
ds $1
- ds $90
+ ds $4
+
+wd297:: ; d297
+ ds 8 palettes
+
+ ds $4c
wd323:: ; d323
ds $1
@@ -2271,7 +2279,8 @@ wd3b1:: ; d3b1
wd3b2:: ; d3b2
ds $1
-wd3b3:: ; d3b3
+; sprite ID of the NPC to load
+wNPCSpriteID:: ; d3b3
ds $1
ds $2
@@ -2335,7 +2344,9 @@ wd41f:: ; d41f
wd420:: ; d420
ds $1
-wd421:: ; d421
+; store settings for animation enabled/disabled
+; 0 means enabled, 1 means disabled
+wAnimationsDisabled:: ; d421
ds $1
; holds an animation to play
@@ -2351,9 +2362,10 @@ wAnimationQueue:: ; d423
wd42a:: ; d42a
ds $1
-wd42b:: ; d42b
+wAnimFlags:: ; d42b
ds $1
+wd42c:: ; d42c
ds $80
wd4ac:: ; d4ac
@@ -2362,7 +2374,12 @@ wd4ac:: ; d4ac
wd4ad:: ; d4ad
ds $1
-wd4ae:: ; d4ae
+; used to know what coordinate offsets to use to place animations
+; for use in GetAnimCoordsAndFlags
+; DUEL_ANIM_SCREEN_MAIN_SCENE = main scene
+; DUEL_ANIM_SCREEN_PLAYER_PLAY_AREA = Player's Play Area screen
+; DUEL_ANIM_SCREEN_OPP_PLAY_AREA = Opponent's Play Area screen
+wDuelAnimationScreen:: ; d4ae
ds $1
wd4af:: ; d4af
@@ -2380,12 +2397,25 @@ wd4b2:: ; d4b2
wd4b3:: ; d4b3
ds $1
- ds $5
+wd4b4:: ; d4b4
+ ds $1
+
+ ds $2
+
+wd4b7:: ; d4b7
+ ds $1
+
+wd4b8:: ; d4b8
+ ds $1
wd4b9:: ; d4b9
+ ds $2
+
+wd4bb:: ; d4bb
ds $1
- ds $4
+wd4bc:: ; d4bc
+ ds $2
wd4be:: ; d4be
ds $1
@@ -2398,11 +2428,9 @@ wd4c0:: ; d4c0
ds $1
-wd4c2:: ; d4c2
- ds $1
-
-wd4c3:: ; d4c3
- ds $1
+; pointer to address in VRAM
+wVRAMPointer:: ; d4c2
+ ds $2
; these next 3 seem to be an address (bank @ end) for copying bg data
wTempPointer:: ; d4c4
@@ -2411,14 +2439,19 @@ wTempPointer:: ; d4c4
wTempPointerBank:: ; d4c6
ds $1
-wd4c7:: ; d4c7
+; stores number of bytes per tile for current sprite
+wCurSpriteTileSize:: ; d4c7
ds $1
-wd4c8:: ; d4c8
+; stores number of tiles that current sprite has
+wCurSpriteNumTiles:: ; d4c8
ds $1
ds $1
+; stores tile offset in VRAM
+wVRAMTileOffset:: ; d4ca
+
wd4ca:: ; d4ca
ds $1
@@ -2474,11 +2507,26 @@ wd5d6:: ; d5d6
wd5d7:: ; d5d7
ds $1
-wd5d8:: ; d5d8
- ds $40
-
-; seems to be the amount of entries in wd5d8
-wd618:: ; d618
+wSpriteVRAMBuffer:: ; d5d8
+ sprite_vram_struct wSpriteVRAM1
+ sprite_vram_struct wSpriteVRAM2
+ sprite_vram_struct wSpriteVRAM3
+ sprite_vram_struct wSpriteVRAM4
+ sprite_vram_struct wSpriteVRAM5
+ sprite_vram_struct wSpriteVRAM6
+ sprite_vram_struct wSpriteVRAM7
+ sprite_vram_struct wSpriteVRAM8
+ sprite_vram_struct wSpriteVRAM9
+ sprite_vram_struct wSpriteVRAM10
+ sprite_vram_struct wSpriteVRAM11
+ sprite_vram_struct wSpriteVRAM12
+ sprite_vram_struct wSpriteVRAM13
+ sprite_vram_struct wSpriteVRAM14
+ sprite_vram_struct wSpriteVRAM15
+ sprite_vram_struct wSpriteVRAM16
+
+; seems to be the amount of entries in wSpriteVRAMBuffer
+wSpriteVRAMBufferSize:: ; d618
ds $1
ds $2
@@ -2654,10 +2702,12 @@ wCurSongBank:: ; dd81
wCurSfxID:: ; dd82
ds $1
-wdd83:: ; dd83
+; priority value of current sfx (0 if nothing is playing)
+wSfxPriority:: ; dd83
ds $1
-wMusicDC:: ; dd84
+; 8-bit output enable mask for left/right output for each channel
+wMusicStereoPanning:: ; dd84
ds $1
wdd85:: ; dd85
@@ -2741,16 +2791,19 @@ wddba:: ; ddba
wddbb:: ; ddbb
ds $4
-wMusicE8:: ; ddbf
+; the delay (1-8) before a note is cut off early (0 is disabled)
+wMusicCutoff:: ; ddbf
ds $4
wddc3:: ; ddc3
ds $4
-wMusicE9:: ; ddc7
+; the volume to apply after a cutoff
+wMusicEcho:: ; ddc7
ds $4
-wMusicEC:: ; ddcb
+; the pitch offset to apply to each note (see Music1_Pitches)
+wMusicPitchOffset:: ; ddcb
ds $4
wMusicSpeed:: ; ddcf
@@ -2774,7 +2827,8 @@ wdde3:: ; dde3
wMusicVolume:: ; dde7
ds $3
-wMusicE4:: ; ddea
+; the frequency offset to apply to each note
+wMusicFrequencyOffset:: ; ddea
ds $3
wdded:: ; dded
@@ -2853,7 +2907,7 @@ wCurSongIDBackup:: ; de55
wCurSongBankBackup:: ; de56
ds $1
-wMusicDCBackup:: ; de57
+wMusicStereoPanningBackup:: ; de57
ds $1
wMusicDuty1Backup:: ; de58
@@ -2895,16 +2949,16 @@ wde80:: ; de80
wde84:: ; de84
ds $4
-wMusicE8Backup:: ; de88
+wMusicCutoffBackup:: ; de88
ds $4
wde8c:: ; de8c
ds $4
-wMusicE9Backup:: ; de90
+wMusicEchoBackup:: ; de90
ds $4
-wMusicECBackup:: ; de94
+wMusicPitchOffsetBackup:: ; de94
ds $4
wMusicSpeedBackup:: ; de98
@@ -2919,7 +2973,7 @@ wMusicVibratoDelayBackup:: ; dea0
wMusicVolumeBackup:: ; dea4
ds $3
-wMusicE4Backup:: ; dea7
+wMusicFrequencyOffsetBackup:: ; dea7
ds $3
wdeaa:: ; deaa