Skip to content

Commit

Permalink
Revert commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dreams897 committed May 3, 2024
1 parent 58cb655 commit 0a35653
Show file tree
Hide file tree
Showing 9 changed files with 2,974 additions and 70 deletions.
6 changes: 2 additions & 4 deletions engine/battle/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,7 @@ ParsePlayerAction:
jr nz, .locked_in
xor a
ld [wMoveSelectionMenuType], a
assert POUND == 1
inc a
inc a ; POUND
ld [wFXAnimID], a
call MoveSelectionScreen
push af
Expand Down Expand Up @@ -3856,8 +3855,7 @@ TryToRunAwayFromBattle:
cp BATTLEACTION_FORFEIT
ld a, DRAW
jr z, .fled
assert DRAW - 1 == LOSE
dec a
dec a ; LOSE
.fled
ld b, a
ld a, [wBattleResult]
Expand Down
63 changes: 21 additions & 42 deletions engine/battle_anims/functions.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1222,9 +1222,7 @@ BattleAnimFunc_Sing:
ld hl, BATTLEANIMSTRUCT_PARAM
add hl, bc
ld a, BATTLE_ANIM_FRAMESET_MUSIC_NOTE_1
assert BATTLE_ANIM_FRAMESET_MUSIC_NOTE_1 + 1 == BATTLE_ANIM_FRAMESET_MUSIC_NOTE_2 \
&& BATTLE_ANIM_FRAMESET_MUSIC_NOTE_2 + 1 == BATTLE_ANIM_FRAMESET_MUSIC_NOTE_3
add [hl]
add [hl] ; BATTLE_ANIM_FRAMESET_MUSIC_NOTE_2 BATTLE_ANIM_FRAMESET_MUSIC_NOTE_3
call ReinitBattleAnimFrameset

.one
Expand Down Expand Up @@ -1490,15 +1488,15 @@ BattleAnimFunc_Clamp_Encore:
ld hl, BATTLEANIMSTRUCT_VAR2
add hl, bc
ld a, [hl]
assert BATTLE_ANIM_FRAMESET_CLAMP + 1 == BATTLE_ANIM_FRAMESET_CLAMP_FLIPPED
assert BATTLE_ANIM_FRAMESET_ENCORE_HAND + 1 == BATTLE_ANIM_FRAMESET_ENCORE_HAND_FLIPPED
inc a
inc a ; BATTLE_ANIM_FRAMESET_3B (Clamp Flipped)
; BATTLE_ANIM_FRAMESET_A1 (Hands Flipped)
jr .reinit

.load_no_inc
ld hl, BATTLEANIMSTRUCT_VAR2
add hl, bc
ld a, [hl] ; BATTLE_ANIM_FRAMESET_CLAMP or BATTLE_ANIM_FRAMESET_ENCORE_HAND
ld a, [hl] ; BATTLE_ANIM_FRAMESET_3A (Clamp)
; BATTLE_ANIM_FRAMESET_A0 (Hands)
.reinit
call ReinitBattleAnimFrameset
ld hl, BATTLEANIMSTRUCT_VAR1
Expand Down Expand Up @@ -1824,10 +1822,8 @@ BattleAnimFunc_Wrap:
ld hl, BATTLEANIMSTRUCT_FRAMESET_ID
add hl, bc
ld a, [hl]
assert BATTLE_ANIM_FRAMESET_BIND_1 + 1 == BATTLE_ANIM_FRAMESET_BIND_2 \
&& BATTLE_ANIM_FRAMESET_BIND_2 + 1 == BATTLE_ANIM_FRAMESET_BIND_3 \
&& BATTLE_ANIM_FRAMESET_BIND_3 + 1 == BATTLE_ANIM_FRAMESET_BIND_4
inc a
inc a ; BATTLE_ANIM_FRAMESET_BIND_2
; BATTLE_ANIM_FRAMESET_BIND_4
call ReinitBattleAnimFrameset
call BattleAnim_IncAnonJumptableIndex
ld hl, BATTLEANIMSTRUCT_VAR1 ; Unused?
Expand Down Expand Up @@ -2326,9 +2322,7 @@ BattleAnimFunc_Sound:
ld hl, BATTLEANIMSTRUCT_PARAM
add hl, bc
ld a, BATTLE_ANIM_FRAMESET_SOUND_1
assert BATTLE_ANIM_FRAMESET_SOUND_1 + 1 == BATTLE_ANIM_FRAMESET_SOUND_2 \
&& BATTLE_ANIM_FRAMESET_SOUND_2 + 1 == BATTLE_ANIM_FRAMESET_SOUND_3
add [hl]
add [hl] ; BATTLE_ANIM_FRAMESET_SOUND_2 BATTLE_ANIM_FRAMESET_SOUND_3
call ReinitBattleAnimFrameset
ret

