diff options
author | Filippos Karapetis | 2018-08-25 12:21:36 +0300 |
---|---|---|
committer | Filippos Karapetis | 2018-08-25 12:39:12 +0300 |
commit | 941869c466354356c7ebf76e5c6fe37fe06785cf (patch) | |
tree | f08ad9e3db85b01e5e4583caa476aab6d69bf6ab /engines/sci/console.cpp | |
parent | 66cbaeefe20967348bb5306272f937dba0281021 (diff) | |
download | scummvm-rg350-941869c466354356c7ebf76e5c6fe37fe06785cf.tar.gz scummvm-rg350-941869c466354356c7ebf76e5c6fe37fe06785cf.tar.bz2 scummvm-rg350-941869c466354356c7ebf76e5c6fe37fe06785cf.zip |
SCI32: Remove reg32_t and use reg_t in all cases
reg32_t was a transitive solution, before reg_t's were
adapted to use 32-bit addresses internally, and before
support for SCI3 was added. It was introduced as another
way to handle large script offsets in SCI3, and was only
used for the program counter (PC). It's no longer
needed, as we now support SCI3 script offsets using
reg_t's, so we can use make_reg32 in all cases where
we need to access offsets over 64KB
Diffstat (limited to 'engines/sci/console.cpp')
-rw-r--r-- | engines/sci/console.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 9e7b017276..371ed7fc71 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -4576,14 +4576,10 @@ static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeV relativeOffset = true; if (!scumm_strnicmp(str + 1, "PC", 2)) { - reg32_t pc = s->_executionStack.back().addr.pc; - dest->setSegment(pc.getSegment()); - dest->setOffset(pc.getOffset()); + *dest = s->_executionStack.back().addr.pc; offsetStr = str + 3; } else if (!scumm_strnicmp(str + 1, "P", 1)) { - reg32_t pc = s->_executionStack.back().addr.pc; - dest->setSegment(pc.getSegment()); - dest->setOffset(pc.getOffset()); + *dest = s->_executionStack.back().addr.pc;; offsetStr = str + 2; } else if (!scumm_strnicmp(str + 1, "PREV", 4)) { *dest = s->r_prev; |