trade animation

This commit is contained in:
PikalaxALT 2015-11-23 00:21:21 -05:00
parent 8740fc6e87
commit 58020fb5f6
23 changed files with 4123 additions and 3888 deletions

View File

@ -2532,48 +2532,48 @@ WinTrainerBattle: ; 3cfa4
; 3d02b ; 3d02b
Function3d02b: ; 3d02b Function3d02b: ; 3d02b
ld a, [wc73d] ld a, [wAmuletCoin]
and a and a
call nz, Function3d099 call nz, .DoubleReward
call Function3d0b1 call .CheckMaxedOutMomMoney
push af push af
ld a, $0 ld a, $0
jr nc, .asm_3d044 jr nc, .okay
ld a, [wMomSavingMoney] ld a, [wMomSavingMoney]
and $7 and $7
cp $3 cp $3
jr nz, .asm_3d044 jr nz, .okay
inc a inc a
.asm_3d044 .okay
ld b, a ld b, a
ld c, $4 ld c, $4
.asm_3d047 .loop
ld a, b ld a, b
and a and a
jr z, .asm_3d052 jr z, .loop2
call Function3d081 call .SendMoneyToMom
dec c dec c
dec b dec b
jr .asm_3d047 jr .loop
.asm_3d052 .loop2
ld a, c ld a, c
and a and a
jr z, .asm_3d05c jr z, .done
call Function3d08d call .AddMoneyToWallet
dec c dec c
jr .asm_3d052 jr .loop2
.asm_3d05c .done
call Function3d099 call .DoubleReward
call Function3d099 call .DoubleReward
pop af pop af
jr nc, .KeepItAll jr nc, .KeepItAll
ld a, [wMomSavingMoney] ld a, [wMomSavingMoney]
and $7 and $7
jr z, .KeepItAll jr z, .KeepItAll
ld hl, SentToMomTexts ld hl, .SentToMomTexts
dec a dec a
ld c, a ld c, a
ld b, 0 ld b, 0
@ -2590,26 +2590,26 @@ endr
jp StdBattleTextBox jp StdBattleTextBox
; 3d081 ; 3d081
Function3d081: ; 3d081 .SendMoneyToMom: ; 3d081
push bc push bc
ld hl, wc688 ld hl, wBattleReward + 2
ld de, wMomsMoney + 2 ld de, wMomsMoney + 2
call Function3d0be call AddBattleMoneyToAccount
pop bc pop bc
ret ret
; 3d08d ; 3d08d
Function3d08d: ; 3d08d .AddMoneyToWallet: ; 3d08d
push bc push bc
ld hl, wc688 ld hl, wBattleReward + 2
ld de, Money + 2 ld de, Money + 2
call Function3d0be call AddBattleMoneyToAccount
pop bc pop bc
ret ret
; 3d099 ; 3d099
Function3d099: ; 3d099 .DoubleReward: ; 3d099
ld hl, wc688 ld hl, wBattleReward + 2
sla [hl] sla [hl]
dec hl dec hl
rl [hl] rl [hl]
@ -2624,14 +2624,14 @@ endr
ret ret
; 3d0ab ; 3d0ab
SentToMomTexts: ; 3d0ab .SentToMomTexts: ; 3d0ab
dw SentSomeToMomText dw SentSomeToMomText
dw SentHalfToMomText dw SentHalfToMomText
dw SentAllToMomText dw SentAllToMomText
; 3d0b1 ; 3d0b1
Function3d0b1: ; 3d0b1 .CheckMaxedOutMomMoney: ; 3d0b1
ld hl, wMomsMoney + 2 ld hl, wMomsMoney + 2
ld a, [hld] ld a, [hld]
cp 999999 % $100 cp 999999 % $100
@ -2642,7 +2642,7 @@ Function3d0b1: ; 3d0b1
ret ret
; 3d0be ; 3d0be
Function3d0be: ; 3d0be AddBattleMoneyToAccount: ; 3d0be
ld c, $3 ld c, $3
and a and a
push de push de
@ -2653,14 +2653,14 @@ Function3d0be: ; 3d0be
callba MobileFn_106008 callba MobileFn_106008
pop bc pop bc
pop hl pop hl
.asm_3d0ce .loop
ld a, [de] ld a, [de]
adc [hl] adc [hl]
ld [de], a ld [de], a
dec de dec de
dec hl dec hl
dec c dec c
jr nz, .asm_3d0ce jr nz, .loop
pop hl pop hl
ld a, [hld] ld a, [hld]
cp 999999 % $100 cp 999999 % $100
@ -2823,7 +2823,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa
ld a, [CurBattleMon] ld a, [CurBattleMon]
ld c, a ld c, a
ld hl, wBattleParticipantsNotFainted ld hl, wBattleParticipantsNotFainted
ld b, $0 ld b, RESET_FLAG
predef FlagPredef predef FlagPredef
ld hl, EnemySubStatus3 ld hl, EnemySubStatus3
res SUBSTATUS_IN_LOOP, [hl] res SUBSTATUS_IN_LOOP, [hl]
@ -5602,7 +5602,7 @@ CheckAmuletCoin: ; 3e4a8
cp HELD_AMULET_COIN cp HELD_AMULET_COIN
ret nz ret nz
ld a, 1 ld a, 1
ld [wc73d], a ld [wAmuletCoin], a
ret ret
; 3e4bc ; 3e4bc
@ -6716,7 +6716,7 @@ endr
ld a, [TempEnemyMonSpecies] ld a, [TempEnemyMonSpecies]
dec a dec a
ld c, a ld c, a
ld b, 1 ; set ld b, SET_FLAG
ld hl, PokedexSeen ld hl, PokedexSeen
predef FlagPredef predef FlagPredef
@ -7741,7 +7741,7 @@ endr
ld hl, EvolvableFlags ld hl, EvolvableFlags
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld c, a ld c, a
ld b, $1 ld b, SET_FLAG
predef FlagPredef predef FlagPredef
pop af pop af
ld [CurPartyLevel], a ld [CurPartyLevel], a
@ -8790,7 +8790,7 @@ CheckPayDay: ; 3f71d
inc hl inc hl
or [hl] or [hl]
ret z ret z
ld a, [wc73d] ld a, [wAmuletCoin]
and a and a
jr z, .okay jr z, .okay
ld hl, wPayDayMoney + 2 ld hl, wPayDayMoney + 2
@ -8809,7 +8809,7 @@ endr
.okay .okay
ld hl, wPayDayMoney + 2 ld hl, wPayDayMoney + 2
ld de, Money + 2 ld de, Money + 2
call Function3d0be call AddBattleMoneyToAccount
ld hl, BattleText_PlayerPickuedUpPayDayMoney ld hl, BattleText_PlayerPickuedUpPayDayMoney
call StdBattleTextBox call StdBattleTextBox
ld a, [InBattleTowerBattle] ld a, [InBattleTowerBattle]

349
battle/used_move_text.asm Executable file
View File

