issue #7 implemented

Former-commit-id: e63de56e81e19c842c519c77019b9750d751851e
Former-commit-id: 6b018d6ac3bb471d5997c1eece4485f967f82ded
This commit is contained in:
Song Minjae
2016-12-30 18:07:36 +09:00
parent f367b35892
commit 4837962ff5

View File

@@ -80,8 +80,6 @@ constructor() : BasicGameState() {
private val useShader: Boolean = false private val useShader: Boolean = false
private val shaderProgram = 0 private val shaderProgram = 0
private val CORES = ThreadPool.POOL_SIZE
val KEY_LIGHTMAP_RENDER = Key.F7 val KEY_LIGHTMAP_RENDER = Key.F7
val KEY_LIGHTMAP_SMOOTH = Key.F8 val KEY_LIGHTMAP_SMOOTH = Key.F8
@@ -94,6 +92,9 @@ constructor() : BasicGameState() {
private val UI_INVENTORY_PLAYER = "uiInventoryPlayer" private val UI_INVENTORY_PLAYER = "uiInventoryPlayer"
private val UI_INVENTORY_ANON = "uiInventoryAnon" private val UI_INVENTORY_ANON = "uiInventoryAnon"
val paused: Boolean
get() = consoleHandler.isOpened
@Throws(SlickException::class) @Throws(SlickException::class)
override fun init(gameContainer: GameContainer, stateBasedGame: StateBasedGame) { override fun init(gameContainer: GameContainer, stateBasedGame: StateBasedGame) {
// state init code. Executed before the game goes into any "state" in states in StateBasedGame.java // state init code. Executed before the game goes into any "state" in states in StateBasedGame.java
@@ -175,48 +176,51 @@ constructor() : BasicGameState() {
setAppTitle() setAppTitle()
/////////////////////////// if (!paused) {
// world-related updates //
/////////////////////////// ///////////////////////////
world.updateWorldTime(delta) // world-related updates //
WorldSimulator(world, player, delta) ///////////////////////////
WeatherMixer.update(gc, delta) world.updateWorldTime(delta)
TileStats.update() WorldSimulator(world, player, delta)
if (!(CommandDict["setgl"] as SetGlobalLightOverride).lightOverride) WeatherMixer.update(gc, delta)
world.globalLight = constructRGBFromInt( TileStats.update()
WeatherMixer.globalLightNow.redByte, if (!(CommandDict["setgl"] as SetGlobalLightOverride).lightOverride)
WeatherMixer.globalLightNow.greenByte, world.globalLight = constructRGBFromInt(
WeatherMixer.globalLightNow.blueByte WeatherMixer.globalLightNow.redByte,
) WeatherMixer.globalLightNow.greenByte,
WeatherMixer.globalLightNow.blueByte
)
/////////////////////////// ///////////////////////////
// input-related updates // // input-related updates //
/////////////////////////// ///////////////////////////
GameController.processInput(gc, delta, gc.input) GameController.processInput(gc, delta, gc.input)
uiContainer.forEach { it.processInput(gc, delta, gc.input) } uiContainer.forEach { it.processInput(gc, delta, gc.input) }
//////////////////////////// ////////////////////////////
// camera-related updates // // camera-related updates //
//////////////////////////// ////////////////////////////
FeaturesDrawer.update(gc, delta) FeaturesDrawer.update(gc, delta)
MapCamera.update() MapCamera.update()
TilesDrawer.update() TilesDrawer.update()
/////////////////////////// ///////////////////////////
// actor-related updates // // actor-related updates //
/////////////////////////// ///////////////////////////
repossessActor() repossessActor()
// determine whether the inactive actor should be re-active // determine whether the inactive actor should be re-active
wakeDormantActors() wakeDormantActors()
// determine whether the actor should be active or dormant // determine whether the actor should be active or dormant
KillOrKnockdownActors() KillOrKnockdownActors()
updateActors(gc, delta) updateActors(gc, delta)
// TODO thread pool(?) // TODO thread pool(?)
CollisionSolver.process() CollisionSolver.process()
}
//////////////////////// ////////////////////////