Commit Graph

99 Commits

Author SHA1 Message Date
Darkvater
616028a453 (svn r7415) -Codechange: Don't use typedef enum for simple widget enumerators when we will never use
their type anyways.
2006-12-07 13:00:41 +00:00
Darkvater
e786cd5c6b (svn r7128) -Codechange: Replace magic numbers by magic enums (windowdesc positioning WDP_AUTO = -1) 2006-11-10 19:24:14 +00:00
Darkvater
0e1485f55e (svn r7022) -Fix [FS#292]: Properly guard against viewing company-sensitive information from
invalid players (eg spectators) which could lead to crashes.
2006-10-31 21:15:56 +00:00
Darkvater
0fb59806c5 (svn r7008) -Fix [FS#369]: Crash at game end when server company is bankrupt 2006-10-31 01:45:41 +00:00
Darkvater
c7c65ce6d5 (svn r6925) -Codechange: Be more strict with widget distinctions. WWT_PANEL is only plain panel,
WWT_IMGBTN must contain an image for drawing. Renamed WWT_PANEL_2 to WWT_IMGBTN_2
 because that is what it is. Added WWT_PUSHBTN that is either just a pushable button,
 or a textbutton, which text's drawn dynamically independent of widget.
2006-10-24 14:15:17 +00:00
Darkvater
13df23c586 (svn r6924) -Codechange: Give the last (in the widget arrays at least) sprites meaningful names. 2006-10-24 13:20:54 +00:00
Darkvater
a85d679f54 (svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to PLAYER_SPECTATOR and
put it into player.h where it belongs (instead of map.h)
2006-10-14 15:49:43 +00:00
Darkvater
6b96b5ffd0 (svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
disabled hardcode _networking/_network_available to zero and let the compiler
 handle all optimizations.
2006-10-12 14:59:27 +00:00
belugas
ff2effb8c5 (svn r6730) Fix: Make Build HQ and Relocate HQ buttons of Player window behave as normal placement buttons, and not as push buttons. 2006-10-11 00:48:55 +00:00
glx
633dbef8e4 (svn r6727) -Fix r6619: don't disable inexistant widget 2006-10-10 17:19:21 +00:00
glx
a9c3f8991a (svn r6658) -CodeChange: cleaned up the PlayerCompanyWindow code 2006-10-05 23:24:16 +00:00
glx
b51e9018d6 (svn r6656) -Fix r6631: keep gender button lowered when clicking on 'New Face' 2006-10-05 19:00:24 +00:00
peter1138
0815ce3cd9 (svn r6654) - Codechange: If no 2cc vehicles are available, hide the secondary colour choice. 2006-10-05 15:07:34 +00:00
belugas
688da1d940 (svn r6631) -Codechange: Use accessors for click_state.
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-03 20:16:20 +00:00
belugas
cf210fdf6b (svn r6619) -Codechange: Use accessors for disabled_state.
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-03 02:08:15 +00:00
belugas
f5ee5bdb0e (svn r6612) -Codechange: Use accessors for hidden_state.
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 00:28:31 +00:00
peter1138
cbf2310bb5 (svn r6523) - 'Feature'/'Fix': Add tooltips to the new company colour window 2006-09-27 11:45:26 +00:00
belugas
98ba395277 (svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct 2006-09-23 02:39:24 +00:00
peter1138
05f7677b9d (svn r6457) - Codechange: Allow the company colour window to stay open after the
company information window has been closed, as the company colour window 
is now much larger.
2006-09-15 20:37:48 +00:00
peter1138
53e90c0628 (svn r6456) - Replace single colour scheme for passenger wagons with separate schemes for each of steam, diesel or electric engines. Savegames from the previous revision will not load. 2006-09-15 17:36:54 +00:00
peter1138
e47dd91c8b (svn r6455) - Feature: Add 2cc (two company colours) livery schemes. This 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-09-15 12:27:00 +00:00
rubidium
908d3bcfe6 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 2006-08-22 14:38:37 +00:00
rubidium
db397d5a75 (svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant. 2006-08-20 19:05:28 +00:00
rubidium
e2ce56144e (svn r5967) -Change: use right alignment for the year in the player's balance window instead of centering (about) 'string width' / 2 from the right edge 2006-08-20 10:50:23 +00:00
truelight
d3f2180438 (svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for textboxes to only
allow certain patterns (like numbers only)
2006-08-19 09:31:22 +00:00
rubidium
e87e065e41 (svn r5926) -Codechange: make _cur_year contain the full year, instead of 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-16 11:39:55 +00:00
rubidium
c55962f8a2 (svn r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and BASE_YEAR when comparing _cur_year with a 'full' year.
-Cleanup: replace some magic '1920' values with BASE_YEAR.
2006-08-15 15:18:03 +00:00
rubidium
dc54e608e3 (svn r5915) -Cleanup: some variables were named *_date while they were only holding years; rename these variables to match this. 2006-08-15 14:52:17 +00:00
rubidium
9fc837ad85 (svn r5887) -Cleanup: move date related functions, defines and variables to 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 14:21:15 +00:00
belugas
40a8964911 (svn r5609) CodeChange : Apply coding style 2006-07-26 03:33:12 +00:00
tron
772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 2006-06-27 21:25:53 +00:00
tron
a2362674e3 (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 2006-06-10 08:37:41 +00:00
belugas
ed86c3d818 (svn r4092) CodeChange : Named sprites instead of magic numbers plus create/use helper macro/enum for recoloring scheme 2006-03-24 18:16:39 +00:00
tron
1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
peter1138
5f3dc36983 (svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing. 2005-12-07 15:48:52 +00:00
peter1138
627dd10451 (svn r3247) - Fix: "[ 1335580 ] sticky windows not sticky anymore"
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-29 22:04:02 +00:00
bjarni
16e65960b9 (svn r3218) -Feature: Multiheaded train engines will now stay in the same train
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-18 23:41:03 +00:00
tron
84a16a0b30 (svn r3184) GB/SB 2005-11-15 08:49:46 +00:00
tron
9d0e7b6458 (svn r3181) -Bracing
-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 19:48:04 +00:00
tron
53f00c8f9d (svn r3173) Use the trinary operator and switch to improve readability
Also align short cases nicely
2005-11-13 14:54:09 +00:00
tron
81e5b16d71 (svn r3172) static, const 2005-11-13 13:43:55 +00:00
tron
181d586a7c (svn r3078) Some more stuff, which piled up:
- 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-23 13:04:44 +00:00
tron
8980891b09 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 2005-10-07 07:35:15 +00:00
tron
980808dac2 (svn r3001) s/Player*/const Player*/
s/byte/PlayerID/
s/int/PlayerID/
and related changes
2005-09-30 20:37:25 +00:00
tron
0181327f2d (svn r2999) Do not pass if the HQ gets built for the first time or gets relocated as parameter - the command function has to check this anyway 2005-09-30 08:57:12 +00:00
Darkvater
4a58250cb9 (svn r2962) - const correctness for all Get* functions and most Draw* 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-09-18 20:56:44 +00:00
tron
06ec749425 (svn r2766) Remove string and make use of the plural feature 2005-07-31 16:15:37 +00:00
celestar
a3739aecdf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic 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 15:56:31 +00:00
tron
647cbd6bdd (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron
54cbd01825 (svn r2673) Include functions.h directly, not globally via openttd.h 2005-07-22 07:02:20 +00:00