summaryrefslogtreecommitdiff
path: root/player_gui.c
AgeCommit message (Collapse)Author
2006-10-03(svn r6619) -Codechange: Use accessors for disabled_state.belugas
Another step toward merging XTDwidget. The only two files not converted (window.h and widget.c) will be done at the very last commit)
2006-10-02(svn r6612) -Codechange: Use accessors for hidden_state.belugas
Another step toward merging XTDwidget. The only two files not converted (window.h and widget.c) will be done at the very last commit)
2006-09-27(svn r6523) - 'Feature'/'Fix': Add tooltips to the new company colour windowpeter1138
2006-09-23(svn r6499) -Codechange: Finally, got "byte event" outside of the union ↵belugas
WindowEvent, which is now a struct
2006-09-15(svn r6457) - Codechange: Allow the company colour window to stay open after ↵peter1138
the company information window has been closed, as the company colour window is now much larger.
2006-09-15(svn r6456) - Replace single colour scheme for passenger wagons with ↵peter1138
separate schemes for each of steam, diesel or electric engines. Savegames from the previous revision will not load.
2006-09-15(svn r6455) - Feature: Add 2cc (two company colours) livery schemes. This ↵peter1138
replaces the original colour selection window and bumps the saveload version. Liveries are supported for all vehicles, not just those with 2cc support. Thanks to lakie for GUI inspiration.
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 r6002) -Cleanup: remove the now redundant BASE_YEAR constant.rubidium
2006-08-20(svn r5967) -Change: use right alignment for the year in the player's ↵rubidium
balance window instead of centering (about) 'string width' / 2 from the right edge
2006-08-19(svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for ↵truelight
textboxes to only allow certain patterns (like numbers only)
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 r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and ↵rubidium
BASE_YEAR when comparing _cur_year with a 'full' year. -Cleanup: replace some magic '1920' values with BASE_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-07-26(svn r5609) CodeChange : Apply coding stylebelugas
2006-06-27(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectaculartron
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-03-24(svn r4092) CodeChange : Named sprites instead of magic numbers plus ↵belugas
create/use helper macro/enum for recoloring scheme
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2005-12-07(svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect ↵peter1138
their actual use, and add "Close Window" tooltip where missing.
2005-11-29(svn r3247) - Fix: "[ 1335580 ] sticky windows not sticky anymore" peter1138
Determine clicked status of sticky icon from window flags rather than the widget click state. This keeps the status in one place where it can't get out of sync.
2005-11-18(svn r3218) -Feature: Multiheaded train engines will now stay in the same trainbjarni
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead This fixes the assert when moving multiheaded engines (introduced in r3144) Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs -Codechange: train subtype is now a bitmask This allows fast access to info like if it is a wagon or engine and if it is in front and so on Note: savegame version bump
2005-11-15(svn r3184) GB/SBtron
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-13(svn r3173) Use the trinary operator and switch to improve readabilitytron
Also align short cases nicely
2005-11-13(svn r3172) static, consttron
2005-10-23(svn r3078) Some more stuff, which piled up:tron
- const, whitespace, indentation, bracing, GB/SB, pointless casts - use the trinary operator where appropriate - data types (uint[] -> AcceptedCargo, ...) - if cascade -> switch - if (ptr) -> if (ptr != NULL) - DeMorgan's Law - Fix some comments - 0 -> '\0', change magic numbers to symbolic constants
2005-10-07(svn r3024) -Codechange: Another batch of replacements of ↵tron
int/uint/int16/byte/-1 with proper types and constants
2005-09-30(svn r3001) s/Player*/const Player*/tron
s/byte/PlayerID/ s/int/PlayerID/ and related changes
2005-09-30(svn r2999) Do not pass if the HQ gets built for the first time or gets ↵tron
relocated as parameter - the command function has to check this anyway
2005-09-18(svn r2962) - const correctness for all Get* functions and most Draw* ↵Darkvater
functions that don't change their pointer parameters - change a lot of byte player types to PlayerID - beautify header files, same "#endif /* filename */" ending
2005-07-31(svn r2766) Remove string and make use of the plural featuretron
2005-07-24(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic ↵celestar
numbers by enums. There remains work in gfx.c to move the "transparency" and "recolor" bits around to make space for more sprites. However, 2800 additional sprites can now be loaded. There also remains cleanup and Doxygen work on many of the header files.
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-21(svn r2669) Shuffle some more stuff around to reduce dependenciestron
2005-07-15(svn r2573) Codechange: Removed WDF_RESTORE_DPARAM, it's not needed with the ↵ludde
new string system. Also fixed a bug introduced in r2564, forgot to remove 4 global variables in network_gui.c.
2005-07-14(svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is ↵ludde
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-06-21(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayercelestar
2005-06-06(svn r2420) - Codechange: magic number elminitation of cursorsprites.Darkvater
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-05-30(svn r2381) - Fix: [ 1210610 ] Endgame window on easy difficulty results in ↵Darkvater
infinite loop. Oops. Seperated the window classes of endgame and highscreen.
2005-05-17(svn r2344) - Fix (regression): [ 1197216 ] Error: !invalid string id 0 in ↵Darkvater
GetString. Dedicated server also had the endgame window shown and because now it is properly no-player anymore it crashed.
2005-05-16(svn r2329) CMD_CHANGE_PRESIDENT_NAME and CMD_CHANGE_COMPANY_NAME don't use ↵tron
p1, so don't send any meaningful value for it when invoking these commands
2005-05-15(svn r2324) Introduce _cmd_text for passing strings with a command instead ↵tron
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-14(svn r2315) - Fix: [ 1187613 ] No HQ present for competitor, disable 'View ↵Darkvater
HQ' button, inspired by lucaspiller
2005-05-12(svn r2297) - CodeChange: server-check the next batch of commands.Darkvater
- 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-11(svn r2290) - CodeChange: protect the next batch of commands. This brings us ↵Darkvater
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-06(svn r2271) CMD_SET_PLAYER_FACE, CMD_SET_PLAYER_COLOR, CMD_INCREASE_LOAN, ↵tron
CMD_DECREASE_LOAN only make sense for the current player, so don't explicitly pass a player number