aboutsummaryrefslogtreecommitdiff
path: root/engines/m4
diff options
context:
space:
mode:
authorMatthew Hoops2011-07-20 09:27:39 -0400
committerMatthew Hoops2011-07-20 09:27:39 -0400
commitad293b249e74dd1cfbdbd721d02145efbdaf9eca (patch)
treee568d96f6d7f64c5e58b4c7cd1c4fda7e649bfc7 /engines/m4
parentd7411acc2b1c7702280dbff1c3e1bafee528184b (diff)
parente25e85fbb047fef895ede97c3c2c73451631052c (diff)
downloadscummvm-rg350-ad293b249e74dd1cfbdbd721d02145efbdaf9eca.tar.gz
scummvm-rg350-ad293b249e74dd1cfbdbd721d02145efbdaf9eca.tar.bz2
scummvm-rg350-ad293b249e74dd1cfbdbd721d02145efbdaf9eca.zip
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'engines/m4')
-rw-r--r--engines/m4/animation.cpp18
-rw-r--r--engines/m4/assets.cpp8
-rw-r--r--engines/m4/assets.h4
-rw-r--r--engines/m4/detection.cpp38
-rw-r--r--engines/m4/dialogs.cpp6
-rw-r--r--engines/m4/events.cpp2
-rw-r--r--engines/m4/font.h2
-rw-r--r--engines/m4/globals.cpp4
-rw-r--r--engines/m4/graphics.cpp12
-rw-r--r--engines/m4/graphics.h2
-rw-r--r--engines/m4/m4.cpp2
-rw-r--r--engines/m4/m4.h2
-rw-r--r--engines/m4/m4_views.cpp2
-rw-r--r--engines/m4/mads_anim.cpp2
-rw-r--r--engines/m4/mads_logic.cpp32
-rw-r--r--engines/m4/mads_logic.h4
-rw-r--r--engines/m4/mads_menus.cpp10
-rw-r--r--engines/m4/mads_player.cpp18
-rw-r--r--engines/m4/mads_scene.cpp20
-rw-r--r--engines/m4/mads_views.cpp40
-rw-r--r--engines/m4/mads_views.h12
-rw-r--r--engines/m4/resource.cpp2
-rw-r--r--engines/m4/resource.h2
-rw-r--r--engines/m4/scene.cpp6
-rw-r--r--engines/m4/sound.cpp4
-rw-r--r--engines/m4/sprite.cpp2
26 files changed, 128 insertions, 128 deletions
diff --git a/engines/m4/animation.cpp b/engines/m4/animation.cpp
index 39a3f175cd..4f315dd396 100644
--- a/engines/m4/animation.cpp
+++ b/engines/m4/animation.cpp
@@ -91,7 +91,7 @@ void MadsAnimation::initialize(const Common::String &filename, uint16 flags, M4S
_scrollY = animStream->readSint16LE();
_scrollTicks = animStream->readUint16LE();
animStream->skip(8);
-
+
animStream->read(buffer, FILENAME_SIZE);
buffer[FILENAME_SIZE] = '\0';
_interfaceFile = Common::String(buffer);
@@ -230,7 +230,7 @@ void MadsAnimation::initialize(const Common::String &filename, uint16 flags, M4S
// Load all the sprite sets for the animation
for (int i = 0; i < spriteListCount; ++i) {
if (_field12 && (i == _spriteListIndex))
- // Skip over field, since it's manually loaded
+ // Skip over field, since it's manually loaded
continue;
_spriteListIndexes[i] = _view->_spriteSlots.addSprites(_spriteSetNames[i].c_str());
@@ -242,7 +242,7 @@ void MadsAnimation::initialize(const Common::String &filename, uint16 flags, M4S
if (madsRes)
resName += "*";
resName += _spriteSetNames[_spriteListIndex];
-
+
_spriteListIndexes[_spriteListIndex] = _view->_spriteSlots.addSprites(resName.c_str());
}
@@ -298,7 +298,7 @@ void MadsAnimation::update() {
if (_field12) {
int spriteListIndex = _spriteListIndexes[_spriteListIndex];
int newIndex = -1;
-
+
for (uint idx = _oldFrameEntry; idx < _frameEntries.size(); ++idx) {
if (_frameEntries[idx].frameNumber > _currentFrame)
break;
@@ -378,7 +378,7 @@ void MadsAnimation::update() {
if (_frameEntries[_oldFrameEntry].frameNumber > _currentFrame)
break;
else if (_frameEntries[_oldFrameEntry].frameNumber == _currentFrame) {
- // Found the correct frame
+ // Found the correct frame
int spriteSlotIndex = 0;
int index = 0;
@@ -393,14 +393,14 @@ void MadsAnimation::update() {
}
++index;
continue;
- }
-
+ }
+
if (spriteSlotIndex == 0) {
int slotIndex = _view->_spriteSlots.getIndex();
MadsSpriteSlot &slot = _view->_spriteSlots[slotIndex];
slot.copy(_frameEntries[_oldFrameEntry].spriteSlot);
slot.seqIndex = _frameEntries[_oldFrameEntry].seqIndex + 0x80;
-
+
SpriteAsset &spriteSet = _view->_spriteSlots.getSprite(
_view->_spriteSlots[slotIndex].spriteListIndex);
slot.spriteType = spriteSet.isBackground() ? BACKGROUND_SPRITE : FOREGROUND_SPRITE;
@@ -408,7 +408,7 @@ void MadsAnimation::update() {
break;
}
}
-
+
++_oldFrameEntry;
}
diff --git a/engines/m4/assets.cpp b/engines/m4/assets.cpp
index 8ffdeb53e0..d6cc71e133 100644
--- a/engines/m4/assets.cpp
+++ b/engines/m4/assets.cpp
@@ -97,8 +97,8 @@ long *DataAsset::getRow(int index) {
return &_data[_recSize * index];
}
-SpriteAsset::SpriteAsset(MadsM4Engine *vm, Common::SeekableReadStream* stream, int size, const char *name,
- bool asStream, int flags) :
+SpriteAsset::SpriteAsset(MadsM4Engine *vm, Common::SeekableReadStream* stream, int size, const char *name,
+ bool asStream, int flags) :
BaseAsset(vm) {
_stream = stream;
_palInterface = NULL;
@@ -285,7 +285,7 @@ void SpriteAsset::loadMadsSpriteAsset(MadsM4Engine *vm, Common::SeekableReadStre
// Load the frame
Common::MemoryReadStream *rs = new Common::MemoryReadStream(destData, frameSizes[curFrame]);
- _frames[curFrame].frame = new M4Sprite(rs, _frames[curFrame].x, _frames[curFrame].y,
+ _frames[curFrame].frame = new M4Sprite(rs, _frames[curFrame].x, _frames[curFrame].y,
_frames[curFrame].w, _frames[curFrame].h, false);
delete rs;
@@ -634,7 +634,7 @@ MadsSpriteSetCharInfo::MadsSpriteSetCharInfo(Common::SeekableReadStream *s) {
_totalFrames = s->readByte();
s->skip(1);
_numEntries = s->readUint16LE();
-
+
for (int i = 0; i < 16; ++i)
_frameList[i] = s->readUint16LE();
for (int i = 0; i < 16; ++i)
diff --git a/engines/m4/assets.h b/engines/m4/assets.h
index 90670dde53..25996a421e 100644
--- a/engines/m4/assets.h
+++ b/engines/m4/assets.h
@@ -115,7 +115,7 @@ public:
class SpriteAsset : public BaseAsset {
public:
- SpriteAsset(MadsM4Engine *vm, Common::SeekableReadStream* stream, int size, const char *name,
+ SpriteAsset(MadsM4Engine *vm, Common::SeekableReadStream* stream, int size, const char *name,
bool asStream = false, int flags = 0);
SpriteAsset(MadsM4Engine *vm, const char *name);
~SpriteAsset();
@@ -151,7 +151,7 @@ protected:
Common::Array<uint32> _frameOffsets;
Common::Array<SpriteAssetFrame> _frames;
uint32 _frameStartOffset;
-
+
// MADS sprite set fields
uint8 _mode;
bool _isBackground;
diff --git a/engines/m4/detection.cpp b/engines/m4/detection.cpp
index 02ed967777..9c359c081f 100644
--- a/engines/m4/detection.cpp
+++ b/engines/m4/detection.cpp
@@ -79,7 +79,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Burger,
@@ -95,7 +95,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::DE_DEU,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Burger,
@@ -111,7 +111,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::RU_RUS,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Burger,
@@ -127,7 +127,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
GUIO_NONE
},
GType_Burger,
@@ -143,7 +143,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
GUIO_NONE
},
GType_Burger,
@@ -159,7 +159,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Riddle,
@@ -175,7 +175,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Riddle,
@@ -191,7 +191,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::DE_DEU,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Riddle,
@@ -207,7 +207,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::FR_FRA,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Riddle,
@@ -223,7 +223,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::ES_ESP,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Riddle,
@@ -239,7 +239,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
GUIO_NONE
},
GType_Riddle,
@@ -255,7 +255,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NOSPEECH
},
GType_RexNebular,
@@ -271,7 +271,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
GUIO_NONE
},
GType_RexNebular,
@@ -287,7 +287,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NOSPEECH
},
GType_DragonSphere,
@@ -304,7 +304,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_DragonSphere,
@@ -320,7 +320,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
GUIO_NONE
},
GType_DragonSphere,
@@ -336,7 +336,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NOSPEECH
},
GType_Phantom,
@@ -352,7 +352,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Phantom,
@@ -368,7 +368,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
GUIO_NONE
},
GType_Phantom,
diff --git a/engines/m4/dialogs.cpp b/engines/m4/dialogs.cpp
index afe2692753..2b2c479673 100644
--- a/engines/m4/dialogs.cpp
+++ b/engines/m4/dialogs.cpp
@@ -265,7 +265,7 @@ void Dialog::setupInputArea() {
*/
bool Dialog::matchCommand(const char *s1, const char *s2) {
bool result = scumm_strnicmp(s1, s2, strlen(s2)) == 0;
- _commandCase = isupper(*s1);
+ _commandCase = isupper(static_cast<unsigned char>(*s1));
return result;
}
@@ -532,7 +532,7 @@ void Dialog::display(MadsM4Engine *vm, int widthChars, const char **descEntries)
}
dlg->_lines[0].underline = true;
-
+
dlg->draw();
vm->_viewManager->addView(dlg);
vm->_viewManager->moveToFront(dlg);
@@ -554,7 +554,7 @@ void Dialog::getValue(MadsM4Engine *vm, const char *title, const char *text, int
vm->_viewManager->moveToFront(dlg);
// TODO: How to wait until the dialog is closed
-
+
}
} // End of namespace M4
diff --git a/engines/m4/events.cpp b/engines/m4/events.cpp
index f8225fba3e..b476d08c9c 100644
--- a/engines/m4/events.cpp
+++ b/engines/m4/events.cpp
@@ -253,7 +253,7 @@ bool Mouse::setCursorNum(int cursorIndex) {
_cursor = _cursorSprites->getFrame(cursorIndex);
// Set the cursor to the sprite
- CursorMan.replaceCursor((const byte *)_cursor->getBasePtr(), _cursor->width(), _cursor->height(),
+ CursorMan.replaceCursor((const byte *)_cursor->getBasePtr(), _cursor->width(), _cursor->height(),
_cursor->xOffset, _cursor->yOffset, TRANSPARENT_COLOR_INDEX);
return true;
diff --git a/engines/m4/font.h b/engines/m4/font.h
index b00a393811..5a9c73e5d5 100644
--- a/engines/m4/font.h
+++ b/engines/m4/font.h
@@ -108,7 +108,7 @@ public:
Font *getFont(const char *filename);
void setFont(const char *filename);
- Font *current() {
+ Font *current() {
assert(_currentFont);
return _currentFont;
}
diff --git a/engines/m4/globals.cpp b/engines/m4/globals.cpp
index bf2c3abe1c..f4aab8ae8f 100644
--- a/engines/m4/globals.cpp
+++ b/engines/m4/globals.cpp
@@ -414,7 +414,7 @@ const char *MadsGlobals::loadMessage(uint index) {
}
/**
- * Adds the specified scene number to list of scenes previously visited
+ * Adds the specified scene number to list of scenes previously visited
*/
void MadsGlobals::addVisitedScene(int newSceneNumber) {
if (!isSceneVisited(newSceneNumber))
@@ -539,7 +539,7 @@ void MadsObject::load(Common::SeekableReadStream *stream) {
}
void MadsObject::setRoom(int roomNumber) {
-
+
}
} // End of namespace M4
diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp
index 786c975850..4c272de32c 100644
--- a/engines/m4/graphics.cpp
+++ b/engines/m4/graphics.cpp
@@ -408,7 +408,7 @@ void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int dest
* Copies a given image onto a destination surface with scaling, transferring only pixels that meet
* the specified depth requirement on a secondary surface contain depth information
*/
-void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
+void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
M4Surface *depthsSurface, int scale, int transparentColor) {
if (scale == 100) {
@@ -451,7 +451,7 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
}
src->freeData();
- depthsSurface->freeData();
+ depthsSurface->freeData();
return;
}
@@ -501,7 +501,7 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
widthAmount -= destRight;
if (widthAmount > 0)
spriteWidth -= widthAmount;
-
+
int spriteRight = spriteLeft + spriteWidth;
if (spriteWidth <= 0)
return;
@@ -568,7 +568,7 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
}
src->freeData();
- depthsSurface->freeData();
+ depthsSurface->freeData();
this->freeData();
}
@@ -919,7 +919,7 @@ void M4Surface::scrollY(int yAmount) {
// Vertically shift all the lines
Common::copy(pixelsP + (pitch * ySize), pixelsP + (pitch * height()), pixelsP);
// Transfer the buffered lines to the bottom of the screen
- Common::copy(tempData, tempData + blockSize, pixelsP + (pitch * (height() - ySize)));
+ Common::copy(tempData, tempData + blockSize, pixelsP + (pitch * (height() - ySize)));
}
::free(tempData);
@@ -945,7 +945,7 @@ void M4Surface::translate(RGBList *list, bool isTransparent) {
M4Surface *M4Surface::flipHorizontal() const {
M4Surface *dest = new M4Surface(width(), height());
dest->_rgbList = (this->_rgbList == NULL) ? NULL : this->_rgbList->clone();
-
+
byte *destP = dest->getBasePtr();
for (int y = 0; y < height(); ++y) {
diff --git a/engines/m4/graphics.h b/engines/m4/graphics.h
index 242857ba1a..f3dde454f3 100644
--- a/engines/m4/graphics.h
+++ b/engines/m4/graphics.h
@@ -170,7 +170,7 @@ public:
void frameRect(const Common::Rect &r, uint8 color);
void fillRect(const Common::Rect &r, uint8 color);
void copyFrom(M4Surface *src, const Common::Rect &srcBounds, int destX, int destY, int transparentColor = -1);
- void copyFrom(M4Surface *src, int destX, int destY, int depth, M4Surface *depthSurface,
+ void copyFrom(M4Surface *src, int destX, int destY, int depth, M4Surface *depthSurface,
int scale, int transparentColor = -1);
void update() {
diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp
index 93f5ab4cba..efc7943114 100644
--- a/engines/m4/m4.cpp
+++ b/engines/m4/m4.cpp
@@ -259,7 +259,7 @@ void MadsM4Engine::dumpFile(const char *filename, bool uncompress) {
Common::DumpFile f;
byte buffer[DUMP_BUFFER_SIZE];
Common::SeekableReadStream *fileS = res()->get(filename);
-
+
if (!f.open(filename))
error("Could not open '%s' for writing", filename);
diff --git a/engines/m4/m4.h b/engines/m4/m4.h
index 18c3936db8..46107cb20a 100644
--- a/engines/m4/m4.h
+++ b/engines/m4/m4.h
@@ -94,7 +94,7 @@ class Animation;
enum M4GameType {
GType_Riddle = 1,
GType_Burger = 2,
- GType_RexNebular = 3,
+ GType_RexNebular = 3,
GType_DragonSphere = 4,
GType_Phantom = 5
};
diff --git a/engines/m4/m4_views.cpp b/engines/m4/m4_views.cpp
index 4eb84a7488..78c409252b 100644
--- a/engines/m4/m4_views.cpp
+++ b/engines/m4/m4_views.cpp
@@ -217,7 +217,7 @@ const char *INTERFACE_SERIES = "999intr";
#define SPR(x) _sprites->getFrame(x)
-M4InterfaceView::M4InterfaceView(MadsM4Engine *vm):
+M4InterfaceView::M4InterfaceView(MadsM4Engine *vm):
GameInterfaceView(vm, Common::Rect(0, vm->_screen->height() - INTERFACE_HEIGHT,
vm->_screen->width(), vm->_screen->height())),
_statusText(GUITextField(this, Common::Rect(200, 1, 450, 21))),
diff --git a/engines/m4/mads_anim.cpp b/engines/m4/mads_anim.cpp
index d35b31943a..2ea576dfa4 100644
--- a/engines/m4/mads_anim.cpp
+++ b/engines/m4/mads_anim.cpp
@@ -536,7 +536,7 @@ void AnimviewView::updateState() {
// Clear up current background and sprites
_backgroundSurface.reset();
clearLists();
-
+
// Reset flags
_startFrame = -1;
diff --git a/engines/m4/mads_logic.cpp b/engines/m4/mads_logic.cpp
index b1e57bd7f3..cc28a26e68 100644
--- a/engines/m4/mads_logic.cpp
+++ b/engines/m4/mads_logic.cpp
@@ -177,7 +177,7 @@ void MadsSceneLogic::initializeDataMap() {
uint32 MadsSceneLogic::getDataValue(int dataId) {
switch (dataId) {
- case 1:
+ case 1:
return _madsVm->scene()->_abortTimersMode2;
case 2:
return _madsVm->scene()->_abortTimers;
@@ -208,7 +208,7 @@ uint32 MadsSceneLogic::getDataValue(int dataId) {
void MadsSceneLogic::setDataValue(int dataId, uint16 dataValue) {
switch (dataId) {
- case 1:
+ case 1:
_madsVm->scene()->_abortTimersMode2 = (AbortTimerMode)dataValue;
break;
case 2:
@@ -297,7 +297,7 @@ uint16 MadsSceneLogic::startReversibleSpriteSequence(uint16 srcSpriteIdx, bool f
uint8 depth = _madsVm->_rails->getDepth(Common::Point(spriteFrame->x + (spriteFrame->width() / 2),
spriteFrame->y + (spriteFrame->height() / 2)));
- return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0,
+ return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0,
true, 100, depth - 1, 1, ANIMTYPE_REVERSIBLE, 0, 0);
}
@@ -306,7 +306,7 @@ uint16 MadsSceneLogic::startCycledSpriteSequence(uint16 srcSpriteIdx, bool flipp
uint8 depth = _madsVm->_rails->getDepth(Common::Point(spriteFrame->x + (spriteFrame->width() / 2),
spriteFrame->y + (spriteFrame->height() / 2)));
- return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0,
+ return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0,
true, 100, depth - 1, 1, ANIMTYPE_CYCLED, 0, 0);
}
@@ -315,7 +315,7 @@ uint16 MadsSceneLogic::startSpriteSequence3(uint16 srcSpriteIdx, bool flipped, i
uint8 depth = _madsVm->_rails->getDepth(Common::Point(spriteFrame->x + (spriteFrame->width() / 2),
spriteFrame->y + (spriteFrame->height() / 2)));
- return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0,
+ return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0,
true, 100, depth - 1, -1, ANIMTYPE_CYCLED, 0, 0);
}
@@ -335,11 +335,11 @@ void MadsSceneLogic::getPlayerSpritesPrefix() {
strcpy(_madsVm->_player._spritesPrefix, "RXSM");
else if (_madsVm->globals()->_nextSceneId == 112)
strcpy(_madsVm->_player._spritesPrefix, "");
-
+
if (strcmp(oldName, _madsVm->_player._spritesPrefix) != 0)
_madsVm->_player._spritesChanged = true;
- if ((_madsVm->globals()->_nextSceneId == 105) ||
+ if ((_madsVm->globals()->_nextSceneId == 105) ||
((_madsVm->globals()->_nextSceneId == 109) && (_madsVm->globals()->_globals[15] != 0))) {
// TODO: unknown flag setting
_madsVm->_player._spritesChanged = true;
@@ -420,7 +420,7 @@ void MadsSceneLogic::initializeScripts() {
if ((language != 1) || (_madsVm->getLanguage() != Common::EN_ANY))
continue;
- // Found script block for the given game and language.
+ // Found script block for the given game and language.
_scriptsSize = (i < (offsets.size() - 1)) ? offsets[i + 1] - offsets[i] : f.size() - offsets[i];
break;
}
@@ -433,7 +433,7 @@ void MadsSceneLogic::initializeScripts() {
// Load up the list of subroutines into a hash map
uint32 blockOffset = f.pos() - 3;
- uint32 subsStart = 0;
+ uint32 subsStart = 0;
for (;;) {
// Get next entry
Common::String subName;
@@ -593,12 +593,12 @@ void MadsSceneLogic::execute(uint32 subOffset) {
}
case OP_DSTORE: { // Stores data variable
- param = getParam(scriptOffset, opcode);
+ param = getParam(scriptOffset, opcode);
ScriptVar v = stack.pop();
setDataValue(param, v.isInt() ? v.get() : 0);
break;
}
-
+
case OP_LOAD: // loads local variable onto stack
param = getParam(scriptOffset, opcode);
stack.push(locals[param]);
@@ -621,7 +621,7 @@ void MadsSceneLogic::execute(uint32 subOffset) {
case OP_GSTORE: // pops stack and stores in global variable
param = getParam(scriptOffset, opcode);
- assert(param < TOTAL_NUM_VARIABLES);
+ assert(param < TOTAL_NUM_VARIABLES);
_madsVm->globals()->_globals[param] = stack.pop().get();
break;
@@ -647,7 +647,7 @@ void MadsSceneLogic::execute(uint32 subOffset) {
// Condition satisfied - do the jump
scriptOffset = param;
break;
-
+
case OP_JMPTRUE: // conditional jump
param = subOffset + getParam(scriptOffset, opcode);
if (stack.pop().get() != 0)
@@ -708,7 +708,7 @@ void MadsSceneLogic::execute(uint32 subOffset) {
case OP_OR: param1 |= param2; break;
case OP_EOR: param1 ^= param2; break;
}
-
+
stack.push(ScriptVar(param1));
}
break;
@@ -774,7 +774,7 @@ uint32 MadsSceneLogic::getParam(uint32 &scriptOffset, int opcode) {
*/
void MadsSceneLogic::getCallParameters(int numParams, Common::Stack<ScriptVar> &stack, ScriptVar *callParams) {
assert(numParams <= MAX_CALL_PARAMS);
- for (int i = 0; i < numParams; ++i, ++callParams)
+ for (int i = 0; i < numParams; ++i, ++callParams)
*callParams = stack.pop();
}
@@ -881,7 +881,7 @@ void MadsSceneLogic::callSubroutine(int subIndex, Common::Stack<ScriptVar> &stac
case 14: {
// DynamicHotspots_add
EXTRACT_PARAMS(7);
- int idx = _madsVm->scene()->_dynamicHotspots.add(p[0], p[1], p[2],
+ int idx = _madsVm->scene()->_dynamicHotspots.add(p[0], p[1], p[2],
Common::Rect(p[6], p[5], p[6] + p[4], p[5] + p[3]));
stack.push(ScriptVar(idx));
break;
diff --git a/engines/m4/mads_logic.h b/engines/m4/mads_logic.h
index 3132094252..4f0b0d5ba2 100644
--- a/engines/m4/mads_logic.h
+++ b/engines/m4/mads_logic.h
@@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The MADS game logic is all hard-coded into the games, although for Rex at least
- * it seems to use only a fairly basic set of instructions and function calls, so it should be
- * possible
+ * it seems to use only a fairly basic set of instructions and function calls, so it should be
+ * possible
*/
#ifndef M4_MADS_LOGIC_H
diff --git a/engines/m4/mads_menus.cpp b/engines/m4/mads_menus.cpp
index fa65329d76..8a2ab67f11 100644
--- a/engines/m4/mads_menus.cpp
+++ b/engines/m4/mads_menus.cpp
@@ -210,7 +210,7 @@ void RexMainMenuView::updateState() {
M4Sprite *spr = _menuItem->getFrame(0);
itemSize = _menuItem->getFrame(0)->height();
spr->copyTo(this, _menuItemPosList[_menuItemIndex - 1].x,
- _menuItemPosList[_menuItemIndex - 1].y + row + (itemSize / 2) - (spr->height() / 2),
+ _menuItemPosList[_menuItemIndex - 1].y + row + (itemSize / 2) - (spr->height() / 2),
spr->getTransparencyIndex());
delete _menuItem;
@@ -876,7 +876,7 @@ void RexDialogView::addLine(const char *msg_p, Font *font, MadsTextAlignment ali
}
break;
}
-
+
case RIGHT_ALIGN:
// Right align (moving left from given passed left)
rec->pos.x = left - font->getWidth(rec->text);
@@ -920,7 +920,7 @@ void RexDialogView::setClickableLines() {
for (int i = 0; i < DIALOG_LINES_SIZE; ++i) {
if (_dialogText[i].in_use) {
// Add an entry for the line
- _screenObjects.add(Common::Rect(_dialogText[i].pos.x, _dialogText[i].pos.y,
+ _screenObjects.add(Common::Rect(_dialogText[i].pos.x, _dialogText[i].pos.y,
_dialogText[i].pos.x + _dialogText[i].font->getWidth(_dialogText[i].text, _dialogText[i].widthAdjust),
_dialogText[i].pos.y + _dialogText[i].font->getHeight()), 19, i, 1);
}
@@ -988,7 +988,7 @@ RexGameMenuDialog::RexGameMenuDialog(): RexDialogView() {
void RexGameMenuDialog::addLines() {
// Add the title
int top = MADS_Y_OFFSET - 2 - ((((_vm->_font->current()->getHeight() + 2) * 6) >> 1) - 78);
-
+
addQuote(_vm->_font->current(), ALIGN_CENTER, 0, top, 10);
// Loop for adding the option lines of the dialog
@@ -1163,7 +1163,7 @@ bool RexOptionsDialog::onEvent(M4EventType eventType, int32 param1, int x, int y
return true;
}
- // Update the option selections
+ // Update the option selections
reload();
}
diff --git a/engines/m4/mads_player.cpp b/engines/m4/mads_player.cpp
index 0b83b54ff5..73480088ee 100644
--- a/engines/m4/mads_player.cpp
+++ b/engines/m4/mads_player.cpp
@@ -46,7 +46,7 @@ MadsPlayer::MadsPlayer() {
_unk4 = false;
_spritesChanged = true;
-
+
_direction = 0;
_newDirection = 0;
_priorTimer = 0;
@@ -131,7 +131,7 @@ void MadsPlayer::update() {
// Figure out the depth for the sprite
int newDepth = 1;
int yp = MIN(_playerPos.y, (int16)155);
-
+
for (int idx = 1; idx < 15; ++idx) {
if (_madsVm->scene()->getSceneResources()._depthBands[newDepth] >= yp)
newDepth = idx + 1;
@@ -199,7 +199,7 @@ void MadsPlayer::updateFrame() {
_unk2 = 0;
} else {
_unk2 = _actionList2[_actionIndex];
-
+
if (_actionIndex > 0)
--_actionIndex;
}
@@ -237,7 +237,7 @@ void MadsPlayer::setupFrame() {
_frameCount = spriteSet.getCount();
_yScale = spriteSet._charInfo->_yScale;
-
+
if ((_frameNum <= 0) || (_frameNum > _frameCount))
_frameNum = 1;
_forceRefresh = true;
@@ -336,7 +336,7 @@ void MadsPlayer::setDest(int destX, int destY, int facing) {
setTicksAmount();
_moving = true;
_destFacing = facing;
-
+
_madsVm->scene()->getSceneResources().setRouteNode(_madsVm->scene()->getSceneResources()._nodes.size() - 2,
_playerPos, _madsVm->scene()->_depthSurface);
_madsVm->scene()->getSceneResources().setRouteNode(_madsVm->scene()->getSceneResources()._nodes.size() - 1,
@@ -448,7 +448,7 @@ void MadsPlayer::move() {
bool routeFlag = false;
if (_moving) {
- int idx = _routeCount;
+ int idx = _routeCount;
while (!_v844C0 && (_destPos.x == _playerPos.x) && (_destPos.y == _playerPos.y)) {
if (idx != 0) {
--idx;
@@ -650,7 +650,7 @@ int MadsPlayer::scanPath(M4Surface *depthSurface, const Common::Point &srcPos, c
srcP += xDirection;
}
-
+
return 0;
}
@@ -730,12 +730,12 @@ void MadsPlayer::startMovement() {
int majorChange = MAX(xDiff, yDiff);
_v84530 = (majorChange == 0) ? 0 : _hypotenuse / majorChange;
-
+
if (_playerPos.x > _destPos.x)
_v8452C = MAX(_posChange.x, _posChange.y);
else
_v8452C = 0;
-
+
_hypotenuse /= 100;
_v8452E = -_v84530;
}
diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp
index a0acbdd69d..5f160aa300 100644
--- a/engines/m4/mads_scene.cpp
+++ b/engines/m4/mads_scene.cpp
@@ -169,7 +169,7 @@ void MadsScene::loadScene(int sceneNumber) {
}
_abortTimers = 0;
_abortTimersMode2 = ABORTMODE_1;
-
+
// Do any scene specific setup
if (_vm->getGameType() == GType_RexNebular)
@@ -376,7 +376,7 @@ void MadsScene::updateState() {
if (_madsVm->globals()->_config.easyMouse)
_action.refresh();
-
+
if ((_activeAnimation) && !_abortTimers) {
_activeAnimation->update();
if (((MadsAnimation *) _activeAnimation)->freeFlag() || freeFlag) {
@@ -598,7 +598,7 @@ void MadsScene::loadAnimation(const Common::String &animName, int abortTimers) {
bool MadsScene::getDepthHighBit(const Common::Point &pt) {
const byte *p = _depthSurface->getBasePtr(pt.x, pt.y);
- if (_sceneResources._depthStyle == 2)
+ if (_sceneResources._depthStyle == 2)
return ((*p << 4) & 0x80) != 0;
return (*p & 0x80) != 0;
@@ -653,7 +653,7 @@ void MadsSceneResources::load(int sceneNumber, const char *resName, int v0, M4Su
_depthStyle = stream->readUint16LE();
_width = stream->readUint16LE();
_height = stream->readUint16LE();
-
+
stream->skip(24);
int nodeCount = stream->readUint16LE();
@@ -771,7 +771,7 @@ void MadsSceneResources::setRouteNode(int nodeIndex, const Common::Point &pt, M4
if (hypotenuse >= 0x3FFF)
// Shouldn't ever be this large
hypotenuse = 0x3FFF;
-
+
entry = hypotenuse | flags;
_nodes[idx].indexes[nodeIndex] = entry;
_nodes[nodeIndex].indexes[idx] = entry;
@@ -794,7 +794,7 @@ int MadsSceneResources::getRouteFlags(const Common::Point &src, const Common::Po
++yDiff;
byte *srcP = depthSurface->getBasePtr(src.x, src.y);
-
+
int totalCtr = majorDiff;
for (int xCtr = 0; xCtr < xDiff; ++xCtr, srcP += xDirection) {
totalCtr += yDiff;
@@ -837,7 +837,7 @@ int MadsSceneResources::getRouteFlags(const Common::Point &src, const Common::Po
*--------------------------------------------------------------------------
*/
-MadsInterfaceView::MadsInterfaceView(MadsM4Engine *vm): GameInterfaceView(vm,
+MadsInterfaceView::MadsInterfaceView(MadsM4Engine *vm): GameInterfaceView(vm,
Common::Rect(0, MADS_SURFACE_HEIGHT, vm->_screen->width(), vm->_screen->height())) {
_screenType = VIEWID_INTERFACE;
_highlightedElement = -1;
@@ -1078,7 +1078,7 @@ bool MadsInterfaceView::onEvent(M4EventType eventType, int32 param1, int x, int
// A standard action was selected
int verbId = kVerbLook + (_highlightedElement - ACTIONS_START);
warning("Selected action #%d", verbId);
-
+
} else if ((_highlightedElement >= VOCAB_START) && (_highlightedElement < (VOCAB_START + 5))) {
// A vocab action was selected
MadsObject *obj = _madsVm->globals()->getObject(_selectedObject);
@@ -1259,8 +1259,8 @@ void MadsInterfaceView::leaveScene() {
//--------------------------------------------------------------------------
-int getActiveAnimationBool() {
- return (_madsVm->scene()->activeAnimation()) ? 1 : 0;
+int getActiveAnimationBool() {
+ return (_madsVm->scene()->activeAnimation()) ? 1 : 0;
}
int getAnimationCurrentFrame() {
diff --git a/engines/m4/mads_views.cpp b/engines/m4/mads_views.cpp
index b66591a207..0521903c95 100644
--- a/engines/m4/mads_views.cpp
+++ b/engines/m4/mads_views.cpp
@@ -99,7 +99,7 @@ void MadsAction::set() {
// Use/to action
int selectedObject = _madsVm->scene()->getInterface()->getSelectedObject();
MadsObject *objEntry = _madsVm->globals()->getObject(selectedObject);
-
+
_action.objectNameId = objEntry->_descId;
_currentAction = objEntry->_vocabList[_selectedRow].vocabId;
@@ -244,7 +244,7 @@ void MadsAction::refresh() {
// Add a new text display entry to display the status text at the bottom of the screen area
uint colors = (_vm->getGameType() == GType_DragonSphere) ? 0x0300 : 0x0003;
- _statusTextIndex = _owner._textDisplay.add(160 - (strWidth / 2),
+ _statusTextIndex = _owner._textDisplay.add(160 - (strWidth / 2),
MADS_SURFACE_HEIGHT + _owner._posAdjust.y - 13, colors, textSpacing, _statusText, font);
}
}
@@ -476,7 +476,7 @@ void MadsSpriteSlots::drawBackground() {
if (slot.depth > 1) {
// Draw the frame with depth processing
- _owner._bgSurface->copyFrom(frame, xp, yp, slot.depth, _owner._depthSurface, 100,
+ _owner._bgSurface->copyFrom(frame, xp, yp, slot.depth, _owner._depthSurface, 100,
frame->getTransparencyIndex());
} else {
// No depth, so simply draw the image
@@ -526,7 +526,7 @@ void MadsSpriteSlots::drawForeground(M4Surface *viewport) {
if ((slot.scale < 100) && (slot.scale != -1)) {
// Minimalised drawing
- viewport->copyFrom(spr, slot.xp, slot.yp, slot.depth, _owner._depthSurface, slot.scale,
+ viewport->copyFrom(spr, slot.xp, slot.yp, slot.depth, _owner._depthSurface, slot.scale,
sprite->getTransparencyIndex());
} else {
int xp, yp;
@@ -665,7 +665,7 @@ void MadsTextDisplay::draw(M4Surface *view) {
for (uint idx = 0; idx < _entries.size(); ++idx) {
if (_entries[idx].active && (_entries[idx].expire >= 0)) {
_entries[idx].font->setColors(_entries[idx].color1, _entries[idx].color2, 0);
- _entries[idx].font->writeString(view, _entries[idx].msg,
+ _entries[idx].font->writeString(view, _entries[idx].msg,
_entries[idx].bounds.left, _entries[idx].bounds.top, _entries[idx].bounds.width(),
_entries[idx].spacing);
}
@@ -728,7 +728,7 @@ int MadsKernelMessageList::add(const Common::Point &pt, uint fontColor, uint8 fl
rec.frameTimer = _madsVm->_currentTimer;
rec.abortTimers = abortTimers;
rec.abortMode = _owner._abortTimersMode2;
-
+
for (int i = 0; i < 3; ++i)
rec.actionNouns[i] = _madsVm->globals()->actionNouns[i];
@@ -850,7 +850,7 @@ void MadsKernelMessageList::processText(int msgIndex) {
y1 = seqEntry.msgPos.y;
}
}
-
+
if (msg.flags & KMSG_PLAYER_TIMEOUT) {
if (word_8469E != 0) {
// TODO: Figure out various flags
@@ -867,7 +867,7 @@ void MadsKernelMessageList::processText(int msgIndex) {
msg.msg[msg.msgOffset] = msg.asciiChar;
char *msgP = &msg.msg[++msg.msgOffset];
*msgP = msg.asciiChar2;
-
+
msg.asciiChar = *msgP;
msg.asciiChar2 = *(msgP + 1);
@@ -884,7 +884,7 @@ void MadsKernelMessageList::processText(int msgIndex) {
flag = true;
}
- int strWidth = _talkFont->getWidth(msg.msg, _owner._textSpacing);
+ int strWidth = _talkFont->getWidth(msg.msg, _owner._textSpacing);
if (msg.flags & (KMSG_RIGHT_ALIGN | KMSG_CENTER_ALIGN)) {
x1 -= (msg.flags & KMSG_CENTER_ALIGN) ? strWidth / 2 : strWidth;
@@ -935,7 +935,7 @@ ScreenObjects::ScreenObjects(MadsView &owner): _owner(owner) {
_category = 0;
_objectIndex = 0;
}
-
+
/**
* Clears the entries list
*/
@@ -1153,7 +1153,7 @@ void MadsDirtyAreas::setSpriteSlot(int dirtyIdx, const MadsSpriteSlot &spriteSlo
SpriteAsset &spriteSet = _owner._spriteSlots.getSprite(spriteSlot.spriteListIndex);
M4Sprite *frame = spriteSet.getFrame(((spriteSlot.frameNumber & 0x7fff) - 1) & 0x7f);
-
+
if (spriteSlot.scale == -1) {
width = frame->width();
height = frame->height();
@@ -1270,8 +1270,8 @@ bool MadsSequenceList::addSubEntry(int index, SequenceSubEntryMode mode, int fra
return false;
}
-int MadsSequenceList::add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks, int extraTicks, int numTicks,
- int msgX, int msgY, bool nonFixed, char scale, uint8 depth, int frameInc, SpriteAnimType animType, int numSprites,
+int MadsSequenceList::add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks, int extraTicks, int numTicks,
+ int msgX, int msgY, bool nonFixed, char scale, uint8 depth, int frameInc, SpriteAnimType animType, int numSprites,
int frameStart) {
// Find a free slot
@@ -1340,7 +1340,7 @@ void MadsSequenceList::setSpriteSlot(int seqIndex, MadsSpriteSlot &spriteSlot) {
spriteSlot.frameNumber = (timerEntry.flipped ? 0x8000 : 0) | timerEntry.frameIndex;
spriteSlot.depth = timerEntry.depth;
spriteSlot.scale = timerEntry.scale;
-
+
if (!timerEntry.nonFixed) {
spriteSlot.xp = timerEntry.msgPos.x;
spriteSlot.yp = timerEntry.msgPos.y;
@@ -1420,7 +1420,7 @@ bool MadsSequenceList::loadSprites(int seqIndex) {
seqEntry.frameInc = 1;
} else {
// Otherwise reset back to last sprite for further reverse animating
- seqEntry.frameIndex = seqEntry.numSprites;
+ seqEntry.frameIndex = seqEntry.numSprites;
}
}
@@ -1478,7 +1478,7 @@ void MadsSequenceList::tick() {
continue;
// Set the next timeout for the timer entry
- seqEntry.timeout = currentTimer + seqEntry.numTicks;
+ seqEntry.timeout = currentTimer + seqEntry.numTicks;
// Action the sprite
if (loadSprites(idx)) {
@@ -1509,7 +1509,7 @@ void MadsSequenceList::setAnimRange(int seqIndex, int startVal, int endVal) {
tempStart = 1;
break;
}
-
+
switch (endVal) {
case -2:
case 0:
@@ -1558,7 +1558,7 @@ Animation::~Animation() {
MadsView::MadsView(View *view): _view(view), _dynamicHotspots(*this), _sequenceList(*this),
_kernelMessages(*this), _spriteSlots(*this), _dirtyAreas(*this), _textDisplay(*this),
_screenObjects(*this), _action(*this) {
-
+
_textSpacing = -1;
_newTimeout = 0;
_abortTimers = 0;
@@ -1590,8 +1590,8 @@ void MadsView::refresh() {
// Merge any identified dirty areas
_dirtyAreas.merge(1, DIRTY_AREAS_SIZE);
-
- // Copy dirty areas to the main display surface
+
+ // Copy dirty areas to the main display surface
_dirtyAreas.copy(_viewport, _bgSurface, _posAdjust);
// Handle dirty areas for foreground objects
diff --git a/engines/m4/mads_views.h b/engines/m4/mads_views.h
index 6be2283a32..41caaa2ded 100644
--- a/engines/m4/mads_views.h
+++ b/engines/m4/mads_views.h
@@ -208,7 +208,7 @@ public:
#define TIMED_TEXT_SIZE 10
#define INDEFINITE_TIMEOUT 9999999
-enum KernelMessageFlags {KMSG_QUOTED = 1, KMSG_PLAYER_TIMEOUT = 2, KMSG_SEQ_ENTRY = 4, KMSG_SCROLL = 8, KMSG_RIGHT_ALIGN = 0x10,
+enum KernelMessageFlags {KMSG_QUOTED = 1, KMSG_PLAYER_TIMEOUT = 2, KMSG_SEQ_ENTRY = 4, KMSG_SCROLL = 8, KMSG_RIGHT_ALIGN = 0x10,
KMSG_CENTER_ALIGN = 0x20, KMSG_EXPIRE = 0x40, KMSG_ACTIVE = 0x80};
class MadsKernelMessageEntry {
@@ -388,7 +388,7 @@ struct MadsSequenceEntry {
int8 active;
int8 spriteListIndex;
bool flipped;
-
+
int frameIndex;
int frameStart;
int numSprites;
@@ -402,7 +402,7 @@ struct MadsSequenceEntry {
bool nonFixed;
int field_13;
-
+
Common::Point msgPos;
int triggerCountdown;
bool doneFlag;
@@ -424,10 +424,10 @@ private:
public:
MadsSequenceList(MadsView &owner);
- MadsSequenceEntry &operator[](int index) { return _entries[index]; }
+ MadsSequenceEntry &operator[](int index) { return _entries[index]; }
void clear();
bool addSubEntry(int index, SequenceSubEntryMode mode, int frameIndex, int abortVal);
- int add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks,
+ int add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks,
int extraTicks, int numTicks, int msgX, int msgY, bool nonFixed, char scale, uint8 depth,
int frameInc, SpriteAnimType animType, int numSprites, int frameStart);
void remove(int seqIndex);
@@ -452,7 +452,7 @@ public:
virtual void setCurrentFrame(int frameNumber) = 0;
virtual int getCurrentFrame() = 0;
};
-
+
class MadsView {
private:
diff --git a/engines/m4/resource.cpp b/engines/m4/resource.cpp
index 2ae29ca0bb..f5b2050052 100644
--- a/engines/m4/resource.cpp
+++ b/engines/m4/resource.cpp
@@ -313,7 +313,7 @@ const char *MADSResourceManager::getResourceFilename(const char *resourceName) {
/**
* Forms a resource name based on the passed specifiers
*/
-const char *MADSResourceManager::getResourceName(char asciiCh, int prefix, ExtensionType extType,
+const char *MADSResourceManager::getResourceName(char asciiCh, int prefix, ExtensionType extType,
const char *suffix, int index) {
static char resourceName[100];
diff --git a/engines/m4/resource.h b/engines/m4/resource.h
index 00c54a3680..c13c293544 100644
--- a/engines/m4/resource.h
+++ b/engines/m4/resource.h
@@ -109,7 +109,7 @@ public:
enum ResourceType {RESTYPE_ROOM, RESTYPE_SC, RESTYPE_TEXT, RESTYPE_QUO, RESTYPE_I,
RESTYPE_OB, RESTYPE_FONT, RESTYPE_SOUND, RESTYPE_SPEECH, RESTYPE_HAS_EXT, RESTYPE_NO_EXT};
-enum ExtensionType {EXTTYPE_SS = 1, EXTTYPE_AA = 2, EXTTYPE_DAT = 3, EXTTYPE_HH = 4, EXTTYPE_ART = 5,
+enum ExtensionType {EXTTYPE_SS = 1, EXTTYPE_AA = 2, EXTTYPE_DAT = 3, EXTTYPE_HH = 4, EXTTYPE_ART = 5,
EXTTYPE_INT = 6, EXTTYPE_NONE = -1};
enum ResourcePrefixType {RESPREFIX_GL = 1, RESPREFIX_SC = 2, RESPREFIX_RM = 3};
diff --git a/engines/m4/scene.cpp b/engines/m4/scene.cpp
index a38be20086..be49dcb13f 100644
--- a/engines/m4/scene.cpp
+++ b/engines/m4/scene.cpp
@@ -36,7 +36,7 @@
namespace M4 {
-Scene::Scene(MadsM4Engine *vm, SceneResources *res): View(vm, Common::Rect(0, 0, vm->_screen->width(),
+Scene::Scene(MadsM4Engine *vm, SceneResources *res): View(vm, Common::Rect(0, 0, vm->_screen->width(),
vm->_screen->height())), _sceneResources(res) {
_screenType = VIEWID_SCENE;
@@ -142,7 +142,7 @@ void Scene::showCodes() {
// Show the walk areas for the M4 engine in black and white
const byte *srcP = (const byte *)_walkSurface->getBasePtr(0, 0);
byte *destP = _backgroundSurface->getBasePtr(0, 0);
-
+
for (int i = 0; i < _walkSurface->width() * _walkSurface->height(); i++)
destP[i] = (srcP[i] & 0x10) ? 0xFF : 0;
@@ -154,7 +154,7 @@ void Scene::showCodes() {
_vm->_palette->setPalette(colors, 0, 256);
} else {
// MADS handling
-
+
// copy the walk data to the background, in whatever current palette is active
_walkSurface->copyTo(_backgroundSurface);
diff --git a/engines/m4/sound.cpp b/engines/m4/sound.cpp
index d10dea5cad..76eae8a661 100644
--- a/engines/m4/sound.cpp
+++ b/engines/m4/sound.cpp
@@ -97,8 +97,8 @@ void Sound::playSound(const char *soundName, int volume, bool loop, int channel)
_mixer->playStream(Audio::Mixer::kSFXSoundType, &handle->handle, stream, -1, volume);
}
-void Sound::playSound(int soundNum) {
- warning("TODO: playSound(%d)", soundNum);
+void Sound::playSound(int soundNum) {
+ warning("TODO: playSound(%d)", soundNum);
}
void Sound::pauseSound() {
diff --git a/engines/m4/sprite.cpp b/engines/m4/sprite.cpp
index 1a3228d1bb..d0741732f3 100644
--- a/engines/m4/sprite.cpp
+++ b/engines/m4/sprite.cpp
@@ -182,7 +182,7 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) {
}
}
}
-
+
// Check if we need to scan forward to find the end of the line
if (!newLine) {
do {