Compare commits
9
Commits
e5530005a2
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c34e1a560 | ||
|
|
bfa635f781 | ||
|
|
f7f0619c39 | ||
|
|
69d6a51ad5 | ||
|
|
f83c0298ef | ||
|
|
f9c9b27e33 | ||
|
|
f8ec357c45 | ||
|
|
ec32cdcc40 | ||
|
|
570752a7a5 |
No files matched your search
+4
-1
@@ -1,5 +1,6 @@
|
||||
4J_*/x64/
|
||||
Debug/
|
||||
*Debug/
|
||||
*Release/
|
||||
ipch/
|
||||
|
||||
# Misc
|
||||
@@ -12,3 +13,5 @@ VS_*
|
||||
4J_*/Build/*
|
||||
libs/
|
||||
inc/
|
||||
*.vc*
|
||||
*.log
|
||||
+33
-4
@@ -1,6 +1,8 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "4J_Input", "4J_Input\4J_Input.vcxproj", "{A9125E77-A460-46FB-8EF3-2166F8657226}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "4J_Profile", "4J_Profile\4J_Profile.vcxproj", "{C3833C67-05E4-4D6C-8707-22F95B6939E4}"
|
||||
@@ -12,6 +14,8 @@ EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Headers", "Headers", "{1CB4373E-3F61-460C-B319-78C925BE3B8F}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Headers\extraX64.h = Headers\extraX64.h
|
||||
Headers\OrbisTypes.h = Headers\OrbisTypes.h
|
||||
Headers\PS3Types.h = Headers\PS3Types.h
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "4J_XTMS", "4J_XTMS\4J_XTMS.vcxproj", "{D0FDED0B-7704-4376-82DC-FF4377A7CD53}"
|
||||
@@ -69,10 +73,14 @@ Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Durango = Debug|Durango
|
||||
Debug|ORBIS = Debug|ORBIS
|
||||
Debug|PS3 = Debug|PS3
|
||||
Debug|Windows64 = Debug|Windows64
|
||||
Debug|Xbox 360 = Debug|Xbox 360
|
||||
Release|Durango = Release|Durango
|
||||
Release|ORBIS = Release|ORBIS
|
||||
Release|PS3 = Release|PS3
|
||||
Release|Windows64 = Release|Windows64
|
||||
Release|Xbox 360 = Release|Xbox 360
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Debug|Durango.ActiveCfg = Debug|Durango
|
||||
@@ -80,66 +88,87 @@ Global
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Debug|Durango.Deploy.0 = Debug|Durango
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Debug|ORBIS.ActiveCfg = Debug|ORBIS
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Debug|ORBIS.Build.0 = Debug|ORBIS
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Debug|PS3.ActiveCfg = Debug|PS3
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Debug|PS3.Build.0 = Debug|PS3
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Debug|Windows64.ActiveCfg = Debug|x64
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Debug|Windows64.Build.0 = Debug|x64
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Debug|Xbox 360.Build.0 = Debug|Xbox 360
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Release|Durango.ActiveCfg = Release|Durango
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Release|Durango.Build.0 = Release|Durango
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Release|Durango.Deploy.0 = Release|Durango
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Release|ORBIS.ActiveCfg = Release|ORBIS
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Release|ORBIS.Build.0 = Release|ORBIS
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Release|PS3.ActiveCfg = Release|PS3
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Release|PS3.Build.0 = Release|PS3
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Release|Windows64.ActiveCfg = Release|x64
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Release|Windows64.Build.0 = Release|x64
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
|
||||
{A9125E77-A460-46FB-8EF3-2166F8657226}.Release|Xbox 360.Build.0 = Release|Xbox 360
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|Durango.ActiveCfg = Debug|Durango
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|Durango.Build.0 = Debug|Durango
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|Durango.Deploy.0 = Debug|Durango
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|ORBIS.ActiveCfg = Debug|ORBIS
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|ORBIS.Build.0 = Debug|ORBIS
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|PS3.ActiveCfg = Debug|PS3
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|Windows64.ActiveCfg = Debug|x64
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|Windows64.Build.0 = Debug|x64
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Debug|Xbox 360.ActiveCfg = Debug|x64
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Durango.ActiveCfg = Release|Durango
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Durango.Build.0 = Release|Durango
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Durango.Deploy.0 = Release|Durango
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|ORBIS.ActiveCfg = Release|ORBIS
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|ORBIS.Build.0 = Release|ORBIS
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|PS3.ActiveCfg = Release|PS3
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Windows64.ActiveCfg = Release|x64
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Windows64.Build.0 = Release|x64
|
||||
{C3833C67-05E4-4D6C-8707-22F95B6939E4}.Release|Xbox 360.ActiveCfg = Release|x64
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Durango.ActiveCfg = Debug|Durango
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Durango.Build.0 = Debug|Durango
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Durango.Deploy.0 = Debug|Durango
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|ORBIS.ActiveCfg = Debug|ORBIS
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|ORBIS.Build.0 = Debug|ORBIS
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|PS3.ActiveCfg = Debug|PS3
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Windows64.ActiveCfg = Debug|x64
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Windows64.Build.0 = Debug|x64
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Release|Durango.ActiveCfg = Release|Durango
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Release|Durango.Build.0 = Release|Durango
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Release|Durango.Deploy.0 = Release|Durango
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Release|ORBIS.ActiveCfg = Release|ORBIS
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Release|ORBIS.Build.0 = Release|ORBIS
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Release|PS3.ActiveCfg = Release|PS3
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Release|Windows64.ActiveCfg = Release|x64
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Release|Windows64.Build.0 = Release|x64
|
||||
{22938163-5DDB-4D04-883B-07212EB99FAE}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|Durango.ActiveCfg = Debug|Durango
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|Durango.Build.0 = Debug|Durango
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|Durango.Deploy.0 = Debug|Durango
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|ORBIS.ActiveCfg = Debug|ORBIS
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|ORBIS.Build.0 = Debug|ORBIS
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|PS3.ActiveCfg = Debug|PS3
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|Windows64.ActiveCfg = Debug|x64
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|Windows64.Build.0 = Debug|x64
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Release|Durango.ActiveCfg = Release|Durango
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Release|Durango.Build.0 = Release|Durango
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Release|Durango.Deploy.0 = Release|Durango
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Release|ORBIS.ActiveCfg = Release|ORBIS
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Release|ORBIS.Build.0 = Release|ORBIS
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Release|PS3.ActiveCfg = Release|PS3
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Release|Windows64.ActiveCfg = Release|x64
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Release|Windows64.Build.0 = Release|x64
|
||||
{2E28BC2E-BF30-4C83-A4D8-C967DD409D70}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Debug|Durango.ActiveCfg = Debug|Durango
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Debug|Durango.Build.0 = Debug|Durango
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Debug|Durango.Deploy.0 = Debug|Durango
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Debug|ORBIS.ActiveCfg = Debug|ORBIS
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Debug|ORBIS.Build.0 = Debug|ORBIS
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Debug|PS3.ActiveCfg = Debug|PS3
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Debug|Windows64.ActiveCfg = Debug|x64
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Release|Durango.ActiveCfg = Release|Durango
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Release|ORBIS.ActiveCfg = Release|ORBIS
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Release|PS3.ActiveCfg = Release|PS3
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Release|Windows64.ActiveCfg = Release|x64
|
||||
{D0FDED0B-7704-4376-82DC-FF4377A7CD53}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
+745
-7
File diff suppressed because it is too large.
Load diff
@@ -303,6 +303,33 @@
|
||||
<ClInclude Include="Orbis\LinkedList.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PS3\INP_Main.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PS3\INP_MsgBox.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PS3\INP_OnScreenKeyboard.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Xbox\LinkedList.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Xbox\INP_Keyboard.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Xbox\INP_Main.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Xbox\INP_StringCheck.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Xbox\INP_ForceFeedback.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Xbox\INP_MessageUI.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Windows64\INP_ForceFeedback.cpp">
|
||||
@@ -341,5 +368,38 @@
|
||||
<ClCompile Include="Orbis\LinkedList.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PS3\INP_Main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PS3\INP_MsgBox.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PS3\4J_Input.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PS3\INP_OnScreenKeyboard.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Xbox\4J_Input.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Xbox\INP_Keyboard.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Xbox\INP_Main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Xbox\INP_StringCheck.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Xbox\LinkedList.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Xbox\INP_ForceFeedback.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Xbox\INP_MessageUI.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,167 @@
|
||||
#include "INP_Main.h"
|
||||
|
||||
#include "4J_Input.h"
|
||||
#include "INP_OnScreenKeyboard.h"
|
||||
#include "INP_MsgBox.h"
|
||||
|
||||
C_4JInput InputManager;
|
||||
|
||||
void C_4JInput::Initialise( int iInputStateC, unsigned char ucMapC,unsigned char ucActionC, unsigned char ucMenuActionC )
|
||||
{
|
||||
InternalInputManager.Initialise(iInputStateC, ucMapC, ucActionC, ucMenuActionC);
|
||||
}
|
||||
|
||||
void C_4JInput::Tick(void)
|
||||
{
|
||||
InternalInputManager.Tick();
|
||||
}
|
||||
|
||||
void C_4JInput::SetDeadzoneAndMovementRange(unsigned int uiDeadzone, unsigned int uiMovementRangeMax )
|
||||
{
|
||||
InternalInputManager.SetDeadzoneAndMovementRange(uiDeadzone, uiMovementRangeMax);
|
||||
}
|
||||
|
||||
void C_4JInput::SetGameJoypadMaps(unsigned char ucMap,unsigned char ucAction,unsigned int uiActionVal)
|
||||
{
|
||||
InternalInputManager.SetGameJoypadMaps(ucMap, ucAction, uiActionVal);
|
||||
}
|
||||
|
||||
unsigned int C_4JInput::GetGameJoypadMaps(unsigned char ucMap,unsigned char ucAction)
|
||||
{
|
||||
return InternalInputManager.GetGameJoypadMaps(ucMap, ucAction);
|
||||
}
|
||||
|
||||
void C_4JInput::SetJoypadMapVal(int iPad,unsigned char ucMap)
|
||||
{
|
||||
InternalInputManager.SetJoypadMapVal(iPad, ucMap);
|
||||
}
|
||||
|
||||
unsigned char C_4JInput::GetJoypadMapVal(int iPad)
|
||||
{
|
||||
return InternalInputManager.GetJoypadMapVal(iPad);
|
||||
}
|
||||
|
||||
void C_4JInput::SetJoypadSensitivity(int iPad, float fSensitivity)
|
||||
{
|
||||
InternalInputManager.SetJoypadSensitivity(iPad, fSensitivity);
|
||||
}
|
||||
|
||||
unsigned int C_4JInput::GetValue(int iPad,unsigned char ucAction, bool bRepeat)
|
||||
{
|
||||
return InternalInputManager.GetValue(iPad, ucAction, bRepeat);
|
||||
}
|
||||
|
||||
bool C_4JInput::ButtonPressed(int iPad,unsigned char ucAction)
|
||||
{
|
||||
return InternalInputManager.ButtonPressed(iPad, ucAction);
|
||||
}
|
||||
|
||||
bool C_4JInput::ButtonReleased(int iPad,unsigned char ucAction)
|
||||
{
|
||||
return InternalInputManager.ButtonReleased(iPad, ucAction);
|
||||
}
|
||||
|
||||
bool C_4JInput::ButtonDown(int iPad,unsigned char ucAction)
|
||||
{
|
||||
return InternalInputManager.ButtonDown(iPad, ucAction);
|
||||
}
|
||||
|
||||
void C_4JInput::SetJoypadStickAxisMap(int iPad,unsigned int uiFrom, unsigned int uiTo)
|
||||
{
|
||||
InternalInputManager.SetJoypadStickAxisMap(iPad, uiFrom, uiTo);
|
||||
}
|
||||
|
||||
void C_4JInput::SetJoypadStickTriggerMap(int iPad,unsigned int uiFrom, unsigned int uiTo)
|
||||
{
|
||||
InternalInputManager.SetJoypadStickTriggerMap(iPad, uiFrom, uiTo);
|
||||
}
|
||||
|
||||
void C_4JInput::SetKeyRepeatRate(float fRepeatDelaySecs,float fRepeatRateSecs)
|
||||
{
|
||||
InternalInputManager.SetKeyRepeatRate(fRepeatDelaySecs, fRepeatRateSecs);
|
||||
}
|
||||
|
||||
void C_4JInput::SetDebugSequence( const char *chSequenceA,int( *Func)(LPVOID),LPVOID lpParam )
|
||||
{
|
||||
InternalInputManager.SetDebugSequence(chSequenceA, Func, lpParam);
|
||||
}
|
||||
|
||||
FLOAT C_4JInput::GetIdleSeconds(int iPad)
|
||||
{
|
||||
return InternalInputManager.GetIdleSeconds(iPad);
|
||||
}
|
||||
|
||||
bool C_4JInput::IsPadConnected(int iPad)
|
||||
{
|
||||
return InternalInputManager.IsPadConnected(iPad);
|
||||
}
|
||||
|
||||
bool C_4JInput::IsCircleCrossSwapped()
|
||||
{
|
||||
return InternalInputManager.m_bSwappedEnter;
|
||||
}
|
||||
|
||||
float C_4JInput::GetJoypadStick_LX(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadStick_LX(iPad, bCheckMenuDisplay);
|
||||
}
|
||||
|
||||
float C_4JInput::GetJoypadStick_LY(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadStick_LY(iPad, bCheckMenuDisplay);
|
||||
}
|
||||
|
||||
float C_4JInput::GetJoypadStick_RX(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadStick_RX(iPad, bCheckMenuDisplay);
|
||||
}
|
||||
|
||||
float C_4JInput::GetJoypadStick_RY(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadStick_RY(iPad, bCheckMenuDisplay);
|
||||
}
|
||||
|
||||
unsigned char C_4JInput::GetJoypadLTrigger(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadLTrigger(iPad, bCheckMenuDisplay);
|
||||
}
|
||||
|
||||
unsigned char C_4JInput::GetJoypadRTrigger(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadRTrigger(iPad, bCheckMenuDisplay);
|
||||
}
|
||||
|
||||
void C_4JInput::SetMenuDisplayed(int iPad, bool bVal)
|
||||
{
|
||||
InternalInputManager.SetMenuDisplayed(iPad, bVal);
|
||||
}
|
||||
|
||||
EKeyboardResult C_4JInput::RequestKeyboard(LPCWSTR Title, LPCWSTR Text, DWORD dwPad, UINT uiMaxChars, int( *Func)(LPVOID,const bool),LPVOID lpParam,C_4JInput::EKeyboardMode eMode)
|
||||
{
|
||||
return InternalInputManager.m_Keyboard.RequestKeyboard(Title, Text, dwPad, uiMaxChars, Func, lpParam, eMode);
|
||||
}
|
||||
|
||||
void C_4JInput::DestroyKeyboard()
|
||||
{
|
||||
InternalInputManager.m_Keyboard.DestroyKeyboard();
|
||||
}
|
||||
|
||||
void C_4JInput::GetText(uint16_t *UTF16String)
|
||||
{
|
||||
InternalInputManager.m_Keyboard.GetText(UTF16String);
|
||||
}
|
||||
|
||||
void C_4JInput::SetLostInputControlCallback(void( *Func)(LPVOID, bool),LPVOID lpParam)
|
||||
{
|
||||
InternalInputManager.SetLostInputControlCallback(Func, lpParam);
|
||||
}
|
||||
|
||||
bool C_4JInput::VerifyStrings(WCHAR **pwStringA,int iStringC,int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
EMsgBoxResult C_4JInput::RequestMessageBox(EMSgBoxType eType, DWORD dwPad,void( *Func)(int iButtonType,void *pvUserData),LPVOID lpParam, const char *pchText ,unsigned int uiFocusButton )
|
||||
{
|
||||
return InternalInputManager.m_MsgBox.RequestMessageBox(eType, dwPad, Func, lpParam, pchText, uiFocusButton);
|
||||
}
|
||||
@@ -0,0 +1,907 @@
|
||||
#include "INP_Main.h"
|
||||
|
||||
CInput InternalInputManager;
|
||||
|
||||
CInput::CInput()
|
||||
{
|
||||
m_MsgBox = CMsgBox();
|
||||
m_Keyboard = CKeyboard();
|
||||
|
||||
m_uiSigninJoypadMask = 0;
|
||||
for (int i = 0; i < 4; ++i)
|
||||
m_bIsMenuDisplayed[i] = 0;
|
||||
|
||||
InitTime();
|
||||
|
||||
m_fRepeatDelaySecs = 0.5f;
|
||||
m_fRepeatRateSecs = 0.8f;
|
||||
m_sDebugSequenceName = 0;
|
||||
m_uiDebugSequenceIndex = 0;
|
||||
m_pDebugSequenceFn = 0;
|
||||
#if TO_BE_IMPLEMENTED
|
||||
*((_BYTE *)&loc_650 + this + 1) = 0;
|
||||
#endif
|
||||
m_pLostInputFn = NULL;
|
||||
m_pLostInputParam = NULL;
|
||||
}
|
||||
|
||||
CInput::~CInput()
|
||||
{
|
||||
// ~CKeyboard
|
||||
}
|
||||
|
||||
void CInput::DebugPrintf(const char *szFormat, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, szFormat);
|
||||
char buf[1024];
|
||||
vsnprintf(buf, sizeof(buf), szFormat, ap);
|
||||
va_end(ap);
|
||||
printf(buf);
|
||||
}
|
||||
|
||||
//str1k3r - Taken from Ps3Stubs.cpp
|
||||
bool CInput::QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency)
|
||||
{
|
||||
// microseconds
|
||||
lpFrequency->QuadPart = (1000 * 1000);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CInput::QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)
|
||||
{
|
||||
sys_time_sec_t sec;
|
||||
sys_time_nsec_t nsec;
|
||||
sys_time_get_current_time(&sec, &nsec);
|
||||
// microseconds
|
||||
lpPerformanceCount->QuadPart = (sec * (1000 * 1000)) + (nsec / 1000);
|
||||
return true;
|
||||
}
|
||||
|
||||
void CInput::Initialise(int iInputStateC, unsigned char ucMapC, unsigned char ucActionC, unsigned char ucMenuActionC)
|
||||
{
|
||||
assert(iInputStateC > 0);
|
||||
assert(ucMapC > 0);
|
||||
assert(ucActionC > 0);
|
||||
|
||||
int padInit = cellPadInit(MAX_JOYPADS);
|
||||
if ( padInit != CELL_PAD_OK )
|
||||
InternalInputManager.DebugPrintf("cellPadInit failed 0x%08x\n", padInit);
|
||||
|
||||
ZeroMemory(m_Joypads, sizeof(m_Joypads));
|
||||
|
||||
m_ucInputStateC = iInputStateC;
|
||||
|
||||
m_iDeadzone = 0x2;
|
||||
m_iMovementRangeMax = 0x7F;
|
||||
|
||||
m_iEffectiveRange = m_iMovementRangeMax - m_iDeadzone;
|
||||
m_fEffectiveRange = (float)m_iEffectiveRange;
|
||||
m_iHalfRange = static_cast<int>(m_iEffectiveRange * 0.75);
|
||||
|
||||
for (int i = 0; i < MAX_JOYPADS; i++)
|
||||
{
|
||||
m_Joypads[i].m_pInputStates = new CellPadData[m_ucInputStateC];
|
||||
m_Joypads[i].m_ucInputStateIndex = -1;
|
||||
m_Joypads[i].m_pfLeftThumbXAxisMap = &m_Joypads[i].m_fNormalizedLeftThumbX;
|
||||
m_Joypads[i].m_pfLeftThumbYAxisMap = &m_Joypads[i].m_fNormalizedLeftThumbY;
|
||||
m_Joypads[i].m_pfRightThumbXAxisMap = &m_Joypads[i].m_fNormalizedRightThumbX;
|
||||
m_Joypads[i].m_pfRightThumbYAxisMap = &m_Joypads[i].m_fNormalizedRightThumbY;
|
||||
m_Joypads[i].m_pucLeftTriggerAxisMap = &m_Joypads[i].m_ucLeftTriggerState;
|
||||
m_Joypads[i].m_pucRightTriggerAxisMap = &m_Joypads[i].m_ucRightTriggerState;
|
||||
m_Joypads[i].m_fSensitivity = 1.0f;
|
||||
cellPadSetPortSetting(i, 6);
|
||||
}
|
||||
|
||||
m_JoypadMap = (unsigned int **)operator new[](ucMapC * sizeof(int *));
|
||||
for (int i = 0; i < ucMapC; i++)
|
||||
{
|
||||
m_JoypadMap[i] = (unsigned int *)operator new[](ucActionC * sizeof(int));
|
||||
}
|
||||
|
||||
m_ucJoypadMapC = ucMapC;
|
||||
m_ucJoypadMapActionC = ucActionC;
|
||||
m_ucMenuActionC = ucMenuActionC;
|
||||
m_bJoypadMapArrayIsSetup = false;
|
||||
|
||||
int swappedEnter;
|
||||
cellSysutilGetSystemParamInt(CELL_SYSUTIL_SYSTEMPARAM_ID_ENTER_BUTTON_ASSIGN, &swappedEnter);
|
||||
|
||||
if ( swappedEnter )
|
||||
{
|
||||
m_bSwappedEnter = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bSwappedEnter = true;
|
||||
}
|
||||
}
|
||||
|
||||
void CInput::Tick()
|
||||
{
|
||||
UpdateJoypads();
|
||||
m_Keyboard.Tick();
|
||||
}
|
||||
|
||||
void CInput::SetJoypadValues(JOYPAD *pThisPad)
|
||||
{
|
||||
CellPadData *pGamePad = &pThisPad->m_pInputStates[pThisPad->m_ucInputStateIndex];
|
||||
|
||||
pThisPad->m_uiButtons = pThisPad->m_uiOldButtons;
|
||||
|
||||
if (pGamePad->len > 2)
|
||||
{
|
||||
pThisPad->m_uiButtons &= ~(
|
||||
_360_JOY_BUTTON_START |
|
||||
_360_JOY_BUTTON_BACK |
|
||||
_360_JOY_BUTTON_LTHUMB |
|
||||
_360_JOY_BUTTON_RTHUMB |
|
||||
_360_JOY_BUTTON_DPAD_UP |
|
||||
_360_JOY_BUTTON_DPAD_DOWN |
|
||||
_360_JOY_BUTTON_DPAD_LEFT |
|
||||
_360_JOY_BUTTON_DPAD_RIGHT
|
||||
);
|
||||
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL1] & CELL_PAD_CTRL_START) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_START;
|
||||
}
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL1] & CELL_PAD_CTRL_SELECT) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_BACK;
|
||||
}
|
||||
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL1] & CELL_PAD_CTRL_L3) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LTHUMB;
|
||||
}
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL1] & CELL_PAD_CTRL_R3) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RTHUMB;
|
||||
}
|
||||
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL1] & CELL_PAD_CTRL_UP) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_DPAD_UP;
|
||||
}
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL1] & CELL_PAD_CTRL_DOWN) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_DPAD_DOWN;
|
||||
}
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL1] & CELL_PAD_CTRL_LEFT) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_DPAD_LEFT;
|
||||
}
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL1] & CELL_PAD_CTRL_RIGHT) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_DPAD_RIGHT;
|
||||
}
|
||||
}
|
||||
|
||||
if (pGamePad->len > 3)
|
||||
{
|
||||
pThisPad->m_uiButtons &= ~(
|
||||
_360_JOY_BUTTON_RB |
|
||||
_360_JOY_BUTTON_LB |
|
||||
_360_JOY_BUTTON_RT |
|
||||
_360_JOY_BUTTON_LT |
|
||||
_360_JOY_BUTTON_A |
|
||||
_360_JOY_BUTTON_B |
|
||||
_360_JOY_BUTTON_X |
|
||||
_360_JOY_BUTTON_Y
|
||||
);
|
||||
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_R1) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RB;
|
||||
}
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_L1) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LB;
|
||||
}
|
||||
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_R2) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RT;
|
||||
}
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_L2) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LT;
|
||||
}
|
||||
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_CROSS) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_A;
|
||||
}
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_CIRCLE) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_B;
|
||||
}
|
||||
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_SQUARE) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_X;
|
||||
}
|
||||
if ((pGamePad->button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_TRIANGLE) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_Y;
|
||||
}
|
||||
}
|
||||
|
||||
if (pGamePad->len > 4)
|
||||
{
|
||||
int sThumbRX = pGamePad->button[CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_X] - 127;
|
||||
|
||||
if (sThumbRX > m_iDeadzone + m_iHalfRange)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RSTICK_RIGHT;
|
||||
}
|
||||
else if (sThumbRX < -m_iDeadzone - m_iHalfRange)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RSTICK_LEFT;
|
||||
}
|
||||
else
|
||||
{
|
||||
pThisPad->m_uiButtons &= ~(
|
||||
_360_JOY_BUTTON_RSTICK_RIGHT |
|
||||
_360_JOY_BUTTON_RSTICK_LEFT
|
||||
);
|
||||
}
|
||||
|
||||
if (sThumbRX >= -m_iDeadzone)
|
||||
{
|
||||
if (sThumbRX > m_iDeadzone)
|
||||
pThisPad->m_iRightThumbX = sThumbRX - m_iDeadzone;
|
||||
else
|
||||
pThisPad->m_iRightThumbX = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pThisPad->m_iRightThumbX = sThumbRX + m_iDeadzone;
|
||||
}
|
||||
}
|
||||
|
||||
if (pGamePad->len > 5)
|
||||
{
|
||||
int sThumbRY = 127 - pGamePad->button[CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_Y];
|
||||
|
||||
if (sThumbRY > m_iDeadzone + m_iHalfRange)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RSTICK_UP;
|
||||
}
|
||||
else if (sThumbRY < -m_iDeadzone - m_iHalfRange)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RSTICK_DOWN;
|
||||
}
|
||||
else
|
||||
{
|
||||
pThisPad->m_uiButtons &= ~(
|
||||
_360_JOY_BUTTON_RSTICK_UP |
|
||||
_360_JOY_BUTTON_RSTICK_DOWN
|
||||
);
|
||||
}
|
||||
|
||||
if (sThumbRY >= -m_iDeadzone)
|
||||
{
|
||||
if (sThumbRY > m_iDeadzone)
|
||||
pThisPad->m_iRightThumbY = sThumbRY - m_iDeadzone;
|
||||
else
|
||||
pThisPad->m_iRightThumbY = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pThisPad->m_iRightThumbY = sThumbRY + m_iDeadzone;
|
||||
}
|
||||
}
|
||||
|
||||
if (pGamePad->len > 6)
|
||||
{
|
||||
int sThumbLX = pGamePad->button[CELL_PAD_BTN_OFFSET_ANALOG_LEFT_X] - 127;
|
||||
|
||||
if (sThumbLX > m_iDeadzone + m_iHalfRange)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LSTICK_RIGHT;
|
||||
}
|
||||
else if (sThumbLX < -m_iDeadzone - m_iHalfRange)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LSTICK_LEFT;
|
||||
}
|
||||
else
|
||||
{
|
||||
pThisPad->m_uiButtons &= ~(
|
||||
_360_JOY_BUTTON_LSTICK_RIGHT |
|
||||
_360_JOY_BUTTON_LSTICK_LEFT
|
||||
);
|
||||
}
|
||||
|
||||
if (sThumbLX >= -m_iDeadzone)
|
||||
{
|
||||
if (sThumbLX > m_iDeadzone)
|
||||
pThisPad->m_iLeftThumbX = sThumbLX - m_iDeadzone;
|
||||
else
|
||||
pThisPad->m_iLeftThumbX = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pThisPad->m_iLeftThumbX = sThumbLX + m_iDeadzone;
|
||||
}
|
||||
}
|
||||
|
||||
if (pGamePad->len > 7)
|
||||
{
|
||||
int sThumbLY = 127 - pGamePad->button[CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y];
|
||||
|
||||
if (sThumbLY > m_iDeadzone + m_iHalfRange)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LSTICK_UP;
|
||||
}
|
||||
else if (sThumbLY < -m_iDeadzone - m_iHalfRange)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LSTICK_DOWN;
|
||||
}
|
||||
else
|
||||
{
|
||||
pThisPad->m_uiButtons &= ~(
|
||||
_360_JOY_BUTTON_LSTICK_UP |
|
||||
_360_JOY_BUTTON_LSTICK_DOWN
|
||||
);
|
||||
}
|
||||
|
||||
if (sThumbLY >= -m_iDeadzone)
|
||||
{
|
||||
if (sThumbLY > m_iDeadzone)
|
||||
pThisPad->m_iLeftThumbY = sThumbLY - m_iDeadzone;
|
||||
else
|
||||
pThisPad->m_iLeftThumbY = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pThisPad->m_iLeftThumbY = sThumbLY + m_iDeadzone;
|
||||
}
|
||||
}
|
||||
|
||||
if (pGamePad->len > 18)
|
||||
{
|
||||
pThisPad->m_ucLeftTriggerState = pGamePad->button[CELL_PAD_BTN_OFFSET_PRESS_L2];
|
||||
}
|
||||
|
||||
if (pGamePad->len > 19)
|
||||
{
|
||||
pThisPad->m_ucRightTriggerState = pGamePad->button[CELL_PAD_BTN_OFFSET_PRESS_R2];
|
||||
}
|
||||
|
||||
pThisPad->m_iNormalizedLeftThumbX = pThisPad->m_iLeftThumbX / m_iEffectiveRange;
|
||||
pThisPad->m_iNormalizedLeftThumbY = pThisPad->m_iLeftThumbY / m_iEffectiveRange;
|
||||
pThisPad->m_iNormalizedRightThumbX = pThisPad->m_iRightThumbX / m_iEffectiveRange;
|
||||
pThisPad->m_iNormalizedRightThumbY = pThisPad->m_iRightThumbY / m_iEffectiveRange;
|
||||
|
||||
pThisPad->m_fNormalizedLeftThumbX = pThisPad->m_iLeftThumbX / m_fEffectiveRange;
|
||||
pThisPad->m_fNormalizedLeftThumbY = pThisPad->m_iLeftThumbY / m_fEffectiveRange;
|
||||
pThisPad->m_fNormalizedRightThumbX = pThisPad->m_iRightThumbX / m_fEffectiveRange;
|
||||
pThisPad->m_fNormalizedRightThumbY = pThisPad->m_iRightThumbY / m_fEffectiveRange;
|
||||
}
|
||||
|
||||
void CInput::SetDeadzoneAndMovementRange(unsigned int uiDeadzone, unsigned int uiMovementRangeMax)
|
||||
{
|
||||
m_iDeadzone = uiDeadzone;
|
||||
m_iMovementRangeMax = uiMovementRangeMax;
|
||||
m_iEffectiveRange = uiMovementRangeMax - uiDeadzone;
|
||||
}
|
||||
|
||||
void CInput::SetJoypadSensitivity(int iPad, float fSensitivity)
|
||||
{
|
||||
m_Joypads[iPad].m_fSensitivity = fSensitivity;
|
||||
}
|
||||
|
||||
void CInput::SetGameJoypadMaps(unsigned char ucMap, unsigned char ucAction, unsigned int uiActionVal)
|
||||
{
|
||||
assert(ucMap < m_ucJoypadMapC);
|
||||
assert(ucAction < m_ucJoypadMapActionC);
|
||||
|
||||
m_JoypadMap[ucMap][ucAction] = uiActionVal;
|
||||
}
|
||||
|
||||
unsigned int CInput::GetGameJoypadMaps(unsigned char ucMap, unsigned char ucAction)
|
||||
{
|
||||
assert(ucMap < m_ucJoypadMapC);
|
||||
assert(ucAction < m_ucJoypadMapActionC);
|
||||
|
||||
return m_JoypadMap[ucMap][ucAction];
|
||||
}
|
||||
|
||||
void CInput::SetJoypadMapVal(int iPad, unsigned char ucMap)
|
||||
{
|
||||
m_bJoypadMapArrayIsSetup = true;
|
||||
m_Joypads[iPad].m_ucMappingValue = ucMap;
|
||||
}
|
||||
|
||||
unsigned char CInput::GetJoypadMapVal(int iPad)
|
||||
{
|
||||
return m_Joypads[iPad].m_ucMappingValue;
|
||||
}
|
||||
|
||||
void CInput::SetJoypadStickAxisMap(int iPad, unsigned int uiFrom, unsigned int uiTo)
|
||||
{
|
||||
float *pfTo = NULL;
|
||||
|
||||
switch (uiTo)
|
||||
{
|
||||
case AXIS_MAP_LX:
|
||||
pfTo = &m_Joypads[iPad].m_fNormalizedLeftThumbX;
|
||||
break;
|
||||
case AXIS_MAP_LY:
|
||||
pfTo = &m_Joypads[iPad].m_fNormalizedLeftThumbY;
|
||||
break;
|
||||
case AXIS_MAP_RX:
|
||||
pfTo = &m_Joypads[iPad].m_fNormalizedRightThumbX;
|
||||
break;
|
||||
case AXIS_MAP_RY:
|
||||
pfTo = &m_Joypads[iPad].m_fNormalizedRightThumbY;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (uiFrom)
|
||||
{
|
||||
case AXIS_MAP_LX:
|
||||
m_Joypads[iPad].m_pfLeftThumbXAxisMap = pfTo;
|
||||
break;
|
||||
case AXIS_MAP_LY:
|
||||
m_Joypads[iPad].m_pfLeftThumbYAxisMap = pfTo;
|
||||
break;
|
||||
case AXIS_MAP_RX:
|
||||
m_Joypads[iPad].m_pfRightThumbXAxisMap = pfTo;
|
||||
break;
|
||||
case AXIS_MAP_RY:
|
||||
m_Joypads[iPad].m_pfRightThumbYAxisMap = pfTo;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CInput::SetJoypadStickTriggerMap(int iPad, unsigned int uiFrom, unsigned int uiTo)
|
||||
{
|
||||
unsigned char *pucTo = NULL;
|
||||
|
||||
switch (uiTo)
|
||||
{
|
||||
case TRIGGER_MAP_0:
|
||||
pucTo = &m_Joypads[iPad].m_ucRightTriggerState;
|
||||
break;
|
||||
case TRIGGER_MAP_1:
|
||||
pucTo = &m_Joypads[iPad].m_ucLeftTriggerState;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (uiFrom)
|
||||
{
|
||||
case TRIGGER_MAP_0:
|
||||
m_Joypads[iPad].m_pucRightTriggerAxisMap = pucTo;
|
||||
break;
|
||||
case TRIGGER_MAP_1:
|
||||
m_Joypads[iPad].m_pucLeftTriggerAxisMap = pucTo;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool CInput::IsPadConnected(int iPad)
|
||||
{
|
||||
return m_Joypads[iPad].m_bIsConnected;
|
||||
}
|
||||
|
||||
void CInput::SetSigninJoypadMask(unsigned int mask)
|
||||
{
|
||||
m_uiSigninJoypadMask = mask;
|
||||
}
|
||||
|
||||
unsigned int CInput::GetValue(int iPad, unsigned char ucAction, bool bRepeat)
|
||||
{
|
||||
if (m_bIsMenuDisplayed[iPad] && ucAction > this->m_ucMenuActionC)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned char ucMap = this->m_Joypads[iPad].m_ucMappingValue;
|
||||
unsigned int uiVal = this->m_JoypadMap[ucMap][ucAction] & this->m_Joypads[iPad].m_uiButtons;
|
||||
if (!uiVal || !bRepeat)
|
||||
{
|
||||
return uiVal;
|
||||
}
|
||||
|
||||
int iKeyVal = 0;
|
||||
for (int iKey = this->m_JoypadMap[ucMap][ucAction]; (iKey & 1) == 0; iKey >>= 1)
|
||||
{
|
||||
iKeyVal++;
|
||||
}
|
||||
|
||||
if (m_fRepeatDelaySecs <= m_Timers[iPad][iKeyVal].m_fTotalHoldTime || m_Timers[iPad][iKeyVal].m_bInitialPressHandled)
|
||||
{
|
||||
if (m_Timers[iPad][iKeyVal].m_fTotalHoldTime < m_fRepeatDelaySecs)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (m_Timers[iPad][iKeyVal].m_fLastRepeatTime == 0.0f)
|
||||
{
|
||||
m_Timers[iPad][iKeyVal].m_fLastRepeatTime = m_fRepeatDelaySecs;
|
||||
return uiVal;
|
||||
}
|
||||
else if ((m_Timers[iPad][iKeyVal].m_fTotalHoldTime - m_Timers[iPad][iKeyVal].m_fLastRepeatTime) <= m_fRepeatRateSecs)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Timers[iPad][iKeyVal].m_fLastRepeatTime = m_Timers[iPad][iKeyVal].m_fLastRepeatTime + m_fRepeatRateSecs;
|
||||
return uiVal;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Timers[iPad][iKeyVal].m_bInitialPressHandled = true;
|
||||
return uiVal;
|
||||
}
|
||||
}
|
||||
|
||||
bool CInput::IsSet(int iPad, unsigned char ucAction)
|
||||
{
|
||||
return (!m_bIsMenuDisplayed[iPad] || ucAction <= m_ucMenuActionC) &&
|
||||
(m_JoypadMap[m_Joypads[iPad].m_ucMappingValue][ucAction] & m_Joypads[iPad].m_uiButtons) != 0;
|
||||
}
|
||||
|
||||
bool CInput::ButtonPressed(int iPad, unsigned char ucAction)
|
||||
{
|
||||
if (ucAction == 255)
|
||||
{
|
||||
return m_Joypads[iPad].m_uiButtonsPressed != 0;
|
||||
}
|
||||
|
||||
if (m_bIsMenuDisplayed[iPad] && ucAction > m_ucMenuActionC)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (m_JoypadMap[m_Joypads[iPad].m_ucMappingValue][ucAction] & m_Joypads[iPad].m_uiButtonsPressed) != 0;
|
||||
}
|
||||
|
||||
bool CInput::ButtonReleased(int iPad, unsigned char ucAction)
|
||||
{
|
||||
return (!m_bIsMenuDisplayed[iPad] || ucAction <= m_ucMenuActionC) &&
|
||||
(m_JoypadMap[m_Joypads[iPad].m_ucMappingValue][ucAction] & m_Joypads[iPad].m_uiButtonsReleased) != 0;
|
||||
}
|
||||
|
||||
bool CInput::ButtonDown(int iPad, unsigned char ucAction)
|
||||
{
|
||||
if (ucAction == 255)
|
||||
{
|
||||
return m_Joypads[iPad].m_uiButtons != 0;
|
||||
}
|
||||
|
||||
if (m_bIsMenuDisplayed[iPad] && ucAction > m_ucMenuActionC)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (m_JoypadMap[m_Joypads[iPad].m_ucMappingValue][ucAction] & m_Joypads[iPad].m_uiButtons) != 0;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_Menu_LX(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_iNormalizedLeftThumbX;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_Menu_LY(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_iNormalizedLeftThumbY;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_Menu_RX(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_iNormalizedRightThumbX;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_Menu_RY(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_iNormalizedRightThumbY;
|
||||
}
|
||||
|
||||
unsigned char CInput::GetJoypadLTrigger_Menu(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_ucLeftTriggerState;
|
||||
}
|
||||
|
||||
unsigned char CInput::GetJoypadRTrigger_Menu(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_ucRightTriggerState;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_LX(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
if (bCheckMenuDisplay && m_bIsMenuDisplayed[iPad])
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return *m_Joypads[iPad].m_pfLeftThumbXAxisMap * m_Joypads[iPad].m_fSensitivity;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_LY(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
if (bCheckMenuDisplay && m_bIsMenuDisplayed[iPad])
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return *m_Joypads[iPad].m_pfLeftThumbYAxisMap * m_Joypads[iPad].m_fSensitivity;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_RX(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
if (bCheckMenuDisplay && m_bIsMenuDisplayed[iPad])
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return *m_Joypads[iPad].m_pfRightThumbXAxisMap * m_Joypads[iPad].m_fSensitivity;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_RY(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
if (bCheckMenuDisplay && m_bIsMenuDisplayed[iPad])
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return *m_Joypads[iPad].m_pfRightThumbYAxisMap * m_Joypads[iPad].m_fSensitivity;
|
||||
}
|
||||
|
||||
unsigned char CInput::GetJoypadLTrigger(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
if (bCheckMenuDisplay && m_bIsMenuDisplayed[iPad])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return *m_Joypads[iPad].m_pucLeftTriggerAxisMap;
|
||||
}
|
||||
|
||||
unsigned char CInput::GetJoypadRTrigger(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
if (bCheckMenuDisplay && m_bIsMenuDisplayed[iPad])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return *m_Joypads[iPad].m_pucRightTriggerAxisMap;
|
||||
}
|
||||
|
||||
void CInput::SetMenuDisplayed(int iPad, bool bVal)
|
||||
{
|
||||
m_bIsMenuDisplayed[iPad] = bVal;
|
||||
}
|
||||
|
||||
void CInput::SetKeyRepeatRate(float fRepeatDelaySecs, float fRepeatRateSecs)
|
||||
{
|
||||
m_fRepeatDelaySecs = fRepeatDelaySecs;
|
||||
m_fRepeatRateSecs = fRepeatRateSecs;
|
||||
}
|
||||
|
||||
void CInput::SetDebugSequence(const char *chSequenceA, int (*Func)(LPVOID), LPVOID lpParam)
|
||||
{
|
||||
int iLen = strlen(chSequenceA);
|
||||
|
||||
m_sDebugSequenceName = (char *)operator new[](iLen);
|
||||
strcpy(m_sDebugSequenceName, chSequenceA);
|
||||
|
||||
m_pDebugSequenceFn = Func;
|
||||
m_pDebugSequenceParam = lpParam;
|
||||
}
|
||||
|
||||
FLOAT CInput::GetIdleSeconds(int iPad)
|
||||
{
|
||||
LARGE_INTEGER qwDeltaTime;
|
||||
QueryPerformanceCounter(&qwDeltaTime);
|
||||
|
||||
LARGE_INTEGER fElapsedTime = this->m_LastActivityTime[iPad];
|
||||
|
||||
return this->m_fTickToSeconds * (qwDeltaTime.LowPart - fElapsedTime.LowPart);
|
||||
}
|
||||
|
||||
void CInput::SetLostInputControlCallback(void( *Func)(LPVOID, bool),LPVOID lpParam)
|
||||
{
|
||||
m_pLostInputFn = Func;
|
||||
m_pLostInputParam = lpParam;
|
||||
}
|
||||
|
||||
bool CInput::UpdateJoypads()
|
||||
{
|
||||
assert(m_bJoypadMapArrayIsSetup);
|
||||
|
||||
for (int i = 0; i < MAX_JOYPADS; i++)
|
||||
{
|
||||
JOYPAD *pThisPad = &m_Joypads[i];
|
||||
|
||||
pThisPad->m_uiOldButtons = pThisPad->m_uiButtons;
|
||||
pThisPad->m_uiButtons = 0;
|
||||
pThisPad->m_ucLeftTriggerState = 0;
|
||||
pThisPad->m_ucRightTriggerState = 0;
|
||||
}
|
||||
|
||||
CellPadInfo2 info;
|
||||
int32_t getInfo2 = cellPadGetInfo2(&info);
|
||||
if ( getInfo2 != CELL_PAD_OK )
|
||||
InternalInputManager.DebugPrintf("cellPadGetInfo2 failed 0x%08x\n", getInfo2);
|
||||
|
||||
for (int i = 0; i < MAX_JOYPADS; i++)
|
||||
{
|
||||
if (!m_Joypads[i].m_bIsDisabled)
|
||||
{
|
||||
JOYPAD *pThisPad = &m_Joypads[i];
|
||||
|
||||
bool bOldIsConnected = pThisPad->m_bIsConnected;
|
||||
|
||||
pThisPad->m_ucInputStateIndex = pThisPad->m_ucInputStateIndex++;
|
||||
if (pThisPad->m_ucInputStateIndex == m_ucInputStateC)
|
||||
{
|
||||
pThisPad->m_ucInputStateIndex = 0;
|
||||
}
|
||||
|
||||
pThisPad->m_bIsConnected = info.port_status[i] & CELL_PAD_STATUS_CONNECTED;
|
||||
|
||||
if ( (info.system_info & CELL_PAD_INFO_INTERCEPTED) != 0)
|
||||
{
|
||||
if (!m_bLostInput)
|
||||
{
|
||||
m_bLostInput = true;
|
||||
if ( m_pLostInputFn )
|
||||
m_pLostInputFn(m_pLostInputParam, true);
|
||||
}
|
||||
}
|
||||
else if ( m_bLostInput )
|
||||
{
|
||||
m_bLostInput = false;
|
||||
if ( m_pLostInputFn )
|
||||
m_pLostInputFn(m_pLostInputParam, false);
|
||||
}
|
||||
|
||||
if (pThisPad->m_bIsConnected)
|
||||
{
|
||||
int32_t getData = cellPadGetData(i, &pThisPad->m_pInputStates[pThisPad->m_ucInputStateIndex]);
|
||||
if ( getData != CELL_PAD_OK )
|
||||
InternalInputManager.DebugPrintf("cellPadGetData failed 0x%08x\n", getData);
|
||||
}
|
||||
|
||||
bool bWasConnected = bOldIsConnected && !pThisPad->m_bIsConnected;
|
||||
pThisPad->m_bWasConnected = bWasConnected;
|
||||
|
||||
bool bHasConnected = !bOldIsConnected && pThisPad->m_bIsConnected;
|
||||
pThisPad->m_bHasConnected = bHasConnected;
|
||||
|
||||
if (pThisPad->m_bIsConnected)
|
||||
{
|
||||
SetJoypadValues(pThisPad);
|
||||
|
||||
pThisPad->m_uiButtonsPressed = ~pThisPad->m_uiOldButtons & pThisPad->m_uiButtons;
|
||||
pThisPad->m_uiButtonsReleased = ~pThisPad->m_uiButtons & pThisPad->m_uiOldButtons;
|
||||
|
||||
for (int bit = 0; bit < 24; ++bit)
|
||||
{
|
||||
if ((pThisPad->m_uiButtonsPressed & (1 << bit)) != 0)
|
||||
{
|
||||
GetStartTime(i, bit);
|
||||
}
|
||||
else if ((pThisPad->m_uiButtons & (1 << bit)) != 0)
|
||||
{
|
||||
UpdateTime(i, bit);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pThisPad->m_bWasConnected)
|
||||
{
|
||||
ClearJoypadValues(pThisPad);
|
||||
}
|
||||
|
||||
if (m_pDebugSequenceFn && (pThisPad->m_uiButtonsPressed & (_360_JOY_BUTTON_A | _360_JOY_BUTTON_B | _360_JOY_BUTTON_X | _360_JOY_BUTTON_Y |
|
||||
_360_JOY_BUTTON_RB | _360_JOY_BUTTON_LB)) != 0)
|
||||
{
|
||||
char chSeq;
|
||||
|
||||
if ((pThisPad->m_uiButtonsPressed & _360_JOY_BUTTON_A) == _360_JOY_BUTTON_A)
|
||||
{
|
||||
chSeq = 'A';
|
||||
}
|
||||
else if ((pThisPad->m_uiButtonsPressed & _360_JOY_BUTTON_B) == _360_JOY_BUTTON_B)
|
||||
{
|
||||
chSeq = 'B';
|
||||
}
|
||||
else if ((pThisPad->m_uiButtonsPressed & _360_JOY_BUTTON_X) == _360_JOY_BUTTON_X)
|
||||
{
|
||||
chSeq = 'X';
|
||||
}
|
||||
else if ((pThisPad->m_uiButtonsPressed & _360_JOY_BUTTON_Y) == _360_JOY_BUTTON_Y)
|
||||
{
|
||||
chSeq = 'Y';
|
||||
}
|
||||
else if ((pThisPad->m_uiButtonsPressed & _360_JOY_BUTTON_LB) == _360_JOY_BUTTON_LB)
|
||||
{
|
||||
chSeq = 'L';
|
||||
}
|
||||
else if ((pThisPad->m_uiButtonsPressed & _360_JOY_BUTTON_RB) == _360_JOY_BUTTON_RB)
|
||||
{
|
||||
chSeq = 'R';
|
||||
}
|
||||
|
||||
if (m_sDebugSequenceName[m_uiDebugSequenceIndex] == chSeq)
|
||||
{
|
||||
if (!m_sDebugSequenceName[m_uiDebugSequenceIndex++])
|
||||
{
|
||||
m_uiDebugSequenceIndex = 0;
|
||||
(m_pDebugSequenceFn)(m_pDebugSequenceParam);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_uiDebugSequenceIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CInput::ClearJoypadValues(JOYPAD *pThisPad)
|
||||
{
|
||||
pThisPad->m_uiButtonsPressed = 0;
|
||||
pThisPad->m_uiButtonsReleased = 0;
|
||||
pThisPad->m_uiButtons = 0;
|
||||
pThisPad->m_ucLeftTriggerState = 0;
|
||||
pThisPad->m_ucRightTriggerState = 0;
|
||||
pThisPad->m_iRightThumbX = 0;
|
||||
pThisPad->m_iRightThumbY = 0;
|
||||
pThisPad->m_iLeftThumbX = 0;
|
||||
pThisPad->m_iLeftThumbY = 0;
|
||||
pThisPad->m_iNormalizedLeftThumbX = 0;
|
||||
pThisPad->m_iNormalizedLeftThumbY = 0;
|
||||
pThisPad->m_iNormalizedRightThumbX = 0;
|
||||
pThisPad->m_iNormalizedRightThumbY = 0;
|
||||
pThisPad->m_fNormalizedLeftThumbX = 0.0f;
|
||||
pThisPad->m_fNormalizedLeftThumbY = 0.0f;
|
||||
pThisPad->m_fNormalizedRightThumbX = 0.0f;
|
||||
pThisPad->m_fNormalizedRightThumbY = 0.0f;
|
||||
}
|
||||
|
||||
void CInput::InitTime(void)
|
||||
{
|
||||
LARGE_INTEGER qwTicksPerSec;
|
||||
QueryPerformanceFrequency(&qwTicksPerSec);
|
||||
|
||||
m_fTickToSeconds = 1.0 / (float)(int)qwTicksPerSec.LowPart;
|
||||
for (int i = 0; i < MAX_JOYPADS; i++)
|
||||
{
|
||||
m_LastActivityTime[i].QuadPart = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void CInput::GetStartTime(int iPad, int iKey)
|
||||
{
|
||||
QueryPerformanceCounter(&m_Timers[iPad][iKey].m_qwStartTime);
|
||||
|
||||
m_Timers[iPad][iKey].m_qwTotalHoldTicks.QuadPart = 0;
|
||||
m_Timers[iPad][iKey].m_fTotalHoldTime = 0;
|
||||
m_Timers[iPad][iKey].m_fLastRepeatTime = 0;
|
||||
m_Timers[iPad][iKey].m_bInitialPressHandled = false;
|
||||
|
||||
m_LastActivityTime[iPad].QuadPart = m_Timers[iPad][iKey].m_qwStartTime.QuadPart;
|
||||
}
|
||||
|
||||
void CInput::UpdateTime(int iPad, int iKey)
|
||||
{
|
||||
LARGE_INTEGER qwDeltaTime;
|
||||
QueryPerformanceCounter(&qwDeltaTime);
|
||||
|
||||
uint64_t qwNewTime = qwDeltaTime.QuadPart - m_Timers[iPad][iKey].m_qwStartTime.QuadPart;
|
||||
m_Timers[iPad][iKey].m_qwTotalHoldTicks.QuadPart += qwNewTime;
|
||||
|
||||
m_Timers[iPad][iKey].m_qwStartTime = qwDeltaTime;
|
||||
m_Timers[iPad][iKey].m_fTotalHoldTime = m_Timers[iPad][iKey].m_fTotalHoldTime + (m_fTickToSeconds * qwNewTime);
|
||||
|
||||
m_LastActivityTime[iPad].QuadPart = m_Timers[iPad][iKey].m_qwStartTime.QuadPart;
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "4J_Input.h"
|
||||
#include "INP_OnScreenKeyboard.h"
|
||||
#include "INP_MsgBox.h"
|
||||
|
||||
#define MAX_JOYPADS 4
|
||||
|
||||
class CInput
|
||||
{
|
||||
public:
|
||||
struct XINPUT_STATE {};
|
||||
|
||||
struct JOYPAD
|
||||
{
|
||||
bool m_bIsDisabled;
|
||||
bool m_bIsConnected;
|
||||
bool m_bWasConnected;
|
||||
bool m_bHasConnected;
|
||||
|
||||
unsigned int m_uiButtons;
|
||||
unsigned int m_uiOldButtons;
|
||||
int m_uiButtonsPressed;
|
||||
int m_uiButtonsReleased;
|
||||
|
||||
int m_iRightThumbX;
|
||||
int m_iRightThumbY;
|
||||
int m_iLeftThumbX;
|
||||
int m_iLeftThumbY;
|
||||
|
||||
DWORD m_iNormalizedRightThumbX;
|
||||
DWORD m_iNormalizedRightThumbY;
|
||||
DWORD m_iNormalizedLeftThumbX;
|
||||
DWORD m_iNormalizedLeftThumbY;
|
||||
|
||||
float m_fNormalizedRightThumbX;
|
||||
float m_fNormalizedRightThumbY;
|
||||
float m_fNormalizedLeftThumbX;
|
||||
float m_fNormalizedLeftThumbY;
|
||||
|
||||
unsigned char m_ucLeftTriggerState;
|
||||
unsigned char m_ucRightTriggerState;
|
||||
|
||||
float *m_pfLeftThumbXAxisMap;
|
||||
float *m_pfLeftThumbYAxisMap;
|
||||
float *m_pfRightThumbXAxisMap;
|
||||
float *m_pfRightThumbYAxisMap;
|
||||
|
||||
float m_fSensitivity;
|
||||
|
||||
BYTE *m_pucLeftTriggerAxisMap;
|
||||
BYTE *m_pucRightTriggerAxisMap;
|
||||
|
||||
unsigned char m_ucMappingValue;
|
||||
int m_ucInputStateIndex;
|
||||
CellPadData *m_pInputStates;
|
||||
};
|
||||
|
||||
struct TimeInfo
|
||||
{
|
||||
LARGE_INTEGER m_qwStartTime;
|
||||
LARGE_INTEGER m_qwTotalHoldTicks;
|
||||
float m_fTotalHoldTime;
|
||||
float m_fLastRepeatTime;
|
||||
bool m_bInitialPressHandled;
|
||||
};
|
||||
|
||||
CInput();
|
||||
~CInput();
|
||||
|
||||
void DebugPrintf(const char *szFormat, ...);
|
||||
bool QueryPerformanceFrequency(_LARGE_INTEGER *);
|
||||
bool QueryPerformanceCounter(_LARGE_INTEGER *);
|
||||
|
||||
void Initialise(int iInputStateC, unsigned char ucMapC, unsigned char ucActionC, unsigned char ucMenuActionC);
|
||||
void Tick();
|
||||
|
||||
void SetJoypadValues(JOYPAD *);
|
||||
void SetDeadzoneAndMovementRange(unsigned int uiDeadzone, unsigned int uiMovementRangeMax);
|
||||
void SetJoypadSensitivity(int iPad, float fSensitivity);
|
||||
|
||||
void SetGameJoypadMaps(unsigned char ucMap, unsigned char ucAction, unsigned int uiActionVal);
|
||||
unsigned int GetGameJoypadMaps(unsigned char ucMap, unsigned char ucAction);
|
||||
|
||||
void SetJoypadMapVal(int iPad, unsigned char ucMap);
|
||||
unsigned char GetJoypadMapVal(int iPad);
|
||||
|
||||
void SetJoypadStickAxisMap(int iPad, unsigned int uiFrom, unsigned int uiTo);
|
||||
void SetJoypadStickTriggerMap(int iPad, unsigned int uiFrom, unsigned int uiTo);
|
||||
|
||||
bool IsPadConnected(int iPad);
|
||||
void SetSigninJoypadMask(unsigned int mask);
|
||||
unsigned int GetValue(int iPad, unsigned char ucAction, bool bRepeat);
|
||||
bool IsSet(int iPad, unsigned char ucAction);
|
||||
|
||||
bool ButtonPressed(int iPad, unsigned char ucAction);
|
||||
bool ButtonReleased(int iPad, unsigned char ucAction);
|
||||
bool ButtonDown(int iPad, unsigned char ucAction);
|
||||
|
||||
float GetJoypadStick_Menu_LX(unsigned char ucPad);
|
||||
float GetJoypadStick_Menu_LY(unsigned char ucPad);
|
||||
float GetJoypadStick_Menu_RX(unsigned char ucPad);
|
||||
float GetJoypadStick_Menu_RY(unsigned char ucPad);
|
||||
unsigned char GetJoypadLTrigger_Menu(unsigned char ucPad);
|
||||
unsigned char GetJoypadRTrigger_Menu(unsigned char ucPad);
|
||||
|
||||
float GetJoypadStick_LX(int iPad, bool bCheckMenuDisplay = true);
|
||||
float GetJoypadStick_LY(int iPad, bool bCheckMenuDisplay = true);
|
||||
float GetJoypadStick_RX(int iPad, bool bCheckMenuDisplay = true);
|
||||
float GetJoypadStick_RY(int iPad, bool bCheckMenuDisplay = true);
|
||||
unsigned char GetJoypadLTrigger(int iPad, bool bCheckMenuDisplay = true);
|
||||
unsigned char GetJoypadRTrigger(int iPad, bool bCheckMenuDisplay = true);
|
||||
|
||||
void SetMenuDisplayed(int iPad, bool bVal);
|
||||
|
||||
void SetKeyRepeatRate(float fRepeatDelaySecs, float fRepeatRateSecs);
|
||||
void SetDebugSequence(const char *chSequenceA, int (*Func)(LPVOID), LPVOID lpParam);
|
||||
FLOAT GetIdleSeconds(int iPad);
|
||||
|
||||
void SetLostInputControlCallback(void (*a2)(void *, bool), void *a3);
|
||||
|
||||
bool UpdateJoypads();
|
||||
void ClearJoypadValues(JOYPAD *pThisPad);
|
||||
void InitTime(void);
|
||||
void GetStartTime(int iPad, int iKey);
|
||||
void UpdateTime(int, int);
|
||||
private:
|
||||
JOYPAD m_Joypads[MAX_JOYPADS];
|
||||
|
||||
int m_iDeadzone;
|
||||
int m_iMovementRangeMax;
|
||||
int m_iEffectiveRange;
|
||||
int m_iHalfRange;
|
||||
float m_fEffectiveRange;
|
||||
|
||||
unsigned char m_ucInputStateC;
|
||||
unsigned char m_ucJoypadMapC;
|
||||
unsigned char m_ucJoypadMapActionC;
|
||||
unsigned char m_ucMenuActionC;
|
||||
|
||||
unsigned int **m_JoypadMap;
|
||||
|
||||
bool m_bSelectBackSwapped;
|
||||
bool m_bLostInput;
|
||||
|
||||
bool m_bJoypadMapArrayIsSetup;
|
||||
unsigned int m_uiSigninJoypadMask;
|
||||
bool m_bIsMenuDisplayed[MAX_JOYPADS];
|
||||
|
||||
public:
|
||||
CMsgBox m_MsgBox;
|
||||
CKeyboard m_Keyboard;
|
||||
|
||||
bool m_bSwappedEnter;
|
||||
private:
|
||||
|
||||
float m_fTickToSeconds;
|
||||
float m_fRepeatDelaySecs;
|
||||
float m_fRepeatRateSecs;
|
||||
|
||||
TimeInfo m_Timers[MAX_JOYPADS][24];
|
||||
LARGE_INTEGER m_LastActivityTime[MAX_JOYPADS];
|
||||
|
||||
char *m_sDebugSequenceName;
|
||||
unsigned int m_uiDebugSequenceIndex;
|
||||
int (*m_pDebugSequenceFn)(void *);
|
||||
LPVOID m_pDebugSequenceParam;
|
||||
|
||||
void (*m_pLostInputFn)(LPVOID, const bool);
|
||||
LPVOID m_pLostInputParam;
|
||||
};
|
||||
|
||||
extern CInput InternalInputManager;
|
||||
@@ -0,0 +1,51 @@
|
||||
#include "INP_Main.h"
|
||||
#include "INP_MsgBox.h"
|
||||
|
||||
CMsgBox::CMsgBox()
|
||||
{
|
||||
m_eResult = EMsgBox_Undefined;
|
||||
}
|
||||
|
||||
EMsgBoxResult CMsgBox::RequestMessageBox(EMSgBoxType eType, DWORD dwPad,void( *Func)(int iButtonType,void *pvUserData),LPVOID lpParam, const char *pchText ,unsigned int uiFocusButton )
|
||||
{
|
||||
InternalInputManager.DebugPrintf("InputManager CMsgBox::RequestMessageBox\n");
|
||||
|
||||
if (m_eResult == EMsgBox_Pending)
|
||||
return EMsgBox_Busy;
|
||||
|
||||
m_eResult = EMsgBox_Pending;
|
||||
int messageType = CELL_MSGDIALOG_TYPE_SE_TYPE_NORMAL
|
||||
| CELL_MSGDIALOG_TYPE_DISABLE_CANCEL_ON;
|
||||
|
||||
m_iPad = dwPad;
|
||||
m_pParam = lpParam;
|
||||
|
||||
switch (eType)
|
||||
{
|
||||
case EMSgBoxType_OK:
|
||||
messageType |= CELL_MSGDIALOG_TYPE_BUTTON_TYPE_OK;
|
||||
break;
|
||||
case EMSgBoxType_YesNo:
|
||||
messageType |= CELL_MSGDIALOG_TYPE_BUTTON_TYPE_YESNO;
|
||||
if (uiFocusButton)
|
||||
{
|
||||
messageType |= CELL_MSGDIALOG_TYPE_DEFAULT_CURSOR_NO;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
int msgDialog = cellMsgDialogOpen2(messageType, pchText, Func, this, NULL);
|
||||
if (msgDialog != CELL_OK)
|
||||
{
|
||||
InternalInputManager.DebugPrintf("ERROR : cellMsgDialogOpen2() = 0x%x\n", msgDialog);
|
||||
if (msgDialog == CELL_SYSUTIL_ERROR_BUSY)
|
||||
{
|
||||
InternalInputManager.DebugPrintf("WARN : cellMsgDialogOpen2() = 0x%x (CELL_SYSUTIL_ERROR_BUSY) ... Retry.\n", CELL_SYSUTIL_ERROR_BUSY);
|
||||
return EMsgBox_SysUtilBusy;
|
||||
}
|
||||
return EMsgBox_Undefined;
|
||||
}
|
||||
|
||||
InternalInputManager.DebugPrintf("cellMsgDialogOpen2 - CELL_OK\n");
|
||||
return m_eResult;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include "4J_Input.h"
|
||||
|
||||
class CMsgBox
|
||||
{
|
||||
public:
|
||||
CMsgBox();
|
||||
~CMsgBox() {};
|
||||
|
||||
EMsgBoxResult RequestMessageBox(EMSgBoxType eType, DWORD dwPad,void( *Func)(int iButtonType,void *pvUserData),LPVOID lpParam, const char *pchText ,unsigned int uiFocusButton );
|
||||
void Tick() {};
|
||||
private:
|
||||
EMsgBoxResult m_eResult;
|
||||
DWORD m_iPad;
|
||||
LPVOID m_pParam;
|
||||
};
|
||||
@@ -0,0 +1,262 @@
|
||||
#include "INP_Main.h"
|
||||
#include "INP_OnScreenKeyboard.h"
|
||||
|
||||
CKeyboard::CKeyboard()
|
||||
{
|
||||
m_pInstance = this;
|
||||
m_iMode = 0;
|
||||
cellSysutilRegisterCallback(3, (CellSysutilCallback)&CKeyboard::KeyboardEventsCallback, this);
|
||||
SetKeyboardLanguage();
|
||||
}
|
||||
|
||||
void CKeyboard::Tick()
|
||||
{
|
||||
if (m_iMode == 5)
|
||||
{
|
||||
cellOskDialogUnloadAsync(&m_pDialogReturn);
|
||||
InternalInputManager.DebugPrintf("############## result ##############\n");
|
||||
InternalInputManager.DebugPrintf("OskDialog result status:\t%d\n", m_pDialogReturn);
|
||||
if (m_pDialogReturn.result == CELL_OK)
|
||||
{
|
||||
InternalInputManager.DebugPrintf("OskDialog return chars :\t%d\n", m_pDialogReturn.numCharsResultString);
|
||||
InternalInputManager.DebugPrintf("OskDialog return text :\t%S\n", m_pDialogReturn.pResultString);
|
||||
}
|
||||
InternalInputManager.DebugPrintf("########################################\n\n");
|
||||
if (m_pFunc)
|
||||
{
|
||||
m_pFunc(m_lpParam, m_pDialogReturn.result == CELL_OK);
|
||||
}
|
||||
m_iMode = 0;
|
||||
}
|
||||
else if (m_iMode != 4)
|
||||
{
|
||||
if (m_iMode == 3)
|
||||
{
|
||||
if (m_pTickCountdown)
|
||||
m_pTickCountdown--;
|
||||
else
|
||||
m_iMode = 2;
|
||||
}
|
||||
else if (m_iMode == 2)
|
||||
{
|
||||
register_osk_callback();
|
||||
|
||||
cellOskDialogAddSupportLanguage(CELL_OSKDIALOG_PANELMODE_GERMAN |
|
||||
CELL_OSKDIALOG_PANELMODE_ENGLISH |
|
||||
CELL_OSKDIALOG_PANELMODE_SPANISH |
|
||||
CELL_OSKDIALOG_PANELMODE_FRENCH |
|
||||
CELL_OSKDIALOG_PANELMODE_ITALIAN |
|
||||
CELL_OSKDIALOG_PANELMODE_PORTUGUESE |
|
||||
CELL_OSKDIALOG_PANELMODE_KOREAN |
|
||||
CELL_OSKDIALOG_PANELMODE_TRADITIONAL_CHINESE |
|
||||
CELL_OSKDIALOG_PANELMODE_SIMPLIFIED_CHINESE |
|
||||
CELL_OSKDIALOG_PANELMODE_PORTUGUESE_BRAZIL
|
||||
);
|
||||
|
||||
int iResult;
|
||||
|
||||
iResult = cellOskDialogSetKeyLayoutOption(CELL_OSKDIALOG_10KEY_PANEL | CELL_OSKDIALOG_FULLKEY_PANEL);
|
||||
if ( iResult )
|
||||
InternalInputManager.DebugPrintf("cellOskDialogSetKeyLayoutOption() = 0x%x \n", iResult);
|
||||
iResult = cellOskDialogSetInitialKeyLayout(CELL_OSKDIALOG_INITIAL_PANEL_LAYOUT_FULLKEY);
|
||||
if ( iResult )
|
||||
InternalInputManager.DebugPrintf("cellOskDialogSetKeyLayoutOption()= 0x%x \n", iResult);
|
||||
iResult = cellOskDialogExtSetInitialScale(1.0f);
|
||||
if ( iResult )
|
||||
InternalInputManager.DebugPrintf("cellOskDialogExtSetInitialScale()= 0x%x \n", iResult);
|
||||
|
||||
cellOskDialogSetLayoutMode(CELL_OSKDIALOG_LAYOUTMODE_X_ALIGN_CENTER | CELL_OSKDIALOG_LAYOUTMODE_Y_ALIGN_CENTER);
|
||||
|
||||
iResult = cellOskDialogLoadAsync(SYS_MEMORY_CONTAINER_ID_INVALID, &m_pDialogParam, &inputFieldInfo);
|
||||
if ( iResult != CELL_OK )
|
||||
{
|
||||
InternalInputManager.DebugPrintf("cellOskDialogLoadAsync() = 0x%x \n", iResult);
|
||||
m_iMode = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iMode = 4;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iMode = 3;
|
||||
m_pTickCountdown = 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CKeyboard::GetText(uint16_t *UTF16String)
|
||||
{
|
||||
memcpy(UTF16String, &m_pText, 2*m_pDialogReturn.numCharsResultString);
|
||||
}
|
||||
|
||||
EKeyboardResult CKeyboard::RequestKeyboard(LPCWSTR Title, LPCWSTR Text, DWORD dwPad, UINT uiMaxChars, int( *Func)(LPVOID,const bool),LPVOID lpParam,C_4JInput::EKeyboardMode eMode)
|
||||
{
|
||||
m_pFunc = Func;
|
||||
m_lpParam = lpParam;
|
||||
SetMode(1);
|
||||
inputFieldInfo.message = (uint16_t *)Title;
|
||||
inputFieldInfo.init_text = (uint16_t *)Text;
|
||||
inputFieldInfo.limit_length = uiMaxChars;
|
||||
m_fX = 0.0f;
|
||||
m_fY = 0;
|
||||
m_pDialogParam.allowOskPanelFlg = CELL_OSKDIALOG_PANELMODE_DEFAULT;
|
||||
m_pDialogParam.firstViewPanel = CELL_OSKDIALOG_PANELMODE_DEFAULT;
|
||||
|
||||
switch (eMode)
|
||||
{
|
||||
case C_4JInput::EKeyboardMode_Alphabet_Extended:
|
||||
m_pDialogParam.allowOskPanelFlg = CELL_OSKDIALOG_PANELMODE_LATIN;
|
||||
m_pDialogParam.firstViewPanel = CELL_OSKDIALOG_PANELMODE_LATIN;
|
||||
break;
|
||||
case C_4JInput::EKeyboardMode_Alphabet:
|
||||
m_pDialogParam.allowOskPanelFlg = CELL_OSKDIALOG_PANELMODE_ALPHABET;
|
||||
m_pDialogParam.firstViewPanel = CELL_OSKDIALOG_PANELMODE_ALPHABET;
|
||||
break;
|
||||
case C_4JInput::EKeyboardMode_Password:
|
||||
m_pDialogParam.allowOskPanelFlg = CELL_OSKDIALOG_PANELMODE_PASSWORD;
|
||||
m_pDialogParam.firstViewPanel = CELL_OSKDIALOG_PANELMODE_PASSWORD;
|
||||
break;
|
||||
case C_4JInput::EKeyboardMode_Numeric:
|
||||
m_pDialogParam.allowOskPanelFlg = CELL_OSKDIALOG_PANELMODE_NUMERAL;
|
||||
m_pDialogParam.firstViewPanel = CELL_OSKDIALOG_PANELMODE_NUMERAL;
|
||||
break;
|
||||
}
|
||||
|
||||
m_pDialogParam.controlPoint.x = m_fX;
|
||||
m_pDialogParam.prohibitFlgs = 0;
|
||||
m_pDialogParam.controlPoint.y = m_fY;
|
||||
m_pDialogReturn.result = CELL_OSKDIALOG_INPUT_FIELD_RESULT_OK;
|
||||
m_pDialogReturn.numCharsResultString = uiMaxChars;
|
||||
memset(m_pText, 0, sizeof(*m_pText));
|
||||
m_pDialogReturn.pResultString = (uint16_t *)m_pText;
|
||||
return EKeyboard_Pending;
|
||||
}
|
||||
|
||||
void CKeyboard::DestroyKeyboard()
|
||||
{
|
||||
if (m_iMode == 4)
|
||||
m_pFunc = NULL;
|
||||
}
|
||||
|
||||
void CKeyboard::register_osk_callback()
|
||||
{
|
||||
cellOskDialogExtRegisterKeyboardEventHookCallback(3, &CKeyboard::OSK_KeyhookCallback);
|
||||
}
|
||||
|
||||
bool CKeyboard::OSK_KeyhookCallback(CellOskDialogKeyMessage *keyMessage, unsigned int *action, void *pActionInfo)
|
||||
{
|
||||
*action = CELL_OSKDIALOG_CHANGE_NO_EVENT;
|
||||
return false;
|
||||
}
|
||||
|
||||
void CKeyboard::KeyboardEventsCallback(uint64_t status, uint64_t param, CKeyboard* userdata)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case CELL_SYSUTIL_OSKDIALOG_DISPLAY_CHANGED:
|
||||
InternalInputManager.DebugPrintf("CELL_SYSUTIL_OSKDIALOG_FINISHED");
|
||||
if ( param == CELL_OSKDIALOG_DISPLAY_STATUS_HIDE )
|
||||
{
|
||||
InternalInputManager.DebugPrintf("CELL_SYSUTIL_OSKDIALOG_FINISHED\n");
|
||||
InternalInputManager.DebugPrintf("Completed hide of OSK.\n");
|
||||
}
|
||||
InternalInputManager.DebugPrintf("CELL_SYSUTIL_OSKDIALOG_FINISHED\n");
|
||||
break;
|
||||
case CELL_SYSUTIL_OSKDIALOG_INPUT_DEVICE_CHANGED:
|
||||
InternalInputManager.DebugPrintf("CELL_SYSUTIL_OSKDIALOG_FINISHED\n");
|
||||
if ( param == CELL_OSKDIALOG_INPUT_DEVICE_KEYBOARD )
|
||||
{
|
||||
InternalInputManager.DebugPrintf("Input device changed to keyboard.\n");
|
||||
}
|
||||
else if( param == CELL_OSKDIALOG_INPUT_DEVICE_PAD)
|
||||
{
|
||||
InternalInputManager.DebugPrintf("Input device changed to pad.\n");
|
||||
}
|
||||
break;
|
||||
case CELL_SYSUTIL_OSKDIALOG_INPUT_CANCELED:
|
||||
case CELL_SYSUTIL_OSKDIALOG_INPUT_ENTERED:
|
||||
InternalInputManager.DebugPrintf("CELL_SYSUTIL_OSKDIALOG_FINISHED\n");
|
||||
break;
|
||||
case CELL_SYSUTIL_OSKDIALOG_FINISHED:
|
||||
InternalInputManager.DebugPrintf("CELL_SYSUTIL_OSKDIALOG_FINISHED\n");
|
||||
|
||||
if ( userdata->GetMode() == 4 )
|
||||
userdata->SetMode(5);
|
||||
|
||||
break;
|
||||
case CELL_SYSUTIL_OSKDIALOG_LOADED:
|
||||
InternalInputManager.DebugPrintf("CELL_SYSUTIL_OSKDIALOG_LOADED\n");
|
||||
break;
|
||||
case CELL_SYSUTIL_SYSTEM_MENU_CLOSE:
|
||||
InternalInputManager.DebugPrintf("CELL_SYSUTIL_OSKDIALOG_FINISHED\n");
|
||||
InternalInputManager.DebugPrintf("CELL_SYSUTIL_SYSTEM_MENU_CLOSE\n");
|
||||
break;
|
||||
case CELL_SYSUTIL_SYSTEM_MENU_OPEN:
|
||||
InternalInputManager.DebugPrintf("CELL_SYSUTIL_SYSTEM_MENU_OPEN\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CKeyboard::SetKeyboardLanguage()
|
||||
{
|
||||
int language;
|
||||
cellSysutilGetSystemParamInt(CELL_SYSUTIL_SYSTEMPARAM_ID_LANG, &language);
|
||||
|
||||
switch (language)
|
||||
{
|
||||
case CELL_SYSUTIL_LANG_PORTUGUESE_BR:
|
||||
m_iLanguage = 0x10000;
|
||||
return;
|
||||
case CELL_SYSUTIL_LANG_CHINESE_T:
|
||||
case CELL_SYSUTIL_LANG_CHINESE_S:
|
||||
m_iLanguage = 0x4000;
|
||||
return;
|
||||
case CELL_SYSUTIL_LANG_PORTUGUESE_PT:
|
||||
m_iLanguage = 0x40;
|
||||
return;
|
||||
case CELL_SYSUTIL_LANG_ITALIAN:
|
||||
m_iLanguage = 0x10;
|
||||
return;
|
||||
case CELL_SYSUTIL_LANG_GERMAN:
|
||||
m_iLanguage = 0x1;
|
||||
return;
|
||||
case CELL_SYSUTIL_LANG_SPANISH:
|
||||
m_iLanguage = 0x4;
|
||||
return;
|
||||
case CELL_SYSUTIL_LANG_FRENCH:
|
||||
m_iLanguage = 0x8;
|
||||
return;
|
||||
case CELL_SYSUTIL_LANG_DUTCH:
|
||||
case CELL_SYSUTIL_LANG_ENGLISH_US:
|
||||
m_iLanguage = 0x2;
|
||||
return;
|
||||
case CELL_SYSUTIL_LANG_JAPANESE:
|
||||
m_iLanguage = 0x200000;
|
||||
return;
|
||||
case CELL_SYSUTIL_LANG_KOREAN:
|
||||
m_iLanguage = 0x1000;
|
||||
return;
|
||||
case CELL_SYSUTIL_LANG_RUSSIAN:
|
||||
m_iLanguage = 0x80;
|
||||
return;
|
||||
}
|
||||
|
||||
m_iLanguage = 0x200000;
|
||||
}
|
||||
|
||||
void CKeyboard::SetMode(int mode)
|
||||
{
|
||||
m_iMode = mode;
|
||||
}
|
||||
|
||||
CKeyboard *CKeyboard::GetInstance()
|
||||
{
|
||||
return m_pInstance;
|
||||
}
|
||||
|
||||
int CKeyboard::GetMode()
|
||||
{
|
||||
return m_iMode;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include "4J_Input.h"
|
||||
|
||||
class CKeyboard
|
||||
{
|
||||
public:
|
||||
// PIEBOT: m_iMode is supposed to be using eKeyboardProcessState
|
||||
// I'll leave that work to someone else.
|
||||
enum eKeyboardProcessState
|
||||
{
|
||||
};
|
||||
|
||||
CKeyboard();
|
||||
|
||||
void Tick();
|
||||
void GetText(uint16_t *UTF16String);
|
||||
EKeyboardResult RequestKeyboard(LPCWSTR Title, LPCWSTR Text, DWORD dwPad, UINT uiMaxChars, int( *Func)(LPVOID,const bool),LPVOID lpParam,C_4JInput::EKeyboardMode eMode);
|
||||
void DestroyKeyboard();
|
||||
|
||||
void register_osk_callback();
|
||||
static bool OSK_KeyhookCallback(CellOskDialogKeyMessage *keyMessage, unsigned int *action, void *pActionInfo);
|
||||
static void KeyboardEventsCallback(uint64_t status, uint64_t param, CKeyboard* userdata);
|
||||
void SetKeyboardLanguage();
|
||||
|
||||
void SetMode(int mode);
|
||||
CKeyboard *GetInstance();
|
||||
int GetMode();
|
||||
private:
|
||||
int m_iMode;
|
||||
|
||||
int (*m_pFunc)(LPVOID, const bool);
|
||||
LPVOID m_lpParam;
|
||||
CellOskDialogParam m_pDialogParam;
|
||||
float m_fX;
|
||||
float m_fY;
|
||||
CellOskDialogInputFieldInfo inputFieldInfo;
|
||||
|
||||
CellOskDialogCallbackReturnParam m_pDialogReturn;
|
||||
uint16_t *m_pText[513];
|
||||
|
||||
int m_iLanguage;
|
||||
|
||||
CKeyboard *m_pInstance;
|
||||
int m_pTickCountdown;
|
||||
};
|
||||
@@ -32,7 +32,6 @@ CKeyboard InternalKeyboard;
|
||||
void C_4JInput::Initialise(int iInputStateC, unsigned char ucMapC, unsigned char ucActionC, unsigned char ucMenuActionC)
|
||||
{
|
||||
InternalInputManager.Initialise(iInputStateC, ucMapC, ucActionC, ucMenuActionC);
|
||||
InternalKeyboard.Init();
|
||||
}
|
||||
|
||||
void C_4JInput::Tick(void)
|
||||
@@ -40,10 +39,6 @@ void C_4JInput::Tick(void)
|
||||
InternalInputManager.Tick();
|
||||
}
|
||||
|
||||
void C_4JInput::TickKBM(void)
|
||||
{
|
||||
InternalKeyboard.Tick();
|
||||
}
|
||||
void C_4JInput::SetDeadzoneAndMovementRange(unsigned int uiDeadzone, unsigned int uiMovementRangeMax)
|
||||
{
|
||||
InternalInputManager.SetDeadzoneAndMovementRange(uiDeadzone, uiMovementRangeMax);
|
||||
@@ -79,11 +74,6 @@ unsigned int C_4JInput::GetValue(int iPad, unsigned char ucAction, bool bRepeat)
|
||||
return InternalInputManager.GetValue(iPad, ucAction, bRepeat);
|
||||
}
|
||||
|
||||
void C_4JInput::MapTouchInput(int iPad, int button)
|
||||
{
|
||||
InternalInputManager.MapTouchInput(iPad, button);
|
||||
}
|
||||
|
||||
bool C_4JInput::ButtonPressed(int iPad, unsigned char ucAction)
|
||||
{
|
||||
return InternalInputManager.ButtonPressed(iPad, ucAction);
|
||||
@@ -139,11 +129,6 @@ bool C_4JInput::IsSelectBackSwapped()
|
||||
return InternalInputManager.IsSelectBackSwapped();
|
||||
}
|
||||
|
||||
bool C_4JInput::IsPadActive(int iPad)
|
||||
{
|
||||
return InternalInputManager.IsPadActive(iPad);
|
||||
}
|
||||
|
||||
float C_4JInput::GetJoypadStick_LX(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadStick_LX(iPad, bCheckMenuDisplay);
|
||||
@@ -179,191 +164,6 @@ void C_4JInput::SetMenuDisplayed(int iPad, bool bVal)
|
||||
InternalInputManager.SetMenuDisplayed(iPad, bVal);
|
||||
}
|
||||
|
||||
void C_4JInput::OnKeyDown(int vkCode)
|
||||
{
|
||||
InternalKeyboard.OnKeyDown(vkCode);
|
||||
}
|
||||
|
||||
void C_4JInput::OnKeyUp(int vkCode)
|
||||
{
|
||||
InternalKeyboard.OnKeyUp(vkCode);
|
||||
}
|
||||
|
||||
void C_4JInput::OnChar(wchar_t ch)
|
||||
{
|
||||
InternalKeyboard.OnChar(ch);
|
||||
}
|
||||
|
||||
bool C_4JInput::IsKeyDown(int vkCode) const
|
||||
{
|
||||
return InternalKeyboard.IsKeyDown(vkCode);
|
||||
}
|
||||
|
||||
bool C_4JInput::IsKeyPressed(int vkCode) const
|
||||
{
|
||||
return InternalKeyboard.IsKeyPressed(vkCode);
|
||||
}
|
||||
|
||||
bool C_4JInput::IsKeyReleased(int vkCode) const
|
||||
{
|
||||
return InternalKeyboard.IsKeyReleased(vkCode);
|
||||
}
|
||||
|
||||
int C_4JInput::GetMouseX() const
|
||||
{
|
||||
return InternalKeyboard.GetMouseX();
|
||||
}
|
||||
|
||||
int C_4JInput::GetMouseY() const
|
||||
{
|
||||
return InternalKeyboard.GetMouseY();
|
||||
}
|
||||
|
||||
bool C_4JInput::IsMouseLDown() const
|
||||
{
|
||||
return InternalKeyboard.IsLButtonDown();
|
||||
}
|
||||
|
||||
bool C_4JInput::IsLButtonPressed() const
|
||||
{
|
||||
return InternalKeyboard.IsLButtonPressed();
|
||||
}
|
||||
|
||||
bool C_4JInput::IsLButtonReleased() const
|
||||
{
|
||||
return InternalKeyboard.IsLButtonReleased();
|
||||
}
|
||||
|
||||
bool C_4JInput::IsMouseRDown() const
|
||||
{
|
||||
return InternalKeyboard.IsRButtonDown();
|
||||
}
|
||||
|
||||
bool C_4JInput::IsRButtonPressed() const
|
||||
{
|
||||
return InternalKeyboard.IsRButtonPressed();
|
||||
}
|
||||
|
||||
bool C_4JInput::IsRButtonReleased() const
|
||||
{
|
||||
return InternalKeyboard.IsRButtonReleased();
|
||||
}
|
||||
|
||||
int C_4JInput::GetMouseWheelDelta() const
|
||||
{
|
||||
return InternalKeyboard.GetMouseWheelDelta();
|
||||
}
|
||||
|
||||
wchar_t C_4JInput::GetLastChar() const
|
||||
{
|
||||
return InternalKeyboard.GetLastChar();
|
||||
}
|
||||
|
||||
bool C_4JInput::HasChar() const
|
||||
{
|
||||
return InternalKeyboard.HasChar();
|
||||
}
|
||||
|
||||
int C_4JInput::GetCharCount() const
|
||||
{
|
||||
return InternalKeyboard.GetCharCount();
|
||||
}
|
||||
|
||||
wchar_t C_4JInput::GetChar(int index) const
|
||||
{
|
||||
return InternalKeyboard.GetChar(index);
|
||||
}
|
||||
|
||||
int C_4JInput::GetClipboardText(wchar_t *outText, int outCapacity) const
|
||||
{
|
||||
return InternalKeyboard.GetClipboardText(outText, outCapacity);
|
||||
}
|
||||
|
||||
bool C_4JInput::SetClipboardText(const wchar_t *text) const
|
||||
{
|
||||
return InternalKeyboard.SetClipboardText(text);
|
||||
}
|
||||
|
||||
void C_4JInput::OnMouseMove(int x, int y)
|
||||
{
|
||||
InternalKeyboard.OnMouseMove(x, y);
|
||||
}
|
||||
|
||||
void C_4JInput::OnRawMouseDelta(int dx, int dy)
|
||||
{
|
||||
InternalKeyboard.OnRawMouseDelta(dx, dy);
|
||||
}
|
||||
|
||||
void C_4JInput::OnLButtonDown(int x, int y)
|
||||
{
|
||||
InternalKeyboard.OnLButtonDown(x, y);
|
||||
}
|
||||
|
||||
void C_4JInput::OnLButtonUp(int x, int y)
|
||||
{
|
||||
InternalKeyboard.OnLButtonUp(x, y);
|
||||
}
|
||||
|
||||
void C_4JInput::OnRButtonDown(int x, int y)
|
||||
{
|
||||
InternalKeyboard.OnRButtonDown(x, y);
|
||||
}
|
||||
|
||||
void C_4JInput::OnRButtonUp(int x, int y)
|
||||
{
|
||||
InternalKeyboard.OnRButtonUp(x, y);
|
||||
}
|
||||
|
||||
void C_4JInput::OnMButtonDown(int x, int y)
|
||||
{
|
||||
InternalKeyboard.OnMButtonDown(x, y);
|
||||
}
|
||||
|
||||
void C_4JInput::OnMButtonUp(int x, int y)
|
||||
{
|
||||
InternalKeyboard.OnMButtonUp(x, y);
|
||||
}
|
||||
|
||||
void C_4JInput::OnMouseWheel(int delta, int x, int y)
|
||||
{
|
||||
InternalKeyboard.OnMouseWheel(delta, x, y);
|
||||
}
|
||||
|
||||
void C_4JInput::SetMouseCaptured(bool captured)
|
||||
{
|
||||
InternalKeyboard.SetMouseCaptured(captured);
|
||||
}
|
||||
|
||||
void C_4JInput::SetWindowFocused(bool focused)
|
||||
{
|
||||
InternalKeyboard.SetWindowFocused(focused);
|
||||
}
|
||||
|
||||
bool C_4JInput::IsMouseCaptured() const
|
||||
{
|
||||
return InternalKeyboard.IsMouseCaptured();
|
||||
}
|
||||
|
||||
bool C_4JInput::IsWindowFocused() const
|
||||
{
|
||||
return InternalKeyboard.IsWindowFocused();
|
||||
}
|
||||
|
||||
void C_4JInput::SetMousePos(int x, int y)
|
||||
{
|
||||
InternalKeyboard.SetMousePos(x, y);
|
||||
}
|
||||
|
||||
int C_4JInput::GetRawMouseX() const
|
||||
{
|
||||
return InternalKeyboard.GetRawMouseX();
|
||||
}
|
||||
|
||||
int C_4JInput::GetRawMouseY() const
|
||||
{
|
||||
return InternalKeyboard.GetRawMouseY();
|
||||
}
|
||||
|
||||
EKeyboardResult C_4JInput::RequestKeyboard(LPCWSTR Title, LPCWSTR Text, DWORD dwPad, UINT uiMaxChars, int (*Func)(LPVOID, const bool), LPVOID lpParam,
|
||||
C_4JInput::EKeyboardMode eMode)
|
||||
{
|
||||
@@ -377,11 +177,7 @@ void C_4JInput::GetText(uint16_t *UTF16String)
|
||||
|
||||
EControllerType C_4JInput::GetControllerType(int iPad)
|
||||
{
|
||||
if(InternalInputManager.IsPadConnected(iPad))
|
||||
{
|
||||
return InternalInputManager.GetControllerType(iPad); //strk13r - mrow mrow mrow mrowwwwwwwwwww, i am silly kitty
|
||||
}
|
||||
return EControllerType_Default;
|
||||
return InternalInputManager.GetControllerType(iPad); //strk13r - mrow mrow mrow mrowwwwwwwwwww, i am silly kitty
|
||||
}
|
||||
|
||||
bool C_4JInput::VerifyStrings(WCHAR **pwStringA, int iStringC, int (*Func)(LPVOID, STRING_VERIFY_RESPONSE *), LPVOID lpParam)
|
||||
|
||||
@@ -23,6 +23,7 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "INP_ForceFeedback.h"
|
||||
#include "INP_Main.h"
|
||||
|
||||
void CForceFeedback::Initialise(int iInputStateC, unsigned char ucMapC, unsigned char ucActionC, unsigned char ucMenuActionC)
|
||||
{
|
||||
@@ -109,7 +110,7 @@ void CForceFeedback::Tick(void)
|
||||
while (pRumbleNode)
|
||||
{
|
||||
RUMBLE_EFFECT *pRumble = pRumbleNode->GetDataAs<RUMBLE_EFFECT>();
|
||||
SDL_Gamepad* m_pGamepad = SDL_GetGamepadFromPlayerIndex(pRumble->m_Pad);
|
||||
SDL_Gamepad* m_pGamepad = InternalInputManager.m_Joypads[pRumble->m_Pad].m_pGamepad;
|
||||
|
||||
if (pRumble->m_TimeLeft <= qwCurrentTime.QuadPart)
|
||||
{
|
||||
|
||||
@@ -24,280 +24,7 @@ SOFTWARE.
|
||||
|
||||
#include "INP_Keyboard.h"
|
||||
|
||||
CKeyboard::CKeyboard()
|
||||
{
|
||||
m_lParam = nullptr;
|
||||
m_onInput = nullptr;
|
||||
ZeroMemory(m_chrText, sizeof(m_chrText));
|
||||
|
||||
memset(m_keysPrev, 0, sizeof(m_keysPrev));
|
||||
memset(m_keysCurr, 0, sizeof(m_keysCurr));
|
||||
m_mouseX = m_mouseY = 0;
|
||||
m_lButtonPrev = m_lButtonCurr = false;
|
||||
m_rButtonPrev = m_rButtonCurr = false;
|
||||
m_mButtonPrev = m_mButtonCurr = false;
|
||||
m_mouseWheel = 0;
|
||||
memset(m_charBuffer, 0, sizeof(m_charBuffer));
|
||||
m_charCount = 0;
|
||||
m_mouseCaptured = false;
|
||||
m_mouseDeltaX = m_mouseDeltaY = 0;
|
||||
m_windowFocused = true;
|
||||
}
|
||||
|
||||
void CKeyboard::Init()
|
||||
{
|
||||
RAWINPUTDEVICE rid;
|
||||
rid.usUsagePage = 0x01; // HID_USAGE_PAGE_GENERIC
|
||||
rid.usUsage = 0x02; // HID_USAGE_GENERIC_MOUSE
|
||||
rid.dwFlags = 0;
|
||||
rid.hwndTarget = g_hWnd;
|
||||
RegisterRawInputDevices(&rid, 1, sizeof(rid));
|
||||
}
|
||||
|
||||
void CKeyboard::Tick(void)
|
||||
{
|
||||
memcpy(m_keysPrev, m_keysCurr, sizeof(m_keysCurr));
|
||||
m_lButtonPrev = m_lButtonCurr;
|
||||
m_rButtonPrev = m_rButtonCurr;
|
||||
m_mButtonPrev = m_mButtonCurr;
|
||||
m_mouseWheel = 0;
|
||||
m_charCount = 0;
|
||||
m_mouseDeltaX = m_mouseDeltaAccumX;
|
||||
m_mouseDeltaY = m_mouseDeltaAccumY;
|
||||
m_mouseDeltaAccumX = 0;
|
||||
m_mouseDeltaAccumY = 0;
|
||||
|
||||
if (m_mouseCaptured && g_hWnd && m_windowFocused && g_hWnd)
|
||||
{
|
||||
RECT rc;
|
||||
GetClientRect(g_hWnd, &rc);
|
||||
POINT center;
|
||||
center.x = (rc.right - rc.left) / 2;
|
||||
center.y = (rc.bottom - rc.top) / 2;
|
||||
ClientToScreen(g_hWnd, ¢er);
|
||||
SetCursorPos(center.x, center.y);
|
||||
}
|
||||
}
|
||||
|
||||
void CKeyboard::OnKeyDown(int vkCode)
|
||||
{
|
||||
if (vkCode >= 0 && vkCode < MAX_KEYS)
|
||||
{
|
||||
m_keysCurr[vkCode] = true;
|
||||
}
|
||||
}
|
||||
|
||||
void CKeyboard::OnKeyUp(int vkCode)
|
||||
{
|
||||
if (vkCode >= 0 && vkCode < MAX_KEYS)
|
||||
{
|
||||
m_keysCurr[vkCode] = false;
|
||||
}
|
||||
}
|
||||
|
||||
void CKeyboard::OnChar(wchar_t ch)
|
||||
{
|
||||
if (m_charCount < MAX_CHARS_PER_FRAME)
|
||||
{
|
||||
m_charBuffer[m_charCount++] = ch;
|
||||
}
|
||||
}
|
||||
|
||||
int CKeyboard::GetClipboardText(wchar_t *outText, int outCapacity) const
|
||||
{
|
||||
if (!outText || outCapacity <= 0)
|
||||
return 0;
|
||||
outText[0] = 0;
|
||||
if (!OpenClipboard(g_hWnd))
|
||||
return 0;
|
||||
int copied = 0;
|
||||
HANDLE h = GetClipboardData(CF_UNICODETEXT);
|
||||
if (h)
|
||||
{
|
||||
const wchar_t *src = (const wchar_t *)GlobalLock(h);
|
||||
if (src)
|
||||
{
|
||||
while (src[copied] && copied + 1 < outCapacity)
|
||||
{
|
||||
outText[copied] = src[copied];
|
||||
++copied;
|
||||
}
|
||||
outText[copied] = 0;
|
||||
GlobalUnlock(h);
|
||||
}
|
||||
}
|
||||
CloseClipboard();
|
||||
return copied;
|
||||
}
|
||||
|
||||
bool CKeyboard::SetClipboardText(const wchar_t *text) const
|
||||
{
|
||||
if (!text)
|
||||
return false;
|
||||
size_t len = wcslen(text);
|
||||
if (!OpenClipboard(g_hWnd))
|
||||
return false;
|
||||
EmptyClipboard();
|
||||
bool ok = false;
|
||||
HGLOBAL h = GlobalAlloc(GMEM_MOVEABLE, (len + 1) * sizeof(wchar_t));
|
||||
if (h)
|
||||
{
|
||||
memcpy(GlobalLock(h), text, (len + 1) * sizeof(wchar_t));
|
||||
GlobalUnlock(h);
|
||||
ok = (SetClipboardData(CF_UNICODETEXT, h) != NULL);
|
||||
if (!ok)
|
||||
GlobalFree(h);
|
||||
}
|
||||
CloseClipboard();
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool CKeyboard::IsKeyDown(int vkCode) const
|
||||
{
|
||||
if (vkCode >= 0 && vkCode < MAX_KEYS)
|
||||
return m_keysCurr[vkCode];
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CKeyboard::IsKeyPressed(int vkCode) const
|
||||
{
|
||||
if (vkCode >= 0 && vkCode < MAX_KEYS)
|
||||
return m_keysCurr[vkCode] && !m_keysPrev[vkCode];
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CKeyboard::IsKeyReleased(int vkCode) const
|
||||
{
|
||||
if (vkCode >= 0 && vkCode < MAX_KEYS)
|
||||
return !m_keysCurr[vkCode] && m_keysPrev[vkCode];
|
||||
return false;
|
||||
}
|
||||
|
||||
void CKeyboard::OnMouseMove(int x, int y)
|
||||
{
|
||||
m_mouseX = x;
|
||||
m_mouseY = y;
|
||||
}
|
||||
|
||||
void CKeyboard::OnRawMouseDelta(int dx, int dy)
|
||||
{
|
||||
m_mouseDeltaAccumX += dx;
|
||||
m_mouseDeltaAccumY += dy;
|
||||
}
|
||||
|
||||
void CKeyboard::OnLButtonDown(int x, int y)
|
||||
{
|
||||
m_mouseX = x;
|
||||
m_mouseY = y;
|
||||
m_lButtonCurr = true;
|
||||
}
|
||||
|
||||
void CKeyboard::OnLButtonUp(int x, int y)
|
||||
{
|
||||
m_mouseX = x;
|
||||
m_mouseY = y;
|
||||
m_lButtonCurr = false;
|
||||
}
|
||||
|
||||
void CKeyboard::OnRButtonDown(int x, int y)
|
||||
{
|
||||
m_mouseX = x;
|
||||
m_mouseY = y;
|
||||
m_rButtonCurr = true;
|
||||
}
|
||||
|
||||
void CKeyboard::OnRButtonUp(int x, int y)
|
||||
{
|
||||
m_mouseX = x;
|
||||
m_mouseY = y;
|
||||
m_rButtonCurr = false;
|
||||
}
|
||||
|
||||
void CKeyboard::OnMButtonDown(int x, int y)
|
||||
{
|
||||
m_mouseX = x;
|
||||
m_mouseY = y;
|
||||
m_mButtonCurr = true;
|
||||
}
|
||||
|
||||
void CKeyboard::OnMButtonUp(int x, int y)
|
||||
{
|
||||
m_mouseX = x;
|
||||
m_mouseY = y;
|
||||
m_mButtonCurr = false;
|
||||
}
|
||||
|
||||
void CKeyboard::OnMouseWheel(int delta, int x, int y)
|
||||
{
|
||||
m_mouseX = x;
|
||||
m_mouseY = y;
|
||||
m_mouseWheel += delta;
|
||||
}
|
||||
|
||||
void CKeyboard::SetMouseCaptured(bool grabbed)
|
||||
{
|
||||
if (m_mouseCaptured == grabbed)
|
||||
return;
|
||||
|
||||
m_mouseCaptured = grabbed;
|
||||
if (grabbed && g_hWnd)
|
||||
{
|
||||
while (ShowCursor(FALSE) >= 0) {}
|
||||
RECT rc;
|
||||
GetClientRect(g_hWnd, &rc);
|
||||
POINT topLeft = { rc.left, rc.top };
|
||||
POINT bottomRight = { rc.right, rc.bottom };
|
||||
ClientToScreen(g_hWnd, &topLeft);
|
||||
ClientToScreen(g_hWnd, &bottomRight);
|
||||
RECT clipRect = { topLeft.x, topLeft.y, bottomRight.x, bottomRight.y };
|
||||
ClipCursor(&clipRect);
|
||||
|
||||
GetClientRect(g_hWnd, &rc);
|
||||
POINT center;
|
||||
center.x = (rc.right - rc.left) / 2;
|
||||
center.y = (rc.bottom - rc.top) / 2;
|
||||
ClientToScreen(g_hWnd, ¢er);
|
||||
SetCursorPos(center.x, center.y);
|
||||
|
||||
m_mouseDeltaAccumX = 0;
|
||||
m_mouseDeltaAccumY = 0;
|
||||
}
|
||||
else if (!grabbed && g_hWnd)
|
||||
{
|
||||
while (ShowCursor(TRUE) < 0) {}
|
||||
ClipCursor(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void CKeyboard::SetWindowFocused(bool focused)
|
||||
{
|
||||
m_windowFocused = focused;
|
||||
if (focused)
|
||||
{
|
||||
if (m_mouseCaptured)
|
||||
{
|
||||
while (ShowCursor(FALSE) >= 0) {}
|
||||
RECT rc;
|
||||
GetClientRect(g_hWnd, &rc);
|
||||
POINT center;
|
||||
center.x = (rc.right - rc.left) / 2;
|
||||
center.y = (rc.bottom - rc.top) / 2;
|
||||
ClientToScreen(g_hWnd, ¢er);
|
||||
SetCursorPos(center.x, center.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
while (ShowCursor(TRUE) < 0) {}
|
||||
ClipCursor(nullptr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (ShowCursor(TRUE) < 0) {}
|
||||
ClipCursor(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void CKeyboard::Tick(void) {}
|
||||
|
||||
EKeyboardResult CKeyboard::RequestKeyboard(LPCWSTR Title, LPCWSTR Text, DWORD dwPad, UINT uiMaxChars, int (*Func)(LPVOID, const bool), LPVOID lpParam,
|
||||
C_4JInput::EKeyboardMode eMode)
|
||||
|
||||
@@ -32,8 +32,6 @@ void SeedEditBox();
|
||||
class CKeyboard
|
||||
{
|
||||
public:
|
||||
CKeyboard();
|
||||
|
||||
enum EKeyboardProcessState
|
||||
{
|
||||
};
|
||||
@@ -42,87 +40,11 @@ public:
|
||||
{
|
||||
};
|
||||
|
||||
void Init();
|
||||
void Tick();
|
||||
void Tick(void);
|
||||
|
||||
void OnKeyDown(int vkCode);
|
||||
void OnKeyUp(int vkCode);
|
||||
void OnChar(wchar_t ch);
|
||||
|
||||
void OnMouseMove(int x, int y);
|
||||
void OnRawMouseDelta(int dx, int dy);
|
||||
void OnLButtonDown(int x, int y);
|
||||
void OnLButtonUp(int x, int y);
|
||||
void OnRButtonDown(int x, int y);
|
||||
void OnRButtonUp(int x, int y);
|
||||
void OnMButtonDown(int x, int y);
|
||||
void OnMButtonUp(int x, int y);
|
||||
void OnMouseWheel(int delta, int x, int y);
|
||||
|
||||
bool IsKeyDown(int vkCode) const;
|
||||
bool IsKeyPressed(int vkCode) const;
|
||||
bool IsKeyReleased(int vkCode) const;
|
||||
|
||||
int GetMouseX() const { return m_mouseX; }
|
||||
int GetMouseY() const { return m_mouseY; }
|
||||
|
||||
int GetRawMouseX() const { return m_mouseDeltaX; }
|
||||
int GetRawMouseY() const { return m_mouseDeltaY; }
|
||||
|
||||
bool IsLButtonDown() const { return m_lButtonCurr; }
|
||||
bool IsLButtonPressed() const { return m_lButtonCurr && !m_lButtonPrev; }
|
||||
bool IsLButtonReleased() const { return !m_lButtonCurr && m_lButtonPrev; }
|
||||
|
||||
bool IsRButtonDown() const { return m_rButtonCurr; }
|
||||
bool IsRButtonPressed() const { return m_rButtonCurr && !m_rButtonPrev; }
|
||||
bool IsRButtonReleased() const { return !m_rButtonCurr && m_rButtonPrev; }
|
||||
|
||||
int GetMouseWheelDelta() const { return m_mouseWheel; }
|
||||
|
||||
wchar_t GetLastChar() const { return m_charCount > 0 ? m_charBuffer[0] : 0; }
|
||||
bool HasChar() const { return m_charCount > 0; }
|
||||
int GetCharCount() const { return m_charCount; }
|
||||
wchar_t GetChar(int index) const { return (index >= 0 && index < m_charCount) ? m_charBuffer[index] : 0; }
|
||||
|
||||
int GetClipboardText(wchar_t *outText, int outCapacity) const;
|
||||
bool SetClipboardText(const wchar_t *text) const;
|
||||
|
||||
void SetMouseCaptured(bool captured);
|
||||
void SetWindowFocused(bool focused);
|
||||
bool IsMouseCaptured() const { return m_mouseCaptured; }
|
||||
bool IsWindowFocused() const { return m_windowFocused; }
|
||||
|
||||
void SetMousePos(int x, int y) { m_mouseX = x; m_mouseY = y; }
|
||||
|
||||
EKeyboardResult RequestKeyboard(LPCWSTR Title, LPCWSTR Text, DWORD dwPad, UINT uiMaxChars, int (*Func)(LPVOID, const bool), LPVOID lpParam,
|
||||
EKeyboardResult RequestKeyboard(LPCWSTR Title, LPCWSTR Text, DWORD dwPad, UINT uiMaxChars, int (*Func)(LPVOID, const bool), LPVOID lpParam,
|
||||
C_4JInput::EKeyboardMode eMode);
|
||||
void GetText(uint16_t *UTF16String);
|
||||
|
||||
|
||||
BYTE gap0[0x68];
|
||||
private:
|
||||
static const int MAX_KEYS = 256;
|
||||
static const int MAX_CHARS_PER_FRAME = 32;
|
||||
|
||||
bool m_keysPrev[MAX_KEYS];
|
||||
bool m_keysCurr[MAX_KEYS];
|
||||
|
||||
int m_mouseX, m_mouseY;
|
||||
bool m_lButtonPrev, m_lButtonCurr;
|
||||
bool m_rButtonPrev, m_rButtonCurr;
|
||||
bool m_mButtonPrev, m_mButtonCurr;
|
||||
int m_mouseWheel;
|
||||
|
||||
wchar_t m_charBuffer[MAX_CHARS_PER_FRAME];
|
||||
int m_charCount;
|
||||
|
||||
bool m_windowFocused;
|
||||
bool m_mouseCaptured;
|
||||
int m_mouseDeltaX, m_mouseDeltaY;
|
||||
int m_mouseDeltaAccumX, m_mouseDeltaAccumY;
|
||||
|
||||
wchar_t m_chrText[128];
|
||||
LPVOID m_lParam;
|
||||
int (*m_onInput)(LPVOID, LPCWSTR);
|
||||
|
||||
};
|
||||
@@ -78,8 +78,6 @@ void CInput::Initialise(int iInputStateC, unsigned char ucMapC, unsigned char uc
|
||||
m_Joypads[i].m_pucLeftTriggerAxisMap = &m_Joypads[i].m_ucLeftTriggerState;
|
||||
m_Joypads[i].m_pucRightTriggerAxisMap = &m_Joypads[i].m_ucRightTriggerState;
|
||||
m_Joypads[i].m_fSensitivity = 1.0f;
|
||||
|
||||
m_iTouchInputButton[i] = 0;
|
||||
}
|
||||
|
||||
m_JoypadMap = (unsigned int **)operator new[](ucMapC * sizeof(int *));
|
||||
@@ -98,6 +96,7 @@ void CInput::Tick(void)
|
||||
{
|
||||
HandleGamepadEvents();
|
||||
UpdateJoypads();
|
||||
m_Keyboard.Tick();
|
||||
}
|
||||
|
||||
void CInput::SetJoypadValues(JOYPAD *pThisPad)
|
||||
@@ -149,9 +148,13 @@ void CInput::SetJoypadValues(JOYPAD *pThisPad)
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_BACK;
|
||||
}
|
||||
|
||||
if (SDL_GetGamepadButton(pGamePad, SDL_GAMEPAD_BUTTON_TOUCHPAD))
|
||||
//str1k3r - Only check the touchpad if we have one
|
||||
if (SDL_GetNumGamepadTouchpads(pGamePad) > 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _PS_JOY_BUTTON_TOUCHPAD;
|
||||
if (SDL_GetGamepadButton(pGamePad, SDL_GAMEPAD_BUTTON_TOUCHPAD))
|
||||
{
|
||||
pThisPad->m_uiButtons |= _PS_JOY_BUTTON_TOUCHPAD;
|
||||
}
|
||||
}
|
||||
|
||||
if (SDL_GetGamepadButton(pGamePad, SDL_GAMEPAD_BUTTON_LEFT_STICK))
|
||||
@@ -350,11 +353,6 @@ unsigned char CInput::GetJoypadMapVal(int iPad)
|
||||
return m_Joypads[iPad].m_ucMappingValue;
|
||||
}
|
||||
|
||||
void CInput::MapTouchInput(int iPad, int button)
|
||||
{
|
||||
m_iTouchInputButton[iPad] |= button;
|
||||
}
|
||||
|
||||
void CInput::SetJoypadStickAxisMap(int iPad, unsigned int uiFrom, unsigned int uiTo)
|
||||
{
|
||||
float *pfTo = nullptr;
|
||||
@@ -435,11 +433,6 @@ bool CInput::IsSelectBackSwapped()
|
||||
return m_bSelectBackSwapped;
|
||||
}
|
||||
|
||||
bool CInput::IsPadActive(int iPad)
|
||||
{
|
||||
return m_Joypads[iPad].m_bControllerActive;
|
||||
}
|
||||
|
||||
void CInput::SetSigninJoypadMask(unsigned int mask)
|
||||
{
|
||||
m_uiSigninJoypadMask = mask;
|
||||
@@ -537,22 +530,22 @@ bool CInput::ButtonDown(int iPad, unsigned char ucAction)
|
||||
|
||||
float CInput::GetJoypadStick_Menu_LX(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_iNormalizedLeftThumbX;
|
||||
return static_cast<float>(m_Joypads[ucPad].m_iNormalizedLeftThumbX);
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_Menu_LY(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_iNormalizedLeftThumbY;
|
||||
return static_cast<float>(m_Joypads[ucPad].m_iNormalizedLeftThumbY);
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_Menu_RX(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_iNormalizedRightThumbX;
|
||||
return static_cast<float>(m_Joypads[ucPad].m_iNormalizedRightThumbX);
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_Menu_RY(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_iNormalizedRightThumbY;
|
||||
return static_cast<float>(m_Joypads[ucPad].m_iNormalizedRightThumbY);
|
||||
}
|
||||
|
||||
unsigned char CInput::GetJoypadLTrigger_Menu(unsigned char ucPad)
|
||||
@@ -638,7 +631,7 @@ void CInput::SetKeyRepeatRate(float fRepeatDelaySecs, float fRepeatRateSecs)
|
||||
|
||||
void CInput::SetDebugSequence(const char *chSequenceA, int (*Func)(LPVOID), LPVOID lpParam)
|
||||
{
|
||||
int iLen = strlen(chSequenceA);
|
||||
int iLen = static_cast<int>(strlen(chSequenceA));
|
||||
|
||||
m_sDebugSequenceName = (char *)operator new[](iLen);
|
||||
strcpy(m_sDebugSequenceName, chSequenceA);
|
||||
@@ -653,7 +646,6 @@ FLOAT CInput::GetIdleSeconds(int iPad)
|
||||
QueryPerformanceCounter(&qwDeltaTime);
|
||||
|
||||
LARGE_INTEGER fElapsedTime = this->m_LastActivityTime[iPad];
|
||||
uint64_t qwNewTime = qwDeltaTime.QuadPart - fElapsedTime.QuadPart;
|
||||
|
||||
return this->m_fTickToSeconds * (qwDeltaTime.LowPart - fElapsedTime.LowPart);
|
||||
}
|
||||
@@ -796,39 +788,27 @@ bool CInput::UpdateJoypads()
|
||||
if (pThisPad->m_bIsConnected)
|
||||
{
|
||||
SetJoypadValues(pThisPad);
|
||||
|
||||
pThisPad->m_uiButtonsPressed = ~pThisPad->m_uiOldButtons & pThisPad->m_uiButtons;
|
||||
pThisPad->m_uiButtonsReleased = ~pThisPad->m_uiButtons & pThisPad->m_uiOldButtons;
|
||||
|
||||
for (int bit = 0; bit < 24; ++bit)
|
||||
{
|
||||
if ((pThisPad->m_uiButtonsPressed & (1 << bit)) != 0)
|
||||
{
|
||||
GetStartTime(i, bit);
|
||||
}
|
||||
else if ((pThisPad->m_uiButtons & (1 << bit)) != 0)
|
||||
{
|
||||
UpdateTime(i, bit);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pThisPad->m_bWasConnected)
|
||||
{
|
||||
ClearJoypadValues(pThisPad);
|
||||
}
|
||||
|
||||
if (m_iTouchInputButton[i])
|
||||
{
|
||||
pThisPad->m_uiButtons |= m_iTouchInputButton[i];
|
||||
}
|
||||
|
||||
m_iTouchInputButton[i] = 0;
|
||||
|
||||
pThisPad->m_uiButtonsPressed = ~pThisPad->m_uiOldButtons & pThisPad->m_uiButtons;
|
||||
pThisPad->m_uiButtonsReleased = ~pThisPad->m_uiButtons & pThisPad->m_uiOldButtons;
|
||||
|
||||
for (int bit = 0; bit < 24; ++bit)
|
||||
{
|
||||
if ((pThisPad->m_uiButtonsPressed & (1 << bit)) != 0)
|
||||
{
|
||||
GetStartTime(i, bit);
|
||||
}
|
||||
else if ((pThisPad->m_uiButtons & (1 << bit)) != 0)
|
||||
{
|
||||
UpdateTime(i, bit);
|
||||
}
|
||||
}
|
||||
|
||||
if (pThisPad->m_uiButtonsPressed)
|
||||
pThisPad->m_bControllerActive = true;
|
||||
else
|
||||
pThisPad->m_bControllerActive = false;
|
||||
|
||||
if (m_pDebugSequenceFn && (pThisPad->m_uiButtonsPressed & (_360_JOY_BUTTON_A | _360_JOY_BUTTON_B | _360_JOY_BUTTON_X | _360_JOY_BUTTON_Y |
|
||||
_360_JOY_BUTTON_RB | _360_JOY_BUTTON_LB)) != 0)
|
||||
{
|
||||
@@ -904,7 +884,7 @@ void CInput::InitTime(void)
|
||||
LARGE_INTEGER qwTicksPerSec;
|
||||
QueryPerformanceFrequency(&qwTicksPerSec);
|
||||
|
||||
m_fTickToSeconds = 1.0 / (float)(int)qwTicksPerSec.LowPart;
|
||||
m_fTickToSeconds = static_cast<float>(1.0 / qwTicksPerSec.LowPart);
|
||||
for (int i = 0; i < MAX_JOYPADS; i++)
|
||||
{
|
||||
m_LastActivityTime[i].QuadPart = 0;
|
||||
|
||||
@@ -38,7 +38,6 @@ public:
|
||||
bool m_bIsConnected;
|
||||
bool m_bWasConnected;
|
||||
bool m_bHasConnected;
|
||||
bool m_bControllerActive;
|
||||
|
||||
unsigned int m_uiButtons;
|
||||
unsigned int m_uiOldButtons;
|
||||
@@ -74,7 +73,7 @@ public:
|
||||
BYTE *m_pucRightTriggerAxisMap;
|
||||
|
||||
unsigned char m_ucMappingValue;
|
||||
unsigned char m_ucInputStateIndex;
|
||||
int m_ucInputStateIndex;
|
||||
SDL_Gamepad *m_pGamepad;
|
||||
};
|
||||
|
||||
@@ -106,14 +105,12 @@ public:
|
||||
void SetJoypadMapVal(int iPad, unsigned char ucMap);
|
||||
unsigned char GetJoypadMapVal(int iPad);
|
||||
|
||||
void MapTouchInput(int iPad, int button);
|
||||
void SetJoypadStickAxisMap(int iPad, unsigned int uiFrom, unsigned int uiTo);
|
||||
void SetJoypadStickTriggerMap(int iPad, unsigned int uiFrom, unsigned int uiTo);
|
||||
|
||||
bool IsPadConnected(int iPad);
|
||||
void SetSelectBackSwapped(bool swapped);
|
||||
bool IsSelectBackSwapped();
|
||||
bool IsPadActive(int iPad);
|
||||
void SetSigninJoypadMask(unsigned int mask);
|
||||
unsigned int GetValue(int iPad, unsigned char ucAction, bool bRepeat = false);
|
||||
bool IsSet(int iPad, unsigned char ucAction);
|
||||
@@ -191,8 +188,6 @@ public:
|
||||
int (*m_pDebugSequenceFn)(void *);
|
||||
LPVOID m_pDebugSequenceParam;
|
||||
|
||||
unsigned int m_iTouchInputButton[MAX_JOYPADS];
|
||||
|
||||
private:
|
||||
EControllerType GetControllerName(SDL_GamepadType type)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
#include "4J_Input.h"
|
||||
#include "INP_Main.h"
|
||||
|
||||
C_4JInput InputManager;
|
||||
|
||||
void C_4JInput::Initialise(int iInputStateC, unsigned char ucMapC, unsigned char ucActionC, unsigned char ucMenuActionC)
|
||||
{
|
||||
InternalInputManager.Initialise(iInputStateC, ucMapC, ucActionC, ucMenuActionC);
|
||||
}
|
||||
|
||||
void C_4JInput::Tick(void)
|
||||
{
|
||||
InternalInputManager.Tick();
|
||||
}
|
||||
|
||||
void C_4JInput::SetDeadzoneAndMovementRange(unsigned int uiDeadzone, unsigned int uiMovementRangeMax)
|
||||
{
|
||||
InternalInputManager.SetDeadzoneAndMovementRange(uiDeadzone, uiMovementRangeMax);
|
||||
}
|
||||
|
||||
void C_4JInput::SetGameJoypadMaps(unsigned char ucMap, unsigned char ucAction, unsigned int uiActionVal)
|
||||
{
|
||||
InternalInputManager.SetGameJoypadMaps(ucMap, ucAction, uiActionVal);
|
||||
}
|
||||
|
||||
unsigned int C_4JInput::GetGameJoypadMaps(unsigned char ucMap, unsigned char ucAction)
|
||||
{
|
||||
return InternalInputManager.GetGameJoypadMaps(ucMap, ucAction);
|
||||
}
|
||||
|
||||
void C_4JInput::SetJoypadMapVal(int iPad, unsigned char ucMap)
|
||||
{
|
||||
InternalInputManager.SetJoypadMapVal(iPad, ucMap);
|
||||
}
|
||||
|
||||
unsigned char C_4JInput::GetJoypadMapVal(int iPad)
|
||||
{
|
||||
return InternalInputManager.GetJoypadMapVal(iPad);
|
||||
}
|
||||
|
||||
void C_4JInput::SetJoypadSensitivity(int iPad, float fSensitivity)
|
||||
{
|
||||
InternalInputManager.SetJoypadSensitivity(iPad, fSensitivity);
|
||||
}
|
||||
|
||||
unsigned int C_4JInput::GetValue(int iPad, unsigned char ucAction, bool bRepeat)
|
||||
{
|
||||
return InternalInputManager.GetValue(iPad, ucAction, bRepeat);
|
||||
}
|
||||
|
||||
bool C_4JInput::ButtonPressed(int iPad, unsigned char ucAction)
|
||||
{
|
||||
return InternalInputManager.ButtonPressed(iPad, ucAction);
|
||||
}
|
||||
|
||||
bool C_4JInput::ButtonReleased(int iPad, unsigned char ucAction)
|
||||
{
|
||||
return InternalInputManager.ButtonReleased(iPad, ucAction);
|
||||
}
|
||||
|
||||
bool C_4JInput::ButtonDown(int iPad, unsigned char ucAction)
|
||||
{
|
||||
return InternalInputManager.ButtonDown(iPad, ucAction);
|
||||
}
|
||||
|
||||
void C_4JInput::SetJoypadStickAxisMap(int iPad, unsigned int uiFrom, unsigned int uiTo)
|
||||
{
|
||||
InternalInputManager.SetJoypadStickAxisMap(iPad, uiFrom, uiTo);
|
||||
}
|
||||
|
||||
void C_4JInput::SetJoypadStickTriggerMap(int iPad, unsigned int uiFrom, unsigned int uiTo)
|
||||
{
|
||||
InternalInputManager.SetJoypadStickTriggerMap(iPad, uiFrom, uiTo);
|
||||
}
|
||||
|
||||
void C_4JInput::SetKeyRepeatRate(float fRepeatDelaySecs, float fRepeatRateSecs)
|
||||
{
|
||||
InternalInputManager.SetKeyRepeatRate(fRepeatDelaySecs, fRepeatRateSecs);
|
||||
}
|
||||
|
||||
void C_4JInput::SetDebugSequence(const char *chSequenceA, int (*Func)(LPVOID), LPVOID lpParam)
|
||||
{
|
||||
InternalInputManager.SetDebugSequence(chSequenceA, Func, lpParam);
|
||||
}
|
||||
|
||||
FLOAT C_4JInput::GetIdleSeconds(int iPad)
|
||||
{
|
||||
return InternalInputManager.GetIdleSeconds(iPad);
|
||||
}
|
||||
|
||||
bool C_4JInput::IsPadConnected(int iPad)
|
||||
{
|
||||
return InternalInputManager.IsPadConnected(iPad);
|
||||
}
|
||||
|
||||
float C_4JInput::GetJoypadStick_LX(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadStick_LX(iPad, bCheckMenuDisplay);
|
||||
}
|
||||
|
||||
float C_4JInput::GetJoypadStick_LY(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadStick_LY(iPad, bCheckMenuDisplay);
|
||||
}
|
||||
|
||||
float C_4JInput::GetJoypadStick_RX(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadStick_RX(iPad, bCheckMenuDisplay);
|
||||
}
|
||||
|
||||
float C_4JInput::GetJoypadStick_RY(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadStick_RY(iPad, bCheckMenuDisplay);
|
||||
}
|
||||
|
||||
unsigned char C_4JInput::GetJoypadLTrigger(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadLTrigger(iPad, bCheckMenuDisplay);
|
||||
}
|
||||
|
||||
unsigned char C_4JInput::GetJoypadRTrigger(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
return InternalInputManager.GetJoypadRTrigger(iPad, bCheckMenuDisplay);
|
||||
}
|
||||
|
||||
void C_4JInput::SetMenuDisplayed(int iPad, bool bVal)
|
||||
{
|
||||
InternalInputManager.SetMenuDisplayed(iPad, bVal);
|
||||
}
|
||||
|
||||
C_4JInput::EKeyboardResult C_4JInput::RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiText, DWORD dwPad, WCHAR *pwchResult, UINT uiMaxChars, int(*Func)(LPVOID, const bool), LPVOID lpParam, EKeyboardMode eMode)
|
||||
{
|
||||
return InternalInputManager.m_Keyboard.RequestKeyboard(uiTitle, uiText, NULL, dwPad, pwchResult, uiMaxChars, Func, lpParam, eMode);
|
||||
}
|
||||
|
||||
C_4JInput::EKeyboardResult C_4JInput::RequestKeyboard(LPCWSTR uiTitle, LPCWSTR pwchDefault, LPCWSTR uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiMaxChars, int(*Func)(LPVOID, const bool), LPVOID lpParam, EKeyboardMode eMode)
|
||||
{
|
||||
return InternalInputManager.m_Keyboard.RequestKeyboard(uiTitle, pwchDefault, uiDesc, dwPad, pwchResult, uiMaxChars, Func, lpParam, eMode);
|
||||
}
|
||||
|
||||
//str1k3r - 3rd RequestKeyboard is for how iggy calls it
|
||||
C_4JInput::EKeyboardResult C_4JInput::RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiDesc, DWORD dwPad, UINT uiMaxChars, int(*Func)(LPVOID, const bool), LPVOID lpParam, EKeyboardMode eMode)
|
||||
{
|
||||
return InternalInputManager.m_Keyboard.RequestKeyboard(uiTitle, NULL, uiDesc, dwPad, NULL, uiMaxChars, Func, lpParam, eMode);
|
||||
}
|
||||
|
||||
C4JStorage::EMessageResult C_4JInput::RequestMessageBox(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR *uiButtons, UINT uiButtonCount, DWORD dwPad, int(*Func)(LPVOID, int, const C4JStorage::EMessageResult), LPVOID lpParam, DWORD dwFocusButton)
|
||||
{
|
||||
return InternalInputManager.m_MessageUI.RequestMessageBox(uiTitle, uiText, uiButtons, uiButtonCount, dwPad, Func, lpParam, dwFocusButton);
|
||||
}
|
||||
|
||||
/*void C_4JInput::GetText(uint16_t *UTF16String)
|
||||
{
|
||||
InternalInputManager.m_Keyboard.GetText(UTF16String);
|
||||
}
|
||||
|
||||
bool C_4JInput::VerifyStrings(WCHAR **pwStringA, int iStringC, int (*Func)(LPVOID, STRING_VERIFY_RESPONSE *), LPVOID lpParam)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void C_4JInput::CancelQueuedVerifyStrings(int (*Func)(LPVOID, STRING_VERIFY_RESPONSE *), LPVOID lpParam) {}
|
||||
|
||||
void C_4JInput::CancelAllVerifyInProgress(void) {}
|
||||
|
||||
bool C_4JInput::InputDetected(DWORD dwUserIndex,WCHAR *pwchInput) {}*/
|
||||
@@ -0,0 +1,111 @@
|
||||
#include "INP_ForceFeedback.h"
|
||||
#include "INP_Main.h"
|
||||
|
||||
void CForceFeedback::Initialise(int iInputStateC, unsigned char ucMapC, unsigned char ucActionC, unsigned char ucMenuActionC)
|
||||
{
|
||||
m_Effects = new FF_EFFECT[MAX_EFFECTS];
|
||||
m_EffectC = 0;
|
||||
|
||||
LARGE_INTEGER qwTicksPerSec;
|
||||
QueryPerformanceFrequency(&qwTicksPerSec);
|
||||
|
||||
m_TicksPerSecond = qwTicksPerSec.LowPart;
|
||||
m_unkBool = 0;
|
||||
}
|
||||
|
||||
void CForceFeedback::RumbleEnable(int iQuadrant, bool bRumbleEnabled) {}
|
||||
|
||||
void CForceFeedback::CreateEffect(void)
|
||||
{
|
||||
assert(m_EffectC < MAX_EFFECTS);
|
||||
|
||||
FF_EFFECT *pEffect = &m_Effects[m_EffectC];
|
||||
pEffect->m_uiDurationMs = 5;
|
||||
pEffect->m_uiMagnitude = 500;
|
||||
pEffect->m_uiEffectType = 0;
|
||||
pEffect->dword18 = 10;
|
||||
pEffect->dword18 = 100;
|
||||
|
||||
m_EffectC++;
|
||||
}
|
||||
|
||||
void CForceFeedback::AddEffectInstance(unsigned int uiEffect)
|
||||
{
|
||||
FF_EFFECT_INSTANCE *pEffectInst = new FF_EFFECT_INSTANCE();
|
||||
pEffectInst->m_Effect = &m_Effects[uiEffect];
|
||||
pEffectInst->m_uiInst = 0;
|
||||
|
||||
m_EffectList.AddToTail(pEffectInst);
|
||||
}
|
||||
|
||||
void CForceFeedback::SetEffectInstanceState(unsigned int uiEffectInstance, unsigned int uiState)
|
||||
{
|
||||
int iCount = 0;
|
||||
LinkedList::_LL_NODE *pNode;
|
||||
for (pNode = m_EffectList.m_Head;; pNode = pNode->m_Next)
|
||||
{
|
||||
if ((iCount++) == uiEffectInstance)
|
||||
break;
|
||||
}
|
||||
pNode->GetDataAs<FF_EFFECT_INSTANCE>()->m_bIsActive = true;
|
||||
}
|
||||
|
||||
void CForceFeedback::ProcessEventInstance(FF_EFFECT_INSTANCE *pEffectInst) {}
|
||||
|
||||
void CForceFeedback::PauseEventInstance(FF_EFFECT_INSTANCE *pEffectInst) {}
|
||||
|
||||
void CForceFeedback::AddRumble(unsigned int uiPad, WORD leftMotorSpeed, WORD rightMotorSpeed, float fSeconds)
|
||||
{
|
||||
RUMBLE_EFFECT *pRumble = new RUMBLE_EFFECT();
|
||||
|
||||
LARGE_INTEGER qwCurrentTime;
|
||||
QueryPerformanceCounter(&qwCurrentTime);
|
||||
|
||||
pRumble->m_TimeLeft = (m_TicksPerSecond * fSeconds) + qwCurrentTime.QuadPart;
|
||||
pRumble->m_RumbleData.wLeftMotorSpeed = leftMotorSpeed;
|
||||
pRumble->m_RumbleData.wRightMotorSpeed = rightMotorSpeed;
|
||||
pRumble->m_Pad = uiPad;
|
||||
|
||||
m_RumbleList.AddToTail(pRumble);
|
||||
}
|
||||
|
||||
void CForceFeedback::Tick(void)
|
||||
{
|
||||
for (LinkedList::_LL_NODE *pEffectNode = m_EffectList.m_Head; pEffectNode; pEffectNode = pEffectNode->m_Next)
|
||||
{
|
||||
if (pEffectNode->GetDataAs<FF_EFFECT_INSTANCE>()->m_bIsActive)
|
||||
{
|
||||
ProcessEventInstance(pEffectNode->GetDataAs<FF_EFFECT_INSTANCE>());
|
||||
}
|
||||
}
|
||||
|
||||
LARGE_INTEGER qwCurrentTime;
|
||||
QueryPerformanceCounter(&qwCurrentTime);
|
||||
|
||||
LinkedList::_LL_NODE *pRumbleNode = m_RumbleList.m_Head;
|
||||
while (pRumbleNode)
|
||||
{
|
||||
if (pRumbleNode->GetDataAs<RUMBLE_EFFECT>()->m_TimeLeft <= qwCurrentTime.QuadPart)
|
||||
{
|
||||
RUMBLE_EFFECT *pRumble = pRumbleNode->GetDataAs<RUMBLE_EFFECT>();
|
||||
|
||||
pRumble->m_RumbleData.wLeftMotorSpeed = 0;
|
||||
pRumble->m_RumbleData.wRightMotorSpeed = 0;
|
||||
|
||||
XInputSetState(pRumble->m_Pad, &pRumble->m_RumbleData);
|
||||
|
||||
m_RumbleList.RemoveNode(pRumbleNode);
|
||||
|
||||
LinkedList::_LL_NODE *pTemp = pRumbleNode;
|
||||
pRumbleNode = pRumbleNode->m_Next;
|
||||
|
||||
delete pTemp->GetDataAs<RUMBLE_EFFECT>();
|
||||
delete pTemp;
|
||||
}
|
||||
else
|
||||
{
|
||||
XInputSetState(pRumbleNode->GetDataAs<RUMBLE_EFFECT>()->m_Pad, &pRumbleNode->GetDataAs<RUMBLE_EFFECT>()->m_RumbleData);
|
||||
pRumbleNode = pRumbleNode->m_Next;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
#include "LinkedList.h"
|
||||
|
||||
#define MAX_EFFECTS 10
|
||||
|
||||
class CForceFeedback
|
||||
{
|
||||
public:
|
||||
enum FF_PARAMS
|
||||
{
|
||||
FF_PARAMS_RAMP,
|
||||
FF_PARAMS_PERIODIC
|
||||
};
|
||||
|
||||
struct RUMBLE_EFFECT
|
||||
{
|
||||
DWORD m_Pad;
|
||||
uint64_t m_TimeLeft;
|
||||
XINPUT_VIBRATION m_RumbleData;
|
||||
WORD unk;
|
||||
};
|
||||
|
||||
struct FF_EFFECT
|
||||
{
|
||||
unsigned int m_uiEffectType;
|
||||
unsigned int m_uiDurationMs;
|
||||
BYTE gap8[4];
|
||||
unsigned int m_uiMagnitude;
|
||||
BYTE gap10[8];
|
||||
DWORD dword18;
|
||||
DWORD dword1C;
|
||||
};
|
||||
|
||||
struct FF_EFFECT_INSTANCE
|
||||
{
|
||||
bool m_bIsActive;
|
||||
unsigned int m_uiInst;
|
||||
CForceFeedback::FF_EFFECT *m_Effect;
|
||||
};
|
||||
|
||||
void Initialise(int iInputStateC, unsigned char ucMapC, unsigned char ucActionC, unsigned char ucMenuActionC);
|
||||
void RumbleEnable(int iQuadrant, bool bRumbleEnabled);
|
||||
void CreateEffect(void);
|
||||
void AddEffectInstance(unsigned int uiEffect);
|
||||
void SetEffectInstanceState(unsigned int uiEffectInstance, unsigned int uiState);
|
||||
|
||||
void ProcessEventInstance(FF_EFFECT_INSTANCE *pEffectInst);
|
||||
void PauseEventInstance(FF_EFFECT_INSTANCE *pEffectInst);
|
||||
|
||||
void AddRumble(unsigned int uiPad, WORD leftMotorSpeed, WORD rightMotorSpeed, float fSeconds);
|
||||
|
||||
void Tick(void);
|
||||
|
||||
LinkedList m_EffectList;
|
||||
FF_EFFECT *m_Effects;
|
||||
int m_EffectC;
|
||||
LinkedList m_RumbleList;
|
||||
float m_TicksPerSecond;
|
||||
bool m_unkBool;
|
||||
};
|
||||
@@ -0,0 +1,104 @@
|
||||
#include "4J_Profile.h"
|
||||
#include "INP_Keyboard.h"
|
||||
|
||||
CKeyboard::CKeyboard()
|
||||
{
|
||||
bActive = false;
|
||||
pwchResult = L"";
|
||||
}
|
||||
|
||||
void CKeyboard::Tick(void)
|
||||
{
|
||||
if (bActive && KeyboardOverlap.InternalLow != ERROR_IO_PENDING)
|
||||
{
|
||||
if(Func != NULL) Func(lpParam, KeyboardOverlap.dwExtendedError == 0);
|
||||
bActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
C_4JInput::EKeyboardResult CKeyboard::RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiMaxChars, int (*Func)(LPVOID, const bool), LPVOID lpParam, C_4JInput::EKeyboardMode eMode)
|
||||
{
|
||||
if (bActive)
|
||||
return C_4JInput::EKeyboard_Cancelled;
|
||||
|
||||
this->iPad = (int)dwPad;
|
||||
this->pwchResult = pwchResult;
|
||||
this->uiMaxChars = uiMaxChars;
|
||||
this->Func = Func;
|
||||
this->lpParam = lpParam;
|
||||
|
||||
int LockedProfile = this->iPad;
|
||||
if (LockedProfile == -1)
|
||||
{
|
||||
LockedProfile = ProfileManager.GetLockedProfile();
|
||||
if (LockedProfile == -1)
|
||||
{
|
||||
LockedProfile = ProfileManager.GetLockedProfile();
|
||||
if (LockedProfile == -1)
|
||||
return C_4JInput::EKeyboard_Cancelled;
|
||||
}
|
||||
}
|
||||
|
||||
switch (eMode)
|
||||
{
|
||||
//str1k3r - look at xam.h for the modes
|
||||
case C_4JInput::EKeyboardMode_Numeric:
|
||||
keyboardMode = VKBD_LATIN_NUMERIC;
|
||||
break;
|
||||
case C_4JInput::EKeyboardMode_Password:
|
||||
keyboardMode = VKBD_LATIN_PASSWORD;
|
||||
break;
|
||||
//str1k3r - Alphabet and Full need multi lang support
|
||||
case C_4JInput::EKeyboardMode_Alphabet:
|
||||
keyboardMode = VKBD_LATIN_ALPHABET;
|
||||
break;
|
||||
case C_4JInput::EKeyboardMode_Full:
|
||||
keyboardMode = VKBD_LATIN_FULL;
|
||||
break;
|
||||
case C_4JInput::EKeyboardMode_Alphabet_Extended:
|
||||
keyboardMode = VKBD_LATIN_EXTENDED;
|
||||
break;
|
||||
case C_4JInput::EKeyboardMode_IP_Address:
|
||||
keyboardMode = VKBD_LATIN_IP_ADDRESS;
|
||||
break;
|
||||
case C_4JInput::EKeyboardMode_Phone:
|
||||
keyboardMode = VKBD_LATIN_PHONE;
|
||||
break;
|
||||
case C_4JInput::EKeyboardMode_Email:
|
||||
keyboardMode = VKBD_LATIN_EMAIL;
|
||||
break;
|
||||
default:
|
||||
keyboardMode = VKBD_DEFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
ZeroMemory(&KeyboardOverlap, sizeof(XOVERLAPPED));
|
||||
|
||||
for (;;)
|
||||
{
|
||||
DWORD result = XShowKeyboardUI(LockedProfile, keyboardMode, uiText, uiTitle, uiDesc, this->pwchResult, this->uiMaxChars, &KeyboardOverlap);
|
||||
if (result == ERROR_IO_PENDING)
|
||||
break;
|
||||
if (result != ERROR_ACCESS_DENIED)
|
||||
return C_4JInput::EKeyboard_Cancelled;
|
||||
Sleep(250);
|
||||
}
|
||||
|
||||
bActive = true;
|
||||
return eState;
|
||||
}
|
||||
|
||||
//str1k3r - These 2 only exist cause of iggy
|
||||
C_4JInput::EKeyboardResult CKeyboard::RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR uiDesc, DWORD dwPad, UINT uiMaxChars, int(*Func)(LPVOID, const bool), LPVOID lpParam, C_4JInput::EKeyboardMode eMode)
|
||||
{
|
||||
return RequestKeyboard(uiTitle, uiText, uiDesc, dwPad, pwchResult, uiMaxChars, Func, lpParam, eMode);
|
||||
}
|
||||
|
||||
void CKeyboard::GetText(uint16_t *UTF16String)
|
||||
{
|
||||
//uint16_t *keyString;
|
||||
//for (unsigned int index = 0; keyString[index] && index < 0x200; index++)
|
||||
//{
|
||||
// UTF16String[index] = keyString[index];
|
||||
//}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include "4J_Input.h"
|
||||
|
||||
class CKeyboard
|
||||
{
|
||||
private:
|
||||
XOVERLAPPED KeyboardOverlap;
|
||||
C_4JInput::EKeyboardResult eState;
|
||||
|
||||
int iPad;
|
||||
int keyboardMode;
|
||||
UINT uiMaxChars;
|
||||
WCHAR *pwchResult;
|
||||
bool bActive;
|
||||
|
||||
int(*Func)(LPVOID lpParam, bool bSet);
|
||||
LPVOID lpParam;
|
||||
public:
|
||||
CKeyboard();
|
||||
void Tick(void);
|
||||
|
||||
C_4JInput::EKeyboardResult RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiMaxChars, int (*Func)(LPVOID, const bool), LPVOID lpParam, C_4JInput::EKeyboardMode eMode = C_4JInput::EKeyboardMode_Default);
|
||||
|
||||
//str1k3r - These 2 only exist cause of iggy
|
||||
C_4JInput::EKeyboardResult RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR uiDesc, DWORD dwPad, UINT uiMaxChars, int(*Func)(LPVOID, const bool), LPVOID lpParam, C_4JInput::EKeyboardMode eMode);
|
||||
void GetText(uint16_t *UTF16String);
|
||||
};
|
||||
@@ -0,0 +1,733 @@
|
||||
#include "INP_Main.h"
|
||||
|
||||
CInput InternalInputManager;
|
||||
|
||||
CInput::CInput()
|
||||
{
|
||||
m_Keyboard = CKeyboard();
|
||||
|
||||
m_uiSigninJoypadMask = 0;
|
||||
for (int i = 0; i < 4; ++i)
|
||||
m_bIsMenuDisplayed[i] = 0;
|
||||
|
||||
InitTime();
|
||||
|
||||
m_fRepeatDelaySecs = 0.5f;
|
||||
m_fRepeatRateSecs = 0.8f;
|
||||
m_sDebugSequenceName = 0;
|
||||
m_uiDebugSequenceIndex = 0;
|
||||
m_pDebugSequenceFn = 0;
|
||||
}
|
||||
|
||||
void CInput::Initialise(int iInputStateC, unsigned char ucMapC, unsigned char ucActionC, unsigned char ucMenuActionC)
|
||||
{
|
||||
assert(iInputStateC > 0);
|
||||
assert(ucMapC > 0);
|
||||
assert(ucActionC > 0);
|
||||
|
||||
ZeroMemory(m_Joypads, sizeof(m_Joypads));
|
||||
|
||||
m_ucInputStateC = iInputStateC;
|
||||
|
||||
m_iDeadzone = 0x2710;
|
||||
m_iMovementRangeMax = 0x7FFF;
|
||||
|
||||
m_iEffectiveRange = m_iMovementRangeMax - m_iDeadzone;
|
||||
m_iHalfRange = m_iEffectiveRange / 2;
|
||||
m_fEffectiveRange = (float)m_iEffectiveRange;
|
||||
|
||||
for (int i = 0; i < MAX_JOYPADS; i++)
|
||||
{
|
||||
m_Joypads[i].m_pInputStates = new XINPUT_STATE[m_ucInputStateC];
|
||||
m_Joypads[i].m_ucInputStateIndex = -1;
|
||||
m_Joypads[i].m_pfLeftThumbXAxisMap = &m_Joypads[i].m_fNormalizedLeftThumbX;
|
||||
m_Joypads[i].m_pfLeftThumbYAxisMap = &m_Joypads[i].m_fNormalizedLeftThumbY;
|
||||
m_Joypads[i].m_pfRightThumbXAxisMap = &m_Joypads[i].m_fNormalizedRightThumbX;
|
||||
m_Joypads[i].m_pfRightThumbYAxisMap = &m_Joypads[i].m_fNormalizedRightThumbY;
|
||||
m_Joypads[i].m_pucLeftTriggerAxisMap = &m_Joypads[i].m_ucLeftTriggerState;
|
||||
m_Joypads[i].m_pucRightTriggerAxisMap = &m_Joypads[i].m_ucRightTriggerState;
|
||||
m_Joypads[i].m_fSensitivity = 1.0f;
|
||||
}
|
||||
|
||||
m_JoypadMap = (unsigned int **)operator new[](ucMapC * sizeof(int *));
|
||||
for (int i = 0; i < ucMapC; i++)
|
||||
{
|
||||
m_JoypadMap[i] = (unsigned int *)operator new[](ucActionC * sizeof(int));
|
||||
}
|
||||
|
||||
m_ucJoypadMapC = ucMapC;
|
||||
m_ucJoypadMapActionC = ucActionC;
|
||||
m_ucMenuActionC = ucMenuActionC;
|
||||
m_bJoypadMapArrayIsSetup = false;
|
||||
}
|
||||
|
||||
void CInput::Tick(void)
|
||||
{
|
||||
UpdateJoypads();
|
||||
m_Keyboard.Tick();
|
||||
}
|
||||
|
||||
void CInput::SetJoypadValues(JOYPAD *pThisPad)
|
||||
{
|
||||
XINPUT_GAMEPAD *pGamePad = &pThisPad->m_pInputStates[pThisPad->m_ucInputStateIndex].Gamepad;
|
||||
|
||||
if (pGamePad->bLeftTrigger > 0x7Fu)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LT;
|
||||
}
|
||||
if (pGamePad->bRightTrigger > 0x7Fu)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RT;
|
||||
}
|
||||
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_RIGHT_SHOULDER) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RB;
|
||||
}
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_LEFT_SHOULDER) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LB;
|
||||
}
|
||||
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_A) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_A;
|
||||
}
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_B) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_B;
|
||||
}
|
||||
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_X) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_X;
|
||||
}
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_Y) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_Y;
|
||||
}
|
||||
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_START) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_START;
|
||||
}
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_BACK) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_BACK;
|
||||
}
|
||||
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_LEFT_THUMB) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LTHUMB;
|
||||
}
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_RIGHT_THUMB) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RTHUMB;
|
||||
}
|
||||
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_DPAD_UP) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_DPAD_UP;
|
||||
}
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_DPAD_DOWN) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_DPAD_DOWN;
|
||||
}
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_DPAD_LEFT) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_DPAD_LEFT;
|
||||
}
|
||||
if ((pGamePad->wButtons & XINPUT_GAMEPAD_DPAD_RIGHT) != 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_DPAD_RIGHT;
|
||||
}
|
||||
|
||||
if (pGamePad->sThumbLX > m_iHalfRange + m_iDeadzone)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LSTICK_RIGHT;
|
||||
}
|
||||
if (pGamePad->sThumbLX < -m_iDeadzone - m_iHalfRange)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LSTICK_LEFT;
|
||||
}
|
||||
|
||||
if (pGamePad->sThumbRY < -m_iDeadzone - m_iHalfRange)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RSTICK_DOWN;
|
||||
}
|
||||
if (pGamePad->sThumbRY > m_iHalfRange + m_iDeadzone)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RSTICK_UP;
|
||||
}
|
||||
if (pGamePad->sThumbRX > m_iHalfRange + m_iDeadzone)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RSTICK_RIGHT;
|
||||
}
|
||||
if (pGamePad->sThumbRX < -m_iDeadzone - m_iHalfRange)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_RSTICK_LEFT;
|
||||
}
|
||||
|
||||
if (pGamePad->sThumbLY < -m_iDeadzone - m_iHalfRange)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LSTICK_DOWN;
|
||||
}
|
||||
if (pGamePad->sThumbLY > m_iHalfRange + m_iDeadzone)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_LSTICK_UP;
|
||||
}
|
||||
|
||||
pThisPad->m_ucLeftTriggerState = pGamePad->bLeftTrigger;
|
||||
pThisPad->m_ucRightTriggerState = pGamePad->bRightTrigger;
|
||||
|
||||
if (pGamePad->sThumbRX <= m_iDeadzone)
|
||||
{
|
||||
if (pGamePad->sThumbRX >= -m_iDeadzone)
|
||||
pThisPad->m_iRightThumbX = 0;
|
||||
else
|
||||
pThisPad->m_iRightThumbX = m_iDeadzone + pGamePad->sThumbRX;
|
||||
}
|
||||
else
|
||||
{
|
||||
pThisPad->m_iRightThumbX = pGamePad->sThumbRX - m_iDeadzone;
|
||||
}
|
||||
if (pGamePad->sThumbRY <= m_iDeadzone)
|
||||
{
|
||||
if (pGamePad->sThumbRY >= -m_iDeadzone)
|
||||
pThisPad->m_iRightThumbY = 0;
|
||||
else
|
||||
pThisPad->m_iRightThumbY = m_iDeadzone + pGamePad->sThumbRY;
|
||||
}
|
||||
else
|
||||
{
|
||||
pThisPad->m_iRightThumbY = pGamePad->sThumbRY - m_iDeadzone;
|
||||
}
|
||||
if (pGamePad->sThumbLX <= m_iDeadzone)
|
||||
{
|
||||
if (pGamePad->sThumbLX >= -m_iDeadzone)
|
||||
pThisPad->m_iLeftThumbX = 0;
|
||||
else
|
||||
pThisPad->m_iLeftThumbX = m_iDeadzone + pGamePad->sThumbLX;
|
||||
}
|
||||
else
|
||||
{
|
||||
pThisPad->m_iLeftThumbX = pGamePad->sThumbLX - m_iDeadzone;
|
||||
}
|
||||
if (pGamePad->sThumbLY <= m_iDeadzone)
|
||||
{
|
||||
if (pGamePad->sThumbLY >= -m_iDeadzone)
|
||||
pThisPad->m_iLeftThumbY = 0;
|
||||
else
|
||||
pThisPad->m_iLeftThumbY = m_iDeadzone + pGamePad->sThumbLY;
|
||||
}
|
||||
else
|
||||
{
|
||||
pThisPad->m_iLeftThumbY = pGamePad->sThumbLY - m_iDeadzone;
|
||||
}
|
||||
|
||||
pThisPad->m_iNormalizedLeftThumbX = pThisPad->m_iLeftThumbX / m_iEffectiveRange;
|
||||
pThisPad->m_iNormalizedLeftThumbY = pThisPad->m_iLeftThumbY / m_iEffectiveRange;
|
||||
pThisPad->m_iNormalizedRightThumbX = pThisPad->m_iRightThumbX / m_iEffectiveRange;
|
||||
pThisPad->m_iNormalizedRightThumbY = pThisPad->m_iRightThumbY / m_iEffectiveRange;
|
||||
|
||||
pThisPad->m_fNormalizedLeftThumbX = pThisPad->m_iLeftThumbX / m_fEffectiveRange;
|
||||
pThisPad->m_fNormalizedLeftThumbY = pThisPad->m_iLeftThumbY / m_fEffectiveRange;
|
||||
pThisPad->m_fNormalizedRightThumbX = pThisPad->m_iRightThumbX / m_fEffectiveRange;
|
||||
pThisPad->m_fNormalizedRightThumbY = pThisPad->m_iRightThumbY / m_fEffectiveRange;
|
||||
}
|
||||
|
||||
void CInput::SetDeadzoneAndMovementRange(unsigned int uiDeadzone, unsigned int uiMovementRangeMax)
|
||||
{
|
||||
m_iDeadzone = uiDeadzone;
|
||||
m_iMovementRangeMax = uiMovementRangeMax;
|
||||
m_iEffectiveRange = uiMovementRangeMax - uiDeadzone;
|
||||
m_iHalfRange = m_iEffectiveRange / 2;
|
||||
}
|
||||
|
||||
void CInput::SetJoypadSensitivity(int iPad, float fSensitivity)
|
||||
{
|
||||
m_Joypads[iPad].m_fSensitivity = fSensitivity;
|
||||
}
|
||||
|
||||
void CInput::SetGameJoypadMaps(unsigned char ucMap, unsigned char ucAction, unsigned int uiActionVal)
|
||||
{
|
||||
assert(ucMap < m_ucJoypadMapC);
|
||||
assert(ucAction < m_ucJoypadMapActionC);
|
||||
|
||||
m_JoypadMap[ucMap][ucAction] = uiActionVal;
|
||||
}
|
||||
|
||||
unsigned int CInput::GetGameJoypadMaps(unsigned char ucMap, unsigned char ucAction)
|
||||
{
|
||||
assert(ucMap < m_ucJoypadMapC);
|
||||
assert(ucAction < m_ucJoypadMapActionC);
|
||||
|
||||
return m_JoypadMap[ucMap][ucAction];
|
||||
}
|
||||
|
||||
void CInput::SetJoypadMapVal(int iPad, unsigned char ucMap)
|
||||
{
|
||||
m_bJoypadMapArrayIsSetup = true;
|
||||
m_Joypads[iPad].m_ucMappingValue = ucMap;
|
||||
}
|
||||
|
||||
unsigned char CInput::GetJoypadMapVal(int iPad)
|
||||
{
|
||||
return m_Joypads[iPad].m_ucMappingValue;
|
||||
}
|
||||
|
||||
void CInput::SetJoypadStickAxisMap(int iPad, unsigned int uiFrom, unsigned int uiTo)
|
||||
{
|
||||
float *pfTo = nullptr;
|
||||
|
||||
switch (uiTo)
|
||||
{
|
||||
case AXIS_MAP_LX:
|
||||
pfTo = &m_Joypads[iPad].m_fNormalizedLeftThumbX;
|
||||
break;
|
||||
case AXIS_MAP_LY:
|
||||
pfTo = &m_Joypads[iPad].m_fNormalizedLeftThumbY;
|
||||
break;
|
||||
case AXIS_MAP_RX:
|
||||
pfTo = &m_Joypads[iPad].m_fNormalizedRightThumbX;
|
||||
break;
|
||||
case AXIS_MAP_RY:
|
||||
pfTo = &m_Joypads[iPad].m_fNormalizedRightThumbY;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (uiFrom)
|
||||
{
|
||||
case AXIS_MAP_LX:
|
||||
m_Joypads[iPad].m_pfLeftThumbXAxisMap = pfTo;
|
||||
break;
|
||||
case AXIS_MAP_LY:
|
||||
m_Joypads[iPad].m_pfLeftThumbYAxisMap = pfTo;
|
||||
break;
|
||||
case AXIS_MAP_RX:
|
||||
m_Joypads[iPad].m_pfRightThumbXAxisMap = pfTo;
|
||||
break;
|
||||
case AXIS_MAP_RY:
|
||||
m_Joypads[iPad].m_pfRightThumbYAxisMap = pfTo;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CInput::SetJoypadStickTriggerMap(int iPad, unsigned int uiFrom, unsigned int uiTo)
|
||||
{
|
||||
unsigned char *pucTo = nullptr;
|
||||
|
||||
switch (uiTo)
|
||||
{
|
||||
case TRIGGER_MAP_0:
|
||||
pucTo = &m_Joypads[iPad].m_ucRightTriggerState;
|
||||
break;
|
||||
case TRIGGER_MAP_1:
|
||||
pucTo = &m_Joypads[iPad].m_ucLeftTriggerState;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (uiFrom)
|
||||
{
|
||||
case TRIGGER_MAP_0:
|
||||
m_Joypads[iPad].m_pucRightTriggerAxisMap = pucTo;
|
||||
break;
|
||||
case TRIGGER_MAP_1:
|
||||
m_Joypads[iPad].m_pucLeftTriggerAxisMap = pucTo;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool CInput::IsPadConnected(int iPad)
|
||||
{
|
||||
return m_Joypads[iPad].m_bIsConnected;
|
||||
}
|
||||
|
||||
void CInput::SetSigninJoypadMask(unsigned int mask)
|
||||
{
|
||||
m_uiSigninJoypadMask = mask;
|
||||
}
|
||||
|
||||
unsigned int CInput::GetValue(int iPad, unsigned char ucAction, bool bRepeat)
|
||||
{
|
||||
if (m_bIsMenuDisplayed[iPad] && ucAction > this->m_ucMenuActionC)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned char ucMap = this->m_Joypads[iPad].m_ucMappingValue;
|
||||
unsigned int uiVal = this->m_JoypadMap[ucMap][ucAction] & this->m_Joypads[iPad].m_uiButtons;
|
||||
if (!uiVal || !bRepeat)
|
||||
{
|
||||
return uiVal;
|
||||
}
|
||||
|
||||
int iKeyVal = 0;
|
||||
for (int iKey = this->m_JoypadMap[ucMap][ucAction]; (iKey & 1) == 0; iKey >>= 1)
|
||||
{
|
||||
iKeyVal++;
|
||||
}
|
||||
|
||||
if (m_fRepeatDelaySecs <= m_Timers[iPad][iKeyVal].m_fTotalHoldTime || m_Timers[iPad][iKeyVal].m_bInitialPressHandled)
|
||||
{
|
||||
if (m_Timers[iPad][iKeyVal].m_fTotalHoldTime < m_fRepeatDelaySecs)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (m_Timers[iPad][iKeyVal].m_fLastRepeatTime == 0.0f)
|
||||
{
|
||||
m_Timers[iPad][iKeyVal].m_fLastRepeatTime = m_fRepeatDelaySecs;
|
||||
return uiVal;
|
||||
}
|
||||
else if ((m_Timers[iPad][iKeyVal].m_fTotalHoldTime - m_Timers[iPad][iKeyVal].m_fLastRepeatTime) <= m_fRepeatRateSecs)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Timers[iPad][iKeyVal].m_fLastRepeatTime = m_Timers[iPad][iKeyVal].m_fLastRepeatTime + m_fRepeatRateSecs;
|
||||
return uiVal;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Timers[iPad][iKeyVal].m_bInitialPressHandled = true;
|
||||
return uiVal;
|
||||
}
|
||||
}
|
||||
|
||||
bool CInput::IsSet(int iPad, unsigned char ucAction)
|
||||
{
|
||||
return (!m_bIsMenuDisplayed[iPad] || ucAction <= m_ucMenuActionC) &&
|
||||
(m_JoypadMap[m_Joypads[iPad].m_ucMappingValue][ucAction] & m_Joypads[iPad].m_uiButtons) != 0;
|
||||
}
|
||||
|
||||
bool CInput::ButtonPressed(int iPad, unsigned char ucAction)
|
||||
{
|
||||
if (ucAction == 255)
|
||||
{
|
||||
return m_Joypads[iPad].m_uiButtonsPressed != 0;
|
||||
}
|
||||
|
||||
if (m_bIsMenuDisplayed[iPad] && ucAction > m_ucMenuActionC)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (m_JoypadMap[m_Joypads[iPad].m_ucMappingValue][ucAction] & m_Joypads[iPad].m_uiButtonsPressed) != 0;
|
||||
}
|
||||
|
||||
bool CInput::ButtonReleased(int iPad, unsigned char ucAction)
|
||||
{
|
||||
return (!m_bIsMenuDisplayed[iPad] || ucAction <= m_ucMenuActionC) &&
|
||||
(m_JoypadMap[m_Joypads[iPad].m_ucMappingValue][ucAction] & m_Joypads[iPad].m_uiButtonsReleased) != 0;
|
||||
}
|
||||
|
||||
bool CInput::ButtonDown(int iPad, unsigned char ucAction)
|
||||
{
|
||||
if (ucAction == 255)
|
||||
{
|
||||
return m_Joypads[iPad].m_uiButtons != 0;
|
||||
}
|
||||
|
||||
if (m_bIsMenuDisplayed[iPad] && ucAction > m_ucMenuActionC)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (m_JoypadMap[m_Joypads[iPad].m_ucMappingValue][ucAction] & m_Joypads[iPad].m_uiButtons) != 0;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_Menu_LX(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_iNormalizedLeftThumbX;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_Menu_LY(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_iNormalizedLeftThumbY;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_Menu_RX(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_iNormalizedRightThumbX;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_Menu_RY(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_iNormalizedRightThumbY;
|
||||
}
|
||||
|
||||
unsigned char CInput::GetJoypadLTrigger_Menu(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_ucLeftTriggerState;
|
||||
}
|
||||
|
||||
unsigned char CInput::GetJoypadRTrigger_Menu(unsigned char ucPad)
|
||||
{
|
||||
return m_Joypads[ucPad].m_ucRightTriggerState;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_LX(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
if (bCheckMenuDisplay && m_bIsMenuDisplayed[iPad])
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return *m_Joypads[iPad].m_pfLeftThumbXAxisMap * m_Joypads[iPad].m_fSensitivity;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_LY(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
if (bCheckMenuDisplay && m_bIsMenuDisplayed[iPad])
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return *m_Joypads[iPad].m_pfLeftThumbYAxisMap * m_Joypads[iPad].m_fSensitivity;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_RX(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
if (bCheckMenuDisplay && m_bIsMenuDisplayed[iPad])
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return *m_Joypads[iPad].m_pfRightThumbXAxisMap * m_Joypads[iPad].m_fSensitivity;
|
||||
}
|
||||
|
||||
float CInput::GetJoypadStick_RY(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
if (bCheckMenuDisplay && m_bIsMenuDisplayed[iPad])
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return *m_Joypads[iPad].m_pfRightThumbYAxisMap * m_Joypads[iPad].m_fSensitivity;
|
||||
}
|
||||
|
||||
unsigned char CInput::GetJoypadLTrigger(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
if (bCheckMenuDisplay && m_bIsMenuDisplayed[iPad])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return *m_Joypads[iPad].m_pucLeftTriggerAxisMap;
|
||||
}
|
||||
|
||||
unsigned char CInput::GetJoypadRTrigger(int iPad, bool bCheckMenuDisplay)
|
||||
{
|
||||
if (bCheckMenuDisplay && m_bIsMenuDisplayed[iPad])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return *m_Joypads[iPad].m_pucRightTriggerAxisMap;
|
||||
}
|
||||
|
||||
void CInput::SetMenuDisplayed(int iPad, bool bVal)
|
||||
{
|
||||
m_bIsMenuDisplayed[iPad] = bVal;
|
||||
}
|
||||
|
||||
void CInput::SetKeyRepeatRate(float fRepeatDelaySecs, float fRepeatRateSecs)
|
||||
{
|
||||
m_fRepeatDelaySecs = fRepeatDelaySecs;
|
||||
m_fRepeatRateSecs = fRepeatRateSecs;
|
||||
}
|
||||
|
||||
void CInput::SetDebugSequence(const char *chSequenceA, int (*Func)(LPVOID), LPVOID lpParam)
|
||||
{
|
||||
int iLen = strlen(chSequenceA);
|
||||
|
||||
m_sDebugSequenceName = (char *)operator new[](iLen);
|
||||
strcpy(m_sDebugSequenceName, chSequenceA);
|
||||
|
||||
m_pDebugSequenceFn = Func;
|
||||
m_pDebugSequenceParam = lpParam;
|
||||
}
|
||||
|
||||
FLOAT CInput::GetIdleSeconds(int iPad)
|
||||
{
|
||||
LARGE_INTEGER qwDeltaTime;
|
||||
QueryPerformanceCounter(&qwDeltaTime);
|
||||
|
||||
LARGE_INTEGER fElapsedTime = this->m_LastActivityTime[iPad];
|
||||
|
||||
return this->m_fTickToSeconds * (qwDeltaTime.LowPart - fElapsedTime.LowPart);
|
||||
}
|
||||
|
||||
bool CInput::UpdateJoypads()
|
||||
{
|
||||
assert(m_bJoypadMapArrayIsSetup);
|
||||
|
||||
for (int i = 0; i < MAX_JOYPADS; i++)
|
||||
{
|
||||
JOYPAD *pThisPad = &m_Joypads[i];
|
||||
|
||||
pThisPad->m_uiOldButtons = pThisPad->m_uiButtons;
|
||||
pThisPad->m_uiButtons = 0;
|
||||
pThisPad->m_iRightThumbY = 0;
|
||||
pThisPad->m_iRightThumbX = 0;
|
||||
pThisPad->m_iLeftThumbY = 0;
|
||||
pThisPad->m_iLeftThumbX = 0;
|
||||
pThisPad->m_ucLeftTriggerState = 0;
|
||||
pThisPad->m_ucRightTriggerState = 0;
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_JOYPADS; i++)
|
||||
{
|
||||
if (!m_Joypads[i].m_bIsDisabled)
|
||||
{
|
||||
JOYPAD *pThisPad = &m_Joypads[i];
|
||||
|
||||
bool bOldIsConnected = pThisPad->m_bIsConnected;
|
||||
|
||||
pThisPad->m_ucInputStateIndex = pThisPad->m_ucInputStateIndex++;
|
||||
if (pThisPad->m_ucInputStateIndex == m_ucInputStateC)
|
||||
{
|
||||
pThisPad->m_ucInputStateIndex = 0;
|
||||
}
|
||||
|
||||
pThisPad->m_bIsConnected = XInputGetState(i, &pThisPad->m_pInputStates[pThisPad->m_ucInputStateIndex]) == 0;
|
||||
|
||||
bool bWasConnected = bOldIsConnected && !pThisPad->m_bIsConnected;
|
||||
pThisPad->m_bWasConnected = bWasConnected;
|
||||
|
||||
bool bHasConnected = !bOldIsConnected && pThisPad->m_bIsConnected;
|
||||
pThisPad->m_bHasConnected = bHasConnected;
|
||||
|
||||
if (pThisPad->m_bIsConnected)
|
||||
{
|
||||
SetJoypadValues(pThisPad);
|
||||
|
||||
pThisPad->m_uiButtonsPressed = ~pThisPad->m_uiOldButtons & pThisPad->m_uiButtons;
|
||||
pThisPad->m_uiButtonsReleased = ~pThisPad->m_uiButtons & pThisPad->m_uiOldButtons;
|
||||
|
||||
for (int bit = 0; bit < 24; ++bit)
|
||||
{
|
||||
if ((pThisPad->m_uiButtonsPressed & (1 << bit)) != 0)
|
||||
{
|
||||
GetStartTime(i, bit);
|
||||
}
|
||||
else if ((pThisPad->m_uiButtons & (1 << bit)) != 0)
|
||||
{
|
||||
UpdateTime(i, bit);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pThisPad->m_bWasConnected)
|
||||
{
|
||||
ClearJoypadValues(pThisPad);
|
||||
}
|
||||
|
||||
if (m_pDebugSequenceFn && (pThisPad->m_uiButtonsPressed & (_360_JOY_BUTTON_A | _360_JOY_BUTTON_B | _360_JOY_BUTTON_X | _360_JOY_BUTTON_Y |
|
||||
_360_JOY_BUTTON_RB | _360_JOY_BUTTON_LB)) != 0)
|
||||
{
|
||||
char chSeq;
|
||||
|
||||
if ((pThisPad->m_uiButtonsPressed & _360_JOY_BUTTON_A) == _360_JOY_BUTTON_A)
|
||||
{
|
||||
chSeq = 'A';
|
||||
}
|
||||
else if ((pThisPad->m_uiButtonsPressed & _360_JOY_BUTTON_B) == _360_JOY_BUTTON_B)
|
||||
{
|
||||
chSeq = 'B';
|
||||
}
|
||||
else if ((pThisPad->m_uiButtonsPressed & _360_JOY_BUTTON_X) == _360_JOY_BUTTON_X)
|
||||
{
|
||||
chSeq = 'X';
|
||||
}
|
||||
else if ((pThisPad->m_uiButtonsPressed & _360_JOY_BUTTON_Y) == _360_JOY_BUTTON_Y)
|
||||
{
|
||||
chSeq = 'Y';
|
||||
}
|
||||
else if ((pThisPad->m_uiButtonsPressed & _360_JOY_BUTTON_LB) == _360_JOY_BUTTON_LB)
|
||||
{
|
||||
chSeq = 'L';
|
||||
}
|
||||
else if ((pThisPad->m_uiButtonsPressed & _360_JOY_BUTTON_RB) == _360_JOY_BUTTON_RB)
|
||||
{
|
||||
chSeq = 'R';
|
||||
}
|
||||
|
||||
if (m_sDebugSequenceName[m_uiDebugSequenceIndex] == chSeq)
|
||||
{
|
||||
if (!m_sDebugSequenceName[m_uiDebugSequenceIndex++])
|
||||
{
|
||||
m_uiDebugSequenceIndex = 0;
|
||||
(m_pDebugSequenceFn)(m_pDebugSequenceParam);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_uiDebugSequenceIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CInput::ClearJoypadValues(JOYPAD *pThisPad)
|
||||
{
|
||||
pThisPad->m_uiButtonsPressed = 0;
|
||||
pThisPad->m_uiButtonsReleased = 0;
|
||||
pThisPad->m_uiButtons = 0;
|
||||
pThisPad->m_ucLeftTriggerState = 0;
|
||||
pThisPad->m_ucRightTriggerState = 0;
|
||||
pThisPad->m_iRightThumbX = 0;
|
||||
pThisPad->m_iRightThumbY = 0;
|
||||
pThisPad->m_iLeftThumbX = 0;
|
||||
pThisPad->m_iLeftThumbY = 0;
|
||||
pThisPad->m_iNormalizedLeftThumbX = 0;
|
||||
pThisPad->m_iNormalizedLeftThumbY = 0;
|
||||
pThisPad->m_iNormalizedRightThumbX = 0;
|
||||
pThisPad->m_iNormalizedRightThumbY = 0;
|
||||
pThisPad->m_fNormalizedLeftThumbX = 0.0f;
|
||||
pThisPad->m_fNormalizedLeftThumbY = 0.0f;
|
||||
pThisPad->m_fNormalizedRightThumbX = 0.0f;
|
||||
pThisPad->m_fNormalizedRightThumbY = 0.0f;
|
||||
}
|
||||
|
||||
void CInput::InitTime(void)
|
||||
{
|
||||
LARGE_INTEGER qwTicksPerSec;
|
||||
QueryPerformanceFrequency(&qwTicksPerSec);
|
||||
|
||||
m_fTickToSeconds = 1.0 / (float)(int)qwTicksPerSec.LowPart;
|
||||
for (int i = 0; i < MAX_JOYPADS; i++)
|
||||
{
|
||||
m_LastActivityTime[i].QuadPart = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void CInput::GetStartTime(int iPad, int iKey)
|
||||
{
|
||||
QueryPerformanceCounter(&m_Timers[iPad][iKey].m_qwStartTime);
|
||||
|
||||
m_Timers[iPad][iKey].m_qwTotalHoldTicks.QuadPart = 0;
|
||||
m_Timers[iPad][iKey].m_fTotalHoldTime = 0;
|
||||
m_Timers[iPad][iKey].m_fLastRepeatTime = 0;
|
||||
m_Timers[iPad][iKey].m_bInitialPressHandled = false;
|
||||
|
||||
m_LastActivityTime[iPad].QuadPart = m_Timers[iPad][iKey].m_qwStartTime.QuadPart;
|
||||
}
|
||||
|
||||
void CInput::UpdateTime(int iPad, int iKey)
|
||||
{
|
||||
LARGE_INTEGER qwDeltaTime;
|
||||
QueryPerformanceCounter(&qwDeltaTime);
|
||||
|
||||
uint64_t qwNewTime = qwDeltaTime.QuadPart - m_Timers[iPad][iKey].m_qwStartTime.QuadPart;
|
||||
m_Timers[iPad][iKey].m_qwTotalHoldTicks.QuadPart += qwNewTime;
|
||||
|
||||
m_Timers[iPad][iKey].m_qwStartTime = qwDeltaTime;
|
||||
m_Timers[iPad][iKey].m_fTotalHoldTime = m_Timers[iPad][iKey].m_fTotalHoldTime + (m_fTickToSeconds * qwNewTime);
|
||||
|
||||
m_LastActivityTime[iPad].QuadPart = m_Timers[iPad][iKey].m_qwStartTime.QuadPart;
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
#pragma once
|
||||
#include "INP_Keyboard.h"
|
||||
#include "INP_MessageUI.h"
|
||||
|
||||
#define MAX_JOYPADS 4
|
||||
|
||||
class CInput
|
||||
{
|
||||
public:
|
||||
struct JOYPAD
|
||||
{
|
||||
bool m_bIsDisabled;
|
||||
bool m_bIsConnected;
|
||||
bool m_bWasConnected;
|
||||
bool m_bHasConnected;
|
||||
|
||||
unsigned int m_uiButtons;
|
||||
unsigned int m_uiOldButtons;
|
||||
int m_uiButtonsPressed;
|
||||
int m_uiButtonsReleased;
|
||||
|
||||
int m_iRightThumbX;
|
||||
int m_iRightThumbY;
|
||||
int m_iLeftThumbX;
|
||||
int m_iLeftThumbY;
|
||||
|
||||
DWORD m_iNormalizedRightThumbX;
|
||||
DWORD m_iNormalizedRightThumbY;
|
||||
DWORD m_iNormalizedLeftThumbX;
|
||||
DWORD m_iNormalizedLeftThumbY;
|
||||
|
||||
float m_fNormalizedRightThumbX;
|
||||
float m_fNormalizedRightThumbY;
|
||||
float m_fNormalizedLeftThumbX;
|
||||
float m_fNormalizedLeftThumbY;
|
||||
|
||||
unsigned char m_ucLeftTriggerState;
|
||||
unsigned char m_ucRightTriggerState;
|
||||
|
||||
float *m_pfLeftThumbXAxisMap;
|
||||
float *m_pfLeftThumbYAxisMap;
|
||||
float *m_pfRightThumbXAxisMap;
|
||||
float *m_pfRightThumbYAxisMap;
|
||||
|
||||
float m_fSensitivity;
|
||||
|
||||
BYTE *m_pucLeftTriggerAxisMap;
|
||||
BYTE *m_pucRightTriggerAxisMap;
|
||||
|
||||
unsigned char m_ucMappingValue;
|
||||
int m_ucInputStateIndex;
|
||||
XINPUT_STATE *m_pInputStates;
|
||||
};
|
||||
|
||||
struct JOYPADS
|
||||
{
|
||||
};
|
||||
|
||||
struct TimeInfo
|
||||
{
|
||||
LARGE_INTEGER m_qwStartTime;
|
||||
LARGE_INTEGER m_qwTotalHoldTicks;
|
||||
float m_fTotalHoldTime;
|
||||
float m_fLastRepeatTime;
|
||||
bool m_bInitialPressHandled;
|
||||
};
|
||||
|
||||
CInput();
|
||||
|
||||
void Initialise(int iInputStateC, unsigned char ucMapC, unsigned char ucActionC, unsigned char ucMenuActionC);
|
||||
void Tick(void);
|
||||
|
||||
void SetJoypadValues(JOYPAD *pThisPad);
|
||||
void SetDeadzoneAndMovementRange(unsigned int uiDeadzone, unsigned int uiMovementRangeMax);
|
||||
void SetJoypadSensitivity(int iPad, float fSensitivity);
|
||||
|
||||
void SetGameJoypadMaps(unsigned char ucMap, unsigned char ucAction, unsigned int uiActionVal);
|
||||
unsigned int GetGameJoypadMaps(unsigned char ucMap, unsigned char ucAction);
|
||||
void SetJoypadMapVal(int iPad, unsigned char ucMap);
|
||||
unsigned char GetJoypadMapVal(int iPad);
|
||||
|
||||
void SetJoypadStickAxisMap(int iPad, unsigned int uiFrom, unsigned int uiTo);
|
||||
void SetJoypadStickTriggerMap(int iPad, unsigned int uiFrom, unsigned int uiTo);
|
||||
|
||||
bool IsPadConnected(int iPad);
|
||||
void SetSigninJoypadMask(unsigned int mask);
|
||||
unsigned int GetValue(int iPad, unsigned char ucAction, bool bRepeat = false);
|
||||
bool IsSet(int iPad, unsigned char ucAction);
|
||||
|
||||
bool ButtonPressed(int iPad, unsigned char ucAction = 255); // toggled
|
||||
bool ButtonReleased(int iPad, unsigned char ucAction); // toggled
|
||||
bool ButtonDown(int iPad, unsigned char ucAction = 255); // button held down
|
||||
|
||||
float GetJoypadStick_Menu_LX(unsigned char ucPad);
|
||||
float GetJoypadStick_Menu_LY(unsigned char ucPad);
|
||||
float GetJoypadStick_Menu_RX(unsigned char ucPad);
|
||||
float GetJoypadStick_Menu_RY(unsigned char ucPad);
|
||||
unsigned char GetJoypadLTrigger_Menu(unsigned char ucPad);
|
||||
unsigned char GetJoypadRTrigger_Menu(unsigned char ucPad);
|
||||
|
||||
float GetJoypadStick_LX(int iPad, bool bCheckMenuDisplay = true);
|
||||
float GetJoypadStick_LY(int iPad, bool bCheckMenuDisplay = true);
|
||||
float GetJoypadStick_RX(int iPad, bool bCheckMenuDisplay = true);
|
||||
float GetJoypadStick_RY(int iPad, bool bCheckMenuDisplay = true);
|
||||
unsigned char GetJoypadLTrigger(int iPad, bool bCheckMenuDisplay = true);
|
||||
unsigned char GetJoypadRTrigger(int iPad, bool bCheckMenuDisplay = true);
|
||||
|
||||
void SetMenuDisplayed(int iPad, bool bVal);
|
||||
|
||||
void SetKeyRepeatRate(float fRepeatDelaySecs, float fRepeatRateSecs);
|
||||
void SetDebugSequence(const char *chSequenceA, int (*Func)(LPVOID), LPVOID lpParam);
|
||||
FLOAT GetIdleSeconds(int iPad);
|
||||
|
||||
bool UpdateJoypads(void);
|
||||
void ClearJoypadValues(JOYPAD *pThisPad);
|
||||
|
||||
void InitTime(void);
|
||||
void GetStartTime(int iPad, int iKey);
|
||||
void UpdateTime(int iPad, int iKey);
|
||||
|
||||
BYTE gap0[16];
|
||||
|
||||
JOYPAD m_Joypads[MAX_JOYPADS];
|
||||
|
||||
int m_iDeadzone;
|
||||
int m_iMovementRangeMax;
|
||||
int m_iEffectiveRange;
|
||||
int m_iHalfRange;
|
||||
float m_fEffectiveRange;
|
||||
|
||||
unsigned char m_ucInputStateC;
|
||||
unsigned char m_ucJoypadMapC;
|
||||
unsigned char m_ucJoypadMapActionC;
|
||||
unsigned char m_ucMenuActionC;
|
||||
|
||||
unsigned int **m_JoypadMap;
|
||||
|
||||
bool m_bJoypadMapArrayIsSetup;
|
||||
unsigned int m_uiSigninJoypadMask;
|
||||
bool m_bIsMenuDisplayed[MAX_JOYPADS];
|
||||
|
||||
CKeyboard m_Keyboard;
|
||||
CMessageUI m_MessageUI;
|
||||
|
||||
float m_fTickToSeconds;
|
||||
float m_fRepeatDelaySecs;
|
||||
float m_fRepeatRateSecs;
|
||||
|
||||
TimeInfo m_Timers[MAX_JOYPADS][24];
|
||||
LARGE_INTEGER m_LastActivityTime[MAX_JOYPADS];
|
||||
|
||||
char *m_sDebugSequenceName;
|
||||
unsigned int m_uiDebugSequenceIndex;
|
||||
int (*m_pDebugSequenceFn)(void *);
|
||||
LPVOID m_pDebugSequenceParam;
|
||||
};
|
||||
|
||||
// Singleton
|
||||
extern CInput InternalInputManager;
|
||||
@@ -0,0 +1,109 @@
|
||||
#include "INP_MessageUI.h"
|
||||
|
||||
CMessageUI::CMessageUI()
|
||||
{
|
||||
bCancel = false;
|
||||
}
|
||||
|
||||
C4JStorage::EMessageResult CMessageUI::RequestMessageBox(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR *uiButtons, UINT uiButtonCount, DWORD dwPad, int(*Func)(LPVOID, int, const C4JStorage::EMessageResult), LPVOID lpParam, DWORD dwFocusButton)
|
||||
{
|
||||
if (eState == C4JStorage::EMessage_Pending)
|
||||
return C4JStorage::EMessage_Busy;
|
||||
|
||||
eState = C4JStorage::EMessage_Pending;
|
||||
|
||||
for (UINT i = 0; i < uiButtonCount; i++)
|
||||
this->uiButtons[i] = uiButtons[i];
|
||||
this->uiTitle = uiTitle;
|
||||
this->uiText = uiText;
|
||||
this->uiButtonCount = uiButtonCount;
|
||||
this->dwPad = dwPad;
|
||||
this->dwFocusButton = dwFocusButton;
|
||||
this->Func = Func;
|
||||
this->lpParam = lpParam;
|
||||
|
||||
CreateThread(NULL, 0, CreateMessageBoxUIFn, this, 0, NULL);
|
||||
|
||||
return eState;
|
||||
}
|
||||
|
||||
DWORD WINAPI CMessageUI::CreateMessageBoxUIFn(LPVOID lpParam)
|
||||
{
|
||||
CMessageUI *self = (CMessageUI *)lpParam;
|
||||
|
||||
XOVERLAPPED MessageBoxOverlap;
|
||||
ZeroMemory(&MessageBoxOverlap, sizeof(XOVERLAPPED));
|
||||
|
||||
MESSAGEBOX_RESULT MessageResult;
|
||||
ZeroMemory(&MessageResult, sizeof(MESSAGEBOX_RESULT));
|
||||
|
||||
bool bShown = true;
|
||||
do
|
||||
{
|
||||
DWORD result = XShowMessageBoxUI(self->dwPad, self->uiTitle, self->uiText, self->uiButtonCount, self->uiButtons, self->dwFocusButton, 0, &MessageResult, &MessageBoxOverlap);
|
||||
if (result != ERROR_ACCESS_DENIED)
|
||||
break;
|
||||
Sleep(250);
|
||||
if (self->bCancel)
|
||||
bShown = false;
|
||||
} while (bShown);
|
||||
|
||||
C4JStorage::EMessageResult state;
|
||||
|
||||
if (!bShown)
|
||||
{
|
||||
state = C4JStorage::EMessage_Cancelled;
|
||||
}
|
||||
else
|
||||
{
|
||||
while (MessageBoxOverlap.InternalLow == ERROR_IO_PENDING)
|
||||
{
|
||||
Sleep(250);
|
||||
if (self->bCancel)
|
||||
{
|
||||
XCancelOverlapped(&MessageBoxOverlap);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (self->bCancel || XGetOverlappedResult(&MessageBoxOverlap, NULL, TRUE) == ERROR_CANCELLED)
|
||||
{
|
||||
state = C4JStorage::EMessage_Cancelled;
|
||||
}
|
||||
else switch (MessageResult.dwButtonPressed)
|
||||
{
|
||||
case 0:
|
||||
state = C4JStorage::EMessage_ResultAccept;
|
||||
break;
|
||||
case 1:
|
||||
state = C4JStorage::EMessage_ResultDecline;
|
||||
break;
|
||||
case 2:
|
||||
state = C4JStorage::EMessage_ResultThirdOption;
|
||||
break;
|
||||
case 3:
|
||||
state = C4JStorage::EMessage_ResultFourthOption;
|
||||
break;
|
||||
default:
|
||||
state = C4JStorage::EMessage_Cancelled;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
self->eState = state;
|
||||
|
||||
if (self->Func)
|
||||
self->Func(self->lpParam, self->dwPad, state);
|
||||
|
||||
ExitThread(0);
|
||||
}
|
||||
|
||||
void CMessageUI::CancelMessageBoxRequest()
|
||||
{
|
||||
bCancel = true;
|
||||
}
|
||||
|
||||
C4JStorage::EMessageResult CMessageUI::GetMessageBoxResult()
|
||||
{
|
||||
return eState;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include "4J_Input.h"
|
||||
|
||||
class CMessageUI
|
||||
{
|
||||
private:
|
||||
C4JStorage::EMessageResult eState;
|
||||
LPCWSTR uiTitle;
|
||||
LPCWSTR uiText;
|
||||
LPCWSTR uiButtons[3];
|
||||
UINT uiButtonCount;
|
||||
DWORD dwPad;
|
||||
DWORD dwFocusButton;
|
||||
int(*Func)(LPVOID, int, C4JStorage::EMessageResult);
|
||||
LPVOID lpParam;
|
||||
bool bCancel;
|
||||
public:
|
||||
CMessageUI();
|
||||
C4JStorage::EMessageResult RequestMessageBox(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR *uiButtons, UINT uiButtonCount, DWORD dwPad = XUSER_INDEX_ANY, int(*Func)(LPVOID, int, const C4JStorage::EMessageResult) = NULL, LPVOID lpParam = NULL, DWORD dwFocusButton = 0);
|
||||
static DWORD WINAPI CreateMessageBoxUIFn(LPVOID lpParam);
|
||||
void CancelMessageBoxRequest();
|
||||
C4JStorage::EMessageResult GetMessageBoxResult();
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
#include "INP_StringCheck.h"
|
||||
@@ -0,0 +1 @@
|
||||
#pragma once
|
||||
@@ -0,0 +1,102 @@
|
||||
#include "LinkedList.h"
|
||||
|
||||
LinkedList::LinkedList()
|
||||
{
|
||||
this->m_NodeC = 0;
|
||||
this->m_Head = nullptr;
|
||||
this->m_Tail = nullptr;
|
||||
}
|
||||
|
||||
void LinkedList::AddToHead(void *pvData)
|
||||
{
|
||||
_LL_NODE *pNode = new _LL_NODE();
|
||||
pNode->m_pvData = pvData;
|
||||
|
||||
if (!m_Tail)
|
||||
{
|
||||
m_Tail = pNode;
|
||||
}
|
||||
|
||||
if (m_Head)
|
||||
{
|
||||
m_Head->m_Prev = pNode;
|
||||
pNode->m_Next = m_Head;
|
||||
}
|
||||
|
||||
m_Head = pNode;
|
||||
m_NodeC++;
|
||||
}
|
||||
|
||||
void LinkedList::AddToTail(void *pvData)
|
||||
{
|
||||
_LL_NODE *pNode = new _LL_NODE();
|
||||
pNode->m_pvData = pvData;
|
||||
|
||||
if (!m_Head)
|
||||
{
|
||||
m_Head = pNode;
|
||||
}
|
||||
|
||||
if (m_Tail)
|
||||
{
|
||||
m_Tail->m_Next = pNode;
|
||||
pNode->m_Prev = m_Tail;
|
||||
}
|
||||
|
||||
pNode->m_Next = nullptr;
|
||||
pNode->m_Prev = m_Tail;
|
||||
|
||||
m_Tail = pNode;
|
||||
m_NodeC++;
|
||||
}
|
||||
|
||||
void LinkedList::RemoveNode(_LL_NODE *pNodeToRemove)
|
||||
{
|
||||
_LL_NODE *pCurrentNode;
|
||||
for (pCurrentNode = m_Head; pCurrentNode != pNodeToRemove; pCurrentNode = pCurrentNode->m_Next)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
if (pCurrentNode == m_Head)
|
||||
{
|
||||
m_Head = m_Head->m_Next;
|
||||
}
|
||||
else
|
||||
{
|
||||
pCurrentNode->m_Prev->m_Next = pCurrentNode->m_Next;
|
||||
|
||||
if (pCurrentNode->m_Next)
|
||||
{
|
||||
pCurrentNode->m_Next->m_Prev = pCurrentNode->m_Prev;
|
||||
}
|
||||
}
|
||||
|
||||
m_NodeC--;
|
||||
}
|
||||
|
||||
LinkedList::_LL_NODE *LinkedList::RemoveHeadNode()
|
||||
{
|
||||
_LL_NODE *pHeadNode = m_Head;
|
||||
|
||||
if (m_NodeC > 0)
|
||||
{
|
||||
m_Head = m_Head->m_Next;
|
||||
m_NodeC--;
|
||||
}
|
||||
|
||||
return pHeadNode;
|
||||
}
|
||||
|
||||
void LinkedList::ClearList()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
_LL_NODE *pHeadNode = RemoveHeadNode();
|
||||
if (!pHeadNode)
|
||||
{
|
||||
break;
|
||||
}
|
||||
delete pHeadNode;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
class LinkedList
|
||||
{
|
||||
public:
|
||||
struct _LL_NODE
|
||||
{
|
||||
template <typename T>
|
||||
T *GetDataAs()
|
||||
{
|
||||
return (T *)m_pvData;
|
||||
}
|
||||
|
||||
void *m_pvData;
|
||||
_LL_NODE *m_Next;
|
||||
_LL_NODE *m_Prev;
|
||||
};
|
||||
|
||||
int m_NodeC;
|
||||
_LL_NODE *m_Head;
|
||||
_LL_NODE *m_Tail;
|
||||
|
||||
LinkedList();
|
||||
void AddToHead(void *pvData);
|
||||
void AddToTail(void *pvData);
|
||||
void RemoveNode(_LL_NODE *pNodeToRemove);
|
||||
_LL_NODE *RemoveHeadNode();
|
||||
void ClearList();
|
||||
};
|
||||
+28
-11
@@ -1,26 +1,43 @@
|
||||
#ifndef PCH_H
|
||||
#define PCH_H
|
||||
//str1k3r - These top ones are shared across platforms
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _WIN64
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#ifdef __ORBIS__
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <scebase.h>
|
||||
#include <kernel.h>
|
||||
#include "OrbisTypes.h"
|
||||
#include "4J_Profile.h"
|
||||
#include <pad.h>
|
||||
#include <fios2.h>
|
||||
#include <kernel.h>
|
||||
#include <stdarg.h>
|
||||
#include <scebase.h>
|
||||
#include <message_dialog.h>
|
||||
#endif
|
||||
|
||||
#ifndef _XBOX
|
||||
#ifdef _XBOX
|
||||
#include <xtl.h>
|
||||
#include "4J_Storage.h"
|
||||
#else
|
||||
#include "extraX64.h"
|
||||
#endif
|
||||
|
||||
#endif //PCH_H
|
||||
#ifdef __PS3__
|
||||
#include "PS3Types.h"
|
||||
#include <cell/pad.h>
|
||||
#include <sys/sys_time.h>
|
||||
#include <cell/sysmodule.h>
|
||||
#include <sysutil/sysutil_common.h>
|
||||
#include <sysutil/sysutil_sysparam.h>
|
||||
#include <sysutil/sysutil_sysparam.h>
|
||||
#include <sysutil/sysutil_msgdialog.h>
|
||||
#include <sysutil/sysutil_oskdialog.h>
|
||||
#include <sysutil/sysutil_oskdialog_ext.h>
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Durango">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -9,6 +9,10 @@
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ORBIS</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|PS3">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>PS3</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
@@ -21,6 +25,10 @@
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ORBIS</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|PS3">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>PS3</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
@@ -31,68 +39,90 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Durango\Durango_PlayerUID.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Durango\PRO_Data.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Durango\PRO_Main.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Durango\PRO_Sys.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp" />
|
||||
<ClCompile Include="Windows64\4J_Profile.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\PRO_AwardManager.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\PRO_Data.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\PRO_Main.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\PRO_RichPresence.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\PRO_Sys.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -100,56 +130,74 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Durango\PRO_Data.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Durango\PRO_Main.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Durango\PRO_Sys.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="Windows64\PRO_AwardManager.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\PRO_Data.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\PRO_Main.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\PRO_RichPresence.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\PRO_Sys.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
@@ -161,32 +209,40 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'" Label="Configuration">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'" Label="Configuration">
|
||||
<PlatformToolset>SNC</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
@@ -223,10 +279,18 @@
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.a</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.a</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.a</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.a</TargetExt>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
@@ -283,6 +347,12 @@
|
||||
<Warnings>NormalWarnings</Warnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../Headers/PS3;../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<Warnings>NormalWarnings</Warnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -12,18 +12,12 @@ CSys::CSys()
|
||||
|
||||
bool CSys::IsSignedIn(int iQuadrant)
|
||||
{
|
||||
if (InputManager.IsPadConnected(iQuadrant))
|
||||
return true;
|
||||
//str1k3r - since we dont sign in like consoles just check if the pad is connected
|
||||
//kbm - pad 0 also counts as signed in when the keyboard is available
|
||||
return iQuadrant == 0 && InputManager.IsWindowFocused();
|
||||
return InputManager.IsPadConnected(iQuadrant); //str1k3r - since we dont sign in like consoles just check if the pad is connected
|
||||
}
|
||||
|
||||
bool CSys::IsSignedInLive(int iProf)
|
||||
{
|
||||
if (InputManager.IsPadConnected(iProf))
|
||||
return true;
|
||||
return iProf == 0 && InputManager.IsWindowFocused();
|
||||
return InputManager.IsPadConnected(iProf);
|
||||
}
|
||||
|
||||
//str1k3r - set every pad that isnt pad 0 as a guest
|
||||
|
||||
+131
-5
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Durango">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -9,10 +9,18 @@
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ORBIS</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|PS3">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>PS3</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Xbox 360">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Xbox 360</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Durango">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Durango</Platform>
|
||||
@@ -21,179 +29,271 @@
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ORBIS</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|PS3">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>PS3</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Xbox 360">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Xbox 360</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="PS3\RendererCore.cpp" />
|
||||
<ClCompile Include="stdafx.cpp" />
|
||||
<ClCompile Include="Windows64\4J_Render.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\RendererCBuff.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\RendererCore.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\RendererMatrix.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\RendererState.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\RendererTexture.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\RendererVertex.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\png.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngerror.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngget.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngmem.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngpread.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngread.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngrio.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngrtran.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngrutil.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngset.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngtest.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngtrans.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngwio.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngwrite.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngwtran.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\libpng\pngwutil.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\vendor\microprofile\microprofile.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="PS3\RendererCore.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="Windows64\CompiledShaders.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\Profiler.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\Renderer.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\libpng\png.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\libpng\pngconf.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\libpng\pngdebug.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\libpng\pnginfo.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\libpng\pnglibconf.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\libpng\pngpriv.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\libpng\pngstruct.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\microprofile\microprofile.config.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\microprofile\microprofile.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\microprofile\microprofile_html.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\microprofile\microprofile_icons.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\microprofile\stb\stb_sprintf.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\zlib\zconf.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\vendor\zlib\zlib.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
@@ -205,30 +305,42 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'" Label="Configuration">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'" Label="Configuration">
|
||||
<PlatformToolset>SNC</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
@@ -265,10 +377,18 @@
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.a</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.a</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.a</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.a</TargetExt>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
@@ -333,6 +453,12 @@
|
||||
<Warnings>NormalWarnings</Warnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../Headers/PS3;../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<Warnings>NormalWarnings</Warnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -90,6 +90,9 @@
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PS3\RendererCore.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Windows64\vendor\libpng\png.h">
|
||||
@@ -146,5 +149,8 @@
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PS3\RendererCore.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Durango">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -9,10 +9,18 @@
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ORBIS</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|PS3">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>PS3</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Xbox 360">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Xbox 360</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Durango">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Durango</Platform>
|
||||
@@ -21,43 +29,65 @@
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ORBIS</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|PS3">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>PS3</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Xbox 360">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Xbox 360</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="Windows64\STO_DLC.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\STO_Main.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Windows64\STO_SaveGame.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp" />
|
||||
<ClCompile Include="Windows64\4J_Storage.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\STO_DLC.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\STO_Main.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Windows64\STO_SaveGame.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
@@ -69,30 +99,42 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'" Label="Configuration">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'" Label="Configuration">
|
||||
<PlatformToolset>SNC</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
@@ -123,10 +165,18 @@
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.a</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.a</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.a</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetExt>.a</TargetExt>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
@@ -183,6 +233,12 @@
|
||||
<Warnings>NormalWarnings</Warnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../Headers/PS3;../Headers;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<Warnings>NormalWarnings</Warnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
+37
-5
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Durango">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -9,10 +9,18 @@
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ORBIS</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|PS3">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>PS3</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Xbox 360">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Xbox 360</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Durango">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Durango</Platform>
|
||||
@@ -21,10 +29,18 @@
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ORBIS</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|PS3">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>PS3</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Xbox 360">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Xbox 360</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{D0FDED0B-7704-4376-82DC-FF4377A7CD53}</ProjectGuid>
|
||||
@@ -35,28 +51,38 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'" Label="Configuration">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'" Label="Configuration">
|
||||
<PlatformToolset>Clang</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
@@ -84,9 +110,15 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">
|
||||
<IntDir>Build\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
#pragma once
|
||||
|
||||
typedef unsigned int DWORD;
|
||||
typedef int BOOL;
|
||||
typedef unsigned char BYTE;
|
||||
typedef unsigned short WORD;
|
||||
typedef float FLOAT;
|
||||
typedef int __int32;
|
||||
typedef FLOAT *PFLOAT;
|
||||
typedef BOOL *PBOOL;
|
||||
typedef BOOL *LPBOOL;
|
||||
typedef BYTE *PBYTE;
|
||||
typedef BYTE *LPBYTE;
|
||||
typedef int *PINT;
|
||||
typedef int *LPINT;
|
||||
typedef WORD *PWORD;
|
||||
typedef WORD *LPWORD;
|
||||
typedef int *PLONG;
|
||||
typedef int *LPLONG;
|
||||
typedef DWORD *PDWORD;
|
||||
typedef DWORD *LPDWORD;
|
||||
typedef void *LPVOID;
|
||||
typedef const void *LPCVOID;
|
||||
typedef void *PVOID;
|
||||
typedef unsigned int ULONG;
|
||||
|
||||
typedef unsigned char boolean;
|
||||
|
||||
typedef int INT;
|
||||
typedef unsigned int UINT;
|
||||
typedef unsigned int *PUINT;
|
||||
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef long __int64;
|
||||
typedef unsigned long __uint64;
|
||||
typedef unsigned int DWORD;
|
||||
typedef int INT;
|
||||
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
||||
typedef ULONG_PTR SIZE_T, *PSIZE_T;
|
||||
|
||||
typedef long LONG64, *PLONG64;
|
||||
|
||||
#define VOID void
|
||||
typedef char CHAR;
|
||||
typedef short SHORT;
|
||||
typedef int LONG;
|
||||
typedef long LONGLONG;
|
||||
typedef unsigned long ULONGLONG;
|
||||
|
||||
|
||||
#define CONST const
|
||||
typedef wchar_t WCHAR; // wc, 16-bit UNICODE character
|
||||
typedef WCHAR *PWCHAR;
|
||||
typedef WCHAR *LPWCH, *PWCH;
|
||||
typedef CONST WCHAR *LPCWCH, *PCWCH;
|
||||
typedef WCHAR *NWPSTR;
|
||||
typedef WCHAR *LPWSTR, *PWSTR;
|
||||
typedef CONST WCHAR *LPCWSTR, *PCWSTR;
|
||||
|
||||
//
|
||||
// ANSI (Multi-byte Character) types
|
||||
//
|
||||
typedef CHAR *PCHAR;
|
||||
typedef CHAR *LPCH, *PCH;
|
||||
typedef CONST CHAR *LPCCH, *PCCH;
|
||||
typedef CHAR *NPSTR;
|
||||
typedef CHAR *LPSTR, *PSTR;
|
||||
typedef CONST CHAR *LPCSTR, *PCSTR;
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct _FILETIME {
|
||||
#ifdef _M_PPCBE
|
||||
DWORD dwHighDateTime;
|
||||
DWORD dwLowDateTime;
|
||||
#else
|
||||
DWORD dwLowDateTime;
|
||||
DWORD dwHighDateTime;
|
||||
#endif
|
||||
} FILETIME, *PFILETIME, *LPFILETIME;
|
||||
|
||||
|
||||
#if defined(MIDL_PASS)
|
||||
typedef struct _LARGE_INTEGER {
|
||||
#else // MIDL_PASS
|
||||
typedef union _LARGE_INTEGER {
|
||||
struct {
|
||||
#if defined(_M_PPCBE)
|
||||
LONG HighPart;
|
||||
DWORD LowPart;
|
||||
#else
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
#endif
|
||||
};
|
||||
struct {
|
||||
#if defined(_M_PPCBE)
|
||||
LONG HighPart;
|
||||
DWORD LowPart;
|
||||
#else
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
#endif
|
||||
} u;
|
||||
#endif //MIDL_PASS
|
||||
LONGLONG QuadPart;
|
||||
} LARGE_INTEGER;
|
||||
|
||||
typedef LARGE_INTEGER *PLARGE_INTEGER;
|
||||
|
||||
#if defined(MIDL_PASS)
|
||||
typedef struct _ULARGE_INTEGER {
|
||||
#else // MIDL_PASS
|
||||
typedef union _ULARGE_INTEGER {
|
||||
struct {
|
||||
#if defined(_M_PPCBE)
|
||||
DWORD HighPart;
|
||||
DWORD LowPart;
|
||||
#else
|
||||
DWORD LowPart;
|
||||
DWORD HighPart;
|
||||
#endif
|
||||
};
|
||||
struct {
|
||||
#if defined(_M_PPCBE)
|
||||
DWORD HighPart;
|
||||
DWORD LowPart;
|
||||
#else
|
||||
DWORD LowPart;
|
||||
DWORD HighPart;
|
||||
#endif
|
||||
} u;
|
||||
#endif //MIDL_PASS
|
||||
ULONGLONG QuadPart;
|
||||
} ULARGE_INTEGER;
|
||||
|
||||
typedef ULARGE_INTEGER *PULARGE_INTEGER;
|
||||
|
||||
// 360 specifics
|
||||
typedef int32_t HRESULT;
|
||||
typedef void* HANDLE;
|
||||
|
||||
#define DECLARE_HANDLE(name) typedef HANDLE name
|
||||
DECLARE_HANDLE(HINSTANCE);
|
||||
|
||||
typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of HINSTANCEs */
|
||||
|
||||
typedef struct _OVERLAPPED {
|
||||
ULONG_PTR Internal;
|
||||
ULONG_PTR InternalHigh;
|
||||
DWORD Offset;
|
||||
DWORD OffsetHigh;
|
||||
HANDLE hEvent;
|
||||
} OVERLAPPED, *LPOVERLAPPED;
|
||||
|
||||
typedef LPVOID PSECURITY_ATTRIBUTES;
|
||||
typedef LPVOID LPSECURITY_ATTRIBUTES;
|
||||
|
||||
|
||||
|
||||
#define __in_ecount(a)
|
||||
#define __in_bcount(a)
|
||||
|
||||
#ifndef AUTO_VAR
|
||||
#define AUTO_VAR(_var, _val) auto _var = _val
|
||||
#endif
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_ENABLE_ASSERT_HANDLER
|
||||
|
||||
#include <typeinfo>
|
||||
#include <stddef.h>
|
||||
|
||||
#define __forceinline inline
|
||||
|
||||
#define static_assert(a,b) BOOST_STATIC_ASSERT(a)
|
||||
#define AUTO_VAR BOOST_AUTO
|
||||
|
||||
#define RtlEqualMemory(Destination,Source,Length) (!memcmp((Destination),(Source),(Length)))
|
||||
#define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
|
||||
#define RtlCopyMemory(Destination,Source,Length) memcpy((Destination),(Source),(Length))
|
||||
#define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
|
||||
#define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
|
||||
|
||||
#define MoveMemory RtlMoveMemory
|
||||
#define CopyMemory RtlCopyMemory
|
||||
#define FillMemory RtlFillMemory
|
||||
#define ZeroMemory RtlZeroMemory
|
||||
|
||||
#define S_OK 0
|
||||
|
||||
typedef unsigned long DWORD;
|
||||
typedef int BOOL;
|
||||
typedef unsigned char BYTE;
|
||||
typedef unsigned short WORD;
|
||||
typedef float FLOAT;
|
||||
|
||||
typedef int __int32;
|
||||
|
||||
typedef FLOAT *PFLOAT;
|
||||
typedef BOOL *PBOOL;
|
||||
typedef BOOL *LPBOOL;
|
||||
typedef BYTE *PBYTE;
|
||||
typedef BYTE *LPBYTE;
|
||||
typedef int *PINT;
|
||||
typedef int *LPINT;
|
||||
typedef WORD *PWORD;
|
||||
typedef WORD *LPWORD;
|
||||
typedef long *PLONG;
|
||||
typedef long *LPLONG;
|
||||
typedef DWORD *PDWORD;
|
||||
typedef DWORD *LPDWORD;
|
||||
typedef void *LPVOID;
|
||||
typedef const void *LPCVOID;
|
||||
typedef void *PVOID;
|
||||
typedef unsigned long ULONG;
|
||||
|
||||
typedef unsigned char boolean;
|
||||
|
||||
typedef int INT;
|
||||
typedef unsigned int UINT;
|
||||
typedef unsigned int *PUINT;
|
||||
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef long long __int64;
|
||||
typedef unsigned long long __uint64;
|
||||
typedef unsigned long DWORD;
|
||||
typedef int INT;
|
||||
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
||||
typedef ULONG_PTR SIZE_T, *PSIZE_T;
|
||||
|
||||
typedef __int64 LONG64, *PLONG64;
|
||||
|
||||
#define VOID void
|
||||
typedef char CHAR;
|
||||
typedef short SHORT;
|
||||
typedef long LONG;
|
||||
typedef __int64 LONGLONG;
|
||||
typedef __uint64 ULONGLONG;
|
||||
|
||||
|
||||
#define CONST const
|
||||
typedef wchar_t WCHAR; // wc, 16-bit UNICODE character
|
||||
typedef WCHAR *PWCHAR;
|
||||
typedef WCHAR *LPWCH, *PWCH;
|
||||
typedef CONST WCHAR *LPCWCH, *PCWCH;
|
||||
typedef WCHAR *NWPSTR;
|
||||
typedef WCHAR *LPWSTR, *PWSTR;
|
||||
typedef CONST WCHAR *LPCWSTR, *PCWSTR;
|
||||
|
||||
//
|
||||
// ANSI (Multi-byte Character) types
|
||||
//
|
||||
typedef CHAR *PCHAR;
|
||||
typedef CHAR *LPCH, *PCH;
|
||||
typedef CONST CHAR *LPCCH, *PCCH;
|
||||
typedef CHAR *NPSTR;
|
||||
typedef CHAR *LPSTR, *PSTR;
|
||||
typedef CONST CHAR *LPCSTR, *PCSTR;
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct _FILETIME {
|
||||
#ifdef _M_PPCBE
|
||||
DWORD dwHighDateTime;
|
||||
DWORD dwLowDateTime;
|
||||
#else
|
||||
DWORD dwLowDateTime;
|
||||
DWORD dwHighDateTime;
|
||||
#endif
|
||||
} FILETIME, *PFILETIME, *LPFILETIME;
|
||||
|
||||
|
||||
#if defined(MIDL_PASS)
|
||||
typedef struct _LARGE_INTEGER {
|
||||
#else // MIDL_PASS
|
||||
typedef union _LARGE_INTEGER {
|
||||
struct {
|
||||
#if defined(_M_PPCBE)
|
||||
LONG HighPart;
|
||||
DWORD LowPart;
|
||||
#else
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
#endif
|
||||
};
|
||||
struct {
|
||||
#if defined(_M_PPCBE)
|
||||
LONG HighPart;
|
||||
DWORD LowPart;
|
||||
#else
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
#endif
|
||||
} u;
|
||||
#endif //MIDL_PASS
|
||||
LONGLONG QuadPart;
|
||||
} LARGE_INTEGER;
|
||||
|
||||
typedef LARGE_INTEGER *PLARGE_INTEGER;
|
||||
|
||||
#if defined(MIDL_PASS)
|
||||
typedef struct _ULARGE_INTEGER {
|
||||
#else // MIDL_PASS
|
||||
typedef union _ULARGE_INTEGER {
|
||||
struct {
|
||||
#if defined(_M_PPCBE)
|
||||
DWORD HighPart;
|
||||
DWORD LowPart;
|
||||
#else
|
||||
DWORD LowPart;
|
||||
DWORD HighPart;
|
||||
#endif
|
||||
};
|
||||
struct {
|
||||
#if defined(_M_PPCBE)
|
||||
DWORD HighPart;
|
||||
DWORD LowPart;
|
||||
#else
|
||||
DWORD LowPart;
|
||||
DWORD HighPart;
|
||||
#endif
|
||||
} u;
|
||||
#endif //MIDL_PASS
|
||||
ULONGLONG QuadPart;
|
||||
} ULARGE_INTEGER;
|
||||
|
||||
typedef ULARGE_INTEGER *PULARGE_INTEGER;
|
||||
|
||||
// 360 specifics
|
||||
typedef long HRESULT;
|
||||
typedef void* HANDLE;
|
||||
|
||||
#define DECLARE_HANDLE(name) typedef HANDLE name
|
||||
DECLARE_HANDLE(HINSTANCE);
|
||||
|
||||
typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of HINSTANCEs */
|
||||
|
||||
|
||||
typedef struct _OVERLAPPED {
|
||||
ULONG_PTR Internal;
|
||||
ULONG_PTR InternalHigh;
|
||||
DWORD Offset;
|
||||
DWORD OffsetHigh;
|
||||
HANDLE hEvent;
|
||||
} OVERLAPPED, *LPOVERLAPPED;
|
||||
|
||||
typedef LPVOID PSECURITY_ATTRIBUTES;
|
||||
typedef LPVOID LPSECURITY_ATTRIBUTES;
|
||||
|
||||
#define __in_ecount(a)
|
||||
#define __in_bcount(a)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
@@ -115,7 +115,6 @@ public:
|
||||
|
||||
void Initialise( int iInputStateC, unsigned char ucMapC,unsigned char ucActionC, unsigned char ucMenuActionC );
|
||||
void Tick(void);
|
||||
void TickKBM(void);
|
||||
void SetDeadzoneAndMovementRange(unsigned int uiDeadzone, unsigned int uiMovementRangeMax );
|
||||
void SetGameJoypadMaps(unsigned char ucMap,unsigned char ucAction,unsigned int uiActionVal);
|
||||
unsigned int GetGameJoypadMaps(unsigned char ucMap,unsigned char ucAction);
|
||||
@@ -123,7 +122,6 @@ public:
|
||||
unsigned char GetJoypadMapVal(int iPad);
|
||||
void SetJoypadSensitivity(int iPad, float fSensitivity);
|
||||
unsigned int GetValue(int iPad,unsigned char ucAction, bool bRepeat=false);
|
||||
void MapTouchInput(int iPad, int button);
|
||||
bool ButtonPressed(int iPad,unsigned char ucAction=255); // toggled
|
||||
bool ButtonReleased(int iPad,unsigned char ucAction); //toggled
|
||||
bool ButtonDown(int iPad,unsigned char ucAction=255); // button held down
|
||||
@@ -137,8 +135,6 @@ public:
|
||||
void SetSelectBackSwapped(bool swapped);
|
||||
bool IsSelectBackSwapped();
|
||||
|
||||
bool IsPadActive(int iPad);
|
||||
bool IsCircleCrossSwapped();
|
||||
// In-Game values which may have been remapped due to Southpaw, swap triggers, etc
|
||||
float GetJoypadStick_LX(int iPad, bool bCheckMenuDisplay=true);
|
||||
float GetJoypadStick_LY(int iPad, bool bCheckMenuDisplay=true);
|
||||
@@ -149,55 +145,6 @@ public:
|
||||
|
||||
void SetMenuDisplayed(int iPad, bool bVal);
|
||||
|
||||
void OnKeyDown(int vkCode);
|
||||
void OnKeyUp(int vkCode);
|
||||
void OnChar(wchar_t ch);
|
||||
|
||||
void OnMouseMove(int x, int y);
|
||||
void OnRawMouseDelta(int dx, int dy);
|
||||
void OnLButtonDown(int x, int y);
|
||||
void OnLButtonUp(int x, int y);
|
||||
void OnRButtonDown(int x, int y);
|
||||
void OnRButtonUp(int x, int y);
|
||||
void OnMButtonDown(int x, int y);
|
||||
void OnMButtonUp(int x, int y);
|
||||
void OnMouseWheel(int delta, int x, int y);
|
||||
|
||||
bool IsKeyDown(int vkCode) const;
|
||||
bool IsKeyPressed(int vkCode) const;
|
||||
bool IsKeyReleased(int vkCode) const;
|
||||
|
||||
int GetMouseX() const;
|
||||
int GetMouseY() const;
|
||||
|
||||
// PIEBOT: Used to be IsLButtonDown, changed so it doesnt conflict with windowx.h
|
||||
bool IsMouseLDown() const;
|
||||
bool IsLButtonPressed() const;
|
||||
bool IsLButtonReleased() const;
|
||||
|
||||
bool IsMouseRDown() const;
|
||||
bool IsRButtonPressed() const;
|
||||
bool IsRButtonReleased() const;
|
||||
|
||||
int GetMouseWheelDelta() const;
|
||||
|
||||
wchar_t GetLastChar() const;
|
||||
bool HasChar() const;
|
||||
int GetCharCount() const;
|
||||
wchar_t GetChar(int index) const;
|
||||
|
||||
int GetClipboardText(wchar_t *outText, int outCapacity) const;
|
||||
bool SetClipboardText(const wchar_t *text) const;
|
||||
|
||||
void SetMouseCaptured(bool captured);
|
||||
void SetWindowFocused(bool focused);
|
||||
bool IsMouseCaptured() const;
|
||||
bool IsWindowFocused() const;
|
||||
|
||||
void SetMousePos(int x, int y);
|
||||
|
||||
int GetRawMouseX() const;
|
||||
int GetRawMouseY() const;
|
||||
// EKeyboardResult RequestKeyboard(UINT uiTitle, UINT uiText, UINT uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiResultSize,int( *Func)(LPVOID,const bool),LPVOID lpParam,EKeyboardMode eMode,C4JStringTable *pStringTable=NULL);
|
||||
// EKeyboardResult RequestKeyboard(UINT uiTitle, LPCWSTR pwchDefault, UINT uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiResultSize,int( *Func)(LPVOID,const bool),LPVOID lpParam, EKeyboardMode eMode,C4JStringTable *pStringTable=NULL);
|
||||
EKeyboardResult RequestKeyboard(LPCWSTR Title, LPCWSTR Text, DWORD dwPad, UINT uiMaxChars, int( *Func)(LPVOID,const bool),LPVOID lpParam,C_4JInput::EKeyboardMode eMode);
|
||||
@@ -234,5 +181,4 @@ public:
|
||||
};
|
||||
|
||||
// Singleton
|
||||
extern C_4JInput InputManager;
|
||||
extern HWND g_hWnd;
|
||||
extern C_4JInput InputManager;
|
||||
@@ -65,7 +65,8 @@ public:
|
||||
EKeyboardMode_Full,
|
||||
EKeyboardMode_Alphabet_Extended,
|
||||
EKeyboardMode_IP_Address,
|
||||
EKeyboardMode_Phone
|
||||
EKeyboardMode_Phone,
|
||||
EKeyboardMode_Email
|
||||
};
|
||||
|
||||
void Initialise( int iInputStateC, unsigned char ucMapC,unsigned char ucActionC, unsigned char ucMenuActionC );
|
||||
@@ -98,8 +99,12 @@ public:
|
||||
|
||||
void SetMenuDisplayed(int iPad, bool bVal);
|
||||
|
||||
EKeyboardResult RequestKeyboard(UINT uiTitle, UINT uiText, UINT uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiResultSize,int( *Func)(LPVOID,const bool),LPVOID lpParam,EKeyboardMode eMode,CXuiStringTable *pStringTable=NULL);
|
||||
EKeyboardResult RequestKeyboard(UINT uiTitle, LPCWSTR pwchDefault, UINT uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiResultSize,int( *Func)(LPVOID,const bool),LPVOID lpParam, EKeyboardMode eMode,CXuiStringTable *pStringTable=NULL);
|
||||
// EKeyboardResult RequestKeyboard(UINT uiTitle, UINT uiText, UINT uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiResultSize,int( *Func)(LPVOID,const bool),LPVOID lpParam,EKeyboardMode eMode,CXuiStringTable *pStringTable=NULL);
|
||||
// EKeyboardResult RequestKeyboard(UINT uiTitle, LPCWSTR pwchDefault, UINT uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiResultSize,int( *Func)(LPVOID,const bool),LPVOID lpParam, EKeyboardMode eMode,CXuiStringTable *pStringTable=NULL);
|
||||
EKeyboardResult RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiText, DWORD dwPad, WCHAR *pwchResult, UINT uiMaxChars, int(*Func)(LPVOID, const bool), LPVOID lpParam, EKeyboardMode eMode);
|
||||
EKeyboardResult RequestKeyboard(LPCWSTR uiTitle, LPCWSTR pwchDefault, LPCWSTR uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiMaxChars, int(*Func)(LPVOID, const bool), LPVOID lpParam, EKeyboardMode eMode);
|
||||
EKeyboardResult RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiText, DWORD dwPad, UINT uiMaxChars, int(*Func)(LPVOID, const bool), LPVOID lpParam, C_4JInput::EKeyboardMode eMode);
|
||||
C4JStorage::EMessageResult RequestMessageBox(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR *uiButtons, UINT uiButtonCount, DWORD dwPad, int(*Func)(LPVOID, int, const C4JStorage::EMessageResult), LPVOID lpParam, DWORD dwFocusButton);
|
||||
|
||||
// Online check strings against offensive list - TCR 92
|
||||
// TCR # 092 CMTV Player Text String Verification
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
using namespace std;
|
||||
#include <vector>
|
||||
#include <xtms.h>
|
||||
|
||||
|
||||
class CXuiStringTable;
|
||||
|
||||
+6
-179
@@ -19,57 +19,26 @@ const int XUSER_MAX_COUNT = 4;
|
||||
const int MINECRAFT_NET_MAX_PLAYERS = 8;
|
||||
#endif
|
||||
|
||||
// @Patoke: i'm sorry i had to do this for compat
|
||||
namespace sigma
|
||||
{
|
||||
enum class byte : unsigned char {};
|
||||
}
|
||||
|
||||
#ifdef __ORBIS__
|
||||
#include <net.h>
|
||||
#include <np/np_npid.h>
|
||||
#include <user_service.h>
|
||||
#include "..\..\Minecraft.Client\Orbis\Orbis_PlayerUID.h"
|
||||
#include "..\..\Minecraft.Client\Orbis\Network\SQRNetworkManager_Orbis.h"
|
||||
typedef SQRNetworkManager_Orbis::SessionID SessionID;
|
||||
typedef SQRNetworkManager_Orbis::PresenceSyncInfo INVITE_INFO;
|
||||
|
||||
#elif defined __PS3__ // defined in the profile lib
|
||||
#elif __PS3__
|
||||
#include <np.h>
|
||||
#include <sysutil/sysutil_userinfo.h>
|
||||
#include <netex/libnetctl.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include "..\..\Minecraft.Client\PS3\PS3_PlayerUID.h"
|
||||
#include "..\..\Minecraft.Client\PS3\Network\SQRNetworkManager_PS3.h"
|
||||
typedef SQRNetworkManager::SessionID SessionID;
|
||||
typedef SQRNetworkManager::PresenceSyncInfo INVITE_INFO;
|
||||
|
||||
#elif defined __PSVITA__
|
||||
#include "Ps3Types.h"
|
||||
#elif __PSVITA__
|
||||
#include <np.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include "..\..\Minecraft.Client\PSVita\PSVita_PlayerUID.h"
|
||||
#include "..\..\Minecraft.Client\PSVita\Network\SQRNetworkManager_Vita.h"
|
||||
#include "..\..\Minecraft.Client\PSVita\Network\SQRNetworkManager_AdHoc_Vita.h"
|
||||
typedef SQRNetworkManager_Vita::SessionID SessionID;
|
||||
typedef SQRNetworkManager_Vita::PresenceSyncInfo INVITE_INFO;
|
||||
#endif
|
||||
|
||||
#elif defined _DURANGO
|
||||
#include "..\..\Minecraft.Client\Durango\4JLibs\inc\4J_Profile.h"
|
||||
#include "..\..\Minecraft.Client\Durango\Network\DQRNetworkManager.h"
|
||||
typedef ULONGLONG SessionID;
|
||||
typedef ULONGLONG GameSessionUID;
|
||||
typedef DQRNetworkManager::SessionInfo INVITE_INFO;
|
||||
#else
|
||||
typedef ULONGLONG PlayerUID;
|
||||
typedef ULONGLONG SessionID;
|
||||
typedef PlayerUID GameSessionUID;
|
||||
class INVITE_INFO;
|
||||
|
||||
#endif // __PS3__
|
||||
|
||||
#ifndef _DURANGO
|
||||
#if !(defined _DURANGO || __PS3__)
|
||||
typedef PlayerUID *PPlayerUID;
|
||||
#endif
|
||||
typedef struct _XUIOBJ* HXUIOBJ;
|
||||
@@ -83,49 +52,8 @@ typedef struct _XUIDC* HXUIDC;
|
||||
// void GetLocalTime(SYSTEMTIME *time);
|
||||
// #endif
|
||||
|
||||
bool IsEqualXUID(PlayerUID a, PlayerUID b);
|
||||
|
||||
using namespace std;
|
||||
|
||||
// Temporary implementation of lock free stack with quite a bit more locking than you might expect
|
||||
template <typename T> class XLockFreeStack
|
||||
{
|
||||
std::vector<T *> intStack;
|
||||
public:
|
||||
XLockFreeStack() {
|
||||
#ifdef __ORBIS__
|
||||
OrbisInit(); // For PS4, we need to make sure Ult is set up for the critical sections to be able to initialise
|
||||
#endif
|
||||
InitializeCriticalSectionAndSpinCount(&m_cs,5120);
|
||||
}
|
||||
~XLockFreeStack() { DeleteCriticalSection( &m_cs ); }
|
||||
void Initialize() {}
|
||||
void Push(T *data)
|
||||
{
|
||||
EnterCriticalSection(&m_cs);
|
||||
intStack.push_back(data);
|
||||
LeaveCriticalSection(&m_cs);
|
||||
}
|
||||
T *Pop()
|
||||
{
|
||||
EnterCriticalSection(&m_cs);
|
||||
if( intStack.size() )
|
||||
{
|
||||
T* ret = intStack.back();
|
||||
intStack.pop_back();
|
||||
LeaveCriticalSection(&m_cs);
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
LeaveCriticalSection(&m_cs);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
private:
|
||||
CRITICAL_SECTION m_cs;
|
||||
};
|
||||
|
||||
void XMemCpy(void *a, const void *b, size_t s);
|
||||
void XMemSet(void *a, int t, size_t s);
|
||||
void XMemSet128(void *a, int t, size_t s);
|
||||
@@ -204,7 +132,6 @@ public:
|
||||
bool IsHost();
|
||||
bool IsGuest();
|
||||
bool IsLocal();
|
||||
PlayerUID GetXuid();
|
||||
LPCWSTR GetGamertag();
|
||||
int GetSessionIndex();
|
||||
bool IsTalking();
|
||||
@@ -258,19 +185,6 @@ typedef struct _XSESSION_SEARCHRESULT_HEADER {
|
||||
XSESSION_SEARCHRESULT *pResults;
|
||||
} XSESSION_SEARCHRESULT_HEADER, *PXSESSION_SEARCHRESULT_HEADER;
|
||||
|
||||
typedef struct _XONLINE_FRIEND {
|
||||
PlayerUID xuid;
|
||||
CHAR szGamertag[XUSER_NAME_SIZE];
|
||||
DWORD dwFriendState;
|
||||
SessionID sessionID;
|
||||
DWORD dwTitleID;
|
||||
FILETIME ftUserTime;
|
||||
SessionID xnkidInvite;
|
||||
FILETIME gameinviteTime;
|
||||
DWORD cchRichPresence;
|
||||
// WCHAR wszRichPresence[MAX_RICHPRESENCE_SIZE];
|
||||
} XONLINE_FRIEND, *PXONLINE_FRIEND;
|
||||
|
||||
class IQNetCallbacks
|
||||
{
|
||||
};
|
||||
@@ -294,25 +208,6 @@ typedef enum _QNET_STATE
|
||||
QNET_STATE_SESSION_DELETING
|
||||
} QNET_STATE, * PQNET_STATE;
|
||||
|
||||
class IQNet
|
||||
{
|
||||
public:
|
||||
HRESULT AddLocalPlayerByUserIndex(DWORD dwUserIndex);
|
||||
IQNetPlayer *GetHostPlayer();
|
||||
IQNetPlayer *GetLocalPlayerByUserIndex(DWORD dwUserIndex);
|
||||
IQNetPlayer *GetPlayerByIndex(DWORD dwPlayerIndex);
|
||||
IQNetPlayer *GetPlayerBySmallId(BYTE SmallId);
|
||||
IQNetPlayer *GetPlayerByXuid(PlayerUID xuid);
|
||||
DWORD GetPlayerCount();
|
||||
QNET_STATE GetState();
|
||||
bool IsHost();
|
||||
HRESULT JoinGameFromInviteInfo(DWORD dwUserIndex, DWORD dwUserMask, const INVITE_INFO *pInviteInfo);
|
||||
void HostGame();
|
||||
void EndGame();
|
||||
|
||||
static IQNetPlayer m_player[4];
|
||||
};
|
||||
|
||||
#ifdef _DURANGO
|
||||
// 4J Stu - We don't want to be doing string conversions at runtime for timing instrumentation, so do this instead
|
||||
#define PIXBeginNamedEvent(a, b, ...) PIXBeginEvent(a,L ## b, __VA_ARGS__)
|
||||
@@ -336,13 +231,6 @@ const int QNET_SENDDATA_SECONDARY = 0;
|
||||
#else
|
||||
const int INVALID_XUID = 0;
|
||||
#endif
|
||||
// const int MOJANG_DATA = 0;
|
||||
|
||||
// typedef struct _STRING_VERIFY_RESPONSE
|
||||
// {
|
||||
// WORD wNumStrings;
|
||||
// HRESULT *pStringResult;
|
||||
// } STRING_VERIFY_RESPONSE;
|
||||
|
||||
const int XCONTENT_MAX_DISPLAYNAME_LENGTH = 256;
|
||||
const int XCONTENT_MAX_FILENAME_LENGTH = 256;
|
||||
@@ -402,31 +290,13 @@ typedef enum
|
||||
const int QNET_SENDDATA_RELIABLE = 0;
|
||||
const int QNET_SENDDATA_SEQUENTIAL = 0;
|
||||
|
||||
struct XRNM_SEND_BUFFER
|
||||
{
|
||||
DWORD dwDataSize;
|
||||
sigma::byte *pbyData;
|
||||
};
|
||||
|
||||
const int D3DBLEND_CONSTANTALPHA = 0;
|
||||
const int D3DBLEND_INVCONSTANTALPHA = 0;
|
||||
const int D3DPT_QUADLIST = 0;
|
||||
|
||||
|
||||
typedef struct _XUSER_SIGNIN_INFO {
|
||||
PlayerUID xuid;
|
||||
DWORD dwGuestNumber;
|
||||
} XUSER_SIGNIN_INFO, *PXUSER_SIGNIN_INFO;
|
||||
|
||||
#define XUSER_GET_SIGNIN_INFO_ONLINE_XUID_ONLY 0x00000001
|
||||
#define XUSER_GET_SIGNIN_INFO_OFFLINE_XUID_ONLY 0x00000002
|
||||
|
||||
DWORD XUserGetSigninInfo(
|
||||
DWORD dwUserIndex,
|
||||
DWORD dwFlags,
|
||||
PXUSER_SIGNIN_INFO pSigninInfo
|
||||
);
|
||||
|
||||
class CXuiStringTable
|
||||
{
|
||||
public:
|
||||
@@ -511,35 +381,6 @@ typedef struct {
|
||||
XUSER_DATA value;
|
||||
} XUSER_PROPERTY, *PXUSER_PROPERTY;
|
||||
|
||||
// these need to match apwstrLocaleCode
|
||||
// const int XC_LANGUAGE_ENGLISH =1;
|
||||
// const int XC_LANGUAGE_JAPANESE =2;
|
||||
// const int XC_LANGUAGE_GERMAN =3;
|
||||
// const int XC_LANGUAGE_FRENCH =4;
|
||||
// const int XC_LANGUAGE_SPANISH =5;
|
||||
// const int XC_LANGUAGE_ITALIAN =6;
|
||||
// const int XC_LANGUAGE_KOREAN =7;
|
||||
// const int XC_LANGUAGE_TCHINESE =8;
|
||||
// const int XC_LANGUAGE_PORTUGUESE =9;
|
||||
// const int XC_LANGUAGE_BRAZILIAN =10;
|
||||
// #if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
|
||||
// const int XC_LANGUAGE_RUSSIAN =11;
|
||||
// // more PS3
|
||||
// const int XC_LANGUAGE_DUTCH =12;
|
||||
// const int XC_LANGUAGE_FINISH =13;
|
||||
// const int XC_LANGUAGE_SWEDISH =14;
|
||||
// const int XC_LANGUAGE_DANISH =15;
|
||||
// const int XC_LANGUAGE_NORWEGIAN =16;
|
||||
// const int XC_LANGUAGE_POLISH =17;
|
||||
// const int XC_LANGUAGE_TURKISH =18;
|
||||
// const int XC_LANGUAGE_LATINAMERICANSPANISH =19;
|
||||
//
|
||||
// const int XC_LANGUAGE_GREEK =20;
|
||||
// #else
|
||||
// const int XC_LANGUAGE_UKENGLISH =11;
|
||||
// const int XC_LANGUAGE_MEXICANSPANISH=12;
|
||||
// #endif
|
||||
|
||||
// matching Xbox 360
|
||||
const int XC_LANGUAGE_ENGLISH =0x01;
|
||||
const int XC_LANGUAGE_JAPANESE =0x02;
|
||||
@@ -613,15 +454,7 @@ const int XC_LOCALE_ISRAEL =42;
|
||||
const int XC_LOCALE_UNITED_ARAB_EMIRATES =43;
|
||||
|
||||
// for Sony
|
||||
const int XC_LOCALE_LATIN_AMERICA =240;
|
||||
|
||||
|
||||
|
||||
#if !(defined _DURANGO || defined __PS3__ || defined __ORBIS__ || defined __PSVITA__)
|
||||
DWORD XGetLanguage();
|
||||
DWORD XGetLocale();
|
||||
DWORD XEnableGuestSignin(BOOL fEnable);
|
||||
#endif
|
||||
const int XC_LOCALE_LATIN_AMERICA =240;
|
||||
|
||||
class D3DXVECTOR3
|
||||
{
|
||||
@@ -631,9 +464,3 @@ public:
|
||||
float x,y,z,pad;
|
||||
D3DXVECTOR3& operator += ( CONST D3DXVECTOR3& add );
|
||||
};
|
||||
|
||||
#define QNET_E_SESSION_FULL 0
|
||||
#define QNET_USER_MASK_USER0 1
|
||||
#define QNET_USER_MASK_USER1 2
|
||||
#define QNET_USER_MASK_USER2 4
|
||||
#define QNET_USER_MASK_USER3 8
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
#define S_OK 0
|
||||
|
||||
|
||||
typedef unsigned long DWORD;
|
||||
typedef int BOOL;
|
||||
typedef unsigned char BYTE;
|
||||
typedef unsigned short WORD;
|
||||
typedef float FLOAT;
|
||||
|
||||
typedef int __int32;
|
||||
|
||||
typedef FLOAT *PFLOAT;
|
||||
typedef BOOL *PBOOL;
|
||||
typedef BOOL *LPBOOL;
|
||||
typedef BYTE *PBYTE;
|
||||
typedef BYTE *LPBYTE;
|
||||
typedef int *PINT;
|
||||
typedef int *LPINT;
|
||||
typedef WORD *PWORD;
|
||||
typedef WORD *LPWORD;
|
||||
typedef long *PLONG;
|
||||
typedef long *LPLONG;
|
||||
typedef DWORD *PDWORD;
|
||||
typedef DWORD *LPDWORD;
|
||||
typedef void *LPVOID;
|
||||
typedef const void *LPCVOID;
|
||||
typedef void *PVOID;
|
||||
typedef unsigned long ULONG;
|
||||
|
||||
typedef unsigned char boolean;
|
||||
|
||||
typedef int INT;
|
||||
typedef unsigned int UINT;
|
||||
typedef unsigned int *PUINT;
|
||||
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef long long __int64;
|
||||
typedef unsigned long long __uint64;
|
||||
typedef unsigned long DWORD;
|
||||
typedef int INT;
|
||||
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
||||
typedef ULONG_PTR SIZE_T, *PSIZE_T;
|
||||
|
||||
typedef __int64 LONG64, *PLONG64;
|
||||
|
||||
#define VOID void
|
||||
typedef char CHAR;
|
||||
typedef short SHORT;
|
||||
typedef long LONG;
|
||||
typedef __int64 LONGLONG;
|
||||
typedef __uint64 ULONGLONG;
|
||||
|
||||
|
||||
#define CONST const
|
||||
typedef wchar_t WCHAR; // wc, 16-bit UNICODE character
|
||||
typedef WCHAR *PWCHAR;
|
||||
typedef WCHAR *LPWCH, *PWCH;
|
||||
typedef CONST WCHAR *LPCWCH, *PCWCH;
|
||||
typedef WCHAR *NWPSTR;
|
||||
typedef WCHAR *LPWSTR, *PWSTR;
|
||||
typedef CONST WCHAR *LPCWSTR, *PCWSTR;
|
||||
|
||||
//
|
||||
// ANSI (Multi-byte Character) types
|
||||
//
|
||||
typedef CHAR *PCHAR;
|
||||
typedef CHAR *LPCH, *PCH;
|
||||
typedef CONST CHAR *LPCCH, *PCCH;
|
||||
typedef CHAR *NPSTR;
|
||||
typedef CHAR *LPSTR, *PSTR;
|
||||
typedef CONST CHAR *LPCSTR, *PCSTR;
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#if defined(MIDL_PASS)
|
||||
typedef struct _LARGE_INTEGER {
|
||||
#else // MIDL_PASS
|
||||
typedef union _LARGE_INTEGER {
|
||||
struct {
|
||||
#if defined(_M_PPCBE)
|
||||
LONG HighPart;
|
||||
DWORD LowPart;
|
||||
#else
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
#endif
|
||||
};
|
||||
struct {
|
||||
#if defined(_M_PPCBE)
|
||||
LONG HighPart;
|
||||
DWORD LowPart;
|
||||
#else
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
#endif
|
||||
} u;
|
||||
#endif //MIDL_PASS
|
||||
LONGLONG QuadPart;
|
||||
} LARGE_INTEGER;
|
||||
|
||||
typedef LARGE_INTEGER *PLARGE_INTEGER;
|
||||
Reference in new issue
Block a user