Commit 5179735f authored by mercury233's avatar mercury233

Merge branch 'fh' into patch-deck-category

parents 77b65772 1c36764c
...@@ -153,10 +153,12 @@ void SGUITTGlyph::preload(u32 char_index, FT_Face face, video::IVideoDriver* dri ...@@ -153,10 +153,12 @@ void SGUITTGlyph::preload(u32 char_index, FT_Face face, video::IVideoDriver* dri
} }
glyph_page = parent->getLastGlyphPageIndex(); glyph_page = parent->getLastGlyphPageIndex();
u32 texture_side_length = page->texture_size.Width; u32 texture_side_length = page->texture_size.Width - font_size;
u32 margin = font_size * 0.5;
u32 sprite_size = font_size * 1.5;
core::vector2di page_position( core::vector2di page_position(
(page->used_slots % (texture_side_length / font_size)) * font_size, (s32)(page->used_slots % (s32)(texture_side_length / sprite_size)) * sprite_size + margin,
(page->used_slots / (texture_side_length / font_size)) * font_size (s32)(page->used_slots / (s32)(texture_side_length / sprite_size)) * sprite_size + margin
); );
source_rect.UpperLeftCorner = page_position; source_rect.UpperLeftCorner = page_position;
source_rect.LowerRightCorner = core::vector2di(page_position.X + bits.width, page_position.Y + bits.rows); source_rect.LowerRightCorner = core::vector2di(page_position.X + bits.width, page_position.Y + bits.rows);
...@@ -466,7 +468,7 @@ CGUITTGlyphPage* CGUITTFont::createGlyphPage(const u8& pixel_mode) { ...@@ -466,7 +468,7 @@ CGUITTGlyphPage* CGUITTFont::createGlyphPage(const u8& pixel_mode) {
if (page) { if (page) {
// Determine the number of glyph slots on the page and add it to the list of pages. // Determine the number of glyph slots on the page and add it to the list of pages.
page->available_slots = (page_texture_size.Width / size) * (page_texture_size.Height / size); page->available_slots = (u32)((page_texture_size.Width - size) / (u32)(size * 1.5)) * (u32)((page_texture_size.Height - size) / (u32)(size * 1.5));
Glyph_Pages.push_back(page); Glyph_Pages.push_back(page);
} }
return page; return page;
......
...@@ -122,6 +122,52 @@ inline void showDeckManage() { ...@@ -122,6 +122,52 @@ inline void showDeckManage() {
mainGame->PopupElement(mainGame->wDeckManage); mainGame->PopupElement(mainGame->wDeckManage);
} }
inline void ShowBigCard(int code, float zoom) {
mainGame->deckBuilder.bigcard_code = code;
mainGame->deckBuilder.bigcard_zoom = zoom;
ITexture* img = imageManager.GetBigPicture(code, zoom);
mainGame->imgBigCard->setImage(img);
auto size = img->getSize();
s32 left = mainGame->window_size.Width / 2 - size.Width / 2;
s32 top = mainGame->window_size.Height / 2 - size.Height / 2;
mainGame->imgBigCard->setRelativePosition(recti(0, 0, size.Width, size.Height));
mainGame->wBigCard->setRelativePosition(recti(left, top, left + size.Width, top + size.Height));
mainGame->gMutex.lock();
mainGame->btnBigCardOriginalSize->setVisible(true);
mainGame->btnBigCardZoomIn->setVisible(true);
mainGame->btnBigCardZoomOut->setVisible(true);
mainGame->btnBigCardClose->setVisible(true);
mainGame->ShowElement(mainGame->wBigCard);
mainGame->env->getRootGUIElement()->bringToFront(mainGame->wBigCard);
mainGame->gMutex.unlock();
}
inline void ZoomBigCard(s32 centerx = -1, s32 centery = -1) {
if(mainGame->deckBuilder.bigcard_zoom >= 4)
mainGame->deckBuilder.bigcard_zoom = 4;
if(mainGame->deckBuilder.bigcard_zoom <= 0.2)
mainGame->deckBuilder.bigcard_zoom = 0.2;
ITexture* img = imageManager.GetBigPicture(mainGame->deckBuilder.bigcard_code, mainGame->deckBuilder.bigcard_zoom);
mainGame->imgBigCard->setImage(img);
auto size = img->getSize();
auto pos = mainGame->wBigCard->getRelativePosition();
if(centerx == -1) {
centerx = pos.UpperLeftCorner.X + pos.getWidth() / 2;
centery = pos.UpperLeftCorner.Y + pos.getHeight() * 0.444f;
}
float posx = (float)(centerx - pos.UpperLeftCorner.X) / pos.getWidth();
float posy = (float)(centery - pos.UpperLeftCorner.Y) / pos.getHeight();
s32 left = centerx - size.Width * posx;
s32 top = centery - size.Height * posy;
mainGame->imgBigCard->setRelativePosition(recti(0, 0, size.Width, size.Height));
mainGame->wBigCard->setRelativePosition(recti(left, top, left + size.Width, top + size.Height));
}
inline void CloseBigCard() {
mainGame->HideElement(mainGame->wBigCard);
mainGame->btnBigCardOriginalSize->setVisible(false);
mainGame->btnBigCardZoomIn->setVisible(false);
mainGame->btnBigCardZoomOut->setVisible(false);
mainGame->btnBigCardClose->setVisible(false);
}
void DeckBuilder::Initialize() { void DeckBuilder::Initialize() {
mainGame->is_building = true; mainGame->is_building = true;
mainGame->is_siding = false; mainGame->is_siding = false;
...@@ -167,6 +213,11 @@ void DeckBuilder::Terminate() { ...@@ -167,6 +213,11 @@ void DeckBuilder::Terminate() {
mainGame->wCardImg->setVisible(false); mainGame->wCardImg->setVisible(false);
mainGame->wInfos->setVisible(false); mainGame->wInfos->setVisible(false);
mainGame->btnLeaveGame->setVisible(false); mainGame->btnLeaveGame->setVisible(false);
mainGame->wBigCard->setVisible(false);
mainGame->btnBigCardOriginalSize->setVisible(false);
mainGame->btnBigCardZoomIn->setVisible(false);
mainGame->btnBigCardZoomOut->setVisible(false);
mainGame->btnBigCardClose->setVisible(false);
mainGame->PopupElement(mainGame->wMainMenu); mainGame->PopupElement(mainGame->wMainMenu);
mainGame->device->setEventReceiver(&mainGame->menuHandler); mainGame->device->setEventReceiver(&mainGame->menuHandler);
mainGame->wACMessage->setVisible(false); mainGame->wACMessage->setVisible(false);
...@@ -713,6 +764,24 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -713,6 +764,24 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
deckManager.LoadDeck(mainGame->cbCategorySelect, mainGame->cbDeckSelect); deckManager.LoadDeck(mainGame->cbCategorySelect, mainGame->cbDeckSelect);
break; break;
} }
case BUTTON_BIG_CARD_ORIG_SIZE: {
ShowBigCard(bigcard_code, 1);
break;
}
case BUTTON_BIG_CARD_ZOOM_IN: {
bigcard_zoom += 0.2;
ZoomBigCard();
break;
}
case BUTTON_BIG_CARD_ZOOM_OUT: {
bigcard_zoom -= 0.2;
ZoomBigCard();
break;
}
case BUTTON_BIG_CARD_CLOSE: {
CloseBigCard();
break;
}
case BUTTON_MSG_OK: { case BUTTON_MSG_OK: {
mainGame->HideElement(mainGame->wMessage); mainGame->HideElement(mainGame->wMessage);
mainGame->actionSignal.Set(); mainGame->actionSignal.Set();
...@@ -1070,6 +1139,11 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -1070,6 +1139,11 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
} }
case irr::EMIE_LMOUSE_LEFT_UP: { case irr::EMIE_LMOUSE_LEFT_UP: {
is_starting_dragging = false; is_starting_dragging = false;
irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement();
if(!is_draging && !mainGame->is_siding && root->getElementFromPoint(mouse_pos) == mainGame->imgCard) {
ShowBigCard(mainGame->showingcode, 1);
break;
}
if(!is_draging) if(!is_draging)
break; break;
soundManager.PlaySoundEffect(SOUND_CARD_DROP); soundManager.PlaySoundEffect(SOUND_CARD_DROP);
...@@ -1093,6 +1167,14 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -1093,6 +1167,14 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
is_draging = false; is_draging = false;
break; break;
} }
case irr::EMIE_LMOUSE_DOUBLE_CLICK: {
irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement();
if(!is_draging && !mainGame->is_siding && root->getElementFromPoint(mouse_pos) == root && hovered_code) {
ShowBigCard(hovered_code, 1);
break;
}
break;
}
case irr::EMIE_RMOUSE_LEFT_UP: { case irr::EMIE_RMOUSE_LEFT_UP: {
if(mainGame->is_siding) { if(mainGame->is_siding) {
if(is_draging) if(is_draging)
...@@ -1115,6 +1197,10 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -1115,6 +1197,10 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
} }
break; break;
} }
if(mainGame->wBigCard->isVisible()) {
CloseBigCard();
break;
}
if(havePopupWindow()) if(havePopupWindow())
break; break;
if(!is_draging) { if(!is_draging) {
...@@ -1197,11 +1283,16 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -1197,11 +1283,16 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break; break;
} }
case irr::EMIE_MOUSE_WHEEL: { case irr::EMIE_MOUSE_WHEEL: {
irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement();
if(root->getElementFromPoint(mouse_pos) == mainGame->imgBigCard) {
bigcard_zoom += 0.1f * event.MouseInput.Wheel;
ZoomBigCard(mouse_pos.X, mouse_pos.Y);
break;
}
if(!mainGame->scrFilter->isVisible()) if(!mainGame->scrFilter->isVisible())
break; break;
if(mainGame->env->hasFocus(mainGame->scrFilter)) if(mainGame->env->hasFocus(mainGame->scrFilter))
break; break;
irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement();
if(root->getElementFromPoint(mouse_pos) != root) if(root->getElementFromPoint(mouse_pos) != root)
break; break;
if(event.MouseInput.Wheel < 0) { if(event.MouseInput.Wheel < 0) {
......
...@@ -56,6 +56,8 @@ public: ...@@ -56,6 +56,8 @@ public:
bool is_starting_dragging; bool is_starting_dragging;
int dragx; int dragx;
int dragy; int dragy;
int bigcard_code;
float bigcard_zoom;
size_t pre_mainc; size_t pre_mainc;
size_t pre_extrac; size_t pre_extrac;
size_t pre_sidec; size_t pre_sidec;
......
...@@ -452,31 +452,45 @@ void Game::DrawMisc() { ...@@ -452,31 +452,45 @@ void Game::DrawMisc() {
driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2);
} }
if(dField.conti_act) { if(dField.conti_act) {
im.setTranslation(vector3df((matManager.vFieldContiAct[0].X + matManager.vFieldContiAct[1].X) / 2, irr::core::vector3df pos = vector3df((matManager.vFieldContiAct[0].X + matManager.vFieldContiAct[1].X) / 2,
(matManager.vFieldContiAct[0].Y + matManager.vFieldContiAct[2].Y) / 2, 0.03f)); (matManager.vFieldContiAct[0].Y + matManager.vFieldContiAct[2].Y) / 2, 0);
im.setRotationRadians(irr::core::vector3df(0, 0, 0));
for(auto cit = dField.conti_cards.begin(); cit != dField.conti_cards.end(); ++cit) {
im.setTranslation(pos);
driver->setTransform(irr::video::ETS_WORLD, im);
matManager.mCard.setTexture(0, imageManager.GetTexture((*cit)->code));
driver->setMaterial(matManager.mCard);
driver->drawVertexPrimitiveList(matManager.vCardFront, 4, matManager.iRectangle, 2);
pos.Z += 0.03f;
}
im.setTranslation(pos);
im.setRotationRadians(act_rot);
driver->setTransform(irr::video::ETS_WORLD, im); driver->setTransform(irr::video::ETS_WORLD, im);
driver->setMaterial(matManager.mTexture);
driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2); driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2);
} }
for(size_t i = 0; i < dField.chains.size(); ++i) { if(dField.chains.size() > 1 || mainGame->gameConf.draw_single_chain) {
if(dField.chains[i].solved) for(size_t i = 0; i < dField.chains.size(); ++i) {
break; if(dField.chains[i].solved)
matManager.mTRTexture.setTexture(0, imageManager.tChain); break;
matManager.mTRTexture.AmbientColor = 0xffffff00; matManager.mTRTexture.setTexture(0, imageManager.tChain);
ic.setRotationRadians(act_rot); matManager.mTRTexture.AmbientColor = 0xffffff00;
ic.setTranslation(dField.chains[i].chain_pos); ic.setRotationRadians(act_rot);
driver->setMaterial(matManager.mTRTexture); ic.setTranslation(dField.chains[i].chain_pos);
driver->setTransform(irr::video::ETS_WORLD, ic); driver->setMaterial(matManager.mTRTexture);
driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2); driver->setTransform(irr::video::ETS_WORLD, ic);
it.setScale(0.6f); driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2);
it.setTranslation(dField.chains[i].chain_pos); it.setScale(0.6f);
matManager.mTRTexture.setTexture(0, imageManager.tNumber); it.setTranslation(dField.chains[i].chain_pos);
matManager.vChainNum[0].TCoords = vector2df(0.19375f * (i % 5), 0.2421875f * (i / 5)); matManager.mTRTexture.setTexture(0, imageManager.tNumber);
matManager.vChainNum[1].TCoords = vector2df(0.19375f * (i % 5 + 1), 0.2421875f * (i / 5)); matManager.vChainNum[0].TCoords = vector2df(0.19375f * (i % 5), 0.2421875f * (i / 5));
matManager.vChainNum[2].TCoords = vector2df(0.19375f * (i % 5), 0.2421875f * (i / 5 + 1)); matManager.vChainNum[1].TCoords = vector2df(0.19375f * (i % 5 + 1), 0.2421875f * (i / 5));
matManager.vChainNum[3].TCoords = vector2df(0.19375f * (i % 5 + 1), 0.2421875f * (i / 5 + 1)); matManager.vChainNum[2].TCoords = vector2df(0.19375f * (i % 5), 0.2421875f * (i / 5 + 1));
driver->setMaterial(matManager.mTRTexture); matManager.vChainNum[3].TCoords = vector2df(0.19375f * (i % 5 + 1), 0.2421875f * (i / 5 + 1));
driver->setTransform(irr::video::ETS_WORLD, it); driver->setMaterial(matManager.mTRTexture);
driver->drawVertexPrimitiveList(matManager.vChainNum, 4, matManager.iRectangle, 2); driver->setTransform(irr::video::ETS_WORLD, it);
driver->drawVertexPrimitiveList(matManager.vChainNum, 4, matManager.iRectangle, 2);
}
} }
//finish button //finish button
if(btnCancelOrFinish->isVisible() && dField.select_ready) if(btnCancelOrFinish->isVisible() && dField.select_ready)
...@@ -987,9 +1001,12 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) { ...@@ -987,9 +1001,12 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) {
btnCardDisplay[i]->setDrawImage(false); btnCardDisplay[i]->setDrawImage(false);
} }
win->setRelativePosition(irr::core::recti(center.X, center.Y, 0, 0)); win->setRelativePosition(irr::core::recti(center.X, center.Y, 0, 0));
win->setVisible(true);
fadingList.push_back(fu); fadingList.push_back(fu);
} }
void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) { void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) {
if(!win->isVisible() && !set_action)
return;
FadingUnit fu; FadingUnit fu;
fu.fadingSize = win->getRelativePosition(); fu.fadingSize = win->getRelativePosition();
for(auto fit = fadingList.begin(); fit != fadingList.end(); ++fit) for(auto fit = fadingList.begin(); fit != fadingList.end(); ++fit)
...@@ -1197,8 +1214,13 @@ void Game::DrawSearchResults() { ...@@ -1197,8 +1214,13 @@ void Game::DrawSearchResults() {
DrawShadowText(numFont, deckBuilder.result_string, Resize(875, 137, 935, 157), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true); DrawShadowText(numFont, deckBuilder.result_string, Resize(875, 137, 935, 157), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true);
driver->draw2DRectangle(Resize(805, 160, 1020, 630), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000); driver->draw2DRectangle(Resize(805, 160, 1020, 630), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(Resize(804, 159, 1020, 630)); driver->draw2DRectangleOutline(Resize(804, 159, 1020, 630));
for(size_t i = 0; i < 7 && i + scrFilter->getPos() < deckBuilder.results.size(); ++i) { for(size_t i = 0; i < 9 && i + scrFilter->getPos() < deckBuilder.results.size(); ++i) {
code_pointer ptr = deckBuilder.results[i + scrFilter->getPos()]; code_pointer ptr = deckBuilder.results[i + scrFilter->getPos()];
if(i >= 7)
{
imageManager.GetTextureThumb(ptr->second.code);
break;
}
if(deckBuilder.hovered_pos == 4 && deckBuilder.hovered_seq == (int)i) if(deckBuilder.hovered_pos == 4 && deckBuilder.hovered_seq == (int)i)
driver->draw2DRectangle(0x80000000, Resize(806, 164 + i * 66, 1019, 230 + i * 66)); driver->draw2DRectangle(0x80000000, Resize(806, 164 + i * 66, 1019, 230 + i * 66));
DrawThumb(ptr, position2di(810, 165 + i * 66), deckBuilder.filterList); DrawThumb(ptr, position2di(810, 165 + i * 66), deckBuilder.filterList);
......
...@@ -370,24 +370,17 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -370,24 +370,17 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->dField.Clear(); mainGame->dField.Clear();
mainGame->is_building = true; mainGame->is_building = true;
mainGame->is_siding = true; mainGame->is_siding = true;
mainGame->CloseGameWindow();
mainGame->wChat->setVisible(false); mainGame->wChat->setVisible(false);
mainGame->wPhase->setVisible(false);
mainGame->wDeckEdit->setVisible(false); mainGame->wDeckEdit->setVisible(false);
mainGame->wFilter->setVisible(false); mainGame->wFilter->setVisible(false);
mainGame->wSort->setVisible(false); mainGame->wSort->setVisible(false);
mainGame->stTip->setVisible(false); if(mainGame->dInfo.player_type < 7)
mainGame->btnLeaveGame->setVisible(false);
mainGame->btnSideOK->setVisible(true); mainGame->btnSideOK->setVisible(true);
mainGame->btnSideShuffle->setVisible(true); mainGame->btnSideShuffle->setVisible(true);
mainGame->btnSideSort->setVisible(true); mainGame->btnSideSort->setVisible(true);
mainGame->btnSideReload->setVisible(true); mainGame->btnSideReload->setVisible(true);
if(mainGame->dInfo.player_type < 7)
mainGame->btnLeaveGame->setVisible(false);
mainGame->btnSpectatorSwap->setVisible(false);
mainGame->btnChainIgnore->setVisible(false);
mainGame->btnChainAlways->setVisible(false);
mainGame->btnChainWhenAvail->setVisible(false);
mainGame->btnCancelOrFinish->setVisible(false);
mainGame->btnShuffle->setVisible(false);
mainGame->deckBuilder.result_string[0] = L'0'; mainGame->deckBuilder.result_string[0] = L'0';
mainGame->deckBuilder.result_string[1] = 0; mainGame->deckBuilder.result_string[1] = 0;
mainGame->deckBuilder.results.clear(); mainGame->deckBuilder.results.clear();
...@@ -488,12 +481,9 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -488,12 +481,9 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->RefreshCategoryDeck(mainGame->cbCategorySelect, mainGame->cbDeckSelect); mainGame->RefreshCategoryDeck(mainGame->cbCategorySelect, mainGame->cbDeckSelect);
mainGame->cbCategorySelect->setEnabled(true); mainGame->cbCategorySelect->setEnabled(true);
mainGame->cbDeckSelect->setEnabled(true); mainGame->cbDeckSelect->setEnabled(true);
if(mainGame->wCreateHost->isVisible()) mainGame->HideElement(mainGame->wCreateHost);
mainGame->HideElement(mainGame->wCreateHost); mainGame->HideElement(mainGame->wLanWindow);
else if(mainGame->wLanWindow->isVisible()) mainGame->HideElement(mainGame->wSinglePlay);
mainGame->HideElement(mainGame->wLanWindow);
else if(mainGame->wSinglePlay->isVisible())
mainGame->HideElement(mainGame->wSinglePlay);
mainGame->ShowElement(mainGame->wHostPrepare); mainGame->ShowElement(mainGame->wHostPrepare);
if(!mainGame->chkIgnore1->isChecked()) if(!mainGame->chkIgnore1->isChecked())
mainGame->wChat->setVisible(true); mainGame->wChat->setVisible(true);
...@@ -651,12 +641,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -651,12 +641,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->gMutex.lock(); mainGame->gMutex.lock();
if(mainGame->dInfo.player_type < 7) if(mainGame->dInfo.player_type < 7)
mainGame->btnLeaveGame->setVisible(false); mainGame->btnLeaveGame->setVisible(false);
mainGame->btnSpectatorSwap->setVisible(false); mainGame->CloseGameButtons();
mainGame->btnChainIgnore->setVisible(false);
mainGame->btnChainAlways->setVisible(false);
mainGame->btnChainWhenAvail->setVisible(false);
mainGame->btnCancelOrFinish->setVisible(false);
mainGame->wSurrender->setVisible(false);
mainGame->stMessage->setText(dataManager.GetSysString(1500)); mainGame->stMessage->setText(dataManager.GetSysString(1500));
mainGame->PopupElement(mainGame->wMessage); mainGame->PopupElement(mainGame->wMessage);
mainGame->gMutex.unlock(); mainGame->gMutex.unlock();
...@@ -690,14 +675,9 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -690,14 +675,9 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
case STOC_REPLAY: { case STOC_REPLAY: {
mainGame->gMutex.lock(); mainGame->gMutex.lock();
mainGame->wPhase->setVisible(false); mainGame->wPhase->setVisible(false);
mainGame->wSurrender->setVisible(false);
if(mainGame->dInfo.player_type < 7) if(mainGame->dInfo.player_type < 7)
mainGame->btnLeaveGame->setVisible(false); mainGame->btnLeaveGame->setVisible(false);
mainGame->btnChainIgnore->setVisible(false); mainGame->CloseGameButtons();
mainGame->btnChainAlways->setVisible(false);
mainGame->btnChainWhenAvail->setVisible(false);
mainGame->btnCancelOrFinish->setVisible(false);
mainGame->btnShuffle->setVisible(false);
char* prep = pdata; char* prep = pdata;
Replay new_replay; Replay new_replay;
memcpy(&new_replay.pheader, prep, sizeof(ReplayHeader)); memcpy(&new_replay.pheader, prep, sizeof(ReplayHeader));
...@@ -2392,8 +2372,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2392,8 +2372,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->btnLeaveGame->setText(dataManager.GetSysString(1351)); mainGame->btnLeaveGame->setText(dataManager.GetSysString(1351));
mainGame->btnLeaveGame->setVisible(true); mainGame->btnLeaveGame->setVisible(true);
} }
if(mainGame->wSurrender->isVisible()) mainGame->HideElement(mainGame->wSurrender);
mainGame->HideElement(mainGame->wSurrender);
if(!mainGame->dInfo.isReplay && mainGame->dInfo.player_type < 7) { if(!mainGame->dInfo.isReplay && mainGame->dInfo.player_type < 7) {
if(mainGame->gameConf.control_mode == 0) { if(mainGame->gameConf.control_mode == 0) {
mainGame->btnChainIgnore->setVisible(true); mainGame->btnChainIgnore->setVisible(true);
...@@ -2908,13 +2887,15 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2908,13 +2887,15 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int ct = BufferIO::ReadInt8(pbuf); int ct = BufferIO::ReadInt8(pbuf);
if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping)
return true; return true;
if(mainGame->dField.last_chain) if(mainGame->dField.chains.size() > 1 || mainGame->gameConf.draw_single_chain) {
mainGame->WaitFrameSignal(11); if (mainGame->dField.last_chain)
for(int i = 0; i < 5; ++i) { mainGame->WaitFrameSignal(11);
mainGame->dField.chains[ct - 1].solved = false; for(int i = 0; i < 5; ++i) {
mainGame->WaitFrameSignal(3); mainGame->dField.chains[ct - 1].solved = false;
mainGame->dField.chains[ct - 1].solved = true; mainGame->WaitFrameSignal(3);
mainGame->WaitFrameSignal(3); mainGame->dField.chains[ct - 1].solved = true;
mainGame->WaitFrameSignal(3);
}
} }
mainGame->dField.last_chain = false; mainGame->dField.last_chain = false;
return true; return true;
......
...@@ -129,13 +129,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -129,13 +129,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->dInfo.isStarted = false; mainGame->dInfo.isStarted = false;
mainGame->dInfo.isFinished = false; mainGame->dInfo.isFinished = false;
mainGame->device->setEventReceiver(&mainGame->menuHandler); mainGame->device->setEventReceiver(&mainGame->menuHandler);
mainGame->stTip->setVisible(false); mainGame->CloseDuelWindow();
mainGame->wCardImg->setVisible(false);
mainGame->wInfos->setVisible(false);
mainGame->wPhase->setVisible(false);
mainGame->btnLeaveGame->setVisible(false);
mainGame->btnSpectatorSwap->setVisible(false);
mainGame->wChat->setVisible(false);
mainGame->btnCreateHost->setEnabled(true); mainGame->btnCreateHost->setEnabled(true);
mainGame->btnJoinHost->setEnabled(true); mainGame->btnJoinHost->setEnabled(true);
mainGame->btnJoinCancel->setEnabled(true); mainGame->btnJoinCancel->setEnabled(true);
...@@ -1459,8 +1453,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1459,8 +1453,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->chain_when_avail = false; mainGame->chain_when_avail = false;
UpdateChainButtons(); UpdateChainButtons();
} }
if(mainGame->wSurrender->isVisible()) mainGame->HideElement(mainGame->wSurrender);
mainGame->HideElement(mainGame->wSurrender);
mainGame->wCmdMenu->setVisible(false); mainGame->wCmdMenu->setVisible(false);
if(mainGame->fadingList.size()) if(mainGame->fadingList.size())
break; break;
...@@ -1801,10 +1794,14 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { ...@@ -1801,10 +1794,14 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
mainGame->SetCursor(event.GUIEvent.Caller->isEnabled() ? ECI_IBEAM : ECI_NORMAL); mainGame->SetCursor(event.GUIEvent.Caller->isEnabled() ? ECI_IBEAM : ECI_NORMAL);
return true; return true;
} }
if(event.GUIEvent.Caller == mainGame->imgCard && mainGame->is_building && !mainGame->is_siding) {
mainGame->SetCursor(ECI_HAND);
return true;
}
break; break;
} }
case irr::gui::EGET_ELEMENT_LEFT: { case irr::gui::EGET_ELEMENT_LEFT: {
if(event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX) { if(event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX || event.GUIEvent.Caller == mainGame->imgCard) {
mainGame->SetCursor(ECI_NORMAL); mainGame->SetCursor(ECI_NORMAL);
return true; return true;
} }
...@@ -1877,6 +1874,11 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { ...@@ -1877,6 +1874,11 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return true; return true;
break; break;
} }
case CHECKBOX_DRAW_SINGLE_CHAIN: {
mainGame->gameConf.draw_single_chain = mainGame->chkDrawSingleChain->isChecked() ? 1 : 0;
return true;
break;
}
case CHECKBOX_PREFER_EXPANSION: { case CHECKBOX_PREFER_EXPANSION: {
mainGame->gameConf.prefer_expansion_script = mainGame->chkPreferExpansionScript->isChecked() ? 1 : 0; mainGame->gameConf.prefer_expansion_script = mainGame->chkPreferExpansionScript->isChecked() ? 1 : 0;
return true; return true;
......
...@@ -288,6 +288,9 @@ bool Game::Initialize() { ...@@ -288,6 +288,9 @@ bool Game::Initialize() {
chkQuickAnimation = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_QUICK_ANIMATION, dataManager.GetSysString(1299)); chkQuickAnimation = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_QUICK_ANIMATION, dataManager.GetSysString(1299));
chkQuickAnimation->setChecked(gameConf.quick_animation != 0); chkQuickAnimation->setChecked(gameConf.quick_animation != 0);
posY += 30; posY += 30;
chkDrawSingleChain = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_DRAW_SINGLE_CHAIN, dataManager.GetSysString(1287));
chkDrawSingleChain->setChecked(gameConf.draw_single_chain != 0);
posY += 30;
chkAutoSaveReplay = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1366)); chkAutoSaveReplay = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1366));
chkAutoSaveReplay->setChecked(gameConf.auto_save_replay != 0); chkAutoSaveReplay->setChecked(gameConf.auto_save_replay != 0);
elmTabHelperLast = chkAutoSaveReplay; elmTabHelperLast = chkAutoSaveReplay;
...@@ -772,6 +775,23 @@ bool Game::Initialize() { ...@@ -772,6 +775,23 @@ bool Game::Initialize() {
//cancel or finish //cancel or finish
btnCancelOrFinish = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_CANCEL_OR_FINISH, dataManager.GetSysString(1295)); btnCancelOrFinish = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_CANCEL_OR_FINISH, dataManager.GetSysString(1295));
btnCancelOrFinish->setVisible(false); btnCancelOrFinish->setVisible(false);
//big picture
wBigCard = env->addWindow(rect<s32>(0, 0, 0, 0), false, L"");
wBigCard->getCloseButton()->setVisible(false);
wBigCard->setDrawTitlebar(false);
wBigCard->setDrawBackground(false);
wBigCard->setVisible(false);
imgBigCard = env->addImage(rect<s32>(0, 0, 0, 0), wBigCard);
imgBigCard->setScaleImage(false);
imgBigCard->setUseAlphaChannel(true);
btnBigCardOriginalSize = env->addButton(rect<s32>(205, 100, 295, 135), 0, BUTTON_BIG_CARD_ORIG_SIZE, dataManager.GetSysString(1443));
btnBigCardZoomIn = env->addButton(rect<s32>(205, 140, 295, 175), 0, BUTTON_BIG_CARD_ZOOM_IN, dataManager.GetSysString(1441));
btnBigCardZoomOut = env->addButton(rect<s32>(205, 180, 295, 215), 0, BUTTON_BIG_CARD_ZOOM_OUT, dataManager.GetSysString(1442));
btnBigCardClose = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_BIG_CARD_CLOSE, dataManager.GetSysString(1440));
btnBigCardOriginalSize->setVisible(false);
btnBigCardZoomIn->setVisible(false);
btnBigCardZoomOut->setVisible(false);
btnBigCardClose->setVisible(false);
//leave/surrender/exit //leave/surrender/exit
btnLeaveGame = env->addButton(rect<s32>(205, 5, 295, 80), 0, BUTTON_LEAVE_GAME, L""); btnLeaveGame = env->addButton(rect<s32>(205, 5, 295, 80), 0, BUTTON_LEAVE_GAME, L"");
btnLeaveGame->setVisible(false); btnLeaveGame->setVisible(false);
...@@ -1165,6 +1185,7 @@ void Game::LoadConfig() { ...@@ -1165,6 +1185,7 @@ void Game::LoadConfig() {
gameConf.enable_bot_mode = 0; gameConf.enable_bot_mode = 0;
gameConf.quick_animation = 0; gameConf.quick_animation = 0;
gameConf.auto_save_replay = 0; gameConf.auto_save_replay = 0;
gameConf.draw_single_chain = 0;
gameConf.prefer_expansion_script = 0; gameConf.prefer_expansion_script = 0;
gameConf.enable_sound = true; gameConf.enable_sound = true;
gameConf.sound_volume = 0.5; gameConf.sound_volume = 0.5;
...@@ -1247,6 +1268,8 @@ void Game::LoadConfig() { ...@@ -1247,6 +1268,8 @@ void Game::LoadConfig() {
gameConf.quick_animation = atoi(valbuf); gameConf.quick_animation = atoi(valbuf);
} else if(!strcmp(strbuf, "auto_save_replay")) { } else if(!strcmp(strbuf, "auto_save_replay")) {
gameConf.auto_save_replay = atoi(valbuf); gameConf.auto_save_replay = atoi(valbuf);
} else if(!strcmp(strbuf, "draw_single_chain")) {
gameConf.draw_single_chain = atoi(valbuf);
} else if(!strcmp(strbuf, "prefer_expansion_script")) { } else if(!strcmp(strbuf, "prefer_expansion_script")) {
gameConf.prefer_expansion_script = atoi(valbuf); gameConf.prefer_expansion_script = atoi(valbuf);
} else if(!strcmp(strbuf, "window_maximized")) { } else if(!strcmp(strbuf, "window_maximized")) {
...@@ -1344,6 +1367,7 @@ void Game::SaveConfig() { ...@@ -1344,6 +1367,7 @@ void Game::SaveConfig() {
fprintf(fp, "bot_deck_path = %s\n", linebuf); fprintf(fp, "bot_deck_path = %s\n", linebuf);
fprintf(fp, "quick_animation = %d\n", gameConf.quick_animation); fprintf(fp, "quick_animation = %d\n", gameConf.quick_animation);
fprintf(fp, "auto_save_replay = %d\n", (chkAutoSaveReplay->isChecked() ? 1 : 0)); fprintf(fp, "auto_save_replay = %d\n", (chkAutoSaveReplay->isChecked() ? 1 : 0));
fprintf(fp, "draw_single_chain = %d\n", gameConf.draw_single_chain);
fprintf(fp, "prefer_expansion_script = %d\n", gameConf.prefer_expansion_script); fprintf(fp, "prefer_expansion_script = %d\n", gameConf.prefer_expansion_script);
fprintf(fp, "window_maximized = %d\n", (gameConf.window_maximized ? 1 : 0)); fprintf(fp, "window_maximized = %d\n", (gameConf.window_maximized ? 1 : 0));
fprintf(fp, "window_width = %d\n", gameConf.window_width); fprintf(fp, "window_width = %d\n", gameConf.window_width);
...@@ -1556,7 +1580,17 @@ void Game::ClearTextures() { ...@@ -1556,7 +1580,17 @@ void Game::ClearTextures() {
} }
imageManager.ClearTexture(); imageManager.ClearTexture();
} }
void Game::CloseDuelWindow() { void Game::CloseGameButtons() {
btnChainIgnore->setVisible(false);
btnChainAlways->setVisible(false);
btnChainWhenAvail->setVisible(false);
btnCancelOrFinish->setVisible(false);
btnSpectatorSwap->setVisible(false);
btnShuffle->setVisible(false);
wSurrender->setVisible(false);
}
void Game::CloseGameWindow() {
CloseGameButtons();
for(auto wit = fadingList.begin(); wit != fadingList.end(); ++wit) { for(auto wit = fadingList.begin(); wit != fadingList.end(); ++wit) {
if(wit->isFadein) if(wit->isFadein)
wit->autoFadeoutFrame = 1; wit->autoFadeoutFrame = 1;
...@@ -1566,34 +1600,32 @@ void Game::CloseDuelWindow() { ...@@ -1566,34 +1600,32 @@ void Game::CloseDuelWindow() {
wANCard->setVisible(false); wANCard->setVisible(false);
wANNumber->setVisible(false); wANNumber->setVisible(false);
wANRace->setVisible(false); wANRace->setVisible(false);
wCardImg->setVisible(false);
wCardSelect->setVisible(false); wCardSelect->setVisible(false);
wCardDisplay->setVisible(false); wCardDisplay->setVisible(false);
wCmdMenu->setVisible(false); wCmdMenu->setVisible(false);
wFTSelect->setVisible(false); wFTSelect->setVisible(false);
wHand->setVisible(false); wHand->setVisible(false);
wInfos->setVisible(false);
wMessage->setVisible(false); wMessage->setVisible(false);
wOptions->setVisible(false); wOptions->setVisible(false);
wPhase->setVisible(false); wPhase->setVisible(false);
wPosSelect->setVisible(false); wPosSelect->setVisible(false);
wQuery->setVisible(false); wQuery->setVisible(false);
wSurrender->setVisible(false);
wReplayControl->setVisible(false); wReplayControl->setVisible(false);
wReplaySave->setVisible(false); wReplaySave->setVisible(false);
stHintMsg->setVisible(false); stHintMsg->setVisible(false);
stTip->setVisible(false);
}
void Game::CloseDuelWindow() {
CloseGameWindow();
wCardImg->setVisible(false);
wInfos->setVisible(false);
wChat->setVisible(false);
btnSideOK->setVisible(false); btnSideOK->setVisible(false);
btnSideShuffle->setVisible(false); btnSideShuffle->setVisible(false);
btnSideSort->setVisible(false); btnSideSort->setVisible(false);
btnSideReload->setVisible(false); btnSideReload->setVisible(false);
btnLeaveGame->setVisible(false); btnLeaveGame->setVisible(false);
btnSpectatorSwap->setVisible(false); btnSpectatorSwap->setVisible(false);
btnChainIgnore->setVisible(false);
btnChainAlways->setVisible(false);
btnChainWhenAvail->setVisible(false);
btnCancelOrFinish->setVisible(false);
btnShuffle->setVisible(false);
wChat->setVisible(false);
lstLog->clear(); lstLog->clear();
logParam.clear(); logParam.clear();
lstHostList->clear(); lstHostList->clear();
...@@ -1796,6 +1828,11 @@ void Game::OnResize() { ...@@ -1796,6 +1828,11 @@ void Game::OnResize() {
btnChainWhenAvail->setRelativePosition(Resize(205, 180, 295, 215)); btnChainWhenAvail->setRelativePosition(Resize(205, 180, 295, 215));
btnShuffle->setRelativePosition(Resize(205, 230, 295, 265)); btnShuffle->setRelativePosition(Resize(205, 230, 295, 265));
btnCancelOrFinish->setRelativePosition(Resize(205, 230, 295, 265)); btnCancelOrFinish->setRelativePosition(Resize(205, 230, 295, 265));
btnBigCardOriginalSize->setRelativePosition(Resize(205, 100, 295, 135));
btnBigCardZoomIn->setRelativePosition(Resize(205, 140, 295, 175));
btnBigCardZoomOut->setRelativePosition(Resize(205, 180, 295, 215));
btnBigCardClose->setRelativePosition(Resize(205, 230, 295, 265));
} }
recti Game::Resize(s32 x, s32 y, s32 x2, s32 y2) { recti Game::Resize(s32 x, s32 y, s32 x2, s32 y2) {
x = x * xScale; x = x * xScale;
......
...@@ -48,6 +48,7 @@ struct Config { ...@@ -48,6 +48,7 @@ struct Config {
int enable_bot_mode; int enable_bot_mode;
int quick_animation; int quick_animation;
int auto_save_replay; int auto_save_replay;
int draw_single_chain;
int prefer_expansion_script; int prefer_expansion_script;
bool enable_sound; bool enable_sound;
bool enable_music; bool enable_music;
...@@ -155,6 +156,8 @@ public: ...@@ -155,6 +156,8 @@ public:
void AddDebugMsg(const char* msgbuf); void AddDebugMsg(const char* msgbuf);
void ErrorLog(const char* msgbuf); void ErrorLog(const char* msgbuf);
void ClearTextures(); void ClearTextures();
void CloseGameButtons();
void CloseGameWindow();
void CloseDuelWindow(); void CloseDuelWindow();
int LocalPlayer(int player); int LocalPlayer(int player);
...@@ -289,6 +292,7 @@ public: ...@@ -289,6 +292,7 @@ public:
irr::gui::IGUICheckBox* chkWaitChain; irr::gui::IGUICheckBox* chkWaitChain;
irr::gui::IGUICheckBox* chkQuickAnimation; irr::gui::IGUICheckBox* chkQuickAnimation;
irr::gui::IGUICheckBox* chkAutoSaveReplay; irr::gui::IGUICheckBox* chkAutoSaveReplay;
irr::gui::IGUICheckBox* chkDrawSingleChain;
irr::gui::IGUIWindow* tabSystem; irr::gui::IGUIWindow* tabSystem;
irr::gui::IGUIElement* elmTabSystemLast; irr::gui::IGUIElement* elmTabSystemLast;
irr::gui::IGUIScrollBar* scrTabSystem; irr::gui::IGUIScrollBar* scrTabSystem;
...@@ -565,6 +569,13 @@ public: ...@@ -565,6 +569,13 @@ public:
irr::gui::IGUIButton* btnChainWhenAvail; irr::gui::IGUIButton* btnChainWhenAvail;
//cancel or finish //cancel or finish
irr::gui::IGUIButton* btnCancelOrFinish; irr::gui::IGUIButton* btnCancelOrFinish;
//big picture
irr::gui::IGUIWindow* wBigCard;
irr::gui::IGUIImage* imgBigCard;
irr::gui::IGUIButton* btnBigCardOriginalSize;
irr::gui::IGUIButton* btnBigCardZoomIn;
irr::gui::IGUIButton* btnBigCardZoomOut;
irr::gui::IGUIButton* btnBigCardClose;
}; };
extern Game* mainGame; extern Game* mainGame;
...@@ -769,6 +780,11 @@ extern Game* mainGame; ...@@ -769,6 +780,11 @@ extern Game* mainGame;
#define SCROLL_TAB_SYSTEM 371 #define SCROLL_TAB_SYSTEM 371
#define CHECKBOX_MULTI_KEYWORDS 372 #define CHECKBOX_MULTI_KEYWORDS 372
#define CHECKBOX_PREFER_EXPANSION 373 #define CHECKBOX_PREFER_EXPANSION 373
#define CHECKBOX_DRAW_SINGLE_CHAIN 374
#define BUTTON_BIG_CARD_CLOSE 380
#define BUTTON_BIG_CARD_ZOOM_IN 381
#define BUTTON_BIG_CARD_ZOOM_OUT 382
#define BUTTON_BIG_CARD_ORIG_SIZE 383
#define DEFAULT_DUEL_RULE 5 #define DEFAULT_DUEL_RULE 5
......
...@@ -15,6 +15,9 @@ bool ImageManager::Initial() { ...@@ -15,6 +15,9 @@ bool ImageManager::Initial() {
tUnknown = NULL; tUnknown = NULL;
tUnknownFit = NULL; tUnknownFit = NULL;
tUnknownThumb = NULL; tUnknownThumb = NULL;
tBigPicture = NULL;
tLoading = NULL;
tThumbLoadingThreadRunning = false;
tAct = driver->getTexture("textures/act.png"); tAct = driver->getTexture("textures/act.png");
tAttack = driver->getTexture("textures/attack.png"); tAttack = driver->getTexture("textures/attack.png");
tChain = driver->getTexture("textures/chain.png"); tChain = driver->getTexture("textures/chain.png");
...@@ -55,12 +58,22 @@ void ImageManager::ClearTexture() { ...@@ -55,12 +58,22 @@ void ImageManager::ClearTexture() {
driver->removeTexture(tit->second); driver->removeTexture(tit->second);
} }
for(auto tit = tThumb.begin(); tit != tThumb.end(); ++tit) { for(auto tit = tThumb.begin(); tit != tThumb.end(); ++tit) {
if(tit->second) if(tit->second && tit->second != tLoading)
driver->removeTexture(tit->second); driver->removeTexture(tit->second);
} }
if(tBigPicture != NULL) {
driver->removeTexture(tBigPicture);
tBigPicture = NULL;
}
tMap[0].clear(); tMap[0].clear();
tMap[1].clear(); tMap[1].clear();
tThumb.clear(); tThumb.clear();
tThumbLoadingMutex.lock();
tThumbLoading.clear();
while(!tThumbLoadingCodes.empty())
tThumbLoadingCodes.pop();
tThumbLoadingThreadRunning = false;
tThumbLoadingMutex.unlock();
tFields.clear(); tFields.clear();
} }
void ImageManager::RemoveTexture(int code) { void ImageManager::RemoveTexture(int code) {
...@@ -96,9 +109,11 @@ void ImageManager::ResizeTexture() { ...@@ -96,9 +109,11 @@ void ImageManager::ResizeTexture() {
driver->removeTexture(tUnknown); driver->removeTexture(tUnknown);
driver->removeTexture(tUnknownFit); driver->removeTexture(tUnknownFit);
driver->removeTexture(tUnknownThumb); driver->removeTexture(tUnknownThumb);
driver->removeTexture(tLoading);
tUnknown = GetTextureFromFile("textures/unknown.jpg", CARD_IMG_WIDTH, CARD_IMG_HEIGHT); tUnknown = GetTextureFromFile("textures/unknown.jpg", CARD_IMG_WIDTH, CARD_IMG_HEIGHT);
tUnknownFit = GetTextureFromFile("textures/unknown.jpg", imgWidthFit, imgHeightFit); tUnknownFit = GetTextureFromFile("textures/unknown.jpg", imgWidthFit, imgHeightFit);
tUnknownThumb = GetTextureFromFile("textures/unknown.jpg", imgWidthThumb, imgHeightThumb); tUnknownThumb = GetTextureFromFile("textures/unknown.jpg", imgWidthThumb, imgHeightThumb);
tLoading = GetTextureFromFile("textures/cover.jpg", imgWidthThumb, imgHeightThumb);
driver->removeTexture(tBackGround); driver->removeTexture(tBackGround);
tBackGround = GetTextureFromFile("textures/bg.jpg", bgWidth, bgHeight); tBackGround = GetTextureFromFile("textures/bg.jpg", bgWidth, bgHeight);
driver->removeTexture(tBackGround_menu); driver->removeTexture(tBackGround_menu);
...@@ -236,30 +251,121 @@ irr::video::ITexture* ImageManager::GetTexture(int code, bool fit) { ...@@ -236,30 +251,121 @@ irr::video::ITexture* ImageManager::GetTexture(int code, bool fit) {
else else
return mainGame->gameConf.use_image_scale ? (fit ? tUnknownFit : tUnknown) : GetTextureThumb(code); return mainGame->gameConf.use_image_scale ? (fit ? tUnknownFit : tUnknown) : GetTextureThumb(code);
} }
irr::video::ITexture* ImageManager::GetTextureThumb(int code) { irr::video::ITexture* ImageManager::GetBigPicture(int code, float zoom) {
if(code == 0) if(code == 0)
return tUnknownThumb; return tUnknown;
auto tit = tThumb.find(code); if(tBigPicture != NULL) {
int width = CARD_THUMB_WIDTH * mainGame->xScale; driver->removeTexture(tBigPicture);
int height = CARD_THUMB_HEIGHT * mainGame->yScale; tBigPicture = NULL;
if(tit == tThumb.end()) { }
irr::video::ITexture* texture;
char file[256];
sprintf(file, "expansions/pics/%d.jpg", code);
irr::video::IImage* srcimg = driver->createImageFromFile(file);
if(srcimg == NULL) {
sprintf(file, "pics/%d.jpg", code);
srcimg = driver->createImageFromFile(file);
}
if(srcimg == NULL) {
return tUnknown;
}
if(zoom == 1) {
texture = driver->addTexture(file, srcimg);
} else {
auto origsize = srcimg->getDimension();
video::IImage* destimg = driver->createImage(srcimg->getColorFormat(), irr::core::dimension2d<u32>(origsize.Width * zoom, origsize.Height * zoom));
imageScaleNNAA(srcimg, destimg);
texture = driver->addTexture(file, destimg);
destimg->drop();
}
srcimg->drop();
tBigPicture = texture;
return texture;
}
int ImageManager::LoadThumbThread() {
while(true) {
imageManager.tThumbLoadingMutex.lock();
int code = imageManager.tThumbLoadingCodes.front();
imageManager.tThumbLoadingCodes.pop();
imageManager.tThumbLoadingMutex.unlock();
char file[256]; char file[256];
sprintf(file, "expansions/pics/thumbnail/%d.jpg", code); sprintf(file, "expansions/pics/thumbnail/%d.jpg", code);
irr::video::ITexture* img = GetTextureFromFile(file, width, height); irr::video::IImage* img = imageManager.driver->createImageFromFile(file);
if(img == NULL) { if(img == NULL) {
sprintf(file, "pics/thumbnail/%d.jpg", code); sprintf(file, "pics/thumbnail/%d.jpg", code);
img = GetTextureFromFile(file, width, height); img = imageManager.driver->createImageFromFile(file);
} }
if(img == NULL && mainGame->gameConf.use_image_scale) { if(img == NULL && mainGame->gameConf.use_image_scale) {
sprintf(file, "expansions/pics/%d.jpg", code); sprintf(file, "expansions/pics/%d.jpg", code);
img = GetTextureFromFile(file, width, height); img = imageManager.driver->createImageFromFile(file);
if(img == NULL) { }
sprintf(file, "pics/%d.jpg", code); if(img == NULL && mainGame->gameConf.use_image_scale) {
img = GetTextureFromFile(file, width, height); sprintf(file, "pics/%d.jpg", code);
img = imageManager.driver->createImageFromFile(file);
}
if(img != NULL) {
int width = CARD_THUMB_WIDTH * mainGame->xScale;
int height = CARD_THUMB_HEIGHT * mainGame->yScale;
if(img->getDimension() == irr::core::dimension2d<u32>(width, height)) {
img->grab();
imageManager.tThumbLoadingMutex.lock();
if(imageManager.tThumbLoadingThreadRunning)
imageManager.tThumbLoading[code] = img;
imageManager.tThumbLoadingMutex.unlock();
} else {
irr::video::IImage *destimg = imageManager.driver->createImage(img->getColorFormat(), irr::core::dimension2d<u32>(width, height));
imageScaleNNAA(img, destimg);
img->drop();
destimg->grab();
imageManager.tThumbLoadingMutex.lock();
if(imageManager.tThumbLoadingThreadRunning)
imageManager.tThumbLoading[code] = destimg;
imageManager.tThumbLoadingMutex.unlock();
} }
} else {
imageManager.tThumbLoadingMutex.lock();
if(imageManager.tThumbLoadingThreadRunning)
imageManager.tThumbLoading[code] = NULL;
imageManager.tThumbLoadingMutex.unlock();
}
imageManager.tThumbLoadingMutex.lock();
imageManager.tThumbLoadingThreadRunning = !imageManager.tThumbLoadingCodes.empty();
if(!imageManager.tThumbLoadingThreadRunning)
break;
imageManager.tThumbLoadingMutex.unlock();
}
imageManager.tThumbLoadingMutex.unlock();
return 0;
}
irr::video::ITexture* ImageManager::GetTextureThumb(int code) {
if(code == 0)
return tUnknownThumb;
imageManager.tThumbLoadingMutex.lock();
auto lit = tThumbLoading.find(code);
if(lit != tThumbLoading.end()) {
if(lit->second != NULL) {
char file[256];
sprintf(file, "pics/thumbnail/%d.jpg", code);
irr::video::ITexture* texture = driver->addTexture(file, lit->second); // textures must be added in the main thread due to OpenGL
lit->second->drop();
tThumb[code] = texture;
} else {
tThumb[code] = NULL;
}
tThumbLoading.erase(lit);
}
imageManager.tThumbLoadingMutex.unlock();
auto tit = tThumb.find(code);
if(tit == tThumb.end()) {
tThumb[code] = tLoading;
imageManager.tThumbLoadingMutex.lock();
tThumbLoadingCodes.push(code);
if(!tThumbLoadingThreadRunning) {
tThumbLoadingThreadRunning = true;
std::thread(LoadThumbThread).detach();
} }
tThumb[code] = img; imageManager.tThumbLoadingMutex.unlock();
return (img == NULL) ? tUnknownThumb : img; return tLoading;
} }
if(tit->second) if(tit->second)
return tit->second; return tit->second;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "config.h" #include "config.h"
#include "data_manager.h" #include "data_manager.h"
#include <unordered_map> #include <unordered_map>
#include <queue>
namespace ygo { namespace ygo {
...@@ -16,18 +17,26 @@ public: ...@@ -16,18 +17,26 @@ public:
void ResizeTexture(); void ResizeTexture();
irr::video::ITexture* GetTextureFromFile(const char* file, s32 width, s32 height); irr::video::ITexture* GetTextureFromFile(const char* file, s32 width, s32 height);
irr::video::ITexture* GetTexture(int code, bool fit = false); irr::video::ITexture* GetTexture(int code, bool fit = false);
irr::video::ITexture* GetBigPicture(int code, float zoom);
irr::video::ITexture* GetTextureThumb(int code); irr::video::ITexture* GetTextureThumb(int code);
irr::video::ITexture* GetTextureField(int code); irr::video::ITexture* GetTextureField(int code);
static int LoadThumbThread();
std::unordered_map<int, irr::video::ITexture*> tMap[2]; std::unordered_map<int, irr::video::ITexture*> tMap[2];
std::unordered_map<int, irr::video::ITexture*> tThumb; std::unordered_map<int, irr::video::ITexture*> tThumb;
std::unordered_map<int, irr::video::ITexture*> tFields; std::unordered_map<int, irr::video::ITexture*> tFields;
std::unordered_map<int, irr::video::IImage*> tThumbLoading;
std::queue<int> tThumbLoadingCodes;
std::mutex tThumbLoadingMutex;
bool tThumbLoadingThreadRunning;
irr::IrrlichtDevice* device; irr::IrrlichtDevice* device;
irr::video::IVideoDriver* driver; irr::video::IVideoDriver* driver;
irr::video::ITexture* tCover[4]; irr::video::ITexture* tCover[4];
irr::video::ITexture* tUnknown; irr::video::ITexture* tUnknown;
irr::video::ITexture* tUnknownFit; irr::video::ITexture* tUnknownFit;
irr::video::ITexture* tUnknownThumb; irr::video::ITexture* tUnknownThumb;
irr::video::ITexture* tBigPicture;
irr::video::ITexture* tLoading;
irr::video::ITexture* tAct; irr::video::ITexture* tAct;
irr::video::ITexture* tAttack; irr::video::ITexture* tAttack;
irr::video::ITexture* tNegated; irr::video::ITexture* tNegated;
......
...@@ -230,8 +230,7 @@ void ReplayMode::EndDuel() { ...@@ -230,8 +230,7 @@ void ReplayMode::EndDuel() {
mainGame->actionSignal.Reset(); mainGame->actionSignal.Reset();
mainGame->gMutex.lock(); mainGame->gMutex.lock();
mainGame->stMessage->setText(dataManager.GetSysString(1501)); mainGame->stMessage->setText(dataManager.GetSysString(1501));
if(mainGame->wCardSelect->isVisible()) mainGame->HideElement(mainGame->wCardSelect);
mainGame->HideElement(mainGame->wCardSelect);
mainGame->PopupElement(mainGame->wMessage); mainGame->PopupElement(mainGame->wMessage);
mainGame->gMutex.unlock(); mainGame->gMutex.unlock();
mainGame->actionSignal.Wait(); mainGame->actionSignal.Wait();
......
#[2020.4][2020.4 TCG][2020.1][2019.10][2019.7][2019.4][2019.1][2018.10][2018.7][2018.4][2018.1][2017.10][2017.7][2017.4][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2020.1 TCG][2019.10 TCG][2019.7 TCG][2019.4 TCG][2019.1 TCG][2018.12 TCG][2018.9 TCG][2018.5 TCG][2018.2 TCG][2017.11 TCG][2017.9 TCG][2017.6 TCG][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1] #[2020.7][2020.6 TCG][2020.4][2020.1][2019.10][2019.7][2019.4][2019.1][2018.10][2018.7][2018.4][2018.1][2017.10][2017.7][2017.4][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2020.4 TCG][2020.1 TCG][2019.10 TCG][2019.7 TCG][2019.4 TCG][2019.1 TCG][2018.12 TCG][2018.9 TCG][2018.5 TCG][2018.2 TCG][2017.11 TCG][2017.9 TCG][2017.6 TCG][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
!2020.4 !2020.7
#forbidden #forbidden
91869203 0 --アマゾネスの射手 91869203 0 --アマゾネスの射手
20663556 0 --イレカエル 20663556 0 --イレカエル
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
96782886 0 --メンタルマスター 96782886 0 --メンタルマスター
03078576 0 --八汰烏 03078576 0 --八汰烏
34086406 0 --ラヴァルバル・チェイン 34086406 0 --ラヴァルバル・チェイン
85243784 0 --リンクロス
57421866 0 --レベル・スティーラー 57421866 0 --レベル・スティーラー
41482598 0 --悪夢の蜃気楼 41482598 0 --悪夢の蜃気楼
44763025 0 --いたずら好きな双子悪魔 44763025 0 --いたずら好きな双子悪魔
...@@ -87,7 +88,6 @@ ...@@ -87,7 +88,6 @@
42790071 1 --オルターガイスト・マルチフェイカー 42790071 1 --オルターガイスト・マルチフェイカー
30741503 1 --オルフェゴール・ガラテア 30741503 1 --オルフェゴール・ガラテア
57835716 1 --オルフェゴール・ディヴェル 57835716 1 --オルフェゴール・ディヴェル
99234526 1 --輝白竜 ワイバースター
50588353 1 --水晶機巧-ハリファイバー 50588353 1 --水晶機巧-ハリファイバー
12289247 1 --クロノグラフ・マジシャン 12289247 1 --クロノグラフ・マジシャン
49684352 1 --虹彩の魔術師 49684352 1 --虹彩の魔術師
...@@ -99,7 +99,6 @@ ...@@ -99,7 +99,6 @@
78872731 1 --十二獣モルモラット 78872731 1 --十二獣モルモラット
06602300 1 --重爆撃禽 ボム・フェネクス 06602300 1 --重爆撃禽 ボム・フェネクス
28985331 1 --終末の騎士 28985331 1 --終末の騎士
21593977 1 --処刑人-マキュラ
78080961 1 --SPYRAL-ジーニアス 78080961 1 --SPYRAL-ジーニアス
81275020 1 --SRベイゴマックス 81275020 1 --SRベイゴマックス
63288573 1 --閃刀姫-カガリ 63288573 1 --閃刀姫-カガリ
...@@ -113,7 +112,6 @@ ...@@ -113,7 +112,6 @@
69015963 1 --デビル・フランケン 69015963 1 --デビル・フランケン
75732622 1 --トーチ・ゴーレム 75732622 1 --トーチ・ゴーレム
16226786 1 --深淵の暗殺者 16226786 1 --深淵の暗殺者
28297833 1 --ネクロフェイス
69610326 1 --覇王眷竜ダークヴルム 69610326 1 --覇王眷竜ダークヴルム
70583986 1 --氷結界の虎王ドゥローレン 70583986 1 --氷結界の虎王ドゥローレン
52687916 1 --氷結界の龍トリシューラ 52687916 1 --氷結界の龍トリシューラ
...@@ -130,9 +128,7 @@ ...@@ -130,9 +128,7 @@
83107873 1 --雷鳥龍-サンダー・ドラゴン 83107873 1 --雷鳥龍-サンダー・ドラゴン
89399912 1 --嵐征竜-テンペスト 89399912 1 --嵐征竜-テンペスト
92746535 1 --竜剣士ラスターP 92746535 1 --竜剣士ラスターP
85243784 1 --リンクロス
88264978 1 --レッドアイズ・ダークネスメタルドラゴン 88264978 1 --レッドアイズ・ダークネスメタルドラゴン
48686504 1 --ローンファイア・ブロッサム
33782437 1 --一時休戦 33782437 1 --一時休戦
01845204 1 --簡易融合 01845204 1 --簡易融合
66957584 1 --インフェルニティガン 66957584 1 --インフェルニティガン
...@@ -165,16 +161,18 @@ ...@@ -165,16 +161,18 @@
89208725 1 --メタバース 89208725 1 --メタバース
#semi limit #semi limit
25533642 2 --オルターガイスト・メリュシーク 25533642 2 --オルターガイスト・メリュシーク
78868119 2 --深海のディーヴァ 99234526 2 --輝白竜 ワイバースター
21593977 2 --処刑人-マキュラ
14536035 2 --ダーク・グレファー 14536035 2 --ダーク・グレファー
82385847 2 --ダイナレスラー・パンクラトプス 82385847 2 --ダイナレスラー・パンクラトプス
09411399 2 --D-HEROディアボリックガイ 09411399 2 --D-HEROディアボリックガイ
62706865 2 --ドラコネット 28297833 2 --ネクロフェイス
10802915 2 --魔界発現世行きデスガイド 10802915 2 --魔界発現世行きデスガイド
41386308 2 --マスマティシャン 41386308 2 --マスマティシャン
43694650 2 --未界域のジャッカロープ 43694650 2 --未界域のジャッカロープ
70711847 2 --未界域のネッシー 70711847 2 --未界域のネッシー
29596581 2 --雷獣龍-サンダー・ドラゴン 29596581 2 --雷獣龍-サンダー・ドラゴン
48686504 2 --ローンファイア・ブロッサム
47325505 2 --化石調査 47325505 2 --化石調査
67723438 2 --緊急テレポート 67723438 2 --緊急テレポート
45305419 2 --継承の印 45305419 2 --継承の印
...@@ -193,7 +191,7 @@ ...@@ -193,7 +191,7 @@
53936268 2 --パーソナル・スプーフィング 53936268 2 --パーソナル・スプーフィング
23002292 2 --レッド・リブート 23002292 2 --レッド・リブート
!2020.4 TCG !2020.6 TCG
#forbidden #forbidden
76794549 0 --Astrograph Sorcerer 76794549 0 --Astrograph Sorcerer
09929398 0 --Blackwing - Gofu the Vague Shadow 09929398 0 --Blackwing - Gofu the Vague Shadow
...@@ -299,7 +297,6 @@ ...@@ -299,7 +297,6 @@
44519536 1 --Left Leg of the Forbidden One 44519536 1 --Left Leg of the Forbidden One
70903634 1 --Right Arm of the Forbidden One 70903634 1 --Right Arm of the Forbidden One
08124921 1 --Right Leg of the Forbidden One 08124921 1 --Right Leg of the Forbidden One
42790071 1 --Altergeist Multifaker
28985331 1 --Armageddon Knight 28985331 1 --Armageddon Knight
61901281 1 --Black Dragon Collapserpent 61901281 1 --Black Dragon Collapserpent
57143342 1 --Cir, Malebranche of the Burning Abyss 57143342 1 --Cir, Malebranche of the Burning Abyss
...@@ -328,10 +325,8 @@ ...@@ -328,10 +325,8 @@
78872731 1 --Zoodiac Ratpier 78872731 1 --Zoodiac Ratpier
45222299 1 --Evigishki Gustkraken 45222299 1 --Evigishki Gustkraken
11877465 1 --Evigishki Mind Augus 11877465 1 --Evigishki Mind Augus
89463537 1 --Nekroz of Unicore
01561110 1 --ABC-Dragon Buster 01561110 1 --ABC-Dragon Buster
39512984 1 --Gem-Knight Master Diamond 39512984 1 --Gem-Knight Master Diamond
48063985 1 --Ritual Beast Ulti-Cannahawk
70583986 1 --Dewloren, Tiger King of the Ice Barrier 70583986 1 --Dewloren, Tiger King of the Ice Barrier
18239909 1 --Ignister Prominence, the Blasting Dracoslayer 18239909 1 --Ignister Prominence, the Blasting Dracoslayer
74586817 1 --PSY-Framelord Omega 74586817 1 --PSY-Framelord Omega
...@@ -392,6 +387,200 @@ ...@@ -392,6 +387,200 @@
10802915 2 --Tour Guide From the Underworld 10802915 2 --Tour Guide From the Underworld
98338152 2 --Sky Striker Mecha - Widow Anchor 98338152 2 --Sky Striker Mecha - Widow Anchor
!2020.4
#forbidden
91869203 0 --アマゾネスの射手
20663556 0 --イレカエル
44910027 0 --ヴィクトリー・ドラゴン
51858306 0 --エクリプス・ワイバーン
25862681 0 --エンシェント・フェアリー・ドラゴン
53804307 0 --焔征竜-ブラスター
07563579 0 --Emヒグルミ
17330916 0 --EMモンキーボード
34945480 0 --外神アザトート
90411554 0 --巌征竜-レドックス
08903700 0 --儀式魔人リリーサー
11384280 0 --キャノン・ソルジャー
17412721 0 --旧神ノーデン
67441435 0 --グローアップ・バルブ
34124316 0 --サイバーポッド
88071625 0 --The tyrant NEPTUNE
61665245 0 --サモン・ソーサレス
85115440 0 --十二獣ブルホーン
59537380 0 --守護竜アガーペイン
86148577 0 --守護竜エルピィ
21377582 0 --真竜剣皇マスターP
94677445 0 --星杯の神子イヴ
16923472 0 --ゼンマイハンター
15341821 0 --ダンディライオン
18326736 0 --星守の騎士 プトレマイオス
79875176 0 --トゥーン・キャノン・ソルジャー
22593417 0 --トポロジック・ガンブラー・ドラゴン
39064822 0 --トロイメア・ゴブリン
03679218 0 --トロイメア・マーメイド
54719828 0 --No.16 色の支配者ショック・ルーラー
58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン
26400609 0 --瀑征竜-タイダル
71525232 0 --破滅竜ガンドラX
05043010 0 --ファイアウォール・ドラゴン
78706415 0 --ファイバーポッド
93369354 0 --フィッシュボーグ-ガンナー
23558733 0 --フェニキシアン・クラスター・アマリリス
09929398 0 --BF-朧影のゴウフウ
09047460 0 --BF-隠れ蓑のスチーム
31178212 0 --マジェスペクター・ユニコーン
34206604 0 --魔導サイエンティスト
04423206 0 --M.X-セイバー インヴォーカー
14702066 0 --メガキャノン・ソルジャー
96782886 0 --メンタルマスター
03078576 0 --八汰烏
34086406 0 --ラヴァルバル・チェイン
57421866 0 --レベル・スティーラー
41482598 0 --悪夢の蜃気楼
44763025 0 --いたずら好きな双子悪魔
17375316 0 --押収
19613556 0 --大嵐
74191942 0 --苦渋の選択
42829885 0 --強引な番兵
45986603 0 --強奪
55144522 0 --強欲な壺
04031928 0 --心変わり
23557835 0 --次元融合
31423101 0 --神剣-フェニックスブレード
57953380 0 --生還の宝札
54447022 0 --ソウル・チャージ
60682203 0 --大寒波
69243953 0 --蝶の短剣-エルマ
79571449 0 --天使の施し
70828912 0 --早すぎた埋葬
42703248 0 --ハリケーン
34906152 0 --マスドライバー
46448938 0 --魔導書の神判
46411259 0 --突然変異
85602018 0 --遺言状
27174286 0 --異次元からの帰還
93016201 0 --王宮の弾圧
03280747 0 --第六感
64697231 0 --ダスト・シュート
80604091 0 --血の代償
35316708 0 --刻の封印
32723153 0 --マジカル・エクスプロージョン
17178486 0 --ライフチェンジャー
28566710 0 --ラストバトル!
#limit
64034255 1 --A・ジェネクス・バードマン
76794549 1 --アストログラフ・マジシャン
01561110 1 --ABC-ドラゴン・バスター
40318957 1 --EMドクロバット・ジョーカー
42790071 1 --オルターガイスト・マルチフェイカー
30741503 1 --オルフェゴール・ガラテア
57835716 1 --オルフェゴール・ディヴェル
99234526 1 --輝白竜 ワイバースター
50588353 1 --水晶機巧-ハリファイバー
12289247 1 --クロノグラフ・マジシャン
49684352 1 --虹彩の魔術師
74586817 1 --PSYフレームロード・Ω
26889158 1 --転生炎獣ガゼル
74997493 1 --鎖龍蛇-スカルデット
77075360 1 --ジャンク・スピーダー
48905153 1 --十二獣ドランシア
78872731 1 --十二獣モルモラット
06602300 1 --重爆撃禽 ボム・フェネクス
28985331 1 --終末の騎士
21593977 1 --処刑人-マキュラ
78080961 1 --SPYRAL-ジーニアス
81275020 1 --SRベイゴマックス
63288573 1 --閃刀姫-カガリ
81122844 1 --発条空母ゼンマイティ
59297550 1 --ゼンマイマジシャン
44335251 1 --魂喰いオヴィラプター
73941492 1 --調弦の魔術師
37818794 1 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ
15291624 1 --超雷龍-サンダー・ドラゴン
90953320 1 --TG ハイパー・ライブラリアン
69015963 1 --デビル・フランケン
75732622 1 --トーチ・ゴーレム
16226786 1 --深淵の暗殺者
28297833 1 --ネクロフェイス
69610326 1 --覇王眷竜ダークヴルム
70583986 1 --氷結界の虎王ドゥローレン
52687916 1 --氷結界の龍トリシューラ
33396948 1 --封印されしエクゾディア
44519536 1 --封印されし者の左足
07902349 1 --封印されし者の左腕
08124921 1 --封印されし者の右足
70903634 1 --封印されし者の右腕
70369116 1 --捕食植物ヴェルテ・アナコンダ
35272499 1 --捕食植物オフリス・スコーピオ
24094258 1 --ヘビーメタルフォーゼ・エレクトラム
33508719 1 --メタモルポット
90809975 1 --餅カエル
83107873 1 --雷鳥龍-サンダー・ドラゴン
89399912 1 --嵐征竜-テンペスト
92746535 1 --竜剣士ラスターP
85243784 1 --リンクロス
88264978 1 --レッドアイズ・ダークネスメタルドラゴン
48686504 1 --ローンファイア・ブロッサム
33782437 1 --一時休戦
01845204 1 --簡易融合
66957584 1 --インフェルニティガン
81439173 1 --おろかな埋葬
73680966 1 --終わりの始まり
23701465 1 --原初の種
12580477 1 --サンダー・ボルト
83764718 1 --死者蘇生
46060017 1 --十二獣の会局
52340444 1 --閃刀機-ホーネットビット
32807846 1 --増援
72892473 1 --手札抹殺
73628505 1 --テラ・フォーミング
13035077 1 --ドラゴニックD
35371948 1 --トリックスター・ライトステージ
18144506 1 --ハーピィの羽根帚
75500286 1 --封印の黄金櫃
07394770 1 --ブリリアント・フュージョン
53208660 1 --ペンデュラム・コール
73468603 1 --盆回し
76375976 1 --魔鍾洞
93600443 1 --マスク・チェンジ・セカンド
15854426 1 --霞の谷の神風
66399653 1 --ユニオン格納庫
06172122 1 --真紅眼融合
27970830 1 --六武の門
05851097 1 --虚無空間
61740673 1 --王宮の勅命
21076084 1 --トリックスター・リンカーネイション
89208725 1 --メタバース
#semi limit
25533642 2 --オルターガイスト・メリュシーク
78868119 2 --深海のディーヴァ
14536035 2 --ダーク・グレファー
82385847 2 --ダイナレスラー・パンクラトプス
09411399 2 --D-HEROディアボリックガイ
62706865 2 --ドラコネット
10802915 2 --魔界発現世行きデスガイド
41386308 2 --マスマティシャン
43694650 2 --未界域のジャッカロープ
70711847 2 --未界域のネッシー
29596581 2 --雷獣龍-サンダー・ドラゴン
47325505 2 --化石調査
67723438 2 --緊急テレポート
45305419 2 --継承の印
52155219 2 --転生炎獣の炎陣
73915051 2 --スケープ・ゴート
54631665 2 --SPYRAL RESORT
37520316 2 --精神操作
98338152 2 --閃刀機-ウィドウアンカー
24010609 2 --閃刀機関-マルチロール
63166095 2 --閃刀起動-エンゲージ
48130397 2 --超融合
11110587 2 --隣の芝刈り
08949584 2 --ヒーローアライブ
01475311 2 --闇の誘惑
02295440 2 --ワン・フォー・ワン
53936268 2 --パーソナル・スプーフィング
23002292 2 --レッド・リブート
!2020.1 !2020.1
#forbidden #forbidden
91869203 0 --アマゾネスの射手 91869203 0 --アマゾネスの射手
...@@ -4332,6 +4521,205 @@ ...@@ -4332,6 +4521,205 @@
53582587 2 --激流葬 53582587 2 --激流葬
29401950 2 --奈落の落とし穴 29401950 2 --奈落の落とし穴
!2020.4 TCG
#forbidden
76794549 0 --Astrograph Sorcerer
09929398 0 --Blackwing - Gofu the Vague Shadow
09047460 0 --Blackwing - Steam the Cloak
53804307 0 --Blaster, Dragon Ruler of Infernos
34124316 0 --Cyber Jar
15341821 0 --Dandylion
05560911 0 --Destrudo the Lost Dragon's Frisson
08903700 0 --Djinn Releaser of Rituals
49684352 0 --Double Iris Magician
51858306 0 --Eclipse Wyvern
55623480 0 --Fairy Tail - Snow
78706415 0 --Fiber Jar
93369354 0 --Fishborg Blaster
67441435 0 --Glow-Up Bulb
75732622 0 --Grinder Golem
57421866 0 --Level Eater
83190280 0 --Lunalight Tiger
34206604 0 --Magical Scientist
31178212 0 --Majespecter Unicorn - Kirin
21593977 0 --Makyura the Destructor
21377582 0 --Master Peace, the True Dracoslaying King
23434538 0 --Maxx "C"
96782886 0 --Mind Master
57835716 0 --Orcust Harp Horror
07563579 0 --Performage Plushfire
17330916 0 --Performapal Monkeyboard
40318957 0 --Performapal Skullcrobat Joker
23558733 0 --Phoenixian Cluster Amaryllis
90411554 0 --Redox, Dragon Ruler of Boulders
05592689 0 --Samsara Lotus
91258852 0 --SPYRAL Master Plan
20663556 0 --Substitoad
88071625 0 --The Tyrant Neptune
26400609 0 --Tidal, Dragon Ruler of Waterfalls
44910027 0 --Victory Dragon
03078576 0 --Yata-Garasu
17412721 0 --Elder Entity Norden
43387895 0 --Supreme King Dragon Starving Venom
15291624 0 --Thunder Dragon Colossus
05043010 0 --Firewall Dragon
59537380 0 --Guardragon Agarpain
24094258 0 --Heavymetalfoes Electrumite
39064822 0 --Knightmare Goblin
03679218 0 --Knightmare Mermaid
61665245 0 --Summon Sorceress
26692769 0 --The Phantom Knights of Rusty Bardiche
22593417 0 --Topologic Gumblar Dragon
25862681 0 --Ancient Fairy Dragon
65536818 0 --Denglong, First of the Yang Zing
94677445 0 --Ib the World Chalice Justiciar
63101919 0 --Tempest Magician
34086406 0 --Lavalval Chain
04423206 0 --M-X-Saber Invoker
54719828 0 --Number 16: Shock Master
10389142 0 --Number 42: Galaxy Tomahawk
63504681 0 --Number 86: Heroic Champion - Rhongomyniad
58820923 0 --Number 95: Galaxy-Eyes Dark Matter Dragon
34945480 0 --Outer Entity Azathot
87327776 0 --Salamangreat Miragestallio
18326736 0 --Tellarknight Ptolemaeus
81122844 0 --Wind-Up Carrier Zenmaity
85115440 0 --Zoodiac Broadbull
07394770 0 --Brilliant Fusion
69243953 0 --Butterfly Dagger - Elma
57953380 0 --Card of Safe Return
04031928 0 --Change of Heart
67616300 0 --Chicken Game
60682203 0 --Cold Wave
17375316 0 --Confiscation
44763025 0 --Delinquent Duo
23557835 0 --Dimension Fusion
42703248 0 --Giant Trunade
79571449 0 --Graceful Charity
18144506 0 --Harpie's Feather Duster
19613556 0 --Heavy Storm
35059553 0 --Kaiser Colosseum
85602018 0 --Last Will
34906152 0 --Mass Driver
46411259 0 --Metamorphosis
41482598 0 --Mirage of Nightmare
74191942 0 --Painful Choice
55144522 0 --Pot of Greed
70828912 0 --Premature Burial
94220427 0 --Rank-Up-Magic Argent Chaos Force
63166095 0 --Sky Striker Mobilize - Engage!
45986603 0 --Snatch Steal
54447022 0 --Soul Charge
46448938 0 --Spellbook of Judgment
11110587 0 --That Grass Looks Greener
42829885 0 --The Forceful Sentry
28566710 0 --Last Turn
27174286 0 --Return from the Different Dimension
93016201 0 --Royal Oppression
57585212 0 --Self-Destruct Button
03280747 0 --Sixth Sense
35316708 0 --Time Seal
64697231 0 --Trap Dustshoot
80604091 0 --Ultimate Offering
05851097 0 --Vanity's Emptiness
#limit
07902349 1 --Left Arm of the Forbidden One
44519536 1 --Left Leg of the Forbidden One
70903634 1 --Right Arm of the Forbidden One
08124921 1 --Right Leg of the Forbidden One
42790071 1 --Altergeist Multifaker
28985331 1 --Armageddon Knight
61901281 1 --Black Dragon Collapserpent
57143342 1 --Cir, Malebranche of the Burning Abyss
69015963 1 --Cyber-Stein
43694650 1 --Danger!? Jackalope?
70711847 1 --Danger! Nessie!
99745551 1 --Danger!? Tsuchinoko?
14536035 1 --Dark Grepher
58984738 1 --Dinomight Knight, the True Dracofighter
82385847 1 --Dinowrestler Pankratops
33396948 1 --Exodia the Forbidden One
64034255 1 --Genex Ally Birdman
20758643 1 --Graff, Malebranche of the Burning Abyss
99177923 1 --Infernity Archfiend
33508719 1 --Morphing Jar
16226786 1 --Night Assailant
12958919 1 --Phantom Skyblaster
88264978 1 --Red-Eyes Darkness Metal Dragon
26889158 1 --Salamangreat Gazelle
92559258 1 --Servant of Endymion
81275020 1 --Speedroid Terrortop
78080961 1 --SPYRAL Quik-Fix
89399912 1 --Tempest, Dragon Ruler of Storms
30539496 1 --True King Lithosagym, the Disaster
99234526 1 --White Dragon Wyverburster
78872731 1 --Zoodiac Ratpier
45222299 1 --Evigishki Gustkraken
11877465 1 --Evigishki Mind Augus
89463537 1 --Nekroz of Unicore
01561110 1 --ABC-Dragon Buster
39512984 1 --Gem-Knight Master Diamond
48063985 1 --Ritual Beast Ulti-Cannahawk
70583986 1 --Dewloren, Tiger King of the Ice Barrier
18239909 1 --Ignister Prominence, the Blasting Dracoslayer
74586817 1 --PSY-Framelord Omega
90953320 1 --T.G. Hyper Librarian
52687916 1 --Trishula, Dragon of the Ice Barrier
27552504 1 --Beatrice, Lady of the Eternal
00581014 1 --Daigusto Emeral
90809975 1 --Toadally Awesome
48905153 1 --Zoodiac Drident
08949584 1 --A Hero Lives
72892473 1 --Card Destruction
59750328 1 --Card of Demise
91623717 1 --Chain Strike
81674782 1 --Dimensional Fissure
15854426 1 --Divine Wind of Mist Valley
14733538 1 --Draco Face-Off
13035077 1 --Dragonic Diagram
67723438 1 --Emergency Teleport
95308449 1 --Final Countdown
81439173 1 --Foolish Burial
27970830 1 --Gateway of the Six
75500286 1 --Gold Sarcophagus
66957584 1 --Infernity Launcher
01845204 1 --Instant Fusion
93946239 1 --Into the Void
71650854 1 --Magical Mid-Breaker Field
37520316 1 --Mind Control
83764718 1 --Monster Reborn
33782437 1 --One Day of Peace
02295440 1 --One for One
22842126 1 --Pantheism of the Monarchs
12580477 1 --Raigeki
58577036 1 --Reasoning
32807846 1 --Reinforcement of the Army
52155219 1 --Salamangreat Circle
73915051 1 --Scapegoat
24940422 1 --Sekka's Light
73468603 1 --Set Rotation
52340444 1 --Sky Striker Mecha - Hornet Drones
24010609 1 --Sky Striker Mecha Modules - Multirole
71344451 1 --Slash Draw
54631665 1 --SPYRAL Resort
45305419 1 --Symbol of Heritage
73628505 1 --Terraforming
35371948 1 --Trickstar Light Stage
70368879 1 --Upstart Goblin
46060017 1 --Zoodiac Barrage
61740673 1 --Imperial Order
30241314 1 --Macro Cosmos
32723153 1 --Magical Explosion
89208725 1 --Metaverse
23002292 1 --Red Reboot
82732705 1 --Skill Drain
35125879 1 --True King's Return
17078030 1 --Wall of Revealing Light
#semi limit
09411399 2 --Destiny HERO - Malicious
10802915 2 --Tour Guide From the Underworld
98338152 2 --Sky Striker Mecha - Widow Anchor
!2020.1 TCG !2020.1 TCG
#forbidden #forbidden
76794549 0 --Astrograph Sorcerer 76794549 0 --Astrograph Sorcerer
......
...@@ -334,6 +334,7 @@ ...@@ -334,6 +334,7 @@
!system 1284 !system 1284
!system 1285 !system 1285
!system 1286 特大 !system 1286 特大
!system 1287 只有连锁1也显示连锁动画
!system 1290 禁用聊天功能 !system 1290 禁用聊天功能
!system 1291 忽略观战者发言 !system 1291 忽略观战者发言
!system 1292 忽略时点 !system 1292 忽略时点
...@@ -456,6 +457,10 @@ ...@@ -456,6 +457,10 @@
!system 1429 选择的位置不符合条件。 !system 1429 选择的位置不符合条件。
!system 1430 选择的表示形式不符合条件。 !system 1430 选择的表示形式不符合条件。
!system 1431 选择的指示物不符合条件。 !system 1431 选择的指示物不符合条件。
!system 1440 关闭大图
!system 1441 放大
!system 1442 缩小
!system 1443 原始尺寸
!system 1450 卡包展示 !system 1450 卡包展示
!system 1451 人机卡组 !system 1451 人机卡组
!system 1452 未分类卡组 !system 1452 未分类卡组
...@@ -648,6 +653,7 @@ ...@@ -648,6 +653,7 @@
!setname 0x12 青蛙 ガエル !setname 0x12 青蛙 ガエル
!setname 0x13 机皇 機皇 !setname 0x13 机皇 機皇
!setname 0x3013 机皇帝 機皇帝 !setname 0x3013 机皇帝 機皇帝
!setname 0x5013 机皇神 機皇神
!setname 0x6013 机皇兵 機皇兵 !setname 0x6013 机皇兵 機皇兵
#setname 0x14 N/A #setname 0x14 N/A
!setname 0x15 巨大战舰 巨大戦艦 !setname 0x15 巨大战舰 巨大戦艦
...@@ -876,7 +882,8 @@ ...@@ -876,7 +882,8 @@
!setname 0xbd 暗黑骑士 盖亚 暗黒騎士ガイア !setname 0xbd 暗黑骑士 盖亚 暗黒騎士ガイア
!setname 0xbe 帝王 帝王 !setname 0xbe 帝王 帝王
!setname 0xbf 灵使 霊使い !setname 0xbf 灵使 霊使い
!setname 0xc0 凭依装着 憑依装着 !setname 0xc0 凭依 憑依
!setname 0x10c0 凭依装着 憑依装着
!setname 0xc1 PSY骨架 PSYフレーム !setname 0xc1 PSY骨架 PSYフレーム
!setname 0x10c1 PSY骨架装备 PSYフレームギア !setname 0x10c1 PSY骨架装备 PSYフレームギア
!setname 0xc2 动力工具 パワー・ツール !setname 0xc2 动力工具 パワー・ツール
...@@ -1034,3 +1041,14 @@ ...@@ -1034,3 +1041,14 @@
!setname 0x146 童话动物 メルフィー !setname 0x146 童话动物 メルフィー
!setname 0x147 波波 ポータン !setname 0x147 波波 ポータン
!setname 0x148 罗兰 ローラン !setname 0x148 罗兰 ローラン
!setname 0x149 化石
!setname 0x14a 源数 ヌメロン
!setname 0x114a 源数之门 ゲート・オブ・ヌメロン
!setname 0x14b 机块 機塊
#setname 0x14c 灵术 霊術
!setname 0x314c 地灵术 地霊術
#setname 0x514c 水灵术 水霊術
!setname 0x614c 火灵术 火霊術
#setname 0x914c 风灵术 風霊術
#setname 0xa14c 光灵术 光霊術
#setname 0xc14c 暗灵术 闇霊術
#config file #config file
#nickname & gamename should be less than 20 characters #nickname & gamename should be less than 20 characters
use_d3d = 0 use_d3d = 0
use_image_scale = 1 use_image_scale = 1
antialias = 2 antialias = 2
errorlog = 3 errorlog = 3
nickname = Player nickname = Player
gamename = Game gamename = Game
lastdeck = new lastdeck = new
textfont = c:/windows/fonts/simsun.ttc 14 textfont = c:/windows/fonts/simsun.ttc 14
numfont = c:/windows/fonts/arialbd.ttf numfont = c:/windows/fonts/arialbd.ttf
serverport = 7911 serverport = 7911
lasthost = 127.0.0.1 lasthost = 127.0.0.1
lastport = 7911 lastport = 7911
automonsterpos = 0 automonsterpos = 0
autospellpos = 0 autospellpos = 0
randompos = 0 randompos = 0
autochain = 0 autochain = 0
waitchain = 0 waitchain = 0
mute_opponent = 0 mute_opponent = 0
mute_spectators = 0 mute_spectators = 0
default_rule = 0 default_rule = 0
hide_setname = 0 hide_setname = 0
hide_hint_button = 0 hide_hint_button = 0
#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons #control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
control_mode = 0 control_mode = 0
draw_field_spell = 1 draw_field_spell = 1
separate_clear_button = 1 separate_clear_button = 1
#auto_search_limit >= 0: Start search automatically when the user enters N chars #auto_search_limit >= 0: Start search automatically when the user enters N chars
auto_search_limit = -1 auto_search_limit = -1
ignore_deck_changes = 0 #search_multiple_keywords = 0: Disable. 1: Search mutiple keywords with separator " ". 2: with separator "+"
default_ot = 1 search_multiple_keywords = 1
enable_bot_mode = 0 ignore_deck_changes = 0
enable_sound = 1 default_ot = 1
enable_music = 1 enable_bot_mode = 0
#Volume of sound and music, between 0 and 100 quick_animation = 0
sound_volume = 50 auto_save_replay = 0
music_volume = 50 draw_single_chain = 0
music_mode = 1 prefer_expansion_script = 0
window_maximized = 0
window_width = 1280
window_height = 800
resize_popup_menu = 0
enable_sound = 1
enable_music = 1
#Volume of sound and music, between 0 and 100
sound_volume = 50
music_volume = 50
music_mode = 1
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