diff options
| author | kuchenmitsahne <25233413+kuchenmitsahne@users.noreply.github.com> | 2025-06-04 19:38:23 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-04 16:38:23 -0700 |
| commit | a4d5910cdb9bed05fa5aea4476a3cf4ef178be06 (patch) | |
| tree | 017ad9a1547e3206190c216d8a7ddd2e95ff327c /src/code/m_npc.c | |
| parent | 8c6ae625aef6d07741cd8925f422f43ae24b198c (diff) | |
m_random_field OK (#241)
* 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
* Split data out for `m_quest` and `m_random_field`; rename data symbols
* Generate `m_random_field.c` and rename function symbols.
* mRF_BlockTypeDirect2GateType, mRF_BlockTypeDirect2GateData OK
* mRF_Type2BlockInfo, mRF_Info2BlockType, mRF_GateType2GateCount, mRF_SearchPond, mRF_Attr2BeastRoadAttr, mRF_CheckBeastRoad OK
* mFI_GetUnitCol OK; mRF_PrintDebug and mRF_BlockInf2CheckBeastRoad OK (pending data import).
* Fix `m_random_field` code split; all newly included functions OK
* Fix mRF_Malloc return type; formatting pass
* Name m_random_field_ovl
* Rename data symbols (m_random_field_ovl).
* Rename symbols (all functions named)
* Import data
* Declare overlay segment; rename symbols
* mRF_MakeRandomField OK (all functions matching).
* Extract asset `data_combi_table`
* Clean up mRF_MakeRandomField; document m_field_make.h
* Rename mCoBG_unkStruct->unk6 as unitAttribute
* Misc cleanup and formatting.
* Rename additional data symbols (m_random_field_ovl).
* Formatting pass
* Improve documentation of BackgroundAttribute enum.
* Formatting pass; add omitted attribute.
Diffstat (limited to 'src/code/m_npc.c')
| -rw-r--r-- | src/code/m_npc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/code/m_npc.c b/src/code/m_npc.c index 7320eb9..deb9a3c 100644 --- a/src/code/m_npc.c +++ b/src/code/m_npc.c @@ -3563,7 +3563,8 @@ s32 mNpc_CheckNpcSet(s32 bx, s32 bz, s32 ut_x, s32 ut_z) { s32 res = FALSE; if (collision != NULL && items != NULL) { - res = mNpc_CheckNpcSet_fgcol(items[ut_z * UT_X_NUM + ut_x], collision[ut_z * UT_X_NUM + ut_x].data.unk6); + res = + mNpc_CheckNpcSet_fgcol(items[ut_z * UT_X_NUM + ut_x], collision[ut_z * UT_X_NUM + ut_x].data.unitAttribute); } return res; @@ -3595,7 +3596,7 @@ s32 mNpc_GetMakeUtNuminBlock_hard_area(s32* utX, s32* utZ, s32 bx, s32 bz, s32 r for (i = restrictArea; i < UT_Z_NUM - restrictArea; i++) { for (j = restrictArea; j < UT_X_NUM - restrictArea; j++) { idx = i * UT_X_NUM + j; - if (mNpc_CheckNpcSet_fgcol_hard(items[idx], col[idx].data.unk6) == TRUE) { + if (mNpc_CheckNpcSet_fgcol_hard(items[idx], col[idx].data.unitAttribute) == TRUE) { if (col[idx].data.unk1 == col[idx].data.unk2 && col[idx].data.unk1 == col[idx].data.unk3 && col[idx].data.unk1 == col[idx].data.unk4 && col[idx].data.unk1 == col[idx].data.unk5) { nowUtX = 8 - j; @@ -3645,7 +3646,7 @@ s32 mNpc_GetMakeUtNuminBlock_area(s32* utX, s32* utZ, s32 bx, s32 bz, s32 restri if (fgTop != NULL && col != NULL) { for (i = restrictArea; i < UT_Z_NUM - restrictArea; i++) { for (j = restrictArea; j < UT_X_NUM - restrictArea; j++) { - if (mNpc_CheckNpcSet_fgcol(fgTop[i * UT_X_NUM + j], col[i * UT_X_NUM + j].data.unk6) == TRUE) { + if (mNpc_CheckNpcSet_fgcol(fgTop[i * UT_X_NUM + j], col[i * UT_X_NUM + j].data.unitAttribute) == TRUE) { *fgPtr |= 1 << j; candidates++; } |
