Color fns, some more address decoding in link/mobile

This commit is contained in:
PikalaxALT 2015-12-22 18:03:00 -05:00
parent 630d789c70
commit d08199c79d
31 changed files with 554 additions and 552 deletions

View File

@ -8,7 +8,7 @@
const SCGB_06 const SCGB_06
const SCGB_07 const SCGB_07
const SCGB_08 const SCGB_08
const SCGB_09 const SCGB_MAPPALS
const SCGB_0A const SCGB_0A
const SCGB_0B const SCGB_0B
const SCGB_0C const SCGB_0C
@ -19,7 +19,7 @@
const SCGB_11 const SCGB_11
const SCGB_12 const SCGB_12
const SCGB_13 const SCGB_13
const SCGB_14 const SCGB_PACKPALS
const SCGB_15 const SCGB_15
const SCGB_16 const SCGB_16
const SCGB_17 const SCGB_17
@ -27,7 +27,7 @@
const SCGB_19 const SCGB_19
const SCGB_1A const SCGB_1A
const SCGB_1B const SCGB_1B
const SCGB_1C const SCGB_FRONTPICPALS
const SCGB_1D const SCGB_1D
const SCGB_1E const SCGB_1E

View File

@ -1,5 +1,6 @@
; trainer groups ; trainer groups
enum_start enum_start
CHRIS EQU __enum__
trainerclass TRAINER_NONE ; 0 trainerclass TRAINER_NONE ; 0
const PHONECONTACT_MOM const PHONECONTACT_MOM
const PHONECONTACT_BIKESHOP const PHONECONTACT_BIKESHOP
@ -7,6 +8,7 @@
const PHONECONTACT_ELM const PHONECONTACT_ELM
const PHONECONTACT_BUENA const PHONECONTACT_BUENA
KRIS EQU __enum__
trainerclass FALKNER ; 1 trainerclass FALKNER ; 1
trainerclass WHITNEY ; 2 trainerclass WHITNEY ; 2

View File

@ -88,20 +88,20 @@ Function8aa4: ; 8aa4
push de push de
push bc push bc
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
ld de, wcda9 ld de, wSGBPals
ld bc, PALPACKET_LENGTH ld bc, PALPACKET_LENGTH
call CopyBytes call CopyBytes
pop bc pop bc
pop de pop de
ld a, c ld a, c
ld [wcda9 + 3], a ld [wSGBPals + 3], a
ld a, b ld a, b
ld [wcda9 + 4], a ld [wSGBPals + 4], a
ld a, e ld a, e
ld [wcda9 + 5], a ld [wSGBPals + 5], a
ld a, d ld a, d
ld [wcda9 + 6], a ld [wSGBPals + 6], a
ld hl, wcda9 ld hl, wSGBPals
call Function9809 call Function9809
ld hl, BlkPacket_9a86 ld hl, BlkPacket_9a86
call Function9809 call Function9809
@ -119,7 +119,7 @@ Function8ad1: ; 8ad1
Function8ade: ; 8ade SGB layout $fc Function8ade: ; 8ade SGB layout $fc
ld hl, wcd9b ld hl, wcd9b
ld a, [wcda9] ld a, [wSGBPals]
ld e, a ld e, a
ld d, $0 ld d, $0
add hl, de add hl, de
@ -128,17 +128,16 @@ Function8ade: ; 8ade SGB layout $fc
ld a, [de] ld a, [de]
and a and a
ld e, $5 ld e, $5
jr z, .asm_8af7 jr z, .okay
dec a dec a
ld e, $a ld e, $a
jr z, .asm_8af7 jr z, .okay
ld e, $f ld e, $f
.okay
.asm_8af7
push de push de
ld hl, wcda9 + 10 ld hl, wSGBPals + 10
ld bc, $6 ld bc, $6
ld a, [wcda9] ld a, [wSGBPals]
call AddNTimes call AddNTimes
pop de pop de
ld [hl], e ld [hl], e
@ -204,7 +203,7 @@ Function8b4d: ; 8b4d
.asm_8b5c .asm_8b5c
ld de, UnknOBPals ld de, UnknOBPals
ld a, $3b ld a, $3b
call GetAthPalletFromPalettes9df6 call GetPredefPal
jp LoadHLPaletteIntoDE jp LoadHLPaletteIntoDE
; 8b67 ; 8b67
@ -220,7 +219,7 @@ Function8b67: ; 8b67
.asm_8b76 .asm_8b76
ld de, UnknOBPals ld de, UnknOBPals
ld a, $3c ld a, $3c
call GetAthPalletFromPalettes9df6 call GetPredefPal
jp LoadHLPaletteIntoDE jp LoadHLPaletteIntoDE
; 8b81 ; 8b81
@ -233,20 +232,20 @@ Function8b81: ; 8b81
ld a, c ld a, c
push af push af
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
ld de, wcda9 ld de, wSGBPals
ld bc, PALPACKET_LENGTH ld bc, PALPACKET_LENGTH
call CopyBytes call CopyBytes
pop af pop af
call GetMonPalettePointer_ call GetMonPalettePointer_
ld a, [hli] ld a, [hli]
ld [wcda9 + 3], a ld [wSGBPals + 3], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 4], a ld [wSGBPals + 4], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 5], a ld [wSGBPals + 5], a
ld a, [hl] ld a, [hl]
ld [wcda9 + 6], a ld [wSGBPals + 6], a
ld hl, wcda9 ld hl, wSGBPals
jp Function9809 jp Function9809
.asm_8bb2 .asm_8bb2
@ -438,7 +437,7 @@ endr
jr nz, .asm_8cf0 jr nz, .asm_8cf0
push hl push hl
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
ld de, wcda9 ld de, wSGBPals
ld bc, PALPACKET_LENGTH ld bc, PALPACKET_LENGTH
call CopyBytes call CopyBytes
pop hl pop hl
@ -446,14 +445,14 @@ rept 2
inc hl inc hl
endr endr
ld a, [hli] ld a, [hli]
ld [wcda9 + 3], a ld [wSGBPals + 3], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 4], a ld [wSGBPals + 4], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 5], a ld [wSGBPals + 5], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 6], a ld [wSGBPals + 6], a
ld hl, wcda9 ld hl, wSGBPals
call Function9809 call Function9809
ld hl, BlkPacket_9a86 ld hl, BlkPacket_9a86
call Function9809 call Function9809
@ -556,7 +555,7 @@ CopyPalettes: ; 9615
push bc push bc
ld a, [hli] ld a, [hli]
push hl push hl
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
pop hl pop hl
inc hl inc hl
@ -566,7 +565,7 @@ CopyPalettes: ; 9615
ret ret
; 9625 ; 9625
GetAthPalletFromPalettes9df6: ; 9625 GetPredefPal: ; 9625
ld l, a ld l, a
ld h, $0 ld h, $0
rept 3 ; multiply by 8 rept 3 ; multiply by 8
@ -737,7 +736,7 @@ ApplyAttrMap: ; 96b3
Function96f3: ; 96f3 CGB layout $fc Function96f3: ; 96f3 CGB layout $fc
ld hl, wcd9b ld hl, wcd9b
ld a, [wcda9] ld a, [wSGBPals]
ld e, a ld e, a
ld d, $0 ld d, $0
add hl, de add hl, de
@ -748,7 +747,7 @@ Function96f3: ; 96f3 CGB layout $fc
ld e, a ld e, a
hlcoord 11, 2, AttrMap hlcoord 11, 2, AttrMap
ld bc, $28 ld bc, $28
ld a, [wcda9] ld a, [wSGBPals]
.asm_970b .asm_970b
and a and a
jr z, .asm_9712 jr z, .asm_9712
@ -892,10 +891,10 @@ Function97cc: ; 97cc
ld a, $90 ld a, $90
ld [rOBPI], a ld [rOBPI], a
ld a, $1c ld a, $1c
call GetAthPalletFromPalettes9df6 call GetPredefPal
call Function97e5 call Function97e5
ld a, $21 ld a, $21
call GetAthPalletFromPalettes9df6 call GetPredefPal
call Function97e5 call Function97e5
ret ret
; 97e5 ; 97e5
@ -1956,15 +1955,15 @@ INCLUDE "gfx/pics/palette_pointers.asm"
INCLUDE "gfx/trainers/palette_pointers.asm" INCLUDE "gfx/trainers/palette_pointers.asm"
; b1de ; b1de
Functionb1de: ; b1de LoadMapPals: ; b1de
callba LoadSpecialMapPalette callba LoadSpecialMapPalette
jr c, .asm_b230 jr c, .got_pals
ld a, [wPermission] ld a, [wPermission]
and 7 and 7
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, Unknown_b279 ld hl, .TilesetColorsPointers
rept 2 rept 2
add hl, de add hl, de
endr endr
@ -1986,8 +1985,8 @@ endr
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, UnknBGPals ld hl, UnknBGPals
ld b, $8 ld b, 8
.asm_b210 .outer_loop
ld a, [de] ld a, [de]
push de push de
push hl push hl
@ -2001,37 +2000,37 @@ endr
ld e, l ld e, l
ld d, h ld d, h
pop hl pop hl
ld c, 8 ld c, 1 palettes
.asm_b222 .inner_loop
ld a, [de] ld a, [de]
inc de inc de
ld [hli], a ld [hli], a
dec c dec c
jr nz, .asm_b222 jr nz, .inner_loop
pop de pop de
inc de inc de
dec b dec b
jr nz, .asm_b210 jr nz, .outer_loop
pop af pop af
ld [rSVBK], a ld [rSVBK], a
.asm_b230 .got_pals
ld a, [TimeOfDayPal] ld a, [TimeOfDayPal]
and 3 and 3
ld bc, $40 ld bc, 8 palettes
ld hl, MapObjectPals ld hl, MapObjectPals
call AddNTimes call AddNTimes
ld de, UnknOBPals ld de, UnknOBPals
ld bc, $40 ld bc, 8 palettes
ld a, $5 ; BANK(UnknOBPals) ld a, $5 ; BANK(UnknOBPals)
call FarCopyWRAM call FarCopyWRAM
ld a, [wPermission] ld a, [wPermission]
cp 1 cp TOWN
jr z, .asm_b253 jr z, .outside
cp 2 cp ROUTE
ret nz ret nz
.asm_b253 .outside
ld a, [MapGroup] ld a, [MapGroup]
ld l, a ld l, a
ld h, 0 ld h, 0
@ -2043,19 +2042,19 @@ endr
ld a, [TimeOfDayPal] ld a, [TimeOfDayPal]
and 3 and 3
cp NITE cp NITE
jr c, .asm_b26d jr c, .morn_day
rept 4 rept 4
inc hl inc hl
endr endr
.asm_b26d .morn_day
ld de, UnknBGPals + 8 * 6 + 2 ld de, UnknBGPals + 6 palettes + 2
ld bc, 4 ld bc, 4
ld a, $5 ld a, $5
call FarCopyWRAM call FarCopyWRAM
ret ret
; b279 ; b279
Unknown_b279: ; b279 .TilesetColorsPointers: ; b279
dw TilesetColors1 dw TilesetColors1
dw TilesetColors1 dw TilesetColors1
dw TilesetColors1 dw TilesetColors1

View File

@ -542,7 +542,7 @@ Function81c33: ; 81c33
ret ret
.asm_81c69 .asm_81c69
ld hl, wcda9 ld hl, wSGBPals
ld a, $1 ld a, $1
ld [hli], a ld [hli], a
ld a, $ff ld a, $ff
@ -562,7 +562,7 @@ rept 2
ld [hli], a ld [hli], a
endr endr
ld [hl], a ld [hl], a
ld hl, wcda9 ld hl, wSGBPals
call Function81f0c call Function81f0c
hlcoord 10, 2 hlcoord 10, 2
ld de, wc608 ld de, wc608

View File

