From 57726c7324f165c70671fc5b05d6c0964f56b870 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 28 Aug 2013 16:30:50 +0300 Subject: improve debug checkers. add missing surface functions for debugging. --- src/utils/sdlcheckutils.cpp | 16 ++++++++++++++++ src/utils/sdlcheckutils.h | 8 ++++++++ 2 files changed, 24 insertions(+) (limited to 'src/utils') diff --git a/src/utils/sdlcheckutils.cpp b/src/utils/sdlcheckutils.cpp index 755f9553a..ee2f41b77 100644 --- a/src/utils/sdlcheckutils.cpp +++ b/src/utils/sdlcheckutils.cpp @@ -184,4 +184,20 @@ SDL_Surface *FakeTTF_RenderUTF8_Blended(_TTF_Font *const font, font, text, fg), file, line); } +SDL_Surface *FakeSDL_DisplayFormat(SDL_Surface *const surface, + const char *const file, + const unsigned line) +{ + return addSurface("SDL_DisplayFormat", + SDL_DisplayFormat(surface), file, line); +} + +SDL_Surface *FakeSDL_DisplayFormatAlpha(SDL_Surface *const surface, + const char *const file, + const unsigned line) +{ + return addSurface("SDL_DisplayFormatAlpha", + SDL_DisplayFormatAlpha(surface), file, line); +} + #endif // DEBUG_SDL_SURFACES diff --git a/src/utils/sdlcheckutils.h b/src/utils/sdlcheckutils.h index 5a29ab1ba..5bfdad3ed 100644 --- a/src/utils/sdlcheckutils.h +++ b/src/utils/sdlcheckutils.h @@ -63,5 +63,13 @@ SDL_Surface *FakeTTF_RenderUTF8_Blended(_TTF_Font *const font, SDL_Surface *FakeIMG_Load(const char *name, const char *const file, const unsigned line); +SDL_Surface *FakeSDL_DisplayFormat(SDL_Surface *const surface, + const char *const file, + const unsigned line); + +SDL_Surface *FakeSDL_DisplayFormatAlpha(SDL_Surface *const surface, + const char *const file, + const unsigned line); + #endif // DEBUG_SDL_SURFACES #endif // UTILS_SDLCHECKUTILS_H -- cgit v1.2.3-60-g2f50