@ -0,0 +1,349 @@
DisplayUsedMoveText: ; 105db0
; battle command 03
ld hl, UsedMoveText
call BattleTextBox
jp WaitBGMap
; 105db9
UsedMoveText: ; 105db9
; this is a stream of text and asm from 105db9 to 105ef6
text_jump _ActorNameText
start_asm
ld a, [hBattleTurn]
and a
jr nz, .start
ld a, [wPlayerMoveStruct + MOVE_ANIM]
call UpdateUsedMoves
.start
ld a, BATTLE_VARS_LAST_MOVE
call GetBattleVarAddr
ld d, h
ld e, l
ld a, BATTLE_VARS_LAST_COUNTER_MOVE
call GetBattleVarAddr
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
ld [wd265], a
push hl
callba CheckUserIsCharging
pop hl
jr nz, .grammar
; update last move
ld a, [wd265]
ld [hl], a
ld [de], a
.grammar
call GetMoveGrammar
; wd265 now contains MoveGrammar
; everything except 'instead' made redundant in localization
; check obedience
ld a, [AlreadyDisobeyed]
and a
ld hl, UsedMove2Text
ret nz
; check move grammar
ld a, [wd265]
cp $3
ld hl, UsedMove2Text
ret c
ld hl, UsedMove1Text
ret
; 105e04
UsedMove1Text: ; 105e04
text_jump _UsedMove1Text
start_asm
jr Function105e10
; 105e0b
UsedMove2Text: ; 105e0b
text_jump _UsedMove2Text
start_asm
; 105e10
Function105e10: ; 105e10
; check obedience
ld a, [AlreadyDisobeyed]
and a
jr z, GetMoveNameText
; print "instead,"
ld hl, UsedInsteadText
ret
; 105e1a
UsedInsteadText: ; 105e1a
text_jump _UsedInsteadText
start_asm
; 105e1f
GetMoveNameText: ; 105e1f
ld hl, MoveNameText
ret
; 105e23
MoveNameText: ; 105e23
text_jump _MoveNameText
start_asm
; 105e28
GetUsedMoveTextEnder: ; 105e28
; get start address
ld hl, .endusedmovetexts
; get move id
ld a, [wd265]
; 2-byte pointer
add a
; seek
push bc
ld b, $0
ld c, a
add hl, bc
pop bc
; get pointer to usedmovetext ender
ld a, [hli]
ld h, [hl]
ld l, a
ret
; 105e39
.endusedmovetexts ; 105e39
dw EndUsedMove1Text
dw EndUsedMove2Text
dw EndUsedMove3Text
dw EndUsedMove4Text
dw EndUsedMove5Text
; 105e43
EndUsedMove1Text: ; 105e43
text_jump _EndUsedMove1Text
db "@"
; 105e48
EndUsedMove2Text: ; 105e48
text_jump _EndUsedMove2Text
db "@"
; 105e4d
EndUsedMove3Text: ; 105e4d
text_jump _EndUsedMove3Text
db "@"
; 105e52
EndUsedMove4Text: ; 105e52
text_jump _EndUsedMove4Text
db "@"
; 105e57
EndUsedMove5Text: ; 105e57
text_jump _EndUsedMove5Text
db "@"
; 105e5c
GetMoveGrammar: ; 105e5c
; store move grammar type in wd265
push bc
; c = move id
ld a, [wd265]
ld c, a
ld b, $0
; read grammar table
ld hl, MoveGrammar
.loop
ld a, [hli]
; end of table?
cp $ff
jr z, .end
; match?
cp c
jr z, .end
; advance grammar type at $00
and a
jr nz, .loop
; next grammar type
inc b
jr .loop
.end
; wd265 now contains move grammar
ld a, b
ld [wd265], a
; we're done
pop bc
ret
; 105e7a
MoveGrammar: ; 105e7a
; made redundant in localization
; each move is given an identifier for what usedmovetext to use (0-4):
; 0
db SWORDS_DANCE
db GROWTH
db STRENGTH
db HARDEN
db MINIMIZE
db SMOKESCREEN
db WITHDRAW
db DEFENSE_CURL
db EGG_BOMB
db SMOG
db BONE_CLUB
db FLASH
db SPLASH
db ACID_ARMOR
db BONEMERANG
db REST
db SHARPEN
db SUBSTITUTE
db MIND_READER
db SNORE
db PROTECT
db SPIKES
db ENDURE
db ROLLOUT
db SWAGGER
db SLEEP_TALK
db HIDDEN_POWER
db PSYCH_UP
db EXTREMESPEED
db 0 ; end set
; 1
db RECOVER
db TELEPORT
db BIDE
db SELFDESTRUCT
db AMNESIA
db FLAIL
db 0 ; end set
; 2
db MEDITATE
db AGILITY
db MIMIC
db DOUBLE_TEAM
db BARRAGE
db TRANSFORM
db STRUGGLE
db SCARY_FACE
db 0 ; end set
; 3
db POUND
db SCRATCH
db VICEGRIP
db WING_ATTACK
db FLY
db BIND
db SLAM
db HORN_ATTACK
db WRAP
db THRASH
db TAIL_WHIP
db LEER
db BITE
db GROWL
db ROAR
db SING
db PECK
db ABSORB
db STRING_SHOT
db EARTHQUAKE
db FISSURE
db DIG
db TOXIC
db SCREECH
db METRONOME
db LICK
db CLAMP
db CONSTRICT
db POISON_GAS
db BUBBLE
db SLASH
db SPIDER_WEB
db NIGHTMARE
db CURSE
db FORESIGHT
db CHARM
db ATTRACT
db ROCK_SMASH
db 0 ; end set
; all other moves = 4
db $ff ; end
; 105ed0
UpdateUsedMoves: ; 105ed0
; append move a to PlayerUsedMoves unless it has already been used
push bc
; start of list
ld hl, PlayerUsedMoves
; get move id
ld b, a
; next count
ld c, NUM_MOVES
.loop
; get move from the list
ld a, [hli]
; not used yet?
and a
jr z, .add
; already used?
cp b
jr z, .quit
; next byte
dec c
jr nz, .loop
; if the list is full and the move hasn't already been used
; shift the list back one byte, deleting the first move used
; this can occur with struggle or a new learned move
ld hl, PlayerUsedMoves + 1
; 1 = 2
ld a, [hld]
ld [hli], a
; 2 = 3
inc hl
ld a, [hld]
ld [hli], a
; 3 = 4
inc hl
ld a, [hld]
ld [hl], a
; 4 = new move
ld a, b
ld [PlayerUsedMoves + 3], a
jr .quit
.add
; go back to the byte we just inced from
dec hl
; add the new move
ld [hl], b
.quit
; list updated
pop bc
ret
; 105ef6

View File

