Skip to content

Conversation

@Mauler125
Copy link
Collaborator

Work in progress particle system support. Currently, only the DMX parser works.
Jobs left to be done:

  • Reverse engineer 183 particle operator classes and implement deserializers for them.
  • Implement pak writer.
  • A nice bonus: allow packing from JSON (or RSON if that gets ever finished) so users can tweak values more easily.

Range interval is half open so it should be just arrayElemCount.
If target falls at the end of the range it must be dropped as well since that falls right outside the indexable items by 1.
…oluteOffset()

Fix incorrect *invalid offset (i.e. lands on pad bytes)*. We must apply the current base ontop of the field offset as the offsets in `offsetMap` are relative and `targetOffset` is absolute! This problem only existed for sub-layouts that do not start at offset 0 in the absolute root layout.
Off by one, since it indexes into the array it must be tested against modNamesCount-1.
Must be numColumns.
Always use the DataTable_ParseCellFromDocument() helper to retrieve cells, its also faster.
Use sscanf over regex since its faster and parsing vectors is too simple to justify the use of regex.
Make sure width and height aren't zero since they can be if the texture atlas is corrupt.
Do not read more than 256 chars, this can happen if this section is corrupt.
Use range scan instead of manually advancing the iterator since this turns out to be quite slow actually. Range scan is a lot faster.
BinaryIO now returns true if read and write operations were successful, false if they weren't. The size housekeeping logic has also been rewritten. If we seek forward, we will store this amount now and only add it to the total size if we end up writing something at that location. Previously it would always add to the totalSize even if we weren't writing to the seeked pos which is incorrect!
The stat func is faster but not secure as it requires another file system opening query. Use the stream itself. This isn't a major issue since the rest of the code will use the fast readily available calculated size.
Throw error if any read or write operation fails, because at that stage the file on disk or data in memory is corrupt!
If we read less than requested, we will errors anyways. So just check on good().
Just in case some compiler will complain or push garbage here.
For particle effect dictionary.
Still work in progress but its mostly done (should implement everything particle effects require).
Types for the base of particle effects, still WIP because 180 operators need to be reversed still before it can be properly finished. Currently only the parser works, pak writer hasn't been implemented yet (still work in progress).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants