Search found 9 matches
- September 13th, 2019, 12:28 am
- Forum: Everything
- Topic: Help with Collision code - :(
- Replies: 5
- Views: 2784
Re: Help with Collision code - :(
ah, i see I deleted the box. The box was initially a called object from the function "DrawBox" in the header file. I added it to the lines below. void Game::ComposeFrame() { DrawBox(200, 250, 200, 30, 60); if (colliding) { reticle(reticle_x, reticle_y, 255, 0, 0); } else { reticle(reticle_x, reticle...
- September 12th, 2019, 10:43 pm
- Forum: Everything
- Topic: Help with Collision code - :(
- Replies: 5
- Views: 2784
Re: Help with Collision code - :(
and here is the code outright for reference if thats all you need. Thanks again... #include "MainWindow.h" #include "Game.h" Game::Game( MainWindow& wnd ) : wnd( wnd ), gfx( wnd ) { } void Game::Go() { gfx.BeginFrame(); UpdateModel(); ComposeFrame(); gfx.EndFrame(); } void Game::UpdateModel() { if (...
- September 12th, 2019, 10:22 pm
- Forum: Everything
- Topic: Help with Collision code - :(
- Replies: 5
- Views: 2784
- September 11th, 2019, 10:48 pm
- Forum: Everything
- Topic: Help with Collision code - :(
- Replies: 5
- Views: 2784
Help with Collision code - :(
I have been having some issues with tutorial 5 and 6. I cannot find out why my code is not allowing the cursor to change color as it collides or goes over the box. I think its my if statement, but i have spent hours [6 - 8+] on this one. I come here to ask for help as my last resort .I am feeling a ...
- September 8th, 2019, 4:27 pm
- Forum: Everything
- Topic: Question about Data Members
- Replies: 2
- Views: 1670
Re: Question about Data Members
Thank you for clearing that up!
- September 7th, 2019, 5:08 pm
- Forum: Everything
- Topic: Question about Data Members
- Replies: 2
- Views: 1670
Question about Data Members
Are data members considered to be objects or can they be used as objects and/or variables?
Is this the same for member functions?
Is this the same for member functions?
- September 6th, 2019, 12:44 am
- Forum: Everything
- Topic: Assertion failed - newbie help?
- Replies: 4
- Views: 2149
Re: Assertion failed - newbie help?
I solved my issue. the compiler doesn't like functions that include : gfx.PutPixel(reticle_x, 4 - reticle_y , 255, gb, gb); so i initially had a ton of values that were all saying : 2 - reticle_y 3 - reticle_y etc... when I needed to be stating : reticle_y - 5 reticle_y - 2 etc... Sorry for posting ...
- September 6th, 2019, 12:33 am
- Forum: Everything
- Topic: Assertion failed - newbie help?
- Replies: 4
- Views: 2149
Re: Assertion failed - newbie help?
I think i found out my issue... kinda... has something to do with my gfx.PutPixel functions... the numbers it seems do not agree with the barriers of the window.
- September 6th, 2019, 12:20 am
- Forum: Everything
- Topic: Assertion failed - newbie help?
- Replies: 4
- Views: 2149
Assertion failed - newbie help?
I was working on the beginner videos for C++ and I was able to do everything thus far (up to pt 4) without any issue on my desktop. My laptop on the other hand for some reason keeps saying Assertion Error when I try to run the debugger. it references line 314 y >= 0 in the graphics.cpp file. I turne...