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
baichixing
ygopro
Commits
7e4ab6b4
Commit
7e4ab6b4
authored
Feb 24, 2018
by
mercury233
Committed by
GitHub
Feb 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update directly open ydk and yrp file (#2090)
parent
bbbf15cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
gframe/config.h
gframe/config.h
+6
-0
gframe/gframe.cpp
gframe/gframe.cpp
+18
-0
No files found.
gframe/config.h
View file @
7e4ab6b4
...
@@ -13,8 +13,12 @@
...
@@ -13,8 +13,12 @@
#ifdef _MSC_VER
#ifdef _MSC_VER
#define myswprintf _swprintf
#define myswprintf _swprintf
#define mywcsncasecmp _wcsnicmp
#define mystrncasecmp _strnicmp
#else
#else
#define myswprintf swprintf
#define myswprintf swprintf
#define mywcsncasecmp wcsncasecmp
#define mystrncasecmp strncasecmp
#endif
#endif
#define socklen_t int
#define socklen_t int
...
@@ -41,6 +45,8 @@
...
@@ -41,6 +45,8 @@
#include <wchar.h>
#include <wchar.h>
#define myswprintf(buf, fmt, ...) swprintf(buf, 4096, fmt, ##__VA_ARGS__)
#define myswprintf(buf, fmt, ...) swprintf(buf, 4096, fmt, ##__VA_ARGS__)
#define mywcsncasecmp wcsncasecmp
#define mystrncasecmp strncasecmp
inline
int
_wtoi
(
const
wchar_t
*
s
)
{
inline
int
_wtoi
(
const
wchar_t
*
s
)
{
wchar_t
*
endptr
;
wchar_t
*
endptr
;
return
(
int
)
wcstol
(
s
,
&
endptr
,
10
);
return
(
int
)
wcstol
(
s
,
&
endptr
,
10
);
...
...
gframe/gframe.cpp
View file @
7e4ab6b4
...
@@ -78,6 +78,7 @@ int main(int argc, char* argv[]) {
...
@@ -78,6 +78,7 @@ int main(int argc, char* argv[]) {
char
param
[
128
];
char
param
[
128
];
GetParameter
(
param
,
&
argv
[
i
][
2
]);
GetParameter
(
param
,
&
argv
[
i
][
2
]);
ygo
::
dataManager
.
LoadDB
(
param
);
ygo
::
dataManager
.
LoadDB
(
param
);
continue
;
}
}
if
(
!
strcmp
(
argv
[
i
],
"-e"
))
{
// extra database
if
(
!
strcmp
(
argv
[
i
],
"-e"
))
{
// extra database
++
i
;
++
i
;
...
@@ -156,6 +157,23 @@ int main(int argc, char* argv[]) {
...
@@ -156,6 +157,23 @@ int main(int argc, char* argv[]) {
if
(
open_file
)
if
(
open_file
)
ClickButton
(
ygo
::
mainGame
->
btnLoadSinglePlay
);
ClickButton
(
ygo
::
mainGame
->
btnLoadSinglePlay
);
break
;
break
;
}
else
if
(
argc
==
2
&&
strlen
(
argv
[
1
])
>=
4
)
{
char
*
pstrext
=
argv
[
1
]
+
strlen
(
argv
[
1
])
-
4
;
if
(
!
mystrncasecmp
(
pstrext
,
".ydk"
,
4
))
{
open_file
=
true
;
GetParameterW
(
open_file_name
,
&
argv
[
1
][
0
]);
exit_on_return
=
!
keep_on_return
;
ClickButton
(
ygo
::
mainGame
->
btnDeckEdit
);
break
;
}
if
(
!
mystrncasecmp
(
pstrext
,
".yrp"
,
4
))
{
open_file
=
true
;
GetParameterW
(
open_file_name
,
&
argv
[
1
][
0
]);
exit_on_return
=
!
keep_on_return
;
ClickButton
(
ygo
::
mainGame
->
btnReplayMode
);
ClickButton
(
ygo
::
mainGame
->
btnLoadReplay
);
break
;
}
}
}
}
}
ygo
::
mainGame
->
MainLoop
();
ygo
::
mainGame
->
MainLoop
();
...
...
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