diff --git a/Source/Contents/Effects/LightSphereEffect.cpp b/Source/Contents/Effects/LightSphereEffect.cpp index 20ef0019..a7089347 100644 --- a/Source/Contents/Effects/LightSphereEffect.cpp +++ b/Source/Contents/Effects/LightSphereEffect.cpp @@ -11,10 +11,149 @@ #include // OFFSET: 0x00B6C9F0 +// FUNCTION: fn_19103 +CLightSphereEffect::CLightSphereEffect() : CEffect(-1), spheres(), rays() { +} // OFFSET: 0x00B6D160 +// FUNCTION: fn_19108 +bool CLightSphereEffect::Slot06() { + std::vector::iterator sphere = this->spheres.begin(); + for (; sphere != this->spheres.end(); ++sphere) { + if ((*sphere)->alpha > 0) { + break; + } + } + + std::vector::iterator ray = this->rays.begin(); + for (; ray != this->rays.end(); ++ray) { + if ((*ray)->alpha > 0) { + break; + } + } + + return sphere != this->spheres.end() || ray != this->rays.end(); +} // OFFSET: 0x00B6D1C0 +// FUNCTION: fn_19109 +void CLightSphereEffect::Slot03() { + for (std::vector::iterator it = this->spheres.begin(); it != this->spheres.end(); ++it) { + CParticle* particle = *it; + + vector3d& position = particle->position; + position.x = this->position[0]; + position.y = this->position[1]; + position.z = this->position[2]; + + if (particle != nullptr) { + if (particle->unknown_00E8 < 300) { + const int alpha = particle->alpha + 1; + particle->alpha = alpha >= 255 ? 255 : alpha; + } else { + const int alpha = particle->alpha - 1; + particle->alpha = alpha < 0 ? 0 : alpha; + } + + float& phase = *reinterpret_cast(particle->unknown_0058); + const int spin = (static_cast(phase) + 2) % 360; + phase = static_cast(spin); + const float scale = particle->scale * g_sinTable[spin] * 0.05f + particle->scale; + + matrix rotation; + std::memcpy(rotation.values, g_identityMatrix, sizeof(rotation.values)); + rotation.MakeXRotation(static_cast(g_modeMgr.GetGameMode())->camera->camera.pitch / 180.0f * 3.141592f); + + matrix scaling; + std::memcpy(scaling.values, g_identityMatrix, sizeof(scaling.values)); + scaling.SetScale(scale, scale, 1.0f); + + matrix billboard; + billboard.Compose(scaling, rotation); + + matrix translation; + std::memcpy(translation.values, g_identityMatrix, sizeof(translation.values)); + translation.MakeTranslate(0.0f, particle->unknown_0054, 0.0f); + + matrix transform; + transform.Compose(billboard, translation); + particle->transform = transform; + } + + ++particle->unknown_00E8; + } + + for (std::vector::iterator it = this->rays.begin(); it != this->rays.end(); ++it) { + CParticle* particle = *it; + + vector3d& position = particle->position; + position.x = this->position[0]; + position.y = this->position[1]; + position.z = this->position[2]; + + if (particle != nullptr) { + float scale = particle->scale; + if (scale < 10.0f) { + scale *= 1.02f; + } + particle->scale = scale; + + int alpha = particle->alpha; + if (particle->unknown_00E8 > 500) { + --alpha; + if (alpha < 0) { + alpha = 0; + } + } + particle->alpha = alpha; + + const int previous = particle->unknown_0050; + const int roll = std::rand() % 2; + const int phase = (previous + 1 + (roll < 0 ? 0 : roll)) % 360; + particle->unknown_0050 = phase; + + vector3d points[3]{}; + const float radius = particle->scale * g_sinTable[phase] + particle->scale; + const int pitch = particle->unknown_004C; + const int yaw = static_cast(*reinterpret_cast(&particle->unknown_00C4)); + const float flat = radius * g_cosTable[pitch]; + points[0].x = flat * g_cosTable[yaw]; + points[0].y = radius * g_sinTable[pitch] - particle->unknown_0054; + points[0].z = flat * g_sinTable[yaw]; + + if (*reinterpret_cast(particle->unknown_0058) == 0.0f) { + points[1].x = -0.5f; + points[1].y = -particle->unknown_0054; + points[1].z = 0.0f; + points[2].x = 0.5f; + points[2].y = -particle->unknown_0054; + points[2].z = 0.0f; + } else { + points[1].x = 0.0f; + points[1].y = -particle->unknown_0054; + points[1].z = -0.5f; + points[2].x = 0.0f; + points[2].y = -particle->unknown_0054; + points[2].z = 0.5f; + } + + particle->vertices[0].x = points[0].x; + particle->vertices[0].y = points[0].y; + particle->vertices[0].z = points[0].z; + particle->vertices[1].x = points[0].x; + particle->vertices[1].y = points[0].y; + particle->vertices[1].z = points[0].z; + particle->vertices[2].x = points[1].x; + particle->vertices[2].y = points[1].y; + particle->vertices[2].z = points[1].z; + particle->vertices[3].x = points[2].x; + particle->vertices[3].y = points[2].y; + particle->vertices[3].z = points[2].z; + } + + ++particle->unknown_00E8; + } +} // OFFSET: 0x00B6D990 // FUNCTION: fn_19110 diff --git a/Source/Contents/Effects/MapMagicZoneEffect.cpp b/Source/Contents/Effects/MapMagicZoneEffect.cpp index d6ebad29..35f8f9e7 100644 --- a/Source/Contents/Effects/MapMagicZoneEffect.cpp +++ b/Source/Contents/Effects/MapMagicZoneEffect.cpp @@ -15,7 +15,168 @@ bool CMapMagicZoneEffect::Slot06() { } // OFFSET: 0x00B6E3C0 +// FUNCTION: fn_19116 +void CMapMagicZoneEffect::Slot03() { + for (std::vector::iterator it = this->spinners.begin(); it != this->spinners.end(); ++it) { + CParticle* particle = *it; + particle->position.x = this->position[0]; + particle->position.y = this->position[1]; + particle->position.z = this->position[2]; + ++particle->unknown_00E8; + this->UpdateSpinner(particle); + } + + for (std::vector::iterator it = this->petals.begin(); it != this->petals.end(); ++it) { + CParticle* particle = *it; + particle->position.x = this->position[0]; + particle->position.y = this->position[1]; + particle->position.z = this->position[2]; + ++particle->unknown_00E8; + + vector3d corners[4]{}; + const int angle = particle->unknown_000C * 23; + particle->unknown_004C = (particle->unknown_004C + 3) % 360; + const float radius = (g_sinTable[particle->unknown_004C] + 1.0f) * (particle->scale * 0.1f) + particle->scale * 0.8f; + const float height = particle->unknown_0054; + + for (int corner = 0; corner < 4; ++corner) { + const int index = (angle + corner * 90) % 360; + corners[corner].x = radius * g_cosTable[index]; + corners[corner].y = height; + corners[corner].z = radius * g_sinTable[index]; + } + + particle->vertices[0].x = corners[0].x; + particle->vertices[0].y = corners[0].y; + particle->vertices[0].z = corners[0].z; + particle->vertices[1].x = corners[1].x; + particle->vertices[1].y = corners[1].y; + particle->vertices[1].z = corners[1].z; + particle->vertices[3].x = corners[2].x; + particle->vertices[3].y = corners[2].y; + particle->vertices[3].z = corners[2].z; + particle->vertices[2].x = corners[3].x; + particle->vertices[2].y = corners[3].y; + particle->vertices[2].z = corners[3].z; + + matrix rotation; + std::memcpy(rotation.values, g_identityMatrix, sizeof(rotation.values)); + rotation.MakeYRotation(static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw / -180.0f * 3.141592f); + particle->transform = rotation; + } + + for (std::vector::iterator it = this->ribbon.begin(); it != this->ribbon.end(); ++it) { + CParticle* particle = *it; + particle->position.x = this->position[0]; + particle->position.y = this->position[1]; + particle->position.z = this->position[2]; + ++particle->unknown_00E8; + float& spinAngle = *reinterpret_cast(&particle->unknown_00C4); + spinAngle = static_cast(static_cast(particle->unknown_0010 + spinAngle + 3.0f)); + + matrix rotation; + std::memcpy(rotation.values, g_identityMatrix, sizeof(rotation.values)); + rotation.MakeYRotation(static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw / -180.0f * 3.141592f); + particle->transform = rotation; + + const int segment = particle->unknown_000C; + const float wave = g_sinTable[segment * 9] * particle->unknown_00C0; + const int step = static_cast(static_cast(particle->unknown_0050) / 20.0f); + const int angle = static_cast(static_cast(step * segment) + spinAngle) % 360; + const float flat = wave * g_cosTable[particle->unknown_004C]; + const float rise = wave * g_sinTable[particle->unknown_004C]; + + vector3d points[2]{}; + points[0].x = particle->scale * g_cosTable[angle]; + points[0].z = particle->scale * g_sinTable[angle]; + points[1].x = points[0].x + flat * g_cosTable[angle]; + points[1].y = points[0].y - rise; + points[1].z = points[0].z + flat * g_sinTable[angle]; + + particle->vertices[3].x = points[0].x; + particle->vertices[3].y = points[0].y; + particle->vertices[3].z = points[0].z; + particle->vertices[1].x = points[1].x; + particle->vertices[1].y = points[1].y; + particle->vertices[1].z = points[1].z; + + if (segment != 0) { + particle->vertices[0].x = this->previousOuter.x; + particle->vertices[0].y = this->previousOuter.y; + particle->vertices[0].z = this->previousOuter.z; + particle->vertices[2].x = this->previousInner.x; + particle->vertices[2].y = this->previousInner.y; + particle->vertices[2].z = this->previousInner.z; + } + + this->previousInner = points[0]; + this->previousOuter = points[1]; + } +} // OFFSET: 0x00B6E8F0 +// FUNCTION: fn_19117 +void CMapMagicZoneEffect::UpdateSpinner(CParticle* particle) { + if (particle) { + vector3d corners[4]{}; + float& spinAngle = *reinterpret_cast(&particle->unknown_00C4); + const int angle = static_cast(spinAngle + 1.0f); + spinAngle = static_cast(angle % 360); + const float radius = (g_sinTable[particle->unknown_004C] + 1.0f) * (particle->scale * 0.1f) + particle->scale * 0.8f; + const float height = particle->unknown_0054; + + for (int corner = 0; corner < 4; ++corner) { + const int index = (angle + corner * 90) % 360; + corners[corner].x = radius * g_cosTable[index]; + corners[corner].y = height; + corners[corner].z = radius * g_sinTable[index]; + } + + particle->vertices[0].x = corners[0].x; + particle->vertices[0].y = corners[0].y; + particle->vertices[0].z = corners[0].z; + particle->vertices[1].x = corners[1].x; + particle->vertices[1].y = corners[1].y; + particle->vertices[1].z = corners[1].z; + particle->vertices[3].x = corners[2].x; + particle->vertices[3].y = corners[2].y; + particle->vertices[3].z = corners[2].z; + particle->vertices[2].x = corners[3].x; + particle->vertices[2].y = corners[3].y; + particle->vertices[2].z = corners[3].z; + + matrix rotation; + std::memcpy(rotation.values, g_identityMatrix, sizeof(rotation.values)); + rotation.MakeYRotation(static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw / -180.0f * 3.141592f); + particle->transform = rotation; + } +} // OFFSET: 0x00B6F010 +// FUNCTION: fn_19118 +void CMapMagicZoneEffect::Slot04() { + for (std::vector::iterator it = this->spinners.begin(); it != this->spinners.end(); ++it) { + CParticle* particle = *it; + if (particle) { + particle->destinationBlend = 6; + particle->Render(false, 0.0f, 1.0f, 0.0f, 1.0f, false, true); + } + } + + for (std::vector::iterator it = this->petals.begin(); it != this->petals.end(); ++it) { + CParticle* particle = *it; + if (particle) { + particle->Render(false, 0.0f, 1.0f, 0.0f, 1.0f, false, true); + } + } + + for (std::vector::iterator it = this->ribbon.begin(); it != this->ribbon.end(); ++it) { + CParticle* particle = *it; + if (particle && particle->unknown_000C > 0) { + const int segment = particle->unknown_000C; + particle->destinationBlend = 6; + const ParticleQuad quad = {false, 0.0f, 1.0f, static_cast(segment - 1) / 21.0f, static_cast(segment) / 21.0f, false, true}; + particle->Render(quad); + } + } +} diff --git a/Source/Contents/Effects/PokJukEffect.cpp b/Source/Contents/Effects/PokJukEffect.cpp index a95cc1d1..d23f7633 100644 --- a/Source/Contents/Effects/PokJukEffect.cpp +++ b/Source/Contents/Effects/PokJukEffect.cpp @@ -15,7 +15,183 @@ bool CPokJukEffect::Slot06() { } // OFFSET: 0x00B6F7D0 +// FUNCTION: fn_19124 +void CPokJukEffect::Slot03() { + for (std::vector::iterator it = this->particles.begin(); it != this->particles.end(); ++it) { + CParticle* particle = *it; + vector3d& position = particle->position; + position.x = this->position[0]; + position.y = this->position[1]; + position.z = this->position[2]; + + if (particle != nullptr) { + const int index = particle->unknown_0010 * 160 + particle->unknown_000C; + const int age = particle->unknown_00E8; + + if (age > 0) { + vector3d* trail = this->trails[index]; + + if (age % 3 == 0) { + trail[3] = trail[2]; + trail[2] = trail[1]; + trail[1] = trail[0]; + } + + const int delay = this->delays[index]; + + if (age >= delay + 160 && age <= delay + 180) { + const char beat = static_cast(age % 20); + + if (beat == 15 || beat == 19) { + this->beats[index] = 1; + } else { + this->beats[index] = beat == 17 ? 2 : 0; + } + } else { + this->beats[index] = 0; + } + + float& spinAngle = *reinterpret_cast(&particle->unknown_00C4); + spinAngle = static_cast((static_cast(spinAngle) + 5) % 360); + + if (this->states[index] == 0) { + trail[0].y -= 0.25f; + + if (age > 154) { + this->states[index] = 1; + particle->alpha = 250; + } + } else if (this->states[index] == 1) { + const int heading = particle->unknown_0050; + const float speed = particle->scale; + trail[0].y += speed * g_sinTable[heading]; + const float flat = speed * g_cosTable[heading]; + trail[0].x += flat * g_cosTable[particle->unknown_004C]; + trail[0].z += flat * g_sinTable[particle->unknown_004C]; + trail[0].y += 0.02f; + particle->scale = speed * 0.98f; + + const int alpha = particle->alpha; + const int coin = std::rand() % 2; + + if ((coin < 0 ? 0 : coin) == 0) { + const int faded = alpha - 2; + particle->alpha = faded < 0 ? 0 : faded; + } else { + const int faded = alpha - 1; + particle->alpha = faded < 0 ? 0 : faded; + } + } + + if (age > 2000) { + particle->unknown_00E8 = 0; + const int heading = std::rand() % 360; + particle->unknown_004C = heading < 0 ? 0 : heading; + const int spread = std::rand() % 100; + particle->scale = static_cast(spread < 0 ? 0 : spread) * 0.004f + 0.4f; + trail[0].x = -15.0f; + trail[0].y = 0.0f; + trail[0].z = 0.0f; + this->states[index] = 0; + } + } + } + + ++particle->unknown_00E8; + } +} // OFFSET: 0x00B6FEA0 +// FUNCTION: fn_19125 +void CPokJukEffect::Slot04() { + for (std::vector::iterator it = this->particles.begin(); it != this->particles.end(); ++it) { + CParticle* particle = *it; + + if (particle && particle->alpha > 0) { + float shrink = 0.0f; + const int index = particle->unknown_0010 * 160 + particle->unknown_000C; + + for (int layer = 0; layer < 2; ++layer) { + vector3d corners[4]{}; + const float radius = particle->unknown_00C0 - shrink; + + for (int corner = 0; corner < 4; ++corner) { + const int angle = static_cast(static_cast(corner * 90) + *reinterpret_cast(&particle->unknown_00C4)) % 360; + corners[corner].x = radius * g_cosTable[angle]; + corners[corner].y = 0.0f; + corners[corner].z = radius * g_sinTable[angle]; + } + + this->FaceCamera(corners); + + const vector3d& base = this->trails[index][layer]; + + for (int corner = 0; corner < 4; ++corner) { + corners[corner].x += base.x; + corners[corner].y += base.y; + corners[corner].z += base.z; + } + + particle->vertices[0].x = corners[3].x; + particle->vertices[0].y = corners[3].y; + particle->vertices[0].z = corners[3].z; + particle->vertices[1].x = corners[0].x; + particle->vertices[1].y = corners[0].y; + particle->vertices[1].z = corners[0].z; + particle->vertices[2].x = corners[2].x; + particle->vertices[2].y = corners[2].y; + particle->vertices[2].z = corners[2].z; + particle->vertices[3].x = corners[1].x; + particle->vertices[3].y = corners[1].y; + particle->vertices[3].z = corners[1].z; + + switch (this->beats[index]) { + case 0: + particle->SetTexture("effect\\pok1.tga"); + break; + case 1: + particle->SetTexture("effect\\pok3.tga"); + break; + case 2: + particle->SetTexture("effect\\pok2.tga"); + break; + } + + const int alpha = particle->alpha; + particle->destinationBlend = 2; + particle->sourceBlend = 5; + int shown = alpha / (layer + 1); + + if (this->beats[index] != 0) { + shown /= 2; + } + + particle->alpha = shown; + particle->Render(false, 0.0f, 1.0f, 0.0f, 1.0f, false, true); + particle->alpha = alpha; + shrink += layer == 0 ? 0.5f : 0.25f; + } + } + } +} // OFFSET: 0x00B70540 +// FUNCTION: fn_19126 +void CPokJukEffect::FaceCamera(vector3d* corners) { + const int yaw = 360 - static_cast(static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw); + const int pitch = (450 - static_cast(static_cast(g_modeMgr.GetGameMode())->camera->camera.pitch)) % 360; + + for (int corner = 0; corner < 4; ++corner) { + const float y = corners[corner].y; + const float z = corners[corner].z; + corners[corner].z = z * g_cosTable[pitch] - y * g_sinTable[pitch]; + corners[corner].y = y * g_cosTable[pitch] + z * g_sinTable[pitch]; + } + + for (int corner = 0; corner < 4; ++corner) { + const float x = corners[corner].x; + const float z = corners[corner].z; + corners[corner].x = x * g_cosTable[yaw] - z * g_sinTable[yaw]; + corners[corner].z = z * g_cosTable[yaw] + x * g_sinTable[yaw]; + } +} diff --git a/Source/Contents/Effects/RainbowEffect.cpp b/Source/Contents/Effects/RainbowEffect.cpp index c086e8f2..6127ade2 100644 --- a/Source/Contents/Effects/RainbowEffect.cpp +++ b/Source/Contents/Effects/RainbowEffect.cpp @@ -54,6 +54,106 @@ bool CRainbowEffect::Slot06() { } // OFFSET: 0x00B70E00 +// FUNCTION: fn_19131 +void CRainbowEffect::Slot03() { + for (std::vector::iterator it = this->bands.begin(); it != this->bands.end(); ++it) { + CParticle* particle = *it; + vector3d& position = particle->position; + position.x = this->position[0]; + position.y = this->position[1]; + position.z = this->position[2]; + + if (particle != nullptr) { + int alpha = particle->alpha; + + if (particle->unknown_00E8 <= 180) { + ++alpha; + } else if (particle->unknown_00E8 <= 360) { + --alpha; + } + + float& spinAngle = *reinterpret_cast(&particle->unknown_00C4); + spinAngle += 1.0f; + + if (alpha < 0) { + alpha = 0; + } + + particle->alpha = alpha >= 250 ? 250 : alpha; + + matrix rotation; + std::memcpy(rotation.values, g_identityMatrix, sizeof(rotation.values)); + rotation.MakeYRotation(static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw / -180.0f * 3.141592f); + particle->transform = rotation; + + const int band = particle->unknown_0010; + const int step = static_cast(static_cast(particle->unknown_0050) / 20.0f); + const int angle = static_cast(static_cast(step * particle->unknown_000C) + spinAngle) % 360; + + vector3d points[4]{}; + const float width = particle->scale * g_cosTable[angle]; + const float height = particle->scale * g_sinTable[angle]; + + float ratio = 1.0f - static_cast(band) * 0.05f; + float flat = width * ratio; + float rise = height * ratio; + points[0].x = g_cosTable[particle->unknown_004C] * flat; + points[0].y = rise + rise; + points[0].z = g_sinTable[particle->unknown_004C] * flat; + + ratio = 1.0f - static_cast(band + 1) * 0.05f; + flat = width * ratio; + rise = height * ratio; + points[1].x = g_cosTable[particle->unknown_004C] * flat; + points[1].y = rise + rise; + points[1].z = g_sinTable[particle->unknown_004C] * flat; + + if (particle->unknown_000C != 0) { + particle->vertices[0].x = points[1].x; + particle->vertices[0].y = points[1].y; + particle->vertices[0].z = points[1].z; + particle->vertices[1].x = points[0].x; + particle->vertices[1].y = points[0].y; + particle->vertices[1].z = points[0].z; + particle->vertices[2].x = this->previousOuter.x; + particle->vertices[2].y = this->previousOuter.y; + particle->vertices[2].z = this->previousOuter.z; + particle->vertices[3].x = this->previousInner.x; + particle->vertices[3].y = this->previousInner.y; + particle->vertices[3].z = this->previousInner.z; + } + + this->previousOuter = points[1]; + this->previousInner = points[0]; + + switch (band) { + case 0: + particle->SetColor(255, 0, 0); + break; + case 1: + particle->SetColor(255, 126, 0); + break; + case 2: + particle->SetColor(255, 255, 0); + break; + case 3: + particle->SetColor(0, 255, 0); + break; + case 4: + particle->SetColor(0, 0, 255); + break; + case 5: + particle->SetColor(115, 50, 200); + break; + case 6: + particle->SetColor(255, 0, 255); + break; + } + } + + ++particle->unknown_00E8; + } +} // OFFSET: 0x00B714C0 // FUNCTION: fn_19132 diff --git a/Source/Contents/Effects/RedLineEffect.cpp b/Source/Contents/Effects/RedLineEffect.cpp index ba6a0f11..bd1ffea8 100644 --- a/Source/Contents/Effects/RedLineEffect.cpp +++ b/Source/Contents/Effects/RedLineEffect.cpp @@ -4,5 +4,122 @@ #include "Utility/Math/AffineMatrix.h" // OFFSET: 0x00B71EA0 +// FUNCTION: fn_19138 +void CRedLineEffect::Slot03() { + for (std::vector::iterator it = this->lines.begin(); it != this->lines.end(); ++it) { + CParticle* particle = *it; + vector3d& position = particle->position; + position.x = this->position[0]; + position.y = this->position[1]; + position.z = this->position[2]; + + if (particle != nullptr) { + float& spinAngle = *reinterpret_cast(&particle->unknown_00C4); + float spin = spinAngle + 1.0f; + const int age = particle->unknown_00E8; + + if (spin >= 360.0f) { + spin -= 360.0f; + } + + spinAngle = spin; + + float width; + + if (age < 125) { + if (age < 100) { + width = 0.0f; + } else if (age <= 115) { + width = g_sinTable[(age - 100) * 6] * particle->unknown_00C0; + } else { + width = particle->unknown_00C0; + } + } else { + const float shrunk = particle->unknown_00C0 - 5.0f; + const int alpha = particle->alpha - 15; + particle->alpha = alpha < 0 ? 0 : alpha; + particle->unknown_00C0 = shrunk < 0.0f ? 0.0f : shrunk; + width = particle->unknown_00C0; + } + + if (width < 0.0f) { + width = 0.0f; + } + + const int segment = particle->unknown_000C; + const int step = static_cast(static_cast(particle->unknown_0050) / 20.0f); + const int angle = static_cast(static_cast(step * segment) + spin) % 360; + const float flat = width * g_cosTable[particle->unknown_004C]; + const float rise = width * g_sinTable[particle->unknown_004C]; + + vector3d points[2]{}; + points[0].x = particle->scale * g_cosTable[angle]; + points[0].z = particle->scale * g_sinTable[angle]; + + if (particle->unknown_0054 == 1.0f) { + points[0].x *= 1.5f; + points[0].z *= 1.5f; + } + + points[1].x = flat * g_cosTable[angle] + points[0].x; + points[1].y = points[0].y - rise; + points[1].z = flat * g_sinTable[angle] + points[0].z; + + points[0].x += particle->unknown_00D0; + points[0].y += particle->unknown_00D4; + points[0].z += particle->unknown_00D8; + points[1].x += particle->unknown_00D0; + points[1].y += particle->unknown_00D4; + points[1].z += particle->unknown_00D8; + + particle->vertices[1].x = points[1].x; + particle->vertices[1].y = points[1].y; + particle->vertices[1].z = points[1].z; + particle->vertices[3].x = points[0].x; + particle->vertices[3].y = points[0].y; + particle->vertices[3].z = points[0].z; + + if (segment != 0) { + particle->vertices[0].x = this->previousOuter.x; + particle->vertices[0].y = this->previousOuter.y; + particle->vertices[0].z = this->previousOuter.z; + particle->vertices[2].x = this->previousInner.x; + particle->vertices[2].y = this->previousInner.y; + particle->vertices[2].z = this->previousInner.z; + } + + this->previousInner = points[0]; + this->previousOuter = points[1]; + } + + ++particle->unknown_00E8; + } +} // OFFSET: 0x00B72240 +// FUNCTION: fn_19139 +void CRedLineEffect::Slot04() { + for (std::vector::iterator it = this->lines.begin(); it != this->lines.end(); ++it) { + CParticle* particle = *it; + + if (particle && particle->unknown_000C > 0) { + int blend; + short shade; + + if (particle->unknown_0054 == 0.0f) { + shade = 10; + blend = 6; + } else { + shade = 100; + blend = 2; + } + + particle->destinationBlend = blend; + particle->SetColor(255, shade, shade); + + const int segment = particle->unknown_000C; + const ParticleQuad quad = {false, 0.0f, 1.0f, static_cast(segment - 1) / 21.0f, static_cast(segment) / 21.0f, false, true}; + particle->Render(quad); + } + } +}