Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef __FrostBiteX64_h
- #define __FrostBiteX64_h
- #define BF4_GAMERENDERER 0x142439140 // 48 8B 0D ? ? ? ? 48 85 C9 74 06 48 8B 01 FF 50 50
- #define BF4_CLIENTGAMECONTEXT 0x14242DB68 // 48 8B 0D ? ? ? ? E8 ? ? ? ? 48 8B D8 48 89 44 24 ? 4C 8D B6 ? ? ? ? 49 8B 3E 48 8B AE ? ? ? ? 48 3B FD
- #define BF4_MAIN 0x14212BDB8 // 48 89 0D ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? 80 7F 20 00 74 1A
- #include <windows.h>
- #include <DXGI.h>
- #include <D3D11.h>
- #include <d3d9.h>
- #include <d3dx9.h>
- namespace fb
- {
- class ClientPlayerManager;
- class Main;
- class Client;
- class ClientPlayerManager;
- class ClientGameContext;
- class ClientPlayer;
- class GameRenderer;
- class Color32
- {
- public:
- union
- {
- struct
- {
- BYTE R;
- BYTE G;
- BYTE B;
- BYTE A;
- };
- DWORD dwColor;
- };
- public:
- Color32(const DWORD _Color)
- {
- dwColor=_Color;
- }
- Color32(const BYTE Red,const BYTE Green,const BYTE Blue, const BYTE Alpha)
- {
- A=Alpha;
- R=Red;
- G=Green;
- B=Blue;
- }
- };
- class Vec3
- {
- public:
- union
- {
- struct
- {
- FLOAT x;
- FLOAT y;
- FLOAT z;
- FLOAT w;
- };
- FLOAT data[4];
- };
- public:
- Vec3()
- {
- }
- Vec3(FLOAT X,FLOAT Y,FLOAT Z)
- {
- x = X;
- y = Y;
- z = Z;
- }
- };
- class Vec2
- {
- public:
- union
- {
- struct
- {
- FLOAT x;
- FLOAT y;
- };
- FLOAT data[2];
- };
- };
- class Vec4
- {
- public:
- union
- {
- struct
- {
- FLOAT x;
- FLOAT y;
- FLOAT z;
- FLOAT w;
- };
- FLOAT data[4];
- };
- };
- class LinearTransform
- {
- public:
- union
- {
- struct
- {
- Vec3 left;
- Vec3 up;
- Vec3 forward;
- Vec3 trans;
- };
- struct
- {
- Vec3 m_rows[4];
- };
- FLOAT data[4][4];
- };
- public:
- LinearTransform()
- {
- }
- };
- template< class T > class WeakPtr
- {
- private:
- T** m_ptr;
- public:
- T* GetData()
- {
- if( !m_ptr )
- return NULL;
- if( !*m_ptr )
- return NULL;
- T* ptr = *m_ptr;
- return ( T* )( ( DWORD64 )ptr - 0x8 ); //--> Tried "0x0", 0x4 and 0x12
- }
- };
- enum ClientState
- {
- ClientState_WaitingForStaticBundleLoad, // constant 0x0
- ClientState_LoadProfileOptions, // constant 0x1
- ClientState_Startup, // constant 0x2
- ClientState_StartServer, // constant 0x3
- ClientState_WaitingForLevel, // constant 0x4
- ClientState_StartLoadingLevel, // constant 0x5
- ClientState_WaitingForLevelLoaded, // constant 0x6
- ClientState_WaitingForLevelLink, // constant 0x7
- ClientState_LevelLinked, // constant 0x8
- ClientState_WaitingUIIngame, // constant 0x9
- ClientState_WaitingForLoadingScreenUnLoad, // constant 0xA
- ClientState_Ingame, // constant 0xB
- InGame, // constant 0xC
- ClientState_ConnectToServer, // constant 0xD
- ClientState_WaitingForFrontEndUnLoad, // constant 0xE
- Exiting, // constant 0xF
- ClientState_WaitingUIUnload, // constant 0x10
- ClientState_None // constant 0x11
- };
- class Client
- {
- public:
- char pad_0x0000[0x28];
- ClientGameContext* m_pGameContext; //0x0028
- __int64 m_pSettings; //0x0030
- char pad_0x0038[0x8];
- ClientPlayerManager* m_pClientPlayerManager; //0x0040
- char pad_0x0048[0x18];
- DWORD_PTR m_pGameTime; //0x0060
- DWORD_PTR m_pBorderInputNode; //0x0068
- char pad_0x0070[0x8];
- DWORD_PTR m_Level;
- BYTE Pad_0xdnno[0x268];
- ClientState m_state;
- };
- class Main
- {
- public:
- char pad_0x0000[0x20];
- BYTE m_isDedicatedServer; //0x0020
- BYTE m_isDedicatedServerData; //0x0021
- BYTE m_isPaused; //0x0022
- char pad_0x0024[0x2D];
- Client* m_pClient; //0x0050
- static Main* GetInstance( )
- {
- return *( Main** )( BF4_MAIN ); // 0x1420784B8
- }
- };
- class ClientPlayer
- {
- public:
- virtual void Function0( );
- virtual DWORD_PTR GetCharacterEntity( ); // ClientSoldierEntity + 188
- virtual DWORD_PTR GetCharacterUserData( ); // PlayerCharacterUserData
- virtual DWORD_PTR GetEntryComponent( );
- virtual bool InVehicle( );
- // +15C0 timetowait
- BYTE pad00[0x38]; // 0x000
- CHAR szName[0x10]; // 0x040
- char _0x0050[0x137C];
- BYTE m_teamId; //0x13CC
- char _0x13AD[0xF3];
- DWORD_PTR m_pAttachedControllable; //0x14C0
- __int32 m_attachedEntryId; //0x14A8
- char _0x14AC[4];
- DWORD_PTR m_pControlledControllable; //0x14D0
- __int32 m_ControlledEntryId; //0x14B8
- char _0x14BC[44];
- __int64 m_EntryComponent; //0x14E8 fb::ClientPlayerEntryComponent
- __int64 m_PlayerManager; //0x14F0
- __int64 m_ownPlayerView; //0x14F8
- __int64 m_PlayerView; //0x1500
- char _0x1508[24];
- __int64 m_InputConfiguration; //0x1520
- BYTE Pad_1528[0x80];
- DWORD m_squadId;
- bool m_isSquadLeader;
- bool m_privateSquad;
- };
- class ClientPlayerManager
- {
- public:
- virtual void function();
- BYTE pad00[0x538]; // 0x00
- ClientPlayer* m_pLocalPlayer; // 0x540
- };
- class ClientGameContext
- {
- public:
- BYTE pad00[0x60]; // 0x00
- ClientPlayerManager* m_pPlayerManager; // 0x60
- static ClientGameContext* GetInstance( )
- {
- return *( ClientGameContext** )( BF4_CLIENTGAMECONTEXT );
- }
- };
- class RenderView
- {
- public:
- char _0x0000[64];
- D3DXMATRIX m_Transform; //0x0040
- char _0x0080[52];
- float m_FovY; //0x00B4
- float defualtFovY; //0x00B8
- float nearPlane; //0x00BC
- float farPlane; //0x00C0
- float m_Aspect; //0x00C4
- float orthoWidth; //0x00C8
- float orthoHeight; //0x00CC
- char _0x00D0[384];
- float fovX; //0x0250
- float depthHeightRatio; //0x0254
- float fovScale; //0x0258
- float fovScaleSqr; //0x025C
- D3DXMATRIX m_viewMatrix; //0x0260
- D3DXMATRIX m_viewMatrixTranspose; //0x02A0
- D3DXMATRIX m_viewMatrixInverse; //0x02E0
- D3DXMATRIX m_ProjectionMatrix; //0x0320
- D3DXMATRIX m_viewMatrixAtOrigin; //0x0360
- D3DXMATRIX m_ProjectionTranspose; //0x03A0
- D3DXMATRIX m_ProjectionInverse; //0x03E0
- D3DXMATRIX m_ViewProj; //0x0420
- D3DXMATRIX m_ViewProjTranspose; //0x0460
- D3DXMATRIX m_ViewProjInverse; //0x04A0
- D3DXMATRIX m_UnknMatrix; //0x04E0
- D3DXMATRIX m_Transform2; //0x0520
- D3DXMATRIX m_UnknMatrix2; //0x0560
- };
- class GameRenderer
- {
- public:
- BYTE Pad000[0x48];
- DWORD_PTR m_settings;
- BYTE pad00[0x10]; // 0x00
- RenderView* m_pRenderView; // 0x60
- static GameRenderer* GetInstance( )
- {
- return *( GameRenderer** )( BF4_GAMERENDERER );
- }
- };
- }
- #endif // __ClientHeader_h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement