From 107410c3f033f415396629557ed012196874a335 Mon Sep 17 00:00:00 2001 From: dzp Date: Mon, 8 Apr 2024 21:15:58 +0800 Subject: [PATCH] =?UTF-8?q?SQUASH:=20feat:=20hzk12=20=E7=82=B9=E9=98=B5?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E7=BE=8E=E5=8C=96=E6=98=BE=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E6=96=B9=E4=BE=BF=E8=BE=A8=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/lib/hzk12.tin | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/plugins/lib/hzk12.tin b/plugins/lib/hzk12.tin index f13b6503..dd2fb5c8 100644 --- a/plugins/lib/hzk12.tin +++ b/plugins/lib/hzk12.tin @@ -30,23 +30,28 @@ PaoTin++ © 2020~2024 的所有版权均由担子炮(dzp ) {right} {&2} }; #local word {$word}; - #list lines add {{$word[left]}}; + #local line {$word[left]}; + #replace line {%+1S} {1}; + #replace line {%+1s} {0}; + #list lines add {{$line}}; #local word {$word[right]}; }; + hzk12.draw-block {$lines}; +}; + +#alias {hzk12.draw-block} { + #local lines {%1}; + #local code {}; #local n {}; #loop {1} {6} {n} { #local first {@math.Eval{$n * 2 - 1}}; #local first {$lines[$first]}; - #replace first {%+1S} {1}; - #replace first {%+1s} {0}; #list first {tokenize} {$first}; #local second {@math.Eval{$n * 2}}; #local second {$lines[$second]}; - #replace second {%+1S} {1}; - #replace second {%+1s} {0}; #list second {tokenize} {$second}; #local i {}; @@ -66,18 +71,18 @@ PaoTin++ © 2020~2024 的所有版权均由担子炮(dzp ) #alias {hzk12.test} { #local word { - |^ ^ ^ ^ | - | ^ ^^ ^ | - |^^^^^^ ^^^^^ | - | ^^ ^ ^ | - | ^ ^^ ^ ^ | - |^ ^ ^ | - | ^ ^ ^ | - |^^^^^^ ^ ^ | - | ^ ^ ^ | - | ^^ ^ | - | ^ ^ ^ ^ | - |^^ ^^ ^^ | + | * * | + | * * * | + | * ******* | + |* * ** * | + |* ** **** * | + |* * * * * | + |* * * * * | + | * **** * | + | * * * ** | + | * ** * | + |* * * | + | ****** | }; hzk12.Beautify {$word};