From bbf6c15b971dd1e927c474d1832a4a8373beacda Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Sun, 10 Nov 2024 00:48:55 +0000 Subject: [PATCH 1/2] Add joypad images (#156) ## Description Taken from https://github.com/n64brew/N64brew-GameJam2024-Template/ (MIT) Also improves the assets by adding them into sub-directories. ## Motivation and Context Will allow use in the menu to improve navigation/context. ## How Has This Been Tested? ## Screenshots ## Types of changes - [x] Improvement (non-breaking change that adds a new feature) - [ ] Bug fix (fixes an issue) - [ ] Breaking change (breaking change) - [ ] Documentation Improvement - [x] Config and build (change in the configuration and build system, has no impact on code or features) ## Checklist: - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. Signed-off-by: GITHUB_USER --- .gitignore | 1 + Makefile | 35 ++++++++++++++++++++++-- assets/{ => fonts}/FiraMonoBold.ttf | Bin assets/images/joypad/joypad_a.png | Bin 0 -> 653 bytes assets/images/joypad/joypad_b.png | Bin 0 -> 649 bytes assets/images/joypad/joypad_c_down.png | Bin 0 -> 666 bytes assets/images/joypad/joypad_c_left.png | Bin 0 -> 707 bytes assets/images/joypad/joypad_c_right.png | Bin 0 -> 715 bytes assets/images/joypad/joypad_c_up.png | Bin 0 -> 711 bytes assets/images/joypad/joypad_d_down.png | Bin 0 -> 419 bytes assets/images/joypad/joypad_d_left.png | Bin 0 -> 423 bytes assets/images/joypad/joypad_d_right.png | Bin 0 -> 419 bytes assets/images/joypad/joypad_d_up.png | Bin 0 -> 440 bytes assets/images/joypad/joypad_l.png | Bin 0 -> 376 bytes assets/images/joypad/joypad_r.png | Bin 0 -> 424 bytes assets/images/joypad/joypad_start.png | Bin 0 -> 672 bytes assets/images/joypad/joypad_z.png | Bin 0 -> 387 bytes assets/{ => sounds}/back.wav | Bin assets/{ => sounds}/cursorsound.wav | Bin assets/{ => sounds}/enter.wav | Bin assets/{ => sounds}/error.wav | Bin assets/{ => sounds}/settings.wav | Bin 22 files changed, 33 insertions(+), 3 deletions(-) rename assets/{ => fonts}/FiraMonoBold.ttf (100%) create mode 100644 assets/images/joypad/joypad_a.png create mode 100644 assets/images/joypad/joypad_b.png create mode 100644 assets/images/joypad/joypad_c_down.png create mode 100644 assets/images/joypad/joypad_c_left.png create mode 100644 assets/images/joypad/joypad_c_right.png create mode 100644 assets/images/joypad/joypad_c_up.png create mode 100644 assets/images/joypad/joypad_d_down.png create mode 100644 assets/images/joypad/joypad_d_left.png create mode 100644 assets/images/joypad/joypad_d_right.png create mode 100644 assets/images/joypad/joypad_d_up.png create mode 100644 assets/images/joypad/joypad_l.png create mode 100644 assets/images/joypad/joypad_r.png create mode 100644 assets/images/joypad/joypad_start.png create mode 100644 assets/images/joypad/joypad_z.png rename assets/{ => sounds}/back.wav (100%) rename assets/{ => sounds}/cursorsound.wav (100%) rename assets/{ => sounds}/enter.wav (100%) rename assets/{ => sounds}/error.wav (100%) rename assets/{ => sounds}/settings.wav (100%) diff --git a/.gitignore b/.gitignore index 9b9f4205..dcc08de7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ # Ignore generated files in the libdragon FS /filesystem/FiraMonoBold.font64 /filesystem/*.wav64 +/filesystem/*.sprite # Ignore external development tools /tools/* diff --git a/Makefile b/Makefile index eac1f424..d8cf4edf 100644 --- a/Makefile +++ b/Makefile @@ -85,6 +85,30 @@ SOUNDS = \ error.wav \ settings.wav +JOYPAD_IMAGES = \ + joypad_a.png \ + joypad_b.png \ + joypad_c_down.png \ + joypad_c_left.png \ + joypad_c_right.png \ + joypad_c_up.png \ + joypad_d_down.png \ + joypad_d_left.png \ + joypad_d_right.png \ + joypad_d_up.png \ + joypad_l.png \ + joypad_r.png \ + joypad_start.png \ + joypad_z.png +# joypad_j_east.png \ +# joypad_j_north.png \ +# joypad_j_northeast.png \ +# joypad_j_northwest.png \ +# joypad_j_south.png \ +# joypad_j_southeast.png \ +# joypad_j_southwest.png \ +# joypad_j_west.png \ + OBJS = $(addprefix $(BUILD_DIR)/, $(addsuffix .o,$(basename $(SRCS)))) MINIZ_OBJS = $(filter $(BUILD_DIR)/libs/miniz/%.o,$(OBJS)) SPNG_OBJS = $(filter $(BUILD_DIR)/libs/libspng/%.o,$(OBJS)) @@ -92,7 +116,8 @@ DEPS = $(OBJS:.o=.d) FILESYSTEM = \ $(addprefix $(FILESYSTEM_DIR)/, $(notdir $(FONTS:%.ttf=%.font64))) \ - $(addprefix $(FILESYSTEM_DIR)/, $(notdir $(SOUNDS:%.wav=%.wav64))) + $(addprefix $(FILESYSTEM_DIR)/, $(notdir $(SOUNDS:%.wav=%.wav64))) \ + $(addprefix $(FILESYSTEM_DIR)/, $(notdir $(JOYPAD_IMAGES:%.png=%.sprite))) $(MINIZ_OBJS): N64_CFLAGS+=-DMINIZ_NO_TIME -fcompare-debug-second $(SPNG_OBJS): N64_CFLAGS+=-isystem $(SOURCE_DIR)/libs/miniz -DSPNG_USE_MINIZ -fcompare-debug-second @@ -101,14 +126,18 @@ $(FILESYSTEM_DIR)/%.wav64: AUDIOCONV_FLAGS=--wav-compress 1 $(@info $(shell mkdir -p ./$(FILESYSTEM_DIR) &> /dev/null)) -$(FILESYSTEM_DIR)/%.font64: $(ASSETS_DIR)/%.ttf +$(FILESYSTEM_DIR)/%.font64: $(ASSETS_DIR)/fonts/%.ttf @echo " [FONT] $@" @$(N64_MKFONT) $(MKFONT_FLAGS) -o $(FILESYSTEM_DIR) "$<" -$(FILESYSTEM_DIR)/%.wav64: $(ASSETS_DIR)/%.wav +$(FILESYSTEM_DIR)/%.wav64: $(ASSETS_DIR)/sounds/%.wav @echo " [AUDIO] $@" @$(N64_AUDIOCONV) $(AUDIOCONV_FLAGS) -o $(FILESYSTEM_DIR) "$<" +$(FILESYSTEM_DIR)/%.sprite: $(ASSETS_DIR)/images/joypad/%.png + @echo " [SPRITE] $@" + @$(N64_MKSPRITE) $(MKSPRITE_FLAGS) -o $(dir $@) "$<" + $(BUILD_DIR)/$(PROJECT_NAME).dfs: $(FILESYSTEM) $(BUILD_DIR)/menu/views/credits.o: .FORCE diff --git a/assets/FiraMonoBold.ttf b/assets/fonts/FiraMonoBold.ttf similarity index 100% rename from assets/FiraMonoBold.ttf rename to assets/fonts/FiraMonoBold.ttf diff --git a/assets/images/joypad/joypad_a.png b/assets/images/joypad/joypad_a.png new file mode 100644 index 0000000000000000000000000000000000000000..9e6e6493a13daaa26db6f7e330dbd78ae4cc62db GIT binary patch literal 653 zcmV;80&@L{P)@y)rp$;Mubp*{q=+-boVW`By)VZpJ)TN)Gb3Xx6yS8gT z0P4V-#1bKC;-T~A4DNPV!h6W^f&j%`u__k(9fA6#&daapy8H0GPHzZrxeD zPxJ0J0H}(yI+sej4=w|bO6-igpybxd8qGd_UbwwjQMFS(jtBU7_yGd|ww=0AV%d%z ze6M9yqFb{>PYw%=a}aVBEC?swg6JkRVwO}zGwjgFe(hYC2Y%T3QGY30TL&rtu!gr>ukBSu;71dO{tKVf zUc47gZv{BBOf>Iq)2zFYyIFCFZvHp3->kMe?c-OX>8*?{(`c03TA3#7b&Z%MRWm4X n`r2{CKePU?4cXc{814T9ih=Y)U@uCn00000NkvXXu0mjfV)P$* literal 0 HcmV?d00001 diff --git a/assets/images/joypad/joypad_b.png b/assets/images/joypad/joypad_b.png new file mode 100644 index 0000000000000000000000000000000000000000..e5874cfff3bd9b22aeaeca708b1d544099bf19f3 GIT binary patch literal 649 zcmV;40(Sk0P)EmEuLgoa}NqN%VJ43W-R*>ZvCs@ z0f3TSYdu@e-4{!O$B~8_D5!ygj`duVOgXnf_6k*IKFU8^-dwIxPSO7spy#v^e(%F; zdf+ApOHL1!wnV1)@#iAtX}-o&LlWTxMmC9j^%huyBJRgCQ*gn-1g}t%WSP+mIf&77 zx&Q$7kCjk^WjKJbVRfXS)bE$)>|q!gn(9z_W6?|lxyk}SfUq0R)yD(nQR&GKvM)yu z(f#59F~AHuQ!E1s6-4h?bVpq2D1MS%$=-kl2n84?Fcwls-An<5Of_h}X}UkI{ijqP zx)+|^c^$aE&vN%3GwxF=WSp& zc7Ta8ndRcKS+(zEB1dZryElK6hROc4KF(Ors!sg{qn1`%Lf(O%CfE50s~T j`QB^G1AWxG9OeH4Nfh#H*|FL)00000NkvXXu0mjfw>}j^ literal 0 HcmV?d00001 diff --git a/assets/images/joypad/joypad_c_down.png b/assets/images/joypad/joypad_c_down.png new file mode 100644 index 0000000000000000000000000000000000000000..773e13914c0b1b7d50d9ec77a5c91e2195601855 GIT binary patch literal 666 zcmV;L0%iS)P)UMk%I5uh$*b8}; z`1sFMz}&+*0Dz`1#4W2`p^_wJt}d*+yoBzF1;*HoW>FMTep@#<}-H~ZppI0~7ApwBXlhZei z`ayjhqG>ubU7s*F4(j`7o&Gv7HcXLNUrUWpp@U?NL`2R;_#L5Rk*h1zaQ?e28D>p}XNVth_BllS-JnRn)8eBVc_UOphV zLp{=xB#M230LKA9t>(J6V;`1EmAPB@ofob3Ox<94fe9-SWjl6i@U*6lu!1188B9X7>Zvg=J{2`gSc;Vb|H~8St!t3`Npp^n-u?k80 zdo5M%#ZYYM%*rB}=Hwpfk)|aAtzgBbc=K)p*@G;?#70Q0H;if2Xo&=yNvD@Mk%-ZH z!#vN!$2AjQzV0E&mmy0Xk(xXNL4ZI=KgaPr2LSs&vUvO9GkB&1Me@4#qEkH2b1aUZ zu|Fc?>UbPsi9Hcu7^ZFS`2g#>t_uLcpooN~VQT6I;_>)@C8)Vom$e=HkW$(>lq3nd zp2Ebn2`Gx%5uv$s90!y-S+-oR%9D(NdS$yZ%lN*J z)hFs+Dy7Fy`bd;gY;A4g(nu0SB*^FUST~Gs*Y6b0vj9-cS;@6e>!m^=-_<}61dNT1 zH(?;{!PwbE;)G$^+3_-&%)XVgM%#v|RV#~RIuw!~6M;l|p67f3 pZnf$#7JVka}1WO7|-+oX-Ya2NM*&T~FEhj7l(uV>4l z*)U^^5k;0oNg@CcbOY|TJ+JkvHFxcnf3M%4>;qO8NJ34-cJxs_Vi*P}r2}B!_faa9 zP^tWInzd$XW}aIIfYk+(P?NErrkN9CF%7*QhbRgdrbeTVe7+DgYxc;@Jhub@P!q8o z)69vQ7Dvr$;L*w&HcQ(>0h$(vY34*Vsg?mioD46`rp8iN(&;e*0G#(w{G)^|L9`WA2AeL@iQ005LyC^A(9iH67kdhiDT2uXk%c2L>< zf`=<>_*Sk00HlyaB=F+_{}PK3OrAZ1lS%a;o7C-ecz<3(hLiwcbo4Z`*(?}i2exjf z!zHind%o{SjxNr=qR}WanJjc&AF%tr53lXJg41&5wzi6gjr=WuQi@C_i|Ogh$AST% zv{i)bx_1cY9BU7>J=4rFO^c)LwXs>;z{JFbW9z)Hdfmc$etqxK^+r?xfM(53<@1H0 z(WpaKWK2z6{7-Nlg~EDZTXq^adQ3^Rtm`^6jPt{fsaQm{Qr)vHJ3Vkr{d#_v-iR=^ xq{vi}LJ|Q8x}6Sp+rHm0Kh%vC7ZEtrAlS=(I8t7`h_as)l-2)S|gMCmDt^QN4$*?QU`V%2ieTl zK`xh{vkF#!--z$j0B2!st|xUXrD;*A8rt6d1>f@#zj?I=Di%%GNE?gRp>?ls#CJph zh_pr~8^fOGVSeE&=8X+_o>v2CT2xB)q;7{>!V>@>PL0!~9@Fmx!vOGUaSM`Af-IEq zabdHr9Zic$v6$XFJx064WCpz2IkUAt% zm9{qyY-V;Did3q-Rk@7W_bYWCLI|irJ49JJ`>Lw)e@qn3L&$-KWC=Jb9O8GrPzRAN z$(Kbm=G3lY%t>G#pd7B|M?W^xj0G^V~5p#*ocq^SONP-ATb3s5_>hrpIWP8d8U- tLOW#nY)3ffWyV;xT&avc9Aq0o|6k6t4$`cRcX9v#002ovPDHLkV1gs$K0yEg literal 0 HcmV?d00001 diff --git a/assets/images/joypad/joypad_d_down.png b/assets/images/joypad/joypad_d_down.png new file mode 100644 index 0000000000000000000000000000000000000000..4223ec3b6635002821e2a3ac4272e71b738580ea GIT binary patch literal 419 zcmV;U0bKrxP)0{F&LM&1UnxUawyH9eB!O-BW|~V3f&jDG z%z$0jHS7ZraQ4(R@C~a=E<5i^T%I?;G%?!Jw2kDa2#h477@1Vx;`~clizO_0HP>@hz!C_(?Dze!*yMM9FNCx=mjz} zEXy+TZQJ5-IQ&*s^-dy!)oS(TdEV!AI(>QeH$+6V)~B{@x4Yf$>kq0;VK#^u4$uGq N002ovPDHLkV1oC?vg`l= literal 0 HcmV?d00001 diff --git a/assets/images/joypad/joypad_d_left.png b/assets/images/joypad/joypad_d_left.png new file mode 100644 index 0000000000000000000000000000000000000000..fb4676037387c3b74da86950f8a204e6ea581002 GIT binary patch literal 423 zcmV;Y0a*TtP)jV|m&?!rW2~DZHcf*p%V3Ow5CT%lp}-iiZCjkrXEaR% zDJ5>%{I)+3AR^>>j;gA_IfqhecD0^BUDwF63;;&0PT`)OWmyP<09xzC-D;KHx}Y#0c_hw9LEU55OWO`0EV(ZCT_P|Y&IJdMKQj@ z^?Lp6y2&m909LCNeBU4a9d3+yKAlb<#+X@=NtZ-~G)-g6vfh+ZA!c$J!xug1R#QB$ RSQr2R002ovPDHLkV1nh5r?~(C literal 0 HcmV?d00001 diff --git a/assets/images/joypad/joypad_d_right.png b/assets/images/joypad/joypad_d_right.png new file mode 100644 index 0000000000000000000000000000000000000000..d9f3fd939451319905f58b8e579a785144aeea57 GIT binary patch literal 419 zcmV;U0bKrxP)V$dKR#kN@%kncxl8n~tbvF}$x~{R^ZhyK{98naZD2gdgH@X4<2q8d3$g&KZ%?4Ff zjp_yfBI>=F8Tb1gaU5g6-w*EdG(k_KX^>K)C<=sOh|A^j=_m93S2_5|ID^rPQ%$ny)lX(?1Cw7Y%|Sbcsn~I-P4! zK~y-6#Z$XZ#4r%twKs`lDfoy5DRNDm0x6}1#5I&iP|@&fl>7o6d`D7KrOgjmc_^l! zBsmTRiD`FcS39$d-h0>rwn_aL4d_&2Q4~8Ox)nk^20>79&f{Si-f+zWW6YJ5@{Wk^ ziD)mS)M=VtD5at(iU0thX_^lL06;`umgS9<@`;G9gCNL^F*~jGWs)So*z%@~v5=~& zI#_F8vMk$ctDaxbb zzVD%JTbQP4l|$b9d8xoThdj@}rmUne&+|;qx!1a`AH4U!G6E52=iK}1A)Si9Q=JmdoX}wf25I z9w$En42Q#)Uaxlq0LBt z3`(i@EX$IzEZ?lPk7=4-P9~EFX0EmZX0sWRBmohj-EPD8eE@*g8cL}&j^n8@=4|T_ zSF05~&jSGDdA`T0000OaVYn zl$xUW+Sht_kLa{K&u#%5jCoBd51V25Y_(pm`HnLNzA6fIk|c@K^d#1L^N1+F18gwn zMN+q+qXoVr-G(|HAV64TZ)|mBu{4ENY;Sh~5 ztaa10&8LNEG0rhNHHEA*LM*DmIw}G z5S)V%!Q~uTQ6L+QKC{=r^77o=@!I_S!%4pp08TD1lTS(Vg6|QX##(L5~TeYIY%NiiPG?7B=pzxVs^ z;w;-5D^poJj4cI9wWZ@M`kX7^`r2kRI{%~f?mp33dHx>>TMCI3kxJ?S0000Z{Bp?OUt%xgF{)Cmr}}CDdiOroxy{(_G?*|k6{=d>bm}PeB_IylrL3P-AO6& z6SUU1N~vc6_l_f9z&XDTH3LABB;cGEK6hZi7~{ci*FYqK2LHk74WdwCT~|!g1OQ0W z6pXRIC9u|_?|Zau3;(VBIsxY#S(d?C3!?C(yF2K*4tbvMNx}y6JVR>@A;j(oK?5Q} z6h&y72G-i3!NCr;Z8PpHgg{XgM-9H_D1kBNO=}&zZJuWsW8Q-a#&LX7N?pWpd_zR% he$9R7aU36g{u?J6XzyjDz4rhB002ovPDHLkV1n9sofZH9 literal 0 HcmV?d00001 diff --git a/assets/back.wav b/assets/sounds/back.wav similarity index 100% rename from assets/back.wav rename to assets/sounds/back.wav diff --git a/assets/cursorsound.wav b/assets/sounds/cursorsound.wav similarity index 100% rename from assets/cursorsound.wav rename to assets/sounds/cursorsound.wav diff --git a/assets/enter.wav b/assets/sounds/enter.wav similarity index 100% rename from assets/enter.wav rename to assets/sounds/enter.wav diff --git a/assets/error.wav b/assets/sounds/error.wav similarity index 100% rename from assets/error.wav rename to assets/sounds/error.wav diff --git a/assets/settings.wav b/assets/sounds/settings.wav similarity index 100% rename from assets/settings.wav rename to assets/sounds/settings.wav From 0d30a6f3b927059ef6c4e5a485e95db4e63f577d Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Mon, 11 Nov 2024 12:11:30 +0000 Subject: [PATCH 2/2] Update libdragon --- libdragon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdragon b/libdragon index 52950162..0c4e3888 160000 --- a/libdragon +++ b/libdragon @@ -1 +1 @@ -Subproject commit 5295016230d657cd6c7fce5b6ed4a342538e09f5 +Subproject commit 0c4e388851cabab52f421bff5e75e9dc3ab36c72