- Fix issue 552 (Card images too big in deck editor)
- Moved big picture display a bit down ingame - Temporarily Reinstantiated "back quad shows first" in deck editor, see my comments in http://code.google.com/p/wagic/source/detail?r=3008 -- This is only temporary, and pending the final Thread work, but I'm afraid this won't make it to 0.15. It is possible to get the previous behavior back with a simple define, in case we want it for windows.
This commit is contained in:
@@ -772,7 +772,7 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos)
|
|||||||
return TinyCropRender(card, pos, quad.get());
|
return TinyCropRender(card, pos, quad.get());
|
||||||
}
|
}
|
||||||
quad->SetColor(ARGB(255,255,255,255));
|
quad->SetColor(ARGB(255,255,255,255));
|
||||||
float scale = pos.actZ * 257.f / quad->mHeight;
|
float scale = pos.actZ * 250.f / quad->mHeight;
|
||||||
renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale);
|
renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ CardSelector::SelectorMemory::SelectorMemory()
|
|||||||
}
|
}
|
||||||
|
|
||||||
CardSelector::CardSelector(DuelLayers* duel) :
|
CardSelector::CardSelector(DuelLayers* duel) :
|
||||||
active(NULL), duel(duel), limitor(NULL), bigpos(300, 150, 1.0, 0.0, 220)
|
active(NULL), duel(duel), limitor(NULL), bigpos(300, 145, 1.0, 0.0, 220)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,9 @@
|
|||||||
#include "SimpleMenu.h"
|
#include "SimpleMenu.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
// This is pending a change by Wil regarding graphics threads
|
||||||
|
#define GRAPHICS_NO_THREADING
|
||||||
|
|
||||||
//!! helper function; this is probably handled somewhere in the code already.
|
//!! helper function; this is probably handled somewhere in the code already.
|
||||||
// If not, should be placed in general library
|
// If not, should be placed in general library
|
||||||
void StringExplode(string str, string separator, vector<string>* results)
|
void StringExplode(string str, string separator, vector<string>* results)
|
||||||
@@ -1312,10 +1315,61 @@ void GameStateDeckViewer::renderCard(int id, float rotation)
|
|||||||
|
|
||||||
if (!card) return;
|
if (!card) return;
|
||||||
|
|
||||||
|
#ifdef GRAPHICS_NO_THREADING
|
||||||
|
|
||||||
|
JQuadPtr backQuad = WResourceManager::Instance()->GetQuad("back");
|
||||||
|
JQuadPtr quad;
|
||||||
|
|
||||||
|
int cacheError = CACHE_ERROR_NONE;
|
||||||
|
|
||||||
|
if (!options[Options::DISABLECARDS].number)
|
||||||
|
{
|
||||||
|
quad = WResourceManager::Instance()->RetrieveCard(card, RETRIEVE_EXISTING);
|
||||||
|
cacheError = WResourceManager::Instance()->RetrieveError();
|
||||||
|
if (!quad.get() && cacheError != CACHE_ERROR_404)
|
||||||
|
{
|
||||||
|
if (last_user_activity > (abs(2 - id) + 1) * NO_USER_ACTIVITY_SHOWCARD_DELAY)
|
||||||
|
quad = WResourceManager::Instance()->RetrieveCard(card);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
quad = backQuad;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (quad.get())
|
||||||
|
{
|
||||||
|
if (quad == backQuad)
|
||||||
|
{
|
||||||
|
quad->SetColor(ARGB(255,255,255,255));
|
||||||
|
float _scale = scale * (285 / quad->mHeight);
|
||||||
|
JRenderer::GetInstance()->RenderQuad(quad.get(), x, y, 0.0f, _scale, _scale);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Pos pos = Pos(x, y, scale * 285 / 250, 0.0, 255);
|
||||||
|
CardGui::DrawCard(card, pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Pos pos = Pos(x, y, scale * 285 / 250, 0.0, 255);
|
||||||
|
CardGui::DrawCard(card, pos, DrawMode::kText);
|
||||||
|
if (!options[Options::DISABLECARDS].number) quad = WResourceManager::Instance()->RetrieveCard(card, CACHE_THUMB);
|
||||||
|
if (quad.get())
|
||||||
|
{
|
||||||
|
float _scale = 285 * scale / quad->mHeight;
|
||||||
|
quad->SetColor(ARGB(40,255,255,255));
|
||||||
|
JRenderer::GetInstance()->RenderQuad(quad.get(), x, y, 0, _scale, _scale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
int mode = !options[Options::DISABLECARDS].number ? DrawMode::kNormal : DrawMode::kText;
|
int mode = !options[Options::DISABLECARDS].number ? DrawMode::kNormal : DrawMode::kText;
|
||||||
|
|
||||||
Pos pos = Pos(x, y, scale * 285 / 250, 0.0, 255);
|
Pos pos = Pos(x, y, scale * 285 / 250, 0.0, 255);
|
||||||
CardGui::DrawCard(card, pos, mode);
|
CardGui::DrawCard(card, pos, mode);
|
||||||
|
#endif
|
||||||
|
|
||||||
int quadAlpha = alpha;
|
int quadAlpha = alpha;
|
||||||
if (!displayed_deck->count(card)) quadAlpha /= 2;
|
if (!displayed_deck->count(card)) quadAlpha /= 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user