Handbook
Glossary
check-terrain ( world -- )
Vocabulary
terrain
.
smoke-test
Inputs
world
an
object
Outputs
None
Definition
USING:
accessors
calendar
concurrency.promises
game.loop
io
kernel
math
system
threads
ui
ui.backend
;
IN:
terrain.smoke-test
::
check-terrain
( world -- )
1
seconds
sleep
world
raise-window
100
milliseconds
sleep
world
handle>>
:>
handle
os
macos?
[
handle
input-grabbed?>>
t
assert=
handle
(grab-input)
handle
(ungrab-input)
handle
(ungrab-input)
handle
input-grabbed?>>
f
assert=
handle
(grab-input)
handle
(grab-input)
]
when
world
game-loop>>
tick#>>
0
>
t
assert=
world
game-loop>>
stop-loop
world
player>>
45.0
>>pitch
drop
os
macos?
[
world
check-cocoa-controls
]
when
world
check-terrain-frame
world
{
640 360
}
resize-window
500
milliseconds
sleep
world
check-terrain-frame
world
close-window
world
promise>>
?promise
drop
os
macos?
[
handle
input-grabbed?>>
f
assert=
]
when
world
terrain-mesh>>
[
buffer>>
]
[
vertex-array>>
]
bi
[
f
assert=
]
bi@
"Terrain smoke test passed (ground, sky, resize, controls, cap..."
print
flush
0
exit
;