____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       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"

editor.h File Reference

The editor file. More...

#include <vector>
#include <string>
#include "icons.h"

Go to the source code of this file.

Classes

struct  CPatchIcon
class  CEditor

Enumerations

enum  EditorRunningType { EditorNotRunning = 0, EditorStarted = 1, EditorCommandLine = 2, EditorEditing = 4 }
enum  EditorStateType { EditorSelecting, EditorEditPatch, EditorEditUnit, EditorSetStartLocation }

Functions

void SetEditorSelectIcon (const std::string &icon)
void SetEditorUnitsIcon (const std::string &icon)
void SetEditorPatchIcon (const std::string &icon)
void SetEditorStartUnit (const std::string &name)
 Start the editor.
void StartEditor (const std::string &filename)
 Save a map from editor.
int EditorSaveMap (const std::string &file)
 Start the patch editor.
void StartPatchEditor (const std::string &patchName)

Variables

CEditor Editor
const char * EditorStartFile
 Editor CCL start file.
bool PatchEditorRunning


Detailed Description

The editor file.

Definition in file editor.h.


Enumeration Type Documentation

Enumerator:
EditorNotRunning  Not Running.
EditorStarted  Editor Enabled at all.
EditorCommandLine  Called from Command Line.
EditorEditing  Editor is fully running.

Definition at line 44 of file editor.h.

Enumerator:
EditorSelecting  Select.
EditorEditPatch  Edit patch.
EditorEditUnit  Edit units.
EditorSetStartLocation  Set the start location.

Definition at line 51 of file editor.h.


Function Documentation

int EditorSaveMap ( const std::string &  file  ) 

Start the patch editor.

Save a map from editor.

Parameters:
file Save 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

Definition at line 1855 of file editloop.cpp.

References Map, SaveStratagusMap(), and StratagusLibPath.

Referenced by tolua_stratagus_EditorSaveMap00().

void SetEditorPatchIcon ( const std::string &  icon  ) 

Set the editor's patch icon

Parameters:
icon The icon to use.

Definition at line 213 of file editloop.cpp.

References IconConfig::Name, and CEditor::Patch.

Referenced by tolua_stratagus_SetEditorPatchIcon00().

void SetEditorSelectIcon ( const std::string &  icon  ) 

Set the editor's select icon

Parameters:
icon The icon to use.

Definition at line 193 of file editloop.cpp.

References IconConfig::Name, and CEditor::Select.

Referenced by tolua_stratagus_SetEditorSelectIcon00().

void SetEditorStartUnit ( const std::string &  name  ) 

Start the editor.

Set the editor's start location unit

Parameters:
name The name of the unit to use.

Definition at line 223 of file editloop.cpp.

References CEditor::StartUnitName.

Referenced by tolua_stratagus_SetEditorStartUnit00().

void SetEditorUnitsIcon ( const std::string &  icon  ) 

Set the editor's units icon

Parameters:
icon The icon to use.

Definition at line 203 of file editloop.cpp.

References IconConfig::Name, and CEditor::Units.

Referenced by tolua_stratagus_SetEditorUnitsIcon00().

void StartEditor ( const std::string &  filename  ) 

void StartPatchEditor ( const std::string &  patchName  ) 


Variable Documentation

const char* EditorStartFile

Editor CCL start file.

Definition at line 88 of file editloop.cpp.

Referenced by CEditor::Init(), and main().


Generated on Sat Feb 21 00:28:16 2009 for Bos Wars by  doxygen 1.5.6