Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get some new changes :) #1

Open
wants to merge 259 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
259 commits
Select commit Hold shift + click to select a range
61b5749
Update README.md
ESPboy-edu Mar 30, 2020
be83d85
Update README.md
ESPboy-edu Mar 30, 2020
943c420
Update README.md
ESPboy-edu Mar 30, 2020
ebeed6b
Update README.md
ESPboy-edu Mar 30, 2020
acf8bfa
Update README.md
ESPboy-edu Mar 30, 2020
26928df
bug fixed
ESPboy-edu Mar 30, 2020
4b4da5e
Merge remote-tracking branch 'origin/master'
ESPboy-edu Mar 30, 2020
b7872f2
add blocks, galaxion, karateka
ESPboy-edu Apr 3, 2020
fd12c39
Update README.md
ESPboy-edu Apr 3, 2020
d23f016
add tackle box
ESPboy-edu Apr 5, 2020
b9207b0
correction
ESPboy-edu Apr 5, 2020
d9b223c
Update README.md
ESPboy-edu Apr 5, 2020
584bfc3
add hatrack
ESPboy-edu Apr 5, 2020
1f66da1
Update README.md
ESPboy-edu Apr 5, 2020
c69b3cc
add Super-Crate-Buino-branched
ESPboy-edu Apr 5, 2020
54b0cbf
fixed
ESPboy-edu Apr 5, 2020
32a52c1
Update README.md
ESPboy-edu Apr 5, 2020
7cc07a8
Update README.md
ESPboy-edu Apr 5, 2020
4fde473
Update README.md
ESPboy-edu Apr 5, 2020
5415f8a
Update README.md
ESPboy-edu Apr 5, 2020
1cc4b42
Update README.md
ESPboy-edu Apr 5, 2020
70abd23
Update README.md
ESPboy-edu Apr 6, 2020
22f0769
Merge remote-tracking branch 'origin/master'
ESPboy-edu Apr 8, 2020
3a7e798
fixed
ESPboy-edu Apr 8, 2020
a44593e
added OTA
ESPboy-edu Apr 28, 2020
af65fe6
bug fixes
ESPboy-edu Apr 29, 2020
3570889
Update README.md
ESPboy-edu Apr 30, 2020
e251efd
Update README.md
ESPboy-edu Apr 30, 2020
3c87b2d
Merge remote-tracking branch 'origin/master'
ESPboy-edu Apr 30, 2020
e2e972f
fixes
ESPboy-edu Apr 30, 2020
3250ac7
LEDLOCK support aded
ESPboy-edu May 12, 2020
6ef3388
Update README.md
ESPboy-edu Aug 1, 2020
f04a4e4
games added, drawSlowXYBitmap fixed
ESPboy-edu Nov 21, 2020
ba11d86
EEPROM fix
ESPboy-edu Nov 22, 2020
173c4d1
OBONO Ardubullet game adeed
ESPboy-edu Nov 22, 2020
2a7db5b
readme upd
ESPboy-edu Nov 22, 2020
63d92a7
added lib ESPboy_playtune
ESPboy-edu Nov 22, 2020
01b2816
OBONO Hollow Seeker game added
ESPboy-edu Nov 22, 2020
ff8f25e
OBONO Hopper game added
ESPboy-edu Nov 22, 2020
2d260c5
fixed
ESPboy-edu Nov 23, 2020
e4b0b78
OBONO evasion game added
ESPboy-edu Nov 23, 2020
47532e6
OBONO Chri-Bocchi_Cat game added
ESPboy-edu Nov 24, 2020
508855d
OBONO Reversi game added
ESPboy-edu Dec 5, 2020
21984f2
UPD readme
ESPboy-edu Dec 5, 2020
c4372f4
Update README.md
ESPboy-edu Dec 5, 2020
00d09e8
SpaceRocks game added
ESPboy-edu Dec 6, 2020
fe54518
Merge remote-tracking branch 'origin/master'
ESPboy-edu Dec 6, 2020
13eabac
fixed bugs in SpaceRocks game
ESPboy-edu Dec 6, 2020
a1aa37a
chrome dyno game added
ESPboy-edu Dec 9, 2020
2eaeb4b
sunfire gme added
ESPboy-edu Dec 10, 2020
395f73a
ArduIndy game added
ESPboy-edu Dec 15, 2020
e7a5341
Helii and Pocket Fighter games added
ESPboy-edu Dec 17, 2020
9962895
Midnight Wild game added
ESPboy-edu Dec 17, 2020
cecf66c
FestiveFIght and KungFuEscape games added
ESPboy-edu Dec 17, 2020
12364f3
Added Catacombs network edition
ESPboy-edu Dec 27, 2020
10a408a
added Squre Nose game
ESPboy-edu Jan 13, 2021
a80a46b
Shattered Lands game added
ESPboy-edu Jan 20, 2021
b736262
NewBlocksOnTheKid game added
ESPboy-edu Jan 20, 2021
22d2f22
bug fixed for SL_TowersOfPerdition
ESPboy-edu Jan 21, 2021
cb1f05b
Update README.md
ESPboy-edu Jan 21, 2021
3630450
Unicorn Dash game added
ESPboy-edu Jan 21, 2021
9bcdb57
Merge remote-tracking branch 'origin/master'
ESPboy-edu Jan 21, 2021
88bfeaa
LeannaTheLionAB game added
ESPboy-edu Mar 1, 2021
4b47acb
MicroTank by hartmann1301 added
ESPboy-edu Mar 1, 2021
7faf549
Artillery and DarkSrtar games added
ESPboy-edu Mar 2, 2021
5492d9c
CyberHack game added
ESPboy-edu Mar 14, 2021
1a9824c
CyberHack EEPROM fixes
ESPboy-edu Mar 14, 2021
6cf022e
fixed
ESPboy-edu Mar 14, 2021
5f8aafc
added ESPboy_Playtune
ESPboy-edu Mar 14, 2021
2a6d8d9
added Bomberboy
ESPboy-edu Mar 16, 2021
8210231
games added: FirePanic and OilPanic
ESPboy-edu Mar 20, 2021
212e747
games added Trolley Fosh and KONG
ESPboy-edu Mar 21, 2021
7e0de55
games added puzzle pack and ninja fuzzgrauth
ESPboy-edu Mar 23, 2021
32f848c
games added Leon Tamer, Turtle bridge
ESPboy-edu Mar 31, 2021
6c4d0b3
game added Blade Runner
ESPboy-edu Apr 4, 2021
fdd27ee
game fixed BladeRunner
ESPboy-edu Apr 10, 2021
6739573
fixed OTA
ESPboy-edu Apr 22, 2021
28546d4
added games: Road Trip, Domino
ESPboy-edu Apr 23, 2021
55e30cc
fixed OTA
ESPboy-edu Apr 24, 2021
32a741c
fixing lib
ESPboy-edu Apr 24, 2021
83e44c9
updated max/min Val
ESPboy-edu Apr 24, 2021
ed327e4
small fixes
ESPboy-edu Apr 24, 2021
e68940b
fixing sound problem
ESPboy-edu Apr 25, 2021
7bdff58
fixing bugz
ESPboy-edu Apr 25, 2021
020a3bd
readme enhancements
prashantkamdar Apr 25, 2021
35dd4c4
readme enhancements
prashantkamdar Apr 25, 2021
4faae16
readme enhancements
prashantkamdar Apr 25, 2021
390aa5d
readme enhancements
prashantkamdar Apr 25, 2021
0a1ebac
readme enhancements
prashantkamdar Apr 25, 2021
3c475a5
readme enhancements
prashantkamdar Apr 25, 2021
98301ba
juno first ported
prashantkamdar Apr 25, 2021
c3626c8
Merge pull request #1 from prashantkamdar/master
ESPboy-edu Apr 25, 2021
269d97e
added game bomberman
ESPboy-edu May 1, 2021
24e8353
Merge remote-tracking branch 'origin/master'
ESPboy-edu May 1, 2021
32b646b
roadtrip game update
ESPboy-edu May 4, 2021
c9d1d72
roadtrip added
ESPboy-edu May 4, 2021
4ff269f
1nvader & humanity revenge games added
ESPboy-edu May 7, 2021
31af352
invert() added
ESPboy-edu May 15, 2021
3e9c82a
Bugs fixed at ArduboyTones
ESPboy-edu May 22, 2021
534befe
added MaqQ, Lagunita, TinyTank, SFZ
ESPboy-edu May 23, 2021
2eb4e9c
implemented few functions emulation
ESPboy-edu Jun 8, 2021
ea66245
bug fixes
ESPboy-edu Jun 8, 2021
0f31095
blank(); implemented
ESPboy-edu Jun 8, 2021
120c060
Update README.md
ESPboy-edu Jun 9, 2021
e4ef707
added mane games
ESPboy-edu Jun 10, 2021
9b148e3
Merge remote-tracking branch 'origin/master'
ESPboy-edu Jun 10, 2021
c315d62
fixed start logo on
ESPboy-edu Jun 22, 2021
639f870
small improvements
ESPboy-edu Nov 24, 2021
713c4fb
add game ECOMD
ESPboy-edu Nov 24, 2021
bf50ae1
add game CRATES 3D and SpaceQuarth
ESPboy-edu Nov 29, 2021
01cb813
add game cooties attack
ESPboy-edu Dec 4, 2021
01bfab4
Update README.md
ESPboy-edu Dec 5, 2021
e88f75a
lib fixed to compile on 3.0.2 SDK
ESPboy-edu Dec 18, 2021
c3e8be7
add game Onychophora
ESPboy-edu Dec 18, 2021
be00085
update readme games
ESPboy-edu Dec 18, 2021
b258dfb
update readme
ESPboy-edu Dec 18, 2021
2834cf1
add gamse Horde and LATE
ESPboy-edu Jan 5, 2022
d6bcf2c
add game Number Puzzle
ESPboy-edu Jan 30, 2022
ddfbd2c
add game TrialsOfAstarok
ESPboy-edu Feb 12, 2022
94c1fb8
readme update
ESPboy-edu Feb 12, 2022
b747615
add game A-maze, LongCat
ESPboy-edu Mar 7, 2022
bb80226
improved render
ESPboy-edu Mar 7, 2022
4900e38
fixed render
ESPboy-edu Mar 8, 2022
7bea0c2
games fixed longcat and RoadTrip
ESPboy-edu Mar 8, 2022
ac79919
add game ArduChess
ESPboy-edu Mar 8, 2022
9a55925
fixed render to work with HEIGHT=128
ESPboy-edu Mar 9, 2022
a8a3787
fixed fillScreen(uint8_t color)
ESPboy-edu Mar 9, 2022
0f2b00f
ArduChess render fix
ESPboy-edu Mar 11, 2022
731c47c
fixed Astarok
ESPboy-edu Mar 13, 2022
9bcf4df
add game MiniRogue
ESPboy-edu Mar 13, 2022
e8ba9f0
MiniROgue fixed saves
ESPboy-edu Mar 14, 2022
02bd77d
readme added games
ESPboy-edu Mar 20, 2022
53c0007
Arduboy2Core aded generateRandomSeed(), game LongCat update
ESPboy-edu Mar 24, 2022
c8f4f8b
add game Evasion
ESPboy-edu Mar 27, 2022
ab4bdc6
fix Evasion
ESPboy-edu Mar 27, 2022
fe9bb70
LongCat game update
ESPboy-edu Apr 20, 2022
425ab9c
Arduventure game music/sounds fixed
ESPboy-edu May 3, 2022
da6dbac
Arduventure savings fix
ESPboy-edu May 3, 2022
feb079c
Update README.md
ESPboy-edu May 3, 2022
11124dc
Update README.md
ESPboy-edu May 3, 2022
b5481f2
Update README.md
ESPboy-edu May 4, 2022
f7f95b6
Arduboy2lib>Swith sounf ON/OFF on boot, microsity1.3 update
ESPboy-edu May 6, 2022
23ec682
Merge remote-tracking branch 'origin/master'
ESPboy-edu May 6, 2022
2e75226
add game 1944 PPOT
ESPboy-edu May 6, 2022
58edd9c
added to Arduboy2Audiocpp - NoteToFrequency(byte note)
ESPboy-edu May 8, 2022
5ed3029
Arduboy load imprived settings (sound,logo)
ESPboy-edu May 8, 2022
d71daf5
Add game RickArdurous
ESPboy-edu May 8, 2022
5a7c896
Add game Ardulem
ESPboy-edu May 9, 2022
9751012
update readme
ESPboy-edu May 9, 2022
2e3f361
Add game ArduRogue
ESPboy-edu May 9, 2022
be66d70
Improved CyberHack game ByteBeat
ESPboy-edu May 13, 2022
1936873
+improved CyberHack Game Bytebeat
ESPboy-edu May 13, 2022
0fce96f
++improved CyberHack Bytebeat
ESPboy-edu May 13, 2022
0cc1adc
Arduboytones Fixed freeze
ESPboy-edu May 19, 2022
564c162
Add game OneButtonShooter
ESPboy-edu May 20, 2022
0f2598a
fixed buttons
ESPboy-edu May 31, 2022
477b3c1
Add game arduboy_minigolf
ESPboy-edu Jun 5, 2022
ed9c4ff
fixes
ESPboy-edu Jun 12, 2022
6c6816b
Games added PPOT Choplifter and PPOT 1943
ESPboy-edu Sep 18, 2022
cff8987
fixed
ESPboy-edu Sep 18, 2022
3110299
setup menu added code refactored
ESPboy-edu Oct 4, 2022
d15b843
Update README.md
ESPboy-edu Nov 13, 2022
bf11f6c
Merge remote-tracking branch 'origin/master'
ESPboy-edu Nov 13, 2022
dd20730
Add game Piracy
ESPboy-edu Nov 13, 2022
a0f5111
partialy upgrade to v6
ESPboy-edu Feb 14, 2023
3b10572
fixed ArduboyTones, added ArduboyFX
ESPboy-edu Mar 13, 2023
c96b8bc
improved Arduboy2 and FX
ESPboy-edu Mar 25, 2023
d521ab1
fixes
ESPboy-edu Mar 25, 2023
de4feff
add game PrinceOfArabia
ESPboy-edu Mar 26, 2023
393e5f3
fixes
ESPboy-edu Mar 27, 2023
19224e7
fixed
ESPboy-edu Jun 25, 2023
73438c6
fix
ESPboy-edu Jun 25, 2023
e204bd6
Update README.md add games
ESPboy-edu Jul 15, 2023
ddccc7d
game added Arduban + Arduboy2 lib fix EEPROM offset for SAVE/LOAD
ESPboy-edu Jul 16, 2023
186f2af
Merge remote-tracking branch 'origin/master'
ESPboy-edu Jul 16, 2023
e510293
add game Octopus
ESPboy-edu Jul 16, 2023
00d5b7d
updated PrinceOfArabia game
ESPboy-edu Sep 6, 2023
63d7db4
update ArduboyFX lib
ESPboy-edu Sep 7, 2023
aec6761
update CircuitDude to v3.2
ESPboy-edu Sep 17, 2023
6176b03
improve
ESPboy-edu Oct 15, 2023
8ddf21d
Update Arduboy2Core.cpp
ESPboy-edu Jan 7, 2024
7a2e726
Update Arduboy2.h
ESPboy-edu Jan 7, 2024
2935a89
FXlib fixed (arraysizedetection)
ESPboy-edu Jan 7, 2024
dee82a1
Update Arduboy2Core.cpp EEPROM amount fix
ESPboy-edu Jan 8, 2024
0a882a5
Update Arduboy2Core.cpp EEPROM amount fixed
ESPboy-edu Jan 8, 2024
4f9cc15
Updated Arduboy FX lib
ESPboy-edu Jan 8, 2024
6d14cca
Merge branch 'master' of https://github.com/ESPboy-edu/ESPboy_Arduboy…
ESPboy-edu Jan 8, 2024
8786daa
ToneFX lib added
ESPboy-edu Jan 8, 2024
1a2a5e1
Added game Wolfenduino3D
ESPboy-edu Jan 8, 2024
14a0de1
added game Greenhorn Syndicate
ESPboy-edu Mar 23, 2024
cffd2d3
added new func
ESPboy-edu May 25, 2024
97ab1cf
add ArduboyG lib
ESPboy-edu Jun 29, 2024
aeb7219
add KUBE
ESPboy-edu Jul 1, 2024
7ae8bd7
add Sensitive
ESPboy-edu Jul 3, 2024
c1e17ba
ArduboyG fixed
ESPboy-edu Jul 4, 2024
5911c48
ArduboyG fixed
ESPboy-edu Jul 4, 2024
27394bc
fixed Sensitive
ESPboy-edu Jul 4, 2024
76a0cf1
fixed ArduboyG
ESPboy-edu Jul 4, 2024
de65172
fixed ArduboyG
ESPboy-edu Jul 5, 2024
bd71a02
fixed
ESPboy-edu Jul 5, 2024
2a0abc3
fixed
ESPboy-edu Jul 6, 2024
cc87276
fixed
ESPboy-edu Jul 7, 2024
5c3d550
fixed
ESPboy-edu Jul 7, 2024
7626e10
SynthU added
ESPboy-edu Jul 9, 2024
423acde
fix
ESPboy-edu Jul 9, 2024
ebc9015
SynthU fixed
ESPboy-edu Jul 9, 2024
2e0b64e
added game DefenderFX
ESPboy-edu Jul 9, 2024
22ea77a
fixed ArduboyFX
ESPboy-edu Jul 10, 2024
da1dfbc
added colors to ArduboyG
ESPboy-edu Jul 10, 2024
ba19e79
fixed
ESPboy-edu Jul 10, 2024
d66108c
ArduboyG - nbSPI added
ESPboy-edu Jul 12, 2024
207487b
fixed
ESPboy-edu Jul 12, 2024
02c9d67
fixed
ESPboy-edu Jul 12, 2024
fb8b6b2
fixed game PPOT DefenderFX
ESPboy-edu Jul 12, 2024
bd0ca92
added game PPOT OhHellFX
ESPboy-edu Jul 12, 2024
1684da7
fixed setFrameRate() parameter to uint16_t
ESPboy-edu Jul 12, 2024
15f0f93
fixed ArduboyG
ESPboy-edu Jul 12, 2024
e72ecb5
fixes
ESPboy-edu Jul 13, 2024
1a68db4
fixes
ESPboy-edu Jul 13, 2024
29e5774
added Palerres ArduboyG
ESPboy-edu Jul 13, 2024
d82b65f
fixes
ESPboy-edu Jul 14, 2024
40da680
added x2Y_scaling render
ESPboy-edu Jul 19, 2024
8c71270
added x2Y scaling for Ardugray
ESPboy-edu Jul 28, 2024
3b3cf7d
added dynamic x2Y scaling for normal Arduboy2 gfx
ESPboy-edu Jul 28, 2024
6e12f7c
update Game with ne ArduGray
ESPboy-edu Jul 28, 2024
61f3432
add game BoneShakers
ESPboy-edu Jul 31, 2024
a0d566f
add game ShroomKnight
ESPboy-edu Aug 25, 2024
6d8798b
add game Magnets
ESPboy-edu Aug 25, 2024
8f14137
add game Magnets
ESPboy-edu Aug 25, 2024
fe9dbc3
Merge branch 'master' of https://github.com/ESPboy-edu/ESPboy_Arduboy…
ESPboy-edu Aug 25, 2024
3720387
fixed game OhHell
ESPboy-edu Aug 25, 2024
0929624
updated ArduboyG
ESPboy-edu Aug 25, 2024
ac48762
add game Paintball
ESPboy-edu Aug 25, 2024
9572435
Update README.md
ESPboy-edu Aug 25, 2024
44e9f66
Update README.md
ESPboy-edu Aug 25, 2024
eaa3dfc
Update README.md
ESPboy-edu Aug 26, 2024
75d9ae5
Update README.md
ESPboy-edu Aug 26, 2024
fbee87e
Update README.md
ESPboy-edu Aug 26, 2024
a793c6f
update game ShroomKnight to v2.0
ESPboy-edu Aug 31, 2024
90135cd
Merge branch 'master' of https://github.com/ESPboy-edu/ESPboy_Arduboy…
ESPboy-edu Aug 31, 2024
2196ee0
add game Kwirk
ESPboy-edu Aug 31, 2024
8e3a1b4
add game Ardumania
ESPboy-edu Sep 2, 2024
b9eec57
add game StarFighter
ESPboy-edu Nov 18, 2024
f93ea39
update
ESPboy-edu Nov 23, 2024
77c364e
Update README.md
ESPboy-edu Dec 7, 2024
49db155
Update README.md
ESPboy-edu Dec 22, 2024
cfd3386
Add games BigwaveDave and Rhumbus
ESPboy-edu Dec 22, 2024
fb2c28a
Merge remote-tracking branch 'origin/master'
ESPboy-edu Dec 22, 2024
89e447f
Add game Factor-9
ESPboy-edu Dec 22, 2024
7755ac6
Add game Uaps must DIE
ESPboy-edu Dec 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file removed .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
doxygen/

