shithub: sce

Download patch

ref: 014f77e085d1bf1e285ee7ef29796b66d0e592e0
parent: 294af48f3fc87bcb7f619ea6696072695335d2a1
author: qwx <qwx@sciops.net>
date: Tue Jul 6 03:27:44 EDT 2021

genspr: correct mineral offsets yet again

--- a/utils/genspr
+++ b/utils/genspr
@@ -137,14 +137,14 @@
 		fi = sprintf(gf ".%05d.bit", frm)
 		fo = sprintf(u ".%02d.00.bit", i-5)
 		split(pipe("read -c 60 " fi), rect)
-		dx = rect[2] - ((dim[1] / 2 - a[3]) >= 32 ? 32 : 0)
-		dy = rect[3] - ((dim[2] / 2 - a[4]) >= 32 ? 32 : 0)
+		dx = 0
+		dy = -31
 		exec("iconv -c r8g8b8 " fi " | crop -t " dx " " dy " >" fo)
 		fi = sprintf(sf ".%05d.bit", frm)
 		fo = sprintf(u ".%02d.00.s.bit", i-5)
 		split(pipe("read -c 60 " fi), srect)
-		dx = srect[2] -(32 - rect[2])
-		dy = srect[3] -(32 - rect[3])
+		dx = srect[2] - 32
+		dy = srect[3] - 31
 		exec("sceshb " fi " " fo " " dx " " dy)
 	}
 	exec("rm -f " tmp " " gf "* " sf "* ")