#pragma once
#include "Utils/MemoryUtils.h"

namespace Hooks {
	class BobHurt {
	private:
		typedef void(__thiscall* BobHurt_)(void*, glm::mat4* matrix);
		inline static BobHurt_ bobhurt;

		static void callback(void* _this, glm::mat4* matrix);

	public:
		inline static int state = -1;
		static void Init() {
			std::thread([&] {
				void* pattern = Utils::Memory::FindPattern(_("48 89 5C 24 20 57 48 81 EC 90 00 00 00 0F 29 B4 24 80 00 00 00 48"));
				state = Utils::Memory::CreateHook(pattern, (void*)&callback, &bobhurt);

				if (state == 0)
					MessageBoxA(0, _("The program was terminated due to an error.\nError code: 1-5"), _("Valkyrie"), MB_ICONERROR);
				else
					std::cout << _("Test 1-5... OK\n");
				}).detach();
		}
	};
}
