aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kernel.h
diff options
context:
space:
mode:
authorFilippos Karapetis2010-05-18 12:16:48 +0000
committerFilippos Karapetis2010-05-18 12:16:48 +0000
commit46af5a5162db4c2b5c238f02465ee226c04e834f (patch)
tree30a4919d95dff23137bb0f626ec2d24a271b36d1 /engines/sci/engine/kernel.h
parent75f4791a4a97889cd01663e9cc882682e58b6177 (diff)
downloadscummvm-rg350-46af5a5162db4c2b5c238f02465ee226c04e834f.tar.gz
scummvm-rg350-46af5a5162db4c2b5c238f02465ee226c04e834f.tar.bz2
scummvm-rg350-46af5a5162db4c2b5c238f02465ee226c04e834f.zip
- Moved kernel_lookup_text inside the Kernel class
- Added a pointer to the segment manager from within the Kernel class, thus simplifying the calls to it svn-id: r49076
Diffstat (limited to 'engines/sci/engine/kernel.h')
-rw-r--r--engines/sci/engine/kernel.h38
1 files changed, 18 insertions, 20 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index cbfd575e18..7717743e19 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -146,7 +146,7 @@ public:
/**
* Initializes the SCI kernel
*/
- Kernel(ResourceManager *resMan);
+ Kernel(ResourceManager *resMan, SegManager *segMan);
~Kernel();
uint getSelectorNamesSize() const;
@@ -193,17 +193,30 @@ public:
* @param argv argument list
* @return true if the signature was matched, false otherwise
*/
- bool signatureMatch(SegManager *segMan, const char *sig, int argc, const reg_t *argv);
+ bool signatureMatch(const char *sig, int argc, const reg_t *argv);
/**
* Determines the type of the object indicated by reg.
- * @param segMan the Segment manager
* @param reg register to check
* @return one of KSIG_* below KSIG_NULL.
* KSIG_INVALID set if the type of reg can be determined, but is invalid.
* 0 on error.
*/
- int findRegType(SegManager *segMan, reg_t reg);
+ int findRegType(reg_t reg);
+
+ /******************** Text functionality ********************/
+ /**
+ * Looks up text referenced by scripts
+ * SCI uses two values to reference to text: An address, and an index. The address
+ * determines whether the text should be read from a resource file, or from the heap,
+ * while the index either refers to the number of the string in the specified source,
+ * or to a relative position inside the text.
+ *
+ * @param address The address to look up
+ * @param index The relative index
+ * @return The referenced text, or empty string on error.
+ */
+ Common::String lookupText(reg_t address, int index);
private:
/**
@@ -245,6 +258,7 @@ private:
void mapFunctions();
ResourceManager *_resMan;
+ SegManager *_segMan;
uint32 features;
// Kernel-related lists
@@ -252,22 +266,6 @@ private:
Common::StringArray _kernelNames;
};
-/******************** Text functionality ********************/
-/**
- * Looks up text referenced by scripts
- * SCI uses two values to reference to text: An address, and an index. The address
- * determines whether the text should be read from a resource file, or from the heap,
- * while the index either refers to the number of the string in the specified source,
- * or to a relative position inside the text.
- *
- * @param s The current state
- * @param address The address to look up
- * @param index The relative index
- * @return The referenced text, or empty string on error.
- */
-Common::String kernel_lookup_text(EngineState *s, reg_t address, int index);
-
-
#ifdef USE_OLD_MUSIC_FUNCTIONS
/******************** Misc functions ********************/