utility: Implement ParemeterBase::createByTypeName#23
utility: Implement ParemeterBase::createByTypeName#23german77 wants to merge 5 commits intoopen-ead:masterfrom
ParemeterBase::createByTypeName#23Conversation
include/utility/aglParameter.h
Outdated
| return; | ||
| this->mValue = data; | ||
| // TODO: Check this cast | ||
| this->mValue = const_cast<T*>(reinterpret_cast<const T*>(data)); |
There was a problem hiding this comment.
The inner cast can just be a static_cast, but yeah the const_cast looks a bit dodgy. Is it possible that mValue is const qualified?
There was a problem hiding this comment.
AL has almost a copy paste implementation of ParameterBase. So far mValue is only const for cstrings types.
https://github.com/MonsterDruide1/OdysseyDecomp/blob/master/lib/al/Library/Yaml/ParameterBase.h#L191
|
are you sure the hpp doesn't exist? I could be misremembering but I think it might have been done this way because of some asserts in Labo. though I guess it doesn't really matter |
|
I don't have any file info. All I can see are inlined calls and it looked really weird to have the cpp directly included in the header |
feff47b to
9a0f4e3
Compare
9a0f4e3 to
eda9251
Compare
|
I reverted the ParameterCurve changes. It makes no difference for this function, if an assert says the file is this way I have no problem with that. |
|
yeah so I've just checked Labo and it looks like the asserts for ParameterCurve are in a file called aglParameterCurve.hpp. note that it's .hpp, not .cpp, and we know Nintendo does this kind of thing as seadSafeString.h/hpp/cpp is a thing too |
1a3777b to
08d1ee6
Compare
|
The function has been matched! Please run the workflow. |
Supersedes #22 by implementing the actual function. This has the same effect as previous PR but keeps all the previous matches intact and adds 77 new matches.
This also removes a hack with ParameterCurve that for some reason was added to the header.The function itself is not matching but really close. Most differences are in
ParameterCurveandParameterBufferinitialization. The inlining here is a killer, ghidra doesn't want to assign the correct types, the branching is chaos and reading asm is not fun in a function with this size.I will keep working on it but I don't expect any significant improvements in a few weeks.
https://decomp.me/scratch/N8MEk
This change is