Commit Graph

168 Commits

Author SHA1 Message Date
Darkvater a9251d2d02 (svn r5767) - Cleanup: Improve upon the header file mess regarding fios. Move all relevant types from hal.h into fios.h, eliminate the unneccessary passing of a global variable, and extern variables in header files (declare in fios.c and misc_gui.c 2006-08-05 00:59:45 +00:00
Darkvater bca8e9ad4e (svn r5761) - Cleanup: Really minor whitespace changes, and remove an extern from a function decleration in header file. 2006-08-04 23:33:05 +00:00
miham 76ea272c9c (svn r5714) Backport from branches/TGP (r5701 and r5711)
-Fix: < > boxes in patch-settings didn't grey out when they hit the limit of their range
 -Codechange: while at it, prettyfied DrawArrowButtons() a bit
 -Fix: < > boxes in industry production window (when cheat enabled) had a minor glitch
2006-08-02 18:36:53 +00:00
belugas 6082507fea (svn r5609) CodeChange : Apply coding style 2006-07-26 03:33:12 +00:00
truelight aa79d65807 (svn r5489) -Fix: corrected tokai's name and morphos details (tokai) 2006-07-13 17:58:13 +00:00
peter1138 da89744609 (svn r5409) - Regression [r5391]: WE_CLICK event of SelectScenarioWndProc() cascaded to WE_RESIZE handler, causing the Save and Map toolbar widgets to be altered. Fix by putting the break; back. 2006-06-28 20:27:31 +00:00
tron 2b27073156 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 2006-06-27 21:25:53 +00:00
tron 0a72639c2d (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 2006-06-10 08:37:41 +00:00
celestar 979b640f19 (svn r4946) "Feature": Add a cheat that allows running electric engines on normal rail 2006-05-22 14:41:20 +00:00
peter1138 fd778ecafa (svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed. 2006-05-09 13:23:04 +00:00
miham f9316c5a65 (svn r4690) [Fix] Fixed ShowQueryString() to close FS#151 2006-05-02 17:28:29 +00:00
Darkvater 8faf1838e6 (svn r4623) - Codechange: s/byte/PlayerID/ 2006-04-29 14:31:16 +00:00
celestar 1b1e519b76 (svn r4478) -Fix (FS#107) In the cheat menu, don't hard-code the player icon, but compute its position from the length of the string. 2006-04-19 16:02:07 +00:00
tron 81e6d68f95 (svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
2006-04-10 07:15:58 +00:00
Darkvater 3a1cef5af8 (svn r4302) - Fix: s/maxlength/maxwidth of course, the buffer size is always set. Comment-change only 2006-04-06 19:16:39 +00:00
Darkvater b68b9b149a (svn r4301) - Fix: the maxlength parameter of Textbuf is supposed to be the size of the buffer (so length of string + '\0'), but in the code it was a mix of both. It didn't cause any problems though, only an occasionaly one-less character than allowed. (thanks Tron for noticing) 2006-04-06 19:11:41 +00:00
celestar 3aa1e38be6 (svn r4246) -Codechange. Replaced about 100 occurences of '16' by TILE_SIZE 2006-04-03 05:32:11 +00:00
Darkvater 9b5d8a9921 (svn r4105) - Feature: Add proper ISO-8859-15 <> LOCALCODE conversion. As the mess that is makefile can't properly support it at the moment, it is only available for MACOSX. Windows doesn't need FS conversion and I have no idea about OS/2 so it's disabled for them.
- CodeChange: Change the function GetCurrentLocale(). It returns the locale from some default environment-variables, plus a custom one defined as parameter. If all fail, it tries $LANG.
2006-03-25 09:22:10 +00:00
Darkvater 010d715039 (svn r4002) - Fix: Use the title of a savegame in the saveload dialog-editbox. This gets rid of the '.sav' appended to each game as well as properly showing UTF-8 saves when this is implemented. Also don't change the text if the save has failed. 2006-03-21 22:09:19 +00:00
Darkvater 7656bf8075 (svn r4001) - Add length parameter to FiosMakeSavegameName() and use this function for creating the full path instead of home-brewn snprintf. 2006-03-21 22:08:15 +00:00
Darkvater 9773a2bcbe (svn r3853) - Fix a change of SetDParam64 to SetDParam in r3713 that caused slightly vibrating text when pressing the cheat-button. Thanks to peter1138 for noticing. 2006-03-13 23:13:21 +00:00
Darkvater e7e8466fb6 (svn r3713) - Fix up the cheats window a little. The cheats code is still abominable, but at least a bit more readable now.
Use the now generalized ReadValue/WriteValue functions as well as using general variable-types (SLE_VAR, instead of custom CE_ ones).
  Remove the CE_CLICK type and use a SLE_BOOL type instead with a flag of CE_CLICK.
  Remove stepsize from the struct. The stepsize is automatically calculated from the minimum and maximum values (in 20 steps).
2006-03-01 20:49:47 +00:00
Darkvater 61b43672e9 (svn r3710) - Use the general function DrawArrowButtons() instead of doing it manually. The function has two parameters added, colour and an enabled flag. 2006-03-01 20:24:22 +00:00
tron 84fb96fe85 (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
Darkvater d6933998e4 (svn r3453) - CodeChange: Also show the landinfo debug information when building in release mode; however it is shown at debug level 1. 2006-01-27 17:06:29 +00:00
Darkvater 2612d48550 (svn r3439) - CodeChange: Remove a whole bunch of global variables and put them into the WP() macro. Also combine more than one WP-custom element. For this the maximum size of w->custom (WP) has been increased, and multiple types put inside one with possibly moved to the corresponding gui file if it is only used there. 2006-01-26 16:19:24 +00:00
peter1138 70efa805cb (svn r3421) - Revert r3412 as it didn't work.
- Fix station builder issue by checking the tile is in bounds.
2006-01-23 19:12:35 +00:00
tron bf98086de8 (svn r3298) Remove unused and write-only variables 2005-12-14 06:28:48 +00:00
Darkvater d8727d7fcd (svn r3295) - Regressionfix: scrolling with mousewheel no longer worked in saveload dialogs because of restriction that scroller is only active for widget + next widget is scrollbar. Yes, we need a better window system. 2005-12-13 22:28:44 +00:00
Darkvater 2a60262c99 (svn r3293) - Miscellaneous: add peter1138 as developer 2005-12-13 20:20:44 +00:00
peter1138 809b03c81a (svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed() 2005-12-10 12:05:39 +00:00
peter1138 1c57091230 (svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing. 2005-12-07 15:48:52 +00:00
peter1138 4191adb92c (svn r3247) - Fix: "[ 1335580 ] sticky windows not sticky anymore"
Determine clicked status of sticky icon from window flags rather than the widget click state. This keeps the status in one place where it can't get out of sync.
2005-11-29 22:04:02 +00:00
tron f7abff5f96 (svn r3181) -Bracing
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
2005-11-14 19:48:04 +00:00
tron 4a14a586e2 (svn r3173) Use the trinary operator and switch to improve readability
Also align short cases nicely
2005-11-13 14:54:09 +00:00
tron ee15e3de13 (svn r3172) static, const 2005-11-13 13:43:55 +00:00
Darkvater f561993112 (svn r3096) - Feature: 'HOME' icon to saveload dialogs that jumps to the default save/load directory based on the dialog (added icon to openttd.grf, introduced FIOS_TYPE_DIRECT that allows arbitrary directory jumping).
- Fix: on Win32 capitalize the drive-letter in the saveload dialog windows when it is first opened.
2005-10-28 00:09:59 +00:00
tron 47137cefb7 (svn r3078) Some more stuff, which piled up:
- const, whitespace, indentation, bracing, GB/SB, pointless casts
- use the trinary operator where appropriate
- data types (uint[] -> AcceptedCargo, ...)
- if cascade -> switch
- if (ptr) -> if (ptr != NULL)
- DeMorgan's Law
- Fix some comments
- 0 -> '\0', change magic numbers to symbolic constants
2005-10-23 13:04:44 +00:00
tron 758ae7e8f6 (svn r3064) Replace some numbers by sprite names 2005-10-19 06:46:41 +00:00
tron 23ecc82ad3 (svn r3055) Give the savegame/scenarion sort order flags symbolic names 2005-10-17 19:57:00 +00:00
tron 3397e202c8 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 2005-10-07 07:35:15 +00:00
tron ed8c9c91d6 (svn r3001) s/Player*/const Player*/
s/byte/PlayerID/
s/int/PlayerID/
and related changes
2005-09-30 20:37:25 +00:00
Darkvater db31fe8e15 (svn r2952) Querytool output is be 0xAAAA. with leading 0x. Couldn't use # cause that would have written 0X 2005-09-14 19:22:06 +00:00
tron 0fe36a6900 (svn r2932) Give the strings consisting of an up/a down arrow symbolic names 2005-09-10 07:38:03 +00:00
tron b45aeb5c36 (svn r2886) Rename the "owner" attribute to "m1", because when it stores an owner it is accessed by [GS]etOwner anyway and when it doesn't store an owner, but arbitrary data, accessing a field called "owner" is confusing. 2005-08-23 18:47:04 +00:00
tron 19f5036c46 (svn r2866) Move all functions and tables which aren't directly involved in managing the sprite heap to a new file gfxinit.c.
This doesn't ease the global variable mess, but makes the distinction between sprite heap and gfx loading routines easier.
2005-08-14 18:10:18 +00:00
bjarni b0d4e391da (svn r2836) fixed the alphabetical order of the credits list like it says it is in 2005-08-07 19:16:32 +00:00
tron e4cad82b00 (svn r2799) Make the only two non-const widget lists const 2005-08-03 13:07:29 +00:00
ludde 29564f9fcf (svn r2781) Fix some of the issues with variables in .h files. 2005-08-01 16:31:19 +00:00
tron fc5e2d4861 (svn r2775) Deleting a file can fail, display an error message when it happens 2005-08-01 00:14:22 +00:00