draw.ed (1239B)
1 /#include "pool/d 2 ,s/(i=x\&(npack-1))/(&)/ 3 ,s/(p=b.grey)/(&)/ 4 ,s/(p=b.red)/(&)/ 5 ,s/(p=b.grn)/(&)/ 6 ,s/(p=b.blu)/(&)/ 7 g/imagmem/d 8 ,s/SET(bits)/bits=0/ 9 g/ptrfn/d 10 g/^static.*drawbuf;/d 11 /^readcmap/+4a 12 memset(&b, 0, sizeof b); // shut up gcc 13 . 14 /^readptr/+4a 15 memset(&b, 0, sizeof b); // shut up gcc 16 . 17 /^readnbit/+4a 18 memset(&b, 0, sizeof b); // shut up gcc 19 . 20 /^ static int n = 0;/d 21 /pixel value is now in high/ s!/\*!//! 22 /^static Dbuf dbuf/a 23 extern int _tas(int*); 24 . 25 /^imgtorgba/ s/^/_/ 26 .-1s/static // 27 /^rgbatoimg/ s/^/_/ 28 .-1s/static // 29 /^pixelbits/ s/^/_/ 30 .-1s/static // 31 /^memfillcolor/ s/^/_/ 32 ,s/draw(\&par)/draw(par)/g 33 /Now that we've clipped/-2i 34 35 return ∥ 36 } 37 38 void 39 _memimagedraw(Memdrawparam *par) 40 { 41 if(par == nil) 42 return; 43 . 44 /^ Memdrawparam par/ s/Mem/static Mem/ 45 /^memimagedraw/ s/memimagedraw/_memimagedrawsetup/ 46 .-1s/void/Memdrawparam*/ 47 .,/return \&par/ s/return;/return nil;/ 48 /^static ulong imgtorgba/d 49 /^static ulong rgbatoimg/d 50 /^static ulong pixelbits/d 51 /^memimageinit/ s/^/_/ 52 ,s/_ifmt/__ifmt/g 53 ,s/ imgtorgba/ _imgtorgba/g 54 ,s/ rgbatoimg/ _rgbatoimg/g 55 /^memsetb/-1i 56 #if 0 57 . 58 /^}/a 59 #endif 60 . 61 /^memsets 62 ,s/Replsrc|Simplesrc/Replsrc|Simplesrc|Fullsrc/g 63 /par.srgba\&0xFF/i 64 if((par.srgba&0xFF) == 0xFF) 65 par.state |= Fullsrc; 66 .