Merge branch 'master' into shop

This commit is contained in:
Diegoisawesome 2018-10-13 12:55:06 -05:00 committed by GitHub
commit 32fbf67d47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 1378 additions and 2896 deletions

View File

@ -4152,7 +4152,7 @@ _081A1AEA:
cmp r3, r0
blt _081A1AEA
_081A1B00:
bl sub_80F94E8
bl ReducePlayerPartyToThree
pop {r4-r7}
pop {r0}
bx r0
@ -17008,7 +17008,7 @@ _081A87EC:
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gBattleScripting + 0x14
ldr r1, =gPlayerParty - 100
adds r0, r1
ldr r1, =0x00000e12
adds r3, r1

View File

@ -3475,7 +3475,7 @@ _08163FCC:
adds r1, r0, 0
movs r0, 0x64
muls r0, r1
ldr r1, =gBattleScripting + 0x14
ldr r1, =gPlayerParty - 100
adds r0, r1
movs r1, 0x2C
muls r1, r4

File diff suppressed because it is too large Load Diff

View File

@ -1606,8 +1606,8 @@ _080F94D6:
.pool
thumb_func_end sub_80F94B8
thumb_func_start sub_80F94E8
sub_80F94E8: @ 80F94E8
thumb_func_start ReducePlayerPartyToThree
ReducePlayerPartyToThree: @ 80F94E8
push {r4-r7,lr}
sub sp, 0x198
add r0, sp, 0x190
@ -1662,6 +1662,6 @@ _080F9538:
pop {r0}
bx r0
.pool
thumb_func_end sub_80F94E8
thumb_func_end ReducePlayerPartyToThree
.align 2, 0 @ Don't pad with nop.

View File

@ -1141,8 +1141,8 @@ _080C308C:
.pool
thumb_func_end sub_80C3020
thumb_func_start sub_80C30A4
sub_80C30A4: @ 80C30A4
thumb_func_start TrainerCard_GenerateCardForPlayer
TrainerCard_GenerateCardForPlayer: @ 80C30A4
push {r4,lr}
adds r4, r0, 0
movs r1, 0
@ -1197,7 +1197,7 @@ _080C3108:
pop {r0}
bx r0
.pool
thumb_func_end sub_80C30A4
thumb_func_end TrainerCard_GenerateCardForPlayer
thumb_func_start sub_80C3120
sub_80C3120: @ 80C3120
@ -4558,8 +4558,8 @@ _080C4E44:
.pool
thumb_func_end sub_80C4DDC
thumb_func_start sub_80C4E74
sub_80C4E74: @ 80C4E74
thumb_func_start TrainerCard_ShowLinkCard
TrainerCard_ShowLinkCard: @ 80C4E74
push {r4-r6,lr}
adds r4, r0, 0
adds r6, r1, 0
@ -4600,7 +4600,7 @@ sub_80C4E74: @ 80C4E74
pop {r0}
bx r0
.pool
thumb_func_end sub_80C4E74
thumb_func_end TrainerCard_ShowLinkCard
thumb_func_start sub_80C4EE4
sub_80C4EE4: @ 80C4EE4

View File

@ -1,16 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2, 0
.align 2
gUnknown_08550594:: @ 8550594
window_template 0x00, 0x10, 0x0b, 0x0b, 0x02, 0x0f, 0x0125
.align 2
gUnknown_0855059C:: @ 855059C
.4byte gText_BronzeCard
.4byte gText_CopperCard
.4byte gText_SilverCard
.4byte gText_GoldCard

View File

@ -929,7 +929,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F2B7:: @ 823F2B7
BattleFrontier_BattleTowerLobby_EventScript_23F2C5:: @ 823F2C5
setvar VAR_0x8004, 9
message OldaleTown_PokemonCenter_2F_Text_278091
message gText_PleaseWaitForLink
waitmessage
setvar VAR_0x8005, 0
special sub_80B2DA4

View File

@ -260,7 +260,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_22400C:: @ 822400C
goto MossdeepCity_SpaceCenter_2F_EventScript_223FDA
MossdeepCity_SpaceCenter_2F_EventScript_224032:: @ 8224032
special sub_80F94E8
special ReducePlayerPartyToThree
setvar VAR_0x8004, 2
setvar VAR_0x8005, 4
special sub_81A1780

View File

