Commit Graph

195 Commits (a9d33943d734671990920fc093d0025845479370)

Author SHA1 Message Date
tron 116fb6dff6 (svn r3714) Add functions to turn tiles into water and shore tiles 19 years ago
tron 7b106a3d8f (svn r3697) Rename DIAG1/DIAG2 to X resp. Y as this conveys a bit better in which direction a pieces of rail goes 19 years ago
tron b8b6084da2 (svn r3644) Don't use FindLandscapeHeightByTile() when it's overkill - often it was just a complicated way of writing GetTileSlope(tile, NULL) 19 years ago
Darkvater bf27f0c77b (svn r3627) - Change all hardcoded 255 max-saveload versions with the define SL_MAX_VERSION 19 years ago
tron 7692556c62 (svn r3613) Some more const, indentation, whitespace and similar stuff 19 years ago
peter1138 95ce125633 (svn r3612) - RoadStop->slot[] stores a vehicle index. Adjust its type and use INVALID_VEHICLE instead of nonsense INVALID_SLOT. 19 years ago
tron d9a5483d1a (svn r3582) Restructure MoveGoodsToStation() to avoid double bookkeeping of StationIDs and station pointers 19 years ago
tron d0a84a4cb9 (svn r3581) Just noticed the indentation was totally off, fix it 19 years ago
tron 0a7b664ae5 (svn r3580) Some small cleanups before the real change, especially reduce the indentation by one by using continue 19 years ago
tron 087fe86ed2 (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 a3c14182d3 (svn r3530) - NewGRF: Move station resolver to newgrf_station 19 years ago
tron 1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
tron 9712d6f639 (svn r3510) Fiddle with whitespace and parentheses 19 years ago
Darkvater 4014e36aec (svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it in branch/pbs. This reverts revisions r3158, r3140, r3075, r2977, r2674, r2625, r2621, r2529, r2528, r2525, r2524, r2519, r2517, r2516, r2507, r2499. (in conjunction with Tron)
- The only change is that the nsignalsw.grf file is kept and that existing nightlies with PBS signals get those signals converted to combo-signals.
19 years ago
peter1138 d639318abd (svn r3372) - Fix: update signal states when building or removing rail station blocks 19 years ago
tron 318fe153eb (svn r3365) Staticise 36 functions 19 years ago
tron ed4b89ee36 (svn r3353) Simplify the automatic length adjustment algorithm for replacing trains: Use the length of the train before the replacement as reference length 19 years ago
truelight a980ddc219 (svn r3341) -Codechange: make mingw32 happy, and renamed Rectangle, because it already exists on that platform 19 years ago
tron d5aa95b87e (svn r3313) Remove GPMI related changes from trunk
Revisions in detail: 2542, 3226 (partial), 3229, 3231, 3232, 3238, 3242-3245, 3251, 3253, 3260, 3263, 3265, 3266, 3269, 3277, 3278, 3279, 3283 (partial), 3304, 3305, 3306
19 years ago
truelight 6ca528ec82 (svn r3305) -Rename: Changed all instances of ottd_ related to the AI to ttai_ 19 years ago
tron 9822b4d755 (svn r3297) Staticise 19 years ago
peter1138 80986fcd32 (svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed() 19 years ago
truelight 8315736569 (svn r3232) -Add: implemented the event-system for AIs
-Add: added several hooks (event-callbacks) for road-related-stuff
19 years ago
truelight 898bb915ac (svn r3227) -Codechange: [Savegame] removed 'minor' version, and renamed 'major' version to just: version. 19 years ago
bjarni 16e65960b9 (svn r3218) -Feature: Multiheaded train engines will now stay in the same train
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead
	This fixes the assert when moving multiheaded engines (introduced in r3144)
	Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs

-Codechange: train subtype is now a bitmask
	This allows fast access to info like if it is a wagon or engine and if it is in front and so on
	Note: savegame version bump
19 years ago
peter1138 2a9d325930 (svn r3213) - Codechange: Clean up handling of road stops, avoiding unnecessary use of pointers and using the *BIT() macros. 19 years ago
tron 3c0179dd07 (svn r3202) If cascade -> switch 19 years ago
tron 8a3587fa28 (svn r3185) const 19 years ago
tron 84a16a0b30 (svn r3184) GB/SB 19 years ago
tron 0e075e271e (svn r3182) Fix braino in r3181 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
tron 53f00c8f9d (svn r3173) Use the trinary operator and switch to improve readability
Also align short cases nicely
19 years ago
tron 81e5b16d71 (svn r3172) static, const 19 years ago
peter1138 12009af1c5 (svn r3167) - NewGRF: Start moving custom station code to separate files.
Rewrite handling of station classes.
          Allow for more than 8 station tile layouts.
          Start of code to unload custom stations.
19 years ago
peter1138 ce9f2fe823 (svn r3166) Constify read-only accesses of custom stations 19 years ago
bjarni df6c48fdba (svn r3155) -Feature: [autoreplace] autoreplace can now remove cars from too long trains
-Trains will now remember the length of stations it visits and sell cars
        when being autoreplaced if they became too long
        -If it needs to remove cars, then it starts from the front and sells
        all it can find until the train is short enough
        -This only works for trains, that knows the station length of the route
        so a full uninterrupted run is needed
        -a train needs 1-2 runs to detect if the shortest station is expanded
        -This feature can be turned on and off in the train replace window
        and each company can have it's own setting
        -NOTE: minor savegame version bump
19 years ago
tron 181d586a7c (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 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 71d293f2a3 (svn r3066) Constify the parameter of GetSlopeZ_*() 19 years ago
tron e3d1e43559 (svn r3049) Replace byte/int/uint by RailType where appropriate 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 f556128dde (svn r3030) More work for GB/SB, this time concerning the waiting_acceptance attribute of stations 19 years ago
tron 7ab7d79190 (svn r3028) s/255/OWNER_SPECTATOR/ 19 years ago
tron 8980891b09 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 19 years ago
tron 39f5dbfd3b (svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SB 19 years ago
peter1138 4879e04986 (svn r3015) -NewGRF: Add a new sprite group result type, and support loading of callbacks results within random and "real" groups. (Not fully supported yet.) 19 years ago
peter1138 e8bca26b74 (svn r3014) -NewGRF, Codechange: Make all sprite group references be pointers instead of copying the data around. 19 years ago
tron 90e33aed22 (svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate 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
Darkvater 3907e46939 (svn r2953) - Fix: [ 1257766 ] Cannot make ships go to an oil platform (oilrig has no station). While it is still possible that oilrigs end up without a station, it is only the case where no more stations can be built at all 19 years ago