Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
RingRacers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lactozilla
RingRacers
Commits
792d42eb
Commit
792d42eb
authored
6 years ago
by
SteelT
Browse files
Options
Downloads
Patches
Plain Diff
Save current renderer to screenshots
parent
d3271c57
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/m_misc.c
+21
-6
21 additions, 6 deletions
src/m_misc.c
with
21 additions
and
6 deletions
src/m_misc.c
+
21
−
6
View file @
792d42eb
...
...
@@ -58,7 +58,7 @@ typedef off_t off64_t;
#if defined(__MINGW32__) && ((__GNUC__ > 7) || (__GNUC__ == 6 && __GNUC_MINOR__ >= 3))
#define PRIdS "u"
#elif defined (_WIN32)
#elif defined (_WIN32)
#define PRIdS "Iu"
#elif defined (_PSP) || defined (_arch_dreamcast) || defined (DJGPP) || defined (_WII) || defined (_NDS) || defined (_PS3)
#define PRIdS "u"
...
...
@@ -646,11 +646,11 @@ static void M_PNGhdr(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png_
static
void
M_PNGText
(
png_structp
png_ptr
,
png_infop
png_info_ptr
,
PNG_CONST
png_byte
movie
)
{
#ifdef PNG_TEXT_SUPPORTED
#define SRB2PNGTXT 1
0
//PNG_KEYWORD_MAX_LENGTH(79) is the max
#define SRB2PNGTXT 1
1
//PNG_KEYWORD_MAX_LENGTH(79) is the max
png_text
png_infotext
[
SRB2PNGTXT
];
char
keytxt
[
SRB2PNGTXT
][
12
]
=
{
"Title"
,
"Description"
,
"Playername"
,
"Mapnum"
,
"Mapname"
,
"Location"
,
"Interface"
,
"Revision"
,
"Build Date"
,
"Build Time"
};
"Location"
,
"Interface"
,
"Render Mode"
,
"Revision"
,
"Build Date"
,
"Build Time"
};
char
titletxt
[]
=
"Sonic Robo Blast 2 "
VERSIONSTRING
;
png_charp
playertxt
=
cv_playername
.
zstring
;
char
desctxt
[]
=
"SRB2 Screenshot"
;
...
...
@@ -666,6 +666,7 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
#else
"Unknown"
;
#endif
char
rendermodetxt
[
9
];
char
maptext
[
8
];
char
lvlttltext
[
48
];
char
locationtxt
[
40
];
...
...
@@ -673,6 +674,19 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
char
ctdate
[
40
];
char
cttime
[
40
];
switch
(
rendermode
)
{
case
render_soft
:
strcpy
(
rendermodetxt
,
"Software"
);
break
;
case
render_opengl
:
strcpy
(
rendermodetxt
,
"OpenGL"
);
break
;
default:
// Just in case
strcpy
(
rendermodetxt
,
"None"
);
break
;
}
if
(
gamestate
==
GS_LEVEL
)
snprintf
(
maptext
,
8
,
"%s"
,
G_BuildMapName
(
gamemap
));
else
...
...
@@ -710,9 +724,10 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
png_infotext
[
4
].
text
=
lvlttltext
;
png_infotext
[
5
].
text
=
locationtxt
;
png_infotext
[
6
].
text
=
interfacetxt
;
png_infotext
[
7
].
text
=
strncpy
(
ctrevision
,
comprevision
,
sizeof
(
ctrevision
)
-
1
);
png_infotext
[
8
].
text
=
strncpy
(
ctdate
,
compdate
,
sizeof
(
ctdate
)
-
1
);
png_infotext
[
9
].
text
=
strncpy
(
cttime
,
comptime
,
sizeof
(
cttime
)
-
1
);
png_infotext
[
7
].
text
=
rendermodetxt
;
png_infotext
[
8
].
text
=
strncpy
(
ctrevision
,
comprevision
,
sizeof
(
ctrevision
)
-
1
);
png_infotext
[
9
].
text
=
strncpy
(
ctdate
,
compdate
,
sizeof
(
ctdate
)
-
1
);
png_infotext
[
10
].
text
=
strncpy
(
cttime
,
comptime
,
sizeof
(
cttime
)
-
1
);
png_set_text
(
png_ptr
,
png_info_ptr
,
png_infotext
,
SRB2PNGTXT
);
#undef SRB2PNGTXT
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment