Greetings.
I've been having a minor problem which prevents me from starting
my project. It builds just fine but I am not able to start it up.
In debug mode it points to D3DGraphics.cpp and from there it points
this particular line:
"((D3DCOLOR*)rect.pBits)[ x + (rect.Pitch >> 2) * y ] = D3DCOLOR_XRGB( r,g,b );"
I have absolutely no idea what is wrong with it. I haven't even touched
D3DGraphics.cpp. This is possibly just an very stupid human error but
I have no idea what I did wrong.
Edit: I changed it back to normal crosshair. It worked fine with that.
It seems that for some reason the more complicated pixel art
does not work.
System information:
Visual C++ 2010
Windows 8 64-bit
DirectX SDK (June 2010)
Lesson 1 version of Chili DirectX Framework
i7-3630QM
16gb RAM
GTX 660M
Beginner's C++ Tutorial Lesson 8 problem in D3DGraphics.cpp
Beginner's C++ Tutorial Lesson 8 problem in D3DGraphics.cpp
- Attachments
-
- Chili DirectX Framework.zip
- (35.53 KiB) Downloaded 148 times
Re: Beginner's C++ Tutorial Lesson 8 problem in D3DGraphics.
I've tried your program and it works fine for me. The only thing I see is wrong, is your sprite clamping. It should be more like this :
It is possible it gives you the error because of drawing off-screen.
Code: Select all
if( faceX < 0 )
{
faceX = 0;
}
if( faceX > 779 )
{
faceX = 779;
}
if( faceY < 0 )
{
faceY = 0;
}
if( faceY > 579 )
{
faceY = 579;
}
Re: Beginner's C++ Tutorial Lesson 8 problem in D3DGraphics.
Thank you kindly.
That fix worked.
That fix worked.