mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
corner occlusion should render now
This commit is contained in:
@@ -15,6 +15,8 @@ id;classname
|
||||
|
||||
16;net.torvald.terrarum.modulebasegame.gameitems.ItemWorkbench
|
||||
|
||||
128;net.torvald.terrarum.modulebasegame.gameitems.OreCopper
|
||||
|
||||
256;net.torvald.terrarum.modulebasegame.gameitems.ItemSwingingDoorOak
|
||||
257;net.torvald.terrarum.modulebasegame.gameitems.ItemSwingingDoorEbony
|
||||
258;net.torvald.terrarum.modulebasegame.gameitems.ItemSwingingDoorBirch
|
||||
|
||||
|
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
package net.torvald.terrarum.modulebasegame.gameitems
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import net.torvald.terrarum.CommonResourcePool
|
||||
import net.torvald.terrarum.gameitems.GameItem
|
||||
import net.torvald.terrarum.gameitems.ItemID
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2023-10-11.
|
||||
*/
|
||||
open class OreItemBase(originalID: ItemID) : GameItem(originalID) {
|
||||
override var baseMass = 10.0
|
||||
override var baseToolSize: Double? = null
|
||||
override var inventoryCategory = Category.GENERIC
|
||||
override val isDynamic = false
|
||||
override val materialId = "OORE"
|
||||
}
|
||||
|
||||
class OreTimber(originalID: ItemID) : OreItemBase(originalID) {
|
||||
override var originalName = "ITEM_WOODS"
|
||||
override val materialId = "WOOD"
|
||||
override val itemImage: TextureRegion
|
||||
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(0,6)
|
||||
}
|
||||
class OreCopper(originalID: ItemID) : OreItemBase(originalID) {
|
||||
override var originalName = "ITEM_ORE_MALACHITE"
|
||||
override val itemImage: TextureRegion
|
||||
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(1,6)
|
||||
}
|
||||
@@ -373,7 +373,7 @@ internal object BlocksDrawer {
|
||||
// App.tileMaker.fluidToTileNumber(world.getFluid(x, y))
|
||||
// else
|
||||
renderTag.tileNumber
|
||||
var tileNumber = if (thisTile == 0) 0
|
||||
var tileNumber = if (thisTile == 0 && mode != OCCLUSION) 0
|
||||
// special case: actorblocks and F3 key
|
||||
else if (renderOnF3Only.binarySearch(thisTile) >= 0 && !KeyToggler.isOn(Keys.F3))
|
||||
0
|
||||
@@ -617,7 +617,7 @@ internal object BlocksDrawer {
|
||||
}
|
||||
|
||||
private var _tilesBufferAsTex: Texture = Texture(1, 1, Pixmap.Format.RGBA8888)
|
||||
private val occlusionIntensity = 0.35f // too low value and dark-coloured walls won't darken enough
|
||||
private val occlusionIntensity = 0.22222222f // too low value and dark-coloured walls won't darken enough
|
||||
|
||||
private fun renderUsingBuffer(mode: Int, projectionMatrix: Matrix4, drawGlow: Boolean) {
|
||||
//Gdx.gl.glClearColor(.094f, .094f, .094f, 0f)
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user