ManaPlus
sdlgraphics.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2004-2009 The Mana World Development Team
4  * Copyright (C) 2009-2010 The Mana Developers
5  * Copyright (C) 2011-2018 The ManaPlus Developers
6  *
7  * This file is part of The ManaPlus Client.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef RENDER_SDLGRAPHICS_H
24 #define RENDER_SDLGRAPHICS_H
25 
26 #ifdef USE_SDL2
27 #include "render/sdl2graphics.h"
28 RENDER_SDL2GRAPHICS_H
29 
30 #else
31 
32 #include "render/graphics.h"
33 
34 #include "localconsts.h"
35 
39 class SDLGraphics final : public Graphics
40 {
41  public:
45  SDLGraphics();
46 
48 
49 
52  ~SDLGraphics() override final;
53 
54  #include "render/graphicsdef.hpp"
56 
59 
60  protected:
61  int SDL_FakeUpperBlit(const SDL_Surface *restrict const src,
62  SDL_Rect *restrict const srcrect,
63  const SDL_Surface *restrict const dst,
64  SDL_Rect *restrict dstrect) const restrict2;
65 
66  void drawHLine(int x1, int y, int x2) restrict2;
67 
68  void drawVLine(int x, int y1, int y2) restrict2;
69 
70  uint32_t mOldPixel;
71  unsigned int mOldAlpha;
72 };
73 
74 #endif // USE_SDL2
75 #endif // RENDER_SDLGRAPHICS_H
#define A_DELETE_COPY(func)
Definition: localconsts.h:52
unsigned int mOldAlpha
Definition: sdlgraphics.h:71
#define final
Definition: localconsts.h:45
#define RENDER_GRAPHICSDEF_HPP
uint32_t mOldPixel
Definition: sdlgraphics.h:70
void drawVLine(int x, int y1, int y2)
void drawHLine(int x1, int y, int x2)
#define RENDER_SOFTWAREGRAPHICSDEF_HPP
#define restrict
Definition: localconsts.h:176
int SDL_FakeUpperBlit(const SDL_Surface *const src, SDL_Rect *const srcrect, const SDL_Surface *const dst, SDL_Rect *dstrect) const
#define restrict2
Definition: localconsts.h:177