@ -685,7 +685,7 @@ OakSpeech: ; 0x5f99
ld [TrainerClass], a ld [TrainerClass], a
call Intro_PrepTrainerPic call Intro_PrepTrainerPic
ld b, SCGB_1C ld b, SCGB_FRONTPICPALS
call GetSGBLayout call GetSGBLayout
call Intro_RotatePalettesLeftFrontpic call Intro_RotatePalettesLeftFrontpic
@ -706,7 +706,7 @@ OakSpeech: ; 0x5f99
ld [TempMonDVs], a ld [TempMonDVs], a
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld b, SCGB_1C ld b, SCGB_FRONTPICPALS
call GetSGBLayout call GetSGBLayout
call Intro_WipeInFrontpic call Intro_WipeInFrontpic
@ -723,7 +723,7 @@ OakSpeech: ; 0x5f99
ld [TrainerClass], a ld [TrainerClass], a
call Intro_PrepTrainerPic call Intro_PrepTrainerPic
ld b, SCGB_1C ld b, SCGB_FRONTPICPALS
call GetSGBLayout call GetSGBLayout
call Intro_RotatePalettesLeftFrontpic call Intro_RotatePalettesLeftFrontpic
@ -736,7 +736,7 @@ OakSpeech: ; 0x5f99
ld [CurPartySpecies], a ld [CurPartySpecies], a
callba DrawIntroPlayerPic callba DrawIntroPlayerPic
ld b, SCGB_1C ld b, SCGB_FRONTPICPALS
call GetSGBLayout call GetSGBLayout
call Intro_RotatePalettesLeftFrontpic call Intro_RotatePalettesLeftFrontpic
@ -806,7 +806,7 @@ NamePlayer: ; 0x6074
ld [CurPartySpecies], a ld [CurPartySpecies], a
callba DrawIntroPlayerPic callba DrawIntroPlayerPic
ld b, SCGB_1C ld b, SCGB_FRONTPICPALS
call GetSGBLayout call GetSGBLayout
call RotateThreePalettesLeft call RotateThreePalettesLeft

View File

@ -14,14 +14,14 @@ LinkCommunications: ; 28000
call UpdateSprites call UpdateSprites
call LoadStandardFont call LoadStandardFont
call LoadFontsBattleExtra call LoadFontsBattleExtra
callba Function16d69a callba LinkComms_LoadPleaseWaitTextboxBorderGFX
call WaitBGMap2 call WaitBGMap2
hlcoord 3, 8 hlcoord 3, 8
ld b, 2 ld b, 2
ld c, 12 ld c, 12
ld d, h ld d, h
ld e, l ld e, l
callba Function4d35b callba LinkTextbox2
hlcoord 4, 10 hlcoord 4, 10
ld de, String_PleaseWait ld de, String_PleaseWait
call PlaceString call PlaceString
@ -38,14 +38,14 @@ LinkCommunications: ; 28000
TimeCapsule: ; 2805d TimeCapsule: ; 2805d
call ClearLinkData call ClearLinkData
call Link_PrepPartyData_Gen1 call Link_PrepPartyData_Gen1
call Function28434 call FixDataForLinkTransfer
xor a xor a
ld [wPlayerLinkAction], a ld [wPlayerLinkAction], a
call Function87d call Function87d
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $2 cp $2
jr nz, .player_1 jr nz, .player_1
ld c, $3 ld c, 3
call DelayFrames call DelayFrames
xor a xor a
ld [hSerialSend], a ld [hSerialSend], a
@ -90,7 +90,7 @@ TimeCapsule: ; 2805d
ld [rIF], a ld [rIF], a
ld a, $1d ld a, $1d
ld [rIE], a ld [rIE], a
call Function287ab call Link_CopyRandomNumbers
ld hl, OTPlayerName ld hl, OTPlayerName
call Link_FindFirstNonControlCharacter_SkipZero call Link_FindFirstNonControlCharacter_SkipZero
push hl push hl
@ -180,14 +180,14 @@ TimeCapsule: ; 2805d
Gen2ToGen2LinkComms: ; 28177 Gen2ToGen2LinkComms: ; 28177
call ClearLinkData call ClearLinkData
call Link_PrepPartyData_Gen2 call Link_PrepPartyData_Gen2
call Function28434 call FixDataForLinkTransfer
call Function29dba call Function29dba
ld a, [ScriptVar] ld a, [ScriptVar]
and a and a
jp z, Function283b2 jp z, Function283b2
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $2 cp $2
jr nz, .Player2 jr nz, .Player1
ld c, 3 ld c, 3
call DelayFrames call DelayFrames
xor a xor a
@ -204,7 +204,7 @@ Gen2ToGen2LinkComms: ; 28177
ld a, $81 ld a, $81
ld [rSC], a ld [rSC], a
.Player2 .Player1
ld de, MUSIC_NONE ld de, MUSIC_NONE
call PlayMusic call PlayMusic
ld c, 3 ld c, 3
@ -231,20 +231,20 @@ Gen2ToGen2LinkComms: ; 28177
call Function75f call Function75f
ld a, [wLinkMode] ld a, [wLinkMode]
cp LINK_TRADECENTER cp LINK_TRADECENTER
jr nz, .asm_281fd jr nz, .not_trading
ld hl, wc9f4 ld hl, wc9f4
ld de, wcb84 ld de, wcb84
ld bc, $186 ld bc, $186
call Function283f2 call Function283f2
.asm_281fd .not_trading
xor a xor a
ld [rIF], a ld [rIF], a
ld a, $1d ld a, $1d
ld [rIE], a ld [rIE], a
ld de, MUSIC_NONE ld de, MUSIC_NONE
call PlayMusic call PlayMusic
call Function287ab call Link_CopyRandomNumbers
ld hl, OTPlayerName ld hl, OTPlayerName
call Link_FindFirstNonControlCharacter_SkipZero call Link_FindFirstNonControlCharacter_SkipZero
ld de, wLinkData ld de, wLinkData
@ -253,17 +253,17 @@ Gen2ToGen2LinkComms: ; 28177
ld de, wPlayerTrademonSpecies ld de, wPlayerTrademonSpecies
ld hl, wLinkPlayerPartyMon1Species ld hl, wLinkPlayerPartyMon1Species
ld c, $2 ld c, $2
.asm_28224 .loop1
ld a, [de] ld a, [de]
inc de inc de
and a and a
jr z, .asm_28224 jr z, .loop1
cp $fd cp $fd
jr z, .asm_28224 jr z, .loop1
cp $fe cp $fe
jr z, .asm_28224 jr z, .loop1
cp $ff cp $ff
jr z, .asm_28243 jr z, .next1
push hl push hl
push bc push bc
ld b, $0 ld b, $0
@ -274,93 +274,92 @@ Gen2ToGen2LinkComms: ; 28177
ld [hl], a ld [hl], a
pop bc pop bc
pop hl pop hl
jr .asm_28224 jr .loop1
.asm_28243 .next1
ld hl, wc90f ld hl, wc90f
dec c dec c
jr nz, .asm_28224 jr nz, .loop1
ld a, [wLinkMode] ld a, [wLinkMode]
cp LINK_TRADECENTER cp LINK_TRADECENTER
jp nz, .asm_282fe jp nz, .skip_mail
ld hl, wcb84 ld hl, wcb84
.asm_28254 .loop2
ld a, [hli] ld a, [hli]
cp $20 cp $20
jr nz, .asm_28254 jr nz, .loop2
.asm_28259 .loop3
ld a, [hli] ld a, [hli]
cp $fe cp $fe
jr z, .asm_28259 jr z, .loop3
cp $20 cp $20
jr z, .asm_28259 jr z, .loop3
dec hl dec hl
ld de, wcb84 ld de, wcb84
ld bc, $190 ld bc, $190 ; 400
call CopyBytes call CopyBytes
ld hl, wcb84 ld hl, wcb84
ld bc, $c6 ld bc, $c6 ; 198
.asm_28272 .loop4
ld a, [hl] ld a, [hl]
cp $21 cp $21
jr nz, .asm_28279 jr nz, .okay1
ld [hl], $fe ld [hl], $fe
.okay1
.asm_28279
inc hl inc hl
dec bc dec bc
ld a, b ld a, b
or c or c
jr nz, .asm_28272 jr nz, .loop4
ld de, wcc9e ld de, wcc9e
.asm_28282 .loop5
ld a, [de] ld a, [de]
inc de inc de
cp $ff cp $ff
jr z, .asm_28294 jr z, .start_copying_mail
ld hl, wcc4a ld hl, wcc4a
dec a dec a
ld b, $0 ld b, $0
ld c, a ld c, a
add hl, bc add hl, bc
ld [hl], $fe ld [hl], $fe
jr .asm_28282 jr .loop5
.asm_28294 .start_copying_mail
ld hl, wcb84 ld hl, wcb84
ld de, wc9f4 ld de, wc9f4
ld b, $6 ld b, PARTY_LENGTH
.asm_2829c .copy_mail_loop
push bc push bc
ld bc, $21 ld bc, MAIL_MSG_LENGTH + 1
call CopyBytes call CopyBytes
ld a, $e ld a, (MAIL_STRUCT_LENGTH - (MAIL_MSG_LENGTH + 1)) % $100
add e add e
ld e, a ld e, a
ld a, $0 ld a, (MAIL_STRUCT_LENGTH - (MAIL_MSG_LENGTH + 1)) / $100
adc d adc d
ld d, a ld d, a
pop bc pop bc
dec b dec b
jr nz, .asm_2829c jr nz, .copy_mail_loop
ld de, wc9f4 ld de, wc9f4
ld b, $6 ld b, PARTY_LENGTH
.asm_282b4 .copy_author_loop
push bc push bc
ld a, $21 ld a, (MAIL_MSG_LENGTH + 1) % $100
add e add e
ld e, a ld e, a
ld a, $0 ld a, (MAIL_MSG_LENGTH + 1) / $100
adc d adc d
ld d, a ld d, a
ld bc, $e ld bc, MAIL_STRUCT_LENGTH - (MAIL_MSG_LENGTH + 1)
call CopyBytes call CopyBytes
pop bc pop bc
dec b dec b
jr nz, .asm_282b4 jr nz, .copy_author_loop
ld b, $6 ld b, PARTY_LENGTH
ld de, wc9f4 ld de, wc9f4
.asm_282cc .fix_mail_loop
push bc push bc
push de push de
callba IsMailEuropean callba IsMailEuropean
@ -385,12 +384,12 @@ Gen2ToGen2LinkComms: ; 28177
ld e, l ld e, l
pop bc pop bc
dec b dec b
jr nz, .asm_282cc jr nz, .fix_mail_loop
ld de, wcb0e ld de, wcb0e
xor a xor a
ld [de], a ld [de], a
.asm_282fe .skip_mail
ld hl, wLinkData ld hl, wLinkData
ld de, OTPlayerName ld de, OTPlayerName
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
@ -416,7 +415,7 @@ Gen2ToGen2LinkComms: ; 28177
call z, DelayFrames call z, DelayFrames
ld a, [wLinkMode] ld a, [wLinkMode]
cp LINK_COLOSSEUM cp LINK_COLOSSEUM
jr nz, .asm_283a9 jr nz, .ready_to_trade
ld a, CAL ld a, CAL
ld [OtherTrainerClass], a ld [OtherTrainerClass], a
call ClearScreen call ClearScreen
@ -463,7 +462,7 @@ Gen2ToGen2LinkComms: ; 28177
callba LoadPokemonData callba LoadPokemonData
jp Function28b22 jp Function28b22
.asm_283a9 .ready_to_trade
ld de, MUSIC_ROUTE_30 ld de, MUSIC_ROUTE_30
call PlayMusic call PlayMusic
jp InitTradeMenuDisplay jp InitTradeMenuDisplay
@ -488,7 +487,7 @@ Function283b2: ; 283b2
push de push de
ld d, h ld d, h
ld e, l ld e, l
callba Function4d35b callba LinkTextbox2
pop de pop de
pop hl pop hl
bccoord 1, 14 bccoord 1, 14
@ -510,7 +509,7 @@ Function283b2: ; 283b2
Function283f2: ; 283f2 Function283f2: ; 283f2
ld a, $1 ld a, $1
ld [hFFCC], a ld [hFFCC], a
.asm_283f6 .loop
ld a, [hl] ld a, [hl]
ld [hSerialSend], a ld [hSerialSend], a
call Function78a call Function78a
@ -518,26 +517,26 @@ Function283f2: ; 283f2
ld b, a ld b, a
inc hl inc hl
ld a, $30 ld a, $30
.asm_28401 .delay_cycles
dec a dec a
jr nz, .asm_28401 jr nz, .delay_cycles
ld a, [hFFCC] ld a, [hFFCC]
and a and a
ld a, b ld a, b
pop bc pop bc
jr z, .asm_28411 jr z, .load
dec hl dec hl
xor a xor a
ld [hFFCC], a ld [hFFCC], a
jr .asm_283f6 jr .loop
.asm_28411 .load
ld [de], a ld [de], a
inc de inc de
dec bc dec bc
ld a, b ld a, b
or c or c
jr nz, .asm_283f6 jr nz, .loop
ret ret
; 28419 ; 28419
@ -558,15 +557,15 @@ ClearLinkData: ; 28426
ret ret
; 28434 ; 28434
Function28434: ; 28434 FixDataForLinkTransfer: ; 28434
ld hl, wd1f3 ld hl, wd1f3
ld a, $fd ld a, $fd
ld b, 7 ld b, LinkBattleRNs - wd1f3
.loop1 .loop1
ld [hli], a ld [hli], a
dec b dec b
jr nz, .loop1 jr nz, .loop1
ld b, 10 ld b, TempEnemyMonSpecies - LinkBattleRNs
.loop2 .loop2
call Random call Random
cp $fd cp $fd
@ -579,14 +578,14 @@ Function28434: ; 28434
rept 3 rept 3
ld [hli], a ld [hli], a
endr endr
ld b, $c8 ld b, wc6d3 - (wMisc + 3)
xor a xor a
.loop3 .loop3
ld [hli], a ld [hli], a
dec b dec b
jr nz, .loop3 jr nz, .loop3
ld hl, wc818 ld hl, wTimeCapsulePartyMon1 - 1 + 6
ld de, wMisc + 10 ld de, wc612
lb bc, 0, 0 lb bc, 0, 0
.loop4 .loop4
inc c inc c
@ -602,13 +601,11 @@ endr
ld b, $d ld b, $d
jr z, .got_value jr z, .got_value
ld b, $27 ld b, $27
.got_value .got_value
ld a, c ld a, c
cp b cp b
pop bc pop bc
jr z, .done jr z, .done
.next2 .next2
inc hl inc hl
ld a, [hl] ld a, [hl]
@ -1163,7 +1160,7 @@ Link_CopyOTData: ; 2879e
ret ret
; 287ab ; 287ab
Function287ab: ; 287ab Link_CopyRandomNumbers: ; 287ab
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $2 cp $2
ret z ret z
@ -2161,8 +2158,8 @@ Special_EnterTimeCapsule: ; 29c7b
ret ret
; 29c92 ; 29c92
Special_AbortLink: ; 29c92 WaitForOtherPlayerToExit: ; 29c92
ld c, $3 ld c, 3
call DelayFrames call DelayFrames
ld a, -1 ld a, -1
ld [hLinkPlayerNumber], a ld [hLinkPlayerNumber], a
@ -2173,7 +2170,7 @@ Special_AbortLink: ; 29c92
ld [rSC], a ld [rSC], a
ld a, $81 ld a, $81
ld [rSC], a ld [rSC], a
ld c, $3 ld c, 3
call DelayFrames call DelayFrames
xor a xor a
ld [rSB], a ld [rSB], a
@ -2188,7 +2185,7 @@ Special_AbortLink: ; 29c92
ld [rSB], a ld [rSB], a
ld [hSerialReceive], a ld [hSerialReceive], a
ld [rSC], a ld [rSC], a
ld c, $3 ld c, 3
call DelayFrames call DelayFrames
ld a, -1 ld a, -1
ld [hLinkPlayerNumber], a ld [hLinkPlayerNumber], a
@ -2348,16 +2345,16 @@ Function29dba: ; 29dba
call Function29e0c call Function29e0c
ld a, [ScriptVar] ld a, [ScriptVar]
and a and a
jr z, .asm_29e08 jr z, .vblank
ld bc, -1 ld bc, -1
.asm_29de0 .wait
dec bc dec bc
ld a, b ld a, b
or c or c
jr nz, .asm_29de0 jr nz, .wait
ld a, [wOtherPlayerLinkMode] ld a, [wOtherPlayerLinkMode]
cp $5 cp $5
jr nz, .asm_29e03 jr nz, .script_var
ld a, $6 ld a, $6
ld [wPlayerLinkAction], a ld [wPlayerLinkAction], a
ld hl, wcf5b ld hl, wcf5b
@ -2367,14 +2364,14 @@ Function29dba: ; 29dba
call Function29e0c call Function29e0c
ld a, [wOtherPlayerLinkMode] ld a, [wOtherPlayerLinkMode]
cp $6 cp $6
jr z, .asm_29e08 jr z, .vblank
.asm_29e03 .script_var
xor a xor a
ld [ScriptVar], a ld [ScriptVar], a
ret ret
.asm_29e08 .vblank
xor a xor a
ld [hVBlank], a ld [hVBlank], a
ret ret

