|
Isle
|
#include "actionsfwd.h"#include "decomp.h"#include "extra.h"#include "mxtypes.h"#include <windows.h>

Go to the source code of this file.
Macros | |
| #define | WM_ISLE_SETCURSOR 0x5400 |
| [AI] Custom Windows message for setting the cursor in LEGO Island. Used with PostMessage. [AI] More... | |
| #define | DS_NOT_A_STREAM -1 |
| [AI] Special stream ID indicating that the current stream is not valid. More... | |
Enumerations | |
| enum | Cursor { e_cursorArrow = 0 , e_cursorBusy , e_cursorNo , e_cursorUnused3 , e_cursorUnused4 , e_cursorUnused5 , e_cursorUnused6 , e_cursorUnused7 , e_cursorUnused8 , e_cursorUnused9 , e_cursorUnused10 , e_cursorNone } |
| [AI] Enum representing cursor icons usable within the LEGO Island engine for custom cursor management. More... | |
Functions | |
| LegoEntity * | PickEntity (MxLong p_x, MxLong p_y) |
| [AI] Picks the LEGO entity root at the given screen coordinates. More... | |
| LegoROI * | PickROI (MxLong p_x, MxLong p_y) |
| [AI] Picks the ROI (Renderable Object Instance) at screen coordinates. More... | |
| LegoROI * | PickRootROI (MxLong p_x, MxLong p_y) |
| [AI] Picks the root ROI at the given screen coordinates by traversing up the ROI parent tree. More... | |
| void | RotateY (LegoROI *p_roi, MxFloat p_angle) |
| [AI] Rotates the given ROI around the Y axis in world space. More... | |
| MxBool | SpheresIntersect (const BoundingSphere &p_sphere1, const BoundingSphere &p_sphere2) |
| [AI] Tests if two bounding spheres in the 3D world intersect. More... | |
| MxBool | FUN_1003ded0 (MxFloat p_param1[2], MxFloat p_param2[3], MxFloat p_param3[3]) |
| [AI] Calculates a ray starting at a screen location and outputs its world origin and direction. More... | |
| MxBool | TransformWorldToScreen (const MxFloat p_world[3], MxFloat p_screen[4]) |
| [AI] Projects a world-space point into normalized screen coordinates. More... | |
| MxS16 | CountTotalTreeNodes (LegoTreeNode *p_node) |
| [AI] Recursively counts the number of nodes (including the root) in a tree hierarchy rooted at the specified LegoTreeNode. More... | |
| LegoTreeNode * | GetTreeNode (LegoTreeNode *p_node, MxU32 p_index) |
| [AI] Retrieves the nth node in tree traversal order (preorder) from a LegoTreeNode root. More... | |
| void | FUN_1003e050 (LegoAnimPresenter *p_presenter) |
| [AI] Repositions the camera and updates the view matrix using a LegoAnimPresenter's animation nodes named "CAM" and "TARGET". More... | |
| Extra::ActionType | MatchActionString (const char *) |
| [AI] Parses an action string to determine the corresponding action type. More... | |
| void | InvokeAction (Extra::ActionType p_actionId, const MxAtomId &p_pAtom, MxS32 p_streamId, LegoEntity *p_sender) |
| [AI] Dispatches and triggers a game action on the given script or object. More... | |
| void | SetCameraControllerFromIsle () |
| [AI] Updates the current camera controller to the main ISLE camera specified in the global script. More... | |
| void | ConvertHSVToRGB (float p_h, float p_s, float p_v, float *p_rOut, float *p_bOut, float *p_gOut) |
| [AI] Converts HSV color (hue/saturation/value) to RGB (red/green/blue). More... | |
| void | PlayCamAnim (LegoPathActor *p_actor, MxBool p_unused, MxU32 p_location, MxBool p_bool) |
| [AI] Initiates a camera animation for a specific path actor, or falls back to default animation triggers. More... | |
| void | FUN_1003eda0 () |
| [AI] Updates sound listener position to follow the view ROI's transform. More... | |
| MxBool | RemoveFromCurrentWorld (const MxAtomId &p_atomId, MxS32 p_id) |
| [AI] Removes an entity or presenter with specified AtomId and ID from the current world; triggers EndAction or deletes it. More... | |
| void | EnableAnimations (MxBool p_enable) |
| [AI] Enables or disables animation playback globally. More... | |
| void | SetAppCursor (Cursor p_cursor) |
| [AI] Sets the in-game cursor to a specified type. More... | |
| MxBool | FUN_1003ef60 () |
| [AI] Determines if the current actor can exit their area, based on state/zone/vehicle. More... | |
| MxBool | RemoveFromWorld (MxAtomId &p_entityAtom, MxS32 p_entityId, MxAtomId &p_worldAtom, MxS32 p_worldEntityId) |
| [AI] Removes a game object referenced by atom/id from a specific world, handling presenters and EndActions. More... | |
| MxS32 | UpdateLightPosition (MxS32 p_increase) |
| [AI] Steps or resets the in-game light position; wraps and saves in global variables; updates lighting matrix. More... | |
| void | SetLightPosition (MxS32 p_index) |
| [AI] Sets the world space position and direction of the in-game directional light, based on a preset index. More... | |
| LegoNamedTexture * | ReadNamedTexture (LegoStorage *p_storage) |
| [AI] Reads a named texture and its associated image data from storage. More... | |
| void | WriteDefaultTexture (LegoStorage *p_storage, const char *p_name) |
| [AI] Writes a default texture by name (and its image/palette) to storage for serialization. More... | |
| void | WriteNamedTexture (LegoStorage *p_storage, LegoNamedTexture *p_namedTexture) |
| [AI] Writes a LegoNamedTexture and its associated image to storage. More... | |
| void | FUN_1003f930 (LegoNamedTexture *p_namedTexture) |
| [AI] Applies the image bits of a named texture to its associated texture info container entry. More... | |
| MxBool | CheckIfEntityExists (MxBool p_enable, const char *p_filename, MxS32 p_entityId) |
| [AI] Parses a string for entity existence and enables/disables it accordingly. More... | |
| void | NotifyEntity (const char *p_filename, MxS32 p_entityId, LegoEntity *p_sender) |
| [AI] Sends a notification to the specified entity in all known worlds. More... | |
| void | StartIsleAction (IsleScript::Script p_objectId) |
| [AI] Helper to invoke a 'start' action for an Isle script object by its script ID. More... | |
Variables | |
| MxAtomId * | g_isleScript |
| [AI] Node used in hierarchical scene graphs and animation trees. [AI] More... | |
| #define DS_NOT_A_STREAM -1 |
[AI] Special stream ID indicating that the current stream is not valid.
Used to check against invalid stream references. [AI]
Definition at line 16 of file legoutils.h.
| #define WM_ISLE_SETCURSOR 0x5400 |
[AI] Custom Windows message for setting the cursor in LEGO Island. Used with PostMessage. [AI]
Definition at line 11 of file legoutils.h.
| enum Cursor |
[AI] Enum representing cursor icons usable within the LEGO Island engine for custom cursor management.
[AI]
Definition at line 22 of file legoutils.h.
[AI] Parses a string for entity existence and enables/disables it accordingly.
[AI]
| p_enable | Enable or disable the entity. [AI] |
| p_filename | Entity resource filename to search. [AI] |
| p_entityId | Target entity identifier within the world. [AI] |
Definition at line 343 of file legoutils.cpp.
| void ConvertHSVToRGB | ( | float | p_h, |
| float | p_s, | ||
| float | p_v, | ||
| float * | p_rOut, | ||
| float * | p_bOut, | ||
| float * | p_gOut | ||
| ) |
[AI] Converts HSV color (hue/saturation/value) to RGB (red/green/blue).
[AI]
| p_h | Hue, float in [0,1]. [AI] |
| p_s | Saturation, float in [0,1]. [AI] |
| p_v | Value, float in [0,1]. [AI] |
| p_rOut | Output pointer for red result. [AI] |
| p_bOut | Output pointer for blue result. [AI] |
| p_gOut | Output pointer for green result. [AI] |
Definition at line 388 of file legoutils.cpp.
| MxS16 CountTotalTreeNodes | ( | LegoTreeNode * | p_node | ) |
[AI] Recursively counts the number of nodes (including the root) in a tree hierarchy rooted at the specified LegoTreeNode.
[AI]
| p_node | Root node to start counting from. [AI] |
Definition at line 138 of file legoutils.cpp.
| void EnableAnimations | ( | MxBool | p_enable | ) |
[AI] Enables or disables animation playback globally.
Triggers resume and additional handler methods. [AI]
| p_enable | Enable/disable flag for animations. [AI] |
Definition at line 554 of file legoutils.cpp.
[AI] Calculates a ray starting at a screen location and outputs its world origin and direction.
[AI]
| p_param1 | Screen coordinates (x, y). [AI] |
| p_param2 | Output world-space ray direction (length 3). [AI] |
| p_param3 | Output world-space ray origin (length 3). [AI] |
Definition at line 102 of file legoutils.cpp.
| void FUN_1003e050 | ( | LegoAnimPresenter * | p_presenter | ) |
[AI] Repositions the camera and updates the view matrix using a LegoAnimPresenter's animation nodes named "CAM" and "TARGET".
[AI]
| p_presenter | Animation presenter used to locate camera and target. [AI] |
Definition at line 176 of file legoutils.cpp.
| void FUN_1003eda0 | ( | ) |
[AI] Updates sound listener position to follow the view ROI's transform.
[AI]
Definition at line 476 of file legoutils.cpp.
| MxBool FUN_1003ef60 | ( | ) |
[AI] Determines if the current actor can exit their area, based on state/zone/vehicle.
[AI]
Definition at line 572 of file legoutils.cpp.
| void FUN_1003f930 | ( | LegoNamedTexture * | p_namedTexture | ) |
[AI] Applies the image bits of a named texture to its associated texture info container entry.
[AI]
| p_namedTexture | Target named texture whose data will be uploaded. [AI] |
Definition at line 768 of file legoutils.cpp.
| LegoTreeNode * GetTreeNode | ( | LegoTreeNode * | p_node, |
| MxU32 | p_index | ||
| ) |
[AI] Retrieves the nth node in tree traversal order (preorder) from a LegoTreeNode root.
[AI]
| p_node | Root node to start searching from. [AI] |
| p_index | The 0-based index into the tree traversal. [AI] |
Definition at line 151 of file legoutils.cpp.
| void InvokeAction | ( | Extra::ActionType | p_actionId, |
| const MxAtomId & | p_pAtom, | ||
| MxS32 | p_streamId, | ||
| LegoEntity * | p_sender | ||
| ) |
[AI] Dispatches and triggers a game action on the given script or object.
[AI]
| p_actionId | Type of action to invoke. [AI] |
| p_pAtom | ID of the target script/entity. [AI] |
| p_streamId | Associated stream ID for the action (if applicable). [AI] |
| p_sender | Optional pointer to the sender entity (can be NULL). [AI] |
Definition at line 271 of file legoutils.cpp.
| Extra::ActionType MatchActionString | ( | const char * | p_str | ) |
[AI] Parses an action string to determine the corresponding action type.
[AI]
| Str | Null-terminated string to evaluate. [AI] |
Definition at line 228 of file legoutils.cpp.
| void NotifyEntity | ( | const char * | p_filename, |
| MxS32 | p_entityId, | ||
| LegoEntity * | p_sender | ||
| ) |
[AI] Sends a notification to the specified entity in all known worlds.
[AI]
| p_filename | Entity resource filename. [AI] |
| p_entityId | ID of the target entity. [AI] |
| p_sender | Sender entity reference, may be NULL. [AI] |
Definition at line 358 of file legoutils.cpp.
| LegoEntity * PickEntity | ( | MxLong | p_x, |
| MxLong | p_y | ||
| ) |
[AI] Picks the LEGO entity root at the given screen coordinates.
[AI]
| p_x | X screen coordinate. [AI] |
| p_y | Y screen coordinate. [AI] |
Definition at line 62 of file legoutils.cpp.
[AI] Picks the ROI (Renderable Object Instance) at screen coordinates.
[AI]
| p_x | X screen coordinate. [AI] |
| p_y | Y screen coordinate. [AI] |
Definition at line 39 of file legoutils.cpp.
[AI] Picks the root ROI at the given screen coordinates by traversing up the ROI parent tree.
[AI]
| p_x | X screen coordinate. [AI] |
| p_y | Y screen coordinate. [AI] |
Definition at line 48 of file legoutils.cpp.
| void PlayCamAnim | ( | LegoPathActor * | p_actor, |
| MxBool | p_unused, | ||
| MxU32 | p_location, | ||
| MxBool | p_bool | ||
| ) |
[AI] Initiates a camera animation for a specific path actor, or falls back to default animation triggers.
[AI]
| p_actor | Path actor to play camera animation for. [AI] |
| p_unused | Not used in logic (placeholder for extended parameters). [AI] |
| p_location | Camera location index/ID. [AI] |
| p_bool | Boolean flag, often controlling secondary behavior. [AI] |
Definition at line 459 of file legoutils.cpp.
| LegoNamedTexture * ReadNamedTexture | ( | LegoStorage * | p_storage | ) |
[AI] Reads a named texture and its associated image data from storage.
[AI]
| p_storage | Source storage for reading (disk or memory representation). [AI] |
Definition at line 665 of file legoutils.cpp.
[AI] Removes an entity or presenter with specified AtomId and ID from the current world; triggers EndAction or deletes it.
[AI]
| p_atomId | AtomId of the object to remove. [AI] |
| p_id | Object identifier within the world. [AI] |
Definition at line 495 of file legoutils.cpp.
| MxBool RemoveFromWorld | ( | MxAtomId & | p_entityAtom, |
| MxS32 | p_entityId, | ||
| MxAtomId & | p_worldAtom, | ||
| MxS32 | p_worldEntityId | ||
| ) |
[AI] Removes a game object referenced by atom/id from a specific world, handling presenters and EndActions.
[AI]
| p_entityAtom | AtomId for the target object. [AI] |
| p_entityId | ID for the target object. [AI] |
| p_worldAtom | AtomId for the world containing the object. [AI] |
| p_worldEntityId | ID for the world. [AI] |
Definition at line 524 of file legoutils.cpp.
[AI] Rotates the given ROI around the Y axis in world space.
[AI]
| p_roi | ROI to rotate. [AI] |
| p_angle | Angle in radians. [AI] |
Definition at line 75 of file legoutils.cpp.
| void SetAppCursor | ( | Cursor | p_cursor | ) |
[AI] Sets the in-game cursor to a specified type.
[AI]
| p_cursor | Cursor enum value (e.g., arrow, busy, none). [AI] |
Definition at line 566 of file legoutils.cpp.
| void SetCameraControllerFromIsle | ( | ) |
[AI] Updates the current camera controller to the main ISLE camera specified in the global script.
[AI]
Definition at line 382 of file legoutils.cpp.
| void SetLightPosition | ( | MxS32 | p_index | ) |
[AI] Sets the world space position and direction of the in-game directional light, based on a preset index.
[AI]
| p_index | Lighting index (clamped to valid range). [AI] |
Definition at line 628 of file legoutils.cpp.
| MxBool SpheresIntersect | ( | const BoundingSphere & | p_sphere1, |
| const BoundingSphere & | p_sphere2 | ||
| ) |
[AI] Tests if two bounding spheres in the 3D world intersect.
[AI]
| p_sphere1 | First bounding sphere for intersection. [AI] |
| p_sphere2 | Second bounding sphere for intersection. [AI] |
Definition at line 93 of file legoutils.cpp.
|
inline |
[AI] Helper to invoke a 'start' action for an Isle script object by its script ID.
[AI]
| p_objectId | IsleScript script object identifier. [AI] |
Definition at line 268 of file legoutils.h.
[AI] Projects a world-space point into normalized screen coordinates.
[AI]
| p_world | Input world coordinates (length 3). [AI] |
| p_screen | Output screen coordinates (length 4 for homogeneous coordinates). [AI] |
Definition at line 130 of file legoutils.cpp.
[AI] Steps or resets the in-game light position; wraps and saves in global variables; updates lighting matrix.
[AI]
| p_increase | Increments light position if positive; decrements otherwise. [AI] |
Definition at line 599 of file legoutils.cpp.
| void WriteDefaultTexture | ( | LegoStorage * | p_storage, |
| const char * | p_name | ||
| ) |
[AI] Writes a default texture by name (and its image/palette) to storage for serialization.
[AI]
| p_storage | Target storage for writing. [AI] |
| p_name | Name of the texture/resource to write. [AI] |
Definition at line 690 of file legoutils.cpp.
| void WriteNamedTexture | ( | LegoStorage * | p_storage, |
| LegoNamedTexture * | p_namedTexture | ||
| ) |
[AI] Writes a LegoNamedTexture and its associated image to storage.
[AI]
| p_storage | Target storage for writing. [AI] |
| p_namedTexture | Pointer to the LegoNamedTexture to serialize. [AI] |
Definition at line 761 of file legoutils.cpp.
|
extern |
[AI] Node used in hierarchical scene graphs and animation trees. [AI]
[AI] Global script identifier for the main Isle game script resource. [AI]
Definition at line 32 of file scripts.cpp.