Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
HEModdingWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Sonic Frontiers/Internals/GOCRflParameter
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
'''GOCRflParameter''' located in the <code>app_cmn::rfl</code> namespace, is a simple [[Sonic Frontiers/Internals/GOComponent|GOComponent]] for storing and accessing [[Resources/Reflection|Reflection]] parameters through a [[Sonic Frontiers/Internals/Game Object|Game Object]]. == Usage == It follows the same way of creation as every other [[Sonic Frontiers/Internals/GOComponent|GOComponent]]. The struct of the SetupInfo/Description for this component is simple:<syntaxhighlight lang="cpp"> struct SetupInfo { unsigned int capacity; // The amount of parameters that are going to be used at first }; </syntaxhighlight>This leads to the setup in general being primitive, as all that's needed is to provide the amount of parameters that are gonna be stored at first.<syntaxhighlight lang="cpp"> app_cmn::rfl::GOCRflParameter::SetupInfo gocRflParamDesc{}; // Initialize the SetupInfo/Description struct gocRflParamDesc.capacity = 6; // Specify the amount of parameters that are gonna be used at first gocRflParam->Setup(gocRflParamDesc); // This sets up the GOComponent for proper usage </syntaxhighlight>Afterwards, you are able to add your [[Resources/Reflection|Reflection]] parameters.<syntaxhighlight lang="cpp"> hh::fnd::ResReflection* myRefl; // Get or create your Reflection info gocRflParam->SetParameter(myRefl, 0); // Set the Reflection info to an index, that is then going to be used to access the parameter </syntaxhighlight>To get the [[Resources/Reflection|Reflection]] parameters.<syntaxhighlight lang="cpp"> MyReflStruct* myRefl = gocRflParam->GetParameter<MyReflStruct>(0); // Get the parameter at index 0 as MyReflStruct </syntaxhighlight>
Summary:
Please note that all contributions to HEModdingWiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
HEModdingWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)