Erwan - cache fixes - Code review highly appreciated, please criticize my code!

- fix issue 65 (quads when no image  load slowly in shop/deck editor)
- Possibly fix issue 92, please let me know if it reproduces
- Fix issue 97 (Deck editor: weird behavior of deck display)
- Fix issue 39 - please verify
- Issue 56 can probably be closed as well
- Fix issue 86
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-10-13 14:16:30 +00:00
parent 90a29437d2
commit 6f159fb39c
25 changed files with 231 additions and 432 deletions

View File

@@ -24,7 +24,6 @@ void Player::End(){
Player::~Player(){
SAFE_DELETE(manaPool);
resources.Release(mAvatar);
resources.Release(mAvatarTex);
mAvatar = NULL;
mAvatarTex = NULL;
@@ -59,9 +58,9 @@ Player * Player::opponent(){
}
HumanPlayer::HumanPlayer(MTGPlayerCards * deck, string file, string fileSmall) : Player(deck, file, fileSmall) {
mAvatarTex = resources.RetrieveTexture("avatar.jpg",RETRIEVE_VRAM,TEXTURE_SUB_AVATAR);
mAvatarTex = resources.RetrieveTexture("avatar.jpg",RETRIEVE_LOCK,TEXTURE_SUB_AVATAR);
if (mAvatarTex)
mAvatar = resources.RetrieveQuad("avatar.jpg",0,0,35,50,"playerAvatar",RETRIEVE_VRAM,TEXTURE_SUB_AVATAR);
mAvatar = resources.RetrieveQuad("avatar.jpg",0,0,35,50,"playerAvatar",RETRIEVE_NORMAL,TEXTURE_SUB_AVATAR);
else
mAvatar = NULL;
}