- Added new code for serialization/deserializaiton of full games including initial game and all the player actions.

- Added an undo menu using this code (beware, it's still very very alpha).
- Removed various warning
- Cleaned up avatar loading
- Added full random lists load/save including the deck shuffling (not sure if I could not replace that with seed load/save)
- Moved momir and Co rules configuration out of GameStateDuel
- Create a GameType type to avoid mixing int everywhere
This commit is contained in:
Xawotihs
2011-10-13 19:43:51 +00:00
parent 663058cdab
commit 0b6044551a
28 changed files with 595 additions and 156 deletions

View File

@@ -56,27 +56,27 @@ void GuiAvatar::Render()
float x0 = actX;
float y0 = actY;
if (player->mAvatar.get())
if (player->getIcon().get())
{
if (corner == BOTTOM_RIGHT)
{
x0 -= player->mAvatar->mWidth * actZ;
y0 -= player->mAvatar->mHeight * actZ;
x0 -= player->getIcon()->mWidth * actZ;
y0 -= player->getIcon()->mHeight * actZ;
}
switch (corner)
{
case TOP_LEFT:
player->mAvatar->SetHotSpot(0, 0);
player->getIcon()->SetHotSpot(0, 0);
break;
case BOTTOM_RIGHT:
player->mAvatar->SetHotSpot(35, 50);
player->getIcon()->SetHotSpot(35, 50);
break;
}
player->mAvatar->SetColor(ARGB((int)actA, 255, avatarRed, avatarRed));
r->RenderQuad(player->mAvatar.get(), actX, actY, actT, actZ, actZ);
player->getIcon()->SetColor(ARGB((int)actA, 255, avatarRed, avatarRed));
r->RenderQuad(player->getIcon().get(), actX, actY, actT, actZ, actZ);
if (mHasFocus)
{
r->FillRect(x0, x0, player->mAvatar->mWidth * actZ, player->mAvatar->mHeight * actZ, ARGB(abs(128 - wave),255,255,255));
r->FillRect(x0, x0, player->getIcon()->mWidth * actZ, player->getIcon()->mHeight * actZ, ARGB(abs(128 - wave),255,255,255));
}
}