blob: 26f4d3823d43d8b908dfdab4bc99e6835975575a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef MUTATIONOFJB_GAME_H
#define MUTATIONOFJB_GAME_H
#include "common/scummsys.h"
#include "mutationofjb/inventory.h"
namespace Common {
class ReadStream;
}
namespace MutationOfJB {
static const uint8 MAX_STR_LENGTH = 0x14;
struct Door {
/*
Door name.
Can be empty - deactivates door completely.
*/
char _name[MAX_STR_LENGTH + 1];
/*
Scene ID where the door leads.
Can be 0 - you can hover your mouse over it, but clicking it doesn't do anything (unless scripted).
*/
uint8 _destSceneId;
/* X coordinate for player's position after going through the door. */
uint16 _destX;
/* Y coordinate for player's position after going through the door. */
uint16 _destY;
/* X coordinate of the door rectangle. */
uint16 _x;
/* Y coordinate of the door rectangle. */
uint8 _y;
/* Width of the door rectangle. */
uint16 _width;
/* Height of the door rectangle. */
uint8 _height;
/* X coordinate for position towards player will walk after clicking the door. */
uint16 _walkToX;
/* Y coordinate for position towards player will walk after clicking the door. */
uint8 _walkToY;
/* Unknown for now - likely not even used. */
uint8 _SP;
bool loadFromStream(Common::ReadStream &stream);
};
struct Object {
uint8 _AC;
uint8 _FA;
uint8 _FR;
uint8 _NA;
uint8 _FS;
uint8 _unknown;
uint8 _CA;
uint16 _x;
uint8 _y;
uint16 _XL;
uint8 _YL;
uint16 _WX;
uint8 _WY;
uint8 _SP;
bool loadFromStream(Common::ReadStream &stream);
};
struct Static {
uint8 _active;
char _name[MAX_STR_LENGTH + 1];
uint16 _x;
uint8 _y;
uint16 _width;
uint8 _height;
uint16 _walkToX;
uint8 _walkToY;
uint8 _SP;
bool loadFromStream(Common::ReadStream &stream);
};
struct Bitmap {
uint8 _frame;
uint8 _isVisible;
uint16 _x1;
uint8 _y1;
uint16 _x2;
uint8 _y2;
bool loadFromStream(Common::ReadStream &stream);
};
struct Scene {
Door *getDoor(uint8 objectId);
Object *getObject(uint8 objectId);
Static *getStatic(uint8 staticId);
uint8 _startup;
uint8 _unknown001;
uint8 _unknown002;
uint8 _unknown003;
uint8 _DL;
uint8 _noDoors;
Door _doors[5];
uint8 _noObjects;
Object _objects[9];
uint8 _noStatics;
Static _statics[15];
Bitmap _bitmaps[10];
uint16 _obstacleY1;
uint8 _palRotStart;
uint8 _palRotEnd;
uint8 _palRotPeriod;
uint8 _unknown38A[80];
bool loadFromStream(Common::ReadStream &stream);
};
struct GameData {
public:
GameData();
Scene *getScene(uint8 sceneId);
bool loadFromStream(Common::ReadStream &stream);
uint8 _currentScene;
Inventory _inventory;
private:
Scene _scenes[45];
};
}
#endif
|