From a69b2166b32171b38a9b872b712b05ec40c5afc0 Mon Sep 17 00:00:00 2001 From: d_m Date: Tue, 16 Jul 2024 20:49:19 -0400 Subject: [PATCH] remap sprites, fix colors --- card-sprites.tal | 512 +++++++++++++++++++++++------------------------ cards.tal | 20 +- chr.py | 32 +++ kodiak.tal | 21 +- 4 files changed, 310 insertions(+), 275 deletions(-) create mode 100755 chr.py diff --git a/card-sprites.tal b/card-sprites.tal index 5c1e8ea..b55efe9 100644 --- a/card-sprites.tal +++ b/card-sprites.tal @@ -1,256 +1,256 @@ - ff ff e7 fb e7 fb e7 ff ff 80 98 84 98 84 98 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff ff ff ff ff ff ff 80 80 80 80 80 80 80 80 - ff ff ff ff ff ff ff ff 01 01 01 01 01 01 01 01 - ff fb f1 e0 e0 e4 ff ff 80 84 8e 9f 9f 9b 80 ff - ff e7 df e7 df e7 ff ff 01 19 21 19 21 19 01 ff - ff ff f3 eb e3 eb eb ff ff 80 8c 94 9c 94 94 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff ff ff ff ff ff ff 80 80 80 80 80 80 80 80 - ff ff ff ff ff ff ff ff 01 01 01 01 01 01 01 01 - ff fb f1 e0 f1 fb ff ff 80 84 8e 9f 8e 84 80 ff - ff d7 d7 c7 d7 c7 ff ff 01 29 29 39 29 39 01 ff - f8 f8 fb fb fb f9 f8 fc 85 87 83 83 83 81 80 80 - 0f 0f ff ff 9f 6f ef 0f 51 f1 61 f1 91 61 e1 01 - f8 f8 fb fb fb f9 f8 fc 82 80 87 87 87 87 87 83 - 0f 0f ff ff 9f 6f ef 0f a1 01 61 f1 f1 f1 f1 f1 - 00 7f 6f 54 6f 7e 6d 6d 00 7f 7f 7f 7f 7f 7f 7f - 00 fe f6 2a f6 7e b6 b6 00 fe fe fe fe fe fe fe - 6e 6f 6e 6d 6d 6e 6f 6e 7f 7f 7f 7f 7f 7f 7f 7f - 76 f6 76 b6 b6 76 f6 76 fe fe fe fe fe fe fe fe - 6d 6d 7e 6f 54 6f 7f 00 7f 7f 7f 7f 7f 7f 7f 00 - b6 b6 7e f6 2a f6 fe 00 fe fe fe fe fe fe fe 00 - ff ff eb eb e7 eb eb ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - f8 f8 fb fb fb f9 f8 fc 85 87 83 83 83 81 80 80 - 0f 0f ff ff 9f 6f ef 0f 51 f1 61 f1 91 61 e1 01 - ff f1 fb e0 f1 fb ff ff 80 80 80 80 80 80 80 ff - ff d7 d7 e7 d7 d7 ff ff 01 01 01 01 01 01 01 ff - f8 f0 f0 f2 f3 d9 c1 e1 80 80 80 82 83 83 81 81 - 1f 0f ef ef ef ef ff ff 01 01 e1 41 e1 f1 e1 81 - f8 f0 f0 f2 f3 d9 c1 e1 87 8f 8f 8f 8f a5 bf 9f - 1f 0f ef ef ef ef ff ff e1 f1 f1 51 f1 e1 e1 81 - 00 00 00 00 00 00 00 00 ff ea ff bf ff bb ff bf - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff e3 eb eb e7 f3 ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - f8 f0 f0 f2 f3 d9 c1 e1 80 80 80 82 83 83 81 81 - 1f 0f ef ef ef ef ff ff 01 01 e1 41 e1 f1 e1 81 - ff ec f4 fb e4 e4 ff ff 80 80 80 80 80 80 80 ff - ff cf e7 d7 d7 c7 ff ff 01 01 01 01 01 01 01 ff - fe fc f8 f8 f9 f8 f9 ff 81 83 80 80 81 80 81 83 - 3f 1f 1f ff ff ff ff ff c1 e1 01 e1 41 e1 e1 c1 - fe fc f8 f8 f9 f8 f9 ff 80 80 87 87 87 87 87 83 - 3f 1f 1f ff ff ff ff ff 01 01 e1 e1 41 e1 e1 c1 - ff ff f3 eb e3 eb eb ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff f3 eb e3 eb eb ff ff 80 8c 94 9c 94 94 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff f3 eb e3 eb eb ff ff 80 8c 94 9c 94 94 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff f3 eb e3 eb eb ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - 80 c0 e0 f0 f8 e0 10 00 80 c0 e0 f0 f8 e0 10 00 - 00 00 00 00 00 00 00 00 df ca c7 83 c1 83 fb bf - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff e7 fb f7 ef e3 ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff e7 fb f7 ef e3 ff ff 80 98 84 88 90 9c 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff e7 fb f7 ef e3 ff ff 80 98 84 88 90 9c 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff e7 fb f7 ef e3 ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - 00 00 00 00 00 00 00 00 ff ea ff bf ff bb ff bf - 00 00 00 00 00 00 00 00 ef e2 e3 a1 e0 a1 fd bf - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff e7 fb e7 fb e7 ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff e7 fb e7 fb e7 ff ff 80 98 84 98 84 98 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff e7 fb e7 fb e7 ff ff 80 98 84 98 84 98 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff e7 fb e7 fb e7 ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff eb eb e3 fb fb ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff eb eb e3 fb fb ff ff 80 94 94 9c 84 84 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff eb eb e3 fb fb ff ff 80 94 94 9c 84 84 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff eb eb e3 fb fb ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff e3 ef e3 fb e7 ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff e3 ef e3 fb e7 ff ff 80 9c 90 9c 84 98 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff e3 ef e3 fb e7 ff ff 80 9c 90 9c 84 98 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff e3 ef e3 fb e7 ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - f8 f8 fb fb fb f9 f8 fc 85 87 83 83 83 81 80 80 - 0f 0f ff ff 9f 6f ef 0f 51 f1 61 f1 91 61 e1 01 - f8 f8 fb fb fb f9 f8 fc 82 80 87 87 87 87 87 83 - 0f 0f ff ff 9f 6f ef 0f a1 01 61 f1 f1 f1 f1 f1 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff f3 ef e3 eb e3 ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff f3 ef e3 eb e3 ff ff 80 8c 90 9c 94 9c 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff f3 ef e3 eb e3 ff ff 80 8c 90 9c 94 9c 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff f3 ef e3 eb e3 ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - f8 f0 f0 f2 f3 d9 c1 e1 80 80 80 82 83 83 81 81 - 1f 0f ef ef ef ef ff ff 01 01 e1 41 e1 f1 e1 81 - f8 f0 f0 f2 f3 d9 c1 e1 87 8f 8f 8f 8f a5 bf 9f - 1f 0f ef ef ef ef ff ff e1 f1 f1 51 f1 e1 e1 81 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff e3 fb f7 f7 f7 ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff e3 fb f7 f7 f7 ff ff 80 9c 84 88 88 88 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff e3 fb f7 f7 f7 ff ff 80 9c 84 88 88 88 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff e3 fb f7 f7 f7 ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - fe fc f8 f8 f9 f8 f9 ff 81 83 80 80 81 80 81 83 - 3f 1f 1f ff ff ff ff ff c1 e1 01 e1 41 e1 e1 c1 - fe fc f8 f8 f9 f8 f9 ff 80 80 87 87 87 87 87 83 - 3f 1f 1f ff ff ff ff ff 01 01 e1 e1 41 e1 e1 c1 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff e3 eb e3 eb e3 ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff e3 eb e3 eb e3 ff ff 80 9c 94 9c 94 9c 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff e3 eb e3 eb e3 ff ff 80 9c 94 9c 94 9c 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff e3 eb e3 eb e3 ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff e3 eb e3 fb e7 ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff e3 eb e3 fb e7 ff ff 80 9c 94 9c 84 98 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff e3 eb e3 fb e7 ff ff 80 9c 94 9c 84 98 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff e3 eb e3 fb e7 ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff d1 d5 d5 d5 d1 ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff d1 d5 d5 d5 d1 ff ff 80 ae aa aa aa ae 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff d1 d5 d5 d5 d1 ff ff 80 ae aa aa aa ae 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff d1 d5 d5 d5 d1 ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff f3 fb fb fb e7 ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff f3 fb fb fb e7 ff ff 80 8c 84 84 84 98 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff f3 fb fb fb e7 ff ff 80 8c 84 84 84 98 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff f3 fb fb fb e7 ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff e3 eb eb e7 f3 ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff e3 eb eb e7 f3 ff ff 80 9c 94 94 98 8c 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff e3 eb eb e7 f3 ff ff 80 9c 94 94 98 8c 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff e3 eb eb e7 f3 ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ff ff eb eb e7 eb eb ff ff 80 80 80 80 80 80 80 - ff ff df 8f 07 df 8f ff ff 01 01 01 01 01 01 01 - ff ff eb eb e7 eb eb ff ff 80 94 94 98 94 94 80 - ff ff 27 07 07 8f df ff ff 01 d9 f9 f9 71 21 01 - ff ff eb eb e7 eb eb ff ff 80 94 94 98 94 94 80 - ff ff df 8f 07 8f df ff ff 01 21 71 f9 71 21 01 - ff ff eb eb e7 eb eb ff ff 80 80 80 80 80 80 80 - ff ff 27 27 df 2f 37 ff ff 01 01 01 01 01 01 01 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 7f 67 7b 67 7b 67 7f 00 00 18 04 18 04 18 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +7f 7f 7f 7f 7f 7f 7f 7f 00 00 00 00 00 00 00 00 +fe fe fe fe fe fe fe fe 00 00 00 00 00 00 00 00 +7f 7b 71 60 60 64 7f 00 00 04 0e 1f 1f 1b 00 00 +fe e6 de e6 de e6 fe 00 00 18 20 18 20 18 00 00 +00 7f 73 6b 63 6b 6b 7f 00 00 0c 14 1c 14 14 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +7f 7f 7f 7f 7f 7f 7f 7f 00 00 00 00 00 00 00 00 +fe fe fe fe fe fe fe fe 00 00 00 00 00 00 00 00 +7f 7b 71 60 71 7b 7f 00 00 04 0e 1f 0e 04 00 00 +fe d6 d6 c6 d6 c6 fe 00 00 28 28 38 28 38 00 00 +7a 78 7c 7c 7c 7e 7f 7f 07 07 04 04 04 06 07 03 +ae 0e 9e 0e 6e 9e 1e fe f0 f0 00 00 60 90 10 f0 +7d 7f 78 78 78 78 78 7c 07 07 04 04 04 06 07 03 +5e fe 9e 0e 0e 0e 0e 0e f0 f0 00 00 60 90 10 f0 +ff 80 80 80 80 80 80 80 ff 80 90 ab 90 81 92 92 +ff 01 01 01 01 01 01 01 ff 01 09 d5 09 81 49 49 +80 80 80 80 80 80 80 80 91 90 91 92 92 91 90 91 +01 01 01 01 01 01 01 01 89 09 89 49 49 89 09 89 +80 80 80 80 80 80 80 ff 92 92 81 90 ab 90 80 ff +01 01 01 01 01 01 01 ff 49 49 81 09 d5 09 01 ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 14 14 18 14 14 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +7a 78 7c 7c 7c 7e 7f 7f 07 07 04 04 04 06 07 03 +ae 0e 9e 0e 6e 9e 1e fe f0 f0 00 00 60 90 10 f0 +7f 7f 7f 7f 7f 7f 7f 00 00 0e 04 1f 0e 04 00 00 +fe fe fe fe fe fe fe 00 00 28 28 18 28 28 00 00 +7f 7f 7f 7d 7c 7c 7e 7e 07 0f 0f 0d 0c 26 3e 1e +fe fe 1e be 1e 0e 1e 7e e0 f0 10 10 10 10 00 00 +78 70 70 70 70 5a 40 60 07 0f 0f 0d 0c 26 3e 1e +1e 0e 0e ae 0e 1e 1e 7e e0 f0 10 10 10 10 00 00 +00 15 00 40 00 44 00 40 ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 1c 14 14 18 0c 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +7f 7f 7f 7d 7c 7c 7e 7e 07 0f 0f 0d 0c 26 3e 1e +fe fe 1e be 1e 0e 1e 7e e0 f0 10 10 10 10 00 00 +7f 7f 7f 7f 7f 7f 7f 00 00 13 0b 04 1b 1b 00 00 +fe fe fe fe fe fe fe 00 00 30 18 28 28 38 00 00 +7e 7c 7f 7f 7e 7f 7e 7c 01 03 07 07 06 07 06 00 +3e 1e fe 1e be 1e 1e 3e c0 e0 e0 00 00 00 00 00 +7f 7f 78 78 78 78 78 7c 01 03 07 07 06 07 06 00 +fe fe 1e 1e be 1e 1e 3e c0 e0 e0 00 00 00 00 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 0c 14 1c 14 14 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 73 6b 63 6b 6b 7f 00 00 0c 14 1c 14 14 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 73 6b 63 6b 6b 7f 00 00 0c 14 1c 14 14 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 0c 14 1c 14 14 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +7f 3f 1f 0f 07 1f ef ff 7f 3f 1f 0f 07 1f ef ff +20 35 38 7c 3e 7c 04 40 ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 18 04 08 10 1c 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 67 7b 77 6f 63 7f 00 00 18 04 08 10 1c 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 67 7b 77 6f 63 7f 00 00 18 04 08 10 1c 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 18 04 08 10 1c 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +00 15 00 40 00 44 00 40 ff ff ff ff ff ff ff ff +10 1d 1c 5e 1f 5e 02 40 ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 18 04 18 04 18 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 67 7b 67 7b 67 7f 00 00 18 04 18 04 18 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 67 7b 67 7b 67 7f 00 00 18 04 18 04 18 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 18 04 18 04 18 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 14 14 1c 04 04 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 6b 6b 63 7b 7b 7f 00 00 14 14 1c 04 04 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 6b 6b 63 7b 7b 7f 00 00 14 14 1c 04 04 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 14 14 1c 04 04 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 1c 10 1c 04 18 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 63 6f 63 7b 67 7f 00 00 1c 10 1c 04 18 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 63 6f 63 7b 67 7f 00 00 1c 10 1c 04 18 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 1c 10 1c 04 18 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +7a 78 7c 7c 7c 7e 7f 7f 07 07 04 04 04 06 07 03 +ae 0e 9e 0e 6e 9e 1e fe f0 f0 00 00 60 90 10 f0 +7d 7f 78 78 78 78 78 7c 07 07 04 04 04 06 07 03 +5e fe 9e 0e 0e 0e 0e 0e f0 f0 00 00 60 90 10 f0 +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 0c 10 1c 14 1c 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 73 6f 63 6b 63 7f 00 00 0c 10 1c 14 1c 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 73 6f 63 6b 63 7f 00 00 0c 10 1c 14 1c 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 0c 10 1c 14 1c 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +7f 7f 7f 7d 7c 7c 7e 7e 07 0f 0f 0d 0c 26 3e 1e +fe fe 1e be 1e 0e 1e 7e e0 f0 10 10 10 10 00 00 +78 70 70 70 70 5a 40 60 07 0f 0f 0d 0c 26 3e 1e +1e 0e 0e ae 0e 1e 1e 7e e0 f0 10 10 10 10 00 00 +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 1c 04 08 08 08 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 63 7b 77 77 77 7f 00 00 1c 04 08 08 08 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 63 7b 77 77 77 7f 00 00 1c 04 08 08 08 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 1c 04 08 08 08 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +7e 7c 7f 7f 7e 7f 7e 7c 01 03 07 07 06 07 06 00 +3e 1e fe 1e be 1e 1e 3e c0 e0 e0 00 00 00 00 00 +7f 7f 78 78 78 78 78 7c 01 03 07 07 06 07 06 00 +fe fe 1e 1e be 1e 1e 3e c0 e0 e0 00 00 00 00 00 +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 1c 14 1c 14 1c 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 63 6b 63 6b 63 7f 00 00 1c 14 1c 14 1c 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 63 6b 63 6b 63 7f 00 00 1c 14 1c 14 1c 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 1c 14 1c 14 1c 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 1c 14 1c 04 18 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 63 6b 63 7b 67 7f 00 00 1c 14 1c 04 18 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 63 6b 63 7b 67 7f 00 00 1c 14 1c 04 18 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 1c 14 1c 04 18 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 2e 2a 2a 2a 2e 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 51 55 55 55 51 7f 00 00 2e 2a 2a 2a 2e 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 51 55 55 55 51 7f 00 00 2e 2a 2a 2a 2e 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 2e 2a 2a 2a 2e 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 0c 04 04 04 18 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 73 7b 7b 7b 67 7f 00 00 0c 04 04 04 18 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 73 7b 7b 7b 67 7f 00 00 0c 04 04 04 18 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 0c 04 04 04 18 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 1c 14 14 18 0c 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 63 6b 6b 67 73 7f 00 00 1c 14 14 18 0c 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 63 6b 6b 67 73 7f 00 00 1c 14 14 18 0c 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 1c 14 14 18 0c 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 7f 7f 7f 7f 7f 7f 7f 00 00 14 14 18 14 14 00 +00 fe fe fe fe fe fe fe 00 00 20 70 f8 20 70 00 +00 7f 6b 6b 67 6b 6b 7f 00 00 14 14 18 14 14 00 +00 fe 26 06 06 8e de fe 00 00 d8 f8 f8 70 20 00 +00 7f 6b 6b 67 6b 6b 7f 00 00 14 14 18 14 14 00 +00 fe de 8e 06 8e de fe 00 00 20 70 f8 70 20 00 +00 7f 7f 7f 7f 7f 7f 7f 00 00 14 14 18 14 14 00 +00 fe fe fe fe fe fe fe 00 00 d8 d8 20 d0 c8 00 +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff diff --git a/cards.tal b/cards.tal index 4abe990..cff3768 100644 --- a/cards.tal +++ b/cards.tal @@ -289,20 +289,12 @@ DEOk DEOk DEOk DEOk DEOk DEOk DEOk DEOk DEOk DEOk DEOk DEOk DEOk DEOk DEOk DEO JMP2r -( @draw-mask ( idx* x* y* -> ) - .Screen/y DEO2 .Screen/x DEO2 - OVR #80 LTH ?draw-mask-up POP2 !draw-mask-down ) - -( @draw-card ( idx* x* y* -> ) - .Screen/y DEO2 .Screen/x DEO2 - OVR #80 LTH ?draw-face-up POP2 !draw-face-down ) - @draw-spot-down ( -> ) #16 .Screen/auto DEO ( ; draw 2 tiles, increment x and addr ) ( ;masks #0080 ADD2 .Screen/addr DEO2 ) ( #02 set-sprite-3x ) ;masks #0100 ADD2 .Screen/addr DEO2 - #81 set-sprite-3x + #8d set-sprite-3x JMP2r ( assumes x/y already set ) @@ -311,7 +303,7 @@ ( ;masks #0080 ADD2 .Screen/addr DEO2 ) ( #04 set-sprite-3x ) ;masks #0100 ADD2 .Screen/addr DEO2 - #8d set-sprite-3x ( TODO fixme ) + #86 set-sprite-3x ( TODO fixme ) JMP2r ( assumes x/y already set ) @@ -354,13 +346,13 @@ ADD2 STH2r #0020 MUL2 ADD2 ( idx* a=card+384+128r+16q* ) STH2k .Screen/addr DEO2 ( idx* [a*] ) ( #04 set-sprite ( idx* [a*] ; draw top of card ) ) - #8d set-sprite ( idx* [a*] ; draw top of card ) + #86 set-sprite ( idx* [a*] ; draw top of card ) find-middle-addr ( mid* [a*] ) ( ;tiles SUB2 #01 SFT2 ;masks ADD2 ) ;tiles SUB2 ;masks ADD2 .Screen/addr DEO2 ( [a*] ) ( #04 set-sprite ( [a*] ; draw middle of card ) ) - #8d set-sprite ( [a*] ; draw middle of card ) + #86 set-sprite ( [a*] ; draw middle of card ) ( STH2r DUP2 #0008 ADD2 ( a* a+8* ) ) STH2r DUP2 #0010 ADD2 ( a* a+8* ) @@ -369,10 +361,10 @@ .Screen/addr DEO2 ( ) #01 .Screen/auto DEO ( ; draw 1 tile, increment x ) ( #34 set-sprite ( ; draw bottom left of card ) ) - #bd set-sprite ( ; draw bottom left of card ) + #b6 set-sprite ( ; draw bottom left of card ) .Screen/addr DEO2 ( ) ( #34 set-sprite ( ; draw bottom right of card ) ) - #bd set-sprite ( ; draw bottom right of card ) + #b6 set-sprite ( ; draw bottom right of card ) JMP2r ( assumes x/y already set ) diff --git a/chr.py b/chr.py new file mode 100755 index 0000000..c02e148 --- /dev/null +++ b/chr.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python + +from sys import argv, stderr, exit + +if __name__ == "__main__": + if len(argv[1:]) != 1: + print('usage: %s PATH' % argv[0]) + exit(0) + path = argv[1] + + # we index each pixel into this list to see what value to use + # this should be exactly 4 values in the range 0-3. + # normally you won't want two duplicate values, since this + # will lose information. + translate = [3, 1, 2, 0] + + for i, line in enumerate(open(path, 'r')): + toks = line.strip().split() + if len(toks) != 16: + stderr.write('line %d is invalid: %r\n' % (i + 1, line)) + exit(1) + bytes = [int(t, 16) for t in toks] + output = [0] * 16 + + for i in range(0, 8): + for j in range(0, 8): + x = (bytes[i] >> j) & 1 + y = (bytes[i + 8] >> j) & 1 + z = translate[x + y * 2] + output[i] |= ((z & 1) << j) + output[i + 8] |= (((z & 2) << j) // 2) + print(' '.join(['%02x' % o for o in output])) diff --git a/kodiak.tal b/kodiak.tal index de0f092..8586b72 100644 --- a/kodiak.tal +++ b/kodiak.tal @@ -39,9 +39,13 @@ &mouse-y $2 ] ( previous y-coordinate ) |0100 - #2d8b .System/r DEO2 - #2d18 .System/g DEO2 - #2d14 .System/b DEO2 +( #2d8b .System/r DEO2 ) +( #2d18 .System/g DEO2 ) +( #2d14 .System/b DEO2 ) + + #bd82 .System/r DEO2 + #8d12 .System/g DEO2 + #4d12 .System/b DEO2 #0100 .Screen/w DEO2 #00c0 .Screen/h DEO2 @@ -69,7 +73,12 @@ BRK @draw ( -> ) - draw-background draw-stock draw-waste draw-foundation !draw-tableau + draw-background + draw-stock + draw-waste + draw-foundation + draw-tableau + !draw-curr-mouse @initialize ( start^ count^ -> ) OVR ADD SWP STH2 #00 ( 0^ [lim=start+count^ start^] ) @@ -253,8 +262,9 @@ @draw-curr-mouse ( -> ) .Mouse/x DEI2 DUP2 .prev/mouse-x STZ2 .Screen/x DEO2 .Mouse/y DEI2 DUP2 .prev/mouse-y STZ2 .Screen/y DEO2 + .dragging LDZ ?&skip ;cursor .Screen/addr DEO2 - #43 .Screen/sprite DEO JMP2r + #43 .Screen/sprite DEO &skip JMP2r @on-click-down ( -> ) .Mouse/state DEI ( state^ ) @@ -269,6 +279,7 @@ @release ( -> ) clear-prev-hold + draw-curr-mouse .held LDZ2 SWP ( last^ first^ ) &loop DUP LDZk #80 EOR SWP STZ ( last^ first ; first<-c^0x80 ) INC LTHk #00 EQU ?&loop ( last^ first+1^ )