251 {
"pepper",
FALSE, 6, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 50, 1},
252 {
"mama",
FALSE, -1, 0,
FALSE,
FALSE,
FALSE, 1500, 20000,
FALSE, 0, 2},
253 {
"papa",
FALSE, -1, 0,
FALSE,
FALSE,
FALSE, 1500, 20000,
FALSE, 0, 3},
254 {
"nick",
FALSE, 4, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 20, 4},
255 {
"laura",
FALSE, 5, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 20, 5},
256 {
"brickstr",
FALSE, -1, 0,
FALSE,
FALSE,
FALSE, 1000, 20000,
FALSE, 0, 6},
257 {
"studs",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
258 {
"rhoda",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
259 {
"valerie",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
260 {
"snap",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
261 {
"pt",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
262 {
"mg",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
263 {
"bu",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
264 {
"ml",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
265 {
"nu",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
266 {
"na",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
267 {
"cl",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
268 {
"en",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
269 {
"re",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
270 {
"ro",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
271 {
"d1",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
272 {
"d2",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
273 {
"d3",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
274 {
"d4",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
275 {
"l1",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
276 {
"l2",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
277 {
"l3",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
278 {
"l4",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
279 {
"l5",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
280 {
"l6",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
281 {
"b1",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
282 {
"b2",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
283 {
"b3",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
284 {
"b4",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
285 {
"cm",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
286 {
"gd",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
287 {
"rd",
FALSE, 2, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 50, 9},
288 {
"pg",
FALSE, 1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 50, 8},
289 {
"bd",
FALSE, 0, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 100, 7},
290 {
"sy",
FALSE, 3, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 100, 10},
291 {
"gn",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
292 {
"df",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
293 {
"bs",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
294 {
"lt",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
295 {
"st",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
296 {
"bm",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0},
297 {
"jk",
FALSE, -1, 0,
FALSE,
FALSE,
TRUE, 1500, 20000,
FALSE, 0, 0}
302 {10.0f, -1.0f, 1.0f},
303 {7.0f, 144.0f, 100.0f},
304 {5.0f, 100.0f, 36.0f},
305 {3.0f, 36.0f, 25.0f},
306 {1.0f, 25.0f, 16.0f},
362 if (m_tranInfoList !=
NULL) {
363 delete m_tranInfoList;
366 if (m_tranInfoList2 !=
NULL) {
367 delete m_tranInfoList2;
372 if (m_unk0x424 !=
NULL) {
386 if (p_und && m_animState !=
NULL) {
387 m_animState->
Reset();
390 MxBool suspended = m_suspended;
393 if (m_tranInfoList !=
NULL) {
394 delete m_tranInfoList;
397 if (m_tranInfoList2 !=
NULL) {
398 delete m_tranInfoList2;
404 m_suspended = suspended;
405 m_suspendedEnableCamAnims = m_enableCamAnims;
406 m_unk0x429 = m_unk0x400;
407 m_unk0x42a = m_unk0x402;
415 if (m_animState ==
NULL) {
420 m_animState->
InitFromAnims(m_animCount, m_anims, m_lastExtraCharacterId);
425 m_suspendedEnableCamAnims = m_enableCamAnims;
426 m_unk0x429 = m_unk0x400;
427 m_unk0x42a = m_unk0x402;
447 if (m_extras[i].m_unk0x14) {
451 if (vehicleId >= 0) {
468 m_enableCamAnims =
FALSE;
484 m_unk0x408 = m_unk0x40c = m_unk0x404 =
Timer()->
GetTime();
486 m_enableCamAnims = m_suspendedEnableCamAnims;
487 m_unk0x400 = m_unk0x429;
488 m_unk0x402 = m_unk0x42a;
495void LegoAnimationManager::Init()
503 m_tranInfoList =
NULL;
504 m_tranInfoList2 =
NULL;
521 m_animRunning =
FALSE;
522 m_enableCamAnims =
TRUE;
523 m_lastExtraCharacterId = 0;
526 m_numAllowedExtras = 5;
533 m_unk0x408 = m_unk0x40c = m_unk0x404 =
Timer()->
GetTime();
546 if (m_unk0x424 !=
NULL) {
559 m_unk0x429 = p_unk0x400;
562 m_unk0x400 = p_unk0x400;
575 m_suspendedEnableCamAnims = p_enableCamAnims;
578 m_enableCamAnims = p_enableCamAnims;
588 if (m_worldId != p_worldId) {
589 if (m_tranInfoList !=
NULL) {
590 delete m_tranInfoList;
591 m_tranInfoList =
NULL;
594 if (m_tranInfoList2 !=
NULL) {
595 delete m_tranInfoList2;
596 m_tranInfoList2 =
NULL;
605 m_animRunning =
FALSE;
614 if (m_animState ==
NULL) {
619 m_animState->
InitFromAnims(m_animCount, m_anims, m_lastExtraCharacterId);
633 sprintf(filename,
"lego\\data\\%sinf.dta",
Lego()->GetWorldName(p_worldId));
636 if (path[strlen(path) - 1] !=
'\\') {
640 strcat(path, filename);
642 if (_access(path, 4)) {
645 if (path[strlen(path) - 1] !=
'\\') {
649 strcat(path, filename);
651 if (_access(path, 4)) {
661 if (storage.
Read(&version,
sizeof(version)) ==
FAILURE) {
666 OmniError(
"World animation version mismatch", 0);
670 if (storage.
Read(&m_animCount,
sizeof(m_animCount)) ==
FAILURE) {
674 m_anims =
new AnimInfo[m_animCount];
675 memset(m_anims, 0, m_animCount *
sizeof(*m_anims));
677 for (j = 0; j < m_animCount; j++) {
682 m_anims[j].
m_characterIndex = GetCharacterIndex(m_anims[j].m_name + strlen(m_anims[j].m_name) - 2);
685 for (k = 0; k < 3; k++) {
689 if (m_anims[j].m_location == -1) {
691 MxS32 index = GetCharacterIndex(m_anims[j].m_models[l].m_name);
703 if (
FindVehicle(m_anims[j].m_models[m].m_name, n) && m_anims[j].m_models[m].m_unk0x2c) {
712 m_worldId = p_worldId;
716 FUN_100617c0(-1, m_unk0x0e, m_unk0x10);
722 m_suspendedEnableCamAnims = m_enableCamAnims;
723 m_unk0x429 = m_unk0x400;
725 m_enableCamAnims =
FALSE;
730 if (p_worldId == 0) {
731 m_animState->
CopyToAnims(m_animCount, m_anims, m_lastExtraCharacterId);
763 if (p_storage->
Read(&length,
sizeof(length)) ==
FAILURE) {
767 p_info->
m_name =
new char[length + 1];
772 p_info->
m_name[length] = 0;
828 p_info->
m_name =
new char[length + 1];
833 p_info->
m_name[length] = 0;
858void LegoAnimationManager::DeleteAnimations()
860 MxBool suspended = m_suspended;
862 if (m_anims !=
NULL) {
863 for (
MxS32 i = 0; i < m_animCount; i++) {
866 if (m_anims[i].m_models !=
NULL) {
879 m_suspended = suspended;
886 for (
MxS32 i = 0; i < p_numCharacterNames; i++) {
888 if (!stricmp(
g_characters[j].m_name, p_characterNames[i])) {
908 for (
MxS32 i = 0; i < p_numObjectIds; i++) {
909 for (
MxS32 j = 0; j < m_animCount; j++) {
910 if (m_anims[j].m_objectId == p_objectIds[i]) {
921 for (
MxS32 i = 0; i < m_animCount; i++) {
930 m_animRunning =
FALSE;
934 if (m_unk0x1a != p_unk0x1a && (m_unk0x1a = p_unk0x1a)) {
941 }
while (m_unk0x18 < m_animCount);
950MxResult LegoAnimationManager::FUN_100605e0(
969 AnimInfo& animInfo = m_anims[p_index];
972 if (m_animRunning || !animInfo.
m_unk0x29) {
976 if (FUN_100623a0(animInfo)) {
980 if (FUN_10062710(animInfo)) {
985 FUN_10062580(animInfo);
989 tranInfo->
m_index = ++m_unk0x1c;
997 if (p_matrix !=
NULL) {
1006 if (m_tranInfoList !=
NULL) {
1007 m_tranInfoList->
Append(tranInfo);
1025 FUN_100648f0(tranInfo, m_unk0x404);
1027 else if (p_unk0x0a) {
1030 if (actor !=
NULL) {
1036 m_animRunning =
TRUE;
1062 if (p_matrix !=
NULL) {
1073 if (m_tranInfoList !=
NULL) {
1074 m_tranInfoList->
Append(info);
1088 m_animRunning =
TRUE;
1113 if (m_extras[i].m_roi == roi) {
1118 if (vehicleId >= 0) {
1152 if (!
Lego()->m_unk0x13c) {
1156 for (
MxS32 i = 0; i < m_animCount; i++) {
1157 if (m_anims[i].m_objectId == p_objectId) {
1173 result = FUN_100605e0(i, unk0x0a, p_matrix, p_param3, p_roi, p_param6, p_param7, p_param8, p_param9);
1178 if (!found && p_param3 !=
FALSE) {
1179 result = FUN_100609f0(p_objectId, p_matrix, p_param7, p_param8);
1189 if (
Lego()->m_unk0x13c && m_enableCamAnims && !m_animRunning) {
1192 if (location !=
NULL) {
1202 MxU16 unk0x0e, unk0x10;
1203 if (FUN_100617c0(p_location, unk0x0e, unk0x10) ==
SUCCESS) {
1204 MxU16 index = unk0x0e;
1208 for (
MxU16 i = unk0x0e; i <= unk0x10; i++) {
1211 if ((p_bool || !FUN_100623a0(animInfo)) && !FUN_10062710(animInfo) && animInfo.
m_unk0x29 &&
1213 *animInfo.
m_name !=
'I') {
1236 if (m_tranInfoList !=
NULL) {
1240 while (cursor.
Next(tranInfo)) {
1275 if (m_tranInfoList2 !=
NULL) {
1278 if (!cursor.
Find(tranInfo)) {
1279 m_tranInfoList2->
Append(tranInfo);
1288 m_animRunning = unk0x39;
1293void LegoAnimationManager::FUN_10061530()
1295 if (m_tranInfoList2 !=
NULL) {
1299 while (cursor.Next(tranInfo)) {
1302 if (cursor2.Find(tranInfo)) {
1329 if (p_location == -1) {
1332 for (i = 0; i < m_animCount; i++) {
1333 if (m_anims[i].m_location == p_location) {
1341 for (; i < m_animCount && m_anims[i].
m_location == p_location; i++) {
1349 for (i = 0; m_animCount > i && m_anims[i].
m_location != -1; i++) {
1350 if (m_anims[i].m_location == p_location) {
1358 for (; i < m_animCount && m_anims[i].
m_location == p_location; i++) {
1365 p_unk0x0e = unk0x0e;
1366 p_unk0x10 = unk0x10;
1377 if (m_tranInfoList !=
NULL) {
1381 while (cursor.
Next(tranInfo)) {
1382 if (tranInfo->
m_index == p_index) {
1407 while (cursor.
Next(tranInfo)) {
1408 if (tranInfo->
m_index == index) {
1409 if (m_unk0x430 && m_unk0x42c == tranInfo) {
1417 m_animRunning =
FALSE;
1429 if (actor !=
NULL) {
1439 if (m_unk0x1a && found) {
1442 if (m_animCount <= m_unk0x18) {
1476 if (roi !=
NULL && m_extras[i].m_unk0x0d) {
1486 if (m_extras[i].m_unk0x14) {
1490 if (vehicleId >= 0) {
1534 MxU16 result = FUN_10062110(roi, direction, position, boundary, speed, unk0x0c, m_extras[i].m_unk0x14);
1549 if (time - m_unk0x40c > 1000) {
1554 if (time - m_unk0x408 < m_unk0x410) {
1558 m_unk0x410 = (rand() * 10000 / SHRT_MAX) + 5000;
1561 if (time - m_unk0x404 > 10000) {
1567 if (elapsedSeconds < 1.0 && elapsedSeconds > 0.01) {
1570 if (elapsedSeconds > 0.2 && m_numAllowedExtras > 2) {
1571 m_numAllowedExtras--;
1574 m_numAllowedExtras++;
1583MxU16 LegoAnimationManager::FUN_10062110(
1599 if (direction.Dot(direction, p_direction) > 0.707) {
1602 position -= p_position;
1614 if (len < max && len > min) {
1617 for (
MxU16 i = m_unk0x0e; i <= m_unk0x10; i++) {
1618 if (m_anims[i].m_characterIndex == index && m_anims[i].m_unk0x0c & p_unk0x0c &&
1619 m_anims[i].m_unk0x29) {
1621 if (vehicleId >= 0) {
1625 if (m_anims[i].m_unk0x2a[j] == vehicleId) {
1631 if (p_unk0x14 != found) {
1639 for (i = i + 1; i <= m_unk0x10; i++) {
1640 if (m_anims[i].m_characterIndex == index && m_anims[i].m_unk0x0c & p_unk0x0c &&
1641 m_anims[i].m_unk0x29 && m_anims[i].m_unk0x22 < unk0x22) {
1660MxS8 LegoAnimationManager::GetCharacterIndex(
const char* p_name)
1679 if (world !=
NULL) {
1682 if (entityList !=
NULL) {
1690 while (cursor.Next(entity)) {
1691 if (entity != actor && entity->
IsA(
"LegoPathActor")) {
1694 if (roi->
GetVisibility() && FUN_10062650(position, und, roi)) {
1695 if (!ModelExists(p_info, roi->
GetName())) {
1709MxBool LegoAnimationManager::ModelExists(
AnimInfo& p_info,
const char* p_name)
1714 if (models !=
NULL && modelCount) {
1715 for (
MxU8 i = 0; i < modelCount; i++) {
1716 if (!strcmpi(models[i].m_name, p_name)) {
1727void LegoAnimationManager::FUN_10062580(
AnimInfo& p_info)
1732 if (models !=
NULL && modelCount) {
1733 for (
MxU8 i = 0; i < modelCount; i++) {
1744 if (m_extras[i].m_roi == actor->
GetROI()) {
1749 if (vehicleId >= 0) {
1765 if (p_roi !=
NULL) {
1769 float len = position.LenSquared();
1798 if (ModelExists(p_info,
GameState()->GetActorName())) {
1812 if (world !=
NULL) {
1813 m_unk0x28[1] = (
MxPresenter*) world->
Find(
"MxSoundPresenter",
"TransitionSound1");
1814 m_unk0x28[0] = (
MxPresenter*) world->
Find(
"MxSoundPresenter",
"TransitionSound2");
1828 if (p_und || viewManager !=
NULL) {
1836 MxLong und = ((m_numAllowedExtras - 2) * 280000 / 18) + 20000;
1839 if ((p_und && !maOrPa) ||
1840 (
g_characters[m_extras[i].m_characterId].m_unk0x10 >= 0 && time - m_extras[i].m_unk0x08 > und &&
1853 if (m_extras[i].m_unk0x14) {
1857 if (vehicleId >= 0) {
1883 if (p_und || (!m_animRunning && m_unk0x400)) {
1886 if (world !=
NULL) {
1892 for (i = 0; i < m_numAllowedExtras && m_extras[i].
m_roi !=
NULL; i++) {
1895 if (i != m_numAllowedExtras) {
1896 MxU8 und = rand() % 2 != 0 ? 1 : 2;
1914 if (p_location < 0) {
1917 if (!FUN_10064120(boundary, und == 2, bool2)) {
1925 if (location !=
NULL) {
1937 if (boundary !=
NULL) {
1938 for (i = 0; i < m_numAllowedExtras; i++) {
1939 if (m_extras[i].m_roi ==
NULL) {
1940 m_lastExtraCharacterId++;
1943 m_lastExtraCharacterId = 0;
1946 MxU32 characterIdStart = m_lastExtraCharacterId;
1953 active = rand() % 100 < 50;
1960 g_characters[m_lastExtraCharacterId].m_active == active) {
1996 if (vehicleId >= 0) {
2005 m_lastExtraCharacterId
2015 if (m_extras[i].m_unk0x14) {
2016 speed = ((float) (rand() * 1.5) / 32767.0f) + 0.9;
2019 speed = ((float) (rand() * 1.4) / 32767.0f) + 0.6;
2040 m_lastExtraCharacterId++;
2043 m_lastExtraCharacterId = 0;
2046 if (m_lastExtraCharacterId == characterIdStart) {
2050 goto tryNextCharacter;
2066 if (world ==
NULL || m_suspended || !m_unk0x400) {
2071 const char* name = p_roi->
GetName();
2074 if (actor !=
NULL) {
2075 MxS32 characterId = -1;
2085 if (characterId == -1) {
2091 if (m_extras[i].m_roi ==
NULL) {
2092 m_extras[i].
m_roi = p_roi;
2105 if (m_extras[i].m_roi == p_roi) {
2155 switch (rand() % 3) {
2182 if (FUN_10063b90(world, actor,
CharacterManager()->GetMood(p_roi), characterId)) {
2189 result = world->
PlaceActor(actor, p_presenter, position, direction);
2221 if (p_list !=
NULL) {
2241 while (cursor.
Next(roi)) {
2242 if (roi->
GetVisibility() && FUN_10062e20(roi, p_presenter)) {
2249 if (actor !=
NULL) {
2251 if (m_extras[i].m_roi == roi) {
2257 if (m_extras[i].m_unk0x14) {
2261 if (vehicleId >= 0) {
2284 FUN_10063e40(p_presenter);
2301 if (p_list !=
NULL && m_unk0x424 !=
NULL) {
2305 while (cursor.
Next(roi)) {
2306 const char* name = roi->
GetName();
2317void LegoAnimationManager::FUN_10063950(
LegoROI* p_roi)
2319 if (m_unk0x424 !=
NULL) {
2322 if (cursor.Find(p_roi)) {
2330void LegoAnimationManager::FUN_10063aa0()
2335 while (cursor.Next(roi)) {
2345 const char* vehicleWC;
2349 (vehicleWC = cycles[10]) !=
NULL) {
2352 if (presenter !=
NULL) {
2361 vehicleWC = cycles[p_mood];
2362 if (vehicleWC !=
NULL) {
2365 if (presenter !=
NULL) {
2374 vehicleWC = cycles[p_mood + 4];
2375 if (vehicleWC !=
NULL) {
2378 if (presenter !=
NULL) {
2387 vehicleWC = cycles[p_mood + 7];
2388 if (vehicleWC !=
NULL) {
2391 if (presenter !=
NULL) {
2402void LegoAnimationManager::FUN_10063d10()
2411 if (m_extras[i].m_unk0x0c &&
g_characters[m_extras[i].m_characterId].m_unk0x0c >= 0 &&
2412 g_characters[m_extras[i].m_characterId].m_unk0x0c < time - m_extras[i].m_unk0x08) {
2417 if (actor !=
NULL) {
2418 float speed = m_extras[i].
m_speed;
2421 if (m_extras[i].m_unk0x14) {
2422 speed = ((float) (rand() * 1.5) / 32767.0f) + 0.9;
2425 speed = ((float) (rand() * 1.4) / 32767.0f) + 0.6;
2434 if (actor !=
NULL) {
2446 if (m_unk0x424 !=
NULL) {
2450 while (cursor.Next(roi)) {
2451 if (!FUN_10062e20(roi, p_presenter)) {
2468 return FUN_10064010(boundary, pSrcE, p_boundary->
m_srcScale);
2492 boundingBox.
Min() = p1;
2493 boundingBox.
Min() -= vec;
2494 boundingBox.
Max() = p1;
2495 boundingBox.
Max() += vec;
2509 float destScale = ((rand() * 0.5) / 32767.0) + 0.25;
2512 if (actor ==
NULL) {
2518 if (boundary ==
NULL) {
2523 float local4c = 0.0f;
2530 for (i = 0; i < numEdges; i++) {
2533 float dot = vec.
Dot(direction, vec);
2535 if (dot > local4c) {
2547 }
while (e != local50);
2557 if (local34 !=
NULL) {
2559 (!p_bool2 || FUN_10064010(boundary, local8, destScale))) {
2564 for (i = 0; i < numEdges; i++) {
2568 p_boundary->
m_src = i;
2570 else if (local8 == e) {
2589 }
while (!local34->
GetMask0x03() && local34 != local50);
2591 if (local34 == local50) {
2602MxResult LegoAnimationManager::FUN_10064380(
2604 const char* p_boundaryName,
2617 MxS32 extraIndex = -1;
2624 if (roi ==
NULL && extraIndex == -1) {
2628 if (roi !=
NULL && !strcmpi(roi->
GetName(), p_name)) {
2641 if (actor ==
NULL && extraIndex != -1) {
2646 if (!strcmpi(
g_characters[characterId].m_name, p_name)) {
2657 m_extras[extraIndex].
m_speed = p_speed;
2663 if (actor !=
NULL) {
2664 MxU8 unk0x0c = rand() % 2 != 0 ? 1 : 2;
2668 if (world->
PlaceActor(actor, p_boundaryName, p_src, p_srcScale, p_dest, p_destScale) !=
SUCCESS) {
2680 if (presenter !=
NULL) {
2685 if (presenter !=
NULL) {
2691 m_extras[i].
m_speed = p_speed;
2707 if (p_position !=
NULL) {
2720 return FUN_10064380(
"brickstr",
"EDG02_95", 1, 0.5f, 3, 0.5f, rand() % 3 + 14, -1, rand() % 3, -1, 0.5f);
2731 if (p_position !=
NULL) {
2745 FUN_10064380(
"mama",
"USR00_47", 1, 0.43f, 3, 0.84f, rand() % 3 + 13, -1, rand() % 3, -1, 0.7f);
2749 FUN_10064380(
"papa",
"USR00_193", 3, 0.55f, 1, 0.4f, rand() % 3 + 13, -1, rand() % 3, -1, 0.9f);
2766 if (!strcmpi(roi->
GetName(), p_name)) {
2781 if (m_unk0x402 && p_tranInfo->
m_unk0x14) {
2784 m_unk0x42c = p_tranInfo;
2785 m_unk0x434 = p_unk0x404;
2786 m_unk0x438 = p_unk0x404 + 1000;
2793 if (actor !=
NULL) {
2799 if (location !=
NULL) {
2817void LegoAnimationManager::FUN_10064b50(
MxLong p_time)
2819 if (m_unk0x430 && m_unk0x42c !=
NULL) {
2822 if (p_time < 0 || m_unk0x438 <= p_time) {
2829 float und = (float) (p_time - m_unk0x434) / (float) (m_unk0x438 - m_unk0x434);
2832 sub[0] = (m_unk0x484[3][0] - m_unk0x43c[3][0]) * und;
2833 sub[1] = (m_unk0x484[3][1] - m_unk0x43c[3][1]) * und;
2834 sub[2] = (m_unk0x484[3][2] - m_unk0x43c[3][2]) * und;
2838 VPV3(mat[3], m_unk0x43c[3], sub);
2858 if (m_tranInfoList !=
NULL) {
2862 while (cursor.
Next(tranInfo)) {
2882 m_locationsFlagsLength = 0;
2883 m_locationsFlags =
NULL;
2890 delete[] m_locationsFlags;
2896 if (m_unk0x10 !=
NULL) {
2897 for (
MxS32 i = 0; i < m_unk0x0c; i++) {
2901 p_outExtraCharacterId = m_extraCharacterId;
2903 for (
MxS32 j = 0; j < m_locationsFlagsLength; j++) {
2905 if (location !=
NULL) {
2906 location->
m_unk0x5c = m_locationsFlags[j];
2915 if (m_unk0x10 ==
NULL) {
2916 m_unk0x0c = p_animsLength;
2917 m_unk0x10 =
new MxU16[p_animsLength];
2919 m_locationsFlagsLength = numLocations;
2920 m_locationsFlags =
new MxBool[numLocations];
2923 m_extraCharacterId = p_extraCharacterId;
2925 for (
MxS32 i = 0; i < m_unk0x0c; i++) {
2929 for (
MxS32 j = 0; j < m_locationsFlagsLength; j++) {
2931 if (location !=
NULL) {
2932 m_locationsFlags[j] = location->
m_unk0x5c;
2947 p_storage->
ReadU32(m_extraCharacterId);
2953 p_storage->
ReadU32(m_unk0x0c);
2956 if (m_unk0x0c != 0) {
2957 m_unk0x10 =
new MxU16[m_unk0x0c];
2963 m_unk0x10 =
new MxU16[m_unk0x0c];
2966 for (i = 0; i < m_unk0x0c; i++) {
2967 p_storage->
ReadU16(m_unk0x10[i]);
2971 p_storage->
ReadU32(m_locationsFlagsLength);
2974 if (m_locationsFlags) {
2975 delete[] m_locationsFlags;
2978 if (m_locationsFlagsLength != 0) {
2979 m_locationsFlags =
new MxBool[m_locationsFlagsLength];
2982 m_locationsFlags =
NULL;
2985 m_locationsFlags =
new MxBool[m_locationsFlagsLength];
2988 for (i = 0; i < m_locationsFlagsLength; i++) {
2989 p_storage->
ReadU8(m_locationsFlags[i]);
2995 p_storage->
WriteU32(m_extraCharacterId);
2998 for (i = 0; i < m_unk0x0c; i++) {
3002 p_storage->
WriteU32(m_locationsFlagsLength);
3003 for (i = 0; i < m_locationsFlagsLength; i++) {
3004 p_storage->
WriteU8(m_locationsFlags[i]);
3015 if (m_unk0x10 !=
NULL) {
3016 m_extraCharacterId = 0;
3018 for (
MxS32 i = 0; i < m_unk0x0c; i++) {
3022 for (
MxS32 j = 0; j < m_locationsFlagsLength; j++) {
3024 m_locationsFlags[j] = 0;
[AI] Persistent serializable animation state for resuming animations and restoring global animation p...
AnimState()
Constructor. [AI].
void CopyToAnims(MxU32, AnimInfo *p_anims, MxU32 &p_outExtraCharacterId)
[AI] Writes tracked usage data to animations.
MxBool Reset() override
[AI] Resets all tracked animation usage to default.
~AnimState() override
Destructor, releases animation tracking arrays. [AI].
MxResult Serialize(LegoStorage *p_storage) override
[AI] Serialize state to or from disk for save/load.
void InitFromAnims(MxU32 p_animsLength, AnimInfo *p_anims, MxU32 p_extraCharacterId)
[AI] Reads usage state from animations and stores it in this AnimState.
[AI] Represents an axis-aligned bounding box in 3D space, using minimum and maximum points.
const Vector3 & Min() const
[AI] Const accessor for the minimum corner of the bounding box.
const Vector3 & Max() const
[AI] Const accessor for the maximum corner of the bounding box.
const float & Radius() const
[AI] Const accessor for the sphere radius.
BOOL Moved(ViewROI &rROI)
[AI] Notifies the manager that the ROI has moved and needs spatial update.
virtual void ClearMaps()
[AI] Deallocates all animation map structures and selects no animation; resets current animation inde...
void FUN_1004b840()
[AI] Helper routine to end all actions except the central one, handle action teardown,...
LegoAnimPresenter * GetPresenter()
[AI] Returns the main subordinate LegoAnimPresenter currently managed by this MM presenter.
MxBool FUN_1004b830()
[AI] Returns true if the presenter state has reached or surpassed e_unk6.
void FUN_1004b8c0()
[AI] Calls the state transition handler, forcing the presenter's tickle progression for special handl...
[AI] Handles playback and synchronization of animated LEGO objects, including variable substitution,...
LegoAnim * GetAnimation()
[AI] Returns the current animation resource in use.
[AI] Root class for all node-based animation blending/structure.
LegoAnimScene * GetCamAnim()
[AI] Gets the optional camera/scene animation track.
[AI] Animation manager handling all world and character animation state, loading, and logic for extra...
MxLong Notify(MxParam &p_param) override
[AI] Handles system/game notifications, e.g.
void PurgeExtra(MxBool p_und)
[AI] Removes all extras matching current world/time criteria (but not the player's current character)...
MxResult StartEntityAction(MxDSAction &p_dsAction, LegoEntity *p_entity)
[AI] Starts a DSAction for a specific entity, managing controller/actor logic if relevant.
void FUN_10063780(LegoROIList *p_list)
[AI] Examines an ROI list and adds all actors of type to internal "pending" list for extras.
MxBool FUN_10064ee0(MxU32 p_objectId)
[AI] Determines if any currently running animation is assigned to the given objectId,...
void FUN_10060540(MxBool p_unk0x29)
[AI] Sets the 'enabled for random camera animation' flag for all animations.
void FUN_10060480(const LegoChar *p_characterNames[], MxU32 p_numCharacterNames)
[AI] Marks characters in the global character list (g_characters) as available for animation accordin...
MxResult FUN_10060dc0(MxU32 p_objectId, MxMatrix *p_matrix, MxBool p_param3, MxU8 p_param4, LegoROI *p_roi, MxBool p_param6, MxBool p_param7, MxBool p_param8, MxBool p_param9)
[AI] Helper for starting a specific animation, including world matrix and camera settings.
MxBool FindVehicle(const char *p_name, MxU32 &p_index)
[AI] Looks up a vehicle by name, returning its index if found.
void Reset(MxBool p_und)
[AI] Resets all internal state; optionally resets animation state too.
void FUN_10061010(MxBool p_und)
[AI] Cancels all camera/transition animations and resets camera after completion.
@ e_unk1
[AI] Unknown/unspecified play mode
@ e_unk0
[AI] Unknown/unspecified play mode
~LegoAnimationManager() override
Destructor, cleans up all allocations and deregisters from tickle/notify. [AI].
void FUN_100604f0(MxS32 p_objectIds[], MxU32 p_numObjectIds)
[AI] Enables/disables certain animations by object id list (sets m_unk0x29 flag in AnimInfo).
MxResult LoadWorldInfo(LegoOmni::World p_worldId)
[AI] Loads all world animation and extra info.
MxResult Tickle() override
[AI] Called by tick manager, processes world/time-based animation logic, including spawning extras an...
MxResult ReadModelInfo(LegoStorage *p_storage, ModelInfo *p_info)
[AI] Reads a single ModelInfo out of storage.
void FUN_10060570(MxBool p_unk0x1a)
[AI] Sets whether the manager should immediately trigger camera transition animations in quick succes...
void Resume()
[AI] Resumes animation manager from suspension, restoring all previously suspended state.
void FUN_100604d0(MxBool p_unk0x08)
[AI] Sets the m_unk0x08 flag for all characters.
MxResult FUN_10064880(const char *p_name, MxS32 p_unk0x0c, MxS32 p_unk0x10)
[AI] Updates specified character's extra animation idle/play time values for active extras.
void FUN_10062770()
[AI] Initializes sound transitions if not already active for the current world.
void EnableCamAnims(MxBool p_enableCamAnims)
[AI] Sets whether camera-based queued animations are enabled for the world.
void FUN_10063270(LegoROIList *p_list, LegoAnimPresenter *p_presenter)
[AI] Handles "extras" onboarding by evaluating visibility and position for presenter-based animation.
LegoAnimationManager()
Default constructor. [AI].
void CameraTriggerFire(LegoPathActor *p_actor, MxBool, MxU32 p_location, MxBool p_bool)
[AI] Triggers a camera animation based on user and location state.
MxResult ReadAnimInfo(LegoStorage *p_storage, AnimInfo *p_info)
[AI] Reads an AnimInfo entry from file storage, building model list and parsing parameters.
void Suspend()
[AI] Suspends all activity, saving out transition/animation state, and disables extra processing.
MxResult FUN_10064740(Vector3 *p_position)
[AI] Similar to FUN_10064670, but triggers a different special animation event for secondary location...
MxResult FUN_10064670(Vector3 *p_position)
[AI] Activates special triggered animation in response to player position near given point.
LegoTranInfo * GetTranInfo(MxU32 p_index)
[AI] Retrieves an active transition info, or NULL if not found.
static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig)
[AI] Updates the configuration values (global) for animation manager's allowed number of extras,...
void AddExtra(MxS32 p_location, MxBool p_und)
[AI] Spawns a new extra actor at a boundary or location, if capacity and logic allow.
void FUN_1005f6d0(MxBool p_unk0x400)
[AI] Enables or disables extras (extra actors).
LegoExtraActor * GetExtraActor(const char *p_name)
[AI] Returns an extra actor associated with a given character name, or NULL if not found.
void ReleaseActor(const char *p_name)
[AI] Releases a character/ROI by name, decrementing its reference count and deleting if zero.
LegoROI * GetActorROI(const char *p_name, MxBool p_createEntity)
[AI] Returns a LegoROI for the given character name, creating and registering the actor if necessary.
Notification parameter for signaling the end of an animation in the LEGO Island engine.
[AI] Cursor class for iterating through a LegoEntityList.
[AI] A strongly typed list for holding LegoEntity pointers.
[AI] Represents an entity that can be placed and managed in the LEGO Island world.
Mx3DPointFloat GetWorldDirection()
[AI] Gets the normalized world-space direction vector, optionally updating from ROI....
virtual void SetWorldSpeed(MxFloat p_worldSpeed)
[AI] Sets the current world speed value for this entity (used to control motion/animation rate).
LegoROI * GetROI()
[AI] Gets the ROI (Realtime Object Instance) associated with this entity. [AI]
MxU8 GetType()
[AI] Gets the type of this entity (one of the enum Type values). [AI]
MxFloat GetWorldSpeed()
[AI] Gets the entity's current world speed state. [AI]
@ e_actor
[AI] Standard character entity controlled by scripts or user [AI]
MxBool IsA(const char *p_name) const override
[AI] Polymorphic type check for this entity given a string.
Implementation of LegoStorage for file-backed storage using stdio FILE*.
LegoResult Read(void *p_buffer, LegoU32 p_size) override
Reads bytes from file at current position.
LegoResult Open(const char *p_name, LegoU32 p_mode)
Opens a file with given name and mode, closing existing file if needed.
LegoState * CreateState(const char *p_stateName)
Creates an instance of given state, registers it, and returns pointer.
@ e_act1
Act 1: the first main segment of the game. [AI].
MxU8 GetActorId()
Returns the current selected actor ID. [AI].
LegoState * GetState(const char *p_stateName)
Find an existing state (LegoState-derived) object by its registered script/class name.
[AI] Specialized presenter class for handling locomotion animation playback and state in the LEGO Isl...
void FUN_1006d680(LegoAnimActor *p_actor, MxFloat p_value)
[AI] Binds a LegoAnimActor to the internal animation context and ROI mapping.
static MxS32 GetNumLocations()
[AI] Static: Retrieves the number of named locations registered in the navigation system.
static LegoLocation * GetLocation(MxU32 p_location)
[AI] Static: Retrieves the pointer to a LegoLocation struct by its index.
static LegoOmni * GetInstance()
[AI] Returns the current LegoOmni singleton pointer, cast from MxOmni.
MxResult StartActionIfUnknown0x13c(MxDSAction &p_dsAction)
[AI] Starts action if the unknown0x13c member is set; otherwise returns success.
World
[AI] Identifiers for all unique, script-driven world environments in LEGO Island.
@ e_undefined
[AI] No world specified. [AI]
@ e_act1
[AI] Act 1 main world. [AI]
LegoROI * FindROI(const char *p_name)
[AI] Finds a top-level LegoROI (region of interest/3D object) by name string.
[AI] An actor that moves along a predefined path, supporting boundary transitions,...
MxU32 GetActorState()
[AI] Gets the current navigation/animation state of the actor.
void SetController(LegoPathController *p_pathController)
[AI] Assigns a new path controller (used for actor transitions between paths).
@ c_initial
[AI] Default state upon creation or reset. [AI]
@ c_disabled
[AI] Marks as disabled or inactive for path follow logic. [AI]
LegoPathController * GetController()
[AI] Retrieves pointer to the path controller which governs this actor's movement.
LegoPathBoundary * GetBoundary()
[AI] Retrieves the current path boundary associated with this actor.
void SetActorState(MxU32 p_actorState)
[AI] Sets the navigation/path state of the actor.
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles,...
[AI] Manager for controlling actors' movement along predefined geometric paths.
MxResult RemoveActor(LegoPathActor *p_actor)
[AI] Removes an actor from the controller, detaches it from controlled boundaries,...
[AI] A typed list cursor for iterating over a LegoROIList.
[AI] A specialized pointer list for managing LegoROI instances.
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
const LegoChar * GetName() const
[AI] Gets this ROI's name.
LegoEntity * GetEntity()
[AI] Gets the entity associated with this ROI (or NULL).
void UpdateListener(const float *p_position, const float *p_direction, const float *p_up, const float *p_velocity)
[AI] Updates the 3D sound listener properties in DirectSound, reflecting player/world changes.
virtual MxResult Serialize(LegoStorage *p_storage)
[AI] Serialize state to a storage (for save/load).
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
LegoStorage * WriteU32(MxU32 p_data)
Writes a 32-bit unsigned value to storage.
LegoStorage * ReadU32(MxU32 &p_data)
Reads a 32-bit unsigned value from storage.
LegoStorage * WriteU8(LegoU8 p_data)
Writes an 8-bit unsigned value to storage.
virtual LegoBool IsWriteMode()
Returns TRUE if object was opened in write mode.
LegoStorage * ReadU8(LegoU8 &p_data)
Reads an 8-bit unsigned value from storage.
LegoStorage * ReadU16(LegoU16 &p_data)
Reads a 16-bit unsigned value from storage.
virtual LegoResult Read(void *p_buffer, LegoU32 p_size)=0
Read bytes from storage into buffer.
virtual LegoBool IsReadMode()
Returns TRUE if object was opened in read mode.
LegoStorage * WriteU16(LegoU16 p_data)
Writes a 16-bit unsigned value to storage.
@ c_read
Open for read operations. [AI].
[AI] Cursor/iterator for traversing a LegoTranInfoList.
[AI] List container holding pointers to LegoTranInfo objects for use in transfer/pathfinding/ROIs.
double GetElapsedSeconds()
[AI] Returns the elapsed wall clock seconds since the last Tickle update (frame time).
Lego3DManager * Get3DManager()
[AI] Returns the Lego3DManager for this manager, which owns all 3D scene representations and view con...
LegoROI * GetViewROI()
[AI] Returns the viewpoint ROI for the current view/camera.
LegoU8 GetNumEdges()
[AI] Returns the number of edge elements assigned to this face.
LegoUnknown100db7f4 ** GetEdges()
[AI] Gets the array of pointers to the edge objects that form this face.
const LegoChar * GetName()
[AI] Returns the name string of this edge, typically used for debugging and lookup.
@ c_bit1
[AI] Edge-specific flag (purpose determined by logic in edge processing)
Represents the active 3D world, holding all entity, animation, sound, path, and ROI objects.
MxResult PlaceActor(LegoPathActor *p_actor, const char *p_name, MxS32 p_src, float p_srcScale, MxS32 p_dest, float p_destScale)
Places an actor along a path, from source to destination, using named references and scaling.
LegoPathBoundary * FindPathBoundary(const char *p_name)
Finds a path boundary in all path controllers by name.
LegoEntityList * GetEntityList()
Returns the current list of entities.
MxCore * Find(const char *p_class, const char *p_name)
Finds an object of a given class and name in the world.
void RemoveActor(LegoPathActor *p_actor)
Removes an actor from all known path controllers.
[AI] Represents a 3D point with floating-point precision, inheriting from Vector3.
void RaiseVolume()
[AI] Requests that the background music volume is raised (decrements suppression counter); triggers f...
void LowerVolume()
[AI] Requests a reduction in current background music volume, queuing for fade out (increments suppre...
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
void AppendExtra(MxU16 p_extraLength, const char *p_extraData)
[AI] Concatenates or stores extra data associated with this action, robust for multi-part actions.
virtual void SetAtomId(MxAtomId p_atomId)
[AI] Sets the atom id for this object instance, used for indexing or lookup.
void SetUnknown24(MxS16 p_unk0x24)
[AI] Sets the unknown field at 0x24 (possibly version/state).
void SetObjectId(MxU32 p_objectId)
[AI] Sets the object id (for serialization or lookup).
[AI] Represents a 4x4 transformation matrix, specialized for the LEGO Island engine and derived from ...
void Unregister(MxCore *p_listener)
[AI] Removes a previously registered listener and flushes any pending notifications for it.
void Register(MxCore *p_listener)
[AI] Registers a listener object to receive notifications.
MxResult Send(MxCore *p_listener, const MxNotificationParam &p_param)
[AI] Queues a notification to be sent to a specific registered listener.
[AI] Parameter object representing a single notification or event, carrying an identifier and sender ...
static const char * GetCD()
[AI] Retrieves the configured CD-ROM media path string used for resource location.
static const char * GetHD()
[AI] Retrieves the configured hard disk media path string used for resource location.
[AI] MxParam serves as a polymorphic base class for parameter passing in event and notification syste...
[AI] Abstract base class for all presenter types in the LEGO Island engine, responsible for managing ...
virtual void UnregisterClient(MxCore *p_client)
[AI] Unregisters (marks for destruction) a previously registered client.
virtual void RegisterClient(MxCore *p_client, MxTime p_interval)
[AI] Registers an MxCore object to receive periodic tickles.
MxLong GetTime()
Returns the current timer value in ms, depending on running state.
const BoundingSphere & GetWorldBoundingSphere() const override
Returns the object's bounding sphere in world coordinates.
const float * GetWorldUp() const
Returns a pointer to the world up vector from the transformation matrix.
const float * GetWorldPosition() const
Returns a pointer to the world position from the transformation matrix (translation row).
const float * GetWorldDirection() const
Returns a pointer to the world direction vector (forward axis) from the transformation matrix.
const Matrix4 & GetLocal2World() const
Accessor for the current local-to-world transformation matrix.
void WrappedSetLocalTransform(const Matrix4 &p_transform)
Wraps SetLocalTransform, for possible override or interface uniformity.
void FUN_100a5a30(const Vector3 &p_world_velocity)
Sets the world velocity to the provided vector.
const float * GetWorldVelocity() const override
Returns a pointer to the object's velocity vector in world space.
const BoundingBox & GetWorldBoundingBox() const override
Returns the object's bounding box in world coordinates.
unsigned char GetVisibility()
[AI] Returns the visibility flag; true if visible, false if hidden.
void SetVisibility(unsigned char p_visible)
[AI] Sets the visibility flag to the provided value.
virtual float Dot(const float *p_a, const float *p_b) const
[AI] Compute the dot product of the two float arrays interpreted as vectors of 2 elements.
[AI] 3D vector class, providing vector and cross-product operations in 3D space.
void Clear() override
[AI] Sets every coordinate (x, y, z) to zero.
float LenSquared() const override
[AI] Computes the squared magnitude (x^2 + y^2 + z^2) of this vector.
[AI] Manages all ViewROI objects that are rendered in a given scene, handles frustum culling,...
unsigned int IsBoundingBoxInFrustum(const BoundingBox &p_bounding_box)
[AI] Determines if a bounding box is (partially) inside the camera's view frustum using frustum-plane...
[AI] ViewROI objects represent viewable and placeable objects in the scene, each holding their own tr...
#define DECOMP_SIZE_ASSERT(T, S)
const char * g_strANIMMAN_ID
[AI] Used to reference the animation manager identifier during entity or animation handling.
const char * g_cycles[11][17]
LegoAnimationManager::Character g_characters[47]
LegoAnimationManager::Vehicle g_vehicles[]
float g_unk0x100f74b0[6][3]
MxS32 g_legoAnimationManagerConfig
#define NULL
[AI] Null pointer value (C/C++ semantics).
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
#define FAILURE
[AI] Used to indicate a failed operation in result codes.
long LegoS32
[AI] Signed 32-bit integer type for cross-platform compatibility.
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
LegoGameState * GameState()
[AI] Accessor for the game's central game state controller. [AI]
MxResult StartActionIfUnknown0x13c(MxDSAction &p_dsAction)
[AI] Triggers a DSAction if a certain unknown flag (0x13c) is set.
LegoVideoManager * VideoManager()
[AI] Accessor for the game's LegoVideoManager subsystem. Used for managing 3D/video hardware....
LegoCharacterManager * CharacterManager()
[AI] Accessor for the character manager, which manages in-game characters/NPCs. [AI]
LegoSoundManager * SoundManager()
[AI] Accessor for the game's LegoSoundManager subsystem from the global LegoOmni instance....
MxBackgroundAudioManager * BackgroundAudioManager()
[AI] Accessor for the background audio manager. Used for background music and ambient sounds....
ViewManager * GetViewManager()
[AI] Accessor for the current ViewManager, managing rendering views/cameras. [AI]
LegoWorld * CurrentWorld()
[AI] Accessor for the currently active LegoWorld instance. [AI]
LegoNavController * NavController()
[AI] Accessor for the navigation controller, managing player/camera navigation. [AI]
LegoOmni * Lego()
[AI] Retrieves the global LegoOmni singleton instance, providing access to core subsystems.
LegoPathActor * UserActor()
[AI] Accessor for the user (player-controllable) LegoPathActor. [AI]
MxTimer * Timer()
[AI] Returns the global simulation timer.
MxNotificationManager * NotificationManager()
[AI] Returns the notification manager for system-wide state/update notifications.
MxTickleManager * TickleManager()
[AI] Provides access to the global tickle manager.
@ c_notificationEndAnim
[AI] End of an animation [AI]
#define TWOCC(a, b)
[AI] Macro to compose a 16-bit code from two 8-bit characters (e.g., for type IDs).
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 i...
void CalcLocalTransform(const Vector3 &p_posVec, const Vector3 &p_dirVec, const Vector3 &p_upVec, Matrix4 &p_outMatrix)
[AI] Computes a transformation matrix based on a position, direction, and up vector.
[AI] Describes a specific animation, containing animation parameters, model list, and related metadat...
float m_unk0x10[4]
Animation parameters: start/target position and radius. [AI].
MxBool m_unk0x29
Animation is active/available/playable. [AI].
MxU16 m_unk0x22
Use-count or instance count for this animation. [AI].
ModelInfo * m_models
Array of ModelInfo structs for the animation's involved models. [AI].
MxU8 m_unk0x0c
Bitmask related to actor/vehicle ability to use this animation (see g_unk0x100d8b28)....
MxU32 m_objectId
Object ID corresponding to this animation; used as a unique key. [AI].
MxBool m_unk0x0a
Boolean to control startup/behavioral logic. [AI].
MxS8 m_unk0x2a[3]
Vehicle indices or similar (max 3), for use by certain actors. [AI].
MxU8 m_unk0x0b
Purpose unknown; animation-related flag. [AI].
MxU8 m_unk0x0d
Additional animation state flag. [AI].
char * m_name
Animation name. [AI].
MxS8 m_characterIndex
Index into g_characters for the owning character (-1 if not set). [AI].
MxS16 m_location
Location index if relevant (−1 for omni/global). [AI].
MxU8 m_modelCount
Number of models referenced in m_models array. [AI].
[AI] Static definition of a character, its animation settings, flags, and world identity.
MxS32 m_unk0x10
Maximum idle time before main animation for this character (milliseconds). [AI].
MxBool m_active
Runtime flag; TRUE if animation for this character is currently activated (in any mode)....
MxBool m_unk0x08
Boolean, TRUE if this character is eligible for "extra" animation. [AI].
MxU8 m_unk0x15
Probability (0–100) used for random vehicle assignment. [AI].
MxBool m_unk0x07
Flag for reuse/destruction logic; meaning: pending return to actor pool. [AI].
MxS8 m_unk0x16
Index in g_cycles, used for finding correct main/alternative cycle animations for this character....
MxS8 m_vehicleId
Index into the vehicle array for this character's vehicle, −1 if not relevant. [AI].
MxBool m_inExtras
True if this character is currently active as an 'extra'. [AI].
MxS32 m_unk0x0c
Minimum idle time before main animation for this character (milliseconds). [AI].
[AI] Static definition of a vehicle, including its name and state flags.
MxBool m_unk0x04
TRUE if this vehicle is to be used in the next animation cycle. [AI].
MxBool m_unk0x05
TRUE if this vehicle is reserved by an actor present as an extra. [AI].
Vector3 * CWVertex(LegoWEEdge &p_face)
[AI] Returns the "clockwise" endpoint of this edge with respect to a given face.
LegoEdge * GetCounterclockwiseEdge(LegoWEEdge &p_face)
[AI] Returns the counterclockwise adjacent edge relative to the given face.
LegoEdge * GetClockwiseEdge(LegoWEEdge &p_face)
[AI] Returns the clockwise adjacent edge relative to the given face.
Vector3 * CCWVertex(LegoWEEdge &p_face)
[AI] Returns the "counterclockwise" endpoint of this edge with respect to a given face.
Defines a logical boundary associated with a location for things such as triggers,...
MxS32 m_dest
Destination zone or tile index for this boundary. [AI].
MxS32 m_src
Source zone or tile index for this boundary. [AI].
MxBool m_unk0x10
Unknown flag. Presumed to control boundary activation/enabling or directionality. [AI].
const char * m_name
Name of the boundary, typically referencing a map edge or connection. [AI].
float m_destScale
Destination scaling factor. [AI].
float m_srcScale
Source scaling factor, modifies transition logic or geometric mapping. [AI].
Data structure representing a named spatial location and orientation in the LEGO Island world,...
Boundary m_boundaryA
First logical boundary associated with this location, for zone transitions or triggers....
float m_position[3]
Cartesian position of the location (x, y, z). [AI].
Boundary m_boundaryB
Second logical boundary, enables junctions or asymmetric transitions. [AI].
MxU8 m_frequency
Frequency or priority, may control how often this location is used/appears in algorithms....
float m_direction[3]
Direction vector, describes primary view or travel direction. [AI].
float m_up[3]
Up vector, for orientation (used in look-at or camera frames). [AI].
MxBool m_unk0x5c
Unknown flag, seems to mark special locations or enable/disable associated logic. [AI].
[AI] Holds transformation and animation information for a LEGO object/ROI, especially in the context ...
MxU32 m_index
[AI] Index for this transform instance; often used to correlate to a list or animation track....
MxBool m_unk0x14
[AI] Boolean flag for an unknown state, frequently used in transformation validity or activation gati...
@ c_bit1
[AI] Unknown flag (likely used for specialized transformation states). [AI]
@ c_bit2
[AI] Unknown flag (likely used for specialized transformation states). [AI]
LegoROI * m_unk0x08
[AI] [AI_SUGGESTED_NAME: targetROI] Pointer to the LEGO ROI (object in world) this transformation app...
MxBool m_unk0x15
[AI] Boolean flag set TRUE on construction, usage context required. Could indicate active/valid statu...
AnimInfo * m_animInfo
[AI] Pointer to animation state information associated with this transformation instance (likely cont...
MxMatrix m_unk0x2c
[AI] Current transformation matrix for this entry; reset to identity at construction and modified by ...
MxLong * m_unk0x20
[AI] [AI_SUGGESTED_NAME: animationFramePtr] Pointer to a long integer, possibly for tracking current ...
MxPresenter ** m_unk0x1c
[AI] [AI_SUGGESTED_NAME: presenterList] Pointer to an array of presenter objects. Allows for chained/...
LegoAnimMMPresenter * m_presenter
[AI] Pointer to a specific animation presenter managing this transform's animation (controls playback...
MxMatrix * m_unk0x0c
[AI] [AI_SUGGESTED_NAME: overrideMatrix] Optional pointer to a dynamically allocated matrix for custo...
MxU32 m_objectId
[AI] Unique identifier for this object/transform pair; used for lookup or dispatch....
MxU8 m_unk0x10
[AI] Unknown; likely used for frame counters, step markers, or status flags in animation/transformati...
MxS16 m_location
[AI] Location index within a parent object, animation group, or part-based system....
MxBool m_unk0x28
[AI] Another Boolean flag; TRUE by default. Likely used as part of a multi-flag state or for controll...
MxBool m_unk0x29
[AI] Another Boolean flag; TRUE by default. Possibly for progression or sequencing within animation h...
MxU32 m_flags
[AI] Miscellaneous flag word. Used for c_bit1, c_bit2, or internal mechanics related to transformatio...
[AI] Represents an advanced edge in the LEGO Island geometry system, with direction,...
LegoU32 GetMask0x03()
[AI] Returns a mask of flags relevant to the two faces (bits 0 and 1: c_bit1, c_bit2).
LegoU32 BETA_1004a830(LegoWEGEdge &p_face, LegoU8 p_mask)
[AI] Tests whether a WEG-edge meets complex mask and flag criteria for this edge, depending on mask a...
LegoWEEdge * OtherFace(LegoWEEdge *p_other)
[AI] Returns the opposite face pointer to the one passed in.
LegoResult FUN_1002ddc0(LegoWEEdge &p_f, Vector3 &p_point) const
[AI] Calculates the edge normal for use from the given face, negating it if called from faceA.
[AI] Contains information about a model used in an animation, including name and orientation.
MxU8 m_unk0x2c
Unknown purpose, acts as a boolean/flag. [AI].
MxU8 m_unk0x04
Unknown byte flag. [AI].
char * m_name
Name of the model. [AI].
float m_location[3]
Location/origin for the model in 3D space. [AI].
float m_direction[3]
Forward/direction vector. [AI].
float m_up[3]
Up vector for the model orientation. [AI].