Commit 5d3ededa authored by mercury233's avatar mercury233

fix

parent 6286fd32
......@@ -832,8 +832,8 @@ void Game::DrawSpec() {
}
case 100: {
if(showcardp < 60) {
driver->draw2DImage(imageManager.tHand[(showcardcode >> 16) & 0x3], Resize(615, showcarddif));
driver->draw2DImage(imageManager.tHand[showcardcode & 0x3], Resize(615, 540 - showcarddif));
driver->draw2DImage(imageManager.tHand[(showcardcode >> 16) & 0x3], position2di((615 + 44.5) * xScale - 44.5, (showcarddif + 64) * yScale - 64));
driver->draw2DImage(imageManager.tHand[showcardcode & 0x3], position2di((615 + 44.5) * xScale - 44.5, (540 - showcarddif + 64) * yScale - 64));
float dy = -0.333333f * showcardp + 10;
showcardp++;
if(showcardp < 30)
......@@ -891,16 +891,16 @@ void Game::DrawSpec() {
auto pos = lpcFont->getDimension(lstr);
if(showcardp < 10) {
int alpha = (showcardp * 25) << 24;
DrawShadowText(lpcFont, lstr, ResizeElem(650 - pos.Width / 2 - (9 - showcardp) * 40, 290, 950, 370), Resize(-1, -1, 0, 0), alpha | 0xffffff, alpha);
DrawShadowText(lpcFont, lstr, ResizePhaseHint(660 - (9 - showcardp) * 40, 290, 960, 370, pos.Width), Resize(-1, -1, 0, 0), alpha | 0xffffff, alpha);
} else if(showcardp < showcarddif) {
DrawShadowText(lpcFont, lstr, ResizeElem(650 - pos.Width / 2, 290, 950, 370), Resize(-1, -1, 0, 0), 0xffffffff);
DrawShadowText(lpcFont, lstr, ResizePhaseHint(660, 290, 960, 370, pos.Width), Resize(-1, -1, 0, 0), 0xffffffff);
if(dInfo.vic_string && (showcardcode == 1 || showcardcode == 2)) {
driver->draw2DRectangle(0xa0000000, ResizeElem(540, 320, 800, 340));
DrawShadowText(guiFont, dInfo.vic_string, ResizeElem(500, 320, 840, 340), Resize(-2, -1, 0, 0), 0xffffffff, 0xff000000, true, true, 0);
driver->draw2DRectangle(0xa0000000, Resize(540, 320, 790, 340));
DrawShadowText(guiFont, dInfo.vic_string, Resize(490, 320, 840, 340), Resize(-2, -1, 0, 0), 0xffffffff, 0xff000000, true, true, 0);
}
} else if(showcardp < showcarddif + 10) {
int alpha = ((showcarddif + 10 - showcardp) * 25) << 24;
DrawShadowText(lpcFont, lstr, ResizeElem(650 - pos.Width / 2 + (showcardp - showcarddif) * 40, 290, 950, 370), Resize(-1, -1, 0, 0), alpha | 0xffffff, alpha);
DrawShadowText(lpcFont, lstr, ResizePhaseHint(660 + (showcardp - showcarddif) * 40, 290, 960, 370, pos.Width), Resize(-1, -1, 0, 0), alpha | 0xffffff, alpha);
}
showcardp++;
break;
......
......@@ -1717,13 +1717,11 @@ recti Game::ResizeWin(s32 x, s32 y, s32 x2, s32 y2, bool chat) {
y2 = sy + y;
return recti(x, y, x2, y2);
}
recti Game::ResizeElem(s32 x, s32 y, s32 x2, s32 y2) {
s32 sx = x2 - x;
s32 sy = y2 - y;
x = (x + sx / 2 - 100) * xScale - sx / 2 + 100;
recti Game::ResizePhaseHint(s32 x, s32 y, s32 x2, s32 y2, s32 width) {
x = x * xScale - width / 2;
y = y * yScale;
x2 = sx + x;
y2 = sy + y;
x2 = x2 * xScale;
y2 = y2 * yScale;
return recti(x, y, x2, y2);
}
recti Game::ResizeCard(s32 x, s32 y, s32 x2, s32 y2) {
......
......@@ -158,7 +158,7 @@ public:
recti Resize(s32 x, s32 y, s32 x2, s32 y2, s32 dx, s32 dy, s32 dx2, s32 dy2);
position2di Resize(s32 x, s32 y);
position2di ResizeReverse(s32 x, s32 y);
recti ResizeElem(s32 x, s32 y, s32 x2, s32 y2);
recti ResizePhaseHint(s32 x, s32 y, s32 x2, s32 y2, s32 width);
recti ResizeWin(s32 x, s32 y, s32 x2, s32 y2, bool chat = false);
recti ResizeCard(s32 x, s32 y, s32 x2, s32 y2);
recti ResizeCardHint(s32 x, s32 y, s32 x2, s32 y2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment