diff options
author | xCrystal <rgr.crystal@gmail.com> | 2018-02-25 19:32:52 +0100 |
---|---|---|
committer | xCrystal <rgr.crystal@gmail.com> | 2018-02-25 19:32:52 +0100 |
commit | 0ebbfca877fa165bc276cb6bac4c459f1738e554 (patch) | |
tree | 5d47d9bd1146cd738bba1547a5c59a5b70e719a4 | |
parent | a6dac1e014aae1f2a45f3549253fda0d3ea46e60 (diff) |
Some function name improvements
-rw-r--r-- | src/constants/card_data_constants.asm | 2 | ||||
-rw-r--r-- | src/engine/bank1.asm | 2 | ||||
-rw-r--r-- | src/engine/bank2.asm | 2 | ||||
-rw-r--r-- | src/engine/bank3.asm | 6 | ||||
-rw-r--r-- | src/engine/bank4.asm | 6 | ||||
-rw-r--r-- | src/engine/home.asm | 25 | ||||
-rw-r--r-- | src/wram.asm | 2 |
7 files changed, 23 insertions, 22 deletions
diff --git a/src/constants/card_data_constants.asm b/src/constants/card_data_constants.asm index 77a175f..6b6d299 100644 --- a/src/constants/card_data_constants.asm +++ b/src/constants/card_data_constants.asm @@ -55,7 +55,7 @@ CARD_DATA_MOVE2_EFFECT_COMMANDS EQU $2b CARD_DATA_MOVE2_FLAG1 EQU $2d CARD_DATA_MOVE2_FLAG2 EQU $2e CARD_DATA_MOVE2_FLAG3 EQU $2f -;CARD_DATA_MOVE2_UNKNOWN1 EQU $30 +CARD_DATA_MOVE2_UNKNOWN1 EQU $30 CARD_DATA_MOVE2_ANIMATION EQU $31 ; TYPE_PKMN card only diff --git a/src/engine/bank1.asm b/src/engine/bank1.asm index f1dd18f..ab84ad8 100644 --- a/src/engine/bank1.asm +++ b/src/engine/bank1.asm @@ -899,7 +899,7 @@ CheckIfEnoughEnergies: ; 488f (1:488f) push hl push bc ld e, $0 - call GetAttachedEnergies + call GetPlayAreaCardAttachedEnergies call HandleEnergyBurn ldh a, [hCurrentMenuItem] add a diff --git a/src/engine/bank2.asm b/src/engine/bank2.asm index 8159f40..22435ee 100644 --- a/src/engine/bank2.asm +++ b/src/engine/bank2.asm @@ -43,7 +43,7 @@ Func_8d56: ; 8d56 (2:4d56) xor a ld [wTileMapFill], a call EmptyScreen - call Func_099c + call InitSpritePositions ld a, $1 ld [wVBlankOAMCopyToggle], a call Func_2119 diff --git a/src/engine/bank3.asm b/src/engine/bank3.asm index 8bdf8ad..717ff69 100644 --- a/src/engine/bank3.asm +++ b/src/engine/bank3.asm @@ -11,7 +11,7 @@ LoadMap: ; c000 (3:4000) ld [wMatchStartTheme], a farcall Func_10a9b call Func_c1a4 - call Func_099c + call InitSpritePositions xor a ld [wTileMapFill], a call Func_2119 @@ -341,7 +341,7 @@ Unknown_c27c: ; c27c (3:427c) Func_c280: ; c280 (3:4280) call Func_c228 call Func_3ca0 - call Func_099c + call InitSpritePositions ld hl, wVBlankOAMCopyToggle inc [hl] call EnableLCD @@ -370,7 +370,7 @@ Func_c2a3: ; c2a3 (3:42a3) call Func_2275 farcall Func_12ba7 call Func_3ca0 - call Func_099c + call InitSpritePositions ld a, $1 ld [wVBlankOAMCopyToggle], a call EnableLCD diff --git a/src/engine/bank4.asm b/src/engine/bank4.asm index aa5fdd4..1b16106 100644 --- a/src/engine/bank4.asm +++ b/src/engine/bank4.asm @@ -18,7 +18,7 @@ Func_10000: ; 10000 (4:4000) .asm_10025 call Func_1288c - call Func_099c + call InitSpritePositions ld a, $1 ld [wVBlankOAMCopyToggle], a ret @@ -155,7 +155,7 @@ BoosterPack_1031b: ; 1031b (4:431b) call Func_2c73 call DisableLCD call Func_1288c - call Func_099c + call InitSpritePositions ld a, $1 ld [wVBlankOAMCopyToggle], a ld a, $4 @@ -1078,7 +1078,7 @@ Unknown_1229f: ; 1229f (4:629f) INCROM $1229f, $126d1 Func_126d1: ; 126d1 (4:66d1) - call Func_099c + call InitSpritePositions ld hl, wVBlankOAMCopyToggle inc [hl] farcall Func_70018 diff --git a/src/engine/home.asm b/src/engine/home.asm index 0de3823..86bf865 100644 --- a/src/engine/home.asm +++ b/src/engine/home.asm @@ -802,7 +802,7 @@ CopyDMAFunction: ; 0593 (0:0593) ; CopyDMAFunction copies this function to hDMAFunction ($ff83) DMA: ; 05a1 (0:05a1) - ld a, HIGH(wBufOAM) + ld a, HIGH(wOAM) ld [rDMA], a ld a, $28 .wait @@ -1565,19 +1565,20 @@ Func_08ef: ; 08ef (0:08ef) INCROM $0950, $099c -Func_099c: ; 099c (0:099c) +; set the Y Position and X Position of all sprites in wOAM to $00 +InitSpritePositions: ; 099c (0:099c) xor a ld [wcab5], a - ld hl, wBufOAM - ld c, $28 + ld hl, wOAM + ld c, 40 xor a -.asm_9a6 +.loop ld [hli], a ld [hli], a inc hl inc hl dec c - jr nz, .asm_9a6 + jr nz, .loop ret ; this function affects the stack so that it returns @@ -2919,7 +2920,7 @@ PutCardInDiscardPile: ; 116a (0:116a) ; search a card in the turn holder's discard pile, extract it, and add it to the hand ; the card is identified by register a, which contains the card number within the deck (0-59) -SearchCardInDiscardPileAndAddToHand: ; 1182 (0:1182) +MoveDiscardPileCardToHand: ; 1182 (0:1182) push hl push de push bc @@ -3290,7 +3291,7 @@ GetCardIDFromDeckIndex_bc: ; 12fa (0:12fa) ; 0x1303 ; return [wDuelTempList + a] in a and in hTempCardIndex_ff98 -Func_1303: ; 1303 (0:1303) +GetCardInDuelTempList_OnlyDeckIndex: ; 1303 (0:1303) push hl push de ld e, a @@ -3828,11 +3829,11 @@ SwapPlayAreaPokemon: ; 1548 (0:1548) ret ; 0x159f -; Find which and how many energy cards are attached to the Pokemon card in the arena, -; or to a Pokemon card in the bench, depending on the value of register e. +; Find which and how many energy cards are attached to the turn holder's Pokemon card in the arena, +; or a Pokemon card in the bench, depending on the value of register e. ; input: e (location to check) = CARD_LOCATION_* - CARD_LOCATION_PLAY_AREA ; Feedback is returned in wAttachedEnergies and wTotalAttachedEnergies. -GetAttachedEnergies: ; 159f (0:159f) +GetPlayAreaCardAttachedEnergies: ; 159f (0:159f) push hl push de push bc @@ -9595,7 +9596,7 @@ Func_3b31: ; 3b31 (0:3b31) ld [wDoFrameFunction], a ld [wcad4], a .asm_3b45 - call Func_099c + call InitSpritePositions ld a, $1 ld [wVBlankOAMCopyToggle], a pop af diff --git a/src/wram.asm b/src/wram.asm index 49c6e99..56ade23 100644 --- a/src/wram.asm +++ b/src/wram.asm @@ -308,7 +308,7 @@ wc900:: ; c900 SECTION "WRAM Engine 1", WRAM0 -wBufOAM:: ; ca00 +wOAM:: ; ca00 ds $a0 wcaa0:: ; caa0 |