mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
Fix typos in comments
This commit is contained in:
parent
e9f33ce19c
commit
7a9a1b1e55
|
@ -541,7 +541,7 @@ Music_PokeFluteInBattle::
|
||||||
; begin playing the "caught mon" sound effect
|
; begin playing the "caught mon" sound effect
|
||||||
ld a, SFX_CAUGHT_MON
|
ld a, SFX_CAUGHT_MON
|
||||||
call PlaySoundWaitForCurrent
|
call PlaySoundWaitForCurrent
|
||||||
; then immediately overwrtie the channel pointers
|
; then immediately overwrite the channel pointers
|
||||||
ld hl, wChannelCommandPointers + Ch4 * 2
|
ld hl, wChannelCommandPointers + Ch4 * 2
|
||||||
ld de, SFX_08_PokeFlute_Ch4
|
ld de, SFX_08_PokeFlute_Ch4
|
||||||
call Audio2_OverwriteChannelPointer
|
call Audio2_OverwriteChannelPointer
|
||||||
|
|
|
@ -68,7 +68,7 @@ rNR34 EQU $ff1e ; Channel 3 Frequency's higher data (R/W)
|
||||||
rNR41 EQU $ff20 ; Channel 4 Sound Length (R/W)
|
rNR41 EQU $ff20 ; Channel 4 Sound Length (R/W)
|
||||||
rNR42 EQU $ff21 ; Channel 4 Volume Envelope (R/W)
|
rNR42 EQU $ff21 ; Channel 4 Volume Envelope (R/W)
|
||||||
rNR43 EQU $ff22 ; Channel 4 Polynomial Counter (R/W)
|
rNR43 EQU $ff22 ; Channel 4 Polynomial Counter (R/W)
|
||||||
rNR44 EQU $ff23 ; Channel 4 Counter/consecutive; Inital (R/W)
|
rNR44 EQU $ff23 ; Channel 4 Counter/consecutive; Initial (R/W)
|
||||||
rNR50 EQU $ff24 ; Channel control / ON-OFF / Volume (R/W)
|
rNR50 EQU $ff24 ; Channel control / ON-OFF / Volume (R/W)
|
||||||
rNR51 EQU $ff25 ; Selection of Sound output terminal (R/W)
|
rNR51 EQU $ff25 ; Selection of Sound output terminal (R/W)
|
||||||
rNR52 EQU $ff26 ; Sound on/off
|
rNR52 EQU $ff26 ; Sound on/off
|
||||||
|
|
|
@ -120,7 +120,7 @@ TMHM_PARTY_MENU EQU 3
|
||||||
SWAP_MONS_PARTY_MENU EQU 4
|
SWAP_MONS_PARTY_MENU EQU 4
|
||||||
EVO_STONE_PARTY_MENU EQU 5
|
EVO_STONE_PARTY_MENU EQU 5
|
||||||
|
|
||||||
; party memu message IDs
|
; party menu message IDs
|
||||||
ANTIDOTE_MSG EQU $F0
|
ANTIDOTE_MSG EQU $F0
|
||||||
BURN_HEAL_MSG EQU $F1
|
BURN_HEAL_MSG EQU $F1
|
||||||
ICE_HEAL_MSG EQU $F2
|
ICE_HEAL_MSG EQU $F2
|
||||||
|
|
|
@ -391,18 +391,18 @@ JugglerData:
|
||||||
db 29,KADABRA,MR_MIME,0
|
db 29,KADABRA,MR_MIME,0
|
||||||
; Victory Road 2F
|
; Victory Road 2F
|
||||||
db 41,DROWZEE,HYPNO,KADABRA,KADABRA,0
|
db 41,DROWZEE,HYPNO,KADABRA,KADABRA,0
|
||||||
; Fucshia Gym
|
; Fuchsia Gym
|
||||||
db 31,DROWZEE,DROWZEE,KADABRA,DROWZEE,0
|
db 31,DROWZEE,DROWZEE,KADABRA,DROWZEE,0
|
||||||
db 34,DROWZEE,HYPNO,0
|
db 34,DROWZEE,HYPNO,0
|
||||||
; Victory Road 2F
|
; Victory Road 2F
|
||||||
db 48,MR_MIME,0
|
db 48,MR_MIME,0
|
||||||
; Unused
|
; Unused
|
||||||
db 33,HYPNO,0
|
db 33,HYPNO,0
|
||||||
; Fucshia Gym
|
; Fuchsia Gym
|
||||||
db 38,HYPNO,0
|
db 38,HYPNO,0
|
||||||
db 34,DROWZEE,KADABRA,0
|
db 34,DROWZEE,KADABRA,0
|
||||||
TamerData:
|
TamerData:
|
||||||
; Fucshia Gym
|
; Fuchsia Gym
|
||||||
db 34,SANDSLASH,ARBOK,0
|
db 34,SANDSLASH,ARBOK,0
|
||||||
db 33,ARBOK,SANDSLASH,ARBOK,0
|
db 33,ARBOK,SANDSLASH,ARBOK,0
|
||||||
; Viridian Gym
|
; Viridian Gym
|
||||||
|
|
|
@ -829,7 +829,7 @@ DoRockSlideSpecialEffects:
|
||||||
cp a,1
|
cp a,1
|
||||||
jp z,AnimationFlashScreen ; if it's the end of the subanimation, flash the screen
|
jp z,AnimationFlashScreen ; if it's the end of the subanimation, flash the screen
|
||||||
ret
|
ret
|
||||||
; if the subaninmation counter is between 8 and 11, shake the screen horizontally and vertically
|
; if the subanimation counter is between 8 and 11, shake the screen horizontally and vertically
|
||||||
.shakeScreen
|
.shakeScreen
|
||||||
ld b,1
|
ld b,1
|
||||||
predef PredefShakeScreenHorizontally ; shake horizontally
|
predef PredefShakeScreenHorizontally ; shake horizontally
|
||||||
|
@ -1516,7 +1516,7 @@ AnimationShowMonPic:
|
||||||
jp Delay3
|
jp Delay3
|
||||||
|
|
||||||
AnimationShowEnemyMonPic:
|
AnimationShowEnemyMonPic:
|
||||||
; Shows the emenmy mon's front sprite. Used in animations like Seismic Toss
|
; Shows the enemy mon's front sprite. Used in animations like Seismic Toss
|
||||||
; to make the mon's sprite reappear after disappears offscreen.
|
; to make the mon's sprite reappear after disappears offscreen.
|
||||||
ld hl, AnimationShowMonPic
|
ld hl, AnimationShowMonPic
|
||||||
jp CallWithTurnFlipped
|
jp CallWithTurnFlipped
|
||||||
|
|
|
@ -406,7 +406,7 @@ MainInBattleLoop:
|
||||||
ld a, [wEnemyBattleStatus1]
|
ld a, [wEnemyBattleStatus1]
|
||||||
bit UsingTrappingMove, a ; check if enemy is using a multi-turn attack like wrap
|
bit UsingTrappingMove, a ; check if enemy is using a multi-turn attack like wrap
|
||||||
jr z, .selectPlayerMove ; if not, jump
|
jr z, .selectPlayerMove ; if not, jump
|
||||||
; enemy is using a mult-turn attack like wrap, so player is trapped and cannot execute a move
|
; enemy is using a multi-turn attack like wrap, so player is trapped and cannot execute a move
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [wPlayerSelectedMove], a
|
ld [wPlayerSelectedMove], a
|
||||||
jr .selectEnemyMove
|
jr .selectEnemyMove
|
||||||
|
@ -704,7 +704,7 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; adds bc to enemy HP
|
; adds bc to enemy HP
|
||||||
; bc isn't updated if HP substracted was capped to prevent overkill
|
; bc isn't updated if HP subtracted was capped to prevent overkill
|
||||||
HandlePoisonBurnLeechSeed_IncreaseEnemyHP:
|
HandlePoisonBurnLeechSeed_IncreaseEnemyHP:
|
||||||
push hl
|
push hl
|
||||||
ld hl, wEnemyMonMaxHP
|
ld hl, wEnemyMonMaxHP
|
||||||
|
@ -1218,7 +1218,7 @@ ChooseNextMon:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; called when player is out of usable mons.
|
; called when player is out of usable mons.
|
||||||
; prints approriate lose message, sets carry flag if player blacked out (special case for initial rival fight)
|
; prints appropriate lose message, sets carry flag if player blacked out (special case for initial rival fight)
|
||||||
HandlePlayerBlackOut:
|
HandlePlayerBlackOut:
|
||||||
ld a, [wLinkState]
|
ld a, [wLinkState]
|
||||||
cp LINK_STATE_BATTLING
|
cp LINK_STATE_BATTLING
|
||||||
|
@ -3550,7 +3550,7 @@ CheckPlayerStatusConditions:
|
||||||
ld c,[hl]
|
ld c,[hl]
|
||||||
ld hl,wPlayerBideAccumulatedDamage + 1
|
ld hl,wPlayerBideAccumulatedDamage + 1
|
||||||
ld a,[hl]
|
ld a,[hl]
|
||||||
add c ; acumulate damage taken
|
add c ; accumulate damage taken
|
||||||
ld [hld],a
|
ld [hld],a
|
||||||
ld a,[hl]
|
ld a,[hl]
|
||||||
adc b
|
adc b
|
||||||
|
@ -4286,7 +4286,7 @@ GetDamageVarsForPlayerAttack:
|
||||||
sla c
|
sla c
|
||||||
rl b
|
rl b
|
||||||
; reflect and light screen boosts do not cap the stat at 999, so weird things will happen during stats scaling if
|
; reflect and light screen boosts do not cap the stat at 999, so weird things will happen during stats scaling if
|
||||||
; a Pokemon with 512 or more Defense has ued Reflect, or if a Pokemon with 512 or more Special has used Light Screen
|
; a Pokemon with 512 or more Defense has used Reflect, or if a Pokemon with 512 or more Special has used Light Screen
|
||||||
.specialAttackCritCheck
|
.specialAttackCritCheck
|
||||||
ld hl, wBattleMonSpecial
|
ld hl, wBattleMonSpecial
|
||||||
ld a, [wCriticalHitOrOHKO]
|
ld a, [wCriticalHitOrOHKO]
|
||||||
|
@ -4399,7 +4399,7 @@ GetDamageVarsForEnemyAttack:
|
||||||
sla c
|
sla c
|
||||||
rl b
|
rl b
|
||||||
; reflect and light screen boosts do not cap the stat at 999, so weird things will happen during stats scaling if
|
; reflect and light screen boosts do not cap the stat at 999, so weird things will happen during stats scaling if
|
||||||
; a Pokemon with 512 or more Defense has ued Reflect, or if a Pokemon with 512 or more Special has used Light Screen
|
; a Pokemon with 512 or more Defense has used Reflect, or if a Pokemon with 512 or more Special has used Light Screen
|
||||||
.specialAttackCritCheck
|
.specialAttackCritCheck
|
||||||
ld hl, wEnemyMonSpecial
|
ld hl, wEnemyMonSpecial
|
||||||
ld a, [wCriticalHitOrOHKO]
|
ld a, [wCriticalHitOrOHKO]
|
||||||
|
@ -7291,16 +7291,16 @@ PoisonEffect:
|
||||||
ld de, wEnemyMoveEffect
|
ld de, wEnemyMoveEffect
|
||||||
.poisonEffect
|
.poisonEffect
|
||||||
call CheckTargetSubstitute
|
call CheckTargetSubstitute
|
||||||
jr nz, .noEffect ; can't posion a substitute target
|
jr nz, .noEffect ; can't poison a substitute target
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
and a
|
and a
|
||||||
jr nz, .noEffect ; miss if target is already statused
|
jr nz, .noEffect ; miss if target is already statused
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp POISON ; can't posion a poison-type target
|
cp POISON ; can't poison a poison-type target
|
||||||
jr z, .noEffect
|
jr z, .noEffect
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
cp POISON ; can't posion a poison-type target
|
cp POISON ; can't poison a poison-type target
|
||||||
jr z, .noEffect
|
jr z, .noEffect
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
cp POISON_SIDE_EFFECT1
|
cp POISON_SIDE_EFFECT1
|
||||||
|
@ -7780,7 +7780,7 @@ StatModifierDownEffect:
|
||||||
jp nz, MoveMissed
|
jp nz, MoveMissed
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
sub ATTACK_DOWN1_EFFECT
|
sub ATTACK_DOWN1_EFFECT
|
||||||
cp EVASION_DOWN1_EFFECT + $3 - ATTACK_DOWN1_EFFECT ; covers al -1 effects
|
cp EVASION_DOWN1_EFFECT + $3 - ATTACK_DOWN1_EFFECT ; covers all -1 effects
|
||||||
jr c, .decrementStatMod
|
jr c, .decrementStatMod
|
||||||
sub ATTACK_DOWN2_EFFECT - ATTACK_DOWN1_EFFECT ; map -2 effects to corresponding -1 effect
|
sub ATTACK_DOWN2_EFFECT - ATTACK_DOWN1_EFFECT ; map -2 effects to corresponding -1 effect
|
||||||
.decrementStatMod
|
.decrementStatMod
|
||||||
|
|
|
@ -186,7 +186,7 @@ SetupPlayerAndEnemyPokeballs:
|
||||||
ld hl, wOAMBuffer + $18
|
ld hl, wOAMBuffer + $18
|
||||||
jp WritePokeballOAMData
|
jp WritePokeballOAMData
|
||||||
|
|
||||||
; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (faited) and pokeball slot (no mon)
|
; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (fainted) and pokeball slot (no mon)
|
||||||
PokeballTileGraphics::
|
PokeballTileGraphics::
|
||||||
INCBIN "gfx/pokeball.2bpp"
|
INCBIN "gfx/pokeball.2bpp"
|
||||||
PokeballTileGraphicsEnd:
|
PokeballTileGraphicsEnd:
|
||||||
|
|
|
@ -76,7 +76,7 @@ HealEffect_:
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
sbc [hl]
|
sbc [hl]
|
||||||
jr c, .playAnim
|
jr c, .playAnim
|
||||||
; copy max HP to current HP if an overflow ocurred
|
; copy max HP to current HP if an overflow occurred
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld [wHPBarNewHP+1], a
|
ld [wHPBarNewHP+1], a
|
||||||
|
|
|
@ -25,7 +25,7 @@ RecoilEffect_:
|
||||||
jr nz, .updateHP
|
jr nz, .updateHP
|
||||||
inc c ; minimum recoil damage is 1
|
inc c ; minimum recoil damage is 1
|
||||||
.updateHP
|
.updateHP
|
||||||
; substract HP from user due to the recoil damage
|
; subtract HP from user due to the recoil damage
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wHPBarMaxHP+1], a
|
ld [wHPBarMaxHP+1], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
|
|
|
@ -37,9 +37,9 @@ SubstituteEffect_:
|
||||||
sbc 0
|
sbc 0
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .notEnoughHP ; underflow means user would be left with negative health
|
jr c, .notEnoughHP ; underflow means user would be left with negative health
|
||||||
; bug: since it only brances on carry, it will possibly leave user with 0 HP
|
; bug: since it only branches on carry, it will possibly leave user with 0 HP
|
||||||
.userHasZeroOrMoreHP
|
.userHasZeroOrMoreHP
|
||||||
ldi [hl], a ; save resulting HP after substraction into current HP
|
ldi [hl], a ; save resulting HP after subtraction into current HP
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
ld h, b
|
ld h, b
|
||||||
ld l, c
|
ld l, c
|
||||||
|
|
|
@ -114,7 +114,7 @@ AIMoveChoiceModification1:
|
||||||
ld a, [wBattleMonStatus]
|
ld a, [wBattleMonStatus]
|
||||||
and a
|
and a
|
||||||
ret z ; return if no status ailment on player's mon
|
ret z ; return if no status ailment on player's mon
|
||||||
ld hl, wBuffer - 1 ; temp move selection array (-1 byte offest)
|
ld hl, wBuffer - 1 ; temp move selection array (-1 byte offset)
|
||||||
ld de, wEnemyMonMoves ; enemy moves
|
ld de, wEnemyMonMoves ; enemy moves
|
||||||
ld b, NUM_MOVES + 1
|
ld b, NUM_MOVES + 1
|
||||||
.nextMove
|
.nextMove
|
||||||
|
@ -154,7 +154,7 @@ StatusAilmentMoveEffects:
|
||||||
|
|
||||||
; slightly encourage moves with specific effects.
|
; slightly encourage moves with specific effects.
|
||||||
; in particular, stat-modifying moves and other move effects
|
; in particular, stat-modifying moves and other move effects
|
||||||
; that fall in-bewteen
|
; that fall in-between
|
||||||
AIMoveChoiceModification2:
|
AIMoveChoiceModification2:
|
||||||
ld a, [wAILayer2Encouragement]
|
ld a, [wAILayer2Encouragement]
|
||||||
cp $1
|
cp $1
|
||||||
|
@ -212,7 +212,7 @@ AIMoveChoiceModification3:
|
||||||
cp $10
|
cp $10
|
||||||
jr z, .nextMove
|
jr z, .nextMove
|
||||||
jr c, .notEffectiveMove
|
jr c, .notEffectiveMove
|
||||||
dec [hl] ; sligthly encourage this move
|
dec [hl] ; slightly encourage this move
|
||||||
jr .nextMove
|
jr .nextMove
|
||||||
.notEffectiveMove ; discourages non-effective moves if better moves are available
|
.notEffectiveMove ; discourages non-effective moves if better moves are available
|
||||||
push hl
|
push hl
|
||||||
|
@ -253,7 +253,7 @@ AIMoveChoiceModification3:
|
||||||
pop hl
|
pop hl
|
||||||
and a
|
and a
|
||||||
jr z, .nextMove
|
jr z, .nextMove
|
||||||
inc [hl] ; sligthly discourage this move
|
inc [hl] ; slightly discourage this move
|
||||||
jr .nextMove
|
jr .nextMove
|
||||||
AIMoveChoiceModification4:
|
AIMoveChoiceModification4:
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -54,7 +54,7 @@ KabutopsFossilText:
|
||||||
|
|
||||||
DisplayMonFrontSpriteInBox:
|
DisplayMonFrontSpriteInBox:
|
||||||
; Displays a pokemon's front sprite in a pop-up window.
|
; Displays a pokemon's front sprite in a pop-up window.
|
||||||
; [wcf91] = pokemon interal id number
|
; [wcf91] = pokemon internal id number
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [H_AUTOBGTRANSFERENABLED], a
|
ld [H_AUTOBGTRANSFERENABLED], a
|
||||||
call Delay3
|
call Delay3
|
||||||
|
|
|
@ -863,7 +863,7 @@ ItemUseMedicine:
|
||||||
jp nc,.useVitamin ; if it's a vitamin or Rare Candy
|
jp nc,.useVitamin ; if it's a vitamin or Rare Candy
|
||||||
cp a,FULL_RESTORE
|
cp a,FULL_RESTORE
|
||||||
jr nc,.healHP ; if it's a Full Restore or one of the potions
|
jr nc,.healHP ; if it's a Full Restore or one of the potions
|
||||||
; fall through if it's one of the status-specifc healing items
|
; fall through if it's one of the status-specific healing items
|
||||||
.cureStatusAilment
|
.cureStatusAilment
|
||||||
ld bc,wPartyMon1Status - wPartyMon1
|
ld bc,wPartyMon1Status - wPartyMon1
|
||||||
add hl,bc ; hl now points to status
|
add hl,bc ; hl now points to status
|
||||||
|
|
|
@ -185,7 +185,7 @@ TryingToLearn:
|
||||||
|
|
||||||
LearnedMove1Text:
|
LearnedMove1Text:
|
||||||
TX_FAR _LearnedMove1Text
|
TX_FAR _LearnedMove1Text
|
||||||
TX_SFX_ITEM_1 ; plays SFX_GET_ITEM_1 in the pary menu (rare candy) and plays SFX_LEVEL_UP in battle
|
TX_SFX_ITEM_1 ; plays SFX_GET_ITEM_1 in the party menu (rare candy) and plays SFX_LEVEL_UP in battle
|
||||||
TX_BLINK
|
TX_BLINK
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ DrawStartMenu:
|
||||||
set 6,[hl] ; no pauses between printing each letter
|
set 6,[hl] ; no pauses between printing each letter
|
||||||
coord hl, 12, 2
|
coord hl, 12, 2
|
||||||
CheckEvent EVENT_GOT_POKEDEX
|
CheckEvent EVENT_GOT_POKEDEX
|
||||||
; case for not having pokdex
|
; case for not having pokedex
|
||||||
ld a,$06
|
ld a,$06
|
||||||
jr z,.storeMenuItemCount
|
jr z,.storeMenuItemCount
|
||||||
; case for having pokedex
|
; case for having pokedex
|
||||||
|
|
|
@ -409,7 +409,7 @@ PrintNicknameAndUnderscores:
|
||||||
call EraseMenuCursor
|
call EraseMenuCursor
|
||||||
ld a, $11 ; "ED" x coord
|
ld a, $11 ; "ED" x coord
|
||||||
ld [wTopMenuItemX], a
|
ld [wTopMenuItemX], a
|
||||||
ld a, $5 ; "ED" y corrd
|
ld a, $5 ; "ED" y coord
|
||||||
ld [wCurrentMenuItem], a
|
ld [wCurrentMenuItem], a
|
||||||
ld a, [wNamingScreenType]
|
ld a, [wNamingScreenType]
|
||||||
cp NAME_MON_SCREEN
|
cp NAME_MON_SCREEN
|
||||||
|
|
|
@ -647,7 +647,7 @@ PokedexToIndex:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
IndexToPokedex:
|
IndexToPokedex:
|
||||||
; converts the indexédex number at wd11e to a Pokédex number
|
; converts the index number at wd11e to a Pokédex number
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
ld a,[wd11e]
|
ld a,[wd11e]
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
; $C1X* and $C2X* are used to denote wSpriteStateData1-wSpriteStateData1 + $ff and wSpriteStateData2 + $00-wSpriteStateData2 + $ff sprite slot
|
; $C1X* and $C2X* are used to denote wSpriteStateData1-wSpriteStateData1 + $ff and wSpriteStateData2 + $00-wSpriteStateData2 + $ff sprite slot
|
||||||
; fields, respectively, within loops. The X is the loop index.
|
; fields, respectively, within loops. The X is the loop index.
|
||||||
; If there is an inner loop, Y is the inner loop index, i.e. $C1Y* and $C2Y*
|
; If there is an inner loop, Y is the inner loop index, i.e. $C1Y* and $C2Y*
|
||||||
; denote fields of the sprite slots interated over in the inner loop.
|
; denote fields of the sprite slots iterated over in the inner loop.
|
||||||
InitMapSprites:
|
InitMapSprites:
|
||||||
call InitOutsideMapSprites
|
call InitOutsideMapSprites
|
||||||
ret c ; return if the map is an outside map (already handled by above call)
|
ret c ; return if the map is an outside map (already handled by above call)
|
||||||
|
@ -192,7 +192,7 @@ LoadMapSpriteTilePatterns:
|
||||||
pop de
|
pop de
|
||||||
call FarCopyData2 ; load tile pattern data for sprite when walking
|
call FarCopyData2 ; load tile pattern data for sprite when walking
|
||||||
jr .skipSecondLoad
|
jr .skipSecondLoad
|
||||||
; When reloading the upper half of tile patterns after diplaying text, the LCD
|
; When reloading the upper half of tile patterns after displaying text, the LCD
|
||||||
; will be on, so CopyVideoData (which writes to VRAM only during V-blank) must
|
; will be on, so CopyVideoData (which writes to VRAM only during V-blank) must
|
||||||
; be used instead of FarCopyData2.
|
; be used instead of FarCopyData2.
|
||||||
.loadWhileLCDOn
|
.loadWhileLCDOn
|
||||||
|
|
|
@ -331,9 +331,9 @@ UpdateSpriteInWalkingAnimation:
|
||||||
ld a, [H_CURRENTSPRITEOFFSET]
|
ld a, [H_CURRENTSPRITEOFFSET]
|
||||||
ld l, a
|
ld l, a
|
||||||
inc h
|
inc h
|
||||||
ld a, [hl] ; c2x0 (walk animantion counter)
|
ld a, [hl] ; c2x0 (walk animation counter)
|
||||||
dec a
|
dec a
|
||||||
ld [hl], a ; update walk animantion counter
|
ld [hl], a ; update walk animation counter
|
||||||
ret nz
|
ret nz
|
||||||
ld a, $6 ; walking finished, update state
|
ld a, $6 ; walking finished, update state
|
||||||
add l
|
add l
|
||||||
|
@ -446,7 +446,7 @@ InitializeSpriteStatus:
|
||||||
ld [hl], a ; $c2x3: set X displacement to 8
|
ld [hl], a ; $c2x3: set X displacement to 8
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; calculates the spprite's scrren position form its map position and the player position
|
; calculates the sprite's screen position form its map position and the player position
|
||||||
InitializeSpriteScreenPosition:
|
InitializeSpriteScreenPosition:
|
||||||
ld h, wSpriteStateData2 / $100
|
ld h, wSpriteStateData2 / $100
|
||||||
ld a, [H_CURRENTSPRITEOFFSET]
|
ld a, [H_CURRENTSPRITEOFFSET]
|
||||||
|
@ -685,7 +685,7 @@ CanWalkOntoTile:
|
||||||
scf ; set carry (marking failure to walk)
|
scf ; set carry (marking failure to walk)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; calculates the tile pointer pointing to the tile the current sprite stancs on
|
; calculates the tile pointer pointing to the tile the current sprite stands on
|
||||||
; this is always the lower left tile of the 2x2 tile blocks all sprites are snapped to
|
; this is always the lower left tile of the 2x2 tile blocks all sprites are snapped to
|
||||||
; hl: output pointer
|
; hl: output pointer
|
||||||
GetTileSpriteStandsOn:
|
GetTileSpriteStandsOn:
|
||||||
|
|
6
home.asm
6
home.asm
|
@ -2083,7 +2083,7 @@ DisableWaitingAfterTextDisplay::
|
||||||
; [wcf91] = item ID
|
; [wcf91] = item ID
|
||||||
; OUTPUT:
|
; OUTPUT:
|
||||||
; [wActionResultOrTookBattleTurn] = success
|
; [wActionResultOrTookBattleTurn] = success
|
||||||
; 00: unsucessful
|
; 00: unsuccessful
|
||||||
; 01: successful
|
; 01: successful
|
||||||
; 02: not able to be used right now, no extra menu displayed (only certain items use this)
|
; 02: not able to be used right now, no extra menu displayed (only certain items use this)
|
||||||
UseItem::
|
UseItem::
|
||||||
|
@ -3382,7 +3382,7 @@ CopyString::
|
||||||
; this function is used when lower button sensitivity is wanted (e.g. menus)
|
; this function is used when lower button sensitivity is wanted (e.g. menus)
|
||||||
; OUTPUT: [hJoy5] = pressed buttons in usual format
|
; OUTPUT: [hJoy5] = pressed buttons in usual format
|
||||||
; there are two flags that control its functionality, [hJoy6] and [hJoy7]
|
; there are two flags that control its functionality, [hJoy6] and [hJoy7]
|
||||||
; there are esentially three modes of operation
|
; there are essentially three modes of operation
|
||||||
; 1. Get newly pressed buttons only
|
; 1. Get newly pressed buttons only
|
||||||
; ([hJoy7] == 0, [hJoy6] == any)
|
; ([hJoy7] == 0, [hJoy6] == any)
|
||||||
; Just copies [hJoyPressed] to [hJoy5].
|
; Just copies [hJoyPressed] to [hJoy5].
|
||||||
|
@ -3730,7 +3730,7 @@ CalcStat::
|
||||||
ld a, b
|
ld a, b
|
||||||
add e
|
add e
|
||||||
jr nc, .noCarry2
|
jr nc, .noCarry2
|
||||||
inc d ; da = (Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4
|
inc d ; de = (Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4
|
||||||
.noCarry2
|
.noCarry2
|
||||||
ld [H_MULTIPLICAND+2], a
|
ld [H_MULTIPLICAND+2], a
|
||||||
ld a, d
|
ld a, d
|
||||||
|
|
2
hram.asm
2
hram.asm
|
@ -98,7 +98,7 @@ hSwapTemp EQU $FF95
|
||||||
|
|
||||||
hExperience EQU $FF96 ; 3 bytes, big endian
|
hExperience EQU $FF96 ; 3 bytes, big endian
|
||||||
|
|
||||||
; Multiplcation and division variables are meant
|
; Multiplication and division variables are meant
|
||||||
; to overlap for back-to-back usage. Big endian.
|
; to overlap for back-to-back usage. Big endian.
|
||||||
|
|
||||||
H_MULTIPLICAND EQU $FF96 ; 3 bytes
|
H_MULTIPLICAND EQU $FF96 ; 3 bytes
|
||||||
|
|
|
@ -146,7 +146,7 @@ ENDM
|
||||||
;\6 (flag) = add 3 to width of connection strip (why?)
|
;\6 (flag) = add 3 to width of connection strip (why?)
|
||||||
SOUTH_MAP_CONNECTION: MACRO
|
SOUTH_MAP_CONNECTION: MACRO
|
||||||
db \2 ; map id
|
db \2 ; map id
|
||||||
dw \5 + \4 ; "Conection Strip" location
|
dw \5 + \4 ; "Connection Strip" location
|
||||||
dw wOverworldMap + 3 + (\1_HEIGHT + 3) * (\1_WIDTH + 6) + \3 ; current map position
|
dw wOverworldMap + 3 + (\1_HEIGHT + 3) * (\1_WIDTH + 6) + \3 ; current map position
|
||||||
IF (\1_WIDTH < \2_WIDTH)
|
IF (\1_WIDTH < \2_WIDTH)
|
||||||
IF (_NARG > 5)
|
IF (_NARG > 5)
|
||||||
|
|
10
wram.asm
10
wram.asm
|
@ -1735,7 +1735,7 @@ wPlayerBattleStatus3:: ; d064
|
||||||
; bit 0 - toxic
|
; bit 0 - toxic
|
||||||
; bit 1 - light screen
|
; bit 1 - light screen
|
||||||
; bit 2 - reflect
|
; bit 2 - reflect
|
||||||
; bit 3 - tranformed
|
; bit 3 - transformed
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wEnemyStatsToDouble:: ; d065
|
wEnemyStatsToDouble:: ; d065
|
||||||
|
@ -2046,7 +2046,7 @@ wPredefBank:: ; d0b7
|
||||||
wMonHeader:: ; d0b8
|
wMonHeader:: ; d0b8
|
||||||
|
|
||||||
wMonHIndex:: ; d0b8
|
wMonHIndex:: ; d0b8
|
||||||
; In the ROM base stats data stucture, this is the dex number, but it is
|
; In the ROM base stats data structure, this is the dex number, but it is
|
||||||
; overwritten with the internal index number after the header is copied to WRAM.
|
; overwritten with the internal index number after the header is copied to WRAM.
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
|
@ -3057,7 +3057,7 @@ wd732:: ; d732
|
||||||
; bit 1: remnant of debug mode? not set by the game code.
|
; bit 1: remnant of debug mode? not set by the game code.
|
||||||
; if it is set
|
; if it is set
|
||||||
; 1. skips most of Prof. Oak's speech, and uses NINTEN as the player's name and SONY as the rival's name
|
; 1. skips most of Prof. Oak's speech, and uses NINTEN as the player's name and SONY as the rival's name
|
||||||
; 2. does not have the player start in floor two of the playyer's house (instead sending them to [wLastMap])
|
; 2. does not have the player start in floor two of the player's house (instead sending them to [wLastMap])
|
||||||
; 3. allows wild battles to be avoided by holding down B
|
; 3. allows wild battles to be avoided by holding down B
|
||||||
; bit 2: the target warp is a fly warp (bit 3 set or blacked out) or a dungeon warp (bit 4 set)
|
; bit 2: the target warp is a fly warp (bit 3 set or blacked out) or a dungeon warp (bit 4 set)
|
||||||
; bit 3: used warp pad, escape rope, dig, teleport, or fly, so the target warp is a "fly warp"
|
; bit 3: used warp pad, escape rope, dig, teleport, or fly, so the target warp is a "fly warp"
|
||||||
|
@ -3085,7 +3085,7 @@ wd736:: ; d736
|
||||||
; bit 1: the player is currently stepping down from a door
|
; bit 1: the player is currently stepping down from a door
|
||||||
; bit 2: standing on a warp
|
; bit 2: standing on a warp
|
||||||
; bit 6: jumping down a ledge / fishing animation
|
; bit 6: jumping down a ledge / fishing animation
|
||||||
; bit 7: player sprite spinning due to spin tiles (Rocket hidehout / Viridian Gym)
|
; bit 7: player sprite spinning due to spin tiles (Rocket hideout / Viridian Gym)
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wCompletedInGameTradeFlags:: ; d737
|
wCompletedInGameTradeFlags:: ; d737
|
||||||
|
@ -3168,7 +3168,7 @@ wUnusedDA38:: ; da38
|
||||||
|
|
||||||
wCurMapScript:: ; da39
|
wCurMapScript:: ; da39
|
||||||
; index of current map script, mostly used as index for function pointer array
|
; index of current map script, mostly used as index for function pointer array
|
||||||
; mostly copied from map-specific map script pointer and wirtten back later
|
; mostly copied from map-specific map script pointer and written back later
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
ds 7
|
ds 7
|
||||||
|
|
Loading…
Reference in a new issue