BWAPI
Public Member Functions | Private Attributes
DrawBufferClass Class Reference

#include <DrawBuffer.h>

List of all members.

Public Member Functions

 DrawBufferClass ()
void update ()
void drawBufferedText (BWAPI::CoordinateType::Enum ctype, int x, int y, std::string text, int frameTime, BufferedCategory ID=BufferedCategory::Default)
void drawBufferedBox (BWAPI::CoordinateType::Enum ctype, int left, int top, int right, int bottom, int frameTime, BWAPI::Color color=BWAPI::Colors::Green, bool isSolid=false, BufferedCategory ID=BufferedCategory::Default)
void drawBufferedCircle (BWAPI::CoordinateType::Enum ctype, int x, int y, int radius, int frameTime, BWAPI::Color color=BWAPI::Colors::Green, bool isSolid=false, BufferedCategory ID=BufferedCategory::Default)
void drawBufferedEllipse (BWAPI::CoordinateType::Enum ctype, int x, int y, int radiusX, int radiusY, int frameTime, BWAPI::Color color=BWAPI::Colors::Green, bool isSolid=false, BufferedCategory ID=BufferedCategory::Default)
void drawBufferedDot (BWAPI::CoordinateType::Enum ctype, int x, int y, int frameTime, BWAPI::Color color=BWAPI::Colors::Green, BufferedCategory ID=BufferedCategory::Default)
void drawBufferedLine (BWAPI::CoordinateType::Enum ctype, int x1, int y1, int x2, int y2, int frameTime, BWAPI::Color color=BWAPI::Colors::Green, BufferedCategory ID=BufferedCategory::Default)
void drawBufferedTriangle (BWAPI::CoordinateType::Enum ctype, int x1, int y1, int x2, int y2, int x3, int y3, int frameTime, BWAPI::Color color=BWAPI::Colors::Green, bool isSolid=false, BufferedCategory ID=BufferedCategory::Default)
void clearBuffer (BufferedCategory ID)

Private Attributes

boost::ptr_multimap
< BufferedCategory,
BufferedItem
m_BufferedItems

Detailed Description

Definition at line 9 of file DrawBuffer.h.


Constructor & Destructor Documentation

Definition at line 11 of file DrawBuffer.cpp.

{
}

Member Function Documentation

Definition at line 67 of file DrawBuffer.cpp.

References m_BufferedItems.

{
        m_BufferedItems.erase(ID);
}
void DrawBufferClass::drawBufferedBox ( BWAPI::CoordinateType::Enum  ctype,
int  left,
int  top,
int  right,
int  bottom,
int  frameTime,
BWAPI::Color  color = BWAPI::Colors::Green,
bool  isSolid = false,
BufferedCategory  ID = BufferedCategory::Default 
)

Definition at line 37 of file DrawBuffer.cpp.

References BWAPI::Broodwar, and m_BufferedItems.

{
        m_BufferedItems.insert(ID, new BufferedBox(ctype, ID, frameTime + BWAPI::Broodwar->getFrameCount(), left, top, right, bottom, color, isSolid));
}
void DrawBufferClass::drawBufferedCircle ( BWAPI::CoordinateType::Enum  ctype,
int  x,
int  y,
int  radius,
int  frameTime,
BWAPI::Color  color = BWAPI::Colors::Green,
bool  isSolid = false,
BufferedCategory  ID = BufferedCategory::Default 
)

Definition at line 42 of file DrawBuffer.cpp.

References BWAPI::Broodwar, and m_BufferedItems.

{
        m_BufferedItems.insert(ID, new BufferedCircle(ctype, ID, frameTime + BWAPI::Broodwar->getFrameCount(), x, y, radius, color, isSolid));
}

Definition at line 52 of file DrawBuffer.cpp.

References BWAPI::Broodwar, and m_BufferedItems.

{
        m_BufferedItems.insert(ID, new BufferedDot(ctype, ID, frameTime + BWAPI::Broodwar->getFrameCount(), x, y, color));
}
void DrawBufferClass::drawBufferedEllipse ( BWAPI::CoordinateType::Enum  ctype,
int  x,
int  y,
int  radiusX,
int  radiusY,
int  frameTime,
BWAPI::Color  color = BWAPI::Colors::Green,
bool  isSolid = false,
BufferedCategory  ID = BufferedCategory::Default 
)

Definition at line 47 of file DrawBuffer.cpp.

References BWAPI::Broodwar, and m_BufferedItems.

{
        m_BufferedItems.insert(ID, new BufferedEllipse(ctype, ID, frameTime + BWAPI::Broodwar->getFrameCount(), x, y, radiusX, radiusY, color, isSolid));
}
void DrawBufferClass::drawBufferedLine ( BWAPI::CoordinateType::Enum  ctype,
int  x1,
int  y1,
int  x2,
int  y2,
int  frameTime,
BWAPI::Color  color = BWAPI::Colors::Green,
BufferedCategory  ID = BufferedCategory::Default 
)

Definition at line 57 of file DrawBuffer.cpp.

References BWAPI::Broodwar, and m_BufferedItems.

{
        m_BufferedItems.insert(ID, new BufferedLine(ctype, ID, frameTime + BWAPI::Broodwar->getFrameCount(), x1, y1, x2, y2, color));
}
void DrawBufferClass::drawBufferedText ( BWAPI::CoordinateType::Enum  ctype,
int  x,
int  y,
std::string  text,
int  frameTime,
BufferedCategory  ID = BufferedCategory::Default 
)

Definition at line 32 of file DrawBuffer.cpp.

References BWAPI::Broodwar, and m_BufferedItems.

{
        m_BufferedItems.insert(ID, new BufferedText(ctype, ID, frameTime + BWAPI::Broodwar->getFrameCount(), x, y, text));
}
void DrawBufferClass::drawBufferedTriangle ( BWAPI::CoordinateType::Enum  ctype,
int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3,
int  frameTime,
BWAPI::Color  color = BWAPI::Colors::Green,
bool  isSolid = false,
BufferedCategory  ID = BufferedCategory::Default 
)

Definition at line 62 of file DrawBuffer.cpp.

References BWAPI::Broodwar, and m_BufferedItems.

{
        m_BufferedItems.insert(ID, new BufferedTriangle(ctype, ID, frameTime + BWAPI::Broodwar->getFrameCount(), x1, y1, x2, y2, x3, y3, color, isSolid));
}

Definition at line 15 of file DrawBuffer.cpp.

References m_BufferedItems.

{
        for(boost::ptr_multimap<BufferedCategory, BufferedItem>::iterator it = m_BufferedItems.begin(); it != m_BufferedItems.end();)
        {
                if((*it).second->isTimeUp())
                {
                        m_BufferedItems.erase(it++);
                }
                else
                {
                        (*it).second->draw();
                        ++it;
                }
        }
}

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines