Results 1 to 1 of 1
  1. #1
    a4123278
    a4123278 is offline
    Member-in-training
    Join Date
    2010 Apr
    Posts
    68
    Thanks Thanks Given 
    2
    Thanks Thanks Received 
    15
    Thanked in
    1 Post
    Rep Power
    0

    [D3D][C++] No fog tutorial

    [D3D][C++] No fog tutorial

    1. Download and install MS Visual C++
    2. Download and install MS DirectX 9 sdk
    3. Link the DirectX 9 sdk include, Library and src directories into MS Visual C++ (Tools->Options->Directories)
    4. Download the Direct3D StarterKit by Azorbix.
    5. Extract the D3D9 folder from the starterkit to anywhere on your pc.
    6. Create a new Win32 Dynamic-Link library project in MS Visual C++ (File->New->Projects)
    7. Enter a project name, Location name and click ok, Then check the "An empty DLL project" checkbox and click ok
    8. In MS Visual C++ find your workspace folders called Source files, Headers files and Resource files. (Usually in a column on the left)
    9. Right click on the Source files folder and click "Add files to folder"
    10. Open the D3D9 folder you extracted from the starterkit in the window that pops up and highlight all the .cpp files and then click ok.
    11. Do the same with Header files folder but this time add all the .h files instead.
    12. Double click on the "d3d9dev.cpp" file in your Source files folder in MS Visual C++
    13. Find the DrawIndexedPrimitive function below in d3d9dev.cpp

    HRESULT APIENTRY hkIDirect3DDevice9::DrawIndexedPrimitive(D3DPRIMIT  IVETYPE Type, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount)
    {

    return m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);

    }

    14. Add "m_pD3Ddev->SetRenderState(D3DRS_FOGENABLE, false);" into that function like below
    HRESULT APIENTRY hkIDirect3DDevice9::DrawIndexedPrimitive(D3DPRIMIT  IVETYPE Type, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount)
    {

    m_pD3Ddev->SetRenderState(D3DRS_FOGENABLE, false);

    return m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);

    }

    15. Compile your project (Build->Batch build) Check both checkboxs (Rebuild all)
    16. Open your project folder that will be saved in your location name you entered when creating a new project
    17. Find the Release folder and copy your .dll to your desktop
    18. Get a injector and inject your .dll into your game.
    19. Go play with no fog
    © Roverturbo


    If you did everything right and didn't miss any steps of this tutorial.
    You'll get the same .dll as i did.
    Virustotal result: 0%

    Please register or login to download attachments.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •