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
1
Merge Requests
1
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
nanahira
ygopro
Commits
3d34ed80
Commit
3d34ed80
authored
Apr 27, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into another
parents
0e6124c7
4aec391b
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
85 additions
and
43 deletions
+85
-43
.travis.yml
.travis.yml
+2
-1
appveyor.yml
appveyor.yml
+3
-2
cards.cdb
cards.cdb
+0
-0
gframe/deck_con.cpp
gframe/deck_con.cpp
+6
-0
gframe/drawing.cpp
gframe/drawing.cpp
+2
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+45
-28
gframe/game.cpp
gframe/game.cpp
+10
-8
gframe/game.h
gframe/game.h
+7
-0
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+2
-0
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-0
ocgcore
ocgcore
+1
-1
premake5.lua
premake5.lua
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+4
-0
No files found.
.travis.yml
View file @
3d34ed80
...
@@ -16,13 +16,14 @@ addons:
...
@@ -16,13 +16,14 @@ addons:
-
libgl1-mesa-dev
-
libgl1-mesa-dev
-
libglu-dev
-
libglu-dev
-
p7zip-full
-
p7zip-full
-
liblua5.3-dev
env
:
env
:
-
USE_IRRKLANG=1
-
USE_IRRKLANG=1
before_install
:
before_install
:
-
git submodule update --init --recursive
-
git submodule update --init --recursive
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew update;
brew install freetype libevent sqlite dylibbundler p7zip;
brew install freetype libevent sqlite dylibbundler p7zip
lua
;
sudo cp -r /usr/local/include/freetype2 ./freetype2;
sudo cp -r /usr/local/include/freetype2 ./freetype2;
sudo cp -r /usr/local/include/event2 ./event2;
sudo cp -r /usr/local/include/event2 ./event2;
sudo cp -r /usr/local/include/lua ./lua;
sudo cp -r /usr/local/include/lua ./lua;
...
...
appveyor.yml
View file @
3d34ed80
...
@@ -32,7 +32,7 @@ install:
...
@@ -32,7 +32,7 @@ install:
-
tar xf lua-5.3.5.tar.gz
-
tar xf lua-5.3.5.tar.gz
-
move lua-5.3.5\src lua
-
move lua-5.3.5\src lua
-
bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.sqlite.org/20
18
/sqlite-amalgamation-3310100.zip ; exit 0"
-
bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.sqlite.org/20
20
/sqlite-amalgamation-3310100.zip ; exit 0"
-
7z x -y sqlite-amalgamation-3310100.zip
-
7z x -y sqlite-amalgamation-3310100.zip
-
move sqlite-amalgamation-3310100 sqlite3
-
move sqlite-amalgamation-3310100 sqlite3
...
@@ -103,6 +103,7 @@ artifacts:
...
@@ -103,6 +103,7 @@ artifacts:
cache
:
cache
:
-
premake-5.0.0-alpha14-windows.zip
-
premake-5.0.0-alpha14-windows.zip
-
libevent-2.0.22-stable.tar.gz
-
libevent-2.0.22-stable.tar.gz
-
freetype-2.9.1.tar.bz2
-
freetype-2.10.1.tar.gz
-
lua-5.3.5.tar.gz
-
irrlicht-1.8.4.zip
-
irrlicht-1.8.4.zip
-
sqlite-amalgamation-3310100.zip
-
sqlite-amalgamation-3310100.zip
cards.cdb
View file @
3d34ed80
No preview for this file type
gframe/deck_con.cpp
View file @
3d34ed80
...
@@ -856,6 +856,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -856,6 +856,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
}
}
case
irr
:
:
gui
::
EGET_EDITBOX_ENTER
:
{
case
irr
:
:
gui
::
EGET_EDITBOX_ENTER
:
{
switch
(
id
)
{
switch
(
id
)
{
case
EDITBOX_INPUTS
:
case
EDITBOX_KEYWORD
:
{
case
EDITBOX_KEYWORD
:
{
StartFilter
();
StartFilter
();
break
;
break
;
...
@@ -1012,6 +1013,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -1012,6 +1013,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
}
}
mainGame
->
env
->
setFocus
(
0
);
InstantSearch
();
InstantSearch
();
break
;
break
;
}
}
...
@@ -1029,13 +1031,16 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -1029,13 +1031,16 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
ebDefense
->
setEnabled
(
true
);
mainGame
->
ebDefense
->
setEnabled
(
true
);
}
}
}
}
mainGame
->
env
->
setFocus
(
0
);
InstantSearch
();
InstantSearch
();
break
;
break
;
}
}
case
COMBOBOX_ATTRIBUTE
:
case
COMBOBOX_ATTRIBUTE
:
case
COMBOBOX_RACE
:
case
COMBOBOX_RACE
:
case
COMBOBOX_LIMIT
:
case
COMBOBOX_LIMIT
:
mainGame
->
env
->
setFocus
(
0
);
InstantSearch
();
InstantSearch
();
break
;
}
}
}
}
case
irr
:
:
gui
::
EGET_LISTBOX_CHANGED
:
{
case
irr
:
:
gui
::
EGET_LISTBOX_CHANGED
:
{
...
@@ -1653,6 +1658,7 @@ bool DeckBuilder::CardNameContains(const wchar_t *haystack, const wchar_t *needl
...
@@ -1653,6 +1658,7 @@ bool DeckBuilder::CardNameContains(const wchar_t *haystack, const wchar_t *needl
return
true
;
return
true
;
}
}
}
else
{
}
else
{
i
-=
j
;
j
=
0
;
j
=
0
;
}
}
i
++
;
i
++
;
...
...
gframe/drawing.cpp
View file @
3d34ed80
...
@@ -415,7 +415,8 @@ void Game::DrawCard(ClientCard* pcard) {
...
@@ -415,7 +415,8 @@ void Game::DrawCard(ClientCard* pcard) {
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tAttack
);
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tAttack
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
irr
::
core
::
matrix4
atk
;
irr
::
core
::
matrix4
atk
;
atk
.
setTranslation
(
pcard
->
curPos
+
vector3df
(
0
,
-
atkdy
/
4.0
f
-
0.35
f
,
0.05
f
));
atk
.
setTranslation
(
pcard
->
curPos
+
vector3df
(
0
,
(
pcard
->
controler
==
0
?
-
1
:
1
)
*
(
atkdy
/
4.0
f
+
0.35
f
),
0.05
f
));
atk
.
setRotationRadians
(
vector3df
(
0
,
0
,
pcard
->
controler
==
0
?
0
:
3.1415926
f
));
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
atk
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
atk
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vSymbol
,
4
,
matManager
.
iRectangle
,
2
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vSymbol
,
4
,
matManager
.
iRectangle
,
2
);
}
}
...
...
gframe/duelclient.cpp
View file @
3d34ed80
...
@@ -77,9 +77,6 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g
...
@@ -77,9 +77,6 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g
return
true
;
return
true
;
}
}
void
DuelClient
::
ConnectTimeout
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
)
{
void
DuelClient
::
ConnectTimeout
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
)
{
if
(
auto_watch_mode
)
{
mainGame
->
device
->
closeDevice
();
}
if
(
connect_state
==
0x7
)
if
(
connect_state
==
0x7
)
return
;
return
;
if
(
!
is_closing
)
{
if
(
!
is_closing
)
{
...
@@ -1674,6 +1671,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1674,6 +1671,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
c
,
l
,
s
,
ss
;
int
c
,
l
,
s
,
ss
;
unsigned
int
code
;
unsigned
int
code
;
bool
panelmode
=
false
;
bool
panelmode
=
false
;
int
handcount
=
0
;
bool
select_ready
=
mainGame
->
dField
.
select_min
==
0
;
bool
select_ready
=
mainGame
->
dField
.
select_min
==
0
;
mainGame
->
dField
.
select_ready
=
select_ready
;
mainGame
->
dField
.
select_ready
=
select_ready
;
ClientCard
*
pcard
;
ClientCard
*
pcard
;
...
@@ -1699,6 +1697,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1699,6 +1697,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
->
is_selected
=
false
;
pcard
->
is_selected
=
false
;
if
(
l
&
0xf1
)
if
(
l
&
0xf1
)
panelmode
=
true
;
panelmode
=
true
;
if
(
l
&
LOCATION_HAND
)
{
handcount
++
;
if
(
handcount
>=
10
)
panelmode
=
true
;
}
}
}
std
::
sort
(
mainGame
->
dField
.
selectable_cards
.
begin
(),
mainGame
->
dField
.
selectable_cards
.
end
(),
ClientCard
::
client_card_sort
);
std
::
sort
(
mainGame
->
dField
.
selectable_cards
.
begin
(),
mainGame
->
dField
.
selectable_cards
.
end
(),
ClientCard
::
client_card_sort
);
if
(
select_hint
)
if
(
select_hint
)
...
@@ -1913,9 +1916,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1913,9 +1916,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
case
MSG_SELECT_PLACE
:
case
MSG_SELECT_PLACE
:
case
MSG_SELECT_DISFIELD
:
{
case
MSG_SELECT_DISFIELD
:
{
/*int selecting_player = */
BufferIO
::
ReadInt8
(
pbuf
);
int
selecting_player
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_min
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
select_min
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
selectable_field
=
~
BufferIO
::
ReadInt32
(
pbuf
);
mainGame
->
dField
.
selectable_field
=
~
BufferIO
::
ReadInt32
(
pbuf
);
if
(
selecting_player
==
mainGame
->
LocalPlayer
(
1
))
mainGame
->
dField
.
selectable_field
=
(
mainGame
->
dField
.
selectable_field
>>
16
)
|
(
mainGame
->
dField
.
selectable_field
<<
16
);
mainGame
->
dField
.
selected_field
=
0
;
mainGame
->
dField
.
selected_field
=
0
;
unsigned
char
respbuf
[
64
];
unsigned
char
respbuf
[
64
];
int
pzone
=
0
;
int
pzone
=
0
;
...
@@ -2188,12 +2193,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2188,12 +2193,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
=
*
(
mainGame
->
dField
.
deck
[
player
].
rbegin
()
+
i
);
pcard
=
*
(
mainGame
->
dField
.
deck
[
player
].
rbegin
()
+
i
);
if
(
code
!=
0
)
if
(
code
!=
0
)
pcard
->
SetCode
(
code
);
pcard
->
SetCode
(
code
);
if
(
auto_watch_mode
&&
code
>
0
)
{
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
}
}
if
(
mainGame
->
dInfo
.
isReplaySkiping
)
if
(
mainGame
->
dInfo
.
isReplaySkiping
)
return
true
;
return
true
;
...
@@ -2214,8 +2213,17 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2214,8 +2213,17 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
0
,
0
);
else
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
0
,
0
);
pcard
->
is_moving
=
true
;
pcard
->
is_moving
=
true
;
pcard
->
aniFrame
=
5
;
pcard
->
aniFrame
=
5
;
if
(
auto_watch_mode
&&
code
>
0
)
{
mainGame
->
showcardcode
=
pcard
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
mainGame
->
WaitFrameSignal
(
45
);
mainGame
->
WaitFrameSignal
(
45
);
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
if
(
auto_watch_mode
)
{
mainGame
->
showcard
=
0
;
}
mainGame
->
WaitFrameSignal
(
5
);
mainGame
->
WaitFrameSignal
(
5
);
}
}
return
true
;
return
true
;
...
@@ -2232,12 +2240,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2232,12 +2240,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
=
*
(
mainGame
->
dField
.
extra
[
player
].
rbegin
()
+
i
+
mainGame
->
dField
.
extra_p_count
[
player
]);
pcard
=
*
(
mainGame
->
dField
.
extra
[
player
].
rbegin
()
+
i
+
mainGame
->
dField
.
extra_p_count
[
player
]);
if
(
code
!=
0
)
if
(
code
!=
0
)
pcard
->
SetCode
(
code
);
pcard
->
SetCode
(
code
);
if
(
auto_watch_mode
&&
code
>
0
)
{
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
}
}
if
(
mainGame
->
dInfo
.
isReplaySkiping
)
if
(
mainGame
->
dInfo
.
isReplaySkiping
)
return
true
;
return
true
;
...
@@ -2257,8 +2259,17 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2257,8 +2259,17 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
3.14159
f
/
5.0
f
,
0
);
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
3.14159
f
/
5.0
f
,
0
);
pcard
->
is_moving
=
true
;
pcard
->
is_moving
=
true
;
pcard
->
aniFrame
=
5
;
pcard
->
aniFrame
=
5
;
if
(
auto_watch_mode
&&
pcard
->
code
>
0
)
{
mainGame
->
showcardcode
=
pcard
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
mainGame
->
WaitFrameSignal
(
45
);
mainGame
->
WaitFrameSignal
(
45
);
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
if
(
auto_watch_mode
)
{
mainGame
->
showcard
=
0
;
}
mainGame
->
WaitFrameSignal
(
5
);
mainGame
->
WaitFrameSignal
(
5
);
}
}
return
true
;
return
true
;
...
@@ -2289,12 +2300,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2289,12 +2300,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
if
(
code
!=
0
)
if
(
code
!=
0
)
pcard
->
SetCode
(
code
);
pcard
->
SetCode
(
code
);
if
(
auto_watch_mode
&&
code
>
0
)
{
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
mainGame
->
gMutex
.
lock
();
mainGame
->
gMutex
.
lock
();
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
code
));
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
code
));
mainGame
->
AddLog
(
textBuffer
,
code
);
mainGame
->
AddLog
(
textBuffer
,
code
);
...
@@ -2309,7 +2314,16 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2309,7 +2314,16 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
3.14159
f
/
5.0
f
,
0
);
else
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
3.14159
f
/
5.0
f
,
0
);
pcard
->
is_moving
=
true
;
pcard
->
is_moving
=
true
;
pcard
->
aniFrame
=
5
;
pcard
->
aniFrame
=
5
;
if
(
auto_watch_mode
&&
pcard
->
code
>
0
)
{
mainGame
->
showcardcode
=
pcard
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
mainGame
->
WaitFrameSignal
(
45
);
mainGame
->
WaitFrameSignal
(
45
);
if
(
auto_watch_mode
)
{
mainGame
->
showcard
=
0
;
}
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
mainGame
->
WaitFrameSignal
(
5
);
mainGame
->
WaitFrameSignal
(
5
);
}
else
{
}
else
{
...
@@ -2349,10 +2363,19 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2349,10 +2363,19 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
->
aniFrame
=
5
;
pcard
->
aniFrame
=
5
;
}
}
}
}
if
(
auto_watch_mode
&&
pcard
->
code
>
0
)
{
mainGame
->
showcardcode
=
pcard
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
if
(
mainGame
->
dInfo
.
isReplay
)
if
(
mainGame
->
dInfo
.
isReplay
)
mainGame
->
WaitFrameSignal
(
30
);
mainGame
->
WaitFrameSignal
(
30
);
else
else
mainGame
->
WaitFrameSignal
(
90
);
mainGame
->
WaitFrameSignal
(
90
);
if
(
auto_watch_mode
)
{
mainGame
->
showcard
=
0
;
}
for
(
size_t
i
=
0
;
i
<
field_confirm
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
field_confirm
.
size
();
++
i
)
{
pcard
=
field_confirm
[
i
];
pcard
=
field_confirm
[
i
];
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
...
@@ -3516,12 +3539,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3516,12 +3539,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
s
=
BufferIO
::
ReadInt8
(
pbuf
);
int
s
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt16
(
pbuf
);
int
count
=
BufferIO
::
ReadInt16
(
pbuf
);
ClientCard
*
pc
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
ClientCard
*
pc
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
if
(
auto_watch_mode
&&
pc
->
code
>
0
)
{
mainGame
->
showcardcode
=
pc
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
2
;
}
if
(
pc
->
counters
.
count
(
type
))
if
(
pc
->
counters
.
count
(
type
))
pc
->
counters
[
type
]
+=
count
;
pc
->
counters
[
type
]
+=
count
;
else
pc
->
counters
[
type
]
=
count
;
else
pc
->
counters
[
type
]
=
count
;
...
...
gframe/game.cpp
View file @
3d34ed80
...
@@ -668,16 +668,16 @@ bool Game::Initialize() {
...
@@ -668,16 +668,16 @@ bool Game::Initialize() {
for
(
int
filter
=
0x1
;
filter
!=
0x2000000
;
filter
<<=
1
)
for
(
int
filter
=
0x1
;
filter
!=
0x2000000
;
filter
<<=
1
)
cbRace
->
addItem
(
dataManager
.
FormatRace
(
filter
),
filter
);
cbRace
->
addItem
(
dataManager
.
FormatRace
(
filter
),
filter
);
stAttack
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1322
),
rect
<
s32
>
(
205
,
22
+
50
/
6
,
280
,
42
+
50
/
6
),
false
,
false
,
wFilter
);
stAttack
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1322
),
rect
<
s32
>
(
205
,
22
+
50
/
6
,
280
,
42
+
50
/
6
),
false
,
false
,
wFilter
);
ebAttack
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
260
,
20
+
50
/
6
,
340
,
40
+
50
/
6
),
true
,
wFilter
);
ebAttack
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
260
,
20
+
50
/
6
,
340
,
40
+
50
/
6
),
true
,
wFilter
,
EDITBOX_INPUTS
);
ebAttack
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
ebAttack
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stDefense
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1323
),
rect
<
s32
>
(
205
,
42
+
75
/
6
,
280
,
62
+
75
/
6
),
false
,
false
,
wFilter
);
stDefense
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1323
),
rect
<
s32
>
(
205
,
42
+
75
/
6
,
280
,
62
+
75
/
6
),
false
,
false
,
wFilter
);
ebDefense
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
260
,
40
+
75
/
6
,
340
,
60
+
75
/
6
),
true
,
wFilter
);
ebDefense
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
260
,
40
+
75
/
6
,
340
,
60
+
75
/
6
),
true
,
wFilter
,
EDITBOX_INPUTS
);
ebDefense
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
ebDefense
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stStar
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1324
),
rect
<
s32
>
(
10
,
62
+
100
/
6
,
80
,
82
+
100
/
6
),
false
,
false
,
wFilter
);
stStar
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1324
),
rect
<
s32
>
(
10
,
62
+
100
/
6
,
80
,
82
+
100
/
6
),
false
,
false
,
wFilter
);
ebStar
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
60
,
60
+
100
/
6
,
100
,
80
+
100
/
6
),
true
,
wFilter
);
ebStar
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
60
,
60
+
100
/
6
,
100
,
80
+
100
/
6
),
true
,
wFilter
,
EDITBOX_INPUTS
);
ebStar
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
ebStar
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stScale
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1336
),
rect
<
s32
>
(
101
,
62
+
100
/
6
,
150
,
82
+
100
/
6
),
false
,
false
,
wFilter
);
stScale
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1336
),
rect
<
s32
>
(
101
,
62
+
100
/
6
,
150
,
82
+
100
/
6
),
false
,
false
,
wFilter
);
ebScale
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
150
,
60
+
100
/
6
,
190
,
80
+
100
/
6
),
true
,
wFilter
);
ebScale
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
150
,
60
+
100
/
6
,
190
,
80
+
100
/
6
),
true
,
wFilter
,
EDITBOX_INPUTS
);
ebScale
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
ebScale
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
stSearch
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1325
),
rect
<
s32
>
(
205
,
62
+
100
/
6
,
280
,
82
+
100
/
6
),
false
,
false
,
wFilter
);
stSearch
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1325
),
rect
<
s32
>
(
205
,
62
+
100
/
6
,
280
,
82
+
100
/
6
),
false
,
false
,
wFilter
);
ebCardName
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
260
,
60
+
100
/
6
,
390
,
80
+
100
/
6
),
true
,
wFilter
,
EDITBOX_KEYWORD
);
ebCardName
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
260
,
60
+
100
/
6
,
390
,
80
+
100
/
6
),
true
,
wFilter
,
EDITBOX_KEYWORD
);
...
@@ -1017,7 +1017,9 @@ void Game::SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gu
...
@@ -1017,7 +1017,9 @@ void Game::SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gu
wchar_t
c
=
text
[
i
];
wchar_t
c
=
text
[
i
];
u32
w
=
font
->
getCharDimension
(
c
).
Width
+
font
->
getKerningWidth
(
c
,
prev
);
u32
w
=
font
->
getCharDimension
(
c
).
Width
+
font
->
getKerningWidth
(
c
,
prev
);
prev
=
c
;
prev
=
c
;
if
(
text
[
i
]
==
L'\n'
)
{
if
(
text
[
i
]
==
L'\r'
)
{
continue
;
}
else
if
(
text
[
i
]
==
L'\n'
)
{
dataManager
.
strBuffer
[
pbuffer
++
]
=
L'\n'
;
dataManager
.
strBuffer
[
pbuffer
++
]
=
L'\n'
;
_width
=
0
;
_width
=
0
;
_height
++
;
_height
++
;
...
@@ -1046,15 +1048,15 @@ void Game::LoadExpansions() {
...
@@ -1046,15 +1048,15 @@ void Game::LoadExpansions() {
myswprintf
(
fpath
,
L"./expansions/%ls"
,
name
);
myswprintf
(
fpath
,
L"./expansions/%ls"
,
name
);
dataManager
.
LoadDB
(
fpath
);
dataManager
.
LoadDB
(
fpath
);
}
}
if
(
!
isdir
&&
wcsrchr
(
name
,
'.'
)
&&
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".zip"
,
4
))
{
if
(
!
isdir
&&
wcsrchr
(
name
,
'.'
)
&&
(
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".zip"
,
4
)
||
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".ypk"
,
4
)
))
{
wchar_t
fpath
[
1024
];
wchar_t
fpath
[
1024
];
myswprintf
(
fpath
,
L"./expansions/%ls"
,
name
);
myswprintf
(
fpath
,
L"./expansions/%ls"
,
name
);
#ifdef _WIN32
#ifdef _WIN32
dataManager
.
FileSystem
->
addFileArchive
(
fpath
,
true
,
false
);
dataManager
.
FileSystem
->
addFileArchive
(
fpath
,
true
,
false
,
EFAT_ZIP
);
#else
#else
char
upath
[
1024
];
char
upath
[
1024
];
BufferIO
::
EncodeUTF8
(
fpath
,
upath
);
BufferIO
::
EncodeUTF8
(
fpath
,
upath
);
dataManager
.
FileSystem
->
addFileArchive
(
upath
,
true
,
false
);
dataManager
.
FileSystem
->
addFileArchive
(
upath
,
true
,
false
,
EFAT_ZIP
);
#endif
#endif
}
}
});
});
...
...
gframe/game.h
View file @
3d34ed80
...
@@ -186,6 +186,12 @@ public:
...
@@ -186,6 +186,12 @@ public:
return
focus
&&
focus
->
hasType
(
type
);
return
focus
&&
focus
->
hasType
(
type
);
}
}
void
TrimText
(
irr
::
gui
::
IGUIElement
*
editbox
)
const
{
irr
::
core
::
stringw
text
(
editbox
->
getText
());
text
.
trim
();
editbox
->
setText
(
text
.
c_str
());
}
void
OnResize
();
void
OnResize
();
recti
Resize
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
recti
Resize
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
recti
Resize
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
,
s32
dx
,
s32
dy
,
s32
dx2
,
s32
dy2
);
recti
Resize
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
,
s32
dx
,
s32
dy
,
s32
dx2
,
s32
dy2
);
...
@@ -780,6 +786,7 @@ extern Game* mainGame;
...
@@ -780,6 +786,7 @@ extern Game* mainGame;
#define BUTTON_MARKS_FILTER 322
#define BUTTON_MARKS_FILTER 322
#define BUTTON_MARKERS_OK 323
#define BUTTON_MARKERS_OK 323
#define COMBOBOX_SORTTYPE 324
#define COMBOBOX_SORTTYPE 324
#define EDITBOX_INPUTS 325
#define WINDOW_DECK_MANAGE 330
#define WINDOW_DECK_MANAGE 330
#define BUTTON_NEW_CATEGORY 331
#define BUTTON_NEW_CATEGORY 331
#define BUTTON_RENAME_CATEGORY 332
#define BUTTON_RENAME_CATEGORY 332
...
...
gframe/menu_handler.cpp
View file @
3d34ed80
...
@@ -64,6 +64,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -64,6 +64,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
}
}
case
BUTTON_JOIN_HOST
:
{
case
BUTTON_JOIN_HOST
:
{
bot_mode
=
false
;
bot_mode
=
false
;
mainGame
->
TrimText
(
mainGame
->
ebJoinHost
);
mainGame
->
TrimText
(
mainGame
->
ebJoinPort
);
char
ip
[
20
];
char
ip
[
20
];
const
wchar_t
*
pstr
=
mainGame
->
ebJoinHost
->
getText
();
const
wchar_t
*
pstr
=
mainGame
->
ebJoinHost
->
getText
();
BufferIO
::
CopyWStr
(
pstr
,
ip
,
16
);
BufferIO
::
CopyWStr
(
pstr
,
ip
,
16
);
...
...
gframe/replay_mode.cpp
View file @
3d34ed80
...
@@ -249,6 +249,7 @@ void ReplayMode::EndDuel() {
...
@@ -249,6 +249,7 @@ void ReplayMode::EndDuel() {
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isFinished
=
true
;
mainGame
->
dInfo
.
isFinished
=
true
;
mainGame
->
dInfo
.
isReplay
=
false
;
mainGame
->
dInfo
.
isReplay
=
false
;
mainGame
->
dInfo
.
isSingleMode
=
false
;
mainGame
->
gMutex
.
unlock
();
mainGame
->
gMutex
.
unlock
();
mainGame
->
closeDoneSignal
.
Reset
();
mainGame
->
closeDoneSignal
.
Reset
();
mainGame
->
closeSignal
.
Set
();
mainGame
->
closeSignal
.
Set
();
...
...
ocgcore
@
c48f5e5f
Subproject commit
3b89b5b5c6490f61f5f24a18afb42e36382f9879
Subproject commit
c48f5e5f179bfda57a0da32d0e1a0f14bcdd8884
premake5.lua
View file @
3d34ed80
...
@@ -10,7 +10,7 @@ solution "ygo"
...
@@ -10,7 +10,7 @@ solution "ygo"
end
end
configurations
{
"Release"
,
"Debug"
}
configurations
{
"Release"
,
"Debug"
}
if
os.getenv
(
"YGOPRO_LUA_SA
V
E"
)
then
if
os.getenv
(
"YGOPRO_LUA_SA
F
E"
)
then
defines
{
"LUA_COMPAT_5_2"
,
"YGOPRO_LUA_SAFE"
}
defines
{
"LUA_COMPAT_5_2"
,
"YGOPRO_LUA_SAFE"
}
else
else
defines
{
"LUA_COMPAT_5_2"
}
defines
{
"LUA_COMPAT_5_2"
}
...
...
script
@
8fb7f95a
Subproject commit
15b39359eb08b50a695536752fe813c33f1d0445
Subproject commit
8fb7f95a65d6b7ccb5ec565e95df34139ca9439a
strings.conf
View file @
3d34ed80
...
@@ -1038,3 +1038,7 @@
...
@@ -1038,3 +1038,7 @@
!
setname
0
x2142
黄金国永生药 エルドリクシル
!
setname
0
x2142
黄金国永生药 エルドリクシル
!
setname
0
x143
黄金乡 黄金郷
!
setname
0
x143
黄金乡 黄金郷
!
setname
0
x144
幻魔
!
setname
0
x144
幻魔
!
setname
0
x145
教导 ドラグマ
!
setname
0
x146
童话动物 メルフィー
!
setname
0
x147
波波 ポータン
!
setname
0
x148
罗兰 ローラン
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