@ -2547,41 +2547,41 @@ String_e36f1: ; e36f1
; e36f9 ; e36f9
Functione36f9: ; e36f9 (38:76f9) Functione36f9: ; e36f9 (38:76f9)
ld hl, MenuDataHeader_0xe377b ld hl, .MenuDataHeader
call LoadMenuDataHeader call LoadMenuDataHeader
call InterpretMenu2 call InterpretMenu2
call ExitMenu call ExitMenu
ret c ret c
ld a, [MenuSelection2] ld a, [MenuSelection2]
cp $1 cp $1
jr z, .asm_e3734 jr z, .Switch
cp $2 cp $2
jr z, .asm_e3745 jr z, .Name
cp $3 cp $3
jr z, .asm_e3717 jr z, .Print
and a and a
ret ret
.asm_e3717 .Print
call GetBoxCount call GetBoxCount
and a and a
jr z, .asm_e372f jr z, .EmptyBox
ld e, l ld e, l
ld d, h ld d, h
ld a, [MenuSelection] ld a, [MenuSelection]
dec a dec a
ld c, a ld c, a
callba Function844bc callba PrintPCBox
call Functione35e2 call Functione35e2
and a and a
ret ret
.asm_e372f .EmptyBox
call Functione37be call Functione37be
and a and a
ret ret
.asm_e3734 .Switch
ld a, [MenuSelection] ld a, [MenuSelection]
dec a dec a
ld e, a ld e, a
@ -2591,8 +2591,8 @@ Functione36f9: ; e36f9 (38:76f9)
callba ChangeBoxSaveGame callba ChangeBoxSaveGame
ret ret
.asm_e3745 .Name
ld b, $4 ld b, $4 ; box
ld de, wd002 ld de, wd002
callba NamingScreen callba NamingScreen
call ClearTileMap call ClearTileMap
@ -2616,15 +2616,15 @@ Functione36f9: ; e36f9 (38:76f9)
hlcoord 11, 7 ; XXX hlcoord 11, 7 ; XXX
MenuDataHeader_0xe377b: ; 0xe377b .MenuDataHeader: ; 0xe377b
db $40 ; flags db $40 ; flags
db 04, 11 ; start coords db 04, 11 ; start coords
db 13, 19 ; end coords db 13, 19 ; end coords
dw MenuData2_0xe3783 dw .MenuData2
db 1 ; default option db 1 ; default option
; 0xe3783 ; 0xe3783
MenuData2_0xe3783: ; 0xe3783 .MenuData2: ; 0xe3783
db $80 ; flags db $80 ; flags
db 4 ; items db 4 ; items
db "SWITCH@" db "SWITCH@"

File diff suppressed because it is too large Load Diff

View File

@ -489,7 +489,7 @@ Function4484a: ; 0x4484a
ld a, BANK(sMailboxCount) ld a, BANK(sMailboxCount)
call GetSRAMBank call GetSRAMBank
pop af pop af
ld hl, sMailbox1MailType ld hl, sMailbox1Type
ld bc, MAIL_STRUCT_LENGTH ld bc, MAIL_STRUCT_LENGTH
call AddNTimes call AddNTimes
ld a, [hl] ld a, [hl]

View File

@ -161,9 +161,9 @@ Function49da4: ; 49da4
cp $1 cp $1
ld a, $1 ld a, $1
ret nz ret nz
ld a, BANK(s0_abe5) ld a, BANK(sNumDailyMysteryGiftPartnerIDs)
call GetSRAMBank call GetSRAMBank
ld a, [s0_abe5] ld a, [sNumDailyMysteryGiftPartnerIDs]
cp $ff cp $ff
call CloseSRAM call CloseSRAM
jr nz, .done jr nz, .done

1702
engine/mysterygift.asm Executable file

File diff suppressed because it is too large Load Diff

View File