@ -106,7 +106,7 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_227A58:: @ 8227A58
compare VAR_RESULT, 0
goto_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_227AE2
special SavePlayerParty
special sub_80F94E8
special ReducePlayerPartyToThree
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_227D21, 4
closemessage
compare VAR_FACING, 2

View File

@ -430,7 +430,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276F60:: @ 8276F60
call OldaleTown_PokemonCenter_2F_EventScript_27134F
compare VAR_RESULT, 0
goto_eq OldaleTown_PokemonCenter_2F_EventScript_2772EC
message OldaleTown_PokemonCenter_2F_Text_278091
message gText_PleaseWaitForLink
waitmessage
special sub_80B2DA4
waitstate
@ -532,7 +532,7 @@ OldaleTown_PokemonCenter_2F_EventScript_2770B2:: @ 82770B2
call OldaleTown_PokemonCenter_2F_EventScript_27134F
compare VAR_RESULT, 0
goto_eq OldaleTown_PokemonCenter_2F_EventScript_2772EC
message OldaleTown_PokemonCenter_2F_Text_278091
message gText_PleaseWaitForLink
waitmessage
special sub_80B2E4C
waitstate
@ -607,7 +607,7 @@ OldaleTown_PokemonCenter_2F_EventScript_2771DB:: @ 82771DB
call OldaleTown_PokemonCenter_2F_EventScript_27134F
compare VAR_RESULT, 0
goto_eq OldaleTown_PokemonCenter_2F_EventScript_2772EC
message OldaleTown_PokemonCenter_2F_Text_278091
message gText_PleaseWaitForLink
waitmessage
special sub_80B2E74
waitstate
@ -1675,21 +1675,21 @@ OldaleTown_PokemonCenter_2F_Text_278061: @ 8278061
.string "A POKéMON holding the {STR_VAR_1}\n"
.string "BERRY cant be traded.$"
OldaleTown_PokemonCenter_2F_Text_278091:: @ 8278091
gText_PleaseWaitForLink:: @ 8278091
.string "Please wait.\n"
.string "… … B Button: Cancel$"
OldaleTown_PokemonCenter_2F_Text_2780B3:: @ 82780B3
gText_ConfirmLinkWhenPlayersReady:: @ 82780B3
.string "When all players are ready…\n"
.string "A Button: Confirm\l"
.string "B Button: Cancel$"
OldaleTown_PokemonCenter_2F_Text_2780F2:: @ 82780F2
gText_ConfirmStartLinkWithXPlayers:: @ 82780F2
.string "Start link with {STR_VAR_1} players.\n"
.string "A Button: Confirm\l"
.string "B Button: Cancel$"
OldaleTown_PokemonCenter_2F_Text_278131:: @ 8278131
gText_AwaitingLinkup:: @ 8278131
.string "Awaiting linkup…\n"
.string "… … B Button: Cancel$"

View File

@ -259,7 +259,7 @@ gSpecials:: @ 81DBA64
def_special sub_80F9490
def_special ValidateEReaderTrainer
def_special GetBestBattleTowerStreak
def_special sub_80F94E8
def_special ReducePlayerPartyToThree
def_special BedroomPC
def_special PlayerPC
def_special FieldShowRegionMap

View File

@ -14,5 +14,6 @@ u8 sub_80B3050(void);
void sub_80B360C(void);
bool32 sub_80B2AF4(u16 *arg0, u16 *arg1);
void sub_80B3AF8(u8 taskId);
void task00_08081A90(u8 taskId);
#endif //GUARD_CABLE_CLUB_H

View File

@ -1,10 +1,20 @@
#ifndef GUARD_FIELD_MESSAGE_BOX_H
#define GUARD_FIELD_MESSAGE_BOX_H
enum
{
FIELD_MESSAGE_BOX_HIDDEN,
FIELD_MESSAGE_BOX_UNUSED,
FIELD_MESSAGE_BOX_NORMAL,
FIELD_MESSAGE_BOX_AUTO_SCROLL,
};
bool8 ShowFieldMessage(const u8 *message);
bool8 sub_8098238(const u8 *message);
bool8 ShowFieldAutoScrollMessage(const u8 *message);
void HideFieldMessageBox(void);
bool8 IsFieldMessageBoxHidden(void);
u8 GetFieldMessageBoxMode(void);
void sub_8098374(void);
#endif // GUARD_FIELD_MESSAGE_BOX_H

View File

