Merge branch 'master' of https://github.com/pret/pokefirered into doc-ql
@@ -22,7 +22,6 @@
|
||||
*.id1
|
||||
*.id2
|
||||
*.latfont
|
||||
*.ld
|
||||
*.lz
|
||||
*.map
|
||||
*.nam
|
||||
|
||||
@@ -125,12 +125,12 @@ Otherwise, ask for help on Discord or IRC (see [README.md](README.md)), or conti
|
||||
|
||||
Note that in msys2, Copy is Ctrl+Insert and Paste is Shift+Insert.
|
||||
|
||||
1. Open msys2 at C:\devkitPro\msys2\mingw64.exe or run `C:\devkitPro\msys2\msys2_shell.bat -mingw64`.
|
||||
1. Open msys2 at C:\devkitPro\msys2\msys2_shell.bat.
|
||||
|
||||
2. Certain packages are required to build pokefirered. Install these by running the following command:
|
||||
|
||||
```bash
|
||||
pacman -S make zlib-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-libpng
|
||||
pacman -S make gcc zlib-devel git
|
||||
```
|
||||
<details>
|
||||
<summary><i>Note...</i></summary>
|
||||
@@ -138,6 +138,39 @@ Note that in msys2, Copy is Ctrl+Insert and Paste is Shift+Insert.
|
||||
> This command will ask for confirmation, just enter the yes action when prompted.
|
||||
</details>
|
||||
|
||||
3. Download [libpng](https://sourceforge.net/projects/libpng/files/libpng16/1.6.37/libpng-1.6.37.tar.xz/download).
|
||||
|
||||
4. Change directory to where libpng was downloaded. By default, msys2 will start in the current user's profile folder, located at **C:\Users\\⁠_\<user>_**, where *\<user>* is your Windows username. In most cases, libpng should be saved within a subfolder of the profile folder. For example, if libpng was saved to **C:\Users\\_\<user>_\Downloads** (the Downloads location for most users), enter this command:
|
||||
|
||||
```bash
|
||||
cd Downloads
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><i>Notes...</i></summary>
|
||||
|
||||
> Note 1: While not shown, msys uses forward slashes `/` instead of backwards slashes `\` as the directory separator.
|
||||
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Downloads/My Downloads"`.
|
||||
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn’t needed.
|
||||
> Note 4: If libpng was saved elsewhere, you will need to specify the full path to where libpng was downloaded, e.g. `cd c:/devkitpro/msys2` if it was saved there.
|
||||
</details>
|
||||
|
||||
5. Run the following commands to uncompress and install libpng.
|
||||
|
||||
```bash
|
||||
tar xf libpng-1.6.37.tar.xz
|
||||
cd libpng-1.6.37
|
||||
./configure --prefix=/usr
|
||||
make check
|
||||
make install
|
||||
```
|
||||
|
||||
6. Then finally, run the following command to change back to the user profile folder.
|
||||
|
||||
```bash
|
||||
cd
|
||||
```
|
||||
|
||||
### Choosing where to store pokefirered (msys2)
|
||||
At this point, you can choose a folder to store pokefirered into. If you're okay with storing pokefirered in the user profile folder, then proceed to [Installation](#installation). Otherwise, you'll need to account for where pokefirered is stored when changing directory to the pokefirered folder.
|
||||
|
||||
|
||||
@@ -327,19 +327,15 @@ $(OBJ_DIR)/sym_ewram.ld: sym_ewram.txt
|
||||
$(RAMSCRGEN) ewram_data $< ENGLISH > $@
|
||||
|
||||
ifeq ($(MODERN),0)
|
||||
LD_SCRIPT := ld_script.txt
|
||||
LD_SCRIPT := ld_script.ld
|
||||
LD_SCRIPT_DEPS := $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_common.ld $(OBJ_DIR)/sym_ewram.ld
|
||||
else
|
||||
LD_SCRIPT := ld_script_modern.txt
|
||||
LD_SCRIPT := ld_script_modern.ld
|
||||
LD_SCRIPT_DEPS :=
|
||||
endif
|
||||
|
||||
$(OBJ_DIR)/ld_script.ld: $(LD_SCRIPT) $(LD_SCRIPT_DEPS)
|
||||
cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../../$< | sed "s#tools/#../../tools/#g" > ld_script.ld
|
||||
|
||||
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS)
|
||||
@echo "cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ <objects> <lib>"
|
||||
@cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB)
|
||||
$(ELF): $(LD_SCRIPT) $(LD_SCRIPT_DEPS) $(OBJS)
|
||||
@cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ../../$< -o ../../$@ $(OBJS_REL) $(LIB)
|
||||
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(GAME_REVISION) --silent
|
||||
|
||||
$(ROM): $(ELF)
|
||||
|
||||
@@ -78,10 +78,12 @@ SUPER_RE = A0
|
||||
'?' = AC
|
||||
'.' = AD
|
||||
'-' = AE
|
||||
'·' = AF
|
||||
'…' = B0
|
||||
'“' = B1
|
||||
'”' = B2
|
||||
'‘' = B3
|
||||
'’' = B4
|
||||
'\'' = B4
|
||||
'♂' = B5
|
||||
'♀' = B6
|
||||
@@ -323,13 +325,8 @@ TALL_PLUS = FC 0C FB
|
||||
'?' = AC
|
||||
'。' = AD
|
||||
'ー' = AE
|
||||
'·' = AF
|
||||
'‥' = B0
|
||||
|
||||
DYNAMIC = F7
|
||||
KEYGFX = F8
|
||||
EXTRA = F9
|
||||
|
||||
STRING = FD
|
||||
|
||||
@ string placeholders
|
||||
@@ -414,7 +411,7 @@ B_BUFF3 = FD 30
|
||||
NAME_END = FC 00
|
||||
|
||||
@ special 0xF7 character
|
||||
SPECIAL_F7 = F7
|
||||
DYNAMIC = F7
|
||||
|
||||
@ more text functions
|
||||
|
||||
@@ -424,20 +421,20 @@ SHADOW = FC 03 @ same as fc 01
|
||||
COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes
|
||||
PALETTE = FC 05 @ used in credits
|
||||
FONT = FC 06 @ Given a font id, or use font constants below instead
|
||||
RESET_SIZE = FC 07
|
||||
RESET_FONT = FC 07
|
||||
PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them
|
||||
PAUSE_UNTIL_PRESS = FC 09
|
||||
WAIT_SE = FC 0A
|
||||
PLAY_BGM = FC 0B
|
||||
ESCAPE = FC 0C
|
||||
SHIFT_TEXT = FC 0D @ shift rightward by 1-byte arg
|
||||
SHIFT_DOWN = FC 0E @ shift downward by 1-byte arg
|
||||
SHIFT_RIGHT = FC 0D
|
||||
SHIFT_DOWN = FC 0E
|
||||
FILL_WINDOW = FC 0F
|
||||
PLAY_SE = FC 10
|
||||
CLEAR = FC 11
|
||||
SKIP = FC 12
|
||||
CLEAR_TO = FC 13
|
||||
SPACING = FC 14
|
||||
MIN_LETTER_SPACING = FC 14
|
||||
JPN = FC 15
|
||||
ENG = FC 16
|
||||
PAUSE_MUSIC = FC 17
|
||||
|
||||
@@ -138,7 +138,7 @@ gScriptCmdTable::
|
||||
.4byte ScrCmd_pokemart @ 0x86
|
||||
.4byte ScrCmd_pokemartdecoration @ 0x87
|
||||
.4byte ScrCmd_pokemartdecoration2 @ 0x88
|
||||
.4byte ScrCmd_playslotmachine @ 0x8
|
||||
.4byte ScrCmd_playslotmachine @ 0x89
|
||||
.4byte ScrCmd_setberrytree @ 0x8a
|
||||
.4byte ScrCmd_choosecontestmon @ 0x8b
|
||||
.4byte ScrCmd_startcontest @ 0x8c
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 5.3 KiB |
@@ -0,0 +1,11 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
8
|
||||
148 197 172
|
||||
16 16 16
|
||||
32 32 32
|
||||
49 49 49
|
||||
65 65 65
|
||||
82 82 82
|
||||
98 98 98
|
||||
115 115 115
|
||||
@@ -1,14 +1,6 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
148 197 172
|
||||
16 16 16
|
||||
32 32 32
|
||||
49 49 49
|
||||
65 65 65
|
||||
82 82 82
|
||||
98 98 98
|
||||
115 115 115
|
||||
8
|
||||
131 131 131
|
||||
148 148 148
|
||||
164 164 164
|
||||
|
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 258 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 20 KiB |
@@ -1,51 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
48
|
||||
0 65 90
|
||||
255 0 255
|
||||
41 57 82
|
||||
65 180 164
|
||||
255 0 255
|
||||
255 0 255
|
||||
106 205 197
|
||||
246 205 115
|
||||
238 230 172
|
||||
255 255 205
|
||||
222 139 74
|
||||
148 148 148
|
||||
238 230 172
|
||||
106 106 106
|
||||
213 180 82
|
||||
205 65 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
189 213 213
|
||||
238 255 255
|
||||
222 246 255
|
||||
255 255 255
|
||||
164 222 255
|
||||
16 172 222
|
||||
0 82 115
|
||||
0 115 139
|
||||
0 123 197
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
189 213 213
|
||||
238 255 255
|
||||
222 246 255
|
||||
255 255 255
|
||||
164 222 255
|
||||
24 82 180
|
||||
0 90 131
|
||||
24 82 180
|
||||
24 82 180
|
||||
|
Before Width: | Height: | Size: 539 B After Width: | Height: | Size: 661 B |
@@ -1,51 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
48
|
||||
0 0 0
|
||||
148 189 246
|
||||
106 172 230
|
||||
238 246 246
|
||||
222 230 230
|
||||
255 189 74
|
||||
230 131 41
|
||||
172 74 8
|
||||
156 164 172
|
||||
115 123 139
|
||||
164 255 139
|
||||
139 238 106
|
||||
115 222 82
|
||||
98 205 57
|
||||
230 230 238
|
||||
255 255 255
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
189 213 213
|
||||
238 255 255
|
||||
222 246 255
|
||||
255 255 255
|
||||
164 222 255
|
||||
16 172 222
|
||||
0 82 115
|
||||
0 115 139
|
||||
0 123 197
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
189 213 213
|
||||
238 255 255
|
||||
222 246 255
|
||||
255 255 255
|
||||
164 222 255
|
||||
24 82 180
|
||||
0 90 131
|
||||
24 82 180
|
||||
24 82 180
|
||||
|
Before Width: | Height: | Size: 807 B After Width: | Height: | Size: 923 B |
@@ -1,19 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
180 180 180
|
||||
49 49 49
|
||||
74 82 82
|
||||
123 123 131
|
||||
164 164 197
|
||||
222 205 246
|
||||
255 255 255
|
||||
164 8 57
|
||||
222 82 82
|
||||
230 115 82
|
||||
238 148 82
|
||||
246 180 82
|
||||
255 213 82
|
||||
255 238 106
|
||||
255 255 180
|
||||
0 0 0
|
||||
@@ -1,19 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
98 197 98
|
||||
49 49 49
|
||||
213 180 139
|
||||
222 205 164
|
||||
197 172 123
|
||||
148 131 106
|
||||
180 148 106
|
||||
197 123 115
|
||||
180 90 82
|
||||
115 90 57
|
||||
0 0 0
|
||||
0 0 0
|
||||
65 49 24
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
|
Before Width: | Height: | Size: 346 B |
|
Before Width: | Height: | Size: 306 B |
|
Before Width: | Height: | Size: 309 B |
|
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 10 KiB |
@@ -1,115 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
112
|
||||
255 0 255
|
||||
0 123 197
|
||||
230 222 156
|
||||
230 205 255
|
||||
0 74 148
|
||||
123 156 156
|
||||
197 189 115
|
||||
106 197 205
|
||||
205 172 238
|
||||
180 139 213
|
||||
205 172 238
|
||||
180 139 213
|
||||
255 180 0
|
||||
123 131 148
|
||||
255 255 255
|
||||
98 106 123
|
||||
255 0 255
|
||||
255 255 255
|
||||
230 230 238
|
||||
205 172 238
|
||||
98 106 123
|
||||
180 139 213
|
||||
230 205 255
|
||||
205 172 238
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 255 255
|
||||
213 213 213
|
||||
222 222 222
|
||||
230 230 230
|
||||
238 238 238
|
||||
246 246 246
|
||||
255 0 255
|
||||
255 172 148
|
||||
255 213 172
|
||||
255 238 213
|
||||
230 139 106
|
||||
255 246 238
|
||||
255 246 238
|
||||
238 238 197
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
123 131 148
|
||||
255 255 255
|
||||
98 106 123
|
||||
255 0 255
|
||||
255 213 90
|
||||
255 238 123
|
||||
255 246 197
|
||||
246 189 82
|
||||
255 255 222
|
||||
255 255 222
|
||||
246 238 180
|
||||
255 255 164
|
||||
123 131 148
|
||||
98 106 123
|
||||
255 213 82
|
||||
255 180 65
|
||||
123 131 148
|
||||
255 255 255
|
||||
98 106 123
|
||||
255 0 255
|
||||
156 238 213
|
||||
172 246 222
|
||||
230 255 255
|
||||
106 197 156
|
||||
246 255 255
|
||||
246 255 255
|
||||
205 238 238
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
123 131 148
|
||||
255 255 255
|
||||
98 106 123
|
||||
255 0 255
|
||||
255 255 255
|
||||
230 230 238
|
||||
106 230 230
|
||||
98 106 123
|
||||
90 213 213
|
||||
230 205 255
|
||||
205 172 238
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 255 255
|
||||
213 213 213
|
||||
222 222 222
|
||||
230 230 230
|
||||
246 246 246
|
||||
246 246 246
|
||||
255 0 255
|
||||
0 123 197
|
||||
230 222 156
|
||||
230 205 255
|
||||
0 74 148
|
||||
123 156 156
|
||||
197 189 115
|
||||
106 197 205
|
||||
106 230 230
|
||||
90 213 213
|
||||
205 172 238
|
||||
180 139 213
|
||||
255 180 0
|
||||
123 131 148
|
||||
255 255 255
|
||||
98 106 123
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 156 B |
|
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 989 B |
@@ -1,19 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
139 98 115
|
||||
255 255 255
|
||||
213 213 213
|
||||
180 180 180
|
||||
123 123 123
|
||||
255 139 57
|
||||
222 57 8
|
||||
106 189 255
|
||||
65 139 197
|
||||
255 213 98
|
||||
238 180 57
|
||||
197 123 197
|
||||
148 74 156
|
||||
106 189 255
|
||||
205 205 205
|
||||
0 0 0
|
||||
@@ -1,51 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
48
|
||||
139 98 115
|
||||
255 246 230
|
||||
246 238 213
|
||||
246 246 197
|
||||
246 238 180
|
||||
246 222 106
|
||||
164 164 164
|
||||
98 98 115
|
||||
255 255 148
|
||||
246 222 49
|
||||
246 205 8
|
||||
238 189 0
|
||||
189 148 57
|
||||
255 255 197
|
||||
255 255 255
|
||||
246 230 82
|
||||
139 98 115
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
189 148 16
|
||||
255 213 82
|
||||
82 205 180
|
||||
65 172 164
|
||||
197 197 197
|
||||
90 90 90
|
||||
0 0 0
|
||||
32 65 123
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
@@ -1,19 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
139 98 115
|
||||
255 255 255
|
||||
213 213 213
|
||||
180 180 180
|
||||
123 123 123
|
||||
255 139 57
|
||||
222 57 8
|
||||
106 189 255
|
||||
65 139 197
|
||||
255 213 98
|
||||
238 180 57
|
||||
197 123 197
|
||||
148 74 156
|
||||
106 189 255
|
||||
205 205 205
|
||||
0 0 0
|
||||
@@ -1,19 +1,51 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
48
|
||||
139 98 115
|
||||
246 197 0
|
||||
205 164 0
|
||||
246 197 0
|
||||
246 197 0
|
||||
246 197 0
|
||||
246 197 0
|
||||
246 197 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
255 246 230
|
||||
246 238 213
|
||||
246 246 197
|
||||
246 238 180
|
||||
246 222 106
|
||||
164 164 164
|
||||
98 98 115
|
||||
255 255 148
|
||||
246 222 49
|
||||
246 205 8
|
||||
238 189 0
|
||||
189 148 57
|
||||
255 255 197
|
||||
255 255 255
|
||||
246 230 82
|
||||
139 98 115
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
189 148 16
|
||||
255 213 82
|
||||
82 205 180
|
||||
65 172 164
|
||||
197 197 197
|
||||
90 90 90
|
||||
0 0 0
|
||||
32 65 123
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
189 148 16
|
||||
246 197 0
|
||||
|
||||
|
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 513 B |
@@ -0,0 +1 @@
|
||||
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
139 98 115
|
||||
246 197 0
|
||||
205 164 0
|
||||
246 197 0
|
||||
246 197 0
|
||||
246 197 0
|
||||
246 197 0
|
||||
246 197 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
189 148 16
|
||||
255 213 82
|
||||
0 0 0
|
||||
0 0 0
|
||||
189 148 16
|
||||
246 197 0
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
255 255 255
|
||||
255 255 255
|
||||
98 98 98
|
||||
213 213 205
|
||||
230 8 8
|
||||
255 189 115
|
||||
32 156 8
|
||||
148 246 148
|
||||
49 82 205
|
||||
164 197 246
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
@@ -493,6 +493,8 @@ extern struct BattleStruct *gBattleStruct;
|
||||
|
||||
#define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7))
|
||||
|
||||
// NOTE: The members of this struct have hard-coded offsets
|
||||
// in include/constants/battle_script_commands.h
|
||||
struct BattleScripting
|
||||
{
|
||||
s32 painSplitHp;
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
// Player speeds
|
||||
enum
|
||||
{
|
||||
SPEED_STANDING,
|
||||
SPEED_NORMAL,
|
||||
SPEED_FAST,
|
||||
SPEED_FASTER,
|
||||
SPEED_FASTEST,
|
||||
PLAYER_SPEED_STANDING,
|
||||
PLAYER_SPEED_NORMAL,
|
||||
PLAYER_SPEED_FAST,
|
||||
PLAYER_SPEED_FASTER,
|
||||
PLAYER_SPEED_FASTEST,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
||||
@@ -1,34 +1,31 @@
|
||||
#ifndef GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
||||
#define GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
||||
|
||||
// Battle Scripting and BattleCommunication addresses
|
||||
#define sPAINSPLIT_HP gBattleScripting
|
||||
#define sBIDE_DMG gBattleScripting + 4
|
||||
#define sMULTIHIT_STRING gBattleScripting + 8
|
||||
#define sDMG_MULTIPLIER gBattleScripting + 0xE
|
||||
#define sTWOTURN_STRINGID gBattleScripting + 0xF
|
||||
#define sB_ANIM_ARG1 gBattleScripting + 0x10
|
||||
#define sB_ANIM_ARG2 gBattleScripting + 0x11
|
||||
#define sTRIPLE_KICK_POWER gBattleScripting + 0x12
|
||||
#define sMOVEEND_STATE gBattleScripting + 0x14
|
||||
#define sBATTLER_WITH_ABILITY gBattleScripting + 0x15
|
||||
#define sMULTIHIT_EFFECT gBattleScripting + 0x16
|
||||
#define sBATTLER gBattleScripting + 0x17
|
||||
#define sB_ANIM_TURN gBattleScripting + 0x18
|
||||
#define sB_ANIM_TARGETS_HIT gBattleScripting + 0x19
|
||||
#define sSTATCHANGER gBattleScripting + 0x1A
|
||||
#define sSTAT_ANIM_PLAYED gBattleScripting + 0x1B
|
||||
#define sGIVEEXP_STATE gBattleScripting + 0x1C
|
||||
#define sBATTLE_STYLE gBattleScripting + 0x1D
|
||||
#define sLVLBOX_STATE gBattleScripting + 0x1E
|
||||
#define sLEARNMOVE_STATE gBattleScripting + 0x1F
|
||||
#define sFIELD_20 gBattleScripting + 0x20
|
||||
#define sRESHOW_MAIN_STATE gBattleScripting + 0x21
|
||||
#define sRESHOW_HELPER_STATE gBattleScripting + 0x22
|
||||
#define sFIELD_23 gBattleScripting + 0x23
|
||||
#define sWINDOWS_TYPE gBattleScripting + 0x24
|
||||
#define sMULTIPLAYER_ID gBattleScripting + 0x25
|
||||
#define sSPECIAL_TRAINER_BATTLE_TYPE gBattleScripting + 0x26
|
||||
// The following correspond to the struct members of BattleScripting by adding their offset
|
||||
#define sPAINSPLIT_HP gBattleScripting + 0x00 // painSplitHp
|
||||
#define sBIDE_DMG gBattleScripting + 0x04 // bideDmg
|
||||
#define sMULTIHIT_STRING gBattleScripting + 0x08 // multihitString
|
||||
#define sDMG_MULTIPLIER gBattleScripting + 0x0E // dmgMultiplier
|
||||
#define sTWOTURN_STRINGID gBattleScripting + 0x0F // twoTurnsMoveStringId
|
||||
#define sB_ANIM_ARG1 gBattleScripting + 0x10 // animArg1
|
||||
#define sB_ANIM_ARG2 gBattleScripting + 0x11 // animArg2
|
||||
#define sTRIPLE_KICK_POWER gBattleScripting + 0x12 // tripleKickPower
|
||||
#define sMOVEEND_STATE gBattleScripting + 0x14 // moveendState
|
||||
#define sBATTLER_WITH_ABILITY gBattleScripting + 0x15 // battlerWithAbility
|
||||
#define sMULTIHIT_EFFECT gBattleScripting + 0x16 // multihitMoveEffect
|
||||
#define sBATTLER gBattleScripting + 0x17 // battler
|
||||
#define sB_ANIM_TURN gBattleScripting + 0x18 // animTurn
|
||||
#define sB_ANIM_TARGETS_HIT gBattleScripting + 0x19 // animTargetsHit
|
||||
#define sSTATCHANGER gBattleScripting + 0x1A // statChanger
|
||||
#define sSTAT_ANIM_PLAYED gBattleScripting + 0x1B // statAnimPlayed
|
||||
#define sGIVEEXP_STATE gBattleScripting + 0x1C // getexpState
|
||||
#define sBATTLE_STYLE gBattleScripting + 0x1D // battleStyle
|
||||
#define sLVLBOX_STATE gBattleScripting + 0x1E // drawlvlupboxState
|
||||
#define sLEARNMOVE_STATE gBattleScripting + 0x1F // learnMoveState
|
||||
#define sPURSUIT_DOUBLES_ATTACKER gBattleScripting + 0x20 // pursuitDoublesAttacker
|
||||
#define sRESHOW_MAIN_STATE gBattleScripting + 0x21 // reshowMainState
|
||||
#define sRESHOW_HELPER_STATE gBattleScripting + 0x22 // reshowHelperState
|
||||
#define sLVLUP_HP gBattleScripting + 0x23 // levelUpHP
|
||||
|
||||
// Array entries for battle communication
|
||||
#define MULTIUSE_STATE 0
|
||||
|
||||
@@ -177,9 +177,16 @@
|
||||
#define ITEM_LANSAT_BERRY 173
|
||||
#define ITEM_STARF_BERRY 174
|
||||
#define ITEM_ENIGMA_BERRY 175
|
||||
#define ITEM_0B0 176
|
||||
#define ITEM_0B1 177
|
||||
#define ITEM_0B2 178
|
||||
|
||||
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
|
||||
#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY
|
||||
|
||||
#define ITEM_UNUSED_BERRY_1 176
|
||||
#define ITEM_UNUSED_BERRY_2 177
|
||||
#define ITEM_UNUSED_BERRY_3 178
|
||||
|
||||
#define MAX_BERRY_INDEX ITEM_UNUSED_BERRY_3
|
||||
|
||||
#define ITEM_BRIGHT_POWDER 179
|
||||
#define ITEM_WHITE_HERB 180
|
||||
#define ITEM_MACHO_BRACE 181
|
||||
@@ -440,8 +447,6 @@
|
||||
|
||||
#define ITEMS_COUNT 375
|
||||
|
||||
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
|
||||
#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY
|
||||
#define ITEM_TO_BERRY(itemId)(((itemId - FIRST_BERRY_INDEX) + 1))
|
||||
#define MAIL_NONE 0xFF
|
||||
|
||||
@@ -454,6 +459,6 @@
|
||||
#define SUPER_ROD 2
|
||||
|
||||
// Check if the item is one that can be used on a Pokemon.
|
||||
#define IS_POKEMON_ITEM(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2)
|
||||
#define IS_POKEMON_ITEM(item) ((item) >= ITEM_POTION && (item) <= MAX_BERRY_INDEX)
|
||||
|
||||
#endif // GUARD_CONSTANTS_ITEMS_H
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
// gTileset_DepartmentStore
|
||||
#define METATILE_DepartmentStore_ElevatorDoor 0x28D
|
||||
|
||||
// gTileset_Fallarbor
|
||||
#define METATILE_Fallarbor_AshGrass 0x20A
|
||||
#define METATILE_Fallarbor_NormalGrass 0x212
|
||||
|
||||
// gTileset_FuchsiaCity
|
||||
#define METATILE_FuchsiaCity_Door 0x2BF
|
||||
#define METATILE_FuchsiaCity_SafariZoneDoor 0x2D2
|
||||
@@ -74,6 +78,9 @@
|
||||
#define METATILE_GenericBuilding1_PlayersPCOff 0x28F
|
||||
#define METATILE_GenericBuilding1_PlayersPCOn 0x28A
|
||||
|
||||
// gTileset_Lavaridge
|
||||
#define METATILE_Lavaridge_NormalGrass 0x206
|
||||
|
||||
// gTileset_LavenderTown
|
||||
#define METATILE_LavenderTown_Door 0x2A2
|
||||
|
||||
@@ -84,6 +91,9 @@
|
||||
// gTileset_MtEmber
|
||||
#define METATILE_MtEmber_CaveEntrance 0x346
|
||||
|
||||
// gTileset_Pacifidlog
|
||||
#define METATILE_Pacifidlog_SkyPillar_CrackedFloor_Hole 0x237
|
||||
|
||||
// gTileset_PalletTown
|
||||
#define METATILE_PalletTown_Door 0x2A3
|
||||
#define METATILE_PalletTown_OaksLabDoor 0x2AC
|
||||
@@ -165,6 +175,10 @@
|
||||
#define METATILE_PokemonMansion_Wall_EndPost_Bottom 0x2AD
|
||||
#define METATILE_PokemonMansion_Wall_EndPost_Mid 0x2A5
|
||||
|
||||
// gTileset_RSCave
|
||||
#define METATILE_RSCave_CrackedFloor 0x22F
|
||||
#define METATILE_RSCave_CrackedFloor_Hole 0x206
|
||||
|
||||
// gTileset_SSAnne
|
||||
#define METATILE_SSAnne_Door 0x281
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ u8 GetECSelectGroupRowsAbove(void);
|
||||
void GetECSelectWordCursorCoords(s8 *arg0, s8 *arg1);
|
||||
u8 GetECSelectWordRowsAbove(void);
|
||||
u8 GetECSelectWordNumRows(void);
|
||||
u8 unref_sub_80FFE60(void);
|
||||
bool32 ShouldDrawECUpArrow(void);
|
||||
bool32 ShouldDrawECDownArrow(void);
|
||||
|
||||
|
||||
@@ -7,15 +7,6 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
extern const u8 gUnknown_0823B4E8[];
|
||||
extern const u8 gUnknown_0823B5E9[];
|
||||
extern const u8 EventScript_275BB7[];
|
||||
extern const u8 EventScript_275D0C[];
|
||||
extern const u8 EventScript_275D1F[];
|
||||
extern const u8 EventScript_275D2E[];
|
||||
extern const u8 EventScript_2766A2[];
|
||||
extern const u8 EventScript_2766A6[];
|
||||
|
||||
extern const u8 gTVBravoTrainerText00[];
|
||||
extern const u8 gTVBravoTrainerText01[];
|
||||
extern const u8 gTVBravoTrainerText02[];
|
||||
@@ -364,16 +355,6 @@ extern const u8 gPokeNewsTextLilycove_Ending[];
|
||||
extern const u8 gPokeNewsTextBlendMaster_Upcoming[];
|
||||
extern const u8 gPokeNewsTextBlendMaster_Ongoing[];
|
||||
extern const u8 gPokeNewsTextBlendMaster_Ending[];
|
||||
extern const u8 SecretBase_RedCave1_Text_274966[];
|
||||
extern const u8 SecretBase_RedCave1_Text_274D13[];
|
||||
extern const u8 SecretBase_RedCave1_Text_274FFE[];
|
||||
extern const u8 SecretBase_RedCave1_Text_275367[];
|
||||
extern const u8 SecretBase_RedCave1_Text_2756C7[];
|
||||
extern const u8 SecretBase_RedCave1_Text_274B24[];
|
||||
extern const u8 SecretBase_RedCave1_Text_274E75[];
|
||||
extern const u8 SecretBase_RedCave1_Text_2751E1[];
|
||||
extern const u8 SecretBase_RedCave1_Text_2754F6[];
|
||||
extern const u8 SecretBase_RedCave1_Text_2758CC[];
|
||||
|
||||
extern const u8 gText_LtSurge[];
|
||||
extern const u8 gText_Koga[];
|
||||
@@ -780,7 +761,6 @@ extern const u8 Help_Text_AboutThisGame[];
|
||||
extern const u8 Help_Text_TypeMatchupList[];
|
||||
extern const u8 Help_Text_Exit[];
|
||||
extern const u8 Help_Text_Cancel[];
|
||||
extern const u8 gUnknown_81B2E76[];
|
||||
extern const u8 Help_Text_DescWhatShouldIDo[];
|
||||
extern const u8 Help_Text_DescHowDoIDoThis[];
|
||||
extern const u8 Help_Text_DescWhatDoesThisTermMean[];
|
||||
|
||||
@@ -31,14 +31,12 @@
|
||||
#define IWRAM_START 0x03000000
|
||||
#define IWRAM_END (IWRAM_START + 0x8000)
|
||||
|
||||
#define PLTT 0x5000000
|
||||
#define PLTT_SIZE 0x400
|
||||
|
||||
#define BG_PLTT PLTT
|
||||
#define BG_PLTT_SIZE 0x200
|
||||
|
||||
#define OBJ_PLTT (PLTT + 0x200)
|
||||
#define PLTT 0x5000000
|
||||
#define BG_PLTT PLTT
|
||||
#define BG_PLTT_SIZE 0x200
|
||||
#define OBJ_PLTT (PLTT + BG_PLTT_SIZE)
|
||||
#define OBJ_PLTT_SIZE 0x200
|
||||
#define PLTT_SIZE (BG_PLTT_SIZE + OBJ_PLTT_SIZE)
|
||||
|
||||
#define VRAM 0x6000000
|
||||
#define VRAM_SIZE 0x18000
|
||||
@@ -79,6 +77,12 @@
|
||||
|
||||
#define TOTAL_OBJ_TILE_COUNT 1024
|
||||
|
||||
#define PLTT_SIZEOF(n) ((n) * sizeof(u16))
|
||||
#define PLTT_SIZE_4BPP PLTT_SIZEOF(16)
|
||||
#define PLTT_SIZE_8BPP PLTT_SIZEOF(256)
|
||||
|
||||
#define PLTT_OFFSET_4BPP(n) ((n) * PLTT_SIZE_4BPP)
|
||||
|
||||
// Some functions are strictly inline asm
|
||||
#define NAKED __attribute__((naked))
|
||||
#define UNUSED __attribute__((unused))
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
// Values for 2nd argument to GetItemIconGfxPtr
|
||||
enum {
|
||||
ITEMICON_TILES,
|
||||
ITEMICON_PAL,
|
||||
};
|
||||
|
||||
extern const struct CompressedSpriteSheet gSpriteSheet_BagMale;
|
||||
extern const struct CompressedSpriteSheet gSpriteSheet_BagFemale;
|
||||
extern const struct CompressedSpritePalette gSpritePalette_Bag;
|
||||
@@ -22,7 +28,7 @@ void UpdateSwapLinePos(s16 x, u16 y);
|
||||
void SetSwapLineInvisibility(bool8 invisible);
|
||||
void SetBagVisualPocketId(u8);
|
||||
void ShakeBagSprite(void);
|
||||
const void *GetItemIconGfxPtr(u16 itemId, u8 ptrId);
|
||||
const u32 *GetItemIconGfxPtr(u16 itemId, u8 ptrId);
|
||||
void CreateBagSprite(u8 animNum);
|
||||
|
||||
#endif // GUARD_ITEM_MENU_ICONS
|
||||
|
||||
@@ -44,7 +44,6 @@ struct Main
|
||||
/*0x439*/ u8 field_439_x4:1;
|
||||
};
|
||||
|
||||
extern u8 gUnknown_3001764;
|
||||
extern struct Main gMain;
|
||||
extern bool8 gSoftResetDisabled;
|
||||
extern bool8 gLinkVSyncDisabled;
|
||||
|
||||
@@ -8,6 +8,13 @@
|
||||
#define MENU_NOTHING_CHOSEN -2
|
||||
#define MENU_B_PRESSED -1
|
||||
|
||||
#define MENU_INFO_ICON_CAUGHT 0
|
||||
#define MENU_INFO_ICON_TYPE (NUMBER_OF_MON_TYPES + 1)
|
||||
#define MENU_INFO_ICON_POWER (NUMBER_OF_MON_TYPES + 2)
|
||||
#define MENU_INFO_ICON_ACCURACY (NUMBER_OF_MON_TYPES + 3)
|
||||
#define MENU_INFO_ICON_PP (NUMBER_OF_MON_TYPES + 4)
|
||||
#define MENU_INFO_ICON_EFFECT (NUMBER_OF_MON_TYPES + 5)
|
||||
|
||||
struct MenuAction
|
||||
{
|
||||
const u8 *text;
|
||||
@@ -31,7 +38,7 @@ s8 Menu2_GetMonSpriteAnchorCoordMinusx20(u16 species, u32 personality, u8 a2);
|
||||
void ListMenu_LoadMonIconPalette(u8 palOffset, u16 speciesId);
|
||||
void ListMenu_DrawMonIconGraphics(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y);
|
||||
void ListMenuLoadStdPalAt(u8 palOffset, u8 palId);
|
||||
void BlitMoveInfoIcon(u8 windowId, u8 iconId, u16 x, u16 y);
|
||||
void BlitMenuInfoIcon(u8 windowId, u8 iconId, u16 x, u16 y);
|
||||
|
||||
// menu
|
||||
s8 Menu_ProcessInputGridLayout(void);
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
#define gPaletteFade_delay (gPaletteFade.multipurpose2) // normal and hardware fade
|
||||
#define gPaletteFade_submode (gPaletteFade.multipurpose2) // fast fade
|
||||
|
||||
#define PLTT_BUFFER_SIZE 0x200
|
||||
#define PLTT_DECOMP_BUFFER_SIZE (PLTT_BUFFER_SIZE * 2)
|
||||
#define PLTT_BUFFER_SIZE (PLTT_SIZE / sizeof(u16))
|
||||
|
||||
#define PALETTE_FADE_STATUS_DELAY 2
|
||||
#define PALETTE_FADE_STATUS_ACTIVE 1
|
||||
@@ -20,6 +19,13 @@
|
||||
#define PALETTES_OBJECTS 0xFFFF0000
|
||||
#define PALETTES_ALL (PALETTES_BG | PALETTES_OBJECTS)
|
||||
|
||||
#define PLTT_ID(n) ((n) * 16)
|
||||
#define BG_PLTT_OFFSET 0x000
|
||||
#define OBJ_PLTT_OFFSET 0x100
|
||||
#define BG_PLTT_ID(n) (BG_PLTT_OFFSET + PLTT_ID(n))
|
||||
#define OBJ_PLTT_ID(n) (OBJ_PLTT_OFFSET + PLTT_ID(n))
|
||||
#define OBJ_PLTT_ID2(n) (PLTT_ID((n) + 16))
|
||||
|
||||
enum
|
||||
{
|
||||
FAST_FADE_IN_FROM_WHITE,
|
||||
@@ -80,4 +86,14 @@ void BlendPalettesGradually(u32 selectedPalettes, s8 delay, u8 coeff, u8 coeffTa
|
||||
bool32 IsBlendPalettesGraduallyTaskActive(u8 var);
|
||||
void DestroyBlendPalettesGraduallyTask(void);
|
||||
|
||||
static inline void SetBackdropFromColor(u16 color)
|
||||
{
|
||||
FillPalette(color, 0, PLTT_SIZEOF(1));
|
||||
}
|
||||
|
||||
static inline void SetBackdropFromPalette(const u16 *palette)
|
||||
{
|
||||
LoadPalette(palette, 0, PLTT_SIZEOF(1));
|
||||
}
|
||||
|
||||
#endif // GUARD_PALETTE_H
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
#define INDEX_CANCEL -2
|
||||
|
||||
extern EWRAM_DATA struct ItemSlot gUnknown_02039F80[3];
|
||||
|
||||
void CreatePokemartMenu(const u16 *itemsForSale);
|
||||
void CreateDecorationShop1Menu(const u16 *);
|
||||
void CreateDecorationShop2Menu(const u16 *);
|
||||
|
||||
@@ -80,7 +80,6 @@ extern const u8 gText_ApostropheSBase[];
|
||||
extern const u8 gText_NoRegistry[];
|
||||
extern const u8 gText_OkayToDeleteFromRegistry[];
|
||||
extern const u8 gText_RegisteredDataDeleted[];
|
||||
extern const u8 gUnknown_085EA79D[];
|
||||
extern const u8 gText_Confirm3[];
|
||||
extern const u8 gText_Cancel4[];
|
||||
extern const u8 gText_IsThisTheCorrectTime[];
|
||||
|
||||
@@ -11,8 +11,8 @@ SECTIONS {
|
||||
|
||||
. = 0x1C000;
|
||||
|
||||
<EWRAM>
|
||||
src/*.o(.ewram_data);
|
||||
INCLUDE "sym_ewram.ld"
|
||||
src/*.o(ewram_data);
|
||||
|
||||
*libc.a:impure.o(.data);
|
||||
*libc.a:locale.o(.data);
|
||||
@@ -26,7 +26,7 @@ SECTIONS {
|
||||
ALIGN(4)
|
||||
{
|
||||
/* .bss starts at 0x3000000 */
|
||||
<BSS>
|
||||
INCLUDE "sym_bss.ld"
|
||||
src/*.o(.bss);
|
||||
data/*.o(.bss);
|
||||
|
||||
@@ -34,7 +34,7 @@ SECTIONS {
|
||||
src/m4a.o(.bss.code);
|
||||
|
||||
/* COMMON starts at 0x30030E0 */
|
||||
<COMMON>
|
||||
INCLUDE "sym_common.ld"
|
||||
|
||||
*libc.a:sbrkr.o(COMMON);
|
||||
end = .;
|
||||
@@ -1,14 +0,0 @@
|
||||
/<EWRAM>/ {
|
||||
r sym_ewram.ld
|
||||
d
|
||||
}
|
||||
|
||||
/<BSS>/ {
|
||||
r sym_bss.ld
|
||||
d
|
||||
}
|
||||
|
||||
/<COMMON>/ {
|
||||
r sym_common.ld
|
||||
d
|
||||
}
|
||||
@@ -20,27 +20,27 @@ static const u8 sTextColors[][3] = {
|
||||
static const struct WindowTemplate sDefaultBagWindowsStd[] = {
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0x0b,
|
||||
.tilemapTop = 0x01,
|
||||
.width = 0x12,
|
||||
.height = 0x0c,
|
||||
.paletteNum = 0x0f,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 1,
|
||||
.width = 18,
|
||||
.height = 12,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x008a
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0x05,
|
||||
.tilemapTop = 0x0e,
|
||||
.width = 0x19,
|
||||
.height = 0x06,
|
||||
.paletteNum = 0x0f,
|
||||
.tilemapLeft = 5,
|
||||
.tilemapTop = 14,
|
||||
.width = 25,
|
||||
.height = 6,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x0162
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0x01,
|
||||
.tilemapTop = 0x01,
|
||||
.width = 0x09,
|
||||
.height = 0x02,
|
||||
.paletteNum = 0x0f,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 1,
|
||||
.width = 9,
|
||||
.height = 2,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x01f8
|
||||
}, DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
@@ -48,27 +48,27 @@ static const struct WindowTemplate sDefaultBagWindowsStd[] = {
|
||||
static const struct WindowTemplate sDefaultBagWindowsDeposit[] = {
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0x0b,
|
||||
.tilemapTop = 0x01,
|
||||
.width = 0x12,
|
||||
.height = 0x0c,
|
||||
.paletteNum = 0x0f,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 1,
|
||||
.width = 18,
|
||||
.height = 12,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x008a
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0x05,
|
||||
.tilemapTop = 0x0e,
|
||||
.width = 0x19,
|
||||
.height = 0x06,
|
||||
.paletteNum = 0x0f,
|
||||
.tilemapLeft = 5,
|
||||
.tilemapTop = 14,
|
||||
.width = 25,
|
||||
.height = 6,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x0162
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0x01,
|
||||
.tilemapTop = 0x01,
|
||||
.width = 0x08,
|
||||
.height = 0x02,
|
||||
.paletteNum = 0x0C,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 1,
|
||||
.width = 8,
|
||||
.height = 2,
|
||||
.paletteNum = 12,
|
||||
.baseBlock = 0x01f8
|
||||
}, DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
@@ -80,7 +80,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 15,
|
||||
.width = 5,
|
||||
.height = 4,
|
||||
.paletteNum = 0xF,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x242
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -88,7 +88,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 9,
|
||||
.width = 12,
|
||||
.height = 4,
|
||||
.paletteNum = 0xF,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x242
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -96,7 +96,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 1,
|
||||
.width = 8,
|
||||
.height = 3,
|
||||
.paletteNum = 0xC,
|
||||
.paletteNum = 12,
|
||||
.baseBlock = 0x272
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -104,7 +104,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 15,
|
||||
.width = 6,
|
||||
.height = 4,
|
||||
.paletteNum = 0xF,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x28a
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -112,7 +112,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 9,
|
||||
.width = 6,
|
||||
.height = 4,
|
||||
.paletteNum = 0xF,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x28a
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -120,7 +120,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 15,
|
||||
.width = 26,
|
||||
.height = 4,
|
||||
.paletteNum = 0xF,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x2a2
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -128,7 +128,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 15,
|
||||
.width = 14,
|
||||
.height = 4,
|
||||
.paletteNum = 0xC,
|
||||
.paletteNum = 12,
|
||||
.baseBlock = 0x2a2
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -136,7 +136,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 15,
|
||||
.width = 15,
|
||||
.height = 4,
|
||||
.paletteNum = 0xC,
|
||||
.paletteNum = 12,
|
||||
.baseBlock = 0x2da
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -144,7 +144,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 15,
|
||||
.width = 16,
|
||||
.height = 4,
|
||||
.paletteNum = 0xC,
|
||||
.paletteNum = 12,
|
||||
.baseBlock = 0x316
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -152,7 +152,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 15,
|
||||
.width = 23,
|
||||
.height = 4,
|
||||
.paletteNum = 0xC,
|
||||
.paletteNum = 12,
|
||||
.baseBlock = 0x356
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -160,7 +160,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 17,
|
||||
.width = 7,
|
||||
.height = 2,
|
||||
.paletteNum = 0xF,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x20a
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -168,7 +168,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 15,
|
||||
.width = 7,
|
||||
.height = 4,
|
||||
.paletteNum = 0xF,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x20a
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -176,7 +176,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 13,
|
||||
.width = 7,
|
||||
.height = 6,
|
||||
.paletteNum = 0xF,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x20a
|
||||
}, {
|
||||
.bg = 0,
|
||||
@@ -184,7 +184,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
.tilemapTop = 11,
|
||||
.width = 7,
|
||||
.height = 8,
|
||||
.paletteNum = 0xF,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x20a
|
||||
}
|
||||
};
|
||||
@@ -202,10 +202,10 @@ void InitBagWindows(void)
|
||||
else
|
||||
InitWindows(sDefaultBagWindowsDeposit);
|
||||
DeactivateAllTextPrinters();
|
||||
LoadUserWindowGfx(0, 0x64, 0xE0);
|
||||
LoadMenuMessageWindowGfx(0, 0x6D, 0xD0);
|
||||
LoadStdWindowGfx(0, 0x81, 0xC0);
|
||||
LoadPalette(sBagWindowPalF, 0xF0, 0x20);
|
||||
LoadUserWindowGfx(0, 0x64, BG_PLTT_ID(14));
|
||||
LoadMenuMessageWindowGfx(0, 0x6D, BG_PLTT_ID(13));
|
||||
LoadStdWindowGfx(0, 0x81, BG_PLTT_ID(12));
|
||||
LoadPalette(sBagWindowPalF, BG_PLTT_ID(15), sizeof(sBagWindowPalF));
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
FillWindowPixelBuffer(i, 0x00);
|
||||
@@ -232,7 +232,7 @@ void BagPrintTextOnWin1CenteredColor0(const u8 * str, u8 unused)
|
||||
void BagDrawDepositItemTextBox(void)
|
||||
{
|
||||
u32 x;
|
||||
DrawStdFrameWithCustomTileAndPalette(2, FALSE, 0x081, 0x0C);
|
||||
DrawStdFrameWithCustomTileAndPalette(2, FALSE, 0x081, 12);
|
||||
x = 0x40 - GetStringWidth(FONT_SMALL, gText_DepositItem, 0);
|
||||
AddTextPrinterParameterized(2, FONT_SMALL, gText_DepositItem, x / 2, 1, 0, NULL);
|
||||
}
|
||||
@@ -244,11 +244,11 @@ u8 ShowBagWindow(u8 whichWindow, u8 nItems)
|
||||
sOpenWindows[whichWindow] = AddWindow(&sWindowTemplates[whichWindow + nItems]);
|
||||
if (whichWindow != 6)
|
||||
{
|
||||
DrawStdFrameWithCustomTileAndPalette(sOpenWindows[whichWindow], FALSE, 0x064, 0xE);
|
||||
DrawStdFrameWithCustomTileAndPalette(sOpenWindows[whichWindow], FALSE, 0x064, 14);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawStdFrameWithCustomTileAndPalette(sOpenWindows[whichWindow], FALSE, 0x081, 0xC);
|
||||
DrawStdFrameWithCustomTileAndPalette(sOpenWindows[whichWindow], FALSE, 0x081, 12);
|
||||
}
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
@@ -293,12 +293,12 @@ u8 GetBagWindow(u8 whichWindow)
|
||||
|
||||
void BagCreateYesNoMenuBottomRight(u8 taskId, const struct YesNoFuncTable * ptrs)
|
||||
{
|
||||
CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates[3], FONT_NORMAL, 0, 2, 0x064, 0x0E, ptrs);
|
||||
CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates[3], FONT_NORMAL, 0, 2, 0x064, 14, ptrs);
|
||||
}
|
||||
|
||||
void BagCreateYesNoMenuTopRight(u8 taskId, const struct YesNoFuncTable * ptrs)
|
||||
{
|
||||
CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates[4], FONT_NORMAL, 0, 2, 0x064, 0x0E, ptrs);
|
||||
CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates[4], FONT_NORMAL, 0, 2, 0x064, 14, ptrs);
|
||||
}
|
||||
|
||||
void BagPrintMoneyAmount(void)
|
||||
@@ -308,5 +308,5 @@ void BagPrintMoneyAmount(void)
|
||||
|
||||
void BagDrawTextBoxOnWindow(u8 windowId)
|
||||
{
|
||||
DrawTextBorderOuter(windowId, 0x064, 0x0E);
|
||||
DrawTextBorderOuter(windowId, 0x064, 14);
|
||||
}
|
||||
|
||||
@@ -654,8 +654,8 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2)
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||
|
||||
LoadPalette(&gPlttBufferUnfaded[0x100 + battlerId * 16], animBg.paletteId * 16, 0x20);
|
||||
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void *)(BG_PLTT + animBg.paletteId * 32), 0x20);
|
||||
LoadPalette(&gPlttBufferUnfaded[OBJ_PLTT_ID(battlerId)], BG_PLTT_ID(animBg.paletteId), PLTT_SIZE_4BPP);
|
||||
CpuCopy32(&gPlttBufferUnfaded[OBJ_PLTT_ID(battlerId)], (void *)(BG_PLTT + animBg.paletteId * PLTT_SIZE_4BPP), PLTT_SIZE_4BPP);
|
||||
|
||||
CopyBattlerSpriteToBg(1, 0, 0, GetBattlerPosition(battlerId), animBg.paletteId, animBg.bgTiles,
|
||||
animBg.bgTilemap, animBg.tilesOffset);
|
||||
@@ -679,8 +679,8 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2)
|
||||
SetGpuReg(REG_OFFSET_BG2HOFS, gBattle_BG2_X);
|
||||
SetGpuReg(REG_OFFSET_BG2VOFS, gBattle_BG2_Y);
|
||||
|
||||
LoadPalette(&gPlttBufferUnfaded[0x100 + battlerId * 16], 0x90, 0x20);
|
||||
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void *)(BG_PLTT + 0x120), 0x20);
|
||||
LoadPalette(&gPlttBufferUnfaded[OBJ_PLTT_ID(battlerId)], BG_PLTT_ID(9), PLTT_SIZE_4BPP);
|
||||
CpuCopy32(&gPlttBufferUnfaded[OBJ_PLTT_ID(battlerId)], (void *)(BG_PLTT + 9 * PLTT_SIZE_4BPP), PLTT_SIZE_4BPP);
|
||||
|
||||
CopyBattlerSpriteToBg(2, 0, 0, GetBattlerPosition(battlerId), animBg.paletteId, animBg.bgTiles + 0x1000,
|
||||
animBg.bgTilemap + 0x400, animBg.tilesOffset);
|
||||
@@ -739,25 +739,15 @@ static void Task_InitUpdateMonBg(u8 taskId)
|
||||
|
||||
if (gTasks[taskId].data[5] == 0)
|
||||
{
|
||||
u16 *src;
|
||||
u16 *dst;
|
||||
|
||||
gBattle_BG1_X = x + gTasks[taskId].data[3];
|
||||
gBattle_BG1_Y = y + gTasks[taskId].data[4];
|
||||
src = gPlttBufferFaded + 0x100 + palIndex * 16;
|
||||
dst = gPlttBufferFaded + 0x100 + animBg.paletteId * 16 - 256;
|
||||
CpuCopy32(src, dst, 0x20);
|
||||
CpuCopy32(&gPlttBufferFaded[OBJ_PLTT_ID(palIndex)], &gPlttBufferFaded[BG_PLTT_ID(animBg.paletteId)], PLTT_SIZE_4BPP);
|
||||
}
|
||||
else
|
||||
{
|
||||
u16 *src;
|
||||
u16 *dst;
|
||||
|
||||
gBattle_BG2_X = x + gTasks[taskId].data[3];
|
||||
gBattle_BG2_Y = y + gTasks[taskId].data[4];
|
||||
src = gPlttBufferFaded + 0x100 + palIndex * 16;
|
||||
dst = gPlttBufferFaded + 0x100 - 112;
|
||||
CpuCopy32(src, dst, 0x20);
|
||||
CpuCopy32(&gPlttBufferFaded[OBJ_PLTT_ID(palIndex)], &gPlttBufferFaded[BG_PLTT_ID(9)], PLTT_SIZE_4BPP);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1113,7 +1103,7 @@ static void LoadMoveBg(u16 bgId)
|
||||
{
|
||||
LZDecompressVram(gBattleAnimBackgroundTable[bgId].tilemap, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleAnimBackgroundTable[bgId].image, (void *)(BG_CHAR_ADDR(2)));
|
||||
LoadCompressedPalette(gBattleAnimBackgroundTable[bgId].palette, 32, 32);
|
||||
LoadCompressedPalette(gBattleAnimBackgroundTable[bgId].palette, BG_PLTT_ID(2), PLTT_SIZE_4BPP);
|
||||
}
|
||||
|
||||
static void LoadDefaultBg(void)
|
||||
|
||||