Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
missing Rand function/macro
its not really missing you can find it in the invaders code and copy it over. Many of the files after invaders are starter projects where you have to add functions/macros and methods. But its causing a bit of confusion so I've added it to the Kamikazi base code, and here it is

inline float Rand(float a_Range) { return ((float)rand() / RAND_MAX) * a_Range; }

its a small inline function, I add it to Game.h but its at home in any frequently included header file.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 


Forum Jump:

Users browsing this thread: 1 Guest(s)