-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,400 additions
and
727 deletions.
There are no files selected for viewing
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,45 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Mod | ||
{ | ||
public static class HighResolutionTime | ||
{ | ||
public static bool IsAvailable { get; private set; } | ||
|
||
[DllImport("Kernel32.dll", CallingConvention = CallingConvention.Winapi)] | ||
private static extern void GetSystemTimePreciseAsFileTime(out long filetime); | ||
|
||
public static long Time | ||
{ | ||
get | ||
{ | ||
if (!IsAvailable) | ||
{ | ||
throw new InvalidOperationException( | ||
"High resolution clock isn't available."); | ||
} | ||
|
||
long filetime; | ||
GetSystemTimePreciseAsFileTime(out filetime); | ||
|
||
return filetime; | ||
} | ||
} | ||
|
||
static HighResolutionTime() | ||
{ | ||
try | ||
{ | ||
long filetime; | ||
GetSystemTimePreciseAsFileTime(out filetime); | ||
IsAvailable = true; | ||
} | ||
catch (EntryPointNotFoundException) | ||
{ | ||
// Not running Windows 8 or higher. | ||
IsAvailable = false; | ||
} | ||
} | ||
} | ||
} |
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,58 @@ | ||
using Rewired; | ||
using System; | ||
using System.IO; | ||
|
||
namespace Mod | ||
{ | ||
|
||
[System.Serializable] | ||
public struct InputConfig | ||
{ | ||
public string up; | ||
public string down; | ||
public string left; | ||
public string right; | ||
public string jump; | ||
public string quickAttack; | ||
public string heavyAttack; | ||
public string specialAttack; | ||
public string block; | ||
public string recruit; | ||
public string start; | ||
|
||
public int[] ToKeycodeArray() | ||
{ | ||
return new int[] { | ||
ParseKeycode(up), | ||
ParseKeycode(down), | ||
ParseKeycode(left), | ||
ParseKeycode(right), | ||
ParseKeycode(start), | ||
ParseKeycode(quickAttack), | ||
ParseKeycode(heavyAttack), | ||
ParseKeycode(jump), | ||
ParseKeycode(specialAttack), | ||
ParseKeycode(block), | ||
ParseKeycode(recruit), | ||
ParseKeycode(jump), | ||
ParseKeycode(specialAttack) | ||
}; | ||
} | ||
|
||
private int ParseKeycode(string keycodeStr) | ||
{ | ||
KeyboardKeyCode keyboardKeyCode; | ||
try | ||
{ | ||
keyboardKeyCode = (KeyboardKeyCode)Enum.Parse(typeof(KeyboardKeyCode), keycodeStr); | ||
} | ||
catch (Exception e) | ||
{ | ||
File.WriteAllText(string.Format(".\\{0}.txt", keycodeStr), e.Message); | ||
keyboardKeyCode = KeyboardKeyCode.None; | ||
} | ||
return (int)keyboardKeyCode; | ||
} | ||
} | ||
|
||
} |
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,67 @@ | ||
using UnityEngine; | ||
|
||
namespace Mod | ||
{ | ||
public enum DefaultCharacters | ||
{ | ||
Misako, | ||
Kyoko, | ||
Kunio, | ||
Riki, | ||
None | ||
} | ||
|
||
[System.Serializable] | ||
public struct ModData | ||
{ | ||
public bool allowQuickSkip; | ||
public bool startFromStartMenu; | ||
public bool skipStartMenu; | ||
|
||
public string interactActionId; | ||
public InputConfig[] playerOneInputConfigs; | ||
public InputConfig[] playerTwoInputConfigs; | ||
public bool forceXInput; | ||
public bool usePS4buttonPrompts; | ||
public bool displayProgressionInfo; | ||
|
||
public int vSyncCount; | ||
public int targetFramerate; | ||
public bool useCustomFramelimiter; | ||
|
||
public bool displayDamageOnHit; | ||
public Color xpGetTextColor; | ||
public int xpGetTextFontSize; | ||
public Color hitDmgTextColor; | ||
public int hitDmgTextFontSizeMin; | ||
public int hitDmgTextFontSizeMax; | ||
|
||
public bool moreInfosInUseableShops; | ||
public bool loiterSelectedByDefault; | ||
public bool startSelectedByDefault; | ||
public bool noTutorialInNewGamePlus; | ||
public string characterByDefault; | ||
public bool displayMoveInputsInDojo; | ||
|
||
public bool unlockSecretCharactersOnceForAllSave; | ||
|
||
public bool fixBooksBug; | ||
public bool fixMaxStaminaBug; | ||
|
||
public bool activateTrainingMode; | ||
public float enemiesScalingRatio; | ||
|
||
public InputConfig GetInputConfig(int playerId) | ||
{ | ||
if (playerId == 0) | ||
{ | ||
return playerOneInputConfigs[0]; | ||
} | ||
else | ||
{ | ||
return playerTwoInputConfigs[0]; | ||
} | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.