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
6fde86f0
Commit
6fde86f0
authored
Apr 16, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'new-premake' into server
parents
47e70cc1
2fc6f7fd
Pipeline
#11723
failed
Changes
15
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
193 additions
and
249 deletions
+193
-249
.ci/exec-macos-platform.sh
.ci/exec-macos-platform.sh
+12
-5
.gitlab-ci.yml
.gitlab-ci.yml
+18
-15
gframe/deck_con.cpp
gframe/deck_con.cpp
+3
-3
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+7
-32
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-2
gframe/game.cpp
gframe/game.cpp
+3
-3
gframe/game.h
gframe/game.h
+18
-2
gframe/gframe.cpp
gframe/gframe.cpp
+4
-4
gframe/premake4.lua
gframe/premake4.lua
+0
-58
gframe/premake5.lua
gframe/premake5.lua
+6
-2
premake/freetype/premake4.lua
premake/freetype/premake4.lua
+0
-49
premake/lua/premake4.lua
premake/lua/premake4.lua
+0
-10
premake4.lua
premake4.lua
+0
-62
premake5.lua
premake5.lua
+61
-2
system_user.conf.bak
system_user.conf.bak
+59
-0
No files found.
.ci/exec-macos-platform.sh
View file @
6fde86f0
...
...
@@ -2,18 +2,25 @@
set
-x
set
-o
errexit
TARGET_YGOPRO_BINARY_PATH
=
./ygopro-platforms/ygopro-platform-
$TARGET_ARCH
export
YGOPRO_LIBEVENT_STATIC_PATH
=
$PWD
/libevent-stable
TARGET_YGOPRO_BINARY_PATH
=
./ygopro-platforms/ygopro-platform-
$TARGET_PLATFORM
export
EVENT_INCLUDE_DIR
=
$PWD
/libevent-stable/include
export
EVENT_LIB_DIR
=
$PWD
/libevent-stable/lib
export
IRRLICHT_INCLUDE_DIR
=
$PWD
/irrlicht/include
export
IRRLICHT_LIB_DIR
=
$PWD
/irrlicht
git submodule update
--init
./premake5 gmake
--cc
=
clang
./premake5 gmake
--cc
=
clang
--build-freetype
--build-sqlite
cd
build
make
config
=
release
-j4
cd
..
mkdir
ygopro-platforms
mv
bin/release/ygopro.app
$TARGET_YGOPRO_BINARY_PATH
mv
bin/release/YGOPro.app
$TARGET_YGOPRO_BINARY_PATH
if
[[
$TARGET_PLATFORM
==
"x86"
]]
;
then
install_name_tool
-change
/usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib
$TARGET_YGOPRO_BINARY_PATH
fi
install_name_tool
-change
/usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib
$TARGET_YGOPRO_BINARY_PATH
strip
$TARGET_YGOPRO_BINARY_PATH
.gitlab-ci.yml
View file @
6fde86f0
...
...
@@ -15,10 +15,13 @@ mat_common:
script
:
# lua
-
wget -O - https://cdn01.moecube.com/ygopro-build-materials/lua-5.3.6.tar.gz | tar zfx -
-
mv lua-5.3.6
/src
lua
-
mv lua-5.3.6 lua
# sqlite3
-
wget -O - https://cdn01.moecube.com/ygopro-build-materials/sqlite-autoconf-3360000.tar.gz | tar zfx -
-
mv sqlite-autoconf-3360000 sqlite3
# freetype
#- wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.11.1.tar.gz | tar zfx -
#- mv freetype-2.11.1 freetype
# premake
-
cp -rf premake/* .;
artifacts
:
...
...
@@ -33,8 +36,9 @@ mat_linux:
-
linux
script
:
-
apt update; apt -y install git wget tar
#- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht
irrlicht_linux
#- git clone --depth=1 https://code.mycard.moe/mycard/irrlicht
-new irrlicht
-
wget -O - https://cdn01.moecube.com/ygopro-build-materials/premake-5.0.0-beta1-linux.tar.gz | tar zfx -
-
env PROCESSOR_COUNT=$(nproc) ./.ci/libevent-prebuild.sh
artifacts
:
paths
:
-
premake5
...
...
@@ -53,10 +57,8 @@ mat_windows:
# event
-
wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx -
-
mv libevent-2.0.22-stable event
# sqlite3
-
wget https://cdn01.moecube.com/ygopro-build-materials/sqlite-amalgamation-3310100.zip
-
7z x -y sqlite-amalgamation-3310100.zip
-
mv sqlite-amalgamation-3310100 sqlite3
# irrlicht
-
git clone --depth=1 https://code.mycard.moe/mycard/irrlicht-new irrlicht
artifacts
:
paths
:
-
premake5.exe
...
...
@@ -64,6 +66,8 @@ mat_windows:
._exec_build
:
stage
:
build
variables
:
YGOPRO_NO_LUA_SAFE
:
'
1'
# on client no lua safe
cache
:
key
:
"
$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths
:
...
...
@@ -77,9 +81,6 @@ exec_windows:
dependencies
:
-
mat_common
-
mat_windows
#variables:
# irrklang_pro: '1'
# USE_IRRKLANG: "1"
script
:
-
git submodule update --init
-
bash -c 'cp -rf premake/* .'
...
...
@@ -94,22 +95,24 @@ exec_linux:
extends
:
._exec_build
tags
:
-
linux
variables
:
YGOPRO_BUILD_ALL
:
'
1'
#USE_IRRKLANG: "1"
dependencies
:
-
mat_common
#- mat_irrklang
-
mat_lua
-
mat_linux
script
:
-
apt update; apt -y install git build-essential
libevent-dev libsqlite3-dev
-
apt update; apt -y install git build-essential
-
git submodule update --init
-
env YGOPRO_LIBEVENT_STATIC_PATH=$PWD/libevent-stable ./premake5 gmake
-
mkdir lib
-
cp -rf irrklang/bin/linux-gcc-64/libIrrKlang.so ./lib/
# - cp -rf irrklang/bin/linux-gcc-64/ikpMP3.so ./lib/
-
export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
-
export EVENT_LIB_DIR=$PWD/libevent-stable/lib
-
./premake5 gmake --build-sqlite
-
cd build
-
make config=release -j$(nproc)
-
cd ..
-
mv bin/release/
ygopro .
-
mv bin/release/
YGOPro ./ygopro
-
strip ygopro
artifacts
:
paths
:
...
...
gframe/deck_con.cpp
View file @
6fde86f0
...
...
@@ -1766,7 +1766,7 @@ bool DeckBuilder::push_main(code_pointer pointer, int seq) {
if
(
pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
return
false
;
auto
&
container
=
deckManager
.
current_deck
.
main
;
int
maxc
=
mainGame
->
is_siding
?
64
:
60
;
int
maxc
=
mainGame
->
is_siding
?
YGOPRO_MAX_DECK
+
5
:
YGOPRO_MAX_DECK
;
if
((
int
)
container
.
size
()
>=
maxc
)
return
false
;
if
(
seq
>=
0
&&
seq
<
(
int
)
container
.
size
())
...
...
@@ -1781,7 +1781,7 @@ bool DeckBuilder::push_extra(code_pointer pointer, int seq) {
if
(
!
(
pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)))
return
false
;
auto
&
container
=
deckManager
.
current_deck
.
extra
;
int
maxc
=
mainGame
->
is_siding
?
20
:
15
;
int
maxc
=
mainGame
->
is_siding
?
YGOPRO_MAX_EXTRA
+
5
:
YGOPRO_MAX_EXTRA
;
if
((
int
)
container
.
size
()
>=
maxc
)
return
false
;
if
(
seq
>=
0
&&
seq
<
(
int
)
container
.
size
())
...
...
@@ -1794,7 +1794,7 @@ bool DeckBuilder::push_extra(code_pointer pointer, int seq) {
}
bool
DeckBuilder
::
push_side
(
code_pointer
pointer
,
int
seq
)
{
auto
&
container
=
deckManager
.
current_deck
.
side
;
int
maxc
=
mainGame
->
is_siding
?
20
:
15
;
int
maxc
=
mainGame
->
is_siding
?
YGOPRO_MAX_SIDE
+
5
:
YGOPRO_MAX_SIDE
;
if
((
int
)
container
.
size
()
>=
maxc
)
return
false
;
if
(
seq
>=
0
&&
seq
<
(
int
)
container
.
size
())
...
...
gframe/deck_manager.cpp
View file @
6fde86f0
...
...
@@ -89,21 +89,12 @@ int DeckManager::CheckDeck(Deck& deck, int lfhash, int rule) {
if
(
!
list
)
return
0
;
int
dc
=
0
;
#ifdef YGOPRO_SERVER_MODE
if
(
deck
.
main
.
size
()
<
DECKCOUNT_MAIN_MIN
||
deck
.
main
.
size
()
>
DECKCOUNT_MAIN_MAX
)
if
(
deck
.
main
.
size
()
<
YGOPRO_MIN_DECK
||
deck
.
main
.
size
()
>
YGOPRO_MAX_DECK
)
return
(
DECKERROR_MAINCOUNT
<<
28
)
+
deck
.
main
.
size
();
if
(
deck
.
extra
.
size
()
>
DECKCOUNT
_EXTRA
)
if
(
deck
.
extra
.
size
()
>
YGOPRO_MAX
_EXTRA
)
return
(
DECKERROR_EXTRACOUNT
<<
28
)
+
deck
.
extra
.
size
();
if
(
deck
.
side
.
size
()
>
DECKCOUNT
_SIDE
)
if
(
deck
.
side
.
size
()
>
YGOPRO_MAX
_SIDE
)
return
(
DECKERROR_SIDECOUNT
<<
28
)
+
deck
.
side
.
size
();
#else
if
(
deck
.
main
.
size
()
<
40
||
deck
.
main
.
size
()
>
60
)
return
(
DECKERROR_MAINCOUNT
<<
28
)
+
deck
.
main
.
size
();
if
(
deck
.
extra
.
size
()
>
15
)
return
(
DECKERROR_EXTRACOUNT
<<
28
)
+
deck
.
extra
.
size
();
if
(
deck
.
side
.
size
()
>
15
)
return
(
DECKERROR_SIDECOUNT
<<
28
)
+
deck
.
side
.
size
();
#endif
const
int
rule_map
[
6
]
=
{
AVAIL_OCG
,
AVAIL_TCG
,
AVAIL_SC
,
AVAIL_CUSTOM
,
AVAIL_OCGTCG
,
0
};
int
avail
=
rule_map
[
rule
];
for
(
size_t
i
=
0
;
i
<
deck
.
main
.
size
();
++
i
)
{
...
...
@@ -166,22 +157,10 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) {
if
(
cd
.
type
&
TYPE_TOKEN
)
continue
;
else
if
(
cd
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
{
if
(
#ifdef YGOPRO_SERVER_MODE
deck
.
extra
.
size
()
>=
DECKCOUNT_EXTRA
#else
deck
.
extra
.
size
()
>=
15
#endif
)
if
(
deck
.
extra
.
size
()
>=
YGOPRO_MAX_EXTRA
)
continue
;
deck
.
extra
.
push_back
(
dataManager
.
GetCodePointer
(
code
));
//verified by GetData()
}
else
#ifdef YGOPRO_SERVER_MODE
if
(
deck
.
main
.
size
()
<
DECKCOUNT_MAIN_MAX
)
#else
if
(
deck
.
main
.
size
()
<
60
)
#endif
{
deck
.
extra
.
push_back
(
dataManager
.
GetCodePointer
(
code
));
//verified by GetData()
}
else
if
(
deck
.
main
.
size
()
<
YGOPRO_MAX_DECK
)
{
deck
.
main
.
push_back
(
dataManager
.
GetCodePointer
(
code
));
}
}
...
...
@@ -193,11 +172,7 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) {
}
if
(
cd
.
type
&
TYPE_TOKEN
)
continue
;
#ifdef YGOPRO_SERVER_MODE
if
(
deck
.
side
.
size
()
<
DECKCOUNT_SIDE
)
#else
if
(
deck
.
side
.
size
()
<
15
)
#endif
if
(
deck
.
side
.
size
()
<
YGOPRO_MAX_SIDE
)
deck
.
side
.
push_back
(
dataManager
.
GetCodePointer
(
code
));
//verified by GetData()
}
return
errorcode
;
...
...
gframe/duelclient.cpp
View file @
6fde86f0
...
...
@@ -539,7 +539,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
str
.
append
(
msgbuf
);
myswprintf
(
msgbuf
,
L"%ls%d
\n
"
,
dataManager
.
GetSysString
(
1233
),
pkt
->
info
.
draw_count
);
str
.
append
(
msgbuf
);
if
(
pkt
->
info
.
duel_rule
!=
DEFAULT_DUEL_RULE
)
{
if
(
pkt
->
info
.
duel_rule
!=
YGOPRO_
DEFAULT_DUEL_RULE
)
{
myswprintf
(
msgbuf
,
L"*%ls
\n
"
,
dataManager
.
GetSysString
(
1260
+
pkt
->
info
.
duel_rule
-
1
));
str
.
append
(
msgbuf
);
}
...
...
@@ -4326,7 +4326,7 @@ void DuelClient::BroadcastReply(evutil_socket_t fd, short events, void * arg) {
hoststr
.
append
(
L"]["
);
if
(
pHP
->
host
.
draw_count
==
1
&&
pHP
->
host
.
start_hand
==
5
&&
pHP
->
host
.
start_lp
==
8000
&&
!
pHP
->
host
.
no_check_deck
&&
!
pHP
->
host
.
no_shuffle_deck
&&
pHP
->
host
.
duel_rule
==
DEFAULT_DUEL_RULE
)
&&
pHP
->
host
.
duel_rule
==
YGOPRO_
DEFAULT_DUEL_RULE
)
hoststr
.
append
(
dataManager
.
GetSysString
(
1247
));
else
hoststr
.
append
(
dataManager
.
GetSysString
(
1248
));
hoststr
.
append
(
L"]"
);
...
...
gframe/game.cpp
View file @
6fde86f0
...
...
@@ -1448,7 +1448,7 @@ bool Game::LoadConfigFromFile(const char* file) {
}
else
if
(
!
strcmp
(
strbuf
,
"default_rule"
))
{
gameConf
.
default_rule
=
atoi
(
valbuf
);
if
(
gameConf
.
default_rule
<=
0
)
gameConf
.
default_rule
=
DEFAULT_DUEL_RULE
;
gameConf
.
default_rule
=
YGOPRO_
DEFAULT_DUEL_RULE
;
}
else
if
(
!
strcmp
(
strbuf
,
"hide_setname"
))
{
gameConf
.
hide_setname
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"hide_hint_button"
))
{
...
...
@@ -1557,7 +1557,7 @@ void Game::LoadConfig() {
gameConf
.
chkIgnore2
=
0
;
gameConf
.
use_lflist
=
1
;
gameConf
.
default_lflist
=
0
;
gameConf
.
default_rule
=
DEFAULT_DUEL_RULE
;
gameConf
.
default_rule
=
YGOPRO_
DEFAULT_DUEL_RULE
;
gameConf
.
hide_setname
=
0
;
gameConf
.
hide_hint_button
=
0
;
gameConf
.
control_mode
=
0
;
...
...
@@ -1691,7 +1691,7 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"mute_spectators = %d
\n
"
,
(
chkIgnore2
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"use_lflist = %d
\n
"
,
gameConf
.
use_lflist
);
fprintf
(
fp
,
"default_lflist = %d
\n
"
,
gameConf
.
default_lflist
);
fprintf
(
fp
,
"default_rule = %d
\n
"
,
gameConf
.
default_rule
==
DEFAULT_DUEL_RULE
?
0
:
gameConf
.
default_rule
);
fprintf
(
fp
,
"default_rule = %d
\n
"
,
gameConf
.
default_rule
==
YGOPRO_
DEFAULT_DUEL_RULE
?
0
:
gameConf
.
default_rule
);
fprintf
(
fp
,
"hide_setname = %d
\n
"
,
gameConf
.
hide_setname
);
fprintf
(
fp
,
"hide_hint_button = %d
\n
"
,
gameConf
.
hide_hint_button
);
fprintf
(
fp
,
"#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
\n
"
);
...
...
gframe/game.h
View file @
6fde86f0
...
...
@@ -882,8 +882,24 @@ extern unsigned int pre_seed[3];
#define AVAIL_SC 0x8
#define AVAIL_OCGTCG (AVAIL_OCG|AVAIL_TCG)
#ifndef DEFAULT_DUEL_RULE
#define DEFAULT_DUEL_RULE 5
#ifndef YGOPRO_DEFAULT_DUEL_RULE
#define YGOPRO_DEFAULT_DUEL_RULE 5
#endif
#ifndef YGOPRO_MAX_DECK
#define YGOPRO_MAX_DECK 60
#endif
#ifndef YGOPRO_MIN_DECK
#define YGOPRO_MIN_DECK 40
#endif
#ifndef YGOPRO_MAX_EXTRA
#define YGOPRO_MAX_EXTRA 15
#endif
#ifndef YGOPRO_MAX_SIDE
#define YGOPRO_MAX_SIDE 15
#endif
#define CARD_ARTWORK_VERSIONS_OFFSET 10
...
...
gframe/gframe.cpp
View file @
6fde86f0
...
...
@@ -72,7 +72,7 @@ int main(int argc, char* argv[]) {
ygo
::
game_info
.
draw_count
=
1
;
ygo
::
game_info
.
no_check_deck
=
false
;
ygo
::
game_info
.
no_shuffle_deck
=
false
;
ygo
::
game_info
.
duel_rule
=
DEFAULT_DUEL_RULE
;
ygo
::
game_info
.
duel_rule
=
YGOPRO_
DEFAULT_DUEL_RULE
;
ygo
::
game_info
.
time_limit
=
180
;
for
(
int
i
=
0
;
i
<
3
;
++
i
)
ygo
::
pre_seed
[
i
]
=
(
unsigned
int
)
0
;
...
...
@@ -94,15 +94,15 @@ int main(int argc, char* argv[]) {
mode
=
0
;
ygo
::
game_info
.
mode
=
mode
;
if
(
argv
[
5
][
0
]
==
'T'
)
ygo
::
game_info
.
duel_rule
=
DEFAULT_DUEL_RULE
-
1
;
ygo
::
game_info
.
duel_rule
=
YGOPRO_
DEFAULT_DUEL_RULE
-
1
;
else
if
(
argv
[
5
][
0
]
==
'F'
)
ygo
::
game_info
.
duel_rule
=
DEFAULT_DUEL_RULE
;
ygo
::
game_info
.
duel_rule
=
YGOPRO_
DEFAULT_DUEL_RULE
;
else
{
int
master_rule
=
atoi
(
argv
[
5
]);
if
(
master_rule
)
ygo
::
game_info
.
duel_rule
=
master_rule
;
else
ygo
::
game_info
.
duel_rule
=
DEFAULT_DUEL_RULE
;
ygo
::
game_info
.
duel_rule
=
YGOPRO_
DEFAULT_DUEL_RULE
;
}
if
(
argv
[
6
][
0
]
==
'T'
)
ygo
::
game_info
.
no_check_deck
=
true
;
...
...
gframe/premake4.lua
deleted
100644 → 0
View file @
47e70cc1
include
"lzma/."
project
"ygopro"
kind
"ConsoleApp"
local
params
=
{
"DEFAULT_DUEL_RULE"
,
"DECKCOUNT_MAIN_MIN"
,
"DECKCOUNT_MAIN_MAX"
,
"DECKCOUNT_SIDE"
,
"DECKCOUNT_EXTRA"
,
"NO_SIDE_CHECK"
}
for
_
,
param
in
ipairs
(
params
)
do
local
val
=
os.getenv
(
"YGOPRO_"
..
param
)
if
val
and
tonumber
(
val
)
then
defines
{
param
..
"="
..
tonumber
(
val
)
}
end
end
files
{
"gframe.cpp"
,
"config.h"
,
"game.cpp"
,
"game.h"
,
"myfilesystem.h"
,
"deck_manager.cpp"
,
"deck_manager.h"
,
"data_manager.cpp"
,
"data_manager.h"
,
"replay.cpp"
,
"replay.h"
,
"netserver.cpp"
,
"netserver.h"
,
"single_duel.cpp"
,
"single_duel.h"
,
"tag_duel.cpp"
,
"tag_duel.h"
}
includedirs
{
"../ocgcore"
}
links
{
"ocgcore"
,
"clzma"
,
"sqlite3"
,
"event"
}
configuration
"windows"
files
"ygopro.rc"
includedirs
{
"../event/include"
,
"../sqlite3"
}
links
{
"ws2_32"
,
"event"
,
"lua"
}
configuration
"not vs*"
buildoptions
{
"-std=c++14"
,
"-fno-rtti"
}
configuration
"not windows"
links
{
"dl"
,
"pthread"
}
if
LIBEVENT_ROOT
then
includedirs
{
LIBEVENT_ROOT
..
"/include"
}
libdirs
{
LIBEVENT_ROOT
..
"/lib/"
}
end
links
{
"event_pthreads"
}
if
BUILD_SQLITE
then
includedirs
{
"../sqlite3"
}
end
if
BUILD_LUA
then
links
{
"lua"
}
else
links
{
"lua5.3-c++"
}
end
configuration
"linux"
linkoptions
{
"-static-libstdc++"
,
"-static-libgcc"
,
"-Wl,-rpath=./lib/"
}
configuration
"macosx"
if
MAC_ARM
then
buildoptions
{
"--target=arm64-apple-macos11"
}
linkoptions
{
"-arch arm64"
}
end
gframe/premake5.lua
View file @
6fde86f0
...
...
@@ -22,10 +22,13 @@ if SERVER_MODE then
else
kind
"WindowedApp"
files
{
"*.cpp"
,
"*.h"
}
files
{
"*.cpp"
,
"*.h"
,
"CGUISkinSystem/*.cpp"
,
"CGUISkinSystem/*.h"
,
"CXMLRegistry/*.cpp"
,
"CXMLRegistry/*.h"
}
includedirs
{
"../ocgcore"
}
links
{
"ocgcore"
,
"clzma"
,
"cspmemvfs"
,
LUA_LIB_NAME
,
"sqlite3"
,
"irrlicht"
,
"freetype"
,
"event"
}
end
if
BUILD_IKPMP3
then
links
{
"ikpmp3"
}
end
if
BUILD_EVENT
then
includedirs
{
"../event/include"
}
...
...
@@ -103,10 +106,11 @@ end
links
{
"irrklang"
}
end
filter
"system:linux"
linkoptions
{
"-static-libstdc++"
,
"-static-libgcc"
}
if
not
SERVER_MODE
then
links
{
"GL"
,
"X11"
,
"Xxf86vm"
}
end
if
USE_IRRKLANG
then
links
{
"IrrKlang"
}
linkoptions
{
IRRKLANG_LINK_RPATH
}
linkoptions
{
IRRKLANG_LINK_RPATH
}
end
premake/freetype/premake4.lua
deleted
100644 → 0
View file @
47e70cc1
project
"freetype"
kind
"StaticLib"
includedirs
{
"include"
}
defines
{
"FT2_BUILD_LIBRARY"
}
files
{
"src/autofit/autofit.c"
,
"src/base/ftbase.c"
,
"src/base/ftbbox.c"
,
"src/base/ftbdf.c"
,
"src/base/ftbitmap.c"
,
"src/base/ftcid.c"
,
"src/base/ftfstype.c"
,
"src/base/ftgasp.c"
,
"src/base/ftglyph.c"
,
"src/base/ftgxval.c"
,
"src/base/ftinit.c"
,
"src/base/ftmm.c"
,
"src/base/ftotval.c"
,
"src/base/ftpatent.c"
,
"src/base/ftpfr.c"
,
"src/base/ftstroke.c"
,
"src/base/ftsynth.c"
,
"src/base/ftsystem.c"
,
"src/base/fttype1.c"
,
"src/base/ftwinfnt.c"
,
"src/bdf/bdf.c"
,
"src/cache/ftcache.c"
,
"src/cff/cff.c"
,
"src/cid/type1cid.c"
,
"src/gzip/ftgzip.c"
,
"src/lzw/ftlzw.c"
,
"src/pcf/pcf.c"
,
"src/pfr/pfr.c"
,
"src/psaux/psaux.c"
,
"src/pshinter/pshinter.c"
,
"src/psnames/psmodule.c"
,
"src/raster/raster.c"
,
"src/sfnt/sfnt.c"
,
"src/smooth/smooth.c"
,
"src/truetype/truetype.c"
,
"src/type1/type1.c"
,
"src/type42/type42.c"
,
"src/winfonts/winfnt.c"
}
configuration
"windows"
files
{
"builds/windows/ftdebug.c"
}
configuration
"not windows"
files
{
"src/base/ftdebug.c"
}
premake/lua/premake4.lua
deleted
100644 → 0
View file @
47e70cc1
project
"lua"
kind
"StaticLib"
files
{
"**.cc"
,
"**.cpp"
,
"**.c"
,
"**.h"
}
excludes
{
"lua.c"
,
"luac.c"
}
configuration
"vs*"
buildoptions
{
"/TP"
}
configuration
"not vs*"
buildoptions
{
"-x c++"
}
premake4.lua
deleted
100644 → 0
View file @
47e70cc1
solution
"ygo"
location
"build"
language
"C++"
objdir
"obj"
configurations
{
"Release"
,
"Debug"
}
if
os.getenv
(
"YGOPRO_NO_LUA_SAFE"
)
then
defines
{
"LUA_COMPAT_5_2"
,
"YGOPRO_SERVER_MODE"
}
else
defines
{
"LUA_COMPAT_5_2"
,
"YGOPRO_SERVER_MODE"
,
"YGOPRO_LUA_SAFE"
}
end
configuration
"windows"
defines
{
"WIN32"
,
"_WIN32"
}
configuration
"bsd"
defines
{
"LUA_USE_POSIX"
}
includedirs
{
"/usr/local/include"
}
libdirs
{
"/usr/local/lib"
}
configuration
"macosx"
defines
{
"LUA_USE_MACOSX"
}
includedirs
{
"/usr/local/include"
,
"/usr/local/include/*"
}
libdirs
{
"/usr/local/lib"
,
"/usr/X11/lib"
}
buildoptions
{
"-stdlib=libc++"
}
links
{
"OpenGL.framework"
,
"Cocoa.framework"
,
"IOKit.framework"
}
configuration
"linux"
defines
{
"LUA_USE_LINUX"
}
configuration
"vs*"
flags
"EnableSSE2"
buildoptions
{
"-wd4996"
,
"/utf-8"
}
defines
{
"_CRT_SECURE_NO_WARNINGS"
}
configuration
"not vs*"
buildoptions
{
"-fno-strict-aliasing"
,
"-Wno-format-security"
}
configuration
{
"not vs*"
,
"windows"
}
buildoptions
{
"-static-libgcc"
}
configuration
"Debug"
flags
"Symbols"
defines
"_DEBUG"
targetdir
"bin/debug"
configuration
{
"Release"
,
"not vs*"
}
flags
"Symbols"
defines
"NDEBUG"
buildoptions
"-march=native"
configuration
"Release"
--flags { "OptimizeSpeed" }
targetdir
"bin/release"
include
"ocgcore"
include
"gframe"
if
os
.
is
(
"windows"
)
then
include
"lua"
include
"event"
include
"freetype"
include
"irrlicht"
include
"sqlite3"
end
premake5.lua
View file @
6fde86f0
...
...
@@ -49,15 +49,56 @@ newoption { trigger = "irrklang-pro", category = "YGOPro - irrklang - pro", desc
newoption
{
trigger
=
"no-irrklang-pro"
,
category
=
"YGOPro - irrklang - pro"
,
description
=
""
}
newoption
{
trigger
=
"irrklang-pro-release-lib-dir"
,
category
=
"YGOPro - irrklang - pro"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"irrklang-pro-debug-lib-dir"
,
category
=
"YGOPro - irrklang - pro"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
'build-ikpmp3'
,
category
=
"YGOPro - irrklang - ikpmp3"
,
description
=
""
}
newoption
{
trigger
=
"winxp-support"
,
category
=
"YGOPro"
,
description
=
""
}
newoption
{
trigger
=
"mac-arm"
,
category
=
"YGOPro"
,
description
=
"M1"
}
newoption
{
trigger
=
"server-mode"
,
category
=
"YGOPro"
,
description
=
""
}
-- koishipro specific
boolOptions
=
{
"compat-mycard"
,
"no-lua-safe"
,
"message-debug"
,
"default-duel-rule"
,
}
for
_
,
boolOption
in
ipairs
(
boolOptions
)
do
newoption
{
trigger
=
boolOption
,
category
=
"YGOPro - Koishi"
,
description
=
""
}
end
numberOptions
=
{
"default-rule"
,
"max-deck"
,
"min-deck"
,
"max-extra"
,
"max-side"
,
}
for
_
,
numberOption
in
ipairs
(
numberOptions
)
do
newoption
{
trigger
=
numberOption
,
category
=
"YGOPro - Koishi"
,
description
=
""
,
value
=
"NUMBER"
}
end
function
GetParam
(
param
)
return
_OPTIONS
[
param
]
or
os.getenv
(
string.upper
(
string.gsub
(
param
,
"-"
,
"_"
)))
end
function
ApplyBoolean
(
param
)
if
GetParam
(
param
)
then
defines
{
"YGOPRO_"
..
string.upper
(
string.gsub
(
param
,
"-"
,
"_"
))
}
end
end
function
ApplyNumber
(
param
)
local
value
=
GetParam
(
param
)
if
not
value
then
return
end
local
numberValue
=
tonumber
(
value
)
if
numberValue
then
defines
{
"YGOPRO_"
..
string.upper
(
string.gsub
(
param
,
"-"
,
"_"
))
..
"="
..
numberValue
}
end
end
if
GetParam
(
"build-lua"
)
then
BUILD_LUA
=
true
elseif
GetParam
(
"no-build-lua"
)
then
...
...
@@ -127,7 +168,7 @@ if USE_IRRKLANG then
IRRKLANG_LIB_DIR
=
"../irrklang/lib/Win32-visualStudio"
elseif
os
.
istarget
(
"linux"
)
then
IRRKLANG_LIB_DIR
=
"../irrklang/bin/linux-gcc-64"
IRRKLANG_LINK_RPATH
=
"-Wl,-rpath=./
irrklang/bin/linux-gcc-64/
"
IRRKLANG_LINK_RPATH
=
"-Wl,-rpath=./"
elseif
os
.
istarget
(
"macosx"
)
then
IRRKLANG_LIB_DIR
=
"../irrklang/bin/macosx-gcc"
end
...
...
@@ -145,6 +186,8 @@ if IRRKLANG_PRO then
IRRKLANG_PRO_DEBUG_LIB_DIR
=
GetParam
(
"irrklang-pro-debug-lib-dir"
)
or
"../irrklang/lib/Win32-visualStudio-debug"
end
BUILD_IKPMP3
=
USE_IRRKLANG
if
GetParam
(
"winxp-support"
)
and
os
.
istarget
(
"windows"
)
then
WINXP_SUPPORT
=
true
end
...
...
@@ -155,6 +198,12 @@ if GetParam("server-mode") then
SERVER_MODE
=
true
end
if
SERVER_MODE
then
BUILD_FREETYPE
=
false
BUILD_IRRLICHT
=
false
BUILD_IKPMP3
=
false
end
workspace
"YGOPro"
location
"build"
language
"C++"
...
...
@@ -198,6 +247,16 @@ workspace "YGOPro"
configurations
{
"Release"
,
"Debug"
}
for
_
,
numberOption
in
ipairs
(
numberOptions
)
do
ApplyNumber
(
numberOption
)
end
for
_
,
boolOption
in
ipairs
(
boolOptions
)
do
ApplyBoolean
(
boolOption
)
end
filter
"system:windows"
defines
{
"WIN32"
,
"_WIN32"
}
if
not
SERVER_MODE
then
...
...
@@ -277,6 +336,6 @@ end
if
BUILD_SQLITE
then
include
"sqlite3"
end
if
USE_IRRKLANG
and
IRRKLANG_PRO
and
not
SERVER_MODE
then
if
BUILD_IKPMP3
then
include
"ikpmp3"
end
system_user.conf.bak
0 → 100644
View file @
6fde86f0
#config file
#nickname & gamename should be less than 20 characters
use_d3d = 0
use_image_scale = 1
pro_version = 4946
antialias = 2
errorlog = 3
nickname = Nanahira
gamename = Game
lastcategory = OCG
lastdeck = wws
textfont = ./fonts/simhei.ttf 14
numfont = ./fonts/arial.ttf
serverport = 7911
lasthost = tiramisu.mycard.moe
lastport = 7911
automonsterpos = 0
autospellpos = 0
randompos = 0
autochain = 0
waitchain = 0
mute_opponent = 0
mute_spectators = 0
use_lflist = 1
default_lflist = 0
default_rule = 0
hide_setname = 0
hide_hint_button = 0
#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
control_mode = 0
draw_field_spell = 1
separate_clear_button = 1
#auto_search_limit >= 0: Start search automatically when the user enters N chars
auto_search_limit = 2
#search_multiple_keywords = 0: Disable. 1: Search mutiple keywords with separator " ". 2: with separator "+"
search_multiple_keywords = 1
search_regex = 1
ignore_deck_changes = 0
default_ot = 1
enable_bot_mode = 1
bot_deck_path = ./windbot/Decks
quick_animation = 1
auto_save_replay = 0
draw_single_chain = 1
prefer_expansion_script = 1
ask_mset = 1
window_maximized = 0
window_width = 1402
window_height = 806
resize_popup_menu = 0
enable_sound = 1
enable_music = 0
#Volume of sound and music, between 0 and 100
sound_volume = 100
music_volume = 100
music_mode = 1
enable_pendulum_scale = 1
skin_index = -1
locale = default
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