diff options
| author | kuchenmitsahne <25233413+kuchenmitsahne@users.noreply.github.com> | 2024-12-13 11:54:39 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-13 09:54:39 -0700 |
| commit | 60579a4260965c1de2e8a8f320fe9f8c3f5d2dde (patch) | |
| tree | 29a717650a88fae04ce0a26d7ef12baea3ca4080 /include | |
| parent | 8e5451997741a70edf39d7840074f262005b0988 (diff) | |
m_field_info 37 additional functions OK (40/188 total) (#230)
* 25 functions OK
* 10 functions OK
* Add block type and block kind enums/defines
* Formatting/style pass
* Move `FieldMakeBlockType` to `m_field_make`
* Remove unused/duplicate defines
Diffstat (limited to 'include')
| -rw-r--r-- | include/code_variables.h | 3 | ||||
| -rw-r--r-- | include/m_collision_bg.h | 2 | ||||
| -rw-r--r-- | include/m_field_info.h | 90 | ||||
| -rw-r--r-- | include/m_field_make.h | 134 | ||||
| -rw-r--r-- | include/m_random_field.h | 42 |
5 files changed, 225 insertions, 46 deletions
diff --git a/include/code_variables.h b/include/code_variables.h index b484b81..f889763 100644 --- a/include/code_variables.h +++ b/include/code_variables.h @@ -397,9 +397,6 @@ extern s32 CanLookGokiCount; // extern UNK_TYPE D_8010674C_jp; // extern UNK_TYPE D_80106794_jp; // extern UNK_TYPE D_801067A4_jp; -// extern UNK_TYPE D_80106814_jp; -// extern UNK_TYPE D_80106818_jp; -// extern UNK_TYPE D_80106820_jp; // extern UNK_TYPE D_80106824_jp; // extern UNK_TYPE D_80106828_jp; // extern UNK_TYPE D_8010682C_jp; diff --git a/include/m_collision_bg.h b/include/m_collision_bg.h index 1cb0f4e..9401fda 100644 --- a/include/m_collision_bg.h +++ b/include/m_collision_bg.h @@ -8,6 +8,8 @@ struct Actor; struct PosRot; +enum BackgroundAttribute { mCoBG_ATTRIBUTE_0, mCOBG_ATTRIBUTE_NONE = 100 }; + // offset table typedef struct mCoBG_unkStruct2 { /* 0x00 */ u8 unk0; diff --git a/include/m_field_info.h b/include/m_field_info.h index f6519a1..a061f1a 100644 --- a/include/m_field_info.h +++ b/include/m_field_info.h @@ -22,6 +22,9 @@ struct Game; #define FI_UT_WORLDSIZE_Z FI_UT_BASE_SIZE #define FI_UT_WORLDSIZE_Z_F (f32)FI_UT_WORLDSIZE_Z +#define FI_UT_WORLDSIZE_HALF_X_F (FI_UT_WORLDSIZE_X_F / 2.0f) +#define FI_UT_WORLDSIZE_HALF_Z_F (FI_UT_WORLDSIZE_X_F / 2.0f) + #define FI_BK_WORLDSIZE_BASE (FI_UT_BASE_SIZE * UT_BASE_NUM) #define FI_BK_WORLDSIZE_BASE_F ((f32)FI_BK_WORLDSIZE_BASE) @@ -31,6 +34,12 @@ struct Game; #define FI_BK_WORLDSIZE_X_F FI_BK_WORLDSIZE_BASE_F #define FI_BK_WORLDSIZE_Z_F FI_BK_WORLDSIZE_BASE_F +#define FI_BK_WORLDSIZE_HALF_X (FI_BK_WORLDSIZE_X / 2) +#define FI_BK_WORLDSIZE_HALF_Z (FI_BK_WORLDSIZE_Z / 2) + +#define FI_BK_WORLDSIZE_HALF_X_F (FI_BK_WORLDSIZE_X_F / 2.0f) +#define FI_BK_WORLDSIZE_HALF_Z_F (FI_BK_WORLDSIZE_Z_F / 2.0f) + typedef enum FieldType { /* 0 */ FI_FIELDTYPE_FG, @@ -48,12 +57,31 @@ typedef enum FieldType { #define FI_GET_TYPE(id) ((id) & 0xF000) typedef enum FieldRoom { + /* 0x3000 */ FI_FIELD_ROOM0 = FI_TO_FIELD_ID(FI_FIELDTYPE_ROOM, 0), + /* 0x3001 */ FI_FIELD_ROOM_SHOP0, + /* 0x3002 */ FI_FIELD_ROOM_UNK_3002, + /* 0x3003 */ FI_FIELD_ROOM_UNK_3003, + /* 0x3004 */ FI_FIELD_ROOM_UNK_3004, + /* 0x3005 */ FI_FIELD_ROOM_UNK_3005, + /* 0x3006 */ FI_FIELD_ROOM_SHOP1, + /* 0x3007 */ FI_FIELD_ROOM_SHOP2, + /* 0x3008 */ FI_FIELD_ROOM_SHOP3_1, + /* 0x3009 */ FI_FIELD_ROOM_SHOP3_2, /* 0x6000 */ FI_FIELD_PLAYER0_ROOM = FI_TO_FIELD_ID(FI_FIELDTYPE_PLAYER_ROOM, 0), /* 0x6001 */ FI_FIELD_PLAYER1_ROOM, /* 0x6002 */ FI_FIELD_PLAYER2_ROOM, /* 0x6003 */ FI_FIELD_PLAYER3_ROOM } FieldRoom; +typedef enum FieldDirection { + /* 0 */ FI_MOVEDIR_NONE, + /* 1 */ FI_MOVEDIR_RIGHT, + /* 2 */ FI_MOVEDIR_LEFT, + /* 3 */ FI_MOVEDIR_UP, + /* 4 */ FI_MOVEDIR_DOWN, + + /* 5 */ FI_MOVEDIR_MAX +} FieldDirection; #define FI_GET_PLAYER_ROOM_NO(fieldId) (((fieldId)-FI_FIELD_PLAYER0_ROOM) & 3) #define FI_IS_PLAYER_ROOM(fieldId) \ @@ -66,34 +94,34 @@ struct FieldMakeBlockInfo* mFI_GetBlockTopP(void); u16 mFI_GetFieldId(void); // void func_80087C9C_jp(); // void func_80087D30_jp(); -// void func_80087DC8_jp(); -// void func_80087E14_jp(); -s32 mFI_GetBlockXMax(void); -s32 mFI_GetBlockZMax(void); +s32 mFI_CheckShopFieldName(u16 fieldName); +s32 mFI_CheckShop(void); +u8 mFI_GetBlockXMax(void); +u8 mFI_GetBlockZMax(void); // void func_80087ED0_jp(); // void func_80088018_jp(); -// void func_80088160_jp(); +// s32 mFI_GetBlockNum(s32 blockX, s32 blockZ); // void func_8008819C_jp(); // s32 mFI_BlockCheck(s32 blockX, s32 blockZ); -// void func_80088270_jp(); -// void func_800882AC_jp(); -// void func_800882FC_jp(); -// void func_80088320_jp(); -s32 mFI_Wpos2UtNum(s32*, s32*, xyz_t); -// void func_80088458_jp(); -s32 mFI_Wpos2UtCenterWpos(xyz_t*, xyz_t); -// void func_800885A8_jp(); -s32 mFI_Wpos2BlockNum(s32*, s32*, xyz_t); -s32 mFI_Wpos2BkandUtNuminBlock(s32*,s32*, s32* ,s32* ,xyz_t); -// void func_8008883C_jp(); -// void func_800888AC_jp(); -// void func_80088938_jp(); -// void func_800889D8_jp(); -// void func_80088A58_jp(); +// s32 mFI_UtNumCheck(int utX, int utZ, int blockXMax, int blockZMax); +// s32 mFI_WposCheck(xyz_t wpos); +s32 mFI_WposX2UtNumX(f32 wposX); +s32 mFI_WposZ2UtNumZ(f32 wposZ); +s32 mFI_Wpos2UtNum(s32* utX, s32* utZ, xyz_t wpos); +s32 mFI_UtNum2CenterWpos(xyz_t* wpos, int utX, int utZ); +s32 mFI_Wpos2UtCenterWpos(xyz_t* wpos, xyz_t sourcePos); +// s32 mFI_Wpos2UtNum_inBlock(s32* utX, s32* utZ, xyz_t wpos); +s32 mFI_Wpos2BlockNum(s32* blockX, s32* blockZ, xyz_t wpos); +s32 mFI_Wpos2BkandUtNuminBlock(s32* blockX, s32* blockZ, s32* utX, s32* utZ, xyz_t wpos); +// s32 mFI_UtNum2BlockNum(s32* blockX, s32* blockZ, s32 utX, s32 utZ); +// s32 mFI_GetUtNumInBK(s32* blockUtX, s32* blockUtZ, s32 utX, s32 utZ); +// s32 mFI_WpostoLposInBK(xyz_t* lpos, xyz_t wpos); +// s32 mFI_LposInBKtoWpos(xyz_t* wpos, xyz_t lpos, s32 blockX, s32 blockZ); +// s32 mFI_ScrollCheck(xyz_t wpos, u8 dir); s32 mFI_BkNum2WposXZ(f32* worldPosX, f32* worldPosZ, s32 blockX, s32 blockZ); -void mFI_UtNum2PosXZInBk(f32*, f32*, s32, s32); -// void func_80088BFC_jp(); -void mFI_BkandUtNum2CenterWpos(xyz_t*, s32, s32, s32, s32); +void mFI_UtNum2PosXZInBk(f32* posX, f32* posZ, s32 utX, s32 utZ); +// void mFI_BkandUtNum2Wpos(xyz_t* wpos, s32 blockX, s32 blockZ, s32 utX, s32 utZ); +void mFI_BkandUtNum2CenterWpos(xyz_t* wpos, s32 blockX, s32 blockZ, s32 utX, s32 utZ); // void func_80088CBC_jp(); // void func_80088CD0_jp(); // void func_80088CE4_jp(); @@ -110,16 +138,16 @@ void mFI_BkandUtNum2CenterWpos(xyz_t*, s32, s32, s32, s32); // void func_8008907C_jp(); // void func_80089114_jp(); // void func_800891AC_jp(); -u8 mFI_BkNum2BlockType(s32,s32); +u8 mFI_BkNum2BlockType(s32 blockX, s32 blockZ); // s32 mFI_GetPuleTypeIdx(u8 type); s32 mFI_GetPuleIdx(void); -// void func_80089348_jp(); -// void func_800893C8_jp(); -s32 mFI_CheckBlockKind_OR(s32, s32, s32); -s32 mFI_BlockKind2BkNum(s32*,s32*,s32); -// void func_800894D0_jp(); -mCoBG_unkStructUnion* mFI_GetBkNum2ColTop(s32 arg0, s32 arg1); -// void func_800895B8_jp(); +u32 mFI_BkNum2BlockKind(s32 blockX, s32 blockZ); +s32 mFI_CheckBlockKind(s32 blockX, s32 blockZ, u32 blockKind); +s32 mFI_CheckBlockKind_OR(s32 blockX, s32 blockZ, u32 blockKindOr); +s32 mFI_BlockKind2BkNum(s32* blockX, s32* blockZ, u32 kind); +void mFI_GetSpecialBlockNum(s32* blockPos, u32* kinds, s32 count); +mCoBG_unkStructUnion* mFI_GetBkNum2ColTop(s32 blockX, s32 blockZ); +mCoBG_unkStructUnion* mFI_UtNum2UtCol(s32 utX, s32 utZ); // void func_80089698_jp(); // void func_80089704_jp(); // void func_800897D0_jp(); diff --git a/include/m_field_make.h b/include/m_field_make.h index a287939..695418d 100644 --- a/include/m_field_make.h +++ b/include/m_field_make.h @@ -3,15 +3,16 @@ #include "ultra64.h" #include "unk.h" +#include "m_collision_bg.h" struct Game; #define BLOCK_X_NUM 7 -#define BLOCK_Z_NUM 10 +#define BLOCK_Z_NUM 8 #define BLOCK_TOTAL_NUM (BLOCK_X_NUM * BLOCK_Z_NUM) #define FG_BLOCK_X_NUM (BLOCK_X_NUM - 2) /* 5 */ -#define FG_BLOCK_Z_NUM (BLOCK_Z_NUM - 4) /* 6 */ +#define FG_BLOCK_Z_NUM (BLOCK_Z_NUM - 2) /* 6 */ #define FG_BLOCK_TOTAL_NUM (FG_BLOCK_X_NUM * FG_BLOCK_Z_NUM) #define UT_BASE_NUM 16 @@ -19,6 +20,110 @@ struct Game; #define UT_Z_NUM UT_BASE_NUM /* Spaces per block (acre) in z direction */ #define UT_TOTAL_NUM (UT_X_NUM * UT_Z_NUM) +/* + * Naming convention for `RIVER`/`POOL`: directions indicated are flow of river + * (e.g. `RIVER_SOUTH` indicates a river that flows south through entire block, + * `RIVER_WEST_SOUTH` indicates a river that flows west and then south, etc.) + * + * Naming convention for `CLIFF`: direction indicated is side with valley + * (e.g. `CORNER_RIGHT_TOP` indicates the top part of a corner cliff + * with the valley on the right). However, directions for border cliffs simply + * indicate the side of the map. + */ +typedef enum FieldMakeBlockType { + /* 0x00 */ mFM_BLOCK_TYPE_BORDER_CLIFF_TOP, + /* 0x01 */ mFM_BLOCK_TYPE_BORDER_CLIFF_RIVER, + /* 0x02 */ mFM_BLOCK_TYPE_BORDER_CLIFF_LEFT, + /* 0x03 */ mFM_BLOCK_TYPE_3, // Unused (no entries in `data_combi_table`) + /* 0x04 */ mFM_BLOCK_TYPE_BORDER_CLIFF_RIGHT, + /* 0x05 */ mFM_BLOCK_TYPE_BORDER_CLIFF_CORNER_TOP_LEFT, + /* 0x06 */ mFM_BLOCK_TYPE_6, // Unused (no entries in `data_combi_table`) + /* 0x07 */ mFM_BLOCK_TYPE_7, // Unused (no entries in `data_combi_table`) + /* 0x08 */ mFM_BLOCK_TYPE_BORDER_CLIFF_CORNER_TOP_RIGHT, + /* 0x09 */ mFM_BLOCK_TYPE_BORDER_CLIFF_TUNNEL_LEFT, + /* 0x0A */ mFM_BLOCK_TYPE_BORDER_CLIFF_TUNNEL_RIGHT, + /* 0x0B */ mFM_BLOCK_TYPE_TRACKS_STATION, + /* 0x0C */ mFM_BLOCK_TYPE_TRACKS_DUMP, + /* 0x0D */ mFM_BLOCK_TYPE_TRACKS_RIVER, + /* 0x0E */ mFM_BLOCK_TYPE_PLAYER_HOUSE, + /* 0x0F */ mFM_BLOCK_TYPE_CLIFF_HORIZONTAL, + /* 0x10 */ mFM_BLOCK_TYPE_CLIFF_CORNER_RIGHT_BOTTOM, + /* 0x11 */ mFM_BLOCK_TYPE_CLIFF_VERTICAL_RIGHT, + /* 0x12 */ mFM_BLOCK_TYPE_CLIFF_CORNER_RIGHT_TOP, + /* 0x13 */ mFM_BLOCK_TYPE_CLIFF_CORNER_LEFT_TOP, + /* 0x14 */ mFM_BLOCK_TYPE_CLIFF_VERTICAL_LEFT, + /* 0x15 */ mFM_BLOCK_TYPE_CLIFF_CORNER_LEFT_BOTTOM, + /* 0x16 */ mFM_BLOCK_TYPE_WATERFALL_SOUTH_CLIFF_HORIZONTAL, + /* 0x17 */ mFM_BLOCK_TYPE_WATERFALL_SOUTH_CLIFF_CORNER_RIGHT_BOTTOM, + /* 0x18 */ mFM_BLOCK_TYPE_RIVER_SOUTH_CLIFF_VERTICAL_RIGHT, + /* 0x19 */ mFM_BLOCK_TYPE_RIVER_SOUTH_CLIFF_CORNER_RIGHT_TOP, + /* 0x1A */ mFM_BLOCK_TYPE_WATERFALL_SOUTH_CLIFF_CORNER_LEFT_TOP, + /* 0x1B */ mFM_BLOCK_TYPE_RIVER_SOUTH_CLIFF_VERTICAL_LEFT, + /* 0x1C */ mFM_BLOCK_TYPE_RIVER_SOUTH_CLIFF_CORNER_LEFT_BOTTOM, + /* 0x1D */ mFM_BLOCK_TYPE_RIVER_EAST_CLIFF_HORIZONTAL, // Correct according to ACSE, should be verified in-game + /* 0x1E */ mFM_BLOCK_TYPE_WATERFALL_EAST_CLIFF_CORNER_RIGHT_BOTTOM, + /* 0x1F */ mFM_BLOCK_TYPE_WATERFALL_EAST_CLIFF_VERTICAL_RIGHT, + /* 0x20 */ mFM_BLOCK_TYPE_RIVER_EAST_CLIFF_CORNER_RIGHT_TOP, + /* 0x21 */ mFM_BLOCK_TYPE_RIVER_EAST_CLIFF_CORNER_LEFT_TOP, + /* 0x22 */ mFM_BLOCK_TYPE_RIVER_WEST_CLIFF_HORIZONTAL, + /* 0x23 */ mFM_BLOCK_TYPE_RIVER_WEST_CLIFF_CORNER_RIGHT_TOP, + /* 0x24 */ mFM_BLOCK_TYPE_RIVER_WEST_CLIFF_CORNER_LEFT_TOP, + /* 0x25 */ mFM_BLOCK_TYPE_WATERFALL_WEST_CLIFF_VERTICAL_LEFT, + /* 0x26 */ mFM_BLOCK_TYPE_WATERFALL_WEST_CLIFF_CORNER_LEFT_BOTTOM, + /* 0x27 */ mFM_BLOCK_TYPE_FLAT, // Grassy field + /* 0x28 */ mFM_BLOCK_TYPE_RIVER_SOUTH, + /* 0x29 */ mFM_BLOCK_TYPE_RIVER_EAST, + /* 0x2A */ mFM_BLOCK_TYPE_RIVER_WEST, + /* 0x2B */ mFM_BLOCK_TYPE_RIVER_SOUTH_EAST, + /* 0x2C */ mFM_BLOCK_TYPE_RIVER_EAST_SOUTH, + /* 0x2D */ mFM_BLOCK_TYPE_RIVER_SOUTH_WEST, + /* 0x2E */ mFM_BLOCK_TYPE_RIVER_WEST_SOUTH, + /* 0x2F */ mFM_BLOCK_TYPE_RIVER_SOUTH_BRIDGE, + /* 0x30 */ mFM_BLOCK_TYPE_RIVER_EAST_BRIDGE, + /* 0x31 */ mFM_BLOCK_TYPE_RIVER_WEST_BRIDGE, + /* 0x32 */ mFM_BLOCK_TYPE_RIVER_SOUTH_EAST_BRIDGE, + /* 0x33 */ mFM_BLOCK_TYPE_RIVER_EAST_SOUTH_BRIDGE, + /* 0x34 */ mFM_BLOCK_TYPE_RIVER_SOUTH_WEST_BRIDGE, + /* 0x35 */ mFM_BLOCK_TYPE_RIVER_WEST_SOUTH_BRIDGE, + /* 0x36 */ mFM_BLOCK_TYPE_SLOPE_HORIZONTAL, + /* 0x37 */ mFM_BLOCK_TYPE_SLOPE_CORNER_RIGHT_BOTTOM, + /* 0x38 */ mFM_BLOCK_TYPE_SLOPE_VERTICAL_RIGHT, + /* 0x39 */ mFM_BLOCK_TYPE_SLOPE_CORNER_RIGHT_TOP, + /* 0x3A */ mFM_BLOCK_TYPE_SLOPE_CORNER_LEFT_TOP, + /* 0x3B */ mFM_BLOCK_TYPE_SLOPE_VERTICAL_LEFT, + /* 0x3C */ mFM_BLOCK_TYPE_SLOPE_CORNER_LEFT_BOTTOM, + /* 0x3D */ mFM_BLOCK_TYPE_BORDER_CLIFF_TRANSITION_LEFT, + /* 0x3E */ mFM_BLOCK_TYPE_BORDER_CLIFF_TRANSITION_RIGHT, + /* 0x3F */ mFM_BLOCK_TYPE_BEACH, + /* 0x40 */ mFM_BLOCK_TYPE_BEACH_RIVER, + /* 0x41 */ mFM_BLOCK_TYPE_SHOP, + /* 0x42 */ mFM_BLOCK_TYPE_SHRINE, + /* 0x43 */ mFM_BLOCK_TYPE_POST_OFFICE, + /* 0x44 */ mFM_BLOCK_TYPE_POLICE_BOX, + /* 0x45 */ mFM_BLOCK_TYPE_POOL_SOUTH, + /* 0x46 */ mFM_BLOCK_TYPE_POOL_EAST, + /* 0x47 */ mFM_BLOCK_TYPE_POOL_WEST, + /* 0x48 */ mFM_BLOCK_TYPE_POOL_SOUTH_EAST, + /* 0x49 */ mFM_BLOCK_TYPE_POOL_EAST_SOUTH, + /* 0x4A */ mFM_BLOCK_TYPE_POOL_SOUTH_WEST, + /* 0x4B */ mFM_BLOCK_TYPE_POOL_WEST_SOUTH, + /* 0x4C */ mFM_BLOCK_TYPE_76, + /* 0x4D */ mFM_BLOCK_TYPE_77, + /* 0x4E */ mFM_BLOCK_TYPE_78, + /* 0x4F */ mFM_BLOCK_TYPE_79, + /* 0x50 */ mFM_BLOCK_TYPE_BORDER_CLIFF_OCEAN_LEFT, + /* 0x51 */ mFM_BLOCK_TYPE_BORDER_CLIFF_OCEAN_RIGHT, + /* 0x52 */ mFM_BLOCK_TYPE_BEACH_RIVER_BRIDGE, + /* 0x53 */ mFM_BLOCK_TYPE_OCEAN, + + /* 0x54 */ mFM_BLOCK_TYPE_NUM, + + /* 0xFF */ mFM_BLOCK_TYPE_NONE = 0xFF +} FieldMakeBlockType; + +extern u8* g_block_type_p; +extern u32* g_block_kind_p; // s32 in ac-decomp--if problems arise, try changing type + typedef struct Foreground { /* 0x000 */ u16 items[UT_Z_NUM][UT_X_NUM]; } Foreground; // size = 0x200 @@ -43,11 +148,28 @@ typedef struct FieldMakeFGInfo { /* 0x08 */ UNK_TYPE1 unk_08[0x8C]; } FieldMakeFGInfo; // size = 0x94 -typedef struct FieldMakeBlockInfo { - /* 0x000 */ UNK_TYPE1 unk_000[0x580]; +typedef struct FieldMakeBGInfo { + /* 0x000 */ UNK_TYPE1 unk_000[0x14]; + /* 0x014 */ u32 blockKind; + /* 0x018 */ UNK_TYPE1 unk_018[0x08]; + /* 0x020 */ mCoBG_unkStructUnion collision[UT_Z_NUM][UT_X_NUM]; + /* 0x420 */ UNK_TYPE1 unk_024[0x160]; +} FieldMakeBGInfo; // size >= 0x57d + +typedef struct FieldMakeBlockInfo { + /* 0x000 */ FieldMakeBGInfo bgInfo; /* 0x580 */ FieldMakeFGInfo fgInfo; } FieldMakeBlockInfo; // size = 0x614 +typedef struct FieldMakeInfo { + /* 0x000 */ u16 fieldId; + /* 0x002 */ UNK_TYPE1 unk_000[0x146]; + /* 0x148 */ FieldMakeBlockInfo* blockInfo; + /* 0x14C */ UNK_TYPE1 unk_14C[0x1A]; + /* 0x166 */ u8 blockXMax; + /* 0x167 */ u8 blockZMax; +} FieldMakeInfo; // size >= 0x168 + // void func_80084ED0_jp(); // void func_80084FAC_jp(); // void func_800850E4_jp(); @@ -78,7 +200,7 @@ typedef struct FieldMakeBlockInfo { // void func_80086E30_jp(); // void func_80086F08_jp(); // void func_80086FA8_jp(); -void mFM_SetFieldInitData(s32,s32); +void mFM_SetFieldInitData(s32, s32); void func_80087004_jp(void); void func_80087280_jp(void); // void func_80087380_jp(); @@ -89,6 +211,6 @@ void mFM_InitFgCombiSaveData(struct Game* game); // void func_80087788_jp(); // void func_800877CC_jp(); void mFM_RenewalReserve(void); -u16 mFM_GetReseveName(s32,s32); +u16 mFM_GetReseveName(s32,s32); #endif diff --git a/include/m_random_field.h b/include/m_random_field.h index ba52e3e..256edbb 100644 --- a/include/m_random_field.h +++ b/include/m_random_field.h @@ -3,10 +3,6 @@ #include "ultra64.h" - -#define RANDOM_FIELD_BLOCKKIND_SHRINE (1 << 2) - -#define RANDOM_FIELD_BLOCK_TYPE_MAX 108 #define RANDOM_FIELD_DIRECT_ERROR 100 typedef enum RandomFieldDirection { @@ -16,20 +12,54 @@ typedef enum RandomFieldDirection { /* 3 */ RANDOM_FIELD_DIRECT_EAST, /* 4 */ RANDOM_FIELD_DIRECT_NUM -}RandomFieldDirection; +} RandomFieldDirection; typedef struct RandomFieldGate { /* 0x00 */ s32 ut0; /* 0x04 */ s32 ut1; } RandomFieldGate; +#define mRF_BLOCKKIND_NONE (0 << 0) +#define mRF_BLOCKKIND_PLAYER (1 << 0) // Player houses +#define mRF_BLOCKKIND_SHOP (1 << 1) +#define mRF_BLOCKKIND_SHRINE (1 << 2) +#define mRF_BLOCKKIND_POLICE (1 << 3) +#define mRF_BLOCKKIND_POSTOFFICE (1 << 4) +#define mRF_BLOCKKIND_STATION (1 << 5) +#define mRF_BLOCKKIND_CLIFF (1 << 6) +#define mRF_BLOCKKIND_RIVER (1 << 7) +#define mRF_BLOCKKIND_WATERFALL (1 << 8) +#define mRF_BLOCKKIND_BRIDGE (1 << 9) +#define mRF_BLOCKKIND_RAILROAD (1 << 10) +#define mRF_BLOCKKIND_MARINE (1 << 11) // Beach +#define mRF_BLOCKKIND_BORDER (1 << 12) +#define mRF_BLOCKKIND_TUNNEL (1 << 13) +#define mRF_BLOCKKIND_SLOPE (1 << 14) +#define mRF_BLOCKKIND_POOL (1 << 15) // The large pond, not the small pools +#define mRF_BLOCKKIND_DUMP (1 << 16) +#define mRF_BLOCKKIND_RIVER0 (1 << 17) // Flows south +#define mRF_BLOCKKIND_RIVER1 (1 << 18) // Flows east +#define mRF_BLOCKKIND_RIVER2 (1 << 19) // Flows west +#define mRF_BLOCKKIND_RIVER3 (1 << 20) // Flows south then east +#define mRF_BLOCKKIND_RIVER4 (1 << 21) // Flows east then south +#define mRF_BLOCKKIND_RIVER5 (1 << 22) // Flows south then west +#define mRF_BLOCKKIND_RIVER6 (1 << 23) // Flows west then south +#define mRF_BLOCKKIND_CLIFF0 (1 << 24) // Cliff that goes horizontally in an arc across entire block +#define mRF_BLOCKKIND_CLIFF1 (1 << 25) // Bottom part of cliff which juts out, valley on right +#define mRF_BLOCKKIND_CLIFF2 (1 << 26) // Cliff that goes vertically across entire block, valley on right +#define mRF_BLOCKKIND_CLIFF3 (1 << 27) // Top part of cliff which juts out, valley on right +#define mRF_BLOCKKIND_CLIFF4 (1 << 28) // Top part of cliff which juts out, valley on left +#define mRF_BLOCKKIND_CLIFF5 (1 << 29) // Cliff that goes vertically across entire block, valley on left +#define mRF_BLOCKKIND_CLIFF6 (1 << 30) // Bottom part of cliff that juts out, valley on left +#define mRF_BLOCKKIND_31 (1 << 31) // Not used in `mRF_block_info` + // void func_800BCBA0_jp(); // void func_800BCBDC_jp(); // void func_800BCC20_jp(); // void func_800BCC30_jp(); // void func_800BCC40_jp(); // void func_800BCCFC_jp(); -// void func_800BCDCC_jp(); +s32 mRF_Type2BlockInfo(u8 type); // void func_800BCDFC_jp(); // void func_800BCE80_jp(); // void func_800BCEA4_jp(); |
