mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Harmonize engine/{phone, pokedex, pokegear, printer, rtc, tilesets} with pokegold
To do: engine/{menus, movie, overworld, pokemon}
This commit is contained in:
parent
8019db3ea9
commit
be93ab33a7
@ -1055,8 +1055,8 @@ Pokedex_ListingPosChanged:
|
||||
ret
|
||||
|
||||
Pokedex_FillColumn:
|
||||
; Fills a column starting at HL, going downwards.
|
||||
; B is the height of the column and A is the tile it's filled with.
|
||||
; Fills a column starting at hl, going downwards.
|
||||
; b is the height of the column, and a is the tile it's filled with.
|
||||
push de
|
||||
ld de, SCREEN_WIDTH
|
||||
.loop
|
||||
@ -2305,7 +2305,6 @@ Pokedex_FillBox:
|
||||
jp FillBoxWithByte
|
||||
|
||||
Pokedex_BlackOutBG:
|
||||
; Make BG palettes black so that the BG becomes all black.
|
||||
ldh a, [rSVBK]
|
||||
push af
|
||||
ld a, BANK(wBGPals1)
|
||||
|
@ -52,7 +52,7 @@ DrawPokedexListWindow:
|
||||
ld a, $51
|
||||
hlcoord 11, 1
|
||||
ld b, SCREEN_HEIGHT - 3
|
||||
call Bank77_FillColumn
|
||||
call Pokedex_FillColumn2
|
||||
ld [hl], $52
|
||||
jr .Done
|
||||
|
||||
@ -63,7 +63,7 @@ DrawPokedexListWindow:
|
||||
ld a, $67
|
||||
hlcoord 11, 1
|
||||
ld b, SCREEN_HEIGHT - 3
|
||||
call Bank77_FillColumn
|
||||
call Pokedex_FillColumn2
|
||||
ld [hl], $68
|
||||
.Done:
|
||||
ret
|
||||
@ -86,7 +86,7 @@ DrawPokedexSearchResultsWindow:
|
||||
ld a, $67
|
||||
hlcoord 11, 1
|
||||
ld b, SCREEN_HEIGHT / 2
|
||||
call Bank77_FillColumn
|
||||
call Pokedex_FillColumn2
|
||||
ld [hl], $68
|
||||
ld a, $34
|
||||
hlcoord 0, 11
|
||||
@ -101,7 +101,7 @@ DrawPokedexSearchResultsWindow:
|
||||
ld a, $67
|
||||
hlcoord 11, 12
|
||||
ld b, 5
|
||||
call Bank77_FillColumn
|
||||
call Pokedex_FillColumn2
|
||||
ld [hl], $68
|
||||
hlcoord 0, 12
|
||||
lb bc, 5, 11
|
||||
@ -134,14 +134,14 @@ DrawDexEntryScreenRightEdge:
|
||||
hlcoord 19, 1
|
||||
ld a, $67
|
||||
ld b, 15
|
||||
call Bank77_FillColumn
|
||||
call Pokedex_FillColumn2
|
||||
ld [hl], $68
|
||||
hlcoord 19, 17
|
||||
ld [hl], $3c
|
||||
xor a
|
||||
ld b, SCREEN_HEIGHT
|
||||
hlcoord 19, 0, wAttrmap
|
||||
call Bank77_FillColumn
|
||||
call Pokedex_FillColumn2
|
||||
call WaitBGMap2
|
||||
pop hl
|
||||
ld a, l
|
||||
@ -150,7 +150,8 @@ DrawDexEntryScreenRightEdge:
|
||||
ldh [hBGMapAddress + 1], a
|
||||
ret
|
||||
|
||||
Bank77_FillColumn:
|
||||
Pokedex_FillColumn2:
|
||||
; A local duplicate of Pokedex_FillColumn.
|
||||
push de
|
||||
ld de, SCREEN_WIDTH
|
||||
.loop
|
||||
|
@ -1098,7 +1098,7 @@ PeoplePlaces4: ; People
|
||||
call Random
|
||||
maskbits NUM_TRAINER_CLASSES
|
||||
inc a
|
||||
cp NUM_TRAINER_CLASSES - 1
|
||||
cp NUM_TRAINER_CLASSES - 1 ; omit MYSTICALMAN
|
||||
jr nc, PeoplePlaces4
|
||||
push af
|
||||
ld hl, PnP_HiddenPeople
|
||||
|
@ -71,7 +71,7 @@ PrintDexEntry:
|
||||
ld hl, hVBlank
|
||||
ld a, [hl]
|
||||
push af
|
||||
ld [hl], $4
|
||||
ld [hl], 4
|
||||
|
||||
ld a, 8 ; 16 rows
|
||||
ld [wPrinterQueueLength], a
|
||||
@ -904,7 +904,7 @@ Printer_PlaceBottomBorders:
|
||||
|
||||
Printer_PlaceEmptyBoxSlotString:
|
||||
hlcoord 2, 0
|
||||
ld c, $6
|
||||
ld c, 6
|
||||
.loop
|
||||
push bc
|
||||
push hl
|
||||
|
@ -13,7 +13,7 @@ _ResetClock:
|
||||
call VerticalMenu
|
||||
ret c
|
||||
ld a, [wMenuCursorY]
|
||||
cp $1
|
||||
cp 1
|
||||
ret z
|
||||
call ClockResetPassword
|
||||
jr c, .wrongpassword
|
||||
@ -62,7 +62,7 @@ ClockResetPassword:
|
||||
ld bc, 5
|
||||
xor a
|
||||
call ByteFill
|
||||
ld a, $4
|
||||
ld a, 4
|
||||
ld [wStringBuffer2 + 5], a
|
||||
ld hl, .PasswordAskEnterText
|
||||
call PrintText
|
||||
@ -120,7 +120,7 @@ ClockResetPassword:
|
||||
hlcoord 14, 16
|
||||
ld a, [wStringBuffer2 + 5]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld d, 0
|
||||
add hl, de
|
||||
ld [hl], "▲"
|
||||
ret
|
||||
@ -150,7 +150,7 @@ ClockResetPassword:
|
||||
|
||||
.right
|
||||
ld a, [wStringBuffer2 + 5]
|
||||
cp $4
|
||||
cp 4
|
||||
ret z
|
||||
inc a
|
||||
ld [wStringBuffer2 + 5], a
|
||||
@ -166,7 +166,7 @@ ClockResetPassword:
|
||||
ret
|
||||
|
||||
.wraparound_up
|
||||
ld [hl], $0
|
||||
ld [hl], 0
|
||||
ret
|
||||
|
||||
.down
|
||||
@ -219,13 +219,13 @@ ClockResetPassword:
|
||||
call GetSRAMBank
|
||||
ld de, 0
|
||||
ld hl, sPlayerData + (wPlayerID - wPlayerData)
|
||||
ld c, $2
|
||||
ld c, 2
|
||||
call .ComponentFromNumber
|
||||
ld hl, sPlayerData + (wPlayerName - wPlayerData)
|
||||
ld c, NAME_LENGTH_JAPANESE - 1
|
||||
call .ComponentFromString
|
||||
ld hl, sPlayerData + (wMoney - wPlayerData)
|
||||
ld c, $3
|
||||
ld c, 3
|
||||
call .ComponentFromNumber
|
||||
call CloseSRAM
|
||||
ret
|
||||
@ -234,7 +234,7 @@ ClockResetPassword:
|
||||
ld a, [hli]
|
||||
add e
|
||||
ld e, a
|
||||
ld a, $0
|
||||
ld a, 0
|
||||
adc d
|
||||
ld d, a
|
||||
dec c
|
||||
@ -247,7 +247,7 @@ ClockResetPassword:
|
||||
ret z
|
||||
add e
|
||||
ld e, a
|
||||
ld a, $0
|
||||
ld a, 0
|
||||
adc d
|
||||
ld d, a
|
||||
dec c
|
||||
|
@ -74,11 +74,11 @@ StageRTCTimeForSave:
|
||||
ret
|
||||
|
||||
SaveRTC:
|
||||
ld a, $a
|
||||
ld a, SRAM_ENABLE
|
||||
ld [MBC3SRamEnable], a
|
||||
call LatchClock
|
||||
ld hl, MBC3RTC
|
||||
ld a, $c
|
||||
ld a, RTC_DH
|
||||
ld [MBC3SRamBank], a
|
||||
res 7, [hl]
|
||||
ld a, BANK(sRTCStatusFlags)
|
||||
|
@ -2,7 +2,7 @@ _AnimateTileset::
|
||||
; Iterate over a given pointer array of
|
||||
; animation functions (one per frame).
|
||||
|
||||
; Typically in wra1, vra0
|
||||
; Typically in WRAM bank 1, VRAM bank 0.
|
||||
|
||||
ld a, [wTilesetAnim]
|
||||
ld e, a
|
||||
@ -658,7 +658,6 @@ FlowerTileFrames:
|
||||
INCBIN "gfx/tilesets/flower/cgb_2.2bpp"
|
||||
|
||||
LavaBubbleAnim1:
|
||||
; Splash in the bottom-right corner of the fountain.
|
||||
ld hl, sp+0
|
||||
ld b, h
|
||||
ld c, l
|
||||
@ -678,7 +677,6 @@ LavaBubbleAnim1:
|
||||
jp WriteTile
|
||||
|
||||
LavaBubbleAnim2:
|
||||
; Splash in the top-left corner of the fountain.
|
||||
ld hl, sp+0
|
||||
ld b, h
|
||||
ld c, l
|
||||
|
@ -188,19 +188,19 @@ endr
|
||||
ReplaceTimeOfDayPals:
|
||||
ld hl, .BrightnessLevels
|
||||
ld a, [wMapTimeOfDay]
|
||||
cp $4 ; Dark cave, needs Flash
|
||||
jr z, .DarkCave
|
||||
cp PALETTE_DARK
|
||||
jr z, .NeedsFlash
|
||||
and $7
|
||||
add l
|
||||
ld l, a
|
||||
ld a, $0
|
||||
ld a, 0
|
||||
adc h
|
||||
ld h, a
|
||||
ld a, [hl]
|
||||
ld [wTimeOfDayPalset], a
|
||||
ret
|
||||
|
||||
.DarkCave:
|
||||
.NeedsFlash:
|
||||
ld a, [wStatusFlags]
|
||||
bit STATUSFLAGS_FLASH_F, a
|
||||
jr nz, .UsedFlash
|
||||
@ -319,7 +319,7 @@ GetTimePalFade:
|
||||
; get fade table
|
||||
push bc
|
||||
ld c, a
|
||||
ld b, $0
|
||||
ld b, 0
|
||||
ld hl, .dmgfades
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
@ -329,13 +329,13 @@ GetTimePalFade:
|
||||
pop bc
|
||||
|
||||
; get place in fade table
|
||||
ld b, $0
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ret
|
||||
|
||||
.cgb
|
||||
ld hl, .cgbfade
|
||||
ld b, $0
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user