fix(CI): Compiled in folders and use relative include dirs (#27)

This commit is contained in:
Yimura 2022-08-25 22:06:34 +02:00 committed by GitHub
parent 7052c5e91b
commit eef494452a
33 changed files with 113 additions and 56 deletions

7
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM ubuntu:devel
RUN apt clean && apt update && apt install gcc g++ cmake make -y
WORKDIR /app
COPY . .

View File

@ -0,0 +1,20 @@
{
"name": "C++",
"build": {
"dockerfile": "Dockerfile",
"args": { }
},
"workspaceMount": "source=${localWorkspaceFolder},target=/app,type=bind,consistency=delegated",
"workspaceFolder": "/app",
"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined", "--network=host"],
"settings": {},
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cmake-tools",
"ms-vscode.cpptools-extension-pack",
"WakaTime.vscode-wakatime"
],
//"remoteUser": "vscode",
}

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
.vscode
build/
*.suo
*.db
*.db-shm

View File

@ -12,7 +12,7 @@ set(CMAKE_REQUIRED_QUIET ON)
set(OK TRUE)
file(GLOB HEADERS "*.hpp")
file(GLOB_RECURSE HEADERS "*.hpp")
message(STATUS "")
@ -34,3 +34,4 @@ if(NOT OK)
file(READ "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeError.log" LOG)
message(STATUS ${LOG})
endif()

View File

@ -1,6 +1,6 @@
#pragma once
#include "rage/vector.hpp"
#include "../rage/vector.hpp"
#include <cstdint>

View File

@ -1,6 +1,6 @@
#pragma once
#include "rage/vector.hpp"
#include "../rage/vector.hpp"
class CNavigation
{

View File

@ -1,5 +1,5 @@
#pragma once
#include "rage/fwEntity.hpp"
#include "../rage/fwEntity.hpp"
class CObject : public rage::fwEntity
{}; //Size: 0x018C

View File

@ -1,11 +1,13 @@
#pragma once
#include <typeinfo>
#include "fwRefAwareBase.hpp"
#include "fwExtensionContainer.hpp"
#include "../rage/joaat.hpp"
namespace rage
{
class fwExtensibleBase : public fwRefAwareBase
{
public:
@ -26,4 +28,4 @@ namespace rage
}; //Size: 0x0020
static_assert(sizeof(fwExtensibleBase) == 0x20);
}
}

View File

@ -1,7 +1,7 @@
#pragma once
#include <cstdint>
#include "rage/vector.hpp"
#include "../../rage/vector.hpp"
#pragma pack(push, 4)
class CDoorCreationDataNode

View File

@ -1,7 +1,7 @@
#pragma once
#include <cstdint>
#include "rage/vector.hpp"
#include "../../rage/vector.hpp"
#pragma pack(push,8)
class CObjectCreationDataNode
@ -38,4 +38,4 @@ public:
bool unk_016B; //0x016B
}; //Size: 0x016C
static_assert(sizeof(CObjectCreationDataNode) == 0x16C);
#pragma pack(pop)
#pragma pack(pop)

View File

@ -1,6 +1,6 @@
#pragma once
#include "CPedComponents.hpp"
#include "../CPedComponents.hpp"
#pragma pack(push, 4)
class CPedAppearanceDataNode
@ -31,4 +31,4 @@ public:
uint8_t unk_0x1E1; //0x1E1
};
static_assert(sizeof(CPedAppearanceDataNode) == 0x1E4);
#pragma pack(pop)
#pragma pack(pop)

View File

@ -1,7 +1,7 @@
#pragma once
#include <cstdint>
#include "vector.hpp"
#include "../../rage/vector.hpp"
#pragma pack(push,4)
class CPedAttachDataNode
@ -20,4 +20,4 @@ public:
bool unk_00F1; //0x00F1
};
static_assert(sizeof(CPedAttachDataNode) == 0xF4);
#pragma pack(pop)
#pragma pack(pop)

View File

@ -1,7 +1,7 @@
#pragma once
#include <cstdint>
#include "vector.hpp"
#include "../../rage/vector.hpp"
#pragma pack(push,4)
class CPhysicalAttachDataNode
@ -29,4 +29,4 @@ public:
bool m_is_cargo_vehicle; //0x0116
}; //Size: 0x0118
static_assert(sizeof(CPhysicalAttachDataNode) == 0x118);
#pragma pack(pop)
#pragma pack(pop)

View File

@ -1,7 +1,7 @@
#pragma once
#include <cstdint>
#include "rage/vector.hpp"
#include "../../rage/vector.hpp"
#pragma pack(push, 8)
class CPickupPlacementCreationDataNode
@ -22,4 +22,4 @@ public:
uint64_t *unk_struct_0108; //0x0108
}; //Size: 0x0110
static_assert(sizeof(CPickupPlacementCreationDataNode) == 0x110);
#pragma pack(pop)
#pragma pack(pop)

View File

@ -1,6 +1,6 @@
#pragma once
#include "CPedComponents.hpp"
#include "../CPedComponents.hpp"
#pragma pack(push, 4)
class CPlayerAppearanceDataNode
@ -91,4 +91,4 @@ public:
uint32_t unk_0x456; //0x456
};
static_assert(sizeof(CPlayerAppearanceDataNode) == 0x45C);
#pragma pack(pop)
#pragma pack(pop)

View File

@ -1,7 +1,7 @@
#pragma once
#include <cstdint>
#include "vector.hpp"
#include "../../rage/vector.hpp"
#pragma pack(push,4)
class CPlayerSectorPosNode
@ -20,4 +20,4 @@ public:
uint32_t m_stealth_noise; //0x00F4
}; //Size: 0x00F8
static_assert(sizeof(CPlayerSectorPosNode) == 0xF8);
#pragma pack(pop)
#pragma pack(pop)

