From 6f6d137726d8d80f158f92ff5d8f868a0df267dd Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 11 Dec 2011 21:46:17 +0200 Subject: DREAMWEB: Port 'uselighter' to C++ --- engines/dreamweb/use.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'engines/dreamweb/use.cpp') diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index 68f4aed1c0..9126b7e885 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -1116,6 +1116,26 @@ void DreamGenContext::useCardReader3() { } } +void DreamGenContext::useLighter() { + if (data.byte(kWithobject) == 255) { + withWhat(); + return; + } + + char id[4] = { 'S', 'M', 'K', 'E' }; // TODO: convert to string with trailing zero + if (!compare(data.byte(kWithobject), data.byte(kWithtype), id)) { + showFirstUse(); + putBackObStuff(); + } else { + cx = 300; + al = 9; + showPuzText(); + getExAd(data.byte(kWithobject)); + es.byte(bx + 2) = 255; + data.byte(kGetback) = 1; + } +} + void DreamGenContext::openTomb() { data.byte(kProgresspoints)++; showFirstUse(); -- cgit v1.2.3