m_card equivalent, 99%

This commit is contained in:
Cuyler36
2025-05-22 17:58:03 -04:00
parent 91d98a55d0
commit 103c882e72
5 changed files with 1693 additions and 25 deletions
+1 -1
View File
@@ -1380,7 +1380,7 @@ config.libs = [
Object(Matching, "game/m_calendar.c"),
Object(Matching, "game/m_calendar_ovl.c"),
Object(Matching, "game/m_camera2.c"),
Object(NonMatching, "game/m_card.c"),
Object(Equivalent, "game/m_card.c"),
Object(Matching, "game/m_catalog_ovl.c"),
Object(Matching, "game/m_choice.c"),
Object(Matching, "game/m_clip.c"),
+1
View File
@@ -2,6 +2,7 @@
#define _STDDEF_H_
#define offsetof(type, member) ((size_t) &(((type *) 0)->member))
#define membersize(type, member) (sizeof(((type*)0)->member))
#ifndef _SIZE_T_DEF
#define _SIZE_T_DEF
+19 -2
View File
@@ -1,6 +1,7 @@
#ifndef M_CARD_H
#define M_CARD_H
#include "dolphin/types.h"
#include "types.h"
#include "libu64/gfxprint.h"
#include "m_personal_id.h"
@@ -186,11 +187,14 @@ typedef struct {
typedef struct {
CARDStat stat;
s32 fileNo;
s32 freeBlocks;
s32 freeBytes;
s32 result;
s32 game_result;
void* workArea;
u8 _80[0x94 - 0x80];
u8 _80[0x8C - 0x80];
int _8C;
int _90;
} mCD_memMgr_card_info_c;
typedef struct {
@@ -260,6 +264,19 @@ typedef union {
u8 __align_sector[mCD_MEMCARD_SECTORSIZE];
} PresentSaveFile_c ATTRIBUTE_ALIGN(32);
typedef struct {
MemcardHeader_c header;
u16 checksum; // presumed
mCD_keep_mail_c keep_mail ATTRIBUTE_ALIGN(32);
mCD_keep_original_c keep_original ATTRIBUTE_ALIGN(32);
mCD_keep_diary_c keep_diary ATTRIBUTE_ALIGN(32);
} OthersSave_c;
typedef union {
OthersSave_c save;
u8 __align[ALIGN_NEXT(sizeof(OthersSave_c), mCD_MEMCARD_SECTORSIZE)];
} OthersSave_u;
enum {
mCD_PRESENT_TYPE_BONUS,
mCD_PRESENT_TYPE_GIFT,
+5 -1
View File
@@ -1,6 +1,7 @@
#ifndef M_COMMON_DATA_H
#define M_COMMON_DATA_H
#include "m_mail.h"
#include "types.h"
#include "m_actor_type.h"
#include "m_land_h.h"
@@ -214,7 +215,10 @@ typedef struct common_data_s {
/* 0x026521 */ u8 submenu_disabled; /* when set, submenus cannot be accessed from start button */
/* 0x026522 */ u8 sunlight_flag;
/* 0x026523 */ u8 train_flag;
/* 0x026522 */ u8 _26524[0x26668 - 0x26524];
/* 0x026522 */ Mail_c unused_mail_26522; //u8 _26524[0x26668 - 0x26524];
/* 0x02664E */ mActor_name_t _2664E;
/* 0x026650 */ mActor_name_t _26650;
/* 0x026652 */ Mail_nm_c unused_mail_name_26652;
/* 0x026668 */ mActor_name_t npc_chg_cloth;
/* 0x02666A */ u16 _pad_2666A; // weather data is probably a struct aligned to 4 bytes
/* 0x02666C */ s16 weather;
+1667 -21
View File
File diff suppressed because it is too large Load Diff