aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorMax Horn2009-09-06 13:01:26 +0000
committerMax Horn2009-09-06 13:01:26 +0000
commiteb8cf07db2f134121120a9feed84f6ad98931704 (patch)
tree5cc004cb9f2dee759feb435d3946f8562f27569c /engines/sci/engine
parentfdaa3d423c3789a05f100e9302dce3fc69034e76 (diff)
downloadscummvm-rg350-eb8cf07db2f134121120a9feed84f6ad98931704.tar.gz
scummvm-rg350-eb8cf07db2f134121120a9feed84f6ad98931704.tar.bz2
scummvm-rg350-eb8cf07db2f134121120a9feed84f6ad98931704.zip
SCI: Rename SegManager::exports_wide to _exportsAreWide and changed it to a bool, and rename setExportWidth() to setExportAreWide()
svn-id: r43988
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/game.cpp4
-rw-r--r--engines/sci/engine/savegame.cpp2
-rw-r--r--engines/sci/engine/seg_manager.cpp8
-rw-r--r--engines/sci/engine/seg_manager.h6
4 files changed, 10 insertions, 10 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index 5cc5d5a25c..e6cc4dd42b 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -359,9 +359,9 @@ int script_init_engine(EngineState *s) {
s->have_bp = 0;
if (s->detectLofsType() == SCI_VERSION_1_MIDDLE)
- s->segMan->setExportWidth(1);
+ s->segMan->setExportAreWide(true);
else
- s->segMan->setExportWidth(0);
+ s->segMan->setExportAreWide(false);
debug(2, "Engine initialized");
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 7206bf50fa..a35916ddf5 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -190,7 +190,7 @@ void Menubar::saveLoadWithSerializer(Common::Serializer &s) {
void SegManager::saveLoadWithSerializer(Common::Serializer &s) {
s.skip(4, VER(9), VER(9)); // Obsolete: Used to be reserved_id
- s.syncAsSint32LE(exports_wide);
+ s.syncAsSint32LE(_exportsAreWide);
s.skip(4, VER(9), VER(9)); // Obsolete: Used to be gc_mark_bits
if (s.isLoading()) {
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 25c74b9be0..0d226e1d49 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -58,7 +58,7 @@ SegManager::SegManager(ResourceManager *resMan) {
Nodes_seg_id = 0;
Hunks_seg_id = 0;
- exports_wide = 0;
+ _exportsAreWide = false;
_resMan = resMan;
int result = 0;
@@ -278,8 +278,8 @@ bool SegManager::scriptIsLoaded(SegmentId seg) {
return getScriptIfLoaded(seg) != 0;
}
-void SegManager::setExportWidth(int flag) {
- exports_wide = flag;
+void SegManager::setExportAreWide(bool flag) {
+ _exportsAreWide = flag;
}
int SegManager::relocateBlock(Common::Array<reg_t> &block, int block_location, SegmentId segment, int location) {
@@ -732,7 +732,7 @@ uint16 SegManager::validateExportFunc(int pubfunct, SegmentId seg) {
return 0;
}
- if (exports_wide)
+ if (_exportsAreWide)
pubfunct *= 2;
uint16 offset = READ_LE_UINT16((byte *)(scr->export_table + pubfunct));
VERIFY(offset < scr->buf_size, "invalid export function pointer");
diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h
index 1dbc6313a5..7a84634f33 100644
--- a/engines/sci/engine/seg_manager.h
+++ b/engines/sci/engine/seg_manager.h
@@ -188,9 +188,9 @@ public:
/**
* Tells the segment manager whether exports are wide (32-bit) or not.
- * @param flag 1 if exports are wide, 0 otherwise
+ * @param flag true if exports are wide, false otherwise
*/
- void setExportWidth(int flag);
+ void setExportAreWide(bool flag);
/**
* Processes a relocation block witin a script
@@ -360,7 +360,7 @@ private:
public: // TODO: make private
Common::Array<MemObject *> _heap;
- int exports_wide;
+ bool _exportsAreWide;
Common::Array<Class> _classtable; /**< Table of all classes */
ResourceManager *_resMan;