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
9e00a5b1
Commit
9e00a5b1
authored
Sep 22, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename aServerPort
parent
b6f5b343
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
gframe/game.cpp
gframe/game.cpp
+3
-3
gframe/game.h
gframe/game.h
+1
-1
gframe/gframe.cpp
gframe/gframe.cpp
+2
-2
gframe/replay.cpp
gframe/replay.cpp
+3
-3
No files found.
gframe/game.cpp
View file @
9e00a5b1
...
...
@@ -23,7 +23,7 @@ namespace ygo {
Game
*
mainGame
;
#ifdef YGOPRO_SERVER_MODE
unsigned
short
aServerP
ort
;
unsigned
short
server_p
ort
;
unsigned
short
replay_mode
;
unsigned
int
pre_seed
[
3
];
HostInfo
game_info
;
...
...
@@ -33,9 +33,9 @@ void Game::MainServerLoop() {
dataManager
.
LoadDB
(
L"cards.cdb"
);
LoadExpansions
();
aServerPort
=
NetServer
::
StartServer
(
aServerP
ort
);
server_port
=
NetServer
::
StartServer
(
server_p
ort
);
NetServer
::
InitDuel
();
printf
(
"%u
\n
"
,
aServerP
ort
);
printf
(
"%u
\n
"
,
server_p
ort
);
fflush
(
stdout
);
while
(
NetServer
::
net_evbase
)
{
...
...
gframe/game.h
View file @
9e00a5b1
...
...
@@ -602,7 +602,7 @@ public:
extern
Game
*
mainGame
;
#ifdef YGOPRO_SERVER_MODE
extern
unsigned
short
aServerP
ort
;
extern
unsigned
short
server_p
ort
;
extern
unsigned
short
replay_mode
;
extern
HostInfo
game_info
;
extern
unsigned
int
pre_seed
[
3
];
...
...
gframe/gframe.cpp
View file @
9e00a5b1
...
...
@@ -61,7 +61,7 @@ int main(int argc, char* argv[]) {
ygo
::
Game
_game
;
#ifdef YGOPRO_SERVER_MODE
enable_log
=
1
;
ygo
::
aServerP
ort
=
7911
;
ygo
::
server_p
ort
=
7911
;
ygo
::
replay_mode
=
0
;
ygo
::
game_info
.
lflist
=
0
;
ygo
::
game_info
.
rule
=
0
;
...
...
@@ -76,7 +76,7 @@ int main(int argc, char* argv[]) {
for
(
int
i
=
0
;
i
<
3
;
++
i
)
ygo
::
pre_seed
[
i
]
=
(
unsigned
int
)
0
;
if
(
argc
>
1
)
{
ygo
::
aServerP
ort
=
atoi
(
argv
[
1
]);
ygo
::
server_p
ort
=
atoi
(
argv
[
1
]);
int
lflist
=
atoi
(
argv
[
2
]);
if
(
lflist
<
0
)
lflist
=
999
;
...
...
gframe/replay.cpp
View file @
9e00a5b1
...
...
@@ -6,7 +6,7 @@
namespace
ygo
{
#ifdef YGOPRO_SERVER_MODE
extern
unsigned
short
aServerP
ort
;
extern
unsigned
short
server_p
ort
;
extern
unsigned
short
replay_mode
;
#endif
Replay
::
Replay
()
...
...
@@ -36,7 +36,7 @@ void Replay::BeginRecord() {
wchar_t
tmppath
[
80
];
wcsftime
(
tmppath
,
80
,
L"./replay/%Y-%m-%d %H-%M-%S %%u.yrp"
,
localedtime
);
wchar_t
path
[
80
];
myswprintf
(
path
,
tmppath
,
aServerP
ort
);
myswprintf
(
path
,
tmppath
,
server_p
ort
);
recording_fp
=
CreateFileW
(
path
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_FLAG_WRITE_THROUGH
,
NULL
);
#else
recording_fp
=
CreateFileW
(
L"./replay/_LastReplay.yrp"
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_FLAG_WRITE_THROUGH
,
NULL
);
...
...
@@ -52,7 +52,7 @@ void Replay::BeginRecord() {
char
tmppath
[
40
];
strftime
(
tmppath
,
40
,
"./replay/%Y-%m-%d %H-%M-%S %%u.yrp"
,
localedtime
);
char
path
[
40
];
sprintf
(
path
,
tmppath
,
aServerP
ort
);
sprintf
(
path
,
tmppath
,
server_p
ort
);
fp
=
fopen
(
path
,
"wb"
);
#else
fp
=
fopen
(
"./replay/_LastReplay.yrp"
,
"wb"
);
...
...
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