From 730360b78685f1f3c0641d3e4c00e8f521622a8e Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 13 Nov 2024 19:59:31 -0800 Subject: [PATCH] Add RLE encoding --- images/apple/DCGR-TK.PO | Bin 143360 -> 143360 bytes src/inc/dcgrutils.plh | 1 + src/libsrc/apple/dcgrutils.pla | 28 ++++++++++++++++++++++++++++ src/samplesrc/dcgrtest.pla | 15 ++++++++++----- 4 files changed, 39 insertions(+), 5 deletions(-) diff --git a/images/apple/DCGR-TK.PO b/images/apple/DCGR-TK.PO index a0e21eaa45f72dde1ebde8ce43b8180dad0e9d0e..72ba7eddfaf2c411bcff5abb00d46ebf33397d0b 100755 GIT binary patch delta 3997 zcmZYC3tUuH9>DQ)FEhgc^I|UG3uQo@KtUcp0z<`or67=^w(hoyFe3;e(gcRqIBHqG z*6XmknVV+H+S-~jmR6Q2qT)N$)oRPM&8^k#VcTOhWq&iEZl9gc=X?ME^SF2BoOAEo zdl!7FU+}4Z$Kx7#km9Y?d?9Blz9Q{To!26pq&8oyAvw@eVCh8%U#+D@%6LO7X6?>Y z^x`u?GDry#$s>l39zU^gOzwof1-TCiq1h>dM7kVkz1Phr$x9`#95KZFM#e9ieEAVO zCBu*?*&)Q0?vWz7r_T@-BulH<;~S~5YlPALh$7n+YonN^Tkq18-m>OKixQ1fp81`1 z=8x8y|FO=zX_fmY1Q&MhR$vOW_)Gf2qg~qf$_jRA?fb)bXs1=0vlirr3a2^CZCO`i zwjT*phPPLS2P(sz!A^61O|Ub>8D3u#(nD0}vYf&8Q{g*w)9e@hTg$pN^oZ{voFVqF z1J!MJs>AE!gGG9YZi=$`Xq!uy+GC31i?~mgBX8IWtimZuZ(HN|dNKdDwQ!Wp+b40B zOjwuLXY7fXI!UpgkEzor_DeB!!HWHAOkJpAzZp|!RP154I*VfOW~);adoNpElw!}a z)pb$q>9)FPg~PUW9Jb9`c*AS%onpLU6MTU@_m))@Uh(Dh&Ixj#h!OI6T*6h{M3_y; z-Ovl^$ig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BX zr8DjFz6e8BT?0YXr?M&9SSs1&gwjHX+@-lJqU*Y3MPxp?gv;L{t98w&b~}HGl1!=2 z|I6&{$d&YwU2S4PBs+A2Qny1lC|`=$`i=Z={{X7HiBK`Y#4zKNVMe9&`#q97to}S2 z9DAiH=K2OM#0RZl<36c-&2%=8>ocoBPKjKOCI0F@MN+XQ0jHb%bV4&CZnD%Sez-kW+m7s Z)Eys%$ay*9ZHG~$>tRdpN*mspr_xorg, 96-i=>spr_yorg, i=>spr_width, i=>spr_height, i=>spr_pixmap) + dcgrPixMap(73-i=>spr_xorg, 96-i=>spr_yorg, i=>spr_width, i=>spr_height, i=>spr_pixmap) while ^$C000 < 128 - dcgrPixMap(70-i=>spr_xorg, 96-i=>spr_yorg, i=>spr_width, i=>spr_height, i=>spr_pixmap) + dcgrPixMap(73-i=>spr_xorg, 96-i=>spr_yorg, i=>spr_width, i=>spr_height, i=>spr_pixmap) i = i + t_sprite k++ if k > 7 k = 0 i = @ncc1701 fin - dcgrPixMap(70-i=>spr_xorg, 96-i=>spr_yorg, i=>spr_width, i=>spr_height, i=>spr_pixmap) + dcgrPixMap(73-i=>spr_xorg, 96-i=>spr_yorg, i=>spr_width, i=>spr_height, i=>spr_pixmap) loop getc dcgrOp(OP_SRC) while ^$C000 < 128 dcgrColor(CLR_BLACK) dcgrClearBl7(60/7, 75, 5, 43) - dcgrPixMap(70-i=>spr_xorg, 96-i=>spr_yorg, i=>spr_width, i=>spr_height, i=>spr_pixmap) + dcgrPixMap(73-i=>spr_xorg, 96-i=>spr_yorg, i=>spr_width, i=>spr_height, i=>spr_pixmap) i = i + t_sprite k++ if k > 7 @@ -433,6 +435,9 @@ def dcgrTest#0 next getc end + +rlesprptr = heapmark +heapalloc(dcgrEncPixMap(SPR_W, SPR_H, @sprite, rlesprptr)) dcgrMode(0) dhgrTest screenRead("monarch")