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
45556faa
Commit
45556faa
authored
Aug 08, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
6f962667
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
40 deletions
+39
-40
gframe/gframe.cpp
gframe/gframe.cpp
+39
-40
No files found.
gframe/gframe.cpp
View file @
45556faa
...
...
@@ -3,10 +3,11 @@
#include "data_manager.h"
#include <event2/thread.h>
int
enable_log
=
1
;
int
enable_log
=
0
;
#ifdef YGOPRO_SERVER_MODE
enable_log
=
1
;
#else
bool
exit_on_return
=
false
;
bool
runasserver
=
true
;
bool
keep_on_return
=
false
;
bool
open_file
=
false
;
wchar_t
open_file_name
[
256
]
=
L""
;
...
...
@@ -26,7 +27,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
;
...
...
@@ -34,7 +34,8 @@ void ClickButton(irr::gui::IGUIElement* btn) {
event
.
GUIEvent
.
Caller
=
btn
;
ygo
::
mainGame
->
device
->
postEventFromUser
(
event
);
}
*/
#endif //YGOPRO_SERVER_MODE
int
main
(
int
argc
,
char
*
argv
[])
{
#ifndef _WIN32
setlocale
(
LC_CTYPE
,
"UTF-8"
);
...
...
@@ -58,40 +59,38 @@ int main(int argc, char* argv[]) {
evthread_use_pthreads
();
#endif //_WIN32
ygo
::
Game
_game
;
if
(
runasserver
){
ygo
::
aServerPort
=
7911
;
ygo
::
aServerPort
=
atoi
(
argv
[
1
]);
ygo
::
lflist
=
atoi
(
argv
[
2
]);
ygo
::
start_hand
=
0
;
ygo
::
replay_mode
=
0
;
if
(
argc
>
2
)
{
ygo
::
rule
=
atoi
(
argv
[
3
]);
ygo
::
mode
=
atoi
(
argv
[
4
]);
if
(
argv
[
5
][
0
]
==
'T'
)
ygo
::
duel_rule
=
DEFAULT_DUEL_RULE
-
1
;
else
ygo
::
duel_rule
=
DEFAULT_DUEL_RULE
;
if
(
argv
[
6
][
0
]
==
'T'
)
ygo
::
no_check_deck
=
true
;
else
ygo
::
no_check_deck
=
false
;
if
(
argv
[
7
][
0
]
==
'T'
)
ygo
::
no_shuffle_deck
=
true
;
else
ygo
::
no_shuffle_deck
=
false
;
ygo
::
start_lp
=
atoi
(
argv
[
8
]);
ygo
::
start_hand
=
atoi
(
argv
[
9
]);
ygo
::
draw_count
=
atoi
(
argv
[
10
]);
ygo
::
time_limit
=
atoi
(
argv
[
11
]);
if
(
argc
>
12
)
ygo
::
replay_mode
=
atoi
(
argv
[
12
]);
}
ygo
::
mainGame
=
&
_game
;
ygo
::
mainGame
->
MainServerLoop
(
ygo
::
mode
,
ygo
::
lflist
);
return
0
;
#ifdef YGOPRO_SERVER_MODE
ygo
::
aServerPort
=
7911
;
ygo
::
aServerPort
=
atoi
(
argv
[
1
]);
ygo
::
lflist
=
atoi
(
argv
[
2
]);
ygo
::
start_hand
=
0
;
if
(
argc
>
2
)
{
ygo
::
rule
=
atoi
(
argv
[
3
]);
ygo
::
mode
=
atoi
(
argv
[
4
]);
if
(
ygo
::
mode
>
2
)
ygo
::
mode
=
0
;
if
(
argv
[
5
][
0
]
==
'T'
)
ygo
::
duel_rule
=
DEFAULT_DUEL_RULE
-
1
;
else
ygo
::
duel_rule
=
DEFAULT_DUEL_RULE
;
if
(
argv
[
6
][
0
]
==
'T'
)
ygo
::
no_check_deck
=
true
;
else
ygo
::
no_check_deck
=
false
;
if
(
argv
[
7
][
0
]
==
'T'
)
ygo
::
no_shuffle_deck
=
true
;
else
ygo
::
no_shuffle_deck
=
false
;
ygo
::
start_lp
=
atoi
(
argv
[
8
]);
ygo
::
start_hand
=
atoi
(
argv
[
9
]);
ygo
::
draw_count
=
atoi
(
argv
[
10
]);
ygo
::
time_limit
=
atoi
(
argv
[
11
]);
ygo
::
replay_mode
=
atoi
(
argv
[
12
]);
}
/*
ygo
::
mainGame
=
&
_game
;
ygo
::
mainGame
->
MainServerLoop
(
ygo
::
mode
,
ygo
::
lflist
);
return
0
;
#else
ygo
::
mainGame
=
&
_game
;
if
(
!
ygo
::
mainGame
->
Initialize
())
return
0
;
...
...
@@ -186,8 +185,8 @@ int main(int argc, char* argv[]) {
#ifdef _WIN32
WSACleanup
();
#else
#endif //_WIN32
*/
#endif //YGOPRO_SERVER_MODE
return
EXIT_SUCCESS
;
}
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