
plugins {
    id "com.github.c64lib.retro-assembler" version "1.5.2"
}

repositories {
    mavenCentral()
}

apply plugin: "com.github.c64lib.retro-assembler"

retroProject {
    dialect = "KickAssembler"
    dialectVersion = "5.24"
    libDirs = [".ra/deps/c64lib"]
    srcDirs = ["."]
    excludes = ["**/_*.asm", ".ra/**/*", "libs/*"]

    // dependencies
    // libFromGitHub "c64lib/common", "0.3.0"
    // libFromGitHub "c64lib/chipset", "0.3.0"
}

preprocess {
    // Game charset, colors and maps
    charpad {
        getInput().set(file("./assets/assets.ctm"))
        getUseBuildDir().set(false)
        outputs {
            charset {
                output = file("./assets/assets - Chars.bin")
            }
            charsetAttributes {
                nybbler {
                    loOutput = file("./assets/assets - CharAttribs.bin")
                }
            }

    // Main map
            map {
                left = 0
                top = 0
                right = 22
                bottom = 23
                interleaver {
                    output = file("assets/assets - Map (22x23).bin")
                }
                interleaver {
                }
            }
        }
    }
}
