ScummVM API documentation
interface.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * Additional copyright for this file:
8 * Copyright (C) 1995-1997 Presto Studios, Inc.
9 *
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 *
23 */
24
25#ifndef PEGASUS_INTERFACE_H
26#define PEGASUS_INTERFACE_H
27
28#include "pegasus/hotspot.h"
29#include "pegasus/input.h"
30#include "pegasus/notification.h"
31#include "pegasus/sound.h"
32#include "pegasus/surface.h"
33#include "pegasus/transition.h"
34#include "pegasus/items/inventorypicture.h"
35
36namespace Pegasus {
37
38class BiochipItem;
39class InventoryItem;
40
42public:
43 Interface();
44 ~Interface() override;
45
46 void createInterface();
47
48 // Recalibration functions...
49 void calibrateCompass();
50 void calibrateEnergyBar();
51 void raiseInventoryDrawerSync();
52 void lowerInventoryDrawerSync();
53 void raiseBiochipDrawerSync();
54 void lowerBiochipDrawerSync();
55
56 void raiseInventoryDrawer(const bool doCallBacks = true);
57 void raiseBiochipDrawer(const bool doCallBacks = true);
58 void lowerInventoryDrawer(const bool doCallBacks = true);
59 void lowerBiochipDrawer(const bool doCallBacks = true);
60
61 void raiseInventoryDrawerForMessage();
62 void lowerInventoryDrawerForMessage();
63 bool isInventoryUp();
64 bool isInventoryDown();
65
66 InventoryResult addInventoryItem(InventoryItem *);
67 InventoryResult removeInventoryItem(InventoryItem *);
68 void removeAllItemsFromInventory();
69 InventoryItem *getCurrentInventoryItem();
70 void setCurrentInventoryItem(InventoryItem *);
71 void setCurrentInventoryItemID(ItemID);
72 InventoryResult addBiochip(BiochipItem *);
73 void removeAllItemsFromBiochips();
74 BiochipItem *getCurrentBiochip();
75 void setCurrentBiochip(BiochipItem *);
76 void setCurrentBiochipID(ItemID);
77
78 void setDate(const uint16);
79
80 void playEndMessage();
81
82 void throwAwayInterface();
83
84protected:
85 void validateBackground();
86 void validateDateMonitor();
87 void validateCompass();
88 void validateNotifications();
89 void validateAIArea();
90 void validateInventoryPanel();
91 void validateBiochipPanel();
92 void validateEnergyMonitor();
93
94 void throwAwayBackground();
95 void throwAwayDateMonitor();
96 void throwAwayCompass();
97 void throwAwayNotifications();
98 void throwAwayAIArea();
99 void throwAwayInventoryPanel();
100 void throwAwayBiochipPanel();
101 void throwAwayEnergyMonitor();
102
103 void receiveNotification(Notification *, const NotificationFlags) override;
104 void inventoryLidOpen(const bool doCallBacks);
105 void inventoryLidClosed();
106 void inventoryDrawerUp();
107 void inventoryDrawerDown(const bool doCallBacks);
108 void biochipLidOpen(const bool doCallBacks);
109 void biochipLidClosed();
110 void biochipDrawerUp();
111 void biochipDrawerDown(const bool doCallBacks);
112
113 Picture _background1;
114 Picture _background2;
115 Picture _background3;
116 Picture _background4;
117
118 Picture _datePicture;
119
120 InputHandler *_previousHandler;
121
122 Push _inventoryPush;
123 SpriteSequence _inventoryLid;
124 NotificationCallBack _inventoryPushCallBack;
125 NotificationCallBack _inventoryLidCallBack;
126 InventoryItemsPicture _inventoryPanel;
127 bool _inventoryUp, _inventoryRaised;
128 Sound _inventoryOpenSound, _inventoryCloseSound;
129
130 Push _biochipPush;
131 SpriteSequence _biochipLid;
132 NotificationCallBack _biochipPushCallBack;
133 NotificationCallBack _biochipLidCallBack;
134 BiochipPicture _biochipPanel;
135 bool _biochipUp, _biochipRaised;
136 Sound _biochipOpenSound, _biochipCloseSound;
137
138 Hotspot _currentItemSpot;
139 Hotspot _currentBiochipSpot;
140
141 Notification _interfaceNotification;
142
143 bool _playingEndMessage;
144};
145
146extern Interface *g_interface;
147
148} // End of namespace Pegasus
149
150#endif
Definition: biochipitem.h:32
Definition: inventorypicture.h:112
Definition: hotspot.h:85
Definition: input.h:410
Definition: interface.h:41
Definition: inventoryitem.h:39
Definition: inventorypicture.h:91
Definition: timers.h:191
Definition: notification.h:53
Definition: notification.h:83
Definition: surface.h:125
Definition: transition.h:96
Definition: sound.h:50
Definition: elements.h:205