@ -18,10 +18,14 @@ TRADE_WRONG EQU 2
TRADE_COMPLETE EQU 3 TRADE_COMPLETE EQU 3
TRADE_AFTER EQU 4 TRADE_AFTER EQU 4
TRADE_EITHER_GENDER EQU 0
TRADE_MALE_ONLY EQU 1
TRADE_FEMALE_ONLY EQU 2
NPCTrade:: ; fcba8 NPCTrade:: ; fcba8
ld a, e ld a, e
ld [wJumptableIndex], a ld [wJumptableIndex], a
call Functionfcc59 call Trade_GetDialog
ld b, CHECK_FLAG ld b, CHECK_FLAG
call TradeFlagAction call TradeFlagAction
ld a, TRADE_AFTER ld a, TRADE_AFTER
@ -57,8 +61,8 @@ NPCTrade:: ; fcba8
ld hl, ConnectLinkCableText ld hl, ConnectLinkCableText
call PrintText call PrintText
call Functionfcc63 call DoNPCTrade
call Functionfcc07 call .TradeAnimation
call GetTradeMonNames call GetTradeMonNames
ld hl, TradedForText ld hl, TradedForText
@ -73,13 +77,13 @@ NPCTrade:: ; fcba8
ret ret
; fcc07 ; fcc07
Functionfcc07: ; fcc07 .TradeAnimation: ; fcc07
call DisableSpriteUpdates call DisableSpriteUpdates
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
push af push af
ld a, [wcf64] ld a, [wcf64]
push af push af
predef Function28f24 predef TradeAnimation
pop af pop af
ld [wcf64], a ld [wcf64], a
pop af pop af
@ -118,7 +122,7 @@ CheckTradeGender: ; fcc23
; fcc4a ; fcc4a
TradeFlagAction: ; fcc4a TradeFlagAction: ; fcc4a
ld hl, wd960 ld hl, wTradeFlags
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
ld c, a ld c, a
predef FlagPredef predef FlagPredef
@ -127,7 +131,7 @@ TradeFlagAction: ; fcc4a
ret ret
; fcc59 ; fcc59
Functionfcc59: ; fcc59 Trade_GetDialog: ; fcc59
ld e, TRADE_DIALOG ld e, TRADE_DIALOG
call GetTradeAttribute call GetTradeAttribute
ld a, [hl] ld a, [hl]
@ -135,74 +139,74 @@ Functionfcc59: ; fcc59
ret ret
; fcc63 ; fcc63
Functionfcc63: ; fcc63 DoNPCTrade: ; fcc63
ld e, TRADE_GIVEMON ld e, TRADE_GIVEMON
call GetTradeAttribute call GetTradeAttribute
ld a, [hl] ld a, [hl]
ld [wc6d0], a ld [wPlayerTrademonSpecies], a
ld e, TRADE_GETMON ld e, TRADE_GETMON
call GetTradeAttribute call GetTradeAttribute
ld a, [hl] ld a, [hl]
ld [wc702], a ld [wOTTrademonSpecies], a
ld a, [wc6d0] ld a, [wPlayerTrademonSpecies]
ld de, wc6d1 ld de, wPlayerTrademonSpeciesName
call Functionfcde8 call GetTradeMonName
call Functionfcdf4 call CopyTradeName
ld a, [wc702] ld a, [wOTTrademonSpecies]
ld de, wc703 ld de, wOTTrademonSpeciesName
call Functionfcde8 call GetTradeMonName
call Functionfcdf4 call CopyTradeName
ld hl, PartyMonOT ld hl, PartyMonOT
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call Functionfcdd7 call Trade_GetAttributeOfCurrentPartymon
ld de, wc6f2 ld de, wPlayerTrademonOTName
call Functionfcdf4 call CopyTradeName
ld hl, PlayerName ld hl, PlayerName
ld de, wc6e7 ld de, wPlayerTrademonSenderName
call Functionfcdf4 call CopyTradeName
ld hl, PartyMon1ID ld hl, PartyMon1ID
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call Functionfcdd7 call Trade_GetAttributeOfCurrentPartymon
ld de, wc6ff ld de, wPlayerTrademonID
call Functionfce0f call Trade_CopyTwoBytes
ld hl, PartyMon1DVs ld hl, PartyMon1DVs
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call Functionfcdd7 call Trade_GetAttributeOfCurrentPartymon
ld de, wc6fd ld de, wPlayerTrademonDVs
call Functionfce0f call Trade_CopyTwoBytes
ld hl, PartyMon1Species ld hl, PartyMon1Species
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call Functionfcdd7 call Trade_GetAttributeOfCurrentPartymon
ld b, h ld b, h
ld c, l ld c, l
callba GetCaughtGender callba GetCaughtGender
ld a, c ld a, c
ld [wc701], a ld [wPlayerTrademonCaughtData], a
ld e, TRADE_DIALOG ld e, TRADE_DIALOG
call GetTradeAttribute call GetTradeAttribute
ld a, [hl] ld a, [hl]
cp TRADE_COMPLETE cp 3
ld a, 1 ld a, 1
jr c, .asm_fcce6 jr c, .okay
ld a, 2 ld a, 2
.asm_fcce6 .okay
ld [wEnemyCharging], a ld [wOTTrademonCaughtData], a
ld hl, PartyMon1Level ld hl, PartyMon1Level
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call Functionfcdd7 call Trade_GetAttributeOfCurrentPartymon
ld a, [hl] ld a, [hl]
ld [CurPartyLevel], a ld [CurPartyLevel], a
ld a, [wc702] ld a, [wOTTrademonSpecies]
ld [CurPartySpecies], a ld [CurPartySpecies], a
xor a xor a
ld [MonType], a ld [MonType], a
@ -214,66 +218,66 @@ Functionfcc63: ; fcc63
call GetTradeAttribute call GetTradeAttribute
ld a, [hl] ld a, [hl]
cp TRADE_COMPLETE cp TRADE_COMPLETE
ld b, 0 ld b, RESET_FLAG
jr c, .asm_fcd1c jr c, .asm_fcd1c
ld b, 1 ld b, SET_FLAG
.asm_fcd1c .asm_fcd1c
callba SetGiftPartyMonCaughtData callba SetGiftPartyMonCaughtData
ld e, TRADE_NICK ld e, TRADE_NICK
call GetTradeAttribute call GetTradeAttribute
ld de, wc70e ld de, wOTTrademonNickname
call Functionfcdf4 call CopyTradeName
ld hl, PartyMonNicknames ld hl, PartyMonNicknames
ld bc, PKMN_NAME_LENGTH ld bc, PKMN_NAME_LENGTH
call Functionfcdde call Trade_GetAttributeOfLastPartymon
ld hl, wc70e ld hl, wOTTrademonNickname
call Functionfcdf4 call CopyTradeName
ld e, TRADE_OT_NAME ld e, TRADE_OT_NAME
call GetTradeAttribute call GetTradeAttribute
push hl push hl
ld de, wc724 ld de, wOTTrademonOTName
call Functionfcdf4 call CopyTradeName
pop hl pop hl
ld de, wc719 ld de, wOTTrademonSenderName
call Functionfcdf4 call CopyTradeName
ld hl, PartyMonOT ld hl, PartyMonOT
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call Functionfcdde call Trade_GetAttributeOfLastPartymon
ld hl, wc724 ld hl, wOTTrademonOTName
call Functionfcdf4 call CopyTradeName
ld e, TRADE_DVS ld e, TRADE_DVS
call GetTradeAttribute call GetTradeAttribute
ld de, wEnemyTrappingMove ld de, wOTTrademonDVs
call Functionfce0f call Trade_CopyTwoBytes
ld hl, PartyMon1DVs ld hl, PartyMon1DVs
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call Functionfcdde call Trade_GetAttributeOfLastPartymon
ld hl, wEnemyTrappingMove ld hl, wOTTrademonDVs
call Functionfce0f call Trade_CopyTwoBytes
ld e, TRADE_OT_ID ld e, TRADE_OT_ID
call GetTradeAttribute call GetTradeAttribute
ld de, wPlayerCharging ld de, wOTTrademonID + 1
call Functionfce15 call Trade_CopyTwoBytesReverseEndian
ld hl, PartyMon1ID ld hl, PartyMon1ID
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call Functionfcdde call Trade_GetAttributeOfLastPartymon
ld hl, wEnemyWrapCount ld hl, wOTTrademonID
call Functionfce0f call Trade_CopyTwoBytes
ld e, TRADE_ITEM ld e, TRADE_ITEM
call GetTradeAttribute call GetTradeAttribute
push hl push hl
ld hl, PartyMon1Item ld hl, PartyMon1Item
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call Functionfcdde call Trade_GetAttributeOfLastPartymon
pop hl pop hl
ld a, [hl] ld a, [hl]
ld [de], a ld [de], a
@ -315,13 +319,13 @@ endr
ret ret
; 0xfcdd7 ; 0xfcdd7
Functionfcdd7: ; fcdd7 Trade_GetAttributeOfCurrentPartymon: ; fcdd7
ld a, [CurPartyMon] ld a, [CurPartyMon]
call AddNTimes call AddNTimes
ret ret
; fcdde ; fcdde
Functionfcdde: ; fcdde Trade_GetAttributeOfLastPartymon: ; fcdde
ld a, [PartyCount] ld a, [PartyCount]
dec a dec a
call AddNTimes call AddNTimes
@ -330,7 +334,7 @@ Functionfcdde: ; fcdde
ret ret
; fcde8 ; fcde8
Functionfcde8: ; fcde8 GetTradeMonName: ; fcde8
push de push de
ld [wd265], a ld [wd265], a
call GetBasePokemonName call GetBasePokemonName
@ -339,29 +343,31 @@ Functionfcde8: ; fcde8
ret ret
; fcdf4 ; fcdf4
Functionfcdf4: ; fcdf4 CopyTradeName: ; fcdf4
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call CopyBytes call CopyBytes
ret ret
; fcdfb ; fcdfb
Functionfcdfb: ; fcdfb Functionfcdfb: ; fcdfb
; unreferenced
ld bc, 4 ld bc, 4
call CopyBytes call CopyBytes
ld a, $50 ld a, "@"
ld [de], a ld [de], a
ret ret
; fce05 ; fce05
Functionfce05: ; fce05 Functionfce05: ; fce05
; unreferenced
ld bc, 3 ld bc, 3
call CopyBytes call CopyBytes
ld a, $50 ld a, "@"
ld [de], a ld [de], a
ret ret
; fce0f ; fce0f
Functionfce0f: ; fce0f Trade_CopyTwoBytes: ; fce0f
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
inc de inc de
@ -370,7 +376,7 @@ Functionfce0f: ; fce0f
ret ret
; fce15 ; fce15
Functionfce15: ; fce15 Trade_CopyTwoBytesReverseEndian: ; fce15
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
dec de dec de
@ -383,18 +389,18 @@ GetTradeMonNames: ; fce1b
ld e, TRADE_GETMON ld e, TRADE_GETMON
call GetTradeAttribute call GetTradeAttribute
ld a, [hl] ld a, [hl]
call Functionfcde8 call GetTradeMonName
ld de, StringBuffer2 ld de, StringBuffer2
call Functionfcdf4 call CopyTradeName
ld e, TRADE_GIVEMON ld e, TRADE_GIVEMON
call GetTradeAttribute call GetTradeAttribute
ld a, [hl] ld a, [hl]
call Functionfcde8 call GetTradeMonName
ld de, wd050 ld de, wd050
call Functionfcdf4 call CopyTradeName
ld hl, StringBuffer1 ld hl, StringBuffer1
.loop .loop
@ -423,13 +429,22 @@ GetTradeMonNames: ; fce1b
NPCTrades: ; fce58 NPCTrades: ; fce58
db 0, ABRA, MACHOP, "MUSCLE@@@@@", $37, $66, GOLD_BERRY, $54, $92, "MIKE@@@@@@@", 0, 0 npctrade: MACRO
db 0, BELLSPROUT, ONIX, "ROCKY@@@@@@", $96, $66, BITTER_BERRY, $1e, $bf, "KYLE@@@@@@@", 0, 0 db \1, \2, \3, \4
db 1, KRABBY, VOLTORB, "VOLTY@@@@@@", $98, $88, PRZCUREBERRY, $05, $72, "TIM@@@@@@@@", 0, 0 dw \5
db 3, DRAGONAIR, DODRIO, "DORIS@@@@@@", $77, $66, SMOKE_BALL, $1b, $01, "EMY@@@@@@@@", 2, 0 db \6
db 2, HAUNTER, XATU, "PAUL@@@@@@@", $96, $86, MYSTERYBERRY, $00, $3d, "CHRIS@@@@@@", 0, 0 dw \7
db 3, CHANSEY, AERODACTYL, "AEROY@@@@@@", $96, $66, GOLD_BERRY, $7b, $67, "KIM@@@@@@@@", 0, 0 db \8, \9, 0
db 0, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $96, $66, METAL_COAT, $a2, $c3, "FOREST@@@@@", 0, 0 ENDM
npctrade 0, ABRA, MACHOP, "MUSCLE@@@@@", $6637, GOLD_BERRY, $9254, "MIKE@@@@@@@", TRADE_EITHER_GENDER
npctrade 0, BELLSPROUT, ONIX, "ROCKY@@@@@@", $6696, BITTER_BERRY, $bf1e, "KYLE@@@@@@@", TRADE_EITHER_GENDER
npctrade 1, KRABBY, VOLTORB, "VOLTY@@@@@@", $8898, PRZCUREBERRY, $7205, "TIM@@@@@@@@", TRADE_EITHER_GENDER
npctrade 3, DRAGONAIR, DODRIO, "DORIS@@@@@@", $6677, SMOKE_BALL, $011b, "EMY@@@@@@@@", TRADE_FEMALE_ONLY
npctrade 2, HAUNTER, XATU, "PAUL@@@@@@@", $8696, MYSTERYBERRY, $3d00, "CHRIS@@@@@@", TRADE_EITHER_GENDER
npctrade 3, CHANSEY, AERODACTYL, "AEROY@@@@@@", $6696, GOLD_BERRY, $677b, "KIM@@@@@@@@", TRADE_EITHER_GENDER
npctrade 0, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $6696, METAL_COAT, $c3a2, "FOREST@@@@@", TRADE_EITHER_GENDER
; fcf38 ; fcf38

View File

@ -476,7 +476,7 @@ Function4034f: ; 4034f
push af push af
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
push af push af
callba Function8442c callba PrintDexEntry
pop af pop af
ld [wJumptableIndex], a ld [wJumptableIndex], a
pop af pop af

View File

@ -59,8 +59,8 @@ PredefPointers:: ; 856b
add_predef LearnLevelMoves add_predef LearnLevelMoves
add_predef FillMoves add_predef FillMoves
add_predef EvolveAfterBattle add_predef EvolveAfterBattle
add_predef Function28f63 add_predef TradeAnimationPlayer2
add_predef Function28f24 add_predef TradeAnimation
add_predef CopyPkmnToTempMon add_predef CopyPkmnToTempMon
add_predef ListMoves ; $20 add_predef ListMoves ; $20
add_predef PlaceNonFaintStatus add_predef PlaceNonFaintStatus

View File

@ -653,7 +653,7 @@ Function84425: ; 84425
ret ret
; 8442c ; 8442c
Function8442c: ; 8442c PrintDexEntry: ; 8442c
ld a, [wcf65] ld a, [wcf65]
push af push af
ld hl, VTiles1 ld hl, VTiles1
@ -661,7 +661,7 @@ Function8442c: ; 8442c
lb bc, BANK(FontInversed), $80 lb bc, BANK(FontInversed), $80
call Request1bpp call Request1bpp
xor a xor a
ld [$ffac], a ld [hPrinter], a
call Function8474c call Function8474c
ld a, [rIE] ld a, [rIE]
push af push af
@ -720,7 +720,7 @@ Function8442c: ; 8442c
ret ret
; 844bc ; 844bc
Function844bc: ; 844bc (21:44bc) PrintPCBox: ; 844bc (21:44bc)
ld a, [wcf65] ld a, [wcf65]
push af push af
ld a, $9 ld a, $9
@ -728,13 +728,13 @@ Function844bc: ; 844bc (21:44bc)
ld a, e ld a, e
ld [wd004], a ld [wd004], a
ld a, d ld a, d
ld [StartFlypoint], a ld [wd005], a
ld a, b ld a, b
ld [EndFlypoint], a ld [wd006], a
ld a, c ld a, c
ld [MovementBuffer], a ld [wd007], a
xor a xor a
ld [$ffac], a ld [hPrinter], a
ld [wd003], a ld [wd003], a
call Function8474c call Function8474c
ld a, [rIE] ld a, [rIE]
@ -801,11 +801,11 @@ Function84559: ; 84559 (21:4559)
call Function843f0 call Function843f0
ret ret
Function84560: ; 84560 PrintUnownStamp: ; 84560
ld a, [wcf65] ld a, [wcf65]
push af push af
xor a xor a
ld [$ffac], a ld [hPrinter], a
call Function8474c call Function8474c
ld a, [rIE] ld a, [rIE]
push af push af
@ -861,7 +861,7 @@ Function84560: ; 84560
ret ret
; 845d4 ; 845d4
Function845d4: ; 845d4 PrintMail: ; 845d4
call Function845db call Function845db
call Function84425 call Function84425
ret ret
@ -871,7 +871,7 @@ Function845db: ; 845db
ld a, [wcf65] ld a, [wcf65]
push af push af
xor a xor a
ld [$ffac], a ld [hPrinter], a
call Function8474c call Function8474c
ld a, [rIE] ld a, [rIE]
push af push af
@ -903,11 +903,11 @@ Function845db: ; 845db
ret ret
; 8461a ; 8461a
Function8461a: ; 8461a PrintPartymon: ; 8461a
ld a, [wcf65] ld a, [wcf65]
push af push af
xor a xor a
ld [$ffac], a ld [hPrinter], a
call Function8474c call Function8474c
ld a, [rIE] ld a, [rIE]
push af push af
@ -962,7 +962,7 @@ _PrintDiploma: ; 84688
push af push af
callba Function1dd709 callba Function1dd709
xor a xor a
ld [$ffac], a ld [hPrinter], a
call Function8474c call Function8474c
ld a, [rIE] ld a, [rIE]
push af push af
@ -1040,7 +1040,7 @@ Function846f6: ; 846f6
.asm_84722 .asm_84722
ld a, $1 ld a, $1
ld [$ffac], a ld [hPrinter], a
scf scf
ret ret
; 84728 ; 84728
@ -1205,15 +1205,15 @@ Function84817: ; 84817 (21:4817)
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
ld a, " " ld a, " "
call ByteFill call ByteFill
call Function84a0e call Printer_PlaceEmptyBoxSlotString
hlcoord 0, 0 hlcoord 0, 0
ld bc, 9 * SCREEN_WIDTH ld bc, 9 * SCREEN_WIDTH
ld a, " " ld a, " "
call ByteFill call ByteFill
call Function849e9 call Printer_PlaceSideBorders
call Function849d7 call Printer_PlaceTopBorder
hlcoord 4, 3 hlcoord 4, 3
ld de, String_84865 ld de, .String_PokemonList
call PlaceString call PlaceString
ld a, [wd007] ld a, [wd007]
ld bc, BOX_NAME_LENGTH ld bc, BOX_NAME_LENGTH
@ -1231,7 +1231,7 @@ Function84817: ; 84817 (21:4817)
ret ret
; 84865 (21:4865) ; 84865 (21:4865)
String_84865: .String_PokemonList:
db "#MON LIST@" db "#MON LIST@"
; 8486f ; 8486f
@ -1240,8 +1240,8 @@ Function8486f: ; 8486f (21:486f)
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
ld a, " " ld a, " "
call ByteFill call ByteFill
call Function84a0e call Printer_PlaceEmptyBoxSlotString
call Function849e9 call Printer_PlaceSideBorders
ld a, [wd003] ld a, [wd003]
and a and a
ret nz ret nz
@ -1257,8 +1257,8 @@ Function84893: ; 84893 (21:4893)
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
ld a, " " ld a, " "
call ByteFill call ByteFill
call Function84a0e call Printer_PlaceEmptyBoxSlotString
call Function849e9 call Printer_PlaceSideBorders
ld a, [wd003] ld a, [wd003]
and a and a
ret nz ret nz
@ -1274,12 +1274,12 @@ Function848b7: ; 848b7 (21:48b7)
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
ld a, " " ld a, " "
call ByteFill call ByteFill
call Function84a0e call Printer_PlaceEmptyBoxSlotString
hlcoord 1, 15 hlcoord 1, 15
lb bc, 2, 18 lb bc, 2, 18
call ClearBox call ClearBox
call Function849e9 call Printer_PlaceSideBorders
call Function849fc call Printer_PlaceBottomBorders
ld a, [wd003] ld a, [wd003]
and a and a
ret nz ret nz
@ -1291,7 +1291,7 @@ Function848b7: ; 848b7 (21:48b7)
ret ret
Function848e7: ; 848e7 (21:48e7) Function848e7: ; 848e7 (21:48e7)
ld a, [EndFlypoint] ld a, [wd006]
call GetSRAMBank call GetSRAMBank
Function848ed: ; 848ed (21:48ed) Function848ed: ; 848ed (21:48ed)
@ -1318,7 +1318,7 @@ Function848ed: ; 848ed (21:48ed)
push hl push hl
call PlaceString call PlaceString
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp $fd cp EGG
pop hl pop hl
jr z, .ok2 jr z, .ok2
ld bc, $b ld bc, $b
@ -1326,7 +1326,7 @@ Function848ed: ; 848ed (21:48ed)
call Function8498a call Function8498a
ld bc, $9 ld bc, $9
add hl, bc add hl, bc
ld a, $f3 ld a, "/"
ld [hli], a ld [hli], a
push hl push hl
ld bc, $e ld bc, $e
@ -1336,7 +1336,7 @@ Function848ed: ; 848ed (21:48ed)
push hl push hl
ld a, [wd004] ld a, [wd004]
ld l, a ld l, a
ld a, [StartFlypoint] ld a, [wd005]
ld h, a ld h, a
ld bc, $372 ld bc, $372
add hl, bc add hl, bc
@ -1354,7 +1354,7 @@ Function848ed: ; 848ed (21:48ed)
push hl push hl
ld a, [wd004] ld a, [wd004]
ld l, a ld l, a
ld a, [StartFlypoint] ld a, [wd005]
ld h, a ld h, a
ld bc, $35 ld bc, $35
add hl, bc add hl, bc
@ -1387,7 +1387,7 @@ Function8498a: ; 8498a (21:498a)
push hl push hl
ld a, [wd004] ld a, [wd004]
ld l, a ld l, a
ld a, [StartFlypoint] ld a, [wd005]
ld h, a ld h, a
ld bc, $2b ld bc, $2b
add hl, bc add hl, bc
@ -1421,7 +1421,7 @@ Function849c6: ; 849c6 (21:49c6)
ld d, $0 ld d, $0
ld a, [wd004] ld a, [wd004]
ld l, a ld l, a
ld a, [StartFlypoint] ld a, [wd005]
ld h, a ld h, a
add hl, de add hl, de
ld e, l ld e, l
@ -1429,62 +1429,62 @@ Function849c6: ; 849c6 (21:49c6)
pop hl pop hl
ret ret
Function849d7: ; 849d7 (21:49d7) Printer_PlaceTopBorder: ; 849d7 (21:49d7)
hlcoord 0, 0 hlcoord 0, 0
ld a, "┌" ld a, "┌"
ld [hli], a ld [hli], a
ld a, "─" ld a, "─"
ld c, SCREEN_WIDTH - 2 ld c, SCREEN_WIDTH - 2
.asm_849e1 .loop
ld [hli], a ld [hli], a
dec c dec c
jr nz, .asm_849e1 jr nz, .loop
ld a, "┐" ld a, "┐"
ld [hl], a ld [hl], a
ret ret
Function849e9: ; 849e9 (21:49e9) Printer_PlaceSideBorders: ; 849e9 (21:49e9)
hlcoord 0, 0 hlcoord 0, 0
ld de, SCREEN_WIDTH - 1 ld de, SCREEN_WIDTH - 1
ld c, SCREEN_HEIGHT ld c, SCREEN_HEIGHT
.asm_849f1 .loop
ld a, "│" ld a, "│"
ld [hl], a ld [hl], a
add hl, de add hl, de
ld a, "│" ld a, "│"
ld [hli], a ld [hli], a
dec c dec c
jr nz, .asm_849f1 jr nz, .loop
ret ret
Function849fc: ; 849fc (21:49fc) Printer_PlaceBottomBorders: ; 849fc (21:49fc)
hlcoord 0, 17 hlcoord 0, 17
ld a, "└" ld a, "└"
ld [hli], a ld [hli], a
ld a, "─" ld a, "─"
ld c, SCREEN_WIDTH - 2 ld c, SCREEN_WIDTH - 2
.asm_84a06 .loop
ld [hli], a ld [hli], a
dec c dec c
jr nz, .asm_84a06 jr nz, .loop
ld a, "┘" ld a, "┘"
ld [hl], a ld [hl], a
ret ret
Function84a0e: ; 84a0e (21:4a0e) Printer_PlaceEmptyBoxSlotString: ; 84a0e (21:4a0e)
hlcoord 2, 0 hlcoord 2, 0
ld c, $6 ld c, $6
.asm_84a13 .loop
push bc push bc
push hl push hl
ld de, String84a25 ld de, String84a25
call PlaceString call PlaceString
pop hl pop hl
ld bc, $3c ld bc, 3 * SCREEN_WIDTH
add hl, bc add hl, bc
pop bc pop bc
dec c dec c
jr nz, .asm_84a13 jr nz, .loop
ret ret
; 84a25 (21:4a25) ; 84a25 (21:4a25)

