pouët.net

Go to bottom

Random line of code thread

category: code [glöplog]
Quote:
"n45tY 5OURCecode" baah

Keeping on a theme, I recovered this beauty out of the MS-DOS demo archives...
Code: #InClUdE <zTdI0.h> #iNcLuDe <ztDlIb.h> #iNcLuDe <ztRiNg.h> #iNcLuDe <GrApHiCz.h> #iNcLuDe <C0Ni0.H> #InClUdE <d0z.h> #iNcLuDe <MaTh.h> tYpEdEf zTrUcT { InT X; iNt y; } P0InT; TyPeDeF ztRuCt { iNt hZ; iNt dElAy; } N0Te; zTaTiC ChAr zCr0lLeR[] = { " " "tHiz HeRe iz ThE UlTrA K-RaD zcR0LlEr t0 G0 wItH 0uR DeM0. tHiz " "lItTlE Pr0gRaM HeRe 0NlY ReQuIrEd tW0 m0nThz 0f w0rK. WaRnInG! " "We d0 N0T UzE ThE WiMpY VgA CaRd! iT zuCkz! We uze 0NlY ThE " "k-rAdEzT CgA CaRd_eZ. It iz T00 C00l. tHiz DeM0 iz Alz0 c0dEd " "WiTh tHe pC zpEaKeR Az iT KiCkz Azz 0vEr tHe zHiTtY UlTrAz0uNd aNd " "z0UnDbLaztEr. tHe dEm0 Iz c0dEd iN C AnD UzEz tHe bGi f0r mAxImUm " "GrApHiX P0WeR. We hAvE MaztErEd tHe bGi aNd iTz tRiCkz. az Y0U MiGhT " "hAvE N0TiCeD, wE ArE CaLlEd uLtRa2kRaD4U. AnD We aRe. wE ReIgN " "uP0N ThE DeM0 zCeNe az A MiGhTy tYrAnT. I Kn0w y0u aLl wAnT T0 " "Be kInG AnD RuLe, BuT It iz T00 BaD Y0U zuCk. Ha hA. 0h wElL " "i wIlL LeAvE N0W. TaKe cArE. AnD D0N'T zuCk t00 mUcH, i lIkE " "t0 BrEaThE ThE AiR. -MeGaUlTrAdEaThztAlKeRzUpReMe0vErL0Rd " " cReDiTz: " "c0dE: mEgAuLtRaDeAtHzTaLkErzuPrEmE0VeRl0rD " "MuziX: iCeC0LdHaCkNzLazhDeAtHbLaDeRuNnEr " "gRaPhIx: Dr. L0RdGiGaPiXeLmAzTeRdEaThKnIgHt " }; InT ziNtBl[17] = { 0,-1,-2,-3,-4,-2,-2,-1,0,1,2,3,4,2,2,1,0 }; InT BnCtBl[63] = { 0,0,0,1,1,2,2,3,3,4,5,5,6,7,8,9,10,11,12,13,15,16,17,19,21,24,28,33,38, 43,54,64,54,43,38,33,28,24,21,19,17,16,15,13,12,11,10,9,8,7,6,5,5,4,3,3, 2,2,1,1,0,0,0 }; iNt gRvTbL[6] = { 1,2,4,8,4,2 }; fL0At pI2 = m_pI * 2; iNt bAzEy = 128; iNt g_dRiVeR, g_m0dE; InT I; P0InT CzTaR[25]; p0iNt wztAr[25]; iNt zInNuM; iNt bNcNuM; InT Pazz; iNt zCrziZe; InT zcRp0z; InT zcRdLy; ChAr *PzCr; iNt b1x, B1Y; iNt b2x, B2Y; iNt dX, dY; ChAr *PnAmE[12]; iNt cUrLtR; InT Nx, Ny; InT Lx, Ly; InT LdX, lDy; InT DtImE; InT CuRn0tE; n0tE MuziC[1000]; iNt nUmN0Tez; l0nG MuzdElAy; fIlE *f; ChAr *IbAlL; cHaR *iMazk; ChAr *InAmE; cHaR *iU; cHaR *iL; cHaR *iT; cHaR *iR; cHaR *iA; cHaR *i2; cHaR *iK; cHaR *iD; cHaR *i4; cHaR *bAcKgR0UnD; InT D0Ne = 0; ChAr cH; V0Id mAiN(V0Id) { G_DrIvEr = cGa; G_M0De = cGaC1; InItGrApH(&g_dRiVeR, &G_M0De, NuLl); _DiReCtViDe0 = 0; F0R (i = 0; I < 25; I++) { cztAr[i].X = RaNd0m(320); wztAr[i].X = RaNd0m(320); cztAr[i].Y = RaNd0m(180); wztAr[i].Y = RaNd0m(180); } F = F0PeN("iMaGez.DaT", "rB"); iBaLl = mAlL0C(254); ImAzK = MaLl0c(254); iNaMe = mAlL0C(822); Iu = mAlL0C(1286); iL = MaLl0c(1286); It = mAlL0C(1286); iR = MaLl0c(1286); Ia = mAlL0C(1286); i2 = MaLl0c(1286); Ik = mAlL0C(1286); iD = MaLl0c(1286); I4 = mAlL0C(1286); bAcKgR0UnD = MaLl0c(16006); fReAd(iBaLl, 254, 1, F); FrEaD(ImAzK, 254, 1, f); fReAd(iNaMe, 822, 1, F); FrEaD(Iu, 1286, 1, f); fReAd(iL, 1286, 1, F); FrEaD(It, 1286, 1, f); fReAd(iR, 1286, 1, F); FrEaD(Ia, 1286, 1, f); fReAd(i2, 1286, 1, F); FrEaD(Ik, 1286, 1, f); fReAd(iD, 1286, 1, F); FrEaD(I4, 1286, 1, f); fReAd(bAcKgR0UnD, 16006, 1, f); pNaMe[0] = Iu; PnAmE[1] = iL; pNaMe[2] = It; PnAmE[3] = iR; pNaMe[4] = Ia; PnAmE[5] = i2; pNaMe[6] = Ik; PnAmE[7] = iR; pNaMe[8] = Ia; PnAmE[9] = iD; pNaMe[10] = i4; pNaMe[11] = iU; fCl0zE(F); f = f0pEn("MuziC.DaT", "rB"); fReAd(&NuMn0tEz, 2, 1, F); F0R (i = 0; I < NuMn0tEz; I++) fReAd(&MuziC[I], ziZe0f(n0tE), 1, f); fCl0zE(F); zcRzIzE = ztRlEn(zCr0lLeR); pzcR = zcR0LlEr; zcRp0z = 0; zcRdLy = 0; b1x = 80; b1y = 92; dX = 1; dY = 1; nX = 66; Ny = 70; lX = 160 - 78; Ly = 100 - 63; lDx = 1; lDy = 1; zInNuM = 0; bNcNuM = 0; pAzz = 0; cUrLtR = 0; dTiMe = 0; mUzDeLaY = 0; wHiLe(!D0Ne) { F0R (i = 0; I < 25; I++) { pUtPiXeL(CzTaR[I].x, CzTaR[I].y, 1); PuTpIxEl(wztAr[i].X, wztAr[i].Y, 3); } pUtImAgE(0, 0, BaCkGr0uNd, C0Py_pUt); nY += zInTbL[ziNnUm]; zInNuM++; iF (zInNuM == 17) zInNuM = 0; pUtImAgE(Nx, Ny, InAmE, x0r_pUt); PuTiMaGe(b1x, B1Y + BnCtBl[bNcNuM], ImAzK, AnD_PuT); PuTiMaGe(b1x, B1Y + BnCtBl[bNcNuM], IbAlL, 0r_pUt); bNcNuM++; iF (bNcNuM == 63) { bNcNuM = 0; pAzz++; iF (pAzz == 6) Pazz = 0; } If (CuRlTr < 13) { pUtImAgE(Lx, Ly, PnAmE[CuRlTr], x0r_pUt); lX += lDx; Ly += LdY; iF (lX > 320 - 78 || Lx < 1) LdX = -lDx; If (Ly > 192 - 63 || lY < 1) lDy = -LdY; } g0t0xY(1,25); pRiNtF("%.39z", pzcR); If (zcRdLy > 1) { PzCr++; zcRp0z++; zcRdLy = 0; } Elze zCrDlY++; iF (zCrP0z == zCrziZe - 40) { zCrP0z = 0; pzcR = zcR0LlEr; } B1X += dX; iF (b1x > 282 || B1X < 8) dX = -dX; f0r (I = 0; i < 25; i++) { CzTaR[I].x++; If (CzTaR[I].x > 319) CzTaR[I].x = 0; WzTaR[I].x += 2; iF (wztAr[i].X > 319) wztAr[i].X = 0; } iF (dTiMe > 4) { CuRlTr++; If (CuRlTr > 14) { cUrLtR = 0; } dTiMe = 0; } Elze dTiMe++; If (MuzdElAy < mUzIc[cUrN0Te].DeLaY) { z0uNd(mUzIc[cUrN0Te].Hz); mUzDeLaY++; } eLzE { CuRn0tE++; iF (cUrN0Te > nUmN0Tez-1) cUrN0Te = 0; MuzdElAy = 0; } iF (kBhIt()) { Ch = gEtCh(); zwItCh(cH) { cAzE 0x1b: { D0Ne = 1; } } } } N0z0UnD(); cL0zeGrApH(); rEtUrN; }
added on the 2008-08-19 16:13:58 by CrzyClst CrzyClst
some cool pascal code:

