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
REIKAI
ygopro
Commits
9706dc8f
Commit
9706dc8f
authored
May 19, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into diff
parents
a10fec6a
4660639d
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
360 additions
and
81 deletions
+360
-81
.gitignore
.gitignore
+1
-0
.travis.yml
.travis.yml
+7
-5
appveyor.yml
appveyor.yml
+2
-1
cards.cdb
cards.cdb
+0
-0
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+5
-3
gframe/drawing.cpp
gframe/drawing.cpp
+13
-13
gframe/event_handler.cpp
gframe/event_handler.cpp
+9
-2
gframe/game.cpp
gframe/game.cpp
+126
-41
gframe/game.h
gframe/game.h
+3
-0
lflist.conf
lflist.conf
+190
-13
ocgcore
ocgcore
+1
-1
premake5.lua
premake5.lua
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+1
-0
No files found.
.gitignore
View file @
9706dc8f
...
...
@@ -53,6 +53,7 @@
/fonts
/replay
/single
/screenshots
/sound/*.wav
/sound/custom
/sound/BGM
...
...
.travis.yml
View file @
9706dc8f
...
...
@@ -103,17 +103,19 @@ before_deploy:
-
rm -rf pics/thumbnail pics/*.db
-
mkdir replay
-
mkdir screenshots
-
git clone --depth=1 https://$NANAHIRA@github.com/purerosefallen/fonts
-
sed -i "s/c:\/windows/./g" system.conf
-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-$TRAVIS_TAG.zip ygopro libirrKlang.so LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay;
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-with-sound-$TRAVIS_TAG.zip ygopro libirrKlang.so LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay sound;
sed -i "s/c:\/windows/./g" ./system.conf;
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-$TRAVIS_TAG.zip ygopro libirrKlang.so LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay screenshots;
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-with-sound-$TRAVIS_TAG.zip ygopro libirrKlang.so LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay sound screenshots;
fi
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-$TRAVIS_TAG.zip ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay;
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-with-sound-$TRAVIS_TAG.zip ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay sound;
sed -i "" "s/c:\/windows/./g" ./system.conf;
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-$TRAVIS_TAG.zip ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay screenshots;
zip -q -r KoishiPro-$TRAVIS_OS_NAME-full-with-sound-$TRAVIS_TAG.zip ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures fonts skin deck single pics replay screenshots sound;
fi
deploy
:
...
...
appveyor.yml
View file @
9706dc8f
...
...
@@ -86,8 +86,9 @@ after_build:
-
rm -rf pics/thumbnail pics/*.db
-
mkdir replay
-
mkdir screenshots
-
7z a -mx9 -xr!.git* KoishiPro-%APPVEYOR_REPO_TAG_NAME%.7z ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures skin deck single pics update-koishipro replay WindBot Bot.exe bot.conf
-
7z a -mx9 -xr!.git* KoishiPro-%APPVEYOR_REPO_TAG_NAME%.7z ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures skin deck single pics update-koishipro replay
screenshots
WindBot Bot.exe bot.conf
-
cp -rf KoishiPro-%APPVEYOR_REPO_TAG_NAME%.7z KoishiPro-with-sound-%APPVEYOR_REPO_TAG_NAME%.7z
-
7z a -mx9 -xr!.git* KoishiPro-with-sound-%APPVEYOR_REPO_TAG_NAME%.7z sound
...
...
cards.cdb
View file @
9706dc8f
No preview for this file type
gframe/deck_manager.cpp
View file @
9706dc8f
...
...
@@ -314,17 +314,19 @@ bool DeckManager::DeleteDeck(Deck& deck, const wchar_t* name) {
#endif
}
const
wchar_t
*
DeckManager
::
GetMainFormatString
()
{
myswprintf
(
DeckFormatBuffer
,
L"%d (
%d / %d /
%d )"
,
deckManager
.
current_deck
.
main
.
size
(),
GetTypeCount
(
deckManager
.
current_deck
.
main
,
TYPE_MONSTER
),
GetTypeCount
(
deckManager
.
current_deck
.
main
,
TYPE_SPELL
),
GetTypeCount
(
deckManager
.
current_deck
.
main
,
TYPE_TRAP
));
myswprintf
(
DeckFormatBuffer
,
L"%d (
Monster: %d / Spell: %d / Trap:
%d )"
,
deckManager
.
current_deck
.
main
.
size
(),
GetTypeCount
(
deckManager
.
current_deck
.
main
,
TYPE_MONSTER
),
GetTypeCount
(
deckManager
.
current_deck
.
main
,
TYPE_SPELL
),
GetTypeCount
(
deckManager
.
current_deck
.
main
,
TYPE_TRAP
));
wchar_t
*
result
=
DeckFormatBuffer
;
return
result
;
}
const
wchar_t
*
DeckManager
::
GetExtraFormatString
()
{
myswprintf
(
DeckFormatBuffer
,
L"%d (
%d / %d / %d /
%d )"
,
deckManager
.
current_deck
.
extra
.
size
(),
GetTypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_FUSION
),
GetTypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_SYNCHRO
),
GetTypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_XYZ
),
GetTypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_LINK
));
myswprintf
(
DeckFormatBuffer
,
L"%d (
Fusion: %d / Synchro: %d / Xyz: %d / Link:
%d )"
,
deckManager
.
current_deck
.
extra
.
size
(),
GetTypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_FUSION
),
GetTypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_SYNCHRO
),
GetTypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_XYZ
),
GetTypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_LINK
));
wchar_t
*
result
=
DeckFormatBuffer
;
return
result
;
}
const
wchar_t
*
DeckManager
::
GetSideFormatString
()
{
myswprintf
(
DeckFormatBuffer
,
L"%d ( %d / %d / %d / %d )"
,
deckManager
.
current_deck
.
side
.
size
(),
GetTypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_MONSTER
),
GetTypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_SPELL
),
GetTypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_TRAP
),
GetTypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
));
int
mc
=
GetTypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_MONSTER
);
int
ec
=
GetTypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
);
myswprintf
(
DeckFormatBuffer
,
L"%d ( Monster: %d / Spell: %d / Trap: %d / Extra: %d )"
,
deckManager
.
current_deck
.
side
.
size
(),
mc
-
ec
,
GetTypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_SPELL
),
GetTypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_TRAP
),
ec
);
wchar_t
*
result
=
DeckFormatBuffer
;
return
result
;
}
...
...
gframe/drawing.cpp
View file @
9706dc8f
...
...
@@ -932,7 +932,7 @@ void Game::DrawSpec() {
DrawShadowText
(
lpcFont
,
lstr
,
ResizeElem
(
650
-
pos
.
Width
/
2
,
290
,
950
,
370
),
Resize
(
-
1
,
-
1
,
0
,
0
),
0xffffffff
);
if
(
dInfo
.
vic_string
&&
(
showcardcode
==
1
||
showcardcode
==
2
))
{
driver
->
draw2DRectangle
(
0xa0000000
,
ResizeElem
(
540
,
320
,
800
,
340
));
DrawShadowText
(
text
Font
,
dInfo
.
vic_string
,
ResizeElem
(
500
,
320
,
840
,
340
),
Resize
(
-
2
,
-
1
,
0
,
0
),
0xffffffff
,
0xff000000
,
true
,
true
,
0
);
DrawShadowText
(
gui
Font
,
dInfo
.
vic_string
,
ResizeElem
(
500
,
320
,
840
,
340
),
Resize
(
-
2
,
-
1
,
0
,
0
),
0xffffffff
,
0xff000000
,
true
,
true
,
0
);
}
}
else
if
(
showcardp
<
showcarddif
+
10
)
{
int
alpha
=
((
showcarddif
+
10
-
showcardp
)
*
25
)
<<
24
;
...
...
@@ -971,7 +971,7 @@ void Game::DrawSpec() {
continue
;
if
(
!
showChat
&&
i
>
2
)
continue
;
int
w
=
text
Font
->
getDimension
(
chatMsg
[
i
].
c_str
()).
Width
;
int
w
=
gui
Font
->
getDimension
(
chatMsg
[
i
].
c_str
()).
Width
;
recti
rectloc
(
mainGame
->
wChat
->
getRelativePosition
().
UpperLeftCorner
.
X
,
mainGame
->
window_size
.
Height
-
45
,
mainGame
->
wChat
->
getRelativePosition
().
UpperLeftCorner
.
X
+
2
+
w
,
mainGame
->
window_size
.
Height
-
25
);
rectloc
-=
position2di
(
0
,
i
*
20
);
...
...
@@ -980,8 +980,8 @@ void Game::DrawSpec() {
recti
shadowloc
=
msgloc
+
position2di
(
1
,
1
);
driver
->
draw2DRectangle
(
rectloc
,
0xa0000000
,
0xa0000000
,
0xa0000000
,
0xa0000000
);
text
Font
->
draw
(
chatMsg
[
i
].
c_str
(),
msgloc
,
0xff000000
,
false
,
false
);
text
Font
->
draw
(
chatMsg
[
i
].
c_str
(),
shadowloc
,
chatColor
[
chatType
[
i
]],
false
,
false
);
gui
Font
->
draw
(
chatMsg
[
i
].
c_str
(),
msgloc
,
0xff000000
,
false
,
false
);
gui
Font
->
draw
(
chatMsg
[
i
].
c_str
(),
shadowloc
,
chatColor
[
chatType
[
i
]],
false
,
false
);
}
}
}
...
...
@@ -1126,10 +1126,10 @@ void Game::DrawThumb(code_pointer cp, position2di pos, std::unordered_map<int, i
void
Game
::
DrawDeckBd
()
{
wchar_t
textBuffer
[
64
];
//main deck
driver
->
draw2DRectangle
(
Resize
(
310
,
137
,
510
,
157
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
136
,
510
,
157
));
driver
->
draw2DRectangle
(
Resize
(
310
,
137
,
797
,
157
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
136
,
797
,
157
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
1330
),
Resize
(
315
,
137
,
510
,
157
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
deckManager
.
GetMainFormatString
(),
Resize
(
380
,
138
,
540
,
158
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
deckManager
.
GetMainFormatString
(),
Resize
(
380
,
138
,
797
,
158
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
driver
->
draw2DRectangle
(
Resize
(
310
,
160
,
797
,
436
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
159
,
797
,
436
));
int
lx
;
...
...
@@ -1147,10 +1147,10 @@ void Game::DrawDeckBd() {
driver
->
draw2DRectangleOutline
(
Resize
(
313
+
(
i
%
lx
)
*
dx
,
163
+
(
i
/
lx
)
*
68
,
359
+
(
i
%
lx
)
*
dx
,
228
+
(
i
/
lx
)
*
68
));
}
//extra deck
driver
->
draw2DRectangle
(
Resize
(
310
,
440
,
510
,
460
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
439
,
510
,
460
));
driver
->
draw2DRectangle
(
Resize
(
310
,
440
,
797
,
460
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
439
,
797
,
460
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
1331
),
Resize
(
315
,
440
,
510
,
460
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
deckManager
.
GetExtraFormatString
(),
Resize
(
380
,
441
,
540
,
461
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
deckManager
.
GetExtraFormatString
(),
Resize
(
380
,
441
,
797
,
461
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
driver
->
draw2DRectangle
(
Resize
(
310
,
463
,
797
,
533
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
462
,
797
,
533
));
if
(
deckManager
.
current_deck
.
extra
.
size
()
<=
10
)
...
...
@@ -1162,10 +1162,10 @@ void Game::DrawDeckBd() {
driver
->
draw2DRectangleOutline
(
Resize
(
313
+
i
*
dx
,
465
,
359
+
i
*
dx
,
531
));
}
//side deck
driver
->
draw2DRectangle
(
Resize
(
310
,
537
,
510
,
557
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
536
,
510
,
557
));
driver
->
draw2DRectangle
(
Resize
(
310
,
537
,
797
,
557
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
536
,
797
,
557
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
1332
),
Resize
(
315
,
537
,
510
,
557
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
deckManager
.
GetSideFormatString
(),
Resize
(
380
,
538
,
540
,
558
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
deckManager
.
GetSideFormatString
(),
Resize
(
380
,
538
,
797
,
558
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
driver
->
draw2DRectangle
(
Resize
(
310
,
560
,
797
,
630
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
559
,
797
,
630
));
if
(
deckManager
.
current_deck
.
side
.
size
()
<=
10
)
...
...
gframe/event_handler.cpp
View file @
9706dc8f
...
...
@@ -1438,7 +1438,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
should_show_tip
=
true
;
myswprintf
(
formatBuffer
,
dataManager
.
GetSysString
(
1700
),
mainGame
->
btnCancelOrFinish
->
getText
());
mainGame
->
stTip
->
setText
(
formatBuffer
);
irr
::
core
::
dimension2d
<
unsigned
int
>
dtip
=
mainGame
->
text
Font
->
getDimension
(
formatBuffer
)
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
irr
::
core
::
dimension2d
<
unsigned
int
>
dtip
=
mainGame
->
gui
Font
->
getDimension
(
formatBuffer
)
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
mainGame
->
stTip
->
setRelativePosition
(
mainGame
->
Resize
(
x
-
10
-
dtip
.
Width
,
y
-
10
-
dtip
.
Height
,
x
-
10
,
y
-
10
));
}
mainGame
->
stTip
->
setVisible
(
should_show_tip
);
...
...
@@ -1562,7 +1562,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
str
.
append
(
formatBuffer
);
}
should_show_tip
=
true
;
irr
::
core
::
dimension2d
<
unsigned
int
>
dtip
=
mainGame
->
text
Font
->
getDimension
(
str
.
c_str
())
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
irr
::
core
::
dimension2d
<
unsigned
int
>
dtip
=
mainGame
->
gui
Font
->
getDimension
(
str
.
c_str
())
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
mainGame
->
stTip
->
setRelativePosition
(
recti
(
mousepos
.
X
-
10
-
dtip
.
Width
,
mousepos
.
Y
-
10
-
dtip
.
Height
,
mousepos
.
X
-
10
,
mousepos
.
Y
-
10
));
mainGame
->
stTip
->
setText
(
str
.
c_str
());
}
...
...
@@ -1919,6 +1919,13 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return
true
;
break
;
}
case
irr
:
:
KEY_KEY_X
:
case
irr
:
:
KEY_F12
:
{
if
(
!
event
.
KeyInput
.
PressedDown
&&
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
mainGame
->
takeScreenshot
();
return
true
;
break
;
}
default:
break
;
}
break
;
...
...
gframe/game.cpp
View file @
9706dc8f
This diff is collapsed.
Click to expand it.
gframe/game.h
View file @
9706dc8f
...
...
@@ -152,6 +152,8 @@ public:
void
AddChatMsg
(
wchar_t
*
msg
,
int
player
);
void
ClearChatMsg
();
void
AddDebugMsg
(
char
*
msgbuf
);
bool
MakeDirectory
(
const
std
::
string
folder
);
void
initUtils
();
void
ClearTextures
();
void
CloseDuelWindow
();
...
...
@@ -179,6 +181,7 @@ public:
void
SetWindowsIcon
();
void
FlashWindow
();
void
takeScreenshot
();
void
SetCursor
(
ECURSOR_ICON
icon
);
Mutex
gMutex
;
...
...
lflist.conf
View file @
9706dc8f
This diff is collapsed.
Click to expand it.
ocgcore
@
5484e52f
Subproject commit
92ad9db2a69bbaf4a07ef0173fe3ee03615b1f24
Subproject commit
5484e52fd1a9e81c36101e0bb8e4e1e859368fe5
premake5.lua
View file @
9706dc8f
...
...
@@ -44,7 +44,7 @@ solution "ygo"
configuration
{
"Release"
,
"vs*"
}
flags
{
"StaticRuntime"
,
"LinkTimeOptimization"
}
disablewarnings
{
"4244"
,
"4267"
,
"4838"
,
"4577"
,
"4819"
,
"4018"
,
"4996"
,
"4477"
,
"4091"
}
disablewarnings
{
"4244"
,
"4267"
,
"4838"
,
"4577"
,
"4819"
,
"4018"
,
"4996"
,
"4477"
,
"4091"
,
"4305"
}
configuration
{
"Release"
,
"not vs*"
}
symbols
"On"
...
...
script
@
eadaf7e6
Subproject commit
93cfa16563d015445e8873a3ae653bef732ae268
Subproject commit
eadaf7e6d270095cc47c5980c6fc1de95cfce530
strings.conf
View file @
9706dc8f
...
...
@@ -419,6 +419,7 @@
!
system
1418
额外卡组数量应不超过
15
张,当前卡组数量为%
d
张。
!
system
1419
副卡组数量应不超过
15
张,当前卡组数量为%
d
张。
!
system
1420
有额外卡组卡片存在于主卡组,可能是额外卡组数量超过
15
张。
!
system
1421
宣言的卡不符合条件,或无法被主机识别。
!
system
1500
决斗结束。
!
system
1501
录像结束。
!
system
1502
连接已断开。
...
...
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