/*ДрауБокс Для MiXaiLL76*/

  • Для просмотра чата и остального функционала вам нужно авторизоваться или пройти регистрацию!

Mr.ToWa

Продвинутый пользователь
Автор темы
13 Дек 2011
216
3
541
Это В hackbase.cpp ;

#include "d3dbase.h"
#include
#include
#include "d3dfont9.cpp"
#include "Log.h"



oEndScene pEndScene;
oReset pReset;
ofstream myfile;
CD3DFont *pFont=NULL;

//-------- Strides n Stuff -----------//
typedef HRESULT (WINAPI* tDrawIndexedPrimitive) (LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount);
tDrawIndexedPrimitive oDrawIndexedPrimitive = NULL;

LPDIRECT3DVERTEXBUFFER9 Stream_Data;
UINT Offset = 0;
UINT Stride = 0;

#define Walker ((NumVertices == 1 && primCount == 1))



//----- Resolution & FPS & Time ----------//
char sFPS[20]="xxx Fps";

D3DVIEWPORT9 Viewport;
CHAR Resolution[MAX_PATH];
CHAR TimeAndDate[MAX_PATH];
time_t TimeValue;

//-------- D3D Textures ----------//

bool bTex = false;
LPDIRECT3DTEXTURE9 texRed;
LPDIRECT3DTEXTURE9 texGreen;
LPDIRECT3DTEXTURE9 texYellow;
LPDIRECT3DTEXTURE9 texBlack;
LPDIRECT3DTEXTURE9 texPurple;
LPDIRECT3DTEXTURE9 texWhite;

//----------- Colors
#define Color_LightBlue 0xFF00FFE5
#define Color_Red 0xFFFF0000
#define Color_Green 0xFF68BD28
#define Color_Naranja 0xFFFFA600
#define Color_Black 0xFF000000
//-------- Groups -----------------//
int gD3D = 1;
int gMem = 1;
int gESP = 1;
//-------- Items ----------------
int D3DChams = 0;
int D3DCrosshair = 0;
int D3DNoFoG = 0;
int D3DSkyColor = 0;
int D3DChams2 = 0;
int MEMLockCrosshair = 0;
int MEMNametags = 0;
int REMNoBreathing = 0;
int REMNoRain = 0;
//------------- Options ------------
char *opt_Grp[] = { "+","-" };
char *opt_OffOn[] = { "[ Off ] ","[ On ]" };
char *opt_Crosshair[] = { "[ Off ]" , "[ Yellow ] " , "[ Red ]" };
char *opt_SkyColor[] = { "[ Off ]" , "[ Red ]" , "[ Green ] ", "[ Black ]" , " [ Yellow ]" , "[ Purple ]", "[ White ]" };
D3DMenu *pMenu=NULL;

void RebuildMenu(void)
{
pMenu->AddText("Resolution: " , Resolution );
pMenu->AddText("Framerate: ", sFPS);
pMenu->AddText(TimeAndDate);
pMenu->AddText(" " );

pMenu->AddGroup("[D3D]" , &gD3D, opt_Grp);
if (gD3D) {
pMenu->AddItem("Players Chams" , &D3DChams , opt_OffOn );

}
}

// --- simple FPS vars and function
int FPScounter = 0;
float FPSfLastTickCount = 0.0f;
float FPSfCurrentTickCount;


HRESULT GenerateTexture( IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32 )
{
if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex, NULL)) )
return E_FAIL;

WORD colour16 = ((WORD)((colour32>>28)&0xF)20)&0xF)12)&0xF)4)&0xF)UnlockRect(0);
return S_OK;
}