1542
engine/trade/animation.asm Executable file

File diff suppressed because it is too large Load Diff

View File

@ -81,7 +81,7 @@ UnownPrinter: ; 16be4
.pressed_a .pressed_a
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
push af push af
callba Function84560 callba PrintUnownStamp
call RestartMapMusic call RestartMapMusic
pop af pop af
ld [wJumptableIndex], a ld [wJumptableIndex], a
@ -248,9 +248,9 @@ PhotoStudio: ; 16dc7
ld hl, .Text_HoldStill ld hl, .Text_HoldStill
call PrintText call PrintText
call DisableSpriteUpdates call DisableSpriteUpdates
callba Function8461a callba PrintPartymon
call Function2b74 call Function2b74
ld a, [$ffac] ld a, [hPrinter]
and a and a
jr nz, .cancel jr nz, .cancel
ld hl, .Text_Presto ld hl, .Text_Presto

View File

@ -41,14 +41,12 @@ ReadAnyMail: ; b9237
call SetPalettes call SetPalettes
xor a xor a
ld [hJoyPressed], a ld [hJoyPressed], a
call Functionb929a call .loop
call ClearBGPalettes call ClearBGPalettes
call DisableLCD call DisableLCD
call LoadStandardFont call LoadStandardFont
jp EnableLCD jp EnableLCD
; b929a
Functionb929a: ; b929a
.loop .loop
call GetJoypad call GetJoypad
ld a, [hJoyPressed] ld a, [hJoyPressed]
@ -61,7 +59,7 @@ Functionb929a: ; b929a
.pressed_start .pressed_start
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
push af push af
callab Function845d4 callab PrintMail ; printer
pop af pop af
ld [wJumptableIndex], a ld [wJumptableIndex], a
jr .loop jr .loop

