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
0e6376ba
Commit
0e6376ba
authored
Sep 28, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fh' into resize
parents
8283f093
9c9cc97e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
125 additions
and
75 deletions
+125
-75
gframe/client_field.cpp
gframe/client_field.cpp
+34
-4
gframe/drawing.cpp
gframe/drawing.cpp
+2
-2
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-2
gframe/event_handler.cpp
gframe/event_handler.cpp
+4
-7
gframe/game.cpp
gframe/game.cpp
+7
-0
gframe/game.h
gframe/game.h
+3
-0
gframe/gframe.cpp
gframe/gframe.cpp
+69
-57
strings.conf
strings.conf
+1
-0
system.conf
system.conf
+3
-3
No files found.
gframe/client_field.cpp
View file @
0e6376ba
...
@@ -1424,8 +1424,23 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
...
@@ -1424,8 +1424,23 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
ancard
.
push_back
(
trycode
);
ancard
.
push_back
(
trycode
);
return
;
return
;
}
}
if
((
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
&&
!
enter
)
if
((
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
&&
!
enter
)
{
return
;
std
::
vector
<
int
>
cache
;
cache
.
swap
(
ancard
);
int
sel
=
mainGame
->
lstANCard
->
getSelected
();
int
selcode
=
(
sel
==
-
1
)
?
0
:
cache
[
sel
];
mainGame
->
lstANCard
->
clear
();
for
(
const
auto
&
trycode
:
cache
)
{
if
(
dataManager
.
GetString
(
trycode
,
&
cstr
)
&&
dataManager
.
GetData
(
trycode
,
&
cd
)
&&
is_declarable
(
cd
,
declarable_type
))
{
ancard
.
push_back
(
trycode
);
mainGame
->
lstANCard
->
addItem
(
cstr
.
name
.
c_str
());
if
(
trycode
==
selcode
)
mainGame
->
lstANCard
->
setSelected
(
cstr
.
name
.
c_str
());
}
}
if
(
!
ancard
.
empty
())
return
;
}
mainGame
->
lstANCard
->
clear
();
mainGame
->
lstANCard
->
clear
();
ancard
.
clear
();
ancard
.
clear
();
for
(
auto
cit
=
dataManager
.
_strings
.
begin
();
cit
!=
dataManager
.
_strings
.
end
();
++
cit
)
{
for
(
auto
cit
=
dataManager
.
_strings
.
begin
();
cit
!=
dataManager
.
_strings
.
end
();
++
cit
)
{
...
@@ -1456,8 +1471,23 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
...
@@ -1456,8 +1471,23 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
ancard
.
push_back
(
trycode
);
ancard
.
push_back
(
trycode
);
return
;
return
;
}
}
if
((
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
&&
!
enter
)
if
((
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
&&
!
enter
)
{
return
;
std
::
vector
<
int
>
cache
;
cache
.
swap
(
ancard
);
int
sel
=
mainGame
->
lstANCard
->
getSelected
();
int
selcode
=
(
sel
==
-
1
)
?
0
:
cache
[
sel
];
mainGame
->
lstANCard
->
clear
();
for
(
const
auto
&
trycode
:
cache
)
{
if
(
dataManager
.
GetString
(
trycode
,
&
cstr
)
&&
dataManager
.
GetData
(
trycode
,
&
cd
)
&&
is_declarable
(
cd
,
opcode
))
{
ancard
.
push_back
(
trycode
);
mainGame
->
lstANCard
->
addItem
(
cstr
.
name
.
c_str
());
if
(
trycode
==
selcode
)
mainGame
->
lstANCard
->
setSelected
(
cstr
.
name
.
c_str
());
}
}
if
(
!
ancard
.
empty
())
return
;
}
mainGame
->
lstANCard
->
clear
();
mainGame
->
lstANCard
->
clear
();
ancard
.
clear
();
ancard
.
clear
();
for
(
auto
cit
=
dataManager
.
_strings
.
begin
();
cit
!=
dataManager
.
_strings
.
end
();
++
cit
)
{
for
(
auto
cit
=
dataManager
.
_strings
.
begin
();
cit
!=
dataManager
.
_strings
.
end
();
++
cit
)
{
...
...
gframe/drawing.cpp
View file @
0e6376ba
...
@@ -958,7 +958,7 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) {
...
@@ -958,7 +958,7 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) {
FadingUnit
fu
;
FadingUnit
fu
;
fu
.
fadingSize
=
win
->
getRelativePosition
();
fu
.
fadingSize
=
win
->
getRelativePosition
();
for
(
auto
fit
=
fadingList
.
begin
();
fit
!=
fadingList
.
end
();
++
fit
)
for
(
auto
fit
=
fadingList
.
begin
();
fit
!=
fadingList
.
end
();
++
fit
)
if
(
win
==
fit
->
guiFading
)
if
(
win
==
fit
->
guiFading
&&
win
!=
wOptions
)
// the size of wOptions is always setted by ClientField::ShowSelectOption before showing it
fu
.
fadingSize
=
fit
->
fadingSize
;
fu
.
fadingSize
=
fit
->
fadingSize
;
irr
::
core
::
position2di
center
=
fu
.
fadingSize
.
getCenter
();
irr
::
core
::
position2di
center
=
fu
.
fadingSize
.
getCenter
();
fu
.
fadingDiff
.
X
=
fu
.
fadingSize
.
getWidth
()
/
10
;
fu
.
fadingDiff
.
X
=
fu
.
fadingSize
.
getWidth
()
/
10
;
...
@@ -1033,7 +1033,7 @@ void Game::PopupElement(irr::gui::IGUIElement * element, int hideframe) {
...
@@ -1033,7 +1033,7 @@ void Game::PopupElement(irr::gui::IGUIElement * element, int hideframe) {
}
}
void
Game
::
WaitFrameSignal
(
int
frame
)
{
void
Game
::
WaitFrameSignal
(
int
frame
)
{
frameSignal
.
Reset
();
frameSignal
.
Reset
();
signalFrame
=
frame
;
signalFrame
=
(
gameConf
.
quick_animation
&&
frame
>=
12
)
?
12
:
frame
;
frameSignal
.
Wait
();
frameSignal
.
Wait
();
}
}
void
Game
::
DrawThumb
(
code_pointer
cp
,
position2di
pos
,
std
::
unordered_map
<
int
,
int
>*
lflist
,
bool
drag
)
{
void
Game
::
DrawThumb
(
code_pointer
cp
,
position2di
pos
,
std
::
unordered_map
<
int
,
int
>*
lflist
,
bool
drag
)
{
...
...
gframe/duelclient.cpp
View file @
0e6376ba
...
@@ -3382,7 +3382,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3382,7 +3382,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
dField
.
UpdateDeclarableCode
(
tru
e
);
mainGame
->
dField
.
UpdateDeclarableCode
(
fals
e
);
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
...
@@ -3421,7 +3421,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3421,7 +3421,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
dField
.
UpdateDeclarableCode
(
tru
e
);
mainGame
->
dField
.
UpdateDeclarableCode
(
fals
e
);
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
...
...
gframe/event_handler.cpp
View file @
0e6376ba
...
@@ -1414,13 +1414,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1414,13 +1414,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
break
;
if
(
event
.
MouseInput
.
isLeftPressed
())
if
(
event
.
MouseInput
.
isLeftPressed
())
break
;
break
;
s32
x
=
event
.
MouseInput
.
X
;
if
(
mainGame
->
gameConf
.
control_mode
==
1
&&
event
.
MouseInput
.
X
>
300
*
mainGame
->
xScale
)
{
s32
y
=
event
.
MouseInput
.
Y
;
irr
::
core
::
position2di
pos
(
x
,
y
);
irr
::
gui
::
IGUIElement
*
root
=
mainGame
->
env
->
getRootGUIElement
();
if
(
root
->
getElementFromPoint
(
pos
)
==
mainGame
->
btnCancelOrFinish
)
mainGame
->
chkHideHintButton
->
setChecked
(
true
);
if
(
mainGame
->
gameConf
.
control_mode
==
1
&&
x
>
300
*
mainGame
->
xScale
)
{
mainGame
->
ignore_chain
=
event
.
MouseInput
.
isRightPressed
();
mainGame
->
ignore_chain
=
event
.
MouseInput
.
isRightPressed
();
mainGame
->
always_chain
=
false
;
mainGame
->
always_chain
=
false
;
mainGame
->
chain_when_avail
=
false
;
mainGame
->
chain_when_avail
=
false
;
...
@@ -1836,6 +1830,9 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -1836,6 +1830,9 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return
true
;
return
true
;
break
;
break
;
}
}
case
CHECKBOX_QUICK_ANIMATION
:
{
mainGame
->
gameConf
.
quick_animation
=
mainGame
->
chkQuickAnimation
->
isChecked
()
?
1
:
0
;
}
}
}
break
;
break
;
}
}
...
...
gframe/game.cpp
View file @
0e6376ba
...
@@ -269,6 +269,9 @@ bool Game::Initialize() {
...
@@ -269,6 +269,9 @@ bool Game::Initialize() {
posY
+=
30
;
posY
+=
30
;
chkWaitChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
-
1
,
dataManager
.
GetSysString
(
1277
));
chkWaitChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
-
1
,
dataManager
.
GetSysString
(
1277
));
chkWaitChain
->
setChecked
(
gameConf
.
chkWaitChain
!=
0
);
chkWaitChain
->
setChecked
(
gameConf
.
chkWaitChain
!=
0
);
posY
+=
30
;
chkQuickAnimation
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
CHECKBOX_QUICK_ANIMATION
,
dataManager
.
GetSysString
(
1299
));
chkQuickAnimation
->
setChecked
(
gameConf
.
quick_animation
!=
0
);
//system
//system
irr
::
gui
::
IGUITab
*
tabSystem
=
wInfos
->
addTab
(
dataManager
.
GetSysString
(
1273
));
irr
::
gui
::
IGUITab
*
tabSystem
=
wInfos
->
addTab
(
dataManager
.
GetSysString
(
1273
));
posY
=
20
;
posY
=
20
;
...
@@ -1071,6 +1074,7 @@ void Game::LoadConfig() {
...
@@ -1071,6 +1074,7 @@ void Game::LoadConfig() {
gameConf
.
chkIgnoreDeckChanges
=
0
;
gameConf
.
chkIgnoreDeckChanges
=
0
;
gameConf
.
defaultOT
=
1
;
gameConf
.
defaultOT
=
1
;
gameConf
.
enable_bot_mode
=
0
;
gameConf
.
enable_bot_mode
=
0
;
gameConf
.
quick_animation
=
0
;
gameConf
.
enable_sound
=
true
;
gameConf
.
enable_sound
=
true
;
gameConf
.
sound_volume
=
0.5
;
gameConf
.
sound_volume
=
0.5
;
gameConf
.
enable_music
=
true
;
gameConf
.
enable_music
=
true
;
...
@@ -1142,6 +1146,8 @@ void Game::LoadConfig() {
...
@@ -1142,6 +1146,8 @@ void Game::LoadConfig() {
gameConf
.
defaultOT
=
atoi
(
valbuf
);
gameConf
.
defaultOT
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"enable_bot_mode"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"enable_bot_mode"
))
{
gameConf
.
enable_bot_mode
=
atoi
(
valbuf
);
gameConf
.
enable_bot_mode
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"quick_animation"
))
{
gameConf
.
quick_animation
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"window_maximized"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"window_maximized"
))
{
gameConf
.
window_maximized
=
atoi
(
valbuf
)
>
0
;
gameConf
.
window_maximized
=
atoi
(
valbuf
)
>
0
;
}
else
if
(
!
strcmp
(
strbuf
,
"window_width"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"window_width"
))
{
...
@@ -1222,6 +1228,7 @@ void Game::SaveConfig() {
...
@@ -1222,6 +1228,7 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"ignore_deck_changes = %d
\n
"
,
(
chkIgnoreDeckChanges
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"ignore_deck_changes = %d
\n
"
,
(
chkIgnoreDeckChanges
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"default_ot = %d
\n
"
,
gameConf
.
defaultOT
);
fprintf
(
fp
,
"default_ot = %d
\n
"
,
gameConf
.
defaultOT
);
fprintf
(
fp
,
"enable_bot_mode = %d
\n
"
,
gameConf
.
enable_bot_mode
);
fprintf
(
fp
,
"enable_bot_mode = %d
\n
"
,
gameConf
.
enable_bot_mode
);
fprintf
(
fp
,
"quick_animation = %d
\n
"
,
gameConf
.
quick_animation
);
fprintf
(
fp
,
"window_maximized = %d
\n
"
,
(
gameConf
.
window_maximized
?
1
:
0
));
fprintf
(
fp
,
"window_maximized = %d
\n
"
,
(
gameConf
.
window_maximized
?
1
:
0
));
fprintf
(
fp
,
"window_width = %d
\n
"
,
gameConf
.
window_width
);
fprintf
(
fp
,
"window_width = %d
\n
"
,
gameConf
.
window_width
);
fprintf
(
fp
,
"window_height = %d
\n
"
,
gameConf
.
window_height
);
fprintf
(
fp
,
"window_height = %d
\n
"
,
gameConf
.
window_height
);
...
...
gframe/game.h
View file @
0e6376ba
...
@@ -42,6 +42,7 @@ struct Config {
...
@@ -42,6 +42,7 @@ struct Config {
int
chkIgnoreDeckChanges
;
int
chkIgnoreDeckChanges
;
int
defaultOT
;
int
defaultOT
;
int
enable_bot_mode
;
int
enable_bot_mode
;
int
quick_animation
;
bool
enable_sound
;
bool
enable_sound
;
bool
enable_music
;
bool
enable_music
;
double
sound_volume
;
double
sound_volume
;
...
@@ -264,6 +265,7 @@ public:
...
@@ -264,6 +265,7 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkRandomPos
;
irr
::
gui
::
IGUICheckBox
*
chkRandomPos
;
irr
::
gui
::
IGUICheckBox
*
chkAutoChain
;
irr
::
gui
::
IGUICheckBox
*
chkAutoChain
;
irr
::
gui
::
IGUICheckBox
*
chkWaitChain
;
irr
::
gui
::
IGUICheckBox
*
chkWaitChain
;
irr
::
gui
::
IGUICheckBox
*
chkQuickAnimation
;
irr
::
gui
::
IGUICheckBox
*
chkHideSetname
;
irr
::
gui
::
IGUICheckBox
*
chkHideSetname
;
irr
::
gui
::
IGUICheckBox
*
chkHideHintButton
;
irr
::
gui
::
IGUICheckBox
*
chkHideHintButton
;
irr
::
gui
::
IGUICheckBox
*
chkIgnoreDeckChanges
;
irr
::
gui
::
IGUICheckBox
*
chkIgnoreDeckChanges
;
...
@@ -667,6 +669,7 @@ extern Game* mainGame;
...
@@ -667,6 +669,7 @@ extern Game* mainGame;
#define BUTTON_WINDOW_RESIZE_M 366
#define BUTTON_WINDOW_RESIZE_M 366
#define BUTTON_WINDOW_RESIZE_L 367
#define BUTTON_WINDOW_RESIZE_L 367
#define BUTTON_WINDOW_RESIZE_XL 368
#define BUTTON_WINDOW_RESIZE_XL 368
#define CHECKBOX_QUICK_ANIMATION 369
#define COMBOBOX_SORTTYPE 370
#define COMBOBOX_SORTTYPE 370
#define COMBOBOX_LIMIT 371
#define COMBOBOX_LIMIT 371
...
...
gframe/gframe.cpp
View file @
0e6376ba
...
@@ -12,9 +12,6 @@ bool open_file = false;
...
@@ -12,9 +12,6 @@ bool open_file = false;
wchar_t
open_file_name
[
256
]
=
L""
;
wchar_t
open_file_name
[
256
]
=
L""
;
bool
bot_mode
=
false
;
bool
bot_mode
=
false
;
void
GetParameterW
(
wchar_t
*
param
,
const
char
*
arg
)
{
BufferIO
::
DecodeUTF8
(
arg
,
param
);
}
void
ClickButton
(
irr
::
gui
::
IGUIElement
*
btn
)
{
void
ClickButton
(
irr
::
gui
::
IGUIElement
*
btn
)
{
irr
::
SEvent
event
;
irr
::
SEvent
event
;
event
.
EventType
=
irr
::
EET_GUI_EVENT
;
event
.
EventType
=
irr
::
EET_GUI_EVENT
;
...
@@ -38,11 +35,15 @@ int main(int argc, char* argv[]) {
...
@@ -38,11 +35,15 @@ int main(int argc, char* argv[]) {
#endif //__APPLE__
#endif //__APPLE__
#ifdef _WIN32
#ifdef _WIN32
#ifndef _DEBUG
#ifndef _DEBUG
wchar_t
exepath
[
MAX_PATH
];
char
*
pstrext
;
GetModuleFileNameW
(
NULL
,
exepath
,
MAX_PATH
);
if
(
argc
==
2
&&
(
pstrext
=
strrchr
(
argv
[
1
],
'.'
))
wchar_t
*
p
=
wcsrchr
(
exepath
,
'\\'
);
&&
(
!
mystrncasecmp
(
pstrext
,
".ydk"
,
4
)
||
!
mystrncasecmp
(
pstrext
,
".yrp"
,
4
)))
{
*
p
=
'\0'
;
wchar_t
exepath
[
MAX_PATH
];
SetCurrentDirectoryW
(
exepath
);
GetModuleFileNameW
(
NULL
,
exepath
,
MAX_PATH
);
wchar_t
*
p
=
wcsrchr
(
exepath
,
'\\'
);
*
p
=
'\0'
;
SetCurrentDirectoryW
(
exepath
);
}
#endif //_DEBUG
#endif //_DEBUG
#endif //_WIN32
#endif //_WIN32
#ifdef _WIN32
#ifdef _WIN32
...
@@ -60,107 +61,113 @@ int main(int argc, char* argv[]) {
...
@@ -60,107 +61,113 @@ int main(int argc, char* argv[]) {
return
0
;
return
0
;
#ifdef _WIN32
#ifdef _WIN32
wchar_t
*
command
=
GetCommandLineW
();
int
wargc
;
char
buffer
[
2048
];
wchar_t
**
wargv
=
CommandLineToArgvW
(
GetCommandLineW
(),
&
wargc
);
BufferIO
::
EncodeUTF8
(
command
,
buffer
);
#else
argv
[
0
]
=
strtok
(
buffer
,
" "
);
int
wargc
=
argc
;
for
(
int
i
=
1
;
i
<
argc
;
++
i
)
wchar_t
(
*
wargv
)[
256
]
=
new
wchar_t
[
wargc
][
256
];
argv
[
i
]
=
strtok
(
NULL
,
" "
);
for
(
int
i
=
0
;
i
<
argc
;
++
i
)
{
#endif // _WIN32
BufferIO
::
DecodeUTF8
(
argv
[
i
],
wargv
[
i
]);
}
#endif //_WIN32
bool
keep_on_return
=
false
;
bool
keep_on_return
=
false
;
for
(
int
i
=
1
;
i
<
argc
;
++
i
)
{
for
(
int
i
=
1
;
i
<
wargc
;
++
i
)
{
if
(
argv
[
i
][
0
]
==
'-'
&&
argv
[
i
][
1
]
==
'e'
)
{
if
(
wargv
[
i
][
0
]
==
L'-'
&&
wargv
[
i
][
1
]
==
L'e'
&&
wargv
[
i
][
2
]
!=
L'\0'
)
{
ygo
::
dataManager
.
LoadDB
(
&
argv
[
i
][
2
]);
char
param
[
128
];
BufferIO
::
EncodeUTF8
(
&
wargv
[
i
][
2
],
param
);
ygo
::
dataManager
.
LoadDB
(
param
);
continue
;
continue
;
}
}
if
(
!
strcmp
(
argv
[
i
],
"-e"
))
{
// extra database
if
(
!
wcscmp
(
wargv
[
i
],
L
"-e"
))
{
// extra database
++
i
;
++
i
;
ygo
::
dataManager
.
LoadDB
(
&
argv
[
i
][
0
]);
if
(
i
<
wargc
)
{
char
param
[
128
];
BufferIO
::
EncodeUTF8
(
wargv
[
i
],
param
);
ygo
::
dataManager
.
LoadDB
(
param
);
}
continue
;
continue
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-n"
))
{
// nickName
}
else
if
(
!
wcscmp
(
wargv
[
i
],
L
"-n"
))
{
// nickName
++
i
;
++
i
;
wchar_t
param
[
128
];
if
(
i
<
wargc
)
GetParameterW
(
param
,
&
argv
[
i
][
0
]);
ygo
::
mainGame
->
ebNickName
->
setText
(
wargv
[
i
]);
ygo
::
mainGame
->
ebNickName
->
setText
(
param
);
continue
;
continue
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-h"
))
{
// Host address
}
else
if
(
!
wcscmp
(
wargv
[
i
],
L
"-h"
))
{
// Host address
++
i
;
++
i
;
wchar_t
param
[
128
];
if
(
i
<
wargc
)
GetParameterW
(
param
,
&
argv
[
i
][
0
]);
ygo
::
mainGame
->
ebJoinHost
->
setText
(
wargv
[
i
]);
ygo
::
mainGame
->
ebJoinHost
->
setText
(
param
);
continue
;
continue
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-p"
))
{
// host Port
}
else
if
(
!
wcscmp
(
wargv
[
i
],
L
"-p"
))
{
// host Port
++
i
;
++
i
;
wchar_t
param
[
128
];
if
(
i
<
wargc
)
GetParameterW
(
param
,
&
argv
[
i
][
0
]);
ygo
::
mainGame
->
ebJoinPort
->
setText
(
wargv
[
i
]);
ygo
::
mainGame
->
ebJoinPort
->
setText
(
param
);
continue
;
continue
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-w"
))
{
// host passWord
}
else
if
(
!
wcscmp
(
wargv
[
i
],
L
"-w"
))
{
// host passWord
++
i
;
++
i
;
wchar_t
param
[
128
];
if
(
i
<
wargc
)
GetParameterW
(
param
,
&
argv
[
i
][
0
]);
ygo
::
mainGame
->
ebJoinPass
->
setText
(
wargv
[
i
]);
ygo
::
mainGame
->
ebJoinPass
->
setText
(
param
);
continue
;
continue
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-k"
))
{
// Keep on return
}
else
if
(
!
wcscmp
(
wargv
[
i
],
L
"-k"
))
{
// Keep on return
exit_on_return
=
false
;
exit_on_return
=
false
;
keep_on_return
=
true
;
keep_on_return
=
true
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-d"
))
{
// Deck
}
else
if
(
!
wcscmp
(
wargv
[
i
],
L
"-d"
))
{
// Deck
if
(
i
+
2
<
argc
)
{
// select deck
++
i
;
++
i
;
if
(
i
+
1
<
wargc
)
{
// select deck
GetParameterW
(
ygo
::
mainGame
->
gameConf
.
lastdeck
,
&
argv
[
i
][
0
]);
wcscpy
(
ygo
::
mainGame
->
gameConf
.
lastdeck
,
wargv
[
i
]);
continue
;
continue
;
}
else
{
// open deck
}
else
{
// open deck
exit_on_return
=
!
keep_on_return
;
exit_on_return
=
!
keep_on_return
;
if
(
i
<
argc
)
{
if
(
i
<
w
argc
)
{
open_file
=
true
;
open_file
=
true
;
GetParameterW
(
open_file_name
,
&
argv
[
i
+
1
][
0
]);
wcscpy
(
open_file_name
,
wargv
[
i
]);
}
}
ClickButton
(
ygo
::
mainGame
->
btnDeckEdit
);
ClickButton
(
ygo
::
mainGame
->
btnDeckEdit
);
break
;
break
;
}
}
}
else
if
(
!
strcmp
(
argv
[
i
],
"-c"
))
{
// Create host
}
else
if
(
!
wcscmp
(
wargv
[
i
],
L
"-c"
))
{
// Create host
exit_on_return
=
!
keep_on_return
;
exit_on_return
=
!
keep_on_return
;
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
ClickButton
(
ygo
::
mainGame
->
btnHostConfirm
);
ClickButton
(
ygo
::
mainGame
->
btnHostConfirm
);
break
;
break
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-j"
))
{
// Join host
}
else
if
(
!
wcscmp
(
wargv
[
i
],
L
"-j"
))
{
// Join host
exit_on_return
=
!
keep_on_return
;
exit_on_return
=
!
keep_on_return
;
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
ClickButton
(
ygo
::
mainGame
->
btnJoinHost
);
ClickButton
(
ygo
::
mainGame
->
btnJoinHost
);
break
;
break
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-r"
))
{
// Replay
}
else
if
(
!
wcscmp
(
wargv
[
i
],
L
"-r"
))
{
// Replay
exit_on_return
=
!
keep_on_return
;
exit_on_return
=
!
keep_on_return
;
if
(
i
<
argc
)
{
++
i
;
if
(
i
<
wargc
)
{
open_file
=
true
;
open_file
=
true
;
GetParameterW
(
open_file_name
,
&
argv
[
i
+
1
][
0
]);
wcscpy
(
open_file_name
,
wargv
[
i
]);
}
}
ClickButton
(
ygo
::
mainGame
->
btnReplayMode
);
ClickButton
(
ygo
::
mainGame
->
btnReplayMode
);
if
(
open_file
)
if
(
open_file
)
ClickButton
(
ygo
::
mainGame
->
btnLoadReplay
);
ClickButton
(
ygo
::
mainGame
->
btnLoadReplay
);
break
;
break
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-s"
))
{
// Single
}
else
if
(
!
wcscmp
(
wargv
[
i
],
L
"-s"
))
{
// Single
exit_on_return
=
!
keep_on_return
;
exit_on_return
=
!
keep_on_return
;
if
(
i
<
argc
)
{
++
i
;
if
(
i
<
wargc
)
{
open_file
=
true
;
open_file
=
true
;
GetParameterW
(
open_file_name
,
&
argv
[
i
+
1
][
0
]);
wcscpy
(
open_file_name
,
wargv
[
i
]);
}
}
ClickButton
(
ygo
::
mainGame
->
btnSingleMode
);
ClickButton
(
ygo
::
mainGame
->
btnSingleMode
);
if
(
open_file
)
if
(
open_file
)
ClickButton
(
ygo
::
mainGame
->
btnLoadSinglePlay
);
ClickButton
(
ygo
::
mainGame
->
btnLoadSinglePlay
);
break
;
break
;
}
else
if
(
argc
==
2
&&
strlen
(
argv
[
1
])
>=
4
)
{
}
else
if
(
wargc
==
2
&&
wcslen
(
w
argv
[
1
])
>=
4
)
{
char
*
pstrext
=
argv
[
1
]
+
strlen
(
argv
[
1
])
-
4
;
wchar_t
*
pstrext
=
wargv
[
1
]
+
wcslen
(
w
argv
[
1
])
-
4
;
if
(
!
my
strncasecmp
(
pstrext
,
".ydk"
,
4
))
{
if
(
!
my
wcsncasecmp
(
pstrext
,
L
".ydk"
,
4
))
{
open_file
=
true
;
open_file
=
true
;
GetParameterW
(
open_file_name
,
&
argv
[
1
][
0
]);
wcscpy
(
open_file_name
,
wargv
[
i
]);
exit_on_return
=
!
keep_on_return
;
exit_on_return
=
!
keep_on_return
;
ClickButton
(
ygo
::
mainGame
->
btnDeckEdit
);
ClickButton
(
ygo
::
mainGame
->
btnDeckEdit
);
break
;
break
;
}
}
if
(
!
my
strncasecmp
(
pstrext
,
".yrp"
,
4
))
{
if
(
!
my
wcsncasecmp
(
pstrext
,
L
".yrp"
,
4
))
{
open_file
=
true
;
open_file
=
true
;
GetParameterW
(
open_file_name
,
&
argv
[
1
][
0
]);
wcscpy
(
open_file_name
,
wargv
[
i
]);
exit_on_return
=
!
keep_on_return
;
exit_on_return
=
!
keep_on_return
;
ClickButton
(
ygo
::
mainGame
->
btnReplayMode
);
ClickButton
(
ygo
::
mainGame
->
btnReplayMode
);
ClickButton
(
ygo
::
mainGame
->
btnLoadReplay
);
ClickButton
(
ygo
::
mainGame
->
btnLoadReplay
);
...
@@ -168,6 +175,11 @@ int main(int argc, char* argv[]) {
...
@@ -168,6 +175,11 @@ int main(int argc, char* argv[]) {
}
}
}
}
}
}
#ifdef _WIN32
LocalFree
(
wargv
);
#else
delete
[]
wargv
;
#endif
ygo
::
mainGame
->
MainLoop
();
ygo
::
mainGame
->
MainLoop
();
#ifdef _WIN32
#ifdef _WIN32
WSACleanup
();
WSACleanup
();
...
...
strings.conf
View file @
0e6376ba
...
@@ -325,6 +325,7 @@
...
@@ -325,6 +325,7 @@
!
system
1296
完成选择
!
system
1296
完成选择
!
system
1297
切洗手卡
!
system
1297
切洗手卡
!
system
1298
辅助功能
!
system
1298
辅助功能
!
system
1299
加快动画效果
!
system
1300
禁限卡表:
!
system
1300
禁限卡表:
!
system
1301
卡组列表:
!
system
1301
卡组列表:
!
system
1302
保存
!
system
1302
保存
...
...
system.conf
View file @
0e6376ba
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
use_d3d
=
0
use_d3d
=
0
use_image_scale
=
1
use_image_scale
=
1
antialias
=
2
antialias
=
2
errorlog
=
1
errorlog
=
3
nickname
=
Player
nickname
=
Player
gamename
=
Game
gamename
=
Game
lastdeck
=
new
lastdeck
=
new
...
@@ -13,14 +13,14 @@ serverport = 7911
...
@@ -13,14 +13,14 @@ serverport = 7911
lasthost
=
127
.
0
.
0
.
1
lasthost
=
127
.
0
.
0
.
1
lastport
=
7911
lastport
=
7911
automonsterpos
=
0
automonsterpos
=
0
autospellpos
=
1
autospellpos
=
0
randompos
=
0
randompos
=
0
autochain
=
0
autochain
=
0
waitchain
=
0
waitchain
=
0
mute_opponent
=
0
mute_opponent
=
0
mute_spectators
=
0
mute_spectators
=
0
hide_setname
=
0
hide_setname
=
0
hide_hint_button
=
1
hide_hint_button
=
0
#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
control_mode
=
0
control_mode
=
0
draw_field_spell
=
1
draw_field_spell
=
1
...
...
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