mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 12:34:05 +09:00
at least now I know which part is to be patched...
This commit is contained in:
@@ -109,6 +109,8 @@ class TitleScreen(val batch: SpriteBatch) : Screen {
|
||||
val uiContainer = ArrayList<UICanvas>()
|
||||
private lateinit var uiMenu: UICanvas
|
||||
|
||||
private lateinit var worldFBO: FrameBuffer
|
||||
|
||||
private fun loadThingsWhileIntroIsVisible() {
|
||||
demoWorld = ReadLayerData(FileInputStream(ModMgr.getFile("basegame", "demoworld")))
|
||||
|
||||
@@ -166,6 +168,9 @@ class TitleScreen(val batch: SpriteBatch) : Screen {
|
||||
|
||||
|
||||
Gdx.input.inputProcessor = TitleScreenController(this)
|
||||
|
||||
|
||||
worldFBO = FrameBuffer(Pixmap.Format.RGBA8888, Terrarum.WIDTH, Terrarum.HEIGHT, false)
|
||||
}
|
||||
|
||||
private var blurWriteBuffer = lightmapFboA
|
||||
@@ -224,12 +229,28 @@ class TitleScreen(val batch: SpriteBatch) : Screen {
|
||||
//camera.setToOrtho(true, Terrarum.WIDTH.toFloat(), Terrarum.HEIGHT.toFloat())
|
||||
|
||||
// render world
|
||||
Gdx.gl.glClearColor(.64f, .754f, .84f, 0f)
|
||||
Gdx.gl.glClearColor(.64f, .754f, .84f, 1f)
|
||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
||||
BlocksDrawer.renderWall(batch)
|
||||
BlocksDrawer.renderTerrain(batch)
|
||||
|
||||
//BlocksDrawer.renderWall(batch)
|
||||
//BlocksDrawer.renderTerrain(batch)
|
||||
//BlocksDrawer.renderFront(batch, false)
|
||||
|
||||
|
||||
batch.inUse {
|
||||
setCameraPosition(0f, 0f)
|
||||
batch.shader = null
|
||||
|
||||
Gdx.gl.glEnable(GL20.GL_BLEND)
|
||||
renderDemoWorld()
|
||||
|
||||
batch.shader = null
|
||||
batch.color = Color.WHITE
|
||||
renderMenus()
|
||||
//renderOverlayTexts()
|
||||
}
|
||||
|
||||
|
||||
/*batch.inUse {
|
||||
setCameraPosition(0f, 0f)
|
||||
batch.color = Color.WHITE
|
||||
@@ -261,26 +282,13 @@ class TitleScreen(val batch: SpriteBatch) : Screen {
|
||||
|
||||
// draw tiles //
|
||||
|
||||
// using custom code for camera; this is obscure and tricky
|
||||
camera.position.set(WorldCamera.gdxCamX, WorldCamera.gdxCamY, 0f) // make camara work
|
||||
camera.update()
|
||||
batch.projectionMatrix = camera.combined
|
||||
batch.shader = null
|
||||
|
||||
blendNormal()
|
||||
|
||||
batch.end()
|
||||
|
||||
|
||||
|
||||
BlocksDrawer.renderWall(batch)
|
||||
BlocksDrawer.renderTerrain(batch)
|
||||
BlocksDrawer.renderFront(batch, false)
|
||||
|
||||
|
||||
|
||||
batch.begin()
|
||||
|
||||
FeaturesDrawer.drawEnvOverlay(batch)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user