* Add the Trash facility and use it for CardViews.
* Fix a graphical bug with card shadows.
* Fix a graphical bug with limitors.
* Enhance the graphical appearance of cards going to graveyard.
This commit is contained in:
jean.chalard
2009-09-05 11:44:34 +00:00
parent 44738399dc
commit b6781e82f1
8 changed files with 78 additions and 14 deletions
+30
View File
@@ -0,0 +1,30 @@
#include <iostream>
#include "../include/MTGDefinitions.h"
#include "../include/Pos.h"
#include "../include/CardGui.h"
#include "../include/Trash.h"
void Trash::put_out()
{
for (std::vector<Pos*>::iterator it = bin.begin(); it != bin.end(); ++it)
{
std::cout << "DELETE " << *it << std::endl;
if (CardView *c = dynamic_cast<CardView*>(*it))
SAFE_DELETE(c);
else
SAFE_DELETE(*it);
}
bin.clear();
}
static Trash PosTrash;
void Trash::cleanup()
{
PosTrash.put_out();
}
void trash(Pos* garbage)
{
PosTrash.bin.push_back(garbage);
}