Implement bundle properties #3

Open
opened 2023-01-06 12:49:38 +01:00 by lucas · 1 comment
Owner

The 256 bytes near the start of the bundle are actually an array of 32 IdString64s, that Fatshark calls a PropertyArray. These properties relate to file variants.

Presumably the variant bit field functions as an index into the array, and each entry in the array is the hashed name of that variant. E.g. many bundles have hashes there that map to languages like de or fr.

When building the name for a file, the variant should be used to look up the relevant bundle property, then the hash should be looked up in the dictionary.

I should probably add a separate dictionary group, as the properties are generic, and don't have to be just languages.

The 256 bytes near the start of the bundle are actually an array of 32 `IdString64`s, that Fatshark calls a `PropertyArray`. These properties relate to file variants. Presumably the `variant` bit field functions as an index into the array, and each entry in the array is the hashed name of that variant. E.g. many bundles have hashes there that map to languages like `de` or `fr`. When building the name for a file, the `variant` should be used to look up the relevant bundle property, then the hash should be looked up in the dictionary. I should probably add a separate dictionary group, as the properties are generic, and don't have to be just languages.
lucas added the
kind
enhancement
part/bundle
labels 2023-01-06 12:49:56 +01:00
lucas added reference feat/bundle_properties 2023-01-06 12:52:30 +01:00
lucas added the
crate/sdk
label 2023-01-27 16:24:29 +01:00
lucas added the
stage
design
label 2023-02-21 22:52:06 +01:00
Author
Owner

Apparently, they are shared across all bundles, even though they are written to each individual one:

  db_properties = db->properties(db);
  for ( i = 0; i < 0x20; ++i )
  {
    if ( i >= db_properties->_size )
    {
      id._id = 0i64;
      p_id = (char *)&id;
    }
    else
    {
      p_id = (char *)&db_properties->_data[i];
    }
    stingray::OutputArchive::write(&out, p_id, 8u);
  }
Apparently, they are shared across all bundles, even though they are written to each individual one: ```c db_properties = db->properties(db); for ( i = 0; i < 0x20; ++i ) { if ( i >= db_properties->_size ) { id._id = 0i64; p_id = (char *)&id; } else { p_id = (char *)&db_properties->_data[i]; } stingray::OutputArchive::write(&out, p_id, 8u); } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: bitsquid_dt/dtmt#3
No description provided.