mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
fucked up while making ActorValue delegated – not applicable; can't have default value
making commits for files to keep so that I can discard changes
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -241,9 +241,9 @@ class BFVM(
|
||||
|
||||
if (r1 in bfOpcodes) {
|
||||
if (optimizeLevel >= 1) {
|
||||
// [-]
|
||||
// [-] or [+]
|
||||
if (r1 == JPZ) {
|
||||
if (program[pc + 1] == DEC && program[pc + 2] == JPN) {
|
||||
if ((program[pc + 1] == DEC || program[pc + 1] == INC) && program[pc + 2] == JPN) {
|
||||
pc += 3
|
||||
putOp(LDZ)
|
||||
continue
|
||||
|
||||
@@ -142,7 +142,7 @@ class StateInGame : BasicGameState() {
|
||||
|
||||
|
||||
// test actor
|
||||
addNewActor(PlayerBuilderCynthia())
|
||||
//addNewActor(PlayerBuilderCynthia())
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,51 +8,51 @@ import java.util.HashMap
|
||||
object CommandDict {
|
||||
|
||||
internal val dict: HashMap<String, ConsoleCommand> = hashMapOf(
|
||||
Pair("echo", Echo),
|
||||
Pair("error", EchoError),
|
||||
Pair("setav", SetAV),
|
||||
Pair("qqq", QuitApp),
|
||||
Pair("codex", CodexEdictis),
|
||||
Pair("export", ExportMap),
|
||||
Pair("gc", ForceGC),
|
||||
Pair("getav", GetAV),
|
||||
Pair("getlocale", GetLocale),
|
||||
Pair("togglenoclip", ToggleNoClip),
|
||||
Pair("nc", ToggleNoClip),
|
||||
Pair("setlocale", SetLocale),
|
||||
Pair("zoom", Zoom),
|
||||
Pair("teleport", Teleport),
|
||||
Pair("tp", Teleport),
|
||||
Pair("cat", CatStdout),
|
||||
Pair("exportav", ExportAV),
|
||||
Pair("setgl", SetGlobalLightOverride),
|
||||
Pair("getfaction", GetFactioning),
|
||||
Pair("auth", Authenticator),
|
||||
Pair("batch", Batch),
|
||||
Pair("settime", SetTime),
|
||||
Pair("gettime", GetTime),
|
||||
Pair("settimedelta", SetTimeDelta),
|
||||
Pair("help", Help),
|
||||
Pair("version", Version),
|
||||
Pair("seed", Seed),
|
||||
Pair("println", EchoConsole),
|
||||
Pair("inventory", Inventory),
|
||||
Pair("avtracker", AVTracker),
|
||||
Pair("actorslist", ActorsList),
|
||||
Pair("setscale", SetScale),
|
||||
Pair("kill", KillActor),
|
||||
"echo" to Echo,
|
||||
"error" to EchoError,
|
||||
"setav" to SetAV,
|
||||
"qqq" to QuitApp,
|
||||
"codex" to CodexEdictis,
|
||||
"export" to ExportMap,
|
||||
"gc" to ForceGC,
|
||||
"getav" to GetAV,
|
||||
"getlocale" to GetLocale,
|
||||
"togglenoclip" to ToggleNoClip,
|
||||
"nc" to ToggleNoClip,
|
||||
"setlocale" to SetLocale,
|
||||
"zoom" to Zoom,
|
||||
"teleport" to Teleport,
|
||||
"tp" to Teleport,
|
||||
"cat" to CatStdout,
|
||||
"exportav" to ExportAV,
|
||||
"setgl" to SetGlobalLightOverride,
|
||||
"getfaction" to GetFactioning,
|
||||
"auth" to Authenticator,
|
||||
"batch" to Batch,
|
||||
"settime" to SetTime,
|
||||
"gettime" to GetTime,
|
||||
"settimedelta" to SetTimeDelta,
|
||||
"help" to Help,
|
||||
"version" to Version,
|
||||
"seed" to Seed,
|
||||
"println" to EchoConsole,
|
||||
"inventory" to Inventory,
|
||||
"avtracker" to AVTracker,
|
||||
"actorslist" to ActorsList,
|
||||
"setscale" to SetScale,
|
||||
"kill" to KillActor,
|
||||
|
||||
// Test codes
|
||||
Pair("bulletintest", SetBulletin),
|
||||
Pair("gsontest", GsonTest),
|
||||
Pair("tips", PrintRandomTips),
|
||||
Pair("langtest", LangTest),
|
||||
Pair("testgetlight", TestGetLight),
|
||||
Pair("spawnball", SpawnPhysTestBall),
|
||||
Pair("spawntorch", SpawnTikiTorch),
|
||||
Pair("musictest", MusicTest),
|
||||
Pair("spawntapestry", SpawnTapestry),
|
||||
Pair("imtest", JavaIMTest)
|
||||
"bulletintest" to SetBulletin,
|
||||
"gsontest" to GsonTest,
|
||||
"tips" to PrintRandomTips,
|
||||
"langtest" to LangTest,
|
||||
"testgetlight" to TestGetLight,
|
||||
"spawnball" to SpawnPhysTestBall,
|
||||
"spawntorch" to SpawnTikiTorch,
|
||||
"musictest" to MusicTest,
|
||||
"spawntapestry" to SpawnTapestry,
|
||||
"imtest" to JavaIMTest
|
||||
)
|
||||
|
||||
operator fun get(commandName: String): ConsoleCommand {
|
||||
|
||||
@@ -133,4 +133,8 @@ class Hitbox(x1: Double, y1: Double, width: Double, height: Double) {
|
||||
fun fromTwoPoints(x1: Double, y1: Double, x2: Double, y2: Double) =
|
||||
Hitbox(x1, y1, x2 - x1, y2 - y1)
|
||||
}
|
||||
|
||||
operator fun minus(other: Hitbox): Vector2 {
|
||||
return Vector2(other.centeredX - this.centeredX, other.centeredY - this.centeredY)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,8 +163,8 @@ class WorldTime(initTime: Long = 0L) {
|
||||
private fun Long.toPositiveInt() = this.and(0x7FFFFFFF).toInt()
|
||||
private fun Long.abs() = Math.abs(this)
|
||||
|
||||
/** Format: "%A %d %B %Y %X" */
|
||||
fun getFormattedTime() = "${getDayNameShort()} " +
|
||||
/** Format: "%A, %d %B %Y %X" */
|
||||
fun getFormattedTime() = "${getDayNameShort()}, " +
|
||||
"$days " +
|
||||
"${getMonthNameShort()} " +
|
||||
"$years " +
|
||||
|
||||
Reference in New Issue
Block a user