titlescreen moved to modules; using GLES 3.0 as default

This commit is contained in:
minjaesong
2021-12-11 21:08:56 +09:00
parent 56f5dc1686
commit 10819e2607
13 changed files with 135 additions and 80 deletions

View File

@@ -2,6 +2,7 @@ package net.torvald.terrarum
import com.badlogic.gdx.Gdx
import com.badlogic.gdx.files.FileHandle
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import net.torvald.terrarum.App.*
import net.torvald.terrarum.blockproperties.BlockCodex
import net.torvald.terrarum.blockproperties.WireCodex
@@ -31,6 +32,7 @@ import java.util.*
/**
* Modules (or Mods) Resource Manager
*
* The very first mod on the load set must have a title screen
*
* NOTE!!: Usage of Groovy is only temporary; if Kotlin's "JSR 223" is no longer experimental and
* is readily available, ditch that Groovy.
@@ -93,6 +95,11 @@ object ModMgr {
errorLogs.add(ModuleErrorInfo(type, moduleName, cause))
}
/**
* Try to create an instance of a "titlescreen" from the current load order set.
*/
fun getTitleScreen(batch: SpriteBatch): IngameInstance? = entryPointClasses.getOrNull(0)?.getTitleScreen(batch)
init {
// load modules
val loadOrderCSVparser = CSVParser.parse(