Skip to main content
Topic: nightly r2161 - not used! (Read 8598 times) previous topic - next topic

Re: nightly r2161 - not used!

Reply #1
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.

Re: nightly r2161 - not used!

Reply #2
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.)

Re: nightly r2161 - not used!

Reply #3
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.

Re: nightly r2161 - not used!

Reply #4
Please check again. (and delete sve before, since rdwr was canged)

Re: nightly r2161 - not used!

Reply #5
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.

Re: nightly r2161 - not used!

Reply #6
way_leaving_road => way_leave_road

dataobj\einstellungen.cc:546
Code: [Select]
	way_count_leaving_road = contents.get_int("way_leaving_road", way_count_leaving_road);


=>
Code: [Select]
	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.

Re: nightly r2161 - not used!

Reply #7
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.
Code: [Select]
	// 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
Code: [Select]
		multiuser = contents.get_int("singleuser_install", 1)==1;


=>
Code: [Select]
		multiuser = contents.get_int("singleuser_install", multiuser)==1;



Re: nightly r2161 - not used!

Reply #8
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
Code: [Select]
	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.

Re: nightly r2161 - not used!

Reply #9
There are two variables "electric_promille" and "default_electric_promille".

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.