[Fart-Annoyed] Can't Initialize a Brick!
-
- Posts: 5
- Joined: April 19th, 2017, 11:27 pm
[Fart-Annoyed] Can't Initialize a Brick!
Hi, I just started on Fart-Annoyed and tried writing up my own code to make some of the basics of the game. I got my ball working fine, but when it comes to the brick I can't seem to get it initialized properly. For whatever reason, the rectangle I pass in to the constructor turns into uninitialized garbage and causes my brick to not be drawn.
-
- Posts: 5
- Joined: April 19th, 2017, 11:27 pm
Re: [Fart-Annoyed] Can't Initialize a Brick!
More files added.
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: [Fart-Annoyed] Can't Initialize a Brick!
Same problem as the other two chaps
Code: Select all
RectF::RectF(const Vec2& top_left, const Vec2& bottom_right)
{
RectF(top_left.x, bottom_right.x, top_left.y, bottom_right.y);
}
RectF::RectF(const Vec2& position, float width, float height)
{
RectF(position.x, position.x + width, position.y, position.y + height);
}
RectF::RectF(const RectF& rect)
{
RectF(rect.GetLeft(), rect.GetRight(), rect.GetTop(), rect.GetBottom());
}
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] Can't Initialize a Brick!
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
Re: [Fart-Annoyed] Can't Initialize a Brick!
Yo bug, are you coming from a Java background?
I think I'll have to put a note about this on the tutorial wiki page.
I think I'll have to put a note about this on the tutorial wiki page.
Chili
-
- Posts: 5
- Joined: April 19th, 2017, 11:27 pm
Re: [Fart-Annoyed] Can't Initialize a Brick!
No, I come from a no-programming background