00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef edmiscH
00022 #define edmiscH
00023
00024 #include <string.h>
00025 #include <stdlib.h>
00026 #include <cstdlib>
00027 #include <ctype.h>
00028
00029 #include "pgpopupmenu.h"
00030
00031 #include "typen.h"
00032 #include "basegfx.h"
00033 #include "mappolygons.h"
00034 #include "misc.h"
00035 #include "newfont.h"
00036 #include "events.h"
00037 #include "loaders.h"
00038 #include "dlg_box.h"
00039 #include "spfst.h"
00040 #include "dialog.h"
00041 #include "strtmesg.h"
00042 #include "palette.h"
00043 #include "mapalgorithms.h"
00044
00045
00046 extern bool mousePressedOnField( const MapCoordinate& pos, const SPoint& mousePos, bool cursorChanged, int button, int prio );
00047 extern bool mouseDraggedToField( const MapCoordinate& pos, const SPoint& mousePos, bool cursorChanged, int prio );
00048
00049 class tputresources : public SearchFields {
00050 int resourcetype;
00051 int maxresource;
00052 int minresource;
00053 int maxdst;
00054 MapCoordinate centerPos;
00055 public:
00056 void init ( int sx , int sy, int dst, int restype, int resmax, int resmin );
00057 virtual void testfield ( const MapCoordinate& mc );
00058 tputresources ( GameMap* _gamemap ) : SearchFields ( _gamemap ) {};
00059 };
00060
00061 class tputresourcesdlg : public tdialogbox {
00062 int resourcetype;
00063 int restp2;
00064 int maxresource;
00065 int minresource;
00066 int dist;
00067 int status;
00068 public:
00069 void init ( void );
00070 void run ( void );
00071 void buttonpressed ( int id );
00072 };
00073
00074
00075
00076 extern bool mapsaved;
00077
00078 extern void setstartvariables(void);
00079 extern void exchg(int *a1,int *a2);
00080 extern void k_savemap(char saveas);
00081 extern void k_loadmap(void);
00082 extern void lines(int x1,int y,int x2,int y2);
00083
00084 extern void changeunitvalues(Vehicle* ae);
00085 extern void changeresource(void);
00086 extern void changebuildingvalues( Building& b);
00087 extern void changeminestrength(void);
00088 extern void newmap(void);
00089 extern void cargoEditor ( ContainerBase* container );
00090
00091 extern void playerchange(void);
00092
00093
00094 extern void editpolygon (Poly_gon& poly);
00095
00096
00097 extern MapField* getactfield();
00098
00099
00100 extern void selectunitsetfilter ( void );
00101 extern void movebuilding();
00102 extern void unitsettransformation( void );
00103
00105 class MapSwitcher {
00106 int active;
00107 class Mappntr {
00108 public:
00109 GameMap* map;
00110 bool changed;
00111 MapCoordinate cursorpos;
00112 MapCoordinate windowpos;
00113 Mappntr ( ) : map ( NULL ), changed ( false ) {};
00114 } maps[2];
00115 public:
00116 enum Action { select, set };
00117
00118 Action getDefaultAction ( );
00119 void toggle ();
00120 string getName ();
00121 void deleteMaps();
00122 MapSwitcher ( ) : active ( 0 ) {};
00123 };
00124
00125 extern MapSwitcher mapSwitcher;
00126
00128 extern void transformMap();
00129
00130 extern void editArchivalInformation();
00131
00133 extern void resourceComparison ( );
00134
00136 extern void unitProductionLimitation();
00137
00138
00139 extern void saveClipboard();
00140 extern void readClipboard();
00141 extern void setweatherall ( int weather );
00142 extern void editResearch();
00143 extern void editResearchPoints();
00144 extern void generateTechTree();
00145 extern void editTechAdapter();
00146
00147
00148
00149
00150 extern void placeCurrentItem();
00151 extern bool removeCurrentItem();
00152
00153 extern void locateItemByID();
00154 extern void mirrorMap();
00155 extern void copyArea();
00156 extern void pasteArea();
00157 extern void testDebugFunction();
00158
00159 extern void selectAndRunLuaScript( const ASCString& filenamewildcard );
00160
00161 #endif