Fix load error in game.loop
parent
8a770e0534
commit
d9bd3d572e
|
@ -26,22 +26,6 @@ $nl
|
||||||
|
|
||||||
{ <game-loop> <game-loop*> } related-words
|
{ <game-loop> <game-loop*> } related-words
|
||||||
|
|
||||||
HELP: benchmark-frames-per-second
|
|
||||||
{ $values
|
|
||||||
{ "loop" game-loop }
|
|
||||||
{ "n" float }
|
|
||||||
}
|
|
||||||
{ $description "Returns the average number of times per second the game loop has called " { $link draw* } " on its delegate since the game loop was started with " { $link start-loop } "." } ;
|
|
||||||
|
|
||||||
HELP: benchmark-ticks-per-second
|
|
||||||
{ $values
|
|
||||||
{ "loop" game-loop }
|
|
||||||
{ "n" float }
|
|
||||||
}
|
|
||||||
{ $description "Returns the average number of times per second the game loop has called " { $link tick* } " on its tick delegate since the game loop was started." } ;
|
|
||||||
|
|
||||||
{ benchmark-frames-per-second benchmark-ticks-per-second } related-words
|
|
||||||
|
|
||||||
HELP: draw*
|
HELP: draw*
|
||||||
{ $values
|
{ $values
|
||||||
{ "tick-slice" float } { "delegate" "a " { $link "game.loop-delegates" } }
|
{ "tick-slice" float } { "delegate" "a " { $link "game.loop-delegates" } }
|
||||||
|
@ -103,11 +87,6 @@ ARTICLE: "game.loop" "Game loops"
|
||||||
start-loop
|
start-loop
|
||||||
stop-loop
|
stop-loop
|
||||||
}
|
}
|
||||||
"The game loop maintains performance counters:"
|
|
||||||
{ $subsections
|
|
||||||
benchmark-frames-per-second
|
|
||||||
benchmark-ticks-per-second
|
|
||||||
}
|
|
||||||
"The game loop catches errors that occur in the delegate's methods during the course of the game loop:"
|
"The game loop catches errors that occur in the delegate's methods during the course of the game loop:"
|
||||||
{ $subsections
|
{ $subsections
|
||||||
game-loop-error
|
game-loop-error
|
||||||
|
|
|
@ -88,12 +88,6 @@ TUPLE: game-loop-error game-loop error ;
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
! : benchmark-ticks-per-second ( loop -- n )
|
|
||||||
! [ tick#>> ] [ benchmark-tick#>> - ] [ benchmark-nanos ] tri /f ;
|
|
||||||
|
|
||||||
! : benchmark-frames-per-second ( loop -- n )
|
|
||||||
! [ frame#>> ] [ benchmark-frame#>> - ] [ benchmark-nanos ] tri /f ;
|
|
||||||
|
|
||||||
: (game-tick) ( loop -- )
|
: (game-tick) ( loop -- )
|
||||||
dup running?>>
|
dup running?>>
|
||||||
[ [ MAX-FRAMES-TO-SKIP ?tick ] [ redraw ] bi ]
|
[ [ MAX-FRAMES-TO-SKIP ?tick ] [ redraw ] bi ]
|
||||||
|
|
Loading…
Reference in New Issue