aboutsummaryrefslogtreecommitdiff
path: root/engines/prince
diff options
context:
space:
mode:
Diffstat (limited to 'engines/prince')
-rw-r--r--engines/prince/animation.cpp6
-rw-r--r--engines/prince/animation.h2
-rw-r--r--engines/prince/archive.cpp2
-rw-r--r--engines/prince/cursor.h2
-rw-r--r--engines/prince/graphics.cpp2
-rw-r--r--engines/prince/graphics.h2
-rw-r--r--engines/prince/hero.cpp2
-rw-r--r--engines/prince/hero.h4
-rw-r--r--engines/prince/mhwanh.cpp4
-rw-r--r--engines/prince/mob.h2
-rw-r--r--engines/prince/object.cpp2
-rw-r--r--engines/prince/object.h2
-rw-r--r--engines/prince/prince.cpp14
-rw-r--r--engines/prince/prince.h4
-rw-r--r--engines/prince/pscr.h2
-rw-r--r--engines/prince/resource.h6
-rw-r--r--engines/prince/saveload.cpp4
-rw-r--r--engines/prince/script.cpp14
18 files changed, 38 insertions, 38 deletions
diff --git a/engines/prince/animation.cpp b/engines/prince/animation.cpp
index b4bde27f69..aabdd7a623 100644
--- a/engines/prince/animation.cpp
+++ b/engines/prince/animation.cpp
@@ -132,7 +132,7 @@ int16 Animation::getPhaseOffsetX(int phaseIndex) const {
if (phaseIndex < _phaseCount) {
return _phaseList[phaseIndex]._phaseOffsetX;
} else {
- error("getPhaseOffsetX() phaseIndex: %d, phaseCount: %d", phaseIndex, _phaseCount);
+ error("getPhaseOffsetX() phaseIndex: %d, phaseCount: %d", phaseIndex, _phaseCount);
}
}
@@ -140,7 +140,7 @@ int16 Animation::getPhaseOffsetY(int phaseIndex) const {
if (phaseIndex < _phaseCount) {
return _phaseList[phaseIndex]._phaseOffsetY;
} else {
- error("getPhaseOffsetY() phaseIndex: %d, phaseCount: %d", phaseIndex, _phaseCount);
+ error("getPhaseOffsetY() phaseIndex: %d, phaseCount: %d", phaseIndex, _phaseCount);
}
}
@@ -148,7 +148,7 @@ int16 Animation::getPhaseFrameIndex(int phaseIndex) const {
if (phaseIndex < _phaseCount) {
return _phaseList[phaseIndex]._phaseToFrameIndex;
} else {
- error("getPhaseFrameIndex() phaseIndex: %d, phaseCount: %d", phaseIndex, _phaseCount);
+ error("getPhaseFrameIndex() phaseIndex: %d, phaseCount: %d", phaseIndex, _phaseCount);
}
}
diff --git a/engines/prince/animation.h b/engines/prince/animation.h
index 733acb399c..3471ffa158 100644
--- a/engines/prince/animation.h
+++ b/engines/prince/animation.h
@@ -35,7 +35,7 @@ public:
Animation();
~Animation();
bool loadStream(Common::SeekableReadStream &stream);
-
+
int16 getLoopCount() const;
int32 getPhaseCount() const;
int32 getFrameCount() const;
diff --git a/engines/prince/archive.cpp b/engines/prince/archive.cpp
index ae6a2b7546..7a4a35abd8 100644
--- a/engines/prince/archive.cpp
+++ b/engines/prince/archive.cpp
@@ -64,7 +64,7 @@ bool PtcArchive::open(const Common::String &filename) {
byte *fileTableEnd = fileTable + fileTableSize;
_stream->read(fileTable, fileTableSize);
decrypt(fileTable, fileTableSize);
-
+
for (byte *fileItem = fileTable; fileItem < fileTableEnd; fileItem += 32) {
FileEntry item;
Common::String name = (const char*)fileItem;
diff --git a/engines/prince/cursor.h b/engines/prince/cursor.h
index 9387f344dc..fb07d01729 100644
--- a/engines/prince/cursor.h
+++ b/engines/prince/cursor.h
@@ -30,7 +30,7 @@
namespace Prince {
class Cursor {
-public:
+public:
Cursor();
~Cursor();
diff --git a/engines/prince/graphics.cpp b/engines/prince/graphics.cpp
index ad6a2ff85c..f556d81eab 100644
--- a/engines/prince/graphics.cpp
+++ b/engines/prince/graphics.cpp
@@ -194,7 +194,7 @@ void GraphicsMan::drawTransparentDrawNode(Graphics::Surface *screen, DrawNode *d
/**
* Similar to drawTransparentDrawNode but with additional anti-aliasing code for sprite drawing.
* Edge smoothing is based on 256 x 256 table of colors transition.
- * Algorithm is checking if currently drawing pixel is located next to the edge of sprite and if it makes jagged line.
+ * Algorithm is checking if currently drawing pixel is located next to the edge of sprite and if it makes jagged line.
* If it does then this pixel is set with color from transition table calculated of original background pixel color
* and sprite's edge pixel color.
*/
diff --git a/engines/prince/graphics.h b/engines/prince/graphics.h
index b6f002b7da..1a1737f976 100644
--- a/engines/prince/graphics.h
+++ b/engines/prince/graphics.h
@@ -35,7 +35,7 @@ class GraphicsMan {
public:
GraphicsMan(PrinceEngine *vm);
~GraphicsMan();
-
+
void update(Graphics::Surface *screen);
void change();
diff --git a/engines/prince/hero.cpp b/engines/prince/hero.cpp
index 146470f6b7..b873e83360 100644
--- a/engines/prince/hero.cpp
+++ b/engines/prince/hero.cpp
@@ -129,7 +129,7 @@ int Hero::getScaledValue(int size) {
Graphics::Surface *Hero::zoomSprite(Graphics::Surface *heroFrame) {
Graphics::Surface *zoomedFrame = new Graphics::Surface();
zoomedFrame->create(_scaledFrameXSize, _scaledFrameYSize, Graphics::PixelFormat::createFormatCLUT8());
-
+
int sprZoomX;
int sprZoomY = _vm->_scaleValue;
uint xSource = 0;
diff --git a/engines/prince/hero.h b/engines/prince/hero.h
index d5f7d8cc7a..703ef0650d 100644
--- a/engines/prince/hero.h
+++ b/engines/prince/hero.h
@@ -129,7 +129,7 @@ public:
void drawHeroShadow(Graphics::Surface *heroFrame);
void freeOldMove();
void freeHeroAnim();
-
+
uint16 _number;
uint16 _visible;
int16 _state;
@@ -170,7 +170,7 @@ public:
int _color; // subtitles color
uint32 _animSetNr; // number of animation set
Common::Array<Animation *> _moveSet; // MoveAnims MoveSet
-
+
uint32 _moveDelay;
uint32 _shadMinus;
diff --git a/engines/prince/mhwanh.cpp b/engines/prince/mhwanh.cpp
index ef94ef71f9..608ccc23d7 100644
--- a/engines/prince/mhwanh.cpp
+++ b/engines/prince/mhwanh.cpp
@@ -38,7 +38,7 @@ MhwanhDecoder::~MhwanhDecoder() {
void MhwanhDecoder::destroy() {
if (_surface != nullptr) {
_surface->free();
- delete _surface;
+ delete _surface;
_surface = nullptr;
}
if (_palette != nullptr) {
@@ -57,7 +57,7 @@ bool MhwanhDecoder::loadStream(Common::SeekableReadStream &stream) {
_palette[i * 3] = stream.readByte();
_palette[i * 3 + 1] = stream.readByte();
_palette[i * 3 + 2] = stream.readByte();
- }
+ }
_surface = new Graphics::Surface();
_surface->create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
diff --git a/engines/prince/mob.h b/engines/prince/mob.h
index cc60e36f9b..0ea610dd8f 100644
--- a/engines/prince/mob.h
+++ b/engines/prince/mob.h
@@ -50,7 +50,7 @@ public:
void setData(AttrId dataId, uint16 value);
uint16 getData(AttrId dataId);
- bool _visible;
+ bool _visible;
uint16 _type;
uint16 _mask;
Common::Rect _rect;
diff --git a/engines/prince/object.cpp b/engines/prince/object.cpp
index a9a96455b1..2dc5da68e7 100644
--- a/engines/prince/object.cpp
+++ b/engines/prince/object.cpp
@@ -79,7 +79,7 @@ bool Object::loadFromStream(Common::SeekableReadStream &stream) {
_flags = stream.readUint16LE();
_z = stream.readUint16LE();
-
+
stream.seek(pos + 16);
return true;
diff --git a/engines/prince/object.h b/engines/prince/object.h
index 68edd061a0..ff22a05805 100644
--- a/engines/prince/object.h
+++ b/engines/prince/object.h
@@ -62,7 +62,7 @@ public:
private:
void loadSurface(Common::SeekableReadStream &stream);
- Graphics::Surface *_surface;
+ Graphics::Surface *_surface;
};
} // End of namespace Prince
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index b0f2cd5056..04a482c570 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -213,11 +213,11 @@ GUI::Debugger *PrinceEngine::getDebugger() {
void PrinceEngine::init() {
const Common::FSNode gameDataDir(ConfMan.get("path"));
-
+
debugEngine("Adding all path: %s", gameDataDir.getPath().c_str());
PtcArchive *all = new PtcArchive();
- if (!all->open("all/databank.ptc"))
+ if (!all->open("all/databank.ptc"))
error("Can't open all/databank.ptc");
PtcArchive *voices = new PtcArchive();
@@ -261,7 +261,7 @@ void PrinceEngine::init() {
_variaTxt = new VariaTxt();
Resource::loadResource(_variaTxt, "variatxt.dat", true);
-
+
_cursor1 = new Cursor();
Resource::loadResource(_cursor1, "mouse1.cur", true);
@@ -705,7 +705,7 @@ void PrinceEngine::freeAllSamples() {
}
bool PrinceEngine::loadSample(uint32 sampleSlot, const Common::String &streamName) {
- // FIXME: This is just a workaround streamName is a path
+ // FIXME: This is just a workaround streamName is a path
// SOUND\\SCIERKA1.WAV for now only last path component is used
Common::String normalizedPath = lastPathComponent(streamName, '\\');
@@ -756,7 +756,7 @@ bool PrinceEngine::loadVoice(uint32 slot, uint32 sampleSlot, const Common::Strin
}
id = sampleStream->readUint32LE();
- debugEngine("SetVoice slot %d time %04x", slot, id);
+ debugEngine("SetVoice slot %d time %04x", slot, id);
id <<= 3;
id /= 22050;
id += 2;
@@ -768,7 +768,7 @@ bool PrinceEngine::loadVoice(uint32 slot, uint32 sampleSlot, const Common::Strin
_secondHero->_talkTime = id;
}
- debugEngine("SetVoice slot %d time %04x", slot, id);
+ debugEngine("SetVoice slot %d time %04x", slot, id);
sampleStream->seek(SEEK_SET);
_audioStream[sampleSlot] = Audio::makeWAVStream(sampleStream, DisposeAfterUse::NO);
delete sampleStream;
@@ -4321,7 +4321,7 @@ int PrinceEngine::scanDirectionsFindNext(byte *tempCoordsBuf, int xDiff, int yDi
tempCoordsBuf += 4;
if (tempCoordsBuf == _coords) {
- direction = tempX;
+ direction = tempX;
break;
}
diff --git a/engines/prince/prince.h b/engines/prince/prince.h
index 0e5bf97dde..930c3c7bd3 100644
--- a/engines/prince/prince.h
+++ b/engines/prince/prince.h
@@ -242,7 +242,7 @@ struct DebugChannel {
enum Type {
kScript,
- kEngine
+ kEngine
};
};
@@ -658,7 +658,7 @@ private:
Common::Array<Mob> _invMobList;
bool _flicLooped;
-
+
void mainLoop();
};
diff --git a/engines/prince/pscr.h b/engines/prince/pscr.h
index d59fa37d81..fdcdb524a9 100644
--- a/engines/prince/pscr.h
+++ b/engines/prince/pscr.h
@@ -40,7 +40,7 @@ public:
Graphics::Surface *getSurface() const { return _surface; }
private:
void loadSurface(Common::SeekableReadStream &stream);
- Graphics::Surface *_surface;
+ Graphics::Surface *_surface;
};
} // End of namespace Prince
diff --git a/engines/prince/resource.h b/engines/prince/resource.h
index b1fbd9c4f0..f42eb87842 100644
--- a/engines/prince/resource.h
+++ b/engines/prince/resource.h
@@ -41,13 +41,13 @@ namespace Resource {
bool loadResource(T *resource, const char *resourceName, bool required) {
Common::ScopedPtr<Common::SeekableReadStream> stream(SearchMan.createReadStreamForMember(resourceName));
if (!stream) {
- if (required)
+ if (required)
error("Can't load %s", resourceName);
return false;
}
return loadFromStream(*resource, *stream);
- }
+ }
template <typename T>
bool loadResource(Common::Array<T> &array, Common::SeekableReadStream &stream, bool required = true) {
@@ -82,7 +82,7 @@ namespace Resource {
}
// FIXME: This is stupid. Maybe loadFromStream should be helper method that returns initiailzed object
- while (true) {
+ while (true) {
T* t = new T();
if (!t->loadFromStream(*stream)) {
delete t;
diff --git a/engines/prince/saveload.cpp b/engines/prince/saveload.cpp
index 39a4002b40..706079ffaf 100644
--- a/engines/prince/saveload.cpp
+++ b/engines/prince/saveload.cpp
@@ -480,7 +480,7 @@ bool PrinceEngine::loadGame(int slotNumber) {
saveFile->read(dataBuffer, size);
readStream = new Common::MemoryReadStream(dataBuffer, size, DisposeAfterUse::YES);
delete saveFile;
-
+
// Check to see if it's a ScummVM savegame or not
char buffer[kSavegameStrSize + 1];
readStream->read(buffer, kSavegameStrSize + 1);
@@ -507,7 +507,7 @@ bool PrinceEngine::loadGame(int slotNumber) {
// TODO
//syncSpeechSettings();
-
+
return true;
}
diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp
index d1a0034940..deb52d7622 100644
--- a/engines/prince/script.cpp
+++ b/engines/prince/script.cpp
@@ -43,7 +43,7 @@ Room::Room() {}
bool Room::loadRoom(byte *roomData) {
int roomSize = 64;
Common::MemoryReadStream roomStream(roomData, roomSize);
-
+
_mobs = roomStream.readSint32LE();
_backAnim = roomStream.readSint32LE();
_obj = roomStream.readSint32LE();
@@ -131,7 +131,7 @@ bool Script::loadStream(Common::SeekableReadStream &stream) {
_scriptInfo.invObjGive = scriptDataStream.readSint32LE();
_scriptInfo.stdGiveItem = scriptDataStream.readSint32LE();
_scriptInfo.goTester = scriptDataStream.readSint32LE();
-
+
return true;
}
@@ -427,7 +427,7 @@ int32 InterpreterFlags::getFlagValue(Flags::Id flagId) {
return _flags[(uint32)flagId - kFlagMask];
}
-Interpreter::Interpreter(PrinceEngine *vm, Script *script, InterpreterFlags *flags) :
+Interpreter::Interpreter(PrinceEngine *vm, Script *script, InterpreterFlags *flags) :
_vm(vm), _script(script), _flags(flags),
_stacktop(0), _opcodeNF(false), _opcodeEnd(false),
_waitFlag(0), _result(true) {
@@ -479,8 +479,8 @@ uint32 Interpreter::step(uint32 opcodePC) {
if (_lastOpcode >= kNumOpcodes)
error(
- "Trying to execute unknown opcode @0x%04X: %02d",
- _currentInstruction,
+ "Trying to execute unknown opcode @0x%04X: %02d",
+ _currentInstruction,
_lastOpcode);
// Execute the current opcode
@@ -570,7 +570,7 @@ int32 Interpreter::readScriptFlagValue() {
return value;
}
-Flags::Id Interpreter::readScriptFlagId() {
+Flags::Id Interpreter::readScriptFlagId() {
return (Flags::Id)readScript16();
}
@@ -1689,7 +1689,7 @@ void Interpreter::O_POPSTRING() {
void Interpreter::O_SETFGCODE() {
int32 offset = readScript32();
- _fgOpcodePC = _currentInstruction + offset - 4;
+ _fgOpcodePC = _currentInstruction + offset - 4;
debugInterpreter("O_SETFGCODE next %08x, offset %08x", _fgOpcodePC, offset);
}