Fart-Annoyed debugging help
Fart-Annoyed debugging help
The ball.DoWallCollision function is causing putpixel to draw off the screen. I have narrowed it down somewhat with the debugger to the GetRect function, specifically where I am creating a RectF object. More specifically, it appears that there is a (maybe) problem with the vector math.
- Attachments
-
- fart-annoyed.zip
- (97.02 KiB) Downloaded 203 times
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Fart-Annoyed debugging help
And calling a constructor from another constructor strikes again
should be:
Code: Select all
RectF::RectF(const Vec2& topLeft, const Vec2& bottomRight)
{
RectF(topLeft.x, bottomRight.x, topLeft.y, bottomRight.y);
}
RectF::RectF(const Vec2& topLeft, float width, float height)
{
RectF(topLeft, topLeft + Vec2(width, height));
}
Code: Select all
RectF::RectF(const Vec2& topLeft, const Vec2& bottomRight)
:
RectF(topLeft.x, bottomRight.x, topLeft.y, bottomRight.y);
{
}
RectF::RectF(const Vec2& topLeft, float width, float height)
:
RectF(topLeft, topLeft + Vec2(width, height));
{
}
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Fart-Annoyed debugging help
Don't feel bad, this has been one of the biggest issues amongst beginners here. I suppose it would be worth it to post a sticky about it.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com