ArduboyTones-master/.DS_Store

GAMES/.DS_Store

.DS_Store
Binary file removed GAMES/.DS_Store
Binary file not shown.
357 changes: 357 additions & 0 deletions GAMES/A-Maze/A-Maze-Arduboy/A-Maze-Arduboy.ino

Large diffs are not rendered by default.

390 changes: 390 additions & 0 deletions GAMES/A-Maze/A-Maze-Arduboy/a-maze-01-maze.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,390 @@
#define MAZEHEIGHT 31
#define MAZEWIDTH 15

uint16_t Maze[] = {
0b1101111111111111,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1101010101010101,
0b1100000000000001,
0b1111111111111101,
0b1100000000000101,//exit
0b0000000000000000
};

uint8_t geni, genj, genk, genval, genmod;
int8_t genx, geny;



void drawMaze(){
uint8_t i, j;
bool wall;

for(i=0;i<=MAZEHEIGHT;i++){
for(j=0;j<=MAZEWIDTH;j++){
wall=readPixel(i,j);
if(wall and j>1){

//walls
if(gameMode!=4){
//light mode
if(wallPhase==1){
if(illuminatedRow>=i){
arduboy.drawPixel(i*4,j*4+2,WHITE);
arduboy.drawPixel(i*4,j*4+2+2,WHITE);
arduboy.drawPixel(i*4+1,j*4+1+2,WHITE);
arduboy.drawPixel(i*4+1,j*4+3+2,WHITE);
arduboy.drawPixel(i*4+2,j*4+2+2,WHITE);
arduboy.drawPixel(i*4+2,j*4+4+2,WHITE);
arduboy.drawPixel(i*4+3,j*4+1+2,WHITE);
arduboy.drawPixel(i*4+3,j*4+3+2,WHITE);
}else{
arduboy.drawPixel(i*4+2,j*4+2+2,WHITE);
}
}else if(wallPhase==2){
if(illuminatedRow>=i){
arduboy.fillRect(i*4,j*4+2,4,4,WHITE);
}else{
//arduboy.drawRect(i*4,j*4+1,4,4,WHITE);
arduboy.drawPixel(i*4,j*4+2,WHITE);
arduboy.drawPixel(i*4,j*4+2+2,WHITE);
arduboy.drawPixel(i*4+1,j*4+1+2,WHITE);
arduboy.drawPixel(i*4+1,j*4+3+2,WHITE);
arduboy.drawPixel(i*4+2,j*4+2+2,WHITE);
arduboy.drawPixel(i*4+2,j*4+4+2,WHITE);
arduboy.drawPixel(i*4+3,j*4+1+2,WHITE);
arduboy.drawPixel(i*4+3,j*4+3+2,WHITE);
}
}else if(wallPhase==3){
arduboy.fillRect(i*4,j*4+2,4,4,WHITE);
}
if(wallPhase==3 and (i==posx or j==posy) and j!=0){
//draw crosshair
arduboy.drawPixel(i*4+2,j*4+2+2,BLACK);
}
}else{
//dark mode

if(
(
(i==posx-1 and j==posy-1)
or (i==posx-1 and j==posy)
or (i==posx and j==posy-1)
or (i==posx+1 and j==posy+1)
or (i==posx+1 and j==posy)
or (i==posx and j==posy+1)
or (i==posx-1 and j==posy+1)
or (i==posx+1 and j==posy-1)
)

){
arduboy.fillRect(i*4,j*4+2,4,4,WHITE);
}

if(
(
(i==posx-2 and j==posy-2)
or (i==posx-2 and j==posy-1)
or (i==posx-2 and j==posy)
or (i==posx-2 and j==posy+1)
or (i==posx-2 and j==posy+2)
or (i==posx and j==posy-2)
or (i==posx and j==posy+2)
or (i==posx-1 and j==posy-2)
or (i==posx-1 and j==posy+2)
or (i==posx+2 and j==posy+2)
or (i==posx+2 and j==posy+1)
or (i==posx+2 and j==posy)
or (i==posx+2 and j==posy-1)
or (i==posx+2 and j==posy-2)
or (i==posx+1 and j==posy+2)
or (i==posx+1 and j==posy-2)
)

){
arduboy.drawPixel(i*4,j*4+2,WHITE);
arduboy.drawPixel(i*4,j*4+2+2,WHITE);
arduboy.drawPixel(i*4+1,j*4+1+2,WHITE);
arduboy.drawPixel(i*4+1,j*4+3+2,WHITE);
arduboy.drawPixel(i*4+2,j*4+2+2,WHITE);
arduboy.drawPixel(i*4+2,j*4+4+2,WHITE);
arduboy.drawPixel(i*4+3,j*4+1+2,WHITE);
arduboy.drawPixel(i*4+3,j*4+3+2,WHITE);
}
if(
(
(i==posx-3 and j==posy-3)
or (i==posx-3 and j==posy-2)
or (i==posx-3 and j==posy-1)
or (i==posx-3 and j==posy)
or (i==posx-3 and j==posy+1)
or (i==posx-3 and j==posy+2)
or (i==posx-3 and j==posy+3)

or (i==posx-2 and j==posy+3)
or (i==posx-1 and j==posy+3)
or (i==posx and j==posy+3)
or (i==posx+1 and j==posy+3)
or (i==posx+2 and j==posy+3)
or (i==posx+3 and j==posy+3)

or (i==posx+3 and j==posy+2)
or (i==posx+3 and j==posy+1)
or (i==posx+3 and j==posy)
or (i==posx+3 and j==posy-1)
or (i==posx+3 and j==posy-2)
or (i==posx+3 and j==posy-3)

or (i==posx+2 and j==posy-3)
or (i==posx+1 and j==posy-3)
or (i==posx and j==posy-3)
or (i==posx-1 and j==posy-3)
or (i==posx-2 and j==posy-3)
)

){
arduboy.drawPixel(i*4+1,j*4+1+2,WHITE);
arduboy.drawPixel(i*4+3,j*4+3+2,WHITE);
arduboy.drawPixel(i*4+1,j*4+3+2,WHITE);
arduboy.drawPixel(i*4+3,j*4+1+2,WHITE);
}
if(
(
(i==posx-4 and j==posy-4)
or (i==posx-4 and j==posy-3)
or (i==posx-4 and j==posy-2)
or (i==posx-4 and j==posy-1)
or (i==posx-4 and j==posy)
or (i==posx-4 and j==posy+1)
or (i==posx-4 and j==posy+2)
or (i==posx-4 and j==posy+3)
or (i==posx-4 and j==posy+4)

or (i==posx-3 and j==posy+4)
or (i==posx-2 and j==posy+4)
or (i==posx-1 and j==posy+4)
or (i==posx and j==posy+4)
or (i==posx+1 and j==posy+4)
or (i==posx+2 and j==posy+4)
or (i==posx+3 and j==posy+4)

or (i==posx+4 and j==posy+4)
or (i==posx+4 and j==posy+3)
or (i==posx+4 and j==posy+2)
or (i==posx+4 and j==posy+1)
or (i==posx+4 and j==posy)
or (i==posx+4 and j==posy-1)
or (i==posx+4 and j==posy-2)
or (i==posx+4 and j==posy-3)
or (i==posx+4 and j==posy-4)

or (i==posx+3 and j==posy-4)
or (i==posx+2 and j==posy-4)
or (i==posx+1 and j==posy-4)
or (i==posx and j==posy-4)
or (i==posx-1 and j==posy-4)
or (i==posx-2 and j==posy-4)
or (i==posx-3 and j==posy-4)
)


){
arduboy.drawPixel(i*4+2,j*4+2+2,WHITE);
}


}
//arduboy.drawBitmap(i*4, j*4, brick , 4, 4, WHITE);



}else{

//not walls
if(gameMode!=4){
//light mode
if(wallPhase==3 and (i==posx or j==posy) and j!=0){
//draw crosshair
arduboy.drawPixel(i*4+2,j*4+2+2,WHITE);
}
}
//arduboy.drawBitmap(i*4, j*4, checker , 4, 4, WHITE);
/*arduboy.drawPixel(i*4,j*4,WHITE);
arduboy.drawPixel(i*4,j*4+2,WHITE);
arduboy.drawPixel(i*4+1,j*4+1,WHITE);
arduboy.drawPixel(i*4+1,j*4+3,WHITE);
arduboy.drawPixel(i*4+2,j*4+2,WHITE);
arduboy.drawPixel(i*4+2,j*4+4,WHITE);
arduboy.drawPixel(i*4+3,j*4+1,WHITE);
arduboy.drawPixel(i*4+3,j*4+3,WHITE);
*/
}
}
}


//display level
//arduboy.fillRect(0,0,128,8,WHITE);

//if(wallPhase>1){
arduboy.setTextColor(WHITE);
arduboy.setCursor(0,0);
arduboy.print("level: ");
arduboy.print(level);
for(int shdw=0;shdw<124;shdw+=2){
arduboy.drawPixel(shdw,8,WHITE);
}
arduboy.drawLine(0,9,123,9,WHITE);
//}


//draw player
/*
arduboy.drawPixel(posx*4,posy*4+1,WHITE);
arduboy.drawPixel(posx*4,posy*4+2,WHITE);

arduboy.drawPixel(posx*4+1,posy*4,WHITE);
arduboy.drawPixel(posx*4+2,posy*4,WHITE);

arduboy.drawPixel(posx*4+3,posy*4+1,WHITE);
arduboy.drawPixel(posx*4+3,posy*4+2,WHITE);

arduboy.drawPixel(posx*4+1,posy*4+3,WHITE);
arduboy.drawPixel(posx*4+2,posy*4+3,WHITE);
*/
if(blinkPlayer==1){
arduboy.fillCircle(posx*4+1,posy*4+1+2,3,WHITE);
arduboy.fillCircle(posx*4+1,posy*4+1+2,1,BLACK);
}else{
arduboy.fillCircle(posx*4+1,posy*4+1+2,3,BLACK);
arduboy.fillCircle(posx*4+1,posy*4+1+2,1,WHITE);
}
/*
if(blinkPlayer==1){
arduboy.drawPixel(posx*4+1,posy*4+1,WHITE);
}
if(blinkPlayer==2){
arduboy.drawPixel(posx*4+2,posy*4+1,WHITE);
}
if(blinkPlayer==3){
arduboy.drawPixel(posx*4+1,posy*4+2,WHITE);
}
if(blinkPlayer==4){
arduboy.drawPixel(posx*4+2,posy*4+2,WHITE);
}
*/
blinkPlayer++;
if(blinkPlayer>16){
blinkPlayer=1;
}

if(illuminatedRow<MAZEHEIGHT+1){
illuminatedRow++;
}else{
if(wallPhase<3){
wallPhase++;
if(wallPhase==2){
illuminatedRow=0;
}
}
}



}