View File

@ -1,7 +1,11 @@
LinkCommsBorderGFX:
INCBIN "gfx/unknown/16cfc1.2bpp"
; 16d421
__LoadTradeScreenBorder: ; 16d421 __LoadTradeScreenBorder: ; 16d421
ld de, GFX_16cfc1 ld de, LinkCommsBorderGFX
ld hl, VTiles2 ld hl, VTiles2
lb bc, BANK(GFX_16cfc1), 70 lb bc, BANK(LinkCommsBorderGFX), 70
call Get2bpp call Get2bpp
ret ret
; 16d42e ; 16d42e
@ -55,19 +59,19 @@ _LinkTextbox: ; 16d61d
inc c inc c
inc c inc c
ld a, $7 ld a, $7
.loop .row
push bc push bc
push hl push hl
.loop2 .col
ld [hli], a ld [hli], a
dec c dec c
jr nz, .loop2 jr nz, .col
pop hl pop hl
ld de, SCREEN_WIDTH ld de, SCREEN_WIDTH
add hl, de add hl, de
pop bc pop bc
dec b dec b
jr nz, .loop jr nz, .row
ret ret
; 16d640 ; 16d640
@ -82,7 +86,7 @@ _LinkTextbox: ; 16d61d
pop hl pop hl
ld de, SCREEN_WIDTH ld de, SCREEN_WIDTH
add hl, de add hl, de
.loop3 .loop
push hl push hl
ld a, $33 ld a, $33
ld [hli], a ld [hli], a
@ -93,7 +97,7 @@ _LinkTextbox: ; 16d61d
ld de, SCREEN_WIDTH ld de, SCREEN_WIDTH
add hl, de add hl, de
dec b dec b
jr nz, .loop3 jr nz, .loop
ld a, $35 ld a, $35
ld [hli], a ld [hli], a
@ -133,10 +137,10 @@ _LoadTradeScreenBorder: ; 16d696
; 16d69a ; 16d69a
Function16d69a: ; 16d69a LinkComms_LoadPleaseWaitTextboxBorderGFX: ; 16d69a
ld de, GFX_16cfc1 + $300 ld de, LinkCommsBorderGFX + $30 tiles
ld hl, VTiles2 tile $76 ld hl, VTiles2 tile $76
lb bc, BANK(GFX_16cfc1), 8 lb bc, BANK(LinkCommsBorderGFX), 8
call Get2bpp call Get2bpp
ret ret
; 16d6a7 ; 16d6a7

View File

@ -1537,7 +1537,7 @@ ClearPocketList: ; 10a36 (4:4a36)
Pack_InitColors: ; 10a40 Pack_InitColors: ; 10a40
call WaitBGMap call WaitBGMap
ld b, SCGB_14 ld b, SCGB_PACKPALS
call GetSGBLayout call GetSGBLayout
call SetPalettes call SetPalettes
call DelayFrame call DelayFrame

View File

@ -125,7 +125,7 @@ endr
PlacePartyHPBar: ; 500cf PlacePartyHPBar: ; 500cf
xor a xor a
ld [wcda9], a ld [wSGBPals], a
ld a, [PartyCount] ld a, [PartyCount]
and a and a
ret z ret z
@ -144,7 +144,7 @@ PlacePartyHPBar: ; 500cf
ld b, $0 ld b, $0
call DrawBattleHPBar call DrawBattleHPBar
ld hl, wcd9b ld hl, wcd9b
ld a, [wcda9] ld a, [wSGBPals]
ld c, a ld c, a
ld b, $0 ld b, $0
add hl, bc add hl, bc
@ -153,7 +153,7 @@ PlacePartyHPBar: ; 500cf
call GetSGBLayout call GetSGBLayout
.skip .skip
ld hl, wcda9 ld hl, wSGBPals
inc [hl] inc [hl]
pop hl pop hl
ld de, 2 * SCREEN_WIDTH ld de, 2 * SCREEN_WIDTH

View File

@ -26,7 +26,7 @@ SpecialsPointers:: ; c029
add_special Special_CheckBothSelectedSameRoom add_special Special_CheckBothSelectedSameRoom
add_special Special_FailedLinkToPast add_special Special_FailedLinkToPast
add_special Special_CloseLink add_special Special_CloseLink
add_special Special_AbortLink add_special WaitForOtherPlayerToExit
add_special Special_SetBitsForBattleRequest add_special Special_SetBitsForBattleRequest
add_special Special_SetBitsForTimeCapsuleRequest add_special Special_SetBitsForTimeCapsuleRequest
add_special Special_CheckTimeCapsuleCompatibility add_special Special_CheckTimeCapsuleCompatibility

View File

@ -384,7 +384,7 @@ Functionfb8c8: ; fb8c8
ld [TempMonDVs], a ld [TempMonDVs], a
ld a, [hl] ld a, [hl]
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld b, SCGB_1C ld b, SCGB_FRONTPICPALS
call GetSGBLayout call GetSGBLayout
call SetPalettes call SetPalettes
ret ret

View File

@ -65,7 +65,7 @@ _TimeOfDayPals:: ; 8c011
; update sgb pals ; update sgb pals
ld b, SCGB_09 ld b, SCGB_MAPPALS
call GetSGBLayout call GetSGBLayout

View File

@ -289,7 +289,7 @@ Function1047a3: ; 1047a3 (41:47a3)
ld [hli], a ld [hli], a
dec c dec c
jr nz, .column jr nz, .column
ld bc, $20 - SCREEN_WIDTH ld bc, BG_MAP_WIDTH - SCREEN_WIDTH
add hl, bc add hl, bc
pop bc pop bc
dec b dec b
@ -307,11 +307,11 @@ LoadGraphics: ; 1047cf
ld [hTileAnimFrame], a ld [hTileAnimFrame], a
callba RefreshSprites callba RefreshSprites
call LoadFontsExtra call LoadFontsExtra
callba Function106594 callba LoadOverworldFont
ret ret
LoadMapPalettes: ; 1047eb LoadMapPalettes: ; 1047eb
ld b, SCGB_09 ld b, SCGB_MAPPALS
jp GetSGBLayout jp GetSGBLayout
; 1047f0 ; 1047f0
@ -329,7 +329,7 @@ RefreshMapSprites: ; 1047f0
call Function2e31 call Function2e31
.skip .skip
ld a, [wPlayerSpriteSetupFlags] ld a, [wPlayerSpriteSetupFlags]
and $1c and %00011100
ld [wPlayerSpriteSetupFlags], a ld [wPlayerSpriteSetupFlags], a
ret ret

View File

@ -12,7 +12,7 @@ BlindingFlash: ; 8c7e1
set 2, [hl] ; Flash set 2, [hl] ; Flash
callba ReplaceTimeOfDayPals callba ReplaceTimeOfDayPals
callba UpdateTimeOfDayPal callba UpdateTimeOfDayPal
ld b, SCGB_09 ld b, SCGB_MAPPALS
call GetSGBLayout call GetSGBLayout
callba LoadOW_BGPal7 callba LoadOW_BGPal7
callba FadeInPalettes callba FadeInPalettes

View File

@ -446,7 +446,7 @@ MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae
ld [TimeOfDayPal], a ld [TimeOfDayPal], a
ld a, $1 ld a, $1
ld [wPermission], a ld [wPermission], a
ld b, SCGB_09 ld b, SCGB_MAPPALS
call GetSGBLayout call GetSGBLayout
call UpdateTimePals call UpdateTimePals
ld a, [rBGP] ld a, [rBGP]

View File

@ -59,7 +59,7 @@ UnownPrinter: ; 16be4
ld [TempMonDVs], a ld [TempMonDVs], a
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld b, SCGB_1C ld b, SCGB_FRONTPICPALS
call GetSGBLayout call GetSGBLayout
call SetPalettes call SetPalettes

View File

@ -2002,7 +2002,7 @@ ExitAllMenus:: ; 2b4d
call UpdateSprites call UpdateSprites
call ret_d90 call ret_d90
Function2b5c:: ; 2b5c Function2b5c:: ; 2b5c
ld b, SCGB_09 ld b, SCGB_MAPPALS
call GetSGBLayout call GetSGBLayout
callba LoadOW_BGPal7 callba LoadOW_BGPal7
call WaitBGMap2 call WaitBGMap2
@ -2025,7 +2025,7 @@ ReturnToMapWithSpeechTextbox:: ; 0x2b74
set 0, [hl] set 0, [hl]
call UpdateSprites call UpdateSprites
call WaitBGMap2 call WaitBGMap2
ld b, SCGB_09 ld b, SCGB_MAPPALS
call GetSGBLayout call GetSGBLayout
callba LoadOW_BGPal7 callba LoadOW_BGPal7
call UpdateTimePals call UpdateTimePals

