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
#include "CItemInfo.hpp"
#include <cstdint>
enum class eAmmoSpecialType : int32_t
{
None,

View File

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

View File

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

View File

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

View File

@ -1,5 +1,7 @@
#pragma once
#include <cstdint>
class CItemInfo
{
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
#include "vector.hpp"
class CNavigation

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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