Commit be988d54 authored by mercury233's avatar mercury233 Committed by GitHub

Revert "always show chain mark (#2294)" (#2301)

parent 5009c68e
......@@ -457,26 +457,28 @@ void Game::DrawMisc() {
driver->setTransform(irr::video::ETS_WORLD, im);
driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2);
}
for(size_t i = 0; i < dField.chains.size(); ++i) {
if(dField.chains[i].solved)
break;
matManager.mTRTexture.setTexture(0, imageManager.tChain);
matManager.mTRTexture.AmbientColor = 0xffffff00;
ic.setRotationRadians(act_rot);
ic.setTranslation(dField.chains[i].chain_pos);
driver->setMaterial(matManager.mTRTexture);
driver->setTransform(irr::video::ETS_WORLD, ic);
driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2);
it.setScale(0.6f);
it.setTranslation(dField.chains[i].chain_pos);
matManager.mTRTexture.setTexture(0, imageManager.tNumber);
matManager.vChainNum[0].TCoords = vector2df(0.19375f * (i % 5), 0.2421875f * (i / 5));
matManager.vChainNum[1].TCoords = vector2df(0.19375f * (i % 5 + 1), 0.2421875f * (i / 5));
matManager.vChainNum[2].TCoords = vector2df(0.19375f * (i % 5), 0.2421875f * (i / 5 + 1));
matManager.vChainNum[3].TCoords = vector2df(0.19375f * (i % 5 + 1), 0.2421875f * (i / 5 + 1));
driver->setMaterial(matManager.mTRTexture);
driver->setTransform(irr::video::ETS_WORLD, it);
driver->drawVertexPrimitiveList(matManager.vChainNum, 4, matManager.iRectangle, 2);
if(dField.chains.size() > 1) {
for(size_t i = 0; i < dField.chains.size(); ++i) {
if(dField.chains[i].solved)
break;
matManager.mTRTexture.setTexture(0, imageManager.tChain);
matManager.mTRTexture.AmbientColor = 0xffffff00;
ic.setRotationRadians(act_rot);
ic.setTranslation(dField.chains[i].chain_pos);
driver->setMaterial(matManager.mTRTexture);
driver->setTransform(irr::video::ETS_WORLD, ic);
driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2);
it.setScale(0.6f);
it.setTranslation(dField.chains[i].chain_pos);
matManager.mTRTexture.setTexture(0, imageManager.tNumber);
matManager.vChainNum[0].TCoords = vector2df(0.19375f * (i % 5), 0.2421875f * (i / 5));
matManager.vChainNum[1].TCoords = vector2df(0.19375f * (i % 5 + 1), 0.2421875f * (i / 5));
matManager.vChainNum[2].TCoords = vector2df(0.19375f * (i % 5), 0.2421875f * (i / 5 + 1));
matManager.vChainNum[3].TCoords = vector2df(0.19375f * (i % 5 + 1), 0.2421875f * (i / 5 + 1));
driver->setMaterial(matManager.mTRTexture);
driver->setTransform(irr::video::ETS_WORLD, it);
driver->drawVertexPrimitiveList(matManager.vChainNum, 4, matManager.iRectangle, 2);
}
}
//finish button
if(btnCancelOrFinish->isVisible() && dField.select_ready)
......
......@@ -2906,13 +2906,15 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int ct = BufferIO::ReadInt8(pbuf);
if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping)
return true;
if(mainGame->dField.last_chain)
mainGame->WaitFrameSignal(11);
for(int i = 0; i < 5; ++i) {
mainGame->dField.chains[ct - 1].solved = false;
mainGame->WaitFrameSignal(3);
mainGame->dField.chains[ct - 1].solved = true;
mainGame->WaitFrameSignal(3);
if (mainGame->dField.chains.size() > 1) {
if (mainGame->dField.last_chain)
mainGame->WaitFrameSignal(11);
for(int i = 0; i < 5; ++i) {
mainGame->dField.chains[ct - 1].solved = false;
mainGame->WaitFrameSignal(3);
mainGame->dField.chains[ct - 1].solved = true;
mainGame->WaitFrameSignal(3);
}
}
mainGame->dField.last_chain = false;
return true;
......
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