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
3a335d91
Commit
3a335d91
authored
May 11, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into side
parents
2405d8b7
34a65de1
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
275 additions
and
91 deletions
+275
-91
.gitignore
.gitignore
+1
-0
.travis.yml
.travis.yml
+9
-4
appveyor.yml
appveyor.yml
+2
-1
cards.cdb
cards.cdb
+0
-0
gframe/client_field.h
gframe/client_field.h
+0
-1
gframe/deck_con.cpp
gframe/deck_con.cpp
+8
-9
gframe/drawing.cpp
gframe/drawing.cpp
+30
-22
gframe/event_handler.cpp
gframe/event_handler.cpp
+9
-2
gframe/game.cpp
gframe/game.cpp
+168
-42
gframe/game.h
gframe/game.h
+8
-0
gframe/image_manager.cpp
gframe/image_manager.cpp
+32
-5
ocgcore
ocgcore
+1
-1
premake5.lua
premake5.lua
+2
-2
script
script
+1
-1
strings.conf
strings.conf
+3
-0
system.conf
system.conf
+1
-1
No files found.
.gitignore
View file @
3a335d91
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
/fonts
/fonts
/replay
/replay
/single
/single
/screenshots
/sound/*.wav
/sound/*.wav
/sound/custom
/sound/custom
/sound/BGM
/sound/BGM
...
...
.travis.yml
View file @
3a335d91
...
@@ -103,13 +103,18 @@ before_deploy:
...
@@ -103,13 +103,18 @@ before_deploy:
-
rm -rf pics/thumbnail pics/*.db
-
rm -rf pics/thumbnail pics/*.db
-
mkdir replay
-
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
-
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
skin deck single pics replay
;
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
skin deck single pics replay sound
;
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
fi
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
-
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
skin deck single pics replay
;
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
skin deck single pics replay
sound;
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
fi
deploy
:
deploy
:
...
...
appveyor.yml
View file @
3a335d91
...
@@ -86,8 +86,9 @@ after_build:
...
@@ -86,8 +86,9 @@ after_build:
-
rm -rf pics/thumbnail pics/*.db
-
rm -rf pics/thumbnail pics/*.db
-
mkdir replay
-
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
-
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
-
7z a -mx9 -xr!.git* KoishiPro-with-sound-%APPVEYOR_REPO_TAG_NAME%.7z sound
...
...
cards.cdb
View file @
3a335d91
No preview for this file type
gframe/client_field.h
View file @
3a335d91
...
@@ -65,7 +65,6 @@ public:
...
@@ -65,7 +65,6 @@ public:
int
select_counter_type
;
int
select_counter_type
;
std
::
vector
<
ClientCard
*>
selectable_cards
;
std
::
vector
<
ClientCard
*>
selectable_cards
;
std
::
vector
<
ClientCard
*>
selected_cards
;
std
::
vector
<
ClientCard
*>
selected_cards
;
std
::
vector
<
ClientCard
*>
unselected_cards
;
std
::
set
<
ClientCard
*>
selectsum_cards
;
std
::
set
<
ClientCard
*>
selectsum_cards
;
std
::
vector
<
ClientCard
*>
selectsum_all
;
std
::
vector
<
ClientCard
*>
selectsum_all
;
std
::
vector
<
int
>
opcode
;
std
::
vector
<
int
>
opcode
;
...
...
gframe/deck_con.cpp
View file @
3a335d91
...
@@ -832,9 +832,9 @@ void DeckBuilder::FilterCards() {
...
@@ -832,9 +832,9 @@ void DeckBuilder::FilterCards() {
std
::
vector
<
std
::
wstring
>
query_elements
;
std
::
vector
<
std
::
wstring
>
query_elements
;
std
::
vector
<
std
::
vector
<
std
::
wstring
>::
iterator
>
query_elements_track
;
std
::
vector
<
std
::
vector
<
std
::
wstring
>::
iterator
>
query_elements_track
;
size_t
element_start
=
0
;
size_t
element_start
=
0
;
while
(
1
)
{
while
(
1
)
{
size_t
element_end
=
str
.
find_first_of
(
L' '
,
element_start
);
size_t
element_end
=
str
.
find_first_of
(
L' '
,
element_start
);
if
(
element_end
==
std
::
wstring
::
npos
)
if
(
element_end
==
std
::
wstring
::
npos
)
break
;
break
;
size_t
length
=
element_end
-
element_start
;
size_t
length
=
element_end
-
element_start
;
if
(
length
>
0
)
{
if
(
length
>
0
)
{
...
@@ -845,18 +845,17 @@ void DeckBuilder::FilterCards() {
...
@@ -845,18 +845,17 @@ void DeckBuilder::FilterCards() {
}
}
query_elements
.
push_back
(
str
.
substr
(
element_start
));
query_elements
.
push_back
(
str
.
substr
(
element_start
));
std
::
unordered_map
<
std
::
wstring
,
unsigned
int
>
set_code_map
;
std
::
unordered_map
<
std
::
wstring
,
unsigned
int
>
set_code_map
;
for
(
auto
elements_iterator
=
query_elements
.
begin
();
elements_iterator
!=
query_elements
.
end
();
elements_iterator
++
)
{
for
(
auto
elements_iterator
=
query_elements
.
begin
();
elements_iterator
!=
query_elements
.
end
();
elements_iterator
++
)
{
const
wchar_t
*
element_pointer
=
elements_iterator
->
c_str
();
const
wchar_t
*
element_pointer
=
elements_iterator
->
c_str
();
if
(
element_pointer
[
0
]
==
L'@'
)
if
(
element_pointer
[
0
]
==
L'@'
)
set_code_map
[
*
elements_iterator
]
=
dataManager
.
GetSetCode
(
&
element_pointer
[
1
]);
set_code_map
[
*
elements_iterator
]
=
dataManager
.
GetSetCode
(
&
element_pointer
[
1
]);
else
else
set_code_map
[
*
elements_iterator
]
=
dataManager
.
GetSetCode
(
&
element_pointer
[
0
]);
set_code_map
[
*
elements_iterator
]
=
dataManager
.
GetSetCode
(
&
element_pointer
[
0
]);
if
(
element_pointer
[
0
]
==
0
||
(
element_pointer
[
0
]
==
L'$'
&&
element_pointer
[
1
]
==
0
)
||
(
element_pointer
[
0
]
==
L'@'
&&
element_pointer
[
1
]
==
0
))
if
(
element_pointer
[
0
]
==
0
||
(
element_pointer
[
0
]
==
L'$'
&&
element_pointer
[
1
]
==
0
)
||
(
element_pointer
[
0
]
==
L'@'
&&
element_pointer
[
1
]
==
0
))
query_elements_track
.
push_back
(
elements_iterator
);
query_elements_track
.
push_back
(
elements_iterator
);
}
}
for
(
auto
elements_track_iterator
=
query_elements_track
.
begin
();
elements_track_iterator
!=
query_elements_track
.
end
();
elements_track_iterator
++
)
{
for
(
auto
elements_track_iterator
=
query_elements_track
.
begin
();
elements_track_iterator
!=
query_elements_track
.
end
();
elements_track_iterator
++
)
query_elements
.
erase
(
*
elements_track_iterator
);
query_elements
.
erase
(
*
elements_track_iterator
);
}
auto
strpointer
=
dataManager
.
_strings
.
begin
();
auto
strpointer
=
dataManager
.
_strings
.
begin
();
for
(
code_pointer
ptr
=
dataManager
.
_datas
.
begin
();
ptr
!=
dataManager
.
_datas
.
end
();
++
ptr
,
++
strpointer
)
{
for
(
code_pointer
ptr
=
dataManager
.
_datas
.
begin
();
ptr
!=
dataManager
.
_datas
.
end
();
++
ptr
,
++
strpointer
)
{
const
CardDataC
&
data
=
ptr
->
second
;
const
CardDataC
&
data
=
ptr
->
second
;
...
@@ -945,14 +944,14 @@ void DeckBuilder::FilterCards() {
...
@@ -945,14 +944,14 @@ void DeckBuilder::FilterCards() {
break
;
break
;
}
}
}
else
{
}
else
{
if
(
!
CardNameContains
(
text
.
name
.
c_str
(),
elements_iterator
->
c_str
())
&&
text
.
text
.
find
(
elements_iterator
->
c_str
())
==
std
::
wstring
::
npos
if
(
!
CardNameContains
(
text
.
name
.
c_str
(),
elements_iterator
->
c_str
())
&&
text
.
text
.
find
(
elements_iterator
->
c_str
())
==
std
::
wstring
::
npos
&&
(
!
set_code_map
[
*
elements_iterator
]
||
!
check_set_code
(
data
,
set_code_map
[
*
elements_iterator
])))
{
&&
(
!
set_code_map
[
*
elements_iterator
]
||
!
check_set_code
(
data
,
set_code_map
[
*
elements_iterator
])))
{
is_target
=
false
;
is_target
=
false
;
break
;
break
;
}
}
}
}
}
}
if
(
is_target
)
if
(
is_target
)
results
.
push_back
(
ptr
);
results
.
push_back
(
ptr
);
else
else
continue
;
continue
;
...
...
gframe/drawing.cpp
View file @
3a335d91
...
@@ -773,11 +773,13 @@ void Game::DrawGUI() {
...
@@ -773,11 +773,13 @@ void Game::DrawGUI() {
env
->
drawAll
();
env
->
drawAll
();
}
}
void
Game
::
DrawSpec
()
{
void
Game
::
DrawSpec
()
{
s32
midx
=
574
+
(
CARD_IMG_WIDTH
*
0.5
);
s32
midy
=
150
+
(
CARD_IMG_HEIGHT
*
0.5
);
if
(
showcard
)
{
if
(
showcard
)
{
switch
(
showcard
)
{
switch
(
showcard
)
{
case
1
:
{
case
1
:
{
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
(
574
,
150
));
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
CardHint
(
574
,
150
));
driver
->
draw2DImage
(
imageManager
.
tMask
,
Resize
(
574
,
150
,
574
+
(
showcarddif
>
CARD_IMG_WIDTH
?
CARD_IMG_WIDTH
:
showcarddif
),
150
+
CARD_IMG_HEIGHT
),
driver
->
draw2DImage
(
imageManager
.
tMask
,
Resize
CardMid
(
574
,
150
,
574
+
(
showcarddif
>
CARD_IMG_WIDTH
?
CARD_IMG_WIDTH
:
showcarddif
),
150
+
CARD_IMG_HEIGHT
,
midx
,
midy
),
recti
(
CARD_IMG_HEIGHT
-
showcarddif
,
0
,
CARD_IMG_HEIGHT
-
(
showcarddif
>
CARD_IMG_WIDTH
?
showcarddif
-
CARD_IMG_WIDTH
:
0
),
CARD_IMG_HEIGHT
),
0
,
0
,
true
);
recti
(
CARD_IMG_HEIGHT
-
showcarddif
,
0
,
CARD_IMG_HEIGHT
-
(
showcarddif
>
CARD_IMG_WIDTH
?
showcarddif
-
CARD_IMG_WIDTH
:
0
),
CARD_IMG_HEIGHT
),
0
,
0
,
true
);
showcarddif
+=
15
;
showcarddif
+=
15
;
if
(
showcarddif
>=
CARD_IMG_HEIGHT
)
{
if
(
showcarddif
>=
CARD_IMG_HEIGHT
)
{
...
@@ -787,8 +789,8 @@ void Game::DrawSpec() {
...
@@ -787,8 +789,8 @@ void Game::DrawSpec() {
break
;
break
;
}
}
case
2
:
{
case
2
:
{
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
(
574
,
150
));
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
CardHint
(
574
,
150
));
driver
->
draw2DImage
(
imageManager
.
tMask
,
Resize
(
574
+
showcarddif
,
150
,
574
+
CARD_IMG_WIDTH
,
150
+
CARD_IMG_HEIGHT
),
driver
->
draw2DImage
(
imageManager
.
tMask
,
Resize
CardMid
(
574
+
showcarddif
,
150
,
574
+
CARD_IMG_WIDTH
,
150
+
CARD_IMG_HEIGHT
,
midx
,
midy
),
recti
(
0
,
0
,
CARD_IMG_WIDTH
-
showcarddif
,
CARD_IMG_HEIGHT
),
0
,
0
,
true
);
recti
(
0
,
0
,
CARD_IMG_WIDTH
-
showcarddif
,
CARD_IMG_HEIGHT
),
0
,
0
,
true
);
showcarddif
+=
15
;
showcarddif
+=
15
;
if
(
showcarddif
>=
CARD_IMG_WIDTH
)
{
if
(
showcarddif
>=
CARD_IMG_WIDTH
)
{
...
@@ -797,8 +799,8 @@ void Game::DrawSpec() {
...
@@ -797,8 +799,8 @@ void Game::DrawSpec() {
break
;
break
;
}
}
case
3
:
{
case
3
:
{
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
(
574
,
150
));
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
CardHint
(
574
,
150
));
driver
->
draw2DImage
(
imageManager
.
tNegated
,
Resize
(
536
+
showcarddif
,
141
+
showcarddif
,
792
-
showcarddif
,
397
-
showcarddif
),
recti
(
0
,
0
,
128
,
128
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tNegated
,
Resize
CardMid
(
536
+
showcarddif
,
141
+
showcarddif
,
792
-
showcarddif
,
397
-
showcarddif
,
midx
,
midy
),
recti
(
0
,
0
,
128
,
128
),
0
,
0
,
true
);
if
(
showcarddif
<
64
)
if
(
showcarddif
<
64
)
showcarddif
+=
4
;
showcarddif
+=
4
;
break
;
break
;
...
@@ -808,8 +810,8 @@ void Game::DrawSpec() {
...
@@ -808,8 +810,8 @@ void Game::DrawSpec() {
matManager
.
c2d
[
1
]
=
(
showcarddif
<<
24
)
|
0xffffff
;
matManager
.
c2d
[
1
]
=
(
showcarddif
<<
24
)
|
0xffffff
;
matManager
.
c2d
[
2
]
=
(
showcarddif
<<
24
)
|
0xffffff
;
matManager
.
c2d
[
2
]
=
(
showcarddif
<<
24
)
|
0xffffff
;
matManager
.
c2d
[
3
]
=
(
showcarddif
<<
24
)
|
0xffffff
;
matManager
.
c2d
[
3
]
=
(
showcarddif
<<
24
)
|
0xffffff
;
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
(
574
,
150
,
574
+
CARD_IMG_WIDTH
,
150
+
CARD_IMG_HEIGHT
),
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
CardHint
(
574
,
150
,
574
+
CARD_IMG_WIDTH
,
150
+
CARD_IMG_HEIGHT
),
Resize
(
0
,
0
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
),
0
,
matManager
.
c2d
,
true
);
Resize
Fit
(
0
,
0
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
),
0
,
matManager
.
c2d
,
true
);
if
(
showcarddif
<
255
)
if
(
showcarddif
<
255
)
showcarddif
+=
17
;
showcarddif
+=
17
;
break
;
break
;
...
@@ -819,28 +821,34 @@ void Game::DrawSpec() {
...
@@ -819,28 +821,34 @@ void Game::DrawSpec() {
matManager
.
c2d
[
1
]
=
(
showcarddif
<<
25
)
|
0xffffff
;
matManager
.
c2d
[
1
]
=
(
showcarddif
<<
25
)
|
0xffffff
;
matManager
.
c2d
[
2
]
=
(
showcarddif
<<
25
)
|
0xffffff
;
matManager
.
c2d
[
2
]
=
(
showcarddif
<<
25
)
|
0xffffff
;
matManager
.
c2d
[
3
]
=
(
showcarddif
<<
25
)
|
0xffffff
;
matManager
.
c2d
[
3
]
=
(
showcarddif
<<
25
)
|
0xffffff
;
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
(
662
-
showcarddif
*
0.69685
f
,
277
-
showcarddif
,
662
+
showcarddif
*
0.69685
f
,
277
+
showcarddif
),
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
CardMid
(
662
-
showcarddif
*
0.69685
f
,
277
-
showcarddif
,
662
+
showcarddif
*
0.69685
f
,
277
+
showcarddif
,
midx
,
midy
),
Resize
(
0
,
0
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
),
0
,
matManager
.
c2d
,
true
);
Resize
Fit
(
0
,
0
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
),
0
,
matManager
.
c2d
,
true
);
if
(
showcarddif
<
127
)
if
(
showcarddif
<
127
)
showcarddif
+=
9
;
showcarddif
+=
9
;
break
;
break
;
}
}
case
6
:
{
case
6
:
{
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
(
574
,
150
));
driver
->
draw2DImage
(
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
CardHint
(
574
,
150
));
driver
->
draw2DImage
(
imageManager
.
tNumber
,
Resize
(
536
+
showcarddif
,
141
+
showcarddif
,
792
-
showcarddif
,
397
-
showcarddif
),
driver
->
draw2DImage
(
imageManager
.
tNumber
,
Resize
CardMid
(
536
+
showcarddif
,
141
+
showcarddif
,
792
-
showcarddif
,
397
-
showcarddif
,
midx
,
midy
),
recti
((
showcardp
%
5
)
*
64
,
(
showcardp
/
5
)
*
64
,
(
showcardp
%
5
+
1
)
*
64
,
(
showcardp
/
5
+
1
)
*
64
),
0
,
0
,
true
);
recti
((
showcardp
%
5
)
*
64
,
(
showcardp
/
5
)
*
64
,
(
showcardp
%
5
+
1
)
*
64
,
(
showcardp
/
5
+
1
)
*
64
),
0
,
0
,
true
);
if
(
showcarddif
<
64
)
if
(
showcarddif
<
64
)
showcarddif
+=
4
;
showcarddif
+=
4
;
break
;
break
;
}
}
case
7
:
{
case
7
:
{
float
mul
=
xScale
;
if
(
xScale
>
yScale
)
mul
=
yScale
;
core
::
position2d
<
s32
>
corner
[
4
];
core
::
position2d
<
s32
>
corner
[
4
];
float
y
=
sin
(
showcarddif
*
3.1415926
f
/
180.0
f
)
*
CARD_IMG_HEIGHT
*
yScale
;
float
y
=
sin
(
showcarddif
*
3.1415926
f
/
180.0
f
)
*
CARD_IMG_HEIGHT
*
mul
;
corner
[
0
]
=
core
::
position2d
<
s32
>
(
574
*
xScale
-
(
CARD_IMG_HEIGHT
*
yScale
-
y
)
*
0.3
f
,
404
*
yScale
-
y
);
s32
winx
=
midx
*
xScale
+
(
574
-
midx
)
*
mul
;
corner
[
1
]
=
core
::
position2d
<
s32
>
(
751
*
xScale
+
(
CARD_IMG_HEIGHT
*
yScale
-
y
)
*
0.3
f
,
404
*
yScale
-
y
);
s32
winx2
=
midx
*
xScale
+
(
751
-
midx
)
*
mul
;
corner
[
2
]
=
core
::
position2d
<
s32
>
(
574
*
xScale
,
404
*
yScale
);
s32
winy
=
midy
*
yScale
+
(
404
-
midy
)
*
mul
;
corner
[
3
]
=
core
::
position2d
<
s32
>
(
751
*
xScale
,
404
*
yScale
);
corner
[
0
]
=
core
::
position2d
<
s32
>
(
winx
-
(
CARD_IMG_HEIGHT
*
mul
-
y
)
*
0.3
f
,
winy
-
y
);
irr
::
gui
::
Draw2DImageQuad
(
driver
,
imageManager
.
GetTexture
(
showcardcode
,
true
),
Resize
(
0
,
0
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
),
corner
);
corner
[
1
]
=
core
::
position2d
<
s32
>
(
winx2
+
(
CARD_IMG_HEIGHT
*
mul
-
y
)
*
0.3
f
,
winy
-
y
);
corner
[
2
]
=
core
::
position2d
<
s32
>
(
winx
,
winy
);
corner
[
3
]
=
core
::
position2d
<
s32
>
(
winx2
,
winy
);
irr
::
gui
::
Draw2DImageQuad
(
driver
,
imageManager
.
GetTexture
(
showcardcode
,
true
),
ResizeFit
(
0
,
0
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
),
corner
);
showcardp
++
;
showcardp
++
;
showcarddif
+=
9
;
showcarddif
+=
9
;
if
(
showcarddif
>=
90
)
if
(
showcarddif
>=
90
)
...
@@ -918,7 +926,7 @@ void Game::DrawSpec() {
...
@@ -918,7 +926,7 @@ void Game::DrawSpec() {
DrawShadowText
(
lpcFont
,
lstr
,
ResizeElem
(
650
-
pos
.
Width
/
2
,
290
,
950
,
370
),
Resize
(
-
1
,
-
1
,
0
,
0
),
0xffffffff
);
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
))
{
if
(
dInfo
.
vic_string
&&
(
showcardcode
==
1
||
showcardcode
==
2
))
{
driver
->
draw2DRectangle
(
0xa0000000
,
ResizeElem
(
540
,
320
,
800
,
340
));
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
)
{
}
else
if
(
showcardp
<
showcarddif
+
10
)
{
int
alpha
=
((
showcarddif
+
10
-
showcardp
)
*
25
)
<<
24
;
int
alpha
=
((
showcarddif
+
10
-
showcardp
)
*
25
)
<<
24
;
...
@@ -957,7 +965,7 @@ void Game::DrawSpec() {
...
@@ -957,7 +965,7 @@ void Game::DrawSpec() {
continue
;
continue
;
if
(
!
showChat
&&
i
>
2
)
if
(
!
showChat
&&
i
>
2
)
continue
;
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
);
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
);
rectloc
-=
position2di
(
0
,
i
*
20
);
...
@@ -966,8 +974,8 @@ void Game::DrawSpec() {
...
@@ -966,8 +974,8 @@ void Game::DrawSpec() {
recti
shadowloc
=
msgloc
+
position2di
(
1
,
1
);
recti
shadowloc
=
msgloc
+
position2di
(
1
,
1
);
driver
->
draw2DRectangle
(
rectloc
,
0xa0000000
,
0xa0000000
,
0xa0000000
,
0xa0000000
);
driver
->
draw2DRectangle
(
rectloc
,
0xa0000000
,
0xa0000000
,
0xa0000000
,
0xa0000000
);
text
Font
->
draw
(
chatMsg
[
i
].
c_str
(),
msgloc
,
0xff000000
,
false
,
false
);
gui
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
(),
shadowloc
,
chatColor
[
chatType
[
i
]],
false
,
false
);
}
}
}
}
}
}
...
...
gframe/event_handler.cpp
View file @
3a335d91
...
@@ -1438,7 +1438,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1438,7 +1438,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
should_show_tip
=
true
;
should_show_tip
=
true
;
myswprintf
(
formatBuffer
,
dataManager
.
GetSysString
(
1700
),
mainGame
->
btnCancelOrFinish
->
getText
());
myswprintf
(
formatBuffer
,
dataManager
.
GetSysString
(
1700
),
mainGame
->
btnCancelOrFinish
->
getText
());
mainGame
->
stTip
->
setText
(
formatBuffer
);
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
->
setRelativePosition
(
mainGame
->
Resize
(
x
-
10
-
dtip
.
Width
,
y
-
10
-
dtip
.
Height
,
x
-
10
,
y
-
10
));
}
}
mainGame
->
stTip
->
setVisible
(
should_show_tip
);
mainGame
->
stTip
->
setVisible
(
should_show_tip
);
...
@@ -1562,7 +1562,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1562,7 +1562,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
str
.
append
(
formatBuffer
);
str
.
append
(
formatBuffer
);
}
}
should_show_tip
=
true
;
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
->
setRelativePosition
(
recti
(
mousepos
.
X
-
10
-
dtip
.
Width
,
mousepos
.
Y
-
10
-
dtip
.
Height
,
mousepos
.
X
-
10
,
mousepos
.
Y
-
10
));
mainGame
->
stTip
->
setText
(
str
.
c_str
());
mainGame
->
stTip
->
setText
(
str
.
c_str
());
}
}
...
@@ -1919,6 +1919,13 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -1919,6 +1919,13 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return
true
;
return
true
;
break
;
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
;
default:
break
;
}
}
break
;
break
;
...
...
gframe/game.cpp
View file @
3a335d91
This diff is collapsed.
Click to expand it.
gframe/game.h
View file @
3a335d91
...
@@ -147,6 +147,8 @@ public:
...
@@ -147,6 +147,8 @@ public:
void
AddChatMsg
(
wchar_t
*
msg
,
int
player
);
void
AddChatMsg
(
wchar_t
*
msg
,
int
player
);
void
ClearChatMsg
();
void
ClearChatMsg
();
void
AddDebugMsg
(
char
*
msgbuf
);
void
AddDebugMsg
(
char
*
msgbuf
);
bool
MakeDirectory
(
const
std
::
string
folder
);
void
initUtils
();
void
ClearTextures
();
void
ClearTextures
();
void
CloseDuelWindow
();
void
CloseDuelWindow
();
...
@@ -166,9 +168,15 @@ public:
...
@@ -166,9 +168,15 @@ public:
recti
ResizeElem
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
recti
ResizeElem
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
recti
ResizeWin
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
,
bool
chat
=
false
);
recti
ResizeWin
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
,
bool
chat
=
false
);
recti
ResizeCard
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
recti
ResizeCard
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
recti
ResizeCardHint
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
position2di
ResizeCardHint
(
s32
x
,
s32
y
);
recti
ResizeCardMid
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
,
s32
midx
,
s32
midy
);
position2di
ResizeCardMid
(
s32
x
,
s32
y
,
s32
midx
,
s32
midy
);
recti
ResizeFit
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
void
SetWindowsIcon
();
void
SetWindowsIcon
();
void
FlashWindow
();
void
FlashWindow
();
void
takeScreenshot
();
void
SetCursor
(
ECURSOR_ICON
icon
);
void
SetCursor
(
ECURSOR_ICON
icon
);
Mutex
gMutex
;
Mutex
gMutex
;
...
...
gframe/image_manager.cpp
View file @
3a335d91
...
@@ -268,14 +268,25 @@ irr::video::ITexture* ImageManager::GetTexture(int code, bool fit) {
...
@@ -268,14 +268,25 @@ irr::video::ITexture* ImageManager::GetTexture(int code, bool fit) {
int
width
=
CARD_IMG_WIDTH
;
int
width
=
CARD_IMG_WIDTH
;
int
height
=
CARD_IMG_HEIGHT
;
int
height
=
CARD_IMG_HEIGHT
;
if
(
fit
)
{
if
(
fit
)
{
width
=
width
*
mainGame
->
xScale
;
float
mul
=
mainGame
->
xScale
;
height
=
height
*
mainGame
->
yScale
;
if
(
mainGame
->
xScale
>
mainGame
->
yScale
)
mul
=
mainGame
->
yScale
;
width
=
width
*
mul
;
height
=
height
*
mul
;
}
}
auto
tit
=
tMap
[
fit
?
1
:
0
].
find
(
code
);
auto
tit
=
tMap
[
fit
?
1
:
0
].
find
(
code
);
if
(
tit
==
tMap
[
fit
?
1
:
0
].
end
())
{
if
(
tit
==
tMap
[
fit
?
1
:
0
].
end
())
{
char
file
[
256
];
char
file
[
256
];
sprintf
(
file
,
"expansions/pics/%d.
jp
g"
,
code
);
sprintf
(
file
,
"expansions/pics/%d.
pn
g"
,
code
);
irr
::
video
::
ITexture
*
img
=
GetTextureFromFile
(
file
,
width
,
height
);
irr
::
video
::
ITexture
*
img
=
GetTextureFromFile
(
file
,
width
,
height
);
if
(
img
==
NULL
)
{
sprintf
(
file
,
"expansions/pics/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/%d.png"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
NULL
)
{
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/%d.jpg"
,
code
);
sprintf
(
file
,
"pics/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
...
@@ -300,15 +311,31 @@ irr::video::ITexture* ImageManager::GetTextureThumb(int code) {
...
@@ -300,15 +311,31 @@ irr::video::ITexture* ImageManager::GetTextureThumb(int code) {
int
height
=
CARD_THUMB_HEIGHT
*
mainGame
->
yScale
;
int
height
=
CARD_THUMB_HEIGHT
*
mainGame
->
yScale
;
if
(
tit
==
tThumb
.
end
())
{
if
(
tit
==
tThumb
.
end
())
{
char
file
[
256
];
char
file
[
256
];
sprintf
(
file
,
"expansions/pics/thumbnail/%d.
jp
g"
,
code
);
sprintf
(
file
,
"expansions/pics/thumbnail/%d.
pn
g"
,
code
);
irr
::
video
::
ITexture
*
img
=
GetTextureFromFile
(
file
,
width
,
height
);
irr
::
video
::
ITexture
*
img
=
GetTextureFromFile
(
file
,
width
,
height
);
if
(
img
==
NULL
)
{
sprintf
(
file
,
"expansions/pics/thumbnail/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/thumbnail/%d.png"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
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
=
GetTextureFromFile
(
file
,
width
,
height
);
}
}
if
(
img
==
NULL
&&
mainGame
->
gameConf
.
use_image_scale
)
{
if
(
img
==
NULL
&&
mainGame
->
gameConf
.
use_image_scale
)
{
sprintf
(
file
,
"expansions/pics/%d.png"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
if
(
img
==
NULL
)
{
sprintf
(
file
,
"expansions/pics/%d.jpg"
,
code
);
sprintf
(
file
,
"expansions/pics/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/%d.png"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
NULL
)
{
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/%d.jpg"
,
code
);
sprintf
(
file
,
"pics/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
...
...
ocgcore
@
92ad9db2
Subproject commit
482e002181d7a007ffe04d4bb8cb4a8b5e4d2e28
Subproject commit
92ad9db2a69bbaf4a07ef0173fe3ee03615b1f24
premake5.lua
View file @
3a335d91
...
@@ -9,7 +9,7 @@ solution "ygo"
...
@@ -9,7 +9,7 @@ solution "ygo"
end
end
end
end
configurations
{
"
Debug"
,
"Release
"
}
configurations
{
"
Release"
,
"Debug
"
}
defines
{
"LUA_COMPAT_5_2"
}
defines
{
"LUA_COMPAT_5_2"
}
configuration
"windows"
configuration
"windows"
defines
{
"WIN32"
,
"_WIN32"
,
"WINVER=0x0501"
}
defines
{
"WIN32"
,
"_WIN32"
,
"WINVER=0x0501"
}
...
@@ -44,7 +44,7 @@ solution "ygo"
...
@@ -44,7 +44,7 @@ solution "ygo"
configuration
{
"Release"
,
"vs*"
}
configuration
{
"Release"
,
"vs*"
}
flags
{
"StaticRuntime"
,
"LinkTimeOptimization"
}
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*"
}
configuration
{
"Release"
,
"not vs*"
}
symbols
"On"
symbols
"On"
...
...
script
@
be6d9d31
Subproject commit
63aa6c77dae13e742d43f92528ca7a84ec80b7d8
Subproject commit
be6d9d319603f81d44d73d86d93804bb290f9bda
strings.conf
View file @
3a335d91
...
@@ -240,6 +240,9 @@
...
@@ -240,6 +240,9 @@
!
system
1161
效果处理
!
system
1161
效果处理
!
system
1162
效果重置
!
system
1162
效果重置
!
system
1163
灵摆召唤
!
system
1163
灵摆召唤
!
system
1164
同调召唤
!
system
1165
超量召唤
!
system
1166
连接召唤
#menu
#menu
!
system
1200
联机模式
!
system
1200
联机模式
!
system
1201
单人模式
!
system
1201
单人模式
...
...
system.conf
View file @
3a335d91
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#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
pro_version
=
493
0
pro_version
=
493
1
antialias
=
2
antialias
=
2
errorlog
=
3
errorlog
=
3
nickname
=
Komeiji
Koishi
nickname
=
Komeiji
Koishi
...
...
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