-
Notifications
You must be signed in to change notification settings - Fork 3
/
TinyDungeon.ino
47 lines (40 loc) · 1.7 KB
/
TinyDungeon.ino
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
// >>>>> T-I-N-Y D-U-N-G-E-O-N v1.0.1 for ATTINY85 MIT License <<<<
// Tinyjoypad rev2 compatible
// Developer: Sven B 2021-2023
// Contact EMAIL: [email protected]
// Tiny Dungeon is free software: you can redistribute it and/or modify
// it under the terms of the MIT License.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// MIT License for more details.
// Resources:
// ----------
// A SSD1306 library for I2C is required:
// - for ATtiny85 the <ssd1306xled> library by Tinusaur/Neven Boyanov is required.
// - for all other micro controllers the Adafruit_SSD1306 library is used.
//
// Because the Arduino IDE doesn't come with ATtiny85 support, a suitable core is required:
// To stuff all code and data into the 8192 bytes of the ATtiny85
// the ATTinyCore (v1.5.2) by Spence Konde is recommended.
// The core is available at github: [https://github.com/SpenceKonde/ATTinyCore], just add the
// following board manager to the Arduino IDE: [http://drazzy.com/package_drazzy.com_index.json]
// Please enable LTO (link time optimization) and disable 'millis()' and
// 'micros()' and set the PLL to 16MHZ Internal PLL.
#include "dungeon.h"
#include "tinyJoypadUtils.h"
#include "soundFX.h"
static Dungeon _dungeon;
/*--------------------------------------------------------*/
void setup()
{
// initialize the pins (and serial port if present)
InitTinyJoypad();
// perform display initialization
InitDisplay();
}
/*--------------------------------------------------------*/
void loop()
{
_dungeon.gameLoop();
}