View File

@ -44,7 +44,7 @@ CloseText:: ; 2dcf
ld [hWY], a ld [hWY], a
call ReplaceKrisSprite call ReplaceKrisSprite
callba ReturnFromMapSetupScript callba ReturnFromMapSetupScript
callba Function106594 callba LoadOverworldFont
ret ret
; 2e08 ; 2e08

View File

@ -2868,7 +2868,7 @@ FlyFunction: ; ca3b
callba Function561d callba Function561d
call DelayFrame call DelayFrame
call ReplaceKrisSprite call ReplaceKrisSprite
callba Function106594 callba LoadOverworldFont
ret ret
; cade ; cade
@ -9674,10 +9674,10 @@ endr
; 48e93 ; 48e93
PackFGFXPointers: ; 48e93 PackFGFXPointers: ; 48e93
dw PackFGFX + $f0 * 1 dw PackFGFX + (15 tiles) * 1
dw PackFGFX + $f0 * 3 dw PackFGFX + (15 tiles) * 3
dw PackFGFX + $f0 * 0 dw PackFGFX + (15 tiles) * 0
dw PackFGFX + $f0 * 2 dw PackFGFX + (15 tiles) * 2
; 48e9b ; 48e9b
PackFGFX: ; 48e9b PackFGFX: ; 48e9b
@ -9689,7 +9689,7 @@ Special_MoveTutor: ; 4925b
call ClearBGPalettes call ClearBGPalettes
call ClearScreen call ClearScreen
call DelayFrame call DelayFrame
ld b, SCGB_14 ld b, SCGB_PACKPALS
call GetSGBLayout call GetSGBLayout
xor a xor a
ld [wItemAttributeParamBuffer], a ld [wItemAttributeParamBuffer], a
@ -10289,7 +10289,7 @@ Function4d354: ; 4d354
ret ret
; 4d35b ; 4d35b
Function4d35b: ; 4d35b LinkTextbox2: ; 4d35b
ld h, d ld h, d
ld l, e ld l, e
push bc push bc
@ -14720,11 +14720,11 @@ DrawIntroPlayerPic: ; 88874
; Draw the player pic at (6,4). ; Draw the player pic at (6,4).
; Get class ; Get class
ld e, 0 ld e, CHRIS
ld a, [PlayerGender] ld a, [PlayerGender]
bit 0, a bit 0, a
jr z, .GotClass jr z, .GotClass
ld e, 1 ld e, KRIS
.GotClass .GotClass
ld a, e ld a, e
ld [TrainerClass], a ld [TrainerClass], a
@ -15310,6 +15310,8 @@ INCLUDE "engine/npctrade.asm"
INCLUDE "event/mom_phone.asm" INCLUDE "event/mom_phone.asm"
SECTION "bank40", ROMX, BANK[$40]
INCLUDE "misc/mobile_40.asm" INCLUDE "misc/mobile_40.asm"
SECTION "bank41", ROMX, BANK[$41] SECTION "bank41", ROMX, BANK[$41]
@ -15324,6 +15326,8 @@ INCLUDE "battle/used_move_text.asm"
INCLUDE "misc/mobile_41.asm" INCLUDE "misc/mobile_41.asm"
SECTION "bank42", ROMX, BANK[$42]
INCLUDE "misc/mobile_42.asm" INCLUDE "misc/mobile_42.asm"
SECTION "Intro Logo", ROMX, BANK[$42] SECTION "Intro Logo", ROMX, BANK[$42]

View File

