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
nanahira
ygopro
Commits
9b9ddb8d
Commit
9b9ddb8d
authored
Dec 31, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backward compatibility
parent
2fa138f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
gframe/gframe.cpp
gframe/gframe.cpp
+10
-3
No files found.
gframe/gframe.cpp
View file @
9b9ddb8d
...
...
@@ -17,7 +17,6 @@ void GetParameter(char* param, const char* arg) {
strcpy
(
param
,
arg1
);
#endif
}
void
GetParameterW
(
wchar_t
*
param
,
const
char
*
arg
)
{
#ifdef _WIN32
MultiByteToWideChar
(
CP_ACP
,
0
,
arg
,
-
1
,
param
,
260
);
...
...
@@ -25,7 +24,6 @@ void GetParameterW(wchar_t* param, const char* arg) {
BufferIO
::
DecodeUTF8
(
arg
,
param
);
#endif
}
void
ClickButton
(
irr
::
gui
::
IGUIElement
*
btn
)
{
irr
::
SEvent
event
;
event
.
EventType
=
irr
::
EET_GUI_EVENT
;
...
...
@@ -50,31 +48,41 @@ int main(int argc, char* argv[]) {
return
0
;
for
(
int
i
=
1
;
i
<
argc
;
++
i
)
{
if
(
argv
[
i
][
0
]
==
'-'
&&
argv
[
i
][
1
]
==
'e'
)
{
char
param
[
128
];
GetParameter
(
param
,
&
argv
[
i
][
2
]);
ygo
::
dataManager
.
LoadDB
(
param
);
}
if
(
!
strcmp
(
argv
[
i
],
"-e"
))
{
// extra database
++
i
;
char
param
[
128
];
GetParameter
(
param
,
&
argv
[
i
][
0
]);
ygo
::
dataManager
.
LoadDB
(
param
);
continue
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-n"
))
{
// nickName
++
i
;
wchar_t
param
[
128
];
GetParameterW
(
param
,
&
argv
[
i
][
0
]);
ygo
::
mainGame
->
ebNickName
->
setText
(
param
);
continue
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-h"
))
{
// Host address
++
i
;
wchar_t
param
[
128
];
GetParameterW
(
param
,
&
argv
[
i
][
0
]);
ygo
::
mainGame
->
ebJoinIP
->
setText
(
param
);
continue
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-p"
))
{
// host Port
++
i
;
wchar_t
param
[
128
];
GetParameterW
(
param
,
&
argv
[
i
][
0
]);
ygo
::
mainGame
->
ebJoinPort
->
setText
(
param
);
continue
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-w"
))
{
// host passWord
++
i
;
wchar_t
param
[
128
];
GetParameterW
(
param
,
&
argv
[
i
][
0
]);
ygo
::
mainGame
->
ebJoinPass
->
setText
(
param
);
continue
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-x"
))
{
// eXit on return
exit_on_return
=
true
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-j"
))
{
// Join host
...
...
@@ -107,7 +115,6 @@ int main(int argc, char* argv[]) {
ClickButton
(
ygo
::
mainGame
->
btnLoadSinglePlay
);
break
;
}
}
ygo
::
mainGame
->
MainLoop
();
#ifdef _WIN32
...
...
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