Implement & link m_bank_ovl.c

This commit is contained in:
Cuyler36
2023-08-07 01:28:46 -04:00
parent ff9bf7e84f
commit cb53863324
15 changed files with 561 additions and 19 deletions
+2
View File
@@ -10,6 +10,8 @@ extern "C" {
/* audio is monophonic */
#define MONO(id) (id | 0x1000)
#define SE_CURSOR_MOVE 0x01
#define SE_MENU_EXIT 0x02
#define SE_COIN 0x4C
#define SE_REGISTER MONO(0x50)
+1 -1
View File
@@ -112,7 +112,7 @@ extern int lbRTC_IsOverTime(const lbRTC_time_c* t0, const lbRTC_time_c* t1);
extern int lbRTC_IsOverRTC(const lbRTC_time_c* time);
extern int lbRTC_IntervalTime(const lbRTC_time_c* time0, const lbRTC_time_c* time1);
extern int lbRTC_GetIntervalDays(const lbRTC_time_c* t0, const lbRTC_time_c* t1);
extern int lbRTC_GetIntervalDays2(const lbRTC_ymd_t* ymd0, const lbRTC_ymd_t* ymd1);
extern int lbRTC_GetIntervalDays2(lbRTC_ymd_t* ymd0, lbRTC_ymd_t* ymd1);
extern void lbRTC_Add_YY(lbRTC_time_c* time, int year);
extern void lbRTC_Add_MM(lbRTC_time_c* time, int month);
extern void lbRTC_Add_DD(lbRTC_time_c* time, int day);
+33
View File
@@ -0,0 +1,33 @@
#ifndef M_BANK_OVL_H
#define M_BANK_OVL_H
#include "types.h"
#include "m_bank_ovl_h.h"
#include "m_submenu_ovl.h"
#ifdef __cplusplus
extern "C" {
#endif
#define mBN_CURSOL_MAX 5
#define mBN_CUSROL_OK 6
#define mBN_DEPOSIT_MAX 999999999
struct bank_ovl_s {
int player_max_bell; /* maximum amount of bells the player can hold */
int player_bell; /* bells the player started with when opening the bank window */
int now_bell; /* current bells the player has */
int bank_bell; /* current bells the bank has */
int cursol; /* cursor position */
int bell; /* change in bells */
};
extern void mBN_bank_ovl_set_proc(Submenu* submenu);
extern void mBN_bank_ovl_construct(Submenu* submenu);
extern void mBN_bank_ovl_destruct(Submenu* submenu);
#ifdef __cplusplus
}
#endif
#endif
+16
View File
@@ -0,0 +1,16 @@
#ifndef M_BANK_OVL_H_H
#define M_BANK_OVL_H_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct bank_ovl_s mBN_Overlay_c;
#ifdef __cplusplus
}
#endif
#endif
+7 -1
View File
@@ -7,7 +7,9 @@
#include "graph.h"
#include "m_mail.h"
#include "PR/mbi.h"
#include "PreRender.h"
#include "m_map_ovl_h.h"
#include "m_bank_ovl_h.h"
#ifdef __cplusplus
extern "C" {
@@ -75,6 +77,8 @@ typedef void (*mSM_DRAW_MAIL_PROC)(GRAPH*, f32, f32, f32, Mail_c*, int, int);
typedef void (*mSM_SETUP_VIEW_PROC)(Submenu*, GRAPH*, int);
typedef void (*mSM_CHANGE_VIEW_PROC)(GRAPH*, f32, f32, f32, s16, int, int);
typedef void (*mSM_MOVE_PROC)(Submenu*, mSM_MenuInfo_c*);
/* sizeof(struct submenu_overlay_s) == 0xA04 */
struct submenu_overlay_s {
/* TODO: finish */
@@ -95,7 +99,9 @@ struct submenu_overlay_s {
/* 0x96C */ mSM_CHANGE_VIEW_PROC change_view_proc;
/* 0x970 */ u8 _940[0x9B4 - 0x970];
/* 0x9B4 */ mMP_Overlay_c* map_ovl;
/* 0x9B8 */ u8 _9B8[0xA00 - 0x9B8];
/* 0x9B8 */ u8 _9B8[0x9D4 - 0x9B8];
/* 0x9D4 */ mBN_Overlay_c* bank_ovl;
/* 0x9D8 */ u8 _9D8[0xA00 - 0x9D8];
/* 0xA00 */ Mtx* projection_matrix;
};
+1 -1
View File
@@ -77,7 +77,7 @@ extern int mTM_check_renew_time(u8 renew_flag);
extern void mTM_off_renew_time(u8 renew_flag);
extern void mTM_set_renew_is();
extern void mTM_set_renew_time(lbRTC_ymd_t* renew_time, const lbRTC_time_c* time);
extern void mTM_ymd_2_time(lbRTC_time_c* time, const lbRTC_ymd_t* ymd);
extern void mTM_ymd_2_time(lbRTC_time_c* time, lbRTC_ymd_t* ymd);
extern void mTM_renewal_renew_time();
extern void mTM_clear_renew_is();
extern void mTM_rtcTime_limit_check();
+16
View File
@@ -1,6 +1,12 @@
#ifndef TYPES_H
#define TYPES_H
#include "../tools/ppcdis/include/ppcdis.h"
#ifdef IS_REL
//#pragma section const_type sconst_type ".rodata" ".rodata" data_mode=far_abs code_mode=pc_rel
#endif
typedef signed char s8;
typedef signed short s16;
typedef signed long s32;
@@ -73,4 +79,14 @@ typedef u32 unknown;
#define FORCESTRIP
#endif
#if !defined(__INTELLISENSE__) && defined(MUST_MATCH)
#define BSS_ORDER_GROUP_START FORCESTRIP ORDER_BSS_DATA {
#define BSS_ORDER_GROUP_END }
#define BSS_ORDER_ITEM(v) ORDER_BSS(v)
#else
#define BSS_ORDER_GROUP_START
#define BSS_ORDER_GROUP_END
#define BSS_ORDER_ITEM(v)
#endif
#endif