Skip to content

[release] v1.1.0

Compare
Choose a tag to compare
@lmichaelis lmichaelis released this 29 Jan 08:21
· 10 commits to v/1.1 since this release
87235e1

Oh boy, this is a big one! There are a lot of additions, some changes and also some deprecations here. Also, the performance of phoenix has improved quite a bit, especially interacting with VDFs and parsing worlds. We've also made the first steps to making phoenix a shared library by adding support for cmake --install (thanks @DaDummy!) which will be expanded on in the future. Another cool thing is the new, centralized documentation page for phoenix and ZenGin internals available at https://phoenix.lmichaelis.de. It's quite bare-bones still but some interesting stuff has already been moved over.

Anyway, here's the list of changes:

Bugfixes

  • [0c29d03, 6a64eee] Fix issues related to stack guards and externals.
  • [529137d] Fix incorrect parsing of animation sample rotations.
  • [1403f5e] Fix undefined behavior in trigger_mover
  • [2456b7f] Report the end of archive objects at EOF as well.

Features

  • [397bacf, 702c838, b7a650a, 6dd7fe4, 5703773, 9568b8a, db6616f, 15396f0, 63692ad, d855c16, 8932721] Add
    support for parsing save-games. This feature allows phoenix to fully parse original save-games from their directory
    structure. See save_game.hh for additional information.
  • [08bcab3] Add archive_reader::print_structure to print the contents of an archived object as XML. This is mainly
    useful for debugging, and it only works properly with ASCII and BIN_SAFE archives since BINARY archives don't contain
    field names.
  • [f789a92] Add a safer version of archive_reader::read_raw_bytes which takes the number of bytes to read as a
    parameter. This works since we normally know how many bytes to parse anyway, otherwise BINARY archives would not work.
  • [0d0f07d] archive_reader now has an API to easily check whether it's a save-game or not (archive_reader::is_save_game).
  • [3079375, b8db409] Add unstable APIs for retrieving and visiting archive entries and objects without a schema. See
    archive_reader::next and archive_reader::visit_objects for more details.
  • [a8526c3] VM external functions may now take raw instance pointers. This allows for bypassing potentially expensive
    std::shared_ptr copies.
  • [d0ad2da] The default external implementation now handles instances by pushing a null-instance instead

Changes

  • [ae77600] script::find_symbol_by_name and everywhere the script and VM require a symbol name parameter now take
    a std::string_view instead of std::string.
  • [0bfd3cf] symbol::get_string now returns a std::string_view instead of a std::string
  • [0d1b976] Indexes into script symbol values are now represented by a size_t instead of a uint8_t
  • [fd0023b] Internal Change: phoenix' tests are now much easier to identify and feature additional checks for
    VObs and different game versions
  • [c0ace3c] bsp_tree leaf polygons are now stored in a std::unordered_set instead of a std::vector for
    performance reasons. This change improves world parse times by about 6%.
  • [39319e9] If the signature of a VDF files being parsed is not recognized, phoenix now throws a vdfs_signature_error

Deprecations

  • [32770f8] way_net::waypoint(std::string const&): This is a broken and slow API which should not be used.
  • [f789a92] archive_reader::read_raw_bytes(): This API is unsafe and should no longer be used.
  • [1df2b5e] model_script::parse_binary(...): Use model_script::parse(...) instead, it now supports both binary
    and text-based scripts.
  • [30de6a4] camera_lock_mode and vob::camera_alignment: Old and incorrect names for sprite_alignment and
    vob::sprite_camera_facing_mode respectively.
  • [604b61b] vdf_entry* vdf_entry::find_child(std::string_view) & and vdf_entry* vdf_file::find_child(std::string_view) &:
    Mutating VDF entries is broken, thus these APIs should not be used. Use the const versions instead.

Performance

  • [ebb48be] messages::block_by_name now makes use of a sorted vector instead of a map lookup
  • [604b61b, 1957cbb] VDF entry lookups are now up to 90 times faster due to usage of std::set to contain the entries.
  • [ee00a03] The VM now uses a flat array as a stack instead of an actual std::stack. This eliminates unnecessary
    heap allocations during runtime and thus improves speed.
  • [f8c6935] Improve performance of buffer in general by about 20%
  • [5bf91b4] Improve archive_reader::read_object_begin performance by about 7%

Misc