SCI: Add setter/getter methods to reg_t's

No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
This commit is contained in:
Filippos Karapetis 2012-06-18 05:21:59 +03:00
parent 3c04d333f2
commit 2b50824133
36 changed files with 457 additions and 425 deletions

View file

@ -157,7 +157,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
s->r_acc = NULL_REG;
}
if ((s->r_acc.offset) && (g_sci->_debugState.stopOnEvent)) {
if ((s->r_acc.getOffset()) && (g_sci->_debugState.stopOnEvent)) {
g_sci->_debugState.stopOnEvent = false;
// A SCI event occurred, and we have been asked to stop, so open the debug console
@ -248,7 +248,7 @@ reg_t kGlobalToLocal(EngineState *s, int argc, reg_t *argv) {
reg_t planeObject = argc > 1 ? argv[1] : NULL_REG; // SCI32
SegManager *segMan = s->_segMan;
if (obj.segment) {
if (obj.getSegment()) {
int16 x = readSelectorValue(segMan, obj, SELECTOR(x));
int16 y = readSelectorValue(segMan, obj, SELECTOR(y));
@ -267,7 +267,7 @@ reg_t kLocalToGlobal(EngineState *s, int argc, reg_t *argv) {
reg_t planeObject = argc > 1 ? argv[1] : NULL_REG; // SCI32
SegManager *segMan = s->_segMan;
if (obj.segment) {
if (obj.getSegment()) {
int16 x = readSelectorValue(segMan, obj, SELECTOR(x));
int16 y = readSelectorValue(segMan, obj, SELECTOR(y));