Darkvater
2131f68ae2
(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
truelight
991d5c6234
(svn r2921) -Codechange: moved all AI-code to 1 central place (ai/ai.c)
...
-Fix: removed the ability for the oldAI to cheat (this will criple him somewhat)
-Add: base-code for many improvements to come in the AI-system
-Add: added base-code for multiplayer AIs (DOES NOT WORK YET!)
2005-09-07 15:10:11 +00:00
tron
14e80ca159
(svn r2830) Move CheckSwitchToEuro() to currency.[ch] and hide the truth about the custom currency behind a #define
2005-08-07 12:41:57 +00:00
tron
baca040df0
(svn r2815) Store the currency information in one central place instead of scattering it in several unrelated files
2005-08-06 14:59:54 +00:00
tron
124b352862
(svn r2794) Fix a comment and get rid of some parentheses using DeMorgan's law
2005-08-02 20:04:09 +00:00
ludde
29564f9fcf
(svn r2781) Fix some of the issues with variables in .h files.
2005-08-01 16:31:19 +00:00
celestar
04f4d8237b
(svn r2736) -Codechange: De-mystified GfxDrawFillRect a bit, and used enums from table/sprites.h. You can now change the number of bits used for sprites and switches in the SpriteSetup enum and the rest should work automagically. Can be used to increase the number of active sprites to 2^19 in case there are no colortables (recolor sprites) in any newgrf. We should possibly move the the colortables to an own list, but how to detect them in a newgrf.
2005-07-28 09:17:32 +00:00
tron
a227065ab7
(svn r2701) Insert Id tags into all source files
2005-07-24 14:12:37 +00:00
tron
559babcdc9
(svn r2673) Include functions.h directly, not globally via openttd.h
2005-07-22 07:02:20 +00:00
tron
0762aa9ec9
(svn r2669) Shuffle some more stuff around to reduce dependencies
2005-07-21 22:15:02 +00:00
tron
d71788c402
(svn r2660) Get rid of some more shifting/anding/casting
2005-07-21 06:31:02 +00:00
ludde
3486e7e9d5
(svn r2580) Change: Added {INDUSTRY} command for printing industry names instead of the old {TOWN} {STRING} way.
...
- The formatting of the industry name can be controlled with the string STR_INDUSTRY_FORMAT.
Change: Changed several occurences of {STRING1} into {TOWN} to get rid of townnametype being used directly.
2005-07-15 18:30:13 +00:00
ludde
2fa79c9b4d
(svn r2572) - Codechange: [string] Changed string system so it's not as dependent on decode_parameters
...
- Feature: [strgen] Allow changing the order of parameters in translated strings.
- Use {1:TOWN} syntax to set the order.
- Codechange: [strgen] Rewrote lots of strgen internals.
2005-07-15 14:53:44 +00:00
tron
8c1d74162f
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
2005-07-13 18:04:01 +00:00
tron
bec5e4fb4c
(svn r2487) Replace TILE_XY by TileXY/TileDiffXY
2005-06-25 16:44:57 +00:00
tron
3154e7148d
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
2005-06-24 12:38:35 +00:00
celestar
aa7334a3ec
(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer
2005-06-21 16:28:17 +00:00
celestar
9b8cb17831
(svn r2441) -Feature: You can now give transfer order to set up feeder systems
2005-06-15 16:58:15 +00:00
hackykid
eb173099e9
(svn r2411) - Codechange: Have trains cache stuff like consist power/weight/max speed instead of recalculating it each time.
...
- Fix: Station ratings now depends on the max speed of a consist, without being affected by other speed limits from realistic acceleration.
2005-06-05 15:37:00 +00:00
Darkvater
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
2005-06-02 19:30:21 +00:00
hackykid
f7dcd2e834
(svn r2390) - Codechange: Fix some warnings on GCC 4.0.0
2005-06-01 11:52:44 +00:00
Darkvater
55423efb06
(svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big.
...
- Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
2005-05-30 22:16:05 +00:00
Darkvater
31f8f6a7b5
(svn r2301) - CodeChange: prettyify ChangeOwnerShipOfPlayerItems() a bit
...
- CodeChange: add comments to a very ugly part of the code (network_client.c); that enforces that the server gives an ID to the client.
2005-05-12 23:47:45 +00:00
Darkvater
921cc4e94a
(svn r2297) - CodeChange: server-check the next batch of commands.
...
- CodeChange: since only the server will be able to modify difficulty settings, leave the checking of correct values besides, and trust users will join legit servers.
- CodeChange: for renaming signs, only check if GetDParam(); eg _decode_parameters is empty ('\0') or not, instead of the extra check of players, etc. That basically does the same thing. Also dirty sign two times when renaming, once before, once after the action. Because if the name becomes shorter and you update only after, garbage remains on the screen.
- CodeChange: made GetMaskOfTownActions() available to the town-cmd to double-check if the action was available to the player. For this purpose the hardcoded _local_player has been removed from the function and is now passed as a parameter.
2005-05-12 00:11:37 +00:00
Darkvater
972448d5ae
(svn r2211) - Fix(ish): When eternally looping in 2090 don't go increasing the inflation anymore because it will just rise to insanely high values beyond all imagination.
2005-04-16 20:37:17 +00:00
Darkvater
13fc3271f4
(svn r2155) - Fix: Company value was $2 when value more than an int32 could handle (use max64 instead of max)
2005-04-06 09:34:56 +00:00
celestar
5d937e4a23
(svn r2138) -Fix: [ 1144154 ] The map has two dimensions, not one
2005-04-03 06:26:31 +00:00
truelight
05dbeaeba4
(svn r2065) -Fix: reverted revision 2044, because it had more negative effects than positive
2005-03-25 16:10:33 +00:00
truelight
1536c3ae5a
(svn r2044) -Fix: fix that TriggerVehicle is called from the wrong user
2005-03-24 14:43:40 +00:00
truelight
9b1e6e6d3e
(svn r2043) -Fix: committed too many files in the last commit
2005-03-24 14:33:05 +00:00
truelight
fbb11ea366
(svn r2042) -Fix: forgot to remove a printf ;)
2005-03-24 14:31:27 +00:00
truelight
ae4995c671
(svn r1920) -Fix: no longer a station where you only unload is bad for your town-rating
2005-03-03 14:56:28 +00:00
truelight
862faa16c0
(svn r1919) -Fix: Minimum profit of vehicles was calculated wrong for Performance Rating
2005-03-01 19:32:55 +00:00
tron
9efcfc65af
(svn r1911) Put back an "if" i accidently removed in r1898
2005-02-23 14:12:32 +00:00
tron
51eef8c5b7
(svn r1898) Remove some unused macros from macros.h and move some others to more appropriate headers
2005-02-22 12:48:03 +00:00
tron
0381073e56
(svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c)
2005-02-06 08:18:00 +00:00
tron
0b8876e946
(svn r1812) [1117058] Use CT_WATER instead of CT_STEEL when accounting water which gets delivered to a town (worked because CT_STEEL and CT_WATER share the same enum number)
2005-02-06 07:49:41 +00:00
truelight
ab3ed5c431
(svn r1770) -Fix: Hopefully last pieces of code that are containing a station-id
...
(and should be an uint16, not uint8)
2005-02-02 16:16:43 +00:00
tron
7bbcf5875c
(svn r1749) Move the functions which calculate distances to map.[ch] and give the more meaningful names
2005-01-31 07:23:15 +00:00
bjarni
8e7d88c85b
(svn r1599) fix: autoreplace window now updates when inflation alters prices
...
Hackykid and not LordOfThePigs pointed out the update problem fixed in rev 1597. Sorry. Sometimes development can get too fast
2005-01-22 23:41:23 +00:00
tron
189ca73707
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
2005-01-22 20:23:18 +00:00
bjarni
2fd3553d78
(svn r1568) made an enum of train subtypes to make the code more readable
2005-01-19 19:15:03 +00:00
tron
3279a7c9a2
(svn r1520) Trim 134 (!) lines with trailing whitespace ):
2005-01-15 08:58:31 +00:00
celestar
0074496ea4
(svn r1495) -Fix: Loan does not count against the company value
...
-Feature: New companies receive a 5-year protection period
2005-01-13 09:55:32 +00:00
darkvater
29b4ab04c3
(svn r1465) -Fix: [1099101] starting year patch goes out of range. Clamped year between 1920-2090 as wel as adding defines for it.
2005-01-10 14:43:00 +00:00
darkvater
49e7939a10
(svn r1460) -Fix: [1099225] Bug Fix - Vehicle Lists not updated at Acqusition (thx tamlin and mpetrov) This also fixes some bug but can't find i right now.
2005-01-10 12:14:15 +00:00
darkvater
116789022c
(svn r1418) -Feature: [1098254] (dis)Allow Shares. Add patch options to allow buying/selling of shares (Hackykid)
2005-01-07 23:59:59 +00:00
truelight
63e97754fb
(svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns and _industries
...
(in prepare of dynamic arrays):
- DEREF_XXX is changed into GetXXX
- All direct call are directed via GetXXX
- struct Industry has now an index-field
- ENUM'd some stuff
- Replaced home built loops with FOR_ALL_XXX
- Added _stations_size, _vehicles_size, ... which gives the length of the
array (which will be dynamic in the near future)
- Changed lengtof(XXX) to _XXX_size (e.g. _stations_size)
- Removed all endof(XXX) (because mostly it was part of a FOR_ALL_XXX)
- Made the sort-functions of all 4 dynamic
- Made all 4 Initialize functions more of the same
- Some minor tab-fixing and stuff
(tnx to Tron for proof-reading my 100kb patch ;))
Note for all: please do NOT directly call _stations, _vehicles, _towns and
_industries, but use the right wrapper to access them. Thank you.
Ps: please also do not use 'v++', where v is of type Vehicle *.
2005-01-06 22:31:58 +00:00
tron
c0702318d2
(svn r1344) Use MapSize[XY]() (or MapSize()/MapMax[XY]() where appropriate) instead of TILES_[XY]
2005-01-03 18:59:58 +00:00
truelight
546fcfa3ec
(svn r1301) -Codechange: _industries finally has FOR_ALL_INDUSTRIES too
2004-12-30 10:03:35 +00:00
truelight
e6a59be8c0
(svn r1291) -Codechange: prepared subsidies and towns to become an uint16 (happens
...
after savegame bump)
2004-12-28 17:40:15 +00:00
truelight
41201f488c
(svn r1287) -Fix: reversed 1285, because it is not the solution. This also means
...
that getting a lot of money with shares is back... :(
2004-12-28 09:55:55 +00:00
truelight
a5a811f767
(svn r1285) -Fix: your loan is now substracted from your company value
2004-12-28 09:29:40 +00:00
truelight
d91326fb4a
(svn r1247) -Fix: [ 1090313 ] Shares are now also sold when a company goes bankrupt
2004-12-23 14:02:40 +00:00
dominik
e297eada07
(svn r1233) Fixed several currency issues. Now currencies should work correctly again.
2004-12-22 19:48:27 +00:00
dominik
b7f71b026d
(svn r1222) Currency cleanup. Changed some currency symbols according to forum suggestions (thx ChrisCF) and rearranged the currencies alphabetically (except for the major ones).
2004-12-22 16:54:55 +00:00
truelight
0e19f74c16
(svn r1168) -Cleanup: [Network] Cleaned the network code a bit. Added 'const'
...
and 'void' where needed, prefixed all functions, typedefs and global
vars with 'Network' and organized all externals nicely.
2004-12-19 10:17:26 +00:00
truelight
dccd3adb9b
(svn r1128) -Fix: [Network] Going bankrupt of human-players was corrupted in networkgames
2004-12-16 11:36:00 +00:00
tron
765ecfed84
(svn r1117) Move map arrays and some related macros into their own files map.c and map.h
2004-12-15 22:18:54 +00:00
truelight
967762e5ef
(svn r1086) -Fix: [Network] [ 1084774 ] Fixed quick-share-sell bug
2004-12-14 18:17:24 +00:00
truelight
2e7f669153
(svn r1061) -Fix: [Network] Compiling without ENABLE_NETWORK now works again correctly
2004-12-13 17:58:53 +00:00
truelight
397bd915a3
(svn r1023) -Fix: [Network] [ 1083692 ] You can no longer buy out a company in MP
...
because of the lag between commands (anyway, I hope)
2004-12-12 14:00:25 +00:00
tron
7c2448ecea
(svn r955) Replace uint16 for orders with struct Order
...
This adds no functionality, but is a stepping stone for future improvement (like 16bit order indices) and is easier to read.
This changes preserves binary compatibility wrt savegames.
2004-12-05 12:43:04 +00:00
truelight
b8f6d41418
(svn r942) -Merged branch/network back into the trunk
2004-12-04 17:54:56 +00:00
tron
e56c3cddd8
(svn r925) Use sound enums
...
Also play the correct sound when a toyland road vehicle breaks down
2004-12-04 09:26:39 +00:00
tron
fdb447ac55
(svn r901) Small step in the process to clean up the DPARAM mess:
...
- reduce to 2 sizes (*DParam64 for 64bit values, *DParam for the rest)
- use inline functions instead of macros
- add assert()s to check for buffer overruns
2004-12-02 22:53:07 +00:00
tron
d701668f50
(svn r853) -Feature: Implement improved vehicle loading algorithm
...
It's not FIFO loading, but does the right thing in the common case:
If a vehicle is empty and another vehicle is already loading the same cargo at this station then the vehicle waits.
This is an reworked version of [ 1072211 ] submitted by Hackykid, thanks!
2004-11-29 11:59:09 +00:00
tron
acbd1801c7
(svn r815) Include strings.h only in the files which need it.
...
This should reduce the compile time after altering english.txt by about 1/3, because "only" 62 instead of 90 .c files must be recompiled.
2004-11-25 10:47:30 +00:00
tron
0ea87b6473
(svn r792) Small cleanup: Kill a goto
2004-11-24 12:47:25 +00:00
tron
13f0b6c0cf
(svn r654) Hopefully complete support for randomized variational spritegroups (i.e. the cars transporter in DBSetXL gets different cars each time) (pasky)
2004-11-17 08:52:47 +00:00
tron
d641175e3c
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
...
This includes 2 fixes
-Fix: [1048596] Monorail and Maglev sounds are swapped (r511)
-Add special case to load the jackhammer sound (r478)
The rest are cleanups und enumeration to make merging possible/easier
2004-11-05 23:12:33 +00:00
truelight
a69e422cdd
(svn r266) -Fix: hopefully fixed the desync problem nicely (and reverted the
...
workaround for it)
2004-09-15 18:36:33 +00:00
darkvater
72457bac0d
(svn r241) -Fix: Trailing spaces :O
2004-09-13 23:43:54 +00:00
signde
bb2f8d8d1a
(svn r240) -Fix: desync on subsidy generation
...
-Fix: sometimes commands got executed to early on some clients
-Feature: universal event packets for transmitting subsidys
2004-09-13 22:49:11 +00:00
darkvater
fc9a450e75
(svn r237) -Fix: [1025836] Company value problem (again). Now company value rightly shows the value, including ALL your money.
...
-Fix: Graphs now accomodate 64bit numbers (so the company value graph doesn't plummet into -... if value is too big)
-Strgen: added CURRCOMPACT64 for this, and 64bit versions of several macros.
2004-09-13 20:38:36 +00:00
signde
1fb915df69
(svn r207) -Codechange: randomizer handling
...
-Fix: desync problem fixes
-Fix: server doesnt hang anymore when a client timed out
-Feature: low latency connection enhancements [*net_sync_freq, *net_ready_ahead]
2004-09-11 19:34:11 +00:00
truelight
4ccd84f94b
(svn r201) -Fix: [1025836] Company values bigger dan int32 were put to negative
...
-Fix: [1025836] Long bridges had negative value
-Fix: Typo in endian_check.c (Zr40)
2004-09-11 09:40:19 +00:00
truelight
eb49a19460
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
2004-09-10 19:02:27 +00:00
darkvater
3b96ad994c
(svn r148) -Feature: Company HQ can now be moved somewhere else (cost 1% of company value). Water floods HQ.
...
-Some layout fixes for command.c
-Tileinfo debug window in console now shows Tile in decimal numbers
2004-09-01 21:54:12 +00:00
dominik
a6f2257600
(svn r117) Feature: Performance details window in company league menu (TrueLight)
2004-08-23 10:59:03 +00:00
darkvater
5a0a007e45
(svn r34) -Fix [990770] Cargo delivery area patch for bug #989322 . If station sign was too far away, there were goods acceptance/delivery issues (Celstar)
2004-08-12 22:29:37 +00:00
dominik
39267dbad5
(svn r10) Some documentation on _price_base array
2004-08-10 16:49:56 +00:00
darkvater
a32d8553e7
(svn r5) -Fix: townname generation of TTDLX savegames. All work
...
except for German Townnames (also fix one typo on
English town-names)
-CodeChange: *act_paper to *act_water in Town to
more resemble its use
-Fix: AI players now retain AI status. Since TTDLX
savegame status is not fully documented, some holes
exist (AI state is set to one without a vehicle, otherwise
it crashes)
2004-08-10 14:42:52 +00:00
truelight
efaeb275f7
(svn r1) Import of revision 975 of old (crashed) SVN
2004-08-09 17:04:08 +00:00