View File

@ -32,6 +32,7 @@ hJoyDown EQU $ffa8
hJoyLast EQU $ffa9 hJoyLast EQU $ffa9
hInMenu EQU $ffaa hInMenu EQU $ffaa
hPrinter EQU $ffac
hFillBox EQU $ffad hFillBox EQU $ffad
hMapObjectIndexBuffer EQU $ffaf hMapObjectIndexBuffer EQU $ffaf

View File

@ -14,7 +14,7 @@ INCLUDE "macros/predef.asm"
INCLUDE "macros/rst.asm" INCLUDE "macros/rst.asm"
INCLUDE "macros/mobile.asm" INCLUDE "macros/mobile.asm"
INCLUDE "macros/trainer.asm" INCLUDE "macros/trainer.asm"
INCLUDE "macros/trade_anim.asm"
RGB: MACRO RGB: MACRO

175
macros/trade_anim.asm Executable file
View File

@ -0,0 +1,175 @@
enum_start
enum tradeanim_next_command
tradeanim_next: macro
db tradeanim_next_command
endm
enum tradeanim_01_command
tradeanim_01: macro
db tradeanim_01_command
endm
enum tradeanim_02_command
tradeanim_02: macro
db tradeanim_02_command
endm
enum tradeanim_03_command
tradeanim_03: macro
db tradeanim_03_command
endm
enum tradeanim_04_command
tradeanim_04: macro
db tradeanim_04_command
endm
enum tradeanim_05_command
tradeanim_05: macro
db tradeanim_05_command
endm
enum tradeanim_06_command
tradeanim_06: macro
db tradeanim_06_command
endm
__enum__ set $e
enum tradeanim_0e_command
tradeanim_0e: macro
db tradeanim_0e_command
endm
__enum__ set $16
enum tradeanim_16_command
tradeanim_16: macro
db tradeanim_16_command
endm
enum tradeanim_17_command
tradeanim_17: macro
db tradeanim_17_command
endm
enum tradeanim_18_command
tradeanim_18: macro
db tradeanim_18_command
endm
enum tradeanim_19_command
tradeanim_19: macro
db tradeanim_19_command
endm
enum tradeanim_1a_command
tradeanim_1a: macro
db tradeanim_1a_command
endm
enum tradeanim_1b_command
tradeanim_1b: macro
db tradeanim_1b_command
endm
enum tradeanim_1c_command
tradeanim_1c: macro
db tradeanim_1c_command
endm
enum tradeanim_1d_command
tradeanim_1d: macro
db tradeanim_1d_command
endm
enum tradeanim_1e_command
tradeanim_1e: macro
db tradeanim_1e_command
endm
enum tradeanim_1f_command
tradeanim_1f: macro
db tradeanim_1f_command
endm
enum tradeanim_20_command
tradeanim_20: macro
db tradeanim_20_command
endm
enum tradeanim_21_command
tradeanim_21: macro
db tradeanim_21_command
endm
enum tradeanim_22_command
tradeanim_22: macro
db tradeanim_22_command
endm
enum tradeanim_23_command
tradeanim_23: macro
db tradeanim_23_command
endm
enum tradeanim_24_command
tradeanim_24: macro
db tradeanim_24_command
endm
enum tradeanim_25_command
tradeanim_25: macro
db tradeanim_25_command
endm
enum tradeanim_26_command
tradeanim_26: macro
db tradeanim_26_command
endm
enum tradeanim_27_command
tradeanim_27: macro
db tradeanim_27_command
endm
enum tradeanim_28_command
tradeanim_28: macro
db tradeanim_28_command
endm
enum tradeanim_29_command
tradeanim_29: macro
db tradeanim_29_command
endm
enum tradeanim_2a_command
tradeanim_2a: macro
db tradeanim_2a_command
endm
enum tradeanim_end_command
tradeanim_end: macro
db tradeanim_end_command
endm
enum tradeanim_2c_command
tradeanim_2c: macro
db tradeanim_2c_command
endm
enum tradeanim_2d_command
tradeanim_2d: macro
db tradeanim_2d_command
endm
enum tradeanim_2e_command
tradeanim_2e: macro
db tradeanim_2e_command
endm
enum tradeanim_2f_command
tradeanim_2f: macro
db tradeanim_2f_command
endm

2163
main.asm

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,7 @@ GBCOnlyScreen: ; 4ea82
call ClearTileMap call ClearTileMap
ld hl, GBCOnlyGFX ld hl, GBCOnlyGFX
ld de, $d000 ld de, wd000
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, 0 ld a, 0
@ -19,7 +19,7 @@ GBCOnlyScreen: ; 4ea82
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ld de, $d000 ld de, wd000
ld hl, VTiles2 ld hl, VTiles2
lb bc, BANK(GBCOnlyGFX), $54 lb bc, BANK(GBCOnlyGFX), $54
call Get2bpp call Get2bpp

View File

@ -59,17 +59,17 @@ sMailbox10Backup:: mailmsg sMailbox10Backup
sMysteryGiftItem:: ds 1 sMysteryGiftItem:: ds 1
sMysteryGiftUnlocked:: ds 1 sMysteryGiftUnlocked:: ds 1
sBackupMysteryGiftItem:: ds 1 sBackupMysteryGiftItem:: ds 1
s0_abe5:: ds 1 sNumDailyMysteryGiftPartnerIDs:: ds 1
s0_abe6:: ds 10 sDailyMysteryGiftPartnerIDs:: ds 5 * 2 ; maximum 5 per day, 2 bytes per ID
sMysteryGiftDecorationsReceived:: flag_array NUM_NON_TROPHY_DECOS sMysteryGiftDecorationsReceived:: flag_array NUM_NON_TROPHY_DECOS
ds 4 ds 4
sMysteryGiftTimer:: ds 1 sMysteryGiftTimer:: ds 1
sMysteryGiftTimerStartDay:: ds 1 sMysteryGiftTimerStartDay:: ds 1
ds 1 ds 1
sMysteryGiftTrainerHouseFlag:: ds 1 sMysteryGiftTrainerHouseFlag:: ds 1
s0_abfe:: ds 12 sMysteryGiftPartnerName:: ds NAME_LENGTH
sMysteryGiftTrainer:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 1 s0_ac09:: ds 1
ds 1 sMysteryGiftTrainer:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2
sBackupMysteryGiftItemEnd:: sBackupMysteryGiftItemEnd::
ds $30 ds $30

View File

