MiniMapGump Class Reference

#include <MiniMapGump.h>

Inheritance diagram for MiniMapGump:

Gump Object List of all members.

Public Member Functions

 ENABLE_RUNTIME_CLASSTYPE ()
 MiniMapGump (void)
 MiniMapGump (int x, int y)
virtual ~MiniMapGump (void)
virtual void PaintThis (RenderSurface *surf, sint32 lerp_factor, bool scaled)
virtual uint16 TraceObjId (int mx, int my)
bool loadData (IDataSource *ids, uint32 version)

Static Public Member Functions

static void ConCmd_toggle (const Console::ArgvType &argv)
static void ConCmd_generateWholeMap (const Console::ArgvType &argv)

Protected Member Functions

virtual void saveData (ODataSource *ods)

Private Member Functions

uint32 sampleAtPoint (int x, int y, CurrentMap *map)

Private Attributes

Texture minimap
unsigned int lastMapNum
uint32 texbuffer [MAP_NUM_CHUNKS *MINMAPGUMP_SCALE][MAP_NUM_CHUNKS *MINMAPGUMP_SCALE]

Detailed Description

Definition at line 28 of file MiniMapGump.h.


Constructor & Destructor Documentation

MiniMapGump::MiniMapGump ( void   ) 

Definition at line 46 of file MiniMapGump.cpp.

References con, ConCmd_generateWholeMap(), and Console::RemoveConsoleCommand().

Referenced by ConCmd_toggle().

MiniMapGump::MiniMapGump ( int  x,
int  y 
)

Definition at line 34 of file MiniMapGump.cpp.

References Console::AddConsoleCommand(), Texture::buffer, con, ConCmd_generateWholeMap(), Texture::format, Texture::height, minimap, TEX_FMT_NATIVE, texbuffer, and Texture::width.

MiniMapGump::~MiniMapGump ( void   )  [virtual]

Definition at line 51 of file MiniMapGump.cpp.

References con, ConCmd_generateWholeMap(), and Console::RemoveConsoleCommand().


Member Function Documentation

void MiniMapGump::ConCmd_generateWholeMap ( const Console::ArgvType argv  )  [static]

"MiniMapGump::generateWholeMap" console command

Definition at line 190 of file MiniMapGump.cpp.

References World::get_instance(), World::getCurrentMap(), and CurrentMap::setWholeMapFast().

Referenced by loadData(), MiniMapGump(), and ~MiniMapGump().

void MiniMapGump::ConCmd_toggle ( const Console::ArgvType argv  )  [static]

"MiniMapGump::toggle" console command

Definition at line 173 of file MiniMapGump.cpp.

References Gump::Close(), Gump::FindGump(), GUIApp::get_instance(), GUIApp::getDesktopGump(), Gump::InitGump(), MiniMapGump(), Gump::setRelativePosition(), and Gump::TOP_LEFT.

Referenced by GUIApp::shutdownGame(), and GUIApp::startupGame().

MiniMapGump::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from Gump.

bool MiniMapGump::loadData ( IDataSource ids,
uint32  version 
)

Reimplemented from Gump.

Definition at line 213 of file MiniMapGump.cpp.

References Console::AddConsoleCommand(), Texture::buffer, con, ConCmd_generateWholeMap(), Texture::format, Texture::height, lastMapNum, Gump::loadData(), minimap, TEX_FMT_NATIVE, texbuffer, and Texture::width.

void MiniMapGump::PaintThis ( RenderSurface surf,
sint32  lerp_factor,
bool  scaled 
) [virtual]

Overloadable method to Paint just this Gump (RenderSurface is relative to this).

Reimplemented from Gump.

Definition at line 56 of file MiniMapGump.cpp.

References RenderSurface::Blit(), RenderSurface::Fill32(), World::get_instance(), CurrentMap::getChunkSize(), World::getCurrentMap(), Item::getLocation(), getMainActor(), CurrentMap::getNum(), CurrentMap::isChunkFast(), lastMapNum, minimap, sampleAtPoint(), texbuffer, Gump::x, and Gump::y.

uint32 MiniMapGump::sampleAtPoint ( int  x,
int  y,
CurrentMap map 
) [private]

Definition at line 128 of file MiniMapGump.cpp.

References frame, RenderSurface::Gamma10toGamma22, RenderSurface::Gamma22toGamma10, Item::getFootpadWorld(), Item::getFrame(), Shape::getFrame(), Item::getLocation(), Shape::getPalette(), ShapeFrame::getPixelAtPoint(), Item::getShapeObject(), ShapeFrame::hasPoint(), pal, ShapeInfo::SI_LAND, ShapeInfo::SI_OCCL, ShapeInfo::SI_ROOF, ShapeInfo::SI_SEA, and CurrentMap::traceTopItem().

Referenced by PaintThis().

void MiniMapGump::saveData ( ODataSource ods  )  [protected, virtual]

save the actual Object data

Reimplemented from Gump.

Definition at line 208 of file MiniMapGump.cpp.

References Gump::saveData().

uint16 MiniMapGump::TraceObjId ( int  mx,
int  my 
) [virtual]

Trace a click, and return ObjId.

Reimplemented from Gump.

Definition at line 197 of file MiniMapGump.cpp.

References Object::getObjId(), Object::objid, Gump::PointOnGump(), and Gump::TraceObjId().


Member Data Documentation

unsigned int MiniMapGump::lastMapNum [private]

Definition at line 31 of file MiniMapGump.h.

Referenced by loadData(), and PaintThis().

Texture MiniMapGump::minimap [private]

Definition at line 30 of file MiniMapGump.h.

Referenced by loadData(), MiniMapGump(), and PaintThis().

uint32 MiniMapGump::texbuffer[MAP_NUM_CHUNKS *MINMAPGUMP_SCALE][MAP_NUM_CHUNKS *MINMAPGUMP_SCALE] [private]

Definition at line 32 of file MiniMapGump.h.

Referenced by loadData(), MiniMapGump(), and PaintThis().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:29:36 2007 for pentagram by  doxygen 1.4.7