diff options
author | uruk | 2013-06-21 15:22:50 +0200 |
---|---|---|
committer | uruk | 2013-06-21 15:22:50 +0200 |
commit | 178386f1c48d04f07b2552a253a6b8151dc481b9 (patch) | |
tree | fdcfcb98586ae35d226328c91797a01fed55b223 /engines | |
parent | aeff42074ade0ab29e8130a6b92ffe73f94070b7 (diff) | |
download | scummvm-rg350-178386f1c48d04f07b2552a253a6b8151dc481b9.tar.gz scummvm-rg350-178386f1c48d04f07b2552a253a6b8151dc481b9.tar.bz2 scummvm-rg350-178386f1c48d04f07b2552a253a6b8151dc481b9.zip |
AVALANCHE: Stub gyro2.cpp. Fix readmes.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/gyro2.cpp | 293 | ||||
-rw-r--r-- | engines/avalanche/gyro2.h | 15 |
2 files changed, 302 insertions, 6 deletions
diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp index b44cbee68f..6c77279933 100644 --- a/engines/avalanche/gyro2.cpp +++ b/engines/avalanche/gyro2.cpp @@ -26,11 +26,304 @@ */ #include "avalanche/gyro2.h" +#include "common/textconsole.h" + +//#include "pingo.h" +//#include "scrolls.h" +//#include "lucerna.h" +//#include "visa.h" +//#include "acci.h" +//#include "trip5.h" +//#include "dropdown.h" +//#include "basher.h" + + namespace Avalanche { namespace Gyro { + const Common::String things[numobjs] = { + "Wine", "Money-bag", "Bodkin", "Potion", "Chastity belt", + "Crossbow bolt", "Crossbow", "Lute", "Pilgrim's badge", "Mushroom", "Key", + "Bell", "Scroll", "Pen", "Ink", "Clothes", "Habit", "Onion" + }; + + const char thingchar[] = "WMBParCLguKeSnIohn"; /* V=Vinegar */ + + const Common::String better[numobjs] = { + "some wine", "your money-bag", "your bodkin", "a potion", "a chastity belt", + "a crossbow bolt", "a crossbow", "a lute", "a pilgrim's badge", "a mushroom", + "a key", "a bell", "a scroll", "a pen", "some ink", "your clothes", "a habit", + "an onion" + }; + + const char betterchar[] = "WMBParCLguKeSnIohn"; + + void newpointer(byte m) { + warning("STUB: Gyro::newpointer()"); + } + + void wait() { /* makes hourglass */ + newpointer(5); + } + + void on() { + warning("STUB: Gyro::on()"); + } + + void on_virtual() { + switch (visible) { + case m_virtual: + return; + break; + case m_yes: + off(); + break; + } + + visible = m_virtual; + } + + void off() { + warning("STUB: Gyro::off()"); + } + + void off_virtual() { + warning("STUB: Gyro::off_virtual()"); + } + + void xycheck() { /* only updates mx & my, not all other mouse vars */ + warning("STUB: Gyro::xycheck()"); + } + + void hopto(int16 x, int16 y) { /* Moves mouse void *to x,y */ + warning("STUB: Gyro::hopto()"); + } + + void check() { + warning("STUB: Gyro::check()"); + } + + void note(uint16 hertz) { + warning("STUB: Gyro::note()"); + } + + void blip() { + warning("STUB: Gyro::blip()"); + } + + Common::String strf(int32 x) { + Common::String q = Common::String::format("%d", x); + return q; + } + + void shadow(int16 x1, int16 y1, int16 x2, int16 y2, byte hc, byte sc) { + warning("STUB: Gyro::shadow()"); + } + + void shbox(int16 x1, int16 y1, int16 x2, int16 y2, Common::String t) { + warning("STUB: Gyro::shbox()"); + } + + void newgame() { /* This sets up the DNA for a completely new game. */ + warning("STUB: Gyro::newgame()"); + } + + void click() { /* "Audio keyboard feedback" */ + warning("STUB: Gyro::click()"); + } + + void slowdown() { + warning("STUB: Gyro::slowdown()"); + } + + bool flagset(char x) { + for (uint16 i = 0; i < flags.size(); i++) + if (flags[i] == x) + return true; + return false; + } + + void force_numlock() { + if ((locks & num) > 0) locks -= num; + } + + bool pennycheck(uint16 howmuchby) { + warning("STUB: Gyro::pennycheck()"); + return true; + } + + // There'll may be problems with calling these functions becouse of the conversion of the arrays!!! + // Keep an eye open! + Common::String getname(byte whose) { + Common::String getname_result; + if (whose < 17) + getname_result = lads[whose]; + else + getname_result = lasses[whose-17]; + return getname_result; + } + + // Keep an eye open! ^ + char getnamechar(byte whose) { + char getnamechar_result; + if (whose < 16) + getnamechar_result = ladchar[whose]; + else + getnamechar_result = lasschar[whose-16]; + return getnamechar_result; + } + + // Keep an eye open! ^^ + Common::String get_thing(byte which) { + Common::String get_thing_result; + switch (which) { + case wine: + switch (dna.winestate) { + case 1: + case 4: + get_thing_result = things[which]; + break; + case 3: + get_thing_result = "Vinegar"; + break; + } + break; + case onion: + if (dna.rotten_onion) + get_thing_result = "rotten onion"; + else get_thing_result = things[which]; + break; + default: + get_thing_result = things[which]; + } + return get_thing_result; + } + + // Keep an eye open! ^^^ + char get_thingchar(byte which) { + char get_thingchar_result; + switch (which) { + case wine: + if (dna.winestate == 3) + get_thingchar_result = 'V'; /* Vinegar */ + else + get_thingchar_result = thingchar[which]; + break; + default: + get_thingchar_result = thingchar[which]; + } + return get_thingchar_result; + } + + // Keep an eye open! ^^^^ + Common::String get_better(byte which) { + Common::String get_better_result; + if (which > 150) which -= 149; + switch (which) { + case wine: + switch (dna.winestate) { + case 0: + case 1: + case 4: + get_better_result = better[which]; + break; + case 3: + get_better_result = "some vinegar"; + break; + } + break; + case onion: + if (dna.rotten_onion) + get_better_result = "a rotten onion"; + else if (dna.onion_in_vinegar) + get_better_result = "a pickled onion (in the vinegar)"; + else get_better_result = better[which]; + break; + default: + if ((which < numobjs) && (which > '\0')) + get_better_result = better[which]; + else + get_better_result = ""; + } + return get_better_result; + } + + // Get back here after finished with acci.pas, where vb_-s are resided. + Common::String f5_does() + /* This procedure determines what f5 does. */ + { + warning("STUB: Gyro::f5_does()"); + return "STUB: Gyro::f5_does()"; + } + + // Pobably vmc functions will deal with the mouse cursor. + void plot_vmc(int16 xx, int16 yy, byte page_) { + warning("STUB: Gyro::plot_vmc()"); + } + + void wipe_vmc(byte page_) { + warning("STUB: Gyro::wipe_vmc()"); + } + + void setup_vmc() { + warning("STUB: Gyro::setup_vmc()"); + } + + void clear_vmc() { + warning("STUB: Gyro::clear_vmc()"); + } + + void setminmaxhorzcurspos(uint16 min, uint16 max) { /* phew */ + warning("STUB: Gyro::setminmaxhorzcurspos()"); + } + + void setminmaxvertcurspos(uint16 min, uint16 max) { + warning("STUB: Gyro::setminmaxvertcurspos()"); + } + + void load_a_mouse(byte which) { + warning("STUB: Gyro::load_a_mouse()"); + } + + void background(byte x) { + warning("STUB: Gyro::background()"); + } + + void hang_around_for_a_while() { + byte fv; + + for (fv = 1; fv <= 28; fv ++) slowdown(); + } + + bool mouse_near_text() { + bool mouse_near_text_result; + mouse_near_text_result = (my > 144) && (my < 188); + return mouse_near_text_result; + } + + /* Super_Off and Super_On are two very useful procedures. Super_Off switches + the mouse cursor off, WHATEVER it's like. Super_On restores it again + afterwards. */ + + void super_off() { + super_was_off = visible == m_no; + if (super_was_off) return; + + super_was_virtual = visible == m_virtual; + + if (visible == m_virtual) off_virtual(); + else off(); + } + + void super_on() { + if ((visible != m_no) || (super_was_off)) return; + + if (super_was_virtual) on_virtual(); + else on(); + } + } // End of namespace Gyro diff --git a/engines/avalanche/gyro2.h b/engines/avalanche/gyro2.h index db02bc27a5..c9d8669f17 100644 --- a/engines/avalanche/gyro2.h +++ b/engines/avalanche/gyro2.h @@ -753,6 +753,9 @@ namespace Avalanche { bool use_joy_a; + + ///////////////////////////// FUNCTIONS ///////////////////////////// + void newpointer(byte m); void wait(); /* makes hourglass */ @@ -767,7 +770,7 @@ namespace Avalanche { void xycheck(); - void hopto(int16 x, int16 y); /* Moves mouse void *to x,y */ + void hopto(int16 x, int16 y); /* Moves mouse pointer to x,y */ void check(); @@ -791,15 +794,15 @@ namespace Avalanche { bool pennycheck(uint16 howmuchby); - Common::String getname(char whose); + Common::String getname(byte whose); - char getnamechar(char whose); + char getnamechar(byte whose); - Common::String get_thing(char which); + Common::String get_thing(byte which); - char get_thingchar(char which); + char get_thingchar(byte which); - Common::String get_better(char which); + Common::String get_better(byte which); Common::String f5_does(); |