New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: allow custom width/height of screenshot via console #8804
Conversation
a8ea409
to
db534ea
Compare
db534ea
to
b670f1c
Compare
Reworked how the screenshot command works while keeping it backwards compatible. It can now more freely understand arguments, and has the ability to make SC_DEFAULTZOOM screenshots.
b670f1c
to
4cf08fc
Compare
IConsolePrintF(CC_ERROR, "'select all' is no longer supported since 1.11"); | ||
IConsoleError("'select all' is no longer supported since 1.11"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit should probably go in its own separate PR (that mentions that it fixes #8798).
What does the "viewport" mode of the screenshot command do on a dedicated server? |
Surprisingly uneventful. If you try it without manually selecting a blitter, you just get an error. So yeah ... not really exciting, sorry :P What is more exciting, is what happens if you make a lot of screenshots .. you get a gif like this: Dedicated servers don't run certain graphical routines :P |
Haha, that's why you apply some patches for the title game contest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
screenshot
command looks cleaner that way.
Used #8598 for inspiration and this PR is meant as alternative to that PR.
Fixes #8798
Yes, I sneaked that in this PR, I am sorry .. I could make a new PR out of it if you like.
Motivation / Problem
For the titlegame competition I was looking for a good way to make screenshots of different resolutions in a single run in an automated way. #8598 allows this, but I noticed we could do better. It started out as renaming
res_x
towidth
, adding docstrings, and more of these things, but I soon figured out the console parsing code was just a bit too stiff for me. For example, you could only set the size of the screenshot for normal zoom, not for big zoom, without there really being a reason not to allow that.So I rewrote how screenshot command is parsed, and made it into a token-system. You can now mix and match different modes. Also, rewrote most of the implementation to be a bit more robust and future-proof, in my opinion of course.
Description
BONUS you can now also make heightmap screenshots!
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.