@ -1,7 +1,7 @@
const_value set 2 const_value set 2
const POKECENTER2F_LINK_RECEPTIONIST1 const POKECENTER2F_TRADE_RECEPTIONIST
const POKECENTER2F_LINK_RECEPTIONIST2 const POKECENTER2F_BATTLE_RECEPTIONIST
const POKECENTER2F_LINK_RECEPTIONIST3 const POKECENTER2F_TIME_CAPSULE_RECEPTIONIST
const POKECENTER2F_OFFICER const POKECENTER2F_OFFICER
PokeCenter2F_MapScriptHeader: PokeCenter2F_MapScriptHeader:
@ -109,7 +109,7 @@ LinkReceptionistScript_Trade:
end end
.FriendNotReady: .FriendNotReady:
special Special_AbortLink special WaitForOtherPlayerToExit
writetext Text_FriendNotReady writetext Text_FriendNotReady
closetext closetext
end end
@ -134,7 +134,7 @@ LinkReceptionistScript_Trade:
.DidNotSave: .DidNotSave:
writetext Text_PleaseComeAgain writetext Text_PleaseComeAgain
.AbortLink: .AbortLink:
special Special_AbortLink special WaitForOtherPlayerToExit
.Cancel: .Cancel:
closetext closetext
end end
@ -169,8 +169,8 @@ LinkReceptionistScript_Trade:
end end
BattleTradeMobile_WalkIn: BattleTradeMobile_WalkIn:
applymovement2 MovementData_0x192cce applymovement2 PokeCenter2FMobileMobileMovementData_ReceptionistWalksUpAndLeft_LookDown
applymovement PLAYER, MovementData_0x192ce7 applymovement PLAYER, PokeCenter2FMobileMovementData_PlayerWalksIntoMobileBattleRoom
end end
LinkReceptionistScript_Battle: LinkReceptionistScript_Battle:
@ -211,7 +211,7 @@ LinkReceptionistScript_Battle:
end end
.FriendNotReady: .FriendNotReady:
special Special_AbortLink special WaitForOtherPlayerToExit
writetext Text_FriendNotReady writetext Text_FriendNotReady
closetext closetext
end end
@ -236,7 +236,7 @@ LinkReceptionistScript_Battle:
.DidNotSave: .DidNotSave:
writetext Text_PleaseComeAgain writetext Text_PleaseComeAgain
.AbortLink: .AbortLink:
special Special_AbortLink special WaitForOtherPlayerToExit
.Cancel: .Cancel:
closetext closetext
end end
@ -344,7 +344,7 @@ LinkReceptionistScript_TimeCapsule:
end end
.FriendNotReady: .FriendNotReady:
special Special_AbortLink special WaitForOtherPlayerToExit
writetext Text_FriendNotReady writetext Text_FriendNotReady
closetext closetext
end end
@ -356,7 +356,7 @@ LinkReceptionistScript_TimeCapsule:
.DidNotSave: .DidNotSave:
writetext Text_PleaseComeAgain writetext Text_PleaseComeAgain
.Cancel: .Cancel:
special Special_AbortLink special WaitForOtherPlayerToExit
closetext closetext
end end
@ -376,8 +376,8 @@ LinkReceptionistScript_TimeCapsule:
end end
Script_LeftCableTradeCenter: Script_LeftCableTradeCenter:
special Special_AbortLink special WaitForOtherPlayerToExit
scall Script_CleanUpFemaleFlagAfterTrade scall Script_WalkOutOfLinkTradeRoom
dotrigger $0 dotrigger $0
domaptrigger TRADE_CENTER, $0 domaptrigger TRADE_CENTER, $0
end end
@ -390,14 +390,14 @@ Script_LeftMobileTradeRoom:
end end
Script_WalkOutOfMobileTradeRoom: Script_WalkOutOfMobileTradeRoom:
applymovement POKECENTER2F_LINK_RECEPTIONIST1, MovementData_0x192d0b applymovement POKECENTER2F_TRADE_RECEPTIONIST, PokeCenter2FMobileMovementData_ReceptionistWalksUpAndLeft
applymovement PLAYER, MovementData_0x192d0f applymovement PLAYER, PokeCenter2FMovementData_PlayerWalksOutOfMobileRoom
applymovement POKECENTER2F_LINK_RECEPTIONIST1, MovementData_0x192d14 applymovement POKECENTER2F_TRADE_RECEPTIONIST, PokeCenter2FMobileMovementData_ReceptionistWalksRightAndDown
end end
Script_LeftCableColosseum: Script_LeftCableColosseum:
special Special_AbortLink special WaitForOtherPlayerToExit
scall Script_CleanUpFemaleFlagAfterBattle scall Script_WalkOutOfLinkBattleRoom
dotrigger $0 dotrigger $0
domaptrigger COLOSSEUM, $0 domaptrigger COLOSSEUM, $0
end end
@ -410,36 +410,36 @@ Script_LeftMobileBattleRoom:
end end
Script_WalkOutOfMobileBattleRoom: Script_WalkOutOfMobileBattleRoom:
applymovement POKECENTER2F_LINK_RECEPTIONIST2, MovementData_0x192d0b applymovement POKECENTER2F_BATTLE_RECEPTIONIST, PokeCenter2FMobileMovementData_ReceptionistWalksUpAndLeft
applymovement PLAYER, MovementData_0x192d0f applymovement PLAYER, PokeCenter2FMovementData_PlayerWalksOutOfMobileRoom
applymovement POKECENTER2F_LINK_RECEPTIONIST2, MovementData_0x192d14 applymovement POKECENTER2F_BATTLE_RECEPTIONIST, PokeCenter2FMobileMovementData_ReceptionistWalksRightAndDown
end end
PokeCenter2F_CheckGender: PokeCenter2F_CheckGender:
checkflag ENGINE_PLAYER_IS_FEMALE checkflag ENGINE_PLAYER_IS_FEMALE
iftrue .Female iftrue .Female
applymovement2 MovementData_0x192cca applymovement2 PokeCenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight
applymovement PLAYER, MovementData_0x192cde applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesThreeStepsUp
end end
.Female: .Female:
applymovement2 MovementData_0x192cd8 applymovement2 PokeCenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight_2
applymovement PLAYER, MovementData_0x192ce2 applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesTwoStepsUp
opentext opentext
writetext Text_OhPleaseWait writetext Text_OhPleaseWait
waitbutton waitbutton
closetext closetext
applymovement2 MovementData_0x192cdc applymovement2 PokeCenter2FMovementData_ReceptionistLooksRight
spriteface PLAYER, LEFT spriteface PLAYER, LEFT
opentext opentext
writetext Text_ChangeTheLook writetext Text_ChangeTheLook
waitbutton waitbutton
closetext closetext
playsound SFX_TINGLE playsound SFX_TINGLE
applymovement PLAYER, MovementData_0x192d17 applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
writebyte (1 << 7) | (PAL_OW_RED << 4) writebyte (1 << 7) | (PAL_OW_RED << 4)
special Special_SetPlayerPalette special Special_SetPlayerPalette
applymovement PLAYER, MovementData_0x192d1c applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
setflag ENGINE_KRIS_IN_CABLE_CLUB setflag ENGINE_KRIS_IN_CABLE_CLUB
special ReplaceKrisSprite special ReplaceKrisSprite
opentext opentext
@ -447,51 +447,51 @@ PokeCenter2F_CheckGender:
waitbutton waitbutton
closetext closetext
showemote EMOTE_SHOCK, PLAYER, 15 showemote EMOTE_SHOCK, PLAYER, 15
applymovement PLAYER, MovementData_0x192ce5 applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepUp
end end
Script_CleanUpFemaleFlagAfterTrade: Script_WalkOutOfLinkTradeRoom:
checkflag ENGINE_KRIS_IN_CABLE_CLUB checkflag ENGINE_KRIS_IN_CABLE_CLUB
iftrue .Female iftrue .Female
applymovement POKECENTER2F_LINK_RECEPTIONIST1, MovementData_0x192d04 applymovement POKECENTER2F_TRADE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_3
applymovement PLAYER, MovementData_0x192cf5 applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesThreeStepsDown
applymovement POKECENTER2F_LINK_RECEPTIONIST1, MovementData_0x192cfe applymovement POKECENTER2F_TRADE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightAndDown
end end
.Female: .Female:
applymovement POKECENTER2F_LINK_RECEPTIONIST1, MovementData_0x192d04 applymovement POKECENTER2F_TRADE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_3
applymovement PLAYER, MovementData_0x192d28 applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepDown_2
clearflag ENGINE_KRIS_IN_CABLE_CLUB clearflag ENGINE_KRIS_IN_CABLE_CLUB
playsound SFX_TINGLE playsound SFX_TINGLE
applymovement PLAYER, MovementData_0x192d17 applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
writebyte (1 << 7) | (PAL_OW_BLUE << 4) writebyte (1 << 7) | (PAL_OW_BLUE << 4)
special Special_SetPlayerPalette special Special_SetPlayerPalette
applymovement PLAYER, MovementData_0x192d1c applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
special ReplaceKrisSprite special ReplaceKrisSprite
applymovement PLAYER, MovementData_0x192d2a applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesTwoStepsDown_2
applymovement POKECENTER2F_LINK_RECEPTIONIST1, MovementData_0x192cfe applymovement POKECENTER2F_TRADE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightAndDown
end end
Script_CleanUpFemaleFlagAfterBattle: Script_WalkOutOfLinkBattleRoom:
checkflag ENGINE_KRIS_IN_CABLE_CLUB checkflag ENGINE_KRIS_IN_CABLE_CLUB
iftrue .Female iftrue .Female
applymovement POKECENTER2F_LINK_RECEPTIONIST2, MovementData_0x192d04 applymovement POKECENTER2F_BATTLE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_3
applymovement PLAYER, MovementData_0x192cf5 applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesThreeStepsDown
applymovement POKECENTER2F_LINK_RECEPTIONIST2, MovementData_0x192cfe applymovement POKECENTER2F_BATTLE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightAndDown
end end
.Female: .Female:
applymovement POKECENTER2F_LINK_RECEPTIONIST2, MovementData_0x192d04 applymovement POKECENTER2F_BATTLE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_3
applymovement PLAYER, MovementData_0x192d28 applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepDown_2
clearflag ENGINE_KRIS_IN_CABLE_CLUB clearflag ENGINE_KRIS_IN_CABLE_CLUB
playsound SFX_TINGLE playsound SFX_TINGLE
applymovement PLAYER, MovementData_0x192d17 applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
writebyte (1 << 7) | (PAL_OW_BLUE << 4) writebyte (1 << 7) | (PAL_OW_BLUE << 4)
special Special_SetPlayerPalette special Special_SetPlayerPalette
applymovement PLAYER, MovementData_0x192d1c applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
special ReplaceKrisSprite special ReplaceKrisSprite
applymovement PLAYER, MovementData_0x192d2a applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesTwoStepsDown_2
applymovement POKECENTER2F_LINK_RECEPTIONIST2, MovementData_0x192cfe applymovement POKECENTER2F_BATTLE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightAndDown
end end
TimeCapsuleScript_CheckPlayerGender: TimeCapsuleScript_CheckPlayerGender:
@ -500,36 +500,36 @@ TimeCapsuleScript_CheckPlayerGender:
checkcode VAR_FACING checkcode VAR_FACING
if_equal LEFT, .MaleFacingLeft if_equal LEFT, .MaleFacingLeft
if_equal RIGHT, .MaleFacingRight if_equal RIGHT, .MaleFacingRight
applymovement2 MovementData_0x192cd2 applymovement2 PokeCenter2FMovementData_ReceptionistStepsLeftLooksDown
applymovement PLAYER, MovementData_0x192cec applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesTwoStepsUp_2
end end
.MaleFacingLeft: .MaleFacingLeft:
applymovement2 MovementData_0x192cd2 applymovement2 PokeCenter2FMovementData_ReceptionistStepsLeftLooksDown
applymovement PLAYER, MovementData_0x192cef applymovement PLAYER, PokeCenter2FMovementData_PlayerWalksLeftAndUp
end end
.MaleFacingRight: .MaleFacingRight:
applymovement2 MovementData_0x192cd5 applymovement2 PokeCenter2FMovementData_ReceptionistStepsRightLooksDown
applymovement PLAYER, MovementData_0x192cf2 applymovement PLAYER, PokeCenter2FMovementData_PlayerWalksRightAndUp
end end
.Female: .Female:
checkcode VAR_FACING checkcode VAR_FACING
if_equal RIGHT, .FemaleFacingRight if_equal RIGHT, .FemaleFacingRight
if_equal LEFT, .FemaleFacingLeft if_equal LEFT, .FemaleFacingLeft
applymovement2 MovementData_0x192d33 applymovement2 PokeCenter2FMovementData_ReceptionistStepsLeftLooksRight_2
applymovement PLAYER, MovementData_0x192d2d applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepUp_2
jump .FemaleContinue jump .FemaleContinue
.FemaleFacingRight: .FemaleFacingRight:
applymovement2 MovementData_0x192d36 applymovement2 PokeCenter2FMovementData_ReceptionistStepsRightLooksLeft_2
applymovement PLAYER, MovementData_0x192d2f applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepRight
jump .FemaleContinue jump .FemaleContinue
.FemaleFacingLeft: .FemaleFacingLeft:
applymovement2 MovementData_0x192d33 applymovement2 PokeCenter2FMovementData_ReceptionistStepsLeftLooksRight_2
applymovement PLAYER, MovementData_0x192d31 applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepLeft
.FemaleContinue: .FemaleContinue:
opentext opentext
writetext Text_OhPleaseWait writetext Text_OhPleaseWait
@ -544,11 +544,11 @@ TimeCapsuleScript_CheckPlayerGender:
waitbutton waitbutton
closetext closetext
playsound SFX_TINGLE playsound SFX_TINGLE
applymovement PLAYER, MovementData_0x192d17 applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
writebyte (1 << 7) | (PAL_OW_RED << 4) writebyte (1 << 7) | (PAL_OW_RED << 4)
special Special_SetPlayerPalette special Special_SetPlayerPalette
applymovement PLAYER, MovementData_0x192d22 applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingDown
faceperson PLAYER, POKECENTER2F_LINK_RECEPTIONIST3 faceperson PLAYER, POKECENTER2F_TIME_CAPSULE_RECEPTIONIST
setflag ENGINE_KRIS_IN_CABLE_CLUB setflag ENGINE_KRIS_IN_CABLE_CLUB
special ReplaceKrisSprite special ReplaceKrisSprite
opentext opentext
@ -556,30 +556,30 @@ TimeCapsuleScript_CheckPlayerGender:
waitbutton waitbutton
closetext closetext
showemote EMOTE_SHOCK, PLAYER, 15 showemote EMOTE_SHOCK, PLAYER, 15
applymovement PLAYER, MovementData_0x192d2d applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepUp_2
end end
Script_LeftTimeCapsule: Script_LeftTimeCapsule:
special Special_AbortLink special WaitForOtherPlayerToExit
checkflag ENGINE_KRIS_IN_CABLE_CLUB checkflag ENGINE_KRIS_IN_CABLE_CLUB
iftrue .Female iftrue .Female
applymovement POKECENTER2F_LINK_RECEPTIONIST3, MovementData_0x192d08 applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsLeftLooksRight
applymovement PLAYER, MovementData_0x192cf9 applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesTwoStepsDown
applymovement POKECENTER2F_LINK_RECEPTIONIST3, MovementData_0x192d01 applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_2
jump .Done jump .Done
.Female: .Female:
applymovement POKECENTER2F_LINK_RECEPTIONIST3, MovementData_0x192d08 applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsLeftLooksRight
applymovement PLAYER, MovementData_0x192cfc applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepDown
clearflag ENGINE_KRIS_IN_CABLE_CLUB clearflag ENGINE_KRIS_IN_CABLE_CLUB
playsound SFX_TINGLE playsound SFX_TINGLE
applymovement PLAYER, MovementData_0x192d17 applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
writebyte (1 << 7) | (PAL_OW_BLUE << 4) writebyte (1 << 7) | (PAL_OW_BLUE << 4)
special Special_SetPlayerPalette special Special_SetPlayerPalette
applymovement PLAYER, MovementData_0x192d1c applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
special ReplaceKrisSprite special ReplaceKrisSprite
applymovement PLAYER, MovementData_0x192cfc applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepDown
applymovement POKECENTER2F_LINK_RECEPTIONIST3, MovementData_0x192d01 applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_2
.Done: .Done:
dotrigger $0 dotrigger $0
domaptrigger TIME_CAPSULE, $0 domaptrigger TIME_CAPSULE, $0
@ -624,137 +624,137 @@ OfficerScript_0x192c9a:
closetext closetext
end end
MovementData_0x192cca: PokeCenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight:
slow_step_up slow_step_up
slow_step_left slow_step_left
turn_head_right turn_head_right
step_end step_end
MovementData_0x192cce: PokeCenter2FMobileMobileMovementData_ReceptionistWalksUpAndLeft_LookDown:
slow_step_up slow_step_up
slow_step_left slow_step_left
turn_head_down turn_head_down
step_end step_end
MovementData_0x192cd2: PokeCenter2FMovementData_ReceptionistStepsLeftLooksDown:
slow_step_left slow_step_left
turn_head_down turn_head_down
step_end step_end
MovementData_0x192cd5: PokeCenter2FMovementData_ReceptionistStepsRightLooksDown:
slow_step_right slow_step_right
turn_head_down turn_head_down
step_end step_end
MovementData_0x192cd8: PokeCenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight_2:
slow_step_up slow_step_up
slow_step_left slow_step_left
turn_head_right turn_head_right
step_end step_end
MovementData_0x192cdc: PokeCenter2FMovementData_ReceptionistLooksRight:
turn_head_right turn_head_right
step_end step_end
MovementData_0x192cde: PokeCenter2FMovementData_PlayerTakesThreeStepsUp:
step_up step_up
step_up step_up
step_up step_up
step_end step_end
MovementData_0x192ce2: PokeCenter2FMovementData_PlayerTakesTwoStepsUp:
step_up step_up
step_up step_up
step_end step_end
MovementData_0x192ce5: PokeCenter2FMovementData_PlayerTakesOneStepUp:
step_up step_up
step_end step_end
MovementData_0x192ce7: PokeCenter2FMobileMovementData_PlayerWalksIntoMobileBattleRoom:
step_up step_up
step_up step_up
step_right step_right
step_up step_up
step_end step_end
MovementData_0x192cec: PokeCenter2FMovementData_PlayerTakesTwoStepsUp_2:
step_up step_up
step_up step_up
step_end step_end
MovementData_0x192cef: PokeCenter2FMovementData_PlayerWalksLeftAndUp:
step_left step_left
step_up step_up
step_end step_end
MovementData_0x192cf2: PokeCenter2FMovementData_PlayerWalksRightAndUp:
step_right step_right
step_up step_up
step_end step_end
MovementData_0x192cf5: PokeCenter2FMovementData_PlayerTakesThreeStepsDown:
step_down step_down
step_down step_down
step_down step_down
step_end step_end
MovementData_0x192cf9: PokeCenter2FMovementData_PlayerTakesTwoStepsDown:
step_down step_down
step_down step_down
step_end step_end
MovementData_0x192cfc: PokeCenter2FMovementData_PlayerTakesOneStepDown:
step_down step_down
step_end step_end
MovementData_0x192cfe: PokeCenter2FMovementData_ReceptionistStepsRightAndDown:
slow_step_right slow_step_right
slow_step_down slow_step_down
step_end step_end
MovementData_0x192d01: PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_2:
slow_step_right slow_step_right
turn_head_down turn_head_down
step_end step_end
MovementData_0x192d04: PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_3:
slow_step_up slow_step_up
slow_step_left slow_step_left
turn_head_right turn_head_right
step_end step_end
MovementData_0x192d08: PokeCenter2FMovementData_ReceptionistStepsLeftLooksRight:
slow_step_left slow_step_left
turn_head_right turn_head_right
step_end step_end
MovementData_0x192d0b: PokeCenter2FMobileMovementData_ReceptionistWalksUpAndLeft:
slow_step_up slow_step_up
slow_step_left slow_step_left
turn_head_right turn_head_right
step_end step_end
MovementData_0x192d0f: PokeCenter2FMovementData_PlayerWalksOutOfMobileRoom:
step_down step_down
step_left step_left
step_down step_down
step_down step_down
step_end step_end
MovementData_0x192d14: PokeCenter2FMobileMovementData_ReceptionistWalksRightAndDown:
slow_step_right slow_step_right
slow_step_down slow_step_down
step_end step_end
MovementData_0x192d17: PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight:
turn_head_down turn_head_down
turn_head_left turn_head_left
turn_head_up turn_head_up
turn_head_right turn_head_right
step_end step_end
MovementData_0x192d1c: PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft:
turn_head_down turn_head_down
turn_head_left turn_head_left
turn_head_up turn_head_up
@ -762,7 +762,7 @@ MovementData_0x192d1c:
turn_head_left turn_head_left
step_end step_end
MovementData_0x192d22: PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingDown:
turn_head_down turn_head_down
turn_head_left turn_head_left
turn_head_up turn_head_up
@ -770,33 +770,33 @@ MovementData_0x192d22:
turn_head_down turn_head_down
step_end step_end
MovementData_0x192d28: PokeCenter2FMovementData_PlayerTakesOneStepDown_2:
step_down step_down
step_end step_end
MovementData_0x192d2a: PokeCenter2FMovementData_PlayerTakesTwoStepsDown_2:
step_down step_down
step_down step_down
step_end step_end
MovementData_0x192d2d: PokeCenter2FMovementData_PlayerTakesOneStepUp_2:
step_up step_up
step_end step_end
MovementData_0x192d2f: PokeCenter2FMovementData_PlayerTakesOneStepRight:
step_right step_right
step_end step_end
MovementData_0x192d31: PokeCenter2FMovementData_PlayerTakesOneStepLeft:
step_left step_left
step_end step_end
MovementData_0x192d33: PokeCenter2FMovementData_ReceptionistStepsLeftLooksRight_2:
slow_step_left slow_step_left
turn_head_right turn_head_right
step_end step_end
MovementData_0x192d36: PokeCenter2FMovementData_ReceptionistStepsRightLooksLeft_2:
slow_step_right slow_step_right
turn_head_left turn_head_left
step_end step_end

View File

@ -191,7 +191,7 @@ Function4a94e: ; 4a94e
xor a xor a
ld [wd018], a ld [wd018], a
ld [wd019], a ld [wd019], a
ld b, SCGB_14 ld b, SCGB_PACKPALS
call GetSGBLayout call GetSGBLayout
call SetPalettes call SetPalettes
call Function4aa22 call Function4aa22

View File

@ -1,6 +1,3 @@
SECTION "bank40", ROMX, BANK[$40]
Function100000: ; 100000 Function100000: ; 100000
; d: 1 or 2 ; d: 1 or 2
; e: bank ; e: bank

View File

@ -1083,17 +1083,17 @@ GFX_106514:
INCBIN "gfx/unknown/106514.2bpp" INCBIN "gfx/unknown/106514.2bpp"
Function106594:: ; 106594 LoadOverworldFont:: ; 106594
ld de, GFX_1065ad ld de, .bgfont
ld hl, VTiles1 ld hl, VTiles1
lb bc, BANK(GFX_1065ad), $80 lb bc, BANK(.bgfont), $80
call Get2bpp call Get2bpp
ld de, GFX_1065ad + $800 ld de, .bgfont + $80 tiles
ld hl, VTiles2 tile $7f ld hl, VTiles2 tile $7f
lb bc, BANK(GFX_1065ad), 1 lb bc, BANK(.bgfont), 1
call Get2bpp call Get2bpp
ret ret
; 1065ad ; 1065ad
GFX_1065ad: .bgfont:
INCBIN "gfx/unknown/1065ad.2bpp" INCBIN "gfx/unknown/1065ad.2bpp"

View File

@ -1,6 +1,3 @@
SECTION "bank42", ROMX, BANK[$42]
Function108000: ; 108000 Function108000: ; 108000
ld a, $80 ld a, $80
ld [wcf65], a ld [wcf65], a

View File

@ -5955,7 +5955,7 @@ Function1163c0: ; 1163c0
call ByteFill call ByteFill
call DelayFrame call DelayFrame
callba Function14146 callba Function14146
ld b, SCGB_09 ld b, SCGB_MAPPALS
call GetSGBLayout call GetSGBLayout
ld a, [rSVBK] ld a, [rSVBK]
push af push af

View File

@ -3348,7 +3348,7 @@ Function1197dc:
Function119800: ; 119800 Function119800: ; 119800
ld a, $fd ld a, $fd
ld [$c6d0], a ld [$c6d0], a
ld [wc702], a ld [wOTTrademonSpecies], a
ld a, [wcd81] ld a, [wcd81]
ld [wc74e], a ld [wc74e], a
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
@ -7594,26 +7594,32 @@ Function11b6b4: ; 11b6b4
ld [wc708], a ld [wc708], a
ld a, [wcd31] ld a, [wcd31]
ld [wc709], a ld [wc709], a
ld a, $8
ld [BGMapBuffer], a ld a, $c708 % $100
ld a, $c7 ld [wcd20], a
ld a, $c708 / $100
ld [wcd21], a ld [wcd21], a
ld a, $d
ld [CreditsTimer], a ld a, $c60d % $100 ; Partymon Struct
ld a, $c6 ld [wcd22], a
ld a, $c60d / $100
ld [wcd23], a ld [wcd23], a
ld a, $3d
ld a, $c63d % $100 ; OT
ld [wcd24], a ld [wcd24], a
ld a, $c6 ld a, $c63d / $100
ld [wcd25], a ld [wcd25], a
ld a, $42
ld a, $c642 % $100 ; Nickname
ld [wcd26], a ld [wcd26], a
ld a, $c6 ld a, $c642 / $100
ld [wcd27], a ld [wcd27], a
ld a, $47
ld a, $c647 % $100 ; ???
ld [wcd28], a ld [wcd28], a
ld a, $c6 ld a, $c647 / $100
ld [wcd29], a ld [wcd29], a
ld a, $46 ld a, $46
ld [$c628], a ld [$c628], a
ld de, $c63d ld de, $c63d
@ -7693,22 +7699,22 @@ Function11b6b4: ; 11b6b4
ld a, [hl] ld a, [hl]
cp MIN_LEVEL cp MIN_LEVEL
ld a, MIN_LEVEL ld a, MIN_LEVEL
jr c, .asm_11b7c5 jr c, .replace_level
ld a, [hl] ld a, [hl]
cp MAX_LEVEL cp MAX_LEVEL
jr c, .asm_11b7c6 jr c, .done_level
ld a, MAX_LEVEL ld a, MAX_LEVEL
.asm_11b7c5 .replace_level
ld [hl], a ld [hl], a
.asm_11b7c6 .done_level
ld [CurPartyLevel], a ld [CurPartyLevel], a
ld hl, $c616 + 1 ld hl, $c617
ld de, $c62c + 5 ld de, $c631
ld b, $1 ld b, $1
predef CalcPkmnStats predef CalcPkmnStats
ld de, $c62c + 5 ld de, $c631
ld hl, $c62c + 3 ld hl, $c62f
ld a, [de] ld a, [de]
ld [hli], a ld [hli], a
inc de inc de
@ -7719,30 +7725,30 @@ Function11b6b4: ; 11b6b4
; 11b7e5 ; 11b7e5
Function11b7e5: ; 11b7e5 Function11b7e5: ; 11b7e5
ld a, [$c608 + 5] ld a, [$c60d] ; species
ld [wc702], a ld [wOTTrademonSpecies], a
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld a, [wcd81] ld a, [wcd81]
ld [wc74e], a ld [wc74e], a
ld hl, $c63d ld hl, $c63d ; OT
ld de, wc724 ld de, wOTTrademonOTName
ld bc, $0005 ld bc, $5
call CopyBytes call CopyBytes
ld a, $50 ld a, "@"
ld [de], a ld [de], a
ld a, [$c608 + 11] ld a, [$c613] ; id
ld [wEnemyWrapCount], a ld [wOTTrademonID], a
ld a, [$c608 + 12] ld a, [$c613 + 1]
ld [wPlayerCharging], a ld [wOTTrademonID + 1], a
ld hl, $c608 + 26 ld hl, $c622 ; dvs
ld a, [hli] ld a, [hli]
ld [wEnemyTrappingMove], a ld [wOTTrademonDVs], a
ld a, [hl] ld a, [hl]
ld [wPlayerWrapCount], a ld [wOTTrademonDVs + 1], a
ld bc, $c608 + 5 ld bc, $c60d ; pokemon_data_start
callba GetCaughtGender callba GetCaughtGender
ld a, c ld a, c
ld [wEnemyCharging], a ld [wOTTrademonCaughtData], a
call SpeechTextBox call SpeechTextBox
call FadeToMenu call FadeToMenu
callba Function108016 callba Function108016

View File

@ -863,6 +863,3 @@ Unknown_16cfb9:
RGB 07, 07, 07 RGB 07, 07, 07
; 16cfc1 ; 16cfc1
GFX_16cfc1:
INCBIN "gfx/unknown/16cfc1.2bpp"

View File

@ -274,29 +274,29 @@ CheckStringForErrors_IgnoreTerminator: ; 17d0b3
Function17d0f3: ; 17d0f3 Function17d0f3: ; 17d0f3
ld a, [$c608 + 5] ld a, [$c608 + 5]
ld [wc702], a ld [wOTTrademonSpecies], a
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld a, [wcd81] ld a, [wcd81]
ld [wc74e], a ld [wc74e], a
ld hl, $c63d ld hl, $c63d
ld de, wc724 ld de, wOTTrademonOTName
ld bc, $0005 ld bc, 5
call CopyBytes call CopyBytes
ld a, $50 ld a, "@"
ld [de], a ld [de], a
ld a, [$c608 + 11] ld a, [$c608 + 11]
ld [wEnemyWrapCount], a ld [wOTTrademonID], a
ld a, [$c608 + 12] ld a, [$c608 + 12]
ld [wPlayerCharging], a ld [wOTTrademonID + 1], a
ld hl, $c608 + 26 ld hl, $c608 + 26
ld a, [hli] ld a, [hli]
ld [wEnemyTrappingMove], a ld [wOTTrademonDVs], a
ld a, [hl] ld a, [hl]
ld [wPlayerWrapCount], a ld [wOTTrademonDVs + 1], a
ld bc, $c608 + 5 ld bc, $c608 + 5
callba GetCaughtGender callba GetCaughtGender
ld a, c ld a, c
ld [wEnemyCharging], a ld [wOTTrademonCaughtData], a
call SpeechTextBox call SpeechTextBox
call FadeToMenu call FadeToMenu
callba Function10804d callba Function10804d

View File

