diff options
author | Johannes Schickel | 2011-11-16 18:06:30 +0100 |
---|---|---|
committer | Johannes Schickel | 2011-11-16 18:06:30 +0100 |
commit | 61795739f8f45c5de4cfd0fe57af459146c5173c (patch) | |
tree | 5ff6bcde25f40545d1768f623804ba44afce4b6e /engines/m4 | |
parent | 6e90f9e6938c9727a3dbb552b74f0d40d0ab221f (diff) | |
download | scummvm-rg350-61795739f8f45c5de4cfd0fe57af459146c5173c.tar.gz scummvm-rg350-61795739f8f45c5de4cfd0fe57af459146c5173c.tar.bz2 scummvm-rg350-61795739f8f45c5de4cfd0fe57af459146c5173c.zip |
COMMON: Rename Common::set_to to Common::fill.
This makes the name match with the name of the STL function with the same
behavior.
Diffstat (limited to 'engines/m4')
-rw-r--r-- | engines/m4/assets.cpp | 2 | ||||
-rw-r--r-- | engines/m4/dialogs.cpp | 2 | ||||
-rw-r--r-- | engines/m4/graphics.cpp | 16 | ||||
-rw-r--r-- | engines/m4/mads_anim.cpp | 4 | ||||
-rw-r--r-- | engines/m4/mads_logic.cpp | 4 | ||||
-rw-r--r-- | engines/m4/mads_scene.cpp | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/engines/m4/assets.cpp b/engines/m4/assets.cpp index f70a35d5ad..e871218ec1 100644 --- a/engines/m4/assets.cpp +++ b/engines/m4/assets.cpp @@ -233,7 +233,7 @@ void SpriteAsset::loadMadsSpriteAsset(MadsM4Engine *vm, Common::SeekableReadStre RGB8 *palData = Palette::decodeMadsPalette(spriteStream, &numColors); Common::copy(palData, &palData[numColors], &_palette[0]); if (numColors < 256) - Common::set_to((byte *)&_palette[numColors], (byte *)&_palette[256], 0); + Common::fill((byte *)&_palette[numColors], (byte *)&_palette[256], 0); _colorCount = numColors; delete[] palData; delete spriteStream; diff --git a/engines/m4/dialogs.cpp b/engines/m4/dialogs.cpp index e9c7414845..2a36fa037c 100644 --- a/engines/m4/dialogs.cpp +++ b/engines/m4/dialogs.cpp @@ -80,7 +80,7 @@ void Dialog::writeChars(const char *srcLine) { while (*srcP) { bool wordEndedP = false, newlineP = false; char *destP = &wordStr[0]; - Common::set_to(&wordStr[0], &wordStr[80], 0); + Common::fill(&wordStr[0], &wordStr[80], 0); // Try and get the next word for (;;) { diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp index 4c272de32c..99130aee08 100644 --- a/engines/m4/graphics.cpp +++ b/engines/m4/graphics.cpp @@ -48,7 +48,7 @@ RGBList::RGBList(int numEntries, RGB8 *srcData, bool freeData) { } _palIndexes = new byte[numEntries]; - Common::set_to(&_palIndexes[0], &_palIndexes[numEntries], 0); + Common::fill(&_palIndexes[0], &_palIndexes[numEntries], 0); } RGBList::~RGBList() { @@ -337,7 +337,7 @@ void M4Surface::freeData() { } void M4Surface::clear() { - Common::set_to((byte *)pixels, (byte *)pixels + w * h, _vm->_palette->BLACK); + Common::fill((byte *)pixels, (byte *)pixels + w * h, _vm->_palette->BLACK); } void M4Surface::reset() { @@ -1029,7 +1029,7 @@ static void fadeRange(MadsM4Engine *vm, RGB8 *srcPal, RGB8 *destPal, int startI Palette::Palette(MadsM4Engine *vm) : _vm(vm) { reset(); _fading_in_progress = false; - Common::set_to(&_usageCount[0], &_usageCount[256], 0); + Common::fill(&_usageCount[0], &_usageCount[256], 0); } void Palette::setPalette(const byte *colors, uint start, uint num) { @@ -1166,7 +1166,7 @@ void Palette::fadeFromGreen(int numSteps, uint delayAmount, bool fadeToBlack) { RGB8 *destPalette = (RGB8 *) &_originalPalette[0]; if (fadeToBlack) { - Common::set_to((byte *)&blackPalette[0], (byte *)&blackPalette[256], 0); + Common::fill((byte *)&blackPalette[0], (byte *)&blackPalette[256], 0); destPalette = &blackPalette[0]; } @@ -1193,7 +1193,7 @@ void Palette::fadeIn(int numSteps, uint delayAmount, RGB8 *destPalette, int numC _fading_in_progress = true; RGB8 blackPalette[256]; - Common::set_to((byte *)&blackPalette[0], (byte *)&blackPalette[256], 0); + Common::fill((byte *)&blackPalette[0], (byte *)&blackPalette[256], 0); // Initially set the black palette _vm->_palette->setPalette(blackPalette, 0, numColors); @@ -1209,7 +1209,7 @@ RGB8 *Palette::decodeMadsPalette(Common::SeekableReadStream *palStream, int *num assert(*numColors <= 252); RGB8 *palData = new RGB8[*numColors]; - Common::set_to((byte *)&palData[0], (byte *)&palData[*numColors], 0); + Common::fill((byte *)&palData[0], (byte *)&palData[*numColors], 0); for (int i = 0; i < *numColors; ++i) { byte r = palStream->readByte(); @@ -1249,12 +1249,12 @@ void Palette::setMadsSystemPalette() { } void Palette::resetColorCounts() { - Common::set_to(&_usageCount[0], &_usageCount[256], 0); + Common::fill(&_usageCount[0], &_usageCount[256], 0); } void Palette::blockRange(int startIndex, int size) { // Use a reference count of -1 to signal a palette index shouldn't be used - Common::set_to(&_usageCount[startIndex], &_usageCount[startIndex + size], -1); + Common::fill(&_usageCount[startIndex], &_usageCount[startIndex + size], -1); } void Palette::addRange(RGBList *list) { diff --git a/engines/m4/mads_anim.cpp b/engines/m4/mads_anim.cpp index 2ea576dfa4..aac21ae65d 100644 --- a/engines/m4/mads_anim.cpp +++ b/engines/m4/mads_anim.cpp @@ -87,7 +87,7 @@ void TextviewView::reset() { _panY = 0; _panSpeed = 0; _soundDriverLoaded = false; - Common::set_to(&_spareScreens[0], &_spareScreens[10], 0); + Common::fill(&_spareScreens[0], &_spareScreens[10], 0); _scrollCount = 0; _lineY = -1; _scrollTimeout = 0; @@ -211,7 +211,7 @@ void TextviewView::updateState() { byte *pixelsP = _textSurface.getBasePtr(0, 0); Common::copy(pixelsP + width(), pixelsP + _textSurface.width() * _textSurface.height(), pixelsP); pixelsP = _textSurface.getBasePtr(0, _textSurface.height() - 1); - Common::set_to(pixelsP, pixelsP + _textSurface.width(), _vm->_palette->BLACK); + Common::fill(pixelsP, pixelsP + _textSurface.width(), _vm->_palette->BLACK); if (_scrollCount > 0) { // Handling final scrolling of text off of screen diff --git a/engines/m4/mads_logic.cpp b/engines/m4/mads_logic.cpp index cafddb2d53..a7838d0e26 100644 --- a/engines/m4/mads_logic.cpp +++ b/engines/m4/mads_logic.cpp @@ -33,7 +33,7 @@ namespace M4 { void MadsGameLogic::initializeGlobals() { // Clear the entire globals list - Common::set_to(&_madsVm->globals()->_globals[0], &_madsVm->globals()->_globals[TOTAL_NUM_VARIABLES], 0); + Common::fill(&_madsVm->globals()->_globals[0], &_madsVm->globals()->_globals[TOTAL_NUM_VARIABLES], 0); SET_GLOBAL(4, 8); SET_GLOBAL(33, 1); @@ -479,7 +479,7 @@ void MadsSceneLogic::selectScene(int sceneNum) { assert(sceneNum == 101); _sceneNumber = sceneNum; - Common::set_to(&_spriteIndexes[0], &_spriteIndexes[50], 0); + Common::fill(&_spriteIndexes[0], &_spriteIndexes[50], 0); // If debugging is turned on, show a debug warning if any of the scene methods aren't present if (gDebugLevel > 0) { diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp index 73d9f57124..e2d034f6d1 100644 --- a/engines/m4/mads_scene.cpp +++ b/engines/m4/mads_scene.cpp @@ -729,7 +729,7 @@ void MadsSceneResources::load(int sceneNumber, const char *resName, int v0, M4Su } } else { // 8-bit depth pixels - Common::set_to(destP, destP + runLength, *srcP++); + Common::fill(destP, destP + runLength, *srcP++); destP += runLength; } } |