Commit Graph

204 Commits (0d459f909cefe93e20f606dca9b576881dfc4704)

Author SHA1 Message Date
peter1138 5e3dd8dd78 (svn r5105) - NewGRF: Move callbackmask from *VehicleInfo to EngineInfo. This simplifies code that works with more than one vehicle type. 18 years ago
celestar 25a63ec7af (svn r5070) Merged the bridge branch
-Feature: Bridges can now be placed above:
	Any railway track combination (excluding depots and waypoints)
	Any road combination (excluding depots)
	Clear tiles (duh), including fields
	Tunnel entrances
	Bridge heads

Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing

There are still a number of visual problems remaining, especially when electric railways are on or under the bridge.
DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
18 years ago
celestar c1983c3d02 (svn r5055) -Fix: Correct some errors in the bridge sprite numbers 18 years ago
tron 2a3aca6139 (svn r4920) Remove parameters, which get only used in certain functions, by splitting those functions.
At least in the case of checking for oil industry restrictions this makes the check conditions more clear.
18 years ago
peter1138 5a65e3301e (svn r4896) - NewGRF: add support for vehicle property 0x25 (user defined data) used by variable 0x42. 18 years ago
celestar 5c677d49f4 (svn r4639) -Feature: Turkish town names (jnmbk) 18 years ago
belugas 7ab8b20faf (svn r4614) CodeChange : Cleanup of industry_cmd (Step-4).
Removing the _industry_type_costs in favor of IndustrySpec.cost_multiplier;
In order to let industry_gui use the GetIndustrySpec accessor,
some structs had to be moved in industry.h
18 years ago
belugas 6a31b30a20 (svn r4584) CodeChange : Cleanup of industry_cmd (Step-3).
Renaming GetIndustrySpecification to GetIndustrySpec. Looks better.
Removing the _industry_prod_up/down/close_strings
in favor of IndustrySpec.closure/production_up/down_text;
A few reformatting along the way.
Work of tfc_team
18 years ago
belugas 8d622e04f8 (svn r4578) CodeChange : Cleanup of industry_cmd (Step-2).
Removing the _industry_min_cargo[] in favor of IndustrySpec.minimal_cargo,
IndustrySpec.a,b,c are now conflicting[], add an enum for IndustrySpec.checkproc
Work of tfc_team
18 years ago
belugas 8443f43d1f (svn r4577) CodeChange : Cleanup of industry_cmd (Step-1).
Add an accessor to _industry_specs array.
Work of tfc_team
18 years ago
belugas ebf6797678 (svn r4568) CodeChange : Bring definitions and uses of DrawTypesStructures toguether. 18 years ago
belugas 4f81210980 (svn r4564) CodeChange : Constify the sprites of _cargo_types_base_values 18 years ago
belugas c0acac3a14 (svn r4513) Codechange : Assemble a bit the scattered parts of Cargo types. 18 years ago
Darkvater e21b7eebfa (svn r4430) - NewGRF: Use the bridge's sprite layout for drawing high pillars. This fixes newgrf's high-bridge pillars drawing. Also remove the now obsolete _bridge_poles_table which was already integrated into the bridge sprite tables 18 years ago
celestar bdcb4bbf1d (svn r4384) -Codechange: rail drawing code
-Added a function to obtain the axis of a waypoint
    -Moved the waypoint layout tables from the depot layout tables into an own one
    -Use GetRailTileSubtype
