1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

show/showAll methods now use Canvas instead of SDL_Surface

- added compatibility method to Canvas to allow SDL_Surface access
- added drawBorder method to Canvas to replace CSDL_Ext method
- added drawColor method to Canvas to replace CSDL_Ext method
- minor changes to Tavern and Trade windows to adapt to new API
This commit is contained in:
Ivan Savenko
2023-06-02 16:42:18 +03:00
parent b04b11b9d1
commit 8ea0ecaec1
84 changed files with 338 additions and 326 deletions

View File

@@ -40,8 +40,6 @@
#include "../lib/ScriptHandler.h"
#endif
#include <SDL_surface.h>
void ClientCommandManager::handleQuitCommand()
{
exit(EXIT_SUCCESS);
@@ -174,21 +172,6 @@ void ClientCommandManager::handleRedrawCommand()
GH.windows().totalRedraw();
}
void ClientCommandManager::handleScreenCommand()
{
printCommandMessage("Screenbuf points to ");
if(screenBuf == screen)
printCommandMessage("screen", ELogLevel::ERROR);
else if(screenBuf == screen2)
printCommandMessage("screen2", ELogLevel::ERROR);
else
printCommandMessage("?!?", ELogLevel::ERROR);
SDL_SaveBMP(screen, "Screen_c.bmp");
SDL_SaveBMP(screen2, "Screen2_c.bmp");
}
void ClientCommandManager::handleNotDialogCommand()
{
LOCPLINT->showingDialog->setn(false);
@@ -527,9 +510,6 @@ void ClientCommandManager::processCommand(const std::string & message, bool call
else if(commandName == "redraw")
handleRedrawCommand();
else if(commandName == "screen")
handleScreenCommand();
else if(commandName == "not dialog")
handleNotDialogCommand();