peter1138
e1f9b72c82
(svn r3388) - NewGRF: Allow train running cost class to differ from engine class. Also fix typo in r3384.
19 years ago
tron
e62c3e6f39
(svn r3314) Add 2 times static
19 years ago
tron
9822b4d755
(svn r3297) Staticise
19 years ago
tron
17aab1797b
(svn r3289) 32 times static
19 years ago
Darkvater
d85b9bde49
(svn r3254) - Fix: graphical glitch with autorail tool on a certain tile-type.
...
- CodeChange: adhere the global variables in autorail.h to the coding style (eg. start with underscore).
19 years ago
tron
3bdb92446c
(svn r3196) Use structs instead of magic offsets into arrays
19 years ago
tron
db012c135e
(svn r3195) Use bitfields instead of explicit shifting/masking
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
peter1138
34c503cabf
(svn r3148) -NewGRF, Feature: Add support for cargo refitting specification by cargo classes.
19 years ago
tron
170de2019a
(svn r3135) Use symbolic names in the tables, which hold the information about accepted goods of industry tiles, instead of magic numbers
19 years ago
tron
47f0e22853
(svn r3125) Symbolic names for skiping sprites and the end of the sprite list
19 years ago
tron
6a585f5430
(svn r3118) Name 3 palette modifiers properly (belugas)
19 years ago
tron
c81119b371
(svn r3114) Close two gaps in the sprite array when loading openttd.grf. That's seven more free sprite slots, yay!
19 years ago
tron
3a925e230f
(svn r3108) Confine the use of SPR_OPENTTD_BASE to table/sprites.h by adding/using some sprite enums
19 years ago
Darkvater
7a09fffa3a
(svn r3102) - Fix (regression): Newly added sprite had problems when newgrf's where loaded. Thanks Tron for explaining what the problem was and how it should be solved.
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
0b936c3222
(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
b17b87469c
(svn r3064) Replace some numbers by sprite names
19 years ago
celestar
d50ef14992
(svn r3063) -Codechange: Demystified and commented bridge_land.h. Also removed two arrays that are not referred to
19 years ago
tron
24253c17cc
(svn r3059) Use bitfields to encode railtype and climates of engines instead of manual shifting/anding
19 years ago
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.
20 years ago