layout.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include <cstddef>
  3. #include <cstdint>
  4. namespace sunrise::client::content::vendors {
  5. /** Tag of the installed vendor index blob, which names every vendor definition. */
  6. inline constexpr std::uint32_t kIndexRootTag = 0x8131931DU;
  7. /** A vendor definition holds its installed array descriptor here. */
  8. inline constexpr std::size_t kInstalledArrayDescriptor = 32;
  9. /** A vendor definition holds its sale array descriptor here. */
  10. inline constexpr std::size_t kSaleArrayDescriptor = 48;
  11. /** A vendor definition holds its unnamed third array descriptor here. */
  12. inline constexpr std::size_t kThirdArrayDescriptor = 80;
  13. /** Raw reset interval. Its unit, epoch and scope are open, so it is stored unconverted. */
  14. inline constexpr std::size_t kResetIntervalOffset = 20;
  15. /** Raw reset phase, paired with the interval. */
  16. inline constexpr std::size_t kResetPhaseOffset = 24;
  17. /** Sale row price-override array descriptor, which is what the row charges. */
  18. inline constexpr std::size_t kSaleCostArrayDescriptor = 32;
  19. /** Cost item-definition index inside one price-override row. */
  20. inline constexpr std::size_t kSaleCostItemIndexOffset = 0;
  21. /** Units the price-override row charges. */
  22. inline constexpr std::size_t kSaleCostQuantityOffset = 4;
  23. /** Sale row main item-definition index. */
  24. inline constexpr std::size_t kSaleItemIndexOffset = 70;
  25. /** Sale row vendor category index. */
  26. inline constexpr std::size_t kSaleCategoryIndexOffset = 100;
  27. /** Sale row secondary item-definition index. */
  28. inline constexpr std::size_t kSaleSecondaryItemOffset = 176;
  29. /** A category row names its item by definition hash at this offset. */
  30. inline constexpr std::size_t kInstalledRowHashOffset = 0;
  31. } // namespace sunrise::client::content::vendors