@ -5,5 +5,6 @@ u8 GetLeadMonIndex(void);
u8 sub_813B260(void);
u16 get_unknown_box_id(void);
bool8 InMultiBattleRoom(void);
void sub_813BF10(void);
#endif // GUARD_FIELD_SPECIALS_H

View File

@ -97,7 +97,8 @@ enum
EXCHANGE_IN_PROGRESS,
EXCHANGE_STAT_4,
EXCHANGE_STAT_5,
EXCHANGE_STAT_6
EXCHANGE_STAT_6,
EXCHANGE_STAT_7
};
enum
@ -258,6 +259,8 @@ void sub_800AF18(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, u8 un
void sub_800B348(void);
void sub_800B3A4(u32 who);
bool32 sub_800A07C(void);
void sub_800AB98(void);
void sub_800AA04(u8 a0);
extern u16 gLinkPartnersHeldKeys[6];
extern u32 gLinkDebugSeed;
@ -292,6 +295,7 @@ extern u32 gFiller_0300315c;
extern u32 gFiller_03004138;
extern u32 gFiller_0300413C;
extern u32 gFiller_03003080;
extern struct LinkPlayer gLocalLinkPlayer;
bool32 Link_AnyPartnersPlayingRubyOrSapphire(void);
bool32 sub_800A03C(void);
@ -302,5 +306,10 @@ bool8 sub_800A4D8(u8 a0);
u8 sub_800A9D8(void);
u8 sub_800A0C8(s32, s32);
u16 *sub_801B058(void);
u8 sub_800A9A8(void);
void sub_800AD10(void);
void sub_800AB18(void);
void sub_8009F18(void);
bool8 sub_800AA60(void);
#endif // GUARD_LINK_H

View File

@ -87,5 +87,6 @@ void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left
void sub_8199C30(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette);
void sub_8199D3C(void *ptr, int delta, int width, int height, bool32 is8BPP);
void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyToVram);
void sub_8197AE8(bool8 copyToVram);
#endif // GUARD_MENU_H

View File

@ -25,6 +25,9 @@ extern u16 *gBGTilemapBuffers3;
extern void (*gFieldCallback)(void);
extern u8 gUnknown_03005DB4;
extern u8 gFieldLinkPlayerCount;
// Exported ROM declarations
extern const struct UCoords32 gDirectionToVectors[];

View File

@ -9,5 +9,7 @@
void sub_8018438(void);
u16 mevent_081445C0(u8);
void sub_801B990(u32, u32);
u8 sub_8013F78(void);
#endif //GUARD_rom_8011DC0_H

View File

@ -3,5 +3,6 @@
#define GUARD_SCRIPT_POKEMON_UTIL_80F87D8_H
u16 sub_80F903C(void);
void ReducePlayerPartyToThree(void);
#endif // GUARD_SCRIPT_POKEMON_UTIL_80F87D8_H

View File

@ -841,6 +841,16 @@ extern const u8 gText_TwoDashes[];
extern const u8 *const gReturnToXStringsTable2[];
extern const u8 gText_XPLink[];
extern const u8 gText_ConfirmLinkWhenPlayersReady[];
extern const u8 gText_ConfirmStartLinkWithXPlayers[];
extern const u8 gText_AwaitingLinkup[];
extern const u8 gText_PleaseWaitForLink[];
extern const u8 gText_BronzeCard[];
extern const u8 gText_CopperCard[];
extern const u8 gText_SilverCard[];
extern const u8 gText_GoldCard[];
extern const u8 gText_CanIHelpWithAnythingElse[];
extern const u8 gText_AnythingElseICanHelp[];
extern const u8 gText_QuitShopping[];

View File

@ -27,13 +27,16 @@ struct TrainerCard
/*0x24*/ u32 money;
/*0x28*/ u16 var_28[4];
/*0x30*/ u8 playerName[8];
/*0x38*/ u8 emeraldAddedUnknownFields[0x64-0x38];
/*0x38*/ u8 emeraldAddedUnknownFields[0x54-0x38];
/*0x54*/ u16 monSpecies[2];
/*0x58*/ u8 emeraldAddedUnknownFields2[0x64-0x58];
};
extern struct TrainerCard gTrainerCards[4];
void sub_80C3120(struct TrainerCard *arg0, u16 *arg1, u8 gameVersion);
void sub_80C4E74(u8 arg0, void (*callback)(void));
void sub_80C30A4(u16 *arg0);
void TrainerCard_ShowLinkCard(u8 arg0, void (*callback)(void));
void TrainerCard_GenerateCardForPlayer(struct TrainerCard *);
u8 sub_80C4904(u8);
#endif // GUARD_TRAINER_CARD_H

