WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 46a0240

Browse files
authored
document underground pc (#843)
1 parent 2de4951 commit 46a0240

36 files changed

+1265
-1244
lines changed

generated/text_banks.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ TEXT_BANK_UNION_ROOM
637637
TEXT_BANK_UNDERGROUND_NPCS
638638
TEXT_BANK_UNDERGROUND_DECORATE_BASE
639639
TEXT_BANK_UNDERGROUND_CAPTURE_FLAG
640-
TEXT_BANK_UNDERGROUND_BASE_PC
640+
TEXT_BANK_UNDERGROUND_PC
641641
TEXT_BANK_UNDERGROUND_RECORDS
642642
TEXT_BANK_DUMMY_0641
643643
TEXT_BANK_ROUTE_226

include/comm_player_manager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ enum PauseBit {
2121
PAUSE_BIT_3 = 1 << 3,
2222
PAUSE_BIT_TRAPS = 1 << 4,
2323
PAUSE_BIT_5 = 1 << 5,
24-
PAUSE_BIT_6 = 1 << 6,
24+
PAUSE_BIT_LINK_PC = 1 << 6,
2525
PAUSE_BIT_RADAR = 1 << 7,
2626
};
2727

@@ -59,7 +59,7 @@ typedef struct CommPlayerManager {
5959
u8 moveTimer[MAX_CONNECTED_PLAYERS];
6060
UnkStruct_ov23_0224ABC4 unk_14A[8 + 1];
6161
TrainerInfo *unk_27C[5];
62-
TrainerInfo *unk_290[MAX_CONNECTED_PLAYERS];
62+
TrainerInfo *heldFlagOwnerInfo[MAX_CONNECTED_PLAYERS];
6363
u16 unk_2B0;
6464
u16 unk_2B2;
6565
u8 unk_2B4[4];

include/overlay023/funcptr_ov23_022431EC.h

Lines changed: 0 additions & 8 deletions
This file was deleted.

include/overlay023/ov23_02241F74.h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "struct_decls/struct_02029894_decl.h"
55

66
#include "field/field_system_decl.h"
7-
#include "overlay023/funcptr_ov23_022431EC.h"
87
#include "overlay023/underground_defs.h"
98
#include "overlay023/underground_text_printer.h"
109

@@ -13,16 +12,18 @@
1312
#include "sys_task_manager.h"
1413
#include "trainer_info.h"
1514

15+
typedef void (*EndSysTaskFunc)(SysTask *sysTask, void *ctx);
16+
1617
enum UndergroundStoredPosKeys {
1718
UNDERGROUND_STORED_POS_NONE = 0,
18-
UNDERGROUND_STORED_POS_KEY_1,
19+
UNDERGROUND_STORED_POS_KEY_PC,
1920
UNDERGROUND_STORED_POS_KEY_START_MENU,
2021
UNDERGROUND_STORED_POS_KEY_3,
2122
};
2223

2324
enum UndergroundMenuKeys {
24-
UNDERGROUND_MENU_KEY_2 = 2,
25-
UNDERGROUND_MENU_KEY_6 = 6,
25+
UNDERGROUND_MENU_KEY_STORE_GOODS = 2,
26+
UNDERGROUND_MENU_KEY_WITHDRAW_GOODS = 6,
2627
UNDERGROUND_MENU_KEY_TRAPS = 8,
2728
UNDERGROUND_MENU_KEY_SPHERES,
2829
UNDERGROUND_MENU_KEY_GOODS,
@@ -35,8 +36,8 @@ enum UndergroundMenuKeys {
3536
UNDERGROUND_MENU_KEY_17,
3637
UNDERGROUND_MENU_KEY_18,
3738
UNDERGROUND_MENU_KEY_19,
38-
UNDERGROUND_MENU_KEY_22 = 22,
39-
UNDERGROUND_MENU_KEY_23
39+
UNDERGROUND_MENU_KEY_PC_RADAR = 22,
40+
UNDERGROUND_MENU_KEY_PC
4041
};
4142

4243
#define BIT_TRAPS_FULL 1 << 4
@@ -81,9 +82,9 @@ int ov23_02242EE0(int param0);
8182
int ov23_02242F48(int param0);
8283
void ov23_02242FA8(void);
8384
void ov23_02242FBC(void);
84-
void ov23_02242FD0(void);
85-
void ov23_02242FE4(void);
86-
void ov23_02242FF8(void);
85+
void CommManUnderground_SetSphereRadarActive(void);
86+
void CommManUnderground_SetTrapRadarActive(void);
87+
void CommManUnderground_SetTreasureRadarActive(void);
8788
void ov23_0224300C(int param0, int param1);
8889
void ov23_02243020(int param0);
8990
void UndergroundMan_SetReturnLog(int param0);
@@ -93,8 +94,8 @@ void CommManUnderground_StoreCursorAndListPos(u16 menuKey, u16 cursorPos, u16 li
9394
u16 CommManUnderground_GetStoredListPos(u16 menuKey);
9495
u16 CommManUnderground_GetStoredCursorPos(u16 menuKey);
9596
void ov23_022431C4(int param0, int param1, void *param2, void *param3);
96-
void ov23_022431EC(void *param0, SysTask *param1, UnkFuncPtr_ov23_022431EC param2);
97-
void ov23_02243204(void);
97+
void CommManUnderground_SetCurrentSysTask(void *ctx, SysTask *sysTask, EndSysTaskFunc endFunc);
98+
void CommManUnderground_ClearCurrentSysTaskInfo(void);
9899
BOOL ov23_0224321C(void);
99100
BOOL ov23_02243298(int param0);
100101
void ov23_02243360(void);

include/overlay023/ov23_0224A1D0.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ void ov23_RevertPlayerStatusToNormal(int netID);
3838
void ov23_0224ADB0(int param0, int param1, int param2, int param3);
3939
void ov23_0224ADE8(int param0, int param1, int param2, int param3);
4040
BOOL ov23_0224AE60(int param0);
41-
BOOL ov23_0224AEA4(int param0);
42-
BOOL ov23_0224AEC4(int param0, int param1);
41+
BOOL ov23_IsPlayerHoldingFlag(int param0);
42+
BOOL ov23_TryTakeFlag(int param0, int param1);
4343
void ov23_0224AF4C(int param0);
4444
void ov23_0224AF7C(int param0);
4545
void ov23_ShowExclamationEmote(int netID);

include/overlay023/ov23_0225128C.h

Lines changed: 0 additions & 15 deletions
This file was deleted.

include/overlay023/ov23_022521F0.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ void ov23_02252CD4(void);
1111
void ov23_02252CE0(int param0, int param1);
1212
void ov23_02252CF4(int param0, int param1);
1313
void ov23_02252D08(int param0, int param1);
14-
void ov23_02252D74(UndergroundMenu *param0, int param1);
15-
void ov23_02252DF4(UndergroundMenu *param0);
16-
void ov23_02252E18(UndergroundMenu *param0);
14+
void UndergroundMenu_PrintMenuDescription(UndergroundMenu *param0, int param1);
15+
void UndergroundMenu_RemoveDescriptionWindow(UndergroundMenu *param0);
16+
void UndergroundMenu_RemoveDescriptionWindowInstant(UndergroundMenu *param0);
1717
void ov23_022534A0(FieldSystem *fieldSystem);
1818

1919
#endif // POKEPLATINUM_OV23_022521F0_H

include/overlay023/underground_menu.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ typedef struct UndergroundMenu {
4040
FieldSystem *fieldSystem;
4141
Window primaryWindow;
4242
Window secondaryWindow;
43-
Window unk_30;
43+
Window menuDescriptionWindow;
4444
StringList *menuOptions;
4545
StringList *itemSelectedOptions;
4646
ListMenu *unk_48;
@@ -113,11 +113,12 @@ void UndergroundMenu_StartHoldingFlag(ExitCallback exitCallback, FieldSystem *fi
113113
void UndergroundMenu_PrintGoodDescription(ListMenu *listMenu, u32 index, u8 onInit);
114114
void ov23_02250CB0(UndergroundMenu *menu);
115115
void UndergroundMenu_OpenGoodsMenu(UndergroundMenu *menu);
116-
void ov23_02250D2C(UndergroundMenu *menu);
117-
void ov23_02250D5C(UndergroundMenu *menu);
118-
void UndergroundMenu_ExitGiftMenu(void *data, u32 input);
116+
void UndergroundMenu_OpenStoreGoodsMenu(UndergroundMenu *menu);
117+
void UndergroundMenu_OpenWithdrawGoodsMenu(UndergroundMenu *menu);
118+
void UndergroundMenu_Exit(void *data, u32 input);
119119
void *UndergroundMenu_StartGiftMenu(ExitCallback exitCallback, FieldSystem *fieldSystem);
120120
void UndergroundMenu_MoveListCursorPosInBounds(UndergroundMenu *menu, int maxDisplay, int count);
121-
void ov23_02251270(SysTask *sysTask, void *param1);
121+
void UndergroundMenu_ResetBrightnessAndExit(SysTask *sysTask, void *data);
122+
void UndergroundMenu_UpdateScrollPrompts(UndergroundMenu *menu, int listPos, int count, int maxDisplay);
122123

123124
#endif // POKEPLATINUM_OV23_0224F294_H
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#ifndef POKEPLATINUM_UNDERGROUND_PC_H
2+
#define POKEPLATINUM_UNDERGROUND_PC_H
3+
4+
#include "overlay023/underground_defs.h"
5+
#include "overlay023/underground_menu.h"
6+
7+
#define PC_NONE 0xFF
8+
9+
int UndergroundPC_GetPCAtCoordinates(Coordinates *coordinates, int dir);
10+
BOOL UndergroundPC_TryUsePC(int netID, Coordinates *coordinates);
11+
void UndergroundPC_ProcessPCInteraction(int unused0, int unused1, void *data, void *data2);
12+
int CommPacketSizeOf_PCInteraction(void);
13+
void UndergroundPC_ProcessTakeFlagAttempt(int unused0, int unused1, void *data, void *unused3);
14+
void UndergroundPC_ProcessTakenFlag(int unused0, int unused1, void *data, void *unused3);
15+
16+
#endif // POKEPLATINUM_UNDERGROUND_PC_H

include/player_avatar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void sub_0205EB08(PlayerAvatar *playerAvatar, int param1);
5757
int PlayerAvatar_MoveState(const PlayerAvatar *playerAvatar);
5858
void sub_0205EB10(PlayerAvatar *playerAvatar, int param1);
5959
int Player_MoveState(const PlayerAvatar *playerAvatar);
60-
void PlayerAvatar_SetHidden(PlayerAvatar *playerAvatar, int param1);
60+
void PlayerAvatar_SetVisible(PlayerAvatar *playerAvatar, BOOL hidden);
6161
void PlayerAvatar_SetMapObject(PlayerAvatar *playerAvatar, MapObject *param1);
6262
MapObject *Player_MapObject(PlayerAvatar *playerAvatar);
6363
const MapObject *PlayerAvatar_ConstMapObject(const PlayerAvatar *playerAvatar);

0 commit comments

Comments
 (0)