diff options
author | Bertrand Augereau | 2011-09-04 15:10:49 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-09-04 16:42:42 +0200 |
commit | 8f263ab5e6647d7267cdbf15bf4450b311286f9a (patch) | |
tree | 0d61d8a0f3add40d632def5016e8d39f9634b32a /engines | |
parent | b3248deda76580d1860e41f1248379bd7fd437ba (diff) | |
download | scummvm-rg350-8f263ab5e6647d7267cdbf15bf4450b311286f9a.tar.gz scummvm-rg350-8f263ab5e6647d7267cdbf15bf4450b311286f9a.tar.bz2 scummvm-rg350-8f263ab5e6647d7267cdbf15bf4450b311286f9a.zip |
DREAMWEB: 'showpersframe' and 'convicons' ported to C++
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 27 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 8 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 2 | ||||
-rw-r--r-- | engines/dreamweb/talk.cpp | 12 |
4 files changed, 17 insertions, 32 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 201d993443..a092509262 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -5950,31 +5950,6 @@ notnexttalk: data.byte(kVolumeto) = 0; } -void DreamGenContext::convicons() { - STACK_CHECK; - al = data.byte(kCharacter); - _and(al, 127); - getpersframe(); - di = 234; - bx = 2; - data.word(kCurrentframe) = ax; - findsource(); - ax = data.word(kCurrentframe); - _sub(ax, data.word(kTakeoff)); - ah = 0; - showframe(); -} - -void DreamGenContext::getpersframe() { - STACK_CHECK; - ah = 0; - _add(ax, ax); - bx = ax; - es = data.word(kPeople); - _add(bx, (0)); - ax = es.word(bx); -} - void DreamGenContext::starttalk() { STACK_CHECK; data.byte(kTalkmode) = 0; @@ -16833,8 +16808,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_redrawmainscrn: redrawmainscrn(); break; case addr_getback1: getback1(); break; case addr_talk: talk(); break; - case addr_convicons: convicons(); break; - case addr_getpersframe: getpersframe(); break; case addr_starttalk: starttalk(); break; case addr_getpersontext: getpersontext(); break; case addr_moretalk: moretalk(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index b91bc54349..c29463a258 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -422,8 +422,6 @@ public: static const uint16 addr_moretalk = 0xc494; static const uint16 addr_getpersontext = 0xc490; static const uint16 addr_starttalk = 0xc48c; - static const uint16 addr_getpersframe = 0xc488; - static const uint16 addr_convicons = 0xc484; static const uint16 addr_talk = 0xc480; static const uint16 addr_getback1 = 0xc47c; static const uint16 addr_redrawmainscrn = 0xc478; @@ -1345,7 +1343,7 @@ public: //void deltextline(); void entercode(); void getopenedsize(); - void getpersframe(); + //void getpersframe(); void doshake(); void resetkeyboard(); //void showpanel(); @@ -1539,6 +1537,7 @@ public: //void showcity(); void dumpsymbol(); void disablepath(); + //void convicons(); void buttonsix(); void intro2text(); void showouterpad(); @@ -1612,9 +1611,8 @@ public: void showmonk(); void diarykeyn(); void set16colpalette(); - void convicons(); - void interviewer(); void sparky(); + void interviewer(); void purgeanitem(); void madman(); void createpanel(); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 458e731679..7057c478bf 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -247,4 +247,6 @@ void examineobtext(); void sortoutmap(); void showcity(); + uint16 getpersframe(uint8 index); + void convicons(); diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp index 75d91f2bae..91291e024a 100644 --- a/engines/dreamweb/talk.cpp +++ b/engines/dreamweb/talk.cpp @@ -24,5 +24,17 @@ namespace DreamGen { +uint16 DreamGenContext::getpersframe(uint8 index) { + return segRef(data.word(kPeople)).word(kPersonframes + index * 2); +} + +void DreamGenContext::convicons() { + uint8 index = data.byte(kCharacter) & 127; + data.word(kCurrentframe) = getpersframe(index); + Frame *frame = findsourceCPP(); + uint16 frameNumber = (data.word(kCurrentframe) - data.word(kTakeoff)) & 0xff; + showframe(frame, 234, 2, frameNumber, 0); +} + } /*namespace dreamgen */ |