_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes
editor.h File Reference
#include <vector>
#include <string>
#include "icons.h"
#include "vec2i.h"

Go to the source code of this file.

Classes

class  CEditor
 

editor.h - The editor file.

enum  EditorRunningType { EditorNotRunning = 0, EditorStarted = 1, EditorCommandLine = 2, EditorEditing = 4 }
 
enum  EditorStateType { EditorSelecting, EditorEditTile, EditorEditUnit, EditorSetStartLocation }
 
CEditor Editor
 
char TileToolRandom
 
void StartEditor (const char *filename)
 Start the editor. More...
 
void EditorMainLoop ()
 Editor main event loop. More...
 
void EditorUpdateDisplay ()
 Update editor display. More...
 
int EditorSaveMap (const std::string &file)
 Save a map from editor. More...
 
void EditorCclRegister ()
 Register ccl features. More...
 
void EditorTileChanged (const Vec2i &pos)
 Update surroundings for tile changes. More...
 
void EditorChangeTile (const Vec2i &pos, int tileIndex, int d)
 

Enumeration Type Documentation

Enumerator
EditorNotRunning 
EditorStarted 

Not Running.

EditorCommandLine 

Editor Enabled at all.

EditorEditing 

Called from Command Line.

Enumerator
EditorSelecting 
EditorEditTile 

Select.

EditorEditUnit 

Edit tiles.

EditorSetStartLocation 

Edit units.

Set the start location

Function Documentation

void EditorCclRegister ( )

Register ccl features.

Register CCL features for the editor.

void EditorChangeTile ( const Vec2i pos,
int  tileIndex,
int  d 
)

Editor change tile.

Parameters
posmap tile coordinate.
tileIndexTile type to edit.
dFix direction flag 8 up, 4 down, 2 left, 1 right.
void EditorMainLoop ( )

Editor main event loop.

Editor main event loop.

int EditorSaveMap ( const std::string &  file)

Save a map from editor.

Save a map from editor.

Parameters
fileSave the level to this file.
Returns
0 for success, -1 for error
Todo:
FIXME: Check if the map is valid, contains no failures. At least two players, one human slot, every player a startpoint ...
void EditorTileChanged ( const Vec2i pos)

Update surroundings for tile changes.

Update surroundings for tile changes.

Parameters
posMap tile position of change.
void EditorUpdateDisplay ( )

Update editor display.

Update editor display.

void StartEditor ( const char *  filename)

Start the editor.

Start the editor

Parameters
filenameMap to load, NULL to create a new map

Variable Documentation

CEditor Editor
char TileToolRandom
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.