Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af296359a1 | ||
|
|
d3f0a52556 | ||
|
|
30b84c5144 | ||
|
|
06da4cd505 | ||
|
|
2ccacdea5b | ||
|
|
cd565b99e1 | ||
|
|
8c6e7af9fc | ||
|
|
cb36ad8b06 |
No files matched your search
@@ -1,5 +1,23 @@
|
||||
# Changelog
|
||||
|
||||
## [0.2.26] - 2026-10-29
|
||||
|
||||
- The new skins have calmer, plainer bodies.
|
||||
|
||||
## [0.2.25] - 2026-10-29
|
||||
|
||||
- Mint, Berry, Rose, Night owl, Golden apple and Explorer have new hand-painted looks; skins you own stay yours.
|
||||
- Runs in the newest Inner Breeze.
|
||||
|
||||
## [0.2.24] - 2026-10-29
|
||||
|
||||
- Keep the entrance area free of enemies: none start there or wander in, so nothing vanishes when you lose a life.
|
||||
- Restart Profile and Leaderboard by themselves if they stop, or say why instead of showing an empty page.
|
||||
|
||||
## [0.2.23] - 2026-10-29
|
||||
|
||||
- Move a little faster throughout the campaign, with a consistent pace across Meadow.
|
||||
|
||||
## [0.2.22] - 2026-10-28
|
||||
|
||||
- Keep the leaderboard visible when you or a friend uses a special Wurm skin.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 654 KiB |
+1
-1
@@ -5,7 +5,7 @@
|
||||
"kind": "game",
|
||||
"contract_version": 1,
|
||||
"module_api": 2,
|
||||
"host_api": 12,
|
||||
"host_api": 41,
|
||||
"save_schema": 1,
|
||||
"build_defines": ["WURM_PORTABLE"],
|
||||
"prepare_assets": "tools/portable_assets.py",
|
||||
|
||||
+13
-10
@@ -43,6 +43,7 @@
|
||||
Leaderboard :: #import "entity/leaderboard_native";
|
||||
Files :: #import "entity/native_files";
|
||||
File :: #import "std/file";
|
||||
Locale :: #import, file "localization.zi";
|
||||
#import "std/text_buffer"
|
||||
#import "kryon/app_files"
|
||||
#import "kryon/tree_input"
|
||||
@@ -146,18 +147,20 @@
|
||||
}
|
||||
return true
|
||||
}
|
||||
// A Profile that stops starts again by itself; when it cannot, say why
|
||||
// instead of leaving the page blank.
|
||||
DrawProfile :: (session: Session, bounds: Rectangle, key: s32, dark: bool) {
|
||||
if !ready {
|
||||
problem := Entity.EntityHostProblem()
|
||||
if problem == "" { problem = "The profile could not start. Reload the page to try again." }
|
||||
unused Text(session, TextProps.{.key = 29010, .text = problem, .font = 18, .wrap = TextWrap.TextWrapAuto,
|
||||
.align = TextAlign.TextAlignCenter,
|
||||
.bounds = Rectangle.{bounds.x + 24.0, bounds.y + 48.0, bounds.width - 48.0, 120.0}})
|
||||
return
|
||||
if ready {
|
||||
typed: [1024]u8
|
||||
input := TextFieldInputFor(key, KeyboardModifiers(session), TypedTextTake(session, typed[:]))
|
||||
if Entity.EntityHostFrame(session, bounds, key, KeyboardModifiers(session), input, dark) { return }
|
||||
}
|
||||
typed: [1024]u8
|
||||
input := TextFieldInputFor(key, KeyboardModifiers(session), TypedTextTake(session, typed[:]))
|
||||
unused Entity.EntityHostFrame(session, bounds, key, KeyboardModifiers(session), input, dark)
|
||||
problem := Entity.EntityHostProblem()
|
||||
if !ready && problem == "" { problem = "The profile could not start. Reload the page to try again." }
|
||||
if problem == "" { return }
|
||||
unused Text(session, TextProps.{.key = 29010, .text = Locale.Text(problem), .font = 18, .wrap = TextWrap.TextWrapAuto,
|
||||
.align = TextAlign.TextAlignCenter,
|
||||
.bounds = Rectangle.{bounds.x + 24.0, bounds.y + 48.0, bounds.width - 48.0, 120.0}})
|
||||
}
|
||||
Back :: () {
|
||||
if !ready { visible = false; return }
|
||||
|
||||
+27
-59
@@ -47,7 +47,6 @@ StarIcon :: #import "mingcute/mingcute_filled_star";
|
||||
ProfileIcon :: #import "mingcute/mingcute_regular_user_4";
|
||||
DewIcon :: #import "mingcute/mingcute_filled_drop";
|
||||
LockIcon :: #import "mingcute/mingcute_filled_lock";
|
||||
MoonIcon :: #import "mingcute/mingcute_filled_moon";
|
||||
Input :: #import "kryon/input_protocol";
|
||||
#if #defined(WURM_PORTABLE) {
|
||||
Timer :: #import "portable_runtime";
|
||||
@@ -409,20 +408,11 @@ SkinName :: (id: s32) -> string {
|
||||
if id == 8 { return "Winter cheer" }
|
||||
return "Apfelwurm"
|
||||
}
|
||||
SkinColor :: (id: s32) -> Color {
|
||||
if id == 1 { return Color.{94, 192, 151, 255} }
|
||||
if id == 2 { return Color.{154, 119, 207, 255} }
|
||||
if id == 3 { return Color.{221, 133, 151, 255} }
|
||||
if id == 4 { return Color.{107, 139, 199, 255} }
|
||||
if id == 5 { return Color.{227, 185, 80, 255} }
|
||||
if id == 6 { return Color.{135, 173, 91, 255} }
|
||||
return Color.{236, 151, 67, 255}
|
||||
}
|
||||
CharacterPreview :: (session: Session, key: u64, bounds: Rectangle, id: s32) {
|
||||
for segment: 0..2 {
|
||||
special := id == 7 || id == 8
|
||||
size := (ifx special then 27.0 else 21.0) + cast(float32)segment * 4.0
|
||||
x := bounds.x + cast(float32)segment * (ifx special then 12.0 else 16.0)
|
||||
painted := id != 0
|
||||
size := (ifx painted then 27.0 else 21.0) + cast(float32)segment * 4.0
|
||||
x := bounds.x + cast(float32)segment * (ifx painted then 12.0 else 16.0)
|
||||
y := bounds.y + 22.0 - cast(float32)segment * 5.0
|
||||
Character(session, key + cast(u64)segment * 8, Rectangle.{x, y, size, size}, id, false)
|
||||
}
|
||||
@@ -435,58 +425,36 @@ Character :: (session: Session, key: u64, bounds: Rectangle, id: s32, head: bool
|
||||
Rectangle.{cast(float32)column * 16.0, 48.0, 16.0, 16.0}, alpha)
|
||||
return
|
||||
}
|
||||
// Every other skin is painted: a head facing right and a round body
|
||||
// segment. Skins 1-6 share skins.png in 180px cells, one row each; the
|
||||
// two specials keep their own sheet.
|
||||
path := "assets/art/skins.png"
|
||||
source := Rectangle.{ifx head then 0.0 else 180.0, cast(float32)(id - 1) * 180.0, 180.0, 180.0}
|
||||
if id == 7 || id == 8 {
|
||||
column := ifx id == 7 then 0 else 2
|
||||
if !head { column += 1 }
|
||||
crops: [4]Rectangle = .[Rectangle.{47.0, 81.0, 496.0, 627.0}, Rectangle.{543.0, 15.0, 543.0, 709.0},
|
||||
Rectangle.{1086.0, 87.0, 524.0, 617.0}, Rectangle.{1638.0, 6.0, 498.0, 718.0}]
|
||||
source := crops[column]
|
||||
height := bounds.height
|
||||
width := height * source.width / source.height
|
||||
if width > bounds.width { width = bounds.width; height = width * source.height / source.width }
|
||||
cx := bounds.x + bounds.width / 2.0
|
||||
cy := bounds.y + bounds.height / 2.0
|
||||
corners: [4]Vector2
|
||||
for corner: 0..3 {
|
||||
dx := (ifx corner % 2 == 0 then -width else width) / 2.0
|
||||
dy := (ifx corner < 2 then -height else height) / 2.0
|
||||
if head && direction == 0 { dx = -dx; dy = -dy }
|
||||
else if head && direction == 1 { previous := dx; dx = dy; dy = -previous }
|
||||
else if head && direction == 3 { previous := dx; dx = -dy; dy = previous }
|
||||
corners[corner] = Vector2.{cx + dx, cy + dy}
|
||||
}
|
||||
unused Image(session, ImageProps.{.key = key, .asset_path = "assets/art/special-skins.png",
|
||||
.bounds = bounds, .source = source, .mesh = ImageMesh.{2, 2, corners[:]},
|
||||
.tint = cast(u32)0xffffff00 | cast(u32)alpha, .smooth = true, .alt_text = Locale.Text(SkinName(id))})
|
||||
return
|
||||
path = "assets/art/special-skins.png"
|
||||
source = crops[column]
|
||||
}
|
||||
size := bounds.width
|
||||
if bounds.height < size { size = bounds.height }
|
||||
color := SkinColor(id)
|
||||
color.a = alpha
|
||||
unused Box(session, BoxProps.{.key = key, .bounds = bounds, .fill = color, .radius = size / 2.0,
|
||||
.border = Color.{30, 48, 35, cast(u8)(cast(s32)alpha * 100 / 255)}})
|
||||
if !head { return }
|
||||
dx: float32 = ifx direction == 0 then -1.0 else ifx direction == 2 then 1.0 else 0.0
|
||||
dy: float32 = ifx direction == 1 then -1.0 else ifx direction == 3 then 1.0 else 0.0
|
||||
cx := bounds.x + bounds.width / 2.0 + dx * size * 0.14
|
||||
cy := bounds.y + bounds.height / 2.0 + dy * size * 0.14
|
||||
eye := size * 0.18
|
||||
for side: 0..1 {
|
||||
sign: float32 = ifx side == 0 then -1.0 else 1.0
|
||||
x := cx - dy * size * 0.2 * sign - eye / 2.0
|
||||
y := cy + dx * size * 0.2 * sign - eye / 2.0
|
||||
unused Box(session, BoxProps.{.key = key + 1 + cast(u64)side, .bounds = Rectangle.{x, y, eye, eye},
|
||||
.fill = Color.{246, 244, 223, alpha}, .radius = eye / 2.0})
|
||||
unused Box(session, BoxProps.{.key = key + 3 + cast(u64)side,
|
||||
.bounds = Rectangle.{x + eye * 0.3, y + eye * 0.3, eye * 0.5, eye * 0.5},
|
||||
.fill = Color.{28, 44, 35, alpha}, .radius = eye / 2.0})
|
||||
}
|
||||
if id >= 4 {
|
||||
shape := ifx id == 4 then MoonIcon.Shape else ifx id == 5 then StarIcon.Shape else "S2rr:M3 19L9 5L15 15L18 10L22 19Z"
|
||||
SvgIcon(session, SvgIconProps.{.bounds = Rectangle.{bounds.x + size * 0.3, bounds.y - size * 0.18, size * 0.4, size * 0.4},
|
||||
.shape = shape, .color = Color.{249, 229, 157, alpha}})
|
||||
height := bounds.height
|
||||
width := height * source.width / source.height
|
||||
if width > bounds.width { width = bounds.width; height = width * source.height / source.width }
|
||||
cx := bounds.x + bounds.width / 2.0
|
||||
cy := bounds.y + bounds.height / 2.0
|
||||
corners: [4]Vector2
|
||||
for corner: 0..3 {
|
||||
dx := (ifx corner % 2 == 0 then -width else width) / 2.0
|
||||
dy := (ifx corner < 2 then -height else height) / 2.0
|
||||
if head && direction == 0 { dx = -dx; dy = -dy }
|
||||
else if head && direction == 1 { previous := dx; dx = dy; dy = -previous }
|
||||
else if head && direction == 3 { previous := dx; dx = -dy; dy = previous }
|
||||
corners[corner] = Vector2.{cx + dx, cy + dy}
|
||||
}
|
||||
unused Image(session, ImageProps.{.key = key, .asset_path = path,
|
||||
.bounds = bounds, .source = source, .mesh = ImageMesh.{2, 2, corners[:]},
|
||||
.tint = cast(u32)0xffffff00 | cast(u32)alpha, .smooth = true, .alt_text = Locale.Text(SkinName(id))})
|
||||
}
|
||||
shop_scroll: s32;
|
||||
buy_skin: s32;
|
||||
@@ -898,7 +866,7 @@ DrawBoard :: (session: Session, stage: Rectangle) {
|
||||
// tail first leaves the larger face cleanly above the neck.
|
||||
fade: float32 = ifx game.death_ticks > 0 then cast(float32)game.death_ticks / 20.0 else 1.0
|
||||
alpha := cast(u8)(255.0 * fade * fade * (3.0 - 2.0 * fade))
|
||||
draw_step: s32 = ifx Wardrobe.skin == 7 || Wardrobe.skin == 8 then 2 else WORM_DRAW_STEP
|
||||
draw_step: s32 = ifx Wardrobe.skin != 0 then 2 else WORM_DRAW_STEP
|
||||
index := game.length - 1
|
||||
while index > 0 {
|
||||
column := 4
|
||||
|
||||
@@ -16,13 +16,11 @@
|
||||
File :: #import "std/file_linux";
|
||||
}
|
||||
Originals :: #import, file "original_levels.zi";
|
||||
#import "std/c_string"
|
||||
#import "std/number_text"
|
||||
#import "std/text_buffer"
|
||||
|
||||
#if !#defined(WURM_PORTABLE) {
|
||||
libc :: #system_library "libc";
|
||||
GetEnvironment :: (name: *u8) -> *u8 #foreign libc "getenv";
|
||||
#import "std/environment_linux"
|
||||
}
|
||||
|
||||
LEVEL_FILE_BYTES :: 1201;
|
||||
@@ -72,12 +70,10 @@ CustomSetRoot :: (path: string) -> bool {
|
||||
|
||||
ApplyEnvironmentRoot :: () {
|
||||
#if !#defined(WURM_PORTABLE) {
|
||||
name: [32]u8
|
||||
if !CopyCString("WURM_LEVEL_DIR", name[:]) { return }
|
||||
value := GetEnvironment(*name[0])
|
||||
if value == null { return }
|
||||
value := EnvironmentText("WURM_LEVEL_DIR")
|
||||
if value == "" { return }
|
||||
length: s32 = 0
|
||||
while value[length] != 0 && length < custom_root.count - 1 {
|
||||
while length < value.count && length < custom_root.count - 1 {
|
||||
custom_root[length] = value[length]
|
||||
length += 1
|
||||
}
|
||||
|
||||
+23
-118
@@ -1,134 +1,39 @@
|
||||
// The desktop entry. Kryon's default host opens a fixed 960x600 window;
|
||||
// this one sizes the window from WURM_WINDOW=WxH (default 1280x760) so the
|
||||
// mobile-first layout can be checked in landscape and portrait. The frame
|
||||
// loop mirrors the default host: poll, feed the session, draw one frame.
|
||||
#import "std/c_string"
|
||||
#import "kryon/Desktop"
|
||||
#import "kryon/session"
|
||||
#import "kryon/tree"
|
||||
#import "kryon/tree_input"
|
||||
#import "kryon/Frame"
|
||||
#import "kryon/TestDriver"
|
||||
File :: #import "std/file_linux";
|
||||
// The desktop entry. It runs Kryon's desktop loop in a 1280x760 window, or
|
||||
// the size WURM_WINDOW=WxH gives, so the mobile-first layout can be checked
|
||||
// in landscape and portrait.
|
||||
#import "kryon/desktop_loop"
|
||||
#import "std/environment_linux"
|
||||
#import "std/number_text"
|
||||
App :: #import "app";
|
||||
|
||||
libc :: #system_library "libc";
|
||||
GetEnvironment :: (name: *u8) -> *u8 #foreign libc "getenv";
|
||||
ParseNumber :: (text: *u8) -> s32 #foreign libc "atoi";
|
||||
ChangeDirectory :: (path: *u8) -> s32 #foreign libc "chdir";
|
||||
ReadExecutableLink :: (path: *u8, output: *u8, capacity: u64) -> s64 #foreign libc "readlink";
|
||||
|
||||
// A direct desktop launch starts beside the executable in build/. Resolve
|
||||
// its asset root before any image, sound or saved level is opened.
|
||||
FindAssets :: () -> bool {
|
||||
if File.PathExists("assets/art/title.png") { return true }
|
||||
link: [32]u8
|
||||
path: [4096]u8
|
||||
if !CopyCString("/proc/self/exe", link[:]) { return false }
|
||||
count := ReadExecutableLink(*link[0], *path[0], 4095)
|
||||
if count <= 0 { return false }
|
||||
index := cast(s32)count - 1
|
||||
while index > 0 && path[index] != #char "/" { index -= 1 }
|
||||
if index <= 0 { return false }
|
||||
path[index] = 0
|
||||
if ChangeDirectory(*path[0]) != 0 { return false }
|
||||
if File.PathExists("assets/art/title.png") { return true }
|
||||
for parent: 0..2 {
|
||||
if !CopyCString("..", link[:]) || ChangeDirectory(*link[0]) != 0 { return false }
|
||||
if File.PathExists("assets/art/title.png") { return true }
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
window_width: s32;
|
||||
window_height: s32;
|
||||
|
||||
WindowSize :: () {
|
||||
window_width = 1280
|
||||
window_height = 760
|
||||
name: [32]u8
|
||||
if !CopyCString("WURM_WINDOW", name[:]) { return }
|
||||
value := GetEnvironment(*name[0])
|
||||
if value == null { return }
|
||||
width := ParseNumber(value)
|
||||
if width < 240 { return }
|
||||
index: s32 = 0
|
||||
while value[index] != 0 && value[index] != 120 && index < 15 { index += 1 }
|
||||
if value[index] != 120 { return }
|
||||
height := ParseNumber(*value[index + 1])
|
||||
if height < 240 { return }
|
||||
window_width = width
|
||||
window_height = height
|
||||
// The window size WURM_WINDOW asks for, when both sides are at least 240.
|
||||
WindowSize :: () -> (width: s32, height: s32) {
|
||||
text := EnvironmentText("WURM_WINDOW")
|
||||
width, count := IntegerPrefix(text)
|
||||
if count == 0 || width < 240 || count >= cast(s64)text.count || text[count] != #char "x" { return 1280, 760 }
|
||||
height, digits := IntegerPrefix(text[count + 1:text.count])
|
||||
if digits == 0 || height < 240 { return 1280, 760 }
|
||||
return cast(s32)width, cast(s32)height
|
||||
}
|
||||
|
||||
// WURM_START=editor opens straight into the level editor, optionally at
|
||||
// WURM_LEVEL=n (1-based), instead of the stage screen.
|
||||
StartScreen :: () {
|
||||
name: [32]u8
|
||||
if !CopyCString("WURM_START", name[:]) { return }
|
||||
value := GetEnvironment(*name[0])
|
||||
if value == null { return }
|
||||
editor: bool
|
||||
for index: 0..5 {
|
||||
editor = value[index] == #char "e" || value[index] == #char "E"
|
||||
if editor { break }
|
||||
}
|
||||
if !editor { return }
|
||||
level: s32 = 0
|
||||
if CopyCString("WURM_LEVEL", name[:]) {
|
||||
number := GetEnvironment(*name[0])
|
||||
if number != null && ParseNumber(number) > 1 { level = ParseNumber(number) - 1 }
|
||||
}
|
||||
App.EditorAtStartup(level)
|
||||
}
|
||||
|
||||
DrawFrame :: (session: Session) -> bool {
|
||||
BeginDesktopFrame()
|
||||
viewport := DesktopViewport()
|
||||
pointer := TestDriverPointer(session, PollPointer())
|
||||
TreePointerUpdate(session, pointer)
|
||||
TreeSecondaryPointerUpdate(session, PollSecondaryPointer())
|
||||
wheel := TestDriverWheel(DesktopWheelMove())
|
||||
PointerWheelSend(session, pointer.x, pointer.y, wheel)
|
||||
if cast(s32)BeginFrame(session, 1, viewport) != 0 { return false }
|
||||
if App.Frame(session, viewport) != 0 {
|
||||
TreeCancel(session)
|
||||
return false
|
||||
}
|
||||
if cast(s32)EndFrame(session) != 0 { return false }
|
||||
TestDriverFrame(session)
|
||||
unused DesktopCursor(session)
|
||||
return EndDesktopFrame()
|
||||
start := EnvironmentText("WURM_START")
|
||||
if start.count == 0 || (start[0] != #char "e" && start[0] != #char "E") { return }
|
||||
level := EnvironmentNumber("WURM_LEVEL", 1) - 1
|
||||
if level < 0 { level = 0 }
|
||||
App.EditorAtStartup(cast(s32)level)
|
||||
}
|
||||
|
||||
#program_export
|
||||
main :: () -> s32 {
|
||||
if !FindAssets() {
|
||||
// A direct launch starts beside the executable in build/.
|
||||
if !DesktopStartBeside("assets/art/title.png") {
|
||||
print("Apfelwurm could not find assets/art/title.png beside the game or its parent directory.\n")
|
||||
return 1
|
||||
}
|
||||
WindowSize()
|
||||
if !OpenDesktopSized(window_width, window_height) {
|
||||
CloseDesktop()
|
||||
return 1
|
||||
}
|
||||
defer { CloseDesktop() }
|
||||
session := SessionOpen()
|
||||
if !SessionValid(session) { return 1 }
|
||||
defer { CloseSession(session) }
|
||||
StartScreen()
|
||||
ok := true
|
||||
while ok && PollDesktop() {
|
||||
KeyboardModifiersSend(session, DesktopModifiers())
|
||||
key := DesktopPressedKey()
|
||||
if key != 0 { KeyboardSend(session, key) }
|
||||
codepoint := DesktopTypedCodepoint()
|
||||
while codepoint != 0 {
|
||||
TypedCodepointSend(session, codepoint)
|
||||
codepoint = DesktopTypedCodepoint()
|
||||
}
|
||||
ok = DrawFrame(session)
|
||||
if ok { PauseDesktop() }
|
||||
}
|
||||
return ifx ok then 0 else 1
|
||||
width, height := WindowSize()
|
||||
return RunDesktop(width, height)
|
||||
}
|
||||
+15
-9
@@ -46,8 +46,9 @@ BaseTickInterval :: (level: s32) -> s64 {
|
||||
return cast(s64)interval
|
||||
}
|
||||
TickInterval :: (level: s32) -> s64 {
|
||||
if level < 40 { return 48 }
|
||||
return (BaseTickInterval(level) * 9 + 4) / 8
|
||||
// A small pace increase keeps Meadow steady and the scoring curve intact.
|
||||
interval := ifx level < 40 then 48 else (BaseTickInterval(level) * 9 + 4) / 8
|
||||
return (interval * 9 + 5) / 10
|
||||
}
|
||||
|
||||
Point :: struct { x: s32; y: s32; }
|
||||
@@ -182,6 +183,14 @@ StartClearance :: (x: s32, y: s32) -> bool {
|
||||
y >= board_rows - 1 - START_CLEAR_ROWS && y < board_rows - 1
|
||||
}
|
||||
|
||||
// The entrance area belongs to the worm: no enemy starts there or ever
|
||||
// enters it. It spans the clear approach plus the few cells a chaser covers
|
||||
// while the head comes in, so no life begins beside a creature.
|
||||
EnemyFreeZone :: (position: Point) -> bool {
|
||||
return Abs(position.x / 16 - board_columns / 2) <= START_CLEAR_HALF_WIDTH + 3 &&
|
||||
position.y / 16 >= board_rows - 1 - START_CLEAR_ROWS - 3
|
||||
}
|
||||
|
||||
ClearStart :: (game: *Game) {
|
||||
half := board_columns / 2
|
||||
for y: board_rows - 1 - START_CLEAR_ROWS..board_rows - 2 {
|
||||
@@ -191,15 +200,12 @@ ClearStart :: (game: *Game) {
|
||||
game.objects[at] = 0
|
||||
}
|
||||
}
|
||||
// A nearby chaser can cover several cells while the head enters. Keep
|
||||
// that approach clear too, including on a later life, rather than
|
||||
// requiring an immediate reversal to escape a creature at the gate.
|
||||
// Enemies placed in the entrance area never appear; once play starts
|
||||
// none can walk in, so a lost life removes nothing.
|
||||
kept: s32 = 0
|
||||
for index: 0..game.monster_count - 1 {
|
||||
monster := game.monsters[index]
|
||||
near_start := Abs(monster.position.x / 16 - half) <= START_CLEAR_HALF_WIDTH + 3 &&
|
||||
monster.position.y / 16 >= board_rows - 1 - START_CLEAR_ROWS - 3
|
||||
if !near_start {
|
||||
if !EnemyFreeZone(monster.position) {
|
||||
game.monsters[kept] = monster
|
||||
kept += 1
|
||||
}
|
||||
@@ -915,7 +921,7 @@ LevelBlockages :: (board: []u8) -> s32 {
|
||||
return result
|
||||
}
|
||||
MonsterBlocked :: (game: *Game, index: s32, position: Point) -> bool {
|
||||
if WallAt(game, position) || WormNear(game, position, 0, 10) { return true }
|
||||
if WallAt(game, position) || WormNear(game, position, 0, 10) || EnemyFreeZone(position) { return true }
|
||||
for other: 0..game.monster_count - 1 {
|
||||
if other != index && Near(position, game.monsters[other].position, 8) { return true }
|
||||
}
|
||||
|
||||
@@ -162,3 +162,6 @@ Předchozí úroveň
|
||||
---
|
||||
[wurm_editor_next_level]
|
||||
Další úroveň
|
||||
---
|
||||
[wurm_profile_stopped]
|
||||
Profil přestal fungovat. Zavři ho a otevři znovu.
|
||||
@@ -162,3 +162,6 @@ Vorheriges Level
|
||||
---
|
||||
[wurm_editor_next_level]
|
||||
Nächstes Level
|
||||
---
|
||||
[wurm_profile_stopped]
|
||||
Das Profil funktioniert nicht mehr. Schließe es und öffne es erneut.
|
||||
@@ -162,3 +162,6 @@ Previous level
|
||||
---
|
||||
[wurm_editor_next_level]
|
||||
Next level
|
||||
---
|
||||
[wurm_profile_stopped]
|
||||
The profile stopped working. Close it and open it again.
|
||||
@@ -162,3 +162,6 @@ Nivel anterior
|
||||
---
|
||||
[wurm_editor_next_level]
|
||||
Nivel siguiente
|
||||
---
|
||||
[wurm_profile_stopped]
|
||||
El perfil dejó de funcionar. Ciérralo y vuelve a abrirlo.
|
||||
@@ -162,3 +162,6 @@ Niveau précédent
|
||||
---
|
||||
[wurm_editor_next_level]
|
||||
Niveau suivant
|
||||
---
|
||||
[wurm_profile_stopped]
|
||||
Le profil a cessé de fonctionner. Fermez-le et rouvrez-le.
|
||||
@@ -162,3 +162,6 @@ Level sebelumnya
|
||||
---
|
||||
[wurm_editor_next_level]
|
||||
Level berikutnya
|
||||
---
|
||||
[wurm_profile_stopped]
|
||||
Profil berhenti berfungsi. Tutup lalu buka lagi.
|
||||
@@ -162,3 +162,6 @@ Livello precedente
|
||||
---
|
||||
[wurm_editor_next_level]
|
||||
Livello successivo
|
||||
---
|
||||
[wurm_profile_stopped]
|
||||
Il profilo ha smesso di funzionare. Chiudilo e riaprilo.
|
||||
@@ -162,3 +162,6 @@ waozi.xyzを訪問
|
||||
---
|
||||
[wurm_editor_next_level]
|
||||
次のレベル
|
||||
---
|
||||
[wurm_profile_stopped]
|
||||
プロフィールが動作を停止しました。閉じてからもう一度開いてください。
|
||||
@@ -162,3 +162,6 @@ waozi.xyz 방문
|
||||
---
|
||||
[wurm_editor_next_level]
|
||||
다음 레벨
|
||||
---
|
||||
[wurm_profile_stopped]
|
||||
프로필이 작동을 멈췄습니다. 닫았다가 다시 열어 주세요.
|
||||
@@ -162,3 +162,6 @@ Nível anterior
|
||||
---
|
||||
[wurm_editor_next_level]
|
||||
Nível seguinte
|
||||
---
|
||||
[wurm_profile_stopped]
|
||||
O perfil parou de funcionar. Feche-o e abra-o novamente.
|
||||
@@ -162,3 +162,6 @@
|
||||
---
|
||||
[wurm_editor_next_level]
|
||||
Следующий уровень
|
||||
---
|
||||
[wurm_profile_stopped]
|
||||
Профиль перестал работать. Закройте его и откройте снова.
|
||||
@@ -162,3 +162,6 @@
|
||||
---
|
||||
[wurm_editor_next_level]
|
||||
下一关
|
||||
---
|
||||
[wurm_profile_stopped]
|
||||
个人资料已停止运行。请关闭后重新打开。
|
||||
+14
-8
@@ -3,10 +3,7 @@
|
||||
#if #defined(PLATFORM_WEB) {
|
||||
#import "std/web"
|
||||
} else #if !#defined(WURM_PORTABLE) {
|
||||
#import "std/c_string"
|
||||
#import "std/byte_text_linux"
|
||||
libc :: #system_library "libc";
|
||||
LocaleEnvironment :: (name: *u8) -> *u8 #foreign libc "getenv";
|
||||
#import "std/environment_linux"
|
||||
}
|
||||
language: [3]u8;
|
||||
ready: bool;
|
||||
@@ -25,10 +22,8 @@ Detect :: () {
|
||||
SetLanguage(TextUntilNul(bytes[:]))
|
||||
WebEnd(scope)
|
||||
} else #if !#defined(WURM_PORTABLE) {
|
||||
key: [16]u8
|
||||
unused CopyCString("LANG", key[:])
|
||||
value := LocaleEnvironment(*key[0])
|
||||
if value != null { SetLanguage(TextFromCString(value)) }
|
||||
value := EnvironmentText("LANG")
|
||||
if value != "" { SetLanguage(value) }
|
||||
}
|
||||
}
|
||||
Text :: (source: string) -> string {
|
||||
@@ -87,6 +82,7 @@ Text :: (source: string) -> string {
|
||||
if source == "Matching rings teleport you." { return "Stejné kruhy vás přenesou." }
|
||||
if source == "Previous level" { return "Předchozí úroveň" }
|
||||
if source == "Next level" { return "Další úroveň" }
|
||||
if source == "The profile stopped working. Close it and open it again." { return "Profil přestal fungovat. Zavři ho a otevři znovu." }
|
||||
}
|
||||
if locale == "de" {
|
||||
if source == "Back" { return "Zurück" }
|
||||
@@ -139,6 +135,7 @@ Text :: (source: string) -> string {
|
||||
if source == "Matching rings teleport you." { return "Gleiche Ringe teleportieren dich." }
|
||||
if source == "Previous level" { return "Vorheriges Level" }
|
||||
if source == "Next level" { return "Nächstes Level" }
|
||||
if source == "The profile stopped working. Close it and open it again." { return "Das Profil funktioniert nicht mehr. Schließe es und öffne es erneut." }
|
||||
}
|
||||
if locale == "es" {
|
||||
if source == "Back" { return "Atrás" }
|
||||
@@ -193,6 +190,7 @@ Text :: (source: string) -> string {
|
||||
if source == "Matching rings teleport you." { return "Los anillos iguales te teletransportan." }
|
||||
if source == "Previous level" { return "Nivel anterior" }
|
||||
if source == "Next level" { return "Nivel siguiente" }
|
||||
if source == "The profile stopped working. Close it and open it again." { return "El perfil dejó de funcionar. Ciérralo y vuelve a abrirlo." }
|
||||
}
|
||||
if locale == "fr" {
|
||||
if source == "Back" { return "Retour" }
|
||||
@@ -244,6 +242,7 @@ Text :: (source: string) -> string {
|
||||
if source == "Matching rings teleport you." { return "Les anneaux identiques vous téléportent." }
|
||||
if source == "Previous level" { return "Niveau précédent" }
|
||||
if source == "Next level" { return "Niveau suivant" }
|
||||
if source == "The profile stopped working. Close it and open it again." { return "Le profil a cessé de fonctionner. Fermez-le et rouvrez-le." }
|
||||
}
|
||||
if locale == "id" {
|
||||
if source == "Back" { return "Kembali" }
|
||||
@@ -295,6 +294,7 @@ Text :: (source: string) -> string {
|
||||
if source == "Matching rings teleport you." { return "Cincin yang sama memindahkanmu." }
|
||||
if source == "Previous level" { return "Level sebelumnya" }
|
||||
if source == "Next level" { return "Level berikutnya" }
|
||||
if source == "The profile stopped working. Close it and open it again." { return "Profil berhenti berfungsi. Tutup lalu buka lagi." }
|
||||
}
|
||||
if locale == "it" {
|
||||
if source == "Back" { return "Indietro" }
|
||||
@@ -348,6 +348,7 @@ Text :: (source: string) -> string {
|
||||
if source == "Matching rings teleport you." { return "Gli anelli uguali ti teletrasportano." }
|
||||
if source == "Previous level" { return "Livello precedente" }
|
||||
if source == "Next level" { return "Livello successivo" }
|
||||
if source == "The profile stopped working. Close it and open it again." { return "Il profilo ha smesso di funzionare. Chiudilo e riaprilo." }
|
||||
}
|
||||
if locale == "ja" {
|
||||
if source == "Back" { return "戻る" }
|
||||
@@ -402,6 +403,7 @@ Text :: (source: string) -> string {
|
||||
if source == "Matching rings teleport you." { return "同じ輪に入るとワープします。" }
|
||||
if source == "Previous level" { return "前のレベル" }
|
||||
if source == "Next level" { return "次のレベル" }
|
||||
if source == "The profile stopped working. Close it and open it again." { return "プロフィールが動作を停止しました。閉じてからもう一度開いてください。" }
|
||||
}
|
||||
if locale == "ko" {
|
||||
if source == "Back" { return "뒤로" }
|
||||
@@ -456,6 +458,7 @@ Text :: (source: string) -> string {
|
||||
if source == "Matching rings teleport you." { return "같은 고리를 통해 순간 이동해요." }
|
||||
if source == "Previous level" { return "이전 레벨" }
|
||||
if source == "Next level" { return "다음 레벨" }
|
||||
if source == "The profile stopped working. Close it and open it again." { return "프로필이 작동을 멈췄습니다. 닫았다가 다시 열어 주세요." }
|
||||
}
|
||||
if locale == "pt" {
|
||||
if source == "Back" { return "Voltar" }
|
||||
@@ -509,6 +512,7 @@ Text :: (source: string) -> string {
|
||||
if source == "Matching rings teleport you." { return "Anéis iguais teletransportam você." }
|
||||
if source == "Previous level" { return "Nível anterior" }
|
||||
if source == "Next level" { return "Nível seguinte" }
|
||||
if source == "The profile stopped working. Close it and open it again." { return "O perfil parou de funcionar. Feche-o e abra-o novamente." }
|
||||
}
|
||||
if locale == "ru" {
|
||||
if source == "Back" { return "Назад" }
|
||||
@@ -563,6 +567,7 @@ Text :: (source: string) -> string {
|
||||
if source == "Matching rings teleport you." { return "Одинаковые кольца телепортируют вас." }
|
||||
if source == "Previous level" { return "Предыдущий уровень" }
|
||||
if source == "Next level" { return "Следующий уровень" }
|
||||
if source == "The profile stopped working. Close it and open it again." { return "Профиль перестал работать. Закройте его и откройте снова." }
|
||||
}
|
||||
if locale == "zh" {
|
||||
if source == "Back" { return "返回" }
|
||||
@@ -617,6 +622,7 @@ Text :: (source: string) -> string {
|
||||
if source == "Matching rings teleport you." { return "相同的圆环可以传送你。" }
|
||||
if source == "Previous level" { return "上一关" }
|
||||
if source == "Next level" { return "下一关" }
|
||||
if source == "The profile stopped working. Close it and open it again." { return "个人资料已停止运行。请关闭后重新打开。" }
|
||||
}
|
||||
return source
|
||||
}
|
||||
@@ -5,7 +5,6 @@ using UI :: #import "kryon/Widgets";
|
||||
#import "kryon/tree"
|
||||
#import "kryon/tree_input"
|
||||
#import "kryon/Frame"
|
||||
#import "std/c_string"
|
||||
Timer :: #import "std/timer_linux";
|
||||
App :: #import "app";
|
||||
Progress :: #import, file "progress.zi";
|
||||
@@ -13,16 +12,12 @@ Controls :: #import, file "controls.zi";
|
||||
Wardrobe :: #import, file "wardrobe.zi";
|
||||
Input :: #import "kryon/input_protocol";
|
||||
#import, file "game.zi";
|
||||
#import "std/environment_linux"
|
||||
libc :: #system_library "libc";
|
||||
GetEnvironment :: (name: *u8) -> *u8 #foreign libc "getenv";
|
||||
ParseNumber :: (text: *u8) -> s32 #foreign libc "atoi";
|
||||
Flush :: (stream: *void) -> s32 #foreign libc "fflush";
|
||||
|
||||
Number :: (name: string, fallback: s32) -> s32 {
|
||||
buffer: [64]u8
|
||||
if !CopyCString(name, buffer[:]) { return fallback }
|
||||
value := GetEnvironment(*buffer[0])
|
||||
return ifx value == null then fallback else ParseNumber(value)
|
||||
return cast(s32)EnvironmentNumber(name, fallback)
|
||||
}
|
||||
|
||||
ProbeFrame :: (session: Session) -> bool {
|
||||
|
||||
+14
-19
@@ -1,30 +1,25 @@
|
||||
#import "apps/node_types"
|
||||
#import "apps/node_app"
|
||||
#import "kryon/geometry"
|
||||
App :: #import, file "app.zi";
|
||||
Runtime :: #import "portable_runtime";
|
||||
Locale :: #import, file "localization.zi";
|
||||
host_api :: #system_library "host_api";
|
||||
ReadAppHost :: () -> AppMessage #foreign host_api;
|
||||
WriteAppHost :: (message: AppMessage) #foreign host_api;
|
||||
ReadAppUiHost :: () -> AppUiFrame #foreign host_api;
|
||||
|
||||
#program_export
|
||||
Main :: () -> s32 {
|
||||
message := ReadAppHost()
|
||||
Main :: () -> s32 { return RunNodeApp(WurmFrame, WurmBack) }
|
||||
|
||||
WurmFrame :: (message: AppMessage) -> bool {
|
||||
Locale.SetLanguage(message.locale)
|
||||
if message.abi != MODULE_ABI { return -1 }
|
||||
if message.action == MODULE_IDENTIFY { return MODULE_NODE_APP }
|
||||
message.succeeded = message.action == APP_ROUTE
|
||||
if message.action == APP_FRAME {
|
||||
frame := ReadAppUiHost()
|
||||
Runtime.FrameTime(frame.now)
|
||||
area := Rectangle.{0.0, cast(float32)frame.top, cast(float32)frame.width,
|
||||
cast(float32)(frame.height - frame.top - frame.bottom)}
|
||||
message.succeeded = App.Frame(frame.session, area) == 0
|
||||
}
|
||||
if message.action == APP_BACK {
|
||||
message.succeeded = App.NavigateBack(Runtime.MonotonicMilliseconds())
|
||||
}
|
||||
WriteAppHost(message)
|
||||
return 0
|
||||
frame := ReadAppUiHost()
|
||||
Runtime.FrameTime(frame.now)
|
||||
area := Rectangle.{0.0, cast(float32)frame.top, cast(float32)frame.width,
|
||||
cast(float32)(frame.height - frame.top - frame.bottom)}
|
||||
return App.Frame(frame.session, area) == 0
|
||||
}
|
||||
|
||||
WurmBack :: (message: AppMessage) -> bool {
|
||||
Locale.SetLanguage(message.locale)
|
||||
return App.NavigateBack(Runtime.MonotonicMilliseconds())
|
||||
}
|
||||
+2
-7
@@ -205,13 +205,10 @@ Pump :: (now: s64) -> bool {
|
||||
Report()
|
||||
if current[0] == 0 { return changed }
|
||||
reply := Account.Service("entity.records", "{\"operation\":\"get\",\"kind\":\"game-progress\",\"game\":\"wurm\"}")
|
||||
at := FieldAt(reply, 0, "document")
|
||||
end := ValueEnd(reply, at, 0)
|
||||
record: Shared.GameProgressRecord
|
||||
unused CopyCString("wurm", record.game[:])
|
||||
record.unlocked = 1
|
||||
if at >= 0 && end > at && Shared.GameProgressRead(reply[at:end], *record) &&
|
||||
TextUntilNul(record.game[:]) == "wurm" {
|
||||
if Shared.GameProgressReply(reply, *record) && TextUntilNul(record.game[:]) == "wurm" {
|
||||
if record.unlocked - 1 > unlocked && record.unlocked <= LEVELS { unlocked = record.unlocked - 1; unused SaveUnlocked() }
|
||||
for index: 0..199 {
|
||||
if record.completed[index] == #char "1" { completed[index] = 1 }
|
||||
@@ -233,9 +230,7 @@ Pump :: (now: s64) -> bool {
|
||||
record.completed[200] = 0
|
||||
if record.unlocked > LEVELS { record.unlocked = LEVELS }
|
||||
out: Vec(u8)
|
||||
BuilderPrint(*out, "{\"operation\":\"put\",\"kind\":\"game-progress\",\"schema\":\"entity.game-progress.v1\",\"document\":")
|
||||
Shared.GameProgressWrite(*record, *out)
|
||||
BuilderPrint(*out, "}")
|
||||
Shared.GameProgressPutRequest(*record, *out)
|
||||
saved := Account.Service("entity.records", TextView(VecSlice(out, 0, out.count)))
|
||||
bytes: [16]u8
|
||||
dirty = ReadStringText(saved, FieldAt(saved, 0, "status"), bytes[:]) < 0 || TextUntilNul(bytes[:]) != "done"
|
||||
|
||||
+12
-25
@@ -10,10 +10,7 @@ App :: #import "app";
|
||||
Game :: #import, file "game.zi";
|
||||
File :: #import "std/file_linux";
|
||||
using Vectors :: #import "std/vec";
|
||||
#import "std/c_string";
|
||||
libc :: #system_library "libc";
|
||||
GetEnvironment :: (name: *u8) -> *u8 #foreign libc "getenv";
|
||||
ParseNumber :: (text: *u8) -> s32 #foreign libc "atoi";
|
||||
#import "std/environment_linux"
|
||||
|
||||
U32 :: (bytes: []u8, at: s32) -> u32 {
|
||||
return cast(u32)bytes[at] | (cast(u32)bytes[at + 1] << 8) |
|
||||
@@ -85,46 +82,36 @@ main :: () -> s32 {
|
||||
!PixmapSetImage(8, "assets/art/title-portrait.png", title_portrait_w, title_portrait_h, VecSlice(title_portrait, 0, title_portrait.count)) ||
|
||||
!PixmapSetImage(9, "assets/art/forest-canopy.png", forest_canopy_w, forest_canopy_h, VecSlice(forest_canopy, 0, forest_canopy.count)) ||
|
||||
!PixmapSetImage(10, "assets/art/forest-canopy-portrait.png", forest_canopy_portrait_w, forest_canopy_portrait_h, VecSlice(forest_canopy_portrait, 0, forest_canopy_portrait.count)) { return 1 }
|
||||
name: [32]u8
|
||||
unused CopyCString("WORM_SHOT_LEVEL", name[:])
|
||||
level := GetEnvironment(*name[0])
|
||||
if level != null {
|
||||
Game.StartGame(*App.game, ParseNumber(level) - 1, 0)
|
||||
level := cast(s32)EnvironmentNumber("WORM_SHOT_LEVEL", 0)
|
||||
if level > 0 {
|
||||
Game.StartGame(*App.game, level - 1, 0)
|
||||
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 {
|
||||
if EnvironmentText("WORM_SHOT_BOARD") != "" {
|
||||
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 {
|
||||
if EnvironmentText("WORM_SHOT_VOLUME") != "" { App.sound_popup = true }
|
||||
if EnvironmentText("WORM_SHOT_STAGES") != "" {
|
||||
App.game.started = true
|
||||
App.OpenStages()
|
||||
}
|
||||
unused CopyCString("WORM_SHOT_EDITOR", name[:])
|
||||
if GetEnvironment(*name[0]) != null {
|
||||
if EnvironmentText("WORM_SHOT_EDITOR") != "" {
|
||||
// WORM_SHOT_LEVEL picks which level the editor frame shows; the
|
||||
// started flag keeps Frame's first-run OpenStages from overriding it.
|
||||
App.game.started = true
|
||||
if level != null { App.OpenEditor(ParseNumber(level) - 1) }
|
||||
else { App.OpenEditor(0) }
|
||||
unused CopyCString("WORM_SHOT_BROWSER", name[:])
|
||||
if GetEnvironment(*name[0]) != null { App.editor.browsing = true }
|
||||
unused CopyCString("WORM_SHOT_TURN", name[:])
|
||||
if GetEnvironment(*name[0]) != null { App.EditorTurn() }
|
||||
App.OpenEditor(ifx level > 0 then level - 1 else 0)
|
||||
if EnvironmentText("WORM_SHOT_BROWSER") != "" { App.editor.browsing = true }
|
||||
if EnvironmentText("WORM_SHOT_TURN") != "" { App.EditorTurn() }
|
||||
}
|
||||
session := SessionOpen()
|
||||
if !SessionValid(session) { return 2 }
|
||||
defer { PixmapCloseWorkers(); CloseSession(session) }
|
||||
width: s32 = PixmapWidth
|
||||
height: s32 = PixmapHeight
|
||||
unused CopyCString("WORM_SHOT_PORTRAIT", name[:])
|
||||
portrait := GetEnvironment(*name[0]) != null
|
||||
portrait := EnvironmentText("WORM_SHOT_PORTRAIT") != ""
|
||||
if portrait { width = 390; height = 780 }
|
||||
pixels: [390 * 780]u32
|
||||
viewport := Rectangle.{0.0, 0.0, cast(float32)width, cast(float32)height}
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
// Generated by update_version.sh from CHANGELOG.md.
|
||||
AppVersion :: "0.2.22"
|
||||
AppVersion :: "0.2.26"
|
||||
@@ -21,8 +21,7 @@ def main():
|
||||
env = environment()
|
||||
env.update(WURM_PROFILE_DIR=str(fixture / 'profile'), XDG_DATA_HOME=str(fixture / 'data'),
|
||||
SDL_AUDIODRIVER='dummy', SDL_VIDEODRIVER='dummy')
|
||||
if not (ROOT / 'assets/entity.zx').exists():
|
||||
shutil.copy2(profile(), ROOT / 'assets/entity.zx')
|
||||
shutil.copy2(profile(), ROOT / 'assets/entity.zx')
|
||||
command = ['ziran', 'build', '--project', *lock(), '--root', 'tests', '--target=c', '--define', 'PLATFORM_DESKTOP',
|
||||
'--define', 'WURM_ACCOUNTS', '--entry', 'account_navigation_test:main', '-o', str(output),
|
||||
'tests/account_navigation_test.zi']
|
||||
|
||||
+124
-124
@@ -481,12 +481,12 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 2621481,
|
||||
"seed": 2637319,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 2621481,
|
||||
"seed": 2629400,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -498,7 +498,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 2694937,
|
||||
"seed": 2900831,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -534,7 +534,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 2883629,
|
||||
"seed": 2931143,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -558,7 +558,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 3014703,
|
||||
"seed": 3022622,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -570,14 +570,14 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 3080240,
|
||||
"seed": 3088159,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 3153696,
|
||||
"seed": 3169534,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -781,7 +781,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 4299501,
|
||||
"seed": 4347015,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -829,7 +829,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 4545811,
|
||||
"seed": 4569568,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -858,7 +858,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 4661047,
|
||||
"seed": 4653128,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -901,7 +901,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 4946952,
|
||||
"seed": 4931114,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -937,12 +937,12 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 5111887,
|
||||
"seed": 5127725,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 5111887,
|
||||
"seed": 5135644,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -1014,7 +1014,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 5560542,
|
||||
"seed": 5505109,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -1081,7 +1081,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 5898331,
|
||||
"seed": 5969602,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1117,7 +1117,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 6094942,
|
||||
"seed": 6118699,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1134,7 +1134,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 6160479,
|
||||
"seed": 6168398,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -1177,24 +1177,24 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 11767952,
|
||||
"reverse": 0,
|
||||
"route": 5
|
||||
"seed": 7040309,
|
||||
"reverse": 1,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 6707711,
|
||||
"reverse": 0,
|
||||
"seed": 6929443,
|
||||
"reverse": 1,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 6543597,
|
||||
"seed": 6488164,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 6488164,
|
||||
"seed": 6504002,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -1237,19 +1237,19 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 6766150,
|
||||
"seed": 6750312,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 6758231,
|
||||
"seed": 6766150,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 6831687,
|
||||
"seed": 6910877,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1261,19 +1261,19 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 6889305,
|
||||
"seed": 6928900,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 6952657,
|
||||
"seed": 6920981,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 7073627,
|
||||
"seed": 7081546,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1302,16 +1302,16 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 7125511,
|
||||
"seed": 7244296,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 7689945,
|
||||
"seed": 10089402,
|
||||
"reverse": 1,
|
||||
"route": 0
|
||||
"route": 2
|
||||
},
|
||||
{
|
||||
"seed": 7998786,
|
||||
@@ -1321,7 +1321,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 7612940,
|
||||
"seed": 7605021,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1350,7 +1350,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 7348064,
|
||||
"seed": 7363902,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -1369,7 +1369,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 7471219,
|
||||
"seed": 7479138,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1405,7 +1405,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 7675749,
|
||||
"seed": 7667830,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1429,9 +1429,9 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 12906659,
|
||||
"seed": 19249778,
|
||||
"reverse": 0,
|
||||
"route": 5
|
||||
"route": 11
|
||||
},
|
||||
{
|
||||
"seed": 12455276,
|
||||
@@ -1470,14 +1470,14 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 8050948,
|
||||
"seed": 8367708,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 8068971,
|
||||
"seed": 8084809,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1494,7 +1494,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 8158265,
|
||||
"seed": 8142427,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -1506,14 +1506,14 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 8746456,
|
||||
"reverse": 1,
|
||||
"seed": 8223802,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 8265582,
|
||||
"seed": 8305177,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1537,9 +1537,9 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 22587504,
|
||||
"reverse": 0,
|
||||
"route": 14
|
||||
"seed": 28194156,
|
||||
"reverse": 1,
|
||||
"route": 19
|
||||
},
|
||||
{
|
||||
"seed": 11120792,
|
||||
@@ -1590,7 +1590,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 8872617,
|
||||
"seed": 8658804,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -1650,16 +1650,16 @@
|
||||
"route": 5
|
||||
},
|
||||
{
|
||||
"seed": 11275080,
|
||||
"reverse": 0,
|
||||
"route": 2
|
||||
"seed": 9928850,
|
||||
"reverse": 1,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 40332076,
|
||||
"seed": 43230430,
|
||||
"reverse": 1,
|
||||
"route": 30
|
||||
"route": 33
|
||||
},
|
||||
{
|
||||
"seed": 9107459,
|
||||
@@ -1669,7 +1669,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 9220510,
|
||||
"seed": 9252186,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1681,12 +1681,12 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 9191019,
|
||||
"seed": 9222695,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 9175181,
|
||||
"seed": 9191019,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -1717,32 +1717,32 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 10084502,
|
||||
"seed": 10211206,
|
||||
"reverse": 1,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 9743985,
|
||||
"seed": 9427225,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 9548195,
|
||||
"seed": 9476924,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 9730332,
|
||||
"seed": 9437329,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 9613732,
|
||||
"reverse": 0,
|
||||
"seed": 10168062,
|
||||
"reverse": 1,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
@@ -1758,7 +1758,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 9584241,
|
||||
"seed": 9568403,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -1770,8 +1770,8 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 10045728,
|
||||
"reverse": 0,
|
||||
"seed": 10473354,
|
||||
"reverse": 1,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
@@ -1794,14 +1794,14 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 9765014,
|
||||
"seed": 9899637,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 9885984,
|
||||
"seed": 9862227,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1813,12 +1813,12 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 9904007,
|
||||
"seed": 9919845,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 9911926,
|
||||
"seed": 9896088,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -1837,19 +1837,19 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 10027162,
|
||||
"seed": 10074676,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 10130109,
|
||||
"seed": 10098433,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 10092699,
|
||||
"seed": 10100618,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1861,7 +1861,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 10277021,
|
||||
"seed": 10300778,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1878,14 +1878,14 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 10239611,
|
||||
"seed": 10397991,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 10344743,
|
||||
"seed": 10305148,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1902,8 +1902,8 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 10632012,
|
||||
"reverse": 0,
|
||||
"seed": 11027962,
|
||||
"reverse": 1,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
@@ -1921,7 +1921,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 10517597,
|
||||
"seed": 10493840,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -1938,7 +1938,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 10646486,
|
||||
"seed": 10567296,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -1962,7 +1962,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 10690451,
|
||||
"seed": 10730046,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -1986,26 +1986,26 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 10924472,
|
||||
"seed": 10813606,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 11417635,
|
||||
"seed": 11607691,
|
||||
"reverse": 1,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 12169940,
|
||||
"reverse": 0,
|
||||
"route": 1
|
||||
"seed": 11441392,
|
||||
"reverse": 1,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 11047627,
|
||||
"seed": 10944680,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -2034,31 +2034,31 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 11075754,
|
||||
"seed": 11107430,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 11212562,
|
||||
"seed": 11204643,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 11141291,
|
||||
"seed": 11188805,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 11222666,
|
||||
"seed": 11333532,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 11404803,
|
||||
"seed": 11365208,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -2070,7 +2070,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 11699991,
|
||||
"seed": 11359474,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -2089,12 +2089,12 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 11466791,
|
||||
"seed": 11846903,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 11427196,
|
||||
"seed": 11545981,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -2113,12 +2113,12 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 11550351,
|
||||
"seed": 11542432,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 11558270,
|
||||
"seed": 11542432,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -2130,9 +2130,9 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 11972243,
|
||||
"seed": 12621601,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
"route": 1
|
||||
}
|
||||
],
|
||||
[
|
||||
@@ -2142,14 +2142,14 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 11681425,
|
||||
"seed": 11728939,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 11731124,
|
||||
"seed": 11739043,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
@@ -2166,7 +2166,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 11812499,
|
||||
"seed": 11939203,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -2185,24 +2185,24 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 12133629,
|
||||
"seed": 12228657,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 11967330,
|
||||
"seed": 11999006,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 12001191,
|
||||
"seed": 12024948,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 12183328,
|
||||
"seed": 12278356,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -2221,12 +2221,12 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 12251050,
|
||||
"seed": 13256763,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
"route": 1
|
||||
},
|
||||
{
|
||||
"seed": 13486414,
|
||||
"seed": 13153816,
|
||||
"reverse": 0,
|
||||
"route": 1
|
||||
}
|
||||
@@ -2238,7 +2238,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 12197802,
|
||||
"seed": 12189883,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -2262,7 +2262,7 @@
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 12408066,
|
||||
"seed": 12328876,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -2281,7 +2281,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 13109308,
|
||||
"seed": 13006361,
|
||||
"reverse": 1,
|
||||
"route": 0
|
||||
},
|
||||
@@ -2293,36 +2293,36 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 12580920,
|
||||
"seed": 12802652,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 12881842,
|
||||
"seed": 12517568,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 12662295,
|
||||
"seed": 12994893,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 12709809,
|
||||
"seed": 12638538,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 12775346,
|
||||
"seed": 12751589,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 12727832,
|
||||
"seed": 12862455,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -2353,24 +2353,24 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 12861091,
|
||||
"seed": 13177851,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 12845253,
|
||||
"seed": 12853172,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 14082802,
|
||||
"seed": 13029575,
|
||||
"reverse": 0,
|
||||
"route": 1
|
||||
"route": 0
|
||||
},
|
||||
{
|
||||
"seed": 12982061,
|
||||
"seed": 12966223,
|
||||
"reverse": 0,
|
||||
"route": 0
|
||||
}
|
||||
@@ -2389,7 +2389,7 @@
|
||||
],
|
||||
[
|
||||
{
|
||||
"seed": 13825845,
|
||||
"seed": 13889197,
|
||||
"reverse": 1,
|
||||
"route": 0
|
||||
},
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
Custom :: #import, file "../src/custom_levels.zi";
|
||||
// campaign-cases:begin
|
||||
// Generated from campaign_cases.json by tools/design_levels.py.
|
||||
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];
|
||||
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, 2637319, 2629400, 2908750, 2900831, 2752555, 2752555, 2818092, 2826011, 2883629, 2931143, 2949166, 2949166, 3030541, 3022622, 3080240, 3088159, 3169534, 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, 4347015, 4299501, 4349200, 4325443, 4390980, 4390980, 4456517, 4456517, 4569568, 4522054, 4611348, 4611348, 4668966, 4653128, 4718665, 4734503, 4815878, 4879230, 4968524, 4849739, 4931114, 4923195, 4988732, 5012489, 5046350, 5054269, 5127725, 5135644, 5288290, 5399156, 5250880, 5242961, 5308498, 5308498, 5389873, 5374035, 5487086, 5447491, 5505109, 5505109, 5633998, 5784459, 5636183, 5652021, 5717558, 5875938, 5767257, 5767257, 6315853, 6426719, 5969602, 5906250, 5979706, 5979706, 6045243, 6029405, 6118699, 6094942, 6168398, 6168398, 6233935, 6257692, 6853802, 7827839, 6388766, 7061881, 7040309, 6929443, 6488164, 6504002, 6759595, 6569539, 6619238, 6619238, 6866912, 6684775, 6750312, 6766150, 6910877, 6902958, 6928900, 6920981, 7081546, 6970680, 9681163, 7059974, 7173025, 7244296, 10089402, 7998786, 7605021, 7351613, 7298365, 7892290, 7411416, 7363902, 8641046, 12687655, 7479138, 7526652, 7560513, 8344494, 7895296, 7602293, 7667830, 7683668, 7772962, 7733367, 19249778, 12455276, 7911955, 8054497, 8025006, 8500146, 8027191, 8367708, 8084809, 8068971, 8134508, 8142427, 8516805, 8223802, 8305177, 8257663, 9083424, 9091343, 28194156, 11120792, 8462193, 9064037, 8527730, 8535649, 8617024, 8617024, 8666723, 8658804, 8866883, 8851045, 8797797, 8813635, 8918767, 9354312, 9008061, 9055575, 14909901, 9928850, 43230430, 9107459, 9252186, 9260105, 9222695, 9191019, 9280313, 9565397, 9306255, 9314174, 10211206, 9427225, 9476924, 9437329, 10168062, 9661246, 9592160, 9568403, 9839834, 10473354, 9889533, 9762829, 9947151, 9899637, 9862227, 9838470, 9919845, 9896088, 10009139, 9977463, 10074676, 10098433, 10100618, 10195646, 10300778, 10308697, 10683075, 10397991, 10305148, 10408095, 10536984, 11027962, 10444141, 10586683, 10493840, 10604706, 10717757, 10567296, 11092135, 10862484, 10706289, 10730046, 10819340, 10803502, 10861120, 10813606, 11607691, 11441392, 10944680, 11023870, 11176516, 11422005, 11107430, 11107430, 11204643, 11188805, 11333532, 11365208, 11359474, 11359474, 11480444, 11725933, 11846903, 11545981, 11532328, 11500652, 11542432, 11542432, 12423626, 12621601, 11721020, 11728939, 11739043, 11810314, 12002555, 11939203, 12456123, 12273986, 12228657, 11999006, 12024948, 12278356, 12082566, 12066728, 13256763, 13153816, 12221559, 12189883, 12287096, 12255420, 12320957, 12328876, 12608226, 19949139, 13006361, 12650006, 12802652, 12517568, 12994893, 12638538, 12751589, 12862455, 15002770, 17291361, 12795554, 12969772, 13177851, 12853172, 13029575, 12966223, 131452486, 24450958, 13889197, 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, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 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, 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, 1, 1, 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, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 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, 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, 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";
|
||||
|
||||
+5
-5
@@ -17,13 +17,13 @@ main :: () -> s32 {
|
||||
Expect(game.apple.x >= 0 && game.apple.y >= 0 && TileAt(*game, game.apple) < 20, "apple in permitted terrain")
|
||||
Expect(game.monster_count <= MONSTER_LIMIT, "monsters fit original limit")
|
||||
}
|
||||
Expect(TickInterval(0) == 48 && TickInterval(10) == 48 && TickInterval(39) == 48 && TickInterval(40) == 28, "all Meadow levels keep the same slower pace while later stages retain their gentler pace")
|
||||
for meadow: 0..39 { Expect(TickInterval(cast(s32)meadow) == 48, "Meadow never accelerates between levels") }
|
||||
Expect(BaseTickInterval(0) == 32 && BaseTickInterval(10) == 27 && BaseTickInterval(40) == 25, "movement slowdown preserves the scoring difficulty curve")
|
||||
Expect(TickInterval(0) == 43 && TickInterval(10) == 43 && TickInterval(39) == 43 && TickInterval(40) == 25, "a modest movement increase keeps Meadow steady and later stages faster")
|
||||
for meadow: 0..39 { Expect(TickInterval(cast(s32)meadow) == 43, "Meadow never accelerates between levels") }
|
||||
Expect(BaseTickInterval(0) == 32 && BaseTickInterval(10) == 27 && BaseTickInterval(40) == 25, "movement timing preserves the scoring difficulty curve")
|
||||
StartGame(*game, 0, 100)
|
||||
Expect(game.apples == 5 && game.monster_count == 0, "gentle first level with five apples and no moving hazards")
|
||||
Expect(!Step(*game, 147), "no movement before the gentler first tick")
|
||||
Expect(Step(*game, 148) && game.worm[0].y == 492, "four pixels per movement tick")
|
||||
Expect(!Step(*game, 142), "no movement before the first tick")
|
||||
Expect(Step(*game, 143) && game.worm[0].y == 492, "four pixels per movement tick")
|
||||
Expect(!ApplyInput(*game, 262), "no steering before spawn is established")
|
||||
for tick: 0..29 { Tick(*game) }
|
||||
Expect(game.length == 32 && game.target_length == 2, "original initial growth")
|
||||
|
||||
@@ -9,6 +9,42 @@ Expect :: (value: bool, message: string) {
|
||||
}
|
||||
}
|
||||
|
||||
NoEnemyAtEntrance :: (game: *Game, level: s32, portrait: bool) {
|
||||
for index: 0..game.monster_count - 1 {
|
||||
if EnemyFreeZone(game.monsters[index].position) {
|
||||
print("Enemy at the entrance: level %, portrait %\n", level + 1, portrait)
|
||||
failures += 1
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Play on with lost lives: enemies keep out of the entrance area, so a new
|
||||
// life never removes one.
|
||||
CheckLives :: (level: s32, portrait: bool) {
|
||||
board: [CELLS]u8
|
||||
objects: [CELLS]u8
|
||||
Custom.DefaultBoard(level, board[:], portrait)
|
||||
columns: s32 = ifx portrait then ROWS else COLUMNS
|
||||
rows: s32 = ifx portrait then COLUMNS else ROWS
|
||||
game: Game
|
||||
game.lives = 20
|
||||
game.random = 29 + cast(u32)level
|
||||
LoadLevelData(*game, level, 0, board[:], 5, columns, rows, objects[:])
|
||||
count := game.monster_count
|
||||
for tick: 0..3999 {
|
||||
if game.mode != MODE_PLAYING { break }
|
||||
if tick % 9 == 0 { unused ApplyInput(*game, 262 + Random(*game, 4)) }
|
||||
Tick(*game)
|
||||
NoEnemyAtEntrance(*game, level, portrait)
|
||||
if game.monster_count != count {
|
||||
print("A lost life removed an enemy: level %, portrait %\n", level + 1, portrait)
|
||||
failures += 1
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CheckStart :: (level: s32, portrait: bool, key: s32) {
|
||||
board: [CELLS]u8
|
||||
objects: [CELLS]u8
|
||||
@@ -26,6 +62,7 @@ CheckStart :: (level: s32, portrait: bool, key: s32) {
|
||||
}
|
||||
}
|
||||
for tick: 0..39 { Tick(*game) }
|
||||
NoEnemyAtEntrance(*game, level, portrait)
|
||||
if game.death_ticks != 0 || game.lives != 3 {
|
||||
print("Unsafe start: level %, portrait %\n", level + 1, portrait)
|
||||
failures += 1
|
||||
@@ -46,6 +83,8 @@ main :: () -> s32 {
|
||||
CheckStart(cast(s32)level, false, 263)
|
||||
CheckStart(cast(s32)level, true, 262)
|
||||
CheckStart(cast(s32)level, true, 263)
|
||||
CheckLives(cast(s32)level, false)
|
||||
CheckLives(cast(s32)level, true)
|
||||
}
|
||||
BoardSize(COLUMNS, ROWS)
|
||||
game: Game
|
||||
@@ -58,6 +97,12 @@ main :: () -> s32 {
|
||||
Expect(game.board[Index(4, 25)] == 21, "terrain outside the entrance area is preserved")
|
||||
Expect(game.board[Index(20, 27)] == 0, "a later life has the same clear start")
|
||||
Expect(game.monster_count == 1 && game.monsters[0].position.x == 72, "nearby starting hazards are cleared while distant enemies remain")
|
||||
// A wandering enemy walking at the entrance area turns away at its edge.
|
||||
game.monsters[0] = Monster.{Point.{(COLUMNS / 2 + START_CLEAR_HALF_WIDTH + 4) * 16 + 8, (ROWS - 3) * 16 + 8}, 3, 3, 0, 0}
|
||||
for tick: 0..63 {
|
||||
MoveMonster(*game, 0)
|
||||
Expect(!EnemyFreeZone(game.monsters[0].position), "an enemy never walks into the entrance area")
|
||||
}
|
||||
print("Mobile start clearance: % failures across 200 levels and both layouts\n", failures)
|
||||
return ifx failures == 0 then 0 else 1
|
||||
}
|
||||
+3
-8
@@ -23,10 +23,7 @@ def generate():
|
||||
#if #defined(PLATFORM_WEB) {
|
||||
#import "std/web"
|
||||
} else #if !#defined(WURM_PORTABLE) {
|
||||
#import "std/c_string"
|
||||
#import "std/byte_text_linux"
|
||||
libc :: #system_library "libc";
|
||||
LocaleEnvironment :: (name: *u8) -> *u8 #foreign libc "getenv";
|
||||
#import "std/environment_linux"
|
||||
}
|
||||
language: [3]u8;
|
||||
ready: bool;
|
||||
@@ -45,10 +42,8 @@ Detect :: () {
|
||||
SetLanguage(TextUntilNul(bytes[:]))
|
||||
WebEnd(scope)
|
||||
} else #if !#defined(WURM_PORTABLE) {
|
||||
key: [16]u8
|
||||
unused CopyCString("LANG", key[:])
|
||||
value := LocaleEnvironment(*key[0])
|
||||
if value != null { SetLanguage(TextFromCString(value)) }
|
||||
value := EnvironmentText("LANG")
|
||||
if value != "" { SetLanguage(value) }
|
||||
}
|
||||
}
|
||||
Text :: (source: string) -> string {
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"version": "0.2.22",
|
||||
"version_code": 32
|
||||
"version": "0.2.26",
|
||||
"version_code": 36
|
||||
}
|
||||
+36
-36
@@ -1,22 +1,6 @@
|
||||
{
|
||||
"format": 1,
|
||||
"packages": [
|
||||
{
|
||||
"commit": "dc1cfe389905c63c0bb453727d06d72afc1fa0b0",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "p77028198b0e09537"},
|
||||
"id": "p00b93f1ddcd2802f",
|
||||
"name": "Apps",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/apps.git"
|
||||
},
|
||||
{
|
||||
"commit": "d8996893ddc6c2bdfa334f99a41b1db6db900491",
|
||||
"dependencies": {"daochi_client": "pf7b24c15869d6839", "kryon": "p77028198b0e09537", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"id": "p193d41674d9daa1c",
|
||||
"name": "Entity",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/entity.git"
|
||||
},
|
||||
{
|
||||
"commit": "2944b2e668e735438d8ce24e47a39be3f5c36af5",
|
||||
"dependencies": {},
|
||||
@@ -25,6 +9,39 @@
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/qrcode.git"
|
||||
},
|
||||
{
|
||||
"commit": "6c274894cd98cd37f727c06ed7a5bce768a0cbda",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "kryon": "p31868b412b407f25"},
|
||||
"id": "p1e4e4f044a26528c",
|
||||
"name": "Apps",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/apps.git"
|
||||
},
|
||||
{
|
||||
"commit": "16fede501eaab8aedfe2d184813317be08554f6e",
|
||||
"dependencies": {"raylib": "p5a77c9c35110e925"},
|
||||
"id": "p31868b412b407f25",
|
||||
"name": "kryon",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kryon.git"
|
||||
},
|
||||
{
|
||||
"commit": "02a1dfbba9eef37c8ac9f201eb583b097ccf12d8",
|
||||
"dependencies": {"daochi_client": "pf7b24c15869d6839", "kryon": "p31868b412b407f25", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"id": "p4fd05d3b01b94ee1",
|
||||
"name": "Entity",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/entity.git"
|
||||
},
|
||||
{
|
||||
"commit": "9fb80ab00d4b37503e66eb7ee7cdec6b305adf8e",
|
||||
"dependencies": {},
|
||||
"id": "p563eec337af1337e",
|
||||
"name": "liboqs",
|
||||
"ref": "main",
|
||||
"source": true,
|
||||
"url": "https://github.com/open-quantum-safe/liboqs.git"
|
||||
},
|
||||
{
|
||||
"commit": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
|
||||
"dependencies": {},
|
||||
@@ -36,20 +53,12 @@
|
||||
},
|
||||
{
|
||||
"commit": "22d2ddbdc236796953c905a05a2cebf5ab1b4ff3",
|
||||
"dependencies": {"liboqs": "pecdb097af6ab16f7"},
|
||||
"dependencies": {"liboqs": "p563eec337af1337e"},
|
||||
"id": "p7098ac9cd92f7e5f",
|
||||
"name": "Oqs",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/oqs.git"
|
||||
},
|
||||
{
|
||||
"commit": "1d987043bf1c07bde429d3f8a30b74d5401bea45",
|
||||
"dependencies": {"raylib": "p5a77c9c35110e925"},
|
||||
"id": "p77028198b0e09537",
|
||||
"name": "kryon",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/kryon.git"
|
||||
},
|
||||
{
|
||||
"commit": "f5f0a19a5dc6c14a49adb3cd63ea79a60f6ba77b",
|
||||
"dependencies": {},
|
||||
@@ -75,15 +84,6 @@
|
||||
"ref": "master",
|
||||
"url": "https://github.com/kryonlabs/mingcute.git"
|
||||
},
|
||||
{
|
||||
"commit": "4778aa5044bf119c30df54219fa89357080af27f",
|
||||
"dependencies": {},
|
||||
"id": "pecdb097af6ab16f7",
|
||||
"name": "liboqs",
|
||||
"ref": "main",
|
||||
"source": true,
|
||||
"url": "https://github.com/open-quantum-safe/liboqs.git"
|
||||
},
|
||||
{
|
||||
"commit": "e948c3f280e2e3fa3ef7317dfaca27bd36a4900b",
|
||||
"dependencies": {"crypto": "pc23fbf455e97614d", "oqs": "p7098ac9cd92f7e5f"},
|
||||
@@ -94,11 +94,11 @@
|
||||
}
|
||||
],
|
||||
"root": {
|
||||
"dependencies": {"apps": "p00b93f1ddcd2802f", "entity": "p193d41674d9daa1c", "kryon": "p77028198b0e09537", "mingcute": "pe1027b9d16704793"},
|
||||
"dependencies": {"apps": "p1e4e4f044a26528c", "entity": "p4fd05d3b01b94ee1", "kryon": "p31868b412b407f25", "mingcute": "pe1027b9d16704793"},
|
||||
"name": "Apfelwurm"
|
||||
},
|
||||
"toolchain": {
|
||||
"commit": "7c883e8458f9a728ff390d40e9c8b094a2683bab",
|
||||
"commit": "8c9665bf12665944ad705dd914259dcf4bacc497",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/ziranlang/ziran.git"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user