diff --git a/asm/assets/assets.s b/asm/assets/assets.s index d4b3eafb..0cdd7ec7 100755 --- a/asm/assets/assets.s +++ b/asm/assets/assets.s @@ -6139,8 +6139,6 @@ glabel ASSET_TEX2D_MENU_ICONTTAMULET4_0 .incbin "./build/us_1.0/assets/textures/2d/menu/icon_tt_amulet4_0.bin" glabel ASSET_TEX2D_MENU_ICONTTAMULET4_1 .incbin "./build/us_1.0/assets/textures/2d/menu/icon_tt_amulet4_1.bin" -glabel ASSET_TEX2D_COMICFANS -.incbin "./build/us_1.0/assets/textures/2d/font/comicfans/comicfans.bin" glabel ASSET_TEXTURES_2D_END /********** ASSET_TEXTURES_2D_TABLE **********/ @@ -7053,7 +7051,6 @@ glabel ASSET_TEXTURES_2D_TABLE .word ASSET_TEX2D_MENU_ICONTTAMULET3_1 - ASSET_TEXTURES_2D .word ASSET_TEX2D_MENU_ICONTTAMULET4_0 - ASSET_TEXTURES_2D .word ASSET_TEX2D_MENU_ICONTTAMULET4_1 - ASSET_TEXTURES_2D -.word ASSET_TEX2D_COMICFANS - ASSET_TEXTURES_2D .word ASSET_TEXTURES_2D_END - ASSET_TEXTURES_2D .word 0xFFFFFFFF glabel ASSET_TEXTURES_2D_TABLE_END diff --git a/include/asset_enums.h b/include/asset_enums.h index a13d30e5..59247c01 100644 --- a/include/asset_enums.h +++ b/include/asset_enums.h @@ -2387,8 +2387,7 @@ typedef enum AssetTextures2dEnum { ASSET_TEX2D_MENU_ICONTTAMULET3_0, ASSET_TEX2D_MENU_ICONTTAMULET3_1, ASSET_TEX2D_MENU_ICONTTAMULET4_0, - ASSET_TEX2D_MENU_ICONTTAMULET4_1, - ASSET_TEX2D_COMICFANS + ASSET_TEX2D_MENU_ICONTTAMULET4_1 } AssetTextures2dEnum; /********** ASSET_GAME_TEXT **********/ @@ -4823,8 +4822,7 @@ typedef enum AssetFontsEnum { ASSET_FONTS_FUNFONT, ASSET_FONTS_SMALLFONT, ASSET_FONTS_BIGFONT, - ASSET_FONTS_SUBTITLEFONT, - ASSET_FONTS_COMICFANS + ASSET_FONTS_SUBTITLEFONT } AssetFontsEnum; /********** ASSET_TTGHOSTS **********/ diff --git a/include/enums.h b/include/enums.h index afafb338..31793ecb 100644 --- a/include/enums.h +++ b/include/enums.h @@ -87,10 +87,10 @@ typedef enum RaceType { RACETYPE_CUTSCENE_1 = 6, // Not sure what the difference between these two are. RACETYPE_CUTSCENE_2 = 7, RACETYPE_BOSS = 8, - RACETYPE_CHALLENGE = 64, // For masking RACETYPE_CHALLENGE_BATTLE = 64, RACETYPE_CHALLENGE_BANANAS = 65, - RACETYPE_CHALLENGE_EGGS = 66 + RACETYPE_CHALLENGE_EGGS = 66, + RACETYPE_CHALLENGE = 0x40 // For masking } RaceType; typedef enum ObjectModelType { diff --git a/mods/assets/examples/IciclePyramidBananas/levels/headers/IciclePyramid.json b/mods/assets/examples/IciclePyramidBananas/levels/headers/IciclePyramid.json new file mode 100644 index 00000000..f7ee9bcf --- /dev/null +++ b/mods/assets/examples/IciclePyramidBananas/levels/headers/IciclePyramid.json @@ -0,0 +1,181 @@ +{ + "ai-levels": { + "adv1": { + "base": 0, + "completed": 0, + "silver-coins": 0, + "tracks-mode": 0, + "trophy-race": 0 + }, + "adv2": { + "base": 0, + "completed": 0, + "silver-coins": 0, + "tracks-mode": 0, + "trophy-race": 0 + } + }, + "avaliable-vehicles": [ + "VEHICLE_CAR" + ], + "background": { + "colour": { + "blue": 0, + "green": 0, + "red": 0 + }, + "multiplayer": { + "gradient-colour": { + "bottom": { + "blue": 255, + "green": 128, + "red": 128 + }, + "top": { + "blue": 255, + "green": 0, + "red": 0 + } + } + }, + "skybox": { + "id": "ASSET_OBJECT_DOME8" + } + }, + "course-height": 450.0, + "default-vehicle": "VEHICLE_CAR", + "fog": { + "colour": { + "blue": 0, + "green": 0, + "red": 0 + }, + "far": 0, + "near": 0 + }, + "fov": 60, + "instruments": 65535, + "map-2": "ASSET_LEVEL_OBJECT_MAPS_28", + "map-collectables": "ASSET_LEVEL_OBJECT_MAPS_97", + "model": "ASSET_LEVELMODEL_ICICLEPYRAMID", + "music": 34, + "name": { + "LANGUAGE_ENGLISH": "Icicle Pyramid", + "LANGUAGE_FRENCH": "PYRAMIDE POLAIRE", + "LANGUAGE_GERMAN": "Bibberpyramide", + "LANGUAGE_JAPANESE": "Japanese" + }, + "race-type": "RACETYPE_CHALLENGE_BATTLE", + "type": "LevelHeader", + "unknown": { + "unk1": 0, + "unk16": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "unk2": 0, + "unk2A": 85, + "unk2B": [ + 90, + 85, + 100, + 100, + 20, + 100, + 0, + 0, + 0 + ], + "unk3": 1, + "unk4": [ + 3, + 4, + 4, + 4 + ], + "unk44": [ + 0, + 0, + 0, + 0, + 12 + ], + "unk4F": [ + 0, + 0, + 0 + ], + "unk53": 180, + "unk56": 4, + "unk57": 16, + "unk58": 1, + "unk59": 0, + "unk5A": 1536, + "unk5C": 2, + "unk5D": 0, + "unk5E": 768, + "unk60": 120, + "unk62": 256, + "unk64": 153, + "unk66": 1024, + "unk68": 62, + "unk6A": 1, + "unk6B": 1, + "unk6C": 1, + "unk6D": 1, + "unk6E": 5, + "unk70": 1, + "unk71": 1, + "unk72": 66, + "unk73": 224, + "unkA0": 257, + "unkA2": 0, + "unkA3": 0, + "unkA8": 0, + "unkAA": 5, + "unkB0": 3600, + "unkB2": 3, + "unkB3": 18, + "unkB4": 0, + "unkB5": 83, + "unkB6": 133, + "unkB7": 1, + "unkB8": 0, + "unkB9": 66, + "unkBC": 0, + "unkBD": 0, + "unkC": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ], + "unkC4": -1475936256 + }, + "weather": { + "enable": 0, + "intensity": 0, + "opacity": 0, + "type": 0, + "velocity": { + "x": 0, + "y": 0, + "z": 0 + } + }, + "world": "WORLD_SNOWFLAKE_MOUNTAIN" +} diff --git a/mods/assets/examples/IciclePyramidBananas/levels/objectMaps/asset_level_object_maps_28.gltf b/mods/assets/examples/IciclePyramidBananas/levels/objectMaps/asset_level_object_maps_28.gltf new file mode 100644 index 00000000..a462775a --- /dev/null +++ b/mods/assets/examples/IciclePyramidBananas/levels/objectMaps/asset_level_object_maps_28.gltf @@ -0,0 +1,821 @@ +{ + "asset": { + "version": "2.0" + }, + "nodes": [ + { + "children": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18 + ], + "name": "objects" + }, + { + "extras": { + "angleY": 90.0, + "id": "ASSET_OBJECT_SETUPPOINT", + "unk8": 0, + "unk9": 0, + "vehicle": "VEHICLE_NO_OVERRIDE" + }, + "name": "setuppoint", + "translation": [ + 1.149, + 0.192, + -0.01 + ] + }, + { + "extras": { + "angleY": 185.625, + "id": "ASSET_OBJECT_SETUPPOINT", + "unk8": 1, + "unk9": 0, + "vehicle": "VEHICLE_NO_OVERRIDE" + }, + "name": "setuppoint", + "translation": [ + -0.021, + 0.192, + -1.292 + ] + }, + { + "extras": { + "angleY": -90.0, + "id": "ASSET_OBJECT_SETUPPOINT", + "unk8": 2, + "unk9": 0, + "vehicle": "VEHICLE_NO_OVERRIDE" + }, + "name": "setuppoint", + "translation": [ + -1.105, + 0.197, + -0.009000000000000001 + ] + }, + { + "extras": { + "angleY": 0.0, + "id": "ASSET_OBJECT_SETUPPOINT", + "unk8": 3, + "unk9": 0, + "vehicle": "VEHICLE_NO_OVERRIDE" + }, + "name": "setuppoint", + "translation": [ + -0.01, + 0.193, + 1.302 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_WEATHER", + "radius": 192, + "unk10": 0, + "unk11": 0, + "unk12": 1, + "unkA": 0, + "unkC": 0, + "unkE": 0 + }, + "name": "weather", + "translation": [ + 0.896, + 0.192, + 0.05 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 100, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "objectIdToSpawn": "ASSET_OBJECT_ANIMCAMERA", + "order": 0, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 345.9375, + "y_rotation": 43.59375, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.41500000000000004, + 0.676, + 0.4 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 1, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 47.8125, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + -0.489, + 0.267, + -0.776 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 2, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 178.59375, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + -1.172, + 0.223, + -1.214 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 3, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 272.8125, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + -1.034, + 0.255, + 0.007 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 4, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 175.78125, + "yawSpinSpeed": 0, + "z_rotation": 344.53125 + }, + "name": "Animation", + "translation": [ + -0.045, + 0.381, + 0.042 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 5, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 180.0, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.001, + 0.225, + 1.453 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 6, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 63.28125, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + -0.374, + 0.34, + 2.133 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 7, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 0.0, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + -0.796, + 0.43, + 1.2590000000000001 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 8, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 302.34375, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + -0.481, + 0.628, + 0.063 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 9, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 337.5, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + -0.257, + 0.123, + -0.73 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 10, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 271.40625, + "yawSpinSpeed": 0, + "z_rotation": 340.3125 + }, + "name": "Animation", + "translation": [ + 0.096, + 0.027, + -2.282 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 11, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 182.8125, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 1.73, + 0.027, + -2.4 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 12, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 90.0, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 1.7610000000000001, + 0.027, + -0.052000000000000005 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 13, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 45.0, + "y_rotation": 66.09375, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.623, + 0.044, + -0.341 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 1, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 0, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 14, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 285.46875, + "y_rotation": 147.65625, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.281, + 0.876, + -0.369 + ] + } + ], + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} diff --git a/mods/assets/examples/IciclePyramidBananas/levels/objectMaps/asset_level_object_maps_97.gltf b/mods/assets/examples/IciclePyramidBananas/levels/objectMaps/asset_level_object_maps_97.gltf new file mode 100644 index 00000000..d37741ff --- /dev/null +++ b/mods/assets/examples/IciclePyramidBananas/levels/objectMaps/asset_level_object_maps_97.gltf @@ -0,0 +1,2771 @@ +{ + "asset": { + "version": "2.0" + }, + "nodes": [ + { + "children": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95 + ], + "name": "objects" + }, + { + "extras": { + "id": "ASSET_OBJECT_COINCREATOR" + }, + "name": "BananaCreator", + "translation": [ + 1.149, + 0, + -0.01 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_COIN" + }, + "name": "Banana", + "translation": [ + 0, + 0.192, + 0 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_COINCREATOR" + }, + "name": "BananaCreator", + "translation": [ + -0.021, + 0, + -1.292 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_COINCREATOR" + }, + "name": "BananaCreator", + "translation": [ + -1.149, + 0, + -0.01 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_COINCREATOR" + }, + "name": "BananaCreator", + "translation": [ + -0.021, + 0, + 1.292 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_COINCREATOR" + }, + "name": "BananaCreator", + "translation": [ + -0.753, + 0.384, + -0.2 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_COINCREATOR" + }, + "name": "BananaCreator", + "translation": [ + 0.753, + 0.384, + 0.2 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_COINCREATOR" + }, + "name": "BananaCreator", + "translation": [ + -1.873, + -0.02, + -1.452 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_COINCREATOR" + }, + "name": "BananaCreator", + "translation": [ + 1.873, + -0.02, + 1.344 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 1, + "unkA": [ + 255, + 5, + 4, + 0 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + 1.125, + 0.192, + -0.019 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 0, + "unkA": [ + 255, + 30, + 255, + 1 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + 1.157, + 0.192, + -1.205 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 2, + "unkA": [ + 32, + 4, + 29, + 30 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + -0.023, + 0.193, + -1.237 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 3, + "unk9": 4, + "unkA": [ + 6, + 8, + 1, + 2 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + -0.033, + 0.194, + -0.021 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 5, + "unkA": [ + 255, + 31, + 255, + 1 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + 1.1520000000000001, + 0.192, + 1.187 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 6, + "unkA": [ + 37, + 4, + 28, + 31 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + -0.008, + 0.192, + 1.221 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 2, + "unk9": 7, + "unkA": [ + 255, + 28, + 8, + 255 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + -1.145, + 0.193, + 1.2 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 8, + "unkA": [ + 255, + 4, + 3, + 7 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + -1.154, + 0.192, + -0.007 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 1, + "unk9": 9, + "unkA": [ + 255, + 255, + 12, + 10 + ], + "unkE": 3 + }, + "name": "ai-node", + "translation": [ + -0.767, + 0.387, + -0.8140000000000001 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 10, + "unkA": [ + 255, + 35, + 11, + 9 + ], + "unkE": 3 + }, + "name": "ai-node", + "translation": [ + -0.783, + 0.384, + 0.833 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 1, + "unk9": 11, + "unkA": [ + 255, + 255, + 12, + 10 + ], + "unkE": 3 + }, + "name": "ai-node", + "translation": [ + 0.756, + 0.388, + 0.879 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 3, + "unk9": 12, + "unkA": [ + 255, + 34, + 9, + 11 + ], + "unkE": 3 + }, + "name": "ai-node", + "translation": [ + 0.763, + 0.386, + -0.847 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 13, + "unkA": [ + 31, + 30, + 20, + 14 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + 0.838, + 0.012, + -0.041 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 3, + "unk9": 14, + "unkA": [ + 17, + 16, + 15, + 13 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + -0.016, + 0.008, + -0.024 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 15, + "unkA": [ + 255, + 255, + 24, + 14 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + 0.021, + 0.002, + -1.074 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 16, + "unkA": [ + 29, + 28, + 21, + 14 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + -0.8130000000000001, + 0.003, + -0.033 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 17, + "unkA": [ + 255, + 255, + 18, + 14 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + -0.028, + 0.004, + 1.024 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 18, + "unkA": [ + 255, + 23, + 19, + 17 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + 0.001, + -0.028, + 2.441 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 1, + "unk9": 19, + "unkA": [ + 255, + 255, + 27, + 18 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + 1.85, + -0.028, + 2.455 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 20, + "unkA": [ + 27, + 26, + 13, + 255 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + 1.829, + -0.018000000000000002, + 0.006 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 21, + "unkA": [ + 255, + 38, + 22, + 16 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + -1.923, + -0.03, + -0.022 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 22, + "unkA": [ + 255, + 255, + 23, + 21 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + -1.873, + -0.019, + 1.452 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 1, + "unk9": 23, + "unkA": [ + 255, + 255, + 18, + 22 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + -1.8820000000000001, + -0.019, + 2.4090000000000003 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 24, + "unkA": [ + 255, + 38, + 25, + 15 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + -0.019, + -0.032, + -2.46 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 1, + "unk9": 25, + "unkA": [ + 255, + 255, + 26, + 24 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + 1.843, + -0.018000000000000002, + -2.438 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 26, + "unkA": [ + 255, + 255, + 20, + 25 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + 1.837, + -0.015, + -1.344 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 27, + "unkA": [ + 255, + 255, + 19, + 20 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + 1.8980000000000001, + -0.024, + 1.069 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 28, + "unkA": [ + 255, + 6, + 7, + 16 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + -0.787, + 0.22, + 1.206 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 29, + "unkA": [ + 255, + 2, + 3, + 16 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + -0.801, + 0.244, + -1.235 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 30, + "unkA": [ + 255, + 13, + 2, + 0 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + 0.8, + 0.223, + -1.213 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 31, + "unkA": [ + 255, + 6, + 5, + 13 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + 0.8240000000000001, + 0.23, + 1.198 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 32, + "unkA": [ + 255, + 255, + 33, + 2 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + 0.127, + 0.255, + -1.989 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 33, + "unkA": [ + 255, + 255, + 34, + 32 + ], + "unkE": 3 + }, + "name": "ai-node", + "translation": [ + 0.467, + 0.34900000000000003, + -2.035 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 34, + "unkA": [ + 255, + 255, + 12, + 33 + ], + "unkE": 3 + }, + "name": "ai-node", + "translation": [ + 0.785, + 0.365, + -1.623 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 35, + "unkA": [ + 255, + 255, + 36, + 10 + ], + "unkE": 3 + }, + "name": "ai-node", + "translation": [ + -0.778, + 0.36, + 1.68 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 36, + "unkA": [ + 255, + 255, + 37, + 35 + ], + "unkE": 3 + }, + "name": "ai-node", + "translation": [ + -0.396, + 0.31, + 2.051 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 37, + "unkA": [ + 255, + 255, + 6, + 36 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + -0.034, + 0.245, + 1.8880000000000001 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 0, + "unk9": 3, + "unkA": [ + 255, + 255, + 8, + 29 + ], + "unkE": 1 + }, + "name": "ai-node", + "translation": [ + -1.149, + 0.199, + -1.241 + ] + }, + { + "extras": { + "id": "ASSET_OBJECT_AINODE", + "padF": 0, + "unk8": 1, + "unk9": 38, + "unkA": [ + 255, + 255, + 21, + 24 + ], + "unkE": 0 + }, + "name": "ai-node", + "translation": [ + -1.868, + -0.029, + -2.469 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_MISSILE", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + -1.866, + -0.016, + -2.444 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_MISSILE", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + 1.854, + -0.018000000000000002, + 2.431 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_MISSILE", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + -0.753, + 0.384, + -0.805 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_MISSILE", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + 0.738, + 0.383, + 0.858 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_MISSILE", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + -0.217, + 0.192, + -0.02 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_TRAP", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + -0.028, + 0.192, + -0.189 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_MISSILE", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + 0.154, + 0.197, + 0.006 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_TRAP", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + -0.031, + 0.192, + 0.14400000000000002 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_SHIELD", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + -2.1630000000000003, + -0.032, + -0.01 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_SHIELD", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + 0.012, + -0.032, + -2.702 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_SHIELD", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + 0.004, + -0.032, + 2.702 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_SHIELD", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + 2.085, + -0.032, + 0.0 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_TRAP", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + -1.8800000000000001, + -0.032, + 2.42 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_TRAP", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + 1.86, + -0.032, + -2.448 + ] + }, + { + "extras": { + "balloonType": "BALLOON_TYPE_MISSILE", + "id": "ASSET_OBJECT_WEAPONBALLOON", + "padB": 0, + "radius": 1.03125, + "unk8": 0 + }, + "name": "WeaponBalloon", + "translation": [ + -0.004, + 0.0, + -0.021 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 39, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 10, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "objectIdToSpawn": "ASSET_OBJECT_ANIMCAMERA", + "order": 0, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 34, + "unk1F": 3, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 9, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 1.40625, + "y_rotation": 14.0625, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 1.233, + 0.241, + -0.265 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 17, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 1, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 357.1875, + "y_rotation": 326.25, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 1.016, + 0.244, + 0.085 + ] + }, + { + "extras": { + "actorIndex": 1, + "animationStartDelay": 3.767, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 10, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "objectIdToSpawn": "ASSET_OBJECT_ANIMCAR", + "order": 0, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 2, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 196.875, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 1.052, + 0.192, + -0.17 + ] + }, + { + "extras": { + "actorIndex": 10, + "animationStartDelay": 13.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "objectIdToSpawn": "ASSET_OBJECT_SPARKLYTHING", + "order": 0, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 345.9375, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.967, + 0.192, + -0.134 + ] + }, + { + "extras": { + "actorIndex": 11, + "animationStartDelay": 14.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "objectIdToSpawn": "ASSET_OBJECT_SPARKLYTHING", + "order": 0, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 345.9375, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.931, + 0.192, + -0.098 + ] + }, + { + "extras": { + "actorIndex": 12, + "animationStartDelay": 8.05, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "objectIdToSpawn": "ASSET_OBJECT_SPARKLYTHING", + "order": 0, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 345.9375, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.9590000000000001, + 0.192, + -0.131 + ] + }, + { + "extras": { + "actorIndex": 14, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 3, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 39, + "objAnimIndex": 0, + "objAnimLoopType": 0, + "objAnimSpeed": 2, + "objectIdToSpawn": "ASSET_OBJECT_MAGICCARPET", + "order": 0, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.359375, + "soundEffect": 0, + "specialHide": 0, + "unk13": 3, + "unk15": -1, + "unk16": 0, + "unk1E": 34, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": -128, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 4.21875, + "y_rotation": 191.25, + "yawSpinSpeed": 0, + "z_rotation": 4.21875 + }, + "name": "Animation", + "translation": [ + 1.1340000000000001, + 0.23, + -1.012 + ] + }, + { + "extras": { + "actorIndex": 14, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 55, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 24, + "objAnimIndex": -1, + "objAnimLoopType": 2, + "objAnimSpeed": 1, + "order": 1, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.359375, + "soundEffect": 0, + "specialHide": 0, + "unk13": -1, + "unk15": -1, + "unk16": 0, + "unk1E": 38, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 358.59375, + "y_rotation": 182.8125, + "yawSpinSpeed": 0, + "z_rotation": 344.53125 + }, + "name": "Animation", + "translation": [ + 1.199, + 0.223, + -0.608 + ] + }, + { + "extras": { + "actorIndex": 14, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 7, + "objAnimIndex": 0, + "objAnimLoopType": 0, + "objAnimSpeed": 1, + "order": 5, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.359375, + "soundEffect": 0, + "specialHide": 0, + "unk13": -1, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 101.25, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.767, + 0.221, + -0.019 + ] + }, + { + "extras": { + "actorIndex": 14, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 15, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 4, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.34375, + "soundEffect": 0, + "specialHide": 0, + "unk13": 0, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 85.78125, + "yawSpinSpeed": 0, + "z_rotation": 345.9375 + }, + "name": "Animation", + "translation": [ + 1.018, + 0.22, + 0.009000000000000001 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 3, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 4.21875, + "y_rotation": 230.625, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.6920000000000001, + 0.226, + -0.099 + ] + }, + { + "extras": { + "actorIndex": 14, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 2, + "objAnimSpeed": 1, + "order": 2, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.359375, + "soundEffect": 0, + "specialHide": 0, + "unk13": -1, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 178.59375, + "yawSpinSpeed": 0, + "z_rotation": 16.875 + }, + "name": "Animation", + "translation": [ + 1.101, + 0.223, + -0.36 + ] + }, + { + "extras": { + "actorIndex": 14, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 3, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.375, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 1.40625, + "y_rotation": 154.6875, + "yawSpinSpeed": 0, + "z_rotation": 334.6875 + }, + "name": "Animation", + "translation": [ + 1.145, + 0.223, + -0.076 + ] + }, + { + "extras": { + "actorIndex": 15, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 3, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 39, + "objAnimIndex": 6, + "objAnimLoopType": 1, + "objAnimSpeed": 1, + "objectIdToSpawn": "ASSET_OBJECT_ANIMGENIE", + "order": 0, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.671875, + "soundEffect": 0, + "specialHide": 0, + "unk13": -1, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": -128, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 4.21875, + "y_rotation": 191.25, + "yawSpinSpeed": 0, + "z_rotation": 4.21875 + }, + "name": "Animation", + "translation": [ + 1.1360000000000001, + 0.23, + -1.008 + ] + }, + { + "extras": { + "actorIndex": 15, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 55, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 24, + "objAnimIndex": 9, + "objAnimLoopType": 2, + "objAnimSpeed": 1, + "order": 1, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.671875, + "soundEffect": 0, + "specialHide": 0, + "unk13": -1, + "unk15": -1, + "unk16": 0, + "unk1E": 38, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 358.59375, + "y_rotation": 182.8125, + "yawSpinSpeed": 0, + "z_rotation": 344.53125 + }, + "name": "Animation", + "translation": [ + 1.201, + 0.223, + -0.604 + ] + }, + { + "extras": { + "actorIndex": 15, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 2, + "objAnimSpeed": 1, + "order": 2, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.671875, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 178.59375, + "yawSpinSpeed": 0, + "z_rotation": 16.875 + }, + "name": "Animation", + "translation": [ + 1.103, + 0.223, + -0.357 + ] + }, + { + "extras": { + "actorIndex": 15, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 2, + "objAnimSpeed": 1, + "order": 3, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.671875, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 1.40625, + "y_rotation": 154.6875, + "yawSpinSpeed": 0, + "z_rotation": 334.6875 + }, + "name": "Animation", + "translation": [ + 1.147, + 0.224, + -0.07200000000000001 + ] + }, + { + "extras": { + "actorIndex": 15, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 15, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 4, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.671875, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 85.78125, + "yawSpinSpeed": 0, + "z_rotation": 345.9375 + }, + "name": "Animation", + "translation": [ + 1.0190000000000001, + 0.223, + 0.012 + ] + }, + { + "extras": { + "actorIndex": 15, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 7, + "objAnimIndex": 11, + "objAnimLoopType": 2, + "objAnimSpeed": 1, + "order": 5, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.671875, + "soundEffect": 0, + "specialHide": 0, + "unk13": -1, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 101.25, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.769, + 0.221, + -0.017 + ] + }, + { + "extras": { + "actorIndex": 1, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 1, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 122.34375, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 1.066, + 0.192, + -0.069 + ] + }, + { + "extras": { + "actorIndex": 1, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 8, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 2, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 91.40625, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 1.0050000000000001, + 0.192, + -0.048 + ] + }, + { + "extras": { + "actorIndex": 1, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 3, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 101.25, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.88, + 0.192, + -0.053 + ] + }, + { + "extras": { + "actorIndex": 1, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 6, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 4, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 113.90625, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.798, + 0.192, + -0.053 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 16, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 2, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 277.03125, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.837, + 0.234, + 0.0 + ] + }, + { + "extras": { + "actorIndex": 16, + "animationStartDelay": 13.683, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "objectIdToSpawn": "ASSET_OBJECT_SPARKLYTHING", + "order": 0, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 45, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 345.9375, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.8270000000000001, + 0.192, + -0.145 + ] + }, + { + "extras": { + "actorIndex": 17, + "animationStartDelay": 14.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 6, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "objectIdToSpawn": "ASSET_OBJECT_BRIGHTSTAR", + "order": 0, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 0.5625, + "soundEffect": 0, + "specialHide": 1, + "unk13": 1, + "unk15": -1, + "unk16": 0, + "unk1E": 49, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 0.0, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.745, + 0.259, + -0.01 + ] + }, + { + "extras": { + "actorIndex": 17, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 1, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 0.0, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.743, + 0.23500000000000001, + -0.022 + ] + }, + { + "extras": { + "actorIndex": 17, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 4, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 2, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 0.0, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.738, + 0.229, + -0.045 + ] + }, + { + "extras": { + "actorIndex": 0, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 4, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 355.78125, + "y_rotation": 233.4375, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.653, + 0.244, + -0.12 + ] + }, + { + "extras": { + "actorIndex": 17, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 3, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 3.9375, + "soundEffect": 1, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 0, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 0.0, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.671, + 0.244, + -0.111 + ] + }, + { + "extras": { + "actorIndex": 18, + "animationStartDelay": 17.683, + "channel": 10, + "fadeAlpha": 13, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": 6, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "objectIdToSpawn": "ASSET_OBJECT_SPARKLYTHING", + "order": 0, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 1, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 48, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": -1, + "unk29": 0, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 345.9375, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.745, + 0.193, + -0.17 + ] + }, + { + "extras": { + "actorIndex": 18, + "animationStartDelay": 0.0, + "channel": 10, + "fadeAlpha": 10, + "fadeOptions": 0, + "goToNode": 255, + "id": "ASSET_OBJECT_ANIMATION", + "nextAnim": 0, + "nodeSpeed": -1, + "objAnimIndex": -1, + "objAnimLoopType": 0, + "objAnimSpeed": 0, + "order": 1, + "pitchSpinSpeed": 0, + "rollSpinSpeed": 0, + "rotateType": 0, + "scale": 1.0, + "soundEffect": 0, + "specialHide": 0, + "unk13": -128, + "unk15": -1, + "unk16": 0, + "unk1E": 0, + "unk1F": 0, + "unk20": 0, + "unk22": 0, + "unk23": 0, + "unk28": 1, + "unk29": 127, + "unk2A": -1, + "unk2D": 0, + "unk30": 0, + "unk31": 0, + "x_rotation": 0.0, + "y_rotation": 0.0, + "yawSpinSpeed": 0, + "z_rotation": 0.0 + }, + "name": "Animation", + "translation": [ + 0.81, + 0.191, + -0.107 + ] + } + ], + "scenes": [ + { + "nodes": [ + 0 + ] + } + ] +} diff --git a/mods/assets/examples/IciclePyramidBananas/meta.json b/mods/assets/examples/IciclePyramidBananas/meta.json new file mode 100644 index 00000000..dc8c0482 --- /dev/null +++ b/mods/assets/examples/IciclePyramidBananas/meta.json @@ -0,0 +1,5 @@ +{ + "name": "Icicle Pyramid (with bananas)", + "authors" : ["Example"], + "description": "Adds some bananas to the Icicle Pyramid battle map. NOTE: This example was also supposed to change the gamemode to the smokey castle one, but it crashes due to the A.I. nodes. Need to figure that out." +} \ No newline at end of file diff --git a/tools/dkr_assets_tool_src/builder/buildTypes/buildObjectMap.cpp b/tools/dkr_assets_tool_src/builder/buildTypes/buildObjectMap.cpp index aa4a4e27..f518e1dc 100644 --- a/tools/dkr_assets_tool_src/builder/buildTypes/buildObjectMap.cpp +++ b/tools/dkr_assets_tool_src/builder/buildTypes/buildObjectMap.cpp @@ -8,6 +8,10 @@ #include "helpers/c/cStructGltfHelper.h" +void search_for_objects_node() { + +} + BuildObjectMap::BuildObjectMap(DkrAssetsSettings &settings, BuildInfo &info) : _settings(settings), _info(info) { _preload_c_context(); @@ -23,8 +27,14 @@ BuildObjectMap::BuildObjectMap(DkrAssetsSettings &settings, BuildInfo &info) : _ GltfFile gltf(gltfPath); + int objectsNodeIndex; + DebugHelper::assert_(gltf.search_for_node_by_name("objects", objectsNodeIndex), + "(BuildObjectMap::BuildObjectMap) .glTF file does not contain a node named \"objects\"!"); + + GltfFileNode *objectsNode = gltf.get_node(objectsNodeIndex); + // _calculate_size() also fills the `_objectIdToStructCache` map. - size_t dataSize = _calculate_size(gltf); + size_t dataSize = _calculate_size(objectsNode); size_t outSize = DataHelper::align8(dataSize + sizeof(LevelObjectMapHeader)); @@ -36,11 +46,15 @@ BuildObjectMap::BuildObjectMap(DkrAssetsSettings &settings, BuildInfo &info) : _ objectMap->header.fileSize = dataSize; uint8_t *bytes = &objectMap->entriesData[0]; - int numberOfNodes = gltf.get_node_count(); + int numberOfChildNodes = objectsNode->get_child_count(); - // Node 0 is the root node, so we want to start at node 1. - for(int i = 1; i < numberOfNodes; i++) { - std::string objectBuildId = gltf.get_node_extra(i, "id", ""); + for(int i = 0; i < numberOfChildNodes; i++) { + GltfFileNode *objNode = objectsNode->get_child_node_by_index(i); + + std::string objectBuildId = objNode->get_extra("id", ""); + + DebugHelper::assert_(!objectBuildId.empty(), "(BuildObjectMap::BuildObjectMap) Node", i, + " does not have id defined!"); int id = _transTable->get_index_of_elem_in_array("/table", objectBuildId); @@ -64,12 +78,12 @@ BuildObjectMap::BuildObjectMap(DkrAssetsSettings &settings, BuildInfo &info) : _ entryCommon = _c_context.get_struct("LevelObjectEntryCommon"); } - _set_obj_position(gltf, bytes, entryCommon, i); + _set_obj_position(objNode, bytes, entryCommon, i); if(entryCommon != entryStruct) { for(size_t entry = 0; entry < entryStruct->entry_count(); entry++) { CStructEntry *structMember = entryStruct->get_entry(entry); - CStructGltfHelper::put_gltf_node_extra_into_struct_entry(_settings, structMember, gltf, i, bytes); + CStructGltfHelper::put_gltf_node_extra_into_struct_entry(_settings, structMember, objNode, bytes); } } @@ -92,13 +106,13 @@ BuildObjectMap::~BuildObjectMap() { } -void BuildObjectMap::_set_obj_position(GltfFile &gltf, uint8_t *bytes, CStruct *entryCommon, int nodeIndex) { +void BuildObjectMap::_set_obj_position(GltfFileNode *objNode, uint8_t *bytes, CStruct *entryCommon, int nodeIndex) { CStructEntry *memberX = entryCommon->get_entry(2); CStructEntry *memberY = entryCommon->get_entry(3); CStructEntry *memberZ = entryCommon->get_entry(4); double scaledX, scaledY, scaledZ; - gltf.get_node_position(nodeIndex, scaledX, scaledY, scaledZ); + objNode->get_position(scaledX, scaledY, scaledZ); int xPos = _settings.adjust_from_model_scale(scaledX); int yPos = _settings.adjust_from_model_scale(scaledY); @@ -109,18 +123,17 @@ void BuildObjectMap::_set_obj_position(GltfFile &gltf, uint8_t *bytes, CStruct * memberZ->set_integer_to_data(bytes, zPos); } -size_t BuildObjectMap::_calculate_size(GltfFile &gltf) { +size_t BuildObjectMap::_calculate_size(GltfFileNode *objectsNode) { size_t out = 0; - int numberOfNodes = gltf.get_node_count(); + int numberOfChildNodes = objectsNode->get_child_count(); - - - // Node 0 is the root node, so we want to start at node 1. - for(int i = 1; i < numberOfNodes; i++) { - std::string objectBuildId = gltf.get_node_extra(i, "id", ""); + for(int i = 0; i < numberOfChildNodes; i++) { + GltfFileNode *objNode = objectsNode->get_child_node_by_index(i); + std::string objectBuildId = objNode->get_extra("id", ""); - DebugHelper::assert_(!objectBuildId.empty(), "(BuildObjectMap::_calculate_size) id was not defined in node ", i); + DebugHelper::assert_(!objectBuildId.empty(), + "(BuildObjectMap::_calculate_size) id was not defined in node: ", objNode->get_name()); // First check if we have already calcuated the size of this object build id. if(_objectIdStructSizeCache.find(objectBuildId) != _objectIdStructSizeCache.end()) { diff --git a/tools/dkr_assets_tool_src/builder/buildTypes/buildObjectMap.h b/tools/dkr_assets_tool_src/builder/buildTypes/buildObjectMap.h index 23046633..7be7a7c0 100644 --- a/tools/dkr_assets_tool_src/builder/buildTypes/buildObjectMap.h +++ b/tools/dkr_assets_tool_src/builder/buildTypes/buildObjectMap.h @@ -30,8 +30,8 @@ private: JsonFile *_transTable; JsonFile *_objBehaviorToEntryTable; - void _set_obj_position(GltfFile &gltf, uint8_t *bytes, CStruct *entryCommon, int nodeIndex); + void _set_obj_position(GltfFileNode *objNode, uint8_t *bytes, CStruct *entryCommon, int nodeIndex); - size_t _calculate_size(GltfFile &gltf); + size_t _calculate_size(GltfFileNode *objectsNode); void _preload_c_context(); }; diff --git a/tools/dkr_assets_tool_src/helpers/c/cStructGltfHelper.cpp b/tools/dkr_assets_tool_src/helpers/c/cStructGltfHelper.cpp index f57cbd2c..a0ade11a 100644 --- a/tools/dkr_assets_tool_src/helpers/c/cStructGltfHelper.cpp +++ b/tools/dkr_assets_tool_src/helpers/c/cStructGltfHelper.cpp @@ -302,9 +302,10 @@ void CStructGltfHelper::put_struct_entry_into_gltf_node_extra(DkrAssetsSettings } } -void CStructGltfHelper::put_gltf_node_extra_into_struct_entry(DkrAssetsSettings &settings, CStructEntry *structMember, GltfFile &gltfFile, int gltfNode, uint8_t *bytes) { +void CStructGltfHelper::put_gltf_node_extra_into_struct_entry(DkrAssetsSettings &settings, CStructEntry *structMember, GltfFileNode *objNode, uint8_t *bytes) { CStructEntry::InternalType internalType = structMember->get_internal_type(); StructHintType hintType = StructHintType::NO_HINT; + if(structMember->has_hint()) { hintType = hintTypes[structMember->get_hint_type()]; } @@ -315,17 +316,17 @@ void CStructGltfHelper::put_gltf_node_extra_into_struct_entry(DkrAssetsSettings int value = 0; switch(hintType) { case StructHintType::NO_HINT: - value = gltfFile.get_node_extra(gltfNode, structMember->name, 0); + value = objNode->get_extra(structMember->name, 0); break; case StructHintType::ENUM: { - std::string enumValue = gltfFile.get_node_extra(gltfNode, structMember->name, ""); + std::string enumValue = objNode->get_extra(structMember->name, ""); value = get_value_from_hint_enum(structMember, enumValue); break; } case StructHintType::ASSET_ID: { - std::string buildId = gltfFile.get_node_extra(gltfNode, structMember->name, ""); + std::string buildId = objNode->get_extra(structMember->name, ""); if(buildId.empty()) { value = -1; } else { @@ -335,19 +336,19 @@ void CStructGltfHelper::put_gltf_node_extra_into_struct_entry(DkrAssetsSettings } case StructHintType::ANGLE: { - double angle = gltfFile.get_node_extra(gltfNode, structMember->name, 0.0); + double angle = objNode->get_extra(structMember->name, 0.0); value = get_value_from_hint_angle(structMember, angle); break; } case StructHintType::SCALE: { - double scale = gltfFile.get_node_extra(gltfNode, structMember->name, 0.0); + double scale = objNode->get_extra(structMember->name, 0.0); value = get_value_from_hint_scale(structMember, scale); break; } case StructHintType::OBJECT: { - std::string buildId = gltfFile.get_node_extra(gltfNode, structMember->name, ""); + std::string buildId = objNode->get_extra(structMember->name, ""); if(buildId.empty()) { value = -1; } else { @@ -357,7 +358,7 @@ void CStructGltfHelper::put_gltf_node_extra_into_struct_entry(DkrAssetsSettings } case StructHintType::TIME: { - double timeSeconds = gltfFile.get_node_extra(gltfNode, structMember->name, -1.0); + double timeSeconds = objNode->get_extra(structMember->name, -1.0); if(timeSeconds == -1.0) { value = -1; break; @@ -374,7 +375,7 @@ void CStructGltfHelper::put_gltf_node_extra_into_struct_entry(DkrAssetsSettings } case CStructEntry::InternalType::ARRAY_INTEGER: { - tinygltf::Value::Array arrayOfValues = gltfFile.get_node_extra(gltfNode, structMember->name, {}); + tinygltf::Value::Array arrayOfValues = objNode->get_extra(structMember->name, {}); std::vector values; for(tinygltf::Value &val : arrayOfValues) { switch(hintType) { diff --git a/tools/dkr_assets_tool_src/helpers/c/cStructGltfHelper.h b/tools/dkr_assets_tool_src/helpers/c/cStructGltfHelper.h index 30555cc5..a2fee981 100644 --- a/tools/dkr_assets_tool_src/helpers/c/cStructGltfHelper.h +++ b/tools/dkr_assets_tool_src/helpers/c/cStructGltfHelper.h @@ -11,6 +11,5 @@ public: int gltfNode, uint8_t *bytes); // gltf node extra -> struct entry - static void put_gltf_node_extra_into_struct_entry(DkrAssetsSettings &settings, CStructEntry *structMember, GltfFile &gltfFile, - int gltfNode, uint8_t *bytes); + static void put_gltf_node_extra_into_struct_entry(DkrAssetsSettings &settings, CStructEntry *structMember, GltfFileNode *objNode, uint8_t *bytes); }; diff --git a/tools/dkr_assets_tool_src/helpers/gltf/gltfHelper.cpp b/tools/dkr_assets_tool_src/helpers/gltf/gltfHelper.cpp index 9dd9293b..0999f633 100644 --- a/tools/dkr_assets_tool_src/helpers/gltf/gltfHelper.cpp +++ b/tools/dkr_assets_tool_src/helpers/gltf/gltfHelper.cpp @@ -5,6 +5,30 @@ #define TINYGLTF_USE_CPP14 #include "libs/tiny_gltf.h" +GltfFileNode::GltfFileNode(GltfFile *file, tinygltf::Node *node) : _file(file), _node(node) { +} + +GltfFileNode::~GltfFileNode(){ +} + +size_t GltfFileNode::get_child_count() { + return _node->children.size(); +} + +GltfFileNode *GltfFileNode::get_child_node_by_index(int nodeIndex) { + return _file->get_node(_node->children[nodeIndex]); +} + +void GltfFileNode::get_position(double &outX, double &outY, double &outZ) { + outX = _node->translation[0]; + outY = _node->translation[1]; + outZ = _node->translation[2]; +} + +std::string GltfFileNode::get_name() { + return _node->name; +} + GltfFile::GltfFile(const fs::path &filepath) { std::string err; std::string warn; @@ -24,20 +48,44 @@ GltfFile::GltfFile(const fs::path &filepath) { } GltfFile::~GltfFile() { + // Free node cache memory. + for (auto &pair : _nodeCache) { + if(pair.second == nullptr) { + continue; + } + delete pair.second; + } } -int GltfFile::get_node_count() { +size_t GltfFile::get_node_count() { return _model.nodes.size(); } -std::string GltfFile::get_node_name(int node) { - return _model.nodes[node].name; +GltfFileNode *GltfFile::get_node(int nodeIndex) { + DebugHelper::assert_(nodeIndex < (int)_model.nodes.size(), + "(GltfFile::get_node) Node index ", nodeIndex, " is out of range!"); + + tinygltf::Node *tinygltfNode = &_model.nodes[nodeIndex]; + + if(_nodeCache.find(tinygltfNode) == _nodeCache.end()) { + _nodeCache[tinygltfNode] = new GltfFileNode(this, tinygltfNode); + } + + return _nodeCache[tinygltfNode]; } -void GltfFile::get_node_position(int node, double &x, double &y, double &z) { - x = _model.nodes[node].translation[0]; - y = _model.nodes[node].translation[1]; - z = _model.nodes[node].translation[2]; + +bool GltfFile::search_for_node_by_name(const std::string nodeName, int &outIndex) { + size_t numNodes = get_node_count(); + for(size_t i = 0; i < numNodes; i++) { + if(_model.nodes[i].name == nodeName) { + outIndex = i; + return true; + } + } + // No node with the name was found. + outIndex = -1; + return false; } WriteableGltfFile::WriteableGltfFile(std::string rootName) { diff --git a/tools/dkr_assets_tool_src/helpers/gltf/gltfHelper.h b/tools/dkr_assets_tool_src/helpers/gltf/gltfHelper.h index 31da8d21..7b213855 100644 --- a/tools/dkr_assets_tool_src/helpers/gltf/gltfHelper.h +++ b/tools/dkr_assets_tool_src/helpers/gltf/gltfHelper.h @@ -5,39 +5,56 @@ #include #include "libs/tiny_gltf.h" +class GltfFile; + +// Represents a node in the gltf file. +class GltfFileNode { +public: + GltfFileNode(GltfFile *file, tinygltf::Node *node); + ~GltfFileNode(); + + size_t get_child_count(); + GltfFileNode *get_child_node_by_index(int nodeIndex); + + void get_position(double &outX, double &outY, double &outZ); + std::string get_name(); + + template + T get_extra(std::string key, T defaultValue) { + if(!_node->extras.IsObject()) { + // This node does not have any extras, just return the default value. + return defaultValue; + } + + if(!_node->extras.Has(key)) { + // Return default value if the key is not in the map. + return defaultValue; + } + + tinygltf::Value val = _node->extras.Get(key); + + return val.Get(); + } +private: + GltfFile *_file; + tinygltf::Node *_node; +}; + // Read-Only .gltf file class GltfFile { public: GltfFile(const fs::path &filepath); ~GltfFile(); - // Node stuff - int get_node_count(); - std::string get_node_name(int node); - void get_node_position(int node, double &x, double &y, double &z); - - template - T get_node_extra(int node, std::string key, T defaultValue) { - tinygltf::Node &gltfNode = _model.nodes[node]; - - if(!gltfNode.extras.IsObject()) { - // This node does not have any extras, just return the default value. - return defaultValue; - } - - if(!gltfNode.extras.Has(key)) { - // Return default value if the key is not in the map. - return defaultValue; - } - - tinygltf::Value val = gltfNode.extras.Get(key); - - return val.Get(); - } + size_t get_node_count(); + GltfFileNode *get_node(int nodeIndex); + bool search_for_node_by_name(const std::string nodeName, int &outIndex); private: tinygltf::Model _model; tinygltf::TinyGLTF _tinygltf; + std::unordered_map _nodeCache; + }; // Write-Only .gltf file