mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Sync with pokecrystal up to 8873506b1
This commit is contained in:
parent
193882bc77
commit
d6001be90c
44
README.md
44
README.md
@ -20,33 +20,35 @@ To set up the repository, see [INSTALL.md](INSTALL.md).
|
||||
- [**Documentation**][docs]
|
||||
- [**Wiki**][wiki] (includes [tutorials][tutorials])
|
||||
- [**Symbols**][symbols]
|
||||
- **Discord:** [pret][discord]
|
||||
- **IRC:** [libera#pret][irc]
|
||||
|
||||
Other disassembly projects:
|
||||
Other disassembly and/or decompilation projects:
|
||||
* [**Pokémon Red and Blue**](https://github.com/pret/pokered)
|
||||
* [**Pokémon Gold and Silver (Space World '97 demo)**](https://github.com/pret/pokegold-spaceworld)
|
||||
* [**Pokémon Yellow**](https://github.com/pret/pokeyellow)
|
||||
* [**Pokémon Trading Card Game**](https://github.com/pret/poketcg)
|
||||
* [**Pokémon Pinball**](https://github.com/pret/pokepinball)
|
||||
* [**Pokémon Stadium**](https://github.com/pret/pokestadium)
|
||||
* [**Pokémon Gold and Silver**](https://github.com/pret/pokegold)
|
||||
* [**Pokémon Ruby and Sapphire**](https://github.com/pret/pokeruby)
|
||||
* [**Pokémon Pinball: Ruby & Sapphire**](https://github.com/pret/pokepinballrs)
|
||||
* [**Pokémon FireRed and LeafGreen**](https://github.com/pret/pokefirered)
|
||||
* [**Pokémon Emerald**](https://github.com/pret/pokeemerald)
|
||||
* [**Pokémon Mystery Dungeon: Red Rescue Team**](https://github.com/pret/pmd-red)
|
||||
* [**Pokémon Diamond and Pearl**](https://github.com/pret/pokediamond)
|
||||
* [**Pokémon Platinum**](https://github.com/pret/pokeplatinum)
|
||||
* [**Pokémon HeartGold and SoulSilver**](https://github.com/pret/pokeheartgold)
|
||||
* [**Pokémon Mystery Dungeon: Explorers of Sky**](https://github.com/pret/pmd-sky)
|
||||
|
||||
- [**Pokémon Red/Blue**][pokered]
|
||||
- [**Pokémon Yellow**][pokeyellow]
|
||||
- [**Pokémon Gold/Silver**][pokegold]
|
||||
- [**Pokémon Pinball**][pokepinball]
|
||||
- [**Pokémon TCG**][poketcg]
|
||||
- [**Pokémon Ruby**][pokeruby]
|
||||
- [**Pokémon FireRed**][pokefirered]
|
||||
- [**Pokémon Emerald**][pokeemerald]
|
||||
## Contacts
|
||||
|
||||
You can find us on:
|
||||
|
||||
* [Discord (PRET, #pokecrystal)](https://discord.gg/d5dubZ3)
|
||||
* [IRC](https://web.libera.chat/?#pret)
|
||||
|
||||
[pokered]: https://github.com/pret/pokered
|
||||
[pokeyellow]: https://github.com/pret/pokeyellow
|
||||
[pokegold]: https://github.com/pret/pokegold
|
||||
[pokepinball]: https://github.com/pret/pokepinball
|
||||
[poketcg]: https://github.com/pret/poketcg
|
||||
[pokeruby]: https://github.com/pret/pokeruby
|
||||
[pokefirered]: https://github.com/pret/pokefirered
|
||||
[pokeemerald]: https://github.com/pret/pokeemerald
|
||||
[docs]: https://pret.github.io/pokecrystal/
|
||||
[wiki]: https://github.com/pret/pokecrystal/wiki
|
||||
[tutorials]: https://github.com/pret/pokecrystal/wiki/Tutorials
|
||||
[symbols]: https://github.com/pret/pokecrystal/tree/symbols
|
||||
[discord]: https://discord.gg/d5dubZ3
|
||||
[irc]: https://web.libera.chat/?#pret
|
||||
[ci]: https://github.com/pret/pokecrystal/actions
|
||||
[ci-badge]: https://github.com/pret/pokecrystal/actions/workflows/main.yml/badge.svg
|
||||
|
@ -713,6 +713,9 @@ DEF NUM_BATTLEANIMFRAMESETS EQU const_value
|
||||
const BATTLEANIMOAMSET_D7
|
||||
DEF NUM_BATTLEANIMOAMSETS EQU const_value
|
||||
|
||||
assert NUM_BATTLEANIMOAMSETS <= FIRST_OAM_CMD, \
|
||||
"BATTLEANIMOAMSET_* constants overlap oam*_command constants"
|
||||
|
||||
; BattleBGEffects indexes (see engine/battle_anims/bg_effects.asm)
|
||||
const_def 1
|
||||
const ANIM_BG_FLASH_INVERTED
|
||||
|
@ -90,7 +90,7 @@ DEF SPDSPCDV_SHINY EQU $AA
|
||||
const BATTLETYPE_FISH
|
||||
const BATTLETYPE_ROAMING
|
||||
const BATTLETYPE_CONTEST
|
||||
const BATTLETYPE_SHINY
|
||||
const BATTLETYPE_FORCESHINY
|
||||
const BATTLETYPE_TREE
|
||||
const BATTLETYPE_TRAP
|
||||
const BATTLETYPE_FORCEITEM
|
||||
|
@ -97,6 +97,7 @@ DEF RELATIVE_ATTRIBUTES EQU 1 << RELATIVE_ATTRIBUTES_F
|
||||
DEF ABSOLUTE_TILE_ID EQU 1 << ABSOLUTE_TILE_ID_F
|
||||
|
||||
; map_object struct members (see macros/ram.asm)
|
||||
; struct initialized by object_event macro (see macros/scripts/maps.asm)
|
||||
rsreset
|
||||
DEF MAPOBJECT_OBJECT_STRUCT_ID rb ; 0
|
||||
DEF MAPOBJECT_SPRITE rb ; 1
|
||||
|
@ -109,7 +109,8 @@ DEF CALLBACK_SIZE EQU 3 ; callback
|
||||
DEF WARP_EVENT_SIZE EQU 5 ; warp_event
|
||||
DEF COORD_EVENT_SIZE EQU 8 ; coord_event
|
||||
DEF BG_EVENT_SIZE EQU 5 ; bg_event
|
||||
DEF OBJECT_EVENT_SIZE EQU 13 ; object_event
|
||||
; An object_event is a map_object without its initial MAPOBJECT_OBJECT_STRUCT_ID or final padding
|
||||
DEF OBJECT_EVENT_SIZE EQU MAPOBJECT_LENGTH - 3 ; 13
|
||||
|
||||
; A coord_event for scene -1 will always activate,
|
||||
; regardless of the map's scene variable value.
|
||||
|
@ -370,3 +370,6 @@ DEF NUM_SPRITE_ANIM_FRAMESETS EQU const_value
|
||||
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_RIGHT_1 ; 9a
|
||||
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_RIGHT_2 ; 9b
|
||||
DEF NUM_SPRITE_ANIM_OAMSETS EQU const_value
|
||||
|
||||
assert NUM_SPRITE_ANIM_OAMSETS <= FIRST_OAM_CMD, \
|
||||
"SPRITE_ANIM_OAMSET_* constants overlap oam*_command constants"
|
||||
|
@ -31,52 +31,52 @@ MACRO connection
|
||||
|
||||
; Calculate tile offsets for source (current) and target maps
|
||||
DEF _src = 0
|
||||
DEF _tgt = (\4) + 3
|
||||
DEF _tgt = (\4) + MAP_CONNECTION_PADDING_WIDTH
|
||||
if _tgt < 0
|
||||
DEF _src = -_tgt
|
||||
DEF _tgt = 0
|
||||
endc
|
||||
|
||||
if !STRCMP("\1", "north")
|
||||
DEF _blk = \3_WIDTH * (\3_HEIGHT - 3) + _src
|
||||
DEF _blk = \3_WIDTH * (\3_HEIGHT - MAP_CONNECTION_PADDING_WIDTH) + _src
|
||||
DEF _map = _tgt
|
||||
DEF _win = (\3_WIDTH + 6) * \3_HEIGHT + 1
|
||||
DEF _win = (\3_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2) * \3_HEIGHT + 1
|
||||
DEF _y = \3_HEIGHT * 2 - 1
|
||||
DEF _x = (\4) * -2
|
||||
DEF _len = CURRENT_MAP_WIDTH + 3 - (\4)
|
||||
DEF _len = CURRENT_MAP_WIDTH + MAP_CONNECTION_PADDING_WIDTH - (\4)
|
||||
if _len > \3_WIDTH
|
||||
DEF _len = \3_WIDTH
|
||||
endc
|
||||
|
||||
elif !STRCMP("\1", "south")
|
||||
DEF _blk = _src
|
||||
DEF _map = (CURRENT_MAP_WIDTH + 6) * (CURRENT_MAP_HEIGHT + 3) + _tgt
|
||||
DEF _win = \3_WIDTH + 7
|
||||
DEF _map = (CURRENT_MAP_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2) * (CURRENT_MAP_HEIGHT + MAP_CONNECTION_PADDING_WIDTH) + _tgt
|
||||
DEF _win = \3_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2 + 1
|
||||
DEF _y = 0
|
||||
DEF _x = (\4) * -2
|
||||
DEF _len = CURRENT_MAP_WIDTH + 3 - (\4)
|
||||
DEF _len = CURRENT_MAP_WIDTH + MAP_CONNECTION_PADDING_WIDTH - (\4)
|
||||
if _len > \3_WIDTH
|
||||
DEF _len = \3_WIDTH
|
||||
endc
|
||||
|
||||
elif !STRCMP("\1", "west")
|
||||
DEF _blk = (\3_WIDTH * _src) + \3_WIDTH - 3
|
||||
DEF _map = (CURRENT_MAP_WIDTH + 6) * _tgt
|
||||
DEF _win = (\3_WIDTH + 6) * 2 - 6
|
||||
DEF _blk = (\3_WIDTH * _src) + \3_WIDTH - MAP_CONNECTION_PADDING_WIDTH
|
||||
DEF _map = (CURRENT_MAP_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2) * _tgt
|
||||
DEF _win = (\3_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2) * 2 - MAP_CONNECTION_PADDING_WIDTH * 2
|
||||
DEF _y = (\4) * -2
|
||||
DEF _x = \3_WIDTH * 2 - 1
|
||||
DEF _len = CURRENT_MAP_HEIGHT + 3 - (\4)
|
||||
DEF _len = CURRENT_MAP_HEIGHT + MAP_CONNECTION_PADDING_WIDTH - (\4)
|
||||
if _len > \3_HEIGHT
|
||||
DEF _len = \3_HEIGHT
|
||||
endc
|
||||
|
||||
elif !STRCMP("\1", "east")
|
||||
DEF _blk = (\3_WIDTH * _src)
|
||||
DEF _map = (CURRENT_MAP_WIDTH + 6) * _tgt + CURRENT_MAP_WIDTH + 3
|
||||
DEF _win = \3_WIDTH + 7
|
||||
DEF _map = (CURRENT_MAP_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2) * _tgt + CURRENT_MAP_WIDTH + MAP_CONNECTION_PADDING_WIDTH
|
||||
DEF _win = \3_WIDTH + MAP_CONNECTION_PADDING_WIDTH * 2 + 1
|
||||
DEF _y = (\4) * -2
|
||||
DEF _x = 0
|
||||
DEF _len = CURRENT_MAP_HEIGHT + 3 - (\4)
|
||||
DEF _len = CURRENT_MAP_HEIGHT + MAP_CONNECTION_PADDING_WIDTH - (\4)
|
||||
if _len > \3_HEIGHT
|
||||
DEF _len = \3_HEIGHT
|
||||
endc
|
||||
|
@ -1,6 +1,7 @@
|
||||
TypeNames:
|
||||
; entries correspond to types (see constants/type_constants.asm)
|
||||
table_width 2, TypeNames
|
||||
|
||||
dw Normal
|
||||
dw Fighting
|
||||
dw Flying
|
||||
@ -12,17 +13,13 @@ TypeNames:
|
||||
dw Ghost
|
||||
dw Steel
|
||||
assert_table_length UNUSED_TYPES
|
||||
|
||||
rept UNUSED_TYPES_END - UNUSED_TYPES - 1 ; discount CURSE_TYPE
|
||||
dw Normal
|
||||
dw Normal
|
||||
dw Normal
|
||||
dw Normal
|
||||
dw Normal
|
||||
dw Normal
|
||||
dw Normal
|
||||
dw Normal
|
||||
dw Normal
|
||||
endr
|
||||
dw CurseType
|
||||
assert_table_length UNUSED_TYPES_END
|
||||
|
||||
dw Fire
|
||||
dw Water
|
||||
dw Grass
|
||||
|
@ -59,6 +59,7 @@ Fixes in the [multi-player battle engine](#multi-player-battle-engine) category
|
||||
- [AI makes a false assumption about `CheckTypeMatchup`](#ai-makes-a-false-assumption-about-checktypematchup)
|
||||
- [AI use of Full Heal or Full Restore does not cure Nightmare status](#ai-use-of-full-heal-or-full-restore-does-not-cure-nightmare-status)
|
||||
- [AI use of Full Heal does not cure confusion status](#ai-use-of-full-heal-does-not-cure-confusion-status)
|
||||
- [AI might use its base reward value as an item](#ai-might-use-its-base-reward-value-as-an-item)
|
||||
- [Wild Pokémon can always Teleport regardless of level difference](#wild-pok%C3%A9mon-can-always-teleport-regardless-of-level-difference)
|
||||
- [`RIVAL2` has lower DVs than `RIVAL1`](#rival2-has-lower-dvs-than-rival1)
|
||||
- [`HELD_CATCH_CHANCE` has no effect](#held_catch_chance-has-no-effect)
|
||||
@ -1455,6 +1456,33 @@ Pryce's dialog ("That BADGE will raise the SPECIAL stats of POKéMON.") implies
|
||||
ret
|
||||
```
|
||||
|
||||
### AI might use its base reward value as an item
|
||||
|
||||
In the `AI_TryItem` routine, an item pointer is set to `wEnemyTrainerItem1` and then increments to `wEnemyTrainerItem2` to see if either of the AI's items are in the `AI_Items` list. However, if the AI has used its first item (or its first one is `ITEM_NONE`) and hasn't used its second item, the item pointer can increment from `wEnemyTrainerItem2` to `wEnemyTrainerBaseReward`. If the value at this address then matches an item in the `AI_Items` list, the AI could mistakenly use it.
|
||||
|
||||
**Fix:** Edit `AI_TryItem` in [engine/battle/ai/items.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/ai/items.asm):
|
||||
|
||||
```diff
|
||||
AI_TryItem:
|
||||
...
|
||||
ld a, [wTrainerClass]
|
||||
dec a
|
||||
ld hl, TrainerClassAttributes + TRNATTR_AI_ITEM_SWITCH
|
||||
ld bc, NUM_TRAINER_ATTRIBUTES
|
||||
call AddNTimes
|
||||
ld b, h
|
||||
ld c, l
|
||||
ld hl, AI_Items
|
||||
-; BUG: AI might use its base reward value as an item (see docs/bugs_and_glitches.md)
|
||||
- ld de, wEnemyTrainerItem1
|
||||
.loop
|
||||
+ ld de, wEnemyTrainerItem1
|
||||
ld a, [hl]
|
||||
and a
|
||||
inc a
|
||||
ret z
|
||||
```
|
||||
|
||||
|
||||
### Wild Pokémon can always Teleport regardless of level difference
|
||||
|
||||
|
@ -175,6 +175,7 @@ AI_TryItem:
|
||||
ld b, h
|
||||
ld c, l
|
||||
ld hl, AI_Items
|
||||
; BUG: AI might use its base reward value as an item (see docs/bugs_and_glitches.md)
|
||||
ld de, wEnemyTrainerItem1
|
||||
.loop
|
||||
ld a, [hl]
|
||||
|
@ -3522,7 +3522,7 @@ TryToRunAwayFromBattle:
|
||||
jp z, .cant_escape
|
||||
cp BATTLETYPE_CELEBI
|
||||
jp z, .cant_escape
|
||||
cp BATTLETYPE_SHINY
|
||||
cp BATTLETYPE_FORCESHINY
|
||||
jp z, .cant_escape
|
||||
cp BATTLETYPE_SUICUNE
|
||||
jp z, .cant_escape
|
||||
@ -5954,7 +5954,7 @@ LoadEnemyMon:
|
||||
|
||||
; Forced shiny battle type
|
||||
; Used by Red Gyarados at Lake of Rage
|
||||
cp BATTLETYPE_SHINY
|
||||
cp BATTLETYPE_FORCESHINY
|
||||
jr nz, .GenerateDVs
|
||||
|
||||
ld b, ATKDEFDV_SHINY ; $ea
|
||||
|
@ -4161,14 +4161,14 @@ RaiseStat:
|
||||
add hl, bc
|
||||
ld b, [hl]
|
||||
inc b
|
||||
ld a, $d
|
||||
ld a, MAX_STAT_LEVEL
|
||||
cp b
|
||||
jp c, .cant_raise_stat
|
||||
ld a, [wLoweredStat]
|
||||
and $f0
|
||||
jr z, .got_num_stages
|
||||
inc b
|
||||
ld a, $d
|
||||
ld a, MAX_STAT_LEVEL
|
||||
cp b
|
||||
jr nc, .got_num_stages
|
||||
ld b, a
|
||||
@ -4176,7 +4176,7 @@ RaiseStat:
|
||||
ld [hl], b
|
||||
push hl
|
||||
ld a, c
|
||||
cp $5
|
||||
cp ACCURACY
|
||||
jr nc, .done_calcing_stats
|
||||
ld hl, wBattleMonStats + 1
|
||||
ld de, wPlayerStats
|
||||
@ -4684,7 +4684,7 @@ LowerStat:
|
||||
.got_num_stages
|
||||
ld [hl], b
|
||||
ld a, c
|
||||
cp 5
|
||||
cp ACCURACY
|
||||
jr nc, .accuracy_evasion
|
||||
|
||||
push hl
|
||||
@ -4955,7 +4955,7 @@ SetBattleDraw:
|
||||
|
||||
BattleCommand_ForceSwitch:
|
||||
ld a, [wBattleType]
|
||||
cp BATTLETYPE_SHINY
|
||||
cp BATTLETYPE_FORCESHINY
|
||||
jp z, .fail
|
||||
cp BATTLETYPE_TRAP
|
||||
jp z, .fail
|
||||
|
@ -1,6 +1,6 @@
|
||||
BattleCommand_Teleport:
|
||||
ld a, [wBattleType]
|
||||
cp BATTLETYPE_SHINY
|
||||
cp BATTLETYPE_FORCESHINY
|
||||
jr z, .failed
|
||||
cp BATTLETYPE_TRAP
|
||||
jr z, .failed
|
||||
|
@ -20,11 +20,11 @@ ShowPlayerMonsRemaining:
|
||||
ld de, wPartyCount
|
||||
call StageBallTilesData
|
||||
; ldpixel wPlaceBallsX, 12, 12
|
||||
ld a, 12 * 8
|
||||
ld a, 12 * TILE_WIDTH
|
||||
ld hl, wPlaceBallsX
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ld a, 8
|
||||
ld a, TILE_WIDTH
|
||||
ld [wPlaceBallsDirection], a
|
||||
ld hl, wShadowOAMSprite00
|
||||
jp LoadTrainerHudOAM
|
||||
@ -36,10 +36,10 @@ ShowOTTrainerMonsRemaining:
|
||||
call StageBallTilesData
|
||||
; ldpixel wPlaceBallsX, 9, 4
|
||||
ld hl, wPlaceBallsX
|
||||
ld a, 9 * 8
|
||||
ld a, 9 * TILE_WIDTH
|
||||
ld [hli], a
|
||||
ld [hl], 4 * 8
|
||||
ld a, -8
|
||||
ld [hl], 4 * TILE_WIDTH
|
||||
ld a, -TILE_WIDTH
|
||||
ld [wPlaceBallsDirection], a
|
||||
ld hl, wShadowOAMSprite00 + PARTY_LENGTH * SPRITEOAMSTRUCT_LENGTH
|
||||
jp LoadTrainerHudOAM
|
||||
@ -182,10 +182,10 @@ LinkBattle_TrainerHuds:
|
||||
ld de, wPartyCount
|
||||
call StageBallTilesData
|
||||
ld hl, wPlaceBallsX
|
||||
ld a, 10 * 8
|
||||
ld a, 10 * TILE_WIDTH
|
||||
ld [hli], a
|
||||
ld [hl], 8 * 8
|
||||
ld a, 8
|
||||
ld [hl], 8 * TILE_WIDTH
|
||||
ld a, TILE_WIDTH
|
||||
ld [wPlaceBallsDirection], a
|
||||
ld hl, wShadowOAMSprite00
|
||||
call LoadTrainerHudOAM
|
||||
@ -194,9 +194,9 @@ LinkBattle_TrainerHuds:
|
||||
ld de, wOTPartyCount
|
||||
call StageBallTilesData
|
||||
ld hl, wPlaceBallsX
|
||||
ld a, 10 * 8
|
||||
ld a, 10 * TILE_WIDTH
|
||||
ld [hli], a
|
||||
ld [hl], 13 * 8
|
||||
ld [hl], 13 * TILE_WIDTH
|
||||
ld hl, wShadowOAMSprite00 + PARTY_LENGTH * SPRITEOAMSTRUCT_LENGTH
|
||||
jp LoadTrainerHudOAM
|
||||
|
||||
|
@ -243,7 +243,7 @@ InitBattleAnimBuffer:
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld d, a
|
||||
ld a, (-10 * 8) + 4
|
||||
ld a, (-10 * TILE_WIDTH) + 4
|
||||
sub d
|
||||
ld [wBattleAnimTempXCoord], a
|
||||
ld a, [hli]
|
||||
@ -251,7 +251,7 @@ InitBattleAnimBuffer:
|
||||
ld a, [wBattleAnimTempFixY]
|
||||
cp $ff
|
||||
jr nz, .check_kinesis_softboiled_milkdrink
|
||||
ld a, 5 * 8
|
||||
ld a, 5 * TILE_WIDTH
|
||||
add d
|
||||
jr .done
|
||||
|
||||
@ -270,7 +270,7 @@ InitBattleAnimBuffer:
|
||||
jr nz, .no_sub
|
||||
.do_sub
|
||||
pop af
|
||||
sub 1 * 8
|
||||
sub 1 * TILE_WIDTH
|
||||
jr .done
|
||||
|
||||
.no_sub
|
||||
|
@ -347,7 +347,7 @@ FlyToAnim:
|
||||
ld [hl], SPRITE_ANIM_SEQ_FLY_TO
|
||||
ld hl, SPRITEANIMSTRUCT_VAR4
|
||||
add hl, bc
|
||||
ld [hl], 11 * 8
|
||||
ld [hl], 11 * TILE_WIDTH
|
||||
ld a, 64
|
||||
ld [wFrameCounter], a
|
||||
.loop
|
||||
|
@ -675,7 +675,7 @@ Slots_InitReelTiles:
|
||||
ld [hl], d
|
||||
ld hl, REEL_X_COORD
|
||||
add hl, bc
|
||||
ld [hl], 6 * 8
|
||||
ld [hl], 6 * TILE_WIDTH
|
||||
call .OAM
|
||||
|
||||
ld bc, wReel2
|
||||
@ -693,7 +693,7 @@ Slots_InitReelTiles:
|
||||
ld [hl], d
|
||||
ld hl, REEL_X_COORD
|
||||
add hl, bc
|
||||
ld [hl], 10 * 8
|
||||
ld [hl], 10 * TILE_WIDTH
|
||||
call .OAM
|
||||
|
||||
ld bc, wReel3
|
||||
@ -711,7 +711,7 @@ Slots_InitReelTiles:
|
||||
ld [hl], d
|
||||
ld hl, REEL_X_COORD
|
||||
add hl, bc
|
||||
ld [hl], 14 * 8
|
||||
ld [hl], 14 * TILE_WIDTH
|
||||
call .OAM
|
||||
ret
|
||||
|
||||
@ -779,7 +779,7 @@ Slots_UpdateReelPositionAndOAM:
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld [wCurReelXCoord], a
|
||||
ld a, 10 * 8
|
||||
ld a, 10 * TILE_WIDTH
|
||||
ld [wCurReelYCoord], a
|
||||
ld hl, REEL_POSITION
|
||||
add hl, bc
|
||||
@ -2010,7 +2010,7 @@ Slots_AnimateGolem:
|
||||
jr c, .play_sound
|
||||
dec [hl]
|
||||
ld e, a
|
||||
ld d, 14 * 8
|
||||
ld d, 14 * TILE_WIDTH
|
||||
farcall BattleAnim_Sine_e
|
||||
ld a, e
|
||||
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
||||
@ -2037,7 +2037,7 @@ Slots_AnimateGolem:
|
||||
ld a, [hl]
|
||||
inc [hl]
|
||||
inc [hl]
|
||||
cp 9 * 8
|
||||
cp 9 * TILE_WIDTH
|
||||
jr nc, .restart
|
||||
and $3
|
||||
ret nz
|
||||
@ -2081,7 +2081,7 @@ Slots_AnimateChansey:
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
inc [hl]
|
||||
cp 13 * 8
|
||||
cp 13 * TILE_WIDTH
|
||||
jr z, .limit
|
||||
and $f
|
||||
ret nz
|
||||
|
@ -576,7 +576,7 @@ InitCGBPals::
|
||||
ldh [rVBK], a
|
||||
ld a, 1 << rBGPI_AUTO_INCREMENT
|
||||
ldh [rBGPI], a
|
||||
ld c, 4 * 8
|
||||
ld c, 4 * TILE_WIDTH
|
||||
.bgpals_loop
|
||||
ld a, LOW(PALRGB_WHITE)
|
||||
ldh [rBGPD], a
|
||||
@ -586,7 +586,7 @@ InitCGBPals::
|
||||
jr nz, .bgpals_loop
|
||||
ld a, 1 << rOBPI_AUTO_INCREMENT
|
||||
ldh [rOBPI], a
|
||||
ld c, 4 * 8
|
||||
ld c, 4 * TILE_WIDTH
|
||||
.obpals_loop
|
||||
ld a, LOW(PALRGB_WHITE)
|
||||
ldh [rOBPD], a
|
||||
|
@ -197,8 +197,8 @@ MoveList_InitAnimatedMonIcon:
|
||||
ld [wCurIcon], a
|
||||
xor a
|
||||
call GetIconGFX
|
||||
ld d, 3 * 8 + 2 ; depixel 3, 4, 2, 4
|
||||
ld e, 4 * 8 + 4
|
||||
ld d, 3 * TILE_WIDTH + 2 ; depixel 3, 4, 2, 4
|
||||
ld e, 4 * TILE_WIDTH + 4
|
||||
ld a, SPRITE_ANIM_INDEX_PARTY_MON
|
||||
call _InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
||||
|
@ -384,7 +384,7 @@ AnimSeq_SlotsChanseyEgg:
|
||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp 15 * 8
|
||||
cp 15 * TILE_WIDTH
|
||||
jr c, .move_right
|
||||
call DeinitializeSprite
|
||||
ld a, $4
|
||||
@ -686,7 +686,7 @@ AnimSeq_FlyLeaf:
|
||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp -9 * 8
|
||||
cp -9 * TILE_WIDTH
|
||||
jr nc, .delete_leaf
|
||||
inc [hl]
|
||||
inc [hl]
|
||||
@ -715,7 +715,7 @@ AnimSeq_FlyTo:
|
||||
ld hl, SPRITEANIMSTRUCT_YCOORD
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp 10 * 8 + 4
|
||||
cp 10 * TILE_WIDTH + 4
|
||||
ret z
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_YCOORD
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user