Commit Graph

97 Commits (c042fd3de3c3e3a8ceec1386d1dcc7ae9fad4a90)

Author SHA1 Message Date
tron e6b0b1e33d (svn r3050) Augment the rail vehicle table with symbolic names for dual-head engines and wagons 19 years ago
tron 53a4a6a0f4 (svn r3046) Replace some numbers with sprite names and fix a typo in the sprite list 19 years ago
tron 8d4ed0840b (svn r3040) Don't deduce the cursor sprites when building rails from magic numbers, but fetch them from the central rail info array. 19 years ago
tron 4529d1fc8e (svn r3037) Don't deduce the sprites for tunnels and level crossings from magic numbers, but fetch them from the central rail info array. This is a preparation step for electrified rails 19 years ago
tron 2f6f8215ac (svn r3035) Augment the engine table with symbolic names for rail types and climates 19 years ago
peter1138 aac5e2c131 (svn r2989) - Make engine/vehicle information tables constant. Duplicate them so NewGRF data can be loaded without wiping out the default data. 19 years ago
Darkvater 4d7e916a09 (svn r2957) - Feature: [ 1263280 ] Danish town names (fey_dk) 19 years ago
tron b62887b973 (svn r2815) Store the currency information in one central place instead of scattering it in several unrelated files 19 years ago
ludde 9a060a0f24 (svn r2781) Fix some of the issues with variables in .h files. 19 years ago
bjarni 059ae19626 (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
celestar fcd012e7ec (svn r2736) -Codechange: De-mystified GfxDrawFillRect a bit, and used enums from table/sprites.h. You can now change the number of bits used for sprites and switches in the SpriteSetup enum and the rest should work automagically. Can be used to increase the number of active sprites to 2^19 in case there are no colortables (recolor sprites) in any newgrf. We should possibly move the the colortables to an own list, but how to detect them in a newgrf. 19 years ago
tron 2faf06f4cd (svn r2704) Remove . from include path again, too much trouble. Also add some #ifdefs and #includes for the Windows build 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
tron 126fed74d6 (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
This results in shorter and hopefully easier to maintain files.
Note: I had to change paths in #include statements of some unrelated files, because I added the ottd base directory to the include path (-I.)
19 years ago
celestar 7bce410f61 (svn r2657) -Codechange: The available railtypes per player are now a bitmask, so
that railtypes do not be in ascending order of appearance. Allows easier
implementation or more railtypes
19 years ago
celestar c6dccce69e (svn r2639) -Add: Added the vehicle names in table/engines.h so that you know what line represents what vehicle (I hope I didn't mess that up). Added some comments while I'm at it and include the table/ directory in the Doxygen generation 19 years ago
tron 11421beed1 (svn r2534) Small cleanup 19 years ago
hackykid dad7e8f486 (svn r2532) - Fix: Don't waste space using an int where a byte would suffice. (ludde) 19 years ago
hackykid ab9c6f126d (svn r2516) - Feature: [pbs] Implement path-based-signalling. This allows multiple trains within the same signal block, provided their paths dont intersect. For this the block must have all exit and entry signals be pbs signals. Place these by ctrl-clicking 4 times on a normal signal.
- Feature: [pbs] Implement autoplacement of pbs blocks, when a block has an entry and an exit pbs signal, covert the entire block to pbs. Can be turned off in the patch settings.
 - Feature: [pbs] Allow showing of reserved status by making the tracks darker, when the pbs debug level is at least 1.
19 years ago
celestar d07e1a875e (svn r2515) -Codechange: Removed a good deal of magic sprite numbers in the rail drawing code, and placed neatly into arrays and enums. This also makes way to implement more railtypes without having to do tons of ugly hacks. 19 years ago
tron 6319c11b1f (svn r2497) Use a struct array for palette entries instead of a flat byte array 19 years ago
hackykid daae0d315a (svn r2428) - Feature: [newgrf] Implement shorter train vehicles (Therax), and the callback that goes with it.
- Codechange: Remove some magic numbers (PALETTE_CRASH)
19 years ago
Darkvater 4198418d77 (svn r2424) - Fix: backport the smallmap_gui.c changes from the map/ branch into trunk. This also implicitely fixes the bug where the game would crash in certain resolutions with certain minimap masks when dragged partly outside the game-area. 19 years ago
Darkvater 095cdb9df1 (svn r2421) - how come you didn't get committed you evil file? Be gone! 19 years ago
Darkvater c3c69ff5cb (svn r2420) - Codechange: magic number elminitation of cursorsprites. 19 years ago
hackykid 26e87892e2 (svn r2414) - Feature: [newgrf] Implement powered wagons, and the callback that goes with it. 19 years ago
hackykid 52ebf02f2f (svn r2401) - Fix: [newgrf] Finish up callback mechanism, implement 'refit capacity' callback slightly more correct. 19 years ago
Darkvater ba8c649fac (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 19 years ago
Darkvater b43331c931 (svn r2290) - CodeChange: protect the next batch of commands. This brings us to a total of 61, which is 53% :)
- CodeChange: To correctly accept engine-prototypes, the best-player checking has been moved to its own function, I hope it functions the same as before.
- CodeChange: Added symbolic types of PlayerID, OrderID and EngineID. For engines also added GetEngine() and IsEngineIndex(), similar to the other such functions.
- CodeChange: To correctly build industries, some tables have been moved to build_industry.h. The only way to find out currently if an industry is valid in a climate is by looping all industries and checking if it matches. Also to comply with the patch setting build_rawmaterial_industries, it is assumed that these industries do not accept any cargo of any type. This can and probably should changed in the future to some flag in their struct. Also use _opt_ptr instead of _opt.
- CodeChange: implemented the HQ checking code inspired by MarkR2 in "[ 1190944 ] Many commands not checked for security".  Unfortunately it is impossible to prevent only deleting a HQ by a modified client atm.
- CodeChange: For insert order and modify order their parameters are implicitely truncated to 8 bits, instead of the 16 bits said in the comments.
19 years ago
Darkvater 6d349b6284 (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)
19 years ago
Darkvater e9f8449d55 (svn r2229) - Fix: [ 1188777 ] Non-existing sprite #5125 (presignal). The DOS grf file trgi.grf has 6 less sprites than the windows one. This results in some segfaults for certain sprites. Fixed it by added a dummy grf file consisting ofr 6 sprites and loaded when using DOS gfx at the appropiate place. 19 years ago
Darkvater b05713285e (svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
- Fix: 'L' no longer opens ingame terraform bar in scenario editor bar, but the land generator one
- Feature: [ 1095110 ] Create Lake and draggable Create Desert tools (initial implementation GoneWacko), also added sticky buttons to land generator and town generator
- CodeChange: moved around some of the draggable tools, demystifying them
- CodeChange: change CmdBuildCanal to allow for XANDY dragging not only X or Y (only scenario editor)
- CodeChange: add some more enums to sprites.
- TODO: merge most of the ingame and scenario editor land terraform code. This can only be done after OnClickButton function is changed so it also includes the backreference to the widget being clicked, postponed to after 0.4.0
20 years ago
Darkvater 4089c85653 (svn r2066) - Fix: [ 1164248 ] game crash while AI builds bridge. Also protect bridge building against invalid bridges and some safeguards when drawing. 20 years ago
truelight 1b2aaed4ad (svn r2048) -Fix: deleted a word somehow :s (Tnx Tron!) 20 years ago
truelight d1e158d6f7 (svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.h
-Codechange: rewrote some functions while moving waypoint-stuff
-Add: added support for 64k waypoints
-Fix: made the waypoint struct a bit more logic (no bit-fucking)
20 years ago
tron 0f44f9af60 (svn r1977) Typedef some enums and struct plus some minor style changes 20 years ago
pasky 5420bd97da (svn r1975) Minor tweaking of the Czech name generator tables. 20 years ago
pasky 274f19a2bf (svn r1949) Fixed the CzechChoose usage in the Czech word tables. Now selecting colours actually works. 20 years ago
pasky 18821a1fa3 (svn r1948) Add an explicit copyright notice regarding the Czech town names generator and an offer to help. :-) 20 years ago
pasky 0566d80b16 (svn r1931) Added Krystofova, Udoli and Hut. Zdar is s. masc., not s. neut. 20 years ago
pasky c91d290e67 (svn r1929) Feature: [namegen] Support for dynamic generation of the Czech town names.
The static names are still used in 1/4 of cases. I think the tables for
dynamic generation must look pretty spectacular. :-) New stems are still
needed and there can be occasional glitches, please let me know.

I guess that this method of dynamic generation could be used for at least
Slovak town names, too. And possibly other Slavic languages?
20 years ago
pasky e6db813ec9 (svn r1926) Codechange: Renamed some of the predefined town names arrays for consistent naming.
- name_spanish_1, name_french_1, name_czech_1, name_romanian_1, name_finnish_1
  and name_german_hardcoded were renamed to *_real.
- name_slovakish_1 was renamed to name_slovak_real.
- name_finnish_2[ab] was renamed to name_finnish[12].
- Added comment near the town_names setting definition about the "Slovakish"
  pigginess.
20 years ago
tron 690dd5555c (svn r1903) Replace some casts and macro magic with proper typing, similar to r1902 20 years ago
tron 70135e74b5 (svn r1902) Replace some casts with proper typing 20 years ago
tron 391cd5658f (svn r1875) Effect vehicle overhaul: enumerate sprites, descriptive names for functions and miscellaneous improvements 20 years ago
tron 8391c96fac (svn r1868) Improve readability of the bulldozer movement code 20 years ago
matthijs eb78cdb2d4 (svn r1751) - Feature: New PathFinder (NPF).
- Supports trains, road vehicles and ships.
	- Uses A* pathfinding (same codebase as the new ai).
	- Currently unlimited search depth, so might perform badly on large maps/networks (especially ships).
	- Will always find a route if there is one.
	- Allows custom penalties for obstacles to be set in openttd.cfg (npf_ values).
	- With NPF enabled, ships can have orders that are very far apart. Be careful, this will break (ships get lost) when the old pathfinder is used again.
- Feature: Disabling 90 degree turns for trains and ships.
	- Requires NPF to be enabled.
	- Ships and trains can no longer make weird 90 degree turns on tile borders.
- Codechange: Removed table/directions.h.
	- table/directions.h contained ugly static tables but was included more than once. The tables, along with a few new ones are in npf.[ch] now. Better suggestions for a location?
- Fix: Binary heap in queue.c did not allocate enough space, resulting in a segfault.
- Codechange: Rewritten FindFirstBit2x64, added KillFirstBit2x64.
- Codechange: Introduced constant INVALID_TILE, to replace the usage of 0 as an invalid tile. Also replaces TILE_WRAPPED.
- Codechange: Moved TileAddWrap() to map.[ch] 
- Add TileIndexDiffCByDir(), TileIndexDiffCByDir(). 
- Codechange: Moved IsTrainStationTile() to station.h
- Add: IsRoadStationTile() and GetRoadStationDir().
20 years ago
tron eaf4c8bd2e (svn r1589) Adapt the AI to a slight behavior change of CmdBuildSignals() introduced in r1585 20 years ago
dominik f7e39977de (svn r1571) Feature: Visually enhanced autorail placing
When using the autorail tool, the rail pieces which are going to be build are highlighted.
If a piece is shown in red, this indicates that the slope/rail combination is impossible. It does not tell you if the rail line construction might not be possible because of other obstacles, e.g. houses or water.
20 years ago