main.asm is now under 30k lines
This commit is contained in:
2531
engine/crystal_intro.asm
Executable file
2531
engine/crystal_intro.asm
Executable file
File diff suppressed because it is too large
Load Diff
1517
engine/debug.asm
Executable file
1517
engine/debug.asm
Executable file
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,90 @@
|
||||
EngineFlagAction:: ; 80430
|
||||
; Do action b on engine flag de
|
||||
;
|
||||
; b = 0: reset flag
|
||||
; = 1: set flag
|
||||
; > 1: check flag, result in c
|
||||
;
|
||||
; Setting/resetting does not return a result.
|
||||
|
||||
|
||||
; 16-bit flag ids are considered invalid, but it's nice
|
||||
; to know that the infrastructure is there.
|
||||
|
||||
ld a, d
|
||||
cp 0
|
||||
jr z, .ceiling
|
||||
jr c, .read ; cp 0 can't set carry!
|
||||
jr .invalid
|
||||
|
||||
; There are only $a2 engine flags, so
|
||||
; anything beyond that is invalid too.
|
||||
|
||||
.ceiling
|
||||
ld a, e
|
||||
cp NUM_ENGINE_FLAGS
|
||||
jr c, .read
|
||||
|
||||
; Invalid flags are treated as flag 00.
|
||||
|
||||
.invalid
|
||||
xor a
|
||||
ld e, a
|
||||
ld d, a
|
||||
|
||||
; Get this flag's location.
|
||||
|
||||
.read
|
||||
ld hl, EngineFlags
|
||||
; location
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
; bit
|
||||
add hl, de
|
||||
|
||||
; location
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
inc hl
|
||||
; bit
|
||||
ld c, [hl]
|
||||
|
||||
; What are we doing with this flag?
|
||||
|
||||
ld a, b
|
||||
cp 1
|
||||
jr c, .reset ; b = 0
|
||||
jr z, .set ; b = 1
|
||||
|
||||
; Return the given flag in c.
|
||||
.check
|
||||
ld a, [de]
|
||||
and c
|
||||
ld c, a
|
||||
ret
|
||||
|
||||
; Set the given flag.
|
||||
.set
|
||||
ld a, [de]
|
||||
or c
|
||||
ld [de], a
|
||||
ret
|
||||
|
||||
; Reset the given flag.
|
||||
.reset
|
||||
ld a, c
|
||||
cpl ; AND all bits except the one in question
|
||||
ld c, a
|
||||
ld a, [de]
|
||||
and c
|
||||
ld [de], a
|
||||
ret
|
||||
; 80462
|
||||
|
||||
|
||||
EngineFlags: ; 80462
|
||||
; All locations are in WRAM bank 1.
|
||||
engine_flag: MACRO
|
||||
dwb \1, 1 << \2
|
||||
|
620
engine/npctrade.asm
Executable file
620
engine/npctrade.asm
Executable file
@@ -0,0 +1,620 @@
|
||||
|
||||
; Trade struct
|
||||
TRADE_DIALOG EQU 0
|
||||
TRADE_GIVEMON EQU 1
|
||||
TRADE_GETMON EQU 2
|
||||
TRADE_NICK EQU 3
|
||||
TRADE_DVS EQU 14
|
||||
TRADE_ITEM EQU 16
|
||||
TRADE_OT_ID EQU 17
|
||||
TRADE_OT_NAME EQU 19
|
||||
TRADE_GENDER EQU 30
|
||||
TRADE_PADDING EQU 31
|
||||
|
||||
; Trade dialogs
|
||||
TRADE_INTRO EQU 0
|
||||
TRADE_CANCEL EQU 1
|
||||
TRADE_WRONG EQU 2
|
||||
TRADE_COMPLETE EQU 3
|
||||
TRADE_AFTER EQU 4
|
||||
|
||||
NPCTrade:: ; fcba8
|
||||
ld a, e
|
||||
ld [wJumptableIndex], a
|
||||
call Functionfcc59
|
||||
ld b, CHECK_FLAG
|
||||
call TradeFlagAction
|
||||
ld a, TRADE_AFTER
|
||||
jr nz, .done
|
||||
|
||||
ld a, TRADE_INTRO
|
||||
call PrintTradeText
|
||||
|
||||
call YesNoBox
|
||||
ld a, TRADE_CANCEL
|
||||
jr c, .done
|
||||
|
||||
; Select givemon from party
|
||||
ld b, 6
|
||||
callba Function5001d
|
||||
ld a, TRADE_CANCEL
|
||||
jr c, .done
|
||||
|
||||
ld e, TRADE_GIVEMON
|
||||
call GetTradeAttribute
|
||||
ld a, [CurPartySpecies]
|
||||
cp [hl]
|
||||
ld a, TRADE_WRONG
|
||||
jr nz, .done
|
||||
|
||||
call CheckTradeGender
|
||||
ld a, TRADE_WRONG
|
||||
jr c, .done
|
||||
|
||||
ld b, SET_FLAG
|
||||
call TradeFlagAction
|
||||
|
||||
ld hl, ConnectLinkCableText
|
||||
call PrintText
|
||||
|
||||
call Functionfcc63
|
||||
call Functionfcc07
|
||||
call GetTradeMonNames
|
||||
|
||||
ld hl, TradedForText
|
||||
call PrintText
|
||||
|
||||
call RestartMapMusic
|
||||
|
||||
ld a, TRADE_COMPLETE
|
||||
|
||||
.done
|
||||
call PrintTradeText
|
||||
ret
|
||||
; fcc07
|
||||
|
||||
Functionfcc07: ; fcc07
|
||||
call DisableSpriteUpdates
|
||||
ld a, [wJumptableIndex]
|
||||
push af
|
||||
ld a, [wcf64]
|
||||
push af
|
||||
predef Function28f24
|
||||
pop af
|
||||
ld [wcf64], a
|
||||
pop af
|
||||
ld [wJumptableIndex], a
|
||||
call Function2b74
|
||||
ret
|
||||
; fcc23
|
||||
|
||||
CheckTradeGender: ; fcc23
|
||||
xor a
|
||||
ld [MonType], a
|
||||
|
||||
ld e, TRADE_GENDER
|
||||
call GetTradeAttribute
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, .asm_fcc46
|
||||
cp 1
|
||||
jr z, .asm_fcc3e
|
||||
|
||||
callba GetGender
|
||||
jr nz, .asm_fcc48
|
||||
jr .asm_fcc46
|
||||
|
||||
.asm_fcc3e
|
||||
callba GetGender
|
||||
jr z, .asm_fcc48
|
||||
|
||||
.asm_fcc46
|
||||
and a
|
||||
ret
|
||||
|
||||
.asm_fcc48
|
||||
scf
|
||||
ret
|
||||
; fcc4a
|
||||
|
||||
TradeFlagAction: ; fcc4a
|
||||
ld hl, wd960
|
||||
ld a, [wJumptableIndex]
|
||||
ld c, a
|
||||
predef FlagPredef
|
||||
ld a, c
|
||||
and a
|
||||
ret
|
||||
; fcc59
|
||||
|
||||
Functionfcc59: ; fcc59
|
||||
ld e, TRADE_DIALOG
|
||||
call GetTradeAttribute
|
||||
ld a, [hl]
|
||||
ld [wcf64], a
|
||||
ret
|
||||
; fcc63
|
||||
|
||||
Functionfcc63: ; fcc63
|
||||
ld e, TRADE_GIVEMON
|
||||
call GetTradeAttribute
|
||||
ld a, [hl]
|
||||
ld [wc6d0], a
|
||||
|
||||
ld e, TRADE_GETMON
|
||||
call GetTradeAttribute
|
||||
ld a, [hl]
|
||||
ld [wc702], a
|
||||
|
||||
ld a, [wc6d0]
|
||||
ld de, wc6d1
|
||||
call Functionfcde8
|
||||
call Functionfcdf4
|
||||
|
||||
ld a, [wc702]
|
||||
ld de, wc703
|
||||
call Functionfcde8
|
||||
call Functionfcdf4
|
||||
|
||||
ld hl, PartyMonOT
|
||||
ld bc, NAME_LENGTH
|
||||
call Functionfcdd7
|
||||
ld de, wc6f2
|
||||
call Functionfcdf4
|
||||
|
||||
ld hl, PlayerName
|
||||
ld de, wc6e7
|
||||
call Functionfcdf4
|
||||
|
||||
ld hl, PartyMon1ID
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call Functionfcdd7
|
||||
ld de, wc6ff
|
||||
call Functionfce0f
|
||||
|
||||
ld hl, PartyMon1DVs
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call Functionfcdd7
|
||||
ld de, wc6fd
|
||||
call Functionfce0f
|
||||
|
||||
ld hl, PartyMon1Species
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call Functionfcdd7
|
||||
ld b, h
|
||||
ld c, l
|
||||
callba GetCaughtGender
|
||||
ld a, c
|
||||
ld [wc701], a
|
||||
|
||||
ld e, TRADE_DIALOG
|
||||
call GetTradeAttribute
|
||||
ld a, [hl]
|
||||
cp TRADE_COMPLETE
|
||||
ld a, 1
|
||||
jr c, .asm_fcce6
|
||||
ld a, 2
|
||||
.asm_fcce6
|
||||
ld [wEnemyCharging], a
|
||||
|
||||
ld hl, PartyMon1Level
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call Functionfcdd7
|
||||
ld a, [hl]
|
||||
ld [CurPartyLevel], a
|
||||
ld a, [wc702]
|
||||
ld [CurPartySpecies], a
|
||||
xor a
|
||||
ld [MonType], a
|
||||
ld [wPokemonWithdrawDepositParameter], a
|
||||
callab Functione039
|
||||
predef TryAddMonToParty
|
||||
|
||||
ld e, TRADE_DIALOG
|
||||
call GetTradeAttribute
|
||||
ld a, [hl]
|
||||
cp TRADE_COMPLETE
|
||||
ld b, 0
|
||||
jr c, .asm_fcd1c
|
||||
ld b, 1
|
||||
.asm_fcd1c
|
||||
callba SetGiftPartyMonCaughtData
|
||||
|
||||
ld e, TRADE_NICK
|
||||
call GetTradeAttribute
|
||||
ld de, wc70e
|
||||
call Functionfcdf4
|
||||
|
||||
ld hl, PartyMonNicknames
|
||||
ld bc, PKMN_NAME_LENGTH
|
||||
call Functionfcdde
|
||||
ld hl, wc70e
|
||||
call Functionfcdf4
|
||||
|
||||
ld e, TRADE_OT_NAME
|
||||
call GetTradeAttribute
|
||||
push hl
|
||||
ld de, wc724
|
||||
call Functionfcdf4
|
||||
pop hl
|
||||
ld de, wc719
|
||||
call Functionfcdf4
|
||||
|
||||
ld hl, PartyMonOT
|
||||
ld bc, NAME_LENGTH
|
||||
call Functionfcdde
|
||||
ld hl, wc724
|
||||
call Functionfcdf4
|
||||
|
||||
ld e, TRADE_DVS
|
||||
call GetTradeAttribute
|
||||
ld de, wEnemyTrappingMove
|
||||
call Functionfce0f
|
||||
|
||||
ld hl, PartyMon1DVs
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call Functionfcdde
|
||||
ld hl, wEnemyTrappingMove
|
||||
call Functionfce0f
|
||||
|
||||
ld e, TRADE_OT_ID
|
||||
call GetTradeAttribute
|
||||
ld de, wPlayerCharging
|
||||
call Functionfce15
|
||||
|
||||
ld hl, PartyMon1ID
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call Functionfcdde
|
||||
ld hl, wEnemyWrapCount
|
||||
call Functionfce0f
|
||||
|
||||
ld e, TRADE_ITEM
|
||||
call GetTradeAttribute
|
||||
push hl
|
||||
ld hl, PartyMon1Item
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call Functionfcdde
|
||||
pop hl
|
||||
ld a, [hl]
|
||||
ld [de], a
|
||||
|
||||
push af
|
||||
push bc
|
||||
push de
|
||||
push hl
|
||||
ld a, [CurPartyMon]
|
||||
push af
|
||||
ld a, [PartyCount]
|
||||
dec a
|
||||
ld [CurPartyMon], a
|
||||
callba Functione134
|
||||
pop af
|
||||
ld [CurPartyMon], a
|
||||
pop hl
|
||||
pop de
|
||||
pop bc
|
||||
pop af
|
||||
ret
|
||||
; fcdc2
|
||||
|
||||
|
||||
GetTradeAttribute: ; 0xfcdc2
|
||||
ld d, 0
|
||||
push de
|
||||
ld a, [wJumptableIndex]
|
||||
and $f
|
||||
swap a
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, NPCTrades
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
pop de
|
||||
add hl, de
|
||||
ret
|
||||
; 0xfcdd7
|
||||
|
||||
Functionfcdd7: ; fcdd7
|
||||
ld a, [CurPartyMon]
|
||||
call AddNTimes
|
||||
ret
|
||||
; fcdde
|
||||
|
||||
Functionfcdde: ; fcdde
|
||||
ld a, [PartyCount]
|
||||
dec a
|
||||
call AddNTimes
|
||||
ld e, l
|
||||
ld d, h
|
||||
ret
|
||||
; fcde8
|
||||
|
||||
Functionfcde8: ; fcde8
|
||||
push de
|
||||
ld [wd265], a
|
||||
call GetBasePokemonName
|
||||
ld hl, StringBuffer1
|
||||
pop de
|
||||
ret
|
||||
; fcdf4
|
||||
|
||||
Functionfcdf4: ; fcdf4
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyBytes
|
||||
ret
|
||||
; fcdfb
|
||||
|
||||
Functionfcdfb: ; fcdfb
|
||||
ld bc, 4
|
||||
call CopyBytes
|
||||
ld a, $50
|
||||
ld [de], a
|
||||
ret
|
||||
; fce05
|
||||
|
||||
Functionfce05: ; fce05
|
||||
ld bc, 3
|
||||
call CopyBytes
|
||||
ld a, $50
|
||||
ld [de], a
|
||||
ret
|
||||
; fce0f
|
||||
|
||||
Functionfce0f: ; fce0f
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
inc de
|
||||
ld a, [hl]
|
||||
ld [de], a
|
||||
ret
|
||||
; fce15
|
||||
|
||||
Functionfce15: ; fce15
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
dec de
|
||||
ld a, [hl]
|
||||
ld [de], a
|
||||
ret
|
||||
; fce1b
|
||||
|
||||
GetTradeMonNames: ; fce1b
|
||||
ld e, TRADE_GETMON
|
||||
call GetTradeAttribute
|
||||
ld a, [hl]
|
||||
call Functionfcde8
|
||||
|
||||
ld de, StringBuffer2
|
||||
call Functionfcdf4
|
||||
|
||||
ld e, TRADE_GIVEMON
|
||||
call GetTradeAttribute
|
||||
ld a, [hl]
|
||||
call Functionfcde8
|
||||
|
||||
ld de, wd050
|
||||
call Functionfcdf4
|
||||
|
||||
ld hl, StringBuffer1
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp "@"
|
||||
jr nz, .loop
|
||||
|
||||
dec hl
|
||||
push hl
|
||||
ld e, TRADE_GENDER
|
||||
call GetTradeAttribute
|
||||
ld a, [hl]
|
||||
pop hl
|
||||
and a
|
||||
ret z
|
||||
|
||||
cp 1
|
||||
ld a, "♂"
|
||||
jr z, .done
|
||||
ld a, "♀"
|
||||
.done
|
||||
ld [hli], a
|
||||
ld [hl], "@"
|
||||
ret
|
||||
; fce58
|
||||
|
||||
|
||||
NPCTrades: ; fce58
|
||||
db 0, ABRA, MACHOP, "MUSCLE@@@@@", $37, $66, GOLD_BERRY, $54, $92, "MIKE@@@@@@@", 0, 0
|
||||
db 0, BELLSPROUT, ONIX, "ROCKY@@@@@@", $96, $66, BITTER_BERRY, $1e, $bf, "KYLE@@@@@@@", 0, 0
|
||||
db 1, KRABBY, VOLTORB, "VOLTY@@@@@@", $98, $88, PRZCUREBERRY, $05, $72, "TIM@@@@@@@@", 0, 0
|
||||
db 3, DRAGONAIR, DODRIO, "DORIS@@@@@@", $77, $66, SMOKE_BALL, $1b, $01, "EMY@@@@@@@@", 2, 0
|
||||
db 2, HAUNTER, XATU, "PAUL@@@@@@@", $96, $86, MYSTERYBERRY, $00, $3d, "CHRIS@@@@@@", 0, 0
|
||||
db 3, CHANSEY, AERODACTYL, "AEROY@@@@@@", $96, $66, GOLD_BERRY, $7b, $67, "KIM@@@@@@@@", 0, 0
|
||||
db 0, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $96, $66, METAL_COAT, $a2, $c3, "FOREST@@@@@", 0, 0
|
||||
; fcf38
|
||||
|
||||
|
||||
PrintTradeText: ; fcf38
|
||||
push af
|
||||
call GetTradeMonNames
|
||||
pop af
|
||||
ld bc, 2 * 4
|
||||
ld hl, TradeTexts
|
||||
call AddNTimes
|
||||
ld a, [wcf64]
|
||||
ld c, a
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
call PrintText
|
||||
ret
|
||||
; fcf53
|
||||
|
||||
TradeTexts: ; fcf53
|
||||
; intro
|
||||
dw TradeIntroText1
|
||||
dw TradeIntroText2
|
||||
dw TradeIntroText3
|
||||
dw TradeIntroText4
|
||||
|
||||
; cancel
|
||||
dw TradeCancelText1
|
||||
dw TradeCancelText2
|
||||
dw TradeCancelText3
|
||||
dw TradeCancelText4
|
||||
|
||||
; wrong mon
|
||||
dw TradeWrongText1
|
||||
dw TradeWrongText2
|
||||
dw TradeWrongText3
|
||||
dw TradeWrongText4
|
||||
|
||||
; completed
|
||||
dw TradeCompleteText1
|
||||
dw TradeCompleteText2
|
||||
dw TradeCompleteText3
|
||||
dw TradeCompleteText4
|
||||
|
||||
; after
|
||||
dw TradeAfterText1
|
||||
dw TradeAfterText2
|
||||
dw TradeAfterText3
|
||||
dw TradeAfterText4
|
||||
; fcf7b
|
||||
|
||||
|
||||
ConnectLinkCableText: ; 0xfcf7b
|
||||
; OK, connect the Game Link Cable.
|
||||
text_jump UnknownText_0x1bd407
|
||||
db "@"
|
||||
; 0xfcf80
|
||||
|
||||
|
||||
TradedForText: ; 0xfcf80
|
||||
; traded givemon for getmon
|
||||
text_jump UnknownText_0x1bd429
|
||||
start_asm
|
||||
|
||||
ld de, MUSIC_NONE
|
||||
call PlayMusic
|
||||
call DelayFrame
|
||||
ld hl, .done
|
||||
ret
|
||||
|
||||
.done
|
||||
; sound0x0A
|
||||
; interpret_data
|
||||
text_jump UnknownText_0x1bd445
|
||||
db "@"
|
||||
; 0xfcf97
|
||||
|
||||
|
||||
TradeIntroText1: ; 0xfcf97
|
||||
; I collect #MON. Do you have @ ? Want to trade it for my @ ?
|
||||
text_jump UnknownText_0x1bd449
|
||||
db "@"
|
||||
; 0xfcf9c
|
||||
|
||||
TradeCancelText1: ; 0xfcf9c
|
||||
; You don't want to trade? Aww…
|
||||
text_jump UnknownText_0x1bd48c
|
||||
db "@"
|
||||
; 0xfcfa1
|
||||
|
||||
TradeWrongText1: ; 0xfcfa1
|
||||
; Huh? That's not @ . What a letdown…
|
||||
text_jump UnknownText_0x1bd4aa
|
||||
db "@"
|
||||
; 0xfcfa6
|
||||
|
||||
TradeCompleteText1: ; 0xfcfa6
|
||||
; Yay! I got myself @ ! Thanks!
|
||||
text_jump UnknownText_0x1bd4d2
|
||||
db "@"
|
||||
; 0xfcfab
|
||||
|
||||
TradeAfterText1: ; 0xfcfab
|
||||
; Hi, how's my old @ doing?
|
||||
text_jump UnknownText_0x1bd4f4
|
||||
db "@"
|
||||
; 0xfcfb0
|
||||
|
||||
|
||||
TradeIntroText2:
|
||||
TradeIntroText3: ; 0xfcfb0
|
||||
; Hi, I'm looking for this #MON. If you have @ , would you trade it for my @ ?
|
||||
text_jump UnknownText_0x1bd512
|
||||
db "@"
|
||||
; 0xfcfb5
|
||||
|
||||
TradeCancelText2:
|
||||
TradeCancelText3: ; 0xfcfb5
|
||||
; You don't have one either? Gee, that's really disappointing…
|
||||
text_jump UnknownText_0x1bd565
|
||||
db "@"
|
||||
; 0xfcfba
|
||||
|
||||
TradeWrongText2:
|
||||
TradeWrongText3: ; 0xfcfba
|
||||
; You don't have @ ? That's too bad, then.
|
||||
text_jump UnknownText_0x1bd5a1
|
||||
db "@"
|
||||
; 0xfcfbf
|
||||
|
||||
TradeCompleteText2: ; 0xfcfbf
|
||||
; Great! Thank you! I finally got @ .
|
||||
text_jump UnknownText_0x1bd5cc
|
||||
db "@"
|
||||
; 0xfcfc4
|
||||
|
||||
TradeAfterText2: ; 0xfcfc4
|
||||
; Hi! The @ you traded me is doing great!
|
||||
text_jump UnknownText_0x1bd5f4
|
||||
db "@"
|
||||
; 0xfcfc9
|
||||
|
||||
|
||||
TradeIntroText4: ; 0xfcfc9
|
||||
; 's cute, but I don't have it. Do you have @ ? Want to trade it for my @ ?
|
||||
text_jump UnknownText_0x1bd621
|
||||
db "@"
|
||||
; 0xfcfce
|
||||
|
||||
TradeCancelText4: ; 0xfcfce
|
||||
; You don't want to trade? Oh, darn…
|
||||
text_jump UnknownText_0x1bd673
|
||||
db "@"
|
||||
; 0xfcfd3
|
||||
|
||||
TradeWrongText4: ; 0xfcfd3
|
||||
; That's not @ . Please trade with me if you get one.
|
||||
text_jump UnknownText_0x1bd696
|
||||
db "@"
|
||||
; 0xfcfd8
|
||||
|
||||
TradeCompleteText4: ; 0xfcfd8
|
||||
; Wow! Thank you! I always wanted @ !
|
||||
text_jump UnknownText_0x1bd6cd
|
||||
db "@"
|
||||
; 0xfcfdd
|
||||
|
||||
TradeAfterText4: ; 0xfcfdd
|
||||
; How is that @ I traded you doing? Your @ 's so cute!
|
||||
text_jump UnknownText_0x1bd6f5
|
||||
db "@"
|
||||
; 0xfcfe2
|
||||
|
||||
|
||||
TradeCompleteText3: ; 0xfcfe2
|
||||
; Uh? What happened?
|
||||
text_jump UnknownText_0x1bd731
|
||||
db "@"
|
||||
; 0xfcfe7
|
||||
|
||||
TradeAfterText3: ; 0xfcfe7
|
||||
; Trading is so odd… I still have a lot to learn about it.
|
||||
text_jump UnknownText_0x1bd745
|
||||
db "@"
|
||||
; 0xfcfec
|
@@ -41,7 +41,7 @@ Function5003f: ; 5003f
|
||||
LoadPartyMenuGFX: ; 5004f
|
||||
call LoadFontsBattleExtra
|
||||
callab Function8ad1 ; engine/color.asm
|
||||
callab InefficientlyClear121BytesAtwc300
|
||||
callab ClearSpriteAnims
|
||||
ret
|
||||
; 5005f
|
||||
|
||||
|
1493
engine/printer.asm
Executable file
1493
engine/printer.asm
Executable file
File diff suppressed because it is too large
Load Diff
@@ -2985,8 +2985,8 @@ Script_reloadmappart:: ; 97ae3
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
call OverworldTextModeSwitch
|
||||
call Function2914
|
||||
callba Function104061
|
||||
call GetMovementPermissions
|
||||
callba ReloadMapPart
|
||||
call UpdateSprites
|
||||
ret
|
||||
; 97af6
|
||||
|
@@ -174,7 +174,7 @@ endr
|
||||
; Look up the third field from the table in the wc300 array (10x2).
|
||||
; Take the value and load it in
|
||||
ld a, [de]
|
||||
call LookUpInwDict_c300
|
||||
call LookUpInwSpriteAnimDict
|
||||
ld [hli], a
|
||||
pop de
|
||||
; Set hl to field 4. Kinda pointless, because we're presumably already here.
|
||||
@@ -374,11 +374,11 @@ Function8d0ec: ; 8d0ec
|
||||
ret
|
||||
; 8d109
|
||||
|
||||
LookUpInwDict_c300: ; 8d109
|
||||
; a = wDict_c300[a] if a in wDict_c300 else 0
|
||||
LookUpInwSpriteAnimDict: ; 8d109
|
||||
; a = wSpriteAnimDict[a] if a in wSpriteAnimDict else 0
|
||||
push hl
|
||||
push bc
|
||||
ld hl, wDict_c300
|
||||
ld hl, wSpriteAnimDict
|
||||
ld b, a
|
||||
ld c, 10
|
||||
.loop
|
||||
@@ -2885,3 +2885,540 @@ endr
|
||||
|
||||
Unknown_8e75d: ; 8e75d
|
||||
sine_wave $100
|
||||
|
||||
|
||||
Function8e79d: ; 8e79d
|
||||
ld a, [hSGB]
|
||||
ld de, GFX_8e7f4
|
||||
and a
|
||||
jr z, .asm_8e7a8
|
||||
ld de, GFX_8e804
|
||||
|
||||
.asm_8e7a8
|
||||
ld hl, VTiles0
|
||||
lb bc, BANK(GFX_8e7f4), 1
|
||||
call Request2bpp
|
||||
ld c, $8
|
||||
ld d, $0
|
||||
.asm_8e7b5
|
||||
push bc
|
||||
call Function8e7c6
|
||||
call DelayFrame
|
||||
pop bc
|
||||
rept 2
|
||||
inc d
|
||||
endr
|
||||
dec c
|
||||
jr nz, .asm_8e7b5
|
||||
call ClearSprites
|
||||
ret
|
||||
; 8e7c6
|
||||
|
||||
Function8e7c6: ; 8e7c6
|
||||
ld hl, Sprites
|
||||
ld c, $8
|
||||
.asm_8e7cb
|
||||
ld a, c
|
||||
and a
|
||||
ret z
|
||||
dec c
|
||||
ld a, c
|
||||
sla a
|
||||
sla a
|
||||
sla a
|
||||
push af
|
||||
push de
|
||||
push hl
|
||||
call Function8e72c
|
||||
pop hl
|
||||
pop de
|
||||
add $68
|
||||
ld [hli], a
|
||||
pop af
|
||||
push de
|
||||
push hl
|
||||
call Function8e72a
|
||||
pop hl
|
||||
pop de
|
||||
add $54
|
||||
ld [hli], a
|
||||
ld a, $0
|
||||
ld [hli], a
|
||||
ld a, $6
|
||||
ld [hli], a
|
||||
jr .asm_8e7cb
|
||||
; 8e7f4
|
||||
|
||||
GFX_8e7f4: ; 8e7f4
|
||||
INCBIN "gfx/unknown/08e7f4.2bpp"
|
||||
GFX_8e804: ; 8e804
|
||||
INCBIN "gfx/unknown/08e804.2bpp"
|
||||
|
||||
ClearSpriteAnims: ; 8e814
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
push af
|
||||
ld hl, wSpriteAnimDict
|
||||
ld bc, wSpriteAnimsEnd - wSpriteAnimDict
|
||||
.loop
|
||||
ld [hl], $0
|
||||
inc hl
|
||||
dec bc
|
||||
ld a, c
|
||||
or b
|
||||
jr nz, .loop
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 8e82b
|
||||
|
||||
Function8e82b: ; 8e82b
|
||||
ld a, e
|
||||
call ReadMonMenuIcon
|
||||
ld l, a
|
||||
ld h, 0
|
||||
add hl, hl
|
||||
ld de, IconPointers
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld d, [hl]
|
||||
ld b, BANK(Icons)
|
||||
ld c, 8
|
||||
ret
|
||||
; 8e83f
|
||||
|
||||
Function8e83f: ; 8e83f
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
call Function8e849
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 8e849
|
||||
|
||||
Function8e849: ; 8e849
|
||||
ld d, 0
|
||||
ld hl, Jumptable_8e854
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
; 8e854
|
||||
|
||||
|
||||
Jumptable_8e854: ; 8e854 (23:6854)
|
||||
dw Function8e8d5
|
||||
dw Function8e961
|
||||
dw Function8e97d
|
||||
dw Function8e99a
|
||||
dw Function8e898
|
||||
dw Function8e8b1
|
||||
dw Function8e862
|
||||
|
||||
|
||||
Function8e862: ; 8e862 (23:6862)
|
||||
call Function8e908
|
||||
call Function8e86c
|
||||
call Function8e936
|
||||
ret
|
||||
|
||||
Function8e86c: ; 8e86c (23:686c)
|
||||
push bc
|
||||
ld a, [hObjectStructIndexBuffer]
|
||||
ld hl, PartyMon1Item
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call AddNTimes
|
||||
pop bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, .asm_8e890
|
||||
push hl
|
||||
push bc
|
||||
ld d, a
|
||||
callab ItemIsMail
|
||||
pop bc
|
||||
pop hl
|
||||
jr c, .asm_8e88e
|
||||
ld a, $6
|
||||
jr .asm_8e892
|
||||
.asm_8e88e
|
||||
ld a, $5
|
||||
.asm_8e890
|
||||
ld a, $4
|
||||
.asm_8e892
|
||||
ld hl, $1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
Function8e898: ; 8e898 (23:6898)
|
||||
call Function8e8d5
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld a, $0
|
||||
ld [hl], a
|
||||
ld hl, $4
|
||||
add hl, bc
|
||||
ld a, $48
|
||||
ld [hl], a
|
||||
ld hl, $5
|
||||
add hl, bc
|
||||
ld a, $48
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
Function8e8b1: ; 8e8b1 (23:68b1)
|
||||
call Function8e908
|
||||
call Function8e936
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld a, $0
|
||||
ld [hl], a
|
||||
ld hl, $4
|
||||
add hl, bc
|
||||
ld a, $18
|
||||
ld [hl], a
|
||||
ld hl, $5
|
||||
add hl, bc
|
||||
ld a, $60
|
||||
ld [hl], a
|
||||
ld a, c
|
||||
ld [wc608], a
|
||||
ld a, b
|
||||
ld [wc608 + 1], a
|
||||
ret
|
||||
|
||||
Function8e8d5: ; 8e8d5 (23:68d5)
|
||||
call Function8e908
|
||||
call Function8e8df
|
||||
call Function8e936
|
||||
ret
|
||||
|
||||
Function8e8df: ; 8e8df (23:68df)
|
||||
push bc
|
||||
ld a, [hObjectStructIndexBuffer]
|
||||
ld hl, PartyMon1Item
|
||||
ld bc, $30
|
||||
call AddNTimes
|
||||
pop bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
ret z
|
||||
push hl
|
||||
push bc
|
||||
ld d, a
|
||||
callab ItemIsMail
|
||||
pop bc
|
||||
pop hl
|
||||
jr c, .asm_8e900
|
||||
ld a, $3
|
||||
jr .asm_8e902
|
||||
.asm_8e900
|
||||
ld a, $2
|
||||
.asm_8e902
|
||||
ld hl, $1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
Function8e908: ; 8e908 (23:6908)
|
||||
ld a, [wc3b7]
|
||||
push af
|
||||
ld a, [hObjectStructIndexBuffer]
|
||||
ld hl, PartySpecies
|
||||
ld e, a
|
||||
ld d, $0
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
call ReadMonMenuIcon
|
||||
ld [CurIcon], a
|
||||
call Function8e9db
|
||||
ld a, [hObjectStructIndexBuffer]
|
||||
; y coord
|
||||
rept 4
|
||||
add a
|
||||
endr
|
||||
add $1c
|
||||
ld d, a
|
||||
; x coord
|
||||
ld e, $10
|
||||
; type is partymon icon
|
||||
ld a, SPRITE_ANIM_INDEX_00
|
||||
call InitSpriteAnimStruct
|
||||
pop af
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
Function8e936: ; 8e936 (23:6936)
|
||||
push bc
|
||||
ld a, [hObjectStructIndexBuffer]
|
||||
ld b, a
|
||||
call Function8e94c
|
||||
ld a, b
|
||||
pop bc
|
||||
ld hl, $9
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
rlca
|
||||
rlca
|
||||
ld hl, $d
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
Function8e94c: ; 8e94c (23:694c)
|
||||
callba PlacePartymonHPBar
|
||||
call GetHPPal
|
||||
ld e, d
|
||||
ld d, 0
|
||||
ld hl, Unknown_8e95e
|
||||
add hl, de
|
||||
ld b, [hl]
|
||||
ret
|
||||
; 8e95e (23:695e)
|
||||
|
||||
Unknown_8e95e: ; 8e95e
|
||||
db $00, $40, $80
|
||||
; 8e961
|
||||
|
||||
Function8e961: ; 8e961 (23:6961)
|
||||
ld a, [wd265]
|
||||
call ReadMonMenuIcon
|
||||
ld [CurIcon], a
|
||||
xor a
|
||||
call GetIconGFX
|
||||
lb de, $24, $20
|
||||
ld a, SPRITE_ANIM_INDEX_00
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
ret
|
||||
|
||||
Function8e97d: ; 8e97d (23:697d)
|
||||
ld a, [wd265]
|
||||
call ReadMonMenuIcon
|
||||
ld [CurIcon], a
|
||||
xor a
|
||||
call GetIconGFX
|
||||
ld d, $1a
|
||||
ld e, $24
|
||||
ld a, SPRITE_ANIM_INDEX_00
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
ret
|
||||
|
||||
Function8e99a: ; 8e99a (23:699a)
|
||||
ld a, [wd265]
|
||||
call ReadMonMenuIcon
|
||||
ld [CurIcon], a
|
||||
ld a, $62
|
||||
ld [wc3b7], a
|
||||
call Function8e9db
|
||||
ret
|
||||
|
||||
GetSpeciesIcon: ; 8e9ac
|
||||
; Load species icon into VRAM at tile a
|
||||
push de
|
||||
ld a, [wd265]
|
||||
call ReadMonMenuIcon
|
||||
ld [CurIcon], a
|
||||
pop de
|
||||
ld a, e
|
||||
call GetIconGFX
|
||||
ret
|
||||
; 8e9bc
|
||||
|
||||
|
||||
Function8e9bc: ; 8e9bc (23:69bc)
|
||||
push de
|
||||
ld a, [wd265]
|
||||
call ReadMonMenuIcon
|
||||
ld [CurIcon], a
|
||||
pop de
|
||||
ld a, e
|
||||
call GetIcon_a
|
||||
ret
|
||||
; 8e9cc (23:69cc)
|
||||
|
||||
Function8e9cc: ; 8e9cc
|
||||
push de
|
||||
ld a, [wd265]
|
||||
call ReadMonMenuIcon
|
||||
ld [CurIcon], a
|
||||
pop de
|
||||
call GetIcon_de
|
||||
ret
|
||||
; 8e9db
|
||||
|
||||
Function8e9db: ; 8e9db (23:69db)
|
||||
ld a, [wc3b7]
|
||||
|
||||
GetIconGFX: ; 8e9de
|
||||
call GetIcon_a
|
||||
ld de, $80 ; 8 tiles
|
||||
add hl, de
|
||||
ld de, HeldItemIcons
|
||||
lb bc, BANK(HeldItemIcons), 2
|
||||
call GetGFXUnlessMobile
|
||||
ld a, [wc3b7]
|
||||
add 10
|
||||
ld [wc3b7], a
|
||||
ret
|
||||
|
||||
HeldItemIcons:
|
||||
INCBIN "gfx/icon/mail.2bpp"
|
||||
INCBIN "gfx/icon/item.2bpp"
|
||||
; 8ea17
|
||||
|
||||
GetIcon_de: ; 8ea17
|
||||
; Load icon graphics into VRAM starting from tile de.
|
||||
ld l, e
|
||||
ld h, d
|
||||
jr GetIcon
|
||||
|
||||
GetIcon_a: ; 8ea1b
|
||||
; Load icon graphics into VRAM starting from tile a.
|
||||
ld l, a
|
||||
ld h, 0
|
||||
|
||||
GetIcon: ; 8ea1e
|
||||
; Load icon graphics into VRAM starting from tile hl.
|
||||
|
||||
; One tile is 16 bytes long.
|
||||
rept 4
|
||||
add hl, hl
|
||||
endr
|
||||
|
||||
ld de, VTiles0
|
||||
add hl, de
|
||||
push hl
|
||||
|
||||
; The icons are contiguous, in order and of the same
|
||||
; size, so the pointer table is somewhat redundant.
|
||||
ld a, [CurIcon]
|
||||
push hl
|
||||
ld l, a
|
||||
ld h, 0
|
||||
add hl, hl
|
||||
ld de, IconPointers
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld d, [hl]
|
||||
pop hl
|
||||
|
||||
lb bc, BANK(Icons), 8
|
||||
call GetGFXUnlessMobile
|
||||
|
||||
pop hl
|
||||
ret
|
||||
; 8ea3f
|
||||
|
||||
GetGFXUnlessMobile: ; 8ea3f
|
||||
ld a, [wLinkMode]
|
||||
cp LINK_MOBILE
|
||||
jp nz, Request2bpp
|
||||
jp Get2bpp_2
|
||||
; 8ea4a
|
||||
|
||||
Function8ea4a: ; 8ea4a
|
||||
ld hl, wSpriteAnimationStructs
|
||||
ld e, $6
|
||||
ld a, [MenuSelection2]
|
||||
ld d, a
|
||||
.loop
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, .next
|
||||
cp d
|
||||
jr z, .loadwithtwo
|
||||
ld a, $0
|
||||
jr .ok
|
||||
|
||||
.loadwithtwo
|
||||
ld a, $2
|
||||
|
||||
.ok
|
||||
push hl
|
||||
ld c, l
|
||||
ld b, h
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
pop hl
|
||||
|
||||
.next
|
||||
ld bc, $10
|
||||
add hl, bc
|
||||
dec e
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 8ea71
|
||||
|
||||
Function8ea71: ; 8ea71
|
||||
ld hl, wSpriteAnimationStructs
|
||||
ld e, $6
|
||||
.loop
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, .zero
|
||||
push hl
|
||||
ld c, l
|
||||
ld b, h
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
pop hl
|
||||
.zero
|
||||
ld bc, $10
|
||||
add hl, bc
|
||||
dec e
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 8ea8c (23:6a8c)
|
||||
|
||||
Function8ea8c: ; 8ea8c
|
||||
ld hl, wSpriteAnimationStructs
|
||||
ld e, $6
|
||||
ld a, [wd0e3]
|
||||
ld d, a
|
||||
.asm_8ea95
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, .asm_8eaab
|
||||
cp d
|
||||
jr z, .asm_8eaa0
|
||||
ld a, $3
|
||||
jr .asm_8eaa2
|
||||
.asm_8eaa0
|
||||
ld a, $2
|
||||
.asm_8eaa2
|
||||
push hl
|
||||
ld c, l
|
||||
ld b, h
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
pop hl
|
||||
.asm_8eaab
|
||||
ld bc, $10
|
||||
add hl, bc
|
||||
dec e
|
||||
jr nz, .asm_8ea95
|
||||
ret
|
||||
|
||||
INCLUDE "menu/mon_icons.asm"
|
||||
|
@@ -1761,7 +1761,7 @@ SetUpMoveScreenBG: ; 13172
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
callba Functionfb571
|
||||
callba InefficientlyClear121BytesAtwc300
|
||||
callba ClearSpriteAnims
|
||||
ld a, [CurPartyMon]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
|
684
engine/time_capsule/conversion.asm
Executable file
684
engine/time_capsule/conversion.asm
Executable file
@@ -0,0 +1,684 @@
|
||||
; These functions seem to be related to backwards compatibility
|
||||
|
||||
Functionfb57e: ; fb57e
|
||||
ld a, [wd003]
|
||||
ld hl, OTPartyMon1Species
|
||||
call GetPartyLocation
|
||||
push hl
|
||||
ld a, [wd003]
|
||||
inc a
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, OTPartyCount
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
pop hl
|
||||
cp EGG
|
||||
jr z, .asm_fb59c
|
||||
cp [hl]
|
||||
jr nz, .asm_fb5db
|
||||
|
||||
.asm_fb59c
|
||||
ld b, h
|
||||
ld c, l
|
||||
ld hl, MON_LEVEL
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp 101
|
||||
jr nc, .asm_fb5db
|
||||
ld a, [wLinkMode]
|
||||
cp LINK_TIMECAPSULE
|
||||
jr nz, .asm_fb5d9
|
||||
ld hl, OTPartySpecies
|
||||
ld a, [wd003]
|
||||
ld c, a
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
|
||||
; Magnemite and Magneton's types changed
|
||||
; from Electric to Electric/Steel.
|
||||
cp MAGNEMITE
|
||||
jr z, .asm_fb5d9
|
||||
cp MAGNETON
|
||||
jr z, .asm_fb5d9
|
||||
|
||||
ld [CurSpecies], a
|
||||
call GetBaseData
|
||||
ld hl, wcbea
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
ld a, [BaseType1]
|
||||
cp [hl]
|
||||
jr nz, .asm_fb5db
|
||||
inc hl
|
||||
ld a, [BaseType2]
|
||||
cp [hl]
|
||||
jr nz, .asm_fb5db
|
||||
|
||||
.asm_fb5d9
|
||||
and a
|
||||
ret
|
||||
|
||||
.asm_fb5db
|
||||
scf
|
||||
ret
|
||||
; fb5dd
|
||||
|
||||
Functionfb5dd: ; fb5dd
|
||||
ld a, [wd002]
|
||||
ld d, a
|
||||
ld a, [PartyCount]
|
||||
ld b, a
|
||||
ld c, $0
|
||||
.asm_fb5e7
|
||||
ld a, c
|
||||
cp d
|
||||
jr z, .asm_fb5f8
|
||||
push bc
|
||||
ld a, c
|
||||
ld hl, PartyMon1HP
|
||||
call GetPartyLocation
|
||||
pop bc
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
jr nz, .asm_fb60b
|
||||
|
||||
.asm_fb5f8
|
||||
inc c
|
||||
dec b
|
||||
jr nz, .asm_fb5e7
|
||||
ld a, [wd003]
|
||||
ld hl, OTPartyMon1HP
|
||||
call GetPartyLocation
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
jr nz, .asm_fb60b
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_fb60b
|
||||
and a
|
||||
ret
|
||||
; fb60d
|
||||
|
||||
Functionfb60d: ; fb60d
|
||||
hlcoord 4, 0
|
||||
ld de, PlayerName
|
||||
call PlaceString
|
||||
ld a, $14
|
||||
ld [bc], a
|
||||
hlcoord 4, 8
|
||||
ld de, wd26b
|
||||
call PlaceString
|
||||
ld a, $14
|
||||
ld [bc], a
|
||||
hlcoord 7, 1
|
||||
ld de, PartySpecies
|
||||
call Functionfb634
|
||||
hlcoord 7, 9
|
||||
ld de, OTPartySpecies
|
||||
|
||||
Functionfb634: ; fb634
|
||||
ld c, $0
|
||||
.asm_fb636
|
||||
ld a, [de]
|
||||
cp $ff
|
||||
ret z
|
||||
ld [wd265], a
|
||||
push bc
|
||||
push hl
|
||||
push de
|
||||
push hl
|
||||
ld a, c
|
||||
ld [hProduct], a
|
||||
call GetPokemonName
|
||||
pop hl
|
||||
call PlaceString
|
||||
pop de
|
||||
inc de
|
||||
pop hl
|
||||
ld bc, SCREEN_WIDTH
|
||||
add hl, bc
|
||||
pop bc
|
||||
inc c
|
||||
jr .asm_fb636
|
||||
; fb656
|
||||
|
||||
KantoMonSpecials: ; fb656
|
||||
; The original special base stat for
|
||||
; each Kanto monster from Red/Blue.
|
||||
db 65 ; BULBASAUR
|
||||
db 80 ; IVYSAUR
|
||||
db 100 ; VENUSAUR
|
||||
db 50 ; CHARMANDER
|
||||
db 65 ; CHARMELEON
|
||||
db 85 ; CHARIZARD
|
||||
db 50 ; SQUIRTLE
|
||||
db 65 ; WARTORTLE
|
||||
db 85 ; BLASTOISE
|
||||
db 20 ; CATERPIE
|
||||
db 25 ; METAPOD
|
||||
db 80 ; BUTTERFREE
|
||||
db 20 ; WEEDLE
|
||||
db 25 ; KAKUNA
|
||||
db 45 ; BEEDRILL
|
||||
db 35 ; PIDGEY
|
||||
db 50 ; PIDGEOTTO
|
||||
db 70 ; PIDGEOT
|
||||
db 25 ; RATTATA
|
||||
db 50 ; RATICATE
|
||||
db 31 ; SPEAROW
|
||||
db 61 ; FEAROW
|
||||
db 40 ; EKANS
|
||||
db 65 ; ARBOK
|
||||
db 50 ; PIKACHU
|
||||
db 90 ; RAICHU
|
||||
db 30 ; SANDSHREW
|
||||
db 55 ; SANDSLASH
|
||||
db 40 ; NIDORAN_F
|
||||
db 55 ; NIDORINA
|
||||
db 75 ; NIDOQUEEN
|
||||
db 40 ; NIDORAN_M
|
||||
db 55 ; NIDORINO
|
||||
db 75 ; NIDOKING
|
||||
db 60 ; CLEFAIRY
|
||||
db 85 ; CLEFABLE
|
||||
db 65 ; VULPIX
|
||||
db 100 ; NINETALES
|
||||
db 25 ; JIGGLYPUFF
|
||||
db 50 ; WIGGLYTUFF
|
||||
db 40 ; ZUBAT
|
||||
db 75 ; GOLBAT
|
||||
db 75 ; ODDISH
|
||||
db 85 ; GLOOM
|
||||
db 100 ; VILEPLUME
|
||||
db 55 ; PARAS
|
||||
db 80 ; PARASECT
|
||||
db 40 ; VENONAT
|
||||
db 90 ; VENOMOTH
|
||||
db 45 ; DIGLETT
|
||||
db 70 ; DUGTRIO
|
||||
db 40 ; MEOWTH
|
||||
db 65 ; PERSIAN
|
||||
db 50 ; PSYDUCK
|
||||
db 80 ; GOLDUCK
|
||||
db 35 ; MANKEY
|
||||
db 60 ; PRIMEAPE
|
||||
db 50 ; GROWLITHE
|
||||
db 80 ; ARCANINE
|
||||
db 40 ; POLIWAG
|
||||
db 50 ; POLIWHIRL
|
||||
db 70 ; POLIWRATH
|
||||
db 105 ; ABRA
|
||||
db 120 ; KADABRA
|
||||
db 135 ; ALAKAZAM
|
||||
db 35 ; MACHOP
|
||||
db 50 ; MACHOKE
|
||||
db 65 ; MACHAMP
|
||||
db 70 ; BELLSPROUT
|
||||
db 85 ; WEEPINBELL
|
||||
db 100 ; VICTREEBEL
|
||||
db 100 ; TENTACOOL
|
||||
db 120 ; TENTACRUEL
|
||||
db 30 ; GEODUDE
|
||||
db 45 ; GRAVELER
|
||||
db 55 ; GOLEM
|
||||
db 65 ; PONYTA
|
||||
db 80 ; RAPIDASH
|
||||
db 40 ; SLOWPOKE
|
||||
db 80 ; SLOWBRO
|
||||
db 95 ; MAGNEMITE
|
||||
db 120 ; MAGNETON
|
||||
db 58 ; FARFETCH_D
|
||||
db 35 ; DODUO
|
||||
db 60 ; DODRIO
|
||||
db 70 ; SEEL
|
||||
db 95 ; DEWGONG
|
||||
db 40 ; GRIMER
|
||||
db 65 ; MUK
|
||||
db 45 ; SHELLDER
|
||||
db 85 ; CLOYSTER
|
||||
db 100 ; GASTLY
|
||||
db 115 ; HAUNTER
|
||||
db 130 ; GENGAR
|
||||
db 30 ; ONIX
|
||||
db 90 ; DROWZEE
|
||||
db 115 ; HYPNO
|
||||
db 25 ; KRABBY
|
||||
db 50 ; KINGLER
|
||||
db 55 ; VOLTORB
|
||||
db 80 ; ELECTRODE
|
||||
db 60 ; EXEGGCUTE
|
||||
db 125 ; EXEGGUTOR
|
||||
db 40 ; CUBONE
|
||||
db 50 ; MAROWAK
|
||||
db 35 ; HITMONLEE
|
||||
db 35 ; HITMONCHAN
|
||||
db 60 ; LICKITUNG
|
||||
db 60 ; KOFFING
|
||||
db 85 ; WEEZING
|
||||
db 30 ; RHYHORN
|
||||
db 45 ; RHYDON
|
||||
db 105 ; CHANSEY
|
||||
db 100 ; TANGELA
|
||||
db 40 ; KANGASKHAN
|
||||
db 70 ; HORSEA
|
||||
db 95 ; SEADRA
|
||||
db 50 ; GOLDEEN
|
||||
db 80 ; SEAKING
|
||||
db 70 ; STARYU
|
||||
db 100 ; STARMIE
|
||||
db 100 ; MR__MIME
|
||||
db 55 ; SCYTHER
|
||||
db 95 ; JYNX
|
||||
db 85 ; ELECTABUZZ
|
||||
db 85 ; MAGMAR
|
||||
db 55 ; PINSIR
|
||||
db 70 ; TAUROS
|
||||
db 20 ; MAGIKARP
|
||||
db 100 ; GYARADOS
|
||||
db 95 ; LAPRAS
|
||||
db 48 ; DITTO
|
||||
db 65 ; EEVEE
|
||||
db 110 ; VAPOREON
|
||||
db 110 ; JOLTEON
|
||||
db 110 ; FLAREON
|
||||
db 75 ; PORYGON
|
||||
db 90 ; OMANYTE
|
||||
db 115 ; OMASTAR
|
||||
db 45 ; KABUTO
|
||||
db 70 ; KABUTOPS
|
||||
db 60 ; AERODACTYL
|
||||
db 65 ; SNORLAX
|
||||
db 125 ; ARTICUNO
|
||||
db 125 ; ZAPDOS
|
||||
db 125 ; MOLTRES
|
||||
db 50 ; DRATINI
|
||||
db 70 ; DRAGONAIR
|
||||
db 100 ; DRAGONITE
|
||||
db 154 ; MEWTWO
|
||||
db 100 ; MEW
|
||||
; fb6ed
|
||||
|
||||
|
||||
INCLUDE "event/name_rater.asm"
|
||||
|
||||
|
||||
PlaySlowCry: ; fb841
|
||||
ld a, [ScriptVar]
|
||||
call LoadCryHeader
|
||||
jr c, .done
|
||||
|
||||
ld hl, CryPitch
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld bc, -$140
|
||||
add hl, bc
|
||||
ld a, l
|
||||
ld [CryPitch], a
|
||||
ld a, h
|
||||
ld [CryPitch + 1], a
|
||||
ld hl, CryLength
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld bc, $60
|
||||
add hl, bc
|
||||
ld a, l
|
||||
ld [CryLength], a
|
||||
ld a, h
|
||||
ld [CryLength + 1], a
|
||||
callba _PlayCryHeader
|
||||
call WaitSFX
|
||||
|
||||
.done
|
||||
ret
|
||||
; fb877
|
||||
|
||||
NewPokedexEntry: ; fb877
|
||||
ld a, [hMapAnims]
|
||||
push af
|
||||
xor a
|
||||
ld [hMapAnims], a
|
||||
call LowVolume
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call UpdateSprites
|
||||
call ClearSprites
|
||||
ld a, [wPokedexStatus]
|
||||
push af
|
||||
ld a, [hSCX]
|
||||
add $5
|
||||
ld [hSCX], a
|
||||
xor a
|
||||
ld [wPokedexStatus], a
|
||||
callba Function41a7f
|
||||
call WaitPressAorB_BlinkCursor
|
||||
ld a, $1
|
||||
ld [wPokedexStatus], a
|
||||
callba Function4424d
|
||||
call WaitPressAorB_BlinkCursor
|
||||
pop af
|
||||
ld [wPokedexStatus], a
|
||||
call MaxVolume
|
||||
call FadeToWhite
|
||||
ld a, [hSCX]
|
||||
add $fb
|
||||
ld [hSCX], a
|
||||
call Functionfb8c8
|
||||
pop af
|
||||
ld [hMapAnims], a
|
||||
ret
|
||||
; fb8c8
|
||||
|
||||
Functionfb8c8: ; fb8c8
|
||||
call ClearTileMap
|
||||
call LoadFontsExtra
|
||||
call LoadStandardFont
|
||||
callba Function40ab2
|
||||
call Function3200
|
||||
callba GetEnemyMonDVs
|
||||
ld a, [hli]
|
||||
ld [TempMonDVs], a
|
||||
ld a, [hl]
|
||||
ld [TempMonDVs + 1], a
|
||||
ld b, SCGB_1C
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
ret
|
||||
; fb8f1
|
||||
|
||||
ConvertMon_2to1: ; fb8f1
|
||||
; Takes the Gen-2 Pokemon number stored in wd265, finds it in the Pokered_MonIndices table, and returns its index in wd265.
|
||||
push bc
|
||||
push hl
|
||||
ld a, [wd265]
|
||||
ld b, a
|
||||
ld c, 0
|
||||
ld hl, Pokered_MonIndices
|
||||
.loop
|
||||
inc c
|
||||
ld a, [hli]
|
||||
cp b
|
||||
jr nz, .loop
|
||||
ld a, c
|
||||
ld [wd265], a
|
||||
pop hl
|
||||
pop bc
|
||||
ret
|
||||
; fb908
|
||||
|
||||
ConvertMon_1to2: ; fb908
|
||||
; Takes the Gen-1 Pokemon number stored in wd265 and returns the corresponding value from Pokered_MonIndices in wd265.
|
||||
push bc
|
||||
push hl
|
||||
ld a, [wd265]
|
||||
dec a
|
||||
ld hl, Pokered_MonIndices
|
||||
ld b, 0
|
||||
ld c, a
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld [wd265], a
|
||||
pop hl
|
||||
pop bc
|
||||
ret
|
||||
; fb91c
|
||||
|
||||
Pokered_MonIndices: ; fb91c
|
||||
db RHYDON
|
||||
db KANGASKHAN
|
||||
db NIDORAN_M
|
||||
db CLEFAIRY
|
||||
db SPEAROW
|
||||
db VOLTORB
|
||||
db NIDOKING
|
||||
db SLOWBRO
|
||||
db IVYSAUR
|
||||
db EXEGGUTOR
|
||||
db LICKITUNG
|
||||
db EXEGGCUTE
|
||||
db GRIMER
|
||||
db GENGAR
|
||||
db NIDORAN_F
|
||||
db NIDOQUEEN
|
||||
db CUBONE
|
||||
db RHYHORN
|
||||
db LAPRAS
|
||||
db ARCANINE
|
||||
db MEW
|
||||
db GYARADOS
|
||||
db SHELLDER
|
||||
db TENTACOOL
|
||||
db GASTLY
|
||||
db SCYTHER
|
||||
db STARYU
|
||||
db BLASTOISE
|
||||
db PINSIR
|
||||
db TANGELA
|
||||
db SCIZOR
|
||||
db SHUCKLE
|
||||
db GROWLITHE
|
||||
db ONIX
|
||||
db FEAROW
|
||||
db PIDGEY
|
||||
db SLOWPOKE
|
||||
db KADABRA
|
||||
db GRAVELER
|
||||
db CHANSEY
|
||||
db MACHOKE
|
||||
db MR__MIME
|
||||
db HITMONLEE
|
||||
db HITMONCHAN
|
||||
db ARBOK
|
||||
db PARASECT
|
||||
db PSYDUCK
|
||||
db DROWZEE
|
||||
db GOLEM
|
||||
db HERACROSS
|
||||
db MAGMAR
|
||||
db HO_OH
|
||||
db ELECTABUZZ
|
||||
db MAGNETON
|
||||
db KOFFING
|
||||
db SNEASEL
|
||||
db MANKEY
|
||||
db SEEL
|
||||
db DIGLETT
|
||||
db TAUROS
|
||||
db TEDDIURSA
|
||||
db URSARING
|
||||
db SLUGMA
|
||||
db FARFETCH_D
|
||||
db VENONAT
|
||||
db DRAGONITE
|
||||
db MAGCARGO
|
||||
db SWINUB
|
||||
db PILOSWINE
|
||||
db DODUO
|
||||
db POLIWAG
|
||||
db JYNX
|
||||
db MOLTRES
|
||||
db ARTICUNO
|
||||
db ZAPDOS
|
||||
db DITTO
|
||||
db MEOWTH
|
||||
db KRABBY
|
||||
db CORSOLA
|
||||
db REMORAID
|
||||
db OCTILLERY
|
||||
db VULPIX
|
||||
db NINETALES
|
||||
db PIKACHU
|
||||
db RAICHU
|
||||
db DELIBIRD
|
||||
db MANTINE
|
||||
db DRATINI
|
||||
db DRAGONAIR
|
||||
db KABUTO
|
||||
db KABUTOPS
|
||||
db HORSEA
|
||||
db SEADRA
|
||||
db SKARMORY
|
||||
db HOUNDOUR
|
||||
db SANDSHREW
|
||||
db SANDSLASH
|
||||
db OMANYTE
|
||||
db OMASTAR
|
||||
db JIGGLYPUFF
|
||||
db WIGGLYTUFF
|
||||
db EEVEE
|
||||
db FLAREON
|
||||
db JOLTEON
|
||||
db VAPOREON
|
||||
db MACHOP
|
||||
db ZUBAT
|
||||
db EKANS
|
||||
db PARAS
|
||||
db POLIWHIRL
|
||||
db POLIWRATH
|
||||
db WEEDLE
|
||||
db KAKUNA
|
||||
db BEEDRILL
|
||||
db HOUNDOOM
|
||||
db DODRIO
|
||||
db PRIMEAPE
|
||||
db DUGTRIO
|
||||
db VENOMOTH
|
||||
db DEWGONG
|
||||
db KINGDRA
|
||||
db PHANPY
|
||||
db CATERPIE
|
||||
db METAPOD
|
||||
db BUTTERFREE
|
||||
db MACHAMP
|
||||
db DONPHAN
|
||||
db GOLDUCK
|
||||
db HYPNO
|
||||
db GOLBAT
|
||||
db MEWTWO
|
||||
db SNORLAX
|
||||
db MAGIKARP
|
||||
db PORYGON2
|
||||
db STANTLER
|
||||
db MUK
|
||||
db SMEARGLE
|
||||
db KINGLER
|
||||
db CLOYSTER
|
||||
db TYROGUE
|
||||
db ELECTRODE
|
||||
db CLEFABLE
|
||||
db WEEZING
|
||||
db PERSIAN
|
||||
db MAROWAK
|
||||
db HITMONTOP
|
||||
db HAUNTER
|
||||
db ABRA
|
||||
db ALAKAZAM
|
||||
db PIDGEOTTO
|
||||
db PIDGEOT
|
||||
db STARMIE
|
||||
db BULBASAUR
|
||||
db VENUSAUR
|
||||
db TENTACRUEL
|
||||
db SMOOCHUM
|
||||
db GOLDEEN
|
||||
db SEAKING
|
||||
db ELEKID
|
||||
db MAGBY
|
||||
db MILTANK
|
||||
db BLISSEY
|
||||
db PONYTA
|
||||
db RAPIDASH
|
||||
db RATTATA
|
||||
db RATICATE
|
||||
db NIDORINO
|
||||
db NIDORINA
|
||||
db GEODUDE
|
||||
db PORYGON
|
||||
db AERODACTYL
|
||||
db RAIKOU
|
||||
db MAGNEMITE
|
||||
db ENTEI
|
||||
db SUICUNE
|
||||
db CHARMANDER
|
||||
db SQUIRTLE
|
||||
db CHARMELEON
|
||||
db WARTORTLE
|
||||
db CHARIZARD
|
||||
db LARVITAR
|
||||
db PUPITAR
|
||||
db TYRANITAR
|
||||
db LUGIA
|
||||
db ODDISH
|
||||
db GLOOM
|
||||
db VILEPLUME
|
||||
db BELLSPROUT
|
||||
db WEEPINBELL
|
||||
db VICTREEBEL
|
||||
db CHIKORITA
|
||||
db BAYLEEF
|
||||
db MEGANIUM
|
||||
db CYNDAQUIL
|
||||
db QUILAVA
|
||||
db TYPHLOSION
|
||||
db TOTODILE
|
||||
db CROCONAW
|
||||
db FERALIGATR
|
||||
db SENTRET
|
||||
db FURRET
|
||||
db HOOTHOOT
|
||||
db NOCTOWL
|
||||
db LEDYBA
|
||||
db LEDIAN
|
||||
db SPINARAK
|
||||
db ARIADOS
|
||||
db CROBAT
|
||||
db CHINCHOU
|
||||
db LANTURN
|
||||
db PICHU
|
||||
db CLEFFA
|
||||
db IGGLYBUFF
|
||||
db TOGEPI
|
||||
db TOGETIC
|
||||
db NATU
|
||||
db XATU
|
||||
db MAREEP
|
||||
db FLAAFFY
|
||||
db AMPHAROS
|
||||
db BELLOSSOM
|
||||
db MARILL
|
||||
db AZUMARILL
|
||||
db SUDOWOODO
|
||||
db POLITOED
|
||||
db HOPPIP
|
||||
db SKIPLOOM
|
||||
db JUMPLUFF
|
||||
db AIPOM
|
||||
db SUNKERN
|
||||
db SUNFLORA
|
||||
db YANMA
|
||||
db WOOPER
|
||||
db QUAGSIRE
|
||||
db ESPEON
|
||||
db UMBREON
|
||||
db MURKROW
|
||||
db SLOWKING
|
||||
db MISDREAVUS
|
||||
db UNOWN
|
||||
db WOBBUFFET
|
||||
db GIRAFARIG
|
||||
db PINECO
|
||||
db FORRETRESS
|
||||
db DUNSPARCE
|
||||
db GLIGAR
|
||||
db STEELIX
|
||||
db SNUBBULL
|
||||
db GRANBULL
|
||||
db QWILFISH
|
||||
db WOBBUFFET
|
||||
db WOBBUFFET
|
||||
; fba18
|
150
engine/variables.asm
Executable file
150
engine/variables.asm
Executable file
@@ -0,0 +1,150 @@
|
||||
_GetVarAction:: ; 80648 (20:4648)
|
||||
ld a, c
|
||||
cp NUM_VARS
|
||||
jr c, .valid
|
||||
xor a
|
||||
.valid
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, .VarActionTable
|
||||
rept 3
|
||||
add hl, bc
|
||||
endr
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
inc hl
|
||||
ld b, [hl]
|
||||
ld a, b
|
||||
and RETVAR_EXECUTE
|
||||
jr nz, .call
|
||||
ld a, b
|
||||
and RETVAR_ADDR_DE
|
||||
ret nz
|
||||
ld a, [de]
|
||||
jr .loadstringbuffer2
|
||||
|
||||
.call
|
||||
call _de_
|
||||
ret
|
||||
|
||||
.loadstringbuffer2: ; 8066c (20:466c)
|
||||
ld de, StringBuffer2
|
||||
ld [de], a
|
||||
ret
|
||||
; 80671 (20:4671)
|
||||
|
||||
.VarActionTable: ; 80671
|
||||
; $00: copy [de] to StringBuffer2
|
||||
; $40: return address in de
|
||||
; $80: call function
|
||||
dwb StringBuffer2, RETVAR_STRBUF2
|
||||
dwb PartyCount, RETVAR_STRBUF2
|
||||
dwb .BattleResult, RETVAR_EXECUTE
|
||||
dwb BattleType, RETVAR_ADDR_DE
|
||||
dwb TimeOfDay, RETVAR_STRBUF2
|
||||
dwb .CountCaughtMons, RETVAR_EXECUTE
|
||||
dwb .CountSeenMons, RETVAR_EXECUTE
|
||||
dwb .CountBadges, RETVAR_EXECUTE
|
||||
dwb PlayerState, RETVAR_ADDR_DE
|
||||
dwb .PlayerFacing, RETVAR_EXECUTE
|
||||
dwb hHours, RETVAR_STRBUF2
|
||||
dwb .DayOfWeek, RETVAR_EXECUTE
|
||||
dwb MapGroup, RETVAR_STRBUF2
|
||||
dwb MapNumber, RETVAR_STRBUF2
|
||||
dwb .UnownCaught, RETVAR_EXECUTE
|
||||
dwb wPermission, RETVAR_STRBUF2
|
||||
dwb .BoxFreeSpace, RETVAR_EXECUTE
|
||||
dwb wBugContestMinsRemaining, RETVAR_STRBUF2
|
||||
dwb XCoord, RETVAR_STRBUF2
|
||||
dwb YCoord, RETVAR_STRBUF2
|
||||
dwb wSpecialPhoneCallID, RETVAR_STRBUF2
|
||||
dwb wcf64, RETVAR_STRBUF2
|
||||
dwb wKurtApricornQuantity, RETVAR_STRBUF2
|
||||
dwb wCurrentCaller, RETVAR_ADDR_DE
|
||||
dwb wBlueCardBalance, RETVAR_ADDR_DE
|
||||
dwb wBuenasPassword, RETVAR_ADDR_DE
|
||||
dwb wdc58, RETVAR_STRBUF2
|
||||
dwb NULL, RETVAR_STRBUF2
|
||||
; 806c5
|
||||
|
||||
.CountCaughtMons: ; 806c5
|
||||
; Caught mons.
|
||||
ld hl, PokedexCaught
|
||||
ld b, EndPokedexCaught - PokedexCaught
|
||||
call CountSetBits
|
||||
ld a, [wd265]
|
||||
jp .loadstringbuffer2
|
||||
; 806d3
|
||||
|
||||
.CountSeenMons: ; 806d3
|
||||
; Seen mons.
|
||||
ld hl, PokedexSeen
|
||||
ld b, EndPokedexSeen - PokedexSeen
|
||||
call CountSetBits
|
||||
ld a, [wd265]
|
||||
jp .loadstringbuffer2
|
||||
; 806e1
|
||||
|
||||
.CountBadges: ; 806e1
|
||||
; Number of owned badges.
|
||||
ld hl, Badges
|
||||
ld b, 2
|
||||
call CountSetBits
|
||||
ld a, [wd265]
|
||||
jp .loadstringbuffer2
|
||||
; 806ef
|
||||
|
||||
.PlayerFacing: ; 806ef
|
||||
; The direction the player is facing.
|
||||
ld a, [PlayerDirection]
|
||||
and $c
|
||||
rrca
|
||||
rrca
|
||||
jp .loadstringbuffer2
|
||||
; 806f9
|
||||
|
||||
.DayOfWeek: ; 806f9
|
||||
; The day of the week.
|
||||
call GetWeekday
|
||||
jp .loadstringbuffer2
|
||||
; 806ff
|
||||
|
||||
.UnownCaught: ; 806ff
|
||||
; Number of unique Unown caught.
|
||||
call .count
|
||||
ld a, b
|
||||
jp .loadstringbuffer2
|
||||
|
||||
.count
|
||||
ld hl, UnownDex
|
||||
ld b, 0
|
||||
.loop
|
||||
ld a, [hli]
|
||||
and a
|
||||
ret z
|
||||
inc b
|
||||
ld a, b
|
||||
cp 26
|
||||
jr c, .loop
|
||||
ret
|
||||
; 80715
|
||||
|
||||
.BoxFreeSpace: ; 80715
|
||||
; Remaining slots in the current box.
|
||||
ld a, BANK(sBoxCount)
|
||||
call GetSRAMBank
|
||||
ld hl, sBoxCount
|
||||
ld a, MONS_PER_BOX
|
||||
sub [hl]
|
||||
ld b, a
|
||||
call CloseSRAM
|
||||
ld a, b
|
||||
jp .loadstringbuffer2
|
||||
; 80728
|
||||
|
||||
.BattleResult: ; 80728
|
||||
ld a, [wBattleResult]
|
||||
and $3f
|
||||
jp .loadstringbuffer2
|
||||
; 80730
|
Reference in New Issue
Block a user