From 77b52da44b263df4884be2f35f885d8edccbb6fa Mon Sep 17 00:00:00 2001 From: boris Date: Wed, 19 Dec 2018 00:13:24 +1300 Subject: added new loader project :) merry christmas --- .../UserExperience/MoneybotShared/window.hpp | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 csgo-loader/csgo-client/UserExperience/MoneybotShared/window.hpp (limited to 'csgo-loader/csgo-client/UserExperience/MoneybotShared/window.hpp') diff --git a/csgo-loader/csgo-client/UserExperience/MoneybotShared/window.hpp b/csgo-loader/csgo-client/UserExperience/MoneybotShared/window.hpp new file mode 100644 index 0000000..54cc6a9 --- /dev/null +++ b/csgo-loader/csgo-client/UserExperience/MoneybotShared/window.hpp @@ -0,0 +1,62 @@ +#pragma once +#include +#include + +#pragma comment(lib, "d3d9.lib") +#pragma comment(lib, "d3dx9.lib") + +#include +#include + +#include +#pragma comment(lib, "dwmapi.lib") +#pragma comment(lib, "winmm.lib") + +#include + +#include "input_system.hpp" + +namespace d3d +{ + typedef void( *on_frame_fn )( ); + + class c_window { + char m_window_name[32]; + public: + c_window( ); + ~c_window( ); + + void generate_random_name(); + + bool create( ); + void on_frame( ); + void add_on_frame( on_frame_fn fn ) { + m_onframe_vec.push_back( fn ); + } + + HWND get_hwnd( ) { return m_hwnd; } + + private: + bool init_d3d( ); + + public: + static LRESULT __stdcall window_procedure( HWND, UINT, WPARAM, LPARAM ); + + private: + HWND m_hwnd{ }; + int m_size[ 2 ]{ }; + + WNDCLASSEX m_wc{ }; + MSG m_msg{ }; + + public: + LPDIRECT3DDEVICE9 m_d3d_device{ }; + D3DPRESENT_PARAMETERS m_present_params{ }; + LPDIRECT3D9 m_d3d{ }; + + private: + std::vector< on_frame_fn > m_onframe_vec; + }; +} + +extern d3d::c_window g_window; \ No newline at end of file -- cgit v1.2.3