(svn r1889) -Fix: [ 1108637 ] 'Play scenario' now loads game options and difficulty, 'Load game' starts game with user-selected values.
authorcelestar
Fri, 18 Feb 2005 22:17:33 +0000
changeset 1385 324d3d06a930
parent 1384 06ef4fb5bb1a
child 1386 aa5a172a8431
(svn r1889) -Fix: [ 1108637 ] 'Play scenario' now loads game options and difficulty, 'Load game' starts game with user-selected values.
settings_gui.c
ttd.c
--- a/settings_gui.c	Fri Feb 18 21:20:55 2005 +0000
+++ b/settings_gui.c	Fri Feb 18 22:17:33 2005 +0000
@@ -315,10 +315,31 @@
 	return (x&1) != 0;
 }
 
-static const int16 _default_game_diff[3][GAME_DIFFICULTY_NUM] = {
-	{2, 2, 1, 3, 300, 2, 0, 2, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0},
-	{4, 1, 1, 2, 150, 3, 1, 3, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1},
-	{7, 0, 2, 2, 100, 4, 1, 3, 2, 2, 0, 2, 3, 2, 1, 1, 1, 2},
+/*
+	A: competitors
+	B: start time in months / 3
+	C: town count (2 = high, 0 = low)
+	D: industry count (3 = high, 0 = none)
+	E: inital loan / 1000 (in GBP)
+	F: interest rate
+	G: running costs (0 = low, 2 = high)
+	H: construction speed of competitors (0 = very slow, 4 = very fast)
+	I: intelligence (0-2)
+	J: breakdowns(0 = off, 2 = normal)
+	K: subsidy multiplier (0 = 1.5, 3 = 4.0)
+	L: construction cost (0-2)
+	M: terrain type (0 = very flat, 3 = mountainous)
+	N: amount of water (0 = very low, 3 = high)
+	O: economy (0 = steady, 1 = fluctuating)
+	P: Train reversing (0 = end of line + stations, 1 = end of line)
+	Q: disasters
+	R: area restructuring (0 = permissive, 2 = hostile)
+*/
+static const int16 _default_game_diff[3][GAME_DIFFICULTY_NUM] = { /*
+	 A, B, C, D,   E, F, G, H, I, J, K, L, M, N, O, P, Q, R*/
+	{2, 2, 1, 3, 300, 2, 0, 2, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0},	//easy
+	{4, 1, 1, 2, 150, 3, 1, 3, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1},	//medium
+	{7, 0, 2, 2, 100, 4, 1, 3, 2, 2, 0, 2, 3, 2, 1, 1, 1, 2},	//hard
 };
 
 void SetDifficultyLevel(int mode, GameOptions *gm_opt)
--- a/ttd.c	Fri Feb 18 21:20:55 2005 +0000
+++ b/ttd.c	Fri Feb 18 22:17:33 2005 +0000
@@ -890,7 +890,6 @@
 			LoadIntroGame();
 			ShowErrorMessage(_error_message, STR_4009_GAME_LOAD_FAILED, 0, 0);
 		} else {
-			_opt_mod_ptr = &_opt;
 			_local_player = 0;
 			DoCommandP(0, 0, 0, NULL, CMD_PAUSE); // decrease pause counter (was increased from opening load dialog)
 #ifdef ENABLE_NETWORK
@@ -908,6 +907,7 @@
 
 		if (SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_EDITOR)) {
 			_opt_mod_ptr = &_opt;
+			_opt_mod_temp = _opt;
 
 			_local_player = OWNER_NONE;
 			_generating_world = true;