Adjust MAPSETUP_ENTERLEVEL (#4) and misc clean up

This commit is contained in:
xCrystal
2024-03-05 20:08:42 +01:00
parent ae992b01a3
commit f796199bab
16 changed files with 17 additions and 93 deletions

View File

@@ -8762,9 +8762,6 @@ GetTrainerBackpic:
jr z, .Decompress
; What gender are we?
ld a, [wPlayerSpriteSetupFlags]
bit PLAYERSPRITESETUP_FEMALE_TO_MALE_F, a
jr nz, .Chris
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .Chris

View File

@@ -503,9 +503,6 @@ GetEnemyFrontpicPalettePointer:
GetPlayerOrMonPalettePointer:
and a
jp nz, GetMonNormalOrShinyPalettePointer
ld a, [wPlayerSpriteSetupFlags]
bit PLAYERSPRITESETUP_FEMALE_TO_MALE_F, a
jr nz, .male
ld a, [wPlayerGender]
and a
jr z, .male

View File

@@ -71,17 +71,6 @@ ShowPlayerNamingChoices:
INCLUDE "data/player_names.asm"
GetPlayerNameArray: ; unreferenced
ld hl, wPlayerName
ld de, MalePlayerNameArray
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .got_array
ld de, FemalePlayerNameArray
.got_array
call InitName
ret
GetPlayerIcon:
ld de, ChrisSpriteGFX
ld b, BANK(ChrisSpriteGFX)

View File

@@ -55,9 +55,6 @@ RefreshSprites::
GetPlayerSprite:
; Get Chris or Kris's sprite.
ld hl, ChrisStateSprites
ld a, [wPlayerSpriteSetupFlags]
bit PLAYERSPRITESETUP_FEMALE_TO_MALE_F, a
jr nz, .go
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .go

View File

@@ -30,9 +30,6 @@ SpawnPlayer:
ld hl, MAPOBJECT_PALETTE
add hl, bc
ln e, PAL_NPC_RED, OBJECTTYPE_SCRIPT
ld a, [wPlayerSpriteSetupFlags]
bit PLAYERSPRITESETUP_FEMALE_TO_MALE_F, a
jr nz, .ok
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .ok

View File

@@ -2188,10 +2188,6 @@ Script_warpfacing:
; fallthrough
Script_warp:
; This seems to be some sort of error handling case.
call GetScriptByte
and a
jr z, .not_ok
ld [wMapGroup], a
call GetScriptByte
ld [wMapNumber], a
@@ -2208,19 +2204,6 @@ Script_warp:
call StopScript
ret
.not_ok
call GetScriptByte
call GetScriptByte
call GetScriptByte
ld a, SPAWN_N_A
ld [wDefaultSpawnpoint], a
ld a, MAPSETUP_BADWARP
ldh [hMapEntryMethod], a
ld a, MAPSTATUS_ENTER
call LoadMapStatus
call StopScript
ret
Script_warpmod:
call GetScriptByte
ld [wBackupWarpNumber], a

View File

@@ -305,7 +305,7 @@ RefreshMapSprites:
call SafeUpdateSprites
.skip
ld a, [wPlayerSpriteSetupFlags]
and (1 << PLAYERSPRITESETUP_FEMALE_TO_MALE_F) | (1 << 3) | (1 << 4)
and (1 << 3) | (1 << 4)
ld [wPlayerSpriteSetupFlags], a
ret