Philippine Online Games
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Philippine Online Games

The No.1 Community Forum in The Philippines
 
HomeGalleryLatest imagesSearchRegisterLog in
If this is your first visit? be sure to check out the FAQ by clicking the link above. You may have to register before you can post and Download. Click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 

 D3D Codings InGameMenu

Go down 
AuthorMessage
Vip_SolidSnake
Admin
Vip_SolidSnake


Posts : 61
Reputation : 26
Join date : 2010-02-04

D3D Codings InGameMenu Empty
PostSubject: D3D Codings InGameMenu   D3D Codings InGameMenu I_icon_minitimeFri 5 Feb 2010 - 21:08

Add Code in specified Files or Functions!!!

File: d3d8dev.cpp

at Top:
Code:
#include "cLTFX.h"


( PRERESET )
Code:
ltfx.PreReset( );

( POSTRESET )
Code:
 ltfx.PostReset( "Arial", 8, pDevice );

( ENDSCENE OR PRESENT )
Code:
ltfx.CheckNav( VK_INSERT );
    ltfx.DrawMenu( 20, 20, D3DCOLOR_ARGB( 255, 255, 0, 0 ), D3DCOLOR_ARGB( 255, 255, 255, 255 ), D3DCOLOR_ARGB( 255, 255, 255, 255 ), pDevice );

( BEGINSCENE )
Code:
if( exec1 ) {
//init the font
    ltfx.InitalizeFont( "Arial", 8, pDev );
    //use the pointer from a global float val!
    ltfx.AddMenuItem( "Wallhack", &cvar.wallhack, 0, 2 );
    ltfx.AddMenuItem( "Wireframe", &cvar.wireframe, 0, 1 );
    ltfx.AddMenuItem( "Zoom", &cvar.zoom, 0, 1 );
    ltfx.AddMenuItem( "Stamina", &cvar.stamina, 0, 1 );
                exec1 = false;
}


How To Use: ( Global )
Code:
struct cVars
{
    float wireframe, wallhack, zoom, stamina;
};
cVars cvar;

bool exec1 = true;

cMenu ltfx( 5 ); //5 is max menu items
//you can extend this so long as its ABOVE the number
//of menu items you have currently


How To Use: ( DrawIndexedPrimitive )
Code:
if( cvar.wallhack == 1.0f ) { // for set 1
    //hack
}

if( cvar.wallhack == 2.0f ) { // for set 1
    //hack
}

if( cvar.wireframe == 1.0f ) { // for set 1
    //hack
}

if( cvar.zoom == 1.0f ) { // for set 1
    //hack
}

if( cvar.stamina == 1.0f ) { // for set 1
    //hack
}




DOWNLOAD LINK

Visual C++ - [You must be registered and logged in to see this link.]

D3D StarterKit - [You must be registered and logged in to see this link.]

DirectX SDK - [You must be registered and logged in to see this link.]

Color Coding - [You must be registered and logged in to see this link.]

d3dfont.cpp - [You must be registered and logged in to see this link.]

d3dfont.h - [You must be registered and logged in to see this link.]

stdafx.cpp - [You must be registered and logged in to see this link.]

stdafx.h - [You must be registered and logged in to see this link.]

cLTFX.cpp - [You must be registered and logged in to see this link.]

cLTFX.h- [You must be registered and logged in to see this link.]


[You must be registered and logged in to see this image.]
Back to top Go down
http://vipcoders.omgforum.net
 
D3D Codings InGameMenu
Back to top 
Page 1 of 1
 Similar topics
-
» D3D Codings InGameMenu

Permissions in this forum:You cannot reply to topics in this forum
Philippine Online Games :: VIP :: Programming :: D3D Programming [Tutorials]-
Jump to: