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
6e212103
Commit
6e212103
authored
Oct 02, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'server' of ../../ygopro into fh-special
parents
6a5321b8
09ed78db
Pipeline
#6014
passed with stages
in 4 minutes and 55 seconds
Changes
9
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
15 deletions
+26
-15
cards.cdb
cards.cdb
+0
-0
gframe/config.h
gframe/config.h
+0
-1
gframe/duelclient.h
gframe/duelclient.h
+2
-2
gframe/game.cpp
gframe/game.cpp
+1
-1
gframe/gframe.cpp
gframe/gframe.cpp
+7
-5
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+13
-3
gframe/replay.cpp
gframe/replay.cpp
+1
-1
ocgcore
ocgcore
+1
-1
script
script
+1
-1
No files found.
cards.cdb
View file @
6e212103
No preview for this file type
gframe/config.h
View file @
6e212103
...
...
@@ -97,7 +97,6 @@ extern bool exit_on_return;
extern
bool
auto_watch_mode
;
extern
bool
open_file
;
extern
wchar_t
open_file_name
[
256
];
extern
wchar_t
open_file_name_with_category
[
256
];
extern
bool
bot_mode
;
#endif
gframe/duelclient.h
View file @
6e212103
...
...
@@ -71,7 +71,7 @@ public:
BufferIO
::
WriteInt8
(
p
,
proto
);
memcpy
(
p
,
&
st
,
sizeof
(
ST
));
#ifdef YGOPRO_MESSAGE_DEBUG
printf
(
"CTOS: %d Length: %d
\n
"
,
proto
,
sizeof
(
ST
));
printf
(
"CTOS: %d Length: %
l
d
\n
"
,
proto
,
sizeof
(
ST
));
#endif
bufferevent_write
(
client_bev
,
duel_client_write
,
sizeof
(
ST
)
+
3
);
}
...
...
@@ -81,7 +81,7 @@ public:
BufferIO
::
WriteInt8
(
p
,
proto
);
memcpy
(
p
,
buffer
,
len
);
#ifdef YGOPRO_MESSAGE_DEBUG
printf
(
"CTOS: %d Length: %d
\n
"
,
proto
,
len
);
printf
(
"CTOS: %d Length: %
l
d
\n
"
,
proto
,
len
);
#endif
bufferevent_write
(
client_bev
,
duel_client_write
,
len
+
3
);
}
...
...
gframe/game.cpp
View file @
6e212103
...
...
@@ -208,7 +208,7 @@ bool Game::Initialize() {
SetWindowsIcon
();
//main menu
wchar_t
strbuf
[
256
];
myswprintf
(
strbuf
,
L"KoishiPro %X.0%X.%X H
imehina
"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
myswprintf
(
strbuf
,
L"KoishiPro %X.0%X.%X H
oshirin
"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
wMainMenu
=
env
->
addWindow
(
rect
<
s32
>
(
370
,
200
,
650
,
415
),
false
,
strbuf
);
wMainMenu
->
getCloseButton
()
->
setVisible
(
false
);
btnLanMode
=
env
->
addButton
(
rect
<
s32
>
(
10
,
30
,
270
,
60
),
wMainMenu
,
BUTTON_LAN_MODE
,
dataManager
.
GetSysString
(
1200
));
...
...
gframe/gframe.cpp
View file @
6e212103
...
...
@@ -13,7 +13,6 @@ bool exit_on_return = false;
bool
auto_watch_mode
=
false
;
bool
open_file
=
false
;
wchar_t
open_file_name
[
256
]
=
L""
;
wchar_t
open_file_name_with_category
[
256
]
=
L""
;
bool
bot_mode
=
false
;
void
ClickButton
(
irr
::
gui
::
IGUIElement
*
btn
)
{
...
...
@@ -199,11 +198,14 @@ int main(int argc, char* argv[]) {
exit_on_return
=
!
keep_on_return
;
if
(
i
<
wargc
)
{
open_file
=
true
;
wcscpy
(
open_file_name
,
wargv
[
i
]);
if
(
deckCategorySpecified
&&
wcslen
(
ygo
::
mainGame
->
gameConf
.
lastcategory
))
{
swprintf
(
open_file_name_with_category
,
256
,
L"%ls/%ls"
,
ygo
::
mainGame
->
gameConf
.
lastcategory
,
open_file_name
);
if
(
deckCategorySpecified
)
{
#ifdef WIN32
myswprintf
(
open_file_name
,
L"%ls
\\
%ls"
,
ygo
::
mainGame
->
gameConf
.
lastcategory
,
wargv
[
i
]);
#else
myswprintf
(
open_file_name
,
L"%ls/%ls"
,
ygo
::
mainGame
->
gameConf
.
lastcategory
,
wargv
[
i
]);
#endif
}
else
{
wcscpy
(
open_file_name
_with_category
,
open_file_name
);
wcscpy
(
open_file_name
,
wargv
[
i
]
);
}
}
ClickButton
(
ygo
::
mainGame
->
btnDeckEdit
);
...
...
gframe/menu_handler.cpp
View file @
6e212103
...
...
@@ -403,14 +403,14 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
}
case
BUTTON_DECK_EDIT
:
{
mainGame
->
RefreshCategoryDeck
(
mainGame
->
cbDBCategory
,
mainGame
->
cbDBDecks
);
if
(
open_file
&&
deckManager
.
LoadDeck
(
open_file_name
_with_category
))
{
if
(
open_file
&&
deckManager
.
LoadDeck
(
open_file_name
))
{
#ifdef WIN32
wchar_t
*
dash
=
wcsrchr
(
open_file_name
,
L'\\'
);
#else
wchar_t
*
dash
=
wcsrchr
(
open_file_name
,
L'/'
);
#endif
wchar_t
*
dot
=
wcsrchr
(
open_file_name
,
L'.'
);
if
(
dash
&&
dot
)
{
if
(
dash
&&
dot
&&
!
mywcsncasecmp
(
dot
,
L".ydk"
,
4
))
{
// full path
wchar_t
deck_name
[
256
];
wcsncpy
(
deck_name
,
dash
+
1
,
dot
-
dash
-
1
);
deck_name
[
dot
-
dash
-
1
]
=
L'\0'
;
...
...
@@ -420,7 +420,17 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
btnManageDeck
->
setEnabled
(
false
);
mainGame
->
cbDBCategory
->
setEnabled
(
false
);
mainGame
->
cbDBDecks
->
setEnabled
(
false
);
}
else
{
}
else
if
(
dash
)
{
// has category
wchar_t
deck_name
[
256
];
wcsncpy
(
deck_name
,
dash
+
1
,
256
);
for
(
size_t
i
=
0
;
i
<
mainGame
->
cbDBDecks
->
getItemCount
();
++
i
)
{
if
(
!
wcscmp
(
mainGame
->
cbDBDecks
->
getItem
(
i
),
deck_name
))
{
wcscpy
(
mainGame
->
gameConf
.
lastdeck
,
deck_name
);
mainGame
->
cbDBDecks
->
setSelected
(
i
);
break
;
}
}
}
else
{
// only deck name
for
(
size_t
i
=
0
;
i
<
mainGame
->
cbDBDecks
->
getItemCount
();
++
i
)
{
if
(
!
wcscmp
(
mainGame
->
cbDBDecks
->
getItem
(
i
),
open_file_name
))
{
wcscpy
(
mainGame
->
gameConf
.
lastdeck
,
open_file_name
);
...
...
gframe/replay.cpp
View file @
6e212103
...
...
@@ -282,7 +282,7 @@ bool Replay::CheckReplay(const wchar_t* name) {
ReplayHeader
rheader
;
size_t
count
=
fread
(
&
rheader
,
sizeof
(
ReplayHeader
),
1
,
rfp
);
fclose
(
rfp
);
return
count
==
1
&&
rheader
.
id
==
0x31707279
&&
rheader
.
version
>=
0x12d0u
;
return
count
==
1
&&
rheader
.
id
==
0x31707279
&&
rheader
.
version
>=
0x12d0u
&&
(
rheader
.
version
<
0x1353u
||
(
rheader
.
flag
&
REPLAY_UNIFORM
))
;
}
bool
Replay
::
DeleteReplay
(
const
wchar_t
*
name
)
{
wchar_t
fname
[
256
];
...
...
ocgcore
@
17ad8099
Subproject commit
8529b2a85334d3b27611b1b7113e062f22ebb30f
Subproject commit
17ad8099eb8821050bea00af3fd74eb0fd90cc39
script
@
01c0e6c7
Subproject commit
971a83e5335253d82f1dcf38e1792f22041ed311
Subproject commit
01c0e6c7881523752ca17e3dd16911dbe65877ec
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