Skip to content
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: add 'screenshot res <x> <y> [<filename>]' console command #8598

Closed
wants to merge 1 commit into from

Conversation

Eddi-z
Copy link
Contributor

@Eddi-z Eddi-z commented Jan 22, 2021

Motivation / Problem

For title save contests, a way to automatically make screenshots of different resolutions independent from the screen resolution is needed

Description

this PR adds a mode to the existing screenshot command to supply custom resolutions, and makes a screenshot with the default zoom level

usage: screenshot res <x> <y> [<filename>]

if either <x> or <y> are 0, it falls back to the "default zoom screenshot" of the current viewport

Limitations

there is no range check on the resolutions, so giving ridiculously high numbers might go OOM

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

src/console_cmds.cpp Outdated Show resolved Hide resolved
@perezdidac
Copy link
Contributor

Nice feature!
I wonder if rather than 'resolution' you want to call it 'dimensions' instead given that the resulting image will have the dimensions provided, in pixels, size?

@Eddi-z
Copy link
Contributor Author

Eddi-z commented Jan 27, 2021

i'm not quite sure why... "resolution" is a common term in this context

@TrueBrain
Copy link
Member

Superseded by #8804.

@TrueBrain TrueBrain closed this Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants