feat(codegen): generate Pokemon moves and unify map/move codegen into one module (#16)
This commit is contained in:
1 parent
75fe4ae0d2
commit
b44bd1cc26
36 files changed
+635
-71
No files matched your search
@@ -0,0 +1,43 @@
|
||||
plugins {
|
||||
id("buildsrc.convention.kotlin-jvm")
|
||||
id("buildsrc.convention.spotless")
|
||||
id("buildsrc.convention.sonarlint")
|
||||
id("buildsrc.convention.jte-codegen")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(project(":common"))
|
||||
api(project(":protocols.game"))
|
||||
api(libs.dagger)
|
||||
"generatorImplementation"(libs.jte)
|
||||
"generatorImplementation"(libs.kotlinx.serialization.json)
|
||||
}
|
||||
|
||||
// Region name -> source decomp. Only non-NDS (GBA, 2D) decomps that share the pret
|
||||
// map format are listed. The NDS decomps (pokeblack, pokeheartgold, pokeplatinum) use
|
||||
// 3D maps and are not parsed here. Region ids live in the per-region constants.
|
||||
val regionSources =
|
||||
mapOf(
|
||||
"hoenn" to "pokeemerald",
|
||||
"kanto" to "pokefirered",
|
||||
)
|
||||
|
||||
val movesDecompDir = rootProject.layout.projectDirectory.dir("decomp/pokeemerald")
|
||||
|
||||
jteCodegen {
|
||||
register("maps") {
|
||||
mainClass.set("de.fiereu.openmmo.codegen.maps.Main")
|
||||
inputDirs.from(
|
||||
regionSources.values.map { rootProject.layout.projectDirectory.dir("decomp/$it") })
|
||||
extraArgs.set(
|
||||
regionSources.map { (region, decomp) ->
|
||||
"$region|${rootProject.layout.projectDirectory.dir("decomp/$decomp").asFile.absolutePath}"
|
||||
})
|
||||
}
|
||||
register("moves") {
|
||||
mainClass.set("de.fiereu.openmmo.codegen.move.Main")
|
||||
templatesSubdir.set("move")
|
||||
inputDirs.from(movesDecompDir)
|
||||
extraArgs.set(listOf(movesDecompDir.asFile.absolutePath))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user