summaryrefslogtreecommitdiff
path: root/src/resources/ambientlayer.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-10-22 12:52:35 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-10-22 12:52:35 +0200
commitdbac793645654ac6715e6adecfd9d4a4a1fd8551 (patch)
tree52550aeeb8caec936897a792236300f86aad3884 /src/resources/ambientlayer.cpp
parenta9bcae9f81d97f67ab21cd26a099449cf0746137 (diff)
downloadmana-dbac793645654ac6715e6adecfd9d4a4a1fd8551.tar.gz
mana-dbac793645654ac6715e6adecfd9d4a4a1fd8551.tar.bz2
mana-dbac793645654ac6715e6adecfd9d4a4a1fd8551.tar.xz
mana-dbac793645654ac6715e6adecfd9d4a4a1fd8551.zip
Turned the OpenGL and disable transparency options as static members.
- Now OpenGL and the transparency disabling are set at startup and not read again for displaying graphics, preventing graphic errors before startup. - We also agreed long time ago that SDL specific functions should have a SDL prefix. The header has been rearranged a bit to do so. - Also fixed a possible discrepancy in the hasAlphaChannel() function. Reviewed-by: CodyMartin. Resolves: Mana-Mantis: #260.
Diffstat (limited to 'src/resources/ambientlayer.cpp')
-rw-r--r--src/resources/ambientlayer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resources/ambientlayer.cpp b/src/resources/ambientlayer.cpp
index 50fe8bd9..b662ddeb 100644
--- a/src/resources/ambientlayer.cpp
+++ b/src/resources/ambientlayer.cpp
@@ -33,7 +33,7 @@ AmbientLayer::AmbientLayer(Image *img, float parallax,
mKeepRatio(keepRatio)
{
- if (keepRatio && !mImage->isAnOpenGLOne()
+ if (keepRatio && !mImage->useOpenGL()
&& defaultScreenWidth != 0
&& defaultScreenHeight != 0
&& graphics->getWidth() != defaultScreenWidth
@@ -92,7 +92,7 @@ void AmbientLayer::update(int timePassed, float dx, float dy)
void AmbientLayer::draw(Graphics *graphics, int x, int y)
{
- if (!mImage->isAnOpenGLOne() || !mKeepRatio)
+ if (!mImage->useOpenGL() || !mKeepRatio)
graphics->drawImagePattern(mImage,
(int) -mPosX, (int) -mPosY, x + (int) mPosX, y + (int) mPosY);
else