Darkvater
3a1cef5af8
(svn r4302) - Fix: s/maxlength/maxwidth of course, the buffer size is always set. Comment-change only
19 years ago
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)
19 years ago
celestar
3aa1e38be6
(svn r4246) -Codechange. Replaced about 100 occurences of '16' by TILE_SIZE
19 years ago
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.
19 years ago
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.
19 years ago
Darkvater
7656bf8075
(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
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.
19 years ago
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).
19 years ago
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.
19 years ago
tron
84fb96fe85
(svn r3511) More whitespace ([FS#46] by Rubidium)
19 years ago
Darkvater
d6933998e4
(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
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.
19 years ago
peter1138
70efa805cb
(svn r3421) - Revert r3412 as it didn't work.
...
- Fix station builder issue by checking the tile is in bounds.
19 years ago
tron
bf98086de8
(svn r3298) Remove unused and write-only variables
19 years ago
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.
19 years ago
Darkvater
2a60262c99
(svn r3293) - Miscellaneous: add peter1138 as developer
19 years ago
peter1138
809b03c81a
(svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed()
19 years ago
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.
19 years ago
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.
19 years ago
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
19 years ago
tron
4a14a586e2
(svn r3173) Use the trinary operator and switch to improve readability
...
Also align short cases nicely
19 years ago
tron
ee15e3de13
(svn r3172) static, const
19 years ago
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.
19 years ago
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
19 years ago
tron
758ae7e8f6
(svn r3064) Replace some numbers by sprite names
19 years ago
tron
23ecc82ad3
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
19 years ago
tron
3397e202c8
(svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants
19 years ago
tron
ed8c9c91d6
(svn r3001) s/Player*/const Player*/
...
s/byte/PlayerID/
s/int/PlayerID/
and related changes
19 years ago
Darkvater
db31fe8e15
(svn r2952) Querytool output is be 0xAAAA. with leading 0x. Couldn't use # cause that would have written 0X
19 years ago
tron
0fe36a6900
(svn r2932) Give the strings consisting of an up/a down arrow symbolic names
19 years ago
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.
19 years ago
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.
19 years ago
bjarni
b0d4e391da
(svn r2836) fixed the alphabetical order of the credits list like it says it is in
19 years ago
tron
e4cad82b00
(svn r2799) Make the only two non-const widget lists const
19 years ago
ludde
29564f9fcf
(svn r2781) Fix some of the issues with variables in .h files.
19 years ago
tron
fc5e2d4861
(svn r2775) Deleting a file can fail, display an error message when it happens
19 years ago
tron
a16418266e
(svn r2717) Move _userstring to strings.[ch]
19 years ago
celestar
238e47cd42
(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
a227065ab7
(svn r2701) Insert Id tags into all source files
19 years ago
orudge
c50223526c
(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
290bb2fda6
(svn r2675) - Fix: pressing enter on a load-window resulted in saving the game (Luca)
19 years ago
tron
559babcdc9
(svn r2673) Include functions.h directly, not globally via openttd.h
19 years ago
tron
18d79cc30f
(svn r2672) Move saving/loading related declarations to saveload.h
19 years ago
tron
0762aa9ec9
(svn r2669) Shuffle some more stuff around to reduce dependencies
19 years ago
Darkvater
f0c0c03c5f
(svn r2644) - Fix: my name was mistyped ;p
...
- Add DoDrawStringCentered() and change the multiline strings in the about box to single-line ones
19 years ago
Darkvater
99c17f8ac7
(svn r2638) - Fix: Unable to delete savegames. Deleting TTDLX savegames is still broken as it was always broken, but since they don't even show up; we might as well call it a feature.
19 years ago
Darkvater
f8b7b107d8
(svn r2613) - Truncate savegames, and vehicle-texts in their window.
...
- Hardcoded width 5 for saves-path...oops :O
20 years ago
Darkvater
3e49626aec
(svn r2610) - Feature: set server map name to the loaded name of the game/scenario. Also truncate where neccessary
...
- Feature: truncate the path of the saveload window
20 years ago
ludde
3486e7e9d5
(svn r2580) Change: Added {INDUSTRY} command for printing industry names instead of the old {TOWN} {STRING} way.
...
- The formatting of the industry name can be controlled with the string STR_INDUSTRY_FORMAT.
Change: Changed several occurences of {STRING1} into {TOWN} to get rid of townnametype being used directly.
20 years ago
ludde
2fa79c9b4d
(svn r2572) - Codechange: [string] Changed string system so it's not as dependent on decode_parameters
...
- Feature: [strgen] Allow changing the order of parameters in translated strings.
- Use {1:TOWN} syntax to set the order.
- Codechange: [strgen] Rewrote lots of strgen internals.
20 years ago
tron
8c1d74162f
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
20 years ago
tron
61f6f07edd
(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to TileVirtXY
20 years ago
tron
3154e7148d
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
20 years ago
celestar
aa7334a3ec
(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer
20 years ago
hackykid
8607bbf06d
(svn r2444) - CodeChange: Add an enum for demagicifying the values of the 'flags' parameter of DrawFrameRect(). (_Abraxa_)
20 years ago
celestar
9b8cb17831
(svn r2441) -Feature: You can now give transfer order to set up feeder systems
20 years ago
Darkvater
5fed47964e
(svn r2420) - Codechange: magic number elminitation of cursorsprites.
20 years ago
Darkvater
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
20 years ago
Darkvater
d0a0d6fcb5
(svn r2385) - Feature: shortcut CTRL + U that clears the commandline of the current input-box. As requested by Tron.
20 years ago
tron
6566941077
(svn r2366) Use SetRedErrorSquare() instead of home brewed version
20 years ago
tron
1ab7238c15
(svn r2351) -Fix: It was possible to open more than one tree window
20 years ago
Darkvater
cdb81c660c
(svn r2348) - Fix: Do not scroll the game with the arrow keys when the chatbox is open
20 years ago
Darkvater
4554daa130
(svn r2331) - Fix (regression): fix text overflows in about box.
20 years ago
Darkvater
7dc5c5d1b1
(svn r2325) - Update OpenTTD for 0.4.0 release
20 years ago
Darkvater
033995ec6e
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
...
- CodeChange: remove cmd-misuses CmdStartScenario() and CmdDestroyCompanyHQ()
- Fix (invisible): when parameter checking CmdRestoreOrderIndex() the vehicle did not have its orders yet, so it would fail. So move doing this until AFTER the orders have been added back in RestoreVehicleOrders()
20 years ago
Darkvater
c626555f68
(svn r2298) - CodeChange: removed CmdAbuses: CmdSetTownNameType(), CmdStartNewGame(), CmdCreateScenario(), CmdSetNewLandscapeType() and CmdGenRandomNewGame().
...
- CodeChange: renamed CmdTrainGotoDepot() to CmdSendTrainToDepot() to be consistent with other depot commands.
- CodeChange: 'newgame' console command now calls the unabused GenRandomNewGame(). For the server it still creates a new game, a client quits the game and continues in SP.
- CodeChange: in the game-difficulty window, setup the disabled buttons on window creation, not every redraw.
20 years ago
Darkvater
ab954a934a
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
...
- CodeChange: changed the airport gui airport-type checking. Added function GetValidAirports() that returns bitmasked availibility, is also used for checking.
- CodeChange: to check tree-planting, 2 const arrays have been moved to table/tree_land.h (type and count)
- CodeChange: added IsTownIndex() in following of IsStationIndex(), etc.
- Fix (regression): road tunnels did not work anymore, forgot that their type was 0x200 (documented now)
20 years ago
bjarni
3e470708a6
(svn r2198) renamed MacOS to MacOSX where it was written wrong. Made myself MacOSX porter as well as coder
20 years ago
darkvater
6bca4c041a
(svn r2100) - Fix: [1024703]: Infinite access for A:\ (win32). Patch [1171208]. Only requery drive(s) if the user changes a directory, also surpress the OS error box that pops up on some windows machines. Tron + glx (and me)
20 years ago
tron
e4cb9dbb77
(svn r2098) Make a variable static, move a function declaration to a header and remove unnecessary preprocessor magic
20 years ago
matthijs
a0f9a7597c
(svn r2082) I have a name too!
20 years ago
pasky
bf1fd0379c
(svn r2081) I have a real name, too.
20 years ago
tron
9832a691fe
(svn r2060) Clean up some string construction and remove now unused macro
20 years ago
tron
0c325e10da
(svn r2057) Add InlineString() to make _userstring construction a bit cleaner.
20 years ago
Darkvater
010d1a9be3
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
...
- Fix: [ 1153926 ] All my settings in vain... IGNORED!
- Change: I hope I got it all right. Pressing 'New Game' (either choosing random or a preset scenario) and 'Create Scenario' will start a new game with the settings and difficulty in the intro menu. Using 'Load Game' and 'Play Scenario' will take the values from the savegame/scenario itself.
20 years ago
Darkvater
0067f68117
(svn r1923) - Fix: [ 1155696 ] Crash with german umlauts in station names. The width was not calculated using unsigned values, so all characters above 128 were "negative"
...
- Codechange: a more proper check for a null pointer in tunnelbridge_cmd.c should have gone in with the previous commit
20 years ago
Darkvater
7746c4722b
(svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
20 years ago
Darkvater
fbe47d912a
(svn r1896) - Fix: remove Translated by hack since it's not used
20 years ago
Darkvater
d865c55007
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
...
- Codechange: Introduction of Textbuf struct which not only holds physical data as length but also pixel-constrains (width) and information about the caret
- Codechange: Move Clipboard function to OS specific file. Currently only Windows has clipboard actions
- Feature: Editboxes, console and exit screen also accept the numeric-enter as a yes
- Feature: Navigation through text with cursor keys is possible, as well as arbitrary insertion (also paste) and deletion; both backspace and del keys. Functions DeleteTextBufferChar, InsertTextBufferChar and InsertTextBufferClipboard handle input and deletion. Navigation is done through MoveTextBufferPos.
- Fix: OTTD crash when opening 'add server' editbox
- CodeChange: fix up some stringwidth calculations in gfx.c. You can get the width in pixels of a character by calling GetCharacterWidth().
20 years ago
tron
2de3dc2735
(svn r1890) Begin to clean up the edit box: Remove one global variable and split the combined edit/original buffer into two
20 years ago
tron
204d08140a
(svn r1867) Include tables/sprites.h only in files which need it
20 years ago
tron
2a151d9354
(svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
20 years ago
tron
8aee833024
(svn r1849) Use the cheat entry enum for CheatEntry.type and remove unused enum values
20 years ago
tron
d1fb165ad2
(svn r1848) Remove the obscure feature of initialising the edit box with the contents of str_buffr - it was unused anyway.
...
Remove it from the chat box too, which inherited it via copy&paste.
20 years ago
darkvater
8867c00d68
(svn r1845) - Revert r1835 since it totally screws network compiling
...
- Fix: fix some VS.NET warnings
- Add missing file to VS.NET project file
20 years ago
tron
b1baa4ed8b
(svn r1840) Repel str_buffr and use local buffers where possible
20 years ago
tron
eed181245d
(svn r1833) byte -> char transition: the rest
20 years ago
tron
2fb453a4a5
(svn r1827) Next iteration of the byte -> char transition: some string drawing functions and buffers
20 years ago
tron
0381073e56
(svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c)
20 years ago
tron
7aae12d55d
(svn r1808) Use strcmp() instead of home brewed function str_eq()
20 years ago
tron
f0f85a7ef3
(svn r1803) Move debugging stuff into files of it's own
20 years ago
matthijs
f42e8ac3d2
(svn r1778) - Fix: [ 1115200 ] In the main menu, when starting a new game while the load game dialog is open, openttd asserts.
20 years ago
miham
7874c86cb2
(svn r1678) Added cheat option for setting production of raw-material product industries in game
20 years ago
darkvater
590bbd7e21
(svn r1632) -Fix: [1108008] Scenario creation bug; engines are of correct year when scenario is saved
20 years ago
darkvater
94dc25b45f
(svn r1627) -Fix: The tabulizer in action ^_^
20 years ago
darkvater
f1c151f157
(svn r1626) -Updated readme and credits list.
20 years ago
darkvater
f31d8bb9a1
(svn r1625) -Alphabetized credits list
20 years ago
tron
9f60324821
(svn r1606) Fix some bogus casts
20 years ago
tron
e5cd6b6193
(svn r1596) Add some more statics
20 years ago
tron
189ca73707
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
20 years ago