compiled to MS VC++ 2005 EE
save to savegame is wrong
not load savegames to save this version
(http://www.simutrans-germany.com/files/upload/thumb_Zwischenablage01.jpg.jpg) (http://www.simutrans-germany.com/files/upload/Zwischenablage01.jpg)
http://www.simutrans-germany.com/files/upload/id-test.sve (http://www.simutrans-germany.com/files/upload/id-test.sve) pak64-svn
not load the language setting
not work 'simutrans.exe -singleuser'
And many value are not initialized well.
Especially, bit per month sets to zero if there is no default.sve.
Extension request:
Please read settings value from text file(tab) as before, not from default.sve.
Binary file is not easy to customize for players.
But text file is also not easy when version changes. Also for OOP development, umgebung_t should take care of saving. (Text file is possible of course.)
Tested in r2165.
Many things are still not initialized well and also don't read player's settings.
For example, station_coverage, show_month etc.
Please check again. (and delete sve before, since rdwr was canged)
I did that way. station_coverage=0, show_month=0.
I tested both multiplayer and "singleuser_install = 0".
And also 'simutrans.exe -singleuser' still don't work.
If I start with '-singleuser', bit_per_month=0. I can't play with it.
[edit]
Maybe, einstellungen_t::rdwr overwrite all config/simuconf.tab settings.
So, we must read config/simuconf.tab again after that, don't it ?
"multiuser" is also overwritten.
way_leaving_road => way_leave_road
dataobj\einstellungen.cc:546
way_count_leaving_road = contents.get_int("way_leaving_road", way_count_leaving_road);
=>
way_count_leaving_road = contents.get_int("way_leave_road", way_count_leaving_road);
Sorry, this is off topic but my longtime question.
Why "singleuser_install=0" is singleuser mode and "singleuser_install=1" is multiuser mode ? ???
I think this is just the opposite.
Tested in r2167 and no difference, still don't read config/simuconf.tab.
I don't know well, but I added simuconf.open before p****_simuconf, it read.
So, I think tabfile is closing or file pointer is wrong.
If you don't have any problem, this might be MinGW problem.
I don't know this code correct or not.
// continue parsing ...
if( found_simuconf ) {
cstring_t obj_conf = umgebung_t::program_dir;
if(simuconf.open(obj_conf + "config/simuconf.tab")) {
umgebung_t::default_einstellungen.p****_simuconf( simuconf, disp_width, disp_height, fullscreen, umgebung_t::objfilename );
simuconf.close();
}
}
And "-singleuser" problem solved in this way.
simmain.cc:378
multiuser = contents.get_int("singleuser_install", 1)==1;
=>
multiuser = contents.get_int("singleuser_install", multiuser)==1;
There are two variables "electric_promille" and "default_electric_promille".
setze_electric_promille and gib_electric_promille() use "electric_promille", so default value of "Percent Electricity" on "New Map" window is zero.
dataobj\einstellungen.h
void setze_electric_promille(sint32 d) {electric_promille=d;}
sint32 gib_electric_promille() const {return electric_promille;}
I don't know which is correct one.
Current status in r2170.
Value of "electric_promille" on simuconf.tab stores in "default_electric_promille".
"New map" window use "electric_promille".
So, value of "electric_promille" on simuconf.tab will be ignored.
r2185
'simutrans -singleuser' work
load language settings work