____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"00001 // ____ _ __ 00002 // / __ )____ _____ | | / /___ ___________ 00003 // / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ 00004 // / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) 00005 // /_____/\____/____/ |__/|__/\__,_/_/ /____/ 00006 // 00007 // A futuristic real-time strategy game. 00008 // This file is part of Bos Wars. 00009 // 00011 // 00012 // (c) Copyright 1998-2007 by Lutz Sammer 00013 // 00014 // This program is free software; you can redistribute it and/or modify 00015 // it under the terms of the GNU General Public License as published by 00016 // the Free Software Foundation; only version 2 of the License. 00017 // 00018 // This program is distributed in the hope that it will be useful, 00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 // GNU General Public License for more details. 00022 // 00023 // You should have received a copy of the GNU General Public License 00024 // along with this program; if not, write to the Free Software 00025 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00026 // 02111-1307, USA. 00027 00028 #ifndef __CURSOR_H__ 00029 #define __CURSOR_H__ 00030 00032 00033 /*---------------------------------------------------------------------------- 00034 -- Documentation 00035 ----------------------------------------------------------------------------*/ 00036 00097 /*---------------------------------------------------------------------------- 00098 -- Includes 00099 ----------------------------------------------------------------------------*/ 00100 00101 #include <vector> 00102 00103 /*---------------------------------------------------------------------------- 00104 -- Declarations 00105 ----------------------------------------------------------------------------*/ 00106 00107 class CGraphic; 00108 class CUnitType; 00109 00110 /*---------------------------------------------------------------------------- 00111 -- Definitions 00112 ----------------------------------------------------------------------------*/ 00113 00115 class CCursor { 00116 public: 00117 CCursor() : HotX(0), HotY(0), 00118 SpriteFrame(0), FrameRate(0), G(NULL) {} 00119 00120 std::string Ident; 00121 00122 int HotX; 00123 int HotY; 00124 00125 int SpriteFrame; 00126 int FrameRate; 00127 00128 // --- FILLED UP --- 00129 00130 CGraphic *G; 00131 }; 00132 00134 class CursorConfig { 00135 public: 00136 CursorConfig() : Cursor(NULL) {} 00137 00138 void Load(); 00139 00140 std::string Name; 00141 CCursor *Cursor; 00142 }; 00143 00145 enum CursorStates { 00146 CursorStatePoint, 00147 CursorStateSelect, 00148 CursorStateRectangle, 00149 CursorStatePieMenu, 00150 }; 00151 00152 /*---------------------------------------------------------------------------- 00153 -- Variables 00154 ----------------------------------------------------------------------------*/ 00155 00156 extern std::vector<CCursor> AllCursors; 00157 00158 extern CursorStates CursorState; 00159 extern int CursorAction; 00160 extern int CursorValue; 00161 extern CUnitType *CursorBuilding; 00162 00163 extern CCursor *GameCursor; 00164 extern int CursorX; 00165 extern int CursorY; 00166 extern int CursorStartX; 00167 extern int CursorStartY; 00168 extern int CursorStartScrMapX; 00169 extern int CursorStartScrMapY; 00170 00171 /*---------------------------------------------------------------------------- 00172 -- Functions 00173 ----------------------------------------------------------------------------*/ 00174 00176 extern void LoadCursors(); 00177 00179 extern CCursor *CursorByIdent(const std::string &ident); 00180 00182 extern void DrawCursor(void); 00184 extern void HideCursor(void); 00186 extern void CursorAnimate(unsigned ticks); 00187 00189 extern void InitVideoCursors(void); 00191 extern void CleanCursors(void); 00192 00194 00195 #endif // !__CURSOR_H__
1.5.6