- fixed textures cache bug
- fixed one card in TMP
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-08-31 12:22:43 +00:00
parent ca337ad653
commit 0454fb20ec
14 changed files with 19 additions and 21 deletions

View File

@@ -25,8 +25,8 @@ type=Sorcery
[card]
text=At the beginning of each player's upkeep, Ancient Runes deals damage to that player equal to the number of artifacts he or she controls.
id=4801
auto=@each upkeep:foreach(artifact|myinplay) damage:1 controller
auto=@each upkeep:foreach(artifact|opponentinplay) damage:1 opponent
auto=@each my upkeep:foreach(artifact|myinplay) damage:1 controller
auto=@each opponent upkeep:foreach(artifact|opponentinplay) damage:1 opponent
name=Ancient Runes
rarity=U
type=Enchantment
@@ -1930,4 +1930,4 @@ name=Winter's Grasp
rarity=U
mana={1}{G}{G}
type=Sorcery
[/card]
[/card]

View File

@@ -14,7 +14,6 @@ class PlayGuiObject;
struct CardGui : public PlayGuiObject {
protected:
JQuad* quad;
public:
static const float Width;

View File

@@ -23,7 +23,6 @@ class CachedTexture{
JQuad* quad;
public:
int lastTime;
int type;
int nbpixels;

View File

@@ -43,7 +43,7 @@ public:
JMusic * ssLoadMusic(const char *fileName);
JSample * ssLoadSample(const char *fileName);
//Our new redirect system.
//Our New redirect system.
string graphicsFile(const string filename, const string specific = "", bool bFont = false);
string musicFile(const string filename, const string specific = "");
string sfxFile(const string filename, const string specific = "");

View File

@@ -1,7 +1,6 @@
#include "../include/config.h"
#include "../include/AIMomirPlayer.h"
#include "../include/CardDescriptor.h"
#include "../include/DamageResolverLayer.h"
#include "../include/DamagerDamaged.h"
#include "../include/AIStats.h"
#include "../include/AllAbilities.h"

View File

@@ -13,8 +13,8 @@ const float CardGui::Height = 40.0;
const float CardGui::BigWidth = 200.0;
const float CardGui::BigHeight = 285.0;
CardGui::CardGui(MTGCardInstance* card, float x, float y) : PlayGuiObject(Height, x, y, false), quad(cache.getQuad(card)), card(card) {}
CardGui::CardGui(MTGCardInstance* card, const Pos& ref) : PlayGuiObject(Height, ref, false), quad(cache.getQuad(card)), card(card) {}
CardGui::CardGui(MTGCardInstance* card, float x, float y) : PlayGuiObject(Height, x, y, false), card(card) {}
CardGui::CardGui(MTGCardInstance* card, const Pos& ref) : PlayGuiObject(Height, ref, false), card(card) {}
CardView::CardView(MTGCardInstance* card, float x, float y) : CardGui(card, x, y) {
card->view = this;
@@ -40,7 +40,7 @@ void CardGui::Render()
TargetChooser * tc = NULL;
if (game) tc = game->getCurrentTargetChooser();
quad = cache.getQuad(card);
JQuad * quad = cache.getThumb(card);
if (quad) {
const float scale = actZ * 40 / quad->mHeight;
renderer->RenderQuad(GameApp::CommonRes->GetQuad("shadow"), actX + (scale-1)*15, actY + (scale-1)*15, actT, 28*scale, 40*scale);
@@ -220,6 +220,7 @@ void CardGui::alternateRender(MTGCard * card, const Pos& pos){
void CardGui::RenderBig(const Pos& pos){
JRenderer * renderer = JRenderer::GetInstance();
JQuad * quad = cache.getQuad(card);
if (quad){
quad->SetColor(ARGB((int)pos.actA,255,255,255));
float scale = pos.actZ * 257.f / quad->mHeight;
@@ -252,7 +253,7 @@ ostream& CardView::toString(ostream& out) const
{
return (CardGui::toString(out) << " : CardView ::: card : " << card
<< "; actX,actY : " << actX << "," << actY << "; t : " << t
<< " ; actT : " << actT << " ; quad : " << quad);
<< " ; actT : " << actT);
}
ostream& CardGui::toString(ostream& out) const
{

View File

@@ -164,7 +164,7 @@ void GameApp::Create()
mCurrentState = NULL;
mNextState = mGameStates[GAME_STATE_MENU];
// effect = new CardEffect();
// effect = NEW CardEffect();
char buf[512];
sprintf(buf, "size of MTGCard : %i\n" , sizeof(MTGCard));

View File

@@ -5,7 +5,6 @@
#include "../include/ConstraintResolver.h"
#include "../include/CardGui.h"
#include "../include/Damage.h"
#include "../include/DamageResolverLayer.h"
#include "../include/ExtraCost.h"
#include <JRenderer.h>

View File

@@ -187,7 +187,7 @@ void GameStateOptions::ButtonPressed(int controllerId, int controlId)
else if(controllerId == 103)
switch (controlId){
case 1:
//Load the new profile.
//Load the New profile.
optionsTabs->acceptSubmode();
optionsTabs->reloadValues();
//Reset the current settings to those of the profile...

View File

@@ -23,12 +23,14 @@ GuiCombat::GuiCombat(GameObserver* go) : GuiLayer(), go(go), active(false), acti
GameApp::CommonRes->CreateQuad("OK", "Ok.png", 0, 0, 56, 45);
}
ok_quad = GameApp::CommonRes->GetQuad("OK");
ok_quad->SetHotSpot(28, 22);
if (ok_quad) ok_quad->SetHotSpot(28, 22);
}
}
GuiCombat::~GuiCombat()
{
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
delete (*it);
}
template <typename T>

View File

@@ -785,7 +785,7 @@ int AbilityFactory::computeX(Spell * spell, MTGCardInstance * card){
//Some basic functionalities that can be added automatically in the text file
/*
* Several objects are computed from the text string, and have a direct influence on what action we should take
* (direct impact on the game such as draw a card immediately, or create a new GameObserver and add it to the Abilities,etc..)
* (direct impact on the game such as draw a card immediately, or create a New GameObserver and add it to the Abilities,etc..)
* These objects are:
* - trigger (if there is an "@" in the string, this is a triggered ability)
* - target (if there ie a "target(" in the string, then this is a TargetAbility)
@@ -1742,7 +1742,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
/* We want to get rid of these basicAbility things.
* basicAbilities themselves are alright, but creating new object depending on them is dangerous
* basicAbilities themselves are alright, but creating New object depending on them is dangerous
* The main reason is that classes that add an ability to a card do NOT create these objects, and therefore do NOT
* Work.
* For example, setting EXALTED for a creature is not enough right now...
@@ -2106,7 +2106,7 @@ void ListMaintainerAbility::updateTargets(){
temp.clear();
//add new valid ones
//add New valid ones
for (int i = 0; i < 2; i++){
Player * p = game->players[i];
MTGGameZone * zones[] = {p->game->inPlay,p->game->graveyard,p->game->hand,p->game->library};

View File

@@ -5,7 +5,7 @@
#include "../include/WEvent.h"
/* Creates a new phase ring with the default rules */
/* Creates a New phase ring with the default rules */
PhaseRing::PhaseRing(Player* players[], int nbPlayers){
for (int i = 0; i < nbPlayers; i++){
for (int j = 0; j < Constants::NB_MTG_PHASES; j++){

View File

@@ -3,7 +3,6 @@
#include "../include/MTGAbility.h"
#include "../include/MTGRules.h"
#include "../include/ActionLayer.h"
#include "../include/DamageResolverLayer.h"
#include <string>
using std::string;

View File

@@ -114,7 +114,7 @@ CachedTexture::CachedTexture(string filename){
if (fileExists(filename.c_str())) init(filename);
}
CachedTexture::CachedTexture(MTGCard * card, int _type){
CachedTexture::CachedTexture(MTGCard * card, int type){
LOG("==Creating CardTexture Object");
JFileSystem* fs = JFileSystem::GetInstance();
char filename[100];