Commit Graph

69 Commits (75d8a724fa91d549a11c1ab02495bc2c54a21129)

Author SHA1 Message Date
rubidium 21ac20aeca (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
-Cleanup: whitespace alignment of a few tables.
18 years ago
rubidium 86dc219b4b (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc. 18 years ago
truelight 44e5e7f0e4 (svn r6137) -Codechange: some very minor cleanups:
- Start using DeleteXXX for every pool item, not manually doing it
  - Use some wrapper to improve logic
  - Rewrote some pieces to improve logic
18 years ago
truelight b7cce084e2 (svn r6049) -Codechange: forgot EngineRenew in r6047
-Codechange: cleaned up the EngineRenew code a bit (coding style mostly)
-Codechange: forgot the correct comment in station_cmd
-Codechange: move pool-stuff to engine.h, like we always do
18 years ago
rubidium 908d3bcfe6 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 18 years ago
rubidium 6fb092aa7a (svn r5999) -Feature: change the original date format to a 32 bits format based at the year 0.
The game date subsystem now allows someone to start in the year 0 and continue
up to the year 5 000 000. However, you currently cannot build anything before 
1920 as there is no newgrf support for dates before 1920 or after 2090 yet.
18 years ago
rubidium f4762cdae4 (svn r5919) -Cleanup: use the type Date when the variable really is a date 18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
tron 44829a401c (svn r5262) Add symbolic names for the aircraft subtypes. not perfect, but better than raw numbers 18 years ago
peter1138 6e064cc642 (svn r5201) - NewGRF: add loading of default refit costs. This information is not yet used 18 years ago
peter1138 20cdd71c9f (svn r5105) - NewGRF: Move callbackmask from *VehicleInfo to EngineInfo. This simplifies code that works with more than one vehicle type. 18 years ago
belugas 69f47611db (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
Clearing engine and newgrf_engine from cargo related structures.
Apart from moving stuff cargo related, there is nothing really newcargo for now.
18 years ago
peter1138 0194a3da1e (svn r4901) - Codechange: change 'SpriteGroup *' to 'struct SpriteGroup *' within StationSpec and GRFFile struct declarations. Now only code which actually references those pointers needs to know about the SpriteGroup struct. Remove some unnecessary lingering header dependencies. 18 years ago
peter1138 7fb02749ac (svn r4896) - NewGRF: add support for vehicle property 0x25 (user defined data) used by variable 0x42. 18 years ago
peter1138 7a91a966ea (svn r4738) - Newstations: attach all sprite group cargo types, not just the default and purchase pseudo types, to a station spec. 18 years ago
peter1138 eb15688358 (svn r4201) - Codechange: Do for _engine_info[] what we do for _*_vehicle_info[]; create and use a function to retrieve data, and ensure constness. 19 years ago
Darkvater e91fa54a15 (svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type. 19 years ago
peter1138 058ccfb157 (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
peter1138 2e2ed81e40 (svn r3684) - NewGRF: Support loading of miscellaneous flags (not used yet) 19 years ago
peter1138 ee9f64ecf4 (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 8caedb4898 (svn r3586) - NewGRF: Load callback masks for all vehicle types. 19 years ago
peter1138 6c28b1cec7 (svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files. 19 years ago
peter1138 2222907a40 (svn r3396) - Autoreplace changes:
- Change fixed array per player to a single pool. This avoids future problems
    with vehicle numbers and decreases savegame size. Engine replacements from
    previous savegames will be lost.
  - Move engine replacement code from players.c to engine.c.
                                      (thanks to blathijs for rewriting this)
19 years ago
peter1138 e1f9b72c82 (svn r3388) - NewGRF: Allow train running cost class to differ from engine class. Also fix typo in r3384. 19 years ago
tron 318fe153eb (svn r3365) Staticise 36 functions 19 years ago
peter1138 0fbb9815ba (svn r3316) - NewGRF: Unload engine names before loading grf files. This fixes names in climates where the engines don't get loaded. Renamed function to reflect its purpose. 19 years ago
tron 49f0691c1a (svn r3308) BAD
foo.h: int bar;

GOOD
foo.h: extern int bar;
foo.c: int bar;
19 years ago
peter1138 34c503cabf (svn r3148) -NewGRF, Feature: Add support for cargo refitting specification by cargo classes. 19 years ago
peter1138 0d9379f904 (svn r3139) -NewGRF, Feature: support for articulated rail vehicles. This is used, for example, by coal tenders. 19 years ago
peter1138 3931d8ef5c (svn r3071) -NewGRF: Add support for rail vehicle weight greater than 255 tons. 19 years ago
tron 24253c17cc (svn r3059) Use bitfields to encode railtype and climates of engines instead of manual shifting/anding 19 years ago
peter1138 13d02ca965 (svn r3017) -NewGRF: Implement sprite group unreferencing and unloading. 19 years ago
tron 0ad3902acf (svn r3003) Change int, uint, uin16 and byte to EngineID where appropriate, plus some related changes (mostly casts) 19 years ago
peter1138 9e20ae4222 (svn r2990) Remove _engine_original_sprites and replace all uses with references to our (new) original engine/vehicle tables. 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 4a58250cb9 (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
truelight 3988e173f8 (svn r2857) -Fix: PlayerID is not a valid type for a player-bit-field. Partly reverted r2290 19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 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 62b5e913c6 (svn r2504) Move Draw*EngineInfo to engine_gui.c to reduce dependencies 19 years ago
tron d2364f1d51 (svn r2432) Use GetEngine() instead of DEREF_ENGINE() or even _engines[] 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
hackykid f847736b5d (svn r2415) - Fix: [newgrf] Powered Wagons - Don't assume an undefined callback will fail. 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
hackykid 799e1f5c50 (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
- Feature: [newgrf] Implement the 'refit capacity' callback.
19 years ago
Darkvater 7470322a3d (svn r2306) - CodeChange: Check the last commands; refits. This needed an extensive rewrite and global/local-cargo ID juggling and bitmasking. However with this done it looks better as well and is compatible with newgrf handling. Big thanks to HackyKid for doing most of the work. This also closes patch "[ 1199277 ] Command checks" 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
tron ca3ccff729 (svn r1981) Typedef some structs and enums 20 years ago
tron eea2dc6c78 (svn r1979) Const correctness 20 years ago