rubidium
2eebb52592
(svn r15330) -Fix [FS#2597]: leaking of Squirrel when using circular references (by enabling the GC).
2009-02-03 22:42:42 +00:00
Yexo
e628c5360d
(svn r15328) -Fix (r15327): Load(data, version) was called instead of Load(version, data).
2009-02-03 21:05:32 +00:00
Yexo
9569bb12f3
(svn r15327) -Fix (r15027): AIs could access the map and other data in their constructor and Load() function while the savegame was not completely loaded.
2009-02-03 20:49:08 +00:00
smatz
16d1904e70
(svn r15324) -Codechange: unify the class used for comparing of strings for std::map
2009-02-03 18:08:07 +00:00
Yexo
ef320e3f0c
(svn r15322) -Fix (r15175): The AI list window didn't display information about the selected AI if it wasn't visible.
2009-02-02 22:57:22 +00:00
frosch
61a893d6fd
(svn r15308) -Codechange: Deduplicate km-ish/h -> mph conversions.
2009-02-01 17:14:39 +00:00
frosch
be395d0f3d
(svn r15307) -Fix: AIVehicle::GetCurrentSpeed() should also use km-ish/h instead of mph. (Documentation by Rubidium)
2009-02-01 16:21:18 +00:00
frosch
9c2ba4f96a
(svn r15306) -Codechange: Deduplicate code by adding Engine::GetDisplayMaxSpeed(), GetPower() and GetDisplayWeight(). (and using them)
2009-02-01 16:10:06 +00:00
smatz
9021c20b5e
(svn r15299) -Cleanup: remove many redundant includes
2009-01-31 20:16:06 +00:00
Yexo
283a265d8a
(svn r15284) -Fix [FS#2582] (r15045): Parameters were popped from the squirrel stack twice.
2009-01-27 13:11:11 +00:00
smatz
4eff39a54c
(svn r15278) -Fix [FS#2332]: test noise limit of nearest town instead of st->town
2009-01-26 21:09:17 +00:00
Yexo
c8a4bf862b
(svn r15277) -Fix (r15027): Building bridges in AITestMode always returned false.
2009-01-26 20:18:50 +00:00
glx
53fe1afa1f
(svn r15270) -Change [API CHANGE]: remove AIEventTest
2009-01-25 19:06:00 +00:00
glx
470da22ac3
(svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication.
2009-01-25 00:57:03 +00:00
frosch
512cc98b35
(svn r15262) -Fix: AIEvents were not freed, when they were not queued for any AI.
2009-01-24 21:38:30 +00:00
glx
9b73303b4d
(svn r15261) -Add: added Engine::GetRunningCost() to remove some code duplication. Also stops AIs decrementing vehicle counter of first company
2009-01-24 20:14:15 +00:00
frosch
7120b2455a
(svn r15255) -Fix (r15027): AIVehicle::GetLength() returned only the length of the first part of articulated road vehicles.
2009-01-24 14:26:48 +00:00
frosch
8be4bc3d1e
(svn r15252) -Fix (r15027): AIMarine::AreWaterTilesConnected() reported aqueducts being connected with all surrounding tiles. Also add some type safety.
2009-01-24 13:05:04 +00:00
frosch
2eb5af3bb8
(svn r15244) -Fix (r15027): The station tile of an oilrig-like industry is not neccessarily the first industry tile.
2009-01-23 22:36:17 +00:00
frosch
ac7883fe93
(svn r15241) -Fix (r15027): NoAI API was not aware of certain newindustries 'features'.
2009-01-23 22:09:31 +00:00
glx
205289cf9d
(svn r15228) -Fix [FS#2571]: possible crash when an AI/Library doesn't have a required function
2009-01-23 15:38:13 +00:00
glx
6301d1cc0a
(svn r15226) -Fix (r15214): broken AI content download
2009-01-23 15:10:13 +00:00
rubidium
80e59f375f
(svn r15215) -Fix: various MSVC x64 compiler warnings
2009-01-23 02:01:05 +00:00
glx
7809b7ef0e
(svn r15214) -Fix [NoAI]: ignore case for ai/library main script path on windows
2009-01-23 01:29:13 +00:00
glx
e30d391345
(svn r15191) -Fix (r15188): -1 is not a bool (MSVC warning)
2009-01-21 03:47:04 +00:00
Yexo
e3c69b7c4e
(svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map.
2009-01-21 02:31:55 +00:00
Yexo
7b009c3586
(svn r15188) -Feature: You can now change the number of AIs from the AI config window.
2009-01-21 01:56:42 +00:00
Yexo
dcdb771c40
(svn r15187) -Fix: assert when an AI called AIRoad::GetNeighbourRoadCount on a tile at the north edge (bug found by SmatZ).
2009-01-21 01:37:20 +00:00
Yexo
9fd38d1022
(svn r15186) -Fix: Select the currently selected AI instead of the second on in the list.
...
-Feature: Double clicking on a slot in the AI config window results in opening the list of AIs.
2009-01-21 00:36:22 +00:00
Yexo
78c857422b
(svn r15185) -Fix (r15175): It was impossible to select AIs that had a different instance name then their name.
2009-01-21 00:19:21 +00:00
glx
11fe4bcc56
(svn r15184) -Cleanup: remove extra spaces
2009-01-21 00:18:30 +00:00
Yexo
aaa8be9a3f
(svn r15182) -Fix: After updating an AI select the latest version for the next game.
2009-01-21 00:09:36 +00:00
Yexo
593f380462
(svn r15175) -Feature: Add the option to select the AIs to start in a new game and configure them via the gui.
2009-01-20 16:49:10 +00:00
Yexo
1f5b8c97df
(svn r15171) -Fix (r15027): Buffer underflow in case there are no settings to save for an AI.
2009-01-20 15:58:40 +00:00
peter1138
b85389dca5
(svn r15149) -Codechange: GetMaskOfTownActions() is used by a Cmd handler, therefore it does not belong in _gui.
2009-01-19 12:07:01 +00:00
rubidium
a0e24cc6c9
(svn r15139) -Fix [NoAI]: a wrong tile got returned for hangar tiles when the station sign isn't over st->airport_tile.
2009-01-18 17:03:57 +00:00
peter1138
6644fa86ee
(svn r15133) -Fix: Crash if no NoAIs are present.
2009-01-17 22:22:53 +00:00
rubidium
72b0341ed0
(svn r15126) -Feature: downloading content from a central server (content.openttd.org) where authors can upload they NewGRFS/AI etc. This should make joining servers that use only NewGRFs that are distributed via this system easier as the players can download the NewGRFs from in the game. It should also make it easier to see whether there are updates for NewGRFs and make the necessary updates.
2009-01-17 16:53:32 +00:00
truebrain
fac5cee3d3
(svn r15124) -Fix: last memory leak related to NoAI
2009-01-17 15:38:37 +00:00
truebrain
eb0d82ada0
(svn r15123) -Fix [NoAI]: 'const char *' implies that the return value should not be free'd, which is should .. so make them 'char *'
2009-01-17 15:31:30 +00:00
truebrain
ef75a7af90
(svn r15122) -Codechange: add a security assert, to make sure something never happens
2009-01-17 15:14:13 +00:00
truebrain
002427eab9
(svn r15121) -Fix: more mem-leak fixes (this should make SmatZ so happy ;) :p)
2009-01-17 15:07:35 +00:00
truebrain
8cbf156252
(svn r15120) -Fix: more mem-leak fixes
2009-01-17 14:54:24 +00:00
truebrain
d790884ee6
(svn r15118) -Fix: fix a minor mem-leak
2009-01-17 14:45:44 +00:00
truebrain
dec721ca6f
(svn r15109) -Add [NoAI]: add AITile::LevelTiles (Yexo)
2009-01-16 15:01:54 +00:00
truebrain
f5e0590c09
(svn r15107) -Fix [NoAI]: don't use so much explicit string copies if it is not required
2009-01-16 14:56:13 +00:00
rubidium
65ae906940
(svn r15106) -Fix [NoAI]: printf-ing of garbage.
2009-01-16 14:37:53 +00:00
truebrain
cafff6eb60
(svn r15102) -Fix (r15101): somehow makedepend fucked up (patch by Yexo)
2009-01-16 00:27:22 +00:00
truebrain
bd520ca562
(svn r15101) -Change [API CHANGE]: more consistant naming for consts:
...
INVALID_TOWN_RATING -> TOWN_RATING_INVALID
INVALID_TRANSPORT -> TRANSPORT_INVALID
INVALID_ORDER -> ORDER_INVALID
INVALID_GROUP -> GROUP_INVALID
GROUP_ALL/DEFAULT -> ALL/DEFAULT_GROUP
VEHICLE_RAIL/ROAD/.. -> VT_RAIL/ROAD/..
MY_COMPANY -> COMPANY_SELF
FIRST/LAST/INVALID_COMPANY -> COMPANY_FIRST/LAST/INVALID
2009-01-16 00:05:26 +00:00
truebrain
b9ebab0e5d
(svn r15100) -Add [NoAI]: introduce TILE_INVALID as const
2009-01-15 21:20:12 +00:00
truebrain
1cd56af6da
(svn r15099) -Fix (r15078): GetTileIndex(0, -1) is perfectly fine
2009-01-15 20:59:22 +00:00
truebrain
91c7cba05b
(svn r15096) -Fix [NoAI]: free memory when no longer needed
...
-Fix [NoAI]: when there are multiple versions of one AI, never randonly pick an older one, but always the latest
2009-01-15 18:24:49 +00:00
truebrain
e436f0218f
(svn r15095) -Add [NoAI]: allow AI Libraries to be in .tar files (subdir required, as with AIs
...
-Add [NoAI]: allow multiple versions of the same AI co-exist
-Change [NoAI]: updated the whole method of AI (Library) finding and loading; it is now much more clear and transparent
-Change [NoAI]: the name of the AI is now the name used by CreateInstance()
-Change [NoAI]: make the AI finder a bit more clever, mostly related to version finding
2009-01-15 18:15:12 +00:00
truebrain
fe7997e95f
(svn r15093) -Fix [NoAI]: check if a tile is valid before using IsTileType (bug found by Zuu, patch by Yexo)
2009-01-15 17:00:47 +00:00
truebrain
ae5c8a8b35
(svn r15091) -Add [NoAI] [API CHANGE]: introduce GetCategory() as a requirement for every library.nut, to indicate in which category it belongs. Currently the directory indicates the category, but this doesn't allow planned future additions
2009-01-15 15:56:10 +00:00
truebrain
e84138af22
(svn r15090) -Add [NoAI] [API CHANGE]: info.nut/library.nut now requires a function GetShortName(), which should return a 4 (four) character string, unique throughout the world. This id is simular to a GRFid.
2009-01-15 14:37:44 +00:00
truebrain
1e1cdd01b4
(svn r15086) -Fix: start AIs after 6 months on hard, 12 months on medium, and 24 months on easy. The current values were a bit .. too long waiting period ;)
2009-01-14 21:32:06 +00:00
truebrain
61093eb211
(svn r15084) -Fix [NoAI] (r15027): by removing the threads for NoAIs, it is no longer possible to use DoCommand (even indirect) in AIAbstractList::Valuator().
2009-01-14 18:25:48 +00:00
rubidium
eb19b0abf9
(svn r15082) -Codechange: make the AI library path also a searchdir instead of manually manufacturing it into a searchdir.
2009-01-14 15:20:06 +00:00
truebrain
9724a986c8
(svn r15078) -Fix [NoAI]: AIMap didn't filter its input (Yexo)
2009-01-13 23:50:12 +00:00
smatz
ca45774160
(svn r15077) -Codechange: enumify DAYS_IN_YEAR and DAYS_IN_LEAP_YEAR
...
-Change: when computing daily running cost, divide by 365 (instead of 364). Since r12134, the rounding errors don't need this correction anymore
2009-01-13 22:58:03 +00:00
truebrain
5b4da28594
(svn r15076) -Fix: a start_date of 0 would never start an AI .. so don't allow it (Yexo)
2009-01-13 22:36:44 +00:00
truebrain
d5a599f5e5
(svn r15074) -Fix: make Rubidium happy
2009-01-13 21:11:02 +00:00
peter1138
4585d9785d
(svn r15073) -Fix (r15067) [FS#2532]: Default copy constructors don't necessarily do what you want. Instead of creating one, we now pass a pointer around as that avoids additional allocations.
2009-01-13 20:43:53 +00:00
truebrain
ec4bdfe611
(svn r15068) -Add [NoAI]: introducing 'step_size' for AIConfig, for future AIGUI (Yexo)
2009-01-13 18:26:58 +00:00
peter1138
afb94c252d
(svn r15067) -Fix [FS#2531]: Possible compiler bug, alleviated by using SmallVector instead of using std::set. SmallVector does everything needed anyway.
2009-01-13 18:18:53 +00:00
truebrain
f293bff01b
(svn r15066) -Change: start_date is now in days, instead of in months (Yexo)
2009-01-13 18:04:12 +00:00
truebrain
39cec4c65f
(svn r15063) -Fix [NoAI]: starting companies now listen correctly to 'start_date' set to the AI slot (Yexo)
...
-Add [NoAI]: add a 'deviation' value for all settings, giving a slight deviation of the value of a setting (Yexo)
2009-01-13 16:53:03 +00:00
smatz
638411c087
(svn r15062) -Fix: further forgotten svn properties and headers
2009-01-13 16:30:24 +00:00
smatz
c30ce23866
(svn r15061) -Fix (r15027): three files were missing the Id header
2009-01-13 15:49:32 +00:00
truebrain
ee17e1e7b8
(svn r15059) -Add [NoAI]: use 'start_date' from the AI configure to see when an AI should start next
2009-01-13 14:00:26 +00:00
truebrain
bf1acb6772
(svn r15057) -Fix [NoAI]: clamp the values of a setting between the ones allowed by info.nut
2009-01-13 13:09:49 +00:00
truebrain
f29941a043
(svn r15056) -Add [NoAI]: when starting a game, give a random value to the setting marked with AICONFIG_RANDOM (Yexo)
2009-01-13 12:52:09 +00:00
truebrain
53d28d24b5
(svn r15055) -Add [NoAI]: add the AICONFIG_RANDOM and AICONFIG_BOOLEAN consts (Yexo)
2009-01-13 12:51:46 +00:00
glx
55db451a32
(svn r15049) -Fix (r15045): MSVC performance warning
2009-01-13 02:03:03 +00:00
truebrain
81157e3d91
(svn r15048) -Fix (r15047): the one time you don't compile a patch of someone, it contains a warning .. ;)
2009-01-13 01:52:32 +00:00
truebrain
08591d8643
(svn r15047) -Fix [NoAI]: AICONFIG_BOOLEAN (in AddSetting) doesn't require (or even allow) a min/max setting .. it is always 0/1 (Yexo)
2009-01-13 01:51:39 +00:00
truebrain
75b8afc136
(svn r15046) -Fix (r15045): in case CanLoadFromRevision does not exist, only allow savedata from the same version as we are now
2009-01-13 01:50:51 +00:00
truebrain
5573d9a459
(svn r15045) -Add [NoAI API CHANGE]: in info.nut you can now have (optional) a CanLoadFromVersion(version), which should return true/false, to indicate if you can load a savegame made with your AI of version 'version'
...
-Add [NoAI API CHANGE]: in main.nut the Load() function now should be Load(version, data), where 'version' is the version of your AI which made the savegame
-Codechange [NoAI]: various of function renames to make things more sane
-Add [NoAI]: push the 'version' of the AI through various of layers
-Codechange [NoAI]: various of code cleanups
-Add [NoAI]: store the version of the AI in the savegame too
2009-01-13 01:46:46 +00:00
truebrain
27c0a4c801
(svn r15044) -Add [NoAI]: AIConfig::GetVersion(), to get the version of the current AI
2009-01-13 00:10:58 +00:00
truebrain
c8f9cbca53
(svn r15042) -Fix (r15027): don't leak memory in AIInfo (Yexo)
2009-01-12 21:40:00 +00:00
truebrain
03725c057f
(svn r15036) -Fix: use the same value for 'random' through-out the code for PlantTree
2009-01-12 18:15:18 +00:00
truebrain
dcae208dfe
(svn r15033) -Fix (r15027): silent a warning when compiling without network
2009-01-12 17:40:13 +00:00
truebrain
c2406cd42d
(svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
...
NoAI is an API (a framework) to build your own AIs in. See:
http://wiki.openttd.org/wiki/index.php/AI:Main_Page
With many thanks to:
- glx and Rubidium for their syncing, feedback and hard work
- Yexo for his feedback, patches, and AIs which tested the system very deep
- Morloth for his feedback and patches
- TJIP for hosting a challenge which kept NoAI on track
- All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
2009-01-12 17:11:45 +00:00
frosch
0c23420998
(svn r14991) -Fix: Command-flags is an uint32.
2009-01-11 14:11:06 +00:00
rubidium
28ea38ae55
(svn r14949) -Cleanup: pointer coding style
2009-01-10 00:31:47 +00:00
rubidium
c0e7434f38
(svn r14944) -Cleanup: add spaces around some operators
2009-01-09 22:56:28 +00:00
rubidium
7a5798695d
(svn r14919) -Feature: distant joining of stations (Frostregen and PhilSophus)
2009-01-08 16:35:45 +00:00
glx
c61674221c
(svn r14840) -Cleanup: remove duplicate includes
2009-01-04 21:02:59 +00:00
smatz
91233ea596
(svn r14828) -Codechange: move most of save/load-specific code to separate files
2009-01-04 15:32:25 +00:00
smatz
cd88a7590a
(svn r14812) -Codechange: use INVALID_TILE instead of 0 to mark company without HQ
2009-01-03 17:11:52 +00:00
rubidium
e83cca7d13
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
2008-12-28 14:37:19 +00:00
smatz
c88a6199a7
(svn r14743) -Codechange: use INVALID_TILE to indicate station doesn't have queried facility (or station/roadstop is invalid) instead of 0 (Yexo)
2008-12-26 18:01:15 +00:00
smatz
8a06e67067
(svn r14734) -Codechange: type of bankrupt_asked is CompanyMask, not byte
2008-12-24 00:25:17 +00:00
frosch
ee9fc4e49b
(svn r14707) -Cleanup: Replace an 'int' by 'Trackdir'.
2008-12-20 20:26:40 +00:00
smatz
82ef029f41
(svn r14693) -Codechange: replace one check in old AI (probably typo, but the effect was the same) (Yexo)
2008-12-19 20:53:38 +00:00
michi_cc
9c6541c80b
(svn r14504) -Cleanup: Use the right variable type for tile offsets.
2008-10-20 19:35:48 +00:00
rubidium
b5e467978b
(svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus)
2008-10-14 18:38:51 +00:00
smatz
b2852f88fb
(svn r14448) -Codechange [FS#2328]: rename a few variables (based on a patch by planetmaker)
2008-10-07 20:57:41 +00:00
rubidium
e589c7e580
(svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
2008-09-30 20:51:04 +00:00
rubidium
f56e630e5c
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
2008-09-30 20:39:50 +00:00
frosch
e10127f032
(svn r14335) -Codechange: Remove some magic numbers.
2008-09-15 19:55:00 +00:00
belugas
de43d17a82
(svn r14169) -Codechange: rename location_of_house for location_of_HQ, which is more exact and less subject to interpretation
2008-08-25 16:10:34 +00:00
belugas
9506434539
(svn r14105) -Fix: Some typos that are more grammatical errors, as it seems.
...
Provided by ln
I've added a little fix on currency.cpp too, why not :)
2008-08-20 01:38:12 +00:00
frosch
c8e699cc35
(svn r14076) -Codechange: Merge the four start/stop commands into a single CMD_START_STOP_VEHICLE.
2008-08-15 13:57:43 +00:00
rubidium
688267ad52
(svn r14062) -Fix [FS#2226]: division by 0 in newai.
2008-08-13 05:12:36 +00:00
rubidium
1ef65c329e
(svn r13999) -Fix [FS#2190]: crash when the AI tries to find the depot of an airport that doesn't have a depot.
2008-08-04 22:31:49 +00:00
rubidium
4396b7c68c
(svn r13809) -Fix: memory leak each time a "new ai" got (re)started.
2008-07-23 20:42:13 +00:00
rubidium
cde65455ac
(svn r13731) -Codechange: make a pool of the array of players.
2008-07-18 16:40:29 +00:00
rubidium
6898a76c5f
(svn r13719) -Codechange: rename IsValidPlayer to IsValidPlayerID in line with all other structs/classes that are in a pool.
2008-07-17 20:13:01 +00:00
rubidium
e7a501100a
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
2008-05-29 15:13:28 +00:00
rubidium
d289464d69
(svn r13255) -Codechange: move _opt to _settings.
2008-05-25 22:36:44 +00:00
rubidium
dc77647ea4
(svn r13251) -Codechange: rename _patches to _settings as that is more logic.
...
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
2008-05-25 19:17:03 +00:00
frosch
8f104a2e97
(svn r13233) -Fix: Replace some (incorrect) evaluations of TileOwner by RoadOwner.
...
-Fix: Before evaluating RoadOwner, check if the roadtype is present.
-Fix: Some places assumed that MP_ROAD means normal street.
2008-05-24 19:36:20 +00:00
smatz
8841f3be40
(svn r13222) -Change: allow old AI building helistations and helidepots for oil rig routes
2008-05-23 16:08:58 +00:00
smatz
9e2490abb2
(svn r13221) -Fix (r8747): old AI failed to build oil rig routes
2008-05-23 15:57:18 +00:00
smatz
baeb6e5395
(svn r13217) -Fix: old AI was building small airports in years when they were not available in original game, causing small planes and helis everywhere
2008-05-23 00:28:13 +00:00
smatz
2be223fc03
(svn r13090) -Codechange: add functions for direct conversion from DiagDirection to Track and Trackbits
2008-05-14 18:31:21 +00:00
rubidium
1ce0b03bf0
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
2008-05-06 15:11:33 +00:00
peter1138
45034bc522
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
2008-04-29 21:31:29 +00:00
rubidium
f4b07a78c4
(svn r12762) -Fix: tabs after the first non-tab character are generally not okay (or lines starting with a space and then tabs).
2008-04-18 04:54:09 +00:00
rubidium
ca1f8fbe2e
(svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators.
2008-04-18 04:37:06 +00:00
rubidium
6d063c3ad6
(svn r12754) -Codechange: split depot.h into depot_map.h, depot_func.h and depot_base.h and remove quite a lot of unneeded (before this) includes of depot.h.
2008-04-17 19:10:30 +00:00
smatz
ec588da9e8
(svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used
2008-04-17 18:24:45 +00:00
smatz
966e476df8
(svn r12745) -Codechange: a bit of naming conventions, introduce Is*DepotTile()
2008-04-17 00:44:20 +00:00
rubidium
973997e896
(svn r12617) -Codechange: add type safety to the Order's load and unload types.
2008-04-07 20:03:46 +00:00
rubidium
cf250390c5
(svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness.
2008-04-07 19:18:56 +00:00
rubidium
53d101cc99
(svn r12593) -Codechange: hide Order's flags in most of the code.
2008-04-06 15:09:45 +00:00
rubidium
935b562074
(svn r12588) -Codechange: do not access the destination of an order directly.
2008-04-06 07:48:51 +00:00
rubidium
a3224512cc
(svn r12587) -Codechange: unduplicate some code in the Unpack*Order functions and move the 'normal' case Pack/Unpack to Order.
2008-04-06 07:22:26 +00:00
rubidium
3b0e3d8d30
(svn r12584) -Codechange: do not access the order type directly.
2008-04-05 23:36:54 +00:00
frosch
ae01e263ad
(svn r12540) -Codechange: Enumify some values in original pathfinder and remove an unused variable.
2008-04-02 13:57:25 +00:00
frosch
15b2f07587
(svn r12533) -Cleanup: Remove some wizardry from default ai by using existings enums and helper functions.
2008-04-01 15:03:59 +00:00
rubidium
df1d9bd880
(svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h.
2008-03-31 00:17:39 +00:00
rubidium
c51b81c247
(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
2008-03-31 00:06:17 +00:00
rubidium
b84b16cfcd
(svn r12488) -Codechange: split order.h into order_base.h and order_func.h.
2008-03-30 23:24:18 +00:00
rubidium
49a040e6ad
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
2008-03-28 18:00:38 +00:00
peter1138
a729283a3c
(svn r12451) -Codechange: use of FOR_ALL_ENGINES/ENGINEIDS_OF_TYPE instead of for-loops
2008-03-27 19:02:18 +00:00
smatz
988b5a9111
(svn r12200) -Fix: force AI to build rail or road instead of bridges if possible, so it doesn't build bridges everywhere
2008-02-20 17:56:36 +00:00
frosch
7f3d56041b
(svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus().
2008-02-20 17:49:50 +00:00
smatz
9bdb194b2a
(svn r12197) -Fix [FS#1788](r12134): show correct last year profit when the train had negative income
...
-Codechange: use GetDisplayProfitThisYear() to convert vehicle profit to readable form
2008-02-20 17:06:58 +00:00
frosch
1d120c51b8
(svn r12193) -Codechange: Rename a magic variable, give it a decent type, and remove a 'goto'.
2008-02-20 15:13:42 +00:00
smatz
a53594ebd4
(svn r12184) -Fix: take into account possible loan when AI is deciding which bridge to build, so it won't build wooden bridges everytime
2008-02-18 22:50:58 +00:00
glx
d7924424ac
(svn r12155) -Fix (r12154): some warnings (always compile before commit)
2008-02-16 00:10:03 +00:00
glx
a148985087
(svn r12154) -Codechange: removed a magic number
2008-02-15 23:57:03 +00:00
frosch
514df81e27
(svn r12141) -Codechange: Introduce IsNormalRoad[Tile](), IsRoadDepot[Tile]() and HasTileRoadType(); and use them.
2008-02-14 15:59:16 +00:00
smatz
fe48d0be21
(svn r12134) -Change: count the number of ticks a vehicle was running this day to calculate running cost
...
-Fix [FS#1739]: vehicle profit is now counted with 8bit fract, so it is now shown properly in the vehicle details window
2008-02-13 19:24:40 +00:00
peter1138
1268a70466
(svn r12019) -Codechange: Add support for passenger engine designation for AI-use, NewGRF property 0x08 for trains.
2008-01-30 10:27:45 +00:00
frosch
d4dc5e0775
(svn r11983) -Codechange: Add some helper functions for slopes and use them.
2008-01-25 15:47:58 +00:00
smatz
773446df5e
(svn r11972) -Fix: old AI shouldn't build fast planes with a small airport in orders
2008-01-24 14:22:10 +00:00
smatz
74af65e556
(svn r11968) -Codechange: remove redundant FindLengthOfTunnel(), use GetTunnelBridgeLength() and/or GetOtherTunnelEnd() instead
2008-01-23 22:34:04 +00:00
smatz
881b74e882
(svn r11962) -Cleanup: OPF is no longer used to update signals
2008-01-23 17:30:28 +00:00
smatz
8be486c27e
(svn r11960) -Cleanup: simplify some IsTunnel(Tile) / IsBridge(Tile) conditions
2008-01-23 14:51:36 +00:00
peter1138
622f251197
(svn r11959) -Codechange: Use macro to loop for specific engine types instead of using specific indexes each time.
...
-Codechange: Minor scope changes in said loops.
2008-01-23 13:20:51 +00:00
smatz
51d7692aca
(svn r11958) -Fix (r11204): NewAI couldn't build any road vehicles when there were any tram grfs loaded
2008-01-23 13:06:00 +00:00
frosch
8a72af3a13
(svn r11946) -Fix: slope detection of bridge ramps.
...
YAPF failed for steep slopes.
Trolly failed for a lot.
2008-01-22 16:08:17 +00:00
smatz
66a0fafc93
(svn r11917) -Fix (r3677): AI was reading wrong tile slope while building road bridge
2008-01-18 14:48:57 +00:00
rubidium
c141639bcc
(svn r11887) -Fix [FS#1658]: segmentation faults/wrong frees due uninitialized memory in the AI.
2008-01-17 02:09:34 +00:00
smatz
61e40b1aa5
(svn r11871) -Fix [FS#1074]: do not update signals after each tile when building/removing a large block of track/signals/station
2008-01-16 01:18:15 +00:00
rubidium
736640fd87
(svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*.
2008-01-15 18:44:22 +00:00
rubidium
9c0c798dd8
(svn r11834) -Codechange: only include settings_type.h if needed.
2008-01-13 14:37:30 +00:00
rubidium
fafab82a31
(svn r11832) -Codechange: get rid of (quite) some VARDEFs.
2008-01-13 13:36:01 +00:00
rubidium
90acd52f22
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
2008-01-13 01:21:35 +00:00
rubidium
2fc62eab05
(svn r11818) -Codechange: split player.h into smaller pieces.
2008-01-12 14:10:35 +00:00
rubidium
2d2e1e3863
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
2008-01-09 21:05:03 +00:00
rubidium
0365c1f33b
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
2008-01-09 16:55:48 +00:00
rubidium
98b4fa7c07
(svn r11792) -Codechange: move some (virtually) globally included AI related structs to a place where they are only included a few times.
2008-01-09 16:40:02 +00:00
rubidium
444e77d8bc
(svn r11774) -Change: do not include variables.h in a header when it is not needed.
2008-01-07 00:57:19 +00:00
rubidium
722613f7f3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
2007-12-27 13:35:39 +00:00
rubidium
db73addb43
(svn r11702) -Codechange: move all date related stuff to date*.
2007-12-26 13:50:40 +00:00
rubidium
f82aeb82c5
(svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h).
2007-12-26 11:45:43 +00:00
rubidium
81bf9f8503
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
2007-12-25 11:26:07 +00:00
rubidium
00c9d3ef20
(svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed.
2007-12-25 09:48:53 +00:00
rubidium
3074bca136
(svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
2007-12-21 22:50:51 +00:00
rubidium
766551b0bc
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
2007-12-21 21:50:46 +00:00
rubidium
be923601bf
(svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h
2007-12-19 23:26:02 +00:00
smatz
d5dbce8331
(svn r11652) -Codechange: add the svn $ header for several files
2007-12-17 01:35:45 +00:00
smatz
d56a690ba4
(svn r11649) -Codechange: some code can be simplified thanks to changes in r11642
2007-12-16 19:30:42 +00:00
smatz
926fe5c9e9
(svn r11644) -Codechange: merge some functions from tunnel_map.h and bridge_map.h into tunnelbridge_map.h
2007-12-16 15:38:51 +00:00
smatz
3b59b68a15
(svn r11625) -Codechange: add CO_* enum at some places, add includes of order.h too
2007-12-12 14:37:35 +00:00
smatz
411dec5c3e
(svn r11565) -Revert: part of r11564
2007-12-03 22:40:18 +00:00
skidd13
5d74f2ced4
(svn r11564) -Codechange: Increase the usage of the for_each_bit macro and rename it fitting to the naming style
2007-12-03 09:19:19 +00:00
skidd13
e36dba227b
(svn r11523) -Codechange: Move the CHANCE macros to core/random_func.cpp cause they depend on Random()
...
-Codechange: Convert the CHANCE macros to functions and rename them fitting to the naming style
2007-11-25 15:35:25 +00:00
skidd13
815b8d8df1
(svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style
2007-11-24 10:38:43 +00:00
skidd13
3ae50673a3
(svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style
2007-11-20 13:35:54 +00:00
skidd13
c0a2c0c23e
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
2007-11-19 21:02:30 +00:00
rubidium
eadd6765e1
(svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo.
2007-10-20 14:51:09 +00:00
rubidium
8342c18fb5
(svn r11303) -Fix: EnsureNoVehicle and EnsureNoVehicleOnGround were both used to check whether there was no vehicle on the ground, except that the former didn't take care of aircraft shadows. So now we only use EnsureNoVehicleOnGround.
2007-10-19 22:46:55 +00:00
rubidium
86dac1533b
(svn r11184) -Codechange: cleanup the code related to backup orders.
2007-09-28 21:15:45 +00:00
glx
18de82b000
(svn r11176) -Revert (r9867): as it is needed for newgrf callbacks 14B and 14C
2007-09-27 21:39:13 +00:00
rubidium
bd7483ba3c
(svn r11040) -Fix [FS#1179]: removing CMD_AUTO from some commands could remotely trigger an assertion.
2007-09-04 11:58:27 +00:00
rubidium
235ad4ab6b
(svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that.
2007-08-30 13:03:56 +00:00
rubidium
c2dcccae16
(svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot.
2007-08-29 21:49:08 +00:00
rubidium
dc454841fd
(svn r10942) -Fix [FS#1133]: make the AI not crash when it has ships as the AI does not support them.
2007-08-19 16:51:15 +00:00
rubidium
1a5b0a3417
(svn r10838) -Fix [FS#1119] (r10698): double negation where only single negation was needed. Patch by frosch.
2007-08-10 13:27:07 +00:00
rubidium
2f89fef353
(svn r10759) -Codechange: make the industry struct use the pool item class as super class.
2007-08-02 23:21:52 +00:00
rubidium
99da45988a
(svn r10756) -Codechange: use vehicle->IsValid in favour of IsValidVehicle(vehicle).
2007-08-02 21:19:07 +00:00
rubidium
2800a49f03
(svn r10733) -Codechange: change MP_STREET into MP_ROAD as we use the word "road" everywhere except in the tile type.
2007-07-29 23:42:59 +00:00
rubidium
903a0a08c2
(svn r10698) -Codechange [FS#1082]: simplify the code related to foundations. Primarily removal of (duplicated|magic) code and introduction of few helper functions to ease foundation determination. Patch by frosch.
2007-07-26 16:51:10 +00:00
rubidium
9c9fc1a79e
(svn r10672) -Codechange: typify some parameters/variables.
2007-07-24 13:03:24 +00:00
truelight
e5aca34acb
(svn r10657) -Fix r10655: commit didn't comply with coding style (tnx glx :))
2007-07-23 15:20:20 +00:00
truelight
6fe791a200
(svn r10655) -Fix [FS#1070]: Trolly AI didn't know about steep slopes, and used wrong tileh in some cases (frosch)
2007-07-23 15:14:45 +00:00
rubidium
fc201d4ad8
(svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it.
2007-06-22 11:58:59 +00:00
rubidium
0d8e82b7d7
(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
2007-06-21 14:32:27 +00:00
rubidium
773a7c9cb6
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
2007-06-18 19:53:50 +00:00
rubidium
82e79b847e
(svn r10200) -Codechange: add "shortcut" for !CmdFailed (CmdSucceeded).
2007-06-18 16:42:40 +00:00
rubidium
3ccc83e640
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
2007-06-18 10:48:15 +00:00
peter1138
70b6716b98
(svn r10177) -Fix: Passengers has one A and two Es (ln)
2007-06-17 10:47:30 +00:00
rubidium
06f9baac62
(svn r10106) -Fix (r10098): there's always a compiler complaining about something...
2007-06-11 19:29:42 +00:00
rubidium
76e25154bd
(svn r10098) -Codechange: bilbo cared about the performance of the AI with respect to the airport placement, so he rewrote the aircraft handling of the AI; now it can actually make lots of money again :)
2007-06-11 14:23:04 +00:00
rubidium
47d7124207
(svn r10081) -Fix [FS851]: towns/AIs didn't build bridges anymore (boekabart).
2007-06-10 10:52:19 +00:00
rubidium
d255041365
(svn r10058) -Codechange: give some industry variable sensible names (like not telling "last_mo_production" when it is the production of the current month).
2007-06-07 14:38:45 +00:00
rubidium
ad747e3026
(svn r10033) -Feature [FS#760]: skip to the selected order in the order list when clicking on the "skip" button while pressing CTRL.
2007-06-04 19:32:45 +00:00
rubidium
3b267df0af
(svn r9954) -Fix [FS#811]: trolley AI crashed when trying to determine what the roadbits are.
2007-05-27 08:53:21 +00:00
rubidium
821e58ac95
(svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile.
2007-05-24 22:41:50 +00:00
rubidium
ef48d1012b
(svn r9912) -Fix: the AIs could build any road(station)s.
2007-05-24 21:45:54 +00:00
rubidium
51109475a2
(svn r9892) -Codechange: lots of ground work for allowing multiple types of "road" with multiple owners on a single tile.
2007-05-20 19:14:08 +00:00
belugas
c4b90f3137
(svn r9867) -Codechange: Remove data duplication. The exact same values can be found in the industry spec, so take it from there instead.
2007-05-18 00:33:47 +00:00
rubidium
4500c365e1
(svn r9817) -Fix [FS#772]: an assertion that was triggered by the AI building when its rating for the town was not high enough.
2007-05-09 20:50:11 +00:00
rubidium
7577954ced
(svn r9672) -Cleanup: lots of coding style fixes around operands.
2007-04-18 22:10:36 +00:00
maedhros
3d81de8d7e
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
2007-04-12 13:07:15 +00:00
celestar
43dc111833
(svn r9540) -Fix (r1): Bankrupt AIs no longer buy themselves (usage of wrong variable)
2007-04-01 10:54:31 +00:00
belugas
0a6d6eaa74
(svn r9530) -Codechange: Replace a direct industry type access by a behaviour
2007-03-31 01:16:17 +00:00
belugas
691f8578fd
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
2007-03-22 03:42:43 +00:00
celestar
045d3dc05f
(svn r9251) -Fix(r6057, FS#644): Use a less CPU-intensive algorithm to find a random industry for the AI to prevent it slowing down the game. The AI now sucks a even a bit more than before (if that's even possible).
2007-03-16 10:11:16 +00:00
rubidium
36cea84b11
(svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code).
2007-03-08 16:27:54 +00:00
rubidium
979ccd45ba
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
2007-03-07 12:11:48 +00:00
rubidium
4169bfba06
(svn r9050) -Codechange: Foo(void) -> Foo()
2007-03-07 11:47:46 +00:00
tron
053e2ddda5
(svn r8841) -Fix
...
Remove {,u}intswap() and replace them by Swap()
2007-02-22 08:43:02 +00:00
tron
72857162dd
(svn r8767) -Fix
...
-Codechange: Do not hardcode the catchment radius of airports, but hold the information in AirportFTAClass
-Fix (r979): The default AI tested possible airport locations with a fixed catchment radius instead of the radius of the to be built airport
2007-02-17 07:45:18 +00:00
tron
128caa5050
(svn r8755) -Fix
...
Abbreviate GetAirport(st->airport_type) to st->Airport()
2007-02-16 09:38:43 +00:00
KUDr
c680266b50
(svn r8750) -Fix (r8747): PLANES defined in wingdi.h caused compilation error under Win32. Changed to AIRPLANES
2007-02-15 22:00:04 +00:00
tron
16df378623
(svn r8747) -Fix
...
-Codechange: Make the encoding of accepted aircraft types of airports a bit more sensible and move the enum into struct AirportFTAClass
2007-02-15 20:16:33 +00:00
celestar
bde06e75b4
(svn r8732) -Codechange/Fix(r8705): Turned the bit-handling macros into template functions. Fixes a problem with MSVC and 64-bit shifts.
2007-02-14 11:53:39 +00:00
tron
ced80aadaa
(svn r8660) -Fix
...
-Codechange: Remove _avail_aircraft
Its name is misleading. It is rather _avail_airports, but then only some of them, which leads to inconsistencies when using it.
Further it is unnecessary to store it in savegams.
2007-02-10 08:19:39 +00:00
belugas
e8af755d7f
(svn r8455) -Codechange: Give a more meaningful name (railveh_type)to member flags of RailVehInfo, as well as changing the code to reflect the fact that it was not a flag but rather a one value only variable. Doing so, some evaluations have been simplified.
...
-Codechange: Add and use RAILVEH_SINGLEHEAD when railveh_type is set to 0, which was implicit before.
-Cleanup: Remove some extraneous parenthesis.
2007-01-30 11:53:35 +00:00
Darkvater
2ff4492abc
(svn r8428) -Codechange: Add proper names to aircraft subtypes instead of magic numbers and add a function IsNormalAircraft() which tells us whether the aircraft is in fact some flying device or a rotor/shadow.
2007-01-27 12:29:55 +00:00
celestar
dfb5556376
(svn r8402) -Codechange: Move RoadStop-specific enums to the RoadStop class, and changed a one-member enum into a static const. Simplify their naming and add some doxygen-comments to RoadStop
2007-01-25 10:06:58 +00:00
tron
7fffe8b3d4
(svn r8385) -Fix
...
-Regression (r8314): I only did half the necessary changes to move railtype from Engine to RailVehicleInfo. Now do the rest.
2007-01-24 07:14:09 +00:00
tron
81e88a2a7c
(svn r8276) -Fix
...
Change the signature of Swap() to be less error prone, i.e. pass the variables to be swapped by reference instead of passing pointers to the variables.
Just do Swap(x, y) instead of Swap(&x, &y). This prevents accidents when the variables are pointers.
2007-01-19 11:47:48 +00:00
tron
a63fae4202
(svn r8116) Undo r8113
2007-01-14 13:09:17 +00:00
tron
302b54b468
(svn r8113) Fix the #include path to table/strings.h
2007-01-14 08:34:38 +00:00
KUDr
28e969924b
(svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter
2007-01-11 17:29:39 +00:00
celestar
c56ee62ade
(svn r8056) -Codechange: Remove swap_byte, swap_byte, and siblings (some were not used anyway) and replace them by our SwapT implementation
2007-01-11 12:32:10 +00:00
rubidium
a7d0cdf95f
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
2007-01-10 18:56:51 +00:00
KUDr
07c30785ab
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
2007-01-10 18:12:09 +00:00
rubidium
013df98f79
(svn r7759) -Merge: makefile rewrite. This merge features:
...
- A proper ./configure, so everything needs to be configured only once, not for every make.
- Usage of makedepend when available. This greatly reduces the time needed for generating the dependencies.
- A generator for all project files. There is a single file with sources, which is used to generate Makefiles and the project files for MSVC.
- Proper support for OSX universal binaries.
- Object files for non-MSVC compiles are also placed in separate directories, making is faster to switch between debug and release compiles and it does not touch the directory with the source files.
- Functionality to make a bundle of all needed files for for example a nightly or distribution of a binary with all needed GRFs and language files.
Note: as this merge moves almost all files, it is recommended to make a backup of your working copy before updating your working copy.
2007-01-02 19:19:48 +00:00