blob: 79615121ee7e59b601b45fa9fabfa383358d62c1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
/* *************************************
* Includes
* *************************************/
#include <Arduino.h>
#include <Gamebuino.h>
/* *************************************
* Defines
* *************************************/
#define mCHECK_COLLISION(x1, y1, w1, h1, x2, y2, w2, h2) \
(!( ((x1) >= (x2) + (w2)) \
|| \
((x2) >= (x1) + (w1)) \
|| \
((y1) >= (y2) + (h2)) \
|| \
((y2) >= (y1) + (h1)) )
/* *************************************
* Structs and enums
* *************************************/
/* *************************************
* Global Variables
* *************************************/
/*****************************************************************//**
*
* \brief Global interface to Gamebuino low-level libs.
*
*********************************************************************/
Gamebuino gb;
/* *************************************
* Local Variables
* *************************************/
/* *************************************
* Local Prototypes
* *************************************/
/*****************************************************************//**
*
* \brief Initializes the device and game parameters.
*
*********************************************************************/
void SystemInit(void)
{
/* Arduino initialization routine. */
init();
/* Initialize Gamebuino libs. */
gb.begin();
#ifdef USBCON
USBDevice.attach();
#endif /* USBCON */
}
|