Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
R
rd-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
苍蓝
rd-ygopro
Commits
af3ada8e
Commit
af3ada8e
authored
May 29, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'server' of github.com:mycard/ygopro into server-develop
parents
54b11b82
84ae6622
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
gframe/premake5.lua
gframe/premake5.lua
+3
-0
gframe/single_duel.cpp
gframe/single_duel.cpp
+2
-2
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
premake5.lua
premake5.lua
+6
-3
No files found.
gframe/premake5.lua
View file @
af3ada8e
...
@@ -29,6 +29,9 @@ if SERVER_MODE then
...
@@ -29,6 +29,9 @@ if SERVER_MODE then
if
SERVER_PRO2_SUPPORT
then
if
SERVER_PRO2_SUPPORT
then
defines
{
"SERVER_PRO2_SUPPORT"
}
defines
{
"SERVER_PRO2_SUPPORT"
}
end
end
if
SERVER_TAG_SURRENDER_CONFIRM
then
defines
{
"SERVER_TAG_SURRENDER_CONFIRM"
}
end
else
else
kind
"WindowedApp"
kind
"WindowedApp"
...
...
gframe/single_duel.cpp
View file @
af3ada8e
...
@@ -566,11 +566,11 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -566,11 +566,11 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
set_card_reader
(
DataManager
::
CardReader
);
set_card_reader
(
DataManager
::
CardReader
);
set_message_handler
(
SingleDuel
::
MessageHandler
);
set_message_handler
(
SingleDuel
::
MessageHandler
);
pduel
=
create_duel
(
duel_seed
);
pduel
=
create_duel
(
duel_seed
);
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
#ifdef YGOPRO_SERVER_MODE
#ifdef YGOPRO_SERVER_MODE
preload_script
(
pduel
,
"./script/special.lua"
,
0
);
preload_script
(
pduel
,
"./script/special.lua"
,
0
);
#endif
#endif
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
int
opt
=
(
int
)
host_info
.
duel_rule
<<
16
;
int
opt
=
(
int
)
host_info
.
duel_rule
<<
16
;
if
(
host_info
.
no_shuffle_deck
)
if
(
host_info
.
no_shuffle_deck
)
opt
|=
DUEL_PSEUDO_SHUFFLE
;
opt
|=
DUEL_PSEUDO_SHUFFLE
;
...
...
gframe/tag_duel.cpp
View file @
af3ada8e
...
@@ -691,7 +691,7 @@ void TagDuel::Surrender(DuelPlayer* dp) {
...
@@ -691,7 +691,7 @@ void TagDuel::Surrender(DuelPlayer* dp) {
if
(
dp
->
type
>
3
||
!
pduel
)
if
(
dp
->
type
>
3
||
!
pduel
)
return
;
return
;
uint32
player
=
dp
->
type
;
uint32
player
=
dp
->
type
;
#if !defined(YGOPRO_SERVER_MODE) || defined(
YGOPRO
_TAG_SURRENDER_CONFIRM)
#if !defined(YGOPRO_SERVER_MODE) || defined(
SERVER
_TAG_SURRENDER_CONFIRM)
if
(
surrender
[
player
])
if
(
surrender
[
player
])
return
;
return
;
static
const
uint32
teammatemap
[]
=
{
1
,
0
,
3
,
2
};
static
const
uint32
teammatemap
[]
=
{
1
,
0
,
3
,
2
};
...
...
premake5.lua
View file @
af3ada8e
...
@@ -12,6 +12,7 @@ LUA_LIB_NAME = "lua"
...
@@ -12,6 +12,7 @@ LUA_LIB_NAME = "lua"
SERVER_MODE
=
true
SERVER_MODE
=
true
SERVER_ZIP_SUPPORT
=
false
SERVER_ZIP_SUPPORT
=
false
SERVER_PRO2_SUPPORT
=
false
SERVER_PRO2_SUPPORT
=
false
SERVER_TAG_SURRENDER_CONFIRM
=
false
USE_IRRKLANG
=
false
USE_IRRKLANG
=
false
-- read settings from command line or environment variables
-- read settings from command line or environment variables
...
@@ -60,11 +61,11 @@ newoption { trigger = "mac-arm", category = "YGOPro", description = "M1" }
...
@@ -60,11 +61,11 @@ newoption { trigger = "mac-arm", category = "YGOPro", description = "M1" }
newoption
{
trigger
=
"server-mode"
,
category
=
"YGOPro - server"
,
description
=
""
}
newoption
{
trigger
=
"server-mode"
,
category
=
"YGOPro - server"
,
description
=
""
}
newoption
{
trigger
=
"server-zip-support"
,
category
=
"YGOPro - server"
,
description
=
""
}
newoption
{
trigger
=
"server-zip-support"
,
category
=
"YGOPro - server"
,
description
=
""
}
newoption
{
trigger
=
"server-pro2-support"
,
category
=
"YGOPro - server"
,
description
=
""
}
newoption
{
trigger
=
"server-pro2-support"
,
category
=
"YGOPro - server"
,
description
=
""
}
newoption
{
trigger
=
"server-tag-surrender-confirm"
,
category
=
"YGOPro - server"
,
description
=
""
}
boolOptions
=
{
boolOptions
=
{
"no-lua-safe"
,
"no-lua-safe"
,
"no-side-check"
,
"no-side-check"
"tag-surrender-confirm"
}
}
for
_
,
boolOption
in
ipairs
(
boolOptions
)
do
for
_
,
boolOption
in
ipairs
(
boolOptions
)
do
...
@@ -205,7 +206,6 @@ if GetParam("mac-arm") and os.istarget("macosx") then
...
@@ -205,7 +206,6 @@ if GetParam("mac-arm") and os.istarget("macosx") then
end
end
if
GetParam
(
"server-mode"
)
then
if
GetParam
(
"server-mode"
)
then
SERVER_MODE
=
true
SERVER_MODE
=
true
SERVER_ZIP_SUPPORT
=
false
end
end
if
GetParam
(
"server-zip-support"
)
then
if
GetParam
(
"server-zip-support"
)
then
SERVER_ZIP_SUPPORT
=
true
SERVER_ZIP_SUPPORT
=
true
...
@@ -214,6 +214,9 @@ if GetParam("server-pro2-support") then
...
@@ -214,6 +214,9 @@ if GetParam("server-pro2-support") then
SERVER_PRO2_SUPPORT
=
true
SERVER_PRO2_SUPPORT
=
true
SERVER_ZIP_SUPPORT
=
true
SERVER_ZIP_SUPPORT
=
true
end
end
if
GetParam
(
"server-tag-surrender-confirm"
)
then
SERVER_TAG_SURRENDER_CONFIRM
=
true
end
workspace
"YGOPro"
workspace
"YGOPro"
location
"build"
location
"build"
...
...
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