Commit 62515ccb authored by mercury233's avatar mercury233

fix showcard

parent 2f0937dc
...@@ -725,8 +725,8 @@ void Game::DrawSpec() { ...@@ -725,8 +725,8 @@ void Game::DrawSpec() {
switch(showcard) { switch(showcard) {
case 1: { case 1: {
driver->draw2DImage(imageManager.GetTexture(showcardcode, true), Resize(574, 150)); driver->draw2DImage(imageManager.GetTexture(showcardcode, true), Resize(574, 150));
driver->draw2DImage(imageManager.tMask, ResizeElem(574, 150, 574 + (showcarddif > CARD_IMG_WIDTH ? CARD_IMG_WIDTH : showcarddif), 404), driver->draw2DImage(imageManager.tMask, Resize(574, 150, 574 + (showcarddif > CARD_IMG_WIDTH ? CARD_IMG_WIDTH : showcarddif), 150 + CARD_IMG_HEIGHT),
recti(CARD_IMG_HEIGHT - showcarddif, 0, CARD_IMG_HEIGHT - (showcarddif > CARD_IMG_WIDTH ? showcarddif - CARD_IMG_WIDTH : 0), CARD_IMG_HEIGHT), 0, 0, true); recti(CARD_IMG_HEIGHT - showcarddif, 0, CARD_IMG_HEIGHT - (showcarddif > CARD_IMG_WIDTH ? showcarddif - CARD_IMG_WIDTH : 0), CARD_IMG_HEIGHT), 0, 0, true);
showcarddif += 15; showcarddif += 15;
if(showcarddif >= CARD_IMG_HEIGHT) { if(showcarddif >= CARD_IMG_HEIGHT) {
showcard = 2; showcard = 2;
...@@ -736,7 +736,8 @@ void Game::DrawSpec() { ...@@ -736,7 +736,8 @@ void Game::DrawSpec() {
} }
case 2: { case 2: {
driver->draw2DImage(imageManager.GetTexture(showcardcode, true), Resize(574, 150)); driver->draw2DImage(imageManager.GetTexture(showcardcode, true), Resize(574, 150));
driver->draw2DImage(imageManager.tMask, ResizeElem(574 + showcarddif, 150, 761, 404), recti(0, 0, CARD_IMG_WIDTH - showcarddif, CARD_IMG_HEIGHT), 0, 0, true); driver->draw2DImage(imageManager.tMask, Resize(574 + showcarddif, 150, 574 + CARD_IMG_WIDTH, 150 + CARD_IMG_HEIGHT),
recti(0, 0, CARD_IMG_WIDTH - showcarddif, CARD_IMG_HEIGHT), 0, 0, true);
showcarddif += 15; showcarddif += 15;
if(showcarddif >= CARD_IMG_WIDTH) { if(showcarddif >= CARD_IMG_WIDTH) {
showcard = 0; showcard = 0;
...@@ -745,7 +746,7 @@ void Game::DrawSpec() { ...@@ -745,7 +746,7 @@ void Game::DrawSpec() {
} }
case 3: { case 3: {
driver->draw2DImage(imageManager.GetTexture(showcardcode, true), Resize(574, 150)); driver->draw2DImage(imageManager.GetTexture(showcardcode, true), Resize(574, 150));
driver->draw2DImage(imageManager.tNegated, ResizeElem(536 + showcarddif, 141 + showcarddif, 793 - showcarddif, 397 - showcarddif), recti(0, 0, 128, 128), 0, 0, true); driver->draw2DImage(imageManager.tNegated, Resize(536 + showcarddif, 141 + showcarddif, 792 - showcarddif, 397 - showcarddif), recti(0, 0, 128, 128), 0, 0, true);
if(showcarddif < 64) if(showcarddif < 64)
showcarddif += 4; showcarddif += 4;
break; break;
...@@ -755,8 +756,8 @@ void Game::DrawSpec() { ...@@ -755,8 +756,8 @@ void Game::DrawSpec() {
matManager.c2d[1] = (showcarddif << 24) | 0xffffff; matManager.c2d[1] = (showcarddif << 24) | 0xffffff;
matManager.c2d[2] = (showcarddif << 24) | 0xffffff; matManager.c2d[2] = (showcarddif << 24) | 0xffffff;
matManager.c2d[3] = (showcarddif << 24) | 0xffffff; matManager.c2d[3] = (showcarddif << 24) | 0xffffff;
driver->draw2DImage(imageManager.GetTexture(showcardcode, true), ResizeElem(574, 154, 751, 404), driver->draw2DImage(imageManager.GetTexture(showcardcode, true), Resize(574, 150, 574 + CARD_IMG_WIDTH, 150 + CARD_IMG_HEIGHT),
ResizeElem(0, 0, CARD_IMG_WIDTH, CARD_IMG_HEIGHT), 0, matManager.c2d, true); Resize(0, 0, CARD_IMG_WIDTH, CARD_IMG_HEIGHT), 0, matManager.c2d, true);
if(showcarddif < 255) if(showcarddif < 255)
showcarddif += 17; showcarddif += 17;
break; break;
...@@ -766,15 +767,15 @@ void Game::DrawSpec() { ...@@ -766,15 +767,15 @@ void Game::DrawSpec() {
matManager.c2d[1] = (showcarddif << 25) | 0xffffff; matManager.c2d[1] = (showcarddif << 25) | 0xffffff;
matManager.c2d[2] = (showcarddif << 25) | 0xffffff; matManager.c2d[2] = (showcarddif << 25) | 0xffffff;
matManager.c2d[3] = (showcarddif << 25) | 0xffffff; matManager.c2d[3] = (showcarddif << 25) | 0xffffff;
driver->draw2DImage(imageManager.GetTexture(showcardcode, true), ResizeElem(662 - showcarddif * 0.69685f, 277 - showcarddif, 662 + showcarddif * 0.69685f, 277 + showcarddif), driver->draw2DImage(imageManager.GetTexture(showcardcode, true), Resize(662 - showcarddif * 0.69685f, 277 - showcarddif, 662 + showcarddif * 0.69685f, 277 + showcarddif),
ResizeElem(0, 0, CARD_IMG_WIDTH, CARD_IMG_HEIGHT), 0, matManager.c2d, true); Resize(0, 0, CARD_IMG_WIDTH, CARD_IMG_HEIGHT), 0, matManager.c2d, true);
if(showcarddif < 127) if(showcarddif < 127)
showcarddif += 9; showcarddif += 9;
break; break;
} }
case 6: { case 6: {
driver->draw2DImage(imageManager.GetTexture(showcardcode, true), Resize(574, 150)); driver->draw2DImage(imageManager.GetTexture(showcardcode, true), Resize(574, 150));
driver->draw2DImage(imageManager.tNumber, ResizeElem(536 + showcarddif, 141 + showcarddif, 793 - showcarddif, 397 - showcarddif), driver->draw2DImage(imageManager.tNumber, Resize(536 + showcarddif, 141 + showcarddif, 792 - showcarddif, 397 - showcarddif),
recti((showcardp % 5) * 64, (showcardp / 5) * 64, (showcardp % 5 + 1) * 64, (showcardp / 5 + 1) * 64), 0, 0, true); recti((showcardp % 5) * 64, (showcardp / 5) * 64, (showcardp % 5 + 1) * 64, (showcardp / 5 + 1) * 64), 0, 0, true);
if(showcarddif < 64) if(showcarddif < 64)
showcarddif += 4; showcarddif += 4;
...@@ -787,7 +788,7 @@ void Game::DrawSpec() { ...@@ -787,7 +788,7 @@ void Game::DrawSpec() {
corner[1] = core::position2d<s32>(751 * xScale + (CARD_IMG_HEIGHT * yScale - y) * 0.3f, 404 * yScale - y); corner[1] = core::position2d<s32>(751 * xScale + (CARD_IMG_HEIGHT * yScale - y) * 0.3f, 404 * yScale - y);
corner[2] = core::position2d<s32>(574 * xScale, 404 * yScale); corner[2] = core::position2d<s32>(574 * xScale, 404 * yScale);
corner[3] = core::position2d<s32>(751 * xScale, 404 * yScale); corner[3] = core::position2d<s32>(751 * xScale, 404 * yScale);
irr::gui::Draw2DImageQuad(driver, imageManager.GetTexture(showcardcode, true), ResizeElem(0, 0, CARD_IMG_WIDTH, CARD_IMG_HEIGHT), corner); irr::gui::Draw2DImageQuad(driver, imageManager.GetTexture(showcardcode, true), Resize(0, 0, CARD_IMG_WIDTH, CARD_IMG_HEIGHT), corner);
showcardp++; showcardp++;
showcarddif += 9; showcarddif += 9;
if(showcarddif >= 90) if(showcarddif >= 90)
......
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