____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
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 <patch_type.h>
Public Member Functions | |
| CPatchType (const std::string &name, const std::string &file, int tileWidth, int tileHeight, unsigned short *flags) | |
| ~CPatchType () | |
| void | load () |
| void | clean () |
| const std::string & | getName () const |
| const std::string & | getFile () const |
| const CGraphic * | getGraphic () const |
| int | getTileWidth () const |
| int | getTileHeight () const |
| unsigned short | getFlag (int x, int y) const |
| void | setFlag (int x, int y, unsigned short flag) |
| unsigned short * | getFlags () |
Definition at line 36 of file patch_type.h.
| CPatchType::CPatchType | ( | const std::string & | name, | |
| const std::string & | file, | |||
| int | tileWidth, | |||
| int | tileHeight, | |||
| unsigned short * | flags | |||
| ) | [inline] |
Patch type constructor
Definition at line 42 of file patch_type.h.
| CPatchType::~CPatchType | ( | ) | [inline] |
| void CPatchType::load | ( | ) | [inline] |
Load the patch type
Definition at line 62 of file patch_type.h.
References CGraphic::Load(), and CGraphic::New().
| void CPatchType::clean | ( | ) | [inline] |
| const std::string& CPatchType::getName | ( | ) | const [inline] |
Get the name
Definition at line 82 of file patch_type.h.
Referenced by PatchSaveButtonListener::action(), EditorCallbackButtonDown(), EditorCallbackMouse(), CPatchManager::savePatchType(), and ShowPatchInfo().
| const std::string& CPatchType::getFile | ( | ) | const [inline] |
| const CGraphic* CPatchType::getGraphic | ( | ) | const [inline] |
Get the graphic
Definition at line 92 of file patch_type.h.
Referenced by CreatePatchIcons(), DoScroll(), CViewport::DrawMapBackgroundInViewport(), DrawPatch(), GetColor(), and CPatchManager::savePatchType().
| int CPatchType::getTileWidth | ( | ) | const [inline] |
Get the tile width of the patch
Definition at line 97 of file patch_type.h.
Referenced by CPatchManager::add(), DrawGrids(), CViewport::DrawMapBackgroundInViewport(), DrawMapCursor(), DrawPatchTileIcons(), EditorCallbackMouse(), CPatchManager::move(), CPatchManager::moveToBottom(), CPatchManager::moveToTop(), CPatchManager::remove(), CPatchManager::savePatchType(), and StartPatchEditor().
| int CPatchType::getTileHeight | ( | ) | const [inline] |
Get the tile height of the patch
Definition at line 102 of file patch_type.h.
Referenced by CPatchManager::add(), DrawGrids(), CViewport::DrawMapBackgroundInViewport(), DrawMapCursor(), DrawPatchTileIcons(), EditorCallbackMouse(), CPatchManager::move(), CPatchManager::moveToBottom(), CPatchManager::moveToTop(), PatchEditorCallbackMouse(), CPatchManager::remove(), CPatchManager::savePatchType(), and StartPatchEditor().
| unsigned short CPatchType::getFlag | ( | int | x, | |
| int | y | |||
| ) | const [inline] |
Get the tile flag at a tile location
Definition at line 107 of file patch_type.h.
References Assert.
Referenced by DrawPatchTileIcons(), CPatchManager::getPatch(), PatchEditorCallbackButtonDown(), PatchEditorCallbackMouse(), and CPatchManager::savePatchType().
| void CPatchType::setFlag | ( | int | x, | |
| int | y, | |||
| unsigned short | flag | |||
| ) | [inline] |
Set the tile flag at a tile location
Definition at line 116 of file patch_type.h.
References Assert.
Referenced by PatchEditorCallbackButtonDown(), and PatchEditorCallbackMouse().
| unsigned short* CPatchType::getFlags | ( | ) | [inline] |
Get all of the tile flags
Definition at line 125 of file patch_type.h.
Referenced by StartPatchEditor().
1.5.6