HRESULT WINAPI hkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{

if(pDevice->GetStreamSource(0, &Stream_Data, &Offset, &Stride) == D3D_OK)
Stream_Data->Release();



if(D3DChams == true && Walker)
{
pDevice->SetRenderState(D3DRS_ZENABLE, false);

pDevice->SetTexture(0, texWhite);

oDrawIndexedPrimitive( pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );

pDevice->SetRenderState(D3DRS_ZENABLE, true);

}
return oDrawIndexedPrimitive( pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
}


void PreReset(pD3DdeviceX pDevice)
{
if (pFont) {
pFont->InvalidateDeviceObjects();
pFont->DeleteDeviceObjects();
pFont = NULL;
}
}

void PostReset(pD3DdeviceX pDevice)
{
pFont = new CD3DFont("Arial", 8, D3DFONT_BOLD);
if (pFont) {
pFont->InitDeviceObjects(pDevice);
pFont->RestoreDeviceObjects();
}
}

HRESULT WINAPI myReset ( pD3DdeviceX pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
PreReset(pDevice);
return pReset(pDevice, pPresentationParameters);
}

HRESULT WINAPI myEndScene (pD3DdeviceX pDevice)
{
if (pFont==NULL)
PostReset(pDevice); // Create font
else
DoMenu(pDevice);




if(bTex == false){
GenerateTexture(pDevice, &texRed, D3DCOLOR_ARGB(255,255,0,0));
GenerateTexture(pDevice, &texYellow, D3DCOLOR_ARGB(255,255,255,0));
GenerateTexture(pDevice, &texGreen, D3DCOLOR_ARGB(255,0,255,0));
GenerateTexture(pDevice, &texBlack, D3DCOLOR_ARGB(255,0,0,0));
GenerateTexture(pDevice, &texWhite, D3DCOLOR_ARGB(255,255,255,255));
GenerateTexture(pDevice, &texPurple, D3DCOLOR_ARGB(255,160,32,250));



bTex = true; }




return pEndScene(pDevice);
}

void DrawBox(pD3DdeviceX pDevice, int x, int y, int w, int h, D3DCOLOR col)
{
struct {
float x,y,z,rhw;
DWORD dwColor;
} qV[4] = { { (float)x , (float)(y+h), 0.0f, 0.0f, col},
{ (float)x , (float)y , 0.0f, 0.0f, col},
{ (float)(x+w), (float)(y+h), 0.0f, 0.0f, col},
{ (float)(x+w), (float)y , 0.0f, 0.0f, col} };

pDevice->SetPixelShader(NULL);
pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
pDevice->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVSRCALPHA);
pDevice->SetTexture(0, NULL);
pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,qV,sizeof(qV[0]));
}

bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
for(;*szMask;++szMask,++pData,++bMask)
if(*szMask=='x' && *pData!=*bMask) return 0;
return (*szMask) == NULL;
}

DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
{
for(DWORD i=0; iGetViewport(&gViewPort);
float ScreenCenterX = ( float )gViewPort.Width / 2;//Horizontal Position
float ScreenCenterY = ( float )gViewPort.Height / 2;//Vertical Position


D3DRECT rec2 = {ScreenCenterX-10, ScreenCenterY, ScreenCenterX+ 10, ScreenCenterY+1};
D3DRECT rec3 = {ScreenCenterX, ScreenCenterY-10, ScreenCenterX+ 1,ScreenCenterY+10};

pDevice->Clear(1, &rec2, D3DCLEAR_TARGET,col, 0, 0);
pDevice->Clear(1, &rec3, D3DCLEAR_TARGET,col, 0, 0);

}
void DoMenu(pD3DdeviceX pDevice)
{
if (pMenu==0) { // first time , create the menu
pMenu = new D3DMenu(".:: D3D TopBase ::.",100,160); // title, maxitems,width
pMenu->visible=0; // make it visible
pMenu->col_title=Color_LightBlue; // change title color to white
} else {
FPScheck(sFPS,"%d Fps");
if (pMenu->noitems==0) RebuildMenu();


pDevice->GetViewport(&Viewport);
sprintf(Resolution, "[ %d x %d ]", Viewport.Width, Viewport.Height);

TimeValue = time(NULL);
strftime(TimeAndDate, MAX_PATH, "%a - %b %d - %I:%M %p", localtime(&TimeValue));

pFont->DrawText( Viewport.Width / 2 , 5 , Color_LightBlue , "Press DELETE For Menu" , D3DFONT_SHADOW|D3DFONT_CENTERED);


pMenu->Show(pFont);
pMenu->Nav();
}
}




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

CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3Dinit, NULL, NULL, NULL);
MessageBoxA(0,"TopBase Menu \n delete - menu\n","TopBase",0);
}

return TRUE;
}
 

ZeBaL

Постоялец
11 Окт 2011
82
1
41
хм..а что это объясни пожалуйста?!?!
 

Mr.ToWa

Продвинутый пользователь
Автор темы
13 Дек 2011
216
3
541
Это не весь код. Завтра исход выложу с драубоксом.
 
M

MiXaiLL76

эм.. мне надо в исходе по ссылке тык
мне не надоотдельно исходов дроу бокса я их и сам найти могу!
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.