Search found 7 matches
- August 17th, 2020, 1:48 am
- Forum: Everything
- Topic: Chili, help a brother out.
- Replies: 3
- Views: 2882
Re: Chili, help a brother out.
Sure, relevant work is great; I guess I was more looking for general stuff to make it look sexy. Like "Hey every programmer should know how to do this" stuff.
- August 15th, 2020, 6:40 pm
- Forum: Everything
- Topic: Chili, help a brother out.
- Replies: 3
- Views: 2882
Chili, help a brother out.
So over the past six months or so I've learned a considerable amount about c++ and just coding in general; thanks in no small way to Chili. That being said even though I'm fairly confident in my skills now I can't get a job to save my life. Which is understandable considering that I have no CS degre...
- March 11th, 2020, 5:54 am
- Forum: Everything
- Topic: Homework 4 Intermediate c++
- Replies: 1
- Views: 1602
Homework 4 Intermediate c++
I'm having a really hard time wrapping my head around what is actually going on here. Any help would be greatly appreciated. void Load(const char* filename) { std::ifstream in(filename, std::ios::binary); in.read(reinterpret_cast<char*>(&curNumberEntries), sizeof(curNumberEntries)); for (int i = 0; ...
- February 27th, 2020, 6:58 am
- Forum: Everything
- Topic: Tutorial 20
- Replies: 4
- Views: 2570
Re: Tutorial 20
JFC ignore me. I had to pass Brick brick&.
- February 27th, 2020, 5:37 am
- Forum: Everything
- Topic: Tutorial 20
- Replies: 4
- Views: 2570
Re: Tutorial 20
Okay so I figured it out but I'm not sure why it worked. I was using a for(Brick brick: bricks) instead of for(i= 0 ;i < brickcount; i ++).
Why can I usee the former to draw but not to check collision?
Why can I usee the former to draw but not to check collision?
- February 27th, 2020, 4:19 am
- Forum: Everything
- Topic: Tutorial 20
- Replies: 4
- Views: 2570
Re: Tutorial 20
Here's brick.h let me know if you need the rest of the code to check it out. #pragma once #include "rectf.h" #include "Colors.h" #include "Graphics.h" #include "Ball.h" class Brick { private: RectF rect; Color color; bool destroyed = false; float offset = -2.0f; public: Brick() = default; Brick(cons...
- February 27th, 2020, 4:17 am
- Forum: Everything
- Topic: Tutorial 20
- Replies: 4
- Views: 2570
Tutorial 20
I'm having an issue with this function in tutorial 20. It's returning true and the ball is rebounding but for some reason destroyed isn't being set to true in the brick.h. bool Brick::DoBallCollision(Ball & ball) { if (!destroyed && rect.IsOverlappingWith(ball.GetRect())) { destroyed = true; ball.Re...