From 96f1a8367ff15418bfb6fb06a4785984b9325dae Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Thu, 12 Dec 2024 23:06:06 +0100 Subject: [PATCH] redraw a bunch of sprites, tweak some ui colours --- README.md | 4 ++-- assets/tiles/bag_off.png | Bin 200 -> 0 bytes assets/tiles/bag_on.png | Bin 190 -> 0 bytes assets/tiles/button_off.png | Bin 0 -> 188 bytes assets/tiles/button_on.png | Bin 0 -> 175 bytes assets/tiles/flipper_off.png | Bin 209 -> 240 bytes assets/tiles/flipper_on.png | Bin 200 -> 240 bytes assets/tiles/silo_off.png | Bin 0 -> 223 bytes assets/tiles/silo_on.png | Bin 0 -> 300 bytes assets/tiles/trigger_off.png | Bin 147 -> 0 bytes assets/tiles/trigger_on.png | Bin 148 -> 0 bytes assets/tiles/wire_cross_off.png | Bin 189 -> 168 bytes assets/tiles/wire_cross_on.png | Bin 188 -> 168 bytes assets/tiles/wire_horizontal_off.png | Bin 126 -> 111 bytes assets/tiles/wire_horizontal_on.png | Bin 125 -> 110 bytes assets/tiles/wire_vertical_off.png | Bin 136 -> 124 bytes assets/tiles/wire_vertical_on.png | Bin 127 -> 124 bytes src/editor.rs | 4 ++-- src/marble_engine.rs | 1 - src/marble_engine/tile.rs | 6 +++--- src/theme.rs | 3 ++- src/util.rs | 2 +- 22 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 assets/tiles/bag_off.png delete mode 100644 assets/tiles/bag_on.png create mode 100644 assets/tiles/button_off.png create mode 100644 assets/tiles/button_on.png create mode 100644 assets/tiles/silo_off.png create mode 100644 assets/tiles/silo_on.png delete mode 100644 assets/tiles/trigger_off.png delete mode 100644 assets/tiles/trigger_on.png diff --git a/README.md b/README.md index 135de52..366d445 100644 --- a/README.md +++ b/README.md @@ -92,12 +92,12 @@ logic mostly like https://git.crispypin.cc/CrispyPin/marble ### intro, basic mechanics - output a zero (marble, io) - output multiple numbers in sequence (digits) -- output zeroes forever (looping, trigger, bag output) +- output zeroes forever (looping, button, silo output) - copy the input (input) - copy only odd input numbers (comparator, math, flipper) ### 0-terminated list processing - copy the second list -- calculate list length (math, bag input) +- calculate list length (math, silo input) - count instances of 5 in a list - reverse a list (bouncing) ### user-friendly numbers diff --git a/assets/tiles/bag_off.png b/assets/tiles/bag_off.png deleted file mode 100644 index c270af5fd5324039b11f9c60c6945b364be4d3ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|{hlt4AsQ2t|7;BJX%snd=)i%3 zAAiK7o#*YC$yaej*UO$E@EFHNM&Ht;L{Vnu!+-vnnb`91@c8TqQ8rd!Sk%+0!k=)R zp`3HpWQ7LSv#J8FC%i8HIoxvp?uFVdQ&MBb@0JUgLbN~PV diff --git a/assets/tiles/bag_on.png b/assets/tiles/bag_on.png deleted file mode 100644 index 9630dabb9893ef0d21fda59dd46c8b1e6e5f6dfb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|t)4E9AsQ2t|7;BJX%snd=)i%3 zAAiK7o#*YC$yaej*UO$E@EFHNM&GZETU>c~c=$Fyy70vS2p$IYo@rp{FjAXj(-6yi zM>WH*i9yU{x`T+Kw(Dnp;kxqVuF0?2W8NJTNk2H{@MHNmeutjQ&yo7Tti~2G=W(Gq mi^CMde>b$<{2nRGF))aK^Zd>rBys`hAO=rYKbLh*2~7Z1B15GB diff --git a/assets/tiles/button_off.png b/assets/tiles/button_off.png new file mode 100644 index 0000000000000000000000000000000000000000..9998e45f3907c2c671d51cc1a33b37b0b9756e71 GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`&7LlfAr`$?C+!wIpupqo+vm7P z*mQ9~rASuUCpAx2M&(a0g{JOOkKSi|@%_^YGlOnT)K?O|&m*n1lqZ3Mk+0Y+rrE5a zMzHXnlUasz#IfiXzRhM1p`A0A`>t@Dx~h+Nm7~j%GashRYgCVE)Xwcc*?LROxc`tP Y$-?}__4dV24GYO>7K@*LQjrpXlV zP=T7h>}4h@CvIWnLg}_&0r&mzA7Iwl(JyL==>B+~j)&{*T;ZmE5zNR5iME4NXc&F+ z5K)uUbqUsN?N^+B40doSOoGxNueQ0{4lazInfYR61%T>GM@^D40030F18vwK*djik|wV-1OG;9ZBANSAv-}cK>|7@AU$pO<1aMBI%F- O0000nGSf=ElNKCQN{?d z0irswunMc{`TcDWJq!#COmNk339PE&%9tP=xY=lW;9R%@Cb%4?9!%9J8qoA$RgJCz zQyMcE&@~VQ=o)Z&8oLH$cjF2-CakK_7|41Uf9w@QP868FL@rjnDE$Bv11!$5szw%s jC}aGwSB#v*M?3%kui94?hE%yA00000NkvXXu0mjfhmA}K diff --git a/assets/tiles/flipper_on.png b/assets/tiles/flipper_on.png index 7da4ad913cb853e7199c1af856fd2fabd47ac7ff..ae6038c842221c7a801cdcc5d5ed04f7ba0e9020 100644 GIT binary patch delta 212 zcmV;_04x8<0q_BkB!9O_L_t(2kz@R^SB!xaz{0@5aQOTeTSK1I1@3s%%}&?}QN{?d z0j@eKtC)d-VcE1^G&V#J0|NsSrfM_*7lbHd!j!nGSf=ElNKCQN{?d z0iyaq+9Ir~9cINr^e`|mFu_&BC9tZ7D`SFi;AW%gfpg&snBa1ldN5U^Xh740RW-T> zOlizuK-WMJpliV8Y3v%1-Hj{Un6RowV<78c!lfFQ9wr7@oF!wbMiYc6WBjpKjGV+r aJOBXvJ5@`vH~LBd0000vak*#B%gf9CC1&lf`+G`3Q?oPa#-pR%l9GwD zHfB0q>)}&TRh8`N?Uj_+x@F71$CrA1m3JxnEVSu8~S$J9xOEkcH UpO~B>2y`)nr>mdKI;Vst03gd!rvLx| literal 0 HcmV?d00001 diff --git a/assets/tiles/silo_on.png b/assets/tiles/silo_on.png new file mode 100644 index 0000000000000000000000000000000000000000..d3c62de31ad1223164815710c3c095652d85b216 GIT binary patch literal 300 zcmV+{0n`48P)_n0vr)AWdEN zO$2zit&dZFgz5vDZ4@#F%Cr?e&TdB`A*h2jb&0le93&BO&r{=z^Ihdlg)d_d?#k!1 y6^t>;PgVGoAuN=(;$vfsg2Z1)%|+Mrzw`+}Z(XyNGNGRU0000ZQ{_TNpfD{an^LB{Ts5x?C|n diff --git a/assets/tiles/trigger_on.png b/assets/tiles/trigger_on.png deleted file mode 100644 index f7308008edea2b3c9182f1b4b6bfa518fc308c45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 148 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`(Vi}jAr`&K2@;oTG8i5j^p(nZ=U6hC$=fw_SwXEgh8xk u(vCU47g%r1={>D|rPs}=Ey3I4FwpFbZHitsw+o$tOa@O^KbLh*2~7YqyfX9v diff --git a/assets/tiles/wire_cross_off.png b/assets/tiles/wire_cross_off.png index 3b582cab65a7a4a6262e287ac07a48ee8c5cf61f..b511c348ad342e11b110f2de81148d11cad1d715 100644 GIT binary patch delta 140 zcmV;70CWGn0jL3xB!6#7L_t(Ijm?t52>>As1SeuOeyu0fr5e)!C}&INeVqUR002ovP6b4+LSTa5Q8;h_ delta 161 zcmV;S0ABy70lfi`B!7fSL_t(IjbmiM0k$8%@E@7)X=%WSO&wOju&}WI*u+<@T7{t= zs{y3AfC-lY!~*IVfbQpfq{X+J30kJ z4yFgE7hsyv*;u_m3BYLpva_*y0R>X_l3Sk-A zFouY`H-K{s0QSoPhzJ|IMFCV%?NY##`~c7owi0)5wGT68wYPS#`~rC42DM9~GKwSt upd}gqoOMcO*i0hAejw5(03}T((hZqSDraZ`$&mm6002ovP6b4+LSTaL(=~no delta 160 zcmV;R0AK&80lWc_B!7cRL_t(IjbmiM0mSzF_>atg<-);;O&wOju&}WI*u+<@T7{t= zs{y3AfC-lY!~*IVfbQp delta 95 zcmd0=o1hZq>gnPbV$qwNAi;WtF)=am|H-R|H~sz5`v3Fq+Y;O4_d85dG_cj#A(9ho z#oqc}c5YLstgz;`BxZ})hSP3q8YVf&u!b-&um?-#)bfb9GXR07tDnm{r-UW|nNK7s diff --git a/assets/tiles/wire_horizontal_on.png b/assets/tiles/wire_horizontal_on.png index 4c5f82da63abf356bf07e518da86d523e25b2439..3a961668c72d1f50ae868a4d4cd3cd8402f5d535 100644 GIT binary patch delta 79 zcmb=;o1o%l>gnPbV$u6{!bV;O1)jq(M`kBJ`QN)y=Hb?RZ#^0hPF~U*t;P^g8`zkd j(oh>0b8y~^YwQemyY=~c=g#Cf%K!wPu6{1-oD!MEs@A<{00K`}KbLh*2~7a}4%h&6=ADU$5 zf;lIM2vAkyzCAji8+P3z@FyGCzy@A`>&{;toN#6jAU32tsQ>@~07*qoM6N<$f=fFl Aa{vGU delta 106 zcmV-w0G0oIhyjo!WKT&%K~y-6V`RVqwjaOnADQoIX~2k09ah1xu(1Ew#8<6ag`pm+ z0i?Kq36}xHf82au>aV^SFKuwp&qLN zq_}_ymjT3rL2f|Uh7yLb4J8BU0=gJ5nhpj-W&!{%8ygSRJD&&u0000 dir.arrow_tile_texture_name(), Tile::Button(state) => { if *state { - "trigger_on" + "button_on" } else { - "trigger_off" + "button_off" } } Tile::Wire(wire, state) => { @@ -193,7 +193,7 @@ impl Tile { let root = match tile { PTile::Gate(gate) => gate.texture_name(), PTile::Math(math_op) => math_op.texture_name(), - PTile::Silo => "bag", + PTile::Silo => "silo", PTile::Flipper => "flipper", PTile::IO => "io_tile", }; diff --git a/src/theme.rs b/src/theme.rs index 137ede1..6d9cdc8 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -3,9 +3,10 @@ use raylib::prelude::*; pub const BG_DARK: Color = gray(32); pub const BG_MEDIUM: Color = gray(48); pub const BG_LIGHT: Color = gray(64); -pub const BG_WIDGET: Color = gray(96); +pub const BG_WIDGET: Color = gray(64); pub const BG_WIDGET_ACTIVE: Color = rgb(80, 120, 180); pub const FG_MARBLE_VALUE: Color = rgb(255, 80, 40); +pub const FG_TOGGLE_ENABLED: Color = gray(200); pub const fn widget_bg(highlight: bool) -> Color { if highlight { diff --git a/src/util.rs b/src/util.rs index e0baf10..98dd8cb 100644 --- a/src/util.rs +++ b/src/util.rs @@ -68,7 +68,7 @@ pub fn simple_toggle_button( y + margin, width - margin * 2, height - margin * 2, - BG_DARK, + FG_TOGGLE_ENABLED, ); } if hover && d.is_mouse_button_pressed(MouseButton::MOUSE_BUTTON_LEFT) {