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

       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"

CPatchType Class Reference

#include <patch_type.h>

List of all members.

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 ()


Detailed Description

Definition at line 36 of file patch_type.h.


Constructor & Destructor Documentation

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]

Patch type destructor

Definition at line 53 of file patch_type.h.

References CGraphic::Free().


Member Function Documentation

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]

Clean the allocated memory

Definition at line 73 of file patch_type.h.

References CGraphic::Free().

const std::string& CPatchType::getName (  )  const [inline]

const std::string& CPatchType::getFile (  )  const [inline]

Get the file name

Definition at line 87 of file patch_type.h.

Referenced by StartPatchEditor().

const CGraphic* CPatchType::getGraphic (  )  const [inline]

int CPatchType::getTileWidth (  )  const [inline]

int CPatchType::getTileHeight (  )  const [inline]

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().


The documentation for this class was generated from the following file:

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