mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 14:04:05 +09:00
monitor adjustment screen, changed "calibrate" to "adjust" (NOT the STRING_ID of langpack)
Former-commit-id: ffae41e5876e54e2e0aedb5a93092db8e8f75d01 Former-commit-id: 65883b385a205d47b76c60f18a91186c2be922b2
This commit is contained in:
@@ -40,7 +40,7 @@ abstract class Actor : Comparable<Actor>, Runnable {
|
||||
var ret: Int
|
||||
do {
|
||||
ret = HQRNG().nextInt().and(0x7FFFFFFF) // set new ID
|
||||
} while (Terrarum.game.hasActor(ret) || ret < ItemPropCodex.ITEM_UNIQUE_MAX) // check for collision
|
||||
} while (Terrarum.ingame.hasActor(ret) || ret < ItemPropCodex.ITEM_UNIQUE_MAX) // check for collision
|
||||
return ret
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ open class ActorWithBody : Actor(), Visible {
|
||||
@Transient var sprite: SpriteAnimation? = null
|
||||
@Transient var spriteGlow: SpriteAnimation? = null
|
||||
|
||||
@Transient private val map: GameMap = Terrarum.game.map
|
||||
@Transient private val map: GameMap = Terrarum.ingame.map
|
||||
|
||||
var hitboxTranslateX: Double = 0.0// relative to spritePosX
|
||||
var hitboxTranslateY: Double = 0.0// relative to spritePosY
|
||||
@@ -234,7 +234,7 @@ open class ActorWithBody : Actor(), Visible {
|
||||
baseHitboxH * scale)
|
||||
}
|
||||
|
||||
override fun run() = update(Terrarum.appgc, Terrarum.game.UPDATE_DELTA)
|
||||
override fun run() = update(Terrarum.appgc, Terrarum.ingame.UPDATE_DELTA)
|
||||
|
||||
/**
|
||||
* Add vector value to the velocity, in the time unit of single frame.
|
||||
@@ -929,8 +929,8 @@ open class ActorWithBody : Actor(), Visible {
|
||||
private fun div16TruncateToMapWidth(x: Int): Int {
|
||||
if (x < 0)
|
||||
return 0
|
||||
else if (x >= Terrarum.game.map.width shl 4)
|
||||
return Terrarum.game.map.width - 1
|
||||
else if (x >= Terrarum.ingame.map.width shl 4)
|
||||
return Terrarum.ingame.map.width - 1
|
||||
else
|
||||
return x and 0x7FFFFFFF shr 4
|
||||
}
|
||||
@@ -938,8 +938,8 @@ open class ActorWithBody : Actor(), Visible {
|
||||
private fun div16TruncateToMapHeight(y: Int): Int {
|
||||
if (y < 0)
|
||||
return 0
|
||||
else if (y >= Terrarum.game.map.height shl 4)
|
||||
return Terrarum.game.map.height - 1
|
||||
else if (y >= Terrarum.ingame.map.height shl 4)
|
||||
return Terrarum.ingame.map.height - 1
|
||||
else
|
||||
return y and 0x7FFFFFFF shr 4
|
||||
}
|
||||
|
||||
@@ -75,11 +75,11 @@ open class NPCIntelligentBase : ActorWithBody()
|
||||
}
|
||||
|
||||
override fun addHouseTile(x: Int, y: Int) {
|
||||
houseTiles.add(Terrarum.game.map.width * y + x)
|
||||
houseTiles.add(Terrarum.ingame.map.width * y + x)
|
||||
}
|
||||
|
||||
override fun removeHouseTile(x: Int, y: Int) {
|
||||
houseTiles.remove(Terrarum.game.map.width * y + x)
|
||||
houseTiles.remove(Terrarum.ingame.map.width * y + x)
|
||||
}
|
||||
|
||||
override fun clearHouseDesignation() {
|
||||
|
||||
@@ -10,6 +10,6 @@ class ThreadActorUpdate(val startIndex: Int, val endIndex: Int,
|
||||
val gc: GameContainer, val delta: Int) : Runnable {
|
||||
override fun run() {
|
||||
for (i in startIndex..endIndex)
|
||||
Terrarum.game.actorContainer[i].update(gc, delta)
|
||||
Terrarum.ingame.actorContainer[i].update(gc, delta)
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ object CollisionSolver {
|
||||
collCandidateY.clear()
|
||||
|
||||
// mark list x
|
||||
Terrarum.game.actorContainer.forEach { it ->
|
||||
Terrarum.ingame.actorContainer.forEach { it ->
|
||||
if (it is ActorWithBody) {
|
||||
collListX.add(CollisionMarkings(it.hitbox.hitboxStart.x, STARTPOINT, it))
|
||||
collListX.add(CollisionMarkings(it.hitbox.hitboxEnd.x, ENDPOINT, it))
|
||||
@@ -68,7 +68,7 @@ object CollisionSolver {
|
||||
collCandidateStack.clear()
|
||||
|
||||
// mark list y
|
||||
Terrarum.game.actorContainer.forEach { it ->
|
||||
Terrarum.ingame.actorContainer.forEach { it ->
|
||||
if (it is ActorWithBody) {
|
||||
collListY.add(CollisionMarkings(it.hitbox.hitboxStart.y, STARTPOINT, it))
|
||||
collListY.add(CollisionMarkings(it.hitbox.hitboxEnd.y, ENDPOINT, it))
|
||||
|
||||
Reference in New Issue
Block a user