mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 10:34:06 +09:00
can see camera working but not the actor gravity
This commit is contained in:
@@ -289,11 +289,11 @@ import java.util.*
|
||||
}
|
||||
|
||||
fun drawRectBack(x: Int, y: Int, w: Int, h: Int, c: Int = color) {
|
||||
(0..w - 1).forEach {
|
||||
for (it in 0..w - 1) {
|
||||
vram.setBackgroundPixel(x + it, y, c)
|
||||
vram.setBackgroundPixel(x + it, y + h - 1, c)
|
||||
}
|
||||
(1..h - 2).forEach {
|
||||
for (it in 1..h - 2) {
|
||||
vram.setBackgroundPixel(x, y + it, c)
|
||||
vram.setBackgroundPixel(x + w - 1, y + it, c)
|
||||
}
|
||||
@@ -306,11 +306,11 @@ import java.util.*
|
||||
}
|
||||
|
||||
fun drawRectFore(x: Int, y: Int, w: Int, h: Int, c: Int = color) {
|
||||
(0..w - 1).forEach {
|
||||
for (it in 0..w - 1) {
|
||||
vram.setForegroundPixel(x + it, y, c)
|
||||
vram.setForegroundPixel(x + it, y + h - 1, c)
|
||||
}
|
||||
(1..h - 2).forEach {
|
||||
for (it in 1..h - 2) {
|
||||
vram.setForegroundPixel(x, y + it, c)
|
||||
vram.setForegroundPixel(x + w - 1, y + it, c)
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ import java.util.*
|
||||
rgba, 0,
|
||||
rgba.size - displacement
|
||||
)
|
||||
(rgba.size - 1 downTo rgba.size - displacement + 1).forEach { rgba[it] = 0.toByte() }
|
||||
for (it in rgba.size - 1 downTo rgba.size - displacement + 1) { rgba[it] = 0.toByte() }
|
||||
}
|
||||
else {
|
||||
System.arraycopy(
|
||||
@@ -211,7 +211,7 @@ import java.util.*
|
||||
rgba, displacement,
|
||||
rgba.size - displacement
|
||||
)
|
||||
(0..displacement - 1).forEach { rgba[it] = 0.toByte() }
|
||||
for (it in 0..displacement - 1) { rgba[it] = 0.toByte() }
|
||||
}
|
||||
|
||||
cursorY += -amount
|
||||
|
||||
Reference in New Issue
Block a user