aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-25 01:39:44 +0000
committerJohannes Schickel2010-01-25 01:39:44 +0000
commitaed02365ec81e77b3c8aa4f4ecd9a9d3893326f2 (patch)
tree95f119e687a666f65aad5041910c43bdfd4f2929 /engines/sci/engine
parentec14cd6e6add76ce4f719edd7ce508d67ebd9f14 (diff)
downloadscummvm-rg350-aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2.tar.gz
scummvm-rg350-aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2.tar.bz2
scummvm-rg350-aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2.zip
Strip trailing spaces/tabs.
svn-id: r47541
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kernel.cpp12
-rw-r--r--engines/sci/engine/kernel.h10
-rw-r--r--engines/sci/engine/kernel32.cpp22
-rw-r--r--engines/sci/engine/kevent.cpp2
-rw-r--r--engines/sci/engine/kfile.cpp4
-rw-r--r--engines/sci/engine/kmisc.cpp4
-rw-r--r--engines/sci/engine/kpathing.cpp2
-rw-r--r--engines/sci/engine/kscripts.cpp2
-rw-r--r--engines/sci/engine/ksound.cpp6
-rw-r--r--engines/sci/engine/kstring.cpp4
-rw-r--r--engines/sci/engine/script.cpp2
-rw-r--r--engines/sci/engine/seg_manager.cpp2
-rw-r--r--engines/sci/engine/seg_manager.h18
-rw-r--r--engines/sci/engine/segment.cpp2
-rw-r--r--engines/sci/engine/segment.h22
-rw-r--r--engines/sci/engine/selector.cpp6
-rw-r--r--engines/sci/engine/state.cpp6
-rw-r--r--engines/sci/engine/state.h4
-rw-r--r--engines/sci/engine/static_selectors.cpp4
-rw-r--r--engines/sci/engine/vm.cpp14
-rw-r--r--engines/sci/engine/vm.h38
21 files changed, 93 insertions, 93 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index d524901952..0a543eec56 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -332,7 +332,7 @@ SciKernelFunction kfunct_mappers[] = {
DEFUN("TextColors", kTextColors, ".*"),
DEFUN("TextFonts", kTextFonts, ".*"),
DEFUN("Portrait", kPortrait, ".*"),
-
+
#ifdef ENABLE_SCI32
// SCI2 Kernel Functions
DEFUN("IsHiRes", kIsHiRes, ""),
@@ -436,7 +436,7 @@ void Kernel::loadSelectorNames() {
// Check if we have a table for this game
// Some demos do not have a selector table
Common::StringList staticSelectorTable = checkStaticSelectorNames();
-
+
if (staticSelectorTable.empty())
error("Kernel: Could not retrieve selector names");
else
@@ -447,7 +447,7 @@ void Kernel::loadSelectorNames() {
if (oldScriptHeader)
_selectorNames.push_back(staticSelectorTable[i]);
}
-
+
return;
}
@@ -627,7 +627,7 @@ void Kernel::mapFunctions() {
}
} // for all functions requesting to be mapped
- debugC(2, kDebugLevelVM, "Handled %d/%d kernel functions, mapping %d and ignoring %d.\n",
+ debugC(2, kDebugLevelVM, "Handled %d/%d kernel functions, mapping %d and ignoring %d.\n",
mapped + ignored, _kernelNames.size(), mapped, ignored);
return;
@@ -648,7 +648,7 @@ int determine_reg_type(SegManager *segMan, reg_t reg) {
switch (mobj->getType()) {
case SEG_TYPE_SCRIPT:
- if (reg.offset <= (*(Script *)mobj)._bufSize &&
+ if (reg.offset <= (*(Script *)mobj)._bufSize &&
reg.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET &&
RAW_IS_OBJECT((*(Script *)mobj)._buf + reg.offset)) {
return ((Script *)mobj)->getObject(reg.offset) ? KSIG_OBJECT : KSIG_REF;
@@ -779,7 +779,7 @@ void Kernel::setDefaultKernelNames(Common::String gameId) {
bool Kernel::loadKernelNames(Common::String gameId) {
_kernelNames.clear();
-
+
#ifdef ENABLE_SCI32
if (getSciVersion() >= SCI_VERSION_2_1)
setKernelNamesSci21(gameId);
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 9ba33aff97..aa71dfcdc7 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -102,13 +102,13 @@ private:
* Sets the default kernel function names, based on the SCI version used
*/
void setDefaultKernelNames(Common::String gameId);
-
+
#ifdef ENABLE_SCI32
/**
* Sets the default kernel function names to the SCI2 kernel functions
*/
void setKernelNamesSci2();
-
+
/**
* Sets the default kernel function names to the SCI2.1 kernel functions
*/
@@ -119,7 +119,7 @@ private:
* Loads the kernel selector names.
*/
void loadSelectorNames();
-
+
/**
* Check for any hardcoded selector table we might have that can be used
* if a game is missing the selector names.
@@ -229,7 +229,7 @@ int _find_view_priority(EngineState *s, int y);
* Determines the now-seen rectangle of a view object
* @param s The state to use
* @param object The object to check
- * @param clip Flag to determine wheter priority band clipping
+ * @param clip Flag to determine wheter priority band clipping
* should be performed
* @return The absolute rectangle describing the now-seen area.
*/
@@ -240,7 +240,7 @@ extern Common::Rect get_nsrect(EngineState *s, reg_t object, byte clip);
/******************** Misc functions ********************/
/**
- * Get all sound events, apply their changes to the heap
+ * Get all sound events, apply their changes to the heap
*/
void process_sound_events(EngineState *s);
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp
index e3cc938b1b..5bbf0db814 100644
--- a/engines/sci/engine/kernel32.cpp
+++ b/engines/sci/engine/kernel32.cpp
@@ -77,7 +77,7 @@ static const char *sci2_default_knames[] = {
/*0x27*/ "TextColors",
/*0x28*/ "TextFonts",
/*0x29*/ "Dummy",
- /*0x2a*/ "SetQuitStr",
+ /*0x2a*/ "SetQuitStr",
/*0x2b*/ "EditText",
/*0x2c*/ "InputText",
/*0x2d*/ "CreateTextBitmap",
@@ -174,7 +174,7 @@ static const char *sci2_default_knames[] = {
/*0x88*/ "MarkMemory",
/*0x89*/ "TextWidth",
/*0x8a*/ "PointSize",
-
+
// GK2 Demo only kernel functions
/*0x8b*/ "AddLine",
/*0x8c*/ "DeleteLine",
@@ -491,16 +491,16 @@ reg_t kArray(EngineState *s, int argc, reg_t *argv) {
case 9: // Getdata
if (!s->_segMan->isHeapObject(argv[1]))
return argv[1];
-
+
return GET_SEL32(s->_segMan, argv[1], data);
default:
error("Unknown kArray subop %d", argv[0].toUint16());
}
-
+
return NULL_REG;
}
-reg_t kString(EngineState *s, int argc, reg_t *argv) {
+reg_t kString(EngineState *s, int argc, reg_t *argv) {
switch (argv[0].toUint16()) {
case 0: { // New
reg_t stringHandle;
@@ -580,7 +580,7 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) {
case 7: { // Cmp
Common::String string1 = argv[1].isNull() ? "" : s->_segMan->getString(argv[1]);
Common::String string2 = argv[2].isNull() ? "" : s->_segMan->getString(argv[2]);
-
+
if (argc == 4) // Strncmp
return make_reg(0, strncmp(string1.c_str(), string2.c_str(), argv[3].toUint16()));
else // Strcmp
@@ -591,10 +591,10 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) {
reg_t stringHandle;
SciString *dupString = s->_segMan->allocateString(&stringHandle);
dupString->setSize(string.size() + 1);
-
+
for (uint32 i = 0; i < string.size(); i++)
dupString->setValue(i, string.c_str()[i]);
-
+
dupString->setValue(dupString->getSize() - 1, 0);
return stringHandle;
@@ -602,7 +602,7 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) {
case 9: // Getdata
if (!s->_segMan->isHeapObject(argv[1]))
return argv[1];
-
+
return GET_SEL32(s->_segMan, argv[1], data);
case 10: // Stringlen
return make_reg(0, s->_segMan->strlen(argv[1]));
@@ -655,7 +655,7 @@ reg_t kDeleteScreenItem(EngineState *s, int argc, reg_t *argv) {
reg_t viewObj = argv[0];
s->_gui->deleteScreenItem(viewObj);
-
+
/*
reg_t viewObj = argv[0];
uint16 viewId = GET_SEL32V(s->_segMan, viewObj, view);
@@ -706,7 +706,7 @@ reg_t kRepaintPlane(EngineState *s, int argc, reg_t *argv) {
}
reg_t kFrameOut(EngineState *s, int argc, reg_t *argv) {
- // This kernel call likely seems to be doing the screen updates,
+ // This kernel call likely seems to be doing the screen updates,
// as its called right after a view is updated
// TODO
diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp
index 5bc0f1105f..3bf30681d4 100644
--- a/engines/sci/engine/kevent.cpp
+++ b/engines/sci/engine/kevent.cpp
@@ -88,7 +88,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
// track left buttton clicks, if requested
if (curEvent.type == SCI_EVENT_MOUSE_PRESS && curEvent.data == 1 && g_debug_track_mouse_clicks) {
- ((SciEngine *)g_engine)->getSciDebugger()->DebugPrintf("Mouse clicked at %d, %d\n",
+ ((SciEngine *)g_engine)->getSciDebugger()->DebugPrintf("Mouse clicked at %d, %d\n",
mousePos.x, mousePos.y);
}
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 21674cc94f..2cd6a75575 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -409,7 +409,7 @@ reg_t kDeviceInfo(EngineState *s, int argc, reg_t *argv) {
reg_t kGetSaveDir(EngineState *s, int argc, reg_t *argv) {
#ifdef ENABLE_SCI32
// TODO: SCI32 uses a parameter here.
- if (argc > 0)
+ if (argc > 0)
warning("kGetSaveDir called with %d parameter(s): %04x:%04x", argc, PRINT_REG(argv[0]));
#endif
@@ -891,7 +891,7 @@ reg_t kFileIO(EngineState *s, int argc, reg_t *argv) {
// We just return -1 for all versions.
if (g_engine->getSaveFileManager()->renameSavefile(oldName, newName))
return NULL_REG;
- else
+ else
return SIGNAL_REG;
}
#ifdef ENABLE_SCI32
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 7cc0d88ab6..b982628bc0 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -71,7 +71,7 @@ reg_t kGameIsRestarting(EngineState *s, int argc, reg_t *argv) {
// s->_throttleCounter++;
// return s->r_acc;
//}
-
+
uint32 curTime = g_system->getMillis();
uint32 duration = curTime - s->_throttleLastTime;
uint32 neededSleep = 30;
@@ -268,7 +268,7 @@ reg_t kPlatform(EngineState *s, int argc, reg_t *argv) {
if (argc == 0 && getSciVersion() < SCI_VERSION_2) {
// This is called in KQ5CD with no parameters, where it seems to do some graphics
// driver check. This kernel function didn't have subfunctions then. If 0 is
- // returned, the game functions normally, otherwise all the animations show up
+ // returned, the game functions normally, otherwise all the animations show up
// like a slideshow (e.g. in the intro). So we return 0. However, the behavior
// changed for kPlatform with no parameters in SCI32.
return NULL_REG;
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index d9758e259e..cfe3cb38a3 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -1806,7 +1806,7 @@ reg_t kAvoidPath(EngineState *s, int argc, reg_t *argv) {
return retval;
}
case 6 :
- case 7 :
+ case 7 :
case 8 : {
Common::Point end = Common::Point(argv[2].toSint16(), argv[3].toSint16());
reg_t poly_list, output;
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index 16ef002e66..18a677c67f 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -167,7 +167,7 @@ reg_t kDisposeClone(EngineState *s, int argc, reg_t *argv) {
#endif
victim_obj->markAsFreed();
-
+
return s->r_acc;
}
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 3881e234ba..e4efc4d1f9 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -55,10 +55,10 @@ reg_t kDoCdAudio(EngineState *s, int argc, reg_t *argv) {
}
case kSciAudioStop:
s->_audio->audioCdStop();
-
+
if (getSciVersion() == SCI_VERSION_1_1)
return make_reg(0, 1);
-
+
break;
case kSciAudioPause:
warning("Can't pause CD Audio");
@@ -178,7 +178,7 @@ reg_t kDoSync(EngineState *s, int argc, reg_t *argv) {
s->_audio->setSoundSync(id, argv[1], segMan);
break;
}
- case kSciAudioSyncNext:
+ case kSciAudioSyncNext:
s->_audio->doSoundSync(argv[1], segMan);
break;
case kSciAudioSyncStop:
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index 5e124e84e0..ee1e39047f 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -389,7 +389,7 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) {
*target = 0; /* Terminate string */
- s->_segMan->strcpy(dest, targetbuf);
+ s->_segMan->strcpy(dest, targetbuf);
return dest; /* Return target addr */
}
@@ -448,7 +448,7 @@ reg_t kGetMessage(EngineState *s, int argc, reg_t *argv) {
reg_t kMessage(EngineState *s, int argc, reg_t *argv) {
uint func = argv[0].toUint16();
-
+
#ifdef ENABLE_SCI32
if (getSciVersion() >= SCI_VERSION_2) {
// In complete weirdness, SCI32 bumps up subops 3-8 to 4-9 and stubs off subop 3.
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index 70b638a43f..6b411c687f 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -120,7 +120,7 @@ void script_adjust_opcode_formats(EngineState *s) {
// a vocab.997 resource, by dumping the selector table from other similar versions or games
#define FIND_SELECTOR(_slc_) _selectorCache._slc_ = findSelector(#_slc_); \
printf("\t{ \"%s\", %d },\n", #_slc_, _selectorCache._slc_)
-
+
#define FIND_SELECTOR2(_slc_, _slcstr_) _selectorCache._slc_ = findSelector(_slcstr_); \
printf("\t{ \"%s\", %d },\n", _slcstr_, _selectorCache._slc_)
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index d68853a593..f995991aa2 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -53,7 +53,7 @@ SegManager::SegManager(ResourceManager *resMan) {
Lists_seg_id = 0;
Nodes_seg_id = 0;
Hunks_seg_id = 0;
-
+
#ifdef ENABLE_SCI32
Arrays_seg_id = 0;
String_seg_id = 0;
diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h
index 4d385e0d32..12fb323646 100644
--- a/engines/sci/engine/seg_manager.h
+++ b/engines/sci/engine/seg_manager.h
@@ -87,12 +87,12 @@ public:
void reconstructScripts(EngineState *s);
/**
- * Validate whether the specified public function is exported by
+ * Validate whether the specified public function is exported by
* the script in the specified segment.
* @param pubfunct Index of the function to validate
- * @param seg Segment ID of the script the check is to
+ * @param seg Segment ID of the script the check is to
* be performed for
- * @return NULL if the public function is invalid, its
+ * @return NULL if the public function is invalid, its
* offset into the script's segment otherwise
*/
uint16 validateExportFunc(int pubfunct, SegmentId seg);
@@ -124,7 +124,7 @@ public:
/**
* Return a pointer to the specified script.
- * If the id is invalid, does not refer to a script or the script is
+ * If the id is invalid, does not refer to a script or the script is
* not loaded, this will invoke error().
* @param seg ID of the script segment to check for
* @return A pointer to the Script object
@@ -134,7 +134,7 @@ public:
/**
* Return a pointer to the specified script.
- * If the id is invalid, does not refer to a script, or
+ * If the id is invalid, does not refer to a script, or
* the script is not loaded, this will return NULL
* @param seg ID of the script segment to check for
* @return A pointer to the Script object, or NULL
@@ -200,7 +200,7 @@ public:
* See also sys_string_acquire();
* @param[in] segid Segment ID of the stack
* @returns The physical stack
- */
+ */
SystemStrings *allocateSysStrings(SegmentId *segid);
@@ -242,7 +242,7 @@ public:
/**
* Allocate a fresh chunk of the hunk
* @param[in] size Number of bytes to allocate for the hunk entry
- * @param[in] hunk_type A descriptive string for the hunk entry, for
+ * @param[in] hunk_type A descriptive string for the hunk entry, for
* debugging purposes
* @param[out] addr The offset of the freshly allocated hunk entry
* @return Reference to the memory allocated for the hunk
@@ -264,7 +264,7 @@ public:
* @param[in] size Number of bytes to allocate
* @param[in] description A descriptive string for debugging purposes
* @param[out] addr The offset of the freshly allocated X
- * @return Raw pointer into the allocated dynamic
+ * @return Raw pointer into the allocated dynamic
* memory
*/
byte *allocDynmem(int size, const char *description, reg_t *addr);
@@ -440,7 +440,7 @@ public:
public: // TODO: make private
Common::Array<SegmentObj *> _heap;
Common::Array<Class> _classtable; /**< Table of all classes */
-
+
#ifdef ENABLE_SCI32
SciArray<reg_t> *allocateArray(reg_t *addr);
SciArray<reg_t> *lookupArray(reg_t addr);
diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp
index 6df4e1bac7..a76644c718 100644
--- a/engines/sci/engine/segment.cpp
+++ b/engines/sci/engine/segment.cpp
@@ -507,7 +507,7 @@ void SciString::fromString(Common::String string) {
if (string.size() > _size)
setSize(string.size());
-
+
for (uint32 i = 0; i < string.size(); i++)
_data[i] = string[i];
}
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h
index a1967f6bb8..4d9d07c302 100644
--- a/engines/sci/engine/segment.h
+++ b/engines/sci/engine/segment.h
@@ -63,7 +63,7 @@ enum SegmentType {
SEG_TYPE_HUNK = 8,
SEG_TYPE_DYNMEM = 9,
SEG_TYPE_STRING_FRAG = 10, // obsolete, we keep it to be able to load old saves
-
+
#ifdef ENABLE_SCI32
SEG_TYPE_ARRAY = 11,
SEG_TYPE_STRING = 12,
@@ -681,7 +681,7 @@ public:
_size = 0;
_actualSize = 0;
}
-
+
SciArray(const SciArray<T> &array) {
_type = array._type;
_size = array._size;
@@ -689,8 +689,8 @@ public:
_data = new T[_actualSize];
assert(_data);
memcpy(_data, array._data, _size * sizeof(T));
- }
-
+ }
+
SciArray<T>& operator=(const SciArray<T> &array) {
if (this == &array)
return *this;
@@ -709,7 +709,7 @@ public:
virtual ~SciArray() {
destroy();
}
-
+
virtual void destroy() {
delete[] _data;
_data = NULL;
@@ -723,7 +723,7 @@ public:
_type = type;
}
-
+
void setSize(uint32 size) {
if (_type < 0)
error("SciArray::setSize(): No type set");
@@ -757,21 +757,21 @@ public:
_data = newArray;
_size = _actualSize = size;
}
-
+
T getValue(uint16 index) {
if (index >= _size)
error("SciArray::getValue(): %d is out of bounds (%d)", index, _size);
return _data[index];
}
-
+
void setValue(uint16 index, T value) {
if (index >= _size)
error("SciArray::setValue(): %d is out of bounds (%d)", index, _size);
_data[index] = value;
}
-
+
byte getType() { return _type; }
uint32 getSize() { return _size; }
T *getRawData() { return _data; }
@@ -786,10 +786,10 @@ protected:
class SciString : public SciArray<char> {
public:
SciString() : SciArray<char>() { setType(3); }
-
+
// We overload destroy to ensure the string type is 3 after destroying
void destroy() { _type = 3; }
-
+
Common::String toString();
void fromString(Common::String string);
};
diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp
index 78d1d3eeb1..5893d3c295 100644
--- a/engines/sci/engine/selector.cpp
+++ b/engines/sci/engine/selector.cpp
@@ -53,7 +53,7 @@ void write_selector(SegManager *segMan, reg_t object, Selector selector_id, reg_
*address.getPointer(segMan) = value;
}
-int invoke_selector(EngineState *s, reg_t object, int selector_id, SelectorInvocation noinvalid,
+int invoke_selector(EngineState *s, reg_t object, int selector_id, SelectorInvocation noinvalid,
StackPtr k_argp, int k_argc, int argc, ...) {
va_list argp;
int i;
@@ -75,7 +75,7 @@ int invoke_selector(EngineState *s, reg_t object, int selector_id, SelectorInvoc
return 1;
}
if (slc_type == kSelectorVariable) {
- warning("Attempting to invoke variable selector %s of object %04x:%04x",
+ warning("Attempting to invoke variable selector %s of object %04x:%04x",
s->_kernel->getSelectorName(selector_id).c_str(), PRINT_REG(object));
return 0;
}
@@ -136,7 +136,7 @@ SelectorType lookup_selector(SegManager *segMan, reg_t obj_location, Selector se
selector_id &= ~1;
if (!obj) {
- error("lookup_selector(): Attempt to send to non-object or invalid script. Address was %04x:%04x",
+ error("lookup_selector(): Attempt to send to non-object or invalid script. Address was %04x:%04x",
PRINT_REG(obj_location));
}
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index 2e85bd3356..d21109c57d 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -78,7 +78,7 @@ EngineState::EngineState(ResourceManager *res, Kernel *kernel, Vocabulary *voc,
_lofsType = SCI_VERSION_NONE;
_gfxFunctionsType = SCI_VERSION_NONE;
_moveCountType = kMoveCountUninitialized;
-
+
_usesCdTrack = Common::File::exists("cdaudio.map");
_soundCmd = 0;
@@ -221,7 +221,7 @@ bool EngineState::autoDetectFeature(FeatureDetection featureDetection, int metho
objName = "Rm";
objAddr = _segMan->findObjectByName(objName);
slc = _kernel->_selectorCache.overlay;
- break;
+ break;
case kDetectMoveCountType:
objName = "Motion";
objAddr = _segMan->findObjectByName(objName);
@@ -580,7 +580,7 @@ SciVersion EngineState::detectGfxFunctionsType() {
if (_kernel->_selectorCache.overlay == -1) {
// No overlay selector found, check if any method of the Rm object
// is calling kDrawPic, as the overlay selector might be missing in demos
-
+
Object *obj = _segMan->getObject(_segMan->findObjectByName("Rm"));
for (uint m = 0; m < obj->getMethodCount(); m++) {
found = autoDetectFeature(kDetectGfxFunctions, m);
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index c006c0e851..6bd6fed78f 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -205,7 +205,7 @@ public:
/**
* Autodetects the DoSound type
- * @return DoSound type, SCI_VERSION_0_EARLY / SCI_VERSION_0_LATE /
+ * @return DoSound type, SCI_VERSION_0_EARLY / SCI_VERSION_0_LATE /
* SCI_VERSION_1_EARLY / SCI_VERSION_1_LATE
*/
SciVersion detectDoSoundType();
@@ -244,7 +244,7 @@ public:
MoveCountType detectMoveCountType();
bool handleMoveCount() { return detectMoveCountType() == kIncrementMoveCount; }
-
+
bool usesCdTrack() { return _usesCdTrack; }
/* Debugger data: */
diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp
index 4a783a0fa3..d679b04572 100644
--- a/engines/sci/engine/static_selectors.cpp
+++ b/engines/sci/engine/static_selectors.cpp
@@ -29,7 +29,7 @@
#include "sci/engine/kernel.h"
namespace Sci {
-
+
struct SelectorRemap {
SciVersion minVersion;
SciVersion maxVersion;
@@ -113,5 +113,5 @@ Common::StringList Kernel::checkStaticSelectorNames() {
return names;
}
-
+
} // End of namespace Sci
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 0bddd34eb6..974109237c 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -68,7 +68,7 @@ static reg_t &validate_property(Object *obj, int index) {
}
if (index < 0 || (uint)index >= obj->getVarCount()) {
- debugC(2, kDebugLevelVM, "[VM] Invalid property #%d (out of [0..%d]) requested!\n",
+ debugC(2, kDebugLevelVM, "[VM] Invalid property #%d (out of [0..%d]) requested!\n",
index, obj->getVarCount());
return dummyReg;
}
@@ -80,7 +80,7 @@ static StackPtr validate_stack_addr(EngineState *s, StackPtr sp) {
if (sp >= s->stack_base && sp < s->stack_top)
return sp;
- error("[VM] Stack index %d out of valid range [%d..%d]",
+ error("[VM] Stack index %d out of valid range [%d..%d]",
(int)(sp - s->stack_base), 0, (int)(s->stack_top - s->stack_base - 1));
return 0;
}
@@ -111,7 +111,7 @@ static bool validate_variable(reg_t *r, reg_t *stack_base, int type, int max, in
if (index < 0 || index >= max) {
Common::String txt = Common::String::printf(
- "[VM] Attempt to use invalid %s variable %04x ",
+ "[VM] Attempt to use invalid %s variable %04x ",
names[type], index);
if (max == 0)
txt += "(variable type invalid)";
@@ -398,7 +398,7 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj, StackPt
call.type = EXEC_STACK_TYPE_VARSELECTOR; // Register as a varselector
sendCalls.push(call);
}
-
+
break;
case kSelectorMethod:
@@ -941,7 +941,7 @@ void run_vm(EngineState *s, int restoring) {
xs_new = add_exec_stack_entry(s, make_reg(scriptState.xs->addr.pc.segment,
scriptState.xs->addr.pc.offset + opparams[0]),
- scriptState.xs->sp, scriptState.xs->objp,
+ scriptState.xs->sp, scriptState.xs->objp,
(validate_arithmetic(*call_base)) + scriptState.restAdjust,
call_base, NULL_SELECTOR, scriptState.xs->objp,
s->_executionStack.size()-1, scriptState.xs->local_segment);
@@ -1012,9 +1012,9 @@ void run_vm(EngineState *s, int restoring) {
// Remove callk stack frame again
s->_executionStack.pop_back();
} else {
- Common::String warningMsg = "Dummy function " + kfun.orig_name +
+ Common::String warningMsg = "Dummy function " + kfun.orig_name +
Common::String::printf("[0x%x]", opparams[0]) +
- " invoked - ignoring. Params: " +
+ " invoked - ignoring. Params: " +
Common::String::printf("%d", argc) + " (";
for (int i = 0; i < argc; i++) {
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index 2928ff4daa..759d36d825 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -196,7 +196,7 @@ struct SelectorCache {
// Used for auto detection purposes
Selector overlay; ///< Used to determine if a game is using old gfx functions or not
Selector setCursor; ///< For cursor semantics autodetection
-
+
#ifdef ENABLE_SCI32
Selector data; // Used by Array()
Selector picture; // Used to hold the picture ID for SCI32 pictures
@@ -295,7 +295,7 @@ struct Breakpoint {
};
/**
- * Set this to 1 to abort script execution immediately. Aborting will
+ * Set this to 1 to abort script execution immediately. Aborting will
* leave the debug exec stack intact.
* Set it to 2 to force a replay afterwards.
*/
@@ -326,7 +326,7 @@ extern int script_step_counter;
* @param[in] argp Pointer to the first supplied argument
* @return A pointer to the new exec stack TOS entry
*/
-ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct,
+ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct,
StackPtr sp, reg_t calling_obj, uint16 argc, StackPtr argp);
@@ -336,13 +336,13 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct,
* @param[in] send_obj Heap address of the object to send to
* @param[in] work_obj Heap address of the object initiating the send
* @param[in] sp Stack pointer position
- * @param[in] framesize Size of the send as determined by the "send"
+ * @param[in] framesize Size of the send as determined by the "send"
* operation
- * @param[in] argp Pointer to the beginning of the heap block
- * containing the data to be sent. This area is a
- * succession of one or more sequences of
+ * @param[in] argp Pointer to the beginning of the heap block
+ * containing the data to be sent. This area is a
+ * succession of one or more sequences of
* [selector_number][argument_counter] and then
- * "argument_counter" word entries with the
+ * "argument_counter" word entries with the
* parameter values.
* @return A pointer to the new execution stack TOS entry
*/
@@ -363,17 +363,17 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj,
* @param[in] argp Heap pointer to the first parameter
* @param[in] selector The selector by which it was called or
* NULL_SELECTOR if n.a. For debugging.
- * @param[in] sendp Pointer to the object which the message was
+ * @param[in] sendp Pointer to the object which the message was
* sent to. Equal to objp for anything but super.
* @param[in] origin Number of the execution stack element this
- * entry was created by (usually the current TOS
+ * entry was created by (usually the current TOS
* number, except for multiple sends).
* @param[in] local_segment The segment to use for local variables,
* or SCI_XS_CALLEE_LOCALS to use obj's segment.
* @return A pointer to the new exec stack TOS entry
*/
-ExecStack *add_exec_stack_entry(EngineState *s, reg_t pc, StackPtr sp,
- reg_t objp, int argc, StackPtr argp, Selector selector,
+ExecStack *add_exec_stack_entry(EngineState *s, reg_t pc, StackPtr sp,
+ reg_t objp, int argc, StackPtr argp, Selector selector,
reg_t sendp, int origin, SegmentId local_segment);
@@ -390,12 +390,12 @@ ExecStack *add_exec_stack_entry(EngineState *s, reg_t pc, StackPtr sp,
* @return Pointer to the new exec-TOS element
*/
ExecStack *add_exec_stack_varselector(EngineState *s, reg_t objp, int argc,
- StackPtr argp, Selector selector, const ObjVarRef& address,
+ StackPtr argp, Selector selector, const ObjVarRef& address,
int origin);
/**
* This function executes SCI bytecode
- * It executes the code on s->heap[pc] until it hits a 'ret' operation
+ * It executes the code on s->heap[pc] until it hits a 'ret' operation
* while (stack_base == stack_pos). Requires s to be set up correctly.
* @param[in] s The state to use
* @param[in] restoring 1 if s has just been restored, 0 otherwise
@@ -430,7 +430,7 @@ int script_init_engine(EngineState *);
* fptr is written to iff it is non-NULL and the
* selector indicates a member function of that
* object.
- * @return kSelectorNone if the selector was not found in
+ * @return kSelectorNone if the selector was not found in
* the object or its superclasses.
* kSelectorVariable if the selector represents an
* object-relative variable.
@@ -442,9 +442,9 @@ SelectorType lookup_selector(SegManager *segMan, reg_t obj, Selector selectorid,
/**
* Makes sure that a script and its superclasses get loaded to the heap.
- * If the script already has been loaded, only the number of lockers is
+ * If the script already has been loaded, only the number of lockers is
* increased. All scripts containing superclasses of this script are loaded
- * recursively as well, unless 'recursive' is set to zero. The
+ * recursively as well, unless 'recursive' is set to zero. The
* complementary function is "script_uninstantiate()" below.
* @param[in] resMan The resource manager
* @param[in] segMan The segment manager
@@ -455,8 +455,8 @@ int script_instantiate(ResourceManager *resMan, SegManager *segMan, int script_n
/**
* Decreases the numer of lockers of a script and unloads it if that number
- * reaches zero.
- * This function will recursively unload scripts containing its
+ * reaches zero.
+ * This function will recursively unload scripts containing its
* superclasses, if those aren't locked by other scripts as well.
* @param[in] segMan The segment manager
* @param[in] version The SCI version to use