From b7ef84983e2b645ee04aed3079c577295d339631 Mon Sep 17 00:00:00 2001 From: uruk Date: Fri, 28 Jun 2013 17:22:04 +0200 Subject: AVALANCHE: Pingo: replace namespace with class. --- engines/avalanche/pingo2.cpp | 142 +++++++++++++++++++++---------------------- engines/avalanche/pingo2.h | 16 ++++- 2 files changed, 84 insertions(+), 74 deletions(-) (limited to 'engines/avalanche') diff --git a/engines/avalanche/pingo2.cpp b/engines/avalanche/pingo2.cpp index 1311c65b56..fa2e96ff02 100644 --- a/engines/avalanche/pingo2.cpp +++ b/engines/avalanche/pingo2.cpp @@ -27,88 +27,86 @@ /* PINGO Full-screen sub-parts of the game. */ +#include "avalanche/avalanche.h" + #include "avalanche/pingo2.h" #include "avalanche/gyro2.h" #include "avalanche/lucerna2.h" #include "avalanche/trip6.h" -#include "avalanche/scrolls2.h" +//#include "avalanche/scrolls2.h" -#include "common/textconsole.h" -namespace Avalanche { - namespace Pingo { +#include "common/textconsole.h" - void dplot(int16 x, int16 y, Common::String z) { - warning("STUB: Pingo::dplot()"); - } +namespace Avalanche { - void bosskey() { - /*const - months : array[0..11] of char = 'JFMAMJJASOND'; - title = 'Net Profits'; - fish = #224; { à } - var fv:byte; gd,gm:int16; r:char; +void Pingo::dplot(int16 x, int16 y, Common::String z) { + warning("STUB: Pingo::dplot()"); +} + +void Pingo::bosskey() { +/*const + months : array[0..11] of char = 'JFMAMJJASOND'; + title = 'Net Profits'; + fish = #224; { à } +var fv:byte; gd,gm:int16; r:char; +begin; + dusk; delavvy; + setactivepage(3); mousepage(3); setvisualpage(3); off; + cleardevice; setfillstyle(xhatchfill,11); + settextstyle(1,0,4); settextjustify(1,1); + dplot(320,10,title); + settextstyle(1,0,0); setusercharsize(4,3,7,12); + for fv:=0 to 11 do + begin; + dplot(26+fv*52,187,months[fv]); + bar(fv*52,177-fv*14,51+fv*52,180); + rectangle(fv*52,177-fv*14,51+fv*52,180); + end; + settextstyle(0,0,1); + for fv:=1 to 177 do begin; - dusk; delavvy; - setactivepage(3); mousepage(3); setvisualpage(3); off; - cleardevice; setfillstyle(xhatchfill,11); - settextstyle(1,0,4); settextjustify(1,1); - dplot(320,10,title); - settextstyle(1,0,0); setusercharsize(4,3,7,12); - for fv:=0 to 11 do - begin; - dplot(26+fv*52,187,months[fv]); - bar(fv*52,177-fv*14,51+fv*52,180); - rectangle(fv*52,177-fv*14,51+fv*52,180); - end; - settextstyle(0,0,1); - for fv:=1 to 177 do - begin; - gd:=random(630); gm:=random(160)+30; - setcolor(lightred); outtextxy(gd ,gm ,fish); - setcolor(yellow); outtextxy(gd+1,gm-1,fish); - end; - newpointer(6); { TTHand } - dawn; on; setbkcolor(1); repeat check until (mpress>0) or keypressed; - while keypressed do r:=readkey; setbkcolor(0); settextjustify(0,0); - dusk; setvisualpage(0); setactivepage(0); mousepage(0); dawn; - copy02;*/ - - warning("STUB: Pingo::bosskey()"); - } - - void copy02() { /* taken from Wobble (below) */ - warning("STUB: Pingo::copy02()"); - } - - void copy03() { /* taken from Wobble (below) */ - warning("STUB: Pingo::copy03()"); - } - - void copypage(byte frp, byte top) { /* taken from Copy02 (above) */ - warning("STUB: Pingo::copypage()"); - } - - void wobble() { - warning("STUB: Pingo::wobble()"); - } - - void zonk(); - - static void zl(int16 x1, int16 y1, int16 x2, int16 y2) { - warning("STUB: Pingo::zl()"); - } - - void zonk() { - warning("STUB: Pingo::zonk()"); - } - - void winning_pic() { - warning("STUB: Pingo::winning_pic()"); - } - - } // End of namespace Pingo. + gd:=random(630); gm:=random(160)+30; + setcolor(lightred); outtextxy(gd ,gm ,fish); + setcolor(yellow); outtextxy(gd+1,gm-1,fish); + end; + newpointer(6); { TTHand } + dawn; on; setbkcolor(1); repeat check until (mpress>0) or keypressed; + while keypressed do r:=readkey; setbkcolor(0); settextjustify(0,0); + dusk; setvisualpage(0); setactivepage(0); mousepage(0); dawn; + copy02;*/ + + warning("STUB: Pingo::bosskey()"); +} + +void Pingo::copy02() { /* taken from Wobble (below) */ + warning("STUB: Pingo::copy02()"); +} + +void Pingo::copy03() { /* taken from Wobble (below) */ + warning("STUB: Pingo::copy03()"); +} + +void Pingo::copypage(byte frp, byte top) { /* taken from Copy02 (above) */ + warning("STUB: Pingo::copypage()"); +} + +void Pingo::wobble() { + warning("STUB: Pingo::wobble()"); +} + +void Pingo::zl(int16 x1, int16 y1, int16 x2, int16 y2) { + warning("STUB: Pingo::zl()"); +} + +void Pingo::zonk() { + warning("STUB: Pingo::zonk()"); +} + +void Pingo::winning_pic() { + warning("STUB: Pingo::winning_pic()"); +} } // End of namespace Avalanche. diff --git a/engines/avalanche/pingo2.h b/engines/avalanche/pingo2.h index 10b9511f5e..135bb10c20 100644 --- a/engines/avalanche/pingo2.h +++ b/engines/avalanche/pingo2.h @@ -31,11 +31,17 @@ #define PINGO2_H #include "common/scummsys.h" +#include "common/str.h" + + namespace Avalanche { +class AvalancheEngine; - namespace Pingo { +class Pingo { +public: + void setParent(AvalancheEngine *vm); void bosskey(); @@ -51,7 +57,13 @@ namespace Avalanche { void winning_pic(); - } // End of namespace Pingo. +private: + AvalancheEngine *_vm; + + void dplot(int16 x, int16 y, Common::String z); + + void zl(int16 x1, int16 y1, int16 x2, int16 y2); +}; } // End of namespace Avalanche. -- cgit v1.2.3