feat: non fully stubbed profile lib

This commit is contained in:
2026-09-07 02:15:30 -04:00
parent e1fd02765a
commit 0a87b227d3
6 changed files with 218 additions and 133 deletions
+83 -19
View File
@@ -1,23 +1,87 @@
/*
MIT License
#include "PRO_Sys.h"
#include "4J_Input.h"
Copyright (c) 2026 Patoke
bool s_bProfileIsFullVersion = true;
char fakeGamerTag[16] = "PlayerName";
wchar_t fakeGamerTagW[16] = L"PlayerName";
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
bool CSys::IsSignedIn(int iQuadrant)
{
return InputManager.IsPadConnected(iQuadrant); //str1k3r - since we dont sign in like consoles just check if the pad is connected
}
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
bool CSys::IsSignedInLive(int iProf)
{
return InputManager.IsPadConnected(iProf);
}
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
bool CSys::IsGuest(int iQuadrant)
{
//if(iQuadrant == 0)
//{
// return false;
//}
return false;//true;
}
void CSys::SetFakeGamertag(char *name)
{
size_t chars = 0;
strcpy_s(fakeGamerTag, name);
mbstowcs_s(&chars, fakeGamerTagW, 16, name, _TRUNCATE);
}
char* CSys::GetGamertag(int iPad)
{
if(iPad == 0)
{
return fakeGamerTag;
}
static char iPadGamertag[32];
_snprintf_s(iPadGamertag, sizeof(iPadGamertag), "%s (%d)", fakeGamerTag, iPad);
return iPadGamertag;
}
wstring CSys::GetDisplayName(int iPad)
{
if(iPad == 0)
{
return fakeGamerTagW;
}
wchar_t iPadGamertagW[32];
_snwprintf_s(iPadGamertagW, _countof(iPadGamertagW), L"%s (%d)", fakeGamerTagW, iPad);
return iPadGamertagW;
}
bool CSys::AllowedToPlayMultiplayer(int iProf)
{
return InputManager.IsPadConnected(iProf);
}
int CSys::GetPrimaryPad()
{
return 0;
}
void CSys::SetPrimaryPad(int iPad)
{
; //str1k3r - stubbed out
}
bool CSys::IsFullVersion()
{
return s_bProfileIsFullVersion;
}
void CSys::SetDebugFullOverride(bool bVal)
{
s_bProfileIsFullVersion = bVal;
}