tron
b9729fb72e
(svn r3185) const
2005-11-15 09:00:02 +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
4a14a586e2
(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
ee15e3de13
(svn r3172) static, const
2005-11-13 13:43:55 +00:00
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
2005-11-04 14:01:44 +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
d5042d4ab2
(svn r3046) Replace some numbers with sprite names and fix a typo in the sprite list
2005-10-15 11:06:54 +00:00
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
2005-09-18 20:56:44 +00:00
celestar
727dea5824
(svn r2734) -Feature: The Main Toolbar Dropdown Menu can now display disabled items
2005-07-28 08:49:29 +00:00
tron
af9f55c977
(svn r2720) Remove unused declarations and definitions
2005-07-26 19:34:03 +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
tron
e53c4db866
(svn r2664) Remove depedency on player.h from variables.h
2005-07-21 19:36:43 +00:00
tron
1b4a0897b6
(svn r2535) Tabs
2005-07-08 22:25:24 +00:00
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)
2005-07-08 00:14:19 +00:00
tron
61f6f07edd
(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to TileVirtXY
2005-06-25 06:15:43 +00:00
Darkvater
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
2005-06-02 19:30:21 +00:00
Darkvater
df4c22e358
(svn r2373) - CodeChange: don't redraw the window upon a user-based dirty request if the requested widget is invisible or otherwise not visible (type WWT_EMPTY)
2005-05-28 17:01:26 +00:00
Darkvater
63784c5b5a
(svn r2248) - Fix (regression): fix crashing of game when joining a dedicated server (only reset _thd.pos, not the whole structure; as done in revision 2241 to fix another crash)
2005-05-02 17:14:31 +00:00
Darkvater
639b6e780f
(svn r2241) - Fix: [ 1190625 ] Changing mapsize crashes game with highlighting. Without shutting down OpenTTD some possibly 'invalid' data in TileHighLightData (_thd) is left behind; reset it.
2005-05-01 19:37:20 +00:00
Darkvater
081ff24282
(svn r2161) - Fix: When resizing a window, the button is also visibly depressed
...
- CodeChange: Use images as arrows in the scenario-date scroller, looks better
- Feature: Clicked buttons with images/text now visibly depress their contents when pressed (eg it really seems like the button is moving)
- Fix: Fix sprite offsets of the arrow sprites in openttd.grf
2005-04-07 00:59:54 +00:00
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.
2005-04-05 21:03:30 +00:00
Darkvater
42eae13270
(svn r2149) - Fix (Regression): [ 1175877 ] Inputbox of savegamedialog did not have "focus", keyinput went to game. A quick fix for the horrid inputkey-handling.
2005-04-04 19:14:40 +00:00
matthijs
00c819c0d5
(svn r2146) - Fix: [ 1175973 ] Crash if any key is pressed in startup (pkirchhofer)
2005-04-04 16:47:03 +00:00
Darkvater
f00d0d8ea8
(svn r2141) - Fix: Keys now hopefully only activate the right windows. If console/querybox/chatbox is open, all input goes there, if closed to game itself.
2005-04-03 13:35:43 +00:00
pasky
f89984642e
(svn r2074) MouseLoop -> InputLoop(), factor out a real mouse-specific MouseLoop from the new InitLoop() (more in the spirit of HandleKeypress()).
2005-03-26 04:16:39 +00:00
Darkvater
9bd079d425
(svn r1978) - Fix: Plug some memleaks; thanks Valgrind
2005-03-09 19:48:20 +00:00
Darkvater
7746c4722b
(svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
2005-02-22 14:52:20 +00:00
tron
f0f85a7ef3
(svn r1803) Move debugging stuff into files of it's own
2005-02-05 15:58:59 +00:00
darkvater
ae792cedde
(svn r1613) -Fix: WE_CLICK event is not called on default actions. If special action is needed, use the other events like WE_RESIZE or WE_DESTROY, etc.
2005-01-23 13:42:26 +00:00
tron
44f48ce915
(svn r1610) Remove trailing whitespace (last time ever, i hope)
2005-01-23 13:09:35 +00:00
tron
7243369333
(svn r1602) -Fix: [1107514] When resizing a window, make sure the correct window receives the click
2005-01-23 08:34:39 +00:00
tron
e5cd6b6193
(svn r1596) Add some more statics
2005-01-22 22:47:58 +00:00
tron
189ca73707
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
2005-01-22 20:23:18 +00:00
darkvater
8efc7866dd
(svn r1539) -Fix: [1103271] free'd memory used. Moved w->wndproc(w, &e) to end of function. Thanks for finding this tamlin.
2005-01-16 12:30:52 +00:00
tron
efecea001a
(svn r1534) Use memmove() instead of memcpy() when copying overlapping memory (tamlin)
2005-01-16 11:04:45 +00:00
tron
3279a7c9a2
(svn r1520) Trim 134 (!) lines with trailing whitespace ):
2005-01-15 08:58:31 +00:00
darkvater
61cae70fe5
(svn r1497) -Fix: [1101179] Crash if generating land while industry window is open. This also happened for towns and the land information window
...
-Added DeleteWindowByClass() function that deletes all windows of a given class
2005-01-13 16:50:20 +00:00
celestar
1feae2083d
(svn r1481) -Fix: [ 1099891 ] Added a return in DispatchLeftClickEvent which prevents reading of free'd memory (tamlin)
2005-01-11 12:15:08 +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
085563653f
(svn r1478) -Fix: [1099195] mouse-wheel in train replace window. Scrollbar1 and Scrollbar2 now work independently. You can only scroll on list and scrollbar itself; scrollbar must be next widget of the list.
...
-Fix: updated the few gui's that didn't have the scrollbar right after the listbox.
2005-01-11 00:24:27 +00:00
tron
49584082a0
(svn r1451) Fix some of the signed/unsigned comparison warnings
2005-01-09 21:25:44 +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
39f8b82640
(svn r1338) -Fix: fix signed/unsigned warnings introduced when ditching the macros for map querying.
2005-01-03 14:07:49 +00:00
tron
32bfe0dddd
(svn r1337) Use MapMax[XY]() (or MapSize[XY]() if appropriate) instead of TILE_MAX_[XY]
...
While here replace one erroneous TILE_MAX_X with MapMaxY()
2005-01-03 12:56:22 +00:00
bjarni
29d8c5bb50
(svn r1323) Adding autoreplace feature
...
This feature works much like autorenew, but it will get you a new engine type instead of a new one of the same type. Once
ordered, it will automatically replace the engines while they visits a depot. The GUI for setting this up have been added on the
vehicle overview windows
Note: autorenew is now autoreplace, but to the same engine type
Nice new features, that was added to make this possible
- windows can now have two independant vertical scrollbars
- CMD_SHOW_NO_ERROR have been added as a flag for DoCommandP. It will make it do the action instead of showing the red box with
estimated costs even if shift is pressed
- fixed problem where enginetypes where not initialized when loading a game. It's now done in InitializeGame()
2005-01-02 17:23:04 +00:00
darkvater
ed0a42f940
(svn r1225) -Feature: SHIFT+DEL now deletes all non-vital windows (only status bar and main bar remain)
...
-Fix: For everyone who tried to crash the game by opening a huge amount of windows and stickying all of them; bad luck. It's fixed now (thanks Tron for the helpful criticism). First all normal windows are a candidate for replacement, then if none are found, sticky windows. Then..well that should not happen :)
2004-12-22 17:37:21 +00:00
darkvater
83981e40b5
(svn r1121) -Feature: Added sticky windows feature. A small pin allows the user to set the window as undeletable and can only be closed by hand. As an example the viewport window has been stickied (thanks to Neko-San)
...
-To use the feature add WDF_STICKY_BUTTON to the widget description and update all widget-ID's since sticky button will be widget 2.
2004-12-15 23:33:04 +00:00
tron
765ecfed84
(svn r1117) Move map arrays and some related macros into their own files map.c and map.h
2004-12-15 22:18:54 +00:00
dominik
23612e41f2
(svn r1084) Generalized hotkey catching when textfield windows are open. Now only hotkeys attached to the main toolbar are working if you have a textfield open.
2004-12-14 17:38:48 +00:00
dominik
7196860373
(svn r1082) Feature: Chat toolbar
...
- to chat with all players press Return (or Shift-T) and type in the message
- Press Return again to send the message
2004-12-14 16:53:38 +00:00
tron
1fcf823d66
(svn r1080) Improve mini-map scrolling in a similar way as viewport scrolling (r1063): now the centre of the mini-map window is the region of interest instead some arbitrary coordinate.
2004-12-14 08:01:12 +00:00
truelight
b8f6d41418
(svn r942) -Merged branch/network back into the trunk
2004-12-04 17:54:56 +00:00
tron
249a170ace
(svn r607) -Patch: [ 985102 ] static cleanup
...
Thanks to lvoge
2004-11-14 19:44:06 +00:00
tron
a9a852a4d6
(svn r580) Fix latent bug in BringWindowToFrontByID() - a wrong pointer was returned
2004-11-14 08:15:50 +00:00
tron
84d1041edf
(svn r578) Simplify BringWindowToFront()
2004-11-14 08:11:05 +00:00
tron
3df0ff7854
(svn r559) Minor simplification
2004-11-13 11:08:50 +00:00
tron
53116247c3
(svn r558) -Fix: [ 1065247 ] Windows can be placed behind toolbar
...
While here make clamping against the screen border a bit nicer
2004-11-13 10:53:42 +00:00
tron
7a97e54559
(svn r541) Make windows even snappier! ^^
...
Thanks to nzhook, who also proposed the original patch.
2004-11-11 21:20:15 +00:00
tron
872f49ae8a
(svn r538) -Feature: Windows snap at each other
...
This is inspired by [1063636].
2004-11-10 21:14:16 +00:00
darkvater
e295e46e3e
(svn r223) -Fix: Const correctness and miscellaneous fixes. Thank you Tron for your diligent fixing of warnings (and some possibly bugs) (Tron)
...
-CodeLayout: Remove trailing spaces and Windows linebreaks
2004-09-12 21:49:38 +00:00
darkvater
24512d3da5
(svn r212) -Fix: Network-gui fixes (sign_de)
...
-Fix: any disabled button in a window doesn't receive WE_CLICK events
-Added network.h
2004-09-12 14:12:33 +00:00
truelight
eb49a19460
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
2004-09-10 19:02:27 +00:00
darkvater
d037ee4c92
(svn r179) -Fix: [1023971] Fix for MouseWheel assert error in non-zoomable viewports. Zooming now will only occur if mousepointer is either in an extra viewport window, or main game-window (Dribbel)
2004-09-07 22:44:14 +00:00
truelight
1846563cf8
(svn r159) -Fix: w->custom[] was too small for 64bit pointers
2004-09-05 14:20:36 +00:00
darkvater
4fec362b32
(svn r153) -Feature: [1009710] Extra Viewport. In the minimap dropdown menu, open a new viewport to have a quick look at your favorite map-positions. Independent zoom and quick jump to/from viewport (Dribbel)
2004-09-03 19:59:05 +00:00
dominik
7701b0a241
(svn r137) Fix: console sometime didn't open (sign_de)
2004-08-25 08:55:53 +00:00
dominik
e2f627a22e
(svn r127) New feature: ingame console. (sign_de)
...
Press tab to open the console, more info in docs/console.txt
2004-08-24 08:34:28 +00:00
dominik
a6f2257600
(svn r117) Feature: Performance details window in company league menu (TrueLight)
2004-08-23 10:59:03 +00:00
dominik
d0fe99d8a2
(svn r87) Fix: rare mousewheel scrolling with scrollbar crash
2004-08-20 11:25:36 +00:00
darkvater
98f1db7b30
(svn r78) -Fix: [1010830] Landscape toolbar in scenario editor shown at wrong position
2004-08-17 22:39:40 +00:00
darkvater
b4e9a3d1d4
(svn r71) -Cheat: [976127] no extra frequent jet crash on small airports (truesatan)
...
-Changed some debug messages in aircraft code to DEBUG(misc, 1)
2004-08-16 22:35:17 +00:00
darkvater
345e2c38ad
(svn r70) -Fix: typo in english.txt
...
-Add some debug messages for misc=1
2004-08-16 22:15:44 +00:00
darkvater
31911a9325
(svn r69) -Feature: align toolbar left/center/right patch (TrueLight)
...
-Feature: added callback feature to patches options
2004-08-16 21:02:06 +00:00
darkvater
255a1ad941
(svn r68) -Fix: [1009621] build in pause is now a cheat instead of a patch (truesatan)
...
-Fix: Placing/editing signs signs is possible in paused mode
2004-08-16 18:46:54 +00:00
truelight
efaeb275f7
(svn r1) Import of revision 975 of old (crashed) SVN
2004-08-09 17:04:08 +00:00