Search found 9 matches

by MrSneekz
September 13th, 2019, 12:28 am
Forum: Everything
Topic: Help with Collision code - :(
Replies: 5
Views: 2712

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...
by MrSneekz
September 12th, 2019, 10:43 pm
Forum: Everything
Topic: Help with Collision code - :(
Replies: 5
Views: 2712

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 (...
by MrSneekz
September 12th, 2019, 10:22 pm
Forum: Everything
Topic: Help with Collision code - :(
Replies: 5
Views: 2712

Re: Help with Collision code - :(

chili wrote:
September 12th, 2019, 9:35 am
i don't see any problem with this code, so it's gotta be somewhere else. try posting all the code you wrote
Here is the entire code. If this is not sufficient let me know... Thanks Chili!
by MrSneekz
September 11th, 2019, 10:48 pm
Forum: Everything
Topic: Help with Collision code - :(
Replies: 5
Views: 2712

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 ...
by MrSneekz
September 8th, 2019, 4:27 pm
Forum: Everything
Topic: Question about Data Members
Replies: 2
Views: 1648

Re: Question about Data Members

Thank you for clearing that up!
by MrSneekz
September 7th, 2019, 5:08 pm
Forum: Everything
Topic: Question about Data Members
Replies: 2
Views: 1648

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?
by MrSneekz
September 6th, 2019, 12:44 am
Forum: Everything
Topic: Assertion failed - newbie help?
Replies: 4
Views: 2127

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 ...
by MrSneekz
September 6th, 2019, 12:33 am
Forum: Everything
Topic: Assertion failed - newbie help?
Replies: 4
Views: 2127

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.
by MrSneekz
September 6th, 2019, 12:20 am
Forum: Everything
Topic: Assertion failed - newbie help?
Replies: 4
Views: 2127

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...