From bfb2cab558ba020f50b8a27ecf67d710b741a093 Mon Sep 17 00:00:00 2001 From: b Date: Sat, 28 Dec 2013 23:16:23 +0000 Subject: [PATCH] ALL OF THEM! git-svn-id: svn://botcastle1b/npb@13 0d794883-4e4e-4f65-aa7a-0e7f5947bab5 --- npb | Bin 12240 -> 15624 bytes npb.cpp | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 102 insertions(+), 8 deletions(-) diff --git a/npb b/npb index 1ffc8da8755959d97ddecb40ff446ad504fff741..ac27a5b06420aacb259cd826770baea84513825b 100755 GIT binary patch literal 15624 zcmeHOdz4hgnXlWA;VQ$-@C+h}4Gx5dG*4eq!@$e{BO@RT3ZgbWGd? zqZ|Wo)vcoOLkI13eFQGgpCT*0M!!TaDLzQiyB5>@k@O<+no)^$#U& ze{wWZKRMbsDH@3-*ZLE2|1@PAuF1B|U9eP^rJpP_0-1FWL1t_yKi5`2_~GCCA37cy zvFz_WKi%;7gx`EH5Hf^8>RkbdCWv9kgOHh6b^!8a$Rm-5B43HzANdo=Ost1~Tq@Bo zCWJuxX96 zbgaPMmq8!ghcSm#CeCHP2ztAN4uGzG(qpoZ4TQ$70{LX{M{ZN)2cf523wjFl0T4g* zB#fJyS`L`0A`ob9iN^v7E7)cQ0wQqh>cHYqb0lGf+A5>LL?V*T#ccyfPkJ9cr_*Xl}@= ziCLlM5X)D_Th}=RRY5BV?n3BCgIU3n;A+-f7h0=Tr4yQ160#OW)`p_=p(+#&Ss^J& zu-OT#v0>swHvKvgsHwXx&=_j7n_G8VWi%cO)yZ~A*##vq(xS=(Yi?)=Bvc?lHE6pF z5zod*ERalu8bxR=0@j+e5Xb

{z!1BQX&OHL`_)Kz$;i_+Z5v#oXGO*_DB5{waK9 zj-+P{2McJ9>%v@>|F;x8&xsJwPDJ7PDz@r4l`6eU6N+&!<;UA4oaF)2>VFyl{BLf z9!I)U(u_)&53FaSq#2#?4WwHo%_xN{NUxMMqZOV&_x=ftF^qC}Bk9wUX0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J)SYeej=Us)BL(Z=XtGCQ~RAJ7*Le7^8vj?krQDN14^*MuE_8>LSDLrd}`mEFb zu!BJ0yhZAkGqReW6jnWx^N_-v(bWAmg*kGOKjsUCIYQO^p)gxc$az9xz7-)jA1KUI z6WC*%Dy+U_9N!A_v_*|$g)vAG^m&L|-tJEl-K0 zNIu*-H=x)a=!A~o7U*n_;1=jqj^Gx!Vc`gF;d3DR8<**KRCsX5h%L-{irB!Z6HDmB z&WqTEnb8lr#DQl6>$5WIZw8kC@PittPd%t^KLe*#n}B(~1|t3a5LCCfftABfD(t}W zIQud2Ug#=*pvyN@yaDVi?|Zjl>Nb7jKKr_PU+gVhAi{GS=Kmb14lMsa1Iz!^!LvNO^7OxUU>|HgcVMP>z7S$B zrVQsDv=NTUi~6w+>;t|EShsI6+IKFnJo12!8q6)gtp7S-9`NY)+62tQuvT0DI4}>qc&3_6% z1y~2>e>e{x1(p{)pksaB%hP`h+-28?{!irT&j9nFjOW)Z&mhN~&iu~L!xMpdh@|T` z1=v~s%ku2YfqA^8?H2%FV$YXDUFfgCJZa%3k@?pHJMR#Rx`dUqQuX!zI$UX6P<~^e zx@u_+ZVYBG*#)eoKpn5yC566S=MV(~p?IL7F*Na8^9s$z~QHq-J@DG-=@7Hcn4NiIKGEkLs{gL-QtqOU|k@qe2ThG018E~|YK4l36V3Tt;!3Uyw91_MrR#U<=#`x vz0ZnMUi;=JFNZq);BD}z2R&=Xl{5SeVJpyF7qB9!*!TRkE$S3X)$+dq0Wcd; diff --git a/npb.cpp b/npb.cpp index eff2566..9896f60 100644 --- a/npb.cpp +++ b/npb.cpp @@ -13,7 +13,7 @@ #define FAIL 900 #define OK 0 -//npb0.png +#define NPBPIX0 "npb0.png" #define X0 411 #define X01 21 #define X02 96 @@ -21,7 +21,7 @@ #define Y01 214 #define Y02 68 -//npb1.png +#define NPBPIX1 "npb1.png" #define X1 411 #define X11 22 #define X12 133 @@ -29,16 +29,21 @@ #define Y11 241 #define Y12 94 -#define NPBPIX0 "npb0.png" -#define NPBPIX1 "npb1.png" +#define NPBPIX2 "npb2.png" +#define X2 411 +#define X21 213 +#define Y2 404 +#define Y21 234 #include #include #include + void mustard(int mustard); void loadnpb(const char *path); void npbottify0(const char *path); void npbottify1(const char *path); +void npbottify2(const char *path); int main (int argc, const char *argv[]); ILuint inPix, outPix, npbPix; @@ -46,7 +51,7 @@ ILboolean q=true; ILboolean inH=false; ILboolean outH=false; ILboolean npbH=false; -ILuint inX, inY; +ILuint inX, inY, outX, outY; ILubyte *newdata; int main (int argc, const char *argv[]) @@ -62,7 +67,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,0,0,0); + ilClearColour(255,255,0,0); ilGenImages(1, &inPix); inH=true; ilBindImage(inPix); @@ -80,8 +85,7 @@ int main (int argc, const char *argv[]) else if(inX<=X12&&inY<=Y12) npbottify1(argv[2]); else - mustard(SEAISH_MUSTARD); - + npbottify2(argv[2]); //ok mustard(0); } @@ -192,6 +196,96 @@ void npbottify1(const char *path) if(!ilSave(IL_PNG,path))mustard(OUTPIX_MUSTARD); } +void npbottify2(const char *path) +{ + unsigned long i,j; + outX=(X21+inX+2>X2)?(X21+inX+2):X2; + outY=(Y21+inY+2>Y2)?(Y21+inY+2):Y2; + ilGenImages(1, &outPix); + outH=true; + loadnpb(NPBPIX2); + newdata=ilGetData(); + ilBindImage(outPix); + if(!ilTexImage(outX,outY,1,4,IL_RGBA,IL_UNSIGNED_BYTE,NULL))mustard(OUTPIX_MUSTARD); + if(!ilClearImage())mustard(FAIL); + ilSetPixels(outX-X2,0,0,X2,Y2,1,IL_RGBA,IL_UNSIGNED_BYTE,newdata); + newdata=ilGetData(); + for(i=outX-X21-inX-2;i