____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
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"#include <editor.h>
Public Member Functions | |
| CEditor () | |
| ~CEditor () | |
| void | Init () |
Public Attributes | |
| std::vector< std::string > | UnitTypes |
| Sorted editor unit-type table. | |
| std::vector< const CUnitType * > | ShownUnitTypes |
| Shown editor unit-type table. | |
| std::vector< CPatchIcon > | ShownPatchTypes |
| Shown editor patch-type table. | |
| IconConfig | Select |
| Editor's select icon. | |
| IconConfig | Units |
| Editor's units icon. | |
| IconConfig | Patch |
| Editor's patch icon. | |
| std::string | StartUnitName |
| name of the Unit used to display the start location. | |
| const CUnitType * | StartUnit |
| Unit used to display the start location. | |
| int | UnitIndex |
| Unit icon draw index. | |
| int | CursorUnitIndex |
| Unit icon under cursor. | |
| int | SelectedUnitIndex |
| Unit type to draw. | |
| int | PatchIndex |
| Patch icon draw index. | |
| int | CursorPatchIndex |
| Patch icon under cursor. | |
| int | SelectedPatchIndex |
| Patch type to draw. | |
| int | CursorPlayer |
| Player under the cursor. | |
| int | SelectedPlayer |
| Player selected for draw. | |
| bool | MapLoaded |
| Map loaded in editor. | |
| bool | ShowPatchOutlines |
| Show outlines around patches. | |
| Uint32 | PatchOutlineColor |
| Patch outline color. | |
| EditorRunningType | Running |
| Editor is running. | |
| EditorStateType | State |
| Current editor state. | |
Definition at line 68 of file editor.h.
| void CEditor::Init | ( | ) |
Create editor.
Definition at line 1728 of file editloop.cpp.
References ButtonPanelHeight, ButtonPanelWidth, _event_callback_::ButtonPressed, _event_callback_::ButtonReleased, CalculateMaxIconSize(), CalculateVisibleIcons(), CclGarbageCollect(), CL_OPEN_READ, CFile::close(), ColorBlack, CreateGame(), CreatePatchIcons(), CreatePlayer(), CurrentMapPath, EditorCallbackButtonDown(), EditorCallbackButtonUp(), EditorCallbackExit(), EditorCallbackKeyDown(), EditorCallbackKeyRepeated(), EditorCallbackKeyUp(), EditorCallbackMouse(), EditorCallbacks, EditorRedoActions, EditorStartFile, EditorUndoActions, CMap::Fields, FlagRevealMap, GameSettings, CVideo::Height, IconConfig::Icon, CMap::Info, CUnitCache::Init(), InitPlayers(), InitUnitTypes(), _event_callback_::KeyPressed, _event_callback_::KeyReleased, _event_callback_::KeyRepeated, LibraryFileName(), IconConfig::Load(), LuaLoadFile(), Map, CMapInfo::MapHeight, CMapInfo::MapWidth, _event_callback_::MouseExit, _event_callback_::MouseMoved, NetworkEvent(), _event_callback_::NetworkEvent, CMap::NoFogOfWar, CFile::open(), Patch, PatchOutlineColor, PlayerMax, PlayerNeutral, PlayerNobody, PlayerNumNeutral, Players, CMapInfo::PlayerSide, CMapInfo::PlayerType, RecalculateShownUnits(), ReplayRevealMap, Settings::Resources, Select, SelectedPatchIndex, SelectedPlayer, SettingsPresetMapDefault, ShowLoadProgress(), StartUnit, StartUnitName, ThisPlayer, UnitCache, Units, UnitTypeByIdent(), Video, CMap::Visible, and VisibleIcons.
Referenced by EditorMainLoop().
| std::vector<std::string> CEditor::UnitTypes |
Sorted editor unit-type table.
Definition at line 80 of file editor.h.
Referenced by CalculateMaxIconSize(), and RecalculateShownUnits().
| std::vector<const CUnitType *> CEditor::ShownUnitTypes |
Shown editor unit-type table.
Definition at line 81 of file editor.h.
Referenced by EditorUnitSliderListener::action(), DrawMapCursor(), DrawUnitIcons(), EditorCallbackButtonDown(), EditorCallbackMouse(), and RecalculateShownUnits().
| std::vector<CPatchIcon> CEditor::ShownPatchTypes |
Shown editor patch-type table.
Definition at line 83 of file editor.h.
Referenced by EditorPatchSliderListener::action(), CleanPatchIcons(), CreatePatchIcons(), DrawMapCursor(), DrawPatchIcons(), EditorCallbackButtonDown(), and EditorCallbackMouse().
Editor's select icon.
Definition at line 85 of file editor.h.
Referenced by DrawEditorPanel(), Init(), and SetEditorSelectIcon().
Editor's units icon.
Definition at line 86 of file editor.h.
Referenced by DrawEditorPanel(), Init(), and SetEditorUnitsIcon().
Editor's patch icon.
Definition at line 87 of file editor.h.
Referenced by DrawEditorPanel(), Init(), and SetEditorPatchIcon().
| std::string CEditor::StartUnitName |
name of the Unit used to display the start location.
Definition at line 88 of file editor.h.
Referenced by Init(), and SetEditorStartUnit().
| const CUnitType* CEditor::StartUnit |
Unit used to display the start location.
Definition at line 89 of file editor.h.
Referenced by DrawEditorPanel(), DrawMapCursor(), DrawStartLocations(), and Init().
Unit icon draw index.
Definition at line 91 of file editor.h.
Referenced by EditorUnitSliderListener::action(), DrawUnitIcons(), EditorCallbackMouse(), and RecalculateShownUnits().
Unit icon under cursor.
Definition at line 92 of file editor.h.
Referenced by DrawUnitIcons(), EditorCallbackButtonDown(), EditorCallbackMouse(), and RecalculateShownUnits().
Unit type to draw.
Definition at line 93 of file editor.h.
Referenced by DrawMapCursor(), DrawUnitIcons(), EditorCallbackButtonDown(), and RecalculateShownUnits().
Patch icon draw index.
Definition at line 95 of file editor.h.
Referenced by EditorPatchSliderListener::action(), DrawPatchIcons(), and EditorCallbackMouse().
Patch icon under cursor.
Definition at line 96 of file editor.h.
Referenced by DrawPatchIcons(), EditorCallbackButtonDown(), and EditorCallbackMouse().
Patch type to draw.
Definition at line 97 of file editor.h.
Referenced by DrawMapCursor(), DrawPatchIcons(), EditorCallbackButtonDown(), and Init().
Player under the cursor.
Definition at line 99 of file editor.h.
Referenced by DrawPlayers(), EditorCallbackButtonDown(), and EditorCallbackMouse().
Player selected for draw.
Definition at line 100 of file editor.h.
Referenced by DrawPlayers(), DrawUnitIcons(), EditorCallbackButtonDown(), EditorCallbackMouse(), and Init().
| bool CEditor::MapLoaded |
Show outlines around patches.
Definition at line 104 of file editor.h.
Referenced by CViewport::DrawMapBackgroundInViewport(), and EditorCallbackButtonDown().
| Uint32 CEditor::PatchOutlineColor |
Patch outline color.
Definition at line 105 of file editor.h.
Referenced by CViewport::DrawMapBackgroundInViewport(), and Init().
Editor is running.
Definition at line 107 of file editor.h.
Referenced by DrawBuildingCursor(), DrawCursor(), DrawGuichanWidgets(), CViewport::DrawMapBackgroundInViewport(), DrawUnitOn(), DrawUnitSelection(), EditorMainLoop(), HideCursor(), MenuScreen::stop(), UpdateDisplay(), and WaitEventsOneFrame().
Current editor state.
Definition at line 109 of file editor.h.
Referenced by DrawEditorPanel(), DrawMapCursor(), DrawUnitSelection(), EditorCallbackButtonDown(), EditorCallbackMouse(), and EditorMainLoop().
1.5.6