Merge pull request #392 from thinkingmaster/refactor

clang-format
This commit is contained in:
Jenny White 2018-04-28 22:54:57 +03:00 committed by GitHub
commit 2f32f4d839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 33 additions and 28 deletions

1
include/projlogging.hpp Executable file → Normal file
View File

@ -5,7 +5,6 @@
* Author: nullifiedcat * Author: nullifiedcat
*/ */
#pragma once #pragma once
namespace projectile_logging namespace projectile_logging

1
include/sdk/ScreenSpaceEffects.h Executable file → Normal file
View File

@ -87,4 +87,3 @@ extern CScreenSpaceEffectRegistration **g_ppScreenSpaceRegistrationHead;
CEffect pEffectName##_effect; \ CEffect pEffectName##_effect; \
CScreenSpaceEffectRegistration pEffectName##_reg(#pEffectName, \ CScreenSpaceEffectRegistration pEffectName##_reg(#pEffectName, \
&pEffectName##_effect); &pEffectName##_effect);

1
src/chatlog.cpp Executable file → Normal file
View File

@ -27,6 +27,7 @@ public:
{ {
}; };
static end_t end; static end_t end;
public: public:
csv_stream() csv_stream()
{ {

4
src/copypasted/CSignature.cpp Executable file → Normal file
View File

@ -79,7 +79,9 @@ uintptr_t CSignature::dwFindPattern(uintptr_t dwAddress, uintptr_t dwLength,
} }
} }
logging::Info("THIS IS SERIOUS: Could not locate signature: \n============\n\"%s\"\n============", szPattern); logging::Info("THIS IS SERIOUS: Could not locate signature: "
"\n============\n\"%s\"\n============",
szPattern);
return NULL; return NULL;
} }

View File

@ -79,7 +79,7 @@ std::stack<std::string> &hack::command_stack()
return stack; return stack;
} }
#if ENABLE_VISUALS /* Why would we need colored chat stuff in textmode? \ #if ENABLE_VISUALS /* Why would we need colored chat stuff in textmode? \
*/ */
#define red 184, 56, 59, 255 #define red 184, 56, 59, 255
#define blu 88, 133, 162, 255 #define blu 88, 133, 162, 255
@ -245,8 +245,9 @@ free(logname);*/
if (not exists) if (not exists)
{ {
Error(("Missing essential file: " + s + Error(("Missing essential file: " + s +
"/%s\nYou MUST run install-data script to finish " "/%s\nYou MUST run install-data script to finish "
"installation").c_str(), "installation")
.c_str(),
s.c_str()); s.c_str());
} }
} }

View File

@ -402,8 +402,8 @@ void _FASTCALL emoji(CachedEntity *ent)
} }
glez_rgba_t white = glez_rgba(255, 255, 255, 255); glez_rgba_t white = glez_rgba(255, 255, 255, 255);
while (!textur || textur == 4294967295) while (!textur || textur == 4294967295)
textur = glez_texture_load_png_rgba(DATA_PATH textur = glez_texture_load_png_rgba(
"/textures/atlas.png"); DATA_PATH "/textures/atlas.png");
player_info_s info; player_info_s info;
unsigned int steamID; unsigned int steamID;
unsigned int steamidarray[32]{}; unsigned int steamidarray[32]{};

2
src/hacks/SkinChanger.cpp Executable file → Normal file
View File

@ -398,7 +398,7 @@ void def_attribute_modifier::Set(int id, float value)
logging::Info("Woah there, that's too many! Remove some."); logging::Info("Woah there, that's too many! Remove some.");
return; return;
} }
modifiers.push_back(attribute_s{ (uint16_t)id, value }); modifiers.push_back(attribute_s{ (uint16_t) id, value });
logging::Info("Added new attribute: %i %.2f (%i)", id, value, logging::Info("Added new attribute: %i %.2f (%i)", id, value,
modifiers.size()); modifiers.size());
} }

View File