@ -194,7 +194,7 @@ BattleText_EnemyPkmnFainted: ; 0x809a8
GotMoneyForWinningText: GotMoneyForWinningText:
text "<PLAYER> got ¥@" text "<PLAYER> got ¥@"
deciram wc686, 3, 6 deciram wBattleReward, 3, 6
text "" text ""
line "for winning!" line "for winning!"
prompt prompt
@ -213,7 +213,7 @@ TiedAgainstText: ; 0x809eb
SentSomeToMomText: SentSomeToMomText:
text "<PLAYER> got ¥@" text "<PLAYER> got ¥@"
deciram wc686, 3, 6 deciram wBattleReward, 3, 6
text "" text ""
line "for winning!" line "for winning!"
cont "Sent some to MOM!" cont "Sent some to MOM!"

View File

@ -279,7 +279,7 @@ UnknownText_0x1c04c6: ; 1c04c6
; 1c04e9 ; 1c04e9
UnknownText_0x1c04e9: ; 1c04e9 UnknownText_0x1c04e9: ; 1c04e9
text_from_ram wc903 text_from_ram wMysteryGiftPartnerName
text " sent" text " sent"
line "@" line "@"
text_from_ram StringBuffer1 text_from_ram StringBuffer1
@ -288,7 +288,7 @@ UnknownText_0x1c04e9: ; 1c04e9
; 1c04fa ; 1c04fa
UnknownText_0x1c04fa: ; 1c04fa UnknownText_0x1c04fa: ; 1c04fa
text_from_ram wc903 text_from_ram wMysteryGiftPartnerName
text " sent" text " sent"
line "@" line "@"
text_from_ram StringBuffer1 text_from_ram StringBuffer1

View File

@ -152,9 +152,11 @@ mailmsg: MACRO
\1AuthorNationality:: ds 2 \1AuthorNationality:: ds 2
\1AuthorID:: ds 2 \1AuthorID:: ds 2
\1Species:: ds 1 \1Species:: ds 1
\1MailType:: ds 1 \1Type:: ds 1
\1End::
endm endm
INCLUDE "vram.asm" INCLUDE "vram.asm"
SECTION "Stack", WRAM0 SECTION "Stack", WRAM0
@ -542,7 +544,8 @@ wc64e:: ds 1
ds 1 ds 1
wEnemyTrainerItem1:: ds 1 wEnemyTrainerItem1:: ds 1
wEnemyTrainerItem2:: ds 1 wEnemyTrainerItem2:: ds 1
wc652:: ds 4 wEnemyTrainerBaseReward:: ds 1
wEnemyTrainerAIFlags:: ds 3
wc656:: wc656::
OTName:: ds NAME_LENGTH ; c656 OTName:: ds NAME_LENGTH ; c656
@ -688,8 +691,7 @@ PlayerDamageTaken:: ; c682
EnemyDamageTaken:: ; c684 EnemyDamageTaken:: ; c684
ds 2 ds 2
wc686:: ds 2 wBattleReward:: ds 3
wc688:: ds 1
wKickCounter:: wKickCounter::
wPresentPower:: ds 1 wPresentPower:: ds 1
wc68a:: wc68a::
@ -719,6 +721,24 @@ PlayerSpdLevel:: ; c6ce
ds 1 ds 1
PlayerSAtkLevel:: ; c6cf PlayerSAtkLevel:: ; c6cf
ds 1 ds 1
trademon: MACRO
\1Species:: ds 1 ; wc6d0 | wc702
\1SpeciesName:: ds PKMN_NAME_LENGTH ; wc6d1 | wc703
\1Nickname:: ds PKMN_NAME_LENGTH ; wc6dc | wc70e
\1SenderName:: ds NAME_LENGTH ; wc6e7 | wc719
\1OTName:: ds NAME_LENGTH ; wc6f2 | wc724
\1DVs:: ds 2 ; wc6fd | wc72f
\1ID:: ds 2 ; wc6ff | wc731
\1CaughtData:: ds 1 ; wc701 | wc733
\1End::
ENDM
wPlayerTrademon:: trademon wPlayerTrademon
wOTTrademon:: trademon wOTTrademon
ds wPlayerTrademon - @
wc6d0:: wc6d0::
wPokedexDataStart:: wPokedexDataStart::
PlayerSDefLevel:: ; c6d0 PlayerSDefLevel:: ; c6d0
@ -920,12 +940,19 @@ wc729:: ds 2
wPlayerRageCounter:: ds 1 wPlayerRageCounter:: ds 1
wEnemyRageCounter:: ds 1 wEnemyRageCounter:: ds 1
wc72d:: ds 1 ; if 0 then PrintButItFailed wc72d:: ds 1 ; if 0 then PrintButItFailed
wc72e::
wPlayerTrappingMove:: ds 1 wPlayerTrappingMove:: ds 1
wc72f::
wEnemyTrappingMove:: ds 1 wEnemyTrappingMove:: ds 1
wc730::
wPlayerWrapCount:: ds 1 wPlayerWrapCount:: ds 1
wc731::
wEnemyWrapCount:: ds 1 wEnemyWrapCount:: ds 1
wc732::
wPlayerCharging:: ds 1 wPlayerCharging:: ds 1
wEnemyCharging:: ds 1 wEnemyCharging::
wc733:: ds 1
wTradeAnimPointer::
wc734:: wc734::
BattleEnded:: ; c734 BattleEnded:: ; c734
ds 1 ds 1
@ -935,7 +962,7 @@ wc735:: ds 1
wc736:: ds 3 wc736:: ds 3
wWildMonPP:: wWildMonPP::
wc739:: ds 4 wc739:: ds 4
wc73d:: ds 1 wAmuletCoin:: ds 1
wc73e:: ds 1 wc73e:: ds 1
wPlayerJustGotFrozen:: ds 1 wPlayerJustGotFrozen:: ds 1
wEnemyJustGotFrozen:: ds 1 wEnemyJustGotFrozen:: ds 1
@ -1006,6 +1033,8 @@ wc820:: ds 1
wc821:: ds 15 wc821:: ds 15
wc830:: ds 16 wc830:: ds 16
wc840:: ds 16 wc840:: ds 16
wMysteryGiftTrainerData:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2
ds wMysteryGiftTrainerData - @
wc850:: ds 16 wc850:: ds 16
wc860:: ds 16 wc860:: ds 16
wc870:: ds 16 wc870:: ds 16
@ -1018,9 +1047,9 @@ wc8d0:: ds 16
wc8e0:: ds 16 wc8e0:: ds 16
wc8f0:: ds 16 wc8f0:: ds 16
wc900:: ds 1 wc900:: ds 1
wc901:: ds 1 wMysteryGiftPartnerID:: ds 2
wc902:: ds 1 wMysteryGiftPartnerName:: ds NAME_LENGTH
wc903:: ds 12 wc90e:: ds 1
wc90f:: ds 1 wc90f:: ds 1
wc910:: ds 1 wc910:: ds 1
wc911:: ds 1 wc911:: ds 1
@ -2432,7 +2461,7 @@ PlayerState:: ; d95d
ds 1 ds 1
wHallOfFameCount:: ds 2 wHallOfFameCount:: ds 2
wd960:: ds 2 wTradeFlags:: ds 2
MooMooBerries:: ; d962 MooMooBerries:: ; d962
ds 1 ; how many berries fed to MooMoo ds 1 ; how many berries fed to MooMoo
UndergroundSwitchPositions:: ; d963 UndergroundSwitchPositions:: ; d963