mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
a commit before heading to the airport
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -2,3 +2,4 @@
|
|||||||
*.ogg filter=lfs diff=lfs merge=lfs -text
|
*.ogg filter=lfs diff=lfs merge=lfs -text
|
||||||
*.tga filter=lfs diff=lfs merge=lfs -text
|
*.tga filter=lfs diff=lfs merge=lfs -text
|
||||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.opus filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|||||||
@@ -385,28 +385,28 @@ class StateInGameGDX(val batch: SpriteBatch) : Screen {
|
|||||||
|
|
||||||
|
|
||||||
/** RENDER CODE GOES HERE */
|
/** RENDER CODE GOES HERE */
|
||||||
renderGame(batch, delta)
|
renderGame(batch)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun renderGame(batch: SpriteBatch, delta: Float) {
|
private fun renderGame(batch: SpriteBatch) {
|
||||||
Gdx.gl.glClearColor(.157f, .157f, .157f, 0f)
|
Gdx.gl.glClearColor(.157f, .157f, .157f, 0f)
|
||||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
||||||
|
|
||||||
camera.position.set(-WorldCamera.x.toFloat(), -WorldCamera.y.toFloat(), 0f) // make camara work
|
//camera.position.set(-WorldCamera.x.toFloat(), -WorldCamera.y.toFloat(), 0f) // make camara work
|
||||||
|
//camera.position.set(0f, 0f, 0f) // make camara work
|
||||||
batch.projectionMatrix = camera.combined
|
//batch.projectionMatrix = camera.combined
|
||||||
|
|
||||||
TerrarumGDX.GLOBAL_RENDER_TIMER += 1
|
TerrarumGDX.GLOBAL_RENDER_TIMER += 1
|
||||||
|
|
||||||
|
|
||||||
// clean the shit beforehand
|
// clean the shit beforehand
|
||||||
worldDrawFrameBuffer.inAction {
|
worldDrawFrameBuffer.inAction {
|
||||||
Gdx.gl.glClearColor(0f,0f,0f,1f)
|
Gdx.gl.glClearColor(0f,0f,0f,0f)
|
||||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
||||||
}
|
}
|
||||||
backDrawFrameBuffer.inAction {
|
backDrawFrameBuffer.inAction {
|
||||||
Gdx.gl.glClearColor(0f,0f,0f,1f)
|
Gdx.gl.glClearColor(0f,0f,0f,0f)
|
||||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -414,18 +414,26 @@ class StateInGameGDX(val batch: SpriteBatch) : Screen {
|
|||||||
|
|
||||||
|
|
||||||
blendNormal()
|
blendNormal()
|
||||||
backDrawFrameBuffer.inAction {
|
camera.position.set(0f, 0f, 0f) // make camara work
|
||||||
batch.inUse {
|
batch.projectionMatrix = camera.combined
|
||||||
WeatherMixer.render(batch) // drawing to gwin so that any lights from lamp wont "leak" to the skybox
|
batch.inUse {
|
||||||
// e.g. Bright blue light on sunset
|
|
||||||
}
|
WeatherMixer.render(batch) // drawing to gwin so that any lights from lamp wont "leak" to the skybox
|
||||||
|
// e.g. Bright blue light on sunset
|
||||||
}
|
}
|
||||||
blendNormal()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// draw map related stuffs //
|
// draw map related stuffs //
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
worldDrawFrameBuffer.inAction {
|
worldDrawFrameBuffer.inAction {
|
||||||
|
// FIXME wrong and flipped coord; one camera code does not concern other
|
||||||
|
|
||||||
|
camera.position.set(-WorldCamera.x.toFloat(), -WorldCamera.y.toFloat(), 0f) // make camara work
|
||||||
|
batch.projectionMatrix = camera.combined
|
||||||
|
|
||||||
batch.inUse {
|
batch.inUse {
|
||||||
BlocksDrawer.renderWall(batch)
|
BlocksDrawer.renderWall(batch)
|
||||||
actorsRenderBehind.forEach { it.drawBody(batch) }
|
actorsRenderBehind.forEach { it.drawBody(batch) }
|
||||||
@@ -529,6 +537,10 @@ class StateInGameGDX(val batch: SpriteBatch) : Screen {
|
|||||||
// GUI Predraw //
|
// GUI Predraw //
|
||||||
/////////////////
|
/////////////////
|
||||||
//worldG.flush()
|
//worldG.flush()
|
||||||
|
batch.inUse {
|
||||||
|
val tex = backDrawFrameBuffer.colorBufferTexture // TODO zoom!
|
||||||
|
batch.draw(tex, 0f, 0f)
|
||||||
|
}
|
||||||
//backG.drawImage(worldDrawFrameBuffer.getScaledCopy(screenZoom), 0f, 0f)
|
//backG.drawImage(worldDrawFrameBuffer.getScaledCopy(screenZoom), 0f, 0f)
|
||||||
//backG.flush()
|
//backG.flush()
|
||||||
|
|
||||||
@@ -536,13 +548,13 @@ class StateInGameGDX(val batch: SpriteBatch) : Screen {
|
|||||||
/////////////////////
|
/////////////////////
|
||||||
// draw UIs ONLY! //
|
// draw UIs ONLY! //
|
||||||
/////////////////////
|
/////////////////////
|
||||||
batch.inUse {
|
/*batch.inUse {
|
||||||
uiContainer.forEach { if (it != consoleHandler) it.render(batch) }
|
uiContainer.forEach { if (it != consoleHandler) it.render(batch) }
|
||||||
debugWindow.render(batch)
|
debugWindow.render(batch)
|
||||||
// make sure console draws on top of other UIs
|
// make sure console draws on top of other UIs
|
||||||
consoleHandler.render(batch)
|
consoleHandler.render(batch)
|
||||||
notifier.render(batch)
|
notifier.render(batch)
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
//////////////////
|
//////////////////
|
||||||
@@ -551,6 +563,8 @@ class StateInGameGDX(val batch: SpriteBatch) : Screen {
|
|||||||
//backG.flush()
|
//backG.flush()
|
||||||
//gwin.drawImage(backDrawFrameBuffer, 0f, 0f)
|
//gwin.drawImage(backDrawFrameBuffer, 0f, 0f)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// centre marker
|
// centre marker
|
||||||
/*gwin.color = Color(0x00FFFF)
|
/*gwin.color = Color(0x00FFFF)
|
||||||
gwin.lineWidth = 1f
|
gwin.lineWidth = 1f
|
||||||
|
|||||||
@@ -124,10 +124,10 @@ object WeatherMixer {
|
|||||||
0f, 0f,
|
0f, 0f,
|
||||||
Gdx.graphics.width.toFloat(),// / TerrarumGDX.ingame!!.screenZoom,
|
Gdx.graphics.width.toFloat(),// / TerrarumGDX.ingame!!.screenZoom,
|
||||||
Gdx.graphics.height.toFloat(),// / TerrarumGDX.ingame!!.screenZoom
|
Gdx.graphics.height.toFloat(),// / TerrarumGDX.ingame!!.screenZoom
|
||||||
getGradientColour(skyboxColourMap, 0, timeNow),
|
|
||||||
getGradientColour(skyboxColourMap, 0, timeNow),
|
|
||||||
getGradientColour(skyboxColourMap, 1, timeNow),
|
getGradientColour(skyboxColourMap, 1, timeNow),
|
||||||
getGradientColour(skyboxColourMap, 1, timeNow)
|
getGradientColour(skyboxColourMap, 1, timeNow),
|
||||||
|
getGradientColour(skyboxColourMap, 0, timeNow),
|
||||||
|
getGradientColour(skyboxColourMap, 0, timeNow)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
batch.begin()
|
batch.begin()
|
||||||
|
|||||||
@@ -22,6 +22,12 @@ Metals are used to make furnitures, tools, armour and weapons.
|
|||||||
|Tin|Advanced wood (makes furnitures and things)||
|
|Tin|Advanced wood (makes furnitures and things)||
|
||||||
|Gold|Bling-bling, advanced electronics (semiconductor)|
|
|Gold|Bling-bling, advanced electronics (semiconductor)|
|
||||||
|
|
||||||
|
TODO: if we can boil water, and can use it to produce electricity THEN add following
|
||||||
|
|
||||||
|
|Name|Usage|Remarks|
|
||||||
|
|----|-----|-------|
|
||||||
|
|Uranium|To boil water efficiently than lava|Uranium ore (to be specific, uranium oxide) has yellow colour; the metal has silver-grey colour|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Weapon Tier
|
### Weapon Tier
|
||||||
|
|||||||
Reference in New Issue
Block a user