Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #pragma once
- struct W2SMatrix_t
- {
- float Matrixf[4][4];
- };
- //vec3 game coord storage type for bone positions to w2s; byte padding for single rpm
- struct BonePos3_t
- {
- float x;
- byte pad1[12];
- float y;
- byte pad2[12];
- float z;
- byte pad3[12];
- };
- //storage for all bones; byte padding for single rpm
- struct BoneMatrix_t
- {
- byte pad1[12];
- BonePos3_t AllBones[128];
- };
- // 3 float storage structure(game coords)
- struct Vec3_t
- {
- float x;
- float y;
- float z;
- };
- // 2 float storage structure(screen coords)
- struct Vec2_t
- {
- float x;
- float y;
- };
- //structure for storing screen coords and a boolean value that represents the enemies being on-screen or not
- struct W2Sstruct_t
- {
- Vec2_t Coords;
- bool OnScreen;
- };
- //limb containing 4 bones(arms and legs)
- struct Limb4_t
- {
- //game coords
- Vec3_t bonepos3[4];
- //screen coords
- Vec2_t bonepos2[4];
- };
- //limb containing 7 bones(spine)
- struct Limb7_t
- {
- //game coords
- Vec3_t bonepos3[7];
- //screen coords
- Vec2_t bonepos2[7];
- };
- //storage for limbs and a boolean that represents whether or not the skeleton is able to be drawn
- struct Skeleton_t
- {
- //Left leg
- Limb4_t Lleg;
- //Right leg
- Limb4_t Rleg;
- //Spine
- Limb7_t Spine;
- //Left arm
- Limb4_t Larm;
- //Right arm
- Limb4_t Rarm;
- bool Broken;
- };
- //storage for entity information
- struct Entity_t
- {
- DWORD BaseAddr;
- bool IsDead;
- Vec3_t VecOrigin;
- int Team;
- int Health;
- Skeleton_t Skeleton;
- bool Valid;
- };
- //storage for entities
- struct EnityInfo_t
- {
- Entity_t Entity[64];
- };
- //storage for local player info
- struct Player_t
- {
- DWORD BaseAddr;
- int Team;
- Vec3_t VecOrigin;
- bool Valid;
- Vec3_t PunchAngs;
- W2SMatrix_t W2SM;
- };
- //storage for local player entity
- struct PlayerInfo_t
- {
- Player_t Player;
- };
- //all functions relating to process interaction
- struct ProcessFunctions
- {
- void EnableDebugPriv();
- DWORD GetModuleHandleByName(wchar_t* ModuleName, DWORD ProcID);
- HANDLE GetProcessHandleByName(wchar_t* ProcessName);
- bool ReadSettingsFile(std::string* data);
- void ParseSettings(std::string* data);
- bool ReadSettings();
- };
- //RPM wrapper
- struct MemoryFunctions
- {
- template <typename ReadType> ReadType Read(DWORD Address);
- };
- //storage for W2SM
- struct MiscInfo_t
- {
- W2SMatrix_t W2SM;
- };
- //functions that don't fit other categories
- struct MiscFunctions
- {
- float get3ddist(Vec3_t myCoords, Vec3_t enemyCoords);
- W2SMatrix_t GetW2SM();
- W2Sstruct_t w2s(Vec3_t from, W2SMatrix_t w2sm);
- };
- //all functions relating to entity interaction
- struct EntityFunctions
- {
- DWORD GetBaseEntity(int PlayerNumber);
- bool ValidateBones(Entity_t Ent);
- bool IsDead(DWORD BaseAddr);
- Vec3_t GetVecOrigin(DWORD BaseAddr);
- Vec3_t GetVecViewOrigin(DWORD BaseAddr);
- int GetTeam(DWORD BaseAddr);
- int GetHealth(DWORD BaseAddr);
- DWORD GetBoneMatrixAddr(DWORD BaseAddr);
- BoneMatrix_t GetBoneMatrix(DWORD BoneMatrixAddr);
- Vec3_t GetBonePos(BoneMatrix_t Bmatrix, int TargetBone);
- Vec3_t BoneToVec3(BonePos3_t);
- Skeleton_t GetSkeleton(DWORD BaseAddr, W2SMatrix_t W2SM);
- Entity_t GetEntity(int PlayerNumber, W2SMatrix_t W2SM);
- };
- //all functions that relate to local-player interaction
- struct PlayerFunctions
- {
- DWORD GetPlayerBase();
- int GetTeam(DWORD BaseAddr);
- Vec3_t GetPosition(DWORD BaseAddr);
- Player_t GetLocalPlayer();
- Vec3_t GetPunchAngs(DWORD BaseAddr);
- };
- //declaration for objects used by multiple .cpp files
- extern float SWidth;
- extern float SHeight;
- extern RECT WindowRect;
- extern RECT ClientRect;
- extern HANDLE TargetProcess;
- extern DWORD DwClient;
- extern ProcessFunctions ProcessToolbox;
- extern MemoryFunctions MemoryToolbox;
- extern EntityFunctions EntityToolbox;
- extern PlayerFunctions PlayerToolbox;
- extern MiscFunctions MiscToolbox;
- extern EnityInfo_t EnityList;
- extern PlayerInfo_t PlayerInfo;
- extern MiscInfo_t MiscInfo;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement