Remove address comments in docs

This commit is contained in:
Rangi 2018-06-24 21:45:12 -04:00
parent 9afaed9b8f
commit 6e44095c2a
3 changed files with 47 additions and 59 deletions

View File

@ -162,7 +162,7 @@ This is a bug with `DittoMetalPowder` in [engine/battle/effect_commands.asm](/en
This is a bug with `BattleCommand_BellyDrum` in [engine/battle/move_effects/belly_drum.asm](/engine/battle/move_effects/belly_drum.asm): This is a bug with `BattleCommand_BellyDrum` in [engine/battle/move_effects/belly_drum.asm](/engine/battle/move_effects/belly_drum.asm):
```asm ```asm
BattleCommand_BellyDrum: ; 37c1a BattleCommand_BellyDrum:
; bellydrum ; bellydrum
; This command is buggy because it raises the user's attack ; This command is buggy because it raises the user's attack
; before checking that it has enough HP to use the move. ; before checking that it has enough HP to use the move.
@ -180,7 +180,7 @@ BattleCommand_BellyDrum: ; 37c1a
**Fix:** **Fix:**
```asm ```asm
BattleCommand_BellyDrum: ; 37c1a BattleCommand_BellyDrum:
; bellydrum ; bellydrum
callfar GetHalfMaxHP callfar GetHalfMaxHP
callfar CheckUserHasEnoughHP callfar CheckUserHasEnoughHP
@ -293,7 +293,7 @@ This bug affects Attract, Curse, Foresight, Mean Look, Mimic, Nightmare, Spider
This is a bug with `CheckHiddenOpponent` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm): This is a bug with `CheckHiddenOpponent` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm):
```asm ```asm
CheckHiddenOpponent: ; 37daa CheckHiddenOpponent:
; BUG: This routine should account for Lock-On and Mind Reader. ; BUG: This routine should account for Lock-On and Mind Reader.
ld a, BATTLE_VARS_SUBSTATUS3_OPP ld a, BATTLE_VARS_SUBSTATUS3_OPP
call GetBattleVar call GetBattleVar
@ -390,7 +390,7 @@ This is a bug in how `wAttackMissed` is never set by BeatUp, even when none of t
This bug can be fixed in a plethora of ways, but the most straight-forward would be in `BattleCommand_BeatUpFailText` in [engine/battle/move_effects/beat_up.asm](/engine/battle/move_effects/beat_up.asm), as that's always ran before the king's rock effect. This bug can be fixed in a plethora of ways, but the most straight-forward would be in `BattleCommand_BeatUpFailText` in [engine/battle/move_effects/beat_up.asm](/engine/battle/move_effects/beat_up.asm), as that's always ran before the king's rock effect.
```asm ```asm
BattleCommand_BeatUpFailText: ; 355b5 BattleCommand_BeatUpFailText:
; beatupfailtext ; beatupfailtext
ld a, [wBeatUpHitAtLeastOnce] ld a, [wBeatUpHitAtLeastOnce]
@ -403,7 +403,7 @@ BattleCommand_BeatUpFailText: ; 355b5
**Fix:** **Fix:**
```asm ```asm
BattleCommand_BeatUpFailText: ; 355b5 BattleCommand_BeatUpFailText:
; beatupfailtext ; beatupfailtext
ld a, [wBeatUpHitAtLeastOnce] ld a, [wBeatUpHitAtLeastOnce]
@ -428,7 +428,7 @@ This bug existed for all battles in Gold and Silver, and was only fixed for sing
This is a bug with `BattleCommand_Present` in [engine/battle/move_effects/present.asm](/engine/battle/move_effects/present.asm): This is a bug with `BattleCommand_Present` in [engine/battle/move_effects/present.asm](/engine/battle/move_effects/present.asm):
```asm ```asm
BattleCommand_Present: ; 37874 BattleCommand_Present:
; present ; present
ld a, [wLinkMode] ld a, [wLinkMode]
@ -451,7 +451,7 @@ BattleCommand_Present: ; 37874
**Fix:** **Fix:**
```asm ```asm
BattleCommand_Present: ; 37874 BattleCommand_Present:
; present ; present
push bc push bc
@ -484,13 +484,13 @@ This is a bug with `AI_Smart_MeanLook` in [engine/battle/ai/scoring.asm](/engine
In [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm): In [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm):
```asm ```asm
BattleCheckTypeMatchup: ; 347c8 BattleCheckTypeMatchup:
ld hl, wEnemyMonType1 ld hl, wEnemyMonType1
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, CheckTypeMatchup jr z, CheckTypeMatchup
ld hl, wBattleMonType1 ld hl, wBattleMonType1
CheckTypeMatchup: ; 347d3 CheckTypeMatchup:
; There is an incorrect assumption about this function made in the AI related code: when ; There is an incorrect assumption about this function made in the AI related code: when
; the AI calls CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing the ; the AI calls CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing the
; offensive type in a will make this function do the right thing. Since a is overwritten, ; offensive type in a will make this function do the right thing. Since a is overwritten,
@ -515,7 +515,7 @@ CheckTypeMatchup: ; 347d3
This is a bug with `AI_HealStatus` in [engine/battle/ai/items.asm](/engine/battle/ai/items.asm): This is a bug with `AI_HealStatus` in [engine/battle/ai/items.asm](/engine/battle/ai/items.asm):
```asm ```asm
AI_HealStatus: ; 384e0 AI_HealStatus:
ld a, [wCurOTMon] ld a, [wCurOTMon]
ld hl, wOTPartyMon1Status ld hl, wOTPartyMon1Status
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
@ -530,7 +530,6 @@ AI_HealStatus: ; 384e0
ld hl, wEnemySubStatus5 ld hl, wEnemySubStatus5
res SUBSTATUS_TOXIC, [hl] res SUBSTATUS_TOXIC, [hl]
ret ret
; 384f7
``` ```
**Fix:** Uncomment `ld hl, wEnemySubStatus1` and `res SUBSTATUS_NIGHTMARE, [hl]`. **Fix:** Uncomment `ld hl, wEnemySubStatus1` and `res SUBSTATUS_NIGHTMARE, [hl]`.
@ -600,7 +599,7 @@ This can bring Pokémon straight from level 1 to 100 by gaining just a few exper
This is a bug with `CalcExpAtLevel` in [engine/pokemon/experience.asm](/engine/pokemon/experience.asm): This is a bug with `CalcExpAtLevel` in [engine/pokemon/experience.asm](/engine/pokemon/experience.asm):
```asm ```asm
CalcExpAtLevel: ; 50e47 CalcExpAtLevel:
; (a/b)*n**3 + c*n**2 + d*n - e ; (a/b)*n**3 + c*n**2 + d*n - e
ld a, [wBaseGrowthRate] ld a, [wBaseGrowthRate]
add a add a
@ -614,7 +613,7 @@ CalcExpAtLevel: ; 50e47
**Fix:** **Fix:**
```asm ```asm
CalcExpAtLevel: ; 50e47 CalcExpAtLevel:
; (a/b)*n**3 + c*n**2 + d*n - e ; (a/b)*n**3 + c*n**2 + d*n - e
ld a, d ld a, d
cp 1 cp 1
@ -821,7 +820,7 @@ This is a bug with `HaircutOrGrooming` in [engine/events/haircut.asm](/engine/ev
INCLUDE "data/events/happiness_probabilities.asm" INCLUDE "data/events/happiness_probabilities.asm"
CopyPokemonName_Buffer1_Buffer3: ; 746e CopyPokemonName_Buffer1_Buffer3:
ld hl, wStringBuffer1 ld hl, wStringBuffer1
ld de, wStringBuffer3 ld de, wStringBuffer3
ld bc, MON_NAME_LENGTH ld bc, MON_NAME_LENGTH
@ -831,14 +830,14 @@ CopyPokemonName_Buffer1_Buffer3: ; 746e
In [data/events/happiness_probabilities.asm](/data/events/happiness_probabilities.asm): In [data/events/happiness_probabilities.asm](/data/events/happiness_probabilities.asm):
```asm ```asm
HappinessData_DaisysGrooming: ; 746b HappinessData_DaisysGrooming:
db $ff, 2, HAPPINESS_GROOMING ; 99.6% chance db $ff, 2, HAPPINESS_GROOMING ; 99.6% chance
``` ```
**Fix:** **Fix:**
```asm ```asm
HappinessData_DaisysGrooming: ; 746b HappinessData_DaisysGrooming:
db $80, 2, HAPPINESS_GROOMING ; 50% chance db $80, 2, HAPPINESS_GROOMING ; 50% chance
db $ff, 2, HAPPINESS_GROOMING ; 50% chance db $ff, 2, HAPPINESS_GROOMING ; 50% chance
``` ```
@ -916,7 +915,7 @@ This is a bug with `LoadEnemyMon.CheckMagikarpArea` in [engine/battle/core.asm](
This is a bug with `CalcMagikarpLength.BCLessThanDE` in [engine/events/magikarp.asm](/engine/events/magikarp.asm): This is a bug with `CalcMagikarpLength.BCLessThanDE` in [engine/events/magikarp.asm](/engine/events/magikarp.asm):
```asm ```asm
.BCLessThanDE: ; fbc9a .BCLessThanDE:
; Intention: Return bc < de. ; Intention: Return bc < de.
; Reality: Return b < d. ; Reality: Return b < d.
ld a, b ld a, b
@ -926,7 +925,6 @@ This is a bug with `CalcMagikarpLength.BCLessThanDE` in [engine/events/magikarp.
ld a, c ld a, c
cp e cp e
ret ret
; fbca1
``` ```
**Fix:** Delete `ret nc`. **Fix:** Delete `ret nc`.
@ -939,7 +937,7 @@ This is a bug with `CalcMagikarpLength.BCLessThanDE` in [engine/events/magikarp.
This is a bug with `StartTrainerBattle_DetermineWhichAnimation` in [engine/battle/battle_transition.asm](/engine/battle/battle_transition.asm): This is a bug with `StartTrainerBattle_DetermineWhichAnimation` in [engine/battle/battle_transition.asm](/engine/battle/battle_transition.asm):
```asm ```asm
StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365) StartTrainerBattle_DetermineWhichAnimation:
; The screen flashes a different number of times depending on the level of ; The screen flashes a different number of times depending on the level of
; your lead Pokemon relative to the opponent's. ; your lead Pokemon relative to the opponent's.
; BUG: wBattleMonLevel and wEnemyMonLevel are not set at this point, so whatever ; BUG: wBattleMonLevel and wEnemyMonLevel are not set at this point, so whatever
@ -966,15 +964,13 @@ StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
ld a, [hl] ld a, [hl]
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
; 8c38f (23:438f)
.StartingPoints: ; 8c38f .StartingPoints:
; entries correspond to TRANS_* constants ; entries correspond to TRANS_* constants
db BATTLETRANSITION_CAVE db BATTLETRANSITION_CAVE
db BATTLETRANSITION_CAVE_STRONGER db BATTLETRANSITION_CAVE_STRONGER
db BATTLETRANSITION_NO_CAVE db BATTLETRANSITION_NO_CAVE
db BATTLETRANSITION_NO_CAVE_STRONGER db BATTLETRANSITION_NO_CAVE_STRONGER
; 8c393
``` ```
*To do:* Fix this bug. *To do:* Fix this bug.
@ -1108,7 +1104,7 @@ This is a bug with `DoPlayerMovement.CheckWarp` in [engine/overworld/player_move
The exact cause is unknown, but a workaround exists for `DexEntryScreen_MenuActionJumptable.Cry` in [engine/pokedex/pokedex.asm](/engine/pokedex/pokedex.asm): The exact cause is unknown, but a workaround exists for `DexEntryScreen_MenuActionJumptable.Cry` in [engine/pokedex/pokedex.asm](/engine/pokedex/pokedex.asm):
```asm ```asm
.Cry: ; 40340 .Cry:
call Pokedex_GetSelectedMon call Pokedex_GetSelectedMon
ld a, [wd265] ld a, [wd265]
call GetCryIndex call GetCryIndex
@ -1121,7 +1117,7 @@ The exact cause is unknown, but a workaround exists for `DexEntryScreen_MenuActi
**Workaround:** **Workaround:**
```asm ```asm
.Cry: ; 40340 .Cry:
ld a, [wCurPartySpecies] ld a, [wCurPartySpecies]
call PlayMonCry call PlayMonCry
ret ret
@ -1365,7 +1361,7 @@ This is a bug with `PokeBallEffect` in [engine/items/item_effects.asm](/engine/i
This is a bug with `PlacePartyMonEvoStoneCompatibility.DetermineCompatibility` in [engine/pokemon/party_menu.asm](/engine/pokemon/party_menu.asm): This is a bug with `PlacePartyMonEvoStoneCompatibility.DetermineCompatibility` in [engine/pokemon/party_menu.asm](/engine/pokemon/party_menu.asm):
```asm ```asm
.DetermineCompatibility: ; 50268 .DetermineCompatibility:
ld de, wStringBuffer1 ld de, wStringBuffer1
ld a, BANK(EvosAttacksPointers) ld a, BANK(EvosAttacksPointers)
ld bc, 2 ld bc, 2
@ -1461,7 +1457,7 @@ ScriptCall:
In [engine/overworld/overworld.asm](/engine/overworld/overworld.asm): In [engine/overworld/overworld.asm](/engine/overworld/overworld.asm):
```asm ```asm
LoadSpriteGFX: ; 14306 LoadSpriteGFX:
; Bug: b is not preserved, so it's useless as a next count. ; Bug: b is not preserved, so it's useless as a next count.
; Uncomment the lines below to fix. ; Uncomment the lines below to fix.
@ -1487,7 +1483,6 @@ LoadSpriteGFX: ; 14306
; pop bc ; pop bc
ld a, l ld a, l
ret ret
; 1431e
``` ```
**Fix:** Uncomment `push bc` and `pop bc`. **Fix:** Uncomment `push bc` and `pop bc`.
@ -1498,7 +1493,7 @@ LoadSpriteGFX: ; 14306
In [engine/overworld/wildmons.asm](/engine/overworld/wildmons.asm): In [engine/overworld/wildmons.asm](/engine/overworld/wildmons.asm):
```asm ```asm
ChooseWildEncounter: ; 2a14f ChooseWildEncounter:
... ...
ld a, b ld a, b
ld [wCurPartyLevel], a ld [wCurPartyLevel], a
@ -1513,7 +1508,7 @@ ChooseWildEncounter: ; 2a14f
... ...
ValidateTempWildMonSpecies: ; 2a4a0 ValidateTempWildMonSpecies:
; Due to a development oversight, this function is called with the wild Pokemon's level, not its species, in a. ; Due to a development oversight, this function is called with the wild Pokemon's level, not its species, in a.
``` ```
@ -1564,7 +1559,7 @@ In [engine/overworld/events.asm](/engine/overworld/events.asm):
In [engine/events/bug_contest/contest_2.asm](/engine/events/bug_contest/contest_2.asm): In [engine/events/bug_contest/contest_2.asm](/engine/events/bug_contest/contest_2.asm):
```asm ```asm
CheckBugContestContestantFlag: ; 139ed CheckBugContestContestantFlag:
; Checks the flag of the Bug Catching Contestant whose index is loaded in a. ; Checks the flag of the Bug Catching Contestant whose index is loaded in a.
; Bug: If a >= NUM_BUG_CONTESTANTS when this is called, ; Bug: If a >= NUM_BUG_CONTESTANTS when this is called,
@ -1581,7 +1576,6 @@ CheckBugContestContestantFlag: ; 139ed
ld b, CHECK_FLAG ld b, CHECK_FLAG
call EventFlagAction call EventFlagAction
ret ret
; 139fe
INCLUDE "data/events/bug_contest_flags.asm" INCLUDE "data/events/bug_contest_flags.asm"
``` ```
@ -1594,7 +1588,7 @@ However, `a < NUM_BUG_CONTESTANTS` should always be true, so in practice this is
In [home/init.asm](/home/init.asm): In [home/init.asm](/home/init.asm):
```asm ```asm
ClearWRAM:: ; 25a ClearWRAM::
; Wipe swappable WRAM banks (1-7) ; Wipe swappable WRAM banks (1-7)
; Assumes CGB or AGB ; Assumes CGB or AGB
@ -1611,7 +1605,6 @@ ClearWRAM:: ; 25a
cp 8 cp 8
jr nc, .bank_loop ; Should be jr c jr nc, .bank_loop ; Should be jr c
ret ret
; 270
``` ```
**Fix:** Change `jr nc, .bank_loop` to `jr c, .bank_loop`. **Fix:** Change `jr nc, .bank_loop` to `jr c, .bank_loop`.

View File

@ -28,7 +28,7 @@ ENDM
The offset is translated into a correct bank by `FixPicBank` in [engine/gfx/load_pics.asm](/engine/gfx/load_pics.asm): The offset is translated into a correct bank by `FixPicBank` in [engine/gfx/load_pics.asm](/engine/gfx/load_pics.asm):
```asm ```asm
FixPicBank: ; 511c5 FixPicBank:
; This is a thing for some reason. ; This is a thing for some reason.
PICS_FIX EQU $36 PICS_FIX EQU $36
@ -46,7 +46,7 @@ GLOBAL PICS_FIX
pop hl pop hl
ret ret
.PicsBanks: ; 511d4 .PicsBanks:
db BANK("Pics 1") ; BANK("Pics 1") + 0 db BANK("Pics 1") ; BANK("Pics 1") + 0
db BANK("Pics 2") ; BANK("Pics 1") + 1 db BANK("Pics 2") ; BANK("Pics 1") + 1
db BANK("Pics 3") ; BANK("Pics 1") + 2 db BANK("Pics 3") ; BANK("Pics 1") + 2
@ -298,7 +298,7 @@ NUM_TMS = const_value - TM01 - 2 ; discount ITEM_C3 and ITEM_DC
`GetTMHMNumber` and `GetNumberedTMHM` in [engine/items/items.asm](/engine/items/items.asm) have to compensate for this: `GetTMHMNumber` and `GetNumberedTMHM` in [engine/items/items.asm](/engine/items/items.asm) have to compensate for this:
```asm ```asm
GetTMHMNumber:: ; d407 GetTMHMNumber::
; Return the number of a TM/HM by item id c. ; Return the number of a TM/HM by item id c.
ld a, c ld a, c
; Skip any dummy items. ; Skip any dummy items.
@ -315,7 +315,7 @@ GetTMHMNumber:: ; d407
ld c, a ld c, a
ret ret
GetNumberedTMHM: ; d417 GetNumberedTMHM:
; Return the item id of a TM/HM by number c. ; Return the item id of a TM/HM by number c.
ld a, c ld a, c
; Skip any gaps. ; Skip any gaps.
@ -341,7 +341,7 @@ Move `ITEM_C3` and `ITEM_DC` above all the TMs in every table of item data.
Modify engine/items/items.asm: Modify engine/items/items.asm:
```asm ```asm
GetTMHMNumber:: ; d407 GetTMHMNumber::
; Return the number of a TM/HM by item id c. ; Return the number of a TM/HM by item id c.
ld a, c ld a, c
sub TM01 sub TM01
@ -349,7 +349,7 @@ GetTMHMNumber:: ; d407
ld c, a ld c, a
ret ret
GetNumberedTMHM: ; d417 GetNumberedTMHM:
; Return the item id of a TM/HM by number c. ; Return the item id of a TM/HM by number c.
ld a, c ld a, c
add TM01 add TM01
@ -366,7 +366,7 @@ GetNumberedTMHM: ; d417
Three separate routines do the same derivation; `GetDexEntryPointer` in [engine/pokedex/pokedex_2.asm](/engine/pokedex/pokedex_2.asm): Three separate routines do the same derivation; `GetDexEntryPointer` in [engine/pokedex/pokedex_2.asm](/engine/pokedex/pokedex_2.asm):
```asm ```asm
GetDexEntryPointer: ; 44333 GetDexEntryPointer:
; return dex entry pointer b:de ; return dex entry pointer b:de
push hl push hl
ld hl, PokedexDataPointerTable ld hl, PokedexDataPointerTable
@ -460,7 +460,7 @@ PokedexShow_GetDexEntryBank:
`_Sine` in [engine/math/sine.asm](/engine/math/sine.asm): `_Sine` in [engine/math/sine.asm](/engine/math/sine.asm):
```asm ```asm
_Sine:: ; 84d9 _Sine::
; a = d * sin(e * pi/32) ; a = d * sin(e * pi/32)
ld a, e ld a, e
calc_sine_wave calc_sine_wave
@ -469,11 +469,11 @@ _Sine:: ; 84d9
`Sprites_Cosine` and `Sprites_Sine` in [engine/gfx/sprites.asm](/engine/gfx/sprites.asm): `Sprites_Cosine` and `Sprites_Sine` in [engine/gfx/sprites.asm](/engine/gfx/sprites.asm):
```asm ```asm
Sprites_Cosine: ; 8e72a Sprites_Cosine:
; a = d * cos(a * pi/32) ; a = d * cos(a * pi/32)
add %010000 ; cos(x) = sin(x + pi/2) add %010000 ; cos(x) = sin(x + pi/2)
; fallthrough ; fallthrough
Sprites_Sine: ; 8e72c Sprites_Sine:
; a = d * sin(a * pi/32) ; a = d * sin(a * pi/32)
calc_sine_wave calc_sine_wave
``` ```
@ -481,37 +481,34 @@ Sprites_Sine: ; 8e72c
`BattleAnim_Cosine` and `BattleAnim_Sine` in [engine/battle_anims/functions.asm](/engine/battle_anims/functions.asm): `BattleAnim_Cosine` and `BattleAnim_Sine` in [engine/battle_anims/functions.asm](/engine/battle_anims/functions.asm):
```asm ```asm
BattleAnim_Cosine: ; ce732 (33:6732) BattleAnim_Cosine:
; a = d * cos(a * pi/32) ; a = d * cos(a * pi/32)
add %010000 ; cos(x) = sin(x + pi/2) add %010000 ; cos(x) = sin(x + pi/2)
; fallthrough ; fallthrough
BattleAnim_Sine: ; ce734 (33:6734) BattleAnim_Sine:
; a = d * sin(a * pi/32) ; a = d * sin(a * pi/32)
calc_sine_wave BattleAnimSineWave calc_sine_wave BattleAnimSineWave
... ...
BattleAnimSineWave: ; ce77f BattleAnimSineWave:
sine_table 32 sine_table 32
; ce7bf
``` ```
`StartTrainerBattle_DrawSineWave` in [engine/battle/battle_transition.asm](/engine/battle/battle_transition.asm): `StartTrainerBattle_DrawSineWave` in [engine/battle/battle_transition.asm](/engine/battle/battle_transition.asm):
```asm ```asm
StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7) StartTrainerBattle_DrawSineWave:
calc_sine_wave calc_sine_wave
; 8c768
``` ```
And `CelebiEvent_Cosine` in [engine/events/celebi.asm](/engine/events/celebi.asm): And `CelebiEvent_Cosine` in [engine/events/celebi.asm](/engine/events/celebi.asm):
```asm ```asm
CelebiEvent_Cosine: ; 49b3b (12:5b3b) CelebiEvent_Cosine:
; a = d * cos(a * pi/32) ; a = d * cos(a * pi/32)
add %010000 ; cos(x) = sin(x + pi/2) add %010000 ; cos(x) = sin(x + pi/2)
calc_sine_wave calc_sine_wave
; 49bae
``` ```
They all rely on `calc_sine_wave` in [macros/code.asm](/macros/code.asm): They all rely on `calc_sine_wave` in [macros/code.asm](/macros/code.asm):
@ -586,7 +583,7 @@ ENDM
In [engine/tilesets/tileset_anims.asm](/engine/tilesets/tileset_anims.asm): In [engine/tilesets/tileset_anims.asm](/engine/tilesets/tileset_anims.asm):
```asm ```asm
GetForestTreeFrame: ; fc54c GetForestTreeFrame:
; Return 0 if a is even, or 2 if odd. ; Return 0 if a is even, or 2 if odd.
and a and a
jr z, .even jr z, .even
@ -609,16 +606,14 @@ GetForestTreeFrame: ; fc54c
.even .even
xor a xor a
ret ret
; fc56d
``` ```
**Fix:** **Fix:**
```asm ```asm
GetForestTreeFrame: ; fc54c GetForestTreeFrame:
; Return 0 if a is even, or 2 if odd. ; Return 0 if a is even, or 2 if odd.
and 1 and 1
add a add a
ret ret
; fc56d
``` ```

View File

@ -54,8 +54,8 @@ Call state for functions in `MenuData` of `ScrollingMenu`:
``` ```
All of them: All of them:
[MenuSelection] = Current item. -1 is the CANCEL item. [wMenuSelection] = Current item. -1 is the CANCEL item.
[MenuSelectionQuantity] = Quantity of the current item. [wMenuSelectionQuantity] = Quantity of the current item.
Function1: Called to display a menu entry. Function1: Called to display a menu entry.
de = Cursor position in TileMap de = Cursor position in TileMap
@ -90,7 +90,7 @@ db -1 ; cancel
... ...
``` ```
In case it's 1, `[MenuSelectionQuantity]` will simply contain the next entry. In case it's 1, `[wMenuSelectionQuantity]` will simply contain the next entry.
## `_2DMenu` ## `_2DMenu`
@ -208,7 +208,7 @@ StringPointers:
Call state for `DisplayFunction`: Call state for `DisplayFunction`:
``` ```
[MenuSelection] = Current item. -1 is the CANCEL item. [wMenuSelection] = Current item. -1 is the CANCEL item.
de = Cursor position in TileMap de = Cursor position in TileMap
``` ```