#define ClipSpriteBmp { \ if (!Bits || !sprite) return; \ if (y0<0) { \ sprite+=l*(0-y0)*3; \ h-=0-y0; \ y0=0; \ } \ if (x0<0) { \ l+=0+x0; \ a=-x0; \ sprite+=-x0*3; \ x0=0; \ } \ y0+=CLIP_Y0; \ x0+=CLIP_X0; \ if (y0+h>=CLIP_Y1) { \ h+=CLIP_Y1-(y0+h); \ } \ if (x0+l>=CLIP_X1) { \ a+=-(CLIP_X1-(x0+l)); \ l+=CLIP_X1-(x0+l); \ } \ a*=3; \ if (h<0) return; \ } #define ClipSpritePalBmp { \ if (!Bits || !sprite) return; \ if (y0<0) { \ sprite+=l*(0-y0); \ h-=0-y0; \ y0=0; \ } \ if (x0<0) { \ l+=0+x0; \ a=-x0; \ sprite+=-x0; \ x0=0; \ } \ y0+=CLIP_Y0; \ x0+=CLIP_X0; \ if (y0+h>=CLIP_Y1) { \ h+=CLIP_Y1-(y0+h); \ } \ if (x0+l>=CLIP_X1) { \ a+=-(CLIP_X1-(x0+l)); \ l+=CLIP_X1-(x0+l); \ } \ if (h<0) return; \ } void SpritePalBmp(int x0, int y0, int l, int h, register unsigned char *sprite, unsigned char *palette) { int x, y, a=0; register unsigned char *bits=Bits+LARG_BUF*3*HAUT_BUF, *ptr, *pal; ClipSpritePalBmp; for (y=y0;yxy.x0,rect->xy.y0,rect->xy.x1,rect->xy.y1,RGB(255,255,255)); else if (Attr==1) FxCadre(rect->xy.x0,rect->xy.y0,rect->xy.x1,rect->xy.y1,RGB(0,0,0)); else if (Attr==2) FxCadre(rect->xy.x0,rect->xy.y0,rect->xy.x1,rect->xy.y1,RGB(255,255,255),FX_XOR); } typedef struct { short x0, y0, x1, y1; } WIN_RECT; WIN_RECT gblWinRect; WIN_RECT *MakeWinRect (short x0, short y0, short x1, short y1) { gblWinRect.x0=x0, gblWinRect.x1=x1, gblWinRect.y0=y0, gblWinRect.y1=y1; return &gblWinRect; } void DrawClipRect (const WIN_RECT *rect, const SCR_RECT *clip, short Attr) { Attr&=3; if (Attr==0) FxRect(rect->x0,rect->y0,rect->x1,rect->y1,RGB(255,255,255)); else if (Attr==1) FxRect(rect->x0,rect->y0,rect->x1,rect->y1,RGB(0,0,0)); else if (Attr==2) FxRect(rect->x0,rect->y0,rect->x1,rect->y1,RGB(255,255,255),FX_XOR); } void DrawLine (short x0, short y0, short x1, short y1, short Attr) { Attr&=3; if (Attr==0) FxLigne(x0,y0,x1,y1,RGB(255,255,255)); else if (Attr==1) FxLigne(x0,y0,x1,y1,RGB(0,0,0)); else if (Attr==2) FxLigne(x0,y0,x1,y1,RGB(255,255,255),FX_XOR); } void OSClearBreak() { //Ne fait rien } #define T_APPS T_F9