mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-09 06:03:22 -04:00
d_a_nh OK
This commit is contained in:
+1
-1
@@ -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"),
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user