From b4644babfad8afe775cc92dd378e431dc0eb30af Mon Sep 17 00:00:00 2001 From: b Date: Sat, 28 Dec 2013 21:16:46 +0000 Subject: [PATCH] The slightly bigger than the world's smallest NewpixbOTTification. Animations are mustards. git-svn-id: svn://botcastle1b/npb@11 0d794883-4e4e-4f65-aa7a-0e7f5947bab5 --- npb | Bin 10946 -> 12240 bytes npb.cpp | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/npb b/npb index 1d5b27ec20c223cc788a429eef587b4d9c9b9537..1ffc8da8755959d97ddecb40ff446ad504fff741 100755 GIT binary patch delta 4997 zcmb7I3vg7`89w*!-Ob&Quz80-UTl&T6lj9TpgamnFx7~$BozwnSdv8lw`@Q~bwK%)ZSw5pESqR=%fh$f31;F6#)$}6V4}tMJ+_tb>1uTVrDP*O4 z>sltqXD11fyNF2DN-k%323@$ z?0jfBEFT#}PX%2pHC=;3Ji=LF$fZroRP$wnOZ!amEQPua@+!b6h}RM#s)q-6f=F8Z_(Ro=-a8pji+1V$#_L&APamQCFNnvp()sqy=bCD35h=uO*}B zJ8<$?FZTx0ouCWOE%JTjJ=0TC`crq)laRFIamStR(_1t>m<9b_|B$Qk7>18Of`_-y zR;_;7+6YTxb5qqt)Zcq{#4#?I?Q38l2J^?X_IlDjHzIF`xM9SrcF&%F&M|48@z~T zJ;!yJOz$YPd@!F1h2NxKtq>9p-oMW?UC5wNO*!b z&;tx9*lqBnr@_-p7<8p(FdmAAXKct^j(BsB>r%t@`*aN>CFnB21(^1F>M)G=;JZJj zn+MFx8|=|Be@3dox1jM%XFwJY8>MyxWW})bu`KDK#fZ}P?$}mehp*-2XGQ^)c5hSi z)WTlJW3NGoddvO8GH+zr56vE`O`g(jJq7O6!k#t1s_z7&wydY(#7z2Ah~)5?bQNHn32uqGIpYWQ1@-rvif@|WvzVe`bm(jT>hBC{dTd6)6)BtyB642~ z)*#j;l)wCcK~`c^he+ z4Ej!tZSl2RpMh^*^Oe;z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 900 #define OK 0 +//npb0.png #define X0 411 #define X01 21 #define X02 96 @@ -19,7 +21,16 @@ #define Y01 214 #define Y02 68 +//npb1.png +#define X1 411 +#define X11 22 +#define X12 133 +#define Y1 404 +#define Y11 241 +#define Y12 94 + #define NPBPIX0 "npb0.png" +#define NPBPIX1 "npb1.png" #include #include @@ -27,6 +38,7 @@ void mustard(int mustard); void loadnpb(const char *path); void npbottify0(const char *path); +void npbottify1(const char *path); int main (int argc, const char *argv[]); ILuint inPix, outPix, npbPix; @@ -60,9 +72,13 @@ int main (int argc, const char *argv[]) inX=ilGetInteger(IL_IMAGE_WIDTH); inY=ilGetInteger(IL_IMAGE_HEIGHT); + if(ilGetInteger(IL_NUM_IMAGES)>1) + mustard(ANIMATED_MUSTARD); if(inX<=X02&&inY<=Y02) npbottify0(argv[2]); + else if(inX<=X12&&inY<=Y12) + npbottify1(argv[2]); else mustard(SEAISH_MUSTARD); @@ -129,6 +145,54 @@ void npbottify0(const char *path) if(!ilSave(IL_PNG,path))mustard(OUTPIX_MUSTARD); } +void npbottify1(const char *path) +{ + //newdata= new ILubyte[X0*Y0*4]; + ilGenImages(1, &outPix); + outH=true; + loadnpb(NPBPIX1); + ilBindImage(outPix); + if(!ilCopyImage(npbPix))mustard(FAIL); + //if(!ilTexImage(X1,Y1,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=X11+(X12-inX)/2)&& + (i< X11+(X12-inX)/2+inX)&& + (j>=Y11+(Y12-inY)/2)&& + (j< Y11+(Y12-inY)/2+inY)) + { + newdata[4*(i+X1*j)+0]=0xFF; + newdata[4*(i+X1*j)+1]=0xFF; + newdata[4*(i+X1*j)+2]=0xFF; + newdata[4*(i+X1*j)+3]=0xFF; + } + else if((i>=X11)&&(i=Y11)&&(j