Commit Graph

252 Commits (f8400b86b2d6f4877059730fc8b81c80361669a0)

Author SHA1 Message Date
michi_cc 73cd818445 (svn r18573) -Fix [FS#3198]: [OSX] Try to get a generic RGB colour space if getting the system colour profile failed. (tyler) 15 years ago
rubidium bc5d452e82 (svn r18547) -Fix [FS#3388]: missing thread synchronisation when changing the resolution for SDL via the in game menu 15 years ago
frosch 440ab2cf84 (svn r18545) -Fix [FS#3292]: Assign '_screen.dst_ptr' as soon as it is allocated. 15 years ago
peter1138 57bcb5f903 (svn r18390) -Fix (r17776): [SDL] Reinstate pointer update on 'idle' loop. 15 years ago
peter1138 dece4a4cfb (svn r18177) -Fix (r18001): [SDL] Viewport could jump when mouse moved and right button pressed at the same time. 15 years ago
rubidium 639395b69f (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. 15 years ago
rubidium b3394dbeb4 (svn r18030) -Fix: screen jumped a bit for at least SDL and Allegro when right-click-dragging 15 years ago
peter1138 0314ad1a38 (svn r18001) -Codechange: [SDL] When the mouse cursor is locked into position when scrolling a viewport, warp the mouse pointer to the centre of the window. This gives maximum freedom of movement. The pointer position is restored when the lock is removed. Visually the mouse cursor stays where it was. 15 years ago
smatz c2f0845b92 (svn r17950) -Fix (r17776): _draw_mutex was never destroyed, _draw_thread was never joined 15 years ago
smatz bb56cd39b6 (svn r17949) -Fix (r17776): unlock mutex before deleting it when creating drawing thread failed 15 years ago
rubidium 8e1f62993d (svn r17815) -Fix [SDL]: asynchronious drawing caused extra unresponsiveness during map generation; disable the threading while generating a map 15 years ago
michi_cc c1f6dc4342 (svn r17793) -Fix: [OSX] The splash image wasn't displayed if the Quartz video driver was used. 15 years ago
rubidium 9e75e3db68 (svn r17787) -Codechange: be a bit more verbose about while allegro failed with some actions. 15 years ago
rubidium 0307d13d0a (svn r17776) -Codechange: [SDL] make "update the video card"-process asynchronious. Profiling with gprof etc. hasn't shown us that DrawSurfaceToScreen takes a significant amount of CPU; only using TIC/TOC it became apparant that it was a heavy CPU-cycle user or that it was waiting for something.
The benefit of making this function asynchronious ranges from 2%-25% (real time) during fast forward on dual core/hyperthreading-enabled CPUs; 8bpp improvements are, in my test cases, significantly smaller than 32bpp improvements.
On single core non-hyperthreading-enabled CPUs the extra locking/scheduling costs up to 1% extra realtime in fast forward. You can use -v sdl:no_threads to disable threading and undo this loss.
During normal non-fast-forwarded games the benefit/costs are negligable except when the gameloop takes more than about 90% of the time of a tick.
Note that allegro's performance does not improve with this system, likely due to their way of getting data to the video card. It is not implemented for the OS X/Windows video backends, unless (ofcourse) SDL is used there.
Funny is that the performance of the 32bpp(-anim) blitter is, at least in some test cases, significantly faster (more than 10%) than the 8bpp(-optimized) blitter when looking at real time in fast forward on a dual core CPU; it was slower.
The idea comes from a paper/report by Idar Borlaug and Knut Imar Hagen.
15 years ago
rubidium 2508e6b907 (svn r17773) -Cleanup: sdl.h isn't needed for allegro 15 years ago
michi_cc 8a097b48d7 (svn r17768) -Fix (r17715): [OSX] Newer GCC versions don't like jumping over variable definitions with goto's. (planetmaker) 15 years ago
michi_cc a3b1717282 (svn r17717) -Codechange: [OSX] Replace deprecated variable type. 15 years ago
michi_cc f4f5387537 (svn r17716) -Codechange: [OSX] Invoke a (semi-)private Objective-C method in a way that does not rely on the SDK version. 15 years ago
michi_cc 375fd4b2cf (svn r17715) -Cleanup: [OSX] And a final round of coding style and some cleaning. 15 years ago
michi_cc 997f1c191a (svn r17714) -Cleanup: [OSX] Apply more coding style. 15 years ago
michi_cc c477544b92 (svn r17713) -Cleanup: [OSX] Move variable definitions to first use and apply more coding style. 15 years ago
michi_cc 9e3be2ff33 (svn r17712) -Codechange [FS#1411]: [OSX] Replace undocumented process manager API calls with a documented alternative. (pyth) 15 years ago
michi_cc 3bf4f13f3b (svn r17711) -Codechange: [OSX] Don't use deprecated methods to construct a Cocoa string. 15 years ago
michi_cc 434bd81ef0 (svn r17707) -Fix: [OSX] Show the OS mouse cursor when displaying a dialog box if it was hidden. 15 years ago
michi_cc 83e1f7358f (svn r17706) -Codechange: [OSX] Rework the crash handling to use the common CrashLog infrastructure. 15 years ago
michi_cc e583861798 (svn r17702) -Change: [OSX] Assure that the minimal OSX version is defined in all cases.
-Codechange: [OSX] Improve conditional defines for OS version dependant code.
15 years ago
smatz fa937901cb (svn r17701) -Codechange: don't start line with a space if it's not inside comment 15 years ago
rubidium d560807ab5 (svn r17583) -Change: make SDL's video driver more likely to be loaded than Allegro's video driver; SDL seems to perform better. 15 years ago
rubidium ef42e87e31 (svn r17438) -Fix (r17428): ofcourse some part of the OSX port would be forgotten due to it being so much different than the rest :( 15 years ago
rubidium ad201e5a00 (svn r17428) -Codechange: add a function to get the name of a driver 15 years ago
rubidium 19b83eb5aa (svn r17336) -Codechange: move some os specific files into src/os/ 15 years ago
rubidium 99d46e0ad7 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium c096e3d54c (svn r17228) -Codechange: some coding style fixes 15 years ago
smatz d64bdb138c (svn r17168) -Codechange: apply coding style to if and while statements 15 years ago
smatz 073e163b7f (svn r17131) -Codechange: apply coding style to some switch statements 15 years ago
rubidium 2f6f510452 (svn r16827) -Codechange: make OSX specific files include stdafx.h always as the first file. Also unify OSX specific stuff into osx_stdafx.h and remove unused includes. 15 years ago
rubidium 54c52f4401 (svn r16702) -Change: don't implicitly fall back to the null/dedicated (video) drivers, but show an error message that no driver could be found. You can still explicitly start the null drivers thought. 15 years ago
rubidium f0693ed0c8 (svn r16700) -Fix: if allegro fails to start or fails open a window or sound card fall back to another driver 15 years ago
rubidium 231626f98c (svn r16699) -Fix [FS#3001]: if SDL fails to allocate a surface due to it being too large (and SDL doesn't crash!) fall back to another video driver. 15 years ago
alberth c52fe937d5 (svn r16677) -Codechange: Dimension width and height are unsigned. 15 years ago
alberth 580e478e4e (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 15 years ago
rubidium 789999ecf3 (svn r16360) -Codechange: don't use _network_playas as a 'second' _local_company, but only as a storage location for the company you want to join in MP. 15 years ago
rubidium 241af768f0 (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
15 years ago
rubidium 3490147666 (svn r16221) -Change: support building 64 bits OSX binaries and add optional support for 64 bits binaries in OSX universal binaries. However, do not default to adding 64 bits binaries because benchmarking has shown that they are slower than the 32 bits binaries. 15 years ago
rubidium 11e2ca71e6 (svn r16024) -Codechange: harden string copying on places where it's possible 15 years ago
rubidium 6ceeb47c8b (svn r15892) -Codechange: [OSX] some type fixes so OpenTTD likes more of the 3.1.x Xcodes. 15 years ago
rubidium c3e87f345d (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 16 years ago
rubidium f3e0fd7416 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 16 years ago
glx 81361189ca (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. 16 years ago
rubidium 34bd9ee636 (svn r15626) -Fix [FS#2698]: UTF8 string handling could cause buffer overruns. 16 years ago
yexo 7e818f0456 (svn r15576) -Codechange: rename SwitchModes to SwitchMode and don't hardcode the values for that enum. 16 years ago
yexo bd2544b5ea (svn r15575) -Codechange: Rename GameModes to GameMode and store _game_mode as GameMode instead of as byte. 16 years ago
rubidium 38d66e69af (svn r15543) -Change: allow the default debug level of 6 for a dedicated server to be overriden by -d (if used after -D). 16 years ago
smatz 9021c20b5e (svn r15299) -Cleanup: remove many redundant includes 16 years ago
glx 0d87169563 (svn r15233) -Fix (r15231): compilation with SDL broken on win32 16 years ago
rubidium 2a76f869a3 (svn r15232) -Codechange: sprinklin' of coding style 16 years ago
rubidium 8800294a33 (svn r15231) -Change: (sdl) check the full screen resolutions to determine what 'valid' resolutions we've got 16 years ago
rubidium 7c5a618639 (svn r15176) -Fix [FS#2554]: querying the content server could free when resolving the hostname or connecting takes long/is timing out. 16 years ago
rubidium 0893cb2adf (svn r15156) -Fix: add scrollwheel support to allegro 16 years ago
rubidium 28ea38ae55 (svn r14949) -Cleanup: pointer coding style 16 years ago
rubidium c0e7434f38 (svn r14944) -Cleanup: add spaces around some operators 16 years ago
peter1138 553d65f584 (svn r14907) -Codechange: Remove 32 character limit from driver/blitter selection and parameters. 16 years ago
rubidium 913f51b2fb (svn r14641) -Change [Allegro]: when making a debug build revert Allegro's hooks on SIGSEGV/SIGABRT so one can actually use gdb.
-Change: make it more clear that Allegro's failing to find a driver.
16 years ago
rubidium 5dd4735da1 (svn r14636) -Add: DOS port of OpenTTD, without network support though. 16 years ago
rubidium ba2345808b (svn r14632) -Add: support Allegro as midi backend. 16 years ago
rubidium 5ebb48fa86 (svn r14631) -Add: support for Allegro as sound backend. 16 years ago
rubidium 285d1846ae (svn r14630) -Add: support Allegro as video backend. 16 years ago
rubidium e589c7e580 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 16 years ago
rubidium f56e630e5c (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 16 years ago
rubidium 5ab74534da (svn r14414) -Fix: replace instances of strncpy with strecpy as strncpy doesn't guarantee the resulting string is '\0'-terminated. 16 years ago
rubidium 48ece47bd9 (svn r14397) -Fix: possible buffer overrun, wrong parameter type passed to printf and && where || is meant. Found by MSVC's code analysis (Darkvater) 16 years ago
glx 8b0d8589e3 (svn r14363) -Fix [FS#2206]: some keypress combinations could be handled twice 16 years ago
rubidium 956c99e46c (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. 16 years ago
rubidium 05d9c19226 (svn r14200) -Fix (r14199): some OSes failed to compile. Furthermore I hate wrong comments! 16 years ago
rubidium a20b833516 (svn r14199) -Codechange: split fileio.h into fileio_type.h and fileio_func.h so not everything that includes saveload.h needs to include everything else too. 16 years ago
glx e88e07b3bf (svn r14094) -Revert (r14071): caused more problems than it solved 16 years ago
rubidium 75ea55cc65 (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. 16 years ago
rubidium edc1b3cdc2 (svn r14055) -Codechange: increase buffers for (dedicated) consoles as they couldn't use the full "extent" of the new chat message limit. 16 years ago
rubidium 31d69a49e8 (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. 16 years ago
bjarni 14ea857edb (svn r14032) -Fix (r13584): [OSX] changed the condition for selecting 8 or 32 bpp blitter by default
Now we will pick 32 bpp if no 8 bpp fullscreen resolutions are available on the main display (the one with the dock)
16 years ago
rubidium fb5c4e469b (svn r13992) -Fix [FS#2189]: the dedicated console removed any character that was not a printable ASCII character instead. Now it allows UTF8 formated strings too. 16 years ago
glx 8578181a3a (svn r13539) -Fix (r13537): signed/unsigned warnings 16 years ago
smatz e00df941fa (svn r13537) -Fix [FS#2090](r13523): QSortT won't work this way, use Dimension instead of uint16[2] for resolutions 16 years ago
glx b60a1326bf (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(). 16 years ago
rubidium e7a501100a (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games. 16 years ago
rubidium dc77647ea4 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
16 years ago
rubidium bf3b61cfa3 (svn r13228) -Codechange: split console.h. 16 years ago
bjarni 3c82dd6550 (svn r12985) -Fix (r12977): [OSX] fixed missing includes in the cocoa files 16 years ago
rubidium c27f3cfa62 (svn r12977) -Codechange: remove quite some redundant (duplicate) function declarations. 16 years ago
rubidium 1ce0b03bf0 (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. 16 years ago
smatz 89a8dc8cf7 (svn r12944) -Codechange: use rev.h instead of externs at many places 16 years ago
rubidium af5775a5ec (svn r12796) -Fix: the dedicated blitter did segfault too, like the null blitter did. 16 years ago
rubidium 312d54bc3b (svn r12780) -Fix: the null blitter did segfault. 16 years ago
rubidium 7e5639ccea (svn r12779) -Codechange: remove a few constants from openttd.h. 16 years ago
egladil cd7536123b (svn r12776) -Fix: [OSX] In some rare cases when using an uncalibrated monitor the system colour space could not be retrieved. Show an error when this happens instead of just trying an assertion. 16 years ago
rubidium ca1f8fbe2e (svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators. 16 years ago
smatz d3d126f999 (svn r12167) -Feature(tte): change colour of autorail and autoroad selection when Ctrl is pressed 17 years ago
egladil dbe2c7582d (svn r12016) -Fix (r12003): os x compilation was broken again ;) 17 years ago
glx fadeb9ca2e (svn r12007) -Fix (r12003): win32 compilation was broken again ;) 17 years ago
rubidium 3f104194d6 (svn r12003) -Codechange: don't declare InteractiveRandom[Range] in multiple places. 17 years ago