From b73c59a7d9ba2ddcc6dd8eeb7ed9ae96d6ae6681 Mon Sep 17 00:00:00 2001 From: duncathan Date: Fri, 28 Feb 2020 07:04:44 -0600 Subject: [PATCH 1/3] shrink objectives into a stepper, and make steppers good --- src/lib/luigi/widget/stepper.lua | 6 ++++++ src/ui/draw.lua | 31 ++++++------------------------- src/ui/settings.lua | 12 +++++++----- 3 files changed, 19 insertions(+), 30 deletions(-) diff --git a/src/lib/luigi/widget/stepper.lua b/src/lib/luigi/widget/stepper.lua index 40b8ab2..cdc2668 100644 --- a/src/lib/luigi/widget/stepper.lua +++ b/src/lib/luigi/widget/stepper.lua @@ -102,5 +102,11 @@ Contains the index in `items` of the item being displayed. if self.flow == 'x' then increment() else decrement() end end) + self:onChange(function (event) + if self.value == "override" then + updateValue() + end + end) + updateValue() end diff --git a/src/ui/draw.lua b/src/ui/draw.lua index 1f5bfbe..b5910af 100644 --- a/src/ui/draw.lua +++ b/src/ui/draw.lua @@ -23,26 +23,15 @@ function C:loadSettings(puppy, obj, seed) settings.puppy.value = puppy if obj == "objBadEnd" or obj == 1 then - settings.bad.value = true - settings.norm.value = false - settings.boss.value = false - settings.best.value = false + settings.objective.index = 1 elseif obj == "objNormalEnd" or obj == 2 then - settings.bad.value = false - settings.norm.value = true - settings.boss.value = false - settings.best.value = false + settings.objective.index = 2 elseif obj == "objAllBosses" or obj == 3 then - settings.bad.value = false - settings.norm.value = false - settings.boss.value = true - settings.best.value = false + settings.objective.index = 4 else - settings.bad.value = false - settings.norm.value = false - settings.boss.value = false - settings.best.value = true + settings.objective.index = 3 end + settings.objective.value = "override" if seed ~= nil then settings.customseed.value = seed or "" @@ -65,15 +54,7 @@ layout.go:onPress(function() Randomizer.customseed = settings.customseed.value:gsub("^%s*(.-)%s*$", "%1") -- trim any leading/trailing whitespace end - if settings.bad.value then - Randomizer.obj = "objBadEnd" - elseif settings.norm.value then - Randomizer.obj = "objNormalEnd" - elseif settings.boss.value then - Randomizer.obj = "objAllBosses" - else - Randomizer.obj = "objBestEnd" - end + Randomizer.obj = settings.objective.value Randomizer.puppy = settings.puppy.value C:setStatus(Randomizer:randomize()) diff --git a/src/ui/settings.lua b/src/ui/settings.lua index bacce45..ef00c49 100644 --- a/src/ui/settings.lua +++ b/src/ui/settings.lua @@ -14,16 +14,18 @@ return { style = 'dialog', }, { { type = 'label', text = 'Objective', minheight = 32 }, - { type = 'radio', group = 'objective', text = 'Bad ending', id = 'bad', minheight = 27 }, - { type = 'radio', group = 'objective', text = 'Normal ending', id = 'norm', minheight = 27 }, - { type = 'radio', group = 'objective', text = 'Best ending', id = 'best', value = true, minheight = 27 }, - { type = 'radio', group = 'objective', text = 'All bosses', id = 'boss', minheight = 27 }, + { type = 'stepper', id = 'objective', align = 'center', width = 200, + { text = "Bad ending", value = "objBadEnd" }, + { text = "Normal ending", value = "objNormalEnd" }, + { text = "Best ending", value = "objBestEnd" }, + { text = "All bosses", value = "objAllBosses"} + }, }, }, { flow = 'x', { type = 'text', id = 'sharecode', width = 350 }, - { type = 'button', style = 'dialogButton', text = "Import Sharecode", id = 'importshare', width = 180 } + { type = 'button', style = 'dialogButton', text = "Import Sharecode", id = 'importshare', width = 180, align = 'center' } } }, { style = 'dialogFoot', From ff6701d60ca16699bb1b68636d4d28e3eba4eb91 Mon Sep 17 00:00:00 2001 From: duncathan Date: Fri, 28 Feb 2020 07:22:56 -0600 Subject: [PATCH 2/3] adds mychar selector to settings menu UI --- src/assets/icon/Curly.png | Bin 0 -> 1300 bytes src/assets/icon/Frog.png | Bin 0 -> 1260 bytes src/assets/icon/Kanpachi.png | Bin 0 -> 1276 bytes src/assets/icon/King.png | Bin 0 -> 1287 bytes src/assets/icon/Quote.png | Bin 0 -> 1286 bytes src/assets/icon/Sue.png | Bin 0 -> 1294 bytes src/assets/icon/Toroko.png | Bin 0 -> 1284 bytes src/ui/settings.lua | 10 ++++++++++ 8 files changed, 10 insertions(+) create mode 100644 src/assets/icon/Curly.png create mode 100644 src/assets/icon/Frog.png create mode 100644 src/assets/icon/Kanpachi.png create mode 100644 src/assets/icon/King.png create mode 100644 src/assets/icon/Quote.png create mode 100644 src/assets/icon/Sue.png create mode 100644 src/assets/icon/Toroko.png diff --git a/src/assets/icon/Curly.png b/src/assets/icon/Curly.png new file mode 100644 index 0000000000000000000000000000000000000000..75c73a4fb4cb750542890bcf0aa3e87ab2d07dae GIT binary patch literal 1300 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WMyDrW(e>JaRrLoiK;R%?94uuK0(y&zn|C69@RPjEiXqfWs+51~S1*2dz z1cqw}EPCJaRn*jVREwW=07J_{iXTpRXw1{C>RZa5fTDTf3sSFS%9G=$S?T+ z$Oa6--`Q1x(au@m5n0T@z;_sg8IR|$NC66Fdb&75X%DN|wPBzNyFHE+-TOyxv&aj;MT1NKI2e0@a@E^%w3_azJaRrJqFbIgsS{eFHSh?ol|Nrm6BBR7;2#kmjxT#n-5tvUHN`m}? z|Br0I5d5886&UH91s;*b3=DjSL74G){)!Z!V5O&vV~Bl?itthNVpdUBYaZRWk!8f3-P_P%MR)_Lix>jF** zm-GH|;`KRmC5=@ulyk!KmZbZE!5V2S)0EQum+B{+m0CH^R+&L7!S%q^@5`SXRS4eU Y*WP4Ut+H+I7f^EaboFyt=akR{00uEyDgXcg literal 0 HcmV?d00001 diff --git a/src/assets/icon/King.png b/src/assets/icon/King.png new file mode 100644 index 0000000000000000000000000000000000000000..9673dbe6680e915574c656c183857e7e0fb6537c GIT binary patch literal 1287 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WMyDrW(e>JaRrKt%9filIOQu&`JC-HXYIlFuO0yfN5NHfYh=u>sen-B;3Op>?U4Q?} z@8;>A60%Cf`ME$sdCCcG`4!wBk8-hxCO$Qva-DTEM>*H*7%$%!b1$%`y{UFDSkEO> z_i_FL_V*k%lR^#VY}HE1TJRt}`nG6*#BaGRCuc73dc!TV!@(mUSX?R0I*?19sakIB mGA#zhIhJaRrJq2rzJ{mS>+z|L>+b=f8Z<(!I~#-vWt`g3%Bd?jf*ww%SBs zK4B;c@(cbyvH?TzcXm}^d~+6fL>4nJ@ErzW#^d=bQhehxM?3D-ALnN28)GF#Tgep5J#&b#;&s*jAUOBaJREtXprLbx|_@{AVB^Iqn!{M`q7iePwP-b nyx0;o8%@!L_Cf|0KLwP^N@P5PtBjnsgVLm@tDnm{r-UW|43Av^ literal 0 HcmV?d00001 diff --git a/src/assets/icon/Sue.png b/src/assets/icon/Sue.png new file mode 100644 index 0000000000000000000000000000000000000000..24c71b257c5b675d3efa2f4d32614024921628b0 GIT binary patch literal 1294 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WMyDrW(e>JaRrJSFffS9mK*v_n6via`&W;EBBNk51V%^*BpjKV56mYFB|(0{ z|3@}p2>#Bl3XFEn0*}aI1_r*vAk26?e?{wUm@8{VO|T|UUGl&&1-#9;nb!L_J;oT-G@yGywocNMT+8 literal 0 HcmV?d00001 diff --git a/src/assets/icon/Toroko.png b/src/assets/icon/Toroko.png new file mode 100644 index 0000000000000000000000000000000000000000..b2495b0625983ce419f2851784b26f5a3858aa05 GIT binary patch literal 1284 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WMyDrW(e>JaRrJSFfa(XDLOTne$Murv-aToSC4>#qhK@yMnVY0e1AU+m`@l= zg8YL2k8HpY{GDAD80VY?9+AZi419+{nDKc2iWHz=qo<2wh=u>viJp8720TY1CjI+= zTy?UmNXwO%g7dqQ6{WV>J@jwPk`CbI-l6c9dA^iS!|~ek*H>ope(=2Ss1l? zS(Ss=a^6jb?7H<_%dVYeIhrZs$JNenz{c_FYXfi8>7DF_2OD_bu{_?9aezJItjDQV jg}4}d?WKmCRr?ushKirA$y$FLlqx-4{an^LB{Ts5VjW!2 literal 0 HcmV?d00001 diff --git a/src/ui/settings.lua b/src/ui/settings.lua index ef00c49..9182a0a 100644 --- a/src/ui/settings.lua +++ b/src/ui/settings.lua @@ -20,6 +20,16 @@ return { style = 'dialog', { text = "Best ending", value = "objBestEnd" }, { text = "All bosses", value = "objAllBosses"} }, + { type = 'label', text = 'Player Sprite', minheight = 32 }, + { type = 'stepper', id = 'mychar', align = 'middle left', height = 48, width = 200, + { text = " Quote", value = "Quote.bmp", icon = "assets/icon/Quote.png" }, + { text = " Curly", value = "Curly.bmp", icon = "assets/icon/Curly.png" }, + { text = " Sue", value = "Sue.bmp", icon = "assets/icon/Sue.png" }, + { text = " Toroko", value = "Toroko.bmp", icon = "assets/icon/Toroko.png" }, + { text = " King", value = "King.bmp", icon = "assets/icon/King.png" }, + { text = " Kanpachi", value = "Kanpachi.bmp", icon = "assets/icon/Kanpachi.png" }, + { text = " Frog", value = "Frog.bmp", icon = "assets/icon/Frog.png" } + } }, }, { From e8a8abbecd5e9cc3dd118005d0cea1c613adf014 Mon Sep 17 00:00:00 2001 From: duncathan Date: Fri, 28 Feb 2020 07:48:45 -0600 Subject: [PATCH 3/3] adds working mychar selection! --- src/assets/myChar/Curly.bmp | Bin 0 -> 6518 bytes src/assets/myChar/Frog.bmp | Bin 0 -> 6518 bytes src/assets/myChar/Kanpachi.bmp | Bin 0 -> 6518 bytes src/assets/myChar/King.bmp | Bin 0 -> 6518 bytes src/assets/myChar/Quote.bmp | Bin 0 -> 6526 bytes src/assets/myChar/Sue.bmp | Bin 0 -> 6518 bytes src/assets/myChar/Toroko.bmp | Bin 0 -> 6518 bytes src/randomizer.lua | 9 +++++++++ src/settings.lua | 11 ++++++----- src/ui/draw.lua | 24 +++++++++++++++++++++--- src/ui/settings.lua | 14 +++++++------- 11 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 src/assets/myChar/Curly.bmp create mode 100644 src/assets/myChar/Frog.bmp create mode 100644 src/assets/myChar/Kanpachi.bmp create mode 100644 src/assets/myChar/King.bmp create mode 100644 src/assets/myChar/Quote.bmp create mode 100644 src/assets/myChar/Sue.bmp create mode 100644 src/assets/myChar/Toroko.bmp diff --git a/src/assets/myChar/Curly.bmp b/src/assets/myChar/Curly.bmp new file mode 100644 index 0000000000000000000000000000000000000000..842ee0e0e9aef384fdebf3ff3bf49dc6565d6ff4 GIT binary patch literal 6518 zcmaKw&uU{w7RJjU&u#e*!CH7RWHDf9m~`I24M7BwCIcB9h&ItCD>aNaT7)hvZM+R+ zAwod8aW8t>OhjL8G}Ey~>#hc7F&X*^`T?>DA&;PZ->Gxz{*i79>~rr|Rp(cKPu11? zA3yn%lk^1t|AN2&;jfRs1J}X-kpBCYbNoBTEB}zT_fOv2`uq2`ukif%{}&2+c!V|vSpphU$3W*=&X|3bSqNJKN&7^q|7oK zc5p7jfyqW}(GSpPNt*B6;1lOghU?P@FETJLGyZR+!+{6~gTX-DpRf*6i;i-k6`GH7 zEI(MoH@qkQGRtP-pz^O6toXLWDE6~a&e|aLTrn7;`e0!UPgEmqiXa>o=WJklIQSP# zl57e;X3k+DGY>rsQt?l!&K)hq9Nvw@CS=T9QWV9j1|v!CM!{E_OW8CPX5xdMB-5Pv zNjgzx@R^{wvl(Q)E<9>ZgDA&)Dv%lr?5ToxZ*5k$IGR)F)$3hL&@V z{csN5U{5Lp=av&{7$Rkr)~|(KvV^(te&IPL9Cl&g9c^*0EAPdU{#G@HX~t^W)CZQ? zb)L%-1t`nDLqF(J7{RU8uR>UaeKS_mS{<|N(|2S{)?{2e_vmF&y!@dXUD`NA0S`7u zk!4J=s~xs3QCDNUz@TZe`LuUhTWiKLn?L9JusH-vnX-H^w>nmxJ@j0D(AJ=>Wh^%Yk7RHFm+zQAWDUn1BJ4-(g@UlX!sRL&$Fr&R2Ly ze6bvld6`iCIOxuOCT((V^GwQze`tPKX4y41E9zBK;zt+slE41lWBIbY6Lqx~70Z)(?x^?YXE8BNSo4#{=$i4k!_~=G1cb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;Y7A literal 0 HcmV?d00001 diff --git a/src/assets/myChar/Kanpachi.bmp b/src/assets/myChar/Kanpachi.bmp new file mode 100644 index 0000000000000000000000000000000000000000..8421ef7b5a6156edf87f484dbc0dfe74848d98c3 GIT binary patch literal 6518 zcmcIoO=}!S5N#u`Ry&8_9CC;t5EcT~O`#nt)+xk?B!`5>upr$8f(6|K0uSh9k{ISF zY-DF3hcSCt+$2B3kU)M%jyWVhVe+cFUeE08PAofeqn(<5)AL^SXHDtLZy$c>v^>Q1 zHhzEL_XU18+)Z3#`RzUD(BM8UtZQf{$AIA z{`F7&cU_~6wCnz|a2|vvmEo!0_Tg-|IM1cw=Iq(**^zsie_o(G0y3RW*v9Pe%zM4f zs;ttRDA|WQXFhnptIcQkW+yXOeqDS&9*-Z3#EQu9Ecksi&Y&gzf!(iQ`*7#1+qwC+ z>C5}28+|6+)2SOo1BO=Fn5#qCJa}J0Bg|FP_2Ahe`rvYP2}H-gYhR1#vi-s zlO6oE`1RJ`QDdCsc5Xf1_~2zaT?})qXU5X-%{s?wO=z>w91}a#IUdaa*IJA#>ggmE%5Z zNyL}YmRhtt6R1T?O>L({qqamkFP1bwChm|k*&aOkfSY9=tEF>q-Ba#PTDD=m;|m|Z z6HCoEAPR7jq%k}=3t_~~ z2e+YzJ3`dcnHxy(D2i_`;@Y7fv~wR+14sK_1u&aOYdET2{7tx{miIZ}@=ocGxFzq| z8rMZ6FIm~}`@6W!5TZ0VA$;iI8II~)J3^d3xS$%F-pkQG9#8T2+&SGoD=Y4PjJ3vz zAy7@{4EKJn-Vmpj8^&OJd@LHeZ4Payx~qDyg_BtOW}L=7DT*H?KDe6}x2Z`jG z9cJ9N@CX`lVgzprB#OuA8?|Tw7qU5pO0}ZQ(|=%!-kt zTNkBh8J@JP!DcA|L`1Bx9qX{EZ=h6tvj-9}F&JA?r$ztP38;`z;qZV@y zgK$Wy>Q~D`R2WoSZup!&$P;ZKjoKxhdu`C}O-sm@o|4LNYAv<7?n>8(tMK>b8GSf8 zyZOg{K#{PJb>fla0N0a$d?gZ+He|3B9f`It&*;PZ@(&;058=f&*41_hFiWK;&)~Nh zzn7R3FbC@9A5Wzp7^`fZMo*r>?{jL=QVaX}RD4bOhiX)&Q7v^NIDh6OXj02;AD*-} zLMCsO$U37H5gAGJrZXYIAw7i#IB8Y052r6-m}>}b@((8xF3+Nt=&}%NIHP7C4vjN; zH-tQ#SF8C4dB`u8eIqArAD*+{7!g^j-TZ^&(bkCTph{Zg)-GdQS*H~r7B=pUMw@Xp z|KM7q*0POTN;XxaxgEl`)hlpcA^+f>S=Pe4w$8gaeHhBr%IbYh{vqERY43CI&}Q)W zR-@Hu3c29%bm|5W{=Y(~r5tJiurn;fOBFy`X&{AKv}mRpXcrrFuATUy{YXtr3nEp* z*4%)5J^7lpZwd2H6YiX&b;n2uWqek?_i55z>KmZ9Y<{$b$vdBrE zSkr6j8@0?5&!jFp#_-s0iJKBWf?LTyI38^co1=zP7rKtGEObzzoHpYu%rX}G0H17E z$v>#kv0Q_qAm>x2wz72tZUrjSXgSTjKxl$FS8f2Nv1~!Ljff{wsc% V7BxF>HdX6)1H6Mfbo32b{{=F~w_X4M literal 0 HcmV?d00001 diff --git a/src/assets/myChar/King.bmp b/src/assets/myChar/King.bmp new file mode 100644 index 0000000000000000000000000000000000000000..8c8949f6535a638686eeca1d06e84c98b778b8b3 GIT binary patch literal 6518 zcmZ`+J&PMh7#@EdtKA~_zyZfNa9NCfzA7M$F=^~W#UV&?jWFthyO1J>kF!vBXIw0* z#Mz1%NU=Foh=KfwK#Jg>kupt+^j4ntoq0y1m3KgTcHWQYnVFrBox^Wme_^z|#{WKk zf8qBGziZ|u{(brLGh^g;3sw1{tiHc@Z#DYz^VOkwyn6rqo7MZTeqMd|(|@Z!e*bl~ z`tV`(_doxxK7RbTlGyEE<=mu(*~y=jPE`xE*%{ZVD$RR3KeZ>OaEm(==gz_77$GcL zI+JB}E>9JT;=~EG*<+lmG%p+5Q)|JzfJEsah9U$>=}Z>Ael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pMLE!bu^A&&lV|4 z?bsQ(!1*<_kgHmftK;2bk8wLg&5QSsQCUJmhbs9t9a?*ABu2jNb7+W`Y5?2pjLS}~ z=7sx5u6xnYYoy=UvIav;)j@Da`})iNC?Cj`U2{>%H5@5H?JOfZXB#~x6!zCY}kfW!=fODS{o>K@smq5V;vgw zC+|3pc~b*1Y|jRYUB;Jf0IEjH-MoKrPEg|*?>xjPH?^c)(%z&_KjZ1&T63J+)R2vZ zcNDf~1K|%^5lgw#unq95I0*&0mc0$DXdOeX4Md!3f{Un{DK`wLt_%01VA1m<#IQX? hX}IL7W`a%snmjyl&)jmr!1fRs!+I0x-^S(<@;^3GVt)Vt literal 0 HcmV?d00001 diff --git a/src/assets/myChar/Quote.bmp b/src/assets/myChar/Quote.bmp new file mode 100644 index 0000000000000000000000000000000000000000..691694cb2881465f0209b3b834898723ee68a6e6 GIT binary patch literal 6526 zcmcIn%Wfk@6s@*95fTwfITjJpNZ1`QW_EVk3fnem%>s#0*0Y+Kz#ue8C_$R=5iIxs zw(R)RJ@A-;eQV9O^o=RQugyKT=zJW8@}*Qs0g+yXz{%p@&Br8W*UsrjY!LCLq{Lsw%vr0CZpH6HRQ#^E!pX7n%C3ZZY8Bkts& z4`wRXEAhxVGEl@(Yu&z%N|Sl4WE@#uA1Sbj4;3$#rhl?f`L^rjvJh369^b@xV;b#0 zZDq!l4W09-EL5qFpJ@9al%?*v9)}F0KUrBA7GWaB+*UA7!3T~TmvLrcP)NN9#blt9 zm7Pj&TkI-CS&!a=Ob3F=0WmI0#WAnsqMQzjX`Fxqy{5uZmNqc#9oap!C$uc&WgDg8 zlQ2DnF>omkDW^aNBJNJ%+YmC!I(ngxtcw&C85_Bh?BEk`hqPm$95VjP;~0rco^U$`vMM?r<+$J4YuB~KGU+UH;d_oUW4*^YaE^R6mgBrXoW(es zwDz$0b_UjUxhNCvT;%j)z-_dbmt|2@YX;LP${yN%rNaa?=!9t;?`sE9}6R&XGCCSoMqpwx@EQ4r!dST*%iDM@NxGU71P` zpA$c~FdU9fRX>!ApRnCvc`OFx_PD~C?iRC!0P5`JTtA8(cqr9&CillgEOj_!s!+NN zgHX)vg_AgRT!V?@h2!Lur~oIj$pBY~*g6rHbge6fiynutPB1odQOdk3?p)*?#8Dx5 zHiCk1l&8A+WkFEWm@4gSMaMP*FS%Um%_X>SouCgnCA7#hDhdbi{{2B8`y7}*a&;td za#0372=0?`JiUtX>TJzoTGtlyeW13n?bKc{C zALQyt!JR8fnG(#2b8Nob)4C>(ls|CHE_dU`v9I~Z69%#>8BAxukptP*mOs!YAg)~#dw=Iz$K%S`knHRbboa7k3L6`GwAt)*d~YFJrm6<@UZRWAMinX zAzD5+*~vdNhK^iA+I7i2e`vYfHgR%M5|_9uMtb=N>(a!+n4Q|Z&rZB|e(=e#9(CVLIGxF0AJ?p);5kOF#{5Ha8|DwRNts_4`oNUyb|pH}2Bj*1JKZ1FpA;(Bjzanc9r TA!Oa2Z>*g^xcKth&%gQ`S6l;! literal 0 HcmV?d00001 diff --git a/src/assets/myChar/Sue.bmp b/src/assets/myChar/Sue.bmp new file mode 100644 index 0000000000000000000000000000000000000000..d78a675d21022fb11f00f38a2e3842ab317a8490 GIT binary patch literal 6518 zcma)9F^e3@6@JHhH8ZW|kb(s{aNvu~pzLgtRju9M1c`&E)fj6=F9{u zxLJB}B9PYJ;T#Owz|gee92l&utu>5kD!QL=;U)JI#@~BYUv*EDzxk7SZ1g4E2Y$LJzZekz?+;xIfzYdArBQ*Pb2f`5VVf1`ki)o}C}ZEuhobkgGcvXK4E&$GU#^ zSi?y<#=4I~x&D6s%|G)FhqobDgWKeO-Mh#3auKOd;q+T@^bt{TJqG1jf9u0!X<9vpFAe`)4M2E`pqBTO7Hsp#p)Ai+8 zgXd~+eDmnl4V{;RCWceXYc}t2FytZ^*9FX9?ZH>zia5@Xa1A(*;k3rl8dx`kT$~fa zJkAYV&>Ls8q#OtWnT1&TZz%kFf#Sy+E$Q2Rt zGkjlM*UJSi;6|M}wectl@3S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000000000000000000..4a6b9bfac8e8c41eb91e4be4a8476d96f96381e3 GIT binary patch literal 6518 zcmeHLyKW>!6fK0Ut_bZ0NG2d40y3oW$`h`3N5~0i6AS-=MQq(NbW3A-0v1uy`1F0As;)=Z^{XH5zA)PE@b?@1{=n}gexH~V z{0;5*&y11ZGl=p-8;tpGXute?`0D#-!wdInFy9Wtk3au2{PycF!=Hcs4ZHZv{j6`j zq_Og+XtR3ybZy5+W4i5a*SEgOn)0b_+l|PQ)5${ zCX`&Ub=%dYJR+wKNKjY-M9iL`&Z5UOT(8T#Mf0pE`~8kr*}lN7lk>pbV9r~_Z92p^ z2J?=G-k84gZRf`v)G;R!dbG|^F0k#8+qX#7d)s;}+1|+rwb75VAjd|o2~;j}(jO}w z{RYPxc;kwcd>>iGIbtl)zegmKL3FsHC8hrjp!z8FWE*G!St8o7v8*M~FYN~p=Z z948#*e&D(+IJjr5#<~=n^pT64^hp8hlX z}s`e zq5#TxN_3SxvhP+4F~@ja(SEzJ`k;YgjSab_Kk!|;0)rJm; z!*bsX&B^Q3A2CV4)FtXAhsrh59#H$gyWI3^4CH2fv^QehNQcKUb9(wU7W0O<}%U>ntx!4p;E#^~ag_XRc(x203#5 z;e}&-@ba#o?y0OpSSyGuy{eJ+|Lc#kCcqJ;HA28xi(ywCUVp?nV%+}1m`3{Yr zt25^G$m=Bczo-5JHW!Fi+~$zMHN; zsyp4Oe+W6`es!$+qq>`3dyfqg@4&pL5~+V`{eeB0@AABF2b|NhPY2f@m~!67nUmPd ziSaSjA90TQHTsP@ZiG@3#M&#N_+xyJsz2gdW357DU7?(1{So_Q(Iu@VV!W(!ZCsy} z-(Xp(FP3ifB^s6Y^;Z2|ieo%e=KT~k^1m$}*^w*7P#?L-xo4*zNzyqG6sOl$v}CS2 ahH{NLa{N?%KJ>U6dmKk{$4T>;EFS=FsrQKh literal 0 HcmV?d00001 diff --git a/src/randomizer.lua b/src/randomizer.lua index 3ae5727..bf7aa4f 100644 --- a/src/randomizer.lua +++ b/src/randomizer.lua @@ -36,6 +36,7 @@ function C:new() self.puppy = false self.obj = "" self.sharecode = "" + self.mychar = "" end function C:setPath(path) @@ -65,6 +66,7 @@ function C:randomize() self:_writeModifiedData(tscFiles) self:_writePlaintext(tscFiles) self:_writeLog() + self:_copyMyChar() self:_unmountDirectory(csdirectory) self:_updateSettings() @@ -235,6 +237,12 @@ function C:_writeLog() U.writeFile(path, data) end +function C:_copyMyChar() + local path = self:_getWritePath() .. '/myChar.bmp' + local data = lf.read(self.mychar) + U.writeFile(path, data) +end + function C:_getWritePath() return select(1, self:_getWritePaths()) end @@ -277,6 +285,7 @@ end function C:_updateSettings() Settings.settings.puppy = self.puppy Settings.settings.obj = self.obj + Settings.settings.mychar = self.mychar Settings:update() end diff --git a/src/settings.lua b/src/settings.lua index 80a6ae2..971995c 100644 --- a/src/settings.lua +++ b/src/settings.lua @@ -20,13 +20,14 @@ function C:update() end function C:serialize() - local line = "return {" + local line = "return {\r\n " - line = line .. ("csdirectory = [[%s]],\r\n"):format(self.settings.csdirectory or "") - line = line .. ("puppy = %s,\r\n"):format(self.settings.puppy) - line = line .. ("obj = \"%s\",\r\n"):format(self.settings.obj) + line = line .. ("csdirectory = [[%s]],\r\n "):format(self.settings.csdirectory or "") + line = line .. ("puppy = %s,\r\n "):format(self.settings.puppy) + line = line .. ("obj = %q,\r\n "):format(self.settings.obj) + line = line .. ("mychar = %q,\r\n "):format(self.settings.mychar) - line = line .. "}" + line = line .. "\r\n}" return line end diff --git a/src/ui/draw.lua b/src/ui/draw.lua index b5910af..cb0e964 100644 --- a/src/ui/draw.lua +++ b/src/ui/draw.lua @@ -12,14 +12,14 @@ layout:setTheme(require 'lib.luigi.theme.dark') settings:setTheme(require 'lib.luigi.theme.dark') function C:setup() - self:loadSettings(Settings.settings.puppy, Settings.settings.obj) + self:loadSettings(Settings.settings.puppy, Settings.settings.obj, nil, Settings.settings.mychar) background = lg.newImage('assets/background.png') self:draw() layout:show() end -function C:loadSettings(puppy, obj, seed) +function C:loadSettings(puppy, obj, seed, mychar) settings.puppy.value = puppy if obj == "objBadEnd" or obj == 1 then @@ -38,6 +38,23 @@ function C:loadSettings(puppy, obj, seed) settings.seedselect.value = true settings.seedrandom.value = false end + + if mychar == "assets/myChar/Quote.bmp" then + settings.mychar.index = 1 + elseif mychar == "assets/myChar/Curly.bmp" then + settings.mychar.index = 2 + elseif mychar == "assets/myChar/Sue.bmp" then + settings.mychar.index = 3 + elseif mychar == "assets/myChar/Toroko.bmp" then + settings.mychar.index = 4 + elseif mychar == "assets/myChar/King.bmp" then + settings.mychar.index = 5 + elseif mychar == "assets/myChar/Kanpachi.bmp" then + settings.mychar.index = 6 + elseif mychar == "assets/myChar/Frog.bmp" then + settings.mychar.index = 7 + end + settings.mychar.value = "override" end layout.version.text = 'Cave Story Randomizer [Open Mode] v' .. VERSION @@ -55,8 +72,9 @@ layout.go:onPress(function() end Randomizer.obj = settings.objective.value - Randomizer.puppy = settings.puppy.value + Randomizer.mychar = settings.mychar.value + C:setStatus(Randomizer:randomize()) layout.sharecode.text = "Copy Sharecode" diff --git a/src/ui/settings.lua b/src/ui/settings.lua index 9182a0a..bd5d9d7 100644 --- a/src/ui/settings.lua +++ b/src/ui/settings.lua @@ -22,13 +22,13 @@ return { style = 'dialog', }, { type = 'label', text = 'Player Sprite', minheight = 32 }, { type = 'stepper', id = 'mychar', align = 'middle left', height = 48, width = 200, - { text = " Quote", value = "Quote.bmp", icon = "assets/icon/Quote.png" }, - { text = " Curly", value = "Curly.bmp", icon = "assets/icon/Curly.png" }, - { text = " Sue", value = "Sue.bmp", icon = "assets/icon/Sue.png" }, - { text = " Toroko", value = "Toroko.bmp", icon = "assets/icon/Toroko.png" }, - { text = " King", value = "King.bmp", icon = "assets/icon/King.png" }, - { text = " Kanpachi", value = "Kanpachi.bmp", icon = "assets/icon/Kanpachi.png" }, - { text = " Frog", value = "Frog.bmp", icon = "assets/icon/Frog.png" } + { text = " Quote", value = "assets/myChar/Quote.bmp", icon = "assets/icon/Quote.png" }, + { text = " Curly", value = "assets/myChar/Curly.bmp", icon = "assets/icon/Curly.png" }, + { text = " Sue", value = "assets/myChar/Sue.bmp", icon = "assets/icon/Sue.png" }, + { text = " Toroko", value = "assets/myChar/Toroko.bmp", icon = "assets/icon/Toroko.png" }, + { text = " King", value = "assets/myChar/King.bmp", icon = "assets/icon/King.png" }, + { text = " Kanpachi", value = "assets/myChar/Kanpachi.bmp", icon = "assets/icon/Kanpachi.png" }, + { text = " Frog", value = "assets/myChar/Frog.bmp", icon = "assets/icon/Frog.png" } } }, },