/
Interface.h
274 lines (235 loc) · 7.16 KB
/
Interface.h
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
/*
* Copyright 2011 Arx Libertatis Team (see the AUTHORS file)
*
* This file is part of Arx Libertatis.
*
* Arx Libertatis 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 3 of the License, or
* (at your option) any later version.
*
* Arx Libertatis 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 Arx Libertatis. If not, see <http://www.gnu.org/licenses/>.
*/
/* Based on:
===========================================================================
ARX FATALIS GPL Source Code
Copyright (C) 1999-2010 Arkane Studios SA, a ZeniMax Media company.
This file is part of the Arx Fatalis GPL Source Code ('Arx Fatalis Source Code').
Arx Fatalis Source Code 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 3 of the License, or (at your option) any later version.
Arx Fatalis Source Code 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 Arx Fatalis Source Code. If not, see
<http://www.gnu.org/licenses/>.
In addition, the Arx Fatalis Source Code is also subject to certain additional terms. You should have received a copy of these
additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Arx
Fatalis Source Code. If not, please request a copy in writing from Arkane Studios at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing Arkane Studios, c/o
ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
// Copyright (c) 1999-2000 ARKANE Studios SA. All rights reserved
#ifndef ARX_GUI_INTERFACE_H
#define ARX_GUI_INTERFACE_H
#include <string>
#include <map>
#include "game/Spells.h"
#include "math/MathFwd.h"
#include "Configure.h"
#include "gui/Note.h"
class TextureContainer;
struct EERIE_CAMERA;
struct INTERACTIVE_OBJ;
extern float BOOKDECX;
extern float BOOKDECY;
//-----------------------------------------------------------------------------
class INTERFACE_TC
{
public:
INTERFACE_TC();
~INTERFACE_TC();
void Set(const std::string& textureName, TextureContainer* pTexture);
void Set(const std::string& textureName, const std::string& fileName);
TextureContainer* Get(const std::string& name);
void Reset();
public:
std::string Level;
std::string Xp;
private:
typedef std::map<std::string, TextureContainer*> TextureDictionary;
TextureDictionary m_Textures;
};
struct SPELL_ICON {
TextureContainer * tc;
std::string name;
std::string description;
long level;
Spell spellid;
Rune symbols[6];
bool bSecret;
bool bDuration;
bool bAudibleAtStart;
};
enum E_ARX_STATE_MOUSE
{
MOUSE_IN_WORLD,
MOUSE_IN_TORCH_ICON,
MOUSE_IN_REDIST_ICON,
MOUSE_IN_GOLD_ICON,
MOUSE_IN_BOOK_ICON,
MOUSE_IN_BOOK,
MOUSE_IN_INVENTORY_ICON,
MOUSE_IN_INVENTORY_PICKALL_ICON,
MOUSE_IN_INVENTORY_CLOSE_ICON,
MOUSE_IN_STEAL_ICON,
MOUSE_IN_INVENTORY,
MOUSE_IN_NOTE
};
//-----------------------------------------------------------------------------
enum ARX_INTERFACE_MOVE_MODE
{
MOVE_UNDEFINED,
MOVE_WAIT,
MOVE_WALK,
MOVE_RUN
};
enum ARX_INTERFACE_BOOK_ITEM
{
BOOK_NOTHING,
BOOK_STRENGTH,
BOOK_MIND,
BOOK_DEXTERITY,
BOOK_CONSTITUTION,
BOOK_STEALTH,
BOOK_MECANISM,
BOOK_INTUITION,
BOOK_ETHERAL_LINK,
BOOK_OBJECT_KNOWLEDGE,
BOOK_CASTING,
BOOK_CLOSE_COMBAT,
BOOK_PROJECTILE,
BOOK_DEFENSE,
BUTTON_QUICK_GENERATION,
BUTTON_SKIN,
BUTTON_DONE,
WND_ATTRIBUTES,
WND_SKILLS,
WND_STATUS,
WND_LEVEL,
WND_XP,
WND_HP,
WND_MANA,
WND_AC,
WND_RESIST_MAGIC,
WND_RESIST_POISON,
WND_DAMAGE,
WND_NEXT_LEVEL
};
#ifdef BUILD_EDITOR
// long "EDITION" values (Danae.cpp)
enum ARX_INTERFACE_EDITION_MODE
{
EDITION_IO,
EDITION_LIGHTS,
EDITION_FOGS,
EDITION_NODES,
EDITION_ZONES,
EDITION_PATHWAYS,
EDITION_PARTICLES
};
#endif
enum ARX_INTERFACE_FLAG
{
INTER_MAP = 0x00000001,
INTER_INVENTORY = 0x00000002,
INTER_INVENTORYALL = 0x00000004,
INTER_MINIBOOK = 0x00000008,
INTER_MINIBACK = 0x00000010,
INTER_LIFE_MANA = 0x00000020,
INTER_COMBATMODE = 0x00000040,
INTER_NOTE = 0x00000080,
INTER_STEAL = 0x00000100,
INTER_NO_STRIKE = 0x00000200
};
enum ARX_INTERFACE_CURSOR_MODE
{
CURSOR_UNDEFINED,
CURSOR_FIREBALLAIM,
CURSOR_INTERACTION_ON,
CURSOR_REDIST,
CURSOR_COMBINEON,
CURSOR_COMBINEOFF
};
enum ARX_INTERFACE_BOOK_MODE
{
BOOKMODE_STATS = 0,
BOOKMODE_SPELLS,
BOOKMODE_MINIMAP,
BOOKMODE_QUESTS
};
//-----------------------------------------------------------------------------
extern INTERFACE_TC ITC;
extern Vec2s MemoMouse;
extern Vec2s bookclick;
extern SPELL_ICON spellicons[SPELL_COUNT];
extern char LOADFROM[256];
extern float CINEMA_DECAL;
extern long CURRINVCOUNT;
extern ARX_INTERFACE_BOOK_MODE Book_Mode;
extern long SpecialCursor;
extern long LastMouseClick;
extern long INVERTMOUSE;
extern long CINEMASCOPE;
extern long CINEMA_INC;
extern long CurrFightPos;
extern long FORBID_SAVE;
extern long CONSTANTUPDATELIGHT;
//-----------------------------------------------------------------------------
float INTERFACE_RATIO(const float);
float INTERFACE_RATIO_LONG(const long);
float INTERFACE_RATIO_DWORD(const u32);
short SHORT_INTERFACE_RATIO(const float);
bool MouseInCam(EERIE_CAMERA * cam);
bool MouseInRect(float x0, float y0, float x1, float y1);
long GetMainSpeakingIO();
bool ARX_INTERFACE_MouseInBook();
void ARX_INTERFACE_PlayerInterfaceModify(long showhide, long smooth);
void ARX_INTERFACE_Reset();
void ARX_INTERFACE_SetCinemascope(long v, long vv);
void ARX_INTERFACE_RenderCursor(long flag = 0);
void ARX_INTERFACE_ManageOpenedBook();
void ARX_INTERFACE_ManageOpenedBook_Finish();
void ARX_INTERFACE_NoteManage();
void ARX_INTERFACE_BookOpenClose(unsigned long t);
void ARX_INTERFACE_NoteOpen(gui::Note::Type type, const std::string& tex);
void ARX_INTERFACE_NoteClose();
void ARX_INTERFACE_NoteClear();
void ARX_INTERFACE_ShowFISHTANK();
void ARX_INTERFACE_ShowARKANE();
void ARX_INTERFACE_KillFISHTANK();
void ARX_INTERFACE_KillARKANE();
void ARX_INTERFACE_EndIntro();
void ARX_INTERFACE_HALO_Flush();
void LoadScreen();
void LoadLevelScreen();
void LoadLevelScreen(long lev);
void ReleaseHalo();
void ResetPlayerInterface();
void Set_DragInter(INTERACTIVE_OBJ * io);
void CreateInterfaceTextureContainers();
void KillInterfaceTextureContainers();
namespace gui {
void updateQuestBook();
} // namespace gui
#define ARX_MOUSE_OVER_BOOK 1
#define ARX_MOUSE_OVER_INVENTORY 2
#define ARX_MOUSE_OVER_INVENTORY_2 4
#define ARX_MOUSE_OVER_IO 8
extern long ARX_MOUSE_OVER;
#endif // ARX_GUI_INTERFACE_H