tron
453b30e387
(svn r3564) Several smaller changes:
...
- Don't treat non-booleans as booleans
- Reduce variable scope
- Bracing
- Use DeMorgan's law to make conditionals easier to read
- if cascade -> switch
- Replace some magic numbers by symbolic names
- Avoid assignments within other statements
19 years ago
tron
84fb96fe85
(svn r3511) More whitespace ([FS#46] by Rubidium)
19 years ago
tron
22dc05faf2
(svn r3510) Fiddle with whitespace and parentheses
19 years ago
Darkvater
a4807caf6a
(svn r3425) - Fix: Followup to r3421. Correctly reset the TileHighLightData structure to prevent crashes in all the other cases where it is not guarded against sufficiently
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
4191adb92c
(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.
19 years ago
tron
f2b344084a
(svn r3222) -Feature: Right-Click-Scrolling optionally moves in the opposite direction (Requested by manx)
19 years ago
peter1138
40ec9bb123
(svn r3217) Fix issue with resizing stepped windows introduced in revision 3181.
19 years ago
tron
b9729fb72e
(svn r3185) const
19 years ago
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
19 years ago
tron
4a14a586e2
(svn r3173) Use the trinary operator and switch to improve readability
...
Also align short cases nicely
19 years ago
tron
ee15e3de13
(svn r3172) static, const
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
d5042d4ab2
(svn r3046) Replace some numbers with sprite names and fix a typo in the sprite list
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
tron
af9f55c977
(svn r2720) Remove unused declarations and definitions
19 years ago
tron
a227065ab7
(svn r2701) Insert Id tags into all source files
19 years ago
tron
559babcdc9
(svn r2673) Include functions.h directly, not globally via openttd.h
19 years ago
tron
0762aa9ec9
(svn r2669) Shuffle some more stuff around to reduce dependencies
19 years ago
tron
e53c4db866
(svn r2664) Remove depedency on player.h from variables.h
19 years ago
tron
1b4a0897b6
(svn r2535) Tabs
19 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)
19 years ago
tron
61f6f07edd
(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to TileVirtXY
19 years ago
Darkvater
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
20 years ago
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)
20 years ago
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)
20 years ago
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.
20 years ago
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
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
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.
20 years ago
matthijs
00c819c0d5
(svn r2146) - Fix: [ 1175973 ] Crash if any key is pressed in startup (pkirchhofer)
20 years ago
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.
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
Darkvater
9bd079d425
(svn r1978) - Fix: Plug some memleaks; thanks Valgrind
20 years ago
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)
20 years ago
tron
f0f85a7ef3
(svn r1803) Move debugging stuff into files of it's own
20 years ago
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.
20 years ago
tron
44f48ce915
(svn r1610) Remove trailing whitespace (last time ever, i hope)
20 years ago
tron
7243369333
(svn r1602) -Fix: [1107514] When resizing a window, make sure the correct window receives the click
20 years ago
tron
e5cd6b6193
(svn r1596) Add some more statics
20 years ago
tron
189ca73707
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
20 years ago
darkvater
8efc7866dd
(svn r1539) -Fix: [1103271] free'd memory used. Moved w->wndproc(w, &e) to end of function. Thanks for finding this tamlin.
20 years ago
tron
efecea001a
(svn r1534) Use memmove() instead of memcpy() when copying overlapping memory (tamlin)
20 years ago
tron
3279a7c9a2
(svn r1520) Trim 134 (!) lines with trailing whitespace ):
20 years ago
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
20 years ago
celestar
1feae2083d
(svn r1481) -Fix: [ 1099891 ] Added a return in DispatchLeftClickEvent which prevents reading of free'd memory (tamlin)
20 years ago