KSS moved out of Kryon into kryonlabs/kss. Inbe depends on it, compiles it from build/packages/kss/src with --module-path kryon=... for its Kryon imports, and embeds the style packs from build/packages/kss/styles as styles/NAME.kss. The Android build, the source check, and the tests use the same paths, and the lock moves Kryon and Ziran to the commits that carry the move. Co-Authored-By: Claude Opus 5.5 <[email protected]>
32 lines
1.2 KiB
Ziran
32 lines
1.2 KiB
Ziran
#import, file "../src/app/assets.zi";
|
|
|
|
#program_export
|
|
Answer :: () -> s32 {
|
|
style := AssetRead("assets/styles/inbe.kss")
|
|
if !style.found || style.mime != "text/plain" ||
|
|
style.data.count < 4 || style.data[0] != 84 ||
|
|
style.data[1] != 101 { return 1 }
|
|
pack := AssetRead("styles/material.kss")
|
|
if !pack.found || pack.mime != "text/plain" ||
|
|
pack.data.count < 5 || pack.data[0] != 64 { return 5 }
|
|
index := AssetRead("locales/index.txt")
|
|
if !index.found || index.data.count == 0 { return 2 }
|
|
path: [32]u8
|
|
name: string = "locales/index.txt"
|
|
cursor: s32 = 0
|
|
while cursor < cast(s32)name.count {
|
|
path[cursor] = name[cursor]
|
|
cursor += 1
|
|
}
|
|
index_bytes := AssetReadBytes(path[0:cursor])
|
|
if !index_bytes.found || index_bytes.data != index.data { return 6 }
|
|
image := AssetRead("assets/pet/egg1.png")
|
|
if !image.found || image.mime != "image/png" ||
|
|
image.data.count < 8 || image.data[0] != 137 ||
|
|
image.data[1] != 80 || image.data[2] != 78 ||
|
|
image.data[3] != 71 { return 4 }
|
|
missing := AssetRead("assets/styles/missing.kss")
|
|
if missing.found || missing.data.count != 0 { return 3 }
|
|
return 42
|
|
}
|