Expand Down Expand Up @@ -2404,8 +2398,7 @@ BattleAnimFunc_ConfuseRay:
and $80
rlca
ld [hl], a
assert BATTLE_ANIM_FRAMESET_CONFUSE_RAY_1 + 1 == BATTLE_ANIM_FRAMESET_CONFUSE_RAY_2
add BATTLE_ANIM_FRAMESET_CONFUSE_RAY_1
add BATTLE_ANIM_FRAMESET_CONFUSE_RAY_1 ; BATTLE_ANIM_FRAMESET_CONFUSE_RAY_2
call ReinitBattleAnimFrameset
ret

Expand Down Expand Up @@ -2475,9 +2468,8 @@ BattleAnimFunc_Dizzy:
rlca
ld hl, BATTLEANIMSTRUCT_VAR1
add hl, bc
assert BATTLE_ANIM_FRAMESET_CHICK_1 + 1 == BATTLE_ANIM_FRAMESET_CHICK_2
assert BATTLE_ANIM_FRAMESET_IMP + 1 == BATTLE_ANIM_FRAMESET_IMP_FLIPPED
add [hl]
add [hl] ; BATTLE_ANIM_FRAMESET_61 BATTLE_ANIM_FRAMESET_62
; BATTLE_ANIM_FRAMESET_9C BATTLE_ANIM_FRAMESET_9D
call ReinitBattleAnimFrameset
ld hl, BATTLEANIMSTRUCT_PARAM
add hl, bc
Expand Down Expand Up @@ -2514,15 +2506,15 @@ BattleAnimFunc_Dizzy:
ld hl, BATTLEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
assert BATTLE_ANIM_FRAMESET_CHICK_1 + 1 == BATTLE_ANIM_FRAMESET_CHICK_2
assert BATTLE_ANIM_FRAMESET_IMP + 1 == BATTLE_ANIM_FRAMESET_IMP_FLIPPED
inc a
inc a ; BATTLE_ANIM_FRAMESET_62
; BATTLE_ANIM_FRAMESET_9D
jr .got_frameset

.not_flipped
ld hl, BATTLEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl] ; BATTLE_ANIM_FRAMESET_CHICK_1 or BATTLE_ANIM_FRAMESET_IMP
ld a, [hl] ; BATTLE_ANIM_FRAMESET_61
; BATTLE_ANIM_FRAMESET_9C
.got_frameset
call ReinitBattleAnimFrameset
ret
Expand All @@ -2542,9 +2534,7 @@ BattleAnimFunc_Amnesia:
ld hl, BATTLEANIMSTRUCT_PARAM
add hl, bc
ld a, [hl]
assert BATTLE_ANIM_FRAMESET_AMNESIA_1 + 1 == BATTLE_ANIM_FRAMESET_AMNESIA_2 \
&& BATTLE_ANIM_FRAMESET_AMNESIA_2 + 1 == BATTLE_ANIM_FRAMESET_AMNESIA_3
add BATTLE_ANIM_FRAMESET_AMNESIA_1
add BATTLE_ANIM_FRAMESET_AMNESIA_1 ; BATTLE_ANIM_FRAMESET_AMNESIA_2 BATTLE_ANIM_FRAMESET_AMNESIA_3
call ReinitBattleAnimFrameset
ld hl, BATTLEANIMSTRUCT_PARAM
add hl, bc
Expand Down Expand Up @@ -2632,9 +2622,7 @@ BattleAnimFunc_String:
add hl, bc
set OAM_Y_FLIP, [hl]
.not_param_zero
assert BATTLE_ANIM_FRAMESET_STRING_SHOT_1 + 1 == BATTLE_ANIM_FRAMESET_STRING_SHOT_2 \
&& BATTLE_ANIM_FRAMESET_STRING_SHOT_2 + 1 == BATTLE_ANIM_FRAMESET_STRING_SHOT_3
add BATTLE_ANIM_FRAMESET_STRING_SHOT_1
add BATTLE_ANIM_FRAMESET_STRING_SHOT_1 ; BATTLE_ANIM_FRAMESET_STRING_SHOT_2 BATTLE_ANIM_FRAMESET_STRING_SHOT_3
call ReinitBattleAnimFrameset
.one
ret
Expand Down Expand Up @@ -3531,9 +3519,7 @@ BattleAnimFunc_SpeedLine:
add hl, bc
ld a, [hl]
and $7f
assert BATTLE_ANIM_FRAMESET_SPEED_LINE_1 + 1 == BATTLE_ANIM_FRAMESET_SPEED_LINE_2 \
&& BATTLE_ANIM_FRAMESET_SPEED_LINE_2 + 1 == BATTLE_ANIM_FRAMESET_SPEED_LINE_3
add BATTLE_ANIM_FRAMESET_SPEED_LINE_1
add BATTLE_ANIM_FRAMESET_SPEED_LINE_1 ; BATTLE_ANIM_FRAMESET_SPEED_LINE_2 BATTLE_ANIM_FRAMESET_SPEED_LINE_3
call ReinitBattleAnimFrameset
.one
ld hl, BATTLEANIMSTRUCT_PARAM
Expand Down Expand Up @@ -3705,13 +3691,8 @@ BattleAnimFunc_LockOnMindReader:
and $f
ld hl, BATTLEANIMSTRUCT_FRAMESET_ID
add hl, bc
assert BATTLE_ANIM_FRAMESET_LOCK_ON_1 + 1 == BATTLE_ANIM_FRAMESET_LOCK_ON_2 \
&& BATTLE_ANIM_FRAMESET_LOCK_ON_2 + 1 == BATTLE_ANIM_FRAMESET_LOCK_ON_3 \
&& BATTLE_ANIM_FRAMESET_LOCK_ON_3 + 1 == BATTLE_ANIM_FRAMESET_LOCK_ON_4
assert BATTLE_ANIM_FRAMESET_MIND_READER_1 + 1 == BATTLE_ANIM_FRAMESET_MIND_READER_2 \
&& BATTLE_ANIM_FRAMESET_MIND_READER_2 + 1 == BATTLE_ANIM_FRAMESET_MIND_READER_3 \
&& BATTLE_ANIM_FRAMESET_MIND_READER_3 + 1 == BATTLE_ANIM_FRAMESET_MIND_READER_4
add [hl]
add [hl] ; BATTLE_ANIM_FRAMESET_8F BATTLE_ANIM_FRAMESET_90 BATTLE_ANIM_FRAMESET_91
; BATTLE_ANIM_FRAMESET_93 BATTLE_ANIM_FRAMESET_94 BATTLE_ANIM_FRAMESET_95
call ReinitBattleAnimFrameset
ld hl, BATTLEANIMSTRUCT_PARAM
add hl, bc
Expand Down Expand Up @@ -3771,9 +3752,7 @@ BattleAnimFunc_HealBellNotes:
ld hl, BATTLEANIMSTRUCT_PARAM
add hl, bc
ld a, BATTLE_ANIM_FRAMESET_MUSIC_NOTE_1
assert BATTLE_ANIM_FRAMESET_MUSIC_NOTE_1 + 1 == BATTLE_ANIM_FRAMESET_MUSIC_NOTE_2 \
&& BATTLE_ANIM_FRAMESET_MUSIC_NOTE_2 + 1 == BATTLE_ANIM_FRAMESET_MUSIC_NOTE_3
add [hl]
add [hl] ; BATTLE_ANIM_FRAMESET_MUSIC_NOTE_2 BATTLE_ANIM_FRAMESET_MUSIC_NOTE_3
call ReinitBattleAnimFrameset
.one
ld hl, BATTLEANIMSTRUCT_YOFFSET
Expand Down
9 changes: 3 additions & 6 deletions engine/items/pack.asm
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,11 @@ TossMenu:

