Grail digging check is now in library

This commit is contained in:
Ivan Savenko committed 2023-03-05 17:48:02 +02:00
1 parent d21c41e436
commit 5905dd6111
11 files changed
+41 -33

No files matched your search

+15
View File
@@ -11,6 +11,7 @@
#include "Canvas.h"
#include "../renderSDL/SDL_Extensions.h"
#include "Colors.h"
#include "IImage.h"
#include "Graphics.h"
@@ -40,9 +41,23 @@ Canvas::Canvas(const Point & size):
renderArea(Point(0,0), size),
surface(CSDL_Ext::newSurface(size.x, size.y))
{
CSDL_Ext::fillSurface(surface, Colors::TRANSPARENCY );
SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_NONE);
}
void Canvas::applyTransparency(bool on)
{
if (on)
SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_BLEND);
else
SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_NONE);
}
void Canvas::applyGrayscale()
{
CSDL_Ext::convertToGrayscale(surface, renderArea);
}
Canvas::~Canvas()
{
SDL_FreeSurface(surface);