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
d0f5852d
Commit
d0f5852d
authored
Dec 26, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first one - record to file
parent
7af7ae23
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
gframe/game.cpp
gframe/game.cpp
+15
-0
gframe/game.h
gframe/game.h
+3
-0
No files found.
gframe/game.cpp
View file @
d0f5852d
...
@@ -882,6 +882,9 @@ bool Game::Initialize() {
...
@@ -882,6 +882,9 @@ bool Game::Initialize() {
}
}
hideChat
=
false
;
hideChat
=
false
;
hideChatTimer
=
0
;
hideChatTimer
=
0
;
screenshotSequence
=
0
;
sprintf
(
screenshotDirectory
,
"screenshots/ygopro_%u"
,
device
->
getTimer
()
->
getRealTime
());
FileSystem
::
MakeDir
(
screenshotDirectory
);
return
true
;
return
true
;
}
}
void
Game
::
MainLoop
()
{
void
Game
::
MainLoop
()
{
...
@@ -980,6 +983,7 @@ void Game::MainLoop() {
...
@@ -980,6 +983,7 @@ void Game::MainLoop() {
DuelClient
::
try_needed
=
false
;
DuelClient
::
try_needed
=
false
;
DuelClient
::
StartClient
(
DuelClient
::
temp_ip
,
DuelClient
::
temp_port
,
false
);
DuelClient
::
StartClient
(
DuelClient
::
temp_ip
,
DuelClient
::
temp_port
,
false
);
}
}
takeScreenshotLoop
();
}
}
DuelClient
::
StopClient
(
true
);
DuelClient
::
StopClient
(
true
);
if
(
dInfo
.
isSingleMode
)
if
(
dInfo
.
isSingleMode
)
...
@@ -2200,6 +2204,17 @@ void Game::takeScreenshot() {
...
@@ -2200,6 +2204,17 @@ void Game::takeScreenshot() {
}
else
}
else
device
->
getLogger
()
->
log
(
L"Failed to take screenshot."
,
irr
::
ELL_WARNING
);
device
->
getLogger
()
->
log
(
L"Failed to take screenshot."
,
irr
::
ELL_WARNING
);
}
}
void
Game
::
takeScreenshotLoop
()
{
irr
::
video
::
IImage
*
const
image
=
driver
->
createScreenShot
();
const
unsigned
int
currentSequence
=
++
screenshotSequence
;
if
(
image
)
{
irr
::
c8
filename
[
64
];
snprintf
(
filename
,
64
,
"%s/%u.bmp"
,
screenshotDirectory
,
currentSequence
);
driver
->
writeImageToFile
(
image
,
filename
);
image
->
drop
();
}
else
device
->
getLogger
()
->
log
(
L"Failed to take loop screenshot."
,
irr
::
ELL_WARNING
);
}
bool
Game
::
CheckRegEx
(
const
std
::
wstring
&
text
,
const
std
::
wstring
&
exp
,
bool
exact
)
{
bool
Game
::
CheckRegEx
(
const
std
::
wstring
&
text
,
const
std
::
wstring
&
exp
,
bool
exact
)
{
if
(
!
gameConf
.
search_regex
)
if
(
!
gameConf
.
search_regex
)
return
false
;
return
false
;
...
...
gframe/game.h
View file @
d0f5852d
...
@@ -214,6 +214,7 @@ public:
...
@@ -214,6 +214,7 @@ public:
void
SetWindowsScale
(
float
scale
);
void
SetWindowsScale
(
float
scale
);
void
FlashWindow
();
void
FlashWindow
();
void
takeScreenshot
();
void
takeScreenshot
();
void
takeScreenshotLoop
();
void
SetCursor
(
ECURSOR_ICON
icon
);
void
SetCursor
(
ECURSOR_ICON
icon
);
std
::
mutex
gMutex
;
std
::
mutex
gMutex
;
...
@@ -259,6 +260,8 @@ public:
...
@@ -259,6 +260,8 @@ public:
bool
always_chain
;
bool
always_chain
;
bool
ignore_chain
;
bool
ignore_chain
;
bool
chain_when_avail
;
bool
chain_when_avail
;
unsigned
int
screenshotSequence
;
char
screenshotDirectory
[
64
];
bool
is_building
;
bool
is_building
;
bool
is_siding
;
bool
is_siding
;
...
...
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