summaryrefslogtreecommitdiff
path: root/players.c
AgeCommit message (Collapse)Author
2006-08-29(svn r6222) Remove struct ColorList, because the names of its attributes are ↵tron
plain confusing All the struct holds is a simple colour gradient, so using a simple array with 8 entries is more clear Also add the names of colour the gradients as enum
2006-08-28(svn r6183) Move GetDrawStringPlayerColor() out of gfx.[ch]tron
2006-08-22(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. ↵rubidium
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
2006-08-20(svn r5999) -Feature: change the original date format to a 32 bits format ↵rubidium
based at the year 0. The game date subsystem now allows someone to start in the year 0 and continue up to the year 5 000 000. However, you currently cannot build anything before 1920 as there is no newgrf support for dates before 1920 or after 2090 yet.
2006-08-20(svn r5974) -Codechange: added casts all around the place to make Windows ↵truelight
64bit happy (michi_cc)
2006-08-16(svn r5926) -Codechange: make _cur_year contain the full year, instead of ↵rubidium
the offset since 1920 -Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
2006-08-15(svn r5915) -Cleanup: some variables were named *_date while they were only ↵rubidium
holding years; rename these variables to match this.
2006-08-14(svn r5887) -Cleanup: move date related functions, defines and variables to ↵rubidium
date.[ch] -Cleanup: fix whitespace related coding style issues in date.[ch] -Cleanup: make original comments doxygen compatible and remove/change outdated comments
2006-08-14(svn r5886) -Fix [FS#273]: Incomplete removal of player owned property due ↵Darkvater
to lack of money.
2006-06-27(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectaculartron
2006-06-14(svn r5262) Add symbolic names for the aircraft subtypes. not perfect, but ↵tron
better than raw numbers
2006-06-10(svn r5210) Many small changes which piled up: const, unsigned, variable ↵tron
scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
2006-05-19(svn r4915) - Fix: SLE_UINT8 replaced by SLE_BOOL for bool variables (found ↵KUDr
by Celestar)
2006-04-10(svn r4342) Change the first two parameters of commands - virtual pixel ↵tron
coordinates of the tile to operate on - to a TileIndex Remove DoCommandByTile(), because now it does the same as DoCommand()
2006-03-31(svn r4201) - Codechange: Do for _engine_info[] what we do for ↵peter1138
_*_vehicle_info[]; create and use a function to retrieve data, and ensure constness.
2006-03-27(svn r4136) CodeChange : Revert part of r4092 (as spotted by Tron) and ↵belugas
clean-up a little further
2006-03-24(svn r4092) CodeChange : Named sprites instead of magic numbers plus ↵belugas
create/use helper macro/enum for recoloring scheme
2006-03-16(svn r3895) - Add proper SLE(G)_CONDNULL macros for the empty space ↵Darkvater
reservation in savegames and update where used - Also add this capability to settings
2006-02-20(svn r3627) - Change all hardcoded 255 max-saveload versions with the define ↵Darkvater
SL_MAX_VERSION
2006-02-06(svn r3568) - Fix: constantizing side-effect of qsort in r3563. Ugly? Yes. ↵Darkvater
Makes MSVC happy? Yes.
2006-02-06(svn r3565) - Fix: On loading a game, GetPlayerRailtypes() didn't account ↵peter1138
for the fact that vehicles are introduced a year after their introduction date. This will also relieve possible (rare) network desyncs.
2006-02-06(svn r3563) Simplify the code for calculating the highscore table in network ↵tron
games and saving of old ecenomy data
2006-02-06(svn r3562) Remove pointless buffer copiestron
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2006-01-31(svn r3500) - Workaround the inaccurate count of spectators/companies that ↵Darkvater
can happen in certain border-cases. For now just dynamically get this value when requested so it is always right. To do properly all player/client creation/destruction needs a hook for networking.
2006-01-29(svn r3468) - Fix: Rail type availability should take climate type into account.peter1138
2006-01-25(svn r3427) - Feature: Allow seeing and setting the maximum amount of ↵Darkvater
companies and spectators for a server. This can be changed/viewed during runtime as well in the console.
2006-01-12(svn r3396) - Autoreplace changes:peter1138
- Change fixed array per player to a single pool. This avoids future problems with vehicle numbers and decreases savegame size. Engine replacements from previous savegames will be lost. - Move engine replacement code from players.c to engine.c. (thanks to blathijs for rewriting this)
2006-01-05(svn r3365) Staticise 36 functionstron
2006-01-02(svn r3359) - Autoreplace GUI: When starting or stopping a replacement, ↵peter1138
redraw the replace window after the command has completed, rather than after calling the command.
2005-12-26(svn r3343) Fix calculation of available rail types where all engines of a ↵peter1138
particular type are obsolete.
2005-12-14(svn r3300) Remove unreachable code - in this case some duplicate breakstron
2005-11-26(svn r3239) - Codechange: Introduce and use helper functions for engine ↵peter1138
replacement code.
2005-11-22(svn r3226) -Fix: GPMI implementation had minor glitchestruelight
-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-21(svn r3224) -Add: Allow the NewAI to work in Multiplayer Games (switchable ↵truelight
via patch settings, off by defaut). An other step to AIScripts. WARNING: this is still highly experimental and has known bugs!
2005-11-14(svn r3181) -Bracingtron
-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(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBITtron
2005-11-13(svn r3176) Use proper types, not some variants of inttron
2005-11-07(svn r3155) -Feature: [autoreplace] autoreplace can now remove cars from too ↵bjarni
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
2005-11-07(svn r3154) - Fix: Last value of an array is lengthof-1; let's keep this at ↵Darkvater
a typo, shall we :P
2005-11-07(svn r3151) - Fix: showing the highscore might crash the game with an ↵Darkvater
invalid string message in the case when a highscore file was used before certain strings were added. - Codechange: protect _endgame_perf_titles from out-of-bounds access.
2005-10-31(svn r3109) Replace two occurrences of '256' with TOTAL_NUM_ENGINESpeter1138
2005-10-25(svn r3087) Rewrite GetPlayerRailtypes() so it doesn't depend on magical ↵tron
numbers to sort out wagons
2005-10-22(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in ↵tron
comments, excess empty lines, minor other changes nothing spectacular, just some stuff, which piled up
2005-10-20(svn r3073) int/byte -> EngineID/PlayerID/VehicleIDtron
0/-1 -> INVALID_ENGINE 0x10 -> OWNER_NONE
2005-10-19(svn r3064) Replace some numbers by sprite namestron
2005-10-07(svn r3024) -Codechange: Another batch of replacements of ↵tron
int/uint/int16/byte/-1 with proper types and constants
2005-10-03(svn r3010) Get rid of quite some dubious casts, either by using GB(), ↵tron
proper types or just removing them
2005-09-30(svn r3001) s/Player*/const Player*/tron
s/byte/PlayerID/ s/int/PlayerID/ and related changes
2005-09-28(svn r2995) Replace 0xFF/0xFFFF with ↵tron
CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate