Miscellaneous cleanup noted in #709

This commit is contained in:
Rangi 2020-05-17 20:59:15 -04:00
parent 395ebd8386
commit e32cf1bfd1
7 changed files with 29 additions and 17 deletions

View File

@ -1046,7 +1046,7 @@ AI_Smart_Unused2B:
.asm_38aaa .asm_38aaa
push hl push hl
ld hl, wPlayerUsedMoves ld hl, wPlayerUsedMoves
ld c, 4 ld c, NUM_MOVES
.asm_38ab0 .asm_38ab0
ld a, [hli] ld a, [hli]
@ -1511,7 +1511,7 @@ AI_Smart_Spite:
.asm_38ce7 .asm_38ce7
push hl push hl
ld b, a ld b, a
ld c, 4 ld c, NUM_MOVES
ld hl, wBattleMonMoves ld hl, wBattleMonMoves
ld de, wBattleMonPP ld de, wBattleMonPP
@ -2147,10 +2147,10 @@ AI_Smart_Rollout:
jr nc, .asm_39020 jr nc, .asm_39020
ld a, [wEnemyAccLevel] ld a, [wEnemyAccLevel]
cp 7 cp BASE_STAT_LEVEL
jr c, .asm_39020 jr c, .asm_39020
ld a, [wPlayerEvaLevel] ld a, [wPlayerEvaLevel]
cp 8 cp BASE_STAT_LEVEL + 1
jr nc, .asm_39020 jr nc, .asm_39020
; Otherwise, 80% chance to greatly encourage this move. ; Otherwise, 80% chance to greatly encourage this move.

View File

@ -277,13 +277,13 @@ Unreferenced_Function8bec:
ldh a, [hCGB] ldh a, [hCGB]
and a and a
jr nz, .cgb jr nz, .cgb
ld hl, wPlayerLightScreenCount ld hl, wBetaPokerSGBPals
jp PushSGBPals jp PushSGBPals
.cgb .cgb
ld a, [wEnemyLightScreenCount] ; col ld a, [wBetaPokerSGBCol]
ld c, a ld c, a
ld a, [wEnemyReflectCount] ; row ld a, [wBetaPokerSGBRow]
hlcoord 0, 0, wAttrmap hlcoord 0, 0, wAttrmap
ld de, SCREEN_WIDTH ld de, SCREEN_WIDTH
.loop .loop
@ -294,10 +294,10 @@ Unreferenced_Function8bec:
jr .loop jr .loop
.done .done
ld b, $0 ld b, 0
add hl, bc add hl, bc
lb bc, 6, 4 lb bc, 6, 4
ld a, [wEnemySafeguardCount] ; value ld a, [wBetaPokerSGBAttr]
and $3 and $3
call FillBoxCGB call FillBoxCGB
call CopyTilemapAtOnce call CopyTilemapAtOnce

View File

@ -450,7 +450,7 @@ PadMapForHDMATransfer:
ldh [hMapObjectIndexBuffer], a ldh [hMapObjectIndexBuffer], a
ret ret
_Get2bpp:: HDMATransfer2bpp::
; 2bpp when [rLCDC] & $80 ; 2bpp when [rLCDC] & $80
; switch to WRAM bank 6 ; switch to WRAM bank 6
ldh a, [rSVBK] ldh a, [rSVBK]
@ -494,7 +494,7 @@ _Get2bpp::
ldh [rSVBK], a ldh [rSVBK], a
ret ret
_Get1bpp:: HDMATransfer1bpp::
; 1bpp when [rLCDC] & $80 ; 1bpp when [rLCDC] & $80
.loop .loop
ld a, c ld a, c

View File

@ -333,7 +333,7 @@ endr
.SGB_BetaPoker: .SGB_BetaPoker:
ld hl, BlkPacket_9a86 ld hl, BlkPacket_9a86
ld de, wPlayerLightScreenCount ; ??? ld de, wBetaPokerSGBPals
ld bc, PALPACKET_LENGTH ld bc, PALPACKET_LENGTH
call CopyBytes call CopyBytes
ld hl, PalPacket_BetaPoker ld hl, PalPacket_BetaPoker

View File

@ -110,8 +110,7 @@ CoinString:
ShowMoney_TerminatorString: ShowMoney_TerminatorString:
db "@" db "@"
Unreferenced_Function24b8f: Unreferenced_StartMenu_PrintSafariGameStatus:
; related to safari?
ld hl, wOptions ld hl, wOptions
ld a, [hl] ld a, [hl]
push af push af

View File

@ -5,7 +5,7 @@ Get2bpp_2::
bit rLCDC_ENABLE, a bit rLCDC_ENABLE, a
jp z, Copy2bpp jp z, Copy2bpp
homecall _Get2bpp homecall HDMATransfer2bpp
ret ret
@ -14,7 +14,7 @@ Get1bpp_2::
bit rLCDC_ENABLE, a bit rLCDC_ENABLE, a
jp z, Copy1bpp jp z, Copy1bpp
homecall _Get1bpp homecall HDMATransfer1bpp
ret ret

View File

@ -640,6 +640,7 @@ wEnemyScreens:: ; c700
; see wPlayerScreens ; see wPlayerScreens
db db
UNION ; c701
wPlayerSafeguardCount:: db ; c701 wPlayerSafeguardCount:: db ; c701
wPlayerLightScreenCount:: db ; c702 wPlayerLightScreenCount:: db ; c702
wPlayerReflectCount:: db ; c703 wPlayerReflectCount:: db ; c703
@ -648,7 +649,19 @@ wPlayerReflectCount:: db ; c703
wEnemySafeguardCount:: db ; c705 wEnemySafeguardCount:: db ; c705
wEnemyLightScreenCount:: db ; c706 wEnemyLightScreenCount:: db ; c706
wEnemyReflectCount:: db ; c707 wEnemyReflectCount:: db ; c707
ds 2 ds 1
NEXTU ; c701
ds 1
wBetaPokerSGBPals:: dw ; c702
ds 1
wBetaPokerSGBAttr:: db ; c705
wBetaPokerSGBCol:: db ; c706
wBetaPokerSGBRow:: db ; c707
ds 1
ENDU ; c708
ds 1
wBattleWeather:: ; c70a wBattleWeather:: ; c70a
; 00 normal ; 00 normal