From 3ee3d6e3469c366c8960d23dea408355902f3d34 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 11 Jan 2023 10:11:11 -0500 Subject: [PATCH 1/2] Support reducing png bit depth --- tools/gbagfx/convert_png.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/gbagfx/convert_png.c b/tools/gbagfx/convert_png.c index 4f1b39e6d..a5fefbd8b 100644 --- a/tools/gbagfx/convert_png.c +++ b/tools/gbagfx/convert_png.c @@ -62,10 +62,7 @@ static unsigned char *ConvertBitDepth(unsigned char *src, int srcBitDepth, int d for (j = 8 - srcBitDepth; j >= 0; j -= srcBitDepth) { - unsigned char pixel = (srcByte >> j) % (1 << srcBitDepth); - - if (pixel >= (1 << destBitDepth)) - FATAL_ERROR("Image exceeds the maximum color value for a %ibpp image.\n", destBitDepth); + unsigned char pixel = (srcByte >> j) % (1 << destBitDepth); *dest |= pixel << destBit; destBit -= destBitDepth; if (destBit < 0) From 3009cc7220dedbee237b962693eb80db317b096e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 11 Jan 2023 10:12:16 -0500 Subject: [PATCH 2/2] Colorize door animations that use multiple palettes --- .../door_anims/battle_dome_pre_battle_room.png | Bin 488 -> 432 bytes graphics/door_anims/dewford.png | Bin 436 -> 405 bytes graphics/door_anims/fallarbor_dark_roof.png | Bin 432 -> 384 bytes .../door_anims/lilycove_dept_store_elevator.png | Bin 345 -> 298 bytes graphics/door_anims/littleroot.png | Bin 426 -> 391 bytes graphics/door_anims/mossdeep.png | Bin 411 -> 377 bytes graphics/door_anims/oldale.png | Bin 434 -> 397 bytes graphics/door_anims/poke_mart.png | Bin 419 -> 355 bytes graphics/door_anims/slateport.png | Bin 425 -> 387 bytes .../door_anims/trainer_hill_roof_elevator.png | Bin 344 -> 296 bytes graphics/door_anims/verdanturf.png | Bin 451 -> 403 bytes 11 files changed, 0 insertions(+), 0 deletions(-) diff --git a/graphics/door_anims/battle_dome_pre_battle_room.png b/graphics/door_anims/battle_dome_pre_battle_room.png index 6e4e7ee183d55c4016dfef13fcd70218f9b96294..114ed3a0082cd8568ca3705290f443474e11d16c 100644 GIT binary patch delta 418 zcmaFCyn%UwL_G&H0|SFHKhq>2#aJBV?!>U}oXkrgCn3Nm#PvVJ|Dd3(DN~l5-Fx)^ z|Nr-{KC52S-F;ETSNCcP-1AcSpJe#|UNf5d=H@I+^=p>QIl6bw zy{l9Hznik9{)Oclpk@C&T^vI!de2UZR8D*LG}Z~0{3(Gn71#mny}osVDE_yHTpXDyO|F<$JL*8NRv8H67Xk*{4?kL z9cS9t{yH*`iMN?e2}C>+nX!^#gKU9t$nWWQL);V_=C51uJ?ZhKxUx)r<_jemPLtXk znFSBZKRidL0-R44$rjF6*2UngHPp$7BEi literal 488 zcmeAS@N?(olHy`uVBq!ia0vp^0zjO=0wfr|csbMpDVB6cUq=Rpjs4tz5?O(KrX+87 z7Y2SSBfG^w9(#$WuPgf#Mp0Hx>lX?qd4WO#$%%etAR34jfEWx?4=`V4U|?kMba4#P zIKTFSV&7o{0oDsE#q?HQ>3*}SA~NGFlk?e0#a}E=SGR63OH3A-S$S^5XWOtjUUwHr zsra9axc~1+>P0S1@BKA*^W=YC|Ni{F=Hoh>KQ})7{Iexn#$B-X%G-PVN*90IZpl?Q z+M4TnImSiKcXO+7q|qdgAMARpvkT8OxEVx;owtb=D?Vwo#<(gbZBFIU2(i8E<=<4k zN{AiQOv@j1O687^*1>=+Z5om&uD_N0@|S;dee zmiM}7{mUAQy3^gMioifoEpd$~Nl7e8wMs5Z1yT$~21W+D28Oyuh9L%~Rwjm4rk2_U l237_Jc4_QSP&DM`r(~v8;@04Ay*~mJ?4GWEF6*2Ung9awu&@9C diff --git a/graphics/door_anims/dewford.png b/graphics/door_anims/dewford.png index 86ac1fe4a673c8f452782bce6c52b83df0a77ef8..708b52ccb9034b6f1b37c1138bd45b7c5cc4de91 100644 GIT binary patch delta 390 zcmdnOJe7HZL_G&H0|SFHKhq>2#aJBV?!>U}oXkrgCn3Nm#8pBw=>Px!_ny7md-mC! zE%%z6yOWZt9lf$N4Wo+peoI>O?%lH`_s%w7-I8^7PEhgDCAie@-P;UN48rp}i}3heLeP|70=8v-~Qux7MZ_*7!R& zP5GN~-0^(vI#tKT{~U7Hxz1bhyjXX}m#td_TAfmEIEnC0?6+}xvgwzl&z1A1cR6&L zu`HBIaGoG6y1>--LBn0^Uz*R(?w=x{F+G$iVKHaa5s$|DEZG!=N>if^F`0ksvL-Z3 zDfJ&-fA+Yg@{@+x<6EA8No(K7;P6doGy64L<|lbIk<2rKGxuw+X0ZNJw(-r5e+GPN zd?5vPyO#XiAvNRwoc`H$HO#M##d`V5{3(wi@4J-3ezr5O-9LY1TJzTE;=)>yi))G literal 436 zcmeAS@N?(olHy`uVBq!ia0vp^0zjO=0wfr|csbMpDVB6cUq=Rpjs4tz5?O(KrX+87 z7Y2SSBfG^w9(#$WuPgf#Mp0Hh!J1psWPm~f$%%etAR34jfEWx?4=`T^GR}CqIEHAP zKYPJi=#T>kTf(}ASTEZy^V@y8o?CNfo_fd?=NEC}ut=1av31>K9l^RC(_X$~H@jkF zYVV-*g#A%Fiw3t!_HkWqgY5dRXKvl@j1bsq=~LX0>UoCoVd?_W$i~9up?jXBa-O)B z$F<bbZth@M&4-`bbbWdDKC^b^NEAw^zX^1f*rKfxPB*W%i1RW zsOWmm`=3Xq^_Lw^?sYvL*TInSm47&GsSJW}LluRP6u(R{)DFTr;D zC)RiF_-tQz66i1064!{5l*E!$tK_0oAjM#0U}T_cV5n*WnyM!Xs&HwU}a#y haX!-uMMG|WN@iLmZVi=_F1CS!(9_k=Wt~$(699v#m5BfV diff --git a/graphics/door_anims/fallarbor_dark_roof.png b/graphics/door_anims/fallarbor_dark_roof.png index ec43e37f985cddb24a1ad810a1cd47e42dd8a699..0785945d3ce6fa5569ca2e4a60e48d66f3f59154 100644 GIT binary patch delta 369 zcmdnM+`v3RqMn19fq_AppJ@`1Vk{1FcVbv~PUa<$lMvt&;wq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@N?(olHy`uVBq!ia0vp^0zjO=0wfr|csbMpDVB6cUq=Rpjs4tz5?O(KrX+87 z7Y2SSBfG^w9(#$WuPgf#Mp0G+{-7yS7663=k`w*PKr|3505KS(9$>x-WE6V3IEHAP zPqtuY<=MTEftz{VGd+=n#68VSZPw|E0tXL-1jogxfB#TfY1uS!+O+cbZ#Qo-sWNDo zcCWfS$$G-acd{Lf<%)OCG7H=BJ5GrKD*7gNWXE(jemBdO#+2%x)*8tZTKZ*L>MSB8 z3fdD}_!(wi4zp@LVfqbdxoU}PL`h0wNvc(HQ7VvPFfuSQ&^0jBH8Kn_FtswVurf5& oHZZUeIwZhlH;S|x4`AC7#G0cv3IboFyt=akR{0G;P$^#A|> diff --git a/graphics/door_anims/littleroot.png b/graphics/door_anims/littleroot.png index 8c1ca34a5238a2854838d7f42ebb7aa620a0bae8..599517ceb14a8816cb5cfcec6afe040b11b68132 100644 GIT binary patch delta 376 zcmZ3*+|E2fqMn19fq_AppJ@`1Vk{1FcVbv~PUa<$lMvt&;wqsT^#A|=XZP-1y?S)- z(KXG@-AP&1j$T=shEYqdKFivB^x3^RXOC8ISyH{EJE{2S5-jSIpz7zG{gyQ6-T!CR z_tq5e?Jk~^RSZ=Bss6!@Pe9AAdb&7qd_c%}m15 zd2B6AQ*;k3Q`jn3H0=xDBkj*qHXHU_nEgpX{u1}^WjROdWS9Ht!wWcK z0)Bn{?f7ePce{}Gsi;H-@e}e4kF`12We*(wEXsV&?{~?`ke%$aniaWnHy@j{RNYyj=J6WYCB5Z& zQ_SxD4!p(k-tiX8TG=IAAFnNC)2U7u7EsGx&ZF>Khhde3)|>{9je8!HxkOJo`_y3- zgHkK2(3ykNyp`K`Gt9JPompf1;o#0mJJseZ?C0lNA>5$6BI#vgDQCD=hqlR+$=i=B zYXt36+SDV$>1B8OMYvr}somYi=Na)&r+ez$QU2!ePOv(G_hG)>A4a=^TK+@bn>c{J zQ7v(eC`m~yNwrEYN(E93Mg~R(x(0^2Mus5@ z(oGJ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ucLK6V_V2|Gb diff --git a/graphics/door_anims/poke_mart.png b/graphics/door_anims/poke_mart.png index 2d9b7d3190853e309aa905fc601b64f9f860d7ed..12a1760690c400f4f00d0fe9f4f3da4c0a70c3ee 100644 GIT binary patch literal 355 zcmeAS@N?(olHy`uVBq!ia0vp^0zjO=!3-po`I#mGDaPU;cPEB*=VV@jWCDCbTqQJv z{{R1f@7cS(XP?d4a<93$J1ME!(JM>SFsgX(x1=@i{_kymH>LPqR?=C=pyH!TaH-$B zw;7@yL@v1()P2;ecnwf}+Q!FMfp%^5ba4!^=zTlMo9~bTkBe?oZl|%syLz8P7H6+> z23?gsv+BKOkZ`q!jv%Mvgj!AoyXc9&Vn01PHVPU%bum;?J-KJn1;w+Rr*+;rYw#$_ z1^xfz@Wn~di0fVJ2l0s&`gUis`b$}7T#b9rnS4!p(dR4bhP@xmeRSVGZ44$rjF6*2UngB4cqhJ64 literal 419 zcmeAS@N?(olHy`uVBq!ia0vp^0zjO=0wfr|csbMpDVB6cUq=Rpjs4tz5?O(KrX+87 z7Y2SSBfG^w9(#$WuPgf#Mp0HH_PokEkZytGM87f+4a5pS3n^C(%jyAKJt8Xa(Q2BWdwIkql~G0 zfXmsMSHE8~9jOu9d0s+#AJ5_Bx}z;GSJ~fQzN)50)FG!<{$0&9j;;&G%lGv+itO`m zGrRNmt=;M0HSPb_Z>>GXep820Wa4b|fELrASC-e#TO&1nUi1FiK%h5NOI#yLQW8s2 zt&)pUffR$0fsui(fuXLEVTggLm8pT1fw{H;kTl@dqMn19fq_AppJ@`1Vk{1FcVbv~PUa<$lMvt&;wqsT^#A|=d(YnOJ^O6V zmV3?3-APH+j$T=shEc_Pza_1C_kVBmyD7!@vXag^1{EJ&0#X0$*}Jo6?;YK8uex~- zT>aUzQ`St0x_9;6(JgzI%vsW$wFanuZ~bZ0yFkk>db&7FzqM ze4lOfXYlHzBpNaJNG(aeSCt@haOV`JumJl+-lxkg7}y`MX_`icD`tf(=vy(#L4Iby z``m|YDGi4v%%9i)wdN*|2cHeYxdnUHGe|65+P+rv#IYd0)6b^pEy%H8P!(_2V$;}J z)6r7%hV|H4i@)x6e9t~|e+ji-vw!KM0>0aId=9x4@?Tua4)(m6U2}oG;*rU#>&N6Q QfWBk!boFyt=akR{0BoqL^#A|> literal 425 zcmeAS@N?(olHy`uVBq!ia0vp^0zjO=0wfr|csbMpDVB6cUq=Rpjs4tz5?O(KrX+87 z7Y2SSBfG^w9(#$WuPgf#Mp0HHYezAr=|CZYw`53d3)2A_gru+GIm$m+BLJGs{5XGNG^|wYG5^w&?WVc-z%IM80I=3 zHtJh^uJP0lhSL@iT{({#en0MLe6lvQaCU~~46Su+yQDc{?mdooERu|A(`j^ES1fwr zfr!S1?KX=YCoMdbZF9yjY6H`{hyJhJAGHhV1UUa_;}>VPU8tDDq)Zxy65e?flZ~{#NVf=gzCYa9Ofy`PECx-!`1j7p%U)_5VfteO8lhU!yXn1whZJ zmbgZgq$HN4S|t~y0x1R~10w@n14CUS!w>^gD^mk2Q%h|F11kdq0jnC}Q!>*k Wacf8{=UxWXz~JfX=d#Wzp$Py(5st|K diff --git a/graphics/door_anims/trainer_hill_roof_elevator.png b/graphics/door_anims/trainer_hill_roof_elevator.png index dc9c6bcee9d61e7f6113cf804b819a9220ef2b28..a143b8c59084b49001fad666128766b8934557c0 100644 GIT binary patch delta 281 zcmcb?w1R1ZL_G&H0|SFHKhq>2#aJBV?!>U}oXkrgCn3Nm#C1*cUPrI2>gwt(TbBI) z|Nq{-|68`)Yi?c>H09`;v)?SUy8ky9FZsVEs=GSr=$0u{x*_V5lDg+y1u93VPg?Wt z=(lH6?wtiH^P19Zm=*Q^=>KosM_<+7&bbS;tjyEJF~p+x?IcI81_K_J$zehMbqD_c zzq}-HLu8kGr^S{D=X7r`wRO<%RCO?Q*gBVv&szX%>p+puAtU7FbBTx&gr z1wsxVKh{OW^tHAf5-!tuekN(t+S<>W|LS^PZ~u5V;Dmkfjhyqv6;`bWDyZR1IwQPh@Z@K^bE$lS zK}EZI4MTSRl?B%R(>4L^RxNRjC`m~yNwrEYN(E93Mg~R(x(0^2Mus52#aJBV?!>U}oXkrgCn3Nm#8pBw=>Px!_ny7md-mC! zE%%z6yOWZt9lf$N4Wo+peoI>O?%lH`_s%w7-I8^7PEhgDCDmK@&iTK$`re$Vz15a; zqL9_EIr@Linl)(ZbLul=a)6dS^mK6yvFLq!=`3Hf0uRFjHK)!KdwRatU%RPvL4Lcc z-1M)9e(^fqcJe(RmA$H#m3`%3kJ_)+GA>KrO8n-!$g+U5Vn)MR77<~&Np{AJv2ic# z{?$92n^`c~VOe6V=^Ex21?SjX8miozbL12S+uH&8{L z?e`u07Kc*MF`^y?lx!pXKo`lRsZhW$7B7p)9Y zwcyH{z0rGvWG&}p@3b}UZPHhJx&+$urzRxqxKS|MFeKCd-t7H%{4bs_KeNBWD5_ik zq1Td!@j!y>|F13c*)PnP@b}Ma3pb!QRZCnWN>UO_QmvAUQh^kMk%5tcu7RPhkzt5| usg