fix some logic
This commit is contained in:
parent
4a22b19143
commit
4f2631eca1
3 changed files with 4 additions and 1 deletions
BIN
ada.sand
Normal file
BIN
ada.sand
Normal file
Binary file not shown.
BIN
dub.sand
Normal file
BIN
dub.sand
Normal file
Binary file not shown.
|
@ -79,7 +79,7 @@ main :: proc() {
|
||||||
img := rl.LoadImage(strings.clone_to_cstring(os.args[1]))
|
img := rl.LoadImage(strings.clone_to_cstring(os.args[1]))
|
||||||
rl.ImageResize(&img, DIVIDED, DIVIDED)
|
rl.ImageResize(&img, DIVIDED, DIVIDED)
|
||||||
} else {
|
} else {
|
||||||
rl.SetTargetFPS(120)
|
rl.SetTargetFPS(5)
|
||||||
}
|
}
|
||||||
|
|
||||||
for !rl.WindowShouldClose() {
|
for !rl.WindowShouldClose() {
|
||||||
|
@ -125,9 +125,12 @@ main :: proc() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, found := get_pixel(right).?; !found && !pixel.already_moved {
|
if _, found := get_pixel(right).?; !found && !pixel.already_moved {
|
||||||
|
pixel.already_moved = true
|
||||||
if pixel.pos.x >= DIVIDED - 1 do continue
|
if pixel.pos.x >= DIVIDED - 1 do continue
|
||||||
pixel.pos = right
|
pixel.pos = right
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pixel.already_moved = true
|
||||||
}
|
}
|
||||||
when !MAKE_CONVERTER {
|
when !MAKE_CONVERTER {
|
||||||
rl.EndDrawing()
|
rl.EndDrawing()
|
||||||
|
|
Loading…
Add table
Reference in a new issue