From 51dbcad84472e98af347290b723a0b36d5e61624 Mon Sep 17 00:00:00 2001 From: SouthFox Date: Sat, 2 Nov 2024 23:38:24 +0800 Subject: [PATCH] feat: add xlen for gen-update-list --- game.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/game.scm b/game.scm index d0f62ba..df4b9bd 100644 --- a/game.scm +++ b/game.scm @@ -198,20 +198,21 @@ (find-string-list-len-iter (cdr string-list) (+ (string-length (car (last-pair (car string-list)))) offset) ))) (find-string-list-len-iter string-list 0)) -(define (gen-update-list string-length x y len) - (define (up-iter string-length x y llen part) +(define (gen-update-list string-length x y xlen ylen) + (define (up-iter string-length x y xlen llen part) (if (= 0 llen) part (up-iter string-length x (+ 1 y) + xlen (- llen 1) (append part (list (list (+ (* y string-length) x ) - (+ len (+ (* y string-length) x)) + (+ xlen (+ (* y string-length) x)) )))))) - (up-iter (+ 1 string-length) x y len '())) + (up-iter (+ 1 string-length) x y xlen ylen '())) ;; Main (set! *template* template-task)