diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-10-22 12:52:35 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-10-22 12:52:35 +0200 |
commit | dbac793645654ac6715e6adecfd9d4a4a1fd8551 (patch) | |
tree | 52550aeeb8caec936897a792236300f86aad3884 /src/resources/ambientoverlay.cpp | |
parent | a9bcae9f81d97f67ab21cd26a099449cf0746137 (diff) | |
download | mana-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/ambientoverlay.cpp')
-rw-r--r-- | src/resources/ambientoverlay.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resources/ambientoverlay.cpp b/src/resources/ambientoverlay.cpp index 64a46676..aba12f84 100644 --- a/src/resources/ambientoverlay.cpp +++ b/src/resources/ambientoverlay.cpp @@ -34,7 +34,7 @@ AmbientOverlay::AmbientOverlay(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 AmbientOverlay::update(int timePassed, float dx, float dy) void AmbientOverlay::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 |