Reorganize world
So that we could push out types.rkt from outer world.rkt file.
This commit is contained in:
parent
2ee0d1c09c
commit
6f6a6027c3
|
@ -1,7 +1,5 @@
|
||||||
#lang s-exp "lang/base.rkt"
|
#lang s-exp "lang/base.rkt"
|
||||||
|
|
||||||
(require "world/main.rkt")
|
(require "world/main.rkt")
|
||||||
(require "world/types.rkt")
|
|
||||||
|
|
||||||
(provide (all-from-out "world/main.rkt")
|
(provide (all-from-out "world/main.rkt"))
|
||||||
(all-from-out "world/types.rkt"))
|
|
||||||
|
|
27
whalesong/world/impl.rkt
Normal file
27
whalesong/world/impl.rkt
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#lang s-exp "../lang/js/js.rkt"
|
||||||
|
|
||||||
|
(require "../image.rkt"
|
||||||
|
"types.rkt")
|
||||||
|
|
||||||
|
(declare-implementation
|
||||||
|
#:racket "racket-impl.rkt"
|
||||||
|
#:javascript (
|
||||||
|
;; the raw implementation doesn't know anything about
|
||||||
|
;; Whalesong.
|
||||||
|
"raw-jsworld.js"
|
||||||
|
|
||||||
|
;; We add Whalesong-specific things here.
|
||||||
|
"kernel.js"
|
||||||
|
"js-impl.js"
|
||||||
|
)
|
||||||
|
#:provided-values (big-bang
|
||||||
|
on-tick
|
||||||
|
on-key
|
||||||
|
on-release
|
||||||
|
on-mouse
|
||||||
|
key=?
|
||||||
|
to-draw
|
||||||
|
stop-when))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,7 @@
|
||||||
#lang s-exp "../lang/js/js.rkt"
|
#lang s-exp "../lang/base.rkt"
|
||||||
|
|
||||||
(require "../image.rkt"
|
(require "impl.rkt"
|
||||||
"types.rkt")
|
"types.rkt")
|
||||||
|
|
||||||
(declare-implementation
|
(provide (all-from-out "impl.rkt")
|
||||||
#:racket "racket-impl.rkt"
|
(all-from-out "types.rkt"))
|
||||||
#:javascript (
|
|
||||||
;; the raw implementation doesn't know anything about
|
|
||||||
;; Whalesong.
|
|
||||||
"raw-jsworld.js"
|
|
||||||
|
|
||||||
;; We add Whalesong-specific things here.
|
|
||||||
"kernel.js"
|
|
||||||
"js-impl.js"
|
|
||||||
)
|
|
||||||
#:provided-values (big-bang
|
|
||||||
on-tick
|
|
||||||
on-key
|
|
||||||
on-release
|
|
||||||
on-mouse
|
|
||||||
key=?
|
|
||||||
to-draw
|
|
||||||
stop-when))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#lang s-exp "../lang/base.rkt"
|
#lang s-exp "../lang/base.rkt"
|
||||||
|
|
||||||
|
(require "types.rkt")
|
||||||
|
|
||||||
(provide big-bang
|
(provide big-bang
|
||||||
to-draw
|
to-draw
|
||||||
on-tick
|
on-tick
|
||||||
|
|
Loading…
Reference in New Issue
Block a user