CheatMenuSA/src/neon.h

59 lines
1.4 KiB
C
Raw Normal View History

2020-12-02 16:19:16 -05:00
#pragma once
2021-06-18 12:49:11 -04:00
#include "extender/VehicleExtender.h"
2020-12-02 16:19:16 -05:00
2021-12-24 05:36:07 -05:00
/*
Vehicle Neon implementation class for GTA: San Andreas
Handles neon colors and neon color changing
TODO: Implement for VC & 3 too (maybe)
Dunno how it'd work with the d3d8to9 wrapper
*/
class Neon
2020-12-02 16:19:16 -05:00
{
private:
2022-01-07 03:18:00 -05:00
class NeonData
{
public:
CRGBA m_Color;
bool m_bNeonInstalled;
float m_fVal;
bool m_bIncrement;
bool m_bPulsing;
2022-01-07 03:18:00 -05:00
NeonData(CVehicle* pVeh)
{
m_bNeonInstalled = false;
m_fVal = 0.0;
m_bIncrement = true;
}
};
2021-06-18 12:49:11 -04:00
2022-01-07 03:18:00 -05:00
static inline RwTexture* m_pNeonTexture = nullptr; // pointer to the neon mask texture
static inline VehicleExtendedData<NeonData> m_VehNeon;
2020-12-02 16:19:16 -05:00
public:
2022-01-07 03:18:00 -05:00
Neon() = delete;
Neon(Neon&) = delete;
2022-01-04 17:33:07 -05:00
2022-06-12 14:01:43 -04:00
// Injects necessary hooks into the game
static void InjectHooks();
2022-06-12 14:01:43 -04:00
// Installs neons with color
static void Install(CVehicle* veh, int r, int g, int b);
// Is neon installer for particular vehicle
2022-01-07 03:18:00 -05:00
static bool IsInstalled(CVehicle* veh);
2022-06-12 14:01:43 -04:00
// Is neon pulsing enabled for vehicle
2022-01-07 03:18:00 -05:00
static bool IsPulsingEnabled(CVehicle* veh);
2022-06-12 14:01:43 -04:00
// Set neon pulsing state
2022-01-07 03:18:00 -05:00
static void SetPulsing(CVehicle* veh, bool state);
2022-06-12 14:01:43 -04:00
// Removes the neon game hooks
2022-01-07 03:18:00 -05:00
static void RemoveHooks();
2022-06-12 14:01:43 -04:00
// Removes neon from vehicle
2022-01-07 03:18:00 -05:00
static void Remove(CVehicle* veh);
2020-12-02 16:19:16 -05:00
};