Commit Graph

44 Commits (688da1d9406cbd6fb359605de0d5c43c77f7a8ea)

Author SHA1 Message Date
Darkvater 7e4d0f112e (svn r6406) -Codechange: Rename TileOffsByDir to TileOffsByDiagDir because it accepts
DiagDirections, and add TileOffsByDir that handles Directions.
-Codechange: Make the treeloop use TileOffsByDir().
18 years ago
tron d5e5a78cf4 (svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
DestinationID being a union of these types is just hassle without benefit and cannot be handled correctly everywhere because of local lack of information
18 years ago
truelight 65f5ec13f6 (svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore)
-Codechange: introduced DestinationID, which is in fact an union of several types
  Used in Order struct, so no longer StationID is abused for all targets.
  Hangars are a big exception, as they use a station-id with GOTO_DEPOT (go figure)
18 years ago
truelight 15aff22c96 (svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 (or, will do that).
It isn't the best name, but we couldn't find any better.
  This unifies the pool-system even more.
18 years ago
truelight 505566da5c (svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips invalid ones
-Codechange: use IsValidXXX where ever possible
  Note: both changes to prepare for new pool system, which needs those changes.
  For every pool there are 2 ugly lines, which will be removed when done
  implementing new pool system.
  Based on FS#13 by blathijs, partly implemented.
18 years ago
rubidium 9fc837ad85 (svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
tron a2362674e3 (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 18 years ago
tron f1be69c47b (svn r5098) Do some manual CSE and replace a few magic numbers to improve the readability of the trolly AI 18 years ago
tron 864b0ede8b (svn r5097) -Fix: The trolly AI used information from the wrong industry when calculating the amount of to be transported goods 18 years ago
tron 36e31fa41f (svn r5092) -Fix: There was a gross race condition in the AI code which made it pretty random if the AI could give a new vehicle its orders 18 years ago
tron 3e5ef7319e (svn r5091) Remove duplicate code (same check twice) 18 years ago
tron d9e968e759 (svn r4943) uint tile -> TileIndex tile, byte player -> PlayerID player 18 years ago
tron 7ad49df54c (svn r4941) Replace some ints and magic numbers by proper types and enums 18 years ago
rubidium 2a337ab009 (svn r4789) - Codechange: rename RoadType to RoadTileType and ROAD_{NORMAL,CROSSING,DEPOT} to ROAD_TILE_* for consistency 18 years ago
tron aac74778c5 (svn r4553) int and magic numbers -> Slope and DiagDirection 18 years ago
celestar 65f759cbac (svn r4463) -Codechange. Include vehicle.h directly instead of implicitly via station.h in a number of source files 18 years ago
tron df0b45d608 (svn r4333) Revert back to a direct map access in one case until the exact conditions for this piece of code are investigated. The IsRoad() function is causing me headaches... 18 years ago
celestar 2ab5b8e666 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency 19 years ago
orudge ff3c61b011 (svn r4204) - Get trunk compiling again on OS/2 19 years ago
celestar c442586676 (svn r4154) -Moved MAX_BRIDGES in bridge.h and made it an enum. This makes two drops ... 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
tron c40740e058 (svn r4120) Use the new station functions where appropriate 19 years ago
tron f6285a659c (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile 19 years ago
tron 6e988259a4 (svn r3907) Replace many bridge related direct map accesses with calls to shiny new functions and mark some strange constructs with XXX 19 years ago
tron 0100871412 (svn r3830) Move IsTunnelTile() from tile.h to tunnel_map.h and add IsTunnel(), which just checks for a tunnel, but not the tile type as IsTunnelTile() does 19 years ago
tron 25606a2e0b (svn r3816) Use existing accessors 19 years ago
tron 8cfcdaa733 (svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends 19 years ago
tron 49cb8eb470 (svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends 19 years ago
tron 4efa560ffc (svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme 19 years ago
tron b26d54585f (svn r3660) Convert further road bits and type references to the functions/enums 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
tron 7692556c62 (svn r3613) Some more const, indentation, whitespace and similar stuff 19 years ago
Darkvater 44131d5416 (svn r3481) - Try and fix an svn discrepancy of trolly.h #2 19 years ago
Darkvater d774ae91ae (svn r3480) - Try and fix an svn discrepancy of trolly.h 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
Darkvater 573ce05eb8 (svn r3294) - Fix: use INVALID_STRING_ID instead of -1.
- Fix: savegames only give back one message, show this by ignoring the first argument. Perhaps make the message more verbose in the future by adding STR_ equivalents next to the already existing debug messages.
19 years ago
peter1138 80986fcd32 (svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed() 19 years ago
truelight e4cb8ed457 (svn r3226) -Fix: GPMI implementation had minor glitches
-Fix: the AI speed control is done by the AI-core, individual AIs don't have to do it (so, AIs were delayed twice ;)
-Add: Support for AI-network-clients (an AI, connecting to a remote server)
-Fix: minor AI-core problems
19 years ago
truelight af6fe3949b (svn r3224) -Add: Allow the NewAI to work in Multiplayer Games (switchable via patch
settings, off by defaut). An other step to AIScripts.
      WARNING: this is still highly experimental and has known bugs!
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 524fd25cbd (svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT 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
truelight 620f36acb6 (svn r2907) -Codechange: splitted the AIs to their own directory. AINew becomes 'trolly', AIOld becomes 'default', both in their own dir in the 'ai' dir. More AIs to come. 19 years ago