Commit Graph

65 Commits (383f683e5be8f57cbc00145eeb93c76e4ef9890e)

Author SHA1 Message Date
rubidium 973064a2bd (svn r6385) -Fix (r6380): one instance of QZ_AskQuit was left out in the conversion to HandleExitGameRequest. 18 years ago
rubidium 21ac20aeca (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
-Cleanup: whitespace alignment of a few tables.
18 years ago
rubidium ca9ec81fd1 (svn r6380) -Codechange: unify all ways to quit OTTD.
This means that in the intro menu the 'Quit' button immediatelly quits
  and the 'Quit' in the menu of the normal game and scenario editor
  immediatelly quits when the 'autosave_on_exit' patch is turned on.
  This is the same way as the OS/window manager initiated quits, like
  alt-F4 and the 'x' in the (OS/window manager drawn) title bar of OTTD.
18 years ago
rubidium 819acd270a (svn r6365) -Cleanup: remove IsGeneratingWorld calls that are either not called or have no effect. 18 years ago
tron 180329851a (svn r6294) -Cleanup: Add static 18 years ago
tron dbb7c8964b (svn r6293) -Codechange: Simply use KMOD_CTRL instead of KMOD_LCTRL | KMOD_RCTRL, same for KMOD_SHIFT 18 years ago
tron f906f7c5e7 (svn r6292) -Cleanup: Indentation, bracing, etc. 18 years ago
tron 5040ce82f6 (svn r6286) Nobody cares for the return value of GetAvailableVideoMode(), therefore remove it 18 years ago
tron f7624204e2 (svn r6274) Clean up a bit 18 years ago
tron 430927c913 (svn r6262) Remove unused #define and function declaration 18 years ago
tron 22c12573b9 (svn r6260) Improve readability 18 years ago
rubidium 86dc219b4b (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc. 18 years ago
truelight 7abad2b20e (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
- New optional landscape generator (TerraGenesis Perlin)
  - Load heightmaps (either BMP or PNG)
  - Progress dialog while generating worlds (no longer a 'hanging' screen)
  - New dialogs for NewGame, Create Scenario and Play Heightmap
    - Easier to configure your landscape
    - More things to configure (tree-placer, ..)
  - Speedup of world generation
  - New console command 'restart': restart the map EXACTLY as it was when you
      first started it (needs a game made after or with this commit)
  - New console command 'getseed': get the seed of your map and share it with
      others (of course only works with generated maps)
  - Many new, world generation related, things
  - Many internal cleanups and rewrites
  Many tnx to those people who helped making this:
     Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
  Many tnx to those who helped testing:
     Arnau, Bjarni, and tokai (alfabetic)
  And to all other people who helped testing and sending comments / bugs
  Stats: 673 lines changed, 3534 new lines, 79 new strings
18 years ago
Darkvater 04e6f2fe89 (svn r5874) -Feature [FS#234]: Remember the maximized state and restore on start. This also fixes a bug where a different resolution is chosen for a maximized window, but it retains the maximized flag. Only win32. 18 years ago
Darkvater fe6e29cd2f (svn r5872) - Feature: Add an icon to the SDL openttd executable. 18 years ago
bjarni e3398f09e7 (svn r5460) -Feature: [OSX] macs with touchpads that support two finger scrolling can now use this "scrollwheel" to scroll up/down (ln-) 18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
tron a2362674e3 (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 18 years ago
glx 434fb4e08c (svn r4810) - Fix: removed warning about strict-alias (release build) 18 years ago
bjarni 9ad9a138ad (svn r4099) -Codechange: [OSX] the cocoa video driver speedup of around 1000% now also applies to Intel macs 19 years ago
Darkvater bdfe20ae73 (svn r4091) - Fix r4075. Do not "enter" please. 19 years ago
Darkvater 549f9b0d2f (svn r4090) - Followup for r4075. Some SDL implementations seem to have a different define for the SDL_ACTIVEEVENT SDL_APPMOUSEFOCUS which caused undrawing of the mouse only on losing input-focus. Correctly check for the event state 19 years ago
egladil 5cec20988d (svn r4083) -Feature: [OSX] Ported r4075 (Undraw the mouse when it leaves the window and Draw it again when it enters). 19 years ago
bjarni cc9b448d7f (svn r4082) -Fix: [OSX] FS#80 Crash when switching from windowed to fullscreen
this bug was introduced in rev 3670, but when undetected for a long time since it was resolution specific
	this is likely the issue with x86 OSX in fullscreen, so I removed the really slow workaround and will clean it up once I get positive feedback from a x86 mac
	this means that x86 OSX should now get the 1000% video driver speed boost as well
	this fix is written by eglandil
19 years ago
Darkvater fb48c3b4aa (svn r4075) - Feature: Undraw the mouse when it leaves the window and Draw it again when it enters. Added both for WIN32 and SDL. Since Win95 has troubles with TrackMouseEvent(), this function was just simply rewritten which was the easiest. Based on a patch by DmitryKo. 19 years ago
Darkvater 54735b28c4 (svn r3999) - Fix: [win32] Change the order of DestroyWindow and ChangeDisplay. On some machines a sizechange messagequeue is handled before sending WM_DISPLAYCHANGE resulting in an improper resolution written to the configuration file when exiting from fullscreen. (Frostregen) 19 years ago
bjarni a6b3a519d9 (svn r3971) reverted r3742 as those new errors were not the right way to handle those exceptions 19 years ago
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