Commit Graph

38 Commits (4fb11f23adf3cb0100e39fc1fbf5b99c079781f4)

Author SHA1 Message Date
bjarni 4db34f71c3 (svn r3742) -codechange: [OSX] changed an assert to use the new error window and added another two to show if the screen buffer fails for some reason in cocoa driver (instead of just crashing) 19 years ago
bjarni e8f85b50f0 (svn r3741) -Fix: [i686 OSX] reverted the change in rev 3670 for non PowerPC (done with #ifdef) since it appeared to crash intel based macs
This fix is not a good solution and might not work, but if it works, it's better than nothing until we get the real solution
19 years ago
bjarni 6400e07918 (svn r3671) -Code cleanup: fixed style and removed commented out code in video/cocoa_v.m 19 years ago
bjarni aa3e439a68 (svn r3670) -Codechange: [OSX] rewrote a part of the cocoa video driver to speed it up by 1000% in fullscreen
rewrote QZ_DrawScreen to only redraw dirty rectangles (instead of everything)
	This reduce the OpenTTD time spent on this function from 75% to 6,7% (in main menu)
	Note: window mode is unaffected by this commit
	Note: the mouse pointer can now leave artefacts in debug mode
19 years ago
Darkvater a2c9df81b9 (svn r3640) - Remove win32-only variables from variables.h and put them into win32_v.c. Also ifdef the win32 specific configuration file settings. 19 years ago
bjarni b6cdb521a1 (svn r3618) -Codechange: [OSX] reduce the time spend in the cocoa video driver
by caching global vars in local vars, the CPU keeps them in registers when looping all pixels on screen
	this reduce reading from RAM, which is much slower (Tron wrote this after I detected that those loops used a lot of time)
	Note: since the reduced time is waiting for the RAM, the actual CPU usage is not reduced.
	This means that it's only detectable while fast forwarding and other situations when OTTD wants to use more than 100% of the CPU time
19 years ago
tron 136cffaf5a (svn r3617) Fix warning introduced in r3616 19 years ago
tron afade61293 (svn r3616) Style sweep 19 years ago
tron 5ac015afc8 (svn r3615) Remove the Quartz key codes from the public cocoa video driver interface 19 years ago
bjarni 8744075a6c (svn r3596) -Codechange: [OSX] changed to use Apple's macros instead of OTTD macros for endian conversion
This increases the execution speed a lot since GCC can't detect the OTTD macro as an endian conversion
	while Apple's code uses the instruction to convert endian instead of a series of instructions to produce the same result

	Since we don't have that many endian conversions in the game, overall performance should not increase noteworthy
19 years ago
tron 1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
bjarni 1b9466802f (svn r3393) -Fix: [OSX] some keyboards had a different scancode for opening the console (egladil) 19 years ago
truelight a1f8309453 (svn r3375) -Add: [ FS#29 ] show an error dialog for OSX cocoa driver (egladil) 19 years ago
tron 04c096ee63 (svn r3339) Remove unnecessary includes 19 years ago
Darkvater 17f8534e5a (svn r3320) - Fix: FS#22 - Exiting with double size enabled saves wrong window size. Reset the window size to its true size upon exiting when double-size is active. Is set in ClientSizeChanged. 19 years ago
peter1138 a7730d4a09 (svn r3288) Set svn properties on cocoa related files, and add Id tag.
Add extern to cocoa sound driver.
19 years ago
bjarni 1adc1738f7 (svn r3286) -Fix: [OSX] 10.2 works again and universal binaries got 10.2 as target by default 19 years ago
bjarni 50a1e16943 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
you can still use SDL drivers if you like and you have to run "make upgradeconf" to start using the cocoa drivers (or manually write WITH_COCOA:=1)
	since SDL breaks the cocoa drivers, you can't compile with both SDL and cocoa support
	Using cocoa drivers makes it easier to make universal binaries and it solves:
	-FS#18 [OSX] SDL is weird in universal binaries
	-FS#2  [OSX] lazy pointer crash on exit
	-FS#10 [OSX] linking error when linking statically to SDL 1.2.8 (needless to explain this, but it means it should be able to compile statically with the default settings now)
	-[ 1215073 ] Switching to large size out of fullscreen crashes
	Using SDL drivers will still have those issues though
19 years ago
tron 5cceeaa37f (svn r3207) Typo in last revision 19 years ago
tron 7d750783af (svn r3206) Wrap all instances of _dbg_screen_rect in #ifdef _DEBUG 19 years ago
bjarni 488db23ed8 (svn r3023) -Fix [BeOS] fixed compilation on BeOS R5 (MYOB) 19 years ago
tron c20b5883bd (svn r2924) Introduce the ALIGN() macro which aligns values to multiples of a power of 2, for exact semantics see the commment in macros.h 19 years ago
ludde 9a060a0f24 (svn r2781) Fix some of the issues with variables in .h files. 19 years ago
tron 452f8fee2a (svn r2748) Remove unused cruft from the main loop 19 years ago
tron a7acb22781 (svn r2746) -Fix: SDL_SetColors() has the number of palette entries to change as parameter, not one beyond the last entry to change 19 years ago
tron 5fd69294ee (svn r2728) -Fix/Feature: Change the driver probing algorithm
Instead of trying to start a single driver and bailing out if that fails, try to initialise one by one and use the first one which succeeds.
This should fix problems on machines with no sound card, where -s null had to be specified manually.
19 years ago
tron 2435589804 (svn r2726) Fix last commit 19 years ago
tron 9aa4893e66 (svn r2725) Move MyShowCursor() back into win32.c, it fits better there 19 years ago
tron 452652e85e (svn r2720) Remove unused declarations and definitions 19 years ago
tron 030b4c2704 (svn r2710) Simplify dedicated server code a bit and don't compile it at all, if network support ist disabled 19 years ago
tron 2faf06f4cd (svn r2704) Remove . from include path again, too much trouble. Also add some #ifdefs and #includes for the Windows build 19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
orudge 369b36f6b1 (svn r2695) - Fix: OS/2 project update, add os2.h to dedicated_v.c 19 years ago
tron 8100d06caa (svn r2694) Various smaller changes: eol-style, static, code simplification 19 years ago
tron 7977e773df (svn r2692) Forgot to add a file 19 years ago
tron 393f4b2149 (svn r2691) Separate dedicated video driver and fix bemidi declarations 19 years ago
tron 9bb81b8eef (svn r2688) MSVC and Watcom can't handle identical file names in different directories, oh my... 19 years ago
tron 126fed74d6 (svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
This results in shorter and hopefully easier to maintain files.
Note: I had to change paths in #include statements of some unrelated files, because I added the ottd base directory to the include path (-I.)
19 years ago