fix test program
This commit is contained in:
parent
38023f8828
commit
3e87f231bc
File diff suppressed because one or more lines are too long
|
@ -41,10 +41,10 @@
|
|||
(define screen-addr 0xe12000)
|
||||
(define screen-size 0x9d00)
|
||||
|
||||
(compile-sprite tile0 [(. files.game.tiles 1 :gfx)] 16 16)
|
||||
(compile-sprite tile1 [(. files.game.tiles 2 :gfx)] 16 16)
|
||||
(compile-sprite tile2 [(. files.game.tiles 3 :gfx)] 16 16)
|
||||
(compile-sprite tile3 [(. files.game.tiles 4 :gfx)] 16 16)
|
||||
(compile-sprite tile0 [(. files.game.iso 3 :gfx)] 24 32)
|
||||
(compile-sprite tile1 [(. files.game.iso 5 :gfx)] 24 32)
|
||||
(compile-sprite tile2 [(. files.game.iso 11 :gfx)] 24 32)
|
||||
(compile-sprite tile3 [(. files.game.iso 12 :gfx)] 24 32)
|
||||
(asm tiles (jmp tile0) (nop) (jmp tile1) (nop) (jmp tile2) (nop) (jmp tile3) (nop))
|
||||
|
||||
(form set-palette [(fn [ssc index pal]
|
||||
|
@ -69,32 +69,16 @@
|
|||
(fn draw-test-tiles (i)
|
||||
(when with-shadowing (disable-shadow-writes))
|
||||
(let (x 0 y 0 screen 0x2000)
|
||||
(while (< y 37)
|
||||
(while (< y 26)
|
||||
(let (tile (itile-to-tile (& (+ x y i) 3)))
|
||||
(draw-object screen tile))
|
||||
(set! x (+ x 1))
|
||||
(if (= x 20)
|
||||
(if (= x 12)
|
||||
(do (set! y (+ y 1))
|
||||
(set! x (if (& y 1) 1 0))
|
||||
(set! screen (+ screen [(+ 12 (* 160 4))])))
|
||||
(set! screen (+ screen 8)))))
|
||||
(when with-shadowing
|
||||
(enable-shadow-writes)
|
||||
(if (= with-shadowing 1)
|
||||
(let (x 0 y 0 screen 0x2000)
|
||||
(while (< y 12)
|
||||
(draw-object screen pei-slam-tile)
|
||||
(set! x (+ x 1))
|
||||
(if (= x 20)
|
||||
(do (set! x 0)
|
||||
(set! y (+ y 1))
|
||||
(set! screen (+ screen [(+ 8 (* 1 60 15))])))
|
||||
(set! screen (+ screen 8)))))
|
||||
(let (screen 0x2000 y 0)
|
||||
(while (< y 200)
|
||||
(draw-object screen pei-slam-scanline)
|
||||
(set! screen (+ screen 160))
|
||||
(set! y (+ y 1)))))))
|
||||
(set! x 0)
|
||||
(set! screen (+ screen (if (& y 1) [(+ (- 160 (* 11 12)) (* 160 5) 6)]
|
||||
[(+ (- 160 6 (* 11 12)) (* 160 5))]))))
|
||||
(set! screen (+ screen 12))))))
|
||||
|
||||
(fn draw-test-tiles-forever ()
|
||||
(let (i 0)
|
||||
|
@ -126,11 +110,11 @@
|
|||
(wait-for-key)
|
||||
(let (tile-task (new-task (ref draw-test-tiles-forever)))
|
||||
(wait-for-key)
|
||||
(set! with-shadowing 1)
|
||||
(wait-for-key)
|
||||
(set! with-shadowing 2)
|
||||
(wait-for-key)
|
||||
(set! with-shadowing false)
|
||||
; (set! with-shadowing 1)
|
||||
; (wait-for-key)
|
||||
; (set! with-shadowing 2)
|
||||
; (wait-for-key)
|
||||
; (set! with-shadowing false)
|
||||
(reset-task tile-task (ref yield-forever))
|
||||
(wait-for-key))
|
||||
|
||||
|
|
Loading…
Reference in a new issue