Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions headers/data/overlay18.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ extern struct simple_menu_id_item LINK_SHOP_SUBMENU_ITEMS_6[9];
extern struct simple_menu_id_item LINK_SHOP_SUBMENU_ITEMS_7[9];
extern void* OVERLAY18_FUNCTION_POINTER_TABLE[76];
extern undefined4 OV18_STATIC_INITIALIZER;
extern struct link_shop* LINK_SHOP_PTR;

#endif
1 change: 1 addition & 0 deletions headers/functions/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "overlay11.h"
#include "overlay13.h"
#include "overlay14.h"
#include "overlay18.h"
#include "overlay19.h"
#include "overlay29.h"
#include "overlay30.h"
Expand Down
8 changes: 8 additions & 0 deletions headers/functions/overlay18.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef HEADERS_FUNCTIONS_OVERLAY18_H_
#define HEADERS_FUNCTIONS_OVERLAY18_H_

int LinkShopEntryPoint(void);
void LinkShopDestructor(void);
int LinkShopMainManager(void);

#endif
57 changes: 57 additions & 0 deletions headers/types/ground_mode/ground_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -968,4 +968,61 @@ struct ground_bg {
};
ASSERT_SIZE(struct ground_bg, 1372);

struct link_shop {
int8_t window_id_0x0;
int8_t portrait_window_id; // 0x1
int8_t window_id_0x2;
int8_t window_id_0x3;
int8_t window_id_0x4;
int8_t window_id_0x5;
int8_t window_id_0x6;
int8_t window_id_0x7;
int8_t window_id_0x8;
int8_t scroll_box_window_id; // 0x9
int8_t window_id_0xa;
int8_t window_id_0xb;
int8_t window_id_0xc;
int8_t window_id_0xd;
int8_t window_id_0xe;
int8_t window_id_0xf;
bool unk_0x10;
undefined padding_0x11[3];
struct preprocessor_args preprocessor_args; // 0x14
struct portrait_params portrait_params; // 0x64
undefined4
unk_0x74; // Potentially also some state value; used in a switch in LinkShopMainManager.
uint32_t state; // 0x78: Current state of the link shop menu; used in a switch in
// LinkShopMainManager. Could be an enum.
undefined4
unk_0x7c; // Potentially also some state value; used in a switch in LinkShopMainManager.
uint32_t next_state; // 0x80: Next value for state.
undefined4 unk_0x84;
undefined4 unk_0x88;
undefined2 unk_0x8c;
undefined2 padding_0x8e;
struct window_extra_info extra_info_1; // 0x90
struct window_extra_info extra_info_2; // 0x128
struct window_extra_info extra_info_3; // 0x1C0
struct window_extra_info extra_info_4; // 0x258
struct window_extra_info extra_info_5; // 0x2F0
undefined2 unk_0x388;
undefined2 unk_0x38a;
int16_t member_idx; // 0x38C: Index in TEAM_MEMBER_TABLE for the selected monster.
undefined2 padding_0x38e;
undefined4 unk_0x390;
uint8_t unk_0x394[8];
undefined4 unk_0x39c;
undefined4 unk_0x3a0;
undefined2 unk_0x3a4;
undefined1 unk_0x3a6; // This through 0x3AD is filled with a memcpy; may be a smaller struct.
undefined1 unk_0x3a7; // Could not find direct use of this; may be padding.
undefined2 unk_0x3a8;
undefined2 unk_0x3aa;
undefined1 unk_0x3ac;
undefined1 unk_0x3ad;
char name[10]; // 0x3AE: Name of the selected monster.
undefined unk_0x3b8[12]; // Could not find direct use of this, probably not padding though.
};
ASSERT_SIZE(struct link_shop, 964);

#endif
37 changes: 34 additions & 3 deletions symbols/overlay18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,36 @@ overlay18:
NA: 0x3500
JP: 0x3520
description: Controls the Electivire Link Shop.
functions: []
functions:
- name: LinkShopEntryPoint
address:
EU: 0x238AC80
NA: 0x238A140
JP: 0x238B6A0
description: |-
Is the entrypoint of the overlay_load_entry, and seems to run once to initiate the Link Shop. Is not called anywhere else.
Allocates space for link_shop, and initializes many of its fields.

return: Always returns 1.
- name: LinkShopDestructor
address:
EU: 0x238BB14
NA: 0x238AFD4
JP: 0x238C530
description: |-
Is the destructor of the overlay_load_entry, and seems to run once on closing the Link Shop. Is not called anywhere else.
Frees up the allocated space for link_shop if it is not already empty.

No params.
- name: LinkShopMainManager
address:
EU: 0x238BB5C
NA: 0x238B01C
JP: 0x238C578
description: |-
Called every frame the Electivire Link Shop is open. Handles the majority of the menu.

return: Usually returns 1. Returns 4 when exiting the Link Shop.
data:
- name: LINK_SHOP_WINDOW_PARAMS_1
address:
Expand Down Expand Up @@ -214,14 +243,16 @@ overlay18:
NA: 0x4
JP: 0x4
description: Static initializer for overlay 18.
- name: OVERLAY18_UNKNOWN_POINTER__NA_238D620
- name: LINK_SHOP_PTR
address:
EU: 0x238E160
NA: 0x238D620
JP: 0x238EBA0
length:
EU: 0x4
NA: 0x4
description: "Note: unverified, ported from Irdkwia's notes"
JP: 0x4
description: Pointer to the heap-allocated link_shop struct.
- name: OVERLAY18_UNKNOWN_POINTER__NA_238D624
address:
NA: 0x238D624
Expand Down
Loading