From 5a1088d44cf665852afb6b2af367a57f67af21d1 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Thu, 3 Sep 2020 20:45:51 +0900 Subject: [PATCH] Refactor image data to be tied to IDs --- base64/complete_star.png.64 | 1 + base64/home.png.64 | 9 ++ base64/incomplete_star.png.64 | 1 + complete_star.png | Bin 0 -> 845 bytes game.js | 199 ++++++++++++++++++++++++++-------- home.png | Bin 0 -> 474 bytes image_data.js | 110 ++++++++----------- incomplete_star.png | Bin 0 -> 823 bytes 8 files changed, 207 insertions(+), 113 deletions(-) create mode 100644 base64/complete_star.png.64 create mode 100644 base64/home.png.64 create mode 100644 base64/incomplete_star.png.64 create mode 100644 complete_star.png create mode 100644 home.png create mode 100644 incomplete_star.png diff --git a/base64/complete_star.png.64 b/base64/complete_star.png.64 new file mode 100644 index 0000000..23b7760 --- /dev/null +++ b/base64/complete_star.png.64 @@ -0,0 +1 @@ +iVBORw0KGgoAAAANSUhEUgAAACAAAAAfCAYAAACGVs+MAAAACXBIWXMAAAEvAAABLwGpNvipAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAtpJREFUSIm9lk9IFHEUxz/urtVWq2KIaeDBEjQNDEGQQtjMctVEo0sK2S0oiv5QBEHWzWMHIwrKtKPapYSkiLp16xIdUqNk2YqWoFJX0+11mJn1NzOrzszGPngwv5nf+36/897v/X4/8G5hIA68AUIZ4Hi2l4Dofirb5CFgUREwnm0BXQq5AAt4LIPPo4CIZbwROOQRy5N9xpwBAYayRV5jkObkmATEgYBbMC8laDUeWiJQVJR6vw3Ylw0Bqfq3t0Nrm+lbhwc8V2Zqv8lpZOyxqQxTbgGNmpUpzwtAwjJvXiduAjYAVFZCeTkUF0MwCAktYidwEpgDcoGt+vwtaJ2yGdgEBIG/6Av3EfYVva6fv4AkRfO2dvfxusd8QKfbtAFElJ2g0xMCAHE/sIyW2hynUY2NcL0PfPoSrtoN0SgEAlBWBpVVWolqa6F2L8RiqRKp9go4Zgz2A9Mo6cnLQ+4/0FKcWETiP1bcSP16HvuKtERsaf8DXCVNBwaBfiCpBhxuQWaizkkNfzaBlJTYyD8CDetluBmYUQMLCpChYWfEcwnk7DnbLinAMFpXOLIC0nRHdw8yv7A6+eISUl9vI44DR50SW60L+KYCDj5cXcCnGRv5C2CHV3LDtqNtTgLI0/G1S1BRYRLQmyk5QCPKWlBLsJREfv42C+i7YRLw/H8IGDAAT/SuEL17j1RXIz4fcvrMirAPU6YFuAyUZkLuB75gSf/IKBIKmetdV6cdTklBGhpM3y5lIiBsABUWIrPzyOUraVtMAMnPR0bHkIHbpvdvMxFwxwA60oEcaLKRRoFbaKlO3ZK6e2wia7yQB1BaMM1fvwaK9blhlFKl8X4vAprXALyLdt6rVgRMrDI/iofb1700QLPA8TVi/MBNLOeJ7mE35LnAdwvAJLDHYfxBLDsoWtYc2y5L8BO088GNlaKd+QbGqJtgHzAC/AKu4eKyYjE/cBEYBMrTTfgHo1Aet0iykSUAAAAASUVORK5CYII= \ No newline at end of file diff --git a/base64/home.png.64 b/base64/home.png.64 new file mode 100644 index 0000000..4761006 --- /dev/null +++ b/base64/home.png.64 @@ -0,0 +1,9 @@ +iVBORw0KGgoAAAANSUhEUgAAABcAAAAgCAYAAAD5VeO1AAAACXBIWXMAAANcAAADXAG0iWi0AAAA +GXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAWdJREFUSInt1LtKHVEYxfGfekCL +GC9oUIMgxCJqjJdGzQPYpRDfIfgIYqwk5BmstNdKo8ZbJYIg2GihbUhAbHyBiKY4s3EYZuKc41gI +Lhhmr836/mvYbIb8+oQzDFUwk0vj2MTb6D1YFHgU63gV+eaiCkbxA42J/VDwoVrwSAY4WTBQKXj4 +AXBQC7bQXyn4dc58O/byFAxhJ/qiShQK+rICH7FbBThesJ9WEMCtVYKD3mAbvWHjPX4WAE4WvKvB +JZpwi9oocPvIgjr8LeE3ZnHxSGBc9dgsReYSvwqEN3B/DE+iUmw9gKWM3A0+4zrys5jKyB7iaxLe +hiN8TxlYVP4rBngP5pT/73F1YCGYJz2WF3iqSgnfjcmUXFvK3hg6E3tNWfBznCjfhKQ2cBXzq5jI +yC6HRQ2OMY/TlGC1asBZ8liyNI2ZmL/DNxz8bygvvAcrWIv8F3Q9NPR8r+ILPFO7yler6OfPP5uV +S4au/teuAAAAAElFTkSuQmCC diff --git a/base64/incomplete_star.png.64 b/base64/incomplete_star.png.64 new file mode 100644 index 0000000..5b5f692 --- /dev/null +++ b/base64/incomplete_star.png.64 @@ -0,0 +1 @@ +iVBORw0KGgoAAAANSUhEUgAAACAAAAAfCAYAAACGVs+MAAAACXBIWXMAAAEvAAABLwGpNvipAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAsRJREFUSIm9l+tu2zAMhT/fEqdJ13brNmDv/2zDLsXWrInjNna8HzysVddOHBcoAUGwQpGHhxSlJEyXHPgGXAAF0EwxEr8BwDWQAnNgOdXIVACxHOdAgrEwSdKJ+3IgAmYY9blAHc41NJWBhQB4CiKBOFveAiCT40x2JqVhCoAZFvksWMsEIHoPAIsASAnUWBq8MN8FQKKxE4gZFv3ZaTgXgEfpkZYC4QV5NoC0M4Mdq25X87Xw+O2BCktBI1B7YBXsj6XfNwA2KXCrTWPFo90E4DwNyN6p/ZH2XThtMe3ZdqOhhN8eVRms7bT/OnDSncPId8AWqFNgDdxo8ZKXx2tIHjVcCiwF3hlrrXtn9NQdgAfgSQHcRYHCLUbtArtcGuBeSEP0oeFTkgAfZX8v55Xsrl0BLT7ISaLoMqw25kJ7oL9AhyQHPmOsbGV/D/zS9zPCUEo5n2E0NRgjKwHYj3AcYbVwoz1r2dzIeRUqdwEghY1+iwNAS4yVsmdP6PwLVtgl8E/2fgvIK/b6ACDFAmNhrhkZrhhmIsWiLxRECfwI9r+SU52wAL7zkv56WP0ZXKbvzQn9Ua3Yr925gDx2fu/aKLQnYcRTbcyLaBkACB+fGfBJ8wY7Wp66K+nXAjLIwhgGLmhvu0JrC6zYEizPK+CrAqpoa8cDGJShInTJgQ8yEmNRXmFHrMYq298EuYBUGksBibAeMAnAlQxfYrlfybAfsT1GfypnM9rbMNN8wJjrTcMxABGW41zDC2urUQI/ZbyUjkfs7wJ/tBwY6B/HACwU+VIROuVPGKV3tHdCJVAedY2xEeu3GGPsLAAh/ZWcV3K87tFvaHt8RnufxFiqSjpt+BiAkP5G6J8wyo+1YmjvE++gfjIaLB2jAGQYA42MFfRcJEfEU+LvA7C0bLuKQwAOtEV3D/zh/H+/DXZCDnL+l553xH8mgs8otmSPSAAAAABJRU5ErkJggg== \ No newline at end of file diff --git a/complete_star.png b/complete_star.png new file mode 100644 index 0000000000000000000000000000000000000000..c8801fc5d78b005168c7248ff9edf794454f7529 GIT binary patch literal 845 zcmV-T1G4;yP)@~8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10@_JL zK~zYIy_Qc%6mb;CKkly8R;yx&Y2d*UGz|Kk#m0 zAP&3%LK)zAwwHkDek$AKAz)DvFrIAzT?)AX3wSJp&!d2dWxNqM05^fJXdCFzsYH2?6Ii~ zQ*Hr`nw2Tf3qZm$Z(b*E0yY3tRzi6>6cCvXy&19E|_`ur_uow6C&1O$P< z=nMA|_7%OZpTB@4Mf0|H_wl;Nd_bq$v;jnvouJbb0swJ8u#A@49H&u@jc~mWeEJfu z+6~bt1OiZ229;G>iE3-1b}z(YsS>I73OHsA_5;%>>B-AO?my5{oLEHSKUUmG{dykz zinK&*Y5xOUB~1qgfqo#V1{`idW}?nX4SzO)l$6-WKLQQwWw;rbQ3DGKkfC8`#B&Mc z>^a*mDZnsVS2(f)(sW064>G^7I{D%fQeST)jsr)X5?iec_@)95K3rYErx_dh3t)#= za>KTxZB7En)A6-SP*GtL(3>eaKqJapP)o3sM1KA@3+TIH67c+g2pBK`PxP)3y?c*T zS0g?ja{A1Qun$wF1-J~9W9}GCzuk+t0) { BOT_TAPE=BOT_QUEUE[0] } else { - BOT_TAPE="BR" + BOT_TAPE=ConvertNumberToTape(Math.floor(Math.random()*1000)) } BOT_X=gameStage.start.x BOT_Y=gameStage.start.y @@ -173,6 +187,12 @@ function runGameSimulation(){ } gameState=RUNNING MESSAGETIMER=new Date().getTime()+3000 + for (var i=0;iw) { + finalText.push(arr[i]) + } else { + if (finalText.length===0) { + finalText.push(arr[i]) + } else { + finalText[finalText.length-1]+=" "+arr[i] + } + } + } + for (var i=0;i(canvas.width*0.75)-48) { - screenText.push(quotearr[i]) - } else { - if (screenText.length===0) { - screenText.push(quotearr[i]) - } else { - screenText[screenText.length-1]+=" "+quotearr[i] - } - } - } - for (var i=0;i5*5) { + ySpacingMult=(24*5)/(Math.ceil(BOT_TAPE.length/5)*24) + } + for (var i=0;iwidth-24) { xOffset=0; - yOffset+=24; + yOffset+=24*ySpacingMult; } } } @@ -1336,7 +1441,7 @@ function RenderMenu(ctx) { button.y=buttonY button.w=32 button.h=32 - buttonX+=48 + buttonX+=47 } } } diff --git a/home.png b/home.png new file mode 100644 index 0000000000000000000000000000000000000000..4a4f6c4310c79b7acf486e37c9458e057aecd146 GIT binary patch literal 474 zcmV<00VV#4P) zK~zYI?bN$U9Z?v?@t=A?ix@9xP=g@EB5I76M$H4*r4ZjC_y}UGB;*;awAV_b##<$V zAlPW3ZAd_De1V9jIJ0pWX5yUVSO_i{X0Ofq{%hE5hWz@3GYnNQlS|{+#M|gSSQK~^ z>v$FU=AsHl@dJ&C{ZR0sTJT5)I9V`IDR}q+a8L`j&|fL|bw^@~8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10>nu~ zK~zYIy_f55+b|4;Ki?9kN!NDkHem1nY{M?a)~t!+Hg>!pJgimMP8=5~0YR`rk%xyA zr6f$39QX!Y00q!YF%rK4z%`Hpb6`2u$W#Ea9OpoSu`o%}iTiRO0%jQXxj-GxH8hoh zg#dU8B7rzt-U1+#<4krYrC|zy85a30Sjz+;dJh1L07wbcSQ@-A-vvOTu@i_H7X8_2 zI2V9N>5-NK;RSg%fV4A%9jk6v^R@8!?STqQK_gImU={3-rQbIIHYsqcO=HEQ-2~t~ z4anZ9{gL)vIBhZQ*>2{ zQ=PB?zVnj)dRYA#T&C~M3H?#6*stBWfIN17@7gG|Ct<`>ZOn^k82|_$pBeB;^9DOw zp1LdP*8(!g!WafFXm7hhYYVK{5-iUv;Hv_vXlus<7?hzRbjg7aG7@7^USUV9#wy$2 z1i64z8cP9*upTf8z?BSNV!2<*uphBKMt>@2GuqoQ(|o{~>rKNk01=ksT*C`%t5E_! zWxSM*N9^wcf3zGJ=pV-bEEM@t5jy2h7^Qc#cS0pl9(9ee5$m@YW9%#dA^nw{S8}}W z(Qjybd`5ep#8|3II&JtEfRO%1=$|mkkF{cG?-TE!eli*?9isqb7z2%r74%#rN5oU& z?*p*3Y`cm>01mW8cMtsG{C~d