Preview next levels before play and update shared Profile

This commit is contained in:
waozi committed 2026-10-28 17:17:42 -03:00
1 parent a7b8a134ee
commit 6906dd012a
39 files changed
+2105 -1077

No files matched your search

+1
View File
@@ -6,3 +6,4 @@ __pycache__/
assets/campaign-levels/
assets/entity.zx
.yue/
work/
+12
View File
@@ -1,5 +1,17 @@
# Changelog
## [0.2.15] - 2026-10-28
- Preview each next level with a dimmed board and press Start level when you are ready.
- Start every level with a clear entrance and room to turn on mobile.
- See the app version in Settings.
- Load your saved account alias across devices and manage your account directly in Profile.
- Use Android Back to navigate inside the app.
- Choose your Profile picture in a modal and open Friends from the same shared Profile.
- Open Leaderboard and Dew directly from the title and return there with Back.
- Choose the shared theme, accent and widget appearance options.
- Adjust the sound volume from the dropdown immediately left of Pause.
## [0.2.14] - 2026-10-28
- Include the latest saved Meadow layouts for levels 3, 13 and 35.
+3 -1
View File
@@ -38,7 +38,9 @@ and crossings. Wandering fire, bouncing patrols and chasing enemies make the
journey more demanding as you climb.
Press **Play** and you are straight in the game. The levels follow one after
another through all five landscapes. You start
another through all five landscapes. After each goal, preview the next board
and press **Start level** (or Enter/Space) when ready. The worm and enemies wait
while you look around. You start
with three lives and earn more as your score grows. Score and lives carry
between levels throughout your run. **Continue** starts the furthest level
reached in your journey with three lives and a fresh score, even after a game
+3 -1
View File
@@ -13,7 +13,9 @@ layouts. The six original enemy types include wandering fire, bouncing
patrols and chasing creatures. Enemy counts and apple goals increase across
stages, while the first six levels introduce movement without enemies.
Opening Meadow levels move more slowly before reaching the original pace.
Levels follow in order through every landscape. Choose level offers a
Levels follow in order through every landscape. After each goal, the next
board opens dimmed and waits for **Start level** (or Enter/Space). Movement
and enemies stay paused until then; lives and score carry over. Choose level offers a
scrollable grid for each landscape; unlocked levels have large board previews and future levels show a lock. The run (level, lives and score carried into that level) and the
control choice persist. Unlocked progress is saved after every completed
level and survives game over, closing the game and starting a new run.
+36 -1
View File
@@ -22,6 +22,14 @@
}
Pump :: () {}
OpenProfile :: () { unused Service("entity.profile", "open") }
OpenLeaderboard :: () { unused Service("entity.profile", "leaderboard") }
OpenDew :: () { unused Service("entity.profile", "dew") }
OpenAppearance :: () { unused Service("entity.profile", "appearance") }
ProfileTitle :: () -> string { return "Profile" }
SharedTheme :: () -> s32 { return -1 }
SharedAccent :: () -> s32 { return 0 }
SharedMaterial :: () -> bool { return false }
SystemDark :: () -> bool { return true }
ProfileVisible :: () -> bool { return false }
DrawProfile :: (session: Session, bounds: Rectangle, key: s32, dark: bool) {}
Back :: () {}
@@ -45,12 +53,15 @@
#import "kryon/open_uri"
#if #defined(ANDROID_BUILD) {
#import "kryon/android_jni"
Device :: #import "kryon/android_device";
Assets :: #import "kryon/app_asset";
}
started: bool;
ready: bool;
visible: bool;
profile_title: string = "Profile";
profile_bytes: string;
InstalledGame :: (id: string) -> bool { return id == "xyz.waozi.wurm" }
Root :: (output: []u8) -> string {
#if #defined(PLATFORM_WEB) {
return "/kryon-apps/wurm-profile"
@@ -77,6 +88,8 @@
if found { profile_bytes = bytes }
}
root: [4096]u8
Leaderboard.leaderboard_installed = InstalledGame
Entity.EntityHostProfileSections(10)
if profile_bytes != "" { ready = Entity.EntityHostOpen(profile_bytes, Root(root[:]), "arcade", true) }
}
if ready { Entity.EntityHostPump() }
@@ -97,14 +110,28 @@
// The Profile always opens. One that could not start tries again and,
// if it still cannot, says why instead of doing nothing.
OpenProfile :: () {
profile_title = "Profile"
if !ready && started && profile_bytes != "" {
root: [4096]u8
ready = Entity.EntityHostOpen(profile_bytes, Root(root[:]), "arcade", true)
}
if ready { Entity.EntityHostReload() }
if ready { Entity.EntityHostReload(); unused Entity.EntityHostPage("profile") }
visible = true
}
ProfileVisible :: () -> bool { return visible }
OpenLeaderboard :: () { OpenProfile(); profile_title = "Leaderboard"; if ready { unused Entity.EntityHostLeaderboard() } }
OpenDew :: () { OpenProfile(); profile_title = "Dew"; if ready { unused Entity.EntityHostPage("dew") } }
OpenAppearance :: () { OpenProfile(); profile_title = "Appearance"; if ready { unused Entity.EntityHostPage("appearance") } }
ProfileTitle :: () -> string { return profile_title }
SharedTheme :: () -> s32 { return ifx ready then Entity.EntityHostAppearance().theme else -1 }
SharedAccent :: () -> s32 { return ifx ready then Entity.EntityHostAppearance().accent else 0 }
SharedMaterial :: () -> bool { return ready && Entity.EntityHostAppearance().material }
SystemDark :: () -> bool {
#if #defined(ANDROID_BUILD) {
return Device.AndroidSystemDark() != 0
}
return true
}
DrawProfile :: (session: Session, bounds: Rectangle, key: s32, dark: bool) {
if !ready {
problem := Entity.EntityHostProblem()
@@ -128,6 +155,14 @@
Service :: (name: string, request: string) -> string { unused name; unused request; return "" }
Pump :: () {}
OpenProfile :: () {}
OpenLeaderboard :: () {}
OpenDew :: () {}
OpenAppearance :: () {}
ProfileTitle :: () -> string { return "Profile" }
SharedTheme :: () -> s32 { return -1 }
SharedAccent :: () -> s32 { return 0 }
SharedMaterial :: () -> bool { return false }
SystemDark :: () -> bool { return true }
ProfileVisible :: () -> bool { return false }
DrawProfile :: (session: Session, bounds: Rectangle, key: s32, dark: bool) {}
Back :: () {}
+118 -33
View File
@@ -17,6 +17,10 @@
#import "kryon/pointer_input"
#import "kryon/input_protocol"
#import "kryon/tree"
#import "kryon/overlay_widget"
#import "kryon/overlay_props"
#import "kryon/slider_widget"
#import "kryon/slider_props"
} else {
using UI :: #import "kryon/Widgets";
}
@@ -28,6 +32,7 @@ Appearance :: #import, file "appearance.zi";
Account :: #import, file "account.zi";
Wardrobe :: #import, file "wardrobe.zi";
Locale :: #import, file "localization.zi";
Version :: #import, file "version.zi";
#import "kryon/widget_palette"
#import "std/json_scan"
#import "entity/dew_model"
@@ -232,8 +237,8 @@ PreferencesPump :: (now: s64) {
preferences_poll = now + 5000
if preferences_dirty {
out: Vec(u8)
BuilderPrint(*out, "{\"operation\":\"put\",\"kind\":\"wurm-settings\",\"id\":\"00000000000000000000000000000001\",\"schema\":\"wurm.settings.v1\",\"document\":{\"theme\":%,\"pad\":%,\"muted\":%,\"skin\":%}}",
Appearance.mode, Controls.Pad(), Audio.muted, Wardrobe.skin)
BuilderPrint(*out, "{\"operation\":\"put\",\"kind\":\"wurm-settings\",\"id\":\"00000000000000000000000000000001\",\"schema\":\"wurm.settings.v1\",\"document\":{\"theme\":%,\"pad\":%,\"muted\":%,\"skin\":%,\"volume\":%}}",
Appearance.mode, Controls.Pad(), Audio.muted, Wardrobe.skin, Audio.volume)
answer := Account.Service("entity.records", TextView(VecSlice(out, 0, out.count)))
done: [16]u8
preferences_dirty = ReadStringText(answer, FieldAt(answer, 0, "status"), done[:]) < 0 || TextUntilNul(done[:]) != "done"
@@ -244,7 +249,7 @@ PreferencesPump :: (now: s64) {
document := FieldAt(reply, 0, "document")
if document < 0 { return }
theme := ReadNumber(reply, FieldAt(reply, document, "theme"))
if theme.valid && theme.value >= 0.0 && theme.value <= 2.0 && theme.value == cast(float64)cast(s32)theme.value &&
if Account.SharedTheme() < 0 && theme.valid && theme.value >= 0.0 && theme.value <= 2.0 && theme.value == cast(float64)cast(s32)theme.value &&
cast(s32)theme.value != Appearance.mode { Appearance.Set(cast(s32)theme.value) }
pad := FieldAt(reply, document, "pad")
if pad >= 0 && (reply[pad] == #char "t" || reply[pad] == #char "f") {
@@ -254,8 +259,12 @@ PreferencesPump :: (now: s64) {
sound := FieldAt(reply, document, "muted")
if sound >= 0 && (reply[sound] == #char "t" || reply[sound] == #char "f") &&
Audio.muted != (reply[sound] == #char "t") { Audio.ToggleMute() }
gain := ReadNumber(reply,FieldAt(reply,document,"volume"))
if gain.valid && gain.value >= 0.0 && gain.value <= 100.0 && gain.value == cast(float64)cast(s32)gain.value {
Audio.SetVolume(cast(s32)gain.value)
}
chosen := ReadNumber(reply, FieldAt(reply, document, "skin"))
if chosen.valid && chosen.value >= 0.0 && chosen.value <= 6.0 && chosen.value == cast(float64)cast(s32)chosen.value &&
if chosen.valid && chosen.value >= 0.0 && chosen.value <= 8.0 && chosen.value == cast(float64)cast(s32)chosen.value &&
Wardrobe.Available(cast(s32)chosen.value) {
Wardrobe.skin = cast(s32)chosen.value
Wardrobe.Save()
@@ -265,14 +274,52 @@ LoadSound :: () {
if sound_loaded { return }
sound_loaded = true
bytes: [2]u8
if Controls.ReadRecord("sound.dat", bytes[:]) == 1 && bytes[0] == 1 && !Audio.muted { Audio.ToggleMute() }
count := Controls.ReadRecord("sound.dat", bytes[:])
if count >= 1 && bytes[0] == 1 && !Audio.muted { Audio.ToggleMute() }
if count == 2 && bytes[1] <= 100 { Audio.SetVolume(cast(s32)bytes[1]) }
}
SaveSound :: () {
bytes: [2]u8 = .[ifx Audio.muted then cast(u8)1 else cast(u8)0,cast(u8)Audio.volume]
unused Controls.WriteRecord("sound.dat", bytes[:])
PreferencesChanged()
}
ToggleSound :: () {
LoadSound()
Audio.ToggleMute()
bytes: [1]u8 = .[ifx Audio.muted then cast(u8)1 else cast(u8)0]
unused Controls.WriteRecord("sound.dat", bytes[:])
PreferencesChanged()
if Audio.volume == 0 {
Audio.SetVolume(100)
if Audio.muted { Audio.ToggleMute() }
} else { Audio.ToggleMute() }
SaveSound()
}
sound_popup: bool;
sound_percent: [24]u8;
DrawSoundPopup :: (session: Session, hud: Rectangle, trigger: Rectangle) {
if !sound_popup { return }
width: float32 = 248.0
if width > hud.width - 16.0 { width = hud.width - 16.0 }
left := trigger.x + trigger.width - width
if left < hud.x + 8.0 { left = hud.x + 8.0 }
panel := Rectangle.{left,trigger.y + trigger.height + 8.0,width,140.0}
popup := Popup(session,PopupProps.{.key=24100,.bounds=panel,.keep_bounds=trigger})
if popup.closed { sound_popup = false; return }
if popup.panel_node < 0 || !TreePushScope(session,popup.panel_node) { return }
unused Box(session,BoxProps.{.key=24101,.bounds=panel,.fill=Appearance.Surface(),.border=Appearance.Border(),.radius=12.0})
GameText(session,24102,Locale.Text("Sound"),Rectangle.{panel.x+16.0,panel.y+14.0,panel.width-120.0,32.0},16)
if Button(session,ButtonProps.{.key=24103,.bounds=Rectangle.{panel.x+panel.width-96.0,panel.y+10.0,80.0,40.0},
.label=Locale.Text(ifx Audio.muted || Audio.volume == 0 then "Off" else "On"),.selected=!Audio.muted && Audio.volume>0}) != 0 { ToggleSound() }
if Audio.CanSetVolume() {
text := FormatInteger(cast(s64)Audio.volume,sound_percent[:])
result := Slider(session,SliderProps.{.key=24104,.id=24104,
.bounds=Rectangle.{panel.x+16.0,panel.y+66.0,panel.width-32.0,58.0},
.label=Locale.Text("Volume"),.value_text=text,.semantic_label=Locale.Text("Volume"),
.value=cast(float32)Audio.volume,.min=0.0,.max=100.0})
if result.changed {
Audio.SetVolume(cast(s32)(result.value+0.5))
if Audio.volume > 0 && Audio.muted { Audio.ToggleMute() }
SaveSound()
}
}
unused End(session)
}
dew_text: [32]u8;
skin_price_text: [64]u8;
@@ -295,7 +342,7 @@ DewText :: () -> string {
TitleActions :: (session: Session, area: Rectangle) {
right := area.x + area.width - 12.0
top := area.y + 12.0
shop_right := right - 176.0
shop_right := right - 224.0
#if #defined(WURM_PORTABLE) {
// Embedded games use the enclosing host's navigation and account UI.
shop_right = right - 48.0
@@ -304,12 +351,15 @@ TitleActions :: (session: Session, area: Rectangle) {
.label = Locale.Text("Skin shop"), .icon_only = true, .icon_shape = "S1.8rr:M5 8H19L20 21H4ZM8 8V6C8 1 16 1 16 6V8",
.class_name = 11}) != 0 { game.mode = MODE_SHOP; Wardrobe.poll_at = 0; unused Account.Service("entity.game-shop", "refresh") }
#if !#defined(WURM_PORTABLE) {
if Button(session, ButtonProps.{.key = 28001, .bounds = Rectangle.{right - 168.0, top, 68.0, 44.0},
if Button(session, ButtonProps.{.key = 28001, .bounds = Rectangle.{right - 216.0, top, 68.0, 44.0},
.label = DewText(), .icon_shape = DewIcon.Shape,
.class_name = 11}) != 0 { Account.OpenProfile() }
if Button(session, ButtonProps.{.key = 28002, .bounds = Rectangle.{right - 92.0, top, 44.0, 44.0},
.class_name = 11}) != 0 { Account.OpenDew() }
if Button(session, ButtonProps.{.key = 28002, .bounds = Rectangle.{right - 140.0, top, 44.0, 44.0},
.label = Locale.Text("Profile"), .icon_only = true, .icon_shape = ProfileIcon.Shape,
.class_name = 11}) != 0 { Account.OpenProfile() }
if Button(session, ButtonProps.{.key = 28004, .bounds = Rectangle.{right - 92.0, top, 44.0, 44.0},
.label = Locale.Text("Leaderboard"), .icon_only = true, .icon_shape = "S1.8rr:M4 21V13H8V21M10 21V4H14V21M16 21V9H20V21",
.class_name = 11}) != 0 { Account.OpenLeaderboard() }
}
if Button(session, ButtonProps.{.key = 28003, .bounds = Rectangle.{right - 44.0, top, 44.0, 44.0},
.label = Locale.Text("Settings"), .icon_only = true, .icon_shape = "S1.8rr:M4 6H20M4 12H20M4 18H20M8 3V9M16 9V15M10 15V21",
@@ -332,15 +382,8 @@ DrawSettings :: (session: Session, area: Rectangle) {
settings_scroll = scroller.scroll_offset
if !scroller.opened { return }
x := scroller.content.x; y := scroller.content.y; width = scroller.content.width
GameText(session, 28201, "Appearance", Rectangle.{x, y, width, 28.0}, 20)
GameText(session, 28202, "Softer colours for your apple adventure.", Rectangle.{x, y + 32.0, width, 24.0}, 14, true)
button_width := (width - 16.0) / 3.0
for mode: 0..2 {
label := ifx mode == 0 then "Dusk" else ifx mode == 1 then "Forest" else "Sage"
if Button(session, ButtonProps.{.key = 28210 + cast(u64)mode,
.bounds = Rectangle.{x + cast(float32)mode * (button_width + 8.0), y + 70.0, button_width, 52.0},
.label = Locale.Text(label), .selected = Appearance.mode == mode, .class_name = 11}) != 0 { Appearance.Set(cast(s32)mode); PreferencesChanged() }
}
if Button(session, ButtonProps.{.key = 28201, .bounds = Rectangle.{x, y, width, 60.0},
.label = Locale.Text("Appearance"), .class_name = 11}) != 0 { Account.OpenAppearance() }
GameText(session, 28220, "Controls", Rectangle.{x, y + 150.0, width, 28.0}, 20)
half := (width - 8.0) / 2.0
if Button(session, ButtonProps.{.key = 28221, .bounds = Rectangle.{x, y + 188.0, half, 52.0},
@@ -350,6 +393,8 @@ DrawSettings :: (session: Session, area: Rectangle) {
GameText(session, 28230, "Sound", Rectangle.{x, y + 270.0, width - 104.0, 32.0}, 20)
if Button(session, ButtonProps.{.key = 28231, .bounds = Rectangle.{x + width - 100.0, y + 260.0, 100.0, 52.0},
.label = Locale.Text(ifx Audio.muted then "Off" else "On"), .selected = !Audio.muted, .class_name = 11}) != 0 { ToggleSound() }
GameText(session, 28240, "Version", Rectangle.{x, y + 332.0, width - 104.0, 24.0}, 14, true)
GameText(session, 28241, Version.AppVersion, Rectangle.{x + width - 100.0, y + 332.0, 100.0, 24.0}, 14, true)
unused End(session)
}
@@ -526,6 +571,27 @@ Overlay :: (session: Session, area: Rectangle, title: string, message: string, s
.label = Locale.Text("Back to title"), .class_name = 11, .tone = ButtonTone.ButtonToneNeutral}) != 0 { LeavePlay() }
}
// Keep the next board readable while its worm and enemies wait for Start.
DrawLevelReady :: (session: Session, area: Rectangle) {
unused Box(session, BoxProps.{.key = 24200, .bounds = area, .fill = Color.{0, 0, 0, 64}})
width := area.width - 32.0
if width > 320.0 { width = 320.0 }
height: float32 = ifx area.height < 180.0 then 132.0 else 164.0
card := Rectangle.{area.x + (area.width - width) / 2.0, area.y + (area.height - height) / 2.0, width, height}
unused Box(session, BoxProps.{.key = 24201, .bounds = card, .fill = Appearance.Surface(),
.border = Appearance.Border(), .radius = 24.0})
CentreText(session, 24202, "Level", Rectangle.{card.x + 12.0, card.y + 12.0, width - 24.0, 22.0}, 16)
digits: [21]u8
number := FormatInteger(cast(s64)game.level + 1, digits[:])
CentreText(session, 24203, number, Rectangle.{card.x + 12.0, card.y + 36.0, width - 24.0, 32.0}, 28)
if Button(session, ButtonProps.{.key = 24204,
.bounds = Rectangle.{card.x + 20.0, card.y + height - 64.0, width - 40.0, 48.0},
.label = Locale.Text("Start level"), .class_name = 10,
.tone = ButtonTone.ButtonToneSuccess, .emphasis = ButtonEmphasis.ButtonEmphasisFilled}) != 0 {
HandleInput(Input.KeyEnter, Timer.MonotonicMilliseconds())
}
}
// A logical-pixel sprite square on the live board.
Sprite :: (session: Session, key: u64, stage: Rectangle, position: Point, source: Rectangle,
sheet: string, size: float32 = 16.0) {
@@ -1458,10 +1524,12 @@ HandleInput :: (key: s32, now: s64) {
unused ApplyInput(*game, key)
if game.mode == MODE_PLAYING { game.next_step = now + TickInterval(game.level) }
if game.mode == MODE_STAGES { LeavePlay() }
} else if game.mode == MODE_FINISHED {
// Landscapes follow one another; lives and score carry on.
ReloadLevel(game.level + 1, now)
if !editor.playtest { unused Progress.Begin(game.level, game.lives, game.score) }
} else if game.mode == MODE_READY {
if key == Input.KeyEnter || key == 32 {
game.mode = MODE_PLAYING
game.next_step = now + TickInterval(game.level)
touch_steering.active = false
} else if key == Input.KeyEscape { LeavePlay() }
} else if game.mode == MODE_DIED {
if key == Input.KeyEnter || key == 32 {
if editor.playtest { StartLevel(game.level, now, 1) }
@@ -1584,11 +1652,17 @@ DrawTopBar :: (session: Session, hud: Rectangle) {
StatusChip(session, 19, Rectangle.{group_x + chip_width + 8.0, chip_y, chip_width, chip_height}, AppleIcon.Shape, Color.{210, 78, 65, 255}, apples_text)
StatusChip(session, 21, Rectangle.{group_x + (chip_width + 8.0) * 2.0, chip_y, chip_width, chip_height}, StarIcon.Shape, Color.{210, 152, 46, 255}, score_text)
if game.mode == MODE_PLAYING {
sound_bounds := Rectangle.{hud.x+hud.width-116.0,hud.y+8.0,48.0,48.0}
if Button(session,ButtonProps.{.key=24110,.bounds=sound_bounds,
.label=Locale.Text("Volume"),.icon_only=true,.class_name=10,
.icon_shape="S1.8rr:M4 9H8L13 5V19L8 15H4ZM16 8C19 10 19 14 16 16M19 5C24 9 24 15 19 19",
.tone=ButtonTone.ButtonToneSuccess,.emphasis=ButtonEmphasis.ButtonEmphasisFilled}) != 0 { sound_popup = !sound_popup }
if Button(session, ButtonProps.{.key = 59,
.bounds = Rectangle.{hud.x + hud.width - 60.0, hud.y + 8.0, 48.0, 48.0},
.label = Locale.Text("Pause"), .icon_only = true, .class_name = 10,
.icon_shape = "F:M7 5H10V19H7ZM14 5H17V19H14Z", .tone = ButtonTone.ButtonToneSuccess,
.emphasis = ButtonEmphasis.ButtonEmphasisFilled}) != 0 { HandleInput(Input.KeyEscape, Timer.MonotonicMilliseconds()) }
DrawSoundPopup(session,hud,sound_bounds)
}
}
@@ -1609,6 +1683,8 @@ Frame :: (session: Session, viewport: Rectangle) -> s32 {
}
now := Timer.MonotonicMilliseconds()
Account.Pump()
Appearance.ApplyShared(Account.SharedTheme(), Account.SharedAccent(), Account.SharedMaterial(), Account.SystemDark())
unused WidgetPaletteUse(session, Appearance.Palette())
LoadSound()
if Account.ProfileVisible() {
profile_key: s32
@@ -1616,14 +1692,14 @@ Frame :: (session: Session, viewport: Rectangle) -> s32 {
profile_key = KeyboardTake(session)
}
unused Box(session, BoxProps.{.key = 29000, .bounds = viewport, .fill = Appearance.Canvas()})
GameText(session, 29001, "Profile", Rectangle.{viewport.x + 100.0, viewport.y + 14.0, viewport.width - 112.0, 32.0}, 22)
GameText(session, 29001, Account.ProfileTitle(), Rectangle.{viewport.x + 100.0, viewport.y + 14.0, viewport.width - 112.0, 32.0}, 22)
Account.DrawProfile(session, Rectangle.{viewport.x, viewport.y + 64.0, viewport.width, viewport.height - 64.0}, profile_key, Appearance.mode != 2)
if Button(session, ButtonProps.{.key = 29002, .bounds = Rectangle.{viewport.x + 12.0, viewport.y + 8.0, 76.0, 44.0}, .label = Locale.Text("Back")}) != 0 || profile_key == Input.KeyEscape { Account.Back(); Progress.poll_at = 0; Wardrobe.poll_at = 0 }
return 0
}
if Progress.Pump(now) {
Wardrobe.Reset(); preferences_poll = 0; preferences_dirty = false
if game.mode == MODE_PLAYING || game.mode == MODE_PAUSED || game.mode == MODE_FINISHED || game.mode == MODE_DIED || game.mode == MODE_VICTORY {
if game.mode == MODE_PLAYING || game.mode == MODE_PAUSED || game.mode == MODE_READY || game.mode == MODE_FINISHED || game.mode == MODE_DIED || game.mode == MODE_VICTORY {
game.mode = MODE_STAGES
touch_steering.active = false
}
@@ -1635,10 +1711,10 @@ Frame :: (session: Session, viewport: Rectangle) -> s32 {
if !game.started {
game.started = true
OpenStages()
} else if was_portrait != game_portrait && !editor.playtest && (game.mode == MODE_PLAYING || game.mode == MODE_PAUSED) {
paused := game.mode == MODE_PAUSED
} else if was_portrait != game_portrait && !editor.playtest && (game.mode == MODE_PLAYING || game.mode == MODE_PAUSED || game.mode == MODE_READY) {
previous_mode := game.mode
ReloadLevel(game.level,now)
if paused { game.mode = MODE_PAUSED }
game.mode = previous_mode
}
water_frame = cast(s32)((now / 130) % 3)
enemy_frame = cast(s32)((now / 110) % 4)
@@ -1650,6 +1726,8 @@ Frame :: (session: Session, viewport: Rectangle) -> s32 {
}
// A key that returns to the stages must not also start a level there.
stage_key := ifx game.mode == MODE_STAGES then key else 0
if sound_popup && key == Input.KeyEscape { sound_popup = false; key = 0 }
if game.mode != MODE_PLAYING { sound_popup = false }
HandleInput(key, now)
unused Box(session, BoxProps.{.key = 1, .bounds = viewport, .fill = Appearance.Canvas()})
// The stages screen is one full-bleed cover; every other mode carries the
@@ -1669,7 +1747,7 @@ Frame :: (session: Session, viewport: Rectangle) -> s32 {
// already use this frame's direction. SwipeArea supplies captured contact;
// its release-only swipe result is deliberately unused.
contact: SwipeAreaResult
if game.mode == MODE_PLAYING && !Controls.Pad() && game.death_ticks == 0 && game.transition_ticks == 0 {
if game.mode == MODE_PLAYING && !sound_popup && !Controls.Pad() && game.death_ticks == 0 && game.transition_ticks == 0 {
contact = SwipeArea(session, SwipeAreaProps.{.key = PLAY_STEERING_KEY, .bounds = stage,
.label = Locale.Text("Steer the worm"), .now = cast(float64)now / 1000.0,
.min_distance = 6.0})
@@ -1684,6 +1762,12 @@ Frame :: (session: Session, viewport: Rectangle) -> s32 {
if Progress.Begin(game.level + 1, game.lives, game.score) { recorded_level = game.level }
Progress.RecordRun(game.level + 2, game.score)
}
if game.mode == MODE_FINISHED {
// Load after saving completion, then wait indefinitely for Start.
// No simulation or stale steering can cross into this new board.
ReloadLevel(game.level + 1, now)
game.mode = MODE_READY
}
// The run keeps each lost life; a game over or the finished journey
// starts the next run at level one.
if !editor.playtest && game.lives < lives_before {
@@ -1732,7 +1816,8 @@ Frame :: (session: Session, viewport: Rectangle) -> s32 {
}
}
if showing_bar { DrawTopBar(session, hud) }
if game.mode == MODE_PAUSED { Overlay(session, viewport, "Paused", "Your worm is waiting.") }
if game.mode == MODE_READY { DrawLevelReady(session, stage) }
else if game.mode == MODE_PAUSED { Overlay(session, viewport, "Paused", "Your worm is waiting.") }
else if game.mode == MODE_DIED { Overlay(session, viewport, "Game over", "Another apple adventure?", game.score) }
else if game.mode == MODE_VICTORY { Overlay(session, viewport, "You did it!", "You reached the mountain!", game.score) }
return 0
+20
View File
@@ -1,7 +1,19 @@
#import "kryon/widget_palette"
#import "kryon/drawing_props"
#import "kryon/system_theme"
Records :: #import, file "controls.zi";
mode: s32 = -1;
shared_theme: s32 = -1;
shared_accent: s32;
shared_material: bool;
shared_dark: bool;
ApplyShared :: (theme: s32, accent: s32, material: bool, system_dark: bool) {
shared_theme = theme
shared_accent = accent
shared_material = material
shared_dark = theme == 2 || (theme == 0 && system_dark)
if theme >= 0 { mode = ifx shared_dark then 0 else 2 }
}
Load :: () {
if mode >= 0 { return }
mode = 0
@@ -16,6 +28,14 @@ Set :: (value: s32) {
}
Palette :: () -> WidgetPalette {
Load()
if shared_theme >= 0 {
base := SystemPaletteFallback(shared_dark)
accents: [16]u32 = .[0x7355d9ff, 0x2563ebff, 0x059669ff, 0xdb2777ff, 0xd97706ff, 0x0891b2ff, 0xdc2626ff, 0x7c3aedff,
0x4f46e5ff, 0x0d9488ff, 0x65a30dff, 0xc026d3ff, 0xea580cff, 0x0284c7ff, 0x9333eaff, 0x475569ff]
return WidgetPalette.{.background = base.background, .base = base.base, .text = base.text,
.selected = accents[shared_accent], .selected_text = 0xffffffff, .border = base.border,
.danger = base.danger, .warning = base.warning, .success = base.success, .material = shared_material}
}
if mode == 2 {
return WidgetPalette.{.background = 0xc3cbb7ff, .base = 0xdde1cfff, .text = 0x263b30ff,
.selected = 0x476c50ff, .selected_text = 0xf2f0e2ff, .border = 0xa1b198ff,
+8 -3
View File
@@ -1,6 +1,7 @@
// One game mixer, with SDL desktop and raylib Android output.
File :: #import "std/file_linux";
Output :: #import, file "audio_output.zi";
#import, file "audio_volume.zi";
#if #defined(ANDROID_BUILD) {
Assets :: #import "kryon/app_asset";
music_data: string;
@@ -10,6 +11,12 @@ Effect :: struct { bytes: [65536]u8; count: s32; position: s32; playing: bool; }
device: u32;
attempted: bool;
muted: bool;
volume: s32 = 100;
CanSetVolume :: () -> bool { return true }
SetVolume :: (value: s32) {
volume = ClampVolume(value)
if device != 0 { Output.Clear(device) }
}
effects: [4]Effect;
music_file: File.FileHandle;
music_bytes: s64;
@@ -136,9 +143,7 @@ PumpAudio :: () {
if sound.position >= sound.count { sound.playing = false }
}
}
if value > 32767 { value = 32767 }
if value < -32768 { value = -32768 }
mixed[index] = cast(s16)value
mixed[index] = VolumeSample(value,volume)
}
if !Output.Submit(device, mixed[:]) { return }
}
+11
View File
@@ -0,0 +1,11 @@
ClampVolume :: (value: s32) -> s32 {
if value < 0 { return 0 }
if value > 100 { return 100 }
return value
}
VolumeSample :: (value: s32, percent: s32) -> s16 {
sample := value
if sample > 32767 { sample = 32767 }
if sample < -32768 { sample = -32768 }
return cast(s16)(sample * ClampVolume(percent) / 100)
}
+2
View File
@@ -36,6 +36,8 @@ MODE_CONTROLS :: 7;
MODE_LEVELS :: 8;
MODE_SETTINGS :: 9;
MODE_SHOP :: 10;
// The next board is visible, but its clock starts only on confirmation.
MODE_READY :: 11;
// A gentle Meadow introduction, reaching the recovered pace at Leafwood.
TickInterval :: (level: s32) -> s64 {
+30
View File
@@ -121,3 +121,33 @@ Dokončeno
[wurm_ui_39]
Vybrat úroveň
---
---
[wurm_version]
Verze
---
[wurm_leaderboard]
Žebříček
---
[wurm_moon_dragon]
Měsíční drak
---
[wurm_winter_cheer]
Vánoční radost
---
[wurm_christmas_free]
Zdarma · prosinec 2026
---
[wurm_claim]
Získat
[Volume]
Hlasitost
[wurm_level_start]
Spustit úroveň
---
+30
View File
@@ -121,3 +121,33 @@ Abgeschlossen
[wurm_ui_39]
Level wählen
---
---
[wurm_version]
Version
---
[wurm_leaderboard]
Bestenliste
---
[wurm_moon_dragon]
Monddrache
---
[wurm_winter_cheer]
Weihnachtsfreude
---
[wurm_christmas_free]
Kostenlos · Dezember 2026
---
[wurm_claim]
Abholen
[Volume]
Lautstärke
[wurm_level_start]
Level starten
---
+30
View File
@@ -121,3 +121,33 @@ Completed
[wurm_ui_39]
Choose level
---
---
[wurm_version]
Version
---
[wurm_leaderboard]
Leaderboard
---
[wurm_moon_dragon]
Moon dragon
---
[wurm_winter_cheer]
Winter cheer
---
[wurm_christmas_free]
Free · December 2026
---
[wurm_claim]
Claim
[Volume]
Volume
[wurm_level_start]
Start level
---
+30
View File
@@ -121,3 +121,33 @@ Completado
[wurm_ui_39]
Elegir nivel
---
---
[wurm_version]
Versión
---
[wurm_leaderboard]
Clasificación
---
[wurm_moon_dragon]
Dragón lunar
---
[wurm_winter_cheer]
Alegría navideña
---
[wurm_christmas_free]
Gratis · diciembre de 2026
---
[wurm_claim]
Reclamar
[Volume]
Volumen
[wurm_level_start]
Empezar nivel
---
+30
View File
@@ -121,3 +121,33 @@ Terminé
[wurm_ui_39]
Choisir un niveau
---
---
[wurm_version]
Version
---
[wurm_leaderboard]
Classement
---
[wurm_moon_dragon]
Dragon lunaire
---
[wurm_winter_cheer]
Joie de Noël
---
[wurm_christmas_free]
Gratuit · décembre 2026
---
[wurm_claim]
Obtenir
[Volume]
Volume
[wurm_level_start]
Commencer le niveau
---
+30
View File
@@ -121,3 +121,33 @@ Selesai
[wurm_ui_39]
Pilih level
---
---
[wurm_version]
Versi
---
[wurm_leaderboard]
Papan peringkat
---
[wurm_moon_dragon]
Naga bulan
---
[wurm_winter_cheer]
Keceriaan Natal
---
[wurm_christmas_free]
Gratis · Desember 2026
---
[wurm_claim]
Klaim
[Volume]
Volume
[wurm_level_start]
Mulai level
---
+30
View File
@@ -121,3 +121,33 @@ Completato
[wurm_ui_39]
Scegli livello
---
---
[wurm_version]
Versione
---
[wurm_leaderboard]
Classifica
---
[wurm_moon_dragon]
Drago lunare
---
[wurm_winter_cheer]
Allegria natalizia
---
[wurm_christmas_free]
Gratis · dicembre 2026
---
[wurm_claim]
Riscatta
[Volume]
Volume
[wurm_level_start]
Inizia livello
---
+30
View File
@@ -121,3 +121,33 @@ waozi.xyzを訪問
[wurm_ui_39]
レベル選択
---
---
[wurm_version]
バージョン
---
[wurm_leaderboard]
ランキング
---
[wurm_moon_dragon]
月のドラゴン
---
[wurm_winter_cheer]
クリスマスの喜び
---
[wurm_christmas_free]
無料 · 2026年12月
---
[wurm_claim]
受け取る
[Volume]
音量
[wurm_level_start]
レベルを開始
---
+30
View File
@@ -121,3 +121,33 @@ waozi.xyz 방문
[wurm_ui_39]
레벨 선택
---
---
[wurm_version]
버전
---
[wurm_leaderboard]
순위표
---
[wurm_moon_dragon]
달빛 용
---
[wurm_winter_cheer]
크리스마스의 기쁨
---
[wurm_christmas_free]
무료 · 2026년 12월
---
[wurm_claim]
받기
[Volume]
음량
[wurm_level_start]
레벨 시작
---
+30
View File
@@ -121,3 +121,33 @@ Concluído
[wurm_ui_39]
Escolher nível
---
---
[wurm_version]
Versão
---
[wurm_leaderboard]
Classificação
---
[wurm_moon_dragon]
Dragão lunar
---
[wurm_winter_cheer]
Alegria de Natal
---
[wurm_christmas_free]
Grátis · dezembro de 2026
---
[wurm_claim]
Resgatar
[Volume]
Volume
[wurm_level_start]
Iniciar nível
---
+30
View File
@@ -121,3 +121,33 @@
[wurm_ui_39]
Выбрать уровень
---
---
[wurm_version]
Версия
---
[wurm_leaderboard]
Таблица лидеров
---
[wurm_moon_dragon]
Лунный дракон
---
[wurm_winter_cheer]
Рождественская радость
---
[wurm_christmas_free]
Бесплатно · декабрь 2026
---
[wurm_claim]
Получить
[Volume]
Громкость
[wurm_level_start]
Начать уровень
---
+30
View File
@@ -121,3 +121,33 @@
[wurm_ui_39]
选择关卡
---
---
[wurm_version]
版本
---
[wurm_leaderboard]
排行榜
---
[wurm_moon_dragon]
月光龙
---
[wurm_winter_cheer]
圣诞欢乐
---
[wurm_christmas_free]
免费 · 2026年12月
---
[wurm_claim]
领取
[Volume]
音量
[wurm_level_start]
开始关卡
---
+64
View File
@@ -76,6 +76,12 @@ Text :: (source: string) -> string {
if source == "Ready to play" { return "Připraveno" }
if source == "Completed" { return "Dokončeno" }
if source == "Choose level" { return "Vybrat úroveň" }
if source == "Version" { return "Verze" }
if source == "Leaderboard" { return "Žebříček" }
if source == "Moon dragon" { return "Měsíční drak" }
if source == "Winter cheer" { return "Vánoční radost" }
if source == "Free · December 2026" { return "Zdarma · prosinec 2026" }
if source == "Claim\n\n[Volume]\nVolume\n[wurm_level_start]\nStart level" { return "Získat\n\n[Volume]\nHlasitost\n[wurm_level_start]\nSpustit úroveň" }
}
if locale == "de" {
if source == "Back" { return "Zurück" }
@@ -118,6 +124,11 @@ Text :: (source: string) -> string {
if source == "Ready to play" { return "Spielbereit" }
if source == "Completed" { return "Abgeschlossen" }
if source == "Choose level" { return "Level wählen" }
if source == "Leaderboard" { return "Bestenliste" }
if source == "Moon dragon" { return "Monddrache" }
if source == "Winter cheer" { return "Weihnachtsfreude" }
if source == "Free · December 2026" { return "Kostenlos · Dezember 2026" }
if source == "Claim\n\n[Volume]\nVolume\n[wurm_level_start]\nStart level" { return "Abholen\n\n[Volume]\nLautstärke\n[wurm_level_start]\nLevel starten" }
}
if locale == "es" {
if source == "Back" { return "Atrás" }
@@ -161,6 +172,12 @@ Text :: (source: string) -> string {
if source == "Ready to play" { return "Disponible" }
if source == "Completed" { return "Completado" }
if source == "Choose level" { return "Elegir nivel" }
if source == "Version" { return "Versión" }
if source == "Leaderboard" { return "Clasificación" }
if source == "Moon dragon" { return "Dragón lunar" }
if source == "Winter cheer" { return "Alegría navideña" }
if source == "Free · December 2026" { return "Gratis · diciembre de 2026" }
if source == "Claim\n\n[Volume]\nVolume\n[wurm_level_start]\nStart level" { return "Reclamar\n\n[Volume]\nVolumen\n[wurm_level_start]\nEmpezar nivel" }
}
if locale == "fr" {
if source == "Back" { return "Retour" }
@@ -203,6 +220,11 @@ Text :: (source: string) -> string {
if source == "Ready to play" { return "Disponible" }
if source == "Completed" { return "Terminé" }
if source == "Choose level" { return "Choisir un niveau" }
if source == "Leaderboard" { return "Classement" }
if source == "Moon dragon" { return "Dragon lunaire" }
if source == "Winter cheer" { return "Joie de Noël" }
if source == "Free · December 2026" { return "Gratuit · décembre 2026" }
if source == "Claim\n\n[Volume]\nVolume\n[wurm_level_start]\nStart level" { return "Obtenir\n\n[Volume]\nVolume\n[wurm_level_start]\nCommencer le niveau" }
}
if locale == "id" {
if source == "Back" { return "Kembali" }
@@ -244,6 +266,12 @@ Text :: (source: string) -> string {
if source == "Ready to play" { return "Siap dimainkan" }
if source == "Completed" { return "Selesai" }
if source == "Choose level" { return "Pilih level" }
if source == "Version" { return "Versi" }
if source == "Leaderboard" { return "Papan peringkat" }
if source == "Moon dragon" { return "Naga bulan" }
if source == "Winter cheer" { return "Keceriaan Natal" }
if source == "Free · December 2026" { return "Gratis · Desember 2026" }
if source == "Claim\n\n[Volume]\nVolume\n[wurm_level_start]\nStart level" { return "Klaim\n\n[Volume]\nVolume\n[wurm_level_start]\nMulai level" }
}
if locale == "it" {
if source == "Back" { return "Indietro" }
@@ -287,6 +315,12 @@ Text :: (source: string) -> string {
if source == "Ready to play" { return "Disponibile" }
if source == "Completed" { return "Completato" }
if source == "Choose level" { return "Scegli livello" }
if source == "Version" { return "Versione" }
if source == "Leaderboard" { return "Classifica" }
if source == "Moon dragon" { return "Drago lunare" }
if source == "Winter cheer" { return "Allegria natalizia" }
if source == "Free · December 2026" { return "Gratis · dicembre 2026" }
if source == "Claim\n\n[Volume]\nVolume\n[wurm_level_start]\nStart level" { return "Riscatta\n\n[Volume]\nVolume\n[wurm_level_start]\nInizia livello" }
}
if locale == "ja" {
if source == "Back" { return "戻る" }
@@ -330,6 +364,12 @@ Text :: (source: string) -> string {
if source == "Ready to play" { return "プレイ可能" }
if source == "Completed" { return "クリア済み" }
if source == "Choose level" { return "レベル選択" }
if source == "Version" { return "バージョン" }
if source == "Leaderboard" { return "ランキング" }
if source == "Moon dragon" { return "月のドラゴン" }
if source == "Winter cheer" { return "クリスマスの喜び" }
if source == "Free · December 2026" { return "無料 · 2026年12月" }
if source == "Claim\n\n[Volume]\nVolume\n[wurm_level_start]\nStart level" { return "受け取る\n\n[Volume]\n音量\n[wurm_level_start]\nレベルを開始" }
}
if locale == "ko" {
if source == "Back" { return "뒤로" }
@@ -373,6 +413,12 @@ Text :: (source: string) -> string {
if source == "Ready to play" { return "플레이 가능" }
if source == "Completed" { return "완료" }
if source == "Choose level" { return "레벨 선택" }
if source == "Version" { return "버전" }
if source == "Leaderboard" { return "순위표" }
if source == "Moon dragon" { return "달빛 용" }
if source == "Winter cheer" { return "크리스마스의 기쁨" }
if source == "Free · December 2026" { return "무료 · 2026년 12월" }
if source == "Claim\n\n[Volume]\nVolume\n[wurm_level_start]\nStart level" { return "받기\n\n[Volume]\n음량\n[wurm_level_start]\n레벨 시작" }
}
if locale == "pt" {
if source == "Back" { return "Voltar" }
@@ -416,6 +462,12 @@ Text :: (source: string) -> string {
if source == "Ready to play" { return "Disponível" }
if source == "Completed" { return "Concluído" }
if source == "Choose level" { return "Escolher nível" }
if source == "Version" { return "Versão" }
if source == "Leaderboard" { return "Classificação" }
if source == "Moon dragon" { return "Dragão lunar" }
if source == "Winter cheer" { return "Alegria de Natal" }
if source == "Free · December 2026" { return "Grátis · dezembro de 2026" }
if source == "Claim\n\n[Volume]\nVolume\n[wurm_level_start]\nStart level" { return "Resgatar\n\n[Volume]\nVolume\n[wurm_level_start]\nIniciar nível" }
}
if locale == "ru" {
if source == "Back" { return "Назад" }
@@ -459,6 +511,12 @@ Text :: (source: string) -> string {
if source == "Ready to play" { return "Можно играть" }
if source == "Completed" { return "Пройдено" }
if source == "Choose level" { return "Выбрать уровень" }
if source == "Version" { return "Версия" }
if source == "Leaderboard" { return "Таблица лидеров" }
if source == "Moon dragon" { return "Лунный дракон" }
if source == "Winter cheer" { return "Рождественская радость" }
if source == "Free · December 2026" { return "Бесплатно · декабрь 2026" }
if source == "Claim\n\n[Volume]\nVolume\n[wurm_level_start]\nStart level" { return "Получить\n\n[Volume]\nГромкость\n[wurm_level_start]\nНачать уровень" }
}
if locale == "zh" {
if source == "Back" { return "返回" }
@@ -502,6 +560,12 @@ Text :: (source: string) -> string {
if source == "Ready to play" { return "可游玩" }
if source == "Completed" { return "已完成" }
if source == "Choose level" { return "选择关卡" }
if source == "Version" { return "版本" }
if source == "Leaderboard" { return "排行榜" }
if source == "Moon dragon" { return "月光龙" }
if source == "Winter cheer" { return "圣诞欢乐" }
if source == "Free · December 2026" { return "免费 · 2026年12月" }
if source == "Claim\n\n[Volume]\nVolume\n[wurm_level_start]\nStart level" { return "领取\n\n[Volume]\n音量\n[wurm_level_start]\n开始关卡" }
}
return source
}
+29 -2
View File
@@ -42,10 +42,37 @@ ProgressProbe :: (session: Session) -> s32 {
App.game.next_step = 0
if !ProbeFrame(session) { return 31 }
if Progress.level != 40 || Progress.unlocked != 40 || Progress.lives != 5 || Progress.score != 120 { return 32 }
if !ProbeFrame(session) || App.game.level != 40 || App.game.lives != 5 || App.game.score != 120 { return 33 }
if !ProbeFrame(session) || App.game.level != 40 || App.game.mode != MODE_READY || App.game.lives != 5 || App.game.score != 120 { return 33 }
head := App.game.worm[0]
random := App.game.random
monster := App.game.monsters[0].position
if Step(*App.game, now + 600000) || App.game.worm[0].x != head.x || App.game.worm[0].y != head.y ||
App.game.random != random || App.game.monsters[0].position.x != monster.x || App.game.monsters[0].position.y != monster.y { return 47 }
App.HandleInput(Input.KeyUp, now + 600000)
if App.game.mode != MODE_READY { return 48 }
App.HandleInput(Input.KeyEnter, now + 600000)
if App.game.mode != MODE_PLAYING || App.game.next_step != now + 600000 + TickInterval(40) ||
Step(*App.game, now + 600000) { return 49 }
App.game.score = 130
App.HandleInput(82, now)
if App.game.level != 40 || App.game.score != 120 || App.game.lives != 5 { return 34 }
// Enter the actual goal on level 12, then preview level 13 without a key.
if !Progress.Begin(11, 5, 120) { return 50 }
App.StartRun(now)
App.game.apples = 0
App.game.worm[0] = Point.{board_columns / 2 * 16 + 8, 2}
App.game.direction = DIR_UP
App.game.next_direction = DIR_UP
Tick(*App.game)
if App.game.transition_ticks != 50 { return 51 }
carried_score := App.game.score
carried_lives := App.game.lives
for tick: 0..49 { Tick(*App.game) }
if !ProbeFrame(session) || App.game.level != 12 || App.game.mode != MODE_READY ||
App.game.score != carried_score || App.game.lives != carried_lives || Progress.level != 12 { return 52 }
App.HandleInput(32, now)
if App.game.mode != MODE_PLAYING || App.game.next_step != now + TickInterval(12) { return 53 }
if !Progress.Begin(40, 5, 120) { return 54 }
App.editor.playtest = true
App.StartLevel(150, now, 1)
App.game.transition_ticks = 1
@@ -80,7 +107,7 @@ ProgressProbe :: (session: Session) -> s32 {
App.game.transition_ticks = 1
App.game.next_step = 0
if !ProbeFrame(session) || App.game.mode != MODE_VICTORY || Progress.level != 0 || Progress.unlocked != 199 { return 40 }
print("Application progress local test: completion, carried stats, restart, editor isolation, game-over retry, locked levels, selected controls, Continue, Play and victory passed.\n")
print("Application progress local test: goal 12 to ready 13, frozen worm/enemies, deliberate start, carried stats, restart, editor isolation, game-over retry, locked levels, selected controls, Continue, Play and victory passed.\n")
return 0
}
+15 -1
View File
@@ -1,7 +1,21 @@
// Packed effects use the host's sound device; the guest never opens SDL.
host_api :: #system_library "host_api";
AppSoundHost :: (path: string) -> bool #foreign host_api;
AppServiceHost :: (name: string, request: string) -> string #foreign host_api;
#import "std/number_text"
#import "std/text_buffer"
#import "std/vec"
#import, file "audio_volume.zi";
muted: bool;
volume: s32 = 100;
CanSetVolume :: () -> bool { return AppServiceHost("arcade.sound","volume.get") != "" }
SetVolume :: (value: s32) {
volume = ClampVolume(value)
request: Vec(u8)
BuilderPrint(*request,"volume:%",volume)
unused AppServiceHost("arcade.sound",TextView(VecSlice(request,0,request.count)))
VecFree(request)
}
previous_level: s32 = -1;
previous_apples: s32;
previous_death: s32;
@@ -14,7 +28,7 @@ UpdateAudio :: (playing: bool, level: s32, apples: s32, death: s32, transition:
else if playing && apples < previous_apples { path = "assets/wurm/sounds/pickup.wav" }
else if death > previous_death { path = "assets/wurm/sounds/lose.wav" }
else if transition > previous_transition { path = "assets/wurm/sounds/exit.wav" }
if !muted && path != "" { unused AppSoundHost(path) }
if !muted && volume > 0 && path != "" { unused AppSoundHost(path) }
was_playing = playing
previous_level = level
previous_apples = apples
+17 -2
View File
@@ -93,6 +93,14 @@ main :: () -> s32 {
for i: 0..31 { Game.Tick(*App.game) }
App.game.mode = Game.MODE_PAUSED
}
unused CopyCString("WORM_SHOT_BOARD", name[:])
if GetEnvironment(*name[0]) != null {
App.game.started = true
App.game.mode = Game.MODE_PLAYING
App.game.next_step = 9223372036854775000
}
unused CopyCString("WORM_SHOT_VOLUME", name[:])
if GetEnvironment(*name[0]) != null { App.sound_popup = true }
unused CopyCString("WORM_SHOT_STAGES", name[:])
if GetEnvironment(*name[0]) != null {
App.game.started = true
@@ -113,10 +121,17 @@ main :: () -> s32 {
session := SessionOpen()
if !SessionValid(session) { return 2 }
defer { PixmapCloseWorkers(); CloseSession(session) }
viewport := Rectangle.{0.0, 0.0, cast(float32)PixmapWidth, cast(float32)PixmapHeight}
width: s32 = PixmapWidth
height: s32 = PixmapHeight
unused CopyCString("WORM_SHOT_PORTRAIT", name[:])
portrait := GetEnvironment(*name[0]) != null
if portrait { width = 390; height = 780 }
pixels: [390 * 780]u32
viewport := Rectangle.{0.0, 0.0, cast(float32)width, cast(float32)height}
frame: s32 = 0
while frame < 2 {
PixmapBegin(cast(u32)PixmapBackground)
if portrait { unused PixmapBeginInto(cast(u32)PixmapBackground, width, height, pixels[:]) }
else { PixmapBegin(cast(u32)PixmapBackground) }
if cast(s32)BeginFrame(session, 1, viewport) != 0 { return 3 }
if App.Frame(session, viewport) != 0 { return 4 }
if cast(s32)EndFrame(session) != 0 { return 5 }
+2
View File
@@ -0,0 +1,2 @@
// Generated by update_version.sh from CHANGELOG.md.
AppVersion :: "0.2.15"
+19 -1
View File
@@ -1,7 +1,21 @@
// The browser plays this game's fixed score/effects as ordinary HTML audio.
#import "std/web"
#import, file "audio_volume.zi";
ready: bool;
muted: bool;
volume: s32 = 100;
CanSetVolume :: () -> bool { return true }
SetVolume :: (value: s32) {
volume = ClampVolume(value)
Ensure()
mark := WebScope()
for index: 0..4 {
gain := cast(float64)volume / 100.0
if index == 4 { gain *= 0.4 }
WebSet(sounds[index],WebName("volume"),WebNumber(gain))
}
WebEnd(mark)
}
sounds: [5]s32;
ignore_play_failure: s32;
previous_level: s32 = -1;
@@ -23,7 +37,11 @@ Ensure :: () {
sounds[index] = WebKeep(WebNew(constructor,*args[0],1))
}
WebSet(sounds[4],WebName("loop"),WebBool(true))
WebSet(sounds[4],WebName("volume"),WebNumber(0.4))
for index: 0..4 {
gain := cast(float64)volume / 100.0
if index == 4 { gain *= 0.4 }
WebSet(sounds[index],WebName("volume"),WebNumber(gain))
}
ignore_play_failure = WebFunction(IgnorePlayFailure,0)
WebEnd(mark)
}
+17 -5
View File
@@ -86,7 +86,7 @@ def main():
from PIL import Image
picture = Image.open(OUT / ('title-' + size + '.png')).convert('RGB')
assert len(picture.getcolors(picture.width * picture.height) or []) > 1000, 'Title artwork is missing'
for name, box in [('profile', (298, 20, 319, 48)), ('dew', (219, 20, 244, 48))]:
for name, box in [('profile', (250, 20, 271, 48)), ('dew', (171, 20, 196, 48))]:
cropped = picture.crop(box)
assert sum(min(cropped.getpixel((x, y))) > 130 for x in range(cropped.width) for y in range(cropped.height)) >= 12, name + ' icon is missing'
press('Choose level')
@@ -99,11 +99,23 @@ def main():
press('Back')
press('Settings')
nodes = tree('settings-' + size)
assert all(label in [node['label'] for node in nodes] for label in ('Dusk', 'Forest', 'Sage', 'Swipe', 'Direction pad'))
press('Forest')
assert (fixture / 'levels/appearance.dat').read_bytes() == b'\x01'
version = json.loads((ROOT / 'version.json').read_text())['version']
assert all(label in [node['label'] for node in nodes] for label in ('Appearance', 'Swipe', 'Direction pad', 'Version', version))
capture('settings-' + size)
press('Appearance')
nodes = tree('appearance-' + size)
assert all(label in [node['label'] for node in nodes] for label in ('System', 'Light', 'Dark', 'Accent', 'Material'))
press('Dark')
press('Back')
nodes = tree('appearance-return-' + size)
assert 'Version' in [node['label'] for node in nodes], 'Appearance Back must return to Settings'
press('Back')
press('Leaderboard')
nodes = tree('leaderboard-' + size)
assert 'Leaderboard' in [node['label'] for node in nodes]
press('Back')
nodes = tree('leaderboard-return-' + size)
assert 'Choose level' in [node['label'] for node in nodes], 'Title leaderboard Back must return to title'
press('Skin shop')
nodes = tree('shop-' + size)
assert 'Mint' in [node['label'] for node in nodes]
@@ -130,7 +142,7 @@ def main():
app.wait(timeout=5)
app = None
(OUT / 'result.json').write_text(json.dumps({'passed': True, 'private_display': env['DISPLAY'],
'behaviors': ['title-only account/shop/settings actions', 'dimmer persisted themes', 'skin catalog',
'behaviors': ['title-only account/shop/settings actions', 'shared appearance options and version', 'title leaderboard Back returns to title', 'skin catalog',
'explicit purchase confirmation', 'sign-in instead of guest debit', 'shared Profile in both orientations']}, indent=2))
print('Account UI local tests passed in portrait and landscape on private Xvfb.')
finally:
+276
View File
@@ -0,0 +1,276 @@
#!/usr/bin/env python3
"""Test Wurm Profile on the USB Moto with an isolated throwaway account."""
import json
import hashlib
import os
from pathlib import Path
import re
import shlex
import shutil
import socket
import subprocess
import time
import urllib.request
ROOT = Path(__file__).resolve().parents[1]
OUT = ROOT / 'work/profile-ui'
ENTITY = ROOT.parents[1] / 'modules/entity'
DAOCHI = ROOT.parents[2] / 'kryonlabs/daochi/daochi'
PACKAGE = 'xyz.waozi.wurm.verification'
SERIAL = 'ZE2223BQZT'
DRIVER = 'files/kryon-test-driver'
def main():
OUT.mkdir(parents=True, exist_ok=True)
apk = ROOT / 'build/android/Apfelwurm-verification-armeabi-v7a-debug.apk'
adb = ['adb', '-s', SERIAL]
def run(*args, data=None, check=True):
return subprocess.run([*adb, *args], input=data, capture_output=True, check=check, timeout=90)
def shell(*args, **options):
return run('shell', shlex.join(args), **options)
def pid(package):
return shell('pidof', package, check=False).stdout.strip()
assert b'moto e6 play' == shell('getprop', 'ro.product.model').stdout.strip()
devices = subprocess.check_output(['adb', 'devices', '-l'], text=True)
assert any(line.startswith(SERIAL + ' ') and 'usb:' in line for line in devices.splitlines())
owner_pid = pid('xyz.waozi.wurm')
previous = OUT / 'test-pid'
if pid(PACKAGE):
known_pid = previous.exists() and previous.read_bytes().strip() == pid(PACKAGE)
fixture_key = OUT / 'fixture/account.key'
installed = shell('run-as', PACKAGE, 'sha256sum', 'files/profile/account.key', check=False).stdout.decode().split()
known_fixture = fixture_key.exists() and installed and installed[0] == hashlib.sha256(fixture_key.read_bytes()).hexdigest()
assert known_pid or known_fixture, 'Preserve an unrecognized verification process'
shell('am', 'force-stop', PACKAGE)
with socket.socket() as probe:
probe.bind(('127.0.0.1', 0))
port = probe.getsockname()[1]
node_url = f'http://127.0.0.1:{port}'
node_folder = OUT / 'node'
node_folder.mkdir(exist_ok=True)
for suffix in ('node.db', 'node.db-shm', 'node.db-wal'):
(node_folder / suffix).unlink(missing_ok=True)
node_binary = node_folder / 'daochi'
shutil.copy2(DAOCHI, node_binary)
fixture = OUT / 'fixture'
fixture.mkdir(exist_ok=True)
env = {key: value for key, value in os.environ.items() if key not in
('DISPLAY', 'WAYLAND_DISPLAY', 'XAUTHORITY', 'DBUS_SESSION_BUS_ADDRESS', 'SESSION_MANAGER')}
node_env = dict(env, DAOCHI_ADDR=f'127.0.0.1:{port}', DAOCHI_DB=str(node_folder / 'node.db'),
DAOCHI_BASE_URL=node_url, DAOCHI_LAN_DISCOVERY='0', DAOCHI_ALLOW_EPHEMERAL_TOKEN_SECRET='1')
rotation = {key: shell('settings', 'get', 'system', key).stdout.decode().strip()
for key in ('accelerometer_rotation', 'user_rotation')}
receipt = {'serial': SERIAL, 'package': PACKAGE, 'passed': False, 'behaviors': []}
sequence = 0
def command(verb, **fields):
nonlocal sequence
sequence += 1
line = '\t'.join([str(sequence), verb, *(f'{key}={value}' for key, value in fields.items())]) + '\n'
shell('run-as', PACKAGE, 'sh', '-c', f'cat > {DRIVER}/command.tmp && mv {DRIVER}/command.tmp {DRIVER}/command', data=line.encode())
deadline = time.monotonic() + 30
while time.monotonic() < deadline:
answer = shell('run-as', PACKAGE, 'cat', DRIVER + '/reply', check=False)
if answer.returncode == 0:
reply = json.loads(answer.stdout)
if reply.get('serial') == sequence:
shell('run-as', PACKAGE, 'rm', DRIVER + '/reply')
assert reply.get('ok'), reply
return reply
assert pid(PACKAGE), 'Verification app exited'
time.sleep(.1)
raise AssertionError('No driver response: ' + verb)
def wait(label, role=None):
deadline = time.monotonic() + 30
while time.monotonic() < deadline:
fields = {'label': label, 'visible': 1}
if role:
fields['role'] = role
nodes = command('find', **fields).get('nodes', [])
if nodes:
return nodes[0]
time.sleep(.2)
raise AssertionError('Missing visible widget: ' + label)
def press(label, **fields):
command('press', label=label, visible=1, **fields)
def capture(name):
tree = command('tree')
(OUT / (name + '.json')).write_text(json.dumps(tree, indent=2) + '\n')
(OUT / (name + '.png')).write_bytes(run('exec-out', 'screencap', '-p').stdout)
return tree
def back():
command('pointer', real=1)
shell('input', 'keyevent', '4')
time.sleep(.4)
def orient(value):
shell('settings', 'put', 'system', 'accelerometer_rotation', '0')
shell('settings', 'put', 'system', 'user_rotation', str(value))
deadline = time.monotonic() + 15
while time.monotonic() < deadline:
root = command('tree')['nodes'][0]
if (root['width'] > root['height']) == (value == 1):
time.sleep(.4)
return
time.sleep(.2)
raise AssertionError('Orientation did not settle')
with (OUT / 'node.log').open('wb') as log:
node = subprocess.Popen([str(node_binary)], cwd=node_folder, env=node_env, stdout=log, stderr=subprocess.STDOUT)
try:
deadline = time.monotonic() + 20
while True:
try:
urllib.request.urlopen(node_url + '/api/v1/apps/entity', timeout=1).close()
break
except OSError:
assert node.poll() is None and time.monotonic() < deadline
time.sleep(.2)
helper = ENTITY / 'build/alias-test/alias.test'
for step in ('create', 'first'):
subprocess.run([str(helper)], env=dict(env, ENTITY_DATA=str(fixture), ALIAS_STEP=step, ALIAS_NODE=node_url), check=True, timeout=90)
assert b'Success' in run('install', '--no-streaming', '-r', str(apk)).stdout
# This separate package and generated fixture belong only to this test.
for name in ('account.key', 'entity.json'):
shell('run-as', PACKAGE, 'sh', '-c', 'mkdir -p files/profile; cat > files/profile/' + name,
data=(fixture / name).read_bytes())
shell('run-as', PACKAGE, 'sh', '-c', f'rm -rf {DRIVER}; mkdir -p {DRIVER}')
run('reverse', f'tcp:{port}', f'tcp:{port}')
shell('input', 'keyevent', 'KEYCODE_WAKEUP')
shell('wm', 'dismiss-keyguard')
shell('am', 'start', '-n', PACKAGE + '/xyz.waozi.wurm.MainActivity')
previous.write_bytes(pid(PACKAGE))
wait('Settings', 'button')
orient(0)
press('Settings', role='button')
wait('Version')
wait(json.loads((ROOT / 'version.json').read_text())['version'])
capture('settings')
back()
wait('Play', 'button')
receipt['behaviors'].append('app version and OS Back from Settings')
press('Leaderboard', role='button')
wait('Leaderboard', 'text')
back()
wait('Play', 'button')
command('press', key=28001, visible=1)
wait('Dew', 'text')
capture('dew-page')
back()
wait('Play', 'button')
receipt['behaviors'].append('Leaderboard and Dew title icons return directly to title')
press('Profile', role='button')
wait('@live_tester_one')
wait('Friends')
assert not command('find', label='Leaderboard', role='button').get('nodes'), 'Leaderboard belongs outside Profile'
capture('profile')
press('Copy public ID', role='button')
wait('Copied', 'button')
press('Public ID', role='button')
wait('Done', 'button')
tree = capture('public-id')
text = next(n for n in tree['nodes'] if n.get('key') == 19502)
assert '\n' in text['label'] and len(text['label'].replace('\n', '')) == 64
assert text.get('hidden_lines', 0) == 0
back()
wait('Friends')
receipt['behaviors'].append('node alias restored, compact ID, aligned Copy and complete wrapped ID modal')
press('Change picture', index=0)
wait('Classic')
orient(1)
wait('Classic')
capture('picture-landscape')
back()
assert not command('find', label='Classic', visible=1).get('nodes')
orient(0)
receipt['behaviors'].append('picture modal survives rotation and OS Back closes it')
press('Friends', role='button')
wait('Add friend', 'button')
command('press', label='Alias or public ID', role='text_field', visible=1)
shell('input', 'text', 'friend_keyboard')
deadline = time.monotonic() + 10
while time.monotonic() < deadline:
values = command('find', label='Alias or public ID', role='text_field').get('nodes', [])
if values and 'friend_keyboard' in values[0].get('value', ''): break
time.sleep(.2)
else: raise AssertionError('Friends did not accept Android soft-keyboard input')
capture('friends')
back()
back()
wait('Friends')
# Reveal Alias in the one scrolling Profile column.
command('pointer', real=1)
dimensions = re.findall(r'(\d+)x(\d+)', shell('wm', 'size').stdout.decode())[-1]
width, height = map(int, dimensions)
for attempt in range(5):
if command('find', label='Alias', role='button', visible=1).get('nodes'):
break
shell('input', 'swipe', str(width // 2), str(height * 4 // 5), str(width // 2), str(height // 3), '450')
press('Alias', role='button')
field = wait('Alias', 'text_field')
command('press', label='Alias', role='text_field', visible=1)
deadline = time.monotonic() + 10
while time.monotonic() < deadline:
ime = shell('dumpsys', 'input_method').stdout.decode()
if 'mInputShown=true' in ime or 'mIsInputViewShown=true' in ime:
break
time.sleep(.2)
else:
raise AssertionError('Alias did not open Android soft keyboard')
capture('alias-keyboard')
# OS text entry exercises the real IME bridge; do not save a rename.
shell('input', 'text', 'x')
deadline = time.monotonic() + 10
while time.monotonic() < deadline:
values = command('find', label='Alias', role='text_field').get('nodes', [])
if values and values[0].get('value', '').endswith('x'):
break
time.sleep(.2)
else:
raise AssertionError('OS text did not reach Alias')
back()
back()
wait('Profile', 'text')
for page, action in (('Back up key', 'Save key file'), ('Import key', 'Choose key file')):
command('pointer', real=1)
for attempt in range(5):
if command('find', label=page, role='button', visible=1).get('nodes'): break
shell('input', 'swipe', str(width // 2), str(height * 4 // 5), str(width // 2), str(height // 3), '400')
press(page, role='button')
press(action, role='button')
deadline = time.monotonic() + 10
while time.monotonic() < deadline:
focus = shell('dumpsys', 'window', 'windows').stdout.decode()
current = next((line for line in focus.splitlines() if 'mCurrentFocus=' in line), '')
if 'documentsui' in current.lower(): break
time.sleep(.2)
else: raise AssertionError(page + ' did not open Android document picker')
shell('input', 'keyevent', '4')
wait(action, 'button')
back()
receipt['behaviors'].append('Android key import and export document pickers open and cancel safely')
receipt['behaviors'].append('Friends page, Alias keyboard and real Android text input')
assert pid('xyz.waozi.wurm') == owner_pid, 'Normal game process changed'
receipt['passed'] = True
finally:
shell('run-as', PACKAGE, 'rm', '-rf', DRIVER, check=False)
run('reverse', '--remove', f'tcp:{port}', check=False)
for key, value in rotation.items():
shell('settings', 'delete' if value == 'null' else 'put', 'system', key, *([] if value == 'null' else [value]))
node.terminate()
node.wait(timeout=10)
(OUT / 'result.json').write_text(json.dumps(receipt, indent=2) + '\n')
print('USB Moto Profile local tests passed: ' + '; '.join(receipt['behaviors']))
if __name__ == '__main__':
main()
+12
View File
@@ -1,4 +1,5 @@
Audio :: #import, file "../src/audio.zi";
Volume :: #import, file "../src/audio_volume.zi";
File :: #import "std/file_linux";
sdl :: #system_library "SDL2";
CloseDevice :: (device: u32) #foreign sdl "SDL_CloseAudioDevice";
@@ -27,6 +28,17 @@ main :: () -> s32 {
heard := false
for index: 0..2047 { if Audio.mixed[index] != 0 { heard = true } }
if !heard { return 6 }
if Volume.VolumeSample(12000,25) != 3000 || Volume.VolumeSample(-12000,50) != -6000 { return 13 }
if Volume.VolumeSample(90000,100) != 32767 || Volume.VolumeSample(12000,0) != 0 { return 14 }
Audio.SetVolume(0)
Clear(Audio.device)
Audio.PumpAudio()
muted_index: s32 = 0
while muted_index < 2048 {
if Audio.mixed[muted_index] != 0 { return 15 }
muted_index += 1
}
Audio.SetVolume(100)
// Force a loop seam in the middle of a block and compare every byte:
// no zero padding and no skipped or duplicated samples.
expected: [4096]u8
+995 -995
View File
File diff suppressed because it is too large. Load diff
+4 -3
View File
@@ -1,9 +1,9 @@
#import, file "../src/game.zi";
// campaign-cases:begin
// Generated from campaign_cases.json by tools/design_levels.py.
CampaignSeeds: [400]u32 = .[1, 1, 65538, 65538, 131075, 131075, 196612, 196612, 262149, 262149, 327686, 327686, 393223, 401142, 466679, 458760, 532216, 540135, 589834, 597753, 655371, 679128, 728827, 720908, 786445, 786445, 867820, 851982, 917519, 917519, 1014732, 983056, 1064431, 1064431, 1114130, 1114130, 1195505, 1211343, 1245204, 1261042, 1318660, 1326579, 1384197, 1392116, 1441815, 1544762, 1586542, 1546947, 1596646, 1572889, 1638426, 1638426, 1703963, 1703963, 2070422, 1824933, 1898389, 1850875, 1932250, 1900574, 1966111, 1974030, 2039567, 2047486, 2303079, 2105104, 2202317, 2210236, 2252016, 2236178, 2293796, 2301715, 2367252, 2391009, 2440708, 2456546, 4525590, 3155603, 2595539, 2650972, 2637319, 2621481, 2726613, 2900831, 2752555, 2752555, 2857687, 2826011, 2891548, 2891548, 2949166, 2949166, 3030541, 3022622, 3080240, 3088159, 3201210, 3153696, 3211314, 3235071, 3292689, 3276851, 3342388, 3350307, 3439601, 3423763, 3473462, 3631842, 3538999, 3538999, 3604536, 3762916, 3670073, 3670073, 3751448, 3767286, 3809066, 3816985, 3874603, 3866684, 4003492, 4003492, 4005677, 3997758, 4118728, 4205837, 4279293, 4366402, 4210207, 4233964, 4299501, 4299501, 4349200, 4325443, 4390980, 4406818, 4464436, 4496112, 4577487, 4545811, 4619267, 4643024, 4668966, 4661047, 4766179, 4750341, 4879230, 4815878, 5895047, 4849739, 6966297, 6950459, 5004570, 4980813, 5062188, 5101783, 5135644, 5230672, 5256614, 5399156, 5250880, 5242961, 5356012, 5332255, 5389873, 5405711, 5534600, 5463329, 5505109, 5560542, 5633998, 5784459, 5652021, 5652021, 5717558, 5812586, 5767257, 5767257, 6315853, 6426719, 5898331, 5953764, 5979706, 6019301, 6061081, 6037324, 6094942, 6094942, 6168398, 6160479, 6233935, 6241854, 6845883, 7827839, 7299451, 6626336, 6478060, 7103661, 6543597, 6488164, 7084274, 6846704, 6619238, 6761780, 7128239, 7452918, 6845340, 6766150, 6831687, 6926715, 6889305, 6936819, 7129060, 6970680, 8627936, 8279500, 7173025, 7196782, 7689945, 7872082, 7612940, 7351613, 7298365, 7892290, 7411416, 7474768, 8633127, 10715824, 7487057, 7502895, 7560513, 8106924, 7736916, 7602293, 7675749, 7683668, 7772962, 8160993, 11085289, 12455276, 7911955, 8054497, 8025006, 8436794, 8027191, 8145976, 8076890, 8068971, 8134508, 8158265, 8643509, 8564319, 8281420, 8257663, 8394471, 8552851, 12783782, 9980456, 8454274, 8881900, 8527730, 8535649, 8617024, 8617024, 8658804, 8872617, 8866883, 8771855, 8797797, 8813635, 8918767, 9203851, 8944709, 9055575, 13294425, 14632736, 11491078, 9107459, 9220510, 9172996, 9191019, 9175181, 9280313, 9565397, 9306255, 9314174, 9514334, 9743985, 9476924, 9508600, 9613732, 9708760, 9576322, 9584241, 9816077, 9903186, 9865776, 9762829, 9947151, 10343101, 9830551, 9838470, 9911926, 9911926, 10009139, 9977463, 10027162, 10130109, 10092699, 10092699, 10205750, 10308697, 10683075, 10302963, 10344743, 10289310, 10536984, 10639931, 10444141, 10555007, 10485921, 10604706, 10717757, 10630648, 11092135, 10862484, 10706289, 10690451, 10819340, 10803502, 10861120, 10971986, 11417635, 11758152, 11047627, 11023870, 11176516, 11422005, 11083673, 11202458, 11212562, 11141291, 11222666, 11262261, 11351555, 11723748, 11417092, 11377497, 11466791, 11680604, 11532328, 11500652, 11550351, 11558270, 12447383, 11972243, 11681425, 11665587, 11739043, 11826152, 12303477, 11812499, 12424447, 12273986, 11927735, 11967330, 12001191, 12207085, 12454759, 12066728, 12251050, 13486414, 12221559, 12197802, 12287096, 12271258, 12320957, 12423904, 12608226, 19949139, 13038037, 12650006, 12580920, 12881842, 12662295, 13002812, 12775346, 12648642, 15002770, 17291361, 12795554, 12803473, 12861091, 12845253, 12926628, 13243388, 131452486, 33446942, 13659546, 15124561];
CampaignRoutes: [400]s32 = .[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0, 116, 20, 0, 2];
CampaignReverse: [400]s32 = .[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0];
CampaignSeeds: [400]u32 = .[1, 1, 65538, 65538, 131075, 138994, 196612, 196612, 262149, 262149, 327686, 327686, 393223, 393223, 466679, 458760, 524297, 524297, 589834, 589834, 655371, 655371, 720908, 720908, 786445, 786445, 851982, 851982, 917519, 917519, 983056, 983056, 1048593, 1056512, 1114130, 1114130, 1195505, 1211343, 1245204, 1245204, 1318660, 1326579, 1384197, 1400035, 1465572, 1449734, 1507352, 1546947, 1572889, 1572889, 1638426, 1638426, 1703963, 1711882, 1785338, 1793257, 1858794, 1850875, 1916412, 1900574, 1966111, 1966111, 2039567, 2031648, 2113023, 2105104, 2162722, 2210236, 2228259, 2228259, 2293796, 2293796, 2406847, 2359333, 2424870, 2432789, 2648787, 2506245, 2587620, 2571782, 2621481, 2621481, 2908750, 2694937, 2752555, 2752555, 2818092, 2826011, 2883629, 2883629, 2949166, 2949166, 3030541, 3014703, 3080240, 3080240, 3153696, 3153696, 3211314, 3235071, 3292689, 3284770, 3342388, 3350307, 3407925, 3407925, 3473462, 3481381, 3538999, 3538999, 3604536, 3644131, 3670073, 3670073, 3759367, 3806881, 3809066, 3816985, 3866684, 3866684, 4043087, 4003492, 4005677, 3997758, 4071214, 4071214, 4128832, 4128832, 4218126, 4194369, 4299501, 4299501, 4349200, 4325443, 4390980, 4390980, 4456517, 4456517, 4545811, 4522054, 4611348, 4611348, 4668966, 4661047, 4718665, 4734503, 4815878, 4879230, 4968524, 4849739, 4946952, 4923195, 4988732, 5012489, 5046350, 5054269, 5111887, 5111887, 5288290, 5399156, 5250880, 5242961, 5308498, 5308498, 5389873, 5374035, 5487086, 5447491, 5505109, 5560542, 5633998, 5784459, 5636183, 5652021, 5717558, 5875938, 5767257, 5767257, 6315853, 6426719, 5898331, 5906250, 5979706, 5979706, 6045243, 6029405, 6094942, 6094942, 6168398, 6160479, 6233935, 6257692, 6853802, 7827839, 6388766, 7061881, 11767952, 6707711, 6543597, 6488164, 6759595, 6569539, 6619238, 6619238, 6866912, 6684775, 6766150, 6758231, 6831687, 6902958, 6889305, 6952657, 7073627, 6970680, 9681163, 7059974, 7173025, 7125511, 7689945, 7998786, 7612940, 7351613, 7298365, 7892290, 7411416, 7348064, 8641046, 12687655, 7471219, 7526652, 7560513, 8344494, 7895296, 7602293, 7675749, 7683668, 7772962, 7733367, 12906659, 12455276, 7911955, 8054497, 8025006, 8500146, 8027191, 8050948, 8068971, 8068971, 8134508, 8158265, 8516805, 8746456, 8265582, 8257663, 9083424, 9091343, 22587504, 11120792, 8462193, 9064037, 8527730, 8535649, 8617024, 8617024, 8666723, 8872617, 8866883, 8851045, 8797797, 8813635, 8918767, 9354312, 9008061, 9055575, 14909901, 11275080, 40332076, 9107459, 9220510, 9260105, 9191019, 9175181, 9280313, 9565397, 9306255, 9314174, 10084502, 9743985, 9548195, 9730332, 9613732, 9661246, 9592160, 9584241, 9839834, 10045728, 9889533, 9762829, 9947151, 9765014, 9885984, 9838470, 9904007, 9911926, 10009139, 9977463, 10027162, 10130109, 10092699, 10195646, 10277021, 10308697, 10683075, 10239611, 10344743, 10408095, 10536984, 10632012, 10444141, 10586683, 10517597, 10604706, 10717757, 10646486, 11092135, 10862484, 10706289, 10690451, 10819340, 10803502, 10861120, 10924472, 11417635, 12169940, 11047627, 11023870, 11176516, 11422005, 11107430, 11075754, 11212562, 11141291, 11222666, 11404803, 11359474, 11699991, 11480444, 11725933, 11466791, 11427196, 11532328, 11500652, 11550351, 11558270, 12423626, 11972243, 11721020, 11681425, 11731124, 11810314, 12002555, 11812499, 12456123, 12273986, 12133629, 11967330, 12001191, 12183328, 12082566, 12066728, 12251050, 13486414, 12221559, 12197802, 12287096, 12255420, 12320957, 12408066, 12608226, 19949139, 13109308, 12650006, 12580920, 12881842, 12662295, 12709809, 12775346, 12727832, 15002770, 17291361, 12795554, 12969772, 12861091, 12845253, 14082802, 12982061, 131452486, 24450958, 13825845, 15124561];
CampaignRoutes: [400]s32 = .[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 0, 1, 0, 116, 11, 0, 2];
CampaignReverse: [400]s32 = .[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0];
// campaign-cases:end
libc :: #system_library "libc";
ParseNumber :: (text: *u8) -> s32 #foreign libc "atoi";
@@ -229,6 +229,7 @@ Replay :: (level: s32, portrait: bool, seed: u32, route: []Point) -> bool {
edge += 1
}
replay_reason = 5
replay_apples = game.apples
return false
}
+24
View File
@@ -11,6 +11,8 @@
#import "std/vec"
#import "std/c_string"
Portable :: #import, file "../src/portable.zi";
App :: #import, file "../src/app.zi";
Game :: #import, file "../src/game.zi";
Account :: #import, file "../src/account.zi";
Progress :: #import, file "../src/progress.zi";
using WidgetKind;
@@ -142,6 +144,28 @@ main :: () -> s32 {
Expect(message.succeeded, "shop Back returns inside the game")
Draw()
}
for portrait: 0..1 {
frame.width = ifx portrait == 1 then 390 else 844
frame.height = ifx portrait == 1 then 844 else 390
App.game_portrait = portrait == 1
App.StartLevel(11, 0, 1)
App.game.lives = 5
App.game.score = 120
App.game.mode = Game.MODE_FINISHED
Draw()
Expect(App.game.mode == Game.MODE_READY && App.game.level == 12 &&
App.game.lives == 5 && App.game.score == 120, "hosted next level waits and carries the run")
Expect(Find("Start level") >= 0, "hosted Start level action is available")
App.HandleInput(KeyUp, 100000)
Draw()
Expect(App.game.mode == Game.MODE_READY, "hosted steering cannot skip the preview")
Click("Start level")
Expect(App.game.mode == Game.MODE_PLAYING, "hosted Start level button starts play")
App.game.mode = Game.MODE_READY
message.action = APP_BACK
unused Portable.Main()
Expect(message.succeeded && App.game.mode == Game.MODE_STAGES, "hosted Back leaves the preview inside the game")
}
Expect(Progress.Begin(57, 6, 123456), "connected hosted run saves within host record limits")
Progress.Complete(56)
Progress.loaded = false
+22 -4
View File
@@ -112,6 +112,12 @@ def main():
pointer(480, 530)
assert not (level_directory / "controls.dat").exists(), "the desktop asked for controls"
time.sleep(0.2)
pointer(868, 32) # Volume is immediately left of Pause.
capture("volume-dropdown")
pointer(720, 180) # Lower the real slider.
sound = (level_directory / "sound.dat").read_bytes()
assert len(sound) == 2 and 0 < sound[1] < 100, "Volume slider did not save its gain"
key("Escape") # Dismiss the dropdown without pausing the level.
key("space")
time.sleep(0.15)
capture("level-01")
@@ -281,14 +287,14 @@ def main():
# Each dialog is exercised in a narrow phone portrait and a short
# phone landscape window. The probe is a separate, uninstalled host.
for width, height in ((320, 568), (640, 360)):
for mode, label in ((2, "paused"), (3, "game-over"), (5, "complete")):
for mode, label in ((2, "paused"), (3, "game-over"), (5, "complete"), (11, "ready")):
stop(app)
name = f"{width}x{height}-{label}"
log = OUT / (name + ".log")
if mode == 3:
(level_directory / "run.dat").write_bytes(bytes([0, 3, 0, 0, 0, 0]))
(level_directory / "unlocked.dat").write_bytes(bytes([57]))
env.update(WURM_PROBE_WIDTH=str(width), WURM_PROBE_HEIGHT=str(height), WURM_PROBE_MODE=str(mode))
env.update(WURM_PROBE_WIDTH=str(width), WURM_PROBE_HEIGHT=str(height), WURM_PROBE_MODE=str(mode), WURM_PROBE_LEVEL="12" if mode == 11 else "0")
app = subprocess.Popen([str(ROOT / "build/Apfelwurm-modal-test")], cwd=ROOT, env=env,
stdout=open(log, "wb"), stderr=subprocess.STDOUT, start_new_session=True)
for attempt in range(100):
@@ -313,12 +319,24 @@ def main():
card_height += 56
card_top = (height - card_height) / 2
primary_y = round(card_top + card_height - (152 if mode == 2 else 96))
if mode == 11:
# Start is centered on the playable board, below the HUD.
hud_height = 104 if width < 520 else 72
board_height = min(height - hud_height, width * (4 / 3 if height > width else 3 / 4))
ready_height = 132 if board_height < 180 else 164
primary_y = round((height + hud_height) / 2 + ready_height / 2 - 40)
time.sleep(1.1)
assert "mode=1 lives=" not in log.read_text(), "next level started without consent"
key("Up")
assert "mode=1 lives=" not in log.read_text(), "steering started the level"
assert "mode=11 lives=3 level=12 score=1234" in log.read_text(), "preview is not level 13"
capture(name + "-waiting")
secondary_y = round(card_top + card_height - 36)
assert 24 < primary_y < secondary_y < height - 24, name
# Exercise each primary action and require a real state change.
pointer(width // 2, primary_y)
for attempt in range(30):
if "mode=1" in log.read_text():
if "mode=1 lives=" in log.read_text():
break
time.sleep(.05)
else:
@@ -336,7 +354,7 @@ def main():
time.sleep(.05)
else:
raise AssertionError(name + " Back to title action failed")
print("Private UI local test: all three dialogs fit portrait/landscape; all primary and title actions worked.")
print("Private UI local test: pause, game-over, victory and next-level Start fit portrait/landscape; waiting and steering stay paused, Start and title actions worked.")
for width, height in ((320, 568), (360, 800), (800, 360)):
stop(app)
# A previous-version save unlocks its reached level on relaunch.
+9
View File
@@ -46,6 +46,11 @@ def main():
subprocess.run(['python3', str(kryon / 'scripts/android_scaffold.py'), '--root', str(ROOT),
'--name', 'Apfelwurm', '--package', 'xyz.waozi.wurm', '--activity', 'MainActivity',
'--kryon', str(kryon)], check=True)
# Wurm uses the canonical host, so existing generated projects must also
# receive Kryon's clipboard, keyboard and document-picker integrations.
activity = ROOT / 'droid/app/src/main/java/xyz/waozi/wurm/MainActivity.java'
activity.write_text((kryon / 'templates/droid/droid/app/src/main/java/__PACKAGE_PATH__/__ACTIVITY__.java')
.read_text().replace('__PACKAGE__', 'xyz.waozi.wurm').replace('__ACTIVITY__', 'MainActivity'))
# The install ID may differ while the Java/JNI activity remains the same.
# Apply this to the app's generated scaffold, never to a package checkout.
gradle = ROOT / 'droid/app/build.gradle'
@@ -62,6 +67,10 @@ def main():
text = text.replace(' <application', ' <uses-permission android:name="android.permission.INTERNET" />\n\n <application', 1)
if 'android:icon=' not in text:
text = text.replace(' <application', ' <application\n android:icon="@mipmap/ic_launcher"\n android:roundIcon="@mipmap/ic_launcher"', 1)
text = re.sub(r'\s+android:usesCleartextTraffic="[^"]*"', '', text)
if args.verification:
# The Moto fixture connects only to its private localhost Daochi node.
text = text.replace(' <application', ' <application android:usesCleartextTraffic="true"', 1)
manifest.write_text(text)
install_icon(ROOT)
# The account provider uses the same native cryptography on both ABIs.
+1
View File
@@ -19,5 +19,6 @@ if previous:
raise SystemExit('Release versions cannot decrease')
code = previous['version_code'] + (new > old)
path.write_text(json.dumps(dict(version=version, version_code=code), indent=2) + '\n')
Path('src/version.zi').write_text('// Generated by update_version.sh from CHANGELOG.md.\nAppVersion :: ' + json.dumps(version) + '\n')
print('Apfelwurm release metadata synchronized: ' + version)
PY
+2 -2
View File
@@ -1,4 +1,4 @@
{
"version": "0.2.14",
"version_code": 24
"version": "0.2.15",
"version_code": 25
}
+23 -23
View File
@@ -3,7 +3,7 @@
"packages": [
{
"commit": "dc1cfe389905c63c0bb453727d06d72afc1fa0b0",
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "p7213416dd56f3a5c"},
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "p6cd625beb8a01aab"},
"id": "p00b93f1ddcd2802f",
"name": "Apps",
"ref": "master",
@@ -17,14 +17,6 @@
"ref": "master",
"url": "https://github.com/ziranlang/qrcode.git"
},
{
"commit": "2062597cecba5ce1bf54a20e6d5a2bdda148a06b",
"dependencies": {"daochi_client": "p9972fcdd2d5ba999", "kryon": "p7213416dd56f3a5c", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
"id": "p523d96ecdb68b57a",
"name": "Entity",
"ref": "master",
"url": "https://github.com/waozixyz/entity.git"
},
{
"commit": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
"dependencies": {},
@@ -34,6 +26,14 @@
"source": true,
"url": "https://github.com/raysan5/raylib.git"
},
{
"commit": "5427f011d20ad9a67abd734c6a7985650e9d5bf3",
"dependencies": {"raylib": "p5a77c9c35110e925"},
"id": "p6cd625beb8a01aab",
"name": "kryon",
"ref": "master",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "22d2ddbdc236796953c905a05a2cebf5ab1b4ff3",
"dependencies": {"liboqs": "pecdb097af6ab16f7"},
@@ -42,14 +42,6 @@
"ref": "master",
"url": "https://github.com/ziranlang/oqs.git"
},
{
"commit": "5b2bfb71fef6111fcbaeb0446ba02ab6b0cd8f89",
"dependencies": {"raylib": "p5a77c9c35110e925"},
"id": "p7213416dd56f3a5c",
"name": "kryon",
"ref": "master",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "f5f0a19a5dc6c14a49adb3cd63ea79a60f6ba77b",
"dependencies": {},
@@ -60,12 +52,12 @@
"url": "https://github.com/LoupVaillant/Monocypher.git"
},
{
"commit": "25d9f649c43a8de44a5fea602d2835e33e6ca999",
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
"id": "p9972fcdd2d5ba999",
"name": "DaochiClient",
"commit": "ef7af77d4520ede2ca9db92f86f4f5dbbccc4085",
"dependencies": {"daochi_client": "pc7497174ec9a74a4", "kryon": "p6cd625beb8a01aab", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
"id": "p8fbbbcae634fef4f",
"name": "Entity",
"ref": "master",
"url": "https://github.com/ziranlang/daochi-client.git"
"url": "https://github.com/waozixyz/entity.git"
},
{
"commit": "944826f70779a6b6cd53f6b06a75b36f4d8a2558",
@@ -75,6 +67,14 @@
"ref": "master",
"url": "https://github.com/ziranlang/crypto.git"
},
{
"commit": "f0f56d0ac48858cc14649cf3eff66a109fc0c388",
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
"id": "pc7497174ec9a74a4",
"name": "DaochiClient",
"ref": "master",
"url": "https://github.com/ziranlang/daochi-client.git"
},
{
"commit": "9cc6872f75447c3a24c16764f9829d0f58751cb0",
"dependencies": {},
@@ -94,7 +94,7 @@
}
],
"root": {
"dependencies": {"apps": "p00b93f1ddcd2802f", "entity": "p523d96ecdb68b57a", "kryon": "p7213416dd56f3a5c", "mingcute": "pe1027b9d16704793"},
"dependencies": {"apps": "p00b93f1ddcd2802f", "entity": "p8fbbbcae634fef4f", "kryon": "p6cd625beb8a01aab", "mingcute": "pe1027b9d16704793"},
"name": "Apfelwurm"
},
"toolchain": {