22 m_layout = e_leftToRight;
23 m_flags.m_bit1 =
FALSE;
45 memcpy(extraCopy, extraData, extraLength);
46 extraCopy[extraLength] =
'\0';
51 m_layout = e_leftToRight;
54 m_layout = e_rightToLeft;
57 m_layout = e_bottomToTop;
60 m_layout = e_topToBottom;
65 m_fillColor = atoi(output);
88 if (m_meterPixels ==
NULL) {
111void LegoMeterPresenter::DrawMeter()
114 MxFloat percent = atof(strval);
115 MxS16 row, leftRightCol, bottomTopCol, leftRightEnd, bottomTopEnd;
117 if (strval !=
NULL && m_curPercent != percent) {
118 m_curPercent = percent;
121 if (percent > 0.99) {
122 m_curPercent = 0.99f;
124 else if (percent < 0.0) {
133 leftRightEnd = m_meterRect.
GetWidth() * m_curPercent;
135 for (row = m_meterRect.
GetTop(); row < m_meterRect.
GetBottom(); row++) {
138 for (leftRightCol = 0; leftRightCol < leftRightEnd; leftRightCol++, line++) {
148 for (row = m_meterRect.
GetBottom(); row > bottomTopEnd; row--) {
151 for (bottomTopCol = 0; bottomTopCol < m_meterRect.
GetWidth(); bottomTopCol++, line++) {
Presenter class for displaying and updating a graphical meter element, such as a progress bar or heal...
~LegoMeterPresenter() override
Destructor for LegoMeterPresenter.
void ParseExtra() override
[AI] Parses the "extra" data chunk attached to this presenter for dynamic meter configuration.
void RepeatingTickle() override
[AI] Called every frame in the 'repeating' tickle phase, updates and redraws the meter based on curre...
void StreamingTickle() override
[AI] Performs initialization of the meter on first streaming update, copying original bitmap data and...
MxLong GetBmiHeightAbs() const
[AI] Returns the absolute value of the bitmap's height.
MxU8 * GetStart(MxS32 p_left, MxS32 p_top) const
[AI] Returns a pointer to the starting address of the pixel data at the specified coordinates.
MxLong GetDataSize() const
[AI] Computes the total size in bytes for the bitmap's pixel data buffer.
MxLong GetBmiWidth() const
[AI] Fetches the width (in pixels) encoded in this bitmap's header.
MxU8 * GetImage() const
[AI] Retrieves the pointer to the image pixel data.
void GetExtra(MxU16 &p_extraLength, char *&p_extraData)
[AI] Retrieves the extra data and its length for this action.
MxDSAction * m_action
[AI] The associated action currently being presented by this presenter.
void SetLeft(T p_left)
[AI] Set the left edge.
T GetTop() const
[AI] Get the top edge.
T GetWidth() const
[AI] Get the rectangle's width.
void SetBottom(T p_bottom)
[AI] Set the bottom edge.
T GetHeight() const
[AI] Get the rectangle's height.
T GetLeft() const
[AI] Get the left edge.
void SetTop(T p_top)
[AI] Set the top edge.
T GetBottom() const
[AI] Get the bottom edge.
void SetRight(T p_right)
[AI] Set the right edge.
void ParseExtra() override
[AI] Parses extra action data for bitmap configuration, such as visibility or image mapping,...
void RepeatingTickle() override
[AI] Repetition tickle logic—handles repeated action/time-based state changes.
void StreamingTickle() override
[AI] Main frame advancing logic, loads the next frame if the elapsed time is appropriate.
char * GetData() const
Returns a pointer to the internal character buffer.
const char * GetVariable(const char *p_key)
Returns the value for the variable with a given key, or an empty string if not found.
MxBitmap * m_frameBitmap
Bitmap for current video frame. [AI].
void EndAction() override
Signals the end of the current playback action.
#define DECOMP_SIZE_ASSERT(T, S)
const char * g_strTOP_TO_BOTTOM
[AI] Used when referencing objects laid out or animated from top to bottom.
const char * g_strRIGHT_TO_LEFT
[AI] Used when referencing objects laid out or animated from right to left.
const char * g_strLEFT_TO_RIGHT
[AI] Used when referencing objects laid out or animated from left to right.
const char * g_strTYPE
[AI] Used to denote the type or class of an object/action in scripts or data files.
const char * g_strVARIABLE
[AI] Used for referencing variable assignment or lookup in script commands or tables.
const char * g_strBOTTOM_TO_TOP
[AI] Used when referencing objects laid out or animated from bottom to top.
const char * g_strFILLER_INDEX
[AI] Identifier string for special "filler" entity or material indices in definition files.
#define NULL
[AI] Null pointer value (C/C++ semantics).
MxVariableTable * VariableTable()
[AI] Returns the variable table used for script variables and global key/value state.
MxBool KeyValueStringParse(char *, const char *, const char *)
Searches p_string for a key command and copies its associated value to p_output.