chore: cleanup

This commit is contained in:
str1k3r committed 2026-10-25 17:00:03 -04:00
1 parent f7f0619c39
commit bfa635f781
11 files changed
+221 -180

No files matched your search

+6 -2
View File
@@ -1339,25 +1339,29 @@
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Durango'">
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ORBIS'">
<PlatformToolset>Clang</PlatformToolset>
<TrackFileAccess>false</TrackFileAccess>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'" Label="Configuration">
<PlatformToolset>SNC</PlatformToolset>
<TrackFileAccess>false</TrackFileAccess>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ORBIS'">
<PlatformToolset>Clang</PlatformToolset>
<TrackFileAccess>false</TrackFileAccess>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'" Label="Configuration">
<PlatformToolset>SNC</PlatformToolset>
<TrackFileAccess>false</TrackFileAccess>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">
+14 -22
View File
@@ -1,12 +1,5 @@
#include "INP_Main.h"
#include <stdlib.h>
#include <stdio.h>
#include <sys/sys_time.h> // sys_time_get_current_time
#include <sysutil/sysutil_common.h> // cellSysutilGetSystemParamInt
#include <sysutil/sysutil_sysparam.h> // cellSysutilGetSystemParamInt
CInput InternalInputManager;
CInput::CInput()
@@ -47,20 +40,21 @@ void CInput::DebugPrintf(const char *szFormat, ...)
printf(buf);
}
bool CInput::QueryPerformanceFrequency(_LARGE_INTEGER *)
//str1k3r - Taken from Ps3Stubs.cpp
bool CInput::QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency)
{
#if TO_BE_IMPLEMENTED
*(_QWORD *)a2 = 1000000;
#endif
// microseconds
lpFrequency->QuadPart = (1000 * 1000);
return false;
}
bool CInput::QueryPerformanceCounter(_LARGE_INTEGER *)
bool CInput::QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)
{
#if TO_BE_IMPLEMENTED
sys_time_get_current_time(&v3, &v4);
*(_QWORD *)a2 = 1000000 * v3 + v4 / 1000;
#endif
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;
}
@@ -704,12 +698,10 @@ FLOAT CInput::GetIdleSeconds(int iPad)
{
LARGE_INTEGER qwDeltaTime;
QueryPerformanceCounter(&qwDeltaTime);
#if TO_BE_IMPLEMENTED
uint64_t v4 = qwDeltaTime.QuadPart - *(_QWORD *)(v5 + 4696 + 8 * a2);
return (float)(*(float *)((char *)&loc_644 + v5) * (float)v4)
#else
return 0.0f;
#endif
LARGE_INTEGER fElapsedTime = this->m_LastActivityTime[iPad];
return this->m_fTickToSeconds * (qwDeltaTime.LowPart - fElapsedTime.LowPart);
}
void CInput::SetLostInputControlCallback(void( *Func)(LPVOID, bool),LPVOID lpParam)
-2
View File
@@ -4,8 +4,6 @@
#include "INP_OnScreenKeyboard.h"
#include "INP_MsgBox.h"
#include <cell/pad.h>
#define MAX_JOYPADS 4
class CInput
-1
View File
@@ -1,7 +1,6 @@
#pragma once
#include "4J_Input.h"
#include <sysutil/sysutil_msgdialog.h> // cellMsgDialogOpen2
class CMsgBox
{
-5
View File
@@ -1,11 +1,6 @@
#pragma once
#include "4J_Input.h"
#include <sysutil/sysutil_common.h> // cellSysutilRegisterCallback
#include <sysutil/sysutil_oskdialog.h > // cellOskDialogUnloadAsync
#include <sysutil/sysutil_oskdialog_ext.h> // cellOskDialogExtRegisterKeyboardEventHookCallback
#include <sysutil/sysutil_sysparam.h> // cellSysutilGetSystemParamInt
#include <cell/sysmodule.h> // SYS_MEMORY_CONTAINER_ID_INVALID
class CKeyboard
{
-1
View File
@@ -646,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);
}
-1
View File
@@ -556,7 +556,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);
}
+22 -14
View File
@@ -1,35 +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
#ifdef _XBOX
#include <xtl.h>
#include <stdint.h>
#include <assert.h>
#include "4J_Storage.h"
#else
#include "extraX64.h"
#endif
#ifdef __PS3__
#include "Ps3Types.h"
#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
#endif //PCH_H
+174
View File
@@ -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
+1 -57
View File
@@ -5,38 +5,12 @@
#define BOOST_NO_CXX11_NULLPTR
#define BOOST_ENABLE_ASSERT_HANDLER
#include <typeinfo>
#include <typeinfo>
#include <stddef.h>
#define __forceinline inline
//#include "winerror.h"
// user the pool_allocator for all unordered_set and unordered_map instances
// template < class T, class H = hash<T>, class P = std::equal_to<T>, class A = boost::pool_allocator<T> >
// class unordered_set : public std::tr1::unordered_set<T, H, P, A >
// {};
//
// template <class K, class T, class H = hash<K>, class P = std::equal_to<K>, class A = boost::pool_allocator<std::pair<const K,T> > >
// class unordered_map : public std::tr1::unordered_map<K, T, H, P, A >
// {};
// template < class T, class H = hash<T>, class P = std::equal_to<T>, class A = C4JPoolAllocator<T> >
// class unordered_set : public std::tr1::unordered_set<T, H, P, A >
// {};
//
// template <class K, class T, class H = hash<K>, class P = std::equal_to<K>, class A = C4JPoolAllocator<std::pair<const K,T> > >
// class unordered_map : public std::tr1::unordered_map<K, T, H, P, A >
// {};
// using boost::ublas::vector;
#define static_assert(a,b) BOOST_STATIC_ASSERT(a)
#define AUTO_VAR BOOST_AUTO
@@ -51,16 +25,8 @@
#define FillMemory RtlFillMemory
#define ZeroMemory RtlZeroMemory
// #include <math.h>
// #include "DirectX\DirectXMath.h"
// using namespace DirectX;
#define S_OK 0
typedef unsigned long DWORD;
typedef int BOOL;
typedef unsigned char BYTE;
@@ -228,31 +194,9 @@ typedef struct _OVERLAPPED {
typedef LPVOID PSECURITY_ATTRIBUTES;
typedef LPVOID LPSECURITY_ATTRIBUTES;
#define __in_ecount(a)
#define __in_bcount(a)
// const int XUSER_MAX_COUNT = 4;
#include <stdio.h>
#include <libsn.h>
#include <string>
#include <memory>
#ifdef _CONTENT_PACKAGE
#define PS3_ASSERT(val)
#define PS3_ASSERT_CELL_ERROR(errVal)
#elif defined(_RELEASE_FOR_ART)
#define PS3_ASSERT(val)
#define PS3_ASSERT_CELL_ERROR(errVal)
#else
#define PS3_ASSERT(val) if(!(val)) { printf("----------------------\n"); printf("Assert failed!!!\n"); printf(#val); printf("\n"); printf("%s failed.\nFile %s\nline %d \n----------------------\n", __FUNCTION__, __FILE__, __LINE__); snPause(); }
#define PS3_ASSERT_CELL_ERROR(errVal) if(errVal != CELL_OK) { printf("----------------------\n %s failed with error %d [0x%08x]\n----------------------\n", __FUNCTION__, errVal, errVal); PS3_ASSERT(0); }
#endif
#define assert PS3_ASSERT
+4 -75
View File
@@ -23,42 +23,21 @@ const int MINECRAFT_NET_MAX_PLAYERS = 8;
#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 <stdlib.h>
#include "Ps3Types.h"
#elif defined __PSVITA__
#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__
#if !(defined _DURANGO || __PS3__)
typedef PlayerUID *PPlayerUID;
#endif
@@ -252,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;
@@ -409,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;
@@ -511,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
{
@@ -529,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