Commit Graph

236 Commits

Author SHA1 Message Date
rubidium 3e5924b10f (svn r22149) -Fix [FS#4521]: Windows video driver crashed when it couldn't go to full screen at the resolution of the configuration file when starting OpenTTD 2011-02-26 19:13:58 +00:00
alberth 31386c42a7 (svn r22145) -Codechange: Do explicit test for non-bool values. 2011-02-25 22:04:38 +00:00
glx 1b2ef66416 (svn r22081) -Fix [FS#4489]: if fullscreen fails with current resolution, use desktop resolution 2011-02-14 20:16:36 +00:00
rubidium 1d0d7635e0 (svn r22021) -Fix (r22019): ofcourse make doesn't notice files are gone, so it doesn't recompile everything that needs to be recompiled... 2011-02-07 22:49:38 +00:00
rubidium ab44c91778 (svn r21252) -Codechange: introduce a constant for the number of milliseconds per game tick and use it 2010-11-19 10:35:59 +00:00
rubidium e356cb9405 (svn r20281) -Codechange: unify case scope closure + break coding style 2010-08-01 18:53:30 +00:00
terkhen 88ca183191 (svn r20239) -Doc: Give a common name to all fall throughs (FALL THROUGH). 2010-07-29 14:26:28 +00:00
alberth be6c058424 (svn r20211) -Codechange: Indented code should have curly braces around it. 2010-07-24 10:14:39 +00:00
rubidium b8487afe54 (svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be missed :) 2010-07-19 17:28:27 +00:00
glx 4796be85a5 (svn r20084) -Fix [FS#3919] (r7157): don't try to handle mouse events when the cursor ha left the window 2010-07-06 21:10:47 +00:00
peter1138 abb147d974 (svn r18709) -Fix (r10227,FS#3464): Animation buffer for 32bpp-anim blitter was only validated during sprite blitting, other drawing operations didn't check it. Initial startup and window resize could therefore lead to crash. 2010-01-04 02:32:36 +00:00
rubidium 88a7e23897 (svn r18031) -Codechange: since basically r7157 adding up 'all' mouse movement isn't needed anymore because after each even that movement is handled and the counter is reset. As such simply assigning instead of adding works. 2009-11-09 16:07:03 +00:00
rubidium cbf4b80b86 (svn r18030) -Fix: screen jumped a bit for at least SDL and Allegro when right-click-dragging 2009-11-09 16:05:24 +00:00
rubidium bc8e66c202 (svn r17336) -Codechange: move some os specific files into src/os/ 2009-08-31 22:38:37 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
alberth 9b070b5405 (svn r16677) -Codechange: Dimension width and height are unsigned. 2009-06-27 20:53:45 +00:00
rubidium 2664f2a2d9 (svn r16242) -Codechange: rework pausing
-Fix [FS#2864]: autopause and manual pausing conflict with eachother
-Fix: new game + pause on new game + autopause make the game not unpause on the first join
2009-05-06 15:06:57 +00:00
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 2009-03-15 00:32:18 +00:00
glx 1692ce8312 (svn r15710) -Fix (r15706): for non MSVC io.h needs to be included before defining unlink. Also remove redundant tchar.h includes as it is already in stdafx.h. 2009-03-14 15:42:53 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
rubidium cda853872a (svn r14944) -Cleanup: add spaces around some operators 2009-01-09 22:56:28 +00:00
rubidium 86f1a98ac8 (svn r14397) -Fix: possible buffer overrun, wrong parameter type passed to printf and && where || is meant. Found by MSVC's code analysis (Darkvater) 2008-09-24 23:25:24 +00:00
glx fe5cc9c839 (svn r14363) -Fix [FS#2206]: some keypress combinations could be handled twice 2008-09-20 16:07:56 +00:00
rubidium 3b7ffcf759 (svn r14260) -Fix [FS#2277]: merge keycode for "normal" 0-9 keys and keypad 0-9 keys so people don't get confused that the keypad doesn't work as expected. 2008-09-07 11:55:28 +00:00
glx fbd2db34e6 (svn r14094) -Revert (r14071): caused more problems than it solved 2008-08-17 15:03:54 +00:00
rubidium 20ee6f1158 (svn r14071) -Fix [FS#2057]: the screen wouldn't be centered on Windows multimonitor systems if the first monitor is right of the second one. 2008-08-13 19:09:27 +00:00
rubidium d0c1a989a4 (svn r14047) -Codechange: move chatmessage handling to the network directory as that's the only case chat messages are used. Furthermore remove any trace of chatmessages when compiling without network support. 2008-08-11 22:45:11 +00:00
glx 4782df757c (svn r13539) -Fix (r13537): signed/unsigned warnings 2008-06-16 20:16:43 +00:00
smatz 2299181c4b (svn r13537) -Fix [FS#2090](r13523): QSortT won't work this way, use Dimension instead of uint16[2] for resolutions 2008-06-16 19:38:41 +00:00
glx ee256e770a (svn r13390) -Codechange: introduce usererror() for fatal but not openttd related errors. Now all error() will 'crash' openttd after showing the message in win32 releases (MSVC), creating a crash.log and crash.dmp (like the '!' hack used before). On the other hand, usererror() will just close the game. So use error() only when it can be helpful to debugging, else use usererror(). 2008-06-05 20:54:52 +00:00
rubidium 402a1e24ba (svn r12977) -Codechange: remove quite some redundant (duplicate) function declarations. 2008-05-06 22:17:12 +00:00
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 2008-05-06 15:11:33 +00:00
smatz 297f99e100 (svn r12944) -Codechange: use rev.h instead of externs at many places 2008-05-04 21:53:36 +00:00
rubidium dde68e922a (svn r12779) -Codechange: remove a few constants from openttd.h. 2008-04-18 21:49:38 +00:00
rubidium 9d8fa486af (svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators. 2008-04-18 04:37:06 +00:00
smatz 8b56e7544e (svn r12167) -Feature(tte): change colour of autorail and autoroad selection when Ctrl is pressed 2008-02-17 17:00:43 +00:00
glx fdd71514b2 (svn r12007) -Fix (r12003): win32 compilation was broken again ;) 2008-01-29 00:45:24 +00:00
glx 48861a9fae (svn r11841) -Fix: win32 compilation 2008-01-13 22:07:33 +00:00
belugas 3dd61f423a (svn r11734) -Change: Allow ToggleFullScreen to return the result of the operation' attempt. Previously, only visual clues were available.
-Fix[FS#1519]: When you can not use this resolution at full screen, now you'll know that it failed.
As for the reason it did not work, each computer/OS has its reason.
2008-01-01 14:20:48 +00:00
rubidium 429521a7d1 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 2007-12-25 11:26:07 +00:00
rubidium a773d45885 (svn r11684) -Codechange: split gfx.h in a type and functional header. 2007-12-23 10:56:02 +00:00
rubidium 8f0e68285b (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type. 2007-12-22 23:30:28 +00:00
glx 65754b8d12 (svn r11676) -Fix (r11674): some references to macros.h were left 2007-12-21 21:16:14 +00:00
rubidium 8896bea306 (svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps. 2007-12-19 19:44:29 +00:00
skidd13 bf959f926f (svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style 2007-11-24 10:38:43 +00:00
skidd13 58bb5c7525 (svn r11480) -Codechange: Rename the function ALIGN fitting to the naming style
This fixes also FS#1450
2007-11-19 20:40:14 +00:00
skidd13 8be526e499 (svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style 2007-11-19 18:38:10 +00:00
glx 1713d89374 (svn r11061) -Fix [FS#1086]: [win32] some keys were handled twice 2007-09-08 14:59:58 +00:00
rubidium 0fed821efb (svn r10932) -Codechange: replace "text" with "chat" for the chat related function and variables. 2007-08-19 09:38:30 +00:00
glx 41e05382b8 (svn r10835) -Fix [FS#998] (r10399): don't try to minimise or restore the window when closing openttd 2007-08-09 20:59:36 +00:00
rubidium 5399a272e6 (svn r10834) -Revert (part of r10833): something too much was committed :( 2007-08-09 05:34:56 +00:00
rubidium 2bff32afb0 (svn r10833) -Fix [FS#1115]: assertion (different cost between test and execution) of overbuilding road tunnels with tram tracks (and vice versa) when the dragged area contains both ends of the tunnel. 2007-08-09 05:25:33 +00:00
truelight ce9cba5edb (svn r10782) -Fix: wrongly places #endif a long time ago broke WinCE compiling for sure 2007-08-04 13:51:41 +00:00
truelight 424757c078 (svn r10781) -Fix: ported more pieces to WinCE, so it compiles a bit more
-Fix: WinCE doesn't support console
-Fix: Set debug lvl4 when running a debug WinCE build (as you can't give parameters any easy way)
2007-08-04 12:53:41 +00:00
glx d6c915e6a6 (svn r10761) -Fix (FS#1101, r10216): _pal_last_dirty changed to _pal_count_dirty without updating, so it was of by one 2007-08-03 02:21:10 +00:00
truelight 155b912ebb (svn r10663) -Fix r10662: bad me, didn't comply with coding style, as penalty I updated the surrounding code to comply with coding style too; I will never do it again (I hope :p) 2007-07-23 16:48:19 +00:00
truelight ef0be0e1dc (svn r10662) -Add: added 'V' as new shortcut for new viewport (bilbo)
-Add: added 'M' as new shortcut for smallmap (bilbo)
-Add: added '+' and '-' as shortcuts to zoom in the mainview (bilbo)
-Add: added support for other keycodes to be possible used in the future (bilbo)
2007-07-23 16:39:27 +00:00
peter1138 68c6add8cc (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model. 2007-07-05 12:23:54 +00:00
glx 69586c94ae (svn r10399) -Fix (FS#962): [Windows] _wnd.has_focus was not properly set after using ALT-TAB 2007-06-30 15:02:21 +00:00
truelight 60f0610a85 (svn r10278) -Fix r10276: make the _realtime_tick less demanding on the CPU 2007-06-22 20:07:39 +00:00
truelight 2e19d3cf78 (svn r10276) -Codechange: made a counter based on milliseconds and independent of the game-state to base double-click and TGP Generation Process on
-Codechange: renamed _timer_counter to _palette_animation_counter, as that is what it is
2007-06-22 20:04:21 +00:00
truelight af8a234db0 (svn r10255) -Codechange: remove some old debug code nobody was using anymore 2007-06-21 16:53:57 +00:00
glx 3fe19238b2 (svn r10251) -Fix (r10186, FS#907): alt-tab back into openttd could leave the taskbar visible 2007-06-21 15:48:00 +00:00
glx edf68a04b0 (svn r10243) -Fix: crash when resizing with 32bpp and 'broken' display with 'non-standard' resolutions 2007-06-21 13:30:23 +00:00
truelight 65a3abe1c1 (svn r10220) -Fix r10216: even more fuck-ups for non-SDL video backends 2007-06-19 15:40:27 +00:00
glx fc3ec8689b (svn r10218) -Fix r10216: more compile errors 2007-06-19 15:26:10 +00:00
truelight a7dd710f06 (svn r10217) -Fix r10216: forgot to declare 'blitter' in win32 and cocoa driver (tnx glx) 2007-06-19 15:18:26 +00:00
truelight 1c4760ee06 (svn r10216) -Fix: palette animation always redid all palette entries, where in fact only a few indexes were needed
-Codechange: allow blitters to handle palette animation internally or even disable it; 8bpp uses video-backend for palette animation
2007-06-19 15:04:08 +00:00
truelight 9a93a6006b (svn r10192) -Fix r10190: forgot to change the includes of win32 and cocoa video-driver 2007-06-17 20:40:02 +00:00
truelight 003375d375 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
-Codechange: introduced a hierachy of blitters to avoid a lot of code duplication
 Note: this allows much easier adding other types of video-drivers, like OpenGL
2007-06-17 20:30:28 +00:00
glx 22257f46c2 (svn r10186) -Fix (FS#876): don't mess desktop when using alt-tab (win32) 2007-06-17 19:00:45 +00:00
truelight f3f744d36a (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
-Add: added NULL blitter and renderer, which are always used for -vnull
-Add: dedicated driver doesn't blit nor render by default. Can be overruled by user. (-D -b 8bpp-optimized)
-Remove: removed CTRL+D from win32, which is incompatible with above
-Add: extended screenshot support for PNG and BMP
-Codechange: remove all hardcoded 8bpp references and replace them with more dynamic ones
-Codechange: minor stuff in blitters
2007-06-12 20:24:12 +00:00
truelight d7b4fb80d0 (svn r9835) -Codechange: use Pixel typedef instead of byte where ever possible 2007-05-14 15:20:50 +00:00
glx 75ba8f4489 (svn r9728) -Fix r9086: [win32] For some keyboard layout the 'console' key is a dead-key. It needs to be pressed twice to have an effect but the console is then opened and closed on the 'same' keypress (2 WM_CHAR events). So skip the first WM_CHAR generated to restore the 'console' key functionality. 2007-04-27 21:27:02 +00:00
rubidium 80c259f64f (svn r9672) -Cleanup: lots of coding style fixes around operands. 2007-04-18 22:10:36 +00:00
Darkvater 2a2ee534e9 (svn r9086) -Feature/Fix: [win32] Rewrite keyboard input and handle all keypresses in a WM_CHAR event. This saves us from doing translation (ToUnicode[Ex], ToAscii[Ex]), and we get free IME-input support as a plus. 2007-03-10 00:30:18 +00:00
Darkvater 86be8991c6 (svn r9085) -Codechange/Fix: [win32] Move the initialisation of _codepage (non-UNICODE) to winMain as a dedicated server, or different video driver will not have a win32 messageloop. 2007-03-10 00:29:20 +00:00
Darkvater 2536a14abd (svn r9055) -Codechange: Change windows unicode handling and allow a pure non-unicode build to function. Win9x binaries will be possible with mingw/nightly system. 2007-03-07 18:58:28 +00:00
rubidium 24c4d5b06d (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 2007-03-07 12:11:48 +00:00
rubidium 36bb92ae24 (svn r9050) -Codechange: Foo(void) -> Foo() 2007-03-07 11:47:46 +00:00
truelight 43133c766c (svn r9034) -Codechange: renamed _pause to _pause_game, as some targets already have
a symbol called _pause (and therefor our variable conflicts with 
 thatone. We shouldn't be using _ as global indicator.....)
2007-03-06 20:59:52 +00:00
Darkvater b024134c6a (svn r8994) -Fix [FS642, r3320]: [win32] Resolution doubled in cfg file when fullscreen mode used. Use _wnd.double_size which gives back its correct state with respect to double size and fullscreen. 2007-03-03 13:13:25 +00:00
truelight 203ccad578 (svn r8310) -Fix r8309: it is wise to put #endifs in the right place ;) 2007-01-21 14:36:08 +00:00
truelight 6a145e06c3 (svn r8309) [WinCE] -Fix: WinCE doesn't know resolution changing
-Fix: WinCE doesn't know GetKeyboardState
-Fix: made a replacement of GetCurrentDirectory, where CurDir is assumed to be the dir the executable is located (esoftinteractive.com)
-Fix: the GCC compiler is more happy if the WinMain is called that
-Fix: a really old typo (missing ')') ;)
-Fix: GdiFlush() isn't supported on WinCE
2007-01-21 14:32:40 +00:00
rubidium f35ed4bbc2 (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 2007-01-10 18:56:51 +00:00
KUDr e373ea7096 (svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp) 2007-01-10 18:12:09 +00:00
Renamed from src/video/win32_v.c (Browse further)