ItemSorter Class Reference

#include <ItemSorter.h>

List of all members.

Public Types

 X_FACE
 Y_FACE
 Z_FACE
enum  HitFace { X_FACE, Y_FACE, Z_FACE }

Public Member Functions

 ItemSorter (int Max_Items=2048)
 ~ItemSorter ()
void BeginDisplayList (RenderSurface *, sint32 camx, sint32 camy, sint32 camz)
void AddItem (sint32 x, sint32 y, sint32 z, uint32 shape_num, uint32 frame_num, uint32 item_flags, uint32 ext_flags, uint16 item_num=0)
void AddItem (Item *)
void PaintDisplayList (bool item_highlight=false)
uint16 Trace (sint32 x, sint32 y, HitFace *face=0, bool item_highlight=false)
void IncSortLimit ()
void DecSortLimit ()

Private Member Functions

bool PaintSortItem (SortItem *)
bool NullPaintSortItem (SortItem *)

Private Attributes

MainShapeArchiveshapes
RenderSurfacesurf
uint32 max_items
uint32 num_items
uint32 num_extra
SortItemitems
sint32 sort_limit
sint32 order_counter
sint32 cam_sx
sint32 cam_sy


Detailed Description

Definition at line 29 of file ItemSorter.h.


Member Enumeration Documentation

enum ItemSorter::HitFace

Enumerator:
X_FACE 
Y_FACE 
Z_FACE 

Definition at line 48 of file ItemSorter.h.


Constructor & Destructor Documentation

ItemSorter::ItemSorter ( int  Max_Items = 2048  ) 

Definition at line 548 of file ItemSorter.cpp.

References items, and max_items.

ItemSorter::~ItemSorter (  ) 

Definition at line 555 of file ItemSorter.cpp.

References items.


Member Function Documentation

void ItemSorter::AddItem ( Item  ) 

Definition at line 746 of file ItemSorter.cpp.

References AddItem(), SortItem::anim, ShapeInfo::animtype, cam_sx, cam_sy, RenderSurface::CheckClipped(), SortItem::clipped, SortItem::depends, SortItem::draw, SortItem::ext_flags, SortItem::f32x32, SortItem::fixed, SortItem::flags, SortItem::flat, Item::FLG_FLIPPED, Item::FLG_INVISIBLE, frame, SortItem::frame, Item::getExtFlags(), Item::getFlags(), Shape::getFrame(), Item::getFrame(), Item::getLerped(), Object::getObjId(), Item::getShape(), Item::getShapeInfo(), Item::getShapeObject(), ShapeFrame::height, ShapeInfo::is_draw(), ShapeInfo::is_fixed(), ShapeInfo::is_land(), ShapeInfo::is_noisy(), ShapeInfo::is_occl(), ShapeInfo::is_roof(), ShapeInfo::is_solid(), ShapeInfo::is_translucent(), SortItem::item_num, items, SortItem::land, max_items, SortItem::noisy, num_extra, num_items, SortItem::occl, SortItem::occluded, SortItem::occludes(), SortItem::order, SortItem::overlap(), perr, SortItem::roof, SortItem::shape, SortItem::shape_num, SortItem::solid, surf, SortItem::sx, SortItem::sx2, SortItem::sxbot, SortItem::sxleft, SortItem::sxright, SortItem::sxtop, SortItem::sy, SortItem::sy2, SortItem::sybot, SortItem::sytop, SortItem::trans, ShapeFrame::width, SortItem::x, ShapeInfo::x, x, SortItem::xleft, ShapeFrame::xoff, SortItem::y, ShapeInfo::y, y, SortItem::yfar, ShapeFrame::yoff, SortItem::z, ShapeInfo::z, and SortItem::ztop.

void ItemSorter::AddItem ( sint32  x,
sint32  y,
sint32  z,
uint32  shape_num,
uint32  frame_num,
uint32  item_flags,
uint32  ext_flags,
uint16  item_num = 0 
)

Definition at line 585 of file ItemSorter.cpp.

References SortItem::anim, ShapeInfo::animtype, cam_sx, cam_sy, RenderSurface::CheckClipped(), SortItem::clipped, SortItem::depends, SortItem::draw, SortItem::ext_flags, SortItem::f32x32, SortItem::fixed, SortItem::flags, SortItem::flat, Item::FLG_FLIPPED, Item::FLG_INVISIBLE, frame, SortItem::frame, Shape::getFrame(), ShapeArchive::getShape(), MainShapeArchive::getShapeInfo(), ShapeFrame::height, ShapeInfo::is_draw(), ShapeInfo::is_fixed(), ShapeInfo::is_land(), ShapeInfo::is_noisy(), ShapeInfo::is_occl(), ShapeInfo::is_roof(), ShapeInfo::is_solid(), ShapeInfo::is_translucent(), SortItem::item_num, items, SortItem::land, max_items, SortItem::noisy, num_extra, num_items, SortItem::occl, SortItem::occluded, SortItem::occludes(), SortItem::order, SortItem::overlap(), perr, SortItem::roof, SortItem::shape, SortItem::shape_num, shapes, SortItem::solid, surf, SortItem::sx, SortItem::sx2, SortItem::sxbot, SortItem::sxleft, SortItem::sxright, SortItem::sxtop, SortItem::sy, SortItem::sy2, SortItem::sybot, SortItem::sytop, SortItem::trans, ShapeFrame::width, SortItem::x, ShapeInfo::x, SortItem::xleft, ShapeFrame::xoff, SortItem::y, ShapeInfo::y, SortItem::yfar, ShapeFrame::yoff, SortItem::z, ShapeInfo::z, and SortItem::ztop.

