Refactored Math::Vector in control classes

dev
Tomasz Kapuściński 2022-01-03 23:55:50 +01:00
parent da2471567d
commit dbe127569b
3 changed files with 6 additions and 6 deletions

View File

@ -412,7 +412,7 @@ void CControl::GlintCreate(const glm::vec2& ref, bool bLeft, bool bUp)
void CControl::GlintFrame(const Event &event)
{
Math::Vector pos, speed;
glm::vec3 pos, speed;
glm::vec2 dim;
if ( (m_state & STATE_GLINT ) == 0 ||
@ -428,7 +428,7 @@ void CControl::GlintFrame(const Event &event)
pos.x = m_glintCorner1.x + (m_glintCorner2.x - m_glintCorner1.x) * Math::Rand();
pos.y = m_glintCorner1.y + (m_glintCorner2.y - m_glintCorner1.y) * Math::Rand();
pos.z = 0.0f;
speed = Math::Vector(0.0f, 0.0f, 0.0f);
speed = glm::vec3(0.0f, 0.0f, 0.0f);
dim.x = ((15.0f + Math::Rand() * 15.0f) / 640.0f);
dim.y = dim.x / 0.75f;
m_particle->CreateParticle(pos, speed, dim, Gfx::PARTICONTROL,

View File

@ -1052,7 +1052,7 @@ void CMap::UpdateTerrain()
{
for (int x = 0; x < 256; x++)
{
Math::Vector pos;
glm::vec3 pos{};
pos.x = (static_cast<float>(x) - 128.0f) * m_half / 128.0f;
pos.z = -(static_cast<float>(y) - 128.0f) * m_half / 128.0f;
pos.y = 0.0f;
@ -1100,7 +1100,7 @@ void CMap::UpdateTerrain()
void CMap::UpdateTerrain(int bx, int by, int ex, int ey)
{
Gfx::Color color;
Math::Vector pos;
glm::vec3 pos;
float scale, water, level, intensity;
int x, y;
@ -1180,7 +1180,7 @@ void CMap::UpdateObject(CObject* pObj)
{
ObjectType type;
MapColor color;
Math::Vector pos;
glm::vec3 pos;
glm::vec2 ppos;
float dir;

View File

@ -135,7 +135,7 @@ bool CTarget::GetTooltip(const glm::vec2& pos, std::string &name)
CObject* CTarget::DetectFriendObject(const glm::vec2& pos)
{
Math::Vector p;
glm::vec3 p;
int objRank = m_engine->DetectObject(pos, p);
for (CObject* obj : CObjectManager::GetInstancePointer()->GetAllObjects())