summaryrefslogtreecommitdiffstats
path: root/src/graphics/engine/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics/engine/engine.cpp')
-rw-r--r--src/graphics/engine/engine.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index e0861d2..cfb794a 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -19,7 +19,6 @@
#include "graphics/engine/engine.h"
#include "app/app.h"
-#include "app/gamedata.h"
#include "common/image.h"
#include "common/key.h"
@@ -283,7 +282,7 @@ bool CEngine::Create()
params.minFilter = TEX_MIN_FILTER_NEAREST;
params.magFilter = TEX_MAG_FILTER_NEAREST;
params.mipmap = false;
- m_miceTexture = LoadTexture("mouse.png", params);
+ m_miceTexture = LoadTexture("interface/mouse.png", params);
GetSystemUtils()->GetCurrentTimeStamp(m_currentFrameTime);
GetSystemUtils()->GetCurrentTimeStamp(m_lastFrameTime);
@@ -2258,7 +2257,7 @@ Texture CEngine::CreateTexture(const std::string& texName, const TextureCreatePa
if (image == nullptr)
{
- if (! img.Load(CGameData::GetInstancePointer()->GetFilePath(DIR_TEXTURE, texName)))
+ if (!img.Load("textures/"+texName))
{
std::string error = img.GetError();
GetLogger()->Error("Couldn't load texture '%s': %s, blacklisting\n", texName.c_str(), error.c_str());
@@ -2309,15 +2308,15 @@ Texture CEngine::LoadTexture(const std::string& name, const TextureCreateParams&
bool CEngine::LoadAllTextures()
{
- LoadTexture("text.png");
- m_miceTexture = LoadTexture("mouse.png");
- LoadTexture("button1.png");
- LoadTexture("button2.png");
- LoadTexture("button3.png");
- LoadTexture("effect00.png");
- LoadTexture("effect01.png");
- LoadTexture("effect02.png");
- LoadTexture("map.png");
+ 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");
if (! m_backgroundName.empty())
{
@@ -2426,7 +2425,7 @@ bool CEngine::ChangeTextureColor(const std::string& texName,
CImage img;
- if (! img.Load(CGameData::GetInstancePointer()->GetFilePath(DIR_TEXTURE, texName)))
+ if (!img.Load("textures/"+texName))
{
std::string error = img.GetError();
GetLogger()->Error("Couldn't load texture '%s': %s, blacklisting\n", texName.c_str(), error.c_str());
@@ -3785,7 +3784,7 @@ void CEngine::DrawShadow()
SetMaterial(material);
// TODO: create a separate texture
- SetTexture("text.png");
+ SetTexture("interface/text.png");
Math::Point ts, ti;