From 24e15f87861bff88e5f145f4761d4d995e780a96 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Sat, 25 May 2024 11:24:23 +0100 Subject: [PATCH] Add a basic version of the example_logo for certain examples --- agb/examples/dma_effect_background_colour.rs | 2 +- agb/gfx/test_logo.aseprite | Bin 0 -> 2514 bytes agb/gfx/test_logo.png | Bin 1148 -> 2786 bytes agb/gfx/test_logo_basic.png | Bin 0 -> 1148 bytes agb/src/display/example_logo.rs | 10 ++++++++++ 5 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 agb/gfx/test_logo.aseprite create mode 100644 agb/gfx/test_logo_basic.png diff --git a/agb/examples/dma_effect_background_colour.rs b/agb/examples/dma_effect_background_colour.rs index 57c969e9..f7386c59 100644 --- a/agb/examples/dma_effect_background_colour.rs +++ b/agb/examples/dma_effect_background_colour.rs @@ -25,7 +25,7 @@ fn main(mut gba: agb::Gba) -> ! { let dma = gba.dma.dma().dma0; - example_logo::display_logo(&mut map, &mut vram); + example_logo::display_logo_basic(&mut map, &mut vram); let vblank = VBlank::get(); diff --git a/agb/gfx/test_logo.aseprite b/agb/gfx/test_logo.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..4656258c558a5e649e87db9b2e00c32391791e21 GIT binary patch literal 2514 zcmd6nX;f2L5`Z6rfHr7A#8xpR+9)n4K@b|6#Dz}FAP7Ve5e%Uv1OgIBfRF?P7Zx#s zOUoha0&h&n{JK-4J9$kNbCL`V=MAcPnr%M%os3+>D>bNoB!Oucizy60BCSGVfb zy={vi=yibx^d9;ZLPHu51O2OGfjOlQE3UjqTNMW&-I zkzX}y{b~O0i}62erVAbL4-clJ_xK+pGtB<={y&{&KaYT%Sm9(kBi#Qe8BM2!hHm<* z+fvBMKN9U2M58gt4767;+n*j_`c+Ro$UTZ49!f@s1yh0|jlb%n3H|8q(g;jiXaFEH zfB92Gb1fK?s}x%cfw%pl3rPP3m_nRh5r4i@%qI#jQAfte;TLYxVh1=t_%MO~^E9LJ_NbW?uu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}2{U)!g+~V4j!4gJb+}~9b$xYuu*G!HbaCtk z*8w@~c4gB#pF`T{k1>EN1TQ!!kT40<$0HUqLi@8?O(6TBg(t_k?aCq)x^b~ zsim?o*1f_8aeEhz=bHVny%bf^`l9ef1(G%HP@XYtBt~ApO=(PQ!ikx_&1SOn8pnL{ z-6Ys$C|<(%Y_x5ztJxor6XF%}%N5;it3JD_&&lj;0!wkY4LM4qPSNSr6h`^qh7Waj zS#>##aGOrv_gE?_$4Mo2*{k;}-29!&8TCr(-nA4LXqe5i(>{Nr|ChmyehE`~an z|2BK~R&i#rp*&lyBczs5-p>7CZO8!nd0wUT=T6S$OO{I>WAyM=maP{SojE~FNIVrV zu+Qa|Es4~t*Oi#KciEJ)X!73bn`cJlwdzmzuUQw+<++qiQCl(jDw=1y4i(h`ua$?S z#&jlop7lbda%z{CZ1;(2$BzU*kLpObdR`;H=pTFJCcgbt4UwquKFWC6ot%>cPrk4U z4;VDOx1ES(fBd88(0ds-gPiUz%kx5XN)DRPjO?DIlue|-RK6Lj+EK~R9AKWStElTV fxjHfUTd_0ewp2tOo!V2({&9v|H?6TVqOj#3SKd7h literal 0 HcmV?d00001 diff --git a/agb/gfx/test_logo.png b/agb/gfx/test_logo.png index 97b139de6619b203c8c69d1048fa543b9c6f8d9b..b5e342dee82632c5d8369ac7e1ca47ce4f6d9624 100644 GIT binary patch literal 2786 zcmbVO`#%%vALq~{O^TZ1)=iu^Az{odavNEtlgnm9a=+%Xxi?veCMG$BN(gD>lDW*i zSQqBfjLlum5wp2FcE)!)|G@YA{o(U`e)znf_vih*p67YLKKHM}tbqsQ4hRVe0iiY) z4uZ@T#Ebm^!K%%i_7WuFa0hF1p~^mmc_E<#`A`e9Kce#4<8G-(=M=k_=X8h+RGCH0 z^=k)*EjqmI5Xx40@6MQAs}ucUf6R5YH0Pp>eR#HMZd2o7(y< z1(s|sI?ev#K1hmtE`((rc5m1E<)Ew;R=8`wmb-$-88N0d!ys8a7{b_Dr%M@hC_~lsYb2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}$XN?G$*0;|X^V%8cP*P;^#sirB@cF@yhmI{P2yy2V|}*X{*&k~u>#v{>Focn*r}ShRi3_S?D7l`HeU|K9uh@04HnMI@Sh;~zw2PW>ve z_j~c$E1RcBHY(oO!m9T)^cK(7`sG2-BE8of5XjlZr2W2F^MBvwX%RsA64rfP_m0~K z|LA)r12XtW!qPqG!`7t#-LuZGQE>*7{F9s9TlYx)Su_9nRSjTxJW&7q`}6(yz4_|1 zK_S9tx@yI#IcI_4v-*Ofm+Jl6+Mm^H=k3kcmtS6HogQtMeD>uuTCXBY3^JoBsgAkZbtGz->WJO5Iy z)UT$ba(bWE`%iD5{)-XY>hY8Bl?K?QN$b9?S+RM2koLR(ng%Sv4_cpw|5<$g;I(+Wv63HKg-72BN=d-mS%JKIa^ zHH+j~+Y-2H4Ev|OzgYZy>+?;EyVvYU1_o~M1IMa*x$^blViKk6_FP*$e|qr)L$G@k z_8zU6_Fp*b^+)Y@5@64(tYwP5d(BA;%ms#3<|imF`_ze{a{Tzb`@`-1@!N z^w+=nZ$mk`ffimC*>Pj{k;PxcwlDks`E_m0uT|eKuX(BqN;TmRk|G~1-Q0b-I&@dq zxqF+o{i}QZw=Zb7eVT6mLSQW2ViMoF{=r(Ncd?7ESr)whv27l+{NEiVufL_~=k_u= zZ+OWabNN@-{_us-&lfF@Yb|*F*2XLGJ5Z-jWB9G87dJKD*nxfFC(^DAN<#yjr%*C< aJ;QsBl-dPy)t7=vv diff --git a/agb/gfx/test_logo_basic.png b/agb/gfx/test_logo_basic.png new file mode 100644 index 0000000000000000000000000000000000000000..97b139de6619b203c8c69d1048fa543b9c6f8d9b GIT binary patch literal 1148 zcmeAS@N?(olHy`uVBq!ia0vp^AAooP2OE$yy8SQ}NHG=%xjQkeJ16s!fq})$)5S5Q zV$R#UXLE%e8QKzib~tdCI64{>Focn*r}ShRi3_S?D7l`HeU|K9uh@04HnMI@Sh;~zw2PW>ve z_j~c$E1RcBHY(oO!m9T)^cK(7`sG2-BE8of5XjlZr2W2F^MBvwX%RsA64rfP_m0~K z|LA)r12XtW!qPqG!`7t#-LuZGQE>*7{F9s9TlYx)Su_9nRSjTxJW&7q`}6(yz4_|1 zK_S9tx@yI#IcI_4v-*Ofm+Jl6+Mm^H=k3kcmtS6HogQtMeD>uuTCXBY3^JoBsgAkZbtGz->WJO5Iy z)UT$ba(bWE`%iD5{)-XY>hY8Bl?K?QN$b9?S+RM2koLR(ng%Sv4_cpw|5<$g;I(+Wv63HKg-72BN=d-mS%JKIa^ zHH+j~+Y-2H4Ev|OzgYZy>+?;EyVvYU1_o~M1IMa*x$^blViKk6_FP*$e|qr)L$G@k z_8zU6_Fp*b^+)Y@5@64(tYwP5d(BA;%ms#3<|imF`_ze{a{Tzb`@`-1@!N z^w+=nZ$mk`ffimC*>Pj{k;PxcwlDks`E_m0uT|eKuX(BqN;TmRk|G~1-Q0b-I&@dq zxqF+o{i}QZw=Zb7eVT6mLSQW2ViMoF{=r(Ncd?7ESr)whv27l+{NEiVufL_~=k_u= zZ+OWabNN@-{_us-&lfF@Yb|*F*2XLGJ5Z-jWB9G87dJKD*nxfFC(^DAN<#yjr%*C< aJ;QsBl-dPy)t7=vv literal 0 HcmV?d00001 diff --git a/agb/src/display/example_logo.rs b/agb/src/display/example_logo.rs index 66d98442..4b6295f2 100644 --- a/agb/src/display/example_logo.rs +++ b/agb/src/display/example_logo.rs @@ -1,6 +1,7 @@ use super::tiled::{RegularMap, TiledMap, VRamManager}; crate::include_background_gfx!(crate, agb_logo, test_logo => deduplicate "gfx/test_logo.png"); +crate::include_background_gfx!(crate, agb_logo_basic, test_logo => deduplicate "gfx/test_logo_basic.png"); pub fn display_logo(map: &mut RegularMap, vram: &mut VRamManager) { vram.set_background_palettes(agb_logo::PALETTES); @@ -11,6 +12,15 @@ pub fn display_logo(map: &mut RegularMap, vram: &mut VRamManager) { map.set_visible(true); } +pub fn display_logo_basic(map: &mut RegularMap, vram: &mut VRamManager) { + vram.set_background_palettes(agb_logo_basic::PALETTES); + + map.fill_with(vram, &agb_logo_basic::test_logo); + + map.commit(vram); + map.set_visible(true); +} + #[cfg(test)] mod tests { use crate::display::{tiled::RegularBackgroundSize, Priority};