[Scummvm-cvs-logs] SF.net SVN: scummvm:[41172] scummvm/trunk/engines/sci/engine
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Thu Jun 4 22:50:51 CEST 2009
Revision: 41172
http://scummvm.svn.sourceforge.net/scummvm/?rev=41172&view=rev
Author: fingolfin
Date: 2009-06-04 20:50:51 +0000 (Thu, 04 Jun 2009)
Log Message:
-----------
SCI: Added FIXME comment to not_register()
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/state.cpp
scummvm/trunk/engines/sci/engine/state.h
Modified: scummvm/trunk/engines/sci/engine/state.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/state.cpp 2009-06-04 16:18:35 UTC (rev 41171)
+++ scummvm/trunk/engines/sci/engine/state.cpp 2009-06-04 20:50:51 UTC (rev 41172)
@@ -126,5 +126,8 @@
EngineState::~EngineState() {
}
+uint16 EngineState::currentRoomNumber() const {
+ return KP_UINT(script_000->locals_block->_locals[13]);
+}
} // End of namespace Sci
Modified: scummvm/trunk/engines/sci/engine/state.h
===================================================================
--- scummvm/trunk/engines/sci/engine/state.h 2009-06-04 16:18:35 UTC (rev 41171)
+++ scummvm/trunk/engines/sci/engine/state.h 2009-06-04 20:50:51 UTC (rev 41172)
@@ -48,7 +48,6 @@
namespace Sci {
class Menubar;
-struct kfunct_sig_pair_t; // from kernel.h
struct GfxState;
struct GfxPort;
@@ -208,7 +207,7 @@
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 @@
*/
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list