mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Annotation of PrintNum arguments in bc, and radio functions
This commit is contained in:
parent
b68913a782
commit
d42330ed8b
@ -5966,7 +5966,7 @@ Function3e75f: ; 3e75f
|
||||
.ok
|
||||
push hl
|
||||
ld de, StringBuffer1
|
||||
ld bc, $0102
|
||||
lb bc, 1, 2
|
||||
call PrintNum
|
||||
pop hl
|
||||
rept 2
|
||||
@ -5974,8 +5974,8 @@ rept 2
|
||||
endr
|
||||
ld [hl], "/"
|
||||
inc hl
|
||||
ld de, wd265
|
||||
ld bc, $0102
|
||||
ld de, wNamedObjectIndexBuffer
|
||||
lb bc, 1, 2
|
||||
call PrintNum
|
||||
ret
|
||||
; 3e786
|
||||
@ -8892,20 +8892,20 @@ Function3f85f: ; 3f85f
|
||||
add hl, de
|
||||
push hl
|
||||
ld de, wd00d
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
pop hl
|
||||
ld de, $0005
|
||||
add hl, de
|
||||
push hl
|
||||
ld de, wd00f
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
pop hl
|
||||
ld de, $0005
|
||||
add hl, de
|
||||
ld de, wd011
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
jr .asm_3f8cf
|
||||
|
||||
@ -8945,21 +8945,21 @@ Function3f85f: ; 3f85f
|
||||
call .asm_3f92b
|
||||
jr c, .asm_3f92a
|
||||
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
|
||||
hlcoord 11, 4
|
||||
ld de, sLinkBattleLosses
|
||||
call .asm_3f92b
|
||||
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
|
||||
hlcoord 16, 4
|
||||
ld de, sLinkBattleDraws
|
||||
call .asm_3f92b
|
||||
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
|
||||
.asm_3f92a
|
||||
|
@ -116,3 +116,6 @@ BATTLETOWER_NROFTRAINERS EQU 7
|
||||
NUM_WILDMONS_PER_AREA_TIME_OF_DAY EQU 7
|
||||
WILDMON_GRASS_STRUCTURE_LENGTH EQU 2 + 3 * (1 + 2 * NUM_WILDMONS_PER_AREA_TIME_OF_DAY)
|
||||
|
||||
PRINTNUM_MONEY EQU %00100000
|
||||
PRINTNUM_RIGHTALIGN EQU %01000000
|
||||
PRINTNUM_LEADINGZEROS EQU %10000000
|
||||
|
@ -70,12 +70,12 @@ Function1dd7ae: ; 1dd7ae
|
||||
call PlaceString
|
||||
hlcoord 12, 15
|
||||
ld de, GameTimeHours
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
ld [hl], $67
|
||||
inc hl
|
||||
ld de, GameTimeMinutes
|
||||
ld bc, $8102
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||
call PrintNum
|
||||
ret
|
||||
; 1dd7f0
|
||||
|
@ -97,7 +97,7 @@
|
||||
dwb VisitedSpawns + 3, %00000100 ; silver cave
|
||||
dwb VisitedSpawns + 3, %00010000 ; unused
|
||||
|
||||
dwb wdc9d, %00000001 ; lucky number show
|
||||
dwb wLuckyNumberShowFlag, %00000001 ; lucky number show
|
||||
dwb StatusFlags2, %00001000
|
||||
|
||||
dwb DailyFlags, %00000001 ; kurt making balls ; $50
|
||||
|
@ -1541,7 +1541,7 @@ Function40b6a: ; 40b6a (10:4b6a)
|
||||
ld de, -20
|
||||
add hl, de
|
||||
ld de, wd265
|
||||
ld bc, $8103
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||
call PrintNum
|
||||
pop hl
|
||||
ret
|
||||
|
@ -147,12 +147,12 @@ PrintRadioLine: ; b86ea (2e:46ea)
|
||||
.skip
|
||||
ld a, RADIO_SCROLL
|
||||
ld [wd002], a
|
||||
ld a, $64
|
||||
ld a, 100
|
||||
ld [wd004], a
|
||||
ret
|
||||
; b8718 (2e:4718)
|
||||
|
||||
Functionb8718: ; b8718
|
||||
ReplacePeriodsWithSpaces: ; b8718
|
||||
push hl
|
||||
ld b, SCREEN_WIDTH * 2
|
||||
.loop
|
||||
@ -379,7 +379,7 @@ OaksPkmnTalk8: ; b8854 (2e:4854)
|
||||
and $f
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .descriptors
|
||||
ld hl, .Descriptors
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@ -390,7 +390,7 @@ endr
|
||||
jp NextRadioLine
|
||||
; b8869 (2e:4869)
|
||||
|
||||
.descriptors: ; b8869
|
||||
.Descriptors: ; b8869
|
||||
dw .sweetadorably
|
||||
dw .wigglyslickly
|
||||
dw .aptlynamed
|
||||
@ -510,7 +510,7 @@ OaksPkmnTalk9: ; b88d9 (2e:48d9)
|
||||
and $f
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .descriptors
|
||||
ld hl, .Descriptors
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@ -529,7 +529,7 @@ endr
|
||||
jp NextRadioLine
|
||||
; b88fe (2e:48fe)
|
||||
|
||||
.descriptors: ; b88fe
|
||||
.Descriptors: ; b88fe
|
||||
dw .cute
|
||||
dw .weird
|
||||
dw .pleasant
|
||||
@ -653,7 +653,7 @@ OaksPkmnTalk10: ; b896e (2e:496e)
|
||||
call PrintText
|
||||
ld a, OAKS_POKEMON_TALK_11
|
||||
ld [wd002], a
|
||||
ld a, $64
|
||||
ld a, 100
|
||||
ld [wd004], a
|
||||
ret
|
||||
; b898e (2e:498e)
|
||||
@ -1058,10 +1058,10 @@ UnknownText_0xb8bd7: ; 0xb8bd7
|
||||
|
||||
LuckyNumberShow1: ; b8bdc (2e:4bdc)
|
||||
call StartRadioStation
|
||||
callab Functionc434
|
||||
jr nc, .asm_b8bed
|
||||
callab Functionc422
|
||||
.asm_b8bed
|
||||
callab Special_CheckLuckyNumberShowFlag
|
||||
jr nc, .dontreset
|
||||
callab Special_ResetLuckyNumberShowFlag
|
||||
.dontreset
|
||||
ld hl, UnknownText_0xb8c7e
|
||||
ld a, LUCKY_NUMBER_SHOW_2
|
||||
jp NextRadioLine
|
||||
@ -1098,8 +1098,8 @@ LuckyNumberShow7: ; b8c1d (2e:4c1d)
|
||||
|
||||
LuckyNumberShow8: ; b8c25 (2e:4c25)
|
||||
ld hl, StringBuffer1
|
||||
ld de, wdc9f
|
||||
ld bc, $8205
|
||||
ld de, wLuckyIDNumber
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
||||
call PrintNum
|
||||
ld a, "@"
|
||||
ld [StringBuffer1 + 5], a
|
||||
@ -1275,7 +1275,7 @@ PeoplePlaces4: ; People
|
||||
push af
|
||||
ld hl, .E4Names
|
||||
ld a, [StatusFlags]
|
||||
bit 6, a
|
||||
bit 6, a ; ENGINE_CREDITS_SKIP
|
||||
jr z, .ok
|
||||
ld hl, .KantoLeaderNames
|
||||
ld a, [KantoBadges]
|
||||
@ -1498,7 +1498,7 @@ PeoplePlaces7: ; b8e28 (2e:4e28)
|
||||
and $f
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .descriptors
|
||||
ld hl, .Descriptors
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@ -1519,7 +1519,7 @@ endr
|
||||
jp PrintRadioLine
|
||||
; b8e52 (2e:4e52)
|
||||
|
||||
.descriptors: ; b8e52
|
||||
.Descriptors: ; b8e52
|
||||
dw PnP_cute
|
||||
dw PnP_lazy
|
||||
dw PnP_happy
|
||||
|
@ -2232,7 +2232,7 @@ Script_readmoney: ; 0x97732
|
||||
call ResetStringBuffer1
|
||||
call GetMoneyAccount
|
||||
ld hl, StringBuffer1
|
||||
ld bc, $4306
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 3, 6
|
||||
call PrintNum
|
||||
ld de, StringBuffer1
|
||||
jp ConvertMemToText
|
||||
@ -2246,7 +2246,7 @@ Script_readcoins: ; 0x97747
|
||||
call ResetStringBuffer1
|
||||
ld hl, StringBuffer1
|
||||
ld de, Coins
|
||||
ld bc, $4206
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 2, 6
|
||||
call PrintNum
|
||||
ld de, StringBuffer1
|
||||
jp ConvertMemToText
|
||||
@ -2260,7 +2260,7 @@ Script_RAM2MEM: ; 0x9775c
|
||||
call ResetStringBuffer1
|
||||
ld de, ScriptVar
|
||||
ld hl, StringBuffer1
|
||||
ld bc, $4103
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 1, 3
|
||||
call PrintNum
|
||||
ld de, StringBuffer1
|
||||
jp ConvertMemToText
|
||||
|
@ -102,9 +102,9 @@ SpecialsPointers:: ; c029
|
||||
add_special Function24b25
|
||||
add_special Function24b4e
|
||||
add_special Function24ae8
|
||||
add_special Function4d87a
|
||||
add_special Functionc434
|
||||
add_special Functionc422
|
||||
add_special Special_CheckForLuckyNumberWinners
|
||||
add_special Special_CheckLuckyNumberShowFlag
|
||||
add_special Special_ResetLuckyNumberShowFlag
|
||||
add_special Function4d9d3
|
||||
add_special Function88018
|
||||
add_special SpecialNameRater
|
||||
@ -522,15 +522,15 @@ SpecialCheckPokerus: ; c419
|
||||
jp ScriptReturnCarry
|
||||
; c422
|
||||
|
||||
Functionc422: ; c422
|
||||
Special_ResetLuckyNumberShowFlag: ; c422
|
||||
callba Function1152b
|
||||
ld hl, wdc9d
|
||||
ld hl, wLuckyNumberShowFlag
|
||||
res 0, [hl]
|
||||
callba Function5d33
|
||||
callba LoadOrRegenerateLuckyIDNumber
|
||||
ret
|
||||
; c434
|
||||
|
||||
Functionc434: ; c434
|
||||
Special_CheckLuckyNumberShowFlag: ; c434
|
||||
callba Function11542
|
||||
jp ScriptReturnCarry
|
||||
; c43d
|
||||
|
@ -5,7 +5,7 @@ Function113d6: ; 113d6
|
||||
|
||||
Function113da: ; 113da
|
||||
xor a
|
||||
ld [wdc2d], a
|
||||
ld [wLuckyNumberDayBuffer], a
|
||||
ld [wdc3a], a
|
||||
ld [wdc1c], a
|
||||
ret
|
||||
@ -242,28 +242,28 @@ Function11522: ; 11522
|
||||
; 1152b
|
||||
|
||||
Function1152b: ; 1152b
|
||||
call Function11534
|
||||
ld hl, wdc2d
|
||||
call .GetDaysUntilNextFriday
|
||||
ld hl, wLuckyNumberDayBuffer
|
||||
jp Function11415
|
||||
; 11534
|
||||
|
||||
Function11534: ; 11534
|
||||
.GetDaysUntilNextFriday: ; 11534
|
||||
call GetWeekday
|
||||
ld c, a
|
||||
ld a, $5
|
||||
ld a, FRIDAY
|
||||
sub c
|
||||
jr z, .asm_1153f
|
||||
jr nc, .asm_11541
|
||||
jr z, .friday_saturday
|
||||
jr nc, .earlier ; should've done "ret nc"
|
||||
|
||||
.asm_1153f
|
||||
add $7
|
||||
.friday_saturday
|
||||
add 7
|
||||
|
||||
.asm_11541
|
||||
.earlier
|
||||
ret
|
||||
; 11542
|
||||
|
||||
Function11542: ; 11542
|
||||
ld hl, wdc2d
|
||||
ld hl, wLuckyNumberDayBuffer
|
||||
jp Function11420
|
||||
; 11548
|
||||
|
||||
|
@ -166,7 +166,7 @@ GetCaughtLevel: ; 4f18c
|
||||
ld [wd038 + 2], a
|
||||
ld hl, wd036
|
||||
ld de, wd038 + 2
|
||||
ld bc, $4103
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 1, 3
|
||||
call PrintNum
|
||||
ret
|
||||
|
||||
|
7
hram.asm
7
hram.asm
@ -44,6 +44,13 @@ hMultiplicand EQU $ffb4 ; 3 bytes long
|
||||
hMultiplier EQU $ffb7 ; 1 byte long
|
||||
hProduct EQU $ffb3 ; result (4 bytes long)
|
||||
|
||||
hPrintNum1 EQU $ffb3
|
||||
hPrintNum2 EQU $ffb4
|
||||
hPrintNum3 EQU $ffb5
|
||||
hPrintNum4 EQU $ffb6
|
||||
hPrintNum5 EQU $ffb7
|
||||
hPrintNum6 EQU $ffb8
|
||||
hPrintNum7 EQU $ffb9
|
||||
hMathBuffer EQU $ffb8
|
||||
|
||||
hMoneyTemp EQU $ffc3
|
||||
|
@ -26,10 +26,10 @@ GentlemanScript_0x5cd3d:
|
||||
loadfont
|
||||
writetext UnknownText_0x5ceba
|
||||
keeptextopen
|
||||
special Functionc434
|
||||
iffalse UnknownScript_0x5cd4c
|
||||
special Functionc422
|
||||
UnknownScript_0x5cd4c:
|
||||
special Special_CheckLuckyNumberShowFlag
|
||||
iffalse .skip
|
||||
special Special_ResetLuckyNumberShowFlag
|
||||
.skip:
|
||||
special Function4d9d3
|
||||
checkflag ENGINE_LUCKY_NUMBER_SHOW
|
||||
iftrue .GameOver
|
||||
@ -45,7 +45,7 @@ UnknownScript_0x5cd4c:
|
||||
playsound SFX_DEX_FANFARE_20_49
|
||||
waitbutton
|
||||
keeptextopen
|
||||
special Function4d87a
|
||||
special Special_CheckForLuckyNumberWinners
|
||||
loadmovesprites
|
||||
applymovement $6, MovementData_0x5ce74
|
||||
loadfont
|
||||
@ -66,7 +66,7 @@ UnknownScript_0x5cd4c:
|
||||
waitbutton
|
||||
keeptextopen
|
||||
giveitem MASTER_BALL, 1
|
||||
iffalse UnknownScript_0x5cdcf
|
||||
iffalse .BagFull
|
||||
itemnotify
|
||||
setflag ENGINE_LUCKY_NUMBER_SHOW
|
||||
jump .GameOver
|
||||
@ -77,7 +77,7 @@ UnknownScript_0x5cd4c:
|
||||
waitbutton
|
||||
keeptextopen
|
||||
giveitem EXP_SHARE, 1
|
||||
iffalse UnknownScript_0x5cdcf
|
||||
iffalse .BagFull
|
||||
itemnotify
|
||||
setflag ENGINE_LUCKY_NUMBER_SHOW
|
||||
jump .GameOver
|
||||
@ -88,7 +88,7 @@ UnknownScript_0x5cd4c:
|
||||
waitbutton
|
||||
keeptextopen
|
||||
giveitem PP_UP, 1
|
||||
iffalse UnknownScript_0x5cdcf
|
||||
iffalse .BagFull
|
||||
itemnotify
|
||||
setflag ENGINE_LUCKY_NUMBER_SHOW
|
||||
jump .GameOver
|
||||
@ -99,7 +99,7 @@ UnknownScript_0x5cd4c:
|
||||
loadmovesprites
|
||||
end
|
||||
|
||||
UnknownScript_0x5cdcf:
|
||||
.BagFull:
|
||||
writetext UnknownText_0x5d0e6
|
||||
closetext
|
||||
loadmovesprites
|
||||
|
@ -1097,7 +1097,7 @@ Function100697: ; 100697
|
||||
ret
|
||||
|
||||
.asm_1006b4
|
||||
ld bc, $8102
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||
call PrintNum
|
||||
ret
|
||||
|
||||
@ -1484,7 +1484,7 @@ Function100902: ; 100902
|
||||
hlcoord 4, 11
|
||||
call PlaceString
|
||||
hlcoord 8, 11
|
||||
ld bc, $0102
|
||||
lb bc, 1, 2
|
||||
ld de, StringBuffer2
|
||||
call PrintNum
|
||||
ld de, SFX_TWO_PC_BEEPS
|
||||
|
@ -1343,7 +1343,7 @@ Function108a87: ; 108a87
|
||||
|
||||
Function108a92: ; 108a92
|
||||
hlcoord 9, 0
|
||||
ld bc, $8103
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||
call PrintNum
|
||||
ret
|
||||
; 108a9c
|
||||
@ -1380,7 +1380,7 @@ Unknown_108abb: ; 108abb
|
||||
|
||||
Function108abe: ; 108abe
|
||||
hlcoord 8, 6
|
||||
ld bc, $8205
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
||||
call PrintNum
|
||||
ret
|
||||
; 108ac8
|
||||
|
@ -13368,11 +13368,11 @@ Function11a302: ; 11a302
|
||||
call PlaceString
|
||||
hlcoord 9, 4
|
||||
ld de, wcd68
|
||||
ld bc, $8102
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||
call PrintNum
|
||||
hlcoord 14, 4
|
||||
ld de, wcd67
|
||||
ld bc, $8102
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||
call PrintNum
|
||||
ld a, $80
|
||||
ld [wcd44], a
|
||||
|
@ -5347,7 +5347,7 @@ Function17ff3c: ; 17ff3c
|
||||
ld [wc300], a
|
||||
hlcoord 14, 2
|
||||
ld de, wc300
|
||||
ld bc, $8103
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||
call PrintNum
|
||||
pop af
|
||||
ld [wc300], a
|
||||
|
5
sram.asm
5
sram.asm
@ -27,9 +27,8 @@ s0_abe4End::
|
||||
ds $30
|
||||
|
||||
s0_ac60:: ds 8
|
||||
s0_ac68:: ds 1
|
||||
s0_ac69:: ds 1
|
||||
s0_ac6a:: ds 1
|
||||
sLuckyNumberDay:: ds 1
|
||||
sLuckyIDNumber:: ds 2
|
||||
|
||||
ds $b200 - $ac6b
|
||||
|
||||
|
20
wram.asm
20
wram.asm
@ -4,7 +4,7 @@ flag_array: MACRO
|
||||
ds ((\1) + 7) / 8
|
||||
ENDM
|
||||
|
||||
box_struct_length EQU 24 + NUM_MOVES * 2
|
||||
box_struct_length EQU 24 + NUM_MOVES * 2 ; 32
|
||||
box_struct: MACRO
|
||||
\1Species:: db
|
||||
\1Item:: db
|
||||
@ -30,6 +30,7 @@ box_struct: MACRO
|
||||
\1End::
|
||||
ENDM
|
||||
|
||||
party_struct_length EQU box_struct_length + 16
|
||||
party_struct: MACRO
|
||||
box_struct \1
|
||||
\1Status:: db
|
||||
@ -1352,17 +1353,22 @@ wd001:: ds 1
|
||||
wd002::
|
||||
PhoneScriptBank::
|
||||
DefaultFlypoint:: ; d002
|
||||
LuckyNumberDigit1Buffer::
|
||||
ds 1
|
||||
wd003::
|
||||
LuckyNumberDigit2Buffer::
|
||||
PhoneCallerLo::
|
||||
ds 1
|
||||
wd004::
|
||||
LuckyNumberDigit3Buffer::
|
||||
PhoneCallerHi::
|
||||
ds 1
|
||||
wd005::
|
||||
LuckyNumberDigit4Buffer::
|
||||
StartFlypoint:: ; d005
|
||||
ds 1
|
||||
wd006::
|
||||
LuckyNumberDigit5Buffer::
|
||||
EndFlypoint:: ; d006
|
||||
ds 1
|
||||
|
||||
@ -1717,8 +1723,11 @@ MovementType::
|
||||
Buffer2:: ; d1eb
|
||||
ds 1
|
||||
|
||||
Buffer3::
|
||||
wd1ec:: ds 1
|
||||
Buffer4::
|
||||
wd1ed:: ds 1
|
||||
Buffer5::
|
||||
wd1ee:: ds 1
|
||||
wd1ef:: ds 1
|
||||
wd1f0:: ds 1
|
||||
@ -1842,6 +1851,7 @@ wd25e:: ds 4
|
||||
wd262:: ds 1
|
||||
wd263:: ds 1
|
||||
wd264:: ds 1
|
||||
wFoundMatchingIDInParty::
|
||||
wNamedObjectIndexBuffer::
|
||||
wd265:: ds 1
|
||||
wd266:: ds 1
|
||||
@ -2384,7 +2394,8 @@ FruitTreeFlags:: ; dc27
|
||||
|
||||
ds 5
|
||||
|
||||
wdc2d:: ds 4
|
||||
wLuckyNumberDayBuffer:: ds 2
|
||||
ds 2
|
||||
wSpecialPhoneCallID:: ds 2
|
||||
wdc33:: ds 2
|
||||
wdc35:: ds 4
|
||||
@ -2416,9 +2427,8 @@ wdc77:: ds 2
|
||||
wdc79:: ds 1
|
||||
wdc7a:: ds 2
|
||||
wdc7c:: ds 33
|
||||
wdc9d:: ds 2
|
||||
wdc9f:: ds 1
|
||||
wdca0:: ds 1
|
||||
wLuckyNumberShowFlag:: ds 2
|
||||
wLuckyIDNumber:: ds 2
|
||||
wdca1:: ds 3
|
||||
wdca4:: ds 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user