feat(game): implement Hoenn story through Rustboro (#77)
* feat(game): implement Hoenn story through Rustboro * fix(game): group dialog presentation options * fix(game): address review feedback and running movement
This commit is contained in:
1 parent
f57149eae3
commit
3b19a81201
85 files changed
+4064
-358
No files matched your search
@@ -36,6 +36,8 @@ class MapDef(
|
||||
val onTransitionScript: String = "",
|
||||
/** Conditional entry scripts: run [MapFrameScript.script] when its var equals its value. */
|
||||
val onFrameScripts: List<MapFrameScript> = emptyList(),
|
||||
/** Conditional tile scripts checked after the player completes a step. */
|
||||
val coordScripts: List<MapCoordScript> = emptyList(),
|
||||
private val blockData: String = "",
|
||||
private val behaviorData: String = "",
|
||||
) {
|
||||
@@ -57,6 +59,16 @@ data class MapFrameScript(
|
||||
val script: String,
|
||||
)
|
||||
|
||||
/** One map coordinate trigger, corresponding to a decomp map.json `coord_events` entry. */
|
||||
data class MapCoordScript(
|
||||
val x: Int,
|
||||
val y: Int,
|
||||
val elevation: Int,
|
||||
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)
|
||||
|
||||
Reference in new issue
Block a user