From 2260f6bf4feb62929e32a1bea9cd3f403aa034b1 Mon Sep 17 00:00:00 2001 From: Krzysztof Dermont Date: Fri, 20 Jun 2014 23:41:38 +0200 Subject: Big part of PhysFS support * removed -mod argument * removed -datadir argument * removed -lang argument * removed some dead ui code * added resource manager and file loaders (stream and SDL) * changed interface textures location to match new directory structure * removed CGameData for mod support * added PhysFS support --- src/ui/control.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/ui/control.cpp') diff --git a/src/ui/control.cpp b/src/ui/control.cpp index 501350e..c759505 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("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("button3.png"); + m_engine->SetTexture("textures/interface/button3.png"); icon = 3; // yellow with green point pressed } @@ -507,22 +507,22 @@ void CControl::Draw() { icon -= 192; #if _POLISH - m_engine->SetTexture("textp.png"); + m_engine->SetTexture("textures/interface/textp.png"); #else - m_engine->SetTexture("text.png"); + m_engine->SetTexture("textures/interface/text.png"); #endif m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); } else if ( icon >= 128 ) { icon -= 128; - m_engine->SetTexture("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("button2.png"); + m_engine->SetTexture("textures/interface/button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); } else @@ -755,7 +755,7 @@ void CControl::DrawWarning(Math::Point pos, Math::Point dim) dp = 0.5f / 256.0f; - m_engine->SetTexture("button2.png"); + m_engine->SetTexture("textures/interface/button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f / 256.0f; @@ -799,7 +799,7 @@ void CControl::DrawShadow(Math::Point pos, Math::Point dim, float deep) dp = 0.5f/256.0f; - m_engine->SetTexture("button2.png"); + m_engine->SetTexture("textures/interface/button2.png"); m_engine->SetState( Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x += deep * 0.010f * 0.75f; -- cgit v1.2.3-1-g7c22 From 106ec014b812c6f5eb93ea30c04b3bba333542dd Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 10 Jul 2014 16:25:40 +0200 Subject: Fixed texture and script loading --- src/ui/control.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/ui/control.cpp') diff --git a/src/ui/control.cpp b/src/ui/control.cpp index c759505..1eff38c 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("textures/interface/button1.png"); + m_engine->SetTexture("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("textures/interface/button3.png"); + m_engine->SetTexture("interface/button3.png"); icon = 3; // yellow with green point pressed } @@ -507,22 +507,22 @@ void CControl::Draw() { icon -= 192; #if _POLISH - m_engine->SetTexture("textures/interface/textp.png"); + m_engine->SetTexture("interface/textp.png"); #else - m_engine->SetTexture("textures/interface/text.png"); + m_engine->SetTexture("interface/text.png"); #endif m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); } else if ( icon >= 128 ) { icon -= 128; - m_engine->SetTexture("textures/interface/button3.png"); + m_engine->SetTexture("interface/button3.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); } else if ( icon >= 64 ) { icon -= 64; - m_engine->SetTexture("textures/interface/button2.png"); + m_engine->SetTexture("interface/button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); } else @@ -755,7 +755,7 @@ void CControl::DrawWarning(Math::Point pos, Math::Point dim) dp = 0.5f / 256.0f; - m_engine->SetTexture("textures/interface/button2.png"); + m_engine->SetTexture("interface/button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f / 256.0f; @@ -799,7 +799,7 @@ void CControl::DrawShadow(Math::Point pos, Math::Point dim, float deep) dp = 0.5f/256.0f; - m_engine->SetTexture("textures/interface/button2.png"); + m_engine->SetTexture("interface/button2.png"); m_engine->SetState( Gfx::ENG_RSTATE_TTEXTURE_WHITE); pos.x += deep * 0.010f * 0.75f; -- cgit v1.2.3-1-g7c22 From 7131abd385bb370328e7c59e8a6b70d160b2effc Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 24 Jul 2014 22:17:49 +0200 Subject: Fixed SatCom image loading Now LoadTexture/SetTexture functions require full path with "textures/" directory --- src/ui/control.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/ui/control.cpp') 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; -- cgit v1.2.3-1-g7c22 From 9fd6cf54492cedd7f6231a0b1d0655120cb1c4d7 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 14 Oct 2014 15:11:37 +0200 Subject: Changed all occurences of PPC in the code to TerranovaTeam --- src/ui/control.cpp | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'src/ui/control.cpp') diff --git a/src/ui/control.cpp b/src/ui/control.cpp index 4e64ee9..22f863b 100644 --- a/src/ui/control.cpp +++ b/src/ui/control.cpp @@ -1,19 +1,21 @@ -// * This file is part of the COLOBOT source code -// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch -// * Copyright (C) 2012, Polish Portal of Colobot (PPC) -// -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU General Public License -// * along with this program. If not, see http://www.gnu.org/licenses/. +/* + * This file is part of the Colobot: Gold Edition source code + * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam + * http://epsiteс.ch; http://colobot.info; http://github.com/colobot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://gnu.org/licenses + */ #include "ui/control.h" -- cgit v1.2.3-1-g7c22