VC & III build fixes
This commit is contained in:
parent
c249437dcc
commit
3d10fda889
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -75,6 +75,7 @@
|
||||
"xtree": "cpp",
|
||||
"xutility": "cpp",
|
||||
"*.rh": "cpp",
|
||||
"csignal": "cpp"
|
||||
"csignal": "cpp",
|
||||
"coroutine": "cpp"
|
||||
}
|
||||
}
|
@ -569,12 +569,13 @@ TotalSeats = "Total seats: %d"
|
||||
TractionBias = "Traction bias"
|
||||
TractionLoss = "Traction loss"
|
||||
TractionMul = "Traction multiplier"
|
||||
TrafficColor = "TrafficColor"
|
||||
TrafficNeon = "Traffic neons"
|
||||
TrafficNeonMSG = """
|
||||
Adds neon lights to traffic vehicles.
|
||||
|
||||
Only some vehicles will have them."""
|
||||
TrafficOpt = "Traffic options"
|
||||
TrafficType = "Traffic type"
|
||||
TuneTab = "Tune"
|
||||
TurnMass = "Turn mass"
|
||||
Type = "Type"
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define MENU_NAME "Cheat Menu"
|
||||
#define MENU_VERSION_NUMBER "3.3"
|
||||
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
|
||||
#define BUILD_NUMBER "20220626"
|
||||
#define BUILD_NUMBER "20220701"
|
||||
#define MENU_TITLE MENU_NAME " v" MENU_VERSION
|
||||
|
||||
#ifdef GTASA
|
||||
|
@ -347,7 +347,6 @@ void Game::Init()
|
||||
}
|
||||
|
||||
RandomCheats::Process();
|
||||
#endif
|
||||
|
||||
if (freeCam.Pressed())
|
||||
{
|
||||
@ -366,6 +365,7 @@ void Game::Init()
|
||||
{
|
||||
Freecam::Process();
|
||||
}
|
||||
#endif
|
||||
|
||||
// improve this later
|
||||
static uint syncTimer;
|
||||
|
@ -18,8 +18,8 @@ static const char* pedTypeList = "Civ Male\0Civ Female\0Cop (crash)\0Cubans\0Hai
|
||||
"\0Criminal\0Unused\0Prostitute\0Special\0";
|
||||
|
||||
#else
|
||||
static const char* pedTypeList = L"Civ Male\0Civ Female\0Cop\0Leones\0Triads\0Diablos\0Yakuza\0Yardies\0Colombians\0"
|
||||
L"Hoods\0unused\0unused\0Emergency\0Fireman\0Criminal\0unused\0Prostitute\0Special\0";
|
||||
static const char* pedTypeList = "Civ Male\0Civ Female\0Cop\0Leones\0Triads\0Diablos\0Yakuza\0Yardies\0Colombians\0"
|
||||
"Hoods\0unused\0unused\0Emergency\0Fireman\0Criminal\0unused\0Prostitute\0Special\0";
|
||||
|
||||
#endif
|
||||
|
||||
@ -144,7 +144,7 @@ void Ped::SpawnPed(std::string& cat, std::string& name, std::string& model)
|
||||
Command<Commands::LOAD_SPECIAL_CHARACTER>(currentSlot, model.c_str());
|
||||
Command<Commands::LOAD_ALL_MODELS_NOW>();
|
||||
|
||||
Command<Commands::CREATE_CHAR>(SpawnPed::m_nSelectedPedType + 4, 108+currentSlot, pos.x, pos.y, pos.z + 1, &hplayer);
|
||||
Command<Commands::CREATE_CHAR>(Spawner::m_nSelectedPedType + 4, 108+currentSlot, pos.x, pos.y, pos.z + 1, &hplayer);
|
||||
Command<Commands::UNLOAD_SPECIAL_CHARACTER>(currentSlot);
|
||||
|
||||
++currentSlot;
|
||||
@ -369,7 +369,7 @@ void Ped::ShowPage()
|
||||
Widget::DataList(Weapon::m_WeaponData,
|
||||
[](std::string& root, std::string& key, std::string& id)
|
||||
{
|
||||
SpawnPed::m_nWeaponId = std::stoi(id);
|
||||
Spawner::m_nWeaponId = std::stoi(id);
|
||||
weaponName = key;
|
||||
},
|
||||
nullptr);
|
||||
|
@ -484,7 +484,7 @@ void Player::ShowPage()
|
||||
}
|
||||
Widget::CheckboxAddr(TEXT("Player.InfSprint"), 0xB7CEE4);
|
||||
#else
|
||||
Widget::CheckboxAddr(TEXT("Player.InfSprint"),Ui::CheckboxBits (int)&pInfo->m_bInfiniteSprint);
|
||||
Widget::CheckboxAddr(TEXT("Player.InfSprint"), (int)&pInfo->m_bInfiniteSprint);
|
||||
#endif
|
||||
|
||||
ImGui::NextColumn();
|
||||
|
@ -887,27 +887,20 @@ void Vehicle::ShowPage()
|
||||
}
|
||||
|
||||
#ifndef GTA3
|
||||
if (ImGui::CollapsingHeader(TEXT("Vehicle.TrafficOpt")))
|
||||
{
|
||||
|
||||
std::vector<Widget::BindInfo> color
|
||||
{
|
||||
{TEXT("Vehicle.Black"), BY_GAME(0x969151, 0xA10B82, NULL)},
|
||||
{TEXT("Vehicle.Pink"), BY_GAME(0x969150, 0xA10B26, NULL)}
|
||||
};
|
||||
Widget::EditRadioBtnAddr(TEXT("Vehicle.Color"), color);
|
||||
ImGui::Spacing();
|
||||
Widget::EditRadioBtnAddr(TEXT("Vehicle.TrafficColor"), color);
|
||||
#endif
|
||||
#ifdef GTASA
|
||||
std::vector<Widget::BindInfo> type
|
||||
{
|
||||
{TEXT("Vehicle.Cheap"), 0x96915E}, {TEXT("Vehicle.Country"), 0x96917B},
|
||||
{TEXT("Vehicle.Fast"), 0x96915F}
|
||||
};
|
||||
Widget::EditRadioBtnAddr(TEXT("Vehicle.Type"), type);
|
||||
#endif
|
||||
ImGui::Spacing();
|
||||
ImGui::Separator();
|
||||
}
|
||||
Widget::EditRadioBtnAddr(TEXT("Vehicle.TrafficType"), type);
|
||||
#endif
|
||||
if (pPlayer && pPlayer->m_pVehicle)
|
||||
{
|
||||
@ -1049,7 +1042,8 @@ void Vehicle::ShowPage()
|
||||
#ifdef GTASA
|
||||
SpawnVehicle(str);
|
||||
#else
|
||||
SpawnVehicle("", "", str);
|
||||
std::string temp = "";
|
||||
SpawnVehicle(temp, temp, str);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -286,35 +286,6 @@ int CalcArrayIndex()
|
||||
return TOTAL_WEATHERS * hour + CWeather::OldWeatherType;
|
||||
}
|
||||
|
||||
|
||||
bool TimeCycColorEdit3(const char* label, uchar* r, uchar* g, uchar* b)
|
||||
{
|
||||
bool rtn = false;
|
||||
int val = CalcArrayIndex();
|
||||
|
||||
#ifdef GTASA
|
||||
auto red = static_cast<uchar*>(patch::GetPointer(int(r)));
|
||||
auto green = static_cast<uchar*>(patch::GetPointer(int(g)));
|
||||
auto blue = static_cast<uchar*>(patch::GetPointer(int(b)));
|
||||
#else
|
||||
auto red = static_cast<uchar*>(r);
|
||||
auto green = static_cast<uchar*>(g);
|
||||
auto blue = static_cast<uchar*>(b);
|
||||
#endif
|
||||
|
||||
float col[3] { red[val] / 255.0f, green[val] / 255.0f, blue[val] / 255.0f };
|
||||
|
||||
if (ImGui::ColorEdit3(label, col))
|
||||
{
|
||||
red[val] = col[0] * 255;
|
||||
green[val] = col[1] * 255;
|
||||
blue[val] = col[2] * 255;
|
||||
rtn = true;
|
||||
}
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void TimecycSlider(const char* label, T* ptr, int min, int max)
|
||||
{
|
||||
@ -331,26 +302,72 @@ void TimecycSlider(const char* label, T* ptr, int min, int max)
|
||||
arr[val] = static_cast<T>(a);
|
||||
}
|
||||
|
||||
bool TimeCycColorEdit4(const char* label, uchar* r, uchar* g, uchar* b, uchar* a)
|
||||
template<typename T>
|
||||
bool Visual::TimeCycColorEdit3(const char* label, T* r, T* g, T* b, ImGuiColorEditFlags flags)
|
||||
{
|
||||
bool rtn = false;
|
||||
int val = CalcArrayIndex();
|
||||
|
||||
#ifdef GTASA
|
||||
auto red = static_cast<uchar*>(patch::GetPointer(int(r)));
|
||||
auto green = static_cast<uchar*>(patch::GetPointer(int(g)));
|
||||
auto blue = static_cast<uchar*>(patch::GetPointer(int(b)));
|
||||
auto alpha = static_cast<uchar*>(patch::GetPointer(int(a)));
|
||||
auto red = static_cast<T*>(patch::GetPointer(int(r)));
|
||||
auto green = static_cast<T*>(patch::GetPointer(int(g)));
|
||||
auto blue = static_cast<T*>(patch::GetPointer(int(b)));
|
||||
#else
|
||||
auto red = static_cast<uchar*>(r);
|
||||
auto green = static_cast<uchar*>(g);
|
||||
auto blue = static_cast<uchar*>(b);
|
||||
auto alpha = static_cast<uchar*>(a);
|
||||
auto red = static_cast<T*>(r);
|
||||
auto green = static_cast<T*>(g);
|
||||
auto blue = static_cast<T*>(b);
|
||||
#endif
|
||||
|
||||
float col[3] { red[val] / 255.0f, green[val] / 255.0f, blue[val] / 255.0f };
|
||||
|
||||
if (ImGui::ColorEdit3(label, col, flags))
|
||||
{
|
||||
red[val] = col[0] * 255;
|
||||
green[val] = col[1] * 255;
|
||||
blue[val] = col[2] * 255;
|
||||
rtn = true;
|
||||
}
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void Visual::TimecycSlider(const char* label, T* ptr, int min, int max)
|
||||
{
|
||||
int val = CalcArrayIndex();
|
||||
#ifdef GTASA
|
||||
// Compatable with 24h TimeCyc
|
||||
T* arr = static_cast<T*>(patch::GetPointer(int(ptr)));
|
||||
#else
|
||||
T* arr = static_cast<T*>(ptr);
|
||||
#endif
|
||||
int a = arr[val];
|
||||
|
||||
if (ImGui::SliderInt(label, &a, min, max))
|
||||
arr[val] = static_cast<T>(a);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool Visual::TimeCycColorEdit4(const char* label, T* r, T* g, T* b, T* a, ImGuiColorEditFlags flags)
|
||||
{
|
||||
bool rtn = false;
|
||||
int val = CalcArrayIndex();
|
||||
|
||||
#ifdef GTASA
|
||||
auto red = static_cast<T*>(patch::GetPointer(int(r)));
|
||||
auto green = static_cast<T*>(patch::GetPointer(int(g)));
|
||||
auto blue = static_cast<T*>(patch::GetPointer(int(b)));
|
||||
auto alpha = static_cast<T*>(patch::GetPointer(int(a)));
|
||||
#else
|
||||
auto red = static_cast<T*>(r);
|
||||
auto green = static_cast<T*>(g);
|
||||
auto blue = static_cast<T*>(b);
|
||||
auto alpha = static_cast<T*>(a);
|
||||
#endif
|
||||
|
||||
float col[4] { red[val] / 255.0f, green[val] / 255.0f, blue[val] / 255.0f, alpha[val] / 255.0f };
|
||||
|
||||
if (ImGui::ColorEdit4(label, col))
|
||||
if (ImGui::ColorEdit4(label, col, flags))
|
||||
{
|
||||
red[val] = col[0] * 255;
|
||||
green[val] = col[1] * 255;
|
||||
@ -362,6 +379,7 @@ bool TimeCycColorEdit4(const char* label, uchar* r, uchar* g, uchar* b, uchar* a
|
||||
return rtn;
|
||||
}
|
||||
|
||||
|
||||
static void ColorPickerAddr(const char* label, int addr, ImVec4&& default_color)
|
||||
{
|
||||
if (ImGui::CollapsingHeader(label))
|
||||
|
@ -16,6 +16,13 @@ private:
|
||||
static inline bool m_bNoTextures;
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
static bool TimeCycColorEdit3(const char* label, T* r, T* g, T* b, ImGuiColorEditFlags flags = 0);
|
||||
template <typename T>
|
||||
static bool TimeCycColorEdit4(const char* label, T* r, T* g, T* b, T* a, ImGuiColorEditFlags flags = 0);
|
||||
template <typename T>
|
||||
static void TimecycSlider(const char* label, T* data, int min, int max);
|
||||
|
||||
public:
|
||||
Visual() = delete;
|
||||
Visual(const Visual&) = delete;
|
||||
|
@ -46,8 +46,6 @@ public:
|
||||
// Draws a dropdown editor for memory address
|
||||
template <typename T>
|
||||
static void EditAddr(const char* label, uint address, int min = 0, int def = 0, int max = 100);
|
||||
|
||||
// Draws a dropdown editor for memory address float
|
||||
static void EditAddr(const char* label, uint address, float min = 0.0f, float def = 0.0f,
|
||||
float max = 100.0f, float mul = 1, float change = 1.0f);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user