aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorJohannes Schickel2011-11-16 18:06:30 +0100
committerJohannes Schickel2011-11-16 18:06:30 +0100
commit61795739f8f45c5de4cfd0fe57af459146c5173c (patch)
tree5ff6bcde25f40545d1768f623804ba44afce4b6e /engines/tsage
parent6e90f9e6938c9727a3dbb552b74f0d40d0ab221f (diff)
downloadscummvm-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/tsage')
-rw-r--r--engines/tsage/converse.cpp6
-rw-r--r--engines/tsage/globals.cpp4
-rw-r--r--engines/tsage/graphics.cpp10
-rw-r--r--engines/tsage/graphics.h2
-rw-r--r--engines/tsage/resources.cpp4
-rw-r--r--engines/tsage/scenes.cpp4
-rw-r--r--engines/tsage/sound.cpp8
7 files changed, 19 insertions, 19 deletions
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index d86548bd4b..31a689b80c 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -32,7 +32,7 @@ namespace TsAGE {
SequenceManager::SequenceManager() : Action() {
- Common::set_to(&_objectList[0], &_objectList[6], (SceneObject *)NULL);
+ Common::fill(&_objectList[0], &_objectList[6], (SceneObject *)NULL);
_sequenceData.clear();
_fontNum = 0;
_sequenceOffset = 0;
@@ -81,7 +81,7 @@ void SequenceManager::remove() {
if (g_globals->_sceneObjects->contains(&_sceneText))
_sceneText.remove();
- Common::set_to(&_objectList[0], &_objectList[6], (SceneObject *)NULL);
+ Common::fill(&_objectList[0], &_objectList[6], (SceneObject *)NULL);
Action::remove();
}
@@ -342,7 +342,7 @@ void SequenceManager::attached(EventHandler *newOwner, EventHandler *endHandler,
DEALLOCATE(seqData);
- Common::set_to(&_objectList[0], &_objectList[6], (SceneObject *)NULL);
+ Common::fill(&_objectList[0], &_objectList[6], (SceneObject *)NULL);
for (int idx = 0; idx < 6; ++idx) {
_objectList[idx] = va_arg(va, SceneObject *);
if (!_objectList[idx])
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index d21321a201..540c3b6225 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -155,7 +155,7 @@ Globals::~Globals() {
}
void Globals::reset() {
- Common::set_to(&_flags[0], &_flags[MAX_FLAGS], false);
+ Common::fill(&_flags[0], &_flags[MAX_FLAGS], false);
g_saver->addFactory(classFactoryProc);
}
@@ -379,7 +379,7 @@ void Ringworld2Globals::reset() {
_v565F5 = 0;
_v57C2C = 0;
_v58CE2 = 0;
- Common::set_to(&_v565F1[0], &_v565F1[MAX_CHARACTERS], 0);
+ Common::fill(&_v565F1[0], &_v565F1[MAX_CHARACTERS], 0);
_insetUp = 0;
// Reset fields stored in the player class
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index 40654a345e..f0a5973e6b 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -81,7 +81,7 @@ GfxSurface surfaceFromRes(const byte *imgData) {
if (!rleEncoded) {
Common::copy(srcP, srcP + (r.width() * r.height()), destP);
} else {
- Common::set_to(destP, destP + (r.width() * r.height()), s._transColor);
+ Common::fill(destP, destP + (r.width() * r.height()), s._transColor);
for (int yp = 0; yp < r.height(); ++yp) {
int width = r.width();
@@ -105,7 +105,7 @@ GfxSurface surfaceFromRes(const byte *imgData) {
controlVal &= 0x3f;
int pixel = *srcP++;
- Common::set_to(destP, destP + controlVal, pixel);
+ Common::fill(destP, destP + controlVal, pixel);
destP += controlVal;
width -= controlVal;
}
@@ -261,7 +261,7 @@ void GfxSurface::create(int width, int height) {
}
_customSurface = new Graphics::Surface();
_customSurface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
- Common::set_to((byte *)_customSurface->pixels, (byte *)_customSurface->pixels + (width * height), 0);
+ Common::fill((byte *)_customSurface->pixels, (byte *)_customSurface->pixels + (width * height), 0);
_bounds = Rect(0, 0, width, height);
}
@@ -455,7 +455,7 @@ static int *scaleLine(int size, int srcSize) {
int scale = PRECISION_FACTOR * size / srcSize;
assert(scale >= 0);
int *v = new int[size];
- Common::set_to(v, &v[size], -1);
+ Common::fill(v, &v[size], -1);
int distCtr = PRECISION_FACTOR / 2;
int *destP = v;
@@ -493,7 +493,7 @@ static GfxSurface ResizeSurface(GfxSurface &src, int xSize, int ySize, int trans
byte *destP = (byte *)destImage.getBasePtr(0, yp);
if (vertUsage[yp] == -1) {
- Common::set_to(destP, destP + xSize, transIndex);
+ Common::fill(destP, destP + xSize, transIndex);
} else {
const byte *srcP = (const byte *)srcImage.getBasePtr(0, vertUsage[yp]);
diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h
index 06b482d7b5..dba3401700 100644
--- a/engines/tsage/graphics.h
+++ b/engines/tsage/graphics.h
@@ -292,7 +292,7 @@ public:
Common::copy(src, src + size, dest);
}
virtual void set(byte *dest, int size, byte val) {
- Common::set_to(dest, dest + size, val);
+ Common::fill(dest, dest + size, val);
}
void copyFrom(GfxSurface &src, Rect destBounds, Region *priorityRegion = NULL) {
_surface.setBounds(_bounds);
diff --git a/engines/tsage/resources.cpp b/engines/tsage/resources.cpp
index b8c8fcdeea..824f20e9b2 100644
--- a/engines/tsage/resources.cpp
+++ b/engines/tsage/resources.cpp
@@ -33,7 +33,7 @@ namespace TsAGE {
MemoryManager::MemoryManager() {
_memoryPool = new MemoryHeader*[MEMORY_POOL_SIZE];
- Common::set_to(&_memoryPool[0], &_memoryPool[MEMORY_POOL_SIZE], (MemoryHeader *)NULL);
+ Common::fill(&_memoryPool[0], &_memoryPool[MEMORY_POOL_SIZE], (MemoryHeader *)NULL);
}
MemoryManager::~MemoryManager() {
@@ -67,7 +67,7 @@ uint16 MemoryManager::allocate(uint32 size) {
byte *MemoryManager::allocate2(uint32 size) {
uint32 idx = allocate(size);
byte *result = lock(idx);
- Common::set_to(result, result + size, 0);
+ Common::fill(result, result + size, 0);
return result;
}
diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp
index 5ed7c06800..6362c63bc3 100644
--- a/engines/tsage/scenes.cpp
+++ b/engines/tsage/scenes.cpp
@@ -259,7 +259,7 @@ Scene::Scene() : _sceneBounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT),
_sceneMode = 0;
_activeScreenNumber = 0;
_oldSceneBounds = Rect(4000, 4000, 4100, 4100);
- Common::set_to(&_zoomPercents[0], &_zoomPercents[256], 0);
+ Common::fill(&_zoomPercents[0], &_zoomPercents[256], 0);
}
Scene::~Scene() {
@@ -363,7 +363,7 @@ void Scene::loadSceneData(int sceneNum) {
_priorities.load(sceneNum);
// Initialize the section enabled list
- Common::set_to(&_enabledSections[0], &_enabledSections[16 * 16], 0xffff);
+ Common::fill(&_enabledSections[0], &_enabledSections[16 * 16], 0xffff);
g_globals->_sceneOffset.x = (_sceneBounds.left / 160) * 160;
g_globals->_sceneOffset.y = (_sceneBounds.top / 100) * 100;
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index fb88a5ff5e..9df5a6666b 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -798,7 +798,7 @@ void SoundManager::_sfRethinkVoiceTypes() {
continue;
_sfUpdateVoiceStructs();
- Common::set_to(sound->_chWork, sound->_chWork + SOUND_ARR_SIZE, false);
+ Common::fill(sound->_chWork, sound->_chWork + SOUND_ARR_SIZE, false);
for (;;) {
// Scan for sub priority
@@ -1485,7 +1485,7 @@ Sound::Sound() {
memset(_chNumVoices, 0, SOUND_ARR_SIZE * sizeof(int));
memset(_chSubPriority, 0, SOUND_ARR_SIZE * sizeof(int));
memset(_chFlags, 0, SOUND_ARR_SIZE * sizeof(int));
- Common::set_to(_chWork, _chWork + SOUND_ARR_SIZE, false);
+ Common::fill(_chWork, _chWork + SOUND_ARR_SIZE, false);
memset(_channelData, 0, SOUND_ARR_SIZE * sizeof(byte *));
memset(_trkChannel, 0, SOUND_ARR_SIZE * sizeof(int));
memset(_trkState, 0, SOUND_ARR_SIZE * sizeof(int));
@@ -2557,7 +2557,7 @@ AdlibSoundDriver::AdlibSoundDriver(): SoundDriver() {
_mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
- Common::set_to(_channelVoiced, _channelVoiced + ADLIB_CHANNEL_COUNT, false);
+ Common::fill(_channelVoiced, _channelVoiced + ADLIB_CHANNEL_COUNT, false);
memset(_channelVolume, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
memset(_v4405E, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
memset(_v44067, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
@@ -2565,7 +2565,7 @@ AdlibSoundDriver::AdlibSoundDriver(): SoundDriver() {
memset(_v44079, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
memset(_v44082, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
_v44082[ADLIB_CHANNEL_COUNT] = 0x90;
- Common::set_to(_pitchBlend, _pitchBlend + ADLIB_CHANNEL_COUNT, 0x2000);
+ Common::fill(_pitchBlend, _pitchBlend + ADLIB_CHANNEL_COUNT, 0x2000);
memset(_v4409E, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
_patchData = NULL;
}