r117 - trunk/src
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Jun 12 09:48:51 EDT 2005
Author: jonas
Date: 2005-06-12 09:48:51 -0400 (Sun, 12 Jun 2005)
New Revision: 117
Modified:
trunk/src/gfxeng.cpp
trunk/src/gfxeng.h
Log:
const color masks
Modified: trunk/src/gfxeng.cpp
===================================================================
--- trunk/src/gfxeng.cpp 2005-06-12 13:43:41 UTC (rev 116)
+++ trunk/src/gfxeng.cpp 2005-06-12 13:48:51 UTC (rev 117)
@@ -13,23 +13,23 @@
GraphicsEngine::GraphicsEngine():
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+ rmask(0xff000000),
+ gmask(0x00ff0000),
+ bmask(0x0000ff00),
+ amask(0x000000ff),
+#else
+ rmask(0x000000ff),
+ gmask(0x0000ff00),
+ bmask(0x00ff0000),
+ amask(0xff000000),
+#endif
screen(NULL),
menubg(NULL),
show_bar(true),
show_fps(true),
fullscreen(config.full),
vflags(SDL_HWSURFACE|SDL_RESIZABLE|SDL_DOUBLEBUF) {
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
- rmask = 0xff000000;
- gmask = 0x00ff0000;
- bmask = 0x0000ff00;
- amask = 0x000000ff;
-#else
- rmask = 0x000000ff;
- gmask = 0x0000ff00;
- bmask = 0x00ff0000;
- amask = 0xff000000;
-#endif
resize(config.width, config.height);
lifeimage=new Animation(imgcache->loadImage("life.bmp"));
}
Modified: trunk/src/gfxeng.h
===================================================================
--- trunk/src/gfxeng.h 2005-06-12 13:43:41 UTC (rev 116)
+++ trunk/src/gfxeng.h 2005-06-12 13:48:51 UTC (rev 117)
@@ -31,10 +31,10 @@
void toggleFullScreen();
void setMenuBG(SDL_Surface* menu_background=NULL);
protected:
- Uint32 rmask;
- Uint32 gmask;
- Uint32 bmask;
- Uint32 amask;
+ const Uint32 rmask;
+ const Uint32 gmask;
+ const Uint32 bmask;
+ const Uint32 amask;
/// currently visible part of the map area
SDL_Rect vis_map;
/// main screen
More information about the lostpenguins-commits
mailing list