[Scummvm-cvs-logs] SF.net SVN: scummvm:[55645] scummvm/trunk/engines/gob
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Sun Jan 30 01:02:43 CET 2011
Revision: 55645
http://scummvm.svn.sourceforge.net/scummvm/?rev=55645&view=rev
Author: drmccoy
Date: 2011-01-30 00:02:42 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
GOB: Change SPRITES_COUNT into a const
Modified Paths:
--------------
scummvm/trunk/engines/gob/draw.cpp
scummvm/trunk/engines/gob/draw.h
scummvm/trunk/engines/gob/game.cpp
scummvm/trunk/engines/gob/save/savehandler.cpp
Modified: scummvm/trunk/engines/gob/draw.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw.cpp 2011-01-30 00:02:14 UTC (rev 55644)
+++ scummvm/trunk/engines/gob/draw.cpp 2011-01-30 00:02:42 UTC (rev 55645)
@@ -67,7 +67,7 @@
for (int i = 0; i < kFontCount; i++)
_fonts[i] = 0;
- _spritesArray.resize(SPRITES_COUNT);
+ _spritesArray.resize(kSpritesCount);
_invalidatedCount = 0;
for (int i = 0; i < 30; i++) {
@@ -333,7 +333,7 @@
}
void Draw::freeSprite(int16 index) {
- assert(index < SPRITES_COUNT);
+ assert(index < kSpritesCount);
_spritesArray[index].reset();
Modified: scummvm/trunk/engines/gob/draw.h
===================================================================
--- scummvm/trunk/engines/gob/draw.h 2011-01-30 00:02:14 UTC (rev 55644)
+++ scummvm/trunk/engines/gob/draw.h 2011-01-30 00:02:42 UTC (rev 55645)
@@ -30,8 +30,6 @@
namespace Gob {
-#define SPRITES_COUNT 100
-
#define RENDERFLAG_NOINVALIDATE 0x0001
#define RENDERFLAG_CAPTUREPUSH 0x0002
#define RENDERFLAG_COLLISIONS 0x0004
@@ -45,12 +43,13 @@
class Draw {
public:
- static const int kFontCount = 16;
- static const int kFrontSurface = 20;
- static const int kBackSurface = 21;
- static const int kAnimSurface = 22;
- static const int kCursorSurface = 23;
- static const int kCaptureSurface = 30;
+ static const int kSpritesCount = 100;
+ static const int kFontCount = 16;
+ static const int kFrontSurface = 20;
+ static const int kBackSurface = 21;
+ static const int kAnimSurface = 22;
+ static const int kCursorSurface = 23;
+ static const int kCaptureSurface = 30;
struct FontToSprite {
int8 sprite;
Modified: scummvm/trunk/engines/gob/game.cpp
===================================================================
--- scummvm/trunk/engines/gob/game.cpp 2011-01-30 00:02:14 UTC (rev 55644)
+++ scummvm/trunk/engines/gob/game.cpp 2011-01-30 00:02:42 UTC (rev 55645)
@@ -822,7 +822,7 @@
_vm->_draw->closeScreen();
- for (int i = 0; i < SPRITES_COUNT; i++)
+ for (int i = 0; i < Draw::kSpritesCount; i++)
_vm->_draw->freeSprite(i);
_vm->_draw->_scummvmCursor.reset();
}
Modified: scummvm/trunk/engines/gob/save/savehandler.cpp
===================================================================
--- scummvm/trunk/engines/gob/save/savehandler.cpp 2011-01-30 00:02:14 UTC (rev 55644)
+++ scummvm/trunk/engines/gob/save/savehandler.cpp 2011-01-30 00:02:42 UTC (rev 55645)
@@ -258,7 +258,7 @@
// Index sane?
int index = getIndex(size);
- if ((index < 0) || (index >= SPRITES_COUNT))
+ if ((index < 0) || (index >= Draw::kSpritesCount))
return false;
SurfacePtr sprite = _vm->_draw->_spritesArray[index];
@@ -333,7 +333,7 @@
// Index sane?
int index = getIndex(size);
- if ((index < 0) || (index >= SPRITES_COUNT))
+ if ((index < 0) || (index >= Draw::kSpritesCount))
return sprt;
// Sprite exists?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list