@ -1194,7 +1194,8 @@ void Move()
prevlvlname = g_IEngine->GetLevelName(); prevlvlname = g_IEngine->GetLevelName();
std::string prvlvlname = format(prevlvlname); std::string prvlvlname = format(prevlvlname);
logging::Info("%s %s", prevlvlname, prvlvlname.c_str()); logging::Info("%s %s", prevlvlname, prvlvlname.c_str());
if (boost::contains(prvlvlname, "pl_") || boost::contains(prvlvlname, "cp_")) if (boost::contains(prvlvlname, "pl_") ||
boost::contains(prvlvlname, "cp_"))
{ {
logging::Info("1"); logging::Info("1");
bool ret = false; bool ret = false;

5
src/hooks.cpp Executable file → Normal file
View File

@ -79,8 +79,9 @@ void *VMTHook::GetMethod(uint32_t idx) const
void VMTHook::HookMethod(ptr_t func, uint32_t idx) void VMTHook::HookMethod(ptr_t func, uint32_t idx)
{ {
logging::Info("Hooking method %d of vtable 0x%08x, replacing 0x%08x with 0x%08x", idx, logging::Info(
vtable_original, GetMethod(idx), func); "Hooking method %d of vtable 0x%08x, replacing 0x%08x with 0x%08x", idx,
vtable_original, GetMethod(idx), func);
vtable_hooked[2 + idx] = func; vtable_hooked[2 + idx] = func;
} }

View File

@ -1045,8 +1045,8 @@ void LevelInit_hook(void *_this, const char *newmap)
hacks::shared::lagexploit::bcalled = false; hacks::shared::lagexploit::bcalled = false;
#if ENABLE_VISUALS #if ENABLE_VISUALS
typedef bool *(*LoadNamedSkys_Fn)(const char *); typedef bool *(*LoadNamedSkys_Fn)(const char *);
uintptr_t addr = uintptr_t addr = gSignatures.GetEngineSignature(
gSignatures.GetEngineSignature("55 89 E5 57 31 FF 56 8D B5 ? ? ? ? 53 81 EC 6C 01 00 00"); "55 89 E5 57 31 FF 56 8D B5 ? ? ? ? 53 81 EC 6C 01 00 00");
static LoadNamedSkys_Fn LoadNamedSkys = LoadNamedSkys_Fn(addr); static LoadNamedSkys_Fn LoadNamedSkys = LoadNamedSkys_Fn(addr);
bool succ; bool succ;
logging::Info("Going to load the skybox"); logging::Info("Going to load the skybox");

17
src/velocity.cpp Executable file → Normal file
View File

@ -14,14 +14,15 @@ namespace velocity
EstimateAbsVelocity_t EstimateAbsVelocity{}; EstimateAbsVelocity_t EstimateAbsVelocity{};
void Init() { void Init()
{
EstimateAbsVelocity = EstimateAbsVelocity =
(void (*)(IClientEntity *, Vector &)) gSignatures.GetClientSignature( (void (*)(IClientEntity *, Vector &)) gSignatures.GetClientSignature(
"55 89 E5 56 53 83 EC 20 8B 5D 08 8B 75 0C E8 ? ? ? ? 39 D8 74 79 " "55 89 E5 56 53 83 EC 20 8B 5D 08 8B 75 0C E8 ? ? ? ? 39 D8 74 79 "
"0F B6 05 ? ? ? ? 81 C3 B8 02 00 00 C6 05 ? ? ? ? 01 F3 0F 10 05 ? " "0F B6 05 ? ? ? ? 81 C3 B8 02 00 00 C6 05 ? ? ? ? 01 F3 0F 10 05 ? "
"? ? ? F3 0F 11 45 F0 88 45 EC A1 ? ? ? ? 89 45 E8 8D 45 E8 A3 ? ? " "? ? ? F3 0F 11 45 F0 88 45 EC A1 ? ? ? ? 89 45 E8 8D 45 E8 A3 ? ? "
"? ? A1 ? ? ? ? F3 0F 10 40 0C 89 74 24 04 89 1C 24 F3 0F 11 44 24 " "? ? A1 ? ? ? ? F3 0F 10 40 0C 89 74 24 04 89 1C 24 F3 0F 11 44 24 "
"08 E8 ? ? ? ? 0F B6 45 EC F3 0F 10 45 F0 F3 0F 11 05 ? ? ? ? A2 ? " "08 E8 ? ? ? ? 0F B6 45 EC F3 0F 10 45 F0 F3 0F 11 05 ? ? ? ? A2 ? "
"? ? ? 8B 45 E8 A3 ? ? ? ? 83 C4 20 5B 5E 5D C3"); "? ? ? 8B 45 E8 A3 ? ? ? ? 83 C4 20 5B 5E 5D C3");
} }
} }

View File

@ -27,9 +27,9 @@ void render_cheat_visuals()
void BeginCheatVisuals() void BeginCheatVisuals()
{ {
/*#if RENDERING_ENGINE_OPENGL /*#if RENDERING_ENGINE_OPENGL
std::lock_guard<std::mutex> draw_lock(drawing_mutex); std::lock_guard<std::mutex> draw_lock(drawing_mutex);
#endif*/ #endif*/
draw_api::draw_begin(); draw_api::draw_begin();
ResetStrings(); ResetStrings();
} }
@ -45,9 +45,9 @@ CatVar enable_logo(CV_SWITCH, "nullcore_mode_logo", "1",
void DrawCheatVisuals() void DrawCheatVisuals()
{ {
/*#if RENDERING_ENGINE_OPENGL /*#if RENDERING_ENGINE_OPENGL
std::lock_guard<std::mutex> draw_lock(drawing_mutex); std::lock_guard<std::mutex> draw_lock(drawing_mutex);
#endif*/ #endif*/
{ {
PROF_SECTION(DRAW_misc); PROF_SECTION(DRAW_misc);
hacks::shared::misc::DrawText(); hacks::shared::misc::DrawText();