diff options
Diffstat (limited to 'src/unittests')
21 files changed, 49 insertions, 49 deletions
diff --git a/src/unittests/gui/widgets/browserbox.cc b/src/unittests/gui/widgets/browserbox.cc index 009474031..737cf547c 100644 --- a/src/unittests/gui/widgets/browserbox.cc +++ b/src/unittests/gui/widgets/browserbox.cc @@ -65,11 +65,11 @@ TEST_CASE("BrowserBox tests", "browserbox") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 theme = new Theme; diff --git a/src/unittests/gui/widgets/staticbrowserbox.cc b/src/unittests/gui/widgets/staticbrowserbox.cc index 0c429e19c..4efd3f87c 100644 --- a/src/unittests/gui/widgets/staticbrowserbox.cc +++ b/src/unittests/gui/widgets/staticbrowserbox.cc @@ -65,11 +65,11 @@ TEST_CASE("StaticBrowserBox tests", "browserbox") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 theme = new Theme; diff --git a/src/unittests/gui/windowmanager.cc b/src/unittests/gui/windowmanager.cc index a504e6f41..166ef964f 100644 --- a/src/unittests/gui/windowmanager.cc +++ b/src/unittests/gui/windowmanager.cc @@ -175,11 +175,11 @@ TEST_CASE("Windows tests", "windowmanager") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 userPalette = new UserPalette; @@ -882,11 +882,11 @@ TEST_CASE("WindowManager", "create windows") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 config.setValue("fontSize", 16); diff --git a/src/unittests/integrity.cc b/src/unittests/integrity.cc index a77bd40f9..3d370b36d 100644 --- a/src/unittests/integrity.cc +++ b/src/unittests/integrity.cc @@ -132,13 +132,13 @@ TEST_CASE("integrity tests", "integrity") imageHelper = new SurfaceImageHelper; SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 imageHelper = new SDLImageHelper(); - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 userPalette = new UserPalette; diff --git a/src/unittests/render/mockgraphics.cc b/src/unittests/render/mockgraphics.cc index c33953186..d2ba71f0a 100644 --- a/src/unittests/render/mockgraphics.cc +++ b/src/unittests/render/mockgraphics.cc @@ -268,7 +268,7 @@ bool MockGraphics::setVideoMode(const int w, const int h, { setMainFlags(w, h, scale, bpp, fs, hwaccel, resize, noFrame, allowHighDPI); - if ((mWindow = graphicsManager.createWindow(w, h, bpp, + if ((mWindow = GraphicsManager::createWindow(w, h, bpp, getSoftwareFlags())) == nullptr) { mRect.w = 0; diff --git a/src/unittests/resources/dye/dye.cc b/src/unittests/resources/dye/dye.cc index 97eecc2cd..52613cd60 100644 --- a/src/unittests/resources/dye/dye.cc +++ b/src/unittests/resources/dye/dye.cc @@ -1973,13 +1973,13 @@ TEST_CASE("Dye real dye", "") imageHelper = new SurfaceImageHelper; SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 imageHelper = new SDLImageHelper; - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 userPalette = new UserPalette; diff --git a/src/unittests/resources/dye/dyepalette.cc b/src/unittests/resources/dye/dyepalette.cc index a2a17225c..6318977bc 100644 --- a/src/unittests/resources/dye/dyepalette.cc +++ b/src/unittests/resources/dye/dyepalette.cc @@ -77,11 +77,11 @@ TEST_CASE("DyePalette tests", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 theme = new Theme; diff --git a/src/unittests/resources/map/maplayer/drawfringenormal.cc b/src/unittests/resources/map/maplayer/drawfringenormal.cc index 65e20812f..6f68d77e7 100644 --- a/src/unittests/resources/map/maplayer/drawfringenormal.cc +++ b/src/unittests/resources/map/maplayer/drawfringenormal.cc @@ -67,11 +67,11 @@ TEST_CASE("MapLayer drawFringe normal", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 theme = new Theme; diff --git a/src/unittests/resources/map/maplayer/drawfringesimple.cc b/src/unittests/resources/map/maplayer/drawfringesimple.cc index 2865c8299..ad2c87434 100644 --- a/src/unittests/resources/map/maplayer/drawfringesimple.cc +++ b/src/unittests/resources/map/maplayer/drawfringesimple.cc @@ -64,11 +64,11 @@ TEST_CASE("MapLayer drawFringe simple", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 theme = new Theme; diff --git a/src/unittests/resources/map/maplayer/drawspeciallayer1.cc b/src/unittests/resources/map/maplayer/drawspeciallayer1.cc index 01adf0ee7..8e60592f7 100644 --- a/src/unittests/resources/map/maplayer/drawspeciallayer1.cc +++ b/src/unittests/resources/map/maplayer/drawspeciallayer1.cc @@ -60,11 +60,11 @@ TEST_CASE("MapLayer drawSpecialLayer (specialLayer)", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 Map *map = nullptr; diff --git a/src/unittests/resources/map/maplayer/drawspeciallayer2.cc b/src/unittests/resources/map/maplayer/drawspeciallayer2.cc index 9897f3ad3..b40ac745b 100644 --- a/src/unittests/resources/map/maplayer/drawspeciallayer2.cc +++ b/src/unittests/resources/map/maplayer/drawspeciallayer2.cc @@ -60,11 +60,11 @@ TEST_CASE("MapLayer drawSpecialLayer (tempLayer)", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 Map *map = nullptr; diff --git a/src/unittests/resources/map/speciallayer.cc b/src/unittests/resources/map/speciallayer.cc index 443d252b5..c3b1f78b8 100644 --- a/src/unittests/resources/map/speciallayer.cc +++ b/src/unittests/resources/map/speciallayer.cc @@ -65,11 +65,11 @@ TEST_CASE("SpecialLayer updateCache", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 userPalette = new UserPalette; diff --git a/src/unittests/resources/resourcemanager/resourcemanager.cc b/src/unittests/resources/resourcemanager/resourcemanager.cc index 0f4a7db65..39871e3c7 100644 --- a/src/unittests/resources/resourcemanager/resourcemanager.cc +++ b/src/unittests/resources/resourcemanager/resourcemanager.cc @@ -110,11 +110,11 @@ TEST_CASE("resourcemanager", "resourcemanager") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 userPalette = new UserPalette; diff --git a/src/unittests/resources/sdlimagehelper.cc b/src/unittests/resources/sdlimagehelper.cc index 8c858ce69..67aaa384b 100644 --- a/src/unittests/resources/sdlimagehelper.cc +++ b/src/unittests/resources/sdlimagehelper.cc @@ -89,11 +89,11 @@ TEST_CASE("sdlimagehelper combineSurface", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 userPalette = new UserPalette; diff --git a/src/unittests/resources/sprite/animatedsprite.cc b/src/unittests/resources/sprite/animatedsprite.cc index 34627ff07..1f5f6f9ef 100644 --- a/src/unittests/resources/sprite/animatedsprite.cc +++ b/src/unittests/resources/sprite/animatedsprite.cc @@ -78,11 +78,11 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 theme = new Theme; diff --git a/src/unittests/sdl.cc b/src/unittests/sdl.cc index 9869db35f..b9dc74299 100644 --- a/src/unittests/sdl.cc +++ b/src/unittests/sdl.cc @@ -79,13 +79,13 @@ TEST_CASE("sdl tests", "sdl") imageHelper = new SurfaceImageHelper; SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 imageHelper = new SDLImageHelper(); - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 userPalette = new UserPalette; diff --git a/src/unittests/utils/chatutils.cc b/src/unittests/utils/chatutils.cc index e3c1dba1a..5e06baaca 100644 --- a/src/unittests/utils/chatutils.cc +++ b/src/unittests/utils/chatutils.cc @@ -74,11 +74,11 @@ TEST_CASE("chatutils replaceVars", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 theme = new Theme; diff --git a/src/unittests/utils/itemxmlutils.cc b/src/unittests/utils/itemxmlutils.cc index 54c112bbc..8572d3ca5 100644 --- a/src/unittests/utils/itemxmlutils.cc +++ b/src/unittests/utils/itemxmlutils.cc @@ -72,11 +72,11 @@ TEST_CASE("itemxmlutils readItemStatsString 1", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 userPalette = new UserPalette; @@ -242,11 +242,11 @@ TEST_CASE("itemxmlutils readItemStatsVector 1", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 userPalette = new UserPalette; diff --git a/src/unittests/utils/translation/poparser.cc b/src/unittests/utils/translation/poparser.cc index cd46e4768..bf5abaca4 100644 --- a/src/unittests/utils/translation/poparser.cc +++ b/src/unittests/utils/translation/poparser.cc @@ -65,11 +65,11 @@ TEST_CASE("PoParser tests", "PoParser") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 theme = new Theme; diff --git a/src/unittests/utils/xml.cc b/src/unittests/utils/xml.cc index 022fd1c4a..fa4bfc789 100644 --- a/src/unittests/utils/xml.cc +++ b/src/unittests/utils/xml.cc @@ -75,11 +75,11 @@ TEST_CASE("xml doc", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 theme = new Theme; diff --git a/src/unittests/utils/xmlutils.cc b/src/unittests/utils/xmlutils.cc index 848f2ce49..482580af5 100644 --- a/src/unittests/utils/xmlutils.cc +++ b/src/unittests/utils/xmlutils.cc @@ -64,11 +64,11 @@ TEST_CASE("xmlutils readXmlIntVector 1", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 userPalette = new UserPalette; @@ -124,11 +124,11 @@ TEST_CASE("xmlutils readXmlStringMap 1", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 userPalette = new UserPalette; @@ -184,11 +184,11 @@ TEST_CASE("xmlutils readXmlIntMap 1", "") #ifdef USE_SDL2 SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, + GraphicsManager::createWindow(640, 480, 0, SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); #else // USE_SDL2 - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); + GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 userPalette = new UserPalette; |