Euh j'ai plus le code puisque j'ai retiré un paramètre et j'ai crée une autre fonction.
La première fonction
;C prototype: void DrawSquareUp (unsigned char *sprt1, unsigned char *sptr2, unsigned char *sprt3, unsigned char *sprt4, void *dest);
;
;void DrawSquareUp (register unsigned char *sprt1 asm("%a2"),
; register unsigned char *sprt2 asm("%a3"),
; register unsigned char *sprt3 asm("%a4"),
; register unsigned long *sprt4 asm("%a5"),
; register void *dest asm("%a0"));
section ".data"
xdef DrawSquareUp
DrawSquareUp:
movem.l d0-d2/a1,-(a7)
lea 8000(a0),a1
moveq.l #7,d5
bcl_draw_sprite8:
clr.l d0
clr.l d3
move.b (a4)+,d0
move.b (a4)+,d3
;Corner left
move.b (a2)+,(a0)+
move.b (a2)+,(a1)+
;Up x 3
move.b d0,(a0)+
move.b d0,(a0)+
move.b d0,(a0)+
move.b d3,(a1)+
move.b d3,(a1)+
move.b d3,(a1)+
;Doors
move.l (a5),(a0)+
move.l 4(a5),(a1)+
;Up x 12
;Long gris clair
clr.l d1
clr.l d2
move.b d0,d1
rol.w #8,d0
or.w d0,d1
move.l d1,d2
swap.l d1
or.l d1,d2
;Long gris foncé
clr.l d1
clr.l d4
move.b d3,d1
rol.w #8,d3
or.w d3,d1
move.l d1,d4
swap.l d1
or.l d1,d4
move.l d2,(a0)+
move.l d2,(a0)+
move.l d2,(a0)+
move.l d4,(a1)+
move.l d4,(a1)+
move.l d4,(a1)+
;Doors
move.l (a5)+,(a0)+
move.l (a5)+,(a1)+
;Up x 3
move.l d2,(a0)+
move.l d4,(a1)+
;Corner right
move.b (a3)+,-1(a0)
move.b (a3)+,-1(a1)
lea 12(a0),a0
lea 12(a1),a1
dbf d5,bcl_draw_sprite8
movem.l (a7)+,d0-d2/a1
rts
La deuxième fonction:
;C prototype: void DrawSquareSide (unsigned char *sprt, void *dest);
;
;void DrawSquareSide (register unsigned char *sprt asm("%a2"),
; register void *dest asm("%a0"));
section ".data"
xdef DrawSquareSide
DrawSquareSide:
movem.l a1/a3,-(a7)
movea.l a2,a3
lea 320(a0),a0
lea 8000(a0),a1
moveq.l #5,d6
\bcl_draw_all_left:
moveq.l #31,d7
movea.l a3,a2
\bcl_draw_left8:
move.b (a2),(a0)
move.b (a2)+,27(a0)
move.b (a2),(a1)
move.b (a2)+,27(a1)
lea 40(a0),a0
lea 40(a1),a1
dbf d7,\bcl_draw_left8
dbf d6,\bcl_draw_all_left
movem.l (a7)+,a1/a3
rts
Mais ça n'as plus rien à voir avec le problème.
Un petit screen de l'avancement du projet, je compte être fidèle à Arkanoid revenge of DOH sur ATARI ST.
http://perso.wanadoo.fr/tisofts/arkanoid/screens/screen4.gif