(init-video-mode)
(set-game-code game-function)
(cond ((not (game-running?))
- (init-frame-time)
- (process-events)
(game-loop)))))
(let (running game-code)
(defun game-loop ()
(setq running t)
(do () ((quit?))
- (glClear (+ GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT))
- (to-origin)
- (refresh-visible-boxes)
- (when (functionp game-code) (funcall game-code))
- (render-boxes)
- (SDL_GL_SwapBuffers)
- (delay-frame)
(init-frame-time)
(check-connections)
(eval-from-clients)
- (process-events))
+ (process-events)
+ (cond ((not (quit?))
+ (glClear (+ GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT))
+ (to-origin)
+ (refresh-visible-boxes)
+ (when (functionp game-code) (funcall game-code))
+ (render-boxes)
+ (SDL_GL_SwapBuffers)
+ (delay-frame))))
(setq running nil))
(defun game-running? ()