Erwan
- fixed textures cache bug - fixed one card in TMP
This commit is contained in:
@@ -25,8 +25,8 @@ type=Sorcery
|
|||||||
[card]
|
[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.
|
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
|
id=4801
|
||||||
auto=@each upkeep:foreach(artifact|myinplay) damage:1 controller
|
auto=@each my upkeep:foreach(artifact|myinplay) damage:1 controller
|
||||||
auto=@each upkeep:foreach(artifact|opponentinplay) damage:1 opponent
|
auto=@each opponent upkeep:foreach(artifact|opponentinplay) damage:1 opponent
|
||||||
name=Ancient Runes
|
name=Ancient Runes
|
||||||
rarity=U
|
rarity=U
|
||||||
type=Enchantment
|
type=Enchantment
|
||||||
@@ -1930,4 +1930,4 @@ name=Winter's Grasp
|
|||||||
rarity=U
|
rarity=U
|
||||||
mana={1}{G}{G}
|
mana={1}{G}{G}
|
||||||
type=Sorcery
|
type=Sorcery
|
||||||
[/card]
|
[/card]
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ class PlayGuiObject;
|
|||||||
|
|
||||||
struct CardGui : public PlayGuiObject {
|
struct CardGui : public PlayGuiObject {
|
||||||
protected:
|
protected:
|
||||||
JQuad* quad;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const float Width;
|
static const float Width;
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ class CachedTexture{
|
|||||||
JQuad* quad;
|
JQuad* quad;
|
||||||
public:
|
public:
|
||||||
int lastTime;
|
int lastTime;
|
||||||
int type;
|
|
||||||
int nbpixels;
|
int nbpixels;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public:
|
|||||||
JMusic * ssLoadMusic(const char *fileName);
|
JMusic * ssLoadMusic(const char *fileName);
|
||||||
JSample * ssLoadSample(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 graphicsFile(const string filename, const string specific = "", bool bFont = false);
|
||||||
string musicFile(const string filename, const string specific = "");
|
string musicFile(const string filename, const string specific = "");
|
||||||
string sfxFile(const string filename, const string specific = "");
|
string sfxFile(const string filename, const string specific = "");
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#include "../include/config.h"
|
#include "../include/config.h"
|
||||||
#include "../include/AIMomirPlayer.h"
|
#include "../include/AIMomirPlayer.h"
|
||||||
#include "../include/CardDescriptor.h"
|
#include "../include/CardDescriptor.h"
|
||||||
#include "../include/DamageResolverLayer.h"
|
|
||||||
#include "../include/DamagerDamaged.h"
|
#include "../include/DamagerDamaged.h"
|
||||||
#include "../include/AIStats.h"
|
#include "../include/AIStats.h"
|
||||||
#include "../include/AllAbilities.h"
|
#include "../include/AllAbilities.h"
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ const float CardGui::Height = 40.0;
|
|||||||
const float CardGui::BigWidth = 200.0;
|
const float CardGui::BigWidth = 200.0;
|
||||||
const float CardGui::BigHeight = 285.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, float x, float y) : PlayGuiObject(Height, x, y, false), card(card) {}
|
||||||
CardGui::CardGui(MTGCardInstance* card, const Pos& ref) : PlayGuiObject(Height, ref, false), quad(cache.getQuad(card)), 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) {
|
CardView::CardView(MTGCardInstance* card, float x, float y) : CardGui(card, x, y) {
|
||||||
card->view = this;
|
card->view = this;
|
||||||
@@ -40,7 +40,7 @@ void CardGui::Render()
|
|||||||
TargetChooser * tc = NULL;
|
TargetChooser * tc = NULL;
|
||||||
if (game) tc = game->getCurrentTargetChooser();
|
if (game) tc = game->getCurrentTargetChooser();
|
||||||
|
|
||||||
quad = cache.getQuad(card);
|
JQuad * quad = cache.getThumb(card);
|
||||||
if (quad) {
|
if (quad) {
|
||||||
const float scale = actZ * 40 / quad->mHeight;
|
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);
|
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){
|
void CardGui::RenderBig(const Pos& pos){
|
||||||
JRenderer * renderer = JRenderer::GetInstance();
|
JRenderer * renderer = JRenderer::GetInstance();
|
||||||
|
|
||||||
|
JQuad * quad = cache.getQuad(card);
|
||||||
if (quad){
|
if (quad){
|
||||||
quad->SetColor(ARGB((int)pos.actA,255,255,255));
|
quad->SetColor(ARGB((int)pos.actA,255,255,255));
|
||||||
float scale = pos.actZ * 257.f / quad->mHeight;
|
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
|
return (CardGui::toString(out) << " : CardView ::: card : " << card
|
||||||
<< "; actX,actY : " << actX << "," << actY << "; t : " << t
|
<< "; actX,actY : " << actX << "," << actY << "; t : " << t
|
||||||
<< " ; actT : " << actT << " ; quad : " << quad);
|
<< " ; actT : " << actT);
|
||||||
}
|
}
|
||||||
ostream& CardGui::toString(ostream& out) const
|
ostream& CardGui::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ void GameApp::Create()
|
|||||||
mCurrentState = NULL;
|
mCurrentState = NULL;
|
||||||
mNextState = mGameStates[GAME_STATE_MENU];
|
mNextState = mGameStates[GAME_STATE_MENU];
|
||||||
|
|
||||||
// effect = new CardEffect();
|
// effect = NEW CardEffect();
|
||||||
|
|
||||||
char buf[512];
|
char buf[512];
|
||||||
sprintf(buf, "size of MTGCard : %i\n" , sizeof(MTGCard));
|
sprintf(buf, "size of MTGCard : %i\n" , sizeof(MTGCard));
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
#include "../include/ConstraintResolver.h"
|
#include "../include/ConstraintResolver.h"
|
||||||
#include "../include/CardGui.h"
|
#include "../include/CardGui.h"
|
||||||
#include "../include/Damage.h"
|
#include "../include/Damage.h"
|
||||||
#include "../include/DamageResolverLayer.h"
|
|
||||||
#include "../include/ExtraCost.h"
|
#include "../include/ExtraCost.h"
|
||||||
|
|
||||||
#include <JRenderer.h>
|
#include <JRenderer.h>
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ void GameStateOptions::ButtonPressed(int controllerId, int controlId)
|
|||||||
else if(controllerId == 103)
|
else if(controllerId == 103)
|
||||||
switch (controlId){
|
switch (controlId){
|
||||||
case 1:
|
case 1:
|
||||||
//Load the new profile.
|
//Load the New profile.
|
||||||
optionsTabs->acceptSubmode();
|
optionsTabs->acceptSubmode();
|
||||||
optionsTabs->reloadValues();
|
optionsTabs->reloadValues();
|
||||||
//Reset the current settings to those of the profile...
|
//Reset the current settings to those of the profile...
|
||||||
|
|||||||
@@ -23,12 +23,14 @@ GuiCombat::GuiCombat(GameObserver* go) : GuiLayer(), go(go), active(false), acti
|
|||||||
GameApp::CommonRes->CreateQuad("OK", "Ok.png", 0, 0, 56, 45);
|
GameApp::CommonRes->CreateQuad("OK", "Ok.png", 0, 0, 56, 45);
|
||||||
}
|
}
|
||||||
ok_quad = GameApp::CommonRes->GetQuad("OK");
|
ok_quad = GameApp::CommonRes->GetQuad("OK");
|
||||||
ok_quad->SetHotSpot(28, 22);
|
if (ok_quad) ok_quad->SetHotSpot(28, 22);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GuiCombat::~GuiCombat()
|
GuiCombat::~GuiCombat()
|
||||||
{
|
{
|
||||||
|
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
|
||||||
|
delete (*it);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@@ -785,7 +785,7 @@ int AbilityFactory::computeX(Spell * spell, MTGCardInstance * card){
|
|||||||
//Some basic functionalities that can be added automatically in the text file
|
//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
|
* 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:
|
* These objects are:
|
||||||
* - trigger (if there is an "@" in the string, this is a triggered ability)
|
* - 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)
|
* - 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.
|
/* 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
|
* The main reason is that classes that add an ability to a card do NOT create these objects, and therefore do NOT
|
||||||
* Work.
|
* Work.
|
||||||
* For example, setting EXALTED for a creature is not enough right now...
|
* For example, setting EXALTED for a creature is not enough right now...
|
||||||
@@ -2106,7 +2106,7 @@ void ListMaintainerAbility::updateTargets(){
|
|||||||
|
|
||||||
temp.clear();
|
temp.clear();
|
||||||
|
|
||||||
//add new valid ones
|
//add New valid ones
|
||||||
for (int i = 0; i < 2; i++){
|
for (int i = 0; i < 2; i++){
|
||||||
Player * p = game->players[i];
|
Player * p = game->players[i];
|
||||||
MTGGameZone * zones[] = {p->game->inPlay,p->game->graveyard,p->game->hand,p->game->library};
|
MTGGameZone * zones[] = {p->game->inPlay,p->game->graveyard,p->game->hand,p->game->library};
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#include "../include/WEvent.h"
|
#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){
|
PhaseRing::PhaseRing(Player* players[], int nbPlayers){
|
||||||
for (int i = 0; i < nbPlayers; i++){
|
for (int i = 0; i < nbPlayers; i++){
|
||||||
for (int j = 0; j < Constants::NB_MTG_PHASES; j++){
|
for (int j = 0; j < Constants::NB_MTG_PHASES; j++){
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#include "../include/MTGAbility.h"
|
#include "../include/MTGAbility.h"
|
||||||
#include "../include/MTGRules.h"
|
#include "../include/MTGRules.h"
|
||||||
#include "../include/ActionLayer.h"
|
#include "../include/ActionLayer.h"
|
||||||
#include "../include/DamageResolverLayer.h"
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ CachedTexture::CachedTexture(string filename){
|
|||||||
if (fileExists(filename.c_str())) init(filename);
|
if (fileExists(filename.c_str())) init(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
CachedTexture::CachedTexture(MTGCard * card, int _type){
|
CachedTexture::CachedTexture(MTGCard * card, int type){
|
||||||
LOG("==Creating CardTexture Object");
|
LOG("==Creating CardTexture Object");
|
||||||
JFileSystem* fs = JFileSystem::GetInstance();
|
JFileSystem* fs = JFileSystem::GetInstance();
|
||||||
char filename[100];
|
char filename[100];
|
||||||
|
|||||||
Reference in New Issue
Block a user