fix record mixing merge conflicts

This commit is contained in:
DizzyEggg 2018-05-19 12:32:44 +02:00
commit e44f35c7b7
26 changed files with 1631 additions and 2452 deletions

View File

@ -120,6 +120,8 @@ $(C_BUILDDIR)/agb_flash_mx.o: CFLAGS := -O -mthumb-interwork
$(C_BUILDDIR)/m4a_2.o: CC1 := tools/agbcc/bin/old_agbcc
$(C_BUILDDIR)/m4a_4.o: CC1 := tools/agbcc/bin/old_agbcc
$(C_BUILDDIR)/record_mixing.o: CFLAGS += -ffreestanding
ifeq ($(NODEP),)
$(C_BUILDDIR)/%.o: c_dep = $(shell $(SCANINC) -I include $(C_SUBDIR)/$*.c)
else

View File

@ -795,7 +795,7 @@ sub_80B2A08: @ 80B2A08
ldrh r0, [r0]
cmp r0, 0x4
bne _080B2A38
bl sub_800A064
bl Link_AnyPartnersPlayingRubyOrSapphire
cmp r0, 0
bne _080B2A4A
bl sub_800AC34

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
.set POCKET_ITEMS, 0x01
.set POCKET_POKE_BALLS, 0x02
.set POCKET_TM_HM, 0x03
.set POCKET_BERRIES, 0x04
.set BAG_KEYITEMS, 0x05

View File

@ -1,6 +1,44 @@
#ifndef GUARD_BATTLE_TOWER_H
#define GUARD_BATTLE_TOWER_H
struct RSBattleTowerRecord {
/*0x00*/ u8 battleTowerLevelType; // 0 = level 50, 1 = level 100
/*0x01*/ u8 trainerClass;
/*0x02*/ u16 winStreak;
/*0x04*/ u8 name[8];
/*0x0C*/ u8 trainerId[4];
/*0x10*/ struct {
u16 easyChat[6];
} greeting;
/*0x1C*/ struct UnknownPokemonStruct party[3];
/*0xA0*/ u32 checksum;
/*0xA4*/ u16 unk_11c8;
};
struct EmeraldBattleTowerRecord {
/*0x00*/ u8 battleTowerLevelType; // 0 = level 50, 1 = level 100
/*0x01*/ u8 trainerClass;
/*0x02*/ u16 winStreak;
/*0x04*/ u8 name[8];
/*0x0C*/ u8 trainerId[4];
/*0x10*/ struct {
u16 easyChat[6];
} greeting;
/*0x1C*/ u8 filler_1c[0x18];
/*0x34*/ struct UnknownPokemonStruct party[4];
/*0xe4*/ u8 language;
u8 filler_e5[7];
};
union BattleTowerRecord {
struct RSBattleTowerRecord ruby_sapphire;
struct EmeraldBattleTowerRecord emerald;
};
u16 sub_8164FCC(u8, u8);
void sub_81659DC(union BattleTowerRecord *a0, union BattleTowerRecord *a1);
bool32 sub_816587C(union BattleTowerRecord *, union BattleTowerRecord *);
bool32 sub_8164F70(union BattleTowerRecord *);
void sub_81628A0(union BattleTowerRecord *);
#endif //GUARD_BATTLE_TOWER_H

13
include/cable_club.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef GUARD_CABLE_CLUB_H
#define GUARD_CABLE_CLUB_H
// Exported type declarations
// Exported RAM declarations
// Exported ROM declarations
void sub_80B37D4(TaskFunc taskFunc);
u8 sub_80B3050(void);
#endif //GUARD_CABLE_CLUB_H

View File

@ -9,6 +9,7 @@
void pal_fill_black(void);
bool8 IsWeatherNotFadingIn(void);
void sub_80AF168(void);
void sub_80AF2B4(u8 taskId);
void UpdateWeatherPerDay(u16 days);
void sub_80AC3D0(void);
void sub_80AC3E4(void);

View File

@ -9,6 +9,8 @@
void sub_80FA5E4(s16 id, s16 x, s16 y);
void sub_80FA794(s16 x, s16 y);
void sub_80FB00C(void);
void sub_80FB074(void);
void overworld_poison_effect(void);
bool8 sub_80FADE4(u16, u8);

View File