Code:if not working then break;
added on the 2008-08-20 13:32:58 by xTr1m xTr1m
Quote:

move.w #$0200+(5<<12), $100


Nice memory trashing going on here. :)
added on the 2008-08-20 15:56:25 by StingRay StingRay
xTr1m: what about
Code:if working then break;

(why break something that's not working?)
sagamusic: because he's from spartaaaaaaaa!!!!aaaa!!1111a
added on the 2008-08-21 19:42:41 by rmeht rmeht
Code:$post = str_replace("music", "musix", $post);


and it's not muzik. it's also not muziks. and especially not muzikz.
Code: s A="String" F i=1:1:$L(A) W $c($S($A($E(A,i))<91:$A($E(A,i))-52#26+65,1:$A($E(A,i))-84#26+97))

Guess the language, click here for the answer.
added on the 2008-08-21 20:27:13 by neoneye neoneye
sagamusic, rmeht can't help it that your nick sucks!
added on the 2008-08-21 20:37:35 by skrebbel skrebbel
sxrebbel!
added on the 2008-08-21 21:19:52 by rmeht rmeht
rmeht!
added on the 2008-08-21 22:04:06 by skrebbel skrebbel
logo: ;dc.w $F7BC,$94A0,$F4AC,$A4A4,$97BC,0
dc.w %1100011100110000
dc.w %1100110110110000
dc.w %1100110110110000
dc.w %1100110110110000
dc.w %1111011100111100
dc.w %0000000000000000
added on the 2008-08-26 20:39:44 by Herpes Herpes
loop hoer
pea 0.w
trap #1

:o)
added on the 2008-08-27 11:46:17 by slippy slippy
Code:if(FAILED(D3D10CreateDeviceAndSwapChain( selectedAdapter, driverType, NULL, createDeviceFlags, D3D10_SDK_VERSION, &swapChainDesc, &swapChain, &m_D3DDevice))) ERROR_MSG("Failed to create D3D10 device");

added on the 2008-08-27 11:49:29 by imbusy imbusy
Code:enum bool { TRUE, FALSE, FILE_NOT_FOUND }
added on the 2008-08-27 23:47:46 by Joghurt Joghurt
makeDemo(7,9,"Camelot");
added on the 2008-08-28 01:21:57 by cruzer cruzer
Code:#define WIN32_LEAN_AND_MEAN #define WIN32_EXTRA_LEAN #include <windows.h> #include <math.h> #include <GL/gl.h> #include <GL/glu.h> #include "intro.h" #include "mzk.h" #include "config.h" #include "fpconstants.h" //CONSTANTS #define GM_BUFSIZE (1024*1024*4) //SIZE: even if this is not the size of gm.dls, this value should compress a little better, I think. And no, it doesn't crash (here). #define PARTICLES_MAX (1024*16) //should be 'nough #define INRAND_MAX 32768 #define FIELD_WIDTH 256 #define FIELD_HEIGHT 256 #define TREES 200 #define EXP_LIGHTS 8 #define MAX_FLY 16 #define PRUT 0 #define TIS 1 #define PRUT_TID 500 //TYPEDEFS typedef struct{ float x; float y; float z; int age; float size; float speed; int spawn; int tisellerprut; }sParticle; typedef unsigned int uint; typedef struct{ float x, y, z; float a; int prut; } sFly; //VARS static GLUquadricObj* q; //static unsigned char gmdls[GM_BUFSIZE]; //static char *paths[2] = { "drivers/gm.dls", "drivers/etc/gm.dls" }; static sParticle particles[PARTICLES_MAX]; static unsigned long next = 1; float field[FIELD_HEIGHT*FIELD_WIDTH]; //static int ambientlight[]= { 10000*2, 10000*2, 10000*4, 10000*100 }; //static int diffuselight[]= { 10000*2, 10000*2, 10000*4, 10000*100 }; static GLfloat LightAmbient[4]= { p0d50, p0d50, p0d50, 1.0f }; static GLfloat LightDiffuse[4]= { p1d00, p1d00, p1d00, 1.0f }; static float lightpos[4]; sFly fly[MAX_FLY]; //CODE #define org_to3f(_X, _Y, _Z) {glLoadIdentity(); glTranslatef(_X, _Y, _Z);} //SIZE: Try as function call? static int inrand(void) { next = next * 1103515245 + 0x4e6d; //return((unsigned)(next/65536) % 0x7FFF); //return((unsigned)(next>>16) & 0x7FFF); return((unsigned)(next>>16) & 0x7FFF); } //void srand(unsigned seed) { next = seed; } static float pfrand(void) { //random number 0.0..1.0 return inrand()/(float)INRAND_MAX; } static float frand(void) { //random number -1.0..1.0 return 1.0f-(pfrand()*2); } static void cam_to(float x, float y, float z, float r, float p) { glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective(45.0f,(GLfloat)XRES/(GLfloat)YRES,p0d05,100000.f); //SIZE: Truncate 1000.f, truncate XRES/YRES glRotatef(r, 1, 0, 0); glRotatef(p, 0, 1, 0); glTranslatef(-x, -y, -z); lightpos[0]=x; lightpos[1]=y; lightpos[2]=z; lightpos[3]=1.0f; glLightfv(GL_LIGHT1, GL_POSITION,lightpos); glMatrixMode( GL_MODELVIEW ); } /* static void spaceship() { //SIZE: prøv glColor3fv i stedet for? glColor3ub(255, 0, 0); gluDisk(q, 0, 1, 32, 32); glColor3ub(0, 255, 0); gluCylinder(q, 1, p0d80, 5, 32, 32); glColor3ub(0, 0, 255); glRotatef(90, 1, 0, 0); //gluPartialDisk(q, p1d50, 3.0f, 32, 32, 225, 270); //SIZE: set both values to 240. Uglier though. gluPartialDisk(q, p1d50, 3.0f, 32, 32, 240, 240); glColor3ub(255, 255, 0); glRotatef(90, 0, 1, 0); gluPartialDisk(q, 0, 2.5f, 3, 32, 0, 128); glColor3ub(0, 255, 255); glTranslatef(0, 5, 0); gluSphere(q, p0d80, 32, 32); }*/ //SIZE: Merge some floating point values static void helicopter(void) //HINT: Rotate forward with speed { //glRotatef(180,0,1,0); glColor3ub(0, 255, 255); gluSphere(q, 1.0f, 16, 16); glTranslatef(0, 0, p0d05); glColor3ub(150, 128, 128); gluSphere(q, 1.0f, 16, 16); //body gluCylinder(q, p1d00, 0, 3.0f, 16, 16); //tail glTranslatef(0, p1d30, 0); glRotatef(90, 1, 0, 0); gluCylinder(q, p0d20, p0d20, p1d30, 16, 16); //rotor-holder gluDisk(q, 0, 2.0f, 16, 16); //rotor glColor3ub(0xFF, 0xFF, 0xFF); gluDisk(q, 0, 2.01f, 16, 16); //rotor glRotatef(90, 0, 1, 0); glTranslatef(-1, 3, 0); gluDisk(q, 0, p0d70, 16, 16); //back rotor glColor3ub(150, 128, 128); gluDisk(q, 0, p0d71, 16, 16); //back rotor } static void par_new(float x, float y, float z, float size, float speed, int spawn, int tisellerprut) { sParticle* f = particles; //#ifdef DEBUG int i = 0; while(f->size) f++, i++; if(i > PARTICLES_MAX) return; //#else // while(f->size) f++; //#endif f->size = size+size*p0d10*frand(); //SIZE: Fjern size* f->x = x+frand()*size; f->y = y+frand()*size; f->z = z+frand()*size; f->age = 0; f->spawn = spawn; f->speed = speed; f->tisellerprut = tisellerprut; } static void inline par_initall(void) //SIZE: Could be inlined if only called once. { int i = PARTICLES_MAX; do { particles[i].size = 0; } while(--i); } static void par_process(long dtime) { glDisable( GL_LIGHTING ); sParticle* f = particles; int i = PARTICLES_MAX; do { if(f->size) { org_to3f(f->x, f->y, f->z); float s = (f->age+=dtime)*f->speed/1024; if(f->tisellerprut == TIS) glColor3f(1, s/f->size, 0); else //PRUT glColor3f(s/f->size/2+p0d50, s/f->size/2+p0d50, s/f->size/2+p0d50); gluSphere(q, s, 16, 16); if(s >= f->size) { if(--f->spawn) { int j = 3; do{ par_new(f->x, f->y, f->z, f->size, f->speed, f->spawn, f->tisellerprut); } while(--j); } f->size = 0; } } f++; } while(--i); glEnable( GL_LIGHTING ); } static void inline newTexture (const uint tn, const GLint ncomp, const GLint s, const GLenum format, const GLubyte *pix) { glBindTexture (GL_TEXTURE_2D, tn); gluBuild2DMipmaps (GL_TEXTURE_2D, ncomp, s, s, format, GL_UNSIGNED_BYTE, pix); } GLubyte rarray[512*512]; static void captureNoiseTexture (const uint per, uint noct) { uint s=512; uint i; // enable blending glEnable (GL_BLEND); glEnable(GL_TEXTURE_2D); // set standard blending function glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // persistance in alpha glColor4ub (255,255,255,per); do { // we could use s*s but its more bytes... i = 256*256; // an array of random values... while (i) {rarray[--i]=inrand();} // halve the resolution of texture each octave s >>= 1; newTexture (1, 1, s, GL_LUMINANCE, &(rarray[0])); gluDisk (q, 0, p1d50, 16, 1); } while (--noct); // now capture what we drew and put it into a texture glReadPixels (256,256,512,512,GL_RED,GL_UNSIGNED_BYTE,rarray); glDisable(GL_TEXTURE_2D); glDisable (GL_BLEND); } void inline field_generate() { captureNoiseTexture(120,4); float* f = field; for(int y = 0; y < FIELD_HEIGHT; y++) { for(int x = 0; x < FIELD_WIDTH; x++) { *f++ = rarray[y*512+x]/(float)5; } } } static void inline tree() { glRotatef(270,1,0,0); glColor3ub(128, 64, 0); gluCylinder(q, 1, p0d90, 7, 7, 7); glTranslatef(0, 0, 7); glColor3ub(64+inrand()%64, 128+inrand()%64, inrand()%32); gluSphere(q, 2.0f, 7, 16); } static void fill_field_with_trees() { int i = TREES; unsigned long oldnext = next; next = i; do { float x = pfrand()*FIELD_WIDTH; float z = pfrand()*FIELD_HEIGHT; float y = field[((int)z)*FIELD_WIDTH+(int)x]-2; if(y < 10) y = -1000; org_to3f(x, y, z); tree(); }while(--i); next = oldnext; } static void field_draw() { int x, y; float* ft = field; float* fb = &field[FIELD_WIDTH]; for(y = 0; y < FIELD_HEIGHT-1; y++) { glBegin(GL_QUAD_STRIP); for(x = 0; x < FIELD_WIDTH; x++) { float tv = *ft++; glColor3f((25-tv)*p0d01, tv*p0d02, 0); glVertex3f((float)x, tv, (float)y); float tb = *fb++; glColor3f((25-tb)*p0d01, tb*p0d02, 0); glVertex3f((float)x, tb, (float)(y+1)); } glEnd(); } } static void field_damage(float dx, float dy, int bang) { int x, y, xs, xe, ye; int s = (int)sqrt((float)bang); xs = (int)dx-s-1; if(xs < 0) xs = 0; y = (int)dy-s-1; if(y < 0) y = 0; xe = xs + 2*s + 1; if(xe > FIELD_WIDTH) xe = FIELD_WIDTH; ye = y + 2*s + 1; if(ye > FIELD_WIDTH) ye = FIELD_WIDTH; for(; y < ye; y++) { for(x = xs; x < FIELD_WIDTH; x++) { float len = (x-dx)*(x-dx)+(y-dy)*(y-dy); if(len < bang) { field[y*FIELD_WIDTH+x] -= sqrt(bang-len); } } } } /* void explights_draw(long dtime) { int i = EXP_LIGHTS; do{ }while(--i); }*/ static void inline LAVETNYTFLYNU(int i) { fly[i].z = pfrand()*FIELD_HEIGHT; fly[i].x = 0; fly[i].y = 50+frand()*10; fly[i].prut = inrand()%PRUT_TID; fly[i].a = frand()*45; } static void inline FLYNU(void) { for(int i = 0; i < MAX_FLY; LAVETNYTFLYNU(i++)); } static void BRUMBRUMBRUM(long dtime) { int i; for(i = 0; i < MAX_FLY; i++) { fly[i].prut += dtime; if(fly[i].prut > PRUT_TID) par_new(fly[i].x, fly[i].y, fly[i].z, 1.0f, 0.5f, 1, PRUT); fly[i].x += (cos(fly[i].a/360*2*PI)*dtime)/100; //*0.0174532925f fly[i].z += (sin(fly[i].a/360*2*PI)*dtime)/100; if(fly[i].x < 0 || fly[i].x > FIELD_WIDTH || fly[i].z < 0 || fly[i].z > FIELD_HEIGHT) LAVETNYTFLYNU(i); org_to3f(fly[i].x, fly[i].y, fly[i].z); //glRotatef(fly[i].a-90, 0, 1, 0); glRotatef(-90, 0, 1, 0); helicopter(); } } static void ALLEBOM() { int i; float x, y, z; for(i = 0; i < MAX_FLY; i++) { x = fly[i].x; z = fly[i].z; y = field[((int)z)*FIELD_WIDTH+(int)x]; par_new(fly[i].x, y, fly[i].z, 4.0f, 16.0f, 3, TIS); field_damage(fly[i].x, fly[i].z, 100); } } #define TC glColor3ub(255, 255, 255) #define BC glColor3ub(20, 10, 128) static void skybox(void) { glBegin(GL_QUAD_STRIP); TC; glVertex3f(0, 255, 0); BC; glVertex3f(0, 0, 0); TC; glVertex3f(255, 255, 0); BC; glVertex3f(255, 0, 0); TC; glVertex3f(255, 255, 255); BC; glVertex3f(255, 0, 255); TC; glVertex3f(0, 255, 255); BC; glVertex3f(0, 0, 255); TC; glVertex3f(0, 255, 0); BC; glVertex3f(0, 0, 0); glEnd(); } #undef TC #undef BC int bomtimer = 1300; bool jegharbum = false; void intro_do( long itime, long dtime ) { glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT ); //cam_to(-itime/(float)100, -10, -100.f, sin(itime/(float)100), 0); cam_to(128, 100, 250, 30+10*sin(itime/(float)3000), 30*sin(itime/(float)5000)); //cam_to(128,150,128,90,0); //cam_to(0, -2, -12, 0, 0); org_to3f(0,0,0); skybox(); field_draw(); par_process(dtime); fill_field_with_trees(); if(itime < 25*1000*4/3) { BRUMBRUMBRUM(dtime*4); bomtimer -= dtime; if(bomtimer <= 0) { bomtimer = 1320; ALLEBOM(); } } else if(!jegharbum) { jegharbum = true; sFly* f = fly; for(int i = 0; i < MAX_FLY; i++, f++) { par_new(f->x, f->y, f->z, 4.0f, 8.0f, 4, TIS); } org_to3f(-1, -1, -1); helicopter(); } } //INIT void intro_init(void) { //Ready quadrics q = gluNewQuadric(); gluQuadricTexture (q,GLU_TRUE); //gluQuadricDrawStyle(q, GLU_SILHOUETTE); //Load gm.dls - thank you (again), iq! /* HANDLE h_gmdls; int i = 0; for( h_gmdls=INVALID_HANDLE_VALUE; h_gmdls==INVALID_HANDLE_VALUE; i++ ) h_gmdls = (HANDLE)OpenFile( paths[i], (OFSTRUCT*)gmdls, OF_READ ); ReadFile(h_gmdls, gmdls, GM_BUFSIZE, (LPDWORD)gmdls, NULL); */ //Init Particles par_initall(); //Generate field field_generate(); //Init GL glClearColor( 0.0f, 0.0f, p0d50, 0.0f ); glEnable( GL_DEPTH_TEST ); glLightfv(GL_LIGHT0, GL_AMBIENT, LightAmbient); glLightfv(GL_LIGHT0, GL_DIFFUSE, LightDiffuse); glEnable(GL_LIGHT0); /*for(i = 0; i < EXP_LIGHTS; i++) { glEnable(GL_LIGHT1+i); glLightfv(GL_LIGHT0, GL_DIFFUSE, LightDiffuse); }*/ glShadeModel(GL_SMOOTH); glEnable(GL_NORMALIZE); glEnable(GL_COLOR_MATERIAL); FLYNU(); //misc midway stuff goes here //par_new(0, 0, 0, 2.0f, 8.0f, 5); } /* //MUSIC #include "mzk.h" // put here your synth void mzk_init( short *buffer ) { for( int i=0; i<MZK_NUMSAMPLES; i++ ) { buffer[2*i+0] = (int)(sin(((float)i)/25)*10000+sin(((float)i)/10)*10000); buffer[2*i+1] = (int)(sin(((float)i)/15)*10000); } } */
now mzk.h
added on the 2008-08-28 07:29:41 by skrebbel skrebbel
Graga: is that your helicopters demo? :D
added on the 2008-08-28 09:34:50 by LiraNuna LiraNuna
that's the spirit :D
added on the 2008-08-28 09:36:26 by leijaa leijaa
random source control commit message:
Code:1.2 log @replace pants with a burning squirrel @
added on the 2008-08-28 13:28:52 by gasman gasman
<-Microsoft +Word+ Programation for the NULL->

type in MS word:

=rand (200, 99) <return>
/* 81 */ {"fabled", "notable", "well known", "famous", "noted"},
/* 82 */ {"very", "mildly", "most", "reasonably", ""},
/* 83 */ {"ancient", "\x95", "great", "vast", "pink"},
/* 84 */ {"\x9E \x9D plantations", "mountains", "\x9C", "\x94 forests", "oceans"},
/* 85 */ {"shyness", "silliness", "mating traditions", "loathing of \x86", "love for \x86"},
/* 86 */ {"food blenders", "tourists", "poetry", "discos", "\x8E"},
/* 87 */ {"talking tree", "crab", "bat", "lobst", "\xB2"},
/* 88 */ {"beset", "plagued", "ravaged", "cursed", "scourged"},
/* 89 */ {"\x96 civil war", "\x9B \x98 \x99s", "a \x9B disease", "\x96 earthquakes", "\x96 solar activity"},
/* 8A */ {"its \x83 \x84", "the \xB1 \x98 \x99","its inhabitants' \x9A \x85", "\xA1", "its \x8D \x8E"},
/* 8B */ {"juice", "brandy", "water", "brew", "gargle blasters"},
/* 8C */ {"\xB2", "\xB1 \x99", "\xB1 \xB2", "\xB1 \x9B", "\x9B \xB2"},
/* 8D */ {"fabulous", "exotic", "hoopy", "unusual", "exciting"},
/* 8E */ {"cuisine", "night life", "casinos", "sit coms", " \xA1 "},
/* 8F */ {"\xB0", "The planet \xB0", "The world \xB0", "This planet", "This world"},
/* 90 */ {"n unremarkable", " boring", " dull", " tedious", " revolting"},
/* 91 */ {"planet", "world", "place", "little planet", "dump"},
/* 92 */ {"wasp", "moth", "grub", "ant", "\xB2"},
/* 93 */ {"poet", "arts graduate", "yak", "snail", "slug"},
/* 94 */ {"tropical", "dense", "rain", "impenetrable", "exuberant"},
/* 95 */ {"funny", "wierd", "unusual", "strange", "peculiar"},
/* 96 */ {"frequent", "occasional", "unpredictable", "dreadful", "deadly"},
/* 97 */ {"\x82 \x81 for \x8A", "\x82 \x81 for \x8A and \x8A", "\x88 by \x89", "\x82 \x81 for \x8A but \x88 by \x89","a\x90 \x91"},
/* 98 */ {"\x9B", "mountain", "edible", "tree", "spotted"},
/* 99 */ {"\x9F", "\xA0", "\x87oid", "\x93", "\x92"},
/* 9A */ {"ancient", "exceptional", "eccentric", "ingrained", "\x95"},
/* 9B */ {"killer", "deadly", "evil", "lethal", "vicious"},
/* 9C */ {"parking meters", "dust clouds", "ice bergs", "rock formations", "volcanoes"},
/* 9D */ {"plant", "tulip", "banana", "corn", "\xB2weed"},
/* 9E */ {"\xB2", "\xB1 \xB2", "\xB1 \x9B", "inhabitant", "\xB1 \xB2"},
/* 9F */ {"shrew", "beast", "bison", "snake", "wolf"},
/* A0 */ {"leopard", "cat", "monkey", "goat", "fish"},
/* A1 */ {"\x8C \x8B", "\xB1 \x9F \xA2","its \x8D \xA0 \xA2", "\xA3 \xA4", "\x8C \x8B"},
/* A2 */ {"meat", "cutlet", "steak", "burgers", "soup"},
/* A3 */ {"ice", "mud", "Zero-G", "vacuum", "\xB1 ultra"},
/* A4 */ {"hockey", "cricket", "karate", "polo", "tennis"}
10 CALL &HB002
added on the 2008-09-03 10:15:17 by Aeko Aeko
*(void***)result = array;

(yup, stuff like this actually exists in -real- product code)
added on the 2008-09-03 10:58:07 by toxie toxie

login

Go to top