wtf that was octal not decimal

This commit is contained in:
minjaesong
2022-04-18 12:06:36 +09:00
parent 9e990ccdf4
commit 7cddb2660e

View File

@@ -735,6 +735,7 @@ open class GraphicsAdapter(private val assetsRoot: String, val vm: VM, val confi
// must reset positions as pixmaps expect them to be zero // must reset positions as pixmaps expect them to be zero
framebuffer.pixels.position(0) framebuffer.pixels.position(0)
framebuffer2.pixels.position(0)
chrrom.pixels.position(0) chrrom.pixels.position(0)
framebuffer2.setColor(-1);framebuffer2.fill() framebuffer2.setColor(-1);framebuffer2.fill()
@@ -748,8 +749,8 @@ open class GraphicsAdapter(private val assetsRoot: String, val vm: VM, val confi
if (xoff in -(280 - 1) until 280) { if (xoff in -(280 - 1) until 280) {
for (x in xs) { for (x in xs) {
val colour = layerOrder.map { val colour = layerOrder.map { layer ->
val colourIndex = framebuffer.pixels.get(280 * 224 * it + (y * 224 + x)).toUint() val colourIndex = framebuffer.pixels.get((280*224*layer) + (y * 280 + x)).toUint()
Color(paletteOfFloats[4*colourIndex], paletteOfFloats[4*colourIndex+1], paletteOfFloats[4*colourIndex+2], paletteOfFloats[4*colourIndex+3]) Color(paletteOfFloats[4*colourIndex], paletteOfFloats[4*colourIndex+1], paletteOfFloats[4*colourIndex+2], paletteOfFloats[4*colourIndex+3])
}.fold(Color(0)) { dest, src -> }.fold(Color(0)) { dest, src ->
// manually alpha compositing // manually alpha compositing
@@ -1851,7 +1852,7 @@ void main() {
"4231", "4231",
"4312", "4312",
"4321", "4321",
).map { s -> (0..3).map { s[it].toInt() - 61 } } ).map { s -> (0..3).map { s[it].toInt() - 49 } }
val LAYERORDERS2 = listOf( // [drawn first, second], zero-indexed val LAYERORDERS2 = listOf( // [drawn first, second], zero-indexed
"12", "12",
@@ -1878,7 +1879,7 @@ void main() {
"21", "21",
"12", "12",
"21", "21",
).map { s -> (0..1).map { s[it].toInt() - 61 } } ).map { s -> (0..1).map { s[it].toInt() - 49 } }
} }
} }