OpenTTD

Tasklist

FS#3333 - viewport zoom level is not reset when quitting a game after having saved

Attached to Project: OpenTTD
Opened by fonsinchen (fonsinchen) - Saturday, 28 November 2009, 15:04 GMT
Last edited by Remko Bijker (Rubidium) - Monday, 30 November 2009, 11:30 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The zoom level and possible other game parameters are not reset when reloading the title game after abandoning a game that has been saved before. To reproduce load the attached save (or probably any other), save the game again, zoom out, quit the game. The title game is at the same zoom level as the game you have just aborted.

This may be related to the following report: http://www.tt-forums.net/viewtopic.php?f=33&p=834082#p834082
In this game the newgrf configuration from the previous game is carried over to the title game where conflicting settings cause a crash.
This task depends upon

Closed by  Remko Bijker (Rubidium)
Monday, 30 November 2009, 11:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  in r18351
Comment by Remko Bijker (Rubidium) - Saturday, 28 November 2009, 15:14 GMT
I can't reproduce this. Either by going through the main menu and loading that savegame or directly loading it with -g.

It is:
- load game
- save game
- zoom out (either with mouse scroll or the buttons in the toolbar)
- abandon game
- see a zoomed out intro game

Right? Anyhow, as I said it doesn't happen for me with r18324.

Besides the NewGRF config it likely the configuration for new games. It 'just' isn't loaded in the intro game. To 'prove' this point: create a NewGRF configuration in the main menu, quit the game, start the game, open the console, type gamelog and see that it added NewGRFs even though they are not loaded.
Comment by fonsinchen (fonsinchen) - Saturday, 28 November 2009, 16:46 GMT
Actually the order is:

- load game
- zoom out (with key '-' here, but it probably doesn't matter)
- save game
- abandon game
- see zoomed out intro game

Sorry for the confusion. I just checked with r18324, too, and it's 100% reproducible here.

The problem in that forum post was that it doesn't only add the grfs but also partly loads them, so that the food (I think) train passing over the bridge in the title game gets corrupted. That's what the message in the screenshot says. However, I know that's not trunk.
Comment by Zdeněk Sojka (SmatZ) - Saturday, 28 November 2009, 17:06 GMT
Does it happen when you disable threaded_saves ? ("set threaded_saves 0" in console)
Comment by fonsinchen (fonsinchen) - Saturday, 28 November 2009, 17:11 GMT
Yes, it's the same with threaded_saves off.
Comment by Zdeněk Sojka (SmatZ) - Saturday, 28 November 2009, 23:52 GMT
Do you use clean trunk?
It seems VIEW chunk is for some reason not loaded. Can you check it is loaded? (SaveLoad_VIEW() is called when loading intro game?)
Does it happen when you leave the game using "part" console command?
Comment by Remko Bijker (Rubidium) - Sunday, 29 November 2009, 22:30 GMT
What kind of local modifications do you have in the binary? I can't map the revision to either something in the cargodist repository or in the official trunk repository.
And with r18324 do you mean: r18324 without modification or r18324 with modifications?
Comment by fonsinchen (fonsinchen) - Monday, 30 November 2009, 10:50 GMT
The only changes I made was adding my patch building system to the master branch. It doesn't change any openttd code. However, for the sake of the argument here I provide a savegame from a fresh SVN checkout of r18324 that does the exact same thing. SaveLoad_VIEW is called once when saving the game and once when aborting it. The effect also occurs when using "part" instead of the menu.
Comment by fonsinchen (fonsinchen) - Monday, 30 November 2009, 11:04 GMT
The effect could be related to the CPU's byte order. It occurs on my powerpc laptop, but is curiously absent on my x86_64 desktop. Both are using debian lenny with the same libraries and the same compiler: g++ (Debian 4.3.2-1.1) 4.3.2

Loading...