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
xiaoye
ygopro
Commits
379afbc6
Commit
379afbc6
authored
May 23, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'server' into duplicate
parents
8c995372
00b06fea
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
144 additions
and
117 deletions
+144
-117
.ci/exec-macos-platform.sh
.ci/exec-macos-platform.sh
+5
-1
.github/workflows/build.yml
.github/workflows/build.yml
+4
-28
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
cards.cdb
cards.cdb
+0
-0
gframe/bufferio.h
gframe/bufferio.h
+5
-5
gframe/client_field.cpp
gframe/client_field.cpp
+18
-22
gframe/client_field.h
gframe/client_field.h
+1
-1
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+1
-1
gframe/deck_manager.h
gframe/deck_manager.h
+2
-2
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-2
gframe/game.cpp
gframe/game.cpp
+7
-0
gframe/gframe.cpp
gframe/gframe.cpp
+9
-3
gframe/image_manager.cpp
gframe/image_manager.cpp
+1
-1
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+11
-10
gframe/menu_handler.h
gframe/menu_handler.h
+2
-1
gframe/premake5.lua
gframe/premake5.lua
+1
-1
gframe/replay.cpp
gframe/replay.cpp
+6
-2
gframe/replay.h
gframe/replay.h
+2
-1
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+3
-3
gframe/replay_mode.h
gframe/replay_mode.h
+0
-1
gframe/single_mode.cpp
gframe/single_mode.cpp
+14
-10
ocgcore
ocgcore
+1
-1
premake/irrlicht/premake5.lua
premake/irrlicht/premake5.lua
+1
-0
premake/miniaudio/premake5.lua
premake/miniaudio/premake5.lua
+1
-1
premake5.lua
premake5.lua
+38
-15
script
script
+1
-1
strings.conf
strings.conf
+5
-1
system.conf
system.conf
+2
-2
No files found.
.ci/exec-macos-platform.sh
View file @
379afbc6
...
@@ -8,10 +8,14 @@ export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
...
@@ -8,10 +8,14 @@ export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
export
EVENT_LIB_DIR
=
$PWD
/libevent-stable/lib
export
EVENT_LIB_DIR
=
$PWD
/libevent-stable/lib
export
OPUS_INCLUDE_DIR
=
$PWD
/miniaudio/external-built/include/opus
export
OPUS_INCLUDE_DIR
=
$PWD
/miniaudio/external-built/include/opus
export
OPUS_LIB_DIR
=
$PWD
/miniaudio/external-built/lib
export
OPUS_LIB_DIR
=
$PWD
/miniaudio/external-built/lib
export
OPUSFILE_INCLUDE_DIR
=
$PWD
/miniaudio/external-built/include/opus
export
OPUSFILE_LIB_DIR
=
$PWD
/miniaudio/external-built/lib
export
VORBIS_INCLUDE_DIR
=
$PWD
/miniaudio/external-built/include
export
VORBIS_INCLUDE_DIR
=
$PWD
/miniaudio/external-built/include
export
VORBIS_LIB_DIR
=
$PWD
/miniaudio/external-built/lib
export
VORBIS_LIB_DIR
=
$PWD
/miniaudio/external-built/lib
export
OGG_INCLUDE_DIR
=
$PWD
/miniaudio/external-built/include
export
OGG_INCLUDE_DIR
=
$PWD
/miniaudio/external-built/include
export
OGG_LIB_DIR
=
$PWD
/miniaudio/external-built/lib
export
OGG_LIB_DIR
=
$PWD
/miniaudio/external-built/lib
export
ACLOCAL
=
aclocal
export
AUTOMAKE
=
automake
./.ci/libevent-prebuild.sh
./.ci/libevent-prebuild.sh
./.ci/build-opus.sh
./.ci/build-opus.sh
...
@@ -19,7 +23,7 @@ export OGG_LIB_DIR=$PWD/miniaudio/external-built/lib
...
@@ -19,7 +23,7 @@ export OGG_LIB_DIR=$PWD/miniaudio/external-built/lib
./premake5 gmake
--cc
=
clang
--build-freetype
--build-sqlite
./premake5 gmake
--cc
=
clang
--build-freetype
--build-sqlite
cd
build
cd
build
make
config
=
release
-j
$(
nproc
)
make
config
=
release
-j
$(
sysctl
-n
hw.ncpu
)
cd
..
cd
..
mkdir
ygopro-platforms
mkdir
ygopro-platforms
...
...
.github/workflows/build.yml
View file @
379afbc6
...
@@ -313,9 +313,7 @@ jobs:
...
@@ -313,9 +313,7 @@ jobs:
-
name
:
Use premake to generate make files
-
name
:
Use premake to generate make files
run
:
|
run
:
|
./premake5 gmake \
./premake5 gmake
--freetype-include-dir="/usr/include/freetype2" \
--opus-include-dir="/usr/include/opus"
-
name
:
Make
-
name
:
Make
run
:
|
run
:
|
...
@@ -406,31 +404,9 @@ jobs:
...
@@ -406,31 +404,9 @@ jobs:
cp -r premake/* .
cp -r premake/* .
cp -r resource/* .
cp -r resource/* .
-
name
:
Use premake to generate make files (Intel)
-
name
:
Use premake to generate make files
if
:
runner.arch == 'X64'
run
:
|
run
:
|
DYLD_LIBRARY_PATH=$(brew --prefix)/lib ./premake5 gmake --cc=clang
./premake5 gmake \
--cc=clang \
--freetype-include-dir="/usr/local/include/freetype2" \
--opus-include-dir="/usr/local/include/opus"
-
name
:
Use premake to generate make files (ARM64)
if
:
runner.arch == 'ARM64'
run
:
|
./premake5 gmake \
--cc=clang \
--event-include-dir="/opt/homebrew/include" \
--event-lib-dir="/opt/homebrew/lib" \
--freetype-include-dir="/opt/homebrew/include/freetype2" \
--freetype-lib-dir="/opt/homebrew/lib" \
--sqlite-include-dir="/opt/homebrew/opt/sqlite/include" \
--sqlite-lib-dir="/opt/homebrew/opt/sqlite/lib" \
--miniaudio-include-dir="/opt/homebrew/include" \
--miniaudio-lib-dir="/opt/homebrew/lib" \
--opus-include-dir="/opt/homebrew/include/opus" \
--opus-lib-dir="/opt/homebrew/lib" \
--vorbis-include-dir="/opt/homebrew/include" \
--vorbis-lib-dir="/opt/homebrew/lib"
-
name
:
Make
-
name
:
Make
run
:
|
run
:
|
...
...
.gitlab-ci.yml
View file @
379afbc6
...
@@ -179,7 +179,7 @@ exec_windows_pro3:
...
@@ -179,7 +179,7 @@ exec_windows_pro3:
LUA_DEB
:
'
1'
LUA_DEB
:
'
1'
RELEASE_DIR
:
debian-x64
RELEASE_DIR
:
debian-x64
before_script
:
before_script
:
-
apt update; apt -y install git build-essential liblua5.
3
-dev libsqlite3-dev libevent-dev
-
apt update; apt -y install git build-essential liblua5.
4
-dev libsqlite3-dev libevent-dev
.use_arm
:
.use_arm
:
image
:
git-registry.moenext.com/mycard/docker-ygopro-builder:fpic
image
:
git-registry.moenext.com/mycard/docker-ygopro-builder:fpic
...
...
cards.cdb
View file @
379afbc6
No preview for this file type
gframe/bufferio.h
View file @
379afbc6
...
@@ -38,7 +38,7 @@ public:
...
@@ -38,7 +38,7 @@ public:
* @brief Copy a C-style string to another C-style string.
* @brief Copy a C-style string to another C-style string.
* @param src The source wide string
* @param src The source wide string
* @param pstr The destination char string
* @param pstr The destination char string
* @param bufsize The
size
of the destination buffer
* @param bufsize The
length
of the destination buffer
* @return The length of the copied string
* @return The length of the copied string
*/
*/
template
<
typename
T1
,
typename
T2
>
template
<
typename
T1
,
typename
T2
>
...
@@ -68,13 +68,13 @@ public:
...
@@ -68,13 +68,13 @@ public:
}
}
template
<
size_t
N
>
template
<
size_t
N
>
static
void
CopyString
(
const
char
*
src
,
char
(
&
dst
)[
N
])
{
static
void
CopyString
(
const
char
*
src
,
char
(
&
dst
)[
N
])
{
dst
[
0
]
=
0
;
std
::
strncpy
(
dst
,
src
,
N
-
1
)
;
std
::
strncat
(
dst
,
src
,
N
-
1
)
;
dst
[
N
-
1
]
=
0
;
}
}
template
<
size_t
N
>
template
<
size_t
N
>
static
void
CopyWideString
(
const
wchar_t
*
src
,
wchar_t
(
&
dst
)[
N
])
{
static
void
CopyWideString
(
const
wchar_t
*
src
,
wchar_t
(
&
dst
)[
N
])
{
dst
[
0
]
=
0
;
std
::
wcsncpy
(
dst
,
src
,
N
-
1
)
;
std
::
wcsncat
(
dst
,
src
,
N
-
1
)
;
dst
[
N
-
1
]
=
0
;
}
}
template
<
typename
T
>
template
<
typename
T
>
static
bool
CheckUTF8Byte
(
const
T
*
str
,
int
len
)
{
static
bool
CheckUTF8Byte
(
const
T
*
str
,
int
len
)
{
...
...
gframe/client_field.cpp
View file @
379afbc6
...
@@ -123,28 +123,24 @@ void ClientField::Clear() {
...
@@ -123,28 +123,24 @@ void ClientField::Clear() {
tag_teammate_surrender
=
false
;
tag_teammate_surrender
=
false
;
RefreshCardCountDisplay
();
RefreshCardCountDisplay
();
}
}
void
ClientField
::
Initial
(
int
player
,
int
deckc
,
int
extrac
)
{
void
ClientField
::
Initial
(
int
player
,
int
deckc
,
int
extrac
,
int
sidec
)
{
ClientCard
*
pcard
;
auto
load_location
=
[
&
](
std
::
vector
<
ClientCard
*>&
container
,
int
count
,
uint8_t
location
)
{
for
(
int
i
=
0
;
i
<
deckc
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
pcard
=
new
ClientCard
;
ClientCard
*
pcard
=
new
ClientCard
;
deck
[
player
].
push_back
(
pcard
);
container
.
push_back
(
pcard
);
pcard
->
owner
=
player
;
pcard
->
owner
=
player
;
pcard
->
controler
=
player
;
pcard
->
controler
=
player
;
pcard
->
location
=
LOCATION_DECK
;
pcard
->
location
=
location
;
pcard
->
sequence
=
i
;
pcard
->
sequence
=
i
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
}
}
for
(
int
i
=
0
;
i
<
extrac
;
++
i
)
{
};
pcard
=
new
ClientCard
;
extra
[
player
].
push_back
(
pcard
);
load_location
(
deck
[
player
],
deckc
,
LOCATION_DECK
);
pcard
->
owner
=
player
;
load_location
(
extra
[
player
],
extrac
,
LOCATION_EXTRA
);
pcard
->
controler
=
player
;
load_location
(
remove
[
player
],
sidec
,
LOCATION_REMOVED
);
pcard
->
location
=
LOCATION_EXTRA
;
pcard
->
sequence
=
i
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
}
RefreshCardCountDisplay
();
RefreshCardCountDisplay
();
}
}
void
ClientField
::
ResetSequence
(
std
::
vector
<
ClientCard
*>&
list
,
bool
reset_height
)
{
void
ClientField
::
ResetSequence
(
std
::
vector
<
ClientCard
*>&
list
,
bool
reset_height
)
{
...
...
gframe/client_field.h
View file @
379afbc6
...
@@ -97,7 +97,7 @@ public:
...
@@ -97,7 +97,7 @@ public:
ClientField
();
ClientField
();
~
ClientField
();
~
ClientField
();
void
Clear
();
void
Clear
();
void
Initial
(
int
player
,
int
deckc
,
int
extrac
);
void
Initial
(
int
player
,
int
deckc
,
int
extrac
,
int
sidec
=
0
);
void
ResetSequence
(
std
::
vector
<
ClientCard
*>&
list
,
bool
reset_height
);
void
ResetSequence
(
std
::
vector
<
ClientCard
*>&
list
,
bool
reset_height
);
ClientCard
*
GetCard
(
int
controler
,
int
location
,
int
sequence
,
int
sub_seq
=
0
);
ClientCard
*
GetCard
(
int
controler
,
int
location
,
int
sequence
,
int
sub_seq
=
0
);
void
AddCard
(
ClientCard
*
pcard
,
int
controler
,
int
location
,
int
sequence
);
void
AddCard
(
ClientCard
*
pcard
,
int
controler
,
int
location
,
int
sequence
);
...
...
gframe/deck_manager.cpp
View file @
379afbc6
...
@@ -415,7 +415,7 @@ bool DeckManager::DeleteCategory(const wchar_t* name) {
...
@@ -415,7 +415,7 @@ bool DeckManager::DeleteCategory(const wchar_t* name) {
return
false
;
return
false
;
return
FileSystem
::
DeleteDir
(
localname
);
return
FileSystem
::
DeleteDir
(
localname
);
}
}
bool
DeckManager
::
Save
ReplayDeck
(
const
ReplayDeck
&
deck
,
const
wchar_t
*
name
)
{
bool
DeckManager
::
Save
DeckArray
(
const
DeckArray
&
deck
,
const
wchar_t
*
name
)
{
if
(
!
FileSystem
::
IsDirExists
(
L"./deck"
)
&&
!
FileSystem
::
MakeDir
(
L"./deck"
))
if
(
!
FileSystem
::
IsDirExists
(
L"./deck"
)
&&
!
FileSystem
::
MakeDir
(
L"./deck"
))
return
false
;
return
false
;
FILE
*
fp
=
OpenDeckFile
(
name
,
"w"
);
FILE
*
fp
=
OpenDeckFile
(
name
,
"w"
);
...
...
gframe/deck_manager.h
View file @
379afbc6
...
@@ -51,7 +51,7 @@ struct Deck {
...
@@ -51,7 +51,7 @@ struct Deck {
}
}
};
};
struct
ReplayDeck
{
struct
DeckArray
{
std
::
vector
<
uint32_t
>
main
;
std
::
vector
<
uint32_t
>
main
;
std
::
vector
<
uint32_t
>
extra
;
std
::
vector
<
uint32_t
>
extra
;
std
::
vector
<
uint32_t
>
side
;
std
::
vector
<
uint32_t
>
side
;
...
@@ -115,7 +115,7 @@ public:
...
@@ -115,7 +115,7 @@ public:
static
bool
CreateCategory
(
const
wchar_t
*
name
);
static
bool
CreateCategory
(
const
wchar_t
*
name
);
static
bool
RenameCategory
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
);
static
bool
RenameCategory
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
);
static
bool
DeleteCategory
(
const
wchar_t
*
name
);
static
bool
DeleteCategory
(
const
wchar_t
*
name
);
static
bool
Save
ReplayDeck
(
const
ReplayDeck
&
deck
,
const
wchar_t
*
name
);
static
bool
Save
DeckArray
(
const
DeckArray
&
deck
,
const
wchar_t
*
name
);
#endif // YGOPRO_SERVER_MODE
#endif // YGOPRO_SERVER_MODE
};
};
...
...
gframe/duelclient.cpp
View file @
379afbc6
...
@@ -531,11 +531,11 @@ void DuelClient::HandleSTOCPacketLan(unsigned char* data, int len) {
...
@@ -531,11 +531,11 @@ void DuelClient::HandleSTOCPacketLan(unsigned char* data, int len) {
int
deckc
=
BufferIO
::
ReadInt16
(
pdata
);
int
deckc
=
BufferIO
::
ReadInt16
(
pdata
);
int
extrac
=
BufferIO
::
ReadInt16
(
pdata
);
int
extrac
=
BufferIO
::
ReadInt16
(
pdata
);
int
sidec
=
BufferIO
::
ReadInt16
(
pdata
);
int
sidec
=
BufferIO
::
ReadInt16
(
pdata
);
mainGame
->
dField
.
Initial
(
0
,
deckc
,
extrac
);
mainGame
->
dField
.
Initial
(
0
,
deckc
,
extrac
,
sidec
);
deckc
=
BufferIO
::
ReadInt16
(
pdata
);
deckc
=
BufferIO
::
ReadInt16
(
pdata
);
extrac
=
BufferIO
::
ReadInt16
(
pdata
);
extrac
=
BufferIO
::
ReadInt16
(
pdata
);
sidec
=
BufferIO
::
ReadInt16
(
pdata
);
sidec
=
BufferIO
::
ReadInt16
(
pdata
);
mainGame
->
dField
.
Initial
(
1
,
deckc
,
extrac
);
mainGame
->
dField
.
Initial
(
1
,
deckc
,
extrac
,
sidec
);
mainGame
->
gMutex
.
unlock
();
mainGame
->
gMutex
.
unlock
();
break
;
break
;
}
}
...
...
gframe/game.cpp
View file @
379afbc6
...
@@ -1930,6 +1930,10 @@ void Game::ShowCardInfo(int code, bool resize) {
...
@@ -1930,6 +1930,10 @@ void Game::ShowCardInfo(int code, bool resize) {
myswprintf
(
formatBuffer
,
L"%ls[%08d]"
,
dataManager
.
GetName
(
code
),
code
);
myswprintf
(
formatBuffer
,
L"%ls[%08d]"
,
dataManager
.
GetName
(
code
),
code
);
}
}
stName
->
setText
(
formatBuffer
);
stName
->
setText
(
formatBuffer
);
if
((
int
)
guiFont
->
getDimension
(
formatBuffer
).
Width
>
stName
->
getRelativePosition
().
getWidth
()
-
gameConf
.
textfontsize
)
stName
->
setToolTipText
(
formatBuffer
);
else
stName
->
setToolTipText
(
nullptr
);
int
offset
=
0
;
int
offset
=
0
;
if
(
is_valid
&&
!
gameConf
.
hide_setname
)
{
if
(
is_valid
&&
!
gameConf
.
hide_setname
)
{
auto
&
cd
=
cit
->
second
;
auto
&
cd
=
cit
->
second
;
...
@@ -2479,6 +2483,9 @@ void Game::OnResize() {
...
@@ -2479,6 +2483,9 @@ void Game::OnResize() {
btnBigCardZoomIn
->
setRelativePosition
(
Resize
(
205
,
140
,
295
,
175
));
btnBigCardZoomIn
->
setRelativePosition
(
Resize
(
205
,
140
,
295
,
175
));
btnBigCardZoomOut
->
setRelativePosition
(
Resize
(
205
,
180
,
295
,
215
));
btnBigCardZoomOut
->
setRelativePosition
(
Resize
(
205
,
180
,
295
,
215
));
btnBigCardClose
->
setRelativePosition
(
Resize
(
205
,
230
,
295
,
265
));
btnBigCardClose
->
setRelativePosition
(
Resize
(
205
,
230
,
295
,
265
));
irr
::
s32
barWidth
=
(
xScale
>
1
)
?
gameConf
.
textfontsize
*
xScale
:
gameConf
.
textfontsize
;
env
->
getSkin
()
->
setSize
(
irr
::
gui
::
EGDS_SCROLLBAR_SIZE
,
barWidth
);
}
}
void
Game
::
ResizeChatInputWindow
()
{
void
Game
::
ResizeChatInputWindow
()
{
irr
::
s32
x
=
wInfos
->
getRelativePosition
().
LowerRightCorner
.
X
+
6
;
irr
::
s32
x
=
wInfos
->
getRelativePosition
().
LowerRightCorner
.
X
+
6
;
...
...
gframe/gframe.cpp
View file @
379afbc6
...
@@ -37,11 +37,17 @@ int main(int argc, char* argv[]) {
...
@@ -37,11 +37,17 @@ int main(int argc, char* argv[]) {
#if defined __APPLE__ && !defined YGOPRO_SERVER_MODE
#if defined __APPLE__ && !defined YGOPRO_SERVER_MODE
CFURLRef
bundle_url
=
CFBundleCopyBundleURL
(
CFBundleGetMainBundle
());
CFURLRef
bundle_url
=
CFBundleCopyBundleURL
(
CFBundleGetMainBundle
());
CFURLRef
bundle_base_url
=
CFURLCreateCopyDeletingLastPathComponent
(
nullptr
,
bundle_url
);
CFURLRef
bundle_base_url
=
CFURLCreateCopyDeletingLastPathComponent
(
nullptr
,
bundle_url
);
CFStringRef
bundle_ext
=
CFURLCopyPathExtension
(
bundle_url
);
if
(
bundle_ext
)
{
char
path
[
PATH_MAX
];
if
(
CFStringCompare
(
bundle_ext
,
CFSTR
(
"app"
),
kCFCompareCaseInsensitive
)
==
kCFCompareEqualTo
&&
CFURLGetFileSystemRepresentation
(
bundle_base_url
,
true
,
(
UInt8
*
)
path
,
PATH_MAX
))
{
chdir
(
path
);
}
CFRelease
(
bundle_ext
);
}
CFRelease
(
bundle_url
);
CFRelease
(
bundle_url
);
CFStringRef
path
=
CFURLCopyFileSystemPath
(
bundle_base_url
,
kCFURLPOSIXPathStyle
);
CFRelease
(
bundle_base_url
);
CFRelease
(
bundle_base_url
);
chdir
(
CFStringGetCStringPtr
(
path
,
kCFStringEncodingUTF8
));
CFRelease
(
path
);
#endif //__APPLE__
#endif //__APPLE__
#ifdef _WIN32
#ifdef _WIN32
if
(
argc
==
2
&&
(
ygo
::
IsExtension
(
argv
[
1
],
".ydk"
)
||
ygo
::
IsExtension
(
argv
[
1
],
".yrp"
)))
{
// open file from explorer
if
(
argc
==
2
&&
(
ygo
::
IsExtension
(
argv
[
1
],
".ydk"
)
||
ygo
::
IsExtension
(
argv
[
1
],
".yrp"
)))
{
// open file from explorer
...
...
gframe/image_manager.cpp
View file @
379afbc6
#include "image_manager.h"
#include "image_manager.h"
#include "game.h"
#include "game.h"
#include "myfilesystem.h"
#include "myfilesystem.h"
#ifdef YGOPRO_USE_THUMB_LOAD_TH
ER
AD
#ifdef YGOPRO_USE_THUMB_LOAD_TH
RE
AD
#include <thread>
#include <thread>
#endif
#endif
#ifdef _OPENMP
#ifdef _OPENMP
...
...
gframe/menu_handler.cpp
View file @
379afbc6
...
@@ -218,6 +218,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -218,6 +218,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_LOAD_REPLAY
:
{
case
BUTTON_LOAD_REPLAY
:
{
int
start_turn
=
1
;
if
(
open_file
)
{
if
(
open_file
)
{
ReplayMode
::
cur_replay
.
OpenReplay
(
open_file_name
);
ReplayMode
::
cur_replay
.
OpenReplay
(
open_file_name
);
open_file
=
false
;
open_file
=
false
;
...
@@ -229,6 +230,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -229,6 +230,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
myswprintf
(
replay_path
,
L"./replay/%ls"
,
mainGame
->
lstReplayList
->
getListItem
(
selected
));
myswprintf
(
replay_path
,
L"./replay/%ls"
,
mainGame
->
lstReplayList
->
getListItem
(
selected
));
if
(
!
ReplayMode
::
cur_replay
.
OpenReplay
(
replay_path
))
if
(
!
ReplayMode
::
cur_replay
.
OpenReplay
(
replay_path
))
break
;
break
;
start_turn
=
std
::
wcstol
(
mainGame
->
ebRepStartTurn
->
getText
(),
nullptr
,
10
);
}
}
mainGame
->
ClearCardInfo
();
mainGame
->
ClearCardInfo
();
mainGame
->
wCardImg
->
setVisible
(
true
);
mainGame
->
wCardImg
->
setVisible
(
true
);
...
@@ -243,7 +245,6 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -243,7 +245,6 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
dField
.
Clear
();
mainGame
->
dField
.
Clear
();
mainGame
->
HideElement
(
mainGame
->
wReplay
);
mainGame
->
HideElement
(
mainGame
->
wReplay
);
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
dField
);
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
dField
);
unsigned
int
start_turn
=
std
::
wcstol
(
mainGame
->
ebRepStartTurn
->
getText
(),
nullptr
,
10
);
if
(
start_turn
==
1
)
if
(
start_turn
==
1
)
start_turn
=
0
;
start_turn
=
0
;
ReplayMode
::
StartReplay
(
start_turn
);
ReplayMode
::
StartReplay
(
start_turn
);
...
@@ -302,7 +303,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -302,7 +303,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
}
}
for
(
size_t
i
=
0
;
i
<
replay
.
decks
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
replay
.
decks
.
size
();
++
i
)
{
myswprintf
(
filename
,
L"./deck/%ls-%d %ls.ydk"
,
replay_filename
,
i
+
1
,
namebuf
[
i
]);
myswprintf
(
filename
,
L"./deck/%ls-%d %ls.ydk"
,
replay_filename
,
i
+
1
,
namebuf
[
i
]);
DeckManager
::
Save
ReplayDeck
(
replay
.
decks
[
i
],
filename
);
DeckManager
::
Save
DeckArray
(
replay
.
decks
[
i
],
filename
);
}
}
mainGame
->
stACMessage
->
setText
(
dataManager
.
GetSysString
(
1335
));
mainGame
->
stACMessage
->
setText
(
dataManager
.
GetSysString
(
1335
));
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
...
@@ -516,27 +517,27 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -516,27 +517,27 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break
;
break
;
wchar_t
replay_path
[
256
]{};
wchar_t
replay_path
[
256
]{};
myswprintf
(
replay_path
,
L"./replay/%ls"
,
mainGame
->
lstReplayList
->
getListItem
(
sel
));
myswprintf
(
replay_path
,
L"./replay/%ls"
,
mainGame
->
lstReplayList
->
getListItem
(
sel
));
if
(
!
ReplayMode
::
cur
_replay
.
OpenReplay
(
replay_path
))
{
if
(
!
temp
_replay
.
OpenReplay
(
replay_path
))
{
mainGame
->
stReplayInfo
->
setText
(
L"Error"
);
mainGame
->
stReplayInfo
->
setText
(
L"Error"
);
break
;
break
;
}
}
wchar_t
infobuf
[
256
]{};
wchar_t
infobuf
[
256
]{};
std
::
wstring
repinfo
;
std
::
wstring
repinfo
;
time_t
curtime
;
time_t
curtime
;
if
(
ReplayMode
::
cur
_replay
.
pheader
.
flag
&
REPLAY_UNIFORM
)
if
(
temp
_replay
.
pheader
.
flag
&
REPLAY_UNIFORM
)
curtime
=
ReplayMode
::
cur
_replay
.
pheader
.
start_time
;
curtime
=
temp
_replay
.
pheader
.
start_time
;
else
else
curtime
=
ReplayMode
::
cur
_replay
.
pheader
.
seed
;
curtime
=
temp
_replay
.
pheader
.
seed
;
std
::
wcsftime
(
infobuf
,
sizeof
infobuf
/
sizeof
infobuf
[
0
],
L"%Y/%m/%d %H:%M:%S
\n
"
,
std
::
localtime
(
&
curtime
));
std
::
wcsftime
(
infobuf
,
sizeof
infobuf
/
sizeof
infobuf
[
0
],
L"%Y/%m/%d %H:%M:%S
\n
"
,
std
::
localtime
(
&
curtime
));
repinfo
.
append
(
infobuf
);
repinfo
.
append
(
infobuf
);
if
(
ReplayMode
::
cur
_replay
.
pheader
.
flag
&
REPLAY_SINGLE_MODE
)
{
if
(
temp
_replay
.
pheader
.
flag
&
REPLAY_SINGLE_MODE
)
{
wchar_t
path
[
256
]{};
wchar_t
path
[
256
]{};
BufferIO
::
DecodeUTF8
(
ReplayMode
::
cur
_replay
.
script_name
.
c_str
(),
path
);
BufferIO
::
DecodeUTF8
(
temp
_replay
.
script_name
.
c_str
(),
path
);
repinfo
.
append
(
path
);
repinfo
.
append
(
path
);
repinfo
.
append
(
L"
\n
"
);
repinfo
.
append
(
L"
\n
"
);
}
}
const
auto
&
player_names
=
ReplayMode
::
cur
_replay
.
players
;
const
auto
&
player_names
=
temp
_replay
.
players
;
if
(
ReplayMode
::
cur
_replay
.
pheader
.
flag
&
REPLAY_TAG
)
if
(
temp
_replay
.
pheader
.
flag
&
REPLAY_TAG
)
myswprintf
(
infobuf
,
L"%ls
\n
%ls
\n
===VS===
\n
%ls
\n
%ls
\n
"
,
player_names
[
0
].
c_str
(),
player_names
[
1
].
c_str
(),
player_names
[
2
].
c_str
(),
player_names
[
3
].
c_str
());
myswprintf
(
infobuf
,
L"%ls
\n
%ls
\n
===VS===
\n
%ls
\n
%ls
\n
"
,
player_names
[
0
].
c_str
(),
player_names
[
1
].
c_str
(),
player_names
[
2
].
c_str
(),
player_names
[
3
].
c_str
());
else
else
myswprintf
(
infobuf
,
L"%ls
\n
===VS===
\n
%ls
\n
"
,
player_names
[
0
].
c_str
(),
player_names
[
1
].
c_str
());
myswprintf
(
infobuf
,
L"%ls
\n
===VS===
\n
%ls
\n
"
,
player_names
[
0
].
c_str
(),
player_names
[
1
].
c_str
());
...
...
gframe/menu_handler.h
View file @
379afbc6
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#define MENU_HANDLER_H
#define MENU_HANDLER_H
#include <irrlicht.h>
#include <irrlicht.h>
#include "replay.h"
namespace
ygo
{
namespace
ygo
{
...
@@ -10,7 +11,7 @@ public:
...
@@ -10,7 +11,7 @@ public:
bool
OnEvent
(
const
irr
::
SEvent
&
event
)
override
;
bool
OnEvent
(
const
irr
::
SEvent
&
event
)
override
;
irr
::
s32
prev_operation
{
0
};
irr
::
s32
prev_operation
{
0
};
int
prev_sel
{
-
1
};
int
prev_sel
{
-
1
};
Replay
temp_replay
;
};
};
}
}
...
...
gframe/premake5.lua
View file @
379afbc6
...
@@ -93,7 +93,7 @@ end
...
@@ -93,7 +93,7 @@ end
includedirs
{
"../miniaudio/extras/decoders/libopus"
,
"../miniaudio/extras/decoders/libvorbis"
}
includedirs
{
"../miniaudio/extras/decoders/libopus"
,
"../miniaudio/extras/decoders/libvorbis"
}
if
not
MINIAUDIO_BUILD_OPUS_VORBIS
then
if
not
MINIAUDIO_BUILD_OPUS_VORBIS
then
links
{
"opusfile"
,
"vorbisfile"
,
"opus"
,
"vorbis"
,
"ogg"
}
links
{
"opusfile"
,
"vorbisfile"
,
"opus"
,
"vorbis"
,
"ogg"
}
libdirs
{
OPUS_LIB_DIR
,
VORBIS_LIB_DIR
,
OGG_LIB
DIR
}
libdirs
{
OPUS_LIB_DIR
,
OPUSFILE_LIB_DIR
,
VORBIS_LIB_DIR
,
OGG_LIB_
DIR
}
end
end
end
end
end
end
...
...
gframe/replay.cpp
View file @
379afbc6
...
@@ -272,7 +272,11 @@ void Replay::Reset() {
...
@@ -272,7 +272,11 @@ void Replay::Reset() {
script_name
.
clear
();
script_name
.
clear
();
}
}
void
Replay
::
SkipInfo
(){
void
Replay
::
SkipInfo
(){
data_position
+=
info_offset
;
if
(
data_position
==
0
)
data_position
+=
info_offset
;
}
bool
Replay
::
IsReplaying
()
const
{
return
is_replaying
;
}
}
bool
Replay
::
ReadInfo
()
{
bool
Replay
::
ReadInfo
()
{
int
player_count
=
(
pheader
.
flag
&
REPLAY_TAG
)
?
4
:
2
;
int
player_count
=
(
pheader
.
flag
&
REPLAY_TAG
)
?
4
:
2
;
...
@@ -304,7 +308,7 @@ bool Replay::ReadInfo() {
...
@@ -304,7 +308,7 @@ bool Replay::ReadInfo() {
}
}
else
{
else
{
for
(
int
p
=
0
;
p
<
player_count
;
++
p
)
{
for
(
int
p
=
0
;
p
<
player_count
;
++
p
)
{
ReplayDeck
deck
;
DeckArray
deck
;
uint32_t
main
=
Read
<
uint32_t
>
();
uint32_t
main
=
Read
<
uint32_t
>
();
if
(
main
>
MAINC_MAX
)
if
(
main
>
MAINC_MAX
)
return
false
;
return
false
;
...
...
gframe/replay.h
View file @
379afbc6
...
@@ -90,6 +90,7 @@ public:
...
@@ -90,6 +90,7 @@ public:
void
Rewind
();
void
Rewind
();
void
Reset
();
void
Reset
();
void
SkipInfo
();
void
SkipInfo
();
bool
IsReplaying
()
const
;
FILE
*
fp
{
nullptr
};
FILE
*
fp
{
nullptr
};
#ifdef _WIN32
#ifdef _WIN32
...
@@ -103,7 +104,7 @@ public:
...
@@ -103,7 +104,7 @@ public:
std
::
vector
<
std
::
wstring
>
players
;
// 80 or 160 bytes
std
::
vector
<
std
::
wstring
>
players
;
// 80 or 160 bytes
DuelParameters
params
;
// 16 bytes
DuelParameters
params
;
// 16 bytes
std
::
vector
<
ReplayDeck
>
decks
;
// 4 bytes, main deck, 4 bytes, extra deck
std
::
vector
<
DeckArray
>
decks
;
// 4 bytes, main deck, 4 bytes, extra deck
std
::
string
script_name
;
// 2 bytes, script name (max: 256 bytes)
std
::
string
script_name
;
// 2 bytes, script name (max: 256 bytes)
private:
private:
...
...
gframe/replay_mode.cpp
View file @
379afbc6
...
@@ -159,7 +159,7 @@ bool ReplayMode::StartDuel() {
...
@@ -159,7 +159,7 @@ bool ReplayMode::StartDuel() {
unsigned
int
seed
=
rh
.
seed
;
unsigned
int
seed
=
rh
.
seed
;
std
::
mt19937
rnd
(
seed
);
std
::
mt19937
rnd
(
seed
);
cur_replay
.
SkipInfo
();
cur_replay
.
SkipInfo
();
if
(
mainGame
->
dInfo
.
isTag
)
{
if
(
rh
.
flag
&
REPLAY_TAG
)
{
BufferIO
::
CopyWideString
(
cur_replay
.
players
[
0
].
c_str
(),
mainGame
->
dInfo
.
hostname
);
BufferIO
::
CopyWideString
(
cur_replay
.
players
[
0
].
c_str
(),
mainGame
->
dInfo
.
hostname
);
BufferIO
::
CopyWideString
(
cur_replay
.
players
[
1
].
c_str
(),
mainGame
->
dInfo
.
hostname_tag
);
BufferIO
::
CopyWideString
(
cur_replay
.
players
[
1
].
c_str
(),
mainGame
->
dInfo
.
hostname_tag
);
BufferIO
::
CopyWideString
(
cur_replay
.
players
[
2
].
c_str
(),
mainGame
->
dInfo
.
clientname_tag
);
BufferIO
::
CopyWideString
(
cur_replay
.
players
[
2
].
c_str
(),
mainGame
->
dInfo
.
clientname_tag
);
...
@@ -849,12 +849,12 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -849,12 +849,12 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
break
;
break
;
}
}
case
MSG_AI_NAME
:
{
case
MSG_AI_NAME
:
{
int
len
=
BufferIO
::
ReadInt16
(
pbuf
);
int
len
=
buffer_read
<
uint16_t
>
(
pbuf
);
pbuf
+=
len
+
1
;
pbuf
+=
len
+
1
;
break
;
break
;
}
}
case
MSG_SHOW_HINT
:
{
case
MSG_SHOW_HINT
:
{
int
len
=
BufferIO
::
ReadInt16
(
pbuf
);
int
len
=
buffer_read
<
uint16_t
>
(
pbuf
);
pbuf
+=
len
+
1
;
pbuf
+=
len
+
1
;
break
;
break
;
}
}
...
...
gframe/replay_mode.h
View file @
379afbc6
...
@@ -25,7 +25,6 @@ private:
...
@@ -25,7 +25,6 @@ private:
public:
public:
static
Replay
cur_replay
;
static
Replay
cur_replay
;
public:
static
bool
StartReplay
(
int
skipturn
);
static
bool
StartReplay
(
int
skipturn
);
static
void
StopReplay
(
bool
is_exiting
=
false
);
static
void
StopReplay
(
bool
is_exiting
=
false
);
static
void
SwapField
();
static
void
SwapField
();
...
...
gframe/single_mode.cpp
View file @
379afbc6
...
@@ -763,21 +763,25 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -763,21 +763,25 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
case
MSG_AI_NAME
:
{
case
MSG_AI_NAME
:
{
char
namebuf
[
128
]{};
char
namebuf
[
128
]{};
wchar_t
wname
[
20
]{};
wchar_t
wname
[
20
]{};
int
len
=
BufferIO
::
ReadInt16
(
pbuf
);
int
name_len
=
buffer_read
<
uint16_t
>
(
pbuf
);
auto
begin
=
pbuf
;
if
(
name_len
+
1
<=
(
int
)
sizeof
namebuf
)
{
pbuf
+=
len
+
1
;
std
::
memcpy
(
namebuf
,
pbuf
,
name_len
);
std
::
memcpy
(
namebuf
,
begin
,
len
+
1
);
namebuf
[
name_len
]
=
0
;
}
pbuf
+=
name_len
+
1
;
BufferIO
::
DecodeUTF8
(
namebuf
,
wname
);
BufferIO
::
DecodeUTF8
(
namebuf
,
wname
);
BufferIO
::
CopyCharArray
(
wname
,
mainGame
->
dInfo
.
clientname
);
BufferIO
::
CopyCharArray
(
wname
,
mainGame
->
dInfo
.
clientname
);
break
;
break
;
}
}
case
MSG_SHOW_HINT
:
{
case
MSG_SHOW_HINT
:
{
char
msgbuf
[
1024
];
char
msgbuf
[
1024
]{};
wchar_t
msg
[
1024
];
wchar_t
msg
[
1024
]{};
int
len
=
BufferIO
::
ReadInt16
(
pbuf
);
int
msg_len
=
buffer_read
<
uint16_t
>
(
pbuf
);
auto
begin
=
pbuf
;
if
(
msg_len
+
1
<=
(
int
)
sizeof
msgbuf
)
{
pbuf
+=
len
+
1
;
std
::
memcpy
(
msgbuf
,
pbuf
,
msg_len
);
std
::
memcpy
(
msgbuf
,
begin
,
len
+
1
);
msgbuf
[
msg_len
]
=
0
;
}
pbuf
+=
msg_len
+
1
;
BufferIO
::
DecodeUTF8
(
msgbuf
,
msg
);
BufferIO
::
DecodeUTF8
(
msgbuf
,
msg
);
mainGame
->
gMutex
.
lock
();
mainGame
->
gMutex
.
lock
();
mainGame
->
SetStaticText
(
mainGame
->
stMessage
,
310
,
mainGame
->
guiFont
,
msg
);
mainGame
->
SetStaticText
(
mainGame
->
stMessage
,
310
,
mainGame
->
guiFont
,
msg
);
...
...
ocgcore
@
ab7ef30f
Subproject commit
ea1f4623b88d12998e548bf7fc06cc163ec823dc
Subproject commit
ab7ef30f678a7356e0fca85b0091fcdf56581b35
premake/irrlicht/premake5.lua
View file @
379afbc6
...
@@ -16,6 +16,7 @@ project "irrlicht"
...
@@ -16,6 +16,7 @@ project "irrlicht"
"_IRR_STATIC_LIB_"
,
"_IRR_STATIC_LIB_"
,
"NO_IRR_USE_NON_SYSTEM_BZLIB_"
,
"NO_IRR_USE_NON_SYSTEM_BZLIB_"
,
"NO_IRR_COMPILE_WITH_BZIP2_"
,
"NO_IRR_COMPILE_WITH_BZIP2_"
,
"NO_IRR_COMPILE_WITH_LZMA_"
,
"NO_IRR_COMPILE_WITH_CONSOLE_DEVICE_"
,
"NO_IRR_COMPILE_WITH_CONSOLE_DEVICE_"
,
"NO_IRR_COMPILE_WITH_DIRECT3D_8_"
,
"NO_IRR_COMPILE_WITH_DIRECT3D_8_"
,
"NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_"
,
"NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_"
,
...
...
premake/miniaudio/premake5.lua
View file @
379afbc6
...
@@ -123,7 +123,7 @@ project "miniaudio"
...
@@ -123,7 +123,7 @@ project "miniaudio"
"OPUS_HAVE_RTCD"
,
"OPUS_X86_MAY_HAVE_SSE"
,
"OPUS_X86_MAY_HAVE_SSE4_1"
,
"OPUS_X86_MAY_HAVE_AVX2"
,
"OPUS_HAVE_RTCD"
,
"OPUS_X86_MAY_HAVE_SSE"
,
"OPUS_X86_MAY_HAVE_SSE4_1"
,
"OPUS_X86_MAY_HAVE_AVX2"
,
}
}
else
else
includedirs
{
OPUS_INCLUDE_DIR
,
VORBIS_INCLUDE_DIR
,
OGG_INCLUDE_DIR
}
includedirs
{
OPUS_INCLUDE_DIR
,
OPUSFILE_INCLUDE_DIR
,
VORBIS_INCLUDE_DIR
,
OGG_INCLUDE_DIR
}
end
end
end
end
...
...
premake5.lua
View file @
379afbc6
...
@@ -54,14 +54,14 @@ newoption { trigger = "irrlicht-lib-dir", category = "YGOPro - irrlicht", descri
...
@@ -54,14 +54,14 @@ newoption { trigger = "irrlicht-lib-dir", category = "YGOPro - irrlicht", descri
newoption
{
trigger
=
"no-audio"
,
category
=
"YGOPro"
,
description
=
""
}
newoption
{
trigger
=
"no-audio"
,
category
=
"YGOPro"
,
description
=
""
}
newoption
{
trigger
=
"audio-lib"
,
category
=
"YGOPro"
,
description
=
""
,
value
=
"miniaudio, irrklang"
,
default
=
AUDIO_LIB
}
newoption
{
trigger
=
"audio-lib"
,
category
=
"YGOPro"
,
description
=
""
,
value
=
"miniaudio, irrklang"
,
default
=
AUDIO_LIB
}
newoption
{
trigger
=
"miniaudio-include-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"miniaudio-lib-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"miniaudio-support-opus-vorbis"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"miniaudio-support-opus-vorbis"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"no-miniaudio-support-opus-vorbis"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"no-miniaudio-support-opus-vorbis"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"build-opus-vorbis"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"build-opus-vorbis"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"no-build-opus-vorbis"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"no-build-opus-vorbis"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"opus-include-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"opus-include-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"opus-lib-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"opus-lib-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"opusfile-include-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"opusfile-lib-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"vorbis-include-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"vorbis-include-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"vorbis-lib-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"vorbis-lib-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"ogg-include-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"ogg-include-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
...
@@ -133,6 +133,14 @@ function ApplyNumber(param)
...
@@ -133,6 +133,14 @@ function ApplyNumber(param)
end
end
end
end
function
FindHeaderWithSubDir
(
header
,
subdir
)
local
result
=
os
.
findheader
(
header
)
if
result
and
subdir
then
result
=
path
.
join
(
result
,
subdir
)
end
return
result
end
if
GetParam
(
"build-lua"
)
then
if
GetParam
(
"build-lua"
)
then
BUILD_LUA
=
true
BUILD_LUA
=
true
elseif
GetParam
(
"no-build-lua"
)
then
elseif
GetParam
(
"no-build-lua"
)
then
...
@@ -142,15 +150,28 @@ if not BUILD_LUA then
...
@@ -142,15 +150,28 @@ if not BUILD_LUA then
-- at most times you need to change this if you change BUILD_LUA to false
-- at most times you need to change this if you change BUILD_LUA to false
-- make sure your lua lib is built with C++ and version >= 5.3
-- make sure your lua lib is built with C++ and version >= 5.3
LUA_LIB_NAME
=
GetParam
(
"lua-lib-name"
)
LUA_LIB_NAME
=
GetParam
(
"lua-lib-name"
)
LUA_INCLUDE_DIR
=
GetParam
(
"lua-include-dir"
)
or
os
.
findheader
(
LUA_LIB_NAME
)
LUA_INCLUDE_DIR
=
GetParam
(
"lua-include-dir"
)
or
os
.
findheader
(
"lua.h"
)
LUA_LIB_DIR
=
GetParam
(
"lua-lib-dir"
)
or
os
.
findlib
(
LUA_LIB_NAME
)
LUA_LIB_DIR
=
GetParam
(
"lua-lib-dir"
)
or
os
.
findlib
(
LUA_LIB_NAME
)
end
end
if
GetParam
(
"lua-deb"
)
then
if
GetParam
(
"lua-deb"
)
then
BUILD_LUA
=
false
BUILD_LUA
=
false
LUA_LIB_DIR
=
"/usr/lib/x86_64-linux-gnu"
local
lua_versions
=
{
"5.4"
,
"5.3"
}
LUA_LIB_NAME
=
"lua5.3-c++"
local
lua_version
=
nil
LUA_INCLUDE_DIR
=
"/usr/include/lua5.3"
for
_
,
version
in
ipairs
(
lua_versions
)
do
local
lua_lib_dir
=
os
.
findlib
(
"lua"
..
version
..
"-c++"
)
if
lua_lib_dir
then
print
(
"Found lua "
..
version
..
" at "
..
lua_lib_dir
)
lua_version
=
version
LUA_LIB_DIR
=
lua_lib_dir
break
end
end
if
not
lua_version
then
error
(
"Lua library not found. Please install lua by command 'sudo apt -y install liblua5.4-dev'"
)
end
LUA_LIB_NAME
=
"lua"
..
lua_version
..
"-c++"
LUA_INCLUDE_DIR
=
path
.
join
(
"/usr/include"
,
"lua"
..
lua_version
)
end
end
if
GetParam
(
"build-event"
)
then
if
GetParam
(
"build-event"
)
then
...
@@ -159,7 +180,7 @@ elseif GetParam("no-build-event") then
...
@@ -159,7 +180,7 @@ elseif GetParam("no-build-event") then
BUILD_EVENT
=
false
BUILD_EVENT
=
false
end
end
if
not
BUILD_EVENT
then
if
not
BUILD_EVENT
then
EVENT_INCLUDE_DIR
=
GetParam
(
"event-include-dir"
)
or
os
.
findheader
(
"event"
)
EVENT_INCLUDE_DIR
=
GetParam
(
"event-include-dir"
)
or
os
.
findheader
(
"event
2/event.h
"
)
EVENT_LIB_DIR
=
GetParam
(
"event-lib-dir"
)
or
os
.
findlib
(
"event"
)
EVENT_LIB_DIR
=
GetParam
(
"event-lib-dir"
)
or
os
.
findlib
(
"event"
)
end
end
...
@@ -169,7 +190,7 @@ elseif GetParam("no-build-freetype") then
...
@@ -169,7 +190,7 @@ elseif GetParam("no-build-freetype") then
BUILD_FREETYPE
=
false
BUILD_FREETYPE
=
false
end
end
if
not
BUILD_FREETYPE
then
if
not
BUILD_FREETYPE
then
FREETYPE_INCLUDE_DIR
=
GetParam
(
"freetype-include-dir"
)
or
os
.
findheader
(
"freetype
"
)
FREETYPE_INCLUDE_DIR
=
GetParam
(
"freetype-include-dir"
)
or
FindHeaderWithSubDir
(
"freetype2/ft2build.h"
,
"freetype2
"
)
FREETYPE_LIB_DIR
=
GetParam
(
"freetype-lib-dir"
)
or
os
.
findlib
(
"freetype"
)
FREETYPE_LIB_DIR
=
GetParam
(
"freetype-lib-dir"
)
or
os
.
findlib
(
"freetype"
)
end
end
...
@@ -179,7 +200,7 @@ elseif GetParam("no-build-sqlite") then
...
@@ -179,7 +200,7 @@ elseif GetParam("no-build-sqlite") then
BUILD_SQLITE
=
false
BUILD_SQLITE
=
false
end
end
if
not
BUILD_SQLITE
then
if
not
BUILD_SQLITE
then
SQLITE_INCLUDE_DIR
=
GetParam
(
"sqlite-include-dir"
)
or
os
.
findheader
(
"sqlite3"
)
SQLITE_INCLUDE_DIR
=
GetParam
(
"sqlite-include-dir"
)
or
os
.
findheader
(
"sqlite3
.h
"
)
SQLITE_LIB_DIR
=
GetParam
(
"sqlite-lib-dir"
)
or
os
.
findlib
(
"sqlite3"
)
SQLITE_LIB_DIR
=
GetParam
(
"sqlite-lib-dir"
)
or
os
.
findlib
(
"sqlite3"
)
end
end
...
@@ -189,7 +210,7 @@ elseif GetParam("no-build-irrlicht") then
...
@@ -189,7 +210,7 @@ elseif GetParam("no-build-irrlicht") then
BUILD_IRRLICHT
=
false
BUILD_IRRLICHT
=
false
end
end
if
not
BUILD_IRRLICHT
then
if
not
BUILD_IRRLICHT
then
IRRLICHT_INCLUDE_DIR
=
GetParam
(
"irrlicht-include-dir"
)
or
os
.
findheader
(
"irrlicht"
)
IRRLICHT_INCLUDE_DIR
=
GetParam
(
"irrlicht-include-dir"
)
or
os
.
findheader
(
"irrlicht
.h
"
)
IRRLICHT_LIB_DIR
=
GetParam
(
"irrlicht-lib-dir"
)
or
os
.
findlib
(
"irrlicht"
)
IRRLICHT_LIB_DIR
=
GetParam
(
"irrlicht-lib-dir"
)
or
os
.
findlib
(
"irrlicht"
)
end
end
...
@@ -227,12 +248,14 @@ if USE_AUDIO then
...
@@ -227,12 +248,14 @@ if USE_AUDIO then
MINIAUDIO_BUILD_OPUS_VORBIS
=
true
MINIAUDIO_BUILD_OPUS_VORBIS
=
true
end
end
if
not
MINIAUDIO_BUILD_OPUS_VORBIS
then
if
not
MINIAUDIO_BUILD_OPUS_VORBIS
then
OPUS_INCLUDE_DIR
=
GetParam
(
"opus-include-dir"
)
or
os
.
findheader
(
"opus"
)
OPUS_INCLUDE_DIR
=
GetParam
(
"opus-include-dir"
)
or
FindHeaderWithSubDir
(
"opus/opus.h"
,
"opus"
)
OPUS_LIB_DIR
=
GetParam
(
"opus-lib-dir"
)
or
os
.
findlib
(
"opusfile"
)
OPUS_LIB_DIR
=
GetParam
(
"opus-lib-dir"
)
or
os
.
findlib
(
"opus"
)
VORBIS_INCLUDE_DIR
=
GetParam
(
"vorbis-include-dir"
)
or
os
.
findheader
(
"vorbis"
)
OPUSFILE_INCLUDE_DIR
=
GetParam
(
"opusfile-include-dir"
)
or
FindHeaderWithSubDir
(
"opus/opusfile.h"
,
"opus"
)
OPUSFILE_LIB_DIR
=
GetParam
(
"opusfile-lib-dir"
)
or
os
.
findlib
(
"opusfile"
)
VORBIS_INCLUDE_DIR
=
GetParam
(
"vorbis-include-dir"
)
or
os
.
findheader
(
"vorbis/vorbisfile.h"
)
VORBIS_LIB_DIR
=
GetParam
(
"vorbis-lib-dir"
)
or
os
.
findlib
(
"vorbis"
)
VORBIS_LIB_DIR
=
GetParam
(
"vorbis-lib-dir"
)
or
os
.
findlib
(
"vorbis"
)
OGG_INCLUDE_DIR
=
GetParam
(
"ogg-include-dir"
)
or
os
.
findheader
(
"ogg"
)
OGG_INCLUDE_DIR
=
GetParam
(
"ogg-include-dir"
)
or
os
.
findheader
(
"ogg
/ogg.h
"
)
O
C
G_LIB_DIR
=
GetParam
(
"ogg-lib-dir"
)
or
os
.
findlib
(
"ogg"
)
O
G
G_LIB_DIR
=
GetParam
(
"ogg-lib-dir"
)
or
os
.
findlib
(
"ogg"
)
end
end
end
end
elseif
AUDIO_LIB
==
"irrklang"
then
elseif
AUDIO_LIB
==
"irrklang"
then
...
...
script
@
52007f69
Subproject commit
4b650142a9910444f420cd2c5e1039f7b39681ab
Subproject commit
52007f6939ec3b27238ff705e5364d6e6984e033
strings.conf
View file @
379afbc6
...
@@ -671,6 +671,7 @@
...
@@ -671,6 +671,7 @@
!
counter
0
x106b
狂爱指示物
!
counter
0
x106b
狂爱指示物
!
counter
0
x6c
访问指示物
!
counter
0
x6c
访问指示物
!
counter
0
x6d
祝台指示物
!
counter
0
x6d
祝台指示物
!
counter
0
x6e
四季指示物
#setnames, using tab for comment
#setnames, using tab for comment
!
setname
0
x1
正义盟军
A
・
O
・
J
!
setname
0
x1
正义盟军
A
・
O
・
J
!
setname
0
x2
次世代 ジェネクス
!
setname
0
x2
次世代 ジェネクス
...
@@ -1253,7 +1254,7 @@
...
@@ -1253,7 +1254,7 @@
!
setname
0
x1c0
龙华 竜華
!
setname
0
x1c0
龙华 竜華
!
setname
0
x1c1
阿尔戈☆群星
ARG
☆
S
!
setname
0
x1c1
阿尔戈☆群星
ARG
☆
S
!
setname
0
x1c2
喷水引擎 アクア・ジェット
!
setname
0
x1c2
喷水引擎 アクア・ジェット
!
setname
0
x1c3
御
剑
Mitsurugi
!
setname
0
x1c3
巳
剑
Mitsurugi
!
setname
0
x1c4
征龙 征竜
!
setname
0
x1c4
征龙 征竜
!
setname
0
x1c5
再世 再世
!
setname
0
x1c5
再世 再世
!
setname
0
x1c6
统王 ドミナス
!
setname
0
x1c6
统王 ドミナス
...
@@ -1262,3 +1263,6 @@
...
@@ -1262,3 +1263,6 @@
!
setname
0
x1c9
星辰 ドラゴンテイル
!
setname
0
x1c9
星辰 ドラゴンテイル
!
setname
0
x1ca
味美喵 ヤミー
!
setname
0
x1ca
味美喵 ヤミー
!
setname
0
x1cb
K9
!
setname
0
x1cb
K9
!
setname
0
x1cc
瞬间移动 テレポート
!
setname
0
x1cd
神艺 アルトメギア
!
setname
0
x1ce
狱神 獄神
system.conf
View file @
379afbc6
...
@@ -9,8 +9,8 @@ nickname = Komeiji Koishi
...
@@ -9,8 +9,8 @@ nickname = Komeiji Koishi
gamename
=
Game
gamename
=
Game
lastcategory
= 未分类卡组
lastcategory
= 未分类卡组
lastdeck
=
new
lastdeck
=
new
textfont
= ./
fonts
/
simhei
.
ttf
14
textfont
= ./
fonts
/
textFont
.
ttf
14
numfont
= ./
fonts
/
arial
.
ttf
numfont
= ./
fonts
/
numFont
.
ttf
serverport
=
7911
serverport
=
7911
lasthost
=
127
.
0
.
0
.
1
lasthost
=
127
.
0
.
0
.
1
lastport
=
0
lastport
=
0
...
...
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