Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decode CurveData<T> with RawBuffer. #124

Merged
merged 1 commit into from
May 22, 2024
Merged

Conversation

poirierlouis
Copy link
Contributor

Include getter/setter to modify data of a CurveData.
No allocator implemented to create/destroy/resize number of points of a curve.

WIP, it needs more testing.

wopss
wopss previously approved these changes May 20, 2024
Copy link
Owner

@wopss wopss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Nothing much to add, only some QoL, but not strictly necessary.

include/RED4ext/NativeTypes.hpp Outdated Show resolved Hide resolved
include/RED4ext/NativeTypes.hpp Outdated Show resolved Hide resolved
include/RED4ext/NativeTypes.hpp Outdated Show resolved Hide resolved
@poirierlouis
Copy link
Contributor Author

Last amended commit includes [[nodiscard]].

wopss
wopss previously approved these changes May 21, 2024
Copy link
Owner

@wopss wopss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@psiberx
Copy link
Collaborator

psiberx commented May 21, 2024

  1. I'd add curve output to Reflection::Dump().
  2. If unk40 is known to be RTTI type, then it's probably a valueType or curveType. Could check the unk40->name.ToString() and rename it.

@poirierlouis
Copy link
Contributor Author

poirierlouis commented May 21, 2024

I'd add curve output to Reflection::Dump().

Is there an example about this? I have no idea how to do it/what it does.

  1. If unk40 is known to be RTTI type, then it's probably a valueType or curveType. Could check the unk40->name.ToString() and rename it.

Yes, I didn't rename it yet as it's only a guess for now. I'll test it tomorrow.

@poirierlouis
Copy link
Contributor Author

Last amended commit:

  • fix offset assertions.
  • fix constness error (GetPoints / GetValues).
  • fix arguments naming.
  • fix compilation error, with reinterpret_cast in CurveBuffer.
  • CBaseRTTIType* curveType tested with Float type.

Include getter/setter to modify data of a CurveData.
No allocator implemented to create/destroy/resize number of points of a curve.
@poirierlouis
Copy link
Contributor Author

Last amended commit rename curveType (curveData:Float) to valueType (Float) to be explicit.

@poirierlouis poirierlouis marked this pull request as ready for review May 22, 2024 12:52
@psiberx psiberx merged commit e5f9b10 into wopss:master May 22, 2024
9 checks passed
@poirierlouis poirierlouis deleted the curvedata branch May 22, 2024 17:51
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.

3 participants