Skip to content

Commit

Permalink
Merge branch 'porymap-6' of https://github.com/pret/pokeemerald into …
Browse files Browse the repository at this point in the history
…heal-locations-json
  • Loading branch information
GriffinRichards committed Oct 11, 2024
2 parents 45b17dd + af8f4bf commit a83e9d1
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 47 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ jobs:
repository: pret/agbcc

- name: Install binutils
run: sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
# build-essential, git, and libpng-dev are already installed
run: |
sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi libpng-dev
# build-essential and git are already installed
# gcc-arm-none-eabi is only needed for the modern build
# as an alternative to dkP

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ prefabs.json
*.diff
*.sym
*.js
/pokeemerald-*.png
/pokeemerald_modern-*.png
1 change: 1 addition & 0 deletions common_syms/ereader_screen.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
gUnknownSpace
gEReaderData
6 changes: 5 additions & 1 deletion src/cable_car.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,12 @@ static void CreateCableCarSprites(void)
// 1/64 chance for an NPC to appear hiking on the ground below the Cable Car
if ((rval % 64) == 0)
{
// Unclear if this was intentional, but the - 1 in the below ARRAY_COUNT means the Zigzagoon is never used
// BUGFIX: The - 1 in the below ARRAY_COUNT means the Zigzagoon is never used
#ifdef BUGFIX
spriteId = CreateObjectGraphicsSprite(hikerGraphicsIds[rval % ARRAY_COUNT(hikerGraphicsIds)], hikerCallbacks[GOING_DOWN], hikerCoords[GOING_DOWN][0], hikerCoords[GOING_DOWN][1], 106);
#else
spriteId = CreateObjectGraphicsSprite(hikerGraphicsIds[rval % (ARRAY_COUNT(hikerGraphicsIds) - 1)], hikerCallbacks[GOING_DOWN], hikerCoords[GOING_DOWN][0], hikerCoords[GOING_DOWN][1], 106);
#endif
if (spriteId != MAX_SPRITES)
{
gSprites[spriteId].oam.priority = 2;
Expand Down
3 changes: 3 additions & 0 deletions src/ereader_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ struct EReaderData

static void Task_EReader(u8);

// This belongs in COMMON somewhere between party_menu and ereader_screen, but it's unused so it's unclear where.
UNUSED u8 gUnknownSpace[64];

struct EReaderData gEReaderData;

extern const u8 gMultiBootProgram_EReader_Start[];
Expand Down
4 changes: 4 additions & 0 deletions src/field_poison.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ static void Task_TryFieldPoisonWhiteOut(u8 taskId)
if (AllMonsFainted())
{
// Battle facilities have their own white out script to handle the challenge loss
#ifdef BUGFIX
if (InBattlePyramid() || InBattlePike() || InTrainerHillChallenge())
#else
if (InBattlePyramid() | InBattlePike() || InTrainerHillChallenge())
#endif
gSpecialVar_Result = FLDPSN_FRONTIER_WHITEOUT;
else
gSpecialVar_Result = FLDPSN_WHITEOUT;
Expand Down
12 changes: 9 additions & 3 deletions src/intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ extern const struct CompressedSpriteSheet gBattleAnimPicTable[];
extern const struct CompressedSpritePalette gBattleAnimPaletteTable[];
extern const struct SpriteTemplate gAncientPowerRockSpriteTemplate[];

enum {
COPYRIGHT_INITIALIZE,
COPYRIGHT_START_FADE = 140,
COPYRIGHT_START_INTRO,
};

#define TAG_VOLBEAT 1500
#define TAG_TORCHIC 1501
#define TAG_MANECTRIC 1502
Expand Down Expand Up @@ -1067,7 +1073,7 @@ static u8 SetUpCopyrightScreen(void)
{
switch (gMain.state)
{
case 0:
case COPYRIGHT_INITIALIZE:
SetVBlankCallback(NULL);
SetGpuReg(REG_OFFSET_BLDCNT, 0);
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
Expand Down Expand Up @@ -1101,15 +1107,15 @@ static u8 SetUpCopyrightScreen(void)
gMain.state++;
GameCubeMultiBoot_Main(&gMultibootProgramStruct);
break;
case 140:
case COPYRIGHT_START_FADE:
GameCubeMultiBoot_Main(&gMultibootProgramStruct);
if (gMultibootProgramStruct.gcmb_field_2 != 1)
{
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
gMain.state++;
}
break;
case 141:
case COPYRIGHT_START_INTRO:
if (UpdatePaletteFade())
break;
CreateTask(Task_Scene1_Load, 0);
Expand Down
48 changes: 7 additions & 41 deletions sym_common.txt
Original file line number Diff line number Diff line change
@@ -1,37 +1,10 @@
.space 0x8
.include "main.o"
@ ../src/bg.o
.align 2
gWindowTileAutoAllocEnabled:
.space 4
@ ../src/window.o
.align 4
gTransparentTileNumber:
.space 1
.align 4
gWindowBgTilemapBuffers:
.space 16
@ ../src/text.o
.align 4
gFonts:
.space 4
.align 2
gDisableTextPrinters:
.space 1
.align 4
gCurGlyph:
.space 132
.align 2
gTextFlags:
.space 4
@ ../src/sprite.o
.align 2
gOamMatrixAllocBitmap:
.space 4
.align 2
gReservedSpritePaletteCount:
.space 1
.include "main.o"
.include "bg.o"
.align 4
.include "window.o"
.include "text.o"
.include "sprite.o"
.include "link.o"
.include "AgbRfu_LinkManager.o"
.include "link_rfu_2.o"
Expand All @@ -53,9 +26,7 @@ gReservedSpritePaletteCount:
.include "tv.o"
.include "mauville_old_man.o"
.include "image_processing_effects.o"

.space 0x4

.align 4
.include "contest_painting.o"
.include "field_specials.o"
.include "evolution_scene.o"
Expand All @@ -66,14 +37,9 @@ gReservedSpritePaletteCount:
.include "battle_anim_throw.o"
.include "battle_factory_screen.o"
.include "apprentice.o"

.space 0x8

.align 4
.include "list_menu.o"
.include "party_menu.o"

.space 0x44

.include "ereader_screen.o"
.include "m4a.o"
.include "agb_flash.o"
Expand Down

0 comments on commit a83e9d1

Please sign in to comment.