bjarni
8f4a4a81da
(svn r6503) -Codechange: added a function to tell what vehicles a depot contains
...
This will ensure that you can always get the same list when checking for vehicles in a depot (no need to duplicate code for each place, that needs such a list)
Since the vehicles are only looped once for each redraw, drawing speed is around twice as fast (measured to be 114%-121% faster depending on the number of vehicles in the game)
18 years ago
belugas
1c56a5ae0f
(svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct
18 years ago
Darkvater
56d06ba0a7
(svn r6379) -Codechange: cast 'remove babel' on widget's unkA and rename it to 'data'.
18 years ago
Darkvater
794cc6d55e
(svn r6372) -Codechange: static, unneeded decleration in headers, superfluous header includes
...
-Codechange: Unify the Sorting struct both for vehicle-lists and network-lists.
18 years ago
bjarni
01a566429c
(svn r6345) -Codechange: AllocateWindowDescFront() now ensures that window_number is set before calling the WE_CREATE event
...
this allows using the window_number in WE_CREATE window event handlers
18 years ago
tron
96f9a0ad7b
(svn r6210) Remove FR_NOBORDER, because it is exclusivly used in conjunction with FR_TRANSPARENT
18 years ago
tron
17c610c0f4
(svn r6209) Move DrawFrameRect() out of gfx.[ch], because it uses data (_color_list) which the renderer shouldn't have know about
18 years ago
rubidium
27cee58ab8
(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc.
18 years ago
belugas
4c2abf1de5
(svn r6046) CodeChange : Rename WWT_5 Widget type to WWT_LABEL : a centered label
...
CodeChange : Move almost all fixed strings from ON_PAINT event to Widget array using WWT_LABEL.
Feature : All "Select Refit Cargo" are now centered, instead of been left aligned
18 years ago
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.
18 years ago
truelight
2849e4fea9
(svn r6038) -Codechange: move mousewheel code to event WE_MOUSEWHEEL instead of a general function that handles that
...
-Codechange: use always 'e' for WindowsEvent, neverr 'we'
18 years ago
truelight
9ec2fdcbf3
(svn r6036) -Codechange: do not handle SCROLL in a central function, but let windows handle them theirself. Added WE_SCROLL for this.
18 years ago
truelight
2309eeb8de
(svn r5971) -Fix: wrong struct in assert_compile (thomasdev)
18 years ago
truelight
10b842bddc
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
...
- New optional landscape generator (TerraGenesis Perlin)
- Load heightmaps (either BMP or PNG)
- Progress dialog while generating worlds (no longer a 'hanging' screen)
- New dialogs for NewGame, Create Scenario and Play Heightmap
- Easier to configure your landscape
- More things to configure (tree-placer, ..)
- Speedup of world generation
- New console command 'restart': restart the map EXACTLY as it was when you
first started it (needs a game made after or with this commit)
- New console command 'getseed': get the seed of your map and share it with
others (of course only works with generated maps)
- Many new, world generation related, things
- Many internal cleanups and rewrites
Many tnx to those people who helped making this:
Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
Many tnx to those who helped testing:
Arnau, Bjarni, and tokai (alfabetic)
And to all other people who helped testing and sending comments / bugs
Stats: 673 lines changed, 3534 new lines, 79 new strings
18 years ago
truelight
83d56d6d79
(svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for textboxes to only
...
allow certain patterns (like numbers only)
18 years ago
tron
ba14683912
(svn r5894) Remove a totally unnecessary indirection in the vehicle sorter code. Less code, less data, simply better
18 years ago
belugas
6082507fea
(svn r5609) CodeChange : Apply coding style
18 years ago
tron
2b27073156
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
19 years ago
celestar
48d991b819
(svn r4822) -Feature: Station List View can now be sorted and filtered (by waiting cargo type and facilities)
19 years ago
Darkvater
b68b9b149a
(svn r4301) - Fix: the maxlength parameter of Textbuf is supposed to be the size of the buffer (so length of string + '\0'), but in the code it was a mix of both. It didn't cause any problems though, only an occasionaly one-less character than allowed. (thanks Tron for noticing)
19 years ago
Darkvater
d5909f901a
(svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type.
19 years ago
bjarni
78b51cbec2
(svn r3535) -Feature: [autoreplace] allow autoreplacing of train wagons
...
currently ALL available wagons are displayed in the right menu in the replace window
however the replacement will only be done if the new wagon can be refitted to carry same cargo as the old one is currently carrying
Since the standard vehicles do not have any valid wagon replacements, this feature can only be used when using newgrf sets
19 years ago
Darkvater
a235c72b0d
(svn r3461) - Fix: Increase window-size as for 64-bit machines it wasn't enough
19 years ago
Darkvater
070edf2f73
(svn r3441) - Feature: Allow the network game list to be sorted (by name/clients/compatibility ascending/descending)
19 years ago
Darkvater
2612d48550
(svn r3439) - CodeChange: Remove a whole bunch of global variables and put them into the WP() macro. Also combine more than one WP-custom element. For this the maximum size of w->custom (WP) has been increased, and multiple types put inside one with possibly moved to the corresponding gui file if it is only used there.
19 years ago
tron
e272b03fee
(svn r3365) Staticise 36 functions
19 years ago
tron
980e8f525b
(svn r3364) Remove 3 unused functions (ScrollWindowToTile, AllocateWindowAutoPlace, AllocateWindowAutoPlace2)
19 years ago
tron
f2db7e7245
(svn r3336) byte -> WindowClass, uint16 -> WindowNumber
19 years ago
peter1138
ec274769b9
(svn r3302) - Fix: split drawing of text buttons and the closebox, so the closebox symbol can be centred.
19 years ago
peter1138
04f39ef749
(svn r3291) - Codechange, Autoreplace: Replace int with EngineID and -1 with INVALID_ENGINE, as appropriate.
19 years ago
peter1138
4d2c4c5d8a
(svn r3225) - Fix for "[ 1359165 ] Autoreplace problem with r3171 and later" -- Move the disabled/hidden bits to custom data in window struct.
19 years ago
peter1138
6124ee0974
(svn r3178) - Codechange: move static _dropdown_* vars into the window custom data, giving var1 and var2 more meaningful names.
19 years ago
tron
357aba7475
(svn r3176) Use proper types, not some variants of int
19 years ago
truelight
53ddd87dc2
(svn r3162) -Fix: renamed 'Message' to 'WindowMessage', a struct named 'Message' already
...
exists on MorphOS
19 years ago
tron
62d7732273
(svn r3133) - static, const
...
- remove long unused stuff and bogus comments
- complement struct typedefs
- remove read-only (_demo_mode) and unused (_fix_mouse_at) global variables
19 years ago
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
19 years ago
tron
3397e202c8
(svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants
19 years ago
peter1138
9c2700b14c
(svn r2974) -Fix: Drag and drop selection on drop down boxes didn't select correct item when some items were hidden.
...
-Separate disabled and hidden masks in drop downs to support both hidden and disabled items.
19 years ago
Darkvater
8e6a911700
(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
19 years ago
celestar
727dea5824
(svn r2734) -Feature: The Main Toolbar Dropdown Menu can now display disabled items
19 years ago
celestar
238e47cd42
(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.
19 years ago
tron
a227065ab7
(svn r2701) Insert Id tags into all source files
19 years ago
tron
0762aa9ec9
(svn r2669) Shuffle some more stuff around to reduce dependencies
19 years ago
tron
59d4ab3752
(svn r2626) static, const, misc.
19 years ago
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.
20 years ago
Darkvater
a014ef6340
(svn r2530) - Fix: [ 1219829 ] Mouse-wheel crashes OTTD. Widget detection failed to detect the most-right and most-bottom pixels of a widget. If scrollwheel is used on a not-found widget (such as the background of the toolbar), it will now fail correctly (glx)
20 years ago
tron
3154e7148d
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
20 years ago
hackykid
8607bbf06d
(svn r2444) - CodeChange: Add an enum for demagicifying the values of the 'flags' parameter of DrawFrameRect(). (_Abraxa_)
20 years ago
darkvater
22d36985cd
(svn r2152) - Fix: Chatbar in MP games is now on-top of the news window.
...
- CodeChange: Introduction of SendWindowMessage() where a window can send another window a message (ala windows style msg, wparam, lparam). Messages can be sent by windowclass and by windowpointer.
- CodeChange: IsVitalWindow() simplifies a lot of checks for window handling that need to know what windows it can close, or be on top of, etc.
20 years ago
pasky
f89984642e
(svn r2074) MouseLoop -> InputLoop(), factor out a real mouse-specific MouseLoop from the new InitLoop() (more in the spirit of HandleKeypress()).
20 years ago