From: jsancho Date: Sun, 14 Aug 2011 07:21:25 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=82b6ef46bb3b913e7b1d09717bc8ec608c3210cd;p=gacela.git --- diff --git a/gacela_tetris.scm b/gacela_tetris.scm index 368953b..e8a97bd 100644 --- a/gacela_tetris.scm +++ b/gacela_tetris.scm @@ -70,12 +70,12 @@ (join-grids (cdr source) (cdr destination) x y))))) (define* (collide-rows row1 row2 #:optional (offset 0)) - (cond ((not (or (null? row1) (null? row2))) #f) + (cond ((or (null? row1) (null? row2)) #f) ((> offset 0) (collide-rows row1 (cdr row2) (- offset 1))) (else (or (and (car row1) (car row2)) (collide-rows (cdr row1) (cdr row2)))))) (define* (collide-grids grid1 grid2 #:optional (x 0) (y 0)) - (cond ((not (or (null? grid1) (null? grid2))) #f) + (cond ((or (null? grid1) (null? grid2)) #f) ((> y 0) (collide-grids grid1 (cdr grid2) x (- y 1))) (else (or (collide-rows (car grid1) (car grid2) x) (collide-grids (cdr grid1) (cdr grid2) x y))))) @@ -94,7 +94,7 @@ (let ((res (filter (lambda (x) (not (row-completed x))) grid))) (define (fill grid n) (cond ((< n 1) grid) - (else (fill (cons (make-list 14) grid) (- n 1))))) + (else (fill (cons (make-list 14 #f) grid) (- n 1))))) (inc-points (- (length grid) (length res))) (fill res (- 20 (length res))))) @@ -191,12 +191,3 @@ (display (/ frame (/ (get-time fps) 1000.0))) (newline) (start-timer update)))))) - -(define o (tetramine-o)) -(define grid (join-grids o (make-list 20 (make-list 14 #f)) 6 0)) - -(define (test) - (display o) (newline) - (display grid) (newline) - (collide-grids o grid 6 0) - (collide-rows (car o) (car grid) 6)) diff --git a/src/gacela_ttf.scm b/src/gacela_ttf.scm index 2a5caed..2281532 100644 --- a/src/gacela_ttf.scm +++ b/src/gacela_ttf.scm @@ -17,8 +17,8 @@ (define* (load-font font-file #:key (size 40) (encoding ft_encoding_unicode)) (let ((font (ftglCreateTextureFont font-file))) -; (ftglSetFontFaceSize font size 72) -; (ftglSetFontCharMap font encoding) + (ftglSetFontFaceSize font size 72) + (ftglSetFontCharMap font encoding) font)) (define* (render-text text font #:key (size #f))