diff options
Diffstat (limited to 'engine')
| -rw-r--r-- | engine/bank3d/bank3d_battle.asm | 12 | ||||
| -rw-r--r-- | engine/bank3d/link_menu.asm | 12 | ||||
| -rw-r--r-- | engine/bank3d/main.asm | 28 | ||||
| -rw-r--r-- | engine/battle/battle_transitions.asm | 6 | ||||
| -rw-r--r-- | engine/battle/common_text.asm | 2 | ||||
| -rwxr-xr-x | engine/multiply_divide.asm | 4 | ||||
| -rwxr-xr-x | engine/overworld/healing_machine.asm | 2 | ||||
| -rwxr-xr-x | engine/palettes.asm | 30 | 
8 files changed, 47 insertions, 49 deletions
| diff --git a/engine/bank3d/bank3d_battle.asm b/engine/bank3d/bank3d_battle.asm index 9a9b60f1..50df865e 100644 --- a/engine/bank3d/bank3d_battle.asm +++ b/engine/bank3d/bank3d_battle.asm @@ -24,7 +24,7 @@ asm_f6003: ; f6003 (3d:6003)  asm_f601d: ; f601d (f:601d)  	ld a, [wMapPalOffset]  	push af -	ld hl, wd358 +	ld hl, wLetterPrintingDelayFlags  	ld a, [hl]  	push af  	res 1, [hl] @@ -109,7 +109,7 @@ InitWildBattle: ; f607c (3d:607c)  ; common code that executes after init battle code specific to trainer or wild battles  InitBattle_Common: ; f60eb (3d:60eb)  	ld b, $0 -	call GoPAL_SET +	call RunPaletteCommand  	callab SlidePlayerAndEnemySilhouettesOnScreen  	xor a  	ld [H_AUTOBGTRANSFERENABLED], a @@ -140,10 +140,10 @@ InitBattle_Common: ; f60eb (3d:60eb)  	callab StartBattle  	callab EndOfBattle  	pop af -	ld [wd358], a +	ld [wLetterPrintingDelayFlags], a  	pop af  	ld [wMapPalOffset], a -	ld a, [wd0d4] +	ld a, [wSavedTilesetType]  	ld [hTilesetType], a  	scf  	ret @@ -205,7 +205,7 @@ Func_f61a6: ; f61a6 (3d:f61a6)  	ld bc, -41  	add hl, bc  	ld a, $1 -	ld [wcd6c], a +	ld [wNumMovesMinusOne], a  	ld bc, $303  	predef Func_79aba  	ld c, $4 @@ -213,7 +213,7 @@ Func_f61a6: ; f61a6 (3d:f61a6)  	ld bc, -41  	add hl, bc  	xor a -	ld [wcd6c], a +	ld [wNumMovesMinusOne], a  	ld bc, $505  	predef Func_79aba  	ld c, $5 diff --git a/engine/bank3d/link_menu.asm b/engine/bank3d/link_menu.asm index 69d0458e..bd1f664c 100644 --- a/engine/bank3d/link_menu.asm +++ b/engine/bank3d/link_menu.asm @@ -22,7 +22,7 @@ Func_f531b:: ; f531b (3d:531b)  	call TextBoxBorder  	call UpdateSprites  	xor a -	ld [wcd37],a +	ld [wUnusedCD37],a  	ld [wd72d],a  	ld [wd11e],a  	ld hl,wTopMenuItemY @@ -634,7 +634,7 @@ ColosseumIneligibleText:: ; f5807 (3d:5807)  LinkMenu: ; f580c (3d:580c)  	xor a -	ld [wd358], a +	ld [wLetterPrintingDelayFlags], a  	ld hl, wd72e  	set 6, [hl]  	ld hl, TextTerminator_f5a16 @@ -650,7 +650,7 @@ LinkMenu: ; f580c (3d:580c)  	ld de, TradeCenterText  	call PlaceString  	xor a -	ld [wcd37], a +	ld [wUnusedCD37], a  	ld [wd72d], a  	ld [wd11e], a  	ld hl, wTopMenuItemY @@ -765,9 +765,9 @@ LinkMenu: ; f580c (3d:580c)  	ld [wWalkBikeSurfState], a ; start walking  	ld a, [wCurrentMenuItem]  	and a -	ld a, TRADE_CENTER +	ld a, COLOSSEUM  	jr nz, .next -	ld a, BATTLE_CENTER +	ld a, TRADE_CENTER  .next  	ld [wd72d], a  	ld hl, ColosseumPleaseWaitText @@ -786,7 +786,7 @@ LinkMenu: ; f580c (3d:580c)  	ld [wSerialExchangeNybbleSendData], a  	inc a ; LINK_STATE_IN_CABLE_CLUB  	ld [wLinkState], a -	ld [wcc47], a +	ld [wEnteringCableClub], a  	ld hl,Func_5ce4  	ld b,BANK(Func_5ce4)  	jp Bankswitch diff --git a/engine/bank3d/main.asm b/engine/bank3d/main.asm index cdacf431..d93f16d2 100644 --- a/engine/bank3d/main.asm +++ b/engine/bank3d/main.asm @@ -273,7 +273,7 @@ INCLUDE "engine/bank3d/link_menu.asm"  HandleMenuInputDouble:: ; f5a40 (3d:5a40)  	xor a -	ld [wd09b],a +	ld [wPartyMenuAnimMonEnabled],a  HandleMenuInputPokemonSelectionDouble:: ; f5a44 (3d:5a44)  	ld a,[H_DOWNARROWBLINKCNT1] @@ -286,7 +286,7 @@ HandleMenuInputPokemonSelectionDouble:: ; f5a44 (3d:5a44)  	ld [H_DOWNARROWBLINKCNT2],a ; blinking down arrow timing value 2  .loop1  	xor a -	ld [wPartyMonAnimCounter],a ; counter for pokemon shaking animation +	ld [wAnimCounter],a ; counter for pokemon shaking animation  	call Func_f5ab0  	call JoypadLowSensitivity  	ld a,[hJoy5] @@ -301,7 +301,7 @@ HandleMenuInputPokemonSelectionDouble:: ; f5a44 (3d:5a44)  	ret  .keyPressed  	xor a -	ld [wcc4b],a +	ld [wCheckFor180DegreeTurn],a  	ld a,[hJoy5]  	ld b,a  	bit 6,a ; pressed Up key? @@ -460,7 +460,7 @@ Text_f5b6c:: ; f5b6c (3d:5b6c)  	db "@"  AddItemToInventory_:: ; f5b70 (3d:5b70) -	ld a,[wcf96] ; a = item quantity +	ld a,[wItemQuantity] ; a = item quantity  	push af  	push bc  	push de @@ -508,12 +508,12 @@ AddItemToInventory_:: ; f5b70 (3d:5b70)  	add hl,bc ; hl = address to store the item  	ld a,[wcf91]  	ld [hli],a ; store item ID -	ld a,[wcf96] +	ld a,[wItemQuantity]  	ld [hli],a ; store item quantity  	ld [hl],$ff ; store terminator  	jp .success  .increaseItemQuantity ; increase the quantity of an item already in the inventory -	ld a,[wcf96] +	ld a,[wItemQuantity]  	ld b,a ; b = quantity to add  	ld a,[hl] ; a = existing item quantity  	add b ; a = new item quantity @@ -522,7 +522,7 @@ AddItemToInventory_:: ; f5b70 (3d:5b70)  ; if the new quantity is greater than or equal to 100,  ; try to max out the current slot and add the rest in a new slot  	sub a,99 -	ld [wcf96],a ; a = amount left over (to put in the new slot) +	ld [wItemQuantity],a ; a = amount left over (to put in the new slot)  	ld a,d  	and a ; is there room for a new item slot?  	jr z,.increaseItemQuantityFailed @@ -545,14 +545,14 @@ AddItemToInventory_:: ; f5b70 (3d:5b70)  	pop bc  	pop bc  	ld a,b -	ld [wcf96],a ; restore the initial value from when the function was called +	ld [wItemQuantity],a ; restore the initial value from when the function was called  	ret  ; function to remove an item (in varying quantities) from the player's bag or PC box  ; INPUT:  ; hl = address of inventory (either wNumBagItems or wNumBoxItems)  ; [wWhichPokemon] = index (within the inventory) of the item to remove -; [wcf96] = quantity to remove +; [wItemQuantity] = quantity to remove  RemoveItemFromInventory_: ; f5be1 (3d:5be1)  	push hl  	inc hl @@ -564,12 +564,12 @@ RemoveItemFromInventory_: ; f5be1 (3d:5be1)  	inc h  .noCarry  	inc hl -	ld a,[wcf96] ; quantity being removed +	ld a,[wItemQuantity] ; quantity being removed  	ld e,a  	ld a,[hl] ; a = current quantity  	sub e  	ld [hld],a ; store new quantity -	ld [wcf97],a +	ld [wMaxItemQuantity],a  	and a  	jr nz,.skipMovingUpSlots  ; if the remaining quantity is 0, @@ -589,13 +589,13 @@ RemoveItemFromInventory_: ; f5be1 (3d:5be1)  	xor a  	ld [wListScrollOffset],a  	ld [wCurrentMenuItem],a -	ld [wcc2c],a -	ld [wd07e],a +	ld [wBagSavedMenuItem],a +	ld [wSavedListScrollOffset],a  	pop hl  	ld a,[hl] ; a = number of items in inventory  	dec a ; decrement the number of items  	ld [hl],a ; store new number of items -	ld [wd12a],a +	ld [wListCount],a  	cp a,2  	jr c,.done  	ld [wMaxMenuItem],a diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index f5af6826..2ff681dd 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -355,7 +355,7 @@ BattleTransition_OutwardSpiral_: ; 70b6c (1c:4b6c)  	jr .done  FlashScreen: -BattleTransition_FlashScreen_: ; 70be8 (1c:4be8s) +BattleTransition_FlashScreen_: ; 70be8 (1c:4be8)  	ld hl, BattleTransition_FlashScreenPalettes  .loop  	ld a, [hli] @@ -377,6 +377,7 @@ BattleTransition_FlashScreenPalettes: ; 70be8 (1c:4be8)  ; used for low level trainer dungeon battles  BattleTransition_Shrink: ; 70bf4 (1c:4bf4) +	ld c,9  .loop  	push bc  	xor a @@ -410,6 +411,7 @@ BattleTransition_Shrink: ; 70bf4 (1c:4bf4)  ; used for high level trainer dungeon battles  BattleTransition_Split: ; 70c40 (1c:4c40) +	ld c,$9  	xor a  	ld [H_AUTOBGTRANSFERENABLED], a  .loop @@ -471,7 +473,7 @@ BattleTransition_CopyTiles1: ; 70c88 (1c:4c88)  	jr nz, .loop2  	ret -BattleTransition_CopyTiles2: ; 70cb5 (1c:4c3f) +BattleTransition_CopyTiles2: ; 70cb5 (1c:4cb5)  	ld a, c  	ld [wBattleTransitionCopyTilesOffset], a  	ld a, b diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm index e3c7e1fa..fcc00376 100644 --- a/engine/battle/common_text.asm +++ b/engine/battle/common_text.asm @@ -79,7 +79,7 @@ PrintBeginningBattleText: ; f4000 (3d:4000)  	xor a  	ld [wFrequencyModifier], a  	ld a, $80 -	ld [wc0f2], a +	ld [wTempoModifier], a  	ld a, $e9 ; (SFX_08_77 - SFX_Headers_08) / 3  	call PlaySound  	jp WaitForSoundToFinish diff --git a/engine/multiply_divide.asm b/engine/multiply_divide.asm index 7cb381b4..6ff427c6 100755 --- a/engine/multiply_divide.asm +++ b/engine/multiply_divide.asm @@ -58,10 +58,6 @@ _Multiply: ; f660e (3d:660e)  	ld [H_PRODUCT+1], a ; $ff96  	ld a, [H_MULTIPLYBUFFER]  	ld [H_PRODUCT], a ; $ff95 -	ld a, [H_MULTIPLYBUFFER+1] -	ld [H_PRODUCT+1], a -	ld a, [H_MULTIPLYBUFFER] -	ld [H_PRODUCT], a  	ret  _Divide: ; f6672 (3d:6672) diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index 8269aefd..320cda73 100755 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -47,7 +47,7 @@ AnimateHealingMachine: ; 7048b (1c:448b)  	ld d, $28  	call FlashSprite8Times  .waitLoop2 -	ld a, [wc026] +	ld a, [wChannelSoundIDs]  	cp $e8 ; MUSIC_PKMN_HEALED  	jr z, .waitLoop2  	ld c, 32 diff --git a/engine/palettes.asm b/engine/palettes.asm index 810f8e77..2668236a 100755 --- a/engine/palettes.asm +++ b/engine/palettes.asm @@ -163,10 +163,10 @@ SetPal_Overworld: ; 71fa5 (1c:5fa5)  	jr z, .Lorelei  	cp BRUNOS_ROOM  	jr z, .caveOrBruno -	cp BATTLE_CENTER -	jr z,.asm_71ffd  	cp TRADE_CENTER  	jr z,.asm_71ffd +	cp COLOSSEUM +	jr z,.asm_71ffd  .normalDungeonOrBuilding  	ld a, [wLastMap] ; town or route that current dungeon or building is located  .townOrRoute @@ -321,14 +321,14 @@ Func_720ad:: ; 720ad (1c:60ad)  	ld a,[hGBC]  	and a  	jp z,Func_721b4 -	jp Func_72346 +	jp InitGBCPalettes  Func_720bd:: ; 720bd (1c:60bd)  	ld hl,UnknownPalPacket_72811  	ld a,[hGBC]  	and a  	jp z,Func_721b4 -	call Func_72346 +	call InitGBCPalettes  	ld hl,PalPacket_Generic  	inc hl  	ld a,[hli] @@ -345,29 +345,29 @@ Func_720bd:: ; 720bd (1c:60bd)  Func_720e3:: ; 720e3 (1c:60e3)  	ld hl,PalPacket_Empty -	ld de,wcf2d +	ld de,wPalPacket  	ld bc,$10  	call CopyData  	call Func_7213b -	ld hl,wcf2e +	ld hl,wPartyMenuBlkPacket  	ld [hl],a -	ld hl,wcf30 +	ld hl,wPartyMenuBlkPacket + 2  	ld a,$26  	ld [hl],a -	ld hl,wcf2d +	ld hl,wPalPacket  	ld a,[hGBC]  	and a  	jr nz,.asm_72109  	call Func_721b4  	jr .asm_7210c  .asm_72109 -	call Func_72346 +	call InitGBCPalettes  .asm_7210c  	ld hl,BlkPacket_WholeScreen -	ld de,wcf2d +	ld de,wPalPacket  	ld bc,$10  	call CopyData -	ld hl,wcf30 +	ld hl,wPartyMenuBlkPacket + 2  	ld a,$5  	ld [hli],a  	ld a,$7 @@ -378,14 +378,14 @@ Func_720e3:: ; 720e3 (1c:60e3)  	ld [hli],a  	ld a,$a  	ld [hl],a -	ld hl,wcf2d +	ld hl,wPalPacket  	ld a,[hGBC]  	and a  	jr nz,.asm_72137  	call Func_721b4  	jr .asm_7213a  .asm_72137 -	call Func_72346 +	call InitGBCPalettes  .asm_7213a  	ret @@ -407,10 +407,10 @@ Func_7213b:: ; 7213b (1c:613b)  	jr z, .Lorelei  	cp BRUNOS_ROOM  	jr z, .caveOrBruno -	cp BATTLE_CENTER -	jr z,.battleOrTradeCenter  	cp TRADE_CENTER  	jr z,.battleOrTradeCenter +	cp COLOSSEUM +	jr z,.battleOrTradeCenter  .normalDungeonOrBuilding  	ld a, [wLastMap] ; town or route that current dungeon or building is located  .townOrRoute | 