@ -11,7 +11,6 @@ Predef_LoadSGBLayoutCGB: ; 8d59
cp SCGB_RAM cp SCGB_RAM
jr nz, .not_ram jr nz, .not_ram
ld a, [SGBPredef] ld a, [SGBPredef]
.not_ram .not_ram
cp SCGB_FC cp SCGB_FC
jp z, Function96f3 jp z, Function96f3
@ -62,7 +61,7 @@ Predef_LoadSGBLayoutCGB: ; 8d59
dw _CGB19 dw _CGB19
dw _CGB1a dw _CGB1a
dw _CGB1b dw _CGB1b
dw _CGB1c dw _CGB_FrontpicPals
dw _CGB1d dw _CGB1d
dw _CGB1e dw _CGB1e
; 8db8 ; 8db8
@ -289,7 +288,7 @@ Unknown_8f6a: ; 8f6a
_CGB04: ; 8f70 _CGB04: ; 8f70
ld de, UnknBGPals ld de, UnknBGPals
ld a, $1d ld a, $1d
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp $ff cp $ff
@ -336,7 +335,7 @@ Palette8fc2: ; 8fc2
_CGB17: ; 8fca _CGB17: ; 8fca
ld de, UnknBGPals ld de, UnknBGPals
ld a, $1d ld a, $1d
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp $ff cp $ff
@ -396,7 +395,7 @@ Palette9036: ; 9036
_CGB16: ; 903e _CGB16: ; 903e
ld de, UnknBGPals ld de, UnknBGPals
ld a, $1d ld a, $1d
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
call GetMonPalettePointer_ call GetMonPalettePointer_
@ -474,7 +473,7 @@ _CGB06: ; 90f8
call WipeAttrMap call WipeAttrMap
ld de, UnknOBPals ld de, UnknOBPals
ld a, $3c ld a, $3c
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
hlcoord 0, 6, AttrMap hlcoord 0, 6, AttrMap
lb bc, 12, SCREEN_WIDTH lb bc, 12, SCREEN_WIDTH
@ -539,12 +538,12 @@ Palette_9156: ; 9156
Function9166: ; 9166 Function9166: ; 9166
ld de, UnknBGPals ld de, UnknBGPals
ld a, $38 ld a, $38
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
ld de, UnknOBPals ld de, UnknOBPals
ld a, $39 ld a, $39
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
call WipeAttrMap call WipeAttrMap
ret ret
@ -555,7 +554,7 @@ Function9180: ; 9180
call CopyFourPalettes call CopyFourPalettes
ld de, UnknOBPals ld de, UnknOBPals
ld a, $3a ld a, $3a
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
call WipeAttrMap call WipeAttrMap
ret ret
@ -587,8 +586,8 @@ _CGB08: ; 91ad
; 91c8 ; 91c8
_CGB09: ; 91c8 _CGB09: ; 91c8
call Functionb1de call LoadMapPals
ld a, SCGB_09 ld a, SCGB_MAPPALS
ld [SGBPredef], a ld [SGBPredef], a
ret ret
; 91d1 ; 91d1
@ -609,7 +608,7 @@ _CGB0b: ; 91e4
and a and a
jr z, .pokemon jr z, .pokemon
ld a, $1a ld a, $1a
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
jr .got_palette jr .got_palette
@ -670,7 +669,7 @@ _CGB18: ; 925e
call CopyFourPalettes call CopyFourPalettes
ld de, UnknOBPals ld de, UnknOBPals
ld a, $4c ld a, $4c
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
ld a, [rSVBK] ld a, [rSVBK]
push af push af
@ -715,7 +714,7 @@ _CGB15: ; 9289
call GetTrainerPalettePointer call GetTrainerPalettePointer
call LoadPalette_White_Col1_Col2_Black call LoadPalette_White_Col1_Col2_Black
ld a, $24 ld a, $24
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
hlcoord 0, 0, AttrMap hlcoord 0, 0, AttrMap
@ -793,7 +792,7 @@ _CGB15: ; 9289
_CGB0e: ; 9373 _CGB0e: ; 9373
ld de, UnknBGPals ld de, UnknBGPals
ld a, $10 ld a, $10
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
ld a, [PlayerHPPal] ld a, [PlayerHPPal]
ld l, a ld l, a
@ -830,7 +829,7 @@ _CGB0f: ; 93a6
_CGB10: ; 93ba _CGB10: ; 93ba
ld de, UnknBGPals ld de, UnknBGPals
ld a, $1d ld a, $1d
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
call WipeAttrMap call WipeAttrMap
call ApplyAttrMap call ApplyAttrMap
@ -850,11 +849,11 @@ _CGB14: ; 93d3
bit 0, a bit 0, a
jr z, .tutorial_male jr z, .tutorial_male
ld hl, Palettes_9469 ld hl, .KrisPackPals
jr .got_gender jr .got_gender
.tutorial_male .tutorial_male
ld hl, Palettes_9439 ld hl, .ChrisPackPals
.got_gender .got_gender
ld de, UnknBGPals ld de, UnknBGPals
@ -889,7 +888,7 @@ _CGB14: ; 93d3
ret ret
; 9439 ; 9439
Palettes_9439: ; 9439 .ChrisPackPals: ; 9439
RGB 31, 31, 31 RGB 31, 31, 31
RGB 15, 15, 31 RGB 15, 15, 31
RGB 00, 00, 31 RGB 00, 00, 31
@ -921,7 +920,7 @@ Palettes_9439: ; 9439
RGB 00, 00, 00 RGB 00, 00, 00
; 9469 ; 9469
Palettes_9469: ; 9469 .KrisPackPals: ; 9469
RGB 31, 31, 31 RGB 31, 31, 31
RGB 31, 14, 31 RGB 31, 14, 31
RGB 31, 07, 31 RGB 31, 07, 31
@ -1010,13 +1009,13 @@ _CGB13: ; 94d0
_CGB19: ; 94fa _CGB19: ; 94fa
ld de, UnknBGPals ld de, UnknBGPals
ld a, $4e ld a, $4e
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
ld hl, Palette_9521 ld hl, .Palette
ld de, UnknOBPals ld de, UnknOBPals
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
ld hl, Palette_9521 ld hl, .Palette
ld de, UnknOBPals + 8 ld de, UnknOBPals + 1 palettes
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
call WipeAttrMap call WipeAttrMap
call ApplyAttrMap call ApplyAttrMap
@ -1024,7 +1023,7 @@ _CGB19: ; 94fa
ret ret
; 9521 ; 9521
Palette_9521: ; 9521 .Palette: ; 9521
RGB 31, 31, 31 RGB 31, 31, 31
RGB 13, 11, 00 RGB 13, 11, 00
RGB 23, 12, 28 RGB 23, 12, 28
@ -1058,18 +1057,18 @@ _CGB1b: ; 9555
call CopyFourPalettes call CopyFourPalettes
ld hl, Palettes_b681 ld hl, Palettes_b681
ld de, UnknOBPals ld de, UnknOBPals
ld bc, $8 ld bc, 1 palettes
ld a, $5 ld a, $5
call FarCopyWRAM call FarCopyWRAM
ld de, UnknOBPals + $38 ld de, UnknOBPals + 7 palettes
ld a, $1c ld a, $1c
call GetAthPalletFromPalettes9df6 call GetPredefPal
call LoadHLPaletteIntoDE call LoadHLPaletteIntoDE
call WipeAttrMap call WipeAttrMap
ret ret
; 9578 ; 9578
_CGB1c: ; 9578 _CGB_FrontpicPals: ; 9578
ld de, UnknBGPals ld de, UnknBGPals
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
ld bc, TempMonDVs ld bc, TempMonDVs
@ -1082,9 +1081,9 @@ _CGB1c: ; 9578
; 9591 ; 9591
_CGB1d: ; 9591 _CGB1d: ; 9591
ld hl, Palette95e0 ld hl, .Palettes
ld de, UnknBGPals ld de, UnknBGPals
ld bc, $10 ld bc, 2 palettes
ld a, $5 ld a, $5
call FarCopyWRAM call FarCopyWRAM
call ApplyPals call ApplyPals
@ -1113,7 +1112,7 @@ _CGB1d: ; 9591
ret ret
; 95e0 ; 95e0
Palette95e0: ; 95e0 .Palettes: ; 95e0
RGB 31, 31, 31 RGB 31, 31, 31
RGB 16, 31, 14 RGB 16, 31, 14
RGB 05, 14, 21 RGB 05, 14, 21

View File

