#include "Contents/Effects/Core/RagEffect.h" #include "Client/Mode/ModeMessage.h" #include "Contents/Actors/ActorEnums.h" #include "Contents/Actors/ActorEnums.h" #include "Contents/Actors/Pc.h" #include "Contents/Map/MapSkyMgr.h" #include "Contents/Skills/ClientSkills.h" #include "Contents/Effects/Core/EffectActor.h" #include "Contents/Effects/Primitives/EffectPrimitiveState.h" #include "Resource/Resource.h" #include "Client/Mode/CGameMode.h" #include "Client/Session/Session.h" #include "Client/Mode/ModeMgr.h" #include "Contents/Camera/Camera.h" #include "Contents/Configuration/ServiceOptions.h" #include "Contents/Effects/Primitives/EffectPrim.h" #include "Contents/Sound/SoundMgr.h" #include "Contents/World/World.h" #include "Render/Primitives/RenderPrimitive.h" #include "Render/Renderer.h" #include "Contents/Actors/GroundScope.h" #include "Render/Textures/TextureCache.h" #include "Resource/ResourceMgr.h" #include "Resource/Sprites/ActionResource.h" #include "Utility/Math/AffineMatrix.h" #include "Contents/Effects/Primitives/EffectPrimitiveMotion.h" #include "Resource/Effects/EZeffectResource.h" #include "Resource/World/TerrainResource.h" #include "Render/Textures/Texture.h" #include "Contents/Jobs/JobInheritance.h" #include "Contents/Actors/Npc.h" #include "Render/Primitives/TextureQuad.h" #include "Contents/Effects/Core/EffectLists.h" #include "Contents/Effects/Core/EffectTypes.h" #include "Contents/Effects/Core/EffectTypes.h" #include "Contents/Effects/Particles/Particle.h" #include "Client/Application/ErrorDialog.h" #include "Render/DeviceContext/DCSurface.h" #include #include #include #include #include #include #include // INLINED inline RagEffectState::RagEffectState() : deltaPos(), deltaPos2(), deltaPos3() { for (unsigned index = 0; index < 20; ++index) { this->objSeg[index].header[0] = 0; this->objSeg[index].header[1] = 0; this->objSeg[index].header[2] = 0; this->objSeg[index].header[3] = 0; this->objSeg[index].header[4] = 0; this->objSeg[index].header[5] = 0; } } // INLINED inline RagEffectState::~RagEffectState() { } // OFFSET: 0x00BF84B0 // FUNCTION: fn_20007 CRagEffect::CRagEffect() { this->state.visibilityFlags = 0; this->state.parent = nullptr; this->state.count = 0; this->state.stateCnt = 0; this->state.type = 0; this->state.level = 1; this->state.flag = 0; this->state.defZ = 0; this->state.isDirection = 0; this->state.deltaPos[0] = 0.0f; this->state.deltaPos[1] = 0.0f; this->state.deltaPos[2] = 0.0f; this->state.deltaPos2[0] = 0.0f; this->state.deltaPos2[1] = 0.0f; this->state.deltaPos2[2] = 0.0f; this->state.deltaPos3[0] = 0.0f; this->state.deltaPos3[1] = 0.0f; this->state.deltaPos3[2] = 0.0f; this->state.resource = nullptr; this->state.resourceData = nullptr; this->state.currentLayer = 0; std::memset(this->state.currentKey, 0, sizeof(this->state.currentKey)); std::memset(this->state.vertices, 0, sizeof(this->state.vertices)); this->state.colorChannels[0] = -1; this->state.colorChannels[1] = -1; this->state.colorChannels[2] = -1; this->state.colorChannels[3] = -1; this->state.loopCount = 0; this->state.loopLimit = 0; this->state.forceRender = 0; this->state.currentPrimitive = nullptr; this->state.tag = 0; } // INLINED static CEffectPrim& Owner(EffectPrimitiveState* particle) { return *reinterpret_cast(reinterpret_cast(particle) - offsetof(CEffectPrim, state)); } // OFFSET: 0x00BF8AC0 // FUNCTION: fn_20011 CRagEffect::~CRagEffect() { if (!this->state.primList.empty()) { for (auto it = this->state.primList.begin(); it != this->state.primList.end(); ++it) { Owner(*it).HandleMasterMessage(nullptr, 24, 0, 0, 0, 0, 0, 0, 0); } this->state.primList.erase(this->state.primList.begin(), this->state.primList.end()); } if (this->state.parent) { this->state.parent->SendMsg(this, AM_EFFECT_DEAD, 0, 0, 0, 0, 0, 0); } if (this->state.resource) { this->state.resource->Unlock(); } } // INLINED static vector3d RotatedForward(const float* matrix, float distance) { return { ((matrix[3] * 0.0f + matrix[0] * 0.0f) + matrix[6] * distance) + matrix[9], ((matrix[4] * 0.0f + matrix[1] * 0.0f) + matrix[7] * distance) + matrix[10], ((matrix[5] * 0.0f + matrix[2] * 0.0f) + matrix[8] * distance) + matrix[11] }; } // INLINED static void AllocateTextures(EffectPrimitiveState& particle) { const auto bytes = particle.totalTexture >> 30 != 0 ? std::numeric_limits::max() : static_cast(4u * particle.totalTexture); particle.textures = static_cast(::operator new(bytes)); } // INLINED static void PlayEffectWave(const CRagEffect& effect, const char* name) { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( name, effect.render.position.x - player->render.position.x, 0.0f, effect.render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } // INLINED static int ClampedRandom(int range) { const int value = rand() % range; return value >= 0 ? value : 0; } // INLINED static void CopyVector(vector3d& to, const vector3d& from) { to.x = from.x; to.y = from.y; to.z = from.z; } // INLINED static std::list& WorldObjects() { return static_cast(g_modeMgr.GetGameMode())->scene->objects; } // INLINED static int BlendTintChannel(unsigned char tint, float value) { return static_cast(tint + value) >> 1; } // INLINED static bool HasTint(const EffectActor& parent) { return reinterpret_cast(parent.render.savedTintColor) != 0; } // INLINED static void SetBlendedTint(CRenderObject& target, const EffectActor& parent, const vector3d& color) { const unsigned char* tint = reinterpret_cast(&parent.render.targetTintColor); target.SetColor(-1, BlendTintChannel(tint[1], color.x), BlendTintChannel(tint[2], color.y), BlendTintChannel(tint[3], color.z)); } // INLINED static __forceinline void SendAfterimageColor(CGameObject& target, CRagEffect& sender, const vector3d& color) { const int red = static_cast(color.x); const int green = static_cast(color.y); const int blue = static_cast(color.z); target.SendMsg(&sender, 0, red, green, blue, 0, 0, 0); } // GLOBAL: gl_25089 int g_statusIconIds[100]; // OFFSET: 0x00C11C60 // FUNCTION: fn_20039 void CRagEffect::Endure() { RenderVertex screen{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, screen ); this->state.tlvertX = screen.x; this->state.tlvertY = screen.y; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_Endure.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.pattern |= 2; this->state.lastPrim->state.deltaPos2.y = -20.0f; this->state.lastPrim->state.widthSize = 150.0f; this->state.lastPrim->state.heightSize = 150.0f; this->state.lastPrim->state.widthSpeed = -5.0f; this->state.lastPrim->state.heightSpeed = -5.0f; this->state.lastPrim->state.chCnt = this->state.lastPrim->state.duration - 35; EffectPrimitiveState& shrinkWidth = this->state.lastPrim->state; shrinkWidth.widthAccel = -shrinkWidth.widthSpeed / static_cast(shrinkWidth.chCnt); EffectPrimitiveState& shrinkHeight = this->state.lastPrim->state; shrinkHeight.heightAccel = -shrinkHeight.heightSpeed / static_cast(shrinkHeight.chCnt); this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 20.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\endure.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } if (this->state.stateCnt >= 50) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; const float heading = static_cast(ClampedRandom(360)); this->state.lastPrim->state.roll = heading; this->state.lastPrim->state.longitude = heading; this->state.lastPrim->state.speed = -4.0f; EffectPrimitiveState& streak = this->state.lastPrim->state; streak.accel = -(streak.speed / static_cast(streak.duration)); this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(100) + 60) / 100.0f; this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(20) + 30); this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 20.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; const float radius = static_cast(ClampedRandom(40) + 100); this->state.lastPrim->state.deltaPos2.x = ClientSine(static_cast(this->state.lastPrim->state.longitude)) * radius; this->state.lastPrim->state.deltaPos2.y = ClientCosine(static_cast(this->state.lastPrim->state.longitude)) * -radius; this->state.lastPrim->state.deltaPos2.y -= 20.0f; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } // OFFSET: 0x00C121A0 // FUNCTION: fn_20040 void CRagEffect::BloodDrain() { if (this->state.stateCnt != 0) { return; } for (int angle = -90; angle < 180; angle += 90) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 8, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 60; this->state.lastPrim->state.deltaPos2 = {0.0f, -10.0f, 0.0f}; this->state.lastPrim->state.radius = this->state.lastPrim->CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->Face(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->state.longitude = -this->state.lastPrim->render.angle; const float speed = this->state.lastPrim->state.radius / this->state.lastPrim->state.duration; this->state.lastPrim->state.speed = speed + speed; this->state.lastPrim->state.gravSpeed = 2.0f; const float rise = -(this->state.lastPrim->state.gravSpeed / this->state.lastPrim->state.duration); this->state.lastPrim->state.gravAccel = rise + rise; this->state.lastPrim->state.latiSpeed = -2.0f; const float spread = -(this->state.lastPrim->state.latiSpeed / this->state.lastPrim->state.duration); this->state.lastPrim->state.latiAccel = spread + spread; this->state.lastPrim->state.roll = static_cast(angle); EffectPrimitiveState& particle = this->state.lastPrim->state; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(static_cast(particle.longitude))); this->state.lastPrim->state.deltaPos3 = RotatedForward(this->state.lastPrim->state.transform, 1.0f); this->state.lastPrim->state.rotAxis[0] = this->state.lastPrim->state.deltaPos3.x; this->state.lastPrim->state.rotAxis[1] = this->state.lastPrim->state.deltaPos3.y; this->state.lastPrim->state.rotAxis[2] = this->state.lastPrim->state.deltaPos3.z; this->state.lastPrim->state.red = 100; this->state.lastPrim->state.green = 100; this->state.lastPrim->state.blue = 250; this->state.lastPrim->state.size = 1.7f; this->state.lastPrim->SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); this->state.lastPrim->SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); this->state.lastPrim->state.numSegment = 7; this->state.lastPrim->InitSegment(); } } // OFFSET: 0x00C14510 // FUNCTION: fn_20046 void CRagEffect::FireBall() { const int frame = this->state.stateCnt; if (frame != 20 && frame != 24 && frame != 28 && frame != 32) { return; } PlayEffectWave(*this, "effect\\EF_FireBall.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 20; this->state.lastPrim->state.pattern |= 0x120u; this->state.lastPrim->state.deltaPos2 = {0.0f, -15.0f, 0.0f}; this->state.lastPrim->Face(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->state.longitude = -this->state.lastPrim->render.angle; this->state.lastPrim->render.angle = 180.0f - this->state.lastPrim->render.angle; if (this->state.lastPrim->render.angle < 0.0f) { this->state.lastPrim->render.angle = this->state.lastPrim->render.angle + 360.0f; } CEffectPrim& particle = *this->state.lastPrim; particle.state.speed = -(particle.CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]) / particle.state.duration); reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.size = 1.3f; this->state.lastPrim->state.animSpeed = 1; if (this->state.stateCnt != 20) { this->state.lastPrim->state.red = 246; this->state.lastPrim->state.green = 199; this->state.lastPrim->state.blue = 76; if (this->state.stateCnt == 24) { this->state.lastPrim->state.alpha = 180.0f; } else if (this->state.stateCnt == 28) { this->state.lastPrim->state.alpha = 130.0f; } else { this->state.lastPrim->state.alpha = 80.0f; } } this->state.lastPrim->SetSpriteName("이팩트\\fireball.spr"); this->state.lastPrim->SetActionName("이팩트\\fireball.act"); this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C147D0 // FUNCTION: fn_20047 void CRagEffect::FireSparks() { if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.pattern |= 4u; this->state.lastPrim->state.pattern |= 0x80u; this->state.lastPrim->state.duration = 140; this->state.duration = 140; this->state.lastPrim->state.speed = static_cast(ClampedRandom(35) + 15) / 100.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.latitude = static_cast(ClampedRandom(360)); EffectPrimitiveState& yaw = this->state.lastPrim->state; reinterpret_cast(yaw.transform)->MakeYRotation(GetRadian(static_cast(yaw.longitude))); EffectPrimitiveState& pitch = this->state.lastPrim->state; reinterpret_cast(pitch.transform)->AppendXRotation(GetRadian(static_cast(pitch.latitude))); const float* m = this->state.lastPrim->state.transform; const float distance = static_cast(ClampedRandom(13) + 2); EffectPrimitiveState& moving = this->state.lastPrim->state; moving.deltaPos2.x = (((m[3] * 0.0f + m[0] * 0.0f) + distance * m[6]) + m[9]) + 0.0f; moving.deltaPos2.y = (((m[1] * 0.0f + m[4] * 0.0f) + distance * m[7]) + m[10]) - 10.0f; moving.deltaPos2.z = (((m[5] * 0.0f + m[2] * 0.0f) + distance * m[8]) + m[11]) + 0.0f; this->state.lastPrim->state.chCnt = ClampedRandom(25) + 5; this->state.lastPrim->state.size = static_cast(ClampedRandom(70) + 30) / 100.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 80.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 1.5f; this->state.lastPrim->state.changeFlags.z = std::bit_cast(1u); this->state.lastPrim->state.colorCycleIndex = 0; this->state.lastPrim->state.chPoint.push_back(40.0f); this->state.lastPrim->state.chVal1.push_back(120.0f); this->state.lastPrim->state.chVal2.push_back(200.0f); this->state.lastPrim->state.chPoint.push_back(100.0f); this->state.lastPrim->state.chVal1.push_back(0.0f); this->state.lastPrim->state.chVal2.push_back(80.0f); this->state.lastPrim->SetSpriteName("이팩트\\particle1.spr"); this->state.lastPrim->SetActionName("이팩트\\particle1.act"); this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C15AB0 // FUNCTION: fn_20053 void CRagEffect::FrostDiver2() { if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\EF_FrostDiver2.wav"); for (int index = 0; index < 8; ++index) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; this->state.lastPrim->state.pattern |= 1u; const int angle = ClampedRandom(360); const float length = static_cast(ClampedRandom(4) + 1) / 10.0f; const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); this->state.lastPrim->state.deltaPos2.y = 30.0f; this->state.lastPrim->state.deltaPos2.x = sine * length; this->state.lastPrim->state.deltaPos2.z = -length * cosine; this->state.lastPrim->state.size = static_cast(ClampedRandom(250) + 100) / 100.0f; this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(100) + 200) / 10.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.latitude = static_cast(ClampedRandom(20) + 80); reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(static_cast(this->state.lastPrim->state.latitude))); EffectPrimitiveState& turn = this->state.lastPrim->state; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); EffectPrimitiveState& copy = this->state.lastPrim->state; std::memcpy(copy.rotTransform, copy.transform, sizeof(copy.rotTransform)); this->state.lastPrim->state.speed = 3.0f; EffectPrimitiveState& slow = this->state.lastPrim->state; const float decay = -(slow.speed / slow.duration); slow.accel = decay + decay; this->state.lastPrim->state.chCnt = 20; this->state.lastPrim->state.alpha = 200.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ice.tga", 0, false, true, false); } } // OFFSET: 0x00C15E40 // FUNCTION: fn_20054 void CRagEffect::FrostDiver(char type) { if (g_serviceOptions.Get(229) != 0) { return; } if (this->state.stateCnt == 0) { this->Face(this->state.deltaPos[0], this->state.deltaPos[2]); matrix rotation; rotation.MakeYRotation(GetRadian(static_cast(-this->render.angle))); const vector3d reach = RotatedForward(rotation.values, 5.0f); this->state.deltaPos3[0] = this->state.deltaPos3[0] - reach.x; this->state.deltaPos3[1] = this->state.deltaPos3[1] - reach.y; this->state.deltaPos3[2] = this->state.deltaPos3[2] - reach.z; const vector3d step = RotatedForward(rotation.values, 2.0f); this->state.deltaPos2[0] = step.x; this->state.deltaPos2[1] = step.y; this->state.deltaPos2[2] = step.z; } if (this->state.flag != 0) { return; } const vector3d saved = this->render.position; this->render.position.x = this->state.deltaPos3[0] + this->render.position.x; this->render.position.y = this->state.deltaPos3[1] + this->render.position.y; this->render.position.z = this->state.deltaPos3[2] + this->render.position.z; if (this->CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]) <= 2.5f) { this->state.flag = 1; } CopyVector(this->render.position, saved); this->state.lastPrim = CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; this->state.lastPrim->state.pattern |= 1u; this->state.lastPrim->state.slots[0].flag1[0] = type == 3 ? 3 : 0; const int angle = ClampedRandom(360); const float distance = static_cast(ClampedRandom(10) + 5) / 10.0f; const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); this->state.lastPrim->state.deltaPos2.y = 30.0f; this->state.lastPrim->state.deltaPos2.x = sine * distance; this->state.lastPrim->state.deltaPos2.z = -distance * cosine; vector3d& velocity = this->state.lastPrim->state.deltaPos2; velocity.x = this->state.deltaPos3[0] + velocity.x; velocity.y = this->state.deltaPos3[1] + velocity.y; velocity.z = this->state.deltaPos3[2] + velocity.z; this->state.lastPrim->state.size = static_cast(ClampedRandom(40) + 60) / 100.0f; this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(30) + 150) / 10.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.latitude = static_cast(ClampedRandom(30) + 75); EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = this->state.lastPrim->state; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); EffectPrimitiveState& copy = this->state.lastPrim->state; std::memcpy(copy.rotTransform, copy.transform, sizeof(copy.rotTransform)); this->state.lastPrim->state.speed = 3.0f; EffectPrimitiveState& slow = this->state.lastPrim->state; const float decay = -(slow.speed / slow.duration); slow.accel = decay + decay; this->state.lastPrim->state.chCnt = 20; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; CTexture* texture = g_texMgr.Load("effect\\ice.tga", 0, false, true, false); this->state.lastPrim->state.textures[0] = texture; this->state.deltaPos3[0] = this->state.deltaPos3[0] - this->state.deltaPos2[0]; this->state.deltaPos3[1] = this->state.deltaPos3[1] - this->state.deltaPos2[1]; this->state.deltaPos3[2] = this->state.deltaPos3[2] - this->state.deltaPos2[2]; } // OFFSET: 0x00C16C70 // FUNCTION: fn_20058 void CRagEffect::GrimTooth() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_FrostDiver.wav"); this->Face(this->state.deltaPos[0], this->state.deltaPos[2]); matrix rotation; rotation.MakeYRotation(GetRadian(static_cast(-this->render.angle))); const vector3d step = RotatedForward(rotation.values, 2.0f); this->state.deltaPos2[0] = step.x; this->state.deltaPos2[1] = step.y; this->state.deltaPos2[2] = step.z; this->state.deltaPos3[0] = this->state.deltaPos3[0] - step.x; this->state.deltaPos3[1] = this->state.deltaPos3[1] - step.y; this->state.deltaPos3[2] = this->state.deltaPos3[2] - step.z; } if (this->state.flag != 0) { return; } if (this->state.stateCnt % 3 != 0) { this->state.deltaPos3[0] = this->state.deltaPos3[0] - this->state.deltaPos2[0]; this->state.deltaPos3[1] = this->state.deltaPos3[1] - this->state.deltaPos2[1]; this->state.deltaPos3[2] = this->state.deltaPos3[2] - this->state.deltaPos2[2]; return; } const vector3d saved = this->render.position; if (this->CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]) <= 2.5f) { this->state.flag = 1; } CopyVector(this->render.position, saved); this->state.lastPrim = CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.pattern |= 1u; this->state.lastPrim->state.duration = 40; const int angle = ClampedRandom(360); rand(); ClientSine(angle); ClientCosine(angle); this->state.lastPrim->state.deltaPos2 = {0.0f, 20.0f, 0.0f}; vector3d& velocity = this->state.lastPrim->state.deltaPos2; velocity.x = this->state.deltaPos3[0] + velocity.x; velocity.y = this->state.deltaPos3[1] + velocity.y; velocity.z = this->state.deltaPos3[2] + velocity.z; this->state.lastPrim->state.size = static_cast(ClampedRandom(40) + 60) / 100.0f; this->state.lastPrim->state.heightSize = 10.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.latitude = static_cast(ClampedRandom(30) + 75); reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(static_cast(this->state.lastPrim->state.latitude))); reinterpret_cast(this->state.lastPrim->state.transform)->AppendYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); std::memcpy(this->state.lastPrim->state.rotTransform, this->state.lastPrim->state.transform, sizeof(this->state.lastPrim->state.rotTransform)); this->state.lastPrim->state.speed = 3.0f; const float decay = -(this->state.lastPrim->state.speed / this->state.lastPrim->state.duration); this->state.lastPrim->state.accel = decay + decay; this->state.lastPrim->state.chCnt = 6; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; CTexture* texture = g_texMgr.Load("effect\\stone.bmp", 0, false, true, false); this->state.deltaPos3[0] = this->state.deltaPos3[0] - this->state.deltaPos2[0]; this->state.deltaPos3[1] = this->state.deltaPos3[1] - this->state.deltaPos2[1]; this->state.lastPrim->state.textures[0] = texture; this->state.deltaPos3[2] = this->state.deltaPos3[2] - this->state.deltaPos2[2]; } // OFFSET: 0x00C1B490 // FUNCTION: fn_20071 void CRagEffect::IceWall() { if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\wizard_icewall.wav"); this->state.duration = 9999; for (int offset = -2; offset < 4; offset += 2) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.pattern |= 1u; const int angle = ClampedRandom(360); const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); this->state.lastPrim->state.deltaPos2.y = 30.0f; this->state.lastPrim->state.deltaPos2.x = sine * 0.0f; this->state.lastPrim->state.deltaPos2.z = -static_cast(offset) * cosine; this->state.lastPrim->state.size = static_cast(ClampedRandom(40) / 100) + 2.5f; this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(100) + 300) / 10.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.latitude = static_cast(ClampedRandom(6) + 87); this->state.lastPrim->state.chCnt = 20; this->state.lastPrim->state.alpha = 200.0f; EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = this->state.lastPrim->state; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); EffectPrimitiveState& copy = this->state.lastPrim->state; std::memcpy(copy.rotTransform, copy.transform, sizeof(copy.rotTransform)); this->state.lastPrim->state.speed = 3.0f; EffectPrimitiveState& slow = this->state.lastPrim->state; const float decay = -(slow.speed / 40.0f); slow.accel = decay + decay; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ice.tga", 0, false, true, false); } } // OFFSET: 0x00C1B8B0 // FUNCTION: fn_20072 void CRagEffect::IncAgiDex() { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, vertex ); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_IncAgiDex.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.longitude = 0.0f; this->state.lastPrim->state.speed = 1.5f; EffectPrimitiveState& slow = this->state.lastPrim->state; slow.accel = -(slow.speed / static_cast(slow.duration)) * 1.2f; this->state.lastPrim->state.widthSize = 40.0f; this->state.lastPrim->state.heightSize = 20.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 15.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 15; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\dex_agi_up.bmp", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } if ((this->state.stateCnt & 1) != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 50; EffectPrimitiveState& spin = this->state.lastPrim->state; reinterpret_cast(spin.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); EffectPrimitiveState& moving = this->state.lastPrim->state; const float distance = static_cast(ClampedRandom(7) + 2); const vector3d step = RotatedForward(moving.transform, distance); moving.deltaPos2.x = step.x; moving.deltaPos2.y = step.y; moving.deltaPos2.z = step.z; reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(90)); this->state.lastPrim->state.speed = static_cast(ClampedRandom(50) + 20) / 100.0f; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(60) + 30) / 10.0f; this->state.lastPrim->state.heightSize = 0.18f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 20.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } // OFFSET: 0x00C1BDC0 // FUNCTION: fn_20073 void CRagEffect::IncAgility() { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, vertex ); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_IncAgility.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.longitude = 0.0f; this->state.lastPrim->state.speed = 1.5f; this->state.lastPrim->state.accel = -(this->state.lastPrim->state.speed / static_cast(this->state.lastPrim->state.duration)) * 1.2f; this->state.lastPrim->state.widthSize = 40.0f; this->state.lastPrim->state.heightSize = 20.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 15.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 15; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\agi_up.bmp", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 99; } if ((this->state.stateCnt & 1) != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 50; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); EffectPrimitiveState& moving = this->state.lastPrim->state; const float distance = static_cast(ClampedRandom(7) + 2); const vector3d step = RotatedForward(moving.transform, distance); moving.deltaPos2.x = step.x; moving.deltaPos2.y = step.y; moving.deltaPos2.z = step.z; reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(90)); this->state.lastPrim->state.speed = static_cast(ClampedRandom(50) + 20) / 100.0f; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(60) + 30) / 10.0f; this->state.lastPrim->state.heightSize = 0.18f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 20.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 99; } // OFFSET: 0x00C18490 // FUNCTION: fn_20063 void CRagEffect::Hit1() { if (this->state.stateCnt != 0) { return; } int facing = static_cast(180.0f - this->state.parent->render.angle); if (facing < 0) { facing += 360; } this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 10; this->state.currentPrimitive->longitude = static_cast(facing); this->state.currentPrimitive->latitude = -90.0f; EffectPrimitiveState& flat = *this->state.currentPrimitive; reinterpret_cast(flat.transform)->MakeXRotation(GetRadian(static_cast(flat.latitude))); EffectPrimitiveState& facingRing = *this->state.currentPrimitive; reinterpret_cast(facingRing.transform)->AppendYRotation(GetRadian(static_cast(facingRing.longitude))); this->state.currentPrimitive->deltaPos2 = {0.0f, -10.0f, 0.0f}; this->state.currentPrimitive->speed = 0.7f; EffectPrimitiveState& expanding = *this->state.currentPrimitive; expanding.accel = -(expanding.speed / static_cast(expanding.duration)) * g_depthAverageHalf; this->state.currentPrimitive->outerSize = 10.0f; this->state.currentPrimitive->innerSize = 5.0f; this->state.currentPrimitive->heightSize = 3.5f; this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - this->state.currentPrimitive->duration / 2; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); if (g_serviceOptions.Get(0xe5) != 0) { return; } for (int count = 0; count < 2; ++count) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 80, 0) + (facing - 40)); this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); EffectPrimitiveState& aimed = *this->state.currentPrimitive; reinterpret_cast(aimed.transform)->MakeYRotation(GetRadian(static_cast(aimed.longitude))); EffectPrimitiveState& pitched = *this->state.currentPrimitive; reinterpret_cast(pitched.transform)->AppendXRotation(GetRadian(static_cast(pitched.latitude))); EffectPrimitiveState& launched = *this->state.currentPrimitive; launched.deltaPos3 = RotatedForward(launched.transform, static_cast(std::max(rand() % 4, 0) + 4)); EffectPrimitiveState& placed = *this->state.currentPrimitive; placed.deltaPos2 = {placed.deltaPos3.x + 0.0f, placed.deltaPos3.y - 10.0f, placed.deltaPos3.z + 0.0f}; this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; EffectPrimitiveState& braking = *this->state.currentPrimitive; braking.accel = -(braking.speed / static_cast(braking.duration)) * g_depthAverageHalf; this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; this->state.currentPrimitive->fadeOutCnt = 0; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); this->state.currentPrimitive->numSegment = 3; Owner(this->state.currentPrimitive).InitSegment(); } for (int count = 0; count < 2; ++count) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 80, 0) + (facing + 140)); this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); EffectPrimitiveState& aimed = *this->state.currentPrimitive; reinterpret_cast(aimed.transform)->MakeYRotation(GetRadian(static_cast(aimed.longitude))); EffectPrimitiveState& pitched = *this->state.currentPrimitive; reinterpret_cast(pitched.transform)->AppendXRotation(GetRadian(static_cast(pitched.latitude))); EffectPrimitiveState& launched = *this->state.currentPrimitive; launched.deltaPos3 = RotatedForward(launched.transform, static_cast(std::max(rand() % 4, 0) + 4)); EffectPrimitiveState& placed = *this->state.currentPrimitive; placed.deltaPos2 = {placed.deltaPos3.x + 0.0f, placed.deltaPos3.y - 10.0f, placed.deltaPos3.z + 0.0f}; EffectPrimitiveState& level = *this->state.currentPrimitive; reinterpret_cast(level.transform)->MakeYRotation(GetRadian(static_cast(level.longitude))); this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; EffectPrimitiveState& braking = *this->state.currentPrimitive; braking.accel = -(braking.speed / static_cast(braking.duration)) * g_depthAverageHalf; this->state.currentPrimitive->gravSpeed = -static_cast(std::max(rand() % 90, 0) + 30) / 100.0f; EffectPrimitiveState& falling = *this->state.currentPrimitive; falling.gravAccel = -(falling.gravSpeed / static_cast(falling.duration) * 2.0f); this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; this->state.currentPrimitive->fadeOutCnt = 0; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); this->state.currentPrimitive->numSegment = 3; Owner(this->state.currentPrimitive).InitSegment(); } } // OFFSET: 0x00C18D90 // FUNCTION: fn_20064 void CRagEffect::Hit2(int option) { RenderVertex screen{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, screen ); this->state.tlvertX = screen.x; this->state.tlvertY = screen.y; if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\EF_hit2.wav"); int index = 0; for (float degree = 0.0f; degree < 360.0f; degree += 45.0f, ++index) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.pattern = 1; this->state.lastPrim->state.duration = ClampedRandom(20) + 10; const float heading = (degree - 15.0f) + static_cast(ClampedRandom(30)); this->state.lastPrim->state.roll = heading; this->state.lastPrim->state.longitude = heading; this->state.lastPrim->state.speed = static_cast(ClampedRandom(45) + 5) / 10.0f; EffectPrimitiveState& moving = this->state.lastPrim->state; moving.accel = -(moving.speed / static_cast(moving.duration)) * g_depthAverageHalf; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(15) + 5); this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(20) + 20); EffectPrimitiveState& narrowing = this->state.lastPrim->state; narrowing.widthSpeed = -(narrowing.widthSize / static_cast(narrowing.duration)); this->state.lastPrim->state.heightSpeed = 1.5f; this->state.lastPrim->state.heightAccel = 0.25f; const float spread = static_cast(ClampedRandom(5)); this->state.lastPrim->state.deltaPos2.x = ClientSine(static_cast(degree)) * spread; this->state.lastPrim->state.deltaPos2.y = ClientCosine(static_cast(degree)) * -spread; this->state.lastPrim->state.deltaPos2.y -= 20.0f; if (option != 0) { this->state.lastPrim->state.red = 120; this->state.lastPrim->state.green = 120; } this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha * 0.125f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if ((index & 1) == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\lens1.tga", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\lens2.tga", 0, false, true, false); } } } // OFFSET: 0x00C191D0 // FUNCTION: fn_20065 void CRagEffect::Hit3() { if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\EF_hit3.wav"); int facing = static_cast(180.0f - this->state.parent->render.angle); if (facing < 0) { facing += 360; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 15; this->state.lastPrim->state.longitude = static_cast(facing); this->state.lastPrim->state.latitude = -90.0f; EffectPrimitiveState& smallFlat = this->state.lastPrim->state; reinterpret_cast(smallFlat.transform)->MakeXRotation(GetRadian(static_cast(smallFlat.latitude))); EffectPrimitiveState& smallFacing = this->state.lastPrim->state; reinterpret_cast(smallFacing.transform)->AppendYRotation(GetRadian(static_cast(smallFacing.longitude))); this->state.lastPrim->state.deltaPos2 = {0.0f, -10.0f, 0.0f}; this->state.lastPrim->state.speed = 0.7f; EffectPrimitiveState& smallRing = this->state.lastPrim->state; smallRing.accel = -(smallRing.speed / static_cast(smallRing.duration)) * g_depthAverageHalf; this->state.lastPrim->state.outerSize = 1.5f; this->state.lastPrim->state.innerSize = 1.5f; this->state.lastPrim->state.heightSpeed = 0.5f; this->state.lastPrim->state.heightAccel = 0.2f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\lens2.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 15; this->state.lastPrim->state.longitude = static_cast(facing); this->state.lastPrim->state.latitude = -90.0f; EffectPrimitiveState& wideFlat = this->state.lastPrim->state; reinterpret_cast(wideFlat.transform)->MakeXRotation(GetRadian(static_cast(wideFlat.latitude))); EffectPrimitiveState& wideFacing = this->state.lastPrim->state; reinterpret_cast(wideFacing.transform)->AppendYRotation(GetRadian(static_cast(wideFacing.longitude))); this->state.lastPrim->state.deltaPos2 = {0.0f, -10.0f, 0.0f}; this->state.lastPrim->state.speed = 0.7f; EffectPrimitiveState& wideRing = this->state.lastPrim->state; wideRing.accel = -(wideRing.speed / static_cast(wideRing.duration)) * g_depthAverageHalf; this->state.lastPrim->state.outerSize = 4.0f; this->state.lastPrim->state.innerSize = 1.5f; this->state.lastPrim->state.heightSpeed = 0.25f; this->state.lastPrim->state.heightAccel = 0.2f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\lens2.tga", 0, false, true, false); for (int count = 0; count < 8; ++count) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.longitude = static_cast(ClampedRandom(80) + (facing - 40)); this->state.lastPrim->state.latitude = static_cast(ClampedRandom(100) - 50); reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); EffectPrimitiveState& pitched = this->state.lastPrim->state; reinterpret_cast(pitched.transform)->AppendXRotation(GetRadian(static_cast(pitched.latitude))); EffectPrimitiveState& launched = this->state.lastPrim->state; launched.deltaPos3 = RotatedForward(launched.transform, static_cast(ClampedRandom(4) + 4)); EffectPrimitiveState& placed = this->state.lastPrim->state; placed.deltaPos2 = {placed.deltaPos3.x + 0.0f, placed.deltaPos3.y - 10.0f, placed.deltaPos3.z + 0.0f}; this->state.lastPrim->state.speed = static_cast(ClampedRandom(120) + 80) / 100.0f; this->state.lastPrim->state.duration = ClampedRandom(24) + 6; EffectPrimitiveState& braking = this->state.lastPrim->state; braking.accel = -(braking.speed / static_cast(braking.duration)) * g_depthAverageHalf; this->state.lastPrim->state.size = static_cast(ClampedRandom(100) + 60) / 100.0f; EffectPrimitiveState& fading = this->state.lastPrim->state; fading.sizeSpeed = -(fading.size / static_cast(fading.duration)); this->state.lastPrim->state.fadeOutCnt = 0; this->state.lastPrim->SetSpriteName("이팩트\\particle1.spr"); this->state.lastPrim->SetActionName("이팩트\\particle1.act"); this->state.lastPrim->state.numSegment = 3; this->state.lastPrim->InitSegment(); } } // OFFSET: 0x00C19980 // FUNCTION: fn_20066 void CRagEffect::Hit4() { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project(&this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, vertex); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\EF_hit4.wav"); const int facing = static_cast(180.0f - this->state.parent->render.angle); const int direction = facing < 0 ? facing + 360 : facing; this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 15; this->state.lastPrim->state.longitude = static_cast(direction); this->state.lastPrim->state.latitude = -90.0f; EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); reinterpret_cast(this->state.lastPrim->state.transform)->AppendYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.deltaPos2 = {0.0f, -10.0f, 0.0f}; this->state.lastPrim->state.speed = 0.7f; EffectPrimitiveState& slow = this->state.lastPrim->state; slow.accel = -(slow.speed / slow.duration) * 0.5f; this->state.lastPrim->state.outerSize = 4.0f; this->state.lastPrim->state.innerSize = 0.5f; this->state.lastPrim->state.heightSpeed = 0.25f; this->state.lastPrim->state.heightAccel = 0.15f; const int lifetime = this->state.lastPrim->state.duration; this->state.lastPrim->state.fadeOutCnt = lifetime - lifetime / 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; CTexture* texture = g_texMgr.Load("effect\\lens2.tga", 0, false, true, false); this->state.lastPrim->state.textures[0] = texture; for (int count = 5; count != 0; --count) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.longitude = static_cast(direction - 40 + ClampedRandom(80)); this->state.lastPrim->state.latitude = static_cast(ClampedRandom(100) - 50); EffectPrimitiveState& yaw = this->state.lastPrim->state; reinterpret_cast(yaw.transform)->MakeYRotation(GetRadian(static_cast(yaw.longitude))); reinterpret_cast(this->state.lastPrim->state.transform)->AppendXRotation(GetRadian(static_cast(this->state.lastPrim->state.latitude))); EffectPrimitiveState& spark = this->state.lastPrim->state; spark.deltaPos3 = RotatedForward(spark.transform, static_cast(ClampedRandom(4) + 4)); EffectPrimitiveState& moving = this->state.lastPrim->state; moving.deltaPos2.x = moving.deltaPos3.x + 0.0f; moving.deltaPos2.y = moving.deltaPos3.y - 10.0f; moving.deltaPos2.z = moving.deltaPos3.z + 0.0f; this->state.lastPrim->state.speed = static_cast(ClampedRandom(90) + 60) / 100.0f; this->state.lastPrim->state.duration = ClampedRandom(24) + 6; EffectPrimitiveState& fading = this->state.lastPrim->state; fading.accel = -(fading.speed / fading.duration) * 0.5f; this->state.lastPrim->state.size = static_cast(ClampedRandom(100) + 60) / 100.0f; EffectPrimitiveState& shrinking = this->state.lastPrim->state; shrinking.sizeSpeed = -(shrinking.size / shrinking.duration); this->state.lastPrim->state.fadeOutCnt = 0; this->state.lastPrim->SetSpriteName("이팩트\\particle1.spr"); this->state.lastPrim->SetActionName("이팩트\\particle1.act"); this->state.lastPrim->state.numSegment = 3; this->state.lastPrim->InitSegment(); } } // OFFSET: 0x00C3B2E0 // FUNCTION: fn_20106 void CRagEffect::SoulStrike(char F1) { int base = 0; int step = 0; int total = 0; switch (this->state.count) { case 1: total = 1; base = 0; step = 1; break; case 2: total = 2; step = 180; base = -90; break; case 3: total = 3; step = 90; base = -90; break; case 4: total = 4; step = 60; base = -90; break; case 5: total = 5; step = 45; base = -90; break; case 6: total = 6; step = 30; base = -90; break; case 7: total = 7; step = 25; base = -90; break; default: break; } const int frame = this->state.stateCnt + 5; if (frame % 11 != 0 || frame / 11 > total) { return; } const int index = frame / 11; PlayEffectWave(*this, "effect\\EF_SoulStrike.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 8, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; this->state.lastPrim->state.deltaPos2 = {0.0f, -10.0f, 0.0f}; this->state.lastPrim->state.radius = this->state.lastPrim->CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->Face(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->state.longitude = -this->state.lastPrim->render.angle; this->state.lastPrim->state.speed = this->state.lastPrim->state.radius / this->state.lastPrim->state.duration; this->state.lastPrim->state.gravSpeed = 3.5f; const float rise = -(this->state.lastPrim->state.gravSpeed / this->state.lastPrim->state.duration); this->state.lastPrim->state.gravAccel = rise + rise; this->state.lastPrim->state.latiSpeed = -2.0f; const float spread = -(this->state.lastPrim->state.latiSpeed / this->state.lastPrim->state.duration); this->state.lastPrim->state.latiAccel = spread + spread; this->state.lastPrim->state.roll = static_cast(base + step * index); reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.deltaPos3 = RotatedForward(this->state.lastPrim->state.transform, 1.0f); this->state.lastPrim->state.rotAxis[0] = this->state.lastPrim->state.deltaPos3.x; this->state.lastPrim->state.rotAxis[1] = this->state.lastPrim->state.deltaPos3.y; this->state.lastPrim->state.rotAxis[2] = this->state.lastPrim->state.deltaPos3.z; this->state.lastPrim->state.size = 2.75f; const char* action = F1 != 0 ? "이팩트\\particle5.act" : "이팩트\\particle1.act"; const char* sprite = F1 != 0 ? "이팩트\\particle5.spr" : "이팩트\\particle1.spr"; this->state.lastPrim->SetSpriteName(sprite); this->state.lastPrim->SetActionName(action); this->state.lastPrim->state.numSegment = 12; this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C3B730 // FUNCTION: fn_20107 void CRagEffect::SpearBmr() { const int frame = this->state.stateCnt; if (frame != 0 && frame != 4 && frame != 8 && frame != 12) { return; } PlayEffectWave(*this, "effect\\EF_FireBall.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 15; this->state.lastPrim->state.pattern |= 0x120u; this->state.lastPrim->state.deltaPos2 = {0.0f, -15.0f, 0.0f}; this->state.lastPrim->Face(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->state.longitude = -this->state.lastPrim->render.angle; this->state.lastPrim->render.angle = 180.0f - this->state.lastPrim->render.angle; if (this->state.lastPrim->render.angle < 0.0f) { this->state.lastPrim->render.angle = this->state.lastPrim->render.angle + 360.0f; } CEffectPrim& particle = *this->state.lastPrim; particle.state.speed = -(particle.CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]) / particle.state.duration); reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.size = 1.0f; this->state.lastPrim->state.animSpeed = 1; if (this->state.stateCnt != 0) { if (this->state.stateCnt == 4) { this->state.lastPrim->state.alpha = 180.0f; } else if (this->state.stateCnt == 8) { this->state.lastPrim->state.alpha = 130.0f; } else { this->state.lastPrim->state.alpha = 80.0f; } } this->SetAction(this->Get8Dir2(this->state.parent->render.angle, 1), 1, 1); this->state.lastPrim->SetSpriteName("이팩트\\창.spr"); this->state.lastPrim->SetActionName("이팩트\\창.act"); this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C3BD40 // FUNCTION: fn_20109 void CRagEffect::SprayPond() { if (this->state.stateCnt == 0) { for (int angle = 0; angle < 360; angle += 45) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->pattern = 2; this->state.currentPrimitive->duration = 130; EffectPrimitiveState& yaw = *this->state.currentPrimitive; reinterpret_cast(yaw.transform)->MakeYRotation(GetRadian(static_cast(static_cast(angle) + 22.5f))); EffectPrimitiveState& moving = *this->state.currentPrimitive; const vector3d edge = RotatedForward(moving.transform, 12.2f); moving.deltaPos2.x = edge.x + 0.0f; moving.deltaPos2.y = edge.y - 2.0f; moving.deltaPos2.z = edge.z + 0.0f; EffectPrimitiveState& facing = *this->state.currentPrimitive; reinterpret_cast(facing.rotTransform)->MakeYRotation(GetRadian(static_cast(static_cast(angle + 90) + 22.5f))); this->state.currentPrimitive->alpha = 120.0f; this->state.currentPrimitive->widthSize = 5.0f; this->state.currentPrimitive->heightSize = 2.7f; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\pond_water.bmp", 0, false, true, false); } } if (this->state.stateCnt % 10 == 0) { for (int angle = 0; angle < 360; angle += 45) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 30; EffectPrimitiveState& yaw = *this->state.currentPrimitive; reinterpret_cast(yaw.transform)->MakeYRotation(GetRadian(static_cast(static_cast(angle) + 22.5f))); EffectPrimitiveState& moving = *this->state.currentPrimitive; const vector3d edge = RotatedForward(moving.transform, 13.8f); moving.deltaPos2.x = edge.x; moving.deltaPos2.y = edge.y; moving.deltaPos2.z = edge.z; EffectPrimitiveState& roll = *this->state.currentPrimitive; reinterpret_cast(roll.rotTransform)->MakeZRotation(GetRadian(90)); EffectPrimitiveState& facing = *this->state.currentPrimitive; reinterpret_cast(facing.rotTransform)->AppendYRotation(GetRadian(static_cast(static_cast(angle + 90) + 22.5f))); this->state.currentPrimitive->alpha = 100.0f; this->state.currentPrimitive->fadeOutCnt = 0; this->state.currentPrimitive->widthSize = 5.5f; this->state.currentPrimitive->heightSize = 1.0f; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); } } if (this->state.stateCnt % 20 == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 25; this->state.currentPrimitive->radius = 13.0f; this->state.currentPrimitive->arcAngle = 10.0f; this->state.currentPrimitive->size = 1.25f; this->state.currentPrimitive->latitude = 90.0f; EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); this->state.currentPrimitive->radiusSpeed = 0.25f; EffectPrimitiveState& growing = *this->state.currentPrimitive; growing.radiusAccel = -(growing.radiusSpeed / growing.duration); this->state.currentPrimitive->alpha = 100.0f; this->state.currentPrimitive->fadeOutCnt = 0; Owner(this->state.currentPrimitive).InitSegment(); this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); } } // OFFSET: 0x00C3F440 // FUNCTION: fn_20120 void CRagEffect::WaterBall2() { if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\wizard_waterball_chulung.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 8, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->SetSpriteName("이팩트\\Waterball.spr"); this->state.lastPrim->SetActionName("이팩트\\Waterball.act"); this->state.lastPrim->state.duration = 40; this->state.lastPrim->state.deltaPos2 = {0.0f, -10.0f, 0.0f}; this->state.lastPrim->state.radius = this->state.lastPrim->CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->Face(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->state.longitude = -this->state.lastPrim->render.angle; this->state.lastPrim->state.speed = this->state.lastPrim->state.radius / this->state.lastPrim->state.duration; this->state.lastPrim->state.gravSpeed = 3.5f; const float rise = -(this->state.lastPrim->state.gravSpeed / this->state.lastPrim->state.duration); this->state.lastPrim->state.gravAccel = rise + rise; this->state.lastPrim->state.latiSpeed = -2.0f; const float spread = -(this->state.lastPrim->state.latiSpeed / this->state.lastPrim->state.duration); this->state.lastPrim->state.latiAccel = spread + spread; this->state.lastPrim->state.roll = 0.0f; EffectPrimitiveState& particle = this->state.lastPrim->state; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(static_cast(particle.longitude))); this->state.lastPrim->state.deltaPos3 = RotatedForward(this->state.lastPrim->state.transform, 1.0f); this->state.lastPrim->state.rotAxis[0] = this->state.lastPrim->state.deltaPos3.x; this->state.lastPrim->state.rotAxis[1] = this->state.lastPrim->state.deltaPos3.y; this->state.lastPrim->state.rotAxis[2] = this->state.lastPrim->state.deltaPos3.z; this->state.lastPrim->state.size = 0.75f; this->state.lastPrim->state.numSegment = 12; this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C3FE30 // FUNCTION: fn_20124 void CRagEffect::Yufitel(char F1) { if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\hunter_shockwavetrap.wav"); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 20; this->state.lastPrim->state.pattern |= 0x40u; this->state.lastPrim->state.pattern |= 0x400u; this->state.lastPrim->state.renderFlag |= 2u; this->state.lastPrim->state.widthSize = 3.5f; this->state.lastPrim->state.heightSize = 3.5f; this->state.lastPrim->Face(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->state.longitude = -this->state.lastPrim->render.angle; this->state.lastPrim->render.angle = 180.0f - this->state.lastPrim->render.angle; if (this->state.lastPrim->render.angle < 0.0f) { this->state.lastPrim->render.angle = this->state.lastPrim->render.angle + 360.0f; } CEffectPrim& center = *this->state.lastPrim; center.state.speed = -(center.CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]) / center.state.duration); reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.deltaPos2.y = -5.0f; this->state.lastPrim->state.alpha = 170.0f; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = F1 != 0 ? g_texMgr.Load("effect\\twirl_soft.bmp", 0, false, true, false) : g_texMgr.Load("effect\\thunder_center.bmp", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 20; this->state.lastPrim->state.pattern = 0x40u; this->state.lastPrim->state.pattern |= 0x400u; this->state.lastPrim->state.renderFlag |= 2u; this->state.lastPrim->state.repeatAnim = 1; this->state.lastPrim->state.widthSize = 4.5f; this->state.lastPrim->state.heightSize = 4.5f; this->state.lastPrim->Face(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->state.longitude = -this->state.lastPrim->render.angle; this->state.lastPrim->render.angle = 180.0f - this->state.lastPrim->render.angle; if (this->state.lastPrim->render.angle < 0.0f) { this->state.lastPrim->render.angle = this->state.lastPrim->render.angle + 360.0f; } CEffectPrim& ball = *this->state.lastPrim; ball.state.speed = -(ball.CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]) / ball.state.duration); reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.deltaPos2.y = -5.0f; this->state.lastPrim->state.animSpeed = 1; this->state.lastPrim->state.totalTexture = 6; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (F1 != 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\twirl_soft.bmp", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\thunder_ball_b.bmp", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\twirl_soft.bmp", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\thunder_ball_d.bmp", 0, false, true, false); this->state.lastPrim->state.textures[4] = g_texMgr.Load("effect\\twirl_soft.bmp", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\thunder_ball_a.bmp", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\thunder_ball_b.bmp", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\thunder_ball_c.bmp", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\thunder_ball_d.bmp", 0, false, true, false); this->state.lastPrim->state.textures[4] = g_texMgr.Load("effect\\thunder_ball_e.bmp", 0, false, true, false); } this->state.lastPrim->state.textures[5] = g_texMgr.Load("effect\\thunder_ball_f.bmp", 0, false, true, false); } // OFFSET: 0x00C40E70 // FUNCTION: fn_20132 void CRagEffect::AirTexture(const char* name) { const int frame = this->state.stateCnt; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (frame != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 98, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].distance = 5.0f; this->state.lastPrim->state.slots[0].alphaB = 0; EffectPrimitiveSlot& slot = this->state.lastPrim->state.slots[0]; slot.vecBNow.x = this->state.deltaPos[0]; slot.vecBNow.y = this->state.deltaPos[1]; slot.vecBNow.z = this->state.deltaPos[2]; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); Get_Angle( this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.lastPrim->state.slots[0].riseAngle ); this->state.lastPrim->state.slots[0].riseAngle += 90; EffectPrimitiveSlot& rise = this->state.lastPrim->state.slots[0]; if (rise.riseAngle >= 360) { rise.riseAngle -= 360; } this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[3].alphaB = 0; } // OFFSET: 0x00C4F250 // FUNCTION: fn_20181 void CRagEffect::EnergyDrain2() { if (this->state.stateCnt != 0) { return; } for (int angle = -90; angle < 180; angle += 90) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 8, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 60; const float deltaZ = this->state.deltaPos[2] - this->render.position.z; EffectPrimitiveState& launched = this->state.lastPrim->state; launched.deltaPos2.x = this->state.deltaPos[0] - this->render.position.x; launched.deltaPos2.z = deltaZ; launched.deltaPos2.y = -10.0f; this->state.lastPrim->state.radius = this->state.lastPrim->CalcDist( this->state.deltaPos[0] - (this->state.deltaPos[0] - this->render.position.x) * 0.5f, this->state.deltaPos[2] - (this->state.deltaPos[2] - this->render.position.z) * 0.5f ); this->state.lastPrim->Face( (this->render.position.x + this->render.position.x) - this->state.deltaPos[0], (this->render.position.z + this->render.position.z) - this->state.deltaPos[2] ); this->state.lastPrim->state.longitude = -this->state.lastPrim->render.angle; const float speed = this->state.lastPrim->state.radius / this->state.lastPrim->state.duration; this->state.lastPrim->state.speed = speed + speed; this->state.lastPrim->state.gravSpeed = 2.0f; const float rise = -(this->state.lastPrim->state.gravSpeed / this->state.lastPrim->state.duration); this->state.lastPrim->state.gravAccel = rise + rise; this->state.lastPrim->state.latiSpeed = -2.0f; const float spread = -(this->state.lastPrim->state.latiSpeed / this->state.lastPrim->state.duration); this->state.lastPrim->state.latiAccel = spread + spread; this->state.lastPrim->state.roll = static_cast(angle); EffectPrimitiveState& particle = this->state.lastPrim->state; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(static_cast(particle.longitude))); this->state.lastPrim->state.deltaPos3 = RotatedForward(this->state.lastPrim->state.transform, 1.0f); this->state.lastPrim->state.rotAxis[0] = this->state.lastPrim->state.deltaPos3.x; this->state.lastPrim->state.rotAxis[1] = this->state.lastPrim->state.deltaPos3.y; this->state.lastPrim->state.rotAxis[2] = this->state.lastPrim->state.deltaPos3.z; this->state.lastPrim->state.red = ClampedRandom(81) + 160; this->state.lastPrim->state.green = ClampedRandom(81) + 160; this->state.lastPrim->state.blue = 255; this->state.lastPrim->state.size = static_cast(ClampedRandom(6)) * 0.1f + 1.5f; this->state.lastPrim->SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); this->state.lastPrim->SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); this->state.lastPrim->state.numSegment = 7; this->state.lastPrim->InitSegment(); } } // OFFSET: 0x00C1DC70 // FUNCTION: fn_20075 void CRagEffect::InitEZ2STRFrame() { this->state.currentLayer = 0; this->state.stateCnt = 0; this->state.endLayer = static_cast(this->state.resourceData)->clipCount; if (static_cast(this->state.resourceData)->clips[0].frameCount == 0) { --this->state.endLayer; } for (int layer = 0; layer < static_cast(this->state.resourceData)->clipCount; ++layer) { this->state.currentKey[layer] = 0; } } // OFFSET: 0x00C36FC0 // FUNCTION: fn_20095 bool CRagEffect::ProcessEZ2STR(float x, float y, float z) { RagEffectState& state = this->state; if (state.resource == nullptr) { return false; } if (state.currentLayer >= state.endLayer) { ++state.loopCount; if (state.loopCount > state.loopLimit) { return false; } this->InitEZ2STRFrame(); } const RenderVertex vertex = TransformVert(static_cast(g_modeMgr.GetGameMode())->camera->frame.view, state.parent->render.position); state.tlvertX = vertex.x + x; state.tlvertY = vertex.y + y; state.tlvertZ = vertex.z + z; state.defZ = x == 0.0f && y == -80.0f && z == 0.0f ? 0 : 1; float ratio; for (int layer = 0; layer < static_cast(state.resourceData)->clipCount; ++layer) { state.layerDrawn[layer] = false; const EZeffectClip& clip = static_cast(state.resourceData)->clips[layer]; if (clip.frameCount == 0 || state.currentKey[layer] == -1) { continue; } const EZeffectKeyFrame* key = &clip.frames[state.currentKey[layer]]; const int elapsed = state.stateCnt - key->frame; if (elapsed < 0) { continue; } if (elapsed != 0 && key[1].frame == state.stateCnt) { if (++state.currentKey[layer] >= clip.frameCount - 1) { state.currentKey[layer] = -1; ++state.currentLayer; } ++key; } EZeffectTransform& current = state.transforms[layer]; const EZeffectTransform& delta = key->transform; if (key->type == 0) { std::memcpy(¤t, &delta, sizeof(current)); if (state.currentKey[layer] != -1 && key[1].frame == key->frame) { ++state.currentKey[layer]; } state.layerDrawn[layer] = true; continue; } current.x += delta.x; current.y += delta.y; current.u += delta.u; current.v += delta.v; current.us += delta.us; current.vs += delta.vs; current.u2 += delta.u2; current.v2 += delta.v2; current.us2 += delta.us2; current.vs2 += delta.vs2; current.ax[0] += delta.ax[0]; current.ax[1] += delta.ax[1]; current.ax[2] += delta.ax[2]; current.ax[3] += delta.ax[3]; current.ay[0] += delta.ay[0]; current.ay[1] += delta.ay[1]; current.ay[2] += delta.ay[2]; current.ay[3] += delta.ay[3]; current.crR += delta.crR; current.crG += delta.crG; current.crB += delta.crB; current.crA += delta.crA; current.rz += delta.rz; switch (delta.anitype) { case 1: current.aniframe += delta.aniframe; break; case 2: current.aniframe += delta.anidelta; if (current.aniframe >= static_cast(clip.textureCount)) { current.aniframe = static_cast(clip.textureCount) - 1.0f; } break; case 3: { const float frame = current.aniframe += delta.anidelta; const float count = static_cast(clip.textureCount); if (frame >= count) { ratio = static_cast(static_cast(frame / count)); current.aniframe = frame - ratio * count; } break; } case 4: { float frame = current.aniframe -= delta.anidelta; if (frame < 0.0f) { const float count = static_cast(clip.textureCount); frame -= ratio * count; ratio = static_cast(static_cast(frame / count)); if (frame < 0.0f) { frame += count; } current.aniframe = frame; } break; } case 5: { const int frame = static_cast(static_cast(elapsed) * delta.anidelta + current.aniframe); const int count = clip.textureCount - 1; const int turns = frame / count; if ((turns & 1) != 0) { current.aniframe = static_cast(count - (frame - turns * count)); } else { current.aniframe = static_cast(frame - turns * count); } break; } } state.layerDrawn[layer] = true; } return true; } // OFFSET: 0x00C73480 // FUNCTION: fn_20326 bool CRagEffect::ShieldCharge() { return this->ProcessEZ2STR(0.0f, -80.0f, 0.0f) ? true : false; } // OFFSET: 0x00C0B360 // FUNCTION: fn_20016 bool CRagEffect::Aspersio() { if (this->state.stateCnt == 70) { PlayEffectWave(*this, "effect\\priest_aspersio.wav"); } if (this->state.stateCnt % 5 == 0 && this->state.stateCnt > 60 && this->state.stateCnt < 140) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.duration = 400; this->state.lastPrim->state.duration = 40; this->state.lastPrim->state.radius = 1.5f; this->state.lastPrim->state.gravSpeed = 0.19f; this->state.lastPrim->state.gravAccel = 0.01f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.size = 1.2f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); const float* m = this->state.lastPrim->state.transform; const float distance = this->state.lastPrim->state.radius; this->state.lastPrim->state.deltaPos2 = { (m[0] * 0.0f - m[3] * 30.0f) + distance * m[6] + m[9], (m[1] * 0.0f - m[4] * 30.0f) + distance * m[7] + m[10], (m[2] * 0.0f - m[5] * 30.0f) + distance * m[8] + m[11] }; this->state.lastPrim->state.fadeOutCnt = 30; this->state.lastPrim->SetSpriteName("이팩트\\particle1.spr"); this->state.lastPrim->SetActionName("이팩트\\particle1.act"); this->state.lastPrim->InitSegment(); } if (this->state.stateCnt == this->state.duration) { return false; } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); return true; } // OFFSET: 0x00C0B910 // FUNCTION: fn_20017 void CRagEffect::Bash() { if (g_serviceOptions.Get(0xe5) != 0) { return; } const RenderVertex screen = TransformVert(static_cast(g_modeMgr.GetGameMode())->camera->frame.view, this->state.parent->render.position); this->state.tlvertX = screen.x; this->state.tlvertY = screen.y; if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\EF_Bash.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; this->state.lastPrim->state.pattern |= 1; this->state.lastPrim->state.deltaPos2.y = -40.0f; this->state.lastPrim->state.radius = 100.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 170.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 6.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); const int sparkCount = g_serviceOptions.Get(0xe5) != 0 ? 10 : 20; for (int spark = 0; spark < sparkCount; ++spark) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; this->state.lastPrim->state.deltaPos2.y = -40.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.longSpeed = static_cast(ClampedRandom(60) + 10) / 10.0f; EffectPrimitiveState& current = this->state.lastPrim->state; current.longAccel = -(current.longSpeed / static_cast(current.duration)) / 1.5f; this->state.lastPrim->state.arcAngle = static_cast(ClampedRandom(25) + 5) / 10.0f; this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(40) + 20); this->state.lastPrim->state.heightSpeed = static_cast(ClampedRandom(30) + 20) / 10.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); } } // OFFSET: 0x00C0C4A0 // FUNCTION: fn_20018 void __stdcall Nullsub432() { } // OFFSET: 0x00C0C550 // FUNCTION: fn_20019 void CRagEffect::Blessing() { const EffectActor& parent = *this->state.parent; this->render.position.x = parent.render.position.x; this->render.position.y = parent.render.position.y; this->render.position.z = parent.render.position.z; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_Blessing.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); EffectPrimitiveState& ring = this->state.lastPrim->state; ring.duration = this->state.duration; ring.pattern |= 1u; ring.renderFlag |= 0x200u; ring.radius = 10.0f; ring.latitude = 90.0f; ring.red = 32; ring.green = 176; ring.blue = 232; ring.alpha = 0.0f; ring.maxAlpha = 100.0f; ring.alphaSpeed = ring.maxAlpha / 30.0f; ring.fadeOutCnt = ring.duration - 30; Owner(&ring).InitSegment(); ring.textures = new CTexture*[ring.totalTexture]; ring.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); } if (this->state.stateCnt % 3 == 0 && this->state.stateCnt < 10) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); EffectPrimitiveState& wing = this->state.lastPrim->state; wing.duration = this->state.duration; wing.animSpeed = 2; wing.alpha = static_cast(this->state.stateCnt * -6 + 200); wing.deltaPos2 = {0.0f, -25.0f, 0.0f}; Owner(&wing).SetSpriteName("이팩트\\축복.spr"); Owner(&wing).SetActionName("이팩트\\축복.act"); Owner(&wing).InitSegment(); } if (this->state.stateCnt % 4 == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); EffectPrimitiveState& spark = this->state.lastPrim->state; spark.duration = 80; spark.pattern |= 0x80u; reinterpret_cast(spark.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); const float* m = spark.transform; const float distance = static_cast(ClampedRandom(7) + 2); spark.deltaPos2 = { (m[0] * 0.0f - m[3] * 25.0f) + distance * m[6] + m[9], (m[1] * 0.0f - m[4] * 25.0f) + distance * m[7] + m[10], (m[2] * 0.0f - m[5] * 25.0f) + distance * m[8] + m[11] }; reinterpret_cast(spark.transform)->MakeXRotation(GetRadian(-90)); spark.speed = static_cast(ClampedRandom(20) + 20) / 100.0f; spark.accel = -(spark.speed / static_cast(spark.duration)) * 0.5f; spark.alpha = 0.0f; spark.size = 0.5f; spark.fadeOutCnt = spark.duration - spark.duration / 5; spark.alphaSpeed = spark.maxAlpha / 10.0f; Owner(&spark).SetActionName("이팩트\\particle6.act"); Owner(&spark).SetSpriteName("이팩트\\particle6.spr"); Owner(&spark).InitSegment(); } } // INLINED static void MatrixMult(vector3d& result, const vector3d& v, const float* m) { result.x = v.x * m[0] + v.y * m[3] + v.z * m[6] + m[9]; result.y = v.x * m[1] + v.y * m[4] + v.z * m[7] + m[10]; result.z = v.x * m[2] + v.y * m[5] + v.z * m[8] + m[11]; } // OFFSET: 0x00C0D630 // FUNCTION: fn_20022 void CRagEffect::Bottom2() { if (this->state.stateCnt != 0) { return; } int facing = static_cast(180.0f - this->state.parent->render.angle); if (facing < 0) { facing += 360; } matrix yaw; yaw.MakeYRotation(GetRadian(facing)); const float* axis = yaw.values; this->state.duration = 9999; for (int sign = 1; sign >= -1; sign -= 2) { const float offset = static_cast(sign) * 2.5f; this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 9999; this->state.lastPrim->state.commonPattern = 1; this->state.lastPrim->state.pattern = 40; this->state.lastPrim->state.type = 50; this->state.lastPrim->state.deltaPos2 = RotatedForward(axis, offset); this->state.lastPrim->state.longitude = static_cast(facing + 90); this->state.lastPrim->state.widthSize = 2.5f; this->state.lastPrim->state.heightSize = 15.0f; this->state.lastPrim->state.heightSpeed = 0.25f; this->state.lastPrim->state.alpha = 180.0f; this->state.lastPrim->state.fadeOutCnt = 9964; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\magic_green.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 9999; this->state.lastPrim->state.commonPattern = 1; this->state.lastPrim->state.pattern = 40; this->state.lastPrim->state.type = 50; this->state.lastPrim->state.deltaPos2.x = offset * axis[0] + axis[3] * 0.0f + axis[6] * 0.0f + axis[9]; this->state.lastPrim->state.deltaPos2.y = offset * axis[1] + axis[4] * 0.0f + axis[7] * 0.0f + axis[10]; this->state.lastPrim->state.deltaPos2.z = offset * axis[2] + axis[5] * 0.0f + axis[8] * 0.0f + axis[11]; this->state.lastPrim->state.longitude = static_cast(facing); this->state.lastPrim->state.widthSize = 2.5f; this->state.lastPrim->state.heightSize = 15.0f; this->state.lastPrim->state.heightSpeed = 0.25f; this->state.lastPrim->state.alpha = 180.0f; this->state.lastPrim->state.fadeOutCnt = 9964; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\magic_green.tga", 0, false, true, false); } } // OFFSET: 0x00C0DA60 // FUNCTION: fn_20023 void CRagEffect::Bottom() { if (this->state.stateCnt != 0) { return; } int angle = static_cast(180.0f - this->state.parent->render.angle); if (angle < 0) { angle += 360; } matrix rotation; rotation.MakeYRotation(GetRadian(angle)); const float* m = rotation.values; this->state.duration = 9999; for (int side = 1; side >= -1; side -= 2) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 9999; this->state.lastPrim->state.commonPattern = 1; this->state.lastPrim->state.pattern = 40; this->state.lastPrim->state.type = 50; MatrixMult(this->state.lastPrim->state.deltaPos2, {0.0f, 0.0f, static_cast(side) * 5.0f}, m); this->state.lastPrim->state.longitude = static_cast(angle + 90); this->state.lastPrim->state.widthSize = 5.0f; this->state.lastPrim->state.heightSize = 15.0f; this->state.lastPrim->state.heightSpeed = 0.25f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 180.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 6.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 35; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\magic_violet.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 9999; this->state.lastPrim->state.commonPattern = 1; this->state.lastPrim->state.pattern = 40; this->state.lastPrim->state.type = 50; MatrixMult(this->state.lastPrim->state.deltaPos2, {static_cast(side) * 5.0f, 0.0f, 0.0f}, m); this->state.lastPrim->state.longitude = static_cast(angle); this->state.lastPrim->state.widthSize = 5.0f; this->state.lastPrim->state.heightSize = 15.0f; this->state.lastPrim->state.heightSpeed = 0.25f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 180.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 6.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 35; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\magic_violet.tga", 0, false, true, false); } } // OFFSET: 0x00C10830 // FUNCTION: fn_20034 bool CRagEffect::ProcessEZ2STRC10830() { return this->ProcessEZ2STR(0.0f, -80.0f, 0.0f) ? true : false; } // OFFSET: 0x00C153A0 // FUNCTION: fn_20049 bool CRagEffect::ProcessEZ2STRC153A0() { return this->ProcessEZ2STR(0.0f, -80.0f, 0.0f) ? true : false; } // OFFSET: 0x00C3C7E0 // FUNCTION: fn_20111 void CRagEffect::Steal() { if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\EF_Steal.wav"); for (int count = 0; count < 10; ++count) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.latitude = static_cast(ClampedRandom(100) - 50); EffectPrimitiveState& aimed = this->state.lastPrim->state; reinterpret_cast(aimed.transform)->MakeYRotation(GetRadian(static_cast(aimed.longitude))); EffectPrimitiveState& pitched = this->state.lastPrim->state; reinterpret_cast(pitched.transform)->AppendXRotation(GetRadian(static_cast(pitched.latitude))); EffectPrimitiveState& launched = this->state.lastPrim->state; launched.deltaPos3 = RotatedForward(launched.transform, static_cast(ClampedRandom(4) + 4)); EffectPrimitiveState& placed = this->state.lastPrim->state; placed.deltaPos2 = {placed.deltaPos3.x + 0.0f, placed.deltaPos3.y - 10.0f, placed.deltaPos3.z + 0.0f}; EffectPrimitiveState& level = this->state.lastPrim->state; reinterpret_cast(level.transform)->MakeYRotation(GetRadian(static_cast(level.longitude))); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.speed = static_cast(ClampedRandom(50) + 50) / 100.0f; EffectPrimitiveState& braking = this->state.lastPrim->state; braking.accel = -(braking.speed / static_cast(braking.duration)) * g_depthAverageHalf; this->state.lastPrim->state.gravSpeed = -static_cast(ClampedRandom(90) + 60) / 100.0f; EffectPrimitiveState& falling = this->state.lastPrim->state; falling.gravAccel = -(falling.gravSpeed / static_cast(falling.duration)) * 2.0f; this->state.lastPrim->state.size = static_cast(ClampedRandom(100) + 100) / 100.0f; EffectPrimitiveState& shrinking = this->state.lastPrim->state; shrinking.sizeSpeed = -(shrinking.size / static_cast(shrinking.duration)); this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->SetSpriteName("이팩트\\particle7.spr"); this->state.lastPrim->SetActionName("이팩트\\particle7.act"); this->state.lastPrim->InitSegment(); } } // OFFSET: 0x00C3CC40 // FUNCTION: fn_20112 bool CRagEffect::ProcessEZ2STRC3CC40() { return this->ProcessEZ2STR(0.0f, -80.0f, 0.0f) ? true : false; } // OFFSET: 0x00C3FE00 // FUNCTION: fn_20123 bool CRagEffect::ProcessEZ2STRC3FE00() { return this->ProcessEZ2STR(0.0f, 0.0f, 0.0f) ? true : false; } // OFFSET: 0x00C65300 // FUNCTION: fn_20267 bool CRagEffect::ProcessEZ2STRC65300() { return this->ProcessEZ2STR(0.0f, 0.0f, 0.0f) ? true : false; } // OFFSET: 0x00C15990 // FUNCTION: fn_20051 bool CRagEffect::ProcessEZ2STRC15990() { if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { this->state.stateCnt = 9999; return false; } return true; } // OFFSET: 0x00C159D0 // FUNCTION: fn_20052 bool CRagEffect::ProcessEZ2STRC159D0() { if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { this->state.stateCnt = 9999; return false; } return true; } // OFFSET: 0x00C5EFA0 // FUNCTION: fn_20241 void CRagEffect::Fireworks() { if (this->state.stateCnt == 300) { g_soundMgr->PlayWave("effect\\폭죽.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } if (this->state.stateCnt > 2300) { this->state.stateCnt = 299; } } // OFFSET: 0x00C410A0 // FUNCTION: fn_20133 void CRagEffect::AttackEnergy2(const char* name) { const EffectActor& parent = *this->state.parent; this->render.position.x = parent.render.position.x; this->render.position.y = parent.render.position.y; this->render.position.z = parent.render.position.z; if (this->state.stateCnt != 0 && this->state.stateCnt != 4) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 106, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 4.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].maxHeight = 8.0f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].distance = 8.0f; this->state.lastPrim->state.slots[index].fullDisplayAngle = 360; this->state.lastPrim->state.slots[index].height[0] = 10.0f; this->state.lastPrim->state.slots[index].riseAngle = static_cast(index * 45); this->state.lastPrim->state.slots[index].height[1] = static_cast(index * 22); } } // OFFSET: 0x00C1E050 // FUNCTION: fn_20077 bool CRagEffect::LexDivina() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\priest_lexdivina.wav"); } if (this->state.stateCnt == 20) { PlayEffectWave(*this, "effect\\priest_lexdivina.wav"); } if (this->state.stateCnt == 35) { PlayEffectWave(*this, "effect\\priest_lexdivina.wav"); } if (this->state.stateCnt == 60) { PlayEffectWave(*this, "effect\\priest_lexdivina.wav"); } if (this->state.stateCnt == 70) { PlayEffectWave(*this, "effect\\priest_lexdivina.wav"); } return this->ProcessEZ2STR(0.0f, -80.0f, 0.0f) ? true : false; } // OFFSET: 0x00C37A60 // FUNCTION: fn_20096 void CRagEffect::RemoveTrap() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\hunter_removetrap.wav"); } if (this->state.stateCnt != 0 && this->state.stateCnt != 7) { return; } for (int count = 12; count != 0; --count) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 50; this->state.lastPrim->state.radiusSpeed = 0.2f; rand(); this->state.lastPrim->state.gravSpeed = -2.0f; this->state.lastPrim->state.gravAccel = static_cast(ClampedRandom(10)) / 1000.0f + 0.08f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.size = 0.8f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); const float* m = this->state.lastPrim->state.transform; const float distance = this->state.lastPrim->state.radius; this->state.lastPrim->state.deltaPos2 = { m[3] * 0.0f + m[0] * 0.0f + distance * m[6] + m[9], m[4] * 0.0f + m[1] * 0.0f + distance * m[7] + m[10], m[5] * 0.0f + m[2] * 0.0f + distance * m[8] + m[11] }; this->state.lastPrim->state.fadeOutCnt = 35; this->state.lastPrim->SetSpriteName("이팩트\\particle1.spr"); this->state.lastPrim->SetActionName("이팩트\\particle1.act"); this->state.lastPrim->InitSegment(); } } // OFFSET: 0x00C3B9E0 // FUNCTION: fn_20108 void CRagEffect::Sphere() { const EffectActor& parent = *this->state.parent; this->render.position.x = parent.render.position.x; this->render.position.y = parent.render.position.y; this->render.position.z = parent.render.position.z; if (this->state.stateCnt % 10 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.duration = 500 - this->state.stateCnt; this->state.lastPrim->state.duration = 300; this->state.lastPrim->state.radius = 0.1f; this->state.lastPrim->state.radiusSpeed = 0.15f; this->state.lastPrim->state.gravSpeed = 0.15f; this->state.lastPrim->state.longitude = 2.0f; this->state.lastPrim->state.longSpeed = 8.0f; this->state.lastPrim->state.longAccel = -0.01f; this->state.lastPrim->state.size = 1.2f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); EffectPrimitiveState& particle = this->state.lastPrim->state; const float* m = particle.transform; const float distance = particle.radius; particle.deltaPos2 = { (m[0] * 0.0f - m[3] * 30.0f) + distance * m[6] + m[9], (m[1] * 0.0f - m[4] * 30.0f) + distance * m[7] + m[10], (m[2] * 0.0f - m[5] * 30.0f) + distance * m[8] + m[11] }; this->state.lastPrim->state.chRadiSpeed = 1; this->state.lastPrim->state.colorCycleIndex = 0; this->state.lastPrim->state.chPoint.push_back(95.0f); this->state.lastPrim->state.chVal1.push_back(-0.15f); this->state.lastPrim->state.chVal2.push_back(this->state.lastPrim->state.radiusAccel); this->state.lastPrim->SetSpriteName("이팩트\\particle1.spr"); this->state.lastPrim->SetActionName("이팩트\\particle1.act"); this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C17220 // FUNCTION: fn_20059 void CRagEffect::GrimToothAtk() { if (this->state.stateCnt != 0) { return; } for (int index = 0; index < 3; ++index) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.pattern |= 1u; this->state.lastPrim->state.renderFlag |= 0x200u; this->state.duration = 1000; this->state.lastPrim->state.duration = 1000; ClientSine(index * 120); ClientCosine(index * 120); if (index == 0) { this->state.lastPrim->state.deltaPos2 = {0.0f, 40.0f, -12.0f}; } else if (index == 1) { this->state.lastPrim->state.deltaPos2 = {12.0f, 40.0f, 6.0f}; } else if (index == 2) { this->state.lastPrim->state.deltaPos2 = {-12.0f, 40.0f, 6.0f}; } this->state.lastPrim->state.size = 0.9f; this->state.lastPrim->state.heightSize = 25.0f; this->state.lastPrim->state.longitude = static_cast((6 - index) * 120); this->state.lastPrim->state.latitude = 75.0f; EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); reinterpret_cast(this->state.lastPrim->state.transform)->AppendYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); std::memcpy(this->state.lastPrim->state.rotTransform, this->state.lastPrim->state.transform, sizeof(this->state.lastPrim->state.rotTransform)); this->state.lastPrim->state.speed = 3.5f; this->state.lastPrim->state.accel = 0.001f; this->state.lastPrim->state.chCnt = 10; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; CTexture* texture = g_texMgr.Load("effect\\stone.bmp", 0, false, true, false); this->state.deltaPos3[0] = this->state.deltaPos3[0] - this->state.deltaPos2[0]; this->state.lastPrim->state.textures[0] = texture; this->state.deltaPos3[1] = this->state.deltaPos3[1] - this->state.deltaPos2[1]; this->state.deltaPos3[2] = this->state.deltaPos3[2] - this->state.deltaPos2[2]; } } // OFFSET: 0x00C16430 // FUNCTION: fn_20055 int CRagEffect::GetDuration() { return this->state.duration; } // OFFSET: 0x00612780 // FUNCTION: fn_04342 void CRagEffect::SetStateDuration(int duration) { this->state.duration = duration; } // OFFSET: 0x00C39EC0 // FUNCTION: fn_20103 bool CRagEffect::Signum() { RenderVertex screen{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, screen ); this->state.tlvertX = screen.x; this->state.tlvertY = screen.y; if (this->state.stateCnt == 30) { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( "effect\\EF_Signum.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); g_soundMgr->PlayWave( "effect\\EF_Bash.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); this->state.lastPrim = CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; this->state.lastPrim->state.pattern |= 1; this->state.lastPrim->state.deltaPos2.y = -40.0f; this->state.lastPrim->state.radius = 100.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 170.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 6.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); for (int ray = 0; ray < 20; ++ray) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 35; this->state.lastPrim->state.deltaPos2.y = -40.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.longSpeed = static_cast(ClampedRandom(60) + 10) / 10.0f; EffectPrimitiveState& turning = this->state.lastPrim->state; turning.longAccel = -(turning.longSpeed / static_cast(turning.duration)) / 1.5f; this->state.lastPrim->state.arcAngle = static_cast(ClampedRandom(25) + 15) / 10.0f; this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(60) + 30); this->state.lastPrim->state.heightSpeed = static_cast(ClampedRandom(35) + 95) / 10.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); } } return this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); } // OFFSET: 0x00C3A920 // FUNCTION: fn_20104 void CRagEffect::Snow() { CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; const vector3d& player = reinterpret_cast(world->player)->render.position; this->render.position.x = player.x; this->render.position.y = player.y; this->render.position.z = player.z; if (this->GetDuration() - this->state.stateCnt <= 160) { return; } for (int count = 2; count != 0; --count) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 21, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.orgPos = this->render.position; this->state.lastPrim->state.duration = 320; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); const float z = static_cast(ClampedRandom(300) - 300); const float y = world->terrain->Height(this->render.position.x, this->render.position.z) - 100.0f; const float* m = this->state.lastPrim->state.transform; this->state.lastPrim->state.deltaPos2 = { y * m[3] + m[0] * 0.0f + z * m[6] + m[9], y * m[4] + m[1] * 0.0f + z * m[7] + m[10], y * m[5] + m[2] * 0.0f + z * m[8] + m[11] }; reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(90)); this->state.lastPrim->state.speed = -0.5f; this->state.lastPrim->state.accel = 0.0f; this->state.lastPrim->state.size = static_cast(ClampedRandom(15) + 25) / 50.0f; this->state.lastPrim->state.rollSpeed = 0.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; const int duration = this->state.lastPrim->state.duration; this->state.lastPrim->state.fadeOutCnt = duration - duration / 5; this->state.lastPrim->SetSpriteName("이팩트\\ef_snow.spr"); this->state.lastPrim->SetActionName("이팩트\\ef_snow.act"); this->state.lastPrim->InitSegment(); } } // OFFSET: 0x00C12B90 // FUNCTION: fn_20042 void CRagEffect::Entry() { if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 55; EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = this->state.lastPrim->state; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); this->state.lastPrim->state.accel = -0.00007f; this->state.lastPrim->state.longSpeed = -10.0f; this->state.lastPrim->state.outerSize = 6.0f; this->state.lastPrim->state.outerSpeed = 0.08f; this->state.lastPrim->state.innerSize = 5.0f; this->state.lastPrim->state.heightSize = 6.5f; this->state.lastPrim->state.heightSpeed = -0.1f; this->state.lastPrim->state.alpha = 5.0f; this->state.lastPrim->state.maxAlpha = 245.0f; this->state.lastPrim->state.alphaSpeed = 10.0f; int duration = this->state.lastPrim->state.duration; this->state.lastPrim->state.fadeOutCnt = duration - duration / 5; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 55; this->state.lastPrim->state.arcAngle = 45.0f; this->state.lastPrim->state.longSpeed = 10.0f; this->state.lastPrim->state.outerSize = 4.5f; this->state.lastPrim->state.innerSize = 4.5f; this->state.lastPrim->state.heightSpeed = 2.5f; EffectPrimitiveState& shrink = this->state.lastPrim->state; const float accel = -(shrink.heightSpeed / static_cast(shrink.duration)); shrink.heightAccel = accel + accel; this->state.lastPrim->state.alpha = 160.0f; duration = this->state.lastPrim->state.duration; this->state.lastPrim->state.fadeOutCnt = duration - duration / 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } } // OFFSET: 0x00C0E280 // FUNCTION: fn_20025 bool CRagEffect::CartRevolution() { if (this->state.stateCnt == 7 || this->state.stateCnt == 20) { PlayEffectWave(*this, "effect\\EF_MagnumBreak.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 20; this->state.lastPrim->state.renderFlag |= 0x200u; this->state.lastPrim->state.maxAlpha = 180.0f; this->state.lastPrim->state.latitude = 90.0f; this->state.lastPrim->state.radiusSpeed = 1.75f; EffectPrimitiveState& ring = this->state.lastPrim->state; ring.radiusAccel = -(ring.radiusSpeed / static_cast(ring.duration)) * 0.5f; this->state.lastPrim->state.innerSize = 5.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 15.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 15; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 14, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 20; this->state.lastPrim->state.radiusSpeed = 1.35f; EffectPrimitiveState& blast = this->state.lastPrim->state; blast.radiusAccel = -(blast.radiusSpeed / static_cast(blast.duration)) * 0.5f; this->state.lastPrim->state.longSpeed = 3.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 240.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 7.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 15; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\대폭발.tga", 0, false, true, false); } if (this->state.stateCnt < 300) { this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); return true; } return false; } // OFFSET: 0x00C0DEF0 // FUNCTION: fn_20024 void CRagEffect::BowlingBash() { if (this->state.stateCnt != 0 && this->state.stateCnt != 5) { return; } const int facing = static_cast(180.0f - this->state.parent->render.angle); this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 20 - this->state.stateCnt; const int angle = facing < 0 ? facing + 360 : facing; this->state.lastPrim->state.longitude = static_cast(angle + this->state.stateCnt * 20); EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = this->state.lastPrim->state; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); this->state.lastPrim->state.outerSize = 8.0f; this->state.lastPrim->state.outerSpeed = 0.5f; this->state.lastPrim->state.outerAccel = -0.03f; this->state.lastPrim->state.innerSize = 3.0f; this->state.lastPrim->state.innerSpeed = 0.5f; this->state.lastPrim->state.innerAccel = -0.03f; this->state.lastPrim->state.heightSize = 3.5f; this->state.lastPrim->state.alpha = static_cast(this->state.stateCnt * -7 + 240); const int duration = this->state.lastPrim->state.duration; this->state.lastPrim->state.fadeOutCnt = duration - duration / 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 50; this->state.lastPrim->state.renderFlag |= 0x200u; this->state.lastPrim->state.latitude = 90.0f; this->state.lastPrim->state.radius = 8.0f; this->state.lastPrim->state.radiusSpeed = 0.7f; this->state.lastPrim->state.radiusAccel = -(this->state.lastPrim->state.radiusSpeed / 30.0f); this->state.lastPrim->state.innerSize = 5.0f; this->state.lastPrim->state.changePoint = 20; this->state.lastPrim->state.changeAccel = 0.0f; this->state.lastPrim->state.changeSpeed = 0.08f; this->state.lastPrim->state.alpha = 45.0f; this->state.lastPrim->state.fadeOutCnt = 35; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); } } // OFFSET: 0x00C3AF00 // FUNCTION: fn_20105 void CRagEffect::SonicBlowHit() { if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\assasin_sonicblow.wav"); if (this->state.stateCnt != 0) { return; } const int facing = static_cast(180.0f - this->state.parent->render.angle); const int spreadX = rand() % 10; const int spreadY = rand() % 20; rand(); this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 12; this->state.lastPrim->state.longitude = static_cast(facing < 0 ? facing + 360 : facing); this->state.lastPrim->state.latitude = -90.0f; EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = this->state.lastPrim->state; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); EffectPrimitiveState& lift = this->state.lastPrim->state; const float* m = lift.transform; lift.speed3d = { (m[0] * 0.0f - m[3] * 2.0f) + m[6] * 0.0f + m[9], (m[1] * 0.0f - m[4] * 2.0f) + m[7] * 0.0f + m[10], (m[2] * 0.0f - m[5] * 2.0f) + m[8] * 0.0f + m[11] }; lift.deltaPos.x = lift.speed3d.x + lift.deltaPos.x; lift.deltaPos.y = lift.speed3d.y + lift.deltaPos.y; lift.deltaPos.z = lift.speed3d.z + lift.deltaPos.z; this->state.lastPrim->state.deltaPos2.z = 0.0f; this->state.lastPrim->state.deltaPos2.x = static_cast((std::max(spreadX, 0) + 1) / 4); this->state.lastPrim->state.deltaPos2.y = static_cast((std::max(spreadY, 0) + 1) / 2 - 11); this->state.lastPrim->state.speed = 0.4f; EffectPrimitiveState& slow = this->state.lastPrim->state; slow.accel = -(slow.speed / static_cast(slow.duration)) * 0.5f; this->state.lastPrim->state.outerSize = 7.0f; this->state.lastPrim->state.innerSize = 4.0f; this->state.lastPrim->state.heightSize = 3.5f; const int duration = this->state.lastPrim->state.duration; this->state.lastPrim->state.fadeOutCnt = duration - duration / 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\magic_red.tga", 0, false, true, false); } // OFFSET: 0x00C130D0 // FUNCTION: fn_20043 void CRagEffect::Exit() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.duration = 100; this->state.lastPrim->state.duration = 100; this->state.lastPrim->state.outerSize = 4.5f; this->state.lastPrim->state.innerSize = 4.5f; this->state.lastPrim->state.heightSize = 35.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 90.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 30.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); PlayEffectWave(*this, "_heal_effect.wav"); } if (g_serviceOptions.Get(229) != 0) { return; } if (this->state.stateCnt % 9 == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects()); rand(); this->state.lastPrim->state.radius = 3.0f; this->state.lastPrim->state.duration = 50; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.gravSpeed = -1.2f; this->state.lastPrim->state.gravAccel = -(this->state.lastPrim->state.gravSpeed / static_cast(this->state.lastPrim->state.duration)) / 1.5f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, this->state.lastPrim->state.radius); this->state.lastPrim->state.size = 0.55f; const int duration = this->state.lastPrim->state.duration; this->state.lastPrim->state.fadeOutCnt = duration - duration / 3; this->state.lastPrim->SetSpriteName("이팩트\\particle1.spr"); this->state.lastPrim->SetActionName("이팩트\\particle1.act"); this->state.lastPrim->InitSegment(); } } // OFFSET: 0x00C3E9C0 // FUNCTION: fn_20118 void CRagEffect::Warp() { if (this->state.stateCnt % 20 == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.renderFlag |= 0x200u; this->state.lastPrim->state.radius = 2.0f; this->state.lastPrim->state.arcAngle = 22.5f; this->state.lastPrim->state.innerSize = 10.0f; this->state.lastPrim->state.latitude = 90.0f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(this->state.lastPrim->state.latitude / 180.0f * 3.141592f); this->state.lastPrim->state.radiusSpeed = 1.25f; EffectPrimitiveState& ring = this->state.lastPrim->state; ring.radiusAccel = -(ring.radiusSpeed / static_cast(ring.duration)) * 0.5f; this->state.lastPrim->state.alpha = 200.0f; const int duration = this->state.lastPrim->state.duration; this->state.lastPrim->state.fadeOutCnt = duration - duration / 2; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("EFFECT\\RING_YELLOW.TGA", 0, false, true, false); } if ((this->state.stateCnt & 1) == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects()); const int band = ClampedRandom(200) / 100; this->state.lastPrim->state.radius = static_cast(band) * 0.7f + 1.0f; this->state.lastPrim->state.duration = 40; const int longitude = ClampedRandom(360); const float spin = static_cast(band) * 3.0f + 3.0f; this->state.lastPrim->state.longitude = static_cast(longitude); this->state.lastPrim->state.longSpeed = spin; this->state.lastPrim->state.gravSpeed = static_cast(60 - ClampedRandom(240)) / 100.0f; EffectPrimitiveState& rise = this->state.lastPrim->state; rise.gravAccel = -(rise.gravSpeed / static_cast(rise.duration)) * 0.5f; EffectPrimitiveState& particle = this->state.lastPrim->state; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(static_cast(particle.longitude))); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, this->state.lastPrim->state.radius); this->state.lastPrim->state.size = 0.2f; const int life = this->state.lastPrim->state.duration; this->state.lastPrim->state.fadeOutCnt = life - life / 3; this->state.lastPrim->SetSpriteName("이팩트\\particle1.spr"); this->state.lastPrim->SetActionName("이팩트\\particle1.act"); this->state.lastPrim->InitSegment(); } } // OFFSET: 0x00C36530 // FUNCTION: fn_20092 void CRagEffect::PotionPillar(float heightSpeed, int duration) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = duration; this->state.lastPrim->state.outerSize = 4.5f; this->state.lastPrim->state.innerSize = 4.5f; this->state.lastPrim->state.heightSize = 10.0f; this->state.lastPrim->state.heightSpeed = heightSpeed; this->state.lastPrim->state.heightAccel = 0.01f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 90.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 20.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); } // OFFSET: 0x00C36B00 // FUNCTION: fn_20094 bool CRagEffect::Potion_Berserk() { if (this->state.stateCnt == 0) { this->state.parent->SendMsg(nullptr, AM_CHANGE_COLOR, 250, 120, 120, 0, 0, 0); this->PotionPillar(1.0f, 50); } if (this->state.stateCnt == 18) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 1, 0, 0, 0); g_soundMgr->PlayWave("effect\\ac_concentration.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } CopyVector(this->render.position, this->state.parent->render.position); if (static_cast(this->state.stateCnt - 13) < 97u && this->state.stateCnt % 4 == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; EffectPrimitiveState& particle = this->state.lastPrim->state; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); EffectPrimitiveState& spot = this->state.lastPrim->state; spot.deltaPos2 = RotatedForward(spot.transform, static_cast(ClampedRandom(7) + 2)); reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(90)); this->state.lastPrim->state.speed = static_cast(ClampedRandom(50) + 20) / 60.0f; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(60) + 30) / 10.0f; this->state.lastPrim->state.heightSize = 0.2f; this->state.lastPrim->state.red = 240; this->state.lastPrim->state.green = 0; this->state.lastPrim->state.blue = 0; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 180.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 20.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); if (this->state.stateCnt < 151) { return true; } this->state.parent->SendMsg(nullptr, AM_RETURN_COLOR, 0, 0, 0, 0, 0, 0); return false; } // OFFSET: 0x00C52370 // FUNCTION: fn_20193 void CRagEffect::GROUNDSAMPLE() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 112, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\magic_target.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].rotStart = 0; } } // OFFSET: 0x00C475C0 // FUNCTION: fn_20157 void CRagEffect::CALLZONE(const char* name) { if (this->state.stateCnt == 100) { CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 74, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->render.position.y -= 10.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].distance = 8.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; } } // OFFSET: 0x00C59490 // FUNCTION: fn_20212 bool CRagEffect::JobLvUp50_2(short angle) { CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 75, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\magic_blue.tga", 0, false, true, false); this->state.lastPrim->state.size = 4.0f; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].maxHeight = 1.5f; this->state.lastPrim->state.slots[i].rotStart = static_cast(i * 90 + angle); this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].distance = 2.0f; this->state.lastPrim->state.slots[i].height[0] = 1.0f; this->state.lastPrim->state.slots[i].flag1[0] = 0; } return true; } // OFFSET: 0x00C629D0 // FUNCTION: fn_20252 bool CRagEffect::RunStop(short angle) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 75, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\magic_blue.tga", 0, false, true, false); this->state.lastPrim->state.size = 4.0f; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].distance = 2.0f; this->state.lastPrim->state.slots[i].height[0] = 1.0f; this->state.lastPrim->state.slots[i].maxHeight = 0.0f; this->state.lastPrim->state.slots[i].rotStart = static_cast(i * 90 + angle); this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].flag1[0] = 1; } } return true; } // OFFSET: 0x00C63860 // FUNCTION: fn_20256 void CRagEffect::SMA(char flag) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 120, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 0; this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos.x = this->state.deltaPos[0]; this->state.lastPrim->state.deltaPos.y = this->state.deltaPos[1]; this->state.lastPrim->state.deltaPos.z = this->state.deltaPos[2]; CopyVector(this->state.lastPrim->render.position, this->render.position); for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = i - 3; this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[i].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[i].vecBNow.y = (this->render.position.y - 10.0f) + static_cast(ClampedRandom(5)); this->state.lastPrim->state.slots[i].rotStart = 0; this->state.lastPrim->state.slots[i].height[1] = 0.8f; this->state.lastPrim->state.slots[i].flag1[0] = flag; } } } // OFFSET: 0x00C592E0 // FUNCTION: fn_20211 bool CRagEffect::JobLvUp50(int angle) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 5) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 75, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\magic_green.tga", 0, false, true, false); this->state.lastPrim->state.size = 9.0f; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].maxHeight = 2.0f; this->state.lastPrim->state.slots[i].rotStart = static_cast(i * 90 + angle); this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].distance = 2.0f; this->state.lastPrim->state.slots[i].height[0] = 1.0f; this->state.lastPrim->state.slots[i].flag1[0] = 0; } } if (angle == 0) { if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } } return true; } // OFFSET: 0x00C5CA50 // FUNCTION: fn_20229 void CRagEffect::Map_Pika(const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 28, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 4.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].distance = 46.0f; this->state.lastPrim->state.slots[1].distance = 46.0f; this->state.lastPrim->state.slots[0].riseAngle = 0; this->state.lastPrim->state.slots[1].riseAngle = 180; this->state.lastPrim->state.slots[0].alphaB = 25; this->state.lastPrim->state.slots[1].alphaB = 25; this->state.lastPrim->state.slots[0].height[0] = -1.0f; this->state.lastPrim->state.slots[1].height[0] = -1.0f; } } // OFFSET: 0x00C5D390 // FUNCTION: fn_20233 void CRagEffect::POISON(char flag) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 99999998) { this->state.stateCnt = 0; this->state.duration = 99999999; } else if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 72, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag |= 0x200u; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (flag == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\poison_f.bmp", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); } this->render.position.y -= 9.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].distance = 30.0f; this->state.lastPrim->state.slots[0].maxHeight = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].flag1[10] = flag; } // OFFSET: 0x00C61A80 // FUNCTION: fn_20248 void CRagEffect::Rainbow(const char* name, int unused) { if (this->state.stateCnt == 0) { const CView* camera = static_cast(g_modeMgr.GetGameMode())->camera; CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 93, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.slots[0].alphaT = static_cast(camera->camera.yaw); this->state.lastPrim->state.slots[0].alphaT = static_cast(360 - this->state.lastPrim->state.slots[0].alphaT); this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 50.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 180; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].riseAngle = this->state.lastPrim->state.slots[0].alphaT; } } // OFFSET: 0x00C423D0 // FUNCTION: fn_20138 void CRagEffect::BLIND(char flag) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 71, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag |= 0x200u; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\fullb.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); this->render.position.y -= 9.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; if (flag == 0) { this->state.lastPrim->state.slots[0].distance = 65.0f; this->state.lastPrim->state.slots[0].flag1[0] = 0; } else { this->state.lastPrim->state.slots[0].distance = 140.0f - static_cast(flag * 10); this->state.lastPrim->state.slots[0].flag1[0] = 1; } this->state.lastPrim->state.slots[0].alphaB = 0; } } // OFFSET: 0x00C47E10 // FUNCTION: fn_20160 void CRagEffect::ShockwaveRing(std::int16_t angle) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 54, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\shockwave_c.bmp", 0, false, true, false); this->render.position.y -= 9.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].distance = 100.0f; this->state.lastPrim->state.slots[index].riseAngle = static_cast(index * 90 + angle); this->state.lastPrim->state.slots[index].alphaB = 0; } } // OFFSET: 0x00C552F0 // FUNCTION: fn_20202 void CRagEffect::TexturedPulse(const char* name) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 104, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0x201; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].maxHeight = 8.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 8.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 180; } // OFFSET: 0x00C14FE0 // FUNCTION: fn_20048 void CRagEffect::RingStack(char white) { if (this->state.stateCnt != 0) { return; } for (int index = 1; index <= 3; ++index) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.longSpeed = -3.0f; this->state.lastPrim->state.outerSize = static_cast(index + 3); this->state.lastPrim->state.innerSize = static_cast(index + 1.5); this->state.lastPrim->state.heightSize = static_cast((8 - 2 * index) * (5 - index) + 1) + 2.5f; this->state.lastPrim->state.rollSpeed = -0.5f; this->state.lastPrim->state.alpha = static_cast(this->state.stateCnt * -7 + 240); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (white != 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_white.tga", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\magic_red.tga", 0, false, true, false); } } } // OFFSET: 0x00C41280 // FUNCTION: fn_20134 void CRagEffect::TexturedBurst(const char* name) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 105, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0x201; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 100.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].maxHeight = 8.0f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].distance = 8.0f; this->state.lastPrim->state.slots[index].fullDisplayAngle = 360; this->state.lastPrim->state.slots[index].height[0] = 20.0f; this->state.lastPrim->state.slots[index].riseAngle = static_cast(index * 45); } } // OFFSET: 0x00C515A0 // FUNCTION: fn_20188 void CRagEffect::TexturedRise(const char* name, char large) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 67, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 1; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = large != 1 ? 0.0f : 100.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].distance = large != 1 ? 5.0f : 6.0f; this->state.lastPrim->state.slots[0].riseAngle = 0; this->state.lastPrim->state.slots[0].rotStart = static_cast(this->state.deltaPos[0]); this->state.lastPrim->state.slots[0].alphaB = 150; this->state.lastPrim->state.slots[0].height[0] = -0.2f; } // OFFSET: 0x00C70F10 // FUNCTION: fn_20317 void CRagEffect::TexturedSpiral(const char* name, int, int) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt >= 3) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 162, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].distance = 100.0f; this->state.lastPrim->state.slots[index].alphaB = 255; this->state.lastPrim->state.slots[index].riseAngle = static_cast((this->state.stateCnt * 4 + index) * 30); this->state.lastPrim->state.slots[index].rotStart = 0; this->state.lastPrim->state.slots[index].height[0] = -5.0f; } } // OFFSET: 0x00C45050 // FUNCTION: fn_20147 void CRagEffect::TexturedSpin(const char* name) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 114, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 5.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].distance = 1.6f; this->state.lastPrim->state.slots[0].riseAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].height[0] = -12.0f; this->state.lastPrim->state.slots[0].flag1[0] = static_cast(ClampedRandom(31)); } // OFFSET: 0x00C63240 // FUNCTION: fn_20254 void CRagEffect::ColoredFlash(unsigned char flag, unsigned char red, unsigned char green, unsigned char blue) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt == 99999998) { this->state.stateCnt = 0; this->state.duration = 99999999; } else if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 172, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag |= 0x200; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); this->render.position.y -= 9.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].maxHeight = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.argb = red | (green << 8) | (blue << 16); this->state.lastPrim->state.slots[0].flag1[10] = static_cast(flag); } // OFFSET: 0x00C6F710 // FUNCTION: fn_20309 void CRagEffect::TexturedBeam(char flag, const char* name) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 154, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].distance = 100.0f; this->state.lastPrim->state.slots[0].height[0] = 50.0f; this->state.lastPrim->state.slots[0].maxHeight = 5.0f; this->state.lastPrim->state.slots[0].height[2] = 80.0f; Get_Angle( this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.lastPrim->state.slots[0].riseAngle ); this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].flag1[0] = flag; } // OFFSET: 0x00C70980 // FUNCTION: fn_20314 void CRagEffect::TexturedSpiralSmall(const char* name, int, int) { const vector3d& origin = this->state.parent->render.position; this->render.position.x = origin.x; this->render.position.y = origin.y; this->render.position.z = origin.z; if (this->state.stateCnt > 2) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 163, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int slot = 0; slot < 4; ++slot) { this->state.lastPrim->state.slots[slot].life = 0; } for (int slot = 0; slot < 4; ++slot) { this->state.lastPrim->state.slots[slot].life = 1; this->state.lastPrim->state.slots[slot].process = 0; this->state.lastPrim->state.slots[slot].distance = 50.0f; this->state.lastPrim->state.slots[slot].alphaB = 255; this->state.lastPrim->state.slots[slot].riseAngle = static_cast((this->state.stateCnt * 4 + slot) * 30); this->state.lastPrim->state.slots[slot].rotStart = 0; this->state.lastPrim->state.slots[slot].height[0] = -5.0f; this->state.lastPrim->state.slots[slot].height[1] = 0.0f; } } // OFFSET: 0x00C70B50 // FUNCTION: fn_20315 void CRagEffect::TexturedSpiralTall(const char* name, int, int) { const vector3d& origin = this->state.parent->render.position; this->render.position.x = origin.x; this->render.position.y = origin.y; this->render.position.z = origin.z; if (this->state.stateCnt > 2) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 164, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int slot = 0; slot < 4; ++slot) { this->state.lastPrim->state.slots[slot].life = 0; } for (int slot = 0; slot < 4; ++slot) { this->state.lastPrim->state.slots[slot].life = 1; this->state.lastPrim->state.slots[slot].process = 0; this->state.lastPrim->state.slots[slot].distance = 100.0f; this->state.lastPrim->state.slots[slot].maxHeight = 15.0f; this->state.lastPrim->state.slots[slot].alphaB = 255; this->state.lastPrim->state.slots[slot].riseAngle = static_cast((this->state.stateCnt * 4 + slot) * 30); this->state.lastPrim->state.slots[slot].rotStart = 0; this->state.lastPrim->state.slots[slot].height[0] = -5.0f; this->state.lastPrim->state.slots[slot].height[1] = 0.0f; } } // OFFSET: 0x00C70D30 // FUNCTION: fn_20316 void CRagEffect::TexturedSpiralFade(const char* name, int, int) { const vector3d& origin = this->state.parent->render.position; this->render.position.x = origin.x; this->render.position.y = origin.y; this->render.position.z = origin.z; if (this->state.stateCnt > 2) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 165, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int slot = 0; slot < 4; ++slot) { this->state.lastPrim->state.slots[slot].life = 0; } for (int slot = 0; slot < 4; ++slot) { this->state.lastPrim->state.slots[slot].life = 1; this->state.lastPrim->state.slots[slot].process = 0; this->state.lastPrim->state.slots[slot].distance = 0.0f; this->state.lastPrim->state.slots[slot].height[10] = 0.0f; this->state.lastPrim->state.slots[slot].maxHeight = 15.0f; this->state.lastPrim->state.slots[slot].alphaB = 0; this->state.lastPrim->state.slots[slot].riseAngle = static_cast((this->state.stateCnt * 4 + slot) * 30); this->state.lastPrim->state.slots[slot].rotStart = 0; this->state.lastPrim->state.slots[slot].height[0] = -5.0f; this->state.lastPrim->state.slots[slot].height[1] = 0.0f; } } // OFFSET: 0x00C672B0 // FUNCTION: fn_20278 void CRagEffect::TexturedScatter(const char* name, char flag) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 44, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->render.position.y -= 9.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = -10 - ClampedRandom(25); this->state.lastPrim->state.slots[index].distance = -10.0f; this->state.lastPrim->state.slots[index].height[0] = 3.0f; this->state.lastPrim->state.slots[index].riseAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[1] = 0.7f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].flag1[0] = flag; this->state.lastPrim->state.slots[index].flag1[1] = 24; } } // OFFSET: 0x00C67780 // FUNCTION: fn_20280 void CRagEffect::TexturedScatterLow(const char* name, char flag) { if (this->state.stateCnt != 0) { return; } const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; this->state.lastPrim = CreateEffectParticle(*this, this->render, 44, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->render.position.y -= 9.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = -20 - ClampedRandom(10); this->state.lastPrim->state.slots[index].distance = -10.0f; this->state.lastPrim->state.slots[index].height[0] = 2.0f; this->state.lastPrim->state.slots[index].riseAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[1] = 1.0f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].flag1[0] = flag; this->state.lastPrim->state.slots[index].flag1[1] = 16; } } // OFFSET: 0x00C6E370 // FUNCTION: fn_20302 void CRagEffect::TorchDustRing(const char* name, char kind, std::int16_t angle) { char path[64]; CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 143, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; if (kind == 1) { this->state.lastPrim->state.totalTexture = 13; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; for (int frame = 0; frame < 13; ++frame) { std::sprintf(path, "effect\\torch_red%02d.bmp", frame + 1); this->state.lastPrim->state.textures[frame] = g_texMgr.Load(path, 0, false, true, false); } } else if (kind == 2) { this->state.lastPrim->state.totalTexture = 51; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; for (int frame = 0; frame < 51; ++frame) { std::sprintf(path, "effect\\W_c_%02d.tga", frame); this->state.lastPrim->state.textures[frame] = g_texMgr.Load(path, 0, false, true, false); } } else { this->state.lastPrim->state.totalTexture = 9; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; for (int frame = 0; frame < 9; ++frame) { std::sprintf(path, "effect\\dust%02d.bmp", frame + 1); this->state.lastPrim->state.textures[frame] = g_texMgr.Load(path, 0, false, true, false); } } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].process = 0; if (kind == 2) { const float radius = this->state.param[0]; this->state.lastPrim->state.slots[0].distance = radius < 5.0f ? 20.0f : radius; const float start = this->state.param[1]; this->state.lastPrim->state.slots[0].rotStart = (start < 0.0f || start >= 360.0f) ? 45 : static_cast(start); this->state.lastPrim->state.slots[0].alphaB = 200; this->state.lastPrim->state.slots[0].height[2] = 1.0f; } else { this->state.lastPrim->state.slots[0].distance = 18.0f; this->state.lastPrim->state.slots[0].rotStart = angle; this->state.lastPrim->state.slots[0].alphaB = 200; this->state.lastPrim->state.slots[0].height[2] = 0.0f; } this->state.lastPrim->state.slots[0].riseAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[0] = -2.0f; this->state.lastPrim->state.slots[0].height[1] = 0.0f; } // OFFSET: 0x00C6E6F0 // FUNCTION: fn_20303 void CRagEffect::TexturedDualSpin(const char* first, const char* second, int) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 148, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(first, 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load(second, 0, false, true, false); this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].process = 0; const float distance = this->state.param[0]; this->state.lastPrim->state.slots[0].distance = distance < 5.0f ? 20.0f : distance; const float rotation = this->state.param[1]; this->state.lastPrim->state.slots[0].rotStart = static_cast(rotation < 0.0f || rotation >= 360.0f ? 45 : static_cast(rotation)); this->state.lastPrim->state.slots[0].riseAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[0] = -2.0f; this->state.lastPrim->state.slots[0].height[1] = 0.0f; } // OFFSET: 0x00C6E8F0 // FUNCTION: fn_20304 void CRagEffect::TexturedDrop(const char* name, char flag) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 156, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].distance = 6.0f; this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 120; this->state.lastPrim->state.slots[0].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 6.0f; this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].fullDisplayAngle = 45; this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[1] = flag; } // OFFSET: 0x00C65330 // FUNCTION: fn_20268 void CRagEffect::PurpleSlash(std::int16_t angle) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 92, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\purpleslash.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; const int offset = ClampedRandom(6); for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = index - 28 - offset; this->state.lastPrim->state.slots[index].distance = 20.0f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[index].vecBNow.y = static_cast(ClampedRandom(5)) + (this->render.position.y - 10.0f); this->state.lastPrim->state.slots[index].rotStart = angle; this->state.lastPrim->state.slots[index].height[1] = 0.8f; this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].flag1[1] = 0; } } // OFFSET: 0x00C647D0 // FUNCTION: fn_20262 void CRagEffect::TexturedPair(const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 76, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 4.0f; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].maxHeight = 10.0f; this->state.lastPrim->state.slots[0].distance = 2.0f; this->state.lastPrim->state.slots[0].height[0] = -8.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 0; this->state.lastPrim->state.slots[0].alphaB = 200; this->state.lastPrim->state.slots[0].riseAngle = 0; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].maxHeight = 10.0f; this->state.lastPrim->state.slots[1].distance = 2.0f; this->state.lastPrim->state.slots[1].height[0] = -8.0f; this->state.lastPrim->state.slots[1].rotStart = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 0; this->state.lastPrim->state.slots[1].alphaB = 200; this->state.lastPrim->state.slots[1].riseAngle = 0; } // OFFSET: 0x00C549C0 // FUNCTION: fn_20199 void CRagEffect::BlackMaximize(const char* name) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\black_maximize_power_sword_bic.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 61, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\a01.bmp", 0, false, true, false); this->state.lastPrim->state.size = 11.0f; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].maxHeight = 10.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 1.0f; this->state.lastPrim->state.slots[0].height[0] = 0.0f; this->state.lastPrim->state.slots[0].flag1[0] = 1; } // OFFSET: 0x00C3F7A0 // FUNCTION: fn_20121 void CRagEffect::WaterBallBurst() { if (this->state.stateCnt != 0) { return; } g_modeMgr.GetGameMode(); g_soundMgr->PlayWave("effect\\wizard_waterball_chulung.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 30; this->state.lastPrim->state.renderFlag |= 0x200u; this->state.lastPrim->state.latitude = 90.0f; this->state.lastPrim->state.radiusSpeed = 1.75f; EffectPrimitiveState& firstRing = this->state.lastPrim->state; firstRing.radiusAccel = -(firstRing.radiusSpeed / static_cast(firstRing.duration)) * g_depthAverageHalf; this->state.lastPrim->state.innerSize = 12.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 15.0f; this->state.lastPrim->state.fadeOutCnt = 10; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 14, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 30; this->state.lastPrim->state.radiusSpeed = 1.15f; EffectPrimitiveState& droplets = this->state.lastPrim->state; droplets.radiusAccel = -(droplets.radiusSpeed / static_cast(droplets.duration)) * g_depthAverageHalf; this->state.lastPrim->state.longSpeed = 3.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 15.0f; this->state.lastPrim->state.fadeOutCnt = 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ice.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 20; this->state.lastPrim->state.renderFlag |= 0x200u; this->state.lastPrim->state.latitude = 90.0f; this->state.lastPrim->state.radiusSpeed = 1.75f; EffectPrimitiveState& secondRing = this->state.lastPrim->state; secondRing.radiusAccel = -(secondRing.radiusSpeed / static_cast(secondRing.duration)) * g_depthAverageHalf; this->state.lastPrim->state.innerSize = 12.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 15.0f; this->state.lastPrim->state.fadeOutCnt = 10; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } // OFFSET: 0x00C3FBD0 // FUNCTION: fn_20122 void CRagEffect::WaterOut() { if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\wizard_waterball_chulung.wav"); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.pattern = 0x40; this->state.lastPrim->state.pattern |= 0x100; this->state.lastPrim->state.renderFlag |= 2; this->state.lastPrim->state.repeatAnim = 1; this->state.lastPrim->state.widthSize = 3.5f; this->state.lastPrim->state.heightSize = 3.5f; this->state.lastPrim->state.speed3d.y = -(25.0f / static_cast(this->state.lastPrim->state.duration)); this->state.lastPrim->state.deltaPos2.y = -5.0f; this->state.lastPrim->state.animSpeed = 5; this->state.lastPrim->state.totalTexture = 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\water_out_a.bmp", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\water_out_b.bmp", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\water_out_c.bmp", 0, false, true, false); } // OFFSET: 0x00C5A550 // FUNCTION: fn_20218 void CRagEffect::TexturedDoubleRing(const char* name, char level) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt == 99999998) { this->state.stateCnt = 0; this->state.duration = 99999999; } else if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 28, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag = 13; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); if (level == 1) { this->state.lastPrim->state.size = 15.0f; } else if (level == 2) { this->state.lastPrim->state.size = 17.0f; } else if (level == 3) { this->state.lastPrim->state.size = 18.0f; } else { this->state.lastPrim->state.size = 4.0f; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].distance = level == 3 ? 24.0f : 15.0f; this->state.lastPrim->state.slots[1].distance = this->state.lastPrim->state.slots[0].distance; this->state.lastPrim->state.slots[0].riseAngle = 0; this->state.lastPrim->state.slots[1].riseAngle = 180; this->state.lastPrim->state.slots[0].alphaB = 200; this->state.lastPrim->state.slots[1].alphaB = 200; this->state.lastPrim->state.slots[0].height[0] = -1.0f; this->state.lastPrim->state.slots[1].height[0] = -1.0f; } // OFFSET: 0x00C41470 // FUNCTION: fn_20136 void CRagEffect::TexturedQuadSpin(const char* name, char phase, char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 89, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); const float scale = static_cast(kind); for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].height[4] = scale; std::int16_t base; if (kind == 2 || kind == 3 || kind == 6) { this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].distance = 2.0f; base = kind == 3 ? static_cast(phase * 7) : static_cast(phase * 22); } else { this->state.lastPrim->state.slots[index].process = -24; this->state.lastPrim->state.slots[index].distance = 2.0f; base = static_cast(phase * 22); } this->state.lastPrim->state.slots[index].riseAngle = static_cast(base + index * 90); this->state.lastPrim->state.slots[index].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].height[0] = -12.0f; } } // OFFSET: 0x00C425A0 // FUNCTION: fn_45478 void CRagEffect::TexturedFourRing(const char* name, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 90, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 1; this->state.lastPrim->state.renderFlag |= 5u; this->state.lastPrim->state.duration = this->state.duration; AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; const float scale = static_cast(kind); for (int index = 0; index < 2; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; if (kind == 0 || kind == 10 || kind == 20) { this->state.lastPrim->state.slots[index].maxHeight = static_cast(index) + 30.0f; } else { this->state.lastPrim->state.slots[index].maxHeight = static_cast(index) + 20.0f; } if (kind == 0 || kind == 10) { this->state.lastPrim->state.slots[index].alphaB = 65; this->state.lastPrim->state.slots[index].alphaT = 2415; } else if (kind == 20) { this->state.lastPrim->state.slots[index].alphaB = 65; this->state.lastPrim->state.slots[index].alphaT = 2170; } else { this->state.lastPrim->state.slots[index].alphaB = 32; this->state.lastPrim->state.slots[index].alphaT = kind == 21 ? 2140 : 2385; } if (kind >= 10 && kind < 20) { this->state.lastPrim->state.slots[index].alphaT = static_cast(this->state.duration > 30000 ? 30000 : this->state.duration - 90); } if (kind == 10 || kind == 20) { this->state.lastPrim->state.slots[index].height[0] = static_cast(index) * 0.4f + 7.0f; } else if (kind == 11 || kind == 21) { this->state.lastPrim->state.slots[index].height[0] = static_cast(index) * 0.4f + 8.5f; } else if (kind == 0) { this->state.lastPrim->state.slots[index].height[0] = static_cast(index) * 0.4f + 12.5f; } else { this->state.lastPrim->state.slots[index].height[0] = static_cast(index) * 0.4f + 14.0f; } this->state.lastPrim->state.slots[index].height[1] = this->state.lastPrim->state.slots[index].height[0]; this->state.lastPrim->state.slots[index].height[4] = scale; } for (int index = 2; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; if (kind == 0 || kind == 10 || kind == 20) { this->state.lastPrim->state.slots[index].maxHeight = static_cast(index) + 30.0f; } else { this->state.lastPrim->state.slots[index].maxHeight = static_cast(index) + 20.0f; } if (kind == 10 || kind == 20) { this->state.lastPrim->state.slots[index].distance = static_cast(index - 2) * 30.2f; } else if (kind == 11 || kind == 21) { this->state.lastPrim->state.slots[index].distance = static_cast(index - 2) * 30.2f + 15.1f; } else if (kind == 0) { this->state.lastPrim->state.slots[index].distance = static_cast(index - 2) * 53.2f; } else { this->state.lastPrim->state.slots[index].distance = static_cast(index - 2) * 53.2f + 26.6f; } if (kind == 10 || kind == 20) { this->state.lastPrim->state.slots[index].height[0] = 7.8f; } else if (kind == 11 || kind == 21) { this->state.lastPrim->state.slots[index].height[0] = 9.3f; } else if (kind == 0) { this->state.lastPrim->state.slots[index].height[0] = 13.3f; } else { this->state.lastPrim->state.slots[index].height[0] = 14.8f; } this->state.lastPrim->state.slots[index].height[1] = this->state.lastPrim->state.slots[index].height[0]; this->state.lastPrim->state.slots[index].height[3] = kind >= 10 ? 18.6f : 26.6f; this->state.lastPrim->state.slots[index].alphaB = 15; this->state.lastPrim->state.slots[index].alphaT = kind < 20 ? 2415 : 2170; if (kind >= 10 && kind < 20) { this->state.lastPrim->state.slots[index].alphaT = static_cast(this->state.duration > 30000 ? 30000 : this->state.duration - 90); } this->state.lastPrim->state.slots[index].height[4] = scale; } } // OFFSET: 0x00C42B40 // FUNCTION: fn_20139 void CRagEffect::TexturedSkillIcon(const char* name, std::int16_t level, std::int16_t mode) { char iconName[64]; CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != (level != 0 ? level : 0)) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 68, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (mode == 2) { std::sprintf(iconName, "유저인터페이스\\item\\%s.bmp", CSkillInfo::IdName(*g_session.m_hotkeyScript, 2285)); this->state.lastPrim->state.textures[0] = g_texMgr.Load(iconName, 0, false, true, false); } else if (level > 0) { int skillId; if (rand() % 2 == 0) { skillId = rand() % 12 + 9; } else { skillId = rand() % 13 + 80; } std::sprintf(iconName, "유저인터페이스\\item\\%s.bmp", CSkillInfo::IdName(*g_session.m_hotkeyScript, skillId)); this->state.lastPrim->state.textures[0] = g_texMgr.Load(iconName, 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); } this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; if (level > 0) { this->state.lastPrim->state.slots[0].distance = 5.0f; this->state.lastPrim->state.slots[0].height[0] = 1.0f; this->state.lastPrim->state.slots[0].flag1[4] = 4; } else { this->state.lastPrim->state.slots[0].distance = mode == 3 ? 7.0f : 18.0f; this->state.lastPrim->state.slots[0].height[0] = 0.0f; this->state.lastPrim->state.slots[0].flag1[4] = 1; } this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].flag1[0] = 0; for (int index = 1; index < 21; ++index) { this->state.lastPrim->state.slots[0].height[index] = 0.0f; } this->state.lastPrim->state.slots[0].flag1[5] = 0; } // OFFSET: 0x00C59960 // FUNCTION: fn_20214 void CRagEffect::TrackTarget() { CGameMode* gameMode = static_cast(g_modeMgr.GetGameMode()); const CRenderObject* target = nullptr; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 38, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 0.0f; this->state.lastPrim->state.slots[0].maxHeight = 0.2f; this->state.lastPrim->state.slots[0].height[4] = 2.0f; this->state.lastPrim->state.slots[0].vecTNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecTNow.y = this->render.position.y; this->state.lastPrim->state.slots[0].vecTNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].height[0] = this->state.deltaPos[1]; if (this->state.lastPrim->state.slots[0].height[0] > 0.0f) { if (this->state.lastPrim->state.slots[0].height[0] == static_cast(g_session.m_aid)) { target = reinterpret_cast(gameMode->scene->player); } else { target = gameMode->scene->GetGameActorByAID(static_cast(this->state.lastPrim->state.slots[0].height[0])); } } if (target == nullptr) { this->state.lastPrim->state.slots[0].life = 0; } else { this->state.lastPrim->state.slots[0].vecTPre.x = target->render.position.x; this->state.lastPrim->state.slots[0].vecTPre.y = target->render.position.y; this->state.lastPrim->state.slots[0].vecTPre.z = target->render.position.z; } this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C59B80 // FUNCTION: fn_20215 void CRagEffect::TrackTargetWide() { CGameMode* gameMode = static_cast(g_modeMgr.GetGameMode()); const CRenderObject* target = nullptr; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 38, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 0.0f; this->state.lastPrim->state.slots[0].maxHeight = 0.7f; this->state.lastPrim->state.slots[0].height[4] = 3.0f; this->state.lastPrim->state.slots[0].vecTNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecTNow.y = this->render.position.y; this->state.lastPrim->state.slots[0].vecTNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].height[0] = this->state.deltaPos[1]; if (this->state.lastPrim->state.slots[0].height[0] > 0.0f) { if (this->state.lastPrim->state.slots[0].height[0] == static_cast(g_session.m_aid)) { target = reinterpret_cast(gameMode->scene->player); } else { target = gameMode->scene->GetGameActorByAID(static_cast(this->state.lastPrim->state.slots[0].height[0])); } } if (target == nullptr) { this->state.lastPrim->state.slots[0].life = 0; } else { this->state.lastPrim->state.slots[0].vecTPre.x = target->render.position.x; this->state.lastPrim->state.slots[0].vecTPre.y = target->render.position.y; this->state.lastPrim->state.slots[0].vecTPre.z = target->render.position.z; } this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C59DA0 // FUNCTION: fn_20216 void CRagEffect::TrackCloud(char kind) { float scale = 0.0f; CGameMode* gameMode = static_cast(g_modeMgr.GetGameMode()); const CRenderObject* target = nullptr; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 38, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].alphaB = 45; this->state.lastPrim->state.slots[0].distance = 0.0f; this->state.lastPrim->state.slots[0].maxHeight = 0.4f; if (kind == 2) { scale = 4.0f; } this->state.lastPrim->state.slots[0].height[4] = scale; this->state.lastPrim->state.slots[0].vecTNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecTNow.y = this->render.position.y; this->state.lastPrim->state.slots[0].vecTNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].height[0] = this->state.deltaPos[1]; if (this->state.lastPrim->state.slots[0].height[0] > 0.0f) { if (this->state.lastPrim->state.slots[0].height[0] == static_cast(g_session.m_aid)) { target = reinterpret_cast(gameMode->scene->player); } else { target = gameMode->scene->GetGameActorByAID(static_cast(this->state.lastPrim->state.slots[0].height[0])); } } if (target == nullptr) { this->state.lastPrim->state.slots[0].life = 0; } else { this->state.lastPrim->state.slots[0].vecTPre.x = target->render.position.x; this->state.lastPrim->state.slots[0].vecTPre.y = target->render.position.y; this->state.lastPrim->state.slots[0].vecTPre.z = target->render.position.z; } this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C64590 // FUNCTION: fn_20261 void CRagEffect::TexturedSlashFan(const char* name) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 119, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; RenderObjectState& primRender = this->state.lastPrim->render; primRender.position.x = this->render.position.x; primRender.position.y = this->render.position.y; primRender.position.z = this->render.position.z; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = index - 3; this->state.lastPrim->state.slots[index].distance = 20.0f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[index].vecBNow.y = static_cast(ClampedRandom(5)) + (this->render.position.y - 10.0f); this->state.lastPrim->state.slots[index].rotStart = 0; this->state.lastPrim->state.slots[index].riseAngle = static_cast(index); this->state.lastPrim->state.slots[index].height[1] = 0.8f; this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].flag1[3] = 0; } } // OFFSET: 0x00C66460 // FUNCTION: fn_20274 void CRagEffect::TexturedMark(const char* name, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 103, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].maxHeight = 40.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].distance = 2.0f; this->state.lastPrim->state.slots[0].height[0] = 50.0f; this->state.lastPrim->state.slots[0].height[1] = 5.0f; this->state.lastPrim->state.slots[0].flag1[0] = 10; this->state.lastPrim->state.slots[0].flag1[4] = kind; this->state.lastPrim->state.slots[0].flag1[5] = 0; if (kind == 10) { this->state.lastPrim->state.slots[0].maxHeight = 14.0f; this->state.lastPrim->state.slots[0].height[0] = 70.0f; this->state.lastPrim->state.slots[0].flag1[0] = 14; this->state.lastPrim->state.slots[0].distance = 0.0f; this->state.lastPrim->state.slots[0].flag1[5] = 1; return; } if (kind == 2) { this->state.lastPrim->state.slots[0].flag1[5] = 10; } } // OFFSET: 0x00C61830 // FUNCTION: fn_20247 void CRagEffect::TexturedSpray(const char* name) { if (this->state.stateCnt != 0) { return; } const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; this->state.lastPrim = CreateEffectParticle(*this, this->render, 43, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->render.position.y -= 12.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].vecBNow.x = this->state.deltaPos[0]; this->state.lastPrim->state.slots[index].vecBNow.y = this->state.deltaPos[1]; this->state.lastPrim->state.slots[index].vecBNow.z = this->state.deltaPos[2]; this->state.lastPrim->state.slots[index].process = -18 - ClampedRandom(30); this->state.lastPrim->state.slots[index].distance = 12.0f; this->state.lastPrim->state.slots[index].height[0] = 1.5f; this->state.lastPrim->state.slots[index].riseAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[1] = 3.5f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].flag1[0] = 1; } } // OFFSET: 0x00C54770 // FUNCTION: fn_20198 void CRagEffect::TexturedLevelRing(const char* name, int process, char level) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 88, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1; this->state.lastPrim->state.renderFlag |= 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); if (level == 1) { this->state.lastPrim->state.size = 101.0f; } else if (level == 2) { this->state.lastPrim->state.size = 102.0f; } else if (level == 3) { this->state.lastPrim->state.size = 111.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = process; this->state.lastPrim->state.slots[0].distance = 13.0f; this->state.lastPrim->state.slots[0].height[0] = -5.0f - static_cast(rand() % 6); goto finish; } else if (level == 4) { this->state.lastPrim->state.size = 113.0f; } else if (level == 10) { this->state.lastPrim->state.size = 114.0f; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = process; this->state.lastPrim->state.slots[0].distance = 15.0f; this->state.lastPrim->state.slots[0].height[0] = -5.0f; finish: this->state.lastPrim->state.slots[0].riseAngle = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C47740 // FUNCTION: fn_20158 void CRagEffect::SlashFan(std::int16_t reverse) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 40) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 55, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag |= 0x200; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\slash01.tga", 0, false, true, false); this->render.position.y -= 9.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].distance = 100.0f; this->state.lastPrim->state.slots[index].maxHeight = 1.0f; this->state.lastPrim->state.slots[index].height[0] = reverse == 0 ? -15.0f - static_cast(index) * 2.5f : static_cast(index) * 2.5f + 15.0f; Get_Angle( this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.lastPrim->state.slots[index].riseAngle ); if (this->state.lastPrim->state.slots[index].riseAngle > 359) { this->state.lastPrim->state.slots[index].riseAngle -= 360; } this->state.lastPrim->state.slots[index].alphaB = 0; } } // OFFSET: 0x00C65F80 // FUNCTION: fn_20272 void CRagEffect::FeatherBurst(const char* name, std::int16_t angle, char) { const vector3d& origin = this->state.parent->render.position; this->render.position.x = origin.x; this->render.position.y = origin.y; this->render.position.z = origin.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 91, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 10.0f; for (int slot = 0; slot < 4; ++slot) { this->state.lastPrim->state.slots[slot].life = 0; } for (int slot = 0; slot < 4; ++slot) { this->state.lastPrim->state.slots[slot].life = 1; this->state.lastPrim->state.slots[slot].process = -ClampedRandom(20); this->state.lastPrim->state.slots[slot].maxHeight = static_cast(ClampedRandom(11)) * 0.2f + 2.0f; this->state.lastPrim->state.slots[slot].distance = 5.0f; this->state.lastPrim->state.slots[slot].height[0] = -10.0f; this->state.lastPrim->state.slots[slot].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[slot].riseAngle = static_cast(slot * 45 + angle); this->state.lastPrim->state.slots[slot].alphaB = 0; this->state.lastPrim->state.slots[slot].fullDisplayAngle = static_cast(ClampedRandom(91) + 180); this->state.lastPrim->state.slots[slot].height[1] = static_cast(ClampedRandom(4) + 3); } } // OFFSET: 0x00C661F0 // FUNCTION: fn_20273 void CRagEffect::FeatherRing(const char* name, std::int16_t angle, char large) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 77, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = large == 1 ? 10.0f : 4.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].maxHeight = static_cast(ClampedRandom(11)) * 0.2f + 4.0f; this->state.lastPrim->state.slots[index].distance = 14.0f; this->state.lastPrim->state.slots[index].height[0] = -14.0f; this->state.lastPrim->state.slots[index].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].riseAngle = static_cast(index * 45 + angle); this->state.lastPrim->state.slots[index].alphaB = 100; this->state.lastPrim->state.slots[index].fullDisplayAngle = static_cast(ClampedRandom(91) + 180); this->state.lastPrim->state.slots[index].height[1] = static_cast(ClampedRandom(4) + 3); } } // OFFSET: 0x00C6CB70 // FUNCTION: fn_20297 void CRagEffect::TexturedSlam(const char* name, std::int16_t kind, char) { const vector3d& origin = this->state.parent->render.position; this->render.position.x = origin.x; this->render.position.y = origin.y; this->render.position.z = origin.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 147, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; if (kind == 1) { this->state.lastPrim->state.slots[0].distance = 21.0f; this->state.lastPrim->state.slots[0].flag1[4] = 6; } else if (kind == 2) { this->state.lastPrim->state.slots[0].distance = 21.0f; this->state.lastPrim->state.slots[0].flag1[4] = 7; } else { this->state.lastPrim->state.slots[0].distance = 13.0f; this->state.lastPrim->state.slots[0].flag1[4] = 5; } this->state.lastPrim->state.slots[0].height[0] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].flag1[0] = 0; for (int step = 1; step < 21; ++step) { this->state.lastPrim->state.slots[0].height[step] = 0.0f; } } // OFFSET: 0x00C6CDE0 // FUNCTION: fn_20298 void CRagEffect::BubbleSpiral(std::int16_t angle, const char*, char flag) { char name[64]; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } if (this->state.duration < 100) { this->state.duration = 100; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 158, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 27; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; for (int index = 0; index < 27; ++index) { std::sprintf(name, "effect\\W_bubble%02d.tga", index + 1); this->state.lastPrim->state.textures[index] = g_texMgr.Load(name, 0, false, true, false); } if (flag == 1) { this->state.lastPrim->state.size = 4.0f; } else { this->state.lastPrim->state.size = 0.0f; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 30.0f; this->state.lastPrim->state.slots[0].rotStart = 180; this->state.lastPrim->state.slots[0].alphaB = angle + 135; this->state.lastPrim->state.slots[0].distance = 3.5f; this->state.lastPrim->state.slots[0].riseAngle = 80; this->state.lastPrim->state.slots[0].alphaT = flag; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 29.0f; this->state.lastPrim->state.slots[1].rotStart = 270; this->state.lastPrim->state.slots[1].alphaB = angle + 90; this->state.lastPrim->state.slots[1].distance = 3.5f; this->state.lastPrim->state.slots[1].riseAngle = 80; this->state.lastPrim->state.slots[1].alphaT = flag; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 28.0f; this->state.lastPrim->state.slots[2].rotStart = 0; this->state.lastPrim->state.slots[2].alphaB = angle + 45; this->state.lastPrim->state.slots[2].distance = 3.5f; this->state.lastPrim->state.slots[2].riseAngle = 80; this->state.lastPrim->state.slots[2].alphaT = flag; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 360; this->state.lastPrim->state.slots[3].maxHeight = 27.0f; this->state.lastPrim->state.slots[3].rotStart = 90; this->state.lastPrim->state.slots[3].alphaB = angle; this->state.lastPrim->state.slots[3].distance = 3.5f; this->state.lastPrim->state.slots[3].riseAngle = 80; this->state.lastPrim->state.slots[3].alphaT = flag; this->state.lastPrim->state.slots[3].vecBNow.y = 0.0f; for (int index = 0; index < 4; ++index) { for (int step = 0; step < 21; ++step) { this->state.lastPrim->state.slots[index].height[step] = 0.0f; this->state.lastPrim->state.slots[index].flag1[step] = 0; } } } // OFFSET: 0x00C6D2C0 // FUNCTION: fn_20299 void CRagEffect::BubbleSpiralKind(int angle, const char*, char kind) { auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; char name[64]; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } if (this->state.duration < 100) { this->state.duration = 100; } this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 144, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; if (kind <= 1) { stored()->state.totalTexture = 27; stored()->state.textures = new CTexture*[stored()->state.totalTexture]; for (int index = 0; index < 27; ++index) { std::sprintf(name, "effect\\W_bubble%02d.tga", index + 1); stored()->state.textures[index] = g_texMgr.Load(name, 0, false, true, false); } if (kind == 1) { stored()->state.size = 4.0f; } else { stored()->state.size = 0.0f; } } else if (kind <= 3) { stored()->state.totalTexture = 29; stored()->state.textures = new CTexture*[stored()->state.totalTexture]; for (int index = 0; index < 29; ++index) { std::sprintf(name, "effect\\W_A_top%02d.tga", index + 1); stored()->state.textures[index] = g_texMgr.Load(name, 0, false, true, false); } if (kind == 3) { stored()->state.size = 4.0f; } else { stored()->state.size = 0.0f; } } stored()->state.slots[0].life = 1; stored()->state.slots[0].process = 0; stored()->state.slots[0].fullDisplayAngle = 360; stored()->state.slots[0].maxHeight = 30.0f; stored()->state.slots[0].rotStart = 180; stored()->state.slots[0].alphaB = angle + 135; stored()->state.slots[0].distance = 4.1f; stored()->state.slots[0].riseAngle = 80; stored()->state.slots[0].alphaT = kind; stored()->state.slots[0].vecBNow.y = 0.0f; stored()->state.slots[1].life = 1; stored()->state.slots[1].process = 0; stored()->state.slots[1].fullDisplayAngle = 360; stored()->state.slots[1].maxHeight = 29.0f; stored()->state.slots[1].rotStart = 270; stored()->state.slots[1].alphaB = angle + 90; stored()->state.slots[1].distance = 4.1f; stored()->state.slots[1].riseAngle = 80; stored()->state.slots[1].alphaT = kind; stored()->state.slots[1].vecBNow.y = 0.0f; stored()->state.slots[2].life = 1; stored()->state.slots[2].process = 0; stored()->state.slots[2].fullDisplayAngle = 360; stored()->state.slots[2].maxHeight = 28.0f; stored()->state.slots[2].rotStart = 0; stored()->state.slots[2].alphaB = angle + 45; stored()->state.slots[2].distance = 4.1f; stored()->state.slots[2].riseAngle = 80; stored()->state.slots[2].alphaT = kind; stored()->state.slots[2].vecBNow.y = 0.0f; stored()->state.slots[3].life = 1; stored()->state.slots[3].process = 0; stored()->state.slots[3].fullDisplayAngle = 360; stored()->state.slots[3].maxHeight = 27.0f; stored()->state.slots[3].rotStart = 90; stored()->state.slots[3].alphaB = angle; stored()->state.slots[3].distance = 4.1f; stored()->state.slots[3].riseAngle = 80; stored()->state.slots[3].alphaT = kind; stored()->state.slots[3].vecBNow.y = 0.0f; for (int index = 0; index < 4; ++index) { for (int step = 0; step < 21; ++step) { stored()->state.slots[index].height[step] = 0.0f; stored()->state.slots[index].flag1[step] = 0; } if (this->state.duration <= 60) { stored()->state.slots[index].alphaB = 0; stored()->state.slots[index].process = index * -5; } } } // OFFSET: 0x00C54BE0 // FUNCTION: fn_20200 void CRagEffect::KyrieGuard(const char* name, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\kyrie_guard.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 61, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\guardK2.tga", 0, false, true, false); this->state.lastPrim->state.size = 11.0f; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].maxHeight = 7.8f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 1.0f; this->state.lastPrim->state.slots[0].height[0] = 0.0f; if (kind == 2) { this->state.lastPrim->state.slots[0].flag1[0] = 2; return; } if (kind == 4) { this->state.lastPrim->state.slots[0].flag1[0] = 4; return; } if (kind == 5) { this->state.lastPrim->state.slots[0].flag1[0] = 5; return; } this->state.lastPrim->state.slots[0].flag1[0] = 0; if (kind == 3) { this->state.lastPrim->state.slots[0].flag1[0] = 3; } } // OFFSET: 0x00C719E0 // FUNCTION: fn_20320 void CRagEffect::TexturedColumn(const char* name, char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 160, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; if (kind == 30) { this->state.lastPrim->state.slots[0].distance = 36.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y; this->state.lastPrim->state.slots[0].flag1[2] = 19; } else if (kind == 31) { this->state.lastPrim->state.slots[0].distance = 36.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y; this->state.lastPrim->state.slots[0].flag1[2] = 21; } else { this->state.lastPrim->state.slots[0].distance = 5.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 10.0f; this->state.lastPrim->state.slots[0].flag1[2] = 2; } this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 135; this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[4] = kind; } // OFFSET: 0x00C5B2F0 // FUNCTION: fn_20220 void CRagEffect::TexturedSparkle(const char* name) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } const RenderObjectState& origin = this->state.parent->render; this->render.position.x = origin.position.x; this->render.position.y = origin.position.y; this->render.position.z = origin.position.z; this->state.lastPrim = CreateEffectParticle(*this, this->render, 81, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].alphaB = 40; this->state.lastPrim->state.slots[index].distance = 1.0f; this->state.lastPrim->state.slots[index].height[3] = 10.0f; this->state.lastPrim->state.slots[index].riseAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].maxHeight = static_cast(ClampedRandom(2) + 1); if (ClampedRandom(2) == 0) { this->state.lastPrim->state.slots[index].height[0] = 105.0f; this->state.lastPrim->state.slots[index].height[1] = 105.0f; this->state.lastPrim->state.slots[index].height[2] = 255.0f; } else { this->state.lastPrim->state.slots[index].height[0] = 55.0f; this->state.lastPrim->state.slots[index].height[1] = 55.0f; this->state.lastPrim->state.slots[index].height[2] = 225.0f; } } } // OFFSET: 0x00C615A0 // FUNCTION: fn_20246 void CRagEffect::TexturedSprayKind(const char* name, float spin, char kind) { if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 43, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->render.position.y -= 12.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; vector3d& target = this->state.lastPrim->state.slots[index].vecBNow; target.x = this->state.deltaPos[0]; target.y = this->state.deltaPos[1]; target.z = this->state.deltaPos[2]; this->state.lastPrim->state.slots[index].process = -18 - ClampedRandom(30); this->state.lastPrim->state.slots[index].distance = 12.0f; this->state.lastPrim->state.slots[index].height[0] = 1.0f; this->state.lastPrim->state.slots[index].riseAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[1] = spin; this->state.lastPrim->state.slots[index].alphaB = 0; if (kind == 1) { this->state.lastPrim->state.slots[index].flag1[0] = 6; } else if (kind == 7) { this->state.lastPrim->state.slots[index].flag1[0] = 7; } else if (kind == 8) { this->state.lastPrim->state.slots[index].flag1[0] = 8; } else { this->state.lastPrim->state.slots[index].flag1[0] = kind == 9 ? 9 : 2; } } } // OFFSET: 0x00C64040 // FUNCTION: fn_20259 void CRagEffect::TexturedSlashWave(const char* name, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 125, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; RenderObjectState& primRender = this->state.lastPrim->render; primRender.position.x = this->render.position.x; primRender.position.y = this->render.position.y; primRender.position.z = this->render.position.z; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(11)) * 0.5f + 10.0f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y - 10.0f; this->state.lastPrim->state.slots[index].rotStart = 0; this->state.lastPrim->state.slots[index].riseAngle = static_cast(index); this->state.lastPrim->state.slots[index].height[1] = static_cast(ClampedRandom(21)) * 0.1f + 1.0f; this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].flag1[1] = 0; if (kind == 0) { this->state.lastPrim->state.slots[index].flag1[2] = 0; } else if (kind == 1) { this->state.lastPrim->state.slots[index].flag1[2] = 1; } this->state.lastPrim->state.slots[index].flag1[3] = 1; } } // OFFSET: 0x00C48C90 // FUNCTION: fn_20164 void CRagEffect::TexturedBeams(const char* name, char flag) { if (this->state.stateCnt != 0) { return; } const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; this->state.lastPrim = CreateEffectParticle(*this, this->render, 129, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 3; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].alphaB = 30; this->state.lastPrim->state.slots[index].distance = 0.0f; this->state.lastPrim->state.slots[index].maxHeight = static_cast(index) * 0.5f + 3.0f; this->state.lastPrim->state.slots[index].height[0] = this->state.lastPrim->state.slots[index].maxHeight; this->state.lastPrim->state.slots[index].rotStart = static_cast(index * 25); this->state.lastPrim->state.slots[index].vecTNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecTNow.y = this->render.position.y; this->state.lastPrim->state.slots[index].vecTNow.z = this->render.position.z; this->state.deltaPos[0] = this->render.position.x; this->state.deltaPos[1] = this->render.position.y; this->state.deltaPos[2] = this->render.position.z; this->state.deltaPos[1] -= 40.0f; this->state.lastPrim->state.slots[index].vecTPre.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecTPre.y = this->state.deltaPos[1]; this->state.lastPrim->state.slots[index].vecTPre.z = this->state.deltaPos[2]; this->state.lastPrim->state.slots[index].flag1[0] = flag; } } // OFFSET: 0x00C6F4B0 // FUNCTION: fn_20308 void CRagEffect::TexturedSwirl(unsigned char clockwise, const char* name) { if (name == nullptr) { return; } CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0x201; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (EffectPrimitiveSlot& slot : this->state.lastPrim->state.slots) { slot.life = 1; slot.process = 0; slot.distance = 100.0f; slot.maxHeight = static_cast(ClampedRandom(6)) * 0.1f + 0.5f; slot.flag1[0] = static_cast(ClampedRandom(3) + 125); slot.height[0] = (static_cast(ClampedRandom(11)) + 15.0f) * static_cast(clockwise * 2 - 1); slot.height[1] = static_cast(ClampedRandom(200)); slot.height[2] = static_cast(ClampedRandom(31)) + 40.0f; slot.height[3] = static_cast(ClampedRandom(11)) * 0.1f + 1.0f; Get_Angle(this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &slot.riseAngle); slot.alphaB = 0; } } // OFFSET: 0x00C470D0 // FUNCTION: fn_20155 void CRagEffect::TexturedFlare(const char* name, char size, int, int) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 36, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = static_cast(size); this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 15.0f; this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].alphaB = static_cast(ClampedRandom(100)); this->state.lastPrim->state.slots[0].distance = 2.6f; this->state.lastPrim->state.slots[0].riseAngle = 80; for (int index = 0; index < 21; ++index) { this->state.lastPrim->state.slots[0].height[index] = 0.0f; this->state.lastPrim->state.slots[0].flag1[index] = 0; } } // OFFSET: 0x00C45200 // FUNCTION: fn_20148 void CRagEffect::TexturedHalo(const char* name, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 39, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; if (kind == 3) { this->state.lastPrim->state.slots[0].distance = 10.0f; this->state.lastPrim->state.slots[0].rotStart = 225; this->state.lastPrim->state.slots[0].alphaB = 250; this->state.lastPrim->state.size = 111.0f; } else if (kind == 4) { this->state.lastPrim->state.slots[0].distance = 12.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 200; this->state.lastPrim->state.size = 4.0f; } else if (kind == 10 || kind == 11 || kind == 12) { this->state.lastPrim->state.slots[0].distance = kind == 10 ? 30.0f : (kind == 11 ? 28.0f : 20.0f); this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 200; this->state.lastPrim->state.size = 10.0f; } else { this->state.lastPrim->state.slots[0].distance = kind == 2 ? 12.0f : 7.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 100; this->state.lastPrim->state.size = 5.0f; } this->state.lastPrim->state.slots[0].riseAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[0] = -2.0f; this->state.lastPrim->state.slots[0].height[4] = static_cast(kind); if (kind == 10 || kind == 11 || kind == 12) { this->state.lastPrim->state.slots[0].riseAngle = 360; } } // OFFSET: 0x00C642E0 // FUNCTION: fn_20260 void CRagEffect::TexturedSlashCross(const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt >= 5) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 126, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; RenderObjectState& primRender = this->state.lastPrim->render; primRender.position.x = this->render.position.x; primRender.position.y = this->render.position.y; primRender.position.z = this->render.position.z; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = index - 3; this->state.lastPrim->state.slots[index].distance = 20.0f; this->state.lastPrim->state.slots[index].alphaB = 0; switch (this->state.stateCnt) { case 0: this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; break; case 1: this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x + 5.0f; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; break; case 2: this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x - 5.0f; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; break; case 3: this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z + 5.0f; break; default: this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z - 5.0f; break; } this->state.lastPrim->state.slots[index].vecBNow.y = static_cast(ClampedRandom(5)) + (this->render.position.y - 10.0f); this->state.lastPrim->state.slots[index].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].riseAngle = static_cast(index); this->state.lastPrim->state.slots[index].height[1] = 1.5f; this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].flag1[3] = 1; } } // OFFSET: 0x00C65820 // FUNCTION: fn_20270 void CRagEffect::TexturedOrbit(const char* name) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 109, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1; this->state.lastPrim->state.renderFlag |= 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].distance = 2.5f; this->state.lastPrim->state.slots[0].height[10] = this->state.deltaPos[1]; this->state.lastPrim->state.slots[0].height[13] = 0.0f; this->state.lastPrim->state.slots[0].height[14] = 0.0f; this->state.lastPrim->state.slots[0].height[15] = 0.0f; this->state.lastPrim->state.slots[0].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].vecTNow.x = 0.0f; this->state.lastPrim->state.slots[0].vecBPre.x = -g_sinTable[90] * 30.0f; this->state.lastPrim->state.slots[0].vecBPre.y = -(g_sinTable[0] * 20.0f) - 40.0f; this->state.lastPrim->state.slots[0].vecBPre.z = 0.0f; } // OFFSET: 0x00C612D0 // FUNCTION: fn_20245 void CRagEffect::TexturedCross(const char* name, char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 41, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 5.0f; if (kind != 0) { return; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 200; this->state.lastPrim->state.slots[index].fullDisplayAngle = 360; this->state.lastPrim->state.slots[index].maxHeight = 120.0f; this->state.lastPrim->state.slots[index].rotStart = static_cast(index * 90); this->state.lastPrim->state.slots[index].alphaB = 40; this->state.lastPrim->state.slots[index].distance = static_cast(index) * 0.5f + 6.0f; this->state.lastPrim->state.slots[index].riseAngle = static_cast(83 - index); this->state.lastPrim->state.slots[index].alphaT = 1; this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } } } // OFFSET: 0x00C63D60 // FUNCTION: fn_20258 void CRagEffect::TexturedSlashLevel(const char* name, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 122, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; RenderObjectState& primRender = this->state.lastPrim->render; primRender.position.x = this->render.position.x; primRender.position.y = this->render.position.y; primRender.position.z = this->render.position.z; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; if (kind == 4 || kind == 5) { this->state.lastPrim->state.slots[index].distance = 25.0f; this->state.lastPrim->state.slots[index].flag1[3] = 3; } else if (kind < 2) { this->state.lastPrim->state.slots[index].distance = 25.0f; this->state.lastPrim->state.slots[index].flag1[3] = 0; } else { this->state.lastPrim->state.slots[index].distance = 6.0f; this->state.lastPrim->state.slots[index].flag1[3] = 2; } this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y - 10.0f; this->state.lastPrim->state.slots[index].rotStart = 0; this->state.lastPrim->state.slots[index].riseAngle = static_cast(index); this->state.lastPrim->state.slots[index].height[1] = 2.0f; this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].flag1[1] = 0; if (kind == 0 || kind == 2 || kind == 4) { this->state.lastPrim->state.slots[index].flag1[2] = 0; this->state.lastPrim->state.slots[index].flag1[4] = kind == 2 ? 1 : 0; } else if (kind == 1 || kind == 3 || kind == 5) { this->state.lastPrim->state.slots[index].flag1[2] = 1; this->state.lastPrim->state.slots[index].flag1[4] = kind == 3 ? 1 : 0; } else { this->state.lastPrim->state.slots[index].flag1[4] = 0; } } } // OFFSET: 0x00C44940 // FUNCTION: fn_20144 void CRagEffect::SaintWing(const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 131, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].distance = 24.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].height[0] = 0.0f; this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[4] = 1; for (int i = 1; i < 21; ++i) { this->state.lastPrim->state.slots[0].height[i] = 0.0f; } } // OFFSET: 0x00C50E30 // FUNCTION: fn_20186 void CRagEffect::FirstAid() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( "_heal_effect.wav", this->render.position.x - player->render.position.x, 150.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); this->state.lastPrim = CreateEffectParticle(*this, this->render, 58, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\pikapika2.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].distance = 10.0f; this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].vecBNow.y = this->render.position.y - 12.0f; this->state.lastPrim->state.slots[0].height[6] = 0.02f; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[2] = 1; this->state.lastPrim->state.slots[0].height[8] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[3].alphaB = 0; } // OFFSET: 0x00C51D80 // FUNCTION: fn_20191 void CRagEffect::GRANDCROSS2(char flag) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 37, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1; this->state.lastPrim->state.renderFlag |= 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (flag == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_black.tga", 0, false, true, false); } this->state.lastPrim->state.size = 1.0f; for (int i = 0; i < 2; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].maxHeight = 60.0f; this->state.lastPrim->state.slots[i].rotStart = static_cast(i * 90); this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].height[0] = 24.0f; this->state.lastPrim->state.slots[i].height[1] = 3.2f; this->state.lastPrim->state.slots[i].height[2] = 0.0f; } this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C5B940 // FUNCTION: fn_20223 void CRagEffect::Magnum2(const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { this->state.flag = 0; } else if (this->state.stateCnt == 20) { PlayEffectWave(*this, "permeter_attack.wav"); } else if (this->state.stateCnt == 30) { PlayEffectWave(*this, "effect\\EF_MagnumBreak.wav"); } const int frame = this->state.stateCnt; const int elapsed = frame - 25; if (static_cast(elapsed) <= 30) { if (this->state.stateCnt % 3 == 0 && static_cast(++this->state.flag) < 11) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 73, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 5.0f; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 0; } const float maxHeight = 20.0f - static_cast(elapsed) * 0.7f; const float distance = static_cast(elapsed) * 0.2f + 5.0f; for (int i = 0; i < 2; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].fullDisplayAngle = 360; this->state.lastPrim->state.slots[i].maxHeight = maxHeight; this->state.lastPrim->state.slots[i].rotStart = static_cast(elapsed * 6 + i * 9); this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].distance = distance; this->state.lastPrim->state.slots[i].riseAngle = static_cast(((35 - i * 4) - static_cast(frame - 25)) * 2); this->state.lastPrim->state.slots[i].alphaT = static_cast(i); } } } } // OFFSET: 0x00C69350 // FUNCTION: fn_20288 void CRagEffect::TexturedCrossLevel(const char* name, char level) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 31, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.accel = 99.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].fullDisplayAngle = 360; this->state.lastPrim->state.slots[index].maxHeight = 25.0f; this->state.lastPrim->state.slots[index].rotStart = static_cast(index * 90); this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].distance = static_cast(index) + 1.0f; this->state.lastPrim->state.slots[index].riseAngle = 80; this->state.lastPrim->state.slots[index].alphaT = level; this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } } } // OFFSET: 0x00C51AA0 // FUNCTION: fn_20190 void CRagEffect::TexturedCrossFade(const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 113, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 4.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].fullDisplayAngle = 315; this->state.lastPrim->state.slots[index].maxHeight = 15.0f; this->state.lastPrim->state.slots[index].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].distance = 20.0f - static_cast(index) * 0.5f; this->state.lastPrim->state.slots[index].riseAngle = 50; this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } } } // OFFSET: 0x00C5D540 // FUNCTION: fn_20234 void CRagEffect::TexturedRain(const char* name, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 87, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; if (kind == 0) { this->state.lastPrim->state.slots[0].distance = 12.0f; } else if (kind == 4) { this->state.lastPrim->state.slots[0].distance = 14.0f; } else { this->state.lastPrim->state.slots[0].distance = 8.0f; } this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].vecBPre.x = 0.0f; this->state.lastPrim->state.slots[0].vecBPre.z = 0.0f; if (kind == 0) { this->state.lastPrim->state.slots[0].vecBPre.y = -115.0f; } else if (kind == 4) { this->state.lastPrim->state.slots[0].vecBPre.y = -115.0f - static_cast(rand() % 56); } else { this->state.lastPrim->state.slots[0].vecBPre.y = -80.0f; } this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].height[1] = 3.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[2] = 7; if (kind == 1) { this->state.lastPrim->state.slots[0].flag1[2] = 9; this->state.lastPrim->state.slots[0].flag1[3] = 1; } else if (kind == 2) { this->state.lastPrim->state.slots[0].flag1[2] = 9; this->state.lastPrim->state.slots[0].flag1[3] = 3; } else if (kind == 3) { this->state.lastPrim->state.slots[0].flag1[2] = 9; this->state.lastPrim->state.slots[0].flag1[3] = 4; } this->state.lastPrim->state.slots[0].flag1[4] = kind; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].alphaB = 0; } // OFFSET: 0x00C65540 // FUNCTION: fn_20269 void CRagEffect::SonicWave(char sonic) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 86, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = sonic != 1 ? 1 : 4; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (sonic == 1) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\sonic_wave1.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\sonic_wave2.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\sonic_wave3.tga", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\sonic_wave4.tga", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\purpleslash.tga", 0, false, true, false); } this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; RenderObjectState& primRender = this->state.lastPrim->render; primRender.position.x = this->render.position.x; primRender.position.y = this->render.position.y; primRender.position.z = this->render.position.z; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].process = index - 28; this->state.lastPrim->state.slots[index].distance = 20.0f; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[index].vecBNow.y = static_cast(ClampedRandom(5)) + (this->render.position.y - 10.0f); this->state.lastPrim->state.slots[index].rotStart = 0; this->state.lastPrim->state.slots[index].height[1] = 0.8f; this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].flag1[1] = sonic; } } // OFFSET: 0x00C5D0B0 // FUNCTION: fn_20232 void CRagEffect::ThunderSparks() { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\thunder_center.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; RenderObjectState& primRender = this->state.lastPrim->render; primRender.position.x = this->render.position.x; primRender.position.y = this->render.position.y; primRender.position.z = this->render.position.z; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = ClampedRandom(10) - 10; this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(16)) * 0.03f + 0.1f; this->state.lastPrim->state.slots[index].height[8] = 0.0f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].vecBNow.x = (static_cast(ClampedRandom(9)) + this->render.position.x) - 4.0f; this->state.lastPrim->state.slots[index].vecBNow.z = (static_cast(ClampedRandom(9)) + this->render.position.z) - 4.0f; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[index].rotStart = 0; this->state.lastPrim->state.slots[index].height[1] = static_cast(ClampedRandom(10)) * 0.01f; this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(40)) * 0.01f + 0.2f; this->state.lastPrim->state.slots[index].fullDisplayAngle = 0; this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].flag1[1] = 0; this->state.lastPrim->state.slots[index].flag1[2] = 10; this->state.lastPrim->state.slots[index].height[7] = 0.0f; } } // OFFSET: 0x00C69620 // FUNCTION: fn_20289 void CRagEffect::TexturedCrossKind(const char* name, char level) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 31, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; if (level == 3) { this->state.lastPrim->state.size = 17.0f; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].fullDisplayAngle = 360; if (level == 2) { this->state.lastPrim->state.slots[index].maxHeight = 15.0f; this->state.lastPrim->state.slots[index].riseAngle = 70; } else { this->state.lastPrim->state.slots[index].maxHeight = 25.0f; this->state.lastPrim->state.slots[index].riseAngle = 80; } this->state.lastPrim->state.slots[index].rotStart = static_cast(index * 90); this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].distance = static_cast(index) + 1.0f; this->state.lastPrim->state.slots[index].alphaT = level; this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } } } // OFFSET: 0x00C454C0 // FUNCTION: fn_20149 void CRagEffect::TexturedGlow(const char* name, char size) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 50, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = static_cast(size); this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 315; this->state.lastPrim->state.slots[0].maxHeight = static_cast(ClampedRandom(10)) + 25.0f; this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].alphaB = static_cast(50 - ClampedRandom(10)); this->state.lastPrim->state.slots[0].riseAngle = 90; this->state.lastPrim->state.slots[0].alphaT = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int index = 0; index < 21; ++index) { this->state.lastPrim->state.slots[0].height[index] = 0.0f; this->state.lastPrim->state.slots[0].flag1[index] = 0; } } // OFFSET: 0x00C5E240 // FUNCTION: fn_20238 void CRagEffect::TexturedScatterArc(const char* name, std::int16_t angle, std::int16_t phase) { if (static_cast(phase) == 0) { phase = 35; } else if (static_cast(phase) == 1) { phase = 0; } if (this->state.stateCnt != phase) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 94, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(11)) * 0.2f + 2.5f; this->state.lastPrim->state.slots[index].alphaB = 0; std::int16_t direction = static_cast(ClampedRandom(90) + angle); if (direction >= 360) { direction -= 360; } const float cosine = g_cosTable[direction]; const float sine = g_sinTable[direction]; this->state.lastPrim->state.slots[index].process = -ClampedRandom(11); this->state.lastPrim->state.slots[index].riseAngle = direction; this->state.lastPrim->state.slots[index].maxHeight = 0.03f; this->state.lastPrim->state.slots[index].vecBPre.x = cosine * 4.0f; this->state.lastPrim->state.slots[index].vecBPre.z = sine * 4.0f; this->state.lastPrim->state.slots[index].vecBPre.y = 0.0f; this->state.lastPrim->state.slots[index].vecBNow.y = -4.0f; this->state.lastPrim->state.slots[index].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[3] = static_cast(ClampedRandom(360)); } } // OFFSET: 0x00C6F190 // FUNCTION: fn_20307 void CRagEffect::LineStreak(std::int16_t kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0x201; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\line3y.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].distance = 100.0f; if (kind % 10 == 0) { this->state.lastPrim->state.slots[index].height[0] = -15.0f - static_cast(ClampedRandom(11)); } else if (kind % 10 == 1) { this->state.lastPrim->state.slots[index].height[0] = static_cast(ClampedRandom(11)) + 15.0f; } this->state.lastPrim->state.slots[index].height[1] = static_cast(ClampedRandom(200)); this->state.lastPrim->state.slots[index].maxHeight = static_cast(ClampedRandom(4)) * 0.1f + 0.3f; this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(31)) + 20.0f; this->state.lastPrim->state.slots[index].flag1[0] = static_cast(ClampedRandom(3) + 0); this->state.lastPrim->state.slots[index].height[3] = static_cast(ClampedRandom(21)) * 0.1f + 1.5f; Get_Angle( this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.lastPrim->state.slots[index].riseAngle ); this->state.lastPrim->state.slots[index].alphaB = 0; } } // OFFSET: 0x00C6EAF0 // FUNCTION: fn_20305 void CRagEffect::LineStreakKind(std::int16_t kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (kind < 10) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\line3.tga", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\line3y.tga", 0, false, true, false); } this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].distance = 100.0f; if (kind % 10 == 0) { this->state.lastPrim->state.slots[index].height[0] = -15.0f - static_cast(ClampedRandom(11)); } else if (kind % 10 == 1) { this->state.lastPrim->state.slots[index].height[0] = static_cast(ClampedRandom(11)) + 15.0f; } this->state.lastPrim->state.slots[index].height[1] = static_cast(ClampedRandom(200)); if (kind < 10) { this->state.lastPrim->state.slots[index].maxHeight = static_cast(ClampedRandom(4)) * 0.1f + 0.3f; this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(31)) + 20.0f; this->state.lastPrim->state.slots[index].flag1[0] = static_cast(ClampedRandom(3) + 30); this->state.lastPrim->state.slots[index].height[3] = static_cast(ClampedRandom(21)) * 0.1f + 1.5f; } Get_Angle( this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.lastPrim->state.slots[index].riseAngle ); this->state.lastPrim->state.slots[index].alphaB = 0; } } // OFFSET: 0x00C64FD0 // FUNCTION: fn_20266 void CRagEffect::TexturedShieldThrow(const char* name) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\cru_shield boomerang.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 42, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; const float deltaX = this->state.deltaPos[0] - this->render.position.x; const float deltaZ = this->state.deltaPos[2] - this->render.position.z; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].maxHeight = SquareRoot(deltaZ * deltaZ + deltaX * deltaX); this->state.lastPrim->state.slots[0].distance = 7.0f; this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 255; this->state.lastPrim->state.slots[0].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].vecBNow.y = this->render.position.y - 8.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].height[1] = 2.0f; this->state.lastPrim->state.slots[0].height[2] = (this->state.lastPrim->state.slots[0].height[1] / this->state.lastPrim->state.slots[0].maxHeight) * (this->state.deltaPos[1] - this->render.position.y); this->state.lastPrim->state.slots[0].fullDisplayAngle = 0; this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[1] = 0; this->state.lastPrim->state.slots[0].flag1[2] = 0; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].alphaB = 0; } // OFFSET: 0x00C5B580 // FUNCTION: fn_20221 void CRagEffect::TexturedCrossStaged(const char* name, char level) { if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 41, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); if (level < 2) { this->state.lastPrim->state.size = 4.0f; } else if (level == 2) { this->state.lastPrim->state.size = 7.0f; } else if (level == 3) { this->state.lastPrim->state.size = 6.0f; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = index * 30; this->state.lastPrim->state.slots[index].fullDisplayAngle = 360; this->state.lastPrim->state.slots[index].maxHeight = 120.0f; this->state.lastPrim->state.slots[index].rotStart = static_cast(index * 90); this->state.lastPrim->state.slots[index].alphaB = 50; this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; if (level == 0 || level > 1) { this->state.lastPrim->state.slots[index].alphaB = 50; this->state.lastPrim->state.slots[index].distance = static_cast(index) * 0.5f + 2.0f; } else { this->state.lastPrim->state.slots[index].alphaB = 70; this->state.lastPrim->state.slots[index].distance = static_cast(index) * 0.5f + 11.0f; } this->state.lastPrim->state.slots[index].alphaT = 0; this->state.lastPrim->state.slots[index].riseAngle = 89; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } } } // OFFSET: 0x00C4E3F0 // FUNCTION: fn_20177 void CRagEffect::ElectricArc(char kind, std::int16_t) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 102, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\elec1.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; const std::int16_t phase = kind; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].maxHeight = 0.1f; this->state.lastPrim->state.slots[index].alphaB = 0; Get_Angle( this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.lastPrim->state.slots[index].riseAngle ); this->state.lastPrim->state.slots[index].distance = 0.0f; this->state.lastPrim->state.slots[index].height[0] = static_cast(index < 2 ? index * 180 : index * 180 - 360); this->state.lastPrim->state.slots[index].vecTNow.x = static_cast(ClampedRandom(6)) * 0.01f + 0.2f; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[index].vecTNow.y = 20.0f; for (int height = 1; height < 21; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; } this->state.lastPrim->state.slots[index].alphaT = phase; } } // OFFSET: 0x00C63A10 // FUNCTION: fn_20257 void CRagEffect::BlueRingStack() { if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 121, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); this->state.lastPrim->state.size = 4.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; this->state.lastPrim->state.deltaPos2 = {this->state.deltaPos2[0], this->state.deltaPos2[1], this->state.deltaPos2[2]}; for (int index = 0; index < 4; ++index) { if (index == 3) { this->state.lastPrim->state.slots[3].life = 0; return; } const float step = static_cast(index); this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].fullDisplayAngle = 315; this->state.lastPrim->state.slots[index].maxHeight = 13.0f - (step + step); this->state.lastPrim->state.slots[index].rotStart = static_cast(index * 90); this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].distance = step * 0.2f + (this->state.deltaPos2[1] == 0.0f ? 3.4f : 2.4f); this->state.lastPrim->state.slots[index].riseAngle = static_cast((11 - index) * 5); this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } this->state.lastPrim->state.slots[index].alphaT = 99; } } // OFFSET: 0x00C58F80 // FUNCTION: fn_20210 void CRagEffect::WhiteSpray(char kind) { if (this->state.stateCnt != 0) { return; } const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; this->state.lastPrim = CreateEffectParticle(*this, this->render, 43, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (kind == 4) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\white03.bmp", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\white01.bmp", 0, false, true, false); } this->render.position.y -= 9.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].vecBNow.x = this->state.deltaPos[0]; this->state.lastPrim->state.slots[index].vecBNow.y = this->state.deltaPos[1]; this->state.lastPrim->state.slots[index].vecBNow.z = this->state.deltaPos[2]; if (kind == 2) { this->state.lastPrim->state.slots[index].process = ClampedRandom(26) * -2; this->state.lastPrim->state.slots[index].flag1[0] = 2; this->state.lastPrim->state.slots[index].height[1] = 2.5f; } else if (kind == 3) { this->state.lastPrim->state.slots[index].process = -70 - ClampedRandom(30); this->state.lastPrim->state.slots[index].flag1[0] = static_cast(rand() % 3 + 3); this->state.lastPrim->state.slots[index].height[1] = 4.0f; } else if (kind == 4) { this->state.lastPrim->state.slots[index].process = -30 - ClampedRandom(20); this->state.lastPrim->state.slots[index].flag1[0] = static_cast(rand() % 3 + 3); this->state.lastPrim->state.slots[index].height[1] = 3.0f; } else { this->state.lastPrim->state.slots[index].process = -70 - ClampedRandom(30); this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].height[1] = 3.5f; } this->state.lastPrim->state.slots[index].distance = 12.0f; this->state.lastPrim->state.slots[index].height[0] = 1.5f; this->state.lastPrim->state.slots[index].riseAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].alphaB = 0; } } // OFFSET: 0x00C5D810 // FUNCTION: fn_20235 void CRagEffect::TexturedComet(const char* name, char kind) { if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; const char* second; if (kind == 1) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\thunder_ball_0002.bmp", 0, false, true, false); second = "effect\\thunder_ball_0003.bmp"; } else { if (kind == 2) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\meteo_comet_b.bmp", 0, false, true, false); second = "effect\\meteo_comet_c.bmp"; } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); second = "effect\\pok3.tga"; } } this->state.lastPrim->state.textures[1] = g_texMgr.Load(second, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; RenderObjectState& primRender = this->state.lastPrim->render; primRender.position.x = this->render.position.x; primRender.position.y = this->render.position.y; primRender.position.z = this->render.position.z; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(10)) * 0.08f + 1.2f; this->state.lastPrim->state.slots[index].height[8] = 0.0f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].vecBNow.x = (static_cast(ClampedRandom(9)) + this->state.deltaPos[0]) - 4.0f; this->state.lastPrim->state.slots[index].vecBNow.z = (static_cast(ClampedRandom(9)) + this->state.deltaPos[2]) - 4.0f; this->state.lastPrim->state.slots[index].vecBNow.y = this->state.deltaPos[1] - 6.0f; this->state.lastPrim->state.slots[index].rotStart = 0; this->state.lastPrim->state.slots[index].height[1] = 0.0f; this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(20)) * 0.01f + 0.1f; this->state.lastPrim->state.slots[index].fullDisplayAngle = 0; this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].flag1[1] = 1; if (kind == 0) { this->state.lastPrim->state.slots[index].flag1[2] = 11; } else if (kind == 1) { this->state.lastPrim->state.slots[index].flag1[2] = 1; } else if (kind == 2) { this->state.lastPrim->state.slots[index].flag1[2] = 7; } this->state.lastPrim->state.slots[index].height[7] = 0.0f; } } // OFFSET: 0x00C5EC40 // FUNCTION: fn_20240 void CRagEffect::PokBurst() { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); this->render.position.x = player->render.position.x; this->render.position.y = player->render.position.y; this->render.position.z = player->render.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 52, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\pok3.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\pok2.tga", 0, false, true, false); this->render.position.x -= 15.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = -300 - ClampedRandom(50); this->state.lastPrim->state.slots[index].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].vecBNow = {this->render.position.x, this->render.position.y, this->render.position.z}; this->state.lastPrim->state.slots[index].vecTPre = {this->render.position.x, this->render.position.y, this->render.position.z}; this->state.lastPrim->state.slots[index].vecTNow = {this->render.position.x, this->render.position.y, this->render.position.z}; this->state.lastPrim->state.slots[index].vecBPre = {this->render.position.x, this->render.position.y, this->render.position.z}; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].maxHeight = 2.0f; this->state.lastPrim->state.slots[index].flag1[0] = static_cast(ClampedRandom(5)); this->state.lastPrim->state.slots[index].flag1[1] = 0; this->state.lastPrim->state.slots[index].flag1[3] = 0; this->state.lastPrim->state.slots[index].flag1[2] = static_cast(ClampedRandom(4) * 20); this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(100)) * 0.004f + 0.4f; this->state.lastPrim->state.slots[index].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].riseAngle = static_cast(ClampedRandom(360)); } } // OFFSET: 0x00C5DB70 // FUNCTION: fn_20236 void CRagEffect::TexturedTumble(const char* name, char) { const vector3d& origin = this->state.parent->render.position; this->render.position.x = origin.x; this->render.position.y = origin.y; this->render.position.z = origin.z; if (this->state.stateCnt != 30) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 115, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int slot = 0; slot < 4; ++slot) { this->state.lastPrim->state.slots[slot].life = 1; this->state.lastPrim->state.slots[slot].maxHeight = 1.0f; this->state.lastPrim->state.slots[slot].distance = static_cast(ClampedRandom(6)) * 0.1f + 2.5f; this->state.lastPrim->state.slots[slot].process = 0; this->state.lastPrim->state.slots[slot].vecBPre = {0.0f, 0.0f, 0.0f}; this->state.lastPrim->state.slots[slot].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[slot].height[2] = static_cast(ClampedRandom(180)); this->state.lastPrim->state.slots[slot].height[12] = 230.0f; this->state.lastPrim->state.slots[slot].vecBNow = {0.0f, 0.0f, 0.0f}; this->state.lastPrim->state.slots[slot].height[4] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[slot].height[6] = static_cast(ClampedRandom(180)); this->state.lastPrim->state.slots[slot].height[13] = 230.0f; this->state.lastPrim->state.slots[slot].vecTPre = {0.0f, 0.0f, 0.0f}; this->state.lastPrim->state.slots[slot].height[8] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[slot].height[10] = static_cast(ClampedRandom(180)); this->state.lastPrim->state.slots[slot].height[14] = 230.0f; this->state.lastPrim->state.slots[slot].height[15] = static_cast(ClampedRandom(3) + 1); } } // OFFSET: 0x00C6EE30 // FUNCTION: fn_20306 void CRagEffect::LineStreakTextured(std::int16_t kind, const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0x201; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; const int mode = kind % 10; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].distance = 100.0f; if (mode == 0) { this->state.lastPrim->state.slots[index].height[0] = -15.0f - static_cast(std::max(0, rand() % 11)); } else if (mode == 1) { this->state.lastPrim->state.slots[index].height[0] = static_cast(std::max(0, rand() % 11)) + 15.0f; } this->state.lastPrim->state.slots[index].height[1] = static_cast(std::max(0, rand() % 200)); this->state.lastPrim->state.slots[index].maxHeight = static_cast(std::max(0, rand() % 6)) * 0.1f + 0.5f; this->state.lastPrim->state.slots[index].height[2] = static_cast(std::max(0, rand() % 31)) + 40.0f; this->state.lastPrim->state.slots[index].flag1[0] = static_cast(std::max(0, rand() % 3) + 10); this->state.lastPrim->state.slots[index].height[3] = static_cast(std::max(0, rand() % 11)) * 0.1f + 1.0f; if (static_cast(kind - 20) < 10) { this->state.lastPrim->state.slots[index].flag1[0] = static_cast(std::max(0, rand() % 3) + 33); } else if (static_cast(kind - 30) < 10) { this->state.lastPrim->state.slots[index].flag1[0] = static_cast(std::max(0, rand() % 3) + 36); } Get_Angle( this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.lastPrim->state.slots[index].riseAngle ); this->state.lastPrim->state.slots[index].alphaB = 0; } } // OFFSET: 0x00C6FC10 // FUNCTION: fn_20310 void CRagEffect::ThunderFreeze(int) { const vector3d& origin = this->state.parent->render.position; this->render.position.x = origin.x; this->render.position.y = origin.y; this->render.position.z = origin.z; if (this->state.stateCnt != 0) { return; } int total = static_cast(this->state.deltaPos[0]); if (total > 5) { total = 5; } else if (total <= 0) { return; } const vector3d offset = {0.0f, 0.0f, 0.0f}; for (int bolt = 0; bolt < total; ++bolt) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 145, offset.x, offset.y, offset.z, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[4] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[5] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[6] = static_cast(bolt * 360) / this->state.deltaPos[0]; this->state.lastPrim->state.slots[0].height[7] = -15.0f; this->state.lastPrim->state.slots[0].distance = 1.0f; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].flag1[0] = 1; this->state.lastPrim->state.slots[0].height[8] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.totalTexture = 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\thunder_center.bmp", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\freeze_a.bmp", 0, false, true, false); for (int slot = 0; slot < 4; ++slot) { this->state.lastPrim->state.slots[slot].process = -20 * slot; this->state.lastPrim->state.slots[slot].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[slot].maxHeight = 3.0f; this->state.lastPrim->state.slots[slot].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[slot].riseAngle = 200; } } } // OFFSET: 0x00C4A220 // FUNCTION: fn_20168 void CRagEffect::WeddingBurst(const char* name, char silent) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } if (silent == 0) { PlayEffectWave(*this, "effect\\wedding.wav"); } this->state.lastPrim = CreateEffectParticle(*this, this->render, 78, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].maxHeight = static_cast(ClampedRandom(31)) * 0.01f + 0.3f; this->state.lastPrim->state.slots[index].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].riseAngle = static_cast(index * 45); this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].vecBNow.x = static_cast(ClampedRandom(101) - 50); this->state.lastPrim->state.slots[index].vecBNow.y = static_cast(-110 - ClampedRandom(50)); this->state.lastPrim->state.slots[index].vecBNow.z = static_cast(ClampedRandom(101) - 50); this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(26)) * 0.01f + 0.25f; this->state.lastPrim->state.slots[index].fullDisplayAngle = 0; } } // OFFSET: 0x00C5C6B0 // FUNCTION: fn_20228 void CRagEffect::TexturedOrbitDust(const char* name, char rise, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 27, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; const float lift = -static_cast(rise * 2); for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].maxHeight = 0.15f; this->state.lastPrim->state.slots[index].distance = 1.0f; this->state.lastPrim->state.slots[index].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].vecBPre = {0.0f, lift, 0.0f}; this->state.lastPrim->state.slots[index].height[4] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].vecBNow = {0.0f, lift, 0.0f}; this->state.lastPrim->state.slots[index].height[5] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].vecTPre = {0.0f, lift, 0.0f}; this->state.lastPrim->state.slots[index].height[6] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].vecTNow = {0.0f, lift, 0.0f}; this->state.lastPrim->state.slots[index].height[7] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].flag1[0] = 1; this->state.lastPrim->state.slots[index].flag1[1] = kind == 2 ? 2 : 0; } } // OFFSET: 0x00C74BD0 // FUNCTION: fn_20335 void CRagEffect::TexturedTwinSpin(const char* name, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 161, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1; this->state.lastPrim->state.renderFlag |= 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); if (kind == 1) { this->state.lastPrim->state.size = 15.0f; } else if (kind == 2) { this->state.lastPrim->state.size = 17.0f; } else if (kind == 3) { this->state.lastPrim->state.size = 18.0f; } else { this->state.lastPrim->state.size = 4.0f; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].distance = kind == 3 ? 24.0f : 15.0f; this->state.lastPrim->state.slots[1].distance = this->state.lastPrim->state.slots[0].distance; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[0].riseAngle = 0; this->state.lastPrim->state.slots[1].riseAngle = 180; this->state.lastPrim->state.slots[0].alphaB = 200; this->state.lastPrim->state.slots[1].alphaB = 200; this->state.lastPrim->state.slots[0].height[0] = -1.0f; this->state.lastPrim->state.slots[1].height[0] = -1.0f; } // OFFSET: 0x00C74DF0 // FUNCTION: fn_20336 void CRagEffect::TexturedScatterSphere(const char* name, char flag, int) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } CEffectPrim* particle = CreateEffectParticle(*this, this->render, 159, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.currentPrimitive = reinterpret_cast(particle); auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(particle->state); stored()->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int index = 0; index < 4; ++index) { stored()->state.slots[index].life = 1; stored()->state.slots[index].height[4] = 0.0f; stored()->state.slots[index].process = -rand() % 101; stored()->state.slots[index].distance = 4.0f; stored()->state.slots[index].alphaB = 0; stored()->state.slots[index].riseAngle = static_cast(ClampedRandom(360)); stored()->state.slots[index].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[index].height[0] = -5.0f; stored()->state.slots[index].height[1] = 0.5f; stored()->state.slots[index].flag1[0] = 0; stored()->state.slots[index].flag1[1] = 0; stored()->state.slots[index].flag1[2] = flag; EffectPrimitiveSlot& slot = stored()->state.slots[index]; const float radius = g_cosTable[slot.riseAngle] * 70.0f; slot.vecBNow.z = g_sinTable[slot.riseAngle] * 70.0f; slot.vecBNow.x = radius * g_cosTable[slot.rotStart]; slot.vecBNow.y = radius * g_sinTable[slot.rotStart] + slot.height[0]; } } // OFFSET: 0x00C77B80 // FUNCTION: fn_20347 void CRagEffect::DigitalSpace(int effectId) { if (this->state.parent) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; } if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 168, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; if (effectId == 1240) { this->state.lastPrim->SetSpriteName("이팩트\\digital_space\\digital_space.spr"); this->state.lastPrim->SetActionName("이팩트\\digital_space\\digital_space.act"); this->state.lastPrim->render.previousAnimation = 0; this->state.lastPrim->state.repeatAnim = 1; this->state.lastPrim->state.animSpeed = 8; this->state.lastPrim->state.renderFlag = 0x209; this->state.lastPrim->state.pattern |= 0x200; } } if (this->state.parent && this->state.currentPrimitive) { this->state.lastPrim->state.spriteLiftLow = this->state.parent->render.hoverOffsetLow; this->state.lastPrim->state.spriteLiftHigh = this->state.parent->render.hoverOffsetHigh; } if (this->state.parent && this->state.currentPrimitive) { this->state.lastPrim->state.alpha = static_cast(this->state.parent->render.translucentOther[0] ? 70 : 255); } if (this->state.stateCnt == this->state.duration - 1) { this->state.stateCnt = 0; this->state.lastPrim->state.stateCnt = 0; } } // OFFSET: 0x00C75AC0 // FUNCTION: fn_20339 void CRagEffect::TexturedFloatingDust(const char* name, int) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt >= 1000 || this->state.stateCnt % 10 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 157, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].maxHeight = static_cast(ClampedRandom(51)) * 0.01f + 2.5f; this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(31)) * 0.1f + 7.0f; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].fullDisplayAngle = static_cast(rand() % 360); this->state.lastPrim->state.slots[index].height[0] = static_cast(rand() % 33); this->state.lastPrim->state.slots[index].vecBNow.y = static_cast(rand() % 21 - 80); this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].flag1[0] = static_cast(rand() % 3); } } // OFFSET: 0x00C77D00 // FUNCTION: fn_20348 void CRagEffect::Mavka(char flag) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt >= 10) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 152, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.size = 0.3f; this->state.lastPrim->state.slots[index].vecBPre.x = 0.0f; this->state.lastPrim->state.slots[index].vecBPre.y = 0.0f; this->state.lastPrim->state.slots[index].vecBNow.x = 0.0f; this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[index].vecTPre.x = 0.0f; this->state.lastPrim->state.slots[index].vecTPre.y = 0.0f; this->state.lastPrim->state.slots[index].rotStart = 0; this->state.lastPrim->state.slots[index].riseAngle = 0; this->state.lastPrim->state.slots[index].distance = 2.0f; for (int height = 0; height < 6; ++height) { this->state.lastPrim->state.slots[index].height[height] = static_cast(rand() % 360); } for (int height = 6; height < 12; ++height) { this->state.lastPrim->state.slots[index].height[height] = static_cast(rand() % 360); } this->state.lastPrim->state.slots[index].flag1[0] = flag; } this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->SetSpriteName("몬스터\\mavka.spr"); this->state.lastPrim->SetActionName("몬스터\\mavka.act"); this->state.lastPrim->state.animSpeed = 8; this->state.lastPrim->state.renderFlag |= 0x200; this->state.lastPrim->SetAction(0, 16, 1); this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C77600 // FUNCTION: fn_20345 void CRagEffect::TexturedFanSweep(const char* name, char wide) { if (this->state.stateCnt != 0 && this->state.stateCnt != 20 && this->state.stateCnt != 40) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 146, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = index * -8; this->state.lastPrim->state.slots[index].maxHeight = wide ? 20.0f : 30.0f; Get_Angle( this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.lastPrim->state.slots[index].rotStart ); this->state.lastPrim->state.slots[index].fullDisplayAngle = 315; this->state.lastPrim->state.slots[index].rotStart += 195; if (this->state.lastPrim->state.slots[index].rotStart >= 360) { this->state.lastPrim->state.slots[index].rotStart -= 360; } this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].distance = (wide ? 9.0f : 6.0f) - static_cast(index) * 0.1f; this->state.lastPrim->state.slots[index].riseAngle = static_cast((14 - index) * 5); this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[index].vecTNow.x = 0.0f; this->state.lastPrim->state.slots[index].vecTNow.z = 0.0f; this->state.lastPrim->state.slots[index].vecTPre.x = 0.0f; } } // OFFSET: 0x00C740E0 // FUNCTION: fn_20331 void CRagEffect::BubbleFanSweep(const char*, char rising) { char name[64]; if (this->state.stateCnt != 0) { return; } const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; this->state.lastPrim = CreateEffectParticle(*this, this->render, 146, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 13; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; for (int number = 2, index = 0; number < 28; number += 2, ++index) { std::sprintf(name, "effect\\W_bubble%02d.tga", number); this->state.lastPrim->state.textures[index] = g_texMgr.Load(name, 0, false, true, false); } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = index * -8; this->state.lastPrim->state.slots[index].maxHeight = 30.0f; Get_Angle( this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.lastPrim->state.slots[index].rotStart ); this->state.lastPrim->state.slots[index].fullDisplayAngle = 315; this->state.lastPrim->state.slots[index].rotStart += 195; if (this->state.lastPrim->state.slots[index].rotStart >= 360) { this->state.lastPrim->state.slots[index].rotStart -= 360; } this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].distance = 3.0f - static_cast(index) * 0.1f; this->state.lastPrim->state.slots[index].riseAngle = static_cast((14 - index) * 5); this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[index].vecTNow.x = 0.0f; this->state.lastPrim->state.slots[index].vecTNow.z = 0.0f; this->state.lastPrim->state.slots[index].vecTPre.x = rising == 1 ? 7.0f : 0.0f; } } // OFFSET: 0x00C76820 // FUNCTION: fn_20342 void CRagEffect::TexturedDoubleSpiral(const char* name, int, int) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt >= 2) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 166, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].distance = 6.0f; this->state.lastPrim->state.slots[index].alphaB = 205; this->state.lastPrim->state.slots[index].riseAngle = static_cast((this->state.stateCnt * 4 + index) * 45); this->state.lastPrim->state.slots[index].rotStart = 0; this->state.lastPrim->state.slots[index].height[0] = -5.0f; this->state.lastPrim->state.slots[index].height[1] = 0.0f; this->state.lastPrim->state.slots[index].height[9] = 0.0f; this->state.lastPrim->state.slots[index].height[2] = 0.01f; this->state.lastPrim->state.slots[index].height[3] = 0.0f; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 166, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].distance = 10.5f; this->state.lastPrim->state.slots[index].alphaB = 255; this->state.lastPrim->state.slots[index].riseAngle = static_cast((this->state.stateCnt * 4 + index) * 45); this->state.lastPrim->state.slots[index].rotStart = 0; this->state.lastPrim->state.slots[index].height[0] = -5.0f; this->state.lastPrim->state.slots[index].height[1] = 0.0f; this->state.lastPrim->state.slots[index].height[9] = 0.0f; this->state.lastPrim->state.slots[index].height[2] = 0.015f; this->state.lastPrim->state.slots[index].height[3] = 1.0f; } } // OFFSET: 0x00C77260 // FUNCTION: fn_20344 void CRagEffect::SnowFall(const char*, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (static_cast(this->state.stateCnt) > 100 || this->state.stateCnt % 8 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\E9_snow03.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\E9_snow02.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->render.position.x = this->render.position.x; this->state.lastPrim->render.position.y = this->render.position.y; this->state.lastPrim->render.position.z = this->render.position.z; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(6)) * 0.1f + 1.5f; this->state.lastPrim->state.slots[index].height[8] = 0.0f; this->state.lastPrim->state.slots[index].alphaB = 0; const int radius = ClampedRandom(41); const std::int16_t angle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[index].vecBNow.x += static_cast(radius) * g_cosTable[angle]; this->state.lastPrim->state.slots[index].vecBNow.z += static_cast(radius) * g_sinTable[angle]; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y - 6.0f - static_cast(ClampedRandom(31)); this->state.lastPrim->state.slots[index].rotStart = 0; this->state.lastPrim->state.slots[index].height[1] = 0.0f; this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(20)) * 0.01f + 0.1f; this->state.lastPrim->state.slots[index].fullDisplayAngle = 0; this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].flag1[1] = 1; if (kind == 0) { this->state.lastPrim->state.slots[index].flag1[2] = 11; } else if (kind == 1) { this->state.lastPrim->state.slots[index].flag1[2] = 1; } else if (kind == 2) { this->state.lastPrim->state.slots[index].flag1[2] = 1; } else if (kind == 3) { this->state.lastPrim->state.slots[index].flag1[2] = 13; } this->state.lastPrim->state.slots[index].height[7] = 0.0f; } } // OFFSET: 0x00C74750 // FUNCTION: fn_20333 void CRagEffect::ElectricFan(const char*, std::int16_t fade) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 135, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\elec1.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].maxHeight = 0.1f; if (index == 0) { this->state.lastPrim->state.slots[0].alphaB = 250; } else { this->state.lastPrim->state.slots[index].alphaB = static_cast(140 - index * 30); } this->state.lastPrim->state.slots[index].riseAngle = static_cast(this->state.parent->render.angle - 90.0f); if (this->state.lastPrim->state.slots[index].riseAngle < 0) { this->state.lastPrim->state.slots[index].riseAngle += 360; } this->state.lastPrim->state.slots[index].distance = 20.0f; this->state.lastPrim->state.slots[index].height[0] = 0.0f; this->state.lastPrim->state.slots[index].vecTNow.x = static_cast(ClampedRandom(11)) * 0.01f + 0.0f; CopyVector(this->state.lastPrim->state.slots[index].vecBNow, this->render.position); this->state.lastPrim->state.slots[index].vecBNow.y -= 10.0f; this->state.lastPrim->state.slots[index].vecTNow.y = 20.0f; for (int step = 20; step > 0; --step) { this->state.lastPrim->state.slots[index].height[step] = 0.0f; this->state.lastPrim->state.slots[index].flag1[step] = 0; } this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].alphaT = fade; this->state.lastPrim->state.slots[index].fullDisplayAngle = 0; } } // OFFSET: 0x00C778B0 // FUNCTION: fn_20346 void CRagEffect::TexturedTumbleOrb(const char* name, char flag) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 151, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1; this->state.lastPrim->state.renderFlag |= 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].distance = 2.5f; this->state.lastPrim->state.slots[0].height[10] = this->state.deltaPos[1]; this->state.lastPrim->state.slots[0].height[13] = 0.0f; this->state.lastPrim->state.slots[0].height[14] = 0.0f; this->state.lastPrim->state.slots[0].height[15] = 0.0f; this->state.lastPrim->state.slots[0].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].vecTNow.x = 5.0f; this->state.lastPrim->state.slots[0].vecBPre.x = -g_sinTable[90] * 30.0f; this->state.lastPrim->state.slots[0].vecBPre.y = -(g_sinTable[0] * 20.0f) - 40.0f; this->state.lastPrim->state.slots[0].vecBPre.z = 0.0f; this->state.lastPrim->state.slots[0].flag1[0] = flag; } // OFFSET: 0x00C755E0 // FUNCTION: fn_20338 void CRagEffect::TexturedSpread(const char* name, char kind) { if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 137, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); if (kind < 2) { this->state.lastPrim->state.size = 4.0f; } else if (kind == 2) { this->state.lastPrim->state.size = 7.0f; } else if (kind == 3) { this->state.lastPrim->state.size = 6.0f; } else if (kind == 10) { this->state.lastPrim->state.size = static_cast(rand() % 5 + 4); } else if (kind == 11) { this->state.lastPrim->state.size = 5.0f; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].fullDisplayAngle = 360; this->state.lastPrim->state.slots[index].rotStart = static_cast(index * 90); float radius; if (kind == 11) { this->state.lastPrim->state.slots[index].alphaB = 50; this->state.lastPrim->state.slots[index].maxHeight = static_cast(index * 20) + 60.0f; this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[index].process = rand() % 40 + 60; radius = static_cast(rand() % 31) * 0.1f + 6.0f; } else { this->state.lastPrim->state.slots[index].alphaB = 150; this->state.lastPrim->state.slots[index].maxHeight = 120.0f; this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; if (kind == 10) { this->state.lastPrim->state.slots[index].process = rand() % 100; radius = static_cast(rand() % 41); } else { this->state.lastPrim->state.slots[index].process = rand() % 40 + 60; radius = 5.0f; } } const std::int16_t angle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].vecBNow.x = radius * g_cosTable[angle]; this->state.lastPrim->state.slots[index].vecBNow.z = radius * g_sinTable[angle]; this->state.lastPrim->state.slots[index].distance = static_cast(rand() % 11) * 0.015f + 0.15f; this->state.lastPrim->state.slots[index].alphaT = 0; this->state.lastPrim->state.slots[index].riseAngle = 90; for (int step = 0; step < 21; ++step) { this->state.lastPrim->state.slots[index].height[step] = 0.0f; this->state.lastPrim->state.slots[index].flag1[step] = 0; } this->state.lastPrim->state.slots[index].vecTPre.x = this->state.deltaPos[0] - this->render.position.x; this->state.lastPrim->state.slots[index].vecTPre.y = this->state.deltaPos[1] - this->render.position.y; this->state.lastPrim->state.slots[index].vecTPre.z = this->state.deltaPos[2] - this->render.position.z; } } // OFFSET: 0x00C75D20 // FUNCTION: fn_20340 void CRagEffect::WhiteRingRipple(char size) { if (this->state.stateCnt % 100 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 63, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_white.tga", 0, false, true, false); if (size == 1) { this->state.lastPrim->state.size = 8.0f; } else if (size == 2) { this->state.lastPrim->state.size = 6.0f; } else { this->state.lastPrim->state.size = 4.0f; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 6.001f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 0.0f; this->state.lastPrim->state.slots[0].riseAngle = 2; this->state.lastPrim->state.slots[0].alphaT = 100; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int step = 0; step < 21; ++step) { this->state.lastPrim->state.slots[0].height[step] = 0.0f; this->state.lastPrim->state.slots[0].flag1[step] = 1; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = -10; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 6.001f; this->state.lastPrim->state.slots[1].rotStart = 25; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 0.0f; this->state.lastPrim->state.slots[1].riseAngle = 3; this->state.lastPrim->state.slots[1].alphaT = 100; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int step = 0; step < 21; ++step) { this->state.lastPrim->state.slots[1].height[step] = 0.0f; this->state.lastPrim->state.slots[1].flag1[step] = 1; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = -20; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 6.001f; this->state.lastPrim->state.slots[2].rotStart = 50; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 0.0f; this->state.lastPrim->state.slots[2].riseAngle = 4; this->state.lastPrim->state.slots[2].alphaT = 100; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int step = 0; step < 21; ++step) { this->state.lastPrim->state.slots[2].height[step] = 0.0f; this->state.lastPrim->state.slots[2].flag1[step] = 1; } this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].alphaT = 4; } // OFFSET: 0x00C762A0 // FUNCTION: fn_20341 void CRagEffect::WhiteRingRippleSized(char size) { if (this->state.stateCnt % 100 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 63, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_white.tga", 0, false, true, false); this->state.lastPrim->state.size = static_cast(size); this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 6.001f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 0.0f; this->state.lastPrim->state.slots[0].riseAngle = 2; this->state.lastPrim->state.slots[0].alphaT = 100; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int step = 0; step < 21; ++step) { this->state.lastPrim->state.slots[0].height[step] = 0.0f; this->state.lastPrim->state.slots[0].flag1[step] = 1; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = -10; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 6.001f; this->state.lastPrim->state.slots[1].rotStart = 25; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 0.0f; this->state.lastPrim->state.slots[1].riseAngle = 3; this->state.lastPrim->state.slots[1].alphaT = 100; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int step = 0; step < 21; ++step) { this->state.lastPrim->state.slots[1].height[step] = 0.0f; this->state.lastPrim->state.slots[1].flag1[step] = 1; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = -20; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 6.001f; this->state.lastPrim->state.slots[2].rotStart = 50; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 0.0f; this->state.lastPrim->state.slots[2].riseAngle = 4; this->state.lastPrim->state.slots[2].alphaT = 100; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int step = 0; step < 21; ++step) { this->state.lastPrim->state.slots[2].height[step] = 0.0f; this->state.lastPrim->state.slots[2].flag1[step] = 1; } this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].alphaT = size == 29 ? 5 : 1; } // OFFSET: 0x00C75050 // FUNCTION: fn_20337 void CRagEffect::TexturedSpreadFlat(const char* name, char kind) { if (this->state.stateCnt != 0) { return; } const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; this->state.lastPrim = CreateEffectParticle(*this, this->render, 137, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); if (kind < 2) { this->state.lastPrim->state.size = 4.0f; } else if (kind == 2) { this->state.lastPrim->state.size = 7.0f; } else if (kind == 3) { this->state.lastPrim->state.size = 6.0f; } else if (kind == 10) { this->state.lastPrim->state.size = static_cast(rand() % 5 + 4); } else if (kind == 11) { this->state.lastPrim->state.size = 5.0f; } else if (kind == 12) { const std::int16_t pick = static_cast(rand() % 3); if (pick == 0) { this->state.lastPrim->state.size = 4.0f; } else if (pick == 1) { this->state.lastPrim->state.size = 40.0f; } else { this->state.lastPrim->state.size = 41.0f; } } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].fullDisplayAngle = 360; this->state.lastPrim->state.slots[index].rotStart = static_cast(index * 90); float radius; if (kind == 11) { this->state.lastPrim->state.slots[index].alphaB = 50; this->state.lastPrim->state.slots[index].maxHeight = static_cast(index * 20) + 60.0f; this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[index].process = rand() % 40 + 60; radius = static_cast(rand() % 31) * 0.1f + 6.0f; } else if (kind == 12) { this->state.lastPrim->state.slots[index].alphaB = 130; this->state.lastPrim->state.slots[index].maxHeight = static_cast(index * 30) + 30.0f; this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[index].process = rand() % 50 + 50; radius = static_cast(rand() % 17); } else { this->state.lastPrim->state.slots[index].alphaB = 150; this->state.lastPrim->state.slots[index].maxHeight = 120.0f; this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; if (kind == 10) { this->state.lastPrim->state.slots[index].process = rand() % 100; radius = static_cast(rand() % 41); } else { this->state.lastPrim->state.slots[index].process = rand() % 40 + 60; radius = 5.0f; } } const std::int16_t angle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].vecBNow.x = radius * g_cosTable[angle]; this->state.lastPrim->state.slots[index].vecBNow.z = radius * g_sinTable[angle]; this->state.lastPrim->state.slots[index].distance = static_cast(rand() % 11) * 0.015f + 0.15f; this->state.lastPrim->state.slots[index].alphaT = 0; this->state.lastPrim->state.slots[index].riseAngle = 90; for (int step = 0; step < 21; ++step) { this->state.lastPrim->state.slots[index].height[step] = 0.0f; this->state.lastPrim->state.slots[index].flag1[step] = 0; } this->state.lastPrim->state.slots[index].vecTPre.x = 0.0f; this->state.lastPrim->state.slots[index].vecTPre.y = 0.0f; this->state.lastPrim->state.slots[index].vecTPre.z = 0.0f; } } // OFFSET: 0x00C74390 // FUNCTION: fn_20332 void CRagEffect::RisingSparkles(char colorMode) { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; g_renderer->viewport.Project(&this->state.parent->render.position.x, view, vertex); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if ((this->state.stateCnt & 1) != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 50; EffectPrimitiveState& particle = this->state.lastPrim->state; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); const float distance = static_cast(ClampedRandom(7) + 3); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, distance); this->state.lastPrim->state.deltaPos2.y -= 5.0f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(-90)); this->state.lastPrim->state.accel = -0.015f; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(60) + 30) / 10.0f; this->state.lastPrim->state.heightSize = 0.18f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; if (colorMode == 2) { this->state.lastPrim->state.red = rand() % 256; this->state.lastPrim->state.green = this->state.lastPrim->state.red; this->state.lastPrim->state.blue = 255; } else { this->state.lastPrim->state.red = 255; this->state.lastPrim->state.green = rand() % 256; this->state.lastPrim->state.blue = this->state.lastPrim->state.green; } this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 20.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } // OFFSET: 0x00C735B0 // FUNCTION: fn_20328 void CRagEffect::TexturedTripleOrbit(const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 16.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 74.0f; this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 1.3f; this->state.lastPrim->state.slots[0].riseAngle = 90; this->state.lastPrim->state.slots[0].alphaT = 3080; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[0].height[i] = 0.0f; this->state.lastPrim->state.slots[0].flag1[i] = 0; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 77.0f; this->state.lastPrim->state.slots[1].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 1.0f; this->state.lastPrim->state.slots[1].riseAngle = 90; this->state.lastPrim->state.slots[1].alphaT = 3080; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[1].height[i] = 0.0f; this->state.lastPrim->state.slots[1].flag1[i] = 0; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 80.0f; this->state.lastPrim->state.slots[2].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 0.7f; this->state.lastPrim->state.slots[2].riseAngle = 90; this->state.lastPrim->state.slots[2].alphaT = 3080; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[2].height[i] = 0.0f; this->state.lastPrim->state.slots[2].flag1[i] = 0; } this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C73BF0 // FUNCTION: fn_20330 void CRagEffect::TexturedRisingOrbs(const char* name, char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); if (kind == 0) { g_soundMgr->PlayWave( "_heal_effect.wav", this->render.position.x - player->render.position.x, -40.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } else if (kind == 1) { g_soundMgr->PlayWave( "effect\\흡기.wav", this->render.position.x - player->render.position.x, -80.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } } if (this->state.stateCnt > 20 || this->state.stateCnt % 4 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (kind == 2) { this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); name = "effect\\pok3.tga"; } this->state.lastPrim->state.textures[1] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; CopyVector(this->state.lastPrim->render.position, this->render.position); for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; if (kind == 2) { if (i < 2) { this->state.lastPrim->state.slots[i].distance = static_cast(ClampedRandom(11)) * 0.1f + 2.0f; } else { this->state.lastPrim->state.slots[i].life = 0; } this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(ClampedRandom(19)) + this->render.position.x - 9.0f; this->state.lastPrim->state.slots[i].vecBNow.z = static_cast(ClampedRandom(19)) + this->render.position.z - 9.0f; } else { this->state.lastPrim->state.slots[i].distance = static_cast(ClampedRandom(10)) * 0.1f + 1.5f; this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(ClampedRandom(7)) + this->render.position.x - 3.0f; this->state.lastPrim->state.slots[i].vecBNow.z = static_cast(ClampedRandom(7)) + this->render.position.z - 3.0f; } this->state.lastPrim->state.slots[i].height[8] = 0.0f; this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].vecBNow.y = this->render.position.y - 6.0f; this->state.lastPrim->state.slots[i].rotStart = 0; this->state.lastPrim->state.slots[i].height[1] = 0.0f; this->state.lastPrim->state.slots[i].height[2] = static_cast(ClampedRandom(20)) * 0.01f + 0.2f; this->state.lastPrim->state.slots[i].fullDisplayAngle = 0; this->state.lastPrim->state.slots[i].flag1[0] = 0; this->state.lastPrim->state.slots[i].flag1[1] = 1; if (kind == 0 || kind == 2) { this->state.lastPrim->state.slots[i].flag1[2] = 11; } else { this->state.lastPrim->state.slots[i].flag1[2] = kind == 3 ? 18 : 1; } this->state.lastPrim->state.slots[i].height[7] = 0.0f; } } // OFFSET: 0x00C76BE0 // FUNCTION: fn_20343 void CRagEffect::TexturedForkBolt(const char* name, char flag) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt >= 30 || this->state.stateCnt % 10 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 155, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 0; } const float x = this->render.position.x; const float z = this->render.position.z; const float y = this->render.position.y - 5.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].maxHeight = static_cast(ClampedRandom(21)) * 0.01f + 0.8f; this->state.lastPrim->state.slots[0].distance = static_cast(ClampedRandom(21)) * 0.1f + 3.0f; this->state.lastPrim->state.slots[0].process = 0; Get_Angle( this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.lastPrim->state.slots[0].riseAngle ); this->state.lastPrim->state.slots[0].vecBPre.x = x - this->render.position.x; this->state.lastPrim->state.slots[0].vecBPre.y = y - this->render.position.y; this->state.lastPrim->state.slots[0].vecBPre.z = z - this->render.position.z; this->state.lastPrim->state.slots[0].height[0] = static_cast(this->state.lastPrim->state.slots[0].riseAngle); this->state.lastPrim->state.slots[0].height[1] = static_cast(this->state.lastPrim->state.slots[0].riseAngle - 45 + rand() % 91); this->state.lastPrim->state.slots[0].height[2] = static_cast(this->state.lastPrim->state.slots[0].riseAngle - 45 + rand() % 91); this->state.lastPrim->state.slots[0].height[3] = 180.0f; this->state.lastPrim->state.slots[0].height[4] = 180.0f; this->state.lastPrim->state.slots[0].height[12] = 0.0f; this->state.lastPrim->state.slots[0].vecBNow.x = x - this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.y = y - this->render.position.y; this->state.lastPrim->state.slots[0].vecBNow.z = z - this->render.position.z; this->state.lastPrim->state.slots[0].height[5] = static_cast(this->state.lastPrim->state.slots[0].riseAngle); this->state.lastPrim->state.slots[0].height[6] = static_cast(this->state.lastPrim->state.slots[0].riseAngle - 45 + rand() % 91); this->state.lastPrim->state.slots[0].height[7] = static_cast(this->state.lastPrim->state.slots[0].riseAngle - 45 + rand() % 91); this->state.lastPrim->state.slots[0].height[8] = 180.0f; this->state.lastPrim->state.slots[0].height[9] = 180.0f; for (int i = 0; i < 10; ++i) { if (this->state.lastPrim->state.slots[0].height[i] < 0.0f) { this->state.lastPrim->state.slots[0].height[i] += 360.0f; } if (this->state.lastPrim->state.slots[0].height[i] >= 360.0f) { this->state.lastPrim->state.slots[0].height[i] -= 360.0f; } } this->state.lastPrim->state.slots[0].height[13] = 0.0f; this->state.lastPrim->state.slots[0].flag1[0] = flag; } // OFFSET: 0x00C77F50 // FUNCTION: fn_20349 void CRagEffect::MonsterSpriteBurst(char kind) { auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; int limit; if (kind == 13 || kind == 14) { limit = 30; } else if (kind < 9) { limit = kind >= 2 ? 10 : 50; } else { limit = 20; } if (this->state.stateCnt >= limit) { return; } this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 153, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.duration = this->state.duration - this->state.stateCnt; for (int i = 0; i < 4; ++i) { stored()->state.slots[i].life = 0; } stored()->state.slots[0].process = 0; stored()->state.slots[0].life = 1; std::int16_t angle; float radius = 24.0f; if (kind == 2) { stored()->state.size = 0.6f; angle = static_cast(this->state.stateCnt * 36); radius = 40.0f; } else if (kind == 13) { angle = static_cast(this->state.stateCnt * 12); const int ring = this->state.stateCnt % 3; if (ring == 0) { stored()->state.size = 0.9f; radius = 8.0f; } else if (ring == 1) { stored()->state.size = 1.0f; radius = 15.0f; } else { stored()->state.size = 1.1f; radius = 22.0f; } } else if (kind == 14) { angle = static_cast(this->state.stateCnt * 12); const int ring = this->state.stateCnt % 3; if (ring == 0) { stored()->state.size = 0.5f; radius = 8.0f; } else if (ring == 1) { stored()->state.size = 0.65f; radius = 14.0f; } else { stored()->state.size = 0.8f; radius = 20.0f; } } else if (kind == 15) { angle = static_cast(this->state.stateCnt * 18); if (this->state.stateCnt % 2 == 0) { radius = 4.0f; stored()->state.size = static_cast(rand() % 11) * 0.05f + 1.5f; } else { radius = 10.0f; stored()->state.size = static_cast(rand() % 11) * 0.05f + 2.0f; } } else if (kind == 9) { angle = static_cast(this->state.stateCnt * 18); if (this->state.stateCnt % 2 == 0) { stored()->state.size = 0.85f; radius = 12.0f; } else { stored()->state.size = 0.95f; } } else if (kind > 9) { angle = static_cast(this->state.stateCnt * 18); if (this->state.stateCnt % 2 == 0) { radius = 6.0f; stored()->state.size = static_cast(rand() % 11) * 0.03f + 0.4f; } else { radius = 12.0f; stored()->state.size = static_cast(rand() % 11) * 0.03f + 0.5f; } } else if (kind > 2) { stored()->state.size = 1.0f; angle = static_cast(this->state.stateCnt * 36); radius = 40.0f; } else { stored()->state.size = 0.7f; angle = static_cast(rand() % 360); radius = static_cast(rand() % 45 + 5); } Owner(&stored()->state).render.position = stored()->state.master->render.position; Owner(&stored()->state).render.position.x = radius * g_sinTable[angle] + Owner(&stored()->state).render.position.x; Owner(&stored()->state).render.position.z = radius * g_cosTable[angle] + Owner(&stored()->state).render.position.z; CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; Owner(&stored()->state).render.position.y = world->terrain->Height(Owner(&stored()->state).render.position.x, Owner(&stored()->state).render.position.z); if (kind == 5 || kind == 10) { stored()->state.slots[0].flag1[0] = 4; } else if (kind == 11) { stored()->state.slots[0].flag1[0] = 6; } else if (kind == 12 || kind == 14 || kind == 15) { stored()->state.slots[0].flag1[0] = 8; } else { stored()->state.slots[0].flag1[0] = kind; } stored()->state.slots[0].flag1[2] = kind == 15 ? 1 : 0; stored()->state.alpha = 0.0f; stored()->state.slots[1].flag1[1] = static_cast(rand() % 3); if (kind == 2) { Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\워그.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\워그.act"); stored()->state.animSpeed = rand() % 3 + 6; Owner(&stored()->state).SetAction(rand() % 8, 16, 1); } else if (kind == 3) { Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\violy.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\violy.act"); stored()->state.animSpeed = rand() % 3 + 6; Owner(&stored()->state).SetAction(rand() % 8, 16, 1); } else if (kind == 4) { stored()->state.animSpeed = rand() % 3 + 6; const std::int16_t pose = static_cast(rand() % 3); Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\succubus.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\succubus.act"); if (pose == 0) { Owner(&stored()->state).SetAction(rand() % 8 + 56, 16, 1); } else if (pose == 1) { Owner(&stored()->state).SetAction(rand() % 8 + 48, 16, 1); } else { Owner(&stored()->state).SetAction(rand() % 8 + 40, 16, 1); } } else if (kind == 5) { Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\mineral.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\mineral.act"); stored()->state.animSpeed = rand() % 3 + 6; Owner(&stored()->state).SetAction(rand() % 8, 16, 1); } else if (kind == 6) { Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\ktullanux.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\ktullanux.act"); stored()->state.animSpeed = rand() % 3 + 6; Owner(&stored()->state).SetAction(rand() % 8, 16, 1); } else if (kind == 7) { Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\garm.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\garm.act"); stored()->state.animSpeed = rand() % 3 + 6; Owner(&stored()->state).SetAction(rand() % 8, 16, 1); } else if (kind == 8) { Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\miyabi_ningyo.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\miyabi_ningyo.act"); stored()->state.animSpeed = rand() % 3 + 6; Owner(&stored()->state).SetAction(rand() % 8 + 48, 16, 1); } else if (kind == 9) { Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\garden_keeper.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\garden_keeper.act"); stored()->state.animSpeed = 4; Owner(&stored()->state).SetAction(rand() % 8 + 16, 16, 1); } else if (kind == 13) { Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\ginseng_bullet.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\ginseng_bullet.act"); stored()->state.animSpeed = 3; Owner(&stored()->state).SetAction(rand() % 8, 16, 1); } else if (kind == 14) { Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\nepenthes2_bullet.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\nepenthes2_bullet.act"); stored()->state.animSpeed = 4; Owner(&stored()->state).SetAction(0, 16, 1); } else if (kind == 15) { Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\imp.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\imp.act"); stored()->state.animSpeed = 4; Owner(&stored()->state).SetAction(rand() % 8, 16, 1); } else if (kind > 9) { Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\ifrit.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\ifrit.act"); stored()->state.animSpeed = 4; Owner(&stored()->state).SetAction(rand() % 8 + 32, 16, 1); } else { Owner(&stored()->state).SetSpriteName(ResourceMgr::Instance(), "몬스터\\geographer.spr"); Owner(&stored()->state).SetActionName(ResourceMgr::Instance(), "몬스터\\geographer.act"); stored()->state.animSpeed = 4; Owner(&stored()->state).SetAction(0, 16, 1); } Owner(&stored()->state).InitSegment(); } // OFFSET: 0x00C78A40 // FUNCTION: fn_20350 bool CRagEffect::AgilityChange(char increase, const std::string& textureName) { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; g_renderer->viewport.Project(&this->state.parent->render.position.x, view, vertex); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt == 0) { CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; const auto* player = reinterpret_cast(world->player); this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, world->objects); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(textureName.c_str(), 0, false, true, false); CTexture* texture = this->state.lastPrim->state.textures[0]; if (texture == nullptr) { return false; } this->state.lastPrim->state.widthSize = static_cast(texture->Width()) * 0.625f; this->state.lastPrim->state.heightSize = static_cast(this->state.lastPrim->state.textures[0]->Height()) * 0.625f; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.slots[0].life = 99; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 15.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 15; const char* sound; if (increase == 1) { this->state.lastPrim->state.speed = 1.5f; EffectPrimitiveState& rising = this->state.lastPrim->state; rising.accel = -(rising.speed / rising.duration) * 1.2f; sound = "effect\\EF_IncAgility.wav"; } else { this->state.lastPrim->state.deltaPos2.y -= 80.0f; this->state.lastPrim->state.longitude = 180.0f; this->state.lastPrim->state.speed = 1.0f; EffectPrimitiveState& falling = this->state.lastPrim->state; falling.accel = -(falling.speed / falling.duration); sound = "effect\\EF_DecAgility.wav"; } g_soundMgr->PlayWave( sound, this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } if ((this->state.stateCnt & 1) != 0) { return true; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); if (this->state.lastPrim->state.textures[0] == nullptr) { return false; } this->state.lastPrim->state.duration = 50; this->state.lastPrim->state.slots[0].life = 99; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 20.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(60) + 30) / 10.0f; this->state.lastPrim->state.heightSize = 0.18f; EffectPrimitiveState& particle = this->state.lastPrim->state; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); EffectPrimitiveState& moving = this->state.lastPrim->state; moving.deltaPos2 = RotatedForward(moving.transform, static_cast(ClampedRandom(7) + 2)); if (increase == 1) { reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(90)); this->state.lastPrim->state.speed = static_cast(ClampedRandom(50) + 20) / 100.0f; this->state.lastPrim->state.red = 0; this->state.lastPrim->state.green = 255; this->state.lastPrim->state.blue = 255; return true; } this->state.lastPrim->state.deltaPos2.y -= 20.0f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(-90)); this->state.lastPrim->state.accel = 0.015f; this->state.lastPrim->state.red = 255; this->state.lastPrim->state.green = 0; this->state.lastPrim->state.blue = 0; return true; } // OFFSET: 0x00C79130 // FUNCTION: fn_20351 void CRagEffect::TexturedDescendingRings(const char* name, char flag) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; this->state.lastPrim = CreateEffectParticle(*this, this->render, 141, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 0; } for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = i * -10; this->state.lastPrim->state.slots[i].distance = 20.0f; this->state.lastPrim->state.slots[i].flag1[2] = 2; if (i == 0) { this->state.lastPrim->state.slots[i].vecBPre.y = this->render.position.y - 30.0f; } else if (i == 1) { this->state.lastPrim->state.slots[i].vecBPre.y = this->render.position.y - 20.0f; } else if (i == 2) { this->state.lastPrim->state.slots[i].vecBPre.y = this->render.position.y - 10.0f; } else { this->state.lastPrim->state.slots[i].vecBPre.y = this->render.position.y - 0.0f; } this->state.lastPrim->state.slots[i].fullDisplayAngle = 215; this->state.lastPrim->state.slots[i].height[8] = 0.0f; this->state.lastPrim->state.slots[i].alphaB = 255; this->state.lastPrim->state.slots[i].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[i].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[i].rotStart = 0; this->state.lastPrim->state.slots[i].flag1[0] = 0; this->state.lastPrim->state.slots[i].flag1[4] = flag; } } // OFFSET: 0x00C79CD0 // FUNCTION: fn_20354 void CRagEffect::TexturedQuadSpiral(const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 31, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (long long i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].fullDisplayAngle = 360; this->state.lastPrim->state.slots[i].maxHeight = 25.0f; this->state.lastPrim->state.slots[i].riseAngle = 80; this->state.lastPrim->state.slots[i].rotStart = static_cast(i * 90); this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].alphaT = 5; this->state.lastPrim->state.slots[i].distance = static_cast(i) + 1.0f; this->state.lastPrim->state.slots[i].vecBNow.y = 0.0f; this->state.lastPrim->state.accel = 99.0f; for (long long j = 0; j < 21; ++j) { this->state.lastPrim->state.slots[i].height[j] = 0.0f; this->state.lastPrim->state.slots[i].flag1[j] = 0; } } } // OFFSET: 0x00C79F10 // FUNCTION: fn_20355 void CRagEffect::TexturedRisingPillar(const char* name, char) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 136, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; CopyVector(this->state.lastPrim->render.position, this->render.position); for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 0; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].distance = 1.0f; this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].height[1] = 0.0f; this->state.lastPrim->state.slots[0].height[2] = static_cast(ClampedRandom(20)) * 0.01f + 0.1f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 45; this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[1] = 1; this->state.lastPrim->state.slots[0].flag1[2] = 1; this->state.lastPrim->state.slots[0].height[7] = 0.0f; } // OFFSET: 0x00C793A0 // FUNCTION: fn_20352 void CRagEffect::CloudBurst() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt < 2) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos.x = this->state.deltaPos[0]; this->state.lastPrim->state.deltaPos.y = this->state.deltaPos[1]; this->state.lastPrim->state.deltaPos.z = this->state.deltaPos[2]; const float targetX = this->state.deltaPos[0]; const float x = this->render.position.x; const float targetZ = this->state.deltaPos[2]; const float z = this->render.position.z; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = -ClampedRandom(20); Get_Angle(targetX - x, targetZ - z, &this->state.lastPrim->state.slots[i].rotStart); this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(ClampedRandom(100)) * 0.06f - 3.0f + this->render.position.x; this->state.lastPrim->state.slots[i].vecBNow.z = static_cast(ClampedRandom(100)) * 0.06f - 3.0f + this->render.position.z; this->state.lastPrim->state.slots[i].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[i].height[1] = static_cast(ClampedRandom(100)) * 0.15f; this->state.lastPrim->state.slots[i].vecBNow.x -= g_cosTable[this->state.lastPrim->state.slots[i].rotStart] * this->state.lastPrim->state.slots[i].height[1]; this->state.lastPrim->state.slots[i].vecBNow.z -= g_sinTable[this->state.lastPrim->state.slots[i].rotStart] * this->state.lastPrim->state.slots[i].height[1]; this->state.lastPrim->state.slots[i].vecTNow.x = this->state.lastPrim->state.slots[i].vecBNow.x; this->state.lastPrim->state.slots[i].vecTNow.z = this->state.lastPrim->state.slots[i].vecBNow.z; this->state.lastPrim->state.slots[i].vecTNow.y = this->render.position.y; this->state.lastPrim->state.slots[i].maxHeight = 0.25f; this->state.lastPrim->state.slots[i].height[0] = static_cast(ClampedRandom(100)) * 0.04f + 8.0f; this->state.lastPrim->state.slots[i].distance = static_cast(ClampedRandom(100)) * 0.2f + 20.0f; this->state.lastPrim->state.slots[i].height[4] = 4.0f; } } if (this->state.stateCnt == 10) { PlayEffectWave(*this, "effect\\EF_hit2.wav"); } if (this->state.stateCnt == 20) { PlayEffectWave(*this, "effect\\EF_hit4.wav"); } } // OFFSET: 0x00C79820 // FUNCTION: fn_20353 void CRagEffect::CloudSpread() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt < 2) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos.x = this->state.deltaPos[0]; this->state.lastPrim->state.deltaPos.y = this->state.deltaPos[1]; this->state.lastPrim->state.deltaPos.z = this->state.deltaPos[2]; const float dx = this->state.deltaPos[0] - this->render.position.x; const float dz = this->state.deltaPos[2] - this->render.position.z; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = -ClampedRandom(20); Get_Angle(dx, dz, &this->state.lastPrim->state.slots[i].rotStart); this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(ClampedRandom(100)) * 0.3f - 15.0f + this->render.position.x; this->state.lastPrim->state.slots[i].vecBNow.z = static_cast(ClampedRandom(100)) * 0.3f - 15.0f + this->render.position.z; this->state.lastPrim->state.slots[i].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[i].height[1] = 100.0f; this->state.lastPrim->state.slots[i].vecBNow.x -= g_cosTable[this->state.lastPrim->state.slots[i].rotStart] * this->state.lastPrim->state.slots[i].height[1]; this->state.lastPrim->state.slots[i].vecBNow.z -= g_sinTable[this->state.lastPrim->state.slots[i].rotStart] * this->state.lastPrim->state.slots[i].height[1]; this->state.lastPrim->state.slots[i].vecTNow.x = this->state.lastPrim->state.slots[i].vecBNow.x; this->state.lastPrim->state.slots[i].vecTNow.z = this->state.lastPrim->state.slots[i].vecBNow.z; this->state.lastPrim->state.slots[i].vecTNow.y = this->render.position.y; this->state.lastPrim->state.slots[i].maxHeight = 0.25f; this->state.lastPrim->state.slots[i].height[0] = static_cast(ClampedRandom(100)) * 0.04f + 8.0f; this->state.lastPrim->state.slots[i].distance = static_cast(ClampedRandom(100)) * 0.5f + 100.0f; this->state.lastPrim->state.slots[i].height[4] = 5.0f; } } if (this->state.stateCnt == 10) { PlayEffectWave(*this, "effect\\EF_hit2.wav"); } if (this->state.stateCnt == 20) { PlayEffectWave(*this, "effect\\EF_hit4.wav"); } } // OFFSET: 0x00C7A170 // FUNCTION: fn_20356 void CRagEffect::FrostSplash(int, int) { if (this->state.stateCnt != 0) { return; } const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; CEffectPrim* particle = CreateEffectParticle(*this, this->render, 150, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.currentPrimitive = reinterpret_cast(particle); auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; stored()->state.totalTexture = 1; AllocateTextures(stored()->state); CTexture* texture; bool water; if (ClampedRandom(10) > 0) { texture = g_texMgr.Load("effect\\freeze_a_small.bmp", 0, false, true, false); water = false; } else { texture = g_texMgr.Load("effect\\waterp1.tga", 0, false, true, false); water = true; } stored()->state.textures[0] = texture; stored()->state.size = 4.0f; for (int i = 0; i < 4; ++i) { stored()->state.slots[i].fullDisplayAngle = static_cast(this->state.param[1]); stored()->state.slots[i].fullDisplayAngle %= 360; const std::int16_t angle = stored()->state.slots[i].fullDisplayAngle; if (this->state.param[0] < 10.0f) { this->state.param[0] = 10.0f; } stored()->state.slots[i].riseAngle = static_cast(this->state.param[0]); const float scale = static_cast(stored()->state.slots[i].riseAngle) / 10.0f; unsigned color = static_cast(this->state.param[2]); color %= 1000000; stored()->state.slots[i].flag1[10] = static_cast(color / 10000); stored()->state.slots[i].flag1[11] = static_cast((color - stored()->state.slots[i].flag1[12] * 10000) / 100); stored()->state.slots[i].flag1[12] = static_cast(color - static_cast(color / 100) * 100); stored()->state.slots[i].life = 1; stored()->state.slots[i].maxHeight = 0.05f; stored()->state.slots[i].distance = scale * (water ? 7.0f : 4.5f); stored()->state.slots[i].vecBPre.y = static_cast(ClampedRandom(30)); stored()->state.slots[i].height[0] = static_cast(ClampedRandom(360)); stored()->state.slots[i].height[1] = static_cast(ClampedRandom(360)); stored()->state.slots[i].height[2] = static_cast(ClampedRandom(360)); stored()->state.slots[i].height[3] = static_cast(ClampedRandom(360)); stored()->state.slots[i].vecBPre.x = static_cast(ClampedRandom(45) - 22); stored()->state.slots[i].vecBPre.z = static_cast(ClampedRandom(11) - 5); stored()->state.slots[i].vecBPre.x = scale * stored()->state.slots[i].vecBPre.x; stored()->state.slots[i].vecBPre.z = scale * stored()->state.slots[i].vecBPre.z; stored()->state.slots[i].vecBPre.y = scale * stored()->state.slots[i].vecBPre.y; { const float x = stored()->state.slots[i].vecBPre.x; const float z = stored()->state.slots[i].vecBPre.z; stored()->state.slots[i].vecBPre.x = g_cosTable[angle] * x - g_sinTable[angle] * z; stored()->state.slots[i].vecBPre.z = g_sinTable[angle] * x + g_cosTable[angle] * z; } stored()->state.slots[i].vecBNow.x = static_cast(ClampedRandom(45) - 22); stored()->state.slots[i].vecBNow.y = static_cast(ClampedRandom(30)); stored()->state.slots[i].vecBNow.z = static_cast(ClampedRandom(11) - 5); stored()->state.slots[i].height[4] = static_cast(ClampedRandom(360)); stored()->state.slots[i].height[5] = static_cast(ClampedRandom(360)); stored()->state.slots[i].height[6] = static_cast(ClampedRandom(360)); stored()->state.slots[i].height[7] = static_cast(ClampedRandom(360)); stored()->state.slots[i].vecBNow.x = scale * stored()->state.slots[i].vecBNow.x; stored()->state.slots[i].vecBNow.z = scale * stored()->state.slots[i].vecBNow.z; stored()->state.slots[i].vecBNow.y = scale * stored()->state.slots[i].vecBNow.y; { const float x = stored()->state.slots[i].vecBNow.x; const float z = stored()->state.slots[i].vecBNow.z; stored()->state.slots[i].vecBNow.x = g_cosTable[angle] * x - g_sinTable[angle] * z; stored()->state.slots[i].vecBNow.z = g_sinTable[angle] * x + g_cosTable[angle] * z; } stored()->state.slots[i].vecTPre.x = static_cast(ClampedRandom(45) - 22); stored()->state.slots[i].vecTPre.y = static_cast(ClampedRandom(30)); stored()->state.slots[i].vecTPre.z = static_cast(ClampedRandom(11) - 5); stored()->state.slots[i].height[8] = static_cast(ClampedRandom(360)); stored()->state.slots[i].height[9] = static_cast(ClampedRandom(360)); stored()->state.slots[i].height[10] = static_cast(ClampedRandom(360)); stored()->state.slots[i].height[11] = static_cast(ClampedRandom(360)); stored()->state.slots[i].vecTPre.x = scale * stored()->state.slots[i].vecTPre.x; stored()->state.slots[i].vecTPre.z = scale * stored()->state.slots[i].vecTPre.z; stored()->state.slots[i].vecTPre.y = scale * stored()->state.slots[i].vecTPre.y; { const float x = stored()->state.slots[i].vecTPre.x; const float z = stored()->state.slots[i].vecTPre.z; stored()->state.slots[i].vecTPre.x = x * g_cosTable[angle] - z * g_sinTable[angle]; stored()->state.slots[i].vecTPre.z = x * g_sinTable[angle] + z * g_cosTable[angle]; } stored()->state.slots[i].vecTNow.x = static_cast(ClampedRandom(45) - 22); stored()->state.slots[i].vecTNow.y = static_cast(ClampedRandom(30)); stored()->state.slots[i].vecTNow.z = static_cast(ClampedRandom(11) - 5); stored()->state.slots[i].height[12] = static_cast(ClampedRandom(360)); stored()->state.slots[i].height[13] = static_cast(ClampedRandom(360)); stored()->state.slots[i].height[14] = static_cast(ClampedRandom(360)); stored()->state.slots[i].height[15] = static_cast(ClampedRandom(360)); stored()->state.slots[i].vecTNow.x = scale * stored()->state.slots[i].vecTNow.x; stored()->state.slots[i].vecTNow.z = scale * stored()->state.slots[i].vecTNow.z; stored()->state.slots[i].vecTNow.y = scale * stored()->state.slots[i].vecTNow.y; { const float x = stored()->state.slots[i].vecTNow.x; const float z = stored()->state.slots[i].vecTNow.z; stored()->state.slots[i].vecTNow.x = x * g_cosTable[angle] - z * g_sinTable[angle]; stored()->state.slots[i].vecTNow.z = x * g_sinTable[angle] + z * g_cosTable[angle]; } stored()->state.slots[i].flag1[0] = 2; } } // OFFSET: 0x00C708F0 // FUNCTION: fn_20313 void CRagEffect::AssassinCloakingClear() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\assasin_cloaking.wav"); } this->state.parent->SetColor(50, 0, 0, 0); this->render.visibilityOptions[0] = 0; } // OFFSET: 0x00C710C0 // FUNCTION: fn_20318 void CRagEffect::TintedRisingSparkles(char) { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; g_renderer->viewport.Project(&this->state.parent->render.position.x, view, vertex); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if ((this->state.stateCnt & 1) != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 50; EffectPrimitiveState& particle = this->state.lastPrim->state; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); EffectPrimitiveState& launched = this->state.lastPrim->state; MatrixMult(launched.deltaPos2, {0.0f, 0.0f, static_cast(ClampedRandom(7) + 3)}, launched.transform); this->state.lastPrim->state.deltaPos2.y -= 20.0f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(-90)); this->state.lastPrim->state.accel = 0.015f; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(60) + 30) / 10.0f; this->state.lastPrim->state.heightSize = 0.18f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.red = rand() % 3 == 0 ? 255 : 140; this->state.lastPrim->state.green = rand() % 3 == 0 ? 255 : 140; this->state.lastPrim->state.blue = rand() % 3 == 0 ? 255 : 140; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 20.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } // OFFSET: 0x00C71C60 // FUNCTION: fn_20321 void CRagEffect::SpriteRing(char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt > 1) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 167, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.deltaPos2.y = 0.0f; this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.pattern |= 0x200u; this->state.lastPrim->state.animSpeed = 2; this->state.lastPrim->state.repeatAnim = 0; this->state.lastPrim->state.animSpeed = 4; const char* sprite; const char* action; if (kind == 20) { action = "이팩트\\m_ef05.act"; sprite = "이팩트\\m_ef05.spr"; } else { action = "이팩트\\m_ef03.act"; sprite = "이팩트\\m_ef03.spr"; } this->state.lastPrim->SetSpriteName(sprite); this->state.lastPrim->SetActionName(action); for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].rotStart = static_cast(static_cast(static_cast(this->state.stateCnt) * 4 + i) * 45); this->state.lastPrim->state.slots[i].height[0] = 0.3f; this->state.lastPrim->state.slots[i].vecBNow.x = 0.0f; this->state.lastPrim->state.slots[i].vecBNow.y = -5.0f; this->state.lastPrim->state.slots[i].vecBNow.z = 0.0f; this->state.lastPrim->state.slots[i].vecBNow.x += g_cosTable[this->state.lastPrim->state.slots[i].rotStart] * 5.0f; this->state.lastPrim->state.slots[i].vecBNow.z += g_sinTable[this->state.lastPrim->state.slots[i].rotStart] * 5.0f; if (kind == 9) { this->state.lastPrim->state.slots[i].flag1[0] = 0; } else if (kind == 10) { this->state.lastPrim->state.slots[i].flag1[0] = 1; } else if (kind == 20) { this->state.lastPrim->state.slots[i].flag1[0] = 4; } } this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C71EA0 // FUNCTION: fn_20322 void CRagEffect::RocketPunch() { const int frame = this->state.stateCnt; if (frame != 0 && frame != 2 && frame != 4 && frame != 6) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 20; this->state.lastPrim->state.pattern |= 0x100u; this->state.lastPrim->state.deltaPos2 = {0.0f, -15.0f, 0.0f}; this->state.lastPrim->Face(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->state.longitude = -this->state.lastPrim->render.angle; if (this->state.lastPrim->render.angle < 0.0f) { this->state.lastPrim->render.angle = this->state.lastPrim->render.angle + 360.0f; } CEffectPrim& particle = *this->state.lastPrim; particle.state.speed = -(particle.CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]) / particle.state.duration); reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.size = 1.0f; this->state.lastPrim->state.animSpeed = 1; if (this->state.stateCnt == 0) { this->state.lastPrim->state.pattern |= 0x200u; } else { this->state.lastPrim->state.alpha = static_cast((8 - this->state.stateCnt) * 10); } this->state.lastPrim->SetSpriteName("이팩트\\남_로켓트펀치.spr"); this->state.lastPrim->SetActionName("이팩트\\남_로켓트펀치.act"); std::int16_t angle; Get_Angle(this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], &angle); const CView* camera = static_cast(g_modeMgr.GetGameMode())->camera; std::int16_t direction = static_cast(static_cast(camera->camera.yaw) + angle) % 360; if (direction < 0) { direction += 360; } if (direction >= 180 && direction < 270) { this->state.lastPrim->SetAction(4, 16, 1); } else if (direction >= 90 && direction < 180) { this->state.lastPrim->SetAction(6, 16, 1); } else if (direction >= 0 && direction < 90) { this->state.lastPrim->SetAction(0, 16, 1); } else { this->state.lastPrim->SetAction(2, 16, 1); } this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C73120 // FUNCTION: fn_20325 void CRagEffect::GreenRocketPunch() { const int frame = this->state.stateCnt; if (frame != 0 && frame != 2 && frame != 4 && frame != 6) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = 20; this->state.lastPrim->state.pattern |= 0x100u; this->state.lastPrim->state.deltaPos2 = {0.0f, -15.0f, 0.0f}; this->state.lastPrim->Face(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->state.longitude = -this->state.lastPrim->render.angle; if (this->state.lastPrim->render.angle < 0.0f) { this->state.lastPrim->render.angle = this->state.lastPrim->render.angle + 360.0f; } CEffectPrim& particle = *this->state.lastPrim; particle.state.speed = -(particle.CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]) / particle.state.duration); reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.size = 1.0f; this->state.lastPrim->state.animSpeed = 1; if (this->state.stateCnt == 0) { this->state.lastPrim->state.pattern |= 0x200u; } else { this->state.lastPrim->state.alpha = static_cast((8 - this->state.stateCnt) * 10); } this->state.lastPrim->SetSpriteName("이팩트\\남_로켓트펀치.spr"); this->state.lastPrim->SetActionName("이팩트\\남_로켓트펀치.act"); std::int16_t angle; Get_Angle(this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], &angle); const CView* camera = static_cast(g_modeMgr.GetGameMode())->camera; std::int16_t direction = static_cast(static_cast(camera->camera.yaw) + angle) % 360; if (direction < 0) { direction += 360; } this->state.lastPrim->state.red = 105; this->state.lastPrim->state.green = 255; this->state.lastPrim->state.blue = 105; this->state.lastPrim->state.alpha = static_cast((5 - this->state.stateCnt) * 40); if (direction >= 180 && direction < 270) { this->state.lastPrim->SetAction(4, 16, 1); } else if (direction >= 90 && direction < 180) { this->state.lastPrim->SetAction(6, 16, 1); } else if (direction >= 0 && direction < 90) { this->state.lastPrim->SetAction(0, 16, 1); } else { this->state.lastPrim->SetAction(2, 16, 1); } this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C6FF90 // FUNCTION: fn_20311 void CRagEffect::TexturedQuadRing(std::int16_t baseAlpha, const char* name, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } if (this->state.duration < 56) { this->state.duration = 56; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 139, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 4.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; if (kind == 2) { this->state.lastPrim->state.slots[0].maxHeight = 25.0f; } else if (kind == 22) { this->state.lastPrim->state.slots[0].maxHeight = 15.0f; } else { this->state.lastPrim->state.slots[0].maxHeight = 20.0f; } this->state.lastPrim->state.slots[0].rotStart = 180; this->state.lastPrim->state.slots[0].alphaB = baseAlpha + 135; this->state.lastPrim->state.slots[0].distance = 4.1f; this->state.lastPrim->state.slots[0].riseAngle = 80; this->state.lastPrim->state.slots[0].alphaT = kind; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; if (kind == 2) { this->state.lastPrim->state.slots[1].maxHeight = 24.0f; } else if (kind == 22) { this->state.lastPrim->state.slots[1].maxHeight = 14.0f; } else { this->state.lastPrim->state.slots[1].maxHeight = 19.0f; } this->state.lastPrim->state.slots[1].rotStart = 270; this->state.lastPrim->state.slots[1].alphaB = baseAlpha + 90; this->state.lastPrim->state.slots[1].distance = 4.1f; this->state.lastPrim->state.slots[1].riseAngle = 80; this->state.lastPrim->state.slots[1].alphaT = kind; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; if (kind == 2) { this->state.lastPrim->state.slots[2].maxHeight = 23.0f; } else if (kind == 22) { this->state.lastPrim->state.slots[2].maxHeight = 13.0f; } else { this->state.lastPrim->state.slots[2].maxHeight = 18.0f; } this->state.lastPrim->state.slots[2].rotStart = 0; this->state.lastPrim->state.slots[2].alphaB = baseAlpha + 45; this->state.lastPrim->state.slots[2].distance = 4.1f; this->state.lastPrim->state.slots[2].riseAngle = 80; this->state.lastPrim->state.slots[2].alphaT = kind; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 360; if (kind == 2) { this->state.lastPrim->state.slots[3].maxHeight = 22.0f; } else if (kind == 22) { this->state.lastPrim->state.slots[3].maxHeight = 12.0f; } else { this->state.lastPrim->state.slots[3].maxHeight = 17.0f; } this->state.lastPrim->state.slots[3].rotStart = 90; this->state.lastPrim->state.slots[3].alphaB = baseAlpha; this->state.lastPrim->state.slots[3].distance = 4.1f; this->state.lastPrim->state.slots[3].riseAngle = 80; this->state.lastPrim->state.slots[3].alphaT = kind; this->state.lastPrim->state.slots[3].vecBNow.y = 0.0f; int delay = 0; for (int i = 0; i < 4; ++i) { for (int j = 0; j < 21; ++j) { this->state.lastPrim->state.slots[i].height[j] = 0.0f; this->state.lastPrim->state.slots[i].flag1[j] = 0; } if (this->state.duration <= 60) { this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].process = delay; } delay -= 5; } } // INLINED static __forceinline void LaunchTwinkleRing(CRagEffect& effect, const char* name, char level) { effect.state.lastPrim = CreateEffectParticle(effect, effect.render, 132, 0.0f, 0.0f, 0.0f, WorldObjects()); effect.state.lastPrim->state.renderFlag = 0; effect.state.lastPrim->state.renderFlag |= 1u; effect.state.lastPrim->state.renderFlag |= 5u; effect.state.lastPrim->state.duration = effect.state.duration; effect.state.lastPrim->state.textures = new CTexture*[effect.state.lastPrim->state.totalTexture]; effect.state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); effect.state.lastPrim->state.size = 1.0f; for (int i = 0; i < 4; ++i) { effect.state.lastPrim->state.slots[i].life = 1; effect.state.lastPrim->state.slots[i].process = i * -20; effect.state.lastPrim->state.slots[i].fullDisplayAngle = static_cast(ClampedRandom(360)); effect.state.lastPrim->state.slots[i].maxHeight = 10.0f; effect.state.lastPrim->state.slots[i].rotStart = static_cast(ClampedRandom(360)); effect.state.lastPrim->state.slots[i].alphaB = 100; effect.state.lastPrim->state.slots[i].height[4] = 10.0f; effect.state.lastPrim->state.slots[i].height[3] = static_cast(i); effect.state.lastPrim->state.slots[i].height[5] = static_cast(level); } } // OFFSET: 0x00C704E0 // FUNCTION: fn_20312 void CRagEffect::TexturedTwinkleRing(const char* name, char level) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt == 0) { LaunchTwinkleRing(*this, name, level); } if (this->state.stateCnt == 10) { LaunchTwinkleRing(*this, name, level); } } // OFFSET: 0x00C71460 // FUNCTION: fn_20319 void CRagEffect::TetraVortexPillar(char kind) { CopyVector(this->render.position, this->state.parent->render.position); const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); switch (this->state.stateCnt) { case 0: g_soundMgr->PlayWave( "effect\\wizard_meteo.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); g_soundMgr->PlayWave( "effect\\hunter_blastmine.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); break; case 10: case 20: case 50: case 80: g_soundMgr->PlayWave( "effect\\wl_tetravortex.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); break; } if (this->state.stateCnt > 80 || this->state.stateCnt % 25 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 140, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; if (kind == 4) { this->state.lastPrim->state.totalTexture = 8; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\tv-1.bmp", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\tv-2.bmp", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\tv-3.bmp", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\tv-4.bmp", 0, false, true, false); this->state.lastPrim->state.textures[4] = g_texMgr.Load("effect\\tv-5.bmp", 0, false, true, false); this->state.lastPrim->state.textures[5] = g_texMgr.Load("effect\\tv-6.bmp", 0, false, true, false); this->state.lastPrim->state.textures[6] = g_texMgr.Load("effect\\tv-7.bmp", 0, false, true, false); this->state.lastPrim->state.textures[7] = g_texMgr.Load("effect\\tv-8.bmp", 0, false, true, false); } this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].life = 1; if (this->state.param[0] > 0.0f) { this->state.lastPrim->state.slots[0].distance = this->state.param[0]; } else { this->state.lastPrim->state.slots[0].distance = 30.0f; } this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 10.0f; if (kind == 4) { switch (this->state.type) { case EF_TETRA_FIRE: this->state.lastPrim->state.slots[0].flag1[2] = 20; break; case EF_TETRA_WATER: this->state.lastPrim->state.slots[0].flag1[2] = 18; break; case EF_TETRA_WIND: this->state.lastPrim->state.slots[0].flag1[2] = 17; break; case EF_TETRA_GROUND: this->state.lastPrim->state.slots[0].flag1[2] = 19; break; } this->state.lastPrim->state.slots[0].fullDisplayAngle = 120; this->state.lastPrim->state.slots[0].height[10] = 1.0f; } else { this->state.lastPrim->state.slots[0].flag1[2] = 17; this->state.lastPrim->state.slots[0].fullDisplayAngle = 135; this->state.lastPrim->state.slots[0].height[10] = 0.0f; } this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 200; this->state.lastPrim->state.slots[0].vecBNow.x = this->state.deltaPos[0]; this->state.lastPrim->state.slots[0].vecBNow.z = this->state.deltaPos[2]; this->state.lastPrim->state.slots[0].vecBNow.y = this->state.deltaPos[1] - 35.0f; this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[4] = kind; } // INLINED static __forceinline void LaunchFireballVolley(CRagEffect& effect, float turn, int shade, int fade) { CEffectPrim* particle = CreateEffectParticle(effect, effect.render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); effect.state.lastPrim = particle; effect.state.lastPrim->state.renderFlag = 5; effect.state.lastPrim->state.duration = 20; effect.state.lastPrim->state.pattern |= 0x120u; effect.state.lastPrim->state.deltaPos2 = {0.0f, -15.0f, 0.0f}; particle->Face(effect.state.deltaPos[0], effect.state.deltaPos[2]); if (turn != 0.0f) { effect.state.lastPrim->render.angle = effect.state.lastPrim->render.angle + turn; if (effect.state.lastPrim->render.angle < 0.0f) { effect.state.lastPrim->render.angle = effect.state.lastPrim->render.angle + 360.0f; } if (effect.state.lastPrim->render.angle >= 360.0f) { effect.state.lastPrim->render.angle = effect.state.lastPrim->render.angle - 360.0f; } } effect.state.lastPrim->state.longitude = -effect.state.lastPrim->render.angle; effect.state.lastPrim->render.angle = 180.0f - effect.state.lastPrim->render.angle; if (effect.state.lastPrim->render.angle < 0.0f) { effect.state.lastPrim->render.angle = effect.state.lastPrim->render.angle + 360.0f; } effect.state.lastPrim->state.speed = -(effect.state.lastPrim->CalcDist(effect.state.deltaPos[0], effect.state.deltaPos[2]) / effect.state.lastPrim->state.duration); reinterpret_cast(effect.state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(effect.state.lastPrim->state.longitude))); effect.state.lastPrim->state.size = 1.0f; effect.state.lastPrim->state.animSpeed = 1; effect.state.lastPrim->state.red = shade; effect.state.lastPrim->state.green = shade; effect.state.lastPrim->state.blue = 255; effect.state.lastPrim->state.alpha = static_cast((fade - effect.state.stateCnt) * 40); effect.state.lastPrim->SetSpriteName("이팩트\\fireball.spr"); effect.state.lastPrim->SetActionName("이팩트\\fireball.act"); effect.state.lastPrim->InitSegment(); } // OFFSET: 0x00C721A0 // FUNCTION: fn_20323 void CRagEffect::BlueFireballVolley() { if (this->state.stateCnt == 5) { g_soundMgr->PlayWave("effect\\EF_FireBall.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } if (this->state.stateCnt == 0 || this->state.stateCnt == 1 || this->state.stateCnt == 2 || this->state.stateCnt == 3) { LaunchFireballVolley(*this, 0.0f, 55, 5); } if (this->state.stateCnt == 6 || this->state.stateCnt == 7 || this->state.stateCnt == 8 || this->state.stateCnt == 9) { LaunchFireballVolley(*this, -5.0f, 30, 11); } if (this->state.stateCnt == 12 || this->state.stateCnt == 13 || this->state.stateCnt == 14 || this->state.stateCnt == 15) { LaunchFireballVolley(*this, 5.0f, 5, 17); } } // OFFSET: 0x00C72960 // FUNCTION: fn_20324 void CRagEffect::PaleFireballVolley() { if (this->state.stateCnt == 5) { g_soundMgr->PlayWave("effect\\EF_FireBall.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } if (this->state.stateCnt == 0 || this->state.stateCnt == 1 || this->state.stateCnt == 2 || this->state.stateCnt == 3) { LaunchFireballVolley(*this, 0.0f, 155, 5); } if (this->state.stateCnt == 6 || this->state.stateCnt == 7 || this->state.stateCnt == 8 || this->state.stateCnt == 9) { LaunchFireballVolley(*this, -5.0f, 130, 11); } if (this->state.stateCnt == 12 || this->state.stateCnt == 13 || this->state.stateCnt == 14 || this->state.stateCnt == 15) { LaunchFireballVolley(*this, 5.0f, 105, 17); } } // OFFSET: 0x00C67970 // FUNCTION: fn_20281 void CRagEffect::TeleportRings(const char* name, std::int16_t level) { if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); PlayEffectWave(*this, "effect\\EF_Teleportation.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 57, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 4.0f; const float rise = static_cast(level * 60); const float shrink = static_cast(level * 2); this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = rise + 100.0f; this->state.lastPrim->state.slots[0].rotStart = 180; this->state.lastPrim->state.slots[0].alphaB = 100; this->state.lastPrim->state.slots[0].distance = 1.5f - shrink; this->state.lastPrim->state.slots[0].riseAngle = 90; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = rise + 70.0f; this->state.lastPrim->state.slots[1].rotStart = 270; this->state.lastPrim->state.slots[1].alphaB = 80; this->state.lastPrim->state.slots[1].distance = 3.0f - shrink; this->state.lastPrim->state.slots[1].riseAngle = 89; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = rise + 40.0f; this->state.lastPrim->state.slots[2].rotStart = 0; this->state.lastPrim->state.slots[2].alphaB = 60; this->state.lastPrim->state.slots[2].distance = 4.0f - shrink; this->state.lastPrim->state.slots[2].riseAngle = 88; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 360; this->state.lastPrim->state.slots[3].maxHeight = rise + 15.0f; this->state.lastPrim->state.slots[3].rotStart = 90; this->state.lastPrim->state.slots[3].alphaB = 40; this->state.lastPrim->state.slots[3].distance = 5.0f - shrink; this->state.lastPrim->state.slots[3].riseAngle = 87; this->state.lastPrim->state.slots[3].vecBNow.y = 0.0f; for (int i = 0; i < 4; ++i) { for (int j = 0; j < 21; ++j) { this->state.lastPrim->state.slots[i].height[j] = 0.0f; } this->state.lastPrim->state.slots[i].flag1[0] = 0; this->state.lastPrim->state.slots[i].flag1[1] = static_cast(this->state.lastPrim->state.slots[i].maxHeight); } } // OFFSET: 0x00C68200 // FUNCTION: fn_20283 void CRagEffect::AlphaCenterStream() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt >= 9) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos.x = this->state.deltaPos[0]; this->state.lastPrim->state.deltaPos.y = this->state.deltaPos[1]; this->state.lastPrim->state.deltaPos.z = this->state.deltaPos[2]; const float dz = this->state.deltaPos[2] - this->render.position.z; const float dx = this->state.deltaPos[0] - this->render.position.x; const float range = SquareRoot(dz * dz + dx * dx); for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = -30 - ClampedRandom(110); Get_Angle(dx, dz, &this->state.lastPrim->state.slots[i].rotStart); this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(ClampedRandom(100)) * 0.08f - 4.0f + this->render.position.x; this->state.lastPrim->state.slots[i].vecBNow.z = static_cast(ClampedRandom(100)) * 0.08f - 4.0f + this->render.position.z; this->state.lastPrim->state.slots[i].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[i].height[1] = static_cast(ClampedRandom(100)) * 0.15f; this->state.lastPrim->state.slots[i].vecBNow.x -= g_cosTable[this->state.lastPrim->state.slots[i].rotStart] * this->state.lastPrim->state.slots[i].height[1]; this->state.lastPrim->state.slots[i].vecBNow.z -= g_sinTable[this->state.lastPrim->state.slots[i].rotStart] * this->state.lastPrim->state.slots[i].height[1]; this->state.lastPrim->state.slots[i].vecTNow.x = this->state.lastPrim->state.slots[i].vecBNow.x; this->state.lastPrim->state.slots[i].vecTNow.z = this->state.lastPrim->state.slots[i].vecBNow.z; this->state.lastPrim->state.slots[i].vecTNow.y = this->render.position.y; this->state.lastPrim->state.slots[i].maxHeight = static_cast(ClampedRandom(11)) * 0.008f + 0.02f; this->state.lastPrim->state.slots[i].height[0] = static_cast(ClampedRandom(100)) * 0.06f + 4.0f; this->state.lastPrim->state.slots[i].distance = static_cast(ClampedRandom(100)) * 0.3f + range; this->state.lastPrim->state.slots[i].height[4] = 3.0f; } } // OFFSET: 0x00C68600 // FUNCTION: fn_20284 void CRagEffect::CloudDrift() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt < 2) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos.x = this->state.deltaPos[0]; this->state.lastPrim->state.deltaPos.y = this->state.deltaPos[1]; this->state.lastPrim->state.deltaPos.z = this->state.deltaPos[2]; const float dx = this->state.deltaPos[0] - this->render.position.x; const float dz = this->state.deltaPos[2] - this->render.position.z; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = -ClampedRandom(20); Get_Angle(dx, dz, &this->state.lastPrim->state.slots[i].rotStart); this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(ClampedRandom(100)) * 0.06f - 3.0f + this->render.position.x; this->state.lastPrim->state.slots[i].vecBNow.z = static_cast(ClampedRandom(100)) * 0.06f - 3.0f + this->render.position.z; this->state.lastPrim->state.slots[i].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[i].height[1] = static_cast(ClampedRandom(100)) * 0.15f; this->state.lastPrim->state.slots[i].vecBNow.x -= g_cosTable[this->state.lastPrim->state.slots[i].rotStart] * this->state.lastPrim->state.slots[i].height[1]; this->state.lastPrim->state.slots[i].vecBNow.z -= g_sinTable[this->state.lastPrim->state.slots[i].rotStart] * this->state.lastPrim->state.slots[i].height[1]; this->state.lastPrim->state.slots[i].vecTNow.x = this->state.lastPrim->state.slots[i].vecBNow.x; this->state.lastPrim->state.slots[i].vecTNow.z = this->state.lastPrim->state.slots[i].vecBNow.z; this->state.lastPrim->state.slots[i].vecTNow.y = this->render.position.y; this->state.lastPrim->state.slots[i].maxHeight = 0.25f; this->state.lastPrim->state.slots[i].height[0] = static_cast(ClampedRandom(100)) * 0.04f + 8.0f; this->state.lastPrim->state.slots[i].distance = static_cast(ClampedRandom(100)) * 0.2f + 20.0f; this->state.lastPrim->state.slots[i].height[4] = 0.0f; } } if (this->state.stateCnt == 10) { PlayEffectWave(*this, "effect\\EF_hit2.wav"); } if (this->state.stateCnt == 20) { PlayEffectWave(*this, "effect\\EF_hit4.wav"); } if (this->state.stateCnt == 30) { PlayEffectWave(*this, "effect\\EF_hit2.wav"); } } // OFFSET: 0x00C68AF0 // FUNCTION: fn_20285 void CRagEffect::NotifyGameMode(char value) { if (this->state.stateCnt == 0) { g_modeMgr.gameMode->SendMsg(MM_SONG_TALK, value, 0, 0, 0); } } // OFFSET: 0x00C68F20 // FUNCTION: fn_20287 void CRagEffect::ScatterItemIcons(char kind) { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); this->render.position.x = player->render.position.x; this->render.position.y = player->render.position.y; this->render.position.z = player->render.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 123, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (kind == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("유저인터페이스\\item\\하얀허브.bmp", 0, false, true, false); } else if (kind == 1) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("유저인터페이스\\item\\화이트슬림포션.bmp", 0, false, true, false); } else if (kind == 2) { const char pick = static_cast(ClampedRandom(3)); if (pick == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("유저인터페이스\\item\\화염병.bmp", 0, false, true, false); } else if (pick == 1) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("유저인터페이스\\item\\염산병.bmp", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("유저인터페이스\\item\\알코올.bmp", 0, false, true, false); } } for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].height[7] = 3.0f; this->state.lastPrim->state.slots[i].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].flag1[0] = 0; this->state.lastPrim->state.slots[i].rotStart = static_cast(static_cast(this->state.duration) - 50); this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(ClampedRandom(160) - 80); this->state.lastPrim->state.slots[i].vecBNow.z = static_cast(ClampedRandom(160) - 80); CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; const int drop = rand() % 66; this->state.lastPrim->state.slots[i].vecBNow.y = world->terrain->Height( this->state.lastPrim->state.slots[i].vecBNow.x + this->render.position.x, this->state.lastPrim->state.slots[i].vecBNow.z + this->render.position.z ) - 5.0f - static_cast(std::max(drop, 0)); this->state.lastPrim->state.slots[i].vecBNow.x = this->render.position.x + this->state.lastPrim->state.slots[i].vecBNow.x; this->state.lastPrim->state.slots[i].vecBNow.z = this->render.position.z + this->state.lastPrim->state.slots[i].vecBNow.z; this->state.lastPrim->state.slots[i].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].distance = static_cast(ClampedRandom(11)) * 0.1f + 3.0f; this->state.lastPrim->state.slots[i].height[8] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].flag1[2] = 7; } } // OFFSET: 0x00C69910 // FUNCTION: fn_20290 void CRagEffect::Vallentine(char kind) { auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\vallentine.wav"); this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.pattern |= 0x200u; stored()->state.duration = this->state.duration; stored()->state.deltaPos2.y = 0.0f; stored()->state.animSpeed = 2; stored()->state.repeatAnim = 0; if (kind == 2) { Owner(&stored()->state).SetSpriteName("이팩트\\05vallentine.spr"); Owner(&stored()->state).SetActionName("이팩트\\05vallentine.act"); Owner(&stored()->state).SetAction(0, 16, 1); } else if (kind == 3) { Owner(&stored()->state).SetSpriteName("이팩트\\fast.spr"); Owner(&stored()->state).SetActionName("이팩트\\fast.act"); stored()->state.animSpeed = 4; Owner(&stored()->state).SetAction(0, 16, 1); } else if (kind == 4) { stored()->state.renderFlag |= 0x200u; Owner(&stored()->state).SetSpriteName("이팩트\\ro2effect.spr"); Owner(&stored()->state).SetActionName("이팩트\\ro2effect.act"); stored()->state.animSpeed = 4; Owner(&stored()->state).SetAction(0, 16, 1); } else { Owner(&stored()->state).SetSpriteName("이팩트\\vallentine.spr"); Owner(&stored()->state).SetActionName("이팩트\\vallentine.act"); Owner(&stored()->state).SetAction(kind, 16, 1); } Owner(&stored()->state).InitSegment(); } // OFFSET: 0x00C6C6A0 // FUNCTION: fn_20296 void CRagEffect::TexturedSpinShards(const char* name, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt >= 30 || this->state.stateCnt % 10 != 0) { return; } CEffectPrim* prim = CreateEffectParticle(*this, this->render, 170, 0.0f, 0.0f, 0.0f, WorldObjects()); if (prim == nullptr) { return; } EffectPrimitiveState& particle = prim->state; particle.renderFlag = 5; particle.duration = this->state.duration; if (static_cast(particle.totalTexture) > 0) { AllocateTextures(particle); if (particle.textures != nullptr) { particle.textures[0] = g_texMgr.Load(name, 0, false, true, false); } } particle.size = 0.0f; particle.slots[0].life = 0; particle.slots[1].life = 0; particle.slots[2].life = 0; particle.slots[3].life = 0; const float x = this->render.position.x; const float z = this->render.position.z; const float y = this->render.position.y - 5.0f; for (int i = 0; i < 4; ++i) { EffectPrimitiveSlot& slot = particle.slots[i]; slot.life = 1; slot.maxHeight = static_cast(ClampedRandom(21)) * 0.001f + 0.4f; const int roll = rand(); if (kind == 3) { slot.distance = static_cast(std::max(roll % 41, 0)) * 0.1f + 1.0f; } else { slot.distance = static_cast(std::max(roll % 21, 0)) * 0.1f + 3.0f; } slot.process = 0; Get_Angle(this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &slot.riseAngle); slot.vecBPre.z = z - this->render.position.z; slot.vecBPre.x = x - this->render.position.x; slot.vecBPre.y = y - this->render.position.y; slot.height[0] = static_cast(slot.riseAngle); slot.height[1] = static_cast(slot.riseAngle + rand() % 360); slot.height[3] = 180.0f; slot.height[4] = 180.0f; slot.height[12] = 0.0f; slot.height[2] = static_cast(rand() % 360 + slot.riseAngle); slot.vecBNow.z = z - this->render.position.z; slot.vecBNow.x = x - this->render.position.x; slot.vecBNow.y = y - this->render.position.y; slot.height[5] = static_cast(slot.riseAngle); slot.height[6] = static_cast(slot.riseAngle + rand() % 360); const int spin = slot.riseAngle + rand() % 360; slot.height[8] = 180.0f; slot.height[9] = 180.0f; slot.height[7] = static_cast(spin); for (int j = 0; j < 10; ++j) { if (slot.height[j] < 0.0f) { slot.height[j] += 360.0f; } if (slot.height[j] >= 360.0f) { slot.height[j] -= 360.0f; } } slot.height[13] = 0.0f; slot.flag1[0] = kind; } } // OFFSET: 0x00C69B00 // FUNCTION: fn_20291 void CRagEffect::HealCloudRings() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 62, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); this->state.lastPrim->state.size = 4.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 90; this->state.lastPrim->state.slots[0].maxHeight = 8.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 3.0f; this->state.lastPrim->state.slots[0].riseAngle = 90; for (int j = 0; j < 21; ++j) { this->state.lastPrim->state.slots[0].height[j] = 3.0f; this->state.lastPrim->state.slots[0].flag1[j] = 0; } this->state.lastPrim->state.slots[0].alphaT = 0; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 70; this->state.lastPrim->state.slots[1].maxHeight = 8.0f; this->state.lastPrim->state.slots[1].rotStart = 10; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 3.2f; this->state.lastPrim->state.slots[1].riseAngle = 90; for (int j = 0; j < 21; ++j) { this->state.lastPrim->state.slots[1].height[j] = 2.5f; this->state.lastPrim->state.slots[1].flag1[j] = 0; } this->state.lastPrim->state.slots[1].alphaT = 0; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 50; this->state.lastPrim->state.slots[2].maxHeight = 8.0f; this->state.lastPrim->state.slots[2].rotStart = 20; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 3.4f; this->state.lastPrim->state.slots[2].riseAngle = 90; for (int j = 0; j < 21; ++j) { this->state.lastPrim->state.slots[2].height[j] = 2.0f; this->state.lastPrim->state.slots[2].flag1[j] = 0; } this->state.lastPrim->state.slots[2].alphaT = 0; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 30; this->state.lastPrim->state.slots[3].maxHeight = 8.0f; this->state.lastPrim->state.slots[3].rotStart = 30; this->state.lastPrim->state.slots[3].alphaB = 0; this->state.lastPrim->state.slots[3].distance = 3.6f; this->state.lastPrim->state.slots[3].riseAngle = 90; for (int j = 0; j < 21; ++j) { this->state.lastPrim->state.slots[3].height[j] = 1.5f; this->state.lastPrim->state.slots[3].flag1[j] = 0; } this->state.lastPrim->state.slots[3].alphaT = 0; PlayEffectWave(*this, "_heal_effect.wav"); } // OFFSET: 0x00C6BF40 // FUNCTION: fn_20295 void CRagEffect::WhiteLightSparkle(char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt == 99999998) { this->state.stateCnt = 0; this->state.duration = 99999999; } else if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 130, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1u; this->state.lastPrim->state.renderFlag |= 5u; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\whitelight.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int i = 0; i < 4; ++i) { if (kind == 1 && i > 0) { this->state.lastPrim->state.slots[i].life = 0; } else { this->state.lastPrim->state.slots[i].life = 1; } this->state.lastPrim->state.slots[i].maxHeight = 0.15f; this->state.lastPrim->state.slots[i].distance = 2.4f; if (kind == 1) { this->state.lastPrim->state.slots[i].vecBPre.x = 0.0f; this->state.lastPrim->state.slots[i].vecBPre.z = 0.0f; } else { this->state.lastPrim->state.slots[i].vecBPre.x = static_cast(ClampedRandom(41) - 20); this->state.lastPrim->state.slots[i].vecBPre.z = static_cast(ClampedRandom(41) - 20); } this->state.lastPrim->state.slots[i].vecBPre.y = static_cast(ClampedRandom(100)); this->state.lastPrim->state.slots[i].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].flag1[11] = 0; this->state.lastPrim->state.slots[i].flag1[7] = 0; this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(ClampedRandom(41) - 20); this->state.lastPrim->state.slots[i].vecBNow.z = static_cast(ClampedRandom(41) - 20); this->state.lastPrim->state.slots[i].vecBNow.y = static_cast(ClampedRandom(100)); this->state.lastPrim->state.slots[i].height[4] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[5] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[6] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[7] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].flag1[12] = 0; this->state.lastPrim->state.slots[i].flag1[8] = 0; this->state.lastPrim->state.slots[i].vecTPre.x = static_cast(ClampedRandom(41) - 20); this->state.lastPrim->state.slots[i].vecTPre.z = static_cast(ClampedRandom(41) - 20); this->state.lastPrim->state.slots[i].vecTPre.y = static_cast(ClampedRandom(100)); this->state.lastPrim->state.slots[i].height[8] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[9] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[10] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[11] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].flag1[13] = 0; this->state.lastPrim->state.slots[i].flag1[9] = 0; this->state.lastPrim->state.slots[i].vecTNow.x = static_cast(ClampedRandom(41) - 20); this->state.lastPrim->state.slots[i].vecTNow.z = static_cast(ClampedRandom(41) - 20); this->state.lastPrim->state.slots[i].vecTNow.y = static_cast(ClampedRandom(100)); this->state.lastPrim->state.slots[i].height[12] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[13] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[14] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[15] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].flag1[14] = 0; this->state.lastPrim->state.slots[i].flag1[10] = 0; this->state.lastPrim->state.slots[i].vecBPre.y = 0.0f; this->state.lastPrim->state.slots[i].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[i].vecTPre.y = 0.0f; this->state.lastPrim->state.slots[i].vecTNow.y = 0.0f; this->state.lastPrim->state.slots[i].flag1[0] = kind; this->state.lastPrim->state.slots[i].flag1[1] = 0; this->state.lastPrim->state.slots[i].flag1[2] = 0; this->state.lastPrim->state.slots[i].flag1[3] = 0; this->state.lastPrim->state.slots[i].flag1[4] = 0; this->state.lastPrim->state.slots[i].flag1[5] = static_cast((kind == 2) * 2 + 8); } } // INLINED static __forceinline void ScatterFrostVector(CRagEffect& effect, int slot, int vector, int firstHeight) { if (effect.state.lastPrim->state.slots[slot].flag1[12] == 0) { effect.state.lastPrim->state.slots[slot].vectors[vector].x = static_cast(ClampedRandom(45) - 22); } else { effect.state.lastPrim->state.slots[slot].vectors[vector].x = static_cast(ClampedRandom(23) - 11); } effect.state.lastPrim->state.slots[slot].vectors[vector].y = static_cast(ClampedRandom(30)); effect.state.lastPrim->state.slots[slot].vectors[vector].z = static_cast(ClampedRandom(11) - 5); effect.state.lastPrim->state.slots[slot].height[firstHeight] = static_cast(ClampedRandom(360)); effect.state.lastPrim->state.slots[slot].height[firstHeight + 1] = static_cast(ClampedRandom(360)); effect.state.lastPrim->state.slots[slot].height[firstHeight + 2] = static_cast(ClampedRandom(360)); effect.state.lastPrim->state.slots[slot].height[firstHeight + 3] = static_cast(ClampedRandom(360)); if (effect.state.lastPrim->state.slots[slot].flag1[11] == 1) { const float x = effect.state.lastPrim->state.slots[slot].vectors[vector].x; effect.state.lastPrim->state.slots[slot].vectors[vector].x = effect.state.lastPrim->state.slots[slot].vectors[vector].z; effect.state.lastPrim->state.slots[slot].vectors[vector].z = static_cast(static_cast(x)); } } // OFFSET: 0x00C6B780 // FUNCTION: fn_20294 void CRagEffect::FrostScatter(char swapAxes, char narrow) { if (this->state.stateCnt != 0) { return; } const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; this->state.lastPrim = CreateEffectParticle(*this, this->render, 80, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; bool water; if (ClampedRandom(10) > 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\freeze_a_small.bmp", 0, false, true, false); water = false; } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\waterp1.tga", 0, false, true, false); water = true; } this->state.lastPrim->state.size = 4.0f; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].maxHeight = 0.05f; this->state.lastPrim->state.slots[i].flag1[11] = swapAxes; this->state.lastPrim->state.slots[i].flag1[12] = narrow; this->state.lastPrim->state.slots[i].distance = water ? 7.0f : 4.5f; ScatterFrostVector(*this, i, 2, 0); ScatterFrostVector(*this, i, 0, 4); ScatterFrostVector(*this, i, 3, 8); ScatterFrostVector(*this, i, 1, 12); this->state.lastPrim->state.slots[i].flag1[0] = 2; } } // INLINED static __forceinline void SetupRippleSlot(CRagEffect& effect, int slot, std::int16_t rotStart, float distance, std::int16_t riseAngle) { effect.state.lastPrim->state.slots[slot].life = 1; effect.state.lastPrim->state.slots[slot].process = 0; effect.state.lastPrim->state.slots[slot].fullDisplayAngle = 360; effect.state.lastPrim->state.slots[slot].rotStart = rotStart; effect.state.lastPrim->state.slots[slot].alphaB = 0; effect.state.lastPrim->state.slots[slot].distance = distance; effect.state.lastPrim->state.slots[slot].maxHeight = effect.state.lastPrim->state.slots[slot].distance; effect.state.lastPrim->state.slots[slot].riseAngle = riseAngle; effect.state.lastPrim->state.slots[slot].vecBNow.y = 0.0f; for (int j = 0; j < 21; ++j) { effect.state.lastPrim->state.slots[slot].height[j] = 0.0f; effect.state.lastPrim->state.slots[slot].flag1[j] = 0; } } // INLINED static __forceinline void LaunchRippleRings(CRagEffect& effect, const char* name, char kind, float smallSize, int turn, float growth) { const RenderObjectState& parent = effect.state.parent->render; effect.render.position.x = parent.position.x; effect.render.position.y = parent.position.y; effect.render.position.z = parent.position.z; effect.state.lastPrim = CreateEffectParticle(effect, effect.render, 65, 0.0f, 0.0f, 0.0f, WorldObjects()); effect.state.lastPrim->state.renderFlag = 5; effect.state.lastPrim->state.duration = effect.state.duration; AllocateTextures(effect.state.lastPrim->state); effect.state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); if (kind == 0) { effect.state.lastPrim->state.size = smallSize; } else if (kind == 1) { effect.state.lastPrim->state.size = 18.0f; } SetupRippleSlot(effect, 0, static_cast(270 + turn), 2.5f + growth, static_cast(53 - turn)); SetupRippleSlot(effect, 1, static_cast(0 + turn), 5.0f + growth, static_cast(60 - turn)); SetupRippleSlot(effect, 2, static_cast(90 + turn), 7.5f + growth, static_cast(55 - turn)); SetupRippleSlot(effect, 3, static_cast(180 + turn), 10.0f + growth, static_cast(50 - turn)); } // OFFSET: 0x00C6A1E0 // FUNCTION: fn_20292 void CRagEffect::AlphaDownRipples(const char* name, char kind) { if (this->state.stateCnt == 99999998) { this->state.stateCnt = 0; } else { if (this->state.stateCnt == 1) { LaunchRippleRings(*this, name, kind, 11.0f, 0, 0.0f); } if (this->state.stateCnt == 2) { LaunchRippleRings(*this, name, kind, 4.0f, 1, 0.2f); } } if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 99999999; this->state.lastPrim->state.pattern |= 1u; this->state.lastPrim->state.radius = 15.0f; this->state.lastPrim->state.deltaPos2.y -= 1.5f; this->state.lastPrim->state.latitude = 90.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 128.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->InitSegment(); AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); } if (this->state.stateCnt % 10 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.radius = static_cast(ClampedRandom(200) / 100) * 0.75f + 4.5f; this->state.lastPrim->state.radiusSpeed = 0.0005f; this->state.lastPrim->state.duration = 70; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); if (ClampedRandom(2) == 0) { this->state.lastPrim->state.longSpeed = 2.5f - static_cast(ClampedRandom(11)) * 0.1f; } else { this->state.lastPrim->state.longSpeed = static_cast(ClampedRandom(11)) * 0.1f - 2.5f; } this->state.lastPrim->state.gravSpeed = -0.3f; EffectPrimitiveState& falling = this->state.lastPrim->state; falling.gravAccel = -(falling.gravSpeed / falling.duration) / 1.5f; EffectPrimitiveState& particle = this->state.lastPrim->state; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(static_cast(particle.longitude))); EffectPrimitiveState& moving = this->state.lastPrim->state; moving.deltaPos2 = RotatedForward(moving.transform, moving.radius); this->state.lastPrim->state.size = static_cast(ClampedRandom(10) / 10) + 0.7f; const int lifetime = this->state.lastPrim->state.duration; this->state.lastPrim->state.fadeOutCnt = lifetime - lifetime / 3; this->state.lastPrim->SetSpriteName("이팩트\\particle1.spr"); this->state.lastPrim->SetActionName("이팩트\\particle1.act"); this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C0E820 // FUNCTION: fn_20027 bool CRagEffect::Coin() { if (g_serviceOptions.Get(0xe5) == 0 && this->state.stateCnt == 20) { const int coinCount = g_serviceOptions.Get(0xe5) != 0 ? 2 : 5; for (int coin = 0; coin < coinCount; ++coin) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = ClampedRandom(30) + 40; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(12) * 30); EffectPrimitiveState& launched = this->state.lastPrim->state; reinterpret_cast(launched.transform)->MakeYRotation(GetRadian(static_cast(launched.longitude))); const float distance = static_cast(ClampedRandom(2) + 2); const vector3d offset = RotatedForward(this->state.lastPrim->state.transform, distance); this->state.lastPrim->state.deltaPos2 = {offset.x + 0.0f, offset.y - 10.0f, offset.z + 0.0f}; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.speed = static_cast(ClampedRandom(50) + 50) / 100.0f; this->state.lastPrim->state.accel = -(this->state.lastPrim->state.speed / static_cast(this->state.lastPrim->state.duration)) / 3.5f; this->state.lastPrim->state.gravSpeed = -static_cast(ClampedRandom(100) + 50) / 25.0f; this->state.lastPrim->state.gravAccel = -(this->state.lastPrim->state.gravSpeed / static_cast(this->state.lastPrim->state.duration) * 4.0f); this->state.lastPrim->state.size = 2.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->state.playWaveType = 1; this->state.lastPrim->state.animSpeed = 1; this->state.lastPrim->SetSpriteName("이팩트\\동전.spr"); this->state.lastPrim->SetActionName("이팩트\\동전.act"); this->state.lastPrim->state.numSegment = 2; this->state.lastPrim->InitSegment(); } } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); return this->state.stateCnt < 100; } // OFFSET: 0x00C0EBE0 // FUNCTION: fn_20028 void CRagEffect::ColdHit() { if (this->state.stateCnt == 0) { int index = 0; for (float degree = 0.0f; degree < 360.0f; degree += 40.0f, ++index) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 2, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 15; const float heading = (degree - 15.0f) + static_cast(ClampedRandom(60)); this->state.lastPrim->state.roll = heading; this->state.lastPrim->state.longitude = heading; if (index % 3 == 0) { this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(10) + 100); this->state.lastPrim->state.widthSize = 10.0f; this->state.lastPrim->state.speed = static_cast(static_cast(ClampedRandom(45) / 10) + 12.8); } else { this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(5) + 45); this->state.lastPrim->state.widthSize = 4.0f; this->state.lastPrim->state.speed = static_cast(static_cast(ClampedRandom(45) / 10) + 4.8); } EffectPrimitiveState& moving = this->state.lastPrim->state; moving.accel = static_cast(-(moving.speed / static_cast(moving.duration)) / 1.5); const float spread = static_cast(ClampedRandom(5)); this->state.lastPrim->state.deltaPos2.x = ClientSine(static_cast(degree)) * spread; this->state.lastPrim->state.deltaPos2.y = ClientCosine(static_cast(degree)) * -spread; this->state.lastPrim->state.deltaPos2.y -= 20.0f; EffectPrimitiveState& pitched = this->state.lastPrim->state; reinterpret_cast(pitched.transform)->MakeXRotation(GetRadian(static_cast(pitched.latitude))); EffectPrimitiveState& yawed = this->state.lastPrim->state; reinterpret_cast(yawed.transform)->AppendYRotation(GetRadian(static_cast(yawed.longitude))); EffectPrimitiveState& oriented = this->state.lastPrim->state; std::memcpy(oriented.rotTransform, oriented.transform, sizeof(oriented.rotTransform)); this->state.lastPrim->state.chCnt = 20; this->state.lastPrim->state.alpha = 200.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ice.tga", 0, false, true, false); } } RenderVertex screen{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, screen ); this->state.tlvertX = screen.x; this->state.tlvertY = screen.y; if (this->state.stateCnt != 0 && this->state.stateCnt != 7) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 25; this->state.lastPrim->state.speed = 0.85f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(40) - 20); this->state.lastPrim->state.widthSize = 1.0f; this->state.lastPrim->state.heightSize = 1.0f; this->state.lastPrim->state.changeWidthSpeed = 0.5f; this->state.lastPrim->state.changeHeightSpeed = 0.5f; this->state.lastPrim->state.heightSpeed = 6.0f; this->state.lastPrim->state.widthSpeed = 6.0f; this->state.lastPrim->state.changePoint = 10; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\smoke.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } // OFFSET: 0x00C0F1C0 // FUNCTION: fn_20029 bool CRagEffect::Concentration() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\ac_concentration.wav"); } return this->ProcessEZ2STR(0.0f, -80.0f, 0.0f) ? true : false; } // OFFSET: 0x00C0F470 // FUNCTION: fn_20030 bool CRagEffect::FirePillarBomb() { if (this->state.stateCnt == 30) { PlayEffectWave(*this, "effect\\wizard_fire_pillar_b.wav"); } if (this->state.stateCnt == 35) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } return this->ProcessEZ2STR(0.0f, -80.0f, 0.0f) ? true : false; } // OFFSET: 0x00C3D100 // FUNCTION: fn_20114 bool CRagEffect::ProcessEZ2STRAtTarget() { RenderObjectState& parent = this->state.parent->render; this->state.deltaPos2[0] = parent.position.x; this->state.deltaPos2[1] = parent.position.y; this->state.deltaPos2[2] = parent.position.z; parent.position.x = this->state.deltaPos[0]; parent.position.y = this->state.deltaPos[1]; parent.position.z = this->state.deltaPos[2]; if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { RenderObjectState& restored = this->state.parent->render; restored.position.x = this->state.deltaPos2[0]; restored.position.y = this->state.deltaPos2[1]; restored.position.z = this->state.deltaPos2[2]; return false; } RenderObjectState& restored = this->state.parent->render; restored.position.x = this->state.deltaPos2[0]; restored.position.y = this->state.deltaPos2[1]; restored.position.z = this->state.deltaPos2[2]; return true; } // OFFSET: 0x00C3DF90 // FUNCTION: fn_20116 void CRagEffect::TurnUndead() { if (this->state.stateCnt == 37) { PlayEffectWave(*this, "effect\\EF_Bash.wav"); } RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, vertex ); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.radius = 370.0f; this->state.lastPrim->state.radiusSpeed = -(this->state.lastPrim->state.radius / 20.0f); this->state.lastPrim->state.duration = 20; this->state.lastPrim->state.pattern |= 1; this->state.lastPrim->state.deltaPos2.y = -40.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 130.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 6.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); int loopCount = 20; if (this->state.stateCnt == 0) { loopCount = 5; } for (int index = 0; index < loopCount; ++index) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 20; this->state.lastPrim->state.chCnt = static_cast(-1); this->state.lastPrim->state.speed3d.x = this->state.parent->render.position.x; this->state.lastPrim->state.speed3d.y = this->state.parent->render.position.z; this->state.lastPrim->state.deltaPos2.y = -40.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.longSpeed = static_cast(ClampedRandom(60) + 10) / 10.0f; EffectPrimitiveState& flash = this->state.lastPrim->state; flash.longAccel = -(flash.longSpeed / static_cast(flash.duration)) / 1.5f; this->state.lastPrim->state.arcAngle = static_cast(ClampedRandom(25) + 5) / 10.0f; if (this->state.stateCnt == 0) { this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(30) + 350); this->state.lastPrim->state.heightSpeed = -static_cast(ClampedRandom(30) + 150) / 10.0f; } else { this->state.lastPrim->state.heightSize = 0.0f; this->state.lastPrim->state.heightSpeed = static_cast(ClampedRandom(20) + 50) / 10.0f; this->state.lastPrim->state.changePoint = 40; this->state.lastPrim->state.changeSpeed = static_cast(ClampedRandom(10) + 15) / 10.0f; this->state.lastPrim->state.changeAccel = 0.0f; this->state.lastPrim->state.changeHeightSpeed = 0.0f; } this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 150.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); } } CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 50) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 30; this->state.lastPrim->state.roll = 90.0f; this->state.lastPrim->state.widthSpeed = 1.5f; this->state.lastPrim->state.heightSpeed = 1.5f; this->state.lastPrim->state.deltaPos2.y = -7.0f; this->state.lastPrim->state.widthAccel = this->state.lastPrim->state.widthSpeed / 10.0f; this->state.lastPrim->state.heightAccel = this->state.lastPrim->state.heightSpeed / 10.0f; this->state.lastPrim->state.alpha = 150.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.changePoint = 15; this->state.lastPrim->state.changeWidthSpeed = 0.5f; this->state.lastPrim->state.changeWidthAccel = -0.5f / 15.0f; this->state.lastPrim->state.changeHeightSpeed = 0.5f; this->state.lastPrim->state.changeHeightAccel = -0.5f / 15.0f; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_liner.tga", 0, false, true, false); } } // OFFSET: 0x00C3E6C0 // FUNCTION: fn_20117 bool CRagEffect::TwoHandQuicken() { if (this->state.stateCnt == 0) { this->state.duration = 9999; PlayEffectWave(*this, "effect\\knight_twohandquicken.wav"); } return this->ProcessEZ2STR(0.0f, -80.0f, 0.0f) ? true : false; } // OFFSET: 0x00C5B8B0 // FUNCTION: fn_20222 void CRagEffect::SageMagicRod() { if (this->state.stateCnt == 0) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; PlayEffectWave(*this, "effect\\sage_magic rod.wav"); } } // OFFSET: 0x00C59610 // FUNCTION: fn_20213 void CRagEffect::SakuraFireArrow() { auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt >= 12 && this->state.stateCnt <= 15) { char waveName[52]; std::sprintf(waveName, "effect\\EF_FireArrow%d.wav", ClampedRandom(3) + 1); PlayEffectWave(*this, waveName); } if (this->state.stateCnt >= 20) { return; } this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 124, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.duration = this->state.duration; stored()->state.slots[0].life = 1; stored()->state.slots[0].maxHeight = static_cast(ClampedRandom(3) + 2) * 0.15f; stored()->state.size = static_cast(ClampedRandom(6) + 22) / 70.0f; stored()->state.slots[0].vecBPre.y = this->render.position.y; const std::int16_t angle = static_cast(ClampedRandom(360)); stored()->state.slots[0].vecBPre.x = g_cosTable[angle] * 8.0f + this->render.position.x; stored()->state.slots[0].vecBPre.z = g_sinTable[angle] * 8.0f + this->render.position.z; stored()->state.slots[0].height[0] = static_cast(ClampedRandom(360)); stored()->state.slots[0].height[1] = static_cast(ClampedRandom(360)); stored()->state.slots[0].height[2] = static_cast(ClampedRandom(360)); stored()->state.slots[0].height[3] = static_cast(ClampedRandom(360)); stored()->state.slots[1].life = 0; stored()->state.slots[2].life = 0; stored()->state.slots[3].life = 0; stored()->state.alpha = 250.0f; Owner(&stored()->state).SetSpriteName("이팩트\\sakura01.spr"); Owner(&stored()->state).SetActionName("이팩트\\sakura01.act"); Owner(&stored()->state).SetAction(ClampedRandom(3), 36, 0); Owner(&stored()->state).InitSegment(); } // OFFSET: 0x00C6D890 // FUNCTION: fn_20300 void CRagEffect::BeginSpellSwirl(int, const char*, char alpha) { char name[64]; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( "effect\\EF_BeginSpell.wav", this->render.position.x - player->render.position.x, -100.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); if (this->state.duration < 120) { this->state.duration = 120; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 149, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; if (alpha == 10) { this->state.lastPrim->state.totalTexture = 4; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; for (int index = 0; index < 4; ++index) { std::sprintf(name, "effect\\YBfire_%02d.bmp", index + 1); this->state.lastPrim->state.textures[index] = g_texMgr.Load(name, 0, false, true, false); } } else { this->state.lastPrim->state.totalTexture = 27; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; for (int index = 0; index < 27; ++index) { std::sprintf(name, "effect\\W_bubble%02d.tga", index + 1); this->state.lastPrim->state.textures[index] = g_texMgr.Load(name, 0, false, true, false); } } this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 23.0f; this->state.lastPrim->state.slots[0].rotStart = 180; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 4.3f; this->state.lastPrim->state.slots[0].riseAngle = 75; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 23.0f; this->state.lastPrim->state.slots[1].rotStart = 270; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 4.3f; this->state.lastPrim->state.slots[1].riseAngle = 63; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 23.0f; this->state.lastPrim->state.slots[2].rotStart = 0; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 4.3f; this->state.lastPrim->state.slots[2].riseAngle = 52; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 360; this->state.lastPrim->state.slots[3].maxHeight = 23.0f; this->state.lastPrim->state.slots[3].rotStart = 90; this->state.lastPrim->state.slots[3].alphaB = 0; this->state.lastPrim->state.slots[3].distance = 4.3f; this->state.lastPrim->state.slots[3].riseAngle = 40; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].alphaT = alpha; this->state.lastPrim->state.slots[index].vecBNow.y = 0.0f; for (int step = 0; step < 21; ++step) { this->state.lastPrim->state.slots[index].height[step] = 0.0f; this->state.lastPrim->state.slots[index].flag1[step] = 0; } } } // OFFSET: 0x00C6DDC0 // FUNCTION: fn_20301 void CRagEffect::SevereRainstormCylinder(int, const char*, char alpha, float distance) { char name[128]; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( "effect\\EF_BeginSpell.wav", this->render.position.x - player->render.position.x, -100.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); if (this->state.duration < 120) { this->state.duration = 120; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 173, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 9; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; for (int index = 0; index < 9; ++index) { std::sprintf(name, "effect\\new_severerainstorm\\new_severerainstorm_cylinder\\music_%02d.tga", index + 1); this->state.lastPrim->state.textures[index] = g_texMgr.Load(name, 0, false, true, false); } this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 120; this->state.lastPrim->state.slots[0].maxHeight = 20.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = distance; this->state.lastPrim->state.slots[0].riseAngle = 60; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 120; this->state.lastPrim->state.slots[1].maxHeight = 20.0f; this->state.lastPrim->state.slots[1].rotStart = 90; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = distance; this->state.lastPrim->state.slots[1].riseAngle = 55; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 120; this->state.lastPrim->state.slots[2].maxHeight = 20.0f; this->state.lastPrim->state.slots[2].rotStart = 180; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = distance; this->state.lastPrim->state.slots[2].riseAngle = 65; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 120; this->state.lastPrim->state.slots[3].maxHeight = 20.0f; this->state.lastPrim->state.slots[3].rotStart = 270; this->state.lastPrim->state.slots[3].alphaB = 0; this->state.lastPrim->state.slots[3].distance = distance; this->state.lastPrim->state.slots[3].riseAngle = 70; for (int slot = 0; slot < 4; ++slot) { this->state.lastPrim->state.slots[slot].alphaT = alpha; this->state.lastPrim->state.slots[slot].vecBNow.y = 0.0f; for (int index = 0; index < 21; ++index) { this->state.lastPrim->state.slots[slot].height[index] = 0.0f; this->state.lastPrim->state.slots[slot].flag1[index] = 0; } } } // OFFSET: 0x00C0E790 // FUNCTION: fn_20026 void CRagEffect::AssassinCloaking() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\assasin_cloaking.wav"); } this->state.parent->SetColor(50, -1, -1, -1); this->render.visibilityOptions[0] = 0; } // OFFSET: 0x00C1E4A0 // FUNCTION: fn_20078 bool CRagEffect::ProcessEZ2STRRaised() { return this->ProcessEZ2STR(0.0f, -80.0f, 0.0f) ? true : false; } // OFFSET: 0x00C1E530 // FUNCTION: fn_20079 void CRagEffect::LockOnMarker() { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.pattern |= 0x800u; this->state.lastPrim->state.longitude = 0.0f; this->state.lastPrim->state.longSpeed = 4.5f; this->state.lastPrim->state.roll = 90.0f; this->state.lastPrim->state.changeWidthAccel = 0.0f; this->state.lastPrim->state.changeHeightAccel = 0.0f; this->state.lastPrim->state.widthSize = 30.0f; this->state.lastPrim->state.heightSize = 30.0f; this->state.lastPrim->state.widthSpeed = -1.0f; this->state.lastPrim->state.heightSpeed = -1.0f; this->state.lastPrim->state.changePoint = 20; this->state.lastPrim->state.changeWidthSpeed = 0.0f; this->state.lastPrim->state.changeHeightSpeed = 0.0f; AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.RGBCycleDelay = 20; this->state.lastPrim->state.red = 250; this->state.lastPrim->state.blue = 150; this->state.lastPrim->state.blueSpeed = -15; this->state.lastPrim->state.green = 150; this->state.lastPrim->state.greenSpeed = -15; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\LockOn128.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.pattern |= 0x800u; this->state.lastPrim->state.longitude = 45.0f; this->state.lastPrim->state.longSpeed = 4.5f; this->state.lastPrim->state.roll = 90.0f; this->state.lastPrim->state.widthSize = 30.0f; this->state.lastPrim->state.heightSize = 30.0f; this->state.lastPrim->state.widthSpeed = -1.0f; this->state.lastPrim->state.heightSpeed = -1.0f; this->state.lastPrim->state.changePoint = 20; this->state.lastPrim->state.changeWidthSpeed = 0.0f; this->state.lastPrim->state.changeHeightSpeed = 0.0f; this->state.lastPrim->state.changeWidthAccel = 0.0f; this->state.lastPrim->state.changeHeightAccel = 0.0f; this->state.lastPrim->state.RGBCycleDelay = 20; this->state.lastPrim->state.red = 250; this->state.lastPrim->state.blue = 150; this->state.lastPrim->state.blueSpeed = -15; this->state.lastPrim->state.green = 150; this->state.lastPrim->state.greenSpeed = -15; AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\LockOn128.tga", 0, false, true, false); } CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; this->render.position.y = world->terrain->Height(this->render.position.x, this->render.position.z) - 2.0f; } // OFFSET: 0x00C1EC30 // FUNCTION: fn_20080 void CRagEffect::MagnumBreak() { if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\EF_MagnumBreak.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.renderFlag |= 0x200u; this->state.lastPrim->state.latitude = 90.0f; this->state.lastPrim->state.radiusSpeed = 1.75f; EffectPrimitiveState& inner = this->state.lastPrim->state; inner.radiusAccel = -(inner.radiusSpeed / inner.duration) * 0.5f; this->state.lastPrim->state.innerSize = 12.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 15.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 15; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 14, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.radiusSpeed = 1.15f; EffectPrimitiveState& blast = this->state.lastPrim->state; blast.radiusAccel = -(blast.radiusSpeed / blast.duration) * 0.5f; this->state.lastPrim->state.longSpeed = 3.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 15.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 15; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\대폭발.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 30; this->state.lastPrim->state.renderFlag |= 0x200u; this->state.lastPrim->state.latitude = 90.0f; this->state.lastPrim->state.radiusSpeed = 1.75f; EffectPrimitiveState& outer = this->state.lastPrim->state; outer.radiusAccel = -(outer.radiusSpeed / outer.duration) * 0.5f; this->state.lastPrim->state.innerSize = 12.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 15.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 15; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); } // OFFSET: 0x00C1F130 // FUNCTION: fn_20081 void CRagEffect::SpawnBlurAfterimage() { if (HasTint(*this->state.parent)) { SetBlendedTint(*this->state.parent, *this->state.parent, this->render.position); if (this->state.stateCnt == 9998) { this->state.stateCnt = 0; } else if (this->state.stateCnt % 5 != 0) { return; } CRenderObject* blur = new CBlurPC(reinterpret_cast(this->state.parent)); SetBlendedTint(*blur, *this->state.parent, this->render.position); WorldObjects().push_back(blur); return; } this->state.parent->SetColor( -1, static_cast(this->render.position.x), static_cast(this->render.position.y), static_cast(this->render.position.z) ); if (this->state.stateCnt == 9998) { this->state.stateCnt = 0; } if (this->render.position.x == -1.0f) { const int value = std::rand() % 14 > 0 ? 200 : 250; this->state.parent->SetColor(-1, 250, value, value); return; } if (this->render.position.x == -2.0f) { this->state.parent->SetColor(-1, 250, 250, 200); return; } CBlurPC* blur; if (this->state.duration == 30) { blur = new CBlurPC(reinterpret_cast(this->state.parent)); } else { if (this->state.stateCnt % 5 != 0) { return; } const std::uint32_t action = this->state.parent->render.state; if (action == 0 || action == 10 || action == 6 || action == 11 || action == 13) { return; } blur = new CBlurPC(reinterpret_cast(this->state.parent)); } SendAfterimageColor(*blur, *this, this->render.position); WorldObjects().push_back(blur); } // OFFSET: 0x00C1F430 // FUNCTION: fn_20082 void CRagEffect::SpawnHallucinationOnce() { if (HasTint(*this->state.parent)) { SetBlendedTint(*this->state.parent, *this->state.parent, this->render.position); if (this->state.stateCnt == 9998) { this->state.stateCnt = 0; } else if (this->state.stateCnt != 0) { return; } CRenderObject* hallu = new CHalluPC(reinterpret_cast(this->state.parent)); SetBlendedTint(*hallu, *this->state.parent, this->render.position); WorldObjects().push_back(hallu); return; } this->state.parent->SetColor( -1, static_cast(this->render.position.x), static_cast(this->render.position.y), static_cast(this->render.position.z) ); if (this->state.stateCnt == 9998) { this->state.stateCnt = 0; } else if (this->state.stateCnt != 0) { return; } CHalluPC* hallu = new CHalluPC(reinterpret_cast(this->state.parent)); SendAfterimageColor(*hallu, *this, this->render.position); CRenderObject* object = hallu; WorldObjects().push_back(object); } // OFFSET: 0x00C1F660 // FUNCTION: fn_20083 void CRagEffect::SpawnHallucinationTrail() { if (HasTint(*this->state.parent)) { SetBlendedTint(*this->state.parent, *this->state.parent, this->render.position); if (this->state.stateCnt == 9998) { this->state.stateCnt = 0; } else if (this->state.stateCnt % 5 != 0) { return; } CRenderObject* hallu = new CHalluPC2(reinterpret_cast(this->state.parent)); SetBlendedTint(*hallu, *this->state.parent, this->render.position); WorldObjects().push_back(hallu); return; } if (this->state.stateCnt == 9998) { this->state.stateCnt = 0; } CHalluPC2* hallu; if (this->state.duration == 30) { hallu = new CHalluPC2(reinterpret_cast(this->state.parent)); } else { if (this->state.stateCnt % 5 != 0) { return; } hallu = new CHalluPC2(reinterpret_cast(this->state.parent)); } WorldObjects().push_back(hallu); } // OFFSET: 0x00C1F870 // FUNCTION: fn_20084 void CRagEffect::SpawnActorHallucination() { if (HasTint(*this->state.parent)) { SetBlendedTint(*this->state.parent, *this->state.parent, this->render.position); if (this->state.stateCnt == 9998) { this->state.stateCnt = 0; } else if (this->state.stateCnt % 20 != 0) { return; } CRenderObject* hallu; if (!IsPlayerJob(reinterpret_cast(this->state.parent)->GetEffectiveJob(-1))) { hallu = new CHalluNPC(reinterpret_cast(this->state.parent)); } else { hallu = new CHalluPC(reinterpret_cast(this->state.parent)); } SetBlendedTint(*hallu, *this->state.parent, this->render.position); WorldObjects().push_back(hallu); return; } this->state.parent->SetColor( -1, static_cast(this->render.position.x), static_cast(this->render.position.y), static_cast(this->render.position.z) ); if (this->state.stateCnt == 9998) { this->state.stateCnt = 0; } if (this->state.duration != 41 && this->state.stateCnt % 20 != 0) { return; } CRenderObject* hallu; if (!IsPlayerJob(reinterpret_cast(this->state.parent)->GetEffectiveJob(-1))) { hallu = new CHalluNPC(reinterpret_cast(this->state.parent)); } else { hallu = new CHalluPC(reinterpret_cast(this->state.parent)); } SendAfterimageColor(*hallu, *this, this->render.position); WorldObjects().push_back(hallu); } // OFFSET: 0x00C1FE80 // FUNCTION: fn_20085 void CRagEffect::NapalmFragments() { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, vertex ); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt >= 15 || this->state.stateCnt % 5 > this->state.stateCnt) { return; } if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_NapalmBeat.wav"); } this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 30; const int distance = ClampedRandom(50) + 10; const float radius = static_cast(distance); const float angle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.deltaPos2.x = ClientSine(static_cast(angle)) * radius; this->state.lastPrim->state.deltaPos2.y = ClientCosine(static_cast(angle)) * -static_cast(distance); this->state.lastPrim->state.deltaPos2.y -= 20.0f; const float size = static_cast(ClampedRandom(40) + 20); this->state.lastPrim->state.heightSize = size; this->state.lastPrim->state.widthSize = size; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; EffectPrimitiveState& fade = this->state.lastPrim->state; fade.fadeOutCnt = fade.duration - fade.duration / 3; this->state.lastPrim->state.repeatAnim = 0; this->state.lastPrim->state.animSpeed = 2; this->state.lastPrim->state.totalTexture = 8; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; for (int index = 0; index < static_cast(this->state.lastPrim->state.totalTexture); ++index) { char name[128]; std::sprintf(name, "effect\\폭발%d.TGA", index + 1); this->state.lastPrim->state.textures[index] = g_texMgr.Load(name, 0, false, true, false); } this->state.lastPrim->state.slots[0].life = 0; } // OFFSET: 0x00C20240 // FUNCTION: fn_20086 bool CRagEffect::OnProcess2() { switch (this->state.type) { case EF_CHEMICALPROTECTION: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "apocalips_attack.wav"); } this->ShockwaveRing(30); this->ShockwaveRing(60); break; case EF_POKJUK_SOUND: this->Fireworks(); break; case EF_DEMONSTRATION: this->Demonstration(); break; case EF_CHEMICAL2: this->SlashFan(0); this->SlashFan(1); if (this->state.stateCnt == 44) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\연주붕격.wav"); } if (this->state.stateCnt >= 20 && this->state.stateCnt <= 120) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 255, 255, 150); } break; case EF_TELEPORTATION2: this->TeleportRings("effect\\Magic_Violet.tga", 0); break; case EF_PHARMACY_OK: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\p_success.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_PHARMACY_FAIL: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\p_failed.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_FORESTLIGHT: this->ForestLight("effect\\cloud11.tga", 0); break; case EF_THROWITEM3: this->ThrowItem("유저인터페이스\\item\\돌.bmp", 2); break; case EF_FIRSTAID: this->FirstAid(); break; case EF_SPRINKLESAND: for (int index = 0; index < 20; ++index) { this->ThunderSparks(); } break; case EF_LOUD: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\고성방가.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_HEAL: this->HealBurst("effect\\alpha_down.tga", 0); break; case EF_HEAL2: this->HealRingSparkle("effect\\ring_white.tga", 0); break; case EF_EXIT2: this->TeleportSpiral("effect\\ring_purple.tga"); break; case EF_GLASSWALL2: if (!this->GlassWallRising("effect\\alpha_down.tga")) { return false; } break; case EF_READYPORTAL2: this->BlueRingWave(); break; case EF_PORTAL2: this->VioletRingCloud(0); break; case EF_BOTTOM_MAG: this->TexturedPulseKind("effect\\ring_red.tga", 0); break; case EF_BOTTOM_SANC: this->TexturedPulseKind("effect\\alpha_down.tga", 1); break; case EF_HEAL3: this->HealBurst("effect\\alpha_down.tga", 1); break; case EF_WARPZONE2: this->AlphaDownRipples("effect\\ring_blue.tga", 0); break; case EF_FORESTLIGHT2: this->ForestLight("effect\\cloud11.tga", 1); break; case EF_FORESTLIGHT3: this->ForestLight("effect\\cloud11.tga", 2); break; case EF_FORESTLIGHT4: this->ForestLight("effect\\cloud11.tga", 10); break; case EF_HEAL4: this->HealRingSparkle("effect\\ring_white.tga", 1); break; case EF_FOOT: this->TexturedRise("effect\\foot_l_b.tga", 0); break; case EF_FOOT2: this->TexturedRise("effect\\foot_r_b.tga", 0); break; case EF_BEGINASURA: this->AsuraStrike(0); break; case EF_TRIPLEATTACK: this->CloudDrift(); break; case EF_HITLINE: this->WhiteSparks(0); break; case EF_HPTIME: this->TexturedRisingOrbs("effect\\white02.bmp", 0); break; case EF_SPTIME: this->TexturedRisingOrbs("effect\\white02.bmp", 1); break; case EF_MAPLE: this->Maple(); break; case EF_BLIND: this->BLIND(0); break; case EF_POISON: this->POISON(0); break; case EF_GUARD: this->KyrieGuard("effect\\guardK.tga", 0); break; case EF_JOBLVUP50: this->JobLvUp50(0); this->JobLvUp50(45); break; case EF_ANGEL2: this->SuperAngel(0); this->SuperAngel(1); this->SuperAngel(2); this->SuperAngel(3); break; case EF_MAGNUM2: this->Magnum2("effect\\ring_yellow.tga"); break; case EF_CALLZONE: this->CALLZONE("effect\\white02.bmp"); break; case EF_PORTAL3: this->VioletRingCloud(3); break; case EF_COUPLECASTING: this->TexturedSpellRings("effect\\ring_red.tga"); break; case EF_HEARTCASTING: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); const float cell = 0.27f; this->RingRedPulse("effect\\ring_red.tga", 0 * cell, 37 * cell); this->RingRedPulse("effect\\ring_red.tga", -13 * cell, 44 * cell); this->RingRedPulse("effect\\ring_red.tga", -29 * cell, 48 * cell); this->RingRedPulse("effect\\ring_red.tga", -46 * cell, 42 * cell); this->RingRedPulse("effect\\ring_red.tga", -56 * cell, 26 * cell); this->RingRedPulse("effect\\ring_red.tga", -57 * cell, 6 * cell); this->RingRedPulse("effect\\ring_red.tga", -51 * cell, -12 * cell); this->RingRedPulse("effect\\ring_red.tga", -40 * cell, -26 * cell); this->RingRedPulse("effect\\ring_red.tga", -25 * cell, -38 * cell); this->RingRedPulse("effect\\ring_red.tga", -10 * cell, -47 * cell); this->RingRedPulse("effect\\ring_red.tga", 0 * cell, -60 * cell); this->RingRedPulse("effect\\ring_red.tga", 11 * cell, -47 * cell); this->RingRedPulse("effect\\ring_red.tga", 26 * cell, -38 * cell); this->RingRedPulse("effect\\ring_red.tga", 41 * cell, -26 * cell); this->RingRedPulse("effect\\ring_red.tga", 52 * cell, -12 * cell); this->RingRedPulse("effect\\ring_red.tga", 58 * cell, 6 * cell); this->RingRedPulse("effect\\ring_red.tga", 57 * cell, 26 * cell); this->RingRedPulse("effect\\ring_red.tga", 47 * cell, 42 * cell); this->RingRedPulse("effect\\ring_red.tga", 30 * cell, 48 * cell); this->RingRedPulse("effect\\ring_red.tga", 14 * cell, 44 * cell); } break; case EF_ENTRY2: this->PortalRings(); break; case EF_SAINTWING: this->TexturedPair("effect\\wing003.bmp"); break; case EF_SPHEREWIND: for (int angle = 0; angle < 45; angle += 9) { this->FeatherRing("effect\\blue_ivy.bmp", static_cast(angle), 0); } break; case EF_COLORPAPER: for (int index = 0; index < 50; ++index) { this->WeddingBurst("effect\\white02.bmp", 0); } break; case EF_LIGHTSPHERE: this->TexturedAura("effect\\thunder_center.bmp", 0); for (int index = 0; index < 80; ++index) { this->TexturedSparkle("effect\\white02.bmp"); } break; case EF_WATERFALL: this->Waterfall("", 0, 0, 0); for (int index = 0; index < 40; ++index) { this->FrostScatter(0, 0); } break; case EF_WATERFALL_90: this->Waterfall("", 1, 0, 0); for (int index = 0; index < 40; ++index) { this->FrostScatter(1, 0); } break; case EF_WATERFALL_SMALL: this->Waterfall("", 0, 1, 0); for (int index = 0; index < 20; ++index) { this->FrostScatter(0, 1); } break; case EF_WATERFALL_SMALL_90: this->Waterfall("", 1, 1, 0); for (int index = 0; index < 20; ++index) { this->FrostScatter(1, 1); } break; case EF_WATERFALL_T2: this->Waterfall("", 0, 0, 1); for (int index = 0; index < 40; ++index) { this->FrostScatter(0, 0); } break; case EF_WATERFALL_T2_90: this->Waterfall("", 1, 0, 1); for (int index = 0; index < 40; ++index) { this->FrostScatter(1, 0); } break; case EF_WATERFALL_SMALL_T2: this->Waterfall("", 0, 1, 1); for (int index = 0; index < 20; ++index) { this->FrostScatter(0, 1); } break; case EF_WATERFALL_SMALL_T2_90: this->Waterfall("", 1, 1, 1); for (int index = 0; index < 20; ++index) { this->FrostScatter(1, 1); } break; case EF_GHOST: this->Ghost(0); break; case EF_BAT: this->Ghost(1); break; case EF_BAT2: this->Ghost(2); break; case EF_SOULBREAKER: if (this->state.stateCnt == 20) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\기공포.wav"); } if (this->state.stateCnt >= 0 && this->state.stateCnt <= 10) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 255, 0, 255); } this->SonicWave(0); break; case EF_LEVEL99_4: this->FreezingCircle(1); break; case EF_VALLENTINE: this->Vallentine(0); break; case EF_VALLENTINE2: this->Vallentine(1); break; case EF_PRESSURE: if (this->state.stateCnt == 3) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\프레셔.wav"); } this->TexturedRain("effect\\cross_old.bmp", 0); this->TexturedLevelRing("effect\\explosive_1_128.bmp", -28, 0); break; case EF_BASH3D: if (this->state.stateCnt == 22) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\세크리파이스.wav"); } for (int phase = 0; phase < 5; ++phase) { this->TexturedQuadSpin("effect\\alpha_center.tga", static_cast(phase), 0); } if (this->state.stateCnt >= 20 && this->state.stateCnt <= 40) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 255, 200, 200); } break; case EF_AURABLADE: this->WhiteYellowRings(); break; case EF_REDBODY: if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 255, 100, 100); break; case EF_LKCONCENTRATION: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\knight_twohandquicken.wav"); } this->state.parent->SetColor(-1, 255, 255, 160); this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_BOTTOM_GOSPEL: this->Bottom_Music("effect\\cross_old.bmp", 9); break; case EF_ANGEL: case EF_DEVIL: if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_DRAGONSMOKE: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2], WorldObjects())->state; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->rollSpeed = 0.75f; EffectPrimitiveState& tilted = *this->state.currentPrimitive; reinterpret_cast(tilted.transform)->MakeXRotation(GetRadian(std::max(rand() % 30, 0) + 75)); EffectPrimitiveState& turned = *this->state.currentPrimitive; reinterpret_cast(turned.transform)->AppendYRotation(GetRadian(std::max(rand() % 360, 0))); this->state.currentPrimitive->deltaPos2.y = -9.0f; this->state.currentPrimitive->speed = static_cast(std::max(rand() % 3, 0) + 3) / 10.0f; this->state.currentPrimitive->size = 1.5f; EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 3; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\굴뚝연기.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\굴뚝연기.act"); Owner(this->state.currentPrimitive).InitSegment(); } break; } return true; } // OFFSET: 0x00C35160 // FUNCTION: fn_20089 void CRagEffect::StoneCurseRing() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\black_overthrust.wav"); } RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; g_renderer->viewport.Project(&this->state.parent->render.position.x, view, vertex); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt != 0) { return; } this->state.duration = 9999; PlayEffectWave(*this, "effect\\EF_StoneCurse.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; this->state.lastPrim->state.deltaPos2.y = -20.0f; this->state.lastPrim->state.arcAngle = 10.0f; this->state.lastPrim->state.innerSize = 10.0f; this->state.lastPrim->state.radiusSpeed = 7.0f; EffectPrimitiveState& ring = this->state.lastPrim->state; const float slowdown = -(ring.radiusSpeed / (ring.duration + 40)); ring.radiusAccel = slowdown + slowdown; this->state.lastPrim->state.fadeOutCnt = 0; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); } // OFFSET: 0x00C49300 // FUNCTION: fn_20166 void CRagEffect::SkyCloud(char kind) { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); this->render.position.x = player->render.position.x; this->render.position.y = player->render.position.y; this->render.position.z = player->render.position.z; if (this->state.stateCnt == 99999998) { this->state.stateCnt = 0; this->state.duration = 99999999; } else if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 33, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1u; this->state.lastPrim->state.renderFlag |= 5u; this->state.lastPrim->state.duration = this->state.duration; if (kind == 3) { this->state.lastPrim->state.totalTexture = 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; const char pick = static_cast(ClampedRandom(3)); if (pick == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\fog1.tga", 0, false, true, false); } else if (pick == 1) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\fog2.tga", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\fog3.tga", 0, false, true, false); } } else if (kind == 9 || kind == 15) { this->state.lastPrim->state.totalTexture = 6; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\star01.bmp", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\star02.bmp", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\star03.bmp", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\star04.bmp", 0, false, true, false); this->state.lastPrim->state.textures[4] = g_texMgr.Load("effect\\star05.bmp", 0, false, true, false); this->state.lastPrim->state.textures[5] = g_texMgr.Load("effect\\star06.bmp", 0, false, true, false); } else { this->state.lastPrim->state.totalTexture = 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; const char pick = static_cast(ClampedRandom(3)); if (pick == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\cloud4.tga", 0, false, true, false); } else if (pick == 1) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\cloud1.tga", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\cloud2.tga", 0, false, true, false); } } const float layer = static_cast(kind); for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].height[7] = layer; this->state.lastPrim->state.slots[index].fullDisplayAngle = 45; if (kind == 0) { this->state.lastPrim->state.slots[index].height[6] = -152.0f; if (this->render.position.y > this->state.lastPrim->state.slots[index].height[6]) { this->state.lastPrim->state.slots[index].process = 300; } } this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].rotStart = static_cast(ClampedRandom(200) + 300); if (kind == 0) { this->state.lastPrim->state.slots[index].vecBNow.y = static_cast(ClampedRandom(10)) - 125.0f; this->state.lastPrim->state.slots[index].vecBNow.x = static_cast(ClampedRandom(300) - 150); this->state.lastPrim->state.slots[index].vecBNow.z = static_cast(ClampedRandom(300) - 150); } else if (kind == 2) { this->state.lastPrim->state.slots[index].vecBNow.y = static_cast(ClampedRandom(10)) + 0.0f; this->state.lastPrim->state.slots[index].vecBNow.x = static_cast(ClampedRandom(300) - 150); this->state.lastPrim->state.slots[index].vecBNow.z = static_cast(ClampedRandom(300) - 150); } else if (kind == 3) { this->state.lastPrim->state.slots[index].vecBNow.x = static_cast(ClampedRandom(300) - 150); this->state.lastPrim->state.slots[index].vecBNow.z = static_cast(ClampedRandom(300) - 150); const CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); const EffectPrimitiveSlot& slot = this->state.lastPrim->state.slots[index]; this->state.lastPrim->state.slots[index].vecBNow.y = mode->scene->terrain->Height(slot.vecBNow.x + this->render.position.x, this->render.position.z + slot.vecBNow.z) - 20.0f - static_cast(ClampedRandom(5)); } else if (kind == 5) { this->state.lastPrim->state.slots[index].vecBNow.y = static_cast(ClampedRandom(10)) + 20.0f; this->state.lastPrim->state.slots[index].vecBNow.x = static_cast(ClampedRandom(300) - 150); this->state.lastPrim->state.slots[index].vecBNow.z = static_cast(ClampedRandom(300) - 150); } else if (kind == 9 || kind == 15) { this->state.lastPrim->state.slots[index].vecBNow.y = static_cast(ClampedRandom(10)) + 80.0f; this->state.lastPrim->state.slots[index].vecBNow.x = static_cast(ClampedRandom(200) + 25); this->state.lastPrim->state.slots[index].vecBNow.z = static_cast(ClampedRandom(200) + 25); if (std::string(static_cast(g_modeMgr.GetGameMode())->mapName) == "ecl_fild01.rsw") { this->state.lastPrim->state.slots[index].vecBNow.x = static_cast(ClampedRandom(400) + 25); this->state.lastPrim->state.slots[index].vecBNow.z = static_cast(ClampedRandom(400) + 25); } if (ClampedRandom(2) == 0) { this->state.lastPrim->state.slots[index].vecBNow.x = this->state.lastPrim->state.slots[index].vecBNow.x * -1.0f; } if (ClampedRandom(2) == 0) { this->state.lastPrim->state.slots[index].vecBNow.z = this->state.lastPrim->state.slots[index].vecBNow.z * -1.0f; } } else { this->state.lastPrim->state.slots[index].vecBNow.y = static_cast(ClampedRandom(10)) + 40.0f; this->state.lastPrim->state.slots[index].vecBNow.x = static_cast(ClampedRandom(200) + 25); if (ClampedRandom(2) == 0) { this->state.lastPrim->state.slots[index].vecBNow.x = this->state.lastPrim->state.slots[index].vecBNow.x * -1.0f; } this->state.lastPrim->state.slots[index].vecBNow.z = static_cast(ClampedRandom(200) + 25); if (ClampedRandom(2) == 0) { this->state.lastPrim->state.slots[index].vecBNow.z = this->state.lastPrim->state.slots[index].vecBNow.z * -1.0f; } } this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x + this->state.lastPrim->state.slots[index].vecBNow.x; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z + this->state.lastPrim->state.slots[index].vecBNow.z; this->state.lastPrim->state.slots[index].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[3] = static_cast(ClampedRandom(360)); if (kind == 3) { this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(10)) + 35.0f; } else { this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(20)) + 30.0f; } this->state.lastPrim->state.slots[index].height[8] = static_cast(ClampedRandom(360)); if (kind == 3) { this->state.lastPrim->state.slots[index].flag1[2] = 12; } else if (kind == 5) { this->state.lastPrim->state.slots[index].flag1[2] = 14; } else if (kind == 7) { this->state.lastPrim->state.slots[index].flag1[2] = 16; } else if (kind == 8) { this->state.lastPrim->state.slots[index].flag1[2] = 17; } else if (kind == 9) { this->state.lastPrim->state.slots[index].flag1[2] = 23; } else if (kind == 15) { this->state.lastPrim->state.slots[index].flag1[2] = 25; } else if (kind == 11) { this->state.lastPrim->state.slots[index].flag1[2] = 14; } else if (kind == 12) { this->state.lastPrim->state.slots[index].flag1[2] = 16; } else if (kind == 13) { this->state.lastPrim->state.slots[index].flag1[2] = 17; } else { this->state.lastPrim->state.slots[index].flag1[2] = kind == 14 ? 24 : 0; } } } // OFFSET: 0x00C49E60 // FUNCTION: fn_20167 void CRagEffect::SnowDrift(char flag) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 134, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 4; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\E9_snow.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\E9_snow01.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\E9_snow02.tga", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\E9_snow03.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].distance = static_cast(rand() % 21) * 0.08f + 2.5f; this->state.lastPrim->state.slots[index].vecBPre.y = this->render.position.y - 12.0f; this->state.lastPrim->state.slots[index].flag1[2] = static_cast(rand() % 4); this->state.lastPrim->state.slots[index].height[10] = 0.0f; this->state.lastPrim->state.slots[index].fullDisplayAngle = static_cast(rand() % 360); this->state.lastPrim->state.slots[index].height[8] = 0.0f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; Get_Angle(this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], &this->state.lastPrim->state.slots[index].riseAngle); this->state.lastPrim->state.slots[index].riseAngle += static_cast(rand() % 41 + 160); if (this->state.lastPrim->state.slots[index].riseAngle >= 360) { this->state.lastPrim->state.slots[index].riseAngle -= 360; } this->state.lastPrim->state.slots[index].vecBNow.x = this->state.deltaPos[0]; this->state.lastPrim->state.slots[index].vecBNow.z = this->state.deltaPos[2]; this->state.lastPrim->state.slots[index].vecBNow.y = this->state.lastPrim->state.slots[index].vecBPre.y; this->state.lastPrim->state.slots[index].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].flag1[0] = 3; this->state.lastPrim->state.slots[index].flag1[4] = flag; this->state.lastPrim->state.slots[index].flag1[5] = static_cast(60 - rand() % 21); } } // OFFSET: 0x00C4E730 // FUNCTION: fn_20178 void CRagEffect::ElectricRingEarly(char kind, std::int16_t angle) { CopyVector(this->render.position, this->state.parent->render.position); if (static_cast(this->state.stateCnt) >= 4) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 101, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\elec1.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } const std::int16_t phase = kind; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].maxHeight = 0.1f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].riseAngle = static_cast(index * 45 + angle); this->state.lastPrim->state.slots[index].distance = 0.0f; this->state.lastPrim->state.slots[index].height[0] = 0.0f; this->state.lastPrim->state.slots[index].vecTNow.x = static_cast(ClampedRandom(11)) * 0.01f; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[index].vecBNow.y -= 5.0f; this->state.lastPrim->state.slots[index].vecTNow.y = 20.0f; for (int height = 20; height > 0; --height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].alphaT = phase; this->state.lastPrim->state.slots[index].fullDisplayAngle = 3; } } // OFFSET: 0x00C4EAF0 // FUNCTION: fn_20179 void CRagEffect::ElectricRing(char kind, std::int16_t angle) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (static_cast(this->state.stateCnt - 11) >= 4) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 101, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\elec1.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } const std::int16_t phase = kind; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].maxHeight = 0.1f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].riseAngle = static_cast(index * 45 + angle); this->state.lastPrim->state.slots[index].distance = 0.0f; this->state.lastPrim->state.slots[index].height[0] = 0.0f; this->state.lastPrim->state.slots[index].vecTNow.x = static_cast(ClampedRandom(11)) * 0.01f; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[index].vecTNow.y = 20.0f; for (int height = 20; height > 0; --height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].alphaT = phase; this->state.lastPrim->state.slots[index].fullDisplayAngle = 0; } } // OFFSET: 0x00C4EEA0 // FUNCTION: fn_20180 void CRagEffect::ElectricRingLate(char kind, std::int16_t angle) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (static_cast(this->state.stateCnt - 20) >= 4) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 101, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\elec1.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } const std::int16_t phase = kind; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].maxHeight = 0.1f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].riseAngle = static_cast(index * 45 + angle); this->state.lastPrim->state.slots[index].distance = 0.0f; this->state.lastPrim->state.slots[index].height[0] = 0.0f; this->state.lastPrim->state.slots[index].vecTNow.x = static_cast(ClampedRandom(11)) * 0.01f; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[index].vecTNow.y = 20.0f; for (int height = 20; height > 0; --height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].alphaT = phase; this->state.lastPrim->state.slots[index].fullDisplayAngle = 0; } } // OFFSET: 0x00C58BB0 // FUNCTION: fn_20209 void CRagEffect::WhiteSparks(char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (static_cast(this->state.stateCnt) >= 4) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 70, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1; this->state.lastPrim->state.renderFlag |= 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; const std::int16_t phase = kind; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = -ClampedRandom(26); this->state.lastPrim->state.slots[index].maxHeight = 0.1f; this->state.lastPrim->state.slots[index].alphaB = static_cast(ClampedRandom(51) + 125); this->state.lastPrim->state.slots[index].riseAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(8)) + 6.0f; this->state.lastPrim->state.slots[index].flag1[0] = 0; this->state.lastPrim->state.slots[index].height[0] = 0.0f; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; for (int height = 20; height > 0; --height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } this->state.lastPrim->state.slots[index].alphaT = phase; } } // OFFSET: 0x00C67E30 // FUNCTION: fn_20282 void CRagEffect::AlphaCenterTrail() { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt >= 4) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; const float deltaZ = this->state.deltaPos[2] - this->render.position.z; const float deltaX = this->state.deltaPos[0] - this->render.position.x; const float distance = SquareRoot(deltaZ * deltaZ + deltaX * deltaX); for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = -45 - ClampedRandom(20); Get_Angle(deltaX, deltaZ, &this->state.lastPrim->state.slots[index].rotStart); this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].vecBNow.x = (static_cast(ClampedRandom(100)) * 0.08f - 4.0f) + this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.z = (static_cast(ClampedRandom(100)) * 0.08f - 4.0f) + this->render.position.z; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[index].height[1] = static_cast(ClampedRandom(100)) * 0.15f; this->state.lastPrim->state.slots[index].vecBNow.x -= g_cosTable[this->state.lastPrim->state.slots[index].rotStart] * this->state.lastPrim->state.slots[index].height[1]; this->state.lastPrim->state.slots[index].vecBNow.z -= g_sinTable[this->state.lastPrim->state.slots[index].rotStart] * this->state.lastPrim->state.slots[index].height[1]; this->state.lastPrim->state.slots[index].vecTNow.x = this->state.lastPrim->state.slots[index].vecBNow.x; this->state.lastPrim->state.slots[index].vecTNow.z = this->state.lastPrim->state.slots[index].vecBNow.z; this->state.lastPrim->state.slots[index].vecTNow.y = this->render.position.y; this->state.lastPrim->state.slots[index].maxHeight = 0.05f; this->state.lastPrim->state.slots[index].height[0] = static_cast(ClampedRandom(100)) * 0.04f + 8.0f; this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(100)) * 0.6f + distance; this->state.lastPrim->state.slots[index].height[4] = 2.0f; } } // OFFSET: 0x00C6B3E0 // FUNCTION: fn_20293 void CRagEffect::Waterfall(const char* name, char flag, char tall, char variant) { if (this->state.stateCnt != 0) { return; } const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; this->state.lastPrim = CreateEffectParticle(*this, this->render, 79, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (variant == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\waterfall11.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\waterfall12.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\waterfall13.tga", 0, false, true, false); } else if (variant == 1) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\waterfall31.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\waterfall32.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\waterfall33.tga", 0, false, true, false); } int width = 80; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].alphaB = 80; this->state.lastPrim->state.slots[index].flag1[0] = flag; if (tall == 0) { this->state.lastPrim->state.slots[index].distance = static_cast(index + 36); } else if (tall == 1) { this->state.lastPrim->state.slots[index].distance = static_cast(index + 18); } this->state.lastPrim->state.slots[index].flag1[2] = static_cast(static_cast(this->state.param[0])); for (int height = 0; height < 20; ++height) { this->state.lastPrim->state.slots[index].height[height] = static_cast(height * 40); } this->state.lastPrim->state.slots[index].vecBNow.z = static_cast(index) - 1.0f; this->state.lastPrim->state.slots[index].maxHeight = static_cast(width); this->state.lastPrim->state.slots[index].flag1[1] = 0; width -= 13; if (width < 29) { return; } } } // OFFSET: 0x00C16620 // FUNCTION: fn_20057 bool CRagEffect::GlassWall() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_GlassWall.wav"); const int facing = static_cast(180.0f - this->state.parent->render.angle); const int angle = facing < 0 ? facing + 360 : facing; matrix rotation; rotation.MakeYRotation(GetRadian(angle)); const float* m = rotation.values; for (int side = 1; side > -2; side -= 2) { const float along = static_cast(side) * 2.6f; this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.pattern = 40; this->state.lastPrim->state.type = 50; this->state.lastPrim->state.deltaPos2 = RotatedForward(m, along); this->state.lastPrim->state.longitude = static_cast(angle + 90); this->state.lastPrim->state.widthSize = 3.0f; this->state.lastPrim->state.heightSize = 40.0f; this->state.lastPrim->state.heightSpeed = 0.25f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 180.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 6.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 6; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); const float across = static_cast(side) * 3.0f; this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.pattern = 40; this->state.lastPrim->state.type = 50; this->state.lastPrim->state.deltaPos2 = { across * m[0] + m[3] * 0.0f + m[6] * 0.0f + m[9], across * m[1] + m[4] * 0.0f + m[7] * 0.0f + m[10], across * m[2] + m[5] * 0.0f + m[8] * 0.0f + m[11] }; this->state.lastPrim->state.longitude = static_cast(angle); this->state.lastPrim->state.widthSize = 2.6f; this->state.lastPrim->state.heightSize = 40.0f; this->state.lastPrim->state.heightSpeed = 0.25f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 180.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 6.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 6; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); return this->state.stateCnt != this->state.duration; } // OFFSET: 0x00C36110 // FUNCTION: fn_20091 void CRagEffect::Portal() { if (this->state.stateCnt == 0) { g_modeMgr.GetGameMode(); this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.arcAngle = 36.0f; this->state.lastPrim->state.outerSize = 3.5f; this->state.lastPrim->state.innerSize = 3.5f; this->state.lastPrim->state.longSpeed = 4.0f; this->state.lastPrim->state.heightSize = 40.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 128.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 6.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 6; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.arcAngle = 36.0f; this->state.lastPrim->state.outerSize = 4.0f; this->state.lastPrim->state.innerSize = 4.0f; this->state.lastPrim->state.longSpeed = 5.0f; this->state.lastPrim->state.heightSize = 50.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 128.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 6.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 6; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } if (this->state.stateCnt % 14 == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 30; this->state.lastPrim->state.deltaPos2.y = -1.0f; this->state.lastPrim->state.innerSize = 8.0f; this->state.lastPrim->state.latitude = 90.0f; EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); this->state.lastPrim->state.radiusSpeed = 1.0f; EffectPrimitiveState& ring = this->state.lastPrim->state; ring.radiusAccel = -(ring.radiusSpeed / static_cast(ring.duration)) * 0.5f; const int duration = this->state.lastPrim->state.duration; this->state.lastPrim->state.fadeOutCnt = duration - duration / 2; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } } // OFFSET: 0x00C40450 // FUNCTION: fn_20125 void CRagEffect::YufitelHit(char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt % 20 == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 10; this->state.lastPrim->state.pattern |= 0x40u; this->state.lastPrim->state.renderFlag |= 2u; this->state.lastPrim->state.renderFlag |= 0x200u; this->state.lastPrim->state.deltaPos2.y = -5.0f; this->state.lastPrim->state.widthSpeed = 2.5f; this->state.lastPrim->state.heightSpeed = 2.5f; this->state.lastPrim->state.changePoint = 10; this->state.lastPrim->state.changeWidthSpeed = 0.0f; this->state.lastPrim->state.changeHeightSpeed = 0.0f; this->state.lastPrim->state.changeWidthAccel = -this->state.lastPrim->state.changeWidthSpeed / 50.0f; this->state.lastPrim->state.changeHeightAccel = -this->state.lastPrim->state.changeHeightSpeed / 50.0f; this->state.lastPrim->state.fadeOutCnt = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (kind == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\thunder_pang.bmp", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\pokjuk_d.bmp", 0, false, true, false); } } if (this->state.stateCnt != 10) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 300; this->state.lastPrim->state.pattern |= 0x40u; this->state.lastPrim->state.renderFlag |= 0x200u; this->state.lastPrim->state.renderFlag |= 2u; this->state.lastPrim->state.deltaPos2.y = -5.0f; this->state.lastPrim->state.repeatAnim = 1; this->state.lastPrim->state.widthSize = 7.5f; this->state.lastPrim->state.heightSize = 7.5f; this->state.lastPrim->state.animSpeed = 1; this->state.lastPrim->state.totalTexture = 5; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; const char* last; if (kind == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\thunder_plazma_blast_a.bmp", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\thunder_plazma_blast_b.bmp", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\thunder_ball_d.bmp", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\thunder_ball_e.bmp", 0, false, true, false); last = "effect\\thunder_ball_f.bmp"; } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\twirl_soft.bmp", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\thunder_ball_b.bmp", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\twirl_soft.bmp", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\thunder_ball_c.bmp", 0, false, true, false); last = "effect\\twirl_soft.bmp"; } this->state.lastPrim->state.textures[4] = g_texMgr.Load(last, 0, false, true, false); } // OFFSET: 0x00C457B0 // FUNCTION: fn_20150 void CRagEffect::TexturedPulseKind(const char* name, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 64, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1u; this->state.lastPrim->state.renderFlag |= 5u; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 1.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); bool pulsing = true; if (kind == 0) { this->state.lastPrim->state.slots[0].maxHeight = g_serviceOptions.Get(229) != 0 ? 10.0f : 50.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 30; this->state.lastPrim->state.slots[0].alphaT = 864; this->state.lastPrim->state.slots[0].height[0] = 5.0f; this->state.lastPrim->state.slots[0].height[1] = 5.0f; } else { if (kind == 1) { this->state.lastPrim->state.slots[0].maxHeight = 16.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 120; this->state.lastPrim->state.slots[0].alphaT = 1880; } else if (kind == 2) { this->state.lastPrim->state.slots[0].maxHeight = 32.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 30; this->state.lastPrim->state.slots[0].alphaT = 29999; } else if (kind == 4) { this->state.lastPrim->state.slots[0].maxHeight = 16.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 120; this->state.lastPrim->state.slots[0].alphaT = 1880; this->state.lastPrim->state.slots[0].height[0] = 2.5f; this->state.lastPrim->state.slots[0].height[1] = 2.5f; this->state.lastPrim->state.slots[0].height[2] = 0.0f; this->state.lastPrim->state.slots[0].height[3] = 4.0f; this->state.lastPrim->state.slots[0].height[4] = static_cast(ClampedRandom(50)); pulsing = false; } else { if (kind == 3) { this->state.lastPrim->state.slots[0].maxHeight = 16.0f; } this->state.lastPrim->state.slots[0].rotStart = 0; } if (pulsing) { this->state.lastPrim->state.slots[0].height[0] = 2.5f; this->state.lastPrim->state.slots[0].height[1] = 2.5f; } } if (pulsing) { this->state.lastPrim->state.slots[0].height[2] = 0.0f; this->state.lastPrim->state.slots[0].height[3] = static_cast(kind); } this->state.lastPrim->state.slots[0].height[5] = 0.0f; this->state.lastPrim->state.slots[0].height[6] = 0.0f; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C10860 // FUNCTION: fn_20035 void CRagEffect::EarthSpike(char type) { if (this->state.stateCnt != 0) { return; } const char* textureName = nullptr; if (type == 0) { PlayEffectWave(*this, "effect\\wizard_earthspike.wav"); textureName = "effect\\stone.bmp"; } else if (type == 2) { char waveName[52]; std::sprintf(waveName, "effect\\EF_IceArrow%d.wav", ClampedRandom(3) + 1); PlayEffectWave(*this, waveName); textureName = "effect\\ice.tga"; } CMode* mode = g_modeMgr.GetGameMode(); mode->SendMsg(MM_QUAKE, 1, 0, 0, 0); float red = 1.0f; float green = 0.24f; float blue = 0.2f; mode->SendMsg(MM_SETQUAKEINFO, reinterpret_cast(&red), reinterpret_cast(&green), reinterpret_cast(&blue), 0); this->state.lastPrim = CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 240; this->state.lastPrim->state.pattern = 1; this->state.lastPrim->state.pattern |= 2u; const int heading = ClampedRandom(360); rand(); ClientSine(heading); ClientCosine(heading); this->state.lastPrim->state.deltaPos2 = {0.0f, 10.0f, 0.0f}; this->state.lastPrim->state.size = static_cast(ClampedRandom(50) + 300) / 100.0f; this->state.lastPrim->state.heightSize = 18.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.latitude = static_cast(ClampedRandom(20) + 80); EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = this->state.lastPrim->state; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); EffectPrimitiveState& center = this->state.lastPrim->state; std::memcpy(center.rotTransform, center.transform, sizeof(center.rotTransform)); this->state.lastPrim->state.speed = 1.0f; this->state.lastPrim->state.accel = 0.01f; this->state.lastPrim->state.alpha = 250.0f; this->state.lastPrim->state.chCnt = 15; this->state.lastPrim->state.changePoint = 12; this->state.lastPrim->state.changeSpeed = -1.2f; this->state.lastPrim->state.changeAccel = 0.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(textureName, 0, false, true, false); for (int step = 60; step < 420; step += 60) { const int offset = step != 0 ? ClampedRandom(step) : 0; this->state.lastPrim = CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 240; this->state.lastPrim->state.pattern |= 1u; const int angle = ClampedRandom(360); rand(); const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); this->state.lastPrim->state.deltaPos2.y = 20.0f; this->state.lastPrim->state.deltaPos2.x = sine * 3.5f; this->state.lastPrim->state.deltaPos2.z = cosine * -3.5f; this->state.lastPrim->state.size = static_cast(ClampedRandom(100) + 400) / 100.0f; this->state.lastPrim->state.heightSize = 20.0f; this->state.lastPrim->state.longitude = std::min(static_cast(offset + step - 60), 360.0f); this->state.lastPrim->state.latitude = 100.0f; EffectPrimitiveState& spikeTilt = this->state.lastPrim->state; reinterpret_cast(spikeTilt.transform)->MakeXRotation(GetRadian(static_cast(spikeTilt.latitude))); EffectPrimitiveState& spikeTurn = this->state.lastPrim->state; reinterpret_cast(spikeTurn.transform)->AppendYRotation(GetRadian(static_cast(spikeTurn.longitude))); EffectPrimitiveState& spike = this->state.lastPrim->state; std::memcpy(spike.rotTransform, spike.transform, sizeof(spike.rotTransform)); this->state.lastPrim->state.speed = 1.5f; this->state.lastPrim->state.accel = 0.0f; this->state.lastPrim->state.alpha = 250.0f; this->state.lastPrim->state.chCnt = 2; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(textureName, 0, false, true, false); } } // INLINED static void SetVector(vector3d& v, float x, float y, float z) { v.x = x; v.y = y; v.z = z; } // OFFSET: 0x00C39730 // FUNCTION: fn_20102 void CRagEffect::Sightrasher() { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; g_renderer->viewport.Project(&this->state.parent->render.position.x, view, vertex); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt == 0) { this->state.parent->SendMsg(nullptr, AM_DELETE_EFFECT, 22, 0, 0, 0, 0, 0); PlayEffectWave(*this, "effect\\wizard_sightrasher.wav"); } if (this->state.stateCnt % 5 == 0 && this->state.stateCnt < 20) { for (int i = 0; i < 8; ++i) { const int angle = static_cast(static_cast(i) * -45.0f); const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); GetRadian(angle); this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 85 - this->state.stateCnt; this->state.lastPrim->state.pattern |= 0x400u; const float reach = static_cast(this->state.stateCnt / 5) + 5.0f; SetVector(this->state.lastPrim->state.deltaPos2, reach * sine, static_cast(this->state.stateCnt / 3 - 20), -reach * cosine); SetVector( this->state.lastPrim->state.speed3d, static_cast(static_cast(sine)), 0.0f, static_cast(static_cast(cosine) * -1.0) ); this->state.lastPrim->state.animSpeed = ClampedRandom(2) + 3; this->state.lastPrim->state.size = 2.5f - static_cast(this->state.stateCnt) / 10.0f; this->state.lastPrim->state.alpha = static_cast((75 - this->state.stateCnt) * 2); this->state.lastPrim->state.deltaPosAccel.x = 0.0f; this->state.lastPrim->state.deltaPosAccel.y = 0.0f; this->state.lastPrim->state.deltaPosAccel.z = 0.0f; this->state.lastPrim->state.changeSpeed3d.x = static_cast(static_cast(sine) * 0.5); this->state.lastPrim->state.changeSpeed3d.y = 0.0f; this->state.lastPrim->state.changeSpeed3d.z = static_cast(static_cast(cosine) * -0.5); this->state.lastPrim->state.changePoint = 35 - this->state.stateCnt; this->state.lastPrim->state.changeAccel3d.x = -0.004f; this->state.lastPrim->state.changeAccel3d.y = 0.0f; this->state.lastPrim->state.changeAccel3d.z = 0.004f; this->state.lastPrim->state.fadeOutCnt = 65 - this->state.stateCnt; this->state.lastPrim->SetSpriteName("이팩트\\Sight.spr"); this->state.lastPrim->SetActionName("이팩트\\Sight.act"); this->state.lastPrim->InitSegment(); } for (int i = 0; i < 8; ++i) { const int angle = static_cast(static_cast(i) * -45.0f); const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); GetRadian(angle); this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 85 - this->state.stateCnt; this->state.lastPrim->state.pattern |= 0x400u; const float reach = static_cast(this->state.stateCnt / 5) + 5.0f; SetVector(this->state.lastPrim->state.deltaPos2, reach * sine, 0.0f, -reach * cosine); SetVector( this->state.lastPrim->state.speed3d, static_cast(static_cast(sine)), 0.0f, static_cast(static_cast(cosine) * -1.0) ); this->state.lastPrim->state.animSpeed = 3; this->state.lastPrim->state.size = 1.0f - static_cast(this->state.stateCnt) / 30.0f; this->state.lastPrim->state.alpha = static_cast((75 - this->state.stateCnt) * 2); this->state.lastPrim->state.changeSpeed3d.x = static_cast(static_cast(sine) * 0.5); this->state.lastPrim->state.changeSpeed3d.z = static_cast(static_cast(cosine) * -0.5); this->state.lastPrim->state.changePoint = 35 - this->state.stateCnt; this->state.lastPrim->state.changeAccel3d.x = -0.004f; this->state.lastPrim->state.changeAccel3d.z = 0.004f; this->state.lastPrim->state.fadeOutCnt = 65 - this->state.stateCnt; this->state.lastPrim->SetSpriteName("Shadow.spr"); this->state.lastPrim->SetActionName("Shadow.act"); this->state.lastPrim->InitSegment(); } } if (this->state.stateCnt != 10) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 30; this->state.lastPrim->state.latitude = 90.0f; this->state.lastPrim->state.radiusSpeed = 2.5f; this->state.lastPrim->state.radiusAccel = -(this->state.lastPrim->state.radiusSpeed / this->state.lastPrim->state.duration) / 1.5f; this->state.lastPrim->state.innerSize = -10.0f; this->state.lastPrim->state.alpha = 150.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); } // OFFSET: 0x00C35610 // FUNCTION: fn_20090 void CRagEffect::RingBurstSparks() { if (this->state.stateCnt % 20 != 0 || this->state.stateCnt >= this->state.level * 20) { return; } const int facing = static_cast(180.0f - this->state.parent->render.angle); const int direction = facing < 0 ? facing + 360 : facing; this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 15; this->state.currentPrimitive->longitude = static_cast(direction); this->state.currentPrimitive->latitude = -90.0f; EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = *this->state.currentPrimitive; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); this->state.currentPrimitive->deltaPos2 = {0.0f, -10.0f, 0.0f}; this->state.currentPrimitive->speed = 0.7f; EffectPrimitiveState& slow = *this->state.currentPrimitive; slow.accel = -(slow.speed / slow.duration) * 0.5f; this->state.currentPrimitive->outerSize = static_cast(this->state.stateCnt * 0.1 + 11.0); this->state.currentPrimitive->innerSize = static_cast(this->state.stateCnt * 0.1 + 6.0); this->state.currentPrimitive->heightSize = 2.5f; const int lifetime = this->state.currentPrimitive->duration; this->state.currentPrimitive->fadeOutCnt = lifetime - lifetime / 2; AllocateTextures(*this->state.currentPrimitive); this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); if (this->state.stateCnt <= 0) { return; } for (int count = 4; count != 0; --count) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 80, 0) + direction - 40); this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); EffectPrimitiveState& yaw = *this->state.currentPrimitive; reinterpret_cast(yaw.transform)->MakeYRotation(GetRadian(static_cast(yaw.longitude))); EffectPrimitiveState& pitch = *this->state.currentPrimitive; reinterpret_cast(pitch.transform)->AppendXRotation(GetRadian(static_cast(pitch.latitude))); EffectPrimitiveState& spark = *this->state.currentPrimitive; spark.deltaPos3 = RotatedForward(spark.transform, static_cast(std::max(rand() % 4, 0) + 4)); EffectPrimitiveState& moving = *this->state.currentPrimitive; moving.deltaPos2.x = moving.deltaPos3.x + 0.0f; moving.deltaPos2.y = moving.deltaPos3.y - 10.0f; moving.deltaPos2.z = moving.deltaPos3.z + 0.0f; this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; EffectPrimitiveState& fading = *this->state.currentPrimitive; fading.accel = -(fading.speed / fading.duration) * 0.5f; this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; EffectPrimitiveState& shrinking = *this->state.currentPrimitive; shrinking.sizeSpeed = -(shrinking.size / shrinking.duration); this->state.currentPrimitive->fadeOutCnt = 0; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); this->state.currentPrimitive->numSegment = 3; Owner(this->state.currentPrimitive).InitSegment(); } for (int count = 4; count != 0; --count) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 80, 0) + direction + 140); this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); EffectPrimitiveState& yaw = *this->state.currentPrimitive; reinterpret_cast(yaw.transform)->MakeYRotation(GetRadian(static_cast(yaw.longitude))); EffectPrimitiveState& pitch = *this->state.currentPrimitive; reinterpret_cast(pitch.transform)->AppendXRotation(GetRadian(static_cast(pitch.latitude))); EffectPrimitiveState& spark = *this->state.currentPrimitive; spark.deltaPos3 = RotatedForward(spark.transform, static_cast(std::max(rand() % 4, 0) + 4)); EffectPrimitiveState& moving = *this->state.currentPrimitive; moving.deltaPos2.x = moving.deltaPos3.x + 0.0f; moving.deltaPos2.y = moving.deltaPos3.y - 10.0f; moving.deltaPos2.z = moving.deltaPos3.z + 0.0f; EffectPrimitiveState& facingYaw = *this->state.currentPrimitive; reinterpret_cast(facingYaw.transform)->MakeYRotation(GetRadian(static_cast(facingYaw.longitude))); this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; EffectPrimitiveState& fading = *this->state.currentPrimitive; fading.accel = -(fading.speed / fading.duration) * 0.5f; this->state.currentPrimitive->gravSpeed = -static_cast(std::max(rand() % 90, 0) + 30) / 100.0f; EffectPrimitiveState& falling = *this->state.currentPrimitive; const float fall = falling.gravSpeed / falling.duration; falling.gravAccel = -(fall + fall); this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; EffectPrimitiveState& shrinking = *this->state.currentPrimitive; shrinking.sizeSpeed = -(shrinking.size / shrinking.duration); this->state.currentPrimitive->fadeOutCnt = 0; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); this->state.currentPrimitive->numSegment = 3; Owner(this->state.currentPrimitive).InitSegment(); } } // OFFSET: 0x00C7AB90 // FUNCTION: fn_20357 void CRagEffect::WaterBubble(int) { if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 142, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 117; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; char name[64]; for (int index = 0; index < 30; ++index) { std::sprintf(name, "effect\\W_C_water_%02d.tga", index); this->state.lastPrim->state.textures[index] = g_texMgr.Load(name, 0, false, true, false); } for (int index = 0; index < 30; ++index) { std::sprintf(name, "effect\\W_B_water_%02d.tga", index); this->state.lastPrim->state.textures[index + 30] = g_texMgr.Load(name, 0, false, true, false); } for (int index = 0; index < 27; ++index) { std::sprintf(name, "effect\\W_bubble%02d.tga", index + 1); this->state.lastPrim->state.textures[index + 60] = g_texMgr.Load(name, 0, false, true, false); } for (int index = 0; index < 30; ++index) { std::sprintf(name, "effect\\W_A_water_%02d.tga", index); this->state.lastPrim->state.textures[index + 87] = g_texMgr.Load(name, 0, false, true, false); } this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].alphaB = 230; this->state.lastPrim->state.slots[0].vecBNow.z = 0.0f; if (this->state.param[0] < 20.0f) { this->state.lastPrim->state.slots[0].distance = 40.0f; } else { this->state.lastPrim->state.slots[0].distance = this->state.param[0]; } this->state.lastPrim->state.slots[0].rotStart = static_cast(this->state.param[1] >= 360.0f ? 0 : static_cast(this->state.param[1])); } // OFFSET: 0x00C134B0 // FUNCTION: fn_20044 void CRagEffect::FireArrow() { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt == 12) { char waveName[52]; std::sprintf(waveName, "effect\\EF_FireArrow%d.wav", std::max(rand() % 3, 0) + 1); PlayEffectWave(*this, waveName); this->state.count *= 10; } const int frame = this->state.stateCnt; if (frame >= 12 && (frame - 12) % 10 == 0 && frame - 12 < static_cast(this->state.count)) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 70; this->state.currentPrimitive->pattern = 0x14; EffectPrimitiveState& arrow = *this->state.currentPrimitive; const int spreadZ = std::max(rand() % 10, 0); const int spreadX = std::max(rand() % 10, 0); arrow.deltaPos2.y = -60.0f; arrow.deltaPos2.x = static_cast(spreadX + 25); arrow.deltaPos2.z = static_cast(spreadZ + 15); const int aimZ = std::max(rand() % 4, 0); const int aimX = std::max(rand() % 4, 0); const float heading = CRenderObject::Heading( this->state.currentPrimitive->deltaPos2.x, this->state.currentPrimitive->deltaPos2.z, static_cast(aimX - 2), static_cast(aimZ - 2) ); this->state.currentPrimitive->longitude = -heading; this->state.longitude = -heading; const float dx = std::fabs(this->state.currentPrimitive->deltaPos2.x); const float dz = std::fabs(this->state.currentPrimitive->deltaPos2.z); const float run = SquareRoot(dx * dx + dz * dz); const float pitch = CRenderObject::Heading(-std::fabs(this->state.currentPrimitive->deltaPos2.y), run, 0.0f, 0.0f); this->state.currentPrimitive->latitude = pitch; this->state.latitude = pitch; EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = *this->state.currentPrimitive; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); this->state.currentPrimitive->speed = -2.75f; this->state.currentPrimitive->widthSize = 14.0f; this->state.currentPrimitive->heightSize = 3.5f; this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 20; this->state.currentPrimitive->totalTexture = 6; this->state.currentPrimitive->animSpeed = 1; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\불화살1.tga", 0, false, true, false); this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\불화살2.tga", 0, false, true, false); this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\불화살3.tga", 0, false, true, false); this->state.currentPrimitive->textures[3] = g_texMgr.Load("effect\\불화살4.tga", 0, false, true, false); this->state.currentPrimitive->textures[4] = g_texMgr.Load("effect\\불화살5.tga", 0, false, true, false); this->state.currentPrimitive->textures[5] = g_texMgr.Load("effect\\불화살6.tga", 0, false, true, false); this->state.currentPrimitive->slots[0].life = 0; } if (this->state.stateCnt > 0 && this->state.stateCnt % 4 == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 40, 0)) + (this->state.longitude - 20.0f); this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 20, 0)) + (this->state.latitude - 10.0f); EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = *this->state.currentPrimitive; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); this->state.currentPrimitive->deltaPos2.x = this->state.deltaPos[0]; this->state.currentPrimitive->deltaPos2.y = this->state.deltaPos[1]; this->state.currentPrimitive->deltaPos2.z = this->state.deltaPos[2]; this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; EffectPrimitiveState& slowing = *this->state.currentPrimitive; slowing.accel = -(slowing.speed / slowing.duration) / 1.5f; this->state.currentPrimitive->size = static_cast(std::max(rand() % 30, 0) + 20) / 100.0f; EffectPrimitiveState& shrinking = *this->state.currentPrimitive; shrinking.sizeSpeed = -(shrinking.size / shrinking.duration); this->state.currentPrimitive->fadeOutCnt = 0; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle4.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle4.act"); Owner(this->state.currentPrimitive).InitSegment(); } if (this->state.flag == 0) { return; } this->state.flag = 0; this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 30; this->state.currentPrimitive->latitude = 90.0f; this->state.currentPrimitive->radiusSpeed = 1.2f; EffectPrimitiveState& ring = *this->state.currentPrimitive; const float slowdown = -(ring.radiusSpeed / (ring.duration + 40)); ring.radiusAccel = slowdown + slowdown; this->state.currentPrimitive->innerSize = 10.0f; this->state.currentPrimitive->alpha = 0.0f; this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 10.0f; this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 10; Owner(this->state.currentPrimitive).InitSegment(); this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); } // GLOBAL: gl_24762 static int g_blitzBeatCount; // OFFSET: 0x00C0CAC0 // FUNCTION: fn_20020 void CRagEffect::BlitzBeat() { if (this->state.stateCnt == 5) { PlayEffectWave(*this, "effect\\hunter_blitzbeat_1st.wav"); } if (this->state.stateCnt == 30) { PlayEffectWave(*this, "effect\\hunter_blitzbeat.wav"); } const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt == 0) { g_blitzBeatCount = this->state.stateCnt; for (int count = 10; count != 0; --count) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 20; this->state.currentPrimitive->renderFlag |= 0x200u; this->state.currentPrimitive->longitude = this->state.parent->render.angle; EffectPrimitiveState& facing = *this->state.currentPrimitive; reinterpret_cast(facing.transform)->MakeYRotation(GetRadian(static_cast(facing.longitude))); const float spin = static_cast(ClampedRandom(360)); const float sine = ClientSine(static_cast(spin)); const float cosine = ClientCosine(static_cast(spin)); EffectPrimitiveState& moving = *this->state.currentPrimitive; moving.speed3d = RotatedForward(moving.transform, 15.0f); EffectPrimitiveState& origin = *this->state.currentPrimitive; origin.deltaPos.x = origin.deltaPos.x + origin.speed3d.x; origin.deltaPos.y = origin.speed3d.y + origin.deltaPos.y; origin.deltaPos.z = origin.speed3d.z + origin.deltaPos.z; this->state.currentPrimitive->deltaPos2.y = -7.0f; this->state.currentPrimitive->deltaPos2.x = sine * 3.5f; this->state.currentPrimitive->deltaPos2.z = cosine * -3.5f; this->state.currentPrimitive->speed = -1.2f; this->state.currentPrimitive->accel = -0.1f; this->state.currentPrimitive->widthSize = static_cast(ClampedRandom(40) + 20) / 10.0f; this->state.currentPrimitive->heightSize = 0.2f; this->state.currentPrimitive->widthSpeed = 0.1f; this->state.currentPrimitive->widthAccel = -0.01f; this->state.currentPrimitive->alpha = 0.0f; this->state.currentPrimitive->maxAlpha = 250.0f; this->state.currentPrimitive->changePoint = 10; this->state.currentPrimitive->changeSpeed = -0.3f; this->state.currentPrimitive->changeAccel = 0.001f; this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha * 0.5f; this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 2; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); this->state.currentPrimitive->slots[0].life = 0; } } if (this->state.stateCnt <= 35 || this->state.stateCnt % 3 != 0 || g_blitzBeatCount >= static_cast(this->state.count)) { return; } const float facing = this->state.parent->render.angle; const int driftX = rand(); const int driftY = rand(); rand(); this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 12; this->state.currentPrimitive->longitude = static_cast(static_cast(facing)); this->state.currentPrimitive->latitude = -90.0f; EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = *this->state.currentPrimitive; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); EffectPrimitiveState& thrust = *this->state.currentPrimitive; const float* m = thrust.transform; thrust.speed3d = { (m[0] * 0.0f - m[3] * 2.0f) + m[6] + m[9], (m[1] * 0.0f - m[4] * 2.0f) + m[7] + m[10], (m[2] * 0.0f - m[5] * 2.0f) + m[8] + m[11] }; EffectPrimitiveState& origin = *this->state.currentPrimitive; origin.deltaPos.x = origin.speed3d.x + origin.deltaPos.x; origin.deltaPos.y = origin.speed3d.y + origin.deltaPos.y; origin.deltaPos.z = origin.speed3d.z + origin.deltaPos.z; this->state.currentPrimitive->deltaPos2.z = 0.0f; this->state.currentPrimitive->deltaPos2.x = static_cast((std::max(driftX % 10, 0) + 1) / 5); this->state.currentPrimitive->deltaPos2.y = static_cast((std::max(driftY % 20, 0) + 1) / 2 - 12); this->state.currentPrimitive->speed = 0.4f; EffectPrimitiveState& slowing = *this->state.currentPrimitive; slowing.accel = -(slowing.speed / slowing.duration) * 0.5f; this->state.currentPrimitive->outerSize = 1.5f; this->state.currentPrimitive->innerSize = 0.5f; this->state.currentPrimitive->heightSize = 3.5f; const int lifetime = this->state.currentPrimitive->duration; this->state.currentPrimitive->fadeOutCnt = lifetime - lifetime / 2; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; CTexture* texture = g_texMgr.Load("effect\\magic_green.tga", 0, false, true, false); ++g_blitzBeatCount; this->state.currentPrimitive->textures[0] = texture; } // OFFSET: 0x00C5C450 // FUNCTION: fn_20227 void CRagEffect::Map_MagicZone(const char* name, char type) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 26, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); if (type == 4 || type == 14) { this->state.lastPrim->state.size = 111.0f; } else if (type == 5) { this->state.lastPrim->state.size = 112.0f; } else { this->state.lastPrim->state.size = 110.0f; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; if (type == 2 || type == 3) { this->state.lastPrim->state.slots[0].distance = 40.0f; } else if (type == 4 || type == 14) { if (this->state.param[0] > 0.0f) { this->state.lastPrim->state.slots[0].distance = this->state.param[0]; } else { this->state.lastPrim->state.slots[0].distance = 40.0f; } } else { this->state.lastPrim->state.slots[0].distance = 30.0f; } if (type == 4 || type == 5 || type == 14) { this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 250; this->state.lastPrim->state.slots[0].height[0] = -0.5f; } else if (type == 0 || type == 2) { this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 200; this->state.lastPrim->state.slots[0].height[0] = -0.5f; } else { this->state.lastPrim->state.slots[0].rotStart = 358; this->state.lastPrim->state.slots[0].alphaB = 50; this->state.lastPrim->state.slots[0].height[0] = -0.4f; } this->state.lastPrim->state.slots[0].height[4] = static_cast(type); } // OFFSET: 0x00C4AD80 // FUNCTION: fn_20172 void CRagEffect::Demonstration() { if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 51, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].maxHeight = 0.0f; this->state.lastPrim->state.size = 1.2f; CopyVector(this->state.lastPrim->state.slots[0].vecBPre, this->render.position); this->state.lastPrim->state.slots[0].vecBPre.y -= 1.0f; this->state.lastPrim->state.slots[0].flag1[4] = 0; this->state.lastPrim->state.alpha = 200.0f; this->state.lastPrim->SetSpriteName(ResourceMgr::Instance(), "\uc774\ud329\ud2b8\\\ub370\ubaac\uc2a4\ud2b8\ub808\uc774\uc158.spr"); this->state.lastPrim->SetActionName(ResourceMgr::Instance(), "\uc774\ud329\ud2b8\\\ub370\ubaac\uc2a4\ud2b8\ub808\uc774\uc158.act"); this->state.lastPrim->state.animSpeed = 4; this->state.lastPrim->SetAction(0, 16, 0); this->state.lastPrim->InitSegment(); this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C5CEA0 // FUNCTION: fn_20231 void CRagEffect::NpcStop(char type) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 51, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag |= 0x200; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].maxHeight = 0.0f; this->state.lastPrim->state.size = 1.0f; this->state.lastPrim->state.slots[0].vecBPre = this->render.position; if (type == 2) { this->state.lastPrim->state.slots[0].flag1[4] = 1; this->state.lastPrim->state.alpha = 100.0f; this->state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\cconfine.spr"); this->state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\cconfine.act"); this->state.lastPrim->state.animSpeed = 12; this->state.lastPrim->state.repeatAnim = 0; this->state.lastPrim->state.pattern = 0x800; } else { this->state.lastPrim->state.slots[0].vecBPre.y -= 7.0f; this->state.lastPrim->state.slots[0].flag1[4] = 1; this->state.lastPrim->state.alpha = 200.0f; this->state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\\uc2a4\ud1b1.spr"); this->state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\\uc2a4\ud1b1.act"); this->state.lastPrim->state.animSpeed = 4; this->state.lastPrim->SetAction(0, 16, 0); } this->state.lastPrim->InitSegment(); this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C47380 // FUNCTION: fn_20156 void CRagEffect::Bubble_Drop() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } float count = this->state.param[0]; if (count <= 1.0f) { count = 50.0f; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 127, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\썬더스톰파티클.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].distance = 1.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].vecBPre.x = 0.0f; this->state.lastPrim->state.slots[0].vecBPre.z = 0.0f; this->state.lastPrim->state.slots[0].vecBPre.y = -count; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].height[1] = 1.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[2] = 2; this->state.lastPrim->state.slots[0].flag1[4] = static_cast(static_cast(count)); this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].alphaB = 0; } // OFFSET: 0x00C52490 // FUNCTION: fn_20194 void CRagEffect::Ghost(char type) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt > 9) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 84, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.size = 1.5f; CopyVector(this->state.lastPrim->state.slots[0].vecBNow, this->render.position); this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].riseAngle = 0; if (type == 2) { this->state.lastPrim->state.slots[0].flag1[0] = 2; if (this->state.stateCnt == 0) { this->state.lastPrim->state.slots[0].height[1] = 250.0f; } else { this->state.lastPrim->state.slots[0].height[1] = static_cast((10 - this->state.stateCnt) * 3); } } else { this->state.lastPrim->state.slots[0].flag1[0] = 1; this->state.lastPrim->state.slots[0].height[1] = static_cast((10 - this->state.stateCnt) * 3); } this->state.lastPrim->state.slots[0].flag1[2] = type; this->state.lastPrim->state.slots[0].distance = 16.0f; this->state.lastPrim->state.slots[0].maxHeight = 4.0f; this->state.lastPrim->state.alpha = 0.0f; if (type == 0) { this->state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\\uc720\ub839.spr"); this->state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\\uc720\ub839.act"); } else if (type > 0) { this->state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\\ubc15\uc950.spr"); this->state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\\ubc15\uc950.act"); } this->state.lastPrim->state.animSpeed = 2; this->state.lastPrim->state.renderFlag |= 0x200; this->state.lastPrim->SetAction(0, 16, 1); this->state.lastPrim->InitSegment(); this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C45FE0 // FUNCTION: fn_20152 void CRagEffect::Bottom_Out(const char* name, char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 49, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; const int count = kind != 1 ? 2 : 1; for (int i = 0; i < count; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = ClampedRandom(11); if (kind == 0) { this->state.lastPrim->state.slots[i].distance = static_cast(ClampedRandom(6)) + 5.0f; } else if (kind == 1) { this->state.lastPrim->state.slots[i].distance = static_cast(ClampedRandom(20)) * 0.1f + 3.0f; } this->state.lastPrim->state.slots[i].height[8] = 0.0f; this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[i].vecBNow.z = this->render.position.z; if (kind == 0) { this->state.lastPrim->state.slots[i].vecBPre.y = this->render.position.y; } else if (kind == 1) { this->state.lastPrim->state.slots[i].vecBPre.y = this->render.position.y - 5.0f; } this->state.lastPrim->state.slots[i].fullDisplayAngle = 45; this->state.lastPrim->state.slots[i].flag1[0] = 0; this->state.lastPrim->state.slots[i].flag1[2] = 2; this->state.lastPrim->state.slots[i].height[7] = 0.0f; this->state.lastPrim->state.slots[i].flag1[1] = kind; } } // OFFSET: 0x00C66C90 // FUNCTION: fn_20276 void CRagEffect::TANJI2() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 97, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\blue_ivy.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; const float dx = this->state.deltaPos[0] - this->render.position.x; const float dz = this->state.deltaPos[2] - this->render.position.z; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = -15; this->state.lastPrim->state.slots[0].maxHeight = SquareRoot(dx * dx + dz * dz); this->state.lastPrim->state.slots[0].distance = static_cast(static_cast(this->state.count)) * 0.4f + 2.0f; this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 5; this->state.lastPrim->state.slots[0].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].vecBNow.y = this->render.position.y - 8.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].height[1] = 2.0f; this->state.lastPrim->state.slots[0].height[2] = (this->state.lastPrim->state.slots[0].height[1] / this->state.lastPrim->state.slots[0].maxHeight) * (this->state.deltaPos[1] - this->render.position.y); this->state.lastPrim->state.slots[0].fullDisplayAngle = 0; this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[1] = 0; this->state.lastPrim->state.slots[0].flag1[2] = 1; this->state.lastPrim->state.slots[0].height[7] = 0.0f; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].alphaB = 0; } // OFFSET: 0x00C674A0 // FUNCTION: fn_20279 void CRagEffect::TEIHIT2() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 45, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\thunder_center.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; CopyVector(this->state.lastPrim->render.position, this->render.position); for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = ClampedRandom(10) - 40; this->state.lastPrim->state.slots[i].distance = static_cast(ClampedRandom(16)) * 0.05f + 0.1f; this->state.lastPrim->state.slots[i].height[8] = 0.0f; this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].vecBNow.x = this->state.deltaPos[0]; this->state.lastPrim->state.slots[i].vecBNow.z = this->state.deltaPos[2]; this->state.lastPrim->state.slots[i].vecBNow.y = this->state.deltaPos[1] - 8.0f; this->state.lastPrim->state.slots[i].rotStart = 0; this->state.lastPrim->state.slots[i].height[1] = static_cast(ClampedRandom(50)) * 0.01f + 0.75f; this->state.lastPrim->state.slots[i].height[2] = static_cast(ClampedRandom(200)) * 0.01f - 1.0f; this->state.lastPrim->state.slots[i].fullDisplayAngle = 0; this->state.lastPrim->state.slots[i].flag1[0] = 0; this->state.lastPrim->state.slots[i].flag1[1] = 0; this->state.lastPrim->state.slots[i].flag1[2] = 2; this->state.lastPrim->state.slots[i].height[7] = 0.0f; } } // OFFSET: 0x00C64CB0 // FUNCTION: fn_20265 void CRagEffect::ShieldBoomerang3(const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\cru_shield boomerang.wav"); } else if (this->state.stateCnt != 3 && this->state.stateCnt != 6 && this->state.stateCnt != 9 && this->state.stateCnt != 12) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 116, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].vecBNow.y = this->render.position.y - 8.0f; this->state.lastPrim->state.slots[0].distance = 5.0f; this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 25; this->state.lastPrim->state.slots[0].rotStart = ClampedRandom(360); this->state.lastPrim->state.slots[0].height[1] = 2.5f; this->state.lastPrim->state.slots[0].vecBNow.x -= this->state.lastPrim->state.slots[0].height[1] * 15.0f * g_cosTable[this->state.lastPrim->state.slots[0].rotStart]; this->state.lastPrim->state.slots[0].vecBNow.z -= this->state.lastPrim->state.slots[0].height[1] * 15.0f * g_sinTable[this->state.lastPrim->state.slots[0].rotStart]; this->state.lastPrim->state.slots[0].fullDisplayAngle = 0; this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[2] = 0; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].alphaB = 0; } // OFFSET: 0x00C5DEC0 // FUNCTION: fn_20237 void CRagEffect::ParticleTime(const char* name, char kind) { this->render.position = this->state.parent->render.position; const int minCount = kind == 2 ? 40 : 0; if (static_cast(this->state.stateCnt) < minCount) { return; } const int maxCount = kind == 2 ? 120 : 80; if (static_cast(this->state.stateCnt) > maxCount) { return; } if ((this->state.stateCnt & 3) != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\pok3.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; Owner(&this->state.lastPrim->state).render.position = this->render.position; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].distance = static_cast(ClampedRandom(10)) * 0.1f + 2.0f; this->state.lastPrim->state.slots[i].height[8] = 0.0f; this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(ClampedRandom(11)) + this->render.position.x - 5.0f; this->state.lastPrim->state.slots[i].vecBNow.z = static_cast(ClampedRandom(11)) + this->render.position.z - 5.0f; this->state.lastPrim->state.slots[i].vecBNow.y = this->render.position.y - 6.0f; this->state.lastPrim->state.slots[i].rotStart = 0; this->state.lastPrim->state.slots[i].height[1] = 0.0f; this->state.lastPrim->state.slots[i].height[2] = static_cast(ClampedRandom(20)) * 0.01f + 0.1f; this->state.lastPrim->state.slots[i].fullDisplayAngle = 0; this->state.lastPrim->state.slots[i].flag1[0] = 0; this->state.lastPrim->state.slots[i].flag1[1] = 1; if (kind == 0) { this->state.lastPrim->state.slots[i].flag1[2] = 11; } else if (kind == 1 || kind == 2) { this->state.lastPrim->state.slots[i].flag1[2] = 1; } else if (kind == 3) { this->state.lastPrim->state.slots[i].flag1[2] = 13; } this->state.lastPrim->state.slots[i].height[7] = 0.0f; } } // OFFSET: 0x00C68B20 // FUNCTION: fn_20286 void CRagEffect::ThrowItem(const char* name, char kind) { CopyVector(this->render.position, this->state.parent->render.position); int targetFrame = 0; if (kind == 10) { targetFrame = 5; } else if (kind == 11) { targetFrame = 10; } if (this->state.stateCnt != targetFrame) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 53, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; const float dx = this->state.deltaPos[0] - this->render.position.x; const float dz = this->state.deltaPos[2] - this->render.position.z; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].maxHeight = SquareRoot(dx * dx + dz * dz); if (kind == 2) { this->state.lastPrim->state.slots[0].distance = 2.0f; } else if (kind == 3) { this->state.lastPrim->state.slots[0].distance = 4.0f; } else { this->state.lastPrim->state.slots[0].distance = 3.0f; } this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 255; this->state.lastPrim->state.slots[0].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 8.0f; this->state.lastPrim->state.slots[0].rotStart = 0; float step = 2.0f; if (kind == 3) { step = 3.0f; } else if (kind != 2) { step = this->state.lastPrim->state.slots[0].maxHeight / 25.0f; } this->state.lastPrim->state.slots[0].height[1] = step; this->state.lastPrim->state.slots[0].height[2] = (this->state.lastPrim->state.slots[0].height[1] / this->state.lastPrim->state.slots[0].maxHeight) * (this->state.deltaPos[1] - this->render.position.y); if (kind == 3) { this->state.lastPrim->state.slots[0].fullDisplayAngle = 330; this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].height[7] = 0.0f; this->state.lastPrim->state.slots[0].flag1[2] = 15; } else { this->state.lastPrim->state.slots[0].fullDisplayAngle = 0; this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].height[7] = 0.0f; if (kind == 0) { this->state.lastPrim->state.slots[0].flag1[2] = 8; } else if (kind == 1) { this->state.lastPrim->state.slots[0].flag1[2] = 9; this->state.lastPrim->state.slots[0].flag1[3] = static_cast(this->state.count); } else if (kind == 2) { this->state.lastPrim->state.slots[0].flag1[2] = 0; } else if (kind >= 10) { this->state.lastPrim->state.slots[0].flag1[2] = 9; this->state.lastPrim->state.slots[0].flag1[3] = 4; } } for (int stepIdx = 0; stepIdx < 100; ++stepIdx) { if (this->state.lastPrim->state.slots[0].maxHeight < static_cast(stepIdx) * this->state.lastPrim->state.slots[0].height[1]) { this->state.lastPrim->state.slots[0].flag1[1] = static_cast(stepIdx); break; } } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].alphaB = 0; } // OFFSET: 0x00C45B90 // FUNCTION: fn_20151 void CRagEffect::Bottom_Music(const char* name, char kind) { this->render.position = this->state.parent->render.position; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 47, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; const char* textureName = name; if (kind == 5) { const int pick = ClampedRandom(3); if (pick == 0) { textureName = "effect\\레드젬스톤.bmp"; } else if (pick == 1) { textureName = "effect\\블루젬스톤.bmp"; } else { textureName = "effect\\옐로우젬스톤.bmp"; } } else if (kind == 2) { const int pick = ClampedRandom(2); if (pick == 0) { textureName = "effect\\melody_a.bmp"; } else { textureName = "effect\\melody_b.bmp"; } } else if (kind == 8) { const int pick = ClampedRandom(8); if (pick == 0) { textureName = "effect\\spell_01.bmp"; } else if (pick == 1) { textureName = "effect\\spell_02.bmp"; } else if (pick == 2) { textureName = "effect\\spell_03.bmp"; } else if (pick == 3) { textureName = "effect\\spell_04.bmp"; } else if (pick == 4) { textureName = "effect\\spell_05.bmp"; } else if (pick == 5) { textureName = "effect\\spell_06.bmp"; } else if (pick == 6) { textureName = "effect\\spell_07.bmp"; } else { textureName = "effect\\spell_08.bmp"; } } this->state.lastPrim->state.textures[0] = g_texMgr.Load(textureName, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; if (kind == 1) { this->state.lastPrim->state.slots[0].distance = 5.0f; } else if (kind == 4) { this->state.lastPrim->state.slots[0].distance = 15.0f; } else if (kind == 6) { this->state.lastPrim->state.slots[0].distance = 8.0f; } else if (kind == 9) { this->state.lastPrim->state.slots[0].distance = 1.5f; } else { this->state.lastPrim->state.slots[0].distance = 3.0f; } this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 200; this->state.lastPrim->state.slots[0].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 6.0f; this->state.lastPrim->state.slots[0].rotStart = ClampedRandom(360); this->state.lastPrim->state.slots[0].fullDisplayAngle = 45; this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[2] = 2; this->state.lastPrim->state.slots[0].height[7] = 0.0f; if (kind == 4) { this->state.lastPrim->state.slots[0].height[9] = 10.0f; return; } if (kind == 2) { this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].alphaB = 0; return; } if (kind == 3) { this->state.lastPrim->state.slots[0].flag1[2] = 3; return; } if (kind == 5 || kind == 6) { this->state.lastPrim->state.slots[0].flag1[2] = 4; } else if (kind == 7) { this->state.lastPrim->state.slots[0].flag1[2] = 7; } else if (kind == 9) { this->state.lastPrim->state.slots[0].flag1[2] = 9; this->state.lastPrim->state.slots[0].flag1[3] = 6; } } // OFFSET: 0x00C1A5C0 // FUNCTION: fn_20069 void CRagEffect::HitDark() { if (this->state.stateCnt != 0) { return; } int facing = static_cast(180.0f - this->state.parent->render.angle); if (facing < 0) { facing += 360; } this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 10; this->state.currentPrimitive->longitude = static_cast(facing); this->state.currentPrimitive->latitude = -90.0f; EffectPrimitiveState& flat = *this->state.currentPrimitive; reinterpret_cast(flat.transform)->MakeXRotation(GetRadian(static_cast(flat.latitude))); EffectPrimitiveState& facingRing = *this->state.currentPrimitive; reinterpret_cast(facingRing.transform)->AppendYRotation(GetRadian(static_cast(facingRing.longitude))); this->state.currentPrimitive->deltaPos2 = {0.0f, -10.0f, 0.0f}; this->state.currentPrimitive->speed = 0.7f; EffectPrimitiveState& expanding = *this->state.currentPrimitive; expanding.accel = -(expanding.speed / static_cast(expanding.duration)) * g_depthAverageHalf; this->state.currentPrimitive->outerSize = 10.0f; this->state.currentPrimitive->innerSize = 5.0f; this->state.currentPrimitive->heightSize = 3.5f; this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - this->state.currentPrimitive->duration / 2; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); for (int count = 0; count < 2; ++count) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 80, 0) + (facing - 40)); this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); EffectPrimitiveState& aimed = *this->state.currentPrimitive; reinterpret_cast(aimed.transform)->MakeYRotation(GetRadian(static_cast(aimed.longitude))); EffectPrimitiveState& pitched = *this->state.currentPrimitive; reinterpret_cast(pitched.transform)->AppendXRotation(GetRadian(static_cast(pitched.latitude))); EffectPrimitiveState& launched = *this->state.currentPrimitive; launched.deltaPos3 = RotatedForward(launched.transform, static_cast(std::max(rand() % 4, 0) + 4)); EffectPrimitiveState& placed = *this->state.currentPrimitive; placed.deltaPos2 = {placed.deltaPos3.x + 0.0f, placed.deltaPos3.y - 10.0f, placed.deltaPos3.z + 0.0f}; this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; EffectPrimitiveState& braking = *this->state.currentPrimitive; braking.accel = -(braking.speed / static_cast(braking.duration)) * g_depthAverageHalf; this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; this->state.currentPrimitive->red = 20; this->state.currentPrimitive->green = 20; this->state.currentPrimitive->blue = 20; this->state.currentPrimitive->fadeOutCnt = 0; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); this->state.currentPrimitive->numSegment = 3; Owner(this->state.currentPrimitive).InitSegment(); } for (int count = 0; count < 2; ++count) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 80, 0) + (facing + 140)); this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); EffectPrimitiveState& aimed = *this->state.currentPrimitive; reinterpret_cast(aimed.transform)->MakeYRotation(GetRadian(static_cast(aimed.longitude))); EffectPrimitiveState& pitched = *this->state.currentPrimitive; reinterpret_cast(pitched.transform)->AppendXRotation(GetRadian(static_cast(pitched.latitude))); EffectPrimitiveState& launched = *this->state.currentPrimitive; launched.deltaPos3 = RotatedForward(launched.transform, static_cast(std::max(rand() % 4, 0) + 4)); EffectPrimitiveState& placed = *this->state.currentPrimitive; placed.deltaPos2 = {placed.deltaPos3.x + 0.0f, placed.deltaPos3.y - 10.0f, placed.deltaPos3.z + 0.0f}; EffectPrimitiveState& level = *this->state.currentPrimitive; reinterpret_cast(level.transform)->MakeYRotation(GetRadian(static_cast(level.longitude))); this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; EffectPrimitiveState& braking = *this->state.currentPrimitive; braking.accel = -(braking.speed / static_cast(braking.duration)) * g_depthAverageHalf; this->state.currentPrimitive->gravSpeed = -static_cast(std::max(rand() % 90, 0) + 30) / 100.0f; EffectPrimitiveState& falling = *this->state.currentPrimitive; falling.gravAccel = -(falling.gravSpeed / static_cast(falling.duration) * 2.0f); this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; this->state.currentPrimitive->red = 20; this->state.currentPrimitive->green = 20; this->state.currentPrimitive->blue = 20; this->state.currentPrimitive->fadeOutCnt = 0; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); this->state.currentPrimitive->numSegment = 3; Owner(this->state.currentPrimitive).InitSegment(); } } // OFFSET: 0x00C1AF10 // FUNCTION: fn_20070 void CRagEffect::IceArrow() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 12) { char soundBuffer[64]; sprintf(soundBuffer, "effect\\EF_IceArrow%d.wav", ClampedRandom(3) + 1); PlayEffectWave(*this, soundBuffer); this->state.count *= 10; } if (this->state.stateCnt >= 12) { const int frameOffset = this->state.stateCnt - 12; if (frameOffset % 10 == 0 && frameOffset < static_cast(this->state.count)) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 70; this->state.lastPrim->state.pattern = 20; EffectPrimitiveState& arrow = this->state.lastPrim->state; const int spreadZ = ClampedRandom(10); const int spreadX = ClampedRandom(10); arrow.deltaPos2.y = -60.0f; arrow.deltaPos2.x = static_cast(spreadX + 25); arrow.deltaPos2.z = static_cast(spreadZ + 15); const int aimZ = ClampedRandom(4); const int aimX = ClampedRandom(4); const float angleY = -CRenderObject::Heading( this->state.lastPrim->state.deltaPos2.x, this->state.lastPrim->state.deltaPos2.z, static_cast(aimX - 2), static_cast(aimZ - 2) ); this->state.lastPrim->state.longitude = angleY; this->state.longitude = angleY; const float dx = std::fabs(this->state.lastPrim->state.deltaPos2.x); const float dz = std::fabs(this->state.lastPrim->state.deltaPos2.z); const float distXZ = SquareRoot(dx * dx + dz * dz); const float angleX = CRenderObject::Heading(-std::fabs(this->state.lastPrim->state.deltaPos2.y), distXZ, 0.0f, 0.0f); this->state.lastPrim->state.latitude = angleX; this->state.latitude = angleX; EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); reinterpret_cast(this->state.lastPrim->state.transform)->AppendYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.speed = -2.75f; this->state.lastPrim->state.widthSize = 11.5f; this->state.lastPrim->state.heightSize = 3.8f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\icearrow.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } } if (this->state.flag != 0) { this->state.flag = 0; this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 30; this->state.lastPrim->state.latitude = 90.0f; this->state.lastPrim->state.radiusSpeed = 1.2f; const float accel = -(this->state.lastPrim->state.radiusSpeed / static_cast(this->state.lastPrim->state.duration + 40)); this->state.lastPrim->state.radiusAccel = accel + accel; this->state.lastPrim->state.innerSize = 10.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } } // OFFSET: 0x00C153D0 // FUNCTION: fn_20050 void CRagEffect::Flasher() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\hunter_flasher.wav"); } RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, vertex ); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 70; this->state.lastPrim->state.pattern = 65; this->state.lastPrim->state.renderFlag |= 2; this->state.lastPrim->state.deltaPos2.y = -10.0f; this->state.lastPrim->state.widthSize = 20.0f; this->state.lastPrim->state.heightSize = 20.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 6.0f; this->state.lastPrim->state.chRadiSpeed = 1; this->state.lastPrim->state.chPoint.push_back(40.0f); this->state.lastPrim->state.chVal1.push_back(120.0f); this->state.lastPrim->state.chVal2.push_back(200.0f); this->state.lastPrim->state.chPoint.push_back(100.0f); this->state.lastPrim->state.chVal1.push_back(0.0f); this->state.lastPrim->state.chVal2.push_back(80.0f); this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\thunder_center.bmp", 0, false, true, false); for (int i = 0; i < 20; ++i) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 70; this->state.lastPrim->state.deltaPos2.y = -40.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.longSpeed = static_cast(ClampedRandom(60) + 10) / 10.0f; const float accel = -(this->state.lastPrim->state.longSpeed / static_cast(this->state.lastPrim->state.duration)); this->state.lastPrim->state.longAccel = accel / 1.5f; this->state.lastPrim->state.arcAngle = static_cast(ClampedRandom(25) + 5) / 10.0f; this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(40) + 20); this->state.lastPrim->state.heightSpeed = static_cast(ClampedRandom(30) + 50) / 10.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); } } } // OFFSET: 0x00C666B0 // FUNCTION: fn_20275 int CRagEffect::SuperAngel(char type, int dummy) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0 || (this->state.stateCnt <= 18 && (type == 1 || type == 11) && this->state.stateCnt % 3 == 0)) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 85, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.size = 1.0f; this->state.lastPrim->state.slots[0].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.y = this->render.position.y - 40.0f; this->state.lastPrim->state.slots[0].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].flag1[0] = type; this->state.lastPrim->state.slots[0].flag1[1] = static_cast(this->state.stateCnt); this->state.lastPrim->state.alpha = 0.0f; if (type == 0) { Owner(&this->state.lastPrim->state).SetSpriteName("\uc774\ud329\ud2b8\\\ucc9c\uc0ac.spr"); Owner(&this->state.lastPrim->state).SetActionName("\uc774\ud329\ud2b8\\\ucc9c\uc0ac.act"); this->state.lastPrim->state.renderFlag = 5; } else if (type == 1) { Owner(&this->state.lastPrim->state).SetSpriteName("\uc774\ud329\ud2b8\\\ucc9c\uc0ac\ub0a0\uac1c.spr"); Owner(&this->state.lastPrim->state).SetActionName("\uc774\ud329\ud2b8\\\ucc9c\uc0ac\ub0a0\uac1c.act"); this->state.lastPrim->state.renderFlag = 5; } else if (type == 2) { Owner(&this->state.lastPrim->state).SetSpriteName("\uc774\ud329\ud2b8\\\uae43\ud1381.spr"); Owner(&this->state.lastPrim->state).SetActionName("\uc774\ud329\ud2b8\\\uae43\ud1381.act"); this->state.lastPrim->state.renderFlag = 5; } else if (type == 3) { Owner(&this->state.lastPrim->state).SetSpriteName("\uc774\ud329\ud2b8\\\uae43\ud1382.spr"); Owner(&this->state.lastPrim->state).SetActionName("\uc774\ud329\ud2b8\\\uae43\ud1382.act"); this->state.lastPrim->state.renderFlag = 5; } else if (type == 4) { Owner(&this->state.lastPrim->state).SetSpriteName("\uc774\ud329\ud2b8\\\uae43\ud1383.spr"); Owner(&this->state.lastPrim->state).SetActionName("\uc774\ud329\ud2b8\\\uae43\ud1383.act"); this->state.lastPrim->state.renderFlag = 5; } else if (type == 10) { Owner(&this->state.lastPrim->state).SetSpriteName("\uc774\ud329\ud2b8\\\ud55c\ubcf5\ucc9c\uc0ac.spr"); Owner(&this->state.lastPrim->state).SetActionName("\uc774\ud329\ud2b8\\\ud55c\ubcf5\ucc9c\uc0ac.act"); this->state.lastPrim->state.renderFlag = 1; this->state.lastPrim->state.slots[0].vecBNow.y = this->render.position.y - 30.0f; this->state.lastPrim->state.renderFlag |= 0x200; } else if (type == 11) { Owner(&this->state.lastPrim->state).SetSpriteName("\uc774\ud329\ud2b8\\\ud55c\ubcf5\ucc9c\uc0ac(\ub0a0\uac1c).spr"); Owner(&this->state.lastPrim->state).SetActionName("\uc774\ud329\ud2b8\\\ud55c\ubcf5\ucc9c\uc0ac(\ub0a0\uac1c).act"); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.slots[0].vecBNow.y = this->render.position.y - 30.0f; } Owner(&this->state.lastPrim->state).SetAction(0, 16, 1); Owner(&this->state.lastPrim->state).InitSegment(); this->state.lastPrim->state.repeatAnim = 1; Owner(&this->state.lastPrim->state).render.previousAnimation = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } if (type == 0 || type == 10) { if (this->state.stateCnt == 65) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 75, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); this->state.lastPrim->state.size = 4.0f; for (short i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].maxHeight = 2.0f; this->state.lastPrim->state.slots[i].rotStart = i * 90; this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].distance = 2.0f; this->state.lastPrim->state.slots[i].height[0] = 1.0f; this->state.lastPrim->state.slots[i].flag1[0] = 0; } } if (this->state.stateCnt == 66) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 75, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); this->state.lastPrim->state.size = 4.0f; for (short i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].distance = 2.0f; this->state.lastPrim->state.slots[i].maxHeight = 2.0f; this->state.lastPrim->state.slots[i].rotStart = i * 90 + 45; this->state.lastPrim->state.slots[i].height[0] = 1.0f; this->state.lastPrim->state.slots[i].flag1[0] = 0; } } } return this->state.stateCnt; } // OFFSET: 0x00C3EE10 // FUNCTION: fn_20119 int CRagEffect::WarpZone() { if (this->state.stateCnt == 145) { this->state.stateCnt = 0; } else if (this->state.stateCnt != 0) { goto check_cadence; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 158; this->state.lastPrim->state.pattern |= 1; this->state.lastPrim->state.radius = 15.0f; this->state.lastPrim->state.deltaPos2.y -= 1.0f; this->state.lastPrim->state.latitude = 90.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 128.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); check_cadence: if (this->state.stateCnt % 28 == 0 && this->state.stateCnt < 117) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 80; this->state.lastPrim->state.innerSize = 4.0f; this->state.lastPrim->state.latitude = 90.0f; this->state.lastPrim->state.deltaPos2.y -= 1.0f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(static_cast(this->state.lastPrim->state.latitude))); this->state.lastPrim->state.radius = 14.0f; this->state.lastPrim->state.radiusSpeed = -0.15f; this->state.lastPrim->state.alpha = 5.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = 10.0f; this->state.lastPrim->state.chPoint.push_back(20.0f); this->state.lastPrim->state.chVal1.push_back(0.0f); this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 5; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } int result = this->state.stateCnt / 10; if (this->state.stateCnt % 10 == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.radius = static_cast(ClampedRandom(200) / 100) * 0.75f + 5.0f; this->state.lastPrim->state.radiusSpeed = 0.0005f; this->state.lastPrim->state.duration = 130; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); rand(); this->state.lastPrim->state.longSpeed = 2.0f; this->state.lastPrim->state.gravSpeed = -0.2f; this->state.lastPrim->state.gravAccel = -(this->state.lastPrim->state.gravSpeed / static_cast(this->state.lastPrim->state.duration)) / 1.5f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, this->state.lastPrim->state.radius); this->state.lastPrim->state.size = static_cast(ClampedRandom(10) / 10) + 0.7f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\particle1.spr"); this->state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\particle1.act"); this->state.lastPrim->InitSegment(); } return result; } // OFFSET: 0x00C12500 // FUNCTION: fn_20041 void CRagEffect::Enhance() { if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.arcAngle = 22.5f; this->state.lastPrim->state.size = 7.0f; this->state.lastPrim->state.latitude = 90.0f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(static_cast(this->state.lastPrim->state.latitude))); this->state.lastPrim->state.alpha = 128.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->InitSegment(); this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.outerSize = 6.0f; this->state.lastPrim->state.innerSize = 6.0f; this->state.lastPrim->state.heightSpeed = 2.0f; this->state.lastPrim->state.heightAccel = -(this->state.lastPrim->state.heightSpeed / static_cast(this->state.lastPrim->state.duration)) / 1.5f; this->state.lastPrim->state.maxHeightSize = 50.0f; this->state.lastPrim->state.alpha = 128.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); } if (g_serviceOptions.Get(229) == 0) { if (this->state.stateCnt % 5 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 50; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); const float distance = static_cast(ClampedRandom(5) + 2); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, distance); reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(90)); this->state.lastPrim->state.speed = 2.0f; this->state.lastPrim->state.widthSize = 7.0f; this->state.lastPrim->state.heightSize = 0.25f; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); } else { if (this->state.stateCnt % 15 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 50; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); const float distance = static_cast(ClampedRandom(5) + 2); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, distance); reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(90)); this->state.lastPrim->state.speed = 2.0f; this->state.lastPrim->state.widthSize = 7.0f; this->state.lastPrim->state.heightSize = 0.25f; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); } this->state.lastPrim->state.slots[0].life = 0; } // OFFSET: 0x00C17500 // FUNCTION: fn_20060 void CRagEffect::HasteUp() { if (this->state.stateCnt == 0) { this->state.duration = 300; PlayEffectWave(*this, "effect\\black_adrenalinerush_a.wav"); } if (this->state.stateCnt == 30) { PlayEffectWave(*this, "effect\\black_adrenalinerush_b.wav"); } RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, vertex ); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt == 0) { for (int index = 0; index < 20; ++index) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 80; this->state.lastPrim->state.deltaPos2.y = -40.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.longSpeed = static_cast(ClampedRandom(60) + 10) / 10.0f; this->state.lastPrim->state.longAccel = -(this->state.lastPrim->state.longSpeed / static_cast(this->state.lastPrim->state.duration)) / 1.5f; this->state.lastPrim->state.arcAngle = static_cast(ClampedRandom(25) + 5) / 10.0f; this->state.lastPrim->state.heightSize = 0.0f; this->state.lastPrim->state.heightSpeed = static_cast(ClampedRandom(20) + 50) / 13.0f; this->state.lastPrim->state.changePoint = 40; this->state.lastPrim->state.changeSpeed = static_cast(ClampedRandom(10) + 15) / 10.0f; this->state.lastPrim->state.changeAccel = 0.0f; this->state.lastPrim->state.changeHeightSpeed = 0.0f; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); } if (this->state.stateCnt == 0) { for (int index = 0; index < 4; ++index) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 100; this->state.lastPrim->state.radius = 7.0f; this->state.lastPrim->state.gravSpeed = -0.1f; this->state.lastPrim->state.gravAccel = -0.002f; this->state.lastPrim->state.longitude = static_cast(index * 90); this->state.lastPrim->state.longAccel = 0.2f; this->state.lastPrim->state.longSpeed = static_cast(this->state.stateCnt) * this->state.lastPrim->state.longAccel + 0.3f; this->state.lastPrim->state.size = 1.2f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 10; this->state.lastPrim->SetSpriteName("이팩트\\particle1.spr"); this->state.lastPrim->SetActionName("이팩트\\particle1.act"); this->state.lastPrim->InitSegment(); } } } } // OFFSET: 0x00C179F0 // FUNCTION: fn_20061 void CRagEffect::HealSP() { this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { this->state.duration = 100; this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 100; this->state.lastPrim->state.longSpeed = 5.0f; this->state.lastPrim->state.outerSize = 2.5f; this->state.lastPrim->state.innerSize = 2.5f; this->state.lastPrim->state.heightSize = 15.0f; this->state.lastPrim->state.red = 0x20; this->state.lastPrim->state.green = 0xb0; this->state.lastPrim->state.blue = 0xe8; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 16.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 30.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.longSpeed = 5.0f; this->state.lastPrim->state.outerSize = 3.5f; this->state.lastPrim->state.innerSize = 3.5f; this->state.lastPrim->state.heightSize = 25.0f; this->state.lastPrim->state.red = 0x20; this->state.lastPrim->state.green = 0xb0; this->state.lastPrim->state.blue = 0xe8; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 32.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 30.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); this->state.lastPrim = CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.longSpeed = 5.0f; this->state.lastPrim->state.outerSize = 4.5f; this->state.lastPrim->state.innerSize = 4.5f; this->state.lastPrim->state.heightSize = 35.0f; this->state.lastPrim->state.red = 0x20; this->state.lastPrim->state.green = 0xb0; this->state.lastPrim->state.blue = 0xe8; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 64.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 30.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); PlayEffectWave(*this, "_heal_effect.wav"); } if ((this->state.stateCnt & 1) == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects()); rand(); this->state.lastPrim->state.radius = 3.0f; this->state.lastPrim->state.duration = 30; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.gravSpeed = -1.2f; this->state.lastPrim->state.gravAccel = -(this->state.lastPrim->state.gravSpeed / static_cast(this->state.lastPrim->state.duration)) / 1.5f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, this->state.lastPrim->state.radius); this->state.lastPrim->state.size = 0.55f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\particle2.spr"); this->state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\particle2.act"); this->state.lastPrim->InitSegment(); } } // OFFSET: 0x00C0D2C0 // FUNCTION: fn_20021 void CRagEffect::RedParticleSpray(int count) { if (this->state.stateCnt != 0) { return; } for (int angle = -90; count > 0; angle += 90, --count) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 8, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 60; this->state.lastPrim->state.deltaPos2 = {0.0f, -10.0f, 0.0f}; this->state.lastPrim->state.radius = this->state.lastPrim->CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->Face(this->state.deltaPos[0], this->state.deltaPos[2]); this->state.lastPrim->state.longitude = -this->state.lastPrim->render.angle; const float speed = this->state.lastPrim->state.radius / this->state.lastPrim->state.duration; this->state.lastPrim->state.speed = speed + speed; this->state.lastPrim->state.gravSpeed = 2.0f; const float rise = -(this->state.lastPrim->state.gravSpeed / this->state.lastPrim->state.duration); this->state.lastPrim->state.gravAccel = rise + rise; this->state.lastPrim->state.latiSpeed = -2.0f; const float spread = -(this->state.lastPrim->state.latiSpeed / this->state.lastPrim->state.duration); this->state.lastPrim->state.latiAccel = spread + spread; this->state.lastPrim->state.roll = static_cast(angle); EffectPrimitiveState& particle = this->state.lastPrim->state; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(static_cast(particle.longitude))); this->state.lastPrim->state.deltaPos3 = RotatedForward(this->state.lastPrim->state.transform, 1.0f); this->state.lastPrim->state.rotAxis[0] = this->state.lastPrim->state.deltaPos3.x; this->state.lastPrim->state.rotAxis[1] = this->state.lastPrim->state.deltaPos3.y; this->state.lastPrim->state.rotAxis[2] = this->state.lastPrim->state.deltaPos3.z; this->state.lastPrim->state.red = 250; this->state.lastPrim->state.green = 100; this->state.lastPrim->state.blue = 100; this->state.lastPrim->state.size = 1.7f; this->state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\particle1.spr"); this->state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\particle1.act"); this->state.lastPrim->state.numSegment = 7; this->state.lastPrim->InitSegment(); } } // OFFSET: 0x00C19FC0 // FUNCTION: fn_20067 void CRagEffect::Hit5() { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, vertex ); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\EF_hit5.wav"); const int angle = ClampedRandom(360); const int angles[2] = {angle, angle + 90}; for (int index = 0; index < 2; ++index) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 17; this->state.lastPrim->state.deltaPos2.y = -20.0f; this->state.lastPrim->state.roll = static_cast(angles[index]); this->state.lastPrim->state.rollSpeed = -5.0f; this->state.lastPrim->state.rollAccel = -(this->state.lastPrim->state.rollSpeed / static_cast(this->state.lastPrim->state.duration)) / 1.5f; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(5) + 20); this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(10) + 30); this->state.lastPrim->state.widthSpeed = -(this->state.lastPrim->state.widthSize / static_cast(this->state.lastPrim->state.duration)); this->state.lastPrim->state.heightSpeed = 2.5f; this->state.lastPrim->state.heightAccel = 0.5f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\lens2.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } } // OFFSET: 0x00C1A2C0 // FUNCTION: fn_20068 void CRagEffect::Hit6() { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, vertex ); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\EF_hit6.wav"); const int angle = ClampedRandom(360); const int angles[2] = {angle, angle + 90}; for (int index = 0; index < 2; ++index) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 17; this->state.lastPrim->state.deltaPos2.y = -20.0f; this->state.lastPrim->state.roll = static_cast(angles[index]); this->state.lastPrim->state.rollSpeed = -5.0f; this->state.lastPrim->state.rollAccel = -(this->state.lastPrim->state.rollSpeed / static_cast(this->state.lastPrim->state.duration)) / 1.5f; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(5) + 10); this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(5) + 15); this->state.lastPrim->state.widthSpeed = -(this->state.lastPrim->state.widthSize / static_cast(this->state.lastPrim->state.duration)); this->state.lastPrim->state.heightSpeed = 1.7f; this->state.lastPrim->state.heightAccel = 0.5f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\lens2.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } } // OFFSET: 0x00C10F50 // FUNCTION: fn_20036 void CRagEffect::StoneWall() { if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\wizard_icewall.wav"); this->state.duration = 9999; for (int offset = -2; offset < 4; offset += 2) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.pattern |= 1u; const int angle = ClampedRandom(360); const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); this->state.lastPrim->state.deltaPos2.y = 30.0f; this->state.lastPrim->state.deltaPos2.x = sine * 0.0f; this->state.lastPrim->state.deltaPos2.z = -static_cast(offset) * cosine; this->state.lastPrim->state.size = static_cast(ClampedRandom(40) / 100) + 2.5f; this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(100) + 300) / 10.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.latitude = static_cast(ClampedRandom(6) + 87); this->state.lastPrim->state.chCnt = 20; this->state.lastPrim->state.alpha = 200.0f; EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = this->state.lastPrim->state; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); EffectPrimitiveState& copy = this->state.lastPrim->state; std::memcpy(copy.rotTransform, copy.transform, sizeof(copy.rotTransform)); this->state.lastPrim->state.speed = 3.0f; EffectPrimitiveState& slow = this->state.lastPrim->state; const float decay = -(slow.speed / 40.0f); slow.accel = decay + decay; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\stone.bmp", 0, false, true, false); } } // INLINED static __forceinline void LaunchTintedFireballVolley(CRagEffect& effect, float turn, int red, int green, int blue, int fade) { CEffectPrim* particle = CreateEffectParticle(effect, effect.render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); effect.state.lastPrim = particle; effect.state.lastPrim->state.duration = 20; effect.state.lastPrim->state.pattern |= 0x120u; effect.state.lastPrim->state.deltaPos2 = {0.0f, -15.0f, 0.0f}; particle->Face(effect.state.deltaPos[0], effect.state.deltaPos[2]); if (turn != 0.0f) { effect.state.lastPrim->render.angle = effect.state.lastPrim->render.angle + turn; if (effect.state.lastPrim->render.angle < 0.0f) { effect.state.lastPrim->render.angle = effect.state.lastPrim->render.angle + 360.0f; } if (effect.state.lastPrim->render.angle >= 360.0f) { effect.state.lastPrim->render.angle = effect.state.lastPrim->render.angle - 360.0f; } } effect.state.lastPrim->state.longitude = -effect.state.lastPrim->render.angle; effect.state.lastPrim->render.angle = 180.0f - effect.state.lastPrim->render.angle; if (effect.state.lastPrim->render.angle < 0.0f) { effect.state.lastPrim->render.angle = effect.state.lastPrim->render.angle + 360.0f; } effect.state.lastPrim->state.speed = -(effect.state.lastPrim->CalcDist(effect.state.deltaPos[0], effect.state.deltaPos[2]) / effect.state.lastPrim->state.duration); reinterpret_cast(effect.state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(effect.state.lastPrim->state.longitude))); effect.state.lastPrim->state.size = 1.0f; effect.state.lastPrim->state.animSpeed = 1; effect.state.lastPrim->state.red = red; effect.state.lastPrim->state.green = green; effect.state.lastPrim->state.blue = blue; effect.state.lastPrim->state.alpha = static_cast((fade - effect.state.stateCnt) * 40); effect.state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\fireball.spr"); effect.state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\fireball.act"); effect.state.lastPrim->InitSegment(); } // OFFSET: 0x00C13D80 // FUNCTION: fn_20045 void CRagEffect::ShadedFireballVolley() { if (this->state.stateCnt == 5) { g_soundMgr->PlayWave("effect\\EF_FireBall.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } if (this->state.stateCnt == 0 || this->state.stateCnt == 1 || this->state.stateCnt == 2 || this->state.stateCnt == 3) { LaunchTintedFireballVolley(*this, 0.0f, 155, 155, 255, 5); } if (this->state.stateCnt == 6 || this->state.stateCnt == 7 || this->state.stateCnt == 8 || this->state.stateCnt == 9) { LaunchTintedFireballVolley(*this, -5.0f, 155, 255, 155, 11); } if (this->state.stateCnt == 12 || this->state.stateCnt == 13 || this->state.stateCnt == 14 || this->state.stateCnt == 15) { LaunchTintedFireballVolley(*this, 5.0f, 255, 155, 155, 17); } } // OFFSET: 0x00C10180 // FUNCTION: fn_20033 void CRagEffect::Detoxication() { const unsigned char enabled = g_serviceOptions.Get(0xe5); if (enabled == 0) { if (this->state.stateCnt % 5 != 0) { return; } if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_Detoxication.wav"); } this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.duration = 40; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, static_cast(ClampedRandom(6) + 2)); reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(90)); } else { if (this->state.stateCnt % 15 != 0) { return; } if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_Detoxication.wav"); } this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; this->state.lastPrim->state.alpha = 0.0f; reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, static_cast(ClampedRandom(6) + 2)); reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(90)); } this->state.lastPrim->state.speed = static_cast(ClampedRandom(30) + 30) / 100.0f; this->state.lastPrim->state.accel = -(this->state.lastPrim->state.speed / static_cast(this->state.lastPrim->state.duration)) * g_depthAverageHalf; this->state.lastPrim->state.size = static_cast(ClampedRandom(50) + 40) / 100.0f; this->state.lastPrim->state.rollSpeed = 3.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 5; this->state.lastPrim->SetSpriteName("이팩트\\particle2.spr"); this->state.lastPrim->SetActionName("이팩트\\particle2.act"); this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C112D0 // FUNCTION: fn_20037 void CRagEffect::EnchantPoison2() { const int frame = this->state.stateCnt; if (frame == 0 || frame == 5 || frame == 11 || frame == 18 || frame == 26 || frame == 40) { PlayEffectWave(*this, "effect\\assasin_enchantpoison.wav"); } if (this->state.stateCnt % 3 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; EffectPrimitiveState& bubble = this->state.lastPrim->state; reinterpret_cast(bubble.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, static_cast(ClampedRandom(6) + 2)); EffectPrimitiveState& raised = this->state.lastPrim->state; reinterpret_cast(raised.transform)->MakeXRotation(GetRadian(90)); this->state.lastPrim->state.speed = static_cast(ClampedRandom(50) + 30) / 100.0f; this->state.lastPrim->state.accel = -(this->state.lastPrim->state.speed / static_cast(this->state.lastPrim->state.duration)) * g_depthAverageHalf; this->state.lastPrim->state.size = static_cast(ClampedRandom(20) + 20) / 100.0f; this->state.lastPrim->state.rollSpeed = 3.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 5; this->state.lastPrim->SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle3.spr"); this->state.lastPrim->SetActionName(ResourceMgr::Instance(), "이팩트\\particle3.act"); this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C11610 // FUNCTION: fn_20038 void CRagEffect::PoisonAttack(char flag) { if (this->state.stateCnt == 0 && flag == 0) { PlayEffectWave(*this, "effect\\assasin_enchantpoison.wav"); PlayEffectWave(*this, "effect\\EF_PoisonAttack.wav"); } else if (flag == 1) { if (this->state.stateCnt % 9 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; EffectPrimitiveState& poison = this->state.lastPrim->state; reinterpret_cast(poison.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, static_cast(ClampedRandom(6) + 2)); EffectPrimitiveState& trail = this->state.lastPrim->state; reinterpret_cast(trail.transform)->MakeXRotation(GetRadian(90)); this->state.lastPrim->state.speed = static_cast(ClampedRandom(30) + 30) / 100.0f; this->state.lastPrim->state.accel = -(this->state.lastPrim->state.speed / static_cast(this->state.lastPrim->state.duration)) * g_depthAverageHalf; this->state.lastPrim->state.size = static_cast(ClampedRandom(50) + 40) / 170.0f; this->state.lastPrim->state.rollSpeed = 3.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 5; this->state.lastPrim->SetSpriteName("이팩트\\particle3.spr"); this->state.lastPrim->SetActionName("이팩트\\particle3.act"); if (this->state.type == 0x304) { this->state.lastPrim->state.renderFlag = 0x201; } this->state.lastPrim->InitSegment(); return; } if (this->state.stateCnt % 5 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; EffectPrimitiveState& poison = this->state.lastPrim->state; reinterpret_cast(poison.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, static_cast(ClampedRandom(6) + 2)); EffectPrimitiveState& trail = this->state.lastPrim->state; reinterpret_cast(trail.transform)->MakeXRotation(GetRadian(90)); this->state.lastPrim->state.speed = static_cast(ClampedRandom(30) + 30) / 100.0f; this->state.lastPrim->state.accel = -(this->state.lastPrim->state.speed / static_cast(this->state.lastPrim->state.duration)) * g_depthAverageHalf; this->state.lastPrim->state.size = static_cast(ClampedRandom(50) + 40) / 100.0f; this->state.lastPrim->state.rollSpeed = 3.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 5; this->state.lastPrim->SetSpriteName("이팩트\\particle3.spr"); this->state.lastPrim->SetActionName("이팩트\\particle3.act"); this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C18090 // FUNCTION: fn_20062 void CRagEffect::StoneSpike() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\wizard_earthspike.wav"); g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); this->state.duration += 50; for (int z = -10; z < 15; z += 5) { for (int x = -10; x < 15; x += 5) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = ClampedRandom(30) + this->state.duration - 10; this->state.lastPrim->state.pattern = 1; this->state.lastPrim->state.pattern |= 2u; const int heading = ClampedRandom(360); rand(); ClientSine(heading); ClientCosine(heading); const int heightRand = ClampedRandom(60); this->state.lastPrim->state.deltaPos2 = {static_cast(x), 10.0f, static_cast(z)}; this->state.lastPrim->state.size = static_cast(ClampedRandom(50) + 300) / 100.0f; this->state.lastPrim->state.heightSize = static_cast(heightRand + 1) / 10.0f + 9.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.latitude = static_cast(ClampedRandom(20) + 80); EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = this->state.lastPrim->state; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); EffectPrimitiveState& stone = this->state.lastPrim->state; std::memcpy(stone.rotTransform, stone.transform, sizeof(stone.rotTransform)); this->state.lastPrim->state.changeSpeed3d.y = -1.0f; this->state.lastPrim->state.changeAccel3d.y = -0.01f; this->state.lastPrim->state.speed = 1.0f; this->state.lastPrim->state.accel = 0.01f; this->state.lastPrim->state.changePoint = 11; this->state.lastPrim->state.changeSpeed = -1.2f; this->state.lastPrim->state.changeAccel = 0.0f; this->state.lastPrim->state.chCnt = 14; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\stone.bmp", 0, false, true, false); } } } // OFFSET: 0x00C586B0 // FUNCTION: fn_20208 void CRagEffect::WhiteSparkRing(char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (static_cast(this->state.stateCnt) >= 3) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 100, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; CopyVector(this->state.lastPrim->render.position, this->render.position); this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; const std::int16_t phase = kind; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; if (kind == 3) { this->state.lastPrim->state.slots[index].process = -(25 + ClampedRandom(21)); this->state.lastPrim->state.slots[index].maxHeight = 0.06f; } else { this->state.lastPrim->state.slots[index].process = -(15 + ClampedRandom(26)); this->state.lastPrim->state.slots[index].maxHeight = 0.07f; } this->state.lastPrim->state.slots[index].alphaB = static_cast(ClampedRandom(121) + 125); Get_Angle( this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], &this->state.lastPrim->state.slots[index].riseAngle ); this->state.lastPrim->state.slots[index].riseAngle += static_cast(ClampedRandom(121) - 60); if (this->state.lastPrim->state.slots[index].riseAngle >= 360) { this->state.lastPrim->state.slots[index].riseAngle -= 360; } if (this->state.lastPrim->state.slots[index].riseAngle < 0) { this->state.lastPrim->state.slots[index].riseAngle += 360; } this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(7)) + 6.0f; this->state.lastPrim->state.slots[index].height[0] = 0.0f; this->state.lastPrim->state.slots[index].vecTNow.x = static_cast(ClampedRandom(7)) * 0.1f + 0.8f; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[index].vecTNow.y = 3.0f; for (int height = 20; height > 0; --height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } this->state.lastPrim->state.slots[index].alphaT = phase; } } // OFFSET: 0x00C5E740 // FUNCTION: fn_20239 void CRagEffect::WhiteLightTrail(const char* name, char kind) { const std::int16_t limit = static_cast(kind == 0 ? 35 : (kind == 1 ? 0 : kind)); if (this->state.stateCnt != limit) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 96, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; if (kind == 0) { this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].maxHeight = static_cast(ClampedRandom(16)) * 0.01f + 0.1f; this->state.lastPrim->state.slots[0].distance = static_cast(ClampedRandom(11)) * 0.1f + 3.0f; this->state.lastPrim->state.slots[0].process = -ClampedRandom(26); this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].vecBPre.y = static_cast(-ClampedRandom(8)); const int heading = ClampedRandom(360); this->state.lastPrim->state.slots[0].vecBPre.x = g_cosTable[heading] * 2.5f; this->state.lastPrim->state.slots[0].vecBPre.z = g_sinTable[heading] * 2.5f; this->state.lastPrim->state.slots[0].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].flag1[0] = 1; return; } if (kind == 1) { for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].maxHeight = static_cast(ClampedRandom(11)) * 0.005f + 0.08f; this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(11)) * 0.05f + 2.0f; this->state.lastPrim->state.slots[index].process = -ClampedRandom(26); this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].vecBPre.y = static_cast(-ClampedRandom(8)); const int heading = ClampedRandom(360); this->state.lastPrim->state.slots[index].vecBPre.x = g_cosTable[heading] * 3.5f; this->state.lastPrim->state.slots[index].vecBPre.z = g_sinTable[heading] * 3.5f; this->state.lastPrim->state.slots[index].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].flag1[0] = 2; } } } // OFFSET: 0x00C482B0 // FUNCTION: fn_20162 void CRagEffect::ElementalOrbit(char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } int count = static_cast(this->state.deltaPos[0]); if (count > 5) { count = 5; } else if (count <= 0) { return; } int phase = 0; int angle = 0; for (int index = 0; index < count; ++index) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 32, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[4] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[5] = static_cast(ClampedRandom(360)); if (kind == 1) { this->state.lastPrim->state.slots[0].height[6] = static_cast(angle); this->state.lastPrim->state.slots[0].height[7] = -14.0f; this->state.lastPrim->state.slots[0].distance = 1.3f; this->state.lastPrim->state.slots[0].height[10] = 1.0f; this->state.lastPrim->state.slots[0].flag1[0] = 0; } else if (kind == 3 || kind == 4) { this->state.lastPrim->state.slots[0].height[6] = this->state.deltaPos[0] > 5.0f ? static_cast(angle) : static_cast(phase) / this->state.deltaPos[0]; this->state.lastPrim->state.slots[0].height[7] = -15.0f; this->state.lastPrim->state.slots[0].distance = 1.0f; if (this->state.deltaPos[0] > 5.0f) { if (this->state.deltaPos[0] - static_cast(index) >= 6.0f) { this->state.lastPrim->state.slots[0].distance = 2.0f; } } this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].flag1[0] = 1; } else { this->state.lastPrim->state.slots[0].height[6] = static_cast(angle); this->state.lastPrim->state.slots[0].height[7] = -15.0f; this->state.lastPrim->state.slots[0].distance = 2.0f; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].flag1[0] = 0; if (this->state.deltaPos[0] > 10.0f) { this->state.lastPrim->state.slots[0].distance = 2.0f; if (this->state.deltaPos[0] - static_cast(index) >= 11.0f) { this->state.lastPrim->state.slots[0].flag1[0] = static_cast(21); } else { this->state.lastPrim->state.slots[0].flag1[0] = static_cast(20); } } else if (this->state.deltaPos[0] > 5.0f) { if (this->state.deltaPos[0] - static_cast(index) >= 6.0f) { this->state.lastPrim->state.slots[0].distance = 2.0f; this->state.lastPrim->state.slots[0].flag1[0] = static_cast(20); } } } if (kind > 9) { this->state.lastPrim->state.slots[0].height[6] += static_cast(ClampedRandom(360)); if (this->state.lastPrim->state.slots[0].height[6] >= 360.0f) { this->state.lastPrim->state.slots[0].height[6] -= 360.0f; } this->state.lastPrim->state.slots[0].flag1[0] = static_cast(kind); this->state.lastPrim->state.slots[0].distance = 6.0f; this->state.lastPrim->state.totalTexture = 1; } this->state.lastPrim->state.slots[0].height[8] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; const char* texture; switch (kind) { case 4: texture = "effect\\RL_richs_coin_B\\rcoin1.bmp"; break; case 10: texture = "effect\\fire-1.bmp"; break; case 11: texture = "effect\\lightning-1.bmp"; break; case 12: texture = "effect\\water-1.bmp"; break; case 13: texture = "effect\\stone-1.bmp"; break; default: texture = "effect\\thunder_center.bmp"; break; } this->state.lastPrim->state.textures[0] = g_texMgr.Load(texture, 0, false, true, false); phase += 360; angle += 72; } } // OFFSET: 0x00C62260 // FUNCTION: fn_20250 void CRagEffect::WhiteRingWave() { if (this->state.stateCnt % 100 != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 63, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_white.tga", 0, false, true, false); this->state.lastPrim->state.size = 16.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 6.001f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 0.0f; this->state.lastPrim->state.slots[0].riseAngle = 2; this->state.lastPrim->state.slots[0].alphaT = 100; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[0].height[height] = 0.0f; this->state.lastPrim->state.slots[0].flag1[height] = 1; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = -10; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 6.001f; this->state.lastPrim->state.slots[1].rotStart = 25; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 0.0f; this->state.lastPrim->state.slots[1].riseAngle = 3; this->state.lastPrim->state.slots[1].alphaT = 100; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[1].height[height] = 0.0f; this->state.lastPrim->state.slots[1].flag1[height] = 1; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = -20; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 6.001f; this->state.lastPrim->state.slots[2].rotStart = 50; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 0.0f; this->state.lastPrim->state.slots[2].riseAngle = 4; this->state.lastPrim->state.slots[2].alphaT = 100; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[2].height[height] = 0.0f; this->state.lastPrim->state.slots[2].flag1[height] = 1; } this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].alphaT = 1; } // OFFSET: 0x00C59FD0 // FUNCTION: fn_20217 void CRagEffect::TripleRingStack(const char* name, char large) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt == 99999998) { this->state.stateCnt = 0; this->state.duration = 99999999; } else if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 23, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1; this->state.lastPrim->state.renderFlag |= 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); if (large == 1) { this->state.lastPrim->state.size = 7.0f; } else { this->state.lastPrim->state.size = 4.0f; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 315; this->state.lastPrim->state.slots[0].maxHeight = 15.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 120; this->state.lastPrim->state.slots[0].distance = 3.9f; this->state.lastPrim->state.slots[0].riseAngle = 55; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[0].height[height] = 0.0f; this->state.lastPrim->state.slots[0].flag1[height] = 0; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 315; this->state.lastPrim->state.slots[1].maxHeight = 13.0f; this->state.lastPrim->state.slots[1].rotStart = 90; this->state.lastPrim->state.slots[1].alphaB = 120; this->state.lastPrim->state.slots[1].distance = 4.1f; this->state.lastPrim->state.slots[1].riseAngle = 50; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[1].height[height] = 0.0f; this->state.lastPrim->state.slots[1].flag1[height] = 0; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 315; this->state.lastPrim->state.slots[2].maxHeight = 11.0f; this->state.lastPrim->state.slots[2].rotStart = 180; this->state.lastPrim->state.slots[2].alphaB = 120; this->state.lastPrim->state.slots[2].distance = 4.3f; this->state.lastPrim->state.slots[2].riseAngle = 45; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[2].height[height] = 0.0f; this->state.lastPrim->state.slots[2].flag1[height] = 0; } this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C5BC90 // FUNCTION: fn_20224 void CRagEffect::SpawnPaleBlur() { this->render.position.x = 155.0f; this->render.position.z = 255.0f; this->render.position.y = 155.0f; this->state.parent->SetColor(-1, 155, 155, 255); if (this->state.stateCnt == 9998) { this->state.stateCnt = 0; } else if (this->state.stateCnt % 20 != 0) { return; } CBlurPC* blur = new CBlurPC(reinterpret_cast(this->state.parent)); SendAfterimageColor(*blur, *this, this->render.position); CRenderObject* object = blur; WorldObjects().push_back(object); } // OFFSET: 0x00C5BDB0 // FUNCTION: fn_20225 void CRagEffect::SpawnLightBlur() { this->render.position.x = 225.0f; this->render.position.z = 255.0f; this->render.position.y = 225.0f; this->state.parent->SetColor(-1, 225, 225, 255); if (this->state.stateCnt == 9998) { this->state.stateCnt = 0; } else if (this->state.stateCnt % 10 != 0) { return; } CBlurPC* blur = new CBlurPC(reinterpret_cast(this->state.parent)); SendAfterimageColor(*blur, *this, this->render.position); CRenderObject* object = blur; WorldObjects().push_back(object); } // OFFSET: 0x00C5BED0 // FUNCTION: fn_20226 void CRagEffect::WideTripleRingStack(const char* name) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 23, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1; this->state.lastPrim->state.renderFlag |= 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 315; this->state.lastPrim->state.slots[0].maxHeight = 15.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 50; this->state.lastPrim->state.slots[0].alphaT = 1; this->state.lastPrim->state.slots[0].distance = 12.9f; this->state.lastPrim->state.slots[0].riseAngle = 55; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[0].height[height] = 0.0f; this->state.lastPrim->state.slots[0].flag1[height] = 0; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 315; this->state.lastPrim->state.slots[1].maxHeight = 13.0f; this->state.lastPrim->state.slots[1].rotStart = 90; this->state.lastPrim->state.slots[1].alphaB = 50; this->state.lastPrim->state.slots[1].alphaT = 1; this->state.lastPrim->state.slots[1].distance = 13.1f; this->state.lastPrim->state.slots[1].riseAngle = 50; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[1].height[height] = 0.0f; this->state.lastPrim->state.slots[1].flag1[height] = 0; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 315; this->state.lastPrim->state.slots[2].maxHeight = 11.0f; this->state.lastPrim->state.slots[2].rotStart = 180; this->state.lastPrim->state.slots[2].alphaB = 50; this->state.lastPrim->state.slots[2].alphaT = 1; this->state.lastPrim->state.slots[2].distance = 13.3f; this->state.lastPrim->state.slots[2].riseAngle = 45; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[2].height[height] = 0.0f; this->state.lastPrim->state.slots[2].flag1[height] = 0; } this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C42E80 // FUNCTION: fn_20140 void CRagEffect::SoulLink(int) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt == 1) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 68, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 4; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\soul_l.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\soul_u.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\soul_o.tga", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\soul_s.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = index * 20 - 60; this->state.lastPrim->state.slots[index].distance = 5.0f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].height[0] = static_cast(-4 - index * 6); this->state.lastPrim->state.slots[index].flag1[0] = static_cast(index); this->state.lastPrim->state.slots[index].flag1[4] = 2; for (int height = 1; height < 11; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; } } } else if (this->state.stateCnt == 21) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 68, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 4; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\soul_k.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\soul_n.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\soul_i.tga", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\soul_l.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = index * 20 - 120; this->state.lastPrim->state.slots[index].distance = 5.0f; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].height[0] = static_cast(22 - index * 6); this->state.lastPrim->state.slots[index].flag1[0] = static_cast(index); this->state.lastPrim->state.slots[index].flag1[4] = 2; for (int height = 1; height < 11; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; } } } } // OFFSET: 0x00C57CA0 // FUNCTION: fn_20206 void CRagEffect::WhiteSparkStreak(char kind) { CopyVector(this->render.position, this->state.parent->render.position); int limit = 0; if (kind == 1) { limit = 2; } else if (kind == 3) { limit = 5; } if (this->state.stateCnt < 0 || this->state.stateCnt >= limit) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 100, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; if (kind == 1) { this->state.lastPrim->state.slots[index].process = -ClampedRandom(11); this->state.lastPrim->state.slots[index].maxHeight = 0.1f; this->state.lastPrim->state.slots[index].alphaB = static_cast(ClampedRandom(51) + 125); } else if (kind == 3) { this->state.lastPrim->state.slots[index].process = -30 - ClampedRandom(41); this->state.lastPrim->state.slots[index].maxHeight = 0.07f; this->state.lastPrim->state.slots[index].alphaB = static_cast(ClampedRandom(121) + 125); } else { this->state.lastPrim->state.slots[index].process = -ClampedRandom(26); this->state.lastPrim->state.slots[index].maxHeight = 0.1f; if (kind < 3) { this->state.lastPrim->state.slots[index].alphaB = static_cast(ClampedRandom(51) + 125); } else { this->state.lastPrim->state.slots[index].alphaB = static_cast(ClampedRandom(121) + 125); } } this->state.lastPrim->state.slots[index].riseAngle = static_cast(ClampedRandom(360)); if (kind == 1) { this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(5)) + 5.0f; this->state.lastPrim->state.slots[index].vecTNow.y = 3.0f; } else { this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(6)) + 6.0f; if (kind == 3) { this->state.lastPrim->state.slots[index].vecTNow.y = 4.0f; } else { this->state.lastPrim->state.slots[index].vecTNow.y = 5.0f; } } this->state.lastPrim->state.slots[index].height[0] = 0.0f; this->state.lastPrim->state.slots[index].vecTNow.x = static_cast(ClampedRandom(7)) * 0.1f + 0.6f; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; for (int height = 1; height < 21; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } this->state.lastPrim->state.slots[index].alphaT = kind; if (kind == 1) { for (int step = 0; step < 10; ++step) { this->state.lastPrim->state.slots[index].height[0] += 6.0f; if (this->state.lastPrim->state.slots[index].height[0] > 180.0f) { this->state.lastPrim->state.slots[index].height[0] = 180.0f; } for (int layer = static_cast(this->state.lastPrim->state.slots[index].vecTNow.y); layer > 0; --layer) { this->state.lastPrim->state.slots[index].height[layer] = this->state.lastPrim->state.slots[index].height[layer - 1]; } } } } } // OFFSET: 0x00C61C50 // FUNCTION: fn_20249 void CRagEffect::BlueRingWave() { if (this->state.stateCnt % 14 == 0) { CopyVector(this->render.position, this->state.parent->render.position); PlayEffectWave(*this, "effect\\EF_ReadyPortal.wav"); } if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 63, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); this->state.lastPrim->state.size = 5.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 6.001f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 0.0f; this->state.lastPrim->state.slots[0].riseAngle = 2; this->state.lastPrim->state.slots[0].alphaT = 100; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[0].height[height] = 0.0f; this->state.lastPrim->state.slots[0].flag1[height] = 1; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = -10; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 6.001f; this->state.lastPrim->state.slots[1].rotStart = 25; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 0.0f; this->state.lastPrim->state.slots[1].riseAngle = 3; this->state.lastPrim->state.slots[1].alphaT = 100; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[1].height[height] = 0.0f; this->state.lastPrim->state.slots[1].flag1[height] = 1; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = -20; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 6.001f; this->state.lastPrim->state.slots[2].rotStart = 50; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 0.0f; this->state.lastPrim->state.slots[2].riseAngle = 4; this->state.lastPrim->state.slots[2].alphaT = 100; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[2].height[height] = 0.0f; this->state.lastPrim->state.slots[2].flag1[height] = 1; } this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].alphaT = 1; } // OFFSET: 0x00C4A650 // FUNCTION: fn_20170 void CRagEffect::QuadRingStack(const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 24, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 40.0f; this->state.lastPrim->state.slots[0].rotStart = 180; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 8.0f; this->state.lastPrim->state.slots[0].riseAngle = 90; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[0].height[height] = 0.0f; this->state.lastPrim->state.slots[0].flag1[height] = 0; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 39.0f; this->state.lastPrim->state.slots[1].rotStart = 270; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 7.9f; this->state.lastPrim->state.slots[1].riseAngle = 90; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[1].height[height] = 0.0f; this->state.lastPrim->state.slots[1].flag1[height] = 0; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 38.0f; this->state.lastPrim->state.slots[2].rotStart = 0; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 7.8f; this->state.lastPrim->state.slots[2].riseAngle = 90; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[2].height[height] = 0.0f; this->state.lastPrim->state.slots[2].flag1[height] = 0; } this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 360; this->state.lastPrim->state.slots[3].maxHeight = 37.0f; this->state.lastPrim->state.slots[3].rotStart = 90; this->state.lastPrim->state.slots[3].alphaB = 0; this->state.lastPrim->state.slots[3].distance = 7.7f; this->state.lastPrim->state.slots[3].riseAngle = 90; this->state.lastPrim->state.slots[3].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[3].height[height] = 0.0f; this->state.lastPrim->state.slots[3].flag1[height] = 0; } } // OFFSET: 0x00C43430 // FUNCTION: fn_20141 void CRagEffect::AsuraStrike(char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { if (this->state.duration < 350) { this->state.duration = 350; } PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 2); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 2); } if (this->state.stateCnt == 1) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 68, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1u; this->state.lastPrim->state.renderFlag |= 5u; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (kind == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\asura3.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\asura2.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\asura1.tga", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\asura13.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\asura12.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\asura11.tga", 0, false, true, false); } this->state.lastPrim->state.size = 0.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 3; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = index * 20 - 40; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].flag1[0] = static_cast(index); if (kind == 0) { this->state.lastPrim->state.slots[index].distance = 18.0f; this->state.lastPrim->state.slots[index].height[0] = static_cast(-6 - index * 12); this->state.lastPrim->state.slots[index].flag1[4] = 0; } else { this->state.lastPrim->state.slots[index].distance = 24.0f; this->state.lastPrim->state.slots[index].height[0] = static_cast(-8 - index * 16); this->state.lastPrim->state.slots[index].flag1[4] = 3; } for (int height = 1; height < 11; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; } } } if (this->state.stateCnt == 21) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 68, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1u; this->state.lastPrim->state.renderFlag |= 5u; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (kind == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\asura4.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\asura5.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\asura6.tga", 0, false, true, false); } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\asura14.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\asura15.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\asura16.tga", 0, false, true, false); } this->state.lastPrim->state.size = 0.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } for (int index = 0; index < 3; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = -40 - index * 20; this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].flag1[0] = static_cast(index); if (kind == 0) { this->state.lastPrim->state.slots[index].distance = 18.0f; this->state.lastPrim->state.slots[index].height[0] = static_cast(6 + index * 12); this->state.lastPrim->state.slots[index].flag1[4] = 0; } else { this->state.lastPrim->state.slots[index].distance = 24.0f; this->state.lastPrim->state.slots[index].height[0] = static_cast(8 + index * 16); this->state.lastPrim->state.slots[index].flag1[4] = 3; } for (int height = 1; height < 11; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; } } } } // OFFSET: 0x00C44290 // FUNCTION: fn_20143 void CRagEffect::QuadRingStackSized(const char* name, char kind) { if (this->state.duration < 70) { this->state.duration = 70; } CopyVector(this->render.position, this->state.parent->render.position); if (kind == 33) { kind = 0; this->state.lastPrim = CreateEffectParticle(*this, this->render, 25, 0.0f, 0.0f, 0.0f, WorldObjects()); } else { this->state.lastPrim = CreateEffectParticle(*this, this->render, 23, 0.0f, 0.0f, 0.0f, WorldObjects()); } this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = static_cast(kind); this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 315; this->state.lastPrim->state.slots[0].maxHeight = 25.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 180; this->state.lastPrim->state.slots[0].distance = 4.5f; this->state.lastPrim->state.slots[0].riseAngle = 70; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[0].height[height] = 0.0f; this->state.lastPrim->state.slots[0].flag1[height] = 0; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 315; this->state.lastPrim->state.slots[1].maxHeight = 22.0f; this->state.lastPrim->state.slots[1].rotStart = 90; this->state.lastPrim->state.slots[1].alphaB = 180; this->state.lastPrim->state.slots[1].distance = 5.0f; this->state.lastPrim->state.slots[1].riseAngle = 57; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[1].height[height] = 0.0f; this->state.lastPrim->state.slots[1].flag1[height] = 0; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 315; this->state.lastPrim->state.slots[2].maxHeight = 19.0f; this->state.lastPrim->state.slots[2].rotStart = 180; this->state.lastPrim->state.slots[2].alphaB = 180; this->state.lastPrim->state.slots[2].distance = 5.5f; this->state.lastPrim->state.slots[2].riseAngle = 45; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[2].height[height] = 0.0f; this->state.lastPrim->state.slots[2].flag1[height] = 0; } this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 360; this->state.lastPrim->state.slots[3].maxHeight = 250.0f; this->state.lastPrim->state.slots[3].rotStart = 0; this->state.lastPrim->state.slots[3].alphaB = 70; this->state.lastPrim->state.slots[3].distance = 4.0f; this->state.lastPrim->state.slots[3].riseAngle = 89; this->state.lastPrim->state.slots[3].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[3].height[height] = 0.0f; this->state.lastPrim->state.slots[3].flag1[height] = 0; } } // OFFSET: 0x00C649E0 // FUNCTION: fn_20263 void CRagEffect::Sakura() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 99999998) { this->state.stateCnt = 0; this->state.duration = 99999999; } else if ((this->state.stateCnt & 1) != 0 || this->state.stateCnt >= 300) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 40, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].maxHeight = static_cast(ClampedRandom(2) + 2) * 0.1f; this->state.lastPrim->state.size = static_cast(ClampedRandom(6) + 22) / 100.0f; this->state.lastPrim->state.slots[0].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].vecBPre.x = static_cast(ClampedRandom(300)) + this->render.position.x - 150.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 200.0f; this->state.lastPrim->state.slots[0].vecBPre.z = static_cast(ClampedRandom(300)) + this->render.position.z - 150.0f; this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.alpha = 200.0f; this->state.lastPrim->SetSpriteName("이팩트\\sakura01.spr"); this->state.lastPrim->SetActionName("이팩트\\sakura01.act"); this->state.lastPrim->SetAction(rand() % 3, 36, 0); this->state.lastPrim->InitSegment(); this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C47F70 // FUNCTION: fn_20161 void CRagEffect::CHIMTO(char flag) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } if (flag == 0) { PlayEffectWave(*this, "effect\\mon_\uce68\ud22c\uacbd.wav"); } this->state.lastPrim = CreateEffectParticle(*this, this->render, 46, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].maxHeight = 0.0f; this->state.lastPrim->state.slots[0].vecBPre.x = this->state.deltaPos[0]; this->state.lastPrim->state.slots[0].vecBPre.y = this->state.deltaPos[1] - 0.0f; this->state.lastPrim->state.slots[0].vecBPre.z = this->state.deltaPos[2]; if (flag == 0) { this->state.lastPrim->state.alpha = 200.0f; this->state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\\uce68\ud22c\uacbd_.spr"); this->state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\\uce68\ud22c\uacbd_.act"); this->state.lastPrim->state.animSpeed = 2; this->state.lastPrim->state.size = 2.5f; } else if (flag == 1) { this->state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\wink.spr"); this->state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\wink.act"); this->state.lastPrim->state.animSpeed = 6; this->state.lastPrim->state.size = 1.0f; this->state.lastPrim->state.repeatAnim = 0; this->state.lastPrim->state.pattern |= 0x200u; } else if (flag == 2) { this->state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\fvoice.spr"); this->state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\fvoice.act"); this->state.lastPrim->state.animSpeed = 6; this->state.lastPrim->state.size = 1.0f; this->state.lastPrim->state.repeatAnim = 0; this->state.lastPrim->state.pattern |= 0x200u; } else if (flag == 12) { this->state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\\ud5cc\ub4dc\ub808\ub4dc\uc2a4\ud53c\uc5b4.spr"); this->state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\\ud5cc\ub4dc\ub808\ub4dc\uc2a4\ud53c\uc5b4.act"); this->state.lastPrim->state.animSpeed = 6; this->state.lastPrim->state.size = 1.0f; this->state.lastPrim->state.repeatAnim = 0; this->state.lastPrim->state.pattern |= 0x200u; } else if (flag == 13) { this->state.lastPrim->SetSpriteName("\uc774\ud329\ud2b8\\\uc708\ub4dc\ucee4\ud130.spr"); this->state.lastPrim->SetActionName("\uc774\ud329\ud2b8\\\uc708\ub4dc\ucee4\ud130.act"); this->state.lastPrim->state.animSpeed = 6; this->state.lastPrim->state.size = 1.0f; this->state.lastPrim->state.repeatAnim = 0; this->state.lastPrim->state.pattern |= 0x200u; } std::int16_t angle; Get_Angle(this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], &angle); const CView* camera = static_cast(g_modeMgr.GetGameMode())->camera; std::int16_t direction = static_cast(static_cast(camera->camera.yaw) + angle) % 360; if (direction < 0) { direction += 360; } this->state.lastPrim->state.renderFlag |= 0x200u; int animation; if (direction >= 180 && direction < 270) { animation = 0; } else if (direction >= 90 && direction < 180) { animation = 1; } else if (direction >= 0 && direction < 90) { animation = 2; } else { animation = 3; } this->state.lastPrim->SetAction(animation, 16, 1); this->state.lastPrim->InitSegment(); this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C66F60 // FUNCTION: fn_20277 void CRagEffect::TANJI() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\mon_\ud0c4\uc9c0\uc2e0\ud1b5.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 42, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\blue_ivy.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = -15; this->state.lastPrim->state.slots[0].maxHeight = SquareRoot((this->state.deltaPos[0] - this->render.position.x) * (this->state.deltaPos[0] - this->render.position.x) + (this->state.deltaPos[2] - this->render.position.z) * (this->state.deltaPos[2] - this->render.position.z)); this->state.lastPrim->state.slots[0].distance = static_cast(this->state.count) * 0.4f + 2.0f; this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 5; this->state.lastPrim->state.slots[0].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.y = this->render.position.y - 8.0f; this->state.lastPrim->state.slots[0].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].height[1] = 2.0f; this->state.lastPrim->state.slots[0].height[2] = (2.0f / this->state.lastPrim->state.slots[0].maxHeight) * (this->state.deltaPos[1] - this->render.position.y); this->state.lastPrim->state.slots[0].fullDisplayAngle = 0; this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[1] = 0; this->state.lastPrim->state.slots[0].flag1[2] = 1; this->state.lastPrim->state.slots[0].height[7] = 0.0f; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].alphaB = 0; } // OFFSET: 0x00C54420 // FUNCTION: fn_20197 void CRagEffect::Gravitation() { if (this->state.stateCnt != 0) { return; } g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); for (int z = -10; z < 15; z += 5) { for (int x = -10; x < 15; x += 5) { for (int i = 0; i < 4; ++i) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 117, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.pattern = 1; const int angle = ClampedRandom(360); rand(); ClientSine(angle); ClientCosine(angle); this->state.lastPrim->state.deltaPos2.y = 10.0f; this->state.lastPrim->state.deltaPos2.x = static_cast(x); this->state.lastPrim->state.deltaPos2.z = static_cast(z); this->state.lastPrim->state.duration = 250; this->state.lastPrim->state.size = static_cast(ClampedRandom(50) + 300) / 100.0f; this->state.lastPrim->state.heightSize = 18.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.latitude = static_cast(ClampedRandom(40) + 60); EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); reinterpret_cast(this->state.lastPrim->state.transform)->AppendYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); EffectPrimitiveState& center = this->state.lastPrim->state; std::memcpy(center.rotTransform, center.transform, sizeof(center.rotTransform)); this->state.lastPrim->state.speed = 1.0f; this->state.lastPrim->state.accel = 0.01f; this->state.lastPrim->state.alpha = 20.0f; this->state.lastPrim->state.chCnt = 15; this->state.lastPrim->state.changePoint = 12; this->state.lastPrim->state.changeSpeed = -1.2f; this->state.lastPrim->state.changeAccel = 0.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.textures[0] = g_texMgr.Load(i < 2 ? "effect\\stone.bmp" : "effect\\ice.tga", 0, false, true, false); } } } } // OFFSET: 0x00C51740 // FUNCTION: fn_20189 void CRagEffect::ForestLight(const char* name, char flag) { if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 66, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 0; } for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; std::int16_t alphaB = 25; if (flag == 2 || flag == 12 || flag == 13) { alphaB = 30; } else if (flag == 11) { alphaB = 0; } else if (flag != 10) { alphaB = 40; } this->state.lastPrim->state.slots[i].alphaB = alphaB; this->state.lastPrim->state.slots[i].distance = 0.0f; if (i == 3) { this->state.lastPrim->state.slots[3].process = 180; if (flag == 1 || flag == 11) { this->state.lastPrim->state.slots[3].maxHeight = 4.0f; } else if (flag == 2 || flag == 12 || flag == 13) { this->state.lastPrim->state.slots[3].maxHeight = 1.0f; } else { this->state.lastPrim->state.slots[3].maxHeight = 2.0f; } } else if (flag == 1 || flag == 11) { this->state.lastPrim->state.slots[i].maxHeight = static_cast(i * 2) + 4.0f; } else if (flag == 2 || flag == 12 || flag == 13) { this->state.lastPrim->state.slots[i].maxHeight = static_cast(i) * 0.5f + 1.0f; } else { this->state.lastPrim->state.slots[i].maxHeight = static_cast(i) + 2.0f; } this->state.lastPrim->state.slots[i].height[0] = this->state.lastPrim->state.slots[i].maxHeight; this->state.lastPrim->state.slots[i].rotStart = static_cast(i * 25); this->state.lastPrim->state.slots[i].vecTNow.x = this->render.position.x; this->state.lastPrim->state.slots[i].vecTNow.y = this->render.position.y; this->state.lastPrim->state.slots[i].vecTNow.z = this->render.position.z; this->state.deltaPos[0] = this->render.position.x; this->state.deltaPos[1] = this->render.position.y; this->state.deltaPos[2] = this->render.position.z; if (flag == 10) { this->state.deltaPos[0] -= 15.0f; this->state.deltaPos[1] -= 60.0f; this->state.deltaPos[2] -= 15.0f; } else { this->state.deltaPos[0] -= 70.0f; this->state.deltaPos[1] -= 300.0f; this->state.deltaPos[2] -= 70.0f; } this->state.lastPrim->state.slots[i].vecTPre.x = this->state.deltaPos[0]; this->state.lastPrim->state.slots[i].vecTPre.y = this->state.deltaPos[1]; this->state.lastPrim->state.slots[i].vecTPre.z = this->state.deltaPos[2]; this->state.lastPrim->state.slots[i].flag1[0] = flag; } } // INLINED static __forceinline void SetAniClipCorners(RenderVertex* vertices, const EZeffectTransform& transform) { if (transform.ax[1] > transform.ax[0]) { vertices[1].x = transform.ax[0]; vertices[1].u = transform.u; vertices[3].x = transform.ax[1]; vertices[3].u = transform.u + transform.us; vertices[0].x = transform.ax[3]; vertices[0].u = transform.u; vertices[2].x = transform.ax[2]; vertices[2].u = transform.u + transform.us; } else { vertices[1].x = transform.ax[1]; vertices[1].u = transform.u + transform.us; vertices[3].x = transform.ax[0]; vertices[3].u = transform.u; vertices[0].x = transform.ax[2]; vertices[0].u = transform.u + transform.us; vertices[2].x = transform.ax[3]; vertices[2].u = transform.u; } if (transform.ay[2] > transform.ay[1]) { vertices[3].y = transform.ay[1]; vertices[3].v = transform.v; vertices[2].y = transform.ay[2]; vertices[2].v = transform.v + transform.vs; vertices[1].y = transform.ay[0]; vertices[1].v = transform.v; vertices[0].y = transform.ay[3]; vertices[0].v = transform.v + transform.vs; } else { vertices[3].y = transform.ay[2]; vertices[3].v = transform.v + transform.vs; vertices[2].y = transform.ay[1]; vertices[2].v = transform.v; vertices[1].y = transform.ay[3]; vertices[1].v = transform.v + transform.vs; vertices[0].y = transform.ay[0]; vertices[0].v = transform.v; } } // OFFSET: 0x00C37D10 // FUNCTION: fn_20097 void CRagEffect::Render(int argument) { const matrix& view = *reinterpret_cast(argument); if (!g_session.IsEffectRenderEnabled() || !this->PartyEffectVisible()) { return; } if (!this->state.resourceData || !this->state.parent) { return; } int index = 0; for (int layer = 1; layer < static_cast(this->state.resourceData)->clipCount; ++layer) { if (this->state.layerDrawn[layer]) { this->RenderAniClip(&static_cast(this->state.resourceData)->clips[layer], &this->state.transforms[layer], index, view); index += 2; } } } // OFFSET: 0x00C37DC0 // FUNCTION: fn_20098 void CRagEffect::RenderAniClip(EZeffectClip* clip, const EZeffectTransform* transform, int, const matrix& view) { float screenX; float screenY; float rhw; g_renderer->ProjectViewport(&this->state.parent->render.position.x, view.values, &screenX, &screenY, &rhw); const float scale = g_renderer->ScaleDistance(rhw); RenderPrimitive* primitive = g_renderer->primitives.Acquire(); RenderVertex* vertices = primitive->vertices; SetAniClipCorners(vertices, *transform); const int frame = static_cast(transform->aniframe); CTexture* texture = clip->Texture(frame < 0 ? 0 : frame); const float scaleU = static_cast(texture->ImageWidth()) / static_cast(texture->TextureWidth()); const float scaleV = static_cast(texture->ImageHeight()) / static_cast(texture->TextureHeight()); for (int i = 0; i < 4; ++i) { vertices[i].u = scaleU * vertices[i].u; vertices[i].v = scaleV * vertices[i].v; } const float sine = ClientSin(static_cast(transform->rz / 2.8444444444444) / 180.0f * 3.141592f); const float cosine = ClientCos(static_cast(transform->rz / 2.8444444444444) / 180.0f * 3.141592f); for (int i = 0; i < 4; ++i) { const float rotated = vertices[i].x * sine + vertices[i].y * cosine; vertices[i].x = ((vertices[i].x * cosine - vertices[i].y * sine) + (transform->x - 320.0f)) * scale + this->state.tlvertX; if (IsScreenShakeActive()) { const float shake = screenY - this->state.tlvertY; vertices[i].y = (this->state.tlvertY - ((transform->y - 240.0f) + rotated) * scale) + (shake + shake); } else { vertices[i].y = ((transform->y - 240.0f) + rotated) * scale + this->state.tlvertY; } } const int red = static_cast(static_cast(transform->crR)); const int green = static_cast(static_cast(transform->crG)); const int blue = static_cast(static_cast(transform->crB)); const std::uint32_t color = ((((((static_cast(transform->crA) << 8) + red) << 8) + green) << 8) + blue); for (int i = 0; i < 4; ++i) { vertices[i].diffuse = color; vertices[i].specular = 0xFFFFFFFF; vertices[i].z = 3.102122e-05f; vertices[i].rhw = rhw; } primitive->texture = texture; primitive->sourceBlend = transform->srcalpha; primitive->destinationBlend = transform->destalpha; primitive->textureMode = transform->mtpreset; g_renderer->queues.Submit(primitive, 5, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } // OFFSET: 0x00C38AD0 // FUNCTION: fn_20099 void CRagEffect::SandScatter() { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; g_renderer->viewport.Project(&this->state.parent->render.position.x, view, vertex); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt >= 60 || (this->state.stateCnt & 1) != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.pattern = 8; this->state.lastPrim->state.duration = this->state.duration - ClampedRandom(100); this->state.lastPrim->state.speed = static_cast(ClampedRandom(300) + 260) / 100.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(15) + 130); this->state.lastPrim->state.widthSize = 30.0f; this->state.lastPrim->state.heightSize = 30.0f; this->state.lastPrim->state.deltaPos2.x = static_cast(ClampedRandom(640) - 500); this->state.lastPrim->state.deltaPos2.y = static_cast(ClampedRandom(50) - 240); this->state.lastPrim->state.chCnt = ClampedRandom(10) + 10; this->state.lastPrim->state.alpha = 128.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\sand1.bmp", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } // OFFSET: 0x00C38D80 // FUNCTION: fn_20100 void CRagEffect::SendMsg( CGameObject* sender, int messageLow, int messageHigh, std::int64_t first, int secondLow, int secondHigh, int thirdLow, int thirdHigh ) { const std::int64_t message = static_cast(messageHigh) << 32 | static_cast(messageLow); const std::int64_t second = static_cast(secondHigh) << 32 | static_cast(secondLow); const std::int64_t third = static_cast(thirdHigh) << 32 | static_cast(thirdLow); switch (message) { case AM_SETPOS: if (first != 0) { const float* position = reinterpret_cast(static_cast(first)); this->state.deltaPos[0] = position[0]; this->state.deltaPos[1] = position[1]; this->state.deltaPos[2] = position[2]; } if (second != 0) { const float* position = reinterpret_cast(static_cast(second)); this->state.deltaPos2[0] = position[0]; this->state.deltaPos2[1] = position[1]; this->state.deltaPos2[2] = position[2]; } break; case AM_MASTER_DEAD: this->state.parent = nullptr; break; case AM_CHILD_DEAD: if (first == 0) { if (sender == nullptr) { break; } for (auto it = this->state.primList.begin(); it != this->state.primList.end(); ++it) { if (static_cast(&Owner(*it)) == sender) { this->state.primList.erase(it); break; } } } else { for (auto it = this->state.primList.begin(); it != this->state.primList.end(); ++it) { Owner(*it).HandleMasterMessage(nullptr, 24, 0, 0, 0, 0, 0, 0, 0); } this->state.primList.erase(this->state.primList.begin(), this->state.primList.end()); } break; case AM_SETCOUNT: if (first == 0xFFFF) { if (second == 130) { this->render.position.x = 200.0f; this->render.position.y = 200.0f; this->render.position.z = 0.0f; } else if (second == 128) { this->render.position.x = 250.0f; this->render.position.y = 150.0f; this->render.position.z = 150.0f; } else if (second == 250) { this->render.position.x = 200.0f; this->render.position.y = 200.0f; this->render.position.z = 0.0f; } else if (second == 169) { this->render.position.x = 180.0f; this->render.position.y = 180.0f; this->render.position.z = 250.0f; } else if (second == 243) { this->render.position.x = 250.0f; this->render.position.y = 250.0f; this->render.position.z = 250.0f; this->state.duration = static_cast(third); } else if (second == 792 || second == 925 || second == 824) { this->render.position.x = 250.0f; this->render.position.y = 250.0f; this->render.position.z = 250.0f; } else if (second == 1058) { const float* position = reinterpret_cast(static_cast(third)); this->state.deltaPos[0] = position[0]; this->state.deltaPos[1] = position[1]; this->state.deltaPos[2] = position[2]; this->state.duration = 20; } } else if (first == 0xFFFE) { if (second == 128) { this->render.position.x = -1.0f; this->render.position.y = -1.0f; this->render.position.z = -1.0f; } else if (second == 130) { this->render.position.x = -2.0f; this->render.position.y = -2.0f; this->render.position.z = -2.0f; } } else { this->state.count = static_cast(first); if (static_cast(this->state.count) > 50) { this->state.count = 50; } } break; case AM_SETPARAM: { const float* param = reinterpret_cast(static_cast(first)); this->state.param[0] = param[0]; this->state.param[1] = param[1]; this->state.param[2] = param[2]; this->state.param[3] = param[3]; break; } case AM_SET_DURATION: this->SetStateDuration(static_cast(first)); break; case AM_CHANGE_COLOR: this->state.colorChannels[0] = static_cast(first); this->state.colorChannels[1] = static_cast(second); this->state.colorChannels[2] = static_cast(third); break; case AM_EFFECT_LOOP_COUNT: if (first == 735 || first == 736 || first == 737 || first == 738) { this->state.currentPrimitive->isChangeProcessed = static_cast(second); } break; } } // OFFSET: 0x00C39460 // FUNCTION: fn_20101 void CRagEffect::Sight() { CopyVector(this->render.position, this->state.parent->render.position); RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; g_renderer->viewport.Project(&this->state.parent->render.position.x, view, vertex); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if ((this->state.stateCnt & 1) != 0) { return; } const int angle = static_cast(static_cast(this->state.stateCnt) * -5.0f); const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); GetRadian(angle); this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 20; this->state.lastPrim->state.deltaPos2.x = sine * 15.0f; this->state.lastPrim->state.deltaPos2.y = -20.0f; this->state.lastPrim->state.deltaPos2.z = cosine * -15.0f; this->state.lastPrim->state.deltaPosAccel.y = 0.1f; this->state.lastPrim->state.animSpeed = 3; this->state.lastPrim->state.size = 2.5f; this->state.lastPrim->state.sizeSpeed = -0.1f; this->state.lastPrim->state.alpha = 150.0f; this->state.lastPrim->state.alphaSpeed = -3.0f; this->state.lastPrim->SetSpriteName("이팩트\\Sight.spr"); this->state.lastPrim->SetActionName("이팩트\\Sight.act"); this->state.lastPrim->InitSegment(); this->state.lastPrim = CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 20; this->state.lastPrim->state.deltaPos2.x = sine * 15.0f; this->state.lastPrim->state.deltaPos2.y = 0.0f; this->state.lastPrim->state.deltaPos2.z = cosine * -15.0f; this->state.lastPrim->state.animSpeed = 2; this->state.lastPrim->state.size = 1.5f; this->state.lastPrim->state.sizeSpeed = -0.06f; this->state.lastPrim->state.alpha = 120.0f; this->state.lastPrim->state.alphaSpeed = -1.0f; this->state.lastPrim->SetSpriteName("Shadow.spr"); this->state.lastPrim->SetActionName("Shadow.act"); this->state.lastPrim->InitSegment(); } // OFFSET: 0x00C3D190 // FUNCTION: fn_20115 void CRagEffect::AlphaCenterRise() { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; g_renderer->viewport.Project(&this->state.parent->render.position.x, view, vertex); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt == 0) { for (int i = 20; i != 0; --i) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; this->state.lastPrim->state.deltaPos2.y = -40.0f; this->state.lastPrim->state.longitude = static_cast(ClampedRandom(360)); this->state.lastPrim->state.longSpeed = static_cast(ClampedRandom(60) + 10) / 10.0f; const float accel = -(this->state.lastPrim->state.longSpeed / static_cast(this->state.lastPrim->state.duration)); this->state.lastPrim->state.longAccel = accel / 1.5f; this->state.lastPrim->state.arcAngle = static_cast(ClampedRandom(25) + 5) / 10.0f; this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(40) + 20); this->state.lastPrim->state.heightSpeed = static_cast(ClampedRandom(30) + 20) / 10.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 10.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - this->state.lastPrim->state.duration / 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); } return; } if (this->state.stateCnt == 35 && this->state.parent != nullptr) { this->state.parent->SendMsg(nullptr, AM_MAKE_SMOKE_FFECT, 0, 0, 0, 0, 0, 0); } } // OFFSET: 0x00C36710 // FUNCTION: fn_20093 bool CRagEffect::Potion_Awakening() { if (this->state.stateCnt == 0) { this->state.parent->SendMsg(nullptr, AM_CHANGE_COLOR, 250, 250, 200, 0, 0, 0); this->PotionPillar(1.0f, 50); } if (this->state.stateCnt == 18) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 1, 0, 0, 0); } CopyVector(this->render.position, this->state.parent->render.position); if (static_cast(this->state.stateCnt - 13) <= 96u && this->state.stateCnt % 4 == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 40; EffectPrimitiveState& particle = this->state.lastPrim->state; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); EffectPrimitiveState& spot = this->state.lastPrim->state; spot.deltaPos2 = RotatedForward(spot.transform, static_cast(ClampedRandom(7) + 2)); reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(90)); this->state.lastPrim->state.speed = static_cast(ClampedRandom(50) + 20) / 60.0f; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(60) + 30) / 10.0f; this->state.lastPrim->state.heightSize = 0.2f; this->state.lastPrim->state.red = 240; this->state.lastPrim->state.green = 240; this->state.lastPrim->state.blue = 120; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 180.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 20.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); if (this->state.stateCnt <= 150) { return true; } this->state.parent->SendMsg(nullptr, AM_RETURN_COLOR, 0, 0, 0, 0, 0, 0); return false; } // OFFSET: 0x00C3C4E0 // FUNCTION: fn_20110 void CRagEffect::StatusIconColumn() { if (g_renderer == nullptr) { return; } if (this->state.stateCnt == 99999998) { this->state.stateCnt = 0; } if (this->state.count != 0) { this->SendMsg(nullptr, AM_CHILD_DEAD, 0, 100, 0, 0, 0, 0); this->state.count = 0; this->state.stateCnt = 0; } if (this->state.stateCnt != 0) { return; } for (int index = 0; index < 100; ++index) { g_statusIconIds[index] = -1; } int foundCount = 0; int offsetX = 0; int offsetY = 0; int row = 0; const int limit = g_renderer->viewport.height - 50; for (int type = 0; type < 5; ++type) { for (const ActiveSkillEffect& effect : g_activeSkillEffects) { const char* texture = g_session.GetEFSTImgFileName(effect.id, type); const int id = effect.id == 42 ? 12 : static_cast(effect.id); if (texture == nullptr) { continue; } bool known = false; for (int index = 0; index < foundCount; ++index) { if (g_statusIconIds[index] == id) { known = true; break; } } if (known) { continue; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0x201; this->state.lastPrim->state.useRenderFlag[0] = 1; this->state.lastPrim->state.pattern = 4; this->state.lastPrim->render.curMotion = 0; this->state.lastPrim->state.duration = 99999999; this->state.lastPrim->state.widthSize = 16.0f; this->state.lastPrim->state.heightSize = 16.0f; if (row * 35 + 150 < limit) { offsetY += 35; } else { row = 0; offsetY = 35; offsetX -= 45; } this->state.lastPrim->state.deltaPos2.x = static_cast(g_renderer->viewport.width - 32 + offsetX); this->state.lastPrim->state.deltaPos2.y = static_cast(offsetY + 150); this->state.lastPrim->state.slots[0].life = 98; this->state.lastPrim->state.slots[0].rotStart = static_cast(id); this->state.lastPrim->state.totalTexture = 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(texture, 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); if (foundCount < 99) { g_statusIconIds[foundCount] = id; ++foundCount; ++row; } } } } // OFFSET: 0x00C3CC70 // FUNCTION: fn_20113 bool CRagEffect::StormGust() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\wizard_stormgust.wav"); } if (g_serviceOptions.Get(229) == 0 && this->state.stateCnt % 29 == 0 && static_cast(this->state.stateCnt - 31) <= 119u) { for (int count = 2; count != 0; --count) { const int longitudeAngle = rand() % 360; const int radius = ClampedRandom(25) + 3; this->state.lastPrim = CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects()); EffectPrimitiveState& particle = this->state.lastPrim->state; particle.duration = 215 - this->state.stateCnt; particle.pattern |= 1u; const int angle = static_cast(static_cast(ClampedRandom(360))); const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); particle.deltaPos2.x = sine * static_cast(radius); particle.deltaPos2.y = 20.0f; particle.deltaPos2.z = -static_cast(radius) * cosine; particle.size = static_cast(ClampedRandom(100) + 400) / 100.0f; particle.heightSize = 20.0f; particle.longitude = static_cast(std::max(longitudeAngle, 0)); particle.latitude = 100.0f; EffectPrimitiveState& tilt = this->state.lastPrim->state; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); EffectPrimitiveState& turn = this->state.lastPrim->state; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); EffectPrimitiveState& copy = this->state.lastPrim->state; std::memcpy(copy.rotTransform, copy.transform, sizeof(copy.rotTransform)); this->state.lastPrim->state.speed = 1.5f; this->state.lastPrim->state.accel = 0.0f; this->state.lastPrim->state.alpha = 250.0f; this->state.lastPrim->state.chCnt = 3; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 10; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ice.tga", 0, false, true, false); } } return this->ProcessEZ2STR(0.0f, -80.0f, 0.0f) ? true : false; } // OFFSET: 0x00C0F7E0 // FUNCTION: fn_20031 void CRagEffect::DecAgility() { RenderVertex screen{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; g_renderer->viewport.Project( &this->state.parent->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values, screen ); this->state.tlvertX = screen.x; this->state.tlvertY = screen.y; CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_DecAgility.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.deltaPos2.y -= 80.0f; this->state.lastPrim->state.longitude = 180.0f; this->state.lastPrim->state.speed = 1.0f; EffectPrimitiveState& banner = this->state.lastPrim->state; banner.accel = -(banner.speed / static_cast(banner.duration)); this->state.lastPrim->state.widthSize = 40.0f; this->state.lastPrim->state.heightSize = 10.0f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 15.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 15; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\slow.bmp", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } if ((this->state.stateCnt & 1) != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 50; EffectPrimitiveState& streak = this->state.lastPrim->state; reinterpret_cast(streak.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); EffectPrimitiveState& placed = this->state.lastPrim->state; const vector3d offset = RotatedForward(placed.transform, static_cast(ClampedRandom(7) + 2)); placed.deltaPos2.x = offset.x; placed.deltaPos2.y = offset.y; placed.deltaPos2.z = offset.z; this->state.lastPrim->state.deltaPos2.y -= 20.0f; EffectPrimitiveState& upright = this->state.lastPrim->state; reinterpret_cast(upright.transform)->MakeXRotation(GetRadian(-90)); this->state.lastPrim->state.accel = 0.015f; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(60) + 30) / 10.0f; this->state.lastPrim->state.heightSize = 0.18f; this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 200.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 20.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; } // OFFSET: 0x00C0FD10 // FUNCTION: fn_20032 void CRagEffect::TexturedSkillAura(char type) { if (this->state.stateCnt != 0) { return; } const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); if (type == 0) { g_soundMgr->PlayWave( "effect\\hunter_detecting.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } else if (type == 2) { g_soundMgr->PlayWave( "effect\\priest_benedictio.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } else if (type == 4) { g_soundMgr->PlayWave( "effect\\cru_grand cross.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } else if (type == 5) { g_soundMgr->PlayWave( "effect\\ANALYZE.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 57; this->state.lastPrim->state.widthSpeed = 1.5f; this->state.lastPrim->state.heightSpeed = 1.5f; this->state.lastPrim->state.widthAccel = this->state.lastPrim->state.widthSpeed / 14.0f; this->state.lastPrim->state.heightAccel = this->state.lastPrim->state.heightSpeed / 14.0f; this->state.lastPrim->state.deltaPos2.y = -7.0f; this->state.lastPrim->state.speed3d.y = -0.5f; this->state.lastPrim->state.roll = 90.0f; if (type == 3 || type == 6) { this->state.lastPrim->state.changePoint = 10; this->state.lastPrim->state.fadeOutCnt = 30; } else { this->state.lastPrim->state.changePoint = 17; this->state.lastPrim->state.fadeOutCnt = 40; } if (type == 4) { this->state.lastPrim->state.red = 0xff; this->state.lastPrim->state.blue = 0x8c; this->state.lastPrim->state.green = 0x8c; } else if (type == 5) { this->state.lastPrim->state.red = 0xd2; this->state.lastPrim->state.blue = 0xd2; this->state.lastPrim->state.green = 0xfa; } else if (type == 6) { this->state.lastPrim->state.red = 10; this->state.lastPrim->state.blue = 10; this->state.lastPrim->state.green = 10; } else if (type == 7) { this->state.lastPrim->state.red = 0xfa; this->state.lastPrim->state.blue = 0x8c; this->state.lastPrim->state.green = 0xd2; } else if (type == 8) { this->state.lastPrim->state.red = 0x8c; this->state.lastPrim->state.blue = 0x8c; this->state.lastPrim->state.green = 0xff; } this->state.lastPrim->state.changeWidthSpeed = 0.1f; this->state.lastPrim->state.changeHeightSpeed = 0.1f; this->state.lastPrim->state.changeWidthAccel = this->state.lastPrim->state.changeWidthSpeed / 30.0f; this->state.lastPrim->state.changeHeightAccel = this->state.lastPrim->state.changeHeightSpeed / 30.0f; this->state.lastPrim->state.deltaPos2.y = -5.0f; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\fashasha.tga", 0, false, true, false); } // OFFSET: 0x00C5F010 // FUNCTION: fn_20242 void CRagEffect::VioletRingCloud(char type) { if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; AllocateTextures(this->state.lastPrim->state); if (type == 3) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_red.tga", 0, false, true, false); this->state.lastPrim->state.size = 10.0f; } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\magic_violet.tga", 0, false, true, false); this->state.lastPrim->state.size = 4.0f; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 50.0f; this->state.lastPrim->state.slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 4.0f; this->state.lastPrim->state.slots[0].riseAngle = 90; this->state.lastPrim->state.slots[0].alphaT = 1400; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[0].height[i] = 0.0f; this->state.lastPrim->state.slots[0].flag1[i] = 1; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 50.0f; this->state.lastPrim->state.slots[1].rotStart = static_cast(std::max(rand() % 360, 0)); this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 3.0f; this->state.lastPrim->state.slots[1].riseAngle = 90; this->state.lastPrim->state.slots[1].alphaT = 1400; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[1].height[i] = 0.0f; this->state.lastPrim->state.slots[1].flag1[i] = 1; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 50.0f; this->state.lastPrim->state.slots[2].rotStart = static_cast(std::max(rand() % 360, 0)); this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 2.0f; this->state.lastPrim->state.slots[2].riseAngle = 90; this->state.lastPrim->state.slots[2].alphaT = 1400; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[2].height[i] = 0.0f; this->state.lastPrim->state.slots[2].flag1[i] = 1; } this->state.lastPrim->state.slots[3].life = 0; } if (this->state.stateCnt == 1) { this->render.position = this->state.parent->render.position; this->state.lastPrim = CreateEffectParticle(*this, this->render, 63, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; AllocateTextures(this->state.lastPrim->state); if (type == 3) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_red.tga", 0, false, true, false); this->state.lastPrim->state.size = 10.0f; } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); this->state.lastPrim->state.size = 4.0f; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 6.001f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 0.0f; this->state.lastPrim->state.slots[0].riseAngle = 2; this->state.lastPrim->state.slots[0].alphaT = 3111; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[0].height[i] = 0.0f; this->state.lastPrim->state.slots[0].flag1[i] = 1; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = type == 3 ? -20 : -10; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 6.001f; this->state.lastPrim->state.slots[1].rotStart = 25; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 0.0f; this->state.lastPrim->state.slots[1].riseAngle = 3; this->state.lastPrim->state.slots[1].alphaT = 3111; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[1].height[i] = 0.0f; this->state.lastPrim->state.slots[1].flag1[i] = 1; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = type == 3 ? -40 : -20; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 6.001f; this->state.lastPrim->state.slots[2].rotStart = 50; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 0.0f; this->state.lastPrim->state.slots[2].riseAngle = 4; this->state.lastPrim->state.slots[2].alphaT = 3111; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[2].height[i] = 0.0f; this->state.lastPrim->state.slots[2].flag1[i] = 1; } this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].alphaT = type; } if (this->state.stateCnt == 2) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 62, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; AllocateTextures(this->state.lastPrim->state); this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); this->state.lastPrim->state.size = type == 3 ? 10.0f : 4.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 30; this->state.lastPrim->state.slots[0].maxHeight = 1.5f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 9.0f; this->state.lastPrim->state.slots[0].riseAngle = 90; this->state.lastPrim->state.slots[0].alphaT = 0; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[0].height[i] = 1.5f; this->state.lastPrim->state.slots[0].flag1[i] = 0; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 30; this->state.lastPrim->state.slots[1].maxHeight = 3.5f; this->state.lastPrim->state.slots[1].rotStart = 90; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 7.5f; this->state.lastPrim->state.slots[1].riseAngle = 90; this->state.lastPrim->state.slots[1].alphaT = 0; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[1].height[i] = 1.5f; this->state.lastPrim->state.slots[1].flag1[i] = 0; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 30; this->state.lastPrim->state.slots[2].maxHeight = 5.5f; this->state.lastPrim->state.slots[2].rotStart = 180; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 6.0f; this->state.lastPrim->state.slots[2].riseAngle = 90; this->state.lastPrim->state.slots[2].alphaT = 0; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[2].height[i] = 1.5f; this->state.lastPrim->state.slots[2].flag1[i] = 0; } this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 30; this->state.lastPrim->state.slots[3].maxHeight = 7.5f; this->state.lastPrim->state.slots[3].rotStart = 270; this->state.lastPrim->state.slots[3].alphaB = 0; this->state.lastPrim->state.slots[3].distance = 4.5f; this->state.lastPrim->state.slots[3].riseAngle = 90; this->state.lastPrim->state.slots[3].alphaT = 0; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[3].height[i] = 1.5f; this->state.lastPrim->state.slots[3].flag1[i] = 0; } } } // OFFSET: 0x00C60240 // FUNCTION: fn_20243 void CRagEffect::TexturedMagicRing(char type) { if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->renderFlag = 5; this->state.currentPrimitive->duration = this->state.duration; AllocateTextures(*this->state.currentPrimitive); if (type == 3) { this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_red.tga", 0, false, true, false); this->state.currentPrimitive->size = 10.0f; } else { this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\magic_violet.tga", 0, false, true, false); this->state.currentPrimitive->size = 4.0f; } this->state.currentPrimitive->slots[0].life = 1; this->state.currentPrimitive->slots[0].process = 0; this->state.currentPrimitive->slots[0].fullDisplayAngle = 360; this->state.currentPrimitive->slots[0].maxHeight = 80.0f; this->state.currentPrimitive->slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); this->state.currentPrimitive->slots[0].alphaB = 0; this->state.currentPrimitive->slots[0].distance = 7.0f; this->state.currentPrimitive->slots[0].riseAngle = 90; this->state.currentPrimitive->slots[0].alphaT = static_cast(type == 1 ? -1 : 1400); this->state.currentPrimitive->slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[0].height[i] = 0.0f; this->state.currentPrimitive->slots[0].flag1[i] = 3; } this->state.currentPrimitive->slots[1].life = 1; this->state.currentPrimitive->slots[1].process = 0; this->state.currentPrimitive->slots[1].fullDisplayAngle = 360; this->state.currentPrimitive->slots[1].maxHeight = 80.0f; this->state.currentPrimitive->slots[1].rotStart = static_cast(std::max(rand() % 360, 0)); this->state.currentPrimitive->slots[1].alphaB = 0; this->state.currentPrimitive->slots[1].distance = 5.5f; this->state.currentPrimitive->slots[1].riseAngle = 90; this->state.currentPrimitive->slots[1].alphaT = static_cast(type == 1 ? -1 : 1400); this->state.currentPrimitive->slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[1].height[i] = 0.0f; this->state.currentPrimitive->slots[1].flag1[i] = 3; } this->state.currentPrimitive->slots[2].life = 1; this->state.currentPrimitive->slots[2].process = 0; this->state.currentPrimitive->slots[2].fullDisplayAngle = 360; this->state.currentPrimitive->slots[2].maxHeight = 80.0f; this->state.currentPrimitive->slots[2].rotStart = static_cast(std::max(rand() % 360, 0)); this->state.currentPrimitive->slots[2].alphaB = 0; this->state.currentPrimitive->slots[2].distance = 4.0f; this->state.currentPrimitive->slots[2].riseAngle = 90; this->state.currentPrimitive->slots[2].alphaT = static_cast(type == 1 ? -1 : 1400); this->state.currentPrimitive->slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[2].height[i] = 0.0f; this->state.currentPrimitive->slots[2].flag1[i] = 3; } this->state.currentPrimitive->slots[3].life = 0; } if (this->state.stateCnt == 2) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 62, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->renderFlag = 5; this->state.currentPrimitive->duration = this->state.duration; AllocateTextures(*this->state.currentPrimitive); this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); this->state.currentPrimitive->size = type == 3 ? 10.0f : 4.0f; this->state.currentPrimitive->slots[0].life = 1; this->state.currentPrimitive->slots[0].process = 0; this->state.currentPrimitive->slots[0].fullDisplayAngle = 30; this->state.currentPrimitive->slots[0].maxHeight = 2.5f; this->state.currentPrimitive->slots[0].rotStart = 0; this->state.currentPrimitive->slots[0].alphaB = 0; this->state.currentPrimitive->slots[0].distance = 13.0f; this->state.currentPrimitive->slots[0].riseAngle = 90; this->state.currentPrimitive->slots[0].alphaT = 3; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[0].height[i] = 1.5f; this->state.currentPrimitive->slots[0].flag1[i] = 0; } this->state.currentPrimitive->slots[1].life = 1; this->state.currentPrimitive->slots[1].process = 0; this->state.currentPrimitive->slots[1].fullDisplayAngle = 30; this->state.currentPrimitive->slots[1].maxHeight = 5.0f; this->state.currentPrimitive->slots[1].rotStart = 90; this->state.currentPrimitive->slots[1].alphaB = 0; this->state.currentPrimitive->slots[1].distance = 11.0f; this->state.currentPrimitive->slots[1].riseAngle = 90; this->state.currentPrimitive->slots[1].alphaT = 3; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[1].height[i] = 1.5f; this->state.currentPrimitive->slots[1].flag1[i] = 0; } this->state.currentPrimitive->slots[2].life = 1; this->state.currentPrimitive->slots[2].process = 0; this->state.currentPrimitive->slots[2].fullDisplayAngle = 30; this->state.currentPrimitive->slots[2].maxHeight = 7.5f; this->state.currentPrimitive->slots[2].rotStart = 180; this->state.currentPrimitive->slots[2].alphaB = 0; this->state.currentPrimitive->slots[2].distance = 9.0f; this->state.currentPrimitive->slots[2].riseAngle = 90; this->state.currentPrimitive->slots[2].alphaT = 3; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[2].height[i] = 1.5f; this->state.currentPrimitive->slots[2].flag1[i] = 0; } this->state.currentPrimitive->slots[3].life = 1; this->state.currentPrimitive->slots[3].process = 0; this->state.currentPrimitive->slots[3].fullDisplayAngle = 30; this->state.currentPrimitive->slots[3].maxHeight = 10.0f; this->state.currentPrimitive->slots[3].rotStart = 270; this->state.currentPrimitive->slots[3].alphaB = 0; this->state.currentPrimitive->slots[3].distance = 8.0f; this->state.currentPrimitive->slots[3].riseAngle = 90; this->state.currentPrimitive->slots[3].alphaT = 3; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[3].height[i] = 1.5f; this->state.currentPrimitive->slots[3].flag1[i] = 0; } } } // OFFSET: 0x00C41690 // FUNCTION: fn_20137 void CRagEffect::TexturedRisingRing(const char* name) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt == 1) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 107, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 12.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].rotStart = 270; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 2.5f; this->state.lastPrim->state.slots[0].maxHeight = this->state.lastPrim->state.slots[0].distance; this->state.lastPrim->state.slots[0].riseAngle = 53; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[0].height[i] = 0.0f; this->state.lastPrim->state.slots[0].flag1[i] = 0; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].rotStart = 0; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 5.0f; this->state.lastPrim->state.slots[1].maxHeight = this->state.lastPrim->state.slots[1].distance; this->state.lastPrim->state.slots[1].riseAngle = 60; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[1].height[i] = 0.0f; this->state.lastPrim->state.slots[1].flag1[i] = 0; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].rotStart = 90; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 7.5f; this->state.lastPrim->state.slots[2].maxHeight = this->state.lastPrim->state.slots[2].distance; this->state.lastPrim->state.slots[2].riseAngle = 55; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[2].height[i] = 0.0f; this->state.lastPrim->state.slots[2].flag1[i] = 0; } this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 360; this->state.lastPrim->state.slots[3].rotStart = 180; this->state.lastPrim->state.slots[3].alphaB = 0; this->state.lastPrim->state.slots[3].distance = 10.0f; this->state.lastPrim->state.slots[3].maxHeight = this->state.lastPrim->state.slots[3].distance; this->state.lastPrim->state.slots[3].riseAngle = 50; this->state.lastPrim->state.slots[3].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[3].height[i] = 0.0f; this->state.lastPrim->state.slots[3].flag1[i] = 0; } } if (this->state.stateCnt == 2) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 107, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 12.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].rotStart = 271; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 2.7f; this->state.lastPrim->state.slots[0].maxHeight = this->state.lastPrim->state.slots[0].distance; this->state.lastPrim->state.slots[0].riseAngle = 52; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[0].height[i] = 0.0f; this->state.lastPrim->state.slots[0].flag1[i] = 0; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].rotStart = 1; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 5.2f; this->state.lastPrim->state.slots[1].maxHeight = this->state.lastPrim->state.slots[1].distance; this->state.lastPrim->state.slots[1].riseAngle = 59; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[1].height[i] = 0.0f; this->state.lastPrim->state.slots[1].flag1[i] = 0; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].rotStart = 91; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 7.7f; this->state.lastPrim->state.slots[2].maxHeight = this->state.lastPrim->state.slots[2].distance; this->state.lastPrim->state.slots[2].riseAngle = 54; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[2].height[i] = 0.0f; this->state.lastPrim->state.slots[2].flag1[i] = 0; } this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 360; this->state.lastPrim->state.slots[3].rotStart = 181; this->state.lastPrim->state.slots[3].alphaB = 0; this->state.lastPrim->state.slots[3].distance = 10.2f; this->state.lastPrim->state.slots[3].maxHeight = this->state.lastPrim->state.slots[3].distance; this->state.lastPrim->state.slots[3].riseAngle = 49; this->state.lastPrim->state.slots[3].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[3].height[i] = 0.0f; this->state.lastPrim->state.slots[3].flag1[i] = 0; } } } // OFFSET: 0x00C52D20 // FUNCTION: fn_20196 bool CRagEffect::TexturedRisingRingStages(const char* name, char level) { auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); stored()->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); stored()->state.size = 16.0f; stored()->state.slots[0].life = 1; stored()->state.slots[0].process = 0; stored()->state.slots[0].fullDisplayAngle = 360; stored()->state.slots[0].maxHeight = 13.0f; stored()->state.slots[0].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[0].alphaB = 0; stored()->state.slots[0].distance = 3.6f; stored()->state.slots[0].riseAngle = 25; stored()->state.slots[0].alphaT = 3080; stored()->state.slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { stored()->state.slots[0].height[i] = 0.0f; stored()->state.slots[0].flag1[i] = 0; } stored()->state.slots[1].life = 1; stored()->state.slots[1].process = 0; stored()->state.slots[1].fullDisplayAngle = 360; stored()->state.slots[1].maxHeight = 14.0f; stored()->state.slots[1].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[1].alphaB = 0; stored()->state.slots[1].distance = 3.3f; stored()->state.slots[1].riseAngle = 25; stored()->state.slots[1].alphaT = 3080; stored()->state.slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { stored()->state.slots[1].height[i] = 0.0f; stored()->state.slots[1].flag1[i] = 0; } stored()->state.slots[2].life = 1; stored()->state.slots[2].process = 0; stored()->state.slots[2].fullDisplayAngle = 360; stored()->state.slots[2].maxHeight = 15.0f; stored()->state.slots[2].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[2].alphaB = 0; stored()->state.slots[2].distance = 3.0f; stored()->state.slots[2].riseAngle = 25; stored()->state.slots[2].alphaT = 3080; stored()->state.slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { stored()->state.slots[2].height[i] = 0.0f; stored()->state.slots[2].flag1[i] = 0; } stored()->state.slots[3].life = 0; } if (level == 1) { if (this->state.stateCnt == 30) { PlayEffectWave(*this, "effect\\EF_GlassWall.wav"); this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); stored()->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); stored()->state.size = 16.0f; stored()->state.slots[0].life = 1; stored()->state.slots[0].process = 0; stored()->state.slots[0].fullDisplayAngle = 360; stored()->state.slots[0].maxHeight = 24.0f; stored()->state.slots[0].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[0].alphaB = 0; stored()->state.slots[0].distance = 3.6f; stored()->state.slots[0].riseAngle = 90; stored()->state.slots[0].alphaT = 3080; stored()->state.slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { stored()->state.slots[0].height[i] = 0.0f; stored()->state.slots[0].flag1[i] = 0; } stored()->state.slots[1].life = 1; stored()->state.slots[1].process = 0; stored()->state.slots[1].fullDisplayAngle = 360; stored()->state.slots[1].maxHeight = 27.0f; stored()->state.slots[1].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[1].alphaB = 0; stored()->state.slots[1].distance = 3.3f; stored()->state.slots[1].riseAngle = 90; stored()->state.slots[1].alphaT = 3080; stored()->state.slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { stored()->state.slots[1].height[i] = 0.0f; stored()->state.slots[1].flag1[i] = 0; } stored()->state.slots[2].life = 1; stored()->state.slots[2].process = 0; stored()->state.slots[2].fullDisplayAngle = 360; stored()->state.slots[2].maxHeight = 30.0f; stored()->state.slots[2].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[2].alphaB = 0; stored()->state.slots[2].distance = 3.0f; stored()->state.slots[2].riseAngle = 90; stored()->state.slots[2].alphaT = 3080; stored()->state.slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { stored()->state.slots[2].height[i] = 0.0f; stored()->state.slots[2].flag1[i] = 0; } stored()->state.slots[3].life = 0; } } else { if (this->state.stateCnt == 30) { PlayEffectWave(*this, "effect\\EF_GlassWall.wav"); this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); stored()->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); stored()->state.size = 16.0f; stored()->state.slots[0].life = 1; stored()->state.slots[0].process = 0; stored()->state.slots[0].fullDisplayAngle = 360; stored()->state.slots[0].maxHeight = 34.0f; stored()->state.slots[0].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[0].alphaB = 0; stored()->state.slots[0].distance = 3.6f; stored()->state.slots[0].riseAngle = 90; stored()->state.slots[0].alphaT = 3080; stored()->state.slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { stored()->state.slots[0].height[i] = 0.0f; stored()->state.slots[0].flag1[i] = 0; } stored()->state.slots[1].life = 1; stored()->state.slots[1].process = 0; stored()->state.slots[1].fullDisplayAngle = 360; stored()->state.slots[1].maxHeight = 37.0f; stored()->state.slots[1].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[1].alphaB = 0; stored()->state.slots[1].distance = 3.3f; stored()->state.slots[1].riseAngle = 90; stored()->state.slots[1].alphaT = 3080; stored()->state.slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { stored()->state.slots[1].height[i] = 0.0f; stored()->state.slots[1].flag1[i] = 0; } stored()->state.slots[2].life = 1; stored()->state.slots[2].process = 0; stored()->state.slots[2].fullDisplayAngle = 360; stored()->state.slots[2].maxHeight = 40.0f; stored()->state.slots[2].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[2].alphaB = 0; stored()->state.slots[2].distance = 3.0f; stored()->state.slots[2].riseAngle = 90; stored()->state.slots[2].alphaT = 3080; stored()->state.slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { stored()->state.slots[2].height[i] = 0.0f; stored()->state.slots[2].flag1[i] = 0; } stored()->state.slots[3].life = 0; } if (this->state.stateCnt == 60) { this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); stored()->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); stored()->state.size = 16.0f; stored()->state.slots[0].life = 1; stored()->state.slots[0].process = 0; stored()->state.slots[0].fullDisplayAngle = 360; stored()->state.slots[0].maxHeight = 74.0f; stored()->state.slots[0].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[0].alphaB = 0; stored()->state.slots[0].distance = 1.3f; stored()->state.slots[0].riseAngle = 90; stored()->state.slots[0].alphaT = 3080; stored()->state.slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { stored()->state.slots[0].height[i] = 0.0f; stored()->state.slots[0].flag1[i] = 0; } stored()->state.slots[1].life = 1; stored()->state.slots[1].process = 0; stored()->state.slots[1].fullDisplayAngle = 360; stored()->state.slots[1].maxHeight = 77.0f; stored()->state.slots[1].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[1].alphaB = 0; stored()->state.slots[1].distance = 1.0f; stored()->state.slots[1].riseAngle = 90; stored()->state.slots[1].alphaT = 3080; stored()->state.slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { stored()->state.slots[1].height[i] = 0.0f; stored()->state.slots[1].flag1[i] = 0; } stored()->state.slots[2].life = 1; stored()->state.slots[2].process = 0; stored()->state.slots[2].fullDisplayAngle = 360; stored()->state.slots[2].maxHeight = 80.0f; stored()->state.slots[2].rotStart = static_cast(ClampedRandom(360)); stored()->state.slots[2].alphaB = 0; stored()->state.slots[2].distance = 0.7f; stored()->state.slots[2].riseAngle = 90; stored()->state.slots[2].alphaT = 3080; stored()->state.slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { stored()->state.slots[2].height[i] = 0.0f; stored()->state.slots[2].flag1[i] = 0; } stored()->state.slots[3].life = 0; } } return this->state.stateCnt != this->state.duration; } // OFFSET: 0x00C60EE0 // FUNCTION: fn_20244 void CRagEffect::Cloud11Burst(char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 62, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); this->state.lastPrim->state.size = kind == 1 ? 8.0f : 5.0f; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].fullDisplayAngle = 30; float maxHeight; if (kind == 1) { maxHeight = static_cast(i) * 2.0f + 3.0f; } else if (kind == 2) { maxHeight = 48.0f - static_cast(i) * 5.0f; } else if (kind == 3) { maxHeight = 28.0f - static_cast(i) * 5.0f; } else { maxHeight = static_cast(i) * 2.0f + 5.0f; } this->state.lastPrim->state.slots[i].maxHeight = maxHeight; this->state.lastPrim->state.slots[i].rotStart = static_cast(i * 90); this->state.lastPrim->state.slots[i].alphaB = 0; float distance; if (kind >= 2) { this->state.lastPrim->state.slots[i].alphaT = 2; if (kind == 2) { distance = 14.0f - static_cast(i) * 2.0f; } else if (kind == 3) { distance = 6.0f - static_cast(i); } else { distance = static_cast(ClampedRandom(101)) * 0.03f + 4.5f; } } else { this->state.lastPrim->state.slots[i].alphaT = 1; if (kind == 1) { distance = static_cast(ClampedRandom(101)) * 0.01f + 2.5f; } else { distance = static_cast(ClampedRandom(101)) * 0.03f + 4.5f; } } this->state.lastPrim->state.slots[i].distance = distance; this->state.lastPrim->state.slots[i].riseAngle = static_cast(ClampedRandom(21) + 80); for (int j = 0; j < 21; ++j) { this->state.lastPrim->state.slots[i].height[j] = 1.0f; this->state.lastPrim->state.slots[i].flag1[j] = 0; } } } // OFFSET: 0x00C582B0 // FUNCTION: fn_20207 void CRagEffect::White02Burst(char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (static_cast(this->state.stateCnt - 6) >= 4) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 100, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 1; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; const std::int16_t phase = kind; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = -ClampedRandom(31); this->state.lastPrim->state.slots[index].maxHeight = kind == 3 ? 0.05f : 0.1f; this->state.lastPrim->state.slots[index].alphaB = static_cast(ClampedRandom(121) + 125); this->state.lastPrim->state.slots[index].riseAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[index].distance = static_cast(ClampedRandom(6)) + 6.0f; this->state.lastPrim->state.slots[index].height[0] = 0.0f; this->state.lastPrim->state.slots[index].vecTNow.x = static_cast(ClampedRandom(7)) * 0.1f + 0.8f; this->state.lastPrim->state.slots[index].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[index].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[index].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[index].vecTNow.y = 4.0f; for (int height = 20; height > 0; --height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } this->state.lastPrim->state.slots[index].alphaT = phase; } } // OFFSET: 0x00C51F50 // FUNCTION: fn_20192 void CRagEffect::GrandCrossRings(short angle, char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\cru_grand cross.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 34, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1; this->state.lastPrim->state.renderFlag |= 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (kind == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_white.tga", 0, false, true, false); this->state.lastPrim->state.size = 1.0f; } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_black.tga", 0, false, true, false); this->state.lastPrim->state.size = 12.0f; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 90; this->state.lastPrim->state.slots[0].maxHeight = 120.0f; this->state.lastPrim->state.slots[0].alphaB = angle; this->state.lastPrim->state.slots[0].distance = 19.9f; this->state.lastPrim->state.slots[0].riseAngle = 90; this->state.lastPrim->state.slots[0].flag1[4] = kind; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 90; this->state.lastPrim->state.slots[1].maxHeight = 120.0f; this->state.lastPrim->state.slots[1].alphaB = angle; this->state.lastPrim->state.slots[1].distance = 19.9f; this->state.lastPrim->state.slots[1].riseAngle = 90; this->state.lastPrim->state.slots[1].flag1[4] = kind; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 90; this->state.lastPrim->state.slots[2].maxHeight = 120.0f; this->state.lastPrim->state.slots[2].alphaB = angle; this->state.lastPrim->state.slots[2].distance = 19.9f; this->state.lastPrim->state.slots[2].riseAngle = 90; this->state.lastPrim->state.slots[2].flag1[4] = kind; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 90; this->state.lastPrim->state.slots[3].maxHeight = 120.0f; this->state.lastPrim->state.slots[3].alphaB = angle; this->state.lastPrim->state.slots[3].distance = 19.9f; this->state.lastPrim->state.slots[3].riseAngle = 90; this->state.lastPrim->state.slots[3].flag1[4] = kind; this->state.lastPrim->state.slots[0].rotStart = 180; this->state.lastPrim->state.slots[0].flag1[0] = 23; this->state.lastPrim->state.slots[0].flag1[1] = 23; this->state.lastPrim->state.slots[1].rotStart = 90; this->state.lastPrim->state.slots[1].flag1[0] = 23; this->state.lastPrim->state.slots[1].flag1[1] = -23; this->state.lastPrim->state.slots[2].rotStart = 0; this->state.lastPrim->state.slots[2].flag1[0] = -23; this->state.lastPrim->state.slots[2].flag1[1] = -23; this->state.lastPrim->state.slots[3].rotStart = 270; this->state.lastPrim->state.slots[3].flag1[0] = -23; this->state.lastPrim->state.slots[3].flag1[1] = 23; } // OFFSET: 0x00C44C20 // FUNCTION: fn_20146 void CRagEffect::WaterfallSheets(char first, char second, char third) { if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 79, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 3; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (third == 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\waterfall11.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\waterfall12.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\waterfall13.tga", 0, false, true, false); } else if (third == 1) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\waterfall31.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\waterfall32.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\waterfall33.tga", 0, false, true, false); } else if (third == 10) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); } int width = 80; int tall = 30; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 1; this->state.lastPrim->state.slots[index].process = 0; this->state.lastPrim->state.slots[index].alphaB = 120; this->state.lastPrim->state.slots[index].flag1[0] = first; this->state.lastPrim->state.slots[index].distance = static_cast(index + 36); this->state.lastPrim->state.slots[index].flag1[2] = 10; for (int height = 0; height < 20; ++height) { this->state.lastPrim->state.slots[index].height[height] = static_cast(height * 40); } this->state.lastPrim->state.slots[index].vecBNow.z = static_cast(index) * 0.25f - 1.0f; if (second == 0) { this->state.lastPrim->state.slots[index].maxHeight = static_cast(width); this->state.lastPrim->state.slots[index].flag1[1] = 1; } else if (second == 1) { this->state.lastPrim->state.slots[index].maxHeight = static_cast(tall); this->state.lastPrim->state.slots[index].flag1[1] = 1; } else if (second == 10) { this->state.lastPrim->state.slots[index].maxHeight = 0.0f; this->state.lastPrim->state.slots[index].alphaB = 70; this->state.lastPrim->state.slots[index].flag1[1] = 10; } else { this->state.lastPrim->state.slots[index].flag1[1] = 1; } tall -= 6; width -= 13; if (width < 29) { return; } } } // OFFSET: 0x00C63400 // FUNCTION: fn_20255 void CRagEffect::TexturedBlueRing(const char* name) { if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 121, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 4.0f; this->state.lastPrim->state.deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; this->state.lastPrim->state.deltaPos2 = {this->state.deltaPos2[0], this->state.deltaPos2[1], this->state.deltaPos2[2]}; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 315; this->state.lastPrim->state.slots[0].maxHeight = 13.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = this->state.deltaPos2[1] == 0.0f ? 3.4f : 2.4f; this->state.lastPrim->state.slots[0].riseAngle = 55; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 315; this->state.lastPrim->state.slots[1].maxHeight = 11.0f; this->state.lastPrim->state.slots[1].rotStart = 90; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = this->state.deltaPos2[1] == 0.0f ? 3.6f : 2.6f; this->state.lastPrim->state.slots[1].riseAngle = 50; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 315; this->state.lastPrim->state.slots[2].maxHeight = 9.0f; this->state.lastPrim->state.slots[2].rotStart = 180; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = this->state.deltaPos2[1] == 0.0f ? 3.8f : 2.8f; this->state.lastPrim->state.slots[2].riseAngle = 45; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[3].life = 0; for (int i = 0; i < 4; ++i) { for (int j = 0; j < 21; ++j) { this->state.lastPrim->state.slots[i].height[j] = 0.0f; this->state.lastPrim->state.slots[i].flag1[j] = 0; } } } // OFFSET: 0x00C48ED0 // FUNCTION: fn_20165 void CRagEffect::EmpShockBurst(const char* name, char flag) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt >= 99999998) { this->state.stateCnt = 0; this->state.duration = 99999999; } if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 132, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1; this->state.lastPrim->state.renderFlag |= 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 1.0f; int process = 0; for (int i = 0; process > -80; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = process; this->state.lastPrim->state.slots[i].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].maxHeight = 10.0f; this->state.lastPrim->state.slots[i].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].alphaB = 200; this->state.lastPrim->state.slots[i].height[3] = static_cast(i); this->state.lastPrim->state.slots[i].height[4] = 10.0f; this->state.lastPrim->state.slots[i].height[5] = static_cast(flag); process -= 20; } } if (this->state.stateCnt == 10) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 132, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1; this->state.lastPrim->state.renderFlag |= 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 1.0f; int process = 0; for (int i = 0; process > -80; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = process; this->state.lastPrim->state.slots[i].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].maxHeight = 10.0f; this->state.lastPrim->state.slots[i].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].alphaB = 200; this->state.lastPrim->state.slots[i].height[3] = static_cast(i); this->state.lastPrim->state.slots[i].height[4] = 10.0f; this->state.lastPrim->state.slots[i].height[5] = static_cast(flag); process -= 20; } } } // OFFSET: 0x00C64CA0 // FUNCTION: fn_20264 void CPc::SetSprShoe(int value) { this->shoe[0] = value; } // OFFSET: 0x00C46410 // FUNCTION: fn_20153 void CRagEffect::TexturedMagicRing(const char* name, char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 48, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int i = 0; i < 4; ++i) { if (kind == 0) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].fullDisplayAngle = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].vecBPre.x = static_cast(ClampedRandom(40) - 20); this->state.lastPrim->state.slots[i].vecBPre.z = static_cast(ClampedRandom(40) - 20); this->state.lastPrim->state.slots[i].vecBNow.x = 0.0f; this->state.lastPrim->state.slots[i].vecBNow.z = 0.0f; this->state.lastPrim->state.slots[i].alphaB = 15; } else if (kind == 1 || kind == 2) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].fullDisplayAngle = static_cast(ClampedRandom(360)); if (i < 2) { this->state.lastPrim->state.slots[i].vecBPre.x = static_cast(ClampedRandom(7)) - 3.0f; this->state.lastPrim->state.slots[i].vecBPre.z = -3.0f; this->state.lastPrim->state.slots[i].vecBNow.x = -this->state.lastPrim->state.slots[i].vecBPre.x; this->state.lastPrim->state.slots[i].vecBNow.z = 3.0f; } else { this->state.lastPrim->state.slots[i].vecBPre.x = -3.0f; this->state.lastPrim->state.slots[i].vecBPre.z = static_cast(ClampedRandom(7)) - 3.0f; this->state.lastPrim->state.slots[i].vecBNow.x = 3.0f; this->state.lastPrim->state.slots[i].vecBNow.z = -this->state.lastPrim->state.slots[i].vecBPre.z; } this->state.lastPrim->state.slots[i].alphaB = 50; this->state.lastPrim->state.slots[i].height[0] = static_cast(kind); } else if (kind == 3 || kind == 4) { this->state.lastPrim->state.slots[i].life = i < 2 ? 1 : 0; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].fullDisplayAngle = static_cast(ClampedRandom(360)); if (i < 1) { this->state.lastPrim->state.slots[i].vecBPre.x = 6.0f; this->state.lastPrim->state.slots[i].vecBPre.z = 0.0f; this->state.lastPrim->state.slots[i].vecBNow.x = -6.0f; this->state.lastPrim->state.slots[i].vecBNow.z = 0.0f; } else { this->state.lastPrim->state.slots[i].vecBPre.x = 0.0f; this->state.lastPrim->state.slots[i].vecBPre.z = -6.0f; this->state.lastPrim->state.slots[i].vecBNow.x = 0.0f; this->state.lastPrim->state.slots[i].vecBNow.z = 6.0f; } this->state.lastPrim->state.slots[i].alphaB = 100; this->state.lastPrim->state.slots[i].height[0] = static_cast(kind); } } } // OFFSET: 0x00C48820 // FUNCTION: fn_20163 void CRagEffect::IncAgilityCenter(char kind) { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; g_renderer->viewport.Project(&this->state.parent->render.position.x, view, vertex); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt == 0) { PlayEffectWave(*this, kind == 3 ? "effect\\소울 체인지.wav" : "effect\\EF_IncAgility.wav"); } if ((this->state.stateCnt & 1) != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 50; EffectPrimitiveState& particle = this->state.lastPrim->state; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(ClampedRandom(360))); const float distance = static_cast(ClampedRandom(7) + 2); this->state.lastPrim->state.deltaPos2 = RotatedForward(this->state.lastPrim->state.transform, distance); reinterpret_cast(this->state.lastPrim->state.transform)->MakeXRotation(GetRadian(90)); if (kind >= 2) { this->state.lastPrim->state.speed = static_cast(ClampedRandom(50) + 40) / 100.0f; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(100) + 40) / 10.0f; this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(6)) * 0.05f + 0.1f; } else { this->state.lastPrim->state.speed = static_cast(ClampedRandom(50) + 20) / 100.0f; this->state.lastPrim->state.widthSize = static_cast(ClampedRandom(100) + 20) / 10.0f; this->state.lastPrim->state.heightSize = static_cast(ClampedRandom(4)) * 0.1f + 0.1f; } this->state.lastPrim->state.alpha = 0.0f; this->state.lastPrim->state.maxAlpha = 60.0f; this->state.lastPrim->state.alphaSpeed = this->state.lastPrim->state.maxAlpha / 20.0f; this->state.lastPrim->state.fadeOutCnt = this->state.lastPrim->state.duration - 20; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); } // OFFSET: 0x00C4F650 // FUNCTION: fn_20182 void CRagEffect::SonicSlashFan(char kind) { if (this->state.stateCnt > 4) { return; } for (int angle = -90; angle < 180; angle += 90) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 8, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = 60; this->state.lastPrim->state.deltaPos2 = {0.0f, -10.0f, 0.0f}; this->state.lastPrim->state.radius = this->state.lastPrim->CalcDist(this->render.position.x, this->render.position.z); this->state.lastPrim->Face( static_cast(ClampedRandom(7)) + this->render.position.x - 3.0f, static_cast(ClampedRandom(7)) + this->render.position.z - 3.0f ); this->state.lastPrim->state.longitude = -this->state.lastPrim->render.angle; const float speed = this->state.lastPrim->state.radius / this->state.lastPrim->state.duration; this->state.lastPrim->state.speed = speed + speed; this->state.lastPrim->state.gravSpeed = 2.0f; const float rise = -(this->state.lastPrim->state.gravSpeed / this->state.lastPrim->state.duration); this->state.lastPrim->state.gravAccel = rise + rise; this->state.lastPrim->state.latiSpeed = -2.0f; const float spread = -(this->state.lastPrim->state.latiSpeed / this->state.lastPrim->state.duration); this->state.lastPrim->state.latiAccel = spread + spread; this->state.lastPrim->state.roll = static_cast(angle); reinterpret_cast(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast(this->state.lastPrim->state.longitude))); this->state.lastPrim->state.deltaPos3 = RotatedForward(this->state.lastPrim->state.transform, 1.0f); this->state.lastPrim->state.rotAxis[0] = this->state.lastPrim->state.deltaPos3.x; this->state.lastPrim->state.rotAxis[1] = this->state.lastPrim->state.deltaPos3.y; this->state.lastPrim->state.rotAxis[2] = this->state.lastPrim->state.deltaPos3.z; if (kind == 0) { this->state.lastPrim->state.red = ClampedRandom(81) + 160; this->state.lastPrim->state.green = 255; this->state.lastPrim->state.blue = ClampedRandom(81) + 160; } else if (kind == 1) { const int color = ClampedRandom(55) + 200; this->state.lastPrim->state.red = color; this->state.lastPrim->state.green = color; this->state.lastPrim->state.blue = color; } else if (kind == 2) { const int color = ClampedRandom(100) + 20; this->state.lastPrim->state.red = color; this->state.lastPrim->state.green = color; this->state.lastPrim->state.blue = color; } this->state.lastPrim->state.size = static_cast(ClampedRandom(6)) * 0.1f + 1.0f; this->state.lastPrim->SetSpriteName("이팩트\\particle1.spr"); this->state.lastPrim->SetActionName("이팩트\\particle1.act"); this->state.lastPrim->state.numSegment = 7; this->state.lastPrim->InitSegment(); } } // OFFSET: 0x00C65AD0 // FUNCTION: fn_20271 void CRagEffect::TexturedStorm2(const char* name, char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 111, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; for (int i = 0; i < 2; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].maxHeight = 0.07f; this->state.lastPrim->state.slots[i].distance = static_cast(ClampedRandom(11)) * 0.1f + 1.0f; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].vecBPre.x = this->state.deltaPos[0]; this->state.lastPrim->state.slots[i].vecBPre.y = this->state.deltaPos[1]; this->state.lastPrim->state.slots[i].vecBPre.z = this->state.deltaPos[2]; this->state.lastPrim->state.slots[i].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[12] = 0.0f; this->state.lastPrim->state.slots[i].vecBNow.x = this->state.deltaPos[0]; this->state.lastPrim->state.slots[i].vecBNow.y = this->state.deltaPos[1]; this->state.lastPrim->state.slots[i].vecBNow.z = this->state.deltaPos[2]; this->state.lastPrim->state.slots[i].height[4] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[5] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[6] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[7] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[13] = 0.0f; this->state.lastPrim->state.slots[i].vecTPre.x = this->state.deltaPos[0]; this->state.lastPrim->state.slots[i].vecTPre.y = this->state.deltaPos[1]; this->state.lastPrim->state.slots[i].vecTPre.z = this->state.deltaPos[2]; this->state.lastPrim->state.slots[i].height[8] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[9] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[10] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[11] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].height[14] = 0.0f; if (kind == 2) { this->state.lastPrim->state.slots[i].height[15] = 4.0f; } else if (kind == 3) { this->state.lastPrim->state.slots[i].height[15] = static_cast(rand() % 3 + 1); } else { this->state.lastPrim->state.slots[i].height[15] = 0.0f; } } } } // OFFSET: 0x00C57830 // FUNCTION: fn_20205 void CRagEffect::RingRedPulse(const char* name, float x, float z) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 110, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 10.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 12.0f; this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 2.3f; this->state.lastPrim->state.slots[0].riseAngle = 86; this->state.lastPrim->state.slots[0].alphaT = static_cast(this->state.duration) - 25; this->state.lastPrim->state.slots[0].vecBNow.x = x; this->state.lastPrim->state.slots[0].vecBNow.y = 1234.5f; this->state.lastPrim->state.slots[0].vecBNow.z = z; for (int j = 0; j < 21; ++j) { this->state.lastPrim->state.slots[0].height[j] = 0.0f; this->state.lastPrim->state.slots[0].flag1[j] = 33; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 25.0f; this->state.lastPrim->state.slots[1].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 2.0f; this->state.lastPrim->state.slots[1].riseAngle = 90; this->state.lastPrim->state.slots[1].alphaT = static_cast(this->state.duration) - 25; this->state.lastPrim->state.slots[1].vecBNow.x = x; this->state.lastPrim->state.slots[1].vecBNow.y = 1234.5f; this->state.lastPrim->state.slots[1].vecBNow.z = z; for (int j = 0; j < 21; ++j) { this->state.lastPrim->state.slots[1].height[j] = 0.0f; this->state.lastPrim->state.slots[1].flag1[j] = 33; } this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C47990 // FUNCTION: fn_20159 void CRagEffect::LineStreakLayered(short kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0x201; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(kind < 10 ? "effect\\line3.tga" : "effect\\line3y.tga", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].distance = 100.0f; if (kind % 10 == 0) { this->state.lastPrim->state.slots[i].height[0] = -15.0f - static_cast(ClampedRandom(11)); } else if (kind % 10 == 1) { this->state.lastPrim->state.slots[i].height[0] = static_cast(ClampedRandom(11)) + 15.0f; } this->state.lastPrim->state.slots[i].height[1] = static_cast(ClampedRandom(200)); if (kind < 10) { this->state.lastPrim->state.slots[i].maxHeight = static_cast(rand() % 4) * 0.1f + 0.3f; this->state.lastPrim->state.slots[i].height[2] = static_cast(ClampedRandom(31)) + 20.0f; this->state.lastPrim->state.slots[i].flag1[0] = static_cast(rand() % 3); this->state.lastPrim->state.slots[i].height[3] = static_cast(ClampedRandom(21)) * 0.1f + 1.5f; } else if (kind > 19) { this->state.lastPrim->state.slots[i].maxHeight = static_cast(rand() % 4) * 0.1f + 0.4f; this->state.lastPrim->state.slots[i].height[2] = static_cast(ClampedRandom(31)) + 30.0f; this->state.lastPrim->state.slots[i].flag1[0] = static_cast(rand() % 3 + 20); this->state.lastPrim->state.slots[i].height[3] = static_cast(ClampedRandom(21)) * 0.1f + 1.5f; } else { this->state.lastPrim->state.slots[i].maxHeight = static_cast(ClampedRandom(6)) * 0.1f + g_depthAverageHalf; this->state.lastPrim->state.slots[i].height[2] = static_cast(ClampedRandom(31)) + 40.0f; this->state.lastPrim->state.slots[i].flag1[0] = static_cast(rand() % 3 + 10); this->state.lastPrim->state.slots[i].height[3] = static_cast(ClampedRandom(11)) * 0.1f + 1.0f; } Get_Angle( this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.lastPrim->state.slots[i].riseAngle ); this->state.lastPrim->state.slots[i].alphaB = 0; } } // OFFSET: 0x00C50980 // FUNCTION: fn_20185 void CRagEffect::TorchRedRing(char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 133, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 13; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\torch_red01.bmp", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\torch_red02.bmp", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\torch_red03.bmp", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\torch_red04.bmp", 0, false, true, false); this->state.lastPrim->state.textures[4] = g_texMgr.Load("effect\\torch_red05.bmp", 0, false, true, false); this->state.lastPrim->state.textures[5] = g_texMgr.Load("effect\\torch_red06.bmp", 0, false, true, false); this->state.lastPrim->state.textures[6] = g_texMgr.Load("effect\\torch_red07.bmp", 0, false, true, false); this->state.lastPrim->state.textures[7] = g_texMgr.Load("effect\\torch_red08.bmp", 0, false, true, false); this->state.lastPrim->state.textures[8] = g_texMgr.Load("effect\\torch_red09.bmp", 0, false, true, false); this->state.lastPrim->state.textures[9] = g_texMgr.Load("effect\\torch_red10.bmp", 0, false, true, false); this->state.lastPrim->state.textures[10] = g_texMgr.Load("effect\\torch_red11.bmp", 0, false, true, false); this->state.lastPrim->state.textures[11] = g_texMgr.Load("effect\\torch_red12.bmp", 0, false, true, false); this->state.lastPrim->state.textures[12] = g_texMgr.Load("effect\\torch_red13.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].distance = 12.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 12.0f; this->state.lastPrim->state.slots[0].flag1[2] = 4; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 135; this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.deltaPos.x = this->state.deltaPos[0]; this->state.lastPrim->state.deltaPos.y = this->state.deltaPos[1]; this->state.lastPrim->state.deltaPos.z = this->state.deltaPos[2]; Get_Angle( this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], &this->state.lastPrim->state.slots[0].riseAngle ); this->state.lastPrim->state.slots[0].riseAngle += 180; if (this->state.lastPrim->state.slots[0].riseAngle >= 360) { this->state.lastPrim->state.slots[0].riseAngle -= 360; } this->state.lastPrim->state.slots[0].vecBNow.x = this->state.deltaPos[0]; this->state.lastPrim->state.slots[0].vecBNow.z = this->state.deltaPos[2]; this->state.lastPrim->state.slots[0].vecBNow.y = this->state.lastPrim->state.slots[0].vecBPre.y; this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[4] = kind; } // OFFSET: 0x00C510C0 // FUNCTION: fn_20187 void CRagEffect::TexturedSlashAir(const char* name, char size, char phase) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 108, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = static_cast(size); for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].fullDisplayAngle = 315; this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].vecBNow.y = 0.0f; if (phase == 0) { if (i == 0) { this->state.lastPrim->state.slots[i].distance = 4.5f; this->state.lastPrim->state.slots[i].riseAngle = 85; this->state.lastPrim->state.slots[i].maxHeight = 27.0f; this->state.lastPrim->state.slots[i].rotStart = 0; } else if (i == 1) { this->state.lastPrim->state.slots[i].distance = 5.0f; this->state.lastPrim->state.slots[i].riseAngle = 80; this->state.lastPrim->state.slots[i].maxHeight = 28.0f; this->state.lastPrim->state.slots[i].rotStart = 90; } else if (i == 2) { this->state.lastPrim->state.slots[i].distance = 5.5f; this->state.lastPrim->state.slots[i].riseAngle = 70; this->state.lastPrim->state.slots[i].maxHeight = 29.0f; this->state.lastPrim->state.slots[i].rotStart = 180; } else if (i == 3) { this->state.lastPrim->state.slots[i].distance = 5.0f; this->state.lastPrim->state.slots[i].riseAngle = 75; this->state.lastPrim->state.slots[i].maxHeight = 30.0f; this->state.lastPrim->state.slots[i].rotStart = 270; } } else if (phase == 1) { if (i == 0) { this->state.lastPrim->state.slots[i].distance = 5.5f; this->state.lastPrim->state.slots[i].riseAngle = 50; this->state.lastPrim->state.slots[i].maxHeight = 30.0f; this->state.lastPrim->state.slots[i].rotStart = 90; } else if (i == 1) { this->state.lastPrim->state.slots[i].distance = 6.0f; this->state.lastPrim->state.slots[i].riseAngle = 55; this->state.lastPrim->state.slots[i].maxHeight = 29.0f; this->state.lastPrim->state.slots[i].rotStart = 180; } else if (i == 2) { this->state.lastPrim->state.slots[i].distance = 6.5f; this->state.lastPrim->state.slots[i].riseAngle = 65; this->state.lastPrim->state.slots[i].maxHeight = 28.0f; this->state.lastPrim->state.slots[i].rotStart = 270; } else if (i == 3) { this->state.lastPrim->state.slots[i].distance = 6.0f; this->state.lastPrim->state.slots[i].riseAngle = 60; this->state.lastPrim->state.slots[i].maxHeight = 27.0f; this->state.lastPrim->state.slots[i].rotStart = 0; } } this->state.lastPrim->state.slots[i].vecTNow.x = static_cast(this->state.lastPrim->state.slots[i].riseAngle); this->state.lastPrim->state.slots[i].vecTNow.y = this->state.lastPrim->state.slots[i].maxHeight; for (int j = 0; j < 21; ++j) { this->state.lastPrim->state.slots[i].height[j] = 0.0f; this->state.lastPrim->state.slots[i].flag1[j] = 0; } } } // OFFSET: 0x00C54E60 // FUNCTION: fn_20201 void CRagEffect::SuperSlashFan(char count, char value) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 35, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 5; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\super1.bmp", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\super2.bmp", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\super3.bmp", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\super4.bmp", 0, false, true, false); this->state.lastPrim->state.textures[4] = g_texMgr.Load("effect\\super5.bmp", 0, false, true, false); this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; for (int i = 0; i < count; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].distance = 3.5f; this->state.lastPrim->state.slots[i].vecBPre.y = -static_cast(ClampedRandom(10)); this->state.lastPrim->state.slots[i].height[0] = 10.0f; this->state.lastPrim->state.slots[i].height[1] = 70.0f; this->state.lastPrim->state.slots[i].height[2] = static_cast(ClampedRandom(5)); this->state.lastPrim->state.slots[i].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].vecBNow.y = -static_cast(ClampedRandom(10)); this->state.lastPrim->state.slots[i].height[4] = 10.0f; this->state.lastPrim->state.slots[i].height[5] = 130.0f; this->state.lastPrim->state.slots[i].height[6] = static_cast(ClampedRandom(5)); this->state.lastPrim->state.slots[i].height[7] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].vecTPre.y = -static_cast(ClampedRandom(10)); this->state.lastPrim->state.slots[i].height[8] = 10.0f; this->state.lastPrim->state.slots[i].height[9] = 190.0f; this->state.lastPrim->state.slots[i].height[10] = static_cast(ClampedRandom(5)); this->state.lastPrim->state.slots[i].height[11] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].vecTNow.y = -static_cast(ClampedRandom(10)); this->state.lastPrim->state.slots[i].height[12] = 10.0f; this->state.lastPrim->state.slots[i].height[13] = 250.0f; this->state.lastPrim->state.slots[i].height[14] = static_cast(ClampedRandom(5)); this->state.lastPrim->state.slots[i].height[15] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].flag1[4] = value; } } // OFFSET: 0x00C4AF00 // FUNCTION: fn_20173 void CRagEffect::SuperSlashSpread(char count, char value) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 99, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 5; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\super1.bmp", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\super2.bmp", 0, false, true, false); this->state.lastPrim->state.textures[2] = g_texMgr.Load("effect\\super3.bmp", 0, false, true, false); this->state.lastPrim->state.textures[3] = g_texMgr.Load("effect\\super4.bmp", 0, false, true, false); this->state.lastPrim->state.textures[4] = g_texMgr.Load("effect\\super5.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->state.slots[0].life = 0; this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; for (int i = 0; i < count; ++i) { this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].distance = 2.0f; this->state.lastPrim->state.slots[i].vecBPre.y = -static_cast(ClampedRandom(10)); this->state.lastPrim->state.slots[i].height[0] = 10.0f; this->state.lastPrim->state.slots[i].height[1] = 40.0f; this->state.lastPrim->state.slots[i].height[2] = static_cast(ClampedRandom(5)); this->state.lastPrim->state.slots[i].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].vecBNow.y = -static_cast(ClampedRandom(10)); this->state.lastPrim->state.slots[i].height[4] = 10.0f; this->state.lastPrim->state.slots[i].height[5] = 80.0f; this->state.lastPrim->state.slots[i].height[6] = static_cast(ClampedRandom(5)); this->state.lastPrim->state.slots[i].height[7] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].vecTPre.y = -static_cast(ClampedRandom(10)); this->state.lastPrim->state.slots[i].height[8] = 10.0f; this->state.lastPrim->state.slots[i].height[9] = 120.0f; this->state.lastPrim->state.slots[i].height[10] = static_cast(ClampedRandom(5)); this->state.lastPrim->state.slots[i].height[11] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].vecTNow.y = -static_cast(ClampedRandom(10)); this->state.lastPrim->state.slots[i].height[12] = 10.0f; this->state.lastPrim->state.slots[i].height[13] = 160.0f; this->state.lastPrim->state.slots[i].height[14] = static_cast(ClampedRandom(5)); this->state.lastPrim->state.slots[i].height[15] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[i].flag1[4] = value; } } // OFFSET: 0x00C627C0 // FUNCTION: fn_20251 void CPlayer::UpdateFootprints(int kind) { const int interval = kind != 1 ? 7 : 12; if (g_updateTick <= 0) { return; } ++this->footprintCounter; if (this->footprintCounter > interval * 2) { this->footprintCounter = 1; } else { if (this->footprintCounter < 0) { this->footprintCounter = 0; } if (this->footprintCounter == 0) { CopyVector(this->footprintPosition, this->render.position); } } if (this->footprintCounter != interval && this->footprintCounter != interval * 2) { return; } CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); const float dx = this->render.position.x - this->footprintPosition.x; const float dz = this->render.position.z - this->footprintPosition.z; CopyVector(this->footprintPosition, this->render.position); if (dx == 0.0f && dz == 0.0f) { return; } const float length = SquareRoot(dz * dz + dx * dx); const float cosine = dx / length; const float sine = dz / length; std::int16_t direction = 180; for (std::int16_t index = 0; index <= 180; ++index) { if (cosine >= g_cosTable[index]) { if (sine >= 0.0f) { direction = index; } else { direction = static_cast(360 - index); } break; } } std::int16_t angle = static_cast(direction + 135); if (angle >= 360) { angle = static_cast(angle - 360); } if (kind == 1) { mode->LaunchDummyEffect(&this->footprintPosition, (this->footprintCounter != interval) + 326, 333, angle); } else if (kind == 2 && this->render.runStartTick > static_cast(interval)) { if (this->footprintCounter == interval) { mode->LaunchDummyEffect(&this->footprintPosition, 447, 333, angle); } else { mode->LaunchDummyEffect(&this->footprintPosition, 448, 333, angle); } } } // OFFSET: 0x00C74B60 // FUNCTION: fn_20334 void CPlayer::RefreshEffect164() { this->SendMsg(nullptr, AM_DELETE_EFFECT, 164, 0, 0, 0, 0, 0); this->skillEffect = this->LaunchEffect(164, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } // OFFSET: 0x00C4FAB0 // FUNCTION: fn_20183 void CRagEffect::PortalRings() { this->render.position.x = this->state.parent->render.position.x; this->render.position.y = this->state.parent->render.position.y; this->render.position.z = this->state.parent->render.position.z; if (this->state.stateCnt != 0) { return; } const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( "effect\\EF_Portal.wav", this->render.position.x - player->render.position.x, -150.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); this->state.lastPrim = CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); this->state.lastPrim->state.size = 4.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 30.0f; this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 3.7f; this->state.lastPrim->state.slots[0].riseAngle = 90; this->state.lastPrim->state.slots[0].alphaT = 1400; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[0].height[i] = 0.0f; this->state.lastPrim->state.slots[0].flag1[i] = 2; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 30.0f; this->state.lastPrim->state.slots[1].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 3.4f; this->state.lastPrim->state.slots[1].riseAngle = 90; this->state.lastPrim->state.slots[1].alphaT = 1400; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[1].height[i] = 0.0f; this->state.lastPrim->state.slots[1].flag1[i] = 2; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 4.0f; this->state.lastPrim->state.slots[2].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 3.6f; this->state.lastPrim->state.slots[2].riseAngle = 10; this->state.lastPrim->state.slots[2].alphaT = 1400; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[2].height[i] = 0.0f; this->state.lastPrim->state.slots[2].flag1[i] = 2; } this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 360; this->state.lastPrim->state.slots[3].maxHeight = 4.0f; this->state.lastPrim->state.slots[3].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[3].alphaB = 0; this->state.lastPrim->state.slots[3].distance = 3.7f; this->state.lastPrim->state.slots[3].riseAngle = 5; this->state.lastPrim->state.slots[3].alphaT = 1400; this->state.lastPrim->state.slots[3].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[3].height[i] = 0.0f; this->state.lastPrim->state.slots[3].flag1[i] = 2; } } // OFFSET: 0x00C46860 // FUNCTION: fn_20154 void CRagEffect::TexturedGroundRing(const char* name, char flag, int unused1, int unused2) { this->render.position.x = this->state.parent->render.position.x; this->render.position.y = this->state.parent->render.position.y; this->render.position.z = this->state.parent->render.position.z; if (this->state.stateCnt > 3) { return; } CEffectPrim* particle = CreateEffectParticle(*this, this->render, 169, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.currentPrimitive = reinterpret_cast(particle); auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); stored()->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); stored()->state.size = static_cast(flag); stored()->state.slots[0].life = 0; stored()->state.slots[1].life = 0; stored()->state.slots[2].life = 0; stored()->state.slots[3].life = 0; stored()->state.slots[0].life = 1; stored()->state.slots[0].process = 0; stored()->state.slots[0].fullDisplayAngle = 360; stored()->state.slots[0].maxHeight = 15.0f; stored()->state.slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); stored()->state.slots[0].alphaB = static_cast(std::max(rand() % 100, 0)); stored()->state.slots[0].distance = static_cast(this->state.stateCnt * 2) + g_depthAverageHalf; stored()->state.slots[0].vecTNow.x = stored()->state.slots[0].distance; stored()->state.slots[0].distance -= static_cast(rand() % 21) * 0.1f; stored()->state.slots[0].riseAngle = 80; for (int i = 0; i < 21; ++i) { stored()->state.slots[0].height[i] = 0.0f; stored()->state.slots[0].flag1[i] = 0; } stored()->state.slots[1].life = 1; stored()->state.slots[1].process = 0; stored()->state.slots[1].fullDisplayAngle = 360; stored()->state.slots[1].maxHeight = 16.0f; stored()->state.slots[1].rotStart = static_cast(std::max(rand() % 360, 0)); stored()->state.slots[1].alphaB = static_cast(std::max(rand() % 100, 0)); stored()->state.slots[1].distance = static_cast(this->state.stateCnt * 2) + 1.0f; stored()->state.slots[1].vecTNow.x = stored()->state.slots[1].distance; stored()->state.slots[1].distance += static_cast(rand() % 21) * 0.1f; stored()->state.slots[1].riseAngle = 80; for (int i = 0; i < 21; ++i) { stored()->state.slots[1].height[i] = 0.0f; stored()->state.slots[1].flag1[i] = 0; } stored()->state.slots[2].life = 1; stored()->state.slots[2].process = 0; stored()->state.slots[2].fullDisplayAngle = 360; stored()->state.slots[2].maxHeight = 17.0f; stored()->state.slots[2].rotStart = static_cast(std::max(rand() % 360, 0)); stored()->state.slots[2].alphaB = static_cast(std::max(rand() % 100, 0)); stored()->state.slots[2].distance = static_cast(this->state.stateCnt * 2) + 1.5f; stored()->state.slots[2].vecTNow.x = stored()->state.slots[2].distance; stored()->state.slots[2].distance -= static_cast(rand() % 21) * 0.1f; stored()->state.slots[2].riseAngle = 80; for (int i = 0; i < 21; ++i) { stored()->state.slots[2].height[i] = 0.0f; stored()->state.slots[2].flag1[i] = 0; } stored()->state.slots[3].life = 1; stored()->state.slots[3].process = 0; stored()->state.slots[3].fullDisplayAngle = 360; stored()->state.slots[3].maxHeight = 18.0f; stored()->state.slots[3].rotStart = static_cast(std::max(rand() % 360, 0)); stored()->state.slots[3].alphaB = static_cast(std::max(rand() % 100, 0)); stored()->state.slots[3].distance = static_cast(this->state.stateCnt * 2) + 2.0f; stored()->state.slots[3].vecTNow.x = stored()->state.slots[3].distance; stored()->state.slots[3].distance += static_cast(rand() % 21) * 0.1f; stored()->state.slots[3].riseAngle = 80; for (int i = 0; i < 21; ++i) { stored()->state.slots[3].height[i] = 0.0f; stored()->state.slots[3].flag1[i] = 0; } } // OFFSET: 0x00C5CC00 // FUNCTION: fn_20230 void CRagEffect::Maple() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 99999998) { this->state.duration = 99999999; this->state.stateCnt = 0; } else if ((this->state.stateCnt & 1) != 0 || this->state.stateCnt >= 200) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 40, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].maxHeight = static_cast(ClampedRandom(4) + 2) * 0.03f; this->state.lastPrim->state.size = static_cast(ClampedRandom(6) + 35) / 100.0f; this->state.lastPrim->state.slots[0].vecBPre.x = static_cast(ClampedRandom(300)) + this->render.position.x - 150.0f; this->state.lastPrim->state.slots[0].height[0] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[1] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[2] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].height[3] = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 200.0f; this->state.lastPrim->state.slots[0].vecBPre.z = static_cast(ClampedRandom(300)) + this->render.position.z - 150.0f; this->state.lastPrim->state.slots[0].flag1[0] = 1; this->state.lastPrim->state.alpha = 200.0f; this->state.lastPrim->SetActionName("이팩트\\단풍.act"); this->state.lastPrim->SetSpriteName("이팩트\\단풍.spr"); this->state.lastPrim->SetAction(0, 36, 0); this->state.lastPrim->InitSegment(); this->state.lastPrim->state.slots[1].life = 0; this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; } // OFFSET: 0x00C526D0 // FUNCTION: fn_20195 bool CRagEffect::GlassWallRising(const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_GlassWall.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 10.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 34.0f; this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 3.6f; this->state.lastPrim->state.slots[0].riseAngle = 90; this->state.lastPrim->state.slots[0].alphaT = 5500; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[0].height[height] = 0.0f; this->state.lastPrim->state.slots[0].flag1[height] = 0; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 37.0f; this->state.lastPrim->state.slots[1].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 3.3f; this->state.lastPrim->state.slots[1].riseAngle = 90; this->state.lastPrim->state.slots[1].alphaT = 3080; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[1].height[height] = 0.0f; this->state.lastPrim->state.slots[1].flag1[height] = 0; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 40.0f; this->state.lastPrim->state.slots[2].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 3.0f; this->state.lastPrim->state.slots[2].riseAngle = 90; this->state.lastPrim->state.slots[2].alphaT = 3080; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[2].height[height] = 0.0f; this->state.lastPrim->state.slots[2].flag1[height] = 0; } this->state.lastPrim->state.slots[3].life = 0; } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); return this->state.stateCnt != this->state.duration; } // OFFSET: 0x00C62B60 // FUNCTION: fn_20253 void CRagEffect::TexturedQuadRingSized(std::int16_t baseAlpha, const char* name, char kind) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } if (this->state.duration < 56) { this->state.duration = 56; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 30, 0.0f, 0.0f, 0.0f, WorldObjects()); if (this->state.lastPrim == nullptr) { return; } this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); if (kind == 1) { this->state.lastPrim->state.size = 8.0f; } else if (kind == 2) { this->state.lastPrim->state.size = 5.0f; } else if (kind == 3) { this->state.lastPrim->state.size = 10.0f; } else if (kind == 4) { this->state.lastPrim->state.size = 11.0f; } else if (kind == 5) { this->state.lastPrim->state.size = 4.0f; } else if (kind == 6) { this->state.lastPrim->state.size = 12.0f; } else if (kind == 15) { this->state.lastPrim->state.size = 7.0f; } else if (kind == 20) { this->state.lastPrim->state.size = 24.0f; } else if (kind == 21) { this->state.lastPrim->state.size = 25.0f; } else if (kind == 22) { this->state.lastPrim->state.size = 26.0f; } else if (kind == 23) { this->state.lastPrim->state.size = 27.0f; } else if (kind == 31) { this->state.lastPrim->state.size = 31.0f; } else if (kind == 42) { this->state.lastPrim->state.size = 42.0f; } else if (kind == 43) { this->state.lastPrim->state.size = 43.0f; } else if (kind == 44) { this->state.lastPrim->state.size = 44.0f; } else if (kind == 45) { this->state.lastPrim->state.size = 45.0f; } else if (kind == 46) { this->state.lastPrim->state.size = 46.0f; } else if (kind == 47) { this->state.lastPrim->state.size = 47.0f; } else if (kind == 49) { this->state.lastPrim->state.size = 49.0f; } else if (kind == 50) { this->state.lastPrim->state.size = 50.0f; } else { this->state.lastPrim->state.size = 5.0f; } if (kind == 48) { this->state.lastPrim->state.size = 48.0f; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; if (kind == 2) { this->state.lastPrim->state.slots[0].maxHeight = 25.0f; } else if (kind == 22) { this->state.lastPrim->state.slots[0].maxHeight = 15.0f; } else { this->state.lastPrim->state.slots[0].maxHeight = 20.0f; } this->state.lastPrim->state.slots[0].rotStart = 180; this->state.lastPrim->state.slots[0].alphaB = baseAlpha + 135; this->state.lastPrim->state.slots[0].distance = 4.1f; this->state.lastPrim->state.slots[0].riseAngle = 80; this->state.lastPrim->state.slots[0].alphaT = kind; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; if (kind == 2) { this->state.lastPrim->state.slots[1].maxHeight = 24.0f; } else if (kind == 22) { this->state.lastPrim->state.slots[1].maxHeight = 14.0f; } else { this->state.lastPrim->state.slots[1].maxHeight = 19.0f; } this->state.lastPrim->state.slots[1].rotStart = 270; this->state.lastPrim->state.slots[1].alphaB = baseAlpha + 90; this->state.lastPrim->state.slots[1].distance = 4.1f; this->state.lastPrim->state.slots[1].riseAngle = 80; this->state.lastPrim->state.slots[1].alphaT = kind; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; if (kind == 2) { this->state.lastPrim->state.slots[2].maxHeight = 23.0f; } else if (kind == 22) { this->state.lastPrim->state.slots[2].maxHeight = 13.0f; } else { this->state.lastPrim->state.slots[2].maxHeight = 18.0f; } this->state.lastPrim->state.slots[2].rotStart = 0; this->state.lastPrim->state.slots[2].alphaB = baseAlpha + 45; this->state.lastPrim->state.slots[2].distance = 4.1f; this->state.lastPrim->state.slots[2].riseAngle = 80; this->state.lastPrim->state.slots[2].alphaT = kind; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 360; if (kind == 2) { this->state.lastPrim->state.slots[3].maxHeight = 22.0f; } else if (kind == 22) { this->state.lastPrim->state.slots[3].maxHeight = 12.0f; } else { this->state.lastPrim->state.slots[3].maxHeight = 17.0f; } this->state.lastPrim->state.slots[3].rotStart = 90; this->state.lastPrim->state.slots[3].alphaB = baseAlpha; this->state.lastPrim->state.slots[3].distance = 4.1f; this->state.lastPrim->state.slots[3].riseAngle = 80; this->state.lastPrim->state.slots[3].alphaT = kind; this->state.lastPrim->state.slots[3].vecBNow.y = 0.0f; int delay = 0; for (int index = 0; index < 4; ++index) { for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[index].height[height] = 0.0f; this->state.lastPrim->state.slots[index].flag1[height] = 0; } if (this->state.duration <= 60) { this->state.lastPrim->state.slots[index].alphaB = 0; this->state.lastPrim->state.slots[index].process = delay; } delay -= 5; } } // OFFSET: 0x00C43B90 // FUNCTION: fn_20142 void CRagEffect::TexturedFireWall(const char* name, int unused) { if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\EF_FireWall.wav"); const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; this->state.lastPrim = CreateEffectParticle(*this, this->render, 118, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 13.0f; this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 315; this->state.lastPrim->state.slots[0].maxHeight = 25.0f; this->state.lastPrim->state.slots[0].rotStart = 0; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 2.4f; this->state.lastPrim->state.slots[0].riseAngle = 70; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[0].height[height] = 0.0f; this->state.lastPrim->state.slots[0].flag1[height] = 0; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 315; this->state.lastPrim->state.slots[1].maxHeight = 22.0f; this->state.lastPrim->state.slots[1].rotStart = 90; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 2.7f; this->state.lastPrim->state.slots[1].riseAngle = 57; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[1].height[height] = 0.0f; this->state.lastPrim->state.slots[1].flag1[height] = 0; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 315; this->state.lastPrim->state.slots[2].maxHeight = 19.0f; this->state.lastPrim->state.slots[2].rotStart = 180; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 3.0f; this->state.lastPrim->state.slots[2].riseAngle = 45; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[2].height[height] = 0.0f; this->state.lastPrim->state.slots[2].flag1[height] = 0; } this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 360; this->state.lastPrim->state.slots[3].maxHeight = 30.0f; this->state.lastPrim->state.slots[3].rotStart = 0; this->state.lastPrim->state.slots[3].alphaB = 0; this->state.lastPrim->state.slots[3].distance = 2.2f; this->state.lastPrim->state.slots[3].riseAngle = 90; this->state.lastPrim->state.slots[3].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[3].height[height] = 0.0f; this->state.lastPrim->state.slots[3].flag1[height] = 0; } } // OFFSET: 0x00C50220 // FUNCTION: fn_20184 void CRagEffect::TeleportSpiral(const char* name) { const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; if (this->state.stateCnt != 0) { return; } PlayEffectWave(*this, "effect\\EF_Teleportation.wav"); this->state.lastPrim = CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 4.0f; this->state.lastPrim->state.slots[3].life = 1; this->state.lastPrim->state.slots[3].process = 0; this->state.lastPrim->state.slots[3].fullDisplayAngle = 360; this->state.lastPrim->state.slots[3].maxHeight = 20.0f; this->state.lastPrim->state.slots[3].rotStart = 0; this->state.lastPrim->state.slots[3].alphaB = 0; this->state.lastPrim->state.slots[3].distance = 2.4f; this->state.lastPrim->state.slots[3].riseAngle = 84; this->state.lastPrim->state.slots[3].alphaT = 60; this->state.lastPrim->state.slots[3].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[3].height[height] = 0.0f; this->state.lastPrim->state.slots[3].flag1[height] = 0; } this->state.lastPrim->state.slots[2].life = 1; this->state.lastPrim->state.slots[2].process = 0; this->state.lastPrim->state.slots[2].fullDisplayAngle = 360; this->state.lastPrim->state.slots[2].maxHeight = 45.0f; this->state.lastPrim->state.slots[2].rotStart = 90; this->state.lastPrim->state.slots[2].alphaB = 0; this->state.lastPrim->state.slots[2].distance = 2.2f; this->state.lastPrim->state.slots[2].riseAngle = 86; this->state.lastPrim->state.slots[2].alphaT = 60; this->state.lastPrim->state.slots[2].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[2].height[height] = 0.0f; this->state.lastPrim->state.slots[2].flag1[height] = 0; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].maxHeight = 70.0f; this->state.lastPrim->state.slots[1].rotStart = 180; this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].distance = 2.0f; this->state.lastPrim->state.slots[1].riseAngle = 88; this->state.lastPrim->state.slots[1].alphaT = 60; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[1].height[height] = 0.0f; this->state.lastPrim->state.slots[1].flag1[height] = 0; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].maxHeight = 180.0f; this->state.lastPrim->state.slots[0].rotStart = 270; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].distance = 1.8f; this->state.lastPrim->state.slots[0].riseAngle = 90; this->state.lastPrim->state.slots[0].alphaT = 58; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { this->state.lastPrim->state.slots[0].height[height] = 0.0f; this->state.lastPrim->state.slots[0].flag1[height] = 0; } } // OFFSET: 0x00C4B390 // FUNCTION: fn_20174 void CRagEffect::TexturedAura(const char* name, char kind) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt != 0) { return; } CopyVector(this->render.position, this->state.parent->render.position); this->state.lastPrim = CreateEffectParticle(*this, this->render, 82, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.lastPrim->state.size = 0.0f; for (int index = 0; index < 4; ++index) { this->state.lastPrim->state.slots[index].life = 0; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; if (kind == 1) { this->state.lastPrim->state.slots[0].distance = 8.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 30.0f; this->state.lastPrim->state.slots[0].flag1[2] = 0; this->state.lastPrim->state.slots[0].height[10] = 1.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 120; } else if (kind == 2) { this->state.lastPrim->state.slots[0].distance = 10.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 10.0f; this->state.lastPrim->state.slots[0].flag1[2] = 2; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 135; } else if (kind == 3) { this->state.lastPrim->state.slots[0].distance = 8.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 30.0f; this->state.lastPrim->state.slots[0].flag1[2] = 3; this->state.lastPrim->state.slots[0].height[10] = 2.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 155; } else if (kind == 4) { this->state.lastPrim->state.slots[0].distance = 6.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 30.0f; this->state.lastPrim->state.slots[0].flag1[2] = 0; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 135; } else if (kind == 10 || kind == 11) { this->state.lastPrim->state.slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 0.7f : 70.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y; this->state.lastPrim->state.slots[0].flag1[2] = 10; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); } else if (kind == 12) { this->state.lastPrim->state.slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 1.2f : 120.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y; this->state.lastPrim->state.slots[0].flag1[2] = 12; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); } else if (kind == 13) { this->state.lastPrim->state.slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 3.0f : 300.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y; this->state.lastPrim->state.slots[0].flag1[2] = 12; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); } else if (kind == 14) { this->state.lastPrim->state.slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] : 30.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y; this->state.lastPrim->state.slots[0].flag1[2] = 4; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); } else if (kind == 15) { this->state.lastPrim->state.slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] : 30.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y; this->state.lastPrim->state.slots[0].flag1[2] = 15; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); } else if (kind == 16 || kind == 17) { this->state.lastPrim->state.slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 0.9f : 9.5f; if (kind == 17) { this->state.lastPrim->state.slots[0].distance *= 0.85f; } this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y; this->state.lastPrim->state.slots[0].flag1[2] = 5; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); } else if (kind == 18) { this->state.lastPrim->state.slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 0.9f : 9.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y; this->state.lastPrim->state.slots[0].flag1[2] = 5; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); } else if (kind == 19) { this->state.lastPrim->state.slots[0].distance = 8.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 30.0f; this->state.lastPrim->state.slots[0].flag1[2] = 15; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); } else if (kind == 20) { this->state.lastPrim->state.slots[0].distance = 2.4f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 27.0f; this->state.lastPrim->state.slots[0].flag1[2] = 0; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 135; } else if (kind == 21) { this->state.lastPrim->state.slots[0].distance = 24.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 10.0f; this->state.lastPrim->state.slots[0].flag1[2] = 4; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 90; } else if (kind == 22) { this->state.lastPrim->state.slots[0].distance = 4.0f; float lift = -30.0f; if (this->state.parent != nullptr) { CActRes* action = this->state.parent->GetActRes(); if (action != nullptr) { const SpriteFrameCell& cell = action->Frame(0, 0).Cell(0); const float height = static_cast(cell.y) * 0.29f; lift = height == 0.0f ? -30.0f : height - 4.0f; } } this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y + lift; this->state.lastPrim->state.slots[0].flag1[2] = 16; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 135; } else if (kind == 30) { this->state.lastPrim->state.slots[0].distance = 24.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 30.0f; this->state.lastPrim->state.slots[0].flag1[2] = 19; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 135; } else if (kind == 31) { this->state.lastPrim->state.slots[0].distance = 2.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 30.0f; this->state.lastPrim->state.slots[0].flag1[2] = 0; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 135; } else if (kind == 32) { this->state.lastPrim->state.slots[0].distance = 8.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 30.0f; this->state.lastPrim->state.slots[0].flag1[2] = kind; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = static_cast(ClampedRandom(360)); } else { this->state.lastPrim->state.slots[0].distance = 5.0f; this->state.lastPrim->state.slots[0].vecBPre.y = this->render.position.y - 10.0f; this->state.lastPrim->state.slots[0].flag1[2] = 2; this->state.lastPrim->state.slots[0].height[10] = 0.0f; this->state.lastPrim->state.slots[0].fullDisplayAngle = 135; } this->state.lastPrim->state.slots[0].height[8] = 0.0f; this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].vecBNow.x = this->render.position.x; this->state.lastPrim->state.slots[0].vecBNow.z = this->render.position.z; this->state.lastPrim->state.slots[0].rotStart = static_cast(ClampedRandom(360)); this->state.lastPrim->state.slots[0].flag1[0] = 0; this->state.lastPrim->state.slots[0].flag1[4] = static_cast(kind == 4 ? 1 : kind); this->state.lastPrim->state.slots[0].height[15] = this->render.position.y - this->state.lastPrim->state.slots[0].vecBPre.y; } // OFFSET: 0x00C55470 // FUNCTION: fn_20203 void CRagEffect::HealRingSparkle(const char* name, char type) { this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->renderFlag = 5; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); this->state.currentPrimitive->size = type == 2 ? 4.0f : 9.0f; this->state.currentPrimitive->slots[0].life = 1; this->state.currentPrimitive->slots[0].process = 0; this->state.currentPrimitive->slots[0].fullDisplayAngle = 360; this->state.currentPrimitive->slots[0].maxHeight = 60.0f; this->state.currentPrimitive->slots[0].rotStart = 0; this->state.currentPrimitive->slots[0].alphaB = 0; this->state.currentPrimitive->slots[0].distance = 4.6f; this->state.currentPrimitive->slots[0].riseAngle = 90; this->state.currentPrimitive->slots[0].vecBNow.y = 0.0f; this->state.currentPrimitive->slots[0].alphaT = type != 0 ? 40 : 60; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[0].height[i] = 0.0f; this->state.currentPrimitive->slots[0].flag1[i] = 0; } this->state.currentPrimitive->slots[1].life = 1; this->state.currentPrimitive->slots[1].process = 0; this->state.currentPrimitive->slots[1].fullDisplayAngle = 360; this->state.currentPrimitive->slots[1].maxHeight = 60.0f; this->state.currentPrimitive->slots[1].rotStart = 180; this->state.currentPrimitive->slots[1].alphaB = 0; this->state.currentPrimitive->slots[1].distance = 5.0f; this->state.currentPrimitive->slots[1].riseAngle = 90; this->state.currentPrimitive->slots[1].vecBNow.y = 0.0f; this->state.currentPrimitive->slots[1].alphaT = type != 0 ? 40 : 60; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[1].height[i] = 0.0f; this->state.currentPrimitive->slots[1].flag1[i] = 0; } this->state.currentPrimitive->slots[2].life = 1; this->state.currentPrimitive->slots[2].process = 0; this->state.currentPrimitive->slots[2].fullDisplayAngle = 360; this->state.currentPrimitive->slots[2].maxHeight = type != 0 ? 18.0f : 12.0f; this->state.currentPrimitive->slots[2].rotStart = static_cast(std::max(rand() % 360, 0)); this->state.currentPrimitive->slots[2].alphaB = 0; this->state.currentPrimitive->slots[2].distance = 5.0f; this->state.currentPrimitive->slots[2].riseAngle = 50; this->state.currentPrimitive->slots[2].vecBNow.y = 0.0f; this->state.currentPrimitive->slots[2].alphaT = type != 0 ? 40 : 60; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[2].height[i] = 0.0f; this->state.currentPrimitive->slots[2].flag1[i] = 0; } this->state.currentPrimitive->slots[3].life = 1; this->state.currentPrimitive->slots[3].process = 0; this->state.currentPrimitive->slots[3].fullDisplayAngle = 360; this->state.currentPrimitive->slots[3].maxHeight = type == 0 ? 12.0f : 18.0f; this->state.currentPrimitive->slots[3].rotStart = static_cast(std::max(rand() % 360, 0)); this->state.currentPrimitive->slots[3].alphaB = 0; this->state.currentPrimitive->slots[3].distance = 5.2f; this->state.currentPrimitive->slots[3].riseAngle = 48; this->state.currentPrimitive->slots[3].vecBNow.y = 0.0f; this->state.currentPrimitive->slots[3].alphaT = type != 0 ? 40 : 60; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[3].height[i] = 0.0f; this->state.currentPrimitive->slots[3].flag1[i] = 0; } if (type < 2) { PlayEffectWave(*this, "_heal_effect.wav"); } } else if (this->state.stateCnt <= 50 && this->state.stateCnt % 6 == 0 && type < 2) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->renderFlag = 5; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->totalTexture = 2; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\pok3.tga", 0, false, true, false); this->state.currentPrimitive->size = 0.0f; Owner(this->state.currentPrimitive).render.position = this->render.position; for (int i = 0; i < 4; ++i) { this->state.currentPrimitive->slots[i].life = 1; this->state.currentPrimitive->slots[i].process = 0; this->state.currentPrimitive->slots[i].distance = static_cast(std::max(rand() % 10, 0)) * 0.1f + 2.0f; this->state.currentPrimitive->slots[i].height[8] = 0.0f; this->state.currentPrimitive->slots[i].alphaB = 0; this->state.currentPrimitive->slots[i].vecBNow.x = static_cast(std::max(rand() % 13, 0)) + this->render.position.x - 6.0f; this->state.currentPrimitive->slots[i].vecBNow.z = static_cast(std::max(rand() % 13, 0)) + this->render.position.z - 6.0f; this->state.currentPrimitive->slots[i].vecBNow.y = this->render.position.y; this->state.currentPrimitive->slots[i].rotStart = 0; this->state.currentPrimitive->slots[i].height[1] = 0.0f; if (type == 0) { this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(rand() % 40, 0)) * 0.01f + 0.4f; } else { this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(rand() % 40, 0)) * 0.01f + 0.6f; } this->state.currentPrimitive->slots[i].fullDisplayAngle = 0; this->state.currentPrimitive->slots[i].flag1[0] = 0; this->state.currentPrimitive->slots[i].flag1[1] = 1; this->state.currentPrimitive->slots[i].flag1[2] = 11; this->state.currentPrimitive->slots[i].height[7] = 0.0f; } } if (type != 1) { return; } if (this->state.stateCnt == 1) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->renderFlag = 5; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); this->state.currentPrimitive->size = 9.0f; this->state.currentPrimitive->slots[0].life = 1; this->state.currentPrimitive->slots[0].process = 0; this->state.currentPrimitive->slots[0].fullDisplayAngle = 360; this->state.currentPrimitive->slots[0].maxHeight = 90.0f; this->state.currentPrimitive->slots[0].rotStart = 0; this->state.currentPrimitive->slots[0].alphaB = 0; this->state.currentPrimitive->slots[0].distance = 4.2f; this->state.currentPrimitive->slots[0].riseAngle = 90; this->state.currentPrimitive->slots[0].alphaT = 40; this->state.currentPrimitive->slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[0].height[i] = 0.0f; this->state.currentPrimitive->slots[0].flag1[i] = 0; } this->state.currentPrimitive->slots[1].life = 1; this->state.currentPrimitive->slots[1].process = 0; this->state.currentPrimitive->slots[1].fullDisplayAngle = 360; this->state.currentPrimitive->slots[1].maxHeight = 90.0f; this->state.currentPrimitive->slots[1].rotStart = 90; this->state.currentPrimitive->slots[1].alphaB = 0; this->state.currentPrimitive->slots[1].distance = 4.3f; this->state.currentPrimitive->slots[1].riseAngle = 90; this->state.currentPrimitive->slots[1].alphaT = 40; this->state.currentPrimitive->slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[1].height[i] = 0.0f; this->state.currentPrimitive->slots[1].flag1[i] = 0; } this->state.currentPrimitive->slots[2].life = 1; this->state.currentPrimitive->slots[2].process = 0; this->state.currentPrimitive->slots[2].fullDisplayAngle = 360; this->state.currentPrimitive->slots[2].maxHeight = 10.0f; this->state.currentPrimitive->slots[2].rotStart = static_cast(std::max(rand() % 360, 0)); this->state.currentPrimitive->slots[2].alphaB = 0; this->state.currentPrimitive->slots[2].distance = 5.3f; this->state.currentPrimitive->slots[2].riseAngle = 46; this->state.currentPrimitive->slots[2].alphaT = 30; this->state.currentPrimitive->slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[2].height[i] = 0.0f; this->state.currentPrimitive->slots[2].flag1[i] = 0; } this->state.currentPrimitive->slots[3].life = 1; this->state.currentPrimitive->slots[3].process = 0; this->state.currentPrimitive->slots[3].fullDisplayAngle = 360; this->state.currentPrimitive->slots[3].maxHeight = 10.0f; this->state.currentPrimitive->slots[3].rotStart = static_cast(std::max(rand() % 360, 0)); this->state.currentPrimitive->slots[3].alphaB = 0; this->state.currentPrimitive->slots[3].distance = 5.4f; this->state.currentPrimitive->slots[3].riseAngle = 44; this->state.currentPrimitive->slots[3].alphaT = 30; this->state.currentPrimitive->slots[3].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { this->state.currentPrimitive->slots[3].height[i] = 0.0f; this->state.currentPrimitive->slots[3].flag1[i] = 0; } } if (this->state.stateCnt <= 50 && this->state.stateCnt % 9 == 2) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->renderFlag = 5; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->totalTexture = 2; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\pok3.tga", 0, false, true, false); this->state.currentPrimitive->size = 0.0f; Owner(this->state.currentPrimitive).render.position = this->render.position; for (int i = 0; i < 4; ++i) { this->state.currentPrimitive->slots[i].life = 1; this->state.currentPrimitive->slots[i].process = 0; this->state.currentPrimitive->slots[i].distance = static_cast(std::max(rand() % 10, 0)) * 0.1f + 2.4f; this->state.currentPrimitive->slots[i].height[8] = 0.0f; this->state.currentPrimitive->slots[i].alphaB = 0; this->state.currentPrimitive->slots[i].vecBNow.x = static_cast(std::max(rand() % 13, 0)) + this->render.position.x - 6.0f; this->state.currentPrimitive->slots[i].vecBNow.z = static_cast(std::max(rand() % 13, 0)) + this->render.position.z - 6.0f; this->state.currentPrimitive->slots[i].vecBNow.y = this->render.position.y; this->state.currentPrimitive->slots[i].rotStart = 0; this->state.currentPrimitive->slots[i].height[1] = 0.0f; this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(rand() % 40, 0)) * 0.01f + 0.4f; this->state.currentPrimitive->slots[i].fullDisplayAngle = 0; this->state.currentPrimitive->slots[i].flag1[0] = 0; this->state.currentPrimitive->slots[i].flag1[1] = 1; this->state.currentPrimitive->slots[i].flag1[2] = 11; this->state.currentPrimitive->slots[i].height[7] = 0.0f; } } } // OFFSET: 0x00C56940 // FUNCTION: fn_20204 void CRagEffect::HealBurst(const char* name, char flag) { this->render.position.x = this->state.parent->render.position.x; this->render.position.y = this->state.parent->render.position.y; this->render.position.z = this->state.parent->render.position.z; const int limit = flag != 0 ? 25 : 50; if (this->state.stateCnt == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load(name, 0, false, true, false); if (flag == 0) { this->state.lastPrim->state.size = 9.0f; } else if (flag == 1) { this->state.lastPrim->state.size = 5.0f; } this->state.lastPrim->state.slots[0].life = 1; this->state.lastPrim->state.slots[0].process = 0; this->state.lastPrim->state.slots[0].fullDisplayAngle = 360; this->state.lastPrim->state.slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); this->state.lastPrim->state.slots[0].alphaB = 0; this->state.lastPrim->state.slots[0].riseAngle = 90; this->state.lastPrim->state.slots[0].vecBNow.y = 0.0f; if (flag == 0) { this->state.lastPrim->state.slots[0].alphaT = 60; this->state.lastPrim->state.slots[0].maxHeight = 40.0f; this->state.lastPrim->state.slots[0].distance = 4.6f; } else if (flag == 1) { this->state.lastPrim->state.slots[0].alphaT = 30; this->state.lastPrim->state.slots[0].maxHeight = static_cast(std::max(rand() % 20, 0)) + 40.0f; this->state.lastPrim->state.slots[0].distance = 4.5f; this->state.lastPrim->state.slots[0].distance += static_cast(std::max(rand() % 100, 0)) * 0.005f; } for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[0].height[i] = 0.0f; this->state.lastPrim->state.slots[0].flag1[i] = 0; } this->state.lastPrim->state.slots[1].life = 1; this->state.lastPrim->state.slots[1].process = 0; this->state.lastPrim->state.slots[1].fullDisplayAngle = 360; this->state.lastPrim->state.slots[1].rotStart = static_cast(std::max(rand() % 360, 0)); this->state.lastPrim->state.slots[1].alphaB = 0; this->state.lastPrim->state.slots[1].riseAngle = 90; this->state.lastPrim->state.slots[1].vecBNow.y = 0.0f; if (flag == 0) { this->state.lastPrim->state.slots[1].alphaT = 60; this->state.lastPrim->state.slots[1].maxHeight = 40.0f; this->state.lastPrim->state.slots[1].distance = 4.8f; } else if (flag == 1) { this->state.lastPrim->state.slots[1].alphaT = 30; this->state.lastPrim->state.slots[1].maxHeight = this->state.lastPrim->state.slots[0].maxHeight; this->state.lastPrim->state.slots[1].distance = this->state.lastPrim->state.slots[0].distance + 0.2f; } for (int i = 0; i < 21; ++i) { this->state.lastPrim->state.slots[1].height[i] = 0.0f; this->state.lastPrim->state.slots[1].flag1[i] = 0; } this->state.lastPrim->state.slots[2].life = 0; this->state.lastPrim->state.slots[3].life = 0; PlayEffectWave(*this, "_heal_effect.wav"); return; } if (this->state.stateCnt > limit) { return; } if (this->state.stateCnt % 6 != 0) { return; } if (flag == 0) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->render.position = this->render.position; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].distance = static_cast(std::max(rand() % 10, 0)) * 0.1f + 2.0f; this->state.lastPrim->state.slots[i].height[8] = 0.0f; this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(std::max(rand() % 13, 0)) + this->render.position.x - 6.0f; this->state.lastPrim->state.slots[i].vecBNow.z = static_cast(std::max(rand() % 13, 0)) + this->render.position.z - 6.0f; this->state.lastPrim->state.slots[i].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[i].rotStart = 0; this->state.lastPrim->state.slots[i].height[1] = 0.0f; this->state.lastPrim->state.slots[i].height[2] = static_cast(std::max(rand() % 40, 0)) * 0.01f + 0.3f; this->state.lastPrim->state.slots[i].fullDisplayAngle = 0; this->state.lastPrim->state.slots[i].flag1[0] = 0; this->state.lastPrim->state.slots[i].flag1[1] = 0; this->state.lastPrim->state.slots[i].flag1[2] = 11; this->state.lastPrim->state.slots[i].height[7] = 0.0f; } return; } if (flag == 1) { this->state.lastPrim = CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.totalTexture = 2; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); this->state.lastPrim->state.textures[1] = g_texMgr.Load("effect\\pok3.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; this->state.lastPrim->render.position = this->render.position; for (int i = 0; i < 4; ++i) { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].process = 0; this->state.lastPrim->state.slots[i].distance = static_cast(std::max(rand() % 10, 0)) * 0.1f + 2.0f; this->state.lastPrim->state.slots[i].height[8] = 0.0f; this->state.lastPrim->state.slots[i].alphaB = 0; this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(std::max(rand() % 13, 0)) + this->render.position.x - 6.0f; this->state.lastPrim->state.slots[i].vecBNow.z = static_cast(std::max(rand() % 13, 0)) + this->render.position.z - 6.0f; this->state.lastPrim->state.slots[i].vecBNow.y = this->render.position.y; this->state.lastPrim->state.slots[i].rotStart = 0; this->state.lastPrim->state.slots[i].height[1] = 0.0f; this->state.lastPrim->state.slots[i].height[2] = static_cast(std::max(rand() % 40, 0)) * 0.01f + 0.4f; this->state.lastPrim->state.slots[i].fullDisplayAngle = 0; this->state.lastPrim->state.slots[i].flag1[0] = 0; this->state.lastPrim->state.slots[i].flag1[1] = 1; this->state.lastPrim->state.slots[i].flag1[2] = 11; this->state.lastPrim->state.slots[i].height[7] = 0.0f; } } } // OFFSET: 0x00C5A760 // FUNCTION: fn_20219 void CRagEffect::FreezingCircle(char kind) { this->render.position.x = this->state.parent->render.position.x; this->render.position.y = this->state.parent->render.position.y; this->render.position.z = this->state.parent->render.position.z; if (this->state.stateCnt == 99999998) { this->state.stateCnt = 0; this->state.duration = 99999999; } else if (this->state.stateCnt != 0) { return; } this->state.lastPrim = CreateEffectParticle(*this, this->render, 29, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0; this->state.lastPrim->state.renderFlag |= 1; this->state.lastPrim->state.renderFlag |= 5; this->state.lastPrim->state.duration = this->state.duration; this->state.lastPrim->state.textures = new CTexture*[this->state.lastPrim->state.totalTexture]; if (kind == 3) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\ghost.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; } else if (kind > 0) { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\whitelight.tga", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; if (kind == 2) { this->state.lastPrim->state.size = 7.0f; } } else { this->state.lastPrim->state.textures[0] = g_texMgr.Load("effect\\freezing_circle.bmp", 0, false, true, false); this->state.lastPrim->state.size = 0.0f; } for (int i = 0; i < 4; ++i) { if (kind == 3) { if (i < 1) { this->state.lastPrim->state.slots[i].life = 1; } else { this->state.lastPrim->state.slots[i].life = 0; } this->state.lastPrim->state.slots[i].maxHeight = 0.15f; this->state.lastPrim->state.slots[i].distance = 3.2f; this->state.lastPrim->state.slots[i].maxHeight = 0.6f; this->state.lastPrim->state.slots[i].vecBPre.x = static_cast(std::max(0, rand() % 15) - 8); this->state.lastPrim->state.slots[i].vecBPre.z = static_cast(std::max(0, rand() % 15) - 8); } else if (kind == 7 || kind == 8) { if (i < 2) { this->state.lastPrim->state.slots[i].life = 1; } else { this->state.lastPrim->state.slots[i].life = 0; } this->state.lastPrim->state.slots[i].maxHeight = 0.15f; if (kind == 7) { this->state.lastPrim->state.slots[i].distance = 0.8f; } else { this->state.lastPrim->state.slots[i].distance = 2.4f; } this->state.lastPrim->state.slots[i].vecBPre.x = 0.0f; this->state.lastPrim->state.slots[i].vecBPre.z = 0.0f; } else { this->state.lastPrim->state.slots[i].life = 1; this->state.lastPrim->state.slots[i].maxHeight = 0.15f; if (kind == 6) { this->state.lastPrim->state.slots[i].distance = 2.4f; this->state.lastPrim->state.slots[i].vecBPre.x = static_cast(std::max(0, rand() % 35) - 17); this->state.lastPrim->state.slots[i].vecBPre.z = 0.0f; } else if (kind == 1 || kind == 4 || kind == 5 || kind >= 8) { this->state.lastPrim->state.slots[i].distance = 2.4f; this->state.lastPrim->state.slots[i].vecBPre.x = 0.0f; this->state.lastPrim->state.slots[i].vecBPre.z = 0.0f; } else { this->state.lastPrim->state.slots[i].distance = 0.8f; this->state.lastPrim->state.slots[i].vecBPre.x = 0.0f; this->state.lastPrim->state.slots[i].vecBPre.z = 0.0f; } } this->state.lastPrim->state.slots[i].vecBPre.y = static_cast(std::max(0, rand() % 100)); this->state.lastPrim->state.slots[i].height[0] = static_cast(std::max(0, rand() % 360)); this->state.lastPrim->state.slots[i].height[1] = static_cast(std::max(0, rand() % 360)); this->state.lastPrim->state.slots[i].height[2] = static_cast(std::max(0, rand() % 360)); this->state.lastPrim->state.slots[i].height[3] = static_cast(std::max(0, rand() % 360)); if (kind == 3) { this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(std::max(0, rand() % 15) - 8); this->state.lastPrim->state.slots[i].vecBNow.z = static_cast(std::max(0, rand() % 15) - 8); } else if (kind == 6) { this->state.lastPrim->state.slots[i].vecBNow.x = static_cast(std::max(0, rand() % 35) - 17); this->state.lastPrim->state.slots[i].vecBNow.z = 0.0f; } else { this->state.lastPrim->state.slots[i].vecBNow.x = 0.0f; this->state.lastPrim->state.slots[i].vecBNow.z = 0.0f; } this->state.lastPrim->state.slots[i].vecBNow.y = static_cast(std::max(0, rand() % 100)); this->state.lastPrim->state.slots[i].height[4] = static_cast(std::max(0, rand() % 360)); this->state.lastPrim->state.slots[i].height[5] = static_cast(std::max(0, rand() % 360)); this->state.lastPrim->state.slots[i].height[6] = static_cast(std::max(0, rand() % 360)); this->state.lastPrim->state.slots[i].height[7] = static_cast(std::max(0, rand() % 360)); if (kind == 3) { this->state.lastPrim->state.slots[i].vecTPre.x = static_cast(std::max(0, rand() % 15) - 8); this->state.lastPrim->state.slots[i].vecTPre.z = static_cast(std::max(0, rand() % 15) - 8); } else if (kind == 6) { this->state.lastPrim->state.slots[i].vecTPre.x = static_cast(std::max(0, rand() % 35) - 17); this->state.lastPrim->state.slots[i].vecTPre.z = 0.0f; } else { this->state.lastPrim->state.slots[i].vecTPre.x = 0.0f; this->state.lastPrim->state.slots[i].vecTPre.z = 0.0f; } this->state.lastPrim->state.slots[i].vecTPre.y = static_cast(std::max(0, rand() % 100)); this->state.lastPrim->state.slots[i].height[8] = static_cast(std::max(0, rand() % 360)); this->state.lastPrim->state.slots[i].height[9] = static_cast(std::max(0, rand() % 360)); this->state.lastPrim->state.slots[i].height[10] = static_cast(std::max(0, rand() % 360)); this->state.lastPrim->state.slots[i].height[11] = static_cast(std::max(0, rand() % 360)); if (kind == 3) { this->state.lastPrim->state.slots[i].vecTNow.x = static_cast(std::max(0, rand() % 15) - 8); this->state.lastPrim->state.slots[i].vecTNow.z = static_cast(std::max(0, rand() % 15) - 8); } else if (kind == 6) { this->state.lastPrim->state.slots[i].vecTNow.x = static_cast(std::max(0, rand() % 35) - 17); this->state.lastPrim->state.slots[i].vecTNow.z = 0.0f; } else { this->state.lastPrim->state.slots[i].vecTNow.x = 0.0f; this->state.lastPrim->state.slots[i].vecTNow.z = 0.0f; } this->state.lastPrim->state.slots[i].vecTNow.y = static_cast(std::max(0, rand() % 100)); this->state.lastPrim->state.slots[i].height[12] = static_cast(std::max(0, rand() % 360)); this->state.lastPrim->state.slots[i].height[13] = static_cast(std::max(0, rand() % 360)); this->state.lastPrim->state.slots[i].height[14] = static_cast(std::max(0, rand() % 360)); this->state.lastPrim->state.slots[i].height[15] = static_cast(std::max(0, rand() % 360)); if (kind == 4) { this->state.lastPrim->state.slots[i].vecBPre.y = -40.0f; this->state.lastPrim->state.slots[i].vecBNow.y = -50.0f; this->state.lastPrim->state.slots[i].vecTPre.y = -60.0f; this->state.lastPrim->state.slots[i].vecTNow.y = -70.0f; this->state.lastPrim->state.slots[i].flag1[0] = 14; } else if (kind == 6) { this->state.lastPrim->state.slots[i].vecBPre.y = static_cast(-40 - std::max(0, rand() % 40)); this->state.lastPrim->state.slots[i].vecBNow.y = static_cast(-40 - std::max(0, rand() % 40)); this->state.lastPrim->state.slots[i].vecTPre.y = static_cast(-40 - std::max(0, rand() % 40)); this->state.lastPrim->state.slots[i].vecTNow.y = static_cast(-40 - std::max(0, rand() % 40)); this->state.lastPrim->state.slots[i].flag1[0] = 16; } else { if (kind == 5 || kind == 7) { this->state.lastPrim->state.slots[i].vecBPre.y = 0.0f; this->state.lastPrim->state.slots[i].vecBNow.y = 0.0f; this->state.lastPrim->state.slots[i].vecTPre.y = 0.0f; this->state.lastPrim->state.slots[i].vecTNow.y = 0.0f; } if (kind == 1) { this->state.lastPrim->state.slots[i].flag1[0] = kind; } else if (kind == 3) { this->state.lastPrim->state.slots[i].flag1[0] = 11; } else if (kind == 5 || kind == 7 || kind == 8) { this->state.lastPrim->state.slots[i].flag1[0] = 15; this->state.lastPrim->state.slots[i].flag1[1] = 0; this->state.lastPrim->state.slots[i].flag1[2] = 0; this->state.lastPrim->state.slots[i].flag1[3] = 0; this->state.lastPrim->state.slots[i].flag1[4] = 0; this->state.lastPrim->state.slots[i].flag1[5] = kind; } else { this->state.lastPrim->state.slots[i].flag1[0] = 0; } } } } // OFFSET: 0x00C4BB00 // FUNCTION: fn_20175 void CRagEffect::TorchDust(char kind) { auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; this->render.position = this->state.parent->render.position; if (this->state.stateCnt != 0) { return; } this->render.position = this->state.parent->render.position; this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 128, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; if (kind == 0) { stored()->state.totalTexture = 9; AllocateTextures(stored()->state); stored()->state.textures[0] = g_texMgr.Load("effect\\dust01.bmp", 0, false, true, false); stored()->state.textures[1] = g_texMgr.Load("effect\\dust02.bmp", 0, false, true, false); stored()->state.textures[2] = g_texMgr.Load("effect\\dust03.bmp", 0, false, true, false); stored()->state.textures[3] = g_texMgr.Load("effect\\dust04.bmp", 0, false, true, false); stored()->state.textures[4] = g_texMgr.Load("effect\\dust05.bmp", 0, false, true, false); stored()->state.textures[5] = g_texMgr.Load("effect\\dust06.bmp", 0, false, true, false); stored()->state.textures[6] = g_texMgr.Load("effect\\dust07.bmp", 0, false, true, false); stored()->state.textures[7] = g_texMgr.Load("effect\\dust08.bmp", 0, false, true, false); stored()->state.textures[8] = g_texMgr.Load("effect\\dust09.bmp", 0, false, true, false); } else if (kind == 2) { stored()->state.totalTexture = 13; AllocateTextures(stored()->state); stored()->state.textures[0] = g_texMgr.Load("effect\\torch_green01.bmp", 0, false, true, false); stored()->state.textures[1] = g_texMgr.Load("effect\\torch_green02.bmp", 0, false, true, false); stored()->state.textures[2] = g_texMgr.Load("effect\\torch_green03.bmp", 0, false, true, false); stored()->state.textures[3] = g_texMgr.Load("effect\\torch_green04.bmp", 0, false, true, false); stored()->state.textures[4] = g_texMgr.Load("effect\\torch_green05.bmp", 0, false, true, false); stored()->state.textures[5] = g_texMgr.Load("effect\\torch_green06.bmp", 0, false, true, false); stored()->state.textures[6] = g_texMgr.Load("effect\\torch_green07.bmp", 0, false, true, false); stored()->state.textures[7] = g_texMgr.Load("effect\\torch_green08.bmp", 0, false, true, false); stored()->state.textures[8] = g_texMgr.Load("effect\\torch_green09.bmp", 0, false, true, false); stored()->state.textures[9] = g_texMgr.Load("effect\\torch_green10.bmp", 0, false, true, false); stored()->state.textures[10] = g_texMgr.Load("effect\\torch_green11.bmp", 0, false, true, false); stored()->state.textures[11] = g_texMgr.Load("effect\\torch_green12.bmp", 0, false, true, false); stored()->state.textures[12] = g_texMgr.Load("effect\\torch_green13.bmp", 0, false, true, false); } else if (kind == 1) { stored()->state.totalTexture = 13; AllocateTextures(stored()->state); stored()->state.textures[0] = g_texMgr.Load("effect\\torch_red01.bmp", 0, false, true, false); stored()->state.textures[1] = g_texMgr.Load("effect\\torch_red02.bmp", 0, false, true, false); stored()->state.textures[2] = g_texMgr.Load("effect\\torch_red03.bmp", 0, false, true, false); stored()->state.textures[3] = g_texMgr.Load("effect\\torch_red04.bmp", 0, false, true, false); stored()->state.textures[4] = g_texMgr.Load("effect\\torch_red05.bmp", 0, false, true, false); stored()->state.textures[5] = g_texMgr.Load("effect\\torch_red06.bmp", 0, false, true, false); stored()->state.textures[6] = g_texMgr.Load("effect\\torch_red07.bmp", 0, false, true, false); stored()->state.textures[7] = g_texMgr.Load("effect\\torch_red08.bmp", 0, false, true, false); stored()->state.textures[8] = g_texMgr.Load("effect\\torch_red09.bmp", 0, false, true, false); stored()->state.textures[9] = g_texMgr.Load("effect\\torch_red10.bmp", 0, false, true, false); stored()->state.textures[10] = g_texMgr.Load("effect\\torch_red11.bmp", 0, false, true, false); stored()->state.textures[11] = g_texMgr.Load("effect\\torch_red12.bmp", 0, false, true, false); stored()->state.textures[12] = g_texMgr.Load("effect\\torch_red13.bmp", 0, false, true, false); } else if (kind == 3) { stored()->state.totalTexture = 13; AllocateTextures(stored()->state); stored()->state.textures[0] = g_texMgr.Load("effect\\torch_violet01.bmp", 0, false, true, false); stored()->state.textures[1] = g_texMgr.Load("effect\\torch_violet02.bmp", 0, false, true, false); stored()->state.textures[2] = g_texMgr.Load("effect\\torch_violet03.bmp", 0, false, true, false); stored()->state.textures[3] = g_texMgr.Load("effect\\torch_violet04.bmp", 0, false, true, false); stored()->state.textures[4] = g_texMgr.Load("effect\\torch_violet05.bmp", 0, false, true, false); stored()->state.textures[5] = g_texMgr.Load("effect\\torch_violet06.bmp", 0, false, true, false); stored()->state.textures[6] = g_texMgr.Load("effect\\torch_violet07.bmp", 0, false, true, false); stored()->state.textures[7] = g_texMgr.Load("effect\\torch_violet08.bmp", 0, false, true, false); stored()->state.textures[8] = g_texMgr.Load("effect\\torch_violet09.bmp", 0, false, true, false); stored()->state.textures[9] = g_texMgr.Load("effect\\torch_violet10.bmp", 0, false, true, false); stored()->state.textures[10] = g_texMgr.Load("effect\\torch_violet11.bmp", 0, false, true, false); stored()->state.textures[11] = g_texMgr.Load("effect\\torch_violet12.bmp", 0, false, true, false); stored()->state.textures[12] = g_texMgr.Load("effect\\torch_violet13.bmp", 0, false, true, false); } else if (kind == 4) { stored()->state.totalTexture = 11; AllocateTextures(stored()->state); stored()->state.textures[0] = g_texMgr.Load("effect\\lord_stick_a.bmp", 0, false, true, false); stored()->state.textures[1] = g_texMgr.Load("effect\\lord_stick_b.bmp", 0, false, true, false); stored()->state.textures[2] = g_texMgr.Load("effect\\lord_stick_c.bmp", 0, false, true, false); stored()->state.textures[3] = g_texMgr.Load("effect\\lord_stick_e.bmp", 0, false, true, false); stored()->state.textures[4] = g_texMgr.Load("effect\\lord_stick_f.bmp", 0, false, true, false); stored()->state.textures[5] = g_texMgr.Load("effect\\lord_stick_g.bmp", 0, false, true, false); stored()->state.textures[6] = g_texMgr.Load("effect\\lord_stick_h.bmp", 0, false, true, false); stored()->state.textures[7] = g_texMgr.Load("effect\\lord_stick_plazma_a.bmp", 0, false, true, false); stored()->state.textures[8] = g_texMgr.Load("effect\\lord_stick_plazma_b.bmp", 0, false, true, false); stored()->state.textures[9] = g_texMgr.Load("effect\\lord_stick_plazma_c.bmp", 0, false, true, false); stored()->state.textures[10] = g_texMgr.Load("effect\\lord_blast_stick_a.bmp", 0, false, true, false); } stored()->state.size = 0.0f; stored()->state.slots[0].life = 0; stored()->state.slots[1].life = 0; stored()->state.slots[2].life = 0; stored()->state.slots[3].life = 0; stored()->state.slots[0].process = 0; stored()->state.slots[0].life = 1; stored()->state.slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] : 20.0f; stored()->state.slots[0].vecBPre.y = this->render.position.y - 10.0f; stored()->state.slots[0].flag1[2] = 4; if (kind == 4) { stored()->state.slots[0].fullDisplayAngle = 120; stored()->state.slots[0].height[10] = 1.0f; stored()->state.slots[0].height[8] = 0.0f; stored()->state.slots[0].alphaB = 130; } else { stored()->state.slots[0].fullDisplayAngle = 135; stored()->state.slots[0].height[10] = 0.0f; stored()->state.slots[0].height[8] = 0.0f; stored()->state.slots[0].alphaB = kind == 0 ? 100 : 130; } stored()->state.slots[0].vecBNow.x = this->render.position.x; stored()->state.slots[0].vecBNow.z = this->render.position.z; stored()->state.slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); stored()->state.slots[0].flag1[0] = 0; stored()->state.slots[0].flag1[4] = kind; } // OFFSET: 0x00C41420 // FUNCTION: fn_20135 void CRagEffect::WhiteYellowRings() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 22); this->TexturedQuadRingSized(25, "effect\\ring_yellow.tga", 22); } } // OFFSET: 0x00C44B70 // FUNCTION: fn_20145 void CRagEffect::BlueSpellRings() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( "effect\\EF_BeginSpell.wav", this->render.position.x - player->render.position.x, -100.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); this->TexturedQuadRingSized(45, "effect\\ring_blue.tga", 5); this->TexturedQuadRingSized(25, "effect\\ring_blue.tga", 5); } } // OFFSET: 0x00C73B40 // FUNCTION: fn_20329 void CRagEffect::WhiteSpellRings() { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( "effect\\EF_BeginSpell.wav", this->render.position.x - player->render.position.x, -100.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 15); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 15); } } // OFFSET: 0x00C4A5A0 // FUNCTION: fn_20169 void CRagEffect::TexturedSpellRings(const char* name) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, name, 3); this->TexturedQuadRingSized(25, name, 3); } } // OFFSET: 0x00C4ACC0 // FUNCTION: fn_20171 void CRagEffect::BlackSpellRings(char silent) { CopyVector(this->render.position, this->state.parent->render.position); if (this->state.stateCnt == 0) { if (silent == 0) { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( "effect\\EF_BeginSpell.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } this->TexturedQuadRingSized(45, "effect\\ring_black.tga", 6); this->TexturedQuadRingSized(25, "effect\\ring_black.tga", 6); } } // OFFSET: 0x00C4C730 // FUNCTION: fn_20176 void CRagEffect::TexturedClassChange(char kind) { this->render.position = this->state.parent->render.position; const int stage = kind == 30 ? 30 : 0; if (this->state.stateCnt == 0x5F5E0FE) { this->state.stateCnt = 0; } if (this->state.stateCnt != stage) { return; } this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->deltaPos2.y = 0.0f; this->state.currentPrimitive->renderFlag |= 0x200u; this->state.currentPrimitive->pattern |= 0x200u; this->state.currentPrimitive->animSpeed = 2; this->state.currentPrimitive->repeatAnim = 0; this->state.currentPrimitive->alphaSpeed = 0.0f; switch (kind) { case 0: Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\캐슬링.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\캐슬링.act"); break; case 1: PlayEffectWave(*this, "effect\\h_blood_lust.wav"); Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\블러드러스트.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\블러드러스트.act"); break; case 2: Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_thunder.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\item_thunder.act"); break; case 3: Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_cloud.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\item_cloud.act"); break; case 4: Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_curse.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\item_curse.act"); break; case 5: Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_zzz.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\item_zzz.act"); break; case 6: Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_rain.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\item_rain.act"); break; case 7: PlayEffectWave(*this, "effect\\ef_firehit.wav"); this->state.currentPrimitive->animSpeed = 3; this->state.currentPrimitive->pattern = 0; this->state.currentPrimitive->alpha = 220.0f; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef01.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef01.act"); break; case 8: { this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef02.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef02.act"); std::int16_t angle; Get_Angle(this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], &angle); const CView* camera = static_cast(g_modeMgr.GetGameMode())->camera; std::int16_t direction = static_cast(static_cast(camera->camera.yaw) + angle) % 360; if (direction < 0) { direction += 360; } if (direction >= 180 && direction < 270) { Owner(this->state.currentPrimitive).SetAction(2, 16, 1); } else if (direction >= 90 && direction < 180) { Owner(this->state.currentPrimitive).SetAction(3, 16, 1); } else if (direction >= 0 && direction < 90) { Owner(this->state.currentPrimitive).SetAction(0, 16, 1); } else { Owner(this->state.currentPrimitive).SetAction(1, 16, 1); } break; } case 9: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef03.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef03.act"); break; case 10: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef04.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef04.act"); this->state.currentPrimitive->repeatAnim = 1; break; case 11: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef05.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef05.act"); break; case 12: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef06.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef06.act"); break; case 13: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef07.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef07.act"); break; case 14: Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\합격_.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\합격_.act"); break; case 15: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\그림자베기.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\그림자베기.act"); if (std::max(rand() % 2, 0) == 0) { Owner(this->state.currentPrimitive).SetAction(4, 16, 1); } else { Owner(this->state.currentPrimitive).SetAction(0, 16, 1); } break; case 16: this->state.currentPrimitive->deltaPos2.y = -6.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->animSpeed = 6; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\다다미.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\다다미.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 17: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\안개베기.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\안개베기.act"); if (std::max(rand() % 2, 0) == 0) { Owner(this->state.currentPrimitive).SetAction(2, 16, 1); } else { Owner(this->state.currentPrimitive).SetAction(0, 16, 1); } break; case 18: this->state.currentPrimitive->deltaPos2.y = -6.0f; this->state.currentPrimitive->animSpeed = 2; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\일섬.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\일섬.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 19: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->animSpeed = std::max(rand() % 5, 0) + 3; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\화염진.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\화염진.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 20: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\데스페라도.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\데스페라도.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 21: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\라이트닝스피어.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\라이트닝스피어.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 22: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\블라인드스피어.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\블라인드스피어.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 23: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\포이즌스피어.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\포이즌스피어.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 24: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\프리징스피어.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\프리징스피어.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 25: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\플레어스피어.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\플레어스피어.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 26: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\래피드샤워.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\래피드샤워.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 27: this->state.currentPrimitive->animSpeed = 2; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\매지컬불릿.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\매지컬불릿.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 28: { this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\스프레드.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\스프레드.act"); std::int16_t angle; Get_Angle(this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], &angle); const CView* camera = static_cast(g_modeMgr.GetGameMode())->camera; std::int16_t direction = static_cast(static_cast(camera->camera.yaw) + angle) % 360; if (direction < 0) { direction += 360; } if (direction >= 180 && direction < 270) { Owner(this->state.currentPrimitive).SetAction(4, 16, 1); } else if (direction >= 90 && direction < 180) { Owner(this->state.currentPrimitive).SetAction(6, 16, 1); } else if (direction >= 0 && direction < 90) { Owner(this->state.currentPrimitive).SetAction(0, 16, 1); } else { Owner(this->state.currentPrimitive).SetAction(2, 16, 1); } break; } case 29: this->state.currentPrimitive->animSpeed = 2; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\트래킹.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\트래킹.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 30: this->state.currentPrimitive->animSpeed = 2; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\트리플액션.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\트리플액션.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 31: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\어스퀘이크.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\어스퀘이크.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 32: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_러브.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_러브.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\itempokjuk.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 33: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_화이트데이.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_화이트데이.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\itempokjuk.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 34: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_발렌타인.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_발렌타인.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\itempokjuk.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 35: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_생일.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_생일.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\itempokjuk.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 36: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_크리스마스.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_크리스마스.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\itempokjuk.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 37: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\mobile_ef04.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\mobile_ef04.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 38: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\mashofa.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\mashofa.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\t_에너지방출.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 39: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\soule.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\soule.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\매직 크래쉬.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 50: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\기본트랩.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\기본트랩.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 51: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\담황색트랩.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\담황색트랩.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 52: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\암청색트랩.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\암청색트랩.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 53: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\자홍색트랩.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\자홍색트랩.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 54: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\청록색트랩.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\청록색트랩.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 60: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\stapo.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\stapo.act"); this->state.currentPrimitive->deltaPos2.y = -8.0f; if (rand() % 2 == 0) { Owner(this->state.currentPrimitive).SetAction(0, 16, 1); } else { Owner(this->state.currentPrimitive).SetAction(7, 16, 1); } break; case 61: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 5; this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->animSpeed = std::max(rand() % 3, 0) + 8; this->state.currentPrimitive->pattern = 0; this->state.currentPrimitive->alpha = static_cast(rand() % 71 + 70); this->state.currentPrimitive->size = static_cast(rand() % 11) * 0.04f + 0.4f; this->state.currentPrimitive->red = 85; this->state.currentPrimitive->green = 255; this->state.currentPrimitive->blue = 85; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\Ancient_tree.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\Ancient_tree.act"); Owner(this->state.currentPrimitive).SetAction(rand() % 8, 16, 1); break; case 62: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 5; this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->animSpeed = std::max(rand() % 3, 0) + 8; this->state.currentPrimitive->pattern = 0; this->state.currentPrimitive->alpha = static_cast(rand() % 71 + 70); this->state.currentPrimitive->size = static_cast(rand() % 11) * 0.04f + 0.4f; this->state.currentPrimitive->red = 85; this->state.currentPrimitive->green = 255; this->state.currentPrimitive->blue = 85; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\ifrit.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\ifrit.act"); Owner(this->state.currentPrimitive).SetAction(rand() % 8 + 0x20, 16, 1); break; case 63: this->state.currentPrimitive->deltaPos2.y = -12.0f; this->state.currentPrimitive->renderFlag = 5; this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->animSpeed = 6; this->state.currentPrimitive->pattern = 0; this->state.currentPrimitive->alpha = 255.0f; this->state.currentPrimitive->size = 0.7f; this->state.currentPrimitive->red = 155; this->state.currentPrimitive->green = 255; this->state.currentPrimitive->blue = 155; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\mavka_bullet.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\mavka_bullet.act"); Owner(this->state.currentPrimitive).SetAction(rand() % 8, 16, 1); break; case 64: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 5; this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->animSpeed = 3; this->state.currentPrimitive->pattern = 0; this->state.currentPrimitive->alpha = 205.0f; this->state.currentPrimitive->size = 2.5f; this->state.currentPrimitive->red = 155; this->state.currentPrimitive->green = 155; this->state.currentPrimitive->blue = 155; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\breeze.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\breeze.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 65: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 5; this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->animSpeed = 2; this->state.currentPrimitive->pattern = 0; this->state.currentPrimitive->alpha = 205.0f; this->state.currentPrimitive->size = 2.5f; this->state.currentPrimitive->red = 155; this->state.currentPrimitive->green = 155; this->state.currentPrimitive->blue = 155; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\breeze.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\breeze.act"); Owner(this->state.currentPrimitive).SetAction(4, 16, 1); break; case 70: this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\거스트.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\거스트.act"); break; case 71: this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\블래스트.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\블래스트.act"); break; case 72: this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\아쿠아플레이.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\아쿠아플레이.act"); break; case 73: this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\업히벌.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\업히벌.act"); break; case 74: this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\와일드스톰.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\와일드스톰.act"); break; case 75: this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\칠리에어.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\칠리에어.act"); break; case 76: this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\커즈드소일.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\커즈드소일.act"); break; case 77: this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\쿨러.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\쿨러.act"); break; case 78: this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\트로픽.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\트로픽.act"); break; case 79: this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\파이로테크닉.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\파이로테크닉.act"); break; case 80: this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\페트롤로지.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\페트롤로지.act"); break; case 81: this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\히터.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\히터.act"); break; case 82: this->state.currentPrimitive->animSpeed = 4; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\silent_brz.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\silent_brz.act"); break; case 83: this->state.currentPrimitive->animSpeed = 4; this->state.currentPrimitive->repeatAnim = 0; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\magma_flow.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\magma_flow.act"); break; case 84: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->animSpeed = 10; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\icemine.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\icemine.act"); break; case 85: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->animSpeed = 10; this->state.currentPrimitive->repeatAnim = 0; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\icemine_.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\icemine_.act"); Owner(this->state.currentPrimitive).SetAction(0, 10, 1); break; case 86: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\RK_DRAGONBREATH_WATER.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\RK_DRAGONBREATH_WATER.act"); break; case 87: this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\wideweb.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\wideweb.act"); break; case 88: this->state.currentPrimitive->animSpeed = 4; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\burnt.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\burnt.act"); break; case 90: this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->renderFlag = 1; this->state.currentPrimitive->repeatAnim = 1; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\그라운드드리프트.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\그라운드드리프트.act"); Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 91: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->animSpeed = 4; this->state.currentPrimitive->deltaPos2.y = -4.0f; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\나뭇잎_완성.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\나뭇잎_완성.act"); break; case 94: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->animSpeed = 4; this->state.currentPrimitive->deltaPos2.y = -4.0f; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Black_Thunder\\Black_Thunder.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Black_Thunder\\Black_Thunder.act"); break; case 95: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->animSpeed = 4; this->state.currentPrimitive->deltaPos2.y = -4.0f; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Black_Thunder\\Black_Thunder_Dark.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Black_Thunder\\Black_Thunder_Dark.act"); break; case 96: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->renderFlag = 0xd; this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Angel_Magic_Circle.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Angel_Magic_Circle.act"); break; case 97: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->renderFlag = 0xd; this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Animal_Magic_Circle.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Animal_Magic_Circle.act"); break; case 98: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->renderFlag = 0xd; this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Devil_Magic_Circle.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Devil_Magic_Circle.act"); break; case 99: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->renderFlag = 0xd; this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Dragon_Magic_Circle.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Dragon_Magic_Circle.act"); break; case 100: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->renderFlag = 0xd; this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Fish_Magic_Circle.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Fish_Magic_Circle.act"); break; case 101: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->renderFlag = 0xd; this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Human_Magic_Circle.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Human_Magic_Circle.act"); break; case 102: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->renderFlag = 0xd; this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Insect_Magic_Circle.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Insect_Magic_Circle.act"); break; case 103: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->renderFlag = 0xd; this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Nothing_Magic_Circle.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Nothing_Magic_Circle.act"); break; case 104: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->renderFlag = 0xd; this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Plant_Magic_Circle.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Plant_Magic_Circle.act"); break; case 105: this->state.currentPrimitive->repeatAnim = 1; this->state.currentPrimitive->renderFlag = 0xd; this->state.currentPrimitive->animSpeed = 4; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Undead_Magic_Circle.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Undead_Magic_Circle.act"); break; } Owner(this->state.currentPrimitive).InitSegment(); } // OFFSET: 0x00C213C0 // FUNCTION: fn_20087 bool CRagEffect::OnProcess3() { switch (this->state.type) { case EF_BLUELIGHTBODY: if ((this->state.parent->render.flags & 0x4000) == 0) { this->state.parent->render.flags += 0x4000; this->state.parent->render.tintPhase = 20; } break; case EF_EL_GUST: this->TexturedClassChange(70); break; case EF_GRAYBODY: this->state.parent->SetColor(-1, 105, 105, 105); break; case EF_SILENT_BREEZE: this->TexturedClassChange(82); break; case EF_MAGMA_FLOW: this->TexturedClassChange(83); break; case EF_EL_BLAST: this->TexturedClassChange(71); break; case EF_EL_AQUAPLAY: this->TexturedClassChange(72); break; case EF_EL_UPHEAVAL: this->TexturedClassChange(73); break; case EF_EL_WILD_STORM: this->TexturedClassChange(74); break; case EF_EL_CHILLY_AIR: this->TexturedClassChange(75); break; case EF_EL_CURSED_SOIL: this->TexturedClassChange(76); break; case EF_EL_COOLER: this->TexturedClassChange(77); break; case EF_EL_TROPIC: this->TexturedClassChange(78); break; case EF_EL_PYROTECHNIC: this->TexturedClassChange(79); break; case EF_EL_PETROLOGY: this->TexturedClassChange(80); break; case EF_EL_HEATER: this->TexturedClassChange(81); break; case EF_CLOUD9: for (int index = 0; index < 65; ++index) { this->SkyCloud(9); } break; case EF_WATERBALL3: this->WaterBallBurst(); break; case EF_SPR_LIGHTPRINT3: this->SpriteRing(20); break; case EF_BOTTOM_DE2: this->TexturedGroundRing("effect\\ring_blue.tga", 0, 0, 0); break; case EF_PNG_TEST: this->TexturedAura("pe_fur1_01.bmp", 1); break; case EF_SHOCKWAVE2: if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { this->InitEZ2STRFrame(); } break; case EF_FIREWALL2: if (!this->ShieldCharge()) { return false; } break; case EF_THROWITEM11: this->ThrowItem("유저인터페이스\\item\\폭탄버섯포자.bmp", 1); break; case EF_GREENCASTING: this->WhiteSpellRings(); break; case EF_RG_COIN7: if (this->state.stateCnt == 26) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\LG_PINPOINTATTACK.wav"); } if (this->state.stateCnt % 4 <= 1) { if ((this->state.parent->render.flags & 2) == 0) { this->state.parent->render.flags += 2; } } for (int index = 0; index < 4; ++index) { this->TexturedSprayKind("effect\\shield.bmp", 5.0f, 7); this->TexturedSprayKind("effect\\sword.bmp", 9.0f, 7); } break; case EF_PRESSURE2: if (this->state.stateCnt == 3) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\프레셔.wav"); } if (this->state.stateCnt == 25) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\LG_SHIELDPRESS.wav"); } this->TexturedRain("effect\\shield.bmp", 0); this->TexturedLevelRing("effect\\explosive_1_128.bmp", -28, 0); break; case EF_PRESSURE3: if (this->state.stateCnt == 3) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\프레셔.wav"); } if (this->state.stateCnt == 22) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\S바레티르스피어.wav"); } this->TexturedRain("유저인터페이스\\item\\스피어.bmp", 4); this->TexturedRain("유저인터페이스\\item\\파이크.bmp", 4); this->TexturedRain("유저인터페이스\\item\\궁그닐.bmp", 4); this->TexturedLevelRing("effect\\explosive_1_128.bmp", -28, 0); break; case EF_CHEMICAL2DASH4: for (int index = 0; index < 4; ++index) { this->LineStreakTextured(10, "effect\\throw.bmp"); this->LineStreakTextured(11, "effect\\throw.bmp"); } break; case EF_BEGINSPELL_YB: this->BeginSpellSwirl(45, "", 10); break; case EF_SPR_MASH: this->TexturedClassChange(38); break; case EF_SPR_LIGHTPRINT: this->SpriteRing(9); break; case EF_SPR_LIGHTPRINT2: this->SpriteRing(10); break; case EF_GROUNDSHAKE: if (this->state.stateCnt == 3) { this->render.position = this->state.parent->render.position; } this->TexturedLevelRing("effect\\explosive_1_128.bmp", 0, 4); break; case EF_GROUNDSHAKE2: if (this->state.stateCnt == 3) { this->render.position = this->state.parent->render.position; } this->TexturedLevelRing("effect\\explosive_1_128.bmp", 0, 10); break; case EF_CHEMICAL3S: for (int index = 0; index < 4; ++index) { this->LineStreakKind(0); this->LineStreakKind(1); } break; case EF_TRIPLEATTACK4: this->CloudBurst(); break; case EF_DARKPIERCING: this->CloudSpread(); break; case EF_FIREBALL4: this->BlueFireballVolley(); break; case EF_FIREBALL5: this->PaleFireballVolley(); break; case EF_SPINMOVE: if (this->state.stateCnt <= 7) { this->state.parent->render.angle += 12.0f; } else if (this->state.stateCnt <= 15) { this->state.parent->render.angle += 18.0f; } else if (this->state.stateCnt <= 20) { this->state.parent->render.angle += 24.0f; } else if (this->state.stateCnt <= 25) { this->state.parent->render.angle += 48.0f; } else if (this->state.stateCnt <= 32) { this->state.parent->render.angle += 24.0f; } else if (this->state.stateCnt <= 37) { this->state.parent->render.angle += 18.0f; } else if (this->state.stateCnt <= 45) { this->state.parent->render.angle += 12.0f; } if (this->state.parent->render.angle > 360.0f) { this->state.parent->render.angle -= 360.0f; } break; case EF_TEIHIT1T: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\mon_맹룡과강.wav"); } { const int count = g_serviceOptions.Get(229) ? 6 : 20; for (int index = 0; index < count; ++index) { this->TexturedScatter("effect\\alpha_center.tga", 2); } } break; case EF_ELECTRIC4: this->ElectricRing(0, 0); this->ElectricRing(0, 180); break; case EF_HITLINE8: this->WhiteSparks(8); break; case EF_GUMGANG5: if (this->state.stateCnt >= 0) { this->state.parent->render.flags |= 0x1000; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } this->TexturedCrossKind("effect\\ring_blue.tga", 3); if (this->state.stateCnt <= 30) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 0, 0, 255); } break; case EF_GUMGANG9: if (this->state.stateCnt >= 0) { this->state.parent->render.flags |= 0x1000; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } this->TexturedCrossKind("effect\\ring_brown.tga", 4); if (this->state.stateCnt <= 30) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 80, 40, 0); } break; case EF_GUMGANG8: if (this->state.stateCnt >= 0) { this->state.parent->render.flags |= 0x1000; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } this->TexturedCrossKind("effect\\ring_yellow.tga", 4); if (this->state.stateCnt <= 30) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 255, 255, 0); } break; case EF_GUMGANG7: if (this->state.stateCnt >= 0) { this->state.parent->render.flags |= 0x1000; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } this->TexturedCrossKind("effect\\ring_red.tga", 4); if (this->state.stateCnt <= 30) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 255, 0, 0); } break; case EF_GUMGANG6: this->TexturedCrossKind("effect\\ring_white.tga", 4); if (this->state.stateCnt >= 10 && this->state.stateCnt <= 34 && this->state.stateCnt % 4 < 2) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } } break; case EF_BASH3D6: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\mon_맹룡과강.wav"); } for (int index = 0; index < 8; ++index) { this->TexturedQuadSpin("effect\\alpha_center.tga", index, 6); } break; case EF_PRIMECHARGE: if (this->state.stateCnt == 10) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\LG_EXEEDBREAK.wav"); } for (int index = 0; index < 40; ++index) { this->TexturedScatterSphere("effect\\alpha_center.tga", 0, 0); } break; case EF_PRIMECHARGE2: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; } for (int index = 0; index < 40; ++index) { this->TexturedScatterSphere("effect\\alpha_center.tga", 1, 0); } break; case EF_PRIMECHARGE3: if (this->state.stateCnt == 10) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\LG_BANDING.wav"); } for (int index = 0; index < 40; ++index) { this->TexturedScatterSphere("effect\\alpha_center.tga", 2, 0); } break; case EF_PRIMECHARGE4: if (this->state.stateCnt == 10) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\LG_INSPIRATION.wav"); } for (int index = 0; index < 40; ++index) { this->TexturedScatterSphere("effect\\alpha_center.tga", 3, 0); } break; case EF_DQ9_CHARGE: this->TexturedSpiral("effect\\alpha_center.tga", 0, 0); break; case EF_DQ9_CHARGE2: this->TexturedSpiralSmall("effect\\shockwave_c.bmp", 0, 0); break; case EF_DQ9_CHARGE3: this->TexturedSpiralTall("effect\\shockwave_c.bmp", 0, 0); break; case EF_DQ9_CHARGE4: this->TexturedSpiralFade("effect\\shockwave_c.bmp", 0, 0); break; case EF_SELFSCROLL: this->TexturedDoubleSpiral("effect\\shockwave_c.bmp", 0, 0); break; case EF_LEVEL99_150: this->TexturedDoubleRing("effect\\emp shock.tga", 2); this->TexturedDoubleRing("effect\\cir0002.bmp", 3); break; case EF_CIRCLEPOWER2: this->TexturedTwinkleRing("effect\\freeze_a.bmp", 2); break; case EF_CIRCLEPOWER3: this->TexturedTwinkleRing("effect\\freeze_a.bmp", 3); break; case EF_CIRCLEPOWER4: this->TexturedTwinkleRing("effect\\freeze_a.bmp", 4); break; case EF_CIRCLEPOWER5: this->TexturedTwinkleRing("effect\\freeze_a.bmp", 5); break; case EF_CIRCLEPOWER6: this->TexturedTwinkleRing("effect\\freeze_a.bmp", 6); break; case EF_CIRCLEPOWER7: this->TexturedTwinkleRing("effect\\freeze_a.bmp", 7); break; case EF_CIRCLEPOWER8: this->TexturedTwinkleRing("effect\\freeze_a.bmp", 8); break; case EF_BOT_REVERB: this->TexturedDrop("effect\\melody_a.bmp", 0); break; case EF_BOT_REVERB2: this->TexturedDrop("effect\\melody_a.bmp", 1); break; case EF_RAIN_PARTICLE: this->TexturedFloatingDust("effect\\번개1.bmp", 0); break; case EF_RAIN_PARTICLE2: if (this->state.stateCnt == 1) { g_soundMgr->PlayWave("effect\\매직 크래쉬.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } this->TexturedFloatingDust("effect\\stone_part.bmp", 0); break; case EF_CHEMICAL_V: this->TexturedBeam(0, "effect\\line3.tga"); this->TexturedForkBolt("effect\\melody_a.bmp", 0); this->TexturedForkBolt("effect\\melody_b.bmp", 0); break; case EF_CHEMICAL_V2: this->TexturedBeam(1, "effect\\line3.tga"); this->TexturedForkBolt("effect\\melody_a.bmp", 1); this->TexturedForkBolt("effect\\melody_b.bmp", 1); break; case EF_CHEMICAL_ALLRANGE: this->TexturedSpinShards("effect\\melody_a.bmp", 1); this->TexturedSpinShards("effect\\melody_b.bmp", 1); this->TexturedSpinShards("effect\\melody_a.bmp", 1); this->TexturedSpinShards("effect\\melody_b.bmp", 1); break; case EF_CHEMICAL_V3: this->TexturedBeam(2, "effect\\line3.tga"); break; case EF_SECRA: this->TexturedSlam("effect\\priest_spell.bmp", 1, 0); break; case EF_SECRA2: this->TexturedSlam("effect\\priest_spell.bmp", 2, 0); break; case EF_SPR_PARTICLE: this->Mavka(0); break; case EF_SPR_PARTICLE2: this->Mavka(2); break; case EF_SPR_PLANT: this->MonsterSpriteBurst(0); break; case EF_SPR_PLANT2: this->MonsterSpriteBurst(2); break; case EF_SPR_PLANT3: this->MonsterSpriteBurst(3); break; case EF_SPR_PLANT4: this->MonsterSpriteBurst(4); break; case EF_SPR_PLANT5: this->MonsterSpriteBurst(5); break; case EF_SPR_PLANT6: this->MonsterSpriteBurst(6); break; case EF_SPR_PLANT7: this->MonsterSpriteBurst(7); break; case EF_SPR_PLANT8: this->MonsterSpriteBurst(8); break; case EF_SPR_PLANT9: this->MonsterSpriteBurst(9); break; case EF_SPR_PLANT10: this->MonsterSpriteBurst(13); break; case EF_SPR_PLANT11: this->MonsterSpriteBurst(14); break; case EF_LINKPARTICLE: this->TexturedTumbleOrb("effect\\whitelight.tga", 0); break; case EF_LINKPARTICLE2: this->TexturedTumbleOrb("effect\\whitelight.tga", 2); this->TexturedTumbleOrb("effect\\whitelight.tga", 1); break; case EF_SOULLIGHT2: this->TexturedStorm2("effect\\whitelight.tga", 2); break; case EF_SOULLIGHT3: this->TexturedStorm2("effect\\whitelight.tga", 3); break; case EF_CHEMICAL2DASH3: for (int index = 0; index < 4; ++index) { this->LineStreakTextured(10, "effect\\throw.bmp"); this->LineStreakTextured(11, "effect\\throw.bmp"); } break; case EF_CHEMICAL2DASH2: for (int index = 0; index < 4; ++index) { this->LineStreakLayered(10); this->LineStreakLayered(11); } if (this->state.stateCnt == 44) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } if (this->state.stateCnt >= 20 && this->state.stateCnt <= 100) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 255, 255, 150); } break; case EF_JOBLVUP50_2: this->JobLvUp50(0); this->JobLvUp50(45); break; case EF_CHOOKGI_N: this->ThunderFreeze(3); break; case EF_HEAL_N: if (this->state.stateCnt >= 4 && this->state.stateCnt <= 52) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 5, 5, 255); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } this->BubbleFanSweep("effect\\ring_white.tga", 0); break; case EF_HEAL_N2: if (this->state.stateCnt >= 4 && this->state.stateCnt <= 52) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 55, 255, 55); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } this->BubbleFanSweep("effect\\ring_white.tga", 1); break; case EF_BEGINSPELL_N1: if (this->state.stateCnt == 1) { g_soundMgr->PlayWave("effect\\EF_BeginSpell.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } this->BubbleSpiralKind(45, "", 1); this->BubbleSpiralKind(25, "", 0); break; case EF_BEGINSPELL_150: this->BubbleSpiral(45, "", 1); this->BubbleSpiral(25, "", 1); break; case EF_BEGINSPELL_N2: this->BeginSpellSwirl(45, "", 0); this->TexturedTwinSpin("effect\\cir0002.bmp", 3); break; case EF_BEGINSPELL_N3: this->BeginSpellSwirl(45, "", 3); break; case EF_BEGINSPELL_N4: this->BeginSpellSwirl(45, "", 4); break; case EF_BEGINSPELL_N5: this->BeginSpellSwirl(45, "", 5); break; case EF_BEGINSPELL_N6: this->BeginSpellSwirl(45, "", 6); break; case EF_BEGINSPELL_N7: this->BeginSpellSwirl(45, "", 7); break; case EF_BEGINSPELL_N8: this->BeginSpellSwirl(45, "", 8); break; case EF_NEW_EPICLESIS_CAST: this->BeginSpellSwirl(45, "", 9); break; case EF_DARKCASTING2: this->BlackSpellRings(2); break; case EF_FORESTLIGHT6: if (this->state.stateCnt == 1) { g_soundMgr->PlayWave("effect\\dimension.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } this->ForestLight("effect\\cloud11.tga", 13); this->TexturedHalo("effect\\구체15.bmp", 4); this->WhiteRingRipple(0); break; case EF_MANHOLE: if ((this->state.parent->render.flags & 0x100000) == 0) { this->state.parent->render.flags += 0x100000; } break; case EF_BOTTOM_MANHOLE: this->TexturedHalo("effect\\twirl.bmp", 4); this->WhiteRingRipple(0); break; case EF_BOTTOM_MAELSTROM: { const char* flare; const char* ring0; const char* ring1; if (g_serviceOptions.Get(229)) { flare = "effect\\mineffect\\new_maelstrom\\new_maelstrom\\mae_flare_00.bmp"; ring0 = "effect\\mineffect\\new_maelstrom\\new_maelstrom\\mae_ring_00.tga"; ring1 = "effect\\mineffect\\new_maelstrom\\new_maelstrom\\mae_ring_01.tga"; } else { flare = "effect\\new_maelstrom\\new_maelstrom\\mae_flare_00.bmp"; ring0 = "effect\\new_maelstrom\\new_maelstrom\\mae_ring_00.tga"; ring1 = "effect\\new_maelstrom\\new_maelstrom\\mae_ring_01.tga"; } this->TexturedHalo(flare, 10); this->TexturedHalo(ring0, 11); this->TexturedHalo(ring1, 12); } break; case EF_BOTTOM_BLOODYLUST: this->TorchDustRing("", 1, 0); this->TorchDustRing("", 1, 120); this->TorchDustRing("", 1, 240); this->WhiteRingRipple(2); break; case EF_BOTTOM_ANI: this->TorchDustRing("", 0, 0); this->WhiteRingRipple(1); break; case EF_WATERFALL_ANI: this->WaterBubble(0); break; case EF_WATER_BELOW: this->TorchDustRing("", 2, 0); break; case EF_WATER_FADE: this->TexturedDualSpin("effect\\W_Comp_00.tga", "effect\\W_Comp_24.tga", 0); break; case EF_WATER_SMOKE: for (int index = 0; index < 40; ++index) { this->FrostSplash(0, 0); } break; case EF_RG_COIN5: if (this->state.stateCnt != 1) { if (this->state.stateCnt != 11) { if (this->state.stateCnt != 21) { if (this->state.stateCnt == 31) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } this->TexturedSprayKind("유저인터페이스\\item\\갈색반지.bmp", 5.0f, 1); this->TexturedSprayKind("유저인터페이스\\item\\금반지.bmp", 5.0f, 1); this->TexturedSprayKind("유저인터페이스\\item\\금방울.bmp", 5.0f, 1); this->TexturedSprayKind("유저인터페이스\\item\\꽃반지.bmp", 5.0f, 1); this->TexturedSprayKind("유저인터페이스\\item\\낡은펜던트.bmp", 5.0f, 1); this->TexturedSprayKind("유저인터페이스\\item\\눈구슬반지.bmp", 5.0f, 1); this->TexturedSprayKind("유저인터페이스\\item\\상자.bmp", 4.0f, 1); this->TexturedSprayKind("유저인터페이스\\item\\수제초콜렛.bmp", 5.0f, 1); break; case EF_RG_COIN6: if (this->state.stateCnt != 1) { if (this->state.stateCnt != 11) { if (this->state.stateCnt != 21) { if (this->state.stateCnt == 31) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } for (int index = 0; index < 2; ++index) { this->TexturedSprayKind("effect\\melody_a.bmp", 6.0f, 1); this->TexturedSprayKind("effect\\melody_b.bmp", 6.0f, 1); } break; case EF_LINELINK4: this->TrackCloud(2); break; case EF_ENERVATION: this->TintedRisingSparkles(0); this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_ENERVATION2: this->TintedRisingSparkles(1); this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_ENERVATION3: this->TintedRisingSparkles(2); this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_ENERVATION4: this->TintedRisingSparkles(3); this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_ENERVATION5: this->TintedRisingSparkles(4); this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_ENERVATION6: this->TintedRisingSparkles(5); this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_ENERVATION7: if (this->state.stateCnt >= 4 && this->state.stateCnt <= 90) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 182, 89, 255); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } this->RisingSparkles(2); this->TintedRisingSparkles(6); break; case EF_DANCE1: if (this->state.stateCnt >= 4 && this->state.stateCnt <= 90) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 255, 89, 182); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } this->RisingSparkles(1); break; case EF_DANCE2: if (this->state.stateCnt >= 4 && this->state.stateCnt <= 90) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 182, 89, 255); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } this->RisingSparkles(2); break; case EF_BLACKBODY: if (this->state.stateCnt >= 6 && this->state.stateCnt <= 60) { const int value = (this->state.stateCnt & 1) != 0 ? 255 : 0; this->state.parent->SetColor(-1, value, value, value); } else if (this->state.stateCnt >= 61) { CGameActor* actor = reinterpret_cast(this->state.parent); if (actor->render.isCharacter != 0 && (actor->effectState & 1) != 0) { actor->render.colorLocked = 1; this->state.parent->SetColor(-1, 255, 128, 255); } } this->TexturedSkillAura(6); break; case EF_STRETCH: this->TexturedDescendingRings("effect\\freezing_stick.bmp", 0); break; case EF_CLOAKING3: this->AssassinCloakingClear(); break; case EF_RECOGNIZED2: for (int index = 0; index < 5; ++index) { this->TexturedSkillIcon("", index * 30 + 1, 2); } break; case EF_INTIMIDATE4: if (this->state.stateCnt == 25) { PlayEffectWave(*this, "effect\\triangle.wav"); } for (int index = 0; index < 10; ++index) { this->WhiteSpray(4); } break; case EF_INTIMIDATE3: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_Bash.wav"); } if (this->state.stateCnt == 35) { PlayEffectWave(*this, "effect\\rog_intimidate.wav"); } for (int index = 0; index < 20; ++index) { this->WhiteSpray(3); } break; case EF_FIREBALL3: this->RocketPunch(); break; case EF_FIREBALL6: this->GreenRocketPunch(); break; case EF_TETRACASTING: if (this->state.stateCnt == 0) { g_soundMgr->PlayWave("effect\\EF_BeginSpell.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } if (this->state.stateCnt % 5 <= 1) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, rand() % 256, rand() % 256, rand() % 256); } else { this->state.parent->SetColor(-1, rand() % 256, rand() % 256, rand() % 256); } this->TexturedQuadRing(25, "effect\\ring_white.tga", 0); this->TexturedQuadRing(45, "effect\\ring_white.tga", 0); break; case EF_TETRA: case EF_TETRA_FIRE: case EF_TETRA_WATER: case EF_TETRA_WIND: case EF_TETRA_GROUND: if (this->state.stateCnt != 0) { if (this->state.stateCnt != 40) { if (this->state.stateCnt == 80) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } } else { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } } else { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } this->TetraVortexPillar(4); for (int index = 0; index < 7; ++index) { this->TexturedSpread("effect\\ring_red.tga", 10); } break; case EF_RECOGNIZED: for (int index = 0; index < 10; ++index) { this->TexturedSkillIcon("", index * 30 + 1, 0); } break; case EF_BOTTOM_BASILICA2: if (this->state.stateCnt == 6) { g_soundMgr->PlayWave("effect\\wl_whiteimprison.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } this->TexturedFourRing("effect\\alpha_down.tga", 20); this->TexturedFourRing("effect\\alpha_down.tga", 21); break; case EF_FROSTDIVER3: this->FrostDiver(3); break; case EF_REDLINE: for (int index = 0; index < 3; ++index) { this->TexturedSpreadFlat("effect\\ring_red.tga", 3); } break; case EF_BLUELINE: for (int index = 0; index < 6; ++index) { this->TexturedSpreadFlat("effect\\ring_blue.tga", 12); } break; case EF_STASIS: if (this->state.stateCnt == 6) { g_soundMgr->PlayWave("effect\\wl_stasis.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } if (this->state.stateCnt >= 6 && this->state.stateCnt <= 40) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 0, 0, 255); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } this->TexturedLevelRing("effect\\thunder_ball_0001.bmp", -10, 3); this->TexturedLevelRing("effect\\thunder_ball_0002.bmp", -14, 3); this->TexturedLevelRing("effect\\thunder_ball_0003.bmp", -18, 3); this->TexturedLevelRing("effect\\thunder_ball_0004.bmp", -22, 3); this->TexturedLevelRing("effect\\thunder_ball_0005.bmp", -26, 3); this->TexturedLevelRing("effect\\thunder_ball_0006.bmp", -30, 3); break; case EF_INTIMIDATE2: for (int index = 0; index < 16; ++index) { this->WhiteSpray(2); } break; case EF_STONERING: if (this->state.stateCnt == 0) { g_soundMgr->PlayWave("effect\\wl_siennaexecrate.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } this->TexturedClassChange(60); break; case EF_GTHUNDER: this->TexturedMark("effect\\storm2.tga", 10); this->TexturedRisingPillar("effect\\white01.bmp", 0); break; case EF_CRASHAXE: if (!this->FirePillarBomb()) { return false; } break; case EF_INFRAREDSCAN: if (this->state.stateCnt == 0) { g_soundMgr->PlayWave("effect\\INFRAREDSCAN.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } this->ElectricFan(nullptr, 0); this->ElectricFan(nullptr, 1); break; case EF_HALLUTIME: this->TexturedRisingOrbs("effect\\white02.bmp", 3); break; case EF_MAKEHALLU: this->SpawnActorHallucination(); break; case EF_MAKEHALLU2: this->SpawnHallucinationTrail(); break; case EF_MAKEFEINT: this->SpawnHallucinationOnce(); break; case EF_KAGEMUSYA: { CHalluPC2* hallu = new CHalluPC2(reinterpret_cast(this->state.parent)); hallu->render.position = this->state.parent->render.position; hallu->render.position.x -= ClientSine(static_cast(this->state.parent->render.angle)) * 5.0f; hallu->render.position.z += ClientCosine(static_cast(this->state.parent->render.angle)) * 5.0f; hallu->SetColor(100, 192, 192, 192); WorldObjects().push_back(hallu); } break; case EF_COLDTHROW: if (this->state.stateCnt == 0) { g_soundMgr->PlayWave("ice_titan_attack.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } if (this->state.stateCnt >= 6 && this->state.stateCnt <= 40) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 0, 0, 255); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } this->SnowDrift(0); this->SnowDrift(0); this->SnowDrift(0); break; case EF_COLDTHROW2: if (this->state.stateCnt >= 6 && this->state.stateCnt <= 40) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 0, 0, 255); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } this->SnowDrift(0); this->SnowDrift(0); this->SnowDrift(0); break; case EF_FIRETHROW: this->TorchRedRing(0); break; case EF_NC_ANAL: if (this->state.stateCnt >= 10 && this->state.stateCnt <= 90) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 250, 250, 250); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } this->TexturedSkillAura(5); this->TexturedAura("effect\\target3.bmp", 21); break; case EF_REPAIRTIME: this->TexturedRisingOrbs("유저인터페이스\\item\\스패너.bmp", 2); break; case EF_BOTTOM_STEALTH: this->TexturedGlow("effect\\썬더스톰파티클.tga", 8); break; case EF_BOTTOM_BARRIER: this->TexturedGlow("effect\\slash01.tga", 8); break; case EF_GUARD4: this->BlackMaximize("effect\\성체강복.tga"); if (this->state.stateCnt >= 10 && this->state.stateCnt <= 30) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 250, 250, 0); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } break; case EF_ELECTRIC3: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\MAGNETICFIELD.wav"); } this->ElectricRingEarly(0, 0); this->ElectricRingEarly(0, 180); break; case EF_DETECT4: this->TexturedSkillAura(4); break; case EF_DETECT3: this->TexturedSkillAura(3); break; case EF_AGIUP3: if (this->state.stateCnt < 61) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 155, 155, 255); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } this->IncAgilityCenter(3); break; case EF_AGIUP2: if (this->state.stateCnt < 61) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 155, 155, 255); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } this->IncAgilityCenter(2); break; case EF_CASTSPIN2: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); } if (this->state.parent->render.state == 0 || this->state.parent->render.state == 2) { if (this->state.stateCnt <= 15) { this->state.parent->render.angle += 12.0f; } else if (this->state.stateCnt <= 30) { this->state.parent->render.angle += 18.0f; } else if (this->state.stateCnt <= 40) { this->state.parent->render.angle += 24.0f; } else { this->state.parent->render.angle += 48.0f; } if (this->state.parent->render.angle > 360.0f) { this->state.parent->render.angle -= 360.0f; } } break; case EF_SHIELDBOOMERANG4: this->TexturedShieldThrow("유저인터페이스\\item\\배틀액스.bmp"); break; case EF_GUMGANG4: this->TexturedCrossKind("effect\\ring_purple.tga", 1); break; case EF_POISONWAV: if (this->state.stateCnt == 1) { g_soundMgr->PlayWave("effect\\assasin_enchantpoison.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); g_soundMgr->PlayWave("effect\\EF_PoisonAttack.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } break; case EF_VULCANWAV: if (this->state.stateCnt == 45) { g_soundMgr->PlayWave("effect\\데스페라도.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } break; case EF_POISONSMOKE: case EF_POISONSMOKE2: this->PoisonAttack(1); break; case EF_RG_COIN4: if (this->state.stateCnt != 1) { if (this->state.stateCnt != 11) { if (this->state.stateCnt != 21) { if (this->state.stateCnt == 31) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } this->TexturedSprayKind("유저인터페이스\\item\\루드라의활.bmp", 5.0f, 0); this->TexturedSprayKind("유저인터페이스\\item\\아트로스의흉기.bmp", 5.0f, 0); this->TexturedSprayKind("유저인터페이스\\item\\모닝스타.bmp", 5.0f, 0); this->TexturedSprayKind("유저인터페이스\\item\\바스타드소드.bmp", 5.0f, 0); this->TexturedSprayKind("유저인터페이스\\item\\글레이브.bmp", 5.0f, 0); this->TexturedSprayKind("유저인터페이스\\item\\블레이드휩.bmp", 5.0f, 0); this->TexturedSprayKind("유저인터페이스\\item\\드래곤슬레이어.bmp", 5.0f, 0); this->TexturedSprayKind("유저인터페이스\\item\\배틀액스.bmp", 5.0f, 0); break; case EF_ROLLING1: this->TexturedSlam("effect\\회전카운터1.tga", 0, 0); break; case EF_ROLLING2: this->TexturedSlam("effect\\회전카운터2.tga", 0, 0); break; case EF_ROLLING3: this->TexturedSlam("effect\\회전카운터3.tga", 0, 0); break; case EF_ROLLING4: this->TexturedSlam("effect\\회전카운터4.tga", 0, 0); break; case EF_ROLLING5: this->TexturedSlam("effect\\회전카운터5.tga", 0, 0); break; case EF_ROLLING6: this->TexturedSlam("effect\\회전카운터6.tga", 0, 0); break; case EF_ROLLING7: this->TexturedSlam("effect\\회전카운터7.tga", 0, 0); break; case EF_ROLLING8: this->TexturedSlam("effect\\회전카운터8.tga", 0, 0); break; case EF_ROLLING9: this->TexturedSlam("effect\\회전카운터9.tga", 0, 0); break; case EF_ROLLING10: this->TexturedSlam("effect\\회전카운터10.tga", 0, 0); break; case EF_HEARTASURA: this->TexturedSlam("effect\\kiss2.bmp", 2, 0); break; case EF_STIN6: if (this->state.stateCnt == 5 || this->state.stateCnt == 20 || this->state.stateCnt == 35 || this->state.stateCnt == 50 || this->state.stateCnt == 65) { this->render.position = this->state.parent->render.position; g_modeMgr.GetGameMode(); g_soundMgr->PlayWave( "effect\\T_날라차기.wav", 0.0f, this->state.stateCnt <= 50 ? static_cast(5 - this->state.stateCnt) : -50.0f, 0.0f, 250, 40, 1.0f, 0 ); } break; case EF_POTION_BERSERK2: if (!this->Potion_Awakening()) { return false; } break; case EF_ORATIO: this->TexturedAura("effect\\마법진1-3.bmp", 19); break; case EF_VENOMIMPRESS: this->TexturedAura("effect\\베놈_상태.bmp", 22); break; case EF_FROSTMISTY: this->TexturedAura("effect\\빙결_상태.bmp", 22); break; case EF_COLDSTATUS: this->TexturedAura("effect\\얼음결정체1.tga", 22); break; case EF_BURNING: this->TexturedAura("effect\\발화_상태.bmp", 22); break; case EF_GLASSWALL3: this->WhiteRingWave(); if (!this->TexturedRisingRingStages("effect\\alpha_down.tga", 0)) { return false; } break; case EF_GLASSWALL4: this->TexturedColumn("effect\\ef_epitree.tga", 30); this->WhiteRingWave(); this->TexturedRisingRingStages("effect\\alpha_down.tga", 1); break; case EF_GRADIUS_LASER: this->TexturedTripleOrbit("effect\\white02.bmp"); break; case EF_CLEARTIME: if (this->state.stateCnt == 1) { PlayEffectWave(*this, "effect\\샤프슈팅.wav"); } this->TexturedRisingOrbs("effect\\white02.bmp", 1); this->TexturedMark("effect\\storm2.tga", 8); break; case EF_FIREBALL2: this->ShadedFireballVolley(); break; case EF_CONCENTRATION2: if (this->state.stateCnt >= 10 && this->state.stateCnt <= 40) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } } this->state.parent->SetColor(-1, 155, 155, 255); } if (!this->Concentration()) { return false; } break; case EF_AIMED_STR: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 1) { PlayEffectWave(*this, "aimed.wav"); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_ARROWSTORM_STR: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 1) { PlayEffectWave(*this, "arrowstorm.wav"); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_LAULAMUS_STR: case EF_LAUAGNUS_STR: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 1) { PlayEffectWave(*this, "lauagnus.wav"); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_MILSHIELD_STR: this->render.position = this->state.parent->render.position; this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_CLOAKING2: this->AssassinCloaking(); break; case EF_MAGENTA_TRAP: this->TexturedClassChange(53); break; case EF_COBALT_TRAP: this->TexturedClassChange(52); break; case EF_MAIZE_TRAP: this->TexturedClassChange(51); break; case EF_VERDURE_TRAP: this->TexturedClassChange(54); break; case EF_NORMAL_TRAP: this->TexturedClassChange(50); break; case EF_EARTHWALL: this->StoneWall(); break; case EF_SPR_SOULE: this->TexturedClassChange(39); break; case EF_CHOOKGI_FIRE: this->ElementalOrbit(10); break; case EF_CHOOKGI_WIND: this->ElementalOrbit(11); break; case EF_CHOOKGI_WATER: this->ElementalOrbit(12); break; case EF_CHOOKGI_GROUND: this->ElementalOrbit(13); break; case EF_SOULBREAKER4: if (this->state.stateCnt == 20) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\기공포.wav"); } if (this->state.stateCnt >= 0 && this->state.stateCnt <= 10) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 155, 155, 255); } this->SonicWave(1); break; case EF_CHIMTO2: { this->render.position = this->state.parent->render.position; const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); if (this->state.stateCnt == 0) { g_soundMgr->PlayWave( "hundred.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } } this->CHIMTO(12); break; case EF_FROSTMYSTY: if (this->state.stateCnt == 10) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\t_에너지방출.wav"); } this->SaintWing("effect\\freeze_a.bmp"); this->SnowFall("", 1); break; case EF_DETECT2: this->TexturedSkillAura(2); break; case EF_WINDCUTTER: if (this->state.stateCnt == 1) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\wl_siennaexecrate.wav"); } this->TexturedSkillAura(8); break; case EF_IGN_STR: this->TexturedSkillAura(7); this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_CRIMSON_STR: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 1) { PlayEffectWave(*this, "crimson_r.wav"); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_HELL_STR: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 1) { PlayEffectWave(*this, "hell_in.wav"); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_CHAINL_STR: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 1) { PlayEffectWave(*this, "chainlight.wav"); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_SOULBREAKER3: if (this->state.stateCnt == 20) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\기공포.wav"); } if (this->state.stateCnt >= 0 && this->state.stateCnt <= 10) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 205, 205, 0); } this->SonicWave(1); break; case EF_FORESTLIGHT5: this->ForestLight("effect\\cloud11.tga", 12); break; case EF_FIREPILLARON2: this->RingStack(1); for (int index = 0; index < 3; ++index) { this->TexturedSpreadFlat("effect\\ring_white.tga", 11); } break; case EF_BOTTOM_BLUE: case EF_BOTTOM_BLUE2: this->TexturedFourRing("effect\\ring_blue.tga", 10); this->TexturedFourRing("effect\\ring_blue.tga", 11); break; case EF_YELLOWFLY1: this->WhiteLightSparkle(0); break; case EF_YELLOWFLY2: this->WhiteLightSparkle(1); break; case EF_YELLOWFLY3: this->WhiteLightSparkle(2); break; case EF_MAP_MAGICWALL: this->WaterfallSheets(0, 10, 10); for (int index = 0; index < 2; ++index) { this->FreezingCircle(6); } break; case EF_MAP_GREENLIGHT: this->TexturedAura("effect\\b.bmp", 18); this->TexturedAura("effect\\glow02.bmp", 16); this->TexturedAura("effect\\glow02.bmp", 17); this->FreezingCircle(5); break; case EF_MAP_GREENLIGHT2: this->TexturedAura("effect\\b.bmp", 18); this->TexturedAura("effect\\glow03.bmp", 16); this->TexturedAura("effect\\glow03.bmp", 17); this->FreezingCircle(7); break; case EF_STORM_MIN: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\wizard_stormgust.wav"); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_CIRCLELIGHT: this->TexturedBeams("effect\\alpha_upper.tga", 0); this->FreezingCircle(4); break; case EF_ITEM318: this->TexturedClassChange(37); break; case EF_CLOUD7: for (int index = 0; index < 80; ++index) { this->SkyCloud(7); } break; case EF_CLOUD8: for (int index = 0; index < 80; ++index) { this->SkyCloud(8); } break; case EF_GLOW1: this->TexturedAura("effect\\glow01.bmp", 14); break; case EF_GLOW2: this->TexturedAura("effect\\glow02.bmp", 14); break; case EF_GLOW11: this->TexturedAura("effect\\glow11.bmp", 15); break; case EF_GLOW12: this->TexturedAura("effect\\glow12b .bmp", 14); break; case EF_GLOW4: this->Map_MagicZone("effect\\glow04.bmp", 5); for (int index = 2; index < 21; index += 2) { this->TexturedOrbitDust("effect\\mpa3.tga", index, 2); } break; case EF_MAP_GHOST: this->FreezingCircle(3); break; case EF_DUST: this->TorchDust(0); break; case EF_TORCH_RED: this->TorchDust(1); break; case EF_TORCH_GREEN: this->TorchDust(2); break; case EF_TORCH_PURPLE: this->TorchDust(3); break; case EF_MAP_MAGICZONE: this->Map_MagicZone("effect\\mjin2.tga", 0); this->Map_MagicZone("effect\\mjin.tga", 1); this->Map_Pika("effect\\pikapika2.bmp"); this->WideTripleRingStack("effect\\ring_blue.tga"); break; case EF_MAP_MAGICZONE2: this->Map_MagicZone("effect\\mjin2.tga", 2); this->Map_MagicZone("effect\\mjin.tga", 3); for (int index = 2; index < 21; index += 2) { this->TexturedOrbitDust("effect\\mpa3.tga", index, 0); } break; case EF_MAP_MAGICZONE3: this->Map_MagicZone("effect\\마법진1-1.bmp", 4); this->Map_MagicZone("effect\\마법진1-2.bmp", 14); this->Map_MagicZone("effect\\마법진1-3.bmp", 4); break; case EF_MAP_MAGICZONE4: this->Map_MagicZone("effect\\마법진2-1.bmp", 4); this->Map_MagicZone("effect\\마법진2-2.bmp", 14); this->Map_MagicZone("effect\\마법진2-3.bmp", 4); break; case EF_POK_LOVE: this->TexturedClassChange(32); break; case EF_POK_WHITE: this->TexturedClassChange(33); break; case EF_POK_VALEN: this->TexturedClassChange(34); break; case EF_POK_BIRTH: this->TexturedClassChange(35); break; case EF_POK_CHRISTMAS: this->TexturedClassChange(36); break; case EF_MAPSPHERE: this->TexturedAura("effect\\구체2.bmp", 12); this->TexturedAura("effect\\구체3.bmp", 13); this->TexturedAura("effect\\구체4.bmp", 11); this->TexturedAura("effect\\구체5.bmp", 10); break; case EF_MAPSPHERE2: this->TexturedAura("effect\\구체12.bmp", 12); this->TexturedAura("effect\\구체3.bmp", 13); this->TexturedAura("effect\\구체14.bmp", 11); this->TexturedAura("effect\\구체15.bmp", 10); break; case EF_GREEN99_3: this->FreezingCircle(2); break; case EF_GREEN99_5: this->TripleRingStack("effect\\ring_white.tga", 1); break; case EF_GREEN99_6: this->TexturedDoubleRing("effect\\pikapika2.bmp", 1); break; case EF_CRITICALWOUND: if (this->state.stateCnt == 1) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\wideb.wav"); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_NPC_SLOWCAST: this->TexturedAura("effect\\blast_mine##clock.bmp", 4); if (this->state.stateCnt == 10) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_DecAgility.wav"); } break; case EF_GUARD3: this->KyrieGuard("effect\\guardK.tga", 2); break; case EF_BOTTOM_EVILLAND: this->Bottom_Music("effect\\curse.bmp", 6); break; case EF_BOTTOM_RUNNER: this->TexturedHalo("effect\\hanmoon1.tga", 3); break; case EF_BOTTOM_TRANSFER: this->TexturedHalo("effect\\hanmoon2.tga", 3); break; case EF_DA_SPACE: if ((this->state.parent->render.flags & 2) == 0) { this->state.parent->render.flags += 2; if (this->state.stateCnt < 25) { this->state.parent->render.outlineAlpha = static_cast(this->state.stateCnt * 8); } else { this->state.parent->render.outlineAlpha = 200; } } break; case EF_NPC_EARTHQUAKE: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\earth_quake.wav"); } this->TexturedClassChange(31); if (this->state.stateCnt != 0) { if (this->state.stateCnt != 35) { if (this->state.stateCnt == 70) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } } else { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } } else { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } break; case EF_BUBBLE_DROP: this->Bubble_Drop(); break; case EF_UNDEADBODY: if ((this->state.parent->render.flags & 0x80000) == 0) { this->state.parent->render.flags += 0x80000; this->state.parent->render.outlineAlpha = static_cast(std::min(this->state.stateCnt, 200)); } break; case EF_UNDEADBODY_DEL: if (this->state.stateCnt < 40) { if ((this->state.parent->render.flags & 0x80000) == 0) { this->state.parent->render.flags += 0x80000; this->state.parent->render.outlineAlpha = static_cast(200 - this->state.stateCnt * 5); } } break; case EF_ISSEN: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\일섬.wav"); } this->TexturedClassChange(18); break; case EF_KASUMIKIRI: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\안개베기.wav"); } this->TexturedClassChange(17); break; case EF_KIRIKAGE: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\그림자베기.wav"); } this->TexturedClassChange(15); break; case EF_DAMAGE1: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_hit2.wav"); this->state.parent->SendMsg(nullptr, AM_MAKE_NUMBER, 1, 0xFFFF0000, 114, 0, 0, 0); } break; case EF_DAMAGE1_2: if (this->state.stateCnt == 0) { this->state.parent->SendMsg(nullptr, AM_MAKE_NUMBER, 1, 0xFFFF0000, 114, 0, 0, 0); } break; case EF_DAMAGE1_3: if (this->state.stateCnt == 0) { this->state.parent->SendMsg(nullptr, AM_MAKE_NUMBER, 1, 0xFFFF00FF, 114, 0, 0, 0); } break; case EF_SPREADATTACK: this->TexturedClassChange(28); break; case EF_RAPIDSHOWER: if (this->state.stateCnt == 20) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\래피드샤워.wav"); } this->TexturedClassChange(26); break; case EF_MAGICALBULLET: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\매지컬블릿.wav"); } this->TexturedClassChange(27); break; case EF_TRIPLEACTION: if (this->state.stateCnt == 25) { this->render.position = this->state.parent->render.position; g_modeMgr.GetGameMode(); g_soundMgr->PlayWave("effect\\트리플액션.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } this->TexturedClassChange(30); break; case EF_TRACKING: this->TexturedClassChange(29); break; case EF_LIGHTNING_S: this->TexturedClassChange(21); break; case EF_WALLOFTHORN: this->TexturedClassChange(61); break; case EF_VACUUM: this->TexturedClassChange(64); this->TexturedClassChange(65); break; case EF_DEMONICFIRE: this->MonsterSpriteBurst(10); break; case EF_DEMONICFIRE2: this->MonsterSpriteBurst(11); break; case EF_DEMONICFIRE3: this->MonsterSpriteBurst(12); break; case EF_DEMONICFIRE4: this->MonsterSpriteBurst(15); break; case EF_BLIND_S: this->TexturedClassChange(22); break; case EF_POISON_S: this->TexturedClassChange(23); break; case EF_FREEZING_S: this->TexturedClassChange(24); break; case EF_FLARE_S: this->TexturedClassChange(25); break; case EF_SU_LUNATIC_CARROT_BEAT: this->TexturedClassChange(90); break; case EF_TATAMI: this->TexturedClassChange(16); break; case EF_BAKU: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\폭염룡.wav"); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_HYOUSYOURAKU: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\빙정락.wav"); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_KAEN: this->TexturedClassChange(19); break; case EF_DESPERADO: if (this->state.stateCnt == 10) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\데스페라도.wav"); } this->TexturedClassChange(20); break; case EF_CHOOKGI3: this->ElementalOrbit(3); break; case EF_BASH3D5: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\더스트샷.wav"); } for (int index = 0; index < 6; ++index) { this->TexturedQuadSpin("effect\\alpha_center.tga", index, 5); } break; case EF_RG_COIN3: if (this->state.stateCnt == 21) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\디스암.wav"); } this->TexturedSprayKind("유저인터페이스\\item\\골드룩스.bmp", 5.0f, 0); this->TexturedSprayKind("유저인터페이스\\item\\더개리슨.bmp", 5.0f, 0); this->TexturedSprayKind("유저인터페이스\\item\\더블샷건.bmp", 5.0f, 0); this->TexturedSprayKind("유저인터페이스\\item\\더스크.bmp", 5.0f, 0); break; case EF_STIN5: if (this->state.stateCnt == 1) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\t_바람방출.wav"); } this->TexturedSlashCross("effect\\270바람.tga"); break; case EF_CHEMICAL4: if (this->state.stateCnt == 28) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\피어싱샷.wav"); } for (int index = 0; index < 4; ++index) { this->LineStreakLayered(20); this->LineStreakLayered(21); } break; case EF_THUNDERSTORM2: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_ThunderStorm.wav"); this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->renderFlag |= 0x200; this->state.currentPrimitive->pattern |= 0x200; this->state.currentPrimitive->deltaPos2.y = -4.5f; this->state.currentPrimitive->animSpeed = 2; this->state.currentPrimitive->size = 2.5f; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\썬더스톰.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\썬더스톰.act"); Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_STIN4: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\풍인.wav"); } for (int index = 0; index < static_cast(this->state.count); ++index) { this->TexturedSlashWave("effect\\270바람.tga", index % 2); } break; case EF_THROWITEM6: this->ThrowItem("유저인터페이스\\item\\베넘나이프.bmp", 3); break; case EF_THROWITEM7: this->ThrowItem("유저인터페이스\\item\\수리검.bmp", 3); break; case EF_THROWITEM8: this->ThrowItem("유저인터페이스\\item\\쿠나이_독.bmp", 3); break; case EF_THROWITEM9: this->ThrowItem("유저인터페이스\\item\\풍마_열화.bmp", 3); break; case EF_THROWITEM10: this->ThrowItem("effect\\coin_a.bmp", 3); break; case EF_BOTTOM_SUITON: this->TexturedFlare("effect\\ring_blue.tga", 14, 0, 0); break; case EF_HYOUSENSOU: this->EarthSpike(2); break; case EF_KOUENKA: this->SakuraFireArrow(); for (int index = 0; index < 2; ++index) { this->TexturedQuadSpin("effect\\alpha_center.tga", index, 2); } break; case EF_BUNSINJYUTSU: this->SpawnPaleBlur(); break; case EF_BUNSINJYUTSU2: this->SpawnLightBlur(); break; case EF_COOKING_OK: if (this->state.stateCnt == 45) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "_heal_effect.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_HAMIDEFENCE: case EF_FIREHIT2: case EF_WEWISH: case EF_POISON_MIST: case EF_ERASER_CUTTER: case EF_LAVA_SLIDE: case EF_SONIC_CLAW: case EF_TINDER_BREAKER: case EF_MIDNIGHT_FRENZY: case EF_VOLCANIC_ASH: case EF_ALL_RAY_OF_PROTECTION: case EF_VENOMFOG: case EF_DUSTSTORM: case EF_DANCE_BLADE_ATK: case EF_INVINCIBLEOFF2: case EF_DEATHSUMMON: case EF_NPC_CHILL: if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_COOKING_FAIL: if (this->state.stateCnt == 50) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "caramel_die.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_TEMP_OK: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "_heal_effect.wav"); } this->TexturedAura("effect\\success.bmp", 3); break; case EF_TEMP_FAIL: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "caramel_die.wav"); } this->TexturedAura("effect\\failed.bmp", 3); break; case EF_FVOICE: this->CHIMTO(2); break; case EF_WINK: this->CHIMTO(1); break; case EF_NPC_STOP2: this->NpcStop(2); break; case EF_NPC_STOP2_DEL: if (this->state.stateCnt == 0) { this->state.parent->SendMsg(nullptr, AM_DELETE_EFFECT, 604, 0, 0, 0, 0, 0); } break; case EF_SIGHT2: { this->render.position = this->state.parent->render.position; const RenderVertex vertex = TransformVert(static_cast(g_modeMgr.GetGameMode())->camera->frame.view, this->state.parent->render.position); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt % 2 == 0) { const int angle = static_cast(static_cast(this->state.stateCnt) * -5.0f); const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); GetRadian(angle); this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 20; this->state.currentPrimitive->deltaPos2.x = sine * 15.0f; this->state.currentPrimitive->deltaPos2.y = -20.0f; this->state.currentPrimitive->deltaPos2.z = cosine * -15.0f; this->state.currentPrimitive->deltaPosAccel.y = 0.1f; this->state.currentPrimitive->animSpeed = 3; this->state.currentPrimitive->size = 2.5f; this->state.currentPrimitive->sizeSpeed = -0.1f; this->state.currentPrimitive->alpha = 50.0f; this->state.currentPrimitive->alphaSpeed = -3.0f; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Sight.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Sight.act"); Owner(this->state.currentPrimitive).InitSegment(); } } break; case EF_KAIZEL: if (this->state.stateCnt == 15) { this->JobLvUp50_2(0); this->JobLvUp50_2(45); } break; case EF_ANGEL3: this->SuperAngel(11, 0); this->SuperAngel(10, 0); break; case EF_TWILIGHT1: for (int index = 0; index < 80; ++index) { this->ScatterItemIcons(0); } break; case EF_TWILIGHT2: for (int index = 0; index < 80; ++index) { this->ScatterItemIcons(1); } break; case EF_TWILIGHT3: for (int index = 0; index < 80; ++index) { this->ScatterItemIcons(2); } break; case EF_BLUEBODY: if ((this->state.parent->render.flags & 0x4000) == 0 && this->state.stateCnt <= 150) { this->state.parent->render.flags += 0x4000; this->state.parent->render.tintPhase = static_cast(this->state.stateCnt / 3); } break; case EF_MADNESS_BLUE: if (this->state.stateCnt % 4 == 0) { if ((this->state.parent->render.flags & 0x4000) == 0) { this->state.parent->render.flags += 0x4000; this->state.parent->render.tintPhase = 20; } } break; case EF_MADNESS_RED: if (this->state.stateCnt % 4 == 0) { if ((this->state.parent->render.flags & 0x40000) == 0) { this->state.parent->render.flags += 0x40000; this->state.parent->render.tintPhase = 20; } } break; case EF_HATED: if (this->state.stateCnt < 200 && (this->state.parent->render.flags & 0x4000) == 0) { this->state.parent->render.flags += 0x4000; if (this->state.stateCnt <= 25) { this->state.parent->render.tintPhase = static_cast(this->state.stateCnt); } if (this->state.stateCnt >= 151 && this->state.stateCnt <= 175) { this->state.parent->render.tintPhase = static_cast(175 - this->state.stateCnt); } } this->ParticleTime("effect\\white02.bmp", 1); break; case EF_HATED2: if (this->state.stateCnt == 10) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_따듯한마법.wav"); } this->ParticleTime("effect\\white02.bmp", 3); break; case EF_BABYBODY_BACK: if (this->state.stateCnt <= 15 && (this->state.parent->render.flags & 16) == 0) { this->state.parent->render.flags += 16; this->state.parent->render.pulsePhases[0] = static_cast(45 - this->state.stateCnt * 3); } break; case EF_THROWITEM4: this->ThrowItem("유저인터페이스\\item\\화염병.bmp", 10); this->ThrowItem("유저인터페이스\\item\\염산병.bmp", 11); break; case EF_THROWITEM5: this->ThrowItem("유저인터페이스\\item\\버서크포션.bmp", 1); break; case EF_GREENBODY: if (this->state.stateCnt < 31) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 0, 255, 0); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } break; case EF_PURPLEBODY: if (this->state.stateCnt < 31) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 255, 0, 255); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } break; case EF_ACIDDEMON: if (this->state.stateCnt == 5) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } this->TexturedFireWall("effect\\ring_black.tga", 33); break; case EF_CLOUD4: for (int index = 0; index < 80; ++index) { this->SkyCloud(3); } break; case EF_CLOUD5: for (int index = 0; index < 80; ++index) { this->SkyCloud(4); } break; case EF_CLOUD6: for (int index = 0; index < 80; ++index) { this->SkyCloud(5); } break; case EF_TAROTCARD1: this->TexturedAura("effect\\Tarot01.tga", 1); break; case EF_TAROTCARD2: this->TexturedAura("effect\\Tarot02.tga", 1); break; case EF_TAROTCARD3: this->TexturedAura("effect\\Tarot03.tga", 1); break; case EF_TAROTCARD4: this->TexturedAura("effect\\Tarot04.tga", 1); break; case EF_TAROTCARD5: this->TexturedAura("effect\\Tarot05.tga", 1); break; case EF_TAROTCARD6: this->TexturedAura("effect\\Tarot06.tga", 1); break; case EF_TAROTCARD7: this->TexturedAura("effect\\Tarot07.tga", 1); break; case EF_TAROTCARD8: this->TexturedAura("effect\\Tarot08.tga", 1); break; case EF_TAROTCARD9: this->TexturedAura("effect\\Tarot09.tga", 1); break; case EF_TAROTCARD10: this->TexturedAura("effect\\Tarot10.tga", 1); break; case EF_TAROTCARD11: this->TexturedAura("effect\\Tarot11.tga", 1); break; case EF_TAROTCARD12: this->TexturedAura("effect\\Tarot12.tga", 1); break; case EF_TAROTCARD13: this->TexturedAura("effect\\Tarot13.tga", 1); break; case EF_TAROTCARD14: this->TexturedAura("effect\\Tarot14.tga", 1); break; case EF_GRAVITATION: this->Gravitation(); break; case EF_DOUBLECASTBODY: if (this->state.stateCnt >= 10 && this->state.stateCnt <= 50) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 255, 0, 0); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } break; case EF_CARTTER: if (this->state.stateCnt == 30) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\wizard_fire_pillar_b.wav"); } for (int index = 0; index < 4; ++index) { this->TexturedTumble("effect\\whitelight.tga", 0); } break; case EF_BOTTOM_HERMODE: this->TexturedSpin("effect\\white02.bmp"); break; case EF_CHEMICAL2DASH: for (int index = 0; index < 4; ++index) { this->LineStreakLayered(10); this->LineStreakLayered(11); } if (this->state.stateCnt == 44) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\연주붕격.wav"); } if (this->state.stateCnt >= 20 && this->state.stateCnt <= 100) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 255, 255, 150); } break; case EF_GROUNDSAMPLE: this->GROUNDSAMPLE(); break; case EF_GI_EXPLOSION: this->TexturedCrossFade("effect\\ring_blue.tga"); break; case EF_BEGINASURA11: this->AsuraStrike(1); break; case EF_05VAL: this->Vallentine(2); break; case EF_ITEMFAST: this->Vallentine(3); break; case EF_MEMORIZE: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\priest_suffragium.wav"); } if (this->state.stateCnt >= 10 && this->state.stateCnt <= 35) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 250, 250, 100); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } break; case EF_SHRINK: if (this->state.stateCnt == 5) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); } if (this->state.stateCnt >= 5 && this->state.stateCnt <= 25) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 250, 250, 100); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } break; case EF_CHOOKGI2: this->ElementalOrbit(1); break; case EF_SLIM: this->TexturedRain("유저인터페이스\\item\\레드슬림포션.bmp", 1); this->TexturedLevelRing("effect\\bbbb.bmp", -16, 1); break; case EF_SLIM2: this->TexturedRain("유저인터페이스\\item\\옐로우슬림포션.bmp", 2); this->TexturedLevelRing("effect\\bbbb.bmp", -16, 2); break; case EF_SLIM3: this->TexturedRain("유저인터페이스\\item\\화이트슬림포션.bmp", 3); this->TexturedLevelRing("effect\\bbbb.bmp", -16, 0); break; case EF_SOULLINK: { this->render.position = this->state.parent->render.position; const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); if (this->state.stateCnt == 0) { g_soundMgr->PlayWave( "effect\\T_캐스팅.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } if (this->state.stateCnt == 145) { g_soundMgr->PlayWave( "effect\\T_영혼.wav", this->render.position.x - player->render.position.x, -50.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } } this->TexturedOrbit("effect\\whitelight.tga"); this->SoulLink(0); break; case EF_SOULLIGHT: this->TexturedStorm2("effect\\whitelight.tga", 0); break; case EF_AUTOSHADOWSPELL_ACTIVE: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); } if (this->state.parent->render.enabled != 0 && this->state.parent->render.state == 0) { if (this->state.stateCnt <= 15) { this->state.parent->render.angle += 12.0f; } else if (this->state.stateCnt <= 30) { this->state.parent->render.angle += 18.0f; } else if (this->state.stateCnt <= 40) { this->state.parent->render.angle += 24.0f; } else { this->state.parent->render.angle += 48.0f; } if (this->state.parent->render.angle > 360.0f) { this->state.parent->render.angle -= 360.0f; } } break; case EF_CASTSPIN: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); } if (this->state.parent->render.state == 0) { if (this->state.stateCnt <= 15) { this->state.parent->render.angle += 12.0f; } else if (this->state.stateCnt <= 30) { this->state.parent->render.angle += 18.0f; } else if (this->state.stateCnt <= 40) { this->state.parent->render.angle += 24.0f; } else { this->state.parent->render.angle += 48.0f; } if (this->state.parent->render.angle > 360.0f) { this->state.parent->render.angle -= 360.0f; } } break; case EF_PIERCEBODY: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); } if (this->state.stateCnt >= 0 && this->state.stateCnt <= 140) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 250, 250, 100); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } break; case EF_GUARD2: this->BlackMaximize("effect\\a01.bmp"); if (this->state.stateCnt >= 10 && this->state.stateCnt <= 30) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 250, 250, 250); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } break; case EF_RG_COIN2: if (this->state.stateCnt != 1) { if (this->state.stateCnt != 11) { if (this->state.stateCnt != 21) { if (this->state.stateCnt == 31) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } for (int index = 0; index < 4; ++index) { this->TexturedSprayKind("effect\\shield.bmp", 5.0f, 0); this->TexturedSprayKind("effect\\sword.bmp", 9.0f, 0); } break; case EF_SHIELDBOOMERANG2: this->TexturedShieldThrow("effect\\토마.bmp"); break; case EF_SHIELDBOOMERANG3: this->ShieldBoomerang3("effect\\shield_boomerang.bmp"); break; case EF_EDP: this->EnchantPoison2(); if (this->state.stateCnt < 81) { if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 255, 0, 255); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } break; case EF_CHEMICALBODY: if (this->state.stateCnt < 31) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 0, 0, 255); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } break; case EF_BLUEFALL: this->WaterfallSheets(0, 0, 0); break; case EF_BLUEFALL_90: this->WaterfallSheets(1, 0, 0); break; case EF_FASTBLUEFALL: this->WaterfallSheets(0, 1, 0); break; case EF_FASTBLUEFALL_90: this->WaterfallSheets(1, 1, 0); break; case EF_BIG_PORTAL: this->TexturedMagicRing(0); break; case EF_BIG_PORTAL2: this->TexturedMagicRing(1); break; case EF_SCREEN_QUAKE: if (this->state.stateCnt < 100 && this->state.stateCnt % 5 == 0) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } break; case EF_HITTEXTURE: this->TexturedAura("effect\\freeze_a.bmp", 2); break; case EF_STIN3: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_에너지방출.wav"); } this->SMA(1); break; case EF_SMA: this->SMA(0); break; case EF_SMA2: this->TexturedBlueRing("effect\\ring_blue.tga"); break; case EF_SMA3: this->TexturedComet("effect\\thunder_ball_0001.bmp", 1); break; case EF_QUAKEBODY3: if (this->state.stateCnt >= 31 && this->state.stateCnt <= 50) { this->state.parent->render.flags |= 0x2000; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } break; case EF_QUAKEBODY4: if (this->state.stateCnt == 20) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\ef_hit6.wav"); } if (this->state.stateCnt > 20) { this->state.parent->render.flags |= 0x2000; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); if (this->state.stateCnt % 2 == 0) { this->state.parent->SetColor(-1, 250, 50, 50); } else { this->state.parent->SetColor(-1, 255, 255, 255); } } break; case EF_RED_HIT: if (this->state.stateCnt <= 16) { this->state.parent->render.flags |= 0x40000; this->state.parent->render.tintPhase = static_cast(this->state.stateCnt * 3); } break; case EF_BLUE_HIT: if (this->state.stateCnt <= 16) { this->state.parent->render.flags |= 0x4000; this->state.parent->render.tintPhase = static_cast(this->state.stateCnt * 3); } break; case EF_REDLIGHTBODY: case EF_UNK_1398: if ((this->state.parent->render.flags & 0x40000) == 0) { this->state.parent->render.flags += 0x40000; if (this->state.stateCnt <= 200) { this->state.parent->render.tintPhase = static_cast(static_cast(this->state.stateCnt) * 0.125f); } else { this->state.parent->render.tintPhase = 25; } } break; case EF_RO2YEAR: this->Vallentine(4); break; case EF_SMA_READY: this->ParticleTime("effect\\white02.bmp", 2); break; case EF_STIN: if (this->state.stateCnt == 10) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_바람마법.wav"); } this->TexturedSlashFan("effect\\270바람.tga"); break; case EF_STIN2: if (this->state.stateCnt == 5 || this->state.stateCnt == 20 || this->state.stateCnt == 35 || this->state.stateCnt == 50 || this->state.stateCnt == 65) { this->render.position = this->state.parent->render.position; g_modeMgr.GetGameMode(); g_soundMgr->PlayWave( "effect\\T_날라차기.wav", 0.0f, this->state.stateCnt <= 50 ? static_cast(5 - this->state.stateCnt) : -50.0f, 0.0f, 250, 40, 1.0f, 0 ); } this->TexturedSlashLevel("effect\\270바람.tga", 0); this->TexturedSlashLevel("effect\\270바람.tga", 1); break; case EF_HOMUNCASTING: this->TexturedSpellRings("effect\\ring_red.tga"); break; case EF_HFLIMOON1: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\h_moonlight_1.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_HFLIMOON2: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\h_moonlight_2.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_HFLIMOON3: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\h_moonlight_3.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_HO_UP: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "levelup.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_CRYSTAL_BLUE: this->ColoredFlash(2, 0, 0, 255); break; case EF_FOOD01: case EF_FOOD02: case EF_FOOD03: case EF_FOOD04: case EF_FOOD05: case EF_FOOD06: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "_heal_effect.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_HAMICASTLE: this->TexturedClassChange(0); break; case EF_HAMIBLOOD: this->TexturedClassChange(1); break; case EF_ITEM_THUNDER: this->TexturedClassChange(2); break; case EF_ITEM_CLOUD: this->TexturedClassChange(3); break; case EF_ITEM_CURSE: this->TexturedClassChange(4); break; case EF_ITEM_ZZZ: this->TexturedClassChange(5); break; case EF_ITEM_RAIN: this->TexturedClassChange(6); break; case EF_ITEM_LIGHT: this->ForestLight("effect\\cloud11.tga", 11); break; case EF_M01: this->TexturedClassChange(7); break; case EF_M02: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\풀버스터.wav"); } this->TexturedClassChange(8); break; case EF_M03: this->TexturedClassChange(9); break; case EF_M04: this->TexturedClassChange(10); break; case EF_M05: this->TexturedClassChange(11); break; case EF_M06: this->TexturedClassChange(12); break; case EF_M07: this->TexturedClassChange(13); break; case EF_HAPGYEOK: this->TexturedClassChange(14); this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_DRAGONFEAR: if (this->state.stateCnt == 1) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\dragonfear.wav"); g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_MOCHI: case EF_LAMADAN: case EF_MAPAE: case EF_ITEMPOKJUK: case EF_TRACKCASTING: case EF_BULLSEYE: case EF_WIDECONFUSE: case EF_FLOWERLEAF: case EF_ITEM315: case EF_ITEM316: case EF_ITEM317: case EF_POK_JAP: case EF_ADO_STR: case EF_DHOWL_STR: case EF_2011RWC: case EF_2011RWC2: case EF_NO100_FIRECRACKER: this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_BLEEDING: if (this->state.stateCnt == 1) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\wideb.wav"); } this->ColoredFlash(1, 255, 0, 0); this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_RUN_MAKE_OK: case EF_MIRESULT_MAKE_OK: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\p_success.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_RUN_MAKE_FAILURE: case EF_MIRESULT_MAKE_FAIL: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\p_failed.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_ICEMINE: this->TexturedClassChange(84); break; case EF_ICEMINE_1: this->TexturedClassChange(85); break; case EF_MAXPAIN: this->KyrieGuard("effect\\guardK.tga", 3); break; case EF_YELLOBODY: this->state.parent->SetColor(-1, 251, 200, 4); break; case EF_COLORPAPER2: for (int index = 0; index < 50; ++index) { this->WeddingBurst("effect\\white02.bmp", 1); } break; case EF_GC_DARKCROW: if (!this->ProcessEZ2STR(0.0f, 40.0f, 0.0f)) { return false; } break; case EF_RK_DRAGONBREATH_WATER: this->TexturedClassChange(86); break; case EF_ALL_FULL_THROTTLE: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\all_full_throttle.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_SR_FLASHCOMBO: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\sr_flashcombo.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_RK_LUXANIMA: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\rk_luxanima.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_SO_ELEMENTAL_SHIELD: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\so_elemental_shield.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_AB_OFFERTORIUM: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\ab_offertorium.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_AB_OFFERTORIUM_RING: if (!this->ProcessEZ2STR(0.0f, -5.0f - static_cast(reinterpret_cast(this->state.parent)->MountHeightOffset()), 0.0f)) { return false; } break; case EF_WL_TELEKINESIS_INTENSE: if (!this->ProcessEZ2STR(0.0f, 0.0f, 0.0f)) { return false; } break; case EF_GN_ILLUSIONDOPING: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\gn_illusiondoping.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_NC_MAGMA_ERUPTION: if (!this->ProcessEZ2STR(0.0f, -25.0f, 0.0f)) { return false; } break; case EF_LG_KINGS_GRACE: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { const vector3d offset = {0.0f, 0.0f, 0.0f}; for (int angle = 0; angle < 1440; angle += 360) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 171, offset.x, offset.y, offset.z, WorldObjects())->state; this->state.currentPrimitive->renderFlag = 5; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->slots[0].life = 1; this->state.currentPrimitive->slots[0].height[0] = 0.0f; this->state.currentPrimitive->slots[0].height[1] = 0.0f; this->state.currentPrimitive->slots[0].height[2] = 0.0f; this->state.currentPrimitive->slots[0].height[3] = 0.0f; this->state.currentPrimitive->slots[0].height[4] = 0.0f; this->state.currentPrimitive->slots[0].height[5] = 0.0f; this->state.currentPrimitive->slots[0].height[6] = static_cast(angle / 4); this->state.currentPrimitive->slots[0].height[7] = -8.0f; this->state.currentPrimitive->slots[0].height[8] = 0.0f; this->state.currentPrimitive->slots[0].height[9] = 0.0f; this->state.currentPrimitive->slots[0].height[10] = 0.0f; this->state.currentPrimitive->slots[0].distance = 8.0f; this->state.currentPrimitive->slots[0].flag1[0] = 1; this->state.currentPrimitive->slots[0].alphaB = 0; this->state.currentPrimitive->slots[0].process = 0; this->state.currentPrimitive->totalTexture = 1; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\lg_kings_grace.tga", 0, false, true, false); } } break; case EF_CLOUD10: for (int index = 0; index < 30; ++index) { this->SkyCloud(5); } break; case EF_BLOODDRAIN2: this->RedParticleSpray(1); break; case EF_NPC_WIDEWEB: this->TexturedClassChange(87); break; case EF_NPC_BURNT: this->TexturedClassChange(88); break; case EF_WHITEBODY: if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 255, 255, 255); break; case EF_JUMPBODY1: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_회피2.wav"); } if ((this->state.parent->render.flags & 0x10000) == 0 && this->state.stateCnt > 10) { this->state.parent->render.flags += 0x10000; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 10); } break; case EF_ESCAPE: { float x = this->state.parent->render.position.x - this->state.deltaPos[0]; float y = this->state.parent->render.position.y - this->state.deltaPos[1]; float z = this->state.parent->render.position.z - this->state.deltaPos[2]; const float step = SquareRoot(x * x + y * y + z * z) * 0.5f; const float inverse = 1.0f / SquareRoot(x * x + y * y + z * z); x *= inverse; y *= inverse; z *= inverse; this->state.parent->SetColor(-1, 200, 200, 0); if (this->state.stateCnt % 5 == 0) { CHalluPC* hallu = new CHalluPC(reinterpret_cast(this->state.parent)); hallu->render.position.x = this->state.deltaPos[0]; hallu->render.position.y = this->state.deltaPos[1]; hallu->render.position.z = this->state.deltaPos[2]; hallu->SendMsg(this, 0, 200, 200, 0, 0, 0, 0); WorldObjects().push_back(hallu); this->state.deltaPos[0] += x * step; this->state.deltaPos[1] += y * step; this->state.deltaPos[2] += z * step; } } break; case EF_XENO_SLASHER: if (this->state.stateCnt == 20) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\기공포.wav"); } if (this->state.stateCnt >= 0 && this->state.stateCnt <= 10) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 0, 255, 0); } this->SonicWave(2); break; case EF_POWER_OF_GAIA: this->TexturedPulseKind("effect\\ring_yellow.tga", 4); break; case EF_SU_CN_METEOR: for (int index = 0; index < 40; ++index) { this->SkyCloud(11); this->SkyCloud(12); this->SkyCloud(13); this->SkyCloud(14); } break; case EF_SU_SOUL_ATTACK: if (this->state.stateCnt >= EffectLifetime(1122) - 1) { this->state.stateCnt = 0; } case EF_CIRCLEPOWER: this->EmpShockBurst("effect\\emp shock.tga", 0); break; case EF_SU_SPIRIT_OF_LIFE: if (EffectLifetime(1131) - 1 <= this->state.stateCnt) { this->state.stateCnt = 0; } if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 255, 255, 255); break; case EF_SU_STOOP: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\mon_금강불괴.wav"); } break; case EF_RL_B_TRAP: this->ElementalOrbit(4); break; case EF_RL_HAMMER_OF_GOD: for (int index = 0; index < 65; ++index) { this->SkyCloud(15); } break; case EF_RL_R_TRIP: this->state.parent->SetColor(-1, 220, 150, 0); break; case EF_IMMUNE_PROPERTY: this->KyrieGuard("effect\\guardK.tga", 4); break; case EF_MOVE_COORDINATE: for (int index = 0; index < 30; ++index) { this->WhiteLightTrail("effect\\whitelight.tga", 1); } for (int index = 0; index < 4; ++index) { const int angle = index * 90; this->TexturedScatterArc("effect\\peong1.tga", angle, 1); this->TexturedScatterArc("effect\\peong2.tga", angle, 1); this->TexturedScatterArc("effect\\peong3.tga", angle, 1); this->TexturedScatterArc("effect\\peong2.tga", angle, 1); } break; case EF_WARPZONE3: this->AlphaDownRipples("effect\\ring_red.tga", 1); break; case EF_SMA_BLACK: this->SMA(99); break; case EF_SMA_BLACK2: this->BlueRingStack(); break; case EF_STIN_BLACK: if (this->state.stateCnt == 5 || this->state.stateCnt == 20 || this->state.stateCnt == 35 || this->state.stateCnt == 50 || this->state.stateCnt == 65) { this->render.position = this->state.parent->render.position; g_modeMgr.GetGameMode(); g_soundMgr->PlayWave( "effect\\T_날라차기.wav", 0.0f, this->state.stateCnt <= 50 ? static_cast(5 - this->state.stateCnt) : -50.0f, 0.0f, 250, 40, 1.0f, 0 ); } this->TexturedSlashLevel("effect\\270바람.tga", 4); this->TexturedSlashLevel("effect\\270바람.tga", 5); break; case EF_PEONG_BLACK: this->SonicSlashFan(1); if (this->state.stateCnt >= 50 && this->state.stateCnt <= 80) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, (125 - this->state.stateCnt) * 2, (125 - this->state.stateCnt) * 2, 250); } break; case EF_ENERGYDRAIN_BLACK: this->SonicSlashFan(2); if (this->state.stateCnt >= 50 && this->state.stateCnt <= 80) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, (125 - this->state.stateCnt) * 2, (125 - this->state.stateCnt) * 2, 250); } break; case EF_BLINK_BODY: if (this->state.stateCnt < 61) { if ((this->state.parent->render.flags & 8) != 0) { this->state.parent->render.flags += 8; } if (this->state.stateCnt % 2 == 0) { if ((this->state.parent->render.flags & 1) != 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 155, 155, 255); } else { this->state.parent->SetColor(-1, 50, 50, 50); } } break; case EF_LINELINK5: this->TrackCloud(0); break; case EF_SOLAR_EXPLOSION: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\mon_침투경.wav"); } if ((this->state.parent->render.flags & 0x40) == 0 && this->state.stateCnt >= 14 && this->GetDuration() > this->state.stateCnt) { this->state.parent->render.flags += 0x40; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 14); } break; case EF_SOUL_REAPER_COLLECT: this->DigitalSpace(1240); break; case EF_NEW_SEVERERAINSTORM_HIT: if (this->state.stateCnt % 30 == 0) { const vector3d& position = this->state.parent->render.position; g_effectMgr->Spawn(0, g_serviceOptions.Get(229) ? 1533 : 1285, position, 0, -1, 0, 0); } this->SevereRainstormCylinder(45, "", 3, 3.0f); this->SevereRainstormCylinder(45, "", 3, 3.0f); this->SevereRainstormCylinder(45, "", 3, 8.0f); this->SevereRainstormCylinder(45, "", 3, 8.0f); break; case EF_NEW_CART_TORNADO: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_회오리차기.wav"); } if (this->state.stateCnt <= 47) { this->state.parent->render.angle += 30.0f; if (this->state.parent->render.angle > 360.0f) { this->state.parent->render.angle -= 360.0f; } } break; case EF_NEW_HEAVENS_DRIVE: this->StoneSpike(); break; case EF_NEW_TRIPLEATTACK: for (int index = 0; index < 4; ++index) { this->LineStreak(0); this->LineStreak(1); } break; case EF_NEW_MOON_SLASH: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\new_comet\\new_comet_cast_ring\\ring_rainbow.tga", 20); } break; case EF_NEW_GRANDCROSS: if ((this->state.parent->render.flags & 0x4000) == 0) { this->state.parent->render.flags += 0x4000; if (this->state.stateCnt <= 150) { this->state.parent->render.tintPhase = static_cast(this->state.stateCnt / 8); } else { this->state.parent->render.tintPhase = 15; } } break; case EF_NEW_FROSTMISTY: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->QuadRingStackSized("effect\\new_jackfrost\\ring_ice.tga", 2); } break; case EF_NEW_JACKFROST_ART: { const vector3d offset = {0.0f, 0.0f, 0.0f}; this->render.position = this->state.parent->render.position; if (this->state.stateCnt % 40 == 0) { for (int index = 1; index < 4; ++index) { const int distance = std::max(rand() % 17, 5); matrix rotation; rotation.MakeYRotation(static_cast(index) * 5.0f * 20.0f / 180.0f * 3.141592f); const float* m = rotation.values; const float x = m[0] * static_cast(distance) + m[3] * offset.x + m[6] * offset.x + m[9] + this->render.position.x; const float y = m[1] * static_cast(distance) + m[4] * offset.x + m[7] * offset.x + m[10] + this->render.position.y; const float z = m[2] * static_cast(distance) + m[5] * offset.x + m[8] * offset.x + m[11] + this->render.position.z; g_effectMgr->Spawn(0, g_serviceOptions.Get(229) ? 1544 : 1447, vector3d{x, y, z}, 0, -1, 0, 0); } } if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, offset.x, offset.y, offset.z, WorldObjects())->state; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->pattern |= 0x800; this->state.currentPrimitive->longitude = 0.0f; this->state.currentPrimitive->longSpeed = 2.5f; this->state.currentPrimitive->roll = 90.0f; this->state.currentPrimitive->changeWidthAccel = 0.0f; this->state.currentPrimitive->changeHeightAccel = 0.0f; this->state.currentPrimitive->widthSize = 40.0f; this->state.currentPrimitive->heightSize = 40.0f; this->state.currentPrimitive->widthSpeed = -1.0f; this->state.currentPrimitive->heightSpeed = -1.0f; this->state.currentPrimitive->changePoint = 20; this->state.currentPrimitive->changeWidthSpeed = 0.0f; this->state.currentPrimitive->changeHeightSpeed = 0.0f; this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; this->state.currentPrimitive->red = 254; this->state.currentPrimitive->blue = 254; this->state.currentPrimitive->green = 254; this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\new_jackfrost\\new_jackfrost_magicrune\\jack_magic_rune.tga", 0, false, true, false); } } break; case EF_WHITEIMPRISON_STATE: this->TexturedAura("effect\\Buff_Prison.bmp", 31); break; case EF_POK_THUNDER: this->TexturedClassChange(91); break; case EF_NEW_MAGNUM_BREAK: if (this->state.stateCnt >= 0) { this->state.parent->render.flags |= 0x1000; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } if (this->state.stateCnt <= 30) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 0, 0, 255); } break; case EF_NEW_HEAL_BLUE: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( "effect\\EF_BeginSpell.wav", this->render.position.x - player->render.position.x, -100.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } this->TexturedQuadRingSized(45, "effect\\ring_blue.tga", 20); this->TexturedQuadRingSized(25, "effect\\ring_blue.tga", 21); } break; case EF_FLAME_TRAP_RING: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( "effect\\EF_BeginSpell.wav", this->render.position.x - player->render.position.x, -100.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } this->TexturedQuadRingSized(45, "effect\\ring_red.tga", 44); this->TexturedQuadRingSized(25, "effect\\ring_red.tga", 44); } break; case EF_NEW_PRAMEN_RING: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( "effect\\EF_BeginSpell.wav", this->render.position.x - player->render.position.x, -100.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } this->TexturedQuadRingSized(90, "effect\\new_pramen\\ring_blue.tga", 5); } break; case EF_NEW_HEAL_WHITE: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 22); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 22); } break; case EF_NEW_HEAL_YELLOW: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_yellow.tga", 23); this->TexturedQuadRingSized(25, "effect\\ring_yellow.tga", 23); } break; case EF_NEW_CROSSIMPACT_HIT: for (int index = 0; index < 2; ++index) { if (g_serviceOptions.Get(229)) { this->LineStreakTextured(10, "effect\\mineffect\\new_crossimpact\\new_crossimpact_line\\line_pitch.tga"); this->LineStreakTextured(11, "effect\\mineffect\\new_crossimpact\\new_crossimpact_line\\line_pitch.tga"); this->LineStreakTextured(10, "effect\\mineffect\\new_crossimpact\\new_crossimpact_line\\line_red.tga"); this->LineStreakTextured(11, "effect\\mineffect\\new_crossimpact\\new_crossimpact_line\\line_red.tga"); } else { this->LineStreakTextured(10, "effect\\new_crossimpact\\new_crossimpact_line\\line_pitch.tga"); this->LineStreakTextured(11, "effect\\new_crossimpact\\new_crossimpact_line\\line_pitch.tga"); this->LineStreakTextured(10, "effect\\new_crossimpact\\new_crossimpact_line\\line_red.tga"); this->LineStreakTextured(11, "effect\\new_crossimpact\\new_crossimpact_line\\line_red.tga"); } } break; case EF_ABC_CHASING_LINE: { std::string path("effect\\ABYSS_CHASER\\ABC_CHASING_BREAK\\chasing_line\\"); for (int index = 0; index < 2; ++index) { if (g_serviceOptions.Get(229)) { this->LineStreakTextured(20, (path + "min_line_pitch2.tga").c_str()); this->LineStreakTextured(21, (path + "min_line_pitch2.tga").c_str()); this->LineStreakTextured(20, (path + "min_line_pur.tga").c_str()); this->LineStreakTextured(21, (path + "min_line_pur.tga").c_str()); } else { this->LineStreakTextured(20, (path + "line_pitch2.tga").c_str()); this->LineStreakTextured(21, (path + "line_pitch2.tga").c_str()); this->LineStreakTextured(20, (path + "line_pur.tga").c_str()); this->LineStreakTextured(21, (path + "line_pur.tga").c_str()); } } } break; case EF_ABC_CROSSIMPACT_LINE: for (int index = 0; index < 2; ++index) { if (g_serviceOptions.Get(229)) { this->LineStreakTextured(30, "effect\\mineffect\\new_crossimpact\\new_crossimpact_line\\line_pitch.tga"); this->LineStreakTextured(31, "effect\\mineffect\\new_crossimpact\\new_crossimpact_line\\line_pitch.tga"); this->LineStreakTextured(30, "effect\\mineffect\\new_crossimpact\\new_crossimpact_line\\line_red.tga"); this->LineStreakTextured(31, "effect\\mineffect\\new_crossimpact\\new_crossimpact_line\\line_red.tga"); } else { this->LineStreakTextured(30, "effect\\new_crossimpact\\new_crossimpact_line\\line_pitch.tga"); this->LineStreakTextured(31, "effect\\new_crossimpact\\new_crossimpact_line\\line_pitch.tga"); this->LineStreakTextured(30, "effect\\new_crossimpact\\new_crossimpact_line\\line_red.tga"); this->LineStreakTextured(31, "effect\\new_crossimpact\\new_crossimpact_line\\line_red.tga"); } } break; case EF_NEW_GATEOFHELL: for (int index = 0; index < 4; ++index) { if (g_serviceOptions.Get(229)) { this->LineStreakTextured(10, "effect\\mineffect\\new_gateofhell\\line_hell.tga"); this->LineStreakTextured(11, "effect\\mineffect\\new_gateofhell\\line_hell.tga"); } else { this->LineStreakTextured(10, "effect\\new_gateofhell\\line_hell.tga"); this->LineStreakTextured(11, "effect\\new_gateofhell\\line_hell.tga"); } } break; case EF_NEW_METALLICSOUND_LINE: if (g_serviceOptions.Get(229)) { this->TexturedBeam(2, "effect\\mineffect\\new_metalicsound\\new_metalicsound_line\\met_damege_line_1.tga"); this->TexturedForkBolt("effect\\mineffect\\new_metalicsound\\new_metalicsound_icon\\met_particle_1.tga", 2); this->TexturedForkBolt("effect\\mineffect\\new_metalicsound\\new_metalicsound_icon\\met_particle_2.tga", 2); this->TexturedForkBolt("effect\\mineffect\\new_metalicsound\\new_metalicsound_icon\\met_particle_3.tga", 2); } else { this->TexturedBeam(2, "effect\\new_metalicsound\\new_metalicsound_line\\met_damege_line_1.tga"); this->TexturedForkBolt("effect\\new_metalicsound\\new_metalicsound_icon\\met_particle_1.tga", 2); this->TexturedForkBolt("effect\\new_metalicsound\\new_metalicsound_icon\\met_particle_2.tga", 2); this->TexturedForkBolt("effect\\new_metalicsound\\new_metalicsound_icon\\met_particle_3.tga", 2); } break; case EF_NEW_REVERBERATION: if (g_serviceOptions.Get(229)) { this->TexturedDrop("effect\\mineffect\\new_reverberation\\melody_a.bmp", 2); } else { this->TexturedDrop("effect\\new_reverberation\\melody_a.bmp", 2); } this->WhiteRingRippleSized(28); break; case EF_NEW_REVERBERATION_NOTE: if (g_serviceOptions.Get(229)) { this->TexturedSpinShards("effect\\mineffect\\new_reverberation\\rev_note_01.tga", 3); this->TexturedSpinShards("effect\\mineffect\\new_reverberation\\rev_note_02.tga", 3); } else { this->TexturedSpinShards("effect\\new_reverberation\\rev_note_01.tga", 3); this->TexturedSpinShards("effect\\new_reverberation\\rev_note_02.tga", 3); } break; case EF_GUARD5: this->KyrieGuard("effect\\guardK.tga", 5); break; case EF_MAGIC_CIRCLE_1: this->TexturedAura("effect\\마법진1-3.bmp", 32); break; case EF_BIO5_PLANT_GREEN: case EF_BIO5_PLANT_BLUE: case EF_BIO5_PLANT_YELLOW: case EF_BIO5_PLANT_WHITE: case EF_BIO5_PLANT_RED: if (this->state.stateCnt == 0) { CHalluPlant* plant = new CHalluPlant(); plant->render.position = this->render.position; if (this->state.type == EF_BIO5_PLANT_GREEN) { plant->SetActionName(ResourceMgr::Instance(), "sprite\\몬스터\\green_plant.act"); plant->SetActorJob(1080); } else if (this->state.type == EF_BIO5_PLANT_BLUE) { plant->SetActionName(ResourceMgr::Instance(), "sprite\\몬스터\\blue_plant.act"); plant->SetActorJob(1079); } else if (this->state.type == EF_BIO5_PLANT_YELLOW) { plant->SetActionName(ResourceMgr::Instance(), "sprite\\몬스터\\yellow_plant.act"); plant->SetActorJob(1081); } else if (this->state.type == EF_BIO5_PLANT_WHITE) { plant->SetActionName(ResourceMgr::Instance(), "sprite\\몬스터\\white_plant.act"); plant->SetActorJob(1082); } else if (this->state.type == EF_BIO5_PLANT_RED) { plant->SetActionName(ResourceMgr::Instance(), "sprite\\몬스터\\red_plant.act"); plant->SetActorJob(1078); } plant->SetSprAct(plant->GetEffectiveJob(-1), plant->sex, 0); WorldObjects().push_back(plant); } break; case EF_HELLSPLANT: case EF_POK_MAGIC: this->TexturedClassChange(63); break; case EF_NEW_EPICLESIS_AURA: this->WhiteRingRippleSized(29); break; case EF_NEW_SANCTUARY: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->QuadRingStackSized("effect\\ring_yellow.tga", 33); } break; case EF_NEW_SAFETYWALL: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( "effect\\EF_BeginSpell.wav", this->render.position.x - player->render.position.x, -100.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 31); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 31); } break; case EF_NEW_SONICWAVE: this->TexturedFanSweep("effect\\new_sonicwave\\new_sonicwave\\son_wave_01.tga", 1); this->TexturedFanSweep("effect\\new_sonicwave\\new_sonicwave\\son_wave_00.tga", 0); break; case EF_NEW_EARTHDRIVE_CAST: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); if (g_serviceOptions.Get(229)) { this->QuadRingStackSized("effect\\mineffect\\new_earthdrive\\ring_brown.tga", 33); } else { this->QuadRingStackSized("effect\\new_earthdrive\\ring_brown.tga", 33); } } break; case EF_NEW_PNEUMA: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 42); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 42); } break; case EF_NEW_SW_CAST: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 43); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 43); } break; case EF_ABR_INFINITY_RING: if (this->state.parent != nullptr) { this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\new_abr_infinity\\ring_infinty.tga", 0); this->TexturedQuadRingSized(25, "effect\\new_abr_infinity\\ring_infinty.tga", 0); } } break; case EF_NEW_BATTLE_W_ENTITY: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\new_battle_w\\ABR_BATTLE_WARIOR.tga", 0); this->TexturedQuadRingSized(25, "effect\\new_battle_w\\ABR_BATTLE_WARIOR.tga", 0); } break; case EF_NEW_D_CANNON_ENTITY: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\new_d_cannon\\ABR_DUAL_CANNON.tga", 0); this->TexturedQuadRingSized(25, "effect\\new_d_cannon\\ABR_DUAL_CANNON.tga", 0); } break; case EF_PNEUMATICUS_PROCELLA_RING: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\pneumaticusprocella\\pneumaticusprocella_cast\\ring_yellow.tga", 0); this->TexturedQuadRingSized(25, "effect\\pneumaticusprocella\\pneumaticusprocella_cast\\ring_yellow.tga", 0); } break; case EF_ABR_MOTHER: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\new_abr_mother\\abr_mother.tga", 0); this->TexturedQuadRingSized(25, "effect\\new_abr_mother\\abr_mother.tga", 0); } break; case EF_SINCERE_FAITH_RING: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 45); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 45); } break; case EF_POWERFUL_FAITH_RING: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 46); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 46); } break; case EF_FIRM_FAITH_RING: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 47); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 47); } break; case EF_RESEARCH_REPORT_RING: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 48); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 48); } break; case EF_WOODEN_WARRIOR_RING: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 49); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 49); } break; case EF_WOODEN_FAIRY_RING: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 50); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 50); } break; case EF_UNK_2277: this->state.parent->SetColor(-1, 105, 105, 105); break; case EF_UNK_2278: this->state.parent->SetColor(-1, 251, 200, 4); break; case EF_STATUS_CRATE_UP: return this->AgilityChange(1, "effect\\status_effect\\C_rate_Up.bmp"); case EF_STATUS_CRATE_DOWN: return this->AgilityChange(0, "effect\\status_effect\\C_rate_Down.bmp"); case EF_STATUS_HPLUS_UP: return this->AgilityChange(1, "effect\\status_effect\\H_plus_Up.bmp"); case EF_STATUS_HPLUS_DOWN: return this->AgilityChange(0, "effect\\status_effect\\H_plus_Down.bmp"); case EF_STATUS_MRES_UP: return this->AgilityChange(1, "effect\\status_effect\\Mres_Up.bmp"); case EF_STATUS_MRES_DOWN: return this->AgilityChange(0, "effect\\status_effect\\Mres_Down.bmp"); case EF_STATUS_PATK_UP: return this->AgilityChange(1, "effect\\status_effect\\P_atk_Up.bmp"); case EF_STATUS_PATK_DOWN: return this->AgilityChange(0, "effect\\status_effect\\P_atk_Down.bmp"); case EF_STATUS_RES_UP: return this->AgilityChange(1, "effect\\status_effect\\Res_Up.bmp"); case EF_STATUS_RES_DOWN: return this->AgilityChange(0, "effect\\status_effect\\Res_Down.bmp"); case EF_STATUS_SMATK_UP: return this->AgilityChange(1, "effect\\status_effect\\S_matk_Up.bmp"); case EF_STATUS_SMATK_DOWN: return this->AgilityChange(0, "effect\\status_effect\\S_matk_Down.bmp"); case EF_STATUS_PATK_SMATK_UP: return this->AgilityChange(1, "effect\\status_effect\\P_atk_S_matk_Up.bmp"); case EF_THE_ONE_FIGHTER_RISES: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { this->TexturedQuadSpiral("effect\\the_one_fighter_rises\\the_one_fighter_rises\\the_ring_00.tga"); } break; case EF_POK_94: this->TexturedClassChange(94); break; case EF_POK_95: this->TexturedClassChange(95); break; case EF_POK_96: this->TexturedClassChange(96); break; case EF_POK_97: this->TexturedClassChange(97); break; case EF_POK_98: this->TexturedClassChange(98); break; case EF_POK_99: this->TexturedClassChange(99); break; case EF_POK_100: this->TexturedClassChange(100); break; case EF_POK_101: this->TexturedClassChange(101); break; case EF_POK_102: this->TexturedClassChange(102); break; case EF_POK_103: this->TexturedClassChange(103); break; case EF_POK_104: this->TexturedClassChange(104); break; case EF_POK_105: this->TexturedClassChange(105); break; case EF_BEGINSPELL_RING_YELLOW: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_yellow.tga", 0); this->TexturedQuadRingSized(25, "effect\\ring_yellow.tga", 0); } break; case EF_BEGINSPELL_SWIRL: this->BeginSpellSwirl(45, "", 11); break; case EF_BEGINSPELL_RING_WHITE: if (this->state.stateCnt == 0) { g_soundMgr->PlayWave("effect\\EF_BeginSpell.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } this->TexturedQuadRing(25, "effect\\ring_white.tga", 0); this->TexturedQuadRing(45, "effect\\ring_white.tga", 0); break; case EF_VOLCANO_BLACK: if (this->state.stateCnt >= 0) { this->state.parent->render.flags |= 0x1000; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } this->TexturedCrossKind("effect\\ring_black.tga", 4); if (this->state.stateCnt <= 30) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 255, 0, 0); } break; case EF_ALPHA_DOWN_ANIM: if (this->state.stateCnt >= this->state.duration - 1) { this->state.stateCnt = 0; } this->TexturedFourRing("effect\\alpha_down.tga", 0); this->TexturedFourRing("effect\\alpha_down.tga", 1); this->SendMsg(this, AM_CHANGE_COLOR, 0, 255, 115, 0, 0, 0); break; case EF_GLOW_BLACK: this->Map_MagicZone("effect\\glow04_bk.bmp", 5); for (int index = 2; index < 21; index += 2) { this->TexturedOrbitDust("effect\\mpa3.tga", index, 2); } this->SendMsg(this, AM_CHANGE_COLOR, 0, 255, 115, 0, 0, 0); break; case EF_WH_WILD_WALK: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; } for (int index = 0; index < 12; ++index) { this->TexturedQuadSpin("effect\\WINDHAWK\\WH_WILD_WALK\\alpha_center_green.tga", index, 3); } break; case EF_FORCE_ANIM_27: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; this->state.parent->render.state = 27; this->state.parent->SetFrameSequence(96, 5, 5, 96, 5, 1, 25, 0); } else if (this->state.stateCnt == 35) { if (this->state.parent->render.state == 27) { this->state.parent->render.state = 2; } } break; case EF_HEAL_BLUE_2: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; } this->HealRingSparkle("effect\\ring_blue.tga", 2); break; case EF_CRUEL_BITE_LINE: { const char* line = g_serviceOptions.Get(229) ? "effect\\DRUID\\DR_CRUEL_BITE\\min_cruel_bite_line\\line_red.tga" : "effect\\DRUID\\DR_CRUEL_BITE\\cruel_bite_line\\line_red.tga"; const char* black = g_serviceOptions.Get(229) ? "effect\\DRUID\\DR_CRUEL_BITE\\min_cruel_bite_line\\line_black.tga" : "effect\\DRUID\\DR_CRUEL_BITE\\cruel_bite_line\\line_black.tga"; for (int index = 0; index < 2; ++index) { this->TexturedSwirl(1, black); this->TexturedSwirl(0, black); this->TexturedSwirl(1, line); this->TexturedSwirl(0, line); } } break; case EF_QUILL_SPEAR_LINE: { const char* line = g_serviceOptions.Get(229) ? "effect\\DRUID\\AT_QUILL_SPEAR\\min_quill_spear_line\\line_color.tga" : "effect\\DRUID\\AT_QUILL_SPEAR\\quill_spear_line\\line_color.tga"; const char* black = g_serviceOptions.Get(229) ? "effect\\DRUID\\AT_QUILL_SPEAR\\min_quill_spear_line\\line_black.tga" : "effect\\DRUID\\AT_QUILL_SPEAR\\quill_spear_line\\line_black.tga"; for (int index = 0; index < 2; ++index) { this->TexturedSwirl(1, black); this->TexturedSwirl(0, black); this->TexturedSwirl(1, line); this->TexturedSwirl(0, line); } } break; case EF_RG_COIN_BLUE: if (this->state.stateCnt != 1) { if (this->state.stateCnt != 11) { if (this->state.stateCnt != 21) { if (this->state.stateCnt == 31) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } for (int index = 0; index < 4; ++index) { this->TexturedSprayKind("effect\\shield.bmp", 5.0f, 8); this->TexturedSprayKind("effect\\sword.bmp", 9.0f, 8); } break; case EF_RG_COIN_BLUE_2: if (this->state.stateCnt != 1) { if (this->state.stateCnt != 11) { if (this->state.stateCnt != 21) { if (this->state.stateCnt == 31) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } } else { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } for (int index = 0; index < 4; ++index) { this->TexturedSprayKind("effect\\shield.bmp", 5.0f, 9); this->TexturedSprayKind("effect\\sword.bmp", 9.0f, 9); } break; } return true; } // INLINED static void PlayEffectWaveAt(const CRagEffect& effect, const char* name, float height) { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( name, effect.render.position.x - player->render.position.x, height, effect.render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } // OFFSET: 0x00C2CF20 // FUNCTION: fn_20088 bool CRagEffect::OnProcess() { if (!this->state.parent) { return false; } switch (this->state.type) { case EF_FIREWALL: case EF_INCAGILITY: case EF_FIREHIT: case EF_COLDHIT: case EF_WINDHIT: case EF_POISONHIT: case EF_EARTHHIT: case EF_HOLYHIT: case EF_LEVEL99: case EF_LEVEL99_2: case EF_LEVEL99_3: case EF_GUMGANG: case EF_CHOOKGI: case EF_STEELBODY: case EF_HEAL: case EF_HEAL2: case EF_HEAL3: case EF_HEAL4: case EF_BEGINASURA: case EF_LEVEL99_4: case EF_LEVEL99_5: case EF_LEVEL99_6: case EF_DOUBLEGUMGANG: case EF_HALFSPHERE: case EF_ATTACKENERGY: case EF_ATTACKENERGY2: case EF_BLUECASTING: case EF_DARKCASTING: case EF_BEGINASURA1: case EF_BEGINASURA2: case EF_BEGINASURA3: case EF_BEGINASURA4: case EF_BEGINASURA5: case EF_BEGINASURA6: case EF_BEGINASURA7: case EF_FLOWERCAST: case EF_FLOWERCAST2: case EF_FLOWERCAST3: case EF_SOULLINK: case EF_CHOOKGI2: case EF_SOULLIGHT: case EF_TAROTCARD1: case EF_TAROTCARD2: case EF_TAROTCARD3: case EF_TAROTCARD4: case EF_TAROTCARD5: case EF_TAROTCARD6: case EF_TAROTCARD7: case EF_TAROTCARD8: case EF_TAROTCARD9: case EF_TAROTCARD10: case EF_TAROTCARD11: case EF_TAROTCARD12: case EF_TAROTCARD13: case EF_TAROTCARD14: case EF_KAIZEL: case EF_FIREHIT2: case EF_CHOOKGI3: case EF_GREEN99_3: case EF_GREEN99_5: case EF_GREEN99_6: case EF_ORATIO: case EF_CIRCLEPOWER: case EF_VENOMIMPRESS: case EF_FROSTMISTY: case EF_BURNING: case EF_DARKCASTING2: case EF_CHOOKGI_N: case EF_ROLLINGCAST: case EF_SOULLIGHT2: case EF_CIRCLEPOWER2: case EF_CIRCLEPOWER3: case EF_CIRCLEPOWER4: case EF_CIRCLEPOWER5: case EF_CIRCLEPOWER6: case EF_CIRCLEPOWER7: case EF_CIRCLEPOWER8: case EF_LEVEL99_150: case EF_GREENCASTING: case EF_FIREWALL2: case EF_SOULLIGHT3: case EF_COLDSTATUS: case EF_SU_SOUL_ATTACK: break; case EF_STATUS_STATE: if (g_updateTick == 0) { return true; } break; default: if (g_updateTick == 0) { return true; } break; } if (g_updateTick > 0 && this->state.parent->render.effectPhaseBytes[0] == 1) { this->state.parent->render.flags = 0; this->state.parent->render.effectPhaseBytes[0] = 0; } if (this->state.type >= 300 && this->state.type <= 373) { if (!this->OnProcess2()) { return false; } } else if (this->state.type >= 491) { if (!this->OnProcess3()) { return false; } } else { switch (this->state.type) { case EF_HIT1: this->Hit1(); break; case EF_HIT2: this->Hit2(0); break; case EF_HIT3: this->Hit3(); break; case EF_HIT4: this->Hit4(); break; case EF_HIT5: this->Hit5(); break; case EF_HIT6: this->Hit6(); break; case EF_ENTRY: this->Entry(); break; case EF_EXIT: this->Exit(); break; case EF_WARP: this->Warp(); break; case EF_ENHANCE: this->Enhance(); break; case EF_COIN: if (!this->Coin()) { return false; } break; case EF_ENDURE: this->Endure(); break; case EF_BEGINSPELL: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_yellow.tga", 1); this->TexturedQuadRingSized(25, "effect\\ring_yellow.tga", 1); } break; case EF_GLASSWALL: if (!this->GlassWall()) { return false; } break; case EF_HEALSP: this->HealSP(); break; case EF_SOULSTRIKE: this->SoulStrike(0); break; case EF_BASH: this->Bash(); break; case EF_MAGNUMBREAK: this->MagnumBreak(); break; case EF_STEAL: this->Steal(); break; case EF_PATTACK: case EF_ENCHANTPOISON: this->PoisonAttack(0); break; case EF_DETOXICATION: this->Detoxication(); break; case EF_SIGHT: this->Sight(); break; case EF_STONECURSE: case EF_PETRIFYATTACK: if (!this->ProcessEZ2STRC3CC40()) { return false; } break; case EF_FIREBALL: this->FireBall(); break; case EF_FIREWALL: case EF_LIGHTBOLT: if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_ICEARROW: this->IceArrow(); break; case EF_FROSTDIVER: this->FrostDiver(0); break; case EF_FROSTDIVER2: this->FrostDiver2(); break; case EF_THUNDERSTORM: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\magician_thunderstorm.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_FIREARROW: this->FireArrow(); break; case EF_NAPALMBEAT: this->NapalmFragments(); break; case EF_RUWACH: this->render.position = this->state.parent->render.position; if (this->state.stateCnt % 3 == 0) { const float turn = this->state.stateCnt / 1.3 * -5.0; const int angle = static_cast(turn); float sine = ClientSine(angle); float cosine = ClientCosine(angle); GetRadian(angle); this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 25; sine *= 15.0f; this->state.currentPrimitive->deltaPos2.x = sine; this->state.currentPrimitive->deltaPos2.y = -10.0f; cosine *= -15.0f; this->state.currentPrimitive->deltaPos2.z = cosine; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle2.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle2.act"); this->state.currentPrimitive->size = 3.0f; this->state.currentPrimitive->sizeSpeed = -0.1f; this->state.currentPrimitive->alpha = 250.0f; this->state.currentPrimitive->alphaSpeed = -3.0f; this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 6; Owner(this->state.currentPrimitive).InitSegment(); this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 25; this->state.currentPrimitive->deltaPos2.x = sine; this->state.currentPrimitive->deltaPos2.y = 0.0f; this->state.currentPrimitive->deltaPos2.z = cosine; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "Shadow.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "Shadow.act"); this->state.currentPrimitive->animSpeed = 2; this->state.currentPrimitive->size = 1.5f; this->state.currentPrimitive->sizeSpeed = -0.06f; this->state.currentPrimitive->alpha = 150.0f; this->state.currentPrimitive->alphaSpeed = -2.5f; this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 6; Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_TELEPORTATION: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_Teleportation.wav"); this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 60; this->state.currentPrimitive->pattern |= 1; this->state.currentPrimitive->outerSize = 4.0f; this->state.currentPrimitive->innerSize = 4.0f; this->state.currentPrimitive->heightSpeed = 5.0f; this->state.currentPrimitive->heightAccel = 0.25f; this->state.currentPrimitive->longSpeed = 2.0f; this->state.currentPrimitive->fadeOutCnt = 0; AllocateTextures(*this->state.currentPrimitive); this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } break; case EF_READYPORTAL: if (this->state.stateCnt % 14 == 0) { PlayEffectWave(*this, "effect\\EF_ReadyPortal.wav"); this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 30; this->state.currentPrimitive->deltaPos2.y = -1.0f; this->state.currentPrimitive->innerSize = 8.0f; this->state.currentPrimitive->latitude = 90.0f; EffectPrimitiveState& tilted = *this->state.currentPrimitive; reinterpret_cast(tilted.transform)->MakeXRotation(GetRadian(static_cast(tilted.latitude))); this->state.currentPrimitive->radiusSpeed = 1.0f; EffectPrimitiveState& ring = *this->state.currentPrimitive; ring.radiusAccel = -(ring.radiusSpeed / static_cast(ring.duration)) * g_depthAverageHalf; EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 2; Owner(this->state.currentPrimitive).InitSegment(); AllocateTextures(*this->state.currentPrimitive); this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } break; case EF_PORTAL: this->Portal(); break; case EF_INCAGILITY: this->IncAgility(); break; case EF_DECAGILITY: this->DecAgility(); break; case EF_AQUA: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_Aqua.wav"); this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->deltaPos2.y = -20.0f; this->state.currentPrimitive->animSpeed = 2; this->state.currentPrimitive->repeatAnim = 0; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\성수뜨기.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\성수뜨기.act"); Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_SIGNUM: if (!this->Signum()) { return false; } break; case EF_ANGELUS: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_Angelus.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_BLESSING: this->Blessing(); break; case EF_INCAGIDEX: this->IncAgiDex(); break; case EF_SMOKE: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { const int count = std::max(rand() % 4, 0) + 1; for (int index = 0; index < count; ++index) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = this->state.duration; EffectPrimitiveState& tilted = *this->state.currentPrimitive; reinterpret_cast(tilted.transform)->MakeXRotation(GetRadian(std::max(rand() % 30, 0) + 75)); EffectPrimitiveState& turned = *this->state.currentPrimitive; reinterpret_cast(turned.transform)->AppendYRotation(GetRadian(std::max(rand() % 360, 0))); this->state.currentPrimitive->deltaPos2.y = -9.0f; this->state.currentPrimitive->rollSpeed = 0.75f; this->state.currentPrimitive->speed = static_cast(std::max(rand() % 3, 0) + 3) / 10.0f; this->state.currentPrimitive->size = 1.5f; EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 3; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\굴뚝연기.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\굴뚝연기.act"); Owner(this->state.currentPrimitive).InitSegment(); } } break; case EF_FIREFLY: this->FireSparks(); break; case EF_SANDWIND: this->SandScatter(); break; case EF_TORCH: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->pattern |= 0x200; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->deltaPos2.y = -10.0f; if (this->state.param[0] <= 0.0f) { this->state.param[0] = 1.0f; } if (this->state.param[1] < 1.0f) { this->state.param[1] = 1.0f; } this->state.currentPrimitive->size = this->state.param[0]; this->state.currentPrimitive->animSpeed = static_cast(this->state.param[1]); Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\torch_01.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\torch_01.act"); Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_SPRAYPOND: this->SprayPond(); break; case EF_FIREHIT: if (this->state.stateCnt == 0) { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( g_session.GetEnemyHitWaveName(3), this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_FIRESPLASHHIT: { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; g_renderer->viewport.Project(&this->state.parent->render.position.x, view, vertex); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; const int roll = rand() % 360; if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 30; this->state.currentPrimitive->deltaPos2.y = -20.0f; this->state.currentPrimitive->widthSize = 10.0f; this->state.currentPrimitive->heightSize = 10.0f; this->state.currentPrimitive->widthSpeed = 5.7f; this->state.currentPrimitive->heightSpeed = 5.7f; this->state.currentPrimitive->roll = static_cast(std::max(roll, 0)); this->state.currentPrimitive->rollSpeed = -18.0f; EffectPrimitiveState& spin = *this->state.currentPrimitive; spin.rollAccel = -(spin.rollSpeed / static_cast(spin.duration)) / 2.5f; EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 2; AllocateTextures(*this->state.currentPrimitive); this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\FireRing.tga", 0, false, true, false); this->state.currentPrimitive->slots[0].life = 0; } break; } case EF_COLDHIT: this->ColdHit(); break; case EF_WINDHIT: case EF_ARROWSHOT: case EF_BRANDISHSPEAR: case EF_BUBBLE: case EF_GASPUSH: case EF_POISONREACT: case EF_ICECRASH: case EF_SANDMAN: case EF_PNEUMA: case EF_SONICBLOW2: case EF_BRANDISH2: case EF_SHOCKWAVEHIT: case EF_EARTHHIT: case EF_PIERCESELF: case EF_BOWLINGSELF: case EF_SPEARSTABSELF: case EF_SPEARBMRSELF: case EF_HOLYHIT: case EF_JOBCHANGE: case EF_LVUP: case EF_JOBLVUP: case EF_TAMINGSUCCESS: case EF_TAMINGFAILED: case EF_ENERGYCOAT: case EF_MENTALBREAK: case EF_MAGICALATTHIT: case EF_COMBOATTACK1: case EF_COMBOATTACK2: case EF_COMBOATTACK3: case EF_COMBOATTACK4: case EF_COMBOATTACK5: case EF_GUIDEDATTACK: case EF_POISONATTACK: case EF_SILENCEATTACK: case EF_STUNATTACK: case EF_SLEEPATTACK: case EF_PONG: case EF_DEFFENDER: case EF_KEEPING: case EF_DISPELL: case EF_STEALCOIN: if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_POISONHIT: if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->size = 1.5f; this->state.currentPrimitive->animSpeed = 2; this->state.currentPrimitive->pattern |= 0x200; this->state.currentPrimitive->repeatAnim = 0; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\PoisonHit.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\PoisonHit.act"); Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_BEGINSPELL2: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->QuadRingStackSized("effect\\ring_blue.tga", 2); } break; case EF_BEGINSPELL3: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->QuadRingStackSized("effect\\ring_yellow.tga", 1); } break; case EF_BEGINSPELL4: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->QuadRingStackSized("effect\\Magic_Green.tga", 33); } break; case EF_BEGINSPELL5: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->QuadRingStackSized("effect\\ring_yellow.tga", 0); } break; case EF_BEGINSPELL6: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->TexturedQuadRingSized(45, "effect\\ring_white.tga", 0); this->TexturedQuadRingSized(25, "effect\\ring_white.tga", 0); } break; case EF_BEGINSPELL7: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); this->QuadRingStackSized("effect\\Magic_Violet.tga", 33); } break; case EF_LOCKON: this->LockOnMarker(); break; case EF_WARPZONE: this->WarpZone(); break; case EF_SIGHTRASHER: this->Sightrasher(); break; case EF_BARRIER: if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 14, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 250; this->state.currentPrimitive->radius = 13.5f; this->state.currentPrimitive->deltaPos2.y = -10.0f; this->state.currentPrimitive->longitude = 2.0f; this->state.currentPrimitive->alpha = 100.0f; AllocateTextures(*this->state.currentPrimitive); this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\대폭발.tga", 0, false, true, false); } break; case EF_INVENOM: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\thief_invenom.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_CURE: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\Acolyte_cure.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_PROVOKE: if (this->state.stateCnt == 5) { PlayEffectWave(*this, "effect\\swordman_provoke.wav"); } if (this->state.stateCnt == 30) { PlayEffectWave(*this, "effect\\swordman_provoke.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_MVP: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\st_mvp.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_SKIDTRAP: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\hunter_skidtrap.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_CONE: if (this->state.stateCnt % 130 == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.duration = 200; this->state.currentPrimitive->duration = 300; this->state.currentPrimitive->radius = 0.1f; this->state.currentPrimitive->radiusSpeed = 0.2f; this->state.currentPrimitive->gravSpeed = 0.1f; this->state.currentPrimitive->gravAccel = 0.005f; this->state.currentPrimitive->longitude = 2.0f; this->state.currentPrimitive->longSpeed = 15.0f; this->state.currentPrimitive->longAccel = -0.01f; this->state.currentPrimitive->size = 1.2f; EffectPrimitiveState& turned = *this->state.currentPrimitive; reinterpret_cast(turned.transform)->MakeYRotation(GetRadian(static_cast(turned.longitude))); EffectPrimitiveState& orbit = *this->state.currentPrimitive; const float* transform = orbit.transform; const float radius = orbit.radius; orbit.deltaPos2.x = (transform[0] * 0.0f - transform[3] * 30.0f) + radius * transform[6] + transform[9]; orbit.deltaPos2.y = (transform[1] * 0.0f - transform[4] * 30.0f) + radius * transform[7] + transform[10]; orbit.deltaPos2.z = (transform[2] * 0.0f - transform[5] * 30.0f) + radius * transform[8] + transform[11]; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_SPHERE: this->Sphere(); break; case EF_BOWLINGBASH: this->BowlingBash(); break; case EF_ICEWALL: this->IceWall(); break; case EF_GLORIA: if (this->state.stateCnt == 0) { PlayEffectWaveAt(*this, "effect\\priest_gloria.wav", 1.0f); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_MAGNIFICAT: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\priest_magnificat.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_RESURRECTION: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\priest_resurrection.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_RECOVERY: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\priest_recovery.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_EARTHSPIKE: this->EarthSpike(0); break; case EF_SPEARBMR: this->SpearBmr(); break; case EF_PIERCE: this->RingBurstSparks(); break; case EF_TURNUNDEAD: this->TurnUndead(); break; case EF_SANCTUARY: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\priest_sanctuary.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_IMPOSITIO: if (this->state.stateCnt == 60) { PlayEffectWave(*this, "effect\\priest_impositio.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_LEXAETERNA: if (this->state.stateCnt == 15) { PlayEffectWave(*this, "effect\\priest_lexaeterna.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_ASPERSIO: if (!this->Aspersio()) { return false; } break; case EF_LEXDIVINA: if (!this->LexDivina()) { return false; } break; case EF_SUFFRAGIUM: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\priest_suffragium.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_STORMGUST: if (!this->StormGust()) { return false; } break; case EF_LORD: { const auto* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); switch (this->state.stateCnt) { case 0: g_soundMgr->PlayWave( "effect\\wizard_meteo.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); case 10: g_soundMgr->PlayWave( "effect\\hunter_blastmine.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); break; case 20: case 50: case 80: case 100: case 130: case 140: case 180: case 200: g_soundMgr->PlayWave( "effect\\wizard_meteo.wav", this->render.position.x - player->render.position.x, 0.0f, this->render.position.z - player->render.position.z, 250, 40, 1.0f, 0 ); break; } if (this->state.stateCnt >= 50 && this->state.stateCnt % 50 == 0 && this->state.stateCnt < 300) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; } case EF_BENEDICTIO: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\priest_benedictio.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_METEORSTORM: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\wizard_meteor.wav"); } if (this->state.stateCnt == 40) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_YUFITEL: this->Yufitel(0); break; case EF_YUFITELHIT: this->YufitelHit(0); break; case EF_QUAGMIRE: if (this->state.stateCnt == 0 && std::max(rand() % 12, 0) == 0) { PlayEffectWaveAt(*this, "effect\\wizard_quagmire.wav", -100.0f); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_FIREPILLAR: if (this->state.stateCnt == 75) { PlayEffectWave(*this, "effect\\wizard_fire_pillar_a.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_FIREPILLARBOMB: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\wizard_fire_pillar_b.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_HASTEUP: this->HasteUp(); break; case EF_FLASHER: this->Flasher(); break; case EF_REMOVETRAP: this->RemoveTrap(); break; case EF_REPAIRWEAPON: if (this->state.stateCnt == 20) { PlayEffectWave(*this, "effect\\black_weapon_repair_a.wav"); } if (this->state.stateCnt == 55) { PlayEffectWave(*this, "effect\\black_weapon_repair_a.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_CRASHEARTH: if (!this->FirePillarBomb()) { return false; } break; case EF_PERFECTION: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\black_weapon_perfection.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_MAXPOWER: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\black_maximize_power_circle.wav"); } if (this->state.stateCnt == 40) { PlayEffectWave(*this, "effect\\black_maximize_power_sword.wav"); } if (this->state.stateCnt == 47) { PlayEffectWave(*this, "effect\\black_maximize_power_sword.wav"); } if (this->state.stateCnt == 65) { PlayEffectWave(*this, "effect\\black_maximize_power_sword_bic.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_BLASTMINE: case EF_RAIN: case EF_TELEKHIT: case EF_STOPRUN: case EF_FLOWERCAST2: case EF_FLOWERCAST3: break; case EF_BLASTMINEBOMB: if (this->state.stateCnt == 20) { PlayEffectWave(*this, "effect\\hunter_blastmine.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_CLAYMORE: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\hunter_claymoretrap.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_FREEZING: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\hunter_freezingtrap.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_SPRINGTRAP: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\hunter_springtrap.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_KYRIE: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\priest_kyrie_eleison_b.wav"); } if (this->state.stateCnt == 15) { PlayEffectWave(*this, "effect\\priest_kyrie_eleison_a.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_MAGNUS: if (this->state.stateCnt == 0) { PlayEffectWaveAt(*this, "effect\\priest_magnus.wav", 1.0f); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_BOTTOM: this->Bottom(); break; case EF_BLITZBEAT: this->BlitzBeat(); break; case EF_WATERBALL: this->WaterOut(); break; case EF_WATERBALL2: this->WaterBall2(); break; case EF_FIREIVY: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\wizard_fire_ivy.wav"); } if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->pattern = 0x40; this->state.currentPrimitive->pattern |= 0x100; this->state.currentPrimitive->renderFlag |= 2; this->state.currentPrimitive->widthSize = 3.5f; this->state.currentPrimitive->heightSize = 3.5f; EffectPrimitiveState& rise = *this->state.currentPrimitive; rise.speed3d.y = -(25.0f / static_cast(rise.duration)); this->state.currentPrimitive->deltaPos2.y = -5.0f; AllocateTextures(*this->state.currentPrimitive); this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\fire_ivy.bmp", 0, false, true, false); } break; case EF_DETECTING: this->TexturedSkillAura(0); break; case EF_CLOAKING: this->AssassinCloaking(); break; case EF_SONICBLOW: { RenderVertex vertex{0.0f, 0.0f, 0.0f, 0.0f, 0u, 0xFF000000u, 0.0f, 0.0f}; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; g_renderer->viewport.Project(&this->state.parent->render.position.x, view, vertex); this->state.tlvertX = vertex.x; this->state.tlvertY = vertex.y; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_StoneCurse.wav"); this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->fadeOutCnt = 0; this->state.currentPrimitive->deltaPos2.y = -20.0f; this->state.currentPrimitive->arcAngle = 10.0f; this->state.currentPrimitive->innerSize = 10.0f; this->state.currentPrimitive->radiusSpeed = 7.0f; EffectPrimitiveState& ring = *this->state.currentPrimitive; ring.radiusAccel = -(ring.radiusSpeed / static_cast(ring.duration + 40)) * 2.0f; AllocateTextures(*this->state.currentPrimitive); this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); } break; } case EF_SONICBLOWHIT: this->SonicBlowHit(); break; case EF_GRIMTOOTH: this->GrimTooth(); break; case EF_VENOMDUST: case EF_POISONREACT2: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\assasin_poisonreact.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_OVERTHRUST: this->StoneCurseRing(); break; case EF_SPLASHER: if (this->state.stateCnt == 10) { PlayEffectWave(*this, "effect\\assasin_venomsplasher.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_TWOHANDQUICKEN: case EF_SPEARQUICKEN: this->TwoHandQuicken(); break; case EF_AUTOCOUNTER: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\knight_autocounter.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_GRIMTOOTHATK: this->GrimToothAtk(); break; case EF_FREEZE: case EF_FREEZED: if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { this->state.stateCnt = 9999; return false; } break; case EF_SLOWPOISON: case EF_CARTBOOST: case EF_SOULBURN: case EF_SOULCHANGE: this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_BOTTOM2: this->Bottom2(); break; case EF_FIREPILLARON: this->RingStack(0); break; case EF_REVIVE: if (this->state.stateCnt % 25 == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 60; this->state.currentPrimitive->longSpeed = 1.5f; this->state.currentPrimitive->longAccel = 0.03f; this->state.currentPrimitive->outerSize = 10.5f; this->state.currentPrimitive->innerSpeed = -0.12f; this->state.currentPrimitive->innerAccel = 0.003f; this->state.currentPrimitive->outerSpeed = -0.12f; this->state.currentPrimitive->outerAccel = 0.003f; this->state.currentPrimitive->innerSize = 7.5f; this->state.currentPrimitive->heightSize = 7.5f; this->state.currentPrimitive->alpha = 240.0f; EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 2; if (this->state.stateCnt == 0) { this->state.currentPrimitive->duration = this->state.duration; this->state.currentPrimitive->innerSpeed = 0.0f; this->state.currentPrimitive->innerAccel = 0.0f; this->state.currentPrimitive->longSpeed = 1.5f; this->state.currentPrimitive->outerSize = 11.0f; this->state.currentPrimitive->innerSize = 7.5f; this->state.currentPrimitive->outerSpeed = 0.0f; this->state.currentPrimitive->outerAccel = 0.0f; EffectPrimitiveState& late = *this->state.currentPrimitive; late.fadeOutCnt = late.duration - late.duration / 10; } AllocateTextures(*this->state.currentPrimitive); this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); } break; case EF_HEAVENSDRIVE: this->StoneSpike(); break; case EF_SHOCKWAVE: if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { this->InitEZ2STRFrame(); } break; case EF_CONCENTRATION: if (!this->Concentration()) { return false; } break; case EF_REFINEOK: if (this->state.stateCnt == 15) { PlayEffectWave(*this, "effect\\bs_refinesuccess.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_REFINEFAIL: if (this->state.stateCnt == 5) { PlayEffectWave(*this, "effect\\bs_refinefailed.wav"); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_TOPRANK: { this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 9998) { this->state.stateCnt = 0; } if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 9999; this->state.currentPrimitive->longitude = 0.0f; this->state.currentPrimitive->longSpeed = 4.5f; this->state.currentPrimitive->roll = 90.0f; this->state.currentPrimitive->widthSize = 4.0f; this->state.currentPrimitive->heightSize = 4.0f; if (this->state.count == 11) { this->state.currentPrimitive->red = 0; this->state.currentPrimitive->blue = 0; this->state.currentPrimitive->green = 250; } else { this->state.currentPrimitive->red = 250; this->state.currentPrimitive->blue = (10 - this->state.count) * 25; this->state.currentPrimitive->green = (10 - this->state.count) * 25; } AllocateTextures(*this->state.currentPrimitive); this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\LockOn128.tga", 0, false, true, false); } CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; this->render.position.y = world->terrain->Height(this->render.position.x, this->render.position.z) - 2.0f; break; } case EF_PARTY: { this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 9998) { this->state.stateCnt = 0; } if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 9999; this->state.currentPrimitive->longitude = 0.0f; this->state.currentPrimitive->roll = 90.0f; this->state.currentPrimitive->widthSize = 4.0f; this->state.currentPrimitive->heightSize = 4.0f; this->state.currentPrimitive->red = 50; this->state.currentPrimitive->blue = 253; this->state.currentPrimitive->green = 50; AllocateTextures(*this->state.currentPrimitive); this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\party.tga", 0, false, true, false); } CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; this->render.position.y = world->terrain->Height(this->render.position.x, this->render.position.z) - 2.0f; break; } case EF_SNOW: this->Snow(); break; case EF_SAKURA: this->Sakura(); break; case EF_STATUS_STATE: this->StatusIconColumn(); break; case EF_BANJJAKII: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->pattern |= 0x200; this->state.currentPrimitive->duration = 125; this->state.currentPrimitive->deltaPos2.y = -10.0f; if (this->state.param[0] <= 0.0f) { this->state.param[0] = 1.0f; } if (this->state.param[1] < 1.0f) { this->state.param[1] = 1.0f; } this->state.currentPrimitive->animSpeed = static_cast(this->state.param[1]); Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\크리스마스.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\크리스마스.act"); const int kind = rand() % 10; this->state.currentPrimitive->size = kind % 3 == 1 ? 0.01f : 1.0f; Owner(this->state.currentPrimitive).SetAction(kind / 2, 1, 1); Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_MAKEBLUR: this->SpawnBlurAfterimage(); break; case EF_CARTREVOLUTION: if (!this->CartRevolution()) { return false; } break; case EF_VENOMDUST2: if (this->state.stateCnt % 5 == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 10; EffectPrimitiveState& turned = *this->state.currentPrimitive; reinterpret_cast(turned.transform)->MakeYRotation(GetRadian(std::max(rand() % 360, 0))); EffectPrimitiveState& tilted = *this->state.currentPrimitive; reinterpret_cast(tilted.transform)->MakeXRotation(GetRadian(90)); this->state.currentPrimitive->speed = static_cast(std::max(rand() % 20, 0) + 20) / 80.0f; EffectPrimitiveState& moving = *this->state.currentPrimitive; moving.accel = -(moving.speed / static_cast(moving.duration)) * g_depthAverageHalf; this->state.currentPrimitive->size = 0.8f; this->state.currentPrimitive->rollSpeed = 3.0f; this->state.currentPrimitive->alpha = 70.0f; this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 10.0f; EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 5; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle3.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle3.act"); Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_CHANGEDARK: if (this->state.stateCnt == 0) { this->QuadRingStackSized("effect\\ring_black.tga", 3); } break; case EF_CHANGEFIRE: if (this->state.stateCnt == 0) { this->QuadRingStackSized("effect\\ring_red.tga", 3); } break; case EF_CHANGECOLD: if (this->state.stateCnt == 0) { this->QuadRingStackSized("effect\\ring_blue.tga", 3); } break; case EF_CHANGEWIND: if (this->state.stateCnt == 0) { this->QuadRingStackSized("effect\\ring_yellow.tga", 3); } break; case EF_CHANGEFLAME: if (this->state.stateCnt == 0) { this->QuadRingStackSized("effect\\ring_jadu.tga", 3); } break; case EF_CHANGEEARTH: if (this->state.stateCnt == 0) { this->QuadRingStackSized("effect\\ring_brown.tga", 3); } break; case EF_CHAINGEHOLY: if (this->state.stateCnt == 0) { this->QuadRingStackSized("effect\\ring_white.tga", 3); } break; case EF_CHANGEPOISON: if (this->state.stateCnt == 0) { this->QuadRingStackSized("effect\\ring_purple.tga", 3); } break; case EF_HITDARK: case EF_DARKATTACK: this->HitDark(); break; case EF_SUI_EXPLOSION: if (this->state.stateCnt == 0) { this->Hit2(1); } else if (this->state.stateCnt == 3 || this->state.stateCnt == 7 || this->state.stateCnt == 9) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 1, 0, 0, 0); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_SUICIDE: { EffectActor* parent = this->state.parent; this->state.deltaPos2[0] = parent->render.position.x; this->state.deltaPos2[1] = parent->render.position.y; this->state.deltaPos2[2] = parent->render.position.z; this->state.parent->render.position.x = this->state.deltaPos[0]; this->state.parent->render.position.y = this->state.deltaPos[1]; this->state.parent->render.position.z = this->state.deltaPos[2]; const bool alive = this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); this->state.parent->render.position.x = this->state.deltaPos2[0]; this->state.parent->render.position.y = this->state.deltaPos2[1]; this->state.parent->render.position.z = this->state.deltaPos2[2]; if (!alive) { return false; } break; } case EF_CURSEATTACK: if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 9999; this->state.currentPrimitive->longitude = 0.0f; this->state.currentPrimitive->longSpeed = 4.5f; this->state.currentPrimitive->deltaPos2.y -= 30.0f; this->state.currentPrimitive->widthSize = 4.0f; this->state.currentPrimitive->heightSize = 4.0f; AllocateTextures(*this->state.currentPrimitive); this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\curse.bmp", 0, false, true, false); } break; case EF_LEVEL99: case EF_LEVEL99_5: this->TripleRingStack("effect\\ring_blue.tga", 0); break; case EF_LEVEL99_2: case EF_LEVEL99_6: this->TexturedDoubleRing("effect\\pikapika2.bmp", 0); break; case EF_LEVEL99_3: this->FreezingCircle(0); break; case EF_GUMGANG: this->SuperSlashFan(1, 0); break; case EF_POTION1: case EF_POTION2: case EF_POTION3: case EF_POTION4: case EF_POTION7: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWaveAt(*this, "_heal_effect.wav", -80.0f); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_POTION5: case EF_POTION6: case EF_POTION8: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWaveAt(*this, "effect\\흡기.wav", -80.0f); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_DARKBREATH: if (this->state.stateCnt == 0) { this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.currentPrimitive->duration = 65; this->state.currentPrimitive->renderFlag |= 0x200; this->state.currentPrimitive->deltaPos2.y -= 20.0f; this->state.currentPrimitive->size = 0.8f; this->state.currentPrimitive->animSpeed = 1; this->state.currentPrimitive->green = 0; this->state.currentPrimitive->blue = 0; this->state.currentPrimitive->fadeOutCnt = 60; Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\DarkBreath.spr"); Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\DarkBreath.act"); Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_SUMMONSLAVE: this->AlphaCenterRise(); break; case EF_BLOODDRAIN: this->RedParticleSpray(3); break; case EF_ENERGYDRAIN: this->BloodDrain(); break; case EF_POTION_CON: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { g_soundMgr->PlayWave("effect\\ac_concentration.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); this->PotionPillar(2.0f, 50); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_POTION_: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 30) { g_soundMgr->PlayWave("effect\\ac_concentration.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); this->PotionPillar(1.9f, 30); } if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_POTION_BERSERK: if (!this->Potion_Berserk()) { return false; } break; case EF_POTIONPILLAR: this->PotionPillar(1.0f, 50); break; case EF_DEFENDER: this->QuadRingStack("effect\\ring_black.tga"); break; case EF_GANBANTEIN: this->TexturedCrossKind("effect\\ring_white.tga", 2); break; case EF_WIND: this->HealCloudRings(); break; case EF_VOLCANO: this->TexturedCrossKind("effect\\ring_red.tga", 0); break; case EF_GRANDCROSS: this->GrandCrossRings(0, 0); this->GRANDCROSS2(0); break; case EF_INTIMIDATE: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_Bash.wav"); } if (this->state.stateCnt == 35) { PlayEffectWave(*this, "effect\\rog_intimidate.wav"); } for (int index = 0; index < 20; ++index) { this->WhiteSpray(0); } break; case EF_CHOOKGI: this->ElementalOrbit(0); break; case EF_CLOUD: for (int index = 0; index < 40; ++index) { this->SkyCloud(0); } break; case EF_CLOUD2: for (int index = 0; index < 60; ++index) { this->SkyCloud(1); } break; case EF_MAPPILLAR: this->TexturedCrossStaged("effect\\ring_blue.tga", 0); break; case EF_LINELINK: this->TrackCloud(0); break; case EF_CLOUD3: for (int index = 0; index < 40; ++index) { this->SkyCloud(2); } break; case EF_SPELLBREAKER: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\sage_spell breake.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_DELUGE: this->TexturedCrossKind("effect\\ring_blue.tga", 0); break; case EF_VIOLENTGALE: this->TexturedCrossKind("effect\\magic_green.tga", 0); break; case EF_LANDPROTECTOR: this->TexturedCrossKind("effect\\ring_white.tga", 0); break; case EF_BOTTOM_VO: this->TexturedFlare("effect\\ring_red.tga", 0, 0, 0); break; case EF_BOTTOM_DE: this->TexturedFlare("effect\\ring_blue.tga", 0, 0, 0); break; case EF_BOTTOM_VI: this->TexturedFlare("effect\\magic_green.tga", 0, 0, 0); break; case EF_BOTTOM_LA: this->TexturedHalo("effect\\aaa copy.bmp", 1); break; case EF_MAGICROD: this->ProcessEZ2STRC10830(); this->SageMagicRod(); break; case EF_HOLYCROSS: if (this->state.stateCnt == 0) { g_soundMgr->PlayWave("effect\\cru_holy cross.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_SHIELDCHARGE: if (!this->ProcessEZ2STRC65300()) { return false; } break; case EF_MAPPILLAR2: this->TexturedCrossStaged("effect\\ring_blue.tga", 1); break; case EF_PROVIDENCE: this->TexturedCross("effect\\ring_yellow.tga", 0); if (!this->ProcessEZ2STR(0.0f, -80.0f, 0.0f)) { return false; } break; case EF_SHIELDBOOMERANG: this->TexturedShieldThrow("effect\\shield_boomerang.bmp"); break; case EF_DEVOTION: if (!this->ProcessEZ2STR(0.0f, -20.0f, 0.0f)) { return false; } break; case EF_REFLECTSHIELD: this->QuadRingStack("effect\\ring_yellow.tga"); break; case EF_ABSORBSPIRITS: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWaveAt(*this, "effect\\흡기.wav", -80.0f); } this->HealRingSparkle("effect\\ring_blue.tga", 2); break; case EF_STEELBODY: this->SuperSlashFan(4, 0); break; case EF_FLAMELAUNCHER: case EF_FROSTWEAPON: case EF_LIGHTNINGLOADER: case EF_SEISMICWEAPON: if (this->state.stateCnt == 10) { this->render.position = this->state.parent->render.position; PlayEffectWaveAt(*this, "_enemy_hit_wind1.wav", -150.0f); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_MAPPILLAR3: this->TexturedCrossStaged("effect\\magic_green.tga", 2); break; case EF_MAPPILLAR4: this->TexturedCrossStaged("effect\\ring_red.tga", 3); break; case EF_GUMGANG2: this->TexturedCrossLevel("effect\\ring_yellow.tga", 0); break; case EF_TEIHIT1: for (int index = 0; index < 20; ++index) { this->TexturedScatter("effect\\alpha_center.tga", 0); } break; case EF_GUMGANG3: this->TexturedCrossKind("effect\\ring_yellow.tga", 1); break; case EF_TEIHIT2: for (int index = 0; index < 5; ++index) { this->TEIHIT2(); } break; case EF_TANJI: this->TANJI(); break; case EF_TEIHIT1X: for (int index = 0; index < 24; ++index) { this->TexturedScatter("effect\\lens1.tga", 1); } break; case EF_CHIMTO: this->CHIMTO(0); break; case EF_STRIPWEAPON: case EF_STRIPSHIELD: case EF_STRIPARMOR: case EF_STRIPHELM: if (this->state.stateCnt == 6) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\복호격.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_CHAINCOMBO: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\mon_연환.wav"); } if (!this->ProcessEZ2STRC10830()) { return false; } break; case EF_RG_COIN: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\rog_steal coin.wav"); } for (int index = 0; index < 30; ++index) { this->TexturedSpray("effect\\coin_a.bmp"); } break; case EF_BACKSTAP: if (this->state.stateCnt == 20) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\rog_back stap.wav"); } for (int index = 0; index < 20; ++index) { this->TEIHIT2(); } break; case EF_TEIHIT3: for (int index = 0; index < 20; ++index) { this->TexturedScatterLow("effect\\lens2.tga", 2); } break; case EF_BOTTOM_DISSONANCE: this->TexturedMagicRing("effect\\ring_blue.tga", 0); break; case EF_BOTTOM_LULLABY: this->Bottom_Music("effect\\zz.bmp", 1); break; case EF_BOTTOM_RICHMANKIM: this->Bottom_Music("effect\\pocket.bmp", 3); break; case EF_BOTTOM_ETERNALCHAOS: this->TexturedGlow("effect\\twirl.bmp", 8); break; case EF_BOTTOM_DRUMBATTLEFIELD: this->Bottom_Music("", 2); break; case EF_BOTTOM_RINGNIBELUNGEN: this->Bottom_Music("effect\\twirl.bmp", 7); break; case EF_BOTTOM_ROKISWEIL: this->Bottom_Out("effect\\safeline.bmp", 0); break; case EF_BOTTOM_INTOABYSS: this->Bottom_Music("", 5); break; case EF_BOTTOM_SIEGFRIED: this->TexturedGlow("effect\\twirl.bmp", 4); break; case EF_BOTTOM_WHISTLE: this->Bottom_Music("effect\\melody_b.bmp", 0); break; case EF_BOTTOM_ASSASSINCROSS: this->TexturedMagicRing("effect\\ring_red.tga", 1); break; case EF_BOTTOM_POEMBRAGI: this->Bottom_Music("", 8); break; case EF_BOTTOM_APPLEIDUN: this->Bottom_Music("effect\\idun_apple.bmp", 6); break; case EF_BOTTOM_UGLYDANCE: this->TexturedMagicRing("effect\\ring_red.tga", 0); break; case EF_BOTTOM_HUMMING: this->Bottom_Music("effect\\melody_a.bmp", 0); break; case EF_BOTTOM_DONTFORGETME: this->TexturedMagicRing("effect\\magic_green.tga", 2); break; case EF_BOTTOM_FORTUNEKISS: this->Bottom_Music("effect\\kiss.bmp", 4); break; case EF_BOTTOM_SERVICEFORYOU: this->TexturedMagicRing("effect\\safeline.bmp", 4); break; case EF_TALK_FROSTJOKE: this->NotifyGameMode(1); break; case EF_TALK_SCREAM: this->NotifyGameMode(0); break; case EF_POKJUK: this->PokBurst(); break; case EF_THROWITEM: this->ThrowItem("유저인터페이스\\item\\빈병.bmp", 0); break; case EF_THROWITEM2: this->ThrowItem("유저인터페이스\\item\\빈포션병.bmp", 1); break; case EF_BOTTOM_BASILICA: this->TexturedFourRing("effect\\alpha_down.tga", 0); this->TexturedFourRing("effect\\alpha_down.tga", 1); break; case EF_ASSUMPTIO: if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } break; case EF_HITLINE2: this->WhiteSparks(2); if (this->state.stateCnt >= 10 && this->state.stateCnt <= 20) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 255, 120, 50); } break; case EF_BASH3D2: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\mon_맹룡과강.wav"); } for (int phase = 0; phase < 8; ++phase) { this->TexturedQuadSpin("effect\\alpha_center.tga", static_cast(phase), 2); } if (this->state.stateCnt >= 5 && this->state.stateCnt <= 35) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } } break; case EF_ENERGYDRAIN2: this->EnergyDrain2(); if (this->state.stateCnt >= 55 && this->state.stateCnt <= 65) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 100, 100, 255); } break; case EF_TRANSBLUEBODY: if (this->state.stateCnt >= 0 && this->state.stateCnt <= 200) { this->state.parent->SetColor(-1, 205 - this->state.stateCnt, 205 - this->state.stateCnt, 255); } break; case EF_MAGICCRASHER: if (this->state.stateCnt == 25) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\매직 크래쉬.wav"); } if (this->state.stateCnt == 30) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } if (this->state.stateCnt >= 30 && this->state.stateCnt <= 60) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, std::max(rand() % 255, 0), std::max(rand() % 255, 0), std::max(rand() % 255, 0)); } break; case EF_LIGHTSPHERE2: this->TexturedAura("effect\\thunder_center.bmp", 0); for (int index = 0; index < 80; ++index) { this->TexturedSparkle("effect\\white02.bmp"); } break; case EF_LIGHTBLADE: if ((this->state.parent->render.flags & 4) == 0) { this->state.parent->render.flags += 4; } break; case EF_ENERGYDRAIN3: this->SonicSlashFan(0); if (this->state.stateCnt >= 50 && this->state.stateCnt <= 80) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, (125 - this->state.stateCnt) * 2, (125 - this->state.stateCnt) * 2, 250); } break; case EF_LINELINK2: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\소울 체인지.wav"); } this->TrackTarget(); break; case EF_LINKLIGHT: if (this->state.stateCnt >= 40 && this->state.stateCnt <= 70) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 200, 150, 50); } break; case EF_TRUESIGHT: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\hunter_detecting.wav"); } for (int phase = 0; phase < 12; ++phase) { this->TexturedQuadSpin("effect\\alpha_center.tga", static_cast(phase), 3); } break; case EF_FALCONASSAULT: if (this->state.stateCnt == 30) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } if (this->state.stateCnt >= 30 && this->state.stateCnt <= 54) { this->state.parent->render.angle += 30.0f; if (this->state.parent->render.angle > 360.0f) { this->state.parent->render.angle -= 360.0f; } } if (this->state.stateCnt >= 30 && this->state.stateCnt <= 50 && this->state.stateCnt % 10 < 5) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } } break; case EF_TRIPLEATTACK2: if (this->state.stateCnt == 30) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\샤프슈팅.wav"); } this->AlphaCenterTrail(); break; case EF_PORTAL4: this->Cloud11Burst(0); if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\윈드워크.wav"); } if (this->state.stateCnt >= 5 && this->state.stateCnt <= 25) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 220, 250, 220); } break; case EF_MELTDOWN: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\black_overthrust.wav"); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_REJECTSWORD: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\kyrie_guard.wav"); } if (this->state.stateCnt >= 0 && this->state.stateCnt < 30) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } if (this->state.stateCnt % 6 < 3) { this->state.parent->SetColor(-1, 100, 100, 100); } else { this->state.parent->SetColor(-1, 250, 250, 250); } } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_TRIPLEATTACK3: if (this->state.stateCnt == 30) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\애로우 발칸.wav"); } this->AlphaCenterStream(); break; case EF_SPHEREWIND2: for (int angle = 0; angle < 45; angle += 9) { this->FeatherRing("effect\\fire_ivy.bmp", static_cast(angle), 1); } break; case EF_LINELINK3: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\소울 체인지.wav"); } this->TrackTargetWide(); break; case EF_PINKBODY: if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 255, 89, 182); break; case EF_BASH3D3: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\헤드 크러쉬.wav"); } for (int phase = 0; phase < 6; ++phase) { this->TexturedQuadSpin("effect\\alpha_center.tga", static_cast(phase), 4); } if (this->state.stateCnt >= 20 && this->state.stateCnt <= 50) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 255, 255, 200); } break; case EF_BASH3D4: if (this->state.stateCnt == 22) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\비트 조인트.wav"); } for (int phase = 0; phase < 6; ++phase) { this->TexturedQuadSpin("effect\\alpha_center.tga", static_cast(phase), 5); } if (this->state.stateCnt >= 20 && this->state.stateCnt <= 50) { if ((this->state.parent->render.flags & 8) == 0) { this->state.parent->render.flags += 8; } this->state.parent->SetColor(-1, 255, 255, 255); } break; case EF_NAPALMVALCAN: if (this->state.stateCnt == 20 || this->state.stateCnt == 30 || this->state.stateCnt == 40 || this->state.stateCnt == 50 || this->state.stateCnt == 60) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_NapalmBeat.wav"); this->Hit2(0); } break; case EF_PORTAL5: this->Cloud11Burst(1); if (this->state.stateCnt >= 5 && this->state.stateCnt <= 65) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 250, 250, 200); } break; case EF_MAGICCRASHER2: if (this->state.stateCnt == 25) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\swordman_provoke.wav"); } if (this->state.stateCnt >= 0 && this->state.stateCnt <= 60) { this->state.parent->SetColor(-1, std::max(rand() % 255, 0), std::max(rand() % 255, 0), std::max(rand() % 255, 0)); } break; case EF_BOTTOM_SPIDER: this->TexturedHalo("effect\\spiderweb.tga", 2); break; case EF_BOTTOM_FOGWALL: this->TexturedPulseKind("effect\\ring_white.tga", 2); break; case EF_BABY: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_Blessing.wav"); } for (int angle = 0; angle < 45; angle += 9) { this->FeatherBurst("effect\\fire_ivy.bmp", static_cast(angle), 0); } break; case EF_SOULBREAKER2: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\메테오 어썰트.wav"); } if (this->state.stateCnt >= 0 && this->state.stateCnt <= 10) { if ((this->state.parent->render.flags & 1) == 0) { this->state.parent->render.flags += 1; } this->state.parent->SetColor(-1, 255, 0, 255); } for (int angle = 0; angle < 360; angle += 45) { this->PurpleSlash(static_cast(angle)); } break; case EF_RAINBOW: this->Rainbow("effect\\alpha_center.tga", 0); break; case EF_PEONG: for (int index = 0; index < 30; ++index) { this->WhiteLightTrail("effect\\whitelight.tga", 0); } for (int quarter = 0; quarter < 4; ++quarter) { const int angle = quarter * 90; this->TexturedScatterArc("effect\\peong1.tga", static_cast(angle), 0); this->TexturedScatterArc("effect\\peong2.tga", static_cast(angle), 0); this->TexturedScatterArc("effect\\peong3.tga", static_cast(angle), 0); this->TexturedScatterArc("effect\\peong2.tga", static_cast(angle), 0); } break; case EF_TANJI2: this->TANJI2(); break; case EF_PRESSEDBODY: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_내려찍기.wav"); } if ((this->state.parent->render.flags & 0x20) == 0 && this->state.stateCnt >= 17 && this->state.stateCnt <= 50) { this->state.parent->render.flags += 0x20; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 17); } break; case EF_SPINEDBODY: if ((this->state.parent->render.flags & 0x40) == 0 && this->state.stateCnt < 18) { this->state.parent->render.flags += 0x40; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt * 2); } break; case EF_KICKEDBODY: if (this->state.stateCnt == 17) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_hit2.wav"); } if (this->state.stateCnt == 25) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_hit4.wav"); } if ((this->state.parent->render.flags & 0x80) == 0 && this->state.stateCnt >= 30) { this->state.parent->render.flags += 0x80; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 30); } break; case EF_AIRTEXTURE: this->AirTexture("effect\\emp shock.tga"); break; case EF_HITBODY: if ((this->state.parent->render.flags & 0x100) == 0) { this->state.parent->render.flags += 0x100; if (this->state.stateCnt < 15) { this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } } break; case EF_DOUBLEGUMGANG: this->SuperSlashSpread(2, 2); break; case EF_REFLECTBODY: if ((this->state.parent->render.flags & 0x200) == 0) { this->state.parent->render.flags += 0x200; } break; case EF_BABYBODY: if ((this->state.parent->render.flags & 0x10) == 0) { this->state.parent->render.flags += 0x10; if (this->state.stateCnt <= 45) { this->state.parent->render.pulsePhases[0] = static_cast(this->state.stateCnt); } } break; case EF_BABYBODY2: if (this->state.stateCnt >= EffectLifetime(421) - 1) { this->state.stateCnt = 0; } if ((this->state.parent->render.flags & 0x10) == 0) { this->state.parent->render.flags += 0x10; this->state.parent->render.pulsePhases[0] = 45; } break; case EF_GIANTBODY: if ((this->state.parent->render.flags & 0x400) == 0) { this->state.parent->render.flags += 0x400; if (this->state.stateCnt <= 45) { this->state.parent->render.pulsePhases[1] = static_cast(this->state.stateCnt); } } break; case EF_GIANTBODY2: if ((this->state.parent->render.flags & 0x400) == 0) { this->state.parent->render.flags += 0x400; this->state.parent->render.pulsePhases[1] = 45; } break; case EF_ASURABODY: if ((this->state.parent->render.flags & 0x800) == 0) { this->state.parent->render.flags += 0x800; this->state.parent->render.outlineAlpha = this->state.stateCnt < 200 ? static_cast(this->state.stateCnt) : 200; } break; case EF_4WAYBODY: if (this->state.stateCnt >= 30) { this->state.parent->render.flags |= 0x1000; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 30); } break; case EF_QUAKEBODY: case EF_QUAKEBODY2: if ((this->state.parent->render.flags & 0x2000) == 0) { this->state.parent->render.flags += 0x2000; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } break; case EF_ASURABODY_MONSTER: if ((this->state.parent->render.flags & 0x800) == 0) { this->state.parent->render.flags += 0x800; if (this->state.stateCnt < 150) { this->state.parent->render.effectPhase = static_cast(this->state.stateCnt + 50); } } break; case EF_HITLINE3: this->WhiteSparkStreak(0); break; case EF_HITLINE4: this->White02Burst(3); break; case EF_HITLINE5: this->WhiteSparkRing(3); break; case EF_HITLINE6: this->WhiteSparkStreak(3); break; case EF_ELECTRIC: if (this->state.stateCnt == 25) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_전기.wav"); } this->ElectricRingLate(0, 0); this->ElectricRingLate(0, 180); break; case EF_ELECTRIC2: this->ElectricArc(0, 0); this->ElectricArc(0, 0); break; case EF_HITLINE7: this->WhiteSparkStreak(1); break; case EF_STORMKICK: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_회오리차기.wav"); } this->TexturedMark("effect\\storm2.tga", 0); this->Cloud11Burst(2); this->Cloud11Burst(3); if (this->state.stateCnt < 48) { this->state.parent->render.angle += 30.0f; if (this->state.parent->render.angle > 360.0f) { this->state.parent->render.angle -= 360.0f; } } break; case EF_HALFSPHERE: this->TexturedPulse("effect\\white02.bmp"); break; case EF_ATTACKENERGY: this->TexturedPulse("effect\\white02.bmp"); this->TexturedBurst("effect\\ring_blue.tga"); break; case EF_ATTACKENERGY2: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_마법반사.wav"); } this->AttackEnergy2("effect\\cloud11.tga"); break; case EF_CHEMICAL3: for (int index = 0; index < 4; ++index) { this->LineStreakLayered(0); this->LineStreakLayered(1); } break; case EF_ASSUMPTIO2: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\아숨프티오.wav"); } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); break; case EF_BLUECASTING: this->BlueSpellRings(); break; case EF_RUN: if ((this->state.parent->render.flags & 0x8000) == 0) { this->state.parent->render.flags += 0x8000; this->state.parent->render.runStartTick = static_cast(this->state.stateCnt); } break; case EF_STOPEFFECT: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_효과음1.wav"); } this->RunStop(0); this->RunStop(45); break; case EF_JUMPBODY: if (this->state.stateCnt == 30) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_회피2.wav"); } if ((this->state.parent->render.flags & 0x10000) == 0 && this->state.stateCnt > 35) { this->state.parent->render.flags += 0x10000; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 35); } break; case EF_LANDBODY: if ((this->state.parent->render.flags & 0x20000) == 0) { this->state.parent->render.flags += 0x20000; this->state.parent->render.tintPhase = static_cast(this->state.stateCnt); } if ((this->state.parent->render.flags & 0x40) == 0 && this->state.stateCnt < 25) { this->state.parent->render.flags += 0x40; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt + 11); } break; case EF_FOOT3: this->TexturedRise("effect\\foot_l2.tga", 1); break; case EF_FOOT4: this->TexturedRise("effect\\foot_r2.tga", 1); break; case EF_TAE_READY: if ((this->state.parent->render.flags & 0x4000) == 0) { this->state.parent->render.flags += 0x4000; if (this->state.stateCnt <= 50) { this->state.parent->render.tintPhase = static_cast(this->state.stateCnt); } } break; case EF_GRANDCROSS2: this->GrandCrossRings(0, 1); this->GRANDCROSS2(1); break; case EF_SOULSTRIKE2: this->SoulStrike(1); break; case EF_YUFITEL2: this->YufitelHit(1); break; case EF_NPC_STOP: this->NpcStop(0); break; case EF_DARKCASTING: this->BlackSpellRings(0); break; case EF_GUMGANGNPC: this->SuperSlashFan(2, 1); break; case EF_AGIUP: this->IncAgilityCenter(0); break; case EF_JUMPKICK: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_날라차기.wav"); } if (this->state.stateCnt == 5) { this->state.parent->render.state = 27; this->state.parent->SetFrameSequence(0x60, 5, 5, 0x60, 5, 1, 25, 0); } if (this->state.stateCnt == 35 && this->state.parent->render.state == 27) { this->state.parent->render.state = 2; } break; case EF_STORMKICK1: this->TexturedMark("effect\\storm2.tga", 1); this->Cloud11Burst(2); this->Cloud11Burst(3); if (this->state.stateCnt <= 50) { this->state.parent->render.angle += 14.0f; if (this->state.parent->render.angle > 360.0f) { this->state.parent->render.angle -= 360.0f; } } break; case EF_STORMKICK2: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "ice_titan_attack.wav"); } this->TexturedMark("effect\\storm2.tga", 6); this->Cloud11Burst(2); this->Cloud11Burst(3); break; case EF_STORMKICK3: this->TexturedMark("effect\\storm2.tga", 3); this->Cloud11Burst(2); this->Cloud11Burst(3); break; case EF_STORMKICK4: if (this->state.stateCnt == 15) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_회피.wav"); } for (int index = 0; index < 30; ++index) { this->WhiteLightTrail("effect\\whitelight.tga", 1); } break; case EF_STORMKICK5: if (this->state.stateCnt == 15) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_회피.wav"); this->state.parent->render.state = 37; this->state.parent->SetFrameSequence(0x60, 2, 2, 0x60, 2, 1, 25, 0); } for (int index = 0; index < 30; ++index) { this->WhiteLightTrail("effect\\whitelight.tga", 1); } break; case EF_STORMKICK6: if (this->state.stateCnt == 0) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\REVERBERATION.wav"); } this->TexturedMark("effect\\storm2.tga", 11); this->Cloud11Burst(2); this->Cloud11Burst(3); break; case EF_STORMKICK7: this->TexturedMark("effect\\storm2.tga", 2); this->Cloud11Burst(2); this->Cloud11Burst(3); break; case EF_SPINEDBODY2: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_돌려차기.wav"); } if ((this->state.parent->render.flags & 0x40) == 0 && this->state.stateCnt >= 14 && this->state.stateCnt <= 49) { this->state.parent->render.flags += 0x40; this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 14); } break; case EF_BEGINASURA1: this->TexturedSkillIcon("effect\\hanmoon1.tga", 0, 0); break; case EF_BEGINASURA2: this->TexturedSkillIcon("effect\\hanmoon2.tga", 0, 0); break; case EF_BEGINASURA3: this->TexturedSkillIcon("effect\\hanmoon3.tga", 0, 0); break; case EF_BEGINASURA4: this->TexturedSkillIcon("effect\\hanmoon4.tga", 0, 0); break; case EF_BEGINASURA5: this->TexturedSkillIcon("effect\\hanmoon7.tga", 0, 0); break; case EF_BEGINASURA6: this->TexturedSkillIcon("effect\\hanmoon5.tga", 0, 0); break; case EF_BEGINASURA7: this->TexturedSkillIcon("effect\\hanmoon6.tga", 0, 0); break; case EF_AURABLADE2: if ((this->state.parent->render.flags & 2) == 0) { this->state.parent->render.flags += 2; } break; case EF_DEVIL1: this->BLIND(1); break; case EF_DEVIL2: this->BLIND(2); break; case EF_DEVIL3: this->BLIND(3); break; case EF_DEVIL4: this->BLIND(4); break; case EF_DEVIL5: this->BLIND(5); break; case EF_DEVIL6: this->BLIND(6); break; case EF_DEVIL7: this->BLIND(7); break; case EF_DEVIL8: this->BLIND(8); break; case EF_DEVIL9: this->BLIND(9); break; case EF_DEVIL10: this->BLIND(10); break; case EF_DOUBLEGUMGANG2: this->SuperSlashSpread(2, 1); break; case EF_DOUBLEGUMGANG3: this->SuperSlashSpread(2, 0); break; case EF_BLACKDEVIL: this->TexturedRisingRing("effect\\ring_black.tga"); break; case EF_FLOWERCAST: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_안락한마법.wav"); } if ((this->state.parent->render.flags & 0x800) == 0) { this->state.parent->render.flags += 0x800; if (this->state.stateCnt < 200) { this->state.parent->render.outlineAlpha = static_cast(this->state.stateCnt); } else if (this->state.stateCnt < 400) { this->state.parent->render.outlineAlpha = static_cast(400 - this->state.stateCnt); } } this->TexturedSlashAir("effect\\ring_blue.tga", 4, 0); this->TexturedSlashAir("effect\\ring_blue.tga", 4, 1); break; default: char text[128]; std::sprintf(text, "Invalid Effect Id %d", this->state.type); ShowErrorDialog(GetRenderSystemHolder()->system, text, 0); return false; } } ++this->state.stateCnt; return this->state.stateCnt < this->state.duration; }