ResetPocketCursorPositions: ; unreferenced
ld a, [wCurPocket]
assert ITEM_POCKET == 0
and a
and a ; ITEM_POCKET
jr z, .items
assert BALL_POCKET == 1
dec a
dec a ; BALL_POCKET
jr z, .balls
assert KEY_ITEM_POCKET == 2
dec a
dec a ; KEY_ITEM_POCKET
jr z, .key
ret

Expand Down
5 changes: 2 additions & 3 deletions engine/link/link.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2212,8 +2212,7 @@ endc
call DelayFrames
xor a
ldh [hVBlank], a
assert LINK_TIMECAPSULE == 1
inc a
inc a ; LINK_TIMECAPSULE
ld [wLinkMode], a
ret

Expand Down Expand Up @@ -2286,7 +2285,7 @@ SetBitsForTimeCapsuleRequest:
ldh [rSC], a
ld a, (1 << rSC_ON) | (0 << rSC_CLOCK)
ldh [rSC], a
xor a ; LINK_NULL
xor a ; LINK_TIMECAPSULE - 1
ld [wPlayerLinkAction], a
ld [wChosenCableClubRoom], a
ret
Expand Down
6 changes: 3 additions & 3 deletions engine/overworld/map_object_action.asm
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ SetFacingBoulderDust:
and 2
ld a, FACING_BOULDER_DUST_1
jr z, .ok
assert FACING_BOULDER_DUST_1 + 1 == FACING_BOULDER_DUST_2
inc a
assert FACING_BOULDER_DUST_1 + 1 == FACING_BOULDER_DUST_2
.ok
ld [hl], a
ret
Expand All @@ -287,8 +287,8 @@ SetFacingGrassShake:
and 4
ld a, FACING_GRASS_1
jr z, .ok
assert FACING_GRASS_1 + 1 == FACING_GRASS_2
inc a
inc a ; FACING_GRASS_2

.ok
ld [hl], a
ret
Expand Down
3 changes: 3 additions & 0 deletions engine/pokegear/pokegear.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2358,6 +2358,7 @@ Pokedex_GetArea:
call TownMapPals
hlbgcoord 0, 0, vBGMap1
call TownMapBGUpdate
call FillJohtoMap
call .PlaceString_MonsNest
call TownMapPals
hlbgcoord 0, 0
Expand All @@ -2366,6 +2367,8 @@ Pokedex_GetArea:
call GetSGBLayout
call SetDefaultBGPAndOBP
xor a
ldh [hBGMapMode], a
xor a ; JOHTO_REGION
call .GetAndPlaceNest
.loop
call JoyTextDelay
Expand Down
Loading

0 comments on commit 0a35653

Please sign in to comment.