Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pret/pokecrystal
Browse files Browse the repository at this point in the history
  • Loading branch information
mid-kid committed Jul 27, 2018
2 parents a91b59a + 748d424 commit 9aa6b55
Show file tree
Hide file tree
Showing 30 changed files with 198 additions and 195 deletions.
2 changes: 1 addition & 1 deletion constants/battle_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ MOVE_LENGTH EQU const_value
const STAT_SATK
NUM_EXP_STATS EQU const_value + -1
const STAT_SDEF
NUM_STATS EQU const_value
NUM_STATS EQU const_value +- 1
STAT_SPC EQU STAT_SATK

; stat formula constants
Expand Down
2 changes: 1 addition & 1 deletion constants/gfx_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ NUM_SPRITE_OAM_STRUCTS EQU 40 ; see wVirtualOAM
const ANIM_MON_TRADE
const ANIM_MON_EVOLVE
const ANIM_MON_HATCH
const ANIM_MON_UNUSED
const ANIM_MON_HOF
const ANIM_MON_EGG1
const ANIM_MON_EGG2
12 changes: 6 additions & 6 deletions data/events/odd_eggs.asm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ OddEgg1End:
bigdw 0
bigdw 0
bigdw 0
db $0, $0 ; DVs
dn 0, 0, 0, 0 ; DVs
db 35, 20, 10, 0 ; PP
db 20 ; Happiness
db 0, 0, 0 ; Pokerus, Caught data
Expand Down Expand Up @@ -146,7 +146,7 @@ OddEgg1End:
bigdw 0
bigdw 0
bigdw 0
db $0, $0 ; DVs
dn 0, 0, 0, 0 ; DVs
db 15, 20, 10, 0 ; PP
db 20 ; Happiness
db 0, 0, 0 ; Pokerus, Caught data
Expand Down Expand Up @@ -198,7 +198,7 @@ OddEgg1End:
bigdw 0
bigdw 0
bigdw 0
db $0, $0 ; DVs
dn 0, 0, 0, 0 ; DVs
db 35, 30, 10, 0 ; PP
db 20 ; Happiness
db 0, 0, 0 ; Pokerus, Caught data
Expand Down Expand Up @@ -250,7 +250,7 @@ OddEgg1End:
bigdw 0
bigdw 0
bigdw 0
db $0, $0 ; DVs
dn 0, 0, 0, 0 ; DVs
db 25, 10, 0, 0 ; PP
db 20 ; Happiness
db 0, 0, 0 ; Pokerus, Caught data
Expand Down Expand Up @@ -302,7 +302,7 @@ OddEgg1End:
bigdw 0
bigdw 0
bigdw 0
db $0, $0 ; DVs
dn 0, 0, 0, 0 ; DVs
db 30, 30, 10, 0 ; PP
db 20 ; Happiness
db 0, 0, 0 ; Pokerus, Caught data
Expand Down Expand Up @@ -354,7 +354,7 @@ OddEgg1End:
bigdw 0
bigdw 0
bigdw 0
db $0, $0 ; DVs
dn 0, 0, 0, 0 ; DVs
db 35, 10, 0, 0 ; PP
db 20 ; Happiness
db 0, 0, 0 ; Pokerus, Caught data
Expand Down
32 changes: 16 additions & 16 deletions engine/battle/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ DetermineMoveOrder:
ld de, wBattleMonSpeed
ld hl, wEnemyMonSpeed
ld c, 2
call StringCmp
call CompareBytes
jr z, .speed_tie
jp nc, .player_first
jp .enemy_first
Expand Down Expand Up @@ -3715,19 +3715,19 @@ TryToRunAwayFromBattle:
inc a
ld [wNumFleeAttempts], a
ld a, [hli]
ld [hStringCmpString2 + 0], a
ld [hPartyMon1Speed + 0], a
ld a, [hl]
ld [hStringCmpString2 + 1], a
ld [hPartyMon1Speed + 1], a
ld a, [de]
inc de
ld [hStringCmpString1 + 0], a
ld [hEnemyMonSpeed + 0], a
ld a, [de]
ld [hStringCmpString1 + 1], a
ld [hEnemyMonSpeed + 1], a
call Call_LoadTempTileMapToTileMap
ld de, hStringCmpString2
ld hl, hStringCmpString1
ld c, $2
call StringCmp
ld de, hPartyMon1Speed
ld hl, hEnemyMonSpeed
ld c, 2
call CompareBytes
jr nc, .can_escape

xor a
Expand All @@ -3739,9 +3739,9 @@ TryToRunAwayFromBattle:
ld [hDividend + 0], a
ld a, [hProduct + 3]
ld [hDividend + 1], a
ld a, [hStringCmpString1 + 0]
ld a, [hEnemyMonSpeed + 0]
ld b, a
ld a, [hStringCmpString1 + 1]
ld a, [hEnemyMonSpeed + 1]
srl b
rr a
srl b
Expand Down Expand Up @@ -7113,7 +7113,7 @@ GiveExperiencePoints:
push bc
call LoadTileMapToTempTileMap
pop bc
ld hl, MON_STAT_EXP - 1
ld hl, MON_EXP + 2
add hl, bc
ld d, [hl]
ld a, [hQuotient + 2]
Expand Down Expand Up @@ -7145,7 +7145,7 @@ GiveExperiencePoints:
ld d, MAX_LEVEL
callfar CalcExpAtLevel
pop bc
ld hl, MON_STAT_EXP - 1
ld hl, MON_EXP + 2
add hl, bc
push bc
ld a, [hQuotient]
Expand Down Expand Up @@ -8712,7 +8712,7 @@ AddLastMobileBattleToLinkRecord:
push de
ld bc, 12
ld de, wStringBuffer1
call CompareLong
call CompareBytesLong
pop de
pop hl
jr c, .done
Expand Down Expand Up @@ -8821,7 +8821,7 @@ AddLastMobileBattleToLinkRecord:
pop hl
push bc
ld c, 3
call StringCmp
call CompareBytes
pop bc
jr z, .equal
jr nc, .done2
Expand Down Expand Up @@ -9094,7 +9094,7 @@ BattleStartMessage:
jr .skip_cry ; cry is played during the animation

