pokemon_jump_3,4
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -3,149 +3,6 @@
|
||||
|
||||
.section .rodata
|
||||
|
||||
gUnknown_846B794:: @ 846B794 gbapal
|
||||
.incbin "graphics/link_games/unk_846B794.gbapal"
|
||||
|
||||
gUnknown_846B7B4:: @ 846B7B4 gbapal
|
||||
.incbin "graphics/link_games/unk_846B7B4.gbapal"
|
||||
|
||||
gUnknown_846B7D4:: @ 846B7D4 4bpp.lz
|
||||
.incbin "graphics/link_games/unk_846B7D4.4bpp.lz"
|
||||
|
||||
gUnknown_846BA00:: @ 846BA00 bin.lz
|
||||
.incbin "graphics/link_games/unk_846BA00.bin.lz"
|
||||
|
||||
gUnknown_846BBB0:: @ 846BBB0 gbapal
|
||||
.incbin "graphics/link_games/unk_846BBB0.gbapal"
|
||||
|
||||
gUnknown_846BBD0:: @ 846BBD0 4bpp.lz
|
||||
.incbin "graphics/link_games/unk_846BBD0.4bpp.lz"
|
||||
|
||||
gUnknown_846C520:: @ 846C520 bin.lz
|
||||
.incbin "graphics/link_games/unk_846C520.bin.lz"
|
||||
|
||||
gUnknown_846C8D8:: @ 846C8D8 gbapal
|
||||
.incbin "graphics/link_games/unk_846C8D8.gbapal"
|
||||
|
||||
gUnknown_846C8F8:: @ 846C8F8 4bpp.lz
|
||||
.incbin "graphics/link_games/unk_846C8F8.4bpp.lz"
|
||||
|
||||
gUnknown_846D3A8:: @ 846D3A8 bin.lz
|
||||
.incbin "graphics/link_games/unk_846D3A8.bin.lz"
|
||||
|
||||
gUnknown_846D8D4:: @ 846D8D4
|
||||
.4byte 0x000001b0
|
||||
@ {
|
||||
@ .bg = 0,
|
||||
@ .charBaseIndex = 0,
|
||||
@ .mapBaseIndex = 27,
|
||||
@ .screenSize = 0,
|
||||
@ .paletteMode = 0,
|
||||
@ .priority = 0,
|
||||
@ .baseTile = 0x0000
|
||||
@ }
|
||||
.4byte 0x000025e6
|
||||
@ {
|
||||
@ .bg = 2,
|
||||
@ .charBaseIndex = 1,
|
||||
@ .mapBaseIndex = 30,
|
||||
@ .screenSize = 2,
|
||||
@ .paletteMode = 0,
|
||||
@ .priority = 2,
|
||||
@ .baseTile = 0x0000
|
||||
@ }
|
||||
.4byte 0x000016c9
|
||||
@ {
|
||||
@ .bg = 1,
|
||||
@ .charBaseIndex = 2,
|
||||
@ .mapBaseIndex = 12,
|
||||
@ .screenSize = 3,
|
||||
@ .paletteMode = 0,
|
||||
@ .priority = 1,
|
||||
@ .baseTile = 0x0000
|
||||
@ }
|
||||
.4byte 0x000031df
|
||||
@ {
|
||||
@ .bg = 3,
|
||||
@ .charBaseIndex = 3,
|
||||
@ .mapBaseIndex = 29,
|
||||
@ .screenSize = 0,
|
||||
@ .paletteMode = 0,
|
||||
@ .priority = 3,
|
||||
@ .baseTile = 0x0000
|
||||
@ }
|
||||
|
||||
gUnknown_846D8E4:: @ 846D8E4
|
||||
.byte 0, 19, 0, 6, 2, 2
|
||||
.2byte 0x0013
|
||||
.byte 0, 8, 0, 6, 2, 2
|
||||
.2byte 0x001f
|
||||
.byte 255, 0, 0, 0, 0, 0
|
||||
.2byte 0x0000
|
||||
|
||||
gUnknown_846D8FC:: @ 846D8FC
|
||||
.4byte 0, sub_8149DC8
|
||||
.4byte 1, sub_8149F64
|
||||
.4byte 2, sub_8149FD0
|
||||
.4byte 3, sub_814A03C
|
||||
.4byte 4, sub_814A0C8
|
||||
.4byte 5, sub_814A174
|
||||
.4byte 6, sub_814A218
|
||||
.4byte 7, sub_814A264
|
||||
.4byte 9, sub_814A3AC
|
||||
.4byte 8, sub_814A308
|
||||
|
||||
gUnknown_846D94C:: @ 846D94C
|
||||
.string "IES$"
|
||||
|
||||
gUnknown_846D950:: @ 846D950
|
||||
.byte 0x00, 0x02, 0x03
|
||||
|
||||
gUnknown_846D953:: @ 846D953
|
||||
.byte 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00
|
||||
|
||||
gUnknown_846D960:: @ 846D960
|
||||
obj_tiles gUnknown_8479688, 0, 800
|
||||
|
||||
gUnknown_846D968:: @ 846D968
|
||||
obj_pal gUnknown_8479668, 800
|
||||
|
||||
gUnknown_846D970::
|
||||
.2byte 0x0006, 0x0008, 0x0010, 0x0008
|
||||
|
||||
gUnknown_846D978::
|
||||
.2byte 0x0006, 0x0008, 0x000b, 0x0006, 0x0010, 0x0008
|
||||
|
||||
gUnknown_846D984::
|
||||
.2byte 0x0002, 0x0006, 0x0006, 0x0008, 0x0010, 0x0008, 0x0014, 0x0006
|
||||
|
||||
gUnknown_846D994::
|
||||
.2byte 0x0002, 0x0006, 0x0006, 0x0008, 0x000b, 0x0006, 0x0010, 0x0008, 0x0014, 0x0006
|
||||
|
||||
gUnknown_846D9A8:: @ 846D9A8
|
||||
.4byte gUnknown_846D970
|
||||
.4byte gUnknown_846D978
|
||||
.4byte gUnknown_846D984
|
||||
.4byte gUnknown_846D994
|
||||
|
||||
gUnknown_846D9B8::
|
||||
.2byte 0x0058, 0x0098
|
||||
|
||||
gUnknown_846D9BC::
|
||||
.2byte 0x0058, 0x0078, 0x0098
|
||||
|
||||
gUnknown_846D9C2::
|
||||
.2byte 0x0038, 0x0058, 0x0098, 0x00b8
|
||||
|
||||
gUnknown_846D9CA::
|
||||
.2byte 0x0038, 0x0058, 0x0078, 0x0098, 0x00b8
|
||||
|
||||
gUnknown_846D9D4:: @ 846D9D4
|
||||
.4byte gUnknown_846D9B8
|
||||
.4byte gUnknown_846D9BC
|
||||
.4byte gUnknown_846D9C2
|
||||
.4byte gUnknown_846D9CA
|
||||
|
||||
gUnknown_846D9E4:: @ gbapal
|
||||
.incbin "graphics/link_games/unk_846D9E4.gbapal"
|
||||
|
||||
|
||||
+9
-9
@@ -3289,10 +3289,10 @@ gString_Help:: @ 841CB49
|
||||
gString_HelpSystem_ClearTo8:: @ 841CB4E
|
||||
.string "{CLEAR_TO 8}$"
|
||||
|
||||
gUnknown_841CB52:: @ 841CB52
|
||||
gText_SpacePoints2:: @ 841CB52
|
||||
.string " points$"
|
||||
|
||||
gUnknown_841CB5A:: @ 841CB5A
|
||||
gText_SpaceTimes3:: @ 841CB5A
|
||||
.string " time(s)$"
|
||||
|
||||
gUnknown_841CB63:: @ 841CB63
|
||||
@@ -3307,28 +3307,28 @@ gUnknown_841CB88::
|
||||
gUnknown_841CB94::
|
||||
.string "EXCELLENTS in a row:$"
|
||||
|
||||
gUnknown_841CBA9:: @ 841CBA9
|
||||
gText_AwesomeWonF701F700:: @ 841CBA9
|
||||
.string "Awesome score! You've\n"
|
||||
.string "won {DYNAMIC 01} {DYNAMIC 00}!$"
|
||||
|
||||
gUnknown_841CBCA:: @ 841CBCA
|
||||
gText_FilledStorageSpace2:: @ 841CBCA
|
||||
.string "There's no room left now.$"
|
||||
|
||||
gUnknown_841CBE4:: @ 841CBE4
|
||||
gText_CantHoldMore:: @ 841CBE4
|
||||
.string "You can't hold any more!$"
|
||||
|
||||
gUnknown_841CBFD:: @ 841CBFD
|
||||
gText_WantToPlayAgain2:: @ 841CBFD
|
||||
.string "Want to play again?$"
|
||||
|
||||
gUnknown_841CC11:: @ 841CC11
|
||||
gText_SomeoneDroppedOut2:: @ 841CC11
|
||||
.string "Somebody dropped out.\n"
|
||||
.string "The link will be canceled.$"
|
||||
|
||||
gUnknown_841CC42:: @ 841CC42
|
||||
gText_SavingDontTurnOffPower:: @ 841CC42
|
||||
.string "SAVING…\n"
|
||||
.string "DON'T TURN OFF THE POWER.$"
|
||||
|
||||
gUnknown_841CC64:: @ 841CC64
|
||||
gText_CommunicationStandby4:: @ 841CC64
|
||||
.string "Communication standby…$"
|
||||
|
||||
.string "SAVING...\n"
|
||||
|
||||
|
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 582 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -15,6 +15,11 @@ struct DigitObjUtilTemplate
|
||||
const struct SpritePalette *spritePal;
|
||||
};
|
||||
|
||||
extern const u16 gUnknown_8479668[];
|
||||
extern const u32 gUnknown_8479688[];
|
||||
extern const u32 gUnknown_8479748[];
|
||||
|
||||
bool32 DigitObjUtil_Init(u32 count);
|
||||
void DigitObjUtil_Teardown(void);
|
||||
bool32 DigitObjUtil_CreatePrinter(u32 id, s32 num, const struct DigitObjUtilTemplate *template);
|
||||
void DigitObjUtil_PrintNumOn(u32 id, s32 num);
|
||||
|
||||
+37
-1
@@ -138,7 +138,6 @@ u8 *sub_81499E0(u8 multiplayerId);
|
||||
|
||||
void sub_814A95C(int id);
|
||||
void sub_8149CEC(struct PokemonJump2 *);
|
||||
void sub_802D0BC(struct PokemonJump2 *);
|
||||
void sub_8149D24(void);
|
||||
void sub_8149D40(int);
|
||||
bool32 sub_8149D68(void);
|
||||
@@ -172,4 +171,41 @@ bool32 sub_8149C90(struct PokemonJump1_82E4 *arg0, int multiplayerId);
|
||||
bool32 sub_814B494(u32 jumpScore, u16 jumpsInRow, u16 excellentsInRow);
|
||||
void sub_814B4E8(void);
|
||||
|
||||
void sub_814AD6C(struct PokemonJump2 *);
|
||||
void sub_814B294(struct PokemonJump2 *);
|
||||
void sub_814B43C(struct PokemonJump2 *);
|
||||
bool32 sub_814B460(void);
|
||||
void sub_814B348(struct PokemonJump2 *, int);
|
||||
void sub_814AF0C(struct PokemonJump2 *, int);
|
||||
void sub_814ADCC(struct PokemonJump2 *, struct PokemonJump1_MonInfo *,s16, s16, u8);
|
||||
void sub_814B240(struct PokemonJump2 *,s16, s16, u8);
|
||||
void sub_814AFE8(struct PokemonJump2 *, u8 multiplayerId);
|
||||
void sub_814B080(struct PokemonJump2 *, u8 multiplayerId);
|
||||
int sub_814B010(struct PokemonJump2 *, int multiplayerId);
|
||||
void sub_814B0A8(struct PokemonJump2 *);
|
||||
void sub_814B134(struct PokemonJump2 *);
|
||||
void sub_814B168(struct PokemonJump2 *, int multiplayerId);
|
||||
int sub_814B190(struct PokemonJump2 *);
|
||||
|
||||
bool32 sub_802EC98(u8 spriteId);
|
||||
bool32 sub_802EE30(u8 spriteId);
|
||||
u8 sub_802EFA8(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority);
|
||||
void Task_ShowPokemonJumpRecords(u8 taskId);
|
||||
void TruncateToFirstWordOnly(u8 *str);
|
||||
void sub_802CB7C(struct Sprite *sprite);
|
||||
void sub_802CC40(struct Sprite *sprite);
|
||||
void sub_802CD08(struct Sprite *sprite);
|
||||
void sub_802CDD4(struct Sprite *sprite);
|
||||
void sub_802E500(u16 windowId, int width);
|
||||
void sub_802E6D0(u8 taskId);
|
||||
void sub_802E83C(u8 taskId);
|
||||
void sub_802E8C8(u8 taskId);
|
||||
void sub_802EA50(u8 taskId);
|
||||
void sub_802EAB0(u8 taskId);
|
||||
void sub_802EB98(u8 taskId);
|
||||
void sub_802EDCC(u8 spriteId1, u8 spriteId2, u8 spriteId3);
|
||||
void sub_802EE5C(struct Sprite *sprite);
|
||||
void sub_802EF50(u16 tileTag, u16 palTag);
|
||||
void sub_802EFFC(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority, s16 *spriteId1, s16 *spriteId2);
|
||||
|
||||
#endif // GUARD_POKEMON_JUMP_H
|
||||
|
||||
@@ -1126,4 +1126,15 @@ extern const u8 gJPText_NewTrainerHasComeToSevii[];
|
||||
extern const u8 gJPText_PleaseWaitAMoment[];
|
||||
extern const u8 gJPText_WriteErrorUnableToSaveData[];
|
||||
|
||||
// pokemon_jump
|
||||
extern const u8 gText_WantToPlayAgain2[];
|
||||
extern const u8 gText_SavingDontTurnOffPower[];
|
||||
extern const u8 gText_SomeoneDroppedOut2[];
|
||||
extern const u8 gText_CommunicationStandby4[];
|
||||
extern const u8 gText_AwesomeWonF701F700[];
|
||||
extern const u8 gText_FilledStorageSpace2[];
|
||||
extern const u8 gText_CantHoldMore[];
|
||||
extern const u8 gText_SpacePoints2[];
|
||||
extern const u8 gText_SpaceTimes3[];
|
||||
|
||||
#endif //GUARD_STRINGS_H
|
||||
|
||||
@@ -276,6 +276,8 @@ SECTIONS {
|
||||
src/seagallop.o(.text);
|
||||
src/pokemon_jump.o(.text);
|
||||
src/pokemon_jump_2.o(.text);
|
||||
src/pokemon_jump_3.o(.text);
|
||||
src/pokemon_jump_4.o(.text);
|
||||
asm/pokemon_jump_2.o(.text);
|
||||
asm/berry_crush.o(.text);
|
||||
asm/berry_crush_2.o(.text);
|
||||
@@ -568,6 +570,7 @@ SECTIONS {
|
||||
src/seagallop.o(.rodata);
|
||||
src/pokemon_jump.o(.rodata);
|
||||
src/pokemon_jump_2.o(.rodata);
|
||||
src/pokemon_jump_4.o(.rodata);
|
||||
data/pokemon_jump.o(.rodata);
|
||||
data/berry_crush.o(.rodata);
|
||||
src/wireless_communication_status_screen.o(.rodata);
|
||||
|
||||
+1
-61
@@ -1,27 +1,12 @@
|
||||
#include "global.h"
|
||||
#include "malloc.h"
|
||||
#include "battle_anim.h"
|
||||
#include "bg.h"
|
||||
#include "data.h"
|
||||
#include "decompress.h"
|
||||
#include "dynamic_placeholder_text_util.h"
|
||||
#include "gflib.h"
|
||||
#include "event_data.h"
|
||||
#include "item.h"
|
||||
#include "link_rfu.h"
|
||||
#include "main.h"
|
||||
#include "menu.h"
|
||||
#include "palette.h"
|
||||
#include "random.h"
|
||||
#include "save.h"
|
||||
#include "script.h"
|
||||
#include "sound.h"
|
||||
#include "sprite.h"
|
||||
#include "string_util.h"
|
||||
#include "strings.h"
|
||||
#include "task.h"
|
||||
#include "text_window.h"
|
||||
#include "trig.h"
|
||||
#include "pokemon.h"
|
||||
#include "pokemon_jump.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
@@ -98,53 +83,8 @@ static void sub_8149900(u16, u16 *, u16 *);
|
||||
static u16 sub_8149910(void);
|
||||
static u16 sub_8149930(void);
|
||||
static u16 sub_8149978(u16 item, u16 quantity);
|
||||
static void sub_802CB7C(struct Sprite *sprite);
|
||||
static void sub_802CC40(struct Sprite *sprite);
|
||||
static void sub_802CD08(struct Sprite *sprite);
|
||||
static void sub_802CDD4(struct Sprite *sprite);
|
||||
|
||||
static void sub_802D12C(u8 taskId);
|
||||
static void sub_802E00C(u8 arg0);
|
||||
static void sub_802E090(u8 taskId);
|
||||
static void sub_802D150(void);
|
||||
static void sub_802DD08(void);
|
||||
static void sub_802DB8C(void);
|
||||
static void sub_802DBF8(void);
|
||||
static void sub_802DE1C(void);
|
||||
static void sub_802DFD4(void);
|
||||
static void sub_802D108(void (*func)(void));
|
||||
static void sub_802DF70(bool32 arg0);
|
||||
static u32 sub_802DA9C(u32 left, u32 top, u32 width, u32 height);
|
||||
static void sub_802DB18(u16 left, u16 top, u8 cursorPos);
|
||||
static void sub_802D150(void);
|
||||
static void sub_802D2E4(void);
|
||||
static void sub_802D350(void);
|
||||
static void sub_802D3BC(void);
|
||||
static void sub_802D448(void);
|
||||
static void sub_802D4F4(void);
|
||||
static void sub_802D598(void);
|
||||
static void sub_802D5E4(void);
|
||||
static void sub_802D72C(void);
|
||||
static void sub_802D688(void);
|
||||
static void Task_ShowPokemonJumpRecords(u8 taskId);
|
||||
static void sub_802E6D0(u8 taskId);
|
||||
static void sub_802EB98(u8 taskId);
|
||||
static void sub_802E500(u16 windowId, int width);
|
||||
static void TruncateToFirstWordOnly(u8 *str);
|
||||
static void sub_802EF50(u16 tileTag, u16 palTag);
|
||||
static u8 sub_802EFA8(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority);
|
||||
static void sub_802EFFC(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority, s16 *spriteId1, s16 *spriteId2);
|
||||
static bool32 sub_802EC98(u8 spriteId);
|
||||
static bool32 sub_802EE30(u8 spriteId);
|
||||
static void sub_802EDCC(u8 spriteId1, u8 spriteId2, u8 spriteId3);
|
||||
static void sub_802EE5C(struct Sprite *sprite);
|
||||
static void sub_802E83C(u8 taskId);
|
||||
static void sub_802E8C8(u8 taskId);
|
||||
static void sub_802EA50(u8 taskId);
|
||||
static void sub_802EAB0(u8 taskId);
|
||||
|
||||
EWRAM_DATA static struct PokemonJump1 *gUnknown_203F3D4 = NULL;
|
||||
// EWRAM_DATA static struct PokemonJump2 *gUnknown_203F3D8 = NULL;
|
||||
|
||||
static const struct PokemonJumpMons gPkmnJumpSpecies[] =
|
||||
{
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
#include "global.h"
|
||||
#include "link_rfu.h"
|
||||
#include "pokemon_jump.h"
|
||||
|
||||
struct MonInfoPacket
|
||||
{
|
||||
u8 id; // packet id
|
||||
u16 species;
|
||||
u32 personality;
|
||||
u32 otId;
|
||||
};
|
||||
|
||||
void sub_8149A6C(struct PokemonJump1_MonInfo *arg0)
|
||||
{
|
||||
struct MonInfoPacket packet;
|
||||
packet.id = 1,
|
||||
packet.species = arg0->species,
|
||||
packet.otId = arg0->otId,
|
||||
packet.personality = arg0->personality,
|
||||
RfuPrepareSend0x2f00(&packet);
|
||||
}
|
||||
|
||||
bool32 sub_8149A90(int multiplayerId, struct PokemonJump1_MonInfo *arg0)
|
||||
{
|
||||
struct MonInfoPacket packet;
|
||||
|
||||
if ((gRecvCmds[multiplayerId][0] & 0xFF00) != 0x2F00)
|
||||
return FALSE;
|
||||
|
||||
memcpy(&packet, &gRecvCmds[multiplayerId][1], sizeof(packet));
|
||||
if (packet.id == 1)
|
||||
{
|
||||
arg0->species = packet.species;
|
||||
arg0->otId = packet.otId;
|
||||
arg0->personality = packet.personality;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
struct UnkPacket2
|
||||
{
|
||||
u8 id; // packet id
|
||||
u32 unk4;
|
||||
u32 unk8;
|
||||
};
|
||||
|
||||
void sub_8149AE0(u32 arg0)
|
||||
{
|
||||
struct UnkPacket2 packet;
|
||||
packet.id = 2;
|
||||
packet.unk4 = arg0;
|
||||
RfuPrepareSend0x2f00(&packet);
|
||||
}
|
||||
|
||||
struct UnkPacket3
|
||||
{
|
||||
u8 id; // packet id
|
||||
u8 unk1;
|
||||
u8 unk2;
|
||||
u8 unk3_0:5;
|
||||
u8 unk3_1:3;
|
||||
u16 unk4;
|
||||
u16 unk6;
|
||||
u32 unk8_0:15;
|
||||
u32 unk8_1:17;
|
||||
};
|
||||
|
||||
void sub_8149AF8(struct PokemonJump1_82E4 *arg0, struct PokemonJump1Sub *arg1)
|
||||
{
|
||||
struct UnkPacket3 packet;
|
||||
packet.id = 3;
|
||||
packet.unk8_1 = arg1->unk8;
|
||||
packet.unk3_0 = arg1->unk1;
|
||||
packet.unk1 = arg1->unk0;
|
||||
packet.unk6 = arg1->unk2;
|
||||
packet.unk8_0 = arg1->unk4;
|
||||
packet.unk2 = arg0->unk10;
|
||||
packet.unk3_1 = arg0->unk14;
|
||||
packet.unk4 = arg0->unkE;
|
||||
RfuPrepareSend0x2f00(&packet);
|
||||
}
|
||||
|
||||
bool32 sub_8149B7C(struct PokemonJump1_82E4 *arg0, struct PokemonJump1Sub *arg1)
|
||||
{
|
||||
struct UnkPacket3 packet;
|
||||
|
||||
if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00)
|
||||
return FALSE;
|
||||
|
||||
memcpy(&packet, &gRecvCmds[0][1], sizeof(packet));
|
||||
if (packet.id != 3)
|
||||
return FALSE;
|
||||
|
||||
arg1->unk8 = packet.unk8_1;
|
||||
arg1->unk1 = packet.unk3_0;
|
||||
arg1->unk0 = packet.unk1;
|
||||
arg1->unk2 = packet.unk6;
|
||||
arg1->unk4 = packet.unk8_0;
|
||||
arg0->unk10 = packet.unk2;
|
||||
arg0->unk14 = packet.unk3_1;
|
||||
arg0->unkE = packet.unk4;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
struct UnkPacket4
|
||||
{
|
||||
u8 id; // packet id
|
||||
u8 unk1;
|
||||
u8 unk2;
|
||||
u8 unk3;
|
||||
u16 unk4;
|
||||
u8 unk6;
|
||||
u16 unk8;
|
||||
};
|
||||
|
||||
void sub_8149BF4(struct PokemonJump1_82E4 *arg0, u8 arg1, u16 arg2)
|
||||
{
|
||||
struct UnkPacket4 packet;
|
||||
packet.id = 4;
|
||||
packet.unk1 = arg0->unk10;
|
||||
packet.unk2 = arg0->unk14;
|
||||
packet.unk3 = arg0->unk18;
|
||||
packet.unk4 = arg0->unkE;
|
||||
packet.unk6 = arg1;
|
||||
packet.unk8 = arg2;
|
||||
RfuPrepareSend0x2f00(&packet);
|
||||
}
|
||||
|
||||
bool32 sub_8149C24(struct PokemonJump1_82E4 *arg0, int multiplayerId, u8 *arg2, u16 *arg3)
|
||||
{
|
||||
struct UnkPacket4 packet;
|
||||
|
||||
if ((gRecvCmds[multiplayerId][0] & 0xFF00) != 0x2F00)
|
||||
return FALSE;
|
||||
|
||||
memcpy(&packet, &gRecvCmds[multiplayerId][1], sizeof(packet));
|
||||
if (packet.id != 4)
|
||||
return FALSE;
|
||||
|
||||
arg0->unk10 = packet.unk1;
|
||||
arg0->unk14 = packet.unk2;
|
||||
arg0->unk18 = packet.unk3;
|
||||
arg0->unkE = packet.unk4;
|
||||
*arg2 = packet.unk6;
|
||||
*arg3 = packet.unk8;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 sub_8149C90(struct PokemonJump1_82E4 *arg0, int multiplayerId)
|
||||
{
|
||||
struct UnkPacket4 packet;
|
||||
|
||||
if ((gRecvCmds[multiplayerId][0] & 0xFF00) != 0x2F00)
|
||||
return FALSE;
|
||||
|
||||
memcpy(&packet, &gRecvCmds[multiplayerId][1], sizeof(packet));
|
||||
if (packet.id != 4)
|
||||
return FALSE;
|
||||
|
||||
arg0->unk10 = packet.unk1;
|
||||
arg0->unk14 = packet.unk2;
|
||||
arg0->unk18 = packet.unk3;
|
||||
arg0->unkE = packet.unk4;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -0,0 +1,922 @@
|
||||
#include "global.h"
|
||||
#include "gflib.h"
|
||||
#include "data.h"
|
||||
#include "digit_obj_util.h"
|
||||
#include "dynamic_placeholder_text_util.h"
|
||||
#include "item.h"
|
||||
#include "menu.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "pokemon_jump.h"
|
||||
#include "strings.h"
|
||||
#include "task.h"
|
||||
#include "text_window.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/items.h"
|
||||
|
||||
EWRAM_DATA static struct PokemonJump2 *gUnknown_203F3D8 = NULL;
|
||||
|
||||
static void sub_8149D80(void (*func)(void));
|
||||
static void sub_8149DA4(u8 taskId);
|
||||
static void sub_8149DC8(void);
|
||||
static void sub_8149F64(void);
|
||||
static void sub_8149FD0(void);
|
||||
static void sub_814A03C(void);
|
||||
static void sub_814A0C8(void);
|
||||
static void sub_814A174(void);
|
||||
static void sub_814A218(void);
|
||||
static void sub_814A264(void);
|
||||
static void sub_814A308(void);
|
||||
static void sub_814A3AC(void);
|
||||
static u32 sub_814A754(u32 left, u32 top, u32 width, u32 height);
|
||||
static void sub_814A7D0(u16 left, u16 top, u8 cursorPos);
|
||||
static void sub_814A84C(void);
|
||||
static void sub_814A8B8(void);
|
||||
static void sub_814A9C8(void);
|
||||
static void sub_814AADC(void);
|
||||
static void sub_814AC30(bool32 arg0);
|
||||
static void sub_814AC94(void);
|
||||
static void sub_814ACCC(u8 arg0);
|
||||
static void sub_814AD50(u8 taskId);
|
||||
|
||||
static void sub_8149D34(struct PokemonJump2 *);
|
||||
|
||||
void sub_8149CEC(struct PokemonJump2 *arg0)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
gUnknown_203F3D8 = arg0;
|
||||
sub_8149D34(gUnknown_203F3D8);
|
||||
taskId = CreateTask(sub_8149DA4, 3);
|
||||
gUnknown_203F3D8->unk6 = taskId;
|
||||
SetWordTaskArg(gUnknown_203F3D8->unk6, 2, (u32) gUnknown_203F3D8);
|
||||
sub_8149D80(sub_8149DC8);
|
||||
}
|
||||
|
||||
void sub_8149D24(void)
|
||||
{
|
||||
FreeAllWindowBuffers();
|
||||
DigitObjUtil_Teardown();
|
||||
}
|
||||
|
||||
static void sub_8149D34(struct PokemonJump2 *arg0)
|
||||
{
|
||||
arg0->unk4 = 0;
|
||||
arg0->unk0 = 0;
|
||||
arg0->unk12 = 0xFF;
|
||||
}
|
||||
|
||||
// Gfx
|
||||
static const u16 gPkmnJumpPal3[] = INCBIN_U16("graphics/link_games/pkmnjump_pal3.gbapal");
|
||||
|
||||
static const u16 gPkmnJumpBgPal[] = INCBIN_U16("graphics/link_games/pkmnjump_bg.gbapal");
|
||||
static const u32 gPkmnJumpBgGfx[] = INCBIN_U32("graphics/link_games/pkmnjump_bg.4bpp.lz");
|
||||
static const u32 gPkmnJumpBgTilemap[] = INCBIN_U32("graphics/link_games/pkmnjump_bg.bin.lz");
|
||||
|
||||
static const u16 gPkmnJumpVenusaurPal[] = INCBIN_U16("graphics/link_games/pkmnjump_venusaur.gbapal");
|
||||
static const u32 gPkmnJumpVenusaurGfx[] = INCBIN_U32("graphics/link_games/pkmnjump_venusaur.4bpp.lz");
|
||||
static const u32 gPkmnJumpVenusaurTilemap[] = INCBIN_U32("graphics/link_games/pkmnjump_venusaur.bin.lz");
|
||||
|
||||
static const u16 gPkmnJumpResultsPal[] = INCBIN_U16("graphics/link_games/pkmnjump_results.gbapal");
|
||||
static const u32 gPkmnJumpResultsGfx[] = INCBIN_U32("graphics/link_games/pkmnjump_results.4bpp.lz");
|
||||
static const u32 gPkmnJumpResultsTilemap[] = INCBIN_U32("graphics/link_games/pkmnjump_results.bin.lz");
|
||||
|
||||
static const struct BgTemplate gUnknown_846D8D4[] =
|
||||
{
|
||||
{
|
||||
.bg = 0,
|
||||
.charBaseIndex = 0,
|
||||
.mapBaseIndex = 27,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 0,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 2,
|
||||
.charBaseIndex = 1,
|
||||
.mapBaseIndex = 30,
|
||||
.screenSize = 2,
|
||||
.paletteMode = 0,
|
||||
.priority = 2,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 1,
|
||||
.charBaseIndex = 2,
|
||||
.mapBaseIndex = 12,
|
||||
.screenSize = 3,
|
||||
.paletteMode = 0,
|
||||
.priority = 1,
|
||||
.baseTile = 0
|
||||
},
|
||||
{
|
||||
.bg = 3,
|
||||
.charBaseIndex = 3,
|
||||
.mapBaseIndex = 29,
|
||||
.screenSize = 0,
|
||||
.paletteMode = 0,
|
||||
.priority = 3,
|
||||
.baseTile = 0
|
||||
},
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_846D8E4[] =
|
||||
{
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 19,
|
||||
.tilemapTop = 0,
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 2,
|
||||
.baseBlock = 0x13,
|
||||
},
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 8,
|
||||
.tilemapTop = 0,
|
||||
.width = 6,
|
||||
.height = 2,
|
||||
.paletteNum = 2,
|
||||
.baseBlock = 0x1F,
|
||||
},
|
||||
DUMMY_WIN_TEMPLATE,
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
int id;
|
||||
void (*func)(void);
|
||||
} static const gUnknown_846D8FC[] =
|
||||
{
|
||||
{0x00, sub_8149DC8},
|
||||
{0x01, sub_8149F64},
|
||||
{0x02, sub_8149FD0},
|
||||
{0x03, sub_814A03C},
|
||||
{0x04, sub_814A0C8},
|
||||
{0x05, sub_814A174},
|
||||
{0x06, sub_814A218},
|
||||
{0x07, sub_814A264},
|
||||
{0x09, sub_814A3AC},
|
||||
{0x08, sub_814A308},
|
||||
};
|
||||
|
||||
void sub_8149D40(int arg0)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gUnknown_846D8FC); i++)
|
||||
{
|
||||
if (gUnknown_846D8FC[i].id == arg0)
|
||||
sub_8149D80(gUnknown_846D8FC[i].func);
|
||||
}
|
||||
}
|
||||
|
||||
bool32 sub_8149D68(void)
|
||||
{
|
||||
return (gUnknown_203F3D8->unk0 != 1);
|
||||
}
|
||||
|
||||
static void sub_8149D80(void (*func)(void))
|
||||
{
|
||||
SetWordTaskArg(gUnknown_203F3D8->unk6, 0, (u32) func);
|
||||
gUnknown_203F3D8->unk4 = 0;
|
||||
gUnknown_203F3D8->unk0 = 0;
|
||||
}
|
||||
|
||||
static void sub_8149DA4(u8 taskId)
|
||||
{
|
||||
if (!gUnknown_203F3D8->unk0)
|
||||
{
|
||||
void (*func)(void) = (void *)(GetWordTaskArg(taskId, 0));
|
||||
|
||||
func();
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8149DC8(void)
|
||||
{
|
||||
switch (gUnknown_203F3D8->unk4)
|
||||
{
|
||||
case 0:
|
||||
ResetBgsAndClearDma3BusyFlags(FALSE);
|
||||
InitBgsFromTemplates(0, gUnknown_846D8D4, ARRAY_COUNT(gUnknown_846D8D4));
|
||||
InitWindows(gUnknown_846D8E4);
|
||||
ResetBgPositions();
|
||||
ResetTempTileDataBuffers();
|
||||
sub_814AD6C(gUnknown_203F3D8);
|
||||
sub_814A9C8();
|
||||
LoadPalette(gPkmnJumpBgPal, 0, 0x20);
|
||||
DecompressAndCopyTileDataToVram(3, gPkmnJumpBgGfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(3, gPkmnJumpBgTilemap, 0, 0, 1);
|
||||
LoadPalette(gPkmnJumpVenusaurPal, 0x30, 0x20);
|
||||
DecompressAndCopyTileDataToVram(2, gPkmnJumpVenusaurGfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(2, gPkmnJumpVenusaurTilemap, 0, 0, 1);
|
||||
LoadPalette(gPkmnJumpResultsPal, 0x10, 0x20);
|
||||
DecompressAndCopyTileDataToVram(1, gPkmnJumpResultsGfx, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gPkmnJumpResultsTilemap, 0, 0, 1);
|
||||
LoadPalette(gPkmnJumpPal3, 0x20, 0x20);
|
||||
SetBgTilemapBuffer(0, gUnknown_203F3D8->tilemapBuffer);
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20);
|
||||
sub_814A84C();
|
||||
sub_814AA24(0);
|
||||
sub_814FDA0(0, 1, 0xE0);
|
||||
LoadUserWindowBorderGfx(0, 0x00A, 0xD0);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
break;
|
||||
case 1:
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
sub_814A8B8();
|
||||
sub_814B294(gUnknown_203F3D8);
|
||||
sub_814B348(gUnknown_203F3D8, 6);
|
||||
ShowBg(3);
|
||||
ShowBg(0);
|
||||
ShowBg(2);
|
||||
HideBg(1);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
gUnknown_203F3D8->unk0 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8149F64(void)
|
||||
{
|
||||
switch (gUnknown_203F3D8->unk4)
|
||||
{
|
||||
case 0:
|
||||
sub_814AADC();
|
||||
gUnknown_203F3D8->unk4++;
|
||||
break;
|
||||
case 1:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
sub_814AC30(FALSE);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
sub_814AC94();
|
||||
gUnknown_203F3D8->unk4++;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
gUnknown_203F3D8->unk0 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8149FD0(void)
|
||||
{
|
||||
switch (gUnknown_203F3D8->unk4)
|
||||
{
|
||||
case 0:
|
||||
sub_814AADC();
|
||||
gUnknown_203F3D8->unk4++;
|
||||
break;
|
||||
case 1:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
sub_814AC30(TRUE);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
sub_814AC94();
|
||||
gUnknown_203F3D8->unk4++;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
gUnknown_203F3D8->unk0 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_814A03C(void)
|
||||
{
|
||||
int i, numPlayers;
|
||||
|
||||
numPlayers = sub_81499A4();
|
||||
switch (gUnknown_203F3D8->unk4)
|
||||
{
|
||||
case 0:
|
||||
for (i = 0; i < numPlayers; i++)
|
||||
ClearWindowTilemap(gUnknown_203F3D8->unk1C[i]);
|
||||
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
break;
|
||||
case 1:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
for (i = 0; i < numPlayers; i++)
|
||||
RemoveWindow(gUnknown_203F3D8->unk1C[i]);
|
||||
|
||||
gUnknown_203F3D8->unk0 = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_814A0C8(void)
|
||||
{
|
||||
switch (gUnknown_203F3D8->unk4)
|
||||
{
|
||||
case 0:
|
||||
gUnknown_203F3D8->unk12 = sub_814A754(1, 8, 20, 2);
|
||||
AddTextPrinterParameterized(gUnknown_203F3D8->unk12, 2, gText_WantToPlayAgain2, 0, 2, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(gUnknown_203F3D8->unk12, 2);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
break;
|
||||
case 1:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
PutWindowTilemap(gUnknown_203F3D8->unk12);
|
||||
DrawTextBorderOuter(gUnknown_203F3D8->unk12, 1, 14);
|
||||
sub_814A7D0(23, 7, 0);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
gUnknown_203F3D8->unk0 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_814A174(void)
|
||||
{
|
||||
switch (gUnknown_203F3D8->unk4)
|
||||
{
|
||||
case 0:
|
||||
gUnknown_203F3D8->unk12 = sub_814A754(2, 7, 26, 4);
|
||||
AddTextPrinterParameterized(gUnknown_203F3D8->unk12, 2, gText_SavingDontTurnOffPower, 0, 2, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(gUnknown_203F3D8->unk12, 2);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
break;
|
||||
case 1:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
PutWindowTilemap(gUnknown_203F3D8->unk12);
|
||||
DrawTextBorderOuter(gUnknown_203F3D8->unk12, 1, 14);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
gUnknown_203F3D8->unk0 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_814A218(void)
|
||||
{
|
||||
switch (gUnknown_203F3D8->unk4)
|
||||
{
|
||||
case 0:
|
||||
sub_814A6CC();
|
||||
DestroyYesNoMenu();
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
break;
|
||||
case 1:
|
||||
if (!sub_814A6FC() && !IsDma3ManagerBusyWithBgCopy())
|
||||
gUnknown_203F3D8->unk0 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_814A264(void)
|
||||
{
|
||||
switch (gUnknown_203F3D8->unk4)
|
||||
{
|
||||
case 0:
|
||||
gUnknown_203F3D8->unk12 = sub_814A754(2, 8, 22, 4);
|
||||
AddTextPrinterParameterized(gUnknown_203F3D8->unk12, 2, gText_SomeoneDroppedOut2, 0, 2, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(gUnknown_203F3D8->unk12, 2);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
break;
|
||||
case 1:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
PutWindowTilemap(gUnknown_203F3D8->unk12);
|
||||
DrawTextBorderOuter(gUnknown_203F3D8->unk12, 1, 14);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
gUnknown_203F3D8->unk0 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_814A308(void)
|
||||
{
|
||||
switch (gUnknown_203F3D8->unk4)
|
||||
{
|
||||
case 0:
|
||||
gUnknown_203F3D8->unk12 = sub_814A754(7, 10, 16, 2);
|
||||
AddTextPrinterParameterized(gUnknown_203F3D8->unk12, 2, gText_CommunicationStandby4, 0, 2, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(gUnknown_203F3D8->unk12, 2);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
break;
|
||||
case 1:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
PutWindowTilemap(gUnknown_203F3D8->unk12);
|
||||
DrawTextBorderOuter(gUnknown_203F3D8->unk12, 1, 14);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
gUnknown_203F3D8->unk0 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_814A3AC(void)
|
||||
{
|
||||
switch (gUnknown_203F3D8->unk4)
|
||||
{
|
||||
case 0:
|
||||
sub_814B43C(gUnknown_203F3D8);
|
||||
gUnknown_203F3D8->unk4++;
|
||||
break;
|
||||
case 1:
|
||||
if (!sub_814B460())
|
||||
gUnknown_203F3D8->unk0 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_814A3E4(void)
|
||||
{
|
||||
gUnknown_203F3D8->unkA = 0;
|
||||
gUnknown_203F3D8->unkB = 0;
|
||||
gUnknown_203F3D8->unkC = 6;
|
||||
sub_814A95C(gUnknown_203F3D8->unkC);
|
||||
}
|
||||
|
||||
bool32 sub_814A408(void)
|
||||
{
|
||||
switch (gUnknown_203F3D8->unkA)
|
||||
{
|
||||
case 0:
|
||||
gUnknown_203F3D8->unkB++;
|
||||
if (gUnknown_203F3D8->unkB > 10)
|
||||
{
|
||||
gUnknown_203F3D8->unkB = 0;
|
||||
gUnknown_203F3D8->unkC++;
|
||||
if (gUnknown_203F3D8->unkC >= 10)
|
||||
{
|
||||
gUnknown_203F3D8->unkC = 0;
|
||||
gUnknown_203F3D8->unkA++;
|
||||
}
|
||||
}
|
||||
sub_814A95C(gUnknown_203F3D8->unkC);
|
||||
if (gUnknown_203F3D8->unkC != 7)
|
||||
break;
|
||||
case 1:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
const u8 gUnknown_846D94C[] = _("IES");
|
||||
|
||||
void sub_814A468(u16 itemId, u16 quantity)
|
||||
{
|
||||
CopyItemName(itemId, gUnknown_203F3D8->txtBuff[0]);
|
||||
ConvertIntToDecimalStringN(gUnknown_203F3D8->txtBuff[1], quantity, STR_CONV_MODE_LEFT_ALIGN, 1);
|
||||
if (itemId >= FIRST_BERRY_INDEX && itemId < LAST_BERRY_INDEX)
|
||||
{
|
||||
if (quantity > 1)
|
||||
{
|
||||
int endi = StringLength(gUnknown_203F3D8->txtBuff[0]);
|
||||
if (endi != 0)
|
||||
{
|
||||
endi--;
|
||||
endi[gUnknown_203F3D8->txtBuff[0]] = EOS;
|
||||
StringAppend(gUnknown_203F3D8->txtBuff[0], gUnknown_846D94C);
|
||||
}
|
||||
}
|
||||
}
|
||||
DynamicPlaceholderTextUtil_Reset();
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gUnknown_203F3D8->txtBuff[0]);
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, gUnknown_203F3D8->txtBuff[1]);
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gUnknown_203F3D8->strBuff, gText_AwesomeWonF701F700);
|
||||
gUnknown_203F3D8->unk12 = sub_814A754(4, 8, 22, 4);
|
||||
AddTextPrinterParameterized(gUnknown_203F3D8->unk12, 2, gUnknown_203F3D8->strBuff, 0, 2, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(gUnknown_203F3D8->unk12, 2);
|
||||
gUnknown_203F3D8->unk14 = MUS_FANFA1;
|
||||
gUnknown_203F3D8->unkD = 0;
|
||||
}
|
||||
|
||||
void sub_814A53C(u16 itemId)
|
||||
{
|
||||
CopyItemName(itemId, gUnknown_203F3D8->txtBuff[0]);
|
||||
DynamicPlaceholderTextUtil_Reset();
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gUnknown_203F3D8->txtBuff[0]);
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gUnknown_203F3D8->strBuff, gText_FilledStorageSpace2);
|
||||
gUnknown_203F3D8->unk12 = sub_814A754(4, 8, 22, 4);
|
||||
AddTextPrinterParameterized(gUnknown_203F3D8->unk12, 2, gUnknown_203F3D8->strBuff, 0, 2, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(gUnknown_203F3D8->unk12, 2);
|
||||
gUnknown_203F3D8->unk14 = 0;
|
||||
gUnknown_203F3D8->unkD = 0;
|
||||
}
|
||||
|
||||
void sub_814A5B4(u16 itemId)
|
||||
{
|
||||
CopyItemName(itemId, gUnknown_203F3D8->txtBuff[0]);
|
||||
DynamicPlaceholderTextUtil_Reset();
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gUnknown_203F3D8->txtBuff[0]);
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gUnknown_203F3D8->strBuff, gText_CantHoldMore);
|
||||
gUnknown_203F3D8->unk12 = sub_814A754(4, 9, 22, 2);
|
||||
AddTextPrinterParameterized(gUnknown_203F3D8->unk12, 2, gUnknown_203F3D8->strBuff, 0, 2, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(gUnknown_203F3D8->unk12, 2);
|
||||
gUnknown_203F3D8->unk14 = 0;
|
||||
gUnknown_203F3D8->unkD = 0;
|
||||
}
|
||||
|
||||
bool32 sub_814A62C(void)
|
||||
{
|
||||
switch (gUnknown_203F3D8->unkD)
|
||||
{
|
||||
case 0:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
PutWindowTilemap(gUnknown_203F3D8->unk12);
|
||||
DrawTextBorderOuter(gUnknown_203F3D8->unk12, 1, 14);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
gUnknown_203F3D8->unkD++;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
break;
|
||||
if (gUnknown_203F3D8->unk14 == 0)
|
||||
{
|
||||
gUnknown_203F3D8->unkD += 2;
|
||||
return FALSE;
|
||||
}
|
||||
PlayFanfare(gUnknown_203F3D8->unk14);
|
||||
gUnknown_203F3D8->unkD++;
|
||||
case 2:
|
||||
if (!IsFanfareTaskInactive())
|
||||
break;
|
||||
gUnknown_203F3D8->unkD++;
|
||||
case 3:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_814A6CC(void)
|
||||
{
|
||||
if (gUnknown_203F3D8->unk12 != 0xFF)
|
||||
{
|
||||
rbox_fill_rectangle(gUnknown_203F3D8->unk12);
|
||||
CopyWindowToVram(gUnknown_203F3D8->unk12, 1);
|
||||
gUnknown_203F3D8->unkD = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Can't match this without the ugly GOTO, oh well.
|
||||
bool32 sub_814A6FC(void)
|
||||
{
|
||||
if (gUnknown_203F3D8->unk12 == 0xFF)
|
||||
{
|
||||
RET_FALSE:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (gUnknown_203F3D8->unkD == 0)
|
||||
{
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
RemoveWindow(gUnknown_203F3D8->unk12);
|
||||
gUnknown_203F3D8->unk12 = 0xFF;
|
||||
gUnknown_203F3D8->unkD++;
|
||||
goto RET_FALSE;
|
||||
}
|
||||
}
|
||||
else if (gUnknown_203F3D8->unkD == 1)
|
||||
goto RET_FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
s8 sub_814A744(void)
|
||||
{
|
||||
return Menu_ProcessInputNoWrapClearOnChoose();
|
||||
}
|
||||
|
||||
static u32 sub_814A754(u32 left, u32 top, u32 width, u32 height)
|
||||
{
|
||||
u32 windowId;
|
||||
struct WindowTemplate window;
|
||||
|
||||
window.bg = 0;
|
||||
window.tilemapLeft = left;
|
||||
window.tilemapTop = top;
|
||||
window.width = width;
|
||||
window.height = height;
|
||||
window.paletteNum = 0xF;
|
||||
window.baseBlock = 0x43;
|
||||
|
||||
windowId = AddWindow(&window);
|
||||
FillWindowPixelBuffer(windowId, 0x11);
|
||||
return windowId;
|
||||
}
|
||||
|
||||
static void sub_814A7D0(u16 left, u16 top, u8 cursorPos)
|
||||
{
|
||||
struct WindowTemplate window;
|
||||
u8 a = cursorPos;
|
||||
|
||||
window.bg = 0;
|
||||
window.tilemapLeft = left;
|
||||
window.tilemapTop = top;
|
||||
window.width = 6;
|
||||
window.height = 4;
|
||||
window.paletteNum = 2;
|
||||
window.baseBlock = 0x2B;
|
||||
|
||||
CreateYesNoMenu(&window, 2, 0, 2, 0x00a, 0xD, a);
|
||||
}
|
||||
|
||||
static void sub_814A84C(void)
|
||||
{
|
||||
u8 color[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY};
|
||||
|
||||
PutWindowTilemap(0);
|
||||
PutWindowTilemap(1);
|
||||
FillWindowPixelBuffer(0, 0);
|
||||
FillWindowPixelBuffer(1, 0);
|
||||
AddTextPrinterParameterized3(0, 0, 0, 2, color, 0, gText_SpacePoints2);
|
||||
AddTextPrinterParameterized3(1, 0, 0, 2, color, 0, gText_SpaceTimes3);
|
||||
}
|
||||
|
||||
static const u8 gUnknown_846D953[] = {2, 2, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 0};
|
||||
|
||||
static const struct CompressedSpriteSheet gUnknown_846D960 = {gUnknown_8479688, 0, 0x320};
|
||||
static const struct SpritePalette gUnknown_846D968 = {gUnknown_8479668, 0x320};
|
||||
|
||||
static const u16 gUnknown_846D970[] = {0x06, 0x08, 0x10, 0x08};
|
||||
static const u16 gUnknown_846D978[] = {0x06, 0x08, 0x0b, 0x06, 0x10, 0x08};
|
||||
static const u16 gUnknown_846D984[] = {0x02, 0x06, 0x06, 0x08, 0x10, 0x08, 0x14, 0x06};
|
||||
static const u16 gUnknown_846D994[] = {0x02, 0x06, 0x06, 0x08, 0x0b, 0x06, 0x10, 0x08, 0x14, 0x06};
|
||||
|
||||
static const u16 *const gUnknown_082FE234[] =
|
||||
{
|
||||
gUnknown_846D970,
|
||||
gUnknown_846D978,
|
||||
gUnknown_846D984,
|
||||
gUnknown_846D994,
|
||||
};
|
||||
|
||||
static const s16 gUnknown_846D9B8[] = {0x0058, 0x0098};
|
||||
static const s16 gUnknown_846D9BC[] = {0x0058, 0x0078, 0x0098};
|
||||
static const s16 gUnknown_846D9C2[] = {0x0038, 0x0058, 0x0098, 0x00b8};
|
||||
static const s16 gUnknown_846D9CA[] = {0x0038, 0x0058, 0x0078, 0x0098, 0x00b8};
|
||||
|
||||
static const s16 *const gUnknown_846D9D4[] =
|
||||
{
|
||||
gUnknown_846D9B8,
|
||||
gUnknown_846D9BC,
|
||||
gUnknown_846D9C2,
|
||||
gUnknown_846D9CA,
|
||||
};
|
||||
|
||||
static void sub_814A8B8(void)
|
||||
{
|
||||
int i, y, playersCount = sub_81499A4();
|
||||
const s16 *xCoords = gUnknown_846D9D4[playersCount - 2];
|
||||
|
||||
for (i = 0; i < playersCount; i++)
|
||||
{
|
||||
struct PokemonJump1_MonInfo *info = sub_81499C0(i);
|
||||
|
||||
y = gMonFrontPicCoords[info->species].y_offset;
|
||||
sub_814ADCC(gUnknown_203F3D8, info, *xCoords, y + 112, i);
|
||||
sub_814B240(gUnknown_203F3D8, *xCoords, 112, i);
|
||||
xCoords++;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_814A940(u32 id, s16 y)
|
||||
{
|
||||
gUnknown_203F3D8->unk81A8[id]->pos2.y = y;
|
||||
}
|
||||
|
||||
void sub_814A95C(int id)
|
||||
{
|
||||
sub_814B348(gUnknown_203F3D8, id);
|
||||
ChangeBgY(2, (gUnknown_846D953[id] * 5) << 0xD, 0);
|
||||
}
|
||||
|
||||
int sub_814A98C(u8 flags)
|
||||
{
|
||||
int i, count;
|
||||
|
||||
for (i = 0, count = 0; i < 5; i++)
|
||||
{
|
||||
if (flags & 1)
|
||||
{
|
||||
sub_814AF0C(gUnknown_203F3D8, i);
|
||||
count++;
|
||||
}
|
||||
flags >>= 1;
|
||||
}
|
||||
|
||||
sub_814ACCC(count - 2);
|
||||
return count;
|
||||
}
|
||||
|
||||
static void sub_814A9C8(void)
|
||||
{
|
||||
struct DigitObjUtilTemplate unkStruct;
|
||||
struct DigitObjUtilTemplate *ptr = &unkStruct; // This temp variable is needed to match, don't ask me why.
|
||||
|
||||
ptr->shape = SPRITE_SHAPE(8x8);
|
||||
ptr->size = SPRITE_SIZE(8x8);
|
||||
ptr->strConvMode = 0;
|
||||
ptr->priority = 1;
|
||||
ptr->oamCount = 5;
|
||||
ptr->xDelta = 8;
|
||||
ptr->x = 108;
|
||||
ptr->y = 6;
|
||||
ptr->spriteSheet = (void*) &gUnknown_846D960;
|
||||
ptr->spritePal = &gUnknown_846D968;
|
||||
|
||||
DigitObjUtil_Init(2);
|
||||
DigitObjUtil_CreatePrinter(0, 0, ptr);
|
||||
|
||||
unkStruct.oamCount = 4;
|
||||
unkStruct.x = 30;
|
||||
unkStruct.y = 6;
|
||||
DigitObjUtil_CreatePrinter(1, 0, &unkStruct);
|
||||
}
|
||||
|
||||
void sub_814AA24(int arg0)
|
||||
{
|
||||
DigitObjUtil_PrintNumOn(0, arg0);
|
||||
}
|
||||
|
||||
void sub_814AA34(u16 arg0)
|
||||
{
|
||||
DigitObjUtil_PrintNumOn(1, arg0);
|
||||
}
|
||||
|
||||
void sub_814AA48(u8 multiplayerId)
|
||||
{
|
||||
sub_814AFE8(gUnknown_203F3D8, multiplayerId);
|
||||
}
|
||||
|
||||
void sub_814AA60(u8 multiplayerId)
|
||||
{
|
||||
sub_814B080(gUnknown_203F3D8, multiplayerId);
|
||||
}
|
||||
|
||||
int sub_814AA78(int multiplayerId)
|
||||
{
|
||||
return sub_814B010(gUnknown_203F3D8, multiplayerId);
|
||||
}
|
||||
|
||||
void sub_814AA8C(void)
|
||||
{
|
||||
sub_814B0A8(gUnknown_203F3D8);
|
||||
}
|
||||
|
||||
void sub_814AAA0(void)
|
||||
{
|
||||
sub_814B134(gUnknown_203F3D8);
|
||||
}
|
||||
|
||||
void sub_814AAB4(int multiplayerId)
|
||||
{
|
||||
sub_814B168(gUnknown_203F3D8, multiplayerId);
|
||||
}
|
||||
|
||||
int sub_814AAC8(void)
|
||||
{
|
||||
return sub_814B190(gUnknown_203F3D8);
|
||||
}
|
||||
|
||||
static void sub_814AADC(void)
|
||||
{
|
||||
struct WindowTemplate window;
|
||||
int i, playersCount = sub_81499A4();
|
||||
const u16 *winCoords = gUnknown_082FE234[playersCount - 2];
|
||||
|
||||
window.bg = 0;
|
||||
window.width = 8;
|
||||
window.height = 2;
|
||||
window.paletteNum = 2;
|
||||
window.baseBlock = 0x2B;
|
||||
|
||||
for (i = 0; i < playersCount; i++)
|
||||
{
|
||||
window.tilemapLeft = winCoords[0];
|
||||
window.tilemapTop = winCoords[1];
|
||||
gUnknown_203F3D8->unk1C[i] = AddWindow(&window);
|
||||
ClearWindowTilemap(gUnknown_203F3D8->unk1C[i]);
|
||||
window.baseBlock += 0x10;
|
||||
winCoords += 2;
|
||||
}
|
||||
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
}
|
||||
|
||||
static void sub_814AB98(int multiplayerId, u8 clr1, u8 clr2, u8 clr3)
|
||||
{
|
||||
u32 x;
|
||||
u8 colors[3] = {clr1, clr2, clr3};
|
||||
|
||||
FillWindowPixelBuffer(gUnknown_203F3D8->unk1C[multiplayerId], 0);
|
||||
x = 64 - GetStringWidth(0, sub_81499E0(multiplayerId), -1);
|
||||
x /= 2;
|
||||
AddTextPrinterParameterized3(gUnknown_203F3D8->unk1C[multiplayerId], 0, x, 2, colors, -1, sub_81499E0(multiplayerId));
|
||||
CopyWindowToVram(gUnknown_203F3D8->unk1C[multiplayerId], 2);
|
||||
}
|
||||
|
||||
static void sub_814AC30(bool32 arg0)
|
||||
{
|
||||
int i, var, playersCount = sub_81499A4();
|
||||
|
||||
if (!arg0)
|
||||
{
|
||||
for (i = 0; i < playersCount; i++)
|
||||
sub_814AB98(i, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY);
|
||||
}
|
||||
else
|
||||
{
|
||||
var = sub_81499B4();
|
||||
for (i = 0; i < playersCount; i++)
|
||||
{
|
||||
if (var != i)
|
||||
sub_814AB98(i, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY);
|
||||
else
|
||||
sub_814AB98(i, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_RED, TEXT_COLOR_LIGHT_RED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_814AC94(void)
|
||||
{
|
||||
int i, playersCount = sub_81499A4();
|
||||
|
||||
for (i = 0; i < playersCount; i++)
|
||||
PutWindowTilemap(gUnknown_203F3D8->unk1C[i]);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
}
|
||||
|
||||
static void sub_814ACCC(u8 arg0)
|
||||
{
|
||||
gUnknown_203F3D8->unk18 = 0;
|
||||
ChangeBgX(1, (arg0 / 2) << 16, 0);
|
||||
ChangeBgY(1, (((arg0 % 2) << 8) - 40) << 8, 0);
|
||||
ShowBg(1);
|
||||
CreateTask(sub_814AD50, 4);
|
||||
}
|
||||
|
||||
static bool32 sub_814AD18(void)
|
||||
{
|
||||
if (gUnknown_203F3D8->unk18 >= 32)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeBgY(1, 128, 1);
|
||||
if (++gUnknown_203F3D8->unk18 >= 32)
|
||||
HideBg(1);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_814AD50(u8 taskId)
|
||||
{
|
||||
if (!sub_814AD18())
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
+1
-3
@@ -450,10 +450,8 @@ gUnknown_203B170: @ 203B170
|
||||
.include "src/seagallop.o"
|
||||
.align 2
|
||||
.include "src/pokemon_jump_2.o"
|
||||
|
||||
.align 2
|
||||
gUnknown_203F3D8: @ 203F3D8
|
||||
.space 0x4
|
||||
.include "src/pokemon_jump_4.o"
|
||||
|
||||
gUnknown_203F3DC: @ 203F3DC
|
||||
.space 0x4
|
||||
|
||||
Reference in New Issue
Block a user