ManaPlus
sdlcheckutils.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2013-2019 The ManaPlus Developers
4  * Copyright (C) 2019-2021 Andrei Karas
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef UTILS_SDLCHECKUTILS_H
23 #define UTILS_SDLCHECKUTILS_H
24 
25 #include "localconsts.h"
26 #ifdef DEBUG_SDL_SURFACES
27 
28 #include <string>
29 
30 struct _TTF_Font;
31 struct SDL_Color;
32 struct SDL_PixelFormat;
33 struct SDL_RWops;
34 struct SDL_Surface;
35 
36 SDL_Surface *FakeIMG_LoadPNG_RW(SDL_RWops *const src, const char *const file,
37  const unsigned line);
38 
39 SDL_Surface *FakeIMG_LoadJPG_RW(SDL_RWops *const src, const char *const file,
40  const unsigned line);
41 
42 void FakeSDL_FreeSurface(SDL_Surface *const surface, const char *const file,
43  const unsigned line);
44 
45 SDL_Surface *FakeSDL_CreateRGBSurface(const uint32_t flags,
46  const int width, const int height,
47  const int depth,
48  const uint32_t rMask,
49  const uint32_t gMask,
50  const uint32_t bMask,
51  const uint32_t aMask,
52  const char *const file,
53  const unsigned line);
54 
55 SDL_Surface *FakeSDL_ConvertSurface(SDL_Surface *const src,
56  SDL_PixelFormat *const fmt,
57  const uint32_t flags,
58  const char *const file,
59  const unsigned line);
60 
61 SDL_Surface *FakeTTF_RenderUTF8_Blended(_TTF_Font *restrict const font,
62  const char *restrict const text,
63  const SDL_Color &fg,
64  const char *restrict const file,
65  const unsigned line);
66 
67 SDL_Surface *FakeIMG_Load(const char *name, const char *const file,
68  const unsigned line);
69 
70 SDL_Surface *FakeSDL_DisplayFormat(SDL_Surface *const surface,
71  const char *const file,
72  const unsigned line);
73 
74 SDL_Surface *FakeSDL_DisplayFormatAlpha(SDL_Surface *const surface,
75  const char *const file,
76  const unsigned line);
77 
78 #endif // DEBUG_SDL_SURFACES
79 #endif // UTILS_SDLCHECKUTILS_H
#define restrict
Definition: localconsts.h:165