|
Isle
|


Go to the source code of this file.
Functions | |
| template<class T > | |
| T | Abs (T p_t) |
| Returns the absolute value of a value. More... | |
| template<class T > | |
| T | Min (T p_t1, T p_t2) |
| Returns the minimum of two values. More... | |
| template<class T > | |
| T | Max (T p_t1, T p_t2) |
| Returns the maximum of two values. More... | |
| template<class T > | |
| void | GetScalar (MxU8 *&p_source, T &p_dest) |
| Reads a value of type T from a memory buffer and advances the pointer. More... | |
| template<class T > | |
| T | GetScalar (T *&p_source) |
| Reads a single value from a pointer and advances the pointer. More... | |
| template<class T > | |
| void | GetDouble (MxU8 *&p_source, T &p_dest) |
| Reads a double-precision value from memory and advances the pointer. More... | |
| template<class T > | |
| void | GetString (MxU8 *&p_source, char *&p_dest, T *p_obj, void(T::*p_setter)(const char *)) |
| Extracts a string from a buffer and assigns it using a setter function on an object. More... | |
| MxBool | GetRectIntersection (MxS32 p_rect1Width, MxS32 p_rect1Height, MxS32 p_rect2Width, MxS32 p_rect2Height, MxS32 *p_rect1Left, MxS32 *p_rect1Top, MxS32 *p_rect2Left, MxS32 *p_rect2Top, MxS32 *p_width, MxS32 *p_height) |
| Computes intersection of two rectangles and modifies their positions and dimensions to the intersection area. More... | |
| void | MakeSourceName (char *, const char *) |
| Parses an SI source filename and normalizes it for use in the engine. More... | |
| void | OmniError (const char *p_message, MxS32 p_status) |
| Displays or logs an error message using the current user message handler, or aborts on error status if none is set. More... | |
| void | SetOmniUserMessage (void(*p_omniUserMessage)(const char *, MxS32)) |
| Sets the callback to handle user messages, such as errors or logs, for the OMNI engine. More... | |
| MxBool | ContainsPresenter (MxCompositePresenterList &p_presenterList, MxPresenter *p_presenter) |
| Determines if a presenter exists within a composite presenter hierarchy. More... | |
| void | FUN_100b7220 (MxDSAction *p_action, MxU32 p_newFlags, MxBool p_setFlags) |
| Recursively sets or clears flags for an MxDSAction and all sub-actions if applicable. More... | |
| MxBool | KeyValueStringParse (char *, const char *, const char *) |
| Searches p_string for a key command and copies its associated value to p_output. More... | |
|
inline |
Returns the absolute value of a value.
[AI]
[AI] Templated utility function to compute the absolute value for any arithmetic type.
| T | [AI] Any type supporting comparison and negation. |
| p_t | [AI] Value to compute the absolute value of. |
Definition at line 22 of file mxutilities.h.
| MxBool ContainsPresenter | ( | MxCompositePresenterList & | p_presenterList, |
| MxPresenter * | p_presenter | ||
| ) |
Determines if a presenter exists within a composite presenter hierarchy.
[AI]
[AI] Searches recursively within all composite presenters for an exact pointer match or type match.
| p_presenterList | [AI] Reference to list of composite presenters. |
| p_presenter | [AI] Presenter to look for. |
Definition at line 122 of file mxutilities.cpp.
| void FUN_100b7220 | ( | MxDSAction * | p_action, |
| MxU32 | p_newFlags, | ||
| MxBool | p_setFlags | ||
| ) |
Recursively sets or clears flags for an MxDSAction and all sub-actions if applicable.
[AI]
[AI] If the object is a MxDSMultiAction, recurses into its action list, updating flags for all contained actions.
| p_action | [AI] The root action to update. |
| p_newFlags | [AI] Flags to set or clear. |
| p_setFlags | [AI] TRUE to set bits, FALSE to clear bits in the action's flags. [AI_SUGGESTED_NAME: SetActionFlagsRecursive] |
Definition at line 153 of file mxutilities.cpp.
|
inline |
Reads a double-precision value from memory and advances the pointer.
[AI]
[AI] Specialized for double reads, as some SI chunks may pack doubles specially.
| T | [AI] Target type to store the double into (usually double). |
| p_source | [AI] Reference to pointer in buffer, will be incremented by sizeof(double). |
| p_dest | [AI] Destination to store the value. |
Definition at line 92 of file mxutilities.h.
| MxBool GetRectIntersection | ( | MxS32 | p_rect1Width, |
| MxS32 | p_rect1Height, | ||
| MxS32 | p_rect2Width, | ||
| MxS32 | p_rect2Height, | ||
| MxS32 * | p_rect1Left, | ||
| MxS32 * | p_rect1Top, | ||
| MxS32 * | p_rect2Left, | ||
| MxS32 * | p_rect2Top, | ||
| MxS32 * | p_width, | ||
| MxS32 * | p_height | ||
| ) |
Computes intersection of two rectangles and modifies their positions and dimensions to the intersection area.
[AI]
[AI] Used to find overlapping portions when rendering or handling collision/visibility in 2D screen/UI contexts. Modifies parameters in-place.
| p_rect1Width | [AI] Width of first rectangle. |
| p_rect1Height | [AI] Height of first rectangle. |
| p_rect2Width | [AI] Width of second rectangle. |
| p_rect2Height | [AI] Height of second rectangle. |
| p_rect1Left | [AI] Pointer to X of top-left of first rectangle (modified to intersection). |
| p_rect1Top | [AI] Pointer to Y of top-left of first rectangle (modified to intersection). |
| p_rect2Left | [AI] Pointer to X of top-left of second rectangle (modified to intersection). |
| p_rect2Top | [AI] Pointer to Y of top-left of second rectangle (modified to intersection). |
| p_width | [AI] Pointer to width of the intersection area. |
| p_height | [AI] Pointer to height of the intersection area. |
Definition at line 19 of file mxutilities.cpp.
|
inline |
Reads a value of type T from a memory buffer and advances the pointer.
[AI]
[AI] Used for deserialization from a byte buffer, e.g. for loading chunked SI data.
| T | [AI] Type to extract. |
| p_source | [AI] Reference to pointer in buffer to read from. Will be incremented by sizeof(T). |
| p_dest | [AI] Destination to store the extracted value. |
Definition at line 63 of file mxutilities.h.
|
inline |
Reads a single value from a pointer and advances the pointer.
[AI]
[AI] Convenience version for types already aligned in memory.
| T | [AI] Type to extract. |
| p_source | [AI] Reference to pointer to T to read from. Increments pointer by one element. |
Definition at line 77 of file mxutilities.h.
|
inline |
Extracts a string from a buffer and assigns it using a setter function on an object.
[AI]
[AI] Reads a NUL-terminated string, uses p_setter member function to consume it, then advances buffer pointer past string.
| T | [AI] Type of the object with the setter member function. |
| p_source | [AI] Reference to buffer pointer, advanced past the string. |
| p_dest | [AI] The string pointer assigned by the setter. |
| p_obj | [AI] Object to call member function on. |
| p_setter | [AI] Member function accepting a const char* as parameter. Typically sets a property on the object. |
Definition at line 108 of file mxutilities.h.
| MxBool KeyValueStringParse | ( | char * | p_output, |
| const char * | p_command, | ||
| const char * | p_string | ||
| ) |
Searches p_string for a key command and copies its associated value to p_output.
[AI]
[AI] For commands like "foo:123, bar:456", if p_command is "bar" then p_output becomes "456". Used in config or SI parsing.
| p_output | [AI] Buffer for found value. |
| p_command | [AI] Key to search for. |
| p_string | [AI] String to search in. |
Definition at line 85 of file mxutilities.cpp.
| void MakeSourceName | ( | char * | p_output, |
| const char * | p_input | ||
| ) |
Parses an SI source filename and normalizes it for use in the engine.
[AI]
[AI] Removes any disk designator (e.g., 'C:') and ".si" extension, and makes string lowercase.
| p_output | [AI] Output buffer for source name. |
| p_input | [AI] Input filename (may include drive, extension, etc.). |
Definition at line 66 of file mxutilities.cpp.
|
inline |
Returns the maximum of two values.
[AI]
[AI] Templated utility function to select the greater of two values.
| T | [AI] Any type supporting comparison. |
| p_t1 | [AI] First value. |
| p_t2 | [AI] Second value. |
Definition at line 50 of file mxutilities.h.
|
inline |
Returns the minimum of two values.
[AI]
[AI] Templated utility function to select the smaller of two values.
| T | [AI] Any type supporting comparison. |
| p_t1 | [AI] First value. |
| p_t2 | [AI] Second value. |
Definition at line 36 of file mxutilities.h.
| void OmniError | ( | const char * | p_message, |
| MxS32 | p_status | ||
| ) |
Displays or logs an error message using the current user message handler, or aborts on error status if none is set.
[AI]
[AI] If the callback is not set and status is non-zero, aborts process. Otherwise, invokes callback.
| p_message | [AI] Null-terminated error message. |
| p_status | [AI] Status code or severity. |
Definition at line 135 of file mxutilities.cpp.
| void SetOmniUserMessage | ( | void(*)(const char *, MxS32) | p_omniUserMessage | ) |
Sets the callback to handle user messages, such as errors or logs, for the OMNI engine.
[AI]
[AI] The callback is a function pointer invoked by OmniError.
| p_omniUserMessage | [AI] Callback function accepting a string message and status integer. |
Definition at line 146 of file mxutilities.cpp.