int SDL_FillRect(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);
Uint32 SDL_MapRGB(SDL_PixelFormat *fmt, Uint8 r, Uint8 g, Uint8 b);
SDL_FillRect( surf, NULL, SDL_MapRGB(surf->format, 0, 255, 0) );
SDL_Rect rect;
rect.x = 20; rect.y = 30, rect.h = 40, rect.w = 60;
SDL_FillRect( surf2, &rect, SDL_MapRGB(surf2->format, 255, 255, 0) );
typedef struct
{
int i;
} MaStruct;
MaStruct s1, *s2;
s2 = &s1;
s1.i = 3;
s2->i = 4;
Retourner vers Besoin d'aide en SDL ?
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 2 invités