aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kstring.cpp
diff options
context:
space:
mode:
authorJordi Vilalta Prat2009-03-01 00:18:30 +0000
committerJordi Vilalta Prat2009-03-01 00:18:30 +0000
commit82872a7033946868045cd36b9c20916050654ede (patch)
treef4b4a59701b2a28f2a543e468156eb194e7bc65c /engines/sci/engine/kstring.cpp
parent7050c7b03f0f7b107df62488fd4dc2f37b704d3b (diff)
downloadscummvm-rg350-82872a7033946868045cd36b9c20916050654ede.tar.gz
scummvm-rg350-82872a7033946868045cd36b9c20916050654ede.tar.bz2
scummvm-rg350-82872a7033946868045cd36b9c20916050654ede.zip
SCI: Start converting MessageState into a class
svn-id: r38989
Diffstat (limited to 'engines/sci/engine/kstring.cpp')
-rw-r--r--engines/sci/engine/kstring.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index 76e9f90c7f..e9fd56c5c0 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -750,10 +750,11 @@ reg_t kMessage(EngineState *s, int funct_nr, int argc, reg_t *argv) {
tuple.cond = UKPV(4);
tuple.seq = UKPV(5);
- if (message_state_load_res(&state, module) && message_get_specific(&state, &tuple)) {
+ if (state.loadRes(module) && state.getSpecific(&tuple)) {
if (buffer)
- message_get_text(&state, buffer, 100);
- return make_reg(0, message_get_talker(&state)); /* Talker id */
+ state.getText(buffer, 100);
+ // Talker id
+ return make_reg(0, state.getTalker());
} else {
if (buffer) strcpy(buffer, DUMMY_MESSAGE);
return NULL_REG;
@@ -762,10 +763,11 @@ reg_t kMessage(EngineState *s, int funct_nr, int argc, reg_t *argv) {
case 1 : {
char *buffer = argc == 7 ? kernel_dereference_char_pointer(s, argv[6], 0) : NULL;
- if (message_get_next(&state)) {
+ if (state.getNext()) {
if (buffer)
- message_get_text(&state, buffer, 100);
- return make_reg(0, message_get_talker(&state)); /* Talker id */
+ state.getText(buffer, 100);
+ // Talker id
+ return make_reg(0, state.getTalker());
} else {
if (buffer) strcpy(buffer, DUMMY_MESSAGE);
return NULL_REG;
@@ -779,8 +781,8 @@ reg_t kMessage(EngineState *s, int funct_nr, int argc, reg_t *argv) {
tuple.cond = UKPV(4);
tuple.seq = UKPV(5);
- if (message_state_load_res(&state, module) && message_get_specific(&state, &tuple))
- return make_reg(0, message_get_length(&state) + 1);
+ if (state.loadRes(module) && state.getSpecific(&tuple))
+ return make_reg(0, state.getLength() + 1);
else return NULL_REG;
}
}