Jeck - I somehow managed to break the test suite. Rolled back my changes to r843, won't commit until they're properly debugged.
This commit is contained in:
@@ -12,21 +12,25 @@ struct Left : public Exp { static inline bool test(DamagerDamaged* ref, DamagerD
|
||||
struct Right : public Exp { static inline bool test(DamagerDamaged* ref, DamagerDamaged* test)
|
||||
{ return ref->y == test->y && ref->x < test->x && test->show; } };
|
||||
|
||||
JTexture* GuiCombat::ok_tex = NULL;
|
||||
JQuad* GuiCombat::ok_quad = NULL;
|
||||
|
||||
GuiCombat::GuiCombat(GameObserver* go) : GuiLayer(), go(go), active(false), activeAtk(NULL),
|
||||
ok(SCREEN_WIDTH - MARGIN, 210, 1, 0, 255),
|
||||
enemy_avatar(SCREEN_WIDTH - MARGIN, TOP_LINE, 2, 0, 255),
|
||||
cursor_pos(NONE), step(DAMAGE)
|
||||
{
|
||||
if(NULL == ok_tex)
|
||||
if(NULL == ok_quad)
|
||||
{
|
||||
ok_tex = resources.RetrieveTexture("OK.png");
|
||||
ok_quad = resources.RetrieveQuad("OK.png");
|
||||
if (ok_quad) ok_quad->SetHotSpot(28, 22);
|
||||
}
|
||||
}
|
||||
|
||||
GuiCombat::~GuiCombat()
|
||||
{
|
||||
if(ok_quad)
|
||||
resources.Release(ok_quad);
|
||||
|
||||
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
|
||||
{
|
||||
for (vector<DefenserDamaged*>::iterator q = (*it)->blockers.begin(); q != (*it)->blockers.end(); ++q)
|
||||
@@ -273,11 +277,7 @@ void GuiCombat::Render()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok_tex) {
|
||||
JQuad *ok_quad = resources.RetrieveTempQuad("ok.png");
|
||||
ok_quad->SetHotSpot(28, 22);
|
||||
ok.Render(ok_quad);
|
||||
}
|
||||
if (ok_quad) ok.Render(ok_quad);
|
||||
renderer->DrawLine(0, SCREEN_HEIGHT / 2 + 10, SCREEN_WIDTH, SCREEN_HEIGHT / 2 + 10, ARGB(255, 255, 64, 0));
|
||||
if (FIRST_STRIKE == step)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user