comparison src/video/cybergfx/SDL_cgxaccel.c @ 1336:3692456e7b0f

Use SDL_ prefixed versions of C library functions. FIXME: Change #include <stdlib.h> to #include "SDL_stdlib.h" Change #include <string.h> to #include "SDL_string.h" Make sure nothing else broke because of this...
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 06:59:48 +0000
parents c9b51268668f
children c71e05b4dc2e
comparison
equal deleted inserted replaced
1335:c39265384763 1336:3692456e7b0f
50 int CGX_SetHWColorKey(_THIS,SDL_Surface *surface, Uint32 key) 50 int CGX_SetHWColorKey(_THIS,SDL_Surface *surface, Uint32 key)
51 { 51 {
52 if(surface->hwdata) 52 if(surface->hwdata)
53 { 53 {
54 if(surface->hwdata->mask) 54 if(surface->hwdata->mask)
55 free(surface->hwdata->mask); 55 SDL_free(surface->hwdata->mask);
56 56
57 if(surface->hwdata->mask=malloc(RASSIZE(surface->w,surface->h))) 57 if(surface->hwdata->mask=SDL_malloc(RASSIZE(surface->w,surface->h)))
58 { 58 {
59 Uint32 pitch,ok=0; 59 Uint32 pitch,ok=0;
60 APTR lock; 60 APTR lock;
61 61
62 memset(surface->hwdata->mask,255,RASSIZE(surface->w,surface->h)); 62 SDL_memset(surface->hwdata->mask,255,RASSIZE(surface->w,surface->h));
63 63
64 D(bug("Building colorkey mask: color: %ld, size: %ld x %ld, %ld bytes...Bpp:%ld\n",key,surface->w,surface->h,RASSIZE(surface->w,surface->h),surface->format->BytesPerPixel)); 64 D(bug("Building colorkey mask: color: %ld, size: %ld x %ld, %ld bytes...Bpp:%ld\n",key,surface->w,surface->h,RASSIZE(surface->w,surface->h),surface->format->BytesPerPixel));
65 65
66 if(lock=LockBitMapTags(surface->hwdata->bmap,LBMI_BASEADDRESS,(ULONG)&surface->pixels, 66 if(lock=LockBitMapTags(surface->hwdata->bmap,LBMI_BASEADDRESS,(ULONG)&surface->pixels,
67 LBMI_BYTESPERROW,(ULONG)&pitch,TAG_DONE)) 67 LBMI_BYTESPERROW,(ULONG)&pitch,TAG_DONE))
153 153
154 } 154 }
155 break; 155 break;
156 default: 156 default:
157 D(bug("Pixel mode non supported for color key...")); 157 D(bug("Pixel mode non supported for color key..."));
158 free(surface->hwdata->mask); 158 SDL_free(surface->hwdata->mask);
159 surface->hwdata->mask=NULL; 159 surface->hwdata->mask=NULL;
160 ok=-1; 160 ok=-1;
161 } 161 }
162 UnLockBitMap(lock); 162 UnLockBitMap(lock);
163 D(bug("...Colorkey built!\n")); 163 D(bug("...Colorkey built!\n"));