| 
									
										
										
										
											2007-07-26 12:00:18 +00:00
										 |  |  | #ifndef CTOWNHANDLER_H
 | 
					
						
							|  |  |  | #define CTOWNHANDLER_H
 | 
					
						
							|  |  |  | #include "CDefHandler.h"
 | 
					
						
							| 
									
										
										
										
											2007-07-28 23:01:25 +00:00
										 |  |  | #include "CCreatureHandler.h"
 | 
					
						
							| 
									
										
										
										
											2007-07-26 12:00:18 +00:00
										 |  |  | #include "SDL.h"
 | 
					
						
							| 
									
										
										
										
											2007-07-28 23:01:25 +00:00
										 |  |  | #include "int3.h"
 | 
					
						
							| 
									
										
										
										
											2007-07-26 12:00:18 +00:00
										 |  |  | #include <string>
 | 
					
						
							|  |  |  | #include <vector>
 | 
					
						
							|  |  |  | class CTown | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  | 	std::string name; | 
					
						
							|  |  |  | 	int bonus; //pic number
 | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | class CTownHandler | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	CDefHandler * smallIcons; | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  | 	CTownHandler(); | 
					
						
							|  |  |  | 	~CTownHandler(); | 
					
						
							|  |  |  | 	std::vector<CTown> towns; | 
					
						
							|  |  |  | 	void loadNames(); | 
					
						
							|  |  |  | 	SDL_Surface * getPic(int ID, bool fort=true, bool builded=false); //ID=-1 - blank; -2 - border; -3 - random
 | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
										
										
											2007-07-28 15:23:15 +00:00
										 |  |  | class CTownInstance | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2007-07-28 23:01:25 +00:00
										 |  |  | 	int type; //type of town
 | 
					
						
							|  |  |  | 	int owner; //ID of owner
 | 
					
						
							|  |  |  | 	int3 pos; //position
 | 
					
						
							|  |  |  | 	CTown * town; | 
					
						
							|  |  |  | 	std::string name; // name of town
 | 
					
						
							|  |  |  | 	CCreatureSet garrison; | 
					
						
							|  |  |  | 	int builded; //how many buildings has been built this turn
 | 
					
						
							|  |  |  | 	int destroyed; //how many buildings has been destroyed this turn
 | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	//TODO:
 | 
					
						
							|  |  |  | 	//buildings
 | 
					
						
							|  |  |  | 	//creatures to be recruited
 | 
					
						
							|  |  |  | 	//hero in garrison
 | 
					
						
							|  |  |  | 	//spells in mage guild
 | 
					
						
							| 
									
										
										
										
											2007-07-28 15:23:15 +00:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2007-07-26 12:00:18 +00:00
										 |  |  | #endif //CTOWNHANDLER_H
 |