summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrzys-h <krzys_h@interia.pl>2014-07-24 22:17:49 +0200
committerkrzys-h <krzys_h@interia.pl>2014-07-24 22:17:49 +0200
commit7131abd385bb370328e7c59e8a6b70d160b2effc (patch)
treeb2f4313fa45eefeda6cb1ee38bf48950584c5c71
parent02ba358a892b9977250ea345c42f8226f89ba250 (diff)
downloadcolobot-7131abd385bb370328e7c59e8a6b70d160b2effc.tar.gz
colobot-7131abd385bb370328e7c59e8a6b70d160b2effc.tar.bz2
colobot-7131abd385bb370328e7c59e8a6b70d160b2effc.zip
Fixed SatCom image loading
Now LoadTexture/SetTexture functions require full path with "textures/" directory
-rw-r--r--src/graphics/engine/cloud.cpp6
-rw-r--r--src/graphics/engine/engine.cpp48
-rw-r--r--src/graphics/engine/lightning.cpp2
-rw-r--r--src/graphics/engine/particle.cpp6
-rw-r--r--src/graphics/engine/planet.cpp4
-rw-r--r--src/graphics/engine/pyro.cpp4
-rw-r--r--src/graphics/engine/water.cpp6
-rw-r--r--src/object/auto/autobase.cpp4
-rw-r--r--src/object/robotmain.cpp32
-rw-r--r--src/ui/button.cpp2
-rw-r--r--src/ui/check.cpp2
-rw-r--r--src/ui/color.cpp2
-rw-r--r--src/ui/compass.cpp2
-rw-r--r--src/ui/control.cpp14
-rw-r--r--src/ui/edit.cpp7
-rw-r--r--src/ui/gauge.cpp2
-rw-r--r--src/ui/group.cpp60
-rw-r--r--src/ui/image.cpp8
-rw-r--r--src/ui/key.cpp2
-rw-r--r--src/ui/list.cpp10
-rw-r--r--src/ui/map.cpp32
-rw-r--r--src/ui/scroll.cpp8
-rw-r--r--src/ui/shortcut.cpp6
-rw-r--r--src/ui/slider.cpp6
-rw-r--r--src/ui/window.cpp38
25 files changed, 158 insertions, 155 deletions
diff --git a/src/graphics/engine/cloud.cpp b/src/graphics/engine/cloud.cpp
index 74083af..2f1720e 100644
--- a/src/graphics/engine/cloud.cpp
+++ b/src/graphics/engine/cloud.cpp
@@ -125,8 +125,8 @@ void CCloud::Draw()
material.ambient = m_ambient;
m_engine->SetMaterial(material);
- m_engine->SetTexture(m_fileName, 0);
- m_engine->SetTexture(m_fileName, 1);
+ m_engine->SetTexture("textures/"+m_fileName, 0);
+ m_engine->SetTexture("textures/"+m_fileName, 1);
m_engine->SetState(ENG_RSTATE_TTEXTURE_BLACK | ENG_RSTATE_FOG | ENG_RSTATE_WRAP);
@@ -218,7 +218,7 @@ void CCloud::Create(const std::string& fileName,
m_fileName = fileName;
if (! m_fileName.empty())
- m_engine->LoadTexture(m_fileName);
+ m_engine->LoadTexture("textures/"+m_fileName);
if (m_terrain == nullptr)
m_terrain = CRobotMain::GetInstancePointer()->GetTerrain();
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index cfb794a..2996cb2 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -282,7 +282,7 @@ bool CEngine::Create()
params.minFilter = TEX_MIN_FILTER_NEAREST;
params.magFilter = TEX_MAG_FILTER_NEAREST;
params.mipmap = false;
- m_miceTexture = LoadTexture("interface/mouse.png", params);
+ m_miceTexture = LoadTexture("textures/interface/mouse.png", params);
GetSystemUtils()->GetCurrentTimeStamp(m_currentFrameTime);
GetSystemUtils()->GetCurrentTimeStamp(m_lastFrameTime);
@@ -1123,10 +1123,10 @@ void CEngine::ChangeSecondTexture(int objRank, const std::string& tex2Name)
p1.next[l2].next.clear();
if (!newP2.tex1.Valid())
- newP2.tex1 = LoadTexture(newP2.tex1Name);
+ newP2.tex1 = LoadTexture("textures/"+newP2.tex1Name);
if (!newP2.tex2.Valid())
- newP2.tex2 = LoadTexture(newP2.tex2Name);
+ newP2.tex2 = LoadTexture("textures/"+newP2.tex2Name);
}
}
@@ -2257,7 +2257,7 @@ Texture CEngine::CreateTexture(const std::string& texName, const TextureCreatePa
if (image == nullptr)
{
- if (!img.Load("textures/"+texName))
+ if (!img.Load(texName))
{
std::string error = img.GetError();
GetLogger()->Error("Couldn't load texture '%s': %s, blacklisting\n", texName.c_str(), error.c_str());
@@ -2308,27 +2308,27 @@ Texture CEngine::LoadTexture(const std::string& name, const TextureCreateParams&
bool CEngine::LoadAllTextures()
{
- LoadTexture("interface/text.png");
- m_miceTexture = LoadTexture("interface/mouse.png");
- LoadTexture("interface/button1.png");
- LoadTexture("interface/button2.png");
- LoadTexture("interface/button3.png");
- LoadTexture("interface/effect00.png");
- LoadTexture("interface/effect01.png");
- LoadTexture("interface/effect02.png");
- LoadTexture("interface/map.png");
+ LoadTexture("textures/interface/text.png");
+ m_miceTexture = LoadTexture("textures/interface/mouse.png");
+ LoadTexture("textures/interface/button1.png");
+ LoadTexture("textures/interface/button2.png");
+ LoadTexture("textures/interface/button3.png");
+ LoadTexture("textures/interface/effect00.png");
+ LoadTexture("textures/interface/effect01.png");
+ LoadTexture("textures/interface/effect02.png");
+ LoadTexture("textures/interface/map.png");
if (! m_backgroundName.empty())
{
TextureCreateParams params = m_defaultTexParams;
params.padToNearestPowerOfTwo = true;
- m_backgroundTex = LoadTexture(m_backgroundName, params);
+ m_backgroundTex = LoadTexture("textures/"+m_backgroundName, params);
}
else
m_backgroundTex.SetInvalid();
if (! m_foregroundName.empty())
- m_foregroundTex = LoadTexture(m_foregroundName);
+ m_foregroundTex = LoadTexture("textures/"+m_foregroundName);
else
m_foregroundTex.SetInvalid();
@@ -2362,9 +2362,9 @@ bool CEngine::LoadAllTextures()
if (! p2.tex1Name.empty())
{
if (terrain)
- p2.tex1 = LoadTexture(p2.tex1Name, m_terrainTexParams);
+ p2.tex1 = LoadTexture("textures/"+p2.tex1Name, m_terrainTexParams);
else
- p2.tex1 = LoadTexture(p2.tex1Name);
+ p2.tex1 = LoadTexture("textures/"+p2.tex1Name);
if (! p2.tex1.Valid())
ok = false;
@@ -2373,9 +2373,9 @@ bool CEngine::LoadAllTextures()
if (! p2.tex2Name.empty())
{
if (terrain)
- p2.tex2 = LoadTexture(p2.tex2Name, m_terrainTexParams);
+ p2.tex2 = LoadTexture("textures/"+p2.tex2Name, m_terrainTexParams);
else
- p2.tex2 = LoadTexture(p2.tex2Name);
+ p2.tex2 = LoadTexture("textures/"+p2.tex2Name);
if (! p2.tex2.Valid())
ok = false;
@@ -2425,7 +2425,7 @@ bool CEngine::ChangeTextureColor(const std::string& texName,
CImage img;
- if (!img.Load("textures/"+texName))
+ if (!img.Load(texName))
{
std::string error = img.GetError();
GetLogger()->Error("Couldn't load texture '%s': %s, blacklisting\n", texName.c_str(), error.c_str());
@@ -2770,7 +2770,7 @@ void CEngine::SetBackground(const std::string& name, Color up, Color down,
{
TextureCreateParams params = m_defaultTexParams;
params.padToNearestPowerOfTwo = true;
- m_backgroundTex = LoadTexture(m_backgroundName, params);
+ m_backgroundTex = LoadTexture("textures/"+m_backgroundName, params);
}
}
@@ -2796,7 +2796,7 @@ void CEngine::SetForegroundName(const std::string& name)
m_foregroundName = name;
if (! m_foregroundName.empty())
- m_foregroundTex = LoadTexture(m_foregroundName);
+ m_foregroundTex = LoadTexture("textures/"+m_foregroundName);
}
void CEngine::SetOverFront(bool front)
@@ -3735,7 +3735,7 @@ void CEngine::UpdateGroundSpotTextures()
}
std::stringstream str;
- str << "shadow" << std::setfill('0') << std::setw(2) << s << ".png";
+ str << "textures/shadow" << std::setfill('0') << std::setw(2) << s << ".png";
std::string texName = str.str();
DeleteTexture(texName);
@@ -3784,7 +3784,7 @@ void CEngine::DrawShadow()
SetMaterial(material);
// TODO: create a separate texture
- SetTexture("interface/text.png");
+ SetTexture("textures/interface/text.png");
Math::Point ts, ti;
diff --git a/src/graphics/engine/lightning.cpp b/src/graphics/engine/lightning.cpp
index b0e144c..69d8a3c 100644
--- a/src/graphics/engine/lightning.cpp
+++ b/src/graphics/engine/lightning.cpp
@@ -235,7 +235,7 @@ void CLightning::Draw()
mat.LoadIdentity();
device->SetTransform(TRANSFORM_WORLD, mat);
- m_engine->SetTexture("interface/effect00.png");
+ m_engine->SetTexture("textures/interface/effect00.png");
m_engine->SetState(ENG_RSTATE_TTEXTURE_BLACK);
Math::Point texInf;
diff --git a/src/graphics/engine/particle.cpp b/src/graphics/engine/particle.cpp
index 3dc8c0d..229385e 100644
--- a/src/graphics/engine/particle.cpp
+++ b/src/graphics/engine/particle.cpp
@@ -3532,7 +3532,7 @@ void CParticle::DrawParticle(int sheet)
if (m_particle[i].sheet != sheet) continue;
if (m_particle[i].type == PARTIPART) continue;
- m_engine->SetTexture(m_triangle[i].tex1Name);
+ m_engine->SetTexture("textures/"+m_triangle[i].tex1Name);
m_engine->SetMaterial(m_triangle[i].material);
m_engine->SetState(m_triangle[i].state);
DrawParticleTriangle(i);
@@ -3551,7 +3551,7 @@ void CParticle::DrawParticle(int sheet)
// Draw tire marks.
if (m_wheelTraceTotal > 0 && sheet == SH_WORLD)
{
- m_engine->SetTexture("interface/text.png");
+ m_engine->SetTexture("textures/interface/text.png");
m_engine->SetState(ENG_RSTATE_TTEXTURE_WHITE);
Math::Matrix matrix;
matrix.LoadIdentity();
@@ -3582,7 +3582,7 @@ void CParticle::DrawParticle(int sheet)
{
std::string name;
NameParticle(name, t);
- m_engine->SetTexture(name);
+ m_engine->SetTexture("textures/"+name);
loadTexture = true;
}
diff --git a/src/graphics/engine/planet.cpp b/src/graphics/engine/planet.cpp
index 0c96f63..bfcfe8a 100644
--- a/src/graphics/engine/planet.cpp
+++ b/src/graphics/engine/planet.cpp
@@ -86,7 +86,7 @@ void CPlanet::LoadTexture()
{
for (int i = 0; i < static_cast<int>( m_planet[j].size() ); i++)
{
- m_engine->LoadTexture(m_planet[j][i].name);
+ m_engine->LoadTexture("textures/"+m_planet[j][i].name);
}
}
}
@@ -102,7 +102,7 @@ void CPlanet::Draw()
for (int i = 0; i < static_cast<int>( m_planet[m_mode].size() ); i++)
{
- m_engine->SetTexture(m_planet[m_mode][i].name);
+ m_engine->SetTexture("textures/"+m_planet[m_mode][i].name);
if (m_planet[m_mode][i].transparent)
m_engine->SetState(ENG_RSTATE_WRAP | ENG_RSTATE_ALPHA);
diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp
index d3e0405..ea0b0fa 100644
--- a/src/graphics/engine/pyro.cpp
+++ b/src/graphics/engine/pyro.cpp
@@ -1594,7 +1594,7 @@ void CPyro::ExploStart()
if (channel != -1)
m_object->SetMasterParticle(i, channel);
}
- m_engine->LoadTexture("dirty04.png");
+ m_engine->LoadTexture("textures/dirty04.png");
DeleteObject(false, true); // destroys the object transported + the battery
}
@@ -1637,7 +1637,7 @@ void CPyro::BurnStart()
m_engine->ChangeSecondTexture(objRank, "dirty04.png");
}
}
- m_engine->LoadTexture("dirty04.png");
+ m_engine->LoadTexture("textures/dirty04.png");
m_burnPartTotal = 0;
diff --git a/src/graphics/engine/water.cpp b/src/graphics/engine/water.cpp
index d1f8d29..cb0c43f 100644
--- a/src/graphics/engine/water.cpp
+++ b/src/graphics/engine/water.cpp
@@ -348,8 +348,8 @@ void CWater::DrawSurf()
material.ambient = m_ambient;
m_engine->SetMaterial(material);
- m_engine->SetTexture(m_fileName, 0);
- m_engine->SetTexture(m_fileName, 1);
+ m_engine->SetTexture("textures/"+m_fileName, 0);
+ m_engine->SetTexture("textures/"+m_fileName, 1);
if (m_type[rankview] == WATER_TT)
m_engine->SetState(ENG_RSTATE_TTEXTURE_BLACK | ENG_RSTATE_DUAL_WHITE | ENG_RSTATE_WRAP, m_color);
@@ -492,7 +492,7 @@ void CWater::Create(WaterType type1, WaterType type2, const std::string& fileNam
VaporFlush();
if (! m_fileName.empty())
- m_engine->LoadTexture(m_fileName);
+ m_engine->LoadTexture("textures/"+m_fileName);
if (m_terrain == nullptr)
m_terrain = CRobotMain::GetInstancePointer()->GetTerrain();
diff --git a/src/object/auto/autobase.cpp b/src/object/auto/autobase.cpp
index af6c6e0..718a72b 100644
--- a/src/object/auto/autobase.cpp
+++ b/src/object/auto/autobase.cpp
@@ -1371,7 +1371,7 @@ void CAutoBase::BeginTransit()
Gfx::Color(0.0f, 0.0f, 0.0f, 0.0f),
Gfx::Color(0.0f, 0.0f, 0.0f, 0.0f),
Gfx::Color(0.0f, 0.0f, 0.0f, 0.0f));
- m_engine->LoadTexture(m_bgBack);
+ m_engine->LoadTexture("textures/"+m_bgBack);
m_cloud->SetEnabled(false); // cache clouds
m_planet->SetMode(1);
@@ -1388,7 +1388,7 @@ void CAutoBase::EndTransit()
m_engine->DeleteTexture(m_bgBack);
m_engine->SetBackground(m_bgName, m_bgUp, m_bgDown, m_bgCloudUp, m_bgCloudDown);
- m_engine->LoadTexture(m_bgName);
+ m_engine->LoadTexture("textures/"+m_bgName);
m_cloud->SetEnabled(true); // gives the clouds
m_planet->SetMode(0);
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index 9860943..407a1ec 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -5153,7 +5153,7 @@ void CRobotMain::ChangeColor()
exclu[3] = Math::Point(256.0f/256.0f, 256.0f/256.0f); // SatCom screen
exclu[4] = Math::Point(0.0f, 0.0f);
exclu[5] = Math::Point(0.0f, 0.0f); // terminator
- m_engine->ChangeTextureColor("human.png", colorRef1, colorNew1, colorRef2, colorNew2, 0.30f, 0.01f, ts, ti, exclu);
+ m_engine->ChangeTextureColor("textures/human.png", colorRef1, colorNew1, colorRef2, colorNew2, 0.30f, 0.01f, ts, ti, exclu);
float tolerance;
@@ -5195,7 +5195,7 @@ void CRobotMain::ChangeColor()
colorNew2.b = 0.0f;
char name[100];
- sprintf(name, "face%.2d.png", face+1);
+ sprintf(name, "textures/face%.2d.png", face+1);
exclu[0] = Math::Point(105.0f/256.0f, 47.0f/166.0f);
exclu[1] = Math::Point(153.0f/256.0f, 79.0f/166.0f); // blue canister
exclu[2] = Math::Point(0.0f, 0.0f);
@@ -5209,19 +5209,19 @@ void CRobotMain::ChangeColor()
colorNew2.g = 0.0f;
colorNew2.b = 0.0f;
- m_engine->ChangeTextureColor("base1.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
- m_engine->ChangeTextureColor("convert.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
- m_engine->ChangeTextureColor("derrick.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
- m_engine->ChangeTextureColor("factory.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
- m_engine->ChangeTextureColor("lemt.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
- m_engine->ChangeTextureColor("roller.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
- m_engine->ChangeTextureColor("search.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
+ m_engine->ChangeTextureColor("textures/base1.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
+ m_engine->ChangeTextureColor("textures/convert.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
+ m_engine->ChangeTextureColor("textures/derrick.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
+ m_engine->ChangeTextureColor("textures/factory.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
+ m_engine->ChangeTextureColor("textures/lemt.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
+ m_engine->ChangeTextureColor("textures/roller.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
+ m_engine->ChangeTextureColor("textures/search.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, 0, 0, true);
exclu[0] = Math::Point( 0.0f/256.0f, 160.0f/256.0f);
exclu[1] = Math::Point(256.0f/256.0f, 256.0f/256.0f); // pencils
exclu[2] = Math::Point(0.0f, 0.0f);
exclu[3] = Math::Point(0.0f, 0.0f); // terminator
- m_engine->ChangeTextureColor("drawer.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, exclu, 0, true);
+ m_engine->ChangeTextureColor("textures/drawer.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, exclu, 0, true);
exclu[0] = Math::Point(237.0f/256.0f, 176.0f/256.0f);
exclu[1] = Math::Point(256.0f/256.0f, 220.0f/256.0f); // blue canister
@@ -5229,26 +5229,26 @@ void CRobotMain::ChangeColor()
exclu[3] = Math::Point(130.0f/256.0f, 214.0f/256.0f); // safe location
exclu[4] = Math::Point(0.0f, 0.0f);
exclu[5] = Math::Point(0.0f, 0.0f); // terminator
- m_engine->ChangeTextureColor("subm.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, exclu, 0, true);
+ m_engine->ChangeTextureColor("textures/subm.png", m_colorRefBot, m_colorNewBot, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, exclu, 0, true);
exclu[0] = Math::Point(128.0f/256.0f, 160.0f/256.0f);
exclu[1] = Math::Point(256.0f/256.0f, 256.0f/256.0f); // SatCom
exclu[2] = Math::Point(0.0f, 0.0f);
exclu[3] = Math::Point(0.0f, 0.0f); // terminator
- m_engine->ChangeTextureColor("ant.png", m_colorRefAlien, m_colorNewAlien, colorRef2, colorNew2, 0.50f, -1.0f, ts, ti, exclu);
- m_engine->ChangeTextureColor("mother.png", m_colorRefAlien, m_colorNewAlien, colorRef2, colorNew2, 0.50f, -1.0f, ts, ti);
+ m_engine->ChangeTextureColor("textures/ant.png", m_colorRefAlien, m_colorNewAlien, colorRef2, colorNew2, 0.50f, -1.0f, ts, ti, exclu);
+ m_engine->ChangeTextureColor("textures/mother.png", m_colorRefAlien, m_colorNewAlien, colorRef2, colorNew2, 0.50f, -1.0f, ts, ti);
- m_engine->ChangeTextureColor("plant.png", m_colorRefGreen, m_colorNewGreen, colorRef2, colorNew2, 0.50f, -1.0f, ts, ti);
+ m_engine->ChangeTextureColor("textures/plant.png", m_colorRefGreen, m_colorNewGreen, colorRef2, colorNew2, 0.50f, -1.0f, ts, ti);
// PARTIPLOUF0 and PARTIDROP :
ts = Math::Point(0.500f, 0.500f);
ti = Math::Point(0.875f, 0.750f);
- m_engine->ChangeTextureColor("interface/effect00.png", m_colorRefWater, m_colorNewWater, colorRef2, colorNew2, 0.20f, -1.0f, ts, ti, 0, m_colorShiftWater, true);
+ m_engine->ChangeTextureColor("textures/interface/effect00.png", m_colorRefWater, m_colorNewWater, colorRef2, colorNew2, 0.20f, -1.0f, ts, ti, 0, m_colorShiftWater, true);
// PARTIFLIC :
ts = Math::Point(0.00f, 0.75f);
ti = Math::Point(0.25f, 1.00f);
- m_engine->ChangeTextureColor("interface/effect02.png", m_colorRefWater, m_colorNewWater, colorRef2, colorNew2, 0.20f, -1.0f, ts, ti, 0, m_colorShiftWater, true);
+ m_engine->ChangeTextureColor("textures/interface/effect02.png", m_colorRefWater, m_colorNewWater, colorRef2, colorNew2, 0.20f, -1.0f, ts, ti, 0, m_colorShiftWater, true);
}
//! Updates the number of unnecessary objects
diff --git a/src/ui/button.cpp b/src/ui/button.cpp
index 2a1fb3b..d859fb7 100644
--- a/src/ui/button.cpp
+++ b/src/ui/button.cpp
@@ -176,7 +176,7 @@ void CButton::Draw()
(m_state & STATE_CARD ) == 0 &&
(m_state & STATE_SIMPLY) == 0 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
dp = 0.5f / 256.0f;
diff --git a/src/ui/check.cpp b/src/ui/check.cpp
index 9d42b86..3410d2e 100644
--- a/src/ui/check.cpp
+++ b/src/ui/check.cpp
@@ -102,7 +102,7 @@ void CCheck::Draw()
DrawShadow(m_pos, m_dim);
}
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
zoomExt = 1.00f;
diff --git a/src/ui/color.cpp b/src/ui/color.cpp
index 57e78d5..1f8cb29 100644
--- a/src/ui/color.cpp
+++ b/src/ui/color.cpp
@@ -138,7 +138,7 @@ void CColor::Draw()
DrawShadow(m_pos, m_dim);
}
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
CControl::Draw();
diff --git a/src/ui/compass.cpp b/src/ui/compass.cpp
index 068c37f..ebe1908 100644
--- a/src/ui/compass.cpp
+++ b/src/ui/compass.cpp
@@ -88,7 +88,7 @@ void CCompass::Draw()
device = m_engine->GetDevice();
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
p1.x = m_pos.x;
diff --git a/src/ui/control.cpp b/src/ui/control.cpp
index 6686c55..98c3396 100644
--- a/src/ui/control.cpp
+++ b/src/ui/control.cpp
@@ -437,7 +437,7 @@ void CControl::Draw()
if ( (m_state & STATE_VISIBLE) == 0 ) return;
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
zoomExt = 1.00f;
@@ -491,7 +491,7 @@ void CControl::Draw()
if ( m_state & STATE_OKAY )
{
- m_engine->SetTexture("interface/button3.png");
+ m_engine->SetTexture("textures/interface/button3.png");
icon = 3; // yellow with green point pressed
}
@@ -506,19 +506,19 @@ void CControl::Draw()
if ( icon >= 192 )
{
icon -= 192;
- m_engine->SetTexture("interface/text.png");
+ m_engine->SetTexture("textures/interface/text.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
}
else if ( icon >= 128 )
{
icon -= 128;
- m_engine->SetTexture("interface/button3.png");
+ m_engine->SetTexture("textures/interface/button3.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
}
else if ( icon >= 64 )
{
icon -= 64;
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
}
else
@@ -751,7 +751,7 @@ void CControl::DrawWarning(Math::Point pos, Math::Point dim)
dp = 0.5f / 256.0f;
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 64.0f / 256.0f;
@@ -795,7 +795,7 @@ void CControl::DrawShadow(Math::Point pos, Math::Point dim, float deep)
dp = 0.5f/256.0f;
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState( Gfx::ENG_RSTATE_TTEXTURE_WHITE);
pos.x += deep * 0.010f * 0.75f;
diff --git a/src/ui/edit.cpp b/src/ui/edit.cpp
index a0387bf..8f46e42 100644
--- a/src/ui/edit.cpp
+++ b/src/ui/edit.cpp
@@ -1146,7 +1146,6 @@ void CEdit::DrawImage(Math::Point pos, std::string name, float width,
filename = name + ".png";
CRobotMain::InjectLevelDir(filename, "icons");
boost::replace_all(filename, "\\", "/"); //TODO: Fix this in files
- filename = "../" + filename;
m_engine->SetTexture(filename);
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
@@ -1176,7 +1175,7 @@ void CEdit::DrawBack(Math::Point pos, Math::Point dim)
if ( m_bGeneric ) return;
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
if ( m_bMulti )
@@ -1226,7 +1225,7 @@ void CEdit::DrawPart(Math::Point pos, Math::Point dim, int icon)
Math::Point uv1, uv2;
float dp;
- m_engine->SetTexture("interface/text.png");
+ m_engine->SetTexture("textures/interface/text.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = (16.0f/256.0f)*(icon%16);
@@ -1437,7 +1436,7 @@ void CEdit::LoadImage(std::string name)
filename = name + ".png";
CRobotMain::InjectLevelDir(filename, "icons");
boost::replace_all(filename, "\\", "/"); //TODO: Fix this in files
- m_engine->LoadTexture("../"+filename);
+ m_engine->LoadTexture(filename);
}
// Read from a text file.
diff --git a/src/ui/gauge.cpp b/src/ui/gauge.cpp
index 73585d3..170db5b 100644
--- a/src/ui/gauge.cpp
+++ b/src/ui/gauge.cpp
@@ -75,7 +75,7 @@ void CGauge::Draw()
if ( (m_state & STATE_VISIBLE) == 0 ) return;
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
dp = 0.5f/256.0f;
diff --git a/src/ui/group.cpp b/src/ui/group.cpp
index 723a9fc..d90a9e6 100644
--- a/src/ui/group.cpp
+++ b/src/ui/group.cpp
@@ -87,7 +87,7 @@ void CGroup::Draw()
if ( m_icon == 0 ) // hollow frame?
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 160.0f / 256.0f;
uv1.y = 192.0f / 256.0f; // u-v texture
@@ -103,7 +103,7 @@ void CGroup::Draw()
}
if ( m_icon == 1 ) // orange solid opaque?
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 104.0f / 256.0f;
uv1.y = 48.0f / 256.0f;
@@ -117,7 +117,7 @@ void CGroup::Draw()
}
if ( m_icon == 2 ) // orange degrade -> transparent?
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
uv1.x = 112.0f / 256.0f;
uv1.y = 48.0f / 256.0f;
@@ -131,7 +131,7 @@ void CGroup::Draw()
}
if ( m_icon == 3 ) // transparent gradient -> gray?
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
uv1.x = 120.0f / 256.0f;
uv1.y = 48.0f / 256.0f;
@@ -145,7 +145,7 @@ void CGroup::Draw()
}
if ( m_icon == 4 ) // degrade blue corner?
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
uv1.x = 192.0f / 256.0f;
uv1.y = 128.0f / 256.0f;
@@ -159,7 +159,7 @@ void CGroup::Draw()
}
if ( m_icon == 5 ) // degrade orange corner?
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
uv1.x = 224.0f / 256.0f;
uv1.y = 128.0f / 256.0f;
@@ -173,7 +173,7 @@ void CGroup::Draw()
}
if ( m_icon == 6 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 0.0f / 256.0f; // brown transparent
uv1.y = 75.0f / 256.0f;
@@ -189,7 +189,7 @@ void CGroup::Draw()
}
if ( m_icon == 7 )
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 64.0f / 256.0f;
uv1.y = 0.0f / 256.0f;
@@ -203,7 +203,7 @@ void CGroup::Draw()
}
if ( m_icon == 8 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 64.0f / 256.0f; // green transparent
uv1.y = 160.0f / 256.0f;
@@ -217,7 +217,7 @@ void CGroup::Draw()
}
if ( m_icon == 9 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 64.0f / 256.0f; // red transparent
uv1.y = 176.0f/256.0f;
@@ -231,7 +231,7 @@ void CGroup::Draw()
}
if ( m_icon == 10 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 64.0f / 256.0f; // blue transparent
uv1.y = 192.0f / 256.0f;
@@ -245,7 +245,7 @@ void CGroup::Draw()
}
if ( m_icon == 11 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 64.0f / 256.0f; // yellow transparent
uv1.y = 224.0f / 256.0f;
@@ -262,7 +262,7 @@ void CGroup::Draw()
dim.x = m_dim.x / 2.0f;
dim.y = m_dim.y / 2.0f;
- m_engine->SetTexture("interface/mouse.png");
+ m_engine->SetTexture("textures/interface/mouse.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
pos.x = m_pos.x-m_dim.x/300.0f;
pos.y = m_pos.y+m_dim.y/300.0f+dim.y;
@@ -301,7 +301,7 @@ void CGroup::Draw()
}
if ( m_icon == 13 ) // corner upper / left?
{
- m_engine->SetTexture("interface/mouse.png");
+ m_engine->SetTexture("textures/interface/mouse.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
pos.x = m_pos.x-m_dim.x/150.0f;
pos.y = m_pos.y+m_dim.y/150.0f;
@@ -322,7 +322,7 @@ void CGroup::Draw()
}
if ( m_icon == 14 ) // corner upper / right?
{
- m_engine->SetTexture("interface/mouse.png");
+ m_engine->SetTexture("textures/interface/mouse.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
pos.x = m_pos.x-m_dim.x/150.0f;
pos.y = m_pos.y+m_dim.y/150.0f;
@@ -343,7 +343,7 @@ void CGroup::Draw()
}
if ( m_icon == 15 ) // corner lower / left?
{
- m_engine->SetTexture("interface/mouse.png");
+ m_engine->SetTexture("textures/interface/mouse.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
pos.x = m_pos.x-m_dim.x/150.0f;
pos.y = m_pos.y+m_dim.y/150.0f;
@@ -364,7 +364,7 @@ void CGroup::Draw()
}
if ( m_icon == 16 ) // corner lower / left?
{
- m_engine->SetTexture("interface/mouse.png");
+ m_engine->SetTexture("textures/interface/mouse.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
pos.x = m_pos.x-m_dim.x/150.0f;
pos.y = m_pos.y+m_dim.y/150.0f;
@@ -385,7 +385,7 @@ void CGroup::Draw()
}
if ( m_icon == 17 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 0.0f / 256.0f; // blue frame
uv1.y = 75.0f / 256.0f;
@@ -401,7 +401,7 @@ void CGroup::Draw()
}
if ( m_icon == 18 ) // arrow> for SatCom?
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
uv1.x = 0.0f / 256.0f; // >
uv1.y = 192.0f / 256.0f;
@@ -415,7 +415,7 @@ void CGroup::Draw()
}
if ( m_icon == 19 ) // SatCom symbol?
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
uv1.x = 224.0f / 256.0f; // SatCom symbol
uv1.y = 224.0f / 256.0f;
@@ -429,7 +429,7 @@ void CGroup::Draw()
}
if ( m_icon == 20 ) // solid blue background?
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
uv1.x = 224.0f / 256.0f;
uv1.y = 32.0f / 256.0f;
@@ -443,7 +443,7 @@ void CGroup::Draw()
}
if ( m_icon == 21 ) // stand-by symbol?
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
uv1.x = 160.0f / 256.0f;
uv1.y = 32.0f / 256.0f;
@@ -457,7 +457,7 @@ void CGroup::Draw()
}
if ( m_icon == 22 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 64.0f / 256.0f; // opaque yellow
uv1.y = 224.0f / 256.0f;
@@ -474,7 +474,7 @@ void CGroup::Draw()
if ( m_icon == 23 )
{
- m_engine->SetTexture("interface/button3.png");
+ m_engine->SetTexture("textures/interface/button3.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 64.0f / 256.0f; // yellow
uv1.y = 192.0f / 256.0f;
@@ -490,7 +490,7 @@ void CGroup::Draw()
}
if ( m_icon == 24 )
{
- m_engine->SetTexture("interface/button3.png");
+ m_engine->SetTexture("textures/interface/button3.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 80.0f / 256.0f; // orange
uv1.y = 192.0f / 256.0f;
@@ -506,7 +506,7 @@ void CGroup::Draw()
}
if ( m_icon == 25 )
{
- m_engine->SetTexture("interface/button3.png");
+ m_engine->SetTexture("textures/interface/button3.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 64.0f / 256.0f; // orange
uv1.y = 208.0f / 256.0f;
@@ -522,7 +522,7 @@ void CGroup::Draw()
}
if ( m_icon == 26 )
{
- m_engine->SetTexture("interface/button3.png");
+ m_engine->SetTexture("textures/interface/button3.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 80.0f / 256.0f; // red
uv1.y = 208.0f / 256.0f;
@@ -538,7 +538,7 @@ void CGroup::Draw()
}
if ( m_icon == 27 )
{
- m_engine->SetTexture("interface/button3.png");
+ m_engine->SetTexture("textures/interface/button3.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 32.0f / 256.0f;
uv1.y = 0.0f / 256.0f;
@@ -556,7 +556,7 @@ void CGroup::Draw()
pos = m_pos;
dim = m_dim;
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 32.0f / 256.0f;
uv1.y = 32.0f / 256.0f;
@@ -568,7 +568,7 @@ void CGroup::Draw()
uv2.y -= dp;
DrawIcon(pos, dim, uv1, uv2);
- m_engine->SetTexture("interface/button3.png");
+ m_engine->SetTexture("textures/interface/button3.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
pos.x += 8.0f / 640.0f;
pos.y += 8.0f / 480.0f;
diff --git a/src/ui/image.cpp b/src/ui/image.cpp
index 07b0675..3f002df 100644
--- a/src/ui/image.cpp
+++ b/src/ui/image.cpp
@@ -110,7 +110,7 @@ void CImage::Draw()
if ( m_icon == 0 ) // hollow frame?
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 160.0f / 256.0f;
uv1.y = 192.0f / 256.0f; // u-v texture
@@ -127,8 +127,10 @@ void CImage::Draw()
if ( m_filename[0] != 0 ) // displays an image?
{
- m_engine->LoadTexture(m_filename);
- m_engine->SetTexture(m_filename);
+ std::string texFilename = m_filename;
+ texFilename = "textures/"+texFilename;
+ m_engine->LoadTexture(texFilename.c_str());
+ m_engine->SetTexture(texFilename);
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
pos = m_pos;
dim = m_dim;
diff --git a/src/ui/key.cpp b/src/ui/key.cpp
index 1c8ebcd..0b86a91 100644
--- a/src/ui/key.cpp
+++ b/src/ui/key.cpp
@@ -136,7 +136,7 @@ void CKey::Draw()
DrawShadow(m_pos, m_dim);
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); // was D3DSTATENORMAL
float zoomExt = 1.00f;
diff --git a/src/ui/list.cpp b/src/ui/list.cpp
index bccb435..b5f7599 100644
--- a/src/ui/list.cpp
+++ b/src/ui/list.cpp
@@ -388,7 +388,7 @@ void CList::Draw()
if (m_icon == 0)
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 128.0f / 256.0f;
@@ -398,7 +398,7 @@ void CList::Draw()
}
else
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 132.0f / 256.0f;
@@ -434,7 +434,7 @@ void CList::Draw()
dim.y *= 0.4f;
pos.y -= dim.y;
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); // was D3DSTATETTw
uv1.x = 120.0f / 256.0f;
uv1.y = 64.0f / 256.0f;
@@ -509,7 +509,7 @@ void CList::Draw()
if ( m_check[i + m_firstLine] )
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 64.0f / 256.0f;
uv1.y = 0.0f / 256.0f;
@@ -534,7 +534,7 @@ void CList::Draw()
}
else
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); // was D3DSTATETTw
if ( i + m_firstLine == m_selectLine )
{
diff --git a/src/ui/map.cpp b/src/ui/map.cpp
index 22cd616..8ff05ab 100644
--- a/src/ui/map.cpp
+++ b/src/ui/map.cpp
@@ -322,7 +322,7 @@ void CMap::Draw()
m_offset = AdjustOffset(m_map[MAPMAXOBJECT - 1].pos);
if ( m_fixImage[0] == 0 ) { // drawing of the relief?
- m_engine->SetTexture("interface/map.png");
+ m_engine->SetTexture("textures/interface/map.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 0.5f + (m_offset.x - (m_half / m_zoom)) / (m_half * 2.0f);
uv1.y = 0.5f - (m_offset.y + (m_half / m_zoom)) / (m_half * 2.0f);
@@ -330,8 +330,10 @@ void CMap::Draw()
uv2.y = 0.5f - (m_offset.y - (m_half / m_zoom)) / (m_half * 2.0f);
DrawVertex(uv1, uv2, 0.97f); // drawing the map
} else { // still image?
- m_engine->LoadTexture(m_fixImage);
- m_engine->SetTexture(m_fixImage);
+ std::string texFilename = m_fixImage;
+ texFilename = "textures/"+texFilename;
+ m_engine->LoadTexture(texFilename.c_str());
+ m_engine->SetTexture(texFilename.c_str());
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 0.0f;
uv1.y = 0.0f;
@@ -469,7 +471,7 @@ void CMap::DrawFocus(Math::Point pos, float dir, ObjectType type, MapColor color
uv2.x = 126.0f/256.0f;
uv2.y = 255.0f/256.0f;
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
bEnding = false;
@@ -529,7 +531,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
return; // flashes
}
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
if ( bUp )
{
@@ -672,7 +674,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
{
if ( bSelect )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
if ( m_bToy )
{
@@ -698,7 +700,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
{
if ( m_bRadar )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
uv1.x = 64.5f/256.0f; // blue triangle
uv1.y = 240.5f/256.0f;
@@ -718,7 +720,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
if ( color == MAPCOLOR_WAYPOINTb )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 192.5f/256.0f; // blue cross
uv1.y = 240.5f/256.0f;
@@ -728,7 +730,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
}
if ( color == MAPCOLOR_WAYPOINTr )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 208.5f/256.0f; // red cross
uv1.y = 240.5f/256.0f;
@@ -738,7 +740,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
}
if ( color == MAPCOLOR_WAYPOINTg )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 224.5f/256.0f; // green cross
uv1.y = 240.5f/256.0f;
@@ -748,7 +750,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
}
if ( color == MAPCOLOR_WAYPOINTy )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 240.5f/256.0f; // yellow cross
uv1.y = 240.5f/256.0f;
@@ -758,7 +760,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
}
if ( color == MAPCOLOR_WAYPOINTv )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 192.5f/256.0f; // violet cross
uv1.y = 224.5f/256.0f;
@@ -779,7 +781,7 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color,
dp = 0.5f/256.0f;
- m_engine->SetTexture("interface/button3.png");
+ m_engine->SetTexture("textures/interface/button3.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
if ( color == MAPCOLOR_MOVE )
{
@@ -894,7 +896,7 @@ void CMap::DrawHighlight(Math::Point pos)
dim.x *= 2.0f+cosf(m_time*8.0f)*0.5f;
dim.y *= 2.0f+cosf(m_time*8.0f)*0.5f;
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 160.5f/256.0f; // hilite
uv1.y = 224.5f/256.0f;
@@ -1053,7 +1055,7 @@ void CMap::UpdateTerrain()
}
m_engine->DeleteTexture("interface/map.png");
- m_engine->LoadTexture("interface/map.png", &img);
+ m_engine->LoadTexture("textures/interface/map.png", &img);
}
// Updates the field in the map.
diff --git a/src/ui/scroll.cpp b/src/ui/scroll.cpp
index 6be1e6d..680f647 100644
--- a/src/ui/scroll.cpp
+++ b/src/ui/scroll.cpp
@@ -379,7 +379,7 @@ void CScroll::DrawVertex(Math::Point pos, Math::Point dim, int icon)
if ( icon == 0 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 0.0f/256.0f; // yellow rectangle
uv1.y = 32.0f/256.0f;
@@ -389,7 +389,7 @@ void CScroll::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 1 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 128.0f/256.0f; // gray rectangle
uv1.y = 32.0f/256.0f;
@@ -399,7 +399,7 @@ void CScroll::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 2 )
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 64.0f/256.0f; // blue rectangle
uv1.y = 0.0f/256.0f;
@@ -409,7 +409,7 @@ void CScroll::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 104.0f/256.0f; // blue line -
uv1.y = 32.0f/256.0f;
diff --git a/src/ui/shortcut.cpp b/src/ui/shortcut.cpp
index 456b69a..8971e9d 100644
--- a/src/ui/shortcut.cpp
+++ b/src/ui/shortcut.cpp
@@ -114,7 +114,7 @@ void CShortcut::Draw()
zoom = 1.0f;
}
- m_engine->SetTexture("interface/button3.png");
+ m_engine->SetTexture("textures/interface/button3.png");
if ( icon != -1 )
{
@@ -130,7 +130,7 @@ void CShortcut::Draw()
Math::Point p1, p2, c, uv1, uv2;
float dp;
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
zoom = 0.9f+sinf(m_time*8.0f)*0.1f;
@@ -170,7 +170,7 @@ void CShortcut::Draw()
Math::Point uv1, uv2;
float dp;
- m_engine->SetTexture("interface/button3.png");
+ m_engine->SetTexture("textures/interface/button3.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
uv1.x = 160.0f/256.0f;
diff --git a/src/ui/slider.cpp b/src/ui/slider.cpp
index 9078cfe..7e41083 100644
--- a/src/ui/slider.cpp
+++ b/src/ui/slider.cpp
@@ -498,7 +498,7 @@ void CSlider::DrawVertex(Math::Point pos, Math::Point dim, int icon)
if ( icon == 0 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 0.0f/256.0f; // yellow rectangle
uv1.y = 32.0f/256.0f;
@@ -510,7 +510,7 @@ void CSlider::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 1 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 128.0f/256.0f; // gray rectangle
uv1.y = 32.0f/256.0f;
@@ -522,7 +522,7 @@ void CSlider::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 224.0f/256.0f; // cursor
uv1.y = 32.0f/256.0f;
diff --git a/src/ui/window.cpp b/src/ui/window.cpp
index 9740f7f..60aad0d 100644
--- a/src/ui/window.cpp
+++ b/src/ui/window.cpp
@@ -1174,7 +1174,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
if ( icon == 0 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
uv1.x = 64.0f/256.0f; // dark blue transparent
uv1.y = 64.0f/256.0f;
@@ -1190,7 +1190,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 1 )
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 128.0f/256.0f; // white tooltip
uv1.y = 0.0f/256.0f;
@@ -1204,7 +1204,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 2 )
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 128.0f/256.0f; // yellow
uv1.y = 16.0f/256.0f;
@@ -1218,7 +1218,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 3 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 0.0f/256.0f; // transparent blue bar with yellow upper
uv1.y = 64.0f/256.0f;
@@ -1237,7 +1237,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
dim.x += 100.0f/640.0f;
dim.y += 60.0f/480.0f;
- m_engine->SetTexture("interface/human.png");
+ m_engine->SetTexture("textures/interface/human.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 140.0f/256.0f;
uv1.y = 32.0f/256.0f;
@@ -1254,7 +1254,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
dim.x -= 20.0f/640.0f;
dim.y += 0.0f/480.0f;
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
uv1.x = 192.0f/256.0f;
uv1.y = 32.0f/256.0f;
@@ -1273,7 +1273,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
dim.x -= 20.0f/640.0f;
dim.y -= 20.0f/480.0f;
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 64.0f/256.0f;
uv1.y = 0.0f/256.0f;
@@ -1309,7 +1309,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
dim.x -= 20.0f/640.0f;
dim.y -= 20.0f/480.0f;
- m_engine->SetTexture("interface/button3.png");
+ m_engine->SetTexture("textures/interface/button3.png");
uv1.x = 0.0f/256.0f;
uv1.y = 224.0f/256.0f;
uv2.x = 32.0f/256.0f;
@@ -1320,7 +1320,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
uv2.y -= dp;
DrawIcon(pos, dim, uv1, uv2); // dark blue background
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
uv1.x = 224.0f/256.0f;
uv1.y = 224.0f/256.0f;
uv2.x = 249.0f/256.0f;
@@ -1392,7 +1392,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 5 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 64.0f/256.0f; // transparent green
uv1.y = 160.0f/256.0f;
@@ -1406,7 +1406,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 6 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 64.0f/256.0f; // transparent red
uv1.y = 176.0f/256.0f;
@@ -1420,7 +1420,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 7 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 64.0f/256.0f; // transparent blue
uv1.y = 192.0f/256.0f;
@@ -1434,7 +1434,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 8 )
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 0.0f/256.0f; // opaque orange
uv1.y = 0.0f/256.0f;
@@ -1450,7 +1450,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 9 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 32.0f/256.0f; // opaque gray
uv1.y = 32.0f/256.0f;
@@ -1470,7 +1470,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 11 )
{
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
uv1.x = 64.0f/256.0f; // transparent yellow
uv1.y = 224.0f/256.0f;
@@ -1484,7 +1484,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 12 )
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 128.0f/256.0f; // dirty opaque gray
uv1.y = 128.0f/256.0f;
@@ -1500,7 +1500,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 13 )
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 192.0f/256.0f; // dirty opaque blue
uv1.y = 128.0f/256.0f;
@@ -1516,7 +1516,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
}
else if ( icon == 14 )
{
- m_engine->SetTexture("interface/button1.png");
+ m_engine->SetTexture("textures/interface/button1.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 160.0f/256.0f; // dirty opaque red
uv1.y = 128.0f/256.0f;
@@ -1542,7 +1542,7 @@ void CWindow::DrawHach(Math::Point pos, Math::Point dim)
dp = 0.5f/256.0f;
- m_engine->SetTexture("interface/button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 64.0f/256.0f; // hatching
uv1.y = 208.0f/256.0f;