mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
Merge remote-tracking branch 'origin/master' into pngs-kind-of
Conflicts: INSTALL.md
This commit is contained in:
commit
e638cdb74c
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
||||
[submodule "extras"]
|
||||
path = extras
|
||||
url = git://github.com/kanzure/pokemon-reverse-engineering-tools.git
|
||||
url = git://github.com/pret/pokemon-reverse-engineering-tools.git
|
||||
|
105
INSTALL.md
105
INSTALL.md
@ -2,67 +2,78 @@
|
||||
|
||||
Note that this requires python2.7 for the moment.
|
||||
|
||||
sudo apt-get install make gcc bison git python python-setuptools
|
||||
```bash
|
||||
sudo apt-get install make gcc bison git python python-pip
|
||||
pip install pypng
|
||||
|
||||
git clone git://github.com/bentley/rgbds.git
|
||||
cd rgbds
|
||||
sudo make install
|
||||
cd ..
|
||||
git clone https://github.com/bentley/rgbds
|
||||
cd rgbds
|
||||
sudo make install
|
||||
cd ..
|
||||
|
||||
git clone --recursive git://github.com/kanzure/pokecrystal.git
|
||||
easy_install pypng
|
||||
cd pokecrystal
|
||||
make init
|
||||
git clone --recursive https://github.com/pret/pokecrystal
|
||||
cd pokecrystal
|
||||
make init
|
||||
```
|
||||
|
||||
To build **pokecrystal.gbc**:
|
||||
|
||||
make
|
||||
```bash
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
# OS X
|
||||
# Mac
|
||||
|
||||
On 10.8 or earlier, download and install **Command Line Tools for Xcode**.
|
||||
In **Terminal**, run:
|
||||
|
||||
On 10.9 or later:
|
||||
```bash
|
||||
xcode-select --install
|
||||
sudo easy_install pypng
|
||||
|
||||
xcode-select --install
|
||||
git clone https://github.com/bentley/rgbds
|
||||
cd rgbds
|
||||
sudo make install
|
||||
cd ..
|
||||
|
||||
In the shell, run:
|
||||
|
||||
git clone git://github.com/bentley/rgbds.git
|
||||
cd rgbds
|
||||
sudo make install
|
||||
cd ..
|
||||
|
||||
git clone --recursive git://github.com/kanzure/pokecrystal.git
|
||||
easy_install pypng
|
||||
cd pokecrystal
|
||||
make init
|
||||
git clone --recursive https://github.com/pret/pokecrystal
|
||||
cd pokecrystal
|
||||
make init
|
||||
```
|
||||
|
||||
To build **pokecrystal.gbc**:
|
||||
|
||||
make
|
||||
```bash
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
# Windows
|
||||
|
||||
To build on Windows, use [**Cygwin**](http://cygwin.com/install.html) (32-bit).
|
||||
|
||||
In the installer, select the following packages: `make` `git` `python` `python-setuptools` `gcc-core` `libsasl2-3` `ca-certificates`
|
||||
To build on Windows, use [**Cygwin**](http://cygwin.com/install.html). Use the default settings.
|
||||
|
||||
Then get the most recent version of [**rgbds**](https://github.com/bentley/rgbds/releases/).
|
||||
Put `rgbasm.exe`, `rgblink.exe` and `rgbfix.exe` in `C:\cygwin\usr\local\bin`.
|
||||
Extract the archive and put `rgbasm.exe`, `rgblink.exe` and `rgbfix.exe` in `C:\cygwin\usr\local\bin`.
|
||||
|
||||
In the **Cygwin terminal**:
|
||||
|
||||
git clone --recursive git://github.com/kanzure/pokecrystal.git
|
||||
easy_install pypng
|
||||
cd pokecrystal
|
||||
make init
|
||||
```bash
|
||||
install $(lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg) /bin
|
||||
apt-cyg install make git python gcc-core libsasl2-3 ca-certificates
|
||||
|
||||
To build:
|
||||
lynx -source bootstrap.pypa.io/get-pip.py | python
|
||||
pip install pypng
|
||||
|
||||
make
|
||||
git clone --recursive https://github.com/pret/pokecrystal
|
||||
cd pokecrystal
|
||||
make init
|
||||
```
|
||||
|
||||
To build **pokecrystal.gbc**:
|
||||
|
||||
```bash
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
# Vagrant
|
||||
@ -74,14 +85,14 @@ VirtualBox. Follow these steps:
|
||||
* Follow the instructions to [download and install VirtualBox](http://docs-v1.vagrantup.com/v1/docs/getting-started/)
|
||||
* Run these commands:
|
||||
|
||||
```
|
||||
vagrant box add pokecrystal http://diyhpl.us/~bryan/irc/pokecrystal/pokecrystal.box
|
||||
mkdir vagrantbox
|
||||
cd vagrantbox
|
||||
vagrant init pokecrystal
|
||||
vagrant up
|
||||
vagrant ssh -c "cd /vagrant && git clone --recursive git://github.com/kanzure/pokecrystal.git && cd pokecrystal && make init"
|
||||
vagrant ssh
|
||||
```bash
|
||||
vagrant box add pokecrystal http://diyhpl.us/~bryan/irc/pokecrystal/pokecrystal.box
|
||||
mkdir vagrantbox
|
||||
cd vagrantbox
|
||||
vagrant init pokecrystal
|
||||
vagrant up
|
||||
vagrant ssh -c "cd /vagrant && git clone --recursive https://github.com/pret/pokecrystal && cd pokecrystal && make init"
|
||||
vagrant ssh
|
||||
```
|
||||
|
||||
Running "vagrant ssh" will give you a shell to type commands into for compiling
|
||||
@ -91,5 +102,7 @@ folder inside of the guest virtual machine at "/vagrant".
|
||||
To build the project, run these commands in the guest (that is, inside "vagrant
|
||||
ssh"):
|
||||
|
||||
cd /vagrant/pokecrystal
|
||||
make
|
||||
```bash
|
||||
cd /vagrant/pokecrystal
|
||||
make
|
||||
```
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -237,17 +237,17 @@ Functioncc220: ; cc220
|
||||
; Appears to be unused.
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ld a, $80
|
||||
ld a, (VBGMap0 tile $28) % $100
|
||||
ld [hBGMapAddress], a
|
||||
ld a, $9a
|
||||
ld [$ffd7], a
|
||||
ld a, (VBGMap0 tile $28) / $100
|
||||
ld [hBGMapAddress + 1], a
|
||||
call Function3200
|
||||
ld a, $60
|
||||
ld [hWY], a
|
||||
xor a
|
||||
ld [hBGMapAddress], a
|
||||
ld a, $98
|
||||
ld [$ffd7], a
|
||||
ld a, VBGMap0 / $100
|
||||
ld [hBGMapAddress + 1], a
|
||||
call BattleAnimDelayFrame
|
||||
ret
|
||||
; cc23d
|
||||
@ -709,7 +709,7 @@ BattleAnimCmd_D5: ; cc485 (33:4485)
|
||||
rept 4
|
||||
add hl, hl
|
||||
endr
|
||||
ld de, $8310
|
||||
ld de, VTiles0 tile $31
|
||||
add hl, de
|
||||
ld a, [BattleAnimByte]
|
||||
call Functionce846
|
||||
@ -817,13 +817,13 @@ endr
|
||||
ld a, $49
|
||||
ld [hl], a
|
||||
|
||||
ld hl, $8730
|
||||
ld de, $9060
|
||||
ld hl, VTiles0 tile $73
|
||||
ld de, VTiles2 tile $06
|
||||
ld a, $70
|
||||
ld [BattleAnimTemps], a
|
||||
ld a, $7
|
||||
call Functioncc561
|
||||
ld de, $9310
|
||||
ld de, VTiles2 tile $31
|
||||
ld a, $60
|
||||
ld [BattleAnimTemps], a
|
||||
ld a, $6
|
||||
@ -873,13 +873,13 @@ endr
|
||||
ld a, $43
|
||||
ld [hl], a
|
||||
|
||||
ld hl, $8660
|
||||
ld de, $9050
|
||||
ld hl, VTiles0 tile $66
|
||||
ld de, VTiles2 tile $05
|
||||
ld a, $70
|
||||
ld [BattleAnimTemps], a
|
||||
ld a, $7
|
||||
call Functioncc5b3
|
||||
ld de, $9310
|
||||
ld de, VTiles2 tile $31
|
||||
ld a, $60
|
||||
ld [BattleAnimTemps], a
|
||||
ld a, $6
|
||||
@ -932,7 +932,7 @@ BattleAnimCmd_DC: ; cc5dc (33:45dc)
|
||||
ld [CurPartySpecies], a ; CurPartySpecies
|
||||
ld hl, BattleMonDVs ; BattleMonDVs
|
||||
predef GetUnownLetter
|
||||
ld de, $8000
|
||||
ld de, VTiles0 tile $00
|
||||
predef GetFrontpic
|
||||
jr .done
|
||||
|
||||
@ -941,7 +941,7 @@ BattleAnimCmd_DC: ; cc5dc (33:45dc)
|
||||
ld [CurPartySpecies], a ; CurPartySpecies
|
||||
ld hl, EnemyMonDVs ; EnemyMonDVs
|
||||
predef GetUnownLetter
|
||||
ld de, $8000
|
||||
ld de, VTiles0 tile $00
|
||||
predef GetBackpic
|
||||
|
||||
.done
|
||||
@ -953,19 +953,19 @@ BattleAnimCmd_DC: ; cc5dc (33:45dc)
|
||||
|
||||
BattleAnimCmd_E8: ; cc622 (33:4622)
|
||||
|
||||
ld de, $8000
|
||||
ld de, VTiles0 tile $00
|
||||
ld a, [hBattleTurn] ; $ff00+$e4
|
||||
and a
|
||||
jr z, .player
|
||||
|
||||
ld hl, $9000
|
||||
ld hl, VTiles2 tile $00
|
||||
ld b, 0
|
||||
ld c, $31
|
||||
call Request2bpp
|
||||
ret
|
||||
|
||||
.player
|
||||
ld hl, $9310
|
||||
ld hl, VTiles2 tile $31
|
||||
ld b, 0
|
||||
ld c, $24
|
||||
call Request2bpp
|
||||
@ -1009,7 +1009,7 @@ GetSubstitutePic: ; cc64c
|
||||
ld de, sScratch + $1b0
|
||||
call CopyMonsterSpriteTile
|
||||
|
||||
ld hl, $9000
|
||||
ld hl, VTiles2 tile $00
|
||||
ld de, sScratch
|
||||
lb bc, BANK(GetSubstitutePic), 7 * 7
|
||||
call Request2bpp
|
||||
@ -1029,7 +1029,7 @@ GetSubstitutePic: ; cc64c
|
||||
ld de, sScratch + $170
|
||||
call CopyMonsterSpriteTile
|
||||
|
||||
ld hl, $9310
|
||||
ld hl, VTiles2 tile $31
|
||||
ld de, sScratch
|
||||
lb bc, BANK(GetSubstitutePic), 6 * 6
|
||||
call Request2bpp
|
||||
@ -1077,7 +1077,7 @@ GetMinimizePic: ; cc6e7 (33:46e7)
|
||||
|
||||
ld de, sScratch + $1a0
|
||||
call CopyMinimizePic
|
||||
ld hl, $9000
|
||||
ld hl, VTiles2 tile $00
|
||||
ld de, sScratch
|
||||
lb bc, BANK(GetMinimizePic), $31
|
||||
ret
|
||||
@ -1085,7 +1085,7 @@ GetMinimizePic: ; cc6e7 (33:46e7)
|
||||
.player
|
||||
ld de, sScratch + $160
|
||||
call CopyMinimizePic
|
||||
ld hl, $9310
|
||||
ld hl, VTiles2 tile $31
|
||||
ld de, sScratch
|
||||
lb bc, BANK(GetMinimizePic), $24
|
||||
ret
|
||||
@ -1110,7 +1110,7 @@ BattleAnimCmd_E9: ; cc735 (33:4735)
|
||||
xor a
|
||||
call GetSRAMBank
|
||||
call GetMinimizePic
|
||||
ld hl, $8000
|
||||
ld hl, VTiles0 tile $00
|
||||
call Request2bpp
|
||||
call CloseSRAM
|
||||
pop af
|
||||
@ -1159,14 +1159,14 @@ BattleAnimCmd_E6: ; cc776 (33:4776)
|
||||
|
||||
ld hl, BattleMonDVs ; BattleMonDVs
|
||||
predef GetUnownLetter
|
||||
ld de, $9000
|
||||
ld de, VTiles2 tile $00
|
||||
predef GetFrontpic
|
||||
jr .done
|
||||
|
||||
.player
|
||||
ld hl, EnemyMonDVs ; EnemyMonDVs
|
||||
predef GetUnownLetter
|
||||
ld de, $9310
|
||||
ld de, VTiles2 tile $31
|
||||
predef GetBackpic
|
||||
|
||||
.done
|
||||
|
@ -1696,9 +1696,9 @@ Functioncd677: ; cd677 (33:5677)
|
||||
ld a, $42
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
ld a, $58
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, $5e
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ret
|
||||
|
||||
Functioncd687: ; cd687 (33:5687)
|
||||
@ -1712,7 +1712,7 @@ Functioncd687: ; cd687 (33:5687)
|
||||
jr nc, .asm_cd69b
|
||||
call Functionce72c
|
||||
xor a
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ret
|
||||
.asm_cd69b
|
||||
dec a
|
||||
@ -1730,7 +1730,7 @@ Functioncd687: ; cd687 (33:5687)
|
||||
add [hl]
|
||||
sub $10
|
||||
ret c
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld hl, $9
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@ -1754,8 +1754,8 @@ Functioncd6c6: ; cd6c6 (33:56c6)
|
||||
jr c, asm_cd6da
|
||||
xor a
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
ld [$ffc7], a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
|
||||
Functioncd6d6: ; cd6d6 (33:56d6)
|
||||
call Functioncc9bd
|
||||
@ -1767,7 +1767,7 @@ endr
|
||||
ld [hl], a
|
||||
sub $10
|
||||
ret c
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ret
|
||||
|
||||
Functioncd6e3: ; cd6e3 (33:56e3)
|
||||
|
@ -932,7 +932,7 @@ Functionc8565: ; c8565 (32:4565)
|
||||
ld hl, w5_d422
|
||||
ld bc, $0
|
||||
.asm_c8580
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
cp e
|
||||
jr nc, .asm_c858b
|
||||
push hl
|
||||
@ -969,9 +969,9 @@ Functionc85a2: ; c85a2 (32:45a2)
|
||||
ld a, $42
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
xor a
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, $5e
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld de, $202
|
||||
call Functionc8f2e
|
||||
ret
|
||||
@ -1044,9 +1044,9 @@ Functionc8610: ; c8610 (32:4610)
|
||||
ld a, $43
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
xor a
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, $5f
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld de, $605
|
||||
call Functionc8f2e
|
||||
ld hl, $3
|
||||
@ -1140,9 +1140,9 @@ Functionc8698: ; c8698 (32:4698)
|
||||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
@ -1196,9 +1196,9 @@ Functionc86ea: ; c86ea (32:46ea)
|
||||
inc a
|
||||
ld d, a
|
||||
ld h, $d2
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub l
|
||||
srl a
|
||||
push af
|
||||
@ -1238,7 +1238,7 @@ Functionc8712: ; c8712 (32:4712)
|
||||
ld d, $2
|
||||
call Functionc8f2e
|
||||
ld h, $d2
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
ld l, a
|
||||
ld [hl], $0
|
||||
dec l
|
||||
@ -1246,7 +1246,7 @@ Functionc8712: ; c8712 (32:4712)
|
||||
ret
|
||||
|
||||
Functionc8732: ; c8732 (32:4732)
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
ld l, a
|
||||
ld h, $d2
|
||||
ld e, l
|
||||
@ -1256,11 +1256,11 @@ Functionc8732: ; c8732 (32:4732)
|
||||
ld a, [de]
|
||||
dec de
|
||||
ld [hld], a
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
cp l
|
||||
jr nz, .asm_c873a
|
||||
ld [hl], $90
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
ld l, a
|
||||
ld a, [hl]
|
||||
cp $1
|
||||
@ -1296,9 +1296,9 @@ Functionc876a: ; c876a (32:476a)
|
||||
call Functionc8eca
|
||||
ld a, $42
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
@ -1347,9 +1347,9 @@ Functionc87b2: ; c87b2 (32:47b2)
|
||||
call Functionc8eca
|
||||
ld a, $42
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $2
|
||||
@ -1371,9 +1371,9 @@ Functionc87cf: ; c87cf (32:47cf)
|
||||
call Functionc80e5
|
||||
|
||||
Functionc87de: ; c87de (32:47de)
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub l
|
||||
dec a
|
||||
ld hl, $2
|
||||
@ -1416,9 +1416,9 @@ Functionc8810: ; c8810 (32:4810)
|
||||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
@ -1451,9 +1451,9 @@ Functionc8842: ; c8842 (32:4842)
|
||||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ef4
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
@ -1524,16 +1524,16 @@ Functionc88a5: ; c88a5 (32:48a5)
|
||||
pop af
|
||||
jp Functionc900b
|
||||
.asm_c88b7
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld d, a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub d
|
||||
ld d, a
|
||||
ld h, LYOverridesBackup / $100
|
||||
ld a, [hSCY] ; $ff00+$d0
|
||||
or a
|
||||
jr nz, .asm_c88d0
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
or a
|
||||
jr z, .asm_c88d6
|
||||
dec a
|
||||
@ -1541,14 +1541,14 @@ Functionc88a5: ; c88a5 (32:48a5)
|
||||
ld [hl], $0
|
||||
jr .asm_c88d6
|
||||
.asm_c88d0
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
dec a
|
||||
ld l, a
|
||||
ld [hl], $0
|
||||
.asm_c88d6
|
||||
ld a, [hSCY] ; $ff00+$d0
|
||||
ld l, a
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
sub l
|
||||
jr nc, .asm_c88e0
|
||||
xor a
|
||||
@ -1581,9 +1581,9 @@ Functionc88f6: ; c88f6 (32:48f6)
|
||||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
@ -1628,9 +1628,9 @@ Functionc8933: ; c8933 (32:4933)
|
||||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
@ -1668,9 +1668,9 @@ Functionc896d: ; c896d (32:496d)
|
||||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
xor a
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
@ -1767,9 +1767,9 @@ Functionc89f7: ; c89f7 (32:49f7)
|
||||
call Functionc8eca
|
||||
ld a, $42
|
||||
call Functionc8ef4
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
@ -1824,14 +1824,14 @@ Functionc8a49: ; c8a49 (32:4a49)
|
||||
call Functionc8ecb
|
||||
ld a, $47
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld a, [$ffc7]
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld h, $d2
|
||||
.asm_c8a60
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
cp l
|
||||
jr z, .asm_c8a69
|
||||
xor a
|
||||
@ -1854,9 +1854,9 @@ Functionc8a70: ; c8a70 (32:4a70)
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
inc a
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
call Functionc80e5
|
||||
ret
|
||||
|
||||
@ -1864,7 +1864,7 @@ Functionc8a88: ; c8a88 (32:4a88)
|
||||
call Functionc8ab0
|
||||
jr nc, .asm_c8a96
|
||||
call Functionc8a9a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
dec a
|
||||
ld l, a
|
||||
ld [hl], e
|
||||
@ -1875,9 +1875,9 @@ Functionc8a88: ; c8a88 (32:4a88)
|
||||
|
||||
Functionc8a9a: ; c8a9a (32:4a9a)
|
||||
ld e, a
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub l
|
||||
srl a
|
||||
ld h, $d2
|
||||
@ -1971,9 +1971,9 @@ Functionc8b0e: ; c8b0e (32:4b0e)
|
||||
ld a, $47
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
xor a
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, $60
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ret
|
||||
|
||||
Functionc8b22: ; c8b22 (32:4b22)
|
||||
@ -2221,9 +2221,9 @@ Functionc8c68: ; c8c68 (32:4c68)
|
||||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
@ -2268,9 +2268,9 @@ Functionc8cab: ; c8cab (32:4cab)
|
||||
ld a, $43
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
xor a
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, $37
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
@ -2431,9 +2431,9 @@ Functionc8d8b: ; c8d8b (32:4d8b)
|
||||
call Functionc8ecb
|
||||
ld a, $47
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@ -2669,9 +2669,9 @@ Functionc8ede: ; c8ede (32:4ede)
|
||||
ld de, $2f5e
|
||||
.asm_c8eed
|
||||
ld a, d
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, e
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ret
|
||||
|
||||
Functionc8ef4: ; c8ef4 (32:4ef4)
|
||||
@ -2684,15 +2684,15 @@ Functionc8ef4: ; c8ef4 (32:4ef4)
|
||||
ld de, $2d5e
|
||||
.asm_c8f03
|
||||
ld a, d
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, e
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ret
|
||||
|
||||
Functionc8f0a: ; c8f0a (32:4f0a)
|
||||
xor a
|
||||
ld [$ffc7], a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
call Functionc8eca
|
||||
xor a
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
@ -2706,8 +2706,8 @@ Functionc8f19: ; c8f19 (32:4f19)
|
||||
ld [rBGP], a ; $ff00+$47
|
||||
ld [wcfc7], a
|
||||
ld [wcfc9], a
|
||||
ld [$ffc7], a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
call Functionc8eca
|
||||
ret
|
||||
|
||||
@ -2723,10 +2723,10 @@ Functionc8f2e: ; c8f2e (32:4f2e)
|
||||
ld [BattleAnimTemps + 3], a
|
||||
ld bc, LYOverridesBackup
|
||||
.asm_c8f43
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
cp c
|
||||
jr nc, .asm_c8f58
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
cp c
|
||||
jr c, .asm_c8f58
|
||||
ld a, [BattleAnimTemps + 2]
|
||||
@ -2800,14 +2800,14 @@ Functionc8f9a: ; c8f9a (32:4f9a)
|
||||
call Functionc905d
|
||||
ld e, a
|
||||
pop hl
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
cp c
|
||||
jr c, .asm_c8fcf
|
||||
ld a, e
|
||||
ld [bc], a
|
||||
inc bc
|
||||
.asm_c8fcf
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
cp l
|
||||
jr nc, .asm_c8fd6
|
||||
ld [hl], e
|
||||
@ -2824,7 +2824,7 @@ Functionc8f9a: ; c8f9a (32:4f9a)
|
||||
ret
|
||||
|
||||
Functionc8fe4: ; c8fe4 (32:4fe4)
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld e, a
|
||||
ld a, [BattleAnimTemps]
|
||||
add e
|
||||
@ -2834,13 +2834,13 @@ Functionc8fe4: ; c8fe4 (32:4fe4)
|
||||
|
||||
Functionc8fef: ; c8fef (32:4fef)
|
||||
push bc
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
inc a
|
||||
ld e, a
|
||||
ld h, $d2
|
||||
ld d, h
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub l
|
||||
and a
|
||||
jr z, .asm_c9009
|
||||
@ -2862,9 +2862,9 @@ Functionc8fef: ; c8fef (32:4fef)
|
||||
Functionc900b: ; c900b (32:500b)
|
||||
push af
|
||||
ld h, $d2
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub l
|
||||
ld d, a
|
||||
pop af
|
||||
@ -2877,14 +2877,14 @@ Functionc900b: ; c900b (32:500b)
|
||||
Functionc901b: ; c901b (32:501b)
|
||||
push af
|
||||
ld e, a
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub l
|
||||
sub e
|
||||
ld d, a
|
||||
ld h, $d2
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld a, $90
|
||||
.asm_c902c
|
||||
|
876
battle/core.asm
876
battle/core.asm
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -30,11 +30,11 @@ BattleCommand50: ; 37492
|
||||
and a
|
||||
ret nz
|
||||
|
||||
ld a, [InLinkBattle]
|
||||
ld a, [wLinkMode]
|
||||
and a
|
||||
jr z, .stealenemyitem
|
||||
|
||||
ld a, [IsInBattle]
|
||||
ld a, [wBattleMode]
|
||||
dec a
|
||||
ret z
|
||||
|
||||
|
259
battle/misc.asm
Normal file
259
battle/misc.asm
Normal file
@ -0,0 +1,259 @@
|
||||
Functionfbd54: ; fbd54
|
||||
xor a
|
||||
ld [hBGMapMode], a ; $ff00+$d4
|
||||
ld a, [hBattleTurn] ; $ff00+$e4
|
||||
and a
|
||||
jr z, .asm_fbd61
|
||||
call Functionfbd96
|
||||
jr .asm_fbd64
|
||||
.asm_fbd61
|
||||
call Functionfbd9d
|
||||
.asm_fbd64
|
||||
call ClearBox
|
||||
jr Functionfbd91
|
||||
|
||||
Functionfbd69: ; fbd69 (3e:7d69)
|
||||
callba BattleCommanda6
|
||||
jr Functionfbd77
|
||||
|
||||
Functionfbd71: ; fbd71 (3e:7d71)
|
||||
callba BattleCommanda7
|
||||
|
||||
Functionfbd77: ; fbd77 (3e:7d77)
|
||||
xor a
|
||||
ld [hBGMapMode], a ; $ff00+$d4
|
||||
ld a, [hBattleTurn] ; $ff00+$e4
|
||||
and a
|
||||
jr z, .asm_fbd85
|
||||
call Functionfbd96
|
||||
xor a
|
||||
jr .asm_fbd8a
|
||||
.asm_fbd85
|
||||
call Functionfbd9d
|
||||
ld a, $31
|
||||
.asm_fbd8a
|
||||
ld [$ffad], a
|
||||
predef FillBox
|
||||
Functionfbd91: ; fbd91 (3e:7d91)
|
||||
ld a, $1
|
||||
ld [hBGMapMode], a ; $ff00+$d4
|
||||
ret
|
||||
|
||||
Functionfbd96: ; fbd96 (3e:7d96)
|
||||
hlcoord 12, 0
|
||||
lb bc, 7, 7
|
||||
ret
|
||||
|
||||
Functionfbd9d: ; fbd9d (3e:7d9d)
|
||||
hlcoord 2, 6
|
||||
lb bc, 6, 6
|
||||
ret
|
||||
|
||||
|
||||
DoWeatherModifiers: ; fbda4
|
||||
|
||||
ld de, .WeatherTypeModifiers
|
||||
ld a, [Weather]
|
||||
ld b, a
|
||||
ld a, [wd265] ; move type
|
||||
ld c, a
|
||||
|
||||
.CheckWeatherType
|
||||
ld a, [de]
|
||||
inc de
|
||||
cp $ff
|
||||
jr z, .asm_fbdc0
|
||||
|
||||
cp b
|
||||
jr nz, .NextWeatherType
|
||||
|
||||
ld a, [de]
|
||||
cp c
|
||||
jr z, .ApplyModifier
|
||||
|
||||
.NextWeatherType
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
jr .CheckWeatherType
|
||||
|
||||
|
||||
.asm_fbdc0
|
||||
ld de, .WeatherMoveModifiers
|
||||
|
||||
ld a, BATTLE_VARS_MOVE_EFFECT
|
||||
call GetBattleVar
|
||||
ld c, a
|
||||
|
||||
.CheckWeatherMove
|
||||
ld a, [de]
|
||||
inc de
|
||||
cp $ff
|
||||
jr z, .done
|
||||
|
||||
cp b
|
||||
jr nz, .NextWeatherMove
|
||||
|
||||
ld a, [de]
|
||||
cp c
|
||||
jr z, .ApplyModifier
|
||||
|
||||
.NextWeatherMove
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
jr .CheckWeatherMove
|
||||
|
||||
.ApplyModifier
|
||||
xor a
|
||||
ld [hMultiplicand + 0], a
|
||||
ld hl, CurDamage
|
||||
ld a, [hli]
|
||||
ld [hMultiplicand + 1], a
|
||||
ld a, [hl]
|
||||
ld [hMultiplicand + 2], a
|
||||
|
||||
inc de
|
||||
ld a, [de]
|
||||
ld [hMultiplier], a
|
||||
|
||||
call Multiply
|
||||
|
||||
ld a, 10
|
||||
ld [hDivisor], a
|
||||
ld b, $4
|
||||
call Divide
|
||||
|
||||
ld a, [hQuotient + 0]
|
||||
and a
|
||||
ld bc, -1
|
||||
jr nz, .Update
|
||||
|
||||
ld a, [hQuotient + 1]
|
||||
ld b, a
|
||||
ld a, [hQuotient + 2]
|
||||
ld c, a
|
||||
or b
|
||||
jr nz, .Update
|
||||
|
||||
ld bc, 1
|
||||
|
||||
.Update
|
||||
ld a, b
|
||||
ld [CurDamage], a
|
||||
ld a, c
|
||||
ld [CurDamage + 1], a
|
||||
|
||||
.done
|
||||
ret
|
||||
|
||||
.WeatherTypeModifiers
|
||||
db WEATHER_RAIN, WATER, 15
|
||||
db WEATHER_RAIN, FIRE, 05
|
||||
db WEATHER_SUN, FIRE, 15
|
||||
db WEATHER_SUN, WATER, 05
|
||||
db $ff
|
||||
|
||||
.WeatherMoveModifiers
|
||||
db WEATHER_RAIN, EFFECT_SOLARBEAM, 05
|
||||
db $ff
|
||||
; fbe24
|
||||
|
||||
|
||||
DoBadgeTypeBoosts: ; fbe24
|
||||
ld a, [wLinkMode]
|
||||
and a
|
||||
ret nz
|
||||
|
||||
ld a, [InBattleTowerBattle]
|
||||
and a
|
||||
ret nz
|
||||
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
ret nz
|
||||
|
||||
push de
|
||||
push bc
|
||||
|
||||
ld hl, .BadgeTypes
|
||||
|
||||
ld a, [KantoBadges]
|
||||
ld b, a
|
||||
ld a, [JohtoBadges]
|
||||
ld c, a
|
||||
|
||||
.CheckBadge
|
||||
ld a, [hl]
|
||||
cp $ff
|
||||
jr z, .done
|
||||
|
||||
srl b
|
||||
rr c
|
||||
jr nc, .NextBadge
|
||||
|
||||
ld a, [wd265] ; move type
|
||||
cp [hl]
|
||||
jr z, .ApplyBoost
|
||||
|
||||
.NextBadge
|
||||
inc hl
|
||||
jr .CheckBadge
|
||||
|
||||
.ApplyBoost
|
||||
ld a, [CurDamage]
|
||||
ld h, a
|
||||
ld d, a
|
||||
ld a, [CurDamage + 1]
|
||||
ld l, a
|
||||
ld e, a
|
||||
|
||||
srl d
|
||||
rr e
|
||||
srl d
|
||||
rr e
|
||||
srl d
|
||||
rr e
|
||||
|
||||
ld a, e
|
||||
or d
|
||||
jr nz, .asm_fbe6f
|
||||
ld e, 1
|
||||
|
||||
.asm_fbe6f
|
||||
add hl, de
|
||||
jr nc, .Update
|
||||
|
||||
ld hl, $ffff
|
||||
|
||||
.Update
|
||||
ld a, h
|
||||
ld [CurDamage], a
|
||||
ld a, l
|
||||
ld [CurDamage + 1], a
|
||||
|
||||
.done
|
||||
pop bc
|
||||
pop de
|
||||
ret
|
||||
|
||||
.BadgeTypes
|
||||
db FLYING ; zephyrbadge
|
||||
db BUG ; hivebadge
|
||||
db NORMAL ; plainbadge
|
||||
db GHOST ; fogbadge
|
||||
db STEEL ; mineralbadge
|
||||
db FIGHTING ; stormbadge
|
||||
db ICE ; glacierbadge
|
||||
db DRAGON ; risingbadge
|
||||
|
||||
db ROCK ; boulderbadge
|
||||
db WATER ; cascadebadge
|
||||
db ELECTRIC ; thunderbadge
|
||||
db GRASS ; rainbowbadge
|
||||
db POISON ; soulbadge
|
||||
db PSYCHIC ; marshbadge
|
||||
db FIRE ; volcanobadge
|
||||
db GROUND ; earthbadge
|
||||
db $ff
|
||||
; fbe91
|
@ -10,6 +10,7 @@ INCLUDE "constants/type_constants.asm"
|
||||
INCLUDE "constants/move_constants.asm"
|
||||
INCLUDE "constants/battle_constants.asm"
|
||||
INCLUDE "constants/map_constants.asm"
|
||||
INCLUDE "constants/map_setup_constants.asm"
|
||||
INCLUDE "constants/landmark_constants.asm"
|
||||
INCLUDE "constants/item_constants.asm"
|
||||
INCLUDE "constants/trainer_constants.asm"
|
||||
@ -26,3 +27,5 @@ INCLUDE "constants/misc_constants.asm"
|
||||
INCLUDE "constants/std_constants.asm"
|
||||
INCLUDE "constants/deco_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_FLY
|
||||
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
|
||||
|
@ -51,35 +51,36 @@ const_value = 1
|
||||
const SET_UP_ORNAMENT
|
||||
const PUT_AWAY_ORNAMENT
|
||||
|
||||
const_value = 2
|
||||
const_value = 1
|
||||
const DECO_01
|
||||
const DECO_FEATHERY_BED ; 2
|
||||
const DECO_PINK_BED ; 3
|
||||
const DECO_POLKADOT_BED ; 4
|
||||
const DECO_PIKACHU_BED ; 5
|
||||
const_value = const_value + 1
|
||||
const DECO_06
|
||||
const DECO_RED_CARPET ; 7
|
||||
const DECO_BLUE_CARPET ; 8
|
||||
const DECO_YELLOW_CARPET ; 9
|
||||
const DECO_GREEN_CARPET ; a
|
||||
const_value = const_value + 1
|
||||
const DECO_0B
|
||||
const DECO_MAGNAPLANT ; c
|
||||
const DECO_TROPICPLANT ; d
|
||||
const DECO_JUMBOPLANT ; e
|
||||
const_value = const_value + 1
|
||||
const DECO_0F
|
||||
const DECO_TOWN_MAP ; 10
|
||||
const DECO_PIKACHU_POSTER ; 11
|
||||
const DECO_CLEFAIRY_POSTER ; 12
|
||||
const DECO_JIGGLYPUFF_POSTER ; 13
|
||||
const_value = const_value + 1
|
||||
const DECO_14
|
||||
const DECO_FAMICOM ; 15
|
||||
const DECO_SNES ; 16
|
||||
const DECO_N64 ; 17
|
||||
const DECO_VIRTUAL_BOY ; 18
|
||||
const_value = const_value + 1
|
||||
const DECO_19
|
||||
const DECO_BIG_SNORLAX_DOLL ; 1a
|
||||
const DECO_BIG_ONIX_DOLL ; 1b
|
||||
const DECO_BIG_LAPRAS_DOLL ; 1c
|
||||
const_value = const_value + 1
|
||||
const DECO_1D
|
||||
const DECO_PIKACHU_DOLL ; 1e
|
||||
const DECO_SURF_PIKACHU_DOLL ; 1f
|
||||
const DECO_CLEFAIRY_DOLL ; 20
|
||||
|
@ -352,7 +352,7 @@ const_value SET 70
|
||||
const HELD_TRADE_EVOLVE
|
||||
const HELD_AMULET_COIN
|
||||
const HELD_BRIGHTPOWDER
|
||||
const HELD_4E
|
||||
const HELD_78
|
||||
const HELD_FOCUS_BAND
|
||||
|
||||
const_def
|
||||
@ -364,3 +364,8 @@ const_value SET 70
|
||||
const ITEMATTR_POCKET
|
||||
const ITEMATTR_HELP
|
||||
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
|
||||
BUTTONS EQU %00010000
|
||||
D_PAD EQU %00100000
|
||||
|
||||
NO_INPUT EQU %00000000
|
||||
A_BUTTON EQU %00000001
|
||||
@ -59,6 +57,11 @@ D_LEFT EQU %00100000
|
||||
D_UP EQU %01000000
|
||||
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
|
||||
HP_BAR_LENGTH EQU 6
|
||||
@ -108,3 +111,51 @@ const_value = 1
|
||||
const MOM_ITEM
|
||||
const MOM_DOLL
|
||||
|
||||
BATTLETOWER_PKMNSTRUCTLENGTH EQU $30
|
||||
BATTLETOWER_NROFPKMNS EQU 3
|
||||
BATTLETOWER_TRAINERDATALENGTH EQU $24
|
||||
BATTLETOWER_NROFTRAINERS EQU 7
|
||||
|
||||
NUM_WILDMONS_PER_AREA_TIME_OF_DAY EQU 7
|
||||
WILDMON_GRASS_STRUCTURE_LENGTH EQU 2 + 3 * (1 + 2 * NUM_WILDMONS_PER_AREA_TIME_OF_DAY)
|
||||
|
||||
|
||||
PRINTNUM_MONEY_F EQU 5
|
||||
PRINTNUM_RIGHTALIGN_F EQU 6
|
||||
PRINTNUM_LEADINGZEROS_F EQU 7
|
||||
|
||||
PRINTNUM_MONEY EQU 1 << PRINTNUM_MONEY_F
|
||||
PRINTNUM_RIGHTALIGN EQU 1 << PRINTNUM_RIGHTALIGN_F
|
||||
PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F
|
||||
|
||||
const_value = 1
|
||||
const HAPPINESS_GAINLEVEL ; 01
|
||||
const HAPPINESS_USEDITEM ; 02
|
||||
const HAPPINESS_USEDXITEM ; 03
|
||||
const HAPPINESS_GYMBATTLE ; 04
|
||||
const HAPPINESS_LEARNMOVE ; 05
|
||||
const HAPPINESS_FAINTED ; 06
|
||||
const HAPPINESS_POISONFAINT ; 07
|
||||
const HAPPINESS_BEATENBYSTRONGFOE ; 08
|
||||
const HAPPINESS_YOUNGCUT1 ; 09
|
||||
const HAPPINESS_YOUNGCUT2 ; 0a
|
||||
const HAPPINESS_YOUNGCUT3 ; 0b
|
||||
const HAPPINESS_OLDERCUT1 ; 0c
|
||||
const HAPPINESS_OLDERCUT2 ; 0d
|
||||
const HAPPINESS_OLDERCUT3 ; 0e
|
||||
const HAPPINESS_BITTERPOWDER ; 0f
|
||||
const HAPPINESS_ENERGYROOT ; 10
|
||||
const HAPPINESS_REVIVALHERB ; 11
|
||||
const HAPPINESS_MASSAGE ; 12
|
||||
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_def
|
||||
const ELMCALL_NONE
|
||||
const ELMCALL_POKERUS
|
||||
const ELMCALL_ROBBED
|
||||
const ELMCALL_ASSISTANT
|
||||
const ELMCALL_WEIRDBROADCAST
|
||||
const ELMCALL_SSTICKET
|
||||
const ELMCALL_UNKNOWN
|
||||
const MOMCALL_WORRIED
|
||||
const ELMCALL_MASTERBALL
|
||||
const SPECIALCALL_NONE
|
||||
const SPECIALCALL_POKERUS
|
||||
const SPECIALCALL_ROBBED
|
||||
const SPECIALCALL_ASSISTANT
|
||||
const SPECIALCALL_WEIRDBROADCAST
|
||||
const SPECIALCALL_SSTICKET
|
||||
const SPECIALCALL_BIKESHOP
|
||||
const SPECIALCALL_WORRIED
|
||||
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
|
||||
|
@ -1,15 +1,92 @@
|
||||
const_def
|
||||
const OAKS_POKEMON_TALK
|
||||
const POKEDEX_SHOW
|
||||
const POKEMON_MUSIC
|
||||
const LUCKY_CHANNEL
|
||||
const BUENAS_PASSWORD
|
||||
const PLACES_AND_PEOPLE
|
||||
const LETS_ALL_SING
|
||||
const ROCKET_RADIO
|
||||
const POKE_FLUTE_RADIO
|
||||
const UNOWN_RADIO
|
||||
const EVOLUTION_RADIO
|
||||
const OAKS_POKEMON_TALK ; $00
|
||||
const POKEDEX_SHOW ; $01
|
||||
const POKEMON_MUSIC ; $02
|
||||
const LUCKY_CHANNEL ; $03
|
||||
const BUENAS_PASSWORD ; $04
|
||||
const PLACES_AND_PEOPLE ; $05
|
||||
const LETS_ALL_SING ; $06
|
||||
const ROCKET_RADIO ; $07
|
||||
const POKE_FLUTE_RADIO ; $08
|
||||
const UNOWN_RADIO ; $09
|
||||
const EVOLUTION_RADIO ; $0a
|
||||
const OAKS_POKEMON_TALK_2 ; $0b
|
||||
const OAKS_POKEMON_TALK_3 ; $0c
|
||||
const OAKS_POKEMON_TALK_4 ; $0d
|
||||
const OAKS_POKEMON_TALK_5 ; $0e
|
||||
const OAKS_POKEMON_TALK_6 ; $0f
|
||||
const OAKS_POKEMON_TALK_7 ; $10
|
||||
const OAKS_POKEMON_TALK_8 ; $11
|
||||
const OAKS_POKEMON_TALK_9 ; $12
|
||||
const POKEDEX_SHOW_2 ; $13
|
||||
const POKEDEX_SHOW_3 ; $14
|
||||
const POKEDEX_SHOW_4 ; $15
|
||||
const POKEDEX_SHOW_5 ; $16
|
||||
const POKEMON_MUSIC_2 ; $17
|
||||
const POKEMON_MUSIC_3 ; $18
|
||||
const POKEMON_MUSIC_4 ; $19
|
||||
const POKEMON_MUSIC_5 ; $1a
|
||||
const POKEMON_MUSIC_6 ; $1b
|
||||
const POKEMON_MUSIC_7 ; $1c
|
||||
const LETS_ALL_SING_2 ; $1d
|
||||
const LUCKY_NUMBER_SHOW_2 ; $1e
|
||||
const LUCKY_NUMBER_SHOW_3 ; $1f
|
||||
const LUCKY_NUMBER_SHOW_4 ; $20
|
||||
const LUCKY_NUMBER_SHOW_5 ; $21
|
||||
const LUCKY_NUMBER_SHOW_6 ; $22
|
||||
const LUCKY_NUMBER_SHOW_7 ; $23
|
||||
const LUCKY_NUMBER_SHOW_8 ; $24
|
||||
const LUCKY_NUMBER_SHOW_9 ; $25
|
||||
const LUCKY_NUMBER_SHOW_10 ; $26
|
||||
const LUCKY_NUMBER_SHOW_11 ; $27
|
||||
const LUCKY_NUMBER_SHOW_12 ; $28
|
||||
const LUCKY_NUMBER_SHOW_13 ; $29
|
||||
const LUCKY_NUMBER_SHOW_14 ; $2a
|
||||
const LUCKY_NUMBER_SHOW_15 ; $2b
|
||||
const PLACES_AND_PEOPLE_2 ; $2c
|
||||
const PLACES_AND_PEOPLE_3 ; $2d
|
||||
const PLACES_AND_PEOPLE_4 ; $2e
|
||||
const PLACES_AND_PEOPLE_5 ; $2f
|
||||
const PLACES_AND_PEOPLE_6 ; $30
|
||||
const PLACES_AND_PEOPLE_7 ; $31
|
||||
const ROCKET_RADIO_2 ; $32
|
||||
const ROCKET_RADIO_3 ; $33
|
||||
const ROCKET_RADIO_4 ; $34
|
||||
const ROCKET_RADIO_5 ; $35
|
||||
const ROCKET_RADIO_6 ; $36
|
||||
const ROCKET_RADIO_7 ; $37
|
||||
const ROCKET_RADIO_8 ; $38
|
||||
const ROCKET_RADIO_9 ; $39
|
||||
const ROCKET_RADIO_10 ; $3a
|
||||
const OAKS_POKEMON_TALK_10 ; $3b
|
||||
const OAKS_POKEMON_TALK_11 ; $3c
|
||||
const OAKS_POKEMON_TALK_12 ; $3d
|
||||
const OAKS_POKEMON_TALK_13 ; $3e
|
||||
const OAKS_POKEMON_TALK_14 ; $3f
|
||||
const BUENAS_PASSWORD_2 ; $40
|
||||
const BUENAS_PASSWORD_3 ; $41
|
||||
const BUENAS_PASSWORD_4 ; $42
|
||||
const BUENAS_PASSWORD_5 ; $43
|
||||
const BUENAS_PASSWORD_6 ; $44
|
||||
const BUENAS_PASSWORD_7 ; $45
|
||||
const BUENAS_PASSWORD_8 ; $46
|
||||
const BUENAS_PASSWORD_9 ; $47
|
||||
const BUENAS_PASSWORD_10 ; $48
|
||||
const BUENAS_PASSWORD_11 ; $49
|
||||
const BUENAS_PASSWORD_12 ; $4a
|
||||
const BUENAS_PASSWORD_13 ; $4b
|
||||
const BUENAS_PASSWORD_14 ; $4c
|
||||
const BUENAS_PASSWORD_15 ; $4d
|
||||
const BUENAS_PASSWORD_16 ; $4e
|
||||
const BUENAS_PASSWORD_17 ; $4f
|
||||
const BUENAS_PASSWORD_18 ; $50
|
||||
const BUENAS_PASSWORD_19 ; $51
|
||||
const BUENAS_PASSWORD_20 ; $52
|
||||
const BUENAS_PASSWORD_21 ; $53
|
||||
const RADIO_SCROLL ; $54
|
||||
const POKEDEX_SHOW_6 ; $55
|
||||
const POKEDEX_SHOW_7 ; $56
|
||||
const POKEDEX_SHOW_8 ; $57
|
||||
|
||||
const_def
|
||||
const BUENA_MON
|
||||
|
@ -5,7 +5,7 @@ LAST_TALKED EQU -2
|
||||
const_def
|
||||
const VAR_STRINGBUFFER2
|
||||
const VAR_PARTYCOUNT
|
||||
const VAR_02
|
||||
const VAR_BATTLERESULT
|
||||
const VAR_BATTLETYPE
|
||||
const VAR_TIMEOFDAY
|
||||
const VAR_DEXCAUGHT
|
||||
@ -23,11 +23,15 @@ LAST_TALKED EQU -2
|
||||
const VAR_CONTESTMINUTES
|
||||
const VAR_XCOORD
|
||||
const VAR_YCOORD
|
||||
const VAR_POKERUS
|
||||
const VAR_SPECIALPHONECALL
|
||||
const VAR_15
|
||||
const VAR_16
|
||||
const VAR_KURT_APRICORNS
|
||||
const VAR_CALLERID
|
||||
const VAR_BLUECARDBALANCE
|
||||
const VAR_19
|
||||
const VAR_BUENASPASSWORD
|
||||
const VAR_KENJI_BREAK
|
||||
NUM_VARS EQU const_value
|
||||
|
||||
RETVAR_STRBUF2 EQU (0 << 6)
|
||||
RETVAR_ADDR_DE EQU (1 << 6)
|
||||
RETVAR_EXECUTE EQU (2 << 6)
|
||||
|
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