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
8a354fb5
Commit
8a354fb5
authored
Oct 27, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch-auto-save-replay' into test
parents
48c4c493
a5ab7da1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
11 deletions
+43
-11
gframe/duelclient.cpp
gframe/duelclient.cpp
+16
-5
gframe/game.cpp
gframe/game.cpp
+8
-1
gframe/game.h
gframe/game.h
+2
-0
gframe/single_mode.cpp
gframe/single_mode.cpp
+15
-5
strings.conf
strings.conf
+2
-0
No files found.
gframe/duelclient.cpp
View file @
8a354fb5
...
@@ -690,11 +690,22 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -690,11 +690,22 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
wchar_t
timetext
[
80
];
wchar_t
timetext
[
80
];
mbstowcs
(
timetext
,
timebuf
,
size
);
mbstowcs
(
timetext
,
timebuf
,
size
);
mainGame
->
ebRSName
->
setText
(
timetext
);
mainGame
->
ebRSName
->
setText
(
timetext
);
mainGame->wReplaySave->setText(dataManager.GetSysString(1340));
if
(
!
mainGame
->
chkAutoSaveReplay
->
isChecked
())
{
mainGame->PopupElement(mainGame->wReplaySave);
mainGame
->
wReplaySave
->
setText
(
dataManager
.
GetSysString
(
1340
));
mainGame->gMutex.Unlock();
mainGame
->
PopupElement
(
mainGame
->
wReplaySave
);
mainGame->replaySignal.Reset();
mainGame
->
gMutex
.
Unlock
();
mainGame->replaySignal.Wait();
mainGame
->
replaySignal
.
Reset
();
mainGame
->
replaySignal
.
Wait
();
}
else
{
mainGame
->
actionParam
=
1
;
wchar_t
msgbuf
[
256
];
myswprintf
(
msgbuf
,
dataManager
.
GetSysString
(
1367
),
timetext
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
textFont
,
msgbuf
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
30
);
}
if
(
mainGame
->
actionParam
||
!
is_host
)
{
if
(
mainGame
->
actionParam
||
!
is_host
)
{
char
*
prep
=
pdata
;
char
*
prep
=
pdata
;
Replay
new_replay
;
Replay
new_replay
;
...
...
gframe/game.cpp
View file @
8a354fb5
...
@@ -304,7 +304,10 @@ bool Game::Initialize() {
...
@@ -304,7 +304,10 @@ bool Game::Initialize() {
posY
+=
30
;
posY
+=
30
;
chkQuickAnimation
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
CHECKBOX_QUICK_ANIMATION
,
dataManager
.
GetSysString
(
1299
));
chkQuickAnimation
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
CHECKBOX_QUICK_ANIMATION
,
dataManager
.
GetSysString
(
1299
));
chkQuickAnimation
->
setChecked
(
gameConf
.
quick_animation
!=
0
);
chkQuickAnimation
->
setChecked
(
gameConf
.
quick_animation
!=
0
);
elmTabHelperLast
=
chkQuickAnimation
;
posY
+=
30
;
chkAutoSaveReplay
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
-
1
,
dataManager
.
GetSysString
(
1366
));
chkAutoSaveReplay
->
setChecked
(
gameConf
.
auto_save_replay
!=
0
);
elmTabHelperLast
=
chkAutoSaveReplay
;
//system
//system
irr
::
gui
::
IGUITab
*
_tabSystem
=
wInfos
->
addTab
(
dataManager
.
GetSysString
(
1273
));
irr
::
gui
::
IGUITab
*
_tabSystem
=
wInfos
->
addTab
(
dataManager
.
GetSysString
(
1273
));
_tabSystem
->
setRelativePosition
(
recti
(
16
,
49
,
299
,
362
));
_tabSystem
->
setRelativePosition
(
recti
(
16
,
49
,
299
,
362
));
...
@@ -1136,6 +1139,7 @@ void Game::LoadConfig() {
...
@@ -1136,6 +1139,7 @@ void Game::LoadConfig() {
gameConf
.
defaultOT
=
1
;
gameConf
.
defaultOT
=
1
;
gameConf
.
enable_bot_mode
=
0
;
gameConf
.
enable_bot_mode
=
0
;
gameConf
.
quick_animation
=
0
;
gameConf
.
quick_animation
=
0
;
gameConf
.
auto_save_replay
=
0
;
gameConf
.
enable_sound
=
true
;
gameConf
.
enable_sound
=
true
;
gameConf
.
sound_volume
=
0.5
;
gameConf
.
sound_volume
=
0.5
;
gameConf
.
enable_music
=
true
;
gameConf
.
enable_music
=
true
;
...
@@ -1211,6 +1215,8 @@ void Game::LoadConfig() {
...
@@ -1211,6 +1215,8 @@ void Game::LoadConfig() {
gameConf
.
enable_bot_mode
=
atoi
(
valbuf
);
gameConf
.
enable_bot_mode
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"quick_animation"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"quick_animation"
))
{
gameConf
.
quick_animation
=
atoi
(
valbuf
);
gameConf
.
quick_animation
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"auto_save_replay"
))
{
gameConf
.
auto_save_replay
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"window_maximized"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"window_maximized"
))
{
gameConf
.
window_maximized
=
atoi
(
valbuf
)
>
0
;
gameConf
.
window_maximized
=
atoi
(
valbuf
)
>
0
;
}
else
if
(
!
strcmp
(
strbuf
,
"window_width"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"window_width"
))
{
...
@@ -1294,6 +1300,7 @@ void Game::SaveConfig() {
...
@@ -1294,6 +1300,7 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"default_ot = %d
\n
"
,
gameConf
.
defaultOT
);
fprintf
(
fp
,
"default_ot = %d
\n
"
,
gameConf
.
defaultOT
);
fprintf
(
fp
,
"enable_bot_mode = %d
\n
"
,
gameConf
.
enable_bot_mode
);
fprintf
(
fp
,
"enable_bot_mode = %d
\n
"
,
gameConf
.
enable_bot_mode
);
fprintf
(
fp
,
"quick_animation = %d
\n
"
,
gameConf
.
quick_animation
);
fprintf
(
fp
,
"quick_animation = %d
\n
"
,
gameConf
.
quick_animation
);
fprintf
(
fp
,
"auto_save_replay = %d
\n
"
,
(
chkAutoSaveReplay
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"window_maximized = %d
\n
"
,
(
gameConf
.
window_maximized
?
1
:
0
));
fprintf
(
fp
,
"window_maximized = %d
\n
"
,
(
gameConf
.
window_maximized
?
1
:
0
));
fprintf
(
fp
,
"window_width = %d
\n
"
,
gameConf
.
window_width
);
fprintf
(
fp
,
"window_width = %d
\n
"
,
gameConf
.
window_width
);
fprintf
(
fp
,
"window_height = %d
\n
"
,
gameConf
.
window_height
);
fprintf
(
fp
,
"window_height = %d
\n
"
,
gameConf
.
window_height
);
...
...
gframe/game.h
View file @
8a354fb5
...
@@ -44,6 +44,7 @@ struct Config {
...
@@ -44,6 +44,7 @@ struct Config {
int
defaultOT
;
int
defaultOT
;
int
enable_bot_mode
;
int
enable_bot_mode
;
int
quick_animation
;
int
quick_animation
;
int
auto_save_replay
;
bool
enable_sound
;
bool
enable_sound
;
bool
enable_music
;
bool
enable_music
;
double
sound_volume
;
double
sound_volume
;
...
@@ -272,6 +273,7 @@ public:
...
@@ -272,6 +273,7 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkAutoChain
;
irr
::
gui
::
IGUICheckBox
*
chkAutoChain
;
irr
::
gui
::
IGUICheckBox
*
chkWaitChain
;
irr
::
gui
::
IGUICheckBox
*
chkWaitChain
;
irr
::
gui
::
IGUICheckBox
*
chkQuickAnimation
;
irr
::
gui
::
IGUICheckBox
*
chkQuickAnimation
;
irr
::
gui
::
IGUICheckBox
*
chkAutoSaveReplay
;
irr
::
gui
::
IGUIWindow
*
tabSystem
;
irr
::
gui
::
IGUIWindow
*
tabSystem
;
irr
::
gui
::
IGUIElement
*
elmTabSystemLast
;
irr
::
gui
::
IGUIElement
*
elmTabSystemLast
;
irr
::
gui
::
IGUIScrollBar
*
scrTabSystem
;
irr
::
gui
::
IGUIScrollBar
*
scrTabSystem
;
...
...
gframe/single_mode.cpp
View file @
8a354fb5
...
@@ -135,11 +135,21 @@ int SingleMode::SinglePlayThread(void* param) {
...
@@ -135,11 +135,21 @@ int SingleMode::SinglePlayThread(void* param) {
wchar_t
timetext
[
80
];
wchar_t
timetext
[
80
];
mbstowcs
(
timetext
,
timebuf
,
size
);
mbstowcs
(
timetext
,
timebuf
,
size
);
mainGame
->
ebRSName
->
setText
(
timetext
);
mainGame
->
ebRSName
->
setText
(
timetext
);
mainGame
->
wReplaySave
->
setText
(
dataManager
.
GetSysString
(
1340
));
if
(
!
mainGame
->
chkAutoSaveReplay
->
isChecked
())
{
mainGame
->
PopupElement
(
mainGame
->
wReplaySave
);
mainGame
->
wReplaySave
->
setText
(
dataManager
.
GetSysString
(
1340
));
mainGame
->
gMutex
.
Unlock
();
mainGame
->
PopupElement
(
mainGame
->
wReplaySave
);
mainGame
->
replaySignal
.
Reset
();
mainGame
->
gMutex
.
Unlock
();
mainGame
->
replaySignal
.
Wait
();
mainGame
->
replaySignal
.
Reset
();
mainGame
->
replaySignal
.
Wait
();
}
else
{
mainGame
->
actionParam
=
1
;
wchar_t
msgbuf
[
256
];
myswprintf
(
msgbuf
,
dataManager
.
GetSysString
(
1367
),
timetext
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
textFont
,
msgbuf
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
30
);
}
if
(
mainGame
->
actionParam
)
if
(
mainGame
->
actionParam
)
last_replay
.
SaveReplay
(
mainGame
->
ebRSName
->
getText
());
last_replay
.
SaveReplay
(
mainGame
->
ebRSName
->
getText
());
end_duel
(
pduel
);
end_duel
(
pduel
);
...
...
strings.conf
View file @
8a354fb5
...
@@ -392,6 +392,8 @@
...
@@ -392,6 +392,8 @@
!
system
1363
是否删除这个录像?
!
system
1363
是否删除这个录像?
!
system
1364
重命名录像
!
system
1364
重命名录像
!
system
1365
重命名失败,可能存在同名文件
!
system
1365
重命名失败,可能存在同名文件
!
system
1366
自动保存录像
!
system
1367
录像已自动保存为%
ls
.
yrp
!
system
1370
星数↑
!
system
1370
星数↑
!
system
1371
攻击↑
!
system
1371
攻击↑
!
system
1372
守备↑
!
system
1372
守备↑
...
...
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