Commit Graph

75 Commits

Author SHA1 Message Date
Darkvater
3a03b70319 (svn r7153) -Fix [FS#279]: Some keyboard events possibly lost under high CPU load, handle
keyboard input in place instead of global variables magic. (KUDr)
2006-11-15 19:35:52 +00:00
Darkvater
21dd00b299 (svn r7137) -Codechange: [win32] Use windows function in main loop to check if we have pressed ALT
(for ALT+TAB) instead of magic global _pressed_key from input-loop. (KUDr)
2006-11-13 19:35:31 +00:00
Darkvater
e496c5a37c (svn r7062) -[win32] Codechange: Remove unneeded WM_MOUSEENTER event, and change mouse behaviour
a bit so that any specific windows inside (eg IME compositor) will have a cursor.
2006-11-05 01:53:12 +00:00
Darkvater
96f40aacb4 (svn r7061) -[win32] Feature: Remember the window size between restarts when quit in fullscreen mode. 2006-11-05 01:13:08 +00:00
Darkvater
20da2356a9 (svn r7060) -Fix (r5874): Restore of window maximized state not always working (Mart3p) . Remember
maximize state even between switching fullscreen/windowed mode.
2006-11-05 01:09:57 +00:00
Darkvater
ac2b6f39b1 (svn r7048) -Cleanup: DEBUG doesn't need a newline character, use DEBUG instead of printf and the
verb is build/built/built not build/*/build or build/*/builded.
2006-11-03 01:18:40 +00:00
peter1138
fde4bf4cca (svn r6835) - Fix: Pressing ^D (EOF) at a dedicated console caused it to repeat the last command, instead of doing nothing. 2006-10-19 09:39:29 +00:00
Darkvater
dad5d5dd72 (svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to PLAYER_SPECTATOR and
put it into player.h where it belongs (instead of map.h)
2006-10-14 15:49:43 +00:00
Darkvater
1436bbbc84 (svn r6766) -Codechange: Move _openttd_revision[] into the functions that use it instead of global 2006-10-13 15:52:22 +00:00
Darkvater
2d329463bf (svn r6449) -Fix (Win32): The dedicated server could overwrite the keyboard input buffer
before it was handled by OpenTTD. Thanks to glx for noticing.
-While here, also do really minor coding style, and proper variable names.
2006-09-14 20:40:59 +00:00
rubidium
3d6f6813f2 (svn r6385) -Fix (r6380): one instance of QZ_AskQuit was left out in the conversion to HandleExitGameRequest. 2006-09-04 21:47:46 +00:00
rubidium
63687763e9 (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
-Cleanup: whitespace alignment of a few tables.
2006-09-04 20:40:33 +00:00
rubidium
a7cfb80c40 (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.
2006-09-04 17:30:30 +00:00
rubidium
03f963af58 (svn r6365) -Cleanup: remove IsGeneratingWorld calls that are either not called or have no effect. 2006-09-03 22:07:28 +00:00
tron
168e2b41e5 (svn r6294) -Cleanup: Add static 2006-09-01 11:01:44 +00:00
tron
3a98d0ee1d (svn r6293) -Codechange: Simply use KMOD_CTRL instead of KMOD_LCTRL | KMOD_RCTRL, same for KMOD_SHIFT 2006-09-01 10:37:27 +00:00
tron
463ae887ea (svn r6292) -Cleanup: Indentation, bracing, etc. 2006-09-01 10:29:40 +00:00
tron
17c101afe3 (svn r6286) Nobody cares for the return value of GetAvailableVideoMode(), therefore remove it 2006-08-31 20:06:31 +00:00
tron
c4fb78a708 (svn r6274) Clean up a bit 2006-08-31 14:50:12 +00:00
tron
5f3f9f499d (svn r6262) Remove unused #define and function declaration 2006-08-31 10:14:47 +00:00
tron
ad076c8f9e (svn r6260) Improve readability 2006-08-31 08:36:31 +00:00
rubidium
27cee58ab8 (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc. 2006-08-28 18:53:03 +00:00
truelight
10b842bddc (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
2006-08-19 10:00:30 +00:00
Darkvater
e885129ab8 (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. 2006-08-13 10:22:34 +00:00
Darkvater
b1b0b26fc8 (svn r5872) - Feature: Add an icon to the SDL openttd executable. 2006-08-13 08:18:11 +00:00
bjarni
0f300a256c (svn r5460) -Feature: [OSX] macs with touchpads that support two finger scrolling can now use this "scrollwheel" to scroll up/down (ln-) 2006-07-04 19:02:49 +00:00
tron
2b27073156 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 2006-06-27 21:25:53 +00:00
tron
0a72639c2d (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 2006-06-10 08:37:41 +00:00
glx
11f4f6276f (svn r4810) - Fix: removed warning about strict-alias (release build) 2006-05-09 17:24:08 +00:00
bjarni
7b39ac7e1d (svn r4099) -Codechange: [OSX] the cocoa video driver speedup of around 1000% now also applies to Intel macs 2006-03-25 07:22:53 +00:00
Darkvater
74853e619a (svn r4091) - Fix r4075. Do not "enter" please. 2006-03-24 17:40:55 +00:00
Darkvater
58722eb145 (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 2006-03-24 17:00:55 +00:00
egladil
e38099dc29 (svn r4083) -Feature: [OSX] Ported r4075 (Undraw the mouse when it leaves the window and Draw it again when it enters). 2006-03-24 10:17:39 +00:00
bjarni
b8037ceb83 (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
2006-03-24 09:47:50 +00:00
Darkvater
ea1adebe31 (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. 2006-03-24 00:42:35 +00:00
Darkvater
cbab3eded2 (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) 2006-03-21 21:55:49 +00:00
bjarni
31e1c4fe49 (svn r3971) reverted r3742 as those new errors were not the right way to handle those exceptions 2006-03-18 16:11:29 +00:00
bjarni
dcdfa496d5 (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) 2006-03-02 22:21:27 +00:00
bjarni
e29a435226 (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
2006-03-02 22:00:57 +00:00
bjarni
67fde581ab (svn r3671) -Code cleanup: fixed style and removed commented out code in video/cocoa_v.m 2006-02-24 22:12:11 +00:00
bjarni
181853aff9 (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
2006-02-24 22:05:20 +00:00
Darkvater
c7e34bd103 (svn r3640) - Remove win32-only variables from variables.h and put them into win32_v.c. Also ifdef the win32 specific configuration file settings. 2006-02-20 23:01:58 +00:00
bjarni
92c37bd5ea (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
2006-02-19 10:21:01 +00:00
tron
55461bd2ec (svn r3617) Fix warning introduced in r3616 2006-02-18 18:27:17 +00:00
tron
ca98796259 (svn r3616) Style sweep 2006-02-18 17:27:06 +00:00
tron
543a324ef3 (svn r3615) Remove the Quartz key codes from the public cocoa video driver interface 2006-02-18 16:20:50 +00:00
bjarni
235e72829e (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
2006-02-12 14:31:33 +00:00
tron
84fb96fe85 (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
bjarni
be288e4d1b (svn r3393) -Fix: [OSX] some keyboards had a different scancode for opening the console (egladil) 2006-01-09 21:14:56 +00:00
truelight
10a2787fd5 (svn r3375) -Add: [ FS#29 ] show an error dialog for OSX cocoa driver (egladil) 2006-01-06 21:27:44 +00:00