aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/particles
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-29 00:27:50 +0200
committerEinar Johan Trøan Sømåen2012-07-29 00:27:50 +0200
commit6dc1e09da93c0ba0507fd0ceadbbb504469deccc (patch)
treedae477f4ed7c6b9be7a5dd38174d81cdbae48c58 /engines/wintermute/base/particles
parente841bf16d6b955f779e5e30535848bd650d22352 (diff)
downloadscummvm-rg350-6dc1e09da93c0ba0507fd0ceadbbb504469deccc.tar.gz
scummvm-rg350-6dc1e09da93c0ba0507fd0ceadbbb504469deccc.tar.bz2
scummvm-rg350-6dc1e09da93c0ba0507fd0ceadbbb504469deccc.zip
WINTERMUTE: Replace const char* with const Common::String & in fonts, gfx, particles, sound and files.
Diffstat (limited to 'engines/wintermute/base/particles')
-rw-r--r--engines/wintermute/base/particles/part_emitter.cpp12
-rw-r--r--engines/wintermute/base/particles/part_emitter.h6
-rw-r--r--engines/wintermute/base/particles/part_particle.cpp4
-rw-r--r--engines/wintermute/base/particles/part_particle.h2
4 files changed, 12 insertions, 12 deletions
diff --git a/engines/wintermute/base/particles/part_emitter.cpp b/engines/wintermute/base/particles/part_emitter.cpp
index f8c0c1a5cf..7389885f5a 100644
--- a/engines/wintermute/base/particles/part_emitter.cpp
+++ b/engines/wintermute/base/particles/part_emitter.cpp
@@ -403,11 +403,11 @@ bool PartEmitter::setBorderThickness(int thicknessLeft, int thicknessRight, int
}
//////////////////////////////////////////////////////////////////////////
-PartForce *PartEmitter::addForceByName(const char *name) {
+PartForce *PartEmitter::addForceByName(const Common::String &name) {
PartForce *force = NULL;
for (int i = 0; i < _forces.getSize(); i++) {
- if (scumm_stricmp(name, _forces[i]->getName()) == 0) {
+ if (scumm_stricmp(name.c_str(), _forces[i]->getName()) == 0) {
force = _forces[i];
break;
}
@@ -415,7 +415,7 @@ PartForce *PartEmitter::addForceByName(const char *name) {
if (!force) {
force = new PartForce(_gameRef);
if (force) {
- force->setName(name);
+ force->setName(name.c_str());
_forces.add(force);
}
}
@@ -424,7 +424,7 @@ PartForce *PartEmitter::addForceByName(const char *name) {
//////////////////////////////////////////////////////////////////////////
-bool PartEmitter::addForce(const char *name, PartForce::TForceType type, int posX, int posY, float angle, float strength) {
+bool PartEmitter::addForce(const Common::String &name, PartForce::TForceType type, int posX, int posY, float angle, float strength) {
PartForce *force = addForceByName(name);
if (!force) {
return STATUS_FAILED;
@@ -442,9 +442,9 @@ bool PartEmitter::addForce(const char *name, PartForce::TForceType type, int pos
}
//////////////////////////////////////////////////////////////////////////
-bool PartEmitter::removeForce(const char *name) {
+bool PartEmitter::removeForce(const Common::String &name) {
for (int i = 0; i < _forces.getSize(); i++) {
- if (scumm_stricmp(name, _forces[i]->getName()) == 0) {
+ if (scumm_stricmp(name.c_str(), _forces[i]->getName()) == 0) {
delete _forces[i];
_forces.remove_at(i);
return STATUS_OK;
diff --git a/engines/wintermute/base/particles/part_emitter.h b/engines/wintermute/base/particles/part_emitter.h
index 4e3b837a11..438dfff521 100644
--- a/engines/wintermute/base/particles/part_emitter.h
+++ b/engines/wintermute/base/particles/part_emitter.h
@@ -57,8 +57,8 @@ public:
bool setBorder(int x, int y, int width, int height);
bool setBorderThickness(int thicknessLeft, int thicknessRight, int thicknessTop, int thicknessBottom);
- bool addForce(const char *name, PartForce::TForceType type, int posX, int posY, float angle, float strength);
- bool removeForce(const char *name);
+ bool addForce(const Common::String &name, PartForce::TForceType type, int posX, int posY, float angle, float strength);
+ bool removeForce(const Common::String &name);
BaseArray<PartForce *> _forces;
@@ -126,7 +126,7 @@ private:
char *_emitEvent;
BaseScriptHolder *_owner;
- PartForce *addForceByName(const char *name);
+ PartForce *addForceByName(const Common::String &name);
int static compareZ(const void *obj1, const void *obj2);
bool initParticle(PartParticle *particle, uint32 currentTime, uint32 timerDelta);
bool updateInternal(uint32 currentTime, uint32 timerDelta);
diff --git a/engines/wintermute/base/particles/part_particle.cpp b/engines/wintermute/base/particles/part_particle.cpp
index 0c0ec08ba9..2b05edd61f 100644
--- a/engines/wintermute/base/particles/part_particle.cpp
+++ b/engines/wintermute/base/particles/part_particle.cpp
@@ -70,8 +70,8 @@ PartParticle::~PartParticle(void) {
}
//////////////////////////////////////////////////////////////////////////
-bool PartParticle::setSprite(const char *filename) {
- if (_sprite && _sprite->getFilename() && scumm_stricmp(filename, _sprite->getFilename()) == 0) {
+bool PartParticle::setSprite(const Common::String &filename) {
+ if (_sprite && _sprite->getFilename() && scumm_stricmp(filename.c_str(), _sprite->getFilename()) == 0) {
_sprite->reset();
return STATUS_OK;
}
diff --git a/engines/wintermute/base/particles/part_particle.h b/engines/wintermute/base/particles/part_particle.h
index 8b0c6eea36..44da85a559 100644
--- a/engines/wintermute/base/particles/part_particle.h
+++ b/engines/wintermute/base/particles/part_particle.h
@@ -72,7 +72,7 @@ public:
bool update(PartEmitter *emitter, uint32 currentTime, uint32 timerDelta);
bool display(PartEmitter *emitter);
- bool setSprite(const char *filename);
+ bool setSprite(const Common::String &filename);
bool fadeIn(uint32 currentTime, int fadeTime);
bool fadeOut(uint32 currentTime, int fadeTime);