Merge pull request #6 from davidebeatrici/compile-check

Add CMake project, setup GitHub Actions, fix compile errors
This commit is contained in:
Yimura 2022-06-01 19:57:49 +02:00 committed by GitHub
commit 0bc4a53a0f
27 changed files with 120 additions and 4 deletions

17
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Configure
run: cmake -B ${{github.workspace}}/build

View File

@ -1,6 +1,9 @@
#pragma once #pragma once
#include "CItemInfo.hpp" #include "CItemInfo.hpp"
#include <cstdint>
enum class eAmmoSpecialType : int32_t enum class eAmmoSpecialType : int32_t
{ {
None, None,

View File

@ -1,9 +1,13 @@
#pragma once #pragma once
#include "CHandlingData.hpp" #include "CHandlingData.hpp"
#include "CVehicleDrawHandler.hpp" #include "CVehicleDrawHandler.hpp"
#include "CVehicleModelInfo.hpp" #include "CVehicleModelInfo.hpp"
#include "fwEntity.hpp" #include "fwEntity.hpp"
#include <cstdint>
#pragma pack(push, 4) #pragma pack(push, 4)
class CAutomobile : public rage::fwEntity class CAutomobile : public rage::fwEntity
{ {

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <cstdint>
enum class eModelType : std::uint8_t enum class eModelType : std::uint8_t
{ {
UNK_0, UNK_0,

View File

@ -1,6 +1,9 @@
#pragma once #pragma once
#include "vector.hpp" #include "vector.hpp"
#include <cstdint>
class CHandlingData class CHandlingData
{ {
public: public:

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <cstdint>
class CItemInfo class CItemInfo
{ {
public: public:

36
CMakeLists.txt Normal file
View File

@ -0,0 +1,36 @@
cmake_minimum_required(VERSION 3.11)
project(GTAV-Classes)
include(CheckIncludeFileCXX)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_REQUIRED_QUIET ON)
set(OK TRUE)
file(GLOB HEADERS "*.hpp")
message(STATUS "")
foreach(HEADER ${HEADERS})
get_filename_component(FILENAME ${HEADER} NAME)
check_include_file_cxx("${HEADER}" ${FILENAME}_OK)
if(${FILENAME}_OK)
message(STATUS "${FILENAME} OK!")
else()
set(OK FALSE)
message(SEND_ERROR "${FILENAME} failed to compile!")
endif()
endforeach()
message(STATUS "")
if(NOT OK)
file(READ "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeError.log" LOG)
message(STATUS ${LOG})
endif()

View File

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "vector.hpp" #include "vector.hpp"
class CNavigation class CNavigation

View File

@ -1,8 +1,12 @@
#pragma once #pragma once
#include "CPlayerInfo.hpp" #include "CPlayerInfo.hpp"
#include "CNonPhysicalPlayerData.hpp" #include "CNonPhysicalPlayerData.hpp"
#include "netPlayer.hpp" #include "netPlayer.hpp"
#include <cstdint>
#pragma pack(push, 1) #pragma pack(push, 1)
class CNetGamePlayer : public rage::netPlayer class CNetGamePlayer : public rage::netPlayer

View File

@ -1,7 +1,10 @@
#pragma once #pragma once
#include "CNetGamePlayer.hpp" #include "CNetGamePlayer.hpp"
#include "CNonPhysicalPlayerData.hpp" #include "CNonPhysicalPlayerData.hpp"
#include <cstdint>
namespace rage namespace rage
{ {
class netPlayerMgrBase class netPlayerMgrBase

View File

@ -1,6 +1,9 @@
#pragma once #pragma once
#include "vector.hpp" #include "vector.hpp"
#include <cstdint>
namespace rage namespace rage
{ {
class nonPhysicalPlayerDataBase class nonPhysicalPlayerDataBase

View File

@ -1,11 +1,15 @@
#pragma once #pragma once
#include "CAutomobile.hpp" #include "CAutomobile.hpp"
#include "CPedModelInfo.hpp" #include "CPedModelInfo.hpp"
#include "CPedWeaponManager.hpp" #include "CPedWeaponManager.hpp"
#include "CPlayerInfo.hpp" #include "CPlayerInfo.hpp"
#include "fwEntity.hpp" #include "fwEntity.hpp"
#include "vector.hpp" #include "vector.hpp"
#include <cstdint>
#pragma pack(push, 1) #pragma pack(push, 1)
class CPed : public rage::fwEntity class CPed : public rage::fwEntity

View File

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "CPed.hpp" #include "CPed.hpp"
class CPedFactory class CPedFactory

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <cstdint>
class CPedModelInfo class CPedModelInfo
{ {
public: public:

View File

@ -1,6 +1,9 @@
#pragma once #pragma once
#include "CWeaponInfo.hpp" #include "CWeaponInfo.hpp"
#include <cstdint>
class CPedWeaponManager class CPedWeaponManager
{ {
public: public:

View File

@ -1,6 +1,9 @@
#pragma once #pragma once
#include "netPlayerData.hpp" #include "netPlayerData.hpp"
#include <cstdint>
enum class eGameState : int32_t enum class eGameState : int32_t
{ {
Invalid = -1, Invalid = -1,

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <cstdint>
class CVehicleDrawHandler class CVehicleDrawHandler
{ {
public: public:

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <cstdint>
class CVehicleModelInfo class CVehicleModelInfo
{ {
public: public:

View File

@ -1,7 +1,10 @@
#pragma once #pragma once
#include "CAmmoInfo.hpp" #include "CAmmoInfo.hpp"
#include "CItemInfo.hpp" #include "CItemInfo.hpp"
#include <cstdint>
enum class eDamageType : int32_t enum class eDamageType : int32_t
{ {
Unknown, Unknown,

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <cstdint>
#pragma pack(push, 1) #pragma pack(push, 1)
class FriendInfo class FriendInfo
{ {

View File

@ -1,6 +1,9 @@
#pragma once #pragma once
#include "FriendInfo.hpp" #include "FriendInfo.hpp"
#include <cstdint>
class FriendList class FriendList
{ {
public: public:

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <cstdint>
#pragma pack(push, 1) #pragma pack(push, 1)
class ScInfo class ScInfo
{ {

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <cstdint>
namespace rage namespace rage
{ {
class fwDrawData class fwDrawData

View File

@ -1,9 +1,13 @@
#pragma once #pragma once
#include "CBaseModelInfo.hpp" #include "CBaseModelInfo.hpp"
#include "CNavigation.hpp" #include "CNavigation.hpp"
#include "fwDrawData.hpp" #include "fwDrawData.hpp"
#include "netObject.hpp" #include "netObject.hpp"
#include <cstdint>
namespace rage namespace rage
{ {
#pragma pack(push, 4) #pragma pack(push, 4)
@ -21,13 +25,13 @@ namespace rage
char pad_0038[16]; //0x0038 char pad_0038[16]; //0x0038
class rage::fwDrawData *m_draw_data; //0x0048 class rage::fwDrawData *m_draw_data; //0x0048
char pad_0050[16]; //0x0050 char pad_0050[16]; //0x0050
class rage::fvector3 m_right; //0x0060 rage::fvector3 m_right; //0x0060
char pad_006C[4]; //0x006C char pad_006C[4]; //0x006C
class rage::fvector3 m_forward; //0x0070 rage::fvector3 m_forward; //0x0070
char pad_007C[4]; //0x007C char pad_007C[4]; //0x007C
class rage::fvector3 m_up; //0x0080 rage::fvector3 m_up; //0x0080
char pad_008C[4]; //0x008C char pad_008C[4]; //0x008C
class rage::fvector3 m_position; //0x0090 rage::fvector3 m_position; //0x0090
char pad_009C[52]; //0x009C char pad_009C[52]; //0x009C
class rage::netObject *m_net_object; //0x00D0 class rage::netObject *m_net_object; //0x00D0
char pad_00D8[176]; //0x00D8 char pad_00D8[176]; //0x00D8

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <cstdint>
namespace rage namespace rage
{ {
class netObject class netObject

View File

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "netPlayerData.hpp" #include "netPlayerData.hpp"
namespace rage namespace rage

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <cstdint>
namespace rage namespace rage
{ {
class netAddress class netAddress