@ -281,7 +281,8 @@ struct SaveBlock2
/*0xAC*/ u32 encryptionKey;
// TODO: fix and verify labels
/*0xB0*/ u8 field_B0[316];
/*0xB0*/ u8 field_B0[0x2c];
/*0xDC*/ u8 field_0DC[0x110];
/*0x1EC*/ struct BerryCrush berryCrush;
/*0x1FC*/ struct PokemonJumpResults pokeJump;
/*0x20C*/ struct BerryPickingResults berryPick;
@ -642,12 +643,13 @@ struct LilycoveLadyContest
/*0x00e*/ u8 language;
};
typedef union // TODO
typedef union
{
struct LilycoveLadyQuiz quiz;
struct LilycoveLadyFavour favour;
struct LilycoveLadyContest contest;
u8 id;
u8 pad[0x40];
} LilycoveLady;
struct WaldaPhrase

View File

@ -6,7 +6,7 @@ void SetLilycoveLady(void);
void sub_818DA78(void);
void sub_818DEF4(void);
void sub_818E564(void);
void sub_818E570(const struct LilycoveLadyQuiz *quiz);
void sub_818E570(const LilycoveLady *lilycoveLady);
bool8 GivePokeblockToContestLady(struct Pokeblock *pokeblock);
void sub_818E7E0(u8 *dest1, u8 *dest2);
void sub_818E81C(u8 *dest);

View File

@ -293,4 +293,14 @@ extern u32 gFiller_03004138;
extern u32 gFiller_0300413C;
extern u32 gFiller_03003080;
bool32 Link_AnyPartnersPlayingRubyOrSapphire(void);
bool32 sub_800A03C(void);
void sub_8009628(u8);
u8 sub_800AA48(void);
void sub_8009FAC(void);
bool8 sub_800A4D8(u8 a0);
u8 sub_800A9D8(void);
bool8 sub_801048C(u8);
u8 sub_800A0C8(s32, s32);
#endif // GUARD_LINK_H

View File

@ -11,9 +11,16 @@ enum MauvilleOldManType
MAUVILLE_MAN_GIDDY
};
extern struct BardSong gBardSong;
void SetMauvilleOldMan(void);
u8 GetCurrentMauvilleOldMan(void);
extern struct BardSong gBardSong;
void ScrSpecial_SetMauvilleOldManMapObjGfx(void);
u8 sub_81201C8(void);
void sub_8120B70(OldMan *dest);
void sub_8120670(void);
void sub_8120D34(union OldMan * oldMan, u32 r1, u32 r6);
void sub_8120CD0(union OldMan * oldMan, u32 unused, u32 a2);
void ResetMauvilleOldManFlag(void);
#endif // GUARD_MAUVILLE_OLD_MAN_H

View File

@ -6,5 +6,6 @@ bool32 sub_8153884(u32 *a0);
u32 RunMysteryEventScript(u8 *script);
void SetMysteryEventScriptStatus(u32 val);
u16 GetRecordMixingGift(void);
u16 GetRecordMixingGift(void);
#endif // GUARD_MYSTERY_EVENT_SCRIPT_H

26
include/record_mixing.h Normal file
View File

@ -0,0 +1,26 @@
#ifndef GUARD_RECORD_MIXING_H
#define GUARD_RECORD_MIXING_H
// Exported type declarations
struct DayCareMailRecordMixing {
struct MailStruct mail;
u8 OT_name[OT_NAME_LENGTH + 1];
u8 monName[11];
u8 language_maybe:4;
u8 unknown:4;
};
struct UnkStruct_80E7B60 {
struct DayCareMailRecordMixing unk_00[2];
u32 unk_70;
u16 unk_74[2];
}; // size = 0x78
// Exported RAM declarations
// Exported ROM declarations
void sub_80E8260(void *);
#endif //GUARD_RECORD_MIXING_H

View File

@ -90,6 +90,9 @@ u8 sub_8153430(void);
bool8 sub_8153474(void);
u8 Save_LoadGameData(u8 a1);
u16 sub_815355C(void);
u8 sub_81534D0(u8);
u8 sub_8153430(void);
bool8 sub_8153474(void);
u32 TryCopySpecialSaveSection(u8 sector, u8* dst);
u32 sub_8153634(u8 sector, u8* src);
void sub_8153688(u8 taskId);

View File

@ -8,6 +8,8 @@
// Exported ROM declarations
void sub_80E9578(void);
void sub_80E980C(void);
void sub_80EB18C(struct SecretBaseRecord *dest);
void sub_80E9914(void);
u8 *GetSecretBaseMapName(u8 *dest);
const u8 *GetSecretBaseTrainerLoseText(void);
void sub_80E8EE0(struct MapEvents const *events);

View File

@ -110,6 +110,8 @@ extern const u8 gText_MoveCloserToLinkPartner[];
extern const u8 gText_CommErrorCheckConnections[];
extern const u8 gText_ABtnTitleScreen[];
extern const u8 gText_ABtnRegistrationCounter[];
extern const u8 gText_MixingRecords[];
extern const u8 gText_RecordMixingComplete[];
extern const u8 gText_EmptyString2[];
extern const u8 gText_Confirm3[];
extern const u8 gText_Cancel4[];

