d_a_nh OK

This commit is contained in:
LagoLunatic
2023-10-01 16:59:05 -04:00
parent 08ba064ebb
commit 335d6d1119
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -429,7 +429,7 @@ config.libs = [
Object(NonMatching, "d/actor/d_a_ib.cpp"),
Object(NonMatching, "d/actor/d_a_item.cpp"),
Object(Matching, "d/actor/d_a_itembase.cpp"),
Object(NonMatching, "d/actor/d_a_nh.cpp"),
Object(Matching, "d/actor/d_a_nh.cpp"),
Object(NonMatching, "d/actor/d_a_npc_fa1.cpp"),
Object(NonMatching, "d/actor/d_a_obj_search.cpp"),
Object(NonMatching, "d/actor/d_a_player.cpp"),
+5 -5
View File
@@ -85,6 +85,11 @@ inline T cLib_maxLimit(T val, T max) {
return (T)ret;
}
template <typename T>
T cLib_getRndValue(T min, T range) {
return (T)(min + cM_rndF((f32)range));
}
template <typename T>
T cLib_calcTimer(T* value) {
if ((s32)*value != 0) {
@@ -93,11 +98,6 @@ T cLib_calcTimer(T* value) {
return *value;
}
template <typename T>
T cLib_getRndValue(T min, T range) {
return (T)(min + cM_rndF((f32)range));
}
void MtxInit(void);
void MtxTrans(f32, f32, f32, u8);
void MtxScale(f32, f32, f32, u8);
+4 -4
View File
@@ -334,8 +334,8 @@ BOOL daNh_c::searchPlayer() {
f32 playerDistDelta = mPlayerDist - playerDist;
mPlayerDist = playerDist;
if (playerDelta.absXZ() > 0.001f && playerDist < 600.0f && playerDistDelta > l_HIO.prm.mMinFrightenSpeed) {
// Player is nearby and moving closer. The Forest Firefly becomes frightened and tries to head home.
setAction(&returnAction, NULL);
// Player is nearby and moving closer. The Forest Firefly becomes frightened and tries to escape.
setAction(&escapeAction, NULL);
return TRUE;
}
@@ -562,12 +562,12 @@ BOOL daNh_c::draw() {
if (mat) {
J3DTevBlock* tevBlock = mat->getTevBlock();
if (tevBlock) {
GXColorS10* color = tevBlock->getTevColor(1);
GXColorS10* color = &tevBlock->getTevColor(1)->mColor;
if (color) {
mGlowAlpha = ((color->r + color->g + color->b) / 3) >> 2;
}
GXColor* kColor = tevBlock->getTevKColor(3);
GXColor* kColor = &tevBlock->getTevKColor(3)->mColor;
if (kColor) {
kColor->a = mAlpha;
}