mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
support for texture packs
This commit is contained in:
@@ -28,7 +28,7 @@ import net.torvald.util.CircularArray
|
||||
/**
|
||||
* Created by minjaesong on 2018-07-06.
|
||||
*/
|
||||
class BuildingMaker(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
class BuildingMaker(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
private val menuYaml = Yaml("""
|
||||
- File
|
||||
|
||||
@@ -20,7 +20,7 @@ class EntryPoint : ModuleEntryPoint() {
|
||||
|
||||
private val moduleName = "basegame"
|
||||
|
||||
override fun getTitleScreen(batch: SpriteBatch): IngameInstance? {
|
||||
override fun getTitleScreen(batch: FlippingSpriteBatch): IngameInstance? {
|
||||
return TitleScreen(batch)
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ import java.util.*
|
||||
* Created by minjaesong on 2017-06-16.
|
||||
*/
|
||||
|
||||
open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
var historicalFigureIDBucket: ArrayList<Int> = ArrayList<Int>()
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ import kotlin.math.sin
|
||||
/**
|
||||
* Created by minjaesong on 2017-09-02.
|
||||
*/
|
||||
class TitleScreen(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
class TitleScreen(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
// todo register titlescreen as the ingame, similar in a way that the buildingmaker did
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ object InjectCreatureRaw {
|
||||
* @param jsonFileName with extension
|
||||
*/
|
||||
operator fun invoke(actorValueRef: ActorValue, module: String, jsonFileName: String) {
|
||||
val jsonObj = JsonFetcher(ModMgr.getPath(module, "creatures/$jsonFileName"))
|
||||
val jsonObj = JsonFetcher(ModMgr.getFile(module, "creatures/$jsonFileName"))
|
||||
|
||||
|
||||
JsonFetcher.forEach(jsonObj) { key, value -> if (!key.startsWith("_")) {
|
||||
|
||||
@@ -10,8 +10,8 @@ import net.torvald.terrarum.gameactors.AVKey
|
||||
object PlayerBuilderTestSubject1 {
|
||||
operator fun invoke(): IngamePlayer {
|
||||
val p: IngamePlayer = IngamePlayer(
|
||||
ModMgr.getPath("basegame", "sprites/test_sprite.properties"),
|
||||
ModMgr.getPath("basegame", "sprites/test_sprite_glow.properties"),
|
||||
ModMgr.getGdxFile("basegame", "sprites/test_sprite.properties").path(),
|
||||
ModMgr.getGdxFile("basegame", "sprites/test_sprite_glow.properties").path(),
|
||||
-589141658L // random value thrown
|
||||
)
|
||||
InjectCreatureRaw(p.actorValue, "basegame", "CreatureHuman.json")
|
||||
|
||||
@@ -11,8 +11,8 @@ import net.torvald.terrarum.gameactors.AVKey
|
||||
object PlayerBuilderWerebeastTest {
|
||||
operator fun invoke(): IngamePlayer {
|
||||
val p: IngamePlayer = IngamePlayer(
|
||||
ModMgr.getPath("basegame", "sprites/taimu.properties"),
|
||||
ModMgr.getPath("basegame", "sprites/taimu_glow.properties"),
|
||||
ModMgr.getGdxFile("basegame", "sprites/taimu.properties").path(),
|
||||
ModMgr.getGdxFile("basegame", "sprites/taimu_glow.properties").path(),
|
||||
-589141658L // random value thrown
|
||||
)
|
||||
InjectCreatureRaw(p.actorValue, "basegame", "CreatureWerebeastBase.json")
|
||||
|
||||
@@ -29,7 +29,7 @@ class UIBasicInfo() : UICanvas() {
|
||||
private var ELon = false
|
||||
|
||||
private var watchFont = WatchFont
|
||||
private var atlas = TextureRegionPack(ModMgr.getPath("basegame", "gui/basic_info1.tga"), width, height)
|
||||
private var atlas = TextureRegionPack(ModMgr.getGdxFile("basegame", "gui/basic_info1.tga"), width, height)
|
||||
|
||||
private var font = Watch7SegSmall
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@ class UITierOneWatch() : UICanvas() {
|
||||
private val ELuptime = 4f
|
||||
private var ELon = false
|
||||
|
||||
private var atlas = TextureRegionPack(ModMgr.getPath("basegame", "gui/watchface_atlas.tga"), width, height)
|
||||
private var atlas = TextureRegionPack(ModMgr.getGdxFile("basegame", "gui/watchface_atlas.tga"), width, height)
|
||||
|
||||
private var watchFont = WatchFont
|
||||
private var moonDial = TextureRegionPack(ModMgr.getPath("basegame", "fonts/watch_17pxmoondial.tga"), 17, 17)
|
||||
private var moonDial = TextureRegionPack(ModMgr.getGdxFile("basegame", "fonts/watch_17pxmoondial.tga"), 17, 17)
|
||||
private var moonDialCount = moonDial.horizontalCount
|
||||
|
||||
private val drawCol = Color(1f, 1f, 1f, UIQuickslotBar.DISPLAY_OPACITY)
|
||||
|
||||
Reference in New Issue
Block a user