Mercurial > hg > dmlib
comparison dmlib.h @ 612:696f03f30c0e
Make certain static inline graphics functions always available, no need to
put them inside conditional.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 12 Apr 2013 12:33:49 +0300 |
parents | 828d86cd10e0 |
children | 2726d91e3409 |
comparison
equal
deleted
inserted
replaced
611:828d86cd10e0 | 612:696f03f30c0e |
---|---|
306 | 306 |
307 | 307 |
308 #define DM_HEADER | 308 #define DM_HEADER |
309 #include "dmblitfunc.h" | 309 #include "dmblitfunc.h" |
310 #undef DM_HEADER | 310 #undef DM_HEADER |
311 #endif | 311 |
312 #endif // DM_GFX_BLITS | |
312 | 313 |
313 | 314 |
314 /* Misc functions | 315 /* Misc functions |
315 */ | 316 */ |
316 #ifdef DM_GFX_MISC | 317 #ifdef DM_GFX_MISC |
318 | |
317 void dmFillRect(SDL_Surface *screen, int x0, int y0, int x1, int y1, const Uint32 col); | 319 void dmFillRect(SDL_Surface *screen, int x0, int y0, int x1, int y1, const Uint32 col); |
318 void dmDrawHLine(SDL_Surface *screen, int x0, int x1, int yc, const Uint32 col); | 320 void dmDrawHLine(SDL_Surface *screen, int x0, int x1, int yc, const Uint32 col); |
319 void dmDrawVLine(SDL_Surface *screen, int y0, int y1, int xc, const Uint32 col); | 321 void dmDrawVLine(SDL_Surface *screen, int y0, int y1, int xc, const Uint32 col); |
320 | 322 |
321 void dmDrawBox3D(SDL_Surface *screen, int x0, int y0, int x1, int y1, Uint32 ucol, Uint32 dcol); | 323 void dmDrawBox3D(SDL_Surface *screen, int x0, int y0, int x1, int y1, Uint32 ucol, Uint32 dcol); |
322 void dmFillBox3D(SDL_Surface *screen, int x0, int y0, int x1, int y1, Uint32 bgcol, Uint32 ucol, Uint32 dcol); | 324 void dmFillBox3D(SDL_Surface *screen, int x0, int y0, int x1, int y1, Uint32 bgcol, Uint32 ucol, Uint32 dcol); |
323 | 325 |
326 #endif // DM_GFX_MISC | |
327 | |
324 | 328 |
325 static inline void dmClearSurface(SDL_Surface *screen, const Uint32 col) | 329 static inline void dmClearSurface(SDL_Surface *screen, const Uint32 col) |
326 { | 330 { |
327 SDL_FillRect(screen, NULL, col); | 331 SDL_FillRect(screen, NULL, col); |
328 } | 332 } |
342 | 346 |
343 static inline int dmDirectBlitSurface(SDL_Surface *bmp, SDL_Surface *screen) | 347 static inline int dmDirectBlitSurface(SDL_Surface *bmp, SDL_Surface *screen) |
344 { | 348 { |
345 return SDL_BlitSurface(bmp, NULL, screen, NULL); | 349 return SDL_BlitSurface(bmp, NULL, screen, NULL); |
346 } | 350 } |
347 #endif | |
348 | 351 |
349 | 352 |
350 static inline SDL_Surface *dmCopySurface(SDL_Surface *src) | 353 static inline SDL_Surface *dmCopySurface(SDL_Surface *src) |
351 { | 354 { |
352 if (src != NULL) | 355 if (src != NULL) |