renaming some files

This commit is contained in:
minjaesong
2024-10-22 11:41:29 +09:00
parent dbb0c60976
commit 3de4018d75
9 changed files with 53 additions and 48 deletions

View File

@@ -14,7 +14,7 @@ import net.torvald.terrarum.gameactors.*
import net.torvald.terrarum.gamecontroller.TerrarumKeyboardEvent
import net.torvald.terrarum.gameitems.ItemID
import net.torvald.terrarum.gameparticles.ParticleBase
import net.torvald.terrarum.gameworld.BlockLayerI16
import net.torvald.terrarum.gameworld.BlockLayerGenericI16
import net.torvald.terrarum.gameworld.GameWorld
import net.torvald.terrarum.modulebasegame.gameactors.ActorHumanoid
import net.torvald.terrarum.gameworld.WorldTime
@@ -877,8 +877,8 @@ class YamlCommandToolExportTest : YamlInvokable {
ui.world.tileNameToNumberMap
)
val layer = POILayer(name)
val terr = BlockLayerI16(poi.w, poi.h)
val wall = BlockLayerI16(poi.w, poi.h)
val terr = BlockLayerGenericI16(poi.w, poi.h)
val wall = BlockLayerGenericI16(poi.w, poi.h)
layer.blockLayer = arrayListOf(terr, wall)
poi.layers.add(layer)

View File

@@ -1,14 +1,11 @@
package net.torvald.terrarum.modulebasegame
import com.badlogic.gdx.utils.Queue
import net.torvald.terrarum.BlockCodex
import net.torvald.terrarum.ItemCodex
import net.torvald.terrarum.OreCodex
import net.torvald.terrarum.blockproperties.Block
import net.torvald.terrarum.ceilToInt
import net.torvald.terrarum.gameworld.BlockLayerI16
import net.torvald.terrarum.gameworld.BlockLayerGenericI16
import net.torvald.terrarum.gameworld.GameWorld
import net.torvald.terrarum.gameworld.fmod
import net.torvald.terrarum.gameworld.getOffset
import net.torvald.terrarum.modulebasegame.gameitems.PickaxeCore
import net.torvald.unsafe.UnsafeHelper
@@ -37,7 +34,7 @@ object ExplosionManager {
val lineMax = world.height - ty + CALC_RADIUS
// create a copy of the tilemap
val tilemap = BlockLayerI16(CALC_WIDTH, CALC_WIDTH)
val tilemap = BlockLayerGenericI16(CALC_WIDTH, CALC_WIDTH)
val breakmap = UnsafeFloatArray(CALC_WIDTH, CALC_WIDTH)
// fill in the tilemap copy
@@ -72,7 +69,7 @@ object ExplosionManager {
}.start()
}
private fun memcpyFromWorldTiles(CALC_RADIUS: Int, CALC_WIDTH: Int, world: GameWorld, xStart: Int, yStart: Int, yOff: Int, out: BlockLayerI16) {
private fun memcpyFromWorldTiles(CALC_RADIUS: Int, CALC_WIDTH: Int, world: GameWorld, xStart: Int, yStart: Int, yOff: Int, out: BlockLayerGenericI16) {
// if the bounding box must wrap around
if (xStart > world.width - CALC_RADIUS) {
val lenLeft = world.width - xStart
@@ -104,7 +101,7 @@ object ExplosionManager {
}
}
private fun memcpyToWorldTiles(CALC_RADIUS: Int, CALC_WIDTH: Int, world: GameWorld, xStart: Int, yStart: Int, yOff: Int, out: BlockLayerI16) {
private fun memcpyToWorldTiles(CALC_RADIUS: Int, CALC_WIDTH: Int, world: GameWorld, xStart: Int, yStart: Int, yOff: Int, out: BlockLayerGenericI16) {
// if the bounding box must wrap around
if (xStart > world.width - CALC_RADIUS) {
val lenLeft = world.width - xStart
@@ -158,7 +155,7 @@ object ExplosionManager {
CALC_RADIUS: Int, CALC_WIDTH: Int,
world: GameWorld,
breakmap: UnsafeFloatArray,
tilemap: BlockLayerI16,
tilemap: BlockLayerGenericI16,
tx: Int, ty: Int,
power: Float,
dropProbNonOre: Float,

View File

@@ -2,8 +2,8 @@ package net.torvald.terrarum.modulebasegame.serialise
import net.torvald.terrarum.*
import net.torvald.terrarum.console.Echo
import net.torvald.terrarum.gameworld.BlockLayerI16
import net.torvald.terrarum.gameworld.BlockLayerI16F16
import net.torvald.terrarum.gameworld.BlockLayerGenericI16
import net.torvald.terrarum.gameworld.BlockLayerFluidI16F16
import net.torvald.terrarum.gameworld.BlockLayerOresI16I8
import net.torvald.terrarum.gameworld.GameWorld
import net.torvald.terrarum.langpack.Lang
@@ -61,10 +61,10 @@ object LoadSavegame {
val world = ReadWorld(worldDiskSavegameInfo, worldDisk.diskFile)
world.layerTerrain = BlockLayerI16(world.width, world.height)
world.layerWall = BlockLayerI16(world.width, world.height)
world.layerTerrain = BlockLayerGenericI16(world.width, world.height)
world.layerWall = BlockLayerGenericI16(world.width, world.height)
world.layerOres = BlockLayerOresI16I8(world.width, world.height)
world.layerFluids = BlockLayerI16F16(world.width, world.height)
world.layerFluids = BlockLayerFluidI16F16(world.width, world.height)
world.chunkFlags = Array(world.height / LandUtil.CHUNK_H) { ByteArray(world.width / LandUtil.CHUNK_W) }
newIngame.world = world // must be set before the loadscreen, otherwise the loadscreen will try to read from the NullWorld which is already destroyed