Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Fluorohydride/ygopro
Browse files Browse the repository at this point in the history
  • Loading branch information
mercury233 committed Dec 5, 2016
2 parents bbf3bca + 89f030d commit 12bb313
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 13 deletions.
7 changes: 5 additions & 2 deletions gframe/data_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,12 @@ const wchar_t* DataManager::GetSetName(int code) {
return csit->second;
}
unsigned int DataManager::GetSetCode(const wchar_t* setname) {
for(auto csit = _setnameStrings.begin(); csit != _setnameStrings.end(); ++csit)
if(wcscmp(csit->second, setname) == 0)
wchar_t strbuff[256];
for(auto csit = _setnameStrings.begin(); csit != _setnameStrings.end(); ++csit) {
swscanf(csit->second, L"%[^|]", strbuff);//setname|extra info
if(wcscmp(strbuff, setname) == 0)
return csit->first;
}
return 0;
}
const wchar_t* DataManager::GetNumString(int num, bool bracket) {
Expand Down
10 changes: 5 additions & 5 deletions gframe/deck_con.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,8 @@ void DeckBuilder::FilterCards() {
unsigned int set_code = 0;
if(pstr[0] == L'@')
set_code = dataManager.GetSetCode(&pstr[1]);
else
set_code = dataManager.GetSetCode(&pstr[0]);
if(pstr[0] == 0 || (pstr[0] == L'$' && pstr[1] == 0) || (pstr[0] == L'@' && pstr[1] == 0))
pstr = 0;
auto strpointer = dataManager._strings.begin();
Expand Down Expand Up @@ -854,11 +856,9 @@ void DeckBuilder::FilterCards() {
} else if(pstr[0] == L'@' && set_code) {
if(!check_set_code(data, set_code)) continue;
} else {
if(wcsstr(text.name, pstr) == 0 && wcsstr(text.text, pstr) == 0) {
set_code = dataManager.GetSetCode(&pstr[0]);
if(!set_code || !check_set_code(data, set_code))
continue;
}
if(wcsstr(text.name, pstr) == 0 && wcsstr(text.text, pstr) == 0
&& (!set_code || !check_set_code(data, set_code)))
continue;
}
}
results.push_back(ptr);
Expand Down
10 changes: 10 additions & 0 deletions gframe/drawing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,16 @@ void Game::DrawThumb(code_pointer cp, position2di pos, std::unordered_map<int, i
break;
}
}
if(mainGame->cbLimit->getSelected() >= 4) {
switch(cp->second.ot) {
case 1:
driver->draw2DImage(imageManager.tOT, recti(pos.X + 7, pos.Y + 50, pos.X + 37, pos.Y + 65), recti(0, 0, 128, 64), 0, 0, true);
break;
case 2:
driver->draw2DImage(imageManager.tOT, recti(pos.X + 7, pos.Y + 50, pos.X + 37, pos.Y + 65), recti(0, 64, 128, 128), 0, 0, true);
break;
}
}
}
void Game::DrawDeckBd() {
wchar_t textBuffer[64];
Expand Down
9 changes: 9 additions & 0 deletions gframe/duelclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,15 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->gMutex.Lock();
mainGame->stHostPrepDuelist[pkt->pos]->setText(name);
mainGame->gMutex.Unlock();
#ifdef _WIN32
FLASHWINFO fi;
fi.cbSize = sizeof(FLASHWINFO);
fi.hwnd = mainGame->hWnd;
fi.dwFlags = FLASHW_TRAY | FLASHW_TIMERNOFG;
fi.uCount = 0;
fi.dwTimeout = 0;
FlashWindowEx(&fi);
#endif
break;
}
case STOC_HS_PLAYER_CHANGE: {
Expand Down
1 change: 0 additions & 1 deletion gframe/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ bool Game::Initialize() {
HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL);
HICON hSmallIcon = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(1), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
HICON hBigIcon = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(1), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR);
HWND hWnd;
irr::video::SExposedVideoData exposedData = driver->getExposedVideoData();
if(gameConf.use_d3d)
hWnd = reinterpret_cast<HWND>(exposedData.D3D9.HWnd);
Expand Down
5 changes: 5 additions & 0 deletions gframe/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ class Game {
irr::video::IVideoDriver* driver;
irr::scene::ISceneManager* smgr;
irr::scene::ICameraSceneNode* camera;

#ifdef _WIN32
HWND hWnd;
#endif

//GUI
irr::gui::IGUIEnvironment* env;
irr::gui::CGUITTFont* guiFont;
Expand Down
1 change: 1 addition & 0 deletions gframe/image_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ bool ImageManager::Initial() {
tEquip = driver->getTexture("textures/equip.png");
tTarget = driver->getTexture("textures/target.png");
tLim = driver->getTexture("textures/lim.png");
tOT = driver->getTexture("textures/ot.png");
tHand[0] = driver->getTexture("textures/f1.jpg");
tHand[1] = driver->getTexture("textures/f2.jpg");
tHand[2] = driver->getTexture("textures/f3.jpg");
Expand Down
1 change: 1 addition & 0 deletions gframe/image_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class ImageManager {
irr::video::ITexture* tEquip;
irr::video::ITexture* tTarget;
irr::video::ITexture* tLim;
irr::video::ITexture* tOT;
irr::video::ITexture* tHand[3];
irr::video::ITexture* tBackGround;
irr::video::ITexture* tBackGround_menu;
Expand Down
2 changes: 1 addition & 1 deletion ocgcore
2 changes: 1 addition & 1 deletion script
Submodule script updated 160 files
12 changes: 9 additions & 3 deletions strings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
!system 63 里效果适用中
!system 64 二重状态
!system 65 使用效果
!system 66 持续公开
!system 70 怪兽卡
!system 71 魔法卡
!system 72 陷阱卡
Expand Down Expand Up @@ -566,7 +567,7 @@
!setname 0x43 废品 ジャンク
!setname 0x44 代行者
!setname 0x45 恶魔 デーモン
!setname 0x1045 红莲魔 レッド・デーモン
!setname 0x1045 红莲魔|恶魔 レッド・デーモン
!setname 0x46 融合 融合/フュージョン
!setname 0x47 宝石 ジェム
!setname 0x1047 宝石骑士 ジェムナイト
Expand Down Expand Up @@ -675,10 +676,11 @@
!setname 0x98 魔术师 魔術師
!setname 0x99 异色眼 オッドアイズ
!setname 0x9a 超重武者
!setname 0x109a 超重武者装留
!setname 0x9b 幻奏
!setname 0x109b 幻奏的音姬 幻奏の音姫
!setname 0x9c 星守 テラナイト
!setname 0x109c 星辉士 ステラナイト
!setname 0x109c 星辉士|星守 ステラナイト
!setname 0x9d 影依 シャドール
!setname 0x9e 龙星 竜星
!setname 0x9f 娱乐伙伴 EM(エンタメイト)
Expand Down Expand Up @@ -770,7 +772,7 @@
!setname 0xe7 沉默剑士 サイレント・ソードマン
!setname 0xe8 沉默魔术师 サイレント・マジシャン
!setname 0xe9 磁石战士 磁石の戦士(じしゃくのせんし)
!setname 0xea 水晶机巧 クリストロン
!setname 0xea 水晶机巧|非「机巧」 クリストロン
!setname 0xeb 化合兽 化合獣
#!setname 0xec 魔界 魔界
!setname 0x10ec 魔界剧团 魔界劇団
Expand All @@ -779,7 +781,11 @@
!setname 0x10ed 地底恐魔 巨魔 Subterror Behemoth
!setname 0xee 秘旋谍 SPYRAL
!setname 0x10ee 秘旋谍装备 SPYRAL GEAR
!setname 0x20ee 秘旋谍任务 SPYRAL MISSION
!setname 0xef 堕天使
!setname 0xf0 风魔女 WW(ウィンド・ウィッチ)
!setname 0xf1 十二兽 十二獣
!setname 0xf2 灵摆龙 ペンデュラム・ドラゴン
!setname 0xf3 捕食 プレデター
!setname 0x10f3 捕食植物
!setname 0xf4 召唤兽 召喚獣
Binary file added textures/ot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 12bb313

Please sign in to comment.