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)
@@ -15,4 +15,6 @@ data class NpcDef(
val trainerType: Int,
val facing: Direction,
val script: String = "0x0",
/** Story flag that hides this npc by default, or "" when it is always shown. */
val hideFlag: String = "",
)
@@ -13,4 +13,12 @@ data class WarpTile(
val targetY: Int,
val targetElevation: Int = 0,
val facingDirection: Direction? = null,
/** Direction the player faces after this warp, or null to infer it. */
val exitFacing: Direction? = null,
/**
* A MAP_DYNAMIC warp whose destination is not baked in but set at runtime (the decomp
* setdynamicwarp). The target fields are placeholders, the real destination comes from the
* player's stored dynamic warp when they step on it.
*/
val dynamic: Boolean = false,
)