18 years ago
celestar eae5fcc455 (svn r4345) -Codechange: Similar to airport tiles, rename _industry_map5_ arrays to _industry_sections 19 years ago
celestar 0c3a0c7ec0 (svn r4283) -Cleanup: More elrail housekeeping, remove code dublication, more meaningful variable names, simplify control flow.. 19 years ago
celestar 4ccbf2d807 (svn r4282) -Cleanup: Re-arranged the ignore groups into a more readable arrangement 19 years ago
celestar 4acb8d5364 (svn r4281) -Cleanup: Begun cleaning up elrail code a bit, mostly comments and enum/array alignment 19 years ago
celestar 52892863e5 (svn r4278) -Fix: changed char to uint8 because signedness of char is undefined. Thanks to KUDr and Tron for research and stuff. (FS#98) 19 years ago
celestar a7d8ad0004 (svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas. 19 years ago
belugas 26a5b62865 (svn r4092) CodeChange : Named sprites instead of magic numbers plus create/use helper macro/enum for recoloring scheme 19 years ago
belugas 3b16ae365b (svn r4004) -CodeChange : Renaming sprites and functions 19 years ago
belugas 7bedab1a40 (svn r3991) -Fix : Last remaining separation of SpriteID from Palette 19 years ago
tron 85da306049 (svn r3982) Fix last commit. I got confused by some strange test, which did nothing 19 years ago
tron f262ae6c8b (svn r3889) Change a part of the bridge drawing code to make it more comprehensible and add the needed accessors 19 years ago
peter1138 741fc26522 (svn r3717) - [2cc] Add 2cc colour maps and use for newgrf engines requiring them. Currently the second colour is fixed to be the player's colour. 19 years ago
bjarni 7a31bb6fb6 (svn r3707) -Fix: made the generated Finnish town names sound more Finnish (ln-)
note: <ln->     Bjarni: please go ahead and commit it, i'll take the responsibility if something should go wrong.
19 years ago
peter1138 5e05cd4098 (svn r3685) Include a file missed from r3684... 19 years ago
peter1138 601b226f04 (svn r3602) - Move _railveh_score data to _rail_vehicle_info->ai_rank and remove global variable to return data as we can now access this directly. 19 years ago
peter1138 67573ed605 (svn r3586) - NewGRF: Load callback masks for all vehicle types. 19 years ago
tron 453b30e387 (svn r3564) Several smaller changes:
- Don't treat non-booleans as booleans
- Reduce variable scope
- Bracing
- Use DeMorgan's law to make conditionals easier to read
- if cascade -> switch
- Replace some magic numbers by symbolic names
- Avoid assignments within other statements
19 years ago
peter1138 6823be9d03 (svn r3523) Undefine helper macros after using them 19 years ago
peter1138 78c2b9a056 (svn r3522) - Wrap the vehicle info tables with a macro to simplify adding new fields in the future. 19 years ago
tron 22dc05faf2 (svn r3510) Fiddle with whitespace and parentheses 19 years ago
Darkvater 051c5da378 (svn r3464) - Fix: restate some of the sprites in their old spaces. Was missed out because the patch was so huge. Thanks to Tron for pointing out the command of diff to ignore whitespace-only changes (--diff-cmd diff -x -ub) 19 years ago
Darkvater 1a2fac805c (svn r3447) - CodeChange: [ 1360866 ] station_land.h Naming ALL sprites. Also replaced the SPTR_STATUE_GROUND by the more obvious SPR_CONCRETE_GROUND in unmovable_cmd.c. No functional changes except for commenting out PALETTE_RECOLOR_SPRITE in table/sprites.h. (Belugas) 19 years ago
peter1138 e81c316134 (svn r3388) - NewGRF: Allow train running cost class to differ from engine class. Also fix typo in r3384. 19 years ago
tron 3561a3068e (svn r3314) Add 2 times static 19 years ago
tron 23bfc03054 (svn r3297) Staticise 19 years ago
tron 2dc8e0c3d9 (svn r3289) 32 times static 19 years ago
Darkvater bfeddf1db1 (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 ce9cbb9c47 (svn r3196) Use structs instead of magic offsets into arrays 19 years ago
tron 8d57bfc921 (svn r3195) Use bitfields instead of explicit shifting/masking 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
peter1138 bc25cd89bf (svn r3148) -NewGRF, Feature: Add support for cargo refitting specification by cargo classes. 19 years ago
tron d42b7649a4 (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 7c40462d24 (svn r3125) Symbolic names for skiping sprites and the end of the sprite list 19 years ago
tron 94e09ba605 (svn r3118) Name 3 palette modifiers properly (belugas) 19 years ago
tron f6fdb150e7 (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 c1c086d9a0 (svn r3108) Confine the use of SPR_OPENTTD_BASE to table/sprites.h by adding/using some sprite enums 19 years ago
Darkvater b5583659e0 (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 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 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 758ae7e8f6 (svn r3064) Replace some numbers by sprite names 19 years ago
celestar cb67ee9bf5 (svn r3063) -Codechange: Demystified and commented bridge_land.h. Also removed two arrays that are not referred to 19 years ago
tron f3de172560 (svn r3059) Use bitfields to encode railtype and climates of engines instead of manual shifting/anding 19 years ago
tron b537cc6618 (svn r3050) Augment the rail vehicle table with symbolic names for dual-head engines and wagons 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 f97d1274bc (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 7520ef8f33 (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 03e947cbfe (svn r3035) Augment the engine table with symbolic names for rail types and climates 19 years ago
peter1138 2314431a59 (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 2525e1d507 (svn r2957) - Feature: [ 1263280 ] Danish town names (fey_dk) 19 years ago
tron baca040df0 (svn r2815) Store the currency information in one central place instead of scattering it in several unrelated files 19 years ago
ludde 29564f9fcf (svn r2781) Fix some of the issues with variables in .h files. 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
celestar 04f4d8237b (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 201990b5d9 (svn r2704) Remove . from include path again, too much trouble. Also add some #ifdefs and #includes for the Windows build 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
tron 07a6e612ec (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 18a93cca3d (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 448467a9a1 (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 83f72f696a (svn r2534) Small cleanup 19 years ago
hackykid fbe617baba (svn r2532) - Fix: Don't waste space using an int where a byte would suffice. (ludde) 19 years ago
hackykid 60ddaf95f0 (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 b872cf7f7b (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 9d75047211 (svn r2497) Use a struct array for palette entries instead of a flat byte array 19 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)
19 years ago
Darkvater 7dd5578477 (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 fd80208af9 (svn r2421) - how come you didn't get committed you evil file? Be gone! 19 years ago
Darkvater 5fed47964e (svn r2420) - Codechange: magic number elminitation of cursorsprites. 19 years ago
hackykid 1018d3b786 (svn r2414) - Feature: [newgrf] Implement powered wagons, and the callback that goes with it. 19 years ago
hackykid ad2eef0a30 (svn r2401) - Fix: [newgrf] Finish up callback mechanism, implement 'refit capacity' callback slightly more correct. 19 years ago
Darkvater b438b1248c (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 19 years ago
Darkvater 5e6923e936 (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 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)
19 years ago
Darkvater a1143a53f0 (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 f35b59aded (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 7da3b3b92d (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 2423eaac2c (svn r2048) -Fix: deleted a word somehow :s (Tnx Tron!) 20 years ago
truelight 83637d164e (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 9bc68d209f (svn r1977) Typedef some enums and struct plus some minor style changes 20 years ago
pasky 750a265531 (svn r1975) Minor tweaking of the Czech name generator tables. 20 years ago
pasky feb907d225 (svn r1949) Fixed the CzechChoose usage in the Czech word tables. Now selecting colours actually works. 20 years ago
pasky bb5b89eb26 (svn r1948) Add an explicit copyright notice regarding the Czech town names generator and an offer to help. :-) 20 years ago
pasky fb98c932b2 (svn r1931) Added Krystofova, Udoli and Hut. Zdar is s. masc., not s. neut. 20 years ago
pasky d0f9cc27a3 (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 01fd7eb861 (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