Skip to content

Commit

Permalink
Merge pull request #525 from Michael0933/MON_MonsterGlow
Browse files Browse the repository at this point in the history
[MONSTER]: Implement MON_MonsterGlow
  • Loading branch information
Michael0933 authored Feb 1, 2024
2 parents 9932a05 + 6737bb7 commit ac501a4
Showing 1 changed file with 43 additions and 19 deletions.
62 changes: 43 additions & 19 deletions KAIN2/Game/MONSTER/MONSTER.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <GAME/CAMERA.H>
#include <Game/STATE.H>
#include <Game/G2/ANMG2ILF.H>
#include <Game/FX.H>

// autogenerated function stub:
// void /*$ra*/ MON_DoCombatTimers(struct _Instance *instance /*$s2*/)
Expand Down Expand Up @@ -1323,27 +1324,50 @@ void MON_EnvironmentDamage(struct _Instance* instance)
}


// autogenerated function stub:
// void /*$ra*/ MON_MonsterGlow(struct _Instance *instance /*$fp*/, long color /*stack 4*/, int glowtime /*$s5*/, int glowin /*$s6*/, int glowfade /*stack 16*/)
void MON_MonsterGlow(struct _Instance *instance, long color, int glowtime, int glowin, int glowfade)
{ // line 2408, offset 0x8008afd4
/* begin block 1 */
// Start line: 2409
// Start offset: 0x8008AFD4
// Variables:
struct _FXGlowEffect *glow; // $v0
struct _MonsterAttributes *ma; // $s4
/* end block 1 */
// End offset: 0x8008B03C
// End Line: 2417
void MON_MonsterGlow(struct _Instance* instance, long color, int glowtime, int glowin, int glowfade) // Matching - 100%
{
struct _FXGlowEffect* glow;
struct _MonsterAttributes* ma;

/* begin block 2 */
// Start line: 5107
/* end block 2 */
// End Line: 5108
UNIMPLEMENTED();
}
ma = (struct _MonsterAttributes*)instance->data;
if (glowtime > 0)
{
glowtime *= 33;
}
if (glowfade > 0)
{
glowfade *= 33;
}
if (glowin > 0)
{
glowin *= 33;
}

glow = FX_DoInstanceTwoSegmentGlow(instance, ma->waistSegment, ma->leftFootSegment, &color, 1, 1024, 160);
glow->lifeTime = glowtime;
glow->fadein_time = glowin;
glow->fadeout_time = glowfade;

glow = FX_DoInstanceTwoSegmentGlow(instance, ma->waistSegment, ma->rightFootSegment, &color, 1, 1024, 160);
glow->lifeTime = glowtime;
glow->fadein_time = glowin;
glow->fadeout_time = glowfade;

glow = FX_DoInstanceTwoSegmentGlow(instance, ma->leftShoulderSegment, ma->leftWeaponSegment, &color, 1, 1024, 128);
glow->lifeTime = glowtime;
glow->fadein_time = glowin;
glow->fadeout_time = glowfade;

glow = FX_DoInstanceTwoSegmentGlow(instance, ma->rightShoulderSegment, ma->rightWeaponSegment, &color, 1, 1024, 128);
glow->lifeTime = glowtime;
glow->fadein_time = glowin;
glow->fadeout_time = glowfade;

glow = FX_DoInstanceTwoSegmentGlow(instance, ma->headSegment, ma->waistSegment, &color, 1, 1024, 192);
glow->lifeTime = glowtime;
glow->fadein_time = glowin;
glow->fadeout_time = glowfade;
}

// autogenerated function stub:
// void /*$ra*/ MON_GeneralDeathEntry(struct _Instance *instance /*$s1*/)
Expand Down

0 comments on commit ac501a4

Please sign in to comment.