now instead of including the smiley I have included a simple blue box
I called it:
int boxX;
int boxY;
yet I did everything like chili said and it still doesnt want to move...here is my code:
Game::Game( HWND hWnd,const KeyboardServer& kServer )
: gfx( hWnd ),
kbd( kServer)
{}
void Game::Go()
{
gfx.BeginFrame();
ComposeFrame();
gfx.EndFrame();
}
void Game::DrawFace (int x, int y)
void Game::ComposeFrame()
{//colours for reticule
int speed;
speed = 3;
//movements
if (kbd.RightIsPressed())
{
boxX = boxX + speed;
}
if (kbd.SpaceIsPressed())
{
speed = 1;
}
if(kbd.LeftIsPressed())
{
boxX = boxX - speed;
}
if(kbd.UpIsPressed())
{
boxY = boxY - speed;
}
if(kbd.DownIsPressed())
{
boxY = boxY + speed;
}
//boundaries
if ( boxX < 0 )
{
boxX = 0;
}
if( boxY < 0 )
{
boxY = 0;
}
if ( boxY > 594)
{
boxY = 594;
}
if (boxX > 794)
{
boxX = 794;
}
DrawFace(boxX,boxY);
}
it also says this when I debug it:
: Loaded 'C:\Windows\System32\oleaut32.dll', Cannot find or open the PDB file
and then I look and on line 23( the ones with exclamation marks) it says it always breaks...: Game.cpp, line 23 (no condition) break always
can anyone help me? i really love these tutorials and have learned ALOT but some errors I just cant identify what the problem is!
problem with lesson 8
- viruskiller
- Posts: 399
- Joined: June 14th, 2012, 5:07 pm
Re: problem with lesson 8
can't tell for sure, anyway is best to clean the solution and post it for who will look at this post trying to help you(i would but don't have the IDE on this machine).
Re: problem with lesson 8
ok well here I packed all the files, I didnt exactly know what you meant by "clean the solution" but anyway here's what I got please help me find the error :/
- Attachments
-
- Chili DirectX Framework.rar
- (290.81 KiB) Downloaded 134 times
Re: problem with lesson 8
Oh if we look at the gfx.PutPixel(0,0,255,255,255) <--- we need to add + 3 in front of the 0 to enable it to move....my cube did not have these therefore didnt move...MOVING ON LADS thanks again
Re: problem with lesson 8
There is a setting in Microsoft Visual C++ express where you can load DLL-exports.Rupy990 wrote:
it also says this when I debug it:
: Loaded 'C:\Windows\System32\oleaut32.dll', Cannot find or open the PDB file
and then I look and on line 23( the ones with exclamation marks) it says it always breaks...: Game.cpp, line 23 (no condition) break always
can anyone help me? i really love these tutorials and have learned ALOT but some errors I just cant identify what the problem is!
Go to the TOOLS-menu-->options-->Debug-->Native and there set a checkmark in load DLL-exports.
Maybe that has to do with it...