mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 19:14:05 +09:00
two getthumbnail funs merget into one
This commit is contained in:
@@ -862,27 +862,27 @@ object IngameRenderer : Disposable {
|
||||
}
|
||||
|
||||
override fun dispose() {
|
||||
blurWriteQuad.tryDispose()
|
||||
blurWriteQuad2.tryDispose()
|
||||
//blurWriteQuad4.tryDispose()
|
||||
if (::blurWriteQuad.isInitialized) blurWriteQuad.tryDispose()
|
||||
if (::blurWriteQuad2.isInitialized) blurWriteQuad2.tryDispose()
|
||||
//if (::blurWriteQuad4.isInitialized) blurWriteQuad4.tryDispose()
|
||||
|
||||
fboRGB.tryDispose()
|
||||
fboA.tryDispose()
|
||||
fboRGB_lightMixed.tryDispose()
|
||||
fboA_lightMixed.tryDispose()
|
||||
fboMixedOut.tryDispose()
|
||||
lightmapFbo.tryDispose()
|
||||
if (::fboRGB.isInitialized) fboRGB.tryDispose()
|
||||
if (::fboA.isInitialized) fboA.tryDispose()
|
||||
if (::fboRGB_lightMixed.isInitialized) fboRGB_lightMixed.tryDispose()
|
||||
if (::fboA_lightMixed.isInitialized) fboA_lightMixed.tryDispose()
|
||||
if (::fboMixedOut.isInitialized) fboMixedOut.tryDispose()
|
||||
if (::lightmapFbo.isInitialized) lightmapFbo.tryDispose()
|
||||
|
||||
blurtex0.tryDispose()
|
||||
|
||||
fboBlurHalf.tryDispose()
|
||||
//fboBlurQuarter.tryDispose()
|
||||
if (::fboBlurHalf.isInitialized) fboBlurHalf.tryDispose()
|
||||
//if (::fboBlurQuarter.isInitialized) fboBlurQuarter.tryDispose()
|
||||
|
||||
LightmapRenderer.dispose()
|
||||
BlocksDrawer.dispose()
|
||||
WeatherMixer.dispose()
|
||||
|
||||
batch.tryDispose()
|
||||
if (::batch.isInitialized) batch.tryDispose()
|
||||
|
||||
|
||||
shaderBlur.dispose()
|
||||
@@ -896,7 +896,7 @@ object IngameRenderer : Disposable {
|
||||
shaderForActors.dispose()
|
||||
shaderDemultiply.dispose()
|
||||
|
||||
fboRGBexport.tryDispose()
|
||||
if (::fboRGBexport.isInitialized) fboRGBexport.tryDispose()
|
||||
}
|
||||
|
||||
private fun worldCamToRenderPos(): Pair<Float, Float> {
|
||||
|
||||
@@ -45,6 +45,8 @@ import kotlin.math.roundToInt
|
||||
|
||||
val SAVE_CELL_WIDTH = 480
|
||||
val SAVE_CELL_HEIGHT = 120
|
||||
val SAVE_THUMBNAIL_MAIN_WIDTH = 480
|
||||
val SAVE_THUMBNAIL_MAIN_HEIGHT = 320
|
||||
|
||||
/**
|
||||
* The pinnacle of the dirty coding! This object exists only because I couldn't make
|
||||
@@ -485,10 +487,11 @@ class UILoadDemoSavefiles(val remoCon: UIRemoCon) : Advanceable() {
|
||||
|
||||
|
||||
class UIItemPlayerCells(
|
||||
parent: Advanceable,
|
||||
initialX: Int,
|
||||
initialY: Int,
|
||||
val playerUUID: UUID) : UIItem(parent, initialX, initialY) {
|
||||
parent: Advanceable,
|
||||
initialX: Int,
|
||||
initialY: Int,
|
||||
val playerUUID: UUID,
|
||||
) : UIItem(parent, initialX, initialY) {
|
||||
|
||||
override val width = SAVE_CELL_WIDTH
|
||||
override val height = SAVE_CELL_HEIGHT
|
||||
@@ -528,7 +531,8 @@ class UIItemPlayerCells(
|
||||
|
||||
}
|
||||
|
||||
savegameStatus = SavegameCollectionPair(App.savegamePlayers[playerUUID], App.savegameWorlds[worldUUID]).status
|
||||
val savegamePair = SavegameCollectionPair(App.savegamePlayers[playerUUID], App.savegameWorlds[worldUUID])
|
||||
savegameStatus = savegamePair.status
|
||||
}
|
||||
|
||||
private fun parseDuration(seconds: Long): String {
|
||||
|
||||
@@ -123,14 +123,14 @@ class UILoadManage(val full: UILoadSavegame) : UICanvas() {
|
||||
}
|
||||
|
||||
private var screencap: TextureRegion? = null
|
||||
private val screencapW = SAVE_CELL_WIDTH
|
||||
private val screencapH = SAVE_CELL_HEIGHT * 2
|
||||
private val screencapW = SAVE_THUMBNAIL_MAIN_WIDTH
|
||||
private val screencapH = SAVE_THUMBNAIL_MAIN_HEIGHT
|
||||
|
||||
override fun doOpening(delta: Float) {
|
||||
full.playerButtonSelected?.forceUnhighlight = true
|
||||
full.playerButtonSelected?.let { button ->
|
||||
screencap?.texture?.tryDispose()
|
||||
screencap = App.savegamePlayers[button.playerUUID]!!.getPlayerThumbnail(screencapW, screencapH, 2.0)
|
||||
screencap = App.savegamePlayers[button.playerUUID]!!.getThumbnail(screencapW, screencapH, 2.0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user