Skip to content

Commit 857251d

Browse files
authored
Merge pull request #4 from ExpoSeed/sync-pokemon-expansion
Sync pokemon expansion
2 parents 448599f + a539045 commit 857251d

File tree

403 files changed

+23842
-23734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

403 files changed

+23842
-23734
lines changed

.github/pull_request_template.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
<!--- Describe your changes in detail -->
5+
6+
## **Discord contact info**
7+
<!--- formatted as name#numbers, e.g. PikalaxALT#5823 -->
8+
<!--- Contributors must join https://discord.gg/d5dubZ3 -->

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[terminal]: https://docs.microsoft.com/windows/terminal/get-started
99
[wsl]: https://docs.microsoft.com/windows/wsl/install-win10
1010

11-
Independently from the specific OS, make sure that the `gcc`, `g++`, `make`, `git`, and `libpng` packages or their equivalents are installed and accessible to the development tools that are used by the project (this means that, for example, on Windows, the packages have to be installed in the WSL environment). The package names and installation methods may vary with each OS.
11+
Independently from the specific OS, make sure that the `gcc`, `g++`, `make`, `git`, and `libpng-dev` packages or their equivalents are installed and accessible to the development tools that are used by the project (this means that, for example, on Windows, the packages have to be installed in the WSL environment). The package names and installation methods may vary with each OS.
1212

1313
Install the devkitARM toolchain of devkitPro as per [the instructions on their wiki](https://devkitpro.org/wiki/devkitPro_pacman). On Windows, follow the Linux instructions inside WSL as any steps about the Windows installer do not apply.
1414

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ OBJ_DIR := build/emerald
6969
LIBPATH := -L ../../tools/agbcc/lib
7070
else
7171
CC1 = $(shell $(CC) --print-prog-name=cc1) -quiet
72-
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast
72+
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mcpu=arm7tdmi -fno-toplevel-reorder -Wno-pointer-to-int-cast
7373
ROM := pokeemerald_modern.gba
7474
OBJ_DIR := build/modern
7575
LIBPATH := -L "$(dir $(shell $(CC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(CC) -mthumb -print-file-name=libc.a))"
@@ -178,7 +178,7 @@ mostlyclean: tidy
178178
rm -f $(SAMPLE_SUBDIR)/*.bin
179179
rm -f $(CRY_SUBDIR)/*.bin
180180
rm -f $(MID_SUBDIR)/*.s
181-
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
181+
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
182182
rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc
183183
rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc
184184
find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +

asm/macros/event.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,35 +1434,41 @@
14341434

14351435
@ Sets the color of the text in standard message boxes. 0x00 produces blue (male) text, 0x01 produces red (female) text,
14361436
@ 0xFF resets the color to the default for the current OW's gender, and all other values produce black text.
1437+
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
14371438
.macro textcolor color:req
14381439
.byte 0xc7
14391440
.byte \color
14401441
.endm
14411442
14421443
@ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom
14431444
@ of the screen when the Main Menu is opened.
1445+
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
14441446
.macro loadhelp pointer:req
14451447
.byte 0xc8
14461448
.4byte \pointer
14471449
.endm
14481450
14491451
@ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of
14501452
@ the screen when the Main Menu is opened.
1453+
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
14511454
.macro unloadhelp
14521455
.byte 0xc9
14531456
.endm
14541457
14551458
@ After using this command, all standard message boxes will use the signpost frame.
1459+
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
14561460
.macro signmsg
14571461
.byte 0xca
14581462
.endm
14591463
14601464
@ Ends the effects of signmsg, returning message box frames to normal.
1465+
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
14611466
.macro normalmsg
14621467
.byte 0xcb
14631468
.endm
14641469
14651470
@ Compares the value of a hidden variable to a dword.
1471+
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
14661472
.macro comparehiddenvar a:req, value:req
14671473
.byte 0xcc
14681474
.byte \a
@@ -1489,6 +1495,7 @@
14891495
.endm
14901496

14911497
@ Sets worldmapflag to 1. This allows the player to Fly to the corresponding map, if that map has a flightspot.
1498+
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
14921499
.macro setworldmapflag worldmapflag:req
14931500
.byte 0xd0
14941501
.2byte \worldmapflag

asm/macros/music_voice.inc

Lines changed: 59 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
.macro voice_directsound base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
1+
.macro voice_directsound base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req
22
.byte 0
33
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
44
.endm
55

6-
.macro voice_directsound_no_resample base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
6+
.macro voice_directsound_no_resample base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req
77
.byte 8
88
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
99
.endm
1010

11-
.macro voice_directsound_alt base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
11+
.macro voice_directsound_alt base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req
1212
.byte 16
1313
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
1414
.endm
1515

16-
.macro _voice_directsound base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
16+
.macro _voice_directsound base_midi_key:req, pan:req, sample_data_pointer:req, attack:req, decay:req, sustain:req, release:req
1717
.byte \base_midi_key
1818
.byte 0
1919
.if \pan != 0
@@ -28,16 +28,22 @@
2828
.byte \release
2929
.endm
3030

31-
.macro voice_square_1 sweep, duty_cycle, attack, decay, sustain, release
32-
_voice_square_1 1, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
31+
.macro voice_square_1 base_midi_key:req, pan:req, sweep:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
32+
_voice_square_1 1, \base_midi_key, \pan, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
3333
.endm
3434

35-
.macro voice_square_1_alt sweep, duty_cycle, attack, decay, sustain, release
36-
_voice_square_1 9, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
35+
.macro voice_square_1_alt base_midi_key:req, pan:req, sweep:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
36+
_voice_square_1 9, \base_midi_key, \pan, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
3737
.endm
3838

39-
.macro _voice_square_1 type, sweep, duty_cycle, attack, decay, sustain, release
40-
.byte \type, 60, 0
39+
.macro _voice_square_1 type:req, base_midi_key:req, pan:req, sweep:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
40+
.byte \type
41+
.byte \base_midi_key
42+
.if \pan != 0
43+
.byte (0x80 | \pan)
44+
.else
45+
.byte 0
46+
.endif
4147
.byte \sweep
4248
.byte (\duty_cycle & 0x3)
4349
.byte 0, 0, 0
@@ -47,16 +53,23 @@
4753
.byte (\release & 0x7)
4854
.endm
4955

50-
.macro voice_square_2 duty_cycle, attack, decay, sustain, release
51-
_voice_square_2 2, \duty_cycle, \attack, \decay, \sustain, \release
56+
.macro voice_square_2 base_midi_key:req, pan:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
57+
_voice_square_2 2, \base_midi_key, \pan, \duty_cycle, \attack, \decay, \sustain, \release
5258
.endm
5359

54-
.macro voice_square_2_alt duty_cycle, attack, decay, sustain, release
55-
_voice_square_2 10, \duty_cycle, \attack, \decay, \sustain, \release
60+
.macro voice_square_2_alt base_midi_key:req, pan:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
61+
_voice_square_2 10, \base_midi_key, \pan, \duty_cycle, \attack, \decay, \sustain, \release
5662
.endm
5763

58-
.macro _voice_square_2 type, duty_cycle, attack, decay, sustain, release
59-
.byte \type, 60, 0, 0
64+
.macro _voice_square_2 type:req, base_midi_key:req, pan:req, duty_cycle:req, attack:req, decay:req, sustain:req, release:req
65+
.byte \type
66+
.byte \base_midi_key
67+
.if \pan != 0
68+
.byte (0x80 | \pan)
69+
.else
70+
.byte 0
71+
.endif
72+
.byte 0
6073
.byte (\duty_cycle & 0x3)
6174
.byte 0, 0, 0
6275
.byte (\attack & 0x7)
@@ -65,33 +78,47 @@
6578
.byte (\release & 0x7)
6679
.endm
6780

68-
.macro voice_programmable_wave wave_samples_pointer, attack, decay, sustain, release
69-
_voice_programmable_wave 3, \wave_samples_pointer, \attack, \decay, \sustain, \release
81+
.macro voice_programmable_wave base_midi_key:req, pan:req, wave_samples_pointer:req, attack:req, decay:req, sustain:req, release:req
82+
_voice_programmable_wave 3, \base_midi_key, \pan, \wave_samples_pointer, \attack, \decay, \sustain, \release
7083
.endm
7184

72-
.macro voice_programmable_wave_alt wave_samples_pointer, attack, decay, sustain, release
73-
_voice_programmable_wave 11, \wave_samples_pointer, \attack, \decay, \sustain, \release
85+
.macro voice_programmable_wave_alt base_midi_key:req, pan:req, wave_samples_pointer:req, attack:req, decay:req, sustain:req, release:req
86+
_voice_programmable_wave 11, \base_midi_key, \pan, \wave_samples_pointer, \attack, \decay, \sustain, \release
7487
.endm
7588

76-
.macro _voice_programmable_wave type, wave_samples_pointer, attack, decay, sustain, release
77-
.byte \type, 60, 0, 0
89+
.macro _voice_programmable_wave type:req, base_midi_key:req, pan:req, wave_samples_pointer:req, attack:req, decay:req, sustain:req, release:req
90+
.byte \type
91+
.byte \base_midi_key
92+
.if \pan != 0
93+
.byte (0x80 | \pan)
94+
.else
95+
.byte 0
96+
.endif
97+
.byte 0
7898
.4byte \wave_samples_pointer
7999
.byte (\attack & 0x7)
80100
.byte (\decay & 0x7)
81101
.byte (\sustain & 0xF)
82102
.byte (\release & 0x7)
83103
.endm
84104

85-
.macro voice_noise period, attack, decay, sustain, release
86-
_voice_noise 4, \period, \attack, \decay, \sustain, \release
105+
.macro voice_noise base_midi_key:req, pan:req, period:req, attack:req, decay:req, sustain:req, release:req
106+
_voice_noise 4, \base_midi_key, \pan, \period, \attack, \decay, \sustain, \release
87107
.endm
88108

89-
.macro voice_noise_alt period, attack, decay, sustain, release
90-
_voice_noise 12, \period, \attack, \decay, \sustain, \release
109+
.macro voice_noise_alt base_midi_key:req, pan:req, period:req, attack:req, decay:req, sustain:req, release:req
110+
_voice_noise 12, \base_midi_key, \pan, \period, \attack, \decay, \sustain, \release
91111
.endm
92112

93-
.macro _voice_noise type, period, attack, decay, sustain, release
94-
.byte \type, 60, 0, 0
113+
.macro _voice_noise type:req, base_midi_key:req, pan:req, period:req, attack:req, decay:req, sustain:req, release:req
114+
.byte \type
115+
.byte \base_midi_key
116+
.if \pan != 0
117+
.byte (0x80 | \pan)
118+
.else
119+
.byte 0
120+
.endif
121+
.byte 0
95122
.byte (\period & 0x1)
96123
.byte 0, 0, 0
97124
.byte (\attack & 0x7)
@@ -100,25 +127,25 @@
100127
.byte (\release & 0x7)
101128
.endm
102129

103-
.macro voice_keysplit voice_group_pointer, keysplit_table_pointer
130+
.macro voice_keysplit voice_group_pointer:req, keysplit_table_pointer:req
104131
.byte 0x40, 0, 0, 0
105132
.4byte \voice_group_pointer
106133
.4byte \keysplit_table_pointer
107134
.endm
108135

109-
.macro voice_keysplit_all voice_group_pointer
136+
.macro voice_keysplit_all voice_group_pointer:req
110137
.byte 0x80, 0, 0, 0
111138
.4byte \voice_group_pointer
112139
.4byte 0
113140
.endm
114141

115-
.macro cry sample
142+
.macro cry sample:req
116143
.byte 0x20, 60, 0, 0
117144
.4byte \sample
118145
.byte 0xff, 0, 0xff, 0
119146
.endm
120147

121-
.macro cry2 sample
148+
.macro cry2 sample:req
122149
.byte 0x30, 60, 0, 0
123150
.4byte \sample
124151
.byte 0xff, 0, 0xff, 0

berry_fix/payload/src/flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ u8 HandleWriteSectorNBytes(u8 sectorNum, u8 *data, u16 size)
296296

297297
u8 TryWriteSector(u8 sectorNum, u8 *data)
298298
{
299-
if (ProgramFlashSectorAndVerify(sectorNum, data) != 0) // is damaged?
299+
if (ProgramFlashSectorAndVerify(sectorNum, data)) // is damaged?
300300
{
301301
SetSectorDamagedStatus(SECTOR_DAMAGED, sectorNum); // set damaged sector bits.
302302
return SAVE_STATUS_ERROR;

common_syms/battle_tower.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
gUnknown_03006298
1+
gFrontierTempParty

data/maps/NewMauville_Inside/map.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"movement_range_y": 0,
2525
"trainer_type": "TRAINER_TYPE_NONE",
2626
"trainer_sight_or_berry_tree_id": "0",
27-
"script": "NewMauville_Inside_EventScript_ItemUltraRope",
27+
"script": "NewMauville_Inside_EventScript_ItemUltraBall",
2828
"flag": "FLAG_ITEM_NEW_MAUVILLE_ULTRA_BALL"
2929
},
3030
{

data/mystery_event_script_cmd_table.s

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
.align 2
44
gMysteryEventScriptCmdTable:: @ 82DED2C
5-
.4byte MEScrCmd_nop
6-
.4byte MEScrCmd_checkcompat
7-
.4byte MEScrCmd_end
8-
.4byte MEScrCmd_setmsg
9-
.4byte MEScrCmd_setstatus
10-
.4byte MEScrCmd_runscript
11-
.4byte MEScrCmd_initramscript
12-
.4byte MEScrCmd_setenigmaberry
13-
.4byte MEScrCmd_giveribbon
14-
.4byte MEScrCmd_givenationaldex
15-
.4byte MEScrCmd_addrareword
16-
.4byte MEScrCmd_setrecordmixinggift
17-
.4byte MEScrCmd_givepokemon
18-
.4byte MEScrCmd_addtrainer
19-
.4byte MEScrCmd_enableresetrtc
20-
.4byte MEScrCmd_checksum
21-
.4byte MEScrCmd_crc
5+
.4byte MEScrCmd_nop @ 0x00
6+
.4byte MEScrCmd_checkcompat @ 0x01
7+
.4byte MEScrCmd_end @ 0x02
8+
.4byte MEScrCmd_setmsg @ 0x03
9+
.4byte MEScrCmd_setstatus @ 0x04
10+
.4byte MEScrCmd_runscript @ 0x05
11+
.4byte MEScrCmd_initramscript @ 0x06
12+
.4byte MEScrCmd_setenigmaberry @ 0x07
13+
.4byte MEScrCmd_giveribbon @ 0x08
14+
.4byte MEScrCmd_givenationaldex @ 0x09
15+
.4byte MEScrCmd_addrareword @ 0x0a
16+
.4byte MEScrCmd_setrecordmixinggift @ 0x0b
17+
.4byte MEScrCmd_givepokemon @ 0x0c
18+
.4byte MEScrCmd_addtrainer @ 0x0d
19+
.4byte MEScrCmd_enableresetrtc @ 0x0e
20+
.4byte MEScrCmd_checksum @ 0x0f
21+
.4byte MEScrCmd_crc @ 0x10
2222
gMysteryEventScriptCmdTableEnd::

0 commit comments

Comments
 (0)