Refactored Math::Point in task classes

dev
Tomasz Kapuściński 2021-12-24 18:39:45 +01:00
parent f8f3a64612
commit c659e060c1
9 changed files with 17 additions and 17 deletions

View File

@ -127,7 +127,7 @@ void CTaskBuild::CreateLight()
{
Gfx::Color color;
Math::Vector center, pos, dir;
Math::Point c, p;
glm::vec2 c, p;
float angle;
int i;
@ -205,7 +205,7 @@ bool CTaskBuild::EventProcess(const Event &event)
{
Math::Matrix* mat;
Math::Vector pos, dir, speed, pv, pm, tilt;
Math::Point dim;
glm::vec2 dim;
float a, g, cirSpeed, dist, linSpeed, diff;
if ( m_engine->GetPause() ) return true;
@ -665,7 +665,7 @@ Error CTaskBuild::FlatFloor()
{
ObjectType type;
Math::Vector center, pos, bPos;
Math::Point c, p;
glm::vec2 c, p;
float radius, max, bRadius = 0.0f, angle, dist;
bool bLittleFlat, bBase;

View File

@ -66,7 +66,7 @@ bool CTaskFire::EventProcess(const Event &event)
Math::Matrix* mat;
Math::Vector pos, speed, dir, vib;
ObjectType type;
Math::Point dim;
glm::vec2 dim;
float energy, fire;
int i, channel;

View File

@ -124,7 +124,7 @@ Error CTaskFireAnt::IsEnded()
{
Math::Matrix* mat;
Math::Vector pos, speed;
Math::Point dim;
glm::vec2 dim;
float angle, dist;
int i, channel;

View File

@ -102,7 +102,7 @@ Error CTaskInfo::Start(const char *name, float value, float power, bool send)
pos.y += 9.5f;
goal = m_object->GetPosition();
goal.y += 4.0f;
m_particle->CreateRay(pos, goal, Gfx::PARTIRAY3, Math::Point(2.0f, 2.0f), 1.0f);
m_particle->CreateRay(pos, goal, Gfx::PARTIRAY3, { 2.0f, 2.0f }, 1.0f);
}
if (op == 2) // reception?
{
@ -110,7 +110,7 @@ Error CTaskInfo::Start(const char *name, float value, float power, bool send)
goal.y += 9.5f;
pos = m_object->GetPosition();
pos.y += 4.0f;
m_particle->CreateRay(pos, goal, Gfx::PARTIRAY3, Math::Point(2.0f, 2.0f), 1.0f);
m_particle->CreateRay(pos, goal, Gfx::PARTIRAY3, { 2.0f, 2.0f }, 1.0f);
}
m_progress = 0.0f;

View File

@ -48,7 +48,7 @@ CTaskPen::~CTaskPen()
bool CTaskPen::EventProcess(const Event &event)
{
Math::Vector pos, speed;
Math::Point dim;
glm::vec2 dim;
int i;
if ( m_engine->GetPause() ) return true;

View File

@ -63,7 +63,7 @@ CTaskRecover::~CTaskRecover()
bool CTaskRecover::EventProcess(const Event &event)
{
Math::Vector pos, speed;
Math::Point dim;
glm::vec2 dim;
float a, g, cirSpeed, angle, energy, dist, linSpeed;
if ( m_engine->GetPause() ) return true;
@ -230,7 +230,7 @@ Error CTaskRecover::IsEnded()
{
Math::Matrix* mat;
Math::Vector pos, speed, goal;
Math::Point dim;
glm::vec2 dim;
float angle, dist, time;
int i;
@ -314,7 +314,7 @@ Error CTaskRecover::IsEnded()
goal = Math::Vector(RECOVER_DIST, 3.1f, -3.9f);
goal = Transform(*mat, goal);
m_particle->CreateRay(pos, goal, Gfx::PARTIRAY2,
Math::Point(2.0f, 2.0f), 8.0f);
{ 2.0f, 2.0f }, 8.0f);
m_soundChannel = m_sound->Play(SOUND_RECOVER, m_ruin->GetPosition(), 0.0f, 1.0f, true);
m_sound->AddEnvelope(m_soundChannel, 0.6f, 1.0f, 2.0f, SOPER_CONTINUE);

View File

@ -55,7 +55,7 @@ bool CTaskSearch::EventProcess(const Event &event)
{
Math::Matrix* mat;
Math::Vector pos, speed;
Math::Point dim;
glm::vec2 dim;
float angle;
int i;

View File

@ -74,7 +74,7 @@ bool CTaskShield::EventProcess(const Event &event)
Math::Matrix matrix;
Math::Vector pos, speed, goal, angle;
Gfx::Color color;
Math::Point dim;
glm::vec2 dim;
float energy;
if ( m_engine->GetPause() ) return true;
@ -259,7 +259,7 @@ Error CTaskShield::Start(TaskShieldMode mode, float delay)
if ( mode == TSM_START )
{
Math::Vector pos;
Math::Point dim;
glm::vec2 dim;
pos.x = 7.0f;
pos.y = 4.5f+3.0f;
@ -382,7 +382,7 @@ Error CTaskShield::Stop()
Error CTaskShield::IsEnded()
{
Math::Vector pos, speed;
Math::Point dim;
glm::vec2 dim;
float energy;
if ( m_engine->GetPause() ) return ERR_CONTINUE;

View File

@ -71,7 +71,7 @@ bool CTaskTerraform::EventProcess(const Event &event)
CObject* power;
Math::Matrix* mat;
Math::Vector pos, dir, speed;
Math::Point dim;
glm::vec2 dim;
float energy;
if ( m_engine->GetPause() ) return true;
@ -244,7 +244,7 @@ Error CTaskTerraform::IsEnded()
{
CObject* power;
Math::Vector pos, speed;
Math::Point dim;
glm::vec2 dim;
float dist, duration;
int i, max;