From 4656739d28eb6db73dc1f45af3381c07f084f078 Mon Sep 17 00:00:00 2001 From: b Date: Sat, 28 Dec 2013 20:14:44 +0000 Subject: [PATCH] The world's smallest NewpixbOTTification git-svn-id: svn://botcastle1b/npb@9 0d794883-4e4e-4f65-aa7a-0e7f5947bab5 --- npb | Bin 10224 -> 10946 bytes npb.cpp | 53 +++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 6 deletions(-) diff --git a/npb b/npb index c72f199937a383abb315a5e6a07f31abeb0deb5d..1d5b27ec20c223cc788a429eef587b4d9c9b9537 100755 GIT binary patch literal 10946 zcmb7K3vg6bnm)I?)47t6golF2NCOFiN+&4d10O&VAQ&D(Z~zA{opdMNPNzF`-v;9P z0KzL9ae}&*qpr%hJLOh64prk?4CpKnM6sr}qT{&itTn}~=ynWKn^{qDow4`(&bcSK zX~CL3U8n#5`~UyE{(H{3=bU>UuB~5a7>3ZnBfNrWV7Jel4Z7h9rI{@P!W7d*g_t7z z5K%XKD{K&D0wgMc%!lZu4tVx9=n=;NGg8OA8D(Hv#3x1x!N~NYOzEX;KXix>Ai=YU zESGu@$P2K40XoJq=oqPI8H|g87jN^Kj5WZFTDRh3JNzv2dA8eUGRn5N^mjoI_^qJx zuZ+hUE92pr@mM0WC74bIuTyy=OWC$X%T~*@tS8eS ztQYHNBGUJTi0)7VFv1aB3OdfM1kd&|uwK;b_U;h@L!6m+iB7|E4t@041J$*^J^S*V zA00Wham~bE?)_6q|8M@AMGOl+cOm*=V;;UU57R$71i(1mRf>q`N>2STzXm$h3B(_1 z02)AyxG?p<%ESMdhjT6*0RM;!GyQ@*{AM0rn}?U@)$hl7`Umsyl05r%;Hnoft`N$^ zpK{H>WiC7y`0S5-Ci}@KShVKpDJ6^k#3CBhPbuTO>s`RZh1QzT_;)uM=9m#`x(5vH$BwzazyH6c3$ z>2lb|LxYM{p-n8gCK8X>5vMpbDQ$PGNkC0H-{tUCIF_(7=}1^aw!j%}85>TrXyo{@H55w-D-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@8_{*zj`uj)Pt`wS68g3_0@u3w61#m< zvG3AKkKIz&PM6~dHdoh{*b%OD?Q~KvPZQ!FH1NcSY|FaSszX?WuP=#@I*L5S6GyK{ zKS0N*h5Tj^>ls}`j&ZhycE@3`#3S%TtxXD?cgqCo##+tC3agYk?<%Y!Ke>Y1E}6viNi z<9wqqM{ePFfOPF;C_@ftjlNM2AerN;?}PZGh+z&tOqX#*5@G9e*swDdVm`!PZzkZ zKLho52$*LlVCd)7>OR=5PXqNmc8-5P@9oFT-!Q@*`;rQ8;D-7wU~hi^37GR87}B3E zE`#gzxiXRaBR4%_Zhdw88EC)H0PFS%qV#p146t`BD#5%Y*p2TPN5W*3X9F;IwHzsv zQ2x!px_?s7`)KWg@Oak_#E(PI@0|)?BMty_r>f&S1nj+k=2Dz{Zl3uu{%63oV}73n z=H8cL=I6N*{Tm(}gw1&mX86k`_&SN{+&&nr&3_#m)OpZEV? z1J;h|eG^z-q`=SmIa;Fss}ej6EHAZO``1hK+@1`&_T2*<66lT2rGxPalGKkbEXF#uS@ad3s@4D>p1(-E1|lY2p(LSpwI; zs%`Cx;w diff --git a/npb.cpp b/npb.cpp index 3cd9d19..d9a7769 100644 --- a/npb.cpp +++ b/npb.cpp @@ -1,6 +1,6 @@ // // It's NewpixbOTTification Time! // // Take a picture and add a newpixbot to it! - // // Requires Dev Image Library + // // Requires Dev Image Library, on Pentium III libdevil must be recompiled with --disable-ssl2 --disable-ssl3 // // // // ~~bicyclesonthemoon @@ -35,6 +35,7 @@ ILboolean inH=false; ILboolean outH=false; ILboolean npbH=false; ILuint inX, inY; +ILubyte *newdata; int main (int argc, const char *argv[]) { @@ -49,7 +50,7 @@ int main (int argc, const char *argv[]) ilInit(); if(!ilEnable(IL_ORIGIN_SET))mustard(FAIL); if(!ilEnable(IL_FILE_OVERWRITE))mustard(FAIL); - ilClearColour(0,200,0,0); + ilClearColour(0,0,0,0); ilGenImages(1, &inPix); inH=true; ilBindImage(inPix); @@ -80,14 +81,51 @@ void loadnpb(const char *path) void npbottify0(const char *path) { + //newdata= new ILubyte[X0*Y0*4]; ilGenImages(1, &outPix); outH=true; - ilBindImage(outPix); - if(!ilTexImage(X0,Y0,1,4,IL_RGBA,IL_UNSIGNED_BYTE,NULL))mustard(OUTPIX_MUSTARD); - //ilBindImage(outPix); - //if(!ilClearImage())mustard(FAIL); loadnpb(NPBPIX0); ilBindImage(outPix); + if(!ilCopyImage(npbPix))mustard(FAIL); + //if(!ilTexImage(X0,Y0,1,4,IL_RGBA,IL_UNSIGNED_BYTE,NULL))mustard(OUTPIX_MUSTARD); + //if(!ilConvertImage(IL_RGBA,IL_UNSIGNED_BYTE))mustard(OUTPIX_MUSTARD); + newdata=ilGetData(); + for(unsigned long i=0;i=X01+(X02-inX)/2)&& + (i< X01+(X02-inX)/2+inX)&& + (j>=Y01+(Y02-inY)/2)&& + (j< Y01+(Y02-inY)/2+inY)) + { + newdata[4*(i+X0*j)+0]=0xFF; + newdata[4*(i+X0*j)+1]=0xFF; + newdata[4*(i+X0*j)+2]=0xFF; + newdata[4*(i+X0*j)+3]=0xFF; + } + else if((i>=X01)&&(i=Y01)&&(j