ScummVM API documentation
state.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 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 *
21 * This file is dual-licensed.
22 * In addition to the GPLv3 license mentioned above, MojoTouch has
23 * exclusively licensed this code on March 23th, 2024, to be used in
24 * closed-source products.
25 * Therefore, any contributions (commits) to it will also be dual-licensed.
26 *
27 */
28
29#ifndef TOON_STATE_H
30#define TOON_STATE_H
31
32#include "common/file.h"
33#include "common/str.h"
34#include "toon/conversation.h"
35
36namespace Toon {
37
38struct Location {
39 char _name[64];
40 char _music[64];
41 char _cutaway[64];
42 bool _visited;
43 int32 _numSceneAnimations;
44 int32 _flags;
45 int32 _numRifBoxes;
46 int16 _rifBoxesFlags[256];
47
48 void save(Common::WriteStream *stream);
49 void load(Common::ReadStream *stream);
50};
51
52class State {
53public:
54 State(void);
55 ~State(void);
56
57 Location _locations[256];
58 int16 _gameGlobalData[256];
59 uint8 _gameFlag[256];
60 int16 _lastVisitedScene;
61 int16 _currentScene;
62 int16 _currentScrollValue;
63 bool _currentScrollLock;
64 int16 _inventory[35];
65 int16 _confiscatedInventory[35];
66 int32 _numInventoryItems;
67 int32 _numConfiscatedInventoryItems;
68 bool _inMenu;
69 bool _inCloseUp;
70 bool _inCutaway;
71 bool _inConversation;
72 bool _inInventory;
73 bool _showConversationIcons;
74 int16 _mouseState;
75 int16 *_conversationData;
76 Conversation _conversationState[60];
77 int16 _currentConversationId;
78 bool _firstConverstationLine;
79 bool _exitConversation;
80 bool _mouseHidden;
81 bool _sackVisible;
82 int32 _gameTimer;
83 int8 _currentChapter;
84 int32 _nextSpecialEnterX;
85 int32 _nextSpecialEnterY;
86
87 bool _timerEnabled[2];
88 int32 _timerTimeout[2];
89 int32 _timerDelay[2];
90
91 int32 getGameFlag(int32 flagId);
92 bool hasItemInInventory(int32 item);
93
94 void load(Common::ReadStream *stream);
95 void save(Common::WriteStream *stream);
96
97 void loadConversations(Common::ReadStream *stream);
98 void saveConversations(Common::WriteStream *stream);
99};
100
101} // End of namespace Toon
102
103#endif
Definition: stream.h:385
Definition: stream.h:77
Definition: conversation.h:37
Definition: state.h:52
Definition: anim.h:39
Definition: state.h:38