mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-06 08:38:30 +09:00
Compare commits
135 Commits
v0.3.2
...
v0.3.3-tes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81ebf7a8ef | ||
|
|
d5a8d098bb | ||
|
|
cc55e563f0 | ||
|
|
64ef30e445 | ||
|
|
fbc700508f | ||
|
|
37492dc8a0 | ||
|
|
b0e4bd31eb | ||
|
|
0b5e3d7b77 | ||
|
|
b47cc17afd | ||
|
|
6c97a9d5ab | ||
|
|
7259ca616c | ||
|
|
70b9cebbd0 | ||
|
|
274be20e25 | ||
|
|
c576d087b4 | ||
|
|
699cc4dd74 | ||
|
|
8fa9ddeec1 | ||
|
|
c4deba14da | ||
|
|
cf98c13111 | ||
|
|
d0e1555ad0 | ||
|
|
50eac69e3e | ||
|
|
c45cab388e | ||
|
|
7b3ac9cd06 | ||
|
|
08b1d93d54 | ||
|
|
da7ecaa75b | ||
|
|
65b610ce01 | ||
|
|
6a78cf6a41 | ||
|
|
1e98353b50 | ||
|
|
38c91bd8ec | ||
|
|
78075d779b | ||
|
|
721a24d9dc | ||
|
|
66a103bd3a | ||
|
|
abee176ef4 | ||
|
|
ae078024cb | ||
|
|
96af39ab4a | ||
|
|
c75fa73bac | ||
|
|
5eed921288 | ||
|
|
7f3f94e01a | ||
|
|
1fe0ca9e2e | ||
|
|
7cc985b627 | ||
|
|
d17d576e15 | ||
|
|
ced7cf99fc | ||
|
|
c290d5dee7 | ||
|
|
d32d6b8d1c | ||
|
|
9d118aebb0 | ||
|
|
0646425b76 | ||
|
|
a348bac397 | ||
|
|
a9bd032c32 | ||
|
|
349488376d | ||
|
|
ce8c53f740 | ||
|
|
7845146718 | ||
|
|
3cce1c0b65 | ||
|
|
2bbf92d056 | ||
|
|
3d5713cd31 | ||
|
|
f8b6493cdc | ||
|
|
b69689a6be | ||
|
|
cc2c841f76 | ||
|
|
89846db5d3 | ||
|
|
bfd926d7fe | ||
|
|
602d5e046b | ||
|
|
72029ed458 | ||
|
|
a4672a131d | ||
|
|
75fcb5be5b | ||
|
|
eeee1ebdbc | ||
|
|
32e750eb6a | ||
|
|
a2ced31f8f | ||
|
|
b1e45f1743 | ||
|
|
8dda7ac79b | ||
|
|
74b8cc20b7 | ||
|
|
f75a7dd812 | ||
|
|
b2454e4ca2 | ||
|
|
45af955488 | ||
|
|
1f39b9d448 | ||
|
|
26a4cdbce1 | ||
|
|
bf87dc04cb | ||
|
|
8535b0ce13 | ||
|
|
6e0004f165 | ||
|
|
845333f33d | ||
|
|
6988feb731 | ||
|
|
ac2c7b1148 | ||
|
|
d6145fd0da | ||
|
|
194089827c | ||
|
|
d69d032f74 | ||
|
|
a9dbea3d16 | ||
|
|
52938a4b60 | ||
|
|
a21f986f30 | ||
|
|
547158a313 | ||
|
|
0a8b5f33f4 | ||
|
|
da8d620766 | ||
|
|
7dd520393c | ||
|
|
dc83e12170 | ||
|
|
d6b2940d8f | ||
|
|
c5dfe46b76 | ||
|
|
3d3926c08b | ||
|
|
9a90bf69d4 | ||
|
|
0ed5472d8a | ||
|
|
97a7a36030 | ||
|
|
662069466a | ||
|
|
52cff00338 | ||
|
|
1a40334f8e | ||
|
|
763f512419 | ||
|
|
620a1c6956 | ||
|
|
5f4fcdba69 | ||
|
|
7a79f444b2 | ||
|
|
e4b947ce69 | ||
|
|
fdfec960ca | ||
|
|
75021ecfa2 | ||
|
|
c90ef21bfa | ||
|
|
3fce5d7e95 | ||
|
|
8db1228e70 | ||
|
|
5f7f724058 | ||
|
|
fab4179068 | ||
|
|
32803b6f18 | ||
|
|
f8f75fb7b6 | ||
|
|
9919a99032 | ||
|
|
6a43d1a5bd | ||
|
|
24c971e4b8 | ||
|
|
62f0fd7c68 | ||
|
|
3dec312989 | ||
|
|
77b51a45dd | ||
|
|
d1b4ce3404 | ||
|
|
fd7b88307c | ||
|
|
579b6b5b29 | ||
|
|
cef58f6a73 | ||
|
|
c0c98c3b80 | ||
|
|
88d844cc09 | ||
|
|
2411db17a7 | ||
|
|
53d372be38 | ||
|
|
88831051c8 | ||
|
|
87d92ecb74 | ||
|
|
6672dffdbc | ||
|
|
cd00ab4c7f | ||
|
|
014306c209 | ||
|
|
30fb57eca3 | ||
|
|
52ad8f0c46 | ||
|
|
1b08039018 |
1
.idea/artifacts/TerrarumBuild.xml
generated
1
.idea/artifacts/TerrarumBuild.xml
generated
@@ -87,6 +87,7 @@
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/lib/regex-22.3.1-edit.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/lib/js-22.3.1-edit.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/lib/graal-sdk-22.3.1.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/lib/commons-math3-3.6.1.jar" path-in-jar="/" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
||||
14
.idea/libraries/apache_commons_math3.xml
generated
Normal file
14
.idea/libraries/apache_commons_math3.xml
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
<component name="libraryTable">
|
||||
<library name="apache.commons.math3" type="repository">
|
||||
<properties maven-id="org.apache.commons:commons-math3:3.6.1" />
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/lib/commons-math3-3.6.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/lib/commons-math3-3.6.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/lib/commons-math3-3.6.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
11
.idea/runConfigurations/Build_Version_Number.xml
generated
Normal file
11
.idea/runConfigurations/Build_Version_Number.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Build Version Number" type="Application" factoryName="Application">
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="17" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
|
||||
<option name="MAIN_CLASS_NAME" value="net.torvald.terrarum.PrebuildKt" />
|
||||
<module name="TerrarumBuild" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
1
.idea/runConfigurations/Terrarum.xml
generated
1
.idea/runConfigurations/Terrarum.xml
generated
@@ -7,6 +7,7 @@
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="17" />
|
||||
<module name="TerrarumBuild" />
|
||||
<method v="2">
|
||||
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Build Version Number" run_configuration_type="Application" />
|
||||
<option name="BuildArtifacts" enabled="true">
|
||||
<artifact name="ModuleComputers" />
|
||||
<artifact name="TerrarumBuild" />
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="17" />
|
||||
<module name="TerrarumBuild" />
|
||||
<method v="2">
|
||||
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Build Version Number" run_configuration_type="Application" />
|
||||
<option name="BuildArtifacts" enabled="true">
|
||||
<artifact name="ModuleComputers" />
|
||||
<artifact name="TerrarumBuild" />
|
||||
|
||||
@@ -1,26 +1,17 @@
|
||||
package net.torvald.terrarum.modulecomputers.gameactors
|
||||
|
||||
import com.badlogic.gdx.Gdx
|
||||
import com.badlogic.gdx.Input
|
||||
import com.badlogic.gdx.graphics.*
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.glutils.FrameBuffer
|
||||
import com.badlogic.gdx.utils.Disposable
|
||||
import kotlin.coroutines.*
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.TerrarumAppConfiguration.TILE_SIZE
|
||||
import net.torvald.terrarum.gameactors.AVKey
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.BlockBox
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.FixtureBase
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.FixtureInventory
|
||||
import net.torvald.terrarum.ui.Toolkit
|
||||
import net.torvald.terrarum.ui.UICanvas
|
||||
import net.torvald.terrarum.modulecomputers.ui.UIHomeComputer
|
||||
import net.torvald.tsvm.*
|
||||
import net.torvald.tsvm.peripheral.AdapterConfig
|
||||
import net.torvald.tsvm.peripheral.GraphicsAdapter
|
||||
import net.torvald.tsvm.peripheral.VMProgramRom
|
||||
import net.torvald.unicode.*
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2021-12-04.
|
||||
@@ -131,77 +122,3 @@ class FixtureHomeComputer : FixtureBase {
|
||||
}
|
||||
}
|
||||
|
||||
internal class UIHomeComputer : UICanvas(
|
||||
toggleKeyLiteral = Input.Keys.ESCAPE, // FIXME why do I have specify ESC for it to function? ESC should be work as the default key
|
||||
toggleButtonLiteral = App.getConfigInt("control_gamepad_start"),
|
||||
) {
|
||||
override var width = 640
|
||||
override var height = 480
|
||||
override var openCloseTime = 0f
|
||||
|
||||
private val drawOffX = (width - 560).div(2).toFloat()
|
||||
private val drawOffY = (height - 448).div(2).toFloat()
|
||||
|
||||
private var batch: FlippingSpriteBatch
|
||||
private var camera: OrthographicCamera
|
||||
|
||||
internal lateinit var vm: VM
|
||||
internal lateinit var fixture: FixtureHomeComputer
|
||||
|
||||
init {
|
||||
batch = FlippingSpriteBatch()
|
||||
camera = OrthographicCamera(width.toFloat(), height.toFloat())
|
||||
//val m = Matrix4()
|
||||
//m.setToOrtho2D(0f, 0f, width.toFloat(), height.toFloat())
|
||||
batch.projectionMatrix = camera.combined
|
||||
}
|
||||
|
||||
private val fbo = FrameBuffer(Pixmap.Format.RGBA8888, width, height, false)
|
||||
|
||||
private val controlHelp =
|
||||
"${getKeycapPC(App.getConfigInt("control_key_inventory"))} ${Lang["GAME_ACTION_CLOSE"]}\u3000 " +
|
||||
"$KEYCAP_CTRL$KEYCAP_SHIFT$KEYCAP_T$KEYCAP_R Terminate\u3000" +
|
||||
"$KEYCAP_CTRL$KEYCAP_SHIFT$KEYCAP_R$KEYCAP_S Reset\u3000" +
|
||||
"$KEYCAP_CTRL$KEYCAP_SHIFT$KEYCAP_R$KEYCAP_Q SysRq"
|
||||
|
||||
override fun updateUI(delta: Float) {
|
||||
}
|
||||
|
||||
override fun renderUI(otherBatch: SpriteBatch, otherCamera: Camera) {
|
||||
otherBatch.end()
|
||||
|
||||
fbo.inAction(camera, batch) {
|
||||
Gdx.gl.glClearColor(0f,0f,0f,1f)
|
||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT) // to hide the crap might be there
|
||||
|
||||
(vm.peripheralTable[1].peripheral as? GraphicsAdapter)?.let { gpu ->
|
||||
val clearCol = gpu.getBackgroundColour()
|
||||
Gdx.gl.glClearColor(clearCol.r, clearCol.g, clearCol.b, clearCol.a)
|
||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
||||
|
||||
gpu.render(Gdx.graphics.deltaTime, batch, drawOffX, drawOffY, true, fbo) // gpu.render will internally end() the fbo then begin() again before using the batch I've fed in
|
||||
}
|
||||
}
|
||||
|
||||
otherBatch.begin()
|
||||
otherBatch.shader = null
|
||||
blendNormalStraightAlpha(otherBatch)
|
||||
otherBatch.color = Color.WHITE
|
||||
otherBatch.draw(fbo.colorBufferTexture, posX.toFloat(), posY.toFloat(), width.toFloat(), height.toFloat())
|
||||
otherBatch.color = Toolkit.Theme.COL_INACTIVE
|
||||
Toolkit.drawBoxBorder(otherBatch, posX - 1, posY - 1, width + 2, height + 2)
|
||||
|
||||
App.fontGame.draw(otherBatch, controlHelp, posX, posY + height + 4)
|
||||
}
|
||||
|
||||
override fun doOpening(delta: Float) {
|
||||
super.doOpening(delta)
|
||||
fixture.startVM()
|
||||
}
|
||||
|
||||
|
||||
override fun dispose() {
|
||||
fbo.dispose()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package net.torvald.terrarum.modulecomputers.gameitems
|
||||
|
||||
import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import com.badlogic.gdx.utils.Disposable
|
||||
@@ -118,7 +119,7 @@ class WearableWorldRadarUI(val device: VM) : UICanvas() {
|
||||
device.update(delta)
|
||||
}
|
||||
|
||||
override fun renderUI(batch: SpriteBatch, camera: Camera) {
|
||||
override fun renderUI(batch: SpriteBatch, camera: OrthographicCamera) {
|
||||
batch.end()
|
||||
|
||||
batch.color = Color.WHITE
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
package net.torvald.terrarum.modulecomputers.ui
|
||||
|
||||
import com.badlogic.gdx.Gdx
|
||||
import com.badlogic.gdx.Input
|
||||
import com.badlogic.gdx.graphics.*
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.glutils.FrameBuffer
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.modulecomputers.gameactors.FixtureHomeComputer
|
||||
import net.torvald.terrarum.ui.Toolkit
|
||||
import net.torvald.terrarum.ui.UICanvas
|
||||
import net.torvald.tsvm.VM
|
||||
import net.torvald.tsvm.peripheral.GraphicsAdapter
|
||||
import net.torvald.unicode.*
|
||||
|
||||
internal class UIHomeComputer : UICanvas(
|
||||
toggleKeyLiteral = null,
|
||||
toggleButtonLiteral = "control_gamepad_start",
|
||||
) {
|
||||
override var width = 640
|
||||
override var height = 480
|
||||
override var openCloseTime = 0f
|
||||
|
||||
private val drawOffX = (width - 560).div(2).toFloat()
|
||||
private val drawOffY = (height - 448).div(2).toFloat()
|
||||
|
||||
private var batch: FlippingSpriteBatch
|
||||
private var camera: OrthographicCamera
|
||||
|
||||
internal lateinit var vm: VM
|
||||
internal lateinit var fixture: FixtureHomeComputer
|
||||
|
||||
init {
|
||||
batch = FlippingSpriteBatch()
|
||||
camera = OrthographicCamera(width.toFloat(), height.toFloat())
|
||||
//val m = Matrix4()
|
||||
//m.setToOrtho2D(0f, 0f, width.toFloat(), height.toFloat())
|
||||
batch.projectionMatrix = camera.combined
|
||||
}
|
||||
|
||||
private val fbo = FrameBuffer(Pixmap.Format.RGBA8888, width, height, false)
|
||||
|
||||
private val controlHelp =
|
||||
"${getKeycapPC(ControlPresets.getKey("control_key_inventory"))} ${Lang["GAME_ACTION_CLOSE"]}\u3000 " +
|
||||
"$KEYCAP_CTRL$KEYCAP_SHIFT$KEYCAP_T$KEYCAP_R Terminate\u3000" +
|
||||
"$KEYCAP_CTRL$KEYCAP_SHIFT$KEYCAP_R$KEYCAP_S Reset\u3000" +
|
||||
"$KEYCAP_CTRL$KEYCAP_SHIFT$KEYCAP_R$KEYCAP_Q SysRq"
|
||||
|
||||
override fun updateUI(delta: Float) {
|
||||
}
|
||||
|
||||
override fun renderUI(otherBatch: SpriteBatch, otherCamera: OrthographicCamera) {
|
||||
otherBatch.end()
|
||||
|
||||
fbo.inAction(camera, batch) {
|
||||
Gdx.gl.glClearColor(0f,0f,0f,1f)
|
||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT) // to hide the crap might be there
|
||||
|
||||
(vm.peripheralTable[1].peripheral as? GraphicsAdapter)?.let { gpu ->
|
||||
val clearCol = gpu.getBackgroundColour()
|
||||
Gdx.gl.glClearColor(clearCol.r, clearCol.g, clearCol.b, clearCol.a)
|
||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
||||
|
||||
gpu.render(Gdx.graphics.deltaTime, batch, drawOffX, drawOffY, true, fbo) // gpu.render will internally end() the fbo then begin() again before using the batch I've fed in
|
||||
}
|
||||
}
|
||||
|
||||
otherBatch.begin()
|
||||
otherBatch.shader = null
|
||||
blendNormalStraightAlpha(otherBatch)
|
||||
otherBatch.color = Color.WHITE
|
||||
otherBatch.draw(fbo.colorBufferTexture, posX.toFloat(), posY.toFloat(), width.toFloat(), height.toFloat())
|
||||
otherBatch.color = Toolkit.Theme.COL_INACTIVE
|
||||
Toolkit.drawBoxBorder(otherBatch, posX - 1, posY - 1, width + 2, height + 2)
|
||||
|
||||
App.fontGame.draw(otherBatch, controlHelp, posX, posY + height + 4)
|
||||
}
|
||||
|
||||
override fun doOpening(delta: Float) {
|
||||
super.doOpening(delta)
|
||||
fixture.startVM()
|
||||
}
|
||||
|
||||
|
||||
override fun dispose() {
|
||||
fbo.dispose()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,5 +25,6 @@
|
||||
<orderEntry type="library" name="jetbrains.kotlin.reflect" level="project" />
|
||||
<orderEntry type="library" name="jetbrains.kotlin.test" level="project" />
|
||||
<orderEntry type="library" name="io.github.classgraph" level="project" />
|
||||
<orderEntry type="library" name="apache.commons.math3" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
BIN
assets/clut/skybox.png
LFS
BIN
assets/clut/skybox.png
LFS
Binary file not shown.
BIN
assets/graphics/fonts/code.tga
LFS
Normal file
BIN
assets/graphics/fonts/code.tga
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -8,6 +8,7 @@
|
||||
"GAME_ACTION_MOVE_VERB" : "Move",
|
||||
"GAME_ACTION_ZOOM" : "Zoom",
|
||||
"MENU_IO_AUTOSAVE": "Autosave",
|
||||
"MENU_IO_CLEAR": "Clear",
|
||||
"MENU_IO_IMPORT": "Import",
|
||||
"MENU_IO_MANUAL_SAVE": "Manual Save",
|
||||
"MENU_LABEL_COPYRIGHT": "Copyright",
|
||||
@@ -16,6 +17,7 @@
|
||||
"MENU_LABEL_IME": "IME",
|
||||
"MENU_LABEL_IME_TOGGLE": "Toggle IME",
|
||||
"MENU_LABEL_KEYBOARD_LAYOUT": "Keyboard Layout",
|
||||
"MENU_LABEL_PASTE": "Paste",
|
||||
"MENU_LABEL_PASTE_FROM_CLIPBOARD": "Paste from Clipboard",
|
||||
"MENU_LABEL_PRESS_START_SYMBOL": "Press >",
|
||||
"MENU_LABEL_RESET" : "Reset",
|
||||
@@ -23,6 +25,7 @@
|
||||
"MENU_LABEL_STREAMING": "Livestreaming",
|
||||
"MENU_LABEL_SYSTEM_INFO": "System Info",
|
||||
"MENU_MODULES" : "Modules",
|
||||
"MENU_OPTIONS_ATLAS_TEXTURE_SIZE": "Atlas Texture Size",
|
||||
"MENU_OPTIONS_AUTOSAVE": "Autosave",
|
||||
"MENU_OPTIONS_BLUR": "Blur",
|
||||
"MENU_OPTIONS_DEBUG_CONSOLE": "Debug Console",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"ERROR_FILE_NOT_FOUND": "File not found.",
|
||||
"GAME_32BIT_WARNING1": "It looks like you’re running a 32-Bit version of Java.",
|
||||
"GAME_32BIT_WARNING2": "Please download and install the latest 64-Bit Java at:",
|
||||
"GAME_32BIT_WARNING3": "https://www.java.com/en/download/",
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
"COPYRIGHT_GNU_GPL_3": "GNU GPL 3에 따라 배포됨",
|
||||
"GAME_ACTION_MOVE_VERB" : "이동하기",
|
||||
"GAME_ACTION_ZOOM" : "확대·축소",
|
||||
"GAME_ACTION_ZOOM_OUT" : "화면 축소",
|
||||
"MENU_IO_AUTOSAVE": "자동 저장",
|
||||
"MENU_IO_CLEAR": "지우기",
|
||||
"MENU_IO_IMPORT": "가져오기",
|
||||
"MENU_IO_MANUAL_SAVE": "수동 저장",
|
||||
"MENU_LABEL_COPYRIGHT": "저작권",
|
||||
@@ -16,13 +18,15 @@
|
||||
"MENU_LABEL_IME": "입력기",
|
||||
"MENU_LABEL_IME_TOGGLE": "입력기 켜고 끄기",
|
||||
"MENU_LABEL_KEYBOARD_LAYOUT": "자판 배열",
|
||||
"MENU_LABEL_PASTE_FROM_CLIPBOARD": "복사한 텍스트 붙여넣기",
|
||||
"MENU_LABEL_PASTE": "붙여넣기",
|
||||
"MENU_LABEL_PASTE_FROM_CLIPBOARD": "복사한 문구 붙여넣기",
|
||||
"MENU_LABEL_PRESS_START_SYMBOL": ">을 누르세요",
|
||||
"MENU_LABEL_RESET" : "재설정",
|
||||
"MENU_LABEL_RESTART_REQUIRED": "재시작 필요",
|
||||
"MENU_LABEL_STREAMING": "실시간 방송",
|
||||
"MENU_LABEL_SYSTEM_INFO": "시스템 정보",
|
||||
"MENU_MODULES" : "모듈",
|
||||
"MENU_OPTIONS_ATLAS_TEXTURE_SIZE": "아틀라스 텍스처 크기",
|
||||
"MENU_OPTIONS_AUTOSAVE": "자동 저장",
|
||||
"MENU_OPTIONS_BLUR": "흐림",
|
||||
"MENU_OPTIONS_DEBUG_CONSOLE": "디버그 콘솔",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"ERROR_FILE_NOT_FOUND": "파일을 찾을 수 없습니다.",
|
||||
"GAME_32BIT_WARNING1": "32비트 버전의 Java를 사용중인 것 같습니다.",
|
||||
"GAME_32BIT_WARNING2": "아래 링크에서 최신 64비트 Java를 내려받아 설치해주세요.",
|
||||
"GAME_32BIT_WARNING3": "https://www.java.com/ko/download/",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
"id";"drop";"spawn";"name";"shdr";"shdg";"shdb";"shduv";"str";"dsty";"mate";"solid";"wall";"grav";"dlfn";"fv";"fr";"lumr";"lumg";"lumb";"lumuv";"colour";"vscs";"refl";"tags"
|
||||
"0";"0";"0";"BLOCK_AIR";"0.0312";"0.0312";"0.0312";"0.0312";"1";"1";"NULL";"0";"1";"N/A";"0";"0";"4";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0";""
|
||||
"0";"0";"0";"BLOCK_AIR";"0.0312";"0.0312";"0.0312";"0.0312";"1";"1";"NULL";"0";"1";"N/A";"0";"0";"4";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0";"INCONSEQUENTIAL"
|
||||
"16";"17";"17";"BLOCK_STONE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"1";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0";"ROCK,NATURAL"
|
||||
"17";"17";"17";"BLOCK_STONE_QUARRIED";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"1";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0";"ROCK"
|
||||
"18";"18";"18";"BLOCK_STONE_TILE_WHITE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"1";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.18";"STONE"
|
||||
@@ -188,6 +188,7 @@
|
||||
## Some tags are reserved for internal use, which are:
|
||||
## - INTERNAL: denotes that the tile is internal-use. Will not be rendered unless debug window is on.
|
||||
## - DORENDER: this internal tile must go through the standard-issue tile drawing routine.
|
||||
## - INCONSEQUENTIAL: denotes that this tile can be overwritten without dropping it. Usually used with flower tiles.
|
||||
#
|
||||
#
|
||||
## References ##
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 179 and column 37.
|
@@ -32,4 +32,5 @@ Teleport
|
||||
ToggleNoClip
|
||||
Zoom
|
||||
DynToStatic
|
||||
DebugFillInventory
|
||||
DebugFillInventory
|
||||
Uuid
|
||||
|
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"racename": "",
|
||||
"racenameplural": "",
|
||||
"baseheight": 90,
|
||||
"basemass": 600.0,
|
||||
|
||||
"strength": 65535,
|
||||
"strengthmult": [100,100,100,100,100,100,100],
|
||||
|
||||
"accel": 0.67,
|
||||
|
||||
"speed": 6.0,
|
||||
"speedmult": [100,100,100,100,100,100,100],
|
||||
|
||||
"vertstride": 40,
|
||||
|
||||
"jumppower": 17.6,
|
||||
"jumppowermult": [100,100,100,100,100,100,100],
|
||||
|
||||
"scale": 1.0,
|
||||
"scalemult": [100,100,100,100,100,100,100],
|
||||
|
||||
"encumbrance": 2147483647,
|
||||
"defence": 65535,
|
||||
"reach": 226,
|
||||
|
||||
"toolsize": 40,
|
||||
|
||||
"intelligent": true,
|
||||
"barehandactionminheight": 40,
|
||||
"basebarehanddiggingsize": 16,
|
||||
|
||||
"__comments__": "This RAW is intended to test the theoretical maximum values for properties (strength, defence, etc.)"
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -2,12 +2,17 @@ id;classname
|
||||
1;net.torvald.terrarum.modulebasegame.gameitems.PickaxeCopper
|
||||
2;net.torvald.terrarum.modulebasegame.gameitems.PickaxeIron
|
||||
3;net.torvald.terrarum.modulebasegame.gameitems.PickaxeSteel
|
||||
4;net.torvald.terrarum.modulebasegame.gameitems.SledgehammerIron
|
||||
5;net.torvald.terrarum.modulebasegame.gameitems.ItemTikiTorch
|
||||
6;net.torvald.terrarum.modulebasegame.gameitems.ItemStorageChest
|
||||
7;net.torvald.terrarum.modulebasegame.gameitems.WireGraphDebugger
|
||||
8;net.torvald.terrarum.modulebasegame.gameitems.ItemLogicSignalEmitter
|
||||
9;net.torvald.terrarum.modulebasegame.gameitems.WireCutterAll
|
||||
10;net.torvald.terrarum.modulebasegame.gameitems.ItemTypewriter
|
||||
11;net.torvald.terrarum.modulebasegame.gameitems.ItemWallCalendar
|
||||
12;net.torvald.terrarum.modulebasegame.gameitems.SledgehammerCopper
|
||||
13;net.torvald.terrarum.modulebasegame.gameitems.SledgehammerSteel
|
||||
|
||||
|
||||
256;net.torvald.terrarum.modulebasegame.gameitems.ItemSwingingDoorOak
|
||||
257;net.torvald.terrarum.modulebasegame.gameitems.ItemSwingingDoorEbony
|
||||
|
||||
|
Binary file not shown.
34
assets/mods/basegame/locales/en/calendar.json
Normal file
34
assets/mods/basegame/locales/en/calendar.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"MENU_CALENDAR_CALENDAR": "Calendar",
|
||||
"MENU_CALENDAR_EVENTS": "Events",
|
||||
"MENU_CALENDAR_ADD_NEW_EVENT": "Add New Event",
|
||||
"CONTEXT_CALENDAR_SEASON_SPRING": "Spring",
|
||||
"CONTEXT_CALENDAR_SEASON_SUMMER": "Summer",
|
||||
"CONTEXT_CALENDAR_SEASON_AUTUMN": "Autumn",
|
||||
"CONTEXT_CALENDAR_SEASON_WINTER": "Winter",
|
||||
"CONTEXT_CALENDAR_SEASON_SPRI": "Spri",
|
||||
"CONTEXT_CALENDAR_SEASON_SUMM": "Summ",
|
||||
"CONTEXT_CALENDAR_SEASON_AUTM": "Autm",
|
||||
"CONTEXT_CALENDAR_SEASON_WINT": "Wint",
|
||||
"CONTEXT_CALENDAR_DATE_FORMAT_Y": "Year {0}",
|
||||
"CONTEXT_CALENDAR_DATE_FORMAT_YMD": "Year {0} {1} {2}",
|
||||
"CONTEXT_CALENDAR_DATE_FORMAT_YMD_DDD": "Year {0} {1} {2} {3}",
|
||||
|
||||
"CONTEXT_CALENDAR_DAY_MONDAG_DNT": "Mondag",
|
||||
"CONTEXT_CALENDAR_DAY_TYSDAG_DNT": "Tysdag",
|
||||
"CONTEXT_CALENDAR_DAY_MIDTVEKE_DNT": "Midtveke",
|
||||
"CONTEXT_CALENDAR_DAY_TORSDAG_DNT": "Torsdag",
|
||||
"CONTEXT_CALENDAR_DAY_FREDAG_DNT": "Fredag",
|
||||
"CONTEXT_CALENDAR_DAY_LAURDAG_DNT": "Laurdag",
|
||||
"CONTEXT_CALENDAR_DAY_SUNDAG_DNT": "Sundag",
|
||||
"CONTEXT_CALENDAR_DAY_VERDDAG_DNT": "Verddag",
|
||||
"CONTEXT_CALENDAR_DAY_MON_DNT": "Mon",
|
||||
"CONTEXT_CALENDAR_DAY_TYS_DNT": "Tys",
|
||||
"CONTEXT_CALENDAR_DAY_MID_DNT": "Mid",
|
||||
"CONTEXT_CALENDAR_DAY_TOR_DNT": "Tor",
|
||||
"CONTEXT_CALENDAR_DAY_FRE_DNT": "Fre",
|
||||
"CONTEXT_CALENDAR_DAY_LAU_DNT": "Lau",
|
||||
"CONTEXT_CALENDAR_DAY_SUN_DNT": "Sun",
|
||||
"CONTEXT_CALENDAR_DAY_VER_DNT": "Ver",
|
||||
"CONTEXT_CALENDAR_DATE_FORMAT_YMD_SHORT_DNT": "ɣ{0}-{1}-{2}"
|
||||
}
|
||||
@@ -1,23 +1,26 @@
|
||||
{
|
||||
"CONTEXT_GENERATOR_SEED": "Seed",
|
||||
"CONTEXT_ITEM_MAP": "Map",
|
||||
"CONTEXT_ITEM_TOOL_PLURAL": "Tools",
|
||||
"CONTEXT_PLACE_COORDINATE": "Coordinate",
|
||||
"CONTEXT_WORLD_COUNT": "Worlds: ",
|
||||
"CONTEXT_WORLD_NEW": "New World",
|
||||
"MENU_LABEL_DELETE_WORLD": "Delete World",
|
||||
"CONTEXT_WORLD_COUNT": "Worlds: ",
|
||||
"GAME_INVENTORY_INGREDIENTS": "Ingredients",
|
||||
"GAME_INVENTORY_POTIONS": "Potions",
|
||||
"GAME_INVENTORY_BLOCKS": "Blocks",
|
||||
"GAME_INVENTORY_WALLS": "Walls",
|
||||
"CONTEXT_ITEM_TOOL_PLURAL": "Tools",
|
||||
"GAME_INVENTORY_FAVORITES": "Favorites",
|
||||
"GAME_INVENTORY_REGISTER": "Register",
|
||||
"CONTEXT_ITEM_MAP": "Map",
|
||||
"MENU_LABEL_MENU": "Menu",
|
||||
"CONTEXT_GENERATOR_SEED": "Seed",
|
||||
"MENU_LABEL_PREV_SAVES": "Previous Saves",
|
||||
"MENU_LABEL_RENAME": "Rename",
|
||||
"MENU_LABEL_USE_CODE": "Use Code",
|
||||
"MENU_MONITOR_CALI_TITLE": "Check Monitor",
|
||||
"GAME_ACTION_CRAFT": "Craft",
|
||||
"GAME_ACTION_GRAPPLE": "Grapple",
|
||||
"GAME_ACTION_QUICKSEL": "Quick Select",
|
||||
"GAME_ACTION_CRAFT": "Craft",
|
||||
"GAME_CRAFTING": "Crafting",
|
||||
"GAME_CRAFTABLE_ITEMS": "Craftable Items",
|
||||
"MENU_LABEL_RENAME": "Rename",
|
||||
"GAME_ACTION_TELEPORT": "Teleport",
|
||||
"CONTEXT_PLACE_COORDINATE": "Coordinate"
|
||||
"GAME_CRAFTABLE_ITEMS": "Craftable Items",
|
||||
"GAME_CRAFTING": "Crafting",
|
||||
"GAME_INVENTORY_BLOCKS": "Blocks",
|
||||
"GAME_INVENTORY_FAVORITES": "Favorites",
|
||||
"GAME_INVENTORY_INGREDIENTS": "Ingredients",
|
||||
"GAME_INVENTORY_POTIONS": "Potions",
|
||||
"GAME_INVENTORY_REGISTER": "Register",
|
||||
"GAME_INVENTORY_WALLS": "Walls"
|
||||
}
|
||||
@@ -1,18 +1,26 @@
|
||||
{
|
||||
"BLOCK_STONE_DEEP": "Deepstone",
|
||||
"BLOCK_SCAFFOLDING_NORMAL": "Scaffolding",
|
||||
"BLOCK_STONE_MARBLE": "Marble",
|
||||
|
||||
"ITEM_CALENDAR": "Calendar",
|
||||
"ITEM_LOGIC_SIGNAL_EMITTER": "Logic Signal Emitter",
|
||||
"ITEM_PICK_COPPER": "Copper Pickaxe",
|
||||
"ITEM_PICK_IRON": "Iron Pickaxe",
|
||||
"ITEM_PICK_STEEL": "Steel Pickaxe",
|
||||
"ITEM_SLEDGEHAMMER_COPPER": "Copper Sledgehammer",
|
||||
"ITEM_SLEDGEHAMMER_IRON": "Iron Sledgehammer",
|
||||
"ITEM_SLEDGEHAMMER_STEEL": "Steel Sledgehammer",
|
||||
"ITEM_STORAGE_CHEST": "Storage Chest",
|
||||
"ITEM_TIKI_TORCH": "Tiki Torch",
|
||||
"ITEM_TYPEWRITER": "Typewriter",
|
||||
"ITEM_WIRE": "Wire",
|
||||
"ITEM_WIRE_CUTTER": "Wire Cutter",
|
||||
|
||||
"ACTORBLOCK_ALLOW_MOVE_DOWN": "Urist Arôlcustith",
|
||||
"ACTORBLOCK_FULL_COLLISION": "Urist Berdanrifot",
|
||||
"ACTORBLOCK_NO_COLLISION": "Urist Zafal",
|
||||
"ACTORBLOCK_NO_PASS_RIGHT": "Urist McPassLeft",
|
||||
"ACTORBLOCK_NO_PASS_LEFT": "Urist McPassRight",
|
||||
"ACTORBLOCK_TILING_PLACEHOLDER": "Urist Berdanurdim",
|
||||
|
||||
"BLOCK_STONE_DEEP": "Deepstone",
|
||||
"BLOCK_SCAFFOLDING_NORMAL": "Scaffolding",
|
||||
"BLOCK_STONE_MARBLE": "Marble",
|
||||
|
||||
"ITEM_STORAGE_CHEST": "Storage Chest",
|
||||
"ITEM_WIRE": "Wire",
|
||||
"ITEM_WIRE_CUTTER": "Wire Cutter",
|
||||
"ITEM_LOGIC_SIGNAL_EMITTER": "Logic Signal Emitter",
|
||||
"ITEM_TIKI_TORCH": "Tiki Torch"
|
||||
"ACTORBLOCK_TILING_PLACEHOLDER": "Urist Berdanurdim"
|
||||
}
|
||||
@@ -1,3 +1,12 @@
|
||||
{
|
||||
"CONTEXT_THIS_IS_A_WORLD_CURRENTLY_PLAYING": "This is a world currently playing."
|
||||
"CONTEXT_THIS_IS_A_WORLD_CURRENTLY_PLAYING": "This is a world currently playing.",
|
||||
"CONTEXT_IMPORT_AVATAR_INSTRUCTION_1": "1. Place the Avatar file into the following directory:",
|
||||
"CONTEXT_IMPORT_AVATAR_INSTRUCTION_2": "",
|
||||
"CONTEXT_IMPORT_AVATAR_INSTRUCTION_3": "2. Enter the name of the file below, then press Import",
|
||||
"CONTEXT_WORLD_CODE_SHARE_1": "Other people sharing the device can play on this",
|
||||
"CONTEXT_WORLD_CODE_SHARE_2": "world when you are away.",
|
||||
"CONTEXT_WORLD_CODE_SHARE_3": "",
|
||||
"CONTEXT_WORLD_CODE_SHARE_4": "Share the code below so the other people can join!",
|
||||
"ERROR_AVATAR_ALREADY_EXISTS": "The Avatar already exists.",
|
||||
"ERROR_WORLD_NOT_FOUND": "World not found."
|
||||
}
|
||||
16
assets/mods/basegame/locales/koKR/calendar.json
Normal file
16
assets/mods/basegame/locales/koKR/calendar.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"MENU_CALENDAR_CALENDAR": "달력",
|
||||
"MENU_CALENDAR_EVENTS": "일정",
|
||||
"MENU_CALENDAR_ADD_NEW_EVENT": "새 일정 추가",
|
||||
"CONTEXT_CALENDAR_SEASON_SPRING": "봄",
|
||||
"CONTEXT_CALENDAR_SEASON_SUMMER": "여름",
|
||||
"CONTEXT_CALENDAR_SEASON_AUTUMN": "가을",
|
||||
"CONTEXT_CALENDAR_SEASON_WINTER": "겨울",
|
||||
"CONTEXT_CALENDAR_SEASON_SPRI": "봄",
|
||||
"CONTEXT_CALENDAR_SEASON_SUMM": "여름",
|
||||
"CONTEXT_CALENDAR_SEASON_AUTM": "가을",
|
||||
"CONTEXT_CALENDAR_SEASON_WINT": "겨울",
|
||||
"CONTEXT_CALENDAR_DATE_FORMAT_Y": "{0}년",
|
||||
"CONTEXT_CALENDAR_DATE_FORMAT_YMD": "{0}년 {1} {2}일",
|
||||
"CONTEXT_CALENDAR_DATE_FORMAT_YMD_DDD": "{0}년 {1} {2}일 {3}"
|
||||
}
|
||||
@@ -1,24 +1,26 @@
|
||||
{
|
||||
"CONTEXT_GENERATOR_SEED": "시드",
|
||||
"CONTEXT_ITEM_MAP": "지도",
|
||||
"CONTEXT_ITEM_TOOL_PLURAL": "도구",
|
||||
"CONTEXT_PLACE_COORDINATE": "좌표",
|
||||
"CONTEXT_WORLD_COUNT": "새계: ",
|
||||
"CONTEXT_WORLD_NEW": "새 세계",
|
||||
"MENU_LABEL_DELETE_WORLD": "새계 삭제",
|
||||
"CONTEXT_WORLD_COUNT": "새계: ",
|
||||
"MENU_MONITOR_CALI_TITLE": "모니터 확인",
|
||||
"GAME_INVENTORY_INGREDIENTS": "재료",
|
||||
"GAME_INVENTORY_POTIONS": "물약",
|
||||
"GAME_INVENTORY_BLOCKS": "블록",
|
||||
"GAME_INVENTORY_WALLS": "벽지",
|
||||
"CONTEXT_ITEM_TOOL_PLURAL": "도구",
|
||||
"GAME_INVENTORY_FAVORITES": "즐겨찾기",
|
||||
"GAME_INVENTORY_REGISTER": "등록하기",
|
||||
"MENU_LABEL_MENU": "메뉴",
|
||||
"CONTEXT_ITEM_MAP": "지도",
|
||||
"CONTEXT_GENERATOR_SEED": "시드",
|
||||
"MENU_LABEL_PREV_SAVES": "이전 세이브",
|
||||
"MENU_LABEL_RENAME": "이름 바꾸기",
|
||||
"MENU_LABEL_USE_CODE": "코드 사용",
|
||||
"MENU_MONITOR_CALI_TITLE": "모니터 확인",
|
||||
"GAME_ACTION_CRAFT": "제작하기",
|
||||
"GAME_ACTION_GRAPPLE": "매달리기",
|
||||
"GAME_ACTION_QUICKSEL": "빠른 선택",
|
||||
"GAME_ACTION_CRAFT": "제작하기",
|
||||
"GAME_CRAFTING": "제작",
|
||||
"GAME_CRAFTABLE_ITEMS": "제작 가능한 아이템",
|
||||
"MENU_LABEL_RENAME": "이름 바꾸기",
|
||||
"GAME_ACTION_TELEPORT": "텔레포트하기",
|
||||
"CONTEXT_PLACE_COORDINATE": "좌표"
|
||||
"GAME_CRAFTABLE_ITEMS": "제작 가능한 아이템",
|
||||
"GAME_CRAFTING": "제작",
|
||||
"GAME_INVENTORY_BLOCKS": "블록",
|
||||
"GAME_INVENTORY_FAVORITES": "즐겨찾기",
|
||||
"GAME_INVENTORY_INGREDIENTS": "재료",
|
||||
"GAME_INVENTORY_POTIONS": "물약",
|
||||
"GAME_INVENTORY_REGISTER": "등록하기",
|
||||
"GAME_INVENTORY_WALLS": "벽지"
|
||||
}
|
||||
@@ -3,9 +3,17 @@
|
||||
"BLOCK_SCAFFOLDING_NORMAL": "발판",
|
||||
"BLOCK_STONE_MARBLE": "대리석",
|
||||
|
||||
"ITEM_STORAGE_CHEST": "보관상자",
|
||||
"ITEM_WIRE": "전선",
|
||||
"ITEM_WIRE_CUTTER": "전선 절단기",
|
||||
"ITEM_CALENDAR": "달력",
|
||||
"ITEM_LOGIC_SIGNAL_EMITTER": "신호발생기",
|
||||
"ITEM_TIKI_TORCH": "티키 토치"
|
||||
"ITEM_PICK_COPPER": "구리 곡괭이",
|
||||
"ITEM_PICK_IRON": "철 곡괭이",
|
||||
"ITEM_PICK_STEEL": "강철 곡괭이",
|
||||
"ITEM_SLEDGEHAMMER_COPPER": "구리 해머",
|
||||
"ITEM_SLEDGEHAMMER_IRON": "철 해머",
|
||||
"ITEM_SLEDGEHAMMER_STEEL": "강철 해머",
|
||||
"ITEM_STORAGE_CHEST": "보관상자",
|
||||
"ITEM_TIKI_TORCH": "티키 토치",
|
||||
"ITEM_TYPEWRITER": "타자기",
|
||||
"ITEM_WIRE": "전선",
|
||||
"ITEM_WIRE_CUTTER": "전선 절단기"
|
||||
}
|
||||
@@ -1,3 +1,11 @@
|
||||
{
|
||||
"CONTEXT_THIS_IS_A_WORLD_CURRENTLY_PLAYING": "현재 플레이 중인 월드입니다."
|
||||
"CONTEXT_THIS_IS_A_WORLD_CURRENTLY_PLAYING": "현재 플레이 중인 세계입니다.",
|
||||
"CONTEXT_IMPORT_AVATAR_INSTRUCTION_1": "1. 아바타 파일을 다음 폴더에 넣어주세요",
|
||||
"CONTEXT_IMPORT_AVATAR_INSTRUCTION_3": "2. 아바타 파일 이름을 아래에 입력하고 가져오기를 눌러주세요",
|
||||
"CONTEXT_WORLD_CODE_SHARE_1": "자리를 비운 동안 같은 기기를 공유하는 다른 사람이 이 세계를",
|
||||
"CONTEXT_WORLD_CODE_SHARE_2": "플레이할 수 있도록 합니다.",
|
||||
"CONTEXT_WORLD_CODE_SHARE_3": "",
|
||||
"CONTEXT_WORLD_CODE_SHARE_4": "아래의 코드를 공유해 다른 사람을 초대하세요!",
|
||||
"ERROR_AVATAR_ALREADY_EXISTS": "이미 존재하는 아바타입니다.",
|
||||
"ERROR_WORLD_NOT_FOUND": "세계를 찾을 수 없습니다."
|
||||
}
|
||||
BIN
assets/mods/basegame/sprites/fixtures/calendar.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/fixtures/calendar.tga
LFS
Normal file
Binary file not shown.
Binary file not shown.
48
assets/mods/basegame/sprites/taimu2.properties
Normal file
48
assets/mods/basegame/sprites/taimu2.properties
Normal file
@@ -0,0 +1,48 @@
|
||||
# complete file name is: SPRITESHEET + bodypart name + EXTENSION
|
||||
SPRITESHEET=mods/basegame/sprites/test_werebeastf2/taimu_
|
||||
EXTENSION=.tga
|
||||
# defines frame size and origin point. Origin point is given as: (originx, 0)
|
||||
CONFIG=SIZE 64,98;ORIGINX 40
|
||||
|
||||
! A skeleton also defines what body parts (images) be used.
|
||||
! You can also write multiline text using reverse solidus; this is a feature of .properties
|
||||
! skeleton joints are ordered: foremost-drawn object comes first, which means lowermost object IN THIS LIST
|
||||
! are painted first, and any object that comes before it will paint over it. In other words, this list is
|
||||
! first reversed then being iterated.
|
||||
! Some keywords are considered special within the game, they are:
|
||||
! HEADGEAR, HELD_ITEM, BOOT_L, BOOT_R, GAUNTLET_L, GAUNTLET_R and ARMOUR_* (star means any number starting from zero)
|
||||
BODYPARTS=HEADGEAR 13,14;\
|
||||
HEAD 13,14;\
|
||||
ARM_REST_RIGHT 10,4;\
|
||||
ARM_REST_LEFT 9,3;\
|
||||
LEG_REST_RIGHT 15,6;\
|
||||
LEG_REST_LEFT 8,6;\
|
||||
TORSO_0 18,19;\
|
||||
TORSO_1 18,19;\
|
||||
TAIL_0 30,2;\
|
||||
BUST_0 11,2;\
|
||||
HELD_ITEM 0,0
|
||||
SKELETON_STAND=HEADGEAR 0,78;\
|
||||
ARM_REST_RIGHT -16,66;\
|
||||
HELD_ITEM -11,33;\
|
||||
HEAD 0,78;\
|
||||
BUST_0 0,63;\
|
||||
TORSO_0 0,54;\
|
||||
TORSO_1 0,54;\
|
||||
LEG_REST_RIGHT -5,41;\
|
||||
LEG_REST_LEFT 3,41;\
|
||||
ARM_REST_LEFT 8,66;\
|
||||
TAIL_0 2,40
|
||||
|
||||
! When you move the arms/hands, make sure you move the HELD_ITEM as well
|
||||
|
||||
# RUNNING might need its own skeleton...
|
||||
ANIM_RUN=DELAY 0.18;ROW 2;SKELETON SKELETON_STAND
|
||||
ANIM_RUN_1=LEG_REST_RIGHT 2,2;LEG_REST_LEFT -2,0;TAIL_0 1,0;TORSO_1 0,-999
|
||||
ANIM_RUN_2=ALL 0,2;LEG_REST_RIGHT 0,-2;LEG_REST_LEFT 0,2;TAIL_0 -1,0;TORSO_1 0,-999
|
||||
ANIM_RUN_3=LEG_REST_RIGHT -2,0;LEG_REST_LEFT 2,2;TAIL_0 -1,0;TORSO_1 0,-999
|
||||
ANIM_RUN_4=ALL 0,2;LEG_REST_RIGHT 0,2;LEG_REST_LEFT 0,-2;TAIL_0 1,0;TORSO_1 0,-999
|
||||
|
||||
ANIM_IDLE=DELAY 2;ROW 1;SKELETON SKELETON_STAND
|
||||
ANIM_IDLE_1=TORSO_1 0,-999
|
||||
ANIM_IDLE_2=TORSO_0 0,-999;ARM_REST_LEFT 0,1;ARM_REST_RIGHT 0,1;HELD_ITEM 0,1;BUST_0 0,1;HEAD 0,1
|
||||
48
assets/mods/basegame/sprites/taimu2_glow.properties
Normal file
48
assets/mods/basegame/sprites/taimu2_glow.properties
Normal file
@@ -0,0 +1,48 @@
|
||||
# complete file name is: SPRITESHEET + bodypart name + EXTENSION
|
||||
SPRITESHEET=mods/basegame/sprites/test_werebeastf2/taimuglow_
|
||||
EXTENSION=.tga
|
||||
# defines frame size and origin point. Origin point is given as: (originx, 0)
|
||||
CONFIG=SIZE 64,98;ORIGINX 40
|
||||
|
||||
! A skeleton also defines what body parts (images) be used.
|
||||
! You can also write multiline text using reverse solidus; this is a feature of .properties
|
||||
! skeleton joints are ordered: foremost-drawn object comes first, which means lowermost object IN THIS LIST
|
||||
! are painted first, and any object that comes before it will paint over it. In other words, this list is
|
||||
! first reversed then being iterated.
|
||||
! Some keywords are considered special within the game, they are:
|
||||
! HEADGEAR, HELD_ITEM, BOOT_L, BOOT_R, GAUNTLET_L, GAUNTLET_R and ARMOUR_* (star means any number starting from zero)
|
||||
BODYPARTS=HEADGEAR 13,14;\
|
||||
HEAD 13,14;\
|
||||
ARM_REST_RIGHT 10,4;\
|
||||
ARM_REST_LEFT 9,3;\
|
||||
LEG_REST_RIGHT 15,6;\
|
||||
LEG_REST_LEFT 8,6;\
|
||||
TORSO_0 18,19;\
|
||||
TORSO_1 18,19;\
|
||||
TAIL_0 30,2;\
|
||||
BUST_0 11,2;\
|
||||
HELD_ITEM 0,0
|
||||
SKELETON_STAND=HEADGEAR 0,78;\
|
||||
ARM_REST_RIGHT -16,66;\
|
||||
HELD_ITEM -11,33;\
|
||||
HEAD 0,78;\
|
||||
BUST_0 0,63;\
|
||||
TORSO_0 0,54;\
|
||||
TORSO_1 0,54;\
|
||||
LEG_REST_RIGHT -5,41;\
|
||||
LEG_REST_LEFT 3,41;\
|
||||
ARM_REST_LEFT 8,66;\
|
||||
TAIL_0 2,40
|
||||
|
||||
! When you move the arms/hands, make sure you move the HELD_ITEM as well
|
||||
|
||||
# RUNNING might need its own skeleton...
|
||||
ANIM_RUN=DELAY 0.18;ROW 2;SKELETON SKELETON_STAND
|
||||
ANIM_RUN_1=LEG_REST_RIGHT 2,2;LEG_REST_LEFT -2,0;TAIL_0 1,0;TORSO_1 0,-999
|
||||
ANIM_RUN_2=ALL 0,2;LEG_REST_RIGHT 0,-2;LEG_REST_LEFT 0,2;TAIL_0 -1,0;TORSO_1 0,-999
|
||||
ANIM_RUN_3=LEG_REST_RIGHT -2,0;LEG_REST_LEFT 2,2;TAIL_0 -1,0;TORSO_1 0,-999
|
||||
ANIM_RUN_4=ALL 0,2;LEG_REST_RIGHT 0,2;LEG_REST_LEFT 0,-2;TAIL_0 1,0;TORSO_1 0,-999
|
||||
|
||||
ANIM_IDLE=DELAY 2;ROW 1;SKELETON SKELETON_STAND
|
||||
ANIM_IDLE_1=TORSO_1 0,-999
|
||||
ANIM_IDLE_2=TORSO_0 0,-999;ARM_REST_LEFT 0,1;ARM_REST_RIGHT 0,1;HELD_ITEM 0,1;BUST_0 0,1;HEAD 0,1
|
||||
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_arm_rest_left.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_arm_rest_left.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_arm_rest_right.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_arm_rest_right.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_bust_0.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_bust_0.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_head.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_head.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_leg_rest_left.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_leg_rest_left.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_leg_rest_right.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_leg_rest_right.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_tail_0.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_tail_0.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_torso_0.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_torso_0.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_torso_1.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimu_torso_1.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimuglow_head.tga
LFS
Normal file
BIN
assets/mods/basegame/sprites/test_werebeastf2/taimuglow_head.tga
LFS
Normal file
Binary file not shown.
@@ -1,8 +1,26 @@
|
||||
{
|
||||
"identifier": "generic01",
|
||||
"skyboxGradColourMap": "generic_skybox.tga",
|
||||
"daylightClut": "clut_daylight.tga",
|
||||
"classification": "generic",
|
||||
"extraImages": [
|
||||
|
||||
]
|
||||
"cloudChance": 125,
|
||||
"cloudGamma": [0.7, 2.4],
|
||||
"cloudGammaVariance": [0.143, 0.0],
|
||||
"windSpeed": 0.35,
|
||||
"windSpeedVariance": 0.4,
|
||||
"windSpeedDamping": 0.5,
|
||||
"clouds": {
|
||||
"cumulonimbus": {
|
||||
"filename": "cloud_large.png", "tw": 2048, "th": 1024, "probability": 0.2,
|
||||
"baseScale": 4.0, "scaleVariance": 0.3333333,
|
||||
"altLow": 1080, "altHigh": 1120
|
||||
},
|
||||
"cumulus": {
|
||||
"filename": "cloud_normal.png", "tw": 1024, "th": 512, "probability": 1.0,
|
||||
"baseScale": 2.0, "scaleVariance": 0.6,
|
||||
"altLow": 1080, "altHigh": 1800
|
||||
}
|
||||
},
|
||||
"atmoTurbidity": 3.5,
|
||||
"shaderVibrancy": [1.0, 1.0]
|
||||
}
|
||||
32
assets/mods/basegame/weathers/WeatherGeneric2.json
Normal file
32
assets/mods/basegame/weathers/WeatherGeneric2.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"identifier": "generic02",
|
||||
"skyboxGradColourMap": "generic_skybox.tga",
|
||||
"daylightClut": "clut_daylight.tga",
|
||||
"classification": "generic2",
|
||||
"cloudChance": 800,
|
||||
"cloudGamma": [0.8, 2.4],
|
||||
"cloudGammaVariance": [0.125, 0.0],
|
||||
"windSpeed": 0.35,
|
||||
"windSpeedVariance": 0.4,
|
||||
"windSpeedDamping": 0.5,
|
||||
"clouds": {
|
||||
"cumulonimbus": {
|
||||
"filename": "cloud_large.png", "tw": 2048, "th": 1024, "probability": 0.02,
|
||||
"baseScale": 4.0, "scaleVariance": 0.3333333,
|
||||
"altLow": 1080, "altHigh": 1120
|
||||
},
|
||||
"cumulus": {
|
||||
"filename": "cloud_normal.png", "tw": 1024, "th": 512, "probability": 0.05,
|
||||
"baseScale": 2.0, "scaleVariance": 0.6,
|
||||
"altLow": 1080, "altHigh": 1800
|
||||
},
|
||||
"altocumulus": {
|
||||
"filename": "cloud_normal.png", "tw": 1024, "th": 512, "probability": 1.0,
|
||||
"baseScale": 1.0, "scaleVariance": 0.1,
|
||||
"altLow": 2600, "altHigh": 3400
|
||||
}
|
||||
},
|
||||
"atmoTurbidity": 3.5,
|
||||
"shaderVibrancy": [1.0, 1.0],
|
||||
"__comment__": "Make a texture for altocumulus so that this weather can be realised with less than 1000 sprites"
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"globalLight": "generic_light.tga",
|
||||
"skyboxGradColourMap": "generic_skybox.tga",
|
||||
"classification": "genericrain",
|
||||
"extraImages": [
|
||||
"raindrop.tga"
|
||||
],
|
||||
"mixFrom": "__CURRENTWEATHER",
|
||||
"mixPercentage": 80.0
|
||||
}
|
||||
31
assets/mods/basegame/weathers/WeatherOvercast.json
Normal file
31
assets/mods/basegame/weathers/WeatherOvercast.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"identifier": "overcast01",
|
||||
"skyboxGradColourMap": "generic_skybox.tga",
|
||||
"daylightClut": "clut_daylight.tga",
|
||||
"classification": "overcast",
|
||||
"cloudChance": 300,
|
||||
"cloudGamma": [2.0, 1.6],
|
||||
"cloudGammaVariance": [0.0, 0.0],
|
||||
"windSpeed": 10.45,
|
||||
"windSpeedVariance": 0.5,
|
||||
"windSpeedDamping": 0.5,
|
||||
"clouds": {
|
||||
"cumulus": {
|
||||
"filename": "cloud_normal.png", "tw": 1024, "th": 512, "probability": 0.1,
|
||||
"baseScale": 1.6, "scaleVariance": 0.6,
|
||||
"altLow": 580, "altHigh": 1300
|
||||
},
|
||||
"cumulonimbus": {
|
||||
"filename": "cloud_large.png", "tw": 2048, "th": 1024, "probability": 0.4,
|
||||
"baseScale": 4.0, "scaleVariance": 0.3333333,
|
||||
"altLow": 1080, "altHigh":1800
|
||||
},
|
||||
"nimbostratus": {
|
||||
"filename": "cloud_wide.png", "tw": 4096, "th": 1024, "probability": 1.0,
|
||||
"baseScale": 8.0, "scaleVariance": 0.1,
|
||||
"altLow": 1100, "altHigh": 1500
|
||||
}
|
||||
},
|
||||
"atmoTurbidity": 9.5,
|
||||
"shaderVibrancy": [0.93, 0.9]
|
||||
}
|
||||
BIN
assets/mods/basegame/weathers/cloud_large.kra
LFS
Normal file
BIN
assets/mods/basegame/weathers/cloud_large.kra
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/weathers/cloud_large.png
LFS
Normal file
BIN
assets/mods/basegame/weathers/cloud_large.png
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/weathers/cloud_normal.kra
LFS
Normal file
BIN
assets/mods/basegame/weathers/cloud_normal.kra
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/weathers/cloud_normal.png
LFS
Normal file
BIN
assets/mods/basegame/weathers/cloud_normal.png
LFS
Normal file
Binary file not shown.
26
assets/mods/basegame/weathers/cloud_texture_instruction.md
Normal file
26
assets/mods/basegame/weathers/cloud_texture_instruction.md
Normal file
@@ -0,0 +1,26 @@
|
||||
## actually blending
|
||||
1. On Krita, load the cloudmap
|
||||
2. Select and isolate suitable piece of the cloud
|
||||
3. With liquefying brush, make the bottom flat
|
||||
4. On new tab, load the solidmap
|
||||
5. Resize the solidmap to 1024x1024
|
||||
6. Rotate the solidmap by 30 deg or so
|
||||
7. Overlay the processed solidmap to the cloudmap, opacity=30%
|
||||
8. With airbrush tool, manually add the shade (see cloud_normal.kra to get the gist of it)
|
||||
|
||||
### cloudmap
|
||||
1. On GIMP, prepare 4096x4096 canvas
|
||||
2. Create Simplex Noise with following parameters:
|
||||
- Scale: arbitrary (0.05 - 0.2)
|
||||
- Iterations: MAX
|
||||
- Seed: anything but 0
|
||||
|
||||
### solidmap
|
||||
1. On GIMP, prepare 4096x4096 canvas
|
||||
2. Create Solid Noise with following parameters:
|
||||
- XY Size: 16.0
|
||||
- Detail: MAX
|
||||
- Tileable: check
|
||||
- Turbulent: check
|
||||
- Seed: anything but 0
|
||||
|
||||
BIN
assets/mods/basegame/weathers/cloud_wide.kra
LFS
Normal file
BIN
assets/mods/basegame/weathers/cloud_wide.kra
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/weathers/cloud_wide.png
LFS
Normal file
BIN
assets/mods/basegame/weathers/cloud_wide.png
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/weathers/clut_daylight.kra
LFS
Normal file
BIN
assets/mods/basegame/weathers/clut_daylight.kra
LFS
Normal file
Binary file not shown.
Binary file not shown.
@@ -6,6 +6,8 @@ APPIMAGETOOL="appimagetool-x86_64.AppImage"
|
||||
SRCFILES="terrarumlinux_arm"
|
||||
DESTDIR="TerrarumLinux.arm"
|
||||
RUNTIME="runtime-linux-arm"
|
||||
DESKTOPFILE="../out/build_autogen_linux.desktop"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -d "../assets_release" ]; then
|
||||
echo "'assets_release' does not exist; prepare the assets for the release and put them into the assets_release directory, exiting now." >&2
|
||||
@@ -18,7 +20,7 @@ mkdir $DESTDIR
|
||||
|
||||
# Prepare an application
|
||||
cp icns.png $DESTDIR/icns.png
|
||||
cp $SRCFILES/Terrarum.desktop $DESTDIR/
|
||||
cp $DESKTOPFILE $DESTDIR/
|
||||
cp $SRCFILES/AppRun $DESTDIR/AppRun
|
||||
chmod +x $DESTDIR/AppRun
|
||||
|
||||
@@ -30,7 +32,7 @@ mv $DESTDIR/out/$RUNTIME/bin/java $DESTDIR/out/$RUNTIME/bin/Terrarum
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/
|
||||
mv $DESTDIR/assets_release $DESTDIR/assets
|
||||
cp "../out/TerrarumBuild.jar" $DESTDIR/out/
|
||||
cp "../out/$JARNAME" $DESTDIR/out/
|
||||
|
||||
# Pack everything to AppImage
|
||||
ARCH=arm_aarch64 "./$APPIMAGETOOL" $DESTDIR "out/$DESTDIR.AppImage" || { echo 'Building AppImage failed' >&2; exit 1; }
|
||||
|
||||
@@ -6,6 +6,8 @@ APPIMAGETOOL="appimagetool-x86_64.AppImage"
|
||||
SRCFILES="terrarumlinux_x86"
|
||||
DESTDIR="TerrarumLinux.x86"
|
||||
RUNTIME="runtime-linux-x86"
|
||||
DESKTOPFILE="../out/build_autogen_linux.desktop"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -d "../assets_release" ]; then
|
||||
echo "'assets_release' does not exist; prepare the assets for the release and put them into the assets_release directory, exiting now." >&2
|
||||
@@ -18,7 +20,7 @@ mkdir $DESTDIR
|
||||
|
||||
# Prepare an application
|
||||
cp icns.png $DESTDIR/icns.png
|
||||
cp $SRCFILES/Terrarum.desktop $DESTDIR/
|
||||
cp $DESKTOPFILE $DESTDIR/
|
||||
cp $SRCFILES/AppRun $DESTDIR/AppRun
|
||||
chmod +x $DESTDIR/AppRun
|
||||
|
||||
@@ -30,7 +32,7 @@ mv $DESTDIR/out/$RUNTIME/bin/java $DESTDIR/out/$RUNTIME/bin/Terrarum
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/
|
||||
mv $DESTDIR/assets_release $DESTDIR/assets
|
||||
cp "../out/TerrarumBuild.jar" $DESTDIR/out/
|
||||
cp "../out/$JARNAME" $DESTDIR/out/
|
||||
|
||||
# Pack everything to AppImage
|
||||
"./$APPIMAGETOOL" $DESTDIR "out/$DESTDIR.AppImage" || { echo 'Building AppImage failed' >&2; exit 1; }
|
||||
|
||||
@@ -3,8 +3,11 @@ if (( $EUID == 0 )); then echo "The build process is not meant to be run with ro
|
||||
|
||||
cd "${0%/*}"
|
||||
SRCFILES="terrarummac_arm"
|
||||
DESTDIR="out/TerrarumMac.arm.app"
|
||||
APPDIR="./TerrarumMac.arm.app"
|
||||
DESTDIR="out/$APPDIR"
|
||||
RUNTIME="runtime-osx-arm"
|
||||
PLISTFILE="../out/build_autogen_macos_Info.plist"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -d "../assets_release" ]; then
|
||||
echo "'assets_release' does not exist; prepare the assets for the release and put them into the assets_release directory, exiting now." >&2
|
||||
@@ -20,9 +23,9 @@ mkdir $DESTDIR/Contents/Resources
|
||||
|
||||
# Prepare an application
|
||||
cp AppIcon.icns $DESTDIR/Contents/Resources/AppIcon.icns
|
||||
cp $SRCFILES/Info.plist $DESTDIR/Contents/
|
||||
cp $SRCFILES/Terrarum.sh $DESTDIR/Contents/MacOS/
|
||||
chmod +x $DESTDIR/Contents/MacOS/Terrarum.sh
|
||||
cp $PLISTFILE $DESTDIR/Contents/Info.plist
|
||||
|
||||
# Copy over a Java runtime
|
||||
mkdir $DESTDIR/Contents/MacOS/out
|
||||
@@ -32,6 +35,11 @@ mv $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java $DESTDIR/Contents/MacOS/out/$RU
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/Contents/MacOS/
|
||||
mv $DESTDIR/Contents/MacOS/assets_release $DESTDIR/Contents/MacOS/assets
|
||||
cp "../out/TerrarumBuild.jar" $DESTDIR/Contents/MacOS/out/
|
||||
cp "../out/$JARNAME" $DESTDIR/Contents/MacOS/out/
|
||||
|
||||
# zip everything
|
||||
cd "out"
|
||||
rm $APPDIR.zip
|
||||
7z a -tzip $APPDIR.zip $APPDIR
|
||||
|
||||
echo "Build successful: $DESTDIR"
|
||||
|
||||
@@ -3,8 +3,11 @@ if (( $EUID == 0 )); then echo "The build process is not meant to be run with ro
|
||||
|
||||
cd "${0%/*}"
|
||||
SRCFILES="terrarummac_x86"
|
||||
DESTDIR="out/TerrarumMac.x86.app"
|
||||
APPDIR="./TerrarumMac.x86.app"
|
||||
DESTDIR="out/$APPDIR"
|
||||
RUNTIME="runtime-osx-x86"
|
||||
PLISTFILE="../out/build_autogen_macos_Info.plist"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -d "../assets_release" ]; then
|
||||
echo "'assets_release' does not exist; prepare the assets for the release and put them into the assets_release directory, exiting now." >&2
|
||||
@@ -20,9 +23,9 @@ mkdir $DESTDIR/Contents/Resources
|
||||
|
||||
# Prepare an application
|
||||
cp AppIcon.icns $DESTDIR/Contents/Resources/AppIcon.icns
|
||||
cp $SRCFILES/Info.plist $DESTDIR/Contents/
|
||||
cp $SRCFILES/Terrarum.sh $DESTDIR/Contents/MacOS/
|
||||
chmod +x $DESTDIR/Contents/MacOS/Terrarum.sh
|
||||
cp $PLISTFILE $DESTDIR/Contents/Info.plist
|
||||
|
||||
# Copy over a Java runtime
|
||||
mkdir $DESTDIR/Contents/MacOS/out
|
||||
@@ -32,6 +35,11 @@ mv $DESTDIR/Contents/MacOS/out/$RUNTIME/bin/java $DESTDIR/Contents/MacOS/out/$RU
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/Contents/MacOS/
|
||||
mv $DESTDIR/Contents/MacOS/assets_release $DESTDIR/Contents/MacOS/assets
|
||||
cp "../out/TerrarumBuild.jar" $DESTDIR/Contents/MacOS/out/
|
||||
cp "../out/$JARNAME" $DESTDIR/Contents/MacOS/out/
|
||||
|
||||
# zip everything
|
||||
cd "out"
|
||||
rm $APPDIR.zip
|
||||
7z a -tzip $APPDIR.zip $APPDIR
|
||||
|
||||
echo "Build successful: $DESTDIR"
|
||||
|
||||
@@ -5,6 +5,8 @@ cd "${0%/*}"
|
||||
SRCFILES="terrarumwindows_x86"
|
||||
DESTDIR="TerrarumWindows.x86"
|
||||
RUNTIME="runtime-windows-x86"
|
||||
RCFILE="../out/build_autogen_windows.rc"
|
||||
JARNAME="TerrarumBuild.jar"
|
||||
|
||||
if [ ! -d "../assets_release" ]; then
|
||||
echo "'assets_release' does not exist; prepare the assets for the release and put them into the assets_release directory, exiting now." >&2
|
||||
@@ -21,8 +23,11 @@ then
|
||||
echo 'Mingw32 not found; please install mingw64-cross-gcc (or similar) to your system' >&2; exit 1;
|
||||
fi
|
||||
|
||||
x86_64-w64-mingw32-gcc -Os -s -o $DESTDIR/Terrarum.exe $SRCFILES/Terrarum.c || { echo 'Building EXE failed' >&2; exit 1; }
|
||||
# TODO add icon to the exe (use x86_64-w64-mingw32-windres?)
|
||||
# Compile .rc
|
||||
x86_64-w64-mingw32-windres $RCFILE -O coff -o $RCFILE.res
|
||||
|
||||
# compile exe
|
||||
x86_64-w64-mingw32-gcc -Os -s -o $DESTDIR/Terrarum.exe $SRCFILES/Terrarum.c $RCFILE.res || { echo 'Building EXE failed' >&2; exit 1; }
|
||||
|
||||
# Copy over a Java runtime
|
||||
mkdir $DESTDIR/out
|
||||
@@ -32,9 +37,10 @@ mv $DESTDIR/out/$RUNTIME/bin/java.exe $DESTDIR/out/$RUNTIME/bin/Terrarum.exe
|
||||
# Copy over all the assets and a jarfile
|
||||
cp -r "../assets_release" $DESTDIR/
|
||||
mv $DESTDIR/assets_release $DESTDIR/assets
|
||||
cp "../out/TerrarumBuild.jar" $DESTDIR/out/
|
||||
cp "../out/$JARNAME" $DESTDIR/out/
|
||||
|
||||
# Temporary solution: zip everything
|
||||
zip -r -9 -l "out/TerrarumWindows.x86.zip" $DESTDIR
|
||||
# zip everything
|
||||
rm "out/$DESTDIR.zip"
|
||||
zip -r -9 -l "out/$DESTDIR.zip" $DESTDIR
|
||||
rm -rf $DESTDIR || true
|
||||
echo "Build successful: $DESTDIR"
|
||||
|
||||
BIN
buildapp/icns.ico
Normal file
BIN
buildapp/icns.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
@@ -39,34 +39,20 @@ To build, **cd into the "(project root)/buildapp/", then execute the appropriate
|
||||
|
||||
The packaged application can be found on `(project root)/buildapp/out/`
|
||||
|
||||
#### OSX .app Packaging
|
||||
|
||||
```
|
||||
Terrarum.*.app
|
||||
+.icns /* 512x512 PNG */
|
||||
+Contents
|
||||
`Info.plist
|
||||
+MacOS
|
||||
`start_game_mac_*.sh * permission: +x */
|
||||
```
|
||||
|
||||
`assets/TerrarumBuild.jar` is the artifact built using the TerrarumBuild.
|
||||
|
||||
`start_game_*` files are on the root directory of the project; use them to build executable apps.
|
||||
|
||||
Hide the `.jar` within the subdirectory; users will think this file is the main executable and will try to execute it using whatever JVM they may (or may not) have.
|
||||
|
||||
### OSX .icns creation
|
||||
|
||||
Details: https://gist.github.com/jamieweavis/b4c394607641e1280d447deed5fc85fc
|
||||
0. Do this on a real macOS
|
||||
1. Create a folder `icon.iconset`, then cp the .png file as `icon_512x512.png`
|
||||
2. On Terminal, `iconutil -c icns icon.iconset`
|
||||
|
||||
https://gist.github.com/jamieweavis/b4c394607641e1280d447deed5fc85fc
|
||||
It might be possible to create .icns on Linux, haven't tried though. https://dentrassi.de/2014/02/25/creating-mac-os-x-icons-icns-on-linux/
|
||||
|
||||
#### Some Notes
|
||||
### Windows .ico creation
|
||||
|
||||
0. Open up the icon (png) file using GIMP
|
||||
1. Export As... -> *.ico, make sure to select either of 24 bpp (1 bit alpha) or 32 bpp (8 bit alpha)
|
||||
|
||||
- Windows EXE creation is not there yet. Maybe use one of [these?](https://sourceforge.net/projects/batch-compiler/)
|
||||
|
||||
### Notes to Terrarum Programmers
|
||||
|
||||
|
||||
36
buildapp/make_assets_release.sh
Executable file
36
buildapp/make_assets_release.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
if (( $EUID == 0 )); then echo "The build process is not meant to be run with root privilege, exiting now." >&2; exit 1; fi
|
||||
|
||||
cd "${0%/*}"
|
||||
DESTDIR="../assets_release"
|
||||
|
||||
rm -r $DESTDIR
|
||||
cp -r "../assets" $DESTDIR
|
||||
|
||||
rm $DESTDIR/loopey.wav
|
||||
rm $DESTDIR/ktGrepExample.kts
|
||||
rm $DESTDIR/batchtest.txt
|
||||
rm $DESTDIR/test_texture.tga
|
||||
rm $DESTDIR/worldbacktest.tga
|
||||
rm -r $DESTDIR/books
|
||||
rm $DESTDIR/clut/skybox.tga
|
||||
rm $DESTDIR/graphics/*.bat
|
||||
rm $DESTDIR/keylayout/*.not_ime
|
||||
rm $DESTDIR/mods/basegame/blocks/*.gz
|
||||
rm $DESTDIR/mods/basegame/blocks/*.txt
|
||||
rm $DESTDIR/mods/basegame/weathers/*.txt
|
||||
rm $DESTDIR/mods/basegame/weathers/*.md
|
||||
rm $DESTDIR/mods/basegame/weathers/*.kra
|
||||
rm -r $DESTDIR/mods/basegame/sounds
|
||||
rm -r $DESTDIR/mods/dwarventech
|
||||
|
||||
for s in .directory .DS_Store Thumbs.db thumbs.db; do
|
||||
rm $DESTDIR/$s
|
||||
rm $DESTDIR/*/$s
|
||||
rm $DESTDIR/*/*/$s
|
||||
rm $DESTDIR/*/*/*/$s
|
||||
rm $DESTDIR/*/*/*/*/$s
|
||||
rm $DESTDIR/*/*/*/*/*/$s
|
||||
rm $DESTDIR/*/*/*/*/*/*/$s
|
||||
rm $DESTDIR/*/*/*/*/*/*/*/$s
|
||||
done
|
||||
@@ -1,6 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Terrarum
|
||||
Exec=AppRun
|
||||
Icon=icns
|
||||
Type=Application
|
||||
Categories=Game;
|
||||
@@ -1,6 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Terrarum
|
||||
Exec=AppRun
|
||||
Icon=icns
|
||||
Type=Application
|
||||
Categories=Game;
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0"><dict>
|
||||
<key>CFBundleExecutable</key><string>Terrarum.sh</string>
|
||||
<key>CFBundleDisplayName</key><string>Terrarum</string>
|
||||
<key>CFBundleName</key><string>Terrarum</string>
|
||||
<key>CFBundleIconFile</key><string>AppIcon.icns</string>
|
||||
</dict></plist>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0"><dict>
|
||||
<key>CFBundleExecutable</key><string>Terrarum.sh</string>
|
||||
<key>CFBundleDisplayName</key><string>Terrarum</string>
|
||||
<key>CFBundleName</key><string>Terrarum</string>
|
||||
<key>CFBundleIconFile</key><string>AppIcon.icns</string>
|
||||
</dict></plist>
|
||||
@@ -1,6 +1,11 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <tchar.h>
|
||||
|
||||
int main() {
|
||||
return system(".\\out\\runtime-windows-x86\\bin\\Terrarum.exe -jar .\\out\\TerrarumBuild.jar");
|
||||
|
||||
ShellExecute(NULL, "open", "\".\\out\\runtime-windows-x86\\bin\\Terrarum.exe\"", "-jar \".\\out\\TerrarumBuild.jar\"", NULL, SW_HIDE);
|
||||
return 0;
|
||||
|
||||
//return system(".\\out\\runtime-windows-x86\\bin\\Terrarum.exe -jar .\\out\\TerrarumBuild.jar");
|
||||
}
|
||||
BIN
lib/commons-math3-3.6.1-javadoc.jar
LFS
Normal file
BIN
lib/commons-math3-3.6.1-javadoc.jar
LFS
Normal file
Binary file not shown.
BIN
lib/commons-math3-3.6.1-sources.jar
LFS
Normal file
BIN
lib/commons-math3-3.6.1-sources.jar
LFS
Normal file
Binary file not shown.
BIN
lib/commons-math3-3.6.1.jar
LFS
Normal file
BIN
lib/commons-math3-3.6.1.jar
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,72 @@
|
||||
package com.badlogic.gdx.graphics.glutils;
|
||||
|
||||
import com.badlogic.gdx.Application;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.GL20;
|
||||
import com.badlogic.gdx.graphics.GL30;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.utils.GdxRuntimeException;
|
||||
import net.torvald.terrarum.App;
|
||||
|
||||
// typealias Float16FrameBuffer = FloatFrameBuffer
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2023-08-16.
|
||||
*/
|
||||
public class Float16FrameBuffer extends FrameBuffer {
|
||||
|
||||
Float16FrameBuffer () {
|
||||
}
|
||||
|
||||
/** Creates a GLFrameBuffer from the specifications provided by bufferBuilder
|
||||
*
|
||||
* @param bufferBuilder **/
|
||||
protected Float16FrameBuffer (GLFrameBufferBuilder<? extends GLFrameBuffer<Texture>> bufferBuilder) {
|
||||
super(bufferBuilder);
|
||||
}
|
||||
|
||||
/** Creates a new FrameBuffer with a float backing texture, having the given dimensions and potentially a depth buffer
|
||||
* attached.
|
||||
*
|
||||
* @param width the width of the framebuffer in pixels
|
||||
* @param height the height of the framebuffer in pixels
|
||||
* @param hasDepth whether to attach a depth buffer
|
||||
* @throws GdxRuntimeException in case the FrameBuffer could not be created */
|
||||
public Float16FrameBuffer (int width, int height, boolean hasDepth) {
|
||||
if (App.isAppleM) { // disable float framebuffer for Apple M chips
|
||||
FrameBufferBuilder bufferBuilder = new FrameBufferBuilder(width, height);
|
||||
bufferBuilder.addColorTextureAttachment(GL20.GL_RGBA, GL20.GL_RGBA, GL20.GL_UNSIGNED_SHORT); // but 16bpp int works perfectly?!
|
||||
if (hasDepth) bufferBuilder.addBasicDepthRenderBuffer();
|
||||
this.bufferBuilder = bufferBuilder;
|
||||
}
|
||||
else {
|
||||
FloatFrameBufferBuilder bufferBuilder = new FloatFrameBufferBuilder(width, height);
|
||||
bufferBuilder.addFloatAttachment(GL30.GL_RGBA16F, GL30.GL_RGBA, GL30.GL_FLOAT, false);
|
||||
if (hasDepth) bufferBuilder.addBasicDepthRenderBuffer();
|
||||
this.bufferBuilder = bufferBuilder;
|
||||
}
|
||||
|
||||
build();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Texture createTexture (FrameBufferTextureAttachmentSpec attachmentSpec) {
|
||||
if (App.isAppleM) {
|
||||
GLOnlyTextureData data = new GLOnlyTextureData(bufferBuilder.width, bufferBuilder.height, 0, attachmentSpec.internalFormat,
|
||||
attachmentSpec.format, attachmentSpec.type);
|
||||
Texture result = new Texture(data);
|
||||
result.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
|
||||
result.setWrap(Texture.TextureWrap.ClampToEdge, Texture.TextureWrap.ClampToEdge);
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
FloatTextureData data = new FloatTextureData(bufferBuilder.width, bufferBuilder.height, attachmentSpec.internalFormat,
|
||||
attachmentSpec.format, attachmentSpec.type, attachmentSpec.isGpuOnly);
|
||||
Texture result = new Texture(data);
|
||||
result.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
|
||||
result.setWrap(Texture.TextureWrap.ClampToEdge, Texture.TextureWrap.ClampToEdge);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -248,6 +248,10 @@ final public class FastMath {
|
||||
return interpolateCatmullRom(u, 0.5f, p0, p1, p2, p3);
|
||||
}
|
||||
|
||||
public static float interpolateCatmullRom(float u, float[] ps) {
|
||||
return interpolateCatmullRom(u, 0.5f, ps[0], ps[1], ps[2], ps[3]);
|
||||
}
|
||||
|
||||
/**Interpolate a spline between at least 4 control points following the Catmull-Rom equation.
|
||||
* here is the interpolation matrix
|
||||
* m = [ 0.0 1.0 0.0 0.0 ]
|
||||
@@ -331,8 +335,7 @@ final public class FastMath {
|
||||
return l;
|
||||
}
|
||||
|
||||
|
||||
public static float interpolateHermite(float scale, float p0, float p1, float p2, float p3) {
|
||||
/*public static float interpolateHermite(float scale, float p0, float p1, float p2, float p3) {
|
||||
// return interpolateHermite(scale, p0, p1, p2, p3, 0f, 0f);
|
||||
float mu2 = scale * scale;
|
||||
float mu3 = mu2 * scale;
|
||||
@@ -350,7 +353,7 @@ final public class FastMath {
|
||||
float a3 = -2*mu3 + 3*mu2 + 0;
|
||||
|
||||
return a0*p1 + a1*m0 + a2*m1 + a3*p2;
|
||||
}
|
||||
}*/
|
||||
//public static float interpolateHermite(float scale, float p0, float p1, float p2, float p3, float tension, float bias) {}
|
||||
|
||||
|
||||
|
||||
@@ -192,6 +192,16 @@ fun CIEXYZ.toColorRaw(): Color {
|
||||
return Color(rgb.r, rgb.g, rgb.b, rgb.alpha)
|
||||
}
|
||||
|
||||
fun CIEXYZ.toYXY(): CIEYXY {
|
||||
val dot = this.X + this.Y + this.Z
|
||||
return CIEYXY(
|
||||
this.Y,
|
||||
this.X / dot,
|
||||
this.Y / dot,
|
||||
this.alpha
|
||||
)
|
||||
}
|
||||
|
||||
fun CIEYXY.toXYZ(): CIEXYZ {
|
||||
return CIEXYZ(x * yy / y, yy, (1f - x - y) * yy / y)
|
||||
}
|
||||
|
||||
@@ -12,16 +12,14 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.unicode.EMDASH
|
||||
import net.torvald.colourutil.*
|
||||
import net.torvald.parametricsky.datasets.DatasetCIEXYZ
|
||||
import net.torvald.parametricsky.datasets.DatasetRGB
|
||||
import net.torvald.parametricsky.datasets.DatasetSpectral
|
||||
import net.torvald.terrarum.abs
|
||||
import net.torvald.terrarum.clut.Skybox
|
||||
import net.torvald.terrarum.clut.Skybox.coerceInSmoothly
|
||||
import net.torvald.terrarum.clut.Skybox.mapCircle
|
||||
import net.torvald.terrarum.inUse
|
||||
import net.torvald.terrarum.modulebasegame.worldgenerator.HALF_PI
|
||||
import net.torvald.terrarum.modulebasegame.worldgenerator.TWO_PI
|
||||
import java.awt.BorderLayout
|
||||
import java.awt.Dimension
|
||||
import java.awt.FlowLayout
|
||||
import java.awt.GridLayout
|
||||
import java.lang.Math.pow
|
||||
import javax.swing.*
|
||||
import kotlin.math.*
|
||||
@@ -94,7 +92,16 @@ class Application(val WIDTH: Int, val HEIGHT: Int) : Game() {
|
||||
if (turbidity <= 0) throw IllegalStateException()
|
||||
|
||||
// we need to use different model-state to accommodate different albedo for each spectral band but oh well...
|
||||
genTexLoop(model)
|
||||
genTexLoop(model, elevation)
|
||||
// println("$elevation\t${ymaxDisp.text}\t${ymaxDisp2.text}")
|
||||
|
||||
|
||||
/*for (elev in -75..75) {
|
||||
val elevation = Math.toRadians(elev.toDouble())
|
||||
val model = ArHosekSkyModel.arhosek_xyz_skymodelstate_alloc_init(turbidity, albedo, elevation.abs())
|
||||
genTexLoop(model, elevation)
|
||||
println("$elev\t${ymaxDisp.text}\t${ymaxDisp2.text}")
|
||||
}*/
|
||||
|
||||
|
||||
val tex = Texture(oneScreen)
|
||||
@@ -127,7 +134,7 @@ class Application(val WIDTH: Int, val HEIGHT: Int) : Game() {
|
||||
}
|
||||
|
||||
val outTexWidth = 1
|
||||
val outTexHeight = 256
|
||||
val outTexHeight = 128
|
||||
|
||||
private fun Float.scaleFun() =
|
||||
(1f - 1f / 2f.pow(this/6f)) * 0.97f
|
||||
@@ -142,14 +149,20 @@ class Application(val WIDTH: Int, val HEIGHT: Int) : Game() {
|
||||
)
|
||||
}
|
||||
else {
|
||||
val elevation1 = -Math.toDegrees(elevation)
|
||||
val elevation2 = -Math.toDegrees(elevation) / 28.5
|
||||
val scale = (1f - (1f - 1f / 1.8.pow(elevation1)) * 0.97f).toFloat()
|
||||
val scale2 = (1.0 - (elevation2.pow(E) / E.pow(elevation2))*0.8).toFloat()
|
||||
// maths model: https://www.desmos.com/calculator/cwi7iyzygg
|
||||
|
||||
val x = -Math.toDegrees(elevation).toFloat()
|
||||
// val elevation2 = -Math.toDegrees(elevation) / 28.5
|
||||
val p = 3.5f
|
||||
val q = 7.5f
|
||||
val s = -0.2f
|
||||
val f = (1f - (1f - 1f / 1.8f.pow(x)) * 0.97f).toFloat()
|
||||
// val g = (1.0 - (elevation2.pow(E) / E.pow(elevation2))*0.8).toFloat()
|
||||
val h = ((x / q).pow(p) + 1f).pow(s)
|
||||
CIEXYZ(
|
||||
this.X.scaleFun() * scale * scale2,
|
||||
this.Y.scaleFun() * scale * scale2,
|
||||
this.Z.scaleFun() * scale * scale2,
|
||||
this.X.scaleFun() * f * h,
|
||||
this.Y.scaleFun() * f * h,
|
||||
this.Z.scaleFun() * f * h,
|
||||
this.alpha
|
||||
)
|
||||
}
|
||||
@@ -161,7 +174,7 @@ class Application(val WIDTH: Int, val HEIGHT: Int) : Game() {
|
||||
* Generated texture is as if you took the panorama picture of sky: up 70deg to horizon, east-south-west;
|
||||
* with sun not moving (sun is at exact south, sun's height is adjustable)
|
||||
*/
|
||||
private fun genTexLoop(state: ArHosekSkyModelState) {
|
||||
private fun genTexLoop(state: ArHosekSkyModelState, elevation: Double) {
|
||||
|
||||
fun normaliseY(y: Double): Float {
|
||||
var v = y.coerceAtLeast(0.0)
|
||||
@@ -175,6 +188,7 @@ class Application(val WIDTH: Int, val HEIGHT: Int) : Game() {
|
||||
val ys2 = ArrayList<Float>()
|
||||
|
||||
val halfHeight = oneScreen.height * 0.5
|
||||
val elevationDeg = Math.toDegrees(elevation)
|
||||
|
||||
for (x in 0 until oneScreen.width) {
|
||||
for (y in 0 until oneScreen.height) {
|
||||
@@ -186,17 +200,19 @@ class Application(val WIDTH: Int, val HEIGHT: Int) : Game() {
|
||||
val theta = sqrt(xf*xf + yf*yf) * HALF_PI*/
|
||||
|
||||
// AM-PM mapping (use with WIDTH=1)
|
||||
var yf = (y * 2.0 / oneScreen.height) % 1.0
|
||||
if (elevation < 0) yf *= 1.0 - pow(-elevation / HALF_PI, 0.333)
|
||||
val yp = y % (oneScreen.height / 2)
|
||||
val yi = yp - 3
|
||||
val xf = -elevationDeg / 90.0
|
||||
var yf = (yi / 58.0).coerceIn(0.0, 1.0).mapCircle().coerceInSmoothly(0.0, 0.95)
|
||||
if (elevationDeg < 0) yf *= Skybox.superellipsoidDecay(1.0 / 3.0, xf)
|
||||
val theta = yf * HALF_PI
|
||||
val gamma = if (y < halfHeight) HALF_PI else 3 * HALF_PI
|
||||
val theta = yf.mapCircle() * HALF_PI
|
||||
|
||||
|
||||
|
||||
val xyz = CIEXYZ(
|
||||
ArHosekSkyModel.arhosek_tristim_skymodel_radiance(state, theta, gamma, 0).toFloat(),
|
||||
ArHosekSkyModel.arhosek_tristim_skymodel_radiance(state, theta, gamma, 1).toFloat(),
|
||||
ArHosekSkyModel.arhosek_tristim_skymodel_radiance(state, theta, gamma, 2).toFloat()
|
||||
ArHosekSkyModel.arhosek_tristim_skymodel_radiance(state, theta, gamma, 2).toFloat(),
|
||||
)
|
||||
val xyz2 = xyz.scaleToFit(elevation)
|
||||
ys.add(xyz.Y)
|
||||
@@ -204,12 +220,12 @@ class Application(val WIDTH: Int, val HEIGHT: Int) : Game() {
|
||||
val rgb = xyz2.toRGB().toColor()
|
||||
rgb.a = 1f
|
||||
|
||||
val rgb2 = Color(
|
||||
/*val rgb2 = Color(
|
||||
((rgb.r * 255f).roundToInt() xor 0xAA) / 255f,
|
||||
((rgb.g * 255f).roundToInt() xor 0xAA) / 255f,
|
||||
((rgb.b * 255f).roundToInt() xor 0xAA) / 255f,
|
||||
rgb.a
|
||||
)
|
||||
)*/
|
||||
|
||||
oneScreen.setColor(rgb)
|
||||
oneScreen.drawPixel(x, y)
|
||||
|
||||
@@ -34,6 +34,10 @@ abstract class SpriteAnimation(@Transient val parentActor: ActorWithBody) : Disp
|
||||
|
||||
/**
|
||||
* This class should not be serialised; save its Animation Description Language instead.
|
||||
*
|
||||
* Maximum rows: 64
|
||||
*
|
||||
* Maximum frames: unlimited
|
||||
*/
|
||||
class SheetSpriteAnimation(parentActor: ActorWithBody) : SpriteAnimation(parentActor) {
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import net.torvald.terrarum.gamecontroller.KeyToggler;
|
||||
import net.torvald.terrarum.gamecontroller.TerrarumKeyboardEvent;
|
||||
import net.torvald.terrarum.gameitems.GameItem;
|
||||
import net.torvald.terrarum.gameworld.GameWorld;
|
||||
import net.torvald.terrarum.imagefont.BigAlphNum;
|
||||
import net.torvald.terrarum.imagefont.TinyAlphNum;
|
||||
import net.torvald.terrarum.langpack.Lang;
|
||||
import net.torvald.terrarum.modulebasegame.IngameRenderer;
|
||||
@@ -62,9 +63,11 @@ public class App implements ApplicationListener {
|
||||
|
||||
public static final String GAME_NAME = TerrarumAppConfiguration.GAME_NAME;
|
||||
public static final long VERSION_RAW = TerrarumAppConfiguration.VERSION_RAW;
|
||||
public static final String VERSION_TAG = TerrarumAppConfiguration.VERSION_TAG;
|
||||
|
||||
public static final String getVERSION_STRING() {
|
||||
return String.format("%d.%d.%d", VERSION_RAW >>> 48, (VERSION_RAW & 0xffff000000L) >>> 24, VERSION_RAW & 0xffffffL);
|
||||
return String.format("%d.%d.%d", VERSION_RAW >>> 48, (VERSION_RAW & 0xffff000000L) >>> 24, VERSION_RAW & 0xffffffL) +
|
||||
(VERSION_TAG.isBlank() ? "" : "-"+VERSION_TAG);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -196,6 +199,7 @@ public class App implements ApplicationListener {
|
||||
/** Big interchar */
|
||||
public static TerrarumSansBitmap fontUITitle;
|
||||
public static TinyAlphNum fontSmallNumbers;
|
||||
public static BigAlphNum fontBigNumbers;
|
||||
|
||||
/** A gamepad. Multiple gamepads may controll this single virtualised gamepad. */
|
||||
public static TerrarumController gamepad = null;
|
||||
@@ -267,12 +271,13 @@ public class App implements ApplicationListener {
|
||||
Gdx.gl20.glViewport(0, 0, width, height);
|
||||
}
|
||||
|
||||
public static final float UPDATE_RATE = 1f / 64f; // apparent framerate will be limited by update rate
|
||||
public static final int TICK_SPEED = 64;
|
||||
public static final float UPDATE_RATE = 1f / TICK_SPEED; // apparent framerate will be limited by update rate
|
||||
|
||||
private static float loadTimer = 0f;
|
||||
private static final float showupTime = 100f / 1000f;
|
||||
|
||||
private static FloatFrameBuffer renderFBO;
|
||||
private static Float16FrameBuffer renderFBO;
|
||||
|
||||
public static HashSet<File> tempFilePool = new HashSet<>();
|
||||
|
||||
@@ -609,19 +614,21 @@ public class App implements ApplicationListener {
|
||||
|
||||
private static void processScreenshotRequest(FrameBuffer fb) {
|
||||
if (screenshotRequested) {
|
||||
String msg = "Screenshot taken";
|
||||
FrameBufferManager.begin(fb);
|
||||
try {
|
||||
Pixmap p = Pixmap.createFromFrameBuffer(0, 0, fb.getWidth(), fb.getHeight());
|
||||
PixmapIO.writePNG(Gdx.files.absolute(defaultDir+"/Screenshot-"+String.valueOf(System.currentTimeMillis())+".png"), p, 9, true);
|
||||
p.dispose();
|
||||
Terrarum.INSTANCE.getIngame().sendNotification("Screenshot taken");
|
||||
}
|
||||
catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
Terrarum.INSTANCE.getIngame().sendNotification("Failed to take screenshot: "+e.getMessage());
|
||||
msg = ("Failed to take screenshot: "+e.getMessage());
|
||||
}
|
||||
FrameBufferManager.end();
|
||||
screenshotRequested = false;
|
||||
|
||||
Terrarum.INSTANCE.getIngame().sendNotification(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -750,12 +757,12 @@ public class App implements ApplicationListener {
|
||||
(renderFBO.getWidth() != scr.getWidth() ||
|
||||
renderFBO.getHeight() != scr.getHeight())
|
||||
) {
|
||||
renderFBO = new FloatFrameBuffer(
|
||||
renderFBO = new Float16FrameBuffer(
|
||||
scr.getWidth(),
|
||||
scr.getHeight(),
|
||||
false
|
||||
);
|
||||
postProcessorOutFBO2 = new FloatFrameBuffer(
|
||||
postProcessorOutFBO2 = new Float16FrameBuffer(
|
||||
scr.getWidth() * 2,
|
||||
scr.getHeight() * 2,
|
||||
false
|
||||
@@ -823,6 +830,7 @@ public class App implements ApplicationListener {
|
||||
fontGame.dispose();
|
||||
fontGameFBO.dispose();
|
||||
fontSmallNumbers.dispose();
|
||||
fontBigNumbers.dispose();
|
||||
ItemSlotImageFactory.INSTANCE.dispose();
|
||||
|
||||
logo.getTexture().dispose();
|
||||
@@ -901,6 +909,7 @@ public class App implements ApplicationListener {
|
||||
currentScreen.show();
|
||||
currentScreen.resize(scr.getWidth(), scr.getHeight());
|
||||
|
||||
TerrarumGlobalState.INSTANCE.getHAS_KEYBOARD_INPUT_FOCUS().unset();
|
||||
|
||||
System.gc();
|
||||
|
||||
@@ -1002,6 +1011,7 @@ public class App implements ApplicationListener {
|
||||
|
||||
|
||||
fontSmallNumbers = TinyAlphNum.INSTANCE;
|
||||
fontBigNumbers = BigAlphNum.INSTANCE;
|
||||
|
||||
IME.invoke();
|
||||
inputStrober = InputStrober.INSTANCE;
|
||||
@@ -1180,6 +1190,8 @@ public class App implements ApplicationListener {
|
||||
public static String configDir;
|
||||
/** defaultDir + "/LoadOrder.txt" */
|
||||
public static String loadOrderDir;
|
||||
/** defaultDir + "/Imported" */
|
||||
public static String importDir;
|
||||
|
||||
public static RunningEnvironment environment;
|
||||
|
||||
@@ -1219,6 +1231,7 @@ public class App implements ApplicationListener {
|
||||
loadOrderDir = defaultDir + "/LoadOrder.txt";
|
||||
recycledPlayersDir = defaultDir + "/Recycled/Players";
|
||||
recycledWorldsDir = defaultDir + "/Recycled/Worlds";
|
||||
importDir = defaultDir + "/Imports";
|
||||
|
||||
System.out.println(String.format("os.name = %s (with identifier %s)", OSName, operationSystem));
|
||||
System.out.println(String.format("os.version = %s", OSVersion));
|
||||
@@ -1234,6 +1247,7 @@ public class App implements ApplicationListener {
|
||||
new File(worldsDir),
|
||||
new File(recycledPlayersDir),
|
||||
new File(recycledWorldsDir),
|
||||
new File(importDir)
|
||||
};
|
||||
|
||||
for (File it : dirs) {
|
||||
@@ -1373,6 +1387,8 @@ public class App implements ApplicationListener {
|
||||
* @throws NullPointerException if the specified config simply does not exist.
|
||||
*/
|
||||
public static int getConfigInt(String key) {
|
||||
if (key == null) return -1;
|
||||
|
||||
Object cfg = getConfigMaster(key);
|
||||
|
||||
if (cfg instanceof Integer) return ((int) cfg);
|
||||
|
||||
90
src/net/torvald/terrarum/ControlPresets.kt
Normal file
90
src/net/torvald/terrarum/ControlPresets.kt
Normal file
@@ -0,0 +1,90 @@
|
||||
package net.torvald.terrarum
|
||||
|
||||
import com.badlogic.gdx.Input
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2023-08-24.
|
||||
*/
|
||||
object ControlPresets {
|
||||
|
||||
val wasd = hashMapOf<String, Int>(
|
||||
"control_key_up" to Input.Keys.W,
|
||||
"control_key_left" to Input.Keys.A,
|
||||
"control_key_down" to Input.Keys.S,
|
||||
"control_key_right" to Input.Keys.D,
|
||||
|
||||
"control_key_jump" to Input.Keys.SPACE,
|
||||
"control_key_movementaux" to Input.Keys.SHIFT_LEFT, // movement-auxiliary, or hookshot
|
||||
"control_key_inventory" to Input.Keys.Q,
|
||||
"control_key_interact" to Input.Keys.R,
|
||||
"control_key_discard" to Input.Keys.F,
|
||||
"control_key_close" to Input.Keys.X, // this or hard-coded ESC
|
||||
"control_key_zoom" to Input.Keys.Z,
|
||||
|
||||
"control_key_gamemenu" to Input.Keys.TAB,
|
||||
"control_key_crafting" to Input.Keys.E,
|
||||
"control_key_quicksel" to Input.Keys.CONTROL_LEFT, // pie menu is now LShift because CapsLock is actually used by the my bespoke keyboard input
|
||||
)
|
||||
|
||||
val esdf = hashMapOf<String, Int>(
|
||||
"control_key_up" to Input.Keys.E,
|
||||
"control_key_left" to Input.Keys.S,
|
||||
"control_key_down" to Input.Keys.D,
|
||||
"control_key_right" to Input.Keys.F, // ESDF Masterrace
|
||||
|
||||
"control_key_jump" to Input.Keys.SPACE,
|
||||
"control_key_movementaux" to Input.Keys.A, // movement-auxiliary, or hookshot
|
||||
"control_key_inventory" to Input.Keys.Q,
|
||||
"control_key_interact" to Input.Keys.R,
|
||||
"control_key_discard" to Input.Keys.T,
|
||||
"control_key_close" to Input.Keys.C, // this or hard-coded ESC
|
||||
"control_key_zoom" to Input.Keys.Z,
|
||||
|
||||
"control_key_gamemenu" to Input.Keys.TAB,
|
||||
"control_key_crafting" to Input.Keys.W,
|
||||
"control_key_quicksel" to Input.Keys.SHIFT_LEFT, // pie menu is now LShift because CapsLock is actually used by the my bespoke keyboard input
|
||||
)
|
||||
|
||||
val ijkl = hashMapOf<String, Int>(
|
||||
"control_key_up" to Input.Keys.I,
|
||||
"control_key_left" to Input.Keys.J,
|
||||
"control_key_down" to Input.Keys.K,
|
||||
"control_key_right" to Input.Keys.L,
|
||||
|
||||
"control_key_jump" to Input.Keys.SPACE,
|
||||
"control_key_movementaux" to Input.Keys.SEMICOLON, // movement-auxiliary, or hookshot
|
||||
"control_key_inventory" to Input.Keys.P,
|
||||
"control_key_interact" to Input.Keys.U,
|
||||
"control_key_discard" to Input.Keys.Y,
|
||||
"control_key_close" to Input.Keys.M, // this or hard-coded ESC
|
||||
"control_key_zoom" to Input.Keys.SLASH,
|
||||
|
||||
"control_key_gamemenu" to Input.Keys.LEFT_BRACKET,
|
||||
"control_key_crafting" to Input.Keys.O,
|
||||
"control_key_quicksel" to Input.Keys.APOSTROPHE, // pie menu is now LShift because CapsLock is actually used by the my bespoke keyboard input
|
||||
)
|
||||
|
||||
val empty = hashMapOf<String, Int>()
|
||||
|
||||
val presets = hashMapOf( // unordered
|
||||
"WASD" to wasd,
|
||||
"ESDF" to esdf,
|
||||
"IJKL" to ijkl,
|
||||
"Custom" to empty,
|
||||
)
|
||||
|
||||
val presetLabels = listOf( // ordered
|
||||
"WASD",
|
||||
"ESDF",
|
||||
"IJKL",
|
||||
"Custom",
|
||||
)
|
||||
|
||||
fun getKey(label: String?): Int {
|
||||
if (label == null) return -1
|
||||
|
||||
val presetName = App.getConfigString("control_preset_keyboard") ?: "Custom"
|
||||
|
||||
return (presets[presetName] ?: throw IllegalStateException("No such keyboard preset: $presetName")).getOrDefault(label, App.getConfigInt(label))
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,8 @@ object DefaultConfig {
|
||||
|
||||
"usexinput" to true, // when FALSE, LT+RT input on xbox controller is impossible
|
||||
|
||||
"control_preset_keyboard" to "WASD",
|
||||
|
||||
"control_gamepad_keyn" to 3,
|
||||
"control_gamepad_keyw" to 2,
|
||||
"control_gamepad_keys" to 0,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.torvald.terrarum
|
||||
|
||||
import com.badlogic.gdx.Input
|
||||
import com.badlogic.gdx.utils.Disposable
|
||||
import com.badlogic.gdx.utils.GdxRuntimeException
|
||||
import net.torvald.terrarum.App.printdbg
|
||||
@@ -9,6 +10,7 @@ import net.torvald.terrarum.gameactors.ActorID
|
||||
import net.torvald.terrarum.gameactors.ActorWithBody
|
||||
import net.torvald.terrarum.gameactors.ActorWithBody.Companion.PHYS_EPSILON_DIST
|
||||
import net.torvald.terrarum.gameactors.BlockMarkerActor
|
||||
import net.torvald.terrarum.gamecontroller.KeyToggler
|
||||
import net.torvald.terrarum.gamecontroller.TerrarumKeyboardEvent
|
||||
import net.torvald.terrarum.gameitems.ItemID
|
||||
import net.torvald.terrarum.gameworld.GameWorld
|
||||
@@ -165,6 +167,9 @@ open class IngameInstance(val batch: FlippingSpriteBatch, val isMultiplayer: Boo
|
||||
|
||||
override fun show() {
|
||||
// the very basic show() implementation
|
||||
for (k in Input.Keys.F1..Input.Keys.F12) {
|
||||
KeyToggler.forceSet(k, false)
|
||||
}
|
||||
|
||||
// add blockmarking_actor into the actorlist
|
||||
(CommonResourcePool.get("blockmarking_actor") as BlockMarkerActor).let {
|
||||
@@ -531,6 +536,9 @@ open class IngameInstance(val batch: FlippingSpriteBatch, val isMultiplayer: Boo
|
||||
else
|
||||
null
|
||||
}
|
||||
|
||||
fun onConfigChange() {
|
||||
}
|
||||
}
|
||||
|
||||
inline fun Lock.lock(body: () -> Unit) {
|
||||
|
||||
@@ -2,11 +2,13 @@ package net.torvald.terrarum
|
||||
|
||||
import com.badlogic.gdx.Gdx
|
||||
import com.badlogic.gdx.files.FileHandle
|
||||
import com.badlogic.gdx.graphics.Pixmap
|
||||
import com.badlogic.gdx.utils.JsonValue
|
||||
import net.torvald.terrarum.App.*
|
||||
import net.torvald.terrarum.App.setToGameConfig
|
||||
import net.torvald.terrarum.blockproperties.BlockCodex
|
||||
import net.torvald.terrarum.blockproperties.WireCodex
|
||||
import net.torvald.terrarum.gamecontroller.IME
|
||||
import net.torvald.terrarum.gameitems.GameItem
|
||||
import net.torvald.terrarum.gameitems.ItemID
|
||||
import net.torvald.terrarum.itemproperties.ItemCodex
|
||||
@@ -15,6 +17,7 @@ import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.utils.CSVFetcher
|
||||
import net.torvald.terrarum.utils.JsonFetcher
|
||||
import net.torvald.terrarum.utils.forEachSiblings
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
import org.apache.commons.codec.digest.DigestUtils
|
||||
import org.apache.commons.csv.CSVFormat
|
||||
import org.apache.commons.csv.CSVParser
|
||||
@@ -211,6 +214,18 @@ object ModMgr {
|
||||
GameRetextureLoader(moduleName)
|
||||
}
|
||||
|
||||
// add locales if exists
|
||||
if (hasFile(moduleName, "locales")) {
|
||||
printdbg(this, "Trying to load Locales on ${moduleName}")
|
||||
GameLanguageLoader(moduleName)
|
||||
}
|
||||
|
||||
// add keylayouts if exists
|
||||
if (hasFile(moduleName, "keylayout")) {
|
||||
printdbg(this, "Trying to load Keyboard Layouts on ${moduleName}")
|
||||
GameIMELoader(moduleName)
|
||||
}
|
||||
|
||||
// run entry script in entry point
|
||||
if (entryPoint.isNotBlank()) {
|
||||
var newClass: Class<*>? = null
|
||||
@@ -513,6 +528,56 @@ object ModMgr {
|
||||
}
|
||||
}
|
||||
|
||||
object GameIMELoader {
|
||||
const val keebPath = "keylayout/"
|
||||
|
||||
@JvmStatic operator fun invoke(module: String) {
|
||||
val FILE = getFile(module, keebPath)
|
||||
|
||||
FILE.listFiles { file, s -> s.endsWith(".${IME.KEYLAYOUT_EXTENSION}") }.sortedBy { it.name }.forEach {
|
||||
printdbg(this, "Registering Low layer ${it.nameWithoutExtension.lowercase()}")
|
||||
IME.registerLowLayer(it.nameWithoutExtension.lowercase(), IME.parseKeylayoutFile(it))
|
||||
}
|
||||
|
||||
FILE.listFiles { file, s -> s.endsWith(".${IME.IME_EXTENSION}") }.sortedBy { it.name }.forEach {
|
||||
printdbg(this, "Registering High layer ${it.nameWithoutExtension.lowercase()}")
|
||||
IME.registerHighLayer(it.nameWithoutExtension.lowercase(), IME.parseImeFile(it))
|
||||
}
|
||||
|
||||
val iconFile = getFile(module, keebPath + "icons.tga").let {
|
||||
if (it.exists()) it else getFile(module, keebPath + "icons.png")
|
||||
}
|
||||
|
||||
if (iconFile.exists()) {
|
||||
val iconSheet = TextureRegionPack(iconFile.path, 20, 20)
|
||||
val iconPixmap = Pixmap(Gdx.files.absolute(iconFile.path))
|
||||
for (k in 0 until iconPixmap.height step 20) {
|
||||
val langCode = StringBuilder()
|
||||
for (c in 0 until 20) {
|
||||
val x = c
|
||||
var charnum = 0
|
||||
for (b in 0 until 7) {
|
||||
val y = k + b
|
||||
if (iconPixmap.getPixel(x, y) and 255 != 0) {
|
||||
charnum = charnum or (1 shl b)
|
||||
}
|
||||
}
|
||||
if (charnum != 0) langCode.append(charnum.toChar())
|
||||
}
|
||||
|
||||
if (langCode.isNotEmpty()) {
|
||||
printdbg(this, "Icon order #${(k+1) / 20} - icons[\"$langCode\"] = iconSheet.get(1, ${k/20})")
|
||||
IME.icons["$langCode"] = iconSheet.get(1, k / 20).also { it.flip(false, false) }
|
||||
}
|
||||
}
|
||||
|
||||
App.disposables.add(iconSheet)
|
||||
iconPixmap.dispose()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
object GameMaterialLoader {
|
||||
const val matePath = "materials/"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.torvald.terrarum
|
||||
|
||||
import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.modulebasegame.ui.UIRemoCon
|
||||
import net.torvald.terrarum.ui.UICanvas
|
||||
@@ -17,7 +18,7 @@ class ModOptionsHost(val remoCon: UIRemoCon) : UICanvas() {
|
||||
override fun updateUI(delta: Float) {
|
||||
}
|
||||
|
||||
override fun renderUI(batch: SpriteBatch, camera: Camera) {
|
||||
override fun renderUI(batch: SpriteBatch, camera: OrthographicCamera) {
|
||||
}
|
||||
|
||||
override fun dispose() {
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.glutils.FrameBuffer
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.ui.Toolkit
|
||||
import net.torvald.terrarum.utils.OpenFile
|
||||
import java.awt.Desktop
|
||||
import java.io.File
|
||||
|
||||
@@ -90,7 +91,7 @@ class NoModuleDefaultTitlescreen(batch: FlippingSpriteBatch) : IngameInstance(ba
|
||||
App.scr.hf - Gdx.input.y in pathButtonY - 12..pathButtonY + pathButtonH + 12)
|
||||
|
||||
if (mouseOnLink && Gdx.input.isButtonJustPressed(Input.Buttons.LEFT)) {
|
||||
Desktop.getDesktop().open(pathFile)
|
||||
OpenFile(pathFile)
|
||||
}
|
||||
|
||||
fbatch.inUse {
|
||||
|
||||
@@ -122,4 +122,6 @@ class Point2i() {
|
||||
|
||||
operator fun component1() = x
|
||||
operator fun component2() = y
|
||||
|
||||
fun toVector() = Vector2(this.x.toDouble(), this.y.toDouble())
|
||||
}
|
||||
|
||||
72
src/net/torvald/terrarum/Prebuild.kt
Normal file
72
src/net/torvald/terrarum/Prebuild.kt
Normal file
@@ -0,0 +1,72 @@
|
||||
package net.torvald.terrarum
|
||||
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2023-08-25.
|
||||
*/
|
||||
|
||||
private fun writeWindowsRC(major: Int, minor: Int, patch: Int) {
|
||||
val s = """1 ICON "icns.ico"
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION $major,$minor,$patch,0
|
||||
PRODUCTVERSION $major,$minor,$patch,0
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "040904b0"
|
||||
{
|
||||
VALUE "FileDescription", "${TerrarumAppConfiguration.GAME_NAME}\0"
|
||||
VALUE "FileVersion", "${App.getVERSION_STRING()}\0"
|
||||
VALUE "LegalCopyright", "${TerrarumAppConfiguration.COPYRIGHT_DATE_NAME}\0"
|
||||
VALUE "OriginalFilename", "${TerrarumAppConfiguration.GAME_NAME}.exe\0"
|
||||
VALUE "ProductName", "${TerrarumAppConfiguration.GAME_NAME}\0"
|
||||
VALUE "ProductVersion", "${App.getVERSION_STRING()}\0"
|
||||
}
|
||||
}
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x409, 1200
|
||||
}
|
||||
}"""
|
||||
val f = File("./out/build_autogen_windows.rc")
|
||||
f.delete()
|
||||
f.writeText(s)
|
||||
}
|
||||
|
||||
private fun writeOSXPlist(major: Int, minor: Int, patch: Int) {
|
||||
val s = """<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0"><dict>
|
||||
<key>CFBundleExecutable</key><string>${TerrarumAppConfiguration.GAME_NAME}.sh</string>
|
||||
<key>CFBundleDisplayName</key><string>${TerrarumAppConfiguration.GAME_NAME}</string>
|
||||
<key>CFBundleName</key><string>${TerrarumAppConfiguration.GAME_NAME}</string>
|
||||
<key>CFBundleIconFile</key><string>AppIcon.icns</string>
|
||||
<key>CFBundleVersion</key><string>${App.getVERSION_STRING()}</string>
|
||||
</dict></plist>"""
|
||||
val f = File("./out/build_autogen_macos_Info.plist")
|
||||
f.delete()
|
||||
f.writeText(s)
|
||||
}
|
||||
|
||||
private fun writeLinuxDesktop(major: Int, minor: Int, patch: Int) {
|
||||
val s = """[Desktop Entry]
|
||||
Name=${TerrarumAppConfiguration.GAME_NAME}
|
||||
Exec=AppRun
|
||||
Icon=icns
|
||||
Type=Application
|
||||
Categories=Game;"""
|
||||
val f = File("./out/build_autogen_linux.desktop")
|
||||
f.delete()
|
||||
f.writeText(s)
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val major = (App.VERSION_RAW ushr 48).toInt()
|
||||
val minor = ((App.VERSION_RAW and 0xffff000000L) ushr 24).toInt()
|
||||
val patch = (App.VERSION_RAW and 0xffffffL).toInt()
|
||||
|
||||
writeLinuxDesktop(major, minor, patch)
|
||||
writeOSXPlist(major, minor, patch)
|
||||
writeWindowsRC(major, minor, patch)
|
||||
}
|
||||
@@ -7,7 +7,7 @@ internal interface RNGConsumer {
|
||||
|
||||
val RNG: HQRNG
|
||||
|
||||
fun loadFromSave(s0: Long, s1: Long) {
|
||||
fun loadFromSave(ingame: IngameInstance, s0: Long, s1: Long) {
|
||||
RNG.setSeed(s0, s1)
|
||||
}
|
||||
|
||||
|
||||
@@ -167,8 +167,10 @@ class SavegameCollectionPair(private val player: SavegameCollection?, private va
|
||||
// private var autoPlayer: DiskSkimmer? = null
|
||||
// private var autoWorld: DiskSkimmer? = null
|
||||
|
||||
var isImported: Boolean = false; private set
|
||||
|
||||
/* removing auto/manual discrimination: on Local Asynchronous Multiplayer, if newer autosave is available, there is
|
||||
* no choice but loading one to preserve the data; then why bother having two? */
|
||||
* no choice but loading one to preserve the data; then why bother having two? */
|
||||
private var playerDisk: DiskSkimmer? = null; private set
|
||||
private var worldDisk: DiskSkimmer? = null; private set
|
||||
|
||||
@@ -221,6 +223,10 @@ class SavegameCollectionPair(private val player: SavegameCollection?, private va
|
||||
2
|
||||
else (player != null && world != null).toInt()
|
||||
|
||||
if (player != null) {
|
||||
isImported = (player.loadable().getSaveOrigin() and VDSaveOrigin.IMPORTED != 0)
|
||||
}
|
||||
|
||||
printdbg(this, "playerDisk = ${playerDisk?.diskFile?.path}")
|
||||
printdbg(this, "worldDisk = ${worldDisk?.diskFile?.path}")
|
||||
printdbg(this, "status = $status")
|
||||
@@ -341,6 +347,22 @@ class SavegameCollectionPair(private val player: SavegameCollection?, private va
|
||||
return if (status == 0) null
|
||||
else DiskPair(playerDisk!!, worldDisk!!)
|
||||
}
|
||||
|
||||
fun getImportedPlayer(): DiskSkimmer? {
|
||||
return if (isImported) player!!.loadable() else null
|
||||
}
|
||||
|
||||
fun getPlayerThumbnailPixmap(width: Int, height: Int, shrinkage: Double): Pixmap? {
|
||||
return player?.loadable()?.getThumbnailPixmap(width, height, shrinkage)?.let {
|
||||
if (it.isDisposed) null else it
|
||||
}
|
||||
}
|
||||
|
||||
fun getWorldThumbnailPixmap(width: Int, height: Int, shrinkage: Double): Pixmap? {
|
||||
return world?.loadable()?.getThumbnailPixmap(width, height, shrinkage)?.let {
|
||||
if (it.isDisposed) null else it
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data class DiskPair(val player: DiskSkimmer, val world: DiskSkimmer) {
|
||||
|
||||
@@ -813,8 +813,8 @@ fun AppUpdateListOfSavegames() {
|
||||
// if multiple valid savegames with same UUID exist, only the most recent one is retained
|
||||
if (!App.savegameWorlds.contains(worldUUID)) {
|
||||
App.savegameWorlds[worldUUID] = collection
|
||||
App.savegameWorldsName[worldUUID] = it.getDiskName(Common.CHARSET)
|
||||
App.sortedSavegameWorlds.add(worldUUID)
|
||||
App.savegameWorldsName[worldUUID] = it.getDiskName(Common.CHARSET)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -848,8 +848,8 @@ fun AppUpdateListOfSavegames() {
|
||||
// if multiple valid savegames with same UUID exist, only the most recent one is retained
|
||||
if (!App.savegamePlayers.contains(playerUUID)) {
|
||||
App.savegamePlayers[playerUUID] = collection
|
||||
App.savegamePlayersName[playerUUID] = it.getDiskName(Common.CHARSET)
|
||||
App.sortedPlayers.add(playerUUID)
|
||||
App.savegamePlayersName[playerUUID] = it.getDiskName(Common.CHARSET)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,9 +62,12 @@ basegame
|
||||
* e.g. 0x02010034 will be translated as 2.1.52
|
||||
*
|
||||
*/
|
||||
const val VERSION_RAW: Long = 0x0000_000003_000002
|
||||
const val VERSION_RAW: Long = 0x0000_000003_000003
|
||||
// Commit counts up to the Release 0.3.0: 2259
|
||||
// Commit counts up to the Release 0.3.1: 2278
|
||||
// Commit counts up to the Release 0.3.2: 2732
|
||||
|
||||
const val VERSION_TAG: String = "test003"
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
// CONFIGURATION FOR TILE MAKER //
|
||||
|
||||
25
src/net/torvald/terrarum/TerrarumGlobalState.kt
Normal file
25
src/net/torvald/terrarum/TerrarumGlobalState.kt
Normal file
@@ -0,0 +1,25 @@
|
||||
package net.torvald.terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2023-09-05.
|
||||
*/
|
||||
object TerrarumGlobalState {
|
||||
|
||||
val HAS_KEYBOARD_INPUT_FOCUS = CountedBool()
|
||||
|
||||
}
|
||||
|
||||
class CountedBool {
|
||||
private var counter = 0L
|
||||
|
||||
fun set() {
|
||||
counter += 1
|
||||
}
|
||||
fun unset() {
|
||||
if (counter >= 1) counter -= 1
|
||||
}
|
||||
val value: Boolean
|
||||
get() = counter > 0
|
||||
fun isOn() = value
|
||||
fun isOff() = !value
|
||||
}
|
||||
@@ -9,9 +9,11 @@ import com.badlogic.gdx.math.Matrix4
|
||||
import com.badlogic.gdx.utils.Disposable
|
||||
import com.jme3.math.FastMath
|
||||
import net.torvald.random.HQRNG
|
||||
import net.torvald.terrarum.App.IS_DEVELOPMENT_BUILD
|
||||
import net.torvald.terrarum.gamecontroller.KeyToggler
|
||||
import net.torvald.terrarum.ui.BasicDebugInfoWindow
|
||||
import net.torvald.terrarum.ui.Toolkit
|
||||
import net.torvald.terrarum.weather.WeatherMixer
|
||||
|
||||
/**
|
||||
* Must be called by the App Loader
|
||||
@@ -150,9 +152,10 @@ object TerrarumPostProcessor : Disposable {
|
||||
}
|
||||
|
||||
// draw dev build notifiers
|
||||
if (App.IS_DEVELOPMENT_BUILD && Terrarum.ingame != null) {
|
||||
// omitting this screws up HQ2X render for some reason
|
||||
if (Terrarum.ingame != null) {
|
||||
batch.inUse {
|
||||
batch.color = safeAreaCol
|
||||
batch.color = if (IS_DEVELOPMENT_BUILD) safeAreaCol else colourNull
|
||||
App.fontGame.draw(it, thisIsDebugStr, 5f, App.scr.height - 24f)
|
||||
}
|
||||
}
|
||||
@@ -192,6 +195,7 @@ object TerrarumPostProcessor : Disposable {
|
||||
return outFBO
|
||||
}
|
||||
private val rng = HQRNG()
|
||||
private val colourNull = Color(0)
|
||||
|
||||
private fun Double.format(digits: Int) = "%.${digits}f".format(this)
|
||||
private fun Float.format(digits: Int) = "%.${digits}f".format(this)
|
||||
@@ -233,6 +237,13 @@ object TerrarumPostProcessor : Disposable {
|
||||
else
|
||||
shaderPostNoDither
|
||||
|
||||
val (vo, vg) = INGAME.world.weatherbox.let {
|
||||
if (it.currentWeather.identifier == "titlescreen")
|
||||
1f to 1f
|
||||
else
|
||||
it.currentVibrancy.x to it.currentVibrancy.y
|
||||
}
|
||||
|
||||
App.getCurrentDitherTex().bind(1)
|
||||
fbo.colorBufferTexture.bind(0)
|
||||
|
||||
@@ -242,6 +253,7 @@ object TerrarumPostProcessor : Disposable {
|
||||
shader.setUniformi("rnd", rng.nextInt(8192), rng.nextInt(8192))
|
||||
shader.setUniformi("u_pattern", 1)
|
||||
shader.setUniformf("quant", shaderQuant[App.getConfigInt("displaycolourdepth")] ?: 255f)
|
||||
shader.setUniformf("vibrancy", 1f, vo, vg, 1f)
|
||||
shader.setUniformMatrix4fv("swizzler", swizzler, rng.nextInt(24), 16*4)
|
||||
App.fullscreenQuad.render(shader, GL20.GL_TRIANGLES)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class UIFakeGradOverlay : UICanvas() {
|
||||
}
|
||||
|
||||
override fun updateUI(delta: Float) {}
|
||||
override fun renderUI(batch: SpriteBatch, camera: Camera) {
|
||||
override fun renderUI(batch: SpriteBatch, camera: OrthographicCamera) {
|
||||
batch.end()
|
||||
val dither = App.getConfigBoolean("fx_dither")
|
||||
|
||||
@@ -84,7 +84,7 @@ class UIFakeBlurOverlay(val blurRadius: Float, val nodarken: Boolean) : UICanvas
|
||||
private val batchDrawCol = Color(-1)
|
||||
|
||||
override fun updateUI(delta: Float) {}
|
||||
override fun renderUI(batch: SpriteBatch, camera: Camera) {
|
||||
override fun renderUI(batch: SpriteBatch, camera: OrthographicCamera) {
|
||||
batchDrawCol.a = openness
|
||||
batch.color = batchDrawCol
|
||||
if (App.getConfigBoolean("fx_backgroundblur")) {
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package net.torvald.terrarum
|
||||
|
||||
import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.Pixmap
|
||||
import com.badlogic.gdx.graphics.Texture
|
||||
import com.badlogic.gdx.graphics.*
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.terrarum.gameitems.GameItem
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
@@ -271,7 +268,7 @@ class UIItemInventoryCatBar(
|
||||
}
|
||||
}
|
||||
|
||||
override fun render(batch: SpriteBatch, camera: Camera) {
|
||||
override fun render(batch: SpriteBatch, camera: OrthographicCamera) {
|
||||
super.render(batch, camera)
|
||||
|
||||
// button
|
||||
|
||||
@@ -2,6 +2,7 @@ package net.torvald.terrarum
|
||||
|
||||
import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import net.torvald.terrarum.gameitems.GameItem
|
||||
@@ -53,7 +54,7 @@ class UIItemInventoryElemSimple(
|
||||
private var highlightToMainCol = false
|
||||
private var highlightToSubCol = false
|
||||
|
||||
override fun render(batch: SpriteBatch, camera: Camera) {
|
||||
override fun render(batch: SpriteBatch, camera: OrthographicCamera) {
|
||||
blendNormalStraightAlpha(batch)
|
||||
|
||||
highlightToMainCol = customHighlightRuleMain?.invoke(this) ?: (equippedSlot != null && highlightEquippedItem) || forceHighlighted
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user