peter1138
3f64e50fc9
(svn r7209) -Codechange: Alter position of scroll bar in the station list; the filter line isn't scrollable...
2006-11-18 17:34:20 +00:00
Darkvater
b3c48c0a84
(svn r7205) -Fix [FS#350, SF#1560913]: Window allocation and deletion messed with the actual window
...
structs inside their array, and possibly invalidating pointers higher up.
Meaning that any function called within an wndproc could cause unknown/invalid pointers
once control was returned to this function. Solved by the introduction of an extra
abstraction layer, an array of z-window positions that is only concerned with the
pointers.
2006-11-18 16:47:02 +00:00
Darkvater
d50f6c8a8c
(svn r7128) -Codechange: Replace magic numbers by magic enums (windowdesc positioning WDP_AUTO = -1)
2006-11-10 19:24:14 +00:00
peter1138
701c47fb4a
(svn r7080) -Codechange: Remove negative array indexes, and only add ", " when needed, when building station acceptance lists.
2006-11-06 15:25:02 +00:00
Darkvater
eadf788cc5
(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
d303ef94b3
(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
ee27bb497c
(svn r6884) -Codechange: Add strict bounds checking in string formatting system.
...
The last parameter should point to the end of the buffer (eg lastof(buf))
Courtesy of Tron.
2006-10-21 23:31:34 +00:00
peter1138
8411b3b9fe
(svn r6855) - Codechange: When displaying a "quantity of cargo" string, use the {CARGO} command and supply the cargo type and quantity, instead of manually looking up the cargo type's string.
2006-10-20 11:53:29 +00:00
belugas
6444b0e781
(svn r6639) -CodeChange : Conversion of SetWidgetLoweredState to SetWindowWidgetLoweredState, in order to follow pre-established standard
2006-10-04 19:11:43 +00:00
belugas
17eb65050b
(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
753b572400
(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
bjarni
4ccdb0686f
(svn r6562) -Codechange: merged the vehicle list window widget arrays
...
It made no sense to maintain 8 nearly identically arrays when a single one can do the job
Also made the two buttons always use half of the bottom width each, even when resizing
2006-09-28 23:05:03 +00:00
belugas
1c56a5ae0f
(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
rubidium
63687763e9
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
...
-Cleanup: whitespace alignment of a few tables.
2006-09-04 20:40:33 +00:00
Darkvater
2f6a4bc1a9
(svn r6169) -Codechange: Use GetString() instead of GetStringWithArgs() which should be
...
integral to strings.c
2006-08-27 10:04:33 +00:00
truelight
5fd9aeb12b
(svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 (or, will do that).
...
It isn't the best name, but we couldn't find any better.
This unifies the pool-system even more.
2006-08-22 20:41:26 +00:00
truelight
0461d89612
(svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips invalid ones
...
-Codechange: use IsValidXXX where ever possible
Note: both changes to prepare for new pool system, which needs those changes.
For every pool there are 2 ugly lines, which will be removed when done
implementing new pool system.
Based on FS#13 by blathijs, partly implemented.
2006-08-22 15:33:35 +00:00
rubidium
480af9c917
(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
truelight
83d56d6d79
(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
Darkvater
b13a60db42
(svn r5910) Fix some more warnings on MSVC by using (void*) casts. Followup of r5907.
2006-08-15 09:28:27 +00:00
tron
4ad8d1c7a2
(svn r5907) Remove more indirection by using pointers instead of IDs. Also fix some bogus warnings on MSVC by using (void*) casts
2006-08-15 07:07:17 +00:00
tron
68c2a77910
(svn r5896) Remove pointless indirection similar to r5894 and remove an unnecessary global variable
2006-08-14 21:02:48 +00:00
rubidium
243872b4fd
(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
Darkvater
3abc59ebfa
(svn r4891) - Fix (r4822): The station list window had some overlapping widgets (peter1138)
2006-05-16 18:01:20 +00:00
Darkvater
ca20c1fa90
(svn r4830) - Codechange: simplify station sorting a bit by recalculating the clicked-states on drawing the window. This also allows the 'Sort by' button to be visually clickable
2006-05-11 15:14:50 +00:00
celestar
c6fd0c3a46
(svn r4823) -Fix: Improved tooltips for sortable station lists.
...
-Credit: Chrishuebsch for initial idea and implementation of station filters
2006-05-11 11:24:09 +00:00
celestar
48d991b819
(svn r4822) -Feature: Station List View can now be sorted and filtered (by waiting cargo type and facilities)
2006-05-11 10:33:58 +00:00
belugas
88e0bab283
(svn r4426) Code Cleaning : replacing tabs with spaces, removing obvious comments, aligning arrays etc...
2006-04-15 03:08:14 +00:00
peter1138
1c57091230
(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
tron
f7abff5f96
(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
d8b56c123e
(svn r3180) Replace some magic numbers by symbolic names
2005-11-14 15:22:12 +00:00
tron
ee15e3de13
(svn r3172) static, const
2005-11-13 13:43:55 +00:00
tron
47137cefb7
(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
2b91f55b32
(svn r3073) int/byte -> EngineID/PlayerID/VehicleID
...
0/-1 -> INVALID_ENGINE
0x10 -> OWNER_NONE
2005-10-20 17:43:13 +00:00
tron
6a5c0fabdd
(svn r3072) CMD_RENAME_STATION isn't interested in the tile coordinates, so don't pass them
2005-10-20 17:23:33 +00:00
tron
9fea263c77
(svn r3030) More work for GB/SB, this time concerning the waiting_acceptance attribute of stations
2005-10-11 13:54:21 +00:00
tron
3397e202c8
(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
db3b1228bf
(svn r3010) Get rid of quite some dubious casts, either by using GB(), proper types or just removing them
2005-10-03 21:20:01 +00:00
tron
ed8c9c91d6
(svn r3001) s/Player*/const Player*/
...
s/byte/PlayerID/
s/int/PlayerID/
and related changes
2005-09-30 20:37:25 +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
ludde
64f6839816
(svn r2594) Fix: [strgen] Misc updates to the string system.
...
- Renamed the plural command to "P" instead of "PLURAL". Now write something like this to append an s on plural: {P "" s}. (You can optionally still add an argument index to explicitly specifiy which number that's used)
- Removed the pluralized cargo strings from the string files. The new method is to use the plural specifier {P}
- Added support for genders. First add "##gender der das die" on top, then use {G=der} on a cargoname/industry to set the gender, and to switch between genders do something like {G neu neu neue} {STRING}
- Updated the swedish/english translation with P strings.
2005-07-16 20:58:04 +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
tron
1b4a0897b6
(svn r2535) Tabs
2005-07-08 22:25:24 +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
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
2005-06-02 19:30:21 +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
220e5be863
(svn r2313) - Fix: [ 1202115 ] Clicking shipslist on bouy asserts GetPlayer(). Bouys and oilrigs don't have owners, so it cannot get the vehicle-list of the station-owner. Just use _current_player
2005-05-14 22:03:25 +00:00
tron
9832a691fe
(svn r2060) Clean up some string construction and remove now unused macro
2005-03-25 14:19:33 +00:00