Search found 106 matches

by Musi
January 29th, 2013, 6:38 am
Forum: Everything
Topic: Broken compiler (i think)
Replies: 5
Views: 3123

Re: Broken compiler (i think)

Did you copy the main folder with all the files in it or did you just copy its contents like Assets and the solution file etc. ? I know the compiler doesn't like it when you move the files outside the parent folder, whether that's your problem i'm not sure.
by Musi
January 27th, 2013, 10:43 am
Forum: Everything
Topic: [15-puzzle] v.0.0.1
Replies: 5
Views: 3624

Re: 15-puzzle v.0.0.1

Nice, i look forward to when you get pictures and randomization working. :D
by Musi
January 27th, 2013, 10:29 am
Forum: Everything
Topic: Question re UpdateAnimation and currentFrameExposure
Replies: 5
Views: 2695

Re: Question re UpdateAnimation and currentFrameExposure

Yeah that's exactly what happens. What i did was use Chili's Timer class to get time passed per frame in seconds. Edit: I realized my addition to the timer class was unnecessary. Just add this function to the Timer class. float Timer::GetTimeSec() const { if( !watchStopped ) { QueryPerformanceCounte...
by Musi
January 25th, 2013, 4:28 pm
Forum: Everything
Topic: pointers safety issue [solved]
Replies: 4
Views: 2090

Re: quick quick question, beginner s. lesson 17

Yep exactly. ( edited my last post )
by Musi
January 25th, 2013, 4:14 pm
Forum: Everything
Topic: pointers safety issue [solved]
Replies: 4
Views: 2090

Re: quick quick question, beginner s. lesson 17

Ah that's because "const char* pStart" makes it so you cant change the value that the pointer points to. If you want to make it so the actual pointer can't change what it points to then you should put const after the asterisk. const char* pStart // The object that the pointer points to cannot be cha...
by Musi
January 23rd, 2013, 8:59 pm
Forum: Everything
Topic: LNK 2005 and LNK1169 errors?
Replies: 9
Views: 4780

Re: LNK 2005 and LNK1169 errors?

No problem, but does the code work? After looking at Conflictus' diagram i noticed that Player.h includes Attack.h and Attack.h inlcudes Player.h. I didn't think you could do this because it creates a never ending #include recursion. Player includes Attack, which includes Player, which includes Atta...
by Musi
January 23rd, 2013, 7:56 pm
Forum: Everything
Topic: LNK 2005 and LNK1169 errors?
Replies: 9
Views: 4780

Re: LNK 2005 and LNK1169 errors?

I think those errors are because you have defined global variables in a .h file. It's ok to declare functions in a header because your not defining them, but when you create a variable you're not just declaring it, you're actually defining it, which means you might #include the file multiple times t...
by Musi
January 22nd, 2013, 7:21 am
Forum: Everything
Topic: lesson 8 lagging
Replies: 6
Views: 3228

Re: lesson 8 lagging

There should be a bit at the top of Visual C++ that says "Debug", if you click the drop down menu and change it to "Release" it should run as if you just ran the executable. Debug mode can slow the program, but still use it when writing the code of course. And yeah, the PutPixel function is pretty i...
by Musi
January 21st, 2013, 5:54 pm
Forum: Everything
Topic: Just Wondering
Replies: 5
Views: 2706

Re: Just Wondering

I've been wondering this myself.

You could store the information as binary instead, that way you'd need a hex editor to read the file properly and even then its hard to work out what the values are for. Still not fool proof though.
by Musi
January 21st, 2013, 4:51 pm
Forum: Everything
Topic: pass values between functions?
Replies: 14
Views: 6379

Re: pass values between functions?

Just to note. You only need to seed the random number generator once at the start of the program, not before every rand() call. This would be why you got the same number ten times. I mean, you can seed more than once if you want but if the srand() calls are done at the same time almost instantaneous...