Isle
Loading...
Searching...
No Matches
legocarbuildpresenter.h
Go to the documentation of this file.
1#ifndef LEGOCARBUILDPRESENTER_H
2#define LEGOCARBUILDPRESENTER_H
3
4#include "anim/legoanim.h"
5#include "legoanimpresenter.h"
6
7// VTABLE: LEGO1 0x100d99e0
8// VTABLE: BETA10 0x101bb988
9// SIZE 0x150
10
31public:
32 enum {
33 c_bit1 = 0x01
34 };
35
49 {
50 m_name = NULL;
52 m_objectId = 0;
53 }
54
58 };
59
64
70 ~LegoCarBuildAnimPresenter() override; // vtable+0x00
71
76 static const char* HandlerClassName();
77
81 void RepeatingTickle() override {} // vtable+0x24
82
87 const char* ClassName() const override; // vtable+0x0c
88
94 MxBool IsA(const char* p_name) const override; // vtable+0x10
95
101 void ReadyTickle() override; // vtable+0x18
102
110 void StreamingTickle() override; // vtable+0x20
111
115 void EndAction() override; // vtable+0x40
116
122 void PutFrame() override; // vtable+0x6c
123
130 virtual MxResult Serialize(LegoStorage* p_storage);
131
136 void FUN_10079050(MxS16 p_index);
137
143 void SwapNodesByName(LegoChar* p_param1, LegoChar* p_param2);
144
149 void FUN_10079160();
150
155 void FUN_100795d0(LegoChar* p_param);
156
161 void FUN_10079680(LegoChar* p_param);
162
169 LegoAnimNodeData* FindNodeDataByName(LegoTreeNode* p_treeNode, const LegoChar* p_name);
170
177 LegoTreeNode* FindNodeByName(LegoTreeNode* p_treeNode, const LegoChar* p_name);
178
183 void FUN_10079790(const LegoChar* p_name);
184
189 void RotateAroundYAxis(MxFloat p_angle);
190
196 MxBool FUN_10079c30(const LegoChar* p_name);
197
202 MxBool PartIsPlaced(const LegoChar* p_name);
203
208 void FUN_10079a90();
209
214 MxBool StringEqualsPlatform(const LegoChar* p_string);
215
220 MxBool StringEqualsShelf(const LegoChar* p_string);
221
226 MxBool StringEndsOnY(const LegoChar* p_string);
227
232 MxBool StringDoesNotEndOnZero(const LegoChar* p_string);
233
239 const LegoChar* GetWiredNameByPartName(const LegoChar* p_name);
240
246 void SetPartObjectIdByName(const LegoChar* p_name, MxS16 p_objectId);
247
252 void SetUnknown0xbc(undefined2 p_unk0xbc) { m_unk0xbc = p_unk0xbc; }
253
258 Matrix4& GetUnknown0xe0() { return m_unk0xe0; }
259
264 MxBool StringEndsOnW(LegoChar* p_param);
265
270 MxBool StringEndsOnYOrN(const LegoChar* p_string);
271
277
282 const LegoChar* GetWiredNameOfLastPlacedPart() { return m_parts[m_placedPartCount].m_wiredName; }
283
287 MxS16 GetNumberOfParts() { return m_numberOfParts; }
288
292 MxS16 GetPlacedPartCount() { return m_placedPartCount; }
293
298 {
299 return m_placedPartCount == m_numberOfParts;
300 }
301
302private:
306 void Beta10Inline0x100733d0();
307
308 MxU16 m_unk0xbc;
309
310 MxS16 m_numberOfParts;
311 MxS16 m_placedPartCount;
312
313 LegoAnimNodeData* m_unk0xc4;
314 LegoAnim m_unk0xc8;
315 MxMatrix m_unk0xe0;
316
317 UnknownListEntry* m_parts;
318
319 MxFloat m_unk0x12c;
320 MxFloat m_unk0x130;
321 MxFloat m_unk0x134;
322 MxFloat m_unk0x138;
323
324 MxULong m_unk0x13c;
325 LegoEntity* m_unk0x140;
326 MxS32 m_unk0x144;
327 MxS32 m_unk0x148;
328
329 LegoChar* m_mainSourceId;
330};
331
332#endif // LEGOCARBUILDPRESENTER_H
[AI] Represents a bounding sphere in 3D space with center and radius.
Definition: roi.h:56
[AI] Holds per-node animation data for a model's animation tree.
Definition: legoanim.h:144
[AI] Handles playback and synchronization of animated LEGO objects, including variable substitution,...
[AI] Root class for all node-based animation blending/structure.
Definition: legoanim.h:356
[AI] Handles the logic and animation presentation for the LEGO Island car-building activity,...
LegoCarBuildAnimPresenter()
[AI] Constructs and initializes the presenter, sets up default assembly state, part list,...
MxS16 GetNumberOfParts()
[AI] Returns how many assembly parts exist in the current build.
virtual MxResult Serialize(LegoStorage *p_storage)
[AI] Serializes or deserializes the assembly state of the car build.
MxS16 GetPlacedPartCount()
[AI] Returns the count of how many parts have been placed so far.
MxBool StringEqualsShelf(const LegoChar *p_string)
[AI] Checks if the supplied string matches "SHELF" prefix (case-insensitive).
void StreamingTickle() override
[AI] Handles streaming phase:
void FUN_10079160()
[AI] (Re-)initializes internal state from animation root, prepares morph keys for "platform" node and...
void SetUnknown0xbc(undefined2 p_unk0xbc)
[AI] Sets the internal unknown word at offset 0xbc.
MxBool StringEndsOnW(LegoChar *p_param)
[AI] Returns TRUE if the given part's name ends with 'W' or 'w' as the second-to-last character.
Matrix4 & GetUnknown0xe0()
[AI] Provides access to the internal Matrix4 representing current animation state,...
@ c_bit1
[AI] Internal bitmask used for blinking animation state and timers.
void SwapNodesByName(LegoChar *p_param1, LegoChar *p_param2)
[AI] Swaps two animation nodes in the scene tree, exchanging their display names and internal indices...
void PutFrame() override
[AI] Called once per displayed animation frame.
const LegoChar * GetWiredNameOfLastPlacedPart()
[AI] Returns the wired part name for the last placed part.
MxBool StringEqualsPlatform(const LegoChar *p_string)
[AI] Checks if the supplied string matches "PLATFORM" (case-insensitive).
void EndAction() override
[AI] Ends the current build action safely, stops blinking and unlocks critical section.
void SetPartObjectIdByName(const LegoChar *p_name, MxS16 p_objectId)
[AI] Sets the object id for the given part name in the assembly state.
void FUN_10079790(const LegoChar *p_name)
[AI] Advances current placed part, handles swaps, and updates morph/visibility.
MxBool PartIsPlaced(const LegoChar *p_name)
[AI] Returns whether a part (by name) has already been placed in the sequence.
MxBool IsA(const char *p_name) const override
[AI] Returns TRUE if this object is of, or inherits from, the supplied type name.
void ReadyTickle() override
[AI] "Ready" tickle for car-building: initializes main entity pointer, updates placed part count,...
~LegoCarBuildAnimPresenter() override
[AI] Destroys the presenter, deletes all allocated part information, strings, and detaches nodes from...
LegoAnimNodeData * FindNodeDataByName(LegoTreeNode *p_treeNode, const LegoChar *p_name)
[AI] Recursively searches for a node with the given name and returns its node data.
static const char * HandlerClassName()
[AI] Returns the string class name used by the presenter dispatch mechanism.
MxBool StringEndsOnY(const LegoChar *p_string)
[AI] Checks if the supplied string ends with "Y" or "y" in the second-to-last character.
void RotateAroundYAxis(MxFloat p_angle)
[AI] Rotates the assembly platform (root part) around the Y axis by the given angle (quaternion math)...
void FUN_100795d0(LegoChar *p_param)
[AI] Hides the referenced animation node by setting its morph key to invisible.
void FUN_10079050(MxS16 p_index)
[AI] Swaps the nodes representing the part at the given index, then hides the 3D node for main (wired...
void RepeatingTickle() override
[AI] No-op for car build (repeats do not trigger anything).
MxBool StringDoesNotEndOnZero(const LegoChar *p_string)
[AI] Checks if string does not end on the character '0'.
MxBool FUN_10079c30(const LegoChar *p_name)
[AI] Returns true if the part with the given name is not yet placed, but is the current to-be-placed ...
MxBool AllPartsPlaced()
[AI] Returns TRUE if all parts have been placed (i.e., assembly is complete).
LegoTreeNode * FindNodeByName(LegoTreeNode *p_treeNode, const LegoChar *p_name)
[AI] Recursively searches for a node with the given name and returns the node itself.
void FUN_10079680(LegoChar *p_param)
[AI] Resets the node's morph key count to zero, restoring/showing the node.
const LegoChar * GetWiredNameByPartName(const LegoChar *p_name)
[AI] Retrieves the wireframe/scene-graph name associated with the player-facing part name.
const BoundingSphere & FUN_10079e20()
[AI] Returns the world bounding sphere of the next part to be placed.
const char * ClassName() const override
[AI] Gets the runtime class name; used for dynamic type checks.
MxBool StringEndsOnYOrN(const LegoChar *p_string)
[AI] Returns TRUE if the given part's name ends with 'Y', 'y', 'N', or 'n' as the second-to-last char...
void FUN_10079a90()
[AI] Advances the internal state for the assembly animation (step advancement).
[AI] Represents an entity that can be placed and managed in the LEGO Island world.
Definition: legoentity.h:16
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Definition: legostorage.h:16
[AI] Represents a node within a general, N-ary tree structure.
Definition: legotree.h:44
4x4 Matrix class with virtual interface for manipulation and transformation.
Definition: matrix.h:24
[AI] Represents a 4x4 transformation matrix, specialized for the LEGO Island engine and derived from ...
Definition: mxmatrix.h:16
unsigned short undefined2
Definition: decomp.h:27
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
Definition: legotypes.h:83
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
signed short MxS16
[AI]
Definition: mxtypes.h:26
float MxFloat
[AI]
Definition: mxtypes.h:68
signed int MxS32
[AI]
Definition: mxtypes.h:38
unsigned int MxULong
[AI]
Definition: mxtypes.h:93
unsigned short MxU16
[AI]
Definition: mxtypes.h:20
[AI] Represents a single entry in the car assembly sequence ("part list"), providing mapping between ...
LegoChar * m_name
[AI] Player-facing name or identifier for the part.
UnknownListEntry()
[AI] Initializes the entry with default/null values.
MxS16 m_objectId
[AI] Internal object id (likely 3D node id or mapping for placement).
LegoChar * m_wiredName
[AI] Internal/scene-graph name for the 3D mesh node.