Moderator: OpenTTD Developers
It can be found in the menu where the normal and giant screenshot are also located, or invoked through the console with the command "screenshot smallmap [optional filename]".
This will produce a screenshot that looks like this:
The latest version of the patch can be found here: [todo] (r18747)
I'm currently trying to make a patch that introduces a new screenshot type that just creates a screenshot of the smallmap.
However, the graphics stuff is for me a pretty confusing mess right now. Documentation is scarce and I can only guess what some functions exactly do / parameters are exactly for.
Did someone already make such a patch previously that I'm not aware of?
Or, is there someone experienced with the graphics internals of OpenTTD that can and wants to help me out?
Currently, I have a compiling (but not working) WIP patch that's supposed to
* on "giant screenshot" click, call the new function for the smallmap screenshot (just for testing)
* create a new SmallMapWindow
* call its "DrawSmallMap" function that is supposed to draw the map onto the buffer that is written to file later
Unfortunately something seems to be way off, I'm getting an error in Memset, and I don't really know what went wrong where So if anyone wants to jump in and enlighten me, I'd be grateful
The patch (against 0.7.2):
EDIT: removed unfinished version. See below for working version of this patch
A bit of background info, I'm trying to do this so I can run another AI tournament without spending so much time on fitting together multiple pieces of the smallmap to one map...
For now I did manage to make a screenshot of a part of the smallmap, let's see if I can resolve the remaining issues soon
As soon as it's usable, I'm going to make it available for all to use...
However I regard this patch more as a "hack" than a proper patch - first of all there are some GUI questions I don't know how to address. e.g. the user should be able to select what kind of smallmap mode he wants to have a screenshot of. Right now I'm gonna hardcode it to the one I want.
Also where to put the new screenshot option? Where the current ones are? Or as a button in the smallmap window? Both? Neither? I dunno...
For now I've added it to the dropdown where the other screenshot options already are, and added a keyboard shortcut similar to the others: Ctrl+M. I've also added a flag 'smallmap' to the existing console command 'screenshot'.
Here's the patch (against 0.7.2). A good point about it is that it doesn't change anything about the game state or the save format, so it should be completely multiplayer / save compatible with vanilla 0.7.2.
EDIT: I've made a v2 with a small bug fixed. As nobody has downloaded v1 yet I'll just put it here instead. known "issues":
* Using it opens a smallmap window or brings it to front if already opened.
Fix: Smallmap was not positioned correctly on non-quadratic map.
Have fun anyone who can use it.
Here's an example screenshot (of a 128x128 map with some AIs) Another example screenshot that's trivial to make with my patch, but not so trivial without: a smallmap of a 2048x2048 map
- smallmap screenshot for r18747
- (8.13 KiB) Downloaded 125 times
- This uses an extra button in the smallmap window, instead of a console command
- This uses the current zoom level and display mode of the smallmap window
An SVN diff is attached
- (8.89 KiB) Downloaded 47 times
Users browsing this forum: No registered users and 2 guests