mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
more gfx-related labels
This commit is contained in:
parent
2a263629a4
commit
c087d44c42
@ -9167,11 +9167,11 @@ GetRoamMonSpecies: ; 3fa31
|
||||
|
||||
|
||||
Function3fa42: ; 3fa42
|
||||
ld hl, wd276
|
||||
ld hl, OTPlayerID
|
||||
ld de, StringBuffer1
|
||||
ld bc, 2
|
||||
call CopyBytes
|
||||
ld hl, wd26b
|
||||
ld hl, OTPlayerName
|
||||
ld bc, 10
|
||||
call CopyBytes
|
||||
ld hl, s1_b254
|
||||
|
106
engine/color.asm
106
engine/color.asm
@ -109,7 +109,7 @@ Function8aa4: ; 8aa4
|
||||
; 8ad1
|
||||
|
||||
|
||||
Function8ad1: ; 8ad1
|
||||
InitPartyMenuPalettes: ; 8ad1
|
||||
ld hl, PalPacket_9c56 + 1
|
||||
call CopyFourPalettes
|
||||
call InitPartyMenuOBPals
|
||||
@ -145,16 +145,17 @@ SGB_ApplyPartyMenuHPPals: ; 8ade SGB layout $fc
|
||||
; 8b07
|
||||
|
||||
Function8b07: ; 8b07
|
||||
; Unreferenced
|
||||
call CheckCGB
|
||||
ret z
|
||||
ld hl, Palette8b2f
|
||||
ld hl, .BGPal
|
||||
ld de, UnknBGPals
|
||||
ld bc, 1 palettes
|
||||
ld a, $5
|
||||
call FarCopyWRAM
|
||||
|
||||
ld hl, Palette8b37
|
||||
ld de, MartPointer
|
||||
ld hl, .OBPal
|
||||
ld de, UnknOBPals
|
||||
ld bc, 1 palettes
|
||||
ld a, $5
|
||||
call FarCopyWRAM
|
||||
@ -163,17 +164,14 @@ Function8b07: ; 8b07
|
||||
ld a, $1
|
||||
ld [hCGBPalUpdate], a
|
||||
ret
|
||||
; 8b2f
|
||||
|
||||
Palette8b2f: ; 8b2f
|
||||
.BGPal
|
||||
RGB 31, 31, 31
|
||||
RGB 18, 23, 31
|
||||
RGB 15, 20, 31
|
||||
RGB 00, 00, 00
|
||||
|
||||
; 8b37
|
||||
|
||||
Palette8b37: ; 8b37
|
||||
.OBPal
|
||||
RGB 31, 31, 31
|
||||
RGB 31, 31, 12
|
||||
RGB 08, 16, 28
|
||||
@ -182,6 +180,7 @@ Palette8b37: ; 8b37
|
||||
; 8b3f
|
||||
|
||||
Function8b3f: ; 8b3f
|
||||
; Unreferenced
|
||||
call CheckCGB
|
||||
ret nz
|
||||
ld a, [hSGB]
|
||||
@ -193,14 +192,14 @@ Function8b3f: ; 8b3f
|
||||
|
||||
Function8b4d: ; 8b4d
|
||||
call CheckCGB
|
||||
jr nz, .asm_8b5c
|
||||
jr nz, .cgb
|
||||
ld a, [hSGB]
|
||||
and a
|
||||
ret z
|
||||
ld hl, PalPacket_9c26
|
||||
jp Function9809
|
||||
|
||||
.asm_8b5c
|
||||
.cgb
|
||||
ld de, UnknOBPals
|
||||
ld a, $3b
|
||||
call GetPredefPal
|
||||
@ -209,14 +208,14 @@ Function8b4d: ; 8b4d
|
||||
|
||||
Function8b67: ; 8b67
|
||||
call CheckCGB
|
||||
jr nz, .asm_8b76
|
||||
jr nz, .cgb
|
||||
ld a, [hSGB]
|
||||
and a
|
||||
ret z
|
||||
ld hl, PalPacket_9c36
|
||||
jp Function9809
|
||||
|
||||
.asm_8b76
|
||||
.cgb
|
||||
ld de, UnknOBPals
|
||||
ld a, $3c
|
||||
call GetPredefPal
|
||||
@ -934,13 +933,13 @@ Function9809: ; 9809
|
||||
push af
|
||||
set 7, a
|
||||
ld [wcfbe], a
|
||||
call Function981a
|
||||
call PushSGBPals
|
||||
pop af
|
||||
ld [wcfbe], a
|
||||
ret
|
||||
; 981a
|
||||
|
||||
Function981a: ; 981a
|
||||
PushSGBPals: ; 981a
|
||||
ld a, [hl]
|
||||
and $7
|
||||
ret z
|
||||
@ -1004,7 +1003,7 @@ Function9853: ; 9853
|
||||
call SGBDelayCycles
|
||||
call Function993f
|
||||
ld hl, PalPacket_9d66
|
||||
call Function981a
|
||||
call PushSGBPals
|
||||
|
||||
.asm_988a
|
||||
pop af
|
||||
@ -1020,50 +1019,49 @@ Function9890:: ; 9890
|
||||
ld a, $1
|
||||
ld [rVBK], a
|
||||
ld hl, VTiles0
|
||||
ld bc, $2000
|
||||
ld bc, $200 tiles
|
||||
xor a
|
||||
call ByteFill
|
||||
ld a, $0
|
||||
ld [rVBK], a
|
||||
ld a, $80
|
||||
ld [rBGPI], a
|
||||
ld c, $20
|
||||
.asm_98ac
|
||||
ld a, $ff
|
||||
ld c, 4 * 8
|
||||
.bgpals_loop
|
||||
ld a, $7fff % $100
|
||||
ld [rBGPD], a
|
||||
ld a, $7f
|
||||
ld a, $7fff / $100
|
||||
ld [rBGPD], a
|
||||
dec c
|
||||
jr nz, .asm_98ac
|
||||
jr nz, .bgpals_loop
|
||||
ld a, $80
|
||||
ld [rOBPI], a
|
||||
ld c, $20
|
||||
.asm_98bd
|
||||
ld a, $ff
|
||||
ld c, 4 * 8
|
||||
.obpals_loop
|
||||
ld a, $7fff % $100
|
||||
ld [rOBPD], a
|
||||
ld a, $7f
|
||||
ld a, $7fff / $100
|
||||
ld [rOBPD], a
|
||||
dec c
|
||||
jr nz, .asm_98bd
|
||||
jr nz, .obpals_loop
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
ld [rSVBK], a
|
||||
ld hl, UnknBGPals
|
||||
call Function98df
|
||||
call .LoadWhitePals
|
||||
ld hl, BGPals
|
||||
call Function98df
|
||||
call .LoadWhitePals
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; 98df
|
||||
|
||||
Function98df: ; 98df
|
||||
ld c, $40
|
||||
.LoadWhitePals
|
||||
ld c, 4 * 16
|
||||
.loop
|
||||
ld a, $ff
|
||||
ld a, $7fff % $100
|
||||
ld [hli], a
|
||||
ld a, $7f
|
||||
ld a, $7fff / $100
|
||||
ld [hli], a
|
||||
dec c
|
||||
jr nz, .loop
|
||||
@ -1071,24 +1069,24 @@ Function98df: ; 98df
|
||||
; 98eb
|
||||
|
||||
Function98eb: ; 98eb
|
||||
ld hl, Unknown_98ff
|
||||
ld c, $9
|
||||
.asm_98f0
|
||||
ld hl, .PalPacketPointerTable
|
||||
ld c, 9
|
||||
.loop
|
||||
push bc
|
||||
ld a, [hli]
|
||||
push hl
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
call Function981a
|
||||
call PushSGBPals
|
||||
pop hl
|
||||
inc hl
|
||||
pop bc
|
||||
dec c
|
||||
jr nz, .asm_98f0
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 98ff
|
||||
|
||||
Unknown_98ff: ; 98ff
|
||||
.PalPacketPointerTable: ; 98ff
|
||||
dw PalPacket_9d56
|
||||
dw PalPacket_9d76
|
||||
dw PalPacket_9d86
|
||||
@ -1105,18 +1103,18 @@ Function9911: ; 9911
|
||||
xor a
|
||||
ld [rJOYP], a
|
||||
ld hl, PalPacket_9d56
|
||||
call Function981a
|
||||
call PushSGBPals
|
||||
call Function992c
|
||||
call SGBDelayCycles
|
||||
call Function993f
|
||||
ld hl, PalPacket_9d66
|
||||
call Function981a
|
||||
call PushSGBPals
|
||||
ei
|
||||
ret
|
||||
; 992c
|
||||
|
||||
Function992c: ; 992c
|
||||
call Function9938
|
||||
call .LoadSGBBorderPointers
|
||||
push de
|
||||
call Function9a24
|
||||
pop hl
|
||||
@ -1124,7 +1122,7 @@ Function992c: ; 992c
|
||||
ret
|
||||
; 9938
|
||||
|
||||
Function9938: ; 9938
|
||||
.LoadSGBBorderPointers: ; 9938
|
||||
ld hl, SGBBorder
|
||||
ld de, SGBBorderMap
|
||||
ret
|
||||
@ -1140,7 +1138,7 @@ Function993f: ; 993f
|
||||
|
||||
Function994a: ; 994a
|
||||
ld hl, PalPacket_9d26
|
||||
call Function981a
|
||||
call PushSGBPals
|
||||
call SGBDelayCycles
|
||||
ld a, [rJOYP]
|
||||
and $3
|
||||
@ -1186,7 +1184,7 @@ endr
|
||||
|
||||
Function99ab: ; 99ab
|
||||
ld hl, PalPacket_9d16
|
||||
call Function981a
|
||||
call PushSGBPals
|
||||
jp SGBDelayCycles
|
||||
; 99b4
|
||||
|
||||
@ -1202,7 +1200,7 @@ Function99b4: ; 99b4
|
||||
ld a, $e3
|
||||
ld [rLCDC], a
|
||||
ld hl, PalPacket_9d06
|
||||
call Function981a
|
||||
call PushSGBPals
|
||||
xor a
|
||||
ld [rBGP], a
|
||||
ret
|
||||
@ -1215,7 +1213,7 @@ Function99d8: ; 99d8
|
||||
ld de, VTiles1
|
||||
ld bc, 20 tiles
|
||||
call CopyData
|
||||
ld b, $12
|
||||
ld b, 18
|
||||
.asm_99ea
|
||||
push bc
|
||||
ld bc, $c
|
||||
@ -1237,7 +1235,7 @@ Function99d8: ; 99d8
|
||||
ld a, $e3
|
||||
ld [rLCDC], a
|
||||
ld hl, PalPacket_9d46
|
||||
call Function981a
|
||||
call PushSGBPals
|
||||
xor a
|
||||
ld [rBGP], a
|
||||
ret
|
||||
@ -1245,15 +1243,15 @@ Function99d8: ; 99d8
|
||||
|
||||
Function9a24: ; 9a24
|
||||
call DisableLCD
|
||||
ld a, $e4
|
||||
ld a, %11100100
|
||||
ld [rBGP], a
|
||||
ld de, VTiles1
|
||||
ld b, $80
|
||||
.asm_9a30
|
||||
push bc
|
||||
ld bc, 2 palettes
|
||||
ld bc, 1 tiles
|
||||
call CopyData
|
||||
ld bc, 2 palettes
|
||||
ld bc, 1 tiles
|
||||
call ClearBytes
|
||||
pop bc
|
||||
dec b
|
||||
@ -1262,7 +1260,7 @@ Function9a24: ; 9a24
|
||||
ld a, $e3
|
||||
ld [rLCDC], a
|
||||
ld hl, PalPacket_9d36
|
||||
call Function981a
|
||||
call PushSGBPals
|
||||
xor a
|
||||
ld [rBGP], a
|
||||
ret
|
||||
@ -1295,7 +1293,7 @@ ClearBytes: ; 0x9a5b
|
||||
DrawDefaultTiles: ; 0x9a64
|
||||
; Draw 240 tiles (2/3 of the screen) from tiles in VRAM
|
||||
hlbgcoord 0, 0 ; BG Map 0
|
||||
ld de, 32 - 20
|
||||
ld de, BG_MAP_WIDTH - SCREEN_WIDTH
|
||||
ld a, $80 ; starting tile
|
||||
ld c, 12 + 1
|
||||
.line
|
||||
|
@ -227,7 +227,7 @@ HandleMapTimeAndJoypad: ; 967c1
|
||||
; 967d1
|
||||
|
||||
Function967d1: ; 967d1
|
||||
callba Function576a ; engine/map_objects.asm
|
||||
callba HandleNPCStep ; engine/map_objects.asm
|
||||
callba _HandlePlayerStep
|
||||
call _CheckObjectEnteringVisibleRange
|
||||
ret
|
||||
|
@ -184,7 +184,7 @@ Gen2ToGen2LinkComms: ; 28177
|
||||
call Function29dba
|
||||
ld a, [ScriptVar]
|
||||
and a
|
||||
jp z, Function283b2
|
||||
jp z, LinkTimeout
|
||||
ld a, [hLinkPlayerNumber]
|
||||
cp $2
|
||||
jr nz, .Player1
|
||||
@ -397,11 +397,11 @@ Gen2ToGen2LinkComms: ; 28177
|
||||
ld de, OTPartyCount
|
||||
ld bc, 8
|
||||
call CopyBytes
|
||||
ld de, wd276
|
||||
ld de, OTPlayerID
|
||||
ld bc, 2
|
||||
call CopyBytes
|
||||
ld de, OTPartyMon1Species
|
||||
ld bc, $1a4
|
||||
ld de, OTPartyMons
|
||||
ld bc, OTPartyDataEnd - OTPartyMons
|
||||
call CopyBytes
|
||||
ld a, OTPartyMonOT % $100
|
||||
ld [wd102], a
|
||||
@ -419,7 +419,7 @@ Gen2ToGen2LinkComms: ; 28177
|
||||
ld a, CAL
|
||||
ld [OtherTrainerClass], a
|
||||
call ClearScreen
|
||||
callba Function4d354
|
||||
callba Link_WaitBGMap
|
||||
ld hl, Options
|
||||
ld a, [hl]
|
||||
push af
|
||||
@ -468,9 +468,9 @@ Gen2ToGen2LinkComms: ; 28177
|
||||
jp InitTradeMenuDisplay
|
||||
; 283b2
|
||||
|
||||
Function283b2: ; 283b2
|
||||
LinkTimeout: ; 283b2
|
||||
ld de, .TooMuchTimeHasElapsed
|
||||
ld b, $a
|
||||
ld b, 10
|
||||
.loop
|
||||
call DelayFrame
|
||||
call LinkDataReceived
|
||||
@ -1379,7 +1379,7 @@ Function28926: ; 28926
|
||||
hlcoord 2, 16
|
||||
ld de, .String_Stats_Trade
|
||||
call PlaceString
|
||||
callba Function4d354
|
||||
callba Link_WaitBGMap
|
||||
|
||||
.joy_loop
|
||||
ld a, " "
|
||||
@ -1485,7 +1485,7 @@ Function28926: ; 28926
|
||||
ld b, 4
|
||||
ld c, 18
|
||||
call Predef_LinkTextbox
|
||||
callba Function4d354
|
||||
callba Link_WaitBGMap
|
||||
ld hl, .Text_CantTradeLastMon
|
||||
bccoord 1, 14
|
||||
call PlaceWholeStringInBoxAtOnce
|
||||
@ -1507,7 +1507,7 @@ Function28926: ; 28926
|
||||
ld b, 4
|
||||
ld c, 18
|
||||
call Predef_LinkTextbox
|
||||
callba Function4d354
|
||||
callba Link_WaitBGMap
|
||||
ld hl, .Text_Abnormal
|
||||
bccoord 1, 14
|
||||
call PlaceWholeStringInBoxAtOnce
|
||||
@ -1663,7 +1663,7 @@ LinkTrade: ; 28b87
|
||||
ld b, $4
|
||||
ld c, $12
|
||||
call Predef_LinkTextbox
|
||||
callba Function4d354
|
||||
callba Link_WaitBGMap
|
||||
ld a, [wd002]
|
||||
ld hl, PartySpecies
|
||||
ld c, a
|
||||
@ -1713,7 +1713,7 @@ LinkTrade: ; 28b87
|
||||
ld a, 1
|
||||
ld [wMenuCursorY], a
|
||||
ld [wMenuCursorX], a
|
||||
callba Function4d354
|
||||
callba Link_WaitBGMap
|
||||
call ScrollingMenuJoypad
|
||||
push af
|
||||
call Call_ExitMenu
|
||||
@ -1935,7 +1935,7 @@ LinkTrade: ; 28b87
|
||||
call ClearScreen
|
||||
call LoadTradeScreenBorder
|
||||
call Function28eff
|
||||
callba Function4d354
|
||||
callba Link_WaitBGMap
|
||||
ld b, $1
|
||||
pop af
|
||||
ld c, a
|
||||
@ -1982,7 +1982,7 @@ LinkTrade: ; 28b87
|
||||
hlcoord 1, 14
|
||||
ld de, String28ebd
|
||||
call PlaceString
|
||||
callba Function4d354
|
||||
callba Link_WaitBGMap
|
||||
ld c, 50
|
||||
call DelayFrames
|
||||
ld a, [wLinkMode]
|
||||
|
@ -2470,9 +2470,9 @@ Function56cd: ; 56cd
|
||||
ret
|
||||
; 576a
|
||||
|
||||
Function576a:: ; 576a
|
||||
HandleNPCStep:: ; 576a
|
||||
call .ResetStepVector
|
||||
call Function5781
|
||||
call .DoStepsForAllObjects
|
||||
ret
|
||||
|
||||
.ResetStepVector
|
||||
@ -2483,9 +2483,8 @@ Function576a:: ; 576a
|
||||
ld a, -1
|
||||
ld [wPlayerStepDirection], a
|
||||
ret
|
||||
; 5781
|
||||
|
||||
Function5781: ; 5781
|
||||
.DoStepsForAllObjects
|
||||
ld bc, ObjectStructs
|
||||
xor a
|
||||
.loop
|
||||
@ -2505,21 +2504,21 @@ Function5781: ; 5781
|
||||
ret
|
||||
; 579d
|
||||
|
||||
Function579d: ; 579d
|
||||
ld a, $3e
|
||||
RefreshPlayerSprite: ; 579d
|
||||
ld a, movement_step_sleep_1
|
||||
ld [wPlayerNextMovement], a
|
||||
ld [wPlayerMovement], a
|
||||
xor a
|
||||
ld [wd04e], a
|
||||
ld [PlayerObjectStepFrame], a
|
||||
call Function57bc
|
||||
call .TryResetPlayerAction
|
||||
callba CheckWarpFacingDown
|
||||
call c, SpawnInFacingDown
|
||||
call SpawnInCustomFacing
|
||||
call .SpawnInCustomFacing
|
||||
ret
|
||||
; 57bc
|
||||
|
||||
Function57bc: ; 57bc
|
||||
.TryResetPlayerAction: ; 57bc
|
||||
ld hl, wPlayerSpriteSetupFlags
|
||||
bit 7, [hl]
|
||||
jr nz, .ok
|
||||
@ -2531,7 +2530,7 @@ Function57bc: ; 57bc
|
||||
ret
|
||||
; 57ca
|
||||
|
||||
SpawnInCustomFacing: ; 57ca
|
||||
.SpawnInCustomFacing: ; 57ca
|
||||
ld hl, wPlayerSpriteSetupFlags
|
||||
bit 5, [hl]
|
||||
ret z
|
||||
|
@ -1,11 +1,11 @@
|
||||
GiveMoney:: ; 15fd7
|
||||
ld a, $3
|
||||
ld a, 3
|
||||
call AddMoney
|
||||
ld bc, MaxMoney
|
||||
ld a, $3
|
||||
ld a, 3
|
||||
call CompareMoney
|
||||
jr z, .asm_15ff5
|
||||
jr c, .asm_15ff5
|
||||
jr z, .not_maxed_out
|
||||
jr c, .not_maxed_out
|
||||
ld hl, MaxMoney
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
@ -18,7 +18,7 @@ GiveMoney:: ; 15fd7
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_15ff5
|
||||
.not_maxed_out
|
||||
and a
|
||||
ret
|
||||
; 15ff7
|
||||
@ -31,7 +31,8 @@ MaxMoney: ; 15ff7
|
||||
TakeMoney:: ; 15ffa
|
||||
ld a, 3
|
||||
call SubtractMoney
|
||||
jr nc, .asm_16009
|
||||
jr nc, .okay
|
||||
; leave with 0 money
|
||||
xor a
|
||||
ld [de], a
|
||||
inc de
|
||||
@ -41,20 +42,23 @@ TakeMoney:: ; 15ffa
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_16009
|
||||
.okay
|
||||
and a
|
||||
ret
|
||||
; 1600b
|
||||
|
||||
CompareMoney:: ; 1600b
|
||||
ld a, $3
|
||||
ld a, 3
|
||||
CompareFunds: ; 1600d
|
||||
; a: number of bytes
|
||||
; bc: start addr of amount (big-endian)
|
||||
; de: start addr of account (big-endian)
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
ld h, b
|
||||
ld l, c
|
||||
ld c, $0
|
||||
ld c, 0
|
||||
ld b, a
|
||||
.loop1
|
||||
dec a
|
||||
@ -82,10 +86,9 @@ CompareFunds: ; 1600d
|
||||
jr .skip_carry
|
||||
|
||||
.set_carry
|
||||
ld a, $1
|
||||
ld a, TRUE
|
||||
and a
|
||||
scf
|
||||
|
||||
.skip_carry
|
||||
pop bc
|
||||
pop de
|
||||
@ -96,6 +99,9 @@ CompareFunds: ; 1600d
|
||||
SubtractMoney: ; 16035
|
||||
ld a, 3
|
||||
SubtractFunds: ; 16037
|
||||
; a: number of bytes
|
||||
; bc: start addr of amount (big-endian)
|
||||
; de: start addr of account (big-endian)
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@ -127,11 +133,15 @@ SubtractFunds: ; 16037
|
||||
; 16053
|
||||
|
||||
AddMoney: ; 16053
|
||||
ld a, $3
|
||||
ld a, 3
|
||||
AddFunds: ; 16055
|
||||
; a: number of bytes
|
||||
; bc: start addr of amount (big-endian)
|
||||
; de: start addr of account (big-endian)
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
|
||||
ld h, b
|
||||
ld l, c
|
||||
ld b, a
|
||||
@ -152,6 +162,7 @@ AddFunds: ; 16055
|
||||
dec hl
|
||||
dec b
|
||||
jr nz, .loop2
|
||||
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
@ -189,7 +200,8 @@ TakeCoins:: ; 1608f
|
||||
ld a, 2
|
||||
ld de, Coins
|
||||
call SubtractFunds
|
||||
jr nc, .asm_1609f
|
||||
jr nc, .okay
|
||||
; leave with 0 coins
|
||||
xor a
|
||||
ld [de], a
|
||||
inc de
|
||||
@ -197,13 +209,13 @@ TakeCoins:: ; 1608f
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_1609f
|
||||
.okay
|
||||
and a
|
||||
ret
|
||||
; 160a1
|
||||
|
||||
CheckCoins:: ; 160a1
|
||||
ld a, $2
|
||||
ld a, 2
|
||||
ld de, Coins
|
||||
jp CompareFunds
|
||||
; 160a9
|
||||
|
@ -1428,7 +1428,7 @@ CalcPkmnStatC: ; e17b
|
||||
sla c
|
||||
ld a, d
|
||||
and a
|
||||
jr z, .SkipSqrt
|
||||
jr z, .no_stat_exp
|
||||
add hl, bc
|
||||
push de
|
||||
ld a, [hld]
|
||||
@ -1437,7 +1437,7 @@ CalcPkmnStatC: ; e17b
|
||||
callba GetSquareRoot
|
||||
pop de
|
||||
|
||||
.SkipSqrt
|
||||
.no_stat_exp
|
||||
srl c
|
||||
pop hl
|
||||
push bc
|
||||
|
@ -3,7 +3,7 @@ SelectMonFromParty: ; 50000
|
||||
xor a
|
||||
ld [PartyMenuActionText], a
|
||||
call ClearBGPalettes
|
||||
call Function5003f
|
||||
call InitPartyMenuLayout
|
||||
call WaitBGMap
|
||||
call SetPalettes
|
||||
call DelayFrame
|
||||
@ -18,7 +18,7 @@ SelectTradeOrDaycareMon: ; 5001d
|
||||
ld [PartyMenuActionText], a
|
||||
call DisableSpriteUpdates
|
||||
call ClearBGPalettes
|
||||
call Function5003f
|
||||
call InitPartyMenuLayout
|
||||
call WaitBGMap
|
||||
ld b, SCGB_0A
|
||||
call GetSGBLayout
|
||||
@ -29,7 +29,7 @@ SelectTradeOrDaycareMon: ; 5001d
|
||||
ret
|
||||
; 5003f
|
||||
|
||||
Function5003f: ; 5003f
|
||||
InitPartyMenuLayout: ; 5003f
|
||||
call LoadPartyMenuGFX
|
||||
call InitPartyMenuWithCancel
|
||||
call InitPartyMenuGFX
|
||||
@ -40,7 +40,7 @@ Function5003f: ; 5003f
|
||||
|
||||
LoadPartyMenuGFX: ; 5004f
|
||||
call LoadFontsBattleExtra
|
||||
callab Function8ad1 ; engine/color.asm
|
||||
callab InitPartyMenuPalettes ; engine/color.asm
|
||||
callab ClearSpriteAnims2
|
||||
ret
|
||||
; 5005f
|
||||
|
@ -3049,10 +3049,7 @@ Script_loadbytec2cf: ; 97b27
|
||||
ret
|
||||
; 97b2e
|
||||
|
||||
|
||||
CloseTextScript: ; 97b2e
|
||||
closetext
|
||||
; 97b2f
|
||||
ld c, c ; XXX
|
||||
|
||||
Script_closetext: ; 97b2f
|
||||
; script command 0x49
|
||||
|
@ -9,7 +9,7 @@ REEL_SIZE EQU 15
|
||||
|
||||
_SlotMachine:
|
||||
ld hl, Options
|
||||
set 4, [hl]
|
||||
set NO_TEXT_SCROLL, [hl]
|
||||
call .InitGFX
|
||||
call DelayFrame
|
||||
.loop
|
||||
@ -22,7 +22,7 @@ _SlotMachine:
|
||||
call ClearBGPalettes
|
||||
callba MobileFn_105fd0
|
||||
ld hl, Options
|
||||
res 4, [hl]
|
||||
res NO_TEXT_SCROLL, [hl]
|
||||
ld hl, rLCDC ; $ff40
|
||||
res 2, [hl]
|
||||
ret
|
||||
|
@ -1,8 +1,6 @@
|
||||
|
||||
SpawnPoints: ; 0x152ab
|
||||
|
||||
const_def
|
||||
|
||||
spawn: MACRO
|
||||
; map, y, x
|
||||
map \1
|
||||
|
@ -319,7 +319,7 @@ RefreshMapSprites: ; 1047f0
|
||||
call ClearSprites
|
||||
callba ReturnFromMapSetupScript
|
||||
call GetMovementPermissions
|
||||
callba Function579d
|
||||
callba RefreshPlayerSprite
|
||||
callba CheckReplaceKrisSprite
|
||||
ld hl, wPlayerSpriteSetupFlags
|
||||
bit 6, [hl]
|
||||
|
@ -494,6 +494,7 @@ CopyCurrMapDE: ; 2a27f
|
||||
; 2a288
|
||||
|
||||
LookUpWildmonsForMapDE: ; 2a288
|
||||
.loop
|
||||
push hl
|
||||
ld a, [hl]
|
||||
inc a
|
||||
@ -509,7 +510,7 @@ LookUpWildmonsForMapDE: ; 2a288
|
||||
.next
|
||||
pop hl
|
||||
add hl, bc
|
||||
jr LookUpWildmonsForMapDE
|
||||
jr .loop
|
||||
|
||||
.nope
|
||||
pop hl
|
||||
@ -896,7 +897,7 @@ endr
|
||||
ld a, c
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetPokemonName
|
||||
ld hl, UnknownText_0x2a51a
|
||||
ld hl, .SawRareMonText
|
||||
call PrintText
|
||||
xor a
|
||||
ld [ScriptVar], a
|
||||
@ -906,9 +907,8 @@ endr
|
||||
ld a, $1
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
; 2a51a
|
||||
|
||||
UnknownText_0x2a51a: ; 0x2a51a
|
||||
.SawRareMonText
|
||||
; I just saw some rare @ in @ . I'll call you if I see another rare #MON, OK?
|
||||
text_jump UnknownText_0x1bd34b
|
||||
db "@"
|
||||
|
@ -94,7 +94,6 @@ callasm: macro
|
||||
dba \1
|
||||
endm
|
||||
|
||||
|
||||
enum special_command
|
||||
special: macro
|
||||
db special_command
|
||||
@ -106,7 +105,6 @@ add_special: MACRO
|
||||
dba \1
|
||||
ENDM
|
||||
|
||||
|
||||
enum ptcallasm_command
|
||||
ptcallasm: macro
|
||||
db ptcallasm_command
|
||||
|
28
main.asm
28
main.asm
@ -6749,13 +6749,20 @@ GivePokerusAndConvertBerries: ; 2ed44
|
||||
ld a, [PartyCount]
|
||||
ld b, a
|
||||
ld de, PARTYMON_STRUCT_LENGTH
|
||||
; Check to see if any of your Pokemon already has Pokerus.
|
||||
; If so, sample its spread through your party.
|
||||
; This means that you cannot get Pokerus de novo while
|
||||
; a party member has an active infection.
|
||||
.loopMons
|
||||
ld a, [hl]
|
||||
and $f
|
||||
jr nz, .monHasActivePokerus
|
||||
jr nz, .TrySpreadPokerus
|
||||
add hl, de
|
||||
dec b
|
||||
jr nz, .loopMons
|
||||
|
||||
; If we haven't been to Goldenrod City at least once,
|
||||
; prevent the contraction of Pokerus.
|
||||
ld hl, StatusFlags2
|
||||
bit 6, [hl]
|
||||
ret z
|
||||
@ -6778,7 +6785,7 @@ GivePokerusAndConvertBerries: ; 2ed44
|
||||
ld a, [hl]
|
||||
and $f0
|
||||
ret nz ; if it already has pokerus, do nothing
|
||||
.randomPokerusLoop
|
||||
.randomPokerusLoop ; Simultaneously sample the strain and duration
|
||||
call Random
|
||||
and a
|
||||
jr z, .randomPokerusLoop
|
||||
@ -6789,7 +6796,7 @@ GivePokerusAndConvertBerries: ; 2ed44
|
||||
and $7
|
||||
inc a
|
||||
.load_pkrs
|
||||
ld b, a
|
||||
ld b, a ; this should come before the label
|
||||
swap b
|
||||
and $3
|
||||
inc a
|
||||
@ -6797,19 +6804,22 @@ GivePokerusAndConvertBerries: ; 2ed44
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.monHasActivePokerus
|
||||
.TrySpreadPokerus
|
||||
call Random
|
||||
cp 1 + 33 percent
|
||||
ret nc ; 1/3 chance
|
||||
|
||||
ld a, [PartyCount]
|
||||
cp 1
|
||||
ret z ; only one mon, nothing to do
|
||||
|
||||
ld c, [hl]
|
||||
ld a, b
|
||||
cp $2
|
||||
cp 2
|
||||
jr c, .checkPreviousMonsLoop ; no more mons after this one, go backwards
|
||||
|
||||
call Random
|
||||
cp $80
|
||||
cp 1 + 50 percent
|
||||
jr c, .checkPreviousMonsLoop ; 1/2 chance, go backwards
|
||||
.checkFollowingMonsLoop
|
||||
add hl, de
|
||||
@ -6821,7 +6831,7 @@ GivePokerusAndConvertBerries: ; 2ed44
|
||||
ret z ; if mon has cured pokerus, stop searching
|
||||
dec b ; go on to next mon
|
||||
ld a, b
|
||||
cp $1
|
||||
cp 1
|
||||
jr nz, .checkFollowingMonsLoop ; no more mons left
|
||||
ret
|
||||
|
||||
@ -8188,14 +8198,14 @@ LinkMonStatsScreen: ; 4d319
|
||||
call ClearBGPalettes
|
||||
call MaxVolume
|
||||
callba LoadTradeScreenBorder
|
||||
callba Function4d354
|
||||
callba Link_WaitBGMap
|
||||
callba InitTradeSpeciesList
|
||||
callba Function28eff
|
||||
call WaitBGMap2
|
||||
ret
|
||||
; 4d354
|
||||
|
||||
Function4d354: ; 4d354
|
||||
Link_WaitBGMap: ; 4d354
|
||||
call WaitBGMap
|
||||
call WaitBGMap2
|
||||
ret
|
||||
|
@ -1570,7 +1570,7 @@ Function1009ae: ; 1009ae
|
||||
inc de
|
||||
dec c
|
||||
jr nz, .loop_col
|
||||
ld bc, 12
|
||||
ld bc, BG_MAP_WIDTH - SCREEN_WIDTH
|
||||
add hl, bc
|
||||
pop bc
|
||||
dec b
|
||||
@ -1609,7 +1609,7 @@ Function1009f3: ; 1009f3
|
||||
ld a, [hJoyDown]
|
||||
and SELECT + A_BUTTON
|
||||
cp SELECT + A_BUTTON
|
||||
jr nz, .asm_100a07
|
||||
jr nz, .select_a
|
||||
ld hl, wcd2a
|
||||
set 4, [hl]
|
||||
ld a, $f8
|
||||
@ -1617,7 +1617,7 @@ Function1009f3: ; 1009f3
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_100a07
|
||||
.select_a
|
||||
xor a
|
||||
ret
|
||||
; 100a09
|
||||
@ -1630,13 +1630,13 @@ _LinkBattleSendReceiveAction: ; 100a09
|
||||
cp LINK_MOBILE
|
||||
jr nz, .not_mobile
|
||||
|
||||
call Function100a87
|
||||
call .MobileBattle_SendReceiveAction
|
||||
call Function100da5
|
||||
callba FinishBattleAnim
|
||||
jr .done
|
||||
|
||||
.not_mobile
|
||||
call Function100a53
|
||||
call .LinkBattle_SendReceiveAction
|
||||
|
||||
.done
|
||||
ret
|
||||
@ -1669,7 +1669,7 @@ _LinkBattleSendReceiveAction: ; 100a09
|
||||
ret
|
||||
; 100a53
|
||||
|
||||
Function100a53: ; 100a53
|
||||
.LinkBattle_SendReceiveAction: ; 100a53
|
||||
ld a, [wd431]
|
||||
ld [wPlayerLinkAction], a
|
||||
ld a, $ff
|
||||
@ -1700,7 +1700,7 @@ Function100a53: ; 100a53
|
||||
ret
|
||||
; 100a87
|
||||
|
||||
Function100a87: ; 100a87
|
||||
.MobileBattle_SendReceiveAction: ; 100a87
|
||||
call Function100acf
|
||||
call Function100641
|
||||
ld a, 0
|
||||
@ -2100,7 +2100,7 @@ MobileBattleMonMenu: ; 100d22
|
||||
; 100d67
|
||||
|
||||
Function100d67: ; 100d67
|
||||
ld hl, MenuDataHeader_100d88
|
||||
ld hl, .MenuDataHeader
|
||||
call CopyMenuDataHeader
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
@ -2115,19 +2115,19 @@ Function100d67: ; 100d67
|
||||
ret
|
||||
; 100d88
|
||||
|
||||
MenuDataHeader_100d88: ; 100d88
|
||||
.MenuDataHeader: ; 100d88
|
||||
db 0 ; flags
|
||||
db 11, 11 ; start coords
|
||||
db 17, 19 ; end coords
|
||||
dw MenuData2_100d90
|
||||
dw .MenuData2
|
||||
db 1 ; default option
|
||||
|
||||
MenuData2_100d90: ; 100d90
|
||||
.MenuData2: ; 100d90
|
||||
db $c0 ; flags
|
||||
db 3
|
||||
db "いれかえる@"
|
||||
db "つよさをみる@"
|
||||
db "キャンセル@"
|
||||
db "いれかえる@" ; TRADE
|
||||
db "つよさをみる@" ; STATS
|
||||
db "キャンセル@" ; CANCEL
|
||||
; 100da5
|
||||
|
||||
Function100da5: ; 100da5
|
||||
|
@ -333,7 +333,7 @@ endr
|
||||
Battle_GetTrainerName:: ; 39939
|
||||
ld a, [InBattleTowerBattle]
|
||||
bit 0, a
|
||||
ld hl, wd26b
|
||||
ld hl, OTPlayerName
|
||||
jp nz, CopyTrainerName
|
||||
|
||||
ld a, [OtherTrainerID]
|
||||
|
32
wram.asm
32
wram.asm
@ -2072,7 +2072,7 @@ wd10b:: ds 1
|
||||
wItemQuantityChangeBuffer:: ds 1
|
||||
wItemQuantityBuffer:: ds 1
|
||||
|
||||
TempMon::
|
||||
TempMon:: ; d10e
|
||||
party_struct TempMon
|
||||
|
||||
wSpriteFlags:: ds 1
|
||||
@ -2398,11 +2398,11 @@ CurDamage:: ; d256
|
||||
ds 2
|
||||
|
||||
ds 2
|
||||
wMornEncounterRate:: ds 1
|
||||
wDayEncounterRate:: ds 1
|
||||
wNiteEncounterRate:: ds 1
|
||||
wWaterEncounterRate:: ds 1
|
||||
wListMoves_MoveIndicesBuffer:: ds 4
|
||||
wMornEncounterRate:: ds 1 ; d25a
|
||||
wDayEncounterRate:: ds 1 ; d25b
|
||||
wNiteEncounterRate:: ds 1 ; d25c
|
||||
wWaterEncounterRate:: ds 1 ; d25d
|
||||
wListMoves_MoveIndicesBuffer:: ds NUM_MOVES
|
||||
wPutativeTMHMMove:: ds 1
|
||||
wd263:: ds 1
|
||||
wd264:: ds 1
|
||||
@ -2428,7 +2428,6 @@ wPokedexShowPointerBank::
|
||||
wd26d:: ds 1
|
||||
ds 3
|
||||
wd271:: ds 5
|
||||
wd276:: ds 10
|
||||
ds wd26b - @
|
||||
|
||||
|
||||
@ -2466,7 +2465,7 @@ OTPartyMonsEnd::
|
||||
|
||||
OTPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d3a8
|
||||
OTPartyMonNicknames:: ds PKMN_NAME_LENGTH * PARTY_LENGTH ; d3ea
|
||||
|
||||
OTPartyDataEnd::
|
||||
ds 4
|
||||
|
||||
wd430::
|
||||
@ -2523,6 +2522,9 @@ wd454:: ds 1
|
||||
|
||||
wBattleScriptFlags:: ds 2
|
||||
wPlayerSpriteSetupFlags:: ds 1
|
||||
; bit 7: if set, cancel PlayerAction
|
||||
; bit 5: if set, set facing according to bits 0-1
|
||||
; bits 0-1: direction facing
|
||||
wMapReentryScriptQueueFlag:: ds 1 ; MemScriptFlag
|
||||
wMapReentryScriptBank:: ds 1 ; MemScriptBank
|
||||
wMapReentryScriptAddress:: ds 2 ; MemScriptAddr
|
||||
@ -2946,6 +2948,7 @@ wCelebiEvent:: ds 1
|
||||
ds 1
|
||||
|
||||
BikeFlags:: ; dbf5
|
||||
; bit 0: using strength
|
||||
; bit 1: always on bike
|
||||
; bit 2: downhill
|
||||
ds 1
|
||||
@ -3287,7 +3290,8 @@ w3_d742:: battle_tower_struct w3_d742
|
||||
ds -$22
|
||||
|
||||
wBTChoiceOfLvlGroup::
|
||||
w3_d800:: ds $69
|
||||
w3_d800:: ; ds BG_MAP_WIDTH * SCREEN_HEIGHT ($240)
|
||||
ds $69
|
||||
w3_d869:: ds $17
|
||||
w3_d880:: ds 1
|
||||
w3_d881:: ds 1
|
||||
@ -3300,10 +3304,12 @@ w3_d895:: ds 11
|
||||
w3_d8a0:: ds 1
|
||||
w3_d8a1:: ds 1
|
||||
w3_d8a2:: ds 1
|
||||
w3_d8a3:: ds 1
|
||||
ds $35c
|
||||
w3_dc00:: ds $168
|
||||
w3_dd68:: ds $284
|
||||
w3_d8a3:: ds $19d
|
||||
w3_da40:: ds $1c0
|
||||
|
||||
w3_dc00:: ds SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
w3_dd68:: ds SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
ds $11c
|
||||
w3_dfec:: ds $10
|
||||
w3_dffc:: ds 4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user