In D3DGraphics.h class D3DGraphics: Private : pBackBuffer;
D3DLOCKED_RECT backRect;
to add all those 3.
and inside the Graphics.cpp it made me do
Code: Select all
#include "D3DGraphics.h"
D3DGraphics::D3DGraphics( HWND hWnd )
{
backRect.pBits = NULL;
pDirect3D = Direct3DCreate9( D3D_SDK_VERSION );
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp,sizeof( d3dpp ) );
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
d3dpp.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
pDirect3D->CreateDevice( D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,hWnd,
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE,&d3dpp,&pDevice );
pDevice->GetBackBuffer( 0,0,D3DBACKBUFFER_TYPE_MONO,&pBackBuffer );
}
D3DGraphics::~D3DGraphics()
{
if( pDevice )
{
pDevice->Release();
pDevice = NULL;
}
if( pDirect3D )
{
pDirect3D->Release();
pDirect3D = NULL;
}
if( pBackBuffer )
{
pBackBuffer->Release();
pBackBuffer = NULL;
}
}
void D3DGraphics::PutPixel( int x,int y,int r,int g,int b )
{
((D3DCOLOR*)backRect.pBits)[ x + (backRect.Pitch >> 2) * y ] = D3DCOLOR_XRGB( r,g,b );
}
void D3DGraphics::BeginFrame()
{
pDevice->Clear( 0,NULL,D3DCLEAR_TARGET,D3DCOLOR_XRGB(0,0,0),0.0f,0 );
pBackBuffer->LockRect( &backRect,NULL,NULL );
}
void D3DGraphics::EndFrame()
{
pBackBuffer->UnlockRect();
pDevice->Present( NULL,NULL,NULL,NULL );
}
in Game.cpp it made me do
Code: Select all
void Game::Go()
{
UpdateFace();
UpdatePoo();
gfx.BeginFrame();
ComposeFrame();
gfx.EndFrame();
}
and then it says ::
'Chili DirectX Framework.exe': Loaded 'C:\Users\Elmer1\Desktop\Chili DirectX Framework\Release\Chili DirectX Framework.exe', Symbols loaded.
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\d3d9.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\d3d8thk.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Symbols loaded.
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\aticfx32.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\atiu9pag.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\atiumdag.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\atiumdva.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Unloaded 'C:\Windows\SysWOW64\atiumdva.dll'
'Chili DirectX Framework.exe': Unloaded 'C:\Windows\SysWOW64\atiumdag.dll'
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\atiumdag.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\atiumdva.dll', Cannot find or open the PDB file
'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
First-chance exception at 0x013d2fbc in Chili DirectX Framework.exe: 0xC0000005: Access violation writing location 0x000008a0.
Unhandled exception at 0x772615de in Chili DirectX Framework.exe: 0xC0000005: Access violation writing location 0x000008a0.
The program '[6516] Chili DirectX Framework.exe: Native' has exited with code -1073741819 (0xc0000005).
Please i really need help , i wanna keep go on coding because its so god damn fun ;D
I want to be able to make like an Android market game in maybe a month or so. Have been watching all these tutorials in like 3.5 Days.
Edit : The code Works Perfectly fine in a new place and which i just draw pixels, etc... BUT PLEASE ANSWER GOD DAMMIT I NEED TO KNOW IT NOW!!!!! Im getting so fkin angry about this problem.... Any smart programmer or someone who has done this, Btw Send the exact code u have in your whole Game.ccp so i can match it with mine and see the problem please :/...
Edit again : Well when i started follow that Solution to how to DrawGameOver if Face collides with poo it worked ;o weird. But still if someone has that solution . Tell me