ActorWithBody: broke CCD again for fundamental error-catching, new tile STONE_BRICKS

Former-commit-id: 3d98f83f3d40f4423b403eae717a06ac6fc22531
Former-commit-id: 13616655a392941e0c91c3384384475ae0adb5db
This commit is contained in:
Song Minjae
2016-06-29 01:15:13 +09:00
parent 659921ae92
commit 2ed435165a
25 changed files with 289 additions and 1085 deletions

View File

@@ -11,6 +11,8 @@ object TileNameCode {
val STONE = TilePropCodex.idDamageToIndex(1, 0)
val STONE_QUARRIED = TilePropCodex.idDamageToIndex(1, 1)
val STONE_TILE_WHITE = TilePropCodex.idDamageToIndex(1, 2)
val STONE_BRICKS = TilePropCodex.idDamageToIndex(1, 3)
val DIRT = TilePropCodex.idDamageToIndex(2, 0)
val GRASS = TilePropCodex.idDamageToIndex(2, 1)

View File

@@ -24,16 +24,23 @@ object TilePropUtil {
val random = HQRNG();
var flickerPatternThis = getNewRandom()
var flickerPatternNext = getNewRandom()
//var flickerPatternThis = getNewRandom()
//var flickerPatternNext = getNewRandom()
var flickerP0 = getNewRandom()
var flickerP1 = getNewRandom()
var flickerP2 = getNewRandom()
var flickerP3 = getNewRandom()
init {
}
private fun getTorchFlicker(baseLum: Int): Int {
val funcY = linearInterpolation1D(flickerPatternThis, flickerPatternNext,
flickerFuncX.toFloat() / flickerFuncDomain
//val funcY = linearInterpolation1D(flickerPatternThis, flickerPatternNext,
// flickerFuncX.toFloat() / flickerFuncDomain
//)
val funcY = FastMath.interpolateCatmullRom(0.0f, flickerFuncX.toFloat() / flickerFuncDomain,
flickerP0, flickerP1, flickerP2, flickerP3
)
return LightmapRenderer.alterBrightnessUniform(baseLum, funcY)
@@ -63,8 +70,12 @@ object TilePropUtil {
if (flickerFuncX > flickerFuncDomain) {
flickerFuncX -= flickerFuncDomain
flickerPatternThis = flickerPatternNext
flickerPatternNext = getNewRandom()
//flickerPatternThis = flickerPatternNext
//flickerPatternNext = getNewRandom()
flickerP0 = flickerP1
flickerP1 = flickerP2
flickerP2 = flickerP3
flickerP3 = getNewRandom()
}
// breath-related vars

View File

@@ -2,6 +2,8 @@
"0"; "0";"TILE_AIR" ; "8396808"; "0"; "1"; "1"; "0"; "0"; "0"; "0"; "0"; "0"; "0";"4"
"1"; "0";"TILE_STONE" ; "33587232"; "25";"2400"; "0"; "1"; "1"; "0"; "1"; "0"; "0"; "0";"16"
"1"; "1";"TILE_STONE_QUARRIED" ; "33587232"; "25";"2400"; "0"; "1"; "1"; "0"; "1"; "1"; "0"; "0";"16"
"1"; "2";"TILE_STONE_TILE_WHITE" ; "33587232"; "25";"2400"; "0"; "1"; "1"; "0"; "1"; "2"; "0"; "0";"16"
"1"; "3";"TILE_STONE_BRICKS" ; "33587232"; "25";"2400"; "0"; "1"; "1"; "0"; "1"; "3"; "0"; "0";"16"
"2"; "0";"TILE_DIRT" ; "33587232"; "6";"1400"; "0"; "1"; "1"; "0"; "2"; "0"; "0"; "0";"16"
"2"; "1";"TILE_GRASS" ; "33587232"; "6";"1400"; "0"; "1"; "1"; "0"; "2"; "1"; "0"; "0";"16"
"3"; "0";"TILE_PLANK_NORMAL" ; "33587232"; "12"; "740"; "0"; "1"; "1"; "0"; "3"; "0"; "0"; "0";"16"
Can't render this file because it contains an unexpected character in line 1 and column 18.