diff --git a/BigBaseV2/src/backend/backend.cpp b/BigBaseV2/src/backend/backend.cpp index 38b28a23..bd898264 100644 --- a/BigBaseV2/src/backend/backend.cpp +++ b/BigBaseV2/src/backend/backend.cpp @@ -19,4 +19,176 @@ namespace big }); } } + + void backend::self_loop() + { + LOG(INFO) << "Starting script: Self"; + + while (g_running) + { + looped::self_clean_player(); + looped::self_free_cam(); + looped::self_godmode(); + looped::self_invisibility(); + looped::self_no_ragdoll(); + looped::self_off_radar(); + looped::self_police(); + looped::self_super_run(); + + script::get_current()->yield(); + } + } + + void backend::weapons_loop() + { + LOG(INFO) << "Starting script: Weapons"; + + while (g_running) + { + looped::weapons_ammo_special_type(); + looped::weapons_cage_gun(); + looped::weapons_delete_gun(); + looped::weapons_force_crosshairs(); + looped::weapons_gravity_gun(); + looped::weapons_increased_damage(); + looped::weapons_infinite_ammo(); + looped::weapons_infinite_mag(); + looped::weapons_no_recoil(); + looped::weapons_no_spread(); + looped::weapons_repair_gun(); + looped::weapons_steal_vehicle_gun(); + looped::weapons_vehicle_gun(); + + script::get_current()->yield(); + } + } + + void backend::vehicles_loop() + { + LOG(INFO) << "Starting script: Vehicles"; + + while (g_running) + { + looped::vehicle_auto_drive_to_waypoint(); + looped::vehicle_auto_drive_wander(); + looped::vehicle_despawn_bypass(); + looped::vehicle_drive_on_water(); + looped::vehicle_god_mode(); + looped::vehicle_horn_boost(); + looped::vehicle_jump(); + looped::vehicle_instant_brake(); + looped::vehicle_is_targetable(); + looped::vehicle_rainbow_paint(); + looped::vehicle_seatbelt(); + looped::vehicle_speedo_meter(); + + script::get_current()->yield(); + } + } + + void backend::turnsignal_loop() + { + LOG(INFO) << "Starting script: turnsignal"; + + while (g_running) + { + looped::vehicle_turn_signals(); + + script::get_current()->yield(); + } + } + + void backend::rgbrandomizer_loop() + { + LOG(INFO) << "Starting script: rgbrandomizer"; + + while (g_running) + { + looped::rgb_synced_fade(); + looped::rgb_synced_spasm(); + + script::get_current()->yield(); + } + } + + void backend::misc_loop() + { + LOG(INFO) << "Starting script: Miscellaneous"; + + while (g_running) + { + looped::hud_transition_state(); + looped::tunables_disable_phone(); + looped::tunables_no_idle_kick(); + looped::session_local_time(); + + script::get_current()->yield(); + } + } + + void backend::remote_loop() + { + LOG(INFO) << "Starting script: Remote"; + + while (g_running) + { + looped::player_never_wanted(); + looped::player_spectate(); + + script::get_current()->yield(); + } + } + + void backend::noclip_loop() + { + LOG(INFO) << "Starting script: No clip"; + + while (g_running) + { + looped::self_noclip(); + + script::get_current()->yield(); + } + } + + void backend::lscustoms_loop() + { + LOG(INFO) << "Starting script: Ls customs"; + + while (g_running) + { + looped::vehicle_ls_customs(); + + script::get_current()->yield(); + } + } + + void backend::vehiclefly_loop() + { + LOG(INFO) << "Starting script: Vehicle fly"; + + while (g_running) + { + looped::vehicle_fly(); + + script::get_current()->yield(); + } + } + + void backend::disable_control_action_loop() + { + LOG(INFO) << "Starting script: Disable Control Action"; + + while (g_running) + { + looped::self_free_cam_disable_control_action(); + looped::self_noclip_disable_control_action(); + + looped::custom_gun_disable_control_action(); + + context_menu_service::disable_control_action_loop(); + + script::get_current()->yield(); + } + } } diff --git a/BigBaseV2/src/backend/backend.hpp b/BigBaseV2/src/backend/backend.hpp index 0ed3c861..56cf3153 100644 --- a/BigBaseV2/src/backend/backend.hpp +++ b/BigBaseV2/src/backend/backend.hpp @@ -10,177 +10,16 @@ namespace big { public: static void loop(); - - static void self_loop() - { - LOG(INFO) << "Starting script: Self"; - - while (g_running) - { - looped::self_clean_player(); - looped::self_free_cam(); - looped::self_godmode(); - looped::self_invisibility(); - looped::self_no_ragdoll(); - looped::self_off_radar(); - looped::self_police(); - looped::self_super_run(); - - script::get_current()->yield(); - } - } - - static void weapons_loop() - { - LOG(INFO) << "Starting script: Weapons"; - - while (g_running) - { - looped::weapons_ammo_special_type(); - looped::weapons_cage_gun(); - looped::weapons_delete_gun(); - looped::weapons_force_crosshairs(); - looped::weapons_gravity_gun(); - looped::weapons_increased_damage(); - looped::weapons_infinite_ammo(); - looped::weapons_infinite_mag(); - looped::weapons_no_recoil(); - looped::weapons_no_spread(); - looped::weapons_repair_gun(); - looped::weapons_steal_vehicle_gun(); - looped::weapons_vehicle_gun(); - - script::get_current()->yield(); - } - } - - static void vehicles_loop() - { - LOG(INFO) << "Starting script: Vehicles"; - - while (g_running) - { - looped::vehicle_auto_drive_to_waypoint(); - looped::vehicle_auto_drive_wander(); - looped::vehicle_despawn_bypass(); - looped::vehicle_drive_on_water(); - looped::vehicle_god_mode(); - looped::vehicle_horn_boost(); - looped::vehicle_jump(); - looped::vehicle_instant_brake(); - looped::vehicle_is_targetable(); - looped::vehicle_rainbow_paint(); - looped::vehicle_seatbelt(); - looped::vehicle_speedo_meter(); - - script::get_current()->yield(); - } - } - - static void turnsignal_loop() - { - LOG(INFO) << "Starting script: turnsignal"; - - while (g_running) - { - looped::vehicle_turn_signals(); - - script::get_current()->yield(); - } - } - - static void rgbrandomizer_loop() - { - LOG(INFO) << "Starting script: rgbrandomizer"; - - while (g_running) - { - looped::rgb_synced_fade(); - looped::rgb_synced_spasm(); - - script::get_current()->yield(); - } - } - - static void misc_loop() - { - LOG(INFO) << "Starting script: Miscellaneous"; - - while (g_running) - { - looped::hud_transition_state(); - looped::tunables_disable_phone(); - looped::tunables_no_idle_kick(); - looped::session_local_time(); - - script::get_current()->yield(); - } - } - - static void remote_loop() - { - LOG(INFO) << "Starting script: Remote"; - - while (g_running) - { - looped::player_never_wanted(); - looped::player_spectate(); - - script::get_current()->yield(); - } - } - - static void noclip_loop() - { - LOG(INFO) << "Starting script: No clip"; - - while (g_running) - { - looped::self_noclip(); - - script::get_current()->yield(); - } - } - - static void lscustoms_loop() - { - LOG(INFO) << "Starting script: Ls customs"; - - while (g_running) - { - looped::vehicle_ls_customs(); - - script::get_current()->yield(); - } - } - - static void vehiclefly_loop() - { - LOG(INFO) << "Starting script: Vehicle fly"; - - while (g_running) - { - looped::vehicle_fly(); - - script::get_current()->yield(); - } - } - - static void disable_control_action_loop() - { - LOG(INFO) << "Starting script: Disable Control Action"; - - while (g_running) - { - looped::self_free_cam_disable_control_action(); - looped::self_noclip_disable_control_action(); - - looped::custom_gun_disable_control_action(); - - context_menu_service::disable_control_action_loop(); - - script::get_current()->yield(); - } - } + static void self_loop(); + static void weapons_loop(); + static void vehicles_loop(); + static void turnsignal_loop(); + static void rgbrandomizer_loop(); + static void misc_loop(); + static void remote_loop(); + static void noclip_loop(); + static void lscustoms_loop(); + static void vehiclefly_loop(); + static void disable_control_action_loop(); }; } diff --git a/BigBaseV2/src/fiber_pool.cpp b/BigBaseV2/src/fiber_pool.cpp index 7de72a10..99e6fb9c 100644 --- a/BigBaseV2/src/fiber_pool.cpp +++ b/BigBaseV2/src/fiber_pool.cpp @@ -50,4 +50,4 @@ namespace big script::get_current()->yield(); } } -} +} \ No newline at end of file diff --git a/BigBaseV2/src/main.cpp b/BigBaseV2/src/main.cpp index af259573..c9718042 100644 --- a/BigBaseV2/src/main.cpp +++ b/BigBaseV2/src/main.cpp @@ -1,4 +1,4 @@ -#include "common.hpp" +#include "common.hpp" #include "core/globals.hpp" #include "features.hpp" #include "fiber_pool.hpp" @@ -31,146 +31,146 @@ BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, PVOID) g_hmodule = hmod; g_main_thread = CreateThread(nullptr, 0, [](PVOID) -> DWORD - { - while (!FindWindow(L"grcWindow", L"Grand Theft Auto V")) - std::this_thread::sleep_for(1s); - - std::filesystem::path base_dir = std::getenv("appdata"); - base_dir /= "BigBaseV2"; - auto file_manager_instance = std::make_unique(base_dir); - - auto globals_instance = std::make_unique( - file_manager_instance->get_project_file("./settings.json") - ); - - auto logger_instance = std::make_unique( - "YimMenu", - file_manager_instance->get_project_file("./cout.log") - ); - - EnableMenuItem(GetSystemMenu(FindWindowA(NULL, "YimMenu"), 0), SC_CLOSE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED); - - try { - LOG(INFO) << "Yim's Menu Initializing"; - auto pointers_instance = std::make_unique(); - LOG(INFO) << "Pointers initialized."; + while (!FindWindow(L"grcWindow", L"Grand Theft Auto V")) + std::this_thread::sleep_for(1s); - auto renderer_instance = std::make_unique(); - LOG(INFO) << "Renderer initialized."; + std::filesystem::path base_dir = std::getenv("appdata"); + base_dir /= "BigBaseV2"; + auto file_manager_instance = std::make_unique(base_dir); - auto fiber_pool_instance = std::make_unique(11); - LOG(INFO) << "Fiber pool initialized."; + auto globals_instance = std::make_unique( + file_manager_instance->get_project_file("./settings.json") + ); - auto hooking_instance = std::make_unique(); - LOG(INFO) << "Hooking initialized."; + auto logger_instance = std::make_unique( + "YimMenu", + file_manager_instance->get_project_file("./cout.log") + ); - g->load(); - LOG(INFO) << "Settings Loaded."; + EnableMenuItem(GetSystemMenu(FindWindowA(NULL, "YimMenu"), 0), SC_CLOSE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED); - auto thread_pool_instance = std::make_unique(); - LOG(INFO) << "Thread pool initialized."; + try + { + LOG(INFO) << "Yim's Menu Initializing"; + auto pointers_instance = std::make_unique(); + LOG(INFO) << "Pointers initialized."; - auto context_menu_service_instance = std::make_unique(); - auto globals_service_instace = std::make_unique(); - auto mobile_service_instance = std::make_unique(); - auto notification_service_instance = std::make_unique(); - auto player_service_instance = std::make_unique(); - auto vehicle_preview_service_instance = std::make_unique(); - auto vehicle_service_instance = std::make_unique(); - auto gui_service_instance = std::make_unique(); - LOG(INFO) << "Registered service instances..."; + auto renderer_instance = std::make_unique(); + LOG(INFO) << "Renderer initialized."; - g_script_mgr.add_script(std::make_unique