rubidium
2a337ab009
(svn r4789) - Codechange: rename RoadType to RoadTileType and ROAD_{NORMAL,CROSSING,DEPOT} to ROAD_TILE_* for consistency
2006-05-09 08:25:31 +00:00
rubidium
3dae1a9bba
(svn r4788) - Codechange: RAILTYPE_{NORMAL,ELECTRIC,...} and RAIL_TYPE_{NORMAL,SIGNAL,...} have nearly the same name, rename RAIL_TYPE_* to RAIL_TILE_* of extra clarity
2006-05-09 08:17:33 +00:00
tron
aac74778c5
(svn r4553) int and magic numbers -> Slope and DiagDirection
2006-04-23 19:08:33 +00:00
celestar
e3fb01a350
(svn r4502) -Cleanup: Remove code unused since rev1. (Rubidium)
2006-04-21 17:51:01 +00:00
tron
35e93e451f
(svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
...
Remove DoCommandByTile(), because now it does the same as DoCommand()
2006-04-10 07:15:58 +00:00
belugas
c146c8b667
(svn r4318) CodeChange : Remove last direct map access on ai/default/default.c
2006-04-08 01:07:32 +00:00
celestar
c442586676
(svn r4154) -Moved MAX_BRIDGES in bridge.h and made it an enum. This makes two drops ...
2006-03-29 19:03:47 +00:00
celestar
6c44bf5012
(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.
2006-03-29 16:30:26 +00:00
Darkvater
f77bb24d93
(svn r4132) - Missed 3 CargoID's
2006-03-26 22:56:58 +00:00
Darkvater
e91fa54a15
(svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type.
2006-03-26 22:23:32 +00:00
tron
c40740e058
(svn r4120) Use the new station functions where appropriate
2006-03-26 19:20:15 +00:00
tron
369cba3230
(svn r4116) -Fix: The AI should send a plane into a hangar if it's not in a hangar _or_ not stopped, not when it's not in a hangar _and_ not stopped
2006-03-26 18:48:23 +00:00
tron
f6285a659c
(svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
2006-03-24 08:55:08 +00:00
tron
a90e46bf03
(svn r3981) More work for the rail accessing functions and enums
2006-03-19 13:48:08 +00:00
tron
6e988259a4
(svn r3907) Replace many bridge related direct map accesses with calls to shiny new functions and mark some strange constructs with XXX
2006-03-16 15:16:27 +00:00
tron
626109f3f9
(svn r3887) Add a function to get the other bridge end when you're at a bridge ramp
2006-03-15 16:44:50 +00:00
tron
273533d4c7
(svn r3857) Add and use GetBridgeRampDirection()
...
Note: This slightly changes the behavior of GetAnyRoadBits() to only return a road piece for the start of the bridge ramp instead of a full ROAD_[XY]
2006-03-14 12:00:11 +00:00
tron
eeb5bf41a1
(svn r3831) Add and use GetRailDepotDirection()
2006-03-12 16:13:16 +00:00
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
2006-03-12 15:04:03 +00:00
tron
25606a2e0b
(svn r3816) Use existing accessors
2006-03-11 09:10:46 +00:00
tron
49cb8eb470
(svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends
2006-03-06 20:28:28 +00:00
tron
4efa560ffc
(svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme
2006-03-05 10:19:33 +00:00
tron
223aa411a7
(svn r3677) Remove the FindLandscapeHeightByTile()s from the default AI.
...
The corresponding TileInfos look like global variables at the first glance, but always get written to before reading in each function they are used in.
2006-02-27 08:08:10 +00:00
tron
b26d54585f
(svn r3660) Convert further road bits and type references to the functions/enums
2006-02-23 12:24:19 +00:00
tron
7f6953fb58
(svn r3614) turn 2 do-while-loop with 2 induction variables each into canocical for loops
2006-02-18 14:52:42 +00:00
tron
7692556c62
(svn r3613) Some more const, indentation, whitespace and similar stuff
2006-02-18 14:41:24 +00:00
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.
2006-02-13 22:13:02 +00:00
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
2006-02-06 09:18:04 +00:00
tron
1c3e8630fe
(svn r3511) More whitespace ([FS#46] by Rubidium)
2006-02-01 07:36:15 +00:00
tron
2053685fb5
(svn r3367) Unify the 4 distinct CMD_CHANGE_{AIRCRAFT,ROADVEH,SHIP,TRAIN}_SERVICE_INT commands into one CMD_CHANGE_SERVICE_INT command.
...
As side effect this is a
-Fix: The default AI tried to change the service intervals of vehicles via the CMD_CHANGE_TRAIN_SERVICE_INT command - regardless of the type of the vehicle - which of course failed for non-trains
2006-01-05 21:35:54 +00:00
tron
a2533d5ee6
(svn r3298) Remove unused and write-only variables
2005-12-14 06:28:48 +00:00
peter1138
80986fcd32
(svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed()
2005-12-10 12:05:39 +00:00
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
2005-11-22 15:55:38 +00:00
tron
7289cc7c07
(svn r3190) Turn some loops into canonical for loop form
2005-11-15 11:46:49 +00:00
tron
8a3587fa28
(svn r3185) const
2005-11-15 09:00:02 +00:00
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
2005-11-14 19:48:04 +00:00
tron
524fd25cbd
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
2005-11-14 08:09:57 +00:00
tron
81e5b16d71
(svn r3172) static, const
2005-11-13 13:43:55 +00:00
tron
5536de2319
(svn r3080) byte -> PlayerID, int -> EngineID, -1 -> INVALID_ENGINE
2005-10-24 05:51:23 +00:00
tron
d7cbd0d4c3
(svn r3073) int/byte -> EngineID/PlayerID/VehicleID
...
0/-1 -> INVALID_ENGINE
0x10 -> OWNER_NONE
2005-10-20 17:43:13 +00:00
tron
a85d68ed57
(svn r3058) The default AI may not build dual headed trains under certain circumstances.
...
Simplify this check by testing the rail vehicle info flags instead of passing a global variable around.
Note: This is not exactly the original behaviour, because the Lev4 was always allowed to be built, but i guess that was a glitch.
2005-10-18 07:01:00 +00:00
tron
b0174ab76b
(svn r3052) Fix last commit *grml*
2005-10-16 14:12:21 +00:00
tron
24250c6a3a
(svn r3051) Remove the unused function RemoteSubsidyAdd()
2005-10-16 14:07:11 +00:00
tron
a9bb8ef095
(svn r2973) Move a function declaration somewhere where it belongs
2005-09-23 06:38:36 +00:00
Darkvater
c0c75ef16e
(svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone
...
- Add IsLocalPlayer() which substitutes _local_player == _current_player
2005-09-14 18:03:38 +00:00
Darkvater
da2fa233d7
(svn r2949) The AI no longer needs to 'cheat' to build aircraft; eg it builds them now from a hangar. Also, to query the price of a new aircraft tile information is not needed
2005-09-13 13:30:18 +00:00
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.
2005-09-02 19:10:45 +00:00