Commit Graph

161 Commits (a2362674e33e66bf1d27df208db5b2250a01012e)

Author SHA1 Message Date
tron a2362674e3 (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 18 years ago
celestar b725af6ad7 (svn r4946) "Feature": Add a cheat that allows running electric engines on normal rail 18 years ago
peter1138 99197b608a (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. 18 years ago
miham 91a6004697 (svn r4690) [Fix] Fixed ShowQueryString() to close FS#151 18 years ago
Darkvater 26db3ac91f (svn r4623) - Codechange: s/byte/PlayerID/ 18 years ago
celestar ffc04f0889 (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. 18 years ago
tron 35e93e451f (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()
18 years ago
Darkvater 24da7e158a (svn r4302) - Fix: s/maxlength/maxwidth of course, the buffer size is always set. Comment-change only 18 years ago
Darkvater c8a85d5419 (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) 18 years ago
celestar 6443c14ebd (svn r4246) -Codechange. Replaced about 100 occurences of '16' by TILE_SIZE 19 years ago
Darkvater e3685faad0 (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.
19 years ago
Darkvater f18ed60611 (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. 19 years ago
Darkvater 413dd85cd7 (svn r4001) - Add length parameter to FiosMakeSavegameName() and use this function for creating the full path instead of home-brewn snprintf. 19 years ago
Darkvater aef238f1ad (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. 19 years ago
Darkvater 78d666eb8e (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).
19 years ago
Darkvater b4794ddc3b (svn r3710) - Use the general function DrawArrowButtons() instead of doing it manually. The function has two parameters added, colour and an enabled flag. 19 years ago
tron 1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
Darkvater 3edea59a58 (svn r3453) - CodeChange: Also show the landinfo debug information when building in release mode; however it is shown at debug level 1. 19 years ago
Darkvater 1ba8bcd0de (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. 19 years ago
peter1138 e2c90e8f5a (svn r3421) - Revert r3412 as it didn't work.
- Fix station builder issue by checking the tile is in bounds.
19 years ago
tron a2533d5ee6 (svn r3298) Remove unused and write-only variables 19 years ago
Darkvater 9b43afecf1 (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. 19 years ago
Darkvater acf8bba4f6 (svn r3293) - Miscellaneous: add peter1138 as developer 19 years ago
peter1138 80986fcd32 (svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed() 19 years ago
peter1138 5f3dc36983 (svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing. 19 years ago
peter1138 627dd10451 (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.
19 years ago
tron 9d0e7b6458 (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
19 years ago
tron 53f00c8f9d (svn r3173) Use the trinary operator and switch to improve readability
Also align short cases nicely
19 years ago
tron 81e5b16d71 (svn r3172) static, const 19 years ago
Darkvater 71fb375f8c (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.
19 years ago
tron 181d586a7c (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
19 years ago
tron b17b87469c (svn r3064) Replace some numbers by sprite names 19 years ago
tron c042fd3de3 (svn r3055) Give the savegame/scenarion sort order flags symbolic names 19 years ago
tron 8980891b09 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 19 years ago
tron 980808dac2 (svn r3001) s/Player*/const Player*/
s/byte/PlayerID/
s/int/PlayerID/
and related changes
19 years ago
Darkvater e0af70e212 (svn r2952) Querytool output is be 0xAAAA. with leading 0x. Couldn't use # cause that would have written 0X 19 years ago
tron 2aa27f9ecb (svn r2932) Give the strings consisting of an up/a down arrow symbolic names 19 years ago
tron 8b74a95d36 (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. 19 years ago
tron a7d6b41c6a (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.
19 years ago
bjarni 170a082013 (svn r2836) fixed the alphabetical order of the credits list like it says it is in 19 years ago
tron c2178ab832 (svn r2799) Make the only two non-const widget lists const 19 years ago
ludde 9a060a0f24 (svn r2781) Fix some of the issues with variables in .h files. 19 years ago
tron 984a4c68d6 (svn r2775) Deleting a file can fail, display an error message when it happens 19 years ago
tron c043670cf8 (svn r2717) Move _userstring to strings.[ch] 19 years ago
celestar a3739aecdf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
by enums. There remains work in gfx.c to move the "transparency" and
"recolor" bits around to make space for more sprites. However, 2800
additional sprites can now be loaded. There also remains cleanup and
Doxygen work on many of the header files.
19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
orudge 2838934486 (svn r2681) - Fix OS/2 port, please do not modify openttd.wpj/tgt by hand unless you know what you're doing! 19 years ago
Darkvater cd70c105fb (svn r2675) - Fix: pressing enter on a load-window resulted in saving the game (Luca) 19 years ago
tron 54cbd01825 (svn r2673) Include functions.h directly, not globally via openttd.h 19 years ago
tron a4ec4da221 (svn r2672) Move saving/loading related declarations to saveload.h 19 years ago