ScummVM API documentation
nav_window.h
1 
2 /* ScummVM - Graphic Adventure Engine
3  *
4  * ScummVM is the legal property of its developers, whose names
5  * are too numerous to list here. Please refer to the COPYRIGHT
6  * file distributed with this source distribution.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef BAGEL_SPACEBAR_NAV_WINDOW_H
24 #define BAGEL_SPACEBAR_NAV_WINDOW_H
25 
26 #include "bagel/boflib/gui/window.h"
27 #include "bagel/baglib/storage_dev_win.h"
28 #include "bagel/boflib/gui/text_box.h"
29 #include "bagel/boflib/gui/button.h"
30 #include "bagel/boflib/gfx/sprite.h"
31 #include "bagel/boflib/sound.h"
32 
33 namespace Bagel {
34 namespace SpaceBar {
35 
36 struct NCARGO {
37  const char *_pszCargo;
38  int Weight;
39  bool _bUsed;
40 };
41 
42 struct NPLANET {
43  const char *Name;
44  int Left;
45  int Top;
46  int Right;
47  int Bottom;
48  NCARGO cargo;
49 };
50 
51 
52 class CNavWindow : public CBagStorageDevWnd {
53 public:
54  CNavWindow();
55 
56  ErrorCode attach() override;
57  ErrorCode detach() override;
58 
59  void onBofButton(CBofObject *pObject, int nState) override;
60 
61 protected:
62  void pause();
63  void calcFuel(double hf);
64 
65  void onLButtonDown(uint32 nFlags, CBofPoint *pPoint, void * = nullptr) override;
66  void onKeyHit(uint32 lKey, uint32 lRepCount) override;
67  void onTimer(uint32 tId) override;
68  void onPaint(CBofRect *pRect) override;
69  void onMainLoop() override;
70 
71  // Split up the onMouseDown method
72  void refreshData(); // Added func to just paint text
73 
74  void onPinna();
75  void onHpoctyl();
76  void onArmpit();
77  void onYzore();
78  void onBulbus();
79  void onDingle();
80  void onKarkas();
81  void onFruufnia();
82  void onWilbur();
83  void onMcKelvey();
84  void onMedge();
85  void onWall();
86  void onWoo();
87  void onRoman();
88  void onWeed();
89  void onBok();
90  void onPizer();
91  void onBackwater();
92  void onUranus();
93  void onToejam();
94  void onHellhole();
95  void onPustule();
96  void onSwamprock();
97  void onSlug();
98  void onMaggotsnest();
99  void onPeggleboz();
100  void onArcheroids();
101  void onPackRat();
102  void onBeacon();
103  void onMankala();
104  void onLife();
105  void onFuge();
106  void onGarfunkel();
107  void onBattlefish();
108  void onNoVacancy();
109 
110  // Data
111  //
112  int _level;
113  int _fuel;
114  int _cargo;
115  int _ship;
116  CBofRect *_pPinna;
117  CBofRect *_pHpoctyl;
118  CBofRect *_pArmpit;
119  CBofRect *_pYzore;
120  CBofRect *_pBulbus;
121  CBofRect *_pDingle;
122  CBofRect *_pKarkas;
123  CBofRect *_pFruufnia;
124  CBofBmpButton *_pButtons[2];
125  CBofPalette *_pPal;
126  CBofPalette *_pOldPal;
127  CBofSprite *_pMap;
128  CBofSprite *_pCurLoc;
129  CBofBitmap *_pNewMap;
130  CBofBitmap *_bmpTwo;
131  CBofRect *_pCurPos;
132  CBofString *_pPortName;
133  CBofRect *_pWilbur;
134  CBofRect *_pMcKelvey;
135  CBofRect *_pMedge;
136  CBofRect *_pWall;
137  CBofRect *_pWoo;
138  CBofRect *_pRoman;
139  CBofRect *_pWeed;
140  CBofRect *_pBok;
141  CBofRect *_pPizer;
142  CBofRect *_pBackwater;
143  CBofRect *_pUranus;
144  CBofRect *_pToejam;
145  CBofRect *_pHellhole;
146  CBofRect *_pPustule;
147  CBofRect *_pSwamprock;
148  CBofRect *_pSlug;
149  CBofRect *_pMaggotsNest;
150  CBofRect *_pPeggleboz;
151  CBofRect *_pArcheroids;
152  CBofRect *_pPackRat;
153  CBofRect *_pBeacon;
154  CBofRect *_pMankala;
155  CBofRect *_pLife;
156  CBofRect *_pFuge;
157  CBofRect *_pGarfunkel;
158  CBofRect *_pBattleFish;
159  CBofRect *_pNoVacancy;
160 
161  NPLANET *_pLevel;
162  bool _bNavAttached;
163 };
164 
165 } // namespace SpaceBar
166 } // namespace Bagel
167 
168 #endif
Definition: storage_dev_win.h:406
Definition: object.h:28
Definition: nav_window.h:36
Definition: nav_window.h:42
Definition: bitmap.h:55
Definition: sprite.h:38
Definition: nav_window.h:52
Definition: rect.h:36
Definition: button.h:109
Definition: string.h:38
Definition: bagel.h:31
Definition: point.h:34
Definition: palette.h:69