mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 06:34:18 -04:00
Implement & match most of m_board_ovl
This commit is contained in:
+26
-4
@@ -10,6 +10,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define mBD_MAX_WIDTH 192
|
||||
#define mBD_BODY_LINE_NUM 6
|
||||
|
||||
enum {
|
||||
@@ -20,12 +21,29 @@ enum {
|
||||
mBD_FIELD_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mBD_LINE_CHECK_OK,
|
||||
mBD_LINE_CHECK_NEWLINE,
|
||||
mBD_LINE_CHECK_OVERLINE,
|
||||
mBD_LINE_CHECK_OVERSTRING,
|
||||
|
||||
mBD_LINE_CHECK_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mBD_HEADER_POS_PRE_NAME,
|
||||
mBD_HEADER_POS_ON_NAME,
|
||||
mBD_HEADER_POS_POST_NAME,
|
||||
|
||||
mBD_HEADER_POS_NUM
|
||||
};
|
||||
|
||||
struct board_ovl_s {
|
||||
u8 field;
|
||||
u8 _01;
|
||||
u8 _02;
|
||||
u8 _03;
|
||||
u8 _04;
|
||||
u8 center_line;
|
||||
u8 header_pos;
|
||||
u8 header_name_len;
|
||||
u8 first;
|
||||
u8 lengths[mBD_FIELD_NUM];
|
||||
Mail_c mail;
|
||||
Mail_c* dst_p;
|
||||
@@ -35,6 +53,10 @@ struct board_ovl_s {
|
||||
int _144;
|
||||
};
|
||||
|
||||
extern void mBD_board_ovl_set_proc(Submenu* submenu);
|
||||
extern void mBD_board_ovl_construct(Submenu* submenu);
|
||||
extern void mBD_board_ovl_destruct(Submenu* submenu);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@ extern "C" {
|
||||
|
||||
/* TODO: verify these */
|
||||
enum {
|
||||
mEE_TYPE_DIARY,
|
||||
mEE_TYPE_BOARD,
|
||||
mEE_TYPE_NOTICE,
|
||||
mEE_TYPE_MSCORE,
|
||||
mEE_TYPE_CPORIGINAL,
|
||||
|
||||
+2
-1
@@ -52,7 +52,8 @@ enum {
|
||||
mMl_TYPE_XMAS = 1,
|
||||
mMl_TYPE_SHOP_SALE_LEAFLET = 2,
|
||||
mMl_TYPE_BROKER_SALE_LEAFLET = 3,
|
||||
|
||||
mMl_TYPE_4 = 4,
|
||||
mMl_TYPE_5 = 5,
|
||||
mMl_TYPE_HRA = 6,
|
||||
|
||||
mMl_TYPE_FISHING_CONTENST = 9,
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "m_repay_ovl_h.h"
|
||||
#include "m_notice_ovl_h.h"
|
||||
#include "m_birthday_ovl_h.h"
|
||||
#include "m_tag_ovl_h.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -124,7 +125,7 @@ struct submenu_overlay_s {
|
||||
/* 0x970 */ void* _970;
|
||||
/* 0x974 */ void* _974;
|
||||
/* 0x978 */ void* _978;
|
||||
/* 0x97C */ void* _97C;
|
||||
/* 0x97C */ mTG_Ovl_c* tag_ovl;
|
||||
/* 0x980 */ void* _980;
|
||||
/* 0x984 */ mHP_Ovl_c* hanwiaPortrait_ovl;
|
||||
/* 0x988 */ void* inventory_ovl;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef M_TAG_OVL_H
|
||||
#define M_TAG_OVL_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_tag_ovl_h.h"
|
||||
#include "m_submenu_ovl.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*mTG_INIT_TAG_DATA_ITEM_WIN_PROC)(Submenu*);
|
||||
|
||||
/* TODO */
|
||||
struct tag_ovl_s {
|
||||
/* 0x000 */ u8 _000[0x2E0 - 0x000];
|
||||
/* 0x2E0 */ mTG_INIT_TAG_DATA_ITEM_WIN_PROC init_tag_data_item_win_proc;
|
||||
/* 0x2E4 */ u8 _2E4[0x3C4 - 0x2E4];
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef M_TAG_OVL_H_H
|
||||
#define M_TAG_OVL_H_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct tag_ovl_s mTG_Ovl_c;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+1649
File diff suppressed because it is too large
Load Diff
+7
-7
@@ -1328,21 +1328,21 @@ static void mED_edit_func_letter_header(Submenu* submenu, mSM_MenuInfo_c* menu_i
|
||||
if (overlay->menu_info[mSM_OVL_BOARD].data0 == 3) {
|
||||
mED_edit_func_single_line(submenu, menu_info);
|
||||
}
|
||||
else if (board_ovl->_02 != 1) {
|
||||
else if (board_ovl->header_pos != mBD_HEADER_POS_ON_NAME) {
|
||||
s16 len = editor_ovl->now_str_len;
|
||||
|
||||
if (
|
||||
board_ovl->mail.content.header_back_start == editor_ovl->cursor_idx &&
|
||||
((board_ovl->_02 == 0 && editor_ovl->command == mED_COMMAND_CURSOL_RIGHT) ||
|
||||
(board_ovl->_02 == 2 && (editor_ovl->command == mED_COMMAND_CURSOL_LEFT || editor_ovl->command == mED_COMMAND_BACKSPACE)))
|
||||
((board_ovl->header_pos == mBD_HEADER_POS_PRE_NAME && editor_ovl->command == mED_COMMAND_CURSOL_RIGHT) ||
|
||||
(board_ovl->header_pos == mBD_HEADER_POS_POST_NAME && (editor_ovl->command == mED_COMMAND_CURSOL_LEFT || editor_ovl->command == mED_COMMAND_BACKSPACE)))
|
||||
) {
|
||||
board_ovl->_02 = 1;
|
||||
board_ovl->header_pos = mBD_HEADER_POS_ON_NAME;
|
||||
editor_ovl->command_processed = TRUE;
|
||||
}
|
||||
else {
|
||||
mED_edit_func_single_line(submenu, menu_info);
|
||||
|
||||
if (board_ovl->_02 == 0) {
|
||||
if (board_ovl->header_pos == mBD_HEADER_POS_PRE_NAME) {
|
||||
if (len > editor_ovl->now_str_len) {
|
||||
board_ovl->mail.content.header_back_start --;
|
||||
}
|
||||
@@ -1502,7 +1502,7 @@ static void mED_move_letter_table(mED_Ovl_c* editor_ovl, mBD_Ovl_c* board_ovl, S
|
||||
int next_field;
|
||||
int upper;
|
||||
|
||||
if (field == mBD_FIELD_HEADER && board_ovl->_02 == 1) {
|
||||
if (field == mBD_FIELD_HEADER && board_ovl->header_pos == mBD_HEADER_POS_ON_NAME) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1524,7 +1524,7 @@ static void mED_move_letter_table(mED_Ovl_c* editor_ovl, mBD_Ovl_c* board_ovl, S
|
||||
|
||||
editor_ovl->command_processed = TRUE;
|
||||
board_ovl->field = next_field;
|
||||
board_ovl->_02 = 0;
|
||||
board_ovl->header_pos = mBD_HEADER_POS_PRE_NAME;
|
||||
editor_ovl->input_length = letter_table_col[next_field];
|
||||
editor_ovl->line_width = letter_table_width[next_field];
|
||||
menu_info->data3 = letter_table_width[next_field];
|
||||
|
||||
Reference in New Issue
Block a user