Closed MegAmi24 closed 4 months ago
Sorry for the late reply, do we really need to keep Bridge.SetGlobalVariables
when RSDK.SetLegacyGlobalByName
exists?
Sorry for the late reply, do we really need to keep
Bridge.SetGlobalVariables
whenRSDK.SetLegacyGlobalByName
exists?
Simply setting the variables every frame causes issues with the shield/item related codes, as since HMM only runs its code at the end of each frame, and loading the game loads both the GameConfig and the starting scene on the same frame (there is relevant shield and monitor code that runs in ObjectStartup), the codes will not properly apply when initially loading the game from a save file or My Data.
The unmanaged function within the Bridge is ran when HE2 is setting Origins specific variables (e.g. playMode and coinMode), which fixes this issue. Since there are six codes for setting variables like this, I use a Bridge to keep things clean. Also, if it's possible, I'd eventually like to make it so codes can specify their own variables to set other than the ones currently supported in the Bridge.
Apologies if I sound impatient, but is there a reason this two month old PR hasn't been merged yet despite the changes being approved twice now? Is someone else other than SS16 supposed to approve the changes as well?
I was expecting someone else to merge it, but I can do it.
This PR removes the structs for legacy game global variables and replaces them with
GetLegacyGlobalID
,GetLegacyGlobalByName
, andSetLegacyGlobalByName
functions, similar to what's found inside RSDK itself.GetLegacyGlobalID
looks up the numerical ID of a global variable based off of its name, and the other two functions use that to get or set the value of the variable. The benefits to these functions are:The
Bridge.SetGlobalVariables
library is also updated and renamed toGameStartup
. The updated library allows codes to add their own global variables to a list that the library then uses to set those variables in-game.This PR also marks the
Enable 7th Chaos Emerald
code as experimental and adds theEnable Original Camera Tracking
code.