File: editor.pkg

package info (click to toggle)
boswars 2.7%2Bsvn160110-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 97,132 kB
  • sloc: cpp: 57,441; python: 1,759; makefile: 34; sh: 26
file content (36 lines) | stat: -rw-r--r-- 992 bytes parent folder | download | duplicates (5)
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
$#include "editor.h"

enum EditorRunningType {
	EditorNotRunning = 0,    /// Not Running
	EditorStarted = 1,       /// Editor Enabled at all
	EditorCommandLine = 2,   /// Called from Command Line
	EditorEditing = 4,       /// Editor is fully running
};

class CEditor
{
	vector<string> UnitTypes;
	const CUnitType *StartUnit;
	bool ShowTerrainFlags;
	EditorRunningType Running;

	void TileSelectedPatch();
};

// The C++ functions may have const std::string & parameters, but
// don't tell tolua++ about the references, because it would ignore
// the const and generate code to copy the modified strings to
// additional Lua return values.

extern void SetEditorSelectIcon(std::string icon);
extern void SetEditorUnitsIcon(std::string icon);
extern void SetEditorPatchIcon(std::string icon);
extern void SetEditorStartUnit(std::string name);

extern CEditor Editor;

void StartEditor(std::string filename);
int EditorSaveMap(std::string file);

void StartPatchEditor(std::string patchName);