Addicting Cheats Production
here are the rulez

rule numbah 1 : no begging of any account & cheats/hacks

rule numbah 2 : no spamming

rule nambah 3 : respect other members

rule numbah 3 : no posting porn links

rule numbah 4 : No posting of E-mail address

rule numbah 5 : no warez links

rule numbah 6 : no advertising of any sites

rule numbah 7 : No flaming/arguing

rule numbah 8 : no selling of cheats/hacks

rule numbah 9 : no multi account

Addicting Cheats Production

Please Join Our Newest Clan RapidPro1810 This Is The Link http://sfclan.ph.gameclub.com/myclan/clan_index.asp?guildid=RapidPro1810
 
HomePortalCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Clean D3D Base [Very Helpful]

Go down 
AuthorMessage
[AC]*[V]0[V]3NToFtRUTH
Site Owner
Site Owner
avatar

Posts : 210
Points : 1000140
Reputation : 0
Join date : 2010-01-18
Age : 33
Location : manila,philipines

PostSubject: Clean D3D Base [Very Helpful]   Fri Feb 05, 2010 8:06 am

Code:
/*
D3D8 Base by uNrEaL.
©️ 2006-2007 uNrEaL
*/

#include < windows.h >
#include < detours.h >
#include < d3d8.h >
#include < d3dx8.h >
#include "base.h"

#pragma comment(lib, "d3dx8.lib")

static DWORD dwBeginScene = 0x6D9D9250;
static DWORD dwEndScene = 0x6D9D93A0;
static DWORD dwDrawIndexedPrimitive = 0x6D9D73A0;
static DWORD dwSetStreamSource = 0x6D9D6760;
static DWORD dwPresent = 0x6D9ECC50;
static DWORD dwReset = 0x6D9EE3B0;

/*
In BeginScene you would usually generate textures,
stuff like that.
*/

HRESULT WINAPI myBeginScene(LPDIRECT3DDEVICE8 pDevice)
{
_asm pushad;

// code goes here

_asm popad;

return pBeginScene(pDevice);
}

/*
In EndScene you could draw text on your screen.
You could also do this in Present.
*/

HRESULT WINAPI myEndScene(LPDIRECT3DDEVICE8 pDevice)
{
_asm pushad;

// code goes here

_asm popad;

return pEndScene(pDevice);
}

/*
In DrawIndexedPrimitive you would do your chams,
wallhack, wireframe, maphacks, stuff like that.
*/

HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE8 pDevice, D3DPRIMITIVETYPE pType, UINT nMinIndex, UINT nNumVertices, UINT nStartIndex, UINT nPrimitiveCount)
{
_asm pushad;

// code goes here

_asm popad;

return pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
}

/*
In SetStreamSource you would setup your stride logging.

This would be used later in DrawIndexedPrimitive
to only cham/wallhack/wireframe/maphack certain strides.
*/

HRESULT WINAPI mySetStreamSource(LPDIRECT3DDEVICE8 pDevice, UINT nStreamNumber, LPDIRECT3DVERTEXBUFFER8 pStreamData, UINT nStride)
{
_asm pushad;

// code goes here

_asm popad;

return pSetStreamSource(pDevice, nStreamNumber, pStreamData, nStride);
}

/*
In Present you can draw text, as mentioned above.

This function is called most often, so any
key events should be in this function.
*/

HRESULT WINAPI myPresent ( LPDIRECT3DDEVICE8 pDevice, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion )
{
_asm pushad;

// code goes here

_asm popad;

return pPresent( pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion );
}

/*
When you start drawing text on your screen,
you will need to reset the text device and such.

This is the function you would do this in.

This function MUST be hooked, otherwise if you
ALT+TAB out of game, or minimize it, or whatnot,
the device will fail, and your game will crash.

This function resets the device, so that you can continue
with no problems.
*/

HRESULT WINAPI myReset ( LPDIRECT3DDEVICE8 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
_asm pushad;

// code goes here

_asm popad;

return pReset(pDevice, pPresentationParameters);
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);

if ( dwReason == DLL_PROCESS_ATTACH )
{
pBeginScene = (oBeginScene)DetourFunction((PBYTE)dwBeginScene, (PBYTE)myBeginScene);
pEndScene = (oEndScene)DetourFunction((PBYTE)dwEndScene, (PBYTE)myEndScene);
pDrawIndexedPrimitive = (oDrawIndexedPrimitive)DetourFunction((PBYTE)dwDrawIndexedPrimitive, (PBYTE)myDrawIndexedPrimitive);
pSetStreamSource = (oSetStreamSource)DetourFunction((PBYTE)dwSetStreamSource, (PBYTE)mySetStreamSource);
pPresent = (oPresent)DetourFunction((PBYTE)dwPresent, (PBYTE)myPresent);
pReset = (oReset)DetourFunction((PBYTE)dwReset, (PBYTE)myReset);
}

return TRUE;
}


rame.shin
Yahoo Messenger!




Credits to:[AC]*[V]0[V]3NToFtRUTH
And Special Thanks To: Rapid Pro The Clan Who Never Leave


1st offence : warn them

2nd offence : banned w/ 10-20 days

3rd offence : banned forever
Back to top Go down
View user profile http://addictingcheats.forumotion.com
 
Clean D3D Base [Very Helpful]
Back to top 
Page 1 of 1
 Similar topics
-
» Pixel Base
» Terminator- 2012 Year Base book (Private book, now public)
» Opening Base Books (ctg)
» Please help my son - Pokemon cards needed!
» JavaScript Chess

Permissions in this forum:You cannot reply to topics in this forum
Addicting Cheats Production :: Programming :: D3D-
Jump to: