Patch: zoom window
Moderator: OpenTTD Developers
Patch: zoom window
Hello,
its my first patch so forbear with me please.
What it does:
-Opens a zoom window by pessing ctrl + d
I think it has some glitches esp. with overlapping windows. Hopefully someone can
help to sort out. I think i need to know how Z-order is changed and how the update
regions are determined. Thank you. Have fun.
Edit: works not for the animated blitter atm. fixed
its my first patch so forbear with me please.
What it does:
-Opens a zoom window by pessing ctrl + d
I think it has some glitches esp. with overlapping windows. Hopefully someone can
help to sort out. I think i need to know how Z-order is changed and how the update
regions are determined. Thank you. Have fun.
Edit: works not for the animated blitter atm. fixed
Last edited by connan on 05 Jun 2008 12:31, edited 2 times in total.
Re: Patch: zoom window
Nice patch, I missed the double size feature since somebody decided that working on Windows only was racist 
Maybe I'll use it...

Maybe I'll use it...
Re: Patch: zoom window
Thank you! For me the reason was that i like to play in the higher resolutions but then its often hard to see the details exactly (semaphores, slopes etc.).
Btw. it would be nice to let the zoom window stay on the highest 'real' zoom level but that would need a possibility to render a viewport to a virtual window (somewhat like a memory DC, for the MFC- guys). Can someone help with that?
Regards,
connan.
Btw. it would be nice to let the zoom window stay on the highest 'real' zoom level but that would need a possibility to render a viewport to a virtual window (somewhat like a memory DC, for the MFC- guys). Can someone help with that?
Regards,
connan.
Re: Patch: zoom window
It would be cool if you can introduce zoom-in on a general scope.
When creating the zoom-levels for the blitters as they are now in OpenTTD, I at first also planned a zoom-in mode (2x and 4x). Sadly enough, this completely failed because of how the internals of OpenTTD work. They can't handle the fact that 1 pixel becomes 2 pixels (or in fact, 2x2). I could fix most things (and most things for it are in trunk in fact), but several remained, of which the most noticeable one: when moving a window over a viewport at 2x or 4x zoom-in, it leaves a single pixel-line of graphical glitches. This turned out to be almost impossible to fix.
It has to be said that this was several months, almost a year ago. So who knows what changed. Just my 2 penny to let you know that ZoomByLevel does support most of it, and that it in fact is just a matter of adding the zoom-level... and fixing the nasty graphical glitches
I tried to find my old patch which basically introduced zoom-in-levels, but I guess I removed it long ago
Either way, good luck
I hope you can get it to work correctly, as it would be really useful for many people!
When creating the zoom-levels for the blitters as they are now in OpenTTD, I at first also planned a zoom-in mode (2x and 4x). Sadly enough, this completely failed because of how the internals of OpenTTD work. They can't handle the fact that 1 pixel becomes 2 pixels (or in fact, 2x2). I could fix most things (and most things for it are in trunk in fact), but several remained, of which the most noticeable one: when moving a window over a viewport at 2x or 4x zoom-in, it leaves a single pixel-line of graphical glitches. This turned out to be almost impossible to fix.
It has to be said that this was several months, almost a year ago. So who knows what changed. Just my 2 penny to let you know that ZoomByLevel does support most of it, and that it in fact is just a matter of adding the zoom-level... and fixing the nasty graphical glitches

I tried to find my old patch which basically introduced zoom-in-levels, but I guess I removed it long ago


The only thing necessary for the triumph of evil is for good men to do nothing.
Re: Patch: zoom window
Update:
-works with animated blitters now (diff file in first post updated)
-optimzed for faster drawing
-works with animated blitters now (diff file in first post updated)
-optimzed for faster drawing
Thank you, i try.TrueLight wrote:It would be cool if you can introduce zoom-in on a general scope.

I cannot confirm this, what i've found is some kind of flickering when a window overlapps esp. the newspaper. To fix this i have to look deeper into the window managment, how to change z-order, updateregions etc..TrueLight wrote: when moving a window over a viewport at 2x or 4x zoom-in, it leaves a single pixel-line of graphical glitches.
-
- Tycoon
- Posts: 1656
- Joined: 08 Jun 2007 08:00
Re: Patch: zoom window
Well.. GeekToo's patch has somehow managed to get rid of pixel lines..
Re: Patch: zoom window
Can you give me a link please? Searching this forum for GeekToo is.. well.LordAzamath wrote:Well.. GeekToo's patch has somehow managed to get rid of pixel lines..

Re: Patch: zoom window
Oh, these one was ment? Of course I know off and i love it. I won't bother you (GeekToo) its a totally different thing you are working on (btw. great work!!). But seems it needs a while before we see this one in trunk. In spite of playing higher resolutions i needed a simple solution till we get the real thing.GeekToo wrote:http://www.tt-forums.net/viewtopic.php?p=682946#p682946
Regards,
connan.
Re: Patch: zoom window
How is this zoom coming along? Will it be in a nightly?
At about the same time as you first posted, I asked
I'm not sure what you call the small windows that follow a train, vehicle etc, but they were a brilliant idea by Chris Sawyer. And many people have done some outstanding graphics of new vehicles that have added to everyone's enjoyment.
So, would it be possible to (optionally) increase the scale of the window to get a closer view of an engine. (I'm not talking about dragging and enlarging its size). I appreciate that I'm really just asking for "eye-candy" - but I have a sweet tooth."
Would your zoom patch do this?
Thanks.
At about the same time as you first posted, I asked
I'm not sure what you call the small windows that follow a train, vehicle etc, but they were a brilliant idea by Chris Sawyer. And many people have done some outstanding graphics of new vehicles that have added to everyone's enjoyment.
So, would it be possible to (optionally) increase the scale of the window to get a closer view of an engine. (I'm not talking about dragging and enlarging its size). I appreciate that I'm really just asking for "eye-candy" - but I have a sweet tooth."
Would your zoom patch do this?
Thanks.
Re: Patch: zoom window
Oh, i don't think so, needs much more effort in coding style and documentation and seems rather disliked by the dev's cause its not the appropriate way a zoom should work. Its only usefull for people with glasses (like me) and/or ones who want to play in high res. Btw. comes along as diff file for now.sootynz wrote:How is this zoom coming along? Will it be in a nightly?
That was my first intention. What i would need to do that is a possibility to render a viewport into memory and not onto screen. That would also allow for staying on highest native zoom level while zooming the map out and some other cool postprocessing effectssootynz wrote: So, would it be possible to (optionally) increase the scale of the window to get a closer view of an engine.
Would your zoom patch do this?

Who is online
Users browsing this forum: Bing [Bot] and 11 guests