changeset 6247 | 7d81e3a5d803 |
parent 6239 | 971f566e881c |
child 6248 | e4a2ed7e5613 |
6246:75451000349d | 6247:7d81e3a5d803 |
---|---|
189 DEBUG(misc, LANDINFOD_LEVEL, "m5 = %#x", _m[tile].m5); |
189 DEBUG(misc, LANDINFOD_LEVEL, "m5 = %#x", _m[tile].m5); |
190 DEBUG(misc, LANDINFOD_LEVEL, "m6 = %#x", _m[tile].m6); |
190 DEBUG(misc, LANDINFOD_LEVEL, "m6 = %#x", _m[tile].m6); |
191 #undef LANDINFOD_LEVEL |
191 #undef LANDINFOD_LEVEL |
192 } |
192 } |
193 |
193 |
194 void PlaceLandBlockInfo(void) |
194 void PlaceLandBlockInfo() |
195 { |
195 { |
196 if (_cursor.sprite == SPR_CURSOR_QUERY) { |
196 if (_cursor.sprite == SPR_CURSOR_QUERY) { |
197 ResetObjectToPlace(); |
197 ResetObjectToPlace(); |
198 } else { |
198 } else { |
199 _place_proc = Place_LandInfo; |
199 _place_proc = Place_LandInfo; |
303 _about_widgets, |
303 _about_widgets, |
304 AboutWindowProc |
304 AboutWindowProc |
305 }; |
305 }; |
306 |
306 |
307 |
307 |
308 void ShowAboutWindow(void) |
308 void ShowAboutWindow() |
309 { |
309 { |
310 DeleteWindowById(WC_GAME_OPTIONS, 0); |
310 DeleteWindowById(WC_GAME_OPTIONS, 0); |
311 AllocateWindowDesc(&_about_desc); |
311 AllocateWindowDesc(&_about_desc); |
312 } |
312 } |
313 |
313 |
464 _build_trees_scen_widgets, |
464 _build_trees_scen_widgets, |
465 BuildTreesWndProc |
465 BuildTreesWndProc |
466 }; |
466 }; |
467 |
467 |
468 |
468 |
469 void ShowBuildTreesToolbar(void) |
469 void ShowBuildTreesToolbar() |
470 { |
470 { |
471 if (!IsValidPlayer(_current_player)) return; |
471 if (!IsValidPlayer(_current_player)) return; |
472 AllocateWindowDescFront(&_build_trees_desc, 0); |
472 AllocateWindowDescFront(&_build_trees_desc, 0); |
473 } |
473 } |
474 |
474 |
475 void ShowBuildTreesScenToolbar(void) |
475 void ShowBuildTreesScenToolbar() |
476 { |
476 { |
477 AllocateWindowDescFront(&_build_trees_scen_desc, 0); |
477 AllocateWindowDescFront(&_build_trees_scen_desc, 0); |
478 } |
478 } |
479 |
479 |
480 static uint32 _errmsg_decode_params[20]; |
480 static uint32 _errmsg_decode_params[20]; |
1328 }; |
1328 }; |
1329 |
1329 |
1330 /* Colors for fios types */ |
1330 /* Colors for fios types */ |
1331 const byte _fios_colors[] = {13, 9, 9, 6, 5, 6, 5, 6, 6, 8}; |
1331 const byte _fios_colors[] = {13, 9, 9, 6, 5, 6, 5, 6, 6, 8}; |
1332 |
1332 |
1333 void BuildFileList(void) |
1333 void BuildFileList() |
1334 { |
1334 { |
1335 _fios_path_changed = true; |
1335 _fios_path_changed = true; |
1336 FiosFreeSavegameList(); |
1336 FiosFreeSavegameList(); |
1337 |
1337 |
1338 switch (_saveload_mode) { |
1338 switch (_saveload_mode) { |
1361 if (str != STR_4006_UNABLE_TO_READ_DRIVE) SetDParam(0, tot); |
1361 if (str != STR_4006_UNABLE_TO_READ_DRIVE) SetDParam(0, tot); |
1362 DrawString(2, 37, str, 0); |
1362 DrawString(2, 37, str, 0); |
1363 DoDrawStringTruncated(path, 2, 27, 16, maxw); |
1363 DoDrawStringTruncated(path, 2, 27, 16, maxw); |
1364 } |
1364 } |
1365 |
1365 |
1366 static void MakeSortedSaveGameList(void) |
1366 static void MakeSortedSaveGameList() |
1367 { |
1367 { |
1368 uint sort_start = 0; |
1368 uint sort_start = 0; |
1369 uint sort_end = 0; |
1369 uint sort_end = 0; |
1370 uint s_amount; |
1370 uint s_amount; |
1371 int i; |
1371 int i; |
1385 s_amount = _fios_num - sort_start - sort_end; |
1385 s_amount = _fios_num - sort_start - sort_end; |
1386 if (s_amount > 0) |
1386 if (s_amount > 0) |
1387 qsort(_fios_list + sort_start, s_amount, sizeof(FiosItem), compare_FiosItems); |
1387 qsort(_fios_list + sort_start, s_amount, sizeof(FiosItem), compare_FiosItems); |
1388 } |
1388 } |
1389 |
1389 |
1390 static void GenerateFileName(void) |
1390 static void GenerateFileName() |
1391 { |
1391 { |
1392 /* Check if we are not a specatator who wants to generate a name.. |
1392 /* Check if we are not a specatator who wants to generate a name.. |
1393 Let's use the name of player #0 for now. */ |
1393 Let's use the name of player #0 for now. */ |
1394 const Player *p = GetPlayer(IsValidPlayer(_local_player) ? _local_player : PLAYER_FIRST); |
1394 const Player *p = GetPlayer(IsValidPlayer(_local_player) ? _local_player : PLAYER_FIRST); |
1395 |
1395 |
1397 SetDParam(1, p->name_2); |
1397 SetDParam(1, p->name_2); |
1398 SetDParam(2, _date); |
1398 SetDParam(2, _date); |
1399 GetString(_edit_str_buf, STR_4004, lastof(_edit_str_buf)); |
1399 GetString(_edit_str_buf, STR_4004, lastof(_edit_str_buf)); |
1400 } |
1400 } |
1401 |
1401 |
1402 extern void StartupEngines(void); |
1402 extern void StartupEngines(); |
1403 |
1403 |
1404 static void SaveLoadDlgWndProc(Window *w, WindowEvent *e) |
1404 static void SaveLoadDlgWndProc(Window *w, WindowEvent *e) |
1405 { |
1405 { |
1406 static FiosItem o_dir; |
1406 static FiosItem o_dir; |
1407 |
1407 |
1661 BuildFileList(); |
1661 BuildFileList(); |
1662 |
1662 |
1663 ResetObjectToPlace(); |
1663 ResetObjectToPlace(); |
1664 } |
1664 } |
1665 |
1665 |
1666 void RedrawAutosave(void) |
1666 void RedrawAutosave() |
1667 { |
1667 { |
1668 SetWindowDirty(FindWindowById(WC_STATUS_BAR, 0)); |
1668 SetWindowDirty(FindWindowById(WC_STATUS_BAR, 0)); |
1669 } |
1669 } |
1670 |
1670 |
1671 void SetFiosType(const byte fiostype) |
1671 void SetFiosType(const byte fiostype) |
1732 _opt.landscape = p1; |
1732 _opt.landscape = p1; |
1733 ReloadNewGRFData(); |
1733 ReloadNewGRFData(); |
1734 return _opt.landscape; |
1734 return _opt.landscape; |
1735 } |
1735 } |
1736 |
1736 |
1737 extern void EnginesMonthlyLoop(void); |
1737 extern void EnginesMonthlyLoop(); |
1738 |
1738 |
1739 /** |
1739 /** |
1740 * @param p2 1 (increase) or -1 (decrease) |
1740 * @param p2 1 (increase) or -1 (decrease) |
1741 */ |
1741 */ |
1742 static int32 ClickChangeDateCheat(int32 p1, int32 p2) |
1742 static int32 ClickChangeDateCheat(int32 p1, int32 p2) |
1927 _cheat_widgets, |
1927 _cheat_widgets, |
1928 CheatsWndProc |
1928 CheatsWndProc |
1929 }; |
1929 }; |
1930 |
1930 |
1931 |
1931 |
1932 void ShowCheatWindow(void) |
1932 void ShowCheatWindow() |
1933 { |
1933 { |
1934 DeleteWindowById(WC_CHEATS, 0); |
1934 DeleteWindowById(WC_CHEATS, 0); |
1935 AllocateWindowDesc(&_cheats_desc); |
1935 AllocateWindowDesc(&_cheats_desc); |
1936 } |
1936 } |