Commit Graph

100 Commits

Author SHA1 Message Date
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
ludde a069876725 (svn r2573) Codechange: Removed WDF_RESTORE_DPARAM, it's not needed with the new string system.
Also fixed a bug introduced in r2564, forgot to remove 4 global variables in network_gui.c.
2005-07-15 15:09:52 +00:00
ludde 3e62457107 (svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
Added a way to bind a C-string to an openttd string which doesn't modify the game state.
2005-07-14 09:43:59 +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
Darkvater 5fed47964e (svn r2420) - Codechange: magic number elminitation of cursorsprites. 2005-06-06 13:47:06 +00:00
Darkvater b438b1248c (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 2005-06-02 19:30:21 +00:00
Darkvater 01f06784e7 (svn r2381) - Fix: [ 1210610 ] Endgame window on easy difficulty results in infinite loop. Oops. Seperated the window classes of endgame and highscreen. 2005-05-30 13:06:15 +00:00
Darkvater d3ce687daf (svn r2344) - Fix (regression): [ 1197216 ] Error: !invalid string id 0 in GetString. Dedicated server also had the endgame window shown and because now it is properly no-player anymore it crashed. 2005-05-17 20:54:05 +00:00
tron b18e4d1a8d (svn r2329) CMD_CHANGE_PRESIDENT_NAME and CMD_CHANGE_COMPANY_NAME don't use p1, so don't send any meaningful value for it when invoking these commands 2005-05-16 08:41:42 +00:00
tron fea5965679 (svn r2324) Introduce _cmd_text for passing strings with a command instead of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes. 2005-05-15 18:50:55 +00:00
Darkvater 788286e9d3 (svn r2315) - Fix: [ 1187613 ] No HQ present for competitor, disable 'View HQ' button, inspired by lucaspiller 2005-05-14 22:51:15 +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 5e6923e936 (svn r2290) - CodeChange: protect the next batch of commands. This brings us to a total of 61, which is 53% :)
- CodeChange: To correctly accept engine-prototypes, the best-player checking has been moved to its own function, I hope it functions the same as before.
- CodeChange: Added symbolic types of PlayerID, OrderID and EngineID. For engines also added GetEngine() and IsEngineIndex(), similar to the other such functions.
- CodeChange: To correctly build industries, some tables have been moved to build_industry.h. The only way to find out currently if an industry is valid in a climate is by looping all industries and checking if it matches. Also to comply with the patch setting build_rawmaterial_industries, it is assumed that these industries do not accept any cargo of any type. This can and probably should changed in the future to some flag in their struct. Also use _opt_ptr instead of _opt.
- CodeChange: implemented the HQ checking code inspired by MarkR2 in "[ 1190944 ] Many commands not checked for security".  Unfortunately it is impossible to prevent only deleting a HQ by a modified client atm.
- CodeChange: For insert order and modify order their parameters are implicitely truncated to 8 bits, instead of the 16 bits said in the comments.
2005-05-11 00:00:27 +00:00
tron d17476b058 (svn r2271) CMD_SET_PLAYER_FACE, CMD_SET_PLAYER_COLOR, CMD_INCREASE_LOAN, CMD_DECREASE_LOAN only make sense for the current player, so don't explicitly pass a player number 2005-05-06 06:56:30 +00:00
Darkvater d102d0c26d (svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
- Some variables are really special and cannot be assigned normally, use their callback procedure for assignment/querying. This commit also obsoletes "[1172804] Console set command cleanup"
2005-05-02 15:52:19 +00:00
tron 204d08140a (svn r1867) Include tables/sprites.h only in files which need it 2005-02-13 11:18:02 +00:00
tron 2fb453a4a5 (svn r1827) Next iteration of the byte -> char transition: some string drawing functions and buffers 2005-02-06 18:30:45 +00:00
tron 44f48ce915 (svn r1610) Remove trailing whitespace (last time ever, i hope) 2005-01-23 13:09:35 +00:00
darkvater c245d93e7d (svn r1578) -Fix: [1102454] dedicated server crashes after some hours (highscore problems for dedicated...should be really solved now) 2005-01-20 18:57:09 +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
darkvater f9b5f704b1 (svn r1518) -Fix: server issue where some company names were wrong
-Fix: Highscore troubles; accessing members of deleted window
2005-01-15 01:52:23 +00:00
darkvater 75474e5bf1 (svn r1516) -Cheating players do not get their names added to the highscore table/file
-Fixed issue where highscore window would not come up after endgame screen
-Fix: VS6 compiles once again (braindead compiler)
2005-01-15 00:46:45 +00:00
dominik 34db065631 (svn r1506) Fix: [ 1102275 ] Game crashed when clicking "new face" or "company color" twice 2005-01-14 14:56:50 +00:00
darkvater 352cf002b2 (svn r1502) -Fix: [1101889] Crash under windows... stupid typo in player_gui.c ^ should've been &
-Fix: in multiplayer clientlist can only be opened once
2005-01-13 20:46:39 +00:00
darkvater 06cc62f40d (svn r1496) -Fix: highscore no longer crashes in network games with a dedicated server. At the end of the game (can only be set by the server) the highscore is shown for the top5 companies of that game
-Fix: fixed some compiler warnings
-Added PF_NETWORK_ONLY flag to settings. Such a setting can only be modified in a network game.
2005-01-13 16:28:47 +00:00
darkvater 5fac6142e8 (svn r1479) -Added highscore chart (accessible from the difficulty window) with top5 companies for a given difficulty (select the difficulty in the menu)
-Added endgame score on 1 jan 2051 where you are added to the highscore if sufficiently large points have been accumulated. Game is paused while
-These values are saved in hs.dat; added read/write functions for it
-Added code to delete all windows to show charts. There is one issue left: somehow a news-gui pops up in front of the the chart at the end of the game.
2005-01-11 00:54:06 +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
darkvater deabdb666f (svn r1404) -Fix: Company password no longer shares a widget with buying shares 2005-01-06 18:54:13 +00:00
truelight 2c9cd8f68c (svn r1401) -Fix: glitches in train-depot GUI (tnx to Hackykid)
-Fix: glitch in Company Overview GUI (Hackykid)
2005-01-06 17:40:57 +00:00
darkvater 4c5f6fe360 (svn r1379) -Fix: various GUI glitches. Added default sizes to various widgets. Sticky/Resize- and Scrollbar must be 11 pixels wide, Horizontal scrollbar 11 pixels high, caption must be 13 pixels. I hope I didn't forget any widgets, the game will assert for that so report them to me! 2005-01-04 21:28:09 +00:00
darkvater 88b8a01da6 (svn r1374) -Feature: Add sticky item to finances window; sticky remains when requesting big/small window
-Moved resize icon in save dialog to bottom-right
2005-01-04 17:04:10 +00:00
truelight a94fe04a9a (svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
how the system works. All useful windows are already made resizable. Enjoy :)
-Fix: fixed some GUI-glitches and flaws along the way
2005-01-03 19:45:18 +00:00
darkvater 0533d9ff6e (svn r1260) -Fix: [1090357] Patch for braindead MinGW compiler (luzi82) 2004-12-23 19:33:17 +00:00
darkvater c4836bbd70 (svn r1239) -Feature: Added gui option of setting company password. It can be found in the 'company information' window
-Spiced up 'set company_pw' a bit, where if no pw is typed, it shows the current one.
-Added a space between company name and player; looks better
2004-12-22 23:24:53 +00:00
truelight 9595ee80e3 (svn r1107) -Fix: [Network] A spectator can no longer buy/sell shares of companies 2004-12-15 20:24:26 +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
truelight b8f6d41418 (svn r942) -Merged branch/network back into the trunk 2004-12-04 17:54:56 +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 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
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
darkvater 8308432cf9 (svn r187) -Feature: [1024044] Show max loan in finances window. (ledow)
-some type fixes in txt files
2004-09-08 19:26:10 +00:00
darkvater 56435c8775 (svn r177) -Fix: padded out Widget code to solve warnings on C99 compiler (Tron)
-Fix: added WIDGETS_END macro for WWT_LAST which does this for all last widget-types
2004-09-07 21:48:09 +00:00
darkvater 52f4a7eb16 (svn r151) -Fix: [1021566] Buy/Sell 25% share button is broke 2004-09-03 18:00:19 +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
darkvater 637a567acb (svn r17) -Fix Player window fixes, Getstring id0 fixes, Finances window is now ok 2004-08-10 21:29:47 +00:00
truelight e475edd548 (svn r15) -Fix: loan increase/decrease showed 1 instead of 10000 2004-08-10 19:03:16 +00:00
darkvater e4940ebc79 (svn r3) -[1005611] Player Window patch: When looking in dropdownlist for player stuff, it will say
for all human players (Player #), not only for the first 2
2004-08-10 14:32:17 +00:00
truelight efaeb275f7 (svn r1) Import of revision 975 of old (crashed) SVN 2004-08-09 17:04:08 +00:00