Code cleanup (#667)

* chore: Changed detour_hook extension back to cpp
* chore(crossmap): split crossmap into header and source file
* chore(logger): rename macro's to code style
* chore(logger): removed unused local variable
* chore(benchmark): changed extension to C++ header
* chore: cleanup pickup_rewards file
* chore(gta): cleanup code and file naming
* chore(CanApplyData): Removed unused code
This commit is contained in:
Yimura 2022-12-08 13:35:41 +01:00 committed by GitHub
parent a435e49e50
commit 64f833c74f
16 changed files with 6219 additions and 6213 deletions

View File

@ -1,4 +1,4 @@
#include "gta/PickupRewards.h"
#include "gta/pickup_rewards.hpp"
#include "backend/looped/looped.hpp"
#include "services/players/player_service.hpp"
#include "util/globals.hpp"

View File

@ -1,5 +1,5 @@
#pragma once
#include "gta\VehicleValues.h"
#include "gta/vehicle_values.hpp"
static const std::map<int, std::string> lsc_plate_styles = {

6201
src/crossmap.cpp Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#pragma once
#include "natives.hpp"
#include "gta\joaat.hpp"
#include "gta/joaat.hpp"
enum Rewards : Hash
{

View File

@ -3,7 +3,7 @@
#include "fwddec.hpp"
#include "extensible.hpp"
#include "vector.hpp"
#include "gta\natives.hpp"
#include "gta/natives.hpp"
namespace gta
{

View File

@ -1,6 +1,6 @@
#pragma once
#include "Vehicles.h"
#include "vehicles.hpp"
enum SeatPositions
{

View File

@ -1,6 +1,6 @@
#pragma once
#include "gta\joaat.hpp"
#include "gta/joaat.hpp"
#include "natives.hpp"
enum Boats : Hash

View File

@ -1,7 +1,7 @@
#pragma once
#include "natives.hpp"
#include "gta\joaat.hpp"
#include "gta/joaat.hpp"
enum WeaponHashes : Hash
{

View File

@ -32,8 +32,8 @@ namespace big
BLACK = 30
};
#define AddColorToStream(color) "\x1b[" << int(color) << "m"
#define ResetStreamColor "\x1b[" << int(LogColor::RESET) << "m"
#define ADD_COLOR_TO_STREAM(color) "\x1b[" << int(color) << "m"
#define RESET_STREAM_COLOR "\x1b[" << int(LogColor::RESET) << "m"
#define HEX_TO_UPPER(value) "0x" << std::hex << std::uppercase << (DWORD64)value << std::dec << std::nouppercase
class logger final
@ -181,17 +181,16 @@ namespace big
out
<< "[" << msg.timestamp("%H:%M:%S") << "]"
<< AddColorToStream(color)
<< ADD_COLOR_TO_STREAM(color)
<< "[" << msg.level() << "/"
<< msg.file() << ":" << msg.line() << "]"
<< ResetStreamColor
<< RESET_STREAM_COLOR
<< ": ";
return out.str();
}
static std::string format_file(const g3::LogMessage& msg)
{
LogColor color = log_sink::get_color(msg._level);
std::stringstream out;
out

View File

@ -1,7 +1,7 @@
#include "common.hpp"
#include "pointers.hpp"
#include "script_local.hpp"
#include "gta\script_thread.hpp"
#include "gta/script_thread.hpp"
namespace big
{

View File

@ -1,6 +1,6 @@
#pragma once
#include "gta\VehicleValues.h"
#include "gta/vehicle_values.hpp"
namespace big
{

View File

@ -3,7 +3,7 @@
#include "core/scr_globals.hpp"
#include "core/enums.hpp"
#include "gta/net_object_mgr.hpp"
#include "gta/PickupRewards.h"
#include "gta/pickup_rewards.hpp"
#include "util/session.hpp"
#include "util/scripts.hpp"
#include "services/gta_data/gta_data_service.hpp"

View File

@ -7,7 +7,7 @@
#include "script.hpp"
#include "teleport.hpp"
#include "script_global.hpp"
#include "gta/VehicleValues.h"
#include "gta/vehicle_values.hpp"
#include "services/vehicle_helper/vehicle_helper.hpp"
#include "core/scr_globals.hpp"