tron
187ea08e1d
(svn r3099) Copy&pasto in r3098
19 years ago
tron
9e957ff80b
(svn r3098) static, const, uint -> TileIndex, indentation, bracing, unused return values, ... mostly related to the clone vehicle GUI
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
2cc2154ad2
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
...
nothing spectacular, just some stuff, which piled up
19 years ago
tron
d5042d4ab2
(svn r3046) Replace some numbers with sprite names and fix a typo in the sprite list
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
0cc45ecd8e
(svn r3003) Change int, uint, uin16 and byte to EngineID where appropriate, plus some related changes (mostly casts)
19 years ago
tron
ff30404170
(svn r2992) Use PlayerID, StationID and INVALID_STATION instead of int, int and -1
19 years ago
Darkvater
8e6a911700
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
...
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
19 years ago
tron
0fe36a6900
(svn r2932) Give the strings consisting of an up/a down arrow symbolic names
19 years ago
bjarni
017b72d98a
(svn r2795) -Fix: [Clone vehilcle] all error messages should now tell the right vehicle type (chrishuebsch)
19 years ago
ludde
29564f9fcf
(svn r2781) Fix some of the issues with variables in .h files.
19 years ago
tron
4190e5581d
(svn r2772) Simplify the age notice in the vehicle details window
19 years ago
bjarni
546c34f2e5
(svn r2764) -Feature: Clone vehicles
...
-This allows a player to clone an excisting vehicle of his own
-[fix]: this uncovered an excisting bug in CmdBuildRailVehicle() where depots could build trains of the wrong track type. This is fixed
-Thanks to Celestar for drawing the sprites and _luca_ for including them in openttd.grf
19 years ago
tron
a227065ab7
(svn r2701) Insert Id tags into all source files
19 years ago
tron
559babcdc9
(svn r2673) Include functions.h directly, not globally via openttd.h
19 years ago
tron
0762aa9ec9
(svn r2669) Shuffle some more stuff around to reduce dependencies
19 years ago
Darkvater
0550c4a87a
(svn r2623) - CodeChange: rework DrawStringCenteredTruncated() a bit. Instead of giving center + width you give the coordinates of the bounding box (left, right) it has to fit in (ludde)
...
- CodeChange: changed (back) maximum pixel length of truncated strings to a signed integer.
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
ludde
64f6839816
(svn r2594) Fix: [strgen] Misc updates to the string system.
...
- Renamed the plural command to "P" instead of "PLURAL". Now write something like this to append an s on plural: {P "" s}. (You can optionally still add an argument index to explicitly specifiy which number that's used)
- Removed the pluralized cargo strings from the string files. The new method is to use the plural specifier {P}
- Added support for genders. First add "##gender der das die" on top, then use {G=der} on a cargoname/industry to set the gender, and to switch between genders do something like {G neu neu neue} {STRING}
- Updated the swedish/english translation with P strings.
20 years ago
tron
ab7b8b50e3
(svn r2492) Remove some pointless casts and fix some nearby indentation
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
tron
fa8f46c0b7
(svn r2432) Use GetEngine() instead of DEREF_ENGINE() or even _engines[]
20 years ago
hackykid
6d78b70075
(svn r2428) - Feature: [newgrf] Implement shorter train vehicles (Therax), and the callback that goes with it.
...
- Codechange: Remove some magic numbers (PALETTE_CRASH)
20 years ago
hackykid
09aadafda1
(svn r2413) - Codechange: Rewrite the displaying of purchase details a bit, make it easyer to add lines later.
...
- Add: In the purchase details for trains display "(refittable)" after the capacity if the vehicle is refittable.
20 years ago
hackykid
ea57dee837
(svn r2412) - Fix: [ 1214948 ] building vehicles without depot crashes game. (Chris Huebsch)
20 years ago
tron
0c4ecbe9ec
(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner
20 years ago
Darkvater
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
20 years ago
tron
fea5965679
(svn r2324) Introduce _cmd_text for passing strings with a command instead of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes.
20 years ago
Darkvater
729066e407
(svn r2294) - CodeChange: check the service interval settings when changing of all vehicle-types. To simplify things introduce GetServiceIntervalClamped() that returns the same or clamped value of the new service interval. There were some inconsistencies in the gui files so I had to change those, and const correctness kicked in, so it's a bit messy at certain points.
20 years ago
tron
eab8b9a116
(svn r1989) -Feature: Resizable vehicle view windows; this is based on a patch by tmesisbob
20 years ago
matthijs
c5c5c9b17c
(svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
...
- Add: asserts to find the v->u.rail.track == 0 problem.
- Add: IsValidDepot(), IsValidTown(), IsValidSign(), IsValidVehicle(), IsValidStation()
- Add: GetTileOwner(), IsTileOwner()
- Codechange: Replaced IsShipDepotTile(), IsTrainDepotTile(), IsRoadDepotTile() by IsTileDepotType().
- Codechange: typedeffed the MAP_OWNERS as Owner. Should be used as variable type.
- Codechange: Replaced a few uint by TileIndex.
20 years ago
tron
2fb453a4a5
(svn r1827) Next iteration of the byte -> char transition: some string drawing functions and buffers
20 years ago
truelight
e9c93f9c0c
(svn r1817) -Codechange: Moved depot-functions to depot.c
...
-Codechange: Added wrappers around depot-access (GetDepot no exists)
-Codechange: Made depot-functions a bit more logic (no longer
GetDepotByTile crashes your game when you request it on a non-depot tile)
-Add: made depots dynamic (yes, 64k depots are possible now)
20 years ago
tron
f0f85a7ef3
(svn r1803) Move debugging stuff into files of it's own
20 years ago
tron
4b71f9126e
(svn r1798) GetFoo(i)->index is per definition i, so replace the former with the latter
20 years ago
darkvater
b64c375f2f
(svn r1750) - Feature: [ 1093261 ] Saving vehicle sorting criteria for each vehicle type (bociusz)
20 years ago
bjarni
e006f89aa3
(svn r1652) Fix: train and road vehicle lists are now redrawn when vehicles enters/leaves a depot (Hackykid)
...
fix: the ship status bar was not updated properly after a breakdown if show_speed was off (Hackykid)
20 years ago
darkvater
085563653f
(svn r1478) -Fix: [1099195] mouse-wheel in train replace window. Scrollbar1 and Scrollbar2 now work independently. You can only scroll on list and scrollbar itself; scrollbar must be next widget of the list.
...
-Fix: updated the few gui's that didn't have the scrollbar right after the listbox.
20 years ago
darkvater
83b2abb6d6
(svn r1466) -Fix: oops, depot windows can of course also scroll horizontally. Thanks si-m1.
20 years ago
darkvater
fae367ab31
(svn r1464) -Fix: [1099106] Resizeable portion of bus/air/rail depots window unclickable
20 years ago
darkvater
1261a44cec
(svn r1463) -Fix: [1099451] Game crashes after the click on Rename (see also Bug 10992). There was no check for non-selected engine
20 years ago
truelight
63e97754fb
(svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns and _industries
...
(in prepare of dynamic arrays):
- DEREF_XXX is changed into GetXXX
- All direct call are directed via GetXXX
- struct Industry has now an index-field
- ENUM'd some stuff
- Replaced home built loops with FOR_ALL_XXX
- Added _stations_size, _vehicles_size, ... which gives the length of the
array (which will be dynamic in the near future)
- Changed lengtof(XXX) to _XXX_size (e.g. _stations_size)
- Removed all endof(XXX) (because mostly it was part of a FOR_ALL_XXX)
- Made the sort-functions of all 4 dynamic
- Made all 4 Initialize functions more of the same
- Some minor tab-fixing and stuff
(tnx to Tron for proof-reading my 100kb patch ;))
Note for all: please do NOT directly call _stations, _vehicles, _towns and
_industries, but use the right wrapper to access them. Thank you.
Ps: please also do not use 'v++', where v is of type Vehicle *.
20 years ago
darkvater
4c5f6fe360
(svn r1379) -Fix: various GUI glitches. Added default sizes to various widgets. Sticky/Resize- and Scrollbar must be 11 pixels wide, Horizontal scrollbar 11 pixels high, caption must be 13 pixels. I hope I didn't forget any widgets, the game will assert for that so report them to me!
20 years ago
truelight
27df6c86fc
(svn r1372) -Fix: fixed some GUI glitches introduced with resize-buttons
20 years ago
tron
39bb863024
(svn r1359) Fix typos in last commit
20 years ago
tron
2f2688b829
(svn r1358) Assert bounds of depot list when searching for a depot
20 years ago
truelight
a94fe04a9a
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
...
how the system works. All useful windows are already made resizable. Enjoy :)
-Fix: fixed some GUI-glitches and flaws along the way
20 years ago