bool readPixel(uint8_t i, uint8_t j){
uint16_t Data = Maze[i];
byte Hi = (Data & 0xFF00)>>8;
byte Lo = Data & 0x00FF;
if(j>7){
return bitRead(Lo, 7 - (j % 8));
}else{
//j=j-8;
return bitRead(Hi, 7 - (j % 8));
}
}





void generateMaze(){
bool alternate=false;
for (geni = 1; geni < MAZEHEIGHT-1; geni++) {
if(!alternate){
Maze[geni] = 0b1100000000000001;
}else{
Maze[geni] = 0b1101010101010101;
}
alternate=!alternate;
}
genmod = 4;
for (geni = 2; geni < MAZEHEIGHT - 2; geni += 2) {
for (genj = 3; genj < MAZEWIDTH - 1; genj += 2) {
Maze[geni] |= (0x8000 >> genj);
do{
//Roll a stick
arduboy.initRandomSeed();
//randomSeed(analogRead(A4));
//randomSeed(analogRead(A4)+readVcc());
//genval = (uint8_t)(analogRead(A0) & 0x00FF) % genmod;
genval = (uint8_t)(random(10000) & 0x00FF) % genmod;
//val = analogRead(A0) % mod;
genx = 0, geny = 0;
if (genval == 0)geny = 1;
if (genval == 1)genx = -1;
if (genval == 2)genx = 1;
if (genval == 3)geny = -1;
}while ((Maze[geni + geny] & (0x8000 >> (genj + genx))));
Maze[geni + geny] |= (0x8000 >> (genj + genx));
}
genmod = 3;
}
}



/*
void drawMazeSerial(){
uint8_t i, j;
bool dot;
for(i=0;i<=MAZEHEIGHT;i++){
for(j=0;j<=MAZEWIDTH;j++){
dot=readPixel(i,j);
if(dot){
Serial.print("*");
}else{
Serial.print(" ");
}
}
Serial.println();
}
}
*/
Loading