mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 06:34:18 -04:00
Add definitions for flooring & walls, minor m_card work
This commit is contained in:
@@ -21,3 +21,5 @@ tools/cli.py
|
||||
src/data/bin1
|
||||
src/data/bin2
|
||||
objdiff.json
|
||||
src/data/item/player_room_floor
|
||||
src/data/item/player_room_wall
|
||||
|
||||
@@ -438,6 +438,13 @@ FAMICOM_BASE = CFLAGS + [
|
||||
"-enum int",
|
||||
"-sym on"
|
||||
] + DOL_DEFINES
|
||||
JAUDIO_BASE = CFLAGS + [
|
||||
"-lang=c++",
|
||||
"-sdata 8",
|
||||
"-sdata2 8",
|
||||
"-enum int",
|
||||
"-common on"
|
||||
] + DOL_DEFINES
|
||||
|
||||
JSYSTEM_CFLAGS = ' '.join(JSYSTEM_BASE + LOCAL_CFLAGS)
|
||||
JSYSTEM_JGADGET_CFLAGS = ' '.join(JSYSTEM_JGADGET_BASE + LOCAL_CFLAGS)
|
||||
@@ -454,6 +461,7 @@ EXTERNAL_DOL_CFLAGS = ' '.join(BASE_DOL_CFLAGS)
|
||||
EXTERNAL_REL_CFLAGS = ' '.join(BASE_REL_CFLAGS)
|
||||
PREPROCESS_CFLAGS = ' '.join(PREPROCESSOR_CFLAGS)
|
||||
FAMICOM_CLFAGS = ' '.join(FAMICOM_BASE + LOCAL_CFLAGS)
|
||||
JAUDIO_CFLAGS = ' '.join(JAUDIO_BASE + LOCAL_CFLAGS)
|
||||
|
||||
DOL_LDFLAGS = ' '.join([
|
||||
"-maxerrors 1",
|
||||
|
||||
@@ -6,6 +6,12 @@ blocked_targets:
|
||||
- 0x80008000
|
||||
- 0x801F6C7C # tcs_bad
|
||||
- 0x801F6C7D # ics_bad
|
||||
- 0x800a9a90
|
||||
- 0x800a9838
|
||||
- 0x800a9938
|
||||
- 0x800a9a3a
|
||||
- 0x800a99f6
|
||||
- 0x800a9a18
|
||||
forced_types:
|
||||
0x80003534: FUNCTION
|
||||
0x80005468: FUNCTION
|
||||
|
||||
@@ -390,3 +390,42 @@ config/rel.yml:
|
||||
addrs: [0x80F8C448, 0x80F8C468]
|
||||
type: pal16
|
||||
# ac_koinobori
|
||||
|
||||
# dataobj.obj item names
|
||||
itemName_paper:
|
||||
addrs: [0x808BF660, 0x808C0660]
|
||||
itemName_money:
|
||||
addrs: [0x808C0660, 0x808C06A0]
|
||||
itemName_tool:
|
||||
addrs: [0x808C06A0, 0x808C0C60]
|
||||
itemName_fish:
|
||||
addrs: [0x808C0C60, 0x808C0EE0]
|
||||
itemName_cloth:
|
||||
addrs: [0x808C0EE0, 0x808C1ED0]
|
||||
itemName_etc:
|
||||
addrs: [0x808C1ED0, 0x808C21E0]
|
||||
itemName_carpet:
|
||||
addrs: [0x808C21E0, 0x808C2610]
|
||||
itemName_wall:
|
||||
addrs: [0x808C2610, 0x808C2A40]
|
||||
itemName_fruit:
|
||||
addrs: [0x808C2A40, 0x808C2AC0]
|
||||
itemName_plant:
|
||||
addrs: [0x808C2AC0, 0x808C2B70]
|
||||
itemName_minidisk:
|
||||
addrs: [0x808C2B70, 0x808C2EE0]
|
||||
itemName_dummy:
|
||||
addrs: [0x808C2EE0, 0x808C2FE0]
|
||||
itemName_ticket:
|
||||
addrs: [0x808C2FE0, 0x808C35E0]
|
||||
itemName_insect:
|
||||
addrs: [0x808C35E0, 0x808C38B0]
|
||||
itemName_hukubukuro:
|
||||
addrs: [0x808C38B0, 0x808C38D0]
|
||||
itemName_kabu:
|
||||
addrs: [0x808C38D0, 0x808C3910]
|
||||
ftrName_table:
|
||||
addrs: [0x808C3910, 0x808C7910]
|
||||
ftrName2_table:
|
||||
addrs: [0x808C7910, 0x808C8830]
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ nintendo_hi_0.c:
|
||||
.data: [0x800c3140, 0x800cca40]
|
||||
jaudio_NES/dummyprobe.c:
|
||||
.text: [0x800083f8, 0x80008400]
|
||||
# jaudio_NES/game64.c: # TODO: finish
|
||||
# .rodata: [0x800a9938, 0x800a9b98]
|
||||
#jaudio_NES/verysimple.c:
|
||||
# .text: [0x80008400, 0x80008480]
|
||||
# .sdata: [0x80217b80, 0x80217b88]
|
||||
|
||||
@@ -900,6 +900,8 @@ data/field/bg/earth_pal.c:
|
||||
.data: [0x80C90100, 0x80C90280]
|
||||
data/field/bg/rail_pal.c:
|
||||
.data: [0x80F8C2C8, 0x80F8C460]
|
||||
data/item/item_name.c:
|
||||
.data: [0x808BF660, 0x808C8830]
|
||||
m_bg_tex.c:
|
||||
.bss: [0x8125AC80, 0x81263080]
|
||||
sys_stacks.c:
|
||||
|
||||
@@ -629,6 +629,9 @@ class CSource(Source):
|
||||
if path.startswith("src/static/dolphin/"):
|
||||
self.cflags = c.SDK_FLAGS
|
||||
self.cc = c.OCC
|
||||
elif path.startswith("src/static/jaudio_NES/"):
|
||||
self.cflags = c.JAUDIO_CFLAGS
|
||||
self.cc = c.CC
|
||||
elif path.startswith("src/static/JSystem/JGadget/"):
|
||||
self.cflags = c.JSYSTEM_JGADGET_CFLAGS
|
||||
self.cc = c.CC
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
#ifndef CARD_H
|
||||
#define CARD_H
|
||||
|
||||
#include "types.h"
|
||||
#include "dolphin/card.h"
|
||||
#include "dolphin/dvd.h"
|
||||
#include "dolphin/os/OSAlarm.h"
|
||||
#include "dolphin/os/OSThread.h"
|
||||
#include "dolphin/dsp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct CARDDir {
|
||||
// total size: 0x40
|
||||
u8 gameName[4]; // offset 0x0, size 0x4
|
||||
u8 company[2]; // offset 0x4, size 0x2
|
||||
u8 _padding0; // offset 0x6, size 0x1
|
||||
u8 bannerFormat; // offset 0x7, size 0x1
|
||||
u8 fileName[CARD_FILENAME_MAX]; // offset 0x8, size 0x20
|
||||
u32 time; // offset 0x28, size 0x4
|
||||
u32 iconAddr; // offset 0x2C, size 0x4
|
||||
u16 iconFormat; // offset 0x30, size 0x2
|
||||
u16 iconSpeed; // offset 0x32, size 0x2
|
||||
u8 permission; // offset 0x34, size 0x1
|
||||
u8 copyTimes; // offset 0x35, size 0x1
|
||||
u16 startBlock; // offset 0x36, size 0x2
|
||||
u16 length; // offset 0x38, size 0x2
|
||||
u8 _padding1[2]; // offset 0x3A, size 0x2
|
||||
u32 commentAddr; // offset 0x3C, size 0x4
|
||||
} CARDDir;
|
||||
|
||||
typedef struct CARDControl {
|
||||
// total size: 0x110
|
||||
int attached; // offset 0x0, size 0x4
|
||||
s32 result; // offset 0x4, size 0x4
|
||||
u16 size; // offset 0x8, size 0x2
|
||||
u16 pageSize; // offset 0xA, size 0x2
|
||||
s32 sectorSize; // offset 0xC, size 0x4
|
||||
u16 cBlock; // offset 0x10, size 0x2
|
||||
u16 vendorID; // offset 0x12, size 0x2
|
||||
s32 latency; // offset 0x14, size 0x4
|
||||
u8 id[12]; // offset 0x18, size 0xC
|
||||
int mountStep; // offset 0x24, size 0x4
|
||||
int formatStep; // offset 0x28, size 0x4
|
||||
u32 scramble; // offset 0x2C, size 0x4
|
||||
DSPTaskInfo task; // offset 0x30, size 0x50
|
||||
void* workArea; // offset 0x80, size 0x4
|
||||
CARDDir* currentDir; // offset 0x84, size 0x4
|
||||
u16* currentFat; // offset 0x88, size 0x4
|
||||
OSThreadQueue threadQueue; // offset 0x8C, size 0x8
|
||||
u8 cmd[9]; // offset 0x94, size 0x9
|
||||
s32 cmdlen; // offset 0xA0, size 0x4
|
||||
u32 mode; // offset 0xA4, size 0x4
|
||||
int retry; // offset 0xA8, size 0x4
|
||||
int repeat; // offset 0xAC, size 0x4
|
||||
u32 addr; // offset 0xB0, size 0x4
|
||||
void* buffer; // offset 0xB4, size 0x4
|
||||
s32 xferred; // offset 0xB8, size 0x4
|
||||
u16 freeNo; // offset 0xBC, size 0x2
|
||||
u16 startBlock; // offset 0xBE, size 0x2
|
||||
CARDFileInfo* fileInfo; // offset 0xC0, size 0x4
|
||||
CARDCallback extCallback; // offset 0xC4, size 0x4
|
||||
CARDCallback txCallback; // offset 0xC8, size 0x4
|
||||
CARDCallback exiCallback; // offset 0xCC, size 0x4
|
||||
CARDCallback apiCallback; // offset 0xD0, size 0x4
|
||||
CARDCallback xferCallback; // offset 0xD4, size 0x4
|
||||
CARDCallback eraseCallback; // offset 0xD8, size 0x4
|
||||
CARDCallback unlockCallback; // offset 0xDC, size 0x4
|
||||
OSAlarm alarm; // offset 0xE0, size 0x28
|
||||
u32 cid; // offset 0x108, size 0x4
|
||||
const DVDDiskID* diskID; // offset 0x10C, size 0x4
|
||||
} CARDControl;
|
||||
|
||||
s32 __CARDGetStatusEx(s32 chan, s32 fileNo, CARDDir* dirent);
|
||||
s32 __CARDSetStatusExAsync(s32 chan, s32 fileNo, CARDDir* dirent, CARDCallback callback);
|
||||
s32 __CARDSetStatusEx(s32 chan, s32 fileNo, CARDDir* dirent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,8 +1,18 @@
|
||||
#ifndef SEQSETUP_H
|
||||
#define SEQSETUP_H
|
||||
#include "types.h"
|
||||
extern "C"{
|
||||
void Jaq_Reset(void);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct seqp seqp; // TODO
|
||||
|
||||
void Jaq_Reset(void);
|
||||
void Jaq_SetSeqData(seqp* seqp, u8* param_2, u32 param_3, int param_4);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+28
-2
@@ -11,9 +11,34 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum {
|
||||
mCD_ERROR_NOT_ENABLED, // N [not enabled?]
|
||||
mCD_ERROR_AREA, // A [area?]
|
||||
mCD_ERROR_WRITE, // W [write]
|
||||
mCD_ERROR_READ, // R [read?]
|
||||
mCD_ERROR_CHECKSUM, // C [checksum]
|
||||
mCD_ERROR_OUTDATED, // O [outdated]
|
||||
mCD_ERROR_CREATE, // c [create]
|
||||
|
||||
mCD_ERROR_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mCD_SPACE_BG_GET_SLOT,
|
||||
mCD_SPACE_BG_MAIN,
|
||||
|
||||
mCD_SPACE_BG_NUM
|
||||
};
|
||||
|
||||
#define mCD_RESULT_ERROR -1
|
||||
#define mCD_RESULT_BUSY 0
|
||||
#define mCD_RESULT_SUCCESS 1
|
||||
|
||||
#define mCD_MEMCARD_SECTORSIZE 0x2000
|
||||
|
||||
typedef struct {
|
||||
mLd_land_info_c land;
|
||||
PersonalID_c pid[PLAYER_NUM];
|
||||
mLd_land_info_c land;
|
||||
PersonalID_c pid[PLAYER_NUM];
|
||||
} mCD_persistent_data_c;
|
||||
|
||||
extern s32 mCD_GetThisLandSlotNo_code(int* player_no, s32* slot_card_results);
|
||||
@@ -28,6 +53,7 @@ extern void mCD_toNextLand();
|
||||
|
||||
extern int mCD_EraseBrokenLand_bg(void*);
|
||||
extern int mCD_card_format_bg(u8);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "types.h"
|
||||
#include "m_actor_type.h"
|
||||
#include "m_collision_bg.h"
|
||||
#include "m_name_table_floor_decl.h"
|
||||
#include "m_name_table_wall_decl.h"
|
||||
|
||||
/* TODO: these defintions are likely included from an auto-gen source */
|
||||
|
||||
@@ -11,6 +13,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
|
||||
enum {
|
||||
NAME_TYPE_ITEM0, /* Scenery items */
|
||||
NAME_TYPE_FTR0, /* Furniture 0 */
|
||||
@@ -157,6 +161,11 @@ typedef struct offset_table_s {
|
||||
#define HUKUBUKURO_NUM 2
|
||||
#define KABU_NUM 4
|
||||
|
||||
// #define WALL_MY_ORIG_START (72)
|
||||
// #define WALL_MY_ORIG_NUM (8)
|
||||
// #define WALL_MY_ORIG_END ((WALL_MY_ORIG_START + WALL_MY_ORIG_NUM) - 1)
|
||||
// #define WALL_IS_MY_ORIG(idx) ((idx) >= WALL_MY_ORIG_START && (idx) <= WALL_MY_ORIG_END)
|
||||
|
||||
#define PAPER_UNIQUE_NUM 64
|
||||
#define PAINT_NUM 12
|
||||
#define FLOWER_NUM 9
|
||||
@@ -2732,6 +2741,8 @@ extern int mNT_check_unknown(mActor_name_t item_no);
|
||||
|
||||
#define mNT_IS_RESERVE(n) ((n) >= SIGN00 && (n) <= SIGN20)
|
||||
|
||||
// clang-format on
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
#ifndef M_NAME_TABLE_FLOOR_DECL_H
|
||||
#define M_NAME_TABLE_FLOOR_DECL_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FLOOR_NPC000 0
|
||||
#define FLOOR_NPC001 1
|
||||
#define FLOOR_NPC002 2
|
||||
#define FLOOR_NPC003 3
|
||||
#define FLOOR_NPC004 4
|
||||
#define FLOOR_NPC005 5
|
||||
#define FLOOR_NPC006 6
|
||||
#define FLOOR_NPC007 7
|
||||
#define FLOOR_NPC008 8
|
||||
#define FLOOR_NPC009 9
|
||||
#define FLOOR_NPC010 10
|
||||
#define FLOOR_NPC011 11
|
||||
#define FLOOR_NPC012 12
|
||||
#define FLOOR_NPC013 13
|
||||
#define FLOOR_NPC014 14
|
||||
#define FLOOR_NPC015 15
|
||||
#define FLOOR_NPC016 16
|
||||
#define FLOOR_NPC017 17
|
||||
#define FLOOR_NPC018 18
|
||||
#define FLOOR_NPC019 19
|
||||
#define FLOOR_NPC020 20
|
||||
#define FLOOR_NPC021 21
|
||||
#define FLOOR_NPC022 22
|
||||
#define FLOOR_NPC023 23
|
||||
#define FLOOR_NPC024 24
|
||||
#define FLOOR_NPC025 25
|
||||
#define FLOOR_NPC026 26
|
||||
#define FLOOR_NPC027 27
|
||||
#define FLOOR_NPC028 28
|
||||
#define FLOOR_NPC029 29
|
||||
#define FLOOR_NPC030 30
|
||||
#define FLOOR_NPC031 31
|
||||
#define FLOOR_NPC032 32
|
||||
#define FLOOR_NPC033 33
|
||||
#define FLOOR_NPC034 34
|
||||
#define FLOOR_NPC035 35
|
||||
#define FLOOR_NPC036 36
|
||||
#define FLOOR_NPC037 37
|
||||
#define FLOOR_NPC038 38
|
||||
#define FLOOR_NPC039 39
|
||||
#define FLOOR_NPC040 40
|
||||
#define FLOOR_NPC041 41
|
||||
#define FLOOR_NPC042 42
|
||||
#define FLOOR_NPC043 43
|
||||
#define FLOOR_NPC044 44
|
||||
#define FLOOR_NPC045 45
|
||||
#define FLOOR_NPC046 46
|
||||
#define FLOOR_NPC047 47
|
||||
#define FLOOR_NPC048 48
|
||||
#define FLOOR_NPC049 49
|
||||
#define FLOOR_NPC050 50
|
||||
#define FLOOR_NPC051 51
|
||||
#define FLOOR_NPC052 52
|
||||
#define FLOOR_NPC053 53
|
||||
#define FLOOR_NPC054 54
|
||||
#define FLOOR_NPC055 55
|
||||
#define FLOOR_NPC056 56
|
||||
#define FLOOR_NPC057 57
|
||||
#define FLOOR_NPC058 58
|
||||
#define FLOOR_NPC059 59
|
||||
#define FLOOR_NPC060 60
|
||||
#define FLOOR_NPC061 61
|
||||
#define FLOOR_NPC062 62
|
||||
#define FLOOR_NPC063 63
|
||||
#define FLOOR_NPC064 64
|
||||
#define FLOOR_NPC065 65
|
||||
#define FLOOR_NPC066 66
|
||||
#define FLOOR_NPC_END FLOOR_NPC066
|
||||
|
||||
#define FLOOR_ETC_START (FLOOR_NPC_END + 1)
|
||||
#define FLOOR_SHOP1 (FLOOR_ETC_START + 0)
|
||||
#define FLOOR_SHOP2 (FLOOR_ETC_START + 1)
|
||||
#define FLOOR_SHOP3 (FLOOR_ETC_START + 2)
|
||||
#define FLOOR_SHOP4_1 (FLOOR_ETC_START + 3)
|
||||
#define FLOOR_SHOP4_2 (FLOOR_ETC_START + 3)
|
||||
#define FLOOR_PLAYER_ROOM_END (FLOOR_SHOP4_2 + 1)
|
||||
|
||||
#define FLOOR_POST_OFFICE (FLOOR_ETC_START + 4)
|
||||
#define FLOOR_POLICE_BOX (FLOOR_ETC_START + 5)
|
||||
#define FLOOR_BUGGY (FLOOR_ETC_START + 6)
|
||||
#define FLOOR_BROKER_SHOP (FLOOR_ETC_START + 7)
|
||||
#define FLOOR_KAMAKURA (FLOOR_ETC_START + 8)
|
||||
#define FLOOR_MUSEUM_ENTRANCE (FLOOR_ETC_START + 9)
|
||||
#define FLOOR_MUSEUM_FOSSIL (FLOOR_ETC_START + 10)
|
||||
#define FLOOR_MUSEUM_PICTURE (FLOOR_ETC_START + 11)
|
||||
#define FLOOR_MUSEUM_INSECT (FLOOR_ETC_START + 12)
|
||||
#define FLOOR_MUSEUM_FISH (FLOOR_ETC_START + 13)
|
||||
#define FLOOR_MUSEUM_NEEDLEWORK (FLOOR_ETC_START + 14)
|
||||
#define FLOOR_BASEMENT (FLOOR_ETC_START + 15)
|
||||
#define FLOOR_ORIGINAL_SE (FLOOR_ETC_START + 16)
|
||||
#define FLOOR_LIGHTHOUSE_SE (FLOOR_ETC_START + 17)
|
||||
#define FLOOR_TENT_SE (FLOOR_ETC_START + 18)
|
||||
#define FLOOR_ETC_END (FLOOR_ETC_START + 19)
|
||||
|
||||
#define FLOOR_MY_ORIG_START (FLOOR_ETC_END + 1)
|
||||
#define FLOOR_MY_ORIG0 (FLOOR_MY_ORIG_START + 0)
|
||||
#define FLOOR_MY_ORIG1 (FLOOR_MY_ORIG_START + 1)
|
||||
#define FLOOR_MY_ORIG2 (FLOOR_MY_ORIG_START + 2)
|
||||
#define FLOOR_MY_ORIG3 (FLOOR_MY_ORIG_START + 3)
|
||||
#define FLOOR_MY_ORIG4 (FLOOR_MY_ORIG_START + 4)
|
||||
#define FLOOR_MY_ORIG5 (FLOOR_MY_ORIG_START + 5)
|
||||
#define FLOOR_MY_ORIG6 (FLOOR_MY_ORIG_START + 6)
|
||||
#define FLOOR_MY_ORIG7 (FLOOR_MY_ORIG_START + 7)
|
||||
#define FLOOR_MY_ORIG_END FLOOR_MY_ORIG7
|
||||
|
||||
#define FLOOR_ALL_NUM (FLOOR_MY_ORIG_END + 1)
|
||||
|
||||
#define FLOOR_IS_MY_ORIG(idx) ((idx) >= FLOOR_MY_ORIG_START && (idx) <= FLOOR_MY_ORIG_END)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,106 @@
|
||||
#ifndef M_NAME_TABLE_WALL_DECL_H
|
||||
#define M_NAME_TABLE_WALL_DECL_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define WALL_NPC000 0
|
||||
#define WALL_NPC001 1
|
||||
#define WALL_NPC002 2
|
||||
#define WALL_NPC003 3
|
||||
#define WALL_NPC004 4
|
||||
#define WALL_NPC005 5
|
||||
#define WALL_NPC006 6
|
||||
#define WALL_NPC007 7
|
||||
#define WALL_NPC008 8
|
||||
#define WALL_NPC009 9
|
||||
#define WALL_NPC010 10
|
||||
#define WALL_NPC011 11
|
||||
#define WALL_NPC012 12
|
||||
#define WALL_NPC013 13
|
||||
#define WALL_NPC014 14
|
||||
#define WALL_NPC015 15
|
||||
#define WALL_NPC016 16
|
||||
#define WALL_NPC017 17
|
||||
#define WALL_NPC018 18
|
||||
#define WALL_NPC019 19
|
||||
#define WALL_NPC020 20
|
||||
#define WALL_NPC021 21
|
||||
#define WALL_NPC022 22
|
||||
#define WALL_NPC023 23
|
||||
#define WALL_NPC024 24
|
||||
#define WALL_NPC025 25
|
||||
#define WALL_NPC026 26
|
||||
#define WALL_NPC027 27
|
||||
#define WALL_NPC028 28
|
||||
#define WALL_NPC029 29
|
||||
#define WALL_NPC030 30
|
||||
#define WALL_NPC031 31
|
||||
#define WALL_NPC032 32
|
||||
#define WALL_NPC033 33
|
||||
#define WALL_NPC034 34
|
||||
#define WALL_NPC035 35
|
||||
#define WALL_NPC036 36
|
||||
#define WALL_NPC037 37
|
||||
#define WALL_NPC038 38
|
||||
#define WALL_NPC039 39
|
||||
#define WALL_NPC040 40
|
||||
#define WALL_NPC041 41
|
||||
#define WALL_NPC042 42
|
||||
#define WALL_NPC043 43
|
||||
#define WALL_NPC044 44
|
||||
#define WALL_NPC045 45
|
||||
#define WALL_NPC046 46
|
||||
#define WALL_NPC047 47
|
||||
#define WALL_NPC048 48
|
||||
#define WALL_NPC049 49
|
||||
#define WALL_NPC050 50
|
||||
#define WALL_NPC051 51
|
||||
#define WALL_NPC052 52
|
||||
#define WALL_NPC053 53
|
||||
#define WALL_NPC054 54
|
||||
#define WALL_NPC055 55
|
||||
#define WALL_NPC056 56
|
||||
#define WALL_NPC057 57
|
||||
#define WALL_NPC058 58
|
||||
#define WALL_NPC059 59
|
||||
#define WALL_NPC060 60
|
||||
#define WALL_NPC061 61
|
||||
#define WALL_NPC062 62
|
||||
#define WALL_NPC063 63
|
||||
#define WALL_NPC064 64
|
||||
#define WALL_NPC065 65
|
||||
#define WALL_NPC066 66
|
||||
#define WALL_NPC_END WALL_NPC066
|
||||
|
||||
#define WALL_ETC_START (WALL_NPC_END + 1)
|
||||
#define WALL_SHOP1 (WALL_ETC_START + 0)
|
||||
#define WALL_SHOP2 (WALL_ETC_START + 1)
|
||||
#define WALL_SHOP3 (WALL_ETC_START + 2)
|
||||
#define WALL_SHOP4_1 (WALL_ETC_START + 3)
|
||||
#define WALL_SHOP4_2 (WALL_ETC_START + 3)
|
||||
#define WALL_ETC_END (WALL_SHOP4_2 + 1)
|
||||
|
||||
#define WALL_MY_ORIG_START (WALL_ETC_END + 1)
|
||||
#define WALL_MY_ORIG0 (WALL_MY_ORIG_START + 0)
|
||||
#define WALL_MY_ORIG1 (WALL_MY_ORIG_START + 1)
|
||||
#define WALL_MY_ORIG2 (WALL_MY_ORIG_START + 2)
|
||||
#define WALL_MY_ORIG3 (WALL_MY_ORIG_START + 3)
|
||||
#define WALL_MY_ORIG4 (WALL_MY_ORIG_START + 4)
|
||||
#define WALL_MY_ORIG5 (WALL_MY_ORIG_START + 5)
|
||||
#define WALL_MY_ORIG6 (WALL_MY_ORIG_START + 6)
|
||||
#define WALL_MY_ORIG7 (WALL_MY_ORIG_START + 7)
|
||||
#define WALL_MY_ORIG_END WALL_MY_ORIG7
|
||||
|
||||
#define WALL_ALL_NUM (WALL_MY_ORIG_END + 1)
|
||||
|
||||
#define WALL_IS_MY_ORIG(idx) ((idx) >= WALL_MY_ORIG_START && (idx) <= WALL_MY_ORIG_END)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,71 @@
|
||||
unsigned char itemName_paper[] = {
|
||||
#include "assets/itemName_paper.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_money[] = {
|
||||
#include "assets/itemName_money.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_tool[] = {
|
||||
#include "assets/itemName_tool.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_fish[] = {
|
||||
#include "assets/itemName_fish.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_cloth[] = {
|
||||
#include "assets/itemName_cloth.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_etc[] = {
|
||||
#include "assets/itemName_etc.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_carpet[] = {
|
||||
#include "assets/itemName_carpet.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_wall[] = {
|
||||
#include "assets/itemName_wall.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_fruit[] = {
|
||||
#include "assets/itemName_fruit.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_plant[] = {
|
||||
#include "assets/itemName_plant.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_minidisk[] = {
|
||||
#include "assets/itemName_minidisk.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_dummy[] = {
|
||||
#include "assets/itemName_dummy.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_ticket[] = {
|
||||
#include "assets/itemName_ticket.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_insect[] = {
|
||||
#include "assets/itemName_insect.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_hukubukuro[] = {
|
||||
#include "assets/itemName_hukubukuro.inc"
|
||||
};
|
||||
|
||||
unsigned char itemName_kabu[] = {
|
||||
#include "assets/itemName_kabu.inc"
|
||||
};
|
||||
|
||||
unsigned char ftrName_table[] = {
|
||||
#include "assets/ftrName_table.inc"
|
||||
};
|
||||
|
||||
unsigned char ftrName2_table[] = {
|
||||
#include "assets/ftrName2_table.inc"
|
||||
};
|
||||
+354
@@ -0,0 +1,354 @@
|
||||
#include "m_card.h"
|
||||
|
||||
#include "dolphin/private/card.h"
|
||||
#include "libultra/libultra.h"
|
||||
#include "m_malloc.h"
|
||||
#include "libc64/sleep.h"
|
||||
|
||||
typedef struct card_bg_info {
|
||||
int _00;
|
||||
int _04;
|
||||
int _08;
|
||||
int _0C;
|
||||
int _10;
|
||||
int _14;
|
||||
int space_proc;
|
||||
int tries;
|
||||
int _20;
|
||||
int _24;
|
||||
int _28;
|
||||
} mCD_bg_info_c;
|
||||
|
||||
static char mCD_file_name[] = "DobutsunomoriP_MURA";
|
||||
static int l_mcd_err_debug[mCD_ERROR_NUM] = { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE };
|
||||
static s32 l_mcd_err_result = CARD_RESULT_READY;
|
||||
static mCD_bg_info_c l_mcd_bg_info;
|
||||
|
||||
static void mCD_ClearErrInfo(void) {
|
||||
bzero(l_mcd_err_debug, sizeof(l_mcd_err_debug));
|
||||
l_mcd_err_result = 0;
|
||||
}
|
||||
|
||||
static void mCD_OnErrInfo(int err) {
|
||||
if (err >= 0 && err < mCD_ERROR_NUM) {
|
||||
l_mcd_err_debug[err] = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static void mCD_OffErrInfo(int err) {
|
||||
if (err >= 0 && err < mCD_ERROR_NUM) {
|
||||
l_mcd_err_debug[err] = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static void mCD_SetErrResult(s32 result) {
|
||||
l_mcd_err_result = result;
|
||||
}
|
||||
|
||||
extern void mCD_PrintErrInfo(gfxprint_t* gfxprint) {
|
||||
gfxprint_color(gfxprint, 250, 100, 250, 255);
|
||||
gfxprint_locate8x8(gfxprint, 22, 3);
|
||||
|
||||
if (l_mcd_err_debug[mCD_ERROR_NOT_ENABLED]) {
|
||||
gfxprint_printf(gfxprint, "N");
|
||||
}
|
||||
|
||||
if (l_mcd_err_debug[mCD_ERROR_AREA]) {
|
||||
gfxprint_printf(gfxprint, "A");
|
||||
}
|
||||
|
||||
if (l_mcd_err_debug[mCD_ERROR_WRITE]) {
|
||||
gfxprint_printf(gfxprint, "W");
|
||||
}
|
||||
|
||||
if (l_mcd_err_debug[mCD_ERROR_READ]) {
|
||||
gfxprint_printf(gfxprint, "R");
|
||||
}
|
||||
|
||||
if (l_mcd_err_debug[mCD_ERROR_CHECKSUM]) {
|
||||
gfxprint_printf(gfxprint, "C");
|
||||
}
|
||||
|
||||
if (l_mcd_err_debug[mCD_ERROR_OUTDATED]) {
|
||||
gfxprint_printf(gfxprint, "O");
|
||||
}
|
||||
|
||||
if (l_mcd_err_debug[mCD_ERROR_CREATE]) {
|
||||
gfxprint_printf(gfxprint, "c");
|
||||
}
|
||||
|
||||
if (l_mcd_err_result != CARD_RESULT_READY) {
|
||||
gfxprint_printf(gfxprint, "%d", l_mcd_err_result);
|
||||
}
|
||||
}
|
||||
|
||||
static void* mCD_malloc_32(u32 size) {
|
||||
return zelda_malloc_align(size, 32);
|
||||
}
|
||||
|
||||
static int mCD_check_card_common(s32* result, s32 req_sector_size, s32 chan) {
|
||||
s32 mem_size = 0;
|
||||
s32 sector_size = 0;
|
||||
int res = mCD_RESULT_BUSY;
|
||||
|
||||
*result = CARDProbeEx(chan, &mem_size, §or_size);
|
||||
|
||||
if (*result == CARD_RESULT_READY && sector_size == req_sector_size) {
|
||||
res = mCD_RESULT_SUCCESS;
|
||||
} else if (*result != CARD_RESULT_BUSY) {
|
||||
res = mCD_RESULT_ERROR;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int mCD_check_card(s32* result, s32 req_sector_size, s32 chan) {
|
||||
int ms = 0;
|
||||
int check_common_res = mCD_RESULT_BUSY;
|
||||
int res = mCD_RESULT_ERROR;
|
||||
|
||||
while (check_common_res == mCD_RESULT_BUSY && ms < 500) {
|
||||
check_common_res = mCD_check_card_common(result, req_sector_size, chan);
|
||||
|
||||
if (check_common_res == mCD_RESULT_BUSY) {
|
||||
msleep(1);
|
||||
ms++;
|
||||
}
|
||||
}
|
||||
|
||||
if (check_common_res == mCD_RESULT_SUCCESS) {
|
||||
res = mCD_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int mCD_check_sector_size(s32 req_sector_size, s32 chan) {
|
||||
s32 mem_size = 0;
|
||||
s32 sector_size = 0;
|
||||
s32 result = CARD_RESULT_BUSY;
|
||||
int ms = 0;
|
||||
int res = mCD_RESULT_BUSY;
|
||||
|
||||
while (result == CARD_RESULT_BUSY && ms < 500) {
|
||||
result = CARDProbeEx(chan, &mem_size, §or_size);
|
||||
|
||||
if (result == CARD_RESULT_BUSY) {
|
||||
msleep(1);
|
||||
ms++;
|
||||
}
|
||||
}
|
||||
|
||||
if (result == CARD_RESULT_READY) {
|
||||
if (req_sector_size == sector_size) {
|
||||
res = mCD_RESULT_SUCCESS;
|
||||
} else {
|
||||
res = mCD_RESULT_BUSY;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int mCD_get_file_num_common(s32 chan) {
|
||||
CARDFileInfo fileInfo;
|
||||
s32 num = 0;
|
||||
s32 file_no;
|
||||
|
||||
for (file_no = 0; file_no < CARD_MAX_FILE; file_no++) {
|
||||
s32 result = CARDFastOpen(chan, file_no, &fileInfo);
|
||||
|
||||
if (result == CARD_RESULT_READY) {
|
||||
num++;
|
||||
CARDClose(&fileInfo);
|
||||
}
|
||||
}
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
static int mCD_get_file_num(void* workArea, s32 chan) {
|
||||
int num = 0;
|
||||
s32 result;
|
||||
|
||||
if (workArea != NULL && mCD_check_card(&result, mCD_MEMCARD_SECTORSIZE, chan) == mCD_RESULT_SUCCESS) {
|
||||
result = CARDMount(chan, workArea, NULL);
|
||||
|
||||
if (result == CARD_RESULT_READY || result == CARD_RESULT_BROKEN) {
|
||||
result = CARDCheck(chan);
|
||||
num = mCD_get_file_num_common(chan);
|
||||
CARDUnmount(chan);
|
||||
} else if (result == CARD_RESULT_ENCODING) {
|
||||
CARDUnmount(chan);
|
||||
}
|
||||
}
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
extern void mCD_init_card(void) {
|
||||
CARDInit();
|
||||
}
|
||||
|
||||
static void mCD_ClearCardBgInfo(mCD_bg_info_c* bg_info) {
|
||||
bzero(bg_info, sizeof(mCD_bg_info_c));
|
||||
}
|
||||
|
||||
static void mCD_StartSetCardBgInfo(void) {
|
||||
mCD_ClearCardBgInfo(&l_mcd_bg_info);
|
||||
}
|
||||
|
||||
static int mCD_get_space_bg_get_slot(s32* freeBlocks, mCD_bg_info_c* bg_info, s32 chan, s32* result, void* workArea) {
|
||||
int res;
|
||||
|
||||
bg_info->tries++;
|
||||
res = mCD_check_card_common(result, mCD_MEMCARD_SECTORSIZE, chan);
|
||||
if (res == mCD_RESULT_SUCCESS && workArea != NULL) {
|
||||
*freeBlocks = 0;
|
||||
*result = CARDMountAsync(chan, workArea, NULL, NULL);
|
||||
|
||||
if (*result == CARD_RESULT_ENCODING) {
|
||||
CARDUnmount(chan);
|
||||
res = mCD_RESULT_ERROR;
|
||||
} else if (*result != CARD_RESULT_READY && *result != CARD_RESULT_BROKEN) {
|
||||
res = mCD_RESULT_ERROR;
|
||||
}
|
||||
|
||||
bg_info->tries = 0;
|
||||
} else if (res != mCD_RESULT_BUSY) {
|
||||
*freeBlocks = 0;
|
||||
res = mCD_RESULT_ERROR;
|
||||
bg_info->tries = 0;
|
||||
} else if (bg_info->tries >= 100) {
|
||||
*freeBlocks = 0;
|
||||
res = mCD_RESULT_ERROR;
|
||||
bg_info->tries = 0;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int mCD_get_space_bg_main(s32* freeBlocks, mCD_bg_info_c* bg_info, s32 chan, s32* result, void* workArea) {
|
||||
int res = mCD_RESULT_BUSY;
|
||||
|
||||
*result = CARDGetResultCode(chan);
|
||||
if (*result == CARD_RESULT_READY || *result == CARD_RESULT_BROKEN) {
|
||||
*result = CARDCheck(chan);
|
||||
|
||||
if (*result == CARD_RESULT_READY) {
|
||||
s32 freeFiles;
|
||||
|
||||
*result = CARDFreeBlocks(chan, freeBlocks, &freeFiles);
|
||||
if (*result == CARD_RESULT_READY) {
|
||||
res = mCD_RESULT_SUCCESS;
|
||||
} else {
|
||||
res = mCD_RESULT_ERROR;
|
||||
}
|
||||
} else {
|
||||
res = mCD_RESULT_ERROR;
|
||||
}
|
||||
|
||||
CARDUnmount(chan);
|
||||
} else if (*result != CARD_RESULT_BUSY) {
|
||||
if (*result == CARD_RESULT_ENCODING) {
|
||||
CARDUnmount(chan);
|
||||
}
|
||||
|
||||
res = mCD_RESULT_ERROR;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
typedef int (*mCD_GET_SPACE_BG_PROC)(s32*, mCD_bg_info_c*, s32, s32*, void*);
|
||||
static int mCD_get_space_bg(s32* freeBlocks, s32 chan, s32* result, void* workArea) {
|
||||
static mCD_GET_SPACE_BG_PROC get_proc[mCD_SPACE_BG_NUM] = { &mCD_get_space_bg_get_slot, &mCD_get_space_bg_main };
|
||||
mCD_bg_info_c* bg_info = &l_mcd_bg_info;
|
||||
u8 proc_type = bg_info->space_proc;
|
||||
int res = mCD_RESULT_BUSY;
|
||||
|
||||
*freeBlocks = 0;
|
||||
if (proc_type < mCD_SPACE_BG_NUM) {
|
||||
int proc_res = (*get_proc[proc_type])(freeBlocks, bg_info, chan, result, workArea);
|
||||
|
||||
if (proc_res == mCD_RESULT_SUCCESS) {
|
||||
bg_info->space_proc++;
|
||||
|
||||
if (bg_info->space_proc >= mCD_SPACE_BG_NUM) {
|
||||
res = mCD_RESULT_SUCCESS;
|
||||
mCD_ClearCardBgInfo(bg_info);
|
||||
}
|
||||
} else if (proc_res != mCD_RESULT_BUSY) {
|
||||
res = mCD_RESULT_ERROR;
|
||||
mCD_ClearCardBgInfo(bg_info);
|
||||
}
|
||||
} else {
|
||||
res = mCD_RESULT_ERROR;
|
||||
mCD_ClearCardBgInfo(bg_info);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static void mCD_close_and_unmount(CARDFileInfo* fileInfo, s32 chan) {
|
||||
CARDClose(fileInfo);
|
||||
CARDUnmount(chan);
|
||||
}
|
||||
|
||||
static int mCD_bg_check_slot(mCD_bg_info_c* bg_info, s32 chan, s32* result) {
|
||||
int res = mCD_RESULT_BUSY;
|
||||
int common_res = mCD_check_card_common(result, mCD_MEMCARD_SECTORSIZE, chan);
|
||||
|
||||
bg_info->tries++;
|
||||
if (common_res == mCD_RESULT_SUCCESS) {
|
||||
bg_info->space_proc++;
|
||||
bg_info->tries = 0;
|
||||
res = mCD_RESULT_SUCCESS;
|
||||
} else if (common_res != mCD_RESULT_BUSY || bg_info->tries >= 100) {
|
||||
bg_info->tries = 0;
|
||||
res = mCD_RESULT_ERROR;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int mCD_bg_init_com(mCD_bg_info_c* bg_info, s32 chan, s32* result, void** workArea_p, void** read_p, int read) {
|
||||
int res;
|
||||
|
||||
*workArea_p = mCD_malloc_32(CARD_WORKAREA_SIZE);
|
||||
if (read == TRUE) {
|
||||
*read_p = mCD_malloc_32(mCD_MEMCARD_SECTORSIZE);
|
||||
}
|
||||
|
||||
if (*workArea_p != NULL && (read == FALSE || (read == TRUE && *read_p != NULL))) {
|
||||
*result = CARDMountAsync(chan, *workArea_p, NULL, NULL);
|
||||
|
||||
if (*result == CARD_RESULT_READY) {
|
||||
bg_info->space_proc++;
|
||||
res = mCD_RESULT_SUCCESS;
|
||||
} else if (*result == CARD_RESULT_BROKEN) {
|
||||
*result = CARDCheckAsync(chan, NULL);
|
||||
|
||||
if (*result == CARD_RESULT_READY) {
|
||||
bg_info->space_proc++;
|
||||
res = mCD_RESULT_SUCCESS;
|
||||
} else {
|
||||
if (*result == CARD_RESULT_BROKEN || *result == CARD_RESULT_ENCODING) {
|
||||
CARDUnmount(chan);
|
||||
}
|
||||
|
||||
res = mCD_RESULT_ERROR;
|
||||
}
|
||||
} else {
|
||||
if (*result == CARD_RESULT_ENCODING) {
|
||||
CARDUnmount(chan);
|
||||
}
|
||||
|
||||
res = mCD_RESULT_ERROR;
|
||||
}
|
||||
} else {
|
||||
res = mCD_RESULT_ERROR;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
+3431
-2364
File diff suppressed because it is too large
Load Diff
+2234
-3259
File diff suppressed because it is too large
Load Diff
+169
-191
@@ -10,272 +10,250 @@
|
||||
#define sSC_MYK_ERR_MAP (1 << 7)
|
||||
|
||||
static int sSC_CheckSaveData_Weather() {
|
||||
int weather = mEnv_SAVE_GET_WEATHER_TYPE(Save_Get(weather));
|
||||
int intensity = mEnv_SAVE_GET_WEATHER_INTENSITY(Save_Get(weather));
|
||||
|
||||
if (weather >= mEnv_WEATHER_LEAVES) {
|
||||
mFRm_ERRORLINE(78);
|
||||
return sSC_MYK_ERR_WEATHER;
|
||||
}
|
||||
else if (intensity >= mEnv_WEATHER_INTENSITY_NUM) {
|
||||
mFRm_ERRORLINE(82);
|
||||
return sSC_MYK_ERR_WEATHER;
|
||||
}
|
||||
else {
|
||||
return sSC_MYK_OK;
|
||||
}
|
||||
int weather = mEnv_SAVE_GET_WEATHER_TYPE(Save_Get(weather));
|
||||
int intensity = mEnv_SAVE_GET_WEATHER_INTENSITY(Save_Get(weather));
|
||||
|
||||
if (weather >= mEnv_WEATHER_LEAVES) {
|
||||
mFRm_ERRORLINE(78);
|
||||
return sSC_MYK_ERR_WEATHER;
|
||||
} else if (intensity >= mEnv_WEATHER_INTENSITY_NUM) {
|
||||
mFRm_ERRORLINE(82);
|
||||
return sSC_MYK_ERR_WEATHER;
|
||||
} else {
|
||||
return sSC_MYK_OK;
|
||||
}
|
||||
}
|
||||
|
||||
static int sSC_CheckSaveData_Shop() {
|
||||
Shop_c* shop = Save_GetPointer(shop);
|
||||
mSP_goods_priority_list_c* prio_list = Save_GetPointer(shop)->priority_lists;
|
||||
int i;
|
||||
Shop_c* shop = Save_GetPointer(shop);
|
||||
mSP_goods_priority_list_c* prio_list = Save_GetPointer(shop)->priority_lists;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < mSP_KIND_MAX; i++) {
|
||||
if (prio_list->a >= mSP_PRIORITY_NUM) {
|
||||
mFRm_ERRORLINE(101);
|
||||
return sSC_MYK_ERR_SHOP;
|
||||
for (i = 0; i < mSP_KIND_MAX; i++) {
|
||||
if (prio_list->a >= mSP_PRIORITY_NUM) {
|
||||
mFRm_ERRORLINE(101);
|
||||
return sSC_MYK_ERR_SHOP;
|
||||
}
|
||||
|
||||
if (prio_list->b >= mSP_PRIORITY_NUM) {
|
||||
mFRm_ERRORLINE(105);
|
||||
return sSC_MYK_ERR_SHOP;
|
||||
}
|
||||
|
||||
if (prio_list->c >= mSP_PRIORITY_NUM) {
|
||||
mFRm_ERRORLINE(109);
|
||||
return sSC_MYK_ERR_SHOP;
|
||||
}
|
||||
|
||||
if (prio_list->pad != 0) {
|
||||
mFRm_ERRORLINE(113);
|
||||
return sSC_MYK_ERR_SHOP;
|
||||
}
|
||||
|
||||
prio_list++;
|
||||
}
|
||||
|
||||
if (prio_list->b >= mSP_PRIORITY_NUM) {
|
||||
mFRm_ERRORLINE(105);
|
||||
return sSC_MYK_ERR_SHOP;
|
||||
}
|
||||
|
||||
if (prio_list->c >= mSP_PRIORITY_NUM) {
|
||||
mFRm_ERRORLINE(109);
|
||||
return sSC_MYK_ERR_SHOP;
|
||||
}
|
||||
|
||||
if (prio_list->pad != 0) {
|
||||
mFRm_ERRORLINE(113);
|
||||
return sSC_MYK_ERR_SHOP;
|
||||
}
|
||||
|
||||
prio_list++;
|
||||
}
|
||||
|
||||
return sSC_MYK_OK;
|
||||
return sSC_MYK_OK;
|
||||
}
|
||||
|
||||
static int sSC_CheckHouseSize(mHm_hs_c* house) {
|
||||
return house->size_info.size < mHm_HOMESIZE_NUM;
|
||||
return house->size_info.size < mHm_HOMESIZE_NUM;
|
||||
}
|
||||
|
||||
static int sSC_CheckHappyRoom(mHm_hs_c* house) {
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int sSC_CheckDoorOriginal(mHm_hs_c* house) {
|
||||
if (house->door_original < mPr_ORIGINAL_DESIGN_COUNT || house->door_original == 0xFF) {
|
||||
return TRUE;
|
||||
}
|
||||
if (house->door_original < mPr_ORIGINAL_DESIGN_COUNT || house->door_original == 0xFF) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int sSCCheckOneFloorData(mHm_flr_c* floor) {
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int sSC_CheckHouseInterior(mHm_hs_c* house) {
|
||||
int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < mHm_ROOM_NUM; i++) {
|
||||
if (sSCCheckOneFloorData(house->floors + i) == 0) {
|
||||
return FALSE;
|
||||
for (i = 0; i < mHm_ROOM_NUM; i++) {
|
||||
if (sSCCheckOneFloorData(house->floors + i) == 0) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int sSC_CheckSaveData_House() {
|
||||
mHm_hs_c* house;
|
||||
int i;
|
||||
mHm_hs_c* house;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < mHS_HOUSE_NUM; i++) {
|
||||
house = Save_Get(homes) + i;
|
||||
for (i = 0; i < mHS_HOUSE_NUM; i++) {
|
||||
house = Save_Get(homes) + i;
|
||||
|
||||
if (sSC_CheckHouseSize(house) == 0) {
|
||||
mFRm_ERRORLINE(220);
|
||||
return sSC_MYK_ERR_HOUSE;
|
||||
if (sSC_CheckHouseSize(house) == 0) {
|
||||
mFRm_ERRORLINE(220);
|
||||
return sSC_MYK_ERR_HOUSE;
|
||||
}
|
||||
|
||||
if (sSC_CheckHappyRoom(house) == 0) {
|
||||
mFRm_ERRORLINE(227);
|
||||
return sSC_MYK_ERR_HOUSE;
|
||||
}
|
||||
|
||||
if (sSC_CheckDoorOriginal(house) == 0) {
|
||||
mFRm_ERRORLINE(234);
|
||||
return sSC_MYK_ERR_HOUSE;
|
||||
}
|
||||
|
||||
if (sSC_CheckHouseInterior(house) == 0) {
|
||||
mFRm_ERRORLINE(241);
|
||||
return sSC_MYK_ERR_HOUSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (sSC_CheckHappyRoom(house) == 0) {
|
||||
mFRm_ERRORLINE(227);
|
||||
return sSC_MYK_ERR_HOUSE;
|
||||
}
|
||||
|
||||
if (sSC_CheckDoorOriginal(house) == 0) {
|
||||
mFRm_ERRORLINE(234);
|
||||
return sSC_MYK_ERR_HOUSE;
|
||||
}
|
||||
|
||||
if (sSC_CheckHouseInterior(house) == 0) {
|
||||
mFRm_ERRORLINE(241);
|
||||
return sSC_MYK_ERR_HOUSE;
|
||||
}
|
||||
}
|
||||
|
||||
return sSC_MYK_OK;
|
||||
return sSC_MYK_OK;
|
||||
}
|
||||
|
||||
static int sSC_CheckSaveData_Cattage() {
|
||||
u8 floor = Save_Get(island).cottage.unused_wall_floor.flooring_idx;
|
||||
u8 wall = Save_Get(island).cottage.unused_wall_floor.wallpaper_idx;
|
||||
u8 floor = Save_Get(island).cottage.unused_wall_floor.flooring_idx;
|
||||
u8 wall = Save_Get(island).cottage.unused_wall_floor.wallpaper_idx;
|
||||
|
||||
if (sSCCheckOneFloorData(&Save_Get(island).cottage.room) == 0) {
|
||||
return sSC_MYK_ERR_CATTAGE;
|
||||
}
|
||||
else if (floor >= CARPET_NUM && (floor < 87 || floor > 94)) {
|
||||
return sSC_MYK_ERR_CATTAGE;
|
||||
}
|
||||
else if (wall >= WALL_NUM && (wall < 72 || wall > 79)) {
|
||||
return sSC_MYK_ERR_CATTAGE;
|
||||
}
|
||||
else {
|
||||
return sSC_MYK_OK;
|
||||
}
|
||||
if (sSCCheckOneFloorData(&Save_Get(island).cottage.room) == 0) {
|
||||
return sSC_MYK_ERR_CATTAGE;
|
||||
} else if (floor >= CARPET_NUM && !FLOOR_IS_MY_ORIG(floor)) {
|
||||
return sSC_MYK_ERR_CATTAGE;
|
||||
} else if (wall >= WALL_NUM && !WALL_IS_MY_ORIG(wall)) {
|
||||
return sSC_MYK_ERR_CATTAGE;
|
||||
} else {
|
||||
return sSC_MYK_OK;
|
||||
}
|
||||
}
|
||||
|
||||
static int sSC_CheckMuseumBitData(u8* bits, int max) {
|
||||
int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < max; i++) {
|
||||
int donator = mMmd_BIT_INFO2(bits, i);
|
||||
|
||||
if (donator < 0 || donator >= 6) {
|
||||
mFRm_ERRORLINE(289);
|
||||
return FALSE;
|
||||
for (i = 0; i < max; i++) {
|
||||
int donator = mMmd_BIT_INFO2(bits, i);
|
||||
|
||||
if (donator < 0 || donator >= 6) {
|
||||
mFRm_ERRORLINE(289);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int sSC_CheckSaveData_MuseumDisplay() {
|
||||
if (sSC_CheckMuseumBitData(Save_Get(museum_display).fossil_bit, mMmd_FOSSIL_NUM) == FALSE) {
|
||||
mFRm_ERRORLINE(300);
|
||||
return sSC_MYK_ERR_MUSEUMDISPLAY;
|
||||
}
|
||||
else if (sSC_CheckMuseumBitData(Save_Get(museum_display).art_bit, mMmd_ART_NUM) == FALSE) {
|
||||
mFRm_ERRORLINE(305);
|
||||
return sSC_MYK_ERR_MUSEUMDISPLAY;
|
||||
}
|
||||
else if (sSC_CheckMuseumBitData(Save_Get(museum_display).fish_bit, mMmd_INSECT_NUM) == FALSE) {
|
||||
mFRm_ERRORLINE(310);
|
||||
return sSC_MYK_ERR_MUSEUMDISPLAY;
|
||||
}
|
||||
else if (sSC_CheckMuseumBitData(Save_Get(museum_display).insect_bit, mMmd_FISH_NUM) == FALSE) {
|
||||
mFRm_ERRORLINE(315);
|
||||
return sSC_MYK_ERR_MUSEUMDISPLAY;
|
||||
}
|
||||
else {
|
||||
return sSC_MYK_OK;
|
||||
}
|
||||
if (sSC_CheckMuseumBitData(Save_Get(museum_display).fossil_bit, mMmd_FOSSIL_NUM) == FALSE) {
|
||||
mFRm_ERRORLINE(300);
|
||||
return sSC_MYK_ERR_MUSEUMDISPLAY;
|
||||
} else if (sSC_CheckMuseumBitData(Save_Get(museum_display).art_bit, mMmd_ART_NUM) == FALSE) {
|
||||
mFRm_ERRORLINE(305);
|
||||
return sSC_MYK_ERR_MUSEUMDISPLAY;
|
||||
} else if (sSC_CheckMuseumBitData(Save_Get(museum_display).fish_bit, mMmd_INSECT_NUM) == FALSE) {
|
||||
mFRm_ERRORLINE(310);
|
||||
return sSC_MYK_ERR_MUSEUMDISPLAY;
|
||||
} else if (sSC_CheckMuseumBitData(Save_Get(museum_display).insect_bit, mMmd_FISH_NUM) == FALSE) {
|
||||
mFRm_ERRORLINE(315);
|
||||
return sSC_MYK_ERR_MUSEUMDISPLAY;
|
||||
} else {
|
||||
return sSC_MYK_OK;
|
||||
}
|
||||
}
|
||||
|
||||
static int sSC_CheckOneOriginalData(mNW_original_design_c* original) {
|
||||
if (original->palette >= mNW_PALETTE_NUM) {
|
||||
mFRm_ERRORLINE(333);
|
||||
return FALSE;
|
||||
}
|
||||
if (original->palette >= mNW_PALETTE_NUM) {
|
||||
mFRm_ERRORLINE(333);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int sSC_CheckSaveData_Needlework() {
|
||||
int j;
|
||||
int i;
|
||||
int j;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < PLAYER_NUM; i++) {
|
||||
for (j = 0; j < mPr_ORIGINAL_DESIGN_COUNT; j++) {
|
||||
if (sSC_CheckOneOriginalData(Save_Get(private + i)->my_org + j) == FALSE) {
|
||||
mFRm_ERRORLINE(348);
|
||||
return sSC_MYK_ERR_NEEDLEWORK;
|
||||
}
|
||||
for (i = 0; i < PLAYER_NUM; i++) {
|
||||
for (j = 0; j < mPr_ORIGINAL_DESIGN_COUNT; j++) {
|
||||
if (sSC_CheckOneOriginalData(Save_Get(private + i)->my_org + j) == FALSE) {
|
||||
mFRm_ERRORLINE(348);
|
||||
return sSC_MYK_ERR_NEEDLEWORK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < mNW_TOTAL_DESIGN_NUM; i++) {
|
||||
if (sSC_CheckOneOriginalData(Save_Get(needlework).original_design + i) == FALSE) {
|
||||
mFRm_ERRORLINE(356);
|
||||
return sSC_MYK_ERR_NEEDLEWORK;
|
||||
for (i = 0; i < mNW_TOTAL_DESIGN_NUM; i++) {
|
||||
if (sSC_CheckOneOriginalData(Save_Get(needlework).original_design + i) == FALSE) {
|
||||
mFRm_ERRORLINE(356);
|
||||
return sSC_MYK_ERR_NEEDLEWORK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sSC_MYK_OK;
|
||||
return sSC_MYK_OK;
|
||||
}
|
||||
|
||||
static int sSC_BlockInfo2Count(u32 block_kind) {
|
||||
mFM_combo_info_c* combi_table = data_combi_table;
|
||||
int bx;
|
||||
int bz;
|
||||
int count = 0;
|
||||
mFM_combo_info_c* combi_table = data_combi_table;
|
||||
int bx;
|
||||
int bz;
|
||||
int count = 0;
|
||||
|
||||
for (bz = 0; bz < BLOCK_Z_NUM; bz++) {
|
||||
for (bx = 0; bx < BLOCK_X_NUM; bx++) {
|
||||
int block_no = Save_Get(combi_table)[bz][bx].combination_type;
|
||||
for (bz = 0; bz < BLOCK_Z_NUM; bz++) {
|
||||
for (bx = 0; bx < BLOCK_X_NUM; bx++) {
|
||||
int block_no = Save_Get(combi_table)[bz][bx].combination_type;
|
||||
|
||||
if (block_no < data_combi_table_number) {
|
||||
u32 info = mRF_Type2BlockInfo(combi_table[block_no].type);
|
||||
|
||||
if (info & block_kind) {
|
||||
count++;
|
||||
if (block_no < data_combi_table_number) {
|
||||
u32 info = mRF_Type2BlockInfo(combi_table[block_no].type);
|
||||
|
||||
if (info & block_kind) {
|
||||
count++;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
return count;
|
||||
}
|
||||
|
||||
static u32 sSC_map_perfect_table[16] = {
|
||||
mRF_BLOCKKIND_PLAYER,
|
||||
mRF_BLOCKKIND_SHOP,
|
||||
mRF_BLOCKKIND_SHRINE,
|
||||
mRF_BLOCKKIND_POLICE,
|
||||
mRF_BLOCKKIND_POSTOFFICE,
|
||||
mRF_BLOCKKIND_STATION,
|
||||
mRF_BLOCKKIND_BRIDGE,
|
||||
mRF_BLOCKKIND_SLOPE,
|
||||
mRF_BLOCKKIND_POOL,
|
||||
mRF_BLOCKKIND_DUMP,
|
||||
mRF_BLOCKKIND_MUSEUM,
|
||||
mRF_BLOCKKIND_TAILORS,
|
||||
mRF_BLOCKKIND_OCEAN,
|
||||
mRF_BLOCKKIND_ISLAND,
|
||||
mRF_BLOCKKIND_DOCK,
|
||||
mRF_BLOCKKIND_ISLAND_LEFT
|
||||
};
|
||||
static u32 sSC_map_perfect_table[16] = { mRF_BLOCKKIND_PLAYER, mRF_BLOCKKIND_SHOP, mRF_BLOCKKIND_SHRINE,
|
||||
mRF_BLOCKKIND_POLICE, mRF_BLOCKKIND_POSTOFFICE, mRF_BLOCKKIND_STATION,
|
||||
mRF_BLOCKKIND_BRIDGE, mRF_BLOCKKIND_SLOPE, mRF_BLOCKKIND_POOL,
|
||||
mRF_BLOCKKIND_DUMP, mRF_BLOCKKIND_MUSEUM, mRF_BLOCKKIND_TAILORS,
|
||||
mRF_BLOCKKIND_OCEAN, mRF_BLOCKKIND_ISLAND, mRF_BLOCKKIND_DOCK,
|
||||
mRF_BLOCKKIND_ISLAND_LEFT };
|
||||
|
||||
static int sSC_CheckSaveData_Map() {
|
||||
int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
if (sSC_BlockInfo2Count(sSC_map_perfect_table[i]) <= 0) {
|
||||
mFRm_ERRORLINE(434);
|
||||
return sSC_MYK_ERR_MAP;
|
||||
for (i = 0; i < 16; i++) {
|
||||
if (sSC_BlockInfo2Count(sSC_map_perfect_table[i]) <= 0) {
|
||||
mFRm_ERRORLINE(434);
|
||||
return sSC_MYK_ERR_MAP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sSC_MYK_OK;
|
||||
return sSC_MYK_OK;
|
||||
}
|
||||
|
||||
static int sChk_CheckSaveData_MYK() {
|
||||
int res;
|
||||
int res;
|
||||
|
||||
res = sSC_CheckSaveData_Weather();
|
||||
res |= sSC_CheckSaveData_Shop();
|
||||
res |= sSC_CheckSaveData_House();
|
||||
res |= sSC_CheckSaveData_Cattage();
|
||||
res |= sSC_CheckSaveData_MuseumDisplay();
|
||||
res |= sSC_CheckSaveData_Needlework();
|
||||
res |= sSC_CheckSaveData_Map();
|
||||
res = sSC_CheckSaveData_Weather();
|
||||
res |= sSC_CheckSaveData_Shop();
|
||||
res |= sSC_CheckSaveData_House();
|
||||
res |= sSC_CheckSaveData_Cattage();
|
||||
res |= sSC_CheckSaveData_MuseumDisplay();
|
||||
res |= sSC_CheckSaveData_Needlework();
|
||||
res |= sSC_CheckSaveData_Map();
|
||||
|
||||
return res;
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,244 @@
|
||||
#include "jaudio_NES/game64.h"
|
||||
|
||||
#include "m_name_table.h"
|
||||
|
||||
// TODO: finish
|
||||
|
||||
#pragma force_active on
|
||||
|
||||
// clang-format off
|
||||
static const u8 SEQ_TABLE[256] = {
|
||||
247, 81, 82, 83,
|
||||
84, 85, 86, 87,
|
||||
88, 89, 90, 91,
|
||||
92, 93, 94, 95,
|
||||
96, 97, 98, 99,
|
||||
100, 101, 102, 103,
|
||||
104, 176, 178, 218,
|
||||
219, 220, 222, 223,
|
||||
224, 225, 226, 227,
|
||||
229, 169, 170, 171,
|
||||
68, 166, 60, 59,
|
||||
168, 177, 74, 62,
|
||||
63, 64, 65, 66,
|
||||
67, 214, 215, 216,
|
||||
217, 228, 57, 231,
|
||||
221, 230, 167, 70,
|
||||
71, 73, 75, 78,
|
||||
79, 105, 58, 69,
|
||||
72, 232, 233, 234,
|
||||
235, 179, 76, 172,
|
||||
173, 174, 175, 247,
|
||||
247, 247, 247, 247,
|
||||
180, 181, 182, 183,
|
||||
184, 185, 186, 187,
|
||||
188, 189, 190, 191,
|
||||
192, 193, 194, 195,
|
||||
196, 197, 198, 199,
|
||||
200, 201, 202, 203,
|
||||
204, 205, 206, 207,
|
||||
208, 209, 210, 211,
|
||||
212, 213, 77, 61,
|
||||
77, 80, 247, 247,
|
||||
111, 112, 113, 114,
|
||||
115, 116, 117, 118,
|
||||
119, 120, 121, 122,
|
||||
123, 124, 125, 126,
|
||||
127, 128, 129, 130,
|
||||
131, 132, 133, 134,
|
||||
135, 136, 137, 138,
|
||||
139, 140, 141, 142,
|
||||
143, 144, 145, 146,
|
||||
147, 148, 149, 150,
|
||||
151, 152, 153, 154,
|
||||
155, 156, 157, 158,
|
||||
159, 160, 161, 162,
|
||||
163, 164, 165, 247,
|
||||
247, 247, 247, 247,
|
||||
247, 247, 247, 247,
|
||||
0, 1, 2, 3,
|
||||
4, 5, 6, 7,
|
||||
8, 9, 10, 11,
|
||||
12, 13, 14, 15,
|
||||
16, 17, 18, 19,
|
||||
20, 21, 22, 23,
|
||||
24, 25, 26, 27,
|
||||
28, 29, 30, 31,
|
||||
32, 33, 34, 35,
|
||||
36, 37, 38, 39,
|
||||
40, 41, 42, 43,
|
||||
44, 45, 46, 47,
|
||||
48, 49, 50, 51,
|
||||
52, 53, 54, 55,
|
||||
56, 57, 236, 237,
|
||||
241, 238, 240, 239
|
||||
};
|
||||
|
||||
static const u16 SE_FLOOR_DATA[FLOOR_ALL_NUM] ATTRIBUTE_ALIGN(2) = {
|
||||
27, 27, 32, 31,
|
||||
28, 32, 31, 27,
|
||||
27, 28, 29, 29,
|
||||
27, 31, 28, 30,
|
||||
33, 27, 30, 27,
|
||||
32, 32, 31, 28,
|
||||
32, 27, 35, 32,
|
||||
32, 32, 27, 29,
|
||||
31, 32, 28, 28,
|
||||
28, 27, 28, 28,
|
||||
27, 31, 36, 32,
|
||||
28, 27, 33, 27,
|
||||
35, 28, 32, 32,
|
||||
28, 28, 32, 29,
|
||||
28, 33, 27, 32,
|
||||
33, 27, 32, 32,
|
||||
28, 32, 32, 34,
|
||||
32, 32, 27, 32,
|
||||
28, 27, 29, 27,
|
||||
28, 28, 27, 31,
|
||||
28, 31, 28, 32,
|
||||
28, 32, 32, 32,
|
||||
32, 32, 32, 32,
|
||||
32, 32, 32
|
||||
};
|
||||
|
||||
// ATTRIBUTE_ALIGN(4)
|
||||
static const u16 SE_ROOM_INS_DATA[] ATTRIBUTE_ALIGN(2) = {
|
||||
0x505, 0x509, 0x50D, 0x511,
|
||||
0x515, 0x519, 0x51D, 0x521,
|
||||
0x525, 0x529, 0x501, 0x52D,
|
||||
0x531, 0x535, 0x539, 0x53D,
|
||||
0
|
||||
};
|
||||
|
||||
static const u16 SE_ROOM_INS_RANDOM_OFFSET[] = {
|
||||
11, 11, 11, 10,
|
||||
10, 10, 12, 100,
|
||||
20, 100, 45, 10,
|
||||
4, 9, 2, 1,
|
||||
0
|
||||
};
|
||||
|
||||
static const u8 SHIIN2BOIN[] = {
|
||||
0, 1, 2, 3,
|
||||
4, 5, 1, 2,
|
||||
3, 4, 5, 1,
|
||||
2, 3, 4, 5,
|
||||
1, 2, 3, 4,
|
||||
5, 1, 2, 3,
|
||||
4, 5, 1, 2,
|
||||
3, 4, 5, 1,
|
||||
2, 3, 4, 5,
|
||||
1, 3, 5, 1,
|
||||
2, 3, 4, 5,
|
||||
1, 45, 1, 2,
|
||||
3, 4, 5, 1,
|
||||
2, 3, 4, 5,
|
||||
1, 4, 5, 1,
|
||||
2, 3, 4, 5,
|
||||
1, 2, 3, 4,
|
||||
5, 1, 2, 3,
|
||||
4, 5, 3, 1,
|
||||
3, 5, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0
|
||||
};
|
||||
|
||||
static const u8 TRGPRIO[] = {
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 50, 50, 50,
|
||||
50, 60, 60, 60,
|
||||
60, 60, 60, 60,
|
||||
60, 70, 70, 70,
|
||||
70, 70, 70, 70,
|
||||
70, 70, 70, 70,
|
||||
70, 70, 70, 70,
|
||||
70, 70, 70, 70,
|
||||
70, 70, 70, 70
|
||||
};
|
||||
|
||||
static const u8 sou_trg_se_init[] ATTRIBUTE_ALIGN(4) = {
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
63, 128, 0, 0,
|
||||
63, 128, 0, 0,
|
||||
63, 128, 0, 0,
|
||||
63, 128, 0, 0,
|
||||
63, 0, 0, 0,
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
||||
static const u8 sou_voice_se_init[] ATTRIBUTE_ALIGN(4) = {
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
63, 128, 0, 0,
|
||||
63, 128, 0, 0,
|
||||
63, 128, 0, 0,
|
||||
63, 128, 0, 0,
|
||||
63, 128, 0, 0,
|
||||
63, 128, 0, 0,
|
||||
63, 0, 0, 0
|
||||
};
|
||||
|
||||
static const u8 sou_lev_se_init[] ATTRIBUTE_ALIGN(4) = {
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
63, 128, 0, 0,
|
||||
63, 0, 0, 0
|
||||
};
|
||||
|
||||
static const u8 sou_lev_ongen_data_init[] ATTRIBUTE_ALIGN(4) = {
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
70, 28, 60, 0,
|
||||
70, 28, 60, 0
|
||||
};
|
||||
|
||||
static const u8 sou_ongen_entry_init[] ATTRIBUTE_ALIGN(4) = {
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
63, 0, 0, 0,
|
||||
70, 28, 60, 0
|
||||
};
|
||||
|
||||
static const u8 sou_se_fade_init[] ATTRIBUTE_ALIGN(4) = {
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
63, 128, 0, 0
|
||||
};
|
||||
|
||||
// force data pooling
|
||||
FORCESTRIP static int __REMOVE_TEMP() {
|
||||
int a = SEQ_TABLE[55];
|
||||
int b = SE_FLOOR_DATA[3];
|
||||
int c = SE_ROOM_INS_DATA[6];
|
||||
|
||||
return a * b * c;
|
||||
}
|
||||
|
||||
// clang-format on
|
||||
|
||||
#pragma force_active reset
|
||||
Reference in New Issue
Block a user