Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wyykak
ygopro
Commits
c6c9201d
Commit
c6c9201d
authored
Dec 12, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro
into server
parents
e55ffcda
2be3deae
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
70 additions
and
21 deletions
+70
-21
gframe/data_manager.cpp
gframe/data_manager.cpp
+5
-2
gframe/deck_con.cpp
gframe/deck_con.cpp
+5
-5
gframe/drawing.cpp
gframe/drawing.cpp
+10
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+1
-0
gframe/event_handler.cpp
gframe/event_handler.cpp
+4
-0
gframe/game.cpp
gframe/game.cpp
+21
-6
gframe/game.h
gframe/game.h
+10
-2
gframe/image_manager.cpp
gframe/image_manager.cpp
+1
-0
gframe/image_manager.h
gframe/image_manager.h
+1
-0
ocgcore
ocgcore
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+10
-4
textures/ot.png
textures/ot.png
+0
-0
No files found.
gframe/data_manager.cpp
View file @
c6c9201d
...
...
@@ -195,9 +195,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
)
{
...
...
gframe/deck_con.cpp
View file @
c6c9201d
...
...
@@ -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
();
...
...
@@ -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
);
...
...
gframe/drawing.cpp
View file @
c6c9201d
...
...
@@ -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
];
...
...
gframe/duelclient.cpp
View file @
c6c9201d
...
...
@@ -641,6 +641,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
stHostPrepDuelist
[
pkt
->
pos
]
->
setText
(
name
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
FlashWindow
();
break
;
}
case
STOC_HS_PLAYER_CHANGE
:
{
...
...
gframe/event_handler.cpp
View file @
c6c9201d
...
...
@@ -835,6 +835,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
}
else
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_CHAIN
&&
!
chain_forced
)
ShowCancelOrFinishButton
(
1
);
break
;
}
break
;
...
...
@@ -1482,6 +1484,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
irr
:
:
EMIE_RMOUSE_LEFT_UP
:
{
if
(
mainGame
->
dInfo
.
isReplay
)
break
;
if
(
event
.
MouseInput
.
isLeftPressed
())
break
;
s32
x
=
event
.
MouseInput
.
X
;
s32
y
=
event
.
MouseInput
.
Y
;
irr
::
core
::
position2di
pos
(
x
,
y
);
...
...
gframe/game.cpp
View file @
c6c9201d
...
...
@@ -119,18 +119,13 @@ bool Game::Initialize() {
device->setWindowCaption(L"YGOPro");
device->setResizable(false);
#ifdef _WIN32
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);
else
hWnd = reinterpret_cast<HWND>(exposedData.OpenGLWin32.HWnd);
SendMessage(hWnd, WM_SETICON, ICON_SMALL, (long)hSmallIcon);
SendMessage(hWnd, WM_SETICON, ICON_BIG, (long)hBigIcon);
#endif
SetWindowsIcon();
//main menu
wchar_t strbuf[256];
myswprintf(strbuf, L"YGOPro Version:%X.0%X.%X", PRO_VERSION >> 12, (PRO_VERSION >> 4) & 0xff, PRO_VERSION & 0xf);
...
...
@@ -1209,5 +1204,25 @@ int Game::LocalPlayer(int player) {
const
wchar_t
*
Game
::
LocalName
(
int
local_player
)
{
return
local_player
==
0
?
dInfo
.
hostname
:
dInfo
.
clientname
;
}
void
Game
::
SetWindowsIcon
()
{
#ifdef _WIN32
HINSTANCE
hInstance
=
(
HINSTANCE
)
GetModuleHandleW
(
NULL
);
HICON
hSmallIcon
=
(
HICON
)
LoadImageW
(
hInstance
,
MAKEINTRESOURCEW
(
1
),
IMAGE_ICON
,
16
,
16
,
LR_DEFAULTCOLOR
);
HICON
hBigIcon
=
(
HICON
)
LoadImageW
(
hInstance
,
MAKEINTRESOURCEW
(
1
),
IMAGE_ICON
,
32
,
32
,
LR_DEFAULTCOLOR
);
SendMessageW
(
hWnd
,
WM_SETICON
,
ICON_SMALL
,
(
long
)
hSmallIcon
);
SendMessageW
(
hWnd
,
WM_SETICON
,
ICON_BIG
,
(
long
)
hBigIcon
);
#endif
}
void
Game
::
FlashWindow
()
{
#ifdef _WIN32
FLASHWINFO
fi
;
fi
.
cbSize
=
sizeof
(
FLASHWINFO
);
fi
.
hwnd
=
hWnd
;
fi
.
dwFlags
=
FLASHW_TRAY
|
FLASHW_TIMERNOFG
;
fi
.
uCount
=
0
;
fi
.
dwTimeout
=
0
;
FlashWindowEx
(
&
fi
);
#endif
}
}
gframe/game.h
View file @
c6c9201d
...
...
@@ -116,8 +116,11 @@ public:
//irr::gui::IGUIElement* focus = env->getFocus();
return focus && focus->hasType(type);
}
*/
void SetWindowsIcon();
void FlashWindow();
*/
Mutex
gMutex
;
Mutex
gBuffer
;
Signal
frameSignal
;
...
...
@@ -171,6 +174,11 @@ public:
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;
...
...
gframe/image_manager.cpp
View file @
c6c9201d
...
...
@@ -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"
);
...
...
gframe/image_manager.h
View file @
c6c9201d
...
...
@@ -35,6 +35,7 @@ public:
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
;
...
...
ocgcore
@
96bbbedb
Subproject commit
0b4aef4a7a6e15ea65929ac9a0f87701ccc6cca4
Subproject commit
96bbbedb6e828f4a227cf5405ed8e284b0def2cc
script
@
5485784e
Subproject commit
ee84f2441724d935357fb2ff451cc2ed6c5c35d7
Subproject commit
5485784eac297306878f20f2c6cd4a0a51698653
strings.conf
View file @
c6c9201d
...
...
@@ -35,6 +35,7 @@
!
system
63
里效果适用中
!
system
64
二重状态
!
system
65
使用效果
!
system
66
持续公开
!
system
70
怪兽卡
!
system
71
魔法卡
!
system
72
陷阱卡
...
...
@@ -450,7 +451,7 @@
!
counter
0
x1021
守卫指示物
!
counter
0
x22
龙神指示物
!
counter
0
x23
海洋指示物
!
counter
0
x1024
弦
指示物
!
counter
0
x1024
线
指示物
!
counter
0
x25
年代记指示物
!
counter
0
x26
指示物(金属射手)
!
counter
0
x27
指示物(死亡蚊)
...
...
@@ -566,7 +567,7 @@
!
setname
0
x43
废品 ジャンク
!
setname
0
x44
代行者
!
setname
0
x45
恶魔 デーモン
!
setname
0
x1045
红莲魔 レッド・デーモン
!
setname
0
x1045
红莲魔
|恶魔
レッド・デーモン
!
setname
0
x46
融合 融合/フュージョン
!
setname
0
x47
宝石 ジェム
!
setname
0
x1047
宝石骑士 ジェムナイト
...
...
@@ -675,10 +676,11 @@
!
setname
0
x98
魔术师 魔術師
!
setname
0
x99
异色眼 オッドアイズ
!
setname
0
x9a
超重武者
!
setname
0
x109a
超重武者装留
!
setname
0
x9b
幻奏
!
setname
0
x109b
幻奏的音姬 幻奏の音姫
!
setname
0
x9c
星守 テラナイト
!
setname
0
x109c
星辉士 ステラナイト
!
setname
0
x109c
星辉士
|星守
ステラナイト
!
setname
0
x9d
影依 シャドール
!
setname
0
x9e
龙星 竜星
!
setname
0
x9f
娱乐伙伴
EM
(エンタメイト)
...
...
@@ -770,7 +772,7 @@
!
setname
0
xe7
沉默剑士 サイレント・ソードマン
!
setname
0
xe8
沉默魔术师 サイレント・マジシャン
!
setname
0
xe9
磁石战士 磁石の戦士(じしゃくのせんし)
!
setname
0
xea
水晶机巧 クリストロン
!
setname
0
xea
水晶机巧
|非「机巧」
クリストロン
!
setname
0
xeb
化合兽 化合獣
#!setname 0xec 魔界 魔界
!
setname
0
x10ec
魔界剧团 魔界劇団
...
...
@@ -779,7 +781,11 @@
!
setname
0
x10ed
地底恐魔 巨魔
Subterror
Behemoth
!
setname
0
xee
秘旋谍
SPYRAL
!
setname
0
x10ee
秘旋谍装备
SPYRAL
GEAR
!
setname
0
x20ee
秘旋谍任务
SPYRAL
MISSION
!
setname
0
xef
堕天使
!
setname
0
xf0
风魔女
WW
(ウィンド・ウィッチ)
!
setname
0
xf1
十二兽 十二獣
!
setname
0
xf2
灵摆龙 ペンデュラム・ドラゴン
!
setname
0
xf3
捕食 プレデター
!
setname
0
x10f3
捕食植物
!
setname
0
xf4
召唤兽 召喚獣
textures/ot.png
0 → 100644
View file @
c6c9201d
18.2 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment