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
a818f5d5
Commit
a818f5d5
authored
Dec 26, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
possibly the stderr video
parent
d0f5852d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
gframe/game.cpp
gframe/game.cpp
+20
-4
gframe/game.h
gframe/game.h
+1
-1
No files found.
gframe/game.cpp
View file @
a818f5d5
...
...
@@ -23,6 +23,7 @@ bool Game::Initialize() {
initUtils
();
LoadConfig
();
irr
::
SIrrlichtCreationParameters
params
=
irr
::
SIrrlichtCreationParameters
();
params
.
LoggingLevel
=
ELL_NONE
;
params
.
AntiAlias
=
gameConf
.
antialias
;
if
(
gameConf
.
use_d3d
)
params
.
DriverType
=
irr
::
video
::
EDT_DIRECT3D9
;
...
...
@@ -2206,11 +2207,26 @@ void Game::takeScreenshot() {
}
void
Game
::
takeScreenshotLoop
()
{
irr
::
video
::
IImage
*
const
image
=
driver
->
createScreenShot
();
const
unsigned
int
currentSequence
=
++
screenshotSequence
;
//const
int currentSequence = ++screenshotSequence;
if
(
image
)
{
irr
::
c8
filename
[
64
];
snprintf
(
filename
,
64
,
"%s/%u.bmp"
,
screenshotDirectory
,
currentSequence
);
driver
->
writeImageToFile
(
image
,
filename
);
//irr::video::ECOLOR_FORMAT colorFormat = image->getColorFormat();
//u32 pixel_size = image->getBytesPerPixel();
//u32 width = image->getDimension().Width;
//u32 height = image->getDimension().Height;
auto
data
=
image
->
lock
();
auto
size
=
image
->
getImageDataSizeInBytes
();
fwrite
(
data
,
size
,
1
,
stderr
);
fflush
(
stderr
);
image
->
unlock
();
//irr::c8 filename[64];
//snprintf(filename, 64, "%s/%04d.bmp", screenshotDirectory, currentSequence);
//driver->writeImageToFile(image, filename);
image
->
drop
();
}
else
device
->
getLogger
()
->
log
(
L"Failed to take loop screenshot."
,
irr
::
ELL_WARNING
);
...
...
gframe/game.h
View file @
a818f5d5
...
...
@@ -260,7 +260,7 @@ public:
bool
always_chain
;
bool
ignore_chain
;
bool
chain_when_avail
;
unsigned
int
screenshotSequence
;
int
screenshotSequence
;
char
screenshotDirectory
[
64
];
bool
is_building
;
...
...
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