1 /* 2 * Copyright 2011-2012 Arx Libertatis Team (see the AUTHORS file) 3 * 4 * This file is part of Arx Libertatis. 5 * 6 * Arx Libertatis is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * Arx Libertatis is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with Arx Libertatis. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 /* Based on: 20 =========================================================================== 21 ARX FATALIS GPL Source Code 22 Copyright (C) 1999-2010 Arkane Studios SA, a ZeniMax Media company. 23 24 This file is part of the Arx Fatalis GPL Source Code ('Arx Fatalis Source Code'). 25 26 Arx Fatalis Source Code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public 27 License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 28 29 Arx Fatalis Source Code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 30 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 31 32 You should have received a copy of the GNU General Public License along with Arx Fatalis Source Code. If not, see 33 <http://www.gnu.org/licenses/>. 34 35 In addition, the Arx Fatalis Source Code is also subject to certain additional terms. You should have received a copy of these 36 additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Arx 37 Fatalis Source Code. If not, please request a copy in writing from Arkane Studios at the address below. 38 39 If you have questions concerning this license or the applicable additional terms, you may contact in writing Arkane Studios, c/o 40 ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 41 =========================================================================== 42 */ 43 // Copyright (c) 1999-2000 ARKANE Studios SA. All rights reserved 44 45 #ifndef ARX_GUI_INTERFACE_H 46 #define ARX_GUI_INTERFACE_H 47 48 #include <string> 49 #include <map> 50 51 #include "game/Spells.h" 52 #include "math/MathFwd.h" 53 54 #include "Configure.h" 55 56 #include "gui/Note.h" 57 58 struct EERIE_CAMERA; 59 class TextureContainer; 60 class Entity; 61 62 extern float BOOKDECX; 63 extern float BOOKDECY; 64 65 extern Entity * FlyingOverIO; 66 67 //----------------------------------------------------------------------------- 68 class INTERFACE_TC 69 { 70 public: 71 INTERFACE_TC(); 72 ~INTERFACE_TC(); 73 74 void Set(const std::string& textureName, TextureContainer* pTexture); 75 void Set(const std::string& textureName, const std::string& fileName); 76 TextureContainer* Get(const std::string& name); 77 78 void Reset(); 79 80 public: 81 std::string Level; 82 std::string Xp; 83 84 private: 85 typedef std::map<std::string, TextureContainer*> TextureDictionary; 86 87 TextureDictionary m_Textures; 88 89 }; 90 91 struct SPELL_ICON { 92 TextureContainer * tc; 93 std::string name; 94 std::string description; 95 long level; 96 Spell spellid; 97 Rune symbols[6]; 98 bool bSecret; 99 bool bDuration; 100 bool bAudibleAtStart; 101 }; 102 103 enum E_ARX_STATE_MOUSE 104 { 105 MOUSE_IN_WORLD, 106 MOUSE_IN_TORCH_ICON, 107 MOUSE_IN_REDIST_ICON, 108 MOUSE_IN_GOLD_ICON, 109 MOUSE_IN_BOOK_ICON, 110 MOUSE_IN_BOOK, 111 MOUSE_IN_INVENTORY_ICON, 112 MOUSE_IN_INVENTORY_PICKALL_ICON, 113 MOUSE_IN_INVENTORY_CLOSE_ICON, 114 MOUSE_IN_STEAL_ICON, 115 MOUSE_IN_INVENTORY, 116 MOUSE_IN_NOTE 117 }; 118 119 //----------------------------------------------------------------------------- 120 121 enum ARX_INTERFACE_MOVE_MODE 122 { 123 MOVE_UNDEFINED, 124 MOVE_WAIT, 125 MOVE_WALK, 126 MOVE_RUN 127 }; 128 129 enum ARX_INTERFACE_BOOK_ITEM 130 { 131 BOOK_NOTHING, 132 BOOK_STRENGTH, 133 BOOK_MIND, 134 BOOK_DEXTERITY, 135 BOOK_CONSTITUTION, 136 BOOK_STEALTH, 137 BOOK_MECANISM, 138 BOOK_INTUITION, 139 BOOK_ETHERAL_LINK, 140 BOOK_OBJECT_KNOWLEDGE, 141 BOOK_CASTING, 142 BOOK_CLOSE_COMBAT, 143 BOOK_PROJECTILE, 144 BOOK_DEFENSE, 145 BUTTON_QUICK_GENERATION, 146 BUTTON_SKIN, 147 BUTTON_DONE, 148 WND_ATTRIBUTES, 149 WND_SKILLS, 150 WND_STATUS, 151 WND_LEVEL, 152 WND_XP, 153 WND_HP, 154 WND_MANA, 155 WND_AC, 156 WND_RESIST_MAGIC, 157 WND_RESIST_POISON, 158 WND_DAMAGE, 159 WND_NEXT_LEVEL 160 161 }; 162 163 #ifdef BUILD_EDITOR 164 // long "EDITION" values (Danae.cpp) 165 enum ARX_INTERFACE_EDITION_MODE 166 { 167 EDITION_IO, 168 EDITION_LIGHTS, 169 EDITION_FOGS, 170 EDITION_NODES, 171 EDITION_ZONES, 172 EDITION_PATHWAYS, 173 EDITION_PARTICLES 174 }; 175 #endif 176 177 enum ARX_INTERFACE_FLAG 178 { 179 INTER_MAP = 0x00000001, 180 INTER_INVENTORY = 0x00000002, 181 INTER_INVENTORYALL = 0x00000004, 182 INTER_MINIBOOK = 0x00000008, 183 INTER_MINIBACK = 0x00000010, 184 INTER_LIFE_MANA = 0x00000020, 185 INTER_COMBATMODE = 0x00000040, 186 INTER_NOTE = 0x00000080, 187 INTER_STEAL = 0x00000100, 188 INTER_NO_STRIKE = 0x00000200 189 }; 190 191 enum ARX_INTERFACE_CURSOR_MODE 192 { 193 CURSOR_UNDEFINED, 194 CURSOR_FIREBALLAIM, 195 CURSOR_INTERACTION_ON, 196 CURSOR_REDIST, 197 CURSOR_COMBINEON, 198 CURSOR_COMBINEOFF 199 }; 200 201 enum ARX_INTERFACE_BOOK_MODE 202 { 203 BOOKMODE_STATS = 0, 204 BOOKMODE_SPELLS, 205 BOOKMODE_MINIMAP, 206 BOOKMODE_QUESTS 207 }; 208 209 //----------------------------------------------------------------------------- 210 extern INTERFACE_TC ITC; 211 extern Vec2s MemoMouse; 212 extern Vec2s bookclick; 213 214 extern SPELL_ICON spellicons[SPELL_COUNT]; 215 extern float CINEMA_DECAL; 216 extern ARX_INTERFACE_BOOK_MODE Book_Mode; 217 extern long SpecialCursor; 218 219 extern long LastMouseClick; 220 extern long INVERTMOUSE; 221 extern long CINEMASCOPE; 222 extern long CINEMA_INC; 223 extern long CurrFightPos; 224 225 //----------------------------------------------------------------------------- 226 float INTERFACE_RATIO(const float); 227 float INTERFACE_RATIO_LONG(const long); 228 float INTERFACE_RATIO_DWORD(const u32); 229 short SHORT_INTERFACE_RATIO(const float); 230 231 bool MouseInCam(EERIE_CAMERA * cam); 232 bool MouseInRect(float x0, float y0, float x1, float y1); 233 long GetMainSpeakingIO(); 234 bool ARX_INTERFACE_MouseInBook(); 235 void ARX_INTERFACE_PlayerInterfaceModify(long showhide, long smooth); 236 void ARX_INTERFACE_Reset(); 237 void ARX_INTERFACE_SetCinemascope(long v, long vv); 238 void ARX_INTERFACE_RenderCursor(long flag = 0); 239 void ARX_INTERFACE_ManageOpenedBook(); 240 void ARX_INTERFACE_ManageOpenedBook_Finish(); 241 void ARX_INTERFACE_NoteManage(); 242 void ARX_INTERFACE_BookOpenClose(unsigned long t); 243 void ARX_INTERFACE_NoteOpen(gui::Note::Type type, const std::string & tex); 244 void ARX_INTERFACE_NoteClose(); 245 void ARX_INTERFACE_NoteClear(); 246 247 bool ARX_INTERFACE_InitFISHTANK(); 248 void ARX_INTERFACE_ShowFISHTANK(); 249 void ARX_INTERFACE_KillFISHTANK(); 250 251 bool ARX_INTERFACE_InitARKANE(); 252 void ARX_INTERFACE_ShowARKANE(); 253 void ARX_INTERFACE_KillARKANE(); 254 255 void ARX_INTERFACE_EndIntro(); 256 void ARX_INTERFACE_HALO_Flush(); 257 void LoadScreen(); 258 void LoadLevelScreen(); 259 void LoadLevelScreen(long lev); 260 void ReleaseHalo(); 261 void ResetPlayerInterface(); 262 void Set_DragInter(Entity * io); 263 void CreateInterfaceTextureContainers(); 264 void KillInterfaceTextureContainers(); 265 266 namespace gui { 267 void updateQuestBook(); 268 } // namespace gui 269 270 #define ARX_MOUSE_OVER_BOOK 1 271 #define ARX_MOUSE_OVER_INVENTORY 2 272 #define ARX_MOUSE_OVER_INVENTORY_2 4 273 #define ARX_MOUSE_OVER_IO 8 274 275 extern long ARX_MOUSE_OVER; 276 277 #endif // ARX_GUI_INTERFACE_H 278