From 5b638fe4bceb25e4579ad06ae9c35cc906657b84 Mon Sep 17 00:00:00 2001 From: sautax Date: Sat, 18 Aug 2018 19:54:54 +0200 Subject: [PATCH] edit mode --- binaries/game_of_life/game_of_life.bin | Bin 54796 -> 55092 bytes game_of_life/game_of_life.ino | 43 +++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/binaries/game_of_life/game_of_life.bin b/binaries/game_of_life/game_of_life.bin index 75b3942df760073ad9b6c7f51d857f68012f8850..ee2dcc7013cc3139d5f307123cfe94f67fb3209b 100755 GIT binary patch delta 5066 zcmai23s{uL)jsp>F6@#l7X{_Az_QC7MHE5AKeD@WUlk?Ms)>RI6-+dnh!ss6utr0p zRdm#-F{z1|kY8<)52#fzXf8ERweB`*G>H|{Cd4)-Yg2zv!2RFZWgC<9dHV6Z-!hfKa^fRv#t*IdTWd)D95LG)7UGF2>2LVC<6E>6)Jv1cS@ad0r zcK!#R@U!O9k9CLqD=^Tu-x&P%Gt!GN8bY>xoUCaGVblmt1J|;!=*GeFSuDdey4PVE z-)i~Rp(td|ef_r1uKahQlO^Y|k*roU9}FgPwryzMIW1AgoQ-{yc*oACChClp6vNVu z<&v}F4kc>rTdff_l%le4vCgZ{NoJSXxOsJnIz^1+e8eq(VMx9aa!O`)mM!EG_F=XU+viRvLwZemMz+nB@mLYJ_}gi_(wL~5SM1|_VL%Zz!jWd1Q?V$|jI$uEfz;Q*pj!&(={6td(f*`vmZGr7>!cKe-Pj$kqc}3IoMkPX3JsRwX^36`L}5S(u&TzUmQCPcBqA z&$%YKmtmAUTg>6={mVT{IKloJs^Ao_csXO*-uW5UQgY10;yByyjcb|Mf-Gk$oS*fZ zQonYv2{Xp@I3nHFwQ2T5T}qL{dEj1XaoE)1l^^@+FUHhM#?Kb8v57iOi^6%PpA4@p zSX2)eKW#D2HG7yjJkaIMxQSXqWeD>>LH*45Rohatpd)#sd*OP;=4$i;4A;rH(rr> zERyt%Kr8S%&pMP$>0&^4?*ynd-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1ske<2jPY@ySpF z)B-DjqHpvy&}j;k=g+ 0) { + pointer[1] -= 1; + } + } + if (gb.buttons.pressed(BUTTON_RIGHT)) { + if (Emode && pointer[0] < 80) { + pointer[0] += 1; + } + } + if (gb.buttons.pressed(BUTTON_LEFT)) { + if (Emode && pointer[0] > 0) { + pointer[0] -= 1; + } + } + if (gb.buttons.pressed(BUTTON_A)) { if (Emode) { + if (grid[pointer[0]][pointer[1]]) { + grid[pointer[0]][pointer[1]] = 0; + } else { + grid[pointer[0]][pointer[1]] = 1; + } } else { if (Play) { @@ -103,6 +130,18 @@ void loop() { gb.display.drawPixel(x, y); } } + if (Emode) { + + gb.display.setColor(PURPLE); + if (fCount % 2) { + gb.display.drawPixel(pointer[0] + 1, pointer[1]); + gb.display.drawPixel(pointer[0], pointer[1] + 1); + gb.display.drawPixel(pointer[0] - 1, pointer[1]); + gb.display.drawPixel(pointer[0], pointer[1] - 1); + } else { + gb.display.drawPixel(pointer[0], pointer[1]); + } + } /* // debug hud