
15.07.2019, 04:11
|
|
Участник форума
Регистрация: 06.01.2016
Сообщений: 154
С нами:
5447649
Репутация:
28
|
|
Сообщение от Stiopko
я сравнил в роде все правильно
Сообщение от Спойлер
C++:
Код:
#pragma once
#ifndef _STDLLPROGECT_H_
#define _STDLLPROGECT_H_
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS 1
#include
#include "stPlugin.h"
#include "../Hook/d3dhook.h"
#include
#include
#include "../ImGui/imgui.h"
#include "../ImGui/imgui_impl_win32.h"
#include "../ImGui/imgui_impl_dx9.h"
#include "../ImGui/imgui_stdlib.h"
#include "../ImGui/imgui_internal.h"
typedef
void
(
_MyEndScene
)
(
IDirect3DDevice9
*
)
;
typedef
void
(
_MyReset
)
(
IDirect3DDevice9
*
,
D3DPRESENT_PARAMETERS
*
)
;
class
stDLLProject
{
// helpThread
BOOL threadState
=
TRUE
;
HANDLE mainThread
;
// mainThread
LONG PrevWndFunc
=
NULL
;
Plugin
*
pPlug
=
nullptr
;
// D3D9 Hook
static
_EndScene
*
oEndScene
;
static
_Reset
*
oReset
;
static
_MyEndScene
*
endScene
;
static
_MyReset
*
reset
;
static
HRESULT WINAPI
myReset
(
IDirect3DDevice9
*
m_pDevice
,
D3DPRESENT_PARAMETERS
*
pPresentationParameters
)
;
static
HRESULT WINAPI
myEndScene
(
IDirect3DDevice9
*
m_pDevice
)
;
public
:
// SAMP window
HWND m_pGameWindow
=
NULL
;
// D3D9
IDirect3DDevice9
*
device
=
nullptr
;
stDLLProject
(
_beginthread_proc_type func
)
;
// Initialization only in ather thread
void
Init
(
const
uint32_t
&
timeout
=
100
)
;
void
InitHookGameDestructor
(
void
(
__stdcall destructor
)
(
void
)
)
;
void
InitD3D9
(
)
;
void
InitD3D9hook
(
_MyEndScene
*
eendScene
,
_MyReset
*
rreset
)
;
void
InitSAMPWindow
(
const
uint32_t
&
timeout
=
100
)
;
void
InitImGUI
(
)
;
void
InitilizingPlugin
(
)
;
Plugin
*
GetPlugin
(
)
const
;
BOOL
GetThreadState
(
)
const
;
~
stDLLProject
(
)
;
}
;
#endif
// _STDLLPROGECT_H_
d3dhook.h
C++:
Код:
#pragma once
#ifndef _D3DHOOK_H_
#define _D3DHOOK_H_
#include
#include
#define DIRECTINPUT_VERSION 0x0800
#include
typedef
HRESULT
(
WINAPI _EndScene
)
(
IDirect3DDevice9
*
)
;
typedef
HRESULT
(
WINAPI _Reset
)
(
IDirect3DDevice9
*
,
D3DPRESENT_PARAMETERS
*
)
;
void
InitHook
(
IDirect3DDevice9
*
device
,
_EndScene
*
myEndScene
,
_Reset
*
myReset
,
_EndScene
*
*
_endScene
,
_Reset
*
*
_reset
)
;
#endif
// _D3DHOOK_H_
Не добавил .cpp файлы имгуи в проект
|
|
|