View File

@ -1,9 +1,9 @@
#pragma once
#include "player/CPlayerInfo.hpp"
#include "player/CNonPhysicalPlayerData.hpp"
#include "../player/CPlayerInfo.hpp"
#include "../player/CNonPhysicalPlayerData.hpp"
#include "network/netPlayer.hpp"
#include "netPlayer.hpp"
#include <cstdint>

View File

@ -1,7 +1,7 @@
#pragma once
#include "network/CNetGamePlayer.hpp"
#include "player/CNonPhysicalPlayerData.hpp"
#include "CNetGamePlayer.hpp"
#include "../player/CNonPhysicalPlayerData.hpp"
#include <cstdint>

View File

@ -1,7 +1,7 @@
#pragma once
#include <cstdint>
#include "rage/netSyncTree.hpp"
#include "../rage/netSyncTree.hpp"
class CObject;
namespace rage
@ -127,4 +127,4 @@ namespace rage
virtual void UpdatePendingVisibilityChanges() = 0;
}; //Size: 0x0050
static_assert(sizeof(netObject) == 0x50);
}
}

View File

@ -1,6 +1,6 @@
#pragma once
#include "network/netPlayerData.hpp"
#include "netPlayerData.hpp"
namespace rage
{

View File

@ -1,12 +1,12 @@
#pragma once
#include "vehicle/CAutomobile.hpp"
#include "ped/CPedModelInfo.hpp"
#include "ped/CPedWeaponManager.hpp"
#include "player/CPlayerInfo.hpp"
#include "../vehicle/CAutomobile.hpp"
#include "../player/CPlayerInfo.hpp"
#include "CPedModelInfo.hpp"
#include "CPedWeaponManager.hpp"
#include "rage/fwEntity.hpp"
#include "rage/vector.hpp"
#include "../rage/fwEntity.hpp"
#include "../rage/vector.hpp"
#include <cstdint>

View File

@ -1,6 +1,6 @@
#pragma once
#include "ped/CPed.hpp"
#include "CPed.hpp"
class CPedFactory
{

View File

@ -1,6 +1,6 @@
#pragma once
#include "weapon/CWeaponInfo.hpp"
#include "../weapon/CWeaponInfo.hpp"
#include <cstdint>

View File

@ -1,6 +1,6 @@
#pragma once
#include "rage/vector.hpp"
#include "../rage/vector.hpp"
#include <cstdint>

View File

@ -1,6 +1,6 @@
#pragma once
#include "network/netPlayerData.hpp"
#include "../network/netPlayerData.hpp"
#include <cstdint>

View File

@ -1,11 +1,10 @@
#pragma once
#include "base/CBaseModelInfo.hpp"
#include "base/CNavigation.hpp"
#include "base/fwExtensibleBase.hpp"
#include "rage/fwDrawData.hpp"
#include "network/netObject.hpp"
#include "../base/CBaseModelInfo.hpp"
#include "../base/CNavigation.hpp"
#include "../base/fwExtensibleBase.hpp"
#include "../network/netObject.hpp"
#include "fwDrawData.hpp"
#include <cstdint>

27
rage/joaat.hpp Normal file
View File

@ -0,0 +1,27 @@
#pragma once
#include <cstdint>
#include <string_view>
namespace rage
{
using joaat_t = std::uint32_t;
inline constexpr char joaat_to_lower(char c)
{
return (c >= 'A' && c <= 'Z') ? c + ('a' - 'A') : c;
}
inline joaat_t joaat(std::string_view str)
{
joaat_t hash = 0;
for (auto c : str) {
hash += joaat_to_lower(c);
hash += (hash << 10);
hash ^= (hash >> 6);
}
hash += (hash << 3);
hash ^= (hash >> 11);
hash += (hash << 15);
return hash;
}
};

View File

@ -1,6 +1,6 @@
#pragma once
#include "socialclub/FriendInfo.hpp"
#include "FriendInfo.hpp"
#include <cstdint>

View File

@ -1,10 +1,10 @@
#pragma once
#include "vehicle/CHandlingData.hpp"
#include "vehicle/CVehicleDrawHandler.hpp"
#include "vehicle/CVehicleModelInfo.hpp"
#include "CHandlingData.hpp"
#include "CVehicleDrawHandler.hpp"
#include "CVehicleModelInfo.hpp"
#include "rage/fwEntity.hpp"
#include "../rage/fwEntity.hpp"
#include <cstdint>

View File

@ -1,6 +1,6 @@
#pragma once
#include "rage/vector.hpp"
#include "../rage/vector.hpp"
#include <cstdint>

View File

@ -1,6 +1,6 @@
#pragma once
#include "base/CBaseModelInfo.hpp"
#include "../base/CBaseModelInfo.hpp"
#include <cstdint>
@ -27,7 +27,7 @@ enum class eVehicleType : std::uint32_t
class CVehicleModelInfo : public CBaseModelInfo
{
public:
char pad_00B0[76]; //0x00B0
char pad_00B0[72]; //0x00B0
uint8_t m_primary_color_combinations[25]; //0x00F8
uint8_t m_secondary_color_combinations[25]; //0x0111
uint8_t m_unk_color_combos1[25]; //0x012A

View File

@ -1,6 +1,6 @@
#pragma once
#include "weapon/CItemInfo.hpp"
#include "CItemInfo.hpp"
#include <cstdint>

View File

@ -1,7 +1,7 @@
#pragma once
#include "weapon/CAmmoInfo.hpp"
#include "weapon/CItemInfo.hpp"
#include "CAmmoInfo.hpp"
#include "CItemInfo.hpp"
#include <cstdint>