commit c3d8726749f247b95fc82ce367f4d91a01257662 Author: Patoke Date: Fri Feb 27 01:44:22 2026 -0300 push src diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba7a514 --- /dev/null +++ b/.gitignore @@ -0,0 +1,428 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates +*.env + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ + +[Dd]ebug/x64/ +[Dd]ebugPublic/x64/ +[Rr]elease/x64/ +[Rr]eleases/x64/ +bin/x64/ +obj/x64/ + +[Dd]ebug/x86/ +[Dd]ebugPublic/x86/ +[Rr]elease/x86/ +[Rr]eleases/x86/ +bin/x86/ +obj/x86/ + +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +[Aa][Rr][Mm]64[Ee][Cc]/ +bld/ +[Oo]bj/ +[Oo]ut/ +[Ll]og/ +[Ll]ogs/ + +# Build results on 'Bin' directories +**/[Bb]in/* +# Uncomment if you have tasks that rely on *.refresh files to move binaries +# (https://github.com/github/gitignore/pull/3736) +#!**/[Bb]in/*.refresh + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* +*.trx + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Approval Tests result files +*.received.* + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.idb +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +# but not Directory.Build.rsp, as it configures directory-level build defaults +!Directory.Build.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +**/.paket/paket.exe +paket-files/ + +# FAKE - F# Make +**/.fake/ + +# CodeRush personal settings +**/.cr/personal + +# Python Tools for Visual Studio (PTVS) +**/__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +#tools/** +#!tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog +MSBuild_Logs/ + +# AWS SAM Build and Temporary Artifacts folder +.aws-sam + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +**/.mfractor/ + +# Local History for Visual Studio +**/.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +**/.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp \ No newline at end of file diff --git a/Windows_Libs/Dev/Dev.slnx b/Windows_Libs/Dev/Dev.slnx new file mode 100644 index 0000000..346d8fa --- /dev/null +++ b/Windows_Libs/Dev/Dev.slnx @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Windows_Libs/Dev/Input/4J_Input.cpp b/Windows_Libs/Dev/Input/4J_Input.cpp new file mode 100644 index 0000000..e8aa690 --- /dev/null +++ b/Windows_Libs/Dev/Input/4J_Input.cpp @@ -0,0 +1,152 @@ +#include "4J_Input.h" +#include "INP_Main.h" +#include "INP_Keyboard.h" + +CKeyboard InternalKeyboard; + +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); +} + +EKeyboardResult C_4JInput::RequestKeyboard(LPCWSTR Title, LPCWSTR Text, DWORD dwPad, UINT uiMaxChars, int(*Func)(LPVOID, const bool), LPVOID lpParam, C_4JInput::EKeyboardMode eMode) +{ + return InternalKeyboard.RequestKeyboard(Title, Text, dwPad, uiMaxChars, Func, lpParam, eMode); +} + +void C_4JInput::GetText(uint16_t* UTF16String) +{ + InternalKeyboard.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) {} \ No newline at end of file diff --git a/Windows_Libs/Dev/Input/INP_ForceFeedback.cpp b/Windows_Libs/Dev/Input/INP_ForceFeedback.cpp new file mode 100644 index 0000000..d8b5709 --- /dev/null +++ b/Windows_Libs/Dev/Input/INP_ForceFeedback.cpp @@ -0,0 +1,119 @@ +#include "INP_ForceFeedback.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_EffectCm_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()->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()->m_bIsActive) + { + ProcessEventInstance(pEffectNode->GetDataAs()); + } + } + + LARGE_INTEGER qwCurrentTime; + QueryPerformanceCounter(&qwCurrentTime); + + LinkedList::_LL_NODE* pRumbleNode = m_RumbleList.m_Head; + while (pRumbleNode) + { + if (pRumbleNode->GetDataAs()->m_TimeLeft <= qwCurrentTime.QuadPart) + { + RUMBLE_EFFECT* pRumble = pRumbleNode->GetDataAs(); + + 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->m_pvData; + delete pTemp; + } + else + { + XInputSetState(pRumbleNode->GetDataAs()->m_Pad, &pRumbleNode->GetDataAs()->m_RumbleData); + pRumbleNode = pRumbleNode->m_Next; + } + } +} \ No newline at end of file diff --git a/Windows_Libs/Dev/Input/INP_ForceFeedback.h b/Windows_Libs/Dev/Input/INP_ForceFeedback.h new file mode 100644 index 0000000..404b662 --- /dev/null +++ b/Windows_Libs/Dev/Input/INP_ForceFeedback.h @@ -0,0 +1,61 @@ +#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; +}; \ No newline at end of file diff --git a/Windows_Libs/Dev/Input/INP_Keyboard.cpp b/Windows_Libs/Dev/Input/INP_Keyboard.cpp new file mode 100644 index 0000000..7ccc128 --- /dev/null +++ b/Windows_Libs/Dev/Input/INP_Keyboard.cpp @@ -0,0 +1,24 @@ +#include "INP_Keyboard.h" + +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) +{ + ClearGlobalText(); + SeedEditBox(); + Func(lpParam, C_4JInput::EKeyboardMode_Numeric); + + return EKeyboard_ResultAccept; +} + +void CKeyboard::GetText(uint16_t* UTF16String) +{ + uint16_t* keyString = GetGlobalText(); + for (unsigned int index = 0; keyString[index] && index < 0x200; index++) + { + UTF16String[index] = keyString[index]; + } +} \ No newline at end of file diff --git a/Windows_Libs/Dev/Input/INP_Keyboard.h b/Windows_Libs/Dev/Input/INP_Keyboard.h new file mode 100644 index 0000000..37648a7 --- /dev/null +++ b/Windows_Libs/Dev/Input/INP_Keyboard.h @@ -0,0 +1,29 @@ +#pragma once +#include "4J_Input.h" + +void ClearGlobalText(); +uint16_t* GetGlobalText(); +void SeedEditBox(); + +class CKeyboard +{ +public: + + enum EKeyboardProcessState + { + + }; + + struct SKeyboardInfo + { + + }; + + void Tick(void); + + 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]; +}; \ No newline at end of file diff --git a/Windows_Libs/Dev/Input/INP_Main.cpp b/Windows_Libs/Dev/Input/INP_Main.cpp new file mode 100644 index 0000000..26a0b79 --- /dev/null +++ b/Windows_Libs/Dev/Input/INP_Main.cpp @@ -0,0 +1,718 @@ +#include "INP_Main.h" + +CInput InternalInputManager; + +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_ucMapC = ucMapC; + m_ucActionC = ucActionC; + m_ucMenuActionC = ucMenuActionC; + m_bJoypadMapArrayIsSetup = false; + + m_ForceFeedback.Initialise(iInputStateC, ucMapC, ucActionC, ucMenuActionC); +} + +void CInput::Tick(void) +{ + UpdateJoypads(); + m_ForceFeedback.Tick(); + 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_RTHUMB; + } + if ((pGamePad->wButtons & XINPUT_GAMEPAD_RIGHT_THUMB) != 0) + { + pThisPad->m_uiButtons |= _360_JOY_BUTTON_LTHUMB; + } + + 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 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]; + uint64_t qwNewTime = qwDeltaTime.QuadPart - fElapsedTime.QuadPart; + + return this->m_fTickToSeconds * (qwDeltaTime.LowPart - fElapsedTime.LowPart); +} + +bool CInput::UpdateJoypads() +{ + assert(m_bJoypadMapArrayIsSetup); + + for (int i = 0; i < 4; 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 < 4; 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 < 4; 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; +} \ No newline at end of file diff --git a/Windows_Libs/Dev/Input/INP_Main.h b/Windows_Libs/Dev/Input/INP_Main.h new file mode 100644 index 0000000..ebc7750 --- /dev/null +++ b/Windows_Libs/Dev/Input/INP_Main.h @@ -0,0 +1,163 @@ +#pragma once +#include "INP_ForceFeedback.h" +#include "INP_Keyboard.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; + unsigned char 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; + }; + + 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[4]; + + int m_iDeadzone; + int m_iMovementRangeMax; + int m_iEffectiveRange; + int m_iHalfRange; + float m_fEffectiveRange; + + unsigned char m_ucInputStateC; + unsigned char m_ucMapC; + unsigned char m_ucActionC; + unsigned char m_ucMenuActionC; + + unsigned int** m_JoypadMap; + + bool m_bJoypadMapArrayIsSetup; + unsigned int m_uiSigninJoypadMask; + bool m_bIsMenuDisplayed[MAX_JOYPADS]; + + CForceFeedback m_ForceFeedback; + CKeyboard m_Keyboard; + + unsigned char m_ucJoypadMapC; + unsigned char m_ucJoypadMapActionC; + + float m_fTickToSeconds; + float m_fRepeatDelaySecs; + float m_fRepeatRateSecs; + + TimeInfo m_Timers[4][24]; + LARGE_INTEGER m_LastActivityTime[4]; + + char* m_sDebugSequenceName; + unsigned int m_uiDebugSequenceIndex; + int (*m_pDebugSequenceFn)(void*); + LPVOID m_pDebugSequenceParam; +}; + +// Singleton +extern CInput InternalInputManager; \ No newline at end of file diff --git a/Windows_Libs/Dev/Input/INP_StringCheck.cpp b/Windows_Libs/Dev/Input/INP_StringCheck.cpp new file mode 100644 index 0000000..c4b4cd1 --- /dev/null +++ b/Windows_Libs/Dev/Input/INP_StringCheck.cpp @@ -0,0 +1 @@ +#include "INP_StringCheck.h" \ No newline at end of file diff --git a/Windows_Libs/Dev/Input/INP_StringCheck.h b/Windows_Libs/Dev/Input/INP_StringCheck.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Input/INP_StringCheck.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Input/Input.vcxproj b/Windows_Libs/Dev/Input/Input.vcxproj new file mode 100644 index 0000000..c98f65e --- /dev/null +++ b/Windows_Libs/Dev/Input/Input.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 18.0 + Win32Proj + {258f8cf7-6317-480d-b07d-52a6846adf67} + input + 10.0 + Input + + + + StaticLibrary + true + v145 + Unicode + + + StaticLibrary + false + v145 + true + Unicode + + + StaticLibrary + true + v145 + Unicode + + + StaticLibrary + false + v145 + true + Unicode + + + + + + + + + + + + + + + + + + + + + 4J_$(ProjectName)_d + + + 4J_$(ProjectName) + + + + Level3 + true + _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + pch.h + + + + + true + + + + + Level3 + true + true + true + _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + pch.h + + + + + true + + + + + Level3 + true + _CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + stdafx.h + stdafx.h + true + + + + + true + + + + + Level3 + true + true + true + _CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + stdafx.h + stdafx.h + true + + + + + true + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/Windows_Libs/Dev/Input/Input.vcxproj.filters b/Windows_Libs/Dev/Input/Input.vcxproj.filters new file mode 100644 index 0000000..644602f --- /dev/null +++ b/Windows_Libs/Dev/Input/Input.vcxproj.filters @@ -0,0 +1,63 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/Windows_Libs/Dev/Input/LinkedList.cpp b/Windows_Libs/Dev/Input/LinkedList.cpp new file mode 100644 index 0000000..79ddd00 --- /dev/null +++ b/Windows_Libs/Dev/Input/LinkedList.cpp @@ -0,0 +1,101 @@ +#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; + } +} \ No newline at end of file diff --git a/Windows_Libs/Dev/Input/LinkedList.h b/Windows_Libs/Dev/Input/LinkedList.h new file mode 100644 index 0000000..73281bb --- /dev/null +++ b/Windows_Libs/Dev/Input/LinkedList.h @@ -0,0 +1,31 @@ +#pragma once + +class LinkedList +{ +public: + + + struct _LL_NODE + { + template + 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(); +}; \ No newline at end of file diff --git a/Windows_Libs/Dev/Input/stdafx.cpp b/Windows_Libs/Dev/Input/stdafx.cpp new file mode 100644 index 0000000..db10eb8 --- /dev/null +++ b/Windows_Libs/Dev/Input/stdafx.cpp @@ -0,0 +1,3 @@ +// stdafx.cpp: source file corresponding to the pre-compiled header + +#include "stdafx.h" diff --git a/Windows_Libs/Dev/Input/stdafx.h b/Windows_Libs/Dev/Input/stdafx.h new file mode 100644 index 0000000..c8e6ab5 --- /dev/null +++ b/Windows_Libs/Dev/Input/stdafx.h @@ -0,0 +1,11 @@ +#ifndef STDAFX_H +#define STDAFX_H + +#define WIN32_LEAN_AND_MEAN +#include + +#include +#include +#include + +#endif //STDAFX_H diff --git a/Windows_Libs/Dev/Profile/4J_Profile.cpp b/Windows_Libs/Dev/Profile/4J_Profile.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Profile/4J_Profile.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Profile/PRO_AwardManager.cpp b/Windows_Libs/Dev/Profile/PRO_AwardManager.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Profile/PRO_AwardManager.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Profile/PRO_AwardManager.h b/Windows_Libs/Dev/Profile/PRO_AwardManager.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Profile/PRO_AwardManager.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Profile/PRO_Data.cpp b/Windows_Libs/Dev/Profile/PRO_Data.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Profile/PRO_Data.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Profile/PRO_Data.h b/Windows_Libs/Dev/Profile/PRO_Data.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Profile/PRO_Data.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Profile/PRO_Main.cpp b/Windows_Libs/Dev/Profile/PRO_Main.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Profile/PRO_Main.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Profile/PRO_Main.h b/Windows_Libs/Dev/Profile/PRO_Main.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Profile/PRO_Main.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Profile/PRO_RichPresence.cpp b/Windows_Libs/Dev/Profile/PRO_RichPresence.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Profile/PRO_RichPresence.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Profile/PRO_RichPresence.h b/Windows_Libs/Dev/Profile/PRO_RichPresence.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Profile/PRO_RichPresence.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Profile/PRO_Sys.cpp b/Windows_Libs/Dev/Profile/PRO_Sys.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Profile/PRO_Sys.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Profile/PRO_Sys.h b/Windows_Libs/Dev/Profile/PRO_Sys.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Profile/PRO_Sys.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Profile/Profile.vcxproj b/Windows_Libs/Dev/Profile/Profile.vcxproj new file mode 100644 index 0000000..0f137a2 --- /dev/null +++ b/Windows_Libs/Dev/Profile/Profile.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 18.0 + Win32Proj + {d68297b9-ca86-4a8c-b81f-61811d7f96b8} + profile + 10.0 + Profile + + + + StaticLibrary + true + v145 + Unicode + + + StaticLibrary + false + v145 + true + Unicode + + + StaticLibrary + true + v145 + Unicode + + + StaticLibrary + false + v145 + true + Unicode + + + + + + + + + + + + + + + + + + + + + 4J_$(ProjectName) + + + 4J_$(ProjectName)_d + + + + Level3 + true + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + pch.h + + + + + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + pch.h + + + + + true + + + + + Level3 + true + _CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + stdafx.h + true + stdafx.h + + + + + true + + + + + Level3 + true + true + true + _CRT_SECURE_NO_WARNINGS;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + stdafx.h + true + stdafx.h + + + + + true + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/Windows_Libs/Dev/Profile/Profile.vcxproj.filters b/Windows_Libs/Dev/Profile/Profile.vcxproj.filters new file mode 100644 index 0000000..59368b8 --- /dev/null +++ b/Windows_Libs/Dev/Profile/Profile.vcxproj.filters @@ -0,0 +1,63 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/Windows_Libs/Dev/Profile/stdafx.cpp b/Windows_Libs/Dev/Profile/stdafx.cpp new file mode 100644 index 0000000..db10eb8 --- /dev/null +++ b/Windows_Libs/Dev/Profile/stdafx.cpp @@ -0,0 +1,3 @@ +// stdafx.cpp: source file corresponding to the pre-compiled header + +#include "stdafx.h" diff --git a/Windows_Libs/Dev/Profile/stdafx.h b/Windows_Libs/Dev/Profile/stdafx.h new file mode 100644 index 0000000..02c148f --- /dev/null +++ b/Windows_Libs/Dev/Profile/stdafx.h @@ -0,0 +1,11 @@ +#ifndef PCH_H +#define PCH_H + +#define WIN32_LEAN_AND_MEAN +#include + +#include +#include +#include + +#endif //PCH_H diff --git a/Windows_Libs/Dev/Render/4J_Render.cpp b/Windows_Libs/Dev/Render/4J_Render.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/4J_Render.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/Render.vcxproj b/Windows_Libs/Dev/Render/Render.vcxproj new file mode 100644 index 0000000..06ab508 --- /dev/null +++ b/Windows_Libs/Dev/Render/Render.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 18.0 + Win32Proj + {cc99eb47-7231-4067-8717-c6bf4abde338} + render + 10.0 + Render + + + + StaticLibrary + true + v145 + Unicode + + + StaticLibrary + false + v145 + true + Unicode + + + StaticLibrary + true + v145 + Unicode + + + StaticLibrary + false + v145 + true + Unicode + + + + + + + + + + + + + + + + + + + + + 4J_$(ProjectName)_d + + + 4J_$(ProjectName) + + + + Level3 + true + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + pch.h + + + + + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + pch.h + + + + + true + + + + + Level3 + true + _CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + stdafx.h + true + stdafx.h + + + + + true + + + + + Level3 + true + true + true + _CRT_SECURE_NO_WARNINGS;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + stdafx.h + true + stdafx.h + + + + + true + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/Windows_Libs/Dev/Render/Render.vcxproj.filters b/Windows_Libs/Dev/Render/Render.vcxproj.filters new file mode 100644 index 0000000..560110b --- /dev/null +++ b/Windows_Libs/Dev/Render/Render.vcxproj.filters @@ -0,0 +1,69 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/Windows_Libs/Dev/Render/RendererCBuff.cpp b/Windows_Libs/Dev/Render/RendererCBuff.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/RendererCBuff.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/RendererCBuff.h b/Windows_Libs/Dev/Render/RendererCBuff.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/RendererCBuff.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/RendererCore.cpp b/Windows_Libs/Dev/Render/RendererCore.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/RendererCore.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/RendererCore.h b/Windows_Libs/Dev/Render/RendererCore.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/RendererCore.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/RendererMatrix.cpp b/Windows_Libs/Dev/Render/RendererMatrix.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/RendererMatrix.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/RendererMatrix.h b/Windows_Libs/Dev/Render/RendererMatrix.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/RendererMatrix.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/RendererState.cpp b/Windows_Libs/Dev/Render/RendererState.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/RendererState.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/RendererState.h b/Windows_Libs/Dev/Render/RendererState.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/RendererState.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/RendererTexture.cpp b/Windows_Libs/Dev/Render/RendererTexture.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/RendererTexture.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/RendererTexture.h b/Windows_Libs/Dev/Render/RendererTexture.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/RendererTexture.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/RendererVertex.cpp b/Windows_Libs/Dev/Render/RendererVertex.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/RendererVertex.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/RendererVertex.h b/Windows_Libs/Dev/Render/RendererVertex.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Render/RendererVertex.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Render/stdafx.cpp b/Windows_Libs/Dev/Render/stdafx.cpp new file mode 100644 index 0000000..db10eb8 --- /dev/null +++ b/Windows_Libs/Dev/Render/stdafx.cpp @@ -0,0 +1,3 @@ +// stdafx.cpp: source file corresponding to the pre-compiled header + +#include "stdafx.h" diff --git a/Windows_Libs/Dev/Render/stdafx.h b/Windows_Libs/Dev/Render/stdafx.h new file mode 100644 index 0000000..02c148f --- /dev/null +++ b/Windows_Libs/Dev/Render/stdafx.h @@ -0,0 +1,11 @@ +#ifndef PCH_H +#define PCH_H + +#define WIN32_LEAN_AND_MEAN +#include + +#include +#include +#include + +#endif //PCH_H diff --git a/Windows_Libs/Dev/Storage/4J_Storage.cpp b/Windows_Libs/Dev/Storage/4J_Storage.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Storage/4J_Storage.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Storage/STO_DLC.cpp b/Windows_Libs/Dev/Storage/STO_DLC.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Storage/STO_DLC.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Storage/STO_DLC.h b/Windows_Libs/Dev/Storage/STO_DLC.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Storage/STO_DLC.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Storage/STO_Main.cpp b/Windows_Libs/Dev/Storage/STO_Main.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Storage/STO_Main.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Storage/STO_Main.h b/Windows_Libs/Dev/Storage/STO_Main.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Storage/STO_Main.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Storage/STO_SaveGame.cpp b/Windows_Libs/Dev/Storage/STO_SaveGame.cpp new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Storage/STO_SaveGame.cpp @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Storage/STO_SaveGame.h b/Windows_Libs/Dev/Storage/STO_SaveGame.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/Windows_Libs/Dev/Storage/STO_SaveGame.h @@ -0,0 +1 @@ +#pragma once diff --git a/Windows_Libs/Dev/Storage/Storage.vcxproj b/Windows_Libs/Dev/Storage/Storage.vcxproj new file mode 100644 index 0000000..0a350c1 --- /dev/null +++ b/Windows_Libs/Dev/Storage/Storage.vcxproj @@ -0,0 +1,173 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 18.0 + Win32Proj + {6ded1618-2ada-4d72-a11f-425e83c7042e} + Storage + 10.0 + + + + StaticLibrary + true + v145 + Unicode + + + StaticLibrary + false + v145 + true + Unicode + + + StaticLibrary + true + v145 + Unicode + + + StaticLibrary + false + v145 + true + Unicode + + + + + + + + + + + + + + + + + + + + + 4J_$(ProjectName) + + + 4J_$(ProjectName)_d + + + + Level3 + true + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + pch.h + + + + + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + pch.h + + + + + true + + + + + Level3 + true + _CRT_SECURE_NO_WARNINGS;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + stdafx.h + true + stdafx.h + + + + + true + + + + + Level3 + true + true + true + _CRT_SECURE_NO_WARNINGS;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + stdcpp20 + Use + stdafx.h + true + stdafx.h + + + + + true + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + \ No newline at end of file diff --git a/Windows_Libs/Dev/Storage/Storage.vcxproj.filters b/Windows_Libs/Dev/Storage/Storage.vcxproj.filters new file mode 100644 index 0000000..d10512f --- /dev/null +++ b/Windows_Libs/Dev/Storage/Storage.vcxproj.filters @@ -0,0 +1,51 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/Windows_Libs/Dev/Storage/stdafx.cpp b/Windows_Libs/Dev/Storage/stdafx.cpp new file mode 100644 index 0000000..db10eb8 --- /dev/null +++ b/Windows_Libs/Dev/Storage/stdafx.cpp @@ -0,0 +1,3 @@ +// stdafx.cpp: source file corresponding to the pre-compiled header + +#include "stdafx.h" diff --git a/Windows_Libs/Dev/Storage/stdafx.h b/Windows_Libs/Dev/Storage/stdafx.h new file mode 100644 index 0000000..02c148f --- /dev/null +++ b/Windows_Libs/Dev/Storage/stdafx.h @@ -0,0 +1,11 @@ +#ifndef PCH_H +#define PCH_H + +#define WIN32_LEAN_AND_MEAN +#include + +#include +#include +#include + +#endif //PCH_H