forked from hedge-dev/HMMCodes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sonic Origins] Various Additions and Fixes (hedge-dev#107)
* [Sonic Origins] Fix Enable Lives Codes in Sonic 1 Due to an incorrect global variable offset for `game.playMode`, the Enable Lives Code behaved incorrectly in Sonic 1. This fixes the offset, as well as applying the Sonic 1/2 game check seen in the S1/S2 game option codes. * [Sonic Origins] Add GetCurrentGame() to RSDK Library * [Sonic Origins] Add GetEngineVersion() to RSDK Library * [Sonic Origins] Set LibraryInitializer attribute for RSDK Init() * [Sonic Origins] Rework GetCurrentGame() to check Data filepath I had to replace the Helpers library for Origins with a copy of the one for Forces to get this to work. I'm not sure if this would cause any issues, but it works from what I tested. Maybe this library could be reworked into a Global one? * [Sonic Origins] Include Helpers in RSDK * [Globals] Added Helpers library Revert "[Globals] Added Helpers library" This reverts commit 821fc53. [Globals] Added Helpers and StringMapOperation libraries * [Sonic Origins] Rework S1/S2 global variable codes Instead of constantly setting the S1/S2 global variables through separate codes, a bridge library is now used to handle which variables are set in an unmanaged function called when the game loads. This fixes the initial stage load issue with the shield/item codes. * [Sonic Origins] Set variable normally in Disable Super Music * [Sonic Origins] Change how GetCurrentGame() works again The function now checks the engine version like before, but still checks the data path for S1 vs S2. * [Sonic Origins] Enable Blue Sphere Options in Title Screen * [Sonic Origins] Fix GetRSDKGlobalsPtr(), remove GetRSDKGlobalsOffset() and GetRSDKGlobalsAbsPtr() * [Sonic Origins] Add PlayMode, S3KMedalMods, and S3KSecrets enums * [Sonic Origins] Enable Super Peel Out * [Sonic Origins] More Medal Mod/Secret codes * [Sonic Origins] Add GetPlayMode() to RSDK Library * Remove extra period * [Sonic Origins] Add legacy global variable structs to RSDK library I didn't add a struct for S3&K since I don't believe there's a full, updated list of the globals anywhere.
- Loading branch information
Showing
25 changed files
with
1,149 additions
and
634 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
Source/Sonic Origins/Gameplay/Sonic 3 & Knuckles/Abilities/Enable Super Dash.hmm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Code "Enable Super Dash" in "Gameplay/Sonic 3 & Knuckles/Abilities" by "MegAmi" does "Allows the player to fly and dash in any cardinal direction when in Super/Hyper form, similar to Sonic Mania's Egg Reverie Zone." | ||
// | ||
#lib "RSDK" | ||
// | ||
{ | ||
if (RSDK.GetRSDKGlobalsPtr() == 0) | ||
return; | ||
|
||
*(int*)(RSDK.GetRSDKGlobalsPtr() + 0x4C33F0) |= (int)RSDK.S3KSecret.SuperDash; | ||
} |
10 changes: 10 additions & 0 deletions
10
Source/Sonic Origins/Gameplay/Sonic 3 & Knuckles/Abilities/Sonic/Disable Drop Dash.hmm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Code "Disable Drop Dash" in "Gameplay/Sonic 3 & Knuckles/Abilities/Sonic" by "MegAmi" | ||
// | ||
#lib "RSDK" | ||
// | ||
{ | ||
if (RSDK.GetRSDKGlobalsPtr() == 0) | ||
return; | ||
|
||
*(int*)(RSDK.GetRSDKGlobalsPtr() + 0xC2CB4) |= (int)RSDK.S3KMedalMod.NoDropDash; | ||
} |
10 changes: 10 additions & 0 deletions
10
Source/Sonic Origins/Gameplay/Sonic 3 & Knuckles/Abilities/Sonic/Disable Insta-Shield.hmm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Code "Disable Insta-Shield" in "Gameplay/Sonic 3 & Knuckles/Abilities/Sonic" by "MegAmi" | ||
// | ||
#lib "RSDK" | ||
// | ||
{ | ||
if (RSDK.GetRSDKGlobalsPtr() == 0) | ||
return; | ||
|
||
*(int*)(RSDK.GetRSDKGlobalsPtr() + 0xC2CB4) &= ~(int)RSDK.S3KMedalMod.InstaShield; | ||
} |
16 changes: 16 additions & 0 deletions
16
Source/Sonic Origins/Gameplay/Sonic 3 & Knuckles/Abilities/Sonic/Enable Super Peel Out.hmm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Code "Enable Super Peel Out" in "Gameplay/Sonic 3 & Knuckles/Abilities/Sonic" by "MegAmi" does | ||
/* | ||
Enables Sonic's Super Peel Out move from Sonic CD. | ||
|
||
Notes; | ||
- Super/Hyper Sonic doesn't have an animation for the Super Peel Out, instead defaulting to his rolling animation. | ||
*/ | ||
// | ||
#lib "RSDK" | ||
// | ||
{ | ||
if (RSDK.GetRSDKGlobalsPtr() == 0) | ||
return; | ||
|
||
*(int*)(RSDK.GetRSDKGlobalsPtr() + 0xC2CB4) |= (int)RSDK.S3KMedalMod.SuperPeelOut; | ||
} |
10 changes: 10 additions & 0 deletions
10
Source/Sonic Origins/Gameplay/Sonic 3 & Knuckles/Items/Enable Banana Mode.hmm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Code "Enable Banana Mode" in "Gameplay/Sonic 3 & Knuckles/Items" by "MegAmi" does "Replaces all monitors in the stages with Banana monitors." | ||
// | ||
#lib "RSDK" | ||
// | ||
{ | ||
if (RSDK.GetRSDKGlobalsPtr() == 0) | ||
return; | ||
|
||
*(int*)(RSDK.GetRSDKGlobalsPtr() + 0x4C33F0) |= (int)RSDK.S3KSecret.BananaMode; | ||
} |
10 changes: 10 additions & 0 deletions
10
Source/Sonic Origins/Gameplay/Sonic 3 & Knuckles/Items/Enable Blue Shield Monitors.hmm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Code "Enable Blue Shield Monitors" in "Gameplay/Sonic 3 & Knuckles/Items" by "MegAmi" does "Replaces all Elemental Shield monitors with Blue Shield monitors." | ||
// | ||
#lib "RSDK" | ||
// | ||
{ | ||
if (RSDK.GetRSDKGlobalsPtr() == 0) | ||
return; | ||
|
||
*(int*)(RSDK.GetRSDKGlobalsPtr() + 0x4C33F0) |= (int)RSDK.S3KSecret.BlueShield; | ||
} |
Oops, something went wrong.