From 3058f0c277be1860b9159bf6ca98d64f5882af5a Mon Sep 17 00:00:00 2001 From: minjaesong Date: Tue, 26 Feb 2019 06:06:17 +0900 Subject: [PATCH] terrain mask PSDs --- .gitignore | 3 ++- .../terrarum/modulebasegame/ui/UIInventoryFull.kt | 4 +++- src/net/torvald/terrarum/serialise/SavegameWriter.kt | 2 +- src/net/torvald/terrarum/serialise/WriteWorldInfo.kt | 11 ++++------- .../torvald/terrarum/worlddrawer/BlocksDrawerNew.kt | 2 +- work_files/DataFormats/Savegame metadata.txt | 3 +++ work_files/graphics/terrain/terrain_mask_type01.psd | 3 +++ work_files/graphics/terrain/terrain_mask_type02.psd | 3 +++ work_files/graphics/terrain/terrain_mask_type03.psd | 3 +++ 9 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 work_files/graphics/terrain/terrain_mask_type01.psd create mode 100644 work_files/graphics/terrain/terrain_mask_type02.psd create mode 100644 work_files/graphics/terrain/terrain_mask_type03.psd diff --git a/.gitignore b/.gitignore index 6fe580c45..c7d5284f0 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,5 @@ tmp_* *.bin *.index *.threads -*_Leak_Suspects.zip \ No newline at end of file +*_Leak_Suspects.zip +desktop.ini diff --git a/src/net/torvald/terrarum/modulebasegame/ui/UIInventoryFull.kt b/src/net/torvald/terrarum/modulebasegame/ui/UIInventoryFull.kt index c697b6ae3..9f4572b6a 100644 --- a/src/net/torvald/terrarum/modulebasegame/ui/UIInventoryFull.kt +++ b/src/net/torvald/terrarum/modulebasegame/ui/UIInventoryFull.kt @@ -369,6 +369,8 @@ class UIInventoryFull( gameMenuButtons.render(batch, camera) } + private val encumbranceBarBackCol = Color(0xa0a0a0_ff.toInt()) + private fun renderScreenInventory(batch: SpriteBatch, camera: Camera) { itemList.render(batch, camera) equipped.render(batch, camera) @@ -391,7 +393,7 @@ class UIInventoryFull( // encumbrance bar background blendMul(batch) - batch.color = Color(0xa0a0a0_ff.toInt()) + batch.color = encumbranceBarBackCol batch.fillRect( xEnd - 3 - weightBarWidth + inventoryScrOffX, yEnd-20 + 3f, diff --git a/src/net/torvald/terrarum/serialise/SavegameWriter.kt b/src/net/torvald/terrarum/serialise/SavegameWriter.kt index 78815479b..49bf64fb6 100644 --- a/src/net/torvald/terrarum/serialise/SavegameWriter.kt +++ b/src/net/torvald/terrarum/serialise/SavegameWriter.kt @@ -80,7 +80,7 @@ object SavegameWriter { // worldinfo0..3 - val worldinfoBytes = WriteWorldInfo(gameworld) + val worldinfoBytes = WriteWorldInfo(ingame) worldinfoBytes?.forEachIndexed { index, bytes -> VDUtil.registerFile(disk, DiskEntry( 32766 - index, ROOT, "worldinfo$index".toByteArray(charset), diff --git a/src/net/torvald/terrarum/serialise/WriteWorldInfo.kt b/src/net/torvald/terrarum/serialise/WriteWorldInfo.kt index f7778fba4..48eb30302 100644 --- a/src/net/torvald/terrarum/serialise/WriteWorldInfo.kt +++ b/src/net/torvald/terrarum/serialise/WriteWorldInfo.kt @@ -8,11 +8,7 @@ import com.badlogic.gdx.graphics.PixmapIO2 import com.badlogic.gdx.graphics.g2d.SpriteBatch import com.badlogic.gdx.graphics.glutils.FrameBuffer import com.badlogic.gdx.utils.ScreenUtils -import net.torvald.terrarum.ModMgr -import net.torvald.terrarum.Terrarum -import net.torvald.terrarum.gameworld.GameWorld -import net.torvald.terrarum.inAction -import net.torvald.terrarum.inUse +import net.torvald.terrarum.* import net.torvald.terrarum.modulebasegame.gameworld.GameWorldExtension import net.torvald.terrarum.modulebasegame.weather.WeatherMixer import net.torvald.terrarum.modulebasegame.worldgenerator.RoguelikeRandomiser @@ -37,7 +33,7 @@ object WriteWorldInfo { * * @return List of ByteArray64, worldinfo0..worldinfo3; `null` on failure */ - internal operator fun invoke(world: GameWorld): List? { + internal operator fun invoke(ingame: IngameInstance): List? { //val path = "${AppLoader.defaultSaveDir}/tmp_worldinfo" @@ -82,6 +78,7 @@ object WriteWorldInfo { metaOut.write(HASHED_FILES_COUNT) // world name + val world = ingame.world val worldNameBytes = world.worldName.toByteArray(Charsets.UTF_8) //metaOut.write(worldNameBytes) worldNameBytes.forEach { @@ -125,7 +122,7 @@ object WriteWorldInfo { } // thumbnail - val texreg = Terrarum.ingame!!.actorGamer.sprite?.textureRegion + val texreg = ingame.actorGamer.sprite?.textureRegion if (texreg != null) { val batch = SpriteBatch() val camera = OrthographicCamera(texreg.tileW.toFloat(), texreg.tileH.toFloat()) diff --git a/src/net/torvald/terrarum/worlddrawer/BlocksDrawerNew.kt b/src/net/torvald/terrarum/worlddrawer/BlocksDrawerNew.kt index fd8ce138a..6e13c92d9 100644 --- a/src/net/torvald/terrarum/worlddrawer/BlocksDrawerNew.kt +++ b/src/net/torvald/terrarum/worlddrawer/BlocksDrawerNew.kt @@ -480,7 +480,7 @@ internal object BlocksDrawer { } - // draw a tile, but only when illuminated + // draw a tile try { val nearbyTilesInfo = if (mode == FLUID) { getNearbyTilesInfoFluids(x, y) diff --git a/work_files/DataFormats/Savegame metadata.txt b/work_files/DataFormats/Savegame metadata.txt index f37b907cd..66bdb9daf 100644 --- a/work_files/DataFormats/Savegame metadata.txt +++ b/work_files/DataFormats/Savegame metadata.txt @@ -40,3 +40,6 @@ D8 Deflated thumbnail image in TGA format p-2 (it's deflated so that it saves faster, so no Lzma) p-2 0xFF p-1 0xFE + +Note: if you're going to add more footer beyond this point, DON'T; + instead pack the thumbnail.tga and other footers in TEVD container. \ No newline at end of file diff --git a/work_files/graphics/terrain/terrain_mask_type01.psd b/work_files/graphics/terrain/terrain_mask_type01.psd new file mode 100644 index 000000000..b7aa2f6c4 --- /dev/null +++ b/work_files/graphics/terrain/terrain_mask_type01.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d0a2f10aaad2844825923ae0354bee51de3fb6fcf7488e3fe50acb6bece6207 +size 88812 diff --git a/work_files/graphics/terrain/terrain_mask_type02.psd b/work_files/graphics/terrain/terrain_mask_type02.psd new file mode 100644 index 000000000..cbb4c1351 --- /dev/null +++ b/work_files/graphics/terrain/terrain_mask_type02.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce8b52015750106036afd13eb8796944d1d6002d644334d828a5fcd406e9009f +size 182128 diff --git a/work_files/graphics/terrain/terrain_mask_type03.psd b/work_files/graphics/terrain/terrain_mask_type03.psd new file mode 100644 index 000000000..866f707a6 --- /dev/null +++ b/work_files/graphics/terrain/terrain_mask_type03.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03df0e0548fd6dcb11a5a3c731259660b99d0b91e812131d82331b3296e56905 +size 37354