aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/dreamweb.h
diff options
context:
space:
mode:
authorD G Turner2012-02-24 04:44:26 +0000
committerD G Turner2012-02-24 15:04:09 +0000
commit542014c309cb713ee5f550f344065fa9124f17bd (patch)
tree587c8f898f58477e8eb9dc73e843d1ec3cabd77b /engines/dreamweb/dreamweb.h
parent14e6a5f8f7c7e3ac0d70ca4d59032954353fc823 (diff)
downloadscummvm-rg350-542014c309cb713ee5f550f344065fa9124f17bd.tar.gz
scummvm-rg350-542014c309cb713ee5f550f344065fa9124f17bd.tar.bz2
scummvm-rg350-542014c309cb713ee5f550f344065fa9124f17bd.zip
DREAMWEB: Add datafile name prefix to engine and modify showPCX() to it.
This new variable removes the need for duplicates strings of the form "DREAMWEB.*" spread throughout the dreamweb engine, replacing them with a common const string on the engine holding the datafile name prefix. This will reduce binary size and it should also simplify adding support for foreign language variants, where the datafile name prefix is changed. To demostrate usage and prove this, showPCX() is migrated to using this.
Diffstat (limited to 'engines/dreamweb/dreamweb.h')
-rw-r--r--engines/dreamweb/dreamweb.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index 6d7253da65..1ea16c24ed 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -152,6 +152,8 @@ public:
void stopSound(uint8 channel);
+ const Common::String& getDatafilePrefix() { return _datafilePrefix; };
+
private:
void keyPressed(uint16 ascii);
void setSpeed(uint speed);
@@ -160,6 +162,7 @@ private:
const DreamWebGameDescription *_gameDescription;
Common::RandomSource _rnd;
+ Common::String _datafilePrefix;
uint _speed;
bool _turbo;
@@ -1133,7 +1136,7 @@ public:
void doShake();
void vSync();
void setMode();
- void showPCX(const Common::String &name);
+ void showPCX(const Common::String &suffix);
void showFrameInternal(const uint8 *pSrc, uint16 x, uint16 y, uint8 effectsFlag, uint8 width, uint8 height);
void showFrame(const GraphicsFile &frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height);
void showFrame(const GraphicsFile &frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag);