summaryrefslogtreecommitdiffstats
path: root/mufhd0/mufhd0.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mufhd0/mufhd0.cpp')
-rw-r--r--mufhd0/mufhd0.cpp668
1 files changed, 668 insertions, 0 deletions
diff --git a/mufhd0/mufhd0.cpp b/mufhd0/mufhd0.cpp
new file mode 100644
index 0000000..95a1fbf
--- /dev/null
+++ b/mufhd0/mufhd0.cpp
@@ -0,0 +1,668 @@
+/*
+ * coded in 0x7d1 (2001 -maggio15)
+ * by jaromil /// korova.dyne.org
+ *
+ * This source code is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * This source code is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * Please refer to the GNU Public License for more details.
+ *
+ * You should have received a copy of the GNU Public License along with
+ * this source code; if not, write to:
+ * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * !!!!!!!!!!!!!!!!!!!!! ATTENZIONE !!!!!!!!!!!!!!!!!!!!
+ * QUESTO CODICE E' _ZOZZO_ E POTREBBE
+ * OFFENDERE VOI, LE VOSTRE ABITUDINI
+ * SESSUALI E IL VOSTRO CREDO RELIGIOSO
+ * VOSTRA NONNA E L'INQUILINA DIRIMPETTO
+ * IL CODER DECLINA *OGNI RESPONSABILITA'*
+ *
+ * QUESTO CODICE POTREBBE ESSERE COMPILATO
+ * SOTTO WINDOZ, MA CHI LO FA MUORE DI DIARREA
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <math.h>
+#include <iostream.h>
+#include <string.h>
+#include <time.h>
+
+#include <SDL/SDL.h>
+#include <SDL/SDL_thread.h>
+#include <mikmod.h>
+
+#include "water/water.h"
+#include "font_6x11.h"
+
+#define W 512
+#define H 512
+#define NAME "HKM[0x7d1]"
+#define ROTOR_IMAGE "data/circuit.bmp"
+#define BEROOT "data/beroot.bmp"
+#define ANAURALE "data/misfu-anaurale.xm"
+#define KALIGARI "data/misfu-kaligari.xm"
+#define OLDSCHOOL "data/oldschool.bmp"
+#define FULLSCREEN false
+#define mikmod() MikMod_Update()
+#define w(int) SDL_Delay( int )
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846 /* pi greco */
+#endif
+
+static SDL_Surface *surf;
+unsigned char *buffer;
+
+static SDL_Surface *t_fl;
+static unsigned char *texture;
+
+static SDL_Surface *wat;
+
+static SDL_Surface *img;
+
+static int teta = 180;
+static int h_cos [360];
+static int h_sin [360];
+static int xi [360];
+static int yi [360];
+static int xj [360];
+static int yj [360];
+
+static bool quit = false;
+static bool fertig = false;
+
+Uint16 raster[4] = {0,0,0,0};
+
+unsigned int starttime;
+unsigned int delaycheck;
+
+SDL_Surface *optimize(SDL_Surface *surface) {
+ SDL_Surface *temp;
+ temp = SDL_DisplayFormat(surface);
+ SDL_FreeSurface(surface);
+ return(temp);
+}
+
+void sync_init() {
+ delaycheck = 0;
+ starttime = time(NULL);
+}
+
+bool passati(unsigned int secondi) {
+ if(delaycheck<24) {
+ delaycheck++;
+ return(false);
+ } else {
+ delaycheck = 0;
+ if((time(NULL)-starttime)>secondi) {
+ starttime = time(NULL);
+ return(true);
+ } else return(false);
+ }
+}
+void rotor_init_texture() {
+ t_fl = SDL_LoadBMP(ROTOR_IMAGE);
+ if (t_fl == NULL) exit(1);
+ t_fl = optimize(t_fl);
+ printf("* texture %ux%u %ubpp\n",t_fl->w,t_fl->h,t_fl->format->BitsPerPixel);
+
+ texture = (Uint8 *) t_fl->pixels;
+}
+
+void rotor_init_tables() {
+
+ int i;
+ double h;
+ double radian;
+
+ teta = 180;
+
+ srand(time(NULL));
+
+ unsigned int h_cos_rand = (unsigned int) (1024.0*rand()/(RAND_MAX+1.0));
+ unsigned int h_sin_rand = (unsigned int) (1024.0*rand()/(RAND_MAX+1.0));
+ unsigned int h_rand = (unsigned int) (3.0*rand()/(RAND_MAX+1.0));
+ unsigned int xi_rand = (unsigned int) (1024.0*rand()/(RAND_MAX+1.0));
+ unsigned int yi_rand = (unsigned int) (1024.0*rand()/(RAND_MAX+1.0));
+ unsigned int xj_rand = (unsigned int) (1024.0*rand()/(RAND_MAX+1.0));
+ unsigned int yj_rand = (unsigned int) (1024.0*rand()/(RAND_MAX+1.0));
+
+ for ( i=0 ; i<360 ; i++ )
+ {
+ radian = 2*i*M_PI/360;
+
+ h = h_rand+ cos(radian);
+ h_cos[i] = (int) ((h_cos_rand) * (h * cos(radian)));
+ h_sin[i] = (int) ((h_sin_rand) * (h * sin(radian)));
+ xi[i] = -(xi_rand>>1) * h_cos[i];
+ yi[i] = (yi_rand>>1) * h_sin[i];
+ xj[i] = -(xj_rand>>1) * h_sin[i];
+ yj[i] = -(yj_rand>>1) * h_cos[i];
+ }
+}
+
+void rotor_update () {
+
+ unsigned char *scrtmp = buffer;
+
+ int i,j;
+
+ Uint16 x,y;
+ Uint32 rotor;
+ int xprime = xj[teta];
+ int yprime = yj[teta];
+
+ for ( j=0 ; j<512 ; j++ ) {
+ x = (xprime + xi[teta]);
+ xprime += h_sin[teta];
+
+ y = (yprime + yi[teta]);
+ yprime += h_cos[teta];
+
+ for ( i=0 ; i<512 ; i++ ) {
+ x += h_cos[teta];
+ y -= h_sin[teta];
+
+ rotor = ((y&0xFF00) + ((x>>8)&0x00FF))<<1;
+ *(scrtmp++) = *(texture+rotor);
+ *(scrtmp++) = *(texture+rotor+1);
+ }
+ }
+}
+
+# define CHAR_HEIGHT 11
+# define CHAR_WIDTH 6
+# define CHAR_START 4
+
+void diocrap(char *testo, Uint16 col, int xpos, int ypos, int hsize, int vsize) {
+ int y,x,i,len,f,v,ch,cv;
+ Uint16 *ptr;
+ Uint16 *diocrap = (Uint16 *)buffer+((ypos-1)<<9)+xpos;
+
+ v = 512*vsize;
+
+ len = strlen(testo);
+
+ /* quest'algoritmo di rastering a grandezza variabile delle font
+ e' una cosa di cui vado molto fiero, ogni volta che lo vedo il
+ petto mi si gonfia e mi escono sonore scorregge. */
+ for (y=0; y<CHAR_HEIGHT; y++) {
+ ptr = diocrap += v;
+ if(diocrap-(Uint16 *)buffer>261632) return; /* low bound */
+ while(diocrap-(Uint16 *)buffer<1024) ptr = diocrap += v;
+ for (x=0; x<len; x++) {
+ f = fontdata[testo[x] * CHAR_HEIGHT + y];
+ for (i = CHAR_WIDTH-1; i >= 0; i--)
+ if (f & (CHAR_START << i))
+ for(ch=0;ch<hsize;ch++) {
+ for(cv=0;cv<v;cv+=512) ptr[cv] = col;
+ ptr++; }
+ else ptr+=hsize;
+ }
+ }
+
+}
+
+void init_x (int w, int h, int bpp, bool fullscreen = false, const char *Name = NAME) {
+
+ Uint32 flags = 0x00000000;
+ int i;
+
+ if ( SDL_Init(SDL_INIT_VIDEO) < 0 )
+ {
+ cerr << "Error : impossibbole to connect the display\n";
+ cerr << "Sorry, vaffangulexiting.\n";
+ exit (1);
+ } else {
+ cout << "* display inizializzato didietro\n";
+ }
+
+ flags = SDL_SWSURFACE|SDL_HWPALETTE|SDL_DOUBLEBUF;
+ if (fullscreen) flags |= SDL_FULLSCREEN;
+ surf = SDL_SetVideoMode(w, h, bpp, flags);
+ if ( surf == NULL )
+ {
+ cerr << "Error : impossibbole to initialize screen at " << w << "x" << h << " " << bpp << "bpp\n";
+ fprintf ( stderr , "Sorry, vaffangulexiting.\n");
+ exit (1);
+ } else {
+ cout << "* squatarra il display: " << surf->w << "x" << surf->h << " " << bpp << "bpp\n";
+ }
+
+ SDL_WM_SetCaption ( Name, Name );
+
+ for ( i=SDL_NOEVENT; i<SDL_NUMEVENTS; ++i )
+ if ( (i != SDL_KEYDOWN) && (i != SDL_QUIT) )
+ SDL_EventState(i, SDL_IGNORE);
+
+ buffer = (unsigned char *) surf->pixels;
+}
+
+void the_end() {
+ SDL_FreeSurface(wat);
+ SDL_FreeSurface(t_fl);
+ SDL_Quit();
+ MikMod_Exit();
+ cout << "---------------------------------- cya!\n";
+ exit(0);
+}
+
+int poll_event(void *data) {
+ SDL_Event event;
+
+ while (!quit) {
+
+ while ( SDL_PollEvent(&event) ) {
+ switch (event.type) {
+ case SDL_KEYDOWN:
+ if ( event.key.keysym.sym == SDLK_ESCAPE ) {
+ quit = true;
+ }
+ break;
+ case SDL_QUIT:
+ quit = true;
+ break;
+ default:
+ break;
+ }
+ }
+ SDL_Delay(500);
+ }
+ return(1);
+}
+
+struct prcd {
+ char *text;
+ Uint16 col;
+ int x;
+ int y;
+ int w;
+ int h;
+};
+
+static const struct prcd t[] = {
+ { "HKM[0x7d1]",0xffff,165,70,3,5 },
+ { "22 - 24 june 2001 - c a t a n i a",0x0,50,440,2,2},
+ { "f r e a k n e t - m e d i a l a b",0x0,50,470,2,2},
+ { ":: come to meet mufhd0 ::",0xffff,26,200,3,8},
+ { NULL,0,0,0,0,0 }
+};
+
+void vaimo() {
+ int c=0,cc=0,gr;
+ // mikmod(); w(300); mikmod(); w(300);
+ while(t[c].text!=NULL) {
+ for(gr=0;gr<50;gr++) {
+ water_update();
+ SDL_BlitSurface(wat,NULL,surf,NULL);
+ for(cc=0;cc<c+1;cc++)
+ diocrap(t[cc].text,t[cc].col,t[cc].x,t[cc].y,t[cc].w,t[cc].h);
+ SDL_Flip(surf);
+ mikmod();
+ }
+ c++;
+ }
+ c--;
+ for(gr=0;gr<50;gr++) {
+ water_update();
+ SDL_BlitSurface(wat,NULL,surf,NULL);
+ for(cc=0;cc<c+1;cc++)
+ diocrap(t[cc].text,t[cc].col,t[cc].x,t[cc].y,t[cc].w,t[cc].h);
+ SDL_Flip(surf);
+ mikmod();
+ }
+}
+
+static const struct prcd p[] = {
+ { "the hackmeeting is a completely no-profit",0xffff,100,100,1,2 },
+ { "autoorganized social event in which hackers",0xffff,140,130,1,2 },
+ { "meet to xperiment and discuss tech and it's uses",0xffff,180,160,1,2 },
+
+ { "it is about freespeech, technology, freesoftware",0xffff,190,180,1,2 },
+ { "technical social cultural and political hacking",0xffff,170,210,1,2 },
+ { "against censorship for the freedom of informations",0xffff,184,240,1,2 },
+
+ { "three days of autoorganized and independent seminars",0xffff,60,240,1,2 },
+ { "for who wants to teach and learn experience on a free basis",0xffff,40,270,1,2 },
+ { "everybody is invited to come and share his knowledge",0xffff,80,300,1,2 },
+
+ { "in this 4th edition the centro sociale AURO in catania",0xffff,167,200,1,2 },
+ { "will host hackers coming from every angle of the netspace,",0xffff,140,230,1,2 },
+ { "to meet and collaborate in building this free event",0xffff,125,260,1,2 },
+
+ { "three days of contamination between everybody's research",0xffff,40,100,1,2 },
+ { "theorical and thecnical discussions, installations, seminars,",0xffff,67,130,1,2 },
+ { "wild coding, project presentations and mufhd0 ceremonies",0xffff,90,160,1,2 },
+
+ { "the hackmeeting gathers hacklabs, independents, associations",0xffff,70,100,1,2 },
+ { "freesoftware developers and anybody who believes that",0xffff,50,130,1,2 },
+ { "INFORMATION WANTS TO BE FREE",0xffff,60,160,2,3 },
+
+ { NULL,0,0,0,0,0}
+};
+
+static struct prcd m[] = {
+ { "human beings are animals no longer subject to evolutive",0x0,90,400,1,2 },
+ { "processes. the incidence of diseases on them is allready",0x0,90,430,1,2 },
+ { "one of the lowest in the realm of life.",0x0,90,460,1,2 },
+
+ { "it is also assumed that humanity is a neoparassite with",0x0,90,400,1,2 },
+ { "no possibility for further evolution. if such a theory is true",0x0,90,430,1,2 },
+ { "humans have reached to evolve into very miserable creatures:",0x0,90,460,1,2 },
+
+ { "beings that have lost the memory of the force that makes them alive,",0x0,90,400,1,2},
+ { "animals which keep a body with the only scope of satisfying",0x0,90,430,1,2 },
+ { "ephemeral desires. don't you think all this is sad?",0x0,90,460,1,2 },
+
+ { "humanity is, at last, a very small phenomenon.",0x0,90,400,1,2 },
+ { "Alltough something created by humans can be revealed as a way",0x0,90,430,1,2 },
+ { "out from this desolation.",0x0,90,460,1,2 },
+
+ { NULL,0,0,0,0,0 }
+};
+
+void mufhd0() {
+ int c=0,madput,rcodi,caz;
+ Uint8 a;
+
+ wat = water_init("data/moody.bmp",surf);
+ water_setphysics(SUPER_SLUDGE);
+
+ for(a=0;a<255;a++) {
+ SDL_SetAlpha(wat,SDL_SRCALPHA,a);
+ SDL_BlitSurface(wat,NULL,surf,NULL);
+ SDL_Flip(surf);
+ }
+
+ SDL_SetAlpha(wat,0x0,255);
+
+ /* inizio splash no testo geusd sak ske ske yay */
+ c = 0; sync_init();
+ while(!passati(15)) {
+ c++;
+ if(c==100) { water_bigsplash(260,130); c=0; }
+ water_update();
+ SDL_BlitSurface(wat,NULL,surf,NULL);
+ SDL_Flip(surf);
+ mikmod();
+ }
+
+ c=0;
+ for(rcodi=0;rcodi<12;rcodi+=3) {
+ if(rcodi==0||rcodi==6) water_distort();
+ sync_init();
+ while(!passati(15)) {
+ if(c==100) { water_bigsplash(260,130); c=0; }
+ else c++;
+ water_update();
+ SDL_BlitSurface(wat,NULL,surf,NULL);
+ diocrap(m[rcodi].text,m[rcodi].col,m[rcodi].x,m[rcodi].y,m[rcodi].w,m[rcodi].h);
+ diocrap(m[rcodi+1].text,m[rcodi+1].col,m[rcodi+1].x,m[rcodi+1].y,m[rcodi+1].w,m[rcodi+1].h);
+ diocrap(m[rcodi+2].text,m[rcodi+2].col,m[rcodi+2].x,m[rcodi+2].y,m[rcodi+2].w,m[rcodi+2].h);
+ SDL_Flip(surf);
+ mikmod();
+ }
+ }
+
+ sync_init();
+ while(!passati(10)) {
+ water_update();
+ SDL_BlitSurface(wat,NULL,surf,NULL);
+ SDL_Flip(surf);
+ mikmod();
+ }
+
+ water_bigsplash(260,130);
+
+ sync_init();
+ while(!passati(5)) {
+ water_update();
+ SDL_BlitSurface(wat,NULL,surf,NULL);
+ diocrap("LINE:",0x0,200,430,1,2);
+ diocrap("what do you mean?",0x0,200,460,1,2);
+ SDL_Flip(surf);
+ mikmod();
+ }
+
+ water_bigsplash(260,130);
+
+ sync_init();
+ while(!passati(8)) {
+ water_update();
+ SDL_BlitSurface(wat,NULL,surf,NULL);
+ diocrap("the Network, i talk about the Wired Line.",0x0,110,430,1,2);
+ SDL_Flip(surf);
+ mikmod();
+ }
+
+ water_bigsplash(260,130);
+
+ sync_init();
+ while(!passati(5)) {
+ water_update();
+ SDL_BlitSurface(wat,NULL,surf,NULL);
+ diocrap("LINE:",0x0,200,430,1,2);
+ diocrap("who are you?? tell me!",0x0,200,460,1,2);
+ SDL_Flip(surf);
+ mikmod();
+ }
+
+ water_distort();
+
+ sync_init();
+ while(!passati(20)) {
+ water_update();
+ SDL_BlitSurface(wat,NULL,surf,NULL);
+ diocrap("i am, MUFHD0.",0x0,210,430,1,2);
+ SDL_Flip(surf);
+ mikmod();
+ }
+}
+
+static const struct prcd abrno[] = {
+ { "+ mufhd0",0xffff,5,100,3,5 },
+ { "+ autismo",0xffff,5,100,3,5 },
+ { "+ paranoia",0xffff,5,100,3,5 },
+ { "+ consapevolezza",0xffff,5,100,3,5 },
+ { "+ sharing",0xffff,5,100,3,5 },
+ { "+ freedom",0xffff,5,100,3,5 },
+ { "+ privacy",0xffff,5,100,3,5 },
+ { "+ freesoftware",0xffff,5,100,3,5 },
+ { "+ linux",0xffff,5,100,3,5 },
+ { "+ bandwidth",0xffff,5,100,3,5 },
+ { "+ hascii",0xffff,5,100,3,5 },
+ { "+ freaknet",0xffff,5,100,3,5 },
+ { "+ code",0xffff,5,100,3,5 },
+};
+
+void rotor() {
+ int c=0;int k=0;
+ short xbounce = 0;
+ short ybounce = 0;
+
+ for(;teta!=179;teta = (teta+1)%360) {
+ rotor_update();
+ SDL_Flip(surf);
+ mikmod();
+ }
+
+ while((p[c].text!=NULL)&&(quit!=true)) {
+ sync_init();
+ while (!passati(10)) {
+ rotor_update();
+ teta = (teta+1)%360;
+
+ diocrap(p[c].text,p[c].col,p[c].x,p[c].y,p[c].w,p[c].h);
+ diocrap(p[c+1].text,p[c+1].col,p[c+1].x,p[c+1].y,p[c+1].w,p[c+1].h);
+ diocrap(p[c+2].text,p[c+2].col,p[c+2].x,p[c+2].y,p[c+2].w,p[c+2].h);
+
+ if(!Voice_Stopped(3)) ybounce = (ybounce<-200) ? ybounce+4 : ybounce-6;
+ if(!Voice_Stopped(1)) ybounce = (ybounce>15) ? ybounce-6 : ybounce+4;
+ if(!Voice_Stopped(4)) xbounce-=2;
+ if(!Voice_Stopped(2)) xbounce+=5;
+
+ if(ybounce>0) k = (k+1)%13;
+ diocrap(abrno[k].text,0xffff,160+xbounce,513+ybounce,3,5);
+
+ SDL_Flip(surf);
+ mikmod();
+
+ ybounce = (ybounce>0) ? ybounce-1 : (ybounce<0) ? ybounce+1 : ybounce;
+ xbounce = (xbounce>0) ? xbounce-1 : (xbounce<0) ? xbounce+1 : xbounce;
+
+ }
+ c+=3;
+ }
+}
+
+static struct prcd j[] = {
+ { "CODING +++ jaromil [ dyne.org ]",0x0,10,512,2,3 },
+ { "MUSIC +++ davidepinna [ misfu ]",0x0,10,512,2,3 },
+ { "gfx ++ mapplethorpe jaromil",0x0,10,512,2,2 },
+ { NULL,0,0,0,0,0 },
+ { NULL,0,0,0,0,0 },
+ { "this intro is 100% FREESOFTWARE: no proprietary",0x0,10,512,1,2 },
+ { "libs or tools employed, feel free to misuse ;)",0x0,10,512,1,2 },
+ { "(yes, this font sucks, but comes from the kernel)",0x0,10,512,1,2 },
+ { NULL,0,0,0,0,0 },
+ { NULL,0,0,0,0,0 },
+ { "GREETINGS to:",0x0,10,512,1,2 },
+ { "lobo - superbuddakarma",0x0,10,512,2,2 },
+ { "asbesto - asciifarts|suspence|existing",0x0,10,512,2,2 },
+ { "august - nicestwife one can have",0x0,10,512,2,2 },
+ { "hackmeeting people - too long to list",0x0,10,512,2,2 },
+ { "AVANA TPO FORTEPRENESTINO _TO BATCAVERNA",0x0,10,512,2,2 },
+ { "LOA BULK AUTISTICI.ORG SERVUS MINMEGATV",0x0,10,512,2,2 },
+ { "STADTWERKSTATT LUPIP ECN-INR STRANONET",0x0,10,512,2,2 },
+ { "HACKLABFI SGAMATI OLOGRAFIX MADDLER.NET",0x0,10,512,2,2 },
+ { "ENEMY.ORG CANDIDATV BBK.ORG MENT.ORG QUBE",0x0,10,512,2,2 },
+ { NULL,0,0,0,0,0 },
+ { NULL,0,0,0,0,0 },
+ { NULL,0,0,0,0,0 },
+ { "in memory of Douglas Adams",0x0,10,512,2,3 },
+ { NULL,0,0,0,0,0 },
+ { "il nostro scopo e' la veglia,",0x0,10,512,2,2 },
+ { "il nostro nemico e' il sonno senza sogni",0x0,10,512,2,2 },
+ { " - mindwarp",0x0,10,512,2,2 }
+};
+
+#define DIOBAVA 27
+
+void greetz() {
+ int c=0,cc=0, dist = 0;
+ int finito = 0;
+ SDL_Surface *phone;
+ phone = SDL_LoadBMP(OLDSCHOOL);
+ if (phone == NULL) exit(1);
+ SDL_SetAlpha(phone,SDL_SRCALPHA|SDL_RLEACCEL,0);
+ phone = optimize(phone);
+
+ for(Uint8 a=0;a<255;a++) {
+ SDL_SetAlpha(phone,SDL_SRCALPHA,a);
+ SDL_BlitSurface(phone,NULL,surf,NULL);
+ SDL_Flip(surf);
+ mikmod();
+ }
+
+ while(j[DIOBAVA].y>256) {
+ SDL_BlitSurface(phone,NULL,surf,NULL);
+ for(cc=0;cc<c;cc++) {
+ if((j[cc].y>0)&&(j[cc].text!=NULL))
+ diocrap(j[cc].text,j[cc].col,j[cc].x,j[cc].y,j[cc].w,j[cc].h);
+ j[cc].y--;
+ }
+ SDL_Flip(surf);
+ SDL_Delay( 30 );
+ if(dist==40&&c<DIOBAVA+1) { c++; dist=0; } else dist++;
+ if(j[c].text==NULL) finito++;
+ mikmod();
+ }
+
+ sync_init();
+ while(!passati(10)) {
+ SDL_BlitSurface(phone,NULL,surf,NULL);
+ diocrap(j[DIOBAVA-4].text,j[DIOBAVA-4].col,j[DIOBAVA-4].x,j[DIOBAVA-4].y,j[DIOBAVA-4].w,j[DIOBAVA-4].h);
+ diocrap(j[DIOBAVA].text,j[DIOBAVA].col,j[DIOBAVA].x,j[DIOBAVA].y,j[DIOBAVA].w,j[DIOBAVA].h);
+ diocrap(j[DIOBAVA-1].text,j[DIOBAVA-1].col,j[DIOBAVA-1].x,j[DIOBAVA-1].y,j[DIOBAVA-1].w,j[DIOBAVA-1].h);
+ diocrap(j[DIOBAVA-2].text,j[DIOBAVA-2].col,j[DIOBAVA-2].x,j[DIOBAVA-2].y,j[DIOBAVA-2].w,j[DIOBAVA-2].h);
+ SDL_Flip(surf);
+ mikmod();
+ }
+ SDL_FreeSurface(phone);
+}
+
+int main (int argc, char **argv)
+{
+
+ SDL_Thread *ilporcodio;
+
+ cerr << "MUFHD0 INTRO ::::::: HACKMEETING[0x7d1]\n";
+ cerr << " -------- code = jaromil ..//dyne.org\n";
+ cerr << " ----- muzaq = misfu ..//misfu.dyne.org\n";
+ cerr << " ++++++++++++++++++++++++++++++++++++++\n";
+
+ /* Init X */
+ init_x(W, H, 16, FULLSCREEN);
+
+ /*** MIKMOD LOAD SOUND INITIALIZATION A VOTAMAZZA ***/
+ MODULE *kaligari, *anaurale;
+ setenv("MM_FRAGSIZE","16",0); /* latenza bassa e vivi meglio */
+ md_mixfreq=44100;
+ md_device = 0; // device: autodetect
+ md_volume = 128; // MAX VOLUME A VOTAMAZZA
+ md_musicvolume = 128; // music volume (max 128)
+ md_sndfxvolume = 128; // sound effects volume (max 128)
+ md_pansep = 128; // panning separation (0 = mono, 128 = full stereo)
+ md_reverb = 0; /* 0 - 15 */
+ md_mode = DMODE_16BITS|DMODE_STEREO|DMODE_SOFT_MUSIC;
+ MikMod_RegisterAllDrivers();
+ MikMod_RegisterLoader(&load_xm);
+ if(MikMod_Init("")) {
+ fprintf(stderr,"aiacristo! mikmod error!\n"); exit(-1); }
+ kaligari = Player_Load(KALIGARI,32,0);
+ anaurale = Player_Load(ANAURALE,32,0);
+ Player_SetVolume(100);
+ Player_Start(kaligari);
+ cerr << "* e mo parte pure la moseca\n";
+ /* ---------- VAIMO' ---------- */
+
+ /* TAVOLE Sin/Cosin */
+ rotor_init_tables();
+
+ /* Texture per rotor*/
+ rotor_init_texture();
+
+ ilporcodio = SDL_CreateThread(poll_event,NULL);
+
+ sync_init();
+
+ mufhd0();
+
+ quit = false;
+ Player_Stop();
+ Player_Start(anaurale);
+
+ vaimo();
+
+ quit = false;
+
+ rotor();
+
+ greetz();
+
+ fertig = true;
+ quit = true;
+ SDL_WaitThread(ilporcodio,NULL);
+
+ /* the end*/
+ the_end();
+}