mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 19:14:05 +09:00
light calc takes fluid into account
This commit is contained in:
@@ -225,20 +225,20 @@ open class ActorHumanoid(
|
||||
isRightDown = Gdx.input.isKeyPressed(AppLoader.getConfigInt("keyright"))
|
||||
isJumpDown = Gdx.input.isKeyPressed(AppLoader.getConfigInt("keyjump"))
|
||||
|
||||
if (Terrarum.controller != null) {
|
||||
axisX = Terrarum.controller!!.getAxisValue(AppLoader.getConfigInt("joypadlstickx"))
|
||||
axisY = Terrarum.controller!!.getAxisValue(AppLoader.getConfigInt("joypadlsticky"))
|
||||
axisRX = Terrarum.controller!!.getAxisValue(AppLoader.getConfigInt("joypadrstickx"))
|
||||
axisRY = Terrarum.controller!!.getAxisValue(AppLoader.getConfigInt("joypadrsticky"))
|
||||
if (AppLoader.gamepad != null) {
|
||||
axisX = AppLoader.gamepad!!.getAxisValue(AppLoader.getConfigInt("gamepadlstickx"))
|
||||
axisY = AppLoader.gamepad!!.getAxisValue(AppLoader.getConfigInt("gamepadlsticky"))
|
||||
axisRX = AppLoader.gamepad!!.getAxisValue(AppLoader.getConfigInt("gamepadrstickx"))
|
||||
axisRY = AppLoader.gamepad!!.getAxisValue(AppLoader.getConfigInt("gamepadrsticky"))
|
||||
|
||||
// deadzonning
|
||||
if (Math.abs(axisX) < Terrarum.CONTROLLER_DEADZONE) axisX = 0f
|
||||
if (Math.abs(axisY) < Terrarum.CONTROLLER_DEADZONE) axisY = 0f
|
||||
if (Math.abs(axisRX) < Terrarum.CONTROLLER_DEADZONE) axisRX = 0f
|
||||
if (Math.abs(axisRY) < Terrarum.CONTROLLER_DEADZONE) axisRY = 0f
|
||||
if (Math.abs(axisX) < AppLoader.gamepadDeadzone) axisX = 0f
|
||||
if (Math.abs(axisY) < AppLoader.gamepadDeadzone) axisY = 0f
|
||||
if (Math.abs(axisRX) < AppLoader.gamepadDeadzone) axisRX = 0f
|
||||
if (Math.abs(axisRY) < AppLoader.gamepadDeadzone) axisRY = 0f
|
||||
|
||||
isJumpDown = Gdx.input.isKeyPressed(AppLoader.getConfigInt("keyjump")) ||
|
||||
Terrarum.controller!!.isButtonPressed(GAMEPAD_JUMP)
|
||||
AppLoader.gamepad!!.isButtonPressed(GAMEPAD_JUMP)
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -250,7 +250,7 @@ open class ActorHumanoid(
|
||||
}
|
||||
|
||||
private inline val hasController: Boolean
|
||||
get() = if (isGamer) Terrarum.controller != null
|
||||
get() = if (isGamer) AppLoader.gamepad != null
|
||||
else true
|
||||
|
||||
private fun processInput(delta: Float) {
|
||||
@@ -384,7 +384,7 @@ open class ActorHumanoid(
|
||||
*
|
||||
* Be warned.
|
||||
*
|
||||
* @param left (even if the game is joypad controlled, you must give valid value)
|
||||
* @param left (even if the game is gamepad controlled, you must give valid value)
|
||||
* @param absAxisVal (set AXIS_KEYBOARD if keyboard controlled)
|
||||
* @author minjaesong
|
||||
*/
|
||||
@@ -424,7 +424,7 @@ open class ActorHumanoid(
|
||||
|
||||
/**
|
||||
|
||||
* @param up (even if the game is joypad controlled, you must give valid value)
|
||||
* @param up (even if the game is gamepad controlled, you must give valid value)
|
||||
* *
|
||||
* @param absAxisVal (set AXIS_KEYBOARD if keyboard controlled)
|
||||
*/
|
||||
|
||||
@@ -142,9 +142,9 @@ package net.torvald.terrarum.modulebasegame.ui
|
||||
"${0xe011.toChar()}..${0xe010.toChar()} ${Lang["GAME_INVENTORY_REGISTER"]}$SP" +
|
||||
"${0xe034.toChar()} ${Lang["GAME_INVENTORY_DROP"]}"
|
||||
else
|
||||
"$joypadLabelNinY ${Lang["GAME_INVENTORY_USE"]}$SP" +
|
||||
"$gamepadLabelNinY ${Lang["GAME_INVENTORY_USE"]}$SP" +
|
||||
"${0xe011.toChar()}${0xe010.toChar()} ${Lang["GAME_INVENTORY_REGISTER"]}$SP" +
|
||||
"$joypadLabelNinA ${Lang["GAME_INVENTORY_DROP"]}"
|
||||
"$gamepadLabelNinA ${Lang["GAME_INVENTORY_DROP"]}"
|
||||
val listControlClose: String
|
||||
get() = if (Terrarum.environment == RunningEnvironment.PC)
|
||||
"${0xe037.toChar()} ${Lang["GAME_ACTION_CLOSE"]}"
|
||||
|
||||
@@ -51,9 +51,9 @@ class UIInventoryFull(
|
||||
"${0xe034.toChar()} ${Lang["GAME_INVENTORY_DROP"]}"
|
||||
else
|
||||
"${0xe069.toChar()} ${Lang["GAME_ACTION_CLOSE"]}$SP" +
|
||||
"${Terrarum.joypadLabelNinY} ${Lang["GAME_INVENTORY_USE"]}$SP" +
|
||||
"${Terrarum.gamepadLabelNinY} ${Lang["GAME_INVENTORY_USE"]}$SP" +
|
||||
"${0xe011.toChar()}${0xe010.toChar()} ${Lang["GAME_INVENTORY_REGISTER"]}$SP" +
|
||||
"${Terrarum.joypadLabelNinA} ${Lang["GAME_INVENTORY_DROP"]}"
|
||||
"${Terrarum.gamepadLabelNinA} ${Lang["GAME_INVENTORY_DROP"]}"
|
||||
val controlHelpHeight = Terrarum.fontGame.lineHeight
|
||||
|
||||
private var encumbrancePerc = 0f
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package net.torvald.terrarum.modulebasegame.ui
|
||||
|
||||
import net.torvald.terrarum.AppLoader
|
||||
import net.torvald.terrarum.QNDTreeNode
|
||||
import net.torvald.terrarum.Yaml
|
||||
import java.util.*
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +22,9 @@ object UITitleRemoConYaml {
|
||||
- MENU_OPTIONS
|
||||
- MENU_OPTIONS_GRAPHICS
|
||||
- MENU_OPTIONS_CONTROLS
|
||||
- MENU_CONTROLS_KEYBOARD
|
||||
- MENU_CONTROLS_GAMEPAD
|
||||
- MENU_LABEL_RETURN
|
||||
- MENU_OPTIONS_SOUND
|
||||
- MENU_LABEL_RETURN
|
||||
- MENU_MODULES : net.torvald.terrarum.modulebasegame.ui.UITitleModules
|
||||
|
||||
Reference in New Issue
Block a user