mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 18:14:06 +09:00
blocks csv fixed wrong opacity value
This commit is contained in:
@@ -98,15 +98,15 @@
|
|||||||
"256";"256";"BLOCK_LANTERN_IRON_REGULAR";"0.0312";"0.0312";"0.0312";"0.0312";"1";"N/A";"FXTR";"0";"0";"0";"N/A";"0";"0";"16";"1.0000";"0.6372";"0.0000";"0.0000";"N/A";"N/A"
|
"256";"256";"BLOCK_LANTERN_IRON_REGULAR";"0.0312";"0.0312";"0.0312";"0.0312";"1";"N/A";"FXTR";"0";"0";"0";"N/A";"0";"0";"16";"1.0000";"0.6372";"0.0000";"0.0000";"N/A";"N/A"
|
||||||
"257";"257";"BLOCK_SUNSTONE";"0.1252";"0.1252";"0.1252";"0.1252";"1";"N/A";"ROCK";"1";"0";"0";"N/A";"2";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
|
"257";"257";"BLOCK_SUNSTONE";"0.1252";"0.1252";"0.1252";"0.1252";"1";"N/A";"ROCK";"1";"0";"0";"N/A";"2";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
|
||||||
"258";"258";"BLOCK_DAYLIGHT_CAPACITOR";"0.1252";"0.1252";"0.1252";"0.1252";"1";"N/A";"GLAS";"1";"0";"0";"N/A";"3";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
|
"258";"258";"BLOCK_DAYLIGHT_CAPACITOR";"0.1252";"0.1252";"0.1252";"0.1252";"1";"N/A";"GLAS";"1";"0";"0";"N/A";"3";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
|
||||||
"272";"272";"BLOCK_SCAFFOLDING_NORMAL";"0.0";"0.0";"0.0";"0.0";"1";"N/A";"WOOD";"0";"1";"0";"6";"0";"0";"16";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
"272";"272";"BLOCK_SCAFFOLDING_NORMAL";"0.0312";"0.0312";"0.0312";"0.0312";"1";"N/A";"WOOD";"0";"1";"0";"6";"0";"0";"16";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
||||||
"273";"273";"BLOCK_SCAFFOLDING_EBONY";"0.0";"0.0";"0.0";"0.0";"1";"N/A";"WOOD";"0";"1";"0";"6";"0";"0";"16";"0.0";"0.0";"0.0";"0.0";"N/A";""
|
"273";"273";"BLOCK_SCAFFOLDING_EBONY";"0.0312";"0.0312";"0.0312";"0.0312";"1";"N/A";"WOOD";"0";"1";"0";"6";"0";"0";"16";"0.0";"0.0";"0.0";"0.0";"N/A";""
|
||||||
"274";"274";"BLOCK_SCAFFOLDING_BIRCH";"0.0";"0.0";"0.0";"0.0";"1";"N/A";"WOOD";"0";"1";"0";"6";"0";"0";"16";"0.0";"0.0";"0.0";"0.0";"N/A";""
|
"274";"274";"BLOCK_SCAFFOLDING_BIRCH";"0.0312";"0.0312";"0.0312";"0.0312";"1";"N/A";"WOOD";"0";"1";"0";"6";"0";"0";"16";"0.0";"0.0";"0.0";"0.0";"N/A";""
|
||||||
"275";"275";"BLOCK_SCAFFOLDING_BLOODROSE";"0.0";"0.0";"0.0";"0.0";"1";"N/A";"WOOD";"0";"1";"0";"6";"0";"0";"16";"0.0";"0.0";"0.0";"0.0";"N/A";""
|
"275";"275";"BLOCK_SCAFFOLDING_BLOODROSE";"0.0312";"0.0312";"0.0312";"0.0312";"1";"N/A";"WOOD";"0";"1";"0";"6";"0";"0";"16";"0.0";"0.0";"0.0";"0.0";"N/A";""
|
||||||
"4091";"0";"ACTORBLOCK_NO_COLLISION";"0.0";"0.0";"0.0";"0.0";"1";"1";"NULL";"0";"0";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
"4091";"0";"ACTORBLOCK_NO_COLLISION";"0.0312";"0.0312";"0.0312";"0.0312";"1";"1";"NULL";"0";"0";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
||||||
"4092";"0";"ACTORBLOCK_FULL_COLLISION";"0.0";"0.0";"0.0";"0.0";"1";"1";"NULL";"0";"0";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
"4092";"0";"ACTORBLOCK_FULL_COLLISION";"0.0312";"0.0312";"0.0312";"0.0312";"1";"1";"NULL";"0";"0";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
||||||
"4093";"0";"ACTORBLOCK_ALLOW_MOVE_DOWN";"0.0";"0.0";"0.0";"0.0";"1";"1";"NULL";"0";"1";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
"4093";"0";"ACTORBLOCK_ALLOW_MOVE_DOWN";"0.0312";"0.0312";"0.0312";"0.0312";"1";"1";"NULL";"0";"1";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
||||||
"4094";"0";"ACTORBLOCK_NO_PASS_RIGHT";"0.0";"0.0";"0.0";"0.0";"1";"1";"NULL";"0";"0";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
"4094";"0";"ACTORBLOCK_NO_PASS_RIGHT";"0.0312";"0.0312";"0.0312";"0.0312";"1";"1";"NULL";"0";"0";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
||||||
"4095";"0";"ACTORBLOCK_NO_PASS_LEFT";"0.0";"0.0";"0.0";"0.0";"1";"1";"NULL";"0";"0";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
"4095";"0";"ACTORBLOCK_NO_PASS_LEFT";"0.0312";"0.0312";"0.0312";"0.0312";"1";"1";"NULL";"0";"0";"0";"N/A";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
|
||||||
"4096";"0";"BLOCK_WATER";"0.1016";"0.0744";"0.0508";"0.0826";"100";"1000";"WATR";"0";"0";"0";"0";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"005599A6";"16"
|
"4096";"0";"BLOCK_WATER";"0.1016";"0.0744";"0.0508";"0.0826";"100";"1000";"WATR";"0";"0";"0";"0";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"005599A6";"16"
|
||||||
"4097";"0";"BLOCK_LAVA";"0.9696";"0.9696";"0.9696";"0.9696";"100";"2600";"ROCK";"0";"0";"0";"0";"0";"0";"16";"0.7664";"0.2032";"0.0000";"0.0000";"FF4600E6";"32"
|
"4097";"0";"BLOCK_LAVA";"0.9696";"0.9696";"0.9696";"0.9696";"100";"2600";"ROCK";"0";"0";"0";"0";"0";"0";"16";"0.7664";"0.2032";"0.0000";"0.0000";"FF4600E6";"32"
|
||||||
"-1";"0";"BLOCK_NULL";"4.0000";"4.0000";"4.0000";"4.0000";"-1";"2600";"NULL";"0";"0";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
|
"-1";"0";"BLOCK_NULL";"4.0000";"4.0000";"4.0000";"4.0000";"-1";"2600";"NULL";"0";"0";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
|
||||||
|
|||||||
|
@@ -115,8 +115,8 @@ open class ActorHumanoid(
|
|||||||
var axisRY = 0f; protected set
|
var axisRY = 0f; protected set
|
||||||
|
|
||||||
/** empirical value. */
|
/** empirical value. */
|
||||||
@Transient private val JUMP_ACCELERATION_MOD = 51.0 / 10000.0 // (170 * (17/MAX_JUMP_LENGTH)^2) / 10000.0
|
@Transient private val JUMP_ACCELERATION_MOD = 51.0 / 10000.0 // (170 * (17/MAX_JUMP_LENGTH)^2) / 10000.0 // bigger value = higher jump
|
||||||
@Transient private val WALK_FRAMES_TO_MAX_ACCEL = 6
|
@Transient private val WALK_FRAMES_TO_MAX_ACCEL = 5 // how many frames it takes to reach maximum walking speed
|
||||||
|
|
||||||
@Transient private val LEFT = 1
|
@Transient private val LEFT = 1
|
||||||
@Transient private val RIGHT = 2
|
@Transient private val RIGHT = 2
|
||||||
@@ -248,6 +248,9 @@ open class ActorHumanoid(
|
|||||||
|
|
||||||
private fun processInput(delta: Float) {
|
private fun processInput(delta: Float) {
|
||||||
|
|
||||||
|
// Good control is simple: it move as the player meant: if I push the stick forward, it goes forward, rather than
|
||||||
|
// the way your character is looking. Think of the SM64
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* L-R stop
|
* L-R stop
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -316,79 +316,76 @@ internal object BlocksDrawer {
|
|||||||
|
|
||||||
|
|
||||||
// draw a tile
|
// draw a tile
|
||||||
if (thisTile != null) try {
|
val nearbyTilesInfo = if (mode == FLUID) {
|
||||||
val nearbyTilesInfo = if (mode == FLUID) {
|
getNearbyTilesInfoFluids(x, y)
|
||||||
getNearbyTilesInfoFluids(x, y)
|
|
||||||
}
|
|
||||||
else if (mode == WIRE) {
|
|
||||||
getNearbyWiringInfo(x, y, thisTile)
|
|
||||||
}
|
|
||||||
else if (isPlatform(thisTile)) {
|
|
||||||
getNearbyTilesInfoPlatform(x, y)
|
|
||||||
}
|
|
||||||
else if (isWallSticker(thisTile)) {
|
|
||||||
getNearbyTilesInfoWallSticker(x, y)
|
|
||||||
}
|
|
||||||
else if (isConnectMutual(thisTile)) {
|
|
||||||
getNearbyTilesInfoConMutual(x, y, mode)
|
|
||||||
}
|
|
||||||
else if (isConnectSelf(thisTile)) {
|
|
||||||
getNearbyTilesInfoConSelf(x, y, mode, thisTile)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
0
|
|
||||||
}
|
|
||||||
|
|
||||||
val renderTag = CreateTileAtlas.getRenderTag(thisTile)
|
|
||||||
val tileNumberBase =
|
|
||||||
if (mode == FLUID)
|
|
||||||
CreateTileAtlas.fluidToTileNumber(world.getFluid(x, y))
|
|
||||||
else if (mode == WIRE)
|
|
||||||
thisTile
|
|
||||||
else
|
|
||||||
renderTag.tileNumber
|
|
||||||
val tileNumber = if (mode != WIRE && thisTile == 0) 0
|
|
||||||
// special case: fluids
|
|
||||||
else if (mode == FLUID) tileNumberBase + connectLut47[nearbyTilesInfo]
|
|
||||||
// special case: wires
|
|
||||||
else if (mode == WIRE) tileNumberBase + connectLut16[nearbyTilesInfo]
|
|
||||||
// rest of the cases: terrain and walls
|
|
||||||
else tileNumberBase + when (renderTag.maskType) {
|
|
||||||
CreateTileAtlas.RenderTag.MASK_NA -> 0
|
|
||||||
CreateTileAtlas.RenderTag.MASK_16 -> connectLut16[nearbyTilesInfo]
|
|
||||||
CreateTileAtlas.RenderTag.MASK_47 -> connectLut47[nearbyTilesInfo]
|
|
||||||
CreateTileAtlas.RenderTag.MASK_TORCH, CreateTileAtlas.RenderTag.MASK_PLATFORM -> nearbyTilesInfo
|
|
||||||
else -> throw IllegalArgumentException("Unknown mask type: ${renderTag.maskType}")
|
|
||||||
}
|
|
||||||
|
|
||||||
var thisTileX = tileNumber % TILES_IN_X
|
|
||||||
var thisTileY = tileNumber / TILES_IN_X
|
|
||||||
|
|
||||||
if (mode == FLUID && thisTileX == 22 && thisTileY == 3) {
|
|
||||||
//println("tileNumberBase = $tileNumberBase, tileNumber = $tileNumber, fluid = ${world.getFluid(x, y)}")
|
|
||||||
}
|
|
||||||
|
|
||||||
val breakage = if (mode == TERRAIN) world.getTerrainDamage(x, y) else world.getWallDamage(x, y)
|
|
||||||
val maxHealth = BlockCodex[world.getTileFromTerrain(x, y)].strength
|
|
||||||
val breakingStage = (breakage / maxHealth).times(BREAKAGE_STEPS).roundInt()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// draw a tile
|
|
||||||
|
|
||||||
if (mode == WIRE && thisTile < 0) {
|
|
||||||
// no wire here, draw block id 255 (bottom right)
|
|
||||||
writeToBuffer(mode, bufferX, bufferY, 15, 15, 0)
|
|
||||||
}
|
|
||||||
else if (mode == FLUID || mode == WIRE) {
|
|
||||||
writeToBuffer(mode, bufferX, bufferY, thisTileX, thisTileY, 0)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
writeToBuffer(mode, bufferX, bufferY, thisTileX, thisTileY, breakingStage)
|
|
||||||
}
|
|
||||||
} catch (e: NullPointerException) {
|
|
||||||
// do nothing. WARNING: This exception handling may hide erratic behaviour completely.
|
|
||||||
}
|
}
|
||||||
|
else if (mode == WIRE) {
|
||||||
|
getNearbyWiringInfo(x, y, thisTile)
|
||||||
|
}
|
||||||
|
else if (isPlatform(thisTile)) {
|
||||||
|
getNearbyTilesInfoPlatform(x, y)
|
||||||
|
}
|
||||||
|
else if (isWallSticker(thisTile)) {
|
||||||
|
getNearbyTilesInfoWallSticker(x, y)
|
||||||
|
}
|
||||||
|
else if (isConnectMutual(thisTile)) {
|
||||||
|
getNearbyTilesInfoConMutual(x, y, mode)
|
||||||
|
}
|
||||||
|
else if (isConnectSelf(thisTile)) {
|
||||||
|
getNearbyTilesInfoConSelf(x, y, mode, thisTile)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
val renderTag = CreateTileAtlas.getRenderTag(thisTile)
|
||||||
|
val tileNumberBase =
|
||||||
|
if (mode == FLUID)
|
||||||
|
CreateTileAtlas.fluidToTileNumber(world.getFluid(x, y))
|
||||||
|
else if (mode == WIRE)
|
||||||
|
thisTile
|
||||||
|
else
|
||||||
|
renderTag.tileNumber
|
||||||
|
val tileNumber = if (mode != WIRE && thisTile == 0) 0
|
||||||
|
// special case: fluids
|
||||||
|
else if (mode == FLUID) tileNumberBase + connectLut47[nearbyTilesInfo]
|
||||||
|
// special case: wires
|
||||||
|
else if (mode == WIRE) tileNumberBase + connectLut16[nearbyTilesInfo]
|
||||||
|
// rest of the cases: terrain and walls
|
||||||
|
else tileNumberBase + when (renderTag.maskType) {
|
||||||
|
CreateTileAtlas.RenderTag.MASK_NA -> 0
|
||||||
|
CreateTileAtlas.RenderTag.MASK_16 -> connectLut16[nearbyTilesInfo]
|
||||||
|
CreateTileAtlas.RenderTag.MASK_47 -> connectLut47[nearbyTilesInfo]
|
||||||
|
CreateTileAtlas.RenderTag.MASK_TORCH, CreateTileAtlas.RenderTag.MASK_PLATFORM -> nearbyTilesInfo
|
||||||
|
else -> throw IllegalArgumentException("Unknown mask type: ${renderTag.maskType}")
|
||||||
|
}
|
||||||
|
|
||||||
|
var thisTileX = tileNumber % TILES_IN_X
|
||||||
|
var thisTileY = tileNumber / TILES_IN_X
|
||||||
|
|
||||||
|
if (mode == FLUID && thisTileX == 22 && thisTileY == 3) {
|
||||||
|
//println("tileNumberBase = $tileNumberBase, tileNumber = $tileNumber, fluid = ${world.getFluid(x, y)}")
|
||||||
|
}
|
||||||
|
|
||||||
|
val breakage = if (mode == TERRAIN) world.getTerrainDamage(x, y) else world.getWallDamage(x, y)
|
||||||
|
val maxHealth = BlockCodex[world.getTileFromTerrain(x, y)].strength
|
||||||
|
val breakingStage = (breakage / maxHealth).times(BREAKAGE_STEPS).roundInt()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// draw a tile
|
||||||
|
|
||||||
|
if (mode == WIRE && thisTile < 0) {
|
||||||
|
// no wire here, draw block id 255 (bottom right)
|
||||||
|
writeToBuffer(mode, bufferX, bufferY, 15, 15, 0)
|
||||||
|
}
|
||||||
|
else if (mode == FLUID || mode == WIRE) {
|
||||||
|
writeToBuffer(mode, bufferX, bufferY, thisTileX, thisTileY, 0)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
writeToBuffer(mode, bufferX, bufferY, thisTileX, thisTileY, breakingStage)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<module type="JAVA_MODULE" version="4">
|
<module type="JAVA_MODULE" version="4">
|
||||||
<component name="FacetManager">
|
<component name="FacetManager">
|
||||||
<facet type="kotlin-language" name="Kotlin">
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
<configuration version="3" platform="JVM 9">
|
<configuration version="3" platform="JVM 12">
|
||||||
<compilerSettings />
|
<compilerSettings />
|
||||||
<compilerArguments>
|
<compilerArguments>
|
||||||
<option name="jvmTarget" value="12" />
|
<option name="jvmTarget" value="12" />
|
||||||
|
|||||||
Binary file not shown.
BIN
work_files/graphics/colourmap/pal64_master_ryb_685RGB.tga
LFS
Normal file
BIN
work_files/graphics/colourmap/pal64_master_ryb_685RGB.tga
LFS
Normal file
Binary file not shown.
27
work_files/tracker_plaintext_description.ebnf
Normal file
27
work_files/tracker_plaintext_description.ebnf
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
(*
|
||||||
|
|
||||||
|
Each order:
|
||||||
|
|
||||||
|
begins with "Order <Hex2Digit>\n"
|
||||||
|
terminated by: beginning of other order | EOF
|
||||||
|
|
||||||
|
*)
|
||||||
|
|
||||||
|
HEXDIGIT = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "A" | "B" | "C" | "D" | "E" | "F" ;
|
||||||
|
HEX2DIGIT = HEXDIGIT, HEXDIGIT ;
|
||||||
|
ORDER_HEADER = "Order ", HEX2DIGIT ;
|
||||||
|
|
||||||
|
MUSICAL_NOTE_LETTER = "A" | "B" | "C" | "D" | "E" | "F" | "G" ;
|
||||||
|
MUSICAL_NOTE_SHARP = "#" | "-" ;
|
||||||
|
MUSICAL_NOTE_OCTAVE = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
|
||||||
|
MUSICAL_NOTE_NOOP = "..." ;
|
||||||
|
MUSICAL_NOTE_OFF = "===" ;
|
||||||
|
MUSICAL_NOTE = MUSICAL_NOTE_LETTER, MUSICAL_NOTE_SHARP, MUSICAL_NOTE_OCTAVE | MUSICAL_NOTE_NOOP | MUSICAL_NOTE_OFF ;
|
||||||
|
NOTE_EFFECT = HEXDIGIT, HEXDIGIT, HEXDIGIT | MUSICAL_NOTE_NOOP ;
|
||||||
|
|
||||||
|
ROW_NUMBER = HEX2DIGIT;
|
||||||
|
|
||||||
|
ONE_VOICE = " | " MUSICAL_NOTE, NOTE_EFFECT ;
|
||||||
|
ONE_ROW = ROW_NUMBER, ONE_VOICE, [ { ONE_VOICE } ] ;
|
||||||
|
|
||||||
|
ORDER_HEADER = "Order ", HEX2DIGIT ;
|
||||||
2150
work_files/tracker_plaintext_format_example.txt
Normal file
2150
work_files/tracker_plaintext_format_example.txt
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user