/* ** @author Eugene Andruszczenko ** @version 0.3 ** @date November 5th, 2013 ** @description This is an all in one GameEngine based on the 4d systems displays */ /* ** @description include required files */ #include "arduino.h" /* ** @description arduino library include files ** @description Picaso libraries are available from 4d Systems GitHub https://github.com/4dsystems/Picaso-Serial-Arduino-Library */ #include #include #include #include /* ** @description Game Engine include files */ #include "GameEngine.h" /* ** @description Game Engine class declaration */ GameEngine *GE; /* ** @param wait {long} delay between loops ** @param now {unsigned long} timestamp millis() */ long wait = 100; unsigned long now; /* ** @method setup ** @description main arduino setup */ void setup() { /* ** @description if CPU is defined, change the timers accordingly */ #ifdef CPU TCCR1B = TCCR1B & 0b11111000 | CPU; TCCR1B = TCCR1B & 0b11111000 | CPU; TCCR2B = TCCR2B & 0b11111000 | CPU; #endif /* ** @description Game Engine class instantiation */ GE = new GameEngine(); /* ** @description set initial value to now */ now = millis()+wait; } /* ** @method loop ** @description main arduino loop */ void loop() { /* if(millis() > now) { now+=wait; GE->Core(); } */ GE->Core(); }