aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-06-04 20:50:51 +0000
committerMax Horn2009-06-04 20:50:51 +0000
commit3091de6735aecac10cd18c7807bf74c7037cef91 (patch)
treeb43036c8727be92c45a9f88aa132b8c1671c6552
parent3da455420a122a53b22329ed59297ba0428c1497 (diff)
downloadscummvm-rg350-3091de6735aecac10cd18c7807bf74c7037cef91.tar.gz
scummvm-rg350-3091de6735aecac10cd18c7807bf74c7037cef91.tar.bz2
scummvm-rg350-3091de6735aecac10cd18c7807bf74c7037cef91.zip
SCI: Added FIXME comment to not_register()
svn-id: r41172
-rw-r--r--engines/sci/engine/state.cpp3
-rw-r--r--engines/sci/engine/state.h10
2 files changed, 11 insertions, 2 deletions
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index 5936c4fedb..2677ff4131 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -126,5 +126,8 @@ EngineState::EngineState() : _dirseeker(this) {
EngineState::~EngineState() {
}
+uint16 EngineState::currentRoomNumber() const {
+ return KP_UINT(script_000->locals_block->_locals[13]);
+}
} // End of namespace Sci
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 0623aa35fd..561db322ef 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -48,7 +48,6 @@ namespace Common {
namespace Sci {
class Menubar;
-struct kfunct_sig_pair_t; // from kernel.h
struct GfxState;
struct GfxPort;
@@ -208,7 +207,7 @@ public:
reg_t parser_event; /**< The event passed to Parse() and later used by Said() */
Script *script_000; /**< script 000, e.g. for globals */
- uint16 currentRoomNumber() const { return KP_UINT(script_000->locals_block->_locals[13]); }
+ uint16 currentRoomNumber() const;
/* Debugger data: */
Breakpoint *bp_list; /**< List of breakpoints */
@@ -250,6 +249,13 @@ public:
*/
PaletteEntry get_pic_color(EngineState *s, int color);
+// FIXME: Document this strange function.
+// It seems to negate the given register but only if the "cantBeHere" exists.
+// My guess: Since some SCI versions have cantBeHere and some have canBeHere,
+// this function allows unifying the code, making it look identical for both
+// kinds of SCI games. That's fine, but the name not_register is rather
+// misleading. A different name (and a different place for declaring this)
+// would be highly welcome.
static inline reg_t not_register(EngineState *s, reg_t r) {
if (s->_kernel->_selectorMap.cantBeHere != -1)
return make_reg(0, !r.offset);