Merge branch 'master' of git://github.com/slavapestov/factor into highlight
commit
fad33fdfc8
|
@ -6,7 +6,8 @@ io io.binary io.encodings.binary io.encodings.string
|
||||||
io.encodings.utf8 io.sockets io.sockets.private
|
io.encodings.utf8 io.sockets io.sockets.private
|
||||||
io.streams.byte-array io.timeouts kernel make math math.bitwise
|
io.streams.byte-array io.timeouts kernel make math math.bitwise
|
||||||
math.parser namespaces nested-comments random sequences
|
math.parser namespaces nested-comments random sequences
|
||||||
slots.syntax splitting system vectors vocabs.loader strings ;
|
slots.syntax splitting system vectors vocabs.loader strings
|
||||||
|
ascii ;
|
||||||
IN: dns
|
IN: dns
|
||||||
|
|
||||||
: with-input-seek ( n seek-type quot -- )
|
: with-input-seek ( n seek-type quot -- )
|
||||||
|
@ -238,10 +239,15 @@ M: SOA parse-rdata 2drop parse-soa ;
|
||||||
[ [ parse-rr ] replicate ] change-additional-section
|
[ [ parse-rr ] replicate ] change-additional-section
|
||||||
] with-byte-reader ;
|
] with-byte-reader ;
|
||||||
|
|
||||||
: >n/label ( string -- byte-array )
|
ERROR: unsupported-domain-name string ;
|
||||||
[ length 1array ] [ utf8 encode ] bi B{ } append-as ;
|
|
||||||
|
|
||||||
: >name ( domain -- byte-array ) "." split [ >n/label ] map concat ;
|
: >n/label ( string -- byte-array )
|
||||||
|
dup [ ascii? ] all?
|
||||||
|
[ unsupported-domain-name ] unless
|
||||||
|
[ length 1array ] [ ] bi B{ } append-as ;
|
||||||
|
|
||||||
|
: >name ( domain -- byte-array )
|
||||||
|
"." split [ >n/label ] map concat ;
|
||||||
|
|
||||||
: query>byte-array ( query -- byte-array )
|
: query>byte-array ( query -- byte-array )
|
||||||
[
|
[
|
||||||
|
@ -321,7 +327,7 @@ M: TXT rdata>byte-array
|
||||||
|
|
||||||
: udp-query ( bytes server -- bytes' )
|
: udp-query ( bytes server -- bytes' )
|
||||||
f 0 <inet4> <datagram>
|
f 0 <inet4> <datagram>
|
||||||
30 seconds over set-timeout [
|
10 seconds over set-timeout [
|
||||||
[ send ] [ receive drop ] bi
|
[ send ] [ receive drop ] bi
|
||||||
] with-disposal ;
|
] with-disposal ;
|
||||||
|
|
||||||
|
|
|
@ -41,14 +41,14 @@ IN: game.debug.tests
|
||||||
COLOR: purple { 5 5 } world dim>> draw-text
|
COLOR: purple { 5 5 } world dim>> draw-text
|
||||||
world [ 1 + ] change-frame# drop ;
|
world [ 1 + ] change-frame# drop ;
|
||||||
|
|
||||||
TUPLE: tests-world < wasd-world frame-number ;
|
TUPLE: tests-world < wasd-world frame# ;
|
||||||
M: tests-world draw-world* draw-debug-tests ;
|
M: tests-world draw-world* draw-debug-tests ;
|
||||||
M: tests-world wasd-movement-speed drop 1/16. ;
|
M: tests-world wasd-movement-speed drop 1/16. ;
|
||||||
M: tests-world wasd-near-plane drop 1/32. ;
|
M: tests-world wasd-near-plane drop 1/32. ;
|
||||||
M: tests-world wasd-far-plane drop 1024.0 ;
|
M: tests-world wasd-far-plane drop 1024.0 ;
|
||||||
M: tests-world begin-game-world
|
M: tests-world begin-game-world
|
||||||
init-gpu
|
init-gpu
|
||||||
0 >>frame-number
|
0 >>frame#
|
||||||
{ 0.0 0.0 2.0 } 0 0 set-wasd-view drop ;
|
{ 0.0 0.0 2.0 } 0 0 set-wasd-view drop ;
|
||||||
|
|
||||||
GAME: run-tests {
|
GAME: run-tests {
|
||||||
|
|
Loading…
Reference in New Issue