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
24bc8c0c
Commit
24bc8c0c
authored
Nov 02, 2018
by
nekrozar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c8fffbab
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
31 deletions
+34
-31
gframe/game.cpp
gframe/game.cpp
+8
-8
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+7
-6
gframe/single_duel.cpp
gframe/single_duel.cpp
+7
-6
gframe/single_mode.cpp
gframe/single_mode.cpp
+5
-5
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+7
-6
No files found.
gframe/game.cpp
View file @
24bc8c0c
...
...
@@ -861,7 +861,7 @@ void Game::SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gu
pControl
->
setText
(
dataManager
.
strBuffer
);
}
void
Game
::
LoadExpansionDB
()
{
LoadExpansionDBDirectry
(
"./expansions"
)
LoadExpansionDBDirectry
(
"./expansions"
)
;
#ifdef _WIN32
char
fpath
[
1000
];
WIN32_FIND_DATAW
fdataw
;
...
...
@@ -872,7 +872,7 @@ void Game::LoadExpansionDB() {
char
fname
[
780
];
BufferIO
::
EncodeUTF8
(
fdataw
.
cFileName
,
fname
);
sprintf
(
fpath
,
"./expansions/%s"
,
fname
);
LoadExpansionDBDirectry
(
fpath
)
LoadExpansionDBDirectry
(
fpath
)
;
}
}
while
(
FindNextFileW
(
fh
,
&
fdataw
));
FindClose
(
fh
);
...
...
@@ -882,11 +882,11 @@ void Game::LoadExpansionDB() {
struct
dirent
*
dirp
;
if
((
dir
=
opendir
(
"./expansions/"
))
!=
NULL
)
{
while
((
dirp
=
readdir
(
dir
))
!=
NULL
)
{
if
(
f
->
d_type
!=
DT_DIR
)
if
(
dirp
->
d_type
!=
DT_DIR
)
continue
;
char
filepath
[
1000
];
sprintf
(
filepath
,
"./expansions/%s/"
,
dirp
->
d_name
);
LoadExpansionDBDirectry
(
filepath
)
LoadExpansionDBDirectry
(
filepath
)
;
}
closedir
(
dir
);
}
...
...
@@ -929,7 +929,7 @@ void Game::LoadExpansionDBDirectry(const char* path) {
#endif
}
void
Game
::
LoadExpansionStrings
()
{
LoadExpansionStringsDirectry
(
"./expansions"
)
LoadExpansionStringsDirectry
(
"./expansions"
)
;
#ifdef _WIN32
char
fpath
[
1000
];
WIN32_FIND_DATAW
fdataw
;
...
...
@@ -940,7 +940,7 @@ void Game::LoadExpansionStrings() {
char
fname
[
780
];
BufferIO
::
EncodeUTF8
(
fdataw
.
cFileName
,
fname
);
sprintf
(
fpath
,
"./expansions/%s"
,
fname
);
LoadExpansionStringsDirectry
(
fpath
)
LoadExpansionStringsDirectry
(
fpath
)
;
}
}
while
(
FindNextFileW
(
fh
,
&
fdataw
));
FindClose
(
fh
);
...
...
@@ -950,11 +950,11 @@ void Game::LoadExpansionStrings() {
struct
dirent
*
dirp
;
if
((
dir
=
opendir
(
"./expansions/"
))
!=
NULL
)
{
while
((
dirp
=
readdir
(
dir
))
!=
NULL
)
{
if
(
f
->
d_type
!=
DT_DIR
)
if
(
dirp
->
d_type
!=
DT_DIR
)
continue
;
char
filepath
[
1000
];
sprintf
(
filepath
,
"./expansions/%s/"
,
dirp
->
d_name
);
LoadExpansionStringsDirectry
(
filepath
)
LoadExpansionStringsDirectry
(
filepath
)
;
}
closedir
(
dir
);
}
...
...
gframe/replay_mode.cpp
View file @
24bc8c0c
...
...
@@ -935,8 +935,8 @@ void ReplayMode::ReplayReload() {
/*len = */
query_field_card
(
pduel
,
1
,
LOCATION_REMOVED
,
flag
,
queryBuffer
,
0
);
mainGame
->
dField
.
UpdateFieldCard
(
mainGame
->
LocalPlayer
(
1
),
LOCATION_REMOVED
,
(
char
*
)
queryBuffer
);
}
byte
*
ReplayMode
::
::
ScriptReaderEx
(
const
char
*
script_name
,
int
*
slen
)
{
ScriptReaderExDirectry
(
"./expansions"
,
script_name
,
slen
)
byte
*
ReplayMode
::
ScriptReaderEx
(
const
char
*
script_name
,
int
*
slen
)
{
ScriptReaderExDirectry
(
"./expansions"
,
script_name
,
slen
)
;
#ifdef _WIN32
char
fpath
[
1000
];
WIN32_FIND_DATAW
fdataw
;
...
...
@@ -947,7 +947,7 @@ byte* ReplayMode::::ScriptReaderEx(const char* script_name, int* slen) {
char
fname
[
780
];
BufferIO
::
EncodeUTF8
(
fdataw
.
cFileName
,
fname
);
sprintf
(
fpath
,
"./expansions/%s"
,
fname
);
byte
*
buffer
=
ScriptReaderExDirectry
(
fpath
,
script_name
,
slen
)
byte
*
buffer
=
ScriptReaderExDirectry
(
fpath
,
script_name
,
slen
)
;
if
(
buffer
)
return
buffer
;
}
...
...
@@ -959,11 +959,11 @@ byte* ReplayMode::::ScriptReaderEx(const char* script_name, int* slen) {
struct
dirent
*
dirp
;
if
((
dir
=
opendir
(
"./expansions/"
))
!=
NULL
)
{
while
((
dirp
=
readdir
(
dir
))
!=
NULL
)
{
if
(
f
->
d_type
!=
DT_DIR
)
if
(
dirp
->
d_type
!=
DT_DIR
)
continue
;
char
filepath
[
1000
];
sprintf
(
filepath
,
"./expansions/%s/"
,
dirp
->
d_name
);
byte
*
buffer
=
ScriptReaderExDirectry
(
filepath
,
script_name
,
slen
)
byte
*
buffer
=
ScriptReaderExDirectry
(
filepath
,
script_name
,
slen
)
;
if
(
buffer
)
return
buffer
;
}
...
...
@@ -973,7 +973,8 @@ byte* ReplayMode::::ScriptReaderEx(const char* script_name, int* slen) {
return
default_script_reader
(
script_name
,
slen
);
}
byte
*
ReplayMode
::
ScriptReaderExDirectry
(
const
char
*
path
,
const
char
*
script_name
,
int
*
slen
)
{
char
sname
[
256
]
=
path
;
char
sname
[
256
];
strcpy
(
sname
,
path
);
strcat
(
sname
,
script_name
+
1
);
//default script name: ./script/c%d.lua
return
default_script_reader
(
sname
,
slen
);
}
...
...
gframe/single_duel.cpp
View file @
24bc8c0c
...
...
@@ -1545,8 +1545,8 @@ void SingleDuel::RefreshSingle(int player, int location, int sequence, int flag)
NetServer
::
ReSendToPlayer
(
*
pit
);
}
}
byte
*
SingleDuel
::
::
ScriptReaderEx
(
const
char
*
script_name
,
int
*
slen
)
{
ScriptReaderExDirectry
(
"./expansions"
,
script_name
,
slen
)
byte
*
SingleDuel
::
ScriptReaderEx
(
const
char
*
script_name
,
int
*
slen
)
{
ScriptReaderExDirectry
(
"./expansions"
,
script_name
,
slen
)
;
#ifdef _WIN32
char
fpath
[
1000
];
WIN32_FIND_DATAW
fdataw
;
...
...
@@ -1557,7 +1557,7 @@ byte* SingleDuel::::ScriptReaderEx(const char* script_name, int* slen) {
char
fname
[
780
];
BufferIO
::
EncodeUTF8
(
fdataw
.
cFileName
,
fname
);
sprintf
(
fpath
,
"./expansions/%s"
,
fname
);
byte
*
buffer
=
ScriptReaderExDirectry
(
fpath
,
script_name
,
slen
)
byte
*
buffer
=
ScriptReaderExDirectry
(
fpath
,
script_name
,
slen
)
;
if
(
buffer
)
return
buffer
;
}
...
...
@@ -1569,11 +1569,11 @@ byte* SingleDuel::::ScriptReaderEx(const char* script_name, int* slen) {
struct
dirent
*
dirp
;
if
((
dir
=
opendir
(
"./expansions/"
))
!=
NULL
)
{
while
((
dirp
=
readdir
(
dir
))
!=
NULL
)
{
if
(
f
->
d_type
!=
DT_DIR
)
if
(
dirp
->
d_type
!=
DT_DIR
)
continue
;
char
filepath
[
1000
];
sprintf
(
filepath
,
"./expansions/%s/"
,
dirp
->
d_name
);
byte
*
buffer
=
ScriptReaderExDirectry
(
filepath
,
script_name
,
slen
)
byte
*
buffer
=
ScriptReaderExDirectry
(
filepath
,
script_name
,
slen
)
;
if
(
buffer
)
return
buffer
;
}
...
...
@@ -1583,7 +1583,8 @@ byte* SingleDuel::::ScriptReaderEx(const char* script_name, int* slen) {
return
default_script_reader
(
script_name
,
slen
);
}
byte
*
SingleDuel
::
ScriptReaderExDirectry
(
const
char
*
path
,
const
char
*
script_name
,
int
*
slen
)
{
char
sname
[
256
]
=
path
;
char
sname
[
256
];
strcpy
(
sname
,
path
);
strcat
(
sname
,
script_name
+
1
);
//default script name: ./script/c%d.lua
return
default_script_reader
(
sname
,
slen
);
}
...
...
gframe/single_mode.cpp
View file @
24bc8c0c
...
...
@@ -845,8 +845,8 @@ void SingleMode::SinglePlayReload() {
/*len = */
query_field_card
(
pduel
,
1
,
LOCATION_REMOVED
,
flag
,
queryBuffer
,
0
);
mainGame
->
dField
.
UpdateFieldCard
(
mainGame
->
LocalPlayer
(
1
),
LOCATION_REMOVED
,
(
char
*
)
queryBuffer
);
}
byte
*
SingleMode
::
::
ScriptReaderEx
(
const
char
*
script_name
,
int
*
slen
)
{
ScriptReaderExDirectry
(
"./expansions"
,
script_name
,
slen
)
byte
*
SingleMode
::
ScriptReaderEx
(
const
char
*
script_name
,
int
*
slen
)
{
ScriptReaderExDirectry
(
"./expansions"
,
script_name
,
slen
)
;
#ifdef _WIN32
char
fpath
[
1000
];
WIN32_FIND_DATAW
fdataw
;
...
...
@@ -857,7 +857,7 @@ byte* SingleMode::::ScriptReaderEx(const char* script_name, int* slen) {
char
fname
[
780
];
BufferIO
::
EncodeUTF8
(
fdataw
.
cFileName
,
fname
);
sprintf
(
fpath
,
"./expansions/%s"
,
fname
);
byte
*
buffer
=
ScriptReaderExDirectry
(
fpath
,
script_name
,
slen
)
byte
*
buffer
=
ScriptReaderExDirectry
(
fpath
,
script_name
,
slen
)
;
if
(
buffer
)
return
buffer
;
}
...
...
@@ -869,11 +869,11 @@ byte* SingleMode::::ScriptReaderEx(const char* script_name, int* slen) {
struct
dirent
*
dirp
;
if
((
dir
=
opendir
(
"./expansions/"
))
!=
NULL
)
{
while
((
dirp
=
readdir
(
dir
))
!=
NULL
)
{
if
(
f
->
d_type
!=
DT_DIR
)
if
(
dirp
->
d_type
!=
DT_DIR
)
continue
;
char
filepath
[
1000
];
sprintf
(
filepath
,
"./expansions/%s/"
,
dirp
->
d_name
);
byte
*
buffer
=
ScriptReaderExDirectry
(
filepath
,
script_name
,
slen
)
byte
*
buffer
=
ScriptReaderExDirectry
(
filepath
,
script_name
,
slen
)
;
if
(
buffer
)
return
buffer
;
}
...
...
gframe/tag_duel.cpp
View file @
24bc8c0c
...
...
@@ -1663,8 +1663,8 @@ void TagDuel::RefreshSingle(int player, int location, int sequence, int flag) {
}
}
byte
*
TagDuel
::
::
ScriptReaderEx
(
const
char
*
script_name
,
int
*
slen
)
{
ScriptReaderExDirectry
(
"./expansions"
,
script_name
,
slen
)
byte
*
TagDuel
::
ScriptReaderEx
(
const
char
*
script_name
,
int
*
slen
)
{
ScriptReaderExDirectry
(
"./expansions"
,
script_name
,
slen
)
;
#ifdef _WIN32
char
fpath
[
1000
];
WIN32_FIND_DATAW
fdataw
;
...
...
@@ -1675,7 +1675,7 @@ byte* TagDuel::::ScriptReaderEx(const char* script_name, int* slen) {
char
fname
[
780
];
BufferIO
::
EncodeUTF8
(
fdataw
.
cFileName
,
fname
);
sprintf
(
fpath
,
"./expansions/%s"
,
fname
);
byte
*
buffer
=
ScriptReaderExDirectry
(
fpath
,
script_name
,
slen
)
byte
*
buffer
=
ScriptReaderExDirectry
(
fpath
,
script_name
,
slen
)
;
if
(
buffer
)
return
buffer
;
}
...
...
@@ -1687,11 +1687,11 @@ byte* TagDuel::::ScriptReaderEx(const char* script_name, int* slen) {
struct
dirent
*
dirp
;
if
((
dir
=
opendir
(
"./expansions/"
))
!=
NULL
)
{
while
((
dirp
=
readdir
(
dir
))
!=
NULL
)
{
if
(
f
->
d_type
!=
DT_DIR
)
if
(
dirp
->
d_type
!=
DT_DIR
)
continue
;
char
filepath
[
1000
];
sprintf
(
filepath
,
"./expansions/%s/"
,
dirp
->
d_name
);
byte
*
buffer
=
ScriptReaderExDirectry
(
filepath
,
script_name
,
slen
)
byte
*
buffer
=
ScriptReaderExDirectry
(
filepath
,
script_name
,
slen
)
;
if
(
buffer
)
return
buffer
;
}
...
...
@@ -1701,7 +1701,8 @@ byte* TagDuel::::ScriptReaderEx(const char* script_name, int* slen) {
return
default_script_reader
(
script_name
,
slen
);
}
byte
*
TagDuel
::
ScriptReaderExDirectry
(
const
char
*
path
,
const
char
*
script_name
,
int
*
slen
)
{
char
sname
[
256
]
=
path
;
char
sname
[
256
];
strcpy
(
sname
,
path
);
strcat
(
sname
,
script_name
+
1
);
//default script name: ./script/c%d.lua
return
default_script_reader
(
sname
,
slen
);
}
...
...
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