
Vous n'êtes pas identifié.
bon voila la police de caractère de bomberman pas mal remaniée:
char alpha[][2][8] = {
{{0x3C,0x7E,0xFF,0xFF,0xFF,0xFF,0xE7,0x42},
{0x3C,0x42,0x99,0x99,0x81,0x99,0xA5,0x42}},
{{0x7C,0xFE,0xFF,0xFE,0xFF,0xFF,0xFE,0x7C},
{0x7C,0x82,0x99,0x82,0x99,0x99,0x82,0x7C}},
{{0x3E,0x7F,0xFF,0xF8,0xF8,0xFF,0x7F,0x3E},
{0x3E,0x41,0x87,0x88,0x88,0x87,0x41,0x3E}},
{{0x7C,0xFE,0xFF,0xFF,0xFF,0xFF,0xFE,0x7C},
{0x7C,0x82,0x91,0x99,0x99,0x91,0x82,0x7C}},
{{0x7E,0xFF,0xFE,0xFF,0xFE,0xFE,0xFF,0x7E},
{0x7E,0x81,0x9E,0x80,0x9E,0x9E,0x81,0x7E}},
{{0x7E,0xFF,0xFE,0xFF,0xFE,0xF0,0xF0,0x60},
{0x7E,0x81,0x9E,0x81,0x9E,0x90,0x90,0x60}},
{{0x3C,0x7E,0xFF,0xFE,0xFF,0xFF,0x7E,0x3C},
{0x3C,0x42,0x9F,0x9E,0x99,0x99,0x42,0x3C}},
{{0x42,0xE7,0xE7,0xFF,0xFF,0xFF,0xE7,0x42},
{0x42,0xA5,0xA5,0x99,0x81,0x99,0xA5,0x42}},
{{0x3C,0x7E,0x3C,0x3C,0x3C,0x3C,0x7E,0x3C},
{0x3C,0x42,0x24,0x24,0x24,0x24,0x42,0x3C}},
{{0x7E,0xFF,0x7F,0x7,0x27,0x7F,0x7E,0x3C},
{0x7E,0x81,0x79,0x5,0x25,0x59,0x42,0x3C}},
{{0x60,0xF0,0xF0,0xF0,0xF0,0xFE,0xFF,0x7E},
{0x60,0x90,0x90,0x90,0x90,0x9E,0x81,0x7E}},
{{0x66,0xFF,0xFF,0xFF,0xFF,0xE7,0xE7,0x42},
{0x66,0x99,0x81,0xA5,0xBD,0xA5,0xA5,0x42}},
{{0x66,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x66},
{0x66,0x99,0x89,0x81,0x91,0x99,0x99,0x66}},
{{0x3C,0x7E,0xFF,0xFF,0xFF,0xFF,0x7E,0x3C},
{0x3C,0x42,0x99,0x99,0x99,0x99,0x42,0x3C}},
{{0x7C,0xFE,0xFF,0xFF,0xFE,0xFC,0xF0,0x60},
{0x7C,0x82,0x99,0x99,0x82,0x9C,0x90,0x60}},
{{0x3C,0x7E,0xFF,0xFF,0xFF,0xFF,0x7E,0x3B},
{0x3C,0x42,0x99,0x99,0x99,0x9D,0x4E,0x3B}},
{{0x7C,0xFE,0xFF,0xFF,0xFE,0xFF,0xFF,0x66},
{0x7C,0x82,0x99,0x99,0x82,0x81,0x99,0x66}},
{{0x3C,0x7E,0xFC,0x7E,0x7F,0xFF,0x7E,0x3C},
{0x3C,0x42,0x9C,0x42,0x79,0x99,0x42,0x3C}},
{{0x7E,0xFF,0x7E,0x3C,0x3C,0x3C,0x3C,0x18},
{0x7E,0x81,0x66,0x24,0x24,0x24,0x24,0x18}},
{{0x66,0xFF,0xFF,0xFF,0xFF,0xFF,0x7E,0x3C},
{0x66,0x99,0x99,0x99,0x99,0x99,0x42,0x3C}},
{{0x66,0xFF,0xFF,0xFF,0xFF,0x7E,0x3C,0x18},
{0x66,0x99,0x99,0x99,0x99,0x42,0x24,0x18}},
{{0x62,0xF7,0xFF,0xFF,0xFF,0xFF,0x7E,0x34},
{0x62,0x95,0x9D,0x95,0x95,0x81,0x4A,0x34}},
{{0x66,0xFF,0xFF,0x7E,0x3C,0x3C,0x3C,0x18},
{0x66,0x99,0x99,0x42,0x24,0x24,0x24,0x18}},
{{0x7E,0xFF,0x7F,0x3E,0x7C,0xFE,0xFF,0x7E},
{0x7E,0x81,0x79,0x22,0x44,0x9E,0x81,0x7E}},
{{0x3C,0x7E,0xFF,0xFF,0xFF,0xFF,0x7E,0x3C},
{0x3C,0x42,0x99,0x99,0x99,0x99,0x42,0x3C}},
{{0x18,0x3C,0x7C,0x3C,0x3C,0x3C,0x7E,0x3C},
{0x18,0x24,0x44,0x24,0x24,0x24,0x42,0x3C}},
{{0x3C,0x7E,0xFF,0x7F,0x3A,0x7E,0xFF,0x7E},
{0x3C,0x42,0x99,0x79,0x32,0x4E,0x81,0x7E}},
{{0x3C,0x7E,0xFF,0x7E,0x7F,0xFF,0x7E,0x3C},
{0x3C,0x42,0x99,0x62,0x79,0x99,0x42,0x3C}},
{{0x1C,0x3E,0x7E,0xFE,0xFE,0xFF,0x7E,0xC},
{0x1C,0x22,0x42,0x92,0xB2,0x81,0x72,0xC}},
{{0x7E,0xFF,0xFE,0xFE,0x7F,0xFF,0x7E,0x3C},
{0x7E,0x81,0x9E,0x82,0x79,0x99,0x42,0x3C}},
{{0x3C,0x7E,0xFC,0xFE,0xFF,0xFF,0x7E,0x3C},
{0x3C,0x42,0x9C,0x82,0x99,0x99,0x42,0x3C}},
{{0x7E,0xFF,0x7F,0x1E,0x3C,0x3C,0x3C,0x18},
{0x7E,0x81,0x79,0x12,0x24,0x24,0x24,0x18}},
{{0x3C,0x7E,0xFF,0x7E,0xFF,0xFF,0x7E,0x3C},
{0x3C,0x42,0x99,0x42,0x99,0x99,0x42,0x3C}},
{{0x3C,0x7E,0xFF,0xFF,0x7F,0x3F,0x7E,0x3C},
{0x3C,0x42,0x99,0x99,0x41,0x39,0x42,0x3C}},
{{0x18,0x3C,0x3C,0x18,0x18,0x3C,0x3C,0x18},
{0x18,0x24,0x24,0x18,0x18,0x24,0x24,0x18}},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}};
int convert_Char(char c)
{
if(c=='A') c=0;
if(c=='B') c=1;
if(c=='C') c=2;
if(c=='D') c=3;
if(c=='E') c=4;
if(c=='F') c=5;
if(c=='G') c=6;
if(c=='H') c=7;
if(c=='I') c=8;
if(c=='J') c=9;
//pas de K
if(c=='L') c=10;
if(c=='M') c=11;
if(c=='N') c=12;
if(c=='O') c=13;
if(c=='P') c=14;
if(c=='Q') c=15;
if(c=='R') c=16;
if(c=='S') c=17;
if(c=='T') c=18;
if(c=='U') c=19;
if(c=='V') c=20;
if(c=='W') c=21;
//pas de X
if(c=='Y') c=22;
if(c=='Z') c=23;
if(c==':') c=34;
if(c==' ') c=35;
return(c);
}
void drawChar(int x,int y,int c)
{
y+=1;
c=convert_Char(c);
x=decx+8*x+0-8;
y=8*y+0-8+decy;
asm {
mov ax,0x1A20
mov es,ax
mov bx,x
mov si,y
shl si,4
mov cl,bl
shr bl,3
and cl,7
add si,bx
mov ch,0
}
debut:
asm {
mov di,offset alpha
xor dx,dx
mov ax,c
shl ax,4
mov dl,ch
add di,ax
add di,dx
xor ax,ax
mov dl,ds:[di]
add di,8
mov al,ds:[di]
shl dx,cl
or es:[si],dx
add si,0x800
shl ax,cl
or es:[si],ax
sub si,0x800
sub si,16
inc ch
cmp ch,8
jb debut
}
}
void drawNumber(int x,int y,int c)
{
y+=1;
c=trns(24+c);
x=decx+8*x+0-8;
y=8*y+0-8+decy;
asm {
mov ax,0x1A20
mov es,ax
mov bx,x
mov si,y
shl si,4
mov cl,bl
shr bl,3
and cl,7
add si,bx
mov ch,0
}
debut:
asm {
mov di,offset alpha
xor dx,dx
mov ax,c
shl ax,4
mov dl,ch
add di,ax
add di,dx
xor ax,ax
mov dl,ds:[di]
add di,8
mov al,ds:[di]
shl dx,cl
or es:[si],dx
add si,0x800
shl ax,cl
or es:[si],ax
sub si,0x800
sub si,16
inc ch
cmp ch,8
jb debut
}
}
/*On peut … pr‚sent ‚crire avec des espaces*/
void put_text(int m,int n,char st[])
{for(i=0;st[i]!=' ';i++) drawChar(m-i,n,st[i]);}
mais les routines merdent encore un peu je vais le refaire
Hors ligne
merci mé bon c pa trp le genre de police ke je recherche. Moi c pluto dé police plu petite ke la police dos.
Hors ligne
int convert_Char(char c)
{
if(c=='A') c=0;
if(c=='B') c=1;
if(c=='C') c=2;
if(c=='D') c=3;
if(c=='E') c=4;
if(c=='F') c=5;
if(c=='G') c=6;
if(c=='H') c=7;
if(c=='I') c=8;
if(c=='J') c=9;
//pas de K
if(c=='L') c=10;
if(c=='M') c=11;
if(c=='N') c=12;
if(c=='O') c=13;
if(c=='P') c=14;
if(c=='Q') c=15;
if(c=='R') c=16;
if(c=='S') c=17;
if(c=='T') c=18;
if(c=='U') c=19;
if(c=='V') c=20;
if(c=='W') c=21;
//pas de X
if(c=='Y') c=22;
if(c=='Z') c=23;
if(c==':') c=34;
if(c==' ') c=35;
return(c);
}
8O 8O 8O
Ct po plus simple de faire :
If ((c>=A)&&(c<=Z)) c-='a';
Nan?
Et rajoute le K et le X, quand tu en aura besoin ou bobd, tu sera bien fichu !!
Sinon, tu as bien suivi les recommandations !
Hors ligne
bon voici la police remainée, corrigée, et surtout optimisée (notez que les routines marchent):
/*
* Les sprites de la police de caractere utilisee par BomberMan
* SVP ne PAS utiliser sans mon accord
*
* CopyRight (c) Wahb Ettoumi 2002-2003
* Tous droits reserves
*/
char alpha[][2][8] = {
{{0x3C,0x7E,0xFF,0xFF,0xFF,0xFF,0xE7,0x42}, //A
{0x3C,0x42,0x99,0x99,0x81,0x99,0xA5,0x42}},
{{0x7C,0xFE,0xFF,0xFE,0xFF,0xFF,0xFE,0x7C}, //B
{0x7C,0x82,0x99,0x82,0x99,0x99,0x82,0x7C}},
{{0x3E,0x7F,0xFF,0xF8,0xF8,0xFF,0x7F,0x3E}, //C
{0x3E,0x41,0x87,0x88,0x88,0x87,0x41,0x3E}},
{{0x7C,0xFE,0xFF,0xFF,0xFF,0xFF,0xFE,0x7C}, //D
{0x7C,0x82,0x91,0x99,0x99,0x91,0x82,0x7C}},
{{0x7E,0xFF,0xFE,0xFF,0xFE,0xFE,0xFF,0x7E}, //E
{0x7E,0x81,0x9E,0x80,0x9E,0x9E,0x81,0x7E}},
{{0x7E,0xFF,0xFE,0xFF,0xFE,0xF0,0xF0,0x60}, //F
{0x7E,0x81,0x9E,0x81,0x9E,0x90,0x90,0x60}},
{{0x3C,0x7E,0xFF,0xFE,0xFF,0xFF,0x7E,0x3C}, //G
{0x3C,0x42,0x9F,0x9E,0x99,0x99,0x42,0x3C}},
{{0x42,0xE7,0xE7,0xFF,0xFF,0xFF,0xE7,0x42}, //H
{0x42,0xA5,0xA5,0x99,0x81,0x99,0xA5,0x42}},
{{0x3C,0x7E,0x3C,0x3C,0x3C,0x3C,0x7E,0x3C}, //I
{0x3C,0x42,0x24,0x24,0x24,0x24,0x42,0x3C}},
{{0x7E,0xFF,0x7F,0x7,0x27,0x7F,0x7E,0x3C}, //J
{0x7E,0x81,0x79,0x5,0x25,0x59,0x42,0x3C}},
{{0x60,0xF0,0xF0,0xF0,0xF0,0xFE,0xFF,0x7E}, //L
{0x60,0x90,0x90,0x90,0x90,0x9E,0x81,0x7E}},
{{0x66,0xFF,0xFF,0xFF,0xFF,0xE7,0xE7,0x42}, //M
{0x66,0x99,0x81,0xA5,0xBD,0xA5,0xA5,0x42}},
{{0x66,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x66}, //N
{0x66,0x99,0x89,0x81,0x91,0x99,0x99,0x66}},
{{0x3C,0x7E,0xFF,0xFF,0xFF,0xFF,0x7E,0x3C}, //O
{0x3C,0x42,0x99,0x99,0x99,0x99,0x42,0x3C}},
{{0x7C,0xFE,0xFF,0xFF,0xFE,0xFC,0xF0,0x60}, //P
{0x7C,0x82,0x99,0x99,0x82,0x9C,0x90,0x60}},
{{0x3C,0x7E,0xFF,0xFF,0xFF,0xFF,0x7E,0x3B}, //Q
{0x3C,0x42,0x99,0x99,0x99,0x9D,0x4E,0x3B}},
{{0x7C,0xFE,0xFF,0xFF,0xFE,0xFF,0xFF,0x66}, //R
{0x7C,0x82,0x99,0x99,0x82,0x81,0x99,0x66}},
{{0x3C,0x7E,0xFC,0x7E,0x7F,0xFF,0x7E,0x3C}, //S
{0x3C,0x42,0x9C,0x42,0x79,0x99,0x42,0x3C}},
{{0x7E,0xFF,0x7E,0x3C,0x3C,0x3C,0x3C,0x18}, //T
{0x7E,0x81,0x66,0x24,0x24,0x24,0x24,0x18}},
{{0x66,0xFF,0xFF,0xFF,0xFF,0xFF,0x7E,0x3C}, //U
{0x66,0x99,0x99,0x99,0x99,0x99,0x42,0x3C}},
{{0x66,0xFF,0xFF,0xFF,0xFF,0x7E,0x3C,0x18}, //V
{0x66,0x99,0x99,0x99,0x99,0x42,0x24,0x18}},
{{0x62,0xF7,0xFF,0xFF,0xFF,0xFF,0x7E,0x34}, //W
{0x62,0x95,0x9D,0x95,0x95,0x81,0x4A,0x34}},
{{0x66,0xFF,0xFF,0x7E,0x3C,0x3C,0x3C,0x18}, //Y
{0x66,0x99,0x99,0x42,0x24,0x24,0x24,0x18}},
{{0x7E,0xFF,0x7F,0x3E,0x7C,0xFE,0xFF,0x7E}, //Z
{0x7E,0x81,0x79,0x22,0x44,0x9E,0x81,0x7E}},
{{0x3C,0x7E,0xFF,0xFF,0xFF,0xFF,0x7E,0x3C}, //0
{0x3C,0x42,0x99,0x99,0x99,0x99,0x42,0x3C}},
{{0x18,0x3C,0x7C,0x3C,0x3C,0x3C,0x7E,0x3C}, //1
{0x18,0x24,0x44,0x24,0x24,0x24,0x42,0x3C}},
{{0x3C,0x7E,0xFF,0x7F,0x3A,0x7E,0xFF,0x7E}, //2
{0x3C,0x42,0x99,0x79,0x32,0x4E,0x81,0x7E}},
{{0x3C,0x7E,0xFF,0x7E,0x7F,0xFF,0x7E,0x3C}, //3
{0x3C,0x42,0x99,0x62,0x79,0x99,0x42,0x3C}},
{{0x1C,0x3E,0x7E,0xFE,0xFE,0xFF,0x7E,0xC}, //4
{0x1C,0x22,0x42,0x92,0xB2,0x81,0x72,0xC}},
{{0x7E,0xFF,0xFE,0xFE,0x7F,0xFF,0x7E,0x3C}, //5
{0x7E,0x81,0x9E,0x82,0x79,0x99,0x42,0x3C}},
{{0x3C,0x7E,0xFC,0xFE,0xFF,0xFF,0x7E,0x3C}, //6
{0x3C,0x42,0x9C,0x82,0x99,0x99,0x42,0x3C}},
{{0x7E,0xFF,0x7F,0x1E,0x3C,0x3C,0x3C,0x18}, //7
{0x7E,0x81,0x79,0x12,0x24,0x24,0x24,0x18}},
{{0x3C,0x7E,0xFF,0x7E,0xFF,0xFF,0x7E,0x3C}, //8
{0x3C,0x42,0x99,0x42,0x99,0x99,0x42,0x3C}},
{{0x3C,0x7E,0xFF,0xFF,0x7F,0x3F,0x7E,0x3C}, //9
{0x3C,0x42,0x99,0x99,0x41,0x39,0x42,0x3C}},
{{0x18,0x3C,0x3C,0x18,0x18,0x3C,0x3C,0x18}, //:
{0x18,0x24,0x24,0x18,0x18,0x24,0x24,0x18}},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, //EMPTY
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}};
char trns(char i) //convertit correctement les num‚ros des sprites
{
int v=i;
if (i>=0&&i<=7) v = i+2 ;
if (i==8) v = 0 ;
if (i==9) v = 1 ;
if (i>=10) v = i ;
return(v);
}
char convert_Char(char c)
{
if((c>='A')&&(c<'K')) c-='A' ;
if((c>='L')&&(c<'X')) c-='B' ;
else if(c=='Y') c-='C' ;
else if(c=='Z') c-='C' ;
else if(c==':') c=34 ;
else if(c==' ') c=35 ;
return(c);
}
void drawChar(int x,int y,int c)
{
y+=1;
c=convert_Char(c);
x=decx+8*x+0-8;
y=8*y+0-8+decy;
asm {
mov ax,0x1A20
mov es,ax
mov bx,x
mov si,y
sub si,1
shl si,4
mov cl,bl
shr bl,3
and cl,7
add si,bx
mov ch,0
}
debut:
asm {
mov di,offset alpha
xor dx,dx
mov ax,c
shl ax,4
mov dl,ch
add di,ax
add di,dx
xor ax,ax
mov dl,ds:[di]
add di,8
mov al,ds:[di]
shl dx,cl
or es:[si],dx
add si,0x800
shl ax,cl
or es:[si],ax
sub si,0x800
sub si,16
inc ch
cmp ch,8
jb debut
}
}
void drawNumber(int x,int y,int c)
{
y+=1;
c=trns(24+c);
x=decx+8*x+0-8;
y=8*y+0-8+decy;
asm {
mov ax,0x1A20
mov es,ax
mov bx,x
mov si,y
sub si,1
shl si,4
mov cl,bl
shr bl,3
and cl,7
add si,bx
mov ch,0
}
debut:
asm {
mov di,offset alpha
xor dx,dx
mov ax,c
shl ax,4
mov dl,ch
add di,ax
add di,dx
xor ax,ax
mov dl,ds:[di]
add di,8
mov al,ds:[di]
shl dx,cl
or es:[si],dx
add si,0x800
shl ax,cl
or es:[si],ax
sub si,0x800
sub si,16
inc ch
cmp ch,8
jb debut
}
}
void put_text(int m,int n,char st[])
{for(i=0;st[i]!=' ';i++) drawChar(m-i,n,st[i]);}
Hors ligne
j'adore le smiley
en plein milieu !!! :ptdr:
Hors ligne
Ca c qd on fait 8 ) pour ne pas que le smiley s'affiche, faut séparer les 2 characteres 
Hors ligne
Et avec MON autorisation
hehe
Ya mes routines dedans
hehe
pas fous !
Hors ligne
avec un:
sub si,1
en plus
c t décalé et avec le calcul des pages en moins par la même occaz, g mis directo un traditionnel mov es,ax
et voila
Hors ligne
c pas une raison
Je demende juste un remerciement a la fin du prog pour tt les routines que vous me prenez, c pas compiké que je sache !
@+
Hors ligne
Je te fais copnfiance, c'est pour ça que je t'ai fait tes routines, je compte verifier pour els autres, garre a vous !!
Notez que je compte metrre sur mon site tout les progs qui sont avec mes routines, bon moyen d'avoir plus de cluics !
Donc, ceux qui le font, mailez moi, c tout, et je m'occupe de tout
Hors ligne
:cry: :cry: :cry:
Non mais g toujours mis les crédits des gars qui ont contribué directement ou indirectement a mes créations ...
Hors ligne