.cry_no_anim
ld a, $0f
ld a, $f
ld [wCryTracks], a
ld a, [wTempEnemyMonSpecies]
call PlayStereoCry
Expand Down
4 changes: 2 additions & 2 deletions engine/battle/effect_commands.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6154,7 +6154,7 @@ BattleCommand_Heal:
push de
push bc
ld c, 2
call StringCmp
call CompareBytes
pop bc
pop de
pop hl
Expand Down Expand Up @@ -6573,7 +6573,7 @@ BattleCommand_TimeBasedHealContinue:

; Don't bother healing if HP is already full.
push bc
call StringCmp
call CompareBytes
pop bc
jr z, .Full

Expand Down
2 changes: 1 addition & 1 deletion engine/battle/move_effects/false_swipe.asm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BattleCommand_FalseSwipe:
ld c, 2
push hl
push de
call StringCmp
call CompareBytes
pop de
pop hl
jr c, .done
Expand Down
6 changes: 3 additions & 3 deletions engine/events/bug_contest/judging.asm
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ DetermineContestWinners:
ld de, wBugContestTempScore
ld hl, wBugContestFirstPlaceScore
ld c, 2
call StringCmp
call CompareBytes
jr c, .not_first_place
ld hl, wBugContestSecondPlaceWinnerID
ld de, wBugContestThirdPlaceWinnerID
Expand All @@ -189,7 +189,7 @@ DetermineContestWinners:
ld de, wBugContestTempScore
ld hl, wBugContestSecondPlaceScore
ld c, 2
call StringCmp
call CompareBytes
jr c, .not_second_place
ld hl, wBugContestSecondPlaceWinnerID
ld de, wBugContestThirdPlaceWinnerID
Expand All @@ -203,7 +203,7 @@ DetermineContestWinners:
ld de, wBugContestTempScore
ld hl, wBugContestThirdPlaceScore
ld c, 2
call StringCmp
call CompareBytes
jr c, .done
ld hl, wBugContestThirdPlaceWinnerID
call CopyTempContestant
Expand Down
4 changes: 2 additions & 2 deletions engine/events/halloffame.asm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ AnimateHallOfFame:
call PlaceString
call WaitBGMap
decoord 6, 5
ld c, $6
ld c, ANIM_MON_HOF
predef HOF_AnimateFrontpic
ld c, 60
call DelayFrames
Expand Down Expand Up @@ -390,7 +390,7 @@ _HallOfFamePC:
call GetSGBLayout
call SetPalettes
decoord 6, 5
ld c, $6
ld c, ANIM_MON_HOF
predef HOF_AnimateFrontpic
and a
ret
Expand Down
2 changes: 1 addition & 1 deletion engine/events/magikarp.asm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CheckMagikarpLength:
ld hl, wMagikarpLength
ld de, wBestMagikarpLengthFeet
ld c, 2
call StringCmp
call CompareBytes
jr nc, .not_long_enough

; NEW RECORD!!! Let's save that.
Expand Down
8 changes: 4 additions & 4 deletions engine/events/pokecenter_pc.asm
Original file line number Diff line number Diff line change
Expand Up @@ -478,21 +478,21 @@ PlayerDepositItemMenu:
push af
ld a, [wBuffer2]
push af
call .DepositItem_
call .DepositItem
pop af
ld [wBuffer2], a
pop af
ld [wBuffer1], a
ret

.DepositItem_:
.DepositItem:
farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr z, .AskQuantity
ld a, $1
ld [wItemQuantityChangeBuffer], a
jr .DepositItem
jr .ContinueDeposit

.AskQuantity:
ld hl, .HowManyText
Expand All @@ -504,7 +504,7 @@ PlayerDepositItemMenu:
pop af
jr c, .DeclinedToDeposit

.DepositItem:
.ContinueDeposit:
ld a, [wItemQuantityChangeBuffer]
ld [wBuffer1], a
ld a, [wCurItemQuantity]
Expand Down
6 changes: 3 additions & 3 deletions engine/gfx/cgb_layouts.asm
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ _CGB_Pokedex:
jr .got_palette

.is_pokemon
call GetMonPalettePointer_
call GetMonPalettePointer
call LoadPalette_White_Col1_Col2_Black ; mon palette
.got_palette
call WipeAttrMap
Expand Down Expand Up @@ -352,7 +352,7 @@ _CGB_PokedexUnownMode:
call GetPredefPal
call LoadHLPaletteIntoDE
ld a, [wCurPartySpecies]
call GetMonPalettePointer_
call GetMonPalettePointer
call LoadPalette_White_Col1_Col2_Black
call WipeAttrMap
hlcoord 7, 5, wAttrMap
Expand Down Expand Up @@ -914,7 +914,7 @@ _CGB_PlayerOrMonFrontpicPals:
_CGB1e:
ld de, wBGPals1
ld a, [wCurPartySpecies]
call GetMonPalettePointer_
call GetMonPalettePointer
call LoadPalette_White_Col1_Col2_Black
call WipeAttrMap
call ApplyAttrMap
Expand Down
Loading

0 comments on commit 9aa6b55

Please sign in to comment.