liquidspark

retribution.h

Apr 7th, 2019
701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 820.33 KB | None | 0 0
  1. // Zeus
  2. // Retribution Library
  3. // Written in C programming syntax
  4. // By Sparky
  5. // The Empire of Galactic Vergence
  6. // galaxyverge.com
  7. //
  8. // Out of anger, out of vengeance,
  9. // the hearts of men are reduced to dust,
  10. // for the Wrath of God is withheld
  11. // and nothing can hide from his gaze,
  12. // God alone is Absolutely Good,
  13. // and not a soul can stand before him.
  14. // God is greater than all.
  15. //
  16. // God holds Existence within himself,
  17. // and his standard is Righteousness, His Son,
  18. // therefore, accept Jesus Christ as
  19. // your Righteousness and your Salvation,
  20. // lest you face Retribution,
  21. // for only by this faith
  22. // will a soul survive the coming Wrath of God,
  23. // when all evil is crushed to dust beneath his feet,
  24. // and God makes everything new.
  25. //
  26. // Some people think weapons will bring them peace.
  27. // Peace is good and weapons are evil.
  28. // Good sows good and evil sows evil.
  29. // "A good tree cannot bear bad fruit and a bad tree cannot bear good fruit.
  30. // Each tree is recognized by its fruit.
  31. // The good man brings good things out of the good stored in his heart and the evil man brings evil things out of the evil stored in his heart;
  32. // Out of the overflow of the heart, the mouth speaks.
  33. // By their fruit, you will recognize them.
  34. // Every tree that does not bear good fruit will be cut down and thrown into the fire."
  35. // The Garden of Life, the Garden of Eden, was symbolic in this way for Existence.
  36. // You cannot bring about peace by using weapons.
  37. // You cannot sow good by sowing evil.
  38. // "Woe to the world because of the things that cause people to sin!
  39. // If your right hand causes you to sin, cut it off, because it will be better for you to enter life with one hand than to have your whole body thrown into Hell where 'their worm does not cease and the fire does not go out'."
  40. // "Everyone will be salted with [given perseverence by] fire [purity to God, as Jesus Christ's eyes are fire -- he is focused on purity to God, Righteousness, because he is Righteousness and gives us himself so that whoever accepts him has him as their Righteousness and Salvation and by that faith in him therefore is no longer condemned; therefore, keep his words in you and he will remain in you]."
  41.  
  42. //////////////////////////////////////////
  43. ///////////     About Halo     ///////////
  44. //////////////////////////////////////////
  45. #pragma mark - About Halo
  46. /*
  47.  
  48. Halo
  49.     Halo, the computer game developed by Bungie Studios, Microsoft's "Microsoft Game Studios" and "343 Industries", Gearbox Software, and MacSoft, has the following common, playable game versions. The information here is intended to pertain to these versions of this Halo computer game.
  50.    
  51.     Halo 1 "Halo: Combat Evolved"
  52.         "Halo" for Xbox (Bungie Studios and Microsoft Game Studios)
  53.         "Halo Demo" for PowerPC Mac (MacSoft), "Halo Trial" for PC (Gearbox)
  54.         "Halo PC" 1.0.9.620 for PC (Gearbox / Roger Wolfson), "Halo PC" 1.0.10.621 for PC (Gearbox / Roger Wolfson), "Halo Full" for PowerPC Mac (MacSoft)
  55.         "Halo Custom Edition" 1.0.9.620 for PC (Gearbox / Roger Wolfson), "Halo Custom Edition" 1.0.10.621 for PC (Gearbox / Roger Wolfson)
  56.         "Halo Universal Binary" for PowerPC and Intel Mac (MacSoft), "Halo Mini Demo" for Intel Mac (nil)
  57.     Halo 2
  58.         "Halo 2" for Xbox (Bungie Studios and Microsoft Game Studios)
  59.         "Halo 2 Vista" for PC (Microsoft Game Studios)
  60.  
  61.     Bungie Studios developed Halo 1 and Halo 2 with help from Microsoft. Microsoft obtained the copyrights to the Halo game through this partnership and turned it into a franchise through Microsoft Game Studios after the large sales of Microsoft's Xbox console which featured Halo. Gearbox Software developed the Halo 1 game into "Halo PC", which runs on Windows. Gearbox developed a free demo of Halo PC called "Halo Trial". Gearbox also developed "Halo Custom Edition" or "Halo CE" for PC, which is intended to be used by gamers who want to play additional content on their computers. MacSoft ported Gearbox's Halo PC to run on PowerPC-based Apple Macintosh computers as "Halo for Mac", or "Halo PPC", or "Halo Full" to contrast with "Halo Demo" or "Halo Demo PPC". MacSoft developed Halo Demo for Mac to coincide with Gearbox's Halo Trial for PC. When Apple changed from building computers using the Motorola PowerPC ("PPC") processor to the Intel processor, MacSoft greatly overhauled the source code to their Halo for Mac application and developed a Universal Binary version which would run on PowerPC and Intel Macs, called "Halo Universal Binary" or "Halo UB". Some fans of Halo Demo who had experimented with developing software based upon their analyses of the files from Halo PC, Halo Custom Edition, Halo Trial, Halo Demo, and Halo PPC, gathered through Monoman's web site forum, Mac Gaming Mods (http://www.macgamingmods.com/forum). Using that communication venue, nil and others there developed a modified version of MacSoft's Halo Universal Binary and presented it to the community as Halo Mini Demo, or HaloMD. The reason for developing HaloMD was to replace the version of Halo Demo PPC which was becoming unusable as a result of Apple's change to Intel processors. When GameSpy ceased their free service of hosting master server lobby connections, both the Mac and PC versions of Halo were affected. MacSoft was unable to renew a license to the Halo source code and copyrights from Microsoft. Gearbox Software was no longer interested in Halo. Roger Wolfson, who formerly worked at Bungie Studios, updated the Halo PC game and dedicated server program executables to version 01.00.10.0621 and, with help from some members of the various Halo web site communities, changed to a different master server lobby host. Halo Demo, which was greatly popular among Mac gamers, was no longer a viable game for multiplayer due to the PowerPC-to-Intel change and the loss of GameSpy services. Later, after Bungie stopped working with Microsoft, Microsoft set up a subsidiary group called "343 Industries" or "343i" to develop more games for their Halo franchise. In October or November of 2015, Microsoft suddenly ceased hosting their master server lobby for Halo 2 Vista. Today, most Halo gamers who use Microsoft Windows PC are left with Halo PC 1.0.10.621 and Halo Custom Edition 1.0.10.621, and most of the Apple OS X users are left with the community-developed rendition Halo Mini Demo.
  62.     Gearbox Software developed "the Halo Editing Kit", abbreviated as "HEK", for use with Halo Custom Edition, so that Halo gamers using a PC can design new multiplayer maps with the Halo Editing Kit and then run them with Halo Custom Edition. The Halo Editing Kit consists of three main programs: Tool, Guerilla, and Sapien. Tool is a console program which means that it is used for distinctly linear tasks and does not provide a user interface to display. Tool is used to generate intermediary files called "tags" and to compile tags into finished "map cache files", or "maps", which is the file format used by the Halo game to store playable game levels and related asset archives. Guerilla is used to modify asset-based tags that were converted by Tool, and can also be used to generate all the other tag files that do not contain assets converted by Tool. Sapien, which was notably developed over several years by Matthew Noguchi, is the HEK program used to view and develop a game level's scenario.
  63.     When you install Halo PC, you will need to use a Microsoft software product license key. The license key that comes with your copy of Halo PC is located on an orange sticker above the disc holder inside the disc case. The product key for Halo 2 Vista is also on an orange sticker above its disc holder inside the disc case. MacSoft's Halo PPC also comes with a CD Key which is located on the rear cover of the manual pamphlet included in the box with the installation disc. The format of the CD keys for Halo PC and Halo 2 Vista is capital letters and numbers of the sequence XXXXX-XXXXX-XXXXX-XXXXX-XXXXX, whereas the format for Halo PPC is capital letters and numbers of the sequence XXXX-XXXX-XXXX-XXXX. Product keys are meant to be privately used by the software to identify a player; each product key should only be used by one person's copy of the Halo software. They abstractly represent a proof of purchase and typically should not be shared. The installation software provides an installation ID, but this is typically ignored; the product key is more significant to the player. While MacSoft supported its Universal Binary version of Halo for Mac, they mentioned details about re-using Halo PPC license keys; Halo UB is a separate purchase from MacSoft that comes with its own license key. Halo Mini Demo, which is essentially a community-modified version of Halo UB, does not require a CD Key or a license key of its players.
  64.     Halo Custom Edition's installer requires that you provide a Halo PC license key. Therefore, both Halo PC and Halo CE are considered licensed software, and Halo CE requires that you have a Halo PC product key. However, it is possible to install the Halo Editing Kit without having installed Halo Custom Edition. But Halo Custom Edition is required to play the map files that you have compiled using the Halo Editing Kit. So in essence, the typically installation process is to first install Halo PC, then Halo Custom Edition, and finally the Halo Editing Kit. However, if you do not own a copy of Halo PC and do not have a valid product key for it, you can only install the Halo Editing Kit, and you will not be able to use Halo Custom Edition to play your new map files.
  65.     Halo PC's default installation directory is "C:\Program Files\Microsoft Games\Halo". Halo Custom Edition's default installation directory is "C:\Program Files\Microsoft Games\Halo Custom Edition". The Halo Editing Kit installs into the Halo Custom Edition program's folder. Note that Halo is a 32-bit program, and so the default installation directory on 64-bit computers running 64-bit versions of Windows would be "C:\Program Files (x86)\Microsoft Games\Halo" and "C:\Program Files (x86)\Microsoft Games\Halo Custom Edition". The 32-bit programs usually install into the "Program Files (x86)" directory instead of the "Program Files" directory when the Windows operating system is 64-bit. The Halo Editing Kit installs two working directories within the Halo CE directory: a folder called "tags" and a folder called "data". When you use the Tool program to convert data like images and sounds into tags like .bitmap and .sound, you place the data files into folders within the "data" folder, run the appropriate Tool command, and Tool generates the tags and places them within coinciding subdirectories within the "tags" folder. The HEK programs Tool, Guerilla and Sapien are designed to only operate with the "working tags directory". To avoid issues with programs that are hard-coded to use the default installation directories for the Halo games, it is recommended that you use the default installation directories when installing Halo, Halo Custom Edition, and the Halo Editing Kit.
  66.     Halo for PC and Mac also install saved game information and certain settings files within the Saved Games and Documents folders within the user's directory. These file paths are hard-coded into the game, so you do not get an option to customize their location. Therefore, if a user file is not in its default location, it will be considered non-existent.
  67.     Halo for Xbox uses compression for its files. The Xbox version of the game also uses a different set of shader and model tag types from the Gearbox ports and the MacSoft ports. So for example, the appearance of teleporter entrances varies noticeably between the Xbox version of Halo and PC / Mac versions of Halo. The port of Halo between Xbox and PC / Mac is not exact. Gearbox Software included "optimizations" and MacSoft did its own overhaul with the Halo Universal Binary version. Halo PC and Halo Custom Edition also differ from each other.
  68.     The format and directory structure for Halo Xbox files is unique, since it uses compression and optimizations were seen as very necessary. The format of Halo PC files, notably the map files which contain level data, is practically the same as the format of files for Halo Full for Mac. Halo Demo and Halo Trial have about the same format of files as each other, different from the commercial versions Halo PC and Halo Full PPC, but the Halo Demo and Halo Trial programs have different quirks that can cause malformed or illogical map files to work on one but cause the other to crash. Halo Custom Edition uses a different format for its files, with its map files more heavily reliant upon common resource map references. The common resource map files for the games are bitmaps.map and sounds.map, where bitmaps.map contains common image data and sounds.map contains common audio data. Resource maps are used so that each scenario level stored in a playable .map file does not need to contain large swaths of duplicate data.
  69.     Playable levels are stored within .map files found within the "maps" folder in each Halo installation directory. (Halo PC uses "MAPS" and other capitalized folder names in the Halo installation directory, but using a case-insensitive computer setup means that "MAPS" is the same as "maps"; following the unix and Internet norm, lowercase is preferable and underscores are often necessary in lieu of spaces in subdirectories and file names. It is recommended to always use lowercase and underscores in lieu of spaces when using the Halo Editing Kit. Also note that unix uses the forward-slash "/" directory separator whereas Windows uses the back-slash "\" directory separator.) The .map files that contain playable information are of one general structure, different from the resource map files bitmaps.map and sounds.map. Halo CE and the HEK have a loc.map file which is used by Tool to help determine which tags are considered common; removing the loc.map file from your Halo CE's "maps" folder will result in Tool copying every tag that a compiled .map file references into the .map file during its compilation. Copying resource tags into a playable .map file is known as "internalizing" the tags. When a map has internalized tags, it potentially contains data in duplicate of the bitmaps.map and sounds.map resource map files -- the bitmaps or sounds from the standalone tags in the HEK tags directory are copied into the map file, even though their data could be already present in the resource maps bitmaps.map or sounds.map. When Tool does not find a loc.map, it will attempt to create a new loc.map, but not give it any data. So to switch back to normal map compilation and internalization functionality, the user would need to place their original loc.map file back into their Halo CE "maps" folder. Normal functionality only "internalizes" novel tag data into a map; only content that is not present within the two standard resource maps. Note that ui.map is also a playable level, but is unique in its use as the main menu for the game. Halo only loads one .map file at a time into memory, although it keeps it in memory once it is loaded. Halo PC and Halo Custom Edition initiate file locks on map files, and Halo Custom Edition only loads all the map files it can find in its "maps" folder all at once when it starts, so that while they are running, the .map file is not really modifiable. Halo Mac and Halo Demo do not lock modifications to the map files, and changes made to the file will be visible after a map file is reloaded, such as when choosing "new game" within the game menu while the map level is being played. Making map files work with Halo Demo or Halo Trial requires changing the format of the map file from its Xbox, commercial, or Custom Edition formats, and renaming the file as "bloodgulch.map" to replace the presence of the former "bloodgulch.map" file located in the game's "maps" folder. Halo Demo and Halo Trial look for the single "bloodgulch.map" as the multi-player level and the single "b30.map" as the single-player level. The commercial versions Halo PC and Halo PPC contain more information in their resource maps than the Halo Demo and Halo Trial versions. Resource maps are not normally interchangeable in equivalency between ports, just like the other .map files and user files are not interchangeable in equivalency between ports. The exception to this is that certain Halo PC and Halo Mac files, notably their .map files, are practically or exactly equivalent. This is also the case between Halo Demo and Halo Trial.
  70.     Playable maps contain game level information stored within tags. Essentially, playable map files consist of Halo Editing Kit tags that have been processed by Tool. When Tool processes tag files from the HEK "tags" directory, compiling them into a map cache file using the "build-cache-file" command, Tool adds additional information to the tags and removes the irrelevant file headers from them. Tool seeks out each tag in the tags directory that is referenced in chain starting with the two primary base tags, which are the globals tag located at "globals\globals.globals", and the scenario tag at hand, which is of a custom location within the tags directory which was specified as a parameter using the "build-cache-file" command. Tool organizes the tag data, sets up a tag index, and applies calculated file data internal offsets for each tag in lieu of the directory paths of the referenced tags which are stored as strings within the HEK format of the tags. Since the map file gets loaded directly into Halo's memory, Tool applies calculated offsets. Note that HEK tag files store data in Big Endian, and byte swapping occurs when Tool handles the map data, so that the Big Endian tag data is converted into Little Endian for Halo to read directly into its Little Endian memory space. This is why, for example, a scenario tag's referenced Binary Space Partition's tag class as "sbsp" for .scenario_structure_bsp HEK tags appears reversed as "psbs" in compiled .map files: the four bytes are reversed in order, from s-b-s-p to p-s-b-s, since the HEK tag file data is in Big Endian byte order and the map cache file's converted tag file data is in Little Endian byte order.
  71.     Halo 1 has 83 tag types, or tag classes, that are recognized by the Halo Editing Kit programs. Tags come in different types. For example, vehicle tag types store information about vehicles in the game. Each tag of a certain type provides information for the game to use. When you add a tag to a playable map file, you add information of a specific type to that map, for example, a new kind of vehicle to exist in the game level. The Halo Editing Kit takes all the various tags that are somehow referenced through the main tags, as already mentioned, and compiles them into a playable .map file, and then you can play the level in Halo Custom Edition. Only 78 of the 83 tag classes are directly used with the HEK; the 5 others are somewhat abstract primary or secondary super-classes. Furthermore, not all 78 tag classes are implemented by the Halo game.
  72.     Here is a list of all the Halo 1 tag classes, presented as the four-letter tag class ID, the HEK tag file extension, a name I gave it describing the role of the tag type, and my description for it:
  73.    
  74.     actr / .actor / Actor : The "actor" tag type stores information about basic character behavior for artificial intelligence. It is partnered with "actor variant" (actv) which specifies behavior variations in greater detail.
  75.     actv / .actor_variant / Actor Variant : This is the primary tag type that specifies behavior variations for artificial intelligence.
  76.     ant! / .antenna / Antenna : Bitmap image sequences applied with customized physics to imitate the behavior of an antenna.
  77.     antr / .model_animations / Animations : Animation data organized according to associated tags and their specific animation types.
  78.     bipd / .biped / Biped : This is the obje affiliation for actv tags.
  79.     bitm / .bitmap / Bitmap : One or more compressed images organized by usage.
  80.     boom / .spheroid / Spheroid : An apparently unused tag class. It may have been a simple class used for hitbox detection, for memory use only.
  81.     cdmg / .continuous_damage_effect / Continuous Damage Effect : Referenced by lsnd but apparently unused, this would probably be used with ssce.
  82.     coll / .model_collision_geometry / Collision Model : The collision model can be referenced by subclasses of obje and is stored separately from the visible mod2 or mode tags. It stores health values and associates material damage ratios.
  83.     colo / .color_table / Color Table : Not often modified.
  84.     cont / .contrail / Contrail : A contrail is a referenced bitmap rendered at periodic time intervals at a specified marker used by a tag class such as proj.
  85.     ctrl / .device_control / Control Panel : This is an obje subclass that has details about player-interactive switches for toggling the states of mach tags.
  86.     deca / .decal / Decal : A decal is a decorative bitm tag reference snapped to sbsp tag geometry. It is stored by a levels scnr tag, and therefore more closely binds the scnr tag with its sbsp tags.
  87.     DeLa / .ui_widget_definition / UI Widget Definition : A partner tag class with Soul, both of which are the primary user interface tag classes.
  88.     devc / .input_device_defaults / Input Device Defaults : Not often modified; it stores settings for game pad controllers.
  89.     devi / .device / Device : The tier 2 class for obje subclasses related to machines. Memory use only.
  90.     dobc / .detail_object_collection / Detail Object Collection : Similar to deca, but rendered perpendicularly to the sbsp geometry and uses bitmap sprites for camera-facing rendering.
  91.     effe / .effect / Effect : This is the primary class for particle effects and their associated sounds. It can be used in unorthodox ways, given its support for spawning a variety of tag classes. It supports periodicity and vectors. In complex references, can overwhelm the game's memory table management, resulting in memory leaks and rendering snafus.
  92.     elec / .lightning / Lightning : Similar in behavior to ant!.
  93.     eqip / .equipment / Equipment : This is the obje subclass for an obtainable dumb item in the game and is used so that the player can gather ammunition apart from a full-fledged weap tag. It is also used for power-ups.
  94.     flag / .flag / Flag Cloth : This lets you customize the flag cloth for Capture The Flag game types.
  95.     fog / .fog / Fog : This is associated with a "fog plane" in the sbsp geometry, rather than the generic "fog ambience" used by sky.
  96.     font / .font / Font : Not often modified. This stores information about textual character glyphs used when the game shows text.
  97.     foot / .material_effects / Material Collision Effects : Effe and snd! associations with collision events between obje-related tags (and their coll's) and sbsp collision surfaces. Examples are footstep sounds and footprints, and tire tracks and skid sounds.
  98.     garb / .garbage / Garbage : This is a simple obje subclass like scen, and it is removed from the game's rendering table after a short time.
  99.     glw! / .glow / Particle Glow Effect : Glowing particle effects associated with markers, primarily used to achieve the energy sword weapon's glowing appearance.
  100.     grhi / .grenade_hud_interface / Grenade HUD Interface : The customization for the player's visible grenade heads-up display.
  101.     hmt / .hud_message_text / HUD Messages : Text shown on the player's visible heads-up display. Characters are stored differently than with ustr.
  102.     hudg / .hud_globals / General HUD Settings : This is the primary class for modifying the player's visible heads-up display.
  103.     hud# / .hud_number / HUD Numbers Settings : Number glyphs shown on the player's visible heads-up display, for example, the number glyphs showing the distance to the next waypoint marker on the player's HUD.
  104.     item / .item / Item : The tier 2 class for obje subclasses related to equipment. Memory use only.
  105.     itmc / .item_collection / Respawning Objects Collection : Multiplayer games use this to respawn obje subclasses like weap and eqip.
  106.     jpt! / .damage_effect / Damage Effect : Damage values applied to coll tags within a specified area of effect. Negative values can "heal"; extreme values cause unusual results.
  107.     lens / .lens_flare / Lens Flare : A screen effect often used with ligh, such as the light source in a sky.
  108.     lifi / .device_light_fixture / Light Fixture : This is the obje and devi subclass representing decorative light fixtures that can be toggled on and off and often associate ligh tags that affect the radiosity lighting of the sbsp.
  109.     ligh / .light / Light : A visible light source.
  110.     lsnd / .sound_looping / Looping Sound : Snd! references that can be customized to repeat ad nauseum, such as could be used to simulate ambient noises and music.
  111.     mach / .device_machine / Machine : Stationary objects that can be animated along a path and toggled on and off using a ctrl, such as for elevators and doors.
  112.     matg / .globals / General Game Settings : The main tag class that specifies generic game settings for a map cache file. It is stored separately from scnr because matg has settings normalized for consistency in gameplay mechanics, such as player movement speed.
  113.     metr / .meter / Meter : A special class used to simulate a meter on the heads-up display, such as with the player's shield level visualization.
  114.     mgs2 / .light_volume / Volumetric Light : Applies lit blobs to mod2 or mode markers, such as for the plasma weapon projectiles.
  115.     mod2 / .gbxmodel / Gearbox PC Model : The main visual render model class used with the PC version of the game. Uses uncompressed vertices.
  116.     mode / .model / Xbox Model : The main visual render model class used with the Xbox version of the game. Uses compressed vertices relativized between -1 and 1.
  117.     mply / .multiplayer_scenario_description / Multiplayer Scenario Descriptions : Used to make introductory level information, including a preview bitm and description.
  118.     ngpr / .preferences_network_game / Multiplayer Character Settings : Can store default user profile information, such as player colors. Not often modified, since it would probably only be customized with a new user interface map cache file.
  119.     obje / .object / Object : The tier 1 class that contains over 10 subclasses related to objects managed by the game's memory tables. For memory use only.
  120.     part / .particle / Particle : Used to simulate special particle effects.
  121.     pctl / .particle_system / Particle System : Used with part and pphy.
  122.     phys / .physics / Object Physics : The game supports phys associated with vehi; this is what can be used to customize vehicle physics.
  123.     plac / .placeholder / Object Placeholder : Unused. An obje subclass probably for development purposes.
  124.     pphy / .point_physics / Particle Point Physics : Specifies physics simulation information for part and pctl.
  125.     proj / .projectile / Projectile : An obje subclass used to represent a projectile fired from a weap.
  126.     rain / .weather_particle_system / Weather : A viewer-facing camera overlay rendered particle effect that can be used to simulate raindrops in rainy weather or bubbles and dirt underwater.
  127.     sbsp / .scenario_structure_bsp / Scenario Environment Structure : The terrain for a level, including its visible and physical geometry, portal and lightmap groupings, and fog and lsnd references. Groupings such as the sky use indices from the scnr.
  128.     scen / .scenery / Scenery : The simplest obje subclass that can be used to represent stationary objects such as rocks and trees. If animated, the current animation frame will not synchronize in a multiplayer game.
  129.     scex / .shader_transparent_chicago_extended / Extended Transparent Shader : A PC version of a complex transparent shader.
  130.     schi / .shader_transparent_chicago / Transparent Shader : A PC version of a simple transparent shader.
  131.     scnr / .scenario / Scenario Environment Configuration : This is the primary tag class for a playable level, and it associates all the other tag classes that would most often be customized in a multiplayer map cache file.
  132.     senv / .shader_environment / Environment Shader : This shader class is used with sbsp.
  133.     sgla / .shader_transparent_glass / Transparent Glass Shader : This shader class is used to render highly-transparent faces, such as with glass.
  134.     shdr / .shader / Generic Shader : This is the superclass for shader classes. For memory use only.
  135.     sky / .sky / Sky : Stores information about the light source(s) and simple fog along with the reference to the visible model and optional animations used with a rendered sky.
  136.     smet / .shader_transparent_meter / Transparent Meter Shader : Special shader used with non-HUD meters, such as those on the warthog's driver panel and the plasma weapons' heat and charge meters on their first-person models.
  137.     snd! / .sound / Sound : Customize a compressed audio file's playback.
  138.     snde / .sound_environment / Ambient Effect : A special audio effect for DirectSound audio playback which uses echo effects to simulate physical space ambience.
  139.     soso / .shader_model / Model Shader : Used for simple model appearances, such as with scen.
  140.     sotr / .shader_transparent_generic / Generic Transparent Shader : A special Xbox shader class which is more advanced than its scex PC counterpart.
  141.     Soul / .ui_widget_collection / UI Widget Collection : Used with DeLa to customize the elements of a player-interactive user interface.
  142.     spla / .shader_transparent_plasma / Transparent Plasma Shader : A special model shader used for plasma-like rendering effects.
  143.     ssce / .sound_scenery / Sound-Emitting Scenery : The same thing as scen, but just separated for purposes of keeping things organized; you would normally reference an lsnd as an attachment, although you could do the same with a scen tag.
  144.     str# / .string_list / String References : Not usually modified. Some base tags use this as a kind of tagc of strings.
  145.     swat / .shader_transparent_water / Transparent Water Shader : A special shader associated with the "water" material which is used to transparently render waves and ripples as if it were used for the surface of a volume of water.
  146.     tagc / .tag_collection / Tag Collection : A base tag class not usually modified. This usually is and/or contains tags that often have their tag path name strings hardcoded in the game.
  147.     trak / .camera_track / Camera Track : Indicates how the 3D camera view should behave, such as its constraints and relative velocity when revolving around a point.
  148.     udlg / .dialogue / Unit Dialogue : A list of snd! references used at actv voice trigger moments.
  149.     unhi / .unit_hud_interface / Unit HUD Interface : A complex primary tag for customizing the basic heads-up display in the game. Supports overriding through wphi.
  150.     unit / .unit / Unit : A tier 2 obje subclass used to group unit classes, such as bipd and vehi. For memory use only, despite the odd possible reference to it in Guerilla, such as in the actv tag class -- but unit is unsupported.
  151.     ustr / .unicode_string_list / Unicode String References : Groupings of textual strings encoded differently from hmt . Used frequently.
  152.     vcky / .virtual_keyboard / Virtual Keyboard : Not often modified. Associates a font with a keyboard character.
  153.     vehi / .vehicle / Vehicle : An obje subclass that is used to represent a player-controllable vehicle. Uniquely synchronized in multiplayer games.
  154.     weap / .weapon / Weapon : An obje subclass that is used to represent weapons that can be picked-up off a collision plane and wielded. Represent themselves as ammunition when the player is already wielding that weapon.
  155.     wind / .wind / Wind : Some basic values that are used to simulate wind as it would interact with flag and cont.
  156.     wphi / .weapon_hud_interface / Weapon HUD Interface : An override of unhi that is assigned while wielding a weap.
  157.    
  158.     The .device, .item, .object, .shader and .unit tags are the five abstract tag super-classes that are primary or secondary of these 83 mentioned tag classes; the actual usable tag classes are only 78 and are tertiary tag classes. Primary, secondary, and tertiary refer to the tag hierarchy within a map cache file. Primary and secondary tag super-classes describe the general categories of certain tertiary tag classes. Primary means the most general categorization and secondary is a more specific categorization, both describing the tertiary specific tag class. For example, both vehicles of the vehi tag class and bipeds of the bipd tag class are of the primary obje object tag class and the secondary unit tag class. So this essentially means that the game engine interprets these two specific tertiary tag classes as objects, and more specifically, units, and they both include object and unit sections of information within their details. As another example, weapons are objects, but instead of being units, they are items. So the primary abstract tag class for a weap tag is obje and the secondary abstract tag class is item. When a tag only contains one abstract class, it is listed as the secondary class, since there is no more-generic primary tag class applicable; so for example, a soso shader model is a tertiary class with a single abstract class of shdr shader, and there is no other abstract class for soso, and so shdr is the secondary abstract super-class for soso shader model tag types. Obje is not always a primary tag class: for example, with scen scenery, it is the only abstract class, and so is listed as a secondary tag super-class for scenery tag types. It helps to visualize it in this way: 3 columns, numbered from left to right as 3 (tertiary), 2 (secondary) and 1 (primary), the first containing the actual tag class in question and the other two columns containing optional secondary and primary tag super-classes by which the tag class in question can be categorized. For example:
  159.    
  160.     tertiary main class / secondary abstract class / primary abstract class
  161.     bitm / - / -
  162.     matg / - / -
  163.     soso / shdr / - (soso Shader Model is a kind of shdr Generic Shader)
  164.     scen / obje / - (scen Scenery, such as rocks and trees, is a kind of obje Object)
  165.     bipd / unit / obje (bipd Biped, such as the player character, is a kind of unit Unit, and also more generically a kind of obje Object)
  166.    
  167.     Here is an actual 832-byte segment from the tag index within the a10.map playable map file:
  168.    
  169.     mtibˇˇˇˇˇˇˇˇ∫.‚óÓE@‡:X@
  170.     ososrdhsˇˇˇˇª/‚«ÓE@º;X@
  171.     mtibˇˇˇˇˇˇˇˇº0‚ÒÓE@t=X@
  172.     ososrdhsˇˇˇˇΩ1‚ÔE@P>X@
  173.     ososrdhsˇˇˇˇæ2‚NÔE@@X@
  174.     ososrdhsˇˇˇˇø3‚vÔE@¿AX@
  175.     ihcsrdhsˇˇˇˇ¿4‚£ÔE@xCX@
  176.     mtibˇˇˇˇˇˇˇˇ¡5‚ÕÔE@úEX@
  177.     rtnaˇˇˇˇˇˇˇˇ¬6‚˜ÔE@xFX@
  178.     hgilˇˇˇˇˇˇˇˇ√7‚E@`LX@
  179.     snelˇˇˇˇˇˇˇˇƒ8‚;E@¿MX@
  180.     mtibˇˇˇˇˇˇˇˇ≈9‚hE@0OX@
  181.     necsejboˇˇˇˇ∆:‚ùE@\QX@
  182.     2domˇˇˇˇˇˇˇˇ«;‚ E@¿SX@
  183.     ososrdhsˇˇˇˇ»<‚˝E@¿WX@
  184.     mtibˇˇˇˇˇˇˇˇ…=‚3ÒE@xYX@
  185.     mtibˇˇˇˇˇˇˇˇ >‚ÉÒE@ÑZX@
  186.     mtibˇˇˇˇˇˇˇˇÀ?‚ŸÒE@ê[X@
  187.     ihcsrdhsˇˇˇˇÃ@‚ÚE@l\X@
  188.     mtibˇˇˇˇˇˇˇˇÕA‚7ÚE@¥]X@
  189.     hgilˇˇˇˇˇˇˇˇŒB‚XÚE@ê^X@
  190.     snelˇˇˇˇˇˇˇˇœC‚ÚE@_X@
  191.     dpibtinuejbo–D‚®ÚE@`aX@
  192.     2domˇˇˇˇˇˇˇˇ—E‚√ÚE@LjX@
  193.     ososrdhsˇˇˇˇ“F‚fiÚE@<äX@
  194.     mtibˇˇˇˇˇˇˇˇ”G‚ÛE@ÙãX@
  195.  
  196.     You can see how the four-letter tag classes of each indexed tag, presented here as one entry per line, shows the tag classes reversed, having been byte-swapped from the HEK tag files in Big Endian to the Little Endian map cache file format suitable for reading into game memory. The first four bytes are the tertiary column, the second are the secondary column and the third are the primary column. The first entry, "mtib" is a bitm Bitmap tag entry which contains no super-classes. The second entry is "ososrdhs", which is soso Shader Model of the super-class shdr Generic Shader and no other abstract class, so there is nothing listed for the primary abstract tag class. Moving down, you can see that "necsejbo" means that scen Scenery tag classes have a single abstract class, therefore given as the secondary super-class, which is obje Object. Towards the end of the example, you see "dpibtinuejbo" or obje - unit - bipd, where the primary abstract class is obje Object, the secondary, more specific abstract class is unit Unit, and the actual tag class, the tertiary class, is bipd Biped.
  197.    
  198.     13 tag classes have obje (object) abstract super-classes. They are listed here according to their internal indices:
  199.    
  200.     -1 / obje / .object / Object
  201.     0 / bipd / .biped / Biped
  202.     1 / vehi / .vehicle / Vehicle
  203.     2 / weap / .weapon / Weapon
  204.     3 / eqip / .equipment / Equipment
  205.     4 / garb / .garbage / Garbage
  206.     5 / proj / .projectile / Projectile
  207.     6 / scen / .scenery / Scenery
  208.     7 / mach / .device_machine / Machine
  209.     8 / ctrl / .device_control / Control Panel
  210.     9 / lifi / .device_light_fixture / Light Fixture
  211.     10 / plac / .placeholder / Object Placeholder
  212.     11 / ssce / .sound_scenery / Sound-Emitting Scenery
  213.    
  214.     10 tag classes have shdr (shader) abstract super-classes. They are listed here according to their internal indices:
  215.    
  216.     -1 / shdr / .shader / Generic Shader
  217.     3 / senv / .shader_environment / Environment Shader
  218.     4 / soso / .shader_model / Model Shader
  219.     5 / sotr / .shader_transparent_generic / Generic Transparent Shader
  220.     6 / schi / .shader_transparent_chicago / Transparent Shader
  221.     7 / scex / .shader_transparent_chicago_extended / Extended Transparent Shader
  222.     8 / swat / .shader_transparent_water / Transparent Water Shader
  223.     9 / sgla / .shader_transparent_glass / Transparent Glass Shader
  224.     10 / smet / .shader_transparent_meter / Transparent Meter Shader
  225.     11 / spla / .shader_transparent_plasma / Transparent Plasma Shader
  226.    
  227.     There are 4 types of devi (device) tags, but they are not apparently indexed. They are listed here:
  228.    
  229.     devi / .device / Device
  230.     ctrl / .device_control / Control Panel
  231.     lifi / .device_light_fixture / Light Fixture
  232.     mach / .device_machine / Machine
  233.    
  234.     There are 4 types of item (item) tags, but they are not apparently indexed. They are listed here:
  235.    
  236.     item / .item / Item
  237.     eqip / .equipment / Equipment
  238.     garb / .garbage / Garbage
  239.     weap / .weapon / Weapon
  240.    
  241.     There are 3 types of unit (unit) tags, but they are not apparently indexed. They are listed here:
  242.    
  243.     unit / .unit / Unit
  244.     bipd / .biped / Biped
  245.     vehi / .vehicle / Vehicle
  246.  
  247. */
  248.  
  249. //////////////////////////////////////////
  250. ///////////    Comments    ///////////////
  251. //////////////////////////////////////////
  252. #pragma mark - Comments
  253. /*
  254.  (1)
  255.  Halo 1 uses the following tag types, a.k.a. tag classes,
  256.  (2)
  257.  and each tag type has an expected version number in its header.
  258.  
  259.  2   actr / .actor / Actor
  260.  1   actv / .actor_variant / Actor Variant
  261.  1   ant! / .antenna / Antenna
  262.  4   antr / .model_animations / Animations
  263.  3   bipd / .biped / Biped
  264.  7   bitm / .bitmap / Bitmap
  265.  1   boom / .spheroid / Spheroid
  266.  1   cdmg / .continuous_damage_effect / Continuous Damage Effect
  267.  10   coll / .model_collision_geometry / Collision Model
  268.  1   colo / .color_table / Color Table
  269.  3   cont / .contrail / Contrail
  270.  1   ctrl / .device_control / Control Panel
  271.  1   deca / .decal / Decal
  272.  1   DeLa / .ui_widget_definition / UI Widget Definition
  273.  1   devc / .input_device_defaults / Input Device Defaults
  274.  1   devi / .device / Device
  275.  1   dobc / .detail_object_collection / Detail Object Collection
  276.  4   effe / .effect / Effect
  277.  1   elec / .lightning / Lightning
  278.  2   eqip / .equipment / Equipment
  279.  1   flag / .flag / Flag Cloth
  280.  1   fog  / .fog / Fog
  281.  1   font / .font / Font
  282.  1   foot / .material_effects / Material Collision Effects
  283.  1   garb / .garbage / Garbage
  284.  1   glw! / .glow /Particle Glow Effect
  285.  1   grhi / .grenade_hud_interface / Grenade HUD Interface
  286.  1   hmt  / .hud_message_text / HUD Messages
  287.  1   hudg / .hud_globals / General HUD Settings
  288.  1   hud# / .hud_number / HUD Numbers Settings
  289.  2   item / .item / Item
  290.  0   itmc / .item_collection / Respawning Objects Collection
  291.  6   jpt! / .damage_effect / Damage Effect
  292.  2   lens / .lens_flare / Lens Flare
  293.  1   lifi / .device_light_fixture / Light Fixture
  294.  3   ligh / .light / Light
  295.  3   lsnd / .sound_looping / Looping Sound
  296.  1   mach / .device_machine / Machine
  297.  3   matg / .globals / General Game Settings
  298.  1   metr / .meter / Meter
  299.  1   mgs2 / .light_volume / Volumetric Light
  300.  5   mod2 / .gbxmodel / Gearbox PC Model
  301.  4   mode / .model / Xbox Model
  302.  1   mply / .multiplayer_scenario_description / Multiplayer Descriptions
  303.  2   ngpr / .preferences_network_game / Multiplayer Character Settings
  304.  1   obje / .object / Object
  305.  2   part / .particle / Particle
  306.  4   pctl / .particle_system / Particle System
  307.  4   phys / .physics / Object Physics
  308.  2   plac / .placeholder / Object Placeholder
  309.  1   pphy / .point_physics / Particle Point Physics
  310.  5   proj / .projectile / Projectile
  311.  1   rain / .weather_particle_system / Weather
  312.  5   sbsp / .scenario_structure_bsp / Scenario Environment Structure
  313.  1   scen / .scenery / Scenery
  314.  1   scex / .shader_transparent_chicago_extended / Extended Transparent Shader
  315.  1   schi / .shader_transparent_chicago / Transparent Shader
  316.  2   scnr / .scenario / Scenario Environment Configuration
  317.  2   senv / .shader_environment / Environment Shader
  318.  1   sgla / .shader_transparent_glass / Transparent Glass Shader
  319.  1   shdr / .shader / Generic Shader
  320.  1   sky  / .sky / Sky
  321.  1   smet / .shader_transparent_meter / Transparent Meter Shader
  322.  4   snd! / .sound / Sound
  323.  1   snde / .sound_environment / Ambient Effect
  324.  2   soso / .shader_model / Model Shader
  325.  1   sotr / .shader_transparent_generic / Generic Transparent Shader
  326.  1   Soul / .ui_widget_collection / UI Widget Collection
  327.  1   spla / .shader_transparent_plasma / Transparent Plasma Shader
  328.  1   ssce / .sound_scenery / Sound-Emitting Scenery
  329.  1   str# / .string_list / String References
  330.  2   swat / .shader_transparent_water / Transparent Water Shader
  331.  1   tagc / .tag_collection / Tag Collection
  332.  2   trak / .camera_track / Camera Track
  333.  1   udlg / .dialogue / Unit Dialogue
  334.  1   unhi / .unit_hud_interface / Unit HUD Interface
  335.  2   unit / .unit / Unit
  336.  1   ustr / .unicode_string_list / Unicode String References
  337.  2   vcky / .virtual_keyboard / Virtual Keyboard
  338.  1   vehi / .vehicle / Vehicle
  339.  2   weap / .weapon / Weapon
  340.  1   wind / .wind / Wind
  341.  2   wphi / .weapon_hud_interface / Weapon HUD Interface
  342.  
  343.  (3)
  344.  Nominclature of variables in tag format structs includes:
  345.  
  346.  _bf                     Bit Field, used for 0 and 1 bitmask values represented as off and on checkbox options stored in 8-bit, 16-bit and 32-bit unsigned integers
  347.  _list                Enumerated values represented as (popup list) menu options stored in 16-bit and 32-bit unsigned integers
  348.  _rad                 Angle value represented in radians and stored within a 32-bit floating-point number
  349.  _calc                  The value is recalculated regardless of what value was previous stored in its place.
  350.  _sel                   Chunk selector represented as a popup menu in Guerilla, refers to the index number of a cell of a specific representation
  351.  unknown_1, unknown_2, etc.   Values whose purposes appear undocumented and have not yet been fully realized by myself
  352.  d1_, d2_, etc.         Prefixes for dependencies which are references to other tags using full "tag path name strings" (tpns) in character pointer format (char *)
  353.  _frac                A float value that is restricted by the Halo Editing Kit program Guerilla to be limited to a value between and including 0.0 and 1.0
  354.  r1c_, r2c_, and similar      Reflexives, in other words, array-type representations of grouped information, using a scheme of "board" as index and "cells" as groupings
  355.  
  356.  Nominclature in other structs includes:
  357.  
  358.  o_                  A value that is used as an offset relative to 0x0 in the file or memory in which it is found
  359.  omem_                Same, but specifically referring to the counterpart data stored in memory
  360.  ofile_               Same, but specifically referring to the counterpart data stored as a file
  361.  a_, amem_, afile_       Address of data in this file, address of counterpart memory, address of counterpart file (basically, it's a pointer) -- however, in practice, if a value is an extended chain of pointers and their usefulness is unknown, it is generalized as a uint_32 at some point
  362.  s_                  A value that is used to represent the size (number of bytes) of some data
  363.  ct_                     Tag in compiled tag format as stored in a .map file
  364.  ctms_                Compiled Tag Meta Set, meaning an array of tags in compiled format of a single class; this is represented in struct form as a pointer to an array of tags of a single class
  365.  _ISOCELL_                An isolated cell that is located in a remote part of the memory but is referenced through pointers by some kind of table
  366.  
  367.  If I get a value from the Phasor document, I will typically use a novel variable name and comment its Phasor variable name next to it.
  368.  
  369.  I include static address offsets when appropriate.
  370.  
  371.  The related format for comments is: // address, Phasor_variable_name (related line of Phasor document)
  372.  
  373.  (4)
  374.  The default Guerilla exits, probably intentionally, when attempting to use the "File -> New..." menu item to make a new tag document of the following tag types:
  375.  
  376.  device
  377.  item
  378.  object
  379.  shader
  380.  unit
  381.  
  382.  The reason for this is because these are tier 1 and tier 2 tag classes, and usable tags are only of tier 3, which are the other 78 tag classes.
  383.  
  384.  Kornman's hacked version of Guerilla was used to reverse-engineer these 5 non-tertiary-tier tag classes. The default Guerilla program has no qualms opening these five tag types generated using Kornman's hacked version of Guerilla.
  385.  
  386.  (5)
  387.  Transcript of discovery on Thursday, November 19, 2015 regarding storing data between memory addresses 0x40440000 and 0x41B40000:
  388.  
  389.  03:04:28 <Sparky> I just discovered something cool
  390.  
  391.  03:07:16 <Sparky> the game loads the sbsp data for the current map at address 0x41B40000, loading the data in reverse order (so the first byte is at 0x41B3FFFF); each map file has a 32-bit memory address stored in it that shows where the start of the sbsp data will be in memory (I think maybe Modzy discovered this years ago on MGM, I vaguely remember something about him asking about some address here) and that offset is at 0x800 in the map file.
  392.  
  393.  03:24:48 <Sparky> do you realize what this means?
  394.  
  395.  03:25:04 <Sparky> it means I discovered why Halo has mod map size limitations
  396.  
  397.  03:25:09 <Sparky> :D
  398.  
  399.  03:25:17 <Sparky> which is one step closer to overcoming the issue
  400.  
  401.  03:27:09 <Sparky> basically, the game loads tag data starting at offset 0x40440000, and so when you have more tags referenced by the base scnr or matg tags, you have more tags loaded there. Add the tag index and tag data that is being referenced to the memory address 0x40440000, and that's the limit on the front end of allocated memory.
  402.  
  403.  03:27:55 <Sparky> now take the sbsp data size and approach that resulting address from the opposite side, and see what the difference is
  404.  
  405.  03:29:29 <Sparky> so basically you have a memory block allocated between 0x40440000 and 0x41B40000, and you have to cram the tag index and referenced tag data in the start of it, and the sbsp data at the end of it, and see how much space is left in between the two, in the middle
  406.  
  407.  03:32:45 <Sparky> for example, a10.map, the first level of the halo campaign, has something like 5 MB of padding between the tag data and the sbsp data
  408.  
  409.  03:33:01 <Sparky> something like 0x4F3E28 (5193256) bytes
  410.  
  411.  03:34:54 <Sparky> so you would see that by loading up a10.map and viewing the Halo memory at address 0x41300800, the start of the sbsp data copied to memory, and then look at address 0x40E0C9D8, about the end of the tag data loaded into memory, and there's 5193256 bytes in between
  412.  
  413.  03:36:01 <Sparky> that means that when Halo calculated the value for file offset 0x800, it added approximately 5 MB of padding between the calculated referenced tags size and the sbsp data size
  414.  
  415.  03:36:09 <Sparky> so essentially, it did...
  416.  
  417.  03:37:37 <Sparky> 0x40440000 + size of data of referenced tags in scnr / matg + ca. 5193256 bytes = sbsp data address to write in at offset 0x800 in the map file
  418.  
  419.  03:45:19 <nil_> I *think* modzy and 002 know about that
  420.  
  421.  03:46:24 <nil_> and if I recall scenario editors wrongly used the data in that gap
  422.  
  423.  03:46:50 <Sparky> the gap is only present in game memory
  424.  
  425.  03:46:57 <Sparky> those are memory addresses
  426.  
  427.  03:47:13 <Sparky> do you understand what I'm saying?
  428.  
  429.  03:48:14 <Sparky> the tag index from the map file includes all the actually-referenced tags in the map file (which is why there's not really a map file size limit so much as a referenced tags size limit) and that starts at 0x40440000
  430.  
  431.  03:48:50 <Sparky> so add the size of the index and referenced tags to that, and that's the start of the padding section
  432.  
  433.  03:49:24 <Sparky> now start at offset 0x41B40000 and work backwards
  434.  
  435.  03:49:40 <Sparky> all the way to the start of the padding section
  436.  
  437.  03:49:50 <Sparky> that's all the available space for the sbsp data
  438.  
  439.  03:50:06 <Sparky> so the game juggles the tag data sizes and the sbsp data size differently
  440.  
  441.  03:50:56 <Sparky> whatever is left in between the two sections is just residual sbsp data that was previously loaded
  442.  
  443.  03:51:10 <Sparky> or null characters if it wasn't all used
  444.  
  445.  03:52:11 <Sparky> that means the actual limitation would probably be sbsp data size + referenced tag data size must be <= (0x41B40000 - 0x40440000)
  446.  
  447.  03:52:57 <Sparky> that's 24117248 bytes
  448.  
  449.  03:53:18 <Sparky> 24,117,248 bytes (0x1700000)
  450.  
  451.  03:54:41 <Sparky> so the game only has 0x1700000 bytes of space (about 24 MB) to load all the referenced tags' data, its tag index, and the sbsp data
  452.  
  453.  Also, Tool reports 24 MB as being the total available "tag space" during build-cache-file.
  454.  
  455.  
  456.  (6)
  457.  For padding values, I had comments and I will be instead using something like "pad_<offset>_<bytesize>".
  458.  
  459.  It was discussed here -- http://stackoverflow.com/questions/37771041/how-to-use-flexible-array-members-in-nested-c-structs -- and determined that for tpns and other variable-length strings and variable-length data, I should use char ** in the struct to point to an array of null-terminated C-strings, etc., where NULL would be the last entry of the pointer array.
  460.  
  461.  It was also deteremined that, since structs are for static data sizes, and due to variable-length strings and other variable-length data, these structs are not ideal, I should do another rendition of these tag file format structs, etc., into objects and classes, using properties for example (something like what 002 did).
  462.  
  463.  My hopes for reading data as structs seem to be in fruitless.
  464.  
  465.  (7)
  466.  Special thanks to 002 for mentioning that the 32-bit "random number" values are typically CRC-32 checksums of the relevant subsequent data, with all the bits (not bytes, but bits) flipped. For example, the tag header contains a CRC-32 of the tag data following the header. It's big endian.
  467.  
  468.  (8)
  469.  There are about 5380 metadata values in the tag class definitions, including padding and headers (about 5300 without headers), before padding (potentially some extra processed data) analysis.
  470.  
  471.  (9)
  472.  Stock tags have different signature ID's (for representation boards and reference boards) than the current Guerilla version.
  473.  
  474.  */
  475.  
  476. /////////////////////////////////////////////////////////
  477. //////////////      Table of Contents      //////////////
  478. //////////////  (instead of pragma marks)  //////////////
  479. /////////////////////////////////////////////////////////
  480. #pragma mark - Table of Contents
  481. /*
  482.  
  483.  I    HEK tag file format structs           943
  484.  II   Function declarations                 20785
  485.  III      Utility functions                 20819
  486.  
  487.  
  488.  
  489.  
  490.  */
  491.  
  492. ///////////////////////////////////////////////////
  493. ///////////////     Credits     ///////////////////
  494. ///////////////////////////////////////////////////
  495. #pragma mark - Credits
  496. /*
  497.  
  498.  -------------
  499.  byte-swapping functions
  500.  special thanks to: http://stackoverflow.com/a/2637138
  501.  and http://cboard.cprogramming.com/c-programming/121572-how-swap-endianness-float.html
  502.  and http://www.cocoawithlove.com/2008/04/using-pointers-to-recast-in-c-is-bad.html
  503.  -------------
  504.  
  505.  
  506.  */
  507.  
  508. #pragma mark - Includes and Defines
  509.  
  510. #define apxs 0
  511.  
  512.  
  513. #include <stdint.h>
  514. #include <stdbool.h>
  515. #include <stdio.h>
  516.  
  517. #include <sys/stat.h>
  518.  
  519. #if apxs
  520.     #include <apache2/httpd.h>
  521.     #include <apache2/http_core.h>
  522.     #include <apache2/http_protocol.h>
  523.     #include <apache2/http_request.h>
  524.  
  525.     #include <apr-1/apr_strings.h>
  526.     #include <apr-1/apr_network_io.h>
  527.     #include <apr-1/apr_md5.h>
  528.     #include <apr-1/apr_sha1.h>
  529.     #include <apr-1/apr_hash.h>
  530.     #include <apr-1/apr_base64.h>
  531.     #include <apr-1/apr_dbd.h>
  532.     #include <apr-1/apr_file_info.h>
  533.     #include <apr-1/apr_file_io.h>
  534.     #include <apr-1/apr_network_io.h>
  535.     #include <apr-1/apr_tables.h>
  536.     #include <apache2/util_script.h>
  537. #endif
  538.  
  539. #ifndef PI
  540.     #define PI 3.1415926535897932384626433832795f   // optionally use an "#undef PI" statement at the end of this file
  541. #endif
  542.  
  543. #pragma mark - Enumerators
  544.  
  545. typedef enum
  546. {
  547.     DATATYPE_UNKNOWN,                          // undefined
  548.     HEK_FILE_ACTR,                   // Halo Editing Kit format tag files, complete with header
  549.     HEK_FILE_ACTV,
  550.     HEK_FILE_ANT,
  551.     HEK_FILE_ANTR,
  552.     HEK_FILE_BIPD,
  553.     HEK_FILE_BITM,
  554.     HEK_FILE_BOOM,
  555.     HEK_FILE_CDMG,
  556.     HEK_FILE_COLL,
  557.     HEK_FILE_COLO,
  558.     HEK_FILE_CONT,
  559.     HEK_FILE_CTRL,
  560.     HEK_FILE_DECA,
  561.     HEK_FILE_DELA,
  562.     HEK_FILE_DEVC,
  563.     HEK_FILE_DEVI,
  564.     HEK_FILE_DOBC,
  565.     HEK_FILE_EFFE,
  566.     HEK_FILE_ELEC,
  567.     HEK_FILE_EQIP,
  568.     HEK_FILE_FLAG,
  569.     HEK_FILE_FOG,
  570.     HEK_FILE_FONT,
  571.     HEK_FILE_FOOT,
  572.     HEK_FILE_GARB,
  573.     HEK_FILE_GLW,
  574.     HEK_FILE_GRHI,
  575.     HEK_FILE_HMT,
  576.     HEK_FILE_HUDG,
  577.     HEK_FILE_HUDN,
  578.     HEK_FILE_ITEM,
  579.     HEK_FILE_ITMC,
  580.     HEK_FILE_JPT,
  581.     HEK_FILE_LENS,
  582.     HEK_FILE_LIFI,
  583.     HEK_FILE_LIGH,
  584.     HEK_FILE_LSND,
  585.     HEK_FILE_MACH,
  586.     HEK_FILE_MATG,
  587.     HEK_FILE_METR,
  588.     HEK_FILE_MGS2,
  589.     HEK_FILE_MOD2,
  590.     HEK_FILE_MODE,
  591.     HEK_FILE_MPLY,
  592.     HEK_FILE_NGPR,
  593.     HEK_FILE_OBJE,
  594.     HEK_FILE_PART,
  595.     HEK_FILE_PCTL,
  596.     HEK_FILE_PHYS,
  597.     HEK_FILE_PLAC,
  598.     HEK_FILE_PPHY,
  599.     HEK_FILE_PROJ,
  600.     HEK_FILE_RAIN,
  601.     HEK_FILE_SBSP,
  602.     HEK_FILE_SCEN,
  603.     HEK_FILE_SCEX,
  604.     HEK_FILE_SCHI,
  605.     HEK_FILE_SCNR,
  606.     HEK_FILE_SENV,
  607.     HEK_FILE_SGLA,
  608.     HEK_FILE_SHDR,
  609.     HEK_FILE_SKY,
  610.     HEK_FILE_SMET,
  611.     HEK_FILE_SND,
  612.     HEK_FILE_SNDE,
  613.     HEK_FILE_SOSO,
  614.     HEK_FILE_SOTR,
  615.     HEK_FILE_SOUL,
  616.     HEK_FILE_SPLA,
  617.     HEK_FILE_SSCE,
  618.     HEK_FILE_STRN,
  619.     HEK_FILE_SWAT,
  620.     HEK_FILE_TAGC,
  621.     HEK_FILE_TRAK,
  622.     HEK_FILE_UDLG,
  623.     HEK_FILE_UNHI,
  624.     HEK_FILE_UNIT,
  625.     HEK_FILE_USTR,
  626.     HEK_FILE_VCKY,
  627.     HEK_FILE_VEHI,
  628.     HEK_FILE_WEAP,
  629.     HEK_FILE_WIND,
  630.     HEK_FILE_WPHI,
  631.     MAP_TAG_ACTR,                       // tag file data as it is when stored within a compiled map cache file
  632.     MAP_TAG_ACTV,
  633.     MAP_TAG_ANT,
  634.     MAP_TAG_ANTR,
  635.     MAP_TAG_BIPD,
  636.     MAP_TAG_BITM,
  637.     MAP_TAG_BOOM,
  638.     MAP_TAG_CDMG,
  639.     MAP_TAG_COLL,
  640.     MAP_TAG_COLO,
  641.     MAP_TAG_CONT,
  642.     MAP_TAG_CTRL,
  643.     MAP_TAG_DECA,
  644.     MAP_TAG_DELA,
  645.     MAP_TAG_DEVC,
  646.     MAP_TAG_DEVI,
  647.     MAP_TAG_DOBC,
  648.     MAP_TAG_EFFE,
  649.     MAP_TAG_ELEC,
  650.     MAP_TAG_EQIP,
  651.     MAP_TAG_FLAG,
  652.     MAP_TAG_FOG,
  653.     MAP_TAG_FONT,
  654.     MAP_TAG_FOOT,
  655.     MAP_TAG_GARB,
  656.     MAP_TAG_GLW,
  657.     MAP_TAG_GRHI,
  658.     MAP_TAG_HMT,
  659.     MAP_TAG_HUDG,
  660.     MAP_TAG_HUDN,
  661.     MAP_TAG_ITEM,
  662.     MAP_TAG_ITMC,
  663.     MAP_TAG_JPT,
  664.     MAP_TAG_LENS,
  665.     MAP_TAG_LIFI,
  666.     MAP_TAG_LIGH,
  667.     MAP_TAG_LSND,
  668.     MAP_TAG_MACH,
  669.     MAP_TAG_MATG,
  670.     MAP_TAG_METR,
  671.     MAP_TAG_MGS2,
  672.     MAP_TAG_MOD2,
  673.     MAP_TAG_MODE,
  674.     MAP_TAG_MPLY,
  675.     MAP_TAG_NGPR,
  676.     MAP_TAG_OBJE,
  677.     MAP_TAG_PART,
  678.     MAP_TAG_PCTL,
  679.     MAP_TAG_PHYS,
  680.     MAP_TAG_PLAC,
  681.     MAP_TAG_PPHY,
  682.     MAP_TAG_PROJ,
  683.     MAP_TAG_RAIN,
  684.     MAP_TAG_SBSP,
  685.     MAP_TAG_SCEN,
  686.     MAP_TAG_SCEX,
  687.     MAP_TAG_SCHI,
  688.     MAP_TAG_SCNR,
  689.     MAP_TAG_SENV,
  690.     MAP_TAG_SGLA,
  691.     MAP_TAG_SHDR,
  692.     MAP_TAG_SKY,
  693.     MAP_TAG_SMET,
  694.     MAP_TAG_SND,
  695.     MAP_TAG_SNDE,
  696.     MAP_TAG_SOSO,
  697.     MAP_TAG_SOTR,
  698.     MAP_TAG_SOUL,
  699.     MAP_TAG_SPLA,
  700.     MAP_TAG_SSCE,
  701.     MAP_TAG_STRN,
  702.     MAP_TAG_SWAT,
  703.     MAP_TAG_TAGC,
  704.     MAP_TAG_TRAK,
  705.     MAP_TAG_UDLG,
  706.     MAP_TAG_UNHI,
  707.     MAP_TAG_UNIT,
  708.     MAP_TAG_USTR,
  709.     MAP_TAG_VCKY,
  710.     MAP_TAG_VEHI,
  711.     MAP_TAG_WEAP,
  712.     MAP_TAG_WIND,
  713.     MAP_TAG_WPHI,
  714.     MAP_CACHE_FILE_PC,                // Halo PC map file (also Halo Full / Halo Mini Demo / Halo UB)
  715.     MAP_CACHE_FILE_DEMOTRIAL,        // Halo Demo or Halo Trial map file
  716.     MAP_CACHE_FILE_CE,                // Halo Custom Edition map file
  717.     SAVEGAME_PC,                           // Halo PC savegame (.sav)
  718.     SAVEGAME_CE,                           // Halo Custom Edition savegame (.sav)
  719.     GAMETYPE_PLAYLIST_PC,              // Halo PC blam.lst gametype file
  720.     GAMETYPE_PLAYLIST_CE,              // Halo Custom Edition blam.lst gametype file
  721.     MAP_RESOURCE_FILE_BITMAPS_PC,     // bitmaps.map for Halo PC
  722.     MAP_RESOURCE_FILE_SOUNDS_PC,      // sounds.map for Halo PC
  723.     MAP_RESOURCE_FILE_BITMAPS_CE,     // bitmaps.map for Halo Custom Edition
  724.     MAP_RESOURCE_FILE_SOUNDS_CE,      // sounds.map for Halo Custom Edition
  725.     MAP_RESOURCE_FILE_LOC_CE,           // loc.map for Halo Custom Edition
  726.     MEMORY_PC,
  727.     MEMORY_PC_TABLE_SERVER,
  728.     MEMORY_PC_TABLE_CELL_SERVER,
  729.     MEMORY_PC_TABLE_NETWORK_CONNECTIONS,
  730.     MEMORY_PC_TABLE_CELL_NETWORK_CONNECTIONS,
  731.     MEMORY_PC_ISOCELL_NETWORK_CONNECTION_DETAILS,
  732.     MEMORY_PC_TABLE_PLAYERS,            // memory table data
  733.     MEMORY_PC_TABLE_CELL_PLAYERS,
  734.     MEMORY_CE,
  735. } option_datatype;
  736.  
  737. typedef enum
  738. {
  739.     ENDIANNESS_UNKNOWN,
  740.     ENDIANNESS_LITTLE,
  741.     ENDIANNESS_BIG
  742. } option_endianness;
  743.  
  744. typedef enum
  745. {
  746.     // the type of program and platform
  747.     MAC_UNKNOWN,
  748.     MAC_GENERIC,
  749.     MAC_HALO_DEMO_PPC,
  750.     MAC_HALO_MINI_DEMO_PPC,
  751.     MAC_HALO_MINI_DEMO_INTEL,
  752.     MAC_HALO_PPC,
  753.     MAC_HALO_UB_PPC,
  754.     MAC_HALO_UB_INTEL,
  755.     MAC_WINE,
  756.     PC_UNKNOWN,
  757.     PC_GENERIC,
  758.     PC_HALO_TRIAL,
  759.     PC_HALO_109,
  760.     PC_HALO_110,
  761.     PC_HALO_DEDICATED_109,
  762.     PC_HALO_DEDICATED_110,
  763.     PC_HALO_CE_109,
  764.     PC_HALO_CE_110,
  765.     PC_HALO_CE_DEDICATED_109,
  766.     PC_HALO_CE_DEDICATED_110,
  767.     PC_HALO_2,  // not going beyond this for now
  768.     XBOX_HALO
  769. } option_platform;
  770.  
  771. enum tag_class_types
  772. {
  773.     actr = 1,
  774.     actv,
  775.     ant,
  776.     antr,
  777.     bipd,
  778.     bitm,
  779.     boom,
  780.     cdmg,
  781.     coll,
  782.     colo,
  783.     cont,
  784.     ctrl,
  785.     deca,
  786.     DeLa,
  787.     devc,
  788.     devi,
  789.     dobc,
  790.     effe,
  791.     elec,
  792.     eqip,
  793.     flag,
  794.     fog,
  795.     font,
  796.     foot,
  797.     garb,
  798.     glw,
  799.     grhi,
  800.     hmt,
  801.     hudg,
  802.     hudn,
  803.     item,
  804.     itmc,
  805.     jpt,
  806.     lens,
  807.     lifi,
  808.     ligh,
  809.     lsnd,
  810.     mach,
  811.     matg,
  812.     metr,
  813.     mgs2,
  814.     mod2,
  815.     mode,
  816.     mply,
  817.     ngpr,
  818.     obje,
  819.     part,
  820.     pctl,
  821.     phys,
  822.     plac,
  823.     pphy,
  824.     proj,
  825.     rain,
  826.     sbsp,
  827.     scen,
  828.     scex,
  829.     schi,
  830.     scnr,
  831.     senv,
  832.     sgla,
  833.     shdr,
  834.     sky,
  835.     smet,
  836.     snd,
  837.     snde,
  838.     soso,
  839.     sotr,
  840.     Soul,
  841.     spla,
  842.     ssce,
  843.     strn,
  844.     swat,
  845.     tagc,
  846.     trak,
  847.     udlg,
  848.     unhi,
  849.     unit,
  850.     ustr,
  851.     vcky,
  852.     vehi,
  853.     weap,
  854.     wind,
  855.     wphi
  856. };
  857.  
  858. char * tag_class_names[] =
  859. {
  860.     "UNDEFINED",
  861.     "actr / .actor / Actor",
  862.     "actv / .actor_variant / Actor Variant",
  863.     "ant! / .antenna / Antenna",
  864.     "antr / .model_animations / Animations",
  865.     "bipd / .biped / Biped",
  866.     "bitm / .bitmap / Bitmap",
  867.     "boom / .spheroid / Spheroid",
  868.     "cdmg / .continuous_damage_effect / Continuous Damage Effect",
  869.     "coll / .model_collision_geometry / Collision Model",
  870.     "colo / .color_table / Color Table",
  871.     "cont / .contrail / Contrail",
  872.     "ctrl / .device_control / Control Panel",
  873.     "deca / .decal / Decal",
  874.     "DeLa / .ui_widget_definition / UI Widget Definition",
  875.     "devc / .input_device_defaults / Input Device Defaults",
  876.     "devi / .device / Device",
  877.     "dobc / .detail_object_collection / Detail Object Collection",
  878.     "effe / .effect / Effect",
  879.     "elec / .lightning / Lightning",
  880.     "eqip / .equipment / Equipment",
  881.     "flag / .flag / Flag Cloth",
  882.     "fog  / .fog / Fog",
  883.     "font / .font / Font",
  884.     "foot / .material_effects / Material Collision Effects",
  885.     "garb / .garbage / Garbage",
  886.     "glw! / .glow /Particle Glow Effect",
  887.     "grhi / .grenade_hud_interface / Grenade HUD Interface",
  888.     "hmt  / .hud_message_text / HUD Messages",
  889.     "hudg / .hud_globals / General HUD Settings",
  890.     "hud# / .hud_number / HUD Numbers Settings",
  891.     "item / .item / Item",
  892.     "itmc / .item_collection / Respawning Objects Collection",
  893.     "jpt! / .damage_effect / Damage Effect",
  894.     "lens / .lens_flare / Lens Flare",
  895.     "lifi / .device_light_fixture / Light Fixture",
  896.     "ligh / .light / Light",
  897.     "lsnd / .sound_looping / Looping Sound",
  898.     "mach / .device_machine / Machine",
  899.     "matg / .globals / General Game Settings",
  900.     "metr / .meter / Meter",
  901.     "mgs2 / .light_volume / Volumetric Light",
  902.     "mod2 / .gbxmodel / Gearbox PC Model",
  903.     "mode / .model / Xbox Model",
  904.     "mply / .multiplayer_scenario_description / Multiplayer Descriptions",
  905.     "ngpr / .preferences_network_game / Multiplayer Character Settings",
  906.     "obje / .object / Object",
  907.     "part / .particle / Particle",
  908.     "pctl / .particle_system / Particle System",
  909.     "phys / .physics / Object Physics",
  910.     "plac / .placeholder / Object Placeholder",
  911.     "pphy / .point_physics / Particle Point Physics",
  912.     "proj / .projectile / Projectile",
  913.     "rain / .weather_particle_system / Weather",
  914.     "sbsp / .scenario_structure_bsp / Scenario Environment Structure",
  915.     "scen / .scenery / Scenery",
  916.     "scex / .shader_transparent_chicago_extended / Extended Transparent Shader",
  917.     "schi / .shader_transparent_chicago / Transparent Shader",
  918.     "scnr / .scenario / Scenario Environment Configuration",
  919.     "senv / .shader_environment / Environment Shader",
  920.     "sgla / .shader_transparent_glass / Transparent Glass Shader",
  921.     "shdr / .shader / Generic Shader",
  922.     "sky  / .sky / Sky",
  923.     "smet / .shader_transparent_meter / Transparent Meter Shader",
  924.     "snd! / .sound / Sound",
  925.     "snde / .sound_environment / Ambient Effect",
  926.     "soso / .shader_model / Model Shader",
  927.     "sotr / .shader_transparent_generic / Generic Transparent Shader",
  928.     "Soul / .ui_widget_collection / UI Widget Collection",
  929.     "spla / .shader_transparent_plasma / Transparent Plasma Shader",
  930.     "ssce / .sound_scenery / Sound-Emitting Scenery",
  931.     "str# / .string_list / String References",
  932.     "swat / .shader_transparent_water / Transparent Water Shader",
  933.     "tagc / .tag_collection / Tag Collection",
  934.     "trak / .camera_track / Camera Track",
  935.     "udlg / .dialogue / Unit Dialogue",
  936.     "unhi / .unit_hud_interface / Unit HUD Interface",
  937.     "unit / .unit / Unit",
  938.     "ustr / .unicode_string_list / Unicode String References",
  939.     "vcky / .virtual_keyboard / Virtual Keyboard",
  940.     "vehi / .vehicle / Vehicle",
  941.     "weap / .weapon / Weapon",
  942.     "wind / .wind / Wind",
  943.     "wphi / .weapon_hud_interface / Weapon HUD Interface"
  944. };
  945.  
  946. #pragma mark - HEK tag file format structs
  947. //   I. HEK tag file format structs
  948.  
  949. #pragma mark -- header
  950. typedef struct
  951. {
  952.     uint8_t     pad_0[36];          // 0, 36    zeros overwritten; data not ignored
  953.     char        tagtype[4];         // 36, 4    "actr", "actv", etc.(1); causes "invalid header" error
  954.     uint32_t    crc32;              // 40, 4    checksum of tag data following header, big endian, recalculated when saved
  955.     uint32_t    header_size;        // 44, 4    64 overwritten (purpose of this data is guessed)
  956.     uint8_t     pad_48[8];          // 48, 8    zeros overwritten; data not ignored
  957.     uint16_t    tag_version;        // 56, 2    varies(2); causes errors if incorrect including "_ tag was an old version"
  958.     uint16_t    engine_version;     // 58, 2    255; overwritten (purpose of this data is guessed)
  959.     char        engine[4];          // 60, 4    "blam"; causes "invalid header" error
  960. } type_header;
  961.  
  962. #pragma mark -- actr
  963.  
  964. typedef struct
  965. {
  966.     uint32_t flags_bf;  // toff 64  32-bit 0xFFFFFFFF
  967.     uint32_t more_flags_bf; // toff 68 32-bit 0x0000007F
  968.     uint8_t pad_72[12]; // 72, 12
  969.     uint16_t actor_type_list;
  970.     uint8_t pad_86[2];  // 86, 2
  971.     float perception_maximum_vision_distance;
  972.     float perception_central_vision_angle_rad;
  973.     float perception_maximum_vision_angle_rad;
  974.     uint8_t pad_100[4]; // 100, 4
  975.     float perception_peripheral_vision_angle_rad;
  976.     float perception_peripheral_distance;
  977.     uint8_t pad_112[4]; // 112, 4
  978.     float perception_standing_gun_offset_i;
  979.     float perception_standing_gun_offset_j;
  980.     float perception_standing_gun_offset_k;
  981.     float perception_crouching_gun_offset_i;
  982.     float perception_crouching_gun_offset_j;
  983.     float perception_crouching_gun_offset_k;
  984.     float perception_hearing_distance;
  985.     float perception_notice_projectile_chance;
  986.     float perception_notice_vehicle_chance;
  987.     uint8_t pad_152[8]; // 152, 8
  988.     float perception_combat_perception_time;
  989.     float perception_guard_perception_time;
  990.     float perception_non_combat_perception_time;
  991.     // 172 -- 3 calculated float values, 0 until compiled, compiled defaults:
  992.     float unknown_1;   // 0.0555556
  993.     float unknown_2;   // 0.0238095
  994.     float unknown_3;   // 0.0166667 or 0
  995.     uint8_t pad_184[8];// 184, 8
  996.     float movement_dive_into_cover_chance;
  997.     float movement_emerge_from_cover_chance;
  998.     float movement_dive_from_grenade_chance;
  999.     float movement_path_finding_radius;
  1000.     float movement_glass_ignorance_chance;
  1001.     float movement_stationary_movement_distance;
  1002.     float movement_free_flying_sidestep;
  1003.     float movement_begin_moving_angle_rad;
  1004.     uint8_t pad_224[4]; // 224, 4
  1005.     float looking_maximum_aiming_deviation_yaw_rad;
  1006.     float looking_maximum_aiming_deviation_pitch_rad;
  1007.     float looking_maximum_looking_deviation_yaw_rad;
  1008.     float looking_maximum_looking_deviation_pitch_rad;
  1009.     float looking_non_combat_look_delta_left_rad;
  1010.     float looking_non_combat_look_delta_right_rad;
  1011.     float looking_combat_look_delta_left_rad;
  1012.     float looking_combat_look_delta_right_rad;
  1013.     float looking_idle_aiming_range_yaw_rad;
  1014.     float looking_idle_aiming_range_pitch_rad;
  1015.     float looking_idle_looking_range_yaw_rad;
  1016.     float looking_idle_looking_range_pitch_rad;
  1017.     float looking_event_look_time_modifier_from;
  1018.     float looking_event_look_time_modifier_to;
  1019.     float looking_non_combat_idle_facing_from;
  1020.     float looking_non_combat_idle_facing_to;
  1021.     float looking_non_combat_idle_aiming_from;
  1022.     float looking_non_combat_idle_aiming_to;
  1023.     float looking_non_combat_idle_looking_from;
  1024.     float looking_non_combat_idle_looking_to;
  1025.     float looking_guard_idle_facing_from;
  1026.     float looking_guard_idle_facing_to;
  1027.     float looking_guard_idle_aiming_from;
  1028.     float looking_guard_idle_aiming_to;
  1029.     float looking_guard_idle_looking_from;
  1030.     float looking_guard_idle_looking_to;
  1031.     float looking_combat_idle_facing_from;
  1032.     float looking_combat_idle_facing_to;
  1033.     float looking_combat_idle_aiming_from;
  1034.     float looking_combat_idle_aiming_to;
  1035.     float looking_combat_idle_looking_from;
  1036.     float looking_combat_idle_looking_to;
  1037.     uint8_t pad_356[8]; // 356, 8
  1038.     // calculated values, 0 until compiled: 3 unknown values of the same data (0xb33bbd2e) followed by 1 float value of 0.5
  1039.     uint32_t unknown_4;
  1040.     uint32_t unknown_5;
  1041.     uint32_t unknown_6;
  1042.     float unknown_7;
  1043.    
  1044.     // dependency 1: looking -- DO NOT USE -- weap
  1045.     char d1_tagclass[4];
  1046.     uint32_t d1_tagnamepointer;
  1047.     uint32_t d1_tagnamestringlength;
  1048.     uint32_t d1_tagid;
  1049.    
  1050.     uint8_t pad_396[268];   // 396, 268
  1051.    
  1052.     // dependency 2: looking -- DO NOT USE -- proj
  1053.     char d2_tagclass[4];
  1054.     uint32_t d2_tagnamepointer;
  1055.     uint32_t d2_tagnamestringlength;
  1056.     uint32_t d2_tagid;
  1057.    
  1058.     uint16_t unopposable_unreachable_danger_trigger_list;
  1059.     uint16_t unopposable_vehicle_danger_trigger_list;
  1060.     uint16_t unopposable_player_danger_trigger_list;
  1061.     uint8_t pad_686[2]; // 686, 2
  1062.     float unopposable_danger_trigger_time_from;
  1063.     float unopposable_danger_trigger_time_to;
  1064.     uint16_t unopposable_friends_killed_trigger;
  1065.     uint16_t unopposable_friends_retreating_trigger;
  1066.     uint8_t pad_700[12];    // 700, 12
  1067.     float unopposable_retreat_time_from;
  1068.     float unopposable_retreat_time_to;
  1069.     uint8_t pad_720[8]; // 720, 8
  1070.     float panic_cowering_time_from;
  1071.     float panic_cowering_time_to;
  1072.     float panic_friend_killed_panic_chance;
  1073.     uint16_t panic_leader_type_list;
  1074.     uint8_t pad_742[2]; // 742, 2
  1075.     float panic_leader_killed_panic_chance;
  1076.     float panic_panic_damage_threshold;
  1077.     float panic_surprise_distance;
  1078.     uint8_t pad_756[28];    // 756, 28
  1079.     float defensive_hide_behind_cover_time_from;
  1080.     float defensive_hide_behind_cover_time_to;
  1081.     float defensive_hide_target_not_visible_time;
  1082.     float defensive_hide_shield_fraction;
  1083.     float defensive_attack_shield_fraction;
  1084.     float defensive_pursue_shield_fraction;
  1085.     uint8_t pad_808[16];    // 808, 16
  1086.     uint16_t defensive_defensive_crouch_type_list;
  1087.     uint8_t pad_826[2]; // 826, 2
  1088.     float defensive_attacking_crouch_threshold;
  1089.     float defensive_defending_crouch_threshold;
  1090.     float defensive_minimum_stand_time;
  1091.     float defensive_minimum_crouch_time;
  1092.     float defensive_defending_hide_time_modifier;
  1093.     float defensive_attacking_evasion_threshold;
  1094.     float defensive_defending_evasion_threshold;
  1095.     float defensive_evasion_seek_cover_chance;
  1096.     float defensive_evasion_delay_time;
  1097.     float defensive_maximum_seek_cover_distance;
  1098.     float defensive_cover_damage_threshold;
  1099.     float defensive_stalking_discovery_time;
  1100.     float defensive_stalking_maximum_distance;
  1101.     float defensive_stationary_facing_angle_rad;
  1102.     float defensive_change_facing_stand_time;
  1103.     uint8_t pad_888[4]; // 888, 4
  1104.     float pursuit_uncover_delay_time_from;
  1105.     float pursuit_uncover_delay_time_to;
  1106.     float pursuit_target_search_time_from;
  1107.     float pursuit_target_search_time_to;
  1108.     float pursuit_pursuit_position_time_from;
  1109.     float pursuit_pursuit_position_time_to;
  1110.     uint16_t pursuit_num_positions_coord;
  1111.     uint16_t pursuit_num_positions_normal;
  1112.     uint8_t pad_920[32];    // 920, 32
  1113.     float berserk_melee_attack_delay;
  1114.     float berserk_melee_fudge_factor;
  1115.     float berserk_melee_charge_time;
  1116.     float berserk_melee_leap_range_from;
  1117.     float berserk_melee_leap_range_to;
  1118.     float berserk_melee_leap_velocity;
  1119.     float berserk_melee_leap_chance;
  1120.     float berserk_melee_leap_ballistic;
  1121.     float berserk_berserk_damage_amount;
  1122.     float berserk_berserk_damage_threshold;
  1123.     float berserk_berserk_proximity;
  1124.     float berserk_suicide_sensing_distance;
  1125.     float berserk_berserk_grenade_chance;
  1126.     uint8_t pad_1004[12];   // 1004, 12
  1127.     float firing_positions_guard_position_time_from;
  1128.     float firing_positions_guard_position_time_to;
  1129.     float firing_positions_combat_position_time_from;
  1130.     float firing_positions_combat_position_time_to;
  1131.     float firing_positions_old_position_avoid_distance;
  1132.     float firing_positions_friend_avoid_distance;
  1133.     uint8_t pad_1040[40];   // 1040, 40
  1134.     float communication_non_combat_idle_speech_time_from;
  1135.     float communication_non_combat_idle_speech_time_to;
  1136.     float communication_combat_idle_speech_time_from;
  1137.     float communication_combat_idle_speech_time_to;
  1138.     uint8_t pad_1096[176];  // 1096, 176
  1139.    
  1140.     // dependency 3: communication -- DO NOT USE -- actr
  1141.     char d3_tagclass[4];
  1142.     uint32_t d3_tagnamepointer;
  1143.     uint32_t d3_tagnamestringlength;
  1144.     uint32_t d3_tagid;
  1145.    
  1146.     uint8_t pad_1288[48];   // 1288, 48
  1147.    
  1148.     // 1336, tpns 1-3
  1149.     char** tpns;
  1150.    
  1151. } type_meta_actr;
  1152.  
  1153. #pragma mark -- actv
  1154.  
  1155. typedef struct {
  1156.     uint32_t flags_bf;  // toff 64  32-bit 0x000000FF
  1157.    
  1158.     // dependency 1: -- actor definition -- actr
  1159.     char d1_tagclass[5];
  1160.     uint32_t d1_tagnamepointer;
  1161.     uint32_t d1_tagnamestringlength;
  1162.     uint32_t d1_tagid;
  1163.    
  1164.     // dependency 2: -- unit -- bipd unit vehi
  1165.     char d2_tagclass[5];
  1166.     uint32_t d2_tagnamepointer;
  1167.     uint32_t d2_tagnamestringlength;
  1168.     uint32_t d2_tagid;
  1169.    
  1170.     // dependency 3: -- major variant -- actv
  1171.     char d3_tagclass[5];
  1172.     uint32_t d3_tagnamepointer;
  1173.     uint32_t d3_tagnamestringlength;
  1174.     uint32_t d3_tagid;
  1175.    
  1176.     // 116, 24
  1177.    
  1178.     uint16_t movement_switching_movement_type_list;   // offset 140
  1179.     // 142, 2
  1180.     float movement_switching_initial_crouch_chance_frac;   // offset 144
  1181.     float movement_switching_crouch_time_from;
  1182.     float movement_switching_crouch_time_to;
  1183.     float movement_switching_run_time_from;
  1184.     float movement_switching_run_time_to;
  1185.    
  1186.     // dependency 4: ranged combat -- weapon -- weap
  1187.     char d4_tagclass[5];
  1188.     uint32_t d4_tagnamepointer;
  1189.     uint32_t d4_tagnamestringlength;
  1190.     uint32_t d4_tagid;
  1191.    
  1192.     float ranged_combat_maximum_firing_distance;
  1193.     float ranged_combat_rate_of_fire;
  1194.     float ranged_combat_projectile_error;
  1195.     float ranged_combat_fire_burst_delay_time_from;
  1196.     float ranged_combat_fire_burst_delay_time_to;
  1197.     float ranged_combat_new_target_firing_pattern_time;
  1198.     float ranged_combat_surprise_delay_time;
  1199.     float ranged_combat_surprise_fire_wildly_time;
  1200.     float ranged_combat_death_fire_wildly_chance_frac;
  1201.     float ranged_combat_death_fire_wildly_time;
  1202.     float ranged_combat_desired_combat_range_from;
  1203.     float ranged_combat_desired_combat_range_to;
  1204.     float ranged_combat_custom_stand_gun_offset_i;
  1205.     float ranged_combat_custom_stand_gun_offset_j;
  1206.     float ranged_combat_custom_stand_gun_offset_k;
  1207.     float ranged_combat_custom_crouch_gun_offset_i;
  1208.     float ranged_combat_custom_crouch_gun_offset_j;
  1209.     float ranged_combat_custom_crouch_gun_offset_k;
  1210.     float ranged_combat_target_tracking_frac;
  1211.     float ranged_combat_target_leading_frac;
  1212.     float ranged_combat_weapon_damage_modifier;
  1213.     float ranged_combat_damage_per_second;
  1214.    
  1215.     float burst_geometry_burst_origin_radius;
  1216.     float burst_geometry_burst_origin_angle_rad;
  1217.     float burst_geometry_burst_return_length_from;
  1218.     float burst_geometry_burst_return_length_to;
  1219.     float burst_geometry_burst_return_angle_rad;
  1220.     float burst_geometry_burst_duration_from;
  1221.     float burst_geometry_burst_duration_to;
  1222.     float burst_geometry_burst_separation_from;
  1223.     float burst_geometry_burst_separation_to;
  1224.     float burst_geometry_burst_angular_velocity_rad;
  1225.     // 308, 4
  1226.     float burst_geometry_special_damage_modifier_frac;   // offset 312
  1227.     float burst_geometry_special_projectile_error_rad;
  1228.    
  1229.     float firing_patterns_new_target_burst_duration;
  1230.     float firing_patterns_new_target_burst_separation;
  1231.     float firing_patterns_new_target_rate_of_fire;
  1232.     float firing_patterns_new_target_projectile_error;
  1233.     // 336, 8
  1234.     float firing_patterns_moving_burst_duration;   // offset 344
  1235.     float firing_patterns_moving_burst_separation;
  1236.     float firing_patterns_moving_rate_of_fire;
  1237.     float firing_patterns_moving_projectile_error;
  1238.     // 360, 8
  1239.     float firing_patterns_berserk_burst_duration;   // offset 368
  1240.     float firing_patterns_berserk_burst_separation;
  1241.     float firing_patterns_berserk_rate_of_fire;
  1242.     float firing_patterns_berserk_projectile_error;
  1243.    
  1244.     // 384, 8
  1245.     float special_case_firing_properties_super_ballistic_range;   // offset 392
  1246.     float special_case_firing_properties_bombardment_range;
  1247.     float special_case_firing_properties_modified_vision_range;
  1248.     uint16_t special_case_firing_properties_special_fire_mode_list;
  1249.     uint16_t special_case_firing_properties_special_fire_situation_list;
  1250.     float special_case_firing_properties_special_fire_chance_frac;
  1251.     float special_case_firing_properties_special_fire_delay;
  1252.    
  1253.     float berserking_and_melee_melee_range;
  1254.     float berserking_and_melee_melee_abort_range;
  1255.     float berserking_and_melee_berserk_firing_ranges_from;
  1256.     float berserking_and_melee_berserk_firing_ranges_to;
  1257.     float berserking_and_melee_berserk_melee_range;
  1258.     float berserking_and_melee_berserk_melee_abort_range;
  1259.    
  1260.     // 440, 8
  1261.     uint16_t grenades_grenade_type_list;   // offset 448
  1262.     uint16_t grenades_trajectory_type_list;
  1263.     uint16_t grenades_grenade_stimulus_list;
  1264.     uint16_t grenades_minimum_enemy_count;
  1265.     float grenades_enemy_radius;
  1266.     // 460, 4
  1267.     float grenades_grenade_velocity;   // offset 464
  1268.     float grenades_grenade_ranges_from;
  1269.     float grenades_grenade_ranges_to;
  1270.     float grenades_collateral_damage_radius;
  1271.     float grenades_grenade_chance_frac;
  1272.     float grenades_grenade_check_time;
  1273.     float grenades_encounter_grenade_timeout;
  1274.    
  1275.     // 492, 20
  1276.    
  1277.     // dependency 5: items -- equipment -- eqip, offset 512
  1278.     char d5_tagclass[5];
  1279.     uint32_t d5_tagnamepointer;
  1280.     uint32_t d5_tagnamestringlength;
  1281.     uint32_t d5_tagid;
  1282.    
  1283.     uint16_t items_grenade_count_from;   // offset 528
  1284.     uint16_t items_grenade_count_to;
  1285.     float items_dont_drop_grenades_chance_frac;
  1286.     float items_drop_weapon_loaded_from_frac;
  1287.     float items_drop_weapon_loaded_to_frac;
  1288.     uint16_t items_drop_weapon_ammo_from;
  1289.     uint16_t items_drop_weapon_ammo_to;
  1290.    
  1291.     // 548, 28
  1292.     float unit_body_vitality;   // offset 576
  1293.     float unit_shield_vitality;
  1294.     float unit_shield_sapping_radius;
  1295.     uint16_t unit_forced_shader_permutation;
  1296.    
  1297.     // 590, 30
  1298.    
  1299.     // representation 1 board, offset 620
  1300.     // r1b_change_colors_
  1301.     uint32_t r1b_change_colors_entrycount;   // maximum of 4 cells
  1302.     uint32_t r1b_change_colors_random_id1;
  1303.     uint32_t r1b_change_colors_sig_id;   // value = 0x4C949C00 (little endian)
  1304.    
  1305.     // 632, tpns 1-5
  1306.    
  1307.     struct actv_r1c {
  1308.         // representation 1 cells
  1309.         // r1c_change_colors_
  1310.         // 32
  1311.         float r1c_change_colors_color_lower_bound_r;
  1312.         float r1c_change_colors_color_lower_bound_g;
  1313.         float r1c_change_colors_color_lower_bound_b;
  1314.         float r1c_change_colors_color_upper_bound_r;
  1315.         float r1c_change_colors_color_upper_bound_g;
  1316.         float r1c_change_colors_color_upper_bound_b;
  1317.         // 8
  1318.     } r1c_change_colors;
  1319.    
  1320. } type_meta_actv;
  1321.  
  1322. #pragma mark -- ant!
  1323.  
  1324. typedef struct {
  1325.     char attachment_marker_name[32];
  1326.    
  1327.     // dependency 1: -- bitmaps -- bitm, offset 96
  1328.     char d1_tagclass[5];
  1329.     uint32_t d1_tagnamepointer;
  1330.     uint32_t d1_tagnamestringlength;
  1331.     uint32_t d1_tagid;
  1332.    
  1333.     // dependency 2: -- physics -- pphy, offset 112
  1334.     char d2_tagclass[5];
  1335.     uint32_t d2_tagnamepointer;
  1336.     uint32_t d2_tagnamestringlength;
  1337.     uint32_t d2_tagid;
  1338.    
  1339.     // 128, 80
  1340.    
  1341.     float spring_strength_coefficient_frac;   // offset 208
  1342.     float falloff_pixels;
  1343.     float cutoff_pixels;
  1344.     float total_length_calc;   // undocumented; sum of all "length" values of r1b cells; Guerilla writes this in little endian, but the stock tags have this value in big endian, so present this value as internal but let the user swap its endianness
  1345.     // 224, 36
  1346.    
  1347.     // representation 1 board, offset 260
  1348.     // r1b_vertices_
  1349.     uint32_t r1b_vertices_entrycount;   // maximum of 20 cells
  1350.     uint32_t r1b_vertices_random_id1;
  1351.     uint32_t r1b_vertices_sig_id;   // value = 0xE4139D00
  1352.    
  1353.     // 272, tpns 1-2
  1354.    
  1355.     struct ant_r1c {
  1356.         // representation 1 cells
  1357.         // r1c_vertices_
  1358.         float r1c_vertices_spring_strength_coefficient_frac;
  1359.         // 24
  1360.         float r1c_vertices_angles_yaw_rad;
  1361.         float r1c_vertices_angles_pitch_rad;
  1362.         float r1c_vertices_length;
  1363.         uint16_t r1c_vertices_sequence_index;
  1364.         // 2
  1365.         float r1c_vertices_color_a_frac;
  1366.         float r1c_vertices_color_r_frac;
  1367.         float r1c_vertices_color_g_frac;
  1368.         float r1c_vertices_color_b_frac;
  1369.         float r1c_vertices_lod_color_a_frac;
  1370.         float r1c_vertices_lod_color_r_frac;
  1371.         float r1c_vertices_lod_color_g_frac;
  1372.         float r1c_vertices_lod_color_b_frac;
  1373.         // 40
  1374.        
  1375.         // three undocumented internal values (again, stock tag data is in big endian, but Guerilla writes in little endian)
  1376.         // these are calculated coordinate vectors probably representing the initial direction of the antenna
  1377.         float r1c_vertices_coordinate_vector_i_calc;
  1378.         float r1c_vertices_coordinate_vector_j_calc;
  1379.         float r1c_vertices_coordinate_vector_k_calc;
  1380.     } r1c_vertices;
  1381. } type_meta_ant;
  1382.  
  1383. #pragma mark -- antr
  1384.  
  1385. typedef struct {
  1386.     // representation 1 board, offset 64
  1387.     // r1b_objects_
  1388.     uint32_t r1b_objects_entrycount;   // maximum of 4 cells
  1389.     uint32_t r1b_objects_random_id1;
  1390.     uint32_t r1b_objects_sig_id;   // value = 0x806E9D00
  1391.    
  1392.     // representation 2 board, offset 76
  1393.     // r2b_units_
  1394.     uint32_t r2b_units_entrycount;   // maximum of 32 cells
  1395.     uint32_t r2b_units_random_id1;
  1396.     uint32_t r2b_units_sig_id;   // value = 0x1C729D00
  1397.    
  1398.     // representation 3 board, offset 88
  1399.     // r3b_weapons_
  1400.     uint32_t r3b_weapons_entrycount;   // maximum of 1 cell
  1401.     uint32_t r3b_weapons_random_id1;
  1402.     uint32_t r3b_weapons_sig_id;   // value = 0xB0729D00
  1403.    
  1404.     // representation 4 board, offset 100
  1405.     // r4b_vehicles_
  1406.     uint32_t r4b_vehicles_entrycount;   // maximum of 1 cell
  1407.     uint32_t r4b_vehicles_random_id1;
  1408.     uint32_t r4b_vehicles_sig_id;   // value = 0xC4749D00
  1409.    
  1410.     // representation 5 board, offset 112
  1411.     // r5b_devices_
  1412.     uint32_t r5b_devices_entrycount;   // maximum of 1 cell
  1413.     uint32_t r5b_devices_random_id1;
  1414.     uint32_t r5b_devices_sig_id;   // value = 0x58759D00
  1415.    
  1416.     // representation 6 board, offset 124
  1417.     // r6b_unit_damage_
  1418.     uint32_t r6b_unit_damage_entrycount;   // maximum of 176 cells
  1419.     uint32_t r6b_unit_damage_random_id1;
  1420.     uint32_t r6b_unit_damage_sig_id;   // value = 0xF86F9D00
  1421.    
  1422.     // representation 7 board, offset 136
  1423.     // r7b_first_person_weapons_
  1424.     uint32_t r7b_first_person_weapons_entrycount;   // maximum of 1 cell
  1425.     uint32_t r7b_first_person_weapons_random_id1;
  1426.     uint32_t r7b_first_person_weapons_sig_id;   // value = 0x44739D00
  1427.    
  1428.     // representation 8 board, offset 148
  1429.     // r8b_sound_references_
  1430.     uint32_t r8b_sound_references_entrycount;   // maximum of 257 cells
  1431.     uint32_t r8b_sound_references_random_id1;
  1432.     uint32_t r8b_sound_references_sig_id;   // value = 0xB06B9D00
  1433.    
  1434.     float limp_body_node_radius;   // offset 160
  1435.     // 164, 1
  1436.     uint8_t flags_bf;   // toff 164 8-bit 0x03
  1437.    
  1438.     // 166, 2
  1439.    
  1440.     // representation 9 board, offset 168
  1441.     // r9b_nodes_
  1442.     uint32_t r9b_nodes_entrycount;   // maximum of 64 cells
  1443.     uint32_t r9b_nodes_random_id1;
  1444.     uint32_t r9b_nodes_sig_id;   // value = 0x10769D00
  1445.    
  1446.     // representation 10 board, offset 180
  1447.     // r10b_animations_
  1448.     uint32_t r10b_animations_entrycount;   // maximum of 256 cells
  1449.     uint32_t r10b_animations_random_id1;
  1450.     uint32_t r10b_animations_sig_id;   // value = 0xD86D9D00
  1451.    
  1452.     struct antr_r1c {
  1453.         // representation 1 cells, offset 192
  1454.         // r1c_objects_
  1455.         uint16_t r1c_objects_animation_sel;
  1456.         uint16_t r1c_objects_function;
  1457.         uint16_t r1c_objects_function_controls;
  1458.         // 14
  1459.     } r1c_objects;
  1460.    
  1461.     struct antr_r2sc {
  1462.         // representation 2 sub-cells
  1463.         // r2c_units_
  1464.         char r2c_units_label[32];
  1465.         // r2c_units_looking_screen_bounds_
  1466.         float r2c_units_looking_screen_bounds_right_yaw_per_frame_rad;
  1467.         float r2c_units_looking_screen_bounds_left_yaw_per_frame_rad;
  1468.         uint16_t r2c_units_looking_screen_bounds_right_frame_count;
  1469.         uint16_t r2c_units_looking_screen_bounds_left_frame_count;
  1470.         float r2c_units_looking_screen_bounds_down_pitch_per_frame_rad;
  1471.         float r2c_units_looking_screen_bounds_up_pitch_per_frame_rad;
  1472.         uint16_t r2c_units_looking_screen_bounds_down_pitch_frame_count;
  1473.         uint16_t r2c_units_looking_screen_bounds_up_pitch_frame_count;
  1474.         // 8
  1475.        
  1476.         // representation 2 sub-board A
  1477.         // r2sbA_animations_
  1478.         uint32_t r2sbA_animations_entrycount;   // maximum of 30 cells
  1479.         uint32_t r2sbA_animations_random_id1;
  1480.         uint32_t r2sbA_animations_sig_id;   // value = 0x38719D00
  1481.        
  1482.         // representation 2 sub-board B
  1483.         // r2sbB_ik_points_
  1484.         uint32_t r2sbB_ik_points_entrycount;   // maximum of 4 cells
  1485.         uint32_t r2sbB_ik_points_random_id1;
  1486.         uint32_t r2sbB_ik_points_sig_id;   // value = 0xD06E9D00
  1487.        
  1488.         // representation 2 sub-board C
  1489.         // r2sbC_weapons_
  1490.         uint32_t r2sbC_weapons_entrycount;   // maximum of 16 cells
  1491.         uint32_t r2sbC_weapons_random_id1;
  1492.         uint32_t r2sbC_weapons_sig_id;   // value = 0xF4709D00
  1493.     } r2sc_units_1;
  1494.    
  1495.     struct antr_r2scA {
  1496.         // representation 2 sub-cells A
  1497.         // r2scA_animations_
  1498.         uint16_t r2scA_animations_animation_sel;
  1499.     } r2sc_units_animations;
  1500.    
  1501.     struct antr_r2scB {
  1502.         // representation 2 sub-cells B
  1503.         // r2scB_ik_points_
  1504.         char r2scB_ik_points_marker[32];
  1505.         char r2scB_ik_points_attach_to_marker[32];
  1506.     } r2sc_units_ik_points;
  1507.    
  1508.     struct antr_r2scC {
  1509.         // representation 2 sub-cells C
  1510.         // r2scC_weapons_
  1511.         char r2scC_weapons_name[32];
  1512.         char r2scC_weapons_grip_marker[32];
  1513.         char r2scC_weapons_hand_marker[32];
  1514.         float r2scC_weapons_aiming_screen_bounds_right_yaw_per_frame_rad;
  1515.         float r2scC_weapons_aiming_screen_bounds_left_yaw_per_frame_rad;
  1516.         uint16_t r2scC_weapons_aiming_screen_bounds_right_frame_count;
  1517.         uint16_t r2scC_weapons_aiming_screen_bounds_left_frame_count;
  1518.         float r2scC_weapons_aiming_screen_bounds_down_pitch_per_frame_rad;
  1519.         float r2scC_weapons_aiming_screen_bounds_up_pitch_per_frame_rad;
  1520.         uint16_t r2scC_weapons_aiming_screen_bounds_down_pitch_frame_count;
  1521.         uint16_t r2scC_weapons_aiming_screen_bounds_up_pitch_frame_count;
  1522.         // 32
  1523.        
  1524.         // representation 2 sub-cells C sub-board A
  1525.         // r2scCsbA_animations_
  1526.         uint32_t r2scCsbA_animations_entrycount;   // maximum of 55 cells
  1527.         uint32_t r2scCsbA_animations_random_id1;
  1528.         uint32_t r2scCsbA_animations_sig_id;   // value = 0xB46F9D00
  1529.        
  1530.         // representation 2 sub-cells C sub-board B
  1531.         // r2scCsbB_ik_points_
  1532.         uint32_t r2scCsbB_ik_points_entrycount;   // maximum of 4 cells
  1533.         uint32_t r2scCsbB_ik_points_random_id1;
  1534.         uint32_t r2scCsbB_ik_points_sig_id;   // value = 0xD06E9D00
  1535.        
  1536.         // representation 2 sub-cells C sub-board C
  1537.         // r2scCsbC_weapon_types_
  1538.         uint32_t r2scCsbC_weapon_types_entrycount;   // maximum of 16 cells
  1539.         uint32_t r2scCsbC_weapon_types_random_id1;
  1540.         uint32_t r2scCsbC_weapon_types_sig_id;   // value = 0x706F9D00
  1541.        
  1542.        
  1543.     } r2sc_units_weapons;
  1544.    
  1545.     struct antr_r2scCscA {
  1546.         // representation 2 sub-cells C sub-cells A
  1547.         // r2scCscA_animations_
  1548.         uint16_t r2scCscA_animations_animation_sel;
  1549.     } r2sc_units_weapons_animations;
  1550.    
  1551.     struct antr_r2scCscB {
  1552.         // representation 2 sub-cells C sub-cells B
  1553.         // r2scCscB_ik_points_
  1554.         char r2scCscB_ik_points_marker[32];
  1555.         char r2scCscB_ik_points_attach_to_marker[32];
  1556.     }r2sc_units_weapons_ik_points;
  1557.    
  1558.     struct antr_r2scCscC {
  1559.         // representation 2 sub-cells C sub-cells C
  1560.         // r2scCscC_weapon_types_
  1561.         char r2scCscC_weapon_types_label[32];
  1562.         // in cell here: 16 bytes of 0
  1563.        
  1564.         // representation 2 sub-cells C sub-cells C sub-board A
  1565.         // r2scCscCsbA_animations_
  1566.         uint32_t r2scCscCsbA_animations_entrycount;   // maximum of 10 cells
  1567.         uint32_t r2scCscCsbA_animations_random_id1;
  1568.         uint32_t r2scCscCsbA_animations_sig_id;   // value = 0x146F9D00
  1569.     }r2sc_units_weapons_weapon_types;
  1570.    
  1571.     struct antr_r2scCscCscA {
  1572.         // representation 2 sub-cells C sub-cells C sub-cells A
  1573.         // r2scCscCscA_animations_
  1574.         uint16_t r2scCscCscA_animations_animation_sel;
  1575.     }r2sc_units_weapons_weapon_types_animations;
  1576.    
  1577.     // end of representation 2 (units)
  1578.    
  1579.    
  1580.    
  1581.     struct antr_r3c {
  1582.         // representation 3 cells
  1583.         // r3c_weapons_
  1584.         // 16 bytes of 0
  1585.        
  1586.         // representation 3 sub-board A
  1587.         // r3sbA_animations_
  1588.         uint32_t r3sbA_animations_entrycount;   // maximum of 11 cells
  1589.         uint32_t r3sbA_animations_random_id1;
  1590.         uint32_t r3sbA_animations_sig_id;   // value = 0x60729D00
  1591.     }r3c_weapons;
  1592.    
  1593.     struct antr_r3scA {
  1594.         // representation 3 sub-cells A
  1595.         // r3scA_animations_
  1596.         uint16_t r3scA_animations_animation_sel;
  1597.     }r3sc_weapons_animations;
  1598.    
  1599.     struct antr_r4c {
  1600.         // representation 4 cells
  1601.         // r4c_vehicles_
  1602.         // r4c_vehicles_steering_screen_
  1603.         float r4c_vehicles_steering_screen_right_yaw_per_frame_rad;
  1604.         float r4c_vehicles_steering_screen_left_yaw_per_frame_rad;
  1605.         uint16_t r4c_vehicles_steering_screen_right_frame_count;
  1606.         uint16_t r4c_vehicles_steering_screen_left_frame_count;
  1607.         float r4c_vehicles_steering_screen_down_pitch_per_frame_rad;
  1608.         float r4c_vehicles_steering_screen_up_pitch_per_frame_rad;
  1609.         uint16_t r4c_vehicles_steering_screen_down_pitch_frame_count;
  1610.         uint16_t r4c_vehicles_steering_screen_up_pitch_frame_count;
  1611.        
  1612.         // in cell here: 68 bytes of 0
  1613.        
  1614.         // representation 4 sub-board A
  1615.         // r4sbA_animations_
  1616.         uint32_t r4sbA_animations_entrycount;   // maximum of 8 cells
  1617.         uint32_t r4sbA_animations_random_id1;
  1618.         uint32_t r4sbA_animations_sig_id;   // value = 0xFC739D00
  1619.        
  1620.         // representation 4 sub-board B
  1621.         // r4sbB_suspension_animations_
  1622.         uint32_t r4sbB_suspension_animations_entrycount;   // maximum of 8 cells
  1623.         uint32_t r4sbB_suspension_animations_random_id1;
  1624.         uint32_t r4sbB_suspension_animations_sig_id;   // value = 0xB8739D00
  1625.     }r4c_vehicles;
  1626.    
  1627.     struct antr_r4scA {
  1628.         // representation 4 sub-cells A
  1629.         // r4scA_animations_
  1630.         uint16_t r4scA_animations_animation_sel;
  1631.     }r4sc_vehicles_animations;
  1632.    
  1633.     struct antr_r4scB {
  1634.         // representation 4 sub-cells B
  1635.         // r4scB_suspension_animations_
  1636.         uint16_t r4scB_suspension_animations_mass_point_index;
  1637.         uint16_t r4scB_suspension_animations_animation_sel;
  1638.         float r4scB_suspension_animations_full_extension_ground_depth;
  1639.         float r4scB_suspension_animations_full_compression_ground_depth;
  1640.         // in cell here: 8 bytes of 0
  1641.     }r4sc_vehicles_suspension_animations;
  1642.    
  1643.     struct antr_r5c {
  1644.         // representation 5 cells
  1645.         // r5c_devices_
  1646.         // 84 bytes of 0
  1647.        
  1648.         // representation 5 cells sub-board A
  1649.         // r5csbA_animations_
  1650.         uint32_t r5csbA_animations_entrycount;   // maximum of 2 cells
  1651.         uint32_t r5csbA_animations_random_id1;
  1652.         uint32_t r5csbA_animations_sig_id;   // value = 0x08759D00
  1653.     }r5c_devices;
  1654.    
  1655.     struct antr_r5scA {
  1656.         // representation 5 sub-cells A
  1657.         // r5scA_animations_
  1658.         uint16_t r5scA_animations_animation_sel;
  1659.     }r5sc_devices_animations;
  1660.    
  1661.     struct antr_r6c {
  1662.         // representation 6 cells
  1663.         // r6c_unit_damage_
  1664.         uint16_t r6c_unit_damage_animation_sel;
  1665.     }r6c_unit_damage;
  1666.    
  1667.     struct antr_r7c {
  1668.         // representation 7 cells
  1669.         // r7c_first_person_weapons_
  1670.         // 16 bytes of 0
  1671.        
  1672.         // representation 7 cells sub-board A
  1673.         // r7csbA_animations_
  1674.         uint32_t r7csbA_animations_entrycount;   // maximum of 28 cells
  1675.         uint32_t r7csbA_animations_random_id1;
  1676.         uint32_t r7csbA_animations_sig_id;   // value = 0xF4729D00
  1677.        
  1678.     }r7c_first_person_weapons;
  1679.    
  1680.     struct antr_r7scA {
  1681.         // representation 7 sub-cells A
  1682.         // r7scA_animations_
  1683.         uint16_t r7scA_animations_animation_sel;
  1684.     }r7sc_first_person_weapons_animations;
  1685.    
  1686.     struct antr_r8c {
  1687.         // representation 8 cells
  1688.         // r8c_sound_references_
  1689.         // dependency 1: sound
  1690.         // r8c_sound_
  1691.         char r8c_sound_tagclass[5];      //unsigned char[5]
  1692.         uint32_t r8c_sound_tagnamepointer;   //uint32 ("random" number)
  1693.         uint32_t r8c_sound_tagnamestringlength;   //uint32
  1694.         uint32_t r8c_sound_tagid;        //uint32 (0xFFFFFFFF with tags)
  1695.         // char r8c_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  1696.        
  1697.         // in cell here: 4 bytes of 0
  1698.     }r8c_sound_references;
  1699.    
  1700.     // r8c_sound_tagnamestring[255] null-terminated character array strings go here
  1701.    
  1702.     struct antr_r9c {
  1703.         // representation 9 cells
  1704.         // r9c_nodes_
  1705.         char r9c_nodes_name[32];
  1706.         uint16_t r9c_nodes_next_sibling_node_index_sel;
  1707.         uint16_t r9c_nodes_first_child_node_index_sel;
  1708.         uint16_t r9c_nodes_parent_node_index_sel;
  1709.         // in cell here: 2 bytes of 0
  1710.         uint32_t r9c_nodes_node_joint_flags;    //toff 232  32-bit 0x00000007
  1711.         float r9c_nodes_base_vector_i;
  1712.         float r9c_nodes_base_vector_j;
  1713.         float r9c_nodes_base_vector_k;
  1714.         float r9c_nodes_vector_range;
  1715.         // in cell here: 4 bytes of 0
  1716.     }s9c_nodes;
  1717.    
  1718.     struct antr_r10c {
  1719.         // representation 10 cells
  1720.         // r10c_animations_
  1721.         char r10c_animations_name[32];
  1722.         uint16_t r10c_animations_type;
  1723.         uint16_t r10c_animations_frame_count_calc;
  1724.         uint16_t r10c_animations_frame_size;
  1725.         uint16_t r10c_animations_frame_info_type;
  1726.         uint32_t r10c_animations_node_list_checksum;
  1727.         uint16_t r10c_animations_node_count;
  1728.         uint16_t r10c_animations_loop_frame_index;
  1729.         float r10c_animations_weight_frac;
  1730.         uint16_t r10c_animations_key_frame_index;
  1731.         uint16_t r10c_animations_second_key_frame_index;
  1732.         uint16_t r10c_animations_next_animation_sel;
  1733.         // 1
  1734.         uint8_t r10c_animations_flags;  //toff 314  8-bit 0x07
  1735.         uint16_t r10c_animations_sound_sel;
  1736.         uint16_t r10c_animations_sound_frame_index;
  1737.         uint8_t r10c_animations_left_foot_frame_index; // thanks for identifying the type http://stackoverflow.com/a/17744576/2846508
  1738.         uint8_t r10c_animations_right_foot_frame_index; // these int8_t types can be between -128 and 127, the same as in Guerilla, but Nari (Ronson) reports that negative values among the 16-bit entries and these 8-bit entries cause the game to crash
  1739.         uint16_t r10c_animations_INTERNAL_array_entry_id; // offset 66 into cell, incremental +1 number, starts at 0 for first animation cell
  1740.         float r10c_animations_INTERNAL_speed_multiplier; // offset 68 into cell, i'm guessing this is a playback speed multiplier, because it is normally 1
  1741.        
  1742.         // "frame info"
  1743.         // now, this is tricky.
  1744.         // in this "antr blank.model_animations" tag test file, which does not have any animation data, here are the values...
  1745.         // in this "antr blank.model_animations" file, we start here within our first cell at offset 964316 (at the most)
  1746.         // first, a little endian (despite big endian file data) float value of 1 (68 bytes into cell)
  1747.         // second, 8 bytes of 0 (72 bytes into cell)
  1748.         // lastly, what appears to be a board, normally with uint32_t entrycount, uint32_t random number, and uint32_t signature ID.
  1749.         // in this board, we have two random uint32_t's and a signature ID of 0xDC6A9D00 (big endian, as normal)
  1750.         // so the values in the current board are: 0x586A0F00   0xD03F1907   0xDC6A9D00
  1751.         // that concludes this tricky section; I will conduct further tests on this section
  1752.         uint32_t r10c_animations_frame_info; // offset 72 into cell, number of bytes in the frame's information data
  1753.         // offset 76 into cell = 4 bytes of 0
  1754.        
  1755.         // example values at offset 80 into cell:
  1756.         // tag with no animation data:
  1757.         // 586A 0F00   D03F 1907   DC6A 9D00
  1758.         // 586A 0F00   C04C 1907   DC6A 9D00
  1759.         // 586A 0F00   E04D 1907   DC6A 9D00
  1760.         // 586A 0F00   504A 1907   DC6A 9D00
  1761.         // cyborg model animations tag:
  1762.         // A538 0100   88D6 1900   9C00 9E00
  1763.         // 754D 0100   98EA 1900   9C00 9E00
  1764.         // E960 0100   98FE 1900   9C00 9E00
  1765.         // C96B 0100   5808 1A00   9C00 9E00
  1766.         // 150D 0200   30AA 1A00   9C00 9E00
  1767.         // CD0F 0200   78AD 1A00   9C00 9E00
  1768.         // needler first-person animations tag:
  1769.         // 4A16 0000   70CC 1C00   1482 6300
  1770.         // 4A35 0000   F8EB 1C00   1482 6300
  1771.        
  1772.         // basically, what we have here most obviously is this, with 3 uint32_t values in little endian:
  1773.         // first, the offset (after "blam") to the animation data (but not always accurate!). This value increments (always accurately) by adding the number of bytes in the "default data" and "frame data" values for the current value, to result in this value for the next animation cell
  1774.         // by the way, the "frame count" * "frame size" = "frame data" bytes value
  1775.         // second is an essentially-random number
  1776.         // third is the random number for that board or cell, basically just a random number that is repeated for each entry in a particular board or cell
  1777.         uint32_t r10c_animations_INTERNAL_frame_info_data_offset_pointer;
  1778.         uint32_t r10c_animations_INTERNAL_frame_info_data_random1;
  1779.         uint32_t r10c_animations_INTERNAL_frame_info_data_sig_id;
  1780.        
  1781.         // (insert appropriate values for the previous 24 bytes once deciphered)
  1782.         // then...
  1783.        
  1784.         uint32_t r10c_animations_node_translation_flag_data1;   // offset 92
  1785.         uint32_t r10c_animations_node_translation_flag_data2;
  1786.         // in cell here: 8 bytes of 0
  1787.         uint32_t r10c_animations_node_rotation_flag_data1;
  1788.         uint32_t r10c_animations_node_rotation_flag_data2;
  1789.         // in cell here: 8 bytes of 0
  1790.         uint32_t r10c_animations_node_scale_flag_data1;
  1791.         uint32_t r10c_animations_node_scale_flag_data2;
  1792.         // in cell here: 4 bytes of 0
  1793.         uint32_t r10c_animations_offset_to_compressed_data;
  1794.        
  1795.         // more complicated stuff...
  1796.        
  1797.         // default data
  1798.         // (140 bytes into cell)
  1799.         uint32_t r10c_animations_default_data;
  1800.         // in cell here: 4 bytes of 0
  1801.         // board with these values:
  1802.         // 0x586A0F00 (____0F00)   0x204D1907 (____1907)   0x7C6B9D00 (____9D00)
  1803.         uint32_t r10c_animations_INTERNAL_default_data_offset_pointer;
  1804.         uint32_t r10c_animations_INTERNAL_default_data_random1;
  1805.         uint32_t r10c_animations_INTERNAL_default_data_sig_id;
  1806.         // frame data
  1807.         // (160 bytes into cell)
  1808.         uint32_t r10c_animations_frame_data;
  1809.         // in cell here: 4 bytes of 0
  1810.         // board with these values:
  1811.         // 0x586A0F00 (____0F00)   0x00431907 (____1907)   0x6C6B9D00 (____9D00)
  1812.         uint32_t r10c_animations_INTERNAL_frame_data_offset_pointer;
  1813.         uint32_t r10c_animations_INTERNAL_frame_data_random1;
  1814.         uint32_t r10c_animations_INTERNAL_frame_data_sig_id;
  1815.     }r10c_animations;
  1816.    
  1817.     // then comes the animations data, which will need to be handled within the methods rather than here
  1818.     // example data is at offset 80341 in cyborg.model_animations (but this file has animation data offset values that are short by 240 bytes)
  1819.     // 34761 says 288 bytes at offset 80037 (really 80341) with random number 58401800 and sig ID 3C019E00
  1820.     // 34781 says 5040 bytes at offset 80325 (really 80629) with random number B8D61900 and sig ID 2C019E00
  1821.    
  1822. } type_meta_antr;
  1823.  
  1824. #pragma mark -- bipd
  1825.  
  1826. typedef struct {
  1827.     // OBJE DATA 1 START
  1828.     uint16_t INTERNAL_obje_index;   // 0 (little endian)
  1829.     // 66, 1
  1830.     uint8_t flags;  //toff 66   8-bit 0x0F
  1831.     float bounding_radius;
  1832.     float bounding_offset_x;
  1833.     float bounding_offset_y;
  1834.     float bounding_offset_z;
  1835.     float origin_offset_x;
  1836.     float origin_offset_y;
  1837.     float origin_offset_z;
  1838.     float acceleration_scale;
  1839.     // offset 100 = 4 bytes of 0
  1840.    
  1841.     // dependency 1: model mod2
  1842.     char model_tagclass[5];      //unsigned char[5]
  1843.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  1844.     uint32_t model_tagnamestringlength;   //uint32
  1845.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  1846.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  1847.    
  1848.     // dependency 2: animation graph antr
  1849.     char animation_graph_tagclass[5];        //unsigned char[5]
  1850.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  1851.     uint32_t animation_graph_tagnamestringlength;   //uint32
  1852.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  1853.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  1854.    
  1855.     // offset 136 = 40 bytes of 0
  1856.    
  1857.     // dependency 3: collision model coll
  1858.     char collision_model_tagclass[5];        //unsigned char[5]
  1859.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  1860.     uint32_t collision_model_tagnamestringlength;   //uint32
  1861.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  1862.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  1863.    
  1864.     // dependency 4: physics phys
  1865.     char physics_tagclass[5];        //unsigned char[5]
  1866.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  1867.     uint32_t physics_tagnamestringlength;   //uint32
  1868.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  1869.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  1870.    
  1871.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  1872.     char modifier_shader_tagclass[5];        //unsigned char[5]
  1873.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  1874.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  1875.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  1876.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  1877.    
  1878.     // dependency 6: creation effect effe
  1879.     char creation_effect_tagclass[5];        //unsigned char[5]
  1880.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  1881.     uint32_t creation_effect_tagnamestringlength;   //uint32
  1882.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  1883.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  1884.    
  1885.     // offset 240 = 84 bytes of 0
  1886.    
  1887.     float render_bounding_radius;
  1888.    
  1889.     uint16_t export_to_functions_a_in;
  1890.     uint16_t export_to_functions_b_in;
  1891.     uint16_t export_to_functions_c_in;
  1892.     uint16_t export_to_functions_d_in;
  1893.    
  1894.     // offset 336 = 44 bytes of 0
  1895.    
  1896.     uint16_t export_to_functions_hud_text_message_index;
  1897.     uint16_t export_to_functions_forced_shader_permutation_index;
  1898.    
  1899.     // representation 1 board, offset 384
  1900.     // r1b_attachments_
  1901.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  1902.     uint32_t r1b_attachments_random_id;
  1903.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  1904.    
  1905.     // representation 2 board, offset 396
  1906.     // r2b_widgets_
  1907.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  1908.     uint32_t r2b_widgets_random_id;
  1909.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  1910.    
  1911.     // representation 3 board, offset 408
  1912.     // r3b_functions_
  1913.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  1914.     uint32_t r3b_functions_random_id;
  1915.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  1916.    
  1917.     // representation 4 board, offset 420
  1918.     // r4b_change_colors_
  1919.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  1920.     uint32_t r4b_change_colors_random_id;
  1921.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  1922.    
  1923.     // representation 5 board, offset 432
  1924.     // r5b_predicted_resources_
  1925.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  1926.     uint32_t r5b_predicted_resources_random_id;
  1927.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  1928.    
  1929.     // OBJE DATA 1 END
  1930.    
  1931.     // unit_
  1932.     uint32_t unit_flags;    // toff 444 (filled already)    0x01FFFFFF
  1933.     uint16_t unit_default_team;
  1934.     uint16_t unit_constant_sound_volume;
  1935.     float unit_rider_damage_fraction;
  1936.    
  1937.     // dependency 7: unit_integrated_light_toggle_ effe
  1938.     char unit_integrated_light_toggle_tagclass[5];       //unsigned char[5]
  1939.     uint32_t unit_integrated_light_toggle_tagnamepointer;   //uint32 ("random" number)
  1940.     uint32_t unit_integrated_light_toggle_tagnamestringlength;   //uint32
  1941.     uint32_t unit_integrated_light_toggle_tagid;         //uint32 (0xFFFFFFFF with tags)
  1942.     // char unit_integrated_light_toggle_tagnamestring[255];
  1943.    
  1944.     uint16_t unit_a_in;
  1945.     uint16_t unit_b_in;
  1946.     uint16_t unit_c_in;
  1947.     uint16_t unit_d_in;
  1948.    
  1949.     float unit_camera_field_of_view_rad;
  1950.     float unit_camera_stiffness;
  1951.     char unit_camera_marker_name[32];
  1952.     char unit_camera_submerged_marker_name[32];
  1953.    
  1954.     float unit_pitch_auto_level_rad;
  1955.     float unit_pitch_range_from_rad;
  1956.     float unit_pitch_range_to_rad;
  1957.    
  1958.     // representation 6 board, offset 564
  1959.     // r6b_unit_camera_tracks_
  1960.     uint32_t r6b_unit_camera_tracks_entrycount; // maximum of 2 cells
  1961.     uint32_t r6b_unit_camera_tracks_random_id;
  1962.     uint32_t r6b_unit_camera_tracks_sig_id; // example value = 0xFC579D00
  1963.    
  1964.     float unit_seat_acceleration_scale_i;
  1965.     float unit_seat_acceleration_scale_j;
  1966.     float unit_seat_acceleration_scale_k;
  1967.    
  1968.     // offset 588 = 12 bytes of 0
  1969.    
  1970.     float unit_soft_ping_threhold_frac;
  1971.     float unit_soft_ping_interrupt_time;
  1972.     float unit_hard_ping_threshold_frac;
  1973.     float unit_hard_ping_interrupt_time;
  1974.     float unit_hard_death_threshold_frac;
  1975.     float unit_feign_death_threshold_frac;
  1976.     float unit_feign_death_time;
  1977.     float unit_distance_of_evade_animation;
  1978.     float unit_distance_of_dive_animation;
  1979.     // offset 636 = 4 bytes of 0
  1980.     float unit_stunned_movement_threshold_frac;
  1981.     float unit_feign_death_chance_frac;
  1982.     float unit_feign_repeat_chance_frac;
  1983.    
  1984.     // dependency 8: unit_spawned_actor_ actv
  1985.     char unit_spawned_actor_tagclass[5];         //unsigned char[5]
  1986.     uint32_t unit_spawned_actor_tagnamepointer;   //uint32 ("random" number)
  1987.     uint32_t unit_spawned_actor_tagnamestringlength;   //uint32
  1988.     uint32_t unit_spawned_actor_tagid;       //uint32 (0xFFFFFFFF with tags)
  1989.     // char unit_spawned_actor_tagnamestring[255];
  1990.    
  1991.     uint16_t unit_spawned_actor_count_from;
  1992.     uint16_t unit_spawned_actor_count_to;
  1993.    
  1994.     float unit_spawned_velocity;
  1995.     float unit_aiming_velocity_maximum_rad;
  1996.     float unit_aiming_acceleration_maximum_rad;
  1997.     float unit_casual_aiming_modifier_frac;
  1998.     float unit_looking_velocity_maximum_rad;
  1999.     float unit_looking_acceleration_maximum_rad;
  2000.    
  2001.     // offset 696 = 8 bytes of 0
  2002.    
  2003.     float unit_ai_vehicle_radius;
  2004.     float unit_ai_danger_radius;
  2005.    
  2006.     // dependency 8: unit_melee_damage_ jpt!
  2007.     char unit_melee_damage_tagclass[5];      //unsigned char[5]
  2008.     uint32_t unit_melee_damage_tagnamepointer;   //uint32 ("random" number)
  2009.     uint32_t unit_melee_damage_tagnamestringlength;   //uint32
  2010.     uint32_t unit_melee_damage_tagid;        //uint32 (0xFFFFFFFF with tags)
  2011.     // char unit_melee_damage_tagnamestring[255];
  2012.    
  2013.     uint16_t unit_motion_sensor_blip_size;
  2014.    
  2015.     // offset 730 = 14 bytes of 0
  2016.    
  2017.     // representation 7 board, offset 744
  2018.     // r7b_unit_new_hud_interfaces_
  2019.     uint32_t r7b_unit_new_hud_interfaces_entrycount; // maximum of 2 cells
  2020.     uint32_t r7b_unit_new_hud_interfaces_random_id;
  2021.     uint32_t r7b_unit_new_hud_interfaces_sig_id; // example value = 0xA4579D00
  2022.    
  2023.     // representation 8 board, offset 756
  2024.     // r8b_unit_dialogue_variants_
  2025.     uint32_t r8b_unit_dialogue_variants_entrycount; // maximum of 16 cells
  2026.     uint32_t r8b_unit_dialogue_variants_random_id;
  2027.     uint32_t r8b_unit_dialogue_variants_sig_id; // example value = 0xA85A9D00
  2028.    
  2029.     float unit_grenade_velocity;
  2030.     uint16_t unit_grenade_type;
  2031.     uint16_t unit_grenade_count;
  2032.    
  2033.     // offset 776 = 4 bytes of 0
  2034.    
  2035.     // representation 9 board, offset 780
  2036.     // r9b_unit_powered_seats_
  2037.     uint32_t r9b_unit_powered_seats_entrycount; // maximum of 2 cells
  2038.     uint32_t r9b_unit_powered_seats_random_id;
  2039.     uint32_t r9b_unit_powered_seats_sig_id; // example value = 0x345A9D00
  2040.    
  2041.     // representation 10 board, offset 792
  2042.     // r10b_unit_weapons_
  2043.     uint32_t r10b_unit_weapons_entrycount; // maximum of 4 cells
  2044.     uint32_t r10b_unit_weapons_random_id;
  2045.     uint32_t r10b_unit_weapons_sig_id; // example value = 0xC4599D00
  2046.    
  2047.     // representation 11 board, offset 804
  2048.     // r11b_unit_seats_
  2049.     uint32_t r11b_unit_seats_entrycount; // maximum of 16 cells
  2050.     uint32_t r11b_unit_seats_random_id;
  2051.     uint32_t r11b_unit_seats_sig_id; // example value = 0x68599D00
  2052.    
  2053.     float biped_moving_turning_speed_rad;
  2054.     uint32_t biped_flags;   //toff 820  32-bit 0x00001FFF
  2055.     float biped_stationary_turning_threshold_rad;
  2056.    
  2057.     // offset 828 = 16 bytes of 0
  2058.    
  2059.     uint16_t biped_a_in;
  2060.     uint16_t biped_b_in;
  2061.     uint16_t biped_c_in;
  2062.     uint16_t biped_d_in;
  2063.    
  2064.     // dependency 9: biped_do_not_use_ jpt!
  2065.     char biped_do_not_use_tagclass[5];       //unsigned char[5]
  2066.     uint32_t biped_do_not_use_tagnamepointer;   //uint32 ("random" number)
  2067.     uint32_t biped_do_not_use_tagnamestringlength;   //uint32
  2068.     uint32_t biped_do_not_use_tagid;         //uint32 (0xFFFFFFFF with tags)
  2069.     // char biped_do_not_use_tagnamestring[255];
  2070.    
  2071.     float biped_flying_bank_angle_rad;
  2072.     float biped_flying_bank_apply_time;
  2073.     float biped_flying_bank_decay_time;
  2074.     float biped_flying_pitch_ratio;
  2075.     float biped_flying_max_velocity;
  2076.     float biped_flying_max_sidestep_velocity;
  2077.     float biped_flying_acceleration;
  2078.     float biped_flying_deceleration;
  2079.     float biped_flying_angular_velocity_maximum_rad;
  2080.     float biped_flying_angular_acceleration_maximum;
  2081.     float biped_flying_crouch_velocity_modifier_frac;
  2082.     // offset 912 = 8 bytes of 0
  2083.    
  2084.     float biped_movement_maximum_slope_angle_rad;
  2085.     float biped_movement_downhill_falloff_angle_rad;
  2086.     float biped_movement_downhill_cutoff_angle_rad;
  2087.     float biped_movement_downhill_velocity_scale;
  2088.     float biped_movement_uphill_falloff_angle_rad;
  2089.     float biped_movement_uphill_cutoff_angle_rad;
  2090.     float biped_movement_uphill_velocity_scale;
  2091.    
  2092.     // offset 948 = 24 bytes of 0
  2093.    
  2094.     // dependency 10: biped_movement_footsteps_ foot
  2095.     char biped_movement_footsteps_tagclass[5];       //unsigned char[5]
  2096.     uint32_t biped_movement_footsteps_tagnamepointer;   //uint32 ("random" number)
  2097.     uint32_t biped_movement_footsteps_tagnamestringlength;   //uint32
  2098.     uint32_t biped_movement_footsteps_tagid;         //uint32 (0xFFFFFFFF with tags)
  2099.     // char biped_movement_footsteps_tagnamestring[255];
  2100.    
  2101.     // offset 988 = 24 bytes of 0
  2102.    
  2103.     float biped_jumping_and_landing_jump_velocity;
  2104.    
  2105.     // offset 1016 = 28 bytes of 0
  2106.    
  2107.     float biped_jumping_and_landing_maximum_soft_landing_time;
  2108.     float biped_jumping_and_landing_maximum_hard_landing_time;
  2109.     float biped_jumping_and_landing_minimum_soft_landing_velocity;
  2110.     float biped_jumping_and_landing_minimum_hard_landing_velocity;
  2111.     float biped_jumping_and_landing_death_hard_landing_velocity;
  2112.    
  2113.     // offset 1068 = 20 (24 when compiled! (edit: nope!)) bytes of 0
  2114.    
  2115.     float biped_camera_collision_and_autoaim_standing_camera_height;
  2116.     float biped_camera_collision_and_autoaim_crouching_camera_height;
  2117.     float biped_camera_collision_and_autoaim_crouch_transition_time;
  2118.    
  2119.     // offset 1100 = 24 bytes of 0
  2120.    
  2121.     float biped_camera_collision_and_autoaim_standing_collision_height;
  2122.     float biped_camera_collision_and_autoaim_crouching_collision_height;
  2123.     float biped_camera_collision_and_autoaim_collision_radius;
  2124.    
  2125.     // offset 1136 = 40 bytes of 0
  2126.    
  2127.     float biped_camera_collision_and_autoaim_autoaim_width;
  2128.    
  2129.     // ! decipher
  2130.     // offset 1180 = 108 bytes of 0
  2131.     // offset 1288 = 5 float values in little endian (internal use):
  2132.     // 1 1 1 0x00000080("-0") 0x00000080("-0")
  2133.     // offset 1308 = 8 bytes of 0
  2134.     // offset 1316 = int32_t value of -1 (0xFFFFFFFF)
  2135.     // ! end
  2136.    
  2137.     // deciphering:
  2138.     // there are 8 float values which are populated at least during map compilation
  2139.     // example data from sbscbeach_12 at offset 326003224:
  2140.     // 0000003F   ABAA2A3E   F304353F   431DAFBE   F30435BF   431DAF3E   F304353F   00000C00
  2141.     // which means:
  2142.     // 0.5    0.166667   0.707107   -0.34202   -0.707107   0.34202    0.707107   1.10203E-39 (or 3072 in big endian)
  2143.     // these looked like coordinates, however, during testing, this is what I am finding:
  2144.     // these values affect first-person camera behavior, not the behavior of the third-person model; the footstep sounds are related to the third-person model
  2145.    
  2146.     // value 1: setting to <0 prevents the footstep turning sound; setting to >1 makes the footstep turning sound constant (not sure why, since the third-person model is what affects footstep sounds) [moment scale?] [foot gravity multiplier?] [foot weight (as in, percentage weight, 0-1)?] *[ground normal k0]*
  2147.     // value 2: snaps crouching camera movement [fp camera crouching velocity, 0-1], affects player speed (so you could set this to 0 and be crouching in third-person view but be able to move at running speed)
  2148.     // value 3: physics: [relative ground depth?] (can be used for legit walking on walls (negative value) or floating (>0.707107)) *[ground normal k1]*
  2149.     // value 4: unknown (related to water/air?) [water/air acceleration multiplier?]
  2150.     // value 5: unknown [water/air normal k1?] (water depth?)
  2151.     // value 6: [ground acceleration modifier] (0 and 1 = default) (-1 to 1) (negative values keep speed at minimum, higher values reach maximum speed) [foot weight] (how heavy the feet are)
  2152.     // value 7: (similar effect as value 6)
  2153.     // value 8: unknown [mass? then unused] (default value is -1, 0xFFFFFFFF)
  2154.     // end of deciphering
  2155.    
  2156.     // representation 12 board, offset 1320
  2157.     // r12b_biped_contact_points_
  2158.     uint32_t r12b_biped_contact_points_entrycount; // maximum of 2 cells
  2159.     uint32_t r12b_biped_contact_points_random_id;
  2160.     uint32_t r12b_biped_contact_points_sig_id; // example value = 0xC4539D00
  2161.    
  2162.     // offset 1332 is the null-terminated tag pathname strings
  2163.    
  2164.     // OBJE DATA 2 START
  2165.    
  2166.     struct bipd_r1c {
  2167.         // representation 1 cells
  2168.         // r1c_attachments_
  2169.        
  2170.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  2171.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  2172.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  2173.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  2174.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  2175.         // char r1c_attachments_type_tagnamestring[255];
  2176.        
  2177.         char r1c_attachments_marker[32];
  2178.         uint16_t r1c_attachments_primary_scale;
  2179.         uint16_t r1c_attachments_secondary_scale;
  2180.         uint16_t r1c_attachments_change_color;
  2181.        
  2182.         // in cell here: 18 bytes of 0
  2183.        
  2184.     }r1c_attachments;
  2185.    
  2186.     // r1c 1 tag name strings here
  2187.    
  2188.     struct bipd_r2c {
  2189.         // representation 2 cells
  2190.         // r2c_widgets_
  2191.        
  2192.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  2193.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  2194.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  2195.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  2196.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  2197.         // char r2c_widgets_reference_tagnamestring[255];
  2198.        
  2199.         // in cell here: 16 bytes of 0
  2200.     }r2c_widgets;
  2201.    
  2202.     // r2c 1 tag name strings here
  2203.    
  2204.     struct bipd_r3c {
  2205.         // representation 3 cells
  2206.         // r3c_functions_
  2207.        
  2208.         uint32_t r3c_functions_flags;   // toff 1332    32-bit 0x00000007
  2209.         float r3c_functions_period;
  2210.         uint16_t r3c_functions_scale_period_by;
  2211.         uint16_t r3c_functions_function;
  2212.         uint16_t r3c_functions_scale_function_by;
  2213.         uint16_t r3c_functions_wobble_function;
  2214.         float r3c_functions_wobble_period;
  2215.         float r3c_functions_wobble_magnitude;
  2216.         float r3c_functions_square_wave_threshold_frac;
  2217.         uint16_t r3c_functions_step_count;
  2218.         uint16_t r3c_functions_map_to;
  2219.         uint16_t r3c_functions_sawtooth_count;
  2220.         uint16_t r3c_functions_add;
  2221.         uint16_t r3c_functions_scale_result_by;
  2222.         uint16_t r3c_functions_bounds_mode;
  2223.         float r3c_functions_bounds_from_frac;
  2224.         float r3c_functions_bounds_to_frac;
  2225.         // in cell here: 6 bytes of 0
  2226.         uint16_t r3c_functions_turn_off_with_sel;
  2227.         float r3c_functions_scale_by;
  2228.         // in cell here: 268 bytes of 0 (reminiscent of the pre-padding of other times strings come after cells)
  2229.         char r3c_functions_usage[32];
  2230.        
  2231.     }r3c_functions;
  2232.    
  2233.     struct bipd_r4c {
  2234.         // representation 4 cells
  2235.         // r4c_change_colors_
  2236.         uint16_t r4c_change_colors_darken_by;
  2237.         uint16_t r4c_change_colors_scale_by;
  2238.         uint32_t r4c_change_colors_scale_flags; //toff 1696 32-bit 0x00000003
  2239.         float r4c_change_colors_color_lower_bound_r_frac;
  2240.         float r4c_change_colors_color_lower_bound_g_frac;
  2241.         float r4c_change_colors_color_lower_bound_b_frac;
  2242.         float r4c_change_colors_color_upper_bound_r_frac;
  2243.         float r4c_change_colors_color_upper_bound_g_frac;
  2244.         float r4c_change_colors_color_upper_bound_b_frac;
  2245.        
  2246.         // representation 4 sub-board A
  2247.         // r4sbA_permutations_
  2248.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  2249.         uint32_t r4sbA_permutations_random_id1;
  2250.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  2251.     }r4c_change_colors;
  2252.    
  2253.     struct bipd_r4scA
  2254.     {
  2255.         // representation 4 sub-cells A
  2256.         // r4scA_permutations_
  2257.         float r4scA_permutations_weight_frac;
  2258.         float r4scA_permutations_color_lower_bound_r_frac;
  2259.         float r4scA_permutations_color_lower_bound_g_frac;
  2260.         float r4scA_permutations_color_lower_bound_b_frac;
  2261.         float r4scA_permutations_color_upper_bound_r_frac;
  2262.         float r4scA_permutations_color_upper_bound_g_frac;
  2263.         float r4scA_permutations_color_upper_bound_b_frac;
  2264.     }r4sc_change_colors_permutations;
  2265.    
  2266.     struct bipd_r5c {
  2267.         // representation 5 cells
  2268.         // r5c_predicted_resources_
  2269.         uint16_t r5c_predicted_resources_type;
  2270.         uint16_t r5c_predicted_resources_resource_index;
  2271.         uint32_t r5c_predicted_resources_tag_index;
  2272.     }r5c_predicted_resources;
  2273.    
  2274.     // OBJE DATA 2 END
  2275.    
  2276.     // dependency 7 unit_integrated_light_toggle_tagnamestring goes here
  2277.    
  2278.     struct bipd_r6c {
  2279.         // representation 6 cells
  2280.         // r6c_camera_tracks_
  2281.        
  2282.         // dependency r6c 1: r6c_camera_tracks_track_ trak
  2283.         char r6c_camera_tracks_track_tagclass[5];        //unsigned char[5]
  2284.         uint32_t r6c_camera_tracks_track_tagnamepointer;   //uint32 ("random" number)
  2285.         uint32_t r6c_camera_tracks_track_tagnamestringlength;   //uint32
  2286.         uint32_t r6c_camera_tracks_track_tagid;      //uint32 (0xFFFFFFFF with tags)
  2287.         // char r6c_camera_tracks_track_tagnamestring[255];
  2288.        
  2289.         // in cell here: 12 bytes of 0
  2290.        
  2291.     }r6c_unit_camera_tracks;
  2292.    
  2293.     // r6c 1 tagnamestrings go here
  2294.    
  2295.     // dependency 8 tagnamestring goes here
  2296.    
  2297.     // dependency 9 tagnamestring goes here
  2298.    
  2299.     struct bipd_r7c {
  2300.         // representation 7 cells
  2301.         // r7c_new_hud_interfaces_
  2302.        
  2303.         // dependency r7c 1: r7c_new_hud_interfaces_unit_hud_interface_ unhi
  2304.         char r7c_new_hud_interfaces_unit_hud_interface_tagclass[5];      //unsigned char[5]
  2305.         uint32_t r7c_new_hud_interfaces_unit_hud_interface_tagnamepointer;   //uint32 ("random" number)
  2306.         uint32_t r7c_new_hud_interfaces_unit_hud_interface_tagnamestringlength;   //uint32
  2307.         uint32_t r7c_new_hud_interfaces_unit_hud_interface_tagid;        //uint32 (0xFFFFFFFF with tags)
  2308.         // char r7c_new_hud_interfaces_unit_hud_interface_tagnamestring[255];
  2309.        
  2310.         // in cell here: 32 bytes of 0
  2311.        
  2312.     }r7c_unit_new_hud_interfaces;
  2313.    
  2314.     // r7c 1 tagnamestrings here
  2315.    
  2316.     struct bipd_r8c {
  2317.         // representation 8 cells
  2318.         // r8c_dialogue_variants_
  2319.         uint16_t r8c_dialogue_variants_variant_number;
  2320.        
  2321.         // in cell here: 6 bytes of 0
  2322.        
  2323.         // dependency r8c 1: r8c_dialogue_variants_dialogue_ udlg
  2324.         char r8c_dialogue_variants_dialogue_tagclass[5];         //unsigned char[5]
  2325.         uint32_t r8c_dialogue_variants_dialogue_tagnamepointer;   //uint32 ("random" number)
  2326.         uint32_t r8c_dialogue_variants_dialogue_tagnamestringlength;   //uint32
  2327.         uint32_t r8c_dialogue_variants_dialogue_tagid;       //uint32 (0xFFFFFFFF with tags)
  2328.         // char r8c_dialogue_variants_dialogue_tagnamestring[255];
  2329.     }r8c_unit_dialogue_variants;
  2330.    
  2331.     // r8c 1 tagnamestrings here
  2332.    
  2333.     struct bipd_r9c {
  2334.         // representation 9 cells
  2335.         // r9c_powered_seats_
  2336.        
  2337.         // in cell here: 4 bytes of 0
  2338.        
  2339.         float r9c_powered_seats_driver_powerup_time;
  2340.         float r9c_powered_seats_driver_powerdown_time;
  2341.        
  2342.         // in cell here: 56 bytes of 0
  2343.     }r9c_unit_powered_seats;
  2344.    
  2345.     struct bipd_r10c {
  2346.         // representation 10 cells
  2347.         // r10c_weapons_
  2348.        
  2349.         // dependency r10c 1: r10c_weapons_weapon_ weap
  2350.         char r10c_weapons_weapon_tagclass[5];        //unsigned char[5]
  2351.         uint32_t r10c_weapons_weapon_tagnamepointer;   //uint32 ("random" number)
  2352.         uint32_t r10c_weapons_weapon_tagnamestringlength;   //uint32
  2353.         uint32_t r10c_weapons_weapon_tagid;      //uint32 (0xFFFFFFFF with tags)
  2354.         // char r10c_weapons_weapon_tagnamestring[255];
  2355.        
  2356.         // in cell here: 20 bytes of 0
  2357.     }r10c_unit_weapons;
  2358.    
  2359.     // r10c tagnamestrings here
  2360.    
  2361.     struct bipd_r11c {
  2362.         // representation 11 cells
  2363.         // r11c_seats_
  2364.        
  2365.         uint32_t r11c_seats_flags;  // toff 1736    32-bit 0x000007FF
  2366.         char r11c_seats_label[32];
  2367.         char r11c_seats_marker_name[32];
  2368.         // in cell here: 32 bytes of 0
  2369.        
  2370.         float r11c_seats_acceleration_scale_i;
  2371.         float r11c_seats_acceleration_scale_j;
  2372.         float r11c_seats_acceleration_scale_k;
  2373.        
  2374.         // in cell here: 12 bytes of 0
  2375.        
  2376.         float r11c_seats_yaw_rate;
  2377.         float r11c_seats_pitch_rate;
  2378.        
  2379.         char r11c_seats_camera_marker_name[32];
  2380.         char r11c_seats_camera_submerged_marker_name[32];
  2381.        
  2382.         float r11c_seats_pitch_auto_level_rad;
  2383.         float r11c_seats_pitch_range_from_rad;
  2384.         float r11c_seats_pitch_range_to_rad;
  2385.        
  2386.         // representation 11 sub-board A
  2387.         // r11sbA_camera_tracks_
  2388.         uint32_t r11sbA_camera_tracks_entrycount;   // maximum of 2 cells
  2389.         uint32_t r11sbA_camera_tracks_random_id1;
  2390.         uint32_t r11sbA_camera_tracks_sig_id;   // example value = 0xFC579D00
  2391.        
  2392.         // representation 11 sub-board B
  2393.         // r11sbB_unit_hud_interface_
  2394.         uint32_t r11sbB_unit_hud_interface_entrycount;   // maximum of 2 cells
  2395.         uint32_t r11sbB_unit_hud_interface_random_id1;
  2396.         uint32_t r11sbB_unit_hud_interface_sig_id;   // example value = 0xA4579D00
  2397.        
  2398.         // in cell here: 4 bytes of 0
  2399.        
  2400.         uint16_t r11c_seats_hud_text_message_index;
  2401.        
  2402.         // in cell here: 2 bytes of 0
  2403.        
  2404.         float r11c_seats_yaw_minimum_rad;
  2405.         float r11c_seats_yaw_maximum_rad;
  2406.        
  2407.         // dependency r11c 1: r11c_seats_built_in_gunner_ actv
  2408.         char r11c_seats_built_in_gunner_tagclass[5];         //unsigned char[5]
  2409.         uint32_t r11c_seats_built_in_gunner_tagnamepointer;   //uint32 ("random" number)
  2410.         uint32_t r11c_seats_built_in_gunner_tagnamestringlength;   //uint32
  2411.         uint32_t r11c_seats_built_in_gunner_tagid;       //uint32 (0xFFFFFFFF with tags)
  2412.         // char r11c_seats_built_in_gunner_tagnamestring[255];
  2413.        
  2414.         // in cell here: 20 bytes of 0
  2415.        
  2416.     }r11c_unit_seats;
  2417.    
  2418.     // this is a little different from usual, it seems they wanted to have variable-size structs here with the biped unit seats' sub-cells, but they are still not embedded, just grouped together differently. The offset for this in the test bipd.biped tag file is 18371, each container as 220 (variable) bytes, so 3520 bytes total, up to offset 21891:
  2419.    
  2420.     struct bipd_r11sc {
  2421.         // representation 11 sub-cells grouping container (unusual)
  2422.         struct bipd_r11scA {
  2423.             // representation 11 sub-cells A
  2424.             // r11scA_camera_tracks_
  2425.            
  2426.             // dependency r11scA 1: r11scA_camera_tracks_track_ trak
  2427.             char r11scA_camera_tracks_track_tagclass[5];         //unsigned char[5]
  2428.             uint32_t r11scA_camera_tracks_track_tagnamepointer;   //uint32 ("random" number)
  2429.             uint32_t r11scA_camera_tracks_track_tagnamestringlength;   //uint32
  2430.             uint32_t r11scA_camera_tracks_track_tagid;       //uint32 (0xFFFFFFFF with tags)
  2431.             // char r11scA_camera_tracks_track_tagnamestring[255];
  2432.            
  2433.             // in cell here: 12 bytes of 0
  2434.            
  2435.         }r11scA_seats_camera_tracks;
  2436.        
  2437.         // r11scA 1 tagnamestrings here
  2438.        
  2439.         struct bipd_r11scB {
  2440.             // representation 11 sub-cells B
  2441.             // r11scB_unit_hud_interface_
  2442.            
  2443.             // dependency r11scB 1: r11scB_unit_hud_interface_unit_hud_interface_ unhi
  2444.             char r11scB_unit_hud_interface_unit_hud_interface_tagclass[5];       //unsigned char[5]
  2445.             uint32_t r11scB_unit_hud_interface_unit_hud_interface_tagnamepointer;   //uint32 ("random" number)
  2446.             uint32_t r11scB_unit_hud_interface_unit_hud_interface_tagnamestringlength;   //uint32
  2447.             uint32_t r11scB_unit_hud_interface_unit_hud_interface_tagid;         //uint32 (0xFFFFFFFF with tags)
  2448.             // char r11scB_unit_hud_interface_unit_hud_interface_tagnamestring[255];
  2449.            
  2450.             // in cell here: 32 bytes of 0
  2451.            
  2452.         }r11scB_seats_unit_hud_interface;
  2453.        
  2454.         // r11scB 1 tagnamestrings here
  2455.        
  2456.         // dependency r11c 1 r11c_seats_built_in_gunner_tagnamestring here
  2457.     }r11sc_container;
  2458.    
  2459.     // dependency 9 biped_do_not_use_tagnamestring here
  2460.     // dependency 10 biped_movement_footsteps_tagnamestring here
  2461.    
  2462.     struct bipd_r12c {
  2463.         // representation 12 cells
  2464.         // r12c_contact_points_
  2465.        
  2466.         // in cell here: 32 bytes of 0
  2467.         char r12c_contact_points_marker_name[32];
  2468.        
  2469.     }r12c_biped_contact_points;
  2470.    
  2471. } type_meta_bipd;
  2472.  
  2473. #pragma mark -- bitm
  2474.  
  2475. typedef struct {
  2476.     uint16_t type;
  2477.     uint16_t format;
  2478.     uint16_t usage;
  2479.     // 70, 1
  2480.     uint8_t usage_flags;    // toff 70  8-bit 0x0F
  2481.    
  2482.     float post_processing_detail_fade_factor_frac;
  2483.     float post_processing_sharpen_amount_frac;
  2484.     float post_processing_bump_height_frac;
  2485.    
  2486.     uint16_t sprite_processing_sprite_budget_size;
  2487.     uint16_t sprite_processing_sprite_budget_count;
  2488.    
  2489.     uint16_t color_plate_color_plate_width;
  2490.     uint16_t color_plate_color_plate_height;
  2491.    
  2492.     uint32_t color_plate_compressed_color_plate_data;
  2493.     // offset 96 = 4 bytes of 0
  2494.     // little endian internal board values:
  2495.     uint32_t color_plate_INTERNAL_compressed_color_plate_data_offset_pointer;   // example value = 108
  2496.     uint32_t color_plate_INTERNAL_compressed_color_plate_data_random1;
  2497.     uint32_t color_plate_INTERNAL_compressed_color_plate_data_sig_id;   // example value = 0x04689D00
  2498.    
  2499.     uint32_t processed_pixel_data;
  2500.     // offset 116 = 4 bytes of 0
  2501.     // little endian internal board values:
  2502.     uint32_t processed_pixel_data_INTERNAL_processed_pixel_data_offset_pointer;   // example value = 35631
  2503.     uint32_t processed_pixel_data_INTERNAL_processed_pixel_data_random1;
  2504.     uint32_t processed_pixel_data_INTERNAL_processed_pixel_data_sig_id;   // example value = 0xF4679D00
  2505.    
  2506.     float miscellaneous_blur_filter_size;
  2507.     float miscellaneous_alpha_bias;
  2508.     uint16_t miscellaneous_mipmap_count;
  2509.    
  2510.     uint16_t more_sprite_processing_sprite_usage;
  2511.     uint16_t more_sprite_processing_sprite_spacing;
  2512.    
  2513.     // offset 146 = 2 bytes of 0
  2514.    
  2515.     // representation 1 board, offset 148
  2516.     // r1b_sequences_
  2517.     uint32_t r1b_sequences_entrycount; // maximum of 256 cells
  2518.     uint32_t r1b_sequences_random_id;
  2519.     uint32_t r1b_sequences_sig_id; // example value = 0x10679D00
  2520.    
  2521.     // representation 2 board, offset 160
  2522.     // r2b_bitmaps_
  2523.     uint32_t r2b_bitmaps_entrycount; // maximum of 2048 cells
  2524.     uint32_t r2b_bitmaps_random_id;
  2525.     uint32_t r2b_bitmaps_sig_id; // example value = 0x00669D00
  2526.    
  2527.     // offset 172 is the start of the compressed color plate data
  2528.     // directly after that is the processed pixel data (in this example case, in a8r8g8b8)
  2529.     // 172 + color_plate_compressed_color_plate_data + processed_pixel_data = offset of continued metadata
  2530.     // in this example, it's 172 + 363203, so offset 363375
  2531.    
  2532.     struct bitm_r1c {
  2533.         // representation 1 cells
  2534.         // r1c_sequences_
  2535.        
  2536.         char r1c_sequences_name[32];
  2537.         uint16_t r1c_sequences_first_bitmap_index;
  2538.         uint16_t r1c_sequences_bitmap_count;
  2539.        
  2540.         // in cell here: 16 bytes of 0
  2541.        
  2542.         // representation 1 sub-board A
  2543.         // r1sbA_sprites_
  2544.         uint32_t r1sbA_sprites_entrycount; // maximum of 64 cells
  2545.         uint32_t r1sbA_sprites_random_id;
  2546.         uint32_t r1sbA_sprites_sig_id; // example value = 0x9C669D00
  2547.        
  2548.     }r1c_sequences;
  2549.    
  2550.     struct bitm_r1scA {
  2551.         // representation 1 sub-cells A
  2552.         // r1scA_sprites_
  2553.         uint16_t r1scA_sprites_bitmap_index;
  2554.         // in cell here: 6 bytes of 0
  2555.         float r1scA_sprites_left;
  2556.         float r1scA_sprites_right;
  2557.         float r1scA_sprites_top;
  2558.         float r1scA_sprites_bottom;
  2559.         float r1scA_sprites_registration_point_x;
  2560.         float r1scA_sprites_registration_point_y;
  2561.        
  2562.     }r1scA_sequences_sprites;
  2563.    
  2564.     struct bitm_r2c {
  2565.         // representation 2 cells
  2566.         // r2c_bitmaps_
  2567.        
  2568.         char r2c_bitmaps_signature[5];   // 4 bytes only, "bitm"
  2569.         uint16_t r2c_bitmaps_width;
  2570.         uint16_t r2c_bitmaps_height;
  2571.         uint16_t r2c_bitmaps_depth;
  2572.         uint16_t r2c_bitmaps_type;
  2573.         uint16_t r2c_bitmaps_format;
  2574.         uint16_t r2c_bitmaps_flags;   // Even though the first byte is not used, Guerilla will crash if it is anything besides 0x00 (update: both bytes are used, not all flags are listed in Guerilla, only 6 shown of at least 9), toff 1274  16-bit (0x01FF ?)
  2575.         uint16_t r2c_bitmaps_registration_point_x;
  2576.         uint16_t r2c_bitmaps_registration_point_y;
  2577.         uint16_t r2c_bitmaps_mipmap_count;
  2578.        
  2579.         // the rest of the values are questionably-associated... I think they actually mean other things, but whatever.
  2580.        
  2581.         uint16_t r2c_bitmaps_INTERNAL_ihavenoidea1;   // example value = 8192
  2582.         uint32_t r2c_bitmaps_pixels_offset;
  2583.         uint32_t r2c_bitmaps_unknown1;  // pixel count
  2584.         uint32_t r2c_bitmaps_unknown2;   // this, and probably other values here also, is signed for negative number values
  2585.         uint32_t r2c_bitmaps_INTERNAL_ihavenoidea2;   // example value = -1 (0xFFFFFFFF)
  2586.        
  2587.         // in cell here: 4 bytes of 0
  2588.        
  2589.         uint32_t r2c_bitmaps_base_address;
  2590.        
  2591.        
  2592.     }r2c_bitmaps;
  2593.    
  2594. } type_meta_bitm;
  2595.  
  2596. #pragma mark -- boom
  2597.  
  2598. typedef struct {
  2599.     // this tag type is unused by the game engine (probably)
  2600.     // in this example, offset 64 = 4 bytes of 0
  2601.     // I'm going to guess that it's a float value of "radius" for the spheroid
  2602.     // Guerilla does not overwrite the value -- it is ignored like padding
  2603.     float radius;
  2604. } type_meta_boom;
  2605.  
  2606. #pragma mark -- cdmg
  2607.  
  2608. typedef struct {
  2609.     float radius_from;
  2610.     float radius_to;
  2611.     float cutoff_scale_frac;
  2612.     // offset 76 = 24 bytes of 0
  2613.     float vibrate_parameters_low_frequency_frac;
  2614.     float vibrate_parameters_high_frequency_frac;
  2615.     // offset 108 = 24 bytes of 0
  2616.     float camera_shaking_random_translation;
  2617.     float camera_shaking_random_rotation_rad;
  2618.     // offset 140 = 12 bytes of 0
  2619.     uint16_t camera_shaking_wobble_function;
  2620.     // offset 154 = 2 bytes of 0
  2621.     float camera_shaking_wobble_function_period;
  2622.     float camera_shaking_wobble_weight_frac;
  2623.     // offset 164 = 192 bytes of 0
  2624.     uint16_t damage_side_effect;
  2625.     uint16_t damage_category;
  2626.     uint32_t damage_flags;  // toff 360 32-bit 0x00001FFF
  2627.     // offset 364 = 4 bytes of 0
  2628.     float damage_damage_lower_bound;
  2629.     float damage_damage_upper_bound_from;
  2630.     float damage_damage_upper_bound_to;
  2631.     float damage_vehicle_passthrough_penalty_frac;
  2632.     // offset 384 = 4 bytes of 0
  2633.     float damage_stun_frac;
  2634.     float damage_maximum_stun_frac;
  2635.     float damage_stun_time;
  2636.     // offset 400 = 4 bytes of 0
  2637.     float damage_instantaneous_acceleration;
  2638.     // offset 408 = 8 bytes of 0
  2639.     float damage_modifiers_dirt;
  2640.     float damage_modifiers_sand;
  2641.     float damage_modifiers_stone;
  2642.     float damage_modifiers_snow;
  2643.     float damage_modifiers_wood;
  2644.     float damage_modifiers_metal_hollow;
  2645.     float damage_modifiers_metal_thin;
  2646.     float damage_modifiers_metal_thick;
  2647.     float damage_modifiers_rubber;
  2648.     float damage_modifiers_glass;
  2649.     float damage_modifiers_force_field;
  2650.     float damage_modifiers_grunt;
  2651.     float damage_modifiers_hunter_armor;
  2652.     float damage_modifiers_hunter_skin;
  2653.     float damage_modifiers_elite;
  2654.     float damage_modifiers_jackal;
  2655.     float damage_modifiers_jackal_energy_shield;
  2656.     float damage_modifiers_engineer;
  2657.     float damage_modifiers_engineer_force_field;
  2658.     float damage_modifiers_flood_combat_form;
  2659.     float damage_modifiers_flood_carrier_form;
  2660.     float damage_modifiers_cyborg;
  2661.     float damage_modifiers_cyborg_energy_shield;
  2662.     float damage_modifiers_armored_human;
  2663.     float damage_modifiers_human;
  2664.     float damage_modifiers_sentinel;
  2665.     float damage_modifiers_monitor;
  2666.     float damage_modifiers_plastic;
  2667.     float damage_modifiers_water;
  2668.     float damage_modifiers_leaves;
  2669.     float damage_modifiers_elite_energy_shield;
  2670.     float damage_modifiers_ice;
  2671.     float damage_modifiers_hunter_shield;
  2672.    
  2673.     // offset 548 = 28 bytes of 0
  2674. } type_meta_cdmg;
  2675.  
  2676. #pragma mark -- coll
  2677.  
  2678. typedef struct {
  2679.     uint32_t flags; // toff 64  32-bit 0x0000007F
  2680.     uint16_t indirect_damage_material_sel;
  2681.     // offset 70 = 2 bytes of 0
  2682.     float body_maximum_body_vitality;
  2683.     float body_body_system_shock;
  2684.     // offset 80 = 52 bytes of 0
  2685.     float body_friendly_damage_resistance_frac;
  2686.     // offset 136 = 40 bytes of 0
  2687.    
  2688.     // dependency 1: body_localized_damage_effect effe
  2689.     char body_localized_damage_effect_tagclass[5];       //unsigned char[5]
  2690.     uint32_t body_localized_damage_effect_tagnamepointer;   //uint32 ("random" number)
  2691.     uint32_t body_localized_damage_effect_tagnamestringlength;   //uint32
  2692.     uint32_t body_localized_damage_effect_tagid;         //uint32 (0xFFFFFFFF with tags)
  2693.     // char body_localized_damage_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  2694.    
  2695.     float body_area_damage_effect_threshold_frac;
  2696.    
  2697.     // dependency 2: body_area_damage_effect effe
  2698.     char body_area_damage_effect_tagclass[5];        //unsigned char[5]
  2699.     uint32_t body_area_damage_effect_tagnamepointer;   //uint32 ("random" number)
  2700.     uint32_t body_area_damage_effect_tagnamestringlength;   //uint32
  2701.     uint32_t body_area_damage_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  2702.     // char body_area_damage_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  2703.    
  2704.     float body_body_damaged_threshold;
  2705.    
  2706.     // dependency 3: body_body_damaged_effect effe
  2707.     char body_body_damaged_effect_tagclass[5];       //unsigned char[5]
  2708.     uint32_t body_body_damaged_effect_tagnamepointer;   //uint32 ("random" number)
  2709.     uint32_t body_body_damaged_effect_tagnamestringlength;   //uint32
  2710.     uint32_t body_body_damaged_effect_tagid;         //uint32 (0xFFFFFFFF with tags)
  2711.     // char body_body_damaged_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  2712.    
  2713.     // dependency 4: body_body_depleted_effect effe
  2714.     char body_body_depleted_effect_tagclass[5];      //unsigned char[5]
  2715.     uint32_t body_body_depleted_effect_tagnamepointer;   //uint32 ("random" number)
  2716.     uint32_t body_body_depleted_effect_tagnamestringlength;   //uint32
  2717.     uint32_t body_body_depleted_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  2718.     // char body_body_depleted_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  2719.    
  2720.     float body_body_destroyed_threshold;
  2721.    
  2722.     // dependency 5: body_body_destroyed_effect effe
  2723.     char body_body_destroyed_effect_tagclass[5];         //unsigned char[5]
  2724.     uint32_t body_body_destroyed_effect_tagnamepointer;   //uint32 ("random" number)
  2725.     uint32_t body_body_destroyed_effect_tagnamestringlength;   //uint32
  2726.     uint32_t body_body_destroyed_effect_tagid;       //uint32 (0xFFFFFFFF with tags)
  2727.     // char body_body_destroyed_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  2728.    
  2729.     float shield_maximum_shield_vitality;
  2730.     // offset 272 = 2 bytes of 0
  2731.     uint16_t shield_shield_material_type;
  2732.     // offset 276 = 24 bytes of 0
  2733.     uint16_t shield_shield_failure_function;
  2734.     // offset 302 = 2 bytes of 0
  2735.     float shield_shield_failure_threshold_frac;
  2736.     float shield_failing_shield_leak_fraction_frac;
  2737.     // offset 312 = 16 bytes of 0
  2738.     float shield_minimum_stun_damage;
  2739.     float shield_stun_time;
  2740.     float shield_recharge_time;
  2741.     // offset 340 = 112 bytes of 0
  2742.     float shield_shield_damaged_threshold;
  2743.    
  2744.     // dependency 6: shield_shield_damaged_effect effe
  2745.     char shield_shield_damaged_effect_tagclass[5];       //unsigned char[5]
  2746.     uint32_t shield_shield_damaged_effect_tagnamepointer;   //uint32 ("random" number)
  2747.     uint32_t shield_shield_damaged_effect_tagnamestringlength;   //uint32
  2748.     uint32_t shield_shield_damaged_effect_tagid;         //uint32 (0xFFFFFFFF with tags)
  2749.     // char shield_shield_damaged_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  2750.    
  2751.     // dependency 7: shield_shield_depleted_effect effe
  2752.     char shield_shield_depleted_effect_tagclass[5];      //unsigned char[5]
  2753.     uint32_t shield_shield_depleted_effect_tagnamepointer;   //uint32 ("random" number)
  2754.     uint32_t shield_shield_depleted_effect_tagnamestringlength;   //uint32
  2755.     uint32_t shield_shield_depleted_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  2756.     // char shield_shield_depleted_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  2757.    
  2758.     // dependency 8: shield_shield_recharging_effect effe
  2759.     char shield_shield_recharging_effect_tagclass[5];        //unsigned char[5]
  2760.     uint32_t shield_shield_recharging_effect_tagnamepointer;   //uint32 ("random" number)
  2761.     uint32_t shield_shield_recharging_effect_tagnamestringlength;   //uint32
  2762.     uint32_t shield_shield_recharging_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  2763.     // char shield_shield_recharging_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  2764.    
  2765.     // offset 504 = 124 bytes of 0
  2766.    
  2767.     // representation 1 board, offset 628
  2768.     // r1b_materials_
  2769.     uint32_t r1b_materials_entrycount; // maximum of 32 cells (note that the foot and matg classes specify 33 material types)
  2770.     uint32_t r1b_materials_random_id;
  2771.     uint32_t r1b_materials_sig_id; // example value = 0x10F19C00
  2772.    
  2773.     // representation 2 board, offset 640
  2774.     // r2b_regions_
  2775.     uint32_t r2b_regions_entrycount; // maximum of 8 cells
  2776.     uint32_t r2b_regions_random_id;
  2777.     uint32_t r2b_regions_sig_id; // example value = 0x10F29C00
  2778.    
  2779.     // representation 3 board, offset 652
  2780.     // r3b_modifiers_
  2781.     uint32_t r3b_modifiers_entrycount; // maximum of 0 cells (this is apparently unused)
  2782.     uint32_t r3b_modifiers_random_id;
  2783.     uint32_t r3b_modifiers_sig_id; // example value = 0x54F29C00
  2784.    
  2785.     // offset 664 = 16 bytes of 0
  2786.    
  2787.     float pathfinding_box_x_from;
  2788.     float pathfinding_box_x_to;
  2789.     float pathfinding_box_y_from;
  2790.     float pathfinding_box_y_to;
  2791.     float pathfinding_box_z_from;
  2792.     float pathfinding_box_z_to;
  2793.    
  2794.     // representation 4 board, offset 704
  2795.     // r4b_pathfinding_spheres_
  2796.     uint32_t r4b_pathfinding_spheres_entrycount; // maximum of 32 cells
  2797.     uint32_t r4b_pathfinding_spheres_random_id;
  2798.     uint32_t r4b_pathfinding_spheres_sig_id; // example value = 0xA8F39C00
  2799.    
  2800.     // representation 5 board, offset 716
  2801.     // r5b_nodes_
  2802.     uint32_t r5b_nodes_entrycount; // maximum of 64 cells
  2803.     uint32_t r5b_nodes_random_id;
  2804.     uint32_t r5b_nodes_sig_id; // example value = 0x30F39C00
  2805.    
  2806.     // offset 728 = dependency tag pathnames thus far, in order: 1,2,3,4,5,6,7,8
  2807.    
  2808.     struct coll_r1c {
  2809.         // representation 1 cells
  2810.         // r1c_materials_
  2811.        
  2812.         char r1c_materials_name[32];
  2813.         uint32_t r1c_materials_flags;   // toff 760 32-bit 0x00000001
  2814.         uint16_t r1c_materials_material_type;
  2815.         // in cell here: 2 bytes of 0
  2816.         float r1c_materials_shield_leak_percentage_frac;
  2817.         float r1c_materials_shield_damage_multiplier;
  2818.         // in cell here: 12 bytes of 0
  2819.         float r1c_materials_body_damage_multiplier;
  2820.         // in cell here: 8 bytes of 0
  2821.        
  2822.     }r1c_materials;
  2823.    
  2824.     struct coll_r2c {
  2825.         // representation 2 cells
  2826.         // r2c_regions_
  2827.        
  2828.         char r2c_regions_name[32];
  2829.         uint32_t r2c_regions_flags; //toff 832  32-bit 0x000003FF
  2830.         // in cell here: 4 bytes of 0
  2831.         float r2c_regions_damage_threshold;
  2832.         // in cell here: 12 bytes of 0
  2833.        
  2834.         // dependency r2c 1: r2c_regions_destroyed_effect_ effe
  2835.         char r2c_regions_destroyed_effect_tagclass[5];       //unsigned char[5]
  2836.         uint32_t r2c_regions_destroyed_effect_tagnamepointer;   //uint32 ("random" number)
  2837.         uint32_t r2c_regions_destroyed_effect_tagnamestringlength;   //uint32
  2838.         uint32_t r2c_regions_destroyed_effect_tagid;         //uint32 (0xFFFFFFFF with tags)
  2839.         // char r2c_regions_destroyed_effect_tagnamestring[255];
  2840.        
  2841.         // representation 2 sub-board A
  2842.         // r2sbA_permutations_
  2843.         uint32_t r2sbA_permutations_entrycount;   // maximum of 32 cells
  2844.         uint32_t r2sbA_permutations_random_id1;
  2845.         uint32_t r2sbA_permutations_sig_id;   // example value = 0x84F19C00
  2846.        
  2847.     }r2c_regions;
  2848.    
  2849.     // here is another case of unusual grouping, like the bipd r11sc; in the test tag, this grouping is 1041 (variable) bytes, starting at offset 3880
  2850.    
  2851.     struct coll_r2sc {
  2852.         // r2c_regions_destroyed_effect_tagnamestring here
  2853.        
  2854.         struct coll_r2scA {
  2855.             // representation 2 sub-cells A
  2856.             // r2scA_permutations_
  2857.             char r2scA_permutations_name[32];
  2858.            
  2859.         }r2scA_regions_permutations;
  2860.     }r2sc_container;
  2861.    
  2862.     // r3 is unused (test offset 12208) so we continue with r4c rather than r3c
  2863.    
  2864.     struct coll_r4c {
  2865.         // representation 4 cells
  2866.         // r4c_pathfinding_spheres_
  2867.        
  2868.         uint16_t r4c_pathfinding_spheres_node_sel;
  2869.         // in cell here: 14 bytes of 0
  2870.         float r4c_pathfinding_spheres_center_x;
  2871.         float r4c_pathfinding_spheres_center_y;
  2872.         float r4c_pathfinding_spheres_center_z;
  2873.         float r4c_pathfinding_spheres_radius;
  2874.        
  2875.     }r4c_pathfinding_spheres;
  2876.    
  2877.     struct coll_r5c {
  2878.         // representation 5 cells
  2879.         // r5c_nodes_
  2880.        
  2881.         char r5c_nodes_name[32];
  2882.         uint16_t r5c_nodes_region_sel;
  2883.         uint16_t r5c_nodes_parent_node_sel;
  2884.         uint16_t r5c_nodes_next_sibling_node_sel;
  2885.         uint16_t r5c_nodes_first_child_node_sel;
  2886.        
  2887.         // in cell here: 12 bytes of 0
  2888.        
  2889.         // representation 5 sub-board A
  2890.         // r5sbA_bsps_
  2891.         uint32_t r5sbA_bsps_entrycount;   // maximum of 32 cells
  2892.         uint32_t r5sbA_bsps_random_id1;
  2893.         uint32_t r5sbA_bsps_sig_id;   // example value = 0xA4F29C00
  2894.        
  2895.     }r5c_nodes;
  2896.    
  2897.     struct coll_r5sc {   // The r5 (nodes) sub-cells for A (bsps) is repeated, in this test tag, spanning 3380 bytes and repeated 3 times.
  2898.         // In the test tag, each contains repeat groupings as such -- where [, (, and { indicate embedded repeat groupings:
  2899.         // [{r5scA} ({r5scAsca}{r5scAscb}{r5scAscc}{r5scAscd}{r5scAsce}{r5scAscf}{r5scAscg}{r5scAsch})]
  2900.         // or
  2901.         // r5sc = [{r5scA} (r5scAsc)]
  2902.         struct coll_r5scA {
  2903.             // representation 5 sub-cells A
  2904.             // r5scA_bsps_
  2905.            
  2906.             // representation 5 sub-cells A sub-board a
  2907.             // r5scAsba_bsp3d_nodes_
  2908.             uint32_t r5scAsba_bsp3d_nodes_entrycount;   // maximum of n/a cells (MosesofEgypt's reclaimer: 131072)
  2909.             uint32_t r5scAsba_bsp3d_nodes_random_id1;
  2910.             uint32_t r5scAsba_bsp3d_nodes_sig_id;   // example value = 0x504DA100
  2911.            
  2912.             // representation 5 sub-cells A sub-board b
  2913.             // r5scAsbb_planes_
  2914.             uint32_t r5scAsbb_planes_entrycount;   // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  2915.             uint32_t r5scAsbb_planes_random_id1;
  2916.             uint32_t r5scAsbb_planes_sig_id;   // example value = 0x944DA100
  2917.            
  2918.             // representation 5 sub-cells A sub-board c
  2919.             // r5scAsbc_leaves_
  2920.             uint32_t r5scAsbc_leaves_entrycount;   // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  2921.             uint32_t r5scAsbc_leaves_random_id1;
  2922.             uint32_t r5scAsbc_leaves_sig_id;   // example value = 0xFC4DA100
  2923.            
  2924.             // representation 5 sub-cells A sub-board d
  2925.             // r5scAsbd_bsp2d_references_
  2926.             uint32_t r5scAsbd_bsp2d_references_entrycount;   // maximum of n/a cells (MosesofEgypt's reclaimer: )131072
  2927.             uint32_t r5scAsbd_bsp2d_references_random_id1;
  2928.             uint32_t r5scAsbd_bsp2d_references_sig_id;   // example value = 0xA84EA100
  2929.            
  2930.             // representation 5 sub-cells A sub-board e
  2931.             // r5scAsbe_bsp2d_nodes_
  2932.             uint32_t r5scAsbe_bsp2d_nodes_entrycount;   // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  2933.             uint32_t r5scAsbe_bsp2d_nodes_random_id1;
  2934.             uint32_t r5scAsbe_bsp2d_nodes_sig_id;   // example value = 0x584EA100
  2935.            
  2936.             // representation 5 sub-cells A sub-board f
  2937.             // r5scAsbf_surfaces_
  2938.             uint32_t r5scAsbf_surfaces_entrycount;   // maximum of n/a cells (MosesofEgypt's reclaimer: 131072)
  2939.             uint32_t r5scAsbf_surfaces_random_id1;
  2940.             uint32_t r5scAsbf_surfaces_sig_id;   // example value = 0x384FA100
  2941.            
  2942.             // representation 5 sub-cells A sub-board g
  2943.             // r5scAsbg_edges_
  2944.             uint32_t r5scAsbg_edges_entrycount;   // maximum of n/a cells (MosesofEgypt's reclaimer: 262144)
  2945.             uint32_t r5scAsbg_edges_random_id1;
  2946.             uint32_t r5scAsbg_edges_sig_id;   // example value = 0xBC4FA100
  2947.            
  2948.             // representation 5 sub-cells A sub-board h
  2949.             // r5scAsbh_vertices_
  2950.             uint32_t r5scAsbh_vertices_entrycount;   // maximum of n/a cells (MosesofEgypt's reclaimer: 131072)
  2951.             uint32_t r5scAsbh_vertices_random_id1;
  2952.             uint32_t r5scAsbh_vertices_sig_id;   // example value = 0x0C50A100
  2953.            
  2954.         }r5scA_nodes_bsps;
  2955.        
  2956.         struct coll_r5scAsc {
  2957.             struct coll_r5scAsca {
  2958.                 // representation 5 sub-cells A sub-cells a
  2959.                 // r5scAsca_bsp3d_nodes_
  2960.                 uint32_t r5scAsca_bsp3d_nodes_plane;
  2961.                 uint32_t r5scAsca_bsp3d_nodes_back_child;
  2962.                 uint32_t r5scAsca_bsp3d_nodes_front_child;
  2963.                
  2964.             }r5scAsca_nodes_bsps_bsp3d_nodes;
  2965.            
  2966.             struct coll_r5scAscb {
  2967.                 // representation 5 sub-cells A sub-cells b
  2968.                 // r5scAscb_planes_
  2969.                 float r5scAscb_planes_plane_i;
  2970.                 float r5scAscb_planes_plane_j;
  2971.                 float r5scAscb_planes_plane_k;
  2972.                 float r5scAscb_planes_plane_d;
  2973.             }r5scAscb_nodes_bsps_planes;
  2974.            
  2975.             struct coll_r5scAscc {
  2976.                 // representation 5 sub-cells A sub-cells c
  2977.                 // r5scAscc_leaves_
  2978.                
  2979.                 // 1
  2980.                 uint8_t r5scAscc_leaves_flags;  //toff 1044 8-bit 0x01
  2981.                 uint16_t r5scAscc_leaves_bsp2d_reference_count;
  2982.                 uint32_t r5scAscc_leaves_first_bsp2d_reference;
  2983.             }r5scAscc_nodes_bsps_leaves;
  2984.            
  2985.             struct coll_r5scAscd {
  2986.                 // representation 5 sub-cells A sub-cells d
  2987.                 // r5scAscd_bsp2d_references_
  2988.                 uint32_t r5scAscd_bsp2d_references_plane;
  2989.                 uint32_t r5scAscd_bsp2d_references_bsp2d_node;
  2990.             }r5scAscd_nodes_bsps_bsp2d_references;
  2991.            
  2992.             struct coll_r5scAsce {
  2993.                 // representation 5 sub-cells A sub-cells e
  2994.                 // r5scAsce_bsp2d_nodes_
  2995.                 float r5scAsce_bsp2d_nodes_plane_i;
  2996.                 float r5scAsce_bsp2d_nodes_plane_j;
  2997.                 float r5scAsce_bsp2d_nodes_plane_d;
  2998.                 uint32_t r5scAsce_bsp2d_nodes_left_child;
  2999.                 uint32_t r5scAsce_bsp2d_nodes_right_child;
  3000.             }r5scAsce_nodes_bsps_bsp2d_nodes;
  3001.            
  3002.             struct coll_r5scAscf {
  3003.                 // representation 5 sub-cells A sub-cells f
  3004.                 // r5scAscf_surfaces_
  3005.                 uint32_t r5scAscf_surfaces_plane;
  3006.                 uint32_t r5scAscf_surfaces_first_edge;
  3007.                 uint8_t r5scAscf_surfaces_flags;    // toff 1060 (no test)  0x0F
  3008.                 uint8_t r5scAscf_surfaces_breakable_surface;   // -128 to 127
  3009.                 uint16_t r5scAscf_surfaces_material;   // this is supposed to be set above -1, since every surface must be assigned a material
  3010.             }r5scAscf_nodes_bsps_surfaces;
  3011.            
  3012.             struct coll_r5scAscg {
  3013.                 // representation 5 sub-cells A sub-cells g
  3014.                 // r5scAscg_edges_
  3015.                 uint32_t r5scAscg_edges_start_vertex;
  3016.                 uint32_t r5scAscg_edges_end_vertex;
  3017.                 uint32_t r5scAscg_edges_forward_edge;
  3018.                 uint32_t r5scAscg_edges_reverse_edge;
  3019.                 uint32_t r5scAscg_edges_left_surface;
  3020.                 uint32_t r5scAscg_edges_right_surface;
  3021.             }r5scAscg_nodes_bsps_edges;
  3022.            
  3023.             struct coll_r5scAsch {
  3024.                 // representation 5 sub-cells A sub-cells h
  3025.                 // r5scAsch_vertices_
  3026.                 float r5scAsch_vertices_point_x;
  3027.                 float r5scAsch_vertices_point_y;
  3028.                 float r5scAsch_vertices_point_z;
  3029.                 uint32_t r5scAsch_vertices_first_edge;
  3030.             }r5scAsch_nodes_bsps_vertices;
  3031.            
  3032.         }r5scAsc_container;
  3033.        
  3034.     }r5sc_container;
  3035. } type_meta_coll;
  3036.  
  3037. #pragma mark -- colo
  3038.  
  3039. typedef struct {
  3040.    
  3041.     // representation 1 board, offset 64
  3042.     // r1b_colors_
  3043.     uint32_t r1b_colors_entrycount; // maximum of 512 cells
  3044.     uint32_t r1b_colors_random_id;
  3045.     uint32_t r1b_colors_sig_id; // example value = 0xB4639D00
  3046.    
  3047.     struct colo_r1c {
  3048.         // representation 1 cells
  3049.         // r1c_colors_
  3050.         char r1c_colors_name[32];
  3051.         float r1c_colors_color_a_frac;
  3052.         float r1c_colors_color_r_frac;
  3053.         float r1c_colors_color_g_frac;
  3054.         float r1c_colors_color_b_frac;
  3055.     }r1c_colors;
  3056.    
  3057. } type_meta_colo;
  3058.  
  3059. #pragma mark -- cont
  3060.  
  3061. typedef struct {
  3062.     // 64, 1
  3063.     uint8_t flags;  //toff 64   8-bit 0x7F
  3064.     uint16_t scale_flags;   //toff 66   16-bit 0x03FF
  3065.    
  3066.     float point_creation_point_generation_rate;
  3067.     float point_creation_point_velocity_from;
  3068.     float point_creation_point_velocity_to;
  3069.     float point_creation_point_velocity_cone_angle_rad;
  3070.     float point_creation_inherited_velocity_fraction_frac;
  3071.     uint16_t rendering_render_type;
  3072.     // offset 90 = 2 bytes of 0
  3073.     float rendering_texture_repeats_u;
  3074.     float rendering_texture_repeats_v;
  3075.     float rendering_texture_animation_u;
  3076.     float rendering_texture_animation_v;
  3077.     float rendering_animation_rate;
  3078.    
  3079.     // dependency 1: rendering_bitmap bitm
  3080.     char rendering_bitmap_tagclass[5];       //unsigned char[5]
  3081.     uint32_t rendering_bitmap_tagnamepointer;   //uint32 ("random" number)
  3082.     uint32_t rendering_bitmap_tagnamestringlength;   //uint32
  3083.     uint32_t rendering_bitmap_tagid;         //uint32 (0xFFFFFFFF with tags)
  3084.     // char rendering_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3085.    
  3086.     uint16_t rendering_first_sequence_index;
  3087.     uint16_t rendering_sequence_count;
  3088.    
  3089.     // offset 132 = 104 bytes of 0
  3090.    
  3091.     // 236, 1
  3092.     uint8_t rendering_shader_flags; // toff 236 8-bit 0x07
  3093.     uint16_t rendering_framebuffer_blend_function;
  3094.     uint16_t rendering_framebuffer_fade_mode;
  3095.     // 242, 1
  3096.     uint8_t rendering_map_flags;    // toff 242 8-bit 0x01
  3097.    
  3098.     // offset 244 = 28 bytes of 0
  3099.    
  3100.     // dependency 2: secondary_map_bitmap bitm
  3101.     char secondary_map_bitmap_tagclass[5];       //unsigned char[5]
  3102.     uint32_t secondary_map_bitmap_tagnamepointer;   //uint32 ("random" number)
  3103.     uint32_t secondary_map_bitmap_tagnamestringlength;   //uint32
  3104.     uint32_t secondary_map_bitmap_tagid;         //uint32 (0xFFFFFFFF with tags)
  3105.     // char secondary_map_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3106.    
  3107.     uint16_t secondary_map_anchor;   // offset 288
  3108.     // 290, 1
  3109.     uint8_t secondary_map_flags;    //toff 290  8-bit 0x01
  3110.     uint16_t secondary_map_u_animation_source;
  3111.     uint16_t secondary_map_u_animation_function;
  3112.     float secondary_map_u_animation_period;
  3113.     float secondary_map_u_animation_phase;
  3114.     float secondary_map_u_animation_scale;
  3115.    
  3116.     uint16_t secondary_map_v_animation_source;
  3117.     uint16_t secondary_map_v_animation_function;
  3118.     float secondary_map_v_animation_period;
  3119.     float secondary_map_v_animation_phase;
  3120.     float secondary_map_v_animation_scale;
  3121.    
  3122.     uint16_t secondary_map_rotation_animation_source;
  3123.     uint16_t secondary_map_rotation_animation_function;
  3124.     float secondary_map_rotation_animation_period;
  3125.     float secondary_map_rotation_animation_phase;
  3126.     float secondary_map_rotation_animation_scale;
  3127.     float secondary_map_rotation_animation_center_x;
  3128.     float secondary_map_rotation_animation_center_y;
  3129.    
  3130.     // offset 348 = 4 bytes of 0
  3131.    
  3132.     float secondary_map_zsprite_radius_scale;
  3133.    
  3134.     // offset 356 = 20 bytes of 0
  3135.    
  3136.     // representation 1 board, offset 376
  3137.     // r1b_point_states_
  3138.     uint32_t r1b_point_states_entrycount; // maximum of 16 cells
  3139.     uint32_t r1b_point_states_random_id;
  3140.     uint32_t r1b_point_states_sig_id; // example value = 0xBC409D00
  3141.    
  3142.     // dependency 1 tagpathname string goes here
  3143.     // dependency 2 tagpathname string goes here
  3144.    
  3145.     struct cont_r1c {
  3146.         // representation 1 cells
  3147.         // r1c_point_states_
  3148.         float r1c_point_states_state_timing_duration_from;
  3149.         float r1c_point_states_state_timing_duration_to;
  3150.         float r1c_point_states_state_timing_transition_duration_from;
  3151.         float r1c_point_states_state_timing_transition_duration_to;
  3152.        
  3153.         // dependency 3: point_states_point_variables_physics pphy
  3154.         char point_states_point_variables_physics_tagclass[5];       //unsigned char[5]
  3155.         uint32_t point_states_point_variables_physics_tagnamepointer;   //uint32 ("random" number)
  3156.         uint32_t point_states_point_variables_physics_tagnamestringlength;   //uint32
  3157.         uint32_t point_states_point_variables_physics_tagid;         //uint32 (0xFFFFFFFF with tags)
  3158.         // char point_states_point_variables_physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3159.        
  3160.         // in cell here: 32 bytes of 0
  3161.        
  3162.         float point_states_point_variables_width;
  3163.         float point_states_point_variables_color_lower_bound_a_frac;
  3164.         float point_states_point_variables_color_lower_bound_r_frac;
  3165.         float point_states_point_variables_color_lower_bound_g_frac;
  3166.         float point_states_point_variables_color_lower_bound_b_frac;
  3167.         float point_states_point_variables_color_upper_bound_a_frac;
  3168.         float point_states_point_variables_color_upper_bound_r_frac;
  3169.         float point_states_point_variables_color_upper_bound_g_frac;
  3170.         float point_states_point_variables_color_upper_bound_b_frac;
  3171.         uint32_t point_states_point_variables_scale_flags;  // toff 488 32-bit 0x0000003F
  3172.        
  3173.     }r1c_point_states;
  3174.    
  3175.     // dependency 3 tagpathname strings go here
  3176.    
  3177. } type_meta_cont;
  3178.  
  3179. #pragma mark -- ctrl
  3180.  
  3181. typedef struct {
  3182.     // OBJE 1 DATA START
  3183.     uint16_t INTERNAL_obje_index;   // 8 (little endian)
  3184.     // 66, 1
  3185.     uint8_t flags;  // toff 66  8-bit 0x0F
  3186.     float bounding_radius;
  3187.     float bounding_offset_x;
  3188.     float bounding_offset_y;
  3189.     float bounding_offset_z;
  3190.     float origin_offset_x;
  3191.     float origin_offset_y;
  3192.     float origin_offset_z;
  3193.     float acceleration_scale;
  3194.     // offset 100 = 4 bytes of 0
  3195.    
  3196.     // dependency 1: model mod2
  3197.     char model_tagclass[5];      //unsigned char[5]
  3198.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  3199.     uint32_t model_tagnamestringlength;   //uint32
  3200.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  3201.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3202.    
  3203.     // dependency 2: animation graph antr
  3204.     char animation_graph_tagclass[5];        //unsigned char[5]
  3205.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  3206.     uint32_t animation_graph_tagnamestringlength;   //uint32
  3207.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  3208.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3209.    
  3210.     // offset 136 = 40 bytes of 0
  3211.    
  3212.     // dependency 3: collision model coll
  3213.     char collision_model_tagclass[5];        //unsigned char[5]
  3214.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  3215.     uint32_t collision_model_tagnamestringlength;   //uint32
  3216.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  3217.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3218.    
  3219.     // dependency 4: physics phys
  3220.     char physics_tagclass[5];        //unsigned char[5]
  3221.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  3222.     uint32_t physics_tagnamestringlength;   //uint32
  3223.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  3224.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3225.    
  3226.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  3227.     char modifier_shader_tagclass[5];        //unsigned char[5]
  3228.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  3229.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  3230.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  3231.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3232.    
  3233.     // dependency 6: creation effect effe
  3234.     char creation_effect_tagclass[5];        //unsigned char[5]
  3235.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  3236.     uint32_t creation_effect_tagnamestringlength;   //uint32
  3237.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  3238.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3239.    
  3240.     // offset 240 = 84 bytes of 0
  3241.    
  3242.     float render_bounding_radius;
  3243.    
  3244.     uint16_t export_to_functions_a_in;
  3245.     uint16_t export_to_functions_b_in;
  3246.     uint16_t export_to_functions_c_in;
  3247.     uint16_t export_to_functions_d_in;
  3248.    
  3249.     // offset 336 = 44 bytes of 0
  3250.    
  3251.     uint16_t export_to_functions_hud_text_message_index;
  3252.     uint16_t export_to_functions_forced_shader_permutation_index;
  3253.    
  3254.     // representation 1 board, offset 384
  3255.     // r1b_attachments_
  3256.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  3257.     uint32_t r1b_attachments_random_id;
  3258.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  3259.    
  3260.     // representation 2 board, offset 396
  3261.     // r2b_widgets_
  3262.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  3263.     uint32_t r2b_widgets_random_id;
  3264.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  3265.    
  3266.     // representation 3 board, offset 408
  3267.     // r3b_functions_
  3268.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  3269.     uint32_t r3b_functions_random_id;
  3270.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  3271.    
  3272.     // representation 4 board, offset 420
  3273.     // r4b_change_colors_
  3274.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  3275.     uint32_t r4b_change_colors_random_id;
  3276.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  3277.    
  3278.     // representation 5 board, offset 432
  3279.     // r5b_predicted_resources_
  3280.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  3281.     uint32_t r5b_predicted_resources_random_id;
  3282.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  3283.    
  3284.     // OBJE 1 DATA END
  3285.    
  3286.     uint32_t device_flags;   // offset 444, toff 444    32-bit 0x00000003
  3287.     float device_power_transition_time;
  3288.     float device_power_acceleration_time;
  3289.     float device_position_transition_time;
  3290.     float device_position_acceleration_time;
  3291.     float device_depowered_position_transition_time;
  3292.     float device_depowered_position_acceleration_time;
  3293.     uint16_t device_a_in;
  3294.     uint16_t device_b_in;
  3295.     uint16_t device_c_in;
  3296.     uint16_t device_d_in;
  3297.    
  3298.     // dependency 7: open (up) effe snd!
  3299.     char device_open_up_tagclass[5];         //unsigned char[5]
  3300.     uint32_t device_open_up_tagnamepointer;   //uint32 ("random" number)
  3301.     uint32_t device_open_up_tagnamestringlength;   //uint32
  3302.     uint32_t device_open_up_tagid;       //uint32 (0xFFFFFFFF with tags)
  3303.     // char device_open_up_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3304.    
  3305.     // dependency 8: close (down) effe snd!
  3306.     char device_close_down_tagclass[5];      //unsigned char[5]
  3307.     uint32_t device_close_down_tagnamepointer;   //uint32 ("random" number)
  3308.     uint32_t device_close_down_tagnamestringlength;   //uint32
  3309.     uint32_t device_close_down_tagid;        //uint32 (0xFFFFFFFF with tags)
  3310.     // char device_close_down_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3311.    
  3312.     // dependency 9: opened effe snd!
  3313.     char device_opened_tagclass[5];      //unsigned char[5]
  3314.     uint32_t device_opened_tagnamepointer;   //uint32 ("random" number)
  3315.     uint32_t device_opened_tagnamestringlength;   //uint32
  3316.     uint32_t device_opened_tagid;        //uint32 (0xFFFFFFFF with tags)
  3317.     // char device_opened_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3318.    
  3319.     // dependency 10: closed effe snd!
  3320.     char device_closed_tagclass[5];      //unsigned char[5]
  3321.     uint32_t device_closed_tagnamepointer;   //uint32 ("random" number)
  3322.     uint32_t device_closed_tagnamestringlength;   //uint32
  3323.     uint32_t device_closed_tagid;        //uint32 (0xFFFFFFFF with tags)
  3324.     // char device_closed_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3325.    
  3326.     // dependency 11: depowered effe snd!
  3327.     char device_depowered_tagclass[5];       //unsigned char[5]
  3328.     uint32_t device_depowered_tagnamepointer;   //uint32 ("random" number)
  3329.     uint32_t device_depowered_tagnamestringlength;   //uint32
  3330.     uint32_t device_depowered_tagid;         //uint32 (0xFFFFFFFF with tags)
  3331.     // char device_depowered_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3332.    
  3333.     // dependency 12: repowered effe snd!
  3334.     char device_repowered_tagclass[5];       //unsigned char[5]
  3335.     uint32_t device_repowered_tagnamepointer;   //uint32 ("random" number)
  3336.     uint32_t device_repowered_tagnamestringlength;   //uint32
  3337.     uint32_t device_repowered_tagid;         //uint32 (0xFFFFFFFF with tags)
  3338.     // char device_repowered_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3339.    
  3340.     float device_delay_time;   // offset 576
  3341.     // offset 580 = 8 bytes of 0
  3342.    
  3343.     // dependency 13: delay effect effe snd!
  3344.     char device_delay_effect_tagclass[5];        //unsigned char[5]
  3345.     uint32_t device_delay_effect_tagnamepointer;   //uint32 ("random" number)
  3346.     uint32_t device_delay_effect_tagnamestringlength;   //uint32
  3347.     uint32_t device_delay_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  3348.     // char device_delay_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3349.    
  3350.     float device_automatic_activation_radius;
  3351.    
  3352.     // offset 608 = 112 bytes of 0
  3353.    
  3354.     uint16_t control_type;   // offset 720
  3355.     uint16_t control_triggers_when;
  3356.     float control_call_value_frac;   // this is unenforced by Guerilla, like many other values intended to be used as fractional of 1.
  3357.    
  3358.     // offset 728 = 80 bytes of 0
  3359.    
  3360.     // dependency 14: on effe snd!
  3361.     char control_on_tagclass[5];         //unsigned char[5]
  3362.     uint32_t control_on_tagnamepointer;   //uint32 ("random" number)
  3363.     uint32_t control_on_tagnamestringlength;   //uint32
  3364.     uint32_t control_on_tagid;       //uint32 (0xFFFFFFFF with tags)
  3365.     // char control_on_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3366.    
  3367.     // dependency 15: off effe snd!
  3368.     char control_off_tagclass[5];        //unsigned char[5]
  3369.     uint32_t control_off_tagnamepointer;   //uint32 ("random" number)
  3370.     uint32_t control_off_tagnamestringlength;   //uint32
  3371.     uint32_t control_off_tagid;      //uint32 (0xFFFFFFFF with tags)
  3372.     // char control_off_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3373.    
  3374.     // dependency 16: deny effe snd!
  3375.     char control_deny_tagclass[5];       //unsigned char[5]
  3376.     uint32_t control_deny_tagnamepointer;   //uint32 ("random" number)
  3377.     uint32_t control_deny_tagnamestringlength;   //uint32
  3378.     uint32_t control_deny_tagid;         //uint32 (0xFFFFFFFF with tags)
  3379.     // char control_deny_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3380.    
  3381.     // dependencies 1-6 tagpathname strings go here
  3382.    
  3383.     // OBJE DATA 2 START
  3384.    
  3385.     struct ctrl_r1c {
  3386.         // representation 1 cells
  3387.         // r1c_attachments_
  3388.        
  3389.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  3390.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  3391.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  3392.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  3393.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  3394.         // char r1c_attachments_type_tagnamestring[255];
  3395.        
  3396.         char r1c_attachments_marker[32];
  3397.         uint16_t r1c_attachments_primary_scale;
  3398.         uint16_t r1c_attachments_secondary_scale;
  3399.         uint16_t r1c_attachments_change_color;
  3400.        
  3401.         // in cell here: 18 bytes of 0
  3402.        
  3403.     }r1c_attachments;
  3404.    
  3405.     // r1c 1 tag name strings here
  3406.    
  3407.     struct ctrl_r2c {
  3408.         // representation 2 cells
  3409.         // r2c_widgets_
  3410.        
  3411.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  3412.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  3413.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  3414.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  3415.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  3416.         // char r2c_widgets_reference_tagnamestring[255];
  3417.        
  3418.         // in cell here: 16 bytes of 0
  3419.     }r2c_widgets;
  3420.    
  3421.     // r2c 1 tag name strings here
  3422.    
  3423.     struct ctrl_r3c {
  3424.         // representation 3 cells
  3425.         // r3c_functions_
  3426.        
  3427.         uint32_t r3c_functions_flags;   // toff 856 32-bit 0x00000007
  3428.         float r3c_functions_period;
  3429.         uint16_t r3c_functions_scale_period_by;
  3430.         uint16_t r3c_functions_function;
  3431.         uint16_t r3c_functions_scale_function_by;
  3432.         uint16_t r3c_functions_wobble_function;
  3433.         float r3c_functions_wobble_period;
  3434.         float r3c_functions_wobble_magnitude;
  3435.         float r3c_functions_square_wave_threshold_frac;
  3436.         uint16_t r3c_functions_step_count;
  3437.         uint16_t r3c_functions_map_to;
  3438.         uint16_t r3c_functions_sawtooth_count;
  3439.         uint16_t r3c_functions_add;
  3440.         uint16_t r3c_functions_scale_result_by;
  3441.         uint16_t r3c_functions_bounds_mode;
  3442.         float r3c_functions_bounds_from_frac;
  3443.         float r3c_functions_bounds_to_frac;
  3444.         // in cell here: 6 bytes of 0
  3445.         uint16_t r3c_functions_turn_off_with_sel;
  3446.         float r3c_functions_scale_by;
  3447.         // in cell here: 268 bytes of 0 (reminiscent of the pre-padding of other times strings come after cells)
  3448.         char r3c_functions_usage[32];
  3449.        
  3450.     }r3c_functions;
  3451.    
  3452.     struct ctrl_r4c {
  3453.         // representation 4 cells
  3454.         // r4c_change_colors_
  3455.         uint16_t r4c_change_colors_darken_by;
  3456.         uint16_t r4c_change_colors_scale_by;
  3457.         uint32_t r4c_change_colors_scale_flags; // toff 1220    32-bit 0x00000003
  3458.         float r4c_change_colors_color_lower_bound_r_frac;
  3459.         float r4c_change_colors_color_lower_bound_g_frac;
  3460.         float r4c_change_colors_color_lower_bound_b_frac;
  3461.         float r4c_change_colors_color_upper_bound_r_frac;
  3462.         float r4c_change_colors_color_upper_bound_g_frac;
  3463.         float r4c_change_colors_color_upper_bound_b_frac;
  3464.        
  3465.         // representation 4 sub-board A
  3466.         // r4sbA_permutations_
  3467.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  3468.         uint32_t r4sbA_permutations_random_id1;
  3469.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  3470.     }r4c_change_colors;
  3471.    
  3472.     struct ctrl_r4scA
  3473.     {
  3474.         // representation 4 sub-cells A
  3475.         // r4scA_permutations_
  3476.         float r4scA_permutations_weight_frac;
  3477.         float r4scA_permutations_color_lower_bound_r_frac;
  3478.         float r4scA_permutations_color_lower_bound_g_frac;
  3479.         float r4scA_permutations_color_lower_bound_b_frac;
  3480.         float r4scA_permutations_color_upper_bound_r_frac;
  3481.         float r4scA_permutations_color_upper_bound_g_frac;
  3482.         float r4scA_permutations_color_upper_bound_b_frac;
  3483.     }r4sc_change_colors_permutations;
  3484.    
  3485.     struct ctrl_r5c {
  3486.         // representation 5 cells
  3487.         // r5c_predicted_resources_
  3488.         uint16_t r5c_predicted_resources_type;
  3489.         uint16_t r5c_predicted_resources_resource_index;
  3490.         uint32_t r5c_predicted_resources_tag_index;
  3491.     }r5c_predicted_resources;
  3492.    
  3493.     // OBJE DATA 2 END
  3494.    
  3495.     // dependencies 7-16 tagpathname strings go here
  3496.    
  3497. } type_meta_ctrl;
  3498.  
  3499. #pragma mark -- deca
  3500.  
  3501. typedef struct {
  3502.     uint16_t decal_flags;   //toff 64 (all bytes used)  0x01FF
  3503.     uint16_t decal_type;
  3504.     uint16_t decal_layer;
  3505.     // offset 70 = 2 bytes of 0
  3506.    
  3507.     // dependency 1: next decal in chain deca
  3508.     char decal_next_decal_in_chain_tagclass[5];      //unsigned char[5]
  3509.     uint32_t decal_next_decal_in_chain_tagnamepointer;   //uint32 ("random" number)
  3510.     uint32_t decal_next_decal_in_chain_tagnamestringlength;   //uint32
  3511.     uint32_t decal_next_decal_in_chain_tagid;        //uint32 (0xFFFFFFFF with tags)
  3512.     // char decal_next_decal_in_chain_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3513.    
  3514.     float radius_and_color_radius_from;
  3515.     float radius_and_color_radius_to;
  3516.     // offset 96 = 12 bytes of 0
  3517.     float radius_and_color_intensity_from_frac;
  3518.     float radius_and_color_intensity_to_frac;
  3519.     float radius_and_color_color_lower_bounds_r_frac;
  3520.     float radius_and_color_color_lower_bounds_g_frac;
  3521.     float radius_and_color_color_lower_bounds_b_frac;
  3522.     float radius_and_color_color_upper_bounds_r_frac;
  3523.     float radius_and_color_color_upper_bounds_g_frac;
  3524.     float radius_and_color_color_upper_bounds_b_frac;
  3525.     // offset 140 = 12 bytes of 0
  3526.     uint16_t animation_animation_loop_frame;
  3527.     uint16_t animation_animation_speed;   // 1 to 120
  3528.     // offset 156 = 28 bytes of 0
  3529.     float animation_lifetime_from;
  3530.     float animation_lifetime_to;
  3531.     float animation_decay_time_from;
  3532.     float animation_decay_time_to;
  3533.     // offset 200 = 56 bytes of 0
  3534.     uint16_t shader_framebuffer_blend_function;   // offset 256
  3535.     // offset 258 = 22 bytes of 0
  3536.    
  3537.     // dependency 2: shader map bitm
  3538.     char shader_map_tagclass[5];         //unsigned char[5]
  3539.     uint32_t shader_map_tagnamepointer;   //uint32 ("random" number)
  3540.     uint32_t shader_map_tagnamestringlength;   //uint32
  3541.     uint32_t shader_map_tagid;       //uint32 (0xFFFFFFFF with tags)
  3542.     // char shader_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3543.    
  3544.     // offset 296 = 20 bytes of 0
  3545.    
  3546.     float sprite_info_maximum_sprite_extent_fixed16;   // "fixed" value, meaning that no matter what value is actually specified here, Guerilla will only show a value of 16 here; you can save any value here, but it will only ever be displayed as a value of 16 in the window; it seems that 16 is the only acceptable value therefore (but this is not enforced with an error message). (offset 316)
  3547.    
  3548.     // offset 320 = 12 bytes of 0
  3549.    
  3550.     // dependency tagpathname strings go here
  3551.    
  3552. } type_meta_deca;
  3553.  
  3554. #pragma mark -- DeLa
  3555.  
  3556. typedef struct {
  3557.     uint16_t widget_type;
  3558.     uint16_t controller_index;
  3559.     char name[32];
  3560.     uint16_t bounds_top;
  3561.     uint16_t bounds_left;
  3562.     uint16_t bounds_bottom;
  3563.     uint16_t bounds_right;
  3564.     uint32_t flags; // toff 108 32-bit 0x0000FFFF
  3565.     uint32_t milliseconds_to_auto_close;
  3566.     uint32_t milliseconds_auto_close_fade_time;
  3567.    
  3568.     // dependency 1: background bitmap bitm
  3569.     char background_bitmap_tagclass[5];      //unsigned char[5]
  3570.     uint32_t background_bitmap_tagnamepointer;   //uint32 ("random" number)
  3571.     uint32_t background_bitmap_tagnamestringlength;   //uint32
  3572.     uint32_t background_bitmap_tagid;        //uint32 (0xFFFFFFFF with tags)
  3573.     // char background_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3574.    
  3575.     // representation 1 board, offset 136
  3576.     // r1b_game_data_inputs_
  3577.     uint32_t r1b_game_data_inputs_entrycount; // maximum of 64 cells
  3578.     uint32_t r1b_game_data_inputs_random_id;
  3579.     uint32_t r1b_game_data_inputs_sig_id; // example value = 0xF0239C00
  3580.    
  3581.     // representation 2 board, offset 148
  3582.     // r2b_event_handlers_
  3583.     uint32_t r2b_event_handlers_entrycount; // maximum of 32 cells
  3584.     uint32_t r2b_event_handlers_random_id;
  3585.     uint32_t r2b_event_handlers_sig_id; // example value = 0xAC249C00
  3586.    
  3587.     // representation 3 board, offset 160
  3588.     // r3b_search_and_replace_functions_
  3589.     uint32_t r3b_search_and_replace_functions_entrycount; // maximum of 32 cells
  3590.     uint32_t r3b_search_and_replace_functions_random_id;
  3591.     uint32_t r3b_search_and_replace_functions_sig_id; // example value = 0x18269C00
  3592.    
  3593.     // offset 172 = 128 bytes of 0
  3594.    
  3595.     // dependency 2: text label unicode strings list ustr
  3596.     char text_box_text_label_unicode_strings_list_tagclass[5];       //unsigned char[5]
  3597.     uint32_t text_box_text_label_unicode_strings_list_tagnamepointer;   //uint32 ("random" number)
  3598.     uint32_t text_box_text_label_unicode_strings_list_tagnamestringlength;   //uint32
  3599.     uint32_t text_box_text_label_unicode_strings_list_tagid;         //uint32 (0xFFFFFFFF with tags)
  3600.     // char text_box_text_label_unicode_strings_list_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3601.    
  3602.     // dependency 3: text font font
  3603.     char text_box_text_font_tagclass[5];         //unsigned char[5]
  3604.     uint32_t text_box_text_font_tagnamepointer;   //uint32 ("random" number)
  3605.     uint32_t text_box_text_font_tagnamestringlength;   //uint32
  3606.     uint32_t text_box_text_font_tagid;       //uint32 (0xFFFFFFFF with tags)
  3607.     // char text_box_text_font_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3608.    
  3609.     float text_box_text_color_a_frac;
  3610.     float text_box_text_color_r_frac;
  3611.     float text_box_text_color_g_frac;
  3612.     float text_box_text_color_b_frac;
  3613.    
  3614.     uint16_t text_box_justification;
  3615.     uint32_t text_box_flags;    //toff 350  32-bit 0x0000000F
  3616.     // offset 354 = 12 bytes of 0
  3617.     uint16_t more_text_box_parameters_string_list_index;   // offset 366
  3618.     uint16_t more_text_box_parameters_horizontal_offset;
  3619.     uint16_t more_text_box_parameters_vertical_offset;
  3620.    
  3621.     // offset 372 = 28 bytes of 0
  3622.    
  3623.     uint32_t list_items_flags;  //toff 400  32-bit 0x0000000F
  3624.    
  3625.     // dependency 4: list header bitmap bitm
  3626.     char spinner_list_list_header_bitmap_tagclass[5];        //unsigned char[5]
  3627.     uint32_t spinner_list_list_header_bitmap_tagnamepointer;   //uint32 ("random" number)
  3628.     uint32_t spinner_list_list_header_bitmap_tagnamestringlength;   //uint32
  3629.     uint32_t spinner_list_list_header_bitmap_tagid;      //uint32 (0xFFFFFFFF with tags)
  3630.     // char spinner_list_list_header_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3631.    
  3632.     // dependency 5: list footer bitmap bitm
  3633.     char spinner_list_list_footer_bitmap_tagclass[5];        //unsigned char[5]
  3634.     uint32_t spinner_list_list_footer_bitmap_tagnamepointer;   //uint32 ("random" number)
  3635.     uint32_t spinner_list_list_footer_bitmap_tagnamestringlength;   //uint32
  3636.     uint32_t spinner_list_list_footer_bitmap_tagid;      //uint32 (0xFFFFFFFF with tags)
  3637.     // char spinner_list_list_footer_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3638.    
  3639.     uint16_t spinner_list_header_bounds_top;
  3640.     uint16_t spinner_list_header_bounds_left;
  3641.     uint16_t spinner_list_header_bounds_bottom;
  3642.     uint16_t spinner_list_header_bounds_right;
  3643.     uint16_t spinner_list_footer_bounds_top;
  3644.     uint16_t spinner_list_footer_bounds_left;
  3645.     uint16_t spinner_list_footer_bounds_bottom;
  3646.     uint16_t spinner_list_footer_bounds_right;
  3647.    
  3648.     // offset 452 = 32 bytes of 0
  3649.    
  3650.     // dependency 6: extended description widget DeLa
  3651.     char column_list_extended_description_widget_tagclass[5];        //unsigned char[5]
  3652.     uint32_t column_list_extended_description_widget_tagnamepointer;   //uint32 ("random" number)
  3653.     uint32_t column_list_extended_description_widget_tagnamestringlength;   //uint32
  3654.     uint32_t column_list_extended_description_widget_tagid;      //uint32 (0xFFFFFFFF with tags)
  3655.     // char column_list_extended_description_widget_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3656.    
  3657.     // offset 500 = 288 bytes of 0
  3658.    
  3659.     // representation 4 board, offset 788
  3660.     // r4b_conditional_widgets_
  3661.     uint32_t r4b_conditional_widgets_entrycount; // maximum of 32 cells
  3662.     uint32_t r4b_conditional_widgets_random_id;
  3663.     uint32_t r4b_conditional_widgets_sig_id; // example value = 0x30259C00
  3664.    
  3665.     // offset 800 = 256 bytes of 0
  3666.    
  3667.     // representation 5 board, offset 1056
  3668.     // r5b_child_widgets_
  3669.     uint32_t r5b_child_widgets_entrycount; // maximum of 32 cells
  3670.     uint32_t r5b_child_widgets_random_id;
  3671.     uint32_t r5b_child_widgets_sig_id; // example value = 0xC8259C00
  3672.    
  3673.     // dependency 1 tagpathname string goes here
  3674.    
  3675.     struct dela_r1c {
  3676.         // representation 1 cells
  3677.         // r1c_game_data_inputs_
  3678.         uint16_t r1c_game_data_inputs_function;
  3679.         // in cell here: 34 bytes of 0
  3680.     }r1c_game_data_inputs;
  3681.    
  3682.     struct dela_r2c {
  3683.         // representation 2 cells
  3684.         // r2c_event_handlers_
  3685.         uint32_t r2c_event_handlers_flags;  // toff 1068    32-bit 0x00000BFF
  3686.         uint16_t r2c_event_handlers_event_type;
  3687.         uint16_t r2c_event_handlers_function;
  3688.        
  3689.         // dependency r2c 1: widget tag DeLa
  3690.         char r2c1_widget_tag_tagclass[5];        //unsigned char[5]
  3691.         uint32_t r2c1_widget_tag_tagnamepointer;   //uint32 ("random" number)
  3692.         uint32_t r2c1_widget_tag_tagnamestringlength;   //uint32
  3693.         uint32_t r2c1_widget_tag_tagid;      //uint32 (0xFFFFFFFF with tags)
  3694.         // char r2c1_widget_tag_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3695.        
  3696.         // dependency r2c 2: sound effect snd!
  3697.         char r2c2_sound_effect_tagclass[5];      //unsigned char[5]
  3698.         uint32_t r2c2_sound_effect_tagnamepointer;   //uint32 ("random" number)
  3699.         uint32_t r2c2_sound_effect_tagnamestringlength;   //uint32
  3700.         uint32_t r2c2_sound_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  3701.         // char r2c2_sound_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3702.        
  3703.         char r2c_event_handlers_script[32];
  3704.        
  3705.     }r2c_event_handlers;
  3706.    
  3707.     // sets of r2c1 and r2c2 dependency tagpathname strings go here, grouped as {r2c1 r2c2}, repeated like a struct (but I'm not going to code it here since the strings are of variable lengths)
  3708.    
  3709.     struct dela_r3c {
  3710.         // representation 3 cells
  3711.         // r3c_search_and_replace_functions_
  3712.        
  3713.         char r3c_search_and_replace_functions_search_string[32];
  3714.         uint16_t r3c_search_and_replace_functions_replace_function;
  3715.        
  3716.     }r3c_search_and_replace_functions;
  3717.    
  3718.     // dependencies 2-6 tagpathname strings go here
  3719.    
  3720.     struct dela_r4c {
  3721.         // representation 4 cells
  3722.         // r4c_conditional_widgets_
  3723.        
  3724.         // dependency r4c 1: widget tag DeLa
  3725.         char r4c1_widget_tag_tagclass[5];        //unsigned char[5]
  3726.         uint32_t r4c1_widget_tag_tagnamepointer;   //uint32 ("random" number)
  3727.         uint32_t r4c1_widget_tag_tagnamestringlength;   //uint32
  3728.         uint32_t r4c1_widget_tag_tagid;      //uint32 (0xFFFFFFFF with tags)
  3729.         // char r4c1_widget_tag_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3730.        
  3731.         char r4c_conditional_widgets_name_unused[32];
  3732.         uint32_t r4c_conditional_widgets_flags; // toff 1188    32-bit 0x00000001
  3733.         uint16_t r4c_conditional_widgets_custom_controller_index_unused;
  3734.        
  3735.         // in cell here: 26 bytes of 0
  3736.        
  3737.     }r4c_conditional_widgets;
  3738.    
  3739.     // r4c1 dependency tagpathname strings go here
  3740.    
  3741.     struct dela_r5c {
  3742.         // representation 5 cells
  3743.         // r5c_child_widgets_
  3744.        
  3745.         // dependency r5c 1: widget tag DeLa
  3746.         char r5c1_widget_tag_tagclass[5];        //unsigned char[5]
  3747.         uint32_t r5c1_widget_tag_tagnamepointer;   //uint32 ("random" number)
  3748.         uint32_t r5c1_widget_tag_tagnamestringlength;   //uint32
  3749.         uint32_t r5c1_widget_tag_tagid;      //uint32 (0xFFFFFFFF with tags)
  3750.         // char r5c1_widget_tag_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3751.        
  3752.         char r5c_child_widgets_name_unused[32];
  3753.         uint32_t r5c_child_widgets_flags;   // toff 1268    32-bit 0x00000001
  3754.         uint16_t r5c_child_widgets_custom_controller_index;
  3755.         uint16_t r5c_child_widgets_vertical_offset;
  3756.         uint16_t r5c_child_widgets_horizontal_offset;
  3757.        
  3758.         // in cell here: 22 bytes of 0
  3759.        
  3760.     }r5c_child_widgets;
  3761.    
  3762.     // r5c1 dependency tagpathname strings go here
  3763.    
  3764. } type_meta_dela;
  3765.  
  3766. #pragma mark -- devc
  3767.  
  3768. typedef struct {
  3769.     uint16_t device_type;
  3770.     // 66, 1
  3771.     uint8_t flags;  // toff 66  8-bit 0x01
  3772.    
  3773.     uint32_t device_id;   // 16
  3774.     // offset 72 = 4 bytes of 0
  3775.     // little endian internal board values:
  3776.     uint32_t INTERNAL_device_id_offset_pointer;   // example value = 44 (for mt sparky tag)
  3777.     uint32_t INTERNAL_device_id_random1;
  3778.     uint32_t INTERNAL_device_id_sig_id;   // example value = 0x88999B00
  3779.    
  3780.     uint32_t profile;   // 8188 (the file data size of .sav "Halo Savegames" type profiles)
  3781.     // offset 92 = 4 bytes of 0
  3782.     // little endian internal board values:
  3783.     uint32_t INTERNAL_profile_offset_pointer;   // example value = 44 (for mt sparky tag, which is wrong), or 60 (for sparky tag, which is right)
  3784.     uint32_t INTERNAL_profile_random1;
  3785.     uint32_t INTERNAL_profile_sig_id;   // example value = 0x98999B00
  3786.    
  3787.     // offset 108 is the start of the device id data (which apparently is always going to be 16 bytes)
  3788.     // directly after that is the profile data, which is the data from the Halo Savegame .sav profile file that is loaded into the tag (so include a button to load the information and display the information...)
  3789.    
  3790.     // (include all values for .sav profile's device id here)
  3791.    
  3792.     // device id data:
  3793.    
  3794.     float DI_1;
  3795.     float DI_2;
  3796.     // little endian internal values:
  3797.     uint16_t DI_INTERNAL_1;   // example value = 27521
  3798.     uint16_t DI_INTERNAL_2;   // example value = 27493
  3799.     uint16_t DI_INTERNAL_3;   // example value = 26502
  3800.     uint16_t DI_INTERNAL_4;   // example value = 29653
  3801.    
  3802.     // (include all values for .sav profile here)
  3803.     // note that values in the .sav data are mostly in little endian
  3804.    
  3805.     // the first 302 bytes of the .sav file are zeroed (ignored, basically) in the "Sparky" test file, but there was at least the profile name in the start of the "[MT] Sparky" test file
  3806.     // the rest of the data is modified from what was in the .sav file, with the exception of most of the key binding settings; the last float value in the .sav file is not included in the data; in the Sparky test file, the end of the .sav file is a float value of 0.0988519 at offset 8188, but the data in the devc tag only has 8188 bytes, so it stops short of transferring that value
  3807.    
  3808. } type_meta_devc;
  3809.  
  3810. #pragma mark -- devi
  3811.  
  3812. typedef struct {
  3813.     // Guerilla misreads the first four bytes as 0x0000FFFF
  3814.     // this is actually a single 32-bit flags value, but only data for a 16-bit value with inverted bits is stored (meaning in the last two bytes)
  3815.     // so when interpreting the value, the default is 0x0000FFFF with all fields checked and unchecking a field subtracts by its amount
  3816.     //uint16_t INTERNAL_optimization;   // 0; this is probably some sort of mistake, but these first two bytes are written as 0
  3817.     uint32_t device_flags;   // only the first two bits are written, so both flag values set to off yields 0xFFFC (all 1's except the first two bits), toff 66 (untested, obvious)  0xFFFF
  3818.     float device_power_transition_time;
  3819.     float device_power_acceleration_time;
  3820.     float device_position_transition_time;
  3821.     float device_position_acceleration_time;
  3822.     float device_depowered_position_transition_time;
  3823.     float device_depowered_position_acceleration_time;
  3824.     uint16_t device_a_in;
  3825.     uint16_t device_b_in;
  3826.     uint16_t device_c_in;
  3827.     uint16_t device_d_in;
  3828.    
  3829.     // dependency 1: open (up) effe snd!
  3830.     char device_open_up_tagclass[5];         //unsigned char[5]   NOTE: Guerilla misreads offset 100, interpreting it as 0xFFFFFFFF
  3831.     uint32_t device_open_up_tagnamepointer;   //uint32 ("random" number)
  3832.     uint32_t device_open_up_tagnamestringlength;   //uint32
  3833.     uint32_t device_open_up_tagid;       //uint32 (0xFFFFFFFF with tags)
  3834.     // char device_open_up_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3835.    
  3836.     // dependency 2: close (down) effe snd!
  3837.     char device_close_down_tagclass[5];      //unsigned char[5]
  3838.     uint32_t device_close_down_tagnamepointer;   //uint32 ("random" number)
  3839.     uint32_t device_close_down_tagnamestringlength;   //uint32
  3840.     uint32_t device_close_down_tagid;        //uint32 (0xFFFFFFFF with tags)
  3841.     // char device_close_down_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3842.    
  3843.     // dependency 3: opened effe snd!
  3844.     char device_opened_tagclass[5];      //unsigned char[5]
  3845.     uint32_t device_opened_tagnamepointer;   //uint32 ("random" number)
  3846.     uint32_t device_opened_tagnamestringlength;   //uint32
  3847.     uint32_t device_opened_tagid;        //uint32 (0xFFFFFFFF with tags)
  3848.     // char device_opened_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3849.    
  3850.     // dependency 4: closed effe snd!
  3851.     char device_closed_tagclass[5];      //unsigned char[5]
  3852.     uint32_t device_closed_tagnamepointer;   //uint32 ("random" number)
  3853.     uint32_t device_closed_tagnamestringlength;   //uint32
  3854.     uint32_t device_closed_tagid;        //uint32 (0xFFFFFFFF with tags)
  3855.     // char device_closed_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3856.    
  3857.     // dependency 5: depowered effe snd!
  3858.     char device_depowered_tagclass[5];       //unsigned char[5]
  3859.     uint32_t device_depowered_tagnamepointer;   //uint32 ("random" number)
  3860.     uint32_t device_depowered_tagnamestringlength;   //uint32
  3861.     uint32_t device_depowered_tagid;         //uint32 (0xFFFFFFFF with tags)
  3862.     // char device_depowered_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3863.    
  3864.     // dependency 6: repowered effe snd!
  3865.     char device_repowered_tagclass[5];       //unsigned char[5]
  3866.     uint32_t device_repowered_tagnamepointer;   //uint32 ("random" number)
  3867.     uint32_t device_repowered_tagnamestringlength;   //uint32
  3868.     uint32_t device_repowered_tagid;         //uint32 (0xFFFFFFFF with tags)
  3869.     // char device_repowered_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3870.    
  3871.     float device_delay_time;   // offset 196
  3872.     // offset 200 = 8 bytes of 0
  3873.    
  3874.     // dependency 7: delay effect effe snd!
  3875.     char device_delay_effect_tagclass[5];        //unsigned char[5]
  3876.     uint32_t device_delay_effect_tagnamepointer;   //uint32 ("random" number)
  3877.     uint32_t device_delay_effect_tagnamestringlength;   //uint32
  3878.     uint32_t device_delay_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  3879.     // char device_delay_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3880.    
  3881.     float device_automatic_activation_radius;
  3882.    
  3883.     // offset 228 = 112 bytes of 0
  3884.    
  3885.     // dependency tagpathname strings go here
  3886.    
  3887. } type_meta_devi;
  3888.  
  3889. #pragma mark -- dobc
  3890.  
  3891. typedef struct {
  3892.     uint16_t collection_type;
  3893.     // offset 66 = 2 bytes of 0
  3894.     float global_z_offset;
  3895.     // offset 72 = 44 bytes of 0
  3896.    
  3897.     // dependency 1: sprite plate bitm
  3898.     char sprite_plate_tagclass[5];       //unsigned char[5]
  3899.     uint32_t sprite_plate_tagnamepointer;   //uint32 ("random" number)
  3900.     uint32_t sprite_plate_tagnamestringlength;   //uint32
  3901.     uint32_t sprite_plate_tagid;         //uint32 (0xFFFFFFFF with tags)
  3902.     // char sprite_plate_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  3903.    
  3904.     // representation 1 board, offset 132
  3905.     // r1b_types_
  3906.     uint32_t r1b_types_entrycount; // maximum of 16 cells
  3907.     uint32_t r1b_types_random_id;
  3908.     uint32_t r1b_types_sig_id; // example value = 0x6C2D9C00
  3909.    
  3910.     // offset 144 = 48 bytes of 0
  3911.    
  3912.     // dependency 1 tagpathname string goes here
  3913.    
  3914.     struct dobc_r1c {
  3915.         // representation 1 cells
  3916.         // r1c_types_
  3917.         char r1c_types_name[32];
  3918.         uint8_t r1c_types_sequence_index;   // -128 to 127
  3919.         uint8_t r1c_types_type_flags;   // toff 225 (untested)  0x0F
  3920.         // in cell here: 2 bytes of 0
  3921.         float r1c_types_color_override_factor_frac;
  3922.         // in cell here: 8 bytes of 0
  3923.         float r1c_types_near_fade_distance;
  3924.         float r1c_types_far_fade_distance;
  3925.         float r1c_types_size;
  3926.         // in cell here: 4 bytes of 0
  3927.         float r1c_types_minimum_color_r_frac;
  3928.         float r1c_types_minimum_color_g_frac;
  3929.         float r1c_types_minimum_color_b_frac;
  3930.         float r1c_types_maximum_color_r_frac;
  3931.         float r1c_types_maximum_color_g_frac;
  3932.         float r1c_types_maximum_color_b_frac;
  3933.         uint8_t r1c_types_ambient_color_a;
  3934.         uint8_t r1c_types_ambient_color_r;
  3935.         uint8_t r1c_types_ambient_color_g;
  3936.         uint8_t r1c_types_ambient_color_b;
  3937.         // in cell here: 4 bytes of 0
  3938.        
  3939.     }r1c_types;
  3940.    
  3941. } type_meta_dobc;
  3942.  
  3943. #pragma mark -- effe
  3944.  
  3945. typedef struct {
  3946.     uint32_t flags; // toff 64  32-bit 0x00000003
  3947.     uint16_t loop_start_event_sel;
  3948.     uint16_t loop_stop_event_sel;
  3949.     // offset 72 = 32 bytes of 0
  3950.    
  3951.     // representation 1 board, offset 104
  3952.     // r1b_locations_
  3953.     uint32_t r1b_locations_entrycount; // maximum of 32 cells
  3954.     uint32_t r1b_locations_random_id;
  3955.     uint32_t r1b_locations_sig_id; // example value = 0x98309D00
  3956.    
  3957.     // representation 2 board, offset 116
  3958.     // r2b_events_
  3959.     uint32_t r2b_events_entrycount; // maximum of 32 cells
  3960.     uint32_t r2b_events_random_id;
  3961.     uint32_t r2b_events_sig_id; // example value = 0x58349D00
  3962.    
  3963.     struct effe_r1c {
  3964.         // representation 1 cells
  3965.         // r1c_locations_
  3966.        
  3967.         char r1c_locations_marker_name[32];
  3968.        
  3969.     }r1c_locations;
  3970.    
  3971.     struct effe_r2c {
  3972.         // representation 2 cells
  3973.         // r2c_events_
  3974.         // 68
  3975.        
  3976.         // in cell here: 4 bytes of 0
  3977.         float r2c_events_skip_fraction_frac;
  3978.         float r2c_events_delay_bounds_from;
  3979.         float r2c_events_delay_bounds_to;
  3980.         float r2c_events_duration_bounds_from;
  3981.         float r2c_events_duration_bounds_to;
  3982.        
  3983.         // in cell here: 20 bytes of 0
  3984.        
  3985.         // representation 2 sub-board A
  3986.         // r2sbA_parts_
  3987.         uint32_t r2sbA_parts_entrycount; // maximum of 32 cells
  3988.         uint32_t r2sbA_parts_random_id;
  3989.         uint32_t r2sbA_parts_sig_id; // example value = 0xC8339D00
  3990.        
  3991.         // representation 2 sub-board B
  3992.         // r2sbB_particles_
  3993.         uint32_t r2sbB_particles_entrycount; // maximum of 32 cells
  3994.         uint32_t r2sbB_particles_random_id;
  3995.         uint32_t r2sbB_particles_sig_id; // example value = 0xB0329D00
  3996.        
  3997.     }r2c_events;
  3998.    
  3999.     // exstof: 3328
  4000.    
  4001.     struct effe_r2sc {
  4002.         struct effe_r2scA {
  4003.             // representation 2 sub-cells A
  4004.             // r2scA_parts_
  4005.             // 104
  4006.            
  4007.             uint16_t r2scA_parts_create_in_environment;
  4008.             uint16_t r2scA_parts_create_in_mode;
  4009.             uint16_t r2scA_parts_location_sel;
  4010.             // 1
  4011.             uint8_t r2scA_parts_flags;  // toff 202 8-bit 0x01
  4012.             // in cell here: 16 bytes of 0 (for map files instead: 12 bytes of 0 followed by a tag type according to the following note)
  4013.            
  4014.             // note from 002: when compiled into a map cache file, Tool adds a four-byte tag type string here to indicate how the following dependency is used.
  4015.             // the value can be: obje (for all obje types), jpt!, deca, ligh, pctl, unit (?) or snd!, and affects the behavior of the dependency.
  4016.             // "obje spawns an object, jpt! does damage, snd! plays a sound, etc."
  4017.             // this is probably a shorthand for determining to which memory table it should be added
  4018.            
  4019.             // dependency r2scA 1: type bipd jpt! deca devi ctrl lifi mach eqip garb item ligh obje pctl plac proj scen snd! ssce unit vehi weap
  4020.             char r2scA1_type_tagclass[5];        //unsigned char[5]
  4021.             uint32_t r2scA1_type_tagnamepointer;   //uint32 ("random" number)
  4022.             uint32_t r2scA1_type_tagnamestringlength;   //uint32
  4023.             uint32_t r2scA1_type_tagid;      //uint32 (0xFFFFFFFF with tags)
  4024.             // char r2scA1_type_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4025.            
  4026.             // in cell here: 24 bytes of 0
  4027.            
  4028.             float r2scA_parts_velocity_bounds_from;
  4029.             float r2scA_parts_velocity_bounds_to;
  4030.             float r2scA_parts_velocity_cone_angle_rad;
  4031.             float r2scA_parts_angular_velocity_bounds_from_rad;
  4032.             float r2scA_parts_angular_velocity_bounds_to_rad;
  4033.             float r2scA_parts_radius_modifier_bounds_from;
  4034.             float r2scA_parts_radius_modifier_bounds_to;
  4035.             // in cell here: 4 bytes of 0
  4036.            
  4037.             uint32_t r2scA_parts_scale_modifiers_a_scales_values;   //toff 292  32-bit 0x0000003F
  4038.             uint32_t r2scA_parts_scale_modifiers_b_scales_values;   //toff 296  32-bit 0x0000003F
  4039.            
  4040.         }r2scA_events_parts;
  4041.        
  4042.         // r2scA1 tagpathname strings go here
  4043.         // exstof: 6816
  4044.        
  4045.         struct effe_r2scB {
  4046.             // representation 2 sub-cells B
  4047.             // r2scB_particles_
  4048.            
  4049.             uint16_t r2scB_particles_create_in_environment;
  4050.             uint16_t r2scB_particles_create_in_mode;
  4051.             uint16_t r2scB_particles_create_in_camera_mode;
  4052.            
  4053.             // in cell here: 2 bytes of 0
  4054.             uint16_t r2scB_particles_location_sel;
  4055.             // in cell here: 2 bytes of 0
  4056.            
  4057.             float r2scB_particles_relative_direction_yaw_rad;
  4058.             float r2scB_particles_relative_direction_pitch_rad;
  4059.             float r2scB_particles_relative_offset_i;
  4060.             float r2scB_particles_relative_offset_j;
  4061.             float r2scB_particles_relative_offset_k;
  4062.            
  4063.             // in cell here: 52 bytes of 0
  4064.            
  4065.             // dependency r2scB 1: particle type part
  4066.             char r2scB1_particle_type_tagclass[5];       //unsigned char[5]
  4067.             uint32_t r2scB1_particle_type_tagnamepointer;   //uint32 ("random" number)
  4068.             uint32_t r2scB1_particle_type_tagnamestringlength;   //uint32
  4069.             uint32_t r2scB1_particle_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  4070.             // char r2scB1_particle_type_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4071.            
  4072.             uint32_t r2scB_particles_flags; // toff 400 32-bit 0x0000001F
  4073.            
  4074.             uint16_t r2scB_particles_distribution_function;
  4075.             // in cell here: 2 bytes of 0
  4076.            
  4077.             uint16_t r2scB_particles_count_from;
  4078.             uint16_t r2scB_particles_count_to;
  4079.            
  4080.             float r2scB_particles_distribution_radius_from;
  4081.             float r2scB_particles_distribution_radius_to;
  4082.             // in cell here: 12 bytes of 0
  4083.            
  4084.             float r2scB_particles_velocity_from;
  4085.             float r2scB_particles_velocity_to;
  4086.             float r2scB_particles_velocity_cone_angle_rad;
  4087.             float r2scB_particles_angular_velocity_from_rad;
  4088.             float r2scB_particles_angular_velocity_to_rad;
  4089.            
  4090.             // in cell here: 8 bytes of 0
  4091.            
  4092.             float r2scB_particles_radius_from;
  4093.             float r2scB_particles_radius_to;
  4094.            
  4095.             // in cell here: 8 bytes of 0
  4096.            
  4097.             float r2scB_particles_tint_lower_bound_a_frac;
  4098.             float r2scB_particles_tint_lower_bound_r_frac;
  4099.             float r2scB_particles_tint_lower_bound_g_frac;
  4100.             float r2scB_particles_tint_lower_bound_b_frac;
  4101.             float r2scB_particles_tint_upper_bound_a_frac;
  4102.             float r2scB_particles_tint_upper_bound_r_frac;
  4103.             float r2scB_particles_tint_upper_bound_g_frac;
  4104.             float r2scB_particles_tint_upper_bound_b_frac;
  4105.            
  4106.             // in cell here: 16 bytes of 0
  4107.            
  4108.             uint32_t r2scB_particles_scale_modifiers_a_scales_values;   // toff 524 32-bit 0x00000FFF
  4109.             uint32_t r2scB_particles_scale_modifiers_b_scales_values;   // toff 528 32-bit 0x00000FFF
  4110.            
  4111.         }r2scB_events_particles;
  4112.        
  4113.         // r2scB1 tagpathname strings go here
  4114.        
  4115.     }r2sc_container;
  4116.    
  4117. } type_meta_effe;
  4118.  
  4119. #pragma mark -- elec
  4120.  
  4121. typedef struct {
  4122.     uint32_t count;
  4123.     // offset 68 = 16 bytes of 0
  4124.     float near_fade_distance;
  4125.     float far_fade_distance;
  4126.     // offset 92 = 16 bytes of 0
  4127.     uint16_t jitter_scale_source;
  4128.     uint16_t thickness_scale_source;
  4129.     uint16_t tint_modulation_source;
  4130.     uint16_t brightness_scale_source;
  4131.    
  4132.     // dependency 1: bitmap bitm
  4133.     char bitmap_tagclass[5];         //unsigned char[5]
  4134.     uint32_t bitmap_tagnamepointer;   //uint32 ("random" number)
  4135.     uint32_t bitmap_tagnamestringlength;   //uint32
  4136.     uint32_t bitmap_tagid;       //uint32 (0xFFFFFFFF with tags)
  4137.     // char bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4138.    
  4139.     // offset 132 = 84 bytes of 0
  4140.    
  4141.     // representation 1 board, offset 216
  4142.     // r1b_markers_
  4143.     uint32_t r1b_markers_entrycount; // maximum of 16 cells
  4144.     uint32_t r1b_markers_random_id;
  4145.     uint32_t r1b_markers_sig_id; // example value = 0x30069D00
  4146.    
  4147.     // representation 2 board, offset 228
  4148.     // r2b_shader_
  4149.     uint32_t r2b_shader_entrycount; // maximum of 1 cell
  4150.     uint32_t r2b_shader_random_id;
  4151.     uint32_t r2b_shader_sig_id; // example value = 0xF0069D00
  4152.    
  4153.     // offset 240 = 88 bytes of 0
  4154.    
  4155.     // dependency 1 tagpathname string goes here
  4156.    
  4157.     struct elec_r1c {
  4158.         // representation 1 cells
  4159.         // r1c_markers_
  4160.         // 228
  4161.        
  4162.         char r1c_markers_attachment_marker[32];
  4163.         // 1
  4164.         uint8_t r1c_markers_flags;  // toff 360 8-bit 0x01
  4165.         // 2
  4166.         uint16_t r1c_markers_octaves_to_next_marker;
  4167.        
  4168.         // in cell here: 78 bytes of 0
  4169.        
  4170.         float r1c_markers_random_position_bounds_i;
  4171.         float r1c_markers_random_position_bounds_j;
  4172.         float r1c_markers_random_position_bounds_k;
  4173.        
  4174.         float r1c_markers_random_jitter;
  4175.         float r1c_markers_thickness;
  4176.        
  4177.         float r1c_markers_tint_a_frac;
  4178.         float r1c_markers_tint_r_frac;
  4179.         float r1c_markers_tint_g_frac;
  4180.         float r1c_markers_tint_b_frac;
  4181.        
  4182.         // in cell here: 76 bytes of 0
  4183.        
  4184.     }r1c_markers;
  4185.    
  4186.     struct elec_r2c {
  4187.         // representation 2 cells
  4188.         // r2c_shader_
  4189.        
  4190.         // in cell here: 41 bytes of 0
  4191.        
  4192.         uint8_t r2c_shader_shader_flags;    // toff 594 8-bit 0x07
  4193.         uint16_t r2c_shader_framebuffer_blend_function;
  4194.         uint16_t r2c_shader_framebuffer_fade_mode;
  4195.         // 1
  4196.         uint8_t r2c_shader_map_flags;   // toff 602 8-bit 0x01
  4197.        
  4198.         // in cell here: 132 bytes of 0 (or the rest of the particle shader metadata) (confirmed use as padding by Guerilla)
  4199.        
  4200.     }r2c_shader;
  4201.    
  4202. } type_meta_elec;
  4203.  
  4204. #pragma mark -- eqip
  4205.  
  4206. typedef struct {
  4207.    
  4208.     // OBJE 1 DATA START
  4209.     uint16_t INTERNAL_obje_index;   // 3 (little endian)
  4210.     // 66, 1
  4211.     uint8_t flags;  // toff 66  8-bit 0x0F
  4212.     float bounding_radius;
  4213.     float bounding_offset_x;
  4214.     float bounding_offset_y;
  4215.     float bounding_offset_z;
  4216.     float origin_offset_x;
  4217.     float origin_offset_y;
  4218.     float origin_offset_z;
  4219.     float acceleration_scale;
  4220.     // offset 100 = 4 bytes of 0
  4221.    
  4222.     // dependency 1: model mod2
  4223.     char model_tagclass[5];      //unsigned char[5]
  4224.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  4225.     uint32_t model_tagnamestringlength;   //uint32
  4226.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  4227.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4228.    
  4229.     // dependency 2: animation graph antr
  4230.     char animation_graph_tagclass[5];        //unsigned char[5]
  4231.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  4232.     uint32_t animation_graph_tagnamestringlength;   //uint32
  4233.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  4234.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4235.    
  4236.     // offset 136 = 40 bytes of 0
  4237.    
  4238.     // dependency 3: collision model coll
  4239.     char collision_model_tagclass[5];        //unsigned char[5]
  4240.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  4241.     uint32_t collision_model_tagnamestringlength;   //uint32
  4242.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  4243.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4244.    
  4245.     // dependency 4: physics phys
  4246.     char physics_tagclass[5];        //unsigned char[5]
  4247.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  4248.     uint32_t physics_tagnamestringlength;   //uint32
  4249.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  4250.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4251.    
  4252.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  4253.     char modifier_shader_tagclass[5];        //unsigned char[5]
  4254.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  4255.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  4256.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  4257.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4258.    
  4259.     // dependency 6: creation effect effe
  4260.     char creation_effect_tagclass[5];        //unsigned char[5]
  4261.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  4262.     uint32_t creation_effect_tagnamestringlength;   //uint32
  4263.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  4264.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4265.    
  4266.     // offset 240 = 84 bytes of 0
  4267.    
  4268.     float render_bounding_radius;
  4269.    
  4270.     uint16_t export_to_functions_a_in;
  4271.     uint16_t export_to_functions_b_in;
  4272.     uint16_t export_to_functions_c_in;
  4273.     uint16_t export_to_functions_d_in;
  4274.    
  4275.     // offset 336 = 44 bytes of 0
  4276.    
  4277.     uint16_t export_to_functions_hud_text_message_index;
  4278.     uint16_t export_to_functions_forced_shader_permutation_index;
  4279.    
  4280.     // representation 1 board, offset 384
  4281.     // r1b_attachments_
  4282.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  4283.     uint32_t r1b_attachments_random_id;
  4284.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  4285.    
  4286.     // representation 2 board, offset 396
  4287.     // r2b_widgets_
  4288.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  4289.     uint32_t r2b_widgets_random_id;
  4290.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  4291.    
  4292.     // representation 3 board, offset 408
  4293.     // r3b_functions_
  4294.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  4295.     uint32_t r3b_functions_random_id;
  4296.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  4297.    
  4298.     // representation 4 board, offset 420
  4299.     // r4b_change_colors_
  4300.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  4301.     uint32_t r4b_change_colors_random_id;
  4302.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  4303.    
  4304.     // representation 5 board, offset 432
  4305.     // r5b_predicted_resources_
  4306.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  4307.     uint32_t r5b_predicted_resources_random_id;
  4308.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  4309.    
  4310.     // OBJE 1 DATA END
  4311.    
  4312.     // ITEM DATA START
  4313.    
  4314.     uint32_t item_flags;    //toff 444  32-bit 0x00000007
  4315.     uint16_t message_index_message_index;
  4316.     uint16_t message_index_sort_order;
  4317.     float message_index_scale;
  4318.     uint16_t message_index_hud_message_value_scale;
  4319.    
  4320.     // offset 458 = 18 bytes of 0
  4321.    
  4322.     uint16_t message_index_a_in;   // "none" (0) is the only option for these four in's (offset 476)
  4323.     uint16_t message_index_b_in;
  4324.     uint16_t message_index_c_in;
  4325.     uint16_t message_index_d_in;
  4326.    
  4327.     // offset 484 = 164 bytes of 0
  4328.    
  4329.     // dependency 7: material effects foot
  4330.     char material_effects_tagclass[5];       //unsigned char[5]
  4331.     uint32_t material_effects_tagnamepointer;   //uint32 ("random" number)
  4332.     uint32_t material_effects_tagnamestringlength;   //uint32
  4333.     uint32_t material_effects_tagid;         //uint32 (0xFFFFFFFF with tags)
  4334.     // char material_effects_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4335.    
  4336.     // dependency 8: collision sound snd!
  4337.     char collision_sound_tagclass[5];        //unsigned char[5]
  4338.     uint32_t collision_sound_tagnamepointer;   //uint32 ("random" number)
  4339.     uint32_t collision_sound_tagnamestringlength;   //uint32
  4340.     uint32_t collision_sound_tagid;      //uint32 (0xFFFFFFFF with tags)
  4341.     // char collision_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4342.    
  4343.     // offset 680 = 120 bytes of 0
  4344.    
  4345.     float message_index_detonation_delay_from;   // offset 800
  4346.     float message_index_detonation_delay_to;
  4347.    
  4348.     // dependency 9: detonating effect effe
  4349.     char detonating_effect_tagclass[5];      //unsigned char[5]
  4350.     uint32_t detonating_effect_tagnamepointer;   //uint32 ("random" number)
  4351.     uint32_t detonating_effect_tagnamestringlength;   //uint32
  4352.     uint32_t detonating_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  4353.     // char detonating_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4354.    
  4355.     // dependency 10: detonation effect effe
  4356.     char detonation_effect_tagclass[5];      //unsigned char[5]
  4357.     uint32_t detonation_effect_tagnamepointer;   //uint32 ("random" number)
  4358.     uint32_t detonation_effect_tagnamestringlength;   //uint32
  4359.     uint32_t detonation_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  4360.     // char detonation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4361.    
  4362.    
  4363.     // ITEM DATA END
  4364.    
  4365.    
  4366.     uint16_t message_index_powerup_type;
  4367.     uint16_t message_index_grenade_type;
  4368.    
  4369.     float message_index_powerup_time;
  4370.    
  4371.     // dependency 11: pickup sound snd!
  4372.     char pickup_sound_tagclass[5];       //unsigned char[5]
  4373.     uint32_t pickup_sound_tagnamepointer;   //uint32 ("random" number)
  4374.     uint32_t pickup_sound_tagnamestringlength;   //uint32
  4375.     uint32_t pickup_sound_tagid;         //uint32 (0xFFFFFFFF with tags)
  4376.     // char pickup_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4377.    
  4378.    
  4379.     // offset 864 = 144 bytes of 0
  4380.    
  4381.     // dependencies 1-6 tagpathname strings go here
  4382.    
  4383.     // OBJE DATA 2 START
  4384.    
  4385.     struct eqip_r1c {
  4386.         // representation 1 cells
  4387.         // r1c_attachments_
  4388.        
  4389.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  4390.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  4391.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  4392.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  4393.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  4394.         // char r1c_attachments_type_tagnamestring[255];
  4395.        
  4396.         char r1c_attachments_marker[32];
  4397.         uint16_t r1c_attachments_primary_scale;
  4398.         uint16_t r1c_attachments_secondary_scale;
  4399.         uint16_t r1c_attachments_change_color;
  4400.        
  4401.         // in cell here: 18 bytes of 0
  4402.        
  4403.     }r1c_attachments;
  4404.    
  4405.     // r1c 1 tag name strings here
  4406.    
  4407.     struct eqip_r2c {
  4408.         // representation 2 cells
  4409.         // r2c_widgets_
  4410.        
  4411.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  4412.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  4413.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  4414.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  4415.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  4416.         // char r2c_widgets_reference_tagnamestring[255];
  4417.        
  4418.         // in cell here: 16 bytes of 0
  4419.     }r2c_widgets;
  4420.    
  4421.     // r2c 1 tag name strings here
  4422.    
  4423.     struct eqip_r3c {
  4424.         // representation 3 cells
  4425.         // r3c_functions_
  4426.        
  4427.         uint32_t r3c_functions_flags;   // toff 1008    32-bit 0x00000007
  4428.         float r3c_functions_period;
  4429.         uint16_t r3c_functions_scale_period_by;
  4430.         uint16_t r3c_functions_function;
  4431.         uint16_t r3c_functions_scale_function_by;
  4432.         uint16_t r3c_functions_wobble_function;
  4433.         float r3c_functions_wobble_period;
  4434.         float r3c_functions_wobble_magnitude;
  4435.         float r3c_functions_square_wave_threshold_frac;
  4436.         uint16_t r3c_functions_step_count;
  4437.         uint16_t r3c_functions_map_to;
  4438.         uint16_t r3c_functions_sawtooth_count;
  4439.         uint16_t r3c_functions_add;
  4440.         uint16_t r3c_functions_scale_result_by;
  4441.         uint16_t r3c_functions_bounds_mode;
  4442.         float r3c_functions_bounds_from_frac;
  4443.         float r3c_functions_bounds_to_frac;
  4444.         // in cell here: 6 bytes of 0
  4445.         uint16_t r3c_functions_turn_off_with_sel;
  4446.         float r3c_functions_scale_by;
  4447.         // in cell here: 268 bytes of 0 (reminiscent of the pre-padding of other times strings come after cells)
  4448.         char r3c_functions_usage[32];
  4449.        
  4450.     }r3c_functions;
  4451.    
  4452.     struct eqip_r4c {
  4453.         // representation 4 cells
  4454.         // r4c_change_colors_
  4455.         uint16_t r4c_change_colors_darken_by;
  4456.         uint16_t r4c_change_colors_scale_by;
  4457.         uint32_t r4c_change_colors_scale_flags; // toff 1372    32-bit 0x00000003
  4458.         float r4c_change_colors_color_lower_bound_r_frac;
  4459.         float r4c_change_colors_color_lower_bound_g_frac;
  4460.         float r4c_change_colors_color_lower_bound_b_frac;
  4461.         float r4c_change_colors_color_upper_bound_r_frac;
  4462.         float r4c_change_colors_color_upper_bound_g_frac;
  4463.         float r4c_change_colors_color_upper_bound_b_frac;
  4464.        
  4465.         // representation 4 sub-board A
  4466.         // r4sbA_permutations_
  4467.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  4468.         uint32_t r4sbA_permutations_random_id1;
  4469.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  4470.     }r4c_change_colors;
  4471.    
  4472.     struct eqip_r4scA
  4473.     {
  4474.         // representation 4 sub-cells A
  4475.         // r4scA_permutations_
  4476.         float r4scA_permutations_weight_frac;
  4477.         float r4scA_permutations_color_lower_bound_r_frac;
  4478.         float r4scA_permutations_color_lower_bound_g_frac;
  4479.         float r4scA_permutations_color_lower_bound_b_frac;
  4480.         float r4scA_permutations_color_upper_bound_r_frac;
  4481.         float r4scA_permutations_color_upper_bound_g_frac;
  4482.         float r4scA_permutations_color_upper_bound_b_frac;
  4483.     }r4sc_change_colors_permutations;
  4484.    
  4485.     struct eqip_r5c {
  4486.         // representation 5 cells
  4487.         // r5c_predicted_resources_
  4488.         uint16_t r5c_predicted_resources_type;
  4489.         uint16_t r5c_predicted_resources_resource_index;
  4490.         uint32_t r5c_predicted_resources_tag_index;
  4491.     }r5c_predicted_resources;
  4492.    
  4493.     // OBJE DATA 2 END
  4494.    
  4495.     // dependencies 7-11 tagpathname strings go here
  4496.    
  4497. } type_meta_eqip;
  4498.  
  4499. #pragma mark -- flag
  4500.  
  4501. typedef struct {
  4502.     // offset 64 = 4 bytes of 0
  4503.     uint16_t trailing_edge_shape;
  4504.     uint16_t trailing_edge_shape_offset;
  4505.     uint16_t attached_edge_shape;
  4506.     // offset 74 = 2 bytes of 0
  4507.     uint16_t width;
  4508.     uint16_t height;
  4509.     float cell_width;
  4510.     float cell_height;
  4511.    
  4512.     // dependency 1: red flag shader shdr senv soso schi scex sotr sgla smet spla swat
  4513.     char red_flag_shader_tagclass[5];        //unsigned char[5]
  4514.     uint32_t red_flag_shader_tagnamepointer;   //uint32 ("random" number)
  4515.     uint32_t red_flag_shader_tagnamestringlength;   //uint32
  4516.     uint32_t red_flag_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  4517.     // char red_flag_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4518.    
  4519.     // dependency 2: physics pphy
  4520.     char physics_tagclass[5];        //unsigned char[5]
  4521.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  4522.     uint32_t physics_tagnamestringlength;   //uint32
  4523.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  4524.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4525.    
  4526.     float wind_noise;
  4527.    
  4528.     // offset 124 = 8 bytes of 0
  4529.    
  4530.     // dependency 3: blue flag shader shdr senv soso schi scex sotr sgla smet spla swat
  4531.     char blue_flag_shader_tagclass[5];       //unsigned char[5]
  4532.     uint32_t blue_flag_shader_tagnamepointer;   //uint32 ("random" number)
  4533.     uint32_t blue_flag_shader_tagnamestringlength;   //uint32
  4534.     uint32_t blue_flag_shader_tagid;         //uint32 (0xFFFFFFFF with tags)
  4535.     // char blue_flag_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4536.    
  4537.     // representation 1 board, offset 148
  4538.     // r1b_attachment_points_
  4539.     uint32_t r1b_attachment_points_entrycount; // maximum of 5 cells
  4540.     uint32_t r1b_attachment_points_random_id;
  4541.     uint32_t r1b_attachment_points_sig_id; // example value = 0x54159D00
  4542.    
  4543.     // dependencies 1-3 tagpathname strings go here
  4544.    
  4545.     struct flag_r1c {
  4546.         // representation 1 cells
  4547.         // r1c_attachment_points_
  4548.         uint16_t r1c_attachment_points_height_to_next_attachment;
  4549.         // in cell here: 18 bytes of 0
  4550.         char r1c_attachment_points_marker_name[32];
  4551.     }r1c_attachment_points;
  4552.    
  4553. } type_meta_flag;
  4554.  
  4555. #pragma mark -- fog
  4556.  
  4557. typedef struct {
  4558.    
  4559.     uint32_t flags_flags;   // toff 64  32-bit 0x00000007
  4560.    
  4561.     // offset 68 = 84 bytes of 0
  4562.    
  4563.     float density_maximum_density_frac;   // offset 152
  4564.     // offset 156 = 4 bytes of 0
  4565.     float density_opaque_distance;
  4566.     // offset 164 = 4 bytes of 0
  4567.     float density_opaque_depth;
  4568.     // offset 172 = 8 bytes of 0
  4569.     float density_distance_to_water_plane;
  4570.    
  4571.     float color_color_r_frac;
  4572.     float color_color_g_frac;
  4573.     float color_color_b_frac;
  4574.    
  4575.     // 196, 1
  4576.     uint8_t screen_layers_flags;    // toff 196 8-bit 0x07
  4577.     uint16_t screen_layers_layer_count;
  4578.     float screen_layers_distance_gradient_from;
  4579.     float screen_layers_distance_gradient_to;
  4580.     float screen_layers_density_gradient_from_frac;
  4581.     float screen_layers_density_gradient_to_frac;
  4582.     float screen_layers_start_distance_from_fog_plane;
  4583.     // offset 220 = 4 bytes of 0
  4584.    
  4585.     uint8_t screen_layers_color_a;   // not in Guerilla UI, so probably unused
  4586.     uint8_t screen_layers_color_r;
  4587.     uint8_t screen_layers_color_g;
  4588.     uint8_t screen_layers_color_b;
  4589.    
  4590.     float screen_layers_rotation_multiplier_frac;
  4591.     float screen_layers_strafing_multiplier_frac;
  4592.     float screen_layers_zoom_multiplier_frac;
  4593.     // offset 240 = 8 bytes of 0
  4594.    
  4595.     float screen_layers_map_scale;   // offset 248
  4596.    
  4597.     // dependency 1: map bitm
  4598.     char map_tagclass[5];        //unsigned char[5]
  4599.     uint32_t map_tagnamepointer;   //uint32 ("random" number)
  4600.     uint32_t map_tagnamestringlength;   //uint32
  4601.     uint32_t map_tagid;      //uint32 (0xFFFFFFFF with tags)
  4602.     // char map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4603.    
  4604.     float screen_layer_animation_animation_period;
  4605.     // offset 272 = 4 bytes of 0
  4606.     float screen_layer_animation_wind_velocity_from;
  4607.     float screen_layer_animation_wind_velocity_to;
  4608.     float screen_layer_animation_wind_period_from;
  4609.     float screen_layer_animation_wind_period_to;
  4610.     float screen_layer_animation_wind_acceleration_weight_frac;
  4611.     float screen_layer_animation_wind_perpendicular_weight_frac;
  4612.     // offset 300 = 8 bytes of 0
  4613.    
  4614.     // dependency 2: background sound lsnd
  4615.     char background_sound_tagclass[5];       //unsigned char[5]
  4616.     uint32_t background_sound_tagnamepointer;   //uint32 ("random" number)
  4617.     uint32_t background_sound_tagnamestringlength;   //uint32
  4618.     uint32_t background_sound_tagid;         //uint32 (0xFFFFFFFF with tags)
  4619.     // char background_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4620.    
  4621.     // dependency 3: sound environment snde
  4622.     char sound_environment_tagclass[5];      //unsigned char[5]
  4623.     uint32_t sound_environment_tagnamepointer;   //uint32 ("random" number)
  4624.     uint32_t sound_environment_tagnamestringlength;   //uint32
  4625.     uint32_t sound_environment_tagid;        //uint32 (0xFFFFFFFF with tags)
  4626.     // char sound_environment_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4627.    
  4628.     // offset 340 = 120 bytes of 0
  4629.    
  4630.     // dependency tagpathname strings go here
  4631.    
  4632. } type_meta_fog;
  4633.  
  4634. #pragma mark -- font
  4635.  
  4636. typedef struct {
  4637.     uint32_t flags;
  4638.     uint16_t ascending_height;
  4639.     uint16_t descending_height;
  4640.     uint16_t leading_height;
  4641.     uint16_t leadin_width_calc;   // calculated regardless of the value stored here; Guerilla does not display the stored value, it displays the value that it calculates for this when the tag is opened. (offset 74)
  4642.    
  4643.     // offset 76 = 36 bytes of 0
  4644.    
  4645.     // representation 1 board, offset 112
  4646.     // r1b_character_tables_
  4647.     uint32_t r1b_character_tables_entrycount; // maximum of 256 cells
  4648.     uint32_t r1b_character_tables_random_id;
  4649.     uint32_t r1b_character_tables_sig_id; // example value = 0x1C609D00
  4650.    
  4651.     // dependency 1: bold font
  4652.     char bold_tagclass[5];       //unsigned char[5]
  4653.     uint32_t bold_tagnamepointer;   //uint32 ("random" number)
  4654.     uint32_t bold_tagnamestringlength;   //uint32
  4655.     uint32_t bold_tagid;         //uint32 (0xFFFFFFFF with tags)
  4656.     // char bold_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4657.    
  4658.     // dependency 2: italic font
  4659.     char italic_tagclass[5];         //unsigned char[5]
  4660.     uint32_t italic_tagnamepointer;   //uint32 ("random" number)
  4661.     uint32_t italic_tagnamestringlength;   //uint32
  4662.     uint32_t italic_tagid;       //uint32 (0xFFFFFFFF with tags)
  4663.     // char italic_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4664.    
  4665.     // dependency 3: condense font
  4666.     char condense_tagclass[5];       //unsigned char[5]
  4667.     uint32_t condense_tagnamepointer;   //uint32 ("random" number)
  4668.     uint32_t condense_tagnamestringlength;   //uint32
  4669.     uint32_t condense_tagid;         //uint32 (0xFFFFFFFF with tags)
  4670.     // char condense_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4671.    
  4672.     // dependency 4: underline font
  4673.     char underline_tagclass[5];      //unsigned char[5]
  4674.     uint32_t underline_tagnamepointer;   //uint32 ("random" number)
  4675.     uint32_t underline_tagnamestringlength;   //uint32
  4676.     uint32_t underline_tagid;        //uint32 (0xFFFFFFFF with tags)
  4677.     // char underline_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4678.    
  4679.     // representation 2 board, offset 188
  4680.     // r2b_characters_
  4681.     uint32_t r2b_characters_entrycount; // maximum of 32000 cells
  4682.     uint32_t r2b_characters_random_id;
  4683.     uint32_t r2b_characters_sig_id; // example value = 0x785F9D00
  4684.    
  4685.     uint32_t pixels;
  4686.     // offset 204 = 4 bytes of 0
  4687.     // little endian internal board values:
  4688.     uint32_t INTERNAL_compressed_pixels_offset_pointer;   // example values = 10268 (wrong) and 156 (right)
  4689.     uint32_t INTERNAL_compressed_pixels_random1;
  4690.     uint32_t INTERNAL_compressed_pixels_sig_id;   // example value = 0xA45F9D00
  4691.    
  4692.     struct font_r1c {
  4693.         // representation 1 cells
  4694.         // r1c_character_tables_
  4695.        
  4696.         // representation 1 sub-board A
  4697.         // r1sbA_character_table_
  4698.         uint32_t r1sbA_character_table_entrycount; // maximum of 256 cells
  4699.         uint32_t r1sbA_character_table_random_id;
  4700.         uint32_t r1sbA_character_table_sig_id; // example value = 0xD85F9D00
  4701.        
  4702.     }r1c_character_tables;
  4703.    
  4704.     struct font_r1scA {   // offset 3292 in tests
  4705.         // representation 1 sub-cells A
  4706.         // r1scA_character_table_
  4707.        
  4708.         uint16_t r1scA_character_table_character_index_sel;
  4709.        
  4710.     }r1scA_character_tables_character_table;
  4711.    
  4712.     // dependency tagpathname strings go here (offset 134364 in "font blank" test)
  4713.    
  4714.     struct font_r2c {
  4715.         // representation 2 cells
  4716.         // r2c_characters_
  4717.        
  4718.         uint16_t r2c_characters_character;   // functionally uint16_t
  4719.         uint16_t r2c_characters_character_width;
  4720.         uint16_t r2c_characters_bitmap_width;
  4721.         uint16_t r2c_characters_bitmap_height;
  4722.         uint16_t r2c_characters_bitmap_origin_x;   // interpret these two as signed
  4723.         uint16_t r2c_characters_bitmap_origin_y;
  4724.         uint16_t r2c_characters_hardware_character_index_calc;   // -1 if no data, calculated regardless of stored value
  4725.         // in cell here: 2 bytes of 0
  4726.         uint32_t r2c_characters_pixels_offset;   // interpret as signed
  4727.        
  4728.     }r2c_characters;
  4729.    
  4730. } type_meta_font;
  4731.  
  4732. #pragma mark -- foot
  4733.  
  4734. typedef struct {
  4735.    
  4736.     // representation 1 board, offset 64
  4737.     // r1b_effects_
  4738.     uint32_t r1b_effects_entrycount; // maximum of 13 cells (walk, run, sliding, shuffle, jump, jump land, biped unused1, biped unused2, impact, vehicle tire slip, vehicle chassis slip, vehicle unused 1, vehicle unused 2)
  4739.     uint32_t r1b_effects_random_id;
  4740.     uint32_t r1b_effects_sig_id; // example value = 0x50169C00
  4741.    
  4742.     // offset 76 = 128 bytes of 0
  4743.    
  4744.     struct foot_r1c {
  4745.         // representation 1 cells
  4746.         // r1c_effects_
  4747.        
  4748.         // representation 1 sub-board A
  4749.         // r1sbA_materials_
  4750.         uint32_t r1sbA_materials_entrycount; // maximum of 33 cells (dirt, sand, stone, snow, wood, metal (hollow), metal (thin), metal (thick), rubber, glass, force field, grunt, hunter armor, hunter skin, elite, jackal, jackal energy shield, engineer skin, engineer force field, flood combat form, flood carrier form, cyborg armor, cyborg energy shield, human armor, human skin, sentinel, monitor, plastic, water, leaves, elite energy shield, ice, hunter shield)
  4751.         uint32_t r1sbA_materials_random_id;
  4752.         uint32_t r1sbA_materials_sig_id; // example value = 0x00169C00
  4753.        
  4754.         // in cell here: 16 bytes of 0
  4755.        
  4756.     }r1c_effects;
  4757.    
  4758.     struct foot_r1sc {
  4759.         struct foot_r1scA {
  4760.             // representation 1 sub-cells A
  4761.             // r1scA_materials_
  4762.            
  4763.             // dependency r1scA 1: effect effe
  4764.             char r1scA_effect_tagclass[5];       //unsigned char[5]
  4765.             uint32_t r1scA_effect_tagnamepointer;   //uint32 ("random" number)
  4766.             uint32_t r1scA_effect_tagnamestringlength;   //uint32
  4767.             uint32_t r1scA_effect_tagid;         //uint32 (0xFFFFFFFF with tags)
  4768.             // char r1scA_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4769.            
  4770.             // dependency r1scA 2: sound snd!
  4771.             char r1scA_sound_tagclass[5];        //unsigned char[5]
  4772.             uint32_t r1scA_sound_tagnamepointer;   //uint32 ("random" number)
  4773.             uint32_t r1scA_sound_tagnamestringlength;   //uint32
  4774.             uint32_t r1scA_sound_tagid;      //uint32 (0xFFFFFFFF with tags)
  4775.             // char r1scA_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4776.            
  4777.             // in cell here: 16 bytes of 0
  4778.            
  4779.         }r1scA_effects_materials;
  4780.        
  4781.         // r1scA dependencies' tagpathname strings go here
  4782.     }r1sc_container;
  4783.    
  4784. } type_meta_foot;
  4785.  
  4786. #pragma mark -- garb
  4787.  
  4788. typedef struct {
  4789.    
  4790.     // OBJE 1 DATA START
  4791.     uint16_t INTERNAL_obje_index;   // 4 (little endian) -- besides this value, the priority value, and the tag type string, the rest of the file is the same as eqip, but without the last four values that eqip has at the end
  4792.     // 66, 1
  4793.     uint8_t flags;  // toff 66  8-bit 0x0F
  4794.     float bounding_radius;
  4795.     float bounding_offset_x;
  4796.     float bounding_offset_y;
  4797.     float bounding_offset_z;
  4798.     float origin_offset_x;
  4799.     float origin_offset_y;
  4800.     float origin_offset_z;
  4801.     float acceleration_scale;
  4802.     // offset 100 = 4 bytes of 0
  4803.    
  4804.     // dependency 1: model mod2
  4805.     char model_tagclass[5];      //unsigned char[5]
  4806.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  4807.     uint32_t model_tagnamestringlength;   //uint32
  4808.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  4809.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4810.    
  4811.     // dependency 2: animation graph antr
  4812.     char animation_graph_tagclass[5];        //unsigned char[5]
  4813.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  4814.     uint32_t animation_graph_tagnamestringlength;   //uint32
  4815.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  4816.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4817.    
  4818.     // offset 136 = 40 bytes of 0
  4819.    
  4820.     // dependency 3: collision model coll
  4821.     char collision_model_tagclass[5];        //unsigned char[5]
  4822.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  4823.     uint32_t collision_model_tagnamestringlength;   //uint32
  4824.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  4825.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4826.    
  4827.     // dependency 4: physics phys
  4828.     char physics_tagclass[5];        //unsigned char[5]
  4829.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  4830.     uint32_t physics_tagnamestringlength;   //uint32
  4831.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  4832.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4833.    
  4834.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  4835.     char modifier_shader_tagclass[5];        //unsigned char[5]
  4836.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  4837.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  4838.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  4839.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4840.    
  4841.     // dependency 6: creation effect effe
  4842.     char creation_effect_tagclass[5];        //unsigned char[5]
  4843.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  4844.     uint32_t creation_effect_tagnamestringlength;   //uint32
  4845.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  4846.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4847.    
  4848.     // offset 240 = 84 bytes of 0
  4849.    
  4850.     float render_bounding_radius;
  4851.    
  4852.     uint16_t export_to_functions_a_in;
  4853.     uint16_t export_to_functions_b_in;
  4854.     uint16_t export_to_functions_c_in;
  4855.     uint16_t export_to_functions_d_in;
  4856.    
  4857.     // offset 336 = 44 bytes of 0
  4858.    
  4859.     uint16_t export_to_functions_hud_text_message_index;
  4860.     uint16_t export_to_functions_forced_shader_permutation_index;
  4861.    
  4862.     // representation 1 board, offset 384
  4863.     // r1b_attachments_
  4864.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  4865.     uint32_t r1b_attachments_random_id;
  4866.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  4867.    
  4868.     // representation 2 board, offset 396
  4869.     // r2b_widgets_
  4870.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  4871.     uint32_t r2b_widgets_random_id;
  4872.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  4873.    
  4874.     // representation 3 board, offset 408
  4875.     // r3b_functions_
  4876.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  4877.     uint32_t r3b_functions_random_id;
  4878.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  4879.    
  4880.     // representation 4 board, offset 420
  4881.     // r4b_change_colors_
  4882.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  4883.     uint32_t r4b_change_colors_random_id;
  4884.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  4885.    
  4886.     // representation 5 board, offset 432
  4887.     // r5b_predicted_resources_
  4888.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  4889.     uint32_t r5b_predicted_resources_random_id;
  4890.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  4891.    
  4892.     // OBJE 1 DATA END
  4893.    
  4894.     // ITEM DATA START
  4895.    
  4896.     uint32_t item_flags;    // toff 444 32-bit 0x00000007
  4897.     uint16_t message_index_message_index;
  4898.     uint16_t message_index_sort_order;
  4899.     float message_index_scale;
  4900.     uint16_t message_index_hud_message_value_scale;
  4901.    
  4902.     // offset 458 = 18 bytes of 0
  4903.    
  4904.     uint16_t message_index_a_in;   // "none" (0) is the only option for these four in's (offset 476)
  4905.     uint16_t message_index_b_in;
  4906.     uint16_t message_index_c_in;
  4907.     uint16_t message_index_d_in;
  4908.    
  4909.     // offset 484 = 164 bytes of 0
  4910.    
  4911.     // dependency 7: material effects foot
  4912.     char material_effects_tagclass[5];       //unsigned char[5]
  4913.     uint32_t material_effects_tagnamepointer;   //uint32 ("random" number)
  4914.     uint32_t material_effects_tagnamestringlength;   //uint32
  4915.     uint32_t material_effects_tagid;         //uint32 (0xFFFFFFFF with tags)
  4916.     // char material_effects_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4917.    
  4918.     // dependency 8: collision sound snd!
  4919.     char collision_sound_tagclass[5];        //unsigned char[5]
  4920.     uint32_t collision_sound_tagnamepointer;   //uint32 ("random" number)
  4921.     uint32_t collision_sound_tagnamestringlength;   //uint32
  4922.     uint32_t collision_sound_tagid;      //uint32 (0xFFFFFFFF with tags)
  4923.     // char collision_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4924.    
  4925.     // offset 680 = 120 bytes of 0
  4926.    
  4927.     float message_index_detonation_delay_from;   // offset 800
  4928.     float message_index_detonation_delay_to;
  4929.    
  4930.     // dependency 9: detonating effect effe
  4931.     char detonating_effect_tagclass[5];      //unsigned char[5]
  4932.     uint32_t detonating_effect_tagnamepointer;   //uint32 ("random" number)
  4933.     uint32_t detonating_effect_tagnamestringlength;   //uint32
  4934.     uint32_t detonating_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  4935.     // char detonating_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4936.    
  4937.     // dependency 10: detonation effect effe
  4938.     char detonation_effect_tagclass[5];      //unsigned char[5]
  4939.     uint32_t detonation_effect_tagnamepointer;   //uint32 ("random" number)
  4940.     uint32_t detonation_effect_tagnamestringlength;   //uint32
  4941.     uint32_t detonation_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  4942.     // char detonation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  4943.    
  4944.     // offset 840 = 168 bytes of 0
  4945.    
  4946.     // ITEM DATA END
  4947.    
  4948.     // offset 864 = 144 bytes of 0
  4949.    
  4950.     // dependencies 1-6 tagpathname strings go here
  4951.    
  4952.     // OBJE DATA 2 START
  4953.    
  4954.     struct garb_r1c {
  4955.         // representation 1 cells
  4956.         // r1c_attachments_
  4957.        
  4958.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  4959.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  4960.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  4961.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  4962.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  4963.         // char r1c_attachments_type_tagnamestring[255];
  4964.        
  4965.         char r1c_attachments_marker[32];
  4966.         uint16_t r1c_attachments_primary_scale;
  4967.         uint16_t r1c_attachments_secondary_scale;
  4968.         uint16_t r1c_attachments_change_color;
  4969.        
  4970.         // in cell here: 18 bytes of 0
  4971.        
  4972.     }r1c_attachments;
  4973.    
  4974.     // r1c 1 tag name strings here
  4975.    
  4976.     struct garb_r2c {
  4977.         // representation 2 cells
  4978.         // r2c_widgets_
  4979.        
  4980.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  4981.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  4982.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  4983.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  4984.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  4985.         // char r2c_widgets_reference_tagnamestring[255];
  4986.        
  4987.         // in cell here: 16 bytes of 0
  4988.     }r2c_widgets;
  4989.    
  4990.     // r2c 1 tag name strings here
  4991.    
  4992.     struct garb_r3c {
  4993.         // representation 3 cells
  4994.         // r3c_functions_
  4995.        
  4996.         uint32_t r3c_functions_flags;   // toff 1008    32-bit 0x00000007
  4997.         float r3c_functions_period;
  4998.         uint16_t r3c_functions_scale_period_by;
  4999.         uint16_t r3c_functions_function;
  5000.         uint16_t r3c_functions_scale_function_by;
  5001.         uint16_t r3c_functions_wobble_function;
  5002.         float r3c_functions_wobble_period;
  5003.         float r3c_functions_wobble_magnitude;
  5004.         float r3c_functions_square_wave_threshold_frac;
  5005.         uint16_t r3c_functions_step_count;
  5006.         uint16_t r3c_functions_map_to;
  5007.         uint16_t r3c_functions_sawtooth_count;
  5008.         uint16_t r3c_functions_add;
  5009.         uint16_t r3c_functions_scale_result_by;
  5010.         uint16_t r3c_functions_bounds_mode;
  5011.         float r3c_functions_bounds_from_frac;
  5012.         float r3c_functions_bounds_to_frac;
  5013.         // in cell here: 6 bytes of 0
  5014.         uint16_t r3c_functions_turn_off_with_sel;
  5015.         float r3c_functions_scale_by;
  5016.         // in cell here: 268 bytes of 0 (reminiscent of the pre-padding of other times strings come after cells)
  5017.         char r3c_functions_usage[32];
  5018.        
  5019.     }r3c_functions;
  5020.    
  5021.     struct garb_r4c {
  5022.         // representation 4 cells
  5023.         // r4c_change_colors_
  5024.         uint16_t r4c_change_colors_darken_by;
  5025.         uint16_t r4c_change_colors_scale_by;
  5026.         uint32_t r4c_change_colors_scale_flags; //toff 1372 32-bit 0x00000003
  5027.         float r4c_change_colors_color_lower_bound_r_frac;
  5028.         float r4c_change_colors_color_lower_bound_g_frac;
  5029.         float r4c_change_colors_color_lower_bound_b_frac;
  5030.         float r4c_change_colors_color_upper_bound_r_frac;
  5031.         float r4c_change_colors_color_upper_bound_g_frac;
  5032.         float r4c_change_colors_color_upper_bound_b_frac;
  5033.        
  5034.         // representation 4 sub-board A
  5035.         // r4sbA_permutations_
  5036.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  5037.         uint32_t r4sbA_permutations_random_id1;
  5038.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  5039.     }r4c_change_colors;
  5040.    
  5041.     struct garb_r4scA
  5042.     {
  5043.         // representation 4 sub-cells A
  5044.         // r4scA_permutations_
  5045.         float r4scA_permutations_weight_frac;
  5046.         float r4scA_permutations_color_lower_bound_r_frac;
  5047.         float r4scA_permutations_color_lower_bound_g_frac;
  5048.         float r4scA_permutations_color_lower_bound_b_frac;
  5049.         float r4scA_permutations_color_upper_bound_r_frac;
  5050.         float r4scA_permutations_color_upper_bound_g_frac;
  5051.         float r4scA_permutations_color_upper_bound_b_frac;
  5052.     }r4sc_change_colors_permutations;
  5053.    
  5054.     struct garb_r5c {
  5055.         // representation 5 cells
  5056.         // r5c_predicted_resources_
  5057.         uint16_t r5c_predicted_resources_type;
  5058.         uint16_t r5c_predicted_resources_resource_index;
  5059.         uint32_t r5c_predicted_resources_tag_index;
  5060.     }r5c_predicted_resources;
  5061.    
  5062.     // OBJE DATA 2 END
  5063.    
  5064.     // dependencies 7-10 tagpathname strings go here
  5065.    
  5066. } type_meta_garb;
  5067.  
  5068. #pragma mark -- glw!
  5069.  
  5070. typedef struct {
  5071.     char attachment_marker[32];
  5072.     uint16_t number_of_particles;
  5073.     uint16_t boundary_effect;
  5074.     uint16_t normal_particle_distribution;
  5075.     uint16_t trailing_particle_distribution;
  5076.     uint32_t glow_flags;    //toff 104  32-bit 0x0000003F
  5077.     // offset 108 = 36 bytes of 0
  5078.    
  5079.     uint16_t attachment_particle_rotation;
  5080.     // offset 146 = 2 bytes of 0
  5081.     float particle_rotational_velocity;
  5082.     float particle_rotational_velocity_multiplier_low;
  5083.     float particle_rotational_velocity_multiplier_high;
  5084.    
  5085.     uint16_t attachment_effect_rotation;
  5086.     // offset 162 = 2 bytes of 0
  5087.     float effect_rotational_velocity;
  5088.     float effect_rotational_velocity_multiplier_low;
  5089.     float effect_rotational_velocity_multiplier_high;
  5090.    
  5091.     uint16_t attachment_effect_translation;
  5092.     // offset 178 = 2 bytes of 0
  5093.     float effect_translational_velocity;
  5094.     float effect_translational_velocity_multiplier_low;
  5095.     float effect_translational_velocity_multiplier_high;
  5096.    
  5097.     uint16_t attachment_distance;
  5098.     // offset 194 = 2 bytes of 0
  5099.     float minimum_distance_particle_to_object;
  5100.     float maximum_distance_particle_to_object;
  5101.     float distance_to_object_multiplier_low;
  5102.     float distance_to_object_multiplier_high;
  5103.     // offset 212 = 8 bytes of 0
  5104.    
  5105.     uint16_t attachment_size;
  5106.     // offset 222 = 2 bytes of 0
  5107.    
  5108.     float particle_size_bounds_from;
  5109.     float particle_size_bounds_to;
  5110.     float size_attachment_multiplier_from;
  5111.     float size_attachment_multiplier_to;
  5112.    
  5113.     uint16_t attachment_color;
  5114.     // offset 242 = 2 bytes of 0
  5115.     float color_bound_0_a_frac;
  5116.     float color_bound_0_r_frac;
  5117.     float color_bound_0_g_frac;
  5118.     float color_bound_0_b_frac;
  5119.     float color_bound_1_a_frac;
  5120.     float color_bound_1_r_frac;
  5121.     float color_bound_1_g_frac;
  5122.     float color_bound_1_b_frac;
  5123.     float scale_color_0_a_frac;
  5124.     float scale_color_0_r_frac;
  5125.     float scale_color_0_g_frac;
  5126.     float scale_color_0_b_frac;
  5127.     float scale_color_1_a_frac;
  5128.     float scale_color_1_r_frac;
  5129.     float scale_color_1_g_frac;
  5130.     float scale_color_1_b_frac;
  5131.    
  5132.     float color_rate_of_change;
  5133.     float fading_percentage_of_glow;
  5134.     float particle_generation_frequency;
  5135.     float lifetime_of_trailing_particles;
  5136.     float velocity_of_trailing_particles;
  5137.     float trailing_particle_minimum_translation;
  5138.     float trailing_particle_maximum_translation;
  5139.    
  5140.     // offset 336 = 52 bytes of 0
  5141.    
  5142.     // dependency 1: texture bitm
  5143.     char texture_tagclass[5];        //unsigned char[5]
  5144.     uint32_t texture_tagnamepointer;   //uint32 ("random" number)
  5145.     uint32_t texture_tagnamestringlength;   //uint32
  5146.     uint32_t texture_tagid;      //uint32 (0xFFFFFFFF with tags)
  5147.     // char texture_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5148.    
  5149.     // dependency 1 tagpathname string goes here (how sudden! ;) )
  5150.    
  5151. } type_meta_glw;
  5152.  
  5153. #pragma mark -- grhi
  5154.  
  5155. typedef struct {
  5156.     uint16_t grenade_hud_screen_alignment_anchor;
  5157.     // offset 66 = 34 bytes of 0
  5158.     uint16_t grenade_hud_background_anchor_offset_x;   // interpret these two as signed
  5159.     uint16_t grenade_hud_background_anchor_offset_y;
  5160.     float grenade_hud_background_width_scale;
  5161.     float grenade_hud_background_height_scale;
  5162.     // 112, 1
  5163.     uint8_t grenade_hud_background_scaling_flags;   //toff 112  8-bit 0x07
  5164.     // offset 114 = 22 bytes of 0
  5165.    
  5166.     // dependency 1: grenade hud background interface bitmap bitm
  5167.     char grenade_hud_background_interface_bitmap_tagclass[5];        //unsigned char[5]
  5168.     uint32_t grenade_hud_background_interface_bitmap_tagnamepointer;   //uint32 ("random" number)
  5169.     uint32_t grenade_hud_background_interface_bitmap_tagnamestringlength;   //uint32
  5170.     uint32_t grenade_hud_background_interface_bitmap_tagid;      //uint32 (0xFFFFFFFF with tags)
  5171.     // char grenade_hud_background_interface_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5172.    
  5173.     uint8_t grenade_hud_background_default_color_a;
  5174.     uint8_t grenade_hud_background_default_color_r;
  5175.     uint8_t grenade_hud_background_default_color_g;
  5176.     uint8_t grenade_hud_background_default_color_b;
  5177.     uint8_t grenade_hud_background_flashing_color_a;
  5178.     uint8_t grenade_hud_background_flashing_color_r;
  5179.     uint8_t grenade_hud_background_flashing_color_g;
  5180.     uint8_t grenade_hud_background_flashing_color_b;
  5181.    
  5182.     float grenade_hud_background_flash_period;
  5183.     float grenade_hud_background_flash_delay;
  5184.     uint16_t grenade_hud_background_number_of_flashes;
  5185.     // 170, 1
  5186.     uint8_t grenade_hud_background_flash_flags; //toff 170  0x01
  5187.     float grenade_hud_background_flash_length;
  5188.    
  5189.     uint8_t grenade_hud_background_disabled_color_a;
  5190.     uint8_t grenade_hud_background_disabled_color_r;
  5191.     uint8_t grenade_hud_background_disabled_color_g;
  5192.     uint8_t grenade_hud_background_disabled_color_b;
  5193.    
  5194.     // offset 180 = 4 bytes of 0
  5195.    
  5196.     uint16_t grenade_hud_background_sequence_index;
  5197.     // offset 186 = 2 bytes of 0
  5198.    
  5199.     // representation 1 board, offset 188
  5200.     // r1b_grenade_hud_background_multitex_overlay_
  5201.     uint32_t r1b_grenade_hud_background_multitex_overlay_entrycount; // maximum of 30 cells
  5202.     uint32_t r1b_grenade_hud_background_multitex_overlay_random_id;
  5203.     uint32_t r1b_grenade_hud_background_multitex_overlay_sig_id; // example value = 0xCC3A9C00
  5204.    
  5205.     // offset 200 = 4 (my new shorthand for "4 bytes of 0")
  5206.    
  5207.     uint16_t total_grenades_background_anchor_offset_x;   // interpret these two as signed
  5208.     uint16_t total_grenades_background_anchor_offset_y;
  5209.    
  5210.     float total_grenades_background_width_scale;
  5211.     float total_grenades_background_height_scale;
  5212.     // 216, 1
  5213.     uint8_t total_grenades_background_scaling_flags;    //toff 216  0x07
  5214.     // offset 218 = 22
  5215.    
  5216.     // dependency 2: total grenades background interface bitmap bitm
  5217.     char total_grenades_background_interface_bitmap_tagclass[5];         //unsigned char[5]
  5218.     uint32_t total_grenades_background_interface_bitmap_tagnamepointer;   //uint32 ("random" number)
  5219.     uint32_t total_grenades_background_interface_bitmap_tagnamestringlength;   //uint32
  5220.     uint32_t total_grenades_background_interface_bitmap_tagid;       //uint32 (0xFFFFFFFF with tags)
  5221.     // char total_grenades_background_interface_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5222.    
  5223.     uint8_t total_grenades_background_default_color_a;
  5224.     uint8_t total_grenades_background_default_color_r;
  5225.     uint8_t total_grenades_background_default_color_g;
  5226.     uint8_t total_grenades_background_default_color_b;
  5227.     uint8_t total_grenades_background_flashing_color_a;
  5228.     uint8_t total_grenades_background_flashing_color_r;
  5229.     uint8_t total_grenades_background_flashing_color_g;
  5230.     uint8_t total_grenades_background_flashing_color_b;
  5231.    
  5232.     float total_grenades_background_flash_period;
  5233.     float total_grenades_background_flash_delay;
  5234.    
  5235.     uint16_t total_grenades_background_number_of_flashes;
  5236.     // 274, 1
  5237.     uint8_t total_grenades_background_flash_flags;  //toff 274  0x01
  5238.    
  5239.     float total_grenades_background_flash_length;
  5240.    
  5241.     uint8_t total_grenades_background_disabled_color_a;
  5242.     uint8_t total_grenades_background_disabled_color_r;
  5243.     uint8_t total_grenades_background_disabled_color_g;
  5244.     uint8_t total_grenades_background_disabled_color_b;
  5245.    
  5246.     // offset 284 = 4 bytes of 0
  5247.    
  5248.     uint16_t total_grenades_background_sequence_index;
  5249.     // offset 290 = 2 bytes of 0
  5250.    
  5251.     // representation 2 board, offset 188
  5252.     // r2b_total_grenades_background_multitex_overlay_
  5253.     uint32_t r2b_total_grenades_background_multitex_overlay_entrycount; // maximum of 30 cells
  5254.     uint32_t r2b_total_grenades_background_multitex_overlay_random_id;
  5255.     uint32_t r2b_total_grenades_background_multitex_overlay_sig_id; // example value = 0xCC3A9C00 (same for each "multitex overlay"...)
  5256.    
  5257.     // offset 304 = 4 bytes of 0
  5258.    
  5259.     uint16_t total_grenades_numbers_anchor_offset_x;   // interpret these two as signed
  5260.     uint16_t total_grenades_numbers_anchor_offset_y;
  5261.     float total_grenades_numbers_width_scale;
  5262.     float total_grenades_numbers_height_scale;
  5263.     // 320, 1
  5264.     uint8_t total_grenades_numbers_scaling_flags;   //toff 320  0x07
  5265.    
  5266.     // offset 322 = 22 bytes of 0
  5267.    
  5268.     uint8_t total_grenades_numbers_default_color_a;
  5269.     uint8_t total_grenades_numbers_default_color_r;
  5270.     uint8_t total_grenades_numbers_default_color_g;
  5271.     uint8_t total_grenades_numbers_default_color_b;
  5272.     uint8_t total_grenades_numbers_flashing_color_a;
  5273.     uint8_t total_grenades_numbers_flashing_color_r;
  5274.     uint8_t total_grenades_numbers_flashing_color_g;
  5275.     uint8_t total_grenades_numbers_flashing_color_b;
  5276.    
  5277.     float total_grenades_numbers_flash_period;
  5278.     float total_grenades_numbers_flash_delay;
  5279.     uint16_t total_grenades_numbers_number_of_flashes;
  5280.     // 362, 1
  5281.     uint8_t total_grenades_numbers_flash_flags; //toff 362  0x01
  5282.    
  5283.     float total_grenades_numbers_flash_length;
  5284.    
  5285.     uint8_t total_grenades_numbers_disabled_color_a;
  5286.     uint8_t total_grenades_numbers_disabled_color_r;
  5287.     uint8_t total_grenades_numbers_disabled_color_g;
  5288.     uint8_t total_grenades_numbers_disabled_color_b;
  5289.    
  5290.     // offset 372 = 4 bytes of 0
  5291.    
  5292.     // the following three values are all byte sized, but I don't understand why, and it is unusual
  5293.     uint8_t total_grenades_numbers_maximum_number_of_digits;   // -128 to 127, but why?
  5294.     uint8_t total_grenades_numbers_flags;   //toff 377 (untested)   0x07
  5295.     uint8_t total_grenades_numbers_number_of_fractional_digits;   // -128 to 127, but why?
  5296.    
  5297.     // offset 379 = 13 bytes of 0
  5298.    
  5299.     uint16_t total_grenades_numbers_flash_cutoff;   // offset 392
  5300.    
  5301.     // offset 394 = 2 (again, shorthand for "2 bytes of 0")
  5302.    
  5303.     // dependency 3: total grenades overlays overlay bitmap bitm
  5304.     char total_grenades_overlays_overlay_bitmap_tagclass[5];         //unsigned char[5]
  5305.     uint32_t total_grenades_overlays_overlay_bitmap_tagnamepointer;   //uint32 ("random" number)
  5306.     uint32_t total_grenades_overlays_overlay_bitmap_tagnamestringlength;   //uint32
  5307.     uint32_t total_grenades_overlays_overlay_bitmap_tagid;       //uint32 (0xFFFFFFFF with tags)
  5308.     // char total_grenades_overlays_overlay_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5309.    
  5310.     // representation 3 board, offset 412
  5311.     // r3b_total_grenades_overlays_overlays_
  5312.     uint32_t r3b_total_grenades_overlays_overlays_entrycount; // maximum of 16 cells
  5313.     uint32_t r3b_total_grenades_overlays_overlays_random_id;
  5314.     uint32_t r3b_total_grenades_overlays_overlays_sig_id; // example value = 0x485E9C00
  5315.    
  5316.     // representation 4 board, offset 424
  5317.     // r4b_warning_sounds_
  5318.     uint32_t r4b_warning_sounds_entrycount; // maximum of 12 cells
  5319.     uint32_t r4b_warning_sounds_random_id;
  5320.     uint32_t r4b_warning_sounds_sig_id; // example value = 0xD05E9C00
  5321.    
  5322.     // offset 436 = 68
  5323.    
  5324.     uint16_t messaging_information_sequence_index;
  5325.     uint16_t messaging_information_width_offset;   // interpret these three as signed
  5326.     uint16_t messaging_information_offset_from_reference_corner_x;
  5327.     uint16_t messaging_information_offset_from_reference_corner_y;
  5328.    
  5329.     uint8_t messaging_information_override_icon_color_a;
  5330.     uint8_t messaging_information_override_icon_color_r;
  5331.     uint8_t messaging_information_override_icon_color_g;
  5332.     uint8_t messaging_information_override_icon_color_b;
  5333.    
  5334.     uint8_t messaging_information_frame_rate;   // -128 to 127
  5335.     uint8_t messaging_information_flags;    //toff 517 (untested)   0x07
  5336.     uint16_t messaging_information_text_index;
  5337.    
  5338.     // offset 520 = 48
  5339.    
  5340.     // dependency 1 tagpathname string goes here
  5341.    
  5342.     struct grhi_r1c {
  5343.         // representation 1 cells
  5344.         // r1c_grenade_hud_background_multitex_overlay_
  5345.        
  5346.         // in cell here: 2 bytes of 0
  5347.        
  5348.         uint16_t r1c_grenade_hud_background_multitex_overlay_type;
  5349.         uint16_t r1c_grenade_hud_background_multitex_overlay_framebuffer_blend_function;
  5350.        
  5351.         // in cell here: 34 (shorthand for "34 bytes of 0")
  5352.        
  5353.         uint16_t r1c_grenade_hud_background_multitex_overlay_anchors_primary_anchor;
  5354.         uint16_t r1c_grenade_hud_background_multitex_overlay_anchors_secondary_anchor;
  5355.         uint16_t r1c_grenade_hud_background_multitex_overlay_anchors_tertiary_anchor;
  5356.         uint16_t r1c_grenade_hud_background_multitex_overlay_blending_function_0_to_1_blend_function;
  5357.         uint16_t r1c_grenade_hud_background_multitex_overlay_blending_function_1_to_2_blend_function;
  5358.        
  5359.         // o 635 = 2 (shorthand for "offset 635 = 2 bytes of 0")
  5360.        
  5361.         float r1c_grenade_hud_background_multitex_overlay_map_scales_primary_scale_x;
  5362.         float r1c_grenade_hud_background_multitex_overlay_map_scales_primary_scale_y;
  5363.         float r1c_grenade_hud_background_multitex_overlay_map_scales_secondary_scale_x;
  5364.         float r1c_grenade_hud_background_multitex_overlay_map_scales_secondary_scale_y;
  5365.         float r1c_grenade_hud_background_multitex_overlay_map_scales_tertiary_scale_x;
  5366.         float r1c_grenade_hud_background_multitex_overlay_map_scales_tertiary_scale_y;
  5367.        
  5368.         float r1c_grenade_hud_background_multitex_overlay_map_offsets_primary_offset_x;
  5369.         float r1c_grenade_hud_background_multitex_overlay_map_offsets_primary_offset_y;
  5370.         float r1c_grenade_hud_background_multitex_overlay_map_offsets_secondary_offset_x;
  5371.         float r1c_grenade_hud_background_multitex_overlay_map_offsets_secondary_offset_y;
  5372.         float r1c_grenade_hud_background_multitex_overlay_map_offsets_tertiary_offset_x;
  5373.         float r1c_grenade_hud_background_multitex_overlay_map_offsets_tertiary_offset_y;
  5374.        
  5375.         // dependency r1c 1: grenade hud background multitex overlay map primary bitm
  5376.         char r1c1_grenade_hud_background_multitex_overlay_map_primary_tagclass[5];       //unsigned char[5]
  5377.         uint32_t r1c1_grenade_hud_background_multitex_overlay_map_primary_tagnamepointer;   //uint32 ("random" number)
  5378.         uint32_t r1c1_grenade_hud_background_multitex_overlay_map_primary_tagnamestringlength;   //uint32
  5379.         uint32_t r1c1_grenade_hud_background_multitex_overlay_map_primary_tagid;         //uint32 (0xFFFFFFFF with tags)
  5380.         // char r1c1_grenade_hud_background_multitex_overlay_map_primary_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5381.        
  5382.         // dependency r1c 2: grenade hud background multitex overlay map secondary bitm
  5383.         char r1c2_grenade_hud_background_multitex_overlay_map_secondary_tagclass[5];         //unsigned char[5]
  5384.         uint32_t r1c2_grenade_hud_background_multitex_overlay_map_secondary_tagnamepointer;   //uint32 ("random" number)
  5385.         uint32_t r1c2_grenade_hud_background_multitex_overlay_map_secondary_tagnamestringlength;   //uint32
  5386.         uint32_t r1c2_grenade_hud_background_multitex_overlay_map_secondary_tagid;       //uint32 (0xFFFFFFFF with tags)
  5387.         // char r1c2_grenade_hud_background_multitex_overlay_map_secondary_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5388.        
  5389.         // dependency r1c 3: grenade hud background multitex overlay map tertiary bitm
  5390.         char r1c3_grenade_hud_background_multitex_overlay_map_tertiary_tagclass[5];      //unsigned char[5]
  5391.         uint32_t r1c3_grenade_hud_background_multitex_overlay_map_tertiary_tagnamepointer;   //uint32 ("random" number)
  5392.         uint32_t r1c3_grenade_hud_background_multitex_overlay_map_tertiary_tagnamestringlength;   //uint32
  5393.         uint32_t r1c3_grenade_hud_background_multitex_overlay_map_tertiary_tagid;        //uint32 (0xFFFFFFFF with tags)
  5394.         // char r1c3_grenade_hud_background_multitex_overlay_map_tertiary_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5395.        
  5396.         uint16_t r1c_grenade_hud_background_multitex_overlay_map_primary_wrap_mode;
  5397.         uint16_t r1c_grenade_hud_background_multitex_overlay_map_secondary_wrap_mode;
  5398.         uint16_t r1c_grenade_hud_background_multitex_overlay_map_tertiary_wrap_mode;
  5399.        
  5400.         // in cell here: 186 bytes of 0
  5401.        
  5402.         // representation 1 sub-board A
  5403.         // r1sbA_multitex_overlay_effectors_
  5404.         uint32_t r1sbA_multitex_overlay_effectors_entrycount; // maximum of 30 cells
  5405.         uint32_t r1sbA_multitex_overlay_effectors_random_id;
  5406.         uint32_t r1sbA_multitex_overlay_effectors_sig_id; // example value = 0x10399C00
  5407.        
  5408.         // in cell here: 128 bytes of 0
  5409.        
  5410.     }r1c_grenade_hud_background_multitex_overlay;
  5411.    
  5412.     // tags are so freaking retarted and inconsistent, I am really annoyed.
  5413.     // After all the above cells' data, you have:
  5414.     // r1c's 3 dependency tagpathname strings FOR THE CURRENT CELL ONLY
  5415.     // followed by
  5416.     // the sub-cells for Effectors (r1scA) FOR THE CURRENT CELL ONLY
  5417.    
  5418.     //... it doesn't make any sense, why can't they just do it right! Gosh, that's annoying.
  5419.    
  5420.     // so illogical!
  5421.    
  5422.     // so you have a logical grouping of the tagpathname strings with the effectors, but that is incorrect!
  5423.     // the only way to logically present this is as such, where the strings are at the top of a separate container that also contains the effectors for that cell:
  5424.    
  5425.     struct grhi_r1_misgrouped_data {
  5426.         // mis-grouped data for representation 1
  5427.         // see my annoyed comments above
  5428.         // r1mdc_
  5429.        
  5430.         // tagpathname strings for dependencies r1c 1, r1c 2 and r1c 3 OF THE CURRENT CELL go here
  5431.        
  5432.         struct grhi_r1scA {
  5433.             // representation 1 sub-cells A
  5434.             // r1scA_multitex_overlay_effectors_
  5435.             // (all the sub-cells A for the current cell)
  5436.            
  5437.             // in cell here: 64 bytes of 0
  5438.            
  5439.             uint16_t r1scA_multitex_overlay_effectors_source_destination_destination_type;
  5440.             uint16_t r1scA_multitex_overlay_effectors_source_destination_destination;
  5441.             uint16_t r1scA_multitex_overlay_effectors_source_destination_source;
  5442.             // in cell here: 2 bytes of 0
  5443.             float r1scA_multitex_overlay_effectors_in_out_bounds_in_bounds_from;
  5444.             float r1scA_multitex_overlay_effectors_in_out_bounds_in_bounds_to;
  5445.             float r1scA_multitex_overlay_effectors_in_out_bounds_out_bounds_from;
  5446.             float r1scA_multitex_overlay_effectors_in_out_bounds_out_bounds_to;
  5447.            
  5448.             // in cell here: 64 bytes of 0
  5449.            
  5450.             float r1scA_multitex_overlay_effectors_tint_color_bounds_tint_color_lower_bound_r_frac;
  5451.             float r1scA_multitex_overlay_effectors_tint_color_bounds_tint_color_lower_bound_g_frac;
  5452.             float r1scA_multitex_overlay_effectors_tint_color_bounds_tint_color_lower_bound_b_frac;
  5453.             float r1scA_multitex_overlay_effectors_tint_color_bounds_tint_color_upper_bound_r_frac;
  5454.             float r1scA_multitex_overlay_effectors_tint_color_bounds_tint_color_upper_bound_g_frac;
  5455.             float r1scA_multitex_overlay_effectors_tint_color_bounds_tint_color_upper_bound_b_frac;
  5456.            
  5457.             uint16_t r1scA_multitex_overlay_effectors_periodic_functions_periodic_function;
  5458.             // in cell here: 2 bytes of 0
  5459.            
  5460.             float r1scA_multitex_overlay_effectors_periodic_functions_function_period;
  5461.             float r1scA_multitex_overlay_effectors_periodic_functions_function_phase;
  5462.            
  5463.             // in cell here: 32 bytes of 0
  5464.         }r1scA_multitex_overlay_effectors;
  5465.        
  5466.     }r1_misgrouped_data_container;
  5467.    
  5468.     // offset 213795 in test data
  5469.    
  5470.     // dependency 2 tagpathname string goes here
  5471.    
  5472.     struct grhi_r2c {
  5473.         // representation 2 cells
  5474.         // r2c_total_grenades_background_multitex_overlay_
  5475.        
  5476.         // in cell here: 2 bytes of 0
  5477.        
  5478.         uint16_t r2c_total_grenades_background_multitex_overlay_type;
  5479.         uint16_t r2c_total_grenades_background_multitex_overlay_framebuffer_blend_function;
  5480.        
  5481.         // in cell here: 34 (shorthand for "34 bytes of 0")
  5482.        
  5483.         uint16_t r2c_total_grenades_background_multitex_overlay_anchors_primary_anchor;
  5484.         uint16_t r2c_total_grenades_background_multitex_overlay_anchors_secondary_anchor;
  5485.         uint16_t r2c_total_grenades_background_multitex_overlay_anchors_tertiary_anchor;
  5486.         uint16_t r2c_total_grenades_background_multitex_overlay_blending_function_0_to_1_blend_function;
  5487.         uint16_t r2c_total_grenades_background_multitex_overlay_blending_function_1_to_2_blend_function;
  5488.        
  5489.         // 2 (shorthand for "in cell here: 2 bytes of 0")
  5490.        
  5491.         float r2c_total_grenades_background_multitex_overlay_map_scales_primary_scale_x;
  5492.         float r2c_total_grenades_background_multitex_overlay_map_scales_primary_scale_y;
  5493.         float r2c_total_grenades_background_multitex_overlay_map_scales_secondary_scale_x;
  5494.         float r2c_total_grenades_background_multitex_overlay_map_scales_secondary_scale_y;
  5495.         float r2c_total_grenades_background_multitex_overlay_map_scales_tertiary_scale_x;
  5496.         float r2c_total_grenades_background_multitex_overlay_map_scales_tertiary_scale_y;
  5497.        
  5498.         float r2c_total_grenades_background_multitex_overlay_map_offsets_primary_offset_x;
  5499.         float r2c_total_grenades_background_multitex_overlay_map_offsets_primary_offset_y;
  5500.         float r2c_total_grenades_background_multitex_overlay_map_offsets_secondary_offset_x;
  5501.         float r2c_total_grenades_background_multitex_overlay_map_offsets_secondary_offset_y;
  5502.         float r2c_total_grenades_background_multitex_overlay_map_offsets_tertiary_offset_x;
  5503.         float r2c_total_grenades_background_multitex_overlay_map_offsets_tertiary_offset_y;
  5504.        
  5505.         // dependency r2c 1: total grenades background multitex overlay map primary bitm
  5506.         char r2c1_total_grenades_background_multitex_overlay_map_primary_tagclass[5];        //unsigned char[5]
  5507.         uint32_t r2c1_total_grenades_background_multitex_overlay_map_primary_tagnamepointer;   //uint32 ("random" number)
  5508.         uint32_t r2c1_total_grenades_background_multitex_overlay_map_primary_tagnamestringlength;   //uint32
  5509.         uint32_t r2c1_total_grenades_background_multitex_overlay_map_primary_tagid;      //uint32 (0xFFFFFFFF with tags)
  5510.         // char r2c1_total_grenades_background_multitex_overlay_map_primary_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5511.        
  5512.         // dependency r2c 2: total grenades background multitex overlay map secondary bitm
  5513.         char r2c2_total_grenades_background_multitex_overlay_map_secondary_tagclass[5];      //unsigned char[5]
  5514.         uint32_t r2c2_total_grenades_background_multitex_overlay_map_secondary_tagnamepointer;   //uint32 ("random" number)
  5515.         uint32_t r2c2_total_grenades_background_multitex_overlay_map_secondary_tagnamestringlength;   //uint32
  5516.         uint32_t r2c2_total_grenades_background_multitex_overlay_map_secondary_tagid;        //uint32 (0xFFFFFFFF with tags)
  5517.         // char r2c2_total_grenades_background_multitex_overlay_map_secondary_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5518.        
  5519.         // dependency r2c 3: total grenades background multitex overlay map tertiary bitm
  5520.         char r2c3_total_grenades_background_multitex_overlay_map_tertiary_tagclass[5];       //unsigned char[5]
  5521.         uint32_t r2c3_total_grenades_background_multitex_overlay_map_tertiary_tagnamepointer;   //uint32 ("random" number)
  5522.         uint32_t r2c3_total_grenades_background_multitex_overlay_map_tertiary_tagnamestringlength;   //uint32
  5523.         uint32_t r2c3_total_grenades_background_multitex_overlay_map_tertiary_tagid;         //uint32 (0xFFFFFFFF with tags)
  5524.         // char r2c3_total_grenades_background_multitex_overlay_map_tertiary_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5525.        
  5526.         uint16_t r2c_total_grenades_background_multitex_overlay_map_primary_wrap_mode;
  5527.         uint16_t r2c_total_grenades_background_multitex_overlay_map_secondary_wrap_mode;
  5528.         uint16_t r2c_total_grenades_background_multitex_overlay_map_tertiary_wrap_mode;
  5529.        
  5530.         // in cell here: 186 bytes of 0
  5531.        
  5532.         // representation 2 sub-board A
  5533.         // r2sbA_multitex_overlay_effectors_
  5534.         uint32_t r2sbA_multitex_overlay_effectors_entrycount; // maximum of 30 cells
  5535.         uint32_t r2sbA_multitex_overlay_effectors_random_id;
  5536.         uint32_t r2sbA_multitex_overlay_effectors_sig_id; // example value = 0x10399C00 (same)
  5537.        
  5538.         // in cell here: 128 bytes of 0
  5539.        
  5540.     }r2c_total_grenades_background_multitex_overlay;
  5541.    
  5542.     struct grhi_r2_misgrouped_data {
  5543.         // mis-grouped data for representation 2
  5544.         // r2mdc_
  5545.        
  5546.         // tagpathname strings for dependencies r2c 1, r2c 2 and r2c 3 OF THE CURRENT CELL go here
  5547.        
  5548.         struct grhi_r2scA {
  5549.             // representation 2 sub-cells A
  5550.             // r2scA_multitex_overlay_effectors_
  5551.             // (all the sub-cells A for the current cell)
  5552.            
  5553.             // in cell here: 64 bytes of 0
  5554.            
  5555.             uint16_t r2scA_multitex_overlay_effectors_source_destination_destination_type;
  5556.             uint16_t r2scA_multitex_overlay_effectors_source_destination_destination;
  5557.             uint16_t r2scA_multitex_overlay_effectors_source_destination_source;
  5558.             // in cell here: 2 bytes of 0
  5559.             float r2scA_multitex_overlay_effectors_in_out_bounds_in_bounds_from;
  5560.             float r2scA_multitex_overlay_effectors_in_out_bounds_in_bounds_to;
  5561.             float r2scA_multitex_overlay_effectors_in_out_bounds_out_bounds_from;
  5562.             float r2scA_multitex_overlay_effectors_in_out_bounds_out_bounds_to;
  5563.            
  5564.             // in cell here: 64 bytes of 0
  5565.            
  5566.             float r2scA_multitex_overlay_effectors_tint_color_bounds_tint_color_lower_bound_r_frac;
  5567.             float r2scA_multitex_overlay_effectors_tint_color_bounds_tint_color_lower_bound_g_frac;
  5568.             float r2scA_multitex_overlay_effectors_tint_color_bounds_tint_color_lower_bound_b_frac;
  5569.             float r2scA_multitex_overlay_effectors_tint_color_bounds_tint_color_upper_bound_r_frac;
  5570.             float r2scA_multitex_overlay_effectors_tint_color_bounds_tint_color_upper_bound_g_frac;
  5571.             float r2scA_multitex_overlay_effectors_tint_color_bounds_tint_color_upper_bound_b_frac;
  5572.            
  5573.             uint16_t r2scA_multitex_overlay_effectors_periodic_functions_periodic_function;
  5574.             // in cell here: 2 bytes of 0
  5575.            
  5576.             float r2scA_multitex_overlay_effectors_periodic_functions_function_period;
  5577.             float r2scA_multitex_overlay_effectors_periodic_functions_function_phase;
  5578.            
  5579.             // in cell here: 32 bytes of 0
  5580.         }r2scA_multitex_overlay_effectors;
  5581.        
  5582.     }r2_misgrouped_data_container;
  5583.    
  5584.     // offset 427022 in test data
  5585.    
  5586.     // dependency 3 tagpathname string goes here
  5587.    
  5588.     struct grhi_r3c {
  5589.         // representation 3 cells
  5590.         // r3c_total_grenades_overlays_overlays_
  5591.        
  5592.         uint16_t r3c_total_grenades_overlays_overlays_anchor_offset_x;   // interpret these two as signed
  5593.         uint16_t r3c_total_grenades_overlays_overlays_anchor_offset_y;
  5594.         float r3c_total_grenades_overlays_overlays_width_scale;
  5595.         float r3c_total_grenades_overlays_overlays_height_scale;
  5596.         // 1
  5597.         uint8_t r3c_total_grenades_overlays_overlays_scaling_flags; //toff 580  0x07
  5598.        
  5599.         // 22
  5600.        
  5601.         uint8_t r3c_total_grenades_overlays_overlays_default_color_a;
  5602.         uint8_t r3c_total_grenades_overlays_overlays_default_color_r;
  5603.         uint8_t r3c_total_grenades_overlays_overlays_default_color_g;
  5604.         uint8_t r3c_total_grenades_overlays_overlays_default_color_b;
  5605.        
  5606.         uint8_t r3c_total_grenades_overlays_overlays_flashing_color_a;
  5607.         uint8_t r3c_total_grenades_overlays_overlays_flashing_color_r;
  5608.         uint8_t r3c_total_grenades_overlays_overlays_flashing_color_g;
  5609.         uint8_t r3c_total_grenades_overlays_overlays_flashing_color_b;
  5610.        
  5611.         float r3c_total_grenades_overlays_overlays_flash_period;
  5612.         float r3c_total_grenades_overlays_overlays_flash_delay;
  5613.        
  5614.         uint16_t r3c_total_grenades_overlays_overlays_number_of_flashes;
  5615.         // 1
  5616.         uint8_t r3c_total_grenades_overlays_overlays_flash_flags;   //toff 622  0x01
  5617.        
  5618.         float r3c_total_grenades_overlays_overlays_flash_length;
  5619.        
  5620.         uint8_t r3c_total_grenades_overlays_overlays_disabled_color_a;
  5621.         uint8_t r3c_total_grenades_overlays_overlays_disabled_color_r;
  5622.         uint8_t r3c_total_grenades_overlays_overlays_disabled_color_g;
  5623.         uint8_t r3c_total_grenades_overlays_overlays_disabled_color_b;
  5624.        
  5625.         // 4
  5626.        
  5627.         float r3c_total_grenades_overlays_overlays_frame_rate;  // exof: 427105, differs from wphi which stores as uint16_t
  5628.        
  5629.         uint16_t r3c_total_grenades_overlays_overlays_sequence_index;
  5630.         // 1
  5631.         uint8_t r3c_total_grenades_overlays_overlays_type;  //toff 642  0x0F
  5632.        
  5633.         uint32_t r3c_total_grenades_overlays_overlays_flags;    //toff 644  0x00000001
  5634.        
  5635.         // 56
  5636.        
  5637.     }r3c_total_grenades_overlays_overlays;
  5638.     // exstof: 429213
  5639.     struct grhi_r4c {
  5640.         // representation 4 cells
  5641.         // r4c_warning_sounds_
  5642.        
  5643.         // dependency r4c 1: sound snd! lsnd
  5644.         char r4c1_sound_tagclass[5];         //unsigned char[5]
  5645.         uint32_t r4c1_sound_tagnamepointer;   //uint32 ("random" number)
  5646.         uint32_t r4c1_sound_tagnamestringlength;   //uint32
  5647.         uint32_t r4c1_sound_tagid;       //uint32 (0xFFFFFFFF with tags)
  5648.         // char rr4c1_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5649.        
  5650.         uint32_t r4c_warning_sounds_latched_to; //toff 720  0x00000007
  5651.         float r4c_warning_sounds_scale;
  5652.        
  5653.         // 32
  5654.        
  5655.     }r4c_warning_sounds;
  5656.    
  5657.     // dependency r4c 1 tagpathname strings go here
  5658.    
  5659. } type_meta_grhi;
  5660.  
  5661. #pragma mark -- hmt
  5662.  
  5663. typedef struct {
  5664.    
  5665.     uint32_t text_data;
  5666.     // offset 68 = 4
  5667.     // little endian internal board values:
  5668.     uint32_t INTERNAL_text_data_offset_pointer;   // example value = 128 (correct)
  5669.     uint32_t INTERNAL_text_data_random1;
  5670.     uint32_t INTERNAL_text_data_sig_id;   // example value = 0x302A9C00
  5671.    
  5672.     // representation 1 board, offset 84
  5673.     // r1b_message_elements_
  5674.     uint32_t r1b_message_elements_entrycount; // maximum of 8192 cells
  5675.     uint32_t r1b_message_elements_random_id;
  5676.     uint32_t r1b_message_elements_sig_id; // example value = 0x642A9C00
  5677.    
  5678.     // representation 2 board, offset 96
  5679.     // r2b_messages_
  5680.     uint32_t r2b_messages_entrycount; // maximum of 1024 cells
  5681.     uint32_t r2b_messages_random_id;
  5682.     uint32_t r2b_messages_sig_id; // example value = 0xE42A9C00
  5683.    
  5684.     // 84
  5685.    
  5686.     // if there is any text data with null-padded characters (hud message text approach) then it goes here
  5687.    
  5688.     struct hmt_r1c {
  5689.         // representation 1 cells
  5690.         // r1c_message_elements_
  5691.        
  5692.         // for some reason, these values are considered signed, making the longest string 128 characters (so 64 null-padded hmt characters)
  5693.         uint8_t r1c_message_elements_type;   // -127 to 128
  5694.         uint8_t r1c_message_elements_data;   // -127 to 128
  5695.     }r1c_message_elements;
  5696.    
  5697.     struct hmt_r2c {
  5698.         // representation 2 cells
  5699.         // r2c_messages_
  5700.        
  5701.         char r2c_messages_name[32];
  5702.         uint16_t r2c_messages_start_index_into_text_blob;
  5703.         uint16_t r2c_messages_start_index_of_message_block;
  5704.         uint8_t r2c_messages_panel_count;   // -127 to 128
  5705.        
  5706.         // 27
  5707.        
  5708.     }r2c_messages;
  5709.    
  5710. } type_meta_hmt;
  5711.  
  5712. #pragma mark -- hudg
  5713.  
  5714. typedef struct {
  5715.     uint16_t messaging_parameters_anchor;
  5716.     // 66, 34 (shorthand for "offset 66 = 34 bytes of 0)
  5717.     uint16_t messaging_parameters_anchor_offset_x;   // interpret these two as signed
  5718.     uint16_t messaging_parameters_anchor_offset_y;
  5719.     float messaging_parameters_width_scale;
  5720.     float messaging_parameters_height_scale;
  5721.     // 112, 1
  5722.     uint8_t messaging_parameters_scaling_flags; //toff 112  0x07
  5723.     // 114, 22
  5724.    
  5725.     // dependency 1: messaging parameters single player font font
  5726.     char messaging_parameters_single_player_font_tagclass[5];        //unsigned char[5]
  5727.     uint32_t messaging_parameters_single_player_font_tagnamepointer;   //uint32 ("random" number)
  5728.     uint32_t messaging_parameters_single_player_font_tagnamestringlength;   //uint32
  5729.     uint32_t messaging_parameters_single_player_font_tagid;      //uint32 (0xFFFFFFFF with tags)
  5730.     // char messaging_parameters_single_player_font_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5731.    
  5732.     // dependency 2: messaging parameters multi player font font
  5733.     char messaging_parameters_multi_player_font_tagclass[5];         //unsigned char[5]
  5734.     uint32_t messaging_parameters_multi_player_font_tagnamepointer;   //uint32 ("random" number)
  5735.     uint32_t messaging_parameters_multi_player_font_tagnamestringlength;   //uint32
  5736.     uint32_t messaging_parameters_multi_player_font_tagid;       //uint32 (0xFFFFFFFF with tags)
  5737.     // char messaging_parameters_multi_player_font_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5738.    
  5739.     float messaging_parameters_up_time;
  5740.     float messaging_parameters_fade_time;
  5741.    
  5742.     float messaging_parameters_icon_color_a_frac;
  5743.     float messaging_parameters_icon_color_r_frac;
  5744.     float messaging_parameters_icon_color_g_frac;
  5745.     float messaging_parameters_icon_color_b_frac;
  5746.    
  5747.     float messaging_parameters_text_color_a_frac;
  5748.     float messaging_parameters_text_color_r_frac;
  5749.     float messaging_parameters_text_color_g_frac;
  5750.     float messaging_parameters_text_color_b_frac;
  5751.    
  5752.     float messaging_parameters_text_spacing;
  5753.    
  5754.     // dependency 3: messaging parameters item message text ustr
  5755.     char messaging_parameters_item_message_text_tagclass[5];         //unsigned char[5]
  5756.     uint32_t messaging_parameters_item_message_text_tagnamepointer;   //uint32 ("random" number)
  5757.     uint32_t messaging_parameters_item_message_text_tagnamestringlength;   //uint32
  5758.     uint32_t messaging_parameters_item_message_text_tagid;       //uint32 (0xFFFFFFFF with tags)
  5759.     // char messaging_parameters_item_message_text_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5760.    
  5761.     // dependency 4: messaging parameters icon bitmap bitm
  5762.     char messaging_parameters_icon_bitmap_tagclass[5];       //unsigned char[5]
  5763.     uint32_t messaging_parameters_icon_bitmap_tagnamepointer;   //uint32 ("random" number)
  5764.     uint32_t messaging_parameters_icon_bitmap_tagnamestringlength;   //uint32
  5765.     uint32_t messaging_parameters_icon_bitmap_tagid;         //uint32 (0xFFFFFFFF with tags)
  5766.     // char messaging_parameters_icon_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5767.    
  5768.     // dependency 5: messaging parameters alternate icon text ustr
  5769.     char messaging_parameters_alternate_icon_text_tagclass[5];       //unsigned char[5]
  5770.     uint32_t messaging_parameters_alternate_icon_text_tagnamepointer;   //uint32 ("random" number)
  5771.     uint32_t messaging_parameters_alternate_icon_text_tagnamestringlength;   //uint32
  5772.     uint32_t messaging_parameters_alternate_icon_text_tagid;         //uint32 (0xFFFFFFFF with tags)
  5773.     // char messaging_parameters_alternate_icon_text_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5774.    
  5775.     // representation 1 board, offset 260
  5776.     // r1b_button_icons_
  5777.     uint32_t r1b_button_icons_entrycount; // maximum of 18 cells (a button, b button, x button, y button, black button, white button, left trigger, right trigger, dpad up, dpad down, dpad left, dpad right, start button, back button, left thumb button, right thumb button, left stick (not a button), right stick (not a button)
  5778.     uint32_t r1b_button_icons_random_id;
  5779.     uint32_t r1b_button_icons_sig_id; // example value = 0xC03C9C00
  5780.    
  5781.     uint8_t hud_help_text_color_default_color_a;
  5782.     uint8_t hud_help_text_color_default_color_r;
  5783.     uint8_t hud_help_text_color_default_color_g;
  5784.     uint8_t hud_help_text_color_default_color_b;
  5785.    
  5786.     uint8_t hud_help_text_color_flashing_color_a;
  5787.     uint8_t hud_help_text_color_flashing_color_r;
  5788.     uint8_t hud_help_text_color_flashing_color_g;
  5789.     uint8_t hud_help_text_color_flashing_color_b;
  5790.    
  5791.     float hud_help_text_color_flash_period;
  5792.     float hud_help_text_color_flash_delay;
  5793.     uint16_t hud_help_text_color_number_of_flashes;
  5794.     // 290, 1
  5795.     uint8_t hud_help_text_color_flash_flags;    //toff 290  0x01
  5796.    
  5797.     float hud_help_text_color_flash_length;
  5798.    
  5799.     uint8_t hud_help_text_color_disabled_color_a;
  5800.     uint8_t hud_help_text_color_disabled_color_r;
  5801.     uint8_t hud_help_text_color_disabled_color_g;
  5802.     uint8_t hud_help_text_color_disabled_color_b;
  5803.    
  5804.     // 300, 4
  5805.    
  5806.     // dependency 6: other hud messaging data hud messages hmt
  5807.     char other_hud_messaging_data_hud_messages_tagclass[5];      //unsigned char[5]
  5808.     uint32_t other_hud_messaging_data_hud_messages_tagnamepointer;   //uint32 ("random" number)
  5809.     uint32_t other_hud_messaging_data_hud_messages_tagnamestringlength;   //uint32
  5810.     uint32_t other_hud_messaging_data_hud_messages_tagid;        //uint32 (0xFFFFFFFF with tags)
  5811.     // char other_hud_messaging_data_hud_messages_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5812.    
  5813.     uint8_t objective_colors_default_color_a;
  5814.     uint8_t objective_colors_default_color_r;
  5815.     uint8_t objective_colors_default_color_g;
  5816.     uint8_t objective_colors_default_color_b;
  5817.    
  5818.     uint8_t objective_colors_flashing_color_a;
  5819.     uint8_t objective_colors_flashing_color_r;
  5820.     uint8_t objective_colors_flashing_color_g;
  5821.     uint8_t objective_colors_flashing_color_b;
  5822.    
  5823.     float objective_colors_flash_period;
  5824.     float objective_colors_flash_delay;
  5825.    
  5826.     uint16_t objective_colors_number_of_flashes;
  5827.     // 338, 1
  5828.     uint8_t objective_colors_flash_flags;   //toff 338  0x01
  5829.    
  5830.     float objective_colors_flash_length;
  5831.    
  5832.     uint8_t objective_colors_disabled_color_a;
  5833.     uint8_t objective_colors_disabled_color_r;
  5834.     uint8_t objective_colors_disabled_color_g;
  5835.     uint8_t objective_colors_disabled_color_b;
  5836.    
  5837.     uint16_t objective_colors_uptime_ticks;
  5838.     uint16_t objective_colors_fade_ticks;
  5839.    
  5840.     float waypoint_parameters_top_offset;
  5841.     float waypoint_parameters_bottom_offset;
  5842.     float waypoint_parameters_left_offset;
  5843.     float waypoint_parameters_right_offset;
  5844.    
  5845.     // 368, 32
  5846.    
  5847.     // dependency 7: waypoint parameters arrow bitmap bitm
  5848.     char waypoint_parameters_arrow_bitmap_tagclass[5];       //unsigned char[5]
  5849.     uint32_t waypoint_parameters_arrow_bitmap_tagnamepointer;   //uint32 ("random" number)
  5850.     uint32_t waypoint_parameters_arrow_bitmap_tagnamestringlength;   //uint32
  5851.     uint32_t waypoint_parameters_arrow_bitmap_tagid;         //uint32 (0xFFFFFFFF with tags)
  5852.     // char waypoint_parameters_arrow_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5853.    
  5854.     // representation 2 board, offset 416
  5855.     // r2b_waypoint_arrows_
  5856.     uint32_t r2b_waypoint_arrows_entrycount; // maximum of 16 cells
  5857.     uint32_t r2b_waypoint_arrows_random_id;
  5858.     uint32_t r2b_waypoint_arrows_sig_id; // example value = 0x8C3D9C00
  5859.    
  5860.     // 428, 80
  5861.    
  5862.     float multiplayer_parameters_hud_scale_in_multiplayer;
  5863.    
  5864.     // 512, 256
  5865.    
  5866.     // dependency 8: hud globals default weapon hud wphi
  5867.     char hud_globals_default_weapon_hud_tagclass[5];         //unsigned char[5]
  5868.     uint32_t hud_globals_default_weapon_hud_tagnamepointer;   //uint32 ("random" number)
  5869.     uint32_t hud_globals_default_weapon_hud_tagnamestringlength;   //uint32
  5870.     uint32_t hud_globals_default_weapon_hud_tagid;       //uint32 (0xFFFFFFFF with tags)
  5871.     // char hud_globals_default_weapon_hud_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5872.    
  5873.     float hud_globals_motion_sensor_range;
  5874.     float hud_globals_motion_sensor_velocity_sensitivity;
  5875.     float hud_globals_motion_sensor_scale_dont_touch_ever;
  5876.    
  5877.     uint16_t hud_globals_default_chapter_title_bounds_top;   // interpret these four as signed
  5878.     uint16_t hud_globals_default_chapter_title_bounds_left;
  5879.     uint16_t hud_globals_default_chapter_title_bounds_bottom;
  5880.     uint16_t hud_globals_default_chapter_title_bounds_right;
  5881.    
  5882.     // 804, 44
  5883.    
  5884.     uint16_t hud_damage_indicators_top_offset;   // interpret these four as signed
  5885.     uint16_t hud_damage_indicators_bottom_offset;
  5886.     uint16_t hud_damage_indicators_left_offset;
  5887.     uint16_t hud_damage_indicators_right_offset;
  5888.    
  5889.     // 856, 32
  5890.    
  5891.     // dependency 9: hud damage indicators indicator bitmap bitm
  5892.     char hud_damage_indicators_indicator_bitmap_tagclass[5];         //unsigned char[5]
  5893.     uint32_t hud_damage_indicators_indicator_bitmap_tagnamepointer;   //uint32 ("random" number)
  5894.     uint32_t hud_damage_indicators_indicator_bitmap_tagnamestringlength;   //uint32
  5895.     uint32_t hud_damage_indicators_indicator_bitmap_tagid;       //uint32 (0xFFFFFFFF with tags)
  5896.     // char hud_damage_indicators_indicator_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5897.    
  5898.     uint16_t hud_damage_indicators_sequence_index;
  5899.     uint16_t hud_damage_indicators_multiplayer_sequence_index;
  5900.    
  5901.     uint8_t hud_damage_indicators_color_a;
  5902.     uint8_t hud_damage_indicators_color_r;
  5903.     uint8_t hud_damage_indicators_color_g;
  5904.     uint8_t hud_damage_indicators_color_b;
  5905.    
  5906.     // 912, 16
  5907.    
  5908.     uint8_t not_much_time_left_flash_color_default_color_a;
  5909.     uint8_t not_much_time_left_flash_color_default_color_r;
  5910.     uint8_t not_much_time_left_flash_color_default_color_g;
  5911.     uint8_t not_much_time_left_flash_color_default_color_b;
  5912.     uint8_t not_much_time_left_flash_color_flashing_color_a;
  5913.     uint8_t not_much_time_left_flash_color_flashing_color_r;
  5914.     uint8_t not_much_time_left_flash_color_flashing_color_g;
  5915.     uint8_t not_much_time_left_flash_color_flashing_color_b;
  5916.    
  5917.     float not_much_time_left_flash_color_flash_period;
  5918.     float not_much_time_left_flash_color_flash_delay;
  5919.     uint16_t not_much_time_left_flash_color_number_of_flashes;
  5920.     // 946, 1
  5921.     uint8_t not_much_time_left_flash_color_flash_flags; // toff 946 0x01
  5922.     float not_much_time_left_flash_color_flash_length;
  5923.    
  5924.     uint8_t not_much_time_left_flash_color_disabled_color_a;
  5925.     uint8_t not_much_time_left_flash_color_disabled_color_r;
  5926.     uint8_t not_much_time_left_flash_color_disabled_color_g;
  5927.     uint8_t not_much_time_left_flash_color_disabled_color_b;
  5928.    
  5929.     // 956, 4
  5930.    
  5931.     uint8_t time_out_flash_color_default_color_a;
  5932.     uint8_t time_out_flash_color_default_color_r;
  5933.     uint8_t time_out_flash_color_default_color_g;
  5934.     uint8_t time_out_flash_color_default_color_b;
  5935.     uint8_t time_out_flash_color_flashing_color_a;
  5936.     uint8_t time_out_flash_color_flashing_color_r;
  5937.     uint8_t time_out_flash_color_flashing_color_g;
  5938.     uint8_t time_out_flash_color_flashing_color_b;
  5939.     float time_out_flash_color_flash_period;
  5940.     float time_out_flash_color_flash_delay;
  5941.     uint16_t time_out_flash_color_number_of_flashes;
  5942.     // 978, 1
  5943.     uint8_t time_out_flash_color_flash_flags;   //toff 978  0x01
  5944.     float time_out_flash_color_flash_length;
  5945.     uint8_t time_out_flash_color_disabled_color_a;
  5946.     uint8_t time_out_flash_color_disabled_color_r;
  5947.     uint8_t time_out_flash_color_disabled_color_g;
  5948.     uint8_t time_out_flash_color_disabled_color_b;
  5949.    
  5950.     // 988, 44
  5951.    
  5952.     // dependency 10: time out flash color carnage report bitmap bitm
  5953.     char time_out_flash_color_carnage_report_bitmap_tagclass[5];         //unsigned char[5]
  5954.     uint32_t time_out_flash_color_carnage_report_bitmap_tagnamepointer;   //uint32 ("random" number)
  5955.     uint32_t time_out_flash_color_carnage_report_bitmap_tagnamestringlength;   //uint32
  5956.     uint32_t time_out_flash_color_carnage_report_bitmap_tagid;       //uint32 (0xFFFFFFFF with tags)
  5957.     // char time_out_flash_color_carnage_report_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5958.    
  5959.     uint16_t extra_hud_info_loading_begin_text;
  5960.     uint16_t extra_hud_info_loading_end_text;
  5961.     uint16_t extra_hud_info_checkpoint_begin_text;
  5962.     uint16_t extra_hud_info_checkpoint_end_text;
  5963.    
  5964.     // dependency 11: extra hud info checkpoint sound snd!
  5965.     char extra_hud_info_checkpoint_sound_tagclass[5];        //unsigned char[5]
  5966.     uint32_t extra_hud_info_checkpoint_sound_tagnamepointer;   //uint32 ("random" number)
  5967.     uint32_t extra_hud_info_checkpoint_sound_tagnamestringlength;   //uint32
  5968.     uint32_t extra_hud_info_checkpoint_sound_tagid;      //uint32 (0xFFFFFFFF with tags)
  5969.     // char extra_hud_info_checkpoint_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  5970.    
  5971.     // 1072, 96
  5972.    
  5973.     // dependencies 1-5 tagpathname strings go here
  5974.    
  5975.     struct hudg_r1c {
  5976.         // representation 1 cells
  5977.         // r1c_button_icons_
  5978.        
  5979.         uint16_t r1c_button_icons_sequence_index;
  5980.         uint16_t r1c_button_icons_width_offset;   // interpret these three as signed
  5981.         uint16_t r1c_button_icons_offset_from_reference_corner_x;
  5982.         uint16_t r1c_button_icons_offset_from_reference_corner_y;
  5983.         uint8_t r1c_button_icons_override_icon_color_a;
  5984.         uint8_t r1c_button_icons_override_icon_color_r;
  5985.         uint8_t r1c_button_icons_override_icon_color_g;
  5986.         uint8_t r1c_button_icons_override_icon_color_b;
  5987.        
  5988.         uint8_t r1c_button_icons_frame_rate;   // -127 to 128
  5989.         uint8_t r1c_button_icons_flags; //toff 1181 0x07
  5990.         uint16_t r1c_button_icons_text_index;
  5991.        
  5992.     }r1c_button_icons;
  5993.    
  5994.     // dependencies 6-7 tagpathname strings go here
  5995.    
  5996.     struct hudg_r2c {
  5997.         // representation 2 cells
  5998.         // r2c_waypoint_arrows_
  5999.        
  6000.         char r2c_waypoint_arrows_name[32];
  6001.        
  6002.         // 8
  6003.        
  6004.         uint8_t r2c_waypoint_arrows_color_a;   //unused
  6005.         uint8_t r2c_waypoint_arrows_color_r;
  6006.         uint8_t r2c_waypoint_arrows_color_g;
  6007.         uint8_t r2c_waypoint_arrows_color_b;
  6008.        
  6009.         float r2c_waypoint_arrows_opacity;
  6010.         float r2c_waypoint_arrows_translucency;
  6011.        
  6012.         uint16_t r2c_waypoint_arrows_on_screen_sequence_index;
  6013.         uint16_t r2c_waypoint_arrows_off_screen_sequence_index;
  6014.         uint16_t r2c_waypoint_arrows_occluded_sequence_index;
  6015.        
  6016.         // 18
  6017.        
  6018.         uint32_t r2c_waypoint_arrows_flags; //toff 1260 0x00000001
  6019.        
  6020.         // 24
  6021.        
  6022.     }r2c_waypoint_arrows;
  6023.    
  6024.     // dependencies 8-11 tagpathname strings go here
  6025.    
  6026. } type_meta_hudg;
  6027.  
  6028. #pragma mark -- hud#
  6029.  
  6030. typedef struct {
  6031.     // dependency 1: digits bitmap bitm
  6032.     char digits_bitmap_tagclass[5];      //unsigned char[5]
  6033.     uint32_t digits_bitmap_tagnamepointer;   //uint32 ("random" number)
  6034.     uint32_t digits_bitmap_tagnamestringlength;   //uint32
  6035.     uint32_t digits_bitmap_tagid;        //uint32 (0xFFFFFFFF with tags)
  6036.     // char digits_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6037.    
  6038.     uint8_t bitmap_digit_width;   // these are all -127 to 128
  6039.     uint8_t screen_digit_width;
  6040.     uint8_t x_offset;   // interpret as signed
  6041.     uint8_t y_offset;   // interpret as signed
  6042.     uint8_t decimal_point_width;
  6043.     uint8_t colon_width;
  6044.    
  6045.     // 78
  6046.    
  6047.     // dependency 1 tagpathname string goes here
  6048. } type_meta_hudn;
  6049.  
  6050. #pragma mark -- item
  6051.  
  6052. typedef struct {
  6053.     // ITEM DATA START
  6054.    
  6055.     // same mishandling as the devi (device) tag type:
  6056.     // Guerilla misreads the first four bytes as 0x0000FFFF
  6057.     // this is actually a single 32-bit flags value, but only data for a 16-bit value with inverted bits is stored (meaning in the last two bytes)
  6058.     // so when interpreting the value, the default is 0x0000FFFF with all fields checked and unchecking a field subtracts by its amount
  6059.     //uint16_t INTERNAL_optimization;   // 0; this is probably some sort of mistake, but these first two bytes are written as 0 (confirmed)
  6060.     uint32_t item_flags;   // only the first three bits are written, so all three flag values set to off yields 0xFFF8 (all 1's except the first three bits), toff 66 (untested, obvious)   0xFFFF
  6061.    
  6062.     uint16_t message_index_message_index;
  6063.     uint16_t message_index_sort_order;
  6064.     float message_index_scale;
  6065.     uint16_t message_index_hud_message_value_scale;
  6066.    
  6067.     // 78, 18
  6068.    
  6069.     uint16_t message_index_a_in;   // "none" (0) is the only option for these four in's (offset 96)
  6070.     uint16_t message_index_b_in;
  6071.     uint16_t message_index_c_in;
  6072.     uint16_t message_index_d_in;
  6073.    
  6074.     // 104, 164
  6075.    
  6076.     // dependency 1: material effects foot
  6077.     char material_effects_tagclass[5];       //unsigned char[5]
  6078.     uint32_t material_effects_tagnamepointer;   //uint32 ("random" number)
  6079.     uint32_t material_effects_tagnamestringlength;   //uint32
  6080.     uint32_t material_effects_tagid;         //uint32 (0xFFFFFFFF with tags)
  6081.     // char material_effects_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6082.    
  6083.     // dependency 2: collision sound snd!
  6084.     char collision_sound_tagclass[5];        //unsigned char[5]
  6085.     uint32_t collision_sound_tagnamepointer;   //uint32 ("random" number)
  6086.     uint32_t collision_sound_tagnamestringlength;   //uint32
  6087.     uint32_t collision_sound_tagid;      //uint32 (0xFFFFFFFF with tags)
  6088.     // char collision_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6089.    
  6090.     // offset 300 = 120 bytes of 0
  6091.    
  6092.     float message_index_detonation_delay_from;   // offset 420
  6093.     float message_index_detonation_delay_to;
  6094.    
  6095.     // dependency 3: detonating effect effe
  6096.     char detonating_effect_tagclass[5];      //unsigned char[5]
  6097.     uint32_t detonating_effect_tagnamepointer;   //uint32 ("random" number)
  6098.     uint32_t detonating_effect_tagnamestringlength;   //uint32
  6099.     uint32_t detonating_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  6100.     // char detonating_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6101.    
  6102.     // dependency 4: detonation effect effe
  6103.     char detonation_effect_tagclass[5];      //unsigned char[5]
  6104.     uint32_t detonation_effect_tagnamepointer;   //uint32 ("random" number)
  6105.     uint32_t detonation_effect_tagnamestringlength;   //uint32
  6106.     uint32_t detonation_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  6107.     // char detonation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6108.    
  6109.     // ITEM DATA END
  6110.    
  6111.     // dependencies 1-4 tagpathname strings go here
  6112. } type_meta_item;
  6113.  
  6114. #pragma mark -- itmc
  6115.  
  6116. typedef struct {
  6117.     // representation 1 board, offset 64
  6118.     // r1b_item_permutations_
  6119.     uint32_t r1b_item_permutations_entrycount; // maximum of 32 cells
  6120.     uint32_t r1b_item_permutations_random_id;
  6121.     uint32_t r1b_item_permutations_sig_id; // example value = 0x80659C00
  6122.    
  6123.     uint16_t spawn_time;
  6124.    
  6125.     // 78, 78 (lol)
  6126.    
  6127.     struct itmc_r1c {
  6128.         // representation 1 cells
  6129.         // r1c_item_permutations_
  6130.        
  6131.         // 32
  6132.        
  6133.         float r1c_item_permutations_weight_frac;
  6134.        
  6135.         // dependency r1c 1: item permutations item eqip garb item weap
  6136.         char item_permutations_item_tagclass[5];         //unsigned char[5]
  6137.         uint32_t item_permutations_item_tagnamepointer;   //uint32 ("random" number)
  6138.         uint32_t item_permutations_item_tagnamestringlength;   //uint32
  6139.         uint32_t item_permutations_item_tagid;       //uint32 (0xFFFFFFFF with tags)
  6140.         // char item_permutations_item_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6141.        
  6142.         // 32
  6143.        
  6144.     }r1c_item_permutations;
  6145.    
  6146.     // dependency r1c 1 tagpathname strings go here
  6147.    
  6148. } type_meta_itmc;
  6149.  
  6150. #pragma mark -- jpt!
  6151.  
  6152. typedef struct {
  6153.     float radius_from;
  6154.     float radius_to;
  6155.     float cutoff_scale_frac;
  6156.     uint32_t flags;   // confirmed 32 bit type, toff 76 (adjust previous line!? removed padding)    0x00000001
  6157.     // 80, 20
  6158.    
  6159.     uint16_t screen_flash_type;
  6160.     uint16_t screen_flash_priority;
  6161.     // 104, 12
  6162.     float screen_flash_duration;
  6163.     uint16_t screen_flash_fade_function;
  6164.     // 122, 10
  6165.     float screen_flash_maximum_intensity_frac;
  6166.     // 136, 4
  6167.     float screen_flash_color_a_frac;
  6168.     float screen_flash_color_r_frac;
  6169.     float screen_flash_color_g_frac;
  6170.     float screen_flash_color_b_frac;
  6171.    
  6172.     float low_frequency_vibrate_frequency_frac;
  6173.     float low_frequency_vibrate_duration;
  6174.     uint16_t low_frequency_vibrate_fade_function;
  6175.    
  6176.     // 166, 10
  6177.    
  6178.     float high_frequency_vibrate_frequency_frac;
  6179.     float high_frequency_vibrate_duration;
  6180.     uint16_t high_frequency_vibrate_fade_function;
  6181.    
  6182.     // 186, 30
  6183.    
  6184.     float temporary_camera_impulse_duration;
  6185.     uint16_t temporary_camera_impulse_fade_function;
  6186.     // 222, 2
  6187.     float temporary_camera_impulse_rotation_rad;
  6188.     float temporary_camera_impulse_pushback;
  6189.     float temporary_camera_impulse_jitter_from;
  6190.     float temporary_camera_impulse_jitter_to;
  6191.    
  6192.     // 240, 8
  6193.    
  6194.     float permanent_camera_impulse_angle_rad;
  6195.    
  6196.     // 252, 16
  6197.    
  6198.     float camera_shaking_duration;
  6199.     uint16_t camera_shaking_falloff_function;
  6200.     // 274, 2
  6201.     float camera_shaking_random_translation;
  6202.     float camera_shaking_random_rotation_rad;
  6203.     // 284, 12
  6204.     uint16_t camera_shaking_wobble_function;
  6205.     // 298, 2
  6206.     float camera_shaking_wobble_function_period;
  6207.     float camera_shaking_wobble_weight_frac;
  6208.    
  6209.     // 308, 32
  6210.    
  6211.     // dependency 1: sound sound snd!
  6212.     char sound_sound_tagclass[5];        //unsigned char[5]
  6213.     uint32_t sound_sound_tagnamepointer;   //uint32 ("random" number)
  6214.     uint32_t sound_sound_tagnamestringlength;   //uint32
  6215.     uint32_t sound_sound_tagid;      //uint32 (0xFFFFFFFF with tags)
  6216.     // char sound_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6217.    
  6218.     // 356, 112
  6219.    
  6220.     float breaking_effect_forward_velocity;
  6221.     float breaking_effect_forward_radius;
  6222.     float breaking_effect_forward_exponent;
  6223.     // 480, 12
  6224.    
  6225.     float breaking_effect_outward_velocity;
  6226.     float breaking_effect_outward_radius;
  6227.     float breaking_effect_outward_exponent;
  6228.    
  6229.     // 504, 12
  6230.    
  6231.     uint16_t damage_side_effect;
  6232.     uint16_t damage_category;
  6233.     uint32_t damage_flags;  //toff 520  0x00001FFF
  6234.     float damage_aoe_core_radius;
  6235.     float damage_damage_lower_bound;
  6236.     float damage_damage_upper_bound_from;
  6237.     float damage_damage_upper_bound_to;
  6238.     float damage_vehicle_passthrough_penalty_frac;   // none of these are checked for errors in fractionality
  6239.     float damage_active_camouflage_damage_frac;
  6240.     float damage_stun_frac;
  6241.     float damage_maximum_stun_frac;
  6242.     float damage_stun_time;
  6243.    
  6244.     // 560, 4
  6245.    
  6246.     float damage_instantaneous_acceleration;
  6247.    
  6248.     // 568, 8
  6249.    
  6250.     float damage_modifiers_dirt;
  6251.     float damage_modifiers_sand;
  6252.     float damage_modifiers_stone;
  6253.     float damage_modifiers_snow;
  6254.     float damage_modifiers_wood;
  6255.     float damage_modifiers_metal_hollow;
  6256.     float damage_modifiers_metal_thin;
  6257.     float damage_modifiers_metal_thick;
  6258.     float damage_modifiers_rubber;
  6259.     float damage_modifiers_glass;
  6260.     float damage_modifiers_force_field;
  6261.     float damage_modifiers_grunt;
  6262.     float damage_modifiers_hunter_armor;
  6263.     float damage_modifiers_hunter_skin;
  6264.     float damage_modifiers_elite;
  6265.     float damage_modifiers_jackal;
  6266.     float damage_modifiers_jackal_energy_shield;
  6267.     float damage_modifiers_engineer;
  6268.     float damage_modifiers_engineer_force_field;
  6269.     float damage_modifiers_flood_combat_form;
  6270.     float damage_modifiers_flood_carrier_form;
  6271.     float damage_modifiers_cyborg;
  6272.     float damage_modifiers_cyborg_energy_shield;
  6273.     float damage_modifiers_armored_human;
  6274.     float damage_modifiers_human;
  6275.     float damage_modifiers_sentinel;
  6276.     float damage_modifiers_monitor;
  6277.     float damage_modifiers_plastic;
  6278.     float damage_modifiers_water;
  6279.     float damage_modifiers_leaves;
  6280.     float damage_modifiers_elite_energy_shield;
  6281.     float damage_modifiers_ice;
  6282.     float damage_modifiers_hunter_shield;
  6283.    
  6284.     // 708, 28
  6285.     // dependency 1 tagpathname string goes here
  6286.    
  6287. } type_meta_jpt;
  6288.  
  6289. #pragma mark -- lens
  6290.  
  6291. typedef struct {
  6292.     float lens_flare_falloff_angle_rad;
  6293.     float lens_flare_cutoff_angle_rad;
  6294.     float INTERNAL_val1;   // 1 (little endian)
  6295.     float INTERNAL_val2;   // 1 (little endian)
  6296.     float occlusion_occlusion_radius;
  6297.     uint16_t occlusion_occlusion_offset_direction;
  6298.     // 86, 2
  6299.     float occlusion_near_fade_distance;
  6300.     float occlusion_far_fade_distance;
  6301.    
  6302.     // dependency 1: bitmaps bitmap bitm
  6303.     char bitmaps_bitmap_tagclass[5];         //unsigned char[5]
  6304.     uint32_t bitmaps_bitmap_tagnamepointer;   //uint32 ("random" number)
  6305.     uint32_t bitmaps_bitmap_tagnamestringlength;   //uint32
  6306.     uint32_t bitmaps_bitmap_tagid;       //uint32 (0xFFFFFFFF with tags)
  6307.     // char bitmaps_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6308.    
  6309.     // 112, 1
  6310.     uint8_t bitmaps_flags;  //toff 112  FIXED   0x01
  6311.    
  6312.     // 114, 78
  6313.     uint16_t corona_rotation_rotation_function;
  6314.     // 194, 2
  6315.     float corona_rotation_rotation_function_scale_rad;
  6316.     // 200, 24
  6317.     float corona_radius_scale_horizontal_scale;
  6318.     float corona_radius_scale_vertical_scale;
  6319.    
  6320.     // 232, 28
  6321.    
  6322.     // representation 1 board, offset 260
  6323.     // r1b_reflections_
  6324.     uint32_t r1b_reflections_entrycount; // maximum of 32 cells
  6325.     uint32_t r1b_reflections_random_id;
  6326.     uint32_t r1b_reflections_sig_id; // example value = 0x5C849C00
  6327.    
  6328.     // 272, 32
  6329.    
  6330.     // dependency 1 tagpathname string goes here
  6331.    
  6332.     struct lens_r1c {
  6333.         // representation 1 cells
  6334.         // r1c_reflections_
  6335.        
  6336.         // 1
  6337.         uint8_t r1c_reflections_flags;  //toff 304  0x0F    FIXED
  6338.        
  6339.         // 2
  6340.        
  6341.         uint16_t r1c_reflections_bitmap_index;
  6342.        
  6343.         // 22
  6344.        
  6345.         float r1c_reflections_position;
  6346.         float r1c_reflections_rotation_offset;   // not radians
  6347.         // 4
  6348.         float r1c_reflections_radius_from;
  6349.         float r1c_reflections_radius_to;
  6350.         uint16_t r1c_reflections_radius_scaled_by;
  6351.         // 2
  6352.         float r1c_reflections_brightness_from_frac;
  6353.         float r1c_reflections_brightness_to_frac;
  6354.         uint16_t r1c_reflections_brightness_scaled_by;
  6355.         // 2
  6356.        
  6357.         float r1c_reflections_tint_color_a_frac;
  6358.         float r1c_reflections_tint_color_r_frac;
  6359.         float r1c_reflections_tint_color_g_frac;
  6360.         float r1c_reflections_tint_color_b_frac;
  6361.        
  6362.         float r1c_reflections_animation_color_lower_bound_a_frac;
  6363.         float r1c_reflections_animation_color_lower_bound_r_frac;
  6364.         float r1c_reflections_animation_color_lower_bound_g_frac;
  6365.         float r1c_reflections_animation_color_lower_bound_b_frac;
  6366.        
  6367.         float r1c_reflections_animation_color_upper_bound_a_frac;
  6368.         float r1c_reflections_animation_color_upper_bound_r_frac;
  6369.         float r1c_reflections_animation_color_upper_bound_g_frac;
  6370.         float r1c_reflections_animation_color_upper_bound_b_frac;
  6371.        
  6372.         // 1
  6373.         uint8_t r1c_reflections_animation_flags;    //toff 416  0x03    FIXED
  6374.         uint16_t r1c_reflections_animation_animation_function;
  6375.         float r1c_reflections_animation_animation_period;
  6376.         float r1c_reflections_animation_animation_phase;
  6377.        
  6378.         // 4
  6379.        
  6380.     }r1c_reflections;
  6381.    
  6382. } type_meta_lens;
  6383.  
  6384. #pragma mark -- lifi
  6385.  
  6386. typedef struct {
  6387.     // OBJE 1 DATA START
  6388.     uint16_t INTERNAL_obje_index;   // 9 (little endian)
  6389.     // 1
  6390.     uint8_t flags;  //toff 66   0x0F    FIXED
  6391.     float bounding_radius;
  6392.     float bounding_offset_x;
  6393.     float bounding_offset_y;
  6394.     float bounding_offset_z;
  6395.     float origin_offset_x;
  6396.     float origin_offset_y;
  6397.     float origin_offset_z;
  6398.     float acceleration_scale;
  6399.     // offset 100 = 4 bytes of 0
  6400.    
  6401.     // dependency 1: model mod2
  6402.     char model_tagclass[5];      //unsigned char[5]
  6403.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  6404.     uint32_t model_tagnamestringlength;   //uint32
  6405.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  6406.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6407.    
  6408.     // dependency 2: animation graph antr
  6409.     char animation_graph_tagclass[5];        //unsigned char[5]
  6410.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  6411.     uint32_t animation_graph_tagnamestringlength;   //uint32
  6412.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  6413.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6414.    
  6415.     // offset 136 = 40 bytes of 0
  6416.    
  6417.     // dependency 3: collision model coll
  6418.     char collision_model_tagclass[5];        //unsigned char[5]
  6419.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  6420.     uint32_t collision_model_tagnamestringlength;   //uint32
  6421.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  6422.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6423.    
  6424.     // dependency 4: physics phys
  6425.     char physics_tagclass[5];        //unsigned char[5]
  6426.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  6427.     uint32_t physics_tagnamestringlength;   //uint32
  6428.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  6429.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6430.    
  6431.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  6432.     char modifier_shader_tagclass[5];        //unsigned char[5]
  6433.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  6434.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  6435.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  6436.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6437.    
  6438.     // dependency 6: creation effect effe
  6439.     char creation_effect_tagclass[5];        //unsigned char[5]
  6440.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  6441.     uint32_t creation_effect_tagnamestringlength;   //uint32
  6442.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  6443.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6444.    
  6445.     // offset 240 = 84 bytes of 0
  6446.    
  6447.     float render_bounding_radius;
  6448.    
  6449.     uint16_t export_to_functions_a_in;
  6450.     uint16_t export_to_functions_b_in;
  6451.     uint16_t export_to_functions_c_in;
  6452.     uint16_t export_to_functions_d_in;
  6453.    
  6454.     // offset 336 = 44 bytes of 0
  6455.    
  6456.     uint16_t export_to_functions_hud_text_message_index;
  6457.     uint16_t export_to_functions_forced_shader_permutation_index;
  6458.    
  6459.     // representation 1 board, offset 384
  6460.     // r1b_attachments_
  6461.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  6462.     uint32_t r1b_attachments_random_id;
  6463.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  6464.    
  6465.     // representation 2 board, offset 396
  6466.     // r2b_widgets_
  6467.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  6468.     uint32_t r2b_widgets_random_id;
  6469.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  6470.    
  6471.     // representation 3 board, offset 408
  6472.     // r3b_functions_
  6473.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  6474.     uint32_t r3b_functions_random_id;
  6475.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  6476.    
  6477.     // representation 4 board, offset 420
  6478.     // r4b_change_colors_
  6479.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  6480.     uint32_t r4b_change_colors_random_id;
  6481.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  6482.    
  6483.     // representation 5 board, offset 432
  6484.     // r5b_predicted_resources_
  6485.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  6486.     uint32_t r5b_predicted_resources_random_id;
  6487.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  6488.    
  6489.     // OBJE 1 DATA END
  6490.    
  6491.     uint32_t device_flags;   // offset 444, toff 444    0x00000003
  6492.     float device_power_transition_time;
  6493.     float device_power_acceleration_time;
  6494.     float device_position_transition_time;
  6495.     float device_position_acceleration_time;
  6496.     float device_depowered_position_transition_time;
  6497.     float device_depowered_position_acceleration_time;
  6498.     uint16_t device_a_in;
  6499.     uint16_t device_b_in;
  6500.     uint16_t device_c_in;
  6501.     uint16_t device_d_in;
  6502.    
  6503.     // dependency 7: open (up) effe snd!
  6504.     char device_open_up_tagclass[5];         //unsigned char[5]
  6505.     uint32_t device_open_up_tagnamepointer;   //uint32 ("random" number)
  6506.     uint32_t device_open_up_tagnamestringlength;   //uint32
  6507.     uint32_t device_open_up_tagid;       //uint32 (0xFFFFFFFF with tags)
  6508.     // char device_open_up_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6509.    
  6510.     // dependency 8: close (down) effe snd!
  6511.     char device_close_down_tagclass[5];      //unsigned char[5]
  6512.     uint32_t device_close_down_tagnamepointer;   //uint32 ("random" number)
  6513.     uint32_t device_close_down_tagnamestringlength;   //uint32
  6514.     uint32_t device_close_down_tagid;        //uint32 (0xFFFFFFFF with tags)
  6515.     // char device_close_down_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6516.    
  6517.     // dependency 9: opened effe snd!
  6518.     char device_opened_tagclass[5];      //unsigned char[5]
  6519.     uint32_t device_opened_tagnamepointer;   //uint32 ("random" number)
  6520.     uint32_t device_opened_tagnamestringlength;   //uint32
  6521.     uint32_t device_opened_tagid;        //uint32 (0xFFFFFFFF with tags)
  6522.     // char device_opened_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6523.    
  6524.     // dependency 10: closed effe snd!
  6525.     char device_closed_tagclass[5];      //unsigned char[5]
  6526.     uint32_t device_closed_tagnamepointer;   //uint32 ("random" number)
  6527.     uint32_t device_closed_tagnamestringlength;   //uint32
  6528.     uint32_t device_closed_tagid;        //uint32 (0xFFFFFFFF with tags)
  6529.     // char device_closed_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6530.    
  6531.     // dependency 11: depowered effe snd!
  6532.     char device_depowered_tagclass[5];       //unsigned char[5]
  6533.     uint32_t device_depowered_tagnamepointer;   //uint32 ("random" number)
  6534.     uint32_t device_depowered_tagnamestringlength;   //uint32
  6535.     uint32_t device_depowered_tagid;         //uint32 (0xFFFFFFFF with tags)
  6536.     // char device_depowered_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6537.    
  6538.     // dependency 12: repowered effe snd!
  6539.     char device_repowered_tagclass[5];       //unsigned char[5]
  6540.     uint32_t device_repowered_tagnamepointer;   //uint32 ("random" number)
  6541.     uint32_t device_repowered_tagnamestringlength;   //uint32
  6542.     uint32_t device_repowered_tagid;         //uint32 (0xFFFFFFFF with tags)
  6543.     // char device_repowered_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6544.    
  6545.     float device_delay_time;   // offset 576
  6546.     // offset 580 = 8 bytes of 0
  6547.    
  6548.     // dependency 13: delay effect effe snd!
  6549.     char device_delay_effect_tagclass[5];        //unsigned char[5]
  6550.     uint32_t device_delay_effect_tagnamepointer;   //uint32 ("random" number)
  6551.     uint32_t device_delay_effect_tagnamestringlength;   //uint32
  6552.     uint32_t device_delay_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  6553.     // char device_delay_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6554.    
  6555.     float device_automatic_activation_radius;
  6556.    
  6557.     // (henceforth differs from ctrl)
  6558.     // 608, 176
  6559.    
  6560.     // dependencies 1-6 tagpathname strings go here
  6561.    
  6562.     // OBJE DATA 2 START
  6563.    
  6564.     struct lifi_r1c {
  6565.         // representation 1 cells
  6566.         // r1c_attachments_
  6567.        
  6568.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  6569.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  6570.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  6571.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  6572.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  6573.         // char r1c_attachments_type_tagnamestring[255];
  6574.        
  6575.         char r1c_attachments_marker[32];
  6576.         uint16_t r1c_attachments_primary_scale;
  6577.         uint16_t r1c_attachments_secondary_scale;
  6578.         uint16_t r1c_attachments_change_color;
  6579.        
  6580.         // in cell here: 18 bytes of 0
  6581.        
  6582.     }r1c_attachments;
  6583.    
  6584.     // r1c 1 tag name strings here
  6585.    
  6586.     struct lifi_r2c {
  6587.         // representation 2 cells
  6588.         // r2c_widgets_
  6589.        
  6590.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  6591.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  6592.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  6593.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  6594.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  6595.         // char r2c_widgets_reference_tagnamestring[255];
  6596.        
  6597.         // in cell here: 16 bytes of 0
  6598.     }r2c_widgets;
  6599.    
  6600.     // r2c 1 tag name strings here
  6601.    
  6602.     struct lifi_r3c {
  6603.         // representation 3 cells
  6604.         // r3c_functions_
  6605.        
  6606.         uint32_t r3c_functions_flags;   //toff 784  0x00000007
  6607.         float r3c_functions_period;
  6608.         uint16_t r3c_functions_scale_period_by;
  6609.         uint16_t r3c_functions_function;
  6610.         uint16_t r3c_functions_scale_function_by;
  6611.         uint16_t r3c_functions_wobble_function;
  6612.         float r3c_functions_wobble_period;
  6613.         float r3c_functions_wobble_magnitude;
  6614.         float r3c_functions_square_wave_threshold_frac;
  6615.         uint16_t r3c_functions_step_count;
  6616.         uint16_t r3c_functions_map_to;
  6617.         uint16_t r3c_functions_sawtooth_count;
  6618.         uint16_t r3c_functions_add;
  6619.         uint16_t r3c_functions_scale_result_by;
  6620.         uint16_t r3c_functions_bounds_mode;
  6621.         float r3c_functions_bounds_from_frac;
  6622.         float r3c_functions_bounds_to_frac;
  6623.         // in cell here: 6 bytes of 0
  6624.         uint16_t r3c_functions_turn_off_with_sel;
  6625.         float r3c_functions_scale_by;
  6626.         // in cell here: 268 bytes of 0 (reminiscent of the pre-padding of other times strings come after cells)
  6627.         char r3c_functions_usage[32];
  6628.        
  6629.     }r3c_functions;
  6630.    
  6631.     struct lifi_r4c {
  6632.         // representation 4 cells
  6633.         // r4c_change_colors_
  6634.         uint16_t r4c_change_colors_darken_by;
  6635.         uint16_t r4c_change_colors_scale_by;
  6636.         uint32_t r4c_change_colors_scale_flags; //toff 1148 0x00000003
  6637.         float r4c_change_colors_color_lower_bound_r_frac;
  6638.         float r4c_change_colors_color_lower_bound_g_frac;
  6639.         float r4c_change_colors_color_lower_bound_b_frac;
  6640.         float r4c_change_colors_color_upper_bound_r_frac;
  6641.         float r4c_change_colors_color_upper_bound_g_frac;
  6642.         float r4c_change_colors_color_upper_bound_b_frac;
  6643.        
  6644.         // representation 4 sub-board A
  6645.         // r4sbA_permutations_
  6646.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  6647.         uint32_t r4sbA_permutations_random_id1;
  6648.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  6649.     }r4c_change_colors;
  6650.    
  6651.     struct lifi_r4scA
  6652.     {
  6653.         // representation 4 sub-cells A
  6654.         // r4scA_permutations_
  6655.         float r4scA_permutations_weight_frac;
  6656.         float r4scA_permutations_color_lower_bound_r_frac;
  6657.         float r4scA_permutations_color_lower_bound_g_frac;
  6658.         float r4scA_permutations_color_lower_bound_b_frac;
  6659.         float r4scA_permutations_color_upper_bound_r_frac;
  6660.         float r4scA_permutations_color_upper_bound_g_frac;
  6661.         float r4scA_permutations_color_upper_bound_b_frac;
  6662.     }r4sc_change_colors_permutations;
  6663.    
  6664.     struct lifi_r5c {
  6665.         // representation 5 cells
  6666.         // r5c_predicted_resources_
  6667.         uint16_t r5c_predicted_resources_type;
  6668.         uint16_t r5c_predicted_resources_resource_index;
  6669.         uint32_t r5c_predicted_resources_tag_index;
  6670.     }r5c_predicted_resources;
  6671.    
  6672.     // OBJE DATA 2 END
  6673.    
  6674.     // dependencies 7-13 tagpathname strings go here
  6675.    
  6676. } type_meta_lifi;
  6677.  
  6678. #pragma mark -- ligh
  6679.  
  6680. typedef struct {
  6681.     //uint16_t INTERNAL_optimization;   // 0 -- as usual, I'm unable to determine if this is just part of a uint32_t for flags; the value is written, however, but possibly as part of the flags
  6682.     uint32_t flags; //toff 64   0x0000003F  FIXED
  6683.    
  6684.     float shape_radius;
  6685.     float shape_radius_modifier_from;
  6686.     float shape_radius_modifier_to;
  6687.     float shape_falloff_angle_rad;
  6688.     float shape_cutoff_angle_rad;
  6689.     float shape_lens_flare_only_radius;
  6690.    
  6691.     // 92, 24
  6692.    
  6693.     uint32_t color_interpolation_flags; //toff 116  0x00000003
  6694.     float color_color_lower_bound_a_frac;
  6695.     float color_color_lower_bound_r_frac;
  6696.     float color_color_lower_bound_g_frac;
  6697.     float color_color_lower_bound_b_frac;
  6698.    
  6699.     float color_color_upper_bound_a_frac;
  6700.     float color_color_upper_bound_r_frac;
  6701.     float color_color_upper_bound_g_frac;
  6702.     float color_color_upper_bound_b_frac;
  6703.    
  6704.     // 152, 12
  6705.    
  6706.     // dependency 1: gel primary cube map bitm
  6707.     char gel_primary_cube_map_tagclass[5];       //unsigned char[5]
  6708.     uint32_t gel_primary_cube_map_tagnamepointer;   //uint32 ("random" number)
  6709.     uint32_t gel_primary_cube_map_tagnamestringlength;   //uint32
  6710.     uint32_t gel_primary_cube_map_tagid;         //uint32 (0xFFFFFFFF with tags)
  6711.     // char gel_primary_cube_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6712.    
  6713.     // 180, 2
  6714.    
  6715.     uint16_t gel_texture_animation_function;
  6716.     float gel_texture_animation_period;
  6717.    
  6718.     // dependency 2: gel secondary cube map bitm
  6719.     char gel_secondary_cube_map_tagclass[5];         //unsigned char[5]
  6720.     uint32_t gel_secondary_cube_map_tagnamepointer;   //uint32 ("random" number)
  6721.     uint32_t gel_secondary_cube_map_tagnamestringlength;   //uint32
  6722.     uint32_t gel_secondary_cube_map_tagid;       //uint32 (0xFFFFFFFF with tags)
  6723.     // char gel_secondary_cube_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6724.    
  6725.     // 204, 2
  6726.     uint16_t gel_yaw_function;
  6727.     float gel_yaw_period;
  6728.     // 212, 2
  6729.     uint16_t gel_roll_function;
  6730.     float gel_roll_period;
  6731.     // 220, 2
  6732.     uint16_t gel_pitch_function;
  6733.     float gel_pitch_period;
  6734.     // 228, 8
  6735.    
  6736.     // dependency 3: lens flare lens flare lens
  6737.     char lens_flare_lens_flare_tagclass[5];      //unsigned char[5]
  6738.     uint32_t lens_flare_lens_flare_tagnamepointer;   //uint32 ("random" number)
  6739.     uint32_t lens_flare_lens_flare_tagnamestringlength;   //uint32
  6740.     uint32_t lens_flare_lens_flare_tagid;        //uint32 (0xFFFFFFFF with tags)
  6741.     // char lens_flare_lens_flare_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6742.    
  6743.     // 252, 24
  6744.    
  6745.     float radiosity_intensity;
  6746.     float radiosity_color_r_frac;
  6747.     float radiosity_color_g_frac;
  6748.     float radiosity_color_b_frac;
  6749.    
  6750.     // 292, 16
  6751.    
  6752.     float effect_parameters_duration;
  6753.     // 312, 2
  6754.     uint16_t effect_parameters_falloff_function;
  6755.    
  6756.     // 316, 100
  6757.    
  6758.     // dependency tagpathname strings go here
  6759.    
  6760. } type_meta_ligh;
  6761.  
  6762. #pragma mark -- lsnd
  6763.  
  6764. typedef struct {
  6765.     //uint16_t INTERNAL_optimization;   // 0 -- as usual, I'm unable to determine if this is just part of a uint32_t for flags; the value is written, however, but possibly as part of the flags
  6766.     uint32_t flags; //toff 64 (previous is not logical) 0x00000007  FIXED
  6767.     float when_scale_is_zero_detail_sound_period;
  6768.     // 72, 8
  6769.     float when_scale_is_one_detail_sound_period;
  6770.     // 84, 24
  6771.    
  6772.     // dependency 1: when scale is one continuous damage effect cdmg
  6773.     char when_scale_is_one_continuous_damage_effect_tagclass[5];         //unsigned char[5]
  6774.     uint32_t when_scale_is_one_continuous_damage_effect_tagnamepointer;   //uint32 ("random" number)
  6775.     uint32_t when_scale_is_one_continuous_damage_effect_tagnamestringlength;   //uint32
  6776.     uint32_t when_scale_is_one_continuous_damage_effect_tagid;       //uint32 (0xFFFFFFFF with tags)
  6777.     // char when_scale_is_one_continuous_damage_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6778.    
  6779.     // representation 1 board, offset 124
  6780.     // r1b_tracks_
  6781.     uint32_t r1b_tracks_entrycount; // maximum of 4 cells
  6782.     uint32_t r1b_tracks_random_id;
  6783.     uint32_t r1b_tracks_sig_id; // example value = 0x9C969B00
  6784.    
  6785.     // representation 2 board, offset 136
  6786.     // r2b_detail_sounds_
  6787.     uint32_t r2b_detail_sounds_entrycount; // maximum of 32 cells
  6788.     uint32_t r2b_detail_sounds_random_id;
  6789.     uint32_t r2b_detail_sounds_sig_id; // example value = 0x5C979B00
  6790.    
  6791.     // dependency 1 tagpathname string goes here
  6792.    
  6793.     struct lsnd_r1c {
  6794.         // representation 1 cells
  6795.         // r1c_tracks_
  6796.        
  6797.         uint32_t r1c_tracks_flags;   // confirmed 32 bit, toff 148  0x00000007
  6798.        
  6799.         float r1c_tracks_gain_frac;
  6800.         float r1c_tracks_fade_in_duration;
  6801.         float r1c_tracks_fade_out_duration;
  6802.        
  6803.         // 32
  6804.        
  6805.         // dependency r1c 1: tracks start snd!
  6806.         char r1c1_tracks_start_tagclass[5];      //unsigned char[5]
  6807.         uint32_t r1c1_tracks_start_tagnamepointer;   //uint32 ("random" number)
  6808.         uint32_t r1c1_tracks_start_tagnamestringlength;   //uint32
  6809.         uint32_t r1c1_tracks_start_tagid;        //uint32 (0xFFFFFFFF with tags)
  6810.         // char r1c1_tracks_start_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6811.        
  6812.         // dependency r1c 2: tracks loop snd!
  6813.         char r1c2_tracks_loop_tagclass[5];       //unsigned char[5]
  6814.         uint32_t r1c2_tracks_loop_tagnamepointer;   //uint32 ("random" number)
  6815.         uint32_t r1c2_tracks_loop_tagnamestringlength;   //uint32
  6816.         uint32_t r1c2_tracks_loop_tagid;         //uint32 (0xFFFFFFFF with tags)
  6817.         // char r1c2_tracks_loop_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6818.        
  6819.         // dependency r1c 3: tracks end snd!
  6820.         char r1c3_tracks_end_tagclass[5];        //unsigned char[5]
  6821.         uint32_t r1c3_tracks_end_tagnamepointer;   //uint32 ("random" number)
  6822.         uint32_t r1c3_tracks_end_tagnamestringlength;   //uint32
  6823.         uint32_t r1c3_tracks_end_tagid;      //uint32 (0xFFFFFFFF with tags)
  6824.         // char r1c3_tracks_end_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6825.        
  6826.         // 32
  6827.        
  6828.         // dependency r1c 4: tracks alternate loop snd!
  6829.         char r1c4_tracks_alternate_loop_tagclass[5];         //unsigned char[5]
  6830.         uint32_t r1c4_tracks_alternate_loop_tagnamepointer;   //uint32 ("random" number)
  6831.         uint32_t r1c4_tracks_alternate_loop_tagnamestringlength;   //uint32
  6832.         uint32_t r1c4_tracks_alternate_loop_tagid;       //uint32 (0xFFFFFFFF with tags)
  6833.         // char r1c4_tracks_alternate_loop_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6834.        
  6835.         // dependency r1c 5: tracks alternate end snd!
  6836.         char r1c5_tracks_alternate_end_tagclass[5];      //unsigned char[5]
  6837.         uint32_t r1c5_tracks_alternate_end_tagnamepointer;   //uint32 ("random" number)
  6838.         uint32_t r1c5_tracks_alternate_end_tagnamestringlength;   //uint32
  6839.         uint32_t r1c5_tracks_alternate_end_tagid;        //uint32 (0xFFFFFFFF with tags)
  6840.         // char r1c5_tracks_alternate_end_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6841.        
  6842.     }r1c_tracks;
  6843.    
  6844.     // dependencies r1c 1-5 tagpathname strings go here, as {1 2 3 4 5}
  6845.    
  6846.     struct lsnd_r2c {
  6847.         // representation 2 cells
  6848.         // r2c_detail_sounds_
  6849.        
  6850.         // dependency r2c 1: detail sounds sound snd!
  6851.         char r2c1_detail_sounds_sound_tagclass[5];       //unsigned char[5]
  6852.         uint32_t r2c1_detail_sounds_sound_tagnamepointer;   //uint32 ("random" number)
  6853.         uint32_t r2c1_detail_sounds_sound_tagnamestringlength;   //uint32
  6854.         uint32_t r2c1_detail_sounds_sound_tagid;         //uint32 (0xFFFFFFFF with tags)
  6855.         // char r2c1_detail_sounds_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6856.        
  6857.         float r2c_detail_sounds_frequency_of_play_random_period_bounds_from;
  6858.         float r2c_detail_sounds_frequency_of_play_random_period_bounds_to;
  6859.         float r2c_detail_sounds_frequency_of_play_gain_frac;
  6860.         uint32_t r2c_detail_sounds_frequency_of_play_flags; // toff 336 0x00000003
  6861.        
  6862.         // 48
  6863.        
  6864.         float r2c_detail_sounds_random_spatialization_yaw_bounds_from_rad;
  6865.         float r2c_detail_sounds_random_spatialization_yaw_bounds_to_rad;
  6866.         float r2c_detail_sounds_random_spatialization_pitch_bounds_from_rad;
  6867.         float r2c_detail_sounds_random_spatialization_pitch_bounds_to_rad;
  6868.         float r2c_detail_sounds_random_spatialization_distance_bounds_from;
  6869.         float r2c_detail_sounds_random_spatialization_distance_bounds_to;
  6870.        
  6871.     }r2c_detail_sounds;
  6872.    
  6873.     // dependency r2c 1 tagpathname strings go here
  6874. } type_meta_lsnd;
  6875.  
  6876. #pragma mark -- mach
  6877.  
  6878. typedef struct {
  6879.     // OBJE 1 DATA START
  6880.     uint16_t INTERNAL_obje_index;   // 7 (little endian)
  6881.     // 1
  6882.     uint8_t flags;  //toff 66   0x0F    FIXED
  6883.     float bounding_radius;
  6884.     float bounding_offset_x;
  6885.     float bounding_offset_y;
  6886.     float bounding_offset_z;
  6887.     float origin_offset_x;
  6888.     float origin_offset_y;
  6889.     float origin_offset_z;
  6890.     float acceleration_scale;
  6891.     // offset 100 = 4 bytes of 0
  6892.    
  6893.     // dependency 1: model mod2
  6894.     char model_tagclass[5];      //unsigned char[5]
  6895.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  6896.     uint32_t model_tagnamestringlength;   //uint32
  6897.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  6898.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6899.    
  6900.     // dependency 2: animation graph antr
  6901.     char animation_graph_tagclass[5];        //unsigned char[5]
  6902.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  6903.     uint32_t animation_graph_tagnamestringlength;   //uint32
  6904.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  6905.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6906.    
  6907.     // offset 136 = 40 bytes of 0
  6908.    
  6909.     // dependency 3: collision model coll
  6910.     char collision_model_tagclass[5];        //unsigned char[5]
  6911.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  6912.     uint32_t collision_model_tagnamestringlength;   //uint32
  6913.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  6914.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6915.    
  6916.     // dependency 4: physics phys
  6917.     char physics_tagclass[5];        //unsigned char[5]
  6918.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  6919.     uint32_t physics_tagnamestringlength;   //uint32
  6920.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  6921.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6922.    
  6923.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  6924.     char modifier_shader_tagclass[5];        //unsigned char[5]
  6925.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  6926.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  6927.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  6928.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6929.    
  6930.     // dependency 6: creation effect effe
  6931.     char creation_effect_tagclass[5];        //unsigned char[5]
  6932.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  6933.     uint32_t creation_effect_tagnamestringlength;   //uint32
  6934.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  6935.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  6936.    
  6937.     // offset 240 = 84 bytes of 0
  6938.    
  6939.     float render_bounding_radius;
  6940.    
  6941.     uint16_t export_to_functions_a_in;
  6942.     uint16_t export_to_functions_b_in;
  6943.     uint16_t export_to_functions_c_in;
  6944.     uint16_t export_to_functions_d_in;
  6945.    
  6946.     // offset 336 = 44 bytes of 0
  6947.    
  6948.     uint16_t export_to_functions_hud_text_message_index;
  6949.     uint16_t export_to_functions_forced_shader_permutation_index;
  6950.    
  6951.     // representation 1 board, offset 384
  6952.     // r1b_attachments_
  6953.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  6954.     uint32_t r1b_attachments_random_id;
  6955.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  6956.    
  6957.     // representation 2 board, offset 396
  6958.     // r2b_widgets_
  6959.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  6960.     uint32_t r2b_widgets_random_id;
  6961.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  6962.    
  6963.     // representation 3 board, offset 408
  6964.     // r3b_functions_
  6965.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  6966.     uint32_t r3b_functions_random_id;
  6967.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  6968.    
  6969.     // representation 4 board, offset 420
  6970.     // r4b_change_colors_
  6971.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  6972.     uint32_t r4b_change_colors_random_id;
  6973.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  6974.    
  6975.     // representation 5 board, offset 432
  6976.     // r5b_predicted_resources_
  6977.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  6978.     uint32_t r5b_predicted_resources_random_id;
  6979.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  6980.    
  6981.     // OBJE 1 DATA END
  6982.    
  6983.     uint32_t device_flags;   // offset 444, toff 444    0X00000003
  6984.     float device_power_transition_time;
  6985.     float device_power_acceleration_time;
  6986.     float device_position_transition_time;
  6987.     float device_position_acceleration_time;
  6988.     float device_depowered_position_transition_time;
  6989.     float device_depowered_position_acceleration_time;
  6990.     uint16_t device_a_in;
  6991.     uint16_t device_b_in;
  6992.     uint16_t device_c_in;
  6993.     uint16_t device_d_in;
  6994.    
  6995.     // dependency 7: open (up) effe snd!
  6996.     char device_open_up_tagclass[5];         //unsigned char[5]
  6997.     uint32_t device_open_up_tagnamepointer;   //uint32 ("random" number)
  6998.     uint32_t device_open_up_tagnamestringlength;   //uint32
  6999.     uint32_t device_open_up_tagid;       //uint32 (0xFFFFFFFF with tags)
  7000.     // char device_open_up_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7001.    
  7002.     // dependency 8: close (down) effe snd!
  7003.     char device_close_down_tagclass[5];      //unsigned char[5]
  7004.     uint32_t device_close_down_tagnamepointer;   //uint32 ("random" number)
  7005.     uint32_t device_close_down_tagnamestringlength;   //uint32
  7006.     uint32_t device_close_down_tagid;        //uint32 (0xFFFFFFFF with tags)
  7007.     // char device_close_down_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7008.    
  7009.     // dependency 9: opened effe snd!
  7010.     char device_opened_tagclass[5];      //unsigned char[5]
  7011.     uint32_t device_opened_tagnamepointer;   //uint32 ("random" number)
  7012.     uint32_t device_opened_tagnamestringlength;   //uint32
  7013.     uint32_t device_opened_tagid;        //uint32 (0xFFFFFFFF with tags)
  7014.     // char device_opened_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7015.    
  7016.     // dependency 10: closed effe snd!
  7017.     char device_closed_tagclass[5];      //unsigned char[5]
  7018.     uint32_t device_closed_tagnamepointer;   //uint32 ("random" number)
  7019.     uint32_t device_closed_tagnamestringlength;   //uint32
  7020.     uint32_t device_closed_tagid;        //uint32 (0xFFFFFFFF with tags)
  7021.     // char device_closed_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7022.    
  7023.     // dependency 11: depowered effe snd!
  7024.     char device_depowered_tagclass[5];       //unsigned char[5]
  7025.     uint32_t device_depowered_tagnamepointer;   //uint32 ("random" number)
  7026.     uint32_t device_depowered_tagnamestringlength;   //uint32
  7027.     uint32_t device_depowered_tagid;         //uint32 (0xFFFFFFFF with tags)
  7028.     // char device_depowered_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7029.    
  7030.     // dependency 12: repowered effe snd!
  7031.     char device_repowered_tagclass[5];       //unsigned char[5]
  7032.     uint32_t device_repowered_tagnamepointer;   //uint32 ("random" number)
  7033.     uint32_t device_repowered_tagnamestringlength;   //uint32
  7034.     uint32_t device_repowered_tagid;         //uint32 (0xFFFFFFFF with tags)
  7035.     // char device_repowered_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7036.    
  7037.     float device_delay_time;   // offset 576
  7038.     // offset 580 = 8 bytes of 0
  7039.    
  7040.     // dependency 13: delay effect effe snd!
  7041.     char device_delay_effect_tagclass[5];        //unsigned char[5]
  7042.     uint32_t device_delay_effect_tagnamepointer;   //uint32 ("random" number)
  7043.     uint32_t device_delay_effect_tagnamestringlength;   //uint32
  7044.     uint32_t device_delay_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  7045.     // char device_delay_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7046.    
  7047.     float device_automatic_activation_radius;
  7048.    
  7049.     // (henceforth differs from ctrl and lifi)
  7050.     // 608, 112
  7051.    
  7052.     uint16_t machine_type;
  7053.     // 1
  7054.     uint8_t machine_flags;  //toff 722  0x07    FIXED
  7055.     float machine_door_open_time;
  7056.     // 728, 80
  7057.     uint16_t machine_collision_response;
  7058.     uint16_t machine_elevator_node;
  7059.    
  7060.     // 812, 56
  7061.    
  7062.    
  7063.     // dependencies 1-6 tagpathname strings go here
  7064.    
  7065.     // OBJE DATA 2 START
  7066.    
  7067.     struct mach_r1c {
  7068.         // representation 1 cells
  7069.         // r1c_attachments_
  7070.        
  7071.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  7072.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  7073.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  7074.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  7075.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  7076.         // char r1c_attachments_type_tagnamestring[255];
  7077.        
  7078.         char r1c_attachments_marker[32];
  7079.         uint16_t r1c_attachments_primary_scale;
  7080.         uint16_t r1c_attachments_secondary_scale;
  7081.         uint16_t r1c_attachments_change_color;
  7082.        
  7083.         // in cell here: 18 bytes of 0
  7084.        
  7085.     }r1c_attachments;
  7086.    
  7087.     // r1c 1 tag name strings here
  7088.    
  7089.     struct mach_r2c {
  7090.         // representation 2 cells
  7091.         // r2c_widgets_
  7092.        
  7093.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  7094.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  7095.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  7096.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  7097.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  7098.         // char r2c_widgets_reference_tagnamestring[255];
  7099.        
  7100.         // in cell here: 16 bytes of 0
  7101.     }r2c_widgets;
  7102.    
  7103.     // r2c 1 tag name strings here
  7104.    
  7105.     struct mach_r3c {
  7106.         // representation 3 cells
  7107.         // r3c_functions_
  7108.        
  7109.         uint32_t r3c_functions_flags;   //toff 868  0x00000007
  7110.         float r3c_functions_period;
  7111.         uint16_t r3c_functions_scale_period_by;
  7112.         uint16_t r3c_functions_function;
  7113.         uint16_t r3c_functions_scale_function_by;
  7114.         uint16_t r3c_functions_wobble_function;
  7115.         float r3c_functions_wobble_period;
  7116.         float r3c_functions_wobble_magnitude;
  7117.         float r3c_functions_square_wave_threshold_frac;
  7118.         uint16_t r3c_functions_step_count;
  7119.         uint16_t r3c_functions_map_to;
  7120.         uint16_t r3c_functions_sawtooth_count;
  7121.         uint16_t r3c_functions_add;
  7122.         uint16_t r3c_functions_scale_result_by;
  7123.         uint16_t r3c_functions_bounds_mode;
  7124.         float r3c_functions_bounds_from_frac;
  7125.         float r3c_functions_bounds_to_frac;
  7126.         // in cell here: 6 bytes of 0
  7127.         uint16_t r3c_functions_turn_off_with_sel;
  7128.         float r3c_functions_scale_by;
  7129.         // in cell here: 268 bytes of 0 (reminiscent of the pre-padding of other times strings come after cells)
  7130.         char r3c_functions_usage[32];
  7131.        
  7132.     }r3c_functions;
  7133.    
  7134.     struct mach_r4c {
  7135.         // representation 4 cells
  7136.         // r4c_change_colors_
  7137.         uint16_t r4c_change_colors_darken_by;
  7138.         uint16_t r4c_change_colors_scale_by;
  7139.         uint32_t r4c_change_colors_scale_flags; //toff 1232 0x00000003
  7140.         float r4c_change_colors_color_lower_bound_r_frac;
  7141.         float r4c_change_colors_color_lower_bound_g_frac;
  7142.         float r4c_change_colors_color_lower_bound_b_frac;
  7143.         float r4c_change_colors_color_upper_bound_r_frac;
  7144.         float r4c_change_colors_color_upper_bound_g_frac;
  7145.         float r4c_change_colors_color_upper_bound_b_frac;
  7146.        
  7147.         // representation 4 sub-board A
  7148.         // r4sbA_permutations_
  7149.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  7150.         uint32_t r4sbA_permutations_random_id1;
  7151.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  7152.     }r4c_change_colors;
  7153.    
  7154.     struct mach_r4scA
  7155.     {
  7156.         // representation 4 sub-cells A
  7157.         // r4scA_permutations_
  7158.         float r4scA_permutations_weight_frac;
  7159.         float r4scA_permutations_color_lower_bound_r_frac;
  7160.         float r4scA_permutations_color_lower_bound_g_frac;
  7161.         float r4scA_permutations_color_lower_bound_b_frac;
  7162.         float r4scA_permutations_color_upper_bound_r_frac;
  7163.         float r4scA_permutations_color_upper_bound_g_frac;
  7164.         float r4scA_permutations_color_upper_bound_b_frac;
  7165.     }r4sc_change_colors_permutations;
  7166.    
  7167.     struct mach_r5c {
  7168.         // representation 5 cells
  7169.         // r5c_predicted_resources_
  7170.         uint16_t r5c_predicted_resources_type;
  7171.         uint16_t r5c_predicted_resources_resource_index;
  7172.         uint32_t r5c_predicted_resources_tag_index;
  7173.     }r5c_predicted_resources;
  7174.    
  7175.     // OBJE DATA 2 END
  7176.    
  7177.     // dependencies 7-13 tagpathname strings go here
  7178.    
  7179. } type_meta_mach;
  7180.  
  7181. #pragma mark -- matg
  7182.  
  7183. typedef struct {
  7184.     // 64, 248
  7185.    
  7186.     // representation 1 board, offset 312
  7187.     // r1b_sounds_
  7188.     uint32_t r1b_sounds_entrycount; // maximum of 2 cells
  7189.     uint32_t r1b_sounds_random_id;
  7190.     uint32_t r1b_sounds_sig_id; // example value = 0x002B9D00
  7191.    
  7192.     // representation 2 board, offset 324
  7193.     // r2b_camera_
  7194.     uint32_t r2b_camera_entrycount; // maximum of 1 cell
  7195.     uint32_t r2b_camera_random_id;
  7196.     uint32_t r2b_camera_sig_id; // example value = 0xB42A9D00
  7197.    
  7198.     // representation 3 board, offset 336
  7199.     // r3b_player_control_
  7200.     uint32_t r3b_player_control_entrycount; // maximum of 1 cell
  7201.     uint32_t r3b_player_control_random_id;
  7202.     uint32_t r3b_player_control_sig_id; // example value = 0x702A9D00
  7203.    
  7204.     // representation 4 board, offset 348
  7205.     // r4b_difficulty_
  7206.     uint32_t r4b_difficulty_entrycount; // maximum of 1 cell
  7207.     uint32_t r4b_difficulty_random_id;
  7208.     uint32_t r4b_difficulty_sig_id; // example value = 0x3C299D00
  7209.    
  7210.     // representation 5 board, offset 360
  7211.     // r5b_grenades_
  7212.     uint32_t r5b_grenades_entrycount; // maximum of 2 cells
  7213.     uint32_t r5b_grenades_random_id;
  7214.     uint32_t r5b_grenades_sig_id; // example value = 0x7C239D00
  7215.    
  7216.     // representation 6 board, offset 372
  7217.     // r6b_rasterizer_data_
  7218.     uint32_t r6b_rasterizer_data_entrycount; // maximum of 1 cell
  7219.     uint32_t r6b_rasterizer_data_random_id;
  7220.     uint32_t r6b_rasterizer_data_sig_id; // example value = 0x68219D00
  7221.    
  7222.     // representation 7 board, offset 384
  7223.     // r7b_interface_bitmaps_
  7224.     uint32_t r7b_interface_bitmaps_entrycount; // maximum of 1 cell
  7225.     uint32_t r7b_interface_bitmaps_random_id;
  7226.     uint32_t r7b_interface_bitmaps_sig_id; // example value = 0x70229D00
  7227.    
  7228.     // representation 8 board, offset 396
  7229.     // r8b_weapon_list_ (update _weapon_list enum in game_globals.h)
  7230.     uint32_t r8b_weapon_list_entrycount; // maximum of 20 cells
  7231.     uint32_t r8b_weapon_list_random_id;
  7232.     uint32_t r8b_weapon_list_sig_id; // example value = 0xB4229D00
  7233.    
  7234.     // representation 9 board, offset 408
  7235.     // r9b_cheat_powerups_
  7236.     uint32_t r9b_cheat_powerups_entrycount; // maximum of 20 cells
  7237.     uint32_t r9b_cheat_powerups_random_id;
  7238.     uint32_t r9b_cheat_powerups_sig_id; // example value = 0xF8229D00
  7239.    
  7240.     // representation 10 board, offset 420
  7241.     // r10b_multiplayer_information_
  7242.     uint32_t r10b_multiplayer_information_entrycount; // maximum of 1 cell
  7243.     uint32_t r10b_multiplayer_information_random_id;
  7244.     uint32_t r10b_multiplayer_information_sig_id; // example value = 0x9C1C9D00
  7245.    
  7246.     // representation 11 board, offset 432
  7247.     // r11b_player_information_
  7248.     uint32_t r11b_player_information_entrycount; // maximum of 1 cell
  7249.     uint32_t r11b_player_information_random_id;
  7250.     uint32_t r11b_player_information_sig_id; // example value = 0x241E9D00
  7251.    
  7252.     // representation 12 board, offset 444
  7253.     // r12b_first_person_interface_
  7254.     uint32_t r12b_first_person_interface_entrycount; // maximum of 1 cell
  7255.     uint32_t r12b_first_person_interface_random_id;
  7256.     uint32_t r12b_first_person_interface_sig_id; // example value = 0xD81E9D00
  7257.    
  7258.     // representation 13 board, offset 456
  7259.     // r13b_falling_damage_
  7260.     uint32_t r13b_falling_damage_entrycount; // maximum of 1 cell
  7261.     uint32_t r13b_falling_damage_random_id;
  7262.     uint32_t r13b_falling_damage_sig_id; // example value = 0x981F9D00
  7263.    
  7264.     // representation 14 board, offset 468
  7265.     // r14b_materials_
  7266.     uint32_t r14b_materials_entrycount; // maximum of 33 cells
  7267.     uint32_t r14b_materials_random_id;
  7268.     uint32_t r14b_materials_sig_id; // example value = 0xBC1A9D00
  7269.    
  7270.     // representation 15 board, offset 480
  7271.     // r15b_playlist_members_
  7272.     uint32_t r15b_playlist_members_entrycount; // maximum of 20 cells
  7273.     uint32_t r15b_playlist_members_random_id;
  7274.     uint32_t r15b_playlist_members_sig_id; // example value = 0x541B9D00
  7275.    
  7276.     struct matg_r1c {
  7277.         // representation 1 cells
  7278.         // r1c_sounds_
  7279.        
  7280.         // dependency r1c 1: sounds sound snd!
  7281.         char r1c1_sounds_sound_tagclass[5];      //unsigned char[5]
  7282.         uint32_t r1c1_sounds_sound_tagnamepointer;   //uint32 ("random" number)
  7283.         uint32_t r1c1_sounds_sound_tagnamestringlength;   //uint32
  7284.         uint32_t r1c1_sounds_sound_tagid;        //uint32 (0xFFFFFFFF with tags)
  7285.         // char r1c1_sounds_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7286.        
  7287.     }r1c_sounds;
  7288.    
  7289.     // dependency r1c1 tagpathname strings go here
  7290.    
  7291.     struct matg_r2c {
  7292.         // representation 2 cells
  7293.         // r2c_camera_
  7294.        
  7295.         // dependency r2c 1: camera default unit camera track trak
  7296.         char r2c1_camera_default_unit_camera_track_tagclass[5];      //unsigned char[5]
  7297.         uint32_t r2c1_camera_default_unit_camera_track_tagnamepointer;   //uint32 ("random" number)
  7298.         uint32_t r2c1_camera_default_unit_camera_track_tagnamestringlength;   //uint32
  7299.         uint32_t r2c1_camera_default_unit_camera_track_tagid;        //uint32 (0xFFFFFFFF with tags)
  7300.         // char r2c1_camera_default_unit_camera_track_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7301.        
  7302.     }r2c_camera;
  7303.    
  7304.     // dependency r2c1 tagpathname string(s) go(es) here (maximum of one cell in that table)
  7305.    
  7306.     struct matg_r3c {
  7307.         // representation 3 cells
  7308.         // r3c_player_control_
  7309.        
  7310.         float r3c_player_control_magnetism_friction_frac;
  7311.         float r3c_player_control_magnetism_adhesion_frac;
  7312.         float r3c_player_control_inconsequential_target_scale_frac;
  7313.        
  7314.         // 52
  7315.        
  7316.         float r3c_player_control_look_acceleration_time;
  7317.         float r3c_player_control_look_acceleration_scale;
  7318.         float r3c_player_control_look_peg_threshold_frac;
  7319.         float r3c_player_control_look_default_pitch_rate;   // not radians
  7320.         float r3c_player_control_look_default_yaw_rate;   // not radians
  7321.         float r3c_player_control_look_autoleveling_scale;
  7322.        
  7323.         // 20
  7324.        
  7325.         uint16_t r3c_player_control_minimum_weapon_swap_ticks;
  7326.         uint16_t r3c_player_control_minimum_autoleveling_ticks;
  7327.         float r3c_player_control_minimum_angle_for_vehicle_flipping_rad;
  7328.        
  7329.         // representation 3 sub-board A
  7330.         // r3sbA_look_function_
  7331.         uint32_t r3sbA_look_function_entrycount; // maximum of 16 cells -- each cell is displayed with a fraction of the total cell count from 0.000 to 1.000
  7332.         uint32_t r3sbA_look_function_random_id;
  7333.         uint32_t r3sbA_look_function_sig_id; // example value = 0x80299D00
  7334.        
  7335.         //... finally, a logical embedding of cells!
  7336.         //... or not, because there is only one cell for r3c :(
  7337.         //... so it is ambiguous.
  7338.        
  7339.         //    struct matg_r3scA {
  7340.         //       // representation 3 sub-cells A
  7341.         //       // r3scA_look_function_
  7342.         //       float r3scA_look_function_scale;
  7343.         //    }r3scA_player_control_look_function;
  7344.        
  7345.     }r3c_player_control;
  7346.    
  7347.     struct matg_r3scA {
  7348.         // representation 3 sub-cells A
  7349.         // r3scA_look_function_
  7350.         float r3scA_look_function_scale;
  7351.     }r3scA_player_control_look_function;
  7352.    
  7353.     struct matg_r4c {   // offset 782 in test
  7354.         // representation 4 cells
  7355.         // r4c_difficulty_
  7356.        
  7357.         float r4c_difficulty_health_easy_enemy_damage;
  7358.         float r4c_difficulty_health_normal_enemy_damage;
  7359.         float r4c_difficulty_health_hard_enemy_damage;
  7360.         float r4c_difficulty_health_impossible_enemy_damage;
  7361.         float r4c_difficulty_health_easy_enemy_vitality;
  7362.         float r4c_difficulty_health_normal_enemy_vitality;
  7363.         float r4c_difficulty_health_hard_enemy_vitality;
  7364.         float r4c_difficulty_health_impossible_enemy_vitality;
  7365.         float r4c_difficulty_health_easy_enemy_shield;
  7366.         float r4c_difficulty_health_normal_enemy_shield;
  7367.         float r4c_difficulty_health_hard_enemy_shield;
  7368.         float r4c_difficulty_health_impossible_enemy_shield;
  7369.         float r4c_difficulty_health_easy_enemy_recharge;
  7370.         float r4c_difficulty_health_normal_enemy_recharge;
  7371.         float r4c_difficulty_health_hard_enemy_recharge;
  7372.         float r4c_difficulty_health_impossible_enemy_recharge;
  7373.         float r4c_difficulty_health_easy_friend_damage;
  7374.         float r4c_difficulty_health_normal_friend_damage;
  7375.         float r4c_difficulty_health_hard_friend_damage;
  7376.         float r4c_difficulty_health_impossible_friend_damage;
  7377.         float r4c_difficulty_health_easy_friend_vitality;
  7378.         float r4c_difficulty_health_normal_friend_vitality;
  7379.         float r4c_difficulty_health_hard_friend_vitality;
  7380.         float r4c_difficulty_health_impossible_friend_vitality;
  7381.         float r4c_difficulty_health_easy_friend_shield;
  7382.         float r4c_difficulty_health_normal_friend_shield;
  7383.         float r4c_difficulty_health_hard_friend_shield;
  7384.         float r4c_difficulty_health_impossible_friend_shield;
  7385.         float r4c_difficulty_health_easy_friend_recharge;
  7386.         float r4c_difficulty_health_normal_friend_recharge;
  7387.         float r4c_difficulty_health_hard_friend_recharge;
  7388.         float r4c_difficulty_health_impossible_friend_recharge;
  7389.         float r4c_difficulty_health_easy_infection_forms;
  7390.         float r4c_difficulty_health_normal_infection_forms;
  7391.         float r4c_difficulty_health_hard_infection_forms;
  7392.         float r4c_difficulty_health_impossible_infection_forms;
  7393.        
  7394.         // 16
  7395.        
  7396.         float r4c_difficulty_ranged_fire_easy_rate_of_fire;
  7397.         float r4c_difficulty_ranged_fire_normal_rate_of_fire;
  7398.         float r4c_difficulty_ranged_fire_hard_rate_of_fire;
  7399.         float r4c_difficulty_ranged_fire_impossible_rate_of_fire;
  7400.         float r4c_difficulty_ranged_fire_easy_projectile_error;
  7401.         float r4c_difficulty_ranged_fire_normal_projectile_error;
  7402.         float r4c_difficulty_ranged_fire_hard_projectile_error;
  7403.         float r4c_difficulty_ranged_fire_impossible_projectile_error;
  7404.         float r4c_difficulty_ranged_fire_easy_burst_error;
  7405.         float r4c_difficulty_ranged_fire_normal_burst_error;
  7406.         float r4c_difficulty_ranged_fire_hard_burst_error;
  7407.         float r4c_difficulty_ranged_fire_impossible_burst_error;
  7408.         float r4c_difficulty_ranged_fire_easy_new_target_delay;
  7409.         float r4c_difficulty_ranged_fire_normal_new_target_delay;
  7410.         float r4c_difficulty_ranged_fire_hard_new_target_delay;
  7411.         float r4c_difficulty_ranged_fire_impossible_new_target_delay;
  7412.         float r4c_difficulty_ranged_fire_easy_burst_separation;
  7413.         float r4c_difficulty_ranged_fire_normal_burst_separation;
  7414.         float r4c_difficulty_ranged_fire_hard_burst_separation;
  7415.         float r4c_difficulty_ranged_fire_impossible_burst_separation;
  7416.         float r4c_difficulty_ranged_fire_easy_target_tracking;
  7417.         float r4c_difficulty_ranged_fire_normal_target_tracking;
  7418.         float r4c_difficulty_ranged_fire_hard_target_tracking;
  7419.         float r4c_difficulty_ranged_fire_impossible_target_tracking;
  7420.         float r4c_difficulty_ranged_fire_easy_target_leading;
  7421.         float r4c_difficulty_ranged_fire_normal_target_leading;
  7422.         float r4c_difficulty_ranged_fire_hard_target_leading;
  7423.         float r4c_difficulty_ranged_fire_impossible_target_leading;
  7424.         float r4c_difficulty_ranged_fire_easy_overcharge_chance;
  7425.         float r4c_difficulty_ranged_fire_normal_overcharge_chance;
  7426.         float r4c_difficulty_ranged_fire_hard_overcharge_chance;
  7427.         float r4c_difficulty_ranged_fire_impossible_overcharge_chance;
  7428.         float r4c_difficulty_ranged_fire_easy_special_fire_delay;
  7429.         float r4c_difficulty_ranged_fire_normal_special_fire_delay;
  7430.         float r4c_difficulty_ranged_fire_hard_special_fire_delay;
  7431.         float r4c_difficulty_ranged_fire_impossible_special_fire_delay;
  7432.         float r4c_difficulty_ranged_fire_easy_guidance_vs_player;
  7433.         float r4c_difficulty_ranged_fire_normal_guidance_vs_player;
  7434.         float r4c_difficulty_ranged_fire_hard_guidance_vs_player;
  7435.         float r4c_difficulty_ranged_fire_impossible_guidance_vs_player;
  7436.         float r4c_difficulty_ranged_fire_easy_melee_delay_base;
  7437.         float r4c_difficulty_ranged_fire_normal_melee_delay_base;
  7438.         float r4c_difficulty_ranged_fire_hard_melee_delay_base;
  7439.         float r4c_difficulty_ranged_fire_impossible_melee_delay_base;
  7440.         float r4c_difficulty_ranged_fire_easy_melee_delay_scale;
  7441.         float r4c_difficulty_ranged_fire_normal_melee_delay_scale;
  7442.         float r4c_difficulty_ranged_fire_hard_melee_delay_scale;
  7443.         float r4c_difficulty_ranged_fire_impossible_melee_delay_scale;
  7444.        
  7445.         // 16
  7446.        
  7447.         float r4c_difficulty_grenades_easy_grenade_chance_scale;
  7448.         float r4c_difficulty_grenades_normal_grenade_chance_scale;
  7449.         float r4c_difficulty_grenades_hard_grenade_chance_scale;
  7450.         float r4c_difficulty_grenades_impossible_grenade_chance_scale;
  7451.         float r4c_difficulty_grenades_easy_grenade_timer_scale;
  7452.         float r4c_difficulty_grenades_normal_grenade_timer_scale;
  7453.         float r4c_difficulty_grenades_hard_grenade_timer_scale;
  7454.         float r4c_difficulty_grenades_impossible_grenade_timer_scale;
  7455.        
  7456.         // 48
  7457.        
  7458.         float r4c_difficulty_placement_easy_major_upgrade_normal;
  7459.         float r4c_difficulty_placement_normal_major_upgrade_normal;
  7460.         float r4c_difficulty_placement_hard_major_upgrade_normal;
  7461.         float r4c_difficulty_placement_impossible_major_upgrade_normal;
  7462.         float r4c_difficulty_placement_easy_major_upgrade_few;
  7463.         float r4c_difficulty_placement_normal_major_upgrade_few;
  7464.         float r4c_difficulty_placement_hard_major_upgrade_few;
  7465.         float r4c_difficulty_placement_impossible_major_upgrade_few;
  7466.         float r4c_difficulty_placement_easy_major_upgrade_many;
  7467.         float r4c_difficulty_placement_normal_major_upgrade_many;
  7468.         float r4c_difficulty_placement_hard_major_upgrade_many;
  7469.         float r4c_difficulty_placement_impossible_major_upgrade_many;
  7470.        
  7471.         // 148
  7472.        
  7473.     }r4c_difficulty;
  7474.    
  7475.     struct matg_r5c {
  7476.         // representation 5 cells
  7477.         // r5c_grenades_
  7478.        
  7479.         uint16_t r5c_grenades_maximum_count;
  7480.         uint16_t r5c_grenades_mp_spawn_default;
  7481.        
  7482.         // dependency r5c 1: throwing effect effe
  7483.         char r5c1_throwing_effect_tagclass[5];       //unsigned char[5]
  7484.         uint32_t r5c1_throwing_effect_tagnamepointer;   //uint32 ("random" number)
  7485.         uint32_t r5c1_throwing_effect_tagnamestringlength;   //uint32
  7486.         uint32_t r5c1_throwing_effect_tagid;         //uint32 (0xFFFFFFFF with tags)
  7487.         // char r5c1_throwing_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7488.        
  7489.         // dependency r5c 2: hud interface grhi
  7490.         char r5c2_hud_interface_tagclass[5];         //unsigned char[5]
  7491.         uint32_t r5c2_hud_interface_tagnamepointer;   //uint32 ("random" number)
  7492.         uint32_t r5c2_hud_interface_tagnamestringlength;   //uint32
  7493.         uint32_t r5c2_hud_interface_tagid;       //uint32 (0xFFFFFFFF with tags)
  7494.         // char r5c2_hud_interface_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7495.        
  7496.         // dependency r5c 3: equipment eqip
  7497.         char r5c3_equipment_tagclass[5];         //unsigned char[5]
  7498.         uint32_t r5c3_equipment_tagnamepointer;   //uint32 ("random" number)
  7499.         uint32_t r5c3_equipment_tagnamestringlength;   //uint32
  7500.         uint32_t r5c3_equipment_tagid;       //uint32 (0xFFFFFFFF with tags)
  7501.         // char r5c3_equipment_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7502.        
  7503.         // dependency r5c 4: projectile proj
  7504.         char r5c4_projectile_tagclass[5];        //unsigned char[5]
  7505.         uint32_t r5c4_projectile_tagnamepointer;   //uint32 ("random" number)
  7506.         uint32_t r5c4_projectile_tagnamestringlength;   //uint32
  7507.         uint32_t r5c4_projectile_tagid;      //uint32 (0xFFFFFFFF with tags)
  7508.         // char r5c4_projectile_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7509.        
  7510.     }r5c_grenades;
  7511.    
  7512.     // dependencies r5c tagpathname strings go here, as {r5c1 r5c2 r5c3 r5c4}
  7513.    
  7514.     struct matg_r6c {
  7515.         // representation 6 cells
  7516.         // r6c_rasterizer_data_
  7517.        
  7518.         // dependency r6c 1: function textures distance attenuation bitm
  7519.         char r6c1_function_textures_distance_attenuation_tagclass[5];        //unsigned char[5]
  7520.         uint32_t r6c1_function_textures_distance_attenuation_tagnamepointer;   //uint32 ("random" number)
  7521.         uint32_t r6c1_function_textures_distance_attenuation_tagnamestringlength;   //uint32
  7522.         uint32_t r6c1_function_textures_distance_attenuation_tagid;      //uint32 (0xFFFFFFFF with tags)
  7523.         // char r6c1_function_textures_distance_attenuation_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7524.        
  7525.         // dependency r6c 2: function textures vector normalization bitm
  7526.         char r6c2_function_textures_vector_normalization_tagclass[5];        //unsigned char[5]
  7527.         uint32_t r6c2_function_textures_vector_normalization_tagnamepointer;   //uint32 ("random" number)
  7528.         uint32_t r6c2_function_textures_vector_normalization_tagnamestringlength;   //uint32
  7529.         uint32_t r6c2_function_textures_vector_normalization_tagid;      //uint32 (0xFFFFFFFF with tags)
  7530.         // char r6c2_function_textures_vector_normalization_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7531.        
  7532.         // dependency r6c 3: function textures atmospheric fog density bitm
  7533.         char r6c3_function_textures_atmospheric_fog_density_tagclass[5];         //unsigned char[5]
  7534.         uint32_t r6c3_function_textures_atmospheric_fog_density_tagnamepointer;   //uint32 ("random" number)
  7535.         uint32_t r6c3_function_textures_atmospheric_fog_density_tagnamestringlength;   //uint32
  7536.         uint32_t r6c3_function_textures_atmospheric_fog_density_tagid;       //uint32 (0xFFFFFFFF with tags)
  7537.         // char r6c3_function_textures_atmospheric_fog_density_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7538.        
  7539.         // dependency r6c 4: function textures planar fog density bitm
  7540.         char r6c4_function_textures_planar_fog_density_tagclass[5];      //unsigned char[5]
  7541.         uint32_t r6c4_function_textures_planar_fog_density_tagnamepointer;   //uint32 ("random" number)
  7542.         uint32_t r6c4_function_textures_planar_fog_density_tagnamestringlength;   //uint32
  7543.         uint32_t r6c4_function_textures_planar_fog_density_tagid;        //uint32 (0xFFFFFFFF with tags)
  7544.         // char r6c4_function_textures_planar_fog_density_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7545.        
  7546.         // dependency r6c 5: function textures linear corner fade bitm
  7547.         char r6c5_function_textures_linear_corner_fade_tagclass[5];      //unsigned char[5]
  7548.         uint32_t r6c5_function_textures_linear_corner_fade_tagnamepointer;   //uint32 ("random" number)
  7549.         uint32_t r6c5_function_textures_linear_corner_fade_tagnamestringlength;   //uint32
  7550.         uint32_t r6c5_function_textures_linear_corner_fade_tagid;        //uint32 (0xFFFFFFFF with tags)
  7551.         // char r6c5_function_textures_linear_corner_fade_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7552.        
  7553.         // dependency r6c 6: function textures active camouflage distortion bitm
  7554.         char r6c6_function_textures_active_camouflage_distortion_tagclass[5];        //unsigned char[5]
  7555.         uint32_t r6c6_function_textures_active_camouflage_distortion_tagnamepointer;   //uint32 ("random" number)
  7556.         uint32_t r6c6_function_textures_active_camouflage_distortion_tagnamestringlength;   //uint32
  7557.         uint32_t r6c6_function_textures_active_camouflage_distortion_tagid;      //uint32 (0xFFFFFFFF with tags)
  7558.         // char r6c6_function_textures_active_camouflage_distortion_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7559.        
  7560.         // dependency r6c 7: function textures glow bitm
  7561.         char r6c7_function_textures_glow_tagclass[5];        //unsigned char[5]
  7562.         uint32_t r6c7_function_textures_glow_tagnamepointer;   //uint32 ("random" number)
  7563.         uint32_t r6c7_function_textures_glow_tagnamestringlength;   //uint32
  7564.         uint32_t r6c7_function_textures_glow_tagid;      //uint32 (0xFFFFFFFF with tags)
  7565.         // char r6c7_function_textures_glow_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7566.        
  7567.         // 60
  7568.        
  7569.         // dependency r6c 8: default textures default 2D bitm
  7570.         char r6c8_default_textures_default_2d_tagclass[5];       //unsigned char[5]
  7571.         uint32_t r6c8_default_textures_default_2d_tagnamepointer;   //uint32 ("random" number)
  7572.         uint32_t r6c8_default_textures_default_2d_tagnamestringlength;   //uint32
  7573.         uint32_t r6c8_default_textures_default_2d_tagid;         //uint32 (0xFFFFFFFF with tags)
  7574.         // char r6c8_default_textures_default_2d_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7575.        
  7576.         // dependency r6c 9: default textures default 3D bitm
  7577.         char r6c9_default_textures_default_3d_tagclass[5];       //unsigned char[5]
  7578.         uint32_t r6c9_default_textures_default_3d_tagnamepointer;   //uint32 ("random" number)
  7579.         uint32_t r6c9_default_textures_default_3d_tagnamestringlength;   //uint32
  7580.         uint32_t r6c9_default_textures_default_3d_tagid;         //uint32 (0xFFFFFFFF with tags)
  7581.         // char r6c9_default_textures_default_3d_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7582.        
  7583.         // dependency r6c 10: default textures default cube map bitm
  7584.         char r6c10_default_textures_default_cube_map_tagclass[5];        //unsigned char[5]
  7585.         uint32_t r6c10_default_textures_default_cube_map_tagnamepointer;   //uint32 ("random" number)
  7586.         uint32_t r6c10_default_textures_default_cube_map_tagnamestringlength;   //uint32
  7587.         uint32_t r6c10_default_textures_default_cube_map_tagid;      //uint32 (0xFFFFFFFF with tags)
  7588.         // char r6c10_default_textures_default_cube_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7589.        
  7590.         // dependency r6c 11: experimental textures test 0 bitm
  7591.         char r6c11_experimental_textures_test_0_tagclass[5];         //unsigned char[5]
  7592.         uint32_t r6c11_experimental_textures_test_0_tagnamepointer;   //uint32 ("random" number)
  7593.         uint32_t r6c11_experimental_textures_test_0_tagnamestringlength;   //uint32
  7594.         uint32_t r6c11_experimental_textures_test_0_tagid;       //uint32 (0xFFFFFFFF with tags)
  7595.         // char r6c11_experimental_textures_test_0_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7596.        
  7597.         // dependency r6c 12: experimental textures test 1 bitm
  7598.         char r6c12_experimental_textures_test_1_tagclass[5];         //unsigned char[5]
  7599.         uint32_t r6c12_experimental_textures_test_1_tagnamepointer;   //uint32 ("random" number)
  7600.         uint32_t r6c12_experimental_textures_test_1_tagnamestringlength;   //uint32
  7601.         uint32_t r6c12_experimental_textures_test_1_tagid;       //uint32 (0xFFFFFFFF with tags)
  7602.         // char r6c12_experimental_textures_test_1_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7603.        
  7604.         // dependency r6c 13: experimental textures test 2 bitm
  7605.         char r6c13_experimental_textures_test_2_tagclass[5];         //unsigned char[5]
  7606.         uint32_t r6c13_experimental_textures_test_2_tagnamepointer;   //uint32 ("random" number)
  7607.         uint32_t r6c13_experimental_textures_test_2_tagnamestringlength;   //uint32
  7608.         uint32_t r6c13_experimental_textures_test_2_tagid;       //uint32 (0xFFFFFFFF with tags)
  7609.         // char r6c13_experimental_textures_test_2_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7610.        
  7611.         // dependency r6c 14: experimental textures test 3 bitm
  7612.         char r6c14_experimental_textures_test_3_tagclass[5];         //unsigned char[5]
  7613.         uint32_t r6c14_experimental_textures_test_3_tagnamepointer;   //uint32 ("random" number)
  7614.         uint32_t r6c14_experimental_textures_test_3_tagnamestringlength;   //uint32
  7615.         uint32_t r6c14_experimental_textures_test_3_tagid;       //uint32 (0xFFFFFFFF with tags)
  7616.         // char r6c14_experimental_textures_test_3_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7617.        
  7618.         // dependency r6c 15: video effect textures video scanline map bitm
  7619.         char r6c15_video_effect_textures_video_scanline_map_tagclass[5];         //unsigned char[5]
  7620.         uint32_t r6c15_video_effect_textures_video_scanline_map_tagnamepointer;   //uint32 ("random" number)
  7621.         uint32_t r6c15_video_effect_textures_video_scanline_map_tagnamestringlength;   //uint32
  7622.         uint32_t r6c15_video_effect_textures_video_scanline_map_tagid;       //uint32 (0xFFFFFFFF with tags)
  7623.         // char r6c15_video_effect_textures_video_scanline_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7624.        
  7625.         // dependency r6c 16: video effect textures video noise map bitm
  7626.         char r6c16_video_effect_textures_video_noise_map_tagclass[5];        //unsigned char[5]
  7627.         uint32_t r6c16_video_effect_textures_video_noise_map_tagnamepointer;   //uint32 ("random" number)
  7628.         uint32_t r6c16_video_effect_textures_video_noise_map_tagnamestringlength;   //uint32
  7629.         uint32_t r6c16_video_effect_textures_video_noise_map_tagid;      //uint32 (0xFFFFFFFF with tags)
  7630.         // char r6c16_video_effect_textures_video_noise_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7631.        
  7632.         // 52
  7633.         // 1
  7634.         uint8_t active_camouflage_flags;   // confirmed 16 bit, toff 858    ...8-bit 0x01   FIXED
  7635.        
  7636.         // 2
  7637.        
  7638.         float active_camouflage_refraction_amount;
  7639.         float active_camouflage_distance_falloff;
  7640.         float active_camouflage_tint_color_r_frac;
  7641.         float active_camouflage_tint_color_g_frac;
  7642.         float active_camouflage_tint_color_b_frac;
  7643.         float active_camouflage_hyper_stealth_refraction;
  7644.         float active_camouflage_hyper_stealth_distance_falloff;
  7645.         float active_camouflage_hyper_stealth_tint_color_r_frac;
  7646.         float active_camouflage_hyper_stealth_tint_color_g_frac;
  7647.         float active_camouflage_hyper_stealth_tint_color_b_frac;
  7648.        
  7649.         // dependency r6c 17: pc textures distance attenuation 2d bitm
  7650.         char r6c17_pc_textures_distance_attenuation_2d_tagclass[5];      //unsigned char[5]
  7651.         uint32_t r6c17_pc_textures_distance_attenuation_2d_tagnamepointer;   //uint32 ("random" number)
  7652.         uint32_t r6c17_pc_textures_distance_attenuation_2d_tagnamestringlength;   //uint32
  7653.         uint32_t r6c17_pc_textures_distance_attenuation_2d_tagid;        //uint32 (0xFFFFFFFF with tags)
  7654.         // char r6c17_pc_textures_distance_attenuation_2d_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7655.        
  7656.        
  7657.     }r6c_rasterizer_data;
  7658.    
  7659.     // dependencies r6c 1-17 tagpathname strings go here (probably as {r6c1 r6c2 r6c3 ... r6c17}, but since there is only 1 cell, it is ambiguous, so whatever)
  7660.    
  7661.     struct matg_r7c {
  7662.         // representation 7 cells
  7663.         // r7c_interface_bitmaps_
  7664.        
  7665.         // dependency r7c 1: font system font
  7666.         char r7c1_font_system_tagclass[5];       //unsigned char[5]
  7667.         uint32_t r7c1_font_system_tagnamepointer;   //uint32 ("random" number)
  7668.         uint32_t r7c1_font_system_tagnamestringlength;   //uint32
  7669.         uint32_t r7c1_font_system_tagid;         //uint32 (0xFFFFFFFF with tags)
  7670.         // char r7c1_font_system_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7671.        
  7672.         // dependency r7c 2: font terminal font
  7673.         char r7c2_font_terminal_tagclass[5];         //unsigned char[5]
  7674.         uint32_t r7c2_font_terminal_tagnamepointer;   //uint32 ("random" number)
  7675.         uint32_t r7c2_font_terminal_tagnamestringlength;   //uint32
  7676.         uint32_t r7c2_font_terminal_tagid;       //uint32 (0xFFFFFFFF with tags)
  7677.         // char r7c2_font_terminal_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7678.        
  7679.         // dependency r7c 3: screen color table colo
  7680.         char r7c3_screen_color_table_tagclass[5];        //unsigned char[5]
  7681.         uint32_t r7c3_screen_color_table_tagnamepointer;   //uint32 ("random" number)
  7682.         uint32_t r7c3_screen_color_table_tagnamestringlength;   //uint32
  7683.         uint32_t r7c3_screen_color_table_tagid;      //uint32 (0xFFFFFFFF with tags)
  7684.         // char r7c3_screen_color_table_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7685.        
  7686.         // dependency r7c 4: hud color table colo
  7687.         char r7c4_hud_color_table_tagclass[5];       //unsigned char[5]
  7688.         uint32_t r7c4_hud_color_table_tagnamepointer;   //uint32 ("random" number)
  7689.         uint32_t r7c4_hud_color_table_tagnamestringlength;   //uint32
  7690.         uint32_t r7c4_hud_color_table_tagid;         //uint32 (0xFFFFFFFF with tags)
  7691.         // char r7c4_hud_color_table_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7692.        
  7693.         // dependency r7c 5: editor color table colo
  7694.         char r7c5_editor_color_table_tagclass[5];        //unsigned char[5]
  7695.         uint32_t r7c5_editor_color_table_tagnamepointer;   //uint32 ("random" number)
  7696.         uint32_t r7c5_editor_color_table_tagnamestringlength;   //uint32
  7697.         uint32_t r7c5_editor_color_table_tagid;      //uint32 (0xFFFFFFFF with tags)
  7698.         // char r7c5_editor_color_table_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7699.        
  7700.         // dependency r7c 6: dialog color table colo
  7701.         char r7c6_dialog_color_table_tagclass[5];        //unsigned char[5]
  7702.         uint32_t r7c6_dialog_color_table_tagnamepointer;   //uint32 ("random" number)
  7703.         uint32_t r7c6_dialog_color_table_tagnamestringlength;   //uint32
  7704.         uint32_t r7c6_dialog_color_table_tagid;      //uint32 (0xFFFFFFFF with tags)
  7705.         // char r7c6_dialog_color_table_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7706.        
  7707.         // dependency r7c 7: hud globals hudg
  7708.         char r7c7_hud_globals_tagclass[5];       //unsigned char[5]
  7709.         uint32_t r7c7_hud_globals_tagnamepointer;   //uint32 ("random" number)
  7710.         uint32_t r7c7_hud_globals_tagnamestringlength;   //uint32
  7711.         uint32_t r7c7_hud_globals_tagid;         //uint32 (0xFFFFFFFF with tags)
  7712.         // char r7c7_hud_globals_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7713.        
  7714.         // dependency r7c 8: motion sensor sweep bitmap bitm
  7715.         char r7c8_motion_sensor_sweep_bitmap_tagclass[5];        //unsigned char[5]
  7716.         uint32_t r7c8_motion_sensor_sweep_bitmap_tagnamepointer;   //uint32 ("random" number)
  7717.         uint32_t r7c8_motion_sensor_sweep_bitmap_tagnamestringlength;   //uint32
  7718.         uint32_t r7c8_motion_sensor_sweep_bitmap_tagid;      //uint32 (0xFFFFFFFF with tags)
  7719.         // char r7c8_motion_sensor_sweep_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7720.        
  7721.         // dependency r7c 9: motion sensor sweep bitmap mask bitm
  7722.         char r7c9_motion_sensor_sweep_bitmap_mask_tagclass[5];       //unsigned char[5]
  7723.         uint32_t r7c9_motion_sensor_sweep_bitmap_mask_tagnamepointer;   //uint32 ("random" number)
  7724.         uint32_t r7c9_motion_sensor_sweep_bitmap_mask_tagnamestringlength;   //uint32
  7725.         uint32_t r7c9_motion_sensor_sweep_bitmap_mask_tagid;         //uint32 (0xFFFFFFFF with tags)
  7726.         // char r7c9_motion_sensor_sweep_bitmap_mask_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7727.        
  7728.         // dependency r7c 10: multiplayer hud bitmap bitm
  7729.         char r7c10_multiplayer_hud_bitmap_tagclass[5];       //unsigned char[5]
  7730.         uint32_t r7c10_multiplayer_hud_bitmap_tagnamepointer;   //uint32 ("random" number)
  7731.         uint32_t r7c10_multiplayer_hud_bitmap_tagnamestringlength;   //uint32
  7732.         uint32_t r7c10_multiplayer_hud_bitmap_tagid;         //uint32 (0xFFFFFFFF with tags)
  7733.         // char r7c10_multiplayer_hud_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7734.        
  7735.         // dependency r7c 11: localization strn
  7736.         char r7c11_localization_tagclass[5];         //unsigned char[5]
  7737.         uint32_t r7c11_localization_tagnamepointer;   //uint32 ("random" number)
  7738.         uint32_t r7c11_localization_tagnamestringlength;   //uint32
  7739.         uint32_t r7c11_localization_tagid;       //uint32 (0xFFFFFFFF with tags)
  7740.         // char r7c11_localization_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7741.        
  7742.         // dependency r7c 12: hud digits definition hudn
  7743.         char r7c12_hud_digits_definition_tagclass[5];        //unsigned char[5]
  7744.         uint32_t r7c12_hud_digits_definition_tagnamepointer;   //uint32 ("random" number)
  7745.         uint32_t r7c12_hud_digits_definition_tagnamestringlength;   //uint32
  7746.         uint32_t r7c12_hud_digits_definition_tagid;      //uint32 (0xFFFFFFFF with tags)
  7747.         // char r7c12_hud_digits_definition_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7748.        
  7749.         // dependency r7c 13: motion sensor blip bitmap bitm
  7750.         char r7c13_motion_sensor_blip_bitmap_tagclass[5];        //unsigned char[5]
  7751.         uint32_t r7c13_motion_sensor_blip_bitmap_tagnamepointer;   //uint32 ("random" number)
  7752.         uint32_t r7c13_motion_sensor_blip_bitmap_tagnamestringlength;   //uint32
  7753.         uint32_t r7c13_motion_sensor_blip_bitmap_tagid;      //uint32 (0xFFFFFFFF with tags)
  7754.         // char r7c13_motion_sensor_blip_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7755.        
  7756.         // dependency r7c 14: interface goo map1 bitm
  7757.         char r7c14_interface_goo_map1_tagclass[5];       //unsigned char[5]
  7758.         uint32_t r7c14_interface_goo_map1_tagnamepointer;   //uint32 ("random" number)
  7759.         uint32_t r7c14_interface_goo_map1_tagnamestringlength;   //uint32
  7760.         uint32_t r7c14_interface_goo_map1_tagid;         //uint32 (0xFFFFFFFF with tags)
  7761.         // char r7c14_interface_goo_map1_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7762.        
  7763.         // dependency r7c 15: interface goo map2 bitm
  7764.         char r7c15_interface_goo_map2_tagclass[5];       //unsigned char[5]
  7765.         uint32_t r7c15_interface_goo_map2_tagnamepointer;   //uint32 ("random" number)
  7766.         uint32_t r7c15_interface_goo_map2_tagnamestringlength;   //uint32
  7767.         uint32_t r7c15_interface_goo_map2_tagid;         //uint32 (0xFFFFFFFF with tags)
  7768.         // char r7c15_interface_goo_map2_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7769.        
  7770.         // dependency r7c 16: interface goo map3 bitm
  7771.         char r7c16_interface_goo_map3_tagclass[5];       //unsigned char[5]
  7772.         uint32_t r7c16_interface_goo_map3_tagnamepointer;   //uint32 ("random" number)
  7773.         uint32_t r7c16_interface_goo_map3_tagnamestringlength;   //uint32
  7774.         uint32_t r7c16_interface_goo_map3_tagid;         //uint32 (0xFFFFFFFF with tags)
  7775.         // char r7c16_interface_goo_map3_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7776.        
  7777.         // 48
  7778.        
  7779.     }r7c_interface_bitmaps;
  7780.    
  7781.     // dependencies r7c 1-16 tagpathname strings go here (ambiguous order due to only 1 cell)
  7782.    
  7783.     struct matg_r8c {
  7784.         // representation 8 cells
  7785.         // r8c_weapon_list_
  7786.        
  7787.         // dependency r8c 1: weapon eqip garb item weap
  7788.         char r8c1_weapon_tagclass[5];        //unsigned char[5]
  7789.         uint32_t r8c1_weapon_tagnamepointer;   //uint32 ("random" number)
  7790.         uint32_t r8c1_weapon_tagnamestringlength;   //uint32
  7791.         uint32_t r8c1_weapon_tagid;      //uint32 (0xFFFFFFFF with tags)
  7792.         // char r8c1_weapon_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7793.        
  7794.     }r8c_weapon_list;
  7795.    
  7796.     // dependency r8c1 tagpathname strings go here
  7797.    
  7798.     struct matg_r9c {
  7799.         // representation 9 cells
  7800.         // r9c_cheat_powerups_
  7801.        
  7802.         // dependency r9c 1: powerup eqip
  7803.         char r9c1_powerup_tagclass[5];       //unsigned char[5]
  7804.         uint32_t r9c1_powerup_tagnamepointer;   //uint32 ("random" number)
  7805.         uint32_t r9c1_powerup_tagnamestringlength;   //uint32
  7806.         uint32_t r9c1_powerup_tagid;         //uint32 (0xFFFFFFFF with tags)
  7807.         // char r9c1_powerup_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7808.        
  7809.     }r9c_cheat_powerups;
  7810.    
  7811.     // dependency r9c1 tagpathname strings go here
  7812.    
  7813.     struct matg_r10c {   // I am guessing that r10c is contained within a container struct, but it doesn't matter since there is a maximum of 1 cell anyway
  7814.         // representation 10 cells
  7815.         // r10c_multiplayer_information_
  7816.        
  7817.         // dependency r10c 1: flag eqip garb item weap
  7818.         char r10c1_flag_tagclass[5];         //unsigned char[5]
  7819.         uint32_t r10c1_flag_tagnamepointer;   //uint32 ("random" number)
  7820.         uint32_t r10c1_flag_tagnamestringlength;   //uint32
  7821.         uint32_t r10c1_flag_tagid;       //uint32 (0xFFFFFFFF with tags)
  7822.         // char r10c1_flag_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7823.        
  7824.         // dependency r10c 2: unit bipd unit vehi
  7825.         char r10c2_unit_tagclass[5];         //unsigned char[5]
  7826.         uint32_t r10c2_unit_tagnamepointer;   //uint32 ("random" number)
  7827.         uint32_t r10c2_unit_tagnamestringlength;   //uint32
  7828.         uint32_t r10c2_unit_tagid;       //uint32 (0xFFFFFFFF with tags)
  7829.         // char r10c2_unit_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7830.        
  7831.         // representation 10 sub-board A
  7832.         // r10sbA_vehicles_
  7833.         uint32_t r10sbA_vehicles_entrycount; // maximum of 20 cells
  7834.         uint32_t r10sbA_vehicles_random_id;
  7835.         uint32_t r10sbA_vehicles_sig_id; // example value = 0xA41B9D00
  7836.        
  7837.         // dependency r10c 3: hill shader shdr senv soso schi scex sotr sgla smet spla swat
  7838.         char r10c3_hill_shader_tagclass[5];      //unsigned char[5]
  7839.         uint32_t r10c3_hill_shader_tagnamepointer;   //uint32 ("random" number)
  7840.         uint32_t r10c3_hill_shader_tagnamestringlength;   //uint32
  7841.         uint32_t r10c3_hill_shader_tagid;        //uint32 (0xFFFFFFFF with tags)
  7842.         // char r10c3_hill_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7843.        
  7844.         // dependency r10c 4: flag shader shdr senv soso schi scex sotr sgla smet spla swat
  7845.         char r10c4_flag_shader_tagclass[5];      //unsigned char[5]
  7846.         uint32_t r10c4_flag_shader_tagnamepointer;   //uint32 ("random" number)
  7847.         uint32_t r10c4_flag_shader_tagnamestringlength;   //uint32
  7848.         uint32_t r10c4_flag_shader_tagid;        //uint32 (0xFFFFFFFF with tags)
  7849.         // char r10c4_flag_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7850.        
  7851.         // dependency r10c 5: ball eqip garb item weap
  7852.         char r10c5_ball_tagclass[5];         //unsigned char[5]
  7853.         uint32_t r10c5_ball_tagnamepointer;   //uint32 ("random" number)
  7854.         uint32_t r10c5_ball_tagnamestringlength;   //uint32
  7855.         uint32_t r10c5_ball_tagid;       //uint32 (0xFFFFFFFF with tags)
  7856.         // char r10c5_ball_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7857.        
  7858.         // representation 10 sub-board B
  7859.         // r10sbB_sounds_
  7860.         uint32_t r10sbB_sounds_entrycount; // maximum of 60 cells
  7861.         uint32_t r10sbB_sounds_random_id;
  7862.         uint32_t r10sbB_sounds_sig_id; // example value = 0xF41B9D00
  7863.        
  7864.         // 56
  7865.        
  7866.     }r10c_multiplayer_information;
  7867.    
  7868.     // dependencies r10c1 and r10c2 tagpathname strings go here
  7869.    
  7870.     struct matg_r10scA {
  7871.         // representation 10 sub-cells A
  7872.         // r10scA_vehicles_
  7873.        
  7874.         // dependency r10scA 1: vehicle vehi
  7875.         char r10scA1_vehicle_tagclass[5];        //unsigned char[5]
  7876.         uint32_t r10scA1_vehicle_tagnamepointer;   //uint32 ("random" number)
  7877.         uint32_t r10scA1_vehicle_tagnamestringlength;   //uint32
  7878.         uint32_t r10scA1_vehicle_tagid;      //uint32 (0xFFFFFFFF with tags)
  7879.         // char r10scA1_vehicle_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7880.        
  7881.     }r10scA_vehicles;
  7882.    
  7883.     // dependency r10scA1 tagpathname strings go here
  7884.    
  7885.     // dependencies r10c 3-5 tagpathname strings go here (for just the current cell, probably)
  7886.    
  7887.     struct matg_r10scB {
  7888.         // representation 10 sub-cells B
  7889.         // r10scB_sounds_
  7890.        
  7891.         // dependency r10scB 1: sound snd!
  7892.         char r10scB1_sound_tagclass[5];      //unsigned char[5]
  7893.         uint32_t r10scB1_sound_tagnamepointer;   //uint32 ("random" number)
  7894.         uint32_t r10scB1_sound_tagnamestringlength;   //uint32
  7895.         uint32_t r10scB1_sound_tagid;        //uint32 (0xFFFFFFFF with tags)
  7896.         // char r10scB1_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7897.        
  7898.     }r10scB_sounds;
  7899.    
  7900.     // dependency r10scB1 tagpathname strings go here
  7901.    
  7902.     struct matg_r11c {
  7903.         // representation 11 cells
  7904.         // r11c_player_information_
  7905.        
  7906.         // dependency r11c 1: unit bipd unit vehi
  7907.         char r11c1_unit_tagclass[5];         //unsigned char[5]
  7908.         uint32_t r11c1_unit_tagnamepointer;   //uint32 ("random" number)
  7909.         uint32_t r11c1_unit_tagnamestringlength;   //uint32
  7910.         uint32_t r11c1_unit_tagid;       //uint32 (0xFFFFFFFF with tags)
  7911.         // char r11c1_unit_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7912.        
  7913.         // 28
  7914.        
  7915.         float r11c_player_information_walking_speed;
  7916.         float r11c_player_information_double_speed_multiplier;
  7917.         float r11c_player_information_run_forward;
  7918.         float r11c_player_information_run_backward;
  7919.         float r11c_player_information_run_sideways;
  7920.         float r11c_player_information_run_acceleration;
  7921.         float r11c_player_information_sneak_forward;
  7922.         float r11c_player_information_sneak_backward;
  7923.         float r11c_player_information_sneak_sideways;
  7924.         float r11c_player_information_sneak_acceleration;
  7925.         float r11c_player_information_airborne_acceleration;
  7926.         float r11c_player_information_speed_multiplier;
  7927.        
  7928.         // 12
  7929.        
  7930.         float r11c_player_information_grenade_origin_x;
  7931.         float r11c_player_information_grenade_origin_y;
  7932.         float r11c_player_information_grenade_origin_z;
  7933.        
  7934.         // 12
  7935.        
  7936.         float r11c_player_information_stun_movement_penalty_frac;
  7937.         float r11c_player_information_stun_turning_penalty_frac;
  7938.         float r11c_player_information_stun_jumping_penalty_frac;
  7939.         float r11c_player_information_minimum_stun_time;
  7940.         float r11c_player_information_maximum_stun_time;
  7941.        
  7942.         // 8
  7943.        
  7944.         float r11c_player_information_first_person_idle_time_from;
  7945.         float r11c_player_information_first_person_idle_time_to;
  7946.         float r11c_player_information_first_person_skip_fraction_frac;
  7947.        
  7948.         // 16
  7949.        
  7950.         // dependency r11c 2: coop respawn effect effe
  7951.         char r11c2_coop_respawn_effect_tagclass[5];      //unsigned char[5]
  7952.         uint32_t r11c2_coop_respawn_effect_tagnamepointer;   //uint32 ("random" number)
  7953.         uint32_t r11c2_coop_respawn_effect_tagnamestringlength;   //uint32
  7954.         uint32_t r11c2_coop_respawn_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  7955.         // char r11c2_coop_respawn_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7956.        
  7957.         // 44
  7958.        
  7959.     }r11c_player_information;
  7960.    
  7961.     // dependencies r11c 1-2 tagpathname strings go here
  7962.    
  7963.     struct matg_r12c {
  7964.         // representation 12 cells
  7965.         // r12c_first_person_interface_
  7966.        
  7967.         // dependency r12c 1: first person hands mod2
  7968.         char r12c1_first_person_hands_tagclass[5];       //unsigned char[5]
  7969.         uint32_t r12c1_first_person_hands_tagnamepointer;   //uint32 ("random" number)
  7970.         uint32_t r12c1_first_person_hands_tagnamestringlength;   //uint32
  7971.         uint32_t r12c1_first_person_hands_tagid;         //uint32 (0xFFFFFFFF with tags)
  7972.         // char r12c1_first_person_hands_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7973.        
  7974.         // dependency r12c 2: base bitmap bitm
  7975.         char r12c2_base_bitmap_tagclass[5];      //unsigned char[5]
  7976.         uint32_t r12c2_base_bitmap_tagnamepointer;   //uint32 ("random" number)
  7977.         uint32_t r12c2_base_bitmap_tagnamestringlength;   //uint32
  7978.         uint32_t r12c2_base_bitmap_tagid;        //uint32 (0xFFFFFFFF with tags)
  7979.         // char 12c2_base_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7980.        
  7981.         // dependency r12c 3: shield meter metr
  7982.         char r12c3_shield_meter_tagclass[5];         //unsigned char[5]
  7983.         uint32_t r12c3_shield_meter_tagnamepointer;   //uint32 ("random" number)
  7984.         uint32_t r12c3_shield_meter_tagnamestringlength;   //uint32
  7985.         uint32_t r12c3_shield_meter_tagid;       //uint32 (0xFFFFFFFF with tags)
  7986.         // char r12c3_shield_meter_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7987.        
  7988.         uint16_t r12c_first_person_interface_shield_meter_origin_x;   // interpret these two as signed
  7989.         uint16_t r12c_first_person_interface_shield_meter_origin_y;
  7990.        
  7991.         // dependency r12c 4: body meter metr
  7992.         char r12c4_body_meter_tagclass[5];       //unsigned char[5]
  7993.         uint32_t r12c4_body_meter_tagnamepointer;   //uint32 ("random" number)
  7994.         uint32_t r12c4_body_meter_tagnamestringlength;   //uint32
  7995.         uint32_t r12c4_body_meter_tagid;         //uint32 (0xFFFFFFFF with tags)
  7996.         // char r12c4_body_meter_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  7997.        
  7998.         uint16_t r12c_first_person_interface_body_meter_origin_x;   // interpret these two as signed
  7999.         uint16_t r12c_first_person_interface_body_meter_origin_y;
  8000.        
  8001.         // dependency r12c 5: night vision off to on effect effe
  8002.         char r12c5_night_vision_off_to_on_effect_tagclass[5];        //unsigned char[5]
  8003.         uint32_t r12c5_night_vision_off_to_on_effect_tagnamepointer;   //uint32 ("random" number)
  8004.         uint32_t r12c5_night_vision_off_to_on_effect_tagnamestringlength;   //uint32
  8005.         uint32_t r12c5_night_vision_off_to_on_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  8006.         // char r12c5_night_vision_off_to_on_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8007.        
  8008.         // dependency r12c 6: night vision on to off effect effe
  8009.         char r12c6_night_vision_on_to_off_effect_tagclass[5];        //unsigned char[5]
  8010.         uint32_t r12c6_night_vision_on_to_off_effect_tagnamepointer;   //uint32 ("random" number)
  8011.         uint32_t r12c6_night_vision_on_to_off_effect_tagnamestringlength;   //uint32
  8012.         uint32_t r12c6_night_vision_on_to_off_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  8013.         // char r12c6_night_vision_on_to_off_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8014.        
  8015.         // 88
  8016.        
  8017.     }r12c_first_person_interface;
  8018.    
  8019.     // dependencies tagpathname strings for r12c go here
  8020.    
  8021.     // offset 6483 in matg.globals test file
  8022.    
  8023.     struct matg_r13c {
  8024.         // representation 13 cells
  8025.         // r13c_falling_damage_
  8026.        
  8027.         // 8
  8028.        
  8029.         float r13c_falling_damage_harmful_falling_distance_from;
  8030.         float r13c_falling_damage_harmful_falling_distance_to;
  8031.        
  8032.         // dependency r13c 1: falling damage jpt!
  8033.         char r13c1_falling_damage_tagclass[5];       //unsigned char[5]
  8034.         uint32_t r13c1_falling_damage_tagnamepointer;   //uint32 ("random" number)
  8035.         uint32_t r13c1_falling_damage_tagnamestringlength;   //uint32
  8036.         uint32_t r13c1_falling_damage_tagid;         //uint32 (0xFFFFFFFF with tags)
  8037.         // char r13c1_falling_damage_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8038.        
  8039.         // 8
  8040.        
  8041.         float r13c_falling_damage_maximum_falling_distance;
  8042.        
  8043.         // dependency r13c 2: distance damage jpt!
  8044.         char r13c2_distance_damage_tagclass[5];      //unsigned char[5]
  8045.         uint32_t r13c2_distance_damage_tagnamepointer;   //uint32 ("random" number)
  8046.         uint32_t r13c2_distance_damage_tagnamestringlength;   //uint32
  8047.         uint32_t r13c2_distance_damage_tagid;        //uint32 (0xFFFFFFFF with tags)
  8048.         // char r13c2_distance_damage_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8049.        
  8050.         // dependency r13c 3: vehicle environment collision damage effect jpt!
  8051.         char r13c3_vehicle_environment_collision_damage_effect_tagclass[5];      //unsigned char[5]
  8052.         uint32_t r13c3_vehicle_environment_collision_damage_effect_tagnamepointer;   //uint32 ("random" number)
  8053.         uint32_t r13c3_vehicle_environment_collision_damage_effect_tagnamestringlength;   //uint32
  8054.         uint32_t r13c3_vehicle_environment_collision_damage_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  8055.         // char r13c3_vehicle_environment_collision_damage_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8056.        
  8057.         // dependency r13c 4: vehicle killed unit damage effect jpt!
  8058.         char r13c4_vehicle_killed_unit_damage_effect_tagclass[5];        //unsigned char[5]
  8059.         uint32_t r13c4_vehicle_killed_unit_damage_effect_tagnamepointer;   //uint32 ("random" number)
  8060.         uint32_t r13c4_vehicle_killed_unit_damage_effect_tagnamestringlength;   //uint32
  8061.         uint32_t r13c4_vehicle_killed_unit_damage_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  8062.         // char r13c4_vehicle_killed_unit_damage_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8063.        
  8064.         // dependency r13c 5: vehicle collision damage jpt!
  8065.         char r13c5_vehicle_collision_damage_tagclass[5];         //unsigned char[5]
  8066.         uint32_t r13c5_vehicle_collision_damage_tagnamepointer;   //uint32 ("random" number)
  8067.         uint32_t r13c5_vehicle_collision_damage_tagnamestringlength;   //uint32
  8068.         uint32_t r13c5_vehicle_collision_damage_tagid;       //uint32 (0xFFFFFFFF with tags)
  8069.         // char r13c5_vehicle_collision_damage_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8070.        
  8071.         // dependency r13c 6: flaming death damage jpt!
  8072.         char r13c6_flaming_death_damage_tagclass[5];         //unsigned char[5]
  8073.         uint32_t r13c6_flaming_death_damage_tagnamepointer;   //uint32 ("random" number)
  8074.         uint32_t r13c6_flaming_death_damage_tagnamestringlength;   //uint32
  8075.         uint32_t r13c6_flaming_death_damage_tagid;       //uint32 (0xFFFFFFFF with tags)
  8076.         // char r13c6_flaming_death_damage_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8077.        
  8078.         // 28
  8079.        
  8080.     }r13c_falling_damage;
  8081.    
  8082.     // dependencies tagpathname strings for r13c go here
  8083.    
  8084.     struct matg_r14c {
  8085.         // representation 14 cells
  8086.         // r14c_materials_
  8087.        
  8088.         // 148
  8089.        
  8090.         float r14c_materials_vehicle_terrain_parameters_ground_friction_scale;
  8091.         float r14c_materials_vehicle_terrain_parameters_ground_friction_normal_k1_scale;
  8092.         float r14c_materials_vehicle_terrain_parameters_ground_friction_normal_k0_scale;
  8093.         float r14c_materials_vehicle_terrain_parameters_ground_depth_scale;
  8094.         float r14c_materials_vehicle_terrain_parameters_ground_damp_fraction_scale;
  8095.        
  8096.         // 556
  8097.        
  8098.         float r14c_materials_breakable_surface_parameters_maximum_vitality;
  8099.        
  8100.         // 12
  8101.        
  8102.         // dependency r14c 1: breakable surface parameters effect effe
  8103.         char r14c1_breakable_surface_parameters_effect_tagclass[5];      //unsigned char[5]
  8104.         uint32_t r14c1_breakable_surface_parameters_effect_tagnamepointer;   //uint32 ("random" number)
  8105.         uint32_t r14c1_breakable_surface_parameters_effect_tagnamestringlength;   //uint32
  8106.         uint32_t r14c1_breakable_surface_parameters_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  8107.         // char r14c1_breakable_surface_parameters_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8108.        
  8109.         // dependency r14c 2: breakable surface parameters sound snd!
  8110.         char r14c2_breakable_surface_parameters_sound_tagclass[5];       //unsigned char[5]
  8111.         uint32_t r14c2_breakable_surface_parameters_sound_tagnamepointer;   //uint32 ("random" number)
  8112.         uint32_t r14c2_breakable_surface_parameters_sound_tagnamestringlength;   //uint32
  8113.         uint32_t r14c2_breakable_surface_parameters_sound_tagid;         //uint32 (0xFFFFFFFF with tags)
  8114.         // char r14c2_breakable_surface_parameters_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8115.        
  8116.         // 24
  8117.        
  8118.         // representation 14 sub-board A
  8119.         // r14sbA_particle_effects_
  8120.         uint32_t r14sbA_particle_effects_entrycount; // maximum of 8 cells
  8121.         uint32_t r14sbA_particle_effects_random_id;
  8122.         uint32_t r14sbA_particle_effects_sig_id; // example value = 0x94199D00
  8123.        
  8124.         // 60
  8125.        
  8126.         // dependency r14c 3: melee hit sound snd!
  8127.         char r14c3_melee_hit_sound_tagclass[5];      //unsigned char[5]
  8128.         uint32_t r14c3_melee_hit_sound_tagnamepointer;   //uint32 ("random" number)
  8129.         uint32_t r14c3_melee_hit_sound_tagnamestringlength;   //uint32
  8130.         uint32_t r14c3_melee_hit_sound_tagid;        //uint32 (0xFFFFFFFF with tags)
  8131.         // char r14c3_melee_hit_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8132.        
  8133.     }r14c_materials;
  8134.    
  8135.     // after the r14 cells, we have some mis-placed values once again; here is the layout, just like with the grhi tag's r1scA
  8136.    
  8137.     struct matg_r14c_misgrouped_data {
  8138.         // mis-grouped data which is organized here contrary to previous common organization
  8139.         // the same situation occurs with the grhi tag type's r1scA
  8140.        
  8141.         // this cell's dependencies r14c 1 and 2 tagpathname strings go here
  8142.        
  8143.         struct matg_r14scA {
  8144.             // representation 14 sub-cells A
  8145.             // r14scA_particle_effects_
  8146.            
  8147.             // dependency r14scA 1: particle type part
  8148.             char r14scA1_particle_type_tagclass[5];      //unsigned char[5]
  8149.             uint32_t r14scA1_particle_type_tagnamepointer;   //uint32 ("random" number)
  8150.             uint32_t r14scA1_particle_type_tagnamestringlength;   //uint32
  8151.             uint32_t r14scA1_particle_type_tagid;        //uint32 (0xFFFFFFFF with tags)
  8152.             // char r14scA1_particle_type_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8153.            
  8154.             // test offset 35984
  8155.             uint32_t r14scA_particle_effects_flags; //toff 1820 0x00000003
  8156.             float r14scA_particle_effects_density;
  8157.             float r14scA_particle_effects_velocity_scale_from;
  8158.             float r14scA_particle_effects_velocity_scale_to;
  8159.            
  8160.             // 4
  8161.            
  8162.             float r14scA_particle_effects_angular_velocity_from_rad;
  8163.             float r14scA_particle_effects_angular_velocity_to_rad;
  8164.            
  8165.             // 8
  8166.            
  8167.             float r14scA_particle_effects_radius_from;
  8168.             float r14scA_particle_effects_radius_to;
  8169.            
  8170.             // 8
  8171.            
  8172.             float r14scA_particle_effects_tint_lower_bound_a;
  8173.             float r14scA_particle_effects_tint_lower_bound_r;
  8174.             float r14scA_particle_effects_tint_lower_bound_g;
  8175.             float r14scA_particle_effects_tint_lower_bound_b;
  8176.             float r14scA_particle_effects_tint_upper_bound_a;
  8177.             float r14scA_particle_effects_tint_upper_bound_r;
  8178.             float r14scA_particle_effects_tint_upper_bound_g;
  8179.             float r14scA_particle_effects_tint_upper_bound_b;
  8180.            
  8181.             // 28
  8182.            
  8183.         }r14scA_materials_particle_effects;
  8184.        
  8185.         // dependency r14scA tagpathname strings go here
  8186.        
  8187.         // this cell's dependency r14c 3 tagpathname string goes here
  8188.        
  8189.     }r14c_misgrouped_data_container;   // test data group size = 1165 bytes, starting at offset 35955
  8190.    
  8191.     // test data offset 74400
  8192.    
  8193.     struct matg_r15c {
  8194.         // representation 15 cells
  8195.         // r15c_playlist_members_
  8196.        
  8197.         char r15c_playlist_members_map_name[32];
  8198.         char r15c_playlist_members_game_variant[32];
  8199.        
  8200.         uint32_t r15c_playlist_members_minimum_experience;
  8201.         uint32_t r15c_playlist_members_maximum_experience;
  8202.         uint32_t r15c_playlist_members_minimum_player_count;
  8203.         uint32_t r15c_playlist_members_maximum_player_count;
  8204.         uint32_t r15c_playlist_members_rating;
  8205.        
  8206.         // 64
  8207.        
  8208.     }r15c_playlist_members;
  8209.    
  8210. } type_meta_matg;
  8211.  
  8212. #pragma mark -- metr
  8213.  
  8214. typedef struct {
  8215.     // 64, 4
  8216.    
  8217.     // dependency 1: stencil bitmaps bitm
  8218.     char stencil_bitmaps_tagclass[5];        //unsigned char[5]
  8219.     uint32_t stencil_bitmaps_tagnamepointer;   //uint32 ("random" number)
  8220.     uint32_t stencil_bitmaps_tagnamestringlength;   //uint32
  8221.     uint32_t stencil_bitmaps_tagid;      //uint32 (0xFFFFFFFF with tags)
  8222.     // char stencil_bitmaps_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8223.    
  8224.     // dependency 2: source bitmap bitm
  8225.     char source_bitmap_tagclass[5];      //unsigned char[5]
  8226.     uint32_t source_bitmap_tagnamepointer;   //uint32 ("random" number)
  8227.     uint32_t source_bitmap_tagnamestringlength;   //uint32
  8228.     uint32_t source_bitmap_tagid;        //uint32 (0xFFFFFFFF with tags)
  8229.     // char source_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8230.    
  8231.     uint16_t stencil_sequence_index;
  8232.     uint16_t source_sequence_index;
  8233.    
  8234.     // 104, 20
  8235.    
  8236.     uint16_t interpolate_colors;
  8237.     uint16_t anchor_colors;
  8238.    
  8239.     // 128, 8
  8240.    
  8241.     float empty_color_a_frac;
  8242.     float empty_color_r_frac;
  8243.     float empty_color_g_frac;
  8244.     float empty_color_b_frac;
  8245.     float full_color_a_frac;
  8246.     float full_color_r_frac;
  8247.     float full_color_g_frac;
  8248.     float full_color_b_frac;
  8249.    
  8250.     // 168, 20
  8251.    
  8252.     float unmask_distance;
  8253.     float mask_distance;
  8254.    
  8255.     // 196, 12
  8256.    
  8257.     // four values to reverse-engineer along with the encoded stencil data
  8258.     // example values are from "metr cyborg body.meter" test data
  8259.     // as a reminder, "INTERNAL" values are in little endian
  8260.     uint16_t INTERNAL_value1;   // 64
  8261.     uint16_t INTERNAL_value2;   // 17
  8262.     uint16_t INTERNAL_value3;   // 128
  8263.     uint16_t INTERNAL_value4;   // 32
  8264.    
  8265.     uint32_t encoded_stencil;
  8266.    
  8267.     // 220, 4
  8268.     // little endian internal board values:
  8269.     uint32_t INTERNAL_encoded_stencil_offset_pointer;   // example value = 206 (correct)
  8270.     uint32_t INTERNAL_encoded_stencil_random1;
  8271.     uint32_t INTERNAL_encoded_stencil_sig_id;   // example value = 0x387B9C00
  8272.    
  8273.     // dependencies 1 and 2 tagpathname strings go here
  8274.    
  8275.     // stencil data goes here (seems to mostly be little endian uint16_t values)
  8276.    
  8277.    
  8278. } type_meta_metr;
  8279.  
  8280. #pragma mark -- mgs2
  8281.  
  8282. typedef struct {
  8283.     char light_volume_attachment_marker[32];
  8284.     // 96, 3
  8285.     uint8_t light_volume_flags; //toff 96   0x03    FIXED
  8286.     // 100, 16
  8287.    
  8288.     float brightness_scale_near_fade_distance;
  8289.     float brightness_scale_far_fade_distance;
  8290.     float brightness_scale_perpendicular_brightness_scale_frac;
  8291.     float brightness_scale_parallel_brightness_scale_frac;
  8292.     uint16_t brightness_scale_source;
  8293.    
  8294.     // 134, 22
  8295.    
  8296.     // dependency 1: bitmaps map bitm
  8297.     char bitmaps_map_tagclass[5];        //unsigned char[5]
  8298.     uint32_t bitmaps_map_tagnamepointer;   //uint32 ("random" number)
  8299.     uint32_t bitmaps_map_tagnamestringlength;   //uint32
  8300.     uint32_t bitmaps_map_tagid;      //uint32 (0xFFFFFFFF with tags)
  8301.     // char bitmaps_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8302.    
  8303.     uint16_t bitmaps_sequence_index;
  8304.     uint16_t bitmaps_count;
  8305.    
  8306.     // 176, 72
  8307.    
  8308.     uint16_t frame_animation_frame_animation_source;
  8309.    
  8310.     // 250, 102
  8311.    
  8312.     // representation 1 board
  8313.     // r1b_frames_
  8314.     uint32_t r1b_frames_entrycount; // maximum of 2 cells
  8315.     uint32_t r1b_frames_random_id;
  8316.     uint32_t r1b_frames_sig_id; // example value = 0x34099D00
  8317.    
  8318.     // 364, 32
  8319.    
  8320.     // dependency 1 tagpathname string goes here
  8321.    
  8322.     struct mgs2_r1c {
  8323.         // representation 1 cells
  8324.         // r1c_frames_
  8325.        
  8326.         // 16
  8327.        
  8328.         float r1c_frames_offset_from_marker;
  8329.         float r1c_frames_offset_exponent;
  8330.         float r1c_frames_length;
  8331.         // 32
  8332.         float r1c_frames_radius_hither;
  8333.         float r1c_frames_radius_yon;
  8334.         float r1c_frames_radius_exponent;
  8335.         // 32
  8336.         float r1c_frames_tint_color_hither_a_frac;
  8337.         float r1c_frames_tint_color_hither_r_frac;
  8338.         float r1c_frames_tint_color_hither_g_frac;
  8339.         float r1c_frames_tint_color_hither_b_frac;
  8340.         float r1c_frames_tint_color_yon_a_frac;
  8341.         float r1c_frames_tint_color_yon_r_frac;
  8342.         float r1c_frames_tint_color_yon_g_frac;
  8343.         float r1c_frames_tint_color_yon_b_frac;
  8344.        
  8345.         float r1c_frames_tint_color_exponent;
  8346.         float r1c_frames_brightness_exponent;
  8347.        
  8348.         // 32
  8349.     }r1c_frames;
  8350.    
  8351. } type_meta_mgs2;
  8352.  
  8353. #pragma mark -- mod2
  8354.  
  8355. typedef struct {
  8356.     //uint16_t INTERNAL_optimization;   // 0 (little endian)
  8357.     uint32_t flags; //toff 64 (previous line is illogical)  0x00000007  FIXED
  8358.     uint32_t node_list_checksum;
  8359.     float super_high_detail_cutoff;   // why are these float values? what is a fractional pixel? is anti-aliasing considered?
  8360.     float high_detail_cutoff;
  8361.     float medium_detail_cutoff;
  8362.     float low_detail_cutoff;
  8363.     float super_low_detail_cutoff;
  8364.     uint16_t super_high_detail_node_count_calc;   // I think these values are calculated based upon the total number of nodes.
  8365.     uint16_t high_detail_node_count_calc;     // It seems that the total number is distributed among them all, with the remainder given to the super-low detail node count value (which would mean 187 total nodes in test data, even though there are only 5.)
  8366.     uint16_t medium_detail_node_count_calc;   // This is probably incorrect then. It makes sense though.
  8367.     uint16_t low_detail_node_count_calc;
  8368.     uint16_t super_low_detail_node_count_calc;   // not sure if this is calculated properly, or if it was just a weird value in the test file
  8369.    
  8370.     // 102, 10
  8371.    
  8372.     float base_map_u_scale;
  8373.     float base_map_v_scale;
  8374.    
  8375.     // 120, 116
  8376.    
  8377.     // representation 1 board
  8378.     // r1b_markers_
  8379.     uint32_t r1b_markers_entrycount; // maximum of 256 cells
  8380.     uint32_t r1b_markers_random_id;
  8381.     uint32_t r1b_markers_sig_id; // example value = 0x90859D00
  8382.    
  8383.     // representation 2 board
  8384.     // r2b_nodes_
  8385.     uint32_t r2b_nodes_entrycount; // maximum of 64 cells
  8386.     uint32_t r2b_nodes_random_id;
  8387.     uint32_t r2b_nodes_sig_id; // example value = 0xF4819D00
  8388.    
  8389.     // representation 3 board
  8390.     // r3b_regions_
  8391.     uint32_t r3b_regions_entrycount; // maximum of 32 cells
  8392.     uint32_t r3b_regions_random_id;
  8393.     uint32_t r3b_regions_sig_id; // example value = 0x9C849D00
  8394.    
  8395.     // representation 4 board
  8396.     // r4b_geometries_
  8397.     uint32_t r4b_geometries_entrycount; // maximum of 256 cells
  8398.     uint32_t r4b_geometries_random_id;
  8399.     uint32_t r4b_geometries_sig_id; // example value = 0x44819D00
  8400.    
  8401.     // representation 5 board
  8402.     // r5b_shaders_
  8403.     uint32_t r5b_shaders_entrycount; // maximum of 32 cells
  8404.     uint32_t r5b_shaders_random_id;
  8405.     uint32_t r5b_shaders_sig_id; // example value = 0x847E9D00
  8406.    
  8407.     struct mod2_r1c {
  8408.         // representation 1 cells
  8409.         // r1c_markers_
  8410.         // (this is not typically used; r3scAsca is more often used along with regions)
  8411.         char r1c_markers_name[32];
  8412.         uint16_t r1c_markers_magic_identifier;   // is this ever negative?
  8413.        
  8414.         // 18
  8415.        
  8416.         // representation 1 sub-board A
  8417.         // r1sbA_instances_
  8418.         uint32_t r1sbA_instances_entrycount; // maximum of 32 cells
  8419.         uint32_t r1sbA_instances_random_id;
  8420.         uint32_t r1sbA_instances_sig_id; // example value = 0x1C859D00
  8421.        
  8422.     }r1c_markers;
  8423.    
  8424.     // test offset 936
  8425.    
  8426.     struct mod2_r1scA {
  8427.         // representation 1 sub-cells A
  8428.         // r1scA_instances_
  8429.         // these are all just laid-out without any fancy embedding in relation to r1c, so {all r1c} {all r1scA}
  8430.        
  8431.         uint8_t r1scA_instances_region_index;   // -128 to 127 for these three values
  8432.         uint8_t r1scA_instances_permutation_index;
  8433.         uint8_t r1scA_instances_node_index;
  8434.         // 1
  8435.        
  8436.         float r1scA_instances_translation_x;
  8437.         float r1scA_instances_translation_y;
  8438.         float r1scA_instances_translation_z;
  8439.         float r1scA_instances_rotation_i;
  8440.         float r1scA_instances_rotation_j;
  8441.         float r1scA_instances_rotation_k;
  8442.         float r1scA_instances_rotation_w;
  8443.        
  8444.     }r1scA_markers_instances;
  8445.    
  8446.     struct mod2_r2c {
  8447.         // representation 2 cells
  8448.         // r2c_nodes_
  8449.        
  8450.         char r2c_nodes_name[32];
  8451.         uint16_t r2c_nodes_next_sibling_node_index_sel;
  8452.         uint16_t r2c_nodes_first_child_node_index_sel;
  8453.         uint16_t r2c_nodes_parent_node_index_sel;
  8454.        
  8455.         // 2
  8456.        
  8457.         float r2c_nodes_default_translation_x;
  8458.         float r2c_nodes_default_translation_y;
  8459.         float r2c_nodes_default_translation_z;
  8460.        
  8461.         float r2c_nodes_default_rotation_i;
  8462.         float r2c_nodes_default_rotation_j;
  8463.         float r2c_nodes_default_rotation_k;
  8464.         float r2c_nodes_default_rotation_w;
  8465.        
  8466.         float r2c_nodes_node_distance_from_parent;
  8467.        
  8468.         // 84
  8469.        
  8470.     }r2c_nodes;
  8471.    
  8472.     // test data offset 4916
  8473.    
  8474.     struct mod2_r3c {
  8475.         // representation 3 cells
  8476.         // r3c_regions_
  8477.        
  8478.         char r3c_regions_name[32];
  8479.        
  8480.         // 32
  8481.        
  8482.         // representation 3 sub-board A
  8483.         // r3sbA_permutations_
  8484.         uint32_t r3sbA_permutations_entrycount; // maximum of 32 cells
  8485.         uint32_t r3sbA_permutations_random_id;
  8486.         uint32_t r3sbA_permutations_sig_id; // example value = 0xE4839D00
  8487.        
  8488.     }r3c_regions;
  8489.    
  8490.     // test data offset 5144
  8491.     struct mod2_r3sc{
  8492.         struct mod2_r3scA {   // all for current cell
  8493.             // representation 3 sub-cells A
  8494.             // r3scA_permutations_
  8495.            
  8496.             char r3scA_permutations_name[32];
  8497.             // test data offset 5176
  8498.             uint32_t r3scA_permutations_flags;   // confirmed 4 bytes written, toff 944 0x00000001
  8499.            
  8500.             // 28
  8501.            
  8502.             uint16_t r3scA_permutations_super_low_sel;
  8503.             uint16_t r3scA_permutations_low_sel;
  8504.             uint16_t r3scA_permutations_medium_sel;
  8505.             uint16_t r3scA_permutations_high_sel;
  8506.             uint16_t r3scA_permutations_super_high_sel;
  8507.            
  8508.             // 2
  8509.            
  8510.             // representation 3 sub-cells A sub-board a
  8511.             // r3scAsba_markers_
  8512.             uint32_t r3scAsba_markers_entrycount; // maximum of 64 cells
  8513.             uint32_t r3scAsba_markers_random_id;
  8514.             uint32_t r3scAsba_markers_sig_id; // example value = 0x74829D00
  8515.            
  8516.         }r3scA_regions_permutations;
  8517.        
  8518.         struct mod2_r3scAsca {   // all for current cell (not sub-cell A)
  8519.             // representation 3 sub-cells A sub-cells a
  8520.             // r3scAsca_markers_
  8521.            
  8522.             char r3scAsca_markers_name[32];
  8523.             uint16_t r3scAsca_markers_node_index_sel;
  8524.             // 2
  8525.             float r3scAsca_markers_rotation_i;
  8526.             float r3scAsca_markers_rotation_j;
  8527.             float r3scAsca_markers_rotation_k;
  8528.             float r3scAsca_markers_rotation_w;
  8529.            
  8530.             float r3scAsca_markers_translation_x;
  8531.             float r3scAsca_markers_translation_y;
  8532.             float r3scAsca_markers_translation_z;
  8533.            
  8534.             // 16
  8535.            
  8536.         }r3scAsca_regions_permutations_markers;
  8537.        
  8538.     }r3sc_container;
  8539.    
  8540.     // test data offset 9536
  8541.     /*   Figuring this out with the test data...
  8542.      r4 geometry cell I
  8543.      r4 geometry cell II
  8544.      r4 geometry cell III
  8545.      
  8546.      { cells I / II / III (r4sc)
  8547.      
  8548.      r4scA parts cell i for I
  8549.      r4scA parts cell ii for I
  8550.      r4scA parts cell iii for I
  8551.      
  8552.      { cells i / ii / iii (r4scAsc)
  8553.      
  8554.      r4scAsca uncompressed vertices cell for i of I
  8555.      r4scAsca uncompressed vertices cell for i of I
  8556.      r4scAsca uncompressed vertices cell for i of I
  8557.      
  8558.      r4scAscb compressed vertices cell for i of I
  8559.      r4scAscb compressed vertices cell for i of I
  8560.      r4scAscb compressed vertices cell for i of I
  8561.      
  8562.      r4scAscc triangles cell for i of I
  8563.      r4scAscc triangles cell for i of I
  8564.      r4scAscc triangles cell for i of I
  8565.      
  8566.      r4scAsca uncompressed vertices cell for ii of I
  8567.      r4scAsca uncompressed vertices cell for ii of I
  8568.      r4scAsca uncompressed vertices cell for ii of I
  8569.      
  8570.      r4scAscb compressed vertices cell for ii of I
  8571.      r4scAscb compressed vertices cell for ii of I
  8572.      r4scAscb compressed vertices cell for ii of I
  8573.      
  8574.      r4scAscc triangles cell for ii of I
  8575.      r4scAscc triangles cell for ii of I
  8576.      r4scAscc triangles cell for ii of I
  8577.      
  8578.      r4scAsca uncompressed vertices cell for iii of I
  8579.      r4scAsca uncompressed vertices cell for iii of I
  8580.      r4scAsca uncompressed vertices cell for iii of I
  8581.      
  8582.      r4scAscb compressed vertices cell for iii of I
  8583.      r4scAscb compressed vertices cell for iii of I
  8584.      r4scAscb compressed vertices cell for iii of I
  8585.      
  8586.      r4scAscc triangles cell for iii of I
  8587.      r4scAscc triangles cell for iii of I
  8588.      r4scAscc triangles cell for iii of I
  8589.      
  8590.      Conclusion: The geometries section of the mod2 tag type stores its data more like nested arrays, which I find to be more logical than the usual approaches for storing struct board cells
  8591.      */
  8592.     struct mod2_r4c {
  8593.         // representation 4 cells
  8594.         // r4c_geometries_
  8595.        
  8596.         // 36
  8597.        
  8598.         // representation 4 sub-board A
  8599.         // r4sbA_parts_
  8600.         uint32_t r4sbA_parts_entrycount; // maximum of 32 cells
  8601.         uint32_t r4sbA_parts_random_id;
  8602.         uint32_t r4sbA_parts_sig_id; // example value = 0x80809D00
  8603.        
  8604.     }r4c_geometries;
  8605.    
  8606.     struct mod2_r4sc {   // each is 1350 bytes in test data
  8607.        
  8608.         struct mod2_r4scA {   // all for current cell
  8609.             // representation 4 sub-cells A
  8610.             // r4scA_parts_
  8611.            
  8612.             // test data offset 9680
  8613.            
  8614.             uint32_t r4scA_parts_flags; //toff 1048 0x00000003
  8615.             uint16_t r4scA_parts_shader_index_sel;
  8616.            
  8617.             uint8_t r4scA_parts_previous_filthy_part_index;   // -128 to 127 for these two
  8618.             uint8_t r4scA_parts_next_filthy_part_index;
  8619.            
  8620.             uint16_t r4scA_parts_centroid_primary_node;
  8621.             uint16_t r4scA_parts_centroid_secondary_node;
  8622.            
  8623.             float r4scA_parts_centroid_primary_weight_frac;
  8624.             float r4scA_parts_centroid_secondary_weight_frac;
  8625.            
  8626.             float r4scA_parts_centroid_x;
  8627.             float r4scA_parts_centroid_y;
  8628.             float r4scA_parts_centroid_z;
  8629.            
  8630.             // representation 4 sub-cells A sub-board a
  8631.             // r4scAsba_uncompressed_vertices_
  8632.             uint32_t r4scAsba_uncompressed_vertices_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  8633.             uint32_t r4scAsba_uncompressed_vertices_random_id;
  8634.             uint32_t r4scAsba_uncompressed_vertices_sig_id; // example value = 0x087D9D00
  8635.            
  8636.             // representation 4 sub-cells A sub-board b
  8637.             // r4scAsbb_compressed_vertices_
  8638.             uint32_t r4scAsbb_compressed_vertices_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  8639.             uint32_t r4scAsbb_compressed_vertices_random_id;
  8640.             uint32_t r4scAsbb_compressed_vertices_sig_id; // example value = 0xB07D9D00
  8641.            
  8642.             // representation 4 sub-cells A sub-board c
  8643.             // r4scAsbc_triangles_
  8644.             uint32_t r4scAsbc_triangles_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  8645.             uint32_t r4scAsbc_triangles_random_id;
  8646.             uint32_t r4scAsbc_triangles_sig_id; // example value = 0x0C7E9D00
  8647.            
  8648.             // 64
  8649.            
  8650.         }r4scA_geometries_parts;
  8651.        
  8652.         struct mod2_r4scAsc {
  8653.            
  8654.             struct mod2_r4scAsca {   // all for current sub-cell (A)
  8655.                 // representation 4 sub-cells A sub-cells a
  8656.                 // r4scAsca_uncompressed_vertices_
  8657.                
  8658.                 float r4scAsca_uncompressed_vertices_position_x;
  8659.                 float r4scAsca_uncompressed_vertices_position_y;
  8660.                 float r4scAsca_uncompressed_vertices_position_z;
  8661.                 float r4scAsca_uncompressed_vertices_normal_i;
  8662.                 float r4scAsca_uncompressed_vertices_normal_j;
  8663.                 float r4scAsca_uncompressed_vertices_normal_k;
  8664.                 float r4scAsca_uncompressed_vertices_binormal_i;
  8665.                 float r4scAsca_uncompressed_vertices_binormal_j;
  8666.                 float r4scAsca_uncompressed_vertices_binormal_k;
  8667.                 float r4scAsca_uncompressed_vertices_tangent_i;
  8668.                 float r4scAsca_uncompressed_vertices_tangent_j;
  8669.                 float r4scAsca_uncompressed_vertices_tangent_k;
  8670.                 float r4scAsca_uncompressed_vertices_texture_coords_x;
  8671.                 float r4scAsca_uncompressed_vertices_texture_coords_y;
  8672.                 uint16_t r4scAsca_uncompressed_vertices_node0_index;
  8673.                 uint16_t r4scAsca_uncompressed_vertices_node1_index;
  8674.                 float r4scAsca_uncompressed_vertices_node0_weight;   // fractionality unrestricted
  8675.                 float r4scAsca_uncompressed_vertices_node1_weight;   // fractionality unrestricted
  8676.                
  8677.             }r4scAsca_geometries_parts_uncompressed_vertices;
  8678.            
  8679.             // test data offset 10280
  8680.            
  8681.             struct mod2_r4scAscb {   // all for current sub-cell
  8682.                 // representation 4 sub-cells A sub-cells b
  8683.                 // r4scAscb_compressed_vertices_
  8684.                
  8685.                 float r4scAscb_compressed_vertices_position_x;
  8686.                 float r4scAscb_compressed_vertices_position_y;
  8687.                 float r4scAscb_compressed_vertices_position_z;
  8688.                
  8689.                 uint32_t r4scAscb_compressed_vertices_normal;     // NOTE: All these variables should probably be signed
  8690.                 uint32_t r4scAscb_compressed_vertices_binormal;
  8691.                 uint32_t r4scAscb_compressed_vertices_tangent;
  8692.                
  8693.                 uint16_t r4scAscb_compressed_vertices_texture_coordinate_u;
  8694.                 uint16_t r4scAscb_compressed_vertices_texture_coordinate_v;
  8695.                
  8696.                 uint8_t r4scAscb_compressed_vertices_node0_index;   // -128 to 127
  8697.                 uint8_t r4scAscb_compressed_vertices_node1_index;   // same
  8698.                
  8699.                 uint16_t r4scAscb_compressed_vertices_node0_weight;
  8700.                
  8701.             }r4scAscb_geometries_parts_compressed_vertices;
  8702.            
  8703.             struct mod2_r4scAscc {   // all for current sub-cell
  8704.                 // representation 4 sub-cells A sub-cells c
  8705.                 // r4scAscc_triangles_
  8706.                
  8707.                 uint16_t r4scAscc_triangles_vertex0_index;
  8708.                 uint16_t r4scAscc_triangles_vertex1_index;
  8709.                 uint16_t r4scAscc_triangles_vertex2_index;
  8710.                
  8711.             }r4scAscc_geometries_parts_triangles;
  8712.            
  8713.         }r4scAsc_container;
  8714.        
  8715.     }r4sc_container;
  8716.    
  8717.     // offset 13730 in mod2.gbxmodel test data
  8718.    
  8719.     struct mod2_r5c {
  8720.         // representation 5 cells
  8721.         // r5c_shaders_
  8722.        
  8723.         // dependency r5c 1: shader shdr senv soso schi scex sotr sgla smet spla swat
  8724.         char r5c1_shader_tagclass[5];        //unsigned char[5]
  8725.         uint32_t r5c1_shader_tagnamepointer;   //uint32 ("random" number)
  8726.         uint32_t r5c1_shader_tagnamestringlength;   //uint32
  8727.         uint32_t r5c1_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  8728.         // char r5c1_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  8729.        
  8730.         uint16_t r5c_shaders_permutation;
  8731.        
  8732.         // 14
  8733.        
  8734.     }r5c_shaders;
  8735.    
  8736.     // dependency r5c 1 tagpathname strings go here
  8737.    
  8738. } type_meta_mod2;
  8739.  
  8740. #pragma mark -- mode
  8741.  
  8742. typedef struct {
  8743.     //uint16_t INTERNAL_optimization;   // 0 (little endian)
  8744.     uint32_t flags; // presumed as mod2 0x00000007  FIXED
  8745.     uint32_t node_list_checksum;
  8746.     float super_high_detail_cutoff;   // why are these float values? what is a fractional pixel? is anti-aliasing considered?
  8747.     float high_detail_cutoff;
  8748.     float medium_detail_cutoff;
  8749.     float low_detail_cutoff;
  8750.     float super_low_detail_cutoff;
  8751.     uint16_t super_high_detail_node_count_calc;   // I think these values are calculated based upon the total number of nodes.
  8752.     uint16_t high_detail_node_count_calc;     // It seems that the total number is distributed among them all, with the remainder given to the super-low detail node count value (which would mean 187 total nodes in test data, even though there are only 5.)
  8753.     uint16_t medium_detail_node_count_calc;   // This is probably incorrect then. It makes sense though.
  8754.     uint16_t low_detail_node_count_calc;
  8755.     uint16_t super_low_detail_node_count_calc;   // not sure if this is calculated properly, or if it was just a weird value in the test file
  8756.    
  8757.     // 102, 10
  8758.    
  8759.     float base_map_u_scale;
  8760.     float base_map_v_scale;
  8761.    
  8762.     // 120, 116
  8763.    
  8764.     // representation 1 board
  8765.     // r1b_markers_
  8766.     uint32_t r1b_markers_entrycount; // maximum of 256 cells
  8767.     uint32_t r1b_markers_random_id;
  8768.     uint32_t r1b_markers_sig_id; // example value = 0x90859D00
  8769.    
  8770.     // representation 2 board
  8771.     // r2b_nodes_
  8772.     uint32_t r2b_nodes_entrycount; // maximum of 64 cells
  8773.     uint32_t r2b_nodes_random_id;
  8774.     uint32_t r2b_nodes_sig_id; // example value = 0xF4819D00
  8775.    
  8776.     // representation 3 board
  8777.     // r3b_regions_
  8778.     uint32_t r3b_regions_entrycount; // maximum of 32 cells
  8779.     uint32_t r3b_regions_random_id;
  8780.     uint32_t r3b_regions_sig_id; // example value = 0x40849D00
  8781.    
  8782.     // representation 4 board
  8783.     // r4b_geometries_
  8784.     uint32_t r4b_geometries_entrycount; // maximum of 256 cells
  8785.     uint32_t r4b_geometries_random_id;
  8786.     uint32_t r4b_geometries_sig_id; // example value = 0xE8809D00
  8787.    
  8788.     // representation 5 board
  8789.     // r5b_shaders_
  8790.     uint32_t r5b_shaders_entrycount; // maximum of 32 cells
  8791.     uint32_t r5b_shaders_random_id;
  8792.     uint32_t r5b_shaders_sig_id; // example value = 0x847E9D00
  8793.    
  8794.     struct mode_r1c {
  8795.         // representation 1 cells
  8796.         // r1c_markers_
  8797.         // (this is not typically used; r3scAsca is more often used along with regions)
  8798.         char r1c_markers_name[32];
  8799.         uint16_t r1c_markers_magic_identifier;   // is this ever negative?
  8800.        
  8801.         // 18
  8802.        
  8803.         // representation 1 sub-board A
  8804.         // r1sbA_instances_
  8805.         uint32_t r1sbA_instances_entrycount; // maximum of 32 cells
  8806.         uint32_t r1sbA_instances_random_id;
  8807.         uint32_t r1sbA_instances_sig_id; // example value = 0x1C859D00
  8808.        
  8809.     }r1c_markers;
  8810.    
  8811.     // test offset 360
  8812.    
  8813.     struct mode_r1scA {
  8814.         // representation 1 sub-cells A
  8815.         // r1scA_instances_
  8816.         // these are all just laid-out without any fancy embedding in relation to r1c, so {all r1c} {all r1scA}
  8817.        
  8818.         uint8_t r1scA_instances_region_index;   // -128 to 127 for these three values
  8819.         uint8_t r1scA_instances_permutation_index;
  8820.         uint8_t r1scA_instances_node_index;
  8821.         // 1
  8822.        
  8823.         float r1scA_instances_translation_x;
  8824.         float r1scA_instances_translation_y;
  8825.         float r1scA_instances_translation_z;
  8826.         float r1scA_instances_rotation_i;
  8827.         float r1scA_instances_rotation_j;
  8828.         float r1scA_instances_rotation_k;
  8829.         float r1scA_instances_rotation_w;
  8830.        
  8831.     }r1scA_markers_instances;
  8832.    
  8833.     struct mode_r2c {
  8834.         // representation 2 cells
  8835.         // r2c_nodes_
  8836.        
  8837.         char r2c_nodes_name[32];
  8838.         uint16_t r2c_nodes_next_sibling_node_index_sel;
  8839.         uint16_t r2c_nodes_first_child_node_index_sel;
  8840.         uint16_t r2c_nodes_parent_node_index_sel;
  8841.        
  8842.         // 2
  8843.        
  8844.         float r2c_nodes_default_translation_x;
  8845.         float r2c_nodes_default_translation_y;
  8846.         float r2c_nodes_default_translation_z;
  8847.        
  8848.         float r2c_nodes_default_rotation_i;
  8849.         float r2c_nodes_default_rotation_j;
  8850.         float r2c_nodes_default_rotation_k;
  8851.         float r2c_nodes_default_rotation_w;
  8852.        
  8853.         float r2c_nodes_node_distance_from_parent;
  8854.        
  8855.         // 84
  8856.        
  8857.     }r2c_nodes;
  8858.    
  8859.     // test data offset 704
  8860.    
  8861.     struct mode_r3c {
  8862.         // representation 3 cells
  8863.         // r3c_regions_
  8864.        
  8865.         char r3c_regions_name[32];
  8866.        
  8867.         // 32
  8868.        
  8869.         // representation 3 sub-board A
  8870.         // r3sbA_permutations_
  8871.         uint32_t r3sbA_permutations_entrycount; // maximum of 32 cells
  8872.         uint32_t r3sbA_permutations_random_id;
  8873.         uint32_t r3sbA_permutations_sig_id; // example value = 0x34839D00
  8874.        
  8875.     }r3c_regions;
  8876.    
  8877.     // test data offset 780
  8878.     struct mode_r3sc{
  8879.         struct mode_r3scA {   // all for current cell
  8880.             // representation 3 sub-cells A
  8881.             // r3scA_permutations_
  8882.            
  8883.             char r3scA_permutations_name[32];
  8884.             // test data offset 812
  8885.             uint32_t r3scA_permutations_flags;   // confirmed 4 bytes written   presumed as mod2 0x00000001
  8886.            
  8887.             // 28
  8888.            
  8889.             uint16_t r3scA_permutations_super_low_sel;
  8890.             uint16_t r3scA_permutations_low_sel;
  8891.             uint16_t r3scA_permutations_medium_sel;
  8892.             uint16_t r3scA_permutations_high_sel;
  8893.             uint16_t r3scA_permutations_super_high_sel;
  8894.            
  8895.             // 2
  8896.            
  8897.             // representation 3 sub-cells A sub-board a
  8898.             // r3scAsba_markers_
  8899.             uint32_t r3scAsba_markers_entrycount; // maximum of 64 cells
  8900.             uint32_t r3scAsba_markers_random_id;
  8901.             uint32_t r3scAsba_markers_sig_id; // example value = 0x74829D00
  8902.            
  8903.         }r3scA_regions_permutations;
  8904.        
  8905.         struct mode_r3scAsca {   // all for current cell (not sub-cell A)
  8906.             // representation 3 sub-cells A sub-cells a
  8907.             // r3scAsca_markers_
  8908.            
  8909.             char r3scAsca_markers_name[32];
  8910.             uint16_t r3scAsca_markers_node_index_sel;
  8911.             // 2
  8912.             float r3scAsca_markers_rotation_i;
  8913.             float r3scAsca_markers_rotation_j;
  8914.             float r3scAsca_markers_rotation_k;
  8915.             float r3scAsca_markers_rotation_w;
  8916.            
  8917.             float r3scAsca_markers_translation_x;
  8918.             float r3scAsca_markers_translation_y;
  8919.             float r3scAsca_markers_translation_z;
  8920.            
  8921.             // 16
  8922.            
  8923.         }r3scAsca_regions_permutations_markers;
  8924.        
  8925.     }r3sc_container;
  8926.    
  8927.     // test data offset 9536
  8928.     /*   Figuring this out with the test data...
  8929.      r4 geometry cell I
  8930.      r4 geometry cell II
  8931.      r4 geometry cell III
  8932.      
  8933.      { cells I / II / III (r4sc)
  8934.      
  8935.      r4scA parts cell i for I
  8936.      r4scA parts cell ii for I
  8937.      r4scA parts cell iii for I
  8938.      
  8939.      { cells i / ii / iii (r4scAsc)
  8940.      
  8941.      r4scAsca uncompressed vertices cell for i of I
  8942.      r4scAsca uncompressed vertices cell for i of I
  8943.      r4scAsca uncompressed vertices cell for i of I
  8944.      
  8945.      r4scAscb compressed vertices cell for i of I
  8946.      r4scAscb compressed vertices cell for i of I
  8947.      r4scAscb compressed vertices cell for i of I
  8948.      
  8949.      r4scAscc triangles cell for i of I
  8950.      r4scAscc triangles cell for i of I
  8951.      r4scAscc triangles cell for i of I
  8952.      
  8953.      r4scAsca uncompressed vertices cell for ii of I
  8954.      r4scAsca uncompressed vertices cell for ii of I
  8955.      r4scAsca uncompressed vertices cell for ii of I
  8956.      
  8957.      r4scAscb compressed vertices cell for ii of I
  8958.      r4scAscb compressed vertices cell for ii of I
  8959.      r4scAscb compressed vertices cell for ii of I
  8960.      
  8961.      r4scAscc triangles cell for ii of I
  8962.      r4scAscc triangles cell for ii of I
  8963.      r4scAscc triangles cell for ii of I
  8964.      
  8965.      r4scAsca uncompressed vertices cell for iii of I
  8966.      r4scAsca uncompressed vertices cell for iii of I
  8967.      r4scAsca uncompressed vertices cell for iii of I
  8968.      
  8969.      r4scAscb compressed vertices cell for iii of I
  8970.      r4scAscb compressed vertices cell for iii of I
  8971.      r4scAscb compressed vertices cell for iii of I
  8972.      
  8973.      r4scAscc triangles cell for iii of I
  8974.      r4scAscc triangles cell for iii of I
  8975.      r4scAscc triangles cell for iii of I
  8976.      
  8977.      Conclusion: The geometries section of the mod2 tag type stores its data more like nested arrays, which I find to be more logical than the usual approaches for storing struct board cells
  8978.      */
  8979.     struct mode_r4c {
  8980.         // representation 4 cells
  8981.         // r4c_geometries_
  8982.        
  8983.         // 36
  8984.        
  8985.         // representation 4 sub-board A
  8986.         // r4sbA_parts_
  8987.         uint32_t r4sbA_parts_entrycount; // maximum of 32 cells
  8988.         uint32_t r4sbA_parts_random_id;
  8989.         uint32_t r4sbA_parts_sig_id; // example value = 0x647F9D00
  8990.        
  8991.     }r4c_geometries;
  8992.    
  8993.     struct mode_r4sc {   // each is ? bytes in test data
  8994.        
  8995.         struct mode_r4scA {   // all for current cell
  8996.             // representation 4 sub-cells A
  8997.             // r4scA_parts_
  8998.            
  8999.             // test data offset 996
  9000.            
  9001.             uint32_t r4scA_parts_flags;     // presumed as mod2 0x00000003
  9002.             uint16_t r4scA_parts_shader_index_sel;
  9003.            
  9004.             uint8_t r4scA_parts_previous_filthy_part_index;   // -128 to 127 for these two
  9005.             uint8_t r4scA_parts_next_filthy_part_index;
  9006.            
  9007.             uint16_t r4scA_parts_centroid_primary_node;
  9008.             uint16_t r4scA_parts_centroid_secondary_node;
  9009.            
  9010.             float r4scA_parts_centroid_primary_weight_frac;
  9011.             float r4scA_parts_centroid_secondary_weight_frac;
  9012.            
  9013.             float r4scA_parts_centroid_x;
  9014.             float r4scA_parts_centroid_y;
  9015.             float r4scA_parts_centroid_z;
  9016.            
  9017.             // representation 4 sub-cells A sub-board a
  9018.             // r4scAsba_uncompressed_vertices_
  9019.             uint32_t r4scAsba_uncompressed_vertices_entrycount; // maximum of n/a cells (not used in mode) (MosesofEgypt's reclaimer: 65535 ?)
  9020.             uint32_t r4scAsba_uncompressed_vertices_random_id;
  9021.             uint32_t r4scAsba_uncompressed_vertices_sig_id; // example value = 0x087D9D00
  9022.            
  9023.             // representation 4 sub-cells A sub-board b
  9024.             // r4scAsbb_compressed_vertices_
  9025.             uint32_t r4scAsbb_compressed_vertices_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  9026.             uint32_t r4scAsbb_compressed_vertices_random_id;
  9027.             uint32_t r4scAsbb_compressed_vertices_sig_id; // example value = 0xB07D9D00
  9028.            
  9029.             // representation 4 sub-cells A sub-board c
  9030.             // r4scAsbc_triangles_
  9031.             uint32_t r4scAsbc_triangles_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  9032.             uint32_t r4scAsbc_triangles_random_id;
  9033.             uint32_t r4scAsbc_triangles_sig_id; // example value = 0x0C7E9D00
  9034.            
  9035.             // 36 (differs from 64 in mod2)
  9036.            
  9037.         }r4scA_geometries_parts;
  9038.        
  9039.         struct mode_r4scAsc {
  9040.            
  9041.             struct mode_r4scAsca {   // all for current sub-cell (A)
  9042.                 // representation 4 sub-cells A sub-cells a
  9043.                 // r4scAsca_uncompressed_vertices_
  9044.                
  9045.                 float r4scAsca_uncompressed_vertices_position_x;
  9046.                 float r4scAsca_uncompressed_vertices_position_y;
  9047.                 float r4scAsca_uncompressed_vertices_position_z;
  9048.                 float r4scAsca_uncompressed_vertices_normal_i;
  9049.                 float r4scAsca_uncompressed_vertices_normal_j;
  9050.                 float r4scAsca_uncompressed_vertices_normal_k;
  9051.                 float r4scAsca_uncompressed_vertices_binormal_i;
  9052.                 float r4scAsca_uncompressed_vertices_binormal_j;
  9053.                 float r4scAsca_uncompressed_vertices_binormal_k;
  9054.                 float r4scAsca_uncompressed_vertices_tangent_i;
  9055.                 float r4scAsca_uncompressed_vertices_tangent_j;
  9056.                 float r4scAsca_uncompressed_vertices_tangent_k;
  9057.                 float r4scAsca_uncompressed_vertices_texture_coords_x;
  9058.                 float r4scAsca_uncompressed_vertices_texture_coords_y;
  9059.                 uint16_t r4scAsca_uncompressed_vertices_node0_index;
  9060.                 uint16_t r4scAsca_uncompressed_vertices_node1_index;
  9061.                 float r4scAsca_uncompressed_vertices_node0_weight;   // fractionality unrestricted
  9062.                 float r4scAsca_uncompressed_vertices_node1_weight;   // fractionality unrestricted
  9063.                
  9064.             }r4scAsca_geometries_parts_uncompressed_vertices;
  9065.            
  9066.             // test data offset 1168
  9067.            
  9068.             struct mode_r4scAscb {   // all for current sub-cell
  9069.                 // representation 4 sub-cells A sub-cells b
  9070.                 // r4scAscb_compressed_vertices_
  9071.                
  9072.                 float r4scAscb_compressed_vertices_position_x;
  9073.                 float r4scAscb_compressed_vertices_position_y;
  9074.                 float r4scAscb_compressed_vertices_position_z;
  9075.                
  9076.                 uint32_t r4scAscb_compressed_vertices_normal;     // NOTE: All these variables should probably be signed
  9077.                 uint32_t r4scAscb_compressed_vertices_binormal;
  9078.                 uint32_t r4scAscb_compressed_vertices_tangent;
  9079.                
  9080.                 uint16_t r4scAscb_compressed_vertices_texture_coordinate_u;
  9081.                 uint16_t r4scAscb_compressed_vertices_texture_coordinate_v;
  9082.                
  9083.                 uint8_t r4scAscb_compressed_vertices_node0_index;   // -128 to 127
  9084.                 uint8_t r4scAscb_compressed_vertices_node1_index;   // same
  9085.                
  9086.                 uint16_t r4scAscb_compressed_vertices_node0_weight;
  9087.                
  9088.             }r4scAscb_geometries_parts_compressed_vertices;
  9089.            
  9090.             struct mode_r4scAscc {   // all for current sub-cell
  9091.                 // representation 4 sub-cells A sub-cells c
  9092.                 // r4scAscc_triangles_
  9093.                
  9094.                 uint16_t r4scAscc_triangles_vertex0_index;
  9095.                 uint16_t r4scAscc_triangles_vertex1_index;
  9096.                 uint16_t r4scAscc_triangles_vertex2_index;
  9097.                
  9098.             }r4scAscc_geometries_parts_triangles;
  9099.            
  9100.         }r4scAsc_container;
  9101.        
  9102.     }r4sc_container;
  9103.    
  9104.     // offset 204390 in mode max.model test data
  9105.    
  9106.     struct mode_r5c {
  9107.         // representation 5 cells
  9108.         // r5c_shaders_
  9109.        
  9110.         // dependency r5c 1: shader shdr senv soso schi scex sotr sgla smet spla swat
  9111.         char r5c1_shader_tagclass[5];        //unsigned char[5]
  9112.         uint32_t r5c1_shader_tagnamepointer;   //uint32 ("random" number)
  9113.         uint32_t r5c1_shader_tagnamestringlength;   //uint32
  9114.         uint32_t r5c1_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  9115.         // char r5c1_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9116.        
  9117.         uint16_t r5c_shaders_permutation;
  9118.        
  9119.         // 14
  9120.        
  9121.     }r5c_shaders;
  9122.    
  9123.     // dependency r5c 1 tagpathname strings go here
  9124.    
  9125. } type_meta_mode;
  9126.  
  9127. #pragma mark -- mply
  9128.  
  9129. typedef struct {
  9130.     // representation 1 board
  9131.     // r1b_multiplayer_scenarios_
  9132.     uint32_t r1b_multiplayer_scenarios_entrycount; // maximum of 32 cells
  9133.     uint32_t r1b_multiplayer_scenarios_random_id;
  9134.     uint32_t r1b_multiplayer_scenarios_sig_id; // example value = 0x88309C00
  9135.    
  9136.     struct mply_r1c {
  9137.         // representation 1 cells
  9138.         // r1c_multiplayer_scenarios_
  9139.        
  9140.         // dependency r1c 1: net map info descriptive bitmap bitm
  9141.         char r1c1_net_map_info_descriptive_bitmap_tagclass[5];       //unsigned char[5]
  9142.         uint32_t r1c1_net_map_info_descriptive_bitmap_tagnamepointer;   //uint32 ("random" number)
  9143.         uint32_t r1c1_net_map_info_descriptive_bitmap_tagnamestringlength;   //uint32
  9144.         uint32_t r1c1_net_map_info_descriptive_bitmap_tagid;         //uint32 (0xFFFFFFFF with tags)
  9145.         // char r1c1_net_map_info_descriptive_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9146.        
  9147.         // dependency r1c 2: net map info displayed map name ustr
  9148.         char r1c2_net_map_info_displayed_map_name_tagclass[5];       //unsigned char[5]
  9149.         uint32_t r1c2_net_map_info_displayed_map_name_tagnamepointer;   //uint32 ("random" number)
  9150.         uint32_t r1c2_net_map_info_displayed_map_name_tagnamestringlength;   //uint32
  9151.         uint32_t r1c2_net_map_info_displayed_map_name_tagid;         //uint32 (0xFFFFFFFF with tags)
  9152.         // char r1c2_net_map_info_displayed_map_name_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9153.        
  9154.         char r1c_multiplayer_scenarios_net_map_info_scenario_tag_directory_path[32];
  9155.        
  9156.         // 4
  9157.        
  9158.     }r1c_multiplayer_scenarios;
  9159.    
  9160.     // dependencies r1c 1-2 tagpathname strings go here as {r1c1 r1c2}
  9161.    
  9162.    
  9163. } type_meta_mply;
  9164.  
  9165. #pragma mark -- ngpr
  9166.  
  9167. typedef struct {
  9168.     char name[32];
  9169.     float primary_color_r_frac;
  9170.     float primary_color_g_frac;
  9171.     float primary_color_b_frac;
  9172.     float secondary_color_r_frac;
  9173.     float secondary_color_g_frac;
  9174.     float secondary_color_b_frac;
  9175.    
  9176.     // dependency 1: pattern bitm
  9177.     char pattern_tagclass[5];        //unsigned char[5]
  9178.     uint32_t pattern_tagnamepointer;   //uint32 ("random" number)
  9179.     uint32_t pattern_tagnamestringlength;   //uint32
  9180.     uint32_t pattern_tagid;      //uint32 (0xFFFFFFFF with tags)
  9181.     // char pattern_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9182.    
  9183.     uint16_t pattern_bitmap_index;
  9184.     // 138, 2
  9185.    
  9186.     // dependency 2: decal bitm
  9187.     char decal_tagclass[5];      //unsigned char[5]
  9188.     uint32_t decal_tagnamepointer;   //uint32 ("random" number)
  9189.     uint32_t decal_tagnamestringlength;   //uint32
  9190.     uint32_t decal_tagid;        //uint32 (0xFFFFFFFF with tags)
  9191.     // char decal_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9192.    
  9193.     uint16_t decal_bitmap_index;
  9194.     // 158, 802
  9195.    
  9196.     // dependencies 1 and 2 tagpathname strings go here
  9197. } type_meta_ngpr;
  9198.  
  9199. #pragma mark -- obje
  9200.  
  9201. typedef struct {
  9202.     // OBJE DATA 1 START
  9203.     uint16_t INTERNAL_obje_index;   // -1 (little endian)
  9204.     // 66, 1
  9205.     uint8_t flags;  //toff 66   0x0F
  9206.     float bounding_radius;
  9207.     float bounding_offset_x;
  9208.     float bounding_offset_y;
  9209.     float bounding_offset_z;
  9210.     float origin_offset_x;
  9211.     float origin_offset_y;
  9212.     float origin_offset_z;
  9213.     float acceleration_scale;
  9214.     // 100, 4
  9215.    
  9216.     // dependency 1: model mod2
  9217.     char model_tagclass[5];      //unsigned char[5]
  9218.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  9219.     uint32_t model_tagnamestringlength;   //uint32
  9220.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  9221.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9222.    
  9223.     // dependency 2: animation graph antr
  9224.     char animation_graph_tagclass[5];        //unsigned char[5]
  9225.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  9226.     uint32_t animation_graph_tagnamestringlength;   //uint32
  9227.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  9228.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9229.    
  9230.     // 136, 40
  9231.    
  9232.     // dependency 3: collision model coll
  9233.     char collision_model_tagclass[5];        //unsigned char[5]
  9234.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  9235.     uint32_t collision_model_tagnamestringlength;   //uint32
  9236.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  9237.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9238.    
  9239.     // dependency 4: physics phys
  9240.     char physics_tagclass[5];        //unsigned char[5]
  9241.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  9242.     uint32_t physics_tagnamestringlength;   //uint32
  9243.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  9244.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9245.    
  9246.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  9247.     char modifier_shader_tagclass[5];        //unsigned char[5]
  9248.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  9249.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  9250.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  9251.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9252.    
  9253.     // dependency 6: creation effect effe
  9254.     char creation_effect_tagclass[5];        //unsigned char[5]
  9255.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  9256.     uint32_t creation_effect_tagnamestringlength;   //uint32
  9257.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  9258.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9259.    
  9260.     // 240, 84
  9261.    
  9262.     float render_bounding_radius;
  9263.    
  9264.     uint16_t export_to_functions_a_in;
  9265.     uint16_t export_to_functions_b_in;
  9266.     uint16_t export_to_functions_c_in;
  9267.     uint16_t export_to_functions_d_in;
  9268.    
  9269.     // 336, 44
  9270.    
  9271.     uint16_t export_to_functions_hud_text_message_index;
  9272.     uint16_t export_to_functions_forced_shader_permutation_index;
  9273.    
  9274.     // representation 1 board, offset 384
  9275.     // r1b_attachments_
  9276.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  9277.     uint32_t r1b_attachments_random_id;
  9278.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  9279.    
  9280.     // representation 2 board, offset 396
  9281.     // r2b_widgets_
  9282.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  9283.     uint32_t r2b_widgets_random_id;
  9284.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  9285.    
  9286.     // representation 3 board, offset 408
  9287.     // r3b_functions_
  9288.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  9289.     uint32_t r3b_functions_random_id;
  9290.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  9291.    
  9292.     // representation 4 board, offset 420
  9293.     // r4b_change_colors_
  9294.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  9295.     uint32_t r4b_change_colors_random_id;
  9296.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  9297.    
  9298.     // representation 5 board, offset 432
  9299.     // r5b_predicted_resources_
  9300.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  9301.     uint32_t r5b_predicted_resources_random_id;
  9302.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  9303.    
  9304.     // OBJE DATA 1 END
  9305.    
  9306.     // offset 444, tagpathname strings for dependencies 1-6
  9307.    
  9308.     // OBJE DATA 2 START
  9309.    
  9310.     struct obje_r1c {
  9311.         // representation 1 cells
  9312.         // r1c_attachments_
  9313.        
  9314.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  9315.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  9316.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  9317.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  9318.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  9319.         // char r1c_attachments_type_tagnamestring[255];
  9320.        
  9321.         char r1c_attachments_marker[32];
  9322.         uint16_t r1c_attachments_primary_scale;
  9323.         uint16_t r1c_attachments_secondary_scale;
  9324.         uint16_t r1c_attachments_change_color;
  9325.        
  9326.         // 18
  9327.        
  9328.     }r1c_attachments;
  9329.    
  9330.     // r1c 1 tag name strings here
  9331.    
  9332.     struct obje_r2c {
  9333.         // representation 2 cells
  9334.         // r2c_widgets_
  9335.        
  9336.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  9337.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  9338.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  9339.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  9340.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  9341.         // char r2c_widgets_reference_tagnamestring[255];
  9342.        
  9343.         // 16
  9344.        
  9345.     }r2c_widgets;
  9346.    
  9347.     // r2c 1 tag name strings here
  9348.    
  9349.     struct obje_r3c {
  9350.         // representation 3 cells
  9351.         // r3c_functions_
  9352.        
  9353.         uint32_t r3c_functions_flags;   // verified that 4 bytes are written, toff 444  0x00000007
  9354.         float r3c_functions_period;
  9355.         uint16_t r3c_functions_scale_period_by;
  9356.         uint16_t r3c_functions_function;
  9357.         uint16_t r3c_functions_scale_function_by;
  9358.         uint16_t r3c_functions_wobble_function;
  9359.         float r3c_functions_wobble_period;
  9360.         float r3c_functions_wobble_magnitude;
  9361.         float r3c_functions_square_wave_threshold_frac;
  9362.         uint16_t r3c_functions_step_count;
  9363.         uint16_t r3c_functions_map_to;
  9364.         uint16_t r3c_functions_sawtooth_count;
  9365.         uint16_t r3c_functions_add;
  9366.         uint16_t r3c_functions_scale_result_by;
  9367.         uint16_t r3c_functions_bounds_mode;
  9368.         float r3c_functions_bounds_from_frac;
  9369.         float r3c_functions_bounds_to_frac;
  9370.         // 6
  9371.         uint16_t r3c_functions_turn_off_with_sel;
  9372.         float r3c_functions_scale_by;
  9373.         // 268
  9374.         char r3c_functions_usage[32];
  9375.        
  9376.     }r3c_functions;
  9377.    
  9378.     struct obje_r4c {
  9379.         // representation 4 cells
  9380.         // r4c_change_colors_
  9381.         uint16_t r4c_change_colors_darken_by;
  9382.         uint16_t r4c_change_colors_scale_by;
  9383.         uint32_t r4c_change_colors_scale_flags;   // verified that 4 bytes are written, toff 808    0x00000003
  9384.         float r4c_change_colors_color_lower_bound_r_frac;
  9385.         float r4c_change_colors_color_lower_bound_g_frac;
  9386.         float r4c_change_colors_color_lower_bound_b_frac;
  9387.         float r4c_change_colors_color_upper_bound_r_frac;
  9388.         float r4c_change_colors_color_upper_bound_g_frac;
  9389.         float r4c_change_colors_color_upper_bound_b_frac;
  9390.        
  9391.         // representation 4 sub-board A
  9392.         // r4sbA_permutations_
  9393.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  9394.         uint32_t r4sbA_permutations_random_id1;
  9395.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  9396.     }r4c_change_colors;
  9397.    
  9398.     struct obje_r4scA
  9399.     {
  9400.         // representation 4 sub-cells A
  9401.         // r4scA_permutations_
  9402.         float r4scA_permutations_weight_frac;
  9403.         float r4scA_permutations_color_lower_bound_r_frac;
  9404.         float r4scA_permutations_color_lower_bound_g_frac;
  9405.         float r4scA_permutations_color_lower_bound_b_frac;
  9406.         float r4scA_permutations_color_upper_bound_r_frac;
  9407.         float r4scA_permutations_color_upper_bound_g_frac;
  9408.         float r4scA_permutations_color_upper_bound_b_frac;
  9409.     }r4sc_change_colors_permutations;
  9410.    
  9411.     struct obje_r5c {
  9412.         // representation 5 cells
  9413.         // r5c_predicted_resources_
  9414.         uint16_t r5c_predicted_resources_type;
  9415.         uint16_t r5c_predicted_resources_resource_index;
  9416.         uint32_t r5c_predicted_resources_tag_index;
  9417.     }r5c_predicted_resources;
  9418.    
  9419.     // OBJE DATA 2 END
  9420.    
  9421. } type_meta_obje;
  9422.  
  9423. #pragma mark -- part
  9424.  
  9425. typedef struct {
  9426.     //uint16_t INTERNAL_optimization;   // 0
  9427.     uint32_t flags; //toff 64 (previous is illogical?)  0x00000FFF FIXED
  9428.    
  9429.     // dependency 1: bitmap bitm
  9430.     char bitmap_tagclass[5];         //unsigned char[5]
  9431.     uint32_t bitmap_tagnamepointer;   //uint32 ("random" number)
  9432.     uint32_t bitmap_tagnamestringlength;   //uint32
  9433.     uint32_t bitmap_tagid;       //uint32 (0xFFFFFFFF with tags)
  9434.     // char bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9435.    
  9436.     // dependency 2: physics pphy
  9437.     char physics_tagclass[5];        //unsigned char[5]
  9438.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  9439.     uint32_t physics_tagnamestringlength;   //uint32
  9440.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  9441.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9442.    
  9443.     // dependency 3: marty traded his kids for this foot
  9444.     char marty_tagclass[5];      //unsigned char[5]
  9445.     uint32_t marty_tagnamepointer;   //uint32 ("random" number)
  9446.     uint32_t marty_tagnamestringlength;   //uint32
  9447.     uint32_t marty_tagid;        //uint32 (0xFFFFFFFF with tags)
  9448.     // char marty_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9449.    
  9450.     // 116, 4
  9451.    
  9452.     float lifespan_from;
  9453.     float lifespan_to;
  9454.     float fade_in_time;
  9455.     float fade_out_time;
  9456.    
  9457.     // dependency 4: collision effect effe snd!
  9458.     char collision_effect_tagclass[5];       //unsigned char[5]
  9459.     uint32_t collision_effect_tagnamepointer;   //uint32 ("random" number)
  9460.     uint32_t collision_effect_tagnamestringlength;   //uint32
  9461.     uint32_t collision_effect_tagid;         //uint32 (0xFFFFFFFF with tags)
  9462.     // char collision_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9463.    
  9464.     // dependency 5: death effect effe snd!
  9465.     char death_effect_tagclass[5];       //unsigned char[5]
  9466.     uint32_t death_effect_tagnamepointer;   //uint32 ("random" number)
  9467.     uint32_t death_effect_tagnamestringlength;   //uint32
  9468.     uint32_t death_effect_tagid;         //uint32 (0xFFFFFFFF with tags)
  9469.     // char death_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9470.    
  9471.     float minimum_size;
  9472.     // 172, 8
  9473.     float radius_animation_from;
  9474.     float radius_animation_to;
  9475.     // 188, 4
  9476.     float animation_rate_from;
  9477.     float animation_rate_to;
  9478.     float contact_deterioration;
  9479.     float fade_start_size;
  9480.     float fade_end_size;
  9481.     // 212, 4
  9482.     uint16_t first_sequence_index;
  9483.     uint16_t initial_sequence_count;
  9484.     uint16_t looping_sequence_count;
  9485.     uint16_t final_sequence_count;
  9486.     // 224, 12
  9487.     uint16_t orientation;
  9488.     // 238, 43
  9489.     uint8_t shader_flags;   //toff 278  0x07
  9490.     uint16_t framebuffer_blend_function;
  9491.     uint16_t framebuffer_fade_mode;
  9492.     // 1
  9493.     uint8_t map_flags;  //toff 286  0x01
  9494.    
  9495.     // 288, 28
  9496.    
  9497.     // dependency 6: secondary map bitmap bitm
  9498.     char secondary_map_bitmap_tagclass[5];       //unsigned char[5]
  9499.     uint32_t secondary_map_bitmap_tagnamepointer;   //uint32 ("random" number)
  9500.     uint32_t secondary_map_bitmap_tagnamestringlength;   //uint32
  9501.     uint32_t secondary_map_bitmap_tagid;         //uint32 (0xFFFFFFFF with tags)
  9502.     // char secondary_map_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9503.    
  9504.     uint16_t secondary_map_anchor;
  9505.     // 1
  9506.     uint8_t secondary_map_flags;    //toff 334  0x01
  9507.    
  9508.     uint16_t secondary_map_u_animation_source;
  9509.     uint16_t secondary_map_u_animation_function;
  9510.     float secondary_map_u_animation_period;
  9511.     float secondary_map_u_animation_phase;
  9512.     float secondary_map_u_animation_scale;
  9513.    
  9514.     uint16_t secondary_map_v_animation_source;
  9515.     uint16_t secondary_map_v_animation_function;
  9516.     float secondary_map_v_animation_period;
  9517.     float secondary_map_v_animation_phase;
  9518.     float secondary_map_v_animation_scale;
  9519.    
  9520.     uint16_t secondary_map_rotation_animation_source;
  9521.     uint16_t secondary_map_rotation_animation_function;
  9522.     float secondary_map_rotation_animation_period;
  9523.     float secondary_map_rotation_animation_phase;
  9524.     float secondary_map_rotation_animation_scale;   // not radians
  9525.    
  9526.     float secondary_map_rotation_animation_center_x;
  9527.     float secondary_map_rotation_animation_center_y;
  9528.    
  9529.     // 392, 4
  9530.    
  9531.     float secondary_map_zsprite_radius_scale;
  9532.    
  9533.     // 400, 20
  9534.    
  9535.     // dependencies 1-6 tagpathname strings go here
  9536.    
  9537. } type_meta_part;
  9538.  
  9539. #pragma mark -- pctl
  9540.  
  9541. typedef struct {
  9542.     // 64, 56
  9543.    
  9544.     // dependency 1: system behavior point physics pphy
  9545.     char system_behavior_point_physics_tagclass[5];      //unsigned char[5]
  9546.     uint32_t system_behavior_point_physics_tagnamepointer;   //uint32 ("random" number)
  9547.     uint32_t system_behavior_point_physics_tagnamestringlength;   //uint32
  9548.     uint32_t system_behavior_point_physics_tagid;        //uint32 (0xFFFFFFFF with tags)
  9549.     // char system_behavior_point_physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9550.    
  9551.     uint16_t system_behavior_system_update_physics;
  9552.    
  9553.     // 138, 6
  9554.    
  9555.     // representation 1 board, offset 144
  9556.     // r1b_physics_constants_
  9557.     uint32_t r1b_physics_constants_entrycount; // maximum of 16 cells
  9558.     uint32_t r1b_physics_constants_random_id;
  9559.     uint32_t r1b_physics_constants_sig_id; // example value = 0x54FE9C00
  9560.    
  9561.     // representation 2 board, offset 156
  9562.     // r2b_particle_types_
  9563.     uint32_t r2b_particle_types_entrycount; // maximum of 4 cells
  9564.     uint32_t r2b_particle_types_random_id;
  9565.     uint32_t r2b_particle_types_sig_id; // example value = 0x24039D00
  9566.    
  9567.     // dependency 1 tagpathname string goes here
  9568.    
  9569.     struct pctl_r1c {
  9570.         // representation 1 cells
  9571.         // r1c_physics_constants_
  9572.         float r1c_physics_constants_k;
  9573.     }r1c_physics_constants;
  9574.    
  9575.     struct pctl_r2c {
  9576.         // representation 2 cells
  9577.         // r2c_particle_types_
  9578.         // 128 bytes
  9579.         char r2c_particle_types_name[32];
  9580.         uint32_t r2c_particle_types_flags;   // uses 3 out of 4 bytes, toff 200 0x0003FFFF
  9581.         uint16_t r2c_particle_types_initial_particle_count;
  9582.         // 2
  9583.         uint16_t r2c_particle_types_complex_sprite_render_modes;
  9584.         // 2
  9585.         float r2c_particle_types_radius;
  9586.         // 36
  9587.         uint16_t r2c_particle_types_particle_creation_physics;
  9588.         // 6
  9589.        
  9590.         // representation 2 sub-board A
  9591.         // r2sbA_physics_constants_
  9592.         uint32_t r2sbA_physics_constants_entrycount; // maximum of 16 cells
  9593.         uint32_t r2sbA_physics_constants_random_id;
  9594.         uint32_t r2sbA_physics_constants_sig_id; // example value = 0x54FE9C00 (same as other physics constants board)
  9595.        
  9596.         // representation 2 sub-board B
  9597.         // r2sbB_states_
  9598.         uint32_t r2sbB_states_entrycount; // maximum of 8 cells
  9599.         uint32_t r2sbB_states_random_id;
  9600.         uint32_t r2sbB_states_sig_id; // example value = 0x80FF9C00
  9601.        
  9602.         // representation 2 sub-board C
  9603.         // r2sbC_particle_states_
  9604.         uint32_t r2sbC_particle_states_entrycount; // maximum of 8 cells
  9605.         uint32_t r2sbC_particle_states_random_id;
  9606.         uint32_t r2sbC_particle_states_sig_id; // example value = 0xD8019D00
  9607.        
  9608.     }r2c_particle_types;
  9609.    
  9610.     struct pctl_r2sc {
  9611.        
  9612.         struct pctl_r2scA {   // all for current cell
  9613.             // representation 2 sub-cells A
  9614.             // r2scA_physics_constants_
  9615.            
  9616.             float r2scA_physics_constants_k;
  9617.            
  9618.         }r2scA_particle_types_physics_constants;
  9619.        
  9620.         struct pctl_r2scB {   // all for current cell
  9621.             // representation 2 sub-cells B
  9622.             // r2scB_states_
  9623.             // 192 bytes
  9624.            
  9625.             char r2scB_states_name[32];
  9626.             float r2scB_states_duration_bounds_from;
  9627.             float r2scB_states_duration_bounds_to;
  9628.             float r2scB_states_transition_time_bounds_from;
  9629.             float r2scB_states_transition_time_bounds_to;
  9630.             // 4
  9631.             float r2scB_states_scale_multiplier;
  9632.             float r2scB_states_animation_rate_multiplier;
  9633.             float r2scB_states_rotation_rate_multiplier;
  9634.            
  9635.             float r2scB_states_color_multiplier_a_frac;
  9636.             float r2scB_states_color_multiplier_r_frac;
  9637.             float r2scB_states_color_multiplier_g_frac;
  9638.             float r2scB_states_color_multiplier_b_frac;
  9639.            
  9640.             float r2scB_states_radius_multiplier;
  9641.             float r2scB_states_minimum_particle_count;
  9642.             float r2scB_states_particle_creation_rate;
  9643.            
  9644.             // 84
  9645.            
  9646.             uint16_t r2scB_states_particle_creation_physics;
  9647.             uint16_t r2scB_states_particle_update_physics;
  9648.            
  9649.             // representation 2 sub-cells B sub-board a
  9650.             // r2scBsba_physics_constants_
  9651.             uint32_t r2scBsba_physics_constants_entrycount; // maximum of 16 cells
  9652.             uint32_t r2scBsba_physics_constants_random_id;
  9653.             uint32_t r2scBsba_physics_constants_sig_id; // example value = 0x54FE9C00 (same as other physics constants board)
  9654.            
  9655.         }r2scB_particle_types_states;
  9656.        
  9657.         struct pctl_r2scBsca {   // all for current cell (not sub-cell)
  9658.             // representation 2 sub-cells B sub-cells a
  9659.             // r2scBsca_physics_constants_
  9660.            
  9661.             float r2scBsca_physics_constants_k;
  9662.            
  9663.         }r2scBsca_particle_types_states_physics_constants;
  9664.        
  9665.         struct pctl_r2scC {   // all for current cell
  9666.             // representation 2 sub-cells C
  9667.             // r2scC_particle_states_
  9668.             // 376 bytes
  9669.            
  9670.             char r2scC_particle_states_name[32];
  9671.             float r2scC_particle_states_duration_bounds_from;
  9672.             float r2scC_particle_states_duration_bounds_to;
  9673.             float r2scC_particle_states_transition_time_bounds_from;
  9674.             float r2scC_particle_states_transition_time_bounds_to;
  9675.            
  9676.             // dependency r2scC 1: bitmaps bitm
  9677.             char r2scC1_bitmaps_tagclass[5];         //unsigned char[5]
  9678.             uint32_t r2scC1_bitmaps_tagnamepointer;   //uint32 ("random" number)
  9679.             uint32_t r2scC1_bitmaps_tagnamestringlength;   //uint32
  9680.             uint32_t r2scC1_bitmaps_tagid;       //uint32 (0xFFFFFFFF with tags)
  9681.             // char r2scC1_bitmaps_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9682.            
  9683.             uint16_t r2scC_particle_states_sequence_index;
  9684.             // 6
  9685.             float r2scC_particle_states_scale_from;
  9686.             float r2scC_particle_states_scale_to;
  9687.             float r2scC_particle_states_animation_rate_from;
  9688.             float r2scC_particle_states_animation_rate_to;
  9689.             float r2scC_particle_states_rotation_rate_from_rad;   // does the game correctly interpret these animation and rotation rate values? (Moses of Egypt mentioned that some CMT modders said these two values, as they are stored in radians, are mis-interpreted by the game as having been degrees -- so when you type 360 degrees, it is stored as 3.14, but the game thinks it is 3.14 degrees.) The values are stored correctly as Guerilla says, but does the game mis-interpret the radians value as degrees? If so, maybe Zeus will need to improperly store the value as degrees rather than radians.
  9690.             float r2scC_particle_states_rotation_rate_to_rad;
  9691.             float r2scC_particle_states_color_1_a_frac;
  9692.             float r2scC_particle_states_color_1_r_frac;
  9693.             float r2scC_particle_states_color_1_g_frac;
  9694.             float r2scC_particle_states_color_1_b_frac;
  9695.             float r2scC_particle_states_color_2_a_frac;
  9696.             float r2scC_particle_states_color_2_r_frac;
  9697.             float r2scC_particle_states_color_2_g_frac;
  9698.             float r2scC_particle_states_color_2_b_frac;
  9699.             float r2scC_particle_states_radius_multiplier;
  9700.            
  9701.             // dependency r2scC 2: point physics pphy
  9702.             char r2scC2_point_physics_tagclass[5];       //unsigned char[5]
  9703.             uint32_t r2scC2_point_physics_tagnamepointer;   //uint32 ("random" number)
  9704.             uint32_t r2scC2_point_physics_tagnamestringlength;   //uint32
  9705.             uint32_t r2scC2_point_physics_tagid;         //uint32 (0xFFFFFFFF with tags)
  9706.             // char r2scC2_point_physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9707.            
  9708.             // 77
  9709.            
  9710.             uint8_t r2scC_particle_states_shader_flags; //toff 518  0x07
  9711.             uint16_t r2scC_particle_states_framebuffer_blend_function;
  9712.             uint16_t r2scC_particle_states_framebuffer_fade_mode;
  9713.             // 1
  9714.             uint8_t r2scC_particle_states_map_flags;    //toff 526  0x01
  9715.            
  9716.             // 28
  9717.            
  9718.             // dependency r2scC 3: secondary map bitmap bitm
  9719.             char r2scC3_secondary_map_bitmap_tagclass[5];        //unsigned char[5]
  9720.             uint32_t r2scC3_secondary_map_bitmap_tagnamepointer;   //uint32 ("random" number)
  9721.             uint32_t r2scC3_secondary_map_bitmap_tagnamestringlength;   //uint32
  9722.             uint32_t r2scC3_secondary_map_bitmap_tagid;      //uint32 (0xFFFFFFFF with tags)
  9723.             // char r2scC3_secondary_map_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9724.            
  9725.             uint16_t r2scC_particle_states_secondary_map_anchor;
  9726.             // 1
  9727.             uint8_t r2scC_particle_states_secondary_map_flags;  //toff 574  0x01
  9728.            
  9729.             uint16_t r2scC_particle_states_secondary_map_u_animation_source;
  9730.             uint16_t r2scC_particle_states_secondary_map_u_animation_function;
  9731.             float r2scC_particle_states_secondary_map_u_animation_period;
  9732.             float r2scC_particle_states_secondary_map_u_animation_phase;
  9733.             float r2scC_particle_states_secondary_map_u_animation_scale;
  9734.            
  9735.             uint16_t r2scC_particle_states_secondary_map_v_animation_source;
  9736.             uint16_t r2scC_particle_states_secondary_map_v_animation_function;
  9737.             float r2scC_particle_states_secondary_map_v_animation_period;
  9738.             float r2scC_particle_states_secondary_map_v_animation_phase;
  9739.             float r2scC_particle_states_secondary_map_v_animation_scale;
  9740.            
  9741.             uint16_t r2scC_particle_states_secondary_map_rotation_animation_source;
  9742.             uint16_t r2scC_particle_states_secondary_map_rotation_animation_function;
  9743.             float r2scC_particle_states_secondary_map_rotation_animation_period;
  9744.             float r2scC_particle_states_secondary_map_rotation_animation_phase;
  9745.             float r2scC_particle_states_secondary_map_rotation_animation_scale; // not in radians
  9746.            
  9747.             float r2scC_particle_states_secondary_map_rotation_animation_center_x;
  9748.             float r2scC_particle_states_secondary_map_rotation_animation_center_y;
  9749.             // 4
  9750.             float r2scC_particle_states_secondary_map_zsprite_radius_scale;
  9751.            
  9752.             // 20
  9753.            
  9754.             // representation 2 sub-cells C sub-board a
  9755.             // r2scCsba_physics_constants_
  9756.             uint32_t r2scCsba_physics_constants_entrycount; // maximum of 16 cells
  9757.             uint32_t r2scCsba_physics_constants_random_id;
  9758.             uint32_t r2scCsba_physics_constants_sig_id; // example value = 0x54FE9C00 (same as other physics constants board)
  9759.            
  9760.         }r2scC_particle_types_particle_states;
  9761.        
  9762.         // like in grhi and matg, we have some mis-grouped data
  9763.         struct pctl_r2scC_misgrouped_data {   // all for current cell
  9764.             // mis-grouped data for representation 2 sub-cells C
  9765.             // r2scCmdc_
  9766.            
  9767.             // tagpathname strings for dependencies r2scC 1-3 of current sub-cell go here
  9768.            
  9769.             struct pctl_r2scCsca {   // all for current sub-cell
  9770.                 // representation 2 sub-cells C sub-cells a
  9771.                 // r2scCsca_physics_constants_
  9772.                
  9773.                 float r2scCsca_physics_constants_k;
  9774.                
  9775.             }r2scCsca_particle_types_particle_states_physics_constants;
  9776.            
  9777.         }r2scC_misgrouped_data_container;
  9778.        
  9779.     }r2sc_container;
  9780. } type_meta_pctl;
  9781.  
  9782. #pragma mark -- phys
  9783.  
  9784. typedef struct {
  9785.     float radius;
  9786.     float moment_scale_frac;
  9787.     float mass;
  9788.     float center_of_mass_x;
  9789.     float center_of_mass_y;
  9790.     float center_of_mass_z;
  9791.     float density;
  9792.     float gravity_scale;
  9793.     float ground_friction;
  9794.     float ground_depth;
  9795.     float ground_damp_fraction_frac;
  9796.     float ground_normal_k1;
  9797.     float ground_normal_k0;
  9798.     // 116, 4
  9799.     float water_friction;
  9800.     float water_depth;
  9801.     float water_density;
  9802.     // 132, 4
  9803.     float air_friction_frac;
  9804.     // 140, 4
  9805.     float xx_moment_calc;   // Calculated regardless of the values stored here;
  9806.     float yy_moment_calc;   // even though the values are stored as specified,
  9807.     float zz_moment_calc;   // Guerilla only displays its calculated values instead.
  9808.    
  9809.     // representation 1 board, offset 156
  9810.     // r1b_inertial_matrix_and_inverse_
  9811.     uint32_t r1b_inertial_matrix_and_inverse_entrycount; // maximum of 2 cells
  9812.     uint32_t r1b_inertial_matrix_and_inverse_random_id;
  9813.     uint32_t r1b_inertial_matrix_and_inverse_sig_id; // example value = 0x684B9D00
  9814.    
  9815.     // representation 2 board, offset 168
  9816.     // r2b_powered_mass_points_
  9817.     uint32_t r2b_powered_mass_points_entrycount; // maximum of 32 cells
  9818.     uint32_t r2b_powered_mass_points_random_id;
  9819.     uint32_t r2b_powered_mass_points_sig_id; // example value = 0x304C9D00
  9820.    
  9821.     // representation 3 board, offset 180
  9822.     // r3b_mass_points_
  9823.     uint32_t r3b_mass_points_entrycount; // maximum of 32 cells
  9824.     uint32_t r3b_mass_points_random_id;
  9825.     uint32_t r3b_mass_points_sig_id; // example value = 0x604D9D00
  9826.    
  9827.     struct phys_r1c {
  9828.         // representation 1 cells
  9829.         // r1c_inertial_matrix_and_inverse_
  9830.         // all these are calculated regardless of their stored values
  9831.        
  9832.         float r1c_inertial_matrix_and_inverse_yyzz_xy_zx_i_calc;
  9833.         float r1c_inertial_matrix_and_inverse_yyzz_xy_zx_j_calc;
  9834.         float r1c_inertial_matrix_and_inverse_yyzz_xy_zx_k_calc;
  9835.        
  9836.         float r1c_inertial_matrix_and_inverse_xy_zzxx_yz_i_calc;
  9837.         float r1c_inertial_matrix_and_inverse_xy_zzxx_yz_j_calc;
  9838.         float r1c_inertial_matrix_and_inverse_xy_zzxx_yz_k_calc;
  9839.        
  9840.         float r1c_inertial_matrix_and_inverse_zx_yz_xxyy_i_calc;
  9841.         float r1c_inertial_matrix_and_inverse_zx_yz_xxyy_j_calc;
  9842.         float r1c_inertial_matrix_and_inverse_zx_yz_xxyy_k_calc;
  9843.        
  9844.     }r1c_inertial_matrix_and_inverse;
  9845.    
  9846.     struct phys_r2c {
  9847.         // representation 2 cells
  9848.         // r2c_powered_mass_points_
  9849.        
  9850.         char r2c_powered_mass_points_name[32];
  9851.         uint32_t r2c_powered_mass_points_flags;   // verified 4 bytes written, toff 296 0x0000007F
  9852.         float r2c_powered_mass_points_antigrav_strength;
  9853.         float r2c_powered_mass_points_antigrav_offset;
  9854.         float r2c_powered_mass_points_antigrav_height;
  9855.         float r2c_powered_mass_points_antigrav_damp_fraction;
  9856.         float r2c_powered_mass_points_antigrav_normal_k1;
  9857.         float r2c_powered_mass_points_antigrav_normal_k0;
  9858.        
  9859.         // 68
  9860.        
  9861.     }r2c_powered_mass_points;
  9862.    
  9863.     struct phys_r3c {
  9864.         // representation 3 cells
  9865.         // r3c_mass_points_
  9866.        
  9867.         char r3c_mass_points_name[32];
  9868.         uint16_t r3c_mass_points_powered_mass_point_sel;
  9869.         uint16_t r3c_mass_points_model_node;
  9870.         uint32_t r3c_mass_points_flags;   // verified 4 bytes written, toff 556 0x00000001
  9871.         float r3c_mass_points_relative_mass;
  9872.         float r3c_mass_points_mass_calc;   // calculated regardless of stored value
  9873.         float r3c_mass_points_relative_density;
  9874.         float r3c_mass_points_density_calc;   // calculated regardless of stored value
  9875.         float r3c_mass_points_position_x;
  9876.         float r3c_mass_points_position_y;
  9877.         float r3c_mass_points_position_z;
  9878.         float r3c_mass_points_forward_i;
  9879.         float r3c_mass_points_forward_j;
  9880.         float r3c_mass_points_forward_k;
  9881.         float r3c_mass_points_up_i;
  9882.         float r3c_mass_points_up_j;
  9883.         float r3c_mass_points_up_k;
  9884.         uint16_t r3c_mass_points_friction_type;
  9885.         // 2
  9886.         float r3c_mass_points_friction_parallel_scale;
  9887.         float r3c_mass_points_friction_perpendicular_scale;
  9888.         float r3c_mass_points_radius;
  9889.         // 20
  9890.        
  9891.     }r3c_mass_points;
  9892.    
  9893. } type_meta_phys;
  9894.  
  9895. #pragma mark -- plac
  9896.  
  9897. typedef struct {
  9898.     // OBJE DATA 1 START
  9899.     uint16_t INTERNAL_obje_index;   // 10 (little endian)
  9900.     // 66, 1
  9901.     uint8_t flags;  //toff 66   0x0F
  9902.     float bounding_radius;
  9903.     float bounding_offset_x;
  9904.     float bounding_offset_y;
  9905.     float bounding_offset_z;
  9906.     float origin_offset_x;
  9907.     float origin_offset_y;
  9908.     float origin_offset_z;
  9909.     float acceleration_scale;
  9910.     // 100, 4
  9911.    
  9912.     // dependency 1: model mod2
  9913.     char model_tagclass[5];      //unsigned char[5]
  9914.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  9915.     uint32_t model_tagnamestringlength;   //uint32
  9916.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  9917.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9918.    
  9919.     // dependency 2: animation graph antr
  9920.     char animation_graph_tagclass[5];        //unsigned char[5]
  9921.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  9922.     uint32_t animation_graph_tagnamestringlength;   //uint32
  9923.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  9924.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9925.    
  9926.     // 136, 40
  9927.    
  9928.     // dependency 3: collision model coll
  9929.     char collision_model_tagclass[5];        //unsigned char[5]
  9930.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  9931.     uint32_t collision_model_tagnamestringlength;   //uint32
  9932.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  9933.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9934.    
  9935.     // dependency 4: physics phys
  9936.     char physics_tagclass[5];        //unsigned char[5]
  9937.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  9938.     uint32_t physics_tagnamestringlength;   //uint32
  9939.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  9940.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9941.    
  9942.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  9943.     char modifier_shader_tagclass[5];        //unsigned char[5]
  9944.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  9945.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  9946.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  9947.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9948.    
  9949.     // dependency 6: creation effect effe
  9950.     char creation_effect_tagclass[5];        //unsigned char[5]
  9951.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  9952.     uint32_t creation_effect_tagnamestringlength;   //uint32
  9953.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  9954.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  9955.    
  9956.     // 240, 84
  9957.    
  9958.     float render_bounding_radius;
  9959.    
  9960.     uint16_t export_to_functions_a_in;
  9961.     uint16_t export_to_functions_b_in;
  9962.     uint16_t export_to_functions_c_in;
  9963.     uint16_t export_to_functions_d_in;
  9964.    
  9965.     // 336, 44
  9966.    
  9967.     uint16_t export_to_functions_hud_text_message_index;
  9968.     uint16_t export_to_functions_forced_shader_permutation_index;
  9969.    
  9970.     // representation 1 board, offset 384
  9971.     // r1b_attachments_
  9972.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  9973.     uint32_t r1b_attachments_random_id;
  9974.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  9975.    
  9976.     // representation 2 board, offset 396
  9977.     // r2b_widgets_
  9978.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  9979.     uint32_t r2b_widgets_random_id;
  9980.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  9981.    
  9982.     // representation 3 board, offset 408
  9983.     // r3b_functions_
  9984.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  9985.     uint32_t r3b_functions_random_id;
  9986.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  9987.    
  9988.     // representation 4 board, offset 420
  9989.     // r4b_change_colors_
  9990.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  9991.     uint32_t r4b_change_colors_random_id;
  9992.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  9993.    
  9994.     // representation 5 board, offset 432
  9995.     // r5b_predicted_resources_
  9996.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  9997.     uint32_t r5b_predicted_resources_random_id;
  9998.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  9999.    
  10000.     // OBJE DATA 1 END
  10001.    
  10002.     // 444, 128
  10003.    
  10004.     // offset 572, tagpathname strings for dependencies 1-6
  10005.    
  10006.     // OBJE DATA 2 START
  10007.    
  10008.     struct plac_r1c {
  10009.         // representation 1 cells
  10010.         // r1c_attachments_
  10011.        
  10012.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  10013.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  10014.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  10015.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  10016.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  10017.         // char r1c_attachments_type_tagnamestring[255];
  10018.        
  10019.         char r1c_attachments_marker[32];
  10020.         uint16_t r1c_attachments_primary_scale;
  10021.         uint16_t r1c_attachments_secondary_scale;
  10022.         uint16_t r1c_attachments_change_color;
  10023.        
  10024.         // 18
  10025.        
  10026.     }r1c_attachments;
  10027.    
  10028.     // r1c 1 tag name strings here
  10029.    
  10030.     struct plac_r2c {
  10031.         // representation 2 cells
  10032.         // r2c_widgets_
  10033.        
  10034.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  10035.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  10036.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  10037.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  10038.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  10039.         // char r2c_widgets_reference_tagnamestring[255];
  10040.        
  10041.         // 16
  10042.        
  10043.     }r2c_widgets;
  10044.    
  10045.     // r2c 1 tag name strings here
  10046.    
  10047.     struct plac_r3c {
  10048.         // representation 3 cells
  10049.         // r3c_functions_
  10050.        
  10051.         uint32_t r3c_functions_flags;   // verified that 4 bytes are written, toff 572  0x00000007
  10052.         float r3c_functions_period;
  10053.         uint16_t r3c_functions_scale_period_by;
  10054.         uint16_t r3c_functions_function;
  10055.         uint16_t r3c_functions_scale_function_by;
  10056.         uint16_t r3c_functions_wobble_function;
  10057.         float r3c_functions_wobble_period;
  10058.         float r3c_functions_wobble_magnitude;
  10059.         float r3c_functions_square_wave_threshold_frac;
  10060.         uint16_t r3c_functions_step_count;
  10061.         uint16_t r3c_functions_map_to;
  10062.         uint16_t r3c_functions_sawtooth_count;
  10063.         uint16_t r3c_functions_add;
  10064.         uint16_t r3c_functions_scale_result_by;
  10065.         uint16_t r3c_functions_bounds_mode;
  10066.         float r3c_functions_bounds_from_frac;
  10067.         float r3c_functions_bounds_to_frac;
  10068.         // 6
  10069.         uint16_t r3c_functions_turn_off_with_sel;
  10070.         float r3c_functions_scale_by;
  10071.         // 268
  10072.         char r3c_functions_usage[32];
  10073.        
  10074.     }r3c_functions;
  10075.    
  10076.     struct plac_r4c {
  10077.         // representation 4 cells
  10078.         // r4c_change_colors_
  10079.         uint16_t r4c_change_colors_darken_by;
  10080.         uint16_t r4c_change_colors_scale_by;
  10081.         uint32_t r4c_change_colors_scale_flags;   // verified that 4 bytes are written, toff 936    0x00000003
  10082.         float r4c_change_colors_color_lower_bound_r_frac;
  10083.         float r4c_change_colors_color_lower_bound_g_frac;
  10084.         float r4c_change_colors_color_lower_bound_b_frac;
  10085.         float r4c_change_colors_color_upper_bound_r_frac;
  10086.         float r4c_change_colors_color_upper_bound_g_frac;
  10087.         float r4c_change_colors_color_upper_bound_b_frac;
  10088.        
  10089.         // representation 4 sub-board A
  10090.         // r4sbA_permutations_
  10091.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  10092.         uint32_t r4sbA_permutations_random_id1;
  10093.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  10094.     }r4c_change_colors;
  10095.    
  10096.     struct plac_r4scA
  10097.     {
  10098.         // representation 4 sub-cells A
  10099.         // r4scA_permutations_
  10100.         float r4scA_permutations_weight_frac;   // not enforced
  10101.         float r4scA_permutations_color_lower_bound_r_frac;
  10102.         float r4scA_permutations_color_lower_bound_g_frac;
  10103.         float r4scA_permutations_color_lower_bound_b_frac;
  10104.         float r4scA_permutations_color_upper_bound_r_frac;
  10105.         float r4scA_permutations_color_upper_bound_g_frac;
  10106.         float r4scA_permutations_color_upper_bound_b_frac;
  10107.     }r4sc_change_colors_permutations;
  10108.    
  10109.     struct plac_r5c {
  10110.         // representation 5 cells
  10111.         // r5c_predicted_resources_
  10112.         uint16_t r5c_predicted_resources_type;
  10113.         uint16_t r5c_predicted_resources_resource_index;
  10114.         uint32_t r5c_predicted_resources_tag_index;
  10115.     }r5c_predicted_resources;
  10116.    
  10117.     // OBJE DATA 2 END
  10118.    
  10119. } type_meta_plac;
  10120.  
  10121. #pragma mark -- pphy
  10122.  
  10123. typedef struct {
  10124.     //uint16_t INTERNAL_optimization;   // 0
  10125.     uint32_t flags; //toff 64 (previous is illogical)   0x0000003F  FIXED
  10126.     // 68, 28
  10127.     float density;
  10128.     float air_friction;
  10129.     float water_friction;
  10130.     float surface_friction;
  10131.     float elasticity;
  10132.     // 116, 12
  10133. } type_meta_pphy;
  10134.  
  10135. #pragma mark -- proj
  10136.  
  10137. typedef struct {
  10138.     // OBJE DATA 1 START
  10139.     uint16_t INTERNAL_obje_index;   // 5 (little endian)
  10140.     // 66, 1
  10141.     uint8_t flags;  //toff 66   0x0F
  10142.     float bounding_radius;
  10143.     float bounding_offset_x;
  10144.     float bounding_offset_y;
  10145.     float bounding_offset_z;
  10146.     float origin_offset_x;
  10147.     float origin_offset_y;
  10148.     float origin_offset_z;
  10149.     float acceleration_scale;
  10150.     // 100, 4
  10151.    
  10152.     // dependency 1: model mod2
  10153.     char model_tagclass[5];      //unsigned char[5]
  10154.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  10155.     uint32_t model_tagnamestringlength;   //uint32
  10156.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  10157.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10158.    
  10159.     // dependency 2: animation graph antr
  10160.     char animation_graph_tagclass[5];        //unsigned char[5]
  10161.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  10162.     uint32_t animation_graph_tagnamestringlength;   //uint32
  10163.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  10164.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10165.    
  10166.     // 136, 40
  10167.    
  10168.     // dependency 3: collision model coll
  10169.     char collision_model_tagclass[5];        //unsigned char[5]
  10170.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  10171.     uint32_t collision_model_tagnamestringlength;   //uint32
  10172.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  10173.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10174.    
  10175.     // dependency 4: physics phys
  10176.     char physics_tagclass[5];        //unsigned char[5]
  10177.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  10178.     uint32_t physics_tagnamestringlength;   //uint32
  10179.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  10180.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10181.    
  10182.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  10183.     char modifier_shader_tagclass[5];        //unsigned char[5]
  10184.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  10185.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  10186.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  10187.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10188.    
  10189.     // dependency 6: creation effect effe
  10190.     char creation_effect_tagclass[5];        //unsigned char[5]
  10191.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  10192.     uint32_t creation_effect_tagnamestringlength;   //uint32
  10193.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  10194.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10195.    
  10196.     // 240, 84
  10197.    
  10198.     float render_bounding_radius;
  10199.    
  10200.     uint16_t export_to_functions_a_in;
  10201.     uint16_t export_to_functions_b_in;
  10202.     uint16_t export_to_functions_c_in;
  10203.     uint16_t export_to_functions_d_in;
  10204.    
  10205.     // 336, 44
  10206.    
  10207.     uint16_t export_to_functions_hud_text_message_index;
  10208.     uint16_t export_to_functions_forced_shader_permutation_index;
  10209.    
  10210.     // representation 1 board, offset 384
  10211.     // r1b_attachments_
  10212.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  10213.     uint32_t r1b_attachments_random_id;
  10214.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  10215.    
  10216.     // representation 2 board, offset 396
  10217.     // r2b_widgets_
  10218.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  10219.     uint32_t r2b_widgets_random_id;
  10220.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  10221.    
  10222.     // representation 3 board, offset 408
  10223.     // r3b_functions_
  10224.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  10225.     uint32_t r3b_functions_random_id;
  10226.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  10227.    
  10228.     // representation 4 board, offset 420
  10229.     // r4b_change_colors_
  10230.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  10231.     uint32_t r4b_change_colors_random_id;
  10232.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  10233.    
  10234.     // representation 5 board, offset 432
  10235.     // r5b_predicted_resources_
  10236.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  10237.     uint32_t r5b_predicted_resources_random_id;
  10238.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  10239.    
  10240.     // OBJE DATA 1 END
  10241.    
  10242.     uint32_t projectile_flags;   // verified 4 bytes written, toff 444  0x0000007F
  10243.    
  10244.     uint16_t projectile_detonation_timer_starts;   // this should be under the "detonation" section below
  10245.     uint16_t projectile_impact_noise;
  10246.     uint16_t projectile_a_in;
  10247.     uint16_t projectile_b_in;
  10248.     uint16_t projectile_c_in;
  10249.     uint16_t projectile_d_in;
  10250.    
  10251.     // this dependency should also be under the "detonation" section below
  10252.     // dependency 7: projectile super detonation effe
  10253.     char projectile_super_detonation_tagclass[5];        //unsigned char[5]
  10254.     uint32_t projectile_super_detonation_tagnamepointer;   //uint32 ("random" number)
  10255.     uint32_t projectile_super_detonation_tagnamestringlength;   //uint32
  10256.     uint32_t projectile_super_detonation_tagid;      //uint32 (0xFFFFFFFF with tags)
  10257.     // char projectile_super_detonation_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10258.    
  10259.     float projectile_ai_perception_radius;
  10260.     float projectile_collision_radius;
  10261.     float projectile_detonation_arming_time;
  10262.     float projectile_detonation_danger_radius;
  10263.    
  10264.     // dependency 8: projectile detonation effect effe
  10265.     char projectile_detonation_effect_tagclass[5];       //unsigned char[5]
  10266.     uint32_t projectile_detonation_effect_tagnamepointer;   //uint32 ("random" number)
  10267.     uint32_t projectile_detonation_effect_tagnamestringlength;   //uint32
  10268.     uint32_t projectile_detonation_effect_tagid;         //uint32 (0xFFFFFFFF with tags)
  10269.     // char projectile_detonation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10270.    
  10271.     float projectile_detonation_timer_from;
  10272.     float projectile_detonation_timer_to;
  10273.     float projectile_detonation_minimum_velocity;
  10274.     float projectile_detonation_maximum_range;
  10275.    
  10276.     float projectile_physics_air_gravity_scale;
  10277.     float projectile_physics_air_damage_range_from;
  10278.     float projectile_physics_air_damage_range_to;
  10279.     float projectile_physics_water_gravity_scale;
  10280.     float projectile_physics_water_damage_range_from;
  10281.     float projectile_physics_water_damage_range_to;
  10282.     float projectile_physics_initial_velocity;
  10283.     float projectile_physics_final_velocity;
  10284.     float projectile_physics_guided_angular_velocity_rad;
  10285.     uint16_t projectile_physics_detonation_noise;   // should be under "detonation"
  10286.    
  10287.     // 2
  10288.    
  10289.     // dependency 9: projectile physics detonation started effe
  10290.     char projectile_physics_detonation_started_tagclass[5];      //unsigned char[5]
  10291.     uint32_t projectile_physics_detonation_started_tagnamepointer;   //uint32 ("random" number)
  10292.     uint32_t projectile_physics_detonation_started_tagnamestringlength;   //uint32
  10293.     uint32_t projectile_physics_detonation_started_tagid;        //uint32 (0xFFFFFFFF with tags)
  10294.     // char projectile_physics_detonation_started_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10295.    
  10296.     // dependency 10: projectile physics flyby sound snd!
  10297.     char projectile_physics_flyby_sound_tagclass[5];         //unsigned char[5]
  10298.     uint32_t projectile_physics_flyby_sound_tagnamepointer;   //uint32 ("random" number)
  10299.     uint32_t projectile_physics_flyby_sound_tagnamestringlength;   //uint32
  10300.     uint32_t projectile_physics_flyby_sound_tagid;       //uint32 (0xFFFFFFFF with tags)
  10301.     // char projectile_physics_flyby_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10302.    
  10303.     // dependency 11: projectile physics attached detonation damage jpt!
  10304.     char projectile_physics_attached_detonation_damage_tagclass[5];      //unsigned char[5]
  10305.     uint32_t projectile_physics_attached_detonation_damage_tagnamepointer;   //uint32 ("random" number)
  10306.     uint32_t projectile_physics_attached_detonation_damage_tagnamestringlength;   //uint32
  10307.     uint32_t projectile_physics_attached_detonation_damage_tagid;        //uint32 (0xFFFFFFFF with tags)
  10308.     // char projectile_physics_attached_detonation_damage_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10309.    
  10310.     // dependency 12: projectile physics impact damage jpt!
  10311.     char projectile_physics_impact_damage_tagclass[5];       //unsigned char[5]
  10312.     uint32_t projectile_physics_impact_damage_tagnamepointer;   //uint32 ("random" number)
  10313.     uint32_t projectile_physics_impact_damage_tagnamestringlength;   //uint32
  10314.     uint32_t projectile_physics_impact_damage_tagid;         //uint32 (0xFFFFFFFF with tags)
  10315.     // char projectile_physics_impact_damage_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10316.    
  10317.     // 628, 12
  10318.    
  10319.     // representation 6 board, offset 640
  10320.     // r6b_material_responses_
  10321.     uint32_t r6b_material_responses_entrycount; // maximum of 33 cells
  10322.     uint32_t r6b_material_responses_random_id;
  10323.     uint32_t r6b_material_responses_sig_id; // example value = 0x5CFA9C00
  10324.    
  10325.     // offset 652, tagpathname strings for dependencies 1-6
  10326.    
  10327.     // OBJE DATA 2 START
  10328.    
  10329.     struct proj_r1c {
  10330.         // representation 1 cells
  10331.         // r1c_attachments_
  10332.        
  10333.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  10334.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  10335.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  10336.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  10337.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  10338.         // char r1c_attachments_type_tagnamestring[255];
  10339.        
  10340.         char r1c_attachments_marker[32];
  10341.         uint16_t r1c_attachments_primary_scale;
  10342.         uint16_t r1c_attachments_secondary_scale;
  10343.         uint16_t r1c_attachments_change_color;
  10344.        
  10345.         // 18
  10346.        
  10347.     }r1c_attachments;
  10348.    
  10349.     // r1c 1 tag name strings here
  10350.    
  10351.     struct proj_r2c {
  10352.         // representation 2 cells
  10353.         // r2c_widgets_
  10354.        
  10355.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  10356.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  10357.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  10358.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  10359.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  10360.         // char r2c_widgets_reference_tagnamestring[255];
  10361.        
  10362.         // 16
  10363.        
  10364.     }r2c_widgets;
  10365.    
  10366.     // r2c 1 tag name strings here
  10367.    
  10368.     struct proj_r3c {
  10369.         // representation 3 cells
  10370.         // r3c_functions_
  10371.        
  10372.         uint32_t r3c_functions_flags;   // verified that 4 bytes are written, toff 652  0x00000007
  10373.         float r3c_functions_period;
  10374.         uint16_t r3c_functions_scale_period_by;
  10375.         uint16_t r3c_functions_function;
  10376.         uint16_t r3c_functions_scale_function_by;
  10377.         uint16_t r3c_functions_wobble_function;
  10378.         float r3c_functions_wobble_period;
  10379.         float r3c_functions_wobble_magnitude;
  10380.         float r3c_functions_square_wave_threshold_frac;
  10381.         uint16_t r3c_functions_step_count;
  10382.         uint16_t r3c_functions_map_to;
  10383.         uint16_t r3c_functions_sawtooth_count;
  10384.         uint16_t r3c_functions_add;
  10385.         uint16_t r3c_functions_scale_result_by;
  10386.         uint16_t r3c_functions_bounds_mode;
  10387.         float r3c_functions_bounds_from_frac;
  10388.         float r3c_functions_bounds_to_frac;
  10389.         // 6
  10390.         uint16_t r3c_functions_turn_off_with_sel;
  10391.         float r3c_functions_scale_by;
  10392.         // 268
  10393.         char r3c_functions_usage[32];
  10394.        
  10395.     }r3c_functions;
  10396.    
  10397.     struct proj_r4c {
  10398.         // representation 4 cells
  10399.         // r4c_change_colors_
  10400.         uint16_t r4c_change_colors_darken_by;
  10401.         uint16_t r4c_change_colors_scale_by;
  10402.         uint32_t r4c_change_colors_scale_flags;   // verified that 4 bytes are written, toff 1016   0x00000003
  10403.         float r4c_change_colors_color_lower_bound_r_frac;
  10404.         float r4c_change_colors_color_lower_bound_g_frac;
  10405.         float r4c_change_colors_color_lower_bound_b_frac;
  10406.         float r4c_change_colors_color_upper_bound_r_frac;
  10407.         float r4c_change_colors_color_upper_bound_g_frac;
  10408.         float r4c_change_colors_color_upper_bound_b_frac;
  10409.        
  10410.         // representation 4 sub-board A
  10411.         // r4sbA_permutations_
  10412.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  10413.         uint32_t r4sbA_permutations_random_id1;
  10414.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  10415.     }r4c_change_colors;
  10416.    
  10417.     struct proj_r4scA
  10418.     {
  10419.         // representation 4 sub-cells A
  10420.         // r4scA_permutations_
  10421.         float r4scA_permutations_weight_frac;   // fractionality not enforced
  10422.         float r4scA_permutations_color_lower_bound_r_frac;
  10423.         float r4scA_permutations_color_lower_bound_g_frac;
  10424.         float r4scA_permutations_color_lower_bound_b_frac;
  10425.         float r4scA_permutations_color_upper_bound_r_frac;
  10426.         float r4scA_permutations_color_upper_bound_g_frac;
  10427.         float r4scA_permutations_color_upper_bound_b_frac;
  10428.     }r4sc_change_colors_permutations;
  10429.    
  10430.     struct proj_r5c {
  10431.         // representation 5 cells
  10432.         // r5c_predicted_resources_
  10433.         uint16_t r5c_predicted_resources_type;
  10434.         uint16_t r5c_predicted_resources_resource_index;
  10435.         uint32_t r5c_predicted_resources_tag_index;
  10436.     }r5c_predicted_resources;
  10437.    
  10438.     // OBJE DATA 2 END
  10439.    
  10440.     // tagpathname strings for dependencies 7-12 go here
  10441.    
  10442.     struct proj_r6c {
  10443.         // representation 6 cells
  10444.         // r6c_material_responses_
  10445.        
  10446.         // 1
  10447.         uint8_t r6c_material_responses_flags;   //toff 1056 0x01    FIXED
  10448.         uint16_t r6c_material_responses_default_result_response;
  10449.        
  10450.         // dependency r6c 1: default result effect effe
  10451.         char r6c1_default_result_effect_tagclass[5];         //unsigned char[5]
  10452.         uint32_t r6c1_default_result_effect_tagnamepointer;   //uint32 ("random" number)
  10453.         uint32_t r6c1_default_result_effect_tagnamestringlength;   //uint32
  10454.         uint32_t r6c1_default_result_effect_tagid;       //uint32 (0xFFFFFFFF with tags)
  10455.         // char r6c1_default_result_effect_tagnamestring[255];
  10456.        
  10457.         // 16
  10458.        
  10459.         uint16_t r6c_material_responses_potential_result_response;
  10460.         // 1
  10461.         uint8_t r6c_material_responses_potential_result_flags;  //toff 1094 0x01    FIXED
  10462.         float r6c_material_responses_potential_result_skip_fraction_frac;
  10463.         float r6c_material_responses_potential_result_between_from_rad;
  10464.         float r6c_material_responses_potential_result_between_to_rad;
  10465.         float r6c_material_responses_potential_result_and_from;
  10466.         float r6c_material_responses_potential_result_and_to;
  10467.        
  10468.         // dependency r6c 2: potential result effect effe
  10469.         char r6c2_potential_result_effect_tagclass[5];       //unsigned char[5]
  10470.         uint32_t r6c2_potential_result_effect_tagnamepointer;   //uint32 ("random" number)
  10471.         uint32_t r6c2_potential_result_effect_tagnamestringlength;   //uint32
  10472.         uint32_t r6c2_potential_result_effect_tagid;         //uint32 (0xFFFFFFFF with tags)
  10473.         // char r6c2_potential_result_effect_tagnamestring[255];
  10474.        
  10475.         // 16
  10476.        
  10477.         uint16_t r6c_material_responses_misc_scale_effects_by;
  10478.         // 2
  10479.        
  10480.         float r6c_material_responses_misc_angular_noise_rad;
  10481.         float r6c_material_responses_misc_velocity_noise;
  10482.        
  10483.         // dependency r6c 3: misc detonation effect effe
  10484.         char r6c3_misc_detonation_effect_tagclass[5];        //unsigned char[5]
  10485.         uint32_t r6c3_misc_detonation_effect_tagnamepointer;   //uint32 ("random" number)
  10486.         uint32_t r6c3_misc_detonation_effect_tagnamestringlength;   //uint32
  10487.         uint32_t r6c3_misc_detonation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  10488.         // char r6c3_misc_detonation_effect_tagnamestring[255];
  10489.        
  10490.         // 24
  10491.        
  10492.         float r6c_material_responses_penetration_initial_friction;
  10493.         float r6c_material_responses_penetration_maximum_distance;
  10494.        
  10495.         float r6c_material_responses_reflection_parallel_friction;
  10496.         float r6c_material_responses_reflection_perpendicular_friction;
  10497.        
  10498.        
  10499.     }r6c_material_responses;
  10500.    
  10501.     // tagpathname strings for dependencies r6c 1-3 go here, as {r6c1 r6c2 r6c3}
  10502.    
  10503. } type_meta_proj;
  10504.  
  10505. #pragma mark -- rain
  10506.  
  10507. typedef struct {
  10508.     // 64, 36
  10509.    
  10510.     // representation 1 board, offset 100
  10511.     // r1b_particle_types_
  10512.     uint32_t r1b_particle_types_entrycount; // maximum of 8 cells
  10513.     uint32_t r1b_particle_types_random_id;
  10514.     uint32_t r1b_particle_types_sig_id; // example value = 0xBC119D00
  10515.    
  10516.     struct rain_r1c {
  10517.         // representation 1 cells
  10518.         // r1c_particle_types_
  10519.        
  10520.         char r1c_particle_types_name[32];
  10521.         uint32_t r1c_particle_types_flags;  //toff 144  0x00000007
  10522.         float r1c_particle_types_fade_in_start_distance;
  10523.         float r1c_particle_types_fade_in_end_distance;
  10524.         float r1c_particle_types_fade_out_start_distance;
  10525.         float r1c_particle_types_fade_out_end_distance;
  10526.         float r1c_particle_types_fade_in_start_height;
  10527.         float r1c_particle_types_fade_in_end_height;
  10528.         float r1c_particle_types_fade_out_start_height;
  10529.         float r1c_particle_types_fade_out_end_height;
  10530.         // 96
  10531.        
  10532.         float r1c_particle_types_particle_count_from;
  10533.         float r1c_particle_types_particle_count_to;
  10534.        
  10535.         // dependency r1c 1: physics pphy
  10536.         char r1c1_physics_tagclass[5];       //unsigned char[5]
  10537.         uint32_t r1c1_physics_tagnamepointer;   //uint32 ("random" number)
  10538.         uint32_t r1c1_physics_tagnamestringlength;   //uint32
  10539.         uint32_t r1c1_physics_tagid;         //uint32 (0xFFFFFFFF with tags)
  10540.         // char r1c1_physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10541.        
  10542.         // 16
  10543.        
  10544.         float r1c_particle_types_acceleration_magnitude_from;
  10545.         float r1c_particle_types_acceleration_magnitude_to;
  10546.         float r1c_particle_types_acceleration_turning_rate_frac;
  10547.         float r1c_particle_types_acceleration_change_rate;
  10548.        
  10549.         // 32
  10550.        
  10551.         float r1c_particle_types_particle_radius_from;
  10552.         float r1c_particle_types_particle_radius_to;
  10553.         float r1c_particle_types_animation_rate_from;
  10554.         float r1c_particle_types_animation_rate_to;
  10555.         float r1c_particle_types_rotation_rate_from_rad;
  10556.         float r1c_particle_types_rotation_rate_to_rad;
  10557.        
  10558.         // 32
  10559.        
  10560.         float r1c_particle_types_color_lower_bound_a_frac;
  10561.         float r1c_particle_types_color_lower_bound_r_frac;
  10562.         float r1c_particle_types_color_lower_bound_g_frac;
  10563.         float r1c_particle_types_color_lower_bound_b_frac;
  10564.        
  10565.         float r1c_particle_types_color_upper_bound_a_frac;
  10566.         float r1c_particle_types_color_upper_bound_r_frac;
  10567.         float r1c_particle_types_color_upper_bound_g_frac;
  10568.         float r1c_particle_types_color_upper_bound_b_frac;
  10569.        
  10570.         // 64
  10571.        
  10572.         // dependency r1c 2: shader sprite bitmap bitm
  10573.         char r1c2_shader_sprite_bitmap_tagclass[5];      //unsigned char[5]
  10574.         uint32_t r1c2_shader_sprite_bitmap_tagnamepointer;   //uint32 ("random" number)
  10575.         uint32_t r1c2_shader_sprite_bitmap_tagnamestringlength;   //uint32
  10576.         uint32_t r1c2_shader_sprite_bitmap_tagid;        //uint32 (0xFFFFFFFF with tags)
  10577.         // char r1c2_shader_sprite_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10578.        
  10579.         uint16_t r1c_particle_types_shader_render_mode;
  10580.         uint16_t r1c_particle_types_shader_render_direction_source;
  10581.         // 41
  10582.        
  10583.         uint8_t r1c_particle_types_shader_shader_flags; //toff 574  0x07
  10584.         uint16_t r1c_particle_types_shader_framebuffer_blend_function;
  10585.         uint16_t r1c_particle_types_shader_framebuffer_fade_mode;
  10586.         // 1
  10587.         uint8_t r1c_particle_types_shader_map_flags;    //toff 582  0x01
  10588.        
  10589.         // 28
  10590.        
  10591.         // dependency r1c 3: secondary map bitmap bitm
  10592.         char r1c3_secondary_map_bitmap_tagclass[5];      //unsigned char[5]
  10593.         uint32_t r1c3_secondary_map_bitmap_tagnamepointer;   //uint32 ("random" number)
  10594.         uint32_t r1c3_secondary_map_bitmap_tagnamestringlength;   //uint32
  10595.         uint32_t r1c3_secondary_map_bitmap_tagid;        //uint32 (0xFFFFFFFF with tags)
  10596.         // char r1c3_secondary_map_bitmap_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10597.        
  10598.         uint16_t r1c_particle_types_secondary_map_anchor;
  10599.         // 1
  10600.         uint8_t r1c_particle_types_secondary_map_flags; //toff 630  0x01
  10601.        
  10602.         uint16_t r1c_particle_types_secondary_map_u_animation_source;
  10603.         uint16_t r1c_particle_types_secondary_map_u_animation_function;
  10604.         float r1c_particle_types_secondary_map_u_animation_period;
  10605.         float r1c_particle_types_secondary_map_u_animation_phase;
  10606.         float r1c_particle_types_secondary_map_u_animation_scale;
  10607.        
  10608.         uint16_t r1c_particle_types_secondary_map_v_animation_source;
  10609.         uint16_t r1c_particle_types_secondary_map_v_animation_function;
  10610.         float r1c_particle_types_secondary_map_v_animation_period;
  10611.         float r1c_particle_types_secondary_map_v_animation_phase;
  10612.         float r1c_particle_types_secondary_map_v_animation_scale;
  10613.        
  10614.         uint16_t r1c_particle_types_secondary_map_rotation_animation_source;
  10615.         uint16_t r1c_particle_types_secondary_map_rotation_animation_function;
  10616.         float r1c_particle_types_secondary_map_rotation_animation_period;
  10617.         float r1c_particle_types_secondary_map_rotation_animation_phase;
  10618.         float r1c_particle_types_secondary_map_rotation_animation_scale;
  10619.         float r1c_particle_types_secondary_map_rotation_animation_center_x;
  10620.         float r1c_particle_types_secondary_map_rotation_animation_center_y;
  10621.         // 4
  10622.         float r1c_particle_types_secondary_map_zsprite_radius_scale;
  10623.         // 20
  10624.        
  10625.     }r1c_particle_types;
  10626.    
  10627.     // tagpathname strings for dependencies r1c 1-3 go here, as {r1c1 r1c2 r1c3}
  10628.    
  10629. } type_meta_rain;
  10630.  
  10631. #pragma mark -- sbsp
  10632.  
  10633. typedef struct {
  10634.     // dependency 1: lightmaps bitm
  10635.     char lightmaps_tagclass[5];      //unsigned char[5]
  10636.     uint32_t lightmaps_tagnamepointer;   //uint32 ("random" number)
  10637.     uint32_t lightmaps_tagnamestringlength;   //uint32
  10638.     uint32_t lightmaps_tagid;        //uint32 (0xFFFFFFFF with tags)
  10639.     // char lightmaps_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10640.    
  10641.     float vehicle_floor;
  10642.     float vehicle_ceiling;
  10643.     // 88, 16
  10644.     float default_ambient_color_a_frac;   // implied in the code, but not shown
  10645.     float default_ambient_color_r_frac;
  10646.     float default_ambient_color_g_frac;
  10647.     float default_ambient_color_b_frac;
  10648.     float default_distant_light_0_color_a_frac;   // implied in the code, but not shown
  10649.     float default_distant_light_0_color_r_frac;
  10650.     float default_distant_light_0_color_g_frac;
  10651.     float default_distant_light_0_color_b_frac;
  10652.     float default_distant_light_0_direction_i;
  10653.     float default_distant_light_0_direction_j;
  10654.     float default_distant_light_0_direction_k;
  10655.     float default_distant_light_1_color_r_frac;
  10656.     float default_distant_light_1_color_g_frac;
  10657.     float default_distant_light_1_color_b_frac;
  10658.     float default_distant_light_1_direction_i;
  10659.     float default_distant_light_1_direction_j;
  10660.     float default_distant_light_1_direction_k;
  10661.     // 172, 12
  10662.     float default_reflection_tint_a_frac;
  10663.     float default_reflection_tint_r_frac;
  10664.     float default_reflection_tint_g_frac;
  10665.     float default_reflection_tint_b_frac;
  10666.     float default_shadow_vector_i;
  10667.     float default_shadow_vector_j;
  10668.     float default_shadow_vector_k;
  10669.     float default_shadow_color_r_frac;
  10670.     float default_shadow_color_g_frac;
  10671.     float default_shadow_color_b_frac;
  10672.     // 224, 4
  10673.    
  10674.     // representation 1 board, offset 228
  10675.     // r1b_collision_materials_
  10676.     uint32_t r1b_collision_materials_entrycount; // maximum of 512 cells
  10677.     uint32_t r1b_collision_materials_random_id;
  10678.     uint32_t r1b_collision_materials_sig_id; // example value = 0xBCE59C00
  10679.    
  10680.     // representation 2 board, offset 240
  10681.     // r2b_collision_bsp_
  10682.     uint32_t r2b_collision_bsp_entrycount; // maximum of 1 cell
  10683.     uint32_t r2b_collision_bsp_random_id;
  10684.     uint32_t r2b_collision_bsp_sig_id; // example value = 0x6CE59C00
  10685.    
  10686.     // representation 3 board, offset 252
  10687.     // r3b_nodes_
  10688.     uint32_t r3b_nodes_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 131072)
  10689.     uint32_t r3b_nodes_random_id;
  10690.     uint32_t r3b_nodes_sig_id; // example value = 0xD0D89C00
  10691.    
  10692.     float world_bounds_x_from;
  10693.     float world_bounds_x_to;
  10694.     float world_bounds_y_from;
  10695.     float world_bounds_y_to;
  10696.     float world_bounds_z_from;
  10697.     float world_bounds_z_to;
  10698.    
  10699.     // representation 4 board, offset 288
  10700.     // r4b_leaves_
  10701.     uint32_t r4b_leaves_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  10702.     uint32_t r4b_leaves_random_id;
  10703.     uint32_t r4b_leaves_sig_id; // example value = 0xF0D99C00
  10704.    
  10705.     // representation 5 board, offset 300
  10706.     // r5b_leaf_surfaces_
  10707.     uint32_t r5b_leaf_surfaces_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 262144)
  10708.     uint32_t r5b_leaf_surfaces_random_id;
  10709.     uint32_t r5b_leaf_surfaces_sig_id; // example value = 0x7CD99C00
  10710.    
  10711.     // representation 6 board, offset 312
  10712.     // r6b_surfaces_
  10713.     uint32_t r6b_surfaces_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 131072)
  10714.     uint32_t r6b_surfaces_random_id;
  10715.     uint32_t r6b_surfaces_sig_id; // example value = 0x2CD99C00
  10716.    
  10717.     // representation 7 board, offset 324
  10718.     // r7b_lightmaps_
  10719.     uint32_t r7b_lightmaps_entrycount; // maximum of 128 cells
  10720.     uint32_t r7b_lightmaps_random_id;
  10721.     uint32_t r7b_lightmaps_sig_id; // example value = 0xF4DB9C00
  10722.    
  10723.     // 336, 12
  10724.    
  10725.     // representation 8 board, offset 348
  10726.     // r8b_lens_flares_
  10727.     uint32_t r8b_lens_flares_entrycount; // maximum of 256 cells
  10728.     uint32_t r8b_lens_flares_random_id;
  10729.     uint32_t r8b_lens_flares_sig_id; // example value = 0xCCE49C00
  10730.    
  10731.     // representation 9 board, offset 360
  10732.     // r9b_lens_flare_markers_
  10733.     uint32_t r9b_lens_flare_markers_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  10734.     uint32_t r9b_lens_flare_markers_random_id;
  10735.     uint32_t r9b_lens_flare_markers_sig_id; // example value = 0x40E59C00
  10736.    
  10737.     // representation 10 board, offset 372
  10738.     // r10b_clusters_
  10739.     uint32_t r10b_clusters_entrycount; // maximum of 8192 cells
  10740.     uint32_t r10b_clusters_random_id;
  10741.     uint32_t r10b_clusters_sig_id; // example value = 0x28E09C00
  10742.    
  10743.     // offset 384 in test data (MosesofEgypt's reclaimer: 65536)
  10744.     uint32_t cluster_data;
  10745.     // 388, 4
  10746.     // little endian internal board values:
  10747.     uint32_t INTERNAL_cluster_data_offset_pointer;   // example value in sbsp tutorial = 312290 (probably correct), 648 in sbsp blank
  10748.     uint32_t INTERNAL_cluster_data_random1;
  10749.     uint32_t INTERNAL_cluster_data_sig_id;   // example value = 0xA8D89C00
  10750.    
  10751.     // representation 11 board, offset 404
  10752.     // r11b_cluster_portals_
  10753.     uint32_t r11b_cluster_portals_entrycount; // maximum of 512 cells
  10754.     uint32_t r11b_cluster_portals_random_id;
  10755.     uint32_t r11b_cluster_portals_sig_id; // example value = 0x54E19C00
  10756.    
  10757.     // 416, 12
  10758.    
  10759.     // representation 12 board, offset 428
  10760.     // r12b_breakable_surfaces_
  10761.     uint32_t r12b_breakable_surfaces_entrycount; // maximum of 256 cells
  10762.     uint32_t r12b_breakable_surfaces_random_id;
  10763.     uint32_t r12b_breakable_surfaces_sig_id; // example value = 0x88E49C00
  10764.    
  10765.     // representation 13 board, offset 440
  10766.     // r13b_fog_planes_
  10767.     uint32_t r13b_fog_planes_entrycount; // maximum of 32 cells
  10768.     uint32_t r13b_fog_planes_random_id;
  10769.     uint32_t r13b_fog_planes_sig_id; // example value = 0x8CE39C00
  10770.    
  10771.     // representation 14 board, offset 452
  10772.     // r14b_fog_regions_
  10773.     uint32_t r14b_fog_regions_entrycount; // maximum of 32 cells
  10774.     uint32_t r14b_fog_regions_random_id;
  10775.     uint32_t r14b_fog_regions_sig_id; // example value = 0x24E39C00
  10776.    
  10777.     // representation 15 board, offset 464
  10778.     // r15b_fog_palette_
  10779.     uint32_t r15b_fog_palette_entrycount; // maximum of 32 cells
  10780.     uint32_t r15b_fog_palette_random_id;
  10781.     uint32_t r15b_fog_palette_sig_id; // example value = 0xC8E29C00
  10782.    
  10783.     // 476, 24
  10784.    
  10785.     // representation 16 board, offset 500
  10786.     // r16b_weather_palette_
  10787.     uint32_t r16b_weather_palette_entrycount; // maximum of 32 cells
  10788.     uint32_t r16b_weather_palette_random_id;
  10789.     uint32_t r16b_weather_palette_sig_id; // example value = 0x48DE9C00
  10790.    
  10791.     // representation 17 board, offset 512
  10792.     // r17b_weather_polyhedra_
  10793.     uint32_t r17b_weather_polyhedra_entrycount; // maximum of 32 cells
  10794.     uint32_t r17b_weather_polyhedra_random_id;
  10795.     uint32_t r17b_weather_polyhedra_sig_id; // example value = 0x00E29C00
  10796.    
  10797.     // 524, 24
  10798.    
  10799.     // representation 18 board, offset 548
  10800.     // r18b_pathfinding_surfaces_
  10801.     uint32_t r18b_pathfinding_surfaces_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 131072)
  10802.     uint32_t r18b_pathfinding_surfaces_random_id;
  10803.     uint32_t r18b_pathfinding_surfaces_sig_id; // example value = 0xD0E39C00
  10804.    
  10805.     // representation 19 board, offset 560
  10806.     // r19b_pathfinding_edges_
  10807.     uint32_t r19b_pathfinding_edges_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 262144)
  10808.     uint32_t r19b_pathfinding_edges_random_id;
  10809.     uint32_t r19b_pathfinding_edges_sig_id; // example value = 0x14E49C00
  10810.    
  10811.     // representation 20 board, offset 572
  10812.     // r20b_background_sound_palette_
  10813.     uint32_t r20b_background_sound_palette_entrycount; // maximum of 64 cells
  10814.     uint32_t r20b_background_sound_palette_random_id;
  10815.     uint32_t r20b_background_sound_palette_sig_id; // example value = 0x18DD9C00
  10816.    
  10817.     // representation 21 board, offset 584
  10818.     // r21b_sound_environment_palette_
  10819.     uint32_t r21b_sound_environment_palette_entrycount; // maximum of 64 cells
  10820.     uint32_t r21b_sound_environment_palette_random_id;
  10821.     uint32_t r21b_sound_environment_palette_sig_id; // example value = 0x74DD9C00
  10822.    
  10823.     // offset 596 in test data (MosesofEgypt's reclaimer: 131072)
  10824.     uint32_t sound_PAS_data;
  10825.     // 600, 4
  10826.     // little endian internal board values:
  10827.     uint32_t INTERNAL_sound_PAS_data_offset_pointer;   // example value in sbsp tutorial = 320366 (probably correct), 648 in sbsp blank
  10828.     uint32_t INTERNAL_sound_PAS_data_random1;
  10829.     uint32_t INTERNAL_sound_PAS_data_sig_id;   // example value = 0xE8E59C00
  10830.    
  10831.     // 616, 24
  10832.    
  10833.     // representation 22 board, offset 640
  10834.     // r22b_markers_
  10835.     uint32_t r22b_markers_entrycount; // maximum of 1024 cells
  10836.     uint32_t r22b_markers_random_id;
  10837.     uint32_t r22b_markers_sig_id; // example value = 0x28E69C00
  10838.    
  10839.     // representation 23 board, offset 652
  10840.     // r23b_detail_objects_
  10841.     uint32_t r23b_detail_objects_entrycount; // maximum of 1 cell
  10842.     uint32_t r23b_detail_objects_random_id;
  10843.     uint32_t r23b_detail_objects_sig_id; // example value = 0xA0E69C00
  10844.    
  10845.     // representation 24 board, offset 664
  10846.     // r24b_runtime_decals_
  10847.     uint32_t r24b_runtime_decals_entrycount; // maximum of 6144 cells
  10848.     uint32_t r24b_runtime_decals_random_id;
  10849.     uint32_t r24b_runtime_decals_sig_id; // example value = 0xE4E69C00
  10850.    
  10851.     // 676, 12
  10852.    
  10853.     // representation 25 board, offset 688
  10854.     // r25b_leaf_map_leaves_
  10855.     uint32_t r25b_leaf_map_leaves_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 256)
  10856.     uint32_t r25b_leaf_map_leaves_random_id;
  10857.     uint32_t r25b_leaf_map_leaves_sig_id; // example value = 0x484CA100
  10858.    
  10859.     // representation 26 board, offset 700
  10860.     // r26b_leaf_map_portals_
  10861.     uint32_t r26b_leaf_map_portals_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 524288)
  10862.     uint32_t r26b_leaf_map_portals_random_id;
  10863.     uint32_t r26b_leaf_map_portals_sig_id; // example value = 0xF44CA100
  10864.    
  10865.     // dependency 1 tagpathname string goes here
  10866.    
  10867.     struct sbsp_r1c {
  10868.         // representation 1 cells
  10869.         // r1c_collision_materials_
  10870.        
  10871.         // dependency r1c 1: shader shdr senv soso schi scex sotr sgla smet spla swat
  10872.         char r1c1_shader_tagclass[5];        //unsigned char[5]
  10873.         uint32_t r1c1_shader_tagnamepointer;   //uint32 ("random" number)
  10874.         uint32_t r1c1_shader_tagnamestringlength;   //uint32
  10875.         uint32_t r1c1_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  10876.         // char r1c1_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  10877.        
  10878.         // 4   (verified skipped)
  10879.     }r1c_collision_materials;
  10880.    
  10881.     // tagpathname strings for dependency r1c 1 go here
  10882.    
  10883.     struct sbsp_r2c {
  10884.         // representation 2 cells
  10885.         // r2c_collision_bsp_
  10886.        
  10887.         // representation 2 sub-board A
  10888.         // r2sbA_bsp3d_nodes_
  10889.         uint32_t r2sbA_bsp3d_nodes_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 131072)
  10890.         uint32_t r2sbA_bsp3d_nodes_random_id;
  10891.         uint32_t r2sbA_bsp3d_nodes_sig_id; // example value = 0x504DA100
  10892.        
  10893.         // representation 2 sub-board B
  10894.         // r2sbB_planes_
  10895.         uint32_t r2sbB_planes_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  10896.         uint32_t r2sbB_planes_random_id;
  10897.         uint32_t r2sbB_planes_sig_id; // example value = 0x944DA100
  10898.        
  10899.         // representation 2 sub-board C
  10900.         // r2sbC_leaves_
  10901.         uint32_t r2sbC_leaves_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  10902.         uint32_t r2sbC_leaves_random_id;
  10903.         uint32_t r2sbC_planes_sig_id; // example value = 0xFC4DA100
  10904.        
  10905.         // representation 2 sub-board D
  10906.         // r2sbD_bsp2d_references_
  10907.         uint32_t r2sbD_bsp2d_references_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 131072)
  10908.         uint32_t r2sbD_bsp2d_references_random_id;
  10909.         uint32_t r2sbD_bsp2d_references_sig_id; // example value = 0xA84EA100
  10910.        
  10911.         // representation 2 sub-board E
  10912.         // r2sbE_bsp2d_nodes_
  10913.         uint32_t r2sbE_bsp2d_nodes_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  10914.         uint32_t r2sbE_bsp2d_nodes_random_id;
  10915.         uint32_t r2sbE_bsp2d_nodes_sig_id; // example value = 0x584EA100
  10916.        
  10917.         // representation 2 sub-board F
  10918.         // r2sbF_surfaces_
  10919.         uint32_t r2sbF_surfaces_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 131072)
  10920.         uint32_t r2sbF_surfaces_random_id;
  10921.         uint32_t r2sbF_surfaces_sig_id; // example value = 0x384FA100
  10922.        
  10923.         // representation 2 sub-board G
  10924.         // r2sbG_edges_
  10925.         uint32_t r2sbG_edges_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 262144)
  10926.         uint32_t r2sbG_edges_random_id;
  10927.         uint32_t r2sbG_edges_sig_id; // example value = 0xBC4FA100
  10928.        
  10929.         // representation 2 sub-board H
  10930.         // r2sbH_vertices_
  10931.         uint32_t r2sbH_vertices_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 131072)
  10932.         uint32_t r2sbH_vertices_random_id;
  10933.         uint32_t r2sbH_vertices_sig_id; // example value = 0x0C50A100
  10934.        
  10935.     }r2c_collision_bsp;
  10936.    
  10937.     // here now we have a continuation of the "revised" approach to embedded cells
  10938.    
  10939.     struct sbsp_r2sc {
  10940.         // representation 2 sub-cells grouping container,
  10941.         // indicated by the presence of sub-cells A-H grouped by cell rather than layed all out together for all the cells at once
  10942.        
  10943.         struct sbsp_r2scA {
  10944.             // representation 2 sub-cells A
  10945.             // r2scA_bsp3d_nodes_
  10946.            
  10947.             uint32_t r2scA_bsp3d_nodes_plane;   // considered signed
  10948.             uint32_t r2scA_bsp3d_nodes_back_child;   // considered signed
  10949.             uint32_t r2scA_bsp3d_nodes_front_child;   // considered signed
  10950.            
  10951.         }r2scA_collision_bsp_bsp3d_nodes;
  10952.        
  10953.         struct sbsp_r2scB {
  10954.             // representation 2 sub-cells B
  10955.             // r2scB_planes_
  10956.            
  10957.             float r2scB_planes_plane_i_calc_frac;   // apparently fractional, or approximately double the radians conversion of stored value
  10958.             float r2scB_planes_plane_j_calc_frac;   // same
  10959.             float r2scB_planes_plane_k_calc_frac;   // same
  10960.             float r2scB_planes_plane_d;   // (displayed normally, as stored)
  10961.            
  10962.         }r2scB_collision_bsp_planes;
  10963.        
  10964.         struct sbsp_r2scC {
  10965.             // representation 2 sub-cells C
  10966.             // r2scC_leaves_
  10967.            
  10968.             // 1
  10969.             uint8_t r2scC_leaves_flags; //toff 808  0x01
  10970.             uint16_t r2scC_leaves_bsp2d_reference_count;
  10971.             uint32_t r2scC_leaves_first_bsp2d_reference;   // considered signed
  10972.            
  10973.         }r2scC_collision_bsp_leaves;
  10974.        
  10975.         struct sbsp_r2scD {
  10976.             // representation 2 sub-cells D
  10977.             // r2scD_bsp2d_references_
  10978.            
  10979.             uint32_t r2scD_bsp2d_references_plane;   // considered signed
  10980.             uint32_t r2scD_bsp2d_references_bsp2d_node;   // considered signed
  10981.            
  10982.         }r2scD_collision_bsp_bsp2d_references;
  10983.        
  10984.         struct sbsp_r2scE {
  10985.             // representation 2 sub-cells E
  10986.             // r2scE_bsp2d_nodes_
  10987.            
  10988.             float r2scE_bsp2d_nodes_plane_i_calc_frac;   // same as r2scB comment
  10989.             float r2scE_bsp2d_nodes_plane_j_calc_frac;   // same
  10990.             float r2scE_bsp2d_nodes_plane_d;
  10991.             uint32_t r2scE_bsp2d_nodes_left_child;   // considered signed
  10992.             uint32_t r2scE_bsp2d_nodes_right_child;   // considered signed
  10993.            
  10994.         }r2scE_collision_bsp_bsp2d_nodes;
  10995.        
  10996.         struct sbsp_r2scF {
  10997.             // representation 2 sub-cells F
  10998.             // r2scF_surfaces_
  10999.            
  11000.             uint32_t r2scF_surfaces_plane;   // considered signed
  11001.             uint32_t r2scF_surfaces_first_edge;   // considered signed
  11002.             uint8_t r2scF_surfaces_flags;   //toff 824 (untested)   0x0F
  11003.             uint8_t r2scF_surfaces_breakable_surface;   // interpret as signed
  11004.             uint16_t r2scF_surfaces_material;
  11005.            
  11006.         }r2scF_collision_bsp_surfaces;
  11007.        
  11008.         struct sbsp_r2scG {
  11009.             // representation 2 sub-cells G
  11010.             // r2scG_edges_
  11011.            
  11012.             uint32_t r2scG_edges_start_vertex;   // these are considered signed
  11013.             uint32_t r2scG_edges_end_vertex;
  11014.             uint32_t r2scG_edges_forward_edge;
  11015.             uint32_t r2scG_edges_reverse_edge;
  11016.             uint32_t r2scG_edges_left_surface;
  11017.             uint32_t r2scG_edges_right_surface;
  11018.            
  11019.         }r2scG_collision_bsp_edges;
  11020.        
  11021.         struct sbsp_r2scH {
  11022.             // representation 2 sub-cells H
  11023.             // r2scH_vertices_
  11024.            
  11025.             float r2scH_vertices_point_x;
  11026.             float r2scH_vertices_point_y;
  11027.             float r2scH_vertices_point_z;
  11028.             uint32_t r2scH_vertices_first_edge;   // considered signed
  11029.            
  11030.         }r2scH_collision_bsp_vertices;
  11031.        
  11032.     }r2sc_container;
  11033.    
  11034.     // NODES test data notes:
  11035.     // test data offset 1301 (each node is 6 bytes) in empty, and 114926 in tutorial (1037 cells, so 6222 bytes total) -- leaves starts at 121154 in tutorial
  11036.    
  11037.     // 8 bytes of 0 at the start of next cell
  11038.    
  11039.     // OK, so with nodes, and some of leaves, no information is shown in Guerilla.
  11040.     // Here is how it works:
  11041.    
  11042.     // These plain "nodes" are just like bsp3d nodes within the collision bsp tree.
  11043.     // I am guessing that they are 3 16-bit values indicating plane, back child and front child.
  11044.    
  11045.     // ... I've made some consultations and will update this section with more information about the nodes.
  11046.    
  11047.     struct sbsp_r3c {
  11048.         // representation 3 cells
  11049.         // r3c_nodes_
  11050.        
  11051.         // to be continued (see previous comments)
  11052.        
  11053.         // in the test data "sbsp tutorial" tag, this section is:
  11054.         // 6222 bytes at offset 114926 (1037 cells, each 6 bytes long)
  11055.     }r3c_nodes;
  11056.    
  11057.     // offset 121148 in "sbsp tutorial" tag
  11058.    
  11059.     struct sbsp_r4c {
  11060.         // representation 4 cells
  11061.         // r4c_leaves_
  11062.        
  11063.         // this contains 6 bytes of node-related data first, followed by:
  11064.        
  11065.         // 2
  11066.        
  11067.         uint16_t r4c_leaves_cluster;
  11068.         uint16_t r4c_leaves_surface_reference_count;
  11069.         uint32_t r4c_leaves_surface_references_sel;
  11070.        
  11071.     }r4c_leaves;
  11072.    
  11073.     // offset 1349 in "sbsp blank 1"
  11074.     // offset 129244 in "sbsp tutorial"
  11075.    
  11076.     struct sbsp_r5c {
  11077.         // representation 5 cells
  11078.         // r5c_leaf_surfaces_
  11079.        
  11080.         uint32_t r5c_leaf_surfaces_surface_sel;
  11081.         uint32_t r5c_leaf_surfaces_node_sel;
  11082.        
  11083.     }r5c_leaf_surfaces;
  11084.    
  11085.     // offset 1373 in "sbsp blank 1"
  11086.     // offset 141028 in "sbsp tutorial"
  11087.    
  11088.     struct sbsp_r6c {
  11089.         // representation 6 cells
  11090.         // r6c_surfaces_
  11091.        
  11092.         uint16_t r6c_surfaces_a1;
  11093.         uint16_t r6c_surfaces_a2;
  11094.         uint16_t r6c_surfaces_a3;
  11095.        
  11096.     }r6c_surfaces;
  11097.    
  11098.     // offset 1391 in "sbsp blank 1"
  11099.     // offset 146932 in "sbsp tutorial"
  11100.    
  11101.     struct sbsp_r7c {
  11102.         // representation 7 cells
  11103.         // r7c_lightmaps_
  11104.        
  11105.         uint16_t r7c_lightmaps_bitmap;
  11106.         // 18
  11107.        
  11108.         // representation 7 sub-board A
  11109.         // r7sbA_materials_
  11110.         uint32_t r7sbA_materials_entrycount; // maximum of 2048 cells
  11111.         uint32_t r7sbA_materials_random_id;
  11112.         uint32_t r7sbA_materials_sig_id; // example value = 0x8CDB9C00
  11113.        
  11114.     }r7c_lightmaps;
  11115.    
  11116.     struct sbsp_r7sc {
  11117.        
  11118.         struct sbsp_r7scA {
  11119.             // representation 7 sub-cells A
  11120.             // r7scA_materials_
  11121.             // size: 256 bytes (mentioned to avoid difficulty figuring it out later)
  11122.            
  11123.             // dependency r7scA 1: shader shdr senv soso schi scex sotr sgla smet spla swat
  11124.             char r7scA_shader_tagclass[5];       //unsigned char[5]
  11125.             uint32_t r7scA_shader_tagnamepointer;   //uint32 ("random" number)
  11126.             uint32_t r7scA_shader_tagnamestringlength;   //uint32
  11127.             uint32_t r7scA_shader_tagid;         //uint32 (0xFFFFFFFF with tags)
  11128.             // char r7scA_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11129.            
  11130.             uint16_t r7scA_materials_shader_permutation;
  11131.             // 1
  11132.             uint8_t r7scA_materials_flags;  //toff 878  0x03
  11133.             uint32_t r7scA_materials_surfaces_sel;
  11134.             // test offset 1511 in blank 1
  11135.             uint32_t r7scA_materials_surface_count;   // considered signed
  11136.             float r7scA_materials_centroid_x;
  11137.             float r7scA_materials_centroid_y;
  11138.             float r7scA_materials_centroid_z;
  11139.             float r7scA_materials_ambient_color_r_frac;
  11140.             float r7scA_materials_ambient_color_g_frac;
  11141.             float r7scA_materials_ambient_color_b_frac;
  11142.             uint16_t r7scA_materials_distant_light_count;
  11143.             // 2
  11144.             float r7scA_materials_distant_light_0_color_r_frac;
  11145.             float r7scA_materials_distant_light_0_color_g_frac;
  11146.             float r7scA_materials_distant_light_0_color_b_frac;
  11147.             float r7scA_materials_distant_light_0_direction_i;
  11148.             float r7scA_materials_distant_light_0_direction_j;
  11149.             float r7scA_materials_distant_light_0_direction_k;
  11150.             float r7scA_materials_distant_light_1_color_r_frac;
  11151.             float r7scA_materials_distant_light_1_color_g_frac;
  11152.             float r7scA_materials_distant_light_1_color_b_frac;
  11153.             float r7scA_materials_distant_light_1_direction_i;
  11154.             float r7scA_materials_distant_light_1_direction_j;
  11155.             float r7scA_materials_distant_light_1_direction_k;
  11156.             float r7scA_materials_reflection_tint_a_frac;
  11157.             float r7scA_materials_reflection_tint_r_frac;
  11158.             float r7scA_materials_reflection_tint_g_frac;
  11159.             float r7scA_materials_reflection_tint_b_frac;
  11160.             float r7scA_materials_shadow_vector_i;
  11161.             float r7scA_materials_shadow_vector_j;
  11162.             float r7scA_materials_shadow_vector_k;
  11163.             float r7scA_materials_shadow_color_r_frac;
  11164.             float r7scA_materials_shadow_color_g_frac;
  11165.             float r7scA_materials_shadow_color_b_frac;
  11166.             float r7scA_materials_plane_i_calc_frac;   // see r2scB comments
  11167.             float r7scA_materials_plane_j_calc_frac;   // same
  11168.             float r7scA_materials_plane_k_calc_frac;   // same
  11169.             float r7scA_materials_plane_d;
  11170.             uint16_t r7scA_materials_breakable_surface;
  11171.            
  11172.             // 6 (at 174 bytes into sub-cell)
  11173.             // offset 1667 of sbsp blank 1
  11174.             // offset 147336 of sbsp tutorial
  11175.            
  11176.             uint32_t r7scA_materials_count1;   // these are considered signed (as usual for Guerilla)
  11177.             uint32_t r7scA_materials_offset1;   // maybe interpret this as signed
  11178.             // unknown 12 bytes here, but they are internal little endian values
  11179.             // example 8 bytes from tutorial: 0x10 10 1F 15 40 42 DD 14
  11180.             // given no data, those values are 0
  11181.             // I'm going to presume they are int32_t for now... and only signed because
  11182.             // signed is the precedent for Guerilla.
  11183.             uint32_t r7scA_materials_INTERNAL_unknown_a1;   // example value = 354357264
  11184.             uint32_t r7scA_materials_INTERNAL_unknown_a2;   // example value = 350044736
  11185.             uint32_t r7scA_materials_INTERNAL_unknown_a3;   // example value = 2
  11186.            
  11187.             uint32_t r7scA_materials_count2;
  11188.             uint32_t r7scA_materials_offset2;   // maybe interpret as signed
  11189.             // same deal here, but just the first two values instead of 3
  11190.             uint32_t r7scA_materials_INTERNAL_unknown_b1;   // example value = 354401448
  11191.             uint32_t r7scA_materials_INTERNAL_unknown_b2;   // example value = 350044544
  11192.            
  11193.             uint32_t r7scA_materials_uncompressed_vertices;   // offset 147372 in tutorial (MosesofEgypt's reclaimer: 4864000)
  11194.             // 4
  11195.             // little endian internal board values:
  11196.             uint32_t r7scA_materials_INTERNAL_uncompressed_vertices_offset_pointer;   // example value = 147401
  11197.             uint32_t r7scA_materials_INTERNAL_uncompressed_vertices_random1;
  11198.             uint32_t r7scA_materials_INTERNAL_uncompressed_vertices_sig_id;   // example value = 0x88D89C00
  11199.            
  11200.             uint32_t r7scA_materials_compressed_vertices;   // offset 147392 in tutorial (MosesofEgypt's reclaimer: 2560000)
  11201.             // 4
  11202.             // little endian internal board values:
  11203.             uint32_t r7scA_materials_INTERNAL_compressed_vertices_offset_pointer;   // example value = 207365
  11204.             uint32_t r7scA_materials_INTERNAL_compressed_vertices_random1;
  11205.             uint32_t r7scA_materials_INTERNAL_compressed_vertices_sig_id;   // example value = 0x98D89C00
  11206.            
  11207.         }r7scA_lightmaps_materials;
  11208.        
  11209.         // this is actually more misgrouped data!
  11210.         // {
  11211.         // tagpathname string for this cell's dependency r7scA 1 sub-cell goes here
  11212.        
  11213.         // uncompressed vertices for cell go here (offset 147465 in tutorial)
  11214.         // they are all little endian float values
  11215.        
  11216.         // compressed vertices for cell go here (offset 207429 in tutorial)
  11217.         // they are all little endian float values also
  11218.         // }
  11219.        
  11220.     }r7sc_container;
  11221.    
  11222.     // offset 3854 in blank 1 (but this doesn't have any of the previous vertex data)
  11223.     // offset 304142 in tutorial (skips over lens flares, etc.)
  11224.    
  11225.     struct sbsp_r8c {
  11226.         // representation 8 cells
  11227.         // r8c_lens_flares_
  11228.        
  11229.         // dependency r8c 1: lens flare lens
  11230.         char r8c1_lens_flare_tagclass[5];        //unsigned char[5]
  11231.         uint32_t r8c1_lens_flare_tagnamepointer;   //uint32 ("random" number)
  11232.         uint32_t r8c1_lens_flare_tagnamestringlength;   //uint32
  11233.         uint32_t r8c1_lens_flare_tagid;      //uint32 (0xFFFFFFFF with tags)
  11234.         // char r8c1_lens_flare_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11235.        
  11236.     }r8c_lens_flares;
  11237.    
  11238.     // dependency r8c 1 tagpathname strings go here
  11239.    
  11240.     struct sbsp_r9c {
  11241.         // representation 9 cells
  11242.         // r9c_lens_flare_markers_
  11243.        
  11244.         float r9c_lens_flare_markers_position_x;
  11245.         float r9c_lens_flare_markers_position_y;
  11246.         float r9c_lens_flare_markers_position_z;
  11247.         uint8_t r9c_lens_flare_markers_direction_i_component;   // interpret these three as signed
  11248.         uint8_t r9c_lens_flare_markers_direction_j_component;
  11249.         uint8_t r9c_lens_flare_markers_direction_k_component;
  11250.         uint8_t r9c_lens_flare_markers_lens_flare_index;
  11251.        
  11252.     }r9c_lens_flare_markers;
  11253.    
  11254.     // note that if any test data henceforth is not available, then any internal values will probably be overlooked until I find a test tag that has those values
  11255.    
  11256.     struct sbsp_r10c {
  11257.         // representation 10 cells
  11258.         // r10c_clusters_
  11259.         // 104 bytes in size
  11260.         // offset 3983 in blank 1
  11261.         // offset 304142 in tutorial
  11262.        
  11263.         uint16_t r10c_clusters_sky;
  11264.         uint16_t r10c_clusters_fog;
  11265.        
  11266.         uint16_t r10c_clusters_background_sound_sel;
  11267.         uint16_t r10c_clusters_sound_environment_sel;
  11268.         uint16_t r10c_clusters_weather_sel;
  11269.         uint16_t r10c_clusters_transition_structure_bsp;
  11270.        
  11271.         // 28
  11272.        
  11273.         // representation 10 sub-board A
  11274.         // r10sbA_predicted_resources_
  11275.         uint32_t r10sbA_predicted_resources_entrycount; // maximum of 1024 cells
  11276.         uint32_t r10sbA_predicted_resources_random_id;
  11277.         uint32_t r10sbA_predicted_resources_sig_id; // example value = 0x105FA000
  11278.        
  11279.         // representation 10 sub-board B
  11280.         // r10sbB_subclusters_
  11281.         uint32_t r10sbB_subclusters_entrycount; // maximum of 4096 cells
  11282.         uint32_t r10sbB_subclusters_random_id;
  11283.         uint32_t r10sbB_subclusters_sig_id; // example value = 0xF4DE9C00
  11284.        
  11285.         uint16_t r10c_clusters_first_lens_flare_marker_index;
  11286.         uint16_t r10c_clusters_lens_flare_marker_count;
  11287.        
  11288.         // representation 10 sub-board C
  11289.         // r10sbC_surface_indices_
  11290.         uint32_t r10sbC_surface_indices_entrycount; // maximum of 32768 cells
  11291.         uint32_t r10sbC_surface_indices_random_id;
  11292.         uint32_t r10sbC_surface_indices_sig_id; // example value = 0x38DF9C00
  11293.        
  11294.         // representation 10 sub-board D
  11295.         // r10sbD_mirrors_
  11296.         uint32_t r10sbD_mirrors_entrycount; // maximum of 16 cells
  11297.         uint32_t r10sbD_mirrors_random_id;
  11298.         uint32_t r10sbD_mirrors_sig_id; // example value = 0xA0DC9C00
  11299.        
  11300.         // representation 10 sub-board E
  11301.         // r10sbE_portals_
  11302.         uint32_t r10sbE_portals_entrycount; // maximum of 128 cells
  11303.         uint32_t r10sbE_portals_random_id;
  11304.         uint32_t r10sbE_portals_sig_id; // example value = 0x6CE09C00
  11305.        
  11306.     }r10c_clusters;
  11307.    
  11308.     struct sbsp_r10sc {
  11309.         // representation 10 sub-cells container group per cell
  11310.         // 507 bytes in test data blank
  11311.        
  11312.         struct sbsp_r10scA {
  11313.             // representation 10 sub-cells A
  11314.             // r10scA_predicted_resources_
  11315.             // test offset 4295 in blank 1
  11316.            
  11317.             uint16_t r10scA_predicted_resources_type;
  11318.             uint16_t r10scA_predicted_resources_resource_index;
  11319.             uint32_t r10scA_predicted_resources_tag_index;   // I'm thinking that Guerilla does not ever use unsigned values. (interpreted as signed)
  11320.            
  11321.         }r10scA_clusters_predicted_resources;
  11322.        
  11323.         struct sbsp_r10scB {
  11324.             // representation 10 sub-cells B
  11325.             // r10scB_subclusters_
  11326.            
  11327.             float r10scB_subclusters_world_bounds_x_from;
  11328.             float r10scB_subclusters_world_bounds_x_to;
  11329.             float r10scB_subclusters_world_bounds_y_from;
  11330.             float r10scB_subclusters_world_bounds_y_to;
  11331.             float r10scB_subclusters_world_bounds_z_from;
  11332.             float r10scB_subclusters_world_bounds_z_to;
  11333.            
  11334.             // representation 10 sub-cells B sub-board a
  11335.             // r10scBsba_surface_indices_
  11336.             uint32_t r10scBsba_surface_indices_entrycount; // maximum of 128 cells
  11337.             uint32_t r10scBsba_surface_indices_random_id;
  11338.             uint32_t r10scBsba_surface_indices_sig_id; // example value = 0x8CDE9C00
  11339.            
  11340.         }r10scB_clusters_subclusters;
  11341.         // test data blank offset 4427
  11342.        
  11343.         struct sbsp_r10scBsca {   // all for current cell
  11344.             // representation 10 sub-cells B sub-cells a
  11345.             // r10scBsca_surface_indices_
  11346.            
  11347.             uint32_t r10scBsca_surface_indices_index;   // considered signed (which is typical for the HEK/BLAM, but henceforth, I am only setting to signed if logical)
  11348.            
  11349.         }r10scBsca_clusters_subclusters_surface_indices;
  11350.        
  11351.         struct sbsp_r10scC {
  11352.             // representation 10 sub-cells C
  11353.             // r10scC_surface_indices_
  11354.            
  11355.             // test data blank offset 4463
  11356.            
  11357.             uint32_t r10scC_surface_indices_index;
  11358.            
  11359.         }r10scC_clusters_surface_indices;
  11360.        
  11361.         struct sbsp_r10scD {
  11362.             // representation 10 sub-cells D
  11363.             // r10scD_mirrors_
  11364.            
  11365.             float r10scD_mirrors_plane_i_calc_frac;   // see my previous planar messages
  11366.             float r10scD_mirrors_plane_j_calc_frac;
  11367.             float r10scD_mirrors_plane_k_calc_frac;
  11368.             float r10scD_mirrors_plane_d;
  11369.            
  11370.             // 20
  11371.            
  11372.             // dependency r10scD 1: shader shdr senv soso schi scex sotr sgla smet spla swat
  11373.             char r10scD1_shader_tagclass[5];         //unsigned char[5]
  11374.             uint32_t r10scD1_shader_tagnamepointer;   //uint32 ("random" number)
  11375.             uint32_t r10scD1_shader_tagnamestringlength;   //uint32
  11376.             uint32_t r10scD1_shader_tagid;       //uint32 (0xFFFFFFFF with tags)
  11377.             // char r10scD1_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11378.            
  11379.             // representation 10 sub-cells D sub-board a
  11380.             // r10scDsba_vertices_
  11381.             uint32_t r10scDsba_vertices_entrycount; // maximum of 512 cells
  11382.             uint32_t r10scDsba_vertices_random_id;
  11383.             uint32_t r10scDsba_vertices_sig_id; // example value = 0x38DC9C00
  11384.            
  11385.         }r10scD_clusters_mirrors;
  11386.        
  11387.         // more misgrouped data with the tagpathname strings
  11388.         // test data blank offset 4667
  11389.        
  11390.         struct sbsp_r10scDsc {   // all for current cell
  11391.             // sub-cells for representation 10 sub-cells D
  11392.            
  11393.             // tagpathname string for current sub-cell's r10scD 1 goes here
  11394.            
  11395.             struct sbsp_r10scDsca {   // all for current sub-cell
  11396.                 // representation 10 sub-cells D sub-cells a
  11397.                 // r10scDsca_vertices_
  11398.                 float r10scDsca_vertices_point_x;
  11399.                 float r10scDsca_vertices_point_y;
  11400.                 float r10scDsca_vertices_point_z;
  11401.                
  11402.             }r10scDsca_clusters_mirrors_vertices;
  11403.            
  11404.         }r10scDsc_container;   // no more "mgd" or "misgrouped data" nomenclature
  11405.        
  11406.         struct sbsp_r10scE {
  11407.             // representation 10 sub-cells E
  11408.             // r10scE_portals_
  11409.            
  11410.             uint16_t r10scE_portals_portal;
  11411.            
  11412.         }r10scE_clusters_portals;
  11413.        
  11414.     }r10sc_container;
  11415.    
  11416.     // cluster data goes here
  11417.     // (offset 312354 in test data tutorial)
  11418.    
  11419.     // offset 5816 in test data blank
  11420.     // offset 312462 in test data tutorial
  11421.     struct sbsp_r11c {
  11422.         // representation 11 cells
  11423.         // r11c_cluster_portals_
  11424.         // 64 bytes in size
  11425.        
  11426.         uint16_t r11c_cluster_portals_front_cluster;
  11427.         uint16_t r11c_cluster_portals_back_cluster;
  11428.         uint32_t r11c_cluster_portals_plane_index;
  11429.         float r11c_cluster_portals_centroid_x;
  11430.         float r11c_cluster_portals_centroid_y;
  11431.         float r11c_cluster_portals_centroid_z;
  11432.         float r11c_cluster_portals_bounding_radius;
  11433.         uint32_t r11c_cluster_portals_flags;    //toff 1140 0x00000001
  11434.        
  11435.         // 24
  11436.        
  11437.         // representation 11 sub-board A
  11438.         // r11sbA_vertices_
  11439.         uint32_t r11sbA_vertices_entrycount; // maximum of 128 cells
  11440.         uint32_t r11sbA_vertices_random_id;
  11441.         uint32_t r11sbA_vertices_sig_id; // example value = 0xB0E09C00
  11442.        
  11443.     }r11c_cluster_portals;
  11444.    
  11445.     // offset 315278 in test data tutorial
  11446.     // offset 6008 in test data blank
  11447.    
  11448.     struct sbsp_r11scA {
  11449.         // representation 11 sub-cells A
  11450.         // r11scA_vertices_
  11451.        
  11452.         float r11scA_vertices_point_x;
  11453.         float r11scA_vertices_point_y;
  11454.         float r11scA_vertices_point_z;
  11455.        
  11456.     }r11scA_cluster_portals_vertices;
  11457.    
  11458.     // offset 6116 in test data blank
  11459.     // offset 318770 in test data tutorial (skips to weather palette)
  11460.    
  11461.     struct sbsp_r12c {
  11462.         // representation 12 cells
  11463.         // r12c_breakable_surfaces_
  11464.        
  11465.         float r12c_breakable_surfaces_centroid_x;
  11466.         float r12c_breakable_surfaces_centroid_y;
  11467.         float r12c_breakable_surfaces_centroid_z;
  11468.         float r12c_breakable_surfaces_radius;
  11469.         uint32_t r12c_breakable_surfaces_collision_surface_index;
  11470.         // 28
  11471.        
  11472.     }r12c_breakable_surfaces;
  11473.    
  11474.     struct sbsp_r13c {
  11475.         // representation 13 cells
  11476.         // r13c_fog_planes_
  11477.        
  11478.         uint16_t r13c_fog_planes_front_region_sel;
  11479.         // 2
  11480.        
  11481.         float r13c_fog_planes_plane_i_calc_frac;   // planes again!
  11482.         float r13c_fog_planes_plane_j_calc_frac;   // calculated until fractional
  11483.         float r13c_fog_planes_plane_k_calc_frac;   // but I don't know how
  11484.        
  11485.         // representation 13 sub-board A
  11486.         // r13sbA_vertices_
  11487.         uint32_t r13sbA_vertices_entrycount; // maximum of 4096 cells
  11488.         uint32_t r13sbA_vertices_random_id;
  11489.         uint32_t r13sbA_vertices_sig_id; // example value = 0x44E29C00   (different than other "vertices" boards, so apparently, not all "vertices" boards and cells are the same)
  11490.        
  11491.     }r13c_fog_planes;
  11492.    
  11493.     struct sbsp_r13scA {
  11494.         // representation 13 sub-cells A
  11495.         // r13scA_vertices_
  11496.        
  11497.         float r13scA_vertices_point_x;
  11498.         float r13scA_vertices_point_y;
  11499.         float r13scA_vertices_point_z;
  11500.        
  11501.     }r13scA_fog_planes_vertices;
  11502.    
  11503.     // offset 6464 in test data blank
  11504.    
  11505.     struct sbsp_r14c {
  11506.         // representation 14 cells
  11507.         // r14c_fog_regions_
  11508.        
  11509.         // 36
  11510.        
  11511.         uint16_t r14c_fog_regions_fog_palette_sel;
  11512.         uint16_t r14c_fog_regions_weather_palette_sel;
  11513.        
  11514.     }r14c_fog_regions;
  11515.    
  11516.     struct sbsp_r15c {
  11517.         // representation 15 cells
  11518.         // r15c_fog_palette_
  11519.        
  11520.         char r15c_fog_palette_name[32];
  11521.        
  11522.         // dependency r15c 1: fog fog
  11523.         char r15c1_fog_tagclass[5];      //unsigned char[5]
  11524.         uint32_t r15c1_fog_tagnamepointer;   //uint32 ("random" number)
  11525.         uint32_t r15c1_fog_tagnamestringlength;   //uint32
  11526.         uint32_t r15c1_fog_tagid;        //uint32 (0xFFFFFFFF with tags)
  11527.         // char r15c1_fog_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11528.        
  11529.         // 4
  11530.        
  11531.         char r15c_fog_palette_fog_scale_function[32];
  11532.        
  11533.         // 52
  11534.        
  11535.     }r15c_fog_palette;
  11536.    
  11537.     // dependency r15c 1 tagpathname strings go here
  11538.    
  11539.     // test data blank offset 7004
  11540.     // test data tutorial offset 318770
  11541.    
  11542.     struct sbsp_r16c {
  11543.         // representation 16 cells
  11544.         // r16c_weather_palette_
  11545.         // 240 bytes total
  11546.        
  11547.         char r16c_weather_palette_name[32];
  11548.        
  11549.         // dependency r16c 1: particle system rain
  11550.         char r16c1_particle_system_tagclass[5];      //unsigned char[5]
  11551.         uint32_t r16c1_particle_system_tagnamepointer;   //uint32 ("random" number)
  11552.         uint32_t r16c1_particle_system_tagnamestringlength;   //uint32
  11553.         uint32_t r16c1_particle_system_tagid;        //uint32 (0xFFFFFFFF with tags)
  11554.         // char r16c1_particle_system_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11555.        
  11556.         // 4
  11557.        
  11558.         char r16c_weather_palette_particle_system_scale_function[32];
  11559.        
  11560.         // 44
  11561.        
  11562.         // dependency r16c 2: wind wind
  11563.         char r16c2_wind_tagclass[5];         //unsigned char[5]
  11564.         uint32_t r16c2_wind_tagnamepointer;   //uint32 ("random" number)
  11565.         uint32_t r16c2_wind_tagnamestringlength;   //uint32
  11566.         uint32_t r16c2_wind_tagid;       //uint32 (0xFFFFFFFF with tags)
  11567.         // char r16c2_wind_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11568.        
  11569.         float r16c_weather_palette_wind_direction_i;
  11570.         float r16c_weather_palette_wind_direction_j;
  11571.         float r16c_weather_palette_wind_direction_k;
  11572.         float r16c_weather_palette_wind_magnitude;
  11573.        
  11574.         // 4
  11575.        
  11576.         char r16c_weather_palette_wind_scale_function[32];
  11577.        
  11578.         // 44
  11579.        
  11580.     }r16c_weather_palette;
  11581.    
  11582.     // tagpathname strings: {r16c1 r16c2}
  11583.    
  11584.     // test data tutorial offset 319043 (skips to pathfinding surfaces)
  11585.     // test data blank offset 7787
  11586.    
  11587.     struct sbsp_r17c {
  11588.         // representation 17 cells
  11589.         // r17c_weather_polyhedra_
  11590.        
  11591.         float r17c_weather_polyhedra_bounding_sphere_center_x;
  11592.         float r17c_weather_polyhedra_bounding_sphere_center_y;
  11593.         float r17c_weather_polyhedra_bounding_sphere_center_z;
  11594.         float r17c_weather_polyhedra_bounding_sphere_radius;
  11595.        
  11596.         // 4
  11597.        
  11598.         // representation 17 sub-board A
  11599.         // r17sbA_planes_
  11600.         uint32_t r17sbA_planes_entrycount; // maximum of 16 cells
  11601.         uint32_t r17sbA_planes_random_id;
  11602.         uint32_t r17sbA_planes_sig_id; // example value = 0x98E19C00
  11603.        
  11604.        
  11605.     }r17c_weather_polyhedra;
  11606.    
  11607.     struct sbsp_r17scA {
  11608.         // representation 17 sub-cells A
  11609.         // r17scA_planes_
  11610.        
  11611.         float r17scA_planes_plane_i_calc_frac;   // yep, this stuff again
  11612.         float r17scA_planes_plane_j_calc_frac;
  11613.         float r17scA_planes_plane_k_calc_frac;
  11614.         float r17scA_planes_plane_d;
  11615.        
  11616.     }r17scA_weather_polyhedra_planes;
  11617.    
  11618.     // test data blank offset 8027
  11619.    
  11620.     struct sbsp_r18c {
  11621.         // representation 18 cells
  11622.         // r18c_pathfinding_surfaces_
  11623.        
  11624.         uint8_t r18c_pathfinding_surfaces_data;   // considered signed (int8_t)
  11625.        
  11626.     }r18c_pathfinding_surfaces;
  11627.    
  11628.     struct sbsp_r19c {
  11629.         // representation 19 cells
  11630.         // r19c_pathfinding_edges_
  11631.        
  11632.         uint8_t r19c_pathfinding_edges_midpoint;   // considered signed (int8_t)
  11633.        
  11634.     }r19c_pathfinding_edges;
  11635.    
  11636.     // test data tutorial offset 320050
  11637.     // test data blank offset 8033
  11638.    
  11639.     struct sbsp_r20c {
  11640.         // representation 20 cells
  11641.         // r20c_background_sound_palette_
  11642.        
  11643.         char r20c_background_sound_palette_name[32];
  11644.        
  11645.         // dependency r20c 1: background sound lsnd
  11646.         char r20c1_background_sound_tagclass[5];         //unsigned char[5]
  11647.         uint32_t r16c2_wind_tagnamepointer;   //uint32 ("random" number)
  11648.         uint32_t r16c2_wind_tagnamestringlength;   //uint32
  11649.         uint32_t r16c2_wind_tagid;       //uint32 (0xFFFFFFFF with tags)
  11650.         // char r16c2_wind_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11651.        
  11652.         // 4
  11653.        
  11654.         char r20c_background_sound_palette_scale_function[32];
  11655.        
  11656.         // 32
  11657.        
  11658.     }r20c_background_sound_palette;
  11659.    
  11660.     // tagpathname strings: {r20c1}
  11661.    
  11662.     struct sbsp_r21c {
  11663.         // representation 21 cells
  11664.         // r21c_sound_environment_palette_
  11665.        
  11666.         char r21c_sound_environment_palette_name[32];
  11667.        
  11668.         // dependency r21c 1: sound environment snde
  11669.         char r21c1_sound_environment_tagclass[5];        //unsigned char[5]
  11670.         uint32_t r21c1_sound_environment_tagnamepointer;   //uint32 ("random" number)
  11671.         uint32_t r21c1_sound_environment_tagnamestringlength;   //uint32
  11672.         uint32_t r21c1_sound_environment_tagid;      //uint32 (0xFFFFFFFF with tags)
  11673.         // char r21c1_sound_environment_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11674.        
  11675.         // 32
  11676.        
  11677.     }r21c_sound_environment_palette;
  11678.    
  11679.     // tagpathname strings: {r21c1}
  11680.    
  11681.     // sound PAS data goes here (offset 320430 in test data tutorial)
  11682.    
  11683.     struct sbsp_r22c {
  11684.         // representation 22 cells
  11685.         // r22c_markers_
  11686.        
  11687.         char r22c_markers_name[32];
  11688.         float r22c_markers_rotation_i;
  11689.         float r22c_markers_rotation_j;
  11690.         float r22c_markers_rotation_k;
  11691.         float r22c_markers_rotation_w;
  11692.         float r22c_markers_position_x;
  11693.         float r22c_markers_position_y;
  11694.         float r22c_markers_position_z;
  11695.        
  11696.     }r22c_markers;
  11697.    
  11698.     // offset 8906 in blank test data
  11699.     // offset 320781 in tutorial test data
  11700.    
  11701.     struct sbsp_r23c {
  11702.         // representation 23 cells
  11703.         // r23c_detail_objects_
  11704.        
  11705.         // (someone was probably lazy here)
  11706.         // since all the values are "?", I will use "q" for short, not "unknown"
  11707.        
  11708.         // representation 23 sub-board A
  11709.         // r23sbA_cells_
  11710.         uint32_t r23sbA_cells_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 262144)
  11711.         uint32_t r23sbA_cells_random_id;
  11712.         uint32_t r23sbA_cells_sig_id; // example value = 0xF42E9C00
  11713.        
  11714.         // representation 23 sub-board B
  11715.         // r23sbB_instances_
  11716.         uint32_t r23sbB_instances_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 2097152)
  11717.         uint32_t r23sbB_instances_random_id;
  11718.         uint32_t r23sbB_instances_sig_id; // example value = 0x682F9C00
  11719.        
  11720.         // representation 23 sub-board C
  11721.         // r23sbC_counts_
  11722.         uint32_t r23sbC_counts_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 8388608)
  11723.         uint32_t r23sbC_counts_random_id;
  11724.         uint32_t r23sbC_counts_sig_id; // example value = 0xAC2F9C00
  11725.        
  11726.         // representation 23 sub-board D
  11727.         // r23sbD_z_reference_vectors_
  11728.         uint32_t r23sbD_z_reference_vectors_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 262144)
  11729.         uint32_t r23sbD_z_reference_vectors_random_id;
  11730.         uint32_t r23sbD_z_reference_vectors_sig_id; // example value = 0x14309C00
  11731.        
  11732.         // test data offset 8954 in blank 1
  11733.        
  11734.     }r23c_detail_objects;
  11735.    
  11736.     struct sbsp_r23sc {
  11737.         // representation 23 sub-cells grouping container
  11738.        
  11739.         // 16 -- offset 8954
  11740.        
  11741.         struct sbsp_r23scA {
  11742.             // representation 23 sub-cells A
  11743.             // r23scA_cells_
  11744.            
  11745.             uint16_t r23scA_cells_q1;
  11746.             uint16_t r23scA_cells_q2;
  11747.             uint16_t r23scA_cells_q3;
  11748.             uint16_t r23scA_cells_q4;
  11749.             uint32_t r23scA_cells_q5;
  11750.             uint32_t r23scA_cells_q6;
  11751.             uint32_t r23scA_cells_q7;
  11752.            
  11753.             // 12
  11754.            
  11755.         }r23scA_detail_objects_cells;
  11756.        
  11757.         struct sbsp_r23scB {
  11758.             // representation 23 sub-cells B
  11759.             // r23scB_instances_
  11760.            
  11761.             uint8_t r23scB_instances_q1;   // these four are considered signed
  11762.             uint8_t r23scB_instances_q2;
  11763.             uint8_t r23scB_instances_q3;
  11764.             uint8_t r23scB_instances_q4;
  11765.            
  11766.             uint16_t r23scB_instances_q5;
  11767.            
  11768.         }r23scB_detail_objects_instances;
  11769.        
  11770.         struct sbsp_r23scC {
  11771.             // representation 23 sub-cells C
  11772.             // r23scC_counts_
  11773.            
  11774.             uint16_t r23scC_counts_q1;
  11775.            
  11776.         }r23scC_detail_objects_counts;
  11777.        
  11778.         struct sbsp_r23scD {
  11779.             // representation 23 sub-cells D
  11780.             // r23scD_vectors_
  11781.            
  11782.             float r23scD_vectors_q1;
  11783.             float r23scD_vectors_q2;
  11784.             float r23scD_vectors_q3;
  11785.             float r23scD_vectors_q4;
  11786.            
  11787.         }r23scD_detail_objects_z_reference_vectors;
  11788.        
  11789.     }r23sc_container;
  11790.    
  11791.     struct sbsp_r24c {
  11792.         // representation 24 cells
  11793.         // r24c_runtime_decals_
  11794.        
  11795.         // 16 bytes of unknown data per cell
  11796.         // (remains to be tested, but there is data here!!! -- so far, just zeros)
  11797.         // offset 9138 in blank 1
  11798.        
  11799.     }r24c_runtime_decals;
  11800.    
  11801.     struct sbsp_r25c {
  11802.         // representation 25 cells
  11803.         // r25c_leaf_map_leaves_
  11804.        
  11805.         // representation 25 sub-board A
  11806.         // r25sbA_faces_
  11807.         uint32_t r25sbA_faces_entrycount; // maximum of 256 cells
  11808.         uint32_t r25sbA_faces_random_id;
  11809.         uint32_t r25sbA_faces_sig_id; // example value = 0xF84BA100
  11810.        
  11811.         // representation 25 sub-board B
  11812.         // r25sbB_portal_indices_
  11813.         uint32_t r25sbB_portal_indices_entrycount; // maximum of 256 cells
  11814.         uint32_t r25sbB_portal_indices_random_id;
  11815.         uint32_t r25sbB_portal_indices_sig_id; // example value = 0xA84BA100
  11816.        
  11817.     }r25c_leaf_map_leaves;
  11818.    
  11819.     struct sbsp_r25sc {
  11820.         // representation 25 sub-cells grouping container
  11821.         // 132 bytes in test data blank 1
  11822.         // offset 9258 in test data blank
  11823.        
  11824.         struct sbsp_r25scA {   // all for current cell
  11825.             // representation 25 sub-cells A
  11826.             // r25scA_faces_
  11827.            
  11828.             uint32_t r25scA_faces_node_index;
  11829.            
  11830.             // representation 25 sub-cells A sub-board a
  11831.             // r25scAsba_vertices_
  11832.             uint32_t r25scAsba_vertices_entrycount; // maximum of 64 cells
  11833.             uint32_t r25scAsba_vertices_random_id;
  11834.             uint32_t r25scAsba_vertices_sig_id; // example value = 0x644BA100
  11835.            
  11836.         }r25scA_leaf_map_leaves_faces;
  11837.        
  11838.         struct sbsp_r25scAsca {   // all for current cell (not sub-cell)
  11839.             // representation 25 sub-cells A sub-cells a
  11840.             // r25scAsca_vertices_
  11841.            
  11842.             float r25scAsca_vertices_vertex_x;
  11843.             float r25scAsca_vertices_vertex_y;
  11844.            
  11845.         }r25scAsca_leaf_map_leaves_faces_vertices;
  11846.        
  11847.         struct sbsp_r25scB {
  11848.             // representation 25 sub-cells B
  11849.             // r25scB_portal_indices_
  11850.            
  11851.             uint32_t r25scB_portal_indices_portal_index;
  11852.            
  11853.         }r25scB_leaf_map_leaves_portal_indices;
  11854.        
  11855.     }r25sc_container;
  11856.    
  11857.     // offset 9654 in test data blank 1
  11858.    
  11859.     struct sbsp_r26c {
  11860.         // representation 26 cells
  11861.         // r26c_leaf_map_portals_
  11862.        
  11863.         uint32_t r26c_leaf_map_portals_plane_index;
  11864.         uint32_t r26c_leaf_map_portals_back_leaf_index;
  11865.         uint32_t r26c_leaf_map_portals_front_leaf_index;
  11866.        
  11867.         // representation 26 sub-board A
  11868.         // r26sbA_vertices_
  11869.         uint32_t r26sbA_vertices_entrycount; // maximum of 64 cells
  11870.         uint32_t r26sbA_vertices_random_id;
  11871.         uint32_t r26sbA_vertices_sig_id; // example value = 0x8C4CA100
  11872.        
  11873.        
  11874.     }r26c_leaf_map_portals;
  11875.    
  11876.     struct sbsp_r26scA {
  11877.         // representation 26 sub-cells A
  11878.         // r26scA_vertices_
  11879.        
  11880.         float r26scA_vertices_point_x;
  11881.         float r26scA_vertices_point_y;
  11882.         float r26scA_vertices_point_z;
  11883.        
  11884.     }r26scA_leaf_map_portals_vertices;
  11885.    
  11886. } type_meta_sbsp;
  11887.  
  11888. // still remaining to be done, significantly:
  11889. // fill in maximum cell counts for each board
  11890. // ...and some other general post-development tasks, like:
  11891. // reinterpreting signed values
  11892. // considering formats of various data
  11893. // determining algorithms for calculated values
  11894.  
  11895. // ... finished outline Saturday, December 13, 2014 @ 2:01 PM EST :D
  11896.  
  11897. #pragma mark -- scen
  11898.  
  11899. typedef struct {
  11900.     // OBJE DATA 1 START
  11901.     uint16_t INTERNAL_obje_index;   // 6 (little endian)
  11902.     // 66, 1
  11903.     uint8_t flags;  //toff 66   0x0F
  11904.     float bounding_radius;
  11905.     float bounding_offset_x;
  11906.     float bounding_offset_y;
  11907.     float bounding_offset_z;
  11908.     float origin_offset_x;
  11909.     float origin_offset_y;
  11910.     float origin_offset_z;
  11911.     float acceleration_scale;
  11912.     // 100, 4
  11913.    
  11914.     // dependency 1: model mod2
  11915.     char model_tagclass[5];      //unsigned char[5]
  11916.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  11917.     uint32_t model_tagnamestringlength;   //uint32
  11918.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  11919.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11920.    
  11921.     // dependency 2: animation graph antr
  11922.     char animation_graph_tagclass[5];        //unsigned char[5]
  11923.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  11924.     uint32_t animation_graph_tagnamestringlength;   //uint32
  11925.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  11926.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11927.    
  11928.     // 136, 40
  11929.    
  11930.     // dependency 3: collision model coll
  11931.     char collision_model_tagclass[5];        //unsigned char[5]
  11932.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  11933.     uint32_t collision_model_tagnamestringlength;   //uint32
  11934.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  11935.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11936.    
  11937.     // dependency 4: physics phys
  11938.     char physics_tagclass[5];        //unsigned char[5]
  11939.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  11940.     uint32_t physics_tagnamestringlength;   //uint32
  11941.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  11942.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11943.    
  11944.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  11945.     char modifier_shader_tagclass[5];        //unsigned char[5]
  11946.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  11947.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  11948.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  11949.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11950.    
  11951.     // dependency 6: creation effect effe
  11952.     char creation_effect_tagclass[5];        //unsigned char[5]
  11953.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  11954.     uint32_t creation_effect_tagnamestringlength;   //uint32
  11955.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  11956.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  11957.    
  11958.     // 240, 84
  11959.    
  11960.     float render_bounding_radius;
  11961.    
  11962.     uint16_t export_to_functions_a_in;
  11963.     uint16_t export_to_functions_b_in;
  11964.     uint16_t export_to_functions_c_in;
  11965.     uint16_t export_to_functions_d_in;
  11966.    
  11967.     // 336, 44
  11968.    
  11969.     uint16_t export_to_functions_hud_text_message_index;
  11970.     uint16_t export_to_functions_forced_shader_permutation_index;
  11971.    
  11972.     // representation 1 board, offset 384
  11973.     // r1b_attachments_
  11974.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  11975.     uint32_t r1b_attachments_random_id;
  11976.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  11977.    
  11978.     // representation 2 board, offset 396
  11979.     // r2b_widgets_
  11980.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  11981.     uint32_t r2b_widgets_random_id;
  11982.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  11983.    
  11984.     // representation 3 board, offset 408
  11985.     // r3b_functions_
  11986.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  11987.     uint32_t r3b_functions_random_id;
  11988.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  11989.    
  11990.     // representation 4 board, offset 420
  11991.     // r4b_change_colors_
  11992.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  11993.     uint32_t r4b_change_colors_random_id;
  11994.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  11995.    
  11996.     // representation 5 board, offset 432
  11997.     // r5b_predicted_resources_
  11998.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  11999.     uint32_t r5b_predicted_resources_random_id;
  12000.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  12001.    
  12002.     // OBJE DATA 1 END
  12003.    
  12004.     // 444, 128
  12005.    
  12006.     // offset 572, tagpathname strings for dependencies 1-6
  12007.    
  12008.     // OBJE DATA 2 START
  12009.    
  12010.     struct scen_r1c {
  12011.         // representation 1 cells
  12012.         // r1c_attachments_
  12013.         // 72 bytes
  12014.        
  12015.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  12016.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  12017.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  12018.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  12019.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  12020.         // char r1c_attachments_type_tagnamestring[255];
  12021.        
  12022.         char r1c_attachments_marker[32];
  12023.         uint16_t r1c_attachments_primary_scale;
  12024.         uint16_t r1c_attachments_secondary_scale;
  12025.         uint16_t r1c_attachments_change_color;
  12026.        
  12027.         // 18
  12028.        
  12029.     }r1c_attachments;
  12030.    
  12031.     // r1c 1 tag name strings here
  12032.    
  12033.     struct scen_r2c {
  12034.         // representation 2 cells
  12035.         // r2c_widgets_
  12036.         // 32 bytes
  12037.        
  12038.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  12039.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  12040.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  12041.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  12042.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  12043.         // char r2c_widgets_reference_tagnamestring[255];
  12044.        
  12045.         // 16
  12046.        
  12047.     }r2c_widgets;
  12048.    
  12049.     // r2c 1 tag name strings here
  12050.    
  12051.     struct scen_r3c {
  12052.         // representation 3 cells
  12053.         // r3c_functions_
  12054.         // 360 bytes
  12055.        
  12056.         uint32_t r3c_functions_flags;   // verified that 4 bytes are written, toff 572  0x00000007
  12057.         float r3c_functions_period;
  12058.         uint16_t r3c_functions_scale_period_by;
  12059.         uint16_t r3c_functions_function;
  12060.         uint16_t r3c_functions_scale_function_by;
  12061.         uint16_t r3c_functions_wobble_function;
  12062.         float r3c_functions_wobble_period;
  12063.         float r3c_functions_wobble_magnitude;
  12064.         float r3c_functions_square_wave_threshold_frac;
  12065.         uint16_t r3c_functions_step_count;
  12066.         uint16_t r3c_functions_map_to;
  12067.         uint16_t r3c_functions_sawtooth_count;
  12068.         uint16_t r3c_functions_add;
  12069.         uint16_t r3c_functions_scale_result_by;
  12070.         uint16_t r3c_functions_bounds_mode;
  12071.         float r3c_functions_bounds_from_frac;
  12072.         float r3c_functions_bounds_to_frac;
  12073.         // 6
  12074.         uint16_t r3c_functions_turn_off_with_sel;
  12075.         float r3c_functions_scale_by;
  12076.         // 268
  12077.         char r3c_functions_usage[32];
  12078.        
  12079.     }r3c_functions;
  12080.    
  12081.     struct scen_r4c {
  12082.         // representation 4 cells
  12083.         // r4c_change_colors_
  12084.         // 44 bytes
  12085.        
  12086.         uint16_t r4c_change_colors_darken_by;
  12087.         uint16_t r4c_change_colors_scale_by;
  12088.         uint32_t r4c_change_colors_scale_flags;   // verified that 4 bytes are written, toff 936    0x00000003
  12089.         float r4c_change_colors_color_lower_bound_r_frac;
  12090.         float r4c_change_colors_color_lower_bound_g_frac;
  12091.         float r4c_change_colors_color_lower_bound_b_frac;
  12092.         float r4c_change_colors_color_upper_bound_r_frac;
  12093.         float r4c_change_colors_color_upper_bound_g_frac;
  12094.         float r4c_change_colors_color_upper_bound_b_frac;
  12095.        
  12096.         // representation 4 sub-board A
  12097.         // r4sbA_permutations_
  12098.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  12099.         uint32_t r4sbA_permutations_random_id1;
  12100.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  12101.     }r4c_change_colors;
  12102.    
  12103.     struct scen_r4scA
  12104.     {
  12105.         // representation 4 sub-cells A
  12106.         // r4scA_permutations_
  12107.         // 28 bytes
  12108.        
  12109.         float r4scA_permutations_weight_frac;
  12110.         float r4scA_permutations_color_lower_bound_r_frac;
  12111.         float r4scA_permutations_color_lower_bound_g_frac;
  12112.         float r4scA_permutations_color_lower_bound_b_frac;
  12113.         float r4scA_permutations_color_upper_bound_r_frac;
  12114.         float r4scA_permutations_color_upper_bound_g_frac;
  12115.         float r4scA_permutations_color_upper_bound_b_frac;
  12116.     }r4sc_change_colors_permutations;
  12117.    
  12118.     struct scen_r5c {
  12119.         // representation 5 cells
  12120.         // r5c_predicted_resources_
  12121.         // 8 bytes
  12122.        
  12123.         uint16_t r5c_predicted_resources_type;
  12124.         uint16_t r5c_predicted_resources_resource_index;
  12125.         uint32_t r5c_predicted_resources_tag_index;
  12126.     }r5c_predicted_resources;
  12127.    
  12128.     // OBJE DATA 2 END
  12129.    
  12130. } type_meta_scen;
  12131.  
  12132. #pragma mark -- scex
  12133.  
  12134. typedef struct {
  12135.     // 64, 1
  12136.     uint8_t radiosity_properties_flags; //toff 64   0x07
  12137.     uint16_t radiosity_properties_detail_level;
  12138.     float radiosity_properties_power;
  12139.    
  12140.     float radiosity_properties_color_of_emitted_light_r_frac;
  12141.     float radiosity_properties_color_of_emitted_light_g_frac;
  12142.     float radiosity_properties_color_of_emitted_light_b_frac;
  12143.     float radiosity_properties_tint_color_r_frac;
  12144.     float radiosity_properties_tint_color_g_frac;
  12145.     float radiosity_properties_tint_color_b_frac;
  12146.    
  12147.     // 96, 2
  12148.    
  12149.     uint16_t physics_properties_material_type;
  12150.    
  12151.     uint16_t INTERNAL_shdr_index;   // like obje index -- 7, toff 101
  12152.     // 102, 2
  12153.     uint8_t chicago_shader_extended_numeric_counter_limit;   // listed as 0-255, but enforced as -128 to 127 (hm...)
  12154.     uint8_t chicago_shader_extended_flags;   // we're getting efficient!, toff 105 (untested)   0xFF
  12155.     uint16_t chicago_shader_extended_first_map_type;
  12156.     uint16_t chicago_shader_extended_framebuffer_blend_function;
  12157.     uint16_t chicago_shader_extended_framebuffer_fade_mode;
  12158.     uint16_t chicago_shader_extended_framebuffer_fade_source;
  12159.     // 114, 2
  12160.     float lens_flares_lens_flare_spacing;
  12161.    
  12162.     // dependency 1: lens flares lens flare lens
  12163.     char lens_flares_lens_flare_tagclass[5];         //unsigned char[5]
  12164.     uint32_t lens_flares_lens_flare_tagnamepointer;   //uint32 ("random" number)
  12165.     uint32_t lens_flares_lens_flare_tagnamestringlength;   //uint32
  12166.     uint32_t lens_flares_lens_flare_tagid;       //uint32 (0xFFFFFFFF with tags)
  12167.     // char lens_flares_lens_flare_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12168.    
  12169.     // representation 1 board, offset 136
  12170.     // r1b_extra_layers_
  12171.     uint32_t r1b_extra_layers_entrycount; // maximum of 4 cells
  12172.     uint32_t r1b_extra_layers_random_id;
  12173.     uint32_t r1b_extra_layers_sig_id; // example value = 0x94A59C00
  12174.    
  12175.     // representation 2 board, offset 148
  12176.     // r2b_four_stage_maps_
  12177.     uint32_t r2b_four_stage_maps_entrycount; // maximum of 4 cells
  12178.     uint32_t r2b_four_stage_maps_random_id;
  12179.     uint32_t r2b_four_stage_maps_sig_id; // example value = 0x78AE9C00
  12180.    
  12181.     // representation 3 board, offset 160
  12182.     // r3b_two_stage_maps_
  12183.     uint32_t r3b_two_stage_maps_entrycount; // maximum of 4 cells
  12184.     uint32_t r3b_two_stage_maps_random_id;
  12185.     uint32_t r3b_two_stage_maps_sig_id; // example value = 0x78AE9C00 (same as previous!)
  12186.    
  12187.     uint32_t extra_flags;   //toff 172  0x00000003
  12188.    
  12189.     // 176, 8
  12190.    
  12191.     // dependency 1 tagpathname string goes here
  12192.    
  12193.     struct scex_r1c {
  12194.         // representation 1 cells
  12195.         // r1c_extra_layers_
  12196.        
  12197.         // dependency r1c 1: shader shdr senv soso schi scex sotr sgla smet spla swat
  12198.         char r1c1_shader_tagclass[5];        //unsigned char[5]
  12199.         uint32_t r1c1_shader_tagnamepointer;   //uint32 ("random" number)
  12200.         uint32_t r1c1_shader_tagnamestringlength;   //uint32
  12201.         uint32_t r1c1_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  12202.         // char r1c1_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12203.        
  12204.     }r1c_extra_layers;
  12205.    
  12206.     // tpns {r1c 1}
  12207.    
  12208.     struct scex_r2c {
  12209.         // representation 2 cells
  12210.         // r2c_four_stage_maps_
  12211.        
  12212.         // 1
  12213.         uint8_t r2c_four_stage_maps_flags; // this may very well be 2 bytes, but only 1 byte is written! (same as 2 stage maps), toff 182   0x0F
  12214.         // 42
  12215.         uint16_t r2c_four_stage_maps_color_function;
  12216.         uint16_t r2c_four_stage_maps_alpha_function;
  12217.         // 36
  12218.         float r2c_four_stage_maps_map_u_scale;
  12219.         float r2c_four_stage_maps_map_v_scale;
  12220.         float r2c_four_stage_maps_map_u_offset;
  12221.         float r2c_four_stage_maps_map_v_offset;
  12222.         float r2c_four_stage_maps_map_rotation;
  12223.         float r2c_four_stage_maps_mipmap_bias_frac;
  12224.        
  12225.         // dependency r2c 1: map bitm
  12226.         char r2c1_map_tagclass[5];       //unsigned char[5]
  12227.         uint32_t r2c1_map_tagnamepointer;   //uint32 ("random" number)
  12228.         uint32_t r2c1_map_tagnamestringlength;   //uint32
  12229.         uint32_t r2c1_map_tagid;         //uint32 (0xFFFFFFFF with tags)
  12230.         // char r2c1_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12231.        
  12232.         // 40
  12233.        
  12234.         uint16_t r2c_four_stage_maps_2d_texture_animation_u_animation_source;
  12235.         uint16_t r2c_four_stage_maps_2d_texture_animation_u_animation_function;
  12236.         float r2c_four_stage_maps_2d_texture_animation_u_animation_period;
  12237.         float r2c_four_stage_maps_2d_texture_animation_u_animation_phase;
  12238.         float r2c_four_stage_maps_2d_texture_animation_u_animation_scale;
  12239.         uint16_t r2c_four_stage_maps_2d_texture_animation_v_animation_source;
  12240.         uint16_t r2c_four_stage_maps_2d_texture_animation_v_animation_function;
  12241.         float r2c_four_stage_maps_2d_texture_animation_v_animation_period;
  12242.         float r2c_four_stage_maps_2d_texture_animation_v_animation_phase;
  12243.         float r2c_four_stage_maps_2d_texture_animation_v_animation_scale;
  12244.         uint16_t r2c_four_stage_maps_2d_texture_animation_rotation_animation_source;
  12245.         uint16_t r2c_four_stage_maps_2d_texture_animation_rotation_animation_function;
  12246.         float r2c_four_stage_maps_2d_texture_animation_rotation_animation_period;
  12247.         float r2c_four_stage_maps_2d_texture_animation_rotation_animation_phase;
  12248.         float r2c_four_stage_maps_2d_texture_animation_rotation_animation_scale;
  12249.         float r2c_four_stage_maps_2d_texture_animation_rotation_animation_center_x;
  12250.         float r2c_four_stage_maps_2d_texture_animation_rotation_animation_center_y;
  12251.        
  12252.     }r2c_four_stage_maps;
  12253.    
  12254.     // tpns {r2c 1}
  12255.    
  12256.     // (same format as previous)
  12257.     struct scex_r3c {
  12258.         // representation 3 cells
  12259.         // r3c_two_stage_maps_
  12260.        
  12261.         // 1
  12262.         uint8_t r3c_two_stage_maps_flags;   // see same value of 4 stage maps, toff 402 0x0F
  12263.         // 42
  12264.         uint16_t r3c_two_stage_maps_color_function;
  12265.         uint16_t r3c_two_stage_maps_alpha_function;
  12266.         // 36
  12267.         float r3c_two_stage_maps_map_u_scale;
  12268.         float r3c_two_stage_maps_map_v_scale;
  12269.         float r3c_two_stage_maps_map_u_offset;
  12270.         float r3c_two_stage_maps_map_v_offset;
  12271.         float r3c_two_stage_maps_map_rotation;
  12272.         float r3c_two_stage_maps_mipmap_bias_frac;
  12273.        
  12274.         // dependency r3c 1: map bitm
  12275.         char r3c1_map_tagclass[5];       //unsigned char[5]
  12276.         uint32_t r3c1_map_tagnamepointer;   //uint32 ("random" number)
  12277.         uint32_t r3c1_map_tagnamestringlength;   //uint32
  12278.         uint32_t r3c1_map_tagid;         //uint32 (0xFFFFFFFF with tags)
  12279.         // char r3c1_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12280.        
  12281.         // 40
  12282.        
  12283.         uint16_t r3c_two_stage_maps_2d_texture_animation_u_animation_source;
  12284.         uint16_t r3c_two_stage_maps_2d_texture_animation_u_animation_function;
  12285.         float r3c_two_stage_maps_2d_texture_animation_u_animation_period;
  12286.         float r3c_two_stage_maps_2d_texture_animation_u_animation_phase;
  12287.         float r3c_two_stage_maps_2d_texture_animation_u_animation_scale;
  12288.         uint16_t r3c_two_stage_maps_2d_texture_animation_v_animation_source;
  12289.         uint16_t r3c_two_stage_maps_2d_texture_animation_v_animation_function;
  12290.         float r3c_two_stage_maps_2d_texture_animation_v_animation_period;
  12291.         float r3c_two_stage_maps_2d_texture_animation_v_animation_phase;
  12292.         float r3c_two_stage_maps_2d_texture_animation_v_animation_scale;
  12293.         uint16_t r3c_two_stage_maps_2d_texture_animation_rotation_animation_source;
  12294.         uint16_t r3c_two_stage_maps_2d_texture_animation_rotation_animation_function;
  12295.         float r3c_two_stage_maps_2d_texture_animation_rotation_animation_period;
  12296.         float r3c_two_stage_maps_2d_texture_animation_rotation_animation_phase;
  12297.         float r3c_two_stage_maps_2d_texture_animation_rotation_animation_scale;
  12298.         float r3c_two_stage_maps_2d_texture_animation_rotation_animation_center_x;
  12299.         float r3c_two_stage_maps_2d_texture_animation_rotation_animation_center_y;
  12300.        
  12301.     }r3c_two_stage_maps;
  12302.    
  12303.     // tpns {r3c 1}
  12304.    
  12305. } type_meta_scex;
  12306.  
  12307. #pragma mark -- schi
  12308.  
  12309. typedef struct {
  12310.     // 64, 1
  12311.     uint8_t radiosity_properties_flags; //toff 64   0x07
  12312.     uint16_t radiosity_properties_detail_level;
  12313.     float radiosity_properties_power;
  12314.    
  12315.     float radiosity_properties_color_of_emitted_light_r_frac;
  12316.     float radiosity_properties_color_of_emitted_light_g_frac;
  12317.     float radiosity_properties_color_of_emitted_light_b_frac;
  12318.     float radiosity_properties_tint_color_r_frac;
  12319.     float radiosity_properties_tint_color_g_frac;
  12320.     float radiosity_properties_tint_color_b_frac;
  12321.    
  12322.     // 96, 2
  12323.    
  12324.     uint16_t physics_properties_material_type;
  12325.    
  12326.     uint16_t INTERNAL_shdr_index;   // like obje index -- 6, toff 101
  12327.     // 102, 2
  12328.     uint8_t chicago_shader_numeric_counter_limit;   // listed as 0-255, but enforced as -128 to 127 (hm...)
  12329.     uint8_t chicago_shader_flags;   // we're getting efficient!, toff 105 (untested)    0xFF
  12330.     uint16_t chicago_shader_first_map_type;
  12331.     uint16_t chicago_shader_framebuffer_blend_function;
  12332.     uint16_t chicago_shader_framebuffer_fade_mode;
  12333.     uint16_t chicago_shader_framebuffer_fade_source;
  12334.     // 114, 2
  12335.     float lens_flares_lens_flare_spacing;
  12336.    
  12337.     // dependency 1: lens flares lens flare lens
  12338.     char lens_flares_lens_flare_tagclass[5];         //unsigned char[5]
  12339.     uint32_t lens_flares_lens_flare_tagnamepointer;   //uint32 ("random" number)
  12340.     uint32_t lens_flares_lens_flare_tagnamestringlength;   //uint32
  12341.     uint32_t lens_flares_lens_flare_tagid;       //uint32 (0xFFFFFFFF with tags)
  12342.     // char lens_flares_lens_flare_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12343.    
  12344.     // representation 1 board, offset 136
  12345.     // r1b_extra_layers_
  12346.     uint32_t r1b_extra_layers_entrycount; // maximum of 4 cells
  12347.     uint32_t r1b_extra_layers_random_id;
  12348.     uint32_t r1b_extra_layers_sig_id; // example value = 0x94A59C00
  12349.    
  12350.     // representation 2 board, offset 148
  12351.     // r2b_four_stage_maps_
  12352.     uint32_t r2b_four_stage_maps_entrycount; // maximum of 4 cells
  12353.     uint32_t r2b_four_stage_maps_random_id;
  12354.     uint32_t r2b_four_stage_maps_sig_id; // example value = 0x78AE9C00
  12355.    
  12356.     uint32_t extra_flags;   //toff 160  0x00000003
  12357.    
  12358.     // 164, 8
  12359.    
  12360.     // dependency 1 tagpathname string goes here
  12361.    
  12362.     struct schi_r1c {
  12363.         // representation 1 cells
  12364.         // r1c_extra_layers_
  12365.        
  12366.         // dependency r1c 1: shader shdr senv soso schi scex sotr sgla smet spla swat
  12367.         char r1c1_shader_tagclass[5];        //unsigned char[5]
  12368.         uint32_t r1c1_shader_tagnamepointer;   //uint32 ("random" number)
  12369.         uint32_t r1c1_shader_tagnamestringlength;   //uint32
  12370.         uint32_t r1c1_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  12371.         // char r1c1_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12372.        
  12373.     }r1c_extra_layers;
  12374.    
  12375.     // tpns {r1c 1}
  12376.    
  12377.     struct schi_r2c {
  12378.         // representation 2 cells
  12379.         // r2c_maps_
  12380.        
  12381.         // 1
  12382.         uint8_t r2c_maps_flags;   // this may very well be 2 bytes, but only 1 byte is written!, toff 170   0x0F
  12383.         // 42
  12384.         uint16_t r2c_maps_color_function;
  12385.         uint16_t r2c_maps_alpha_function;
  12386.         // 36
  12387.         float r2c_maps_map_u_scale;
  12388.         float r2c_maps_map_v_scale;
  12389.         float r2c_maps_map_u_offset;
  12390.         float r2c_maps_map_v_offset;
  12391.         float r2c_maps_map_rotation;
  12392.         float r2c_maps_mipmap_bias_frac;
  12393.        
  12394.         // dependency r2c 1: map bitm
  12395.         char r2c1_map_tagclass[5];       //unsigned char[5]
  12396.         uint32_t r2c1_map_tagnamepointer;   //uint32 ("random" number)
  12397.         uint32_t r2c1_map_tagnamestringlength;   //uint32
  12398.         uint32_t r2c1_map_tagid;         //uint32 (0xFFFFFFFF with tags)
  12399.         // char r2c1_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12400.        
  12401.         // 40
  12402.        
  12403.         uint16_t r2c_maps_2d_texture_animation_u_animation_source;
  12404.         uint16_t r2c_maps_2d_texture_animation_u_animation_function;
  12405.         float r2c_maps_2d_texture_animation_u_animation_period;
  12406.         float r2c_maps_2d_texture_animation_u_animation_phase;
  12407.         float r2c_maps_2d_texture_animation_u_animation_scale;
  12408.         uint16_t r2c_maps_2d_texture_animation_v_animation_source;
  12409.         uint16_t r2c_maps_2d_texture_animation_v_animation_function;
  12410.         float r2c_maps_2d_texture_animation_v_animation_period;
  12411.         float r2c_maps_2d_texture_animation_v_animation_phase;
  12412.         float r2c_maps_2d_texture_animation_v_animation_scale;
  12413.         uint16_t r2c_maps_2d_texture_animation_rotation_animation_source;
  12414.         uint16_t r2c_maps_2d_texture_animation_rotation_animation_function;
  12415.         float r2c_maps_2d_texture_animation_rotation_animation_period;
  12416.         float r2c_maps_2d_texture_animation_rotation_animation_phase;
  12417.         float r2c_maps_2d_texture_animation_rotation_animation_scale;
  12418.         float r2c_maps_2d_texture_animation_rotation_animation_center_x;
  12419.         float r2c_maps_2d_texture_animation_rotation_animation_center_y;
  12420.        
  12421.     }r2c_four_stage_maps;
  12422.    
  12423.     // tpns {r2c 1}
  12424.    
  12425. } type_meta_schi;
  12426.  
  12427. #pragma mark -- scnr
  12428.  
  12429. typedef struct {
  12430.    
  12431.     // dependency 1: do not use sbsp
  12432.     char do_not_use_tagclass[5];         //unsigned char[5]
  12433.     uint32_t do_not_use_tagnamepointer;   //uint32 ("random" number)
  12434.     uint32_t do_not_use_tagnamestringlength;   //uint32
  12435.     uint32_t do_not_use_tagid;       //uint32 (0xFFFFFFFF with tags)
  12436.     // char do_not_use_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12437.    
  12438.     // dependency 2: will not use sbsp
  12439.     char will_not_use_tagclass[5];       //unsigned char[5]
  12440.     uint32_t will_not_use_tagnamepointer;   //uint32 ("random" number)
  12441.     uint32_t will_not_use_tagnamestringlength;   //uint32
  12442.     uint32_t will_not_use_tagid;         //uint32 (0xFFFFFFFF with tags)
  12443.     // char will_not_use_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12444.    
  12445.     // dependency 3: can not use sky
  12446.     char can_not_use_tagclass[5];        //unsigned char[5]
  12447.     uint32_t can_not_use_tagnamepointer;   //uint32 ("random" number)
  12448.     uint32_t can_not_use_tagnamestringlength;   //uint32
  12449.     uint32_t can_not_use_tagid;      //uint32 (0xFFFFFFFF with tags)
  12450.     // char can_not_use_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12451.    
  12452.     // representation 1 board, offset 112
  12453.     // r1b_skies_
  12454.     uint32_t r1b_skies_entrycount; // maximum of 8 cells
  12455.     uint32_t r1b_skies_random_id;
  12456.     uint32_t r1b_skies_sig_id; // example value = 0x88D39C00
  12457.    
  12458.     uint16_t type;
  12459.     // 1
  12460.     uint8_t flags;  //toff 126  0x03
  12461.    
  12462.     // representation 2 board, offset 128
  12463.     // r2b_child_scenarios_
  12464.     uint32_t r2b_child_scenarios_entrycount; // maximum of 16 cells
  12465.     uint32_t r2b_child_scenarios_random_id;
  12466.     uint32_t r2b_child_scenarios_sig_id; // example value = 0x38D39C00
  12467.    
  12468.     float local_north_rad;
  12469.    
  12470.     // 144, 156
  12471.    
  12472.     // representation 3 board, offset 300
  12473.     // r3b_predicted_resources_
  12474.     uint32_t r3b_predicted_resources_entrycount; // maximum of 1024 cells
  12475.     uint32_t r3b_predicted_resources_random_id;
  12476.     uint32_t r3b_predicted_resources_sig_id; // example value = 0x105FA000
  12477.    
  12478.     // representation 4 board, offset 312
  12479.     // r4b_functions_
  12480.     uint32_t r4b_functions_entrycount; // maximum of 32 cells
  12481.     uint32_t r4b_functions_random_id;
  12482.     uint32_t r4b_functions_sig_id; // example value = 0x74BD9C00
  12483.    
  12484.     // offset 324
  12485.     uint32_t editor_scenario_data;
  12486.     // 328, 4
  12487.     // little endian internal board values:
  12488.     uint32_t INTERNAL_editor_scenario_data_offset_pointer;   // example value =
  12489.     uint32_t INTERNAL_editor_scenario_data_random1;
  12490.     uint32_t INTERNAL_editor_scenario_data_sig_id;   // example value = 0xD8D39C00
  12491.    
  12492.     // representation 5 board, offset 344
  12493.     // r5b_comments_
  12494.     uint32_t r5b_comments_entrycount; // maximum of 1024 cells
  12495.     uint32_t r5b_comments_random_id;
  12496.     uint32_t r5b_comments_sig_id; // example value = 0x28D49C00
  12497.    
  12498.     // 356, 224
  12499.    
  12500.     // representation 6 board, offset 580
  12501.     // r6b_object_names_
  12502.     uint32_t r6b_object_names_entrycount; // maximum of 512 cells
  12503.     uint32_t r6b_object_names_random_id;
  12504.     uint32_t r6b_object_names_sig_id; // example value = 0xC4BD9C00
  12505.    
  12506.     // representation 7 board, offset 592
  12507.     // r7b_scenery_
  12508.     uint32_t r7b_scenery_entrycount; // maximum of 2000 cells
  12509.     uint32_t r7b_scenery_random_id;
  12510.     uint32_t r7b_scenery_sig_id; // example value = 0x94C49C00
  12511.    
  12512.     // representation 8 board, offset 604
  12513.     // r8b_scenery_palette_
  12514.     uint32_t r8b_scenery_palette_entrycount; // maximum of 100 cells
  12515.     uint32_t r8b_scenery_palette_random_id;
  12516.     uint32_t r8b_scenery_palette_sig_id; // example value = 0xE4C39C00
  12517.    
  12518.     // representation 9 board, offset 616
  12519.     // r9b_bipeds_
  12520.     uint32_t r9b_bipeds_entrycount; // maximum of 128 cells
  12521.     uint32_t r9b_bipeds_random_id;
  12522.     uint32_t r9b_bipeds_sig_id; // example value = 0x54C89C00
  12523.    
  12524.     // representation 10 board, offset 628
  12525.     // r10b_biped_palette_
  12526.     uint32_t r10b_biped_palette_entrycount; // maximum of 100 cells
  12527.     uint32_t r10b_biped_palette_random_id;
  12528.     uint32_t r10b_biped_palette_sig_id; // example value = 0x70C79C00
  12529.    
  12530.     // representation 11 board, offset 640
  12531.     // r11b_vehicles_
  12532.     uint32_t r11b_vehicles_entrycount; // maximum of 80 cells
  12533.     uint32_t r11b_vehicles_random_id;
  12534.     uint32_t r11b_vehicles_sig_id; // example value = 0x00CA9C00
  12535.    
  12536.     // representation 12 board, offset 652
  12537.     // r12b_vehicle_palette_
  12538.     uint32_t r12b_vehicle_palette_entrycount; // maximum of 100 cells
  12539.     uint32_t r12b_vehicle_palette_random_id;
  12540.     uint32_t r12b_vehicle_palette_sig_id; // example value = 0xF8C89C00
  12541.    
  12542.     // representation 13 board, offset 664
  12543.     // r13b_equipment_
  12544.     uint32_t r13b_equipment_entrycount; // maximum of 256 cells
  12545.     uint32_t r13b_equipment_random_id;
  12546.     uint32_t r13b_equipment_sig_id; // example value = 0xA8C59C00
  12547.    
  12548.     // representation 14 board, offset 676
  12549.     // r14b_equipment_palette_
  12550.     uint32_t r14b_equipment_palette_entrycount; // maximum of 100 cells
  12551.     uint32_t r14b_equipment_palette_random_id;
  12552.     uint32_t r14b_equipment_palette_sig_id; // example value = 0x04C59C00
  12553.    
  12554.     // representation 15 board, offset 688
  12555.     // r15b_weapons_
  12556.     uint32_t r15b_weapons_entrycount; // maximum of 128 cells
  12557.     uint32_t r15b_weapons_random_id;
  12558.     uint32_t r15b_weapons_sig_id; // example value = 0x08C79C00
  12559.    
  12560.     // representation 16 board, offset 700
  12561.     // r16b_weapon_palette_
  12562.     uint32_t r16b_weapon_palette_entrycount; // maximum of 100 cells
  12563.     uint32_t r16b_weapon_palette_random_id;
  12564.     uint32_t r16b_weapon_palette_sig_id; // example value = 0x18C69C00
  12565.    
  12566.     // representation 17 board, offset 712
  12567.     // r17b_device_groups_
  12568.     uint32_t r17b_device_groups_entrycount; // maximum of 128 cells
  12569.     uint32_t r17b_device_groups_random_id;
  12570.     uint32_t r17b_device_groups_sig_id; // example value = 0x3CBE9C00
  12571.    
  12572.     // representation 18 board, offset 724
  12573.     // r18b_machines_
  12574.     uint32_t r18b_machines_entrycount; // maximum of 400 cells
  12575.     uint32_t r18b_machines_random_id;
  12576.     uint32_t r18b_machines_sig_id; // example value = 0x5CCB9C00
  12577.    
  12578.     // representation 19 board, offset 736
  12579.     // r19b_machine_palette_
  12580.     uint32_t r19b_machine_palette_entrycount; // maximum of 100 cells
  12581.     uint32_t r19b_machine_palette_random_id;
  12582.     uint32_t r19b_machine_palette_sig_id; // example value = 0x90CA9C00
  12583.    
  12584.     // representation 20 board, offset 748
  12585.     // r20b_controls_
  12586.     uint32_t r20b_controls_entrycount; // maximum of 100 cells
  12587.     uint32_t r20b_controls_random_id;
  12588.     uint32_t r20b_controls_sig_id; // example value = 0xB0CC9C00
  12589.    
  12590.     // representation 21 board, offset 760
  12591.     // r21b_control_palette_
  12592.     uint32_t r21b_control_palette_entrycount; // maximum of 100 cells
  12593.     uint32_t r21b_control_palette_random_id;
  12594.     uint32_t r21b_control_palette_sig_id; // example value = 0xC4CB9C00
  12595.    
  12596.     // representation 22 board, offset 772
  12597.     // r22b_light_fixtures_
  12598.     uint32_t r22b_light_fixtures_entrycount; // maximum of 500 cells
  12599.     uint32_t r22b_light_fixtures_random_id;
  12600.     uint32_t r22b_light_fixtures_sig_id; // example value = 0xF8CD9C00
  12601.    
  12602.     // representation 23 board, offset 784
  12603.     // r23b_light_fixtures_palette_
  12604.     uint32_t r23b_light_fixtures_palette_entrycount; // maximum of 100 cells
  12605.     uint32_t r23b_light_fixtures_palette_random_id;
  12606.     uint32_t r23b_light_fixtures_palette_sig_id; // example value = 0x0CCD9C00
  12607.    
  12608.     // representation 24 board, offset 796
  12609.     // r24b_sound_scenery_
  12610.     uint32_t r24b_sound_scenery_entrycount; // maximum of 256 cells
  12611.     uint32_t r24b_sound_scenery_random_id;
  12612.     uint32_t r24b_sound_scenery_sig_id; // example value = 0xE0CE9C00
  12613.    
  12614.     // representation 25 board, offset 808
  12615.     // r25b_sound_scenery_palette_
  12616.     uint32_t r25b_sound_scenery_palette_entrycount; // maximum of 100 cells
  12617.     uint32_t r25b_sound_scenery_palette_random_id;
  12618.     uint32_t r25b_sound_scenery_palette_sig_id; // example value = 0x54CE9C00
  12619.    
  12620.     // 820, 84
  12621.    
  12622.     // representation 26 board, offset 904
  12623.     // r26b_player_starting_profile_
  12624.     uint32_t r26b_player_starting_profile_entrycount; // maximum of 256 cells
  12625.     uint32_t r26b_player_starting_profile_random_id;
  12626.     uint32_t r26b_player_starting_profile_sig_id; // example value = 0xECC19C00
  12627.    
  12628.     // representation 27 board, offset 916
  12629.     // r27b_player_starting_locations_
  12630.     uint32_t r27b_player_starting_locations_entrycount; // maximum of 256 cells
  12631.     uint32_t r27b_player_starting_locations_random_id;
  12632.     uint32_t r27b_player_starting_locations_sig_id; // example value = 0x90C29C00
  12633.    
  12634.     // representation 28 board, offset 928
  12635.     // r28b_trigger_volumes_
  12636.     uint32_t r28b_trigger_volumes_entrycount; // maximum of 256 cells
  12637.     uint32_t r28b_trigger_volumes_random_id;
  12638.     uint32_t r28b_trigger_volumes_sig_id; // example value = 0x08C39C00
  12639.    
  12640.     // representation 29 board, offset 940
  12641.     // r29b_recorded_animations_
  12642.     uint32_t r29b_recorded_animations_entrycount; // maximum of 1024 cells
  12643.     uint32_t r29b_recorded_animations_random_id;
  12644.     uint32_t r29b_recorded_animations_sig_id; // example value = 0x2043A100
  12645.    
  12646.     // representation 30 board, offset 952
  12647.     // r30b_netgame_flags_
  12648.     uint32_t r30b_netgame_flags_entrycount; // maximum of 200 cells
  12649.     uint32_t r30b_netgame_flags_random_id;
  12650.     uint32_t r30b_netgame_flags_sig_id; // example value = 0xFCC09C00
  12651.    
  12652.     // representation 31 board, offset 964
  12653.     // r31b_netgame_equipment_
  12654.     uint32_t r31b_netgame_equipment_entrycount; // maximum of 200 cells
  12655.     uint32_t r31b_netgame_equipment_random_id;
  12656.     uint32_t r31b_netgame_equipment_sig_id; // example value = 0x94BF9C00
  12657.    
  12658.     // representation 32 board, offset 976
  12659.     // r32b_starting_equipment_
  12660.     uint32_t r32b_starting_equipment_entrycount; // maximum of 200 cells
  12661.     uint32_t r32b_starting_equipment_random_id;
  12662.     uint32_t r32b_starting_equipment_sig_id; // example value = 0x78C09C00
  12663.    
  12664.     // representation 33 board, offset 988
  12665.     // r33b_bsp_switch_trigger_volumes_
  12666.     uint32_t r33b_bsp_switch_trigger_volumes_entrycount; // maximum of 256 cells
  12667.     uint32_t r33b_bsp_switch_trigger_volumes_random_id;
  12668.     uint32_t r33b_bsp_switch_trigger_volumes_sig_id; // example value = 0x70C39C00
  12669.    
  12670.     // representation 34 board, offset 1000
  12671.     // r34b_decals_
  12672.     uint32_t r34b_decals_entrycount; // maximum of n/a cells (MosesofEgypt's reclaimer: 65535)
  12673.     uint32_t r34b_decals_random_id;
  12674.     uint32_t r34b_decals_sig_id; // example value = 0x38D09C00
  12675.    
  12676.     // representation 35 board, offset 1012
  12677.     // r35b_decal_palette_
  12678.     uint32_t r35b_decal_palette_entrycount; // maximum of 128 cells
  12679.     uint32_t r35b_decal_palette_random_id;
  12680.     uint32_t r35b_decal_palette_sig_id; // example value = 0xD0CF9C00
  12681.    
  12682.     // representation 36 board, offset 1024
  12683.     // r36b_detail_object_collection_palette_
  12684.     uint32_t r36b_detail_object_collection_palette_entrycount; // maximum of 32 cells
  12685.     uint32_t r36b_detail_object_collection_palette_random_id;
  12686.     uint32_t r36b_detail_object_collection_palette_sig_id; // example value = 0x30CF9C00
  12687.    
  12688.     // 1036, 84
  12689.    
  12690.     // representation 37 board, offset 1120
  12691.     // r37b_actor_palette_
  12692.     uint32_t r37b_actor_palette_entrycount; // maximum of 64 cells
  12693.     uint32_t r37b_actor_palette_random_id;
  12694.     uint32_t r37b_actor_palette_sig_id; // example value = 0x8C33A100
  12695.    
  12696.     // representation 38 board, offset 1132
  12697.     // r38b_encounters_
  12698.     uint32_t r38b_encounters_entrycount; // maximum of 128 cells
  12699.     uint32_t r38b_encounters_random_id;
  12700.     uint32_t r38b_encounters_sig_id; // example value = 0x8C3FA100
  12701.    
  12702.     // representation 39 board, offset 1144
  12703.     // r39b_command_lists_
  12704.     uint32_t r39b_command_lists_entrycount; // maximum of 256 cells
  12705.     uint32_t r39b_command_lists_random_id;
  12706.     uint32_t r39b_command_lists_sig_id; // example value = 0x4C39A100
  12707.    
  12708.     // representation 40 board, offset 1156
  12709.     // r40b_ai_animation_references_
  12710.     uint32_t r40b_ai_animation_references_entrycount; // maximum of 128 cells
  12711.     uint32_t r40b_ai_animation_references_random_id;
  12712.     uint32_t r40b_ai_animation_references_sig_id; // example value = 0x4837A100
  12713.    
  12714.     // representation 41 board, offset 1168
  12715.     // r41b_ai_script_references_
  12716.     uint32_t r41b_ai_script_references_entrycount; // maximum of 128 cells
  12717.     uint32_t r41b_ai_script_references_random_id;
  12718.     uint32_t r41b_ai_script_references_sig_id; // example value = 0x9837A100
  12719.    
  12720.     // representation 42 board, offset 1180
  12721.     // r42b_ai_recording_references_
  12722.     uint32_t r42b_ai_recording_references_entrycount; // maximum of 128 cells
  12723.     uint32_t r42b_ai_recording_references_random_id;
  12724.     uint32_t r42b_ai_recording_references_sig_id; // example value = 0xE837A100
  12725.    
  12726.     // representation 43 board, offset 1192
  12727.     // r43b_ai_conversations_
  12728.     uint32_t r43b_ai_conversations_entrycount; // maximum of 128 cells
  12729.     uint32_t r43b_ai_conversations_random_id;
  12730.     uint32_t r43b_ai_conversations_sig_id; // example value = 0x6842A100
  12731.    
  12732.     uint32_t script_syntax_data;
  12733.     // 1208, 4
  12734.     // little endian internal board values:
  12735.     uint32_t INTERNAL_script_syntax_data_offset_pointer;
  12736.     uint32_t INTERNAL_script_syntax_data_random1;
  12737.     uint32_t INTERNAL_script_syntax_data_sig_id;   // example value = 0x9C32A100
  12738.    
  12739.     uint32_t script_string_data;
  12740.     // 1228, 4
  12741.     // little endian internal board values:
  12742.     uint32_t INTERNAL_script_string_data_offset_pointer;
  12743.     uint32_t INTERNAL_script_string_data_random1;
  12744.     uint32_t INTERNAL_script_string_data_sig_id;   // example value = 0xAC32A100
  12745.    
  12746.     // representation 44 board, offset 1244
  12747.     // r44b_scripts_
  12748.     uint32_t r44b_scripts_entrycount; // maximum of 512 cells
  12749.     uint32_t r44b_scripts_random_id;
  12750.     uint32_t r44b_scripts_sig_id; // example value = 0xA830A100
  12751.    
  12752.     // representation 45 board, offset 1256
  12753.     // r45b_globals_
  12754.     uint32_t r45b_globals_entrycount; // maximum of 128 cells
  12755.     uint32_t r45b_globals_random_id;
  12756.     uint32_t r45b_globals_sig_id; // example value = 0x2C31A100
  12757.    
  12758.     // representation 46 board, offset 1268
  12759.     // r46b_references_
  12760.     uint32_t r46b_references_entrycount; // maximum of 256 cells
  12761.     uint32_t r46b_references_random_id;
  12762.     uint32_t r46b_references_sig_id; // example value = 0x8831A100
  12763.    
  12764.     // representation 47 board, offset 1280
  12765.     // r47b_source_files_
  12766.     uint32_t r47b_source_files_entrycount; // maximum of 8 cells
  12767.     uint32_t r47b_source_files_random_id;
  12768.     uint32_t r47b_source_files_sig_id; // example value = 0xE831A100
  12769.    
  12770.     // 1292, 24
  12771.    
  12772.     // representation 48 board, offset 1316
  12773.     // r48b_cutscene_flags_
  12774.     uint32_t r48b_cutscene_flags_entrycount; // maximum of 512 cells
  12775.     uint32_t r48b_cutscene_flags_random_id;
  12776.     uint32_t r48b_cutscene_flags_sig_id; // example value = 0xB0D09C00
  12777.    
  12778.     // representation 49 board, offset 1328
  12779.     // r49b_cutscene_camera_points_
  12780.     uint32_t r49b_cutscene_camera_points_entrycount; // maximum of 512 cells
  12781.     uint32_t r49b_cutscene_camera_points_random_id;
  12782.     uint32_t r49b_cutscene_camera_points_sig_id; // example value = 0x40D19C00
  12783.    
  12784.     // representation 50 board, offset 1340
  12785.     // r50b_cutscene_titles_
  12786.     uint32_t r50b_cutscene_titles_entrycount; // maximum of 64 cells
  12787.     uint32_t r50b_cutscene_titles_random_id;
  12788.     uint32_t r50b_cutscene_titles_sig_id; // example value = 0x80D29C00
  12789.    
  12790.     // 1352, 108
  12791.    
  12792.     // dependency 4: custom object names ustr
  12793.     char custom_object_names_tagclass[5];        //unsigned char[5]
  12794.     uint32_t custom_object_names_tagnamepointer;   //uint32 ("random" number)
  12795.     uint32_t custom_object_names_tagnamestringlength;   //uint32
  12796.     uint32_t custom_object_names_tagid;      //uint32 (0xFFFFFFFF with tags)
  12797.     // char custom_object_names_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12798.    
  12799.     // dependency 5: ingame help text ustr
  12800.     char ingame_help_text_tagclass[5];       //unsigned char[5]
  12801.     uint32_t ingame_help_text_tagnamepointer;   //uint32 ("random" number)
  12802.     uint32_t ingame_help_text_tagnamestringlength;   //uint32
  12803.     uint32_t ingame_help_text_tagid;         //uint32 (0xFFFFFFFF with tags)
  12804.     // char ingame_help_text_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12805.    
  12806.     // dependency 6: hud messages hmt
  12807.     char hud_messages_tagclass[5];       //unsigned char[5]
  12808.     uint32_t hud_messages_tagnamepointer;   //uint32 ("random" number)
  12809.     uint32_t hud_messages_tagnamestringlength;   //uint32
  12810.     uint32_t hud_messages_tagid;         //uint32 (0xFFFFFFFF with tags)
  12811.     // char hud_messages_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12812.    
  12813.     // representation 51 board, offset 1508
  12814.     // r51b_structure_bsps_
  12815.     uint32_t r51b_structure_bsps_entrycount; // maximum of 16 cells
  12816.     uint32_t r51b_structure_bsps_random_id;
  12817.     uint32_t r51b_structure_bsps_sig_id; // example value = 0xDCD29C00
  12818.    
  12819.     // -----------------------
  12820.     // offset 1520
  12821.    
  12822.     // tpns 1-3
  12823.    
  12824.     struct scnr_r1c {
  12825.         // representation 1 cells
  12826.         // r1c_skies_
  12827.        
  12828.         // dependency r1c 1: sky sky
  12829.         char r1c1_sky_tagclass[5];       //unsigned char[5]
  12830.         uint32_t r1c1_sky_tagnamepointer;   //uint32 ("random" number)
  12831.         uint32_t r1c1_sky_tagnamestringlength;   //uint32
  12832.         uint32_t r1c1_sky_tagid;         //uint32 (0xFFFFFFFF with tags)
  12833.         // char r1c1_sky_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12834.        
  12835.     }r1c_skies;
  12836.    
  12837.     // tpns r1c1
  12838.    
  12839.     struct scnr_r2c {
  12840.         // representation 2 cells
  12841.         // r2c_child_scenarios_
  12842.        
  12843.         // dependency r2c 1: child scenario scnr
  12844.         char r2c1_child_scenario_tagclass[5];        //unsigned char[5]
  12845.         uint32_t r2c1_child_scenario_tagnamepointer;   //uint32 ("random" number)
  12846.         uint32_t r2c1_child_scenario_tagnamestringlength;   //uint32
  12847.         uint32_t r2c1_child_scenario_tagid;      //uint32 (0xFFFFFFFF with tags)
  12848.         // char r2c1_child_scenario_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12849.        
  12850.         // 16
  12851.        
  12852.     }r2c_child_scenarios;
  12853.    
  12854.     // tpns r2c1
  12855.    
  12856.     struct scnr_r3c {
  12857.         // representation 3 cells
  12858.         // r3c_predicted_resources_
  12859.        
  12860.         uint16_t r3c_predicted_resources_type;
  12861.         uint16_t r3c_predicted_resources_resource_index;
  12862.         uint32_t r3c_predicted_resources_tag_index;
  12863.        
  12864.     }r3c_predicted_resources;
  12865.    
  12866.     struct scnr_r4c {
  12867.         // representation 4 cells
  12868.         // r4c_functions_
  12869.         // 120 bytes
  12870.        
  12871.         uint32_t r4c_functions_flags;   //toff 1520 0x0000000F
  12872.         char r4c_functions_name[32];
  12873.        
  12874.         float r4c_functions_period;
  12875.         uint16_t r4c_functions_scale_period_by_sel;
  12876.        
  12877.         uint16_t r4c_functions_function;
  12878.         uint16_t r4c_functions_scale_function_by_sel;
  12879.        
  12880.         uint16_t r4c_functions_wobble_function;
  12881.         float r4c_functions_wobble_period;
  12882.         float r4c_functions_wobble_magnitude;
  12883.         float r4c_functions_square_wave_threshold_frac;
  12884.         uint16_t r4c_functions_step_count;
  12885.         uint16_t r4c_functions_map_to;
  12886.         uint16_t r4c_functions_sawtooth_count;
  12887.         // 2
  12888.         uint16_t r4c_functions_scale_result_by_sel;
  12889.         uint16_t r4c_functions_bounds_mode;
  12890.         float r4c_functions_bounds_from_frac;
  12891.         float r4c_functions_bounds_to_frac;
  12892.         // 6
  12893.         uint16_t r4c_functions_turn_off_with_sel;
  12894.         // 32
  12895.        
  12896.     }r4c_functions;
  12897.    
  12898.     // editor scenario data goes here
  12899.     // see 1744, 2862 in scnr d40 test data
  12900.    
  12901.     // d40: 4606 | easy: 1948
  12902.    
  12903.     struct scnr_r5c {
  12904.         // representation 5 cells
  12905.         // r5c_comments_
  12906.         // 48 bytes
  12907.        
  12908.         float r5c_comments_position_x;
  12909.         float r5c_comments_position_y;
  12910.         float r5c_comments_position_z;
  12911.        
  12912.         // 16
  12913.        
  12914.         uint32_t r5c_comments_comment;
  12915.         // 4
  12916.         // little endian internal board values:
  12917.         uint32_t r5c_comments_INTERNAL_comment_offset_pointer;   // example value =
  12918.         uint32_t r5c_comments_INTERNAL_comment_random1;
  12919.         uint32_t r5c_comments_INTERNAL_comment_sig_id;   // example value = 0xE8D39C00
  12920.        
  12921.     }r5c_comments;
  12922.    
  12923.     // comment text strings go here; they are null-terminated like tagpathname strings.
  12924.    
  12925.     // d40: 4707 | easy: 2095
  12926.    
  12927.     struct scnr_r6c {
  12928.         // representation 6 cells
  12929.         // r6c_object_names_
  12930.         // 36 bytes
  12931.        
  12932.         char r6c_object_names_name[32];
  12933.         // now come two undocumented internal values which are normally 0
  12934.         uint16_t r6c_object_names_INTERNAL_obje_type;   // the INTERNAL_obje_index value of the referenced object, same as its tag's starting meta value
  12935.         uint16_t r6c_object_names_INTERNAL_obje_id;   // a sequential ID number starting from 0, but I'm not sure exactly how it relates -- I'm guessing it matches a later internal ID of each object (yet to be verified)
  12936.        
  12937.     }r6c_object_names;
  12938.    
  12939.     // d40: 14607 | easy: 2167
  12940.    
  12941.     struct scnr_r7c {
  12942.         // representation 7 cells
  12943.         // r7c_scenery_
  12944.         // 72 bytes
  12945.        
  12946.         uint16_t r7c_scenery_type_sel;
  12947.         uint16_t r7c_scenery_name_sel;
  12948.         // 1
  12949.         uint8_t r7c_scenery_not_placed; //toff 1644 0x0F
  12950.         uint16_t r7c_scenery_desired_permutation;
  12951.         float r7c_scenery_position_x;
  12952.         float r7c_scenery_position_y;
  12953.         float r7c_scenery_position_z;
  12954.         float r7c_scenery_rotation_yaw_rad;
  12955.         float r7c_scenery_rotation_pitch_rad;
  12956.         float r7c_scenery_rotation_roll_rad;
  12957.         // four questionable bytes here
  12958.         // d40: 14639 (0x0000 0208)  -- otherwise 0; apparently ignored by Guerilla
  12959.         // for now, I'm guessing a uint32_t in big endian, value of 520
  12960.         // it looks like it might be two flags values
  12961.         uint32_t r7c_scenery_unknown_1;
  12962.        
  12963.         // 36
  12964.        
  12965.     }r7c_scenery;
  12966.    
  12967.     // d40: 35703 | easy: 2311
  12968.    
  12969.     struct scnr_r8c {
  12970.         // representation 8 cells
  12971.         // r8c_scenery_palette_
  12972.        
  12973.         // dependency r8c 1: name scen
  12974.         char r8c1_name_tagclass[5];      //unsigned char[5]
  12975.         uint32_t r8c1_name_tagnamepointer;   //uint32 ("random" number)
  12976.         uint32_t r8c1_name_tagnamestringlength;   //uint32
  12977.         uint32_t r8c1_name_tagid;        //uint32 (0xFFFFFFFF with tags)
  12978.         // char r8c1_name_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  12979.        
  12980.         // 32
  12981.        
  12982.     }r8c_scenery_palette;
  12983.    
  12984.     // tpns r8c1
  12985.    
  12986.     // d40: 38641 | easy: 2453
  12987.    
  12988.     struct scnr_r9c {
  12989.         // representation 9 cells
  12990.         // r9c_bipeds_
  12991.         // 120 bytes
  12992.        
  12993.         uint16_t r9c_bipeds_type_sel;
  12994.         uint16_t r9c_bipeds_name_sel;
  12995.         // 1
  12996.         uint8_t r9c_bipeds_not_placed;  //toff 1716 0x0F
  12997.         uint16_t r9c_bipeds_desired_permutation;
  12998.        
  12999.         float r9c_bipeds_position_x;
  13000.         float r9c_bipeds_position_y;
  13001.         float r9c_bipeds_position_z;
  13002.         float r9c_bipeds_rotation_yaw_rad;
  13003.         float r9c_bipeds_rotation_pitch_rad;
  13004.         float r9c_bipeds_rotation_roll_rad;
  13005.         // 40
  13006.         float r9c_bipeds_body_vitality;   // frac not enforced
  13007.         uint32_t r9c_bipeds_flags;  //toff 1788 0x00000001
  13008.         // 40
  13009.        
  13010.     }r9c_bipeds;
  13011.    
  13012.     struct scnr_r10c {
  13013.         // representation 10 cells
  13014.         // r10c_biped_palette_
  13015.        
  13016.         // dependency r10c 1: name bipd
  13017.         char r10c1_name_tagclass[5];         //unsigned char[5]
  13018.         uint32_t r10c1_name_tagnamepointer;   //uint32 ("random" number)
  13019.         uint32_t r10c1_name_tagnamestringlength;   //uint32
  13020.         uint32_t r10c1_name_tagid;       //uint32 (0xFFFFFFFF with tags)
  13021.         // char r10c1_name_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13022.        
  13023.         // 32
  13024.        
  13025.     }r10c_biped_palette;
  13026.    
  13027.     // tpns r10c1
  13028.    
  13029.     // d40: 50061 | easy: 2831
  13030.    
  13031.     struct scnr_r11c {
  13032.         // representation 11 cells
  13033.         // r11c_vehicles_
  13034.         // 120 bytes
  13035.        
  13036.         uint16_t r11c_vehicles_type_sel;
  13037.         uint16_t r11c_vehicles_name_sel;
  13038.         // 1
  13039.         uint8_t r11c_vehicles_not_placed;   // toff 1836    0x0F
  13040.         uint16_t r11c_vehicles_desired_permutation;
  13041.         float r11c_vehicles_position_x;
  13042.         float r11c_vehicles_position_y;
  13043.         float r11c_vehicles_position_z;
  13044.         float r11c_vehicles_rotation_yaw_rad;
  13045.         float r11c_vehicles_rotation_pitch_rad;
  13046.         float r11c_vehicles_rotation_roll_rad;
  13047.         // 40
  13048.         float r11c_vehicles_body_vitality;   // frac not enforced
  13049.         uint32_t r11c_vehicles_flags;   //toff 1908 0x00000001
  13050.         // 8
  13051.         uint8_t r11c_vehicles_multiplayer_team_index;   // considered signed
  13052.         // 1
  13053.         uint16_t r11c_vehicles_multiplayer_spawn_flags; //toff 1921 (just in case it uses a third byte) 0xFFFF
  13054.         // 28
  13055.        
  13056.     }r11c_vehicles;
  13057.    
  13058.     struct scnr_r12c {
  13059.         // representation 12 cells
  13060.         // r12c_vehicle_palette_
  13061.        
  13062.         // dependency r12c 1: name vehi
  13063.         char r12c1_name_tagclass[5];         //unsigned char[5]
  13064.         uint32_t r12c1_name_tagnamepointer;   //uint32 ("random" number)
  13065.         uint32_t r12c1_name_tagnamestringlength;   //uint32
  13066.         uint32_t r12c1_name_tagid;       //uint32 (0xFFFFFFFF with tags)
  13067.         // char r12c1_name_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13068.        
  13069.         // 32
  13070.        
  13071.     }r12c_vehicle_palette;
  13072.    
  13073.     // tpns r12c1
  13074.    
  13075.     // d40: 53324 | easy: 3213
  13076.    
  13077.     struct scnr_r13c {
  13078.         // representation 13 cells
  13079.         // r13c_equipment_
  13080.         // 40 bytes
  13081.        
  13082.         uint16_t r13c_equipment_type_sel;
  13083.         uint16_t r13c_equipment_name_sel;
  13084.         // 1
  13085.         uint8_t r13c_equipment_not_placed;  //toff 1956 0x0F
  13086.         uint16_t r13c_equipment_desired_permutation;
  13087.         float r13c_equipment_position_x;
  13088.         float r13c_equipment_position_y;
  13089.         float r13c_equipment_position_z;
  13090.         float r13c_equipment_rotation_yaw_rad;
  13091.         float r13c_equipment_rotation_pitch_rad;
  13092.         float r13c_equipment_rotation_roll_rad;
  13093.         uint16_t r13c_equipment_unknown1;   // undocumented big endian value (first occurrence in d40 @ 57116) (ignored by Guerilla)
  13094.         // 1
  13095.         uint8_t r13c_equipment_misc_flags;  //toff 1986 0x07
  13096.         // 4
  13097.        
  13098.     }r13c_equipment;
  13099.    
  13100.     struct scnr_r14c {
  13101.         // representation 14 cells
  13102.         // r14c_equipment_palette_
  13103.        
  13104.         // dependency r14c 1: name eqip
  13105.         char r14c1_name_tagclass[5];         //unsigned char[5]
  13106.         uint32_t r14c1_name_tagnamepointer;   //uint32 ("random" number)
  13107.         uint32_t r14c1_name_tagnamestringlength;   //uint32
  13108.         uint32_t r14c1_name_tagid;       //uint32 (0xFFFFFFFF with tags)
  13109.         // char r14c1_name_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13110.        
  13111.         // 32
  13112.        
  13113.     }r14c_equipment_palette;
  13114.    
  13115.     // tpns r14c1
  13116.    
  13117.     // d40: 58187 | easy: 3423
  13118.    
  13119.     struct scnr_r15c {
  13120.         // representation 15 cells
  13121.         // r15c_weapons_
  13122.         // 92 bytes
  13123.        
  13124.         uint16_t r15c_weapons_type_sel;
  13125.         uint16_t r15c_weapons_name_sel;
  13126.         // 1
  13127.         uint8_t r15c_weapons_not_placed;    //toff 1996 0x0F
  13128.         uint16_t r15c_weapons_desired_permutation;
  13129.         float r15c_weapons_position_x;
  13130.         float r15c_weapons_position_y;
  13131.         float r15c_weapons_position_z;
  13132.         float r15c_weapons_rotation_yaw_rad;
  13133.         float r15c_weapons_rotation_pitch_rad;
  13134.         float r15c_weapons_rotation_roll_rad;
  13135.         // 40
  13136.         uint16_t r15c_weapons_rounds_left;
  13137.         uint16_t r15c_weapons_rounds_loaded;
  13138.         // 1
  13139.         uint8_t r15c_weapons_flags; //toff 2068 0x07
  13140.         // 14
  13141.        
  13142.     }r15c_weapons;
  13143.    
  13144.     struct scnr_r16c {
  13145.         // representation 16 cells
  13146.         // r16c_weapon_palette_
  13147.        
  13148.         // dependency r16c 1: name weap
  13149.         char r16c1_name_tagclass[5];         //unsigned char[5]
  13150.         uint32_t r16c1_name_tagnamepointer;   //uint32 ("random" number)
  13151.         uint32_t r16c1_name_tagnamestringlength;   //uint32
  13152.         uint32_t r16c1_name_tagid;       //uint32 (0xFFFFFFFF with tags)
  13153.         // char r16c1_name_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13154.        
  13155.         // 32
  13156.        
  13157.     }r16c_weapon_palette;
  13158.    
  13159.     // tpns r16c1
  13160.    
  13161.     struct scnr_r17c {
  13162.         // representation 17 cells
  13163.         // r17c_device_groups_
  13164.         // 52 bytes
  13165.        
  13166.         char r17c_device_groups_name[32];   // improper handling: does not overwrite old residual characters
  13167.         float r17c_device_groups_initial_value;   // frac not enforced
  13168.         uint32_t r17c_device_groups_flags;  //toff 2120 0x00000001
  13169.         // 12
  13170.        
  13171.     }r17c_device_groups;
  13172.    
  13173.     // d40: 65997 | easy: 3851
  13174.    
  13175.     struct scnr_r18c {
  13176.         // representation 18 cells
  13177.         // r18c_machines_
  13178.         // 64 bytes
  13179.        
  13180.         uint16_t r18c_machines_type_sel;
  13181.         uint16_t r18c_machines_name_sel;
  13182.         // 1
  13183.         uint8_t r18c_machines_not_placed;   //toff 2140 0x0F
  13184.         uint16_t r18c_machines_desired_permutation;
  13185.         float r18c_machines_position_x;
  13186.         float r18c_machines_position_y;
  13187.         float r18c_machines_position_z;
  13188.         float r18c_machines_rotation_yaw_rad;
  13189.         float r18c_machines_rotation_pitch_rad;
  13190.         float r18c_machines_rotation_roll_rad;
  13191.         // 8
  13192.         uint16_t r18c_machines_power_group_sel;
  13193.         uint16_t r18c_machines_position_group_sel;
  13194.         uint32_t r18c_machines_flags1;  //toff 2180 0x0000001F
  13195.         uint32_t r18c_machines_flags2;  //toff 2184 0x0000000F
  13196.         // 12
  13197.        
  13198.     }r18c_machines;
  13199.    
  13200.     struct scnr_r19c {
  13201.         // representation 19 cells
  13202.         // r19c_machine_palette_
  13203.        
  13204.         // dependency r19c 1: name mach
  13205.         char r19c1_name_tagclass[5];         //unsigned char[5]
  13206.         uint32_t r19c1_name_tagnamepointer;   //uint32 ("random" number)
  13207.         uint32_t r19c1_name_tagnamestringlength;   //uint32
  13208.         uint32_t r19c1_name_tagid;       //uint32 (0xFFFFFFFF with tags)
  13209.         // char r19c1_name_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13210.        
  13211.         // 32
  13212.        
  13213.     }r19c_machine_palette;
  13214.    
  13215.     // tpns r19c1
  13216.    
  13217.     // d40: 78398 | easy: 4121
  13218.    
  13219.     struct scnr_r20c {
  13220.         // representation 20 cells
  13221.         // r20c_controls_
  13222.         // 64 bytes
  13223.        
  13224.         uint16_t r20c_controls_type_sel;
  13225.         uint16_t r20c_controls_name_sel;
  13226.         // 1
  13227.         uint8_t r20c_controls_not_placed;   //toff 2204 0x0F
  13228.         uint16_t r20c_controls_desired_permutation;
  13229.         float r20c_controls_position_x;
  13230.         float r20c_controls_position_y;
  13231.         float r20c_controls_position_z;
  13232.         float r20c_controls_rotation_yaw_rad;
  13233.         float r20c_controls_rotation_pitch_rad;
  13234.         float r20c_controls_rotation_roll_rad;
  13235.         // 8
  13236.         uint16_t r20c_controls_power_group_sel;
  13237.         uint16_t r20c_controls_position_group_sel;
  13238.         uint32_t r20c_controls_flags1;  //toff 2244 0x0000001F
  13239.         uint32_t r20c_controls_flags2;  //toff 2248 0x00000001
  13240.         uint16_t r20c_controls_do_not_touch_this;   // a sapien-used value (check with previous unknown values) (at one point, I knew what this was)
  13241.        
  13242.         // 10 (...)
  13243.        
  13244.     }r20c_controls;
  13245.    
  13246.     struct scnr_r21c {
  13247.         // representation 21 cells
  13248.         // r21c_control_palette_
  13249.        
  13250.         // dependency r21c 1: name ctrl
  13251.         char r21c1_name_tagclass[5];         //unsigned char[5]
  13252.         uint32_t r21c1_name_tagnamepointer;   //uint32 ("random" number)
  13253.         uint32_t r21c1_name_tagnamestringlength;   //uint32
  13254.         uint32_t r21c1_name_tagid;       //uint32 (0xFFFFFFFF with tags)
  13255.         // char r21c1_name_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13256.        
  13257.         // 32
  13258.        
  13259.     }r21c_control_palette;
  13260.    
  13261.     // tpns r21c1
  13262.    
  13263.     // d40: 78843 (skips to sound scenery) | easy: 4391
  13264.    
  13265.     struct scnr_r22c {
  13266.         // representation 22 cells
  13267.         // r22c_light_fixtures_
  13268.         // 88 bytes
  13269.        
  13270.         uint16_t r22c_light_fixtures_type_sel;
  13271.         uint16_t r22c_light_fixtures_name_sel;
  13272.         // 1
  13273.         uint8_t r22c_light_fixtures_not_placed; //toff 2268 0x0F
  13274.         uint16_t r22c_light_fixtures_desired_permutation;
  13275.         float r22c_light_fixtures_position_x;
  13276.         float r22c_light_fixtures_position_y;
  13277.         float r22c_light_fixtures_position_z;
  13278.         float r22c_light_fixtures_rotation_yaw_rad;
  13279.         float r22c_light_fixtures_rotation_pitch_rad;
  13280.         float r22c_light_fixtures_rotation_roll_rad;
  13281.         // 8
  13282.         uint16_t r22c_light_fixtures_power_group_sel;
  13283.         uint16_t r22c_light_fixtures_position_group_sel;
  13284.         uint32_t r22c_light_fixtures_flags; //toff 2308 0x0000001F
  13285.         float r22c_light_fixtures_color_r_frac;
  13286.         float r22c_light_fixtures_color_g_frac;
  13287.         float r22c_light_fixtures_color_b_frac;
  13288.         float r22c_light_fixtures_intensity;
  13289.         float r22c_light_fixtures_falloff_angle_rad;
  13290.         float r22c_light_fixtures_cutoff_angle_rad;
  13291.         // 16
  13292.        
  13293.     }r22c_light_fixtures;
  13294.    
  13295.     struct scnr_r23c {
  13296.         // representation 23 cells
  13297.         // r23c_light_fixtures_palette_
  13298.        
  13299.         // dependency r23c 1: name lifi
  13300.         char r23c1_name_tagclass[5];         //unsigned char[5]
  13301.         uint32_t r23c1_name_tagnamepointer;   //uint32 ("random" number)
  13302.         uint32_t r23c1_name_tagnamestringlength;   //uint32
  13303.         uint32_t r23c1_name_tagid;       //uint32 (0xFFFFFFFF with tags)
  13304.         // char r23c1_name_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13305.        
  13306.         // 32
  13307.        
  13308.     }r23c_light_fixtures_palette;
  13309.    
  13310.     // tpns r23c1
  13311.    
  13312.     struct scnr_r24c {
  13313.         // representation 24 cells
  13314.         // r24c_sound_scenery_
  13315.         // 40 bytes
  13316.        
  13317.         uint16_t r24c_sound_scenery_type_sel;
  13318.         uint16_t r24c_sound_scenery_name_sel;
  13319.         // 1
  13320.         uint8_t r24c_sound_scenery_not_placed;  //toff 2356 0x0F
  13321.         uint16_t r24c_sound_scenery_desired_permutation;
  13322.         float r24c_sound_scenery_position_x;
  13323.         float r24c_sound_scenery_position_y;
  13324.         float r24c_sound_scenery_position_z;
  13325.         float r24c_sound_scenery_rotation_yaw_rad;
  13326.         float r24c_sound_scenery_rotation_pitch_rad;
  13327.         float r24c_sound_scenery_rotation_roll_rad;
  13328.         // 8
  13329.        
  13330.     }r24c_sound_scenery;
  13331.    
  13332.     struct scnr_r25c {
  13333.         // representation 25 cells
  13334.         // r25c_sound_scenery_palette_
  13335.        
  13336.         // dependency r25c 1: name ssce
  13337.         char r25c1_name_tagclass[5];         //unsigned char[5]
  13338.         uint32_t r25c1_name_tagnamepointer;   //uint32 ("random" number)
  13339.         uint32_t r25c1_name_tagnamestringlength;   //uint32
  13340.         uint32_t r25c1_name_tagid;       //uint32 (0xFFFFFFFF with tags)
  13341.         // char r25c1_name_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13342.        
  13343.         // 32
  13344.        
  13345.     }r25c_sound_scenery_palette;
  13346.    
  13347.     // tpns r25c1
  13348.    
  13349.     // d40: 80907 | easy: 4957
  13350.    
  13351.     struct scnr_r26c {
  13352.         // representation 26 cells
  13353.         // r26c_player_starting_profile_
  13354.         // 104 bytes
  13355.        
  13356.         char r26c_player_starting_profile_name[32];
  13357.         float r26c_player_starting_profile_starting_health_modifier_frac;
  13358.         float r26c_player_starting_profile_starting_shield_modifier_frac;
  13359.        
  13360.         // dependency r26c 1: primary weapon weap
  13361.         char r26c1_primary_weapon_tagclass[5];       //unsigned char[5]
  13362.         uint32_t r26c1_primary_weapon_tagnamepointer;   //uint32 ("random" number)
  13363.         uint32_t r26c1_primary_weapon_tagnamestringlength;   //uint32
  13364.         uint32_t r26c1_primary_weapon_tagid;         //uint32 (0xFFFFFFFF with tags)
  13365.         // char r26c1_primary_weapon_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13366.        
  13367.         uint16_t r26c_player_starting_profile_primary_weapon_rounds_loaded;
  13368.         uint16_t r26c_player_starting_profile_primary_weapon_rounds_total;
  13369.        
  13370.         // dependency r26c 2: secondary weapon weap
  13371.         char r26c2_secondary_weapon_tagclass[5];         //unsigned char[5]
  13372.         uint32_t r26c2_secondary_weapon_tagnamepointer;   //uint32 ("random" number)
  13373.         uint32_t r26c2_secondary_weapon_tagnamestringlength;   //uint32
  13374.         uint32_t r26c2_secondary_weapon_tagid;       //uint32 (0xFFFFFFFF with tags)
  13375.         // char r26c2_secondary_weapon_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13376.        
  13377.         uint16_t r26c_player_starting_profile_secondary_weapon_rounds_loaded;
  13378.         uint16_t r26c_player_starting_profile_secondary_weapon_rounds_total;
  13379.        
  13380.         // these are considered signed, as always/usual
  13381.         uint8_t r26c_player_starting_profile_starting_fragmentation_grenade_count;
  13382.         uint8_t r26c_player_starting_profile_starting_plasma_grenade_count;
  13383.         uint8_t r26c_player_starting_profile_starting_unknown1_grenade_count;
  13384.         uint8_t r26c_player_starting_profile_starting_unknown2_grenade_count;
  13385.        
  13386.         // 20
  13387.        
  13388.     }r26c_player_starting_profile;
  13389.    
  13390.     // tpns {r26c1 r26c2}
  13391.    
  13392.     // d40: 81257 | easy: 5229
  13393.    
  13394.     struct scnr_r27c {
  13395.         // representation 27 cells
  13396.         // r27c_player_starting_locations_
  13397.         // 52 bytes
  13398.        
  13399.         float r27c_player_starting_locations_position_x;
  13400.         float r27c_player_starting_locations_position_y;
  13401.         float r27c_player_starting_locations_position_z;
  13402.         float r27c_player_starting_locations_facing_rad;
  13403.         uint16_t r27c_player_starting_locations_team_index;
  13404.         uint16_t r27c_player_starting_locations_bsp_index;
  13405.         uint16_t r27c_player_starting_locations_type_0;
  13406.         uint16_t r27c_player_starting_locations_type_1;
  13407.         uint16_t r27c_player_starting_locations_type_2;
  13408.         uint16_t r27c_player_starting_locations_type_3;
  13409.        
  13410.         // 24
  13411.        
  13412.     }r27c_player_starting_locations;
  13413.    
  13414.     // d40: 81361 | easy: 5333
  13415.    
  13416.     struct scnr_r28c {
  13417.         // representation 28 cells
  13418.         // r28c_trigger_volumes_
  13419.         // 96 bytes
  13420.        
  13421.         uint32_t r28c_trigger_volumes_INTERNAL_processed_flags;   // 1 if processed (I'm guessing here, since all the values are 1.)
  13422.        
  13423.         char r28c_trigger_volumes_name[32];
  13424.        
  13425.         // 60 undocumented bytes in big endian:
  13426.        
  13427.         // 12
  13428.         float r28c_trigger_volumes_unknown1;   // ex: 1
  13429.         // 8
  13430.         float r28c_trigger_volumes_unknown2_rad;   // ex: 0
  13431.         float r28c_trigger_volumes_unknown3_rad;   // ex: 0
  13432.         float r28c_trigger_volumes_unknown4;   // ex: 1
  13433.        
  13434.         float r28c_trigger_volumes_unknown5;   // ex: -29.5419
  13435.         float r28c_trigger_volumes_unknown6;   // ex: 20.3201
  13436.         float r28c_trigger_volumes_unknown7;   // ex: -0.0705384
  13437.         float r28c_trigger_volumes_unknown8;   // ex: 1.98238
  13438.         float r28c_trigger_volumes_unknown9;   // ex: 2.10164
  13439.         float r28c_trigger_volumes_unknown10;   // ex: 1.52086
  13440.        
  13441.     }r28c_trigger_volumes;
  13442.    
  13443.     // d40: 96529 | easy: 5525
  13444.    
  13445.     struct scnr_r29c {
  13446.         // representation 29 cells
  13447.         // r29c_recorded_animations_
  13448.         // 64 bytes
  13449.        
  13450.         char r29c_recorded_animations_name[32];
  13451.         uint8_t r29c_recorded_animations_version;
  13452.         uint8_t r29c_recorded_animations_raw_animation_data;
  13453.         uint8_t r29c_recorded_animations_unit_control_data_version;
  13454.         // 1
  13455.         uint16_t r29c_recorded_animations_length_of_animation;
  13456.         // 6
  13457.        
  13458.         uint32_t r29c_recorded_animations_recorded_animation_event_stream;
  13459.         // 4
  13460.         // little endian internal board values:
  13461.         uint32_t r29c_recorded_animations_INTERNAL_recorded_animation_event_stream_offset_pointer;   // example value =
  13462.         uint32_t r29c_recorded_animations_INTERNAL_recorded_animation_event_stream_random1;
  13463.         uint32_t r29c_recorded_animations_INTERNAL_recorded_animation_event_stream_sig_id;   // example value = 0x9842A100
  13464.        
  13465.     }r29c_recorded_animations;
  13466.    
  13467.     // recorded animation event stream data goes here
  13468.     // d40 example offset: 97233, 502 first cell, 10486 total for all cells
  13469.    
  13470.     // next offsets -- d40: 107719 (skips to decals) | easy: 5653
  13471.    
  13472.     struct scnr_r30c {
  13473.         // representation 30 cells
  13474.         // r30c_netgame_flags_
  13475.         // 148 bytes
  13476.        
  13477.         float r30c_netgame_flags_position_x;
  13478.         float r30c_netgame_flags_position_y;
  13479.         float r30c_netgame_flags_position_z;
  13480.         float r30c_netgame_flags_facing_rad;
  13481.         uint16_t r30c_netgame_flags_type;
  13482.         uint16_t r30c_netgame_flags_team_index;
  13483.        
  13484.         // dependency r30c 1: weapon group itmc
  13485.         char r30c1_weapon_group_tagclass[5];         //unsigned char[5]
  13486.         uint32_t r30c1_weapon_group_tagnamepointer;   //uint32 ("random" number)
  13487.         uint32_t r30c1_weapon_group_tagnamestringlength;   //uint32
  13488.         uint32_t r30c1_weapon_group_tagid;       //uint32 (0xFFFFFFFF with tags)
  13489.         // char r30c1_weapon_group_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13490.        
  13491.         // 112 (CHECK ME)
  13492.        
  13493.     }r30c_netgame_flags;
  13494.    
  13495.     // tpns r30c1
  13496.    
  13497.     struct scnr_r31c {
  13498.         // representation 31 cells
  13499.         // r31c_netgame_equipment_
  13500.         // 144 bytes
  13501.        
  13502.         uint32_t r31c_netgame_equipment_flags;  //toff 2392 0x00000001
  13503.         uint16_t r31c_netgame_equipment_type_0;
  13504.         uint16_t r31c_netgame_equipment_type_1;
  13505.         uint16_t r31c_netgame_equipment_type_2;
  13506.         uint16_t r31c_netgame_equipment_type_3;
  13507.         uint16_t r31c_netgame_equipment_team_index;
  13508.         uint16_t r31c_netgame_equipment_spawn_time;
  13509.         // 48 (CHECK ME)
  13510.         float r31c_netgame_equipment_position_x;
  13511.         float r31c_netgame_equipment_position_y;
  13512.         float r31c_netgame_equipment_position_z;
  13513.         float r31c_netgame_equipment_facing_rad;
  13514.        
  13515.         // dependency r31c 1: item collection itmc
  13516.         char r31c1_item_collection_tagclass[5];      //unsigned char[5]
  13517.         uint32_t r31c1_item_collection_tagnamepointer;   //uint32 ("random" number)
  13518.         uint32_t r31c1_item_collection_tagnamestringlength;   //uint32
  13519.         uint32_t r31c1_item_collection_tagid;        //uint32 (0xFFFFFFFF with tags)
  13520.         // char r31c1_item_collection_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13521.        
  13522.         // 48 (CHECK ME)
  13523.        
  13524.     }r31c_netgame_equipment;
  13525.    
  13526.     // tpns r31c1
  13527.    
  13528.     struct scnr_r32c {
  13529.         // representation 32 cells
  13530.         // r32c_starting_equipment_
  13531.         // 204 bytes
  13532.        
  13533.         uint32_t r32c_starting_equipment_flags; //toff 2536 0x00000003
  13534.         uint16_t r32c_starting_equipment_type_0;
  13535.         uint16_t r32c_starting_equipment_type_1;
  13536.         uint16_t r32c_starting_equipment_type_2;
  13537.         uint16_t r32c_starting_equipment_type_3;
  13538.         // 48 (CHECK ME)
  13539.        
  13540.         // dependency r32c 1: item collection 1 itmc
  13541.         char r32c1_item_collection_1_tagclass[5];        //unsigned char[5]
  13542.         uint32_t r32c1_item_collection_1_tagnamepointer;   //uint32 ("random" number)
  13543.         uint32_t r32c1_item_collection_1_tagnamestringlength;   //uint32
  13544.         uint32_t r32c1_item_collection_1_tagid;      //uint32 (0xFFFFFFFF with tags)
  13545.         // char r32c1_item_collection_1_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13546.        
  13547.         // dependency r32c 2: item collection 2 itmc
  13548.         char r32c2_item_collection_2_tagclass[5];        //unsigned char[5]
  13549.         uint32_t r32c2_item_collection_2_tagnamepointer;   //uint32 ("random" number)
  13550.         uint32_t r32c2_item_collection_2_tagnamestringlength;   //uint32
  13551.         uint32_t r32c2_item_collection_2_tagid;      //uint32 (0xFFFFFFFF with tags)
  13552.         // char r32c2_item_collection_2_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13553.        
  13554.         // dependency r32c 3: item collection 3 itmc
  13555.         char r32c3_item_collection_3_tagclass[5];        //unsigned char[5]
  13556.         uint32_t r32c3_item_collection_3_tagnamepointer;   //uint32 ("random" number)
  13557.         uint32_t r32c3_item_collection_3_tagnamestringlength;   //uint32
  13558.         uint32_t r32c3_item_collection_3_tagid;      //uint32 (0xFFFFFFFF with tags)
  13559.         // char r32c3_item_collection_3_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13560.        
  13561.         // dependency r32c 4: item collection 4 itmc
  13562.         char r32c4_item_collection_4_tagclass[5];        //unsigned char[5]
  13563.         uint32_t r32c4_item_collection_4_tagnamepointer;   //uint32 ("random" number)
  13564.         uint32_t r32c4_item_collection_4_tagnamestringlength;   //uint32
  13565.         uint32_t r32c4_item_collection_4_tagid;      //uint32 (0xFFFFFFFF with tags)
  13566.         // char r32c4_item_collection_4_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13567.        
  13568.         // dependency r32c 5: item collection 5 itmc
  13569.         char r32c5_item_collection_5_tagclass[5];        //unsigned char[5]
  13570.         uint32_t r32c5_item_collection_5_tagnamepointer;   //uint32 ("random" number)
  13571.         uint32_t r32c5_item_collection_5_tagnamestringlength;   //uint32
  13572.         uint32_t r32c5_item_collection_5_tagid;      //uint32 (0xFFFFFFFF with tags)
  13573.         // char r32c5_item_collection_5_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13574.        
  13575.         // dependency r32c 6: item collection 6 itmc
  13576.         char r32c6_item_collection_6_tagclass[5];        //unsigned char[5]
  13577.         uint32_t r32c6_item_collection_6_tagnamepointer;   //uint32 ("random" number)
  13578.         uint32_t r32c6_item_collection_6_tagnamestringlength;   //uint32
  13579.         uint32_t r32c6_item_collection_6_tagid;      //uint32 (0xFFFFFFFF with tags)
  13580.         // char r32c6_item_collection_6_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13581.        
  13582.         // 48 (CHECK ME)
  13583.        
  13584.     }r32c_starting_equipment;
  13585.    
  13586.     // tpns {r32c1 r32c2 r32c3 r32c4 r32c5 r32c6}
  13587.    
  13588.     // bsp switch trigger volumes go here (needs reverse engineering; unused by d40)
  13589.    
  13590.     struct scnr_r33c {
  13591.         // representation 33 cells
  13592.         // r33c_bsp_switch_trigger_volumes_
  13593.         // 8 bytes
  13594.        
  13595.         uint16_t r33c_bsp_switch_trigger_volumes_trigger_volume_sel;
  13596.         uint16_t r33c_bsp_switch_trigger_volumes_source;
  13597.         uint16_t r33c_bsp_switch_trigger_volumes_destination;
  13598.         // 2 (CHECK ME)
  13599.        
  13600.     }r33c_bsp_switch_trigger_volumes;
  13601.    
  13602.     // d40: 107719 (skipped previous sections) | easy: 6935 (with 16 previous bytes forced)
  13603.    
  13604.     struct scnr_r34c {
  13605.         // representation 34 cells
  13606.         // r34c_decals_
  13607.         // 16 bytes
  13608.        
  13609.         uint16_t r34c_decals_decal_type_sel;
  13610.         uint8_t r34c_decals_yaw;
  13611.         uint8_t r34c_decals_pitch;
  13612.         float r34c_decals_position_x;
  13613.         float r34c_decals_position_y;
  13614.         float r34c_decals_position_z;
  13615.        
  13616.     }r34c_decals;
  13617.    
  13618.     struct scnr_r35c {
  13619.         // representation 35 cells
  13620.         // r35c_decal_palette_
  13621.        
  13622.         // dependency r35c 1: reference deca
  13623.         char r35c1_reference_tagclass[5];        //unsigned char[5]
  13624.         uint32_t r35c1_reference_tagnamepointer;   //uint32 ("random" number)
  13625.         uint32_t r35c1_reference_tagnamestringlength;   //uint32
  13626.         uint32_t r35c1_reference_tagid;      //uint32 (0xFFFFFFFF with tags)
  13627.         // char r35c1_reference_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13628.        
  13629.     }r35c_decal_palette;
  13630.    
  13631.     // tpns r35c1
  13632.    
  13633.     struct scnr_r36c {
  13634.         // representation 36 cells
  13635.         // r36c_detail_object_collection_palette_
  13636.        
  13637.         // dependency r36c 1: name dobc
  13638.         char r36c1_name_tagclass[5];         //unsigned char[5]
  13639.         uint32_t r36c1_name_tagnamepointer;   //uint32 ("random" number)
  13640.         uint32_t r36c1_name_tagnamestringlength;   //uint32
  13641.         uint32_t r36c1_name_tagid;       //uint32 (0xFFFFFFFF with tags)
  13642.         // char r36c1_name_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13643.        
  13644.         // 32 (CHECK ME) (has precedent)
  13645.        
  13646.     }r36c_detail_object_collection_palette;
  13647.    
  13648.     // tpns r36c1
  13649.    
  13650.     struct scnr_r37c {
  13651.         // representation 37 cells
  13652.         // r37c_actor_palette_
  13653.        
  13654.         // dependency r37c 1: reference actv
  13655.         char r37c1_reference_tagclass[5];        //unsigned char[5]
  13656.         uint32_t r37c1_reference_tagnamepointer;   //uint32 ("random" number)
  13657.         uint32_t r37c1_reference_tagnamestringlength;   //uint32
  13658.         uint32_t r37c1_reference_tagid;      //uint32 (0xFFFFFFFF with tags)
  13659.         // char r37c1_reference_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13660.        
  13661.     }r37c_actor_palette;
  13662.    
  13663.     // tpns r37c1
  13664.    
  13665.     // d40: 116737 | easy: 7311 (includes previous forced data), or 7295 (without forced data)
  13666.    
  13667.     struct scnr_r38c {
  13668.         // representation 38 cells
  13669.         // r38c_encounters_
  13670.         // 176 bytes
  13671.        
  13672.         char r38c_encounters_name[32];   // improper removal of existing data
  13673.         uint32_t r38c_encounters_flags; //toff 2772 0x0000007F
  13674.         uint16_t r38c_encounters_team_index;
  13675.         uint16_t r38c_encounters_INTERNAL_unknown1;   // has something to do with team index, ex: 1
  13676.         uint16_t r38c_encounters_search_behavior;
  13677.         uint16_t r38c_encounters_manual_bsp_index;
  13678.         float r38c_encounters_respawn_delay_from;
  13679.         float r38c_encounters_respawn_delay_to;
  13680.         // 74
  13681.         uint16_t r38c_encounters_INTERNAL_unknown2;   // ex: 7   something to do with scripting?
  13682.        
  13683.         // representation 38 sub-board A
  13684.         // r38sbA_squads_
  13685.         uint32_t r38sbA_squads_entrycount; // maximum of 64 cells
  13686.         uint32_t r38sbA_squads_random_id;
  13687.         uint32_t r38sbA_squads_sig_id; // example value = 0x543EA100
  13688.        
  13689.         // representation 38 sub-board B
  13690.         // r38sbB_platoons_
  13691.         uint32_t r38sbB_platoons_entrycount; // maximum of 32 cells
  13692.         uint32_t r38sbB_platoons_random_id;
  13693.         uint32_t r38sbB_platoons_sig_id; // example value = 0x203CA100
  13694.        
  13695.         // representation 38 sub-board C
  13696.         // r38sbC_firing_positions_
  13697.         uint32_t r38sbC_firing_positions_entrycount; // maximum of 512 cells
  13698.         uint32_t r38sbC_firing_positions_random_id;
  13699.         uint32_t r38sbC_firing_positions_sig_id; // example value = 0x003BA100
  13700.        
  13701.         // representation 38 sub-board D
  13702.         // r38sbD_player_starting_locations_
  13703.         uint32_t r38sbD_player_starting_locations_entrycount; // maximum of 256 cells
  13704.         uint32_t r38sbD_player_starting_locations_random_id;
  13705.         uint32_t r38sbD_player_starting_locations_sig_id; // example value = 0x90C29C00
  13706.        
  13707.     }r38c_encounters;
  13708.    
  13709.     // d40: 126593 | easy: 7647
  13710.     struct scnr_r38sc {
  13711.        
  13712.         struct scnr_r38scA {
  13713.             // representation 38 sub-cells A
  13714.             // r38scA_squads_
  13715.             // 232 bytes
  13716.            
  13717.             char r38scA_squads_name[32];
  13718.             uint16_t r38scA_squads_actor_type_sel;
  13719.             uint16_t r38scA_squads_platoon_sel;
  13720.             uint16_t r38scA_squads_initial_state;
  13721.             uint16_t r38scA_squads_return_state;
  13722.             uint32_t r38scA_squads_flags;   //toff 2956 0x0000003F
  13723.             uint16_t r38scA_squads_unique_leader_type;
  13724.             // 32
  13725.             uint16_t r38scA_squads_maneuver_to_squad_sel;
  13726.             float r38scA_squads_squad_delay_time;
  13727.             uint32_t r38scA_squads_attacking;   //toff 3000 (these 7 groups visibly use all 4 bytes)    0x03FFFFFF
  13728.             uint32_t r38scA_squads_attacking_search;
  13729.             uint32_t r38scA_squads_attacking_guard;
  13730.             uint32_t r38scA_squads_defending;
  13731.             uint32_t r38scA_squads_defending_search;
  13732.             uint32_t r38scA_squads_defending_guard;
  13733.             uint32_t r38scA_squads_pursuing;
  13734.             // 12
  13735.             uint16_t r38scA_squads_normal_difficulty_count;
  13736.             uint16_t r38scA_squads_insane_difficulty_count;
  13737.             uint16_t r38scA_squads_major_upgrade;
  13738.             // 2
  13739.             uint16_t r38scA_squads_respawn_minimum_actors;
  13740.             uint16_t r38scA_squads_respawn_maximum_actors;
  13741.             uint16_t r38scA_squads_respawn_total;
  13742.             // 2
  13743.             float r38scA_squads_respawn_delay_from;
  13744.             float r38scA_squads_respawn_delay_to;
  13745.             // 48
  13746.            
  13747.             // representation 38 sub-cells A sub-board a
  13748.             // r38scAsba_move_positions_
  13749.             uint32_t r38scAsba_move_positions_entrycount; // maximum of 32 cells
  13750.             uint32_t r38scAsba_move_positions_random_id;
  13751.             uint32_t r38scAsba_move_positions_sig_id; // example value = 0x983AA100
  13752.            
  13753.             // representation 38 sub-cells A sub-board b
  13754.             // r38scAsbb_starting_locations_
  13755.             uint32_t r38scAsbb_starting_locations_entrycount; // maximum of 32 cells
  13756.             uint32_t r38scAsbb_starting_locations_random_id;
  13757.             uint32_t r38scAsbb_starting_locations_sig_id; // example value = 0xF039A100
  13758.            
  13759.             // 12
  13760.            
  13761.            
  13762.         }r38scA_encounters_squads;
  13763.        
  13764.         // mis-grouped data (somewhat; or perhaps more organized, but not so much as a nested array tree would be)
  13765.         // here, we have sub-cells data for all r38scA cells, organized as {{r38scAsca} {r38scAscb}}
  13766.         // so: squad 1 sub-cells a, squad 1 sub-cells b, squad 2 sub-cells a, squad 2 sub-cells b
  13767.         // so all for the current cell, all for the current sub-cell, grouped by sub-cell (it's confusing to say it like that)
  13768.        
  13769.         struct scnr_r38scAsc {
  13770.             // d40: 127289 (skips to next) | easy: 8111
  13771.            
  13772.             struct scnr_r38scAsca {
  13773.                 // representation 38 sub-cells A sub-cells a
  13774.                 // r38scAsca_move_positions_
  13775.                 // 80 bytes
  13776.                
  13777.                 float r38scAsca_move_positions_position_x;
  13778.                 float r38scAsca_move_positions_position_y;
  13779.                 float r38scAsca_move_positions_position_z;
  13780.                 float r38scAsca_move_positions_facing_rad;
  13781.                 float r38scAsca_move_positions_weight;
  13782.                 float r38scAsca_move_positions_time_from;
  13783.                 float r38scAsca_move_positions_time_to;
  13784.                 uint16_t r38scAsca_move_positions_animation_sel;
  13785.                 uint8_t r38scAsca_move_positions_sequence_id;
  13786.                 // 45 (!)
  13787.                 uint32_t r38scAsca_move_positions_surface_index;
  13788.                
  13789.             }r38scAsca_encounters_squads_move_positions;
  13790.            
  13791.             // d40: (same as previous, skipped previous) | easy: 8271
  13792.            
  13793.             struct scnr_r38scAscb {
  13794.                 // representation 38 sub-cells A sub-cells b
  13795.                 // r38scAscb_starting_locations_
  13796.                 // 28 bytes
  13797.                
  13798.                 float r38scAscb_starting_locations_position_x;
  13799.                 float r38scAscb_starting_locations_position_y;
  13800.                 float r38scAscb_starting_locations_position_z;
  13801.                 float r38scAscb_starting_locations_facing_rad;
  13802.                
  13803.                 uint16_t r38scAscb_starting_locations_INTERNAL_unknown;   // ex: 4, -1   (an example of why I can't right now presume zero values to be padding)
  13804.                
  13805.                 uint8_t r38scAscb_starting_locations_sequence_id;
  13806.                 uint8_t r38scAscb_starting_locations_flags; //toff 3167 (untested)  0x01
  13807.                 uint16_t r38scAscb_starting_locations_return_state;
  13808.                 uint16_t r38scAscb_starting_locations_initial_state;
  13809.                 uint16_t r38scAscb_starting_locations_actor_type_sel;
  13810.                 uint16_t r38scAscb_starting_locations_command_list_sel;
  13811.                
  13812.             }r38scAscb_encounters_squads_starting_locations;
  13813.         }r38scAsc_container;
  13814.        
  13815.         // d40: 127877 | easy: 8543
  13816.         struct scnr_r38scB {
  13817.             // representation 38 sub-cells B
  13818.             // r38scB_platoons_
  13819.             // 172 bytes
  13820.            
  13821.             char r38scB_platoons_name[32];
  13822.             uint32_t r38scB_platoons_flags; //toff 3208 0x00000007
  13823.             // 12
  13824.             uint16_t r38scB_platoons_change_attacking_defending_state_when;
  13825.             uint16_t r38scB_platoons_change_state_happens_to_sel;
  13826.             // 8
  13827.             uint16_t r38scB_platoons_maneuver_when;
  13828.             uint16_t r38scB_platoons_maneuver_happens_to_sel;
  13829.             // 108
  13830.            
  13831.         }r38scB_encounters_platoons;
  13832.        
  13833.         // d40: 128049 | easy: 8887
  13834.        
  13835.         struct scnr_r38scC {
  13836.             // representation 38 sub-cells C
  13837.             // r38scC_firing_positions_
  13838.             // 24 bytes
  13839.            
  13840.             float r38scC_firing_positions_position_x;
  13841.             float r38scC_firing_positions_position_y;
  13842.             float r38scC_firing_positions_position_z;
  13843.             uint16_t r38scC_firing_positions_group_index;
  13844.             uint16_t r38scC_firing_positions_INTERNAL_unknown;   // ex: 4, 6// similar to: uint16_t r38scAscb_starting_locations_INTERNAL_unknown;   // ex: 4, -1
  13845.             // 4
  13846.             uint32_t r38scC_firing_positions_INTERNAL_unknown2_bigendian; // ex: 124, 619, 152, 193 (either 2 or 4 bytes -- looks like 4 bytes)
  13847.            
  13848.         }r38scC_encounters_firing_positions;
  13849.        
  13850.         // easy: 8935
  13851.        
  13852.         struct scnr_r38scD {
  13853.             // representation 38 sub-cells D
  13854.             // r38scD_player_starting_locations_
  13855.             // 52 bytes
  13856.             float r38scD_player_starting_locations_position_x;
  13857.             float r38scD_player_starting_locations_position_y;
  13858.             float r38scD_player_starting_locations_position_z;
  13859.             float r38scD_player_starting_locations_facing_rad;
  13860.             uint16_t r38scD_player_starting_locations_team_index;
  13861.             uint16_t r38scD_player_starting_locations_bsp_index;
  13862.             uint16_t r38scD_player_starting_locations_type_0;
  13863.             uint16_t r38scD_player_starting_locations_type_1;
  13864.             uint16_t r38scD_player_starting_locations_type_2;
  13865.             uint16_t r38scD_player_starting_locations_type_3;
  13866.             // 24
  13867.            
  13868.         }r38scD_encounters_player_starting_locations;
  13869.        
  13870.     }r38sc_container;
  13871.    
  13872.     // d40: 250797 | easy: 10431
  13873.    
  13874.     struct scnr_r39c {
  13875.         // representation 39 cells
  13876.         // r39c_command_lists_
  13877.         // 96 bytes
  13878.        
  13879.         char r39c_command_lists_name[32];
  13880.         uint32_t r39c_command_lists_flags;  //toff 3380 0x0000003F
  13881.         // 8
  13882.         uint16_t r39c_command_lists_manual_bsp_index;
  13883.         uint16_t r39c_command_lists_INTERNAL_unknown_sel;   // ex: -1; not sure about endianness, probably little endian, like most 2-byte Internal values
  13884.        
  13885.         // representation 39 sub-board A
  13886.         // r39sbA_commands_
  13887.         uint32_t r39sbA_commands_entrycount; // maximum of 64 cells
  13888.         uint32_t r39sbA_commands_random_id;
  13889.         uint32_t r39sbA_commands_sig_id; // example value = 0xB438A100
  13890.        
  13891.         // representation 39 sub-board B
  13892.         // r39sbB_points_
  13893.         uint32_t r39sbB_points_entrycount; // maximum of 64 cells
  13894.         uint32_t r39sbB_points_random_id;
  13895.         uint32_t r39sbB_points_sig_id; // example value = 0xE036A100
  13896.        
  13897.         // 24
  13898.        
  13899.     }r39c_command_lists;
  13900.    
  13901.     // d40: 257421 | easy: 10623
  13902.     struct scnr_r39sc {
  13903.        
  13904.         struct scnr_r39scA {
  13905.             // representation 39 sub-cells A
  13906.             // r39scA_commands_
  13907.             // 32 bytes
  13908.            
  13909.             uint16_t r39scA_commands_atom_type;
  13910.             uint16_t r39scA_commands_atom_modifier;
  13911.             float r39scA_commands_parameter_1;
  13912.             float r39scA_commands_parameter_2;
  13913.             uint16_t r39scA_commands_point_1_sel;
  13914.             uint16_t r39scA_commands_point_2_sel;
  13915.             uint16_t r39scA_commands_animation_sel;
  13916.             uint16_t r39scA_commands_script_sel;
  13917.             uint16_t r39scA_commands_recording_sel;
  13918.             uint16_t r39scA_commands_command_sel;
  13919.             uint16_t r39scA_commands_object_name_sel;
  13920.             // 6
  13921.            
  13922.         }r39scA_command_lists_commands;
  13923.        
  13924.         struct scnr_r39scB {
  13925.             // representation 39 sub-cells B
  13926.             // r39scB_points_
  13927.             // 20 bytes
  13928.            
  13929.             float r39scB_points_position_x;
  13930.             float r39scB_points_position_y;
  13931.             float r39scB_points_position_z;
  13932.             // 8
  13933.            
  13934.         }r39scB_command_lists_points;
  13935.        
  13936.     }r39sc_container;
  13937.    
  13938.     // d40: 267905 | easy: 10831
  13939.    
  13940.     struct scnr_r40c {
  13941.         // representation 40 cells
  13942.         // r40c_ai_animation_references_
  13943.        
  13944.         char r40c_ai_animation_references_animation_name[32];
  13945.        
  13946.         // dependency r40c 1: animation graph antr
  13947.         char r40c1_animation_graph_tagclass[5];      //unsigned char[5]
  13948.         uint32_t r40c1_animation_graph_tagnamepointer;   //uint32 ("random" number)
  13949.         uint32_t r40c1_animation_graph_tagnamestringlength;   //uint32
  13950.         uint32_t r40c1_animation_graph_tagid;        //uint32 (0xFFFFFFFF with tags)
  13951.         // char r40c1_animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  13952.        
  13953.         // 12
  13954.        
  13955.     }r40c_ai_animation_references;
  13956.    
  13957.     // tpns r40c1
  13958.    
  13959.     struct scnr_r41c {
  13960.         // representation 41 cells
  13961.         // r41c_ai_script_references_
  13962.        
  13963.         char r41c_ai_script_references_script_name[32];
  13964.         // 8
  13965.        
  13966.     }r41c_ai_script_references;
  13967.    
  13968.     struct scnr_r42c {
  13969.         // representation 42 cells
  13970.         // r42c_ai_recording_references_
  13971.        
  13972.         char r42c_ai_recording_references_recording_name[32];
  13973.         // 8
  13974.        
  13975.     }r42c_ai_recording_references;
  13976.    
  13977.     // easy: 11147
  13978.    
  13979.     struct scnr_r43c {
  13980.         // representation 43 cells
  13981.         // r43c_ai_conversations_
  13982.         // 116 bytes
  13983.        
  13984.         char r43c_ai_conversations_name[32];
  13985.         // 1
  13986.         uint8_t r43c_ai_conversations_flags;    //toff 3476 0xFF
  13987.         // 2
  13988.         float r43c_ai_conversations_trigger_distance;
  13989.         float r43c_ai_conversations_run_to_player_distance;
  13990.         // 36
  13991.        
  13992.         // representation 43 sub-board A
  13993.         // r43sbA_participants_
  13994.         uint32_t r43sbA_participants_entrycount; // maximum of 8 cells
  13995.         uint32_t r43sbA_participants_random_id;
  13996.         uint32_t r43sbA_participants_sig_id; // example value = 0xE840A100
  13997.        
  13998.         // representation 43 sub-board B
  13999.         // r43sbB_lines_
  14000.         uint32_t r43sbB_lines_entrycount; // maximum of 32 cells
  14001.         uint32_t r43sbB_lines_random_id;
  14002.         uint32_t r43sbB_lines_sig_id; // example value = 0xC041A100
  14003.        
  14004.         // 12
  14005.        
  14006.     }r43c_ai_conversations;
  14007.    
  14008.     // easy: 11379
  14009.    
  14010.     struct scnr_r43sc {
  14011.         // test data size: 536 bytes
  14012.         struct scnr_r43scA {
  14013.             // representation 43 sub-cells A
  14014.             // r43scA_participants_
  14015.             // 84 bytes
  14016.            
  14017.             // 3 (odd, isn't it?)
  14018.             uint8_t r43scA_participants_flags;  //toff 3560 0x07
  14019.             uint16_t r43scA_participants_selection_type;
  14020.             uint16_t r43scA_participants_actor_type;
  14021.             uint16_t r43scA_participants_use_this_object_sel;
  14022.             uint16_t r43scA_participants_set_new_name_sel;
  14023.             // 12
  14024.             // undocumented values here: (and I'm making a wild guess at their types; however, they are more likely uint32_t values of -1)
  14025.            
  14026.             uint16_t r43scA_participants_INTERNAL_unknown1_sel;
  14027.             uint16_t r43scA_participants_INTERNAL_unknown2_sel;
  14028.             uint16_t r43scA_participants_INTERNAL_unknown3_sel;
  14029.             uint16_t r43scA_participants_INTERNAL_unknown4_sel;
  14030.             uint16_t r43scA_participants_INTERNAL_unknown5_sel;
  14031.             uint16_t r43scA_participants_INTERNAL_unknown6_sel;
  14032.            
  14033.             char r43scA_participants_encounter_name[32];
  14034.            
  14035.             // this one, I'm actually going to call a uint32_t instead of two _sel types:
  14036.            
  14037.             uint32_t r43scA_participants_INTERNAL_unknown7;   // ex: -1
  14038.            
  14039.             // 12
  14040.            
  14041.         }r43scA_ai_conversations_participants;
  14042.        
  14043.         // easy : 11547
  14044.        
  14045.         struct scnr_r43scB {
  14046.             // representation 43 sub-cells B
  14047.             // r43scB_lines_
  14048.             // 124 bytes
  14049.            
  14050.             // 1
  14051.             uint8_t r43scB_lines_flags; //toff 3644 0x3F
  14052.             uint16_t r43scB_lines_participant_sel;
  14053.             uint16_t r43scB_lines_addressee;
  14054.             uint16_t r43scB_lines_addressee_participant_sel;
  14055.             // 4
  14056.             float r43scB_lines_line_delay_time;
  14057.             // 12
  14058.            
  14059.             // dependency r43scB 1: variant 1 snd!
  14060.             char r43scB1_variant_1_tagclass[5];      //unsigned char[5]
  14061.             uint32_t r43scB1_variant_1_tagnamepointer;   //uint32 ("random" number)
  14062.             uint32_t r43scB1_variant_1_tagnamestringlength;   //uint32
  14063.             uint32_t r43scB1_variant_1_tagid;        //uint32 (0xFFFFFFFF with tags)
  14064.             // char r43scB1_variant_1_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14065.            
  14066.             // dependency r43scB 2: variant 2 snd!
  14067.             char r43scB2_variant_2_tagclass[5];      //unsigned char[5]
  14068.             uint32_t r43scB2_variant_2_tagnamepointer;   //uint32 ("random" number)
  14069.             uint32_t r43scB2_variant_2_tagnamestringlength;   //uint32
  14070.             uint32_t r43scB2_variant_2_tagid;        //uint32 (0xFFFFFFFF with tags)
  14071.             // char r43scB2_variant_2_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14072.            
  14073.             // dependency r43scB 3: variant 3 snd!
  14074.             char r43scB3_variant_3_tagclass[5];      //unsigned char[5]
  14075.             uint32_t r43scB3_variant_3_tagnamepointer;   //uint32 ("random" number)
  14076.             uint32_t r43scB3_variant_3_tagnamestringlength;   //uint32
  14077.             uint32_t r43scB3_variant_3_tagid;        //uint32 (0xFFFFFFFF with tags)
  14078.             // char r43scB3_variant_3_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14079.            
  14080.             // dependency r43scB 4: variant 4 snd!
  14081.             char r43scB4_variant_4_tagclass[5];      //unsigned char[5]
  14082.             uint32_t r43scB4_variant_4_tagnamepointer;   //uint32 ("random" number)
  14083.             uint32_t r43scB4_variant_4_tagnamestringlength;   //uint32
  14084.             uint32_t r43scB4_variant_4_tagid;        //uint32 (0xFFFFFFFF with tags)
  14085.             // char r43scB4_variant_4_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14086.            
  14087.             // dependency r43scB 5: variant 5 snd!
  14088.             char r43scB5_variant_5_tagclass[5];      //unsigned char[5]
  14089.             uint32_t r43scB5_variant_5_tagnamepointer;   //uint32 ("random" number)
  14090.             uint32_t r43scB5_variant_5_tagnamestringlength;   //uint32
  14091.             uint32_t r43scB5_variant_5_tagid;        //uint32 (0xFFFFFFFF with tags)
  14092.             // char r43scB5_variant_5_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14093.            
  14094.             // dependency r43scB 6: variant 6 snd!
  14095.             char r43scB6_variant_6_tagclass[5];      //unsigned char[5]
  14096.             uint32_t r43scB6_variant_6_tagnamepointer;   //uint32 ("random" number)
  14097.             uint32_t r43scB6_variant_6_tagnamestringlength;   //uint32
  14098.             uint32_t r43scB6_variant_6_tagid;        //uint32 (0xFFFFFFFF with tags)
  14099.             // char r43scB6_variant_6_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14100.            
  14101.         }r43scB_ai_conversations_lines;
  14102.     }r43sc_container;
  14103.    
  14104.     // tpns r43scB 1-6 as {r43scB1 r43scB2 r43scB3 r43scB4 r43scB5 r43scB6}
  14105.    
  14106.     // d40: 267988 (easy: skipped to scripts, 12451)
  14107.    
  14108.     // script syntax data goes here (example data: 267988, 380076)
  14109.     // script string data goes here (example data: 648064, 25775)
  14110.    
  14111.     // d40: 673839 | easy: 12451
  14112.    
  14113.     struct scnr_r44c {
  14114.         // representation 44 cells
  14115.         // r44c_scripts_
  14116.         // 92 bytes
  14117.        
  14118.         char r44c_scripts_name[32];
  14119.         uint16_t r44c_scripts_script_type;
  14120.         uint16_t r44c_scripts_return_type;
  14121.         uint32_t r44c_scripts_root_expression_index;
  14122.         // 52
  14123.        
  14124.     }r44c_scripts;
  14125.    
  14126.     // d40: 701163 | easy: 12635
  14127.    
  14128.     struct scnr_r45c {
  14129.         // representation 45 cells
  14130.         // r45c_globals_
  14131.         // 92 bytes
  14132.        
  14133.         char r45c_globals_name[32];
  14134.         uint16_t r45c_globals_type;
  14135.         // 6
  14136.         uint32_t r45c_globals_initialization_expression_index;
  14137.         // 48
  14138.        
  14139.     }r45c_globals;
  14140.    
  14141.     // d40: 707143 | easy: 12819
  14142.    
  14143.     struct scnr_r46c {
  14144.         // representation 46 cells
  14145.         // r46c_references_
  14146.         // 40 bytes
  14147.        
  14148.         // 24
  14149.        
  14150.         // dependency r46c 1: reference (any tag type)
  14151.         char r46c1_reference_tagclass[5];        //unsigned char[5]
  14152.         uint32_t r46c1_reference_tagnamepointer;   //uint32 ("random" number)
  14153.         uint32_t r46c1_reference_tagnamestringlength;   //uint32
  14154.         uint32_t r46c1_reference_tagid;      //uint32 (0xFFFFFFFF with tags)
  14155.         // char r46c1_reference_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14156.        
  14157.        
  14158.     }r46c_references;
  14159.    
  14160.     // tpns r46c1
  14161.    
  14162.     // d40: 717635 | easy: 12967
  14163.    
  14164.     struct scnr_r47c {
  14165.         // representation 47 cells
  14166.         // r47c_source_files_
  14167.         // 52 bytes
  14168.        
  14169.         char r47c_source_files_name[32];
  14170.         uint32_t r47c_source_files_source;
  14171.         // 4
  14172.         // little endian internal board values:
  14173.         uint32_t r47c_source_files_INTERNAL_source_offset_pointer;   // example value in easy = 13007
  14174.         uint32_t r47c_source_files_INTERNAL_source_random1;
  14175.         uint32_t r47c_source_files_INTERNAL_source_sig_id;   // example value = 0xB431A100
  14176.        
  14177.     }r47c_source_files;
  14178.    
  14179.     // source files data here (null-terminated strings)
  14180.    
  14181.     // d40: 717635 | easy: 13114
  14182.    
  14183.     struct scnr_r48c {
  14184.         // representation 48 cells
  14185.         // r48c_cutscene_flags_
  14186.         // 92 bytes
  14187.        
  14188.         // 4
  14189.        
  14190.         char r48c_cutscene_flags_name[32];
  14191.         float r48c_cutscene_flags_position_x;
  14192.         float r48c_cutscene_flags_position_y;
  14193.         float r48c_cutscene_flags_position_z;
  14194.         float r48c_cutscene_flags_facing_yaw_rad;
  14195.         float r48c_cutscene_flags_facing_pitch_rad;
  14196.        
  14197.         // 36
  14198.        
  14199.     }r48c_cutscene_flags;
  14200.    
  14201.     // d40: 748639 | easy: 13298
  14202.    
  14203.     struct scnr_r49c {
  14204.         // representation 49 cells
  14205.         // r49c_cutscene_camera_points_
  14206.         // 104 bytes
  14207.        
  14208.         // 4
  14209.        
  14210.         char r49c_cutscene_camera_points_name[32];
  14211.        
  14212.         // 4
  14213.        
  14214.         float r49c_cutscene_camera_points_position_x;
  14215.         float r49c_cutscene_camera_points_position_y;
  14216.         float r49c_cutscene_camera_points_position_z;
  14217.         float r49c_cutscene_camera_points_orientation_yaw_rad;
  14218.         float r49c_cutscene_camera_points_orientation_pitch_rad;
  14219.         float r49c_cutscene_camera_points_orientation_roll_rad;
  14220.         float r49c_cutscene_camera_points_field_of_view_rad;
  14221.        
  14222.         // 36
  14223.        
  14224.     }r49c_cutscene_camera_points;
  14225.    
  14226.     // d40: 769751 | easy: 13506
  14227.    
  14228.     struct scnr_r50c {
  14229.         // representation 50 cells
  14230.         // r50c_cutscene_titles_
  14231.         // 96 bytes
  14232.        
  14233.         // 4
  14234.         char r50c_cutscene_titles_name[32];
  14235.         // 4
  14236.         uint16_t r50c_cutscene_titles_text_bounds_on_screen_top;
  14237.         uint16_t r50c_cutscene_titles_text_bounds_on_screen_left;
  14238.         uint16_t r50c_cutscene_titles_text_bounds_on_screen_bottom;
  14239.         uint16_t r50c_cutscene_titles_text_bounds_on_screen_right;
  14240.        
  14241.         uint16_t r50c_cutscene_titles_string_index;
  14242.        
  14243.         // 2
  14244.         uint16_t r50c_cutscene_titles_justification;
  14245.         // 6
  14246.        
  14247.         uint8_t r50c_cutscene_titles_text_color_a;
  14248.         uint8_t r50c_cutscene_titles_text_color_r;
  14249.         uint8_t r50c_cutscene_titles_text_color_g;
  14250.         uint8_t r50c_cutscene_titles_text_color_b;
  14251.        
  14252.         uint8_t r50c_cutscene_titles_shadow_color_a;
  14253.         uint8_t r50c_cutscene_titles_shadow_color_r;
  14254.         uint8_t r50c_cutscene_titles_shadow_color_g;
  14255.         uint8_t r50c_cutscene_titles_shadow_color_b;
  14256.        
  14257.         float r50c_cutscene_titles_fade_in_time;
  14258.         float r50c_cutscene_titles_up_time;
  14259.         float r50c_cutscene_titles_fade_out_time;
  14260.        
  14261.         // 16
  14262.        
  14263.     }r50c_cutscene_titles;
  14264.    
  14265.     // d40: 770135 | easy: 13698
  14266.    
  14267.     // these are not really dependencies, but are just the tagpathname strings ("tpns" for short) for their respective entries
  14268.     // each is a null-terminated string of variable length
  14269.    
  14270.     // custom object names tpns
  14271.     // ingame help text tpns
  14272.     // hud messages tpns
  14273.    
  14274.     // there are some undocumented values in the following struct:
  14275.    
  14276.     // d40: 770218 | easy: 13748
  14277.     struct scnr_r51c {
  14278.         // representation 51 cells
  14279.         // r51c_structure_bsps_
  14280.         // 32 bytes
  14281.        
  14282.         // undocumented values (almost like an internal table, but doesn't make sense as such)
  14283.         uint32_t r51c_structure_bsps_INTERNAL_unknown1;
  14284.         uint32_t r51c_structure_bsps_INTERNAL_unknown2;
  14285.         uint32_t r51c_structure_bsps_INTERNAL_unknown3;
  14286.         // 4
  14287.        
  14288.         // dependency r51c 1: structure bsp sbsp
  14289.         char r51c1_structure_bsp_tagclass[5];        //unsigned char[5]
  14290.         uint32_t r51c1_structure_bsp_tagnamepointer;   //uint32 ("random" number)
  14291.         uint32_t r51c1_structure_bsp_tagnamestringlength;   //uint32
  14292.         uint32_t r51c1_structure_bsp_tagid;      //uint32 (0xFFFFFFFF with tags)
  14293.         // char r51c1_structure_bsp_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14294.        
  14295.     }r51c_structure_bsps;
  14296.    
  14297.     // tpns r51c1
  14298.    
  14299. } type_meta_scnr;
  14300.  
  14301. // still remaining to be done, significantly:
  14302. // There are unknown values in this tag type which seem to be specific to Sapien, because they are often big endian and ignored by Guerilla.
  14303. // NOTE: Radians values for default tags are usually a little buggy for 0 values -- they are "-0", or 0x80000000 instead of 0x00000000. So if there are any stray "0x80" values followed by zeros, it is probably a float radians value of 0. (check unknown values prior to r15c in this tag)
  14304. // The accuracy of cell designs for cells that are not included in d40 are otherwise unverified; undocumented values for these missing cells may exist. Missing cells include: (...)
  14305. // ... therefore, check these missing cells with a multiplayer map, and specifically, the zero values labeled "(CHECK ME)"
  14306.  
  14307. // char[32] values in this tag type (and some other tag types) do not properly remove existing data after their final null character if the overwritten string is shorter than the previous string, so you get junk text after a null character that was intended to be the final character in the string.
  14308.  
  14309. // In sum, I cannot say that all the padding values are actually padding. I will need to run a "script" to check with all the tags in the game to see if any zero values interpreted as padding actually contain something besides zero. This tag has an abundance of undocumented INTERNAL values in the most odd locations within cells.
  14310.  
  14311. // The unknown 2-byte values are "sel" type, references to other cells.
  14312.  
  14313. // After an extended break near the end, I finished this ("finished") January 1, 2015 3:40 AM.
  14314.  
  14315. #pragma mark -- senv
  14316.  
  14317. typedef struct {
  14318.     // 64, 1
  14319.     uint8_t radiosity_properties_flags; //toff 64   0x07
  14320.     uint16_t radiosity_properties_detail_level;
  14321.     float radiosity_properties_power;
  14322.    
  14323.     float radiosity_properties_color_of_emitted_light_r_frac;
  14324.     float radiosity_properties_color_of_emitted_light_g_frac;
  14325.     float radiosity_properties_color_of_emitted_light_b_frac;
  14326.     float radiosity_properties_tint_color_r_frac;
  14327.     float radiosity_properties_tint_color_g_frac;
  14328.     float radiosity_properties_tint_color_b_frac;
  14329.    
  14330.     // 96, 2
  14331.     uint16_t physics_properties_material_type;
  14332.    
  14333.     uint16_t INTERNAL_shdr_index;   // 3, toff 101
  14334.     // 102, 2
  14335.    
  14336.     // 104, 1
  14337.     uint8_t environment_shader_flags;   //toff 104  0x07
  14338.     uint16_t environment_shader_type_type;
  14339.    
  14340.     float lens_flares_lens_flare_spacing;
  14341.    
  14342.     // dependency 1: lens flares lens flare lens
  14343.     char lens_flares_lens_flare_tagclass[5];         //unsigned char[5]
  14344.     uint32_t lens_flares_lens_flare_tagnamepointer;   //uint32 ("random" number)
  14345.     uint32_t lens_flares_lens_flare_tagnamestringlength;   //uint32
  14346.     uint32_t lens_flares_lens_flare_tagid;       //uint32 (0xFFFFFFFF with tags)
  14347.     // char lens_flares_lens_flare_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14348.    
  14349.     // 128, 45
  14350.     uint8_t diffuse_properties_flags;   //toff 170  0x03
  14351.     // 174, 26
  14352.    
  14353.     // dependency 2: diffuse properties base map bitm
  14354.     char diffuse_properties_base_map_tagclass[5];        //unsigned char[5]
  14355.     uint32_t diffuse_properties_base_map_tagnamepointer;   //uint32 ("random" number)
  14356.     uint32_t diffuse_properties_base_map_tagnamestringlength;   //uint32
  14357.     uint32_t diffuse_properties_base_map_tagid;      //uint32 (0xFFFFFFFF with tags)
  14358.     // char diffuse_properties_base_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14359.    
  14360.     float INTERNAL_diffuse_properties_base_map_texture_origin_x;   // unknown; ex: 0
  14361.     float INTERNAL_diffuse_properties_base_map_texture_origin_y;   // unknown; ex: 0
  14362.     // 224, 16
  14363.    
  14364.     uint16_t diffuse_properties_detail_map_function;
  14365.     // 242, 2
  14366.     float diffuse_properties_primary_detail_map_scale;
  14367.    
  14368.     // dependency 3: diffuse properties primary detail map bitm
  14369.     char diffuse_properties_primary_detail_map_tagclass[5];      //unsigned char[5]
  14370.     uint32_t diffuse_properties_primary_detail_map_tagnamepointer;   //uint32 ("random" number)
  14371.     uint32_t diffuse_properties_primary_detail_map_tagnamestringlength;   //uint32
  14372.     uint32_t diffuse_properties_primary_detail_map_tagid;        //uint32 (0xFFFFFFFF with tags)
  14373.     // char diffuse_properties_primary_detail_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14374.    
  14375.     float diffuse_properties_secondary_detail_map_scale;
  14376.    
  14377.     // dependency 4: diffuse properties secondary detail map bitm
  14378.     char diffuse_properties_secondary_detail_map_tagclass[5];        //unsigned char[5]
  14379.     uint32_t diffuse_properties_secondary_detail_map_tagnamepointer;   //uint32 ("random" number)
  14380.     uint32_t diffuse_properties_secondary_detail_map_tagnamestringlength;   //uint32
  14381.     uint32_t diffuse_properties_secondary_detail_map_tagid;      //uint32 (0xFFFFFFFF with tags)
  14382.     // char diffuse_properties_secondary_detail_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14383.    
  14384.     float INTERNAL_diffuse_properties_detail_maps_origin_x;   // unknown; ex: 0
  14385.     float INTERNAL_diffuse_properties_detail_maps_origin_y;   // unknown; ex: 0
  14386.     // 292, 16
  14387.    
  14388.     uint16_t diffuse_properties_micro_detail_map_function;
  14389.     // 310, 2
  14390.     float diffuse_properties_micro_detail_map_scale;
  14391.    
  14392.     // dependency 5: diffuse properties micro detail map bitm
  14393.     char diffuse_properties_micro_detail_map_tagclass[5];        //unsigned char[5]
  14394.     uint32_t diffuse_properties_micro_detail_map_tagnamepointer;   //uint32 ("random" number)
  14395.     uint32_t diffuse_properties_micro_detail_map_tagnamestringlength;   //uint32
  14396.     uint32_t diffuse_properties_micro_detail_map_tagid;      //uint32 (0xFFFFFFFF with tags)
  14397.     // char diffuse_properties_micro_detail_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14398.    
  14399.     float diffuse_properties_material_color_r_frac;
  14400.     float diffuse_properties_material_color_g_frac;
  14401.     float diffuse_properties_material_color_b_frac;
  14402.    
  14403.     // 344, 12
  14404.    
  14405.     float bump_properties_bump_map_scale;
  14406.    
  14407.     // dependency 6: bump properties bump map bitm
  14408.     char bump_properties_bump_map_tagclass[5];       //unsigned char[5]
  14409.     uint32_t bump_properties_bump_map_tagnamepointer;   //uint32 ("random" number)
  14410.     uint32_t bump_properties_bump_map_tagnamestringlength;   //uint32
  14411.     uint32_t bump_properties_bump_map_tagid;         //uint32 (0xFFFFFFFF with tags)
  14412.     // char bump_properties_bump_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14413.    
  14414.     // offset 376
  14415.     float INTERNAL_bump_properties_bump_map_origin_x;   // unknown; ex: 6
  14416.     float INTERNAL_bump_properties_bump_map_origin_y;   // unknown; ex: 6
  14417.     // 384, 16
  14418.    
  14419.     uint16_t texture_scrolling_animation_u_animation_function;
  14420.     // 402, 2
  14421.     float texture_scrolling_animation_u_animation_period;
  14422.     float texture_scrolling_animation_u_animation_scale;
  14423.     uint16_t texture_scrolling_animation_v_animation_function;
  14424.     // 414, 2
  14425.     float texture_scrolling_animation_v_animation_period;
  14426.     float texture_scrolling_animation_v_animation_scale;
  14427.    
  14428.     // 424, 24 -- this might have two floats at the start
  14429.    
  14430.     // 448, 1
  14431.     uint8_t self_illumination_properties_flags; //toff 446  0x01
  14432.     // 450, 26
  14433.    
  14434.     float self_illumination_properties_primary_on_color_r_frac;
  14435.     float self_illumination_properties_primary_on_color_g_frac;
  14436.     float self_illumination_properties_primary_on_color_b_frac;
  14437.     float self_illumination_properties_primary_off_color_r_frac;
  14438.     float self_illumination_properties_primary_off_color_g_frac;
  14439.     float self_illumination_properties_primary_off_color_b_frac;
  14440.     uint16_t self_illumination_properties_primary_animation_function;
  14441.     // 502, 2
  14442.     float self_illumination_properties_primary_animation_period;
  14443.     float self_illumination_properties_primary_animation_phase;
  14444.     // 512, 24
  14445.     float self_illumination_properties_secondary_on_color_r_frac;
  14446.     float self_illumination_properties_secondary_on_color_g_frac;
  14447.     float self_illumination_properties_secondary_on_color_b_frac;
  14448.     float self_illumination_properties_secondary_off_color_r_frac;
  14449.     float self_illumination_properties_secondary_off_color_g_frac;
  14450.     float self_illumination_properties_secondary_off_color_b_frac;
  14451.     uint16_t self_illumination_properties_secondary_animation_function;
  14452.     // 562, 2
  14453.     float self_illumination_properties_secondary_animation_period;
  14454.     float self_illumination_properties_secondary_animation_phase;
  14455.     // 572, 24
  14456.     float self_illumination_properties_plasma_on_color_r_frac;
  14457.     float self_illumination_properties_plasma_on_color_g_frac;
  14458.     float self_illumination_properties_plasma_on_color_b_frac;
  14459.     float self_illumination_properties_plasma_off_color_r_frac;
  14460.     float self_illumination_properties_plasma_off_color_g_frac;
  14461.     float self_illumination_properties_plasma_off_color_b_frac;
  14462.     uint16_t self_illumination_properties_plasma_animation_function;
  14463.     // 622, 2
  14464.     float self_illumination_properties_plasma_animation_period;
  14465.     float self_illumination_properties_plasma_animation_phase;
  14466.     // 632, 24
  14467.     float self_illumination_properties_map_scale;
  14468.    
  14469.     // dependency 7: self illumination properties map bitm
  14470.     char self_illumination_properties_map_tagclass[5];       //unsigned char[5]
  14471.     uint32_t self_illumination_properties_map_tagnamepointer;   //uint32 ("random" number)
  14472.     uint32_t self_illumination_properties_map_tagnamestringlength;   //uint32
  14473.     uint32_t self_illumination_properties_map_tagid;         //uint32 (0xFFFFFFFF with tags)
  14474.     // char self_illumination_properties_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14475.    
  14476.     // 676, 24
  14477.     // 700, 1
  14478.     uint8_t specular_properties_flags;  //toff 698  0x07
  14479.     // 702, 18
  14480.     float specular_properties_brightness_frac;
  14481.     // 724, 20
  14482.     float specular_properties_perpendicular_color_r_frac;
  14483.     float specular_properties_perpendicular_color_g_frac;
  14484.     float specular_properties_perpendicular_color_b_frac;
  14485.     float specular_properties_parallel_color_r_frac;
  14486.     float specular_properties_parallel_color_g_frac;
  14487.     float specular_properties_parallel_color_b_frac;
  14488.     // 768, 16
  14489.     // 784, 1
  14490.     uint8_t reflection_properties_flags;    //toff 782  0x01
  14491.     uint16_t reflection_properties_type;
  14492.     float reflection_properties_lightmap_brightness_scale_frac;
  14493.     // 792, 28
  14494.     float reflection_properties_perpendicular_brightness_frac;
  14495.     float reflection_properties_parallel_brightness_frac;
  14496.     // 828, 40
  14497.    
  14498.     // dependency 8: reflection properties reflection cube map bitm
  14499.     char reflection_properties_reflection_cube_map_tagclass[5];      //unsigned char[5]
  14500.     uint32_t reflection_properties_reflection_cube_map_tagnamepointer;   //uint32 ("random" number)
  14501.     uint32_t reflection_properties_reflection_cube_map_tagnamestringlength;   //uint32
  14502.     uint32_t reflection_properties_reflection_cube_map_tagid;        //uint32 (0xFFFFFFFF with tags)
  14503.     // char reflection_properties_reflection_cube_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14504.    
  14505.     // 884, 16 -- might contain two floats at start
  14506.    
  14507.     // 900 - tpns 1-8
  14508.    
  14509. } type_meta_senv;
  14510.  
  14511. #pragma mark -- sgla
  14512.  
  14513. typedef struct {
  14514.     // 64, 1
  14515.     uint8_t radiosity_properties_flags; //toff 64   0x07
  14516.     uint16_t radiosity_properties_detail_level;
  14517.     float radiosity_properties_power;
  14518.     float radiosity_properties_color_of_emitted_light_r_frac;
  14519.     float radiosity_properties_color_of_emitted_light_g_frac;
  14520.     float radiosity_properties_color_of_emitted_light_b_frac;
  14521.     float radiosity_properties_tint_color_r_frac;
  14522.     float radiosity_properties_tint_color_g_frac;
  14523.     float radiosity_properties_tint_color_b_frac;
  14524.    
  14525.     // 96, 2
  14526.     uint16_t physics_properties_material_type;
  14527.    
  14528.     uint16_t INTERNAL_shdr_index;   // 9, toff 101
  14529.     // 102, 2
  14530.    
  14531.     // 104, 1
  14532.     uint8_t glass_shader_flags; //toff 104  0x0F
  14533.     // 106, 42
  14534.     float background_tint_properties_background_tint_color_r_frac;
  14535.     float background_tint_properties_background_tint_color_g_frac;
  14536.     float background_tint_properties_background_tint_color_b_frac;
  14537.     float background_tint_properties_background_tint_map_scale;
  14538.    
  14539.     // dependency 1: background tint properties background tint map bitm
  14540.     char background_tint_properties_background_tint_map_tagclass[5];         //unsigned char[5]
  14541.     uint32_t background_tint_properties_background_tint_map_tagnamepointer;   //uint32 ("random" number)
  14542.     uint32_t background_tint_properties_background_tint_map_tagnamestringlength;   //uint32
  14543.     uint32_t background_tint_properties_background_tint_map_tagid;       //uint32 (0xFFFFFFFF with tags)
  14544.     // char background_tint_properties_background_tint_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14545.    
  14546.     // 180, 22
  14547.     uint16_t reflection_properties_reflection_type;
  14548.     float reflection_properties_perpendicular_brightness_frac;
  14549.     float reflection_properties_perpendicular_tint_color_r_frac;
  14550.     float reflection_properties_perpendicular_tint_color_g_frac;
  14551.     float reflection_properties_perpendicular_tint_color_b_frac;
  14552.     float reflection_properties_parallel_brightness_frac;
  14553.     float reflection_properties_parallel_tint_color_r_frac;
  14554.     float reflection_properties_parallel_tint_color_g_frac;
  14555.     float reflection_properties_parallel_tint_color_b_frac;
  14556.    
  14557.     // dependency 2: reflection properties reflection map bitm
  14558.     char reflection_properties_reflection_map_tagclass[5];       //unsigned char[5]
  14559.     uint32_t reflection_properties_reflection_map_tagnamepointer;   //uint32 ("random" number)
  14560.     uint32_t reflection_properties_reflection_map_tagnamestringlength;   //uint32
  14561.     uint32_t reflection_properties_reflection_map_tagid;         //uint32 (0xFFFFFFFF with tags)
  14562.     // char reflection_properties_reflection_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14563.    
  14564.     float reflection_properties_bump_map_scale;
  14565.    
  14566.     // dependency 3: reflection properties bump map bitm
  14567.     char reflection_properties_bump_map_tagclass[5];         //unsigned char[5]
  14568.     uint32_t reflection_properties_bump_map_tagnamepointer;   //uint32 ("random" number)
  14569.     uint32_t reflection_properties_bump_map_tagnamestringlength;   //uint32
  14570.     uint32_t reflection_properties_bump_map_tagid;       //uint32 (0xFFFFFFFF with tags)
  14571.     // char reflection_properties_bump_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14572.    
  14573.     // 272, 132
  14574.    
  14575.     float diffuse_properties_diffuse_map_scale;
  14576.    
  14577.     // dependency 4: diffuse properties diffuse map bitm
  14578.     char diffuse_properties_diffuse_map_tagclass[5];         //unsigned char[5]
  14579.     uint32_t diffuse_properties_diffuse_map_tagnamepointer;   //uint32 ("random" number)
  14580.     uint32_t diffuse_properties_diffuse_map_tagnamestringlength;   //uint32
  14581.     uint32_t diffuse_properties_diffuse_map_tagid;       //uint32 (0xFFFFFFFF with tags)
  14582.     // char diffuse_properties_diffuse_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14583.    
  14584.     float diffuse_properties_diffuse_detail_map_scale;
  14585.    
  14586.     // dependency 5: diffuse properties diffuse detail map bitm
  14587.     char diffuse_properties_diffuse_detail_map_tagclass[5];      //unsigned char[5]
  14588.     uint32_t diffuse_properties_diffuse_detail_map_tagnamepointer;   //uint32 ("random" number)
  14589.     uint32_t diffuse_properties_diffuse_detail_map_tagnamestringlength;   //uint32
  14590.     uint32_t diffuse_properties_diffuse_detail_map_tagid;        //uint32 (0xFFFFFFFF with tags)
  14591.     // char diffuse_properties_diffuse_detail_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14592.    
  14593.     // 444, 32
  14594.    
  14595.     float specular_properties_specular_map_scale;
  14596.    
  14597.     // dependency 6: specular properties specular map bitm
  14598.     char specular_properties_specular_map_tagclass[5];       //unsigned char[5]
  14599.     uint32_t specular_properties_specular_map_tagnamepointer;   //uint32 ("random" number)
  14600.     uint32_t specular_properties_specular_map_tagnamestringlength;   //uint32
  14601.     uint32_t specular_properties_specular_map_tagid;         //uint32 (0xFFFFFFFF with tags)
  14602.     // char specular_properties_specular_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14603.    
  14604.     float specular_properties_specular_detail_map_scale;
  14605.    
  14606.     // dependency 7: specular properties specular detail map bitm
  14607.     char specular_properties_specular_detail_map_tagclass[5];        //unsigned char[5]
  14608.     uint32_t specular_properties_specular_detail_map_tagnamepointer;   //uint32 ("random" number)
  14609.     uint32_t specular_properties_specular_detail_map_tagnamestringlength;   //uint32
  14610.     uint32_t specular_properties_specular_detail_map_tagid;      //uint32 (0xFFFFFFFF with tags)
  14611.     // char specular_properties_specular_detail_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14612.    
  14613.     // 516, 28
  14614.    
  14615.     // 1-7 tpns
  14616.    
  14617. } type_meta_sgla;
  14618.  
  14619. #pragma mark -- shdr
  14620.  
  14621. typedef struct {
  14622.     // 64, 1
  14623.     uint8_t radiosity_properties_flags; //toff 64   0x07
  14624.     uint16_t radiosity_properties_detail_level;
  14625.     float radiosity_properties_power;
  14626.    
  14627.     float radiosity_properties_color_of_emitted_light_r_frac;
  14628.     float radiosity_properties_color_of_emitted_light_g_frac;
  14629.     float radiosity_properties_color_of_emitted_light_b_frac;
  14630.     float radiosity_properties_tint_color_r_frac;
  14631.     float radiosity_properties_tint_color_g_frac;
  14632.     float radiosity_properties_tint_color_b_frac;
  14633.    
  14634.     // 96, 2
  14635.     uint16_t physics_properties_material_type;
  14636.    
  14637.     uint16_t INTERNAL_shdr_index;   // -1
  14638.     // 102, 2, toff 102 (previous is visibly obvious)
  14639.    
  14640. } type_meta_shdr;
  14641.  
  14642. #pragma mark -- sky
  14643.  
  14644. typedef struct {
  14645.    
  14646.     // dependency 1: model mod2
  14647.     char model_tagclass[5];      //unsigned char[5]
  14648.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  14649.     uint32_t model_tagnamestringlength;   //uint32
  14650.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  14651.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14652.    
  14653.     // dependency 2: animation_graph antr
  14654.     char animation_graph_tagclass[5];        //unsigned char[5]
  14655.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  14656.     uint32_t animation_graph_tagnamestringlength;   //uint32
  14657.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  14658.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14659.    
  14660.     // 96, 24
  14661.    
  14662.     float indoor_ambient_radiosity_color_r_frac;
  14663.     float indoor_ambient_radiosity_color_g_frac;
  14664.     float indoor_ambient_radiosity_color_b_frac;
  14665.     float indoor_ambient_radiosity_power;
  14666.     float outdoor_ambient_radiosity_color_r_frac;
  14667.     float outdoor_ambient_radiosity_color_g_frac;
  14668.     float outdoor_ambient_radiosity_color_b_frac;
  14669.     float outdoor_ambient_radiosity_power;
  14670.     float outdoor_fog_color_r_frac;
  14671.     float outdoor_fog_color_g_frac;
  14672.     float outdoor_fog_color_b_frac;
  14673.     //  164, 8
  14674.     float outdoor_fog_maximum_density_frac;
  14675.     float outdoor_fog_start_distance;
  14676.     float outdoor_fog_opaque_distance;
  14677.     float indoor_fog_color_r_frac;
  14678.     float indoor_fog_color_g_frac;
  14679.     float indoor_fog_color_b_frac;
  14680.     // 196, 8
  14681.     float indoor_fog_maximum_density_frac;
  14682.     float indoor_fog_start_distance;
  14683.     float indoor_fog_opaque_distance;
  14684.    
  14685.     // dependency 3: indoor fog screen fog
  14686.     char indoor_fog_screen_tagclass[5];      //unsigned char[5]
  14687.     uint32_t indoor_fog_screen_tagnamepointer;   //uint32 ("random" number)
  14688.     uint32_t indoor_fog_screen_tagnamestringlength;   //uint32
  14689.     uint32_t indoor_fog_screen_tagid;        //uint32 (0xFFFFFFFF with tags)
  14690.     // char indoor_fog_screen_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14691.    
  14692.     // 232, 4
  14693.    
  14694.     // representation 1 board, offset 236
  14695.     // r1b_shader_functions_
  14696.     uint32_t r1b_shader_functions_entrycount; // maximum of 8 cells
  14697.     uint32_t r1b_shader_functions_random_id;
  14698.     uint32_t r1b_shader_functions_sig_id; // example value = 0xA4879C00
  14699.    
  14700.     // representation 2 board, offset 248
  14701.     // r2b_animations_
  14702.     uint32_t r2b_animations_entrycount; // maximum of 8 cells
  14703.     uint32_t r2b_animations_random_id;
  14704.     uint32_t r2b_animations_sig_id; // example value = 0x0C889C00
  14705.    
  14706.     // representation 3 board, offset 260
  14707.     // r3b_lights_
  14708.     uint32_t r3b_lights_entrycount; // maximum of 8 cells
  14709.     uint32_t r3b_lights_random_id;
  14710.     uint32_t r3b_lights_sig_id; // example value = 0xF4889C00
  14711.    
  14712.     // 272, tpns 1-3
  14713.    
  14714.     struct sky_r1c {
  14715.         // representation 1 cells
  14716.         // r1c_shader_functions_
  14717.         // 36 bytes
  14718.        
  14719.         // 4
  14720.        
  14721.         char r1c_shader_functions_global_function_name[32];
  14722.        
  14723.     }r1c_shader_functions;
  14724.    
  14725.     struct sky_r2c {
  14726.         // representation 2 cells
  14727.         // r2c_animations_
  14728.         // 36 bytes
  14729.        
  14730.         uint16_t r2c_animations_animation_index;
  14731.         // 2
  14732.         float r2c_animations_period;
  14733.         // 28 -- this is probably something
  14734.        
  14735.     }r2c_animations;
  14736.    
  14737.     struct sky_r3c {
  14738.         // representation 3 cells
  14739.         // r3c_lights_
  14740.         // 116 bytes
  14741.        
  14742.         // dependency r3c 1: lens flare lens flare lens
  14743.         char r3c1_lens_flare_lens_flare_tagclass[5];         //unsigned char[5]
  14744.         uint32_t r3c1_lens_flare_lens_flare_tagnamepointer;   //uint32 ("random" number)
  14745.         uint32_t r3c1_lens_flare_lens_flare_tagnamestringlength;   //uint32
  14746.         uint32_t r3c1_lens_flare_lens_flare_tagid;       //uint32 (0xFFFFFFFF with tags)
  14747.         // char r3c1_lens_flare_lens_flare_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14748.        
  14749.         char r3c_lights_lens_flare_lens_flare_marker_name[32];
  14750.        
  14751.         // 28
  14752.        
  14753.         uint32_t r3c_lights_radiosity_flags;    //toff 348  0x00000003
  14754.        
  14755.         float r3c_lights_radiosity_color_r_frac;
  14756.         float r3c_lights_radiosity_color_g_frac;
  14757.         float r3c_lights_radiosity_color_b_frac;
  14758.         float r3c_lights_radiosity_power;
  14759.         float r3c_lights_radiosity_test_distance;
  14760.        
  14761.         // 4
  14762.        
  14763.         float r3c_lights_radiosity_direction_yaw_rad;
  14764.         float r3c_lights_radiosity_direction_pitch_rad;
  14765.         float r3c_lights_radiosity_diameter_rad;
  14766.        
  14767.     }r3c_lights;
  14768.    
  14769.     // tpns r3c1
  14770.    
  14771. } type_meta_sky;
  14772.  
  14773. #pragma mark -- smet
  14774.  
  14775. typedef struct {
  14776.     // 64, 1
  14777.     uint8_t radiosity_properties_flags; //toff 64   0x07
  14778.     uint16_t radiosity_properties_detail_level;
  14779.     float radiosity_properties_power;
  14780.    
  14781.     float radiosity_properties_color_of_emitted_light_r_frac;
  14782.     float radiosity_properties_color_of_emitted_light_g_frac;
  14783.     float radiosity_properties_color_of_emitted_light_b_frac;
  14784.     float radiosity_properties_tint_color_r_frac;
  14785.     float radiosity_properties_tint_color_g_frac;
  14786.     float radiosity_properties_tint_color_b_frac;
  14787.    
  14788.     // 96, 2
  14789.     uint16_t physics_properties_material_type;
  14790.    
  14791.     uint16_t INTERNAL_shdr_index;   // 10, toff 101
  14792.     // 102, 2
  14793.     // 104, 1
  14794.     uint8_t meter_shader_flags; //toff 104  0x1F
  14795.     // 106, 34
  14796.    
  14797.     // dependency 1: meter shader map bitm
  14798.     char meter_shader_map_tagclass[5];       //unsigned char[5]
  14799.     uint32_t meter_shader_map_tagnamepointer;   //uint32 ("random" number)
  14800.     uint32_t meter_shader_map_tagnamestringlength;   //uint32
  14801.     uint32_t meter_shader_map_tagid;         //uint32 (0xFFFFFFFF with tags)
  14802.     // char meter_shader_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14803.    
  14804.     // 156, 32
  14805.    
  14806.     float colors_gradient_minimum_color_r_frac;
  14807.     float colors_gradient_minimum_color_g_frac;
  14808.     float colors_gradient_minimum_color_b_frac;
  14809.     float colors_gradient_maximum_color_r_frac;
  14810.     float colors_gradient_maximum_color_g_frac;
  14811.     float colors_gradient_maximum_color_b_frac;
  14812.     float colors_background_color_r_frac;
  14813.     float colors_background_color_g_frac;
  14814.     float colors_background_color_b_frac;
  14815.     float colors_flash_color_r_frac;
  14816.     float colors_flash_color_g_frac;
  14817.     float colors_flash_color_b_frac;
  14818.     float colors_tint_color_r_frac;
  14819.     float colors_tint_color_g_frac;
  14820.     float colors_tint_color_b_frac;
  14821.     float colors_meter_transparency_frac;
  14822.     float colors_background_transparency_frac;
  14823.    
  14824.     // 256, 24
  14825.    
  14826.     uint16_t external_function_sources_meter_brightness_source;
  14827.     uint16_t external_function_sources_flash_brightness_source;
  14828.     uint16_t external_function_sources_value_source;
  14829.     uint16_t external_function_sources_gradient_source;
  14830.     uint16_t external_function_sources_flash_extension_source;
  14831.    
  14832.     // 290, 34
  14833.    
  14834.     // 324, tpns 1
  14835.    
  14836. } type_meta_smet;
  14837.  
  14838. #pragma mark -- snd!
  14839.  
  14840. typedef struct {
  14841.     uint32_t flags; //toff 64   0x00000003
  14842.     uint16_t class_type;   // "class" is a reserved keyword in programming languages
  14843.     uint16_t sample_rate;
  14844.     float minimum_distance;
  14845.     float maximum_distance;
  14846.     float skip_fraction_frac;
  14847.    
  14848.     float randomization_random_pitch_bounds_from;
  14849.     float randomization_random_pitch_bounds_to;
  14850.     float randomization_inner_cone_angle_rad;
  14851.     float randomization_outer_cone_angle_rad;
  14852.     float randomization_outer_cone_gain_frac;
  14853.     float randomization_gain_modifier;
  14854.     float randomization_maximum_bend_per_second;
  14855.    
  14856.     // 112, 12
  14857.    
  14858.     float when_scale_is_zero_skip_fraction_modifier;
  14859.     float when_scale_is_zero_gain_modifier;
  14860.     float when_scale_is_zero_pitch_modifier;
  14861.    
  14862.     // 136, 12
  14863.    
  14864.     float when_scale_is_one_skip_fraction_modifier;
  14865.     float when_scale_is_one_gain_modifier;
  14866.     float when_scale_is_one_pitch_modifier;
  14867.    
  14868.     // 160, 12
  14869.    
  14870.     uint16_t import_properties_encoding;
  14871.     uint16_t import_properties_compression;
  14872.    
  14873.     // dependency 1: import properties promotion sound snd!
  14874.     char import_properties_promotion_sound_tagclass[5];      //unsigned char[5]
  14875.     uint32_t import_properties_promotion_sound_tagnamepointer;   //uint32 ("random" number)
  14876.     uint32_t import_properties_promotion_sound_tagnamestringlength;   //uint32
  14877.     uint32_t import_properties_promotion_sound_tagid;        //uint32 (0xFFFFFFFF with tags)
  14878.     // char import_properties_promotion_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  14879.    
  14880.     uint16_t import_properties_promotion_count;
  14881.    
  14882.     // 194, 22
  14883.    
  14884.     // representation 1 board, offset 216
  14885.     // r1b_pitch_ranges_
  14886.     uint32_t r1b_pitch_ranges_entrycount; // maximum of 8 cells
  14887.     uint32_t r1b_pitch_ranges_random_id;
  14888.     uint32_t r1b_pitch_ranges_sig_id; // example value = 0xA4939B00
  14889.    
  14890.     // 228, tpns 1
  14891.    
  14892.     // example offset 244
  14893.     struct snd_r1c {
  14894.         // representation 1 board
  14895.         // r1c_pitch_ranges_
  14896.         // 72 bytes
  14897.        
  14898.         char r1c_pitch_ranges_name[32];
  14899.         float r1c_pitch_ranges_pitch_control_natural_pitch;
  14900.         float r1c_pitch_ranges_pitch_control_bend_bounds_from;
  14901.         float r1c_pitch_ranges_pitch_control_bend_bounds_to;
  14902.         uint16_t r1c_pitch_ranges_pitch_control_actual_permutation_count;
  14903.        
  14904.         // 14
  14905.        
  14906.         // representation 1 sub-board A
  14907.         // r1sbA_permutations_
  14908.         uint32_t r1sbA_permutations_entrycount; // maximum of 256 cells
  14909.         uint32_t r1sbA_permutations_random_id;
  14910.         uint32_t r1sbA_permutations_sig_id; // example value = 0x08939B00
  14911.        
  14912.     }r1c_pitch_ranges;
  14913.    
  14914.     // example offset: 820
  14915.     struct snd_r1sc {
  14916.         // representation 1 sub-cells container group
  14917.         // groupings of sub-cells per cell
  14918.         struct snd_r1scA {
  14919.             // representation 1 sub-cells A
  14920.             // r1scA_permutations_
  14921.             // 124 bytes
  14922.            
  14923.             char r1scA_permutations_name[32];
  14924.             float r1scA_permutations_skip_fraction_frac;
  14925.             float r1scA_permutations_gain_frac;
  14926.             uint16_t r1scA_permutations_compression;
  14927.             uint16_t r1scA_permutations_next_permutation_index;
  14928.            
  14929.             // check with example data (I'm doing this from experience now)
  14930.             // 20
  14931.            
  14932.             uint32_t r1scA_permutations_samples;
  14933.             // 4
  14934.             // little endian internal board values:
  14935.             uint32_t r1scA_permutations_INTERNAL_samples_offset_pointer;   // example value = 32500
  14936.             uint32_t r1scA_permutations_INTERNAL_samples_random1;
  14937.             uint32_t r1scA_permutations_INTERNAL_samples_sig_id;   // example value = 0x60929B00
  14938.            
  14939.             uint32_t r1scA_permutations_mouth_data;
  14940.             // 4
  14941.             // little endian internal board values:
  14942.             uint32_t r1scA_permutations_INTERNAL_mouth_data_offset_pointer;   // example value = 32500
  14943.             uint32_t r1scA_permutations_INTERNAL_mouth_data_random1;
  14944.             uint32_t r1scA_permutations_INTERNAL_mouth_data_sig_id;   // example value = 0x70929B00
  14945.            
  14946.             uint32_t r1scA_permutations_subtitle_data;
  14947.             // 4
  14948.             // little endian internal board values:
  14949.             uint32_t r1scA_permutations_INTERNAL_subtitle_data_offset_pointer;   // example value = 32500
  14950.             uint32_t r1scA_permutations_INTERNAL_subtitle_data_random1;
  14951.             uint32_t r1scA_permutations_INTERNAL_subtitle_data_sig_id;   // example value = 0x80929B00
  14952.            
  14953.            
  14954.         }r1scA_pitch_ranges_permutations;
  14955.        
  14956.         // samples data goes here
  14957.        
  14958.         // mouth data goes here
  14959.        
  14960.         // subtitle data goes here
  14961.        
  14962.         // ( {samples mouth_data subtitle_data} )
  14963.        
  14964.     }r1sc_container;
  14965.    
  14966. } type_meta_snd;
  14967.  
  14968. #pragma mark -- snde
  14969.  
  14970. typedef struct {
  14971.     // 64, 4
  14972.     uint16_t priority;
  14973.     // 70, 2
  14974.     float room_intensity_frac;
  14975.     float room_intensity_high_frequency_frac;
  14976.     float room_rolloff;
  14977.     float decay_time;
  14978.     float decay_high_frequency_ratio;
  14979.     float reflections_intensity_frac;
  14980.     float reflections_delay;
  14981.     float reverb_intensity_frac;
  14982.     float reverb_delay;
  14983.     float diffusion;
  14984.     float density;
  14985.     float high_frequency_reference;
  14986.     // 120, 16
  14987. } type_meta_snde;
  14988.  
  14989. #pragma mark -- soso
  14990.  
  14991. typedef struct {
  14992.     // 64, 1
  14993.     uint8_t radiosity_properties_flags; //toff 64   0x07
  14994.     uint16_t radiosity_properties_detail_level;
  14995.     float radiosity_properties_power;
  14996.    
  14997.     float radiosity_properties_color_of_emitted_light_r_frac;
  14998.     float radiosity_properties_color_of_emitted_light_g_frac;
  14999.     float radiosity_properties_color_of_emitted_light_b_frac;
  15000.     float radiosity_properties_tint_color_r_frac;
  15001.     float radiosity_properties_tint_color_g_frac;
  15002.     float radiosity_properties_tint_color_b_frac;
  15003.    
  15004.     // 96, 2
  15005.     uint16_t physics_properties_material_type;
  15006.    
  15007.     uint16_t INTERNAL_shdr_index;   // 4, toff 101
  15008.     // 102, 2
  15009.    
  15010.     // 104, 1
  15011.     uint8_t model_shader_flags; //toff 104  0x3F
  15012.     // 106, 14
  15013.     float model_shader_translucency_frac;
  15014.    
  15015.     // 124, 16
  15016.     uint16_t change_color_change_color_source;
  15017.     // 142, 30
  15018.     // 172, 1
  15019.     uint8_t self_illumination_flags;    //toff 170  0x01
  15020.     // 174, 2
  15021.     uint16_t self_illumination_color_source;
  15022.     uint16_t self_illumination_animation_function;
  15023.     float self_illumination_animation_period;
  15024.    
  15025.     float self_illumination_animation_color_lower_bound_r_frac;
  15026.     float self_illumination_animation_color_lower_bound_g_frac;
  15027.     float self_illumination_animation_color_lower_bound_b_frac;
  15028.     float self_illumination_animation_color_upper_bound_r_frac;
  15029.     float self_illumination_animation_color_upper_bound_g_frac;
  15030.     float self_illumination_animation_color_upper_bound_b_frac;
  15031.    
  15032.     // 208, 12
  15033.    
  15034.     // The description given in Guerilla for multi-purpose maps is how they are used with the Xbox. For the PC, it is allegedly different.
  15035.     // From Moses of Egypt:
  15036.     //
  15037.     //    [2/5/15, 4:00:53 PM] Devin Bobadilla: in shader model tags it says that multipurpose maps use the channels like this:
  15038.     //
  15039.     //       Alpha: Auxilary Mask
  15040.     //       Red: Specular Mask
  15041.     //       Green: Self Illumination
  15042.     //       Blue: Color Change Mask
  15043.     //
  15044.     //    [2/5/15, 4:00:57 PM] Devin Bobadilla: that's wrong
  15045.     //    [2/5/15, 4:02:05 PM] Devin Bobadilla: it's actually:
  15046.     //
  15047.     //       Alpha: Color Change Mask
  15048.     //       Red: Auxilary Mask
  15049.     //       Green: Self Illumination
  15050.     //       Blue: Specular Mask
  15051.     //
  15052.     //    [2/5/15, 4:02:19 PM] Devin Bobadilla: the description in guerilla is for xbox halo
  15053.     //    [2/5/15, 4:02:28 PM] Devin Bobadilla: they swapped the channels' functions around when they ported the game to PC
  15054.    
  15055.     float maps_map_u_scale;
  15056.     float maps_map_v_scale;
  15057.    
  15058.     // dependency 1: maps base map bitm
  15059.     char maps_base_map_tagclass[5];      //unsigned char[5]
  15060.     uint32_t maps_base_map_tagnamepointer;   //uint32 ("random" number)
  15061.     uint32_t maps_base_map_tagnamestringlength;   //uint32
  15062.     uint32_t maps_base_map_tagid;        //uint32 (0xFFFFFFFF with tags)
  15063.     // char maps_base_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15064.    
  15065.     // 244, 8
  15066.    
  15067.     // dependency 2: maps multipurpose map bitm
  15068.     char maps_multipurpose_map_tagclass[5];      //unsigned char[5]
  15069.     uint32_t maps_multipurpose_map_tagnamepointer;   //uint32 ("random" number)
  15070.     uint32_t maps_multipurpose_map_tagnamestringlength;   //uint32
  15071.     uint32_t maps_multipurpose_map_tagid;        //uint32 (0xFFFFFFFF with tags)
  15072.     // char maps_multipurpose_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15073.    
  15074.     // 268, 8
  15075.    
  15076.     uint16_t maps_detail_function;
  15077.     uint16_t maps_detail_mask;
  15078.     float maps_detail_map_scale;
  15079.    
  15080.     // dependency 3: maps detail map bitm
  15081.     char maps_detail_map_tagclass[5];        //unsigned char[5]
  15082.     uint32_t maps_detail_map_tagnamepointer;   //uint32 ("random" number)
  15083.     uint32_t maps_detail_map_tagnamestringlength;   //uint32
  15084.     uint32_t maps_detail_map_tagid;      //uint32 (0xFFFFFFFF with tags)
  15085.     // char maps_detail_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15086.    
  15087.     float maps_detail_map_v_scale;   // no "u scale" since this is "applied on top of detail map scale"
  15088.    
  15089.     // 304, 12
  15090.    
  15091.     uint16_t texture_scrolling_animation_u_animation_source;
  15092.     uint16_t texture_scrolling_animation_u_animation_function;
  15093.     float texture_scrolling_animation_u_animation_period;
  15094.     float texture_scrolling_animation_u_animation_phase;
  15095.     float texture_scrolling_animation_u_animation_scale;
  15096.    
  15097.     uint16_t texture_scrolling_animation_v_animation_source;
  15098.     uint16_t texture_scrolling_animation_v_animation_function;
  15099.     float texture_scrolling_animation_v_animation_period;
  15100.     float texture_scrolling_animation_v_animation_phase;
  15101.     float texture_scrolling_animation_v_animation_scale;
  15102.    
  15103.     uint16_t texture_scrolling_animation_rotation_animation_source;
  15104.     uint16_t texture_scrolling_animation_rotation_animation_function;
  15105.     float texture_scrolling_animation_rotation_animation_period;
  15106.     float texture_scrolling_animation_rotation_animation_phase;
  15107.     float texture_scrolling_animation_rotation_animation_scale;   // not radians
  15108.    
  15109.     float texture_scrolling_animation_rotation_animation_center_x;
  15110.     float texture_scrolling_animation_rotation_animation_center_y;
  15111.    
  15112.     // 372, 8
  15113.    
  15114.     float reflection_properties_reflection_falloff_distance;
  15115.     float reflection_properties_reflection_cutoff_distance;
  15116.    
  15117.     float reflection_properties_perpendicular_brightness_frac;
  15118.     float reflection_properties_perpendicular_tint_color_r_frac;
  15119.     float reflection_properties_perpendicular_tint_color_g_frac;
  15120.     float reflection_properties_perpendicular_tint_color_b_frac;
  15121.    
  15122.     float reflection_properties_parallel_brightness_frac;
  15123.     float reflection_properties_parallel_tint_color_r_frac;
  15124.     float reflection_properties_parallel_tint_color_g_frac;
  15125.     float reflection_properties_parallel_tint_color_b_frac;
  15126.    
  15127.     // dependency 4: reflection properties reflection cube map bitm
  15128.     char reflection_properties_reflection_cube_map_tagclass[5];      //unsigned char[5]
  15129.     uint32_t reflection_properties_reflection_cube_map_tagnamepointer;   //uint32 ("random" number)
  15130.     uint32_t reflection_properties_reflection_cube_map_tagnamestringlength;   //uint32
  15131.     uint32_t reflection_properties_reflection_cube_map_tagid;        //uint32 (0xFFFFFFFF with tags)
  15132.     // char reflection_properties_reflection_cube_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15133.    
  15134.     // 436, 68
  15135.    
  15136.     // 504, tpns 1-4
  15137.    
  15138. } type_meta_soso;
  15139.  
  15140. #pragma mark -- sotr
  15141.  
  15142. typedef struct {
  15143.     // 64, 1
  15144.     uint8_t radiosity_properties_flags; //toff 64   0x07
  15145.     uint16_t radiosity_properties_detail_level;
  15146.     float radiosity_properties_power;
  15147.    
  15148.     float radiosity_properties_color_of_emitted_light_r_frac;
  15149.     float radiosity_properties_color_of_emitted_light_g_frac;
  15150.     float radiosity_properties_color_of_emitted_light_b_frac;
  15151.     float radiosity_properties_tint_color_r_frac;
  15152.     float radiosity_properties_tint_color_g_frac;
  15153.     float radiosity_properties_tint_color_b_frac;
  15154.    
  15155.     // 96, 2
  15156.     uint16_t physics_properties_material_type;
  15157.    
  15158.     uint16_t INTERNAL_shdr_index;   // 5, toff 101
  15159.     // 102, 2
  15160.    
  15161.     uint8_t generic_transparent_shader_numeric_counter_limit;   // signed, but described as unsigned
  15162.     uint8_t generic_transparent_shader_flags;   //toff 105 (untested)   0xFF
  15163.     uint16_t generic_transparent_shader_first_map_type;
  15164.     uint16_t generic_transparent_shader_framebuffer_blend_function;
  15165.     uint16_t generic_transparent_shader_framebuffer_fade_mode;
  15166.     uint16_t generic_transparent_shader_framebuffer_fade_source;
  15167.    
  15168.     // 114, 2
  15169.    
  15170.     float lens_flares_lens_flare_spacing;
  15171.    
  15172.     // dependency 1: lens flares lens flare lens
  15173.     char lens_flares_lens_flare_tagclass[5];         //unsigned char[5]
  15174.     uint32_t lens_flares_lens_flare_tagnamepointer;   //uint32 ("random" number)
  15175.     uint32_t lens_flares_lens_flare_tagnamestringlength;   //uint32
  15176.     uint32_t lens_flares_lens_flare_tagid;       //uint32 (0xFFFFFFFF with tags)
  15177.     // char lens_flares_lens_flare_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15178.    
  15179.     // representation 1 board, offset 136
  15180.     // r1b_extra_layers_
  15181.     uint32_t r1b_extra_layers_entrycount; // maximum of 4 cells
  15182.     uint32_t r1b_extra_layers_random_id;
  15183.     uint32_t r1b_extra_layers_sig_id; // example value = 0x94A59C00
  15184.    
  15185.     // representation 2 board, offset 148
  15186.     // r2b_maps_
  15187.     uint32_t r2b_maps_entrycount; // maximum of 4 cells
  15188.     uint32_t r2b_maps_random_id;
  15189.     uint32_t r2b_maps_sig_id; // example value = 0x1CA79C00
  15190.    
  15191.     // representation 3 board, offset 160
  15192.     // r3b_stages_
  15193.     uint32_t r3b_stages_entrycount; // maximum of 7 cells
  15194.     uint32_t r3b_stages_random_id;
  15195.     uint32_t r3b_stages_sig_id; // example value = 0xE8AA9C00
  15196.    
  15197.     // 172, tpns 1
  15198.    
  15199.     struct sotr_r1c {
  15200.         // representation 1 cells
  15201.         // r1c_extra_layers_
  15202.         // 16 bytes
  15203.        
  15204.         // dependency r1c 1: shader shdr senv soso schi scex sotr sgla smet spla swat
  15205.         char r1c1_shader_tagclass[5];        //unsigned char[5]
  15206.         uint32_t r1c1_shader_tagnamepointer;   //uint32 ("random" number)
  15207.         uint32_t r1c1_shader_tagnamestringlength;   //uint32
  15208.         uint32_t r1c1_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  15209.         // char r1c1_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15210.        
  15211.     }r1c_extra_layers;
  15212.    
  15213.     // r1c1 tpns
  15214.    
  15215.     // example offset 275
  15216.    
  15217.     struct sotr_r2c {
  15218.         // representation 2 cells
  15219.         // r2c_maps_
  15220.         // 100 bytes
  15221.        
  15222.         // 1
  15223.         uint8_t r2c_maps_flags; //toff 172  0x07
  15224.         // 2
  15225.         float r2c_maps_map_u_scale;
  15226.         float r2c_maps_map_v_scale;
  15227.         float r2c_maps_map_u_offset;
  15228.         float r2c_maps_map_v_offset;
  15229.         float r2c_maps_map_rotation;   // not radians
  15230.         float r2c_maps_mipmap_bias_frac;
  15231.        
  15232.         // dependency r2c 1: map bitm
  15233.         char r2c1_map_tagclass[5];       //unsigned char[5]
  15234.         uint32_t r2c1_map_tagnamepointer;   //uint32 ("random" number)
  15235.         uint32_t r2c1_map_tagnamestringlength;   //uint32
  15236.         uint32_t r2c1_map_tagid;         //uint32 (0xFFFFFFFF with tags)
  15237.         // char r2c1_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15238.        
  15239.         uint16_t two_d_texture_animation_u_animation_source;
  15240.         uint16_t two_d_texture_animation_u_animation_function;
  15241.         float two_d_texture_animation_u_animation_period;
  15242.         float two_d_texture_animation_u_animation_phase;
  15243.         float two_d_texture_animation_u_animation_scale;
  15244.        
  15245.         uint16_t two_d_texture_animation_v_animation_source;
  15246.         uint16_t two_d_texture_animation_v_animation_function;
  15247.         float two_d_texture_animation_v_animation_period;
  15248.         float two_d_texture_animation_v_animation_phase;
  15249.         float two_d_texture_animation_v_animation_scale;
  15250.        
  15251.         uint16_t two_d_texture_animation_rotation_animation_source;
  15252.         uint16_t two_d_texture_animation_rotation_animation_function;
  15253.         float two_d_texture_animation_rotation_animation_period;
  15254.         float two_d_texture_animation_rotation_animation_phase;
  15255.         float two_d_texture_animation_rotation_animation_scale;   // not radians
  15256.        
  15257.         float two_d_texture_animation_rotation_animation_center_x;
  15258.         float two_d_texture_animation_rotation_animation_center_y;
  15259.        
  15260.     }r2c_maps;
  15261.    
  15262.     // r2c1 tpns
  15263.    
  15264.     // example offset 691
  15265.    
  15266.     struct sotr_r3c {
  15267.         // representation 3 cells
  15268.         // r3c_stages_
  15269.         // 112 bytes
  15270.        
  15271.         // 1
  15272.         uint8_t r3c_stages_flags;   //toff 272  0x07
  15273.         // 2
  15274.         uint16_t r3c_stages_constants_and_animation_color_0_source;
  15275.         uint16_t r3c_stages_constants_and_animation_color_0_animation_function;
  15276.         float r3c_stages_constants_and_animation_color_0_animation_period;
  15277.         float r3c_stages_constants_and_animation_color_0_animation_lower_bound_a_frac;
  15278.         float r3c_stages_constants_and_animation_color_0_animation_lower_bound_r_frac;
  15279.         float r3c_stages_constants_and_animation_color_0_animation_lower_bound_g_frac;
  15280.         float r3c_stages_constants_and_animation_color_0_animation_lower_bound_b_frac;
  15281.         float r3c_stages_constants_and_animation_color_0_animation_upper_bound_a_frac;
  15282.         float r3c_stages_constants_and_animation_color_0_animation_upper_bound_r_frac;
  15283.         float r3c_stages_constants_and_animation_color_0_animation_upper_bound_g_frac;
  15284.         float r3c_stages_constants_and_animation_color_0_animation_upper_bound_b_frac;
  15285.         float r3c_stages_constants_and_animation_color_1_a_frac;
  15286.         float r3c_stages_constants_and_animation_color_1_r_frac;
  15287.         float r3c_stages_constants_and_animation_color_1_g_frac;
  15288.         float r3c_stages_constants_and_animation_color_1_b_frac;
  15289.        
  15290.         uint16_t r3c_color_inputs_input_A;
  15291.         uint16_t r3c_color_inputs_input_A_mapping;
  15292.         uint16_t r3c_color_inputs_input_B;
  15293.         uint16_t r3c_color_inputs_input_B_mapping;
  15294.         uint16_t r3c_color_inputs_input_C;
  15295.         uint16_t r3c_color_inputs_input_C_mapping;
  15296.         uint16_t r3c_color_inputs_input_D;
  15297.         uint16_t r3c_color_inputs_input_D_mapping;
  15298.        
  15299.         uint16_t r3c_color_outputs_output_AB;
  15300.         uint16_t r3c_color_outputs_output_AB_function;
  15301.         uint16_t r3c_color_outputs_output_CD;
  15302.         uint16_t r3c_color_outputs_output_CD_function;
  15303.         uint16_t r3c_color_outputs_output_AB_CD_mux_sum;
  15304.         uint16_t r3c_color_outputs_output_mapping;
  15305.        
  15306.         uint16_t r3c_alpha_inputs_input_A;
  15307.         uint16_t r3c_alpha_inputs_input_A_mapping;
  15308.         uint16_t r3c_alpha_inputs_input_B;
  15309.         uint16_t r3c_alpha_inputs_input_B_mapping;
  15310.         uint16_t r3c_alpha_inputs_input_C;
  15311.         uint16_t r3c_alpha_inputs_input_C_mapping;
  15312.         uint16_t r3c_alpha_inputs_input_D;
  15313.         uint16_t r3c_alpha_inputs_input_D_mapping;
  15314.        
  15315.         uint16_t r3c_alpha_outputs_output_AB;
  15316.         uint16_t r3c_alpha_outputs_output_CD;
  15317.         uint16_t r3c_alpha_outputs_output_AB_CD_mux_sum;
  15318.         uint16_t r3c_alpha_outputs_output_mapping;
  15319.        
  15320.     }r3c_stages;
  15321.    
  15322. } type_meta_sotr;
  15323.  
  15324. #pragma mark -- Soul
  15325.  
  15326. typedef struct {
  15327.    
  15328.     // representation 1 board, offset 64
  15329.     // r1b_ui_widget_definitions_
  15330.     uint32_t r1b_ui_widget_definitions_entrycount; // maximum of 32 cells
  15331.     uint32_t r1b_ui_widget_definitions_random_id;
  15332.     uint32_t r1b_ui_widget_definitions_sig_id; // example value = 0xA0269C00
  15333.    
  15334.     struct soul_r1c {
  15335.         // representation 1 cells
  15336.         // r1c_ui_widget_definitions_
  15337.        
  15338.         // dependency r1c 1: ui_widget_definition DeLa
  15339.         char r1c1_ui_widget_definition_tagclass[5];      //unsigned char[5]
  15340.         uint32_t r1c1_ui_widget_definition_tagnamepointer;   //uint32 ("random" number)
  15341.         uint32_t r1c1_ui_widget_definition_tagnamestringlength;   //uint32
  15342.         uint32_t r1c1_ui_widget_definition_tagid;        //uint32 (0xFFFFFFFF with tags)
  15343.         // char r1c1_ui_widget_definition_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15344.        
  15345.     }r1c_ui_widget_definitions;
  15346.    
  15347.     // r1c1 tpns
  15348.    
  15349. } type_meta_soul;
  15350.  
  15351. #pragma mark -- spla
  15352.  
  15353. typedef struct {
  15354.     // 64, 1
  15355.     uint8_t radiosity_properties_flags; //toff 64   0x07
  15356.     uint16_t radiosity_properties_detail_level;
  15357.     float radiosity_properties_power;
  15358.    
  15359.     float radiosity_properties_color_of_emitted_light_r_frac;
  15360.     float radiosity_properties_color_of_emitted_light_g_frac;
  15361.     float radiosity_properties_color_of_emitted_light_b_frac;
  15362.     float radiosity_properties_tint_color_r_frac;
  15363.     float radiosity_properties_tint_color_g_frac;
  15364.     float radiosity_properties_tint_color_b_frac;
  15365.    
  15366.     // 96, 2
  15367.     uint16_t physics_properties_material_type;
  15368.    
  15369.     uint16_t INTERNAL_shdr_index;   // 11, toff 101
  15370.     // 102, 2
  15371.    
  15372.     // 104, 4 -- no data for the "plasma shader" section, toff 104 (treated as ignored padding in Guerilla)
  15373.    
  15374.     uint16_t intensity_intensity_source;
  15375.     // 110, 2
  15376.     float intensity_intensity_exponent;
  15377.    
  15378.     uint16_t offset_offset_source;
  15379.     // 118, 2
  15380.     float offset_offset_amount;
  15381.     float offset_offset_exponent;
  15382.    
  15383.     // 128, 32
  15384.    
  15385.     float color_perpendicular_brightness_frac;
  15386.     float color_perpendicular_tint_color_r_frac;
  15387.     float color_perpendicular_tint_color_g_frac;
  15388.     float color_perpendicular_tint_color_b_frac;
  15389.    
  15390.     float color_parallel_brightness_frac;
  15391.     float color_parallel_tint_color_r_frac;
  15392.     float color_parallel_tint_color_g_frac;
  15393.     float color_parallel_tint_color_b_frac;
  15394.    
  15395.     uint16_t color_tint_color_source;
  15396.    
  15397.     // 194, 62
  15398.    
  15399.     float primary_noise_map_primary_animation_period;
  15400.     float primary_noise_map_primary_animation_direction_i;
  15401.     float primary_noise_map_primary_animation_direction_j;
  15402.     float primary_noise_map_primary_animation_direction_k;
  15403.     float primary_noise_map_primary_noise_map_scale;
  15404.    
  15405.     // dependency 1: primary noise map primary noise map bitm
  15406.     char primary_noise_map_primary_noise_map_tagclass[5];        //unsigned char[5]
  15407.     uint32_t primary_noise_map_primary_noise_map_tagnamepointer;   //uint32 ("random" number)
  15408.     uint32_t primary_noise_map_primary_noise_map_tagnamestringlength;   //uint32
  15409.     uint32_t primary_noise_map_primary_noise_map_tagid;      //uint32 (0xFFFFFFFF with tags)
  15410.     // char primary_noise_map_primary_noise_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15411.    
  15412.     // 292, 36
  15413.    
  15414.     float secondary_noise_map_secondary_animation_period;
  15415.     float secondary_noise_map_secondary_animation_direction_i;
  15416.     float secondary_noise_map_secondary_animation_direction_j;
  15417.     float secondary_noise_map_secondary_animation_direction_k;
  15418.     float secondary_noise_map_secondary_noise_map_scale;
  15419.    
  15420.     // dependency 2: secondary noise map secondary noise map bitm
  15421.     char secondary_noise_map_secondary_noise_map_tagclass[5];        //unsigned char[5]
  15422.     uint32_t secondary_noise_map_secondary_noise_map_tagnamepointer;   //uint32 ("random" number)
  15423.     uint32_t secondary_noise_map_secondary_noise_map_tagnamestringlength;   //uint32
  15424.     uint32_t secondary_noise_map_secondary_noise_map_tagid;      //uint32 (0xFFFFFFFF with tags)
  15425.     // char secondary_noise_map_secondary_noise_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15426.    
  15427.     // 364, 32
  15428.    
  15429.     // 396, tpns 1-2
  15430.    
  15431. } type_meta_spla;
  15432.  
  15433. #pragma mark -- ssce
  15434.  
  15435. typedef struct {
  15436.     // OBJE DATA 1 START
  15437.     uint16_t INTERNAL_obje_index;   // 11 (little endian), toff 65 (would be curious)
  15438.     // 66, 1
  15439.     uint8_t flags;  //toff 66   0x0F
  15440.     float bounding_radius;
  15441.     float bounding_offset_x;
  15442.     float bounding_offset_y;
  15443.     float bounding_offset_z;
  15444.     float origin_offset_x;
  15445.     float origin_offset_y;
  15446.     float origin_offset_z;
  15447.     float acceleration_scale;
  15448.     // 100, 4
  15449.    
  15450.     // dependency 1: model mod2
  15451.     char model_tagclass[5];      //unsigned char[5]
  15452.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  15453.     uint32_t model_tagnamestringlength;   //uint32
  15454.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  15455.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15456.    
  15457.     // dependency 2: animation graph antr
  15458.     char animation_graph_tagclass[5];        //unsigned char[5]
  15459.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  15460.     uint32_t animation_graph_tagnamestringlength;   //uint32
  15461.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  15462.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15463.    
  15464.     // 136, 40
  15465.    
  15466.     // dependency 3: collision model coll
  15467.     char collision_model_tagclass[5];        //unsigned char[5]
  15468.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  15469.     uint32_t collision_model_tagnamestringlength;   //uint32
  15470.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  15471.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15472.    
  15473.     // dependency 4: physics phys
  15474.     char physics_tagclass[5];        //unsigned char[5]
  15475.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  15476.     uint32_t physics_tagnamestringlength;   //uint32
  15477.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  15478.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15479.    
  15480.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  15481.     char modifier_shader_tagclass[5];        //unsigned char[5]
  15482.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  15483.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  15484.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  15485.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15486.    
  15487.     // dependency 6: creation effect effe
  15488.     char creation_effect_tagclass[5];        //unsigned char[5]
  15489.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  15490.     uint32_t creation_effect_tagnamestringlength;   //uint32
  15491.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  15492.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15493.    
  15494.     // 240, 84
  15495.    
  15496.     float render_bounding_radius;
  15497.    
  15498.     uint16_t export_to_functions_a_in;
  15499.     uint16_t export_to_functions_b_in;
  15500.     uint16_t export_to_functions_c_in;
  15501.     uint16_t export_to_functions_d_in;
  15502.    
  15503.     // 336, 44
  15504.    
  15505.     uint16_t export_to_functions_hud_text_message_index;
  15506.     uint16_t export_to_functions_forced_shader_permutation_index;
  15507.    
  15508.     // representation 1 board, offset 384
  15509.     // r1b_attachments_
  15510.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  15511.     uint32_t r1b_attachments_random_id;
  15512.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  15513.    
  15514.     // representation 2 board, offset 396
  15515.     // r2b_widgets_
  15516.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  15517.     uint32_t r2b_widgets_random_id;
  15518.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  15519.    
  15520.     // representation 3 board, offset 408
  15521.     // r3b_functions_
  15522.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  15523.     uint32_t r3b_functions_random_id;
  15524.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  15525.    
  15526.     // representation 4 board, offset 420
  15527.     // r4b_change_colors_
  15528.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  15529.     uint32_t r4b_change_colors_random_id;
  15530.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  15531.    
  15532.     // representation 5 board, offset 432
  15533.     // r5b_predicted_resources_
  15534.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  15535.     uint32_t r5b_predicted_resources_random_id;
  15536.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  15537.    
  15538.     // OBJE DATA 1 END
  15539.    
  15540.     // 444, 128
  15541.    
  15542.     // offset 572, tagpathname strings for dependencies 1-6
  15543.    
  15544.     // OBJE DATA 2 START
  15545.    
  15546.     struct ssce_r1c {
  15547.         // representation 1 cells
  15548.         // r1c_attachments_
  15549.         // 72 bytes
  15550.        
  15551.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  15552.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  15553.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  15554.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  15555.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  15556.         // char r1c_attachments_type_tagnamestring[255];
  15557.        
  15558.         char r1c_attachments_marker[32];
  15559.         uint16_t r1c_attachments_primary_scale;
  15560.         uint16_t r1c_attachments_secondary_scale;
  15561.         uint16_t r1c_attachments_change_color;
  15562.        
  15563.         // 18
  15564.        
  15565.     }r1c_attachments;
  15566.    
  15567.     // r1c 1 tag name strings here
  15568.    
  15569.     struct ssce_r2c {
  15570.         // representation 2 cells
  15571.         // r2c_widgets_
  15572.         // 32 bytes
  15573.        
  15574.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  15575.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  15576.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  15577.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  15578.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  15579.         // char r2c_widgets_reference_tagnamestring[255];
  15580.        
  15581.         // 16
  15582.        
  15583.     }r2c_widgets;
  15584.    
  15585.     // r2c 1 tag name strings here
  15586.    
  15587.     struct ssce_r3c {
  15588.         // representation 3 cells
  15589.         // r3c_functions_
  15590.         // 360 bytes
  15591.        
  15592.         uint32_t r3c_functions_flags;   // verified that 4 bytes are written, toff 572  0x00000007
  15593.         float r3c_functions_period;
  15594.         uint16_t r3c_functions_scale_period_by;
  15595.         uint16_t r3c_functions_function;
  15596.         uint16_t r3c_functions_scale_function_by;
  15597.         uint16_t r3c_functions_wobble_function;
  15598.         float r3c_functions_wobble_period;
  15599.         float r3c_functions_wobble_magnitude;
  15600.         float r3c_functions_square_wave_threshold_frac;
  15601.         uint16_t r3c_functions_step_count;
  15602.         uint16_t r3c_functions_map_to;
  15603.         uint16_t r3c_functions_sawtooth_count;
  15604.         uint16_t r3c_functions_add;
  15605.         uint16_t r3c_functions_scale_result_by;
  15606.         uint16_t r3c_functions_bounds_mode;
  15607.         float r3c_functions_bounds_from_frac;
  15608.         float r3c_functions_bounds_to_frac;
  15609.         // 6
  15610.         uint16_t r3c_functions_turn_off_with_sel;
  15611.         float r3c_functions_scale_by;
  15612.         // 268
  15613.         char r3c_functions_usage[32];
  15614.        
  15615.     }r3c_functions;
  15616.    
  15617.     struct ssce_r4c {
  15618.         // representation 4 cells
  15619.         // r4c_change_colors_
  15620.         // 44 bytes
  15621.        
  15622.         uint16_t r4c_change_colors_darken_by;
  15623.         uint16_t r4c_change_colors_scale_by;
  15624.         uint32_t r4c_change_colors_scale_flags;   // verified that 4 bytes are written, toff 936    0x00000003
  15625.         float r4c_change_colors_color_lower_bound_r_frac;
  15626.         float r4c_change_colors_color_lower_bound_g_frac;
  15627.         float r4c_change_colors_color_lower_bound_b_frac;
  15628.         float r4c_change_colors_color_upper_bound_r_frac;
  15629.         float r4c_change_colors_color_upper_bound_g_frac;
  15630.         float r4c_change_colors_color_upper_bound_b_frac;
  15631.        
  15632.         // representation 4 sub-board A
  15633.         // r4sbA_permutations_
  15634.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  15635.         uint32_t r4sbA_permutations_random_id1;
  15636.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  15637.     }r4c_change_colors;
  15638.    
  15639.     struct ssce_r4scA
  15640.     {
  15641.         // representation 4 sub-cells A
  15642.         // r4scA_permutations_
  15643.         // 28 bytes
  15644.        
  15645.         float r4scA_permutations_weight_frac;
  15646.         float r4scA_permutations_color_lower_bound_r_frac;
  15647.         float r4scA_permutations_color_lower_bound_g_frac;
  15648.         float r4scA_permutations_color_lower_bound_b_frac;
  15649.         float r4scA_permutations_color_upper_bound_r_frac;
  15650.         float r4scA_permutations_color_upper_bound_g_frac;
  15651.         float r4scA_permutations_color_upper_bound_b_frac;
  15652.     }r4sc_change_colors_permutations;
  15653.    
  15654.     struct ssce_r5c {
  15655.         // representation 5 cells
  15656.         // r5c_predicted_resources_
  15657.         // 8 bytes
  15658.        
  15659.         uint16_t r5c_predicted_resources_type;
  15660.         uint16_t r5c_predicted_resources_resource_index;
  15661.         uint32_t r5c_predicted_resources_tag_index;
  15662.     }r5c_predicted_resources;
  15663.    
  15664.     // OBJE DATA 2 END
  15665.    
  15666. } type_meta_ssce;
  15667.  
  15668. #pragma mark -- str#
  15669.  
  15670. typedef struct {
  15671.     // representation 1 board, offset 64
  15672.     // r1b_string_references_
  15673.     uint32_t r1b_string_references_entrycount; // maximum of 800 cells
  15674.     uint32_t r1b_string_references_random_id;
  15675.     uint32_t r1b_string_references_sig_id; // example value = 0xB4619D00
  15676.    
  15677.     struct strn_r1c {
  15678.         // representation 1 cells
  15679.         // r1c_string_references_
  15680.         // 20 bytes
  15681.        
  15682.         uint32_t r1c_string_references_string;
  15683.         // 4
  15684.         // little endian internal board values:
  15685.         uint32_t r1c_string_references_INTERNAL_string_offset_pointer;   // example value = 0 (not used properly; unused?)
  15686.         uint32_t r1c_string_references_INTERNAL_string_random1;
  15687.         uint32_t r1c_string_references_INTERNAL_string_sig_id;   // example value = 0x8C619D00
  15688.        
  15689.     }r1c_string_references;
  15690.    
  15691.     // strings data goes here (nothing fancy, just all in order, one right after the other) -- null-terminated strings
  15692.    
  15693. } type_meta_strn;
  15694.  
  15695. #pragma mark -- swat
  15696.  
  15697. typedef struct {
  15698.     // 64, 1
  15699.     uint8_t radiosity_properties_flags; //toff 64   0x07
  15700.     uint16_t radiosity_properties_detail_level;
  15701.     float radiosity_properties_power;
  15702.    
  15703.     float radiosity_properties_color_of_emitted_light_r_frac;
  15704.     float radiosity_properties_color_of_emitted_light_g_frac;
  15705.     float radiosity_properties_color_of_emitted_light_b_frac;
  15706.     float radiosity_properties_tint_color_r_frac;
  15707.     float radiosity_properties_tint_color_g_frac;
  15708.     float radiosity_properties_tint_color_b_frac;
  15709.    
  15710.     // 96, 2
  15711.     uint16_t physics_properties_material_type;
  15712.    
  15713.     uint16_t INTERNAL_shdr_index;   // 8, toff 101
  15714.     // 102, 2
  15715.     // 104, 1
  15716.     uint8_t water_shader_flags; //toff 104  0x0F
  15717.     // 106, 34
  15718.    
  15719.     // dependency 1: water shader base map bitm
  15720.     char water_shader_base_map_tagclass[5];      //unsigned char[5]
  15721.     uint32_t water_shader_base_map_tagnamepointer;   //uint32 ("random" number)
  15722.     uint32_t water_shader_base_map_tagnamestringlength;   //uint32
  15723.     uint32_t water_shader_base_map_tagid;        //uint32 (0xFFFFFFFF with tags)
  15724.     // char water_shader_base_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15725.    
  15726.     // 156, 16
  15727.    
  15728.     float water_shader_view_perpendicular_brightness_frac;
  15729.     float water_shader_view_perpendicular_tint_color_r_frac;
  15730.     float water_shader_view_perpendicular_tint_color_g_frac;
  15731.     float water_shader_view_perpendicular_tint_color_b_frac;
  15732.     float water_shader_view_parallel_brightness_frac;
  15733.     float water_shader_view_parallel_tint_color_r_frac;
  15734.     float water_shader_view_parallel_tint_color_g_frac;
  15735.     float water_shader_view_parallel_tint_color_b_frac;
  15736.    
  15737.     // 204, 16
  15738.    
  15739.     // dependency 2: water shader reflection map bitm
  15740.     char water_shader_reflection_map_tagclass[5];        //unsigned char[5]
  15741.     uint32_t water_shader_reflection_map_tagnamepointer;   //uint32 ("random" number)
  15742.     uint32_t water_shader_reflection_map_tagnamestringlength;   //uint32
  15743.     uint32_t water_shader_reflection_map_tagid;      //uint32 (0xFFFFFFFF with tags)
  15744.     // char water_shader_reflection_map_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15745.    
  15746.     // 236, 16
  15747.    
  15748.     float water_shader_ripple_animation_angle_rad;
  15749.     float water_shader_ripple_animation_velocity;
  15750.     float water_shader_ripple_scale;
  15751.    
  15752.     // dependency 3: water shader ripple maps bitm
  15753.     char water_shader_ripple_maps_tagclass[5];       //unsigned char[5]
  15754.     uint32_t water_shader_ripple_maps_tagnamepointer;   //uint32 ("random" number)
  15755.     uint32_t water_shader_ripple_maps_tagnamestringlength;   //uint32
  15756.     uint32_t water_shader_ripple_maps_tagid;         //uint32 (0xFFFFFFFF with tags)
  15757.     // char water_shader_ripple_maps_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15758.    
  15759.     uint16_t water_shader_ripple_mipmap_levels;
  15760.     // 282, 2
  15761.     float water_shader_ripple_mipmap_fade_factor_frac;
  15762.     float water_shader_ripple_mipmap_detail_bias;
  15763.    
  15764.     // 292, 64
  15765.    
  15766.     // representation 1 board, offset 356
  15767.     // r1b_ripples_
  15768.     uint32_t r1b_ripples_entrycount; // maximum of 4 cells
  15769.     uint32_t r1b_ripples_random_id;
  15770.     uint32_t r1b_ripples_sig_id; // example value = 0x24B29C00
  15771.    
  15772.     // 368, 16
  15773.    
  15774.     // 384, tpns 1-3
  15775.    
  15776.     struct swat_r1c {
  15777.         // representation 1 cells
  15778.         // r1c_ripples_
  15779.         // 76 bytes
  15780.        
  15781.         // 4
  15782.        
  15783.         float r1c_ripples_contribution_factor_frac;
  15784.         // 32
  15785.         float r1c_ripples_animation_angle_rad;
  15786.         float r1c_ripples_animation_velocity;
  15787.         float r1c_ripples_map_offset_i;
  15788.         float r1c_ripples_map_offset_j;
  15789.         uint16_t r1c_ripples_map_repeats;
  15790.         uint16_t r1c_ripples_map_index;
  15791.         // 16
  15792.        
  15793.     }r1c_ripples;
  15794.    
  15795. } type_meta_swat;
  15796.  
  15797. #pragma mark -- tagc
  15798.  
  15799. typedef struct {
  15800.     // representation 1 board, offset 64
  15801.     // r1b_tag_references_
  15802.     uint32_t r1b_tag_references_entrycount; // maximum of 200 cells
  15803.     uint32_t r1b_tag_references_random_id;
  15804.     uint32_t r1b_tag_references_sig_id; // example value = 0x08149C00
  15805.    
  15806.     struct tagc_r1c {
  15807.         // representation 1 cells
  15808.         // r1c_tag_references_
  15809.        
  15810.         // dependency r1c 1: tag (any tag class)
  15811.         char r1c1_tag_tagclass[5];       //unsigned char[5]
  15812.         uint32_t r1c1_tag_tagnamepointer;   //uint32 ("random" number)
  15813.         uint32_t r1c1_tag_tagnamestringlength;   //uint32
  15814.         uint32_t r1c1_tag_tagid;         //uint32 (0xFFFFFFFF with tags)
  15815.         // char r1c1_tag_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  15816.        
  15817.     }r1c_tag_references;
  15818.    
  15819.     // r1c1 tpns
  15820.    
  15821. } type_meta_tagc;
  15822.  
  15823. #pragma mark -- trak
  15824.  
  15825. typedef struct {
  15826.    
  15827.     uint32_t unknown_1;   // four bytes of written zeros, but I don't know why they are written -- the value in every trak tag is 0x00000000
  15828.    
  15829.     // representation 1 board, offset 68
  15830.     // r1b_control_points_
  15831.     uint32_t r1b_control_points_entrycount; // maximum of 16 cells
  15832.     uint32_t r1b_control_points_random_id;
  15833.     uint32_t r1b_control_points_sig_id; // example value = 0x94049D00
  15834.    
  15835.     // 80, 32
  15836.    
  15837.     struct trak_r1c {
  15838.         // representation 1 cells
  15839.         // r1c_control_points_
  15840.        
  15841.         float r1c_control_points_position_i;
  15842.         float r1c_control_points_position_j;
  15843.         float r1c_control_points_position_k;
  15844.         float r1c_control_points_orientation_i;
  15845.         float r1c_control_points_orientation_j;
  15846.         float r1c_control_points_orientation_k;
  15847.         float r1c_control_points_orientation_w;
  15848.        
  15849.         // 32
  15850.        
  15851.        
  15852.     }r1c_control_points;
  15853.    
  15854. } type_meta_trak;
  15855.  
  15856. #pragma mark -- udlg
  15857.  
  15858. typedef struct {
  15859.     // 64, 16
  15860.    
  15861.     // I'm going to streamline this process...
  15862.    
  15863.     // dependency 1: idle -- idle noncombat -- snd!
  15864.     char d1_tagclass[5];         //unsigned char[5]
  15865.     uint32_t d1_tagnamepointer;   //uint32 ("random" number)
  15866.     uint32_t d1_tagnamestringlength;   //uint32
  15867.     uint32_t d1_tagid;       //uint32 (0xFFFFFFFF with tags)
  15868.    
  15869.     // dependency 2: idle -- idle combat
  15870.     char d2_tagclass[5];
  15871.     uint32_t d2_tagnamepointer;
  15872.     uint32_t d2_tagnamestringlength;
  15873.     uint32_t d2_tagid;
  15874.    
  15875.     // d3: idle -- idle flee
  15876.     char d3_tagclass[5];
  15877.     uint32_t d3_tagnamepointer;
  15878.     uint32_t d3_tagnamestringlength;
  15879.     uint32_t d3_tagid;
  15880.    
  15881.     // 128, 48
  15882.    
  15883.     // d4: involuntary -- pain body minor
  15884.     char d4_tagclass[5];
  15885.     uint32_t d4_tagnamepointer;
  15886.     uint32_t d4_tagnamestringlength;
  15887.     uint32_t d4_tagid;
  15888.    
  15889.     // d5: involuntary -- pain body major
  15890.     char d5_tagclass[5];
  15891.     uint32_t d5_tagnamepointer;
  15892.     uint32_t d5_tagnamestringlength;
  15893.     uint32_t d5_tagid;
  15894.    
  15895.     // d6: involuntary -- pain shield
  15896.     char d6_tagclass[5];
  15897.     uint32_t d6_tagnamepointer;
  15898.     uint32_t d6_tagnamestringlength;
  15899.     uint32_t d6_tagid;
  15900.    
  15901.     // d7: involuntary -- pain falling
  15902.     char d7_tagclass[5];
  15903.     uint32_t d7_tagnamepointer;
  15904.     uint32_t d7_tagnamestringlength;
  15905.     uint32_t d7_tagid;
  15906.    
  15907.     // d8: involuntary -- scream fear
  15908.     char d8_tagclass[5];
  15909.     uint32_t d8_tagnamepointer;
  15910.     uint32_t d8_tagnamestringlength;
  15911.     uint32_t d8_tagid;
  15912.    
  15913.     // d9: involuntary -- scream pain
  15914.     char d9_tagclass[5];
  15915.     uint32_t d9_tagnamepointer;
  15916.     uint32_t d9_tagnamestringlength;
  15917.     uint32_t d9_tagid;
  15918.    
  15919.     // d10: involuntary -- maimed limb
  15920.     char d10_tagclass[5];
  15921.     uint32_t d10_tagnamepointer;
  15922.     uint32_t d10_tagnamestringlength;
  15923.     uint32_t d10_tagid;
  15924.    
  15925.     // d11: involuntary -- maimed head
  15926.     char d11_tagclass[5];
  15927.     uint32_t d11_tagnamepointer;
  15928.     uint32_t d11_tagnamestringlength;
  15929.     uint32_t d11_tagid;
  15930.    
  15931.     // d12: involuntary -- death quiet
  15932.     char d12_tagclass[5];
  15933.     uint32_t d12_tagnamepointer;
  15934.     uint32_t d12_tagnamestringlength;
  15935.     uint32_t d12_tagid;
  15936.    
  15937.     // d13: involuntary -- death violent
  15938.     char d13_tagclass[5];
  15939.     uint32_t d13_tagnamepointer;
  15940.     uint32_t d13_tagnamestringlength;
  15941.     uint32_t d13_tagid;
  15942.    
  15943.     // d14: involuntary -- death falling
  15944.     char d14_tagclass[5];
  15945.     uint32_t d14_tagnamepointer;
  15946.     uint32_t d14_tagnamestringlength;
  15947.     uint32_t d14_tagid;
  15948.    
  15949.     // d15: involuntary -- death agonizing
  15950.     char d15_tagclass[5];
  15951.     uint32_t d15_tagnamepointer;
  15952.     uint32_t d15_tagnamestringlength;
  15953.     uint32_t d15_tagid;
  15954.    
  15955.     // d16: involuntary -- death instant
  15956.     char d16_tagclass[5];
  15957.     uint32_t d16_tagnamepointer;
  15958.     uint32_t d16_tagnamestringlength;
  15959.     uint32_t d16_tagid;
  15960.    
  15961.     // d17: involuntary -- death flying
  15962.     char d17_tagclass[5];
  15963.     uint32_t d17_tagnamepointer;
  15964.     uint32_t d17_tagnamestringlength;
  15965.     uint32_t d17_tagid;
  15966.    
  15967.     // 400, 16
  15968.    
  15969.     // d18: hurting people -- damaged friend
  15970.     char d18_tagclass[5];
  15971.     uint32_t d18_tagnamepointer;
  15972.     uint32_t d18_tagnamestringlength;
  15973.     uint32_t d18_tagid;
  15974.    
  15975.     // d19: hurting people -- damaged friend player
  15976.     char d19_tagclass[5];
  15977.     uint32_t d19_tagnamepointer;
  15978.     uint32_t d19_tagnamestringlength;
  15979.     uint32_t d19_tagid;
  15980.    
  15981.     // d20: hurting people -- damaged enemy
  15982.     char d20_tagclass[5];
  15983.     uint32_t d20_tagnamepointer;
  15984.     uint32_t d20_tagnamestringlength;
  15985.     uint32_t d20_tagid;
  15986.    
  15987.     // d21: hurting people -- damaged enemy comment
  15988.     char d21_tagclass[5];
  15989.     uint32_t d21_tagnamepointer;
  15990.     uint32_t d21_tagnamestringlength;
  15991.     uint32_t d21_tagid;
  15992.    
  15993.     // 480, 64
  15994.    
  15995.     // d22: being hurt -- hurt friend
  15996.     char d22_tagclass[5];
  15997.     uint32_t d22_tagnamepointer;
  15998.     uint32_t d22_tagnamestringlength;
  15999.     uint32_t d22_tagid;
  16000.    
  16001.     // d23: being hurt -- hurt friend response
  16002.     char d23_tagclass[5];
  16003.     uint32_t d23_tagnamepointer;
  16004.     uint32_t d23_tagnamestringlength;
  16005.     uint32_t d23_tagid;
  16006.    
  16007.     // d24: being hurt -- hurt friend player
  16008.     char d24_tagclass[5];
  16009.     uint32_t d24_tagnamepointer;
  16010.     uint32_t d24_tagnamestringlength;
  16011.     uint32_t d24_tagid;
  16012.    
  16013.     // d25: being hurt -- hurt enemy
  16014.     char d25_tagclass[5];
  16015.     uint32_t d25_tagnamepointer;
  16016.     uint32_t d25_tagnamestringlength;
  16017.     uint32_t d25_tagid;
  16018.    
  16019.     // d26: being hurt -- hurt enemy response
  16020.     char d26_tagclass[5];
  16021.     uint32_t d26_tagnamepointer;
  16022.     uint32_t d26_tagnamestringlength;
  16023.     uint32_t d26_tagid;
  16024.    
  16025.     // d27: being hurt -- hurt enemy comment
  16026.     char d27_tagclass[5];
  16027.     uint32_t d27_tagnamepointer;
  16028.     uint32_t d27_tagnamestringlength;
  16029.     uint32_t d27_tagid;
  16030.    
  16031.     // d28: being hurt -- hurt enemy bullet
  16032.     char d28_tagclass[5];
  16033.     uint32_t d28_tagnamepointer;
  16034.     uint32_t d28_tagnamestringlength;
  16035.     uint32_t d28_tagid;
  16036.    
  16037.     // d29: being hurt -- hurt enemy needler
  16038.     char d29_tagclass[5];
  16039.     uint32_t d29_tagnamepointer;
  16040.     uint32_t d29_tagnamestringlength;
  16041.     uint32_t d29_tagid;
  16042.    
  16043.     // d30: being hurt -- hurt enemy plasma
  16044.     char d30_tagclass[5];
  16045.     uint32_t d30_tagnamepointer;
  16046.     uint32_t d30_tagnamestringlength;
  16047.     uint32_t d30_tagid;
  16048.    
  16049.     // d31: being hurt -- hurt enemy sniper
  16050.     char d31_tagclass[5];
  16051.     uint32_t d31_tagnamepointer;
  16052.     uint32_t d31_tagnamestringlength;
  16053.     uint32_t d31_tagid;
  16054.    
  16055.     // d32: being hurt -- hurt enemy grenade
  16056.     char d32_tagclass[5];
  16057.     uint32_t d32_tagnamepointer;
  16058.     uint32_t d32_tagnamestringlength;
  16059.     uint32_t d32_tagid;
  16060.    
  16061.     // d33: being hurt -- hurt enemy explosion
  16062.     char d33_tagclass[5];
  16063.     uint32_t d33_tagnamepointer;
  16064.     uint32_t d33_tagnamestringlength;
  16065.     uint32_t d33_tagid;
  16066.    
  16067.     // d34: being hurt -- hurt enemy melee
  16068.     char d34_tagclass[5];
  16069.     uint32_t d34_tagnamepointer;
  16070.     uint32_t d34_tagnamestringlength;
  16071.     uint32_t d34_tagid;
  16072.    
  16073.     // d35: being hurt -- hurt enemy flame
  16074.     char d35_tagclass[5];
  16075.     uint32_t d35_tagnamepointer;
  16076.     uint32_t d35_tagnamestringlength;
  16077.     uint32_t d35_tagid;
  16078.    
  16079.     // d36: being hurt -- hurt enemy shotgun
  16080.     char d36_tagclass[5];
  16081.     uint32_t d36_tagnamepointer;
  16082.     uint32_t d36_tagnamestringlength;
  16083.     uint32_t d36_tagid;
  16084.    
  16085.     // d37: being hurt -- hurt enemy vehicle
  16086.     char d37_tagclass[5];
  16087.     uint32_t d37_tagnamepointer;
  16088.     uint32_t d37_tagnamestringlength;
  16089.     uint32_t d37_tagid;
  16090.    
  16091.     // d38: being hurt -- hurt enemy mountedweapon
  16092.     char d38_tagclass[5];
  16093.     uint32_t d38_tagnamepointer;
  16094.     uint32_t d38_tagnamestringlength;
  16095.     uint32_t d38_tagid;
  16096.    
  16097.     // 816, 48
  16098.    
  16099.     // d39: killing people -- killed friend
  16100.     char d39_tagclass[5];
  16101.     uint32_t d39_tagnamepointer;
  16102.     uint32_t d39_tagnamestringlength;
  16103.     uint32_t d39_tagid;
  16104.    
  16105.     // d40: killing people -- killed friend comment
  16106.     char d40_tagclass[5];
  16107.     uint32_t d40_tagnamepointer;
  16108.     uint32_t d40_tagnamestringlength;
  16109.     uint32_t d40_tagid;
  16110.    
  16111.     // d41: killing people -- killed friend player
  16112.     char d41_tagclass[5];
  16113.     uint32_t d41_tagnamepointer;
  16114.     uint32_t d41_tagnamestringlength;
  16115.     uint32_t d41_tagid;
  16116.    
  16117.     // d42: killing people -- killed friend player comment
  16118.     char d42_tagclass[5];
  16119.     uint32_t d42_tagnamepointer;
  16120.     uint32_t d42_tagnamestringlength;
  16121.     uint32_t d42_tagid;
  16122.    
  16123.     // d43: killing people -- killed enemy
  16124.     char d43_tagclass[5];
  16125.     uint32_t d43_tagnamepointer;
  16126.     uint32_t d43_tagnamestringlength;
  16127.     uint32_t d43_tagid;
  16128.    
  16129.     // d44: killing people -- killed enemy comment
  16130.     char d44_tagclass[5];
  16131.     uint32_t d44_tagnamepointer;
  16132.     uint32_t d44_tagnamestringlength;
  16133.     uint32_t d44_tagid;
  16134.    
  16135.     // d45: killing people -- killed enemy player
  16136.     char d45_tagclass[5];
  16137.     uint32_t d45_tagnamepointer;
  16138.     uint32_t d45_tagnamestringlength;
  16139.     uint32_t d45_tagid;
  16140.    
  16141.     // d46: killing people -- killed enemy player comment
  16142.     char d46_tagclass[5];
  16143.     uint32_t d46_tagnamepointer;
  16144.     uint32_t d46_tagnamestringlength;
  16145.     uint32_t d46_tagid;
  16146.    
  16147.     // d47: killing people -- killed enemy covenant
  16148.     char d47_tagclass[5];
  16149.     uint32_t d47_tagnamepointer;
  16150.     uint32_t d47_tagnamestringlength;
  16151.     uint32_t d47_tagid;
  16152.    
  16153.     // d48: killing people -- killed enemy covenant comment
  16154.     char d48_tagclass[5];
  16155.     uint32_t d48_tagnamepointer;
  16156.     uint32_t d48_tagnamestringlength;
  16157.     uint32_t d48_tagid;
  16158.    
  16159.     // d49: killing people -- killed enemy floodcombat
  16160.     char d49_tagclass[5];
  16161.     uint32_t d49_tagnamepointer;
  16162.     uint32_t d49_tagnamestringlength;
  16163.     uint32_t d49_tagid;
  16164.    
  16165.     // d50: killing people -- killed enemy floodcombat comment
  16166.     char d50_tagclass[5];
  16167.     uint32_t d50_tagnamepointer;
  16168.     uint32_t d50_tagnamestringlength;
  16169.     uint32_t d50_tagid;
  16170.    
  16171.     // d51: killing people -- killed enemy floodcarrier
  16172.     char d51_tagclass[5];
  16173.     uint32_t d51_tagnamepointer;
  16174.     uint32_t d51_tagnamestringlength;
  16175.     uint32_t d51_tagid;
  16176.    
  16177.     // d52: killing people -- killed enemy floodcarrier comment
  16178.     char d52_tagclass[5];
  16179.     uint32_t d52_tagnamepointer;
  16180.     uint32_t d52_tagnamestringlength;
  16181.     uint32_t d52_tagid;
  16182.    
  16183.     // d53: killing people -- killed enemy sentinel
  16184.     char d53_tagclass[5];
  16185.     uint32_t d53_tagnamepointer;
  16186.     uint32_t d53_tagnamestringlength;
  16187.     uint32_t d53_tagid;
  16188.    
  16189.     // d54: killing people -- killed enemy sentinel comment
  16190.     char d54_tagclass[5];
  16191.     uint32_t d54_tagnamepointer;
  16192.     uint32_t d54_tagnamestringlength;
  16193.     uint32_t d54_tagid;
  16194.    
  16195.     // d55: killing people -- killed enemy bullet
  16196.     char d55_tagclass[5];
  16197.     uint32_t d55_tagnamepointer;
  16198.     uint32_t d55_tagnamestringlength;
  16199.     uint32_t d55_tagid;
  16200.    
  16201.     // d56: killing people -- killed enemy needler
  16202.     char d56_tagclass[5];
  16203.     uint32_t d56_tagnamepointer;
  16204.     uint32_t d56_tagnamestringlength;
  16205.     uint32_t d56_tagid;
  16206.    
  16207.     // d57: killing people -- killed enemy plasma
  16208.     char d57_tagclass[5];
  16209.     uint32_t d57_tagnamepointer;
  16210.     uint32_t d57_tagnamestringlength;
  16211.     uint32_t d57_tagid;
  16212.    
  16213.     // d58: killing people -- killed enemy sniper
  16214.     char d58_tagclass[5];
  16215.     uint32_t d58_tagnamepointer;
  16216.     uint32_t d58_tagnamestringlength;
  16217.     uint32_t d58_tagid;
  16218.    
  16219.     // d59: killing people -- killed enemy grenade
  16220.     char d59_tagclass[5];
  16221.     uint32_t d59_tagnamepointer;
  16222.     uint32_t d59_tagnamestringlength;
  16223.     uint32_t d59_tagid;
  16224.    
  16225.     // d60: killing people -- killed enemy explosion
  16226.     char d60_tagclass[5];
  16227.     uint32_t d60_tagnamepointer;
  16228.     uint32_t d60_tagnamestringlength;
  16229.     uint32_t d60_tagid;
  16230.    
  16231.     // d61: killing people -- killed enemy melee
  16232.     char d61_tagclass[5];
  16233.     uint32_t d61_tagnamepointer;
  16234.     uint32_t d61_tagnamestringlength;
  16235.     uint32_t d61_tagid;
  16236.    
  16237.     // d62: killing people -- killed enemy flame
  16238.     char d62_tagclass[5];
  16239.     uint32_t d62_tagnamepointer;
  16240.     uint32_t d62_tagnamestringlength;
  16241.     uint32_t d62_tagid;
  16242.    
  16243.     // d63: killing people -- killed enemy shotgun
  16244.     char d63_tagclass[5];
  16245.     uint32_t d63_tagnamepointer;
  16246.     uint32_t d63_tagnamestringlength;
  16247.     uint32_t d63_tagid;
  16248.    
  16249.     // d64: killing people -- killed enemy vehicle
  16250.     char d64_tagclass[5];
  16251.     uint32_t d64_tagnamepointer;
  16252.     uint32_t d64_tagnamestringlength;
  16253.     uint32_t d64_tagid;
  16254.    
  16255.     // d65: killing people -- killed enemy mountedweapon
  16256.     char d65_tagclass[5];
  16257.     uint32_t d65_tagnamepointer;
  16258.     uint32_t d65_tagnamestringlength;
  16259.     uint32_t d65_tagid;
  16260.    
  16261.     // d66: killing people -- killing spree
  16262.     char d66_tagclass[5];
  16263.     uint32_t d66_tagnamepointer;
  16264.     uint32_t d66_tagnamestringlength;
  16265.     uint32_t d66_tagid;
  16266.    
  16267.     // 1312, 48
  16268.    
  16269.     // d67: player kill responses -- player kill comment
  16270.     char d67_tagclass[5];
  16271.     uint32_t d67_tagnamepointer;
  16272.     uint32_t d67_tagnamestringlength;
  16273.     uint32_t d67_tagid;
  16274.    
  16275.     // d68: player kill responses -- player kill bullet comment
  16276.     char d68_tagclass[5];
  16277.     uint32_t d68_tagnamepointer;
  16278.     uint32_t d68_tagnamestringlength;
  16279.     uint32_t d68_tagid;
  16280.    
  16281.     // d69: player kill responses -- player kill needler comment
  16282.     char d69_tagclass[5];
  16283.     uint32_t d69_tagnamepointer;
  16284.     uint32_t d69_tagnamestringlength;
  16285.     uint32_t d69_tagid;
  16286.    
  16287.     // d70: player kill responses -- player kill plasma comment
  16288.     char d70_tagclass[5];
  16289.     uint32_t d70_tagnamepointer;
  16290.     uint32_t d70_tagnamestringlength;
  16291.     uint32_t d70_tagid;
  16292.    
  16293.     // d71: player kill responses -- player kill sniper comment
  16294.     char d71_tagclass[5];
  16295.     uint32_t d71_tagnamepointer;
  16296.     uint32_t d71_tagnamestringlength;
  16297.     uint32_t d71_tagid;
  16298.    
  16299.     // d72: player kill responses -- anyone kill grenade comment
  16300.     char d72_tagclass[5];
  16301.     uint32_t d72_tagnamepointer;
  16302.     uint32_t d72_tagnamestringlength;
  16303.     uint32_t d72_tagid;
  16304.    
  16305.     // d73: player kill responses -- player kill explosion comment
  16306.     char d73_tagclass[5];
  16307.     uint32_t d73_tagnamepointer;
  16308.     uint32_t d73_tagnamestringlength;
  16309.     uint32_t d73_tagid;
  16310.    
  16311.     // d74: player kill responses -- player kill melee comment
  16312.     char d74_tagclass[5];
  16313.     uint32_t d74_tagnamepointer;
  16314.     uint32_t d74_tagnamestringlength;
  16315.     uint32_t d74_tagid;
  16316.    
  16317.     // d75: player kill responses -- player kill flame comment
  16318.     char d75_tagclass[5];
  16319.     uint32_t d75_tagnamepointer;
  16320.     uint32_t d75_tagnamestringlength;
  16321.     uint32_t d75_tagid;
  16322.    
  16323.     // d76: player kill responses -- player kill shotgun comment
  16324.     char d76_tagclass[5];
  16325.     uint32_t d76_tagnamepointer;
  16326.     uint32_t d76_tagnamestringlength;
  16327.     uint32_t d76_tagid;
  16328.    
  16329.     // d77: player kill responses -- player kill vehicle comment
  16330.     char d77_tagclass[5];
  16331.     uint32_t d77_tagnamepointer;
  16332.     uint32_t d77_tagnamestringlength;
  16333.     uint32_t d77_tagid;
  16334.    
  16335.     // d78: player kill responses -- player kill mountedweapon comment
  16336.     char d78_tagclass[5];
  16337.     uint32_t d78_tagnamepointer;
  16338.     uint32_t d78_tagnamestringlength;
  16339.     uint32_t d78_tagid;
  16340.    
  16341.     // d79: player kill responses -- player killing spree comment
  16342.     char d79_tagclass[5];
  16343.     uint32_t d79_tagnamepointer;
  16344.     uint32_t d79_tagnamestringlength;
  16345.     uint32_t d79_tagid;
  16346.    
  16347.     // 1568, 48
  16348.    
  16349.     // d80: friends dying -- friend died
  16350.     char d80_tagclass[5];
  16351.     uint32_t d80_tagnamepointer;
  16352.     uint32_t d80_tagnamestringlength;
  16353.     uint32_t d80_tagid;
  16354.    
  16355.     // d81: friends dying -- friend player died
  16356.     char d81_tagclass[5];
  16357.     uint32_t d81_tagnamepointer;
  16358.     uint32_t d81_tagnamestringlength;
  16359.     uint32_t d81_tagid;
  16360.    
  16361.     // d82: friends dying -- friend killed by friend
  16362.     char d82_tagclass[5];
  16363.     uint32_t d82_tagnamepointer;
  16364.     uint32_t d82_tagnamestringlength;
  16365.     uint32_t d82_tagid;
  16366.    
  16367.     // d83: friends dying -- friend killed by friendly player
  16368.     char d83_tagclass[5];
  16369.     uint32_t d83_tagnamepointer;
  16370.     uint32_t d83_tagnamestringlength;
  16371.     uint32_t d83_tagid;
  16372.    
  16373.     // d84: friends dying -- friend killed by enemy
  16374.     char d84_tagclass[5];
  16375.     uint32_t d84_tagnamepointer;
  16376.     uint32_t d84_tagnamestringlength;
  16377.     uint32_t d84_tagid;
  16378.    
  16379.     // d85: friends dying -- friend killed by enemy player
  16380.     char d85_tagclass[5];
  16381.     uint32_t d85_tagnamepointer;
  16382.     uint32_t d85_tagnamestringlength;
  16383.     uint32_t d85_tagid;
  16384.    
  16385.     // d86: friends dying -- friend killed by covenant
  16386.     char d86_tagclass[5];
  16387.     uint32_t d86_tagnamepointer;
  16388.     uint32_t d86_tagnamestringlength;
  16389.     uint32_t d86_tagid;
  16390.    
  16391.     // d87: friends dying -- friend killed by flood
  16392.     char d87_tagclass[5];
  16393.     uint32_t d87_tagnamepointer;
  16394.     uint32_t d87_tagnamestringlength;
  16395.     uint32_t d87_tagid;
  16396.    
  16397.     // d88: friends dying -- friend killed by sentinel
  16398.     char d88_tagclass[5];
  16399.     uint32_t d88_tagnamepointer;
  16400.     uint32_t d88_tagnamestringlength;
  16401.     uint32_t d88_tagid;
  16402.    
  16403.     // d89: friends dying -- friend betrayed
  16404.     char d89_tagclass[5];
  16405.     uint32_t d89_tagnamepointer;
  16406.     uint32_t d89_tagnamestringlength;
  16407.     uint32_t d89_tagid;
  16408.    
  16409.     // 1776, 32
  16410.    
  16411.     // d90: shouting -- new combat alone
  16412.     char d90_tagclass[5];
  16413.     uint32_t d90_tagnamepointer;
  16414.     uint32_t d90_tagnamestringlength;
  16415.     uint32_t d90_tagid;
  16416.    
  16417.     // d91: shouting -- new enemy recent combat
  16418.     char d91_tagclass[5];
  16419.     uint32_t d91_tagnamepointer;
  16420.     uint32_t d91_tagnamestringlength;
  16421.     uint32_t d91_tagid;
  16422.    
  16423.     // d92: shouting -- old enemy sighted
  16424.     char d92_tagclass[5];
  16425.     uint32_t d92_tagnamepointer;
  16426.     uint32_t d92_tagnamestringlength;
  16427.     uint32_t d92_tagid;
  16428.    
  16429.     // d93: shouting -- unexpected enemy
  16430.     char d93_tagclass[5];
  16431.     uint32_t d93_tagnamepointer;
  16432.     uint32_t d93_tagnamestringlength;
  16433.     uint32_t d93_tagid;
  16434.    
  16435.     // d94: shouting -- dead friend found
  16436.     char d94_tagclass[5];
  16437.     uint32_t d94_tagnamepointer;
  16438.     uint32_t d94_tagnamestringlength;
  16439.     uint32_t d94_tagid;
  16440.    
  16441.     // d95: shouting -- alliance broken
  16442.     char d95_tagclass[5];
  16443.     uint32_t d95_tagnamepointer;
  16444.     uint32_t d95_tagnamestringlength;
  16445.     uint32_t d95_tagid;
  16446.    
  16447.     // d96: shouting -- alliance reformed
  16448.     char d96_tagclass[5];
  16449.     uint32_t d96_tagnamepointer;
  16450.     uint32_t d96_tagnamestringlength;
  16451.     uint32_t d96_tagid;
  16452.    
  16453.     // d97: shouting -- grenade throwing
  16454.     char d97_tagclass[5];
  16455.     uint32_t d97_tagnamepointer;
  16456.     uint32_t d97_tagnamestringlength;
  16457.     uint32_t d97_tagid;
  16458.    
  16459.     // d98: shouting -- grenade sighted
  16460.     char d98_tagclass[5];
  16461.     uint32_t d98_tagnamepointer;
  16462.     uint32_t d98_tagnamestringlength;
  16463.     uint32_t d98_tagid;
  16464.    
  16465.     // d99: shouting -- grenade startle
  16466.     char d99_tagclass[5];
  16467.     uint32_t d99_tagnamepointer;
  16468.     uint32_t d99_tagnamestringlength;
  16469.     uint32_t d99_tagid;
  16470.    
  16471.     // d100: shouting -- grenade danger enemy
  16472.     char d100_tagclass[5];
  16473.     uint32_t d100_tagnamepointer;
  16474.     uint32_t d100_tagnamestringlength;
  16475.     uint32_t d100_tagid;
  16476.    
  16477.     // d101: shouting -- grenade danger self
  16478.     char d101_tagclass[5];
  16479.     uint32_t d101_tagnamepointer;
  16480.     uint32_t d101_tagnamestringlength;
  16481.     uint32_t d101_tagid;
  16482.    
  16483.     // d102: shouting -- grenade danger friend
  16484.     char d102_tagclass[5];
  16485.     uint32_t d102_tagnamepointer;
  16486.     uint32_t d102_tagnamestringlength;
  16487.     uint32_t d102_tagid;
  16488.    
  16489.     // 2016, 32
  16490.    
  16491.     // d103: group communication -- new combat group response
  16492.     char d103_tagclass[5];
  16493.     uint32_t d103_tagnamepointer;
  16494.     uint32_t d103_tagnamestringlength;
  16495.     uint32_t d103_tagid;
  16496.    
  16497.     // d104: group communication -- new combat nearby response
  16498.     char d104_tagclass[5];
  16499.     uint32_t d104_tagnamepointer;
  16500.     uint32_t d104_tagnamestringlength;
  16501.     uint32_t d104_tagid;
  16502.    
  16503.     // d105: group communication -- alert friend
  16504.     char d105_tagclass[5];
  16505.     uint32_t d105_tagnamepointer;
  16506.     uint32_t d105_tagnamestringlength;
  16507.     uint32_t d105_tagid;
  16508.    
  16509.     // d106: group communication -- alert friend response
  16510.     char d106_tagclass[5];
  16511.     uint32_t d106_tagnamepointer;
  16512.     uint32_t d106_tagnamestringlength;
  16513.     uint32_t d106_tagid;
  16514.    
  16515.     // d107: group communication -- alert lost contact
  16516.     char d107_tagclass[5];
  16517.     uint32_t d107_tagnamepointer;
  16518.     uint32_t d107_tagnamestringlength;
  16519.     uint32_t d107_tagid;
  16520.    
  16521.     // d108: group communication -- alert lost contact response
  16522.     char d108_tagclass[5];
  16523.     uint32_t d108_tagnamepointer;
  16524.     uint32_t d108_tagnamestringlength;
  16525.     uint32_t d108_tagid;
  16526.    
  16527.     // d109: group communication -- blocked
  16528.     char d109_tagclass[5];
  16529.     uint32_t d109_tagnamepointer;
  16530.     uint32_t d109_tagnamestringlength;
  16531.     uint32_t d109_tagid;
  16532.    
  16533.     // d110: group communication -- blocked response
  16534.     char d110_tagclass[5];
  16535.     uint32_t d110_tagnamepointer;
  16536.     uint32_t d110_tagnamestringlength;
  16537.     uint32_t d110_tagid;
  16538.    
  16539.     // d111: group communication -- search start
  16540.     char d111_tagclass[5];
  16541.     uint32_t d111_tagnamepointer;
  16542.     uint32_t d111_tagnamestringlength;
  16543.     uint32_t d111_tagid;
  16544.    
  16545.     // d112: group communication -- search query
  16546.     char d112_tagclass[5];
  16547.     uint32_t d112_tagnamepointer;
  16548.     uint32_t d112_tagnamestringlength;
  16549.     uint32_t d112_tagid;
  16550.    
  16551.     // d113: group communication -- search query response
  16552.     char d113_tagclass[5];
  16553.     uint32_t d113_tagnamepointer;
  16554.     uint32_t d113_tagnamestringlength;
  16555.     uint32_t d113_tagid;
  16556.    
  16557.     // d114: group communication -- search report
  16558.     char d114_tagclass[5];
  16559.     uint32_t d114_tagnamepointer;
  16560.     uint32_t d114_tagnamestringlength;
  16561.     uint32_t d114_tagid;
  16562.    
  16563.     // d115: group communication -- search abandon
  16564.     char d115_tagclass[5];
  16565.     uint32_t d115_tagnamepointer;
  16566.     uint32_t d115_tagnamestringlength;
  16567.     uint32_t d115_tagid;
  16568.    
  16569.     // d116: group communication -- search group abandon
  16570.     char d116_tagclass[5];
  16571.     uint32_t d116_tagnamepointer;
  16572.     uint32_t d116_tagnamestringlength;
  16573.     uint32_t d116_tagid;
  16574.    
  16575.     // d117: group communication -- group uncover
  16576.     char d117_tagclass[5];
  16577.     uint32_t d117_tagnamepointer;
  16578.     uint32_t d117_tagnamestringlength;
  16579.     uint32_t d117_tagid;
  16580.    
  16581.     // d118: group communication -- group uncover response
  16582.     char d118_tagclass[5];
  16583.     uint32_t d118_tagnamepointer;
  16584.     uint32_t d118_tagnamestringlength;
  16585.     uint32_t d118_tagid;
  16586.    
  16587.     // d119: group communication -- advance
  16588.     char d119_tagclass[5];
  16589.     uint32_t d119_tagnamepointer;
  16590.     uint32_t d119_tagnamestringlength;
  16591.     uint32_t d119_tagid;
  16592.    
  16593.     // d120: group communication -- advance response
  16594.     char d120_tagclass[5];
  16595.     uint32_t d120_tagnamepointer;
  16596.     uint32_t d120_tagnamestringlength;
  16597.     uint32_t d120_tagid;
  16598.    
  16599.     // d121: group communication -- retreat
  16600.     char d121_tagclass[5];
  16601.     uint32_t d121_tagnamepointer;
  16602.     uint32_t d121_tagnamestringlength;
  16603.     uint32_t d121_tagid;
  16604.    
  16605.     // d122: group communication -- retreat response
  16606.     char d122_tagclass[5];
  16607.     uint32_t d122_tagnamepointer;
  16608.     uint32_t d122_tagnamestringlength;
  16609.     uint32_t d122_tagid;
  16610.    
  16611.     // d123: group communication -- cover
  16612.     char d123_tagclass[5];
  16613.     uint32_t d123_tagnamepointer;
  16614.     uint32_t d123_tagnamestringlength;
  16615.     uint32_t d123_tagid;
  16616.    
  16617.     // 2384, 64
  16618.    
  16619.     // d124: actions -- sighted friend player
  16620.     char d124_tagclass[5];
  16621.     uint32_t d124_tagnamepointer;
  16622.     uint32_t d124_tagnamestringlength;
  16623.     uint32_t d124_tagid;
  16624.    
  16625.     // d125: actions -- shooting
  16626.     char d125_tagclass[5];
  16627.     uint32_t d125_tagnamepointer;
  16628.     uint32_t d125_tagnamestringlength;
  16629.     uint32_t d125_tagid;
  16630.    
  16631.     // d126: actions -- shooting vehicle
  16632.     char d126_tagclass[5];
  16633.     uint32_t d126_tagnamepointer;
  16634.     uint32_t d126_tagnamestringlength;
  16635.     uint32_t d126_tagid;
  16636.    
  16637.     // d127: actions -- shooting berserk
  16638.     char d127_tagclass[5];
  16639.     uint32_t d127_tagnamepointer;
  16640.     uint32_t d127_tagnamestringlength;
  16641.     uint32_t d127_tagid;
  16642.    
  16643.     // d128: actions -- shooting group
  16644.     char d128_tagclass[5];
  16645.     uint32_t d128_tagnamepointer;
  16646.     uint32_t d128_tagnamestringlength;
  16647.     uint32_t d128_tagid;
  16648.    
  16649.     // d129: actions -- shooting traitor
  16650.     char d129_tagclass[5];
  16651.     uint32_t d129_tagnamepointer;
  16652.     uint32_t d129_tagnamestringlength;
  16653.     uint32_t d129_tagid;
  16654.    
  16655.     // d130: actions -- taunt
  16656.     char d130_tagclass[5];
  16657.     uint32_t d130_tagnamepointer;
  16658.     uint32_t d130_tagnamestringlength;
  16659.     uint32_t d130_tagid;
  16660.    
  16661.     // d131: actions -- taunt response
  16662.     char d131_tagclass[5];
  16663.     uint32_t d131_tagnamepointer;
  16664.     uint32_t d131_tagnamestringlength;
  16665.     uint32_t d131_tagid;
  16666.    
  16667.     // d132: actions -- flee
  16668.     char d132_tagclass[5];
  16669.     uint32_t d132_tagnamepointer;
  16670.     uint32_t d132_tagnamestringlength;
  16671.     uint32_t d132_tagid;
  16672.    
  16673.     // d133: actions -- flee response
  16674.     char d133_tagclass[5];
  16675.     uint32_t d133_tagnamepointer;
  16676.     uint32_t d133_tagnamestringlength;
  16677.     uint32_t d133_tagid;
  16678.    
  16679.     // d134: actions -- flee leader died
  16680.     char d134_tagclass[5];
  16681.     uint32_t d134_tagnamepointer;
  16682.     uint32_t d134_tagnamestringlength;
  16683.     uint32_t d134_tagid;
  16684.    
  16685.     // d135: actions -- attempted flee
  16686.     char d135_tagclass[5];
  16687.     uint32_t d135_tagnamepointer;
  16688.     uint32_t d135_tagnamestringlength;
  16689.     uint32_t d135_tagid;
  16690.    
  16691.     // d136: actions -- attempted flee response
  16692.     char d136_tagclass[5];
  16693.     uint32_t d136_tagnamepointer;
  16694.     uint32_t d136_tagnamestringlength;
  16695.     uint32_t d136_tagid;
  16696.    
  16697.     // d137: actions -- lost contact
  16698.     char d137_tagclass[5];
  16699.     uint32_t d137_tagnamepointer;
  16700.     uint32_t d137_tagnamestringlength;
  16701.     uint32_t d137_tagid;
  16702.    
  16703.     // d138: actions -- hiding finished
  16704.     char d138_tagclass[5];
  16705.     uint32_t d138_tagnamepointer;
  16706.     uint32_t d138_tagnamestringlength;
  16707.     uint32_t d138_tagid;
  16708.    
  16709.     // d139: actions -- vehicle entry
  16710.     char d139_tagclass[5];
  16711.     uint32_t d139_tagnamepointer;
  16712.     uint32_t d139_tagnamestringlength;
  16713.     uint32_t d139_tagid;
  16714.    
  16715.     // d140: actions -- vehicle exit
  16716.     char d140_tagclass[5];
  16717.     uint32_t d140_tagnamepointer;
  16718.     uint32_t d140_tagnamestringlength;
  16719.     uint32_t d140_tagid;
  16720.    
  16721.     // d141: actions -- vehicle woohoo
  16722.     char d141_tagclass[5];
  16723.     uint32_t d141_tagnamepointer;
  16724.     uint32_t d141_tagnamestringlength;
  16725.     uint32_t d141_tagid;
  16726.    
  16727.     // d142: actions -- vehicle scared
  16728.     char d142_tagclass[5];
  16729.     uint32_t d142_tagnamepointer;
  16730.     uint32_t d142_tagnamestringlength;
  16731.     uint32_t d142_tagid;
  16732.    
  16733.     // d143: actions -- vehicle collision
  16734.     char d143_tagclass[5];
  16735.     uint32_t d143_tagnamepointer;
  16736.     uint32_t d143_tagnamestringlength;
  16737.     uint32_t d143_tagid;
  16738.    
  16739.     // d144: actions -- partially sighted
  16740.     char d144_tagclass[5];
  16741.     uint32_t d144_tagnamepointer;
  16742.     uint32_t d144_tagnamestringlength;
  16743.     uint32_t d144_tagid;
  16744.    
  16745.     // d145: actions -- nothing there
  16746.     char d145_tagclass[5];
  16747.     uint32_t d145_tagnamepointer;
  16748.     uint32_t d145_tagnamestringlength;
  16749.     uint32_t d145_tagid;
  16750.    
  16751.     // d146: actions -- pleading
  16752.     char d146_tagclass[5];
  16753.     uint32_t d146_tagnamepointer;
  16754.     uint32_t d146_tagnamestringlength;
  16755.     uint32_t d146_tagid;
  16756.    
  16757.     // 2816, 96
  16758.    
  16759.     // d147: exclamations -- surprise
  16760.     char d147_tagclass[5];
  16761.     uint32_t d147_tagnamepointer;
  16762.     uint32_t d147_tagnamestringlength;
  16763.     uint32_t d147_tagid;
  16764.    
  16765.     // d148: exclamations -- berserk
  16766.     char d148_tagclass[5];
  16767.     uint32_t d148_tagnamepointer;
  16768.     uint32_t d148_tagnamestringlength;
  16769.     uint32_t d148_tagid;
  16770.    
  16771.     // d149: exclamations -- melee attack
  16772.     char d149_tagclass[5];
  16773.     uint32_t d149_tagnamepointer;
  16774.     uint32_t d149_tagnamestringlength;
  16775.     uint32_t d149_tagid;
  16776.    
  16777.     // d150: exclamations -- dive
  16778.     char d150_tagclass[5];
  16779.     uint32_t d150_tagnamepointer;
  16780.     uint32_t d150_tagnamestringlength;
  16781.     uint32_t d150_tagid;
  16782.    
  16783.     // d151: exclamations -- uncover exclamation
  16784.     char d151_tagclass[5];
  16785.     uint32_t d151_tagnamepointer;
  16786.     uint32_t d151_tagnamestringlength;
  16787.     uint32_t d151_tagid;
  16788.    
  16789.     // d152: exclamations -- leap attack
  16790.     char d152_tagclass[5];
  16791.     uint32_t d152_tagnamepointer;
  16792.     uint32_t d152_tagnamestringlength;
  16793.     uint32_t d152_tagid;
  16794.    
  16795.     // d153: exclamations -- resurrection
  16796.     char d153_tagclass[5];
  16797.     uint32_t d153_tagnamepointer;
  16798.     uint32_t d153_tagnamestringlength;
  16799.     uint32_t d153_tagid;
  16800.    
  16801.     // 3024, 64
  16802.    
  16803.     // d154: post-combat actions -- celebration
  16804.     char d154_tagclass[5];
  16805.     uint32_t d154_tagnamepointer;
  16806.     uint32_t d154_tagnamestringlength;
  16807.     uint32_t d154_tagid;
  16808.    
  16809.     // d155: post-combat actions -- check body enemy
  16810.     char d155_tagclass[5];
  16811.     uint32_t d155_tagnamepointer;
  16812.     uint32_t d155_tagnamestringlength;
  16813.     uint32_t d155_tagid;
  16814.    
  16815.     // d156: post-combat actions -- check body friend
  16816.     char d156_tagclass[5];
  16817.     uint32_t d156_tagnamepointer;
  16818.     uint32_t d156_tagnamestringlength;
  16819.     uint32_t d156_tagid;
  16820.    
  16821.     // d157: post-combat actions -- shooting dead enemy
  16822.     char d157_tagclass[5];
  16823.     uint32_t d157_tagnamepointer;
  16824.     uint32_t d157_tagnamestringlength;
  16825.     uint32_t d157_tagid;
  16826.    
  16827.     // d158: post-combat actions -- shooting dead enemy player
  16828.     char d158_tagclass[5];
  16829.     uint32_t d158_tagnamepointer;
  16830.     uint32_t d158_tagnamestringlength;
  16831.     uint32_t d158_tagid;
  16832.    
  16833.     // 3168, 64
  16834.    
  16835.     // d159: post-combat chatter -- alone
  16836.     char d159_tagclass[5];
  16837.     uint32_t d159_tagnamepointer;
  16838.     uint32_t d159_tagnamestringlength;
  16839.     uint32_t d159_tagid;
  16840.    
  16841.     // d160: post-combat chatter -- unscathed
  16842.     char d160_tagclass[5];
  16843.     uint32_t d160_tagnamepointer;
  16844.     uint32_t d160_tagnamestringlength;
  16845.     uint32_t d160_tagid;
  16846.    
  16847.     // d161: post-combat chatter -- seriously wounded
  16848.     char d161_tagclass[5];
  16849.     uint32_t d161_tagnamepointer;
  16850.     uint32_t d161_tagnamestringlength;
  16851.     uint32_t d161_tagid;
  16852.    
  16853.     // d162: post-combat chatter -- seriously wounded response
  16854.     char d162_tagclass[5];
  16855.     uint32_t d162_tagnamepointer;
  16856.     uint32_t d162_tagnamestringlength;
  16857.     uint32_t d162_tagid;
  16858.    
  16859.     // d163: post-combat chatter -- massacre
  16860.     char d163_tagclass[5];
  16861.     uint32_t d163_tagnamepointer;
  16862.     uint32_t d163_tagnamestringlength;
  16863.     uint32_t d163_tagid;
  16864.    
  16865.     // d164: post-combat chatter -- massacre response
  16866.     char d164_tagclass[5];
  16867.     uint32_t d164_tagnamepointer;
  16868.     uint32_t d164_tagnamestringlength;
  16869.     uint32_t d164_tagid;
  16870.    
  16871.     // d165: post-combat chatter -- rout
  16872.     char d165_tagclass[5];
  16873.     uint32_t d165_tagnamepointer;
  16874.     uint32_t d165_tagnamestringlength;
  16875.     uint32_t d165_tagid;
  16876.    
  16877.     // d166: post-combat chatter -- rout response
  16878.     char d166_tagclass[5];
  16879.     uint32_t d166_tagnamepointer;
  16880.     uint32_t d166_tagnamestringlength;
  16881.     uint32_t d166_tagid;
  16882.    
  16883.     // 3360, 816
  16884.    
  16885.     // tpns 1-166
  16886.    
  16887. } type_meta_udlg;
  16888.  
  16889. #pragma mark -- unhi
  16890.  
  16891. typedef struct {
  16892.     uint16_t weapon_hud_screen_alignment_anchor;
  16893.     // 66, 34
  16894.     uint16_t unit_hud_background_anchor_offset_x;
  16895.     uint16_t unit_hud_background_anchor_offset_y;
  16896.     float unit_hud_background_width_scale;
  16897.     float unit_hud_background_height_scale;
  16898.     // 112, 1
  16899.     uint8_t unit_hud_background_scaling_flags;  //toff 112  0x07
  16900.     // 114, 22
  16901.    
  16902.     // dependency 1: unit hud background -- interface bitmap -- bitm
  16903.     char d1_tagclass[5];         //unsigned char[5]
  16904.     uint32_t d1_tagnamepointer;   //uint32 ("random" number)
  16905.     uint32_t d1_tagnamestringlength;   //uint32
  16906.     uint32_t d1_tagid;       //uint32 (0xFFFFFFFF with tags)
  16907.    
  16908.     uint8_t unit_hud_background_default_color_a;
  16909.     uint8_t unit_hud_background_default_color_r;
  16910.     uint8_t unit_hud_background_default_color_g;
  16911.     uint8_t unit_hud_background_default_color_b;
  16912.    
  16913.     uint8_t unit_hud_background_flashing_color_a;
  16914.     uint8_t unit_hud_background_flashing_color_r;
  16915.     uint8_t unit_hud_background_flashing_color_g;
  16916.     uint8_t unit_hud_background_flashing_color_b;
  16917.    
  16918.     float unit_hud_background_flash_period;
  16919.     float unit_hud_background_flash_delay;
  16920.     uint16_t unit_hud_background_number_of_flashes;
  16921.     // 170, 1
  16922.     uint8_t unit_hud_background_flash_flags;    //toff 170  0x01
  16923.     float unit_hud_background_flash_length;
  16924.     uint8_t unit_hud_background_disabled_color_a;
  16925.     uint8_t unit_hud_background_disabled_color_r;
  16926.     uint8_t unit_hud_background_disabled_color_g;
  16927.     uint8_t unit_hud_background_disabled_color_b;
  16928.     // 180, 4
  16929.     uint16_t unit_hud_background_sequence_index;
  16930.     // 186, 2
  16931.    
  16932.     // representation 1 board, offset 188
  16933.     // r1b_unit_hud_background_multitexture_overlay_
  16934.     uint32_t r1b_unit_hud_background_multitexture_overlay_entrycount; // maximum of 30 cells
  16935.     uint32_t r1b_unit_hud_background_multitexture_overlay_random_id;
  16936.     uint32_t r1b_unit_hud_background_multitexture_overlay_sig_id; // example value = 0xCC3A9C00
  16937.    
  16938.     // 200, 4
  16939.    
  16940.     uint16_t shield_panel_background_anchor_offset_x;
  16941.     uint16_t shield_panel_background_anchor_offset_y;
  16942.     float shield_panel_background_width_scale;
  16943.     float shield_panel_background_height_scale;
  16944.     // 216, 1
  16945.     uint8_t shield_panel_background_scaling_flags;  //toff 216  0x07
  16946.     // 218, 22
  16947.    
  16948.     // dependency 2: shield panel background -- interface bitmap -- bitm
  16949.     char d2_tagclass[5];         //unsigned char[5]
  16950.     uint32_t d2_tagnamepointer;   //uint32 ("random" number)
  16951.     uint32_t d2_tagnamestringlength;   //uint32
  16952.     uint32_t d2_tagid;       //uint32 (0xFFFFFFFF with tags)
  16953.    
  16954.     uint8_t shield_panel_background_default_color_a;
  16955.     uint8_t shield_panel_background_default_color_r;
  16956.     uint8_t shield_panel_background_default_color_g;
  16957.     uint8_t shield_panel_background_default_color_b;
  16958.     uint8_t shield_panel_background_flashing_color_a;
  16959.     uint8_t shield_panel_background_flashing_color_r;
  16960.     uint8_t shield_panel_background_flashing_color_g;
  16961.     uint8_t shield_panel_background_flashing_color_b;
  16962.     float shield_panel_background_flash_period;
  16963.     float shield_panel_background_flash_delay;
  16964.     uint16_t shield_panel_background_number_of_flashes;
  16965.     // 274, 1
  16966.     uint8_t shield_panel_background_flash_flags;    //toff 274  0x01
  16967.     float shield_panel_background_flash_length;
  16968.     uint8_t shield_panel_background_disabled_color_a;
  16969.     uint8_t shield_panel_background_disabled_color_r;
  16970.     uint8_t shield_panel_background_disabled_color_g;
  16971.     uint8_t shield_panel_background_disabled_color_b;
  16972.     // 284, 4
  16973.     uint16_t shield_panel_background_sequence_index;
  16974.     // 290, 2
  16975.    
  16976.     // representation 2 board, offset 292
  16977.     // r2b_shield_panel_background_multitexture_overlay_
  16978.     uint32_t r2b_shield_panel_background_multitexture_overlay_entrycount; // maximum of 30 cells
  16979.     uint32_t r2b_shield_panel_background_multitexture_overlay_random_id;
  16980.     uint32_t r2b_shield_panel_background_multitexture_overlay_sig_id; // example value = 0xCC3A9C00
  16981.    
  16982.     // 304, 4
  16983.    
  16984.     uint16_t shield_panel_meter_anchor_offset_x;
  16985.     uint16_t shield_panel_meter_anchor_offset_y;
  16986.     float shield_panel_meter_width_scale;
  16987.     float shield_panel_meter_height_scale;
  16988.     // 320, 1
  16989.     uint8_t shield_panel_meter_scaling_flags;   //toff 320  0x07
  16990.     // 322, 22
  16991.    
  16992.     // dependency 3: shield panel meter -- meter bitmap -- bitm
  16993.     char d3_tagclass[5];         //unsigned char[5]
  16994.     uint32_t d3_tagnamepointer;   //uint32 ("random" number)
  16995.     uint32_t d3_tagnamestringlength;   //uint32
  16996.     uint32_t d3_tagid;       //uint32 (0xFFFFFFFF with tags)
  16997.    
  16998.     uint8_t shield_panel_meter_color_at_meter_minimum_a;   // unused
  16999.     uint8_t shield_panel_meter_color_at_meter_minimum_r;
  17000.     uint8_t shield_panel_meter_color_at_meter_minimum_g;
  17001.     uint8_t shield_panel_meter_color_at_meter_minimum_b;
  17002.    
  17003.     uint8_t shield_panel_meter_color_at_meter_maximum_a;   // unused
  17004.     uint8_t shield_panel_meter_color_at_meter_maximum_r;
  17005.     uint8_t shield_panel_meter_color_at_meter_maximum_g;
  17006.     uint8_t shield_panel_meter_color_at_meter_maximum_b;
  17007.    
  17008.     uint8_t shield_panel_meter_flash_color_a;   // unused
  17009.     uint8_t shield_panel_meter_flash_color_r;
  17010.     uint8_t shield_panel_meter_flash_color_g;
  17011.     uint8_t shield_panel_meter_flash_color_b;
  17012.    
  17013.     uint8_t shield_panel_meter_empty_color_a;
  17014.     uint8_t shield_panel_meter_empty_color_r;
  17015.     uint8_t shield_panel_meter_empty_color_g;
  17016.     uint8_t shield_panel_meter_empty_color_b;
  17017.    
  17018.     uint8_t shield_panel_meter_flags;   //toff 376 (untested)   0x1F
  17019.     uint8_t shield_panel_meter_minimum_meter_value;
  17020.     uint16_t shield_panel_meter_sequence_index;
  17021.     uint8_t shield_panel_meter_alpha_multiplier;
  17022.     uint8_t shield_panel_meter_alpha_bias;
  17023.     uint16_t shield_panel_meter_value_scale;
  17024.     float shield_panel_meter_opacity;
  17025.     float shield_panel_meter_translucency;
  17026.    
  17027.     uint8_t shield_panel_meter_disabled_color_a;
  17028.     uint8_t shield_panel_meter_disabled_color_r;
  17029.     uint8_t shield_panel_meter_disabled_color_g;
  17030.     uint8_t shield_panel_meter_disabled_color_b;
  17031.    
  17032.     // 396, 16
  17033.    
  17034.     uint8_t shield_panel_meter_overcharge_minimum_color_a;   // unused
  17035.     uint8_t shield_panel_meter_overcharge_minimum_color_r;
  17036.     uint8_t shield_panel_meter_overcharge_minimum_color_g;
  17037.     uint8_t shield_panel_meter_overcharge_minimum_color_b;
  17038.    
  17039.     uint8_t shield_panel_meter_overcharge_maximum_color_a;   // unused
  17040.     uint8_t shield_panel_meter_overcharge_maximum_color_r;
  17041.     uint8_t shield_panel_meter_overcharge_maximum_color_g;
  17042.     uint8_t shield_panel_meter_overcharge_maximum_color_b;
  17043.    
  17044.     uint8_t shield_panel_meter_overcharge_flash_color_a;   // unused
  17045.     uint8_t shield_panel_meter_overcharge_flash_color_r;
  17046.     uint8_t shield_panel_meter_overcharge_flash_color_g;
  17047.     uint8_t shield_panel_meter_overcharge_flash_color_b;
  17048.    
  17049.     uint8_t shield_panel_meter_overcharge_empty_color_a;   // unused
  17050.     uint8_t shield_panel_meter_overcharge_empty_color_r;
  17051.     uint8_t shield_panel_meter_overcharge_empty_color_g;
  17052.     uint8_t shield_panel_meter_overcharge_empty_color_b;
  17053.    
  17054.     // 428, 16
  17055.    
  17056.     uint16_t health_panel_background_anchor_offset_x;
  17057.     uint16_t health_panel_background_anchor_offset_y;
  17058.     float health_panel_background_width_scale;
  17059.     float health_panel_background_height_scale;
  17060.     // 456, 1
  17061.     uint8_t health_panel_background_scaling_flags;  //toff 456  0x07
  17062.     // 458, 22
  17063.    
  17064.     // dependency 4: health panel background -- interface bitmap -- bitm
  17065.     char d4_tagclass[5];         //unsigned char[5]
  17066.     uint32_t d4_tagnamepointer;   //uint32 ("random" number)
  17067.     uint32_t d4_tagnamestringlength;   //uint32
  17068.     uint32_t d4_tagid;       //uint32 (0xFFFFFFFF with tags)
  17069.    
  17070.     uint8_t health_panel_background_default_color_a;
  17071.     uint8_t health_panel_background_default_color_r;
  17072.     uint8_t health_panel_background_default_color_g;
  17073.     uint8_t health_panel_background_default_color_b;
  17074.    
  17075.     uint8_t health_panel_background_flashing_color_a;
  17076.     uint8_t health_panel_background_flashing_color_r;
  17077.     uint8_t health_panel_background_flashing_color_g;
  17078.     uint8_t health_panel_background_flashing_color_b;
  17079.     float health_panel_background_flash_period;
  17080.     float health_panel_background_flash_delay;
  17081.     uint16_t health_panel_background_number_of_flashes;
  17082.     // 514, 1
  17083.     uint8_t health_panel_background_flash_flags;    //toff 514  0x01
  17084.     float health_panel_background_flash_length;
  17085.     uint8_t health_panel_background_disabled_color_a;
  17086.     uint8_t health_panel_background_disabled_color_r;
  17087.     uint8_t health_panel_background_disabled_color_g;
  17088.     uint8_t health_panel_background_disabled_color_b;
  17089.     // 524, 4
  17090.     uint16_t health_panel_background_sequence_index;
  17091.     // 530, 2
  17092.    
  17093.     // representation 3 board, offset 532
  17094.     // r3b_health_panel_background_multitexture_overlay_
  17095.     uint32_t r3b_health_panel_background_multitexture_overlay_entrycount; // maximum of 30 cells
  17096.     uint32_t r3b_health_panel_background_multitexture_overlay_random_id;
  17097.     uint32_t r3b_health_panel_background_multitexture_overlay_sig_id; // example value = 0xCC3A9C00
  17098.    
  17099.     // 544, 4
  17100.    
  17101.     uint16_t health_panel_meter_anchor_offset_x;
  17102.     uint16_t health_panel_meter_anchor_offset_y;
  17103.     float health_panel_meter_width_scale;
  17104.     float health_panel_meter_height_scale;
  17105.     // 560, 1
  17106.     uint8_t health_panel_meter_scaling_flags;   //toff 560  0x07
  17107.    
  17108.     // 562, 22
  17109.    
  17110.     // dependency 5: health panel meter -- meter bitmap -- bitm
  17111.     char d5_tagclass[5];         //unsigned char[5]
  17112.     uint32_t d5_tagnamepointer;   //uint32 ("random" number)
  17113.     uint32_t d5_tagnamestringlength;   //uint32
  17114.     uint32_t d5_tagid;       //uint32 (0xFFFFFFFF with tags)
  17115.    
  17116.     uint8_t health_panel_meter_color_at_meter_minimum_a;   // unused
  17117.     uint8_t health_panel_meter_color_at_meter_minimum_r;
  17118.     uint8_t health_panel_meter_color_at_meter_minimum_g;
  17119.     uint8_t health_panel_meter_color_at_meter_minimum_b;
  17120.    
  17121.     uint8_t health_panel_meter_color_at_meter_maximum_a;   // unused
  17122.     uint8_t health_panel_meter_color_at_meter_maximum_r;
  17123.     uint8_t health_panel_meter_color_at_meter_maximum_g;
  17124.     uint8_t health_panel_meter_color_at_meter_maximum_b;
  17125.    
  17126.     uint8_t health_panel_meter_flash_color_a;   // unused
  17127.     uint8_t health_panel_meter_flash_color_r;
  17128.     uint8_t health_panel_meter_flash_color_g;
  17129.     uint8_t health_panel_meter_flash_color_b;
  17130.    
  17131.     uint8_t health_panel_meter_empty_color_a;
  17132.     uint8_t health_panel_meter_empty_color_r;
  17133.     uint8_t health_panel_meter_empty_color_g;
  17134.     uint8_t health_panel_meter_empty_color_b;
  17135.    
  17136.     uint8_t health_panel_meter_flags;   //toff 616 (untested)   0x1F
  17137.    
  17138.     uint8_t health_panel_meter_minimum_meter_value;
  17139.     uint16_t health_panel_meter_sequence_index;
  17140.     uint8_t health_panel_meter_alpha_multiplier;
  17141.     uint8_t health_panel_meter_alpha_bias;
  17142.     uint16_t health_panel_meter_value_scale;
  17143.     float health_panel_meter_opacity;
  17144.     float health_panel_meter_translucency;
  17145.    
  17146.     uint8_t health_panel_meter_disabled_color_a;
  17147.     uint8_t health_panel_meter_disabled_color_r;
  17148.     uint8_t health_panel_meter_disabled_color_g;
  17149.     uint8_t health_panel_meter_disabled_color_b;
  17150.    
  17151.     // 636, 16
  17152.    
  17153.     uint8_t health_panel_meter_medium_health_left_color_a;   // unused
  17154.     uint8_t health_panel_meter_medium_health_left_color_r;
  17155.     uint8_t health_panel_meter_medium_health_left_color_g;
  17156.     uint8_t health_panel_meter_medium_health_left_color_b;
  17157.    
  17158.     float health_panel_meter_maximum_color_health_fraction_cutoff;
  17159.     float health_panel_meter_minimum_color_health_fraction_cutoff;
  17160.    
  17161.     // 664, 20
  17162.    
  17163.     uint16_t motion_sensor_background_anchor_offset_x;
  17164.     uint16_t motion_sensor_background_anchor_offset_y;
  17165.     float motion_sensor_background_width_scale;
  17166.     float motion_sensor_background_height_scale;
  17167.     // 696, 1
  17168.     uint8_t motion_sensor_background_scaling_flags; //toff 696  0x07
  17169.    
  17170.     // 698, 22
  17171.    
  17172.     // dependency 6: motion sensor background -- interface bitmap -- bitm
  17173.     char d6_tagclass[5];         //unsigned char[5]
  17174.     uint32_t d6_tagnamepointer;   //uint32 ("random" number)
  17175.     uint32_t d6_tagnamestringlength;   //uint32
  17176.     uint32_t d6_tagid;       //uint32 (0xFFFFFFFF with tags)
  17177.    
  17178.     uint8_t motion_sensor_background_default_color_a;
  17179.     uint8_t motion_sensor_background_default_color_r;
  17180.     uint8_t motion_sensor_background_default_color_g;
  17181.     uint8_t motion_sensor_background_default_color_b;
  17182.    
  17183.     uint8_t motion_sensor_background_flashing_color_a;
  17184.     uint8_t motion_sensor_background_flashing_color_r;
  17185.     uint8_t motion_sensor_background_flashing_color_g;
  17186.     uint8_t motion_sensor_background_flashing_color_b;
  17187.    
  17188.     float motion_sensor_background_flash_period;
  17189.     float motion_sensor_background_flash_delay;
  17190.    
  17191.     uint16_t motion_sensor_background_number_of_flashes;
  17192.     // 754, 1
  17193.     uint8_t motion_sensor_background_flash_flags;   //toff 754  0x01
  17194.     float motion_sensor_background_flash_length;
  17195.     uint8_t motion_sensor_background_disabled_color_a;
  17196.     uint8_t motion_sensor_background_disabled_color_r;
  17197.     uint8_t motion_sensor_background_disabled_color_g;
  17198.     uint8_t motion_sensor_background_disabled_color_b;
  17199.     // 764, 4
  17200.     uint16_t motion_sensor_background_sequence_index;
  17201.     // 770, 2
  17202.    
  17203.     // representation 4 board, offset 772
  17204.     // r4b_motion_sensor_background_multitexture_overlay_
  17205.     uint32_t r4b_motion_sensor_background_multitexture_overlay_entrycount; // maximum of 30 cells
  17206.     uint32_t r4b_motion_sensor_background_multitexture_overlay_random_id;
  17207.     uint32_t r4b_motion_sensor_background_multitexture_overlay_sig_id; // example value = 0xCC3A9C00
  17208.    
  17209.     // 784, 4
  17210.    
  17211.     uint16_t motion_sensor_foreground_anchor_offset_x;
  17212.     uint16_t motion_sensor_foreground_anchor_offset_y;
  17213.     float motion_sensor_foreground_width_scale;
  17214.     float motion_sensor_foreground_height_scale;
  17215.    
  17216.     // 800, 1
  17217.     uint8_t motion_sensor_foreground_scaling_flags; //toff 800  0x07
  17218.     // 802, 22
  17219.    
  17220.     // dependency 7: motion sensor foreground -- interface bitmap -- bitm
  17221.     char d7_tagclass[5];         //unsigned char[5]
  17222.     uint32_t d7_tagnamepointer;   //uint32 ("random" number)
  17223.     uint32_t d7_tagnamestringlength;   //uint32
  17224.     uint32_t d7_tagid;       //uint32 (0xFFFFFFFF with tags)
  17225.    
  17226.     uint8_t motion_sensor_foreground_default_color_a;
  17227.     uint8_t motion_sensor_foreground_default_color_r;
  17228.     uint8_t motion_sensor_foreground_default_color_g;
  17229.     uint8_t motion_sensor_foreground_default_color_b;
  17230.    
  17231.     uint8_t motion_sensor_foreground_flashing_color_a;
  17232.     uint8_t motion_sensor_foreground_flashing_color_r;
  17233.     uint8_t motion_sensor_foreground_flashing_color_g;
  17234.     uint8_t motion_sensor_foreground_flashing_color_b;
  17235.    
  17236.     float motion_sensor_foreground_flash_period;
  17237.     float motion_sensor_foreground_flash_delay;
  17238.    
  17239.     uint16_t motion_sensor_foreground_number_of_flashes;
  17240.     // 858, 1
  17241.     uint8_t motion_sensor_foreground_flash_flags;   //toff 858  0x01
  17242.     float motion_sensor_foreground_flash_length;
  17243.    
  17244.     uint8_t motion_sensor_foreground_disabled_color_a;
  17245.     uint8_t motion_sensor_foreground_disabled_color_r;
  17246.     uint8_t motion_sensor_foreground_disabled_color_g;
  17247.     uint8_t motion_sensor_foreground_disabled_color_b;
  17248.    
  17249.     // 868, 4
  17250.    
  17251.     uint16_t motion_sensor_foreground_sequence_index;
  17252.    
  17253.     // 874, 2
  17254.    
  17255.     // representation 5 board, offset 876
  17256.     // r5b_motion_sensor_foreground_multitexture_overlay_
  17257.     uint32_t r5b_motion_sensor_foreground_multitexture_overlay_entrycount; // maximum of 30 cells
  17258.     uint32_t r5b_motion_sensor_foreground_multitexture_overlay_random_id;
  17259.     uint32_t r5b_motion_sensor_foreground_multitexture_overlay_sig_id; // example value = 0xCC3A9C00
  17260.    
  17261.     // 888, 36
  17262.    
  17263.     uint16_t motion_sensor_center_anchor_offset_x;
  17264.     uint16_t motion_sensor_center_anchor_offset_y;
  17265.     float motion_sensor_center_width_scale;
  17266.     float motion_sensor_center_height_scale;
  17267.     // 936, 1
  17268.     uint8_t motion_sensor_center_scaling_flags; //toff 936  0x07
  17269.     // 938, 22
  17270.    
  17271.     uint16_t auxiliary_overlays_anchor;
  17272.    
  17273.     // 962, 34
  17274.    
  17275.     // representation 6 board, offset 996
  17276.     // r6b_auxiliary_overlays_overlays_
  17277.     uint32_t r6b_auxiliary_overlays_overlays_entrycount; // maximum of 16 cells
  17278.     uint32_t r6b_auxiliary_overlays_overlays_random_id;
  17279.     uint32_t r6b_auxiliary_overlays_overlays_sig_id; // example value = 0x80459C00
  17280.    
  17281.     // 1008, 16
  17282.    
  17283.     // representation 7 board, offset 1024
  17284.     // r7b_hud_warning_sounds_sounds_
  17285.     uint32_t r7b_hud_warning_sounds_sounds_entrycount; // maximum of 12 cells
  17286.     uint32_t r7b_hud_warning_sounds_sounds_random_id;
  17287.     uint32_t r7b_hud_warning_sounds_sounds_sig_id; // example value = 0x18449C00
  17288.    
  17289.     // representation 8 board, offset 1036
  17290.     // r8b_auxiliary_hud_meters_meters_
  17291.     uint32_t r8b_auxiliary_hud_meters_meters_entrycount; // maximum of 16 cells
  17292.     uint32_t r8b_auxiliary_hud_meters_meters_random_id;
  17293.     uint32_t r8b_auxiliary_hud_meters_meters_sig_id; // example value = 0x14489C00
  17294.    
  17295.     // There is no data for the "vehicle hud" section.
  17296.    
  17297.     // 1048, 404
  17298.    
  17299.     // 1452, tpns 1
  17300.    
  17301.     // exstof: 1469 (exstof means example starting offset)
  17302.     struct unhi_r1c {
  17303.         // representation 1 cells
  17304.         // r1c_unit_hud_background_multitexture_overlay_ (simplified to just "r1c_", and so forth)
  17305.         // 480 bytes
  17306.        
  17307.         // 2
  17308.        
  17309.         uint16_t r1c_type;
  17310.         uint16_t r1c_framebuffer_blend_function;
  17311.        
  17312.         // 34
  17313.        
  17314.         uint16_t r1c_anchors_primary_anchor;
  17315.         uint16_t r1c_anchors_secondary_anchor;
  17316.         uint16_t r1c_anchors_tertiary_anchor;
  17317.        
  17318.         uint16_t r1c_blending_function_0_to_1_blending_function;
  17319.         uint16_t r1c_blending_function_1_to_2_blending_function;
  17320.        
  17321.         // 2
  17322.        
  17323.         float r1c_map_scales_primary_scale_x;
  17324.         float r1c_map_scales_primary_scale_y;
  17325.         float r1c_map_scales_secondary_scale_x;
  17326.         float r1c_map_scales_secondary_scale_y;
  17327.         float r1c_map_scales_tertiary_scale_x;
  17328.         float r1c_map_scales_tertiary_scale_y;
  17329.        
  17330.         float r1c_map_offsets_primary_offset_x;
  17331.         float r1c_map_offsets_primary_offset_y;
  17332.         float r1c_map_offsets_secondary_offset_x;
  17333.         float r1c_map_offsets_secondary_offset_y;
  17334.         float r1c_map_offsets_tertiary_offset_x;
  17335.         float r1c_map_offsets_tertiary_offset_y;
  17336.        
  17337.         // dependency r1c 1: map -- primary -- bitm
  17338.         char dr1c1_tagclass[5];
  17339.         uint32_t dr1c1_tagnamepointer;
  17340.         uint32_t dr1c1_tagnamestringlength;
  17341.         uint32_t dr1c1_tagid;
  17342.        
  17343.         // dependency r1c 2: map -- secondary -- bitm
  17344.         char dr1c2_tagclass[5];
  17345.         uint32_t dr1c2_tagnamepointer;
  17346.         uint32_t dr1c2_tagnamestringlength;
  17347.         uint32_t dr1c2_tagid;
  17348.        
  17349.         // dependency r1c 3: map -- tertiary -- bitm
  17350.         char dr1c3_tagclass[5];
  17351.         uint32_t dr1c3_tagnamepointer;
  17352.         uint32_t dr1c3_tagnamestringlength;
  17353.         uint32_t dr1c3_tagid;
  17354.        
  17355.         uint16_t r1c_map_primary_wrap_mode;
  17356.         uint16_t r1c_map_secondary_wrap_mode;
  17357.         uint16_t r1c_map_tertiary_wrap_mode;
  17358.        
  17359.         // 186
  17360.        
  17361.         // representation 1 sub-board A
  17362.         // r1sbA_effectors_
  17363.         uint32_t r1sbA_effectors_entrycount; // maximum of 30 cells
  17364.         uint32_t r1sbA_effectors_random_id;
  17365.         uint32_t r1sbA_effectors_sig_id; // example value = 0x10399C00
  17366.        
  17367.         // 128
  17368.        
  17369.     }r1c_unit_hud_background_multitexture_overlay;
  17370.    
  17371.     // exstof: 15869
  17372.    
  17373.     struct unhi_r1sc {
  17374.        
  17375.         // this cell's r1c 1-3 tpns
  17376.        
  17377.         struct unhi_r1scA {
  17378.             // representation 1 sub-cells A
  17379.             // r1scA_effectors_
  17380.             // 220
  17381.            
  17382.             // 64
  17383.            
  17384.             uint16_t r1scA_effectors_source_destination_destination_type;
  17385.             uint16_t r1scA_effectors_source_destination_destination;
  17386.             uint16_t r1scA_effectors_source_destination_source;
  17387.             // 2
  17388.            
  17389.             float r1scA_effectors_in_out_bounds_in_bounds_from;
  17390.             float r1scA_effectors_in_out_bounds_in_bounds_to;
  17391.             float r1scA_effectors_in_out_bounds_out_bounds_from;
  17392.             float r1scA_effectors_in_out_bounds_out_bounds_to;
  17393.            
  17394.             // 64
  17395.            
  17396.             float r1scA_effectors_tint_color_bounds_tint_color_lower_bound_r_frac;
  17397.             float r1scA_effectors_tint_color_bounds_tint_color_lower_bound_g_frac;
  17398.             float r1scA_effectors_tint_color_bounds_tint_color_lower_bound_b_frac;
  17399.             float r1scA_effectors_tint_color_bounds_tint_color_upper_bound_r_frac;
  17400.             float r1scA_effectors_tint_color_bounds_tint_color_upper_bound_g_frac;
  17401.             float r1scA_effectors_tint_color_bounds_tint_color_upper_bound_b_frac;
  17402.            
  17403.             uint16_t r1scA_effectors_periodic_functions_periodic_function;
  17404.             // 2
  17405.             float r1scA_effectors_periodic_functions_function_period;
  17406.             float r1scA_effectors_periodic_functions_function_phase;
  17407.            
  17408.             // 32
  17409.            
  17410.         }r1scA_unit_hud_background_multitexture_overlay_effectors;
  17411.        
  17412.        
  17413.     }r1sc_container;
  17414.    
  17415.     // exstof: 214679
  17416.     // tpns 2
  17417.    
  17418.     struct unhi_r2c {
  17419.         // representation 2 cells
  17420.         // r2c_
  17421.         // 480 bytes
  17422.        
  17423.         // 2
  17424.        
  17425.         uint16_t r2c_type;
  17426.         uint16_t r2c_framebuffer_blend_function;
  17427.        
  17428.         // 34
  17429.        
  17430.         uint16_t r2c_anchors_primary_anchor;
  17431.         uint16_t r2c_anchors_secondary_anchor;
  17432.         uint16_t r2c_anchors_tertiary_anchor;
  17433.        
  17434.         uint16_t r2c_blending_function_0_to_1_blending_function;
  17435.         uint16_t r2c_blending_function_1_to_2_blending_function;
  17436.        
  17437.         // 2
  17438.        
  17439.         float r2c_map_scales_primary_scale_x;
  17440.         float r2c_map_scales_primary_scale_y;
  17441.         float r2c_map_scales_secondary_scale_x;
  17442.         float r2c_map_scales_secondary_scale_y;
  17443.         float r2c_map_scales_tertiary_scale_x;
  17444.         float r2c_map_scales_tertiary_scale_y;
  17445.        
  17446.         float r2c_map_offsets_primary_offset_x;
  17447.         float r2c_map_offsets_primary_offset_y;
  17448.         float r2c_map_offsets_secondary_offset_x;
  17449.         float r2c_map_offsets_secondary_offset_y;
  17450.         float r2c_map_offsets_tertiary_offset_x;
  17451.         float r2c_map_offsets_tertiary_offset_y;
  17452.        
  17453.         // dependency r2c 1: map -- primary -- bitm
  17454.         char dr2c1_tagclass[5];
  17455.         uint32_t dr2c1_tagnamepointer;
  17456.         uint32_t dr2c1_tagnamestringlength;
  17457.         uint32_t dr2c1_tagid;
  17458.        
  17459.         // dependency r2c 2: map -- secondary -- bitm
  17460.         char dr2c2_tagclass[5];
  17461.         uint32_t dr2c2_tagnamepointer;
  17462.         uint32_t dr2c2_tagnamestringlength;
  17463.         uint32_t dr2c2_tagid;
  17464.        
  17465.         // dependency r2c 3: map -- tertiary -- bitm
  17466.         char dr2c3_tagclass[5];
  17467.         uint32_t dr2c3_tagnamepointer;
  17468.         uint32_t dr2c3_tagnamestringlength;
  17469.         uint32_t dr2c3_tagid;
  17470.        
  17471.         uint16_t r2c_map_primary_wrap_mode;
  17472.         uint16_t r2c_map_secondary_wrap_mode;
  17473.         uint16_t r2c_map_tertiary_wrap_mode;
  17474.        
  17475.         // 186
  17476.        
  17477.         // representation 2 sub-board A
  17478.         // r2sbA_effectors_
  17479.         uint32_t r2sbA_effectors_entrycount; // maximum of 30 cells
  17480.         uint32_t r2sbA_effectors_random_id;
  17481.         uint32_t r2sbA_effectors_sig_id; // example value = 0x10399C00
  17482.        
  17483.         // 128
  17484.        
  17485.     }r2c_shield_panel_background_multitexture_overlay;
  17486.    
  17487.     // exstof: 229096
  17488.    
  17489.     struct unhi_r2sc {
  17490.        
  17491.         // this cell's r2c 1-3 tpns
  17492.        
  17493.         struct unhi_r2scA {
  17494.             // representation 2 sub-cells A
  17495.             // r2scA_effectors_
  17496.             // 220
  17497.            
  17498.             // 64
  17499.            
  17500.             uint16_t r2scA_effectors_source_destination_destination_type;
  17501.             uint16_t r2scA_effectors_source_destination_destination;
  17502.             uint16_t r2scA_effectors_source_destination_source;
  17503.             // 2
  17504.            
  17505.             float r2scA_effectors_in_out_bounds_in_bounds_from;
  17506.             float r2scA_effectors_in_out_bounds_in_bounds_to;
  17507.             float r2scA_effectors_in_out_bounds_out_bounds_from;
  17508.             float r2scA_effectors_in_out_bounds_out_bounds_to;
  17509.            
  17510.             // 64
  17511.            
  17512.             float r2scA_effectors_tint_color_bounds_tint_color_lower_bound_r_frac;
  17513.             float r2scA_effectors_tint_color_bounds_tint_color_lower_bound_g_frac;
  17514.             float r2scA_effectors_tint_color_bounds_tint_color_lower_bound_b_frac;
  17515.             float r2scA_effectors_tint_color_bounds_tint_color_upper_bound_r_frac;
  17516.             float r2scA_effectors_tint_color_bounds_tint_color_upper_bound_g_frac;
  17517.             float r2scA_effectors_tint_color_bounds_tint_color_upper_bound_b_frac;
  17518.            
  17519.             uint16_t r2scA_effectors_periodic_functions_periodic_function;
  17520.             // 2
  17521.             float r2scA_effectors_periodic_functions_function_period;
  17522.             float r2scA_effectors_periodic_functions_function_phase;
  17523.            
  17524.             // 32
  17525.            
  17526.         }r2scA_shield_panel_background_multitexture_overlay_effectors;
  17527.        
  17528.        
  17529.     }r2sc_container;
  17530.    
  17531.     // exstof: 427906
  17532.     // tpns 3-4
  17533.    
  17534.     struct unhi_r3c {
  17535.         // representation 3 cells
  17536.         // r3c_
  17537.         // 480 bytes
  17538.        
  17539.         // 2
  17540.        
  17541.         uint16_t r3c_type;
  17542.         uint16_t r3c_framebuffer_blend_function;
  17543.        
  17544.         // 34
  17545.        
  17546.         uint16_t r3c_anchors_primary_anchor;
  17547.         uint16_t r3c_anchors_secondary_anchor;
  17548.         uint16_t r3c_anchors_tertiary_anchor;
  17549.        
  17550.         uint16_t r3c_blending_function_0_to_1_blending_function;
  17551.         uint16_t r3c_blending_function_1_to_2_blending_function;
  17552.        
  17553.         // 2
  17554.        
  17555.         float r3c_map_scales_primary_scale_x;
  17556.         float r3c_map_scales_primary_scale_y;
  17557.         float r3c_map_scales_secondary_scale_x;
  17558.         float r3c_map_scales_secondary_scale_y;
  17559.         float r3c_map_scales_tertiary_scale_x;
  17560.         float r3c_map_scales_tertiary_scale_y;
  17561.        
  17562.         float r3c_map_offsets_primary_offset_x;
  17563.         float r3c_map_offsets_primary_offset_y;
  17564.         float r3c_map_offsets_secondary_offset_x;
  17565.         float r3c_map_offsets_secondary_offset_y;
  17566.         float r3c_map_offsets_tertiary_offset_x;
  17567.         float r3c_map_offsets_tertiary_offset_y;
  17568.        
  17569.         // dependency r3c 1: map -- primary -- bitm
  17570.         char dr3c1_tagclass[5];
  17571.         uint32_t dr3c1_tagnamepointer;
  17572.         uint32_t dr3c1_tagnamestringlength;
  17573.         uint32_t dr3c1_tagid;
  17574.        
  17575.         // dependency r3c 2: map -- secondary -- bitm
  17576.         char dr3c2_tagclass[5];
  17577.         uint32_t dr3c2_tagnamepointer;
  17578.         uint32_t dr3c2_tagnamestringlength;
  17579.         uint32_t dr3c2_tagid;
  17580.        
  17581.         // dependency r3c 3: map -- tertiary -- bitm
  17582.         char dr3c3_tagclass[5];
  17583.         uint32_t dr3c3_tagnamepointer;
  17584.         uint32_t dr3c3_tagnamestringlength;
  17585.         uint32_t dr3c3_tagid;
  17586.        
  17587.         uint16_t r3c_map_primary_wrap_mode;
  17588.         uint16_t r3c_map_secondary_wrap_mode;
  17589.         uint16_t r3c_map_tertiary_wrap_mode;
  17590.        
  17591.         // 186
  17592.        
  17593.         // representation 3 sub-board A
  17594.         // r3sbA_effectors_
  17595.         uint32_t r3sbA_effectors_entrycount; // maximum of 30 cells
  17596.         uint32_t r3sbA_effectors_random_id;
  17597.         uint32_t r3sbA_effectors_sig_id; // example value = 0x10399C00
  17598.        
  17599.         // 128
  17600.        
  17601.     }r3c_shield_panel_background_multitexture_overlay;
  17602.    
  17603.     // exstof: 442336
  17604.    
  17605.     struct unhi_r3sc {
  17606.        
  17607.         // this cell's r3c 1-3 tpns
  17608.        
  17609.         struct unhi_r3scA {
  17610.             // representation 3 sub-cells A
  17611.             // r3scA_effectors_
  17612.             // 220
  17613.            
  17614.             // 64
  17615.            
  17616.             uint16_t r3scA_effectors_source_destination_destination_type;
  17617.             uint16_t r3scA_effectors_source_destination_destination;
  17618.             uint16_t r3scA_effectors_source_destination_source;
  17619.             // 2
  17620.            
  17621.             float r3scA_effectors_in_out_bounds_in_bounds_from;
  17622.             float r3scA_effectors_in_out_bounds_in_bounds_to;
  17623.             float r3scA_effectors_in_out_bounds_out_bounds_from;
  17624.             float r3scA_effectors_in_out_bounds_out_bounds_to;
  17625.            
  17626.             // 64
  17627.            
  17628.             float r3scA_effectors_tint_color_bounds_tint_color_lower_bound_r_frac;
  17629.             float r3scA_effectors_tint_color_bounds_tint_color_lower_bound_g_frac;
  17630.             float r3scA_effectors_tint_color_bounds_tint_color_lower_bound_b_frac;
  17631.             float r3scA_effectors_tint_color_bounds_tint_color_upper_bound_r_frac;
  17632.             float r3scA_effectors_tint_color_bounds_tint_color_upper_bound_g_frac;
  17633.             float r3scA_effectors_tint_color_bounds_tint_color_upper_bound_b_frac;
  17634.            
  17635.             uint16_t r3scA_effectors_periodic_functions_periodic_function;
  17636.             // 2
  17637.             float r3scA_effectors_periodic_functions_function_period;
  17638.             float r3scA_effectors_periodic_functions_function_phase;
  17639.            
  17640.             // 32
  17641.            
  17642.         }r3scA_health_panel_background_multitexture_overlay_effectors;
  17643.        
  17644.        
  17645.     }r3sc_container;
  17646.    
  17647.     // exstof: 641146
  17648.     // tpns 5-6
  17649.    
  17650.     struct unhi_r4c {
  17651.         // representation 4 cells
  17652.         // r4c_
  17653.         // 480 bytes
  17654.        
  17655.         // 2
  17656.        
  17657.         uint16_t r4c_type;
  17658.         uint16_t r4c_framebuffer_blend_function;
  17659.        
  17660.         // 34
  17661.        
  17662.         uint16_t r4c_anchors_primary_anchor;
  17663.         uint16_t r4c_anchors_secondary_anchor;
  17664.         uint16_t r4c_anchors_tertiary_anchor;
  17665.        
  17666.         uint16_t r4c_blending_function_0_to_1_blending_function;
  17667.         uint16_t r4c_blending_function_1_to_2_blending_function;
  17668.        
  17669.         // 2
  17670.        
  17671.         float r4c_map_scales_primary_scale_x;
  17672.         float r4c_map_scales_primary_scale_y;
  17673.         float r4c_map_scales_secondary_scale_x;
  17674.         float r4c_map_scales_secondary_scale_y;
  17675.         float r4c_map_scales_tertiary_scale_x;
  17676.         float r4c_map_scales_tertiary_scale_y;
  17677.        
  17678.         float r4c_map_offsets_primary_offset_x;
  17679.         float r4c_map_offsets_primary_offset_y;
  17680.         float r4c_map_offsets_secondary_offset_x;
  17681.         float r4c_map_offsets_secondary_offset_y;
  17682.         float r4c_map_offsets_tertiary_offset_x;
  17683.         float r4c_map_offsets_tertiary_offset_y;
  17684.        
  17685.         // dependency r4c 1: map -- primary -- bitm
  17686.         char dr4c1_tagclass[5];
  17687.         uint32_t dr4c1_tagnamepointer;
  17688.         uint32_t dr4c1_tagnamestringlength;
  17689.         uint32_t dr4c1_tagid;
  17690.        
  17691.         // dependency r4c 2: map -- secondary -- bitm
  17692.         char dr4c2_tagclass[5];
  17693.         uint32_t dr4c2_tagnamepointer;
  17694.         uint32_t dr4c2_tagnamestringlength;
  17695.         uint32_t dr4c2_tagid;
  17696.        
  17697.         // dependency r4c 3: map -- tertiary -- bitm
  17698.         char dr4c3_tagclass[5];
  17699.         uint32_t dr4c3_tagnamepointer;
  17700.         uint32_t dr4c3_tagnamestringlength;
  17701.         uint32_t dr4c3_tagid;
  17702.        
  17703.         uint16_t r4c_map_primary_wrap_mode;
  17704.         uint16_t r4c_map_secondary_wrap_mode;
  17705.         uint16_t r4c_map_tertiary_wrap_mode;
  17706.        
  17707.         // 186
  17708.        
  17709.         // representation 4 sub-board A
  17710.         // r4sbA_effectors_
  17711.         uint32_t r4sbA_effectors_entrycount; // maximum of 30 cells
  17712.         uint32_t r4sbA_effectors_random_id;
  17713.         uint32_t r4sbA_effectors_sig_id; // example value = 0x10399C00
  17714.        
  17715.         // 128
  17716.        
  17717.     }r4c_motion_sensor_background_multitexture_overlay;
  17718.    
  17719.     // exstof: 655576
  17720.    
  17721.     struct unhi_r4sc {
  17722.        
  17723.         // this cell's r4c 1-3 tpns
  17724.        
  17725.         struct unhi_r4scA {
  17726.             // representation 4 sub-cells A
  17727.             // r4scA_effectors_
  17728.             // 220
  17729.            
  17730.             // 64
  17731.            
  17732.             uint16_t r4scA_effectors_source_destination_destination_type;
  17733.             uint16_t r4scA_effectors_source_destination_destination;
  17734.             uint16_t r4scA_effectors_source_destination_source;
  17735.             // 2
  17736.            
  17737.             float r4scA_effectors_in_out_bounds_in_bounds_from;
  17738.             float r4scA_effectors_in_out_bounds_in_bounds_to;
  17739.             float r4scA_effectors_in_out_bounds_out_bounds_from;
  17740.             float r4scA_effectors_in_out_bounds_out_bounds_to;
  17741.            
  17742.             // 64
  17743.            
  17744.             float r4scA_effectors_tint_color_bounds_tint_color_lower_bound_r_frac;
  17745.             float r4scA_effectors_tint_color_bounds_tint_color_lower_bound_g_frac;
  17746.             float r4scA_effectors_tint_color_bounds_tint_color_lower_bound_b_frac;
  17747.             float r4scA_effectors_tint_color_bounds_tint_color_upper_bound_r_frac;
  17748.             float r4scA_effectors_tint_color_bounds_tint_color_upper_bound_g_frac;
  17749.             float r4scA_effectors_tint_color_bounds_tint_color_upper_bound_b_frac;
  17750.            
  17751.             uint16_t r4scA_effectors_periodic_functions_periodic_function;
  17752.             // 2
  17753.             float r4scA_effectors_periodic_functions_function_period;
  17754.             float r4scA_effectors_periodic_functions_function_phase;
  17755.            
  17756.             // 32
  17757.            
  17758.         }r4scA_motion_sensor_background_multitexture_overlay_effectors;
  17759.        
  17760.        
  17761.     }r4sc_container;
  17762.    
  17763.     // exstof: 854386
  17764.     // tpns 7
  17765.    
  17766.     struct unhi_r5c {
  17767.         // representation 5 cells
  17768.         // r5c_
  17769.         // 480 bytes
  17770.        
  17771.         // 2
  17772.        
  17773.         uint16_t r5c_type;
  17774.         uint16_t r5c_framebuffer_blend_function;
  17775.        
  17776.         // 34
  17777.        
  17778.         uint16_t r5c_anchors_primary_anchor;
  17779.         uint16_t r5c_anchors_secondary_anchor;
  17780.         uint16_t r5c_anchors_tertiary_anchor;
  17781.        
  17782.         uint16_t r5c_blending_function_0_to_1_blending_function;
  17783.         uint16_t r5c_blending_function_1_to_2_blending_function;
  17784.        
  17785.         // 2
  17786.        
  17787.         float r5c_map_scales_primary_scale_x;
  17788.         float r5c_map_scales_primary_scale_y;
  17789.         float r5c_map_scales_secondary_scale_x;
  17790.         float r5c_map_scales_secondary_scale_y;
  17791.         float r5c_map_scales_tertiary_scale_x;
  17792.         float r5c_map_scales_tertiary_scale_y;
  17793.        
  17794.         float r5c_map_offsets_primary_offset_x;
  17795.         float r5c_map_offsets_primary_offset_y;
  17796.         float r5c_map_offsets_secondary_offset_x;
  17797.         float r5c_map_offsets_secondary_offset_y;
  17798.         float r5c_map_offsets_tertiary_offset_x;
  17799.         float r5c_map_offsets_tertiary_offset_y;
  17800.        
  17801.         // dependency r5c 1: map -- primary -- bitm
  17802.         char dr5c1_tagclass[5];
  17803.         uint32_t dr5c1_tagnamepointer;
  17804.         uint32_t dr5c1_tagnamestringlength;
  17805.         uint32_t dr5c1_tagid;
  17806.        
  17807.         // dependency r5c 2: map -- secondary -- bitm
  17808.         char dr5c2_tagclass[5];
  17809.         uint32_t dr5c2_tagnamepointer;
  17810.         uint32_t dr5c2_tagnamestringlength;
  17811.         uint32_t dr5c2_tagid;
  17812.        
  17813.         // dependency r5c 3: map -- tertiary -- bitm
  17814.         char dr5c3_tagclass[5];
  17815.         uint32_t dr5c3_tagnamepointer;
  17816.         uint32_t dr5c3_tagnamestringlength;
  17817.         uint32_t dr5c3_tagid;
  17818.        
  17819.         uint16_t r5c_map_primary_wrap_mode;
  17820.         uint16_t r5c_map_secondary_wrap_mode;
  17821.         uint16_t r5c_map_tertiary_wrap_mode;
  17822.        
  17823.         // 186
  17824.        
  17825.         // representation 4 sub-board A
  17826.         // r5sbA_effectors_
  17827.         uint32_t r5sbA_effectors_entrycount; // maximum of 30 cells
  17828.         uint32_t r5sbA_effectors_random_id;
  17829.         uint32_t r5sbA_effectors_sig_id; // example value = 0x10399C00
  17830.        
  17831.         // 128
  17832.        
  17833.     }r5c_motion_sensor_foreground_multitexture_overlay;
  17834.    
  17835.     // exstof: 868803
  17836.    
  17837.     struct unhi_r5sc {
  17838.        
  17839.         // this cell's r5c 1-3 tpns
  17840.        
  17841.         struct unhi_r5scA {
  17842.             // representation 4 sub-cells A
  17843.             // r5scA_effectors_
  17844.             // 220
  17845.            
  17846.             // 64
  17847.            
  17848.             uint16_t r5scA_effectors_source_destination_destination_type;
  17849.             uint16_t r5scA_effectors_source_destination_destination;
  17850.             uint16_t r5scA_effectors_source_destination_source;
  17851.             // 2
  17852.            
  17853.             float r5scA_effectors_in_out_bounds_in_bounds_from;
  17854.             float r5scA_effectors_in_out_bounds_in_bounds_to;
  17855.             float r5scA_effectors_in_out_bounds_out_bounds_from;
  17856.             float r5scA_effectors_in_out_bounds_out_bounds_to;
  17857.            
  17858.             // 64
  17859.            
  17860.             float r5scA_effectors_tint_color_bounds_tint_color_lower_bound_r_frac;
  17861.             float r5scA_effectors_tint_color_bounds_tint_color_lower_bound_g_frac;
  17862.             float r5scA_effectors_tint_color_bounds_tint_color_lower_bound_b_frac;
  17863.             float r5scA_effectors_tint_color_bounds_tint_color_upper_bound_r_frac;
  17864.             float r5scA_effectors_tint_color_bounds_tint_color_upper_bound_g_frac;
  17865.             float r5scA_effectors_tint_color_bounds_tint_color_upper_bound_b_frac;
  17866.            
  17867.             uint16_t r5scA_effectors_periodic_functions_periodic_function;
  17868.             // 2
  17869.             float r5scA_effectors_periodic_functions_function_period;
  17870.             float r5scA_effectors_periodic_functions_function_phase;
  17871.            
  17872.             // 32
  17873.            
  17874.         }r5scA_motion_sensor_foreground_multitexture_overlay_effectors;
  17875.        
  17876.        
  17877.     }r5sc_container;
  17878.    
  17879.     // exstof: 1067613
  17880.    
  17881.     struct unhi_r6c {
  17882.         // representation 6 cells
  17883.         // r6c_overlays_
  17884.         // 132 bytes
  17885.        
  17886.         uint16_t r6c_overlays_anchor_offset_x;
  17887.         uint16_t r6c_overlays_anchor_offset_y;
  17888.         float r6c_overlays_width_scale;
  17889.         float r6c_overlays_height_scale;
  17890.         // 1
  17891.         uint8_t r6c_overlays_scaling_flags; //toff 1464 0x07
  17892.         // 22
  17893.        
  17894.         // dependency r6c 1: overlays -- interface bitmap -- bitm
  17895.         char dr6c1_overlays_interface_bitmap_tagclass[5];
  17896.         uint32_t dr6c1_overlays_interface_bitmap_tagnamepointer;
  17897.         uint32_t dr6c1_overlays_interface_bitmap_tagnamestringlength;
  17898.         uint32_t dr6c1_overlays_interface_bitmap_tagid;
  17899.        
  17900.         uint8_t r6c_overlays_default_color_a;
  17901.         uint8_t r6c_overlays_default_color_r;
  17902.         uint8_t r6c_overlays_default_color_g;
  17903.         uint8_t r6c_overlays_default_color_b;
  17904.        
  17905.         uint8_t r6c_overlays_flashing_color_a;
  17906.         uint8_t r6c_overlays_flashing_color_r;
  17907.         uint8_t r6c_overlays_flashing_color_g;
  17908.         uint8_t r6c_overlays_flashing_color_b;
  17909.        
  17910.         float r6c_overlays_flash_period;
  17911.         float r6c_overlays_flash_delay;
  17912.        
  17913.         uint16_t r6c_overlays_number_of_flashes;
  17914.         // 1
  17915.         uint8_t r6c_overlays_flash_flags;   //toff 1522 0x01
  17916.         float r6c_overlays_flash_length;
  17917.        
  17918.         uint8_t r6c_overlays_disabled_color_a;
  17919.         uint8_t r6c_overlays_disabled_color_r;
  17920.         uint8_t r6c_overlays_disabled_color_g;
  17921.         uint8_t r6c_overlays_disabled_color_b;
  17922.         // 4
  17923.         uint16_t r6c_overlays_sequence_index;
  17924.         // 2
  17925.        
  17926.         // representation 6 sub-board A
  17927.         // r6sbA_multitexture_overlay_
  17928.         uint32_t r6sbA_multitexture_overlay_entrycount; // maximum of 30 cells
  17929.         uint32_t r6sbA_multitexture_overlay_random_id;
  17930.         uint32_t r6sbA_multitexture_overlay_sig_id; // example value = 0xCC3A9C00
  17931.        
  17932.         // 4
  17933.        
  17934.         uint16_t r6c_overlays_type;
  17935.         // 1
  17936.         uint8_t r6c_overlays_flags; //toff 1558 0x01
  17937.         // 24
  17938.        
  17939.     }r6c_auxiliary_overlays_overlays;
  17940.    
  17941.     // exstof: 1069725
  17942.    
  17943.     struct unhi_r6sc {
  17944.        
  17945.         // this cell's r6c1 tpns
  17946.        
  17947.         struct unhi_r6scA {
  17948.             // representation 6 sub-cells A (all for current cell)
  17949.             // r6scA_
  17950.             // 480 bytes
  17951.            
  17952.             // 2
  17953.            
  17954.             uint16_t r6scA_type;
  17955.             uint16_t r6scA_framebuffer_blend_function;
  17956.            
  17957.             // 34
  17958.            
  17959.             uint16_t r6scA_anchors_primary_anchor;
  17960.             uint16_t r6scA_anchors_secondary_anchor;
  17961.             uint16_t r6scA_anchors_tertiary_anchor;
  17962.            
  17963.             uint16_t r6scA_blending_function_0_to_1_blending_function;
  17964.             uint16_t r6scA_blending_function_1_to_2_blending_function;
  17965.            
  17966.             // 2
  17967.            
  17968.             float r6scA_map_scales_primary_scale_x;
  17969.             float r6scA_map_scales_primary_scale_y;
  17970.             float r6scA_map_scales_secondary_scale_x;
  17971.             float r6scA_map_scales_secondary_scale_y;
  17972.             float r6scA_map_scales_tertiary_scale_x;
  17973.             float r6scA_map_scales_tertiary_scale_y;
  17974.            
  17975.             float r6scA_map_offsets_primary_offset_x;
  17976.             float r6scA_map_offsets_primary_offset_y;
  17977.             float r6scA_map_offsets_secondary_offset_x;
  17978.             float r6scA_map_offsets_secondary_offset_y;
  17979.             float r6scA_map_offsets_tertiary_offset_x;
  17980.             float r6scA_map_offsets_tertiary_offset_y;
  17981.            
  17982.             // dependency r6scA 1: map -- primary -- bitm
  17983.             char dr6scA1_tagclass[5];
  17984.             uint32_t dr6scA1_tagnamepointer;
  17985.             uint32_t dr6scA1_tagnamestringlength;
  17986.             uint32_t dr6scA1_tagid;
  17987.            
  17988.             // dependency r6scA 2: map -- secondary -- bitm
  17989.             char dr6scA2_tagclass[5];
  17990.             uint32_t dr6scA2_tagnamepointer;
  17991.             uint32_t dr6scA2_tagnamestringlength;
  17992.             uint32_t dr6scA2_tagid;
  17993.            
  17994.             // dependency r6scA 3: map -- tertiary -- bitm
  17995.             char dr6scA3_tagclass[5];
  17996.             uint32_t dr6scA3_tagnamepointer;
  17997.             uint32_t dr6scA3_tagnamestringlength;
  17998.             uint32_t dr6scA3_tagid;
  17999.            
  18000.             uint16_t r6scA_map_primary_wrap_mode;
  18001.             uint16_t r6scA_map_secondary_wrap_mode;
  18002.             uint16_t r6scA_map_tertiary_wrap_mode;
  18003.            
  18004.             // 186
  18005.            
  18006.             // representation 6 sub-board A
  18007.             // r6sbA_effectors_
  18008.             uint32_t r6sbA_effectors_entrycount; // maximum of 30 cells
  18009.             uint32_t r6sbA_effectors_random_id;
  18010.             uint32_t r6sbA_effectors_sig_id; // example value = 0x10399C00
  18011.            
  18012.             // 128
  18013.            
  18014.         }r6scA_auxiliary_overlays_overlays_multitexture_overlay;
  18015.        
  18016.         // exstof: 1084142
  18017.         struct unhi_r6sc1 {   // (all for current cell)
  18018.            
  18019.             // this sub-cell's r6cscA 1-3 tpns
  18020.            
  18021.             struct unhi_r6scAsca {
  18022.                 // representation 6 sub-cells A sub-cells a
  18023.                 // r6scAsca_effectors_
  18024.                 // 220
  18025.                
  18026.                 // 64
  18027.                
  18028.                 uint16_t r6scAsca_effectors_source_destination_destination_type;
  18029.                 uint16_t r6scAsca_effectors_source_destination_destination;
  18030.                 uint16_t r6scAsca_effectors_source_destination_source;
  18031.                 // 2
  18032.                
  18033.                 float r6scAsca_effectors_in_out_bounds_in_bounds_from;
  18034.                 float r6scAsca_effectors_in_out_bounds_in_bounds_to;
  18035.                 float r6scAsca_effectors_in_out_bounds_out_bounds_from;
  18036.                 float r6scAsca_effectors_in_out_bounds_out_bounds_to;
  18037.                
  18038.                 // 64
  18039.                
  18040.                 float r6scAsca_effectors_tint_color_bounds_tint_color_lower_bound_r_frac;
  18041.                 float r6scAsca_effectors_tint_color_bounds_tint_color_lower_bound_g_frac;
  18042.                 float r6scAsca_effectors_tint_color_bounds_tint_color_lower_bound_b_frac;
  18043.                 float r6scAsca_effectors_tint_color_bounds_tint_color_upper_bound_r_frac;
  18044.                 float r6scAsca_effectors_tint_color_bounds_tint_color_upper_bound_g_frac;
  18045.                 float r6scAsca_effectors_tint_color_bounds_tint_color_upper_bound_b_frac;
  18046.                
  18047.                 uint16_t r6scAsca_effectors_periodic_functions_periodic_function;
  18048.                 // 2
  18049.                 float r6scAsca_effectors_periodic_functions_function_period;
  18050.                 float r6scAsca_effectors_periodic_functions_function_phase;
  18051.                
  18052.                 // 32
  18053.                
  18054.             }r6scAsca_auxiliary_overlays_overlays_multitexture_overlay_effectors;
  18055.            
  18056.            
  18057.         }r6sc_container_inner1;
  18058.        
  18059.     }r6sc_container;
  18060.    
  18061.     // exstof: 4481357
  18062.    
  18063.     struct unhi_r7c {
  18064.         // representation 7 cells
  18065.         // r7c_sounds_
  18066.         // 56
  18067.        
  18068.         // dependency r7c 1:  -- sound -- snd! lsnd
  18069.         char dr7c1_tagclass[5];
  18070.         uint32_t dr7c1_tagnamepointer;
  18071.         uint32_t dr7c1_tagnamestringlength;
  18072.         uint32_t dr7c1_tagid;
  18073.        
  18074.         uint32_t r7c_sounds_latched_to; //toff 1600 0x000000FF
  18075.         float r7c_sounds_scale;
  18076.        
  18077.         // 32
  18078.        
  18079.     }r7c_hud_warning_sounds_sounds;
  18080.    
  18081.     // tpns r7c1
  18082.    
  18083.     // exstof: 4482101
  18084.    
  18085.     struct unhi_r8c {
  18086.         // representation 8 cells
  18087.         // r8c_meters
  18088.         // 324
  18089.        
  18090.         uint16_t r8c_meters_type;
  18091.         // 18
  18092.         uint16_t r8c_meters_background_anchor_offset_x;
  18093.         uint16_t r8c_meters_background_anchor_offset_y;
  18094.         float r8c_meters_background_width_scale;
  18095.         float r8c_meters_background_height_scale;
  18096.         // 1
  18097.         uint8_t r8c_meters_background_scaling_flags;    //toff 1672 0x07
  18098.         // 22
  18099.        
  18100.         // dependency r8c 1: background -- interface bitmap -- bitm
  18101.         char dr8c1_tagclass[5];
  18102.         uint32_t dr8c1_tagnamepointer;
  18103.         uint32_t dr8c1_tagnamestringlength;
  18104.         uint32_t dr8c1_tagid;
  18105.        
  18106.         uint8_t r8c_meters_background_default_color_a;
  18107.         uint8_t r8c_meters_background_default_color_r;
  18108.         uint8_t r8c_meters_background_default_color_g;
  18109.         uint8_t r8c_meters_background_default_color_b;
  18110.        
  18111.         uint8_t r8c_meters_background_flashing_color_a;
  18112.         uint8_t r8c_meters_background_flashing_color_r;
  18113.         uint8_t r8c_meters_background_flashing_color_g;
  18114.         uint8_t r8c_meters_background_flashing_color_b;
  18115.        
  18116.         float r8c_meters_background_flash_period;
  18117.         float r8c_meters_background_flash_delay;
  18118.         uint16_t r8c_meters_background_number_of_flashes;
  18119.         // 1
  18120.         uint8_t r8c_meters_background_flash_flags;  //toff 1730 0x01
  18121.         float r8c_meters_background_flash_length;
  18122.        
  18123.         uint8_t r8c_meters_background_disabled_color_a;
  18124.         uint8_t r8c_meters_background_disabled_color_r;
  18125.         uint8_t r8c_meters_background_disabled_color_g;
  18126.         uint8_t r8c_meters_background_disabled_color_b;
  18127.        
  18128.         // 4
  18129.        
  18130.         uint16_t r8c_meters_background_sequence_index;
  18131.         // 2
  18132.        
  18133.         // representation 8 sub-board A
  18134.         // r8sbA_multitexture_overlay_
  18135.         uint32_t r8sbA_multitexture_overlay_entrycount; // maximum of 30 cells
  18136.         uint32_t r8sbA_multitexture_overlay_random_id;
  18137.         uint32_t r8sbA_multitexture_overlay_sig_id; // example value = 0xCC3A9C00
  18138.        
  18139.         // 4
  18140.        
  18141.         uint16_t r8c_meters_meter_anchor_offset_x;
  18142.         uint16_t r8c_meters_meter_anchor_offset_y;
  18143.         float r8c_meters_meter_width_scale;
  18144.         float r8c_meters_meter_height_scale;
  18145.         // 1
  18146.         uint8_t r8c_meters_meter_scaling_flags; //toff 1776 0x07
  18147.         // 22
  18148.        
  18149.         // dependency r8c 2: meter -- meter bitmap -- bitm
  18150.         char dr8c2_tagclass[5];
  18151.         uint32_t dr8c2_tagnamepointer;
  18152.         uint32_t dr8c2_tagnamestringlength;
  18153.         uint32_t dr8c2_tagid;
  18154.        
  18155.         uint8_t r8c_meters_meter_color_at_meter_minimum_a;   // unused
  18156.         uint8_t r8c_meters_meter_color_at_meter_minimum_r;
  18157.         uint8_t r8c_meters_meter_color_at_meter_minimum_g;
  18158.         uint8_t r8c_meters_meter_color_at_meter_minimum_b;
  18159.        
  18160.         uint8_t r8c_meters_meter_color_at_meter_maximum_a;   // unused
  18161.         uint8_t r8c_meters_meter_color_at_meter_maximum_r;
  18162.         uint8_t r8c_meters_meter_color_at_meter_maximum_g;
  18163.         uint8_t r8c_meters_meter_color_at_meter_maximum_b;
  18164.        
  18165.         uint8_t r8c_meters_meter_flash_color_a;   // unused
  18166.         uint8_t r8c_meters_meter_flash_color_r;
  18167.         uint8_t r8c_meters_meter_flash_color_g;
  18168.         uint8_t r8c_meters_meter_flash_color_b;
  18169.        
  18170.         uint8_t r8c_meters_meter_empty_color_a;
  18171.         uint8_t r8c_meters_meter_empty_color_r;
  18172.         uint8_t r8c_meters_meter_empty_color_g;
  18173.         uint8_t r8c_meters_meter_empty_color_b;
  18174.        
  18175.         uint8_t r8c_meters_meter_flags_variations;  //toff 1832 (untested)  0x1F
  18176.         uint8_t r8c_meters_meter_minimum_meter_value;
  18177.         uint16_t r8c_meters_meter_sequence_index;
  18178.         uint8_t r8c_meters_meter_alpha_multiplier;
  18179.         uint8_t r8c_meters_meter_alpha_bias;
  18180.         uint16_t r8c_meters_meter_value_scale;
  18181.         float r8c_meters_meter_opacity;
  18182.         float r8c_meters_meter_translucency;
  18183.        
  18184.         uint8_t r8c_meters_meter_disabled_color_a;
  18185.         uint8_t r8c_meters_meter_disabled_color_r;
  18186.         uint8_t r8c_meters_meter_disabled_color_g;
  18187.         uint8_t r8c_meters_meter_disabled_color_b;
  18188.         // 16
  18189.         float r8c_meters_meter_minimum_fraction_cutoff;
  18190.         uint32_t r8c_meters_meter_flags_limits; //toff 1872 0x00000003
  18191.        
  18192.         // 88
  18193.        
  18194.     }r8c_auxiliary_hud_meters_meters;
  18195.    
  18196.     // exstof: 4487285
  18197.    
  18198.     struct unhi_r8sc {
  18199.        
  18200.         // this cell's r8c1 tpns
  18201.        
  18202.         struct unhi_r8scA {
  18203.             // representation 8 sub-cells A (all for current cell)
  18204.             // r8scA_
  18205.             // 480 bytes
  18206.            
  18207.             // 2
  18208.            
  18209.             uint16_t r8scA_type;
  18210.             uint16_t r8scA_framebuffer_blend_function;
  18211.            
  18212.             // 34
  18213.            
  18214.             uint16_t r8scA_anchors_primary_anchor;
  18215.             uint16_t r8scA_anchors_secondary_anchor;
  18216.             uint16_t r8scA_anchors_tertiary_anchor;
  18217.            
  18218.             uint16_t r8scA_blending_function_0_to_1_blending_function;
  18219.             uint16_t r8scA_blending_function_1_to_2_blending_function;
  18220.            
  18221.             // 2
  18222.            
  18223.             float r8scA_map_scales_primary_scale_x;
  18224.             float r8scA_map_scales_primary_scale_y;
  18225.             float r8scA_map_scales_secondary_scale_x;
  18226.             float r8scA_map_scales_secondary_scale_y;
  18227.             float r8scA_map_scales_tertiary_scale_x;
  18228.             float r8scA_map_scales_tertiary_scale_y;
  18229.            
  18230.             float r8scA_map_offsets_primary_offset_x;
  18231.             float r8scA_map_offsets_primary_offset_y;
  18232.             float r8scA_map_offsets_secondary_offset_x;
  18233.             float r8scA_map_offsets_secondary_offset_y;
  18234.             float r8scA_map_offsets_tertiary_offset_x;
  18235.             float r8scA_map_offsets_tertiary_offset_y;
  18236.            
  18237.             // dependency r8scA 1: map -- primary -- bitm
  18238.             char dr8scA1_tagclass[5];
  18239.             uint32_t dr8scA1_tagnamepointer;
  18240.             uint32_t dr8scA1_tagnamestringlength;
  18241.             uint32_t dr8scA1_tagid;
  18242.            
  18243.             // dependency r8scA 2: map -- secondary -- bitm
  18244.             char dr8scA2_tagclass[5];
  18245.             uint32_t dr8scA2_tagnamepointer;
  18246.             uint32_t dr8scA2_tagnamestringlength;
  18247.             uint32_t dr8scA2_tagid;
  18248.            
  18249.             // dependency r8scA 3: map -- tertiary -- bitm
  18250.             char dr8scA3_tagclass[5];
  18251.             uint32_t dr8scA3_tagnamepointer;
  18252.             uint32_t dr8scA3_tagnamestringlength;
  18253.             uint32_t dr8scA3_tagid;
  18254.            
  18255.             uint16_t r8scA_map_primary_wrap_mode;
  18256.             uint16_t r8scA_map_secondary_wrap_mode;
  18257.             uint16_t r8scA_map_tertiary_wrap_mode;
  18258.            
  18259.             // 186
  18260.            
  18261.             // representation 8 sub-board A
  18262.             // r8sbA_effectors_
  18263.             uint32_t r8sbA_effectors_entrycount; // maximum of 30 cells
  18264.             uint32_t r8sbA_effectors_random_id;
  18265.             uint32_t r8sbA_effectors_sig_id; // example value = 0x10399C00
  18266.            
  18267.             // 128
  18268.            
  18269.         }r8scA_auxiliary_hud_meters_meters_multitexture_overlay;
  18270.        
  18271.         // exstof: 4501702
  18272.         struct unhi_r8sc1 {   // (all for current cell)
  18273.            
  18274.             // this sub-cell's r8scA 1-3 tpns
  18275.            
  18276.             struct unhi_r8scAsca {
  18277.                 // representation 8 sub-cells A sub-cells a
  18278.                 // r8scAsca_effectors_
  18279.                 // 220
  18280.                
  18281.                 // 64
  18282.                
  18283.                 uint16_t r8scAsca_effectors_source_destination_destination_type;
  18284.                 uint16_t r8scAsca_effectors_source_destination_destination;
  18285.                 uint16_t r8scAsca_effectors_source_destination_source;
  18286.                 // 2
  18287.                
  18288.                 float r8scAsca_effectors_in_out_bounds_in_bounds_from;
  18289.                 float r8scAsca_effectors_in_out_bounds_in_bounds_to;
  18290.                 float r8scAsca_effectors_in_out_bounds_out_bounds_from;
  18291.                 float r8scAsca_effectors_in_out_bounds_out_bounds_to;
  18292.                
  18293.                 // 64
  18294.                
  18295.                 float r8scAsca_effectors_tint_color_bounds_tint_color_lower_bound_r_frac;
  18296.                 float r8scAsca_effectors_tint_color_bounds_tint_color_lower_bound_g_frac;
  18297.                 float r8scAsca_effectors_tint_color_bounds_tint_color_lower_bound_b_frac;
  18298.                 float r8scAsca_effectors_tint_color_bounds_tint_color_upper_bound_r_frac;
  18299.                 float r8scAsca_effectors_tint_color_bounds_tint_color_upper_bound_g_frac;
  18300.                 float r8scAsca_effectors_tint_color_bounds_tint_color_upper_bound_b_frac;
  18301.                
  18302.                 uint16_t r8scAsca_effectors_periodic_functions_periodic_function;
  18303.                 // 2
  18304.                 float r8scAsca_effectors_periodic_functions_function_period;
  18305.                 float r8scAsca_effectors_periodic_functions_function_phase;
  18306.                
  18307.                 // 32
  18308.                
  18309.             }r8scAsca_auxiliary_hud_meters_meters_multitexture_overlay_effectors;
  18310.            
  18311.            
  18312.         }r8sc_container_inner1;
  18313.        
  18314.         // this cell's r8c2 tpns
  18315.        
  18316.     }r8sc_container;
  18317.    
  18318.     // nothing for "Vehicle HUD" section
  18319.    
  18320. } type_meta_unhi;
  18321.  
  18322. #pragma mark -- unit
  18323.  
  18324. typedef struct {
  18325.     // the first four bytes are mishandled in Guerilla.
  18326.     // Guerilla will write all four bytes for the flags, but only properly reads the first two bytes,
  18327.     // while it automatically interprets the second two bytes as 0xFFFF when the tag is opened.
  18328.     // This probably means it is trying to set the two bytes at offset 66 to be a value of -1 for internal unit index, like internal obje index
  18329.     uint32_t unit_flags;    //toff 64 (untested, obvious 4 bytes used)  0x01FFFFFF
  18330.    
  18331.     uint16_t unit_default_team;
  18332.     uint16_t unit_constant_sound_volume;
  18333.     float unit_rider_damage_fraction;
  18334.    
  18335.     // dependency 1: unit -- integrated light toggle -- effe
  18336.     char d1_tagclass[5];
  18337.     uint32_t d1_tagnamepointer;
  18338.     uint32_t d1_tagnamestringlength;
  18339.     uint32_t d1_tagid;
  18340.    
  18341.     uint16_t unit_a_in;
  18342.     uint16_t unit_b_in;
  18343.     uint16_t unit_c_in;
  18344.     uint16_t unit_d_in;
  18345.    
  18346.     float unit_camera_field_of_view_rad;   // Guerilla always mis-reads this value as 0
  18347.    
  18348.     float unit_camera_stiffness;
  18349.    
  18350.     char unit_camera_marker_name[32];
  18351.     char unit_camera_submerged_marker_name[32];
  18352.    
  18353.     float unit_pitch_auto_level_rad;
  18354.     float unit_pitch_range_from_rad;
  18355.     float unit_pitch_range_to_rad;
  18356.    
  18357.     // representation 1 board
  18358.     // r1b_unit_camera_tracks_
  18359.     uint32_t r1b_unit_camera_tracks_entrycount; // maximum of 2 cells
  18360.     uint32_t r1b_unit_camera_tracks_random_id;
  18361.     uint32_t r1b_unit_camera_tracks_sig_id; // example value = 0xFC579D00
  18362.    
  18363.     float unit_seat_acceleration_scale_i;
  18364.     float unit_seat_acceleration_scale_j;
  18365.     float unit_seat_acceleration_scale_k;
  18366.    
  18367.     // 208, 12
  18368.    
  18369.     float unit_soft_ping_threshold;
  18370.     float unit_soft_ping_interrupt_time;
  18371.     float unit_hard_ping_threshold;
  18372.     float unit_hard_ping_interrupt_time;
  18373.     float unit_hard_death_threshold;
  18374.     float unit_feign_death_threshold;
  18375.     float unit_feign_death_time;
  18376.     float unit_distance_of_evade_animation;
  18377.     float unit_distance_of_dive_animation;
  18378.    
  18379.     // 256, 4
  18380.    
  18381.     float unit_stunned_movement_threshold;
  18382.     float unit_feign_death_chance;
  18383.     float unit_feign_repeat_chance;
  18384.    
  18385.     // dependency 2: unit -- spawned actor -- actv
  18386.     char d2_tagclass[5];
  18387.     uint32_t d2_tagnamepointer;
  18388.     uint32_t d2_tagnamestringlength;
  18389.     uint32_t d2_tagid;
  18390.    
  18391.     uint16_t unit_spawned_actor_count_from;
  18392.     uint16_t unit_spawned_actor_count_to;
  18393.     float unit_spawned_velocity;
  18394.     float unit_aiming_velocity_maximum_rad;
  18395.     float unit_aiming_acceleration_maximum_rad;
  18396.     float unit_casual_aiming_modifier_frac;
  18397.     float unit_looking_velocity_maximum_rad;
  18398.     float unit_looking_acceleration_maximum_rad;
  18399.     // 316, 8
  18400.     float unit_ai_vehicle_radius;
  18401.     float unit_ai_danger_radius;
  18402.    
  18403.     // dependency 3: unit -- melee damage -- jpt!
  18404.     char d3_tagclass[5];
  18405.     uint32_t d3_tagnamepointer;
  18406.     uint32_t d3_tagnamestringlength;
  18407.     uint32_t d3_tagid;
  18408.    
  18409.     uint16_t unit_motion_sensor_blip_size;
  18410.    
  18411.     // 350, 14
  18412.    
  18413.     // representation 2 board
  18414.     // r2b_unit_new_hud_interfaces_
  18415.     uint32_t r2b_unit_new_hud_interfaces_entrycount; // maximum of 2 cells
  18416.     uint32_t r2b_unit_new_hud_interfaces_random_id;
  18417.     uint32_t r2b_unit_new_hud_interfaces_sig_id; // example value = 0xA4579D00
  18418.    
  18419.     // representation 3 board
  18420.     // r3b_unit_dialogue_variants_
  18421.     uint32_t r3b_unit_dialogue_variants_entrycount; // maximum of 16 cells
  18422.     uint32_t r3b_unit_dialogue_variants_random_id;
  18423.     uint32_t r3b_unit_dialogue_variants_sig_id; // example value = 0xA85A9D00
  18424.    
  18425.     float unit_grenade_velocity;
  18426.     uint16_t unit_grenade_type;
  18427.     uint16_t unit_grenade_count;
  18428.    
  18429.     // 396, 4
  18430.    
  18431.     // representation 4 board
  18432.     // r4b_unit_powered_seats_
  18433.     uint32_t r4b_unit_powered_seats_entrycount; // maximum of 2 cells
  18434.     uint32_t r4b_unit_powered_seats_random_id;
  18435.     uint32_t r4b_unit_powered_seats_sig_id; // example value = 0x345A9D00
  18436.    
  18437.     // representation 5 board
  18438.     // r5b_unit_weapons_
  18439.     uint32_t r5b_unit_weapons_entrycount; // maximum of 4 cells
  18440.     uint32_t r5b_unit_weapons_random_id;
  18441.     uint32_t r5b_unit_weapons_sig_id; // example value = 0xC4599D00
  18442.    
  18443.     // representation 6 board
  18444.     // r6b_unit_seats_
  18445.     uint32_t r6b_unit_seats_entrycount; // maximum of 16 cells
  18446.     uint32_t r6b_unit_seats_random_id;
  18447.     uint32_t r6b_unit_seats_sig_id; // example value = 0x68599D00
  18448.    
  18449.     // 436, tpns 1
  18450.    
  18451.     struct unit_r1c {
  18452.         // representation 1 cells
  18453.         // r1c_camera_tracks_
  18454.         // 28
  18455.        
  18456.         // dependency r1c 1: camera tracks -- track -- trak
  18457.         char dr1c1_tagclass[5];
  18458.         uint32_t dr1c1_tagnamepointer;
  18459.         uint32_t dr1c1_tagnamestringlength;
  18460.         uint32_t dr1c1_tagid;
  18461.        
  18462.         // 12
  18463.        
  18464.     }r1c_camera_tracks;
  18465.    
  18466.     // r1c1 tpns
  18467.    
  18468.     // tpns 2 and 3
  18469.    
  18470.     struct unit_r2c {
  18471.         // representation 2 cells
  18472.         // r2c_new_hud_interfaces_
  18473.         // 48
  18474.        
  18475.         // dependency r2c 1: new hud interfaces -- unit hud interface -- unhi
  18476.         char dr2c1_tagclass[5];
  18477.         uint32_t dr2c1_tagnamepointer;
  18478.         uint32_t dr2c1_tagnamestringlength;
  18479.         uint32_t dr2c1_tagid;
  18480.        
  18481.         // 32
  18482.        
  18483.     }r2c_new_hud_interfaces;
  18484.    
  18485.     // r2c1 tpns
  18486.    
  18487.     struct unit_r3c {
  18488.         // representation 3 cells
  18489.         // r3c_dialogue_variants_
  18490.         // 24
  18491.        
  18492.         uint16_t r3c_dialogue_variants_variant_number;
  18493.         // 6
  18494.        
  18495.         // dependency r3c 1: dialogue variants -- dialogue -- udlg
  18496.         char dr3c1_tagclass[5];
  18497.         uint32_t dr3c1_tagnamepointer;
  18498.         uint32_t dr3c1_tagnamestringlength;
  18499.         uint32_t dr3c1_tagid;
  18500.        
  18501.     }r3c_dialogue_variants;
  18502.    
  18503.     // r3c1 tpns
  18504.    
  18505.     struct unit_r4c {
  18506.         // representation 4 cells
  18507.         // r4c_powered_seats_
  18508.         // 68
  18509.        
  18510.         // 4
  18511.         float r4c_powered_seats_driver_powerup_time;
  18512.         float r4c_powered_seats_driver_powerdown_time;
  18513.         // 56
  18514.        
  18515.     }r4c_powered_seats;
  18516.    
  18517.     struct unit_r5c {
  18518.         // representation 5 cells
  18519.         // r5c_weapons_
  18520.         // 36
  18521.        
  18522.         // dependency r5c 1: weapons -- weapon -- weap
  18523.         char dr5c1_tagclass[5];
  18524.         uint32_t dr5c1_tagnamepointer;
  18525.         uint32_t dr5c1_tagnamestringlength;
  18526.         uint32_t dr5c1_tagid;
  18527.        
  18528.         // 20
  18529.        
  18530.     }r5c_weapons;
  18531.    
  18532.     // r5c1 tpns
  18533.    
  18534.     // exstof: 1525
  18535.    
  18536.     struct unit_r6c {
  18537.         // representation 6 cells
  18538.         // r6c_seats_
  18539.         // 284
  18540.        
  18541.         uint32_t r6c_seats_flags;   //toff 436  0x000007FF
  18542.         char r6c_seats_label[32];
  18543.         char r6c_seats_marker_name[32];
  18544.         // 32 (just enough space for another marker name...)
  18545.        
  18546.         float r6c_seats_acceleration_scale_i;
  18547.         float r6c_seats_acceleration_scale_j;
  18548.         float r6c_seats_acceleration_scale_k;
  18549.         // 12
  18550.         float r6c_seats_yaw_rate;
  18551.         float r6c_seats_pitch_rate;
  18552.        
  18553.         char r6c_seats_camera_marker_name[32];
  18554.         char r6c_seats_camera_submerged_marker_name[32];
  18555.        
  18556.         float r6c_seats_pitch_auto_level_rad;
  18557.         float r6c_seats_pitch_range_from_rad;
  18558.         float r6c_seats_pitch_range_to_rad;
  18559.        
  18560.         // representation 6 sub-board A
  18561.         // r6sbA_seats_camera_tracks_
  18562.         uint32_t r6sbA_seats_camera_tracks_entrycount; // maximum of 2 cells
  18563.         uint32_t r6sbA_seats_camera_tracks_random_id;
  18564.         uint32_t r6sbA_seats_camera_tracks_sig_id; // example value = 0xFC579D00
  18565.        
  18566.         // representation 6 sub-board B
  18567.         // r6sbB_seats_unit_hud_interface_
  18568.         uint32_t r6sbB_seats_unit_hud_interface_entrycount; // maximum of 2 cells
  18569.         uint32_t r6sbB_seats_unit_hud_interface_random_id;
  18570.         uint32_t r6sbB_seats_unit_hud_interface_sig_id; // example value = 0xA4579D00
  18571.        
  18572.         // 4
  18573.        
  18574.         uint16_t r6c_seats_hud_text_message_index;
  18575.         // 2
  18576.        
  18577.         float r6c_seats_yaw_minimum_rad;
  18578.         float r6c_seats_yaw_maximum_rad;
  18579.        
  18580.         // dependency r6c 1: seats -- built-in gunner -- actv
  18581.         char dr6c1_tagclass[5];
  18582.         uint32_t dr6c1_tagnamepointer;
  18583.         uint32_t dr6c1_tagnamestringlength;
  18584.         uint32_t dr6c1_tagid;
  18585.        
  18586.         // 20
  18587.        
  18588.     }r6c_seats;
  18589.    
  18590.     // exstof: 6069
  18591.    
  18592.     struct unit_r6sc {
  18593.         // representation 6 sub-cells grouping container
  18594.         // per cell
  18595.        
  18596.         struct unit_r6scA {
  18597.             // representation 6 sub-cells A
  18598.             // r6scA_camera_tracks_
  18599.             // 28
  18600.            
  18601.             // dependency r6scA 1: camera tracks -- track -- trak
  18602.             char dr6scA1_tagclass[5];
  18603.             uint32_t dr6scA1_tagnamepointer;
  18604.             uint32_t dr6scA1_tagnamestringlength;
  18605.             uint32_t dr6scA1_tagid;
  18606.            
  18607.             // 12
  18608.            
  18609.         }r6scA_seats_camera_tracks;
  18610.        
  18611.         // r6scA tpns
  18612.        
  18613.         struct unit_r6scB {
  18614.             // representation 6 sub-cells B
  18615.             // r6scB_unit_hud_interface_
  18616.             // 48
  18617.            
  18618.             // dependency r6scB 1: unit hud interface -- unit hud interface -- unhi
  18619.             char dr6scB1_tagclass[5];
  18620.             uint32_t dr6scB1_tagnamepointer;
  18621.             uint32_t dr6scB1_tagnamestringlength;
  18622.             uint32_t dr6scB1_tagid;
  18623.            
  18624.             // 32
  18625.            
  18626.         }r6scB_seats_unit_hud_interface;
  18627.        
  18628.         // r6scB tpns
  18629.        
  18630.         // r6c1 tpns
  18631.        
  18632.     }r6sc_container;
  18633.    
  18634. } type_meta_unit;
  18635.  
  18636. #pragma mark -- ustr
  18637.  
  18638. typedef struct {
  18639.    
  18640.     // representation 1 board
  18641.     // r1b_string_references_
  18642.     uint32_t r1b_string_references_entrycount; // maximum of 800 cells
  18643.     uint32_t r1b_string_references_random_id;
  18644.     uint32_t r1b_string_references_sig_id; // example value = 0xBC629D00 (ustr max) and 0x5C1C7D00 (ui\random_player_names.unicode_string_list)
  18645.    
  18646.     struct ustr_r1c {
  18647.         // representation 1 cells
  18648.         // r1c_string_references_
  18649.         // 20
  18650.        
  18651.         uint32_t r1c_string_references_string_length;
  18652.         uint8_t pad_r1c_4[4];   // 4
  18653.         // little endian internal board values:
  18654.         uint32_t r1c_string_references_INTERNAL_string_offset_pointer;   // example value = 0 (unreliable; calculate separately)
  18655.         uint32_t r1c_string_references_INTERNAL_string_random1;
  18656.         uint32_t r1c_string_references_INTERNAL_string_sig_id;   // example value = 0x94629D00 (ustr max) and 0x341C7D00 (ui\random_player_names.unicode_string_list)
  18657.        
  18658.     }r1c_string_references;
  18659.    
  18660.     // null-padded and null-terminated strings go here (each ASCII character, even the null terminator, gets padded with a null character as a 2-byte unicode character (but the game does not really support UTF-16 yet))
  18661.     // all characters are included in the bytes value r1c_string_references_string_length
  18662.     //char * r1_strings[];  (I don't want to do this here.)
  18663.     char** r1_strings;
  18664.    
  18665. } type_meta_ustr;
  18666.  
  18667. #pragma mark -- vcky
  18668.  
  18669. typedef struct {
  18670.    
  18671.     // dependency 1:  -- display font -- font
  18672.     char d1_tagclass[5];
  18673.     uint32_t d1_tagnamepointer;
  18674.     uint32_t d1_tagnamestringlength;
  18675.     uint32_t d1_tagid;
  18676.    
  18677.     // dependency 2:  -- background bitmap -- bitm
  18678.     char d2_tagclass[5];
  18679.     uint32_t d2_tagnamepointer;
  18680.     uint32_t d2_tagnamestringlength;
  18681.     uint32_t d2_tagid;
  18682.    
  18683.     // dependency 3:  -- special key labels string list -- ustr
  18684.     char d3_tagclass[5];
  18685.     uint32_t d3_tagnamepointer;
  18686.     uint32_t d3_tagnamestringlength;
  18687.     uint32_t d3_tagid;
  18688.    
  18689.     // representation 1 board
  18690.     // r1b_virtual_keys_
  18691.     uint32_t r1b_virtual_keys_entrycount; // maximum of 44 cells
  18692.     uint32_t r1b_virtual_keys_random_id;
  18693.     uint32_t r1b_virtual_keys_sig_id; // example value = 0x20349C00
  18694.    
  18695.     // 1-3 tpns
  18696.    
  18697.     // exstof: 186
  18698.    
  18699.     struct vcky_r1c {
  18700.         // representation 1 cells
  18701.         // r1c_virtual_keys_
  18702.         // 80
  18703.        
  18704.         uint16_t r1c_virtual_keys_keyboard_key;
  18705.        
  18706.         uint16_t r1c_virtual_keys_key_codes_lowercase_character;
  18707.         uint16_t r1c_virtual_keys_key_codes_shift_character;
  18708.         uint16_t r1c_virtual_keys_key_codes_caps_character;
  18709.         uint16_t r1c_virtual_keys_key_codes_symbols_character;
  18710.         uint16_t r1c_virtual_keys_key_codes_shift_caps_character;
  18711.         uint16_t r1c_virtual_keys_key_codes_shift_symbols_character;
  18712.         uint16_t r1c_virtual_keys_key_codes_caps_symbols_character;
  18713.        
  18714.         // dependency r1c 1: key codes -- unselected background bitmap -- bitm
  18715.         char dr1c1_tagclass[5];
  18716.         uint32_t dr1c1_tagnamepointer;
  18717.         uint32_t dr1c1_tagnamestringlength;
  18718.         uint32_t dr1c1_tagid;
  18719.        
  18720.         // dependency r1c 2: key codes -- selected background bitmap -- bitm
  18721.         char dr1c2_tagclass[5];
  18722.         uint32_t dr1c2_tagnamepointer;
  18723.         uint32_t dr1c2_tagnamestringlength;
  18724.         uint32_t dr1c2_tagid;
  18725.        
  18726.         // dependency r1c 3: key codes -- active background bitmap -- bitm
  18727.         char dr1c3_tagclass[5];
  18728.         uint32_t dr1c3_tagnamepointer;
  18729.         uint32_t dr1c3_tagnamestringlength;
  18730.         uint32_t dr1c3_tagid;
  18731.        
  18732.         // dependency r1c 4: key codes -- sticky background bitmap -- bitm
  18733.         char dr1c4_tagclass[5];
  18734.         uint32_t dr1c4_tagnamepointer;
  18735.         uint32_t dr1c4_tagnamestringlength;
  18736.         uint32_t dr1c4_tagid;
  18737.        
  18738.        
  18739.     }r1c_virtual_keys;
  18740.    
  18741.     // the tagpathname strings for r1c go here, as within a struct: {r1c1 r1c2 r1c3 r1c4} per cell
  18742.    
  18743. } type_meta_vcky;
  18744.  
  18745. #pragma mark -- vehi
  18746.  
  18747. typedef struct {
  18748.    
  18749.     // OBJE DATA 1 START
  18750.     uint16_t INTERNAL_obje_index;   // 1 (little endian), toff 65
  18751.     // 66, 1
  18752.     uint8_t flags;  //toff 66   0x0F
  18753.     float bounding_radius;
  18754.     float bounding_offset_x;
  18755.     float bounding_offset_y;
  18756.     float bounding_offset_z;
  18757.     float origin_offset_x;
  18758.     float origin_offset_y;
  18759.     float origin_offset_z;
  18760.     float acceleration_scale;
  18761.     // 100, 4
  18762.    
  18763.     // dependency 1: model mod2
  18764.     char model_tagclass[5];      //unsigned char[5]
  18765.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  18766.     uint32_t model_tagnamestringlength;   //uint32
  18767.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  18768.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  18769.    
  18770.     // dependency 2: animation graph antr
  18771.     char animation_graph_tagclass[5];        //unsigned char[5]
  18772.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  18773.     uint32_t animation_graph_tagnamestringlength;   //uint32
  18774.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  18775.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  18776.    
  18777.     // 136, 40
  18778.    
  18779.     // dependency 3: collision model coll
  18780.     char collision_model_tagclass[5];        //unsigned char[5]
  18781.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  18782.     uint32_t collision_model_tagnamestringlength;   //uint32
  18783.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  18784.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  18785.    
  18786.     // dependency 4: physics phys
  18787.     char physics_tagclass[5];        //unsigned char[5]
  18788.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  18789.     uint32_t physics_tagnamestringlength;   //uint32
  18790.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  18791.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  18792.    
  18793.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  18794.     char modifier_shader_tagclass[5];        //unsigned char[5]
  18795.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  18796.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  18797.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  18798.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  18799.    
  18800.     // dependency 6: creation effect effe
  18801.     char creation_effect_tagclass[5];        //unsigned char[5]
  18802.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  18803.     uint32_t creation_effect_tagnamestringlength;   //uint32
  18804.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  18805.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  18806.    
  18807.     // 240, 84
  18808.    
  18809.     float render_bounding_radius;
  18810.    
  18811.     uint16_t export_to_functions_a_in;
  18812.     uint16_t export_to_functions_b_in;
  18813.     uint16_t export_to_functions_c_in;
  18814.     uint16_t export_to_functions_d_in;
  18815.    
  18816.     // 336, 44
  18817.    
  18818.     uint16_t export_to_functions_hud_text_message_index;
  18819.     uint16_t export_to_functions_forced_shader_permutation_index;
  18820.    
  18821.     // representation 1 board, offset 384
  18822.     // r1b_attachments_
  18823.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  18824.     uint32_t r1b_attachments_random_id;
  18825.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  18826.    
  18827.     // representation 2 board, offset 396
  18828.     // r2b_widgets_
  18829.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  18830.     uint32_t r2b_widgets_random_id;
  18831.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  18832.    
  18833.     // representation 3 board, offset 408
  18834.     // r3b_functions_
  18835.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  18836.     uint32_t r3b_functions_random_id;
  18837.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  18838.    
  18839.     // representation 4 board, offset 420
  18840.     // r4b_change_colors_
  18841.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  18842.     uint32_t r4b_change_colors_random_id;
  18843.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  18844.    
  18845.     // representation 5 board, offset 432
  18846.     // r5b_predicted_resources_
  18847.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  18848.     uint32_t r5b_predicted_resources_random_id;
  18849.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  18850.    
  18851.     // OBJE DATA 1 END
  18852.    
  18853.     // UNIT DATA 1 START
  18854.    
  18855.     uint32_t unit_flags;   // Guerilla correctly reads this value, toff 444 (untested, obvious) 0x01FFFFFF
  18856.    
  18857.     uint16_t unit_default_team;
  18858.     uint16_t unit_constant_sound_volume;
  18859.     float unit_rider_damage_fraction;
  18860.    
  18861.     // dependency 7: unit -- integrated light toggle -- effe
  18862.     char d7_tagclass[5];
  18863.     uint32_t d7_tagnamepointer;
  18864.     uint32_t d7_tagnamestringlength;
  18865.     uint32_t d7_tagid;
  18866.    
  18867.     uint16_t unit_a_in;
  18868.     uint16_t unit_b_in;
  18869.     uint16_t unit_c_in;
  18870.     uint16_t unit_d_in;
  18871.    
  18872.     float unit_camera_field_of_view_rad;   // Guerilla correctly reads this value
  18873.    
  18874.     float unit_camera_stiffness;
  18875.    
  18876.     char unit_camera_marker_name[32];
  18877.     char unit_camera_submerged_marker_name[32];
  18878.    
  18879.     float unit_pitch_auto_level_rad;
  18880.     float unit_pitch_range_from_rad;
  18881.     float unit_pitch_range_to_rad;
  18882.    
  18883.     // representation 6 board
  18884.     // r6b_unit_camera_tracks_
  18885.     uint32_t r6b_unit_camera_tracks_entrycount; // maximum of 2 cells
  18886.     uint32_t r6b_unit_camera_tracks_random_id;
  18887.     uint32_t r6b_unit_camera_tracks_sig_id; // example value = 0xFC579D00
  18888.    
  18889.     float unit_seat_acceleration_scale_i;
  18890.     float unit_seat_acceleration_scale_j;
  18891.     float unit_seat_acceleration_scale_k;
  18892.    
  18893.     // 588, 12
  18894.    
  18895.     float unit_soft_ping_threshold;
  18896.     float unit_soft_ping_interrupt_time;
  18897.     float unit_hard_ping_threshold;
  18898.     float unit_hard_ping_interrupt_time;
  18899.     float unit_hard_death_threshold;
  18900.     float unit_feign_death_threshold;
  18901.     float unit_feign_death_time;
  18902.     float unit_distance_of_evade_animation;
  18903.     float unit_distance_of_dive_animation;
  18904.    
  18905.     // 636, 4
  18906.    
  18907.     float unit_stunned_movement_threshold;
  18908.     float unit_feign_death_chance;
  18909.     float unit_feign_repeat_chance;
  18910.    
  18911.     // dependency 8: unit -- spawned actor -- actv
  18912.     char d8_tagclass[5];
  18913.     uint32_t d8_tagnamepointer;
  18914.     uint32_t d8_tagnamestringlength;
  18915.     uint32_t d8_tagid;
  18916.    
  18917.     uint16_t unit_spawned_actor_count_from;
  18918.     uint16_t unit_spawned_actor_count_to;
  18919.     float unit_spawned_velocity;
  18920.     float unit_aiming_velocity_maximum_rad;
  18921.     float unit_aiming_acceleration_maximum_rad;
  18922.     float unit_casual_aiming_modifier_frac;
  18923.     float unit_looking_velocity_maximum_rad;
  18924.     float unit_looking_acceleration_maximum_rad;
  18925.     // 696, 8
  18926.     float unit_ai_vehicle_radius;
  18927.     float unit_ai_danger_radius;
  18928.    
  18929.     // dependency 9: unit -- melee damage -- jpt!
  18930.     char d9_tagclass[5];
  18931.     uint32_t d9_tagnamepointer;
  18932.     uint32_t d9_tagnamestringlength;
  18933.     uint32_t d9_tagid;
  18934.    
  18935.     uint16_t unit_motion_sensor_blip_size;
  18936.    
  18937.     // 730, 14
  18938.    
  18939.     // representation 7 board
  18940.     // r7b_unit_new_hud_interfaces_
  18941.     uint32_t r7b_unit_new_hud_interfaces_entrycount; // maximum of 2 cells
  18942.     uint32_t r7b_unit_new_hud_interfaces_random_id;
  18943.     uint32_t r7b_unit_new_hud_interfaces_sig_id; // example value = 0xA4579D00
  18944.    
  18945.     // representation 8 board
  18946.     // r8b_unit_dialogue_variants_
  18947.     uint32_t r8b_unit_dialogue_variants_entrycount; // maximum of 16 cells
  18948.     uint32_t r8b_unit_dialogue_variants_random_id;
  18949.     uint32_t r8b_unit_dialogue_variants_sig_id; // example value = 0xA85A9D00
  18950.    
  18951.     float unit_grenade_velocity;
  18952.     uint16_t unit_grenade_type;
  18953.     uint16_t unit_grenade_count;
  18954.    
  18955.     // 776, 4
  18956.    
  18957.     // representation 9 board
  18958.     // r9b_unit_powered_seats_
  18959.     uint32_t r9b_unit_powered_seats_entrycount; // maximum of 2 cells
  18960.     uint32_t r9b_unit_powered_seats_random_id;
  18961.     uint32_t r9b_unit_powered_seats_sig_id; // example value = 0x345A9D00
  18962.    
  18963.     // representation 10 board
  18964.     // r10b_unit_weapons_
  18965.     uint32_t r10b_unit_weapons_entrycount; // maximum of 4 cells
  18966.     uint32_t r10b_unit_weapons_random_id;
  18967.     uint32_t r10b_unit_weapons_sig_id; // example value = 0xC4599D00
  18968.    
  18969.     // representation 11 board
  18970.     // r11b_unit_seats_
  18971.     uint32_t r11b_unit_seats_entrycount; // maximum of 16 cells
  18972.     uint32_t r11b_unit_seats_random_id;
  18973.     uint32_t r11b_unit_seats_sig_id; // example value = 0x68599D00
  18974.    
  18975.     // UNIT DATA 1 END
  18976.    
  18977.     uint32_t vehicle_flags; //toff 816  0x00007FFF
  18978.     uint16_t vehicle_type;
  18979.     // 822, 2
  18980.     float vehicle_maximum_forward_speed;
  18981.     float vehicle_maximum_reverse_speed;
  18982.     float vehicle_speed_acceleration;
  18983.     float vehicle_speed_deceleration;
  18984.     float vehicle_maximum_left_turn;
  18985.     float vehicle_maximum_right_turn_negative;
  18986.     float vehicle_wheel_circumference;
  18987.     float vehicle_turn_rate;
  18988.     float vehicle_blur_speed;
  18989.     uint16_t vehicle_a_in;
  18990.     uint16_t vehicle_b_in;
  18991.     uint16_t vehicle_c_in;
  18992.     uint16_t vehicle_d_in;
  18993.     // 868, 12
  18994.     float vehicle_maximum_left_slide;
  18995.     float vehicle_maximum_right_slide;
  18996.     float vehicle_slide_acceleration;
  18997.     float vehicle_slide_deceleration;
  18998.     float vehicle_minimum_flipping_angular_velocity;
  18999.     float vehicle_maximum_flipping_angular_velocity;
  19000.    
  19001.     // 904, 24
  19002.    
  19003.     float vehicle_fixed_gun_yaw;
  19004.     float vehicle_fixed_gun_pitch;
  19005.    
  19006.     // 936, 24
  19007.    
  19008.     float vehicle_ai_sideslip_distance;
  19009.     float vehicle_ai_destination_radius;
  19010.     float vehicle_ai_avoidance_distance;
  19011.     float vehicle_ai_pathfinding_radius;
  19012.     float vehicle_ai_charge_repeat_timeout;
  19013.     float vehicle_ai_strafing_abort_range;
  19014.    
  19015.     float vehicle_ai_oversteering_bounds_from_rad;
  19016.     float vehicle_ai_oversteering_bounds_to_rad;
  19017.     float vehicle_ai_steering_maximum_rad;
  19018.    
  19019.     float vehicle_ai_throttle_maximum;
  19020.     float vehicle_ai_move_position_time;
  19021.    
  19022.     // 1004, 4
  19023.    
  19024.     // dependency 10: vehicle -- suspension sound -- snd!
  19025.     char d10_tagclass[5];
  19026.     uint32_t d10_tagnamepointer;
  19027.     uint32_t d10_tagnamestringlength;
  19028.     uint32_t d10_tagid;
  19029.    
  19030.     // dependency 11: vehicle -- crash sound -- snd!
  19031.     char d11_tagclass[5];
  19032.     uint32_t d11_tagnamepointer;
  19033.     uint32_t d11_tagnamestringlength;
  19034.     uint32_t d11_tagid;
  19035.    
  19036.     // dependency 12: vehicle -- material effects -- foot
  19037.     char d12_tagclass[5];
  19038.     uint32_t d12_tagnamepointer;
  19039.     uint32_t d12_tagnamestringlength;
  19040.     uint32_t d12_tagid;
  19041.    
  19042.     // dependency 13: vehicle -- effect -- effe
  19043.     char d13_tagclass[5];
  19044.     uint32_t d13_tagnamepointer;
  19045.     uint32_t d13_tagnamestringlength;
  19046.     uint32_t d13_tagid;
  19047.    
  19048.     // 1072, tpns 1-6
  19049.    
  19050.     // exstof: 1150
  19051.    
  19052.     // OBJE DATA 2 START
  19053.    
  19054.     struct vehi_r1c {
  19055.         // representation 1 cells
  19056.         // r1c_attachments_
  19057.         // 72
  19058.        
  19059.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  19060.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  19061.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  19062.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  19063.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  19064.         // char r1c_attachments_type_tagnamestring[255];
  19065.        
  19066.         char r1c_attachments_marker[32];
  19067.         uint16_t r1c_attachments_primary_scale;
  19068.         uint16_t r1c_attachments_secondary_scale;
  19069.         uint16_t r1c_attachments_change_color;
  19070.        
  19071.         // 18
  19072.        
  19073.     }r1c_attachments;
  19074.    
  19075.     // r1c 1 tag name strings here
  19076.    
  19077.     struct vehi_r2c {
  19078.         // representation 2 cells
  19079.         // r2c_widgets_
  19080.         // 32
  19081.        
  19082.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  19083.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  19084.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  19085.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  19086.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  19087.         // char r2c_widgets_reference_tagnamestring[255];
  19088.        
  19089.         // 16
  19090.        
  19091.     }r2c_widgets;
  19092.    
  19093.     // r2c 1 tag name strings here
  19094.    
  19095.     struct vehi_r3c {
  19096.         // representation 3 cells
  19097.         // r3c_functions_
  19098.         // 360
  19099.        
  19100.         uint32_t r3c_functions_flags;   // verified that 4 bytes are written, toff 1072 0x00000007
  19101.         float r3c_functions_period;
  19102.         uint16_t r3c_functions_scale_period_by;
  19103.         uint16_t r3c_functions_function;
  19104.         uint16_t r3c_functions_scale_function_by;
  19105.         uint16_t r3c_functions_wobble_function;
  19106.         float r3c_functions_wobble_period;
  19107.         float r3c_functions_wobble_magnitude;
  19108.         float r3c_functions_square_wave_threshold_frac;
  19109.         uint16_t r3c_functions_step_count;
  19110.         uint16_t r3c_functions_map_to;
  19111.         uint16_t r3c_functions_sawtooth_count;
  19112.         uint16_t r3c_functions_add;
  19113.         uint16_t r3c_functions_scale_result_by;
  19114.         uint16_t r3c_functions_bounds_mode;
  19115.         float r3c_functions_bounds_from_frac;
  19116.         float r3c_functions_bounds_to_frac;
  19117.         // 6
  19118.         uint16_t r3c_functions_turn_off_with_sel;
  19119.         float r3c_functions_scale_by;
  19120.         // 268
  19121.         char r3c_functions_usage[32];
  19122.        
  19123.     }r3c_functions;
  19124.    
  19125.     struct vehi_r4c {
  19126.         // representation 4 cells
  19127.         // r4c_change_colors_
  19128.         // 44
  19129.         uint16_t r4c_change_colors_darken_by;
  19130.         uint16_t r4c_change_colors_scale_by;
  19131.         uint32_t r4c_change_colors_scale_flags;   // verified that 4 bytes are written, toff 1436   0x00000003
  19132.         float r4c_change_colors_color_lower_bound_r_frac;
  19133.         float r4c_change_colors_color_lower_bound_g_frac;
  19134.         float r4c_change_colors_color_lower_bound_b_frac;
  19135.         float r4c_change_colors_color_upper_bound_r_frac;
  19136.         float r4c_change_colors_color_upper_bound_g_frac;
  19137.         float r4c_change_colors_color_upper_bound_b_frac;
  19138.        
  19139.         // representation 4 sub-board A
  19140.         // r4sbA_permutations_
  19141.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  19142.         uint32_t r4sbA_permutations_random_id1;
  19143.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  19144.     }r4c_change_colors;
  19145.    
  19146.     struct vehi_r4scA
  19147.     {
  19148.         // representation 4 sub-cells A
  19149.         // r4scA_permutations_
  19150.         // 28
  19151.         float r4scA_permutations_weight_frac;
  19152.         float r4scA_permutations_color_lower_bound_r_frac;
  19153.         float r4scA_permutations_color_lower_bound_g_frac;
  19154.         float r4scA_permutations_color_lower_bound_b_frac;
  19155.         float r4scA_permutations_color_upper_bound_r_frac;
  19156.         float r4scA_permutations_color_upper_bound_g_frac;
  19157.         float r4scA_permutations_color_upper_bound_b_frac;
  19158.     }r4sc_change_colors_permutations;
  19159.    
  19160.     struct vehi_r5c {
  19161.         // representation 5 cells
  19162.         // r5c_predicted_resources_
  19163.         // 8
  19164.         uint16_t r5c_predicted_resources_type;
  19165.         uint16_t r5c_predicted_resources_resource_index;
  19166.         uint32_t r5c_predicted_resources_tag_index;
  19167.     }r5c_predicted_resources;
  19168.    
  19169.     // OBJE DATA 2 END
  19170.    
  19171.     // exstof: 2332
  19172.    
  19173.     // UNIT DATA 2 START
  19174.    
  19175.     // tpns 7
  19176.    
  19177.     struct vehi_r6c {
  19178.         // representation 6 cells
  19179.         // r6c_camera_tracks_
  19180.         // 28
  19181.        
  19182.         // dependency r6c 1: camera tracks -- track -- trak
  19183.         char dr6c1_tagclass[5];
  19184.         uint32_t dr6c1_tagnamepointer;
  19185.         uint32_t dr6c1_tagnamestringlength;
  19186.         uint32_t dr6c1_tagid;
  19187.        
  19188.         // 12
  19189.        
  19190.     }r6c_camera_tracks;
  19191.    
  19192.     // r6c1 tpns
  19193.    
  19194.     // tpns 8 and 9
  19195.    
  19196.     struct vehi_r7c {
  19197.         // representation 7 cells
  19198.         // r7c_new_hud_interfaces_
  19199.         // 48
  19200.        
  19201.         // dependency r7c 1: new hud interfaces -- unit hud interface -- unhi
  19202.         char dr7c1_tagclass[5];
  19203.         uint32_t dr7c1_tagnamepointer;
  19204.         uint32_t dr7c1_tagnamestringlength;
  19205.         uint32_t dr7c1_tagid;
  19206.        
  19207.         // 32
  19208.        
  19209.     }r7c_new_hud_interfaces;
  19210.    
  19211.     // r7c1 tpns
  19212.    
  19213.     struct vehi_r8c {
  19214.         // representation 8 cells
  19215.         // r8c_dialogue_variants_
  19216.         // 24
  19217.        
  19218.         uint16_t r8c_dialogue_variants_variant_number;
  19219.         // 6
  19220.        
  19221.         // dependency r8c 1: dialogue variants -- dialogue -- udlg
  19222.         char dr8c1_tagclass[5];
  19223.         uint32_t dr8c1_tagnamepointer;
  19224.         uint32_t dr8c1_tagnamestringlength;
  19225.         uint32_t dr8c1_tagid;
  19226.        
  19227.     }r8c_dialogue_variants;
  19228.    
  19229.     // r8c1 tpns
  19230.    
  19231.     struct vehi_r9c {
  19232.         // representation 9 cells
  19233.         // r9c_powered_seats_
  19234.         // 68
  19235.        
  19236.         // 4
  19237.         float r9c_powered_seats_driver_powerup_time;
  19238.         float r9c_powered_seats_driver_powerdown_time;
  19239.         // 56
  19240.        
  19241.     }r9c_powered_seats;
  19242.    
  19243.     struct vehi_r10c {
  19244.         // representation 10 cells
  19245.         // r10c_weapons_
  19246.         // 36
  19247.        
  19248.         // dependency r10c 1: weapons -- weapon -- weap
  19249.         char dr10c1_tagclass[5];
  19250.         uint32_t dr10c1_tagnamepointer;
  19251.         uint32_t dr10c1_tagnamestringlength;
  19252.         uint32_t dr10c1_tagid;
  19253.        
  19254.         // 20
  19255.        
  19256.     }r10c_weapons;
  19257.    
  19258.     // r10c1 tpns
  19259.    
  19260.     // exstof: 3420
  19261.    
  19262.     struct vehi_r11c {
  19263.         // representation 11 cells
  19264.         // r11c_seats_
  19265.         // 284
  19266.        
  19267.         uint32_t r11c_seats_flags;  //toff 1476 0x000007FF
  19268.         char r11c_seats_label[32];
  19269.         char r11c_seats_marker_name[32];
  19270.         // 32 (just enough space for another marker name...)
  19271.        
  19272.         float r11c_seats_acceleration_scale_i;
  19273.         float r11c_seats_acceleration_scale_j;
  19274.         float r11c_seats_acceleration_scale_k;
  19275.         // 12
  19276.         float r11c_seats_yaw_rate;
  19277.         float r11c_seats_pitch_rate;
  19278.        
  19279.         char r11c_seats_camera_marker_name[32];
  19280.         char r11c_seats_camera_submerged_marker_name[32];
  19281.        
  19282.         float r11c_seats_pitch_auto_level_rad;
  19283.         float r11c_seats_pitch_range_from_rad;
  19284.         float r11c_seats_pitch_range_to_rad;
  19285.        
  19286.         // representation 11 sub-board A
  19287.         // r11sbA_seats_camera_tracks_
  19288.         uint32_t r11sbA_seats_camera_tracks_entrycount; // maximum of 2 cells
  19289.         uint32_t r11sbA_seats_camera_tracks_random_id;
  19290.         uint32_t r11sbA_seats_camera_tracks_sig_id; // example value = 0xFC579D00
  19291.        
  19292.         // representation 11 sub-board B
  19293.         // r11sbB_seats_unit_hud_interface_
  19294.         uint32_t r11sbB_seats_unit_hud_interface_entrycount; // maximum of 2 cells
  19295.         uint32_t r11sbB_seats_unit_hud_interface_random_id;
  19296.         uint32_t r11sbB_seats_unit_hud_interface_sig_id; // example value = 0xA4579D00
  19297.        
  19298.         // 4
  19299.        
  19300.         uint16_t r11c_seats_hud_text_message_index;
  19301.         // 2
  19302.        
  19303.         float r11c_seats_yaw_minimum_rad;
  19304.         float r11c_seats_yaw_maximum_rad;
  19305.        
  19306.         // dependency r11c 1: seats -- built-in gunner -- actv
  19307.         char dr11c1_tagclass[5];
  19308.         uint32_t dr11c1_tagnamepointer;
  19309.         uint32_t dr11c1_tagnamestringlength;
  19310.         uint32_t dr11c1_tagid;
  19311.        
  19312.         // 20
  19313.        
  19314.     }r11c_seats;
  19315.    
  19316.     // exstof: 7965
  19317.    
  19318.     struct vehi_r11sc {
  19319.         // representation 11 sub-cells grouping container
  19320.         // per cell
  19321.        
  19322.         struct vehi_r11scA {
  19323.             // representation 11 sub-cells A
  19324.             // r11scA_camera_tracks_
  19325.             // 28
  19326.            
  19327.             // dependency r11scA 1: camera tracks -- track -- trak
  19328.             char dr11scA1_tagclass[5];
  19329.             uint32_t dr11scA1_tagnamepointer;
  19330.             uint32_t dr11scA1_tagnamestringlength;
  19331.             uint32_t dr11scA1_tagid;
  19332.            
  19333.             // 12
  19334.            
  19335.         }r11scA_seats_camera_tracks;
  19336.        
  19337.         // r11scA tpns
  19338.        
  19339.         struct vehi_r11scB {
  19340.             // representation 11 sub-cells B
  19341.             // r11scB_unit_hud_interface_
  19342.             // 48
  19343.            
  19344.             // dependency r11scB 1: unit hud interface -- unit hud interface -- unhi
  19345.             char dr11scB1_tagclass[5];
  19346.             uint32_t dr11scB1_tagnamepointer;
  19347.             uint32_t dr11scB1_tagnamestringlength;
  19348.             uint32_t dr11scB1_tagid;
  19349.            
  19350.             // 32
  19351.            
  19352.         }r11scB_seats_unit_hud_interface;
  19353.        
  19354.         // r11scB tpns
  19355.        
  19356.         // r11c1 tpns
  19357.        
  19358.     }r11sc_container;
  19359.    
  19360.     // tpns 10-13
  19361.    
  19362. } type_meta_vehi;
  19363.  
  19364. #pragma mark -- weap
  19365.  
  19366. typedef struct {
  19367.     // OBJE DATA 1 START
  19368.     uint16_t INTERNAL_obje_index;   // 2 (little endian), toff 65
  19369.     // 66, 1
  19370.     uint8_t flags;  //toff 66   0x0F
  19371.     float bounding_radius;
  19372.     float bounding_offset_x;
  19373.     float bounding_offset_y;
  19374.     float bounding_offset_z;
  19375.     float origin_offset_x;
  19376.     float origin_offset_y;
  19377.     float origin_offset_z;
  19378.     float acceleration_scale;
  19379.     // 100, 4
  19380.    
  19381.     // dependency 1: model mod2
  19382.     char model_tagclass[5];      //unsigned char[5]
  19383.     uint32_t model_tagnamepointer;   //uint32 ("random" number)
  19384.     uint32_t model_tagnamestringlength;   //uint32
  19385.     uint32_t model_tagid;        //uint32 (0xFFFFFFFF with tags)
  19386.     // char model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  19387.    
  19388.     // dependency 2: animation graph antr
  19389.     char animation_graph_tagclass[5];        //unsigned char[5]
  19390.     uint32_t animation_graph_tagnamepointer;   //uint32 ("random" number)
  19391.     uint32_t animation_graph_tagnamestringlength;   //uint32
  19392.     uint32_t animation_graph_tagid;      //uint32 (0xFFFFFFFF with tags)
  19393.     // char animation_graph_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  19394.    
  19395.     // 136, 40
  19396.    
  19397.     // dependency 3: collision model coll
  19398.     char collision_model_tagclass[5];        //unsigned char[5]
  19399.     uint32_t collision_model_tagnamepointer;   //uint32 ("random" number)
  19400.     uint32_t collision_model_tagnamestringlength;   //uint32
  19401.     uint32_t collision_model_tagid;      //uint32 (0xFFFFFFFF with tags)
  19402.     // char collision_model_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  19403.    
  19404.     // dependency 4: physics phys
  19405.     char physics_tagclass[5];        //unsigned char[5]
  19406.     uint32_t physics_tagnamepointer;   //uint32 ("random" number)
  19407.     uint32_t physics_tagnamestringlength;   //uint32
  19408.     uint32_t physics_tagid;      //uint32 (0xFFFFFFFF with tags)
  19409.     // char physics_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  19410.    
  19411.     // dependency 5: modifier shader shdr senv soso schi scex sotr sgla smet spla swat
  19412.     char modifier_shader_tagclass[5];        //unsigned char[5]
  19413.     uint32_t modifier_shader_tagnamepointer;   //uint32 ("random" number)
  19414.     uint32_t modifier_shader_tagnamestringlength;   //uint32
  19415.     uint32_t modifier_shader_tagid;      //uint32 (0xFFFFFFFF with tags)
  19416.     // char modifier_shader_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  19417.    
  19418.     // dependency 6: creation effect effe
  19419.     char creation_effect_tagclass[5];        //unsigned char[5]
  19420.     uint32_t creation_effect_tagnamepointer;   //uint32 ("random" number)
  19421.     uint32_t creation_effect_tagnamestringlength;   //uint32
  19422.     uint32_t creation_effect_tagid;      //uint32 (0xFFFFFFFF with tags)
  19423.     // char creation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  19424.    
  19425.     // 240, 84
  19426.    
  19427.     float render_bounding_radius;
  19428.    
  19429.     uint16_t export_to_functions_a_in;
  19430.     uint16_t export_to_functions_b_in;
  19431.     uint16_t export_to_functions_c_in;
  19432.     uint16_t export_to_functions_d_in;
  19433.    
  19434.     // 336, 44
  19435.    
  19436.     uint16_t export_to_functions_hud_text_message_index;
  19437.     uint16_t export_to_functions_forced_shader_permutation_index;
  19438.    
  19439.     // representation 1 board, offset 384
  19440.     // r1b_attachments_
  19441.     uint32_t r1b_attachments_entrycount; // maximum of 8 cells
  19442.     uint32_t r1b_attachments_random_id;
  19443.     uint32_t r1b_attachments_sig_id; // example value = 0x08479D00
  19444.    
  19445.     // representation 2 board, offset 396
  19446.     // r2b_widgets_
  19447.     uint32_t r2b_widgets_entrycount; // maximum of 4 cells
  19448.     uint32_t r2b_widgets_random_id;
  19449.     uint32_t r2b_widgets_sig_id; // example value = 0x7C479D00
  19450.    
  19451.     // representation 3 board, offset 408
  19452.     // r3b_functions_
  19453.     uint32_t r3b_functions_entrycount; // maximum of 4 cells
  19454.     uint32_t r3b_functions_random_id;
  19455.     uint32_t r3b_functions_sig_id; // example value = 0x50469D00
  19456.    
  19457.     // representation 4 board, offset 420
  19458.     // r4b_change_colors_
  19459.     uint32_t r4b_change_colors_entrycount; // maximum of 4 cells
  19460.     uint32_t r4b_change_colors_random_id;
  19461.     uint32_t r4b_change_colors_sig_id; // example value = 0x6C489D00
  19462.    
  19463.     // representation 5 board, offset 432
  19464.     // r5b_predicted_resources_
  19465.     uint32_t r5b_predicted_resources_entrycount; // maximum of 1024 cells
  19466.     uint32_t r5b_predicted_resources_random_id;
  19467.     uint32_t r5b_predicted_resources_sig_id; // example value = 0x105FA000
  19468.    
  19469.     // OBJE DATA 1 END
  19470.    
  19471.     // ITEM DATA START
  19472.    
  19473.     // 444, 2
  19474.     // (or)
  19475.     // uint16_t item_INTERNAL_optimization;   // 0 (little endian)
  19476.    
  19477.     // uint16_t item_flags;   // this is "all on" (0xFFFF) except for the first three bits (which affects the second byte in big endian) since there are only 3 flags -- unused bits are set to on, maybe indicative of the lack of use of this tag in the Halo PC game and maybe indicative of its use only in Xbox versions (if that is so)?
  19478.     // for all intensive purposes, this is really just uint32_t
  19479.     uint32_t item_flags;    //toff 444 (seems like the previous comment is incorrect)   0x00000007
  19480.    
  19481.     uint16_t message_index_message_index;
  19482.     uint16_t message_index_sort_order;
  19483.     float message_index_scale;
  19484.     uint16_t message_index_hud_message_value_scale;
  19485.    
  19486.     // 458, 18
  19487.    
  19488.     uint16_t message_index_a_in;   // "none" (0) is the only option for these four in's
  19489.     uint16_t message_index_b_in;
  19490.     uint16_t message_index_c_in;
  19491.     uint16_t message_index_d_in;
  19492.    
  19493.     // 484, 164
  19494.    
  19495.     // dependency 7: material effects foot
  19496.     char material_effects_tagclass[5];       //unsigned char[5]
  19497.     uint32_t material_effects_tagnamepointer;   //uint32 ("random" number)
  19498.     uint32_t material_effects_tagnamestringlength;   //uint32
  19499.     uint32_t material_effects_tagid;         //uint32 (0xFFFFFFFF with tags)
  19500.     // char material_effects_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  19501.    
  19502.     // dependency 8: collision sound snd!
  19503.     char collision_sound_tagclass[5];        //unsigned char[5]
  19504.     uint32_t collision_sound_tagnamepointer;   //uint32 ("random" number)
  19505.     uint32_t collision_sound_tagnamestringlength;   //uint32
  19506.     uint32_t collision_sound_tagid;      //uint32 (0xFFFFFFFF with tags)
  19507.     // char collision_sound_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  19508.    
  19509.     // 680, 120
  19510.    
  19511.     float message_index_detonation_delay_from;   // offset 800
  19512.     float message_index_detonation_delay_to;
  19513.    
  19514.     // dependency 9: detonating effect effe
  19515.     char detonating_effect_tagclass[5];      //unsigned char[5]
  19516.     uint32_t detonating_effect_tagnamepointer;   //uint32 ("random" number)
  19517.     uint32_t detonating_effect_tagnamestringlength;   //uint32
  19518.     uint32_t detonating_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  19519.     // char detonating_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  19520.    
  19521.     // dependency 10: detonation effect effe
  19522.     char detonation_effect_tagclass[5];      //unsigned char[5]
  19523.     uint32_t detonation_effect_tagnamepointer;   //uint32 ("random" number)
  19524.     uint32_t detonation_effect_tagnamestringlength;   //uint32
  19525.     uint32_t detonation_effect_tagid;        //uint32 (0xFFFFFFFF with tags)
  19526.     // char detonation_effect_tagnamestring[255];   // the actual tag path name, before converting '\' to '/' for use as NSURL
  19527.    
  19528.     // ITEM DATA END
  19529.    
  19530.     uint32_t weapon_flags;  //toff 840  0x0000FFFF
  19531.     char weapon_label[32];
  19532.     uint16_t weapon_secondary_trigger_mode;
  19533.     uint16_t weapon_maximum_alternate_shots_loaded;
  19534.     uint16_t weapon_export_to_functions_a_in;
  19535.     uint16_t weapon_export_to_functions_b_in;
  19536.     uint16_t weapon_export_to_functions_c_in;
  19537.     uint16_t weapon_export_to_functions_d_in;
  19538.     float weapon_export_to_functions_ready_time;
  19539.    
  19540.     // dependency 11: export to functions -- ready effect -- effe snd!
  19541.     char d11_tagclass[5];
  19542.     uint32_t d11_tagnamepointer;
  19543.     uint32_t d11_tagnamestringlength;
  19544.     uint32_t d11_tagid;
  19545.    
  19546.     float weapon_heat_heat_recovery_threshold_frac;
  19547.     float weapon_heat_overheated_threshold_frac;
  19548.     float weapon_heat_heat_detonation_threshold_frac;
  19549.     float weapon_heat_heat_detonation_fraction_frac;
  19550.     float weapon_heat_heat_loss_per_second_frac;
  19551.     float weapon_heat_heat_illumination_frac;
  19552.     // 932, 16
  19553.    
  19554.     // dependency 12: heat -- overheated -- effe snd!
  19555.     char d12_tagclass[5];
  19556.     uint32_t d12_tagnamepointer;
  19557.     uint32_t d12_tagnamestringlength;
  19558.     uint32_t d12_tagid;
  19559.    
  19560.     // dependency 13: heat -- detonation -- effe snd!
  19561.     char d13_tagclass[5];
  19562.     uint32_t d13_tagnamepointer;
  19563.     uint32_t d13_tagnamestringlength;
  19564.     uint32_t d13_tagid;
  19565.    
  19566.     // dependency 14: heat -- player melee damage -- jpt!
  19567.     char d14_tagclass[5];
  19568.     uint32_t d14_tagnamepointer;
  19569.     uint32_t d14_tagnamestringlength;
  19570.     uint32_t d14_tagid;
  19571.    
  19572.     // dependency 15: heat -- player melee response -- jpt!
  19573.     char d15_tagclass[5];
  19574.     uint32_t d15_tagnamepointer;
  19575.     uint32_t d15_tagnamestringlength;
  19576.     uint32_t d15_tagid;
  19577.    
  19578.     // 1012, 8
  19579.    
  19580.     // dependency 16: actor firing parameters -- actor firing parameters -- actv
  19581.     char d16_tagclass[5];
  19582.     uint32_t d16_tagnamepointer;
  19583.     uint32_t d16_tagnamestringlength;
  19584.     uint32_t d16_tagid;
  19585.    
  19586.     float weapon_reticle_near_reticle_range;
  19587.     float weapon_reticle_far_reticle_range;
  19588.     float weapon_reticle_intersection_reticle_range;
  19589.     // 1048, 2
  19590.     uint16_t weapon_zoom_magnification_levels;
  19591.     float weapon_zoom_magnification_range_from;
  19592.     float weapon_zoom_magnification_range_to;
  19593.    
  19594.     float weapon_aim_assist_autoaim_angle_rad;
  19595.     float weapon_aim_assist_autoaim_range;
  19596.     float weapon_aim_assist_magnetism_angle_rad;
  19597.     float weapon_aim_assist_magnetism_range;
  19598.     float weapon_aim_assist_deviation_angle_rad;
  19599.    
  19600.     // 1080, 4
  19601.    
  19602.     uint16_t weapon_movement_movement_penalized;
  19603.     // 1086, 2
  19604.     float weapon_movement_forward_movement_penalty;
  19605.     float weapon_movement_sideways_movement_penalty;
  19606.     // 1096, 4
  19607.    
  19608.     float weapon_ai_targeting_parameters_minimum_target_range;
  19609.     float weapon_ai_targeting_parameters_looking_time_modifier;
  19610.     // 1108, 4
  19611.    
  19612.     float weapon_miscellaneous_light_power_on_time;
  19613.     float weapon_miscellaneous_light_power_off_time;
  19614.    
  19615.     // dependency 17: miscellaneous -- light power-on effect -- effe snd!
  19616.     char d17_tagclass[5];
  19617.     uint32_t d17_tagnamepointer;
  19618.     uint32_t d17_tagnamestringlength;
  19619.     uint32_t d17_tagid;
  19620.    
  19621.     // dependency 18: miscellaneous -- light power-off effect -- effe snd!
  19622.     char d18_tagclass[5];
  19623.     uint32_t d18_tagnamepointer;
  19624.     uint32_t d18_tagnamestringlength;
  19625.     uint32_t d18_tagid;
  19626.    
  19627.     float weapon_miscellaneous_age_heat_recovery_penalty;
  19628.     float weapon_miscellaneous_age_rate_of_fire_penalty;
  19629.     float weapon_miscellaneous_age_misfire_start_frac;
  19630.     float weapon_miscellaneous_age_misfire_chance_frac;
  19631.    
  19632.     // 1168, 12
  19633.    
  19634.     // dependency 19: interface -- first person model -- mod2
  19635.     char d19_tagclass[5];
  19636.     uint32_t d19_tagnamepointer;
  19637.     uint32_t d19_tagnamestringlength;
  19638.     uint32_t d19_tagid;
  19639.    
  19640.     // dependency 20: interface -- first person animations -- antr
  19641.     char d20_tagclass[5];
  19642.     uint32_t d20_tagnamepointer;
  19643.     uint32_t d20_tagnamestringlength;
  19644.     uint32_t d20_tagid;
  19645.    
  19646.     // 1212, 4
  19647.    
  19648.     // dependency 21: interface -- hud interface -- wphi
  19649.     char d21_tagclass[5];
  19650.     uint32_t d21_tagnamepointer;
  19651.     uint32_t d21_tagnamestringlength;
  19652.     uint32_t d21_tagid;
  19653.    
  19654.     // dependency 22: interface -- pickup sound -- snd!
  19655.     char d22_tagclass[5];
  19656.     uint32_t d22_tagnamepointer;
  19657.     uint32_t d22_tagnamestringlength;
  19658.     uint32_t d22_tagid;
  19659.    
  19660.     // dependency 23: interface -- zoom-in sound -- snd!
  19661.     char d23_tagclass[5];
  19662.     uint32_t d23_tagnamepointer;
  19663.     uint32_t d23_tagnamestringlength;
  19664.     uint32_t d23_tagid;
  19665.    
  19666.     // dependency 24: interface -- zoom-out sound -- snd!
  19667.     char d24_tagclass[5];
  19668.     uint32_t d24_tagnamepointer;
  19669.     uint32_t d24_tagnamestringlength;
  19670.     uint32_t d24_tagid;
  19671.    
  19672.     // 1280, 12
  19673.    
  19674.     float weapon_interface_active_camo_ding;
  19675.     float weapon_interface_active_camo_regrowth_rate;
  19676.    
  19677.     // 1300, 14
  19678.     uint16_t weapon_more_miscellaneous_weapon_type;
  19679.    
  19680.     // representation 6 board, offset 1316
  19681.     // r6b_weapon_predicted_resources_
  19682.     uint32_t r6b_weapon_predicted_resources_entrycount; // maximum of 1024 cells (guessing)
  19683.     uint32_t r6b_weapon_predicted_resources_random_id;
  19684.     uint32_t r6b_weapon_predicted_resources_sig_id; // example value = 0x105FA000
  19685.    
  19686.     // representation 7 board, offset 1328
  19687.     // r7b_weapon_magazines_
  19688.     uint32_t r7b_weapon_magazines_entrycount; // maximum of 2 cells
  19689.     uint32_t r7b_weapon_magazines_random_id;
  19690.     uint32_t r7b_weapon_magazines_sig_id; // example value = 0xDC369D00
  19691.    
  19692.     // representation 8 board, offset 1340
  19693.     // r8b_weapon_triggers_
  19694.     uint32_t r8b_weapon_triggers_entrycount; // maximum of 2 cells
  19695.     uint32_t r8b_weapon_triggers_random_id;
  19696.     uint32_t r8b_weapon_triggers_sig_id; // example value = 0x643A9D00
  19697.    
  19698.     // 1352, tpns 1-6
  19699.    
  19700.     // exstof: 1430
  19701.    
  19702.     // OBJE DATA 2 START
  19703.    
  19704.     struct weap_r1c {
  19705.         // representation 1 cells
  19706.         // r1c_attachments_
  19707.         // 72
  19708.        
  19709.         // dependency r1c 1: r1c_attachments_type_ cont effe ligh mgs2 pctl lsnd
  19710.         char r1c_attachments_type_tagclass[5];       //unsigned char[5]
  19711.         uint32_t r1c_attachments_type_tagnamepointer;   //uint32 ("random" number)
  19712.         uint32_t r1c_attachments_type_tagnamestringlength;   //uint32
  19713.         uint32_t r1c_attachments_type_tagid;         //uint32 (0xFFFFFFFF with tags)
  19714.         // char r1c_attachments_type_tagnamestring[255];
  19715.        
  19716.         char r1c_attachments_marker[32];
  19717.         uint16_t r1c_attachments_primary_scale;
  19718.         uint16_t r1c_attachments_secondary_scale;
  19719.         uint16_t r1c_attachments_change_color;
  19720.        
  19721.         // 18
  19722.        
  19723.     }r1c_attachments;
  19724.    
  19725.     // r1c 1 tag name strings here
  19726.    
  19727.     struct weap_r2c {
  19728.         // representation 2 cells
  19729.         // r2c_widgets_
  19730.         // 32
  19731.        
  19732.         // dependency r2c 1: r2c_widgets_reference_ ant! flag glw! mgs2 elec
  19733.         char r2c_widgets_reference_tagclass[5];      //unsigned char[5]
  19734.         uint32_t r2c_widgets_reference_tagnamepointer;   //uint32 ("random" number)
  19735.         uint32_t r2c_widgets_reference_tagnamestringlength;   //uint32
  19736.         uint32_t r2c_widgets_reference_tagid;        //uint32 (0xFFFFFFFF with tags)
  19737.         // char r2c_widgets_reference_tagnamestring[255];
  19738.        
  19739.         // 16
  19740.        
  19741.     }r2c_widgets;
  19742.    
  19743.     // r2c 1 tag name strings here
  19744.    
  19745.     struct weap_r3c {
  19746.         // representation 3 cells
  19747.         // r3c_functions_
  19748.         // 360
  19749.        
  19750.         uint32_t r3c_functions_flags;   // verified that 4 bytes are written, toff 1352 0x00000007
  19751.         float r3c_functions_period;
  19752.         uint16_t r3c_functions_scale_period_by;
  19753.         uint16_t r3c_functions_function;
  19754.         uint16_t r3c_functions_scale_function_by;
  19755.         uint16_t r3c_functions_wobble_function;
  19756.         float r3c_functions_wobble_period;
  19757.         float r3c_functions_wobble_magnitude;
  19758.         float r3c_functions_square_wave_threshold_frac;
  19759.         uint16_t r3c_functions_step_count;
  19760.         uint16_t r3c_functions_map_to;
  19761.         uint16_t r3c_functions_sawtooth_count;
  19762.         uint16_t r3c_functions_add;
  19763.         uint16_t r3c_functions_scale_result_by;
  19764.         uint16_t r3c_functions_bounds_mode;
  19765.         float r3c_functions_bounds_from_frac;
  19766.         float r3c_functions_bounds_to_frac;
  19767.         // 6
  19768.         uint16_t r3c_functions_turn_off_with_sel;
  19769.         float r3c_functions_scale_by;
  19770.         // 268
  19771.         char r3c_functions_usage[32];
  19772.        
  19773.     }r3c_functions;
  19774.    
  19775.     struct weap_r4c {
  19776.         // representation 4 cells
  19777.         // r4c_change_colors_
  19778.         // 44
  19779.         uint16_t r4c_change_colors_darken_by;
  19780.         uint16_t r4c_change_colors_scale_by;
  19781.         uint32_t r4c_change_colors_scale_flags;   // verified that 4 bytes are written, toff 1716   0x00000003
  19782.         float r4c_change_colors_color_lower_bound_r_frac;
  19783.         float r4c_change_colors_color_lower_bound_g_frac;
  19784.         float r4c_change_colors_color_lower_bound_b_frac;
  19785.         float r4c_change_colors_color_upper_bound_r_frac;
  19786.         float r4c_change_colors_color_upper_bound_g_frac;
  19787.         float r4c_change_colors_color_upper_bound_b_frac;
  19788.        
  19789.         // representation 4 sub-board A
  19790.         // r4sbA_permutations_
  19791.         uint32_t r4sbA_permutations_entrycount;   // maximum of 8 cells
  19792.         uint32_t r4sbA_permutations_random_id1;
  19793.         uint32_t r4sbA_permutations_sig_id;   // example value = 0xD8479D00
  19794.     }r4c_change_colors;
  19795.    
  19796.     struct weap_r4scA
  19797.     {
  19798.         // representation 4 sub-cells A
  19799.         // r4scA_permutations_
  19800.         // 28
  19801.         float r4scA_permutations_weight_frac;
  19802.         float r4scA_permutations_color_lower_bound_r_frac;
  19803.         float r4scA_permutations_color_lower_bound_g_frac;
  19804.         float r4scA_permutations_color_lower_bound_b_frac;
  19805.         float r4scA_permutations_color_upper_bound_r_frac;
  19806.         float r4scA_permutations_color_upper_bound_g_frac;
  19807.         float r4scA_permutations_color_upper_bound_b_frac;
  19808.     }r4sc_change_colors_permutations;
  19809.    
  19810.     struct weap_r5c {
  19811.         // representation 5 cells
  19812.         // r5c_predicted_resources_
  19813.         // 8
  19814.         uint16_t r5c_predicted_resources_type;
  19815.         uint16_t r5c_predicted_resources_resource_index;
  19816.         uint32_t r5c_predicted_resources_tag_index;
  19817.     }r5c_predicted_resources;
  19818.    
  19819.     // OBJE DATA 2 END
  19820.    
  19821.     // tpns 7-24
  19822.     // exstof:
  19823.    
  19824.     struct weap_r6c {
  19825.         // representation 6 cells
  19826.         // r6c_weapon_predicted_resources_
  19827.         // 8
  19828.         uint16_t r6c_weapon_predicted_resources_type;
  19829.         uint16_t r6c_weapon_predicted_resources_resource_index;
  19830.         uint32_t r6c_weapon_predicted_resources_tag_index;
  19831.     }r6c_weapon_predicted_resources;
  19832.    
  19833.     // exstof: 1666
  19834.    
  19835.     struct weap_r7c {
  19836.         // representation 7 cells
  19837.         // r7c_magazines_
  19838.         // 112
  19839.        
  19840.         uint32_t r7c_magazines_flags;   //toff 1756 0x00000003
  19841.         uint16_t r7c_magazines_rounds_recharged;
  19842.         uint16_t r7c_magazines_rounds_total_initial;
  19843.         uint16_t r7c_magazines_rounds_total_maximum;
  19844.         uint16_t r7c_magazines_rounds_loaded_maximum;
  19845.        
  19846.         // 8
  19847.        
  19848.         float r7c_magazines_reload_time;
  19849.         uint16_t r7c_magazines_rounds_reloaded;
  19850.         // 2
  19851.         float r7c_magazines_chamber_time;
  19852.        
  19853.         // 24
  19854.        
  19855.         // dependency r7c 1: magazines -- reloading effect -- effe snd!
  19856.         char dr7c1_tagclass[5];
  19857.         uint32_t dr7c1_tagnamepointer;
  19858.         uint32_t dr7c1_tagnamestringlength;
  19859.         uint32_t dr7c1_tagid;
  19860.        
  19861.         // dependency r7c 2: magazines -- chambering effect -- effe snd!
  19862.         char dr7c2_tagclass[5];
  19863.         uint32_t dr7c2_tagnamepointer;
  19864.         uint32_t dr7c2_tagnamestringlength;
  19865.         uint32_t dr7c2_tagid;
  19866.        
  19867.         // 12
  19868.        
  19869.         // representation 7 sub-board A
  19870.         // r7sbA_magazines_magazines_
  19871.         uint32_t r7sbA_magazines_magazines_entrycount;   // maximum of 2 cells   (Guerilla does not limit it to 2, but crashes if you try to add more than 2)
  19872.         uint32_t r7sbA_magazines_magazines_random_id1;
  19873.         uint32_t r7sbA_magazines_magazines_sig_id;   // example value = 0xD0359D00
  19874.        
  19875.     }r7c_weapon_magazines;
  19876.    
  19877.     // exstof:
  19878.    
  19879.     struct weap_r7sc {
  19880.         // representation 7 sub-cells grouping container
  19881.         // per cell
  19882.        
  19883.         // this cell's tpns r7c 1 and 2
  19884.        
  19885.         struct weap_r7scA {
  19886.             // representation 7 sub-cells A
  19887.             // r7scA_magazines_
  19888.             // 28
  19889.            
  19890.             uint16_t r7scA_magazines_rounds;
  19891.             // 10
  19892.            
  19893.             // dependency r7scA 1: magazines -- equipment -- eqip
  19894.             char dr7scA1_tagclass[5];
  19895.             uint32_t dr7scA1_tagnamepointer;
  19896.             uint32_t dr7scA1_tagnamestringlength;
  19897.             uint32_t dr7scA1_tagid;
  19898.            
  19899.         }r7scA_magazines_magazines;
  19900.        
  19901.         // this cell's tpns r7scA 1
  19902.        
  19903.     }r7sc_container;
  19904.    
  19905.     // exstof: 2112
  19906.    
  19907.     struct weap_r8c {
  19908.         // representation 8 cells
  19909.         // r8c_triggers_
  19910.         // 276
  19911.        
  19912.         uint32_t r8c_triggers_flags;    //toff 1868 0x00003FFF
  19913.         float r8c_triggers_firing_rounds_per_second_from;
  19914.         float r8c_triggers_firing_rounds_per_second_to;
  19915.         float r8c_triggers_firing_acceleration_time;
  19916.         float r8c_triggers_firing_deceleration_time;
  19917.         float r8c_triggers_firing_blurred_rate_of_fire;
  19918.         // 8
  19919.         uint16_t r8c_triggers_firing_magazine_sel;
  19920.         uint16_t r8c_triggers_firing_rounds_per_shot;
  19921.         uint16_t r8c_triggers_firing_minimum_rounds_loaded;
  19922.         uint16_t r8c_triggers_firing_rounds_between_tracers;
  19923.         // 6
  19924.         uint16_t r8c_triggers_firing_firing_noise;
  19925.        
  19926.         float r8c_triggers_error_error_from;
  19927.         float r8c_triggers_error_error_to;
  19928.         float r8c_triggers_error_acceleration_time;
  19929.         float r8c_triggers_error_deceleration_time;
  19930.         // 8
  19931.        
  19932.         float r8c_triggers_charging_charging_time;
  19933.         float r8c_triggers_charging_charged_time;
  19934.         uint16_t r8c_triggers_charging_overcharged_action;
  19935.         // 2
  19936.         float r8c_triggers_charging_charged_illumination;
  19937.         float r8c_triggers_charging_spew_time;
  19938.        
  19939.         // dependency r8c 1: charging -- charging effect -- effe snd!
  19940.         char dr8c1_tagclass[5];
  19941.         uint32_t dr8c1_tagnamepointer;
  19942.         uint32_t dr8c1_tagnamestringlength;
  19943.         uint32_t dr8c1_tagid;
  19944.        
  19945.         uint16_t r8c_triggers_projectile_distribution_function;
  19946.         uint16_t r8c_triggers_projectile_projectiles_per_shot;
  19947.         float r8c_triggers_projectile_distribution_angle;
  19948.         // 4
  19949.         float r8c_triggers_projectile_minimum_error_rad;
  19950.         float r8c_triggers_projectile_error_angle_from_rad;
  19951.         float r8c_triggers_projectile_error_angle_to_rad;
  19952.         float r8c_triggers_projectile_first_person_offset_x;
  19953.         float r8c_triggers_projectile_first_person_offset_y;
  19954.         float r8c_triggers_projectile_first_person_offset_z;
  19955.         // 4
  19956.        
  19957.         // dependency r8c 2: projectile -- projectile -- proj
  19958.         char dr8c2_tagclass[5];
  19959.         uint32_t dr8c2_tagnamepointer;
  19960.         uint32_t dr8c2_tagnamestringlength;
  19961.         uint32_t dr8c2_tagid;
  19962.        
  19963.         float r8c_triggers_misc_ejection_port_recovery_time;
  19964.         float r8c_triggers_misc_illumination_recovery_time;
  19965.         // 12
  19966.         float r8c_triggers_misc_heat_generated_per_round_frac;
  19967.         float r8c_triggers_misc_age_generated_per_round_frac;
  19968.         // 4
  19969.         float r8c_triggers_misc_overload_time;
  19970.        
  19971.         // 64
  19972.        
  19973.         // representation 8 sub-board A
  19974.         // r8sbA_triggers_firing_effects_
  19975.         uint32_t r8sbA_triggers_firing_effects_entrycount;   // maximum of 8 cells
  19976.         uint32_t r8sbA_triggers_firing_effects_random_id1;
  19977.         uint32_t r8sbA_triggers_firing_effects_sig_id;   // example value = 0x80379D00
  19978.        
  19979.     }r8c_weapon_triggers;
  19980.    
  19981.     // exstof:
  19982.    
  19983.     struct weap_r8sc {
  19984.         // representation 8 sub-cells grouping container
  19985.         // per cell
  19986.        
  19987.         // this cell's r8c 1-2 tpns
  19988.        
  19989.         struct weap_r8scA {
  19990.             // representation 8 sub-cells A
  19991.             // r8scA_firing_effects_
  19992.             // 132
  19993.            
  19994.             uint16_t r8scA_firing_effects_shot_count_lower_bound;
  19995.             uint16_t r8scA_firing_effects_shot_count_upper_bound;
  19996.             // 32
  19997.            
  19998.             // dependency r8scA 1: firing effects -- firing effect -- effe snd!
  19999.             char dr8scA1_tagclass[5];
  20000.             uint32_t dr8scA1_tagnamepointer;
  20001.             uint32_t dr8scA1_tagnamestringlength;
  20002.             uint32_t dr8scA1_tagid;
  20003.            
  20004.             // dependency r8scA 2: firing effects -- misfire effect -- effe snd!
  20005.             char dr8scA2_tagclass[5];
  20006.             uint32_t dr8scA2_tagnamepointer;
  20007.             uint32_t dr8scA2_tagnamestringlength;
  20008.             uint32_t dr8scA2_tagid;
  20009.            
  20010.             // dependency r8scA 3: firing effects -- empty effect -- effe snd!
  20011.             char dr8scA3_tagclass[5];
  20012.             uint32_t dr8scA3_tagnamepointer;
  20013.             uint32_t dr8scA3_tagnamestringlength;
  20014.             uint32_t dr8scA3_tagid;
  20015.            
  20016.             // dependency r8scA 4: firing effects -- firing damage -- jpt!
  20017.             char dr8scA4_tagclass[5];
  20018.             uint32_t dr8scA4_tagnamepointer;
  20019.             uint32_t dr8scA4_tagnamestringlength;
  20020.             uint32_t dr8scA4_tagid;
  20021.            
  20022.             // dependency r8scA 5: firing effects -- misfire damage -- jpt!
  20023.             char dr8scA5_tagclass[5];
  20024.             uint32_t dr8scA5_tagnamepointer;
  20025.             uint32_t dr8scA5_tagnamestringlength;
  20026.             uint32_t dr8scA5_tagid;
  20027.            
  20028.             // dependency r8scA 6: firing effects -- empty damage -- jpt!
  20029.             char dr8scA6_tagclass[5];
  20030.             uint32_t dr8scA6_tagnamepointer;
  20031.             uint32_t dr8scA6_tagnamestringlength;
  20032.             uint32_t dr8scA6_tagid;
  20033.            
  20034.         }r8scA_triggers_firing_effects;
  20035.        
  20036.         // this cell's r8scA 1-6 tpns, as {r8scA 1, r8scA 2, r8scA 3, r8scA 4, r8scA 5, r8scA 6}
  20037.     }r8sc_container;
  20038.    
  20039. } type_meta_weap;
  20040.  
  20041. #pragma mark -- wind
  20042.  
  20043. typedef struct {
  20044.     float velocity_from;
  20045.     float velocity_to;
  20046.     float variation_area_yaw_rad;
  20047.     float variation_area_pitch_rad;
  20048.     float local_variation_weight;
  20049.     float local_variation_rate;
  20050.     float damping;
  20051.     // 92, 36
  20052. } type_meta_wind;
  20053.  
  20054. #pragma mark -- wphi
  20055.  
  20056. typedef struct {
  20057.    
  20058.     // dependency 1:  -- child hud -- wphi
  20059.     char d1_tagclass[5];
  20060.     uint32_t d1_tagnamepointer;
  20061.     uint32_t d1_tagnamestringlength;
  20062.     uint32_t d1_tagid;
  20063.    
  20064.     // 80, 1
  20065.     uint8_t flash_cutoffs_flags;    //toff 80   0x01
  20066.     // 82, 2
  20067.     uint16_t flash_cutoffs_total_ammo_cutoff;
  20068.     uint16_t flash_cutoffs_loaded_ammo_cutoff;
  20069.     uint16_t flash_cutoffs_heat_cutoff;
  20070.     uint16_t flash_cutoffs_age_cutoff;
  20071.     // 92, 32
  20072.     uint16_t weapon_hud_screen_alignment_anchor;
  20073.     // 126, 34
  20074.    
  20075.     // representation 1 board, offset 160
  20076.     // r1b_static_elements_
  20077.     uint32_t r1b_static_elements_entrycount; // maximum of 16 cells
  20078.     uint32_t r1b_static_elements_random_id;
  20079.     uint32_t r1b_static_elements_sig_id; // example value = 0x3C559C00
  20080.    
  20081.     // representation 2 board, offset 172
  20082.     // r2b_meter_elements_
  20083.     uint32_t r2b_meter_elements_entrycount; // maximum of 16 cells
  20084.     uint32_t r2b_meter_elements_random_id;
  20085.     uint32_t r2b_meter_elements_sig_id; // example value = 0xB8569C00
  20086.    
  20087.     // representation 3 board, offset 184
  20088.     // r3b_number_elements_
  20089.     uint32_t r3b_number_elements_entrycount; // maximum of 16 cells
  20090.     uint32_t r3b_number_elements_random_id;
  20091.     uint32_t r3b_number_elements_sig_id; // example value = 0x44589C00
  20092.    
  20093.     // representation 4 board, offset 196
  20094.     // r4b_crosshairs_
  20095.     uint32_t r4b_crosshairs_entrycount; // maximum of 19 cells
  20096.     uint32_t r4b_crosshairs_random_id;
  20097.     uint32_t r4b_crosshairs_sig_id; // example value = 0x945A9C00
  20098.    
  20099.     // representation 5 board, offset 208
  20100.     // r5b_overlay_elements_
  20101.     uint32_t r5b_overlay_elements_entrycount; // maximum of 16 cells
  20102.     uint32_t r5b_overlay_elements_random_id;
  20103.     uint32_t r5b_overlay_elements_sig_id; // example value = 0xDC589C00
  20104.    
  20105.     // 220, 16
  20106.    
  20107.     // representation 6 board, offset 236
  20108.     // r6b_screen_effect_
  20109.     uint32_t r6b_screen_effect_entrycount; // maximum of 1 cell
  20110.     uint32_t r6b_screen_effect_random_id;
  20111.     uint32_t r6b_screen_effect_sig_id; // example value = 0x48379C00
  20112.    
  20113.     // 248, 132
  20114.    
  20115.     uint16_t messaging_information_sequence_index;
  20116.     uint16_t messaging_information_width_offset;
  20117.     uint16_t messaging_information_offset_from_reference_corner_x;
  20118.     uint16_t messaging_information_offset_from_reference_corner_y;
  20119.    
  20120.     uint8_t messaging_information_override_icon_color_a;
  20121.     uint8_t messaging_information_override_icon_color_r;
  20122.     uint8_t messaging_information_override_icon_color_g;
  20123.     uint8_t messaging_information_override_icon_color_b;
  20124.    
  20125.     uint8_t messaging_information_frame_rate;
  20126.     uint8_t messaging_information_flags;    //toff 393 (untested)   0x07
  20127.    
  20128.     uint16_t messaging_information_text_index;
  20129.    
  20130.     // 396, 48
  20131.    
  20132.     // 444, tpns 1
  20133.    
  20134.     // exstof: 454
  20135.    
  20136.     struct wphi_r1c {
  20137.         // representation 1 cells
  20138.         // r1c_static_elements_
  20139.         // 180
  20140.        
  20141.         uint16_t r1c_static_elements_state_attached_to;
  20142.         // 2
  20143.         uint16_t r1c_static_elements_can_use_on_map_type;
  20144.         // 30
  20145.         uint16_t r1c_static_elements_anchor_offset_x;
  20146.         uint16_t r1c_static_elements_anchor_offset_y;
  20147.        
  20148.         float r1c_static_elements_width_scale;
  20149.         float r1c_static_elements_height_scale;
  20150.        
  20151.         // 1
  20152.         uint8_t r1c_static_elements_scaling_flags;  //toff 492  0x07
  20153.         // 22
  20154.        
  20155.         // dependency r1c 1: static elements -- interface bitmap -- bitm
  20156.         char dr1c1_tagclass[5];
  20157.         uint32_t dr1c1_tagnamepointer;
  20158.         uint32_t dr1c1_tagnamestringlength;
  20159.         uint32_t dr1c1_tagid;
  20160.        
  20161.         uint8_t r1c_static_elements_default_color_a;
  20162.         uint8_t r1c_static_elements_default_color_r;
  20163.         uint8_t r1c_static_elements_default_color_g;
  20164.         uint8_t r1c_static_elements_default_color_b;
  20165.        
  20166.         uint8_t r1c_static_elements_flashing_color_a;
  20167.         uint8_t r1c_static_elements_flashing_color_r;
  20168.         uint8_t r1c_static_elements_flashing_color_g;
  20169.         uint8_t r1c_static_elements_flashing_color_b;
  20170.        
  20171.         float r1c_static_elements_flash_period;
  20172.         float r1c_static_elements_flash_delay;
  20173.        
  20174.         uint16_t r1c_static_elements_number_of_flashes;
  20175.         // 1
  20176.         uint8_t r1c_static_elements_flash_flags;    //toff 550  0x01
  20177.         float r1c_static_elements_flash_length;
  20178.        
  20179.         uint8_t r1c_static_elements_disabled_color_a;
  20180.         uint8_t r1c_static_elements_disabled_color_r;
  20181.         uint8_t r1c_static_elements_disabled_color_g;
  20182.         uint8_t r1c_static_elements_disabled_color_b;
  20183.        
  20184.         // 4
  20185.         uint16_t r1c_static_elements_sequence_index;
  20186.         // 2
  20187.        
  20188.         // representation 1 sub-board A
  20189.         // r1sbA_multitexture_overlay_
  20190.         uint32_t r1sbA_multitexture_overlay_entrycount; // maximum of 30 cells
  20191.         uint32_t r1sbA_multitexture_overlay_random_id;
  20192.         uint32_t r1sbA_multitexture_overlay_sig_id; // example value = 0xCC3A9C00
  20193.        
  20194.         // 44
  20195.        
  20196.     }r1c_static_elements;
  20197.    
  20198.     // exstof: 3334
  20199.    
  20200.     struct wphi_r1sc {
  20201.        
  20202.         // this cell's r1c1 tpns
  20203.        
  20204.         struct wphi_r1scA {
  20205.             // representation 1 sub-cells A (all for current cell)
  20206.             // r1scA_
  20207.             // 480 bytes
  20208.            
  20209.             // 2
  20210.            
  20211.             uint16_t r1scA_type;
  20212.             uint16_t r1scA_framebuffer_blend_function;
  20213.            
  20214.             // 34
  20215.            
  20216.             uint16_t r1scA_anchors_primary_anchor;
  20217.             uint16_t r1scA_anchors_secondary_anchor;
  20218.             uint16_t r1scA_anchors_tertiary_anchor;
  20219.            
  20220.             uint16_t r1scA_blending_function_0_to_1_blending_function;
  20221.             uint16_t r1scA_blending_function_1_to_2_blending_function;
  20222.            
  20223.             // 2
  20224.            
  20225.             float r1scA_map_scales_primary_scale_x;
  20226.             float r1scA_map_scales_primary_scale_y;
  20227.             float r1scA_map_scales_secondary_scale_x;
  20228.             float r1scA_map_scales_secondary_scale_y;
  20229.             float r1scA_map_scales_tertiary_scale_x;
  20230.             float r1scA_map_scales_tertiary_scale_y;
  20231.            
  20232.             float r1scA_map_offsets_primary_offset_x;
  20233.             float r1scA_map_offsets_primary_offset_y;
  20234.             float r1scA_map_offsets_secondary_offset_x;
  20235.             float r1scA_map_offsets_secondary_offset_y;
  20236.             float r1scA_map_offsets_tertiary_offset_x;
  20237.             float r1scA_map_offsets_tertiary_offset_y;
  20238.            
  20239.             // dependency r1scA 1: map -- primary -- bitm
  20240.             char dr1scA1_tagclass[5];
  20241.             uint32_t dr1scA1_tagnamepointer;
  20242.             uint32_t dr1scA1_tagnamestringlength;
  20243.             uint32_t dr1scA1_tagid;
  20244.            
  20245.             // dependency r1scA 2: map -- secondary -- bitm
  20246.             char dr1scA2_tagclass[5];
  20247.             uint32_t dr1scA2_tagnamepointer;
  20248.             uint32_t dr1scA2_tagnamestringlength;
  20249.             uint32_t dr1scA2_tagid;
  20250.            
  20251.             // dependency r1scA 3: map -- tertiary -- bitm
  20252.             char dr1scA3_tagclass[5];
  20253.             uint32_t dr1scA3_tagnamepointer;
  20254.             uint32_t dr1scA3_tagnamestringlength;
  20255.             uint32_t dr1scA3_tagid;
  20256.            
  20257.             uint16_t r1scA_map_primary_wrap_mode;
  20258.             uint16_t r1scA_map_secondary_wrap_mode;
  20259.             uint16_t r1scA_map_tertiary_wrap_mode;
  20260.            
  20261.             // 186
  20262.            
  20263.             // representation 1 sub-board A
  20264.             // r1sbA_effectors_
  20265.             uint32_t r1sbA_effectors_entrycount; // maximum of 30 cells
  20266.             uint32_t r1sbA_effectors_random_id;
  20267.             uint32_t r1sbA_effectors_sig_id; // example value = 0x10399C00
  20268.            
  20269.             // 128
  20270.            
  20271.         }r1scA_static_elements_multitexture_overlay;
  20272.        
  20273.         struct wphi_r1sc1 {   // (all for current cell)
  20274.            
  20275.             // this sub-cell's r1scA 1-3 tpns
  20276.            
  20277.             struct wphi_r1scAsca {
  20278.                 // representation 1 sub-cells A sub-cells a
  20279.                 // r1scAsca_effectors_
  20280.                 // 220
  20281.                
  20282.                 // 64
  20283.                
  20284.                 uint16_t r1scAsca_effectors_source_destination_destination_type;
  20285.                 uint16_t r1scAsca_effectors_source_destination_destination;
  20286.                 uint16_t r1scAsca_effectors_source_destination_source;
  20287.                 // 2
  20288.                
  20289.                 float r1scAsca_effectors_in_out_bounds_in_bounds_from;
  20290.                 float r1scAsca_effectors_in_out_bounds_in_bounds_to;
  20291.                 float r1scAsca_effectors_in_out_bounds_out_bounds_from;
  20292.                 float r1scAsca_effectors_in_out_bounds_out_bounds_to;
  20293.                
  20294.                 // 64
  20295.                
  20296.                 float r1scAsca_effectors_tint_color_bounds_tint_color_lower_bound_r_frac;
  20297.                 float r1scAsca_effectors_tint_color_bounds_tint_color_lower_bound_g_frac;
  20298.                 float r1scAsca_effectors_tint_color_bounds_tint_color_lower_bound_b_frac;
  20299.                 float r1scAsca_effectors_tint_color_bounds_tint_color_upper_bound_r_frac;
  20300.                 float r1scAsca_effectors_tint_color_bounds_tint_color_upper_bound_g_frac;
  20301.                 float r1scAsca_effectors_tint_color_bounds_tint_color_upper_bound_b_frac;
  20302.                
  20303.                 uint16_t r1scAsca_effectors_periodic_functions_periodic_function;
  20304.                 // 2
  20305.                 float r1scAsca_effectors_periodic_functions_function_period;
  20306.                 float r1scAsca_effectors_periodic_functions_function_phase;
  20307.                
  20308.                 // 32
  20309.                
  20310.             }r1scAsca_static_elements_multitexture_overlay_effectors;
  20311.            
  20312.         }r1sc_container_inner1;
  20313.        
  20314.     }r1sc_container;
  20315.    
  20316.     // exstof: 3414966
  20317.    
  20318.     struct wphi_r2c {
  20319.         // representation 2 cells
  20320.         // r2c_meter_elements_
  20321.         // 180
  20322.        
  20323.         uint16_t r2c_meter_elements_state_attached_to;
  20324.         // 2
  20325.         uint16_t r2c_meter_elements_can_use_on_map_type;
  20326.         // 30
  20327.         uint16_t r2c_meter_elements_anchor_offset_x;
  20328.         uint16_t r2c_meter_elements_anchor_offset_y;
  20329.         float r2c_meter_elements_width_scale;
  20330.         float r2c_meter_elements_height_scale;
  20331.         // 1
  20332.         uint8_t r2c_meter_elements_scaling_flags;   //toff 672  0x07
  20333.         // 22
  20334.        
  20335.         // dependency r2c 1: meter elements -- meter bitmap -- bitm
  20336.         char dr2c1_tagclass[5];
  20337.         uint32_t dr2c1_tagnamepointer;
  20338.         uint32_t dr2c1_tagnamestringlength;
  20339.         uint32_t dr2c1_tagid;
  20340.        
  20341.         uint8_t r2c_meter_elements_color_at_meter_minimum_a;   // unused
  20342.         uint8_t r2c_meter_elements_color_at_meter_minimum_r;
  20343.         uint8_t r2c_meter_elements_color_at_meter_minimum_g;
  20344.         uint8_t r2c_meter_elements_color_at_meter_minimum_b;
  20345.        
  20346.         uint8_t r2c_meter_elements_color_at_meter_maximum_a;   // unused
  20347.         uint8_t r2c_meter_elements_color_at_meter_maximum_r;
  20348.         uint8_t r2c_meter_elements_color_at_meter_maximum_g;
  20349.         uint8_t r2c_meter_elements_color_at_meter_maximum_b;
  20350.        
  20351.         uint8_t r2c_meter_elements_flash_color_a;   // unused
  20352.         uint8_t r2c_meter_elements_flash_color_r;
  20353.         uint8_t r2c_meter_elements_flash_color_g;
  20354.         uint8_t r2c_meter_elements_flash_color_b;
  20355.        
  20356.         uint8_t r2c_meter_elements_empty_color_a;
  20357.         uint8_t r2c_meter_elements_empty_color_r;
  20358.         uint8_t r2c_meter_elements_empty_color_g;
  20359.         uint8_t r2c_meter_elements_empty_color_b;
  20360.        
  20361.         uint8_t r2c_meter_elements_flags;   //toff 728 (untested)   0x1F
  20362.        
  20363.         uint8_t r2c_meter_elements_minimum_meter_value;
  20364.         uint16_t r2c_meter_elements_sequence_index;
  20365.         uint8_t r2c_meter_elements_alpha_multiplier;
  20366.         uint8_t r2c_meter_elements_alpha_bias;
  20367.         uint16_t r2c_meter_elements_value_scale;
  20368.        
  20369.         float r2c_meter_elements_opacity;
  20370.         float r2c_meter_elements_translucency;
  20371.        
  20372.         uint8_t r2c_meter_elements_disabled_color_a;
  20373.         uint8_t r2c_meter_elements_disabled_color_r;
  20374.         uint8_t r2c_meter_elements_disabled_color_g;
  20375.         uint8_t r2c_meter_elements_disabled_color_b;
  20376.        
  20377.         // 56
  20378.        
  20379.     }r2c_meter_elements;
  20380.    
  20381.     // exstof: 3417846
  20382.    
  20383.     // tpns r2c 1
  20384.    
  20385.     // exstof: 3418054
  20386.    
  20387.     struct wphi_r3c {
  20388.         // representation 3 cells
  20389.         // r3c_number_elements_
  20390.         // 160 (100?)
  20391.        
  20392.         uint16_t r3c_number_elements_state_attached_to;
  20393.         // 2
  20394.         uint16_t r3c_number_elements_can_use_on_map_type;
  20395.         // 30
  20396.        
  20397.         uint16_t r3c_number_elements_anchor_offset_x;
  20398.         uint16_t r3c_number_elements_anchor_offset_y;
  20399.         float r3c_number_elements_width_scale;
  20400.         float r3c_number_elements_height_scale;
  20401.         // 1
  20402.         uint8_t r3c_number_elements_scaling_flags;  //toff 852  0x07
  20403.         // 22
  20404.        
  20405.         uint8_t r3c_number_elements_default_color_a;
  20406.         uint8_t r3c_number_elements_default_color_r;
  20407.         uint8_t r3c_number_elements_default_color_g;
  20408.         uint8_t r3c_number_elements_default_color_b;
  20409.        
  20410.         uint8_t r3c_number_elements_flashing_color_a;
  20411.         uint8_t r3c_number_elements_flashing_color_r;
  20412.         uint8_t r3c_number_elements_flashing_color_g;
  20413.         uint8_t r3c_number_elements_flashing_color_b;
  20414.        
  20415.         float r3c_number_elements_flash_period;
  20416.         float r3c_number_elements_flash_delay;
  20417.         uint16_t r3c_number_elements_number_of_flashes;
  20418.         // 1
  20419.         uint8_t r3c_number_elements_flash_flags;    //toff 894  0x01
  20420.         float r3c_number_elements_flash_length;
  20421.        
  20422.         uint8_t r3c_number_elements_disabled_color_a;
  20423.         uint8_t r3c_number_elements_disabled_color_r;
  20424.         uint8_t r3c_number_elements_disabled_color_g;
  20425.         uint8_t r3c_number_elements_disabled_color_b;
  20426.        
  20427.         // 4
  20428.         uint8_t r3c_number_elements_maximum_number_of_digits;
  20429.         uint8_t r3c_number_elements_flags;  //toff 909 (untested)   0x07
  20430.         uint8_t r3c_number_elements_number_of_fractional_digits;
  20431.         // 14
  20432.         uint8_t r3c_number_elements_weapon_specific_flags;  //toff 922  0x01
  20433.         // 38
  20434.        
  20435.     }r3c_number_elements;
  20436.    
  20437.     // exstof: 3420614
  20438.    
  20439.     struct wphi_r4c {
  20440.         // representation 4 cells
  20441.         // r4c_crosshairs_
  20442.         // 104
  20443.        
  20444.         uint16_t r4c_crosshairs_crosshair_type;
  20445.         // 2
  20446.         uint16_t r4c_crosshairs_can_use_on_map_type;
  20447.         // 30
  20448.        
  20449.         // dependency r4c 1: crosshairs -- crosshair bitmap -- bitm
  20450.         char dr4c1_tagclass[5];
  20451.         uint32_t dr4c1_tagnamepointer;
  20452.         uint32_t dr4c1_tagnamestringlength;
  20453.         uint32_t dr4c1_tagid;
  20454.        
  20455.         // representation 4 sub-board A
  20456.         // r4sbA_crosshair_overlays_
  20457.         uint32_t r4sbA_crosshair_overlays_entrycount; // maximum of 16 cells
  20458.         uint32_t r4sbA_crosshair_overlays_random_id;
  20459.         uint32_t r4sbA_crosshair_overlays_sig_id; // example value = 0xF8599C00
  20460.        
  20461.         // 40
  20462.        
  20463.     }r4c_crosshairs;
  20464.    
  20465.     // exstof: 3422590
  20466.    
  20467.     struct wphi_r4sc {
  20468.         // representation 4 sub-cells grouping container
  20469.         // per cell
  20470.        
  20471.         // this cell's tpns r4c 1
  20472.        
  20473.         struct wphi_r4scA {
  20474.             // representation 4 sub-cells A
  20475.             // r4scA_crosshair_overlays_
  20476.             // 108
  20477.            
  20478.             uint16_t r4scA_crosshair_overlays_anchor_offset_x;
  20479.             uint16_t r4scA_crosshair_overlays_anchor_offset_y;
  20480.             float r4scA_crosshair_overlays_width_scale;
  20481.             float r4scA_crosshair_overlays_height_scale;
  20482.             // 1
  20483.             uint8_t r4scA_crosshair_overlays_scaling_flags; //toff 1080 0x07
  20484.             // 22
  20485.            
  20486.             uint8_t r4scA_crosshair_overlays_default_color_a;
  20487.             uint8_t r4scA_crosshair_overlays_default_color_r;
  20488.             uint8_t r4scA_crosshair_overlays_default_color_g;
  20489.             uint8_t r4scA_crosshair_overlays_default_color_b;
  20490.            
  20491.             uint8_t r4scA_crosshair_overlays_flashing_color_a;
  20492.             uint8_t r4scA_crosshair_overlays_flashing_color_r;
  20493.             uint8_t r4scA_crosshair_overlays_flashing_color_g;
  20494.             uint8_t r4scA_crosshair_overlays_flashing_color_b;
  20495.            
  20496.             float r4scA_crosshair_overlays_flash_period;
  20497.             float r4scA_crosshair_overlays_flash_delay;
  20498.             uint16_t r4scA_crosshair_overlays_number_of_flashes;
  20499.             // 1
  20500.             uint8_t r4scA_crosshair_overlays_flash_flags;   //toff 1122 0x01
  20501.             float r4scA_crosshair_overlays_flash_length;
  20502.            
  20503.             uint8_t r4scA_crosshair_overlays_disabled_color_a;
  20504.             uint8_t r4scA_crosshair_overlays_disabled_color_r;
  20505.             uint8_t r4scA_crosshair_overlays_disabled_color_g;
  20506.             uint8_t r4scA_crosshair_overlays_disabled_color_b;
  20507.             // 4
  20508.             uint16_t r4scA_crosshair_overlays_frame_rate;   // exof: 3422675, differs from grhi which stores as float
  20509.             uint16_t r4scA_crosshair_overlays_sequence_index;
  20510.             uint32_t r4scA_crosshair_overlays_flags;    //toff 1140 0x0000007F
  20511.            
  20512.             // 32
  20513.            
  20514.         }r4scA_crosshairs_crosshair_overlays;
  20515.        
  20516.     }r4sc_container;
  20517.    
  20518.     // exstof: 3455745
  20519.    
  20520.     struct wphi_r5c {
  20521.         // representation 5 cells
  20522.         // r5c_overlay_elements_
  20523.         // 104
  20524.        
  20525.         uint16_t r5c_overlay_elements_state_attached_to;
  20526.         // 2
  20527.         uint16_t r5c_overlay_elements_can_use_on_map_type;
  20528.         // 30
  20529.        
  20530.         // dependency r5c 1: overlay elements -- overlay bitmap -- bitm
  20531.         char dr5c1_tagclass[5];
  20532.         uint32_t dr5c1_tagnamepointer;
  20533.         uint32_t dr5c1_tagnamestringlength;
  20534.         uint32_t dr5c1_tagid;
  20535.        
  20536.         // representation 5 sub-board A
  20537.         // r5sbA_overlays_
  20538.         uint32_t r5sbA_overlays_entrycount; // maximum of 16 cells
  20539.         uint32_t r5sbA_overlays_random_id;
  20540.         uint32_t r5sbA_overlays_sig_id; // example value = 0xCC539C00
  20541.        
  20542.         // 40
  20543.        
  20544.     }r5c_overlay_elements;
  20545.    
  20546.     // exstof: 3457409
  20547.    
  20548.     struct wphi_r5sc {
  20549.         // representation 5 sub-cells grouping container
  20550.         // per cell
  20551.        
  20552.         // this cell's tpns r5c 1
  20553.        
  20554.         struct wphi_r5scA {
  20555.             // representation 5 sub-cells A
  20556.             // r5scA_overlays_
  20557.             // 136
  20558.            
  20559.             uint16_t r5scA_overlays_anchor_offset_x;
  20560.             uint16_t r5scA_overlays_anchor_offset_y;
  20561.             float r5scA_overlays_width_scale;
  20562.             float r5scA_overlays_height_scale;
  20563.             // 1
  20564.             uint8_t r5scA_overlays_scaling_flags;   //toff 1292 0x07
  20565.             // 22
  20566.            
  20567.             uint8_t r5scA_overlays_default_color_a;
  20568.             uint8_t r5scA_overlays_default_color_r;
  20569.             uint8_t r5scA_overlays_default_color_g;
  20570.             uint8_t r5scA_overlays_default_color_b;
  20571.            
  20572.             uint8_t r5scA_overlays_flashing_color_a;
  20573.             uint8_t r5scA_overlays_flashing_color_r;
  20574.             uint8_t r5scA_overlays_flashing_color_g;
  20575.             uint8_t r5scA_overlays_flashing_color_b;
  20576.            
  20577.             float r5scA_overlays_flash_period;
  20578.             float r5scA_overlays_flash_delay;
  20579.             uint16_t r5scA_overlays_number_of_flashes;
  20580.             // 1
  20581.             uint8_t r5scA_overlays_flash_flags; //toff 1334 0x01
  20582.             float r5scA_overlays_flash_length;
  20583.            
  20584.             uint8_t r5scA_overlays_disabled_color_a;
  20585.             uint8_t r5scA_overlays_disabled_color_r;
  20586.             uint8_t r5scA_overlays_disabled_color_g;
  20587.             uint8_t r5scA_overlays_disabled_color_b;
  20588.             // 4
  20589.             uint16_t r5scA_overlays_frame_rate;
  20590.             // 2
  20591.             uint16_t r5scA_overlays_sequence_index;
  20592.            
  20593.             // 1
  20594.             uint8_t r5scA_overlays_type;    //toff 1354 0x1F
  20595.             uint32_t r5scA_overlays_flags;  //toff 1356 0x00000001
  20596.            
  20597.             // 56
  20598.            
  20599.         }r5scA_overlay_elements_overlays;
  20600.        
  20601.     }r5sc_container;
  20602.    
  20603.     // exstof: 3492465
  20604.    
  20605.     struct wphi_r6c {
  20606.         // representation 6 cells
  20607.         // r6c_screen_effect_
  20608.         //
  20609.        
  20610.         // 5
  20611.         uint8_t r6c_screen_effect_mask_flags;   //toff 1418 0x01
  20612.         // 18
  20613.        
  20614.         // dependency r6c 1: mask -- mask (fullscreen) -- bitm
  20615.         char dr6c1_tagclass[5];
  20616.         uint32_t dr6c1_tagnamepointer;
  20617.         uint32_t dr6c1_tagnamestringlength;
  20618.         uint32_t dr6c1_tagid;
  20619.        
  20620.         // dependency r6c 2: mask -- mask (splitscreen) -- bitm
  20621.         char dr6c2_tagclass[5];
  20622.         uint32_t dr6c2_tagnamepointer;
  20623.         uint32_t dr6c2_tagnamestringlength;
  20624.         uint32_t dr6c2_tagid;
  20625.        
  20626.         // 9
  20627.         uint8_t r6c_screen_effect_convolution_flags;    //toff 1478 0x01
  20628.         // 2
  20629.         float r6c_screen_effect_convolution_fov_in_bounds_from_rad;
  20630.         float r6c_screen_effect_convolution_fov_in_bounds_to_rad;
  20631.         float r6c_screen_effect_convolution_radius_out_bounds_from;
  20632.         float r6c_screen_effect_convolution_radius_out_bounds_to;
  20633.        
  20634.         // 25
  20635.         uint8_t r6c_screen_effect_night_vision_flags;   //toff 1522 0x07
  20636.         uint16_t r6c_screen_effect_night_vision_script_source;
  20637.         float r6c_screen_effect_night_vision_intensity_frac;
  20638.        
  20639.         // 25
  20640.         uint8_t r6c_screen_effect_desaturation_flags;   //toff 1554 0x0F
  20641.         uint16_t r6c_screen_effect_desaturation_script_source;
  20642.         float r6c_screen_effect_desaturation_intensity_frac;
  20643.         float r6c_screen_effect_desaturation_tint_r;
  20644.         float r6c_screen_effect_desaturation_tint_g;
  20645.         float r6c_screen_effect_desaturation_tint_b;
  20646.        
  20647.         // 24
  20648.        
  20649.     }r6c_screen_effect;
  20650.    
  20651.     // r6c 1-2 tpns
  20652.    
  20653. } type_meta_wphi;
  20654. // :D That's all folks!
  20655.  
  20656. #pragma mark - Halo file structs
  20657. // .. Halo file structs
  20658.  
  20659. #pragma mark -- Halo 1 PC map cache file
  20660. typedef struct
  20661. {
  20662.     char      head[4];             // 0, 4       "daeh"
  20663.     uint32_t   game_release;            // 4, 4      7 for Halo 1 PC commercial
  20664.     uint32_t   s_totaldata_decompressed;   // 8, 4       total size of this map file in bytes (for xbox files, when decompressed)
  20665.     uint8_t   pad_12[4];               // 12, 4   zero
  20666.     uint32_t   o_index;            // 16, 4   offset to the index relative to the map file's 0x0
  20667.     uint32_t   s_meta;                // 20, 4    meta data size
  20668.     uint8_t   pad_24[8];               // 24, 8   zero
  20669.     char      internal_name[32];         // 32, 32    this is interpreted as a pointer and is in big endian, but is fixed at 32 bytes as a maximum string length (31 chars + 0x00), ex. "carousel"
  20670.     char      game_build[32];           // 64, 32     also a 0x00-terminated char pointer string and fixed at 32 bytes max, "01.00.00.0564" for Halo 1 PC (specifically, Halo Mini Demo / Halo Universal Binary)
  20671.     uint16_t   map_type;               // 96, 2   0 for singleplayer, 1 for multiplayer, 2 for user interface, game crashes at one of the multiplayer map selection screens (when loading a multiplayer map, for example) with an "invalid access" sigbus kernel error if this is over 2
  20672.     uint8_t   pad_98[2];               // 98, 2   zero
  20673.     uint32_t   random_number;           // 100, 4     changing doesn't make game crash, but didn't investigate consequences
  20674.     uint8_t   pad_104[1940];            // 104, 1940   zero
  20675.     char      foot[4];             // 2044, 4     "toof"
  20676.    
  20677.     // compiled tags
  20678.    
  20679.     uint32_t*   amem_map_data_start_sbsp;   // 2048, 4    memory address for the start of the sbsp tag data in the mapfile loaded into memory starting right after the "psbs" (sbsp) string(5)
  20680.     uint8_t   pad_2052[16];         // 2052, 16   zero
  20681.     char      sbsp[4];             // 2068, 4     "psbs"
  20682.     type_meta_sbsp    *ctms_sbsp;        // 2072, ?   The compiled tag meta set of sbsp tag data (check struct format)
  20683.    
  20684.    
  20685. } type_map_h1f;
  20686.  
  20687. // if this is different...
  20688. #pragma mark -- Halo 1 CE map cache file
  20689. typedef struct
  20690. {
  20691.    
  20692. } type_map_h1c;
  20693.  
  20694. #pragma mark -- Halo 1 bitmaps.map cache file
  20695. typedef struct
  20696. {
  20697.    
  20698. } type_map_h1_bitmaps;
  20699.  
  20700. #pragma mark -- Halo 1 sounds.map cache file
  20701. typedef struct
  20702. {
  20703.    
  20704. } type_map_h1_sounds;
  20705.  
  20706. #pragma mark -- Halo 1 loc.map cache file
  20707. typedef struct
  20708. {
  20709.    
  20710. } type_map_h1_loc;
  20711.  
  20712. #pragma mark - Halo memory structs
  20713.  
  20714. typedef struct
  20715. {
  20716.     // the entire Halo PC game memory. use sparingly... and reference by pointer!
  20717. } type_mem_pc;
  20718.  
  20719. typedef struct
  20720. {
  20721.     // the entire Halo Custom Edition game memory. use sparingly... and reference by pointer!
  20722. } type_mem_ce;
  20723.  
  20724. typedef struct
  20725. {
  20726.     // entry cells within the players memory table
  20727. } type_mem_tablecell_players;
  20728.  
  20729. typedef struct
  20730. {
  20731.     // players memory table
  20732. } type_mem_table_players;
  20733.  
  20734. typedef struct
  20735. {
  20736.    
  20737. } type_mem_isocell_network_connection_details;
  20738.  
  20739. typedef struct
  20740. {
  20741.     // entries in the list of player machine connections to the server
  20742. } type_mem_tablecell_server;
  20743.  
  20744. typedef struct
  20745. {
  20746.     // addresses are for haloded.exe 1.0.10
  20747.     // 0x745B80
  20748.     uint32_t *a_extra_server_info;  // 0x745B80, network_machine_pointer (1366)
  20749.     uint16_t server_gameplay_state; // 0x745B84, network_state (1367) -- Inactive = 0, Gameplay = 1, Results = 2
  20750.     uint16_t q1;    // 0x745B86, (1368) -- example value was 6, but Halo PC dedicated server is reading 7 right now; untested
  20751.     char server_name[128];  // 0x745B88, network_name (1369) -- a null-terminated and null-padded character array, up to 63 characters available for use; you can put your server into "stealth mode" for HaloMD by appending a "\" backslash to its server name sv_name string
  20752.     uint8_t pad_0x745C08[4];    // 0x745C08, (1370) -- untested
  20753.     char loaded_internal_map_name[128]; // 0x745C0C, network_current_map (1371) -- a regular, null-terminated string, presuming 127 characters available
  20754.     char loaded_gametype_custom_name[48];   // 0x745C8C, network_current_gametype (1372 and 22) -- not reported and seemingly inconsequential, this is another null-terminated and null-padded character array, up to 23 characters available for use; only for gametypes with custom names, otherwise NULL
  20755.    
  20756.     // the next 36 bytes are not present in the Phasor code, between lines 1374 and 1375 (see line 22 instead).
  20757.     uint32_t loaded_gametype_base_type; // 0x745CBC, gametype_game (23) -- 1 = CTF, 2 = Slayer, 3 = Oddball / Juggernaut, 4 = KOTH, 5 = Race
  20758.     uint32_t loaded_gametype_teamplay;  // 0x745CC0, gametype_team_play (24) -- 0 = Off, 1 = On
  20759.     uint8_t loaded_gametype_options_bf; // 0x745CC4, (25-33) -- contains various options: bit 0 is other players on radar 0/1 OFF/ON, bit 1 is friends indicator 0/1 OFF/ON, bit 2 is infinite grenades 0/1 OFF/ON, bit 3 is shields 0/1 ON/OFF, bit 4 is invisible players 0/1 OFF/ON, bit 5 is starting equipment 0/1 CUSTOM/GENERIC, bit 6 is only friends on radar 0/1 ...OFF/ON???, bit 7 is apparently unused, always 0, probably something having to do with it actually being stored into a signed char.
  20760.     // one or more values is missing here from the Phasor code between lines 33 and 34:
  20761.     uint8_t loaded_gametype_option_q1;  // 0x745CC5 -- normally 1, but my "Improved CTF" gametype has it as 0 (didn't I modify that with 002's Flare application?)
  20762.     // two bytes of padding? check to see if these bytes are referenced in memory, or if they are only referenced from their first byte as a 32-bit value
  20763.     // so it seems that this is actually just one big fat uint32_t bitfield value! maybe! or maybe not! probably not! i apparently do not know how to tell from looking at instructions! so i'm just going to go with what it says in the Phasor document in general!
  20764.     uint8_t loaded_gametype_option_objective_indicator; // 0x745CC8, gametype_indicator (34) -- 0 = Motion Tracker, 1 = Nav Points, 2 = None
  20765.    
  20766.     float q3;   // 0x745CE0, (1375) -- apparently, always 1.0f
  20767.    
  20768.     // ... for now, I'm going to skip all this stuff and get to the contemporaneously useful stuff, down after around line 1400 in the Phasor document...
  20769.    
  20770.     type_mem_table_players connected_clients;
  20771.    
  20772.    
  20773. } type_mem_table_server;
  20774.  
  20775. typedef struct
  20776. {
  20777.    
  20778. } type_mem_tablecell_network_connections;
  20779.  
  20780. typedef struct
  20781. {
  20782.    
  20783. } type_mem_table_network_connections;
  20784.  
  20785. typedef struct
  20786. {
  20787.     // information about each player, to be collected from various places and stored into this struct and stored with a static pointer as an entry in an array (or other collection type)
  20788.     // player name, ip, port, internal player ID, and time joined (for calculating duration of stay, and perhaps a total playtime on the server)
  20789. } storage_connection_info;
  20790.  
  20791.  
  20792.  
  20793. #pragma mark - Function declarations
  20794. // II. Function declarations
  20795.  
  20796. int16_t swap_int16(int16_t val);
  20797. uint16_t swap_uint16(uint16_t val);
  20798.  
  20799. int32_t swap_int32(int32_t val);
  20800. uint32_t swap_uint32(uint32_t val);
  20801.  
  20802. int64_t swap_int64(int64_t val);
  20803. uint64_t swap_uint64(uint64_t val);
  20804.  
  20805. float float_swap(float value);
  20806.  
  20807. uint32_t grasp_uint32(char *startingbyte, char *swapoption);
  20808. float grasp_float(char *startingbyte, char *swapoption);
  20809.  
  20810. off_t fsize(const char *filename);  // requires #include <sys/stat.h>
  20811.  
  20812. float convert(float given, char *from, char *to);
  20813.  
  20814. #if apxs
  20815. char * remove_zeros(char *given, request_rec *r);   // a number formatter for displaying float values
  20816. #else
  20817. char * remove_zeros(char *given);
  20818. #endif
  20819.  
  20820. int tagclass_text_to_type(char *tagclass_string);
  20821. char * tagclass_type_to_fullstring(enum tag_class_types x);
  20822.  
  20823. int identify_file_mem(const void *data, unsigned long datasize, int endianness);
  20824.  
  20825. void * parse_h1_file(const void *data, unsigned long datasize, int datatype);   // generic file parser function: First, use fopen() and malloc() to copy file data to memory, then pass the malloc() return value as *data into this function, which then parses the binary data into one of the Halo file struct types, defined as a static struct, and returns a pointer to its address as allocated in memory (the struct's memory and all other related memory must be freed outside this function)
  20826.  
  20827. #pragma mark - Utility functions
  20828. // III. Utility functions
  20829.  
  20830. //! Byte swap short
  20831. int16_t swap_int16( int16_t val )
  20832. {
  20833.     return (val << 8) | ((val >> 8) & 0xFF);
  20834. }
  20835.  
  20836. //! Byte swap unsigned short
  20837. uint16_t swap_uint16( uint16_t val )
  20838. {
  20839.     return (val << 8) | (val >> 8 );
  20840. }
  20841.  
  20842. //! Byte swap int
  20843. int32_t swap_int32( int32_t val )
  20844. {
  20845.     val = ((val << 8) & 0xFF00FF00) | ((val >> 8) & 0xFF00FF );
  20846.     return (val << 16) | ((val >> 16) & 0xFFFF);
  20847. }
  20848.  
  20849. //! Byte swap unsigned int
  20850. uint32_t swap_uint32( uint32_t val )
  20851. {
  20852.     val = ((val << 8) & 0xFF00FF00 ) | ((val >> 8) & 0xFF00FF );
  20853.     return (val << 16) | (val >> 16);
  20854. }
  20855.  
  20856. //! Byte swap long
  20857. int64_t swap_int64( int64_t val )
  20858. {
  20859.     val = ((val << 8) & 0xFF00FF00FF00FF00ULL ) | ((val >> 8) & 0x00FF00FF00FF00FFULL );
  20860.     val = ((val << 16) & 0xFFFF0000FFFF0000ULL ) | ((val >> 16) & 0x0000FFFF0000FFFFULL );
  20861.     return (val << 32) | ((val >> 32) & 0xFFFFFFFFULL);
  20862. }
  20863.  
  20864. //! Byte swap unsigned long
  20865. uint64_t swap_uint64( uint64_t val )
  20866. {
  20867.     val = ((val << 8) & 0xFF00FF00FF00FF00ULL ) | ((val >> 8) & 0x00FF00FF00FF00FFULL );
  20868.     val = ((val << 16) & 0xFFFF0000FFFF0000ULL ) | ((val >> 16) & 0x0000FFFF0000FFFFULL );
  20869.     return (val << 32) | (val >> 32);
  20870. }
  20871.  
  20872. /*
  20873.  float float_swap(float value)
  20874.  {
  20875.  union v {float f; uint32_t i;}val;
  20876.  ((val)&value)->i = swap_uint32(val.i);
  20877.  return ((val)&value)->f;
  20878.  }
  20879.  */
  20880.  
  20881. float float_swap(float value)
  20882. {
  20883.     union onion_floatswap
  20884.     {
  20885.         float      f;
  20886.         uint32_t    i;
  20887.     };
  20888.    
  20889.     union onion_floatswap val;
  20890.    
  20891.     val.f = value;
  20892.     //val.i = htonl(val.i);
  20893.     val.i = swap_uint32(val.i);
  20894.    
  20895.     return val.f;
  20896. }
  20897.  
  20898. //#define UNION_CAST(x, destType)
  20899. //  (((union {__typeof__(x) a; destType b;})x).b)
  20900.  
  20901. uint16_t grasp_uint16(char *startingbyte, char *swapoption)
  20902. {
  20903.     char twobytes[2];
  20904.     twobytes[0] = *(startingbyte);
  20905.     twobytes[1] = *(startingbyte + 1);
  20906.    
  20907.     union onion_graspuint16
  20908.     {
  20909.         char      c[2];
  20910.         uint16_t   u;
  20911.     };
  20912.    
  20913.     union onion_graspuint16 val;
  20914.    
  20915.     val.c[0] = twobytes[0];
  20916.     val.c[1] = twobytes[1];
  20917.    
  20918.     if(strcmp(swapoption, "swap") == 0)
  20919.     {
  20920.         val.u = swap_uint16(val.u);
  20921.     }
  20922.    
  20923.     return val.u;
  20924. }
  20925.  
  20926. uint32_t grasp_uint32(char *startingbyte, char *swapoption)
  20927. {
  20928.     char fourbytes[4];
  20929.     fourbytes[0] = *(startingbyte);
  20930.     fourbytes[1] = *(startingbyte + 1);
  20931.     fourbytes[2] = *(startingbyte + 2);
  20932.     fourbytes[3] = *(startingbyte + 3);
  20933.    
  20934.     union onion_graspuint32
  20935.     {
  20936.         char      c[4];
  20937.         uint32_t   u;
  20938.     };
  20939.    
  20940.     union onion_graspuint32 val;
  20941.    
  20942.     val.c[0] = fourbytes[0];
  20943.     val.c[1] = fourbytes[1];
  20944.     val.c[2] = fourbytes[2];
  20945.     val.c[3] = fourbytes[3];
  20946.    
  20947.     if(strcmp(swapoption, "swap") == 0)
  20948.     {
  20949.         val.u = swap_uint32(val.u);
  20950.     }
  20951.    
  20952.     return val.u;
  20953. }
  20954.  
  20955. float grasp_float(char *startingbyte, char *swapoption)
  20956. {
  20957.     char fourbytes[4];
  20958.     fourbytes[0] = *(startingbyte);
  20959.     fourbytes[1] = *(startingbyte + 1);
  20960.     fourbytes[2] = *(startingbyte + 2);
  20961.     fourbytes[3] = *(startingbyte + 3);
  20962.    
  20963.     union onion_graspfloat
  20964.     {
  20965.         char      c[4];
  20966.         uint32_t   u;
  20967.         float     f;
  20968.     };
  20969.    
  20970.     union onion_graspfloat val;
  20971.    
  20972.     val.c[0] = fourbytes[0];
  20973.     val.c[1] = fourbytes[1];
  20974.     val.c[2] = fourbytes[2];
  20975.     val.c[3] = fourbytes[3];
  20976.    
  20977.     if(strcmp(swapoption, "swap") == 0)
  20978.     {
  20979.         val.u = swap_uint32(val.u);
  20980.     }
  20981.    
  20982.     return val.f;
  20983. }
  20984.  
  20985. off_t fsize(const char *filename)
  20986. {
  20987.     struct stat st;
  20988.    
  20989.     if (stat(filename, &st) == 0)
  20990.         return st.st_size;
  20991.    
  20992.     return -1;
  20993. }
  20994.  
  20995. float convert(float given, char *from, char *to)
  20996. {
  20997.     if (strcmp(from, to) == 0)
  20998.     {
  20999.         return given;
  21000.     }
  21001.     else if ((strcmp(from, "degrees") == 0) && (strcmp(to, "radians") == 0))
  21002.     {
  21003.         // degrees to radians
  21004.         return (given * (PI/180.0f));
  21005.     }
  21006.     else if ((strcmp(from, "radians") == 0) && (strcmp(to, "degrees") == 0))
  21007.     {
  21008.         // radians to degrees
  21009.         return (given * (180.0f/PI));
  21010.     }
  21011.     else if ((strcmp(from, "3ds max units") == 0) && (strcmp(to, "world units") == 0))
  21012.     {
  21013.         // 3DS Max Units to World Units
  21014.         return (given * (1.0f/100.0f));
  21015.     }
  21016.     else if ((strcmp(from, "3ds max units") == 0) && (strcmp(to, "game meters") == 0))
  21017.     {
  21018.         // 3DS Max Units to Game Meters
  21019.         return (given * (3.048f/100.0f));
  21020.     }
  21021.     else if ((strcmp(from, "world units") == 0) && (strcmp(to, "3ds max units") == 0))
  21022.     {
  21023.         // World Units to 3DS Max Units
  21024.         return (given * (100.0f/1.0f));
  21025.     }
  21026.     else if ((strcmp(from, "world units") == 0) && (strcmp(to, "game meters") == 0))
  21027.     {
  21028.         // World Units to Game Meters
  21029.         return (given * (3.048f/1.0f));
  21030.     }
  21031.     else if ((strcmp(from, "game meters") == 0) && (strcmp(to, "3ds max units") == 0))
  21032.     {
  21033.         // Game Meters to 3DS Max Units
  21034.         return (given * (100.0f/3.048f));
  21035.     }
  21036.     else if ((strcmp(from, "game meters") == 0) && (strcmp(to, "world units") == 0))
  21037.     {
  21038.         // Game Meters to World Units
  21039.         return (given * (1.0f/3.048f));
  21040.     }
  21041.     else
  21042.     {
  21043.         return given;
  21044.     }
  21045. }
  21046.  
  21047. #if apxs
  21048. char * remove_zeros(char *given, request_rec *r)
  21049. {
  21050.     char *decimal_point = strrchr(given, '.');
  21051.    
  21052.     char *removal_point = strstr(given, ".00000");
  21053.     if (removal_point)
  21054.     {
  21055.         return( apr_pstrmemdup(r->pool, given, (apr_size_t)(removal_point - given)) );
  21056.     }
  21057.     else if (decimal_point)
  21058.     {
  21059.         char *null_point = memchr(decimal_point, 0x00, 7);  // find the first null character within the first 7 bytes of the value starting at the decimal point
  21060.        
  21061.         removal_point = null_point;
  21062.        
  21063.         if ((null_point == NULL) || (null_point < decimal_point))
  21064.         {return given;}
  21065.        
  21066.         for (int x = 1;x<(null_point - decimal_point +1);x++)
  21067.         {
  21068.             if (memcmp( (null_point - x), "0", 1) == 0)
  21069.             {removal_point = null_point - x;}
  21070.             else
  21071.             {return( apr_pstrmemdup(r->pool, given, (apr_size_t)(removal_point - given)) );}
  21072.         }
  21073.     }
  21074.     else
  21075.     {
  21076.         return given;
  21077.     }
  21078.     return given;
  21079. }
  21080. #else
  21081. char * remove_zeros(char *given)    // must free() *result when done with it
  21082. {
  21083.     char *result;
  21084.    
  21085.     char *decimal_point = strrchr(given, '.');
  21086.    
  21087.     char *removal_point = strstr(given, ".00000");
  21088.     if (removal_point)  // if there already is a decimal value ".00000" in the float number text string
  21089.     {
  21090.         size_t length = (size_t)(removal_point - given);
  21091.         result = calloc(length, sizeof(char));
  21092.        
  21093.         return( strncpy(result, given, length));
  21094.     }
  21095.     else if (decimal_point) // otherwise, if there is a decimal point at all
  21096.     {
  21097.         char *null_point = memchr(decimal_point, 0x00, 7);  // find the first null character within the first 7 bytes of the value starting at the decimal point
  21098.        
  21099.         removal_point = null_point;
  21100.        
  21101.         if ((null_point == NULL) || (null_point < decimal_point))
  21102.         {return given;}
  21103.        
  21104.         for (int x = 1;x<(null_point - decimal_point +1);x++)
  21105.         {
  21106.             if (memcmp( (null_point - x), "0", 1) == 0)
  21107.             {removal_point = null_point - x;}
  21108.             else
  21109.             {
  21110.                 size_t length = (size_t)(removal_point - given);
  21111.                 result = calloc(length, sizeof(char));
  21112.                
  21113.                 return( strncpy(result, given, length));
  21114.             }
  21115.         }
  21116.     }
  21117.     else
  21118.     {
  21119.         return given;
  21120.     }
  21121.     return given;
  21122. }
  21123. #endif
  21124.  
  21125. int tagclass_text_to_type(char *tagclass_string)
  21126. {
  21127.     if (strcmp(tagclass_string,"actr") == 0)
  21128.         return actr;
  21129.     else if (strcmp(tagclass_string,"actv") == 0)
  21130.         return actv;
  21131.     else if (strcmp(tagclass_string,"ant!") == 0)
  21132.         return ant;
  21133.     else if (strcmp(tagclass_string,"antr") == 0)
  21134.         return antr;
  21135.     else if (strcmp(tagclass_string,"bipd") == 0)
  21136.         return bipd;
  21137.     else if (strcmp(tagclass_string,"bitm") == 0)
  21138.         return bitm;
  21139.     else if (strcmp(tagclass_string,"boom") == 0)
  21140.         return boom;
  21141.     else if (strcmp(tagclass_string,"cdmg") == 0)
  21142.         return cdmg;
  21143.     else if (strcmp(tagclass_string,"coll") == 0)
  21144.         return coll;
  21145.     else if (strcmp(tagclass_string,"colo") == 0)
  21146.         return colo;
  21147.     else if (strcmp(tagclass_string,"cont") == 0)
  21148.         return cont;
  21149.     else if (strcmp(tagclass_string,"ctrl") == 0)
  21150.         return ctrl;
  21151.     else if (strcmp(tagclass_string,"deca") == 0)
  21152.         return deca;
  21153.     else if (strcmp(tagclass_string,"DeLa") == 0)
  21154.         return DeLa;
  21155.     else if (strcmp(tagclass_string,"devc") == 0)
  21156.         return devc;
  21157.     else if (strcmp(tagclass_string,"devi") == 0)
  21158.         return devi;
  21159.     else if (strcmp(tagclass_string,"dobc") == 0)
  21160.         return dobc;
  21161.     else if (strcmp(tagclass_string,"effe") == 0)
  21162.         return effe;
  21163.     else if (strcmp(tagclass_string,"elec") == 0)
  21164.         return elec;
  21165.     else if (strcmp(tagclass_string,"eqip") == 0)
  21166.         return eqip;
  21167.     else if (strcmp(tagclass_string,"flag") == 0)
  21168.         return flag;
  21169.     else if (strcmp(tagclass_string,"fog ") == 0)
  21170.         return fog;
  21171.     else if (strcmp(tagclass_string,"font") == 0)
  21172.         return font;
  21173.     else if (strcmp(tagclass_string,"foot") == 0)
  21174.         return foot;
  21175.     else if (strcmp(tagclass_string,"garb") == 0)
  21176.         return garb;
  21177.     else if (strcmp(tagclass_string,"glw!") == 0)
  21178.         return glw;
  21179.     else if (strcmp(tagclass_string,"grhi") == 0)
  21180.         return grhi;
  21181.     else if (strcmp(tagclass_string,"hmt ") == 0)
  21182.         return hmt;
  21183.     else if (strcmp(tagclass_string,"hudg") == 0)
  21184.         return hudg;
  21185.     else if (strcmp(tagclass_string,"hud#") == 0)
  21186.         return hudn;
  21187.     else if (strcmp(tagclass_string,"item") == 0)
  21188.         return item;
  21189.     else if (strcmp(tagclass_string,"itmc") == 0)
  21190.         return itmc;
  21191.     else if (strcmp(tagclass_string,"jpt!") == 0)
  21192.         return jpt;
  21193.     else if (strcmp(tagclass_string,"lens") == 0)
  21194.         return lens;
  21195.     else if (strcmp(tagclass_string,"lifi") == 0)
  21196.         return lifi;
  21197.     else if (strcmp(tagclass_string,"ligh") == 0)
  21198.         return ligh;
  21199.     else if (strcmp(tagclass_string,"lsnd") == 0)
  21200.         return lsnd;
  21201.     else if (strcmp(tagclass_string,"mach") == 0)
  21202.         return mach;
  21203.     else if (strcmp(tagclass_string,"matg") == 0)
  21204.         return matg;
  21205.     else if (strcmp(tagclass_string,"metr") == 0)
  21206.         return metr;
  21207.     else if (strcmp(tagclass_string,"mgs2") == 0)
  21208.         return mgs2;
  21209.     else if (strcmp(tagclass_string,"mod2") == 0)
  21210.         return mod2;
  21211.     else if (strcmp(tagclass_string,"mode") == 0)
  21212.         return mode;
  21213.     else if (strcmp(tagclass_string,"mply") == 0)
  21214.         return mply;
  21215.     else if (strcmp(tagclass_string,"ngpr") == 0)
  21216.         return ngpr;
  21217.     else if (strcmp(tagclass_string,"obje") == 0)
  21218.         return obje;
  21219.     else if (strcmp(tagclass_string,"part") == 0)
  21220.         return part;
  21221.     else if (strcmp(tagclass_string,"pctl") == 0)
  21222.         return pctl;
  21223.     else if (strcmp(tagclass_string,"phys") == 0)
  21224.         return phys;
  21225.     else if (strcmp(tagclass_string,"plac") == 0)
  21226.         return plac;
  21227.     else if (strcmp(tagclass_string,"pphy") == 0)
  21228.         return pphy;
  21229.     else if (strcmp(tagclass_string,"proj") == 0)
  21230.         return proj;
  21231.     else if (strcmp(tagclass_string,"rain") == 0)
  21232.         return rain;
  21233.     else if (strcmp(tagclass_string,"sbsp") == 0)
  21234.         return sbsp;
  21235.     else if (strcmp(tagclass_string,"scen") == 0)
  21236.         return scen;
  21237.     else if (strcmp(tagclass_string,"scex") == 0)
  21238.         return scex;
  21239.     else if (strcmp(tagclass_string,"schi") == 0)
  21240.         return schi;
  21241.     else if (strcmp(tagclass_string,"scnr") == 0)
  21242.         return scnr;
  21243.     else if (strcmp(tagclass_string,"senv") == 0)
  21244.         return senv;
  21245.     else if (strcmp(tagclass_string,"sgla") == 0)
  21246.         return sgla;
  21247.     else if (strcmp(tagclass_string,"shdr") == 0)
  21248.         return shdr;
  21249.     else if (strcmp(tagclass_string,"sky ") == 0)
  21250.         return sky;
  21251.     else if (strcmp(tagclass_string,"smet") == 0)
  21252.         return smet;
  21253.     else if (strcmp(tagclass_string,"snd!") == 0)
  21254.         return snd;
  21255.     else if (strcmp(tagclass_string,"snde") == 0)
  21256.         return snde;
  21257.     else if (strcmp(tagclass_string,"soso") == 0)
  21258.         return soso;
  21259.     else if (strcmp(tagclass_string,"sotr") == 0)
  21260.         return sotr;
  21261.     else if (strcmp(tagclass_string,"Soul") == 0)
  21262.         return Soul;
  21263.     else if (strcmp(tagclass_string,"spla") == 0)
  21264.         return spla;
  21265.     else if (strcmp(tagclass_string,"ssce") == 0)
  21266.         return ssce;
  21267.     else if (strcmp(tagclass_string,"str#") == 0)
  21268.         return strn;
  21269.     else if (strcmp(tagclass_string,"swat") == 0)
  21270.         return swat;
  21271.     else if (strcmp(tagclass_string,"tagc") == 0)
  21272.         return tagc;
  21273.     else if (strcmp(tagclass_string,"trak") == 0)
  21274.         return trak;
  21275.     else if (strcmp(tagclass_string,"udlg") == 0)
  21276.         return udlg;
  21277.     else if (strcmp(tagclass_string,"unhi") == 0)
  21278.         return unhi;
  21279.     else if (strcmp(tagclass_string,"unit") == 0)
  21280.         return unit;
  21281.     else if (strcmp(tagclass_string,"ustr") == 0)
  21282.         return ustr;
  21283.     else if (strcmp(tagclass_string,"vcky") == 0)
  21284.         return vcky;
  21285.     else if (strcmp(tagclass_string,"vehi") == 0)
  21286.         return vehi;
  21287.     else if (strcmp(tagclass_string,"weap") == 0)
  21288.         return weap;
  21289.     else if (strcmp(tagclass_string,"wind") == 0)
  21290.         return wind;
  21291.     else if (strcmp(tagclass_string,"wphi") == 0)
  21292.         return wphi;
  21293.     else
  21294.         return 0;
  21295. }
  21296.  
  21297. char * tagclass_type_to_fullstring(enum tag_class_types x)
  21298. {
  21299.     return tag_class_names[x];
  21300. }
  21301.  
  21302. #pragma mark - Parsing functions
  21303.  
  21304. int identify_file_mem(const void *data, unsigned long datasize, int endianness)
  21305. {
  21306.     // *data is the file data previously stored into memory
  21307.     // endianness is 1 for little and 2 for big
  21308.     // return value is an int representing what kind of information data contains: -1 upon error, otherwise of enum type option_datatype.
  21309.    
  21310.    
  21311.     if (endianness == ENDIANNESS_LITTLE)   // map files, memory, (gametypes and other files?)
  21312.     {
  21313.         //memcpy(hek_header, data, sizeof(type_header));   // should copy the first 64 bytes
  21314.         //NSLog(@"%#x",hek_header->header_size);
  21315.     }
  21316.     else if ((endianness == ENDIANNESS_BIG) && (datasize >= 64))   // HEK tag files, ...
  21317.     {
  21318.         // test if it is an HEK tag file by analyzing the first 64 bytes
  21319.         type_header *hek_header = malloc(sizeof(type_header));
  21320.         if (hek_header == NULL)   // there was a problem copying the memory in the previous step!
  21321.         {
  21322.             return -1;
  21323.         }
  21324.        
  21325.         //... "grasp" each value and assign manually
  21326.         memcpy(&hek_header->pad_0, (data + 0), 36);
  21327.         memcpy(&hek_header->tagtype, (data + 36), 4);
  21328.         hek_header->random_number = grasp_uint32((char*)(data + 40), "swap");
  21329.         hek_header->header_size = grasp_uint32((char*)(data + 44), "swap");
  21330.         memcpy(&hek_header->pad_48, (data + 48), 8);
  21331.         hek_header->tag_version = grasp_uint16((char*)(data + 56), "swap");
  21332.         hek_header->engine_version = grasp_uint16((char*)(data + 58), "swap");
  21333.         memcpy(&hek_header->engine, (data + 60), 4);
  21334.         //NSLog(@"%u",hek_header->header_size);
  21335.        
  21336.         uint8_t test_pad_0[36] = { 0 };
  21337.         uint8_t test_pad_48[8] = { 0 };
  21338.        
  21339.         if ((memcmp(hek_header->pad_0, test_pad_0, 36) == 0) && (memcmp(hek_header->pad_48, test_pad_48, 8) == 0) && (strncmp(hek_header->engine, "blam", 4) == 0) && (hek_header->engine_version == 255) && (hek_header->header_size == 64))
  21340.         {
  21341.             // it appears to be an HEK tag file with a header, so determine what kind of tag class it supposedly is...
  21342.             // I'm only using the header information and the minimal file size (size of a blank tag file) to determine this right now.
  21343.             if ((strncmp(hek_header->tagtype, "actr", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 1336))
  21344.             {
  21345.                 free(hek_header);
  21346.                 return HEK_FILE_ACTR;
  21347.             }
  21348.             else if ((strncmp(hek_header->tagtype, "actv", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 632))
  21349.             {
  21350.                 free(hek_header);
  21351.                 return HEK_FILE_ACTV;
  21352.             }
  21353.             else if ((strncmp(hek_header->tagtype, "ant!", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 272))
  21354.             {
  21355.                 free(hek_header);
  21356.                 return HEK_FILE_ANT;
  21357.             }
  21358.             else if ((strncmp(hek_header->tagtype, "antr", 4) == 0) && (hek_header->tag_version == 4) && (datasize >= 192))
  21359.             {
  21360.                 free(hek_header);
  21361.                 return HEK_FILE_ANTR;
  21362.             }
  21363.             else if ((strncmp(hek_header->tagtype, "bipd", 4) == 0) && (hek_header->tag_version == 3) && (datasize >= 1332))
  21364.             {
  21365.                 free(hek_header);
  21366.                 return HEK_FILE_BIPD;
  21367.             }
  21368.             else if ((strncmp(hek_header->tagtype, "bitm", 4) == 0) && (hek_header->tag_version == 7) && (datasize >= 172))
  21369.             {
  21370.                 free(hek_header);
  21371.                 return HEK_FILE_BITM;
  21372.             }
  21373.             else if ((strncmp(hek_header->tagtype, "boom", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 68))
  21374.             {
  21375.                 free(hek_header);
  21376.                 return HEK_FILE_BOOM;
  21377.             }
  21378.             else if ((strncmp(hek_header->tagtype, "cdmg", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 576))
  21379.             {
  21380.                 free(hek_header);
  21381.                 return HEK_FILE_CDMG;
  21382.             }
  21383.             else if ((strncmp(hek_header->tagtype, "coll", 4) == 0) && (hek_header->tag_version == 10) && (datasize >= 728))
  21384.             {
  21385.                 free(hek_header);
  21386.                 return HEK_FILE_COLL;
  21387.             }
  21388.             else if ((strncmp(hek_header->tagtype, "colo", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 76))
  21389.             {
  21390.                 free(hek_header);
  21391.                 return HEK_FILE_COLO;
  21392.             }
  21393.             else if ((strncmp(hek_header->tagtype, "cont", 4) == 0) && (hek_header->tag_version == 3) && (datasize >= 388))
  21394.             {
  21395.                 free(hek_header);
  21396.                 return HEK_FILE_CONT;
  21397.             }
  21398.             else if ((strncmp(hek_header->tagtype, "ctrl", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 856))
  21399.             {
  21400.                 free(hek_header);
  21401.                 return HEK_FILE_CTRL;
  21402.             }
  21403.             else if ((strncmp(hek_header->tagtype, "deca", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 332))
  21404.             {
  21405.                 free(hek_header);
  21406.                 return HEK_FILE_DECA;
  21407.             }
  21408.             else if ((strncmp(hek_header->tagtype, "DeLa", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 1068))
  21409.             {
  21410.                 free(hek_header);
  21411.                 return HEK_FILE_DELA;
  21412.             }
  21413.             else if ((strncmp(hek_header->tagtype, "devc", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 108))
  21414.             {
  21415.                 free(hek_header);
  21416.                 return HEK_FILE_DEVC;
  21417.             }
  21418.             else if ((strncmp(hek_header->tagtype, "devi", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 340))
  21419.             {
  21420.                 free(hek_header);
  21421.                 return HEK_FILE_DEVI;
  21422.             }
  21423.             else if ((strncmp(hek_header->tagtype, "dobc", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 192))
  21424.             {
  21425.                 free(hek_header);
  21426.                 return HEK_FILE_DOBC;
  21427.             }
  21428.             else if ((strncmp(hek_header->tagtype, "effe", 4) == 0) && (hek_header->tag_version == 4) && (datasize >= 128))
  21429.             {
  21430.                 free(hek_header);
  21431.                 return HEK_FILE_EFFE;
  21432.             }
  21433.             else if ((strncmp(hek_header->tagtype, "elec", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 328))
  21434.             {
  21435.                 free(hek_header);
  21436.                 return HEK_FILE_ELEC;
  21437.             }
  21438.             else if ((strncmp(hek_header->tagtype, "eqip", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 1008))
  21439.             {
  21440.                 free(hek_header);
  21441.                 return HEK_FILE_EQIP;
  21442.             }
  21443.             else if ((strncmp(hek_header->tagtype, "flag", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 160))
  21444.             {
  21445.                 free(hek_header);
  21446.                 return HEK_FILE_FLAG;
  21447.             }
  21448.             else if ((strncmp(hek_header->tagtype, "fog ", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 460))
  21449.             {
  21450.                 free(hek_header);
  21451.                 return HEK_FILE_FOG;
  21452.             }
  21453.             else if ((strncmp(hek_header->tagtype, "font", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 220))
  21454.             {
  21455.                 free(hek_header);
  21456.                 return HEK_FILE_FONT;
  21457.             }
  21458.             else if ((strncmp(hek_header->tagtype, "foot", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 204))
  21459.             {
  21460.                 free(hek_header);
  21461.                 return HEK_FILE_FOOT;
  21462.             }
  21463.             else if ((strncmp(hek_header->tagtype, "garb", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 1008))
  21464.             {
  21465.                 free(hek_header);
  21466.                 return HEK_FILE_GARB;
  21467.             }
  21468.             else if ((strncmp(hek_header->tagtype, "glw!", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 404))
  21469.             {
  21470.                 free(hek_header);
  21471.                 return HEK_FILE_GLW;
  21472.             }
  21473.             else if ((strncmp(hek_header->tagtype, "grhi", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 568))
  21474.             {
  21475.                 free(hek_header);
  21476.                 return HEK_FILE_GRHI;
  21477.             }
  21478.             else if ((strncmp(hek_header->tagtype, "hmt ", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 193))
  21479.             {
  21480.                 free(hek_header);
  21481.                 return HEK_FILE_HMT;
  21482.             }
  21483.             else if ((strncmp(hek_header->tagtype, "hudg", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 1168))
  21484.             {
  21485.                 free(hek_header);
  21486.                 return HEK_FILE_HUDG;
  21487.             }
  21488.             else if ((strncmp(hek_header->tagtype, "hud#", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 164))
  21489.             {
  21490.                 free(hek_header);
  21491.                 return HEK_FILE_HUDN;
  21492.             }
  21493.             else if ((strncmp(hek_header->tagtype, "item", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 460))
  21494.             {
  21495.                 free(hek_header);
  21496.                 return HEK_FILE_ITEM;
  21497.             }
  21498.             else if ((strncmp(hek_header->tagtype, "itmc", 4) == 0) && (hek_header->tag_version == 0) && (datasize >= 156))
  21499.             {
  21500.                 free(hek_header);
  21501.                 return HEK_FILE_ITMC;
  21502.             }
  21503.             else if ((strncmp(hek_header->tagtype, "jpt!", 4) == 0) && (hek_header->tag_version == 6) && (datasize >= 736))
  21504.             {
  21505.                 free(hek_header);
  21506.                 return HEK_FILE_JPT;
  21507.             }
  21508.             else if ((strncmp(hek_header->tagtype, "lens", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 304))
  21509.             {
  21510.                 free(hek_header);
  21511.                 return HEK_FILE_LENS;
  21512.             }
  21513.             else if ((strncmp(hek_header->tagtype, "lifi", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 784))
  21514.             {
  21515.                 free(hek_header);
  21516.                 return HEK_FILE_LIFI;
  21517.             }
  21518.             else if ((strncmp(hek_header->tagtype, "ligh", 4) == 0) && (hek_header->tag_version == 3) && (datasize >= 416))
  21519.             {
  21520.                 free(hek_header);
  21521.                 return HEK_FILE_LIGH;
  21522.             }
  21523.             else if ((strncmp(hek_header->tagtype, "lsnd", 4) == 0) && (hek_header->tag_version == 3) && (datasize >= 148))
  21524.             {
  21525.                 free(hek_header);
  21526.                 return HEK_FILE_LSND;
  21527.             }
  21528.             else if ((strncmp(hek_header->tagtype, "mach", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 868))
  21529.             {
  21530.                 free(hek_header);
  21531.                 return HEK_FILE_MACH;
  21532.             }
  21533.             else if ((strncmp(hek_header->tagtype, "matg", 4) == 0) && (hek_header->tag_version == 3) && (datasize >= 492))
  21534.             {
  21535.                 free(hek_header);
  21536.                 return HEK_FILE_MATG;
  21537.             }
  21538.             else if ((strncmp(hek_header->tagtype, "metr", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 236))
  21539.             {
  21540.                 free(hek_header);
  21541.                 return HEK_FILE_METR;
  21542.             }
  21543.             else if ((strncmp(hek_header->tagtype, "mgs2", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 396))
  21544.             {
  21545.                 free(hek_header);
  21546.                 return HEK_FILE_MGS2;
  21547.             }
  21548.             else if ((strncmp(hek_header->tagtype, "mod2", 4) == 0) && (hek_header->tag_version == 5) && (datasize >= 296))
  21549.             {
  21550.                 free(hek_header);
  21551.                 return HEK_FILE_MOD2;
  21552.             }
  21553.             else if ((strncmp(hek_header->tagtype, "mode", 4) == 0) && (hek_header->tag_version == 4) && (datasize >= 296))
  21554.             {
  21555.                 free(hek_header);
  21556.                 return HEK_FILE_MODE;
  21557.             }
  21558.             else if ((strncmp(hek_header->tagtype, "mply", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 76))
  21559.             {
  21560.                 free(hek_header);
  21561.                 return HEK_FILE_MPLY;
  21562.             }
  21563.             else if ((strncmp(hek_header->tagtype, "ngpr", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 960))
  21564.             {
  21565.                 free(hek_header);
  21566.                 return HEK_FILE_NGPR;
  21567.             }
  21568.             else if ((strncmp(hek_header->tagtype, "obje", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 444))
  21569.             {
  21570.                 free(hek_header);
  21571.                 return HEK_FILE_OBJE;
  21572.             }
  21573.             else if ((strncmp(hek_header->tagtype, "part", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 420))
  21574.             {
  21575.                 free(hek_header);
  21576.                 return HEK_FILE_PART;
  21577.             }
  21578.             else if ((strncmp(hek_header->tagtype, "pctl", 4) == 0) && (hek_header->tag_version == 4) && (datasize >= 168))
  21579.             {
  21580.                 free(hek_header);
  21581.                 return HEK_FILE_PCTL;
  21582.             }
  21583.             else if ((strncmp(hek_header->tagtype, "phys", 4) == 0) && (hek_header->tag_version == 4) && (datasize >= 264))
  21584.             {
  21585.                 free(hek_header);
  21586.                 return HEK_FILE_PHYS;
  21587.             }
  21588.             else if ((strncmp(hek_header->tagtype, "plac", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 572))
  21589.             {
  21590.                 free(hek_header);
  21591.                 return HEK_FILE_PLAC;
  21592.             }
  21593.             else if ((strncmp(hek_header->tagtype, "pphy", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 128))
  21594.             {
  21595.                 free(hek_header);
  21596.                 return HEK_FILE_PPHY;
  21597.             }
  21598.             else if ((strncmp(hek_header->tagtype, "proj", 4) == 0) && (hek_header->tag_version == 5) && (datasize >= 652))
  21599.             {
  21600.                 free(hek_header);
  21601.                 return HEK_FILE_PROJ;
  21602.             }
  21603.             else if ((strncmp(hek_header->tagtype, "rain", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 112))
  21604.             {
  21605.                 free(hek_header);
  21606.                 return HEK_FILE_RAIN;
  21607.             }
  21608.             else if ((strncmp(hek_header->tagtype, "sbsp", 4) == 0) && (hek_header->tag_version == 5) && (datasize >= 712))
  21609.             {
  21610.                 free(hek_header);
  21611.                 return HEK_FILE_SBSP;
  21612.             }
  21613.             else if ((strncmp(hek_header->tagtype, "scen", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 572))
  21614.             {
  21615.                 free(hek_header);
  21616.                 return HEK_FILE_SCEN;
  21617.             }
  21618.             else if ((strncmp(hek_header->tagtype, "scex", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 184))
  21619.             {
  21620.                 free(hek_header);
  21621.                 return HEK_FILE_SCEX;
  21622.             }
  21623.             else if ((strncmp(hek_header->tagtype, "schi", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 172))
  21624.             {
  21625.                 free(hek_header);
  21626.                 return HEK_FILE_SCHI;
  21627.             }
  21628.             else if ((strncmp(hek_header->tagtype, "scnr", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 1520))
  21629.             {
  21630.                 free(hek_header);
  21631.                 return HEK_FILE_SCNR;
  21632.             }
  21633.             else if ((strncmp(hek_header->tagtype, "senv", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 900))
  21634.             {
  21635.                 free(hek_header);
  21636.                 return HEK_FILE_SENV;
  21637.             }
  21638.             else if ((strncmp(hek_header->tagtype, "sgla", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 544))
  21639.             {
  21640.                 free(hek_header);
  21641.                 return HEK_FILE_SGLA;
  21642.             }
  21643.             else if ((strncmp(hek_header->tagtype, "shdr", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 104))
  21644.             {
  21645.                 free(hek_header);
  21646.                 return HEK_FILE_SHDR;
  21647.             }
  21648.             else if ((strncmp(hek_header->tagtype, "sky ", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 272))
  21649.             {
  21650.                 free(hek_header);
  21651.                 return HEK_FILE_SKY;
  21652.             }
  21653.             else if ((strncmp(hek_header->tagtype, "smet", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 324))
  21654.             {
  21655.                 free(hek_header);
  21656.                 return HEK_FILE_SMET;
  21657.             }
  21658.             else if ((strncmp(hek_header->tagtype, "snd!", 4) == 0) && (hek_header->tag_version == 4) && (datasize >= 228))
  21659.             {
  21660.                 free(hek_header);
  21661.                 return HEK_FILE_SND;
  21662.             }
  21663.             else if ((strncmp(hek_header->tagtype, "snde", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 136))
  21664.             {
  21665.                 free(hek_header);
  21666.                 return HEK_FILE_SNDE;
  21667.             }
  21668.             else if ((strncmp(hek_header->tagtype, "soso", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 504))
  21669.             {
  21670.                 free(hek_header);
  21671.                 return HEK_FILE_SOSO;
  21672.             }
  21673.             else if ((strncmp(hek_header->tagtype, "sotr", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 172))
  21674.             {
  21675.                 free(hek_header);
  21676.                 return HEK_FILE_SOTR;
  21677.             }
  21678.             else if ((strncmp(hek_header->tagtype, "Soul", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 76))
  21679.             {
  21680.                 free(hek_header);
  21681.                 return HEK_FILE_SOUL;
  21682.             }
  21683.             else if ((strncmp(hek_header->tagtype, "spla", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 396))
  21684.             {
  21685.                 free(hek_header);
  21686.                 return HEK_FILE_SPLA;
  21687.             }
  21688.             else if ((strncmp(hek_header->tagtype, "ssce", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 572))
  21689.             {
  21690.                 free(hek_header);
  21691.                 return HEK_FILE_SSCE;
  21692.             }
  21693.             else if ((strncmp(hek_header->tagtype, "str#", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 76))
  21694.             {
  21695.                 free(hek_header);
  21696.                 return HEK_FILE_STRN;
  21697.             }
  21698.             else if ((strncmp(hek_header->tagtype, "swat", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 384))
  21699.             {
  21700.                 free(hek_header);
  21701.                 return HEK_FILE_SWAT;
  21702.             }
  21703.             else if ((strncmp(hek_header->tagtype, "tagc", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 76))
  21704.             {
  21705.                 free(hek_header);
  21706.                 return HEK_FILE_TAGC;
  21707.             }
  21708.             else if ((strncmp(hek_header->tagtype, "trak", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 112))
  21709.             {
  21710.                 free(hek_header);
  21711.                 return HEK_FILE_TRAK;
  21712.             }
  21713.             else if ((strncmp(hek_header->tagtype, "udlg", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 4176))
  21714.             {
  21715.                 free(hek_header);
  21716.                 return HEK_FILE_UDLG;
  21717.             }
  21718.             else if ((strncmp(hek_header->tagtype, "unhi", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 1452))
  21719.             {
  21720.                 free(hek_header);
  21721.                 return HEK_FILE_UNHI;
  21722.             }
  21723.             else if ((strncmp(hek_header->tagtype, "unit", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 436))
  21724.             {
  21725.                 free(hek_header);
  21726.                 return HEK_FILE_UNIT;
  21727.             }
  21728.             else if ((strncmp(hek_header->tagtype, "ustr", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 76))
  21729.             {
  21730.                 free(hek_header);
  21731.                 return HEK_FILE_USTR;
  21732.             }
  21733.             else if ((strncmp(hek_header->tagtype, "vcky", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 124))
  21734.             {
  21735.                 free(hek_header);
  21736.                 return HEK_FILE_VCKY;
  21737.             }
  21738.             else if ((strncmp(hek_header->tagtype, "vehi", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 1072))
  21739.             {
  21740.                 free(hek_header);
  21741.                 return HEK_FILE_VEHI;
  21742.             }
  21743.             else if ((strncmp(hek_header->tagtype, "weap", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 1352))
  21744.             {
  21745.                 free(hek_header);
  21746.                 return HEK_FILE_WEAP;
  21747.             }
  21748.             else if ((strncmp(hek_header->tagtype, "wind", 4) == 0) && (hek_header->tag_version == 1) && (datasize >= 128))
  21749.             {
  21750.                 free(hek_header);
  21751.                 return HEK_FILE_ACTR;
  21752.             }
  21753.             else if ((strncmp(hek_header->tagtype, "wphi", 4) == 0) && (hek_header->tag_version == 2) && (datasize >= 444))
  21754.             {
  21755.                 free(hek_header);
  21756.                 return HEK_FILE_WPHI;
  21757.             }
  21758.             else
  21759.             {
  21760.                 free(hek_header);
  21761.                 return DATATYPE_UNKNOWN;
  21762.             }
  21763.         }
  21764.         else
  21765.         {
  21766.             // what else is marked "big endian", besides HEK tags?
  21767.             // ...anything?
  21768.             free(hek_header);
  21769.             return DATATYPE_UNKNOWN;
  21770.         }
  21771.     }
  21772.     else
  21773.     {
  21774.         return -1;   // there was a problem with the value of endianness
  21775.     }
  21776.    
  21777.    
  21778.     return DATATYPE_UNKNOWN;   // if we reach this point in the function, then return the unknown type
  21779. }
  21780.  
  21781. void * parse_h1_file(const void *data, unsigned long datasize, int datatype)
  21782. {
  21783.     // *data is the file data previously stored into memory
  21784.     //size_t filesize = sizeof(data);
  21785.    
  21786.     // datatype is one of the values for the datatype enum
  21787.    
  21788.     // this should return a pointer to a static array that contains at [0] a pointer to the parsed data struct result, and at [1] and higher any pointers to offsets of questionable values (like improper padding); also pass in datasize like with the ID function above
  21789.    
  21790.     // to parse the entire game memory, *data should point to address 0x0, datasize is ignored, and datatype should be either MEMORY_PC or MEMORY_CE
  21791.     // to parse a specific memory table, *data should point to the start of the memory region, datasize is ignored, and datatype should be specified
  21792.     // to parse a file on disk, *data should point to the start of the file data stored into memory, and both datasize and datatype should be specified
  21793.     // specifying the datasize for a file on disk allows for easier data filtering and corruption (or encryption) checks; it just makes it easier to work with
  21794.    
  21795.     switch(datatype)
  21796.     {
  21797.         case MEMORY_PC :
  21798.         {
  21799.             // parse all the game memory into relevant structs, store pointers to the structs into a static array, then return a pointer to the static array
  21800.             break;
  21801.         }
  21802.            
  21803.         case MEMORY_PC_TABLE_SERVER :
  21804.         {
  21805.             break;
  21806.         }
  21807.            
  21808.         case MEMORY_PC_TABLE_CELL_SERVER :
  21809.         {
  21810.             break;
  21811.         }
  21812.            
  21813.         case MEMORY_PC_TABLE_NETWORK_CONNECTIONS :
  21814.         {
  21815.             break;
  21816.         }
  21817.            
  21818.         case MEMORY_PC_TABLE_CELL_NETWORK_CONNECTIONS :
  21819.         {
  21820.             break;
  21821.         }
  21822.            
  21823.         case MEMORY_PC_ISOCELL_NETWORK_CONNECTION_DETAILS :
  21824.         {
  21825.             break;
  21826.         }
  21827.            
  21828.         case MEMORY_PC_TABLE_PLAYERS :
  21829.         {
  21830.             break;
  21831.         }
  21832.            
  21833.         case MEMORY_PC_TABLE_CELL_PLAYERS :
  21834.         {
  21835.             break;
  21836.         }
  21837.            
  21838.         case MEMORY_CE :
  21839.             // do the same as with MEMORY_PC, but with Halo Custom Edition address offsets
  21840.         {
  21841.             break;
  21842.         }
  21843.            
  21844.         default :
  21845.         {
  21846.             return NULL;
  21847.         }
  21848.     }
  21849.    
  21850.     return NULL;
  21851. }
  21852.  
  21853. // "svnet_" as a prefix means the function is a server networking function intended to be run while acting as the hosting server, not while acting as a client
  21854. // "net_" is just a generic networking function name prefix, applicable while hosting or joining as a client
  21855.  
  21856. void * svnet_query_playerlist (const void *memory, int platform)
  21857. {
  21858.     // determines who is connected to our server
  21859.     // returns a pointer to a static array which contains structs with player connection information
  21860.     // this information should be updated regularly in order to identify active player connections; you should do something like repeatedly call it on a background thread or whatnot
  21861.     // use this function to keep track of connected clients for your background network data synchronizations, for example to know which IP Addresses should still be sent synchronizing UDP packets for their connection to the game
  21862.     // *memory is a pointer to the address of the Halo game's memory at 0x0
  21863.     // platform is the enum which describes what version of the Halo game is running
  21864.    
  21865.     switch (platform)
  21866.     {
  21867.         case PC_HALO_DEDICATED_110 :
  21868.         {
  21869.             //void * a = parse_h1_file(memory+0x745B80, 0, MEMORY_PC_TABLE_SERVER);
  21870.             break;
  21871.         }
  21872.            
  21873.         default :
  21874.         {
  21875.             return NULL;
  21876.         }
  21877.     }
  21878.    
  21879.    
  21880.     return NULL;
  21881. }
Add Comment
Please, Sign In to add comment