aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2005-05-23 11:50:36 +0000
committerTravis Howell2005-05-23 11:50:36 +0000
commit84b9f4b2e097525bbeebbc704d5196f2a119ea94 (patch)
tree373c4de3e027ab5b1fbeb1cecf34e36d8bf3560b /scumm
parent28e156df838341c2bb03e41f9ba22c51988358e9 (diff)
downloadscummvm-rg350-84b9f4b2e097525bbeebbc704d5196f2a119ea94.tar.gz
scummvm-rg350-84b9f4b2e097525bbeebbc704d5196f2a119ea94.tar.bz2
scummvm-rg350-84b9f4b2e097525bbeebbc704d5196f2a119ea94.zip
Rename sprite functions.
svn-id: r18231
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp8
-rw-r--r--scumm/script_v100he.cpp6
-rw-r--r--scumm/script_v90he.cpp6
-rw-r--r--scumm/scumm.cpp8
-rw-r--r--scumm/sprite_he.cpp24
-rw-r--r--scumm/sprite_he.h18
6 files changed, 35 insertions, 35 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 483629579e..8cbf2eee80 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1022,8 +1022,8 @@ void ScummEngine_v71he::processActors() {
void ScummEngine_v90he::processActors() {
preProcessAuxQueue();
- _sprite->spritesMarkDirty(false);
- _sprite->spritesProcessWiz(true);
+ _sprite->setRedrawFlags(false);
+ _sprite->processImages(true);
if (!_skipProcessActors)
ScummEngine::processActors();
@@ -1032,8 +1032,8 @@ void ScummEngine_v90he::processActors() {
postProcessAuxQueue();
- _sprite->spritesMarkDirty(true);
- _sprite->spritesProcessWiz(false);
+ _sprite->setRedrawFlags(true);
+ _sprite->processImages(false);
}
#endif
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index 0f74500bab..284818efb9 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -981,7 +981,7 @@ void ScummEngine_v100he::o100_setSpriteGroupInfo() {
if (!_curSpriteGroupId)
break;
- _sprite->spritesResetGroup(_curSpriteGroupId);
+ _sprite->resetGroup(_curSpriteGroupId);
break;
case 54:
// dummy case
@@ -1816,7 +1816,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- _sprite->spriteAddImageToList(spriteId, 1, &args[0]);
+ _sprite->addImageToList(spriteId, 1, &args[0]);
break;
case 48:
args[0] = pop();
@@ -1919,7 +1919,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() {
}
break;
case 61:
- _sprite->spritesResetTables(true);
+ _sprite->resetTables(true);
break;
case 65:
args[0] = pop();
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index b42f2166df..5c8dd8fe78 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -1242,7 +1242,7 @@ void ScummEngine_v90he::o90_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- _sprite->spriteAddImageToList(spriteId, 1, &args[0]);
+ _sprite->addImageToList(spriteId, 1, &args[0]);
break;
case 31:
args[1] = pop();
@@ -1392,7 +1392,7 @@ void ScummEngine_v90he::o90_setSpriteInfo() {
_sprite->setSpriteField80(spriteId, args[0]);
break;
case 124:
- _sprite->spritesResetTables(true);
+ _sprite->resetTables(true);
break;
case 164:
args[1] = pop();
@@ -1650,7 +1650,7 @@ void ScummEngine_v90he::o90_setSpriteGroupInfo() {
if (!_curSpriteGroupId)
break;
- _sprite->spritesResetGroup(_curSpriteGroupId);
+ _sprite->resetGroup(_curSpriteGroupId);
break;
default:
error("o90_setSpriteGroupInfo: Unknown case %d", subOp);
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 7b6b28cea4..2c77d03cca 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1836,7 +1836,7 @@ void ScummEngine_v90he::scummInit() {
_heObjectNum = 0;
_hePaletteNum = 0;
- _sprite->spritesResetTables(0);
+ _sprite->resetTables(0);
memset(&_wizParams, 0, sizeof(_wizParams));
if (_features & GF_HE_CURSORLESS)
@@ -2268,8 +2268,8 @@ load_game:
#ifndef DISABLE_HE
if (_heversion >= 90) {
- ((ScummEngine_v90he *)this)->_sprite->spritesBlitToScreen();
- ((ScummEngine_v90he *)this)->_sprite->spritesSortActiveSprites();
+ ((ScummEngine_v90he *)this)->_sprite->resetBackground();
+ ((ScummEngine_v90he *)this)->_sprite->sortActiveSprites();
}
#endif
@@ -2329,7 +2329,7 @@ load_game:
#ifndef DISABLE_HE
if (_heversion >= 90) {
- ((ScummEngine_v90he *)this)->_sprite->spritesUpdateImages();
+ ((ScummEngine_v90he *)this)->_sprite->updateImages();
}
if (_heversion >= 98) {
((ScummEngine_v90he *)this)->_logicHE->endOfFrame();
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index 039d9194e2..922ef8b5a9 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -38,7 +38,7 @@ Sprite::Sprite(ScummEngine_v90he *vm) : _vm(vm) {
void ScummEngine_v90he::allocateArrays() {
ScummEngine::allocateArrays();
- _sprite->spritesAllocTables(_numSprites, MAX(64, _numSprites / 4), 64);
+ _sprite->allocTables(_numSprites, MAX(64, _numSprites / 4), 64);
}
void Sprite::getSpriteBounds(int spriteId, bool checkGroup, Common::Rect &bound) {
@@ -778,7 +778,7 @@ void Sprite::setSpriteResetSprite(int spriteId) {
_spriteTable[spriteId].zoom = 0;
int tmp = 0;
- spriteAddImageToList(spriteId, 1, &tmp);
+ addImageToList(spriteId, 1, &tmp);
_spriteTable[spriteId].xmapNum = 0;
_spriteTable[spriteId].tx = 0;
@@ -802,7 +802,7 @@ void Sprite::setSpriteResetSprite(int spriteId) {
_spriteTable[spriteId].field_90 = 0;
}
-void Sprite::spriteAddImageToList(int spriteId, int imageNum, int *spriteIdptr) {
+void Sprite::addImageToList(int spriteId, int imageNum, int *spriteIdptr) {
int origResId, origResWizStates;
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
@@ -1042,7 +1042,7 @@ void Sprite::setGroupflagClipBoxAnd(int spriteGroupId) {
redrawSpriteGroup(spriteGroupId);
}
-void Sprite::spritesAllocTables(int numSprites, int numGroups, int numMaxSprites) {
+void Sprite::allocTables(int numSprites, int numGroups, int numMaxSprites) {
_varNumSpriteGroups = numGroups;
_numSpritesToProcess = 0;
_varNumSprites = numSprites;
@@ -1052,7 +1052,7 @@ void Sprite::spritesAllocTables(int numSprites, int numGroups, int numMaxSprites
_activeSpritesTable = (SpriteInfo **)malloc((_varNumSprites + 1) * sizeof(SpriteInfo *));
}
-void Sprite::spritesResetGroup(int spriteGroupId) {
+void Sprite::resetGroup(int spriteGroupId) {
checkRange(_varNumSpriteGroups, 1, spriteGroupId, "Invalid sprite group %d");
SpriteGroup *spg = &_spriteGroups[spriteGroupId];
@@ -1070,11 +1070,11 @@ void Sprite::spritesResetGroup(int spriteGroupId) {
spg->scale_y_ratio_div = 1;
}
-void Sprite::spritesResetTables(bool refreshScreen) {
+void Sprite::resetTables(bool refreshScreen) {
memset(_spriteTable, 0, (_varNumSprites + 1) * sizeof(SpriteInfo));
memset(_spriteGroups, 0, (_varNumSpriteGroups + 1) * sizeof(SpriteGroup));
for (int curGrp = 1; curGrp < _varNumSpriteGroups; ++curGrp)
- spritesResetGroup(curGrp);
+ resetGroup(curGrp);
if (refreshScreen) {
_vm->gdi.copyVirtScreenBuffers(Common::Rect(_vm->_screenWidth, _vm->_screenHeight));
@@ -1082,7 +1082,7 @@ void Sprite::spritesResetTables(bool refreshScreen) {
_numSpritesToProcess = 0;
}
-void Sprite::spritesBlitToScreen() {
+void Sprite::resetBackground() {
int xmin, xmax, ymin, ymax;
xmin = ymin = 1234;
xmax = ymax = -1234;
@@ -1128,7 +1128,7 @@ void Sprite::spritesBlitToScreen() {
}
}
-void Sprite::spritesMarkDirty(bool checkZOrder) {
+void Sprite::setRedrawFlags(bool checkZOrder) {
VirtScreen *vs = &_vm->virtscr[kMainVirtScreen];
for (int i = 0; i < _numSpritesToProcess; ++i) {
SpriteInfo *spi = _activeSpritesTable[i];
@@ -1157,7 +1157,7 @@ void Sprite::spritesMarkDirty(bool checkZOrder) {
}
}
-void Sprite::spritesUpdateImages() {
+void Sprite::updateImages() {
for (int i = 0; i < _numSpritesToProcess; ++i) {
SpriteInfo *spi = _activeSpritesTable[i];
if (spi->dx || spi->dy) {
@@ -1202,7 +1202,7 @@ static int compareSprTable(const void *a, const void *b) {
return 0;
}
-void Sprite::spritesSortActiveSprites() {
+void Sprite::sortActiveSprites() {
int groupZorder;
_numSpritesToProcess = 0;
@@ -1238,7 +1238,7 @@ void Sprite::spritesSortActiveSprites() {
qsort(_activeSpritesTable, _numSpritesToProcess, sizeof(SpriteInfo *), compareSprTable);
}
-void Sprite::spritesProcessWiz(bool arg) {
+void Sprite::processImages(bool arg) {
int spr_flags;
int16 spr_wiz_x, spr_wiz_y;
int resId, resState;
diff --git a/scumm/sprite_he.h b/scumm/sprite_he.h
index ccfd6edea6..63832df59d 100644
--- a/scumm/sprite_he.h
+++ b/scumm/sprite_he.h
@@ -113,11 +113,11 @@ public:
int32 _varMaxSprites;
void saveOrLoadSpriteData(Serializer *s, uint32 savegameVersion);
- void spritesBlitToScreen();
- void spritesMarkDirty(bool checkZOrder);
- void spritesSortActiveSprites();
- void spritesProcessWiz(bool arg);
- void spritesUpdateImages();
+ void resetBackground();
+ void setRedrawFlags(bool checkZOrder);
+ void sortActiveSprites();
+ void processImages(bool arg);
+ void updateImages();
void getSpriteBounds(int spriteId, bool checkGroup, Common::Rect &bound);
int findSpriteWithClassOf(int x, int y, int spriteGroupId, int d, int num, int *args);
@@ -206,10 +206,10 @@ public:
void setGroupScale_y_ratio_div(int spriteGroupId, int value);
void setGroupflagClipBoxAnd(int spriteGroupId);
- void spritesAllocTables(int numSprites, int numGroups, int numMaxSprites);
- void spritesResetGroup(int spriteGroupId);
- void spritesResetTables(bool refreshScreen);
- void spriteAddImageToList(int spriteId, int imageNum, int *spriteIdptr);
+ void allocTables(int numSprites, int numGroups, int numMaxSprites);
+ void resetGroup(int spriteGroupId);
+ void resetTables(bool refreshScreen);
+ void addImageToList(int spriteId, int imageNum, int *spriteIdptr);
private:
ScummEngine_v90he *_vm;
};