View File

@ -118,7 +118,7 @@ SECTIONS {
src/title_screen.o(.text);
asm/field_screen.o(.text);
src/battle_setup.o(.text);
asm/cable_club.o(.text);
src/cable_club.o(.text);
src/trainer_see.o(.text);
src/wild_encounter.o(.text);
src/field_effect.o(.text);
@ -428,7 +428,7 @@ SECTIONS {
src/title_screen.o(.rodata);
data/field_screen.o(.rodata);
src/battle_setup.o(.rodata);
data/cable_club.o(.rodata);
src/cable_club.o(.rodata);
src/trainer_see.o(.rodata);
src/wild_encounter.o(.rodata);
src/field_effect.o(.rodata);

View File

@ -1,6 +1,7 @@
#include "global.h"
#include "battle.h"
#include "battle_controllers.h"
#include "cable_club.h"
#include "link.h"
#include "task.h"
#include "battle_ai_script_commands.h"
@ -18,7 +19,6 @@ extern u8 gUnknown_02022D0A;
static EWRAM_DATA u8 sBattleBuffersTransferData[0x100] = {};
extern void task00_08081A90(u8 taskId); // cable_club
extern void sub_81B8D64(u8 battlerId, u8 arg1); // party_menu
// this file's funcionts

View File

@ -68,7 +68,7 @@ extern bool8 sub_81A3610(void);
extern u16 sub_81A4FF0(u8);
extern u8 GetFrontierTrainerFrontSpriteId(u16);
extern u8 GetFrontierOpponentClass(u16);
extern void sub_80F94E8(void);
extern void ReducePlayerPartyToThree(void);
extern u8 gUnknown_0203CEF8[];
extern u16 gBattle_BG0_X;
@ -6132,7 +6132,7 @@ static void sub_8194E44(void)
static void sub_8194EB4(void)
{
sub_80F94E8();
ReducePlayerPartyToThree();
}
static void sub_8194EC0(void)

1299
src/cable_club.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -131,7 +131,7 @@ void HideFieldMessageBox(void)
gUnknown_020375BC = 0;
}
u8 textbox_any_visible(void)
u8 GetFieldMessageBoxMode(void)
{
return gUnknown_020375BC;
}

View File

@ -151,7 +151,7 @@ static void CB2_MysteryEventMenu(void)
if (!IsTextPrinterActive(0))
{
gMain.state++;
gLinkType = 21761;
gLinkType = 0x5501;
OpenLink();
}
break;

View File

@ -1609,7 +1609,7 @@ void sub_80141A4(void)
break;
case 1:
if (!FuncIsActiveTask(sub_80140E0))
sub_80C4E74(GetMultiplayerId() ^ 1, CB2_ReturnToField);
TrainerCard_ShowLinkCard(GetMultiplayerId() ^ 1, CB2_ReturnToField);
break;
}
@ -1675,7 +1675,7 @@ void sub_80143E4(void *arg0, bool32 arg1)
{
u16 *argAsU16Ptr = arg0;
sub_80C30A4(argAsU16Ptr);
TrainerCard_GenerateCardForPlayer((struct TrainerCard *)argAsU16Ptr);
if (arg1)
argAsU16Ptr[48] = sub_801B39C();
else

View File

@ -88,7 +88,7 @@ extern void CB2_PartyMenuFromStartMenu(void);
extern void CB2_PokeNav(void);
extern void sub_80C4DDC(void (*)(void));
extern void sub_80C51C4(void (*)(void));
extern void sub_80C4E74(u8, void (*)(void));
extern void TrainerCard_ShowLinkCard(u8, void (*)(void));
extern void ScriptUnfreezeEventObjects(void);
extern void sub_81A9EC8(void);
extern void save_serialize_map(void);
@ -750,7 +750,7 @@ static bool8 StartMenuLinkModePlayerNameCallback(void)
{
play_some_sound();
overworld_free_bg_tilemaps();
sub_80C4E74(gUnknown_03005DB4, CB2_ReturnToFieldWithOpenMenu);
TrainerCard_ShowLinkCard(gUnknown_03005DB4, CB2_ReturnToFieldWithOpenMenu);
return TRUE;
}