View File

@ -39,11 +39,13 @@ void sub_80EECC8(void);
void sub_80EECEC(void);
void sub_80F1208(TVShow *shows);
void sub_80EE44C(u8 nMonsCaught, u8 nPkblkUsed);
void sub_80F14F8(TVShow *shows);
size_t sub_80EF370(int value);
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 unused, u8 sheen, u8 language);
void SetPokemonAnglerSpecies(u16 species);
void UpdateTVShowsPerDay(u16 days);
void PutPokemonTodayCaughtOnAir(void);
void TV_PutSecretBaseVisitOnTheAir(void);
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 unused, u8 sheen, u8 language);
void PutBattleUpdateOnTheAir(u8 opponentLinkPlayerId, u16 move, u16 speciesPlayer, u16 speciesOpponent);
void UpdateTVScreensOnMap(int, int);

View File

@ -144,6 +144,7 @@ SECTIONS {
src/naming_screen.o(.text);
src/money.o(.text);
asm/contest_effect.o(.text);
src/record_mixing.o(.text);
asm/record_mixing.o(.text);
src/secret_base.o(.text);
src/tv.o(.text);

View File

@ -151,15 +151,14 @@ extern const u8 gText_Space[];
extern const u8 gText_BlenderMaxSpeedRecord[];
extern const u8 gText_234Players[];
extern void sub_81978B0(u16);
extern void sub_800A418(void);
extern u8 sub_800A9D8(void);
extern bool8 sub_800A4D8(u8);
extern void sub_809882C(u8, u16, u8);
extern void copy_textbox_border_tile_patterns_to_vram(u8, u16, u8);
extern void sub_81AABF0(void (*callback)(void));
extern void sub_800B4C0(void);
extern void ClearLinkCallback(void);
extern void sub_8009F8C(void);
extern void sub_8153430(void);
extern bool8 sub_8153474(void);
extern void sub_80EECEC(void);

View File

@ -801,26 +801,26 @@ void sub_818E564(void)
EnableBothScriptContexts();
}
void sub_818E570(const struct LilycoveLadyQuiz *quiz)
void sub_818E570(const LilycoveLady *lilycoveLady)
{
u8 i;
gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz;
if (quiz->unk_02c < 16 && gUnknown_0203CD68->id == LILYCOVE_LADY_QUIZ)
if (lilycoveLady->quiz.unk_02c < 16 && gUnknown_0203CD68->id == LILYCOVE_LADY_QUIZ)
{
for (i = 0; i < 4; i ++)
{
if (quiz->unk_02c != gUnknown_0203CD68->unk_02b)
if (lilycoveLady->quiz.unk_02c != gUnknown_0203CD68->unk_02b)
{
break;
}
gUnknown_0203CD68->unk_02b = Random() % 16;
}
if (quiz->unk_02c == gUnknown_0203CD68->unk_02b)
if (lilycoveLady->quiz.unk_02c == gUnknown_0203CD68->unk_02b)
{
gUnknown_0203CD68->unk_02b = (gUnknown_0203CD68->unk_02b + 1) % 16;
}
gUnknown_0203CD68->unk_02c = quiz->unk_02c;
gUnknown_0203CD68->unk_02c = lilycoveLady->quiz.unk_02c;
}
}

View File

@ -798,7 +798,7 @@ bool32 sub_800A040(void)
return TRUE;
}
bool32 sub_800A064(void)
bool32 Link_AnyPartnersPlayingRubyOrSapphire(void)
{
if (sub_8009FF8(VERSION_RUBY, VERSION_SAPPHIRE) >= 0)
{

View File

@ -387,7 +387,7 @@ static void ResetStorytellerFlag(void)
Storyteller_ResetFlag();
}
void ResetMauvilleOldManFlag(void) // ResetMauvilleOldManFlag
void ResetMauvilleOldManFlag(void)
{
switch (GetCurrentMauvilleOldMan())
{

File diff suppressed because it is too large Load Diff

View File

@ -487,17 +487,7 @@ gUnknown_02039F90: @ 2039F90
.include "src/naming_screen.o"
.include "src/money.o"
.align 2
gUnknown_02039F9C: @ 2039F9C
.space 0x78
gUnknown_0203A014: @ 203A014
.space 0x4
gUnknown_0203A018: @ 203A018
.space 0x4
.include "src/record_mixing.o"
.include "src/secret_base.o"
.include "src/tv.o"