feat(game): littleroot town intro with the truck and mom cutscene

This commit is contained in:
Fiereu committed 2026-07-26 14:36:07 +02:00
1 parent 41ff99ae4f
commit 9cda538a68
23 files changed
+389 -92

No files matched your search

@@ -34,6 +34,8 @@ class MapDef(
val bgEvents: List<BgEventDef> = emptyList(),
/** Decomp label of the script that runs when a player enters this map, or "" if none. */
val onTransitionScript: String = "",
/** Conditional entry scripts: run [MapFrameScript.script] when its var equals its value. */
val onFrameScripts: List<MapFrameScript> = emptyList(),
private val blockData: String = "",
private val behaviorData: String = "",
) {
@@ -48,6 +50,13 @@ class MapDef(
wildEncounters.firstOrNull { it.method == method }
}
/** One ON_FRAME entry: run [script] when the story var [varKey] currently equals [value]. */
data class MapFrameScript(
val varKey: String,
val value: Int,
val script: String,
)
private fun decodeBlockData(blockData: String, behaviorData: String): List<Tile2D> {
if (blockData.isEmpty()) return emptyList()
val bytes = Base64.getDecoder().decode(blockData)