mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
GOB: Change SPRITES_COUNT into a const
svn-id: r55645
This commit is contained in:
parent
0793e5c0a3
commit
c498d70dd2
@ -67,7 +67,7 @@ Draw::Draw(GobEngine *vm) : _vm(vm) {
|
||||
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::initSpriteSurf(int16 index, int16 width, int16 height,
|
||||
}
|
||||
|
||||
void Draw::freeSprite(int16 index) {
|
||||
assert(index < SPRITES_COUNT);
|
||||
assert(index < kSpritesCount);
|
||||
|
||||
_spritesArray[index].reset();
|
||||
|
||||
|
@ -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 @@ namespace Gob {
|
||||
|
||||
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;
|
||||
|
@ -822,7 +822,7 @@ void Game::start() {
|
||||
|
||||
_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();
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ bool TempSpriteHandler::load(int16 dataVar, int32 size, int32 offset) {
|
||||
|
||||
// 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 @@ SurfacePtr TempSpriteHandler::createSprite(int16 dataVar, int32 size, int32 offs
|
||||
|
||||
// Index sane?
|
||||
int index = getIndex(size);
|
||||
if ((index < 0) || (index >= SPRITES_COUNT))
|
||||
if ((index < 0) || (index >= Draw::kSpritesCount))
|
||||
return sprt;
|
||||
|
||||
// Sprite exists?
|
||||
|
Loading…
Reference in New Issue
Block a user