@ -7,7 +7,6 @@ Predef_LoadSGBLayout: ; 864c
cp SCGB_RAM cp SCGB_RAM
jr nz, .not_ram jr nz, .not_ram
ld a, [SGBPredef] ld a, [SGBPredef]
.not_ram .not_ram
cp SCGB_FC cp SCGB_FC
jp z, Function8ade jp z, Function8ade
@ -53,7 +52,7 @@ Predef_LoadSGBLayout: ; 864c
dw .SGB19 dw .SGB19
dw .SGB1a dw .SGB1a
dw .SGB1b dw .SGB1b
dw .SGB1c dw .SGB_FrontpicPals
dw .SGB1d dw .SGB1d
dw .SGB1e dw .SGB1e
; 86ad ; 86ad
@ -69,8 +68,8 @@ Predef_LoadSGBLayout: ; 864c
call Function9809 call Function9809
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
ld de, wcda9 ld de, wSGBPals
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
ld a, [PlayerHPPal] ld a, [PlayerHPPal]
@ -83,17 +82,17 @@ endr
add hl, de add hl, de
ld a, [hli] ld a, [hli]
ld [wcda9 + 3], a ld [wSGBPals + 3], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 4], a ld [wSGBPals + 4], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 5], a ld [wSGBPals + 5], a
ld a, [hl] ld a, [hl]
ld [wcda9 + 6], a ld [wSGBPals + 6], a
ld a, [EnemyHPPal] ld a, [EnemyHPPal]
ld l, a ld l, a
ld h, $0 ld h, 0
rept 2 rept 2
add hl, hl add hl, hl
endr endr
@ -101,41 +100,41 @@ endr
ld de, Palettes_a8be ld de, Palettes_a8be
add hl, de add hl, de
ld a, [hli] ld a, [hli]
ld [wcda9 + 9], a ld [wSGBPals + 9], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 10], a ld [wSGBPals + 10], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 11], a ld [wSGBPals + 11], a
ld a, [hl] ld a, [hl]
ld [wcda9 + 12], a ld [wSGBPals + 12], a
ld hl, PalPacket_9cf6 ld hl, PalPacket_9cf6
ld de, wcda9 + $10 ld de, wSGBPals + $10
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
call GetBattlemonBackpicPalettePointer call GetBattlemonBackpicPalettePointer
ld a, [hli] ld a, [hli]
ld [wcda9 + $13], a ld [wSGBPals + $13], a
ld a, [hli] ld a, [hli]
ld [wcda9 + $14], a ld [wSGBPals + $14], a
ld a, [hli] ld a, [hli]
ld [wcda9 + $15], a ld [wSGBPals + $15], a
ld a, [hl] ld a, [hl]
ld [wcda9 + $16], a ld [wSGBPals + $16], a
call GetEnemyFrontpicPalettePointer call GetEnemyFrontpicPalettePointer
ld a, [hli] ld a, [hli]
ld [wcda9 + $19], a ld [wSGBPals + $19], a
ld a, [hli] ld a, [hli]
ld [wcda9 + $1a], a ld [wSGBPals + $1a], a
ld a, [hli] ld a, [hli]
ld [wcda9 + $1b], a ld [wSGBPals + $1b], a
ld a, [hl] ld a, [hl]
ld [wcda9 + $1c], a ld [wSGBPals + $1c], a
ld hl, wcda9 ld hl, wSGBPals
ld de, wcda9 + $10 ld de, wSGBPals + $10
ld a, SCGB_01 ld a, SCGB_01
ld [SGBPredef], a ld [SGBPredef], a
ret ret
@ -143,11 +142,11 @@ endr
.SGB0e: ; 873c .SGB0e: ; 873c
ld hl, PalPacket_9bd6 ld hl, PalPacket_9bd6
ld de, wcda9 ld de, wSGBPals
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
ld hl, wcda9 + 1 ld hl, wSGBPals + 1
ld [hl], $10 ld [hl], $10
rept 2 rept 2
inc hl inc hl
@ -156,7 +155,7 @@ endr
ld a, [PlayerHPPal] ld a, [PlayerHPPal]
add $2f add $2f
ld [hl], a ld [hl], a
ld hl, wcda9 ld hl, wSGBPals
ld de, BlkPacket_9ad6 ld de, BlkPacket_9ad6
ret ret
; 875c ; 875c
@ -169,53 +168,53 @@ endr
.SGB03: ; 8763 .SGB03: ; 8763
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
ld de, wcda9 ld de, wSGBPals
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
ld a, [wcda1] ld a, [wcda1]
ld l, a ld l, a
ld h, $0 ld h, 0
rept 2 rept 2
add hl, hl add hl, hl
endr endr
ld de, Palettes_a8be ld de, Palettes_a8be
add hl, de add hl, de
ld a, [hli] ld a, [hli]
ld [wcda9 + 3], a ld [wSGBPals + 3], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 4], a ld [wSGBPals + 4], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 5], a ld [wSGBPals + 5], a
ld a, [hl] ld a, [hl]
ld [wcda9 + 6], a ld [wSGBPals + 6], a
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
ld bc, wd10e + 21 ld bc, TempMonDVs
call GetPlayerOrMonPalettePointer call GetPlayerOrMonPalettePointer
ld a, [hli] ld a, [hli]
ld [wcda9 + 9], a ld [wSGBPals + 9], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 10], a ld [wSGBPals + 10], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 11], a ld [wSGBPals + 11], a
ld a, [hl] ld a, [hl]
ld [wcda9 + 12], a ld [wSGBPals + 12], a
ld hl, wcda9 ld hl, wSGBPals
ld de, BlkPacket_9ac6 ld de, BlkPacket_9ac6
ret ret
; 87ab ; 87ab
.SGB0a: ; 87ab .SGB0a: ; 87ab
ld hl, PalPacket_9c56 ld hl, PalPacket_9c56
ld de, wcda9 + 1 ld de, wSGBPals + 1
ret ret
; 87b2 ; 87b2
.SGB04: ; 87b2 .SGB04: ; 87b2
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
ld de, wcda9 ld de, wSGBPals
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
ld hl, wcda9 + 3 ld hl, wSGBPals + 3
ld [hl], $9f ld [hl], $9f
inc hl inc hl
ld [hl], $2a ld [hl], $2a
@ -226,24 +225,24 @@ endr
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
call GetMonPalettePointer_ call GetMonPalettePointer_
ld a, [hli] ld a, [hli]
ld [wcda9 + 9], a ld [wSGBPals + 9], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 10], a ld [wSGBPals + 10], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 11], a ld [wSGBPals + 11], a
ld a, [hl] ld a, [hl]
ld [wcda9 + 12], a ld [wSGBPals + 12], a
ld hl, wcda9 ld hl, wSGBPals
ld de, BlkPacket_9ae6 ld de, BlkPacket_9ae6
ret ret
; 87e9 ; 87e9
.SGB17: ; 87e9 .SGB17: ; 87e9
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
ld de, wcda9 ld de, wSGBPals
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
ld hl, wcda9 + 3 ld hl, wSGBPals + 3
ld [hl], $9f ld [hl], $9f
inc hl inc hl
ld [hl], $2a ld [hl], $2a
@ -252,17 +251,17 @@ endr
inc hl inc hl
ld [hl], $19 ld [hl], $19
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
ld bc, wd10e + 21 ld bc, TempMonDVs
call GetPlayerOrMonPalettePointer call GetPlayerOrMonPalettePointer
ld a, [hli] ld a, [hli]
ld [wcda9 + 9], a ld [wSGBPals + 9], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 10], a ld [wSGBPals + 10], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 11], a ld [wSGBPals + 11], a
ld a, [hl] ld a, [hl]
ld [wcda9 + 12], a ld [wSGBPals + 12], a
ld hl, wcda9 ld hl, wSGBPals
ld de, BlkPacket_9ae6 ld de, BlkPacket_9ae6
ret ret
; 8823 ; 8823
@ -275,10 +274,10 @@ endr
.SGB10: ; 882a .SGB10: ; 882a
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
ld de, wcda9 ld de, wSGBPals
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
ld hl, wcda9 + 3 ld hl, wSGBPals + 3
ld [hl], $9f ld [hl], $9f
inc hl inc hl
ld [hl], $2a ld [hl], $2a
@ -286,7 +285,7 @@ endr
ld [hl], $5a ld [hl], $5a
inc hl inc hl
ld [hl], $19 ld [hl], $19
ld hl, wcda9 ld hl, wSGBPals
ld de, BlkPacket_9a86 ld de, BlkPacket_9a86
ret ret
; 884b ; 884b
@ -361,7 +360,7 @@ endr
.SGB11: ; 889e .SGB11: ; 889e
ld hl, BlkPacket_9a86 ld hl, BlkPacket_9a86
ld de, PlayerLightScreenCount ld de, PlayerLightScreenCount
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
ld hl, PalPacket_9bb6 ld hl, PalPacket_9bb6
ld de, BlkPacket_9a86 ld de, BlkPacket_9a86
@ -370,14 +369,14 @@ endr
.SGB09: ; 88b1 .SGB09: ; 88b1
ld hl, PalPacket_9bd6 ld hl, PalPacket_9bd6
ld de, wcda9 ld de, wSGBPals
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
call .GetPermission call .GetMapPalsIndex
ld hl, wcda9 + 1 ld hl, wSGBPals + 1
ld [hld], a ld [hld], a
ld de, BlkPacket_9a86 ld de, BlkPacket_9a86
ld a, SCGB_09 ld a, SCGB_MAPPALS
ld [SGBPredef], a ld [SGBPredef], a
ret ret
; 88cd ; 88cd
@ -385,14 +384,14 @@ endr
.SGB0b: ; 88cd .SGB0b: ; 88cd
push bc push bc
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
ld de, wcda9 ld de, wSGBPals
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
pop bc pop bc
ld a, c ld a, c
and a and a
jr z, .asm_88ef jr z, .asm_88ef
ld hl, wcda9 + 3 ld hl, wSGBPals + 3
ld [hl], $e7 ld [hl], $e7
inc hl inc hl
ld [hl], $1c ld [hl], $1c
@ -404,7 +403,7 @@ endr
.asm_88ef .asm_88ef
ld hl, PartyMon1DVs ld hl, PartyMon1DVs
ld bc, $0030 ld bc, $30
ld a, [CurPartyMon] ld a, [CurPartyMon]
call AddNTimes call AddNTimes
ld c, l ld c, l
@ -412,16 +411,16 @@ endr
ld a, [PlayerHPPal] ld a, [PlayerHPPal]
call GetPlayerOrMonPalettePointer call GetPlayerOrMonPalettePointer
ld a, [hli] ld a, [hli]
ld [wcda9 + 3], a ld [wSGBPals + 3], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 4], a ld [wSGBPals + 4], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 5], a ld [wSGBPals + 5], a
ld a, [hl] ld a, [hl]
ld [wcda9 + 6], a ld [wSGBPals + 6], a
.asm_8913 .asm_8913
ld hl, wcda9 ld hl, wSGBPals
ld de, BlkPacket_9a86 ld de, BlkPacket_9a86
ret ret
; 891a ; 891a
@ -441,20 +440,20 @@ endr
.SGB12: ; 8928 .SGB12: ; 8928
ld hl, PalPacket_9bd6 ld hl, PalPacket_9bd6
ld de, wcda9 ld de, wSGBPals
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
ld hl, BlkPacket_9a86 ld hl, BlkPacket_9a86
ld de, wcda9 + $10 ld de, wSGBPals + $10
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
call .GetPermission call .GetMapPalsIndex
ld hl, wcda9 + 1 ld hl, wSGBPals + 1
ld [hl], a ld [hl], a
ld hl, wcda9 + 3 ld hl, wSGBPals + 3
ld [hl], $2e ld [hl], $2e
ld hl, wcda9 + $13 ld hl, wSGBPals + $13
ld a, $5 ld a, 5
ld [hli], a ld [hli], a
ld a, [wMenuBorderLeftCoord] ld a, [wMenuBorderLeftCoord]
ld [hli], a ld [hli], a
@ -464,15 +463,15 @@ endr
ld [hli], a ld [hli], a
ld a, [wMenuBorderBottomCoord] ld a, [wMenuBorderBottomCoord]
ld [hl], a ld [hl], a
ld hl, wcda9 ld hl, wSGBPals
ld de, wcda9 + $10 ld de, wSGBPals + $10
ret ret
; 8969 ; 8969
.SGB1e: ; 8969 .SGB1e: ; 8969
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
ld de, wcda9 ld de, wSGBPals
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
ld l, a ld l, a
@ -490,14 +489,14 @@ endr
ld b, 0 ld b, 0
add hl, bc add hl, bc
ld a, [hli] ld a, [hli]
ld [wcda9 + 3], a ld [wSGBPals + 3], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 4], a ld [wSGBPals + 4], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 5], a ld [wSGBPals + 5], a
ld a, [hl] ld a, [hl]
ld [wcda9 + 6], a ld [wSGBPals + 6], a
ld hl, wcda9 ld hl, wSGBPals
ld de, BlkPacket_9a86 ld de, BlkPacket_9a86
ret ret
; 89a6 ; 89a6
@ -510,21 +509,21 @@ endr
.SGB1a: ; 89ad .SGB1a: ; 89ad
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
ld de, wcda9 ld de, wSGBPals
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
ld bc, wd10e + 21 ld bc, TempMonDVs
call GetPlayerOrMonPalettePointer call GetPlayerOrMonPalettePointer
ld a, [hli] ld a, [hli]
ld [wcda9 + 3], a ld [wSGBPals + 3], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 4], a ld [wSGBPals + 4], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 5], a ld [wSGBPals + 5], a
ld a, [hl] ld a, [hl]
ld [wcda9 + 6], a ld [wSGBPals + 6], a
ld hl, wcda9 ld hl, wSGBPals
ld de, BlkPacket_9a86 ld de, BlkPacket_9a86
ret ret
; 89d9 ; 89d9
@ -535,99 +534,99 @@ endr
ret ret
; 89e0 ; 89e0
.SGB1c: ; 89e0 .SGB_FrontpicPals: ; 89e0
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
ld de, wcda9 ld de, wSGBPals
ld bc, $0010 ld bc, $10
call CopyBytes call CopyBytes
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
ld bc, wd10e + 21 ld bc, TempMonDVs
call GetFrontpicPalettePointer call GetFrontpicPalettePointer
ld a, [hli] ld a, [hli]
ld [wcda9 + 3], a ld [wSGBPals + 3], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 4], a ld [wSGBPals + 4], a
ld a, [hli] ld a, [hli]
ld [wcda9 + 5], a ld [wSGBPals + 5], a
ld a, [hl] ld a, [hl]
ld [wcda9 + 6], a ld [wSGBPals + 6], a
ld hl, wcda9 ld hl, wSGBPals
ld de, BlkPacket_9a86 ld de, BlkPacket_9a86
ret ret
; 8a0c ; 8a0c
.GetPermission: ; 8a0c .GetMapPalsIndex: ; 8a0c
ld a, [TimeOfDayPal] ld a, [TimeOfDayPal]
cp $2 cp NITE
jr c, .asm_8a16 jr c, .morn_day
ld a, $19 ld a, $19
ret ret
.asm_8a16 .morn_day
ld a, [wPermission] ld a, [wPermission]
cp $2 cp ROUTE
jr z, .asm_8a39 jr z, .route
cp $4 cp CAVE
jr z, .asm_8a3c jr z, .cave
cp $7 cp DUNGEON
jr z, .asm_8a3c jr z, .cave
cp $5 cp PERM_5
jr z, .asm_8a3f jr z, .perm5
cp $6 cp GATE
jr z, .asm_8a42 jr z, .gate
ld a, [MapGroup] ld a, [MapGroup]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .Unknown_8a45 ld hl, .SGBRoofPalInds
add hl, de add hl, de
ld a, [hl] ld a, [hl]
ret ret
.asm_8a39 .route
ld a, $0 ld a, $00
ret ret
.asm_8a3c .cave
ld a, $18 ld a, $18
ret ret
.asm_8a3f .perm5
ld a, $6 ld a, $06
ret ret
.asm_8a42 .gate
ld a, $3 ld a, $03
ret ret
; 8a45 ; 8a45
.Unknown_8a45: ; 8a45 .SGBRoofPalInds: ; 8a45
db $00 db $00 ; Unused
db $12 db $12 ; Olivine
db $14 db $14 ; Mahogany
db $18 db $18 ; Various Dungeons
db $11 db $11 ; Ecruteak
db $15 db $15 ; Blackthorn
db $09 db $09 ; Cinnabar
db $04 db $04 ; Cerulean
db $0f db $0f ; Azalea
db $16 db $16 ; Lake Of Rage
db $0e db $0e ; Violet
db $10 db $10 ; Goldenrod
db $06 db $06 ; Vermilion
db $01 db $01 ; Palette
db $03 db $03 ; Pewter
db $06 db $06 ; Fast Ship
db $0b db $0b ; Indigo Plateau
db $08 db $08 ; Fuchsia
db $05 db $05 ; Lavender
db $17 db $17 ; Silver Cave Outside
db $08 db $08 ; Pokemon Center 2F
db $07 db $07 ; Celadon
db $13 db $13 ; Cianwood
db $02 db $02 ; Viridian
db $0c db $0c ; New Bark
db $0a db $0a ; Saffron
db $0d db $0d ; Cherrygrove
; 8a60 ; 8a60
.Finish: ; 8a60 .Finish: ; 8a60

View File

@ -590,6 +590,8 @@ wEnemyMoveStruct:: ds MOVE_LENGTH ; c608
wc60f:: wc60f::
wPlayerMoveStruct:: ds MOVE_LENGTH ; c60f wPlayerMoveStruct:: ds MOVE_LENGTH ; c60f
wc616:: wc616::
ds -4
wc612:: ds 4
EnemyMonNick:: ds PKMN_NAME_LENGTH ; c616 EnemyMonNick:: ds PKMN_NAME_LENGTH ; c616
ds -5 ds -5
wInitHourBuffer:: ds 5 wInitHourBuffer:: ds 5
@ -1487,7 +1489,7 @@ EnemyHPPal:: ; cd9a
wcd9b:: ds 6 wcd9b:: ds 6
wcda1:: ds 8 wcda1:: ds 8
wcda9:: ds 48 wSGBPals:: ds 48 ; cda9
AttrMap:: ; cdd9 AttrMap:: ; cdd9
; 20x18 grid of palettes for 8x8 tiles ; 20x18 grid of palettes for 8x8 tiles
@ -2029,7 +2031,6 @@ wd10b:: ds 1
wItemQuantityChangeBuffer:: ds 1 wItemQuantityChangeBuffer:: ds 1
wItemQuantityBuffer:: ds 1 wItemQuantityBuffer:: ds 1
wd10e::
TempMon:: TempMon::
party_struct TempMon party_struct TempMon
@ -2090,8 +2091,8 @@ wMetatileStandingY:: ds 1
wMetatileStandingX:: ds 1 wMetatileStandingX:: ds 1
wSecondMapHeaderBank:: ds 1 wSecondMapHeaderBank:: ds 1
wTileset:: ds 1 wTileset:: ds 1
wPermission:: ds 1 wPermission:: ds 1 ; d19a
wSecondMapHeaderAddr:: dw wSecondMapHeaderAddr:: dw ; d19b
; width/height are in blocks (2x2 walkable tiles, 4x4 graphics tiles) ; width/height are in blocks (2x2 walkable tiles, 4x4 graphics tiles)
MapHeader:: ; d19d MapHeader:: ; d19d