Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    Get an error


    Maxn
     Share

    Recommended Posts

    So,

     

    At first: I'm just starting C++ so don't be too hard to me!

     

    Look my last post!

    Edited by ~Maxn~
    Link to comment
    Share on other sites

    So,

     

    At first: I'm just starting C++ so don't be too hard to me!

     

    I used Neos Cltfx Tut and d3d8 from azorbix starterkit

     

    now here is my code for d3d8dev.cpp

     

    /*	Direct3D8 Device */
    
    #include <windows.h>
    #include "main.h"
    #include "d3d8.h"
    #include "cLTFX.h"
    
    #define D3DHOOK_TEXTURES //comment this to disable texture hooking
    
    HRESULT CD3DManager::Initialize()
    {
    /*
    initialize Resources such as textures 
    (managed and unmanaged [D3DPOOL]), 
    vertex buffers, and other D3D rendering resources
    ...
    m_pD3Ddev->CreateTexture(..., ..., &m_pD3Dtexture);
    */
    return S_OK;
    }
    
    HRESULT CD3DManager::PreReset()
    {
    ltfx.Prereset();
    }
    
    HRESULT CD3DManager::PostReset()
    {
    /*
    re-initialize all UNMANAGED [D3DPOOL_DEFAULT]
    textures, vertex buffers, and other volitile 
    resources
    ...
    m_pD3Ddev->CreateTexture(..., ..., &m_pD3Dtexture);
    */
    ltfx.PostReset( "Arial", 8, pDevice );
    }
    
    HRESULT CD3DManager::Release()
    {
    /*
    Release all textures, vertex buffers, and 
    other resources
    ...
    _SAFE_RELEASE(m_pD3Dtexture);
    */
    return S_OK;
    }
    
    //-----------------------------------------------------------------------------
    
    HRESULT APIENTRY hkIDirect3DDevice8::QueryInterface(REFIID riid, void** ppvObj)
    {
    return m_pD3Ddev->QueryInterface(riid, ppvObj);
    }
    
    ULONG APIENTRY hkIDirect3DDevice8::AddRef(void)
    {
    m_refCount++;
    return m_pD3Ddev->AddRef();
    }
    
    ULONG APIENTRY hkIDirect3DDevice8::Release(void)
    {
    if( --m_refCount == 0 )
    	m_pManager->Release();
    
    return m_pD3Ddev->Release();
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::TestCooperativeLevel(void)
    {
    return m_pD3Ddev->TestCooperativeLevel();
    }
    
    UINT APIENTRY hkIDirect3DDevice8::GetAvailableTextureMem(void)
    {
    return m_pD3Ddev->GetAvailableTextureMem();
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::ResourceManagerDiscardBytes(DWORD Bytes)
    {
    return m_pD3Ddev->ResourceManagerDiscardBytes(Bytes);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetDirect3D(IDirect3D8** ppD3D8)
    {
    HRESULT hRet = m_pD3Ddev->GetDirect3D(ppD3D8);
    if( SUCCEEDED(hRet) )
    	*ppD3D8 = m_pD3Dint;
    return hRet;
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetDeviceCaps(D3DCAPS8* pCaps)
    {
    return m_pD3Ddev->GetDeviceCaps(pCaps);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetDisplayMode(D3DDISPLAYMODE* pMode)
    {
    return m_pD3Ddev->GetDisplayMode(pMode);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetCreationParameters(D3DDEVICE_CREATION_PARAMETERS *pParameters)
    {
    return m_pD3Ddev->GetCreationParameters(pParameters);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetCursorProperties(UINT XHotSpot,UINT YHotSpot,IDirect3DSurface8* pCursorBitmap)
    {
    return m_pD3Ddev->SetCursorProperties(XHotSpot, YHotSpot, pCursorBitmap);
    }
    
    void APIENTRY hkIDirect3DDevice8::SetCursorPosition(int X,int Y,DWORD Flags)
    {
    m_pD3Ddev->SetCursorPosition(X, Y, Flags);
    }
    
    BOOL APIENTRY hkIDirect3DDevice8::ShowCursor(BOOL bShow)
    {
    return m_pD3Ddev->ShowCursor(bShow);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS* pPresentationParameters,IDirect3DSwapChain8** pSwapChain)
    {
    return m_pD3Ddev->CreateAdditionalSwapChain(pPresentationParameters, pSwapChain);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::Reset(D3DPRESENT_PARAMETERS* pPresentationParameters)
    {
    m_pManager->PreReset();
    
    HRESULT hRet = m_pD3Ddev->Reset(pPresentationParameters);
    
    if( SUCCEEDED(hRet) )
    {
    	m_PresentParam = *pPresentationParameters;
    	m_pManager->PostReset();
    }
    
    return hRet;
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::Present(CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion)
    {
    return m_pD3Ddev->Present(pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetBackBuffer(UINT BackBuffer,D3DBACKBUFFER_TYPE Type,IDirect3DSurface8** ppBackBuffer)
    {
    return m_pD3Ddev->GetBackBuffer(BackBuffer, Type, ppBackBuffer);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetRasterStatus(D3DRASTER_STATUS* pRasterStatus)
    {
    return m_pD3Ddev->GetRasterStatus(pRasterStatus);
    }
    
    void APIENTRY hkIDirect3DDevice8::SetGammaRamp(DWORD Flags,CONST D3DGAMMARAMP* pRamp)
    {
    m_pD3Ddev->SetGammaRamp(Flags, pRamp);
    }
    
    void APIENTRY hkIDirect3DDevice8::GetGammaRamp(D3DGAMMARAMP* pRamp)
    {
    m_pD3Ddev->GetGammaRamp(pRamp);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CreateTexture(UINT Width,UINT Height,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DTexture8** ppTexture)
    {
    HRESULT hRet = m_pD3Ddev->CreateTexture(Width, Height, Levels, Usage, Format, Pool, ppTexture);
    
    #ifdef D3DHOOK_TEXTURES
    if(hRet == D3D_OK) { *ppTexture = new hkIDirect3DTexture8(ppTexture, this, Width, Height, Format); }
    #endif
    
    return hRet;
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CreateVolumeTexture(UINT Width,UINT Height,UINT Depth,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DVolumeTexture8** ppVolumeTexture)
    {
    return m_pD3Ddev->CreateVolumeTexture(Width, Height, Depth, Levels, Usage, Format, Pool, ppVolumeTexture);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CreateCubeTexture(UINT EdgeLength,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DCubeTexture8** ppCubeTexture)
    {
    return m_pD3Ddev->CreateCubeTexture(EdgeLength, Levels, Usage, Format, Pool, ppCubeTexture);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CreateVertexBuffer(UINT Length,DWORD Usage,DWORD FVF,D3DPOOL Pool,IDirect3DVertexBuffer8** ppVertexBuffer)
    {
    return m_pD3Ddev->CreateVertexBuffer(Length, Usage, FVF, Pool, ppVertexBuffer);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CreateIndexBuffer(UINT Length,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DIndexBuffer8** ppIndexBuffer)
    {
    return m_pD3Ddev->CreateIndexBuffer(Length, Usage, Format, Pool, ppIndexBuffer);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CreateRenderTarget(UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,BOOL Lockable,IDirect3DSurface8** ppSurface)
    {
    return m_pD3Ddev->CreateRenderTarget(Width, Height, Format, MultiSample, Lockable, ppSurface);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CreateDepthStencilSurface(UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,IDirect3DSurface8** ppSurface)
    {
    return m_pD3Ddev->CreateDepthStencilSurface(Width, Height, Format, MultiSample, ppSurface);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CreateImageSurface(UINT Width,UINT Height,D3DFORMAT Format,IDirect3DSurface8** ppSurface)
    {
    return m_pD3Ddev->CreateImageSurface(Width, Height, Format, ppSurface);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CopyRects(IDirect3DSurface8* pSourceSurface,CONST RECT* pSourceRectsArray,UINT cRects,IDirect3DSurface8* pDestinationSurface,CONST POINT* pDestPointsArray)
    {
    return m_pD3Ddev->CopyRects(pSourceSurface, pSourceRectsArray, cRects, pDestinationSurface, pDestPointsArray);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::UpdateTexture(IDirect3DBaseTexture8* pSourceTexture,IDirect3DBaseTexture8* pDestinationTexture)
    {
    return m_pD3Ddev->UpdateTexture(pSourceTexture, pDestinationTexture);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetFrontBuffer(IDirect3DSurface8* pDestSurface)
    {
    return m_pD3Ddev->GetFrontBuffer(pDestSurface);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetRenderTarget(IDirect3DSurface8* pRenderTarget,IDirect3DSurface8* pNewZStencil)
    {
    return m_pD3Ddev->SetRenderTarget(pRenderTarget, pNewZStencil);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetRenderTarget(IDirect3DSurface8** ppRenderTarget)
    {
    return m_pD3Ddev->GetRenderTarget(ppRenderTarget);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetDepthStencilSurface(IDirect3DSurface8** ppZStencilSurface)
    {
    return m_pD3Ddev->GetDepthStencilSurface(ppZStencilSurface);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::BeginScene(void)
    {
    return m_pD3Ddev->BeginScene();
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::EndScene(void)
    {
    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 );
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::Clear(DWORD Count,CONST D3DRECT* pRects,DWORD Flags,D3DCOLOR Color,float Z,DWORD Stencil)
    {
    return m_pD3Ddev->Clear(Count, pRects, Flags, Color, Z, Stencil);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetTransform(D3DTRANSFORMSTATETYPE State,CONST D3DMATRIX* pMatrix)
    {
    return m_pD3Ddev->SetTransform(State, pMatrix);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetTransform(D3DTRANSFORMSTATETYPE State,D3DMATRIX* pMatrix)
    {
    return m_pD3Ddev->GetTransform(State, pMatrix);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::MultiplyTransform( D3DTRANSFORMSTATETYPE State,CONST D3DMATRIX* pMatrix)
    {
    return m_pD3Ddev->MultiplyTransform(State,pMatrix);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetViewport( CONST D3DVIEWPORT8* pViewport)
    {
    return m_pD3Ddev->SetViewport(pViewport);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetViewport( D3DVIEWPORT8* pViewport)
    {
    return m_pD3Ddev->GetViewport(pViewport);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetMaterial( CONST D3DMATERIAL8* pMaterial)
    {
    return m_pD3Ddev->SetMaterial(pMaterial);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetMaterial( D3DMATERIAL8* pMaterial)
    {
    return m_pD3Ddev->GetMaterial(pMaterial);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetLight( DWORD Index,CONST D3DLIGHT8* pLight)
    {
    return m_pD3Ddev->SetLight(Index,pLight);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetLight( DWORD Index,D3DLIGHT8* pLight)
    {
    return m_pD3Ddev->GetLight(Index,pLight);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::LightEnable( DWORD Index,BOOL Enable)
    {
    return m_pD3Ddev->LightEnable(Index,Enable);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetLightEnable( DWORD Index,BOOL* pEnable)
    {
    return m_pD3Ddev->GetLightEnable(Index,pEnable);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetClipPlane( DWORD Index,CONST float* pPlane)
    {
    return m_pD3Ddev->SetClipPlane(Index,pPlane);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetClipPlane( DWORD Index,float* pPlane)
    {
    return m_pD3Ddev->GetClipPlane(Index,pPlane);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetRenderState( D3DRENDERSTATETYPE State,DWORD Value)
    {
    return m_pD3Ddev->SetRenderState(State,Value);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetRenderState( D3DRENDERSTATETYPE State,DWORD* pValue)
    {
    return m_pD3Ddev->GetRenderState(State,pValue);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::BeginStateBlock(void)
    {
    if( exec1 ) {
    //init the font
    ltfx.InitalizeFont( "Arial", 8, pDev );
    //use the pointer from a global float val!
    ltfx.AddMenuItem( "Wallcheat", &cvar.wallcheat, 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;
    }
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::EndStateBlock( DWORD* pToken)
    {
    return m_pD3Ddev->EndStateBlock(pToken);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::ApplyStateBlock( DWORD Token)
    {
    return m_pD3Ddev->ApplyStateBlock(Token);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CaptureStateBlock( DWORD Token)
    {
    return m_pD3Ddev->CaptureStateBlock(Token);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::DeleteStateBlock( DWORD Token)
    {
    return m_pD3Ddev->DeleteStateBlock(Token);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CreateStateBlock( D3DSTATEBLOCKTYPE Type,DWORD* pToken)
    {
    return m_pD3Ddev->CreateStateBlock(Type,pToken);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetClipStatus( CONST D3DCLIPSTATUS8* pClipStatus)
    {
    return m_pD3Ddev->SetClipStatus(pClipStatus);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetClipStatus( D3DCLIPSTATUS8* pClipStatus)
    {
    return m_pD3Ddev->GetClipStatus(pClipStatus);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetTexture( DWORD Stage,IDirect3DBaseTexture8** ppTexture)
    {
    return m_pD3Ddev->GetTexture(Stage,ppTexture);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetTexture(DWORD Stage,IDirect3DBaseTexture8* pTexture)
    {
    #ifdef D3DHOOK_TEXTURES
    IDirect3DDevice8 *dev = NULL;
    if(pTexture != NULL && ((hkIDirect3DTexture8*)(pTexture))->GetDevice(&dev) == D3D_OK)
    {
    	if(dev == this)
    		return m_pD3Ddev->SetTexture(Stage, ((hkIDirect3DTexture8*)(pTexture))->m_D3Dtex);
    }
    #endif
    
    return m_pD3Ddev->SetTexture(Stage,pTexture);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetTextureStageState( DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD* pValue)
    {
    return m_pD3Ddev->GetTextureStageState(Stage,Type,pValue);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetTextureStageState( DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD Value)
    {
    return m_pD3Ddev->SetTextureStageState(Stage,Type,Value);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::ValidateDevice( DWORD* pNumPasses)
    {
    return m_pD3Ddev->ValidateDevice(pNumPasses);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetInfo( DWORD DevInfoID,void* pDevInfoStruct,DWORD DevInfoStructSize)
    {
    return m_pD3Ddev->GetInfo(DevInfoID,pDevInfoStruct,DevInfoStructSize);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetPaletteEntries( UINT PaletteNumber,CONST PALETTEENTRY* pEntries)
    {
    return m_pD3Ddev->SetPaletteEntries(PaletteNumber,pEntries);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetPaletteEntries(UINT PaletteNumber,PALETTEENTRY* pEntries)
    {
    return m_pD3Ddev->GetPaletteEntries(PaletteNumber, pEntries);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetCurrentTexturePalette(UINT PaletteNumber)
    {
    return m_pD3Ddev->SetCurrentTexturePalette(PaletteNumber);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetCurrentTexturePalette(UINT *PaletteNumber)
    {
    return m_pD3Ddev->GetCurrentTexturePalette(PaletteNumber);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::DrawPrimitive(D3DPRIMITIVETYPE PrimitiveType,UINT StartVertex,UINT PrimitiveCount)
    {
    return m_pD3Ddev->DrawPrimitive(PrimitiveType, StartVertex, PrimitiveCount);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::DrawIndexedPrimitive(D3DPRIMITIVETYPE PrimitiveType,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount)
    {
    return m_pD3Ddev->DrawIndexedPrimitive(PrimitiveType, minIndex, NumVertices, startIndex, primCount);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::DrawPrimitiveUP(D3DPRIMITIVETYPE PrimitiveType,UINT PrimitiveCount,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride)
    {
    return m_pD3Ddev->DrawPrimitiveUP(PrimitiveType, PrimitiveCount, pVertexStreamZeroData, VertexStreamZeroStride);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::DrawIndexedPrimitiveUP(D3DPRIMITIVETYPE PrimitiveType,UINT MinVertexIndex,UINT NumVertexIndices,UINT PrimitiveCount,CONST void* pIndexData,D3DFORMAT IndexDataFormat,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride)
    {
    return m_pD3Ddev->DrawIndexedPrimitiveUP(PrimitiveType, MinVertexIndex, NumVertexIndices, PrimitiveCount, pIndexData, IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::ProcessVertices(UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,IDirect3DVertexBuffer8* pDestBuffer,DWORD Flags)
    {
    return m_pD3Ddev->ProcessVertices(SrcStartIndex, DestIndex, VertexCount, pDestBuffer, Flags);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CreateVertexShader(CONST DWORD* pDeclaration,CONST DWORD* pFunction,DWORD* pHandle,DWORD Usage)
    {
    return m_pD3Ddev->CreateVertexShader(pDeclaration, pFunction, pHandle, Usage);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetVertexShader(DWORD Handle)
    {
    return m_pD3Ddev->SetVertexShader(Handle);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetVertexShader(DWORD* pHandle)
    {
    return m_pD3Ddev->GetVertexShader(pHandle);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::DeleteVertexShader(DWORD Handle)
    {
    return m_pD3Ddev->DeleteVertexShader(Handle);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetVertexShaderConstant(DWORD Register,CONST void* pConstantData,DWORD ConstantCount)
    {
    return m_pD3Ddev->SetVertexShaderConstant(Register, pConstantData, ConstantCount);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetVertexShaderConstant(DWORD Register,void* pConstantData,DWORD ConstantCount)
    {
    return m_pD3Ddev->GetVertexShaderConstant(Register, pConstantData, ConstantCount);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetVertexShaderDeclaration(DWORD Handle,void* pData,DWORD* pSizeOfData)
    {
    return m_pD3Ddev->GetVertexShaderDeclaration(Handle, pData, pSizeOfData);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetVertexShaderFunction(DWORD Handle,void* pData,DWORD* pSizeOfData)
    {
    return m_pD3Ddev->GetVertexShaderFunction(Handle, pData, pSizeOfData);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetStreamSource(UINT StreamNumber,IDirect3DVertexBuffer8* pStreamData,UINT Stride)
    {
    return m_pD3Ddev->SetStreamSource(StreamNumber, pStreamData, Stride);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetStreamSource(UINT StreamNumber,IDirect3DVertexBuffer8** ppStreamData,UINT* pStride)
    {
    return m_pD3Ddev->GetStreamSource(StreamNumber, ppStreamData, pStride);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetIndices(IDirect3DIndexBuffer8* pIndexData,UINT BaseVertexIndex)
    {
    return m_pD3Ddev->SetIndices(pIndexData, BaseVertexIndex);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetIndices(IDirect3DIndexBuffer8** ppIndexData,UINT* pBaseVertexIndex)
    {
    return m_pD3Ddev->GetIndices(ppIndexData, pBaseVertexIndex);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::CreatePixelShader(CONST DWORD* pFunction,DWORD* pHandle)
    {
    return m_pD3Ddev->CreatePixelShader(pFunction, pHandle);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetPixelShader(DWORD Handle)
    {
    return m_pD3Ddev->SetPixelShader(Handle);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetPixelShader(DWORD* pHandle)
    {
    return m_pD3Ddev->GetPixelShader(pHandle);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::DeletePixelShader(DWORD Handle)
    {
    return m_pD3Ddev->DeletePixelShader(Handle);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::SetPixelShaderConstant(DWORD Register,CONST void* pConstantData,DWORD ConstantCount)
    {
    return m_pD3Ddev->SetPixelShaderConstant(Register, pConstantData, ConstantCount);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetPixelShaderConstant(DWORD Register,void* pConstantData,DWORD ConstantCount)
    {
    return m_pD3Ddev->GetPixelShaderConstant(Register, pConstantData, ConstantCount);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::GetPixelShaderFunction(DWORD Handle,void* pData,DWORD* pSizeOfData)
    {
    return m_pD3Ddev->GetPixelShaderFunction(Handle, pData, pSizeOfData);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::DrawRectPatch(UINT Handle,CONST float* pNumSegs,CONST D3DRECTPATCH_INFO* pRectPatchInfo)
    {
    return m_pD3Ddev->DrawRectPatch(Handle, pNumSegs, pRectPatchInfo);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::DrawTriPatch(UINT Handle,CONST float* pNumSegs,CONST D3DTRIPATCH_INFO* pTriPatchInfo)
    {
    return m_pD3Ddev->DrawTriPatch(Handle, pNumSegs, pTriPatchInfo);
    }
    
    HRESULT APIENTRY hkIDirect3DDevice8::DeletePatch(UINT Handle)
    {
    return m_pD3Ddev->DeletePatch(Handle);
    }

     

    But when I compile it, I get this error:

     

    1>------ Erstellen gestartet: Projekt: TatniumD3D, Konfiguration: Debug Win32 ------
    1>Kompilieren...
    1>d3d8tex.cpp
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2018: Unbekanntes Zeichen '0xf'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2018: Unbekanntes Zeichen '0x1e'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C3872: "0x4": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2470: "bӃÕBìd¿7ƒ›": Sieht wie eine Funktionsdefinition aus, es ist aber keine Parameterliste vorhanden; sichtbarer Funktionstext wird übersprungen.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2001: Zeilenvorschub in Konstante.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x16'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x2'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x3'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0xae'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x40'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0xf'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C3872: "0x24": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x1e'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C3872: "0x4": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x18'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : fatal error C1004: Unerwartetes Dateiende gefunden.
    1>d3d8int.cpp
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2018: Unbekanntes Zeichen '0xf'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2018: Unbekanntes Zeichen '0x1e'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C3872: "0x4": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2470: "bӃÕBìd¿7ƒ›": Sieht wie eine Funktionsdefinition aus, es ist aber keine Parameterliste vorhanden; sichtbarer Funktionstext wird übersprungen.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2001: Zeilenvorschub in Konstante.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x16'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x2'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x3'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0xae'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x40'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0xf'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C3872: "0x24": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x1e'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C3872: "0x4": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x18'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : fatal error C1004: Unerwartetes Dateiende gefunden.
    1>d3d8dev.cpp
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2018: Unbekanntes Zeichen '0xf'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2018: Unbekanntes Zeichen '0x1e'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C3872: "0x4": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2470: "bӃÕBìd¿7ƒ›": Sieht wie eine Funktionsdefinition aus, es ist aber keine Parameterliste vorhanden; sichtbarer Funktionstext wird übersprungen.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2001: Zeilenvorschub in Konstante.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x16'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x2'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x3'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0xae'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x40'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0xf'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C3872: "0x24": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x1e'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C3872: "0x4": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x18'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : fatal error C1004: Unerwartetes Dateiende gefunden.
    1>main.cpp
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2018: Unbekanntes Zeichen '0xf'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2018: Unbekanntes Zeichen '0x1e'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C3872: "0x4": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2470: "bӃÕBìd¿7ƒ›": Sieht wie eine Funktionsdefinition aus, es ist aber keine Parameterliste vorhanden; sichtbarer Funktionstext wird übersprungen.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2001: Zeilenvorschub in Konstante.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x16'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x2'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x3'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0xae'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x40'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0xf'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C3872: "0x24": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x1e'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C3872: "0x4": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x18'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : fatal error C1004: Unerwartetes Dateiende gefunden.
    1>d3d8.cpp
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2018: Unbekanntes Zeichen '0xf'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2018: Unbekanntes Zeichen '0x1e'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C3872: "0x4": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2470: "bӃÕBìd¿7ƒ›": Sieht wie eine Funktionsdefinition aus, es ist aber keine Parameterliste vorhanden; sichtbarer Funktionstext wird übersprungen.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(1) : error C2001: Zeilenvorschub in Konstante.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x16'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x2'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x3'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0xae'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x40'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0xf'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C3872: "0x24": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x1e'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C3872: "0x4": Dieses Zeichen ist in einem Bezeichner nicht zulässig.
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : error C2018: Unbekanntes Zeichen '0x18'
    1>c:\program files\microsoft sdks\windows\v6.0a\include\wtypes.h(2) : fatal error C1004: Unerwartetes Dateiende gefunden.
    1>Code wird generiert...
    1>Browseinformationsdatei wird erstellt...
    1>Microsoft Browse Information Maintenance-Programm Version 9.00.30729
    1>Copyright (C) Microsoft Corporation. All rights reserved.
    1>BSCMAKE: error BK1506 : Datei ".\Debug\main.sbr" kann nicht geöffnet werden: No such file or directory
    1>Das Buildprotokoll wurde unter "file://c:\Users\Max\Desktop\D3D Test\D3D_Starterkit_v3.0b\D3D8\Debug\BuildLog.htm" gespeichert.
    1>TatniumD3D - 81 Fehler, 0 Warnung(en)
    ========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========

     

    What did I wrong?

     

    Greets

     

     

    D3D Starterkit patched.

    Link to comment
    Share on other sites

    OK!

    Sorry, didn't know!

     

    ~closed

    Link to comment
    Share on other sites

    Auf Wunsch von affahrad

     

    ~reopen

    Link to comment
    Share on other sites

    @ColdHearth: The Starterkid isn't patched, only the method to get the Direkt 3D DevicePointer is in WarRock patched.

     

    @Topic:

    Show if your SDK is right included.

    Link to comment
    Share on other sites

    @ColdHearth: The Starterkid isn't patched, only the method to get the Direkt 3D DevicePointer is in WarRock patched.

     

    @Topic:

    Show if your SDK is right included.

     

    I think SDK = Software Devopelement Kit right?

     

    OK here it is:

     

    1.JPG

     

    And here all the files you can see:

    O.o Files+-->

    QUOTE (TitaniumD3D (;) Files)

     

    Hope any1 can help me xD

     

    Greets

     

    Maxn

    Link to comment
    Share on other sites

    OK, now I tried the easier one from ZeaS.

     

    Just one CPP file... But now I get this error :S

    I've added the Addys... but I get an error while compiling :S

     

    this code

     

    mainsource.cpp

    #include <stdio.h>
    #include <windows.h>
    
    DWORD *ingame= (DWORD*)0x004E66D0;
    
    void Stamina()
    {
    if(*ingame) //check if we are ingame.. prevent crashs
    {
    	DWORD *stam= (DWORD*)0x004E66D0;
    	DWORD *stam2= ( DWORD* )((*stam) + 0x2A4);
    	*(float*)stam2 = (float)100;
    }
    }
    void cheatThread()
    {
    for(;;)
    {
    	Stamina();
    	Sleep(21); //prevent for overloading the cpu
    }
    }
    BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved)
    {
    if(dwReason == DLL_PROCESS_ATTACH)
    {
    	CreateThread(0, 0, (LPTHREAD_START_ROUTINE)cheatThread, 0, 0, 0); //create the cheatthread
    }
    return TRUE;
    }

     

    dll.h

    #ifndef _DLL_H_
    #define _DLL_H_
    
    #if BUILDING_DLL
    # define DLLIMPORT __declspec (dllexport)
    #else /* Not BUILDING_DLL */
    # define DLLIMPORT __declspec (dllimport)
    #endif /* Not BUILDING_DLL */
    
    
    class DLLIMPORT DllClass
    {
     public:
    DllClass();
    virtual ~DllClass(void);
    
     private:
    
    };
    
    
    #endif /* _DLL_H_ */

     

    dllmain.cpp

    /* Replace "dll.h" with the name of your header */
    #include "dll.h"
    #include <windows.h>
    
    DllClass::DllClass()
    {
    
    }
    
    
    DllClass::~DllClass ()
    {
    
    }
    
    
    BOOL APIENTRY DllMain (HINSTANCE hInst	 /* Library instance handle. */ ,
    				   DWORD reason		/* Reason this function is being called. */ ,
    				   LPVOID reserved	 /* Not used. */ )
    {
    switch (reason)
    {
      case DLL_PROCESS_ATTACH:
    	break;
    
      case DLL_PROCESS_DETACH:
    	break;
    
      case DLL_THREAD_ATTACH:
    	break;
    
      case DLL_THREAD_DETACH:
    	break;
    }
    
    /* Returns TRUE on success, FALSE on failure */
    return TRUE;
    }

     

    Now get this error:

     dllcrt2.o C:\Users\Max\Desktop\D3D Test\3rd\ld No such file: No such file or directory. 
     C:\Users\Max\Desktop\D3D Test\3rd\Makefile.win [Build Error]  [D3D3.dll] Error 1

     

    It seems like I coded nothing wrong, just get an error with compiling :S

     

    any1 knows what this error means ?

     

    Greets

     

    Edit// I think it's better to post it into c++ forum! So closed!

    Edited by ~Maxn~
    Link to comment
    Share on other sites

    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...