- add Mercadian Masques, Mirrodin, Odyssey -> let's do some cleanup!
- Attempt at solving a bug with AI+psychic venom (manaburn), not tested
- Added Abrasax's monocolor AI decks
- Momir better randomizer
- Removed 64 Abilities limitation, I hope...
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-04-11 02:02:10 +00:00
parent c6b1027762
commit 12bd665409
20 changed files with 13168 additions and 30 deletions

View File

@@ -2,20 +2,48 @@
#include "../include/GuiLayers.h"
#include "../include/Player.h"
GuiLayer::GuiLayer(int id, GameObserver* _game):JGuiController(id, NULL){
GuiLayer::GuiLayer(int id, GameObserver* _game){
mId = id;
game = _game;
modal = 0;
hasFocus = false;
mCount = 0;
mCurr = 0;
mActionButton = PSP_CTRL_CIRCLE;
}
GuiLayer::~GuiLayer(){
//TODO
resetObjects();
}
void GuiLayer::Add(JGuiObject *object){
mObjects.push_back(object);
mCount++;
}
void GuiLayer::Remove(JGuiObject *object){
for (int i=0;i<mCount;i++){
if (mObjects[i]==object){
delete mObjects[i];
mObjects.erase(mObjects.begin()+i);
mCount--;
if (mCurr == mCount)
mCurr = 0;
return;
}
}
}
int GuiLayer::getMaxId(){
return mCount;
}
void GuiLayer::Render(){
for (int i=0;i<mCount;i++)
if (mObjects[i]!=NULL)
mObjects[i]->Render();
}
void GuiLayer::Update(float dt){
for (int i=0;i<mCount;i++)
if (mObjects[i]!=NULL)
@@ -27,7 +55,7 @@ void GuiLayer::resetObjects(){
for (int i=0;i<mCount;i++)
if (mObjects[i])
delete mObjects[i];
mObjects.clear();
mCount = 0;
mCurr = 0;
}