Referenced by AddItem(), and GameMapGump::PaintThis().

void ItemSorter::BeginDisplayList ( RenderSurface ,
sint32  camx,
sint32  camy,
sint32  camz 
)

Definition at line 560 of file ItemSorter.cpp.

References cam_sx, cam_sy, GameData::get_instance(), GameData::getMainShapes(), items, max_items, num_extra, num_items, order_counter, shapes, and surf.

Referenced by GameMapGump::PaintThis().

void ItemSorter::DecSortLimit (  )  [inline]

Definition at line 66 of file ItemSorter.h.

References sort_limit.

Referenced by GameMapGump::IncSortOrder().

void ItemSorter::IncSortLimit (  )  [inline]

Definition at line 65 of file ItemSorter.h.

References sort_limit.

Referenced by GameMapGump::IncSortOrder().

bool ItemSorter::NullPaintSortItem ( SortItem  )  [private]

Definition at line 1034 of file ItemSorter.cpp.

References SortItem::depends, SortItem::occluded, SortItem::order, and order_counter.

Referenced by Trace().

void ItemSorter::PaintDisplayList ( bool  item_highlight = false  ) 

Definition at line 918 of file ItemSorter.cpp.

References SortItem::fixed, SortItem::flags, Item::FLG_DISPOSABLE, Item::FLG_FAST_ONLY, Item::FLG_FLIPPED, SortItem::frame, items, num_items, SortItem::order, order_counter, RenderSurface::PaintHighlightInvis(), PaintSortItem(), prev, SortItem::shape, surf, SortItem::sxbot, SortItem::sybot, and SortItem::trans.

Referenced by GameMapGump::PaintThis().

bool ItemSorter::PaintSortItem ( SortItem  )  [private]

Definition at line 952 of file ItemSorter.cpp.

References SortItem::clipped, SortItem::depends, SortItem::ext_flags, Item::EXT_HIGHLIGHT, Item::EXT_TRANSPARENT, SortItem::flags, Item::FLG_FLIPPED, WeaponOverlayFrame::frame, SortItem::frame, GameData::get_instance(), getMainActor(), GameData::getMainShapes(), ShapeArchive::getShape(), MainActor::getWeaponOverlay(), SortItem::item_num, SortItem::occluded, SortItem::order, order_counter, RenderSurface::Paint(), RenderSurface::PaintHighlight(), RenderSurface::PaintHighlightInvis(), RenderSurface::PaintInvisible(), RenderSurface::PaintMirrored(), RenderSurface::PaintNoClip(), RenderSurface::PaintTranslucent(), pout, prev, SortItem::shape, SortItem::shape_num, sort_limit, surf, SortItem::sxbot, SortItem::sybot, SortItem::trans, SortItem::x, SortItem::xleft, WeaponOverlayFrame::xoff, SortItem::y, SortItem::yfar, WeaponOverlayFrame::yoff, SortItem::z, and SortItem::ztop.

Referenced by PaintDisplayList().

uint16 ItemSorter::Trace ( sint32  x,
sint32  y,
HitFace face = 0,
bool  item_highlight = false 
)

Definition at line 1063 of file ItemSorter.cpp.

References SortItem::fixed, SortItem::flags, Item::FLG_DISPOSABLE, Item::FLG_FAST_ONLY, Item::FLG_FLIPPED, SortItem::frame, frame, Shape::getFrame(), ShapeFrame::hasPoint(), if(), SortItem::item_num, items, NullPaintSortItem(), num_items, SortItem::order, order_counter, SortItem::shape, SortItem::sx2, SortItem::sxbot, SortItem::sy2, SortItem::sybot, X_FACE, Y_FACE, SortItem::z, Z_FACE, and SortItem::ztop.

Referenced by GameMapGump::TraceCoordinates(), and GameMapGump::TraceObjId().


Member Data Documentation

sint32 ItemSorter::cam_sx [private]

Definition at line 42 of file ItemSorter.h.

Referenced by AddItem(), and BeginDisplayList().

sint32 ItemSorter::cam_sy [private]

Definition at line 42 of file ItemSorter.h.

Referenced by AddItem(), and BeginDisplayList().

SortItem* ItemSorter::items [private]

Definition at line 37 of file ItemSorter.h.

Referenced by AddItem(), BeginDisplayList(), ItemSorter(), PaintDisplayList(), Trace(), and ~ItemSorter().

uint32 ItemSorter::max_items [private]

Definition at line 34 of file ItemSorter.h.

Referenced by AddItem(), BeginDisplayList(), and ItemSorter().

uint32 ItemSorter::num_extra [private]

Definition at line 36 of file ItemSorter.h.

Referenced by AddItem(), and BeginDisplayList().

uint32 ItemSorter::num_items [private]

Definition at line 35 of file ItemSorter.h.

Referenced by AddItem(), BeginDisplayList(), PaintDisplayList(), and Trace().

sint32 ItemSorter::order_counter [private]

Definition at line 40 of file ItemSorter.h.

Referenced by BeginDisplayList(), NullPaintSortItem(), PaintDisplayList(), PaintSortItem(), and Trace().

MainShapeArchive* ItemSorter::shapes [private]

Definition at line 31 of file ItemSorter.h.

Referenced by AddItem(), and BeginDisplayList().

sint32 ItemSorter::sort_limit [private]

Definition at line 38 of file ItemSorter.h.

Referenced by DecSortLimit(), IncSortLimit(), and PaintSortItem().

RenderSurface* ItemSorter::surf [private]

Definition at line 32 of file ItemSorter.h.

Referenced by AddItem(), BeginDisplayList(), PaintDisplayList(), and PaintSortItem().


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