mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Merge pull request #322 from PikalaxALT/master
Split out and comment phone and animation code.
This commit is contained in:
commit
0d17d4a758
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "extras"]
|
[submodule "extras"]
|
||||||
path = extras
|
path = extras
|
||||||
url = git://github.com/kanzure/pokemon-reverse-engineering-tools.git
|
url = git://github.com/pret/pokemon-reverse-engineering-tools.git
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
AI_SwitchOrTryItem: ; 38000
|
AI_SwitchOrTryItem: ; 38000
|
||||||
and a
|
and a
|
||||||
|
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@ -731,7 +731,7 @@ AI_Switch: ; 3846c
|
|||||||
callba Function3d57a
|
callba Function3d57a
|
||||||
xor a
|
xor a
|
||||||
ld [wd264], a
|
ld [wd264], a
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
scf
|
scf
|
||||||
|
@ -237,16 +237,16 @@ Functioncc220: ; cc220
|
|||||||
; Appears to be unused.
|
; Appears to be unused.
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld a, $80
|
ld a, (VBGMap0 tile $28) % $100
|
||||||
ld [hBGMapAddress], a
|
ld [hBGMapAddress], a
|
||||||
ld a, $9a
|
ld a, (VBGMap0 tile $28) / $100
|
||||||
ld [hBGMapAddress + 1], a
|
ld [hBGMapAddress + 1], a
|
||||||
call Function3200
|
call Function3200
|
||||||
ld a, $60
|
ld a, $60
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapAddress], a
|
ld [hBGMapAddress], a
|
||||||
ld a, $98
|
ld a, VBGMap0 / $100
|
||||||
ld [hBGMapAddress + 1], a
|
ld [hBGMapAddress + 1], a
|
||||||
call BattleAnimDelayFrame
|
call BattleAnimDelayFrame
|
||||||
ret
|
ret
|
||||||
@ -709,7 +709,7 @@ BattleAnimCmd_D5: ; cc485 (33:4485)
|
|||||||
rept 4
|
rept 4
|
||||||
add hl, hl
|
add hl, hl
|
||||||
endr
|
endr
|
||||||
ld de, $8310
|
ld de, VTiles0 tile $31
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [BattleAnimByte]
|
ld a, [BattleAnimByte]
|
||||||
call Functionce846
|
call Functionce846
|
||||||
@ -817,13 +817,13 @@ endr
|
|||||||
ld a, $49
|
ld a, $49
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld hl, $8730
|
ld hl, VTiles0 tile $73
|
||||||
ld de, $9060
|
ld de, VTiles2 tile $06
|
||||||
ld a, $70
|
ld a, $70
|
||||||
ld [BattleAnimTemps], a
|
ld [BattleAnimTemps], a
|
||||||
ld a, $7
|
ld a, $7
|
||||||
call Functioncc561
|
call Functioncc561
|
||||||
ld de, $9310
|
ld de, VTiles2 tile $31
|
||||||
ld a, $60
|
ld a, $60
|
||||||
ld [BattleAnimTemps], a
|
ld [BattleAnimTemps], a
|
||||||
ld a, $6
|
ld a, $6
|
||||||
@ -873,13 +873,13 @@ endr
|
|||||||
ld a, $43
|
ld a, $43
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
ld hl, $8660
|
ld hl, VTiles0 tile $66
|
||||||
ld de, $9050
|
ld de, VTiles2 tile $05
|
||||||
ld a, $70
|
ld a, $70
|
||||||
ld [BattleAnimTemps], a
|
ld [BattleAnimTemps], a
|
||||||
ld a, $7
|
ld a, $7
|
||||||
call Functioncc5b3
|
call Functioncc5b3
|
||||||
ld de, $9310
|
ld de, VTiles2 tile $31
|
||||||
ld a, $60
|
ld a, $60
|
||||||
ld [BattleAnimTemps], a
|
ld [BattleAnimTemps], a
|
||||||
ld a, $6
|
ld a, $6
|
||||||
@ -932,7 +932,7 @@ BattleAnimCmd_DC: ; cc5dc (33:45dc)
|
|||||||
ld [CurPartySpecies], a ; CurPartySpecies
|
ld [CurPartySpecies], a ; CurPartySpecies
|
||||||
ld hl, BattleMonDVs ; BattleMonDVs
|
ld hl, BattleMonDVs ; BattleMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
ld de, $8000
|
ld de, VTiles0 tile $00
|
||||||
predef GetFrontpic
|
predef GetFrontpic
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
@ -941,7 +941,7 @@ BattleAnimCmd_DC: ; cc5dc (33:45dc)
|
|||||||
ld [CurPartySpecies], a ; CurPartySpecies
|
ld [CurPartySpecies], a ; CurPartySpecies
|
||||||
ld hl, EnemyMonDVs ; EnemyMonDVs
|
ld hl, EnemyMonDVs ; EnemyMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
ld de, $8000
|
ld de, VTiles0 tile $00
|
||||||
predef GetBackpic
|
predef GetBackpic
|
||||||
|
|
||||||
.done
|
.done
|
||||||
@ -953,19 +953,19 @@ BattleAnimCmd_DC: ; cc5dc (33:45dc)
|
|||||||
|
|
||||||
BattleAnimCmd_E8: ; cc622 (33:4622)
|
BattleAnimCmd_E8: ; cc622 (33:4622)
|
||||||
|
|
||||||
ld de, $8000
|
ld de, VTiles0 tile $00
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn] ; $ff00+$e4
|
||||||
and a
|
and a
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
ld hl, $9000
|
ld hl, VTiles2 tile $00
|
||||||
ld b, 0
|
ld b, 0
|
||||||
ld c, $31
|
ld c, $31
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.player
|
.player
|
||||||
ld hl, $9310
|
ld hl, VTiles2 tile $31
|
||||||
ld b, 0
|
ld b, 0
|
||||||
ld c, $24
|
ld c, $24
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
@ -1009,7 +1009,7 @@ GetSubstitutePic: ; cc64c
|
|||||||
ld de, sScratch + $1b0
|
ld de, sScratch + $1b0
|
||||||
call CopyMonsterSpriteTile
|
call CopyMonsterSpriteTile
|
||||||
|
|
||||||
ld hl, $9000
|
ld hl, VTiles2 tile $00
|
||||||
ld de, sScratch
|
ld de, sScratch
|
||||||
lb bc, BANK(GetSubstitutePic), 7 * 7
|
lb bc, BANK(GetSubstitutePic), 7 * 7
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
@ -1029,7 +1029,7 @@ GetSubstitutePic: ; cc64c
|
|||||||
ld de, sScratch + $170
|
ld de, sScratch + $170
|
||||||
call CopyMonsterSpriteTile
|
call CopyMonsterSpriteTile
|
||||||
|
|
||||||
ld hl, $9310
|
ld hl, VTiles2 tile $31
|
||||||
ld de, sScratch
|
ld de, sScratch
|
||||||
lb bc, BANK(GetSubstitutePic), 6 * 6
|
lb bc, BANK(GetSubstitutePic), 6 * 6
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
@ -1077,7 +1077,7 @@ GetMinimizePic: ; cc6e7 (33:46e7)
|
|||||||
|
|
||||||
ld de, sScratch + $1a0
|
ld de, sScratch + $1a0
|
||||||
call CopyMinimizePic
|
call CopyMinimizePic
|
||||||
ld hl, $9000
|
ld hl, VTiles2 tile $00
|
||||||
ld de, sScratch
|
ld de, sScratch
|
||||||
lb bc, BANK(GetMinimizePic), $31
|
lb bc, BANK(GetMinimizePic), $31
|
||||||
ret
|
ret
|
||||||
@ -1085,7 +1085,7 @@ GetMinimizePic: ; cc6e7 (33:46e7)
|
|||||||
.player
|
.player
|
||||||
ld de, sScratch + $160
|
ld de, sScratch + $160
|
||||||
call CopyMinimizePic
|
call CopyMinimizePic
|
||||||
ld hl, $9310
|
ld hl, VTiles2 tile $31
|
||||||
ld de, sScratch
|
ld de, sScratch
|
||||||
lb bc, BANK(GetMinimizePic), $24
|
lb bc, BANK(GetMinimizePic), $24
|
||||||
ret
|
ret
|
||||||
@ -1110,7 +1110,7 @@ BattleAnimCmd_E9: ; cc735 (33:4735)
|
|||||||
xor a
|
xor a
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
call GetMinimizePic
|
call GetMinimizePic
|
||||||
ld hl, $8000
|
ld hl, VTiles0 tile $00
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
pop af
|
pop af
|
||||||
@ -1159,14 +1159,14 @@ BattleAnimCmd_E6: ; cc776 (33:4776)
|
|||||||
|
|
||||||
ld hl, BattleMonDVs ; BattleMonDVs
|
ld hl, BattleMonDVs ; BattleMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
ld de, $9000
|
ld de, VTiles2 tile $00
|
||||||
predef GetFrontpic
|
predef GetFrontpic
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.player
|
.player
|
||||||
ld hl, EnemyMonDVs ; EnemyMonDVs
|
ld hl, EnemyMonDVs ; EnemyMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
ld de, $9310
|
ld de, VTiles2 tile $31
|
||||||
predef GetBackpic
|
predef GetBackpic
|
||||||
|
|
||||||
.done
|
.done
|
||||||
|
489
battle/core.asm
489
battle/core.asm
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,7 @@ DoPlayerTurn: ; 34000
|
|||||||
DoEnemyTurn: ; 3400a
|
DoEnemyTurn: ; 3400a
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr z, DoTurn
|
jr z, DoTurn
|
||||||
|
|
||||||
@ -696,7 +696,7 @@ BattleCommand02: ; 343db
|
|||||||
|
|
||||||
; No obedience in link battles
|
; No obedience in link battles
|
||||||
; (since no handling exists for enemy)
|
; (since no handling exists for enemy)
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@ -1080,7 +1080,7 @@ endr
|
|||||||
jr z, .asm_345a4
|
jr z, .asm_345a4
|
||||||
|
|
||||||
; skip this part entirely if wildbattle
|
; skip this part entirely if wildbattle
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr z, .asm_345c5
|
jr z, .asm_345c5
|
||||||
|
|
||||||
@ -3521,7 +3521,7 @@ Function3534d: ; 3534d
|
|||||||
inc l
|
inc l
|
||||||
|
|
||||||
.asm_3536b
|
.asm_3536b
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp 3
|
cp 3
|
||||||
jr z, .done
|
jr z, .done
|
||||||
|
|
||||||
@ -3835,11 +3835,11 @@ BattleCommanda1: ; 35461
|
|||||||
sub b
|
sub b
|
||||||
ld [DefaultFlypoint], a
|
ld [DefaultFlypoint], a
|
||||||
.asm_3550d
|
.asm_3550d
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr z, .asm_3556b
|
jr z, .asm_3556b
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35532
|
jr nz, .asm_35532
|
||||||
|
|
||||||
@ -4825,7 +4825,7 @@ BattleCommand46: ; 35a74
|
|||||||
|
|
||||||
call Function372d8
|
call Function372d8
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_35a83
|
jr z, .asm_35a83
|
||||||
call AnimateFailedMove
|
call AnimateFailedMove
|
||||||
@ -4888,7 +4888,7 @@ BattleCommand46: ; 35a74
|
|||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_35af6
|
jr z, .asm_35af6
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_35af6
|
jr nz, .asm_35af6
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -5180,7 +5180,7 @@ endr
|
|||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35c81
|
jr nz, .asm_35c81
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_35c81
|
jr nz, .asm_35c81
|
||||||
ld hl, wc739
|
ld hl, wc739
|
||||||
@ -5585,7 +5585,7 @@ Function35ece: ; 35ece
|
|||||||
jr z, .asm_35eec
|
jr z, .asm_35eec
|
||||||
|
|
||||||
; Not in link battle
|
; Not in link battle
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35eec
|
jr nz, .asm_35eec
|
||||||
|
|
||||||
@ -5683,7 +5683,7 @@ BattleCommand2f: ; 35f2c
|
|||||||
and a
|
and a
|
||||||
jr z, .asm_35f89
|
jr z, .asm_35f89
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35f89
|
jr nz, .asm_35f89
|
||||||
|
|
||||||
@ -6331,7 +6331,7 @@ BattleCommand1d: ; 362e3
|
|||||||
and a
|
and a
|
||||||
jr z, .DidntMiss
|
jr z, .DidntMiss
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .DidntMiss
|
jr nz, .DidntMiss
|
||||||
|
|
||||||
@ -7124,7 +7124,7 @@ BattleCommanda0: ; 36778
|
|||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_367bf
|
jr nz, .asm_367bf
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
ld a, [CurPartyLevel]
|
ld a, [CurPartyLevel]
|
||||||
@ -7149,7 +7149,7 @@ BattleCommanda0: ; 36778
|
|||||||
jp PrintButItFailed
|
jp PrintButItFailed
|
||||||
|
|
||||||
.asm_367bf
|
.asm_367bf
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
ld a, [BattleMonLevel]
|
ld a, [BattleMonLevel]
|
||||||
@ -7188,10 +7188,10 @@ BattleCommanda0: ; 36778
|
|||||||
|
|
||||||
|
|
||||||
Function36804: ; 36804
|
Function36804: ; 36804
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $c0
|
and $c0
|
||||||
or $2
|
or $2
|
||||||
ld [wd0ee], a
|
ld [wBattleResult], a
|
||||||
ret
|
ret
|
||||||
; 3680f
|
; 3680f
|
||||||
|
|
||||||
@ -7214,7 +7214,7 @@ BattleCommand23: ; 3680f
|
|||||||
ld a, [AttackMissed]
|
ld a, [AttackMissed]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_36852 ; 36830 $20
|
jr nz, .asm_36852 ; 36830 $20
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_36869 ; 36836 $31
|
jr nz, .asm_36869 ; 36836 $31
|
||||||
ld a, [CurPartyLevel]
|
ld a, [CurPartyLevel]
|
||||||
@ -7300,7 +7300,7 @@ BattleCommand23: ; 3680f
|
|||||||
and a
|
and a
|
||||||
jr nz, .asm_368f3
|
jr nz, .asm_368f3
|
||||||
|
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_36908
|
jr nz, .asm_36908
|
||||||
|
|
||||||
@ -7496,7 +7496,7 @@ BattleCommand24: ; 369b6
|
|||||||
dec a
|
dec a
|
||||||
jr .asm_36a3a
|
jr .asm_36a3a
|
||||||
.asm_36a0b
|
.asm_36a0b
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
cp $1
|
cp $1
|
||||||
jp z, .asm_36a1e
|
jp z, .asm_36a1e
|
||||||
ld a, [OTPartyCount]
|
ld a, [OTPartyCount]
|
||||||
@ -8177,7 +8177,7 @@ BattleCommand30: ; 36dc7
|
|||||||
and a
|
and a
|
||||||
jr z, .asm_36e0e
|
jr z, .asm_36e0e
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_36e0e
|
jr nz, .asm_36e0e
|
||||||
|
|
||||||
@ -8519,7 +8519,7 @@ BattleCommand35: ; 36f9d
|
|||||||
|
|
||||||
BattleCommand36: ; 36fe1
|
BattleCommand36: ; 36fe1
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
callba Function1060e5
|
callba MobileFn_1060e5
|
||||||
jp PrintNothingHappened
|
jp PrintNothingHappened
|
||||||
; 36fed
|
; 36fed
|
||||||
|
|
||||||
@ -9152,7 +9152,7 @@ CheckSubstituteOpp: ; 37378
|
|||||||
|
|
||||||
|
|
||||||
BattleCommand1a: ; 37380
|
BattleCommand1a: ; 37380
|
||||||
callba Function10610d
|
callba MobileFn_10610d
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wcfca], a
|
ld [wcfca], a
|
||||||
ld c, $3
|
ld c, $3
|
||||||
@ -9281,7 +9281,7 @@ BattleCommand53: ; 37563
|
|||||||
and a
|
and a
|
||||||
jr z, .party
|
jr z, .party
|
||||||
|
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr z, .done
|
jr z, .done
|
||||||
|
|
||||||
@ -9493,7 +9493,7 @@ BattleCommand60: ; 3784b
|
|||||||
BattleCommand61: ; 37874
|
BattleCommand61: ; 37874
|
||||||
; present
|
; present
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp $3
|
cp $3
|
||||||
jr z, .asm_3787d
|
jr z, .asm_3787d
|
||||||
push bc
|
push bc
|
||||||
@ -9502,7 +9502,7 @@ BattleCommand61: ; 37874
|
|||||||
|
|
||||||
call BattleCommand07
|
call BattleCommand07
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
cp $3
|
cp $3
|
||||||
jr z, .asm_37889
|
jr z, .asm_37889
|
||||||
pop de
|
pop de
|
||||||
@ -9765,7 +9765,7 @@ BattleCommand67: ; 379c9
|
|||||||
.Enemy
|
.Enemy
|
||||||
|
|
||||||
; Wildmons don't have anything to switch to
|
; Wildmons don't have anything to switch to
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a ; WILDMON
|
dec a ; WILDMON
|
||||||
jp z, FailedBatonPass
|
jp z, FailedBatonPass
|
||||||
|
|
||||||
@ -9800,7 +9800,7 @@ BattleCommand67: ; 379c9
|
|||||||
|
|
||||||
|
|
||||||
BatonPass_LinkPlayerSwitch: ; 37a67
|
BatonPass_LinkPlayerSwitch: ; 37a67
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
@ -9819,7 +9819,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
|
|||||||
|
|
||||||
|
|
||||||
BatonPass_LinkEnemySwitch: ; 37a82
|
BatonPass_LinkEnemySwitch: ; 37a82
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
@ -10057,7 +10057,7 @@ BattleCommand6a6c: ; 37b7e
|
|||||||
jr z, .Full
|
jr z, .Full
|
||||||
|
|
||||||
; Don't factor in time of day in link battles.
|
; Don't factor in time of day in link battles.
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .Weather
|
jr nz, .Weather
|
||||||
|
|
||||||
|
@ -30,11 +30,11 @@ BattleCommand50: ; 37492
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr z, .stealenemyitem
|
jr z, .stealenemyitem
|
||||||
|
|
||||||
ld a, [IsInBattle]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
|
215
battle/magikarp_length.asm
Normal file
215
battle/magikarp_length.asm
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
CalcMagikarpLength: ; fbbfc
|
||||||
|
; Return Magikarp's length (in mm) at MagikarpLength (big endian).
|
||||||
|
;
|
||||||
|
; input:
|
||||||
|
; de: EnemyMonDVs
|
||||||
|
; bc: PlayerID
|
||||||
|
|
||||||
|
; This function is poorly commented.
|
||||||
|
|
||||||
|
; In short, it generates a value between 190 and 1786 using
|
||||||
|
; a Magikarp's DVs and its trainer ID. This value is further
|
||||||
|
; filtered in LoadEnemyMon to make longer Magikarp even rarer.
|
||||||
|
|
||||||
|
; The value is generated from a lookup table.
|
||||||
|
; The index is determined by the dv xored with the player's trainer id.
|
||||||
|
|
||||||
|
; bc = rrc(dv[0]) ++ rrc(dv[1]) ^ rrc(id)
|
||||||
|
|
||||||
|
; if bc < 10: [MagikarpLength] = c + 190
|
||||||
|
; if bc >= $ff00: [MagikarpLength] = c + 1370
|
||||||
|
; else: [MagikarpLength] = z * 100 + (bc - x) / y
|
||||||
|
|
||||||
|
; X, Y, and Z depend on the value of b as follows:
|
||||||
|
|
||||||
|
; if b = 0: x = 310, y = 2, z = 3
|
||||||
|
; if b = 1: x = 710, y = 4, z = 4
|
||||||
|
; if b = 2-9: x = 2710, y = 20, z = 5
|
||||||
|
; if b = 10-29: x = 7710, y = 50, z = 6
|
||||||
|
; if b = 30-68: x = 17710, y = 100, z = 7
|
||||||
|
; if b = 69-126: x = 32710, y = 150, z = 8
|
||||||
|
; if b = 127-185: x = 47710, y = 150, z = 9
|
||||||
|
; if b = 186-224: x = 57710, y = 100, z = 10
|
||||||
|
; if b = 225-243: x = 62710, y = 50, z = 11
|
||||||
|
; if b = 244-251: x = 64710, y = 20, z = 12
|
||||||
|
; if b = 252-253: x = 65210, y = 5, z = 13
|
||||||
|
; if b = 254: x = 65410, y = 2, z = 14
|
||||||
|
|
||||||
|
|
||||||
|
; bc = rrc(dv[0]) ++ rrc(dv[1]) ^ rrc(id)
|
||||||
|
|
||||||
|
; id
|
||||||
|
ld h, b
|
||||||
|
ld l, c
|
||||||
|
ld a, [hli]
|
||||||
|
ld b, a
|
||||||
|
ld c, [hl]
|
||||||
|
rrc b
|
||||||
|
rrc c
|
||||||
|
|
||||||
|
; dv
|
||||||
|
ld a, [de]
|
||||||
|
inc de
|
||||||
|
rrca
|
||||||
|
rrca
|
||||||
|
xor b
|
||||||
|
ld b, a
|
||||||
|
|
||||||
|
ld a, [de]
|
||||||
|
rrca
|
||||||
|
rrca
|
||||||
|
xor c
|
||||||
|
ld c, a
|
||||||
|
|
||||||
|
; if bc < 10:
|
||||||
|
; de = bc + 190
|
||||||
|
; break
|
||||||
|
|
||||||
|
ld a, b
|
||||||
|
and a
|
||||||
|
jr nz, .no
|
||||||
|
ld a, c
|
||||||
|
cp 10
|
||||||
|
jr nc, .no
|
||||||
|
|
||||||
|
ld hl, 190
|
||||||
|
add hl, bc
|
||||||
|
ld d, h
|
||||||
|
ld e, l
|
||||||
|
jr .done
|
||||||
|
|
||||||
|
.no
|
||||||
|
|
||||||
|
ld hl, .Lengths
|
||||||
|
ld a, 2
|
||||||
|
ld [wd265], a
|
||||||
|
|
||||||
|
.read
|
||||||
|
ld a, [hli]
|
||||||
|
ld e, a
|
||||||
|
ld a, [hli]
|
||||||
|
ld d, a
|
||||||
|
call .BCLessThanDE
|
||||||
|
jr nc, .next
|
||||||
|
|
||||||
|
; c = (bc - de) / [hl]
|
||||||
|
call .BCMinusDE
|
||||||
|
ld a, b
|
||||||
|
ld [hDividend + 0], a
|
||||||
|
ld a, c
|
||||||
|
ld [hDividend + 1], a
|
||||||
|
ld a, [hl]
|
||||||
|
ld [hDivisor], a
|
||||||
|
ld b, 2
|
||||||
|
call Divide
|
||||||
|
ld a, [hQuotient + 2]
|
||||||
|
ld c, a
|
||||||
|
|
||||||
|
; de = c + 100 * (2 + i)
|
||||||
|
xor a
|
||||||
|
ld [hMultiplicand + 0], a
|
||||||
|
ld [hMultiplicand + 1], a
|
||||||
|
ld a, 100
|
||||||
|
ld [hMultiplicand + 2], a
|
||||||
|
ld a, [wd265]
|
||||||
|
ld [hMultiplier], a
|
||||||
|
call Multiply
|
||||||
|
ld b, 0
|
||||||
|
ld a, [hProduct + 3]
|
||||||
|
add c
|
||||||
|
ld e, a
|
||||||
|
ld a, [hProduct + 2]
|
||||||
|
adc b
|
||||||
|
ld d, a
|
||||||
|
jr .done
|
||||||
|
|
||||||
|
.next
|
||||||
|
inc hl ; align to next triplet
|
||||||
|
ld a, [wd265]
|
||||||
|
inc a
|
||||||
|
ld [wd265], a
|
||||||
|
cp 16
|
||||||
|
jr c, .read
|
||||||
|
|
||||||
|
call .BCMinusDE
|
||||||
|
ld hl, 1600
|
||||||
|
add hl, bc
|
||||||
|
ld d, h
|
||||||
|
ld e, l
|
||||||
|
|
||||||
|
.done
|
||||||
|
; hl = de * 10
|
||||||
|
ld h, d
|
||||||
|
ld l, e
|
||||||
|
rept 2
|
||||||
|
add hl, hl
|
||||||
|
endr
|
||||||
|
add hl, de
|
||||||
|
add hl, hl
|
||||||
|
|
||||||
|
; hl = hl / 254
|
||||||
|
ld de, -254
|
||||||
|
ld a, -1
|
||||||
|
.div_254
|
||||||
|
inc a
|
||||||
|
add hl, de
|
||||||
|
jr c, .div_254
|
||||||
|
|
||||||
|
; d, e = hl / 12, hl % 12
|
||||||
|
ld d, 0
|
||||||
|
.mod_12
|
||||||
|
cp 12
|
||||||
|
jr c, .ok
|
||||||
|
sub 12
|
||||||
|
inc d
|
||||||
|
jr .mod_12
|
||||||
|
.ok
|
||||||
|
ld e, a
|
||||||
|
|
||||||
|
ld hl, MagikarpLength
|
||||||
|
ld [hl], d
|
||||||
|
inc hl
|
||||||
|
ld [hl], e
|
||||||
|
ret
|
||||||
|
; fbc9a
|
||||||
|
|
||||||
|
.BCLessThanDE: ; fbc9a
|
||||||
|
; Intention: Return bc < de.
|
||||||
|
; Reality: Return b < d.
|
||||||
|
ld a, b
|
||||||
|
cp d
|
||||||
|
ret c
|
||||||
|
ret nc ; whoops
|
||||||
|
ld a, c
|
||||||
|
cp e
|
||||||
|
ret
|
||||||
|
; fbca1
|
||||||
|
|
||||||
|
.BCMinusDE: ; fbca1
|
||||||
|
; bc -= de
|
||||||
|
ld a, c
|
||||||
|
sub e
|
||||||
|
ld c, a
|
||||||
|
ld a, b
|
||||||
|
sbc d
|
||||||
|
ld b, a
|
||||||
|
ret
|
||||||
|
; fbca8
|
||||||
|
|
||||||
|
.Lengths: ; fbca8
|
||||||
|
; ????, divisor
|
||||||
|
dwb 110, 1
|
||||||
|
dwb 310, 2
|
||||||
|
dwb 710, 4
|
||||||
|
dwb 2710, 20
|
||||||
|
dwb 7710, 50
|
||||||
|
dwb 17710, 100
|
||||||
|
dwb 32710, 150
|
||||||
|
dwb 47710, 150
|
||||||
|
dwb 57710, 100
|
||||||
|
dwb 62710, 50
|
||||||
|
dwb 64710, 20
|
||||||
|
dwb 65210, 5
|
||||||
|
dwb 65410, 2
|
||||||
|
dwb 65510, 1 ; not used
|
||||||
|
; fbcd2
|
@ -161,7 +161,7 @@ endr
|
|||||||
|
|
||||||
|
|
||||||
DoBadgeTypeBoosts: ; fbe24
|
DoBadgeTypeBoosts: ; fbe24
|
||||||
ld a, [InLinkBattle]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ INCLUDE "constants/type_constants.asm"
|
|||||||
INCLUDE "constants/move_constants.asm"
|
INCLUDE "constants/move_constants.asm"
|
||||||
INCLUDE "constants/battle_constants.asm"
|
INCLUDE "constants/battle_constants.asm"
|
||||||
INCLUDE "constants/map_constants.asm"
|
INCLUDE "constants/map_constants.asm"
|
||||||
|
INCLUDE "constants/map_setup_constants.asm"
|
||||||
INCLUDE "constants/landmark_constants.asm"
|
INCLUDE "constants/landmark_constants.asm"
|
||||||
INCLUDE "constants/item_constants.asm"
|
INCLUDE "constants/item_constants.asm"
|
||||||
INCLUDE "constants/trainer_constants.asm"
|
INCLUDE "constants/trainer_constants.asm"
|
||||||
@ -26,3 +27,5 @@ INCLUDE "constants/misc_constants.asm"
|
|||||||
INCLUDE "constants/std_constants.asm"
|
INCLUDE "constants/std_constants.asm"
|
||||||
INCLUDE "constants/deco_constants.asm"
|
INCLUDE "constants/deco_constants.asm"
|
||||||
INCLUDE "constants/radio_constants.asm"
|
INCLUDE "constants/radio_constants.asm"
|
||||||
|
INCLUDE "constants/sprite_constants.asm"
|
||||||
|
INCLUDE "constants/tilemap_constants.asm"
|
||||||
|
@ -315,3 +315,32 @@ SUBSTATUS_CURLED EQU 0
|
|||||||
const EFFECT_BEAT_UP
|
const EFFECT_BEAT_UP
|
||||||
const EFFECT_FLY
|
const EFFECT_FLY
|
||||||
const EFFECT_DEFENSE_CURL
|
const EFFECT_DEFENSE_CURL
|
||||||
|
|
||||||
|
; Battle vars used in home/battle.asm
|
||||||
|
const_def
|
||||||
|
const PLAYER_SUBSTATUS_1
|
||||||
|
const ENEMY_SUBSTATUS_1
|
||||||
|
const PLAYER_SUBSTATUS_2
|
||||||
|
const ENEMY_SUBSTATUS_2
|
||||||
|
const PLAYER_SUBSTATUS_3
|
||||||
|
const ENEMY_SUBSTATUS_3
|
||||||
|
const PLAYER_SUBSTATUS_4
|
||||||
|
const ENEMY_SUBSTATUS_4
|
||||||
|
const PLAYER_SUBSTATUS_5
|
||||||
|
const ENEMY_SUBSTATUS_5
|
||||||
|
const PLAYER_STATUS
|
||||||
|
const ENEMY_STATUS
|
||||||
|
const PLAYER_MOVE_ANIMATION
|
||||||
|
const ENEMY_MOVE_ANIMATION
|
||||||
|
const PLAYER_MOVE_EFFECT
|
||||||
|
const ENEMY_MOVE_EFFECT
|
||||||
|
const PLAYER_MOVE_POWER
|
||||||
|
const ENEMY_MOVE_POWER
|
||||||
|
const PLAYER_MOVE_TYPE
|
||||||
|
const ENEMY_MOVE_TYPE
|
||||||
|
const PLAYER_CUR_MOVE
|
||||||
|
const ENEMY_CUR_MOVE
|
||||||
|
const PLAYER_COUNTER_MOVE
|
||||||
|
const ENEMY_COUNTER_MOVE
|
||||||
|
const PLAYER_LAST_MOVE
|
||||||
|
const ENEMY_LAST_MOVE
|
||||||
|
@ -352,7 +352,7 @@ const_value SET 70
|
|||||||
const HELD_TRADE_EVOLVE
|
const HELD_TRADE_EVOLVE
|
||||||
const HELD_AMULET_COIN
|
const HELD_AMULET_COIN
|
||||||
const HELD_BRIGHTPOWDER
|
const HELD_BRIGHTPOWDER
|
||||||
const HELD_4E
|
const HELD_78
|
||||||
const HELD_FOCUS_BAND
|
const HELD_FOCUS_BAND
|
||||||
|
|
||||||
const_def
|
const_def
|
||||||
@ -364,3 +364,8 @@ const_value SET 70
|
|||||||
const ITEMATTR_POCKET
|
const ITEMATTR_POCKET
|
||||||
const ITEMATTR_HELP
|
const ITEMATTR_HELP
|
||||||
NUM_ITEMATTRS EQU const_value
|
NUM_ITEMATTRS EQU const_value
|
||||||
|
|
||||||
|
ITEMMENU_NOUSE EQU 0
|
||||||
|
ITEMMENU_CURRENT EQU 4
|
||||||
|
ITEMMENU_PARTY EQU 5
|
||||||
|
ITEMMENU_CLOSE EQU 6
|
||||||
|
File diff suppressed because it is too large
Load Diff
64
constants/map_setup_constants.asm
Normal file
64
constants/map_setup_constants.asm
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
const_value SET $f0
|
||||||
|
const MAPSETUP_00
|
||||||
|
const MAPSETUP_WARP
|
||||||
|
const MAPSETUP_02
|
||||||
|
const MAPSETUP_RELOADMAP
|
||||||
|
const MAPSETUP_04
|
||||||
|
const MAPSETUP_05
|
||||||
|
const MAPSETUP_06
|
||||||
|
const MAPSETUP_07
|
||||||
|
const MAPSETUP_08
|
||||||
|
const MAPSETUP_09
|
||||||
|
const MAPSETUP_10
|
||||||
|
const MAPSETUP_BADWARP
|
||||||
|
|
||||||
|
; Command descriptions from Condensation water's scripting compendium. const_def
|
||||||
|
const_def
|
||||||
|
|
||||||
|
const map_lcd_on
|
||||||
|
const map_lcd_off
|
||||||
|
const map_sound_off
|
||||||
|
const map_music
|
||||||
|
const map_start_music
|
||||||
|
const map_fade_music
|
||||||
|
const map_fade
|
||||||
|
const map_bike_music
|
||||||
|
const map_music_force
|
||||||
|
const map_max_volume
|
||||||
|
const map_load_blocks
|
||||||
|
const map_connection_blocks
|
||||||
|
const map_save_screen
|
||||||
|
const map_buffer_screen
|
||||||
|
const map_load_graphics
|
||||||
|
const map_load_tileset_header
|
||||||
|
const map_time_of_day
|
||||||
|
const map_palettes
|
||||||
|
const map_wildmons
|
||||||
|
const map_sprites
|
||||||
|
const map_change_callback
|
||||||
|
const map_start_callback
|
||||||
|
const map_load_objects
|
||||||
|
const map_load_spawn
|
||||||
|
const map_load_connection
|
||||||
|
const map_load_warp
|
||||||
|
const map_attributes
|
||||||
|
const map_attributes_2
|
||||||
|
const map_clear_bg_palettes
|
||||||
|
const map_fade_out_palettes
|
||||||
|
const map_fade_in_palettes
|
||||||
|
const map_anchor_screen
|
||||||
|
const map_warp_face
|
||||||
|
const map_face_down
|
||||||
|
const map_spawn_coord
|
||||||
|
const map_player_coord
|
||||||
|
const map_prolong_sprites
|
||||||
|
const map_delay_sprites
|
||||||
|
const map_update_roam
|
||||||
|
const map_keep_roam
|
||||||
|
const map_fade_out_music
|
||||||
|
const map_animations_on
|
||||||
|
const map_animations_off
|
||||||
|
const map_keep_palettes
|
||||||
|
const map_text_scroll_off
|
||||||
|
const map_stop_script
|
||||||
|
map_end_setup_script EQU -1
|
@ -46,8 +46,6 @@ CHECK_FLAG EQU 2
|
|||||||
|
|
||||||
|
|
||||||
; joypad
|
; joypad
|
||||||
BUTTONS EQU %00010000
|
|
||||||
D_PAD EQU %00100000
|
|
||||||
|
|
||||||
NO_INPUT EQU %00000000
|
NO_INPUT EQU %00000000
|
||||||
A_BUTTON EQU %00000001
|
A_BUTTON EQU %00000001
|
||||||
@ -59,6 +57,11 @@ D_LEFT EQU %00100000
|
|||||||
D_UP EQU %01000000
|
D_UP EQU %01000000
|
||||||
D_DOWN EQU %10000000
|
D_DOWN EQU %10000000
|
||||||
|
|
||||||
|
BUTTONS EQU A_BUTTON | B_BUTTON | SELECT | START
|
||||||
|
D_PAD EQU D_RIGHT | D_LEFT | D_UP | D_DOWN
|
||||||
|
|
||||||
|
R_DPAD EQU %00100000
|
||||||
|
R_BUTTONS EQU %00010000
|
||||||
|
|
||||||
; screen
|
; screen
|
||||||
HP_BAR_LENGTH EQU 6
|
HP_BAR_LENGTH EQU 6
|
||||||
@ -146,3 +149,13 @@ const_value = 1
|
|||||||
const HAPPINESS_MASSAGE ; 12
|
const HAPPINESS_MASSAGE ; 12
|
||||||
const HAPPINESS_GAINLEVELATHOME ; 13
|
const HAPPINESS_GAINLEVELATHOME ; 13
|
||||||
|
|
||||||
|
|
||||||
|
const_def
|
||||||
|
const LINK_NULL
|
||||||
|
const LINK_TIMECAPSULE
|
||||||
|
const LINK_TRADECENTER
|
||||||
|
const LINK_COLOSSEUM
|
||||||
|
const LINK_MOBILE
|
||||||
|
|
||||||
|
HMENURETURN_SCRIPT EQU %10000000
|
||||||
|
HMENURETURN_ASM EQU %11111111
|
||||||
|
@ -40,13 +40,28 @@
|
|||||||
const PHONE_BUENA
|
const PHONE_BUENA
|
||||||
|
|
||||||
const_def
|
const_def
|
||||||
const ELMCALL_NONE
|
const SPECIALCALL_NONE
|
||||||
const ELMCALL_POKERUS
|
const SPECIALCALL_POKERUS
|
||||||
const ELMCALL_ROBBED
|
const SPECIALCALL_ROBBED
|
||||||
const ELMCALL_ASSISTANT
|
const SPECIALCALL_ASSISTANT
|
||||||
const ELMCALL_WEIRDBROADCAST
|
const SPECIALCALL_WEIRDBROADCAST
|
||||||
const ELMCALL_SSTICKET
|
const SPECIALCALL_SSTICKET
|
||||||
const ELMCALL_UNKNOWN
|
const SPECIALCALL_BIKESHOP
|
||||||
const MOMCALL_WORRIED
|
const SPECIALCALL_WORRIED
|
||||||
const ELMCALL_MASTERBALL
|
const SPECIALCALL_MASTERBALL
|
||||||
|
|
||||||
|
const_def
|
||||||
|
const PHONE_CONTACT_TRAINER_CLASS
|
||||||
|
const PHONE_CONTACT_TRAINER_NUMBER
|
||||||
|
const PHONE_CONTACT_MAP_GROUP
|
||||||
|
const PHONE_CONTACT_MAP_NUMBER
|
||||||
|
const PHONE_CONTACT_SCRIPT1_TIME
|
||||||
|
const PHONE_CONTACT_SCRIPT1_BANK
|
||||||
|
const PHONE_CONTACT_SCRIPT1_ADDR_LO
|
||||||
|
const PHONE_CONTACT_SCRIPT1_ADDR_HI
|
||||||
|
const PHONE_CONTACT_SCRIPT2_TIME
|
||||||
|
const PHONE_CONTACT_SCRIPT2_BANK
|
||||||
|
const PHONE_CONTACT_SCRIPT2_ADDR_LO
|
||||||
|
const PHONE_CONTACT_SCRIPT2_ADDR_HI
|
||||||
|
PHONE_TABLE_WIDTH EQU const_value
|
||||||
|
CONTACT_LIST_SIZE EQU 10
|
||||||
|
@ -5,7 +5,7 @@ LAST_TALKED EQU -2
|
|||||||
const_def
|
const_def
|
||||||
const VAR_STRINGBUFFER2
|
const VAR_STRINGBUFFER2
|
||||||
const VAR_PARTYCOUNT
|
const VAR_PARTYCOUNT
|
||||||
const VAR_02
|
const VAR_BATTLERESULT
|
||||||
const VAR_BATTLETYPE
|
const VAR_BATTLETYPE
|
||||||
const VAR_TIMEOFDAY
|
const VAR_TIMEOFDAY
|
||||||
const VAR_DEXCAUGHT
|
const VAR_DEXCAUGHT
|
||||||
@ -23,11 +23,15 @@ LAST_TALKED EQU -2
|
|||||||
const VAR_CONTESTMINUTES
|
const VAR_CONTESTMINUTES
|
||||||
const VAR_XCOORD
|
const VAR_XCOORD
|
||||||
const VAR_YCOORD
|
const VAR_YCOORD
|
||||||
const VAR_POKERUS
|
const VAR_SPECIALPHONECALL
|
||||||
const VAR_15
|
const VAR_15
|
||||||
const VAR_16
|
const VAR_KURT_APRICORNS
|
||||||
const VAR_CALLERID
|
const VAR_CALLERID
|
||||||
const VAR_BLUECARDBALANCE
|
const VAR_BLUECARDBALANCE
|
||||||
const VAR_19
|
const VAR_BUENASPASSWORD
|
||||||
const VAR_KENJI_BREAK
|
const VAR_KENJI_BREAK
|
||||||
NUM_VARS EQU const_value
|
NUM_VARS EQU const_value
|
||||||
|
|
||||||
|
RETVAR_STRBUF2 EQU (0 << 6)
|
||||||
|
RETVAR_ADDR_DE EQU (1 << 6)
|
||||||
|
RETVAR_EXECUTE EQU (2 << 6)
|
||||||
|
219
constants/sprite_constants.asm
Normal file
219
constants/sprite_constants.asm
Normal file
@ -0,0 +1,219 @@
|
|||||||
|
|
||||||
|
; sprites
|
||||||
|
const_def
|
||||||
|
const SPRITE_NONE ; 00
|
||||||
|
const SPRITE_CHRIS ; 01
|
||||||
|
const SPRITE_CHRIS_BIKE ; 02
|
||||||
|
const SPRITE_GAMEBOY_KID ; 03
|
||||||
|
const SPRITE_SILVER ; 04
|
||||||
|
const SPRITE_OAK ; 05
|
||||||
|
const SPRITE_RED ; 06
|
||||||
|
const SPRITE_BLUE ; 07
|
||||||
|
const SPRITE_BILL ; 08
|
||||||
|
const SPRITE_ELDER ; 09
|
||||||
|
const SPRITE_JANINE ; 0a
|
||||||
|
const SPRITE_KURT ; 0b
|
||||||
|
const SPRITE_MOM ; 0c
|
||||||
|
const SPRITE_BLAINE ; 0d
|
||||||
|
const SPRITE_REDS_MOM ; 0e
|
||||||
|
const SPRITE_DAISY ; 0f
|
||||||
|
const SPRITE_ELM ; 10
|
||||||
|
const SPRITE_WILL ; 11
|
||||||
|
const SPRITE_FALKNER ; 12
|
||||||
|
const SPRITE_WHITNEY ; 13
|
||||||
|
const SPRITE_BUGSY ; 14
|
||||||
|
const SPRITE_MORTY ; 15
|
||||||
|
const SPRITE_CHUCK ; 16
|
||||||
|
const SPRITE_JASMINE ; 17
|
||||||
|
const SPRITE_PRYCE ; 18
|
||||||
|
const SPRITE_CLAIR ; 19
|
||||||
|
const SPRITE_BROCK ; 1a
|
||||||
|
const SPRITE_KAREN ; 1b
|
||||||
|
const SPRITE_BRUNO ; 1c
|
||||||
|
const SPRITE_MISTY ; 1d
|
||||||
|
const SPRITE_LANCE ; 1e
|
||||||
|
const SPRITE_SURGE ; 1f
|
||||||
|
const SPRITE_ERIKA ; 20
|
||||||
|
const SPRITE_KOGA ; 21
|
||||||
|
const SPRITE_SABRINA ; 22
|
||||||
|
const SPRITE_COOLTRAINER_M ; 23
|
||||||
|
const SPRITE_COOLTRAINER_F ; 24
|
||||||
|
const SPRITE_BUG_CATCHER ; 25
|
||||||
|
const SPRITE_TWIN ; 26
|
||||||
|
const SPRITE_YOUNGSTER ; 27
|
||||||
|
const SPRITE_LASS ; 28
|
||||||
|
const SPRITE_TEACHER ; 29
|
||||||
|
const SPRITE_BUENA ; 2a
|
||||||
|
const SPRITE_SUPER_NERD ; 2b
|
||||||
|
const SPRITE_ROCKER ; 2c
|
||||||
|
const SPRITE_POKEFAN_M ; 2d
|
||||||
|
const SPRITE_POKEFAN_F ; 2e
|
||||||
|
const SPRITE_GRAMPS ; 2f
|
||||||
|
const SPRITE_GRANNY ; 30
|
||||||
|
const SPRITE_SWIMMER_GUY ; 31
|
||||||
|
const SPRITE_SWIMMER_GIRL ; 32
|
||||||
|
const SPRITE_BIG_SNORLAX ; 33
|
||||||
|
const SPRITE_SURFING_PIKACHU ; 34
|
||||||
|
const SPRITE_ROCKET ; 35
|
||||||
|
const SPRITE_ROCKET_GIRL ; 36
|
||||||
|
const SPRITE_NURSE ; 37
|
||||||
|
const SPRITE_LINK_RECEPTIONIST ; 38
|
||||||
|
const SPRITE_CLERK ; 39
|
||||||
|
const SPRITE_FISHER ; 3a
|
||||||
|
const SPRITE_FISHING_GURU ; 3b
|
||||||
|
const SPRITE_SCIENTIST ; 3c
|
||||||
|
const SPRITE_KIMONO_GIRL ; 3d
|
||||||
|
const SPRITE_SAGE ; 3e
|
||||||
|
const SPRITE_UNUSED_GUY ; 3f
|
||||||
|
const SPRITE_GENTLEMAN ; 40
|
||||||
|
const SPRITE_BLACK_BELT ; 41
|
||||||
|
const SPRITE_RECEPTIONIST ; 42
|
||||||
|
const SPRITE_OFFICER ; 43
|
||||||
|
const SPRITE_CAL ; 44
|
||||||
|
const SPRITE_SLOWPOKE ; 45
|
||||||
|
const SPRITE_CAPTAIN ; 46
|
||||||
|
const SPRITE_BIG_LAPRAS ; 47
|
||||||
|
const SPRITE_GYM_GUY ; 48
|
||||||
|
const SPRITE_SAILOR ; 49
|
||||||
|
const SPRITE_BIKER ; 4a
|
||||||
|
const SPRITE_PHARMACIST ; 4b
|
||||||
|
const SPRITE_MONSTER ; 4c
|
||||||
|
const SPRITE_FAIRY ; 4d
|
||||||
|
const SPRITE_BIRD ; 4e
|
||||||
|
const SPRITE_DRAGON ; 4f
|
||||||
|
const SPRITE_BIG_ONIX ; 50
|
||||||
|
const SPRITE_N64 ; 51
|
||||||
|
const SPRITE_SUDOWOODO ; 52
|
||||||
|
const SPRITE_SURF ; 53
|
||||||
|
const SPRITE_POKE_BALL ; 54
|
||||||
|
const SPRITE_POKEDEX ; 55
|
||||||
|
const SPRITE_PAPER ; 56
|
||||||
|
const SPRITE_VIRTUAL_BOY ; 57
|
||||||
|
const SPRITE_OLD_LINK_RECEPTIONIST ; 58
|
||||||
|
const SPRITE_ROCK ; 59
|
||||||
|
const SPRITE_BOULDER ; 5a
|
||||||
|
const SPRITE_SNES ; 5b
|
||||||
|
const SPRITE_FAMICOM ; 5c
|
||||||
|
const SPRITE_FRUIT_TREE ; 5d
|
||||||
|
const SPRITE_GOLD_TROPHY ; 5e
|
||||||
|
const SPRITE_SILVER_TROPHY ; 5f
|
||||||
|
const SPRITE_KRIS ; 60
|
||||||
|
const SPRITE_KRIS_BIKE ; 61
|
||||||
|
const SPRITE_KURT_OUTSIDE ; 62
|
||||||
|
const SPRITE_SUICUNE ; 63
|
||||||
|
const SPRITE_ENTEI ; 64
|
||||||
|
const SPRITE_RAIKOU ; 65
|
||||||
|
const SPRITE_STANDING_YOUNGSTER ; 66
|
||||||
|
|
||||||
|
const_value SET $80
|
||||||
|
|
||||||
|
SPRITE_POKEMON EQU const_value
|
||||||
|
const SPRITE_UNOWN ; 80
|
||||||
|
const SPRITE_GEODUDE ; 81
|
||||||
|
const SPRITE_GROWLITHE ; 82
|
||||||
|
const SPRITE_WEEDLE ; 83
|
||||||
|
const SPRITE_SHELLDER ; 84
|
||||||
|
const SPRITE_ODDISH ; 85
|
||||||
|
const SPRITE_GENGAR ; 86
|
||||||
|
const SPRITE_ZUBAT ; 87
|
||||||
|
const SPRITE_MAGIKARP ; 88
|
||||||
|
const SPRITE_SQUIRTLE ; 89
|
||||||
|
const SPRITE_TOGEPI ; 8a
|
||||||
|
const SPRITE_BUTTERFREE ; 8b
|
||||||
|
const SPRITE_DIGLETT ; 8c
|
||||||
|
const SPRITE_POLIWAG ; 8d
|
||||||
|
const SPRITE_PIKACHU ; 8e
|
||||||
|
const SPRITE_CLEFAIRY ; 8f
|
||||||
|
const SPRITE_CHARMANDER ; 90
|
||||||
|
const SPRITE_JYNX ; 91
|
||||||
|
const SPRITE_STARMIE ; 92
|
||||||
|
const SPRITE_BULBASAUR ; 93
|
||||||
|
const SPRITE_JIGGLYPUFF ; 94
|
||||||
|
const SPRITE_GRIMER ; 95
|
||||||
|
const SPRITE_EKANS ; 96
|
||||||
|
const SPRITE_PARAS ; 97
|
||||||
|
const SPRITE_TENTACOOL ; 98
|
||||||
|
const SPRITE_TAUROS ; 99
|
||||||
|
const SPRITE_MACHOP ; 9a
|
||||||
|
const SPRITE_VOLTORB ; 9b
|
||||||
|
const SPRITE_LAPRAS ; 9c
|
||||||
|
const SPRITE_RHYDON ; 9d
|
||||||
|
const SPRITE_MOLTRES ; 9e
|
||||||
|
const SPRITE_SNORLAX ; 9f
|
||||||
|
const SPRITE_GYARADOS ; a0
|
||||||
|
const SPRITE_LUGIA ; a1
|
||||||
|
const SPRITE_HO_OH ; a2
|
||||||
|
|
||||||
|
const_value SET $e0
|
||||||
|
const SPRITE_DAYCARE_MON_1 ; e0
|
||||||
|
const SPRITE_DAYCARE_MON_2 ; e1
|
||||||
|
|
||||||
|
const_value SET $f0
|
||||||
|
SPRITE_VARS EQU const_value
|
||||||
|
const SPRITE_CONSOLE ; f0
|
||||||
|
const SPRITE_DOLL_1 ; f1
|
||||||
|
const SPRITE_DOLL_2 ; f2
|
||||||
|
const SPRITE_BIG_DOLL ; f3
|
||||||
|
const SPRITE_WEIRD_TREE ; f4
|
||||||
|
const SPRITE_OLIVINE_RIVAL ; f5
|
||||||
|
const SPRITE_AZALEA_ROCKET ; f6
|
||||||
|
const SPRITE_FUCHSIA_GYM_1 ; f7
|
||||||
|
const SPRITE_FUCHSIA_GYM_2 ; f8
|
||||||
|
const SPRITE_FUCHSIA_GYM_3 ; f9
|
||||||
|
const SPRITE_FUCHSIA_GYM_4 ; fa
|
||||||
|
const SPRITE_COPYCAT ; fb
|
||||||
|
const SPRITE_JANINE_IMPERSONATOR ; fc
|
||||||
|
|
||||||
|
; sprite types
|
||||||
|
const_value SET 1
|
||||||
|
const WALKING_SPRITE
|
||||||
|
const STANDING_SPRITE
|
||||||
|
const STILL_SPRITE
|
||||||
|
|
||||||
|
; sprite palettes
|
||||||
|
const_def
|
||||||
|
const PAL_OW_RED
|
||||||
|
const PAL_OW_BLUE
|
||||||
|
const PAL_OW_GREEN
|
||||||
|
const PAL_OW_BROWN
|
||||||
|
const PAL_OW_PINK
|
||||||
|
const PAL_OW_SILVER
|
||||||
|
const PAL_OW_TREE
|
||||||
|
const PAL_OW_ROCK
|
||||||
|
|
||||||
|
; sprite movements
|
||||||
|
const_def
|
||||||
|
const SPRITEMOVEFN_00
|
||||||
|
const SPRITEMOVEFN_01
|
||||||
|
const SPRITEMOVEFN_02
|
||||||
|
const SPRITEMOVEFN_03
|
||||||
|
const SPRITEMOVEFN_04
|
||||||
|
const SPRITEMOVEFN_05
|
||||||
|
const SPRITEMOVEFN_06
|
||||||
|
const SPRITEMOVEFN_07
|
||||||
|
const SPRITEMOVEFN_08
|
||||||
|
const SPRITEMOVEFN_09
|
||||||
|
const SPRITEMOVEFN_0A
|
||||||
|
const SPRITEMOVEFN_0B
|
||||||
|
const SPRITEMOVEFN_0C
|
||||||
|
const SPRITEMOVEFN_0D
|
||||||
|
const SPRITEMOVEFN_0E
|
||||||
|
const SPRITEMOVEFN_0F
|
||||||
|
const SPRITEMOVEFN_10
|
||||||
|
const SPRITEMOVEFN_11
|
||||||
|
const SPRITEMOVEFN_12
|
||||||
|
const SPRITEMOVEFN_13
|
||||||
|
const SPRITEMOVEFN_14
|
||||||
|
const SPRITEMOVEFN_15
|
||||||
|
const SPRITEMOVEFN_16
|
||||||
|
const SPRITEMOVEFN_17
|
||||||
|
const SPRITEMOVEFN_18
|
||||||
|
const SPRITEMOVEFN_19
|
||||||
|
const SPRITEMOVEFN_1A
|
||||||
|
const SPRITEMOVEFN_1B
|
||||||
|
const SPRITEMOVEFN_1C
|
||||||
|
const SPRITEMOVEFN_1D
|
||||||
|
const SPRITEMOVEFN_1E
|
||||||
|
const SPRITEMOVEFN_1F
|
||||||
|
const SPRITEMOVEFN_20
|
||||||
|
const SPRITEMOVEFN_21
|
5
constants/tilemap_constants.asm
Normal file
5
constants/tilemap_constants.asm
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
LANDTILE EQU 0
|
||||||
|
WALLTILE EQU 1
|
||||||
|
WATRTILE EQU 15
|
||||||
|
|
||||||
|
TALK EQU 1 << 4
|
@ -1,5 +1,12 @@
|
|||||||
; trainer groups
|
; trainer groups
|
||||||
enum_start 1
|
enum_start
|
||||||
|
trainerclass TRAINER_NONE ; 0
|
||||||
|
const PHONECONTACT_MOM
|
||||||
|
const PHONECONTACT_BIKESHOP
|
||||||
|
const PHONECONTACT_BILL
|
||||||
|
const PHONECONTACT_ELM
|
||||||
|
const PHONECONTACT_BUENA
|
||||||
|
|
||||||
trainerclass FALKNER ; 1
|
trainerclass FALKNER ; 1
|
||||||
|
|
||||||
trainerclass WHITNEY ; 2
|
trainerclass WHITNEY ; 2
|
||||||
@ -607,3 +614,33 @@
|
|||||||
const EUSINE
|
const EUSINE
|
||||||
|
|
||||||
NUM_TRAINER_CLASSES EQU __enum__
|
NUM_TRAINER_CLASSES EQU __enum__
|
||||||
|
|
||||||
|
const_def
|
||||||
|
const NO_AI
|
||||||
|
const_value = 0
|
||||||
|
shift_const AI_BASIC
|
||||||
|
shift_const AI_SETUP
|
||||||
|
shift_const AI_TYPES
|
||||||
|
shift_const AI_OFFENSIVE
|
||||||
|
shift_const AI_SMART
|
||||||
|
shift_const AI_OPPORTUNIST
|
||||||
|
shift_const AI_AGGRESSIVE
|
||||||
|
shift_const AI_CAUTIOUS
|
||||||
|
shift_const AI_STATUS
|
||||||
|
shift_const AI_RISKY
|
||||||
|
shift_const AI_10
|
||||||
|
shift_const AI_11
|
||||||
|
shift_const AI_12
|
||||||
|
shift_const AI_13
|
||||||
|
shift_const AI_14
|
||||||
|
shift_const AI_15
|
||||||
|
|
||||||
|
const_def
|
||||||
|
const TRNATTR_ITEM1
|
||||||
|
const TRNATTR_ITEM2
|
||||||
|
const TRNATTR_BASEMONEY
|
||||||
|
const TRNATTR_AI1
|
||||||
|
const TRNATTR_AI2
|
||||||
|
const TRNATTR_AI3
|
||||||
|
const TRNATTR_AI4
|
||||||
|
NUM_TRAINER_ATTRIBUTES EQU const_value
|
||||||
|
@ -34,7 +34,6 @@ POKEDEX_ENTRIES_4 EQU $74
|
|||||||
; engine/events.o
|
; engine/events.o
|
||||||
; engine/scripting.o
|
; engine/scripting.o
|
||||||
; engine/events_2.o
|
; engine/events_2.o
|
||||||
|
|
||||||
EVENTS EQU $25
|
EVENTS EQU $25
|
||||||
|
|
||||||
|
|
||||||
|
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