Adds lots of stuff to Scene objects and adds Layout level staining support.#1727
Adds lots of stuff to Scene objects and adds Layout level staining support.#1727universalconquistador wants to merge 4 commits intoaers:mainfrom
Conversation
|
Field overlap detected in Common::Math::SphereBounds with field Radius |
yes thank you that's by design |
Haselnussbomber
left a comment
There was a problem hiding this comment.
Just a quick glance at it.
It would also require you to add the functions and vfuncs to the data.yml once you're good with the names.
| [MemberFunction("E8 ?? ?? ?? ?? 48 89 43 30 48 8B D7")] | ||
| public static partial BgObject* Create(byte* modelGamePath, byte* pool, BgObject* existingAllocation); |
There was a problem hiding this comment.
Using our generator will allow to pass strings directly to this method.
Since the last parameter can be optional, just default it to null here (nullptr).
| [MemberFunction("E8 ?? ?? ?? ?? 48 89 43 30 48 8B D7")] | |
| public static partial BgObject* Create(byte* modelGamePath, byte* pool, BgObject* existingAllocation); | |
| [MemberFunction("E8 ?? ?? ?? ?? 48 89 43 30 48 8B D7"), GenerateStringOverloads] | |
| public static partial BgObject* Create(CStringPointer modelGamePath, CStringPointer pool, BgObject* existingAllocation = null); |
| [MemberFunction("E8 ?? ?? ?? ?? F3 0F 10 35 ?? ?? ?? ?? 48 89 43 08")] | ||
| public static partial VfxObject* Create(byte* vfxGamePath, byte* pool); |
There was a problem hiding this comment.
| [MemberFunction("E8 ?? ?? ?? ?? F3 0F 10 35 ?? ?? ?? ?? 48 89 43 08")] | |
| public static partial VfxObject* Create(byte* vfxGamePath, byte* pool); | |
| [MemberFunction("E8 ?? ?? ?? ?? F3 0F 10 35 ?? ?? ?? ?? 48 89 43 08"), GenerateStringOverloads] | |
| public static partial VfxObject* Create(CStringPointer vfxGamePath, CStringPointer pool); |
| /// <param name="stainIndex">The object stain index to look up the color of.</param> | ||
| /// <returns>The sRGB color for the given object stain.</returns> | ||
| [MemberFunction("33 C0 81 F9 ?? ?? ?? ?? 0F 42 C1")] | ||
| public static partial ByteColor GetObjectStainColorByIndex(byte stainIndex); |
There was a problem hiding this comment.
This returns a pointer: &byte_1429A88BC.
| public static partial ByteColor GetObjectStainColorByIndex(byte stainIndex); | |
| public static partial ByteColor* GetObjectStainColorByIndex(byte stainIndex); |
| public partial bool WantToBeActive(); | ||
|
|
||
| [VirtualFunction(58)] | ||
| public partial ByteColor ApplyStain(ByteColor* stainColorSrgb); |
There was a problem hiding this comment.
Not sure that actually returns anything. Would have to look at the call sites, but it doesn't move anything into RAX register before returning.
There was a problem hiding this comment.
it does not yeah (1406dced2 and 1406e14da if you want to check call sites)
| public static partial VfxObject* Create(byte* vfxGamePath, byte* pool); | ||
|
|
||
| [MemberFunction("E8 ?? ?? ?? ?? ?? ?? ?? 8B 4A ?? 85 C9")] | ||
| public partial uint Update(float deltaSeconds, uint flags = uint.MaxValue); |
There was a problem hiding this comment.
I think "flags" is not really correct here. I don't know what it's used for, but it looks like it should be int (-1) as it checks a3 >= 0 and a2 <= 7 in the function it passes it to.
Also doesn't return anything.
Adds
Common::Math::SphereBounds,Common::Math::OrientedBounds, andCommon::Math::AxisAlignedBoundsmath types. I did not update the few places that useVector4for sphere bounds instead ofSphereBounds.Adds vfuncs for Scene object updates, computing the 3 types of bounds, hit testing, working with attach bones, and dither transparency. Also added an enum for the Dtor mode so we can standardize that a bit. Tested the 3 bounds querying (some cases are wonky e.g. characters with oriented and aligned bounds, but I believe that's a sqenix problem), both hit test methods, and dither transparency (SE only implemented it for
BgObjects). Did not test the attach bone stuff.Adds the static Create helpers for
BgObjectandVfxObject, stain support forBgObject, and some VFX fields from OGT. Tested that I can create and destroy both, and set VFX color andBgObjectstain.Adds support for staining
SharedGroupLayoutInstances and in general viaILayoutInstance.ApplyStain. I have not tested these myself.