problem with lesson 8

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
Rupy990
Posts: 4
Joined: May 5th, 2013, 6:01 am

problem with lesson 8

Post by Rupy990 » May 6th, 2013, 5:15 am

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!

User avatar
viruskiller
Posts: 399
Joined: June 14th, 2012, 5:07 pm

Re: problem with lesson 8

Post by viruskiller » May 6th, 2013, 9:51 pm

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).

Rupy990
Posts: 4
Joined: May 5th, 2013, 6:01 am

Re: problem with lesson 8

Post by Rupy990 » May 7th, 2013, 1:41 am

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

Rupy990
Posts: 4
Joined: May 5th, 2013, 6:01 am

Re: problem with lesson 8

Post by Rupy990 » May 7th, 2013, 1:51 am

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 :)

Syncan
Posts: 58
Joined: May 13th, 2013, 2:09 pm
Location: Holland

Re: problem with lesson 8

Post by Syncan » May 13th, 2013, 6:06 pm

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!
There is a setting in Microsoft Visual C++ express where you can load DLL-exports.
Go to the TOOLS-menu-->options-->Debug-->Native and there set a checkmark in load DLL-exports.

Maybe that has to do with it...

Post Reply