Nicolas Hake
e2a8f6d303
Reorder some declarations and initializations to avoid order mismatch
...
While none of the mismatches were having a side-effect, this silences a
number of -Wreorder warnings which were drowning out potentially
important diagnostics.
2015-02-04 22:12:42 +01:00
Martin Plicht
2ca9a77cc4
mac: Do #include guessing dance until compile success
2015-02-04 21:52:04 +01:00
Günther Brammer
36ce941e4d
cmake: Restore SDL-Mainloop build
2015-01-25 19:05:06 +01:00
Günther Brammer
5bcedb5bbf
Remove some redundant #includes
2015-01-25 18:53:48 +01:00
Günther Brammer
a92c22a7b3
Merge various build system fixes and cleanups
2015-01-25 18:50:29 +01:00
Sven Eberhardt
e1a09298d4
Fix a few harmless warnings.
2015-01-25 16:16:06 +01:00
Nicolas Hake
d994b893ba
OSX: Fix capitalization of several imports and includes
2015-01-23 18:24:31 +01:00
Nicolas Hake
2ef2c637a7
Remove several instances of disabled legacy code
2015-01-18 22:59:45 +01:00
Nicolas Hake
57044a9eeb
Move STATUS_ASSERTION_FAILURE definition to where it's actually needed
2015-01-18 21:55:16 +01:00
David Dormagen
bd04722553
Merge branch 'master' into Controls
...
Conflicts:
planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c
planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c
planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c
src/game/C4GraphicsSystem.cpp
src/game/C4GraphicsSystem.h
src/game/C4Viewport.cpp
src/gui/C4GameMessage.cpp
2015-01-15 19:57:01 +01:00
Nicolas Hake
8a729b4c6f
Crash handler: Use PRIdPTR format where available
...
Printing pointers from the crash handler has been broken starting
with an update to MinGW at some point in the past, when they stopped
using printf from MSVCRT, instead replacing it with a private
implementation. Fix this by checking for inttypes.h availability, and
using it (and its format macro) when possible.
2015-01-15 10:18:37 +01:00
Sven Eberhardt
1c994ad3c7
Windows: Do not deselect GL context when losing focus ( #1208 ).
...
Fixes engine intialization when tabbing out.
2015-01-11 17:01:27 +01:00
Martin Plicht
b9c68f2208
mac: Fix build (C4Viewport ViewX/Y accessors)
2015-01-05 01:38:35 +01:00
Armin Burgmeier
039e03824a
Fix buffer underflow in GetExtension()
2015-01-04 18:29:36 +01:00
Tobias Zwick
5e188aafb3
Fix setting small ViewOffsets. Refactor neighbouring code, enable a slight MouseAutoScroll by default
...
* make ViewX,ViewY,ViewOffsetX and Y private, add getters and setters that update variables that are dependent on these
2015-01-03 22:53:02 +01:00
Günther Brammer
86842da9bd
Remove implementation details from C4SoundSystem.h
...
This eliminates the need to include Audio toolkit headers from there.
2015-01-03 22:01:08 +01:00
Günther Brammer
69f8ca27ec
Move C4ApplicationSec1Timer to StdScheduler.h
...
There is nothing "Application" specific about this class.
2015-01-03 21:06:25 +01:00
Günther Brammer
8889aeb128
win32: Compile Win32 scheduler for other GUI toolkits, too
2015-01-01 22:13:56 +01:00
David Dormagen
f89b8c8319
Merge branch 'master' into Controls
...
Conflicts:
planet/Objects.ocd/Environment.ocd/Cloud.ocd/DefCore.txt
planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/DefCore.txt
planet/Objects.ocd/Libraries.ocd/PowerConsumer.ocd/Script.c
planet/Objects.ocd/Libraries.ocd/PowerProducer.ocd/Script.c
planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
planet/System.ocg/ClonkControl.c
src/gui/C4MouseControl.cpp
src/landscape/C4PXS.cpp
2014-12-25 15:24:19 +01:00
Sven Eberhardt
f50e2e9e3a
Fix scroll bars in zoomed editor viewports on Windows.
2014-12-14 16:08:56 +01:00
Sven Eberhardt
8df39d06e4
Fix texture preview in editor tools dialogue on Windows.
2014-12-14 15:20:57 +01:00
Kevin Zheng
4fae398672
Fix build on 32-bit architectures
2014-12-10 21:45:41 +01:00
Sven Eberhardt
ac41e9a6eb
Fix music fading when fading back to the same piece that is currently fading out.
2014-12-09 23:37:39 +01:00
Sven Eberhardt
35b65cd78c
Use COMMENT (not COMMENTS) as the category field to select songs when using SetPlayList.
2014-12-09 23:37:34 +01:00
Sven Eberhardt
baf05264d1
Implement music fading.
...
Moved music system execution from game tick execution into main application execution so music fading works when the game is paused or lagging.
2014-12-06 18:04:55 +01:00
Sven Eberhardt
62e6da2f23
Add categories for .ogg music files that can be referenced in SetPlayList.
2014-12-06 00:06:08 +01:00
Martin Plicht
1ddb8ebf39
mac: Quit from main menu also calls Application.Clear()
2014-11-01 15:47:04 +01:00
David Dormagen
bb2ec10afd
fixed incorrect type of handle for some WIN32 file operations
...
The return type is intptr_t which may be 64bit. Stuffing that into an int can lead to an overflow, which then can lead to the error check (if handle < 0) failing.
Which has caused me to need to restart the game soooo many times already... Like some sort of old car with a broken starter.
2014-10-18 09:22:56 +02:00
Sven Eberhardt
e23c009fd9
Fix thread guards to use thread IDs instead of handles ( #1161 )
...
GetCurrentThread() returns the same pseudo-handle for every thread. It cannot be used to determine if two calls were made from the same thread.
2014-10-16 20:22:38 +02:00
Martin Plicht
cf474e99aa
mac: Rearrange sound toolkit includes and FindAudio.cmake so that sound+music works for OSX
2014-09-21 22:16:54 +02:00
Sven Eberhardt
144c8f8388
Implement music volume setting for OpenAL
2014-08-07 17:30:36 +02:00
Sven Eberhardt
271ef8ca09
Implement looping for OpenAL music.
...
Also added some error logging.
2014-08-07 15:51:58 +02:00
Sven Eberhardt
cfe242b2b8
Implement ogg file playing for OpenAL-based audio system. ( #1096 )
2014-08-07 13:46:45 +02:00
Nicolas Hake
642ce2eb9c
Merge all of the audio provider switches into one
...
There's no point in splitting the audio library selection into multiple
CPP macros, since there can always only be one anyway. Merge all of them
into a single macro AUDIO_TK (for "toolkit") and have CMake select one
for the user, instead of making him choose (and potentially failing).
2014-08-01 23:37:42 +02:00
Günther Brammer
8780a69b51
Improve the messages for path problems
...
C4Group::Open would sometimes overwrite more specific error messages or
not mention the problematic path. DirectoryIterator::Read also now mentions
more detail. Two superfluous messages were removed to make space.
2014-06-09 04:17:17 +02:00
Günther Brammer
8b927d142c
win32: Use stdint.h instead of windows-only compiler extensions
2014-04-19 19:02:22 +02:00
Günther Brammer
eed5836838
X11: Get the randr primary output only once
...
Not that its remotely likely that it changed in the millisecond between the
two requests, but the code is slightly clearer this way.
2014-04-19 19:02:21 +02:00
Julius Michaelis
67a99a88d9
Proper shutdown on SIGINT/SIGTERM/SIGHUP
2014-04-01 18:03:36 +02:00
Nicolas Hake
802cc8ece9
Fix some uses-after-free due to terrible StdBuf semantics
2014-03-19 14:21:23 +01:00
Martin Plicht
46df9d758c
StdScheduler: Make DoScheduleProcs virtual, override it in C4AbstractApp and set isInManualLoop flag around the DoScheduleProcs call so the FlushMessages() of C4AbstractApp will happen when isInManualLoop is true
2014-02-16 14:54:32 +01:00
Martin Plicht
c3dd3a08ce
StdScheduler::Added is not necessarily called from the thread the
...
procedure is meant to be run on, so introduce yet another StdScheduler
extra method StartOnCurrentThread which on Mac OS X does the actual run
loop registration stuff and needs to be called from the actual thread
the scheduler is supposed to run on
StdSchedulerMac: Remove SCHAdditions objects again
2014-02-16 10:18:38 +01:00
Martin Plicht
4299faefd4
StdSchedulerMac: Was crashy because of faulty memory management which is now hopefully better
2014-01-29 22:57:19 +01:00
Martin Plicht
3ce7d7ae7f
StdSchedulerMac: Only add NSRunLoop additions for main thread
2014-01-27 14:22:22 +01:00
Sven Eberhardt
32104f6bbe
Change StdScheduler loop to work in MSVC2010.
2014-01-26 16:26:27 +01:00
Martin Plicht
911c9b7713
C4AbstractApp: ScheduleProcs timeout parameter defaults to 1000/36 instead of -1 so the timeout is not determined to be infinity down the road, leading to mac version not getting out of the poll call anymore
2014-01-23 17:53:40 +01:00
Martin Plicht
d504626a40
StdScheduler: Split into StdSchedulerWin32/StdSchedulerPoll/StdSchedulerMac
2014-01-23 17:53:40 +01:00
Nicolas Hake
e0dc30c59a
Update copyright notices
...
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917 , I
have merged all copyright notices into a single file and referenced that
merged file from each source file.
For the updated source files, the timeline has been split into three
parts:
1. Pre-RWD code (before 2001)
2. RWD code (2001 through 2009)
3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Tobias Zwick
33f99bd361
buildfix for linux
2013-12-09 21:21:41 +07:00
Tobias Zwick
a3c641b6fc
fix error on negative timeouts in the scheduler for linux
2013-12-09 00:50:02 +07:00
Tobias Zwick
74087e2fc2
remove superfluous IsScheduledExecution
...
use C4TimeMilliseconds::PositiveInfinity instead to denote that the next tick should not be executed.
2013-12-09 00:50:01 +07:00
Tobias Zwick
b97d250aef
adapt C4TimeMilliseconds usage in C4AppGTKImpl to the infinity-usage
2013-12-09 00:49:59 +07:00
Tobias Zwick
5bcd762206
C4TimeMilliseconds returns a StdCopyStrBuf to avoid memory errors
2013-12-09 00:49:58 +07:00
Tobias Zwick
e9eea97864
make rest of the code not use C4TimeMilliseconds-pointers but instead use the infinity field.
2013-12-09 00:49:57 +07:00
Nicolas Hake
71dbd5bcfb
Use std::numeric_limits<> instead of INT32_MIN/INT32_MAX
...
We're implementing parts of <stdint.h> ourselves for old compilers, and
these macros aren't part of our compatibility interface.
Additionally, [C99 §7.18.2] (unfortunately, MSVC ignores this):
"226) C++ implementations should define these macros only when
__STDC_LIMIT_MACROS is defined before <stdint.h> is included.", which it
wasn't, so it wasn't portable in the first place.
2013-12-08 14:13:15 +01:00
Tobias Zwick
b73eabd4fd
add infinity-field to C4TimeMilliseconds, add linker error (*cough*)
2013-12-08 19:11:28 +07:00
Tobias Zwick
bdc895655d
add AsString method to C4TimeMilliseconds
2013-12-08 16:28:58 +07:00
Tobias Zwick
f5592a49e6
build fix
2013-12-08 04:05:56 +07:00
Tobias Zwick
fe2a400c02
replace global function GetTime() with class function C4TimeMilliseconds::Now()
2013-12-07 21:27:01 +07:00
Julius Michaelis
ebff82641c
Linux build fix for Newton
2013-12-04 19:19:33 +01:00
Tobias Zwick
3e5268ab19
buildfix for linux (missed out on a Linux-specific StdSchedulerProc)
2013-12-04 20:47:12 +07:00
Tobias Zwick
94c618d153
add new type C4TimeMilliseconds for time measurements to solve problems when GetTime() overflows ( #251 )
...
The new type C4TimeMilliseconds behaves for the most part like a uint32_t but is overflow-proof in comparisons.
In some places, a 0-value (or uint_max) of the variable storing the time had the special meaning "not set yet". This has been resolved by having it as a pointer to C4TimeMilliseconds with NULL meaning that it has not been set yet.
2013-12-04 19:35:07 +07:00
Nicolas Hake
15fcd8c51d
Add missing <time.h> include
2013-12-01 13:09:39 +01:00
Nicolas Hake
52fd2679cd
Fix line endings broken by ecf538c
, 7b9c1d5
, and ceca8b8
2013-11-29 14:18:48 +01:00
Tobias Zwick
ceca8b8fc7
add SoundAt function in C4Script (part of #238 ), document
...
also, extend the documentation for Sound with previously undocumented parameters; threw out undocumented and also unused "multiple" parameter.
2013-11-29 18:20:36 +07:00
Tobias Zwick
7b9c1d5a9e
refactor: consistently use time_t t... variables for times in network system, scheduler, gui
...
The network used to cast GetTime() to int, but GetTime() is an unsigned long. This might cause problems if GetTime() returns big integers (see #251 ). To solve this, the StdSchedulerProc interface had to be extended with another function in order to eliminate the magic return value -1 of GetNextTick for "no scheduled execution".
2013-11-29 17:28:04 +07:00
Tobias Zwick
ecf538cd1f
refactor: consistently use time_t t... variables for times in sound system, stats, application and player controls
2013-11-29 14:16:14 +07:00
Nicolas Hake
6399d7f4a4
win32: Dump crashes to UserDataPath instead of cwd ( #996 )
...
The working directory on windows is very likely to be the directory of
the binary itself. If we've installed to Program Files, that means we
cannot actually write there. That means we have to find a better place
to write dumps, and the user directory is a better place.
2013-11-10 19:35:56 +01:00
Nicolas Hake
f1d9abee68
win32: Disable callback crash filter on Vista
...
We're already disabling that filter on Windows 7 and up using the
application manifest, but Vista doesn't know about Windows 7
compatibility. Turn off the filter on Vista as well.
2013-11-10 19:22:27 +01:00
Martin Plicht
60bafd6b3b
Change remaining #ifdef USE_GL blocks into #ifndef USE_CONSOLE blocks (this makes Linux version work again)
2013-11-09 00:20:14 +01:00
Martin Plicht
59742510d9
linux/mac: Fix compilation after D3D removal
2013-11-03 11:44:20 +01:00
Tim Blume
240193ad5a
Remove remains of Direct3D support
...
Direct3D hasn't worked for more than a year now, and there don't seem to
be any efforts to revive it. Remove it and concentrate on better OpenGL
support.
2013-11-02 21:39:34 +01:00
Nicolas Hake
82b15553a1
C4AppGTK: Avoid SEGV on quit during initialization
...
When C4AbstractApp is destroyed, it will try to reset the current
video mode. This includes switching off the fullscreen flag of the
render window. When no render window has been created yet, for
example during the application initialization phase, this led to a
null pointer dereference due to a missing check.
2013-10-31 23:27:52 +01:00
Martin Plicht
cc11006f22
mac: Fix build
2013-10-04 22:34:57 +02:00
Martin Plicht
fb4117307b
mac: Fix Screen::rcBounds <> window size discrepancy + fullscreen windows still fill screen with less than fullscreen resolution in settings
2013-09-02 23:10:32 +02:00
Martin Plicht
8e387dd05a
mac: Make Screenshot (of whole map) in main menu
2013-09-02 23:09:48 +02:00
Martin Plicht
41926866cc
mac: Remove mouse-warping silliness (it doesn't work with tablets and I'm stupid D:)
2013-07-05 23:14:16 +02:00
Tobias Zwick
a6adc2465f
fix scancodes convert on windows for non-fullscreen
2013-05-30 21:51:34 +02:00
Tobias Zwick
61ee6d393f
Correct the scancode numbers for windows
...
Also reduce the duplication of these numbers in C4Window.h and C4KeyboardInput.cpp.
2013-05-26 18:07:09 +02:00
Martin Plicht
1d829361f7
mac: Minimal fix after scancode merge
2013-05-24 19:55:56 +02:00
Günther Brammer
9506c5ad97
Merge branch 'scancodes'
2013-05-24 17:47:59 +02:00
Sven Eberhardt
451f11bd37
Fix looping sounds under OpenAL
2013-04-09 22:31:02 +02:00
Sven Eberhardt
6250ff1766
Silence a few MSVC warnings
2013-04-01 12:48:02 +02:00
Günther Brammer
71d9e3c9e3
editor: Recognize pressing shift and alt in viewport again
2013-03-24 22:10:11 +01:00
Sven Eberhardt
3a7eb5bcd6
oops. remove superfluous debug log.
2013-02-27 00:27:14 +01:00
Sven Eberhardt
f5647d05fe
Fix sound volume when using OpenAL
2013-02-27 00:20:49 +01:00
Nicolas Hake
e33521c7ab
Win32: Fix build without -fpermissive
2013-02-21 00:28:58 +01:00
Nicolas Hake
ca6e474a15
Win32: optionally embed a build ID into crash dumps/minidump files
...
In order to get an embedded build ID, add a new CMake cache variable
named OC_BUILD_ID. This variable can contain an arbitrary string, but
it is suggested that you use a hierarchical string starting with your
DNS domain, reversed, as in "com.example.openclonk.arbitrarystring"
(think java packages).
2013-02-21 00:06:34 +01:00
Nicolas Hake
0c04606707
Win32: clean up crash handler pointer string format selection
2013-02-21 00:06:34 +01:00
Nicolas Hake
d2719bedd6
Win32: Make crash handler show the full EFLAGS register
2013-02-21 00:06:33 +01:00
Nicolas Hake
041016d087
Win32: Make crash handler properly show modules in stack traces
2013-02-21 00:06:32 +01:00
Günther Brammer
2a9d63cb2a
gtk: Use higher-resolution logo as window icon
...
Metacity started to display bigger icons in the window list, so the higher
resolution is now actually useful for me. While at it, use gdk-pixbuf-csource
to generate the .h at build time from the .ico instead of duplicating the
data in the repository.
2013-02-12 01:08:02 +01:00
Martin Plicht
f9863f2b1b
mac: Change type of K_* constants from int to C4KeyCode (int <-> long discrepancy)
2013-02-11 11:39:40 +01:00
Oliver Schneider
582e75d3da
Use scancodes instead of localized key ( #729 )
...
The options dialog still shows localized keys, but the config files use US-Layout keys (when loading default files) and scancodes when saving player changes.
2013-02-09 01:05:27 +01:00
Günther Brammer
9d34c4e30d
gtk: Make the window fullscreen even when not changing the resolution
2013-01-24 19:36:59 +01:00
Günther Brammer
414cb8a4c7
gtk: GDK_KEY_* constants require at least GTK+ 2.21.8
2013-01-20 18:41:07 +01:00
Günther Brammer
864c5c7ea8
copyright notices update 2012
2013-01-12 16:31:40 +01:00
Günther Brammer
41c88ba863
Use _snwprintf instead of swprintf
...
Apparently the C standard committee and Microsoft couldn't agree on how
swprintf should work.
We previously tried to work around the resulting breakage, but I just got
the following compilation error. It's really better to avoid that function
entirely. Since we only used it in windows-specific code, the
windows-specific _snwprintf is a nicely compiler-independent replacement.
src/platform/PlatformAbstraction.h: In function ‘int swprintf(wchar_t*, size_t, const wchar_t*, ...)’:
src/platform/PlatformAbstraction.h:243:12: error: redefinition of ‘int swprintf(wchar_t*, size_t, const wchar_t*, ...)’
/usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/swprintf.inl:30:5: error: ‘int swprintf(wchar_t*, size_t, const wchar_t*, ...)’ previously defined here
2012-12-31 22:03:12 +01:00
Günther Brammer
2d05c9501c
Make StdSync.h compile with neither windows nor pthreads again
2012-12-31 22:03:12 +01:00
Armin Burgmeier
e03c980038
Linux: Fix a crash when no primary output is specified
2012-12-28 17:32:12 +01:00
Armin Burgmeier
dfdd0fba3e
Remove debug logs in X11 gamma ramp code
2012-12-02 15:52:29 +01:00
Armin Burgmeier
55b2a15d15
SaveDefaultGammaRamp: Return true if everything worked correctly
2012-12-02 15:52:13 +01:00
Armin Burgmeier
fab541798f
SaveDefaultGammaRamp: Don't crash if primary output is not connected
...
Instead, use the first connected output from the list of all outputs.
This happens on my computer, probably because the desktop environment
does not set the correct primary output.
2012-12-02 15:51:06 +01:00
Armin Burgmeier
e8a4628d6a
Fix xrandr version check for gamma ramp modification
2012-12-02 15:10:27 +01:00
Armin Burgmeier
0556bd6cd7
Initialize all variables in C4X11AppImpl
2012-12-02 15:09:44 +01:00
Günther Brammer
8cfd88f0d2
Make dedicated server compile with fmod
2012-11-30 22:20:16 +01:00
Günther Brammer
327bfa31e7
Remove some superflouos output from the dedicated server
2012-11-30 22:20:16 +01:00
Günther Brammer
b5ae4f1f9d
Move CStdInProc to its own source file
...
It should be usable without USE_CONSOLE, even though only the dedicated server
uses it at the moment.
2012-11-30 22:18:38 +01:00
Günther Brammer
cb74726158
Fix some BSD portability issues
...
Thanks to mdg on the forum and the Debian buildd.
2012-11-19 17:23:31 +01:00
Günther Brammer
069b36a1bd
X11: Finish xf86vidmode removal
2012-11-18 01:07:59 +01:00
Günther Brammer
7967d94a59
Merge StdFont.cpp and C4Fonts.cpp
2012-11-12 02:30:16 +01:00
Günther Brammer
4dffefe8c9
X11: Remove support for the xf86vidmode extension
...
In practice, only the xrandr code path received any testing. Since Clonk
works fine without changing the resolution, this will not terribly
inconvenience anybody still stuck on old systems without xrandr.
Also only minimize the window when the resolution was changed.
The minimization is there to prevent accidental focus restoration
resulting in unwanted resolution switching.
2012-11-17 18:07:37 +01:00
Sven Eberhardt
99992b6f47
Fix sync loss and missing landscape or objects when joining two consecutive games without restarting the engine inbetween
...
Caused by an outdated cache of the DirectoryIterator in the main scenario group
2012-11-17 19:44:04 +01:00
Günther Brammer
a8dfeeaf7e
win32: Make USE_CONSOLE compile again
...
There's even a plausible implementation of CStdInProc::GetEvent.
2012-11-15 23:01:24 +01:00
Günther Brammer
c7e270d9d2
Fix SDL mainloop build
2012-11-01 18:10:38 +01:00
Tobias Zwick
12423b4b4f
fix possible problems with several monitors on windows
2012-10-28 02:35:29 +02:00
Günther Brammer
77479e4f71
Get the window size fresh from the window instead of storing it
...
This makes Application.GetConfigWidth/Height simply return the appropriate
configuration value instead of mixing configuration and state in the same
function. The caller needing the state now uses C4Window::GetSize instead.
2012-10-22 23:15:48 +02:00
Tobias Zwick
1ae7d55a21
fix odd cursor jumping on mousewheel use on windows ( #439 )
2012-10-28 02:11:03 +02:00
Julius Michaelis
c4506a2b69
Fix entering fullscreen mode in lobby
...
Remove a debuglog
2012-10-14 17:45:01 +02:00
Julius Michaelis
69bbc6b4d1
Fix resolution reset in editor mode and on tabbing out
...
Win32's SetVideoMode doesn't enumerate display modes anymore for windowed mode
2012-10-14 13:28:38 +02:00
Martin Plicht
38256bfaac
mac: First startup with no resolution configuration uses desktop resolution, resolution switching from options works correctly
2012-10-13 15:01:13 +02:00
Armin Burgmeier
26e7ae3532
Fix crash when changing AA setting on Linux ( #744 )
2012-10-13 14:15:09 +02:00
Armin Burgmeier
2ce648e5b5
Fix a GTK warning when changing anti-aliasing
2012-10-13 12:49:53 +02:00
Sven Eberhardt
8bdd761027
PlayerControls: Allow usage of keyboard scan codes instead of virtual key names using $%x format (Win32 only)
...
Also re-resolves keys if the keyboard layout changed at runtime.
2012-10-09 00:54:34 +02:00
Sven Eberhardt
dada37d70e
Sound system: Fix leaking channels when using OpenAL. (This caused sounds to stop after playing for a while)
2012-10-07 17:03:46 +02:00
Sven Eberhardt
6e953acc88
Sound system: Fix endless recursion when a sound couldn't be started due to lack of free channels
2012-10-07 16:34:08 +02:00
Sven Eberhardt
00349f045a
SoundSystem: Implement non-apple wav loading when using OpenAL
2012-10-07 13:18:28 +02:00
Julius Michaelis
87854916ba
Fix fix: cb043bd90678
...
Quickfixes are bad
2012-10-07 12:42:51 +02:00
Sven Eberhardt
15aa9b961e
FIx build using OpenAL in MSVC
2012-10-05 18:02:52 +02:00
Tobias Zwick
41a33999cd
remove video playback feature
2012-10-04 23:03:57 +02:00
Julius Michaelis
ab880d6bd8
Fix 2c9e6ac9f614 (windows + logic)
2012-10-03 00:54:56 +02:00
Julius Michaelis
023aa90c0e
Add config option for automatic windowed/fullscreen switching
2012-09-29 23:49:30 +02:00
Martin Plicht
b264612b10
mac: Move C4EditorWindowController from platform to editor
2012-09-02 20:57:49 +02:00
Martin Plicht
562565f865
mac: Move C4OpenGLView.mm/h to graphics/C4DrawGLMac.mm/h and move some C4AbstractApp functions to C4AppMac.mm to better match implementations for the other platforms
2012-09-02 20:51:43 +02:00
Martin Plicht
c2c484e70b
mac: Rename C4AppDelegate.consoleController to editorWindowController
2012-09-02 16:18:20 +02:00
Martin Plicht
10a328d5ba
mac: Change prefix of Objective-C classes/filenames from Clonk to C4, give xib files names that make more sense
2012-09-02 15:39:29 +02:00
Martin Plicht
f389fd230c
mac: Fix C4FileMonitor implementation by reporting files modified since last 3 seconds
2012-09-02 14:59:30 +02:00
Martin Plicht
f6825d073e
mac: Compile with Automatic Reference Counting enabled
2012-09-02 13:56:53 +02:00
Martin Plicht
f7a26ba1a5
mac: Filter out Cocoa command line arguments that confuse clonk when started from the Xcode debugger
2012-09-02 11:24:49 +02:00
Martin Plicht
ee140e4d08
mac: C4Application::SetVideoMode: Use desktop size when passed iXRes=iYRes=-1
2012-09-02 10:51:35 +02:00
Günther Brammer
f6db61750e
Store the size of the non-fullscreen-window separately
...
The size of that window can be adjusted by the player, so there is no need
for a GUI option.
2012-08-30 00:13:14 +02:00
Günther Brammer
cc25878ba6
Default to not changing the resolution
...
1. We receive bugreports that changing the resolution doesn't work, but
can't reproduce that
2. Flat screens look best at their natural resolution
2012-08-19 20:59:01 +02:00
Nicolas Hake
58ac553956
Win32: Do not reset graphics mode if no change is required
2012-08-28 00:01:01 +02:00
Nicolas Hake
faf0006a6f
Win32: Improve error reporting when changing resolution
2012-08-28 00:00:29 +02:00
Günther Brammer
06cb8b595d
win32: Remove obsolete #include multimon.h
...
multimon.h was only needed for compatibility with Windows 95.
2012-07-18 03:40:19 +02:00
Nicolas Hake
59b48f5069
Win32: Accept dropped definition files
...
Viewport windows had the required code to hande dropped files, but didn't tell
the window manager they'd accept drag & drop messages.
Also pull a loop invariant out of the loop (drop point can't change while we're
processing the drop message) to save function calls in cases with more than one
dropped file.
2012-05-23 22:37:07 +02:00
Günther Brammer
1995b59adc
win32: C4Window::SetSize calls AdjustWindowRectEx, GUI::Dialog doesn't need to
2012-04-28 15:09:35 +02:00
Günther Brammer
1a29f8625d
Reorder engine source file organization a bit
...
This mostly consists of flattening the hierarchy, splitting the
graphics stuff out of platform, and a few smaller cleanups.
2012-04-27 19:04:43 +02:00
Armin Burgmeier
e11e9845d1
Fix Windows build
2012-04-23 21:45:01 +02:00
Martin Plicht
cd4db8ebaf
mac: Remove KeyMask assignment and inline HandleNSEvent
2012-04-23 20:14:42 +02:00
Armin Burgmeier
206f90adbc
Pass through key state handling from event callbacks ( #745 )
...
This gets rid of Application.IsAltDown() and friends which was used for
this purpose in C4MouseControl and C4EditCursor. In case non-event
callbacks need to access the state of the modifier keys the state is
now cached in these classes (if it wasn't already).
This new solution is supposed to be more robust, since the key modifier
state comes always directly from the input event. This fixes #745 , where
Application.IsAltDown was stuck for some reason.
I updated the Windows and Mac code as well, but wasn't able to test it,
it might not compile and/or not work, in which case please someone fix it :)
2012-04-22 22:09:06 +02:00
Günther Brammer
075bc3b866
gtk: fix build with glib older than 2.30
2012-04-20 21:09:17 +02:00
Günther Brammer
7632c823fe
gtk: Drop compatibility with GTK versions older than 2.18
2012-04-18 00:37:31 +02:00
Günther Brammer
f0c545d773
gtk: Fix build with GTK versions older than 3.4
2012-04-18 00:31:48 +02:00
Günther Brammer
3596daad22
gtk: Make mousewheel scroll again
2012-04-17 22:45:11 +02:00
Bernhard Bonigl
63f0a49614
Added new blitmode: GFX_BLIT_Wireframe
2012-04-17 17:29:29 +02:00
Nicolas Hake
368692b7d8
GTK: Build fix
2012-04-15 13:32:13 +02:00
Nicolas Hake
cbbcf200cf
win32: Build fix
2012-04-15 13:22:58 +02:00
Tobias Zwick
46156e3f1c
show tooltip for C4D_MouseSelect using the property "Tooltip"
...
+ remove references to the old and obsolete "help mode"
2012-04-15 12:09:54 +02:00
Günther Brammer
e125003aa9
gtk: Deactivate the resize grip on the OpenGL-drawn windows
2012-04-15 01:17:50 +02:00
Günther Brammer
ca7c284c85
gtk: Rename C4AppX to C4AppGTK
2012-03-05 00:38:23 +01:00
Günther Brammer
15ebf70ab1
win32: Move C4GUI::DialogWindow platform code to C4WindowWin32.cpp
2012-04-01 22:16:59 +02:00
Günther Brammer
52e0b52ba9
gtk: Remove some obsolete X11 code
2012-04-10 23:39:16 +02:00
Günther Brammer
31b4c1f2fa
gtk: Use gtk X11 display connection for glX
2012-04-10 23:39:49 +02:00
Günther Brammer
05cc1490ea
gtk: Reimplement C4Window's GetSize, SetSize, SetTitle
2012-04-04 21:05:48 +02:00
Günther Brammer
0a6c9df7f3
gtk: Move the FindInfo functions to C4WindowGtk.cpp
2012-04-01 22:30:55 +02:00
Günther Brammer
c102fe19d8
gtk: Use gtk functions to make a window fullscreen
2012-04-10 03:36:09 +02:00
Günther Brammer
c865021716
gtk: Fold C4GtkWindow into C4Window
2012-04-11 04:15:33 +02:00
Günther Brammer
dc41afded5
gtk: Replace some X11 input event handling
...
This regresses because IMs aren't used anymore. GTK+ has its own
IM implementations we should use instead, but for now event->string
is simpler.
2012-04-09 01:10:21 +02:00
Günther Brammer
5f93869978
gtk: Replace C4FullScreen.cpp X11 code with gtk in C4WindowGTK.cpp
2012-04-10 01:56:20 +02:00
Günther Brammer
feb13288fa
gtk: Replace C4GUI::DialogWindow XLib with gtk calls
2012-04-04 03:42:33 +02:00
Günther Brammer
86a99ce458
C4Window: Introduce a separate WindowKind for the console window
2012-03-28 19:37:13 +02:00
Günther Brammer
85a75577e3
gtk: Move some C4ViewportWindow gtk code to C4WindowGTK.cpp
2012-04-09 01:15:30 +02:00
Günther Brammer
c5f3cf88ae
gtk: Use gtk clipboard functions instead of our own code
2012-03-26 00:43:09 +02:00
Günther Brammer
a7330097f6
win32: Move parts of WM_ACTIVATE handling from CStdGL to C4Window
2012-04-07 21:33:39 +02:00
Armin Burgmeier
6238c1d5be
Fix mesh rendering crash when previous GL operation enabled color array ( #739 )
2012-04-09 22:03:55 +02:00
Armin Burgmeier
7efd7f9df5
Replaced glInterleavedArrays by gl*Pointer
2012-04-07 16:47:23 +02:00
Martin Plicht
20343b4628
mac: Fix mouse movement. Again
2012-04-04 08:44:37 +02:00
Martin Plicht
26fec4ca89
mac: Lion: More fullscreen/mouse movement fixes, hopefully the mouse now actually works in-game and moving mouse into screen corners does not trigger mission control or whatever else is set as hot corner actions. Remaining problem is that when activating mission control with the clonk window active, the user cannot move the mouse cursor since it's still stunned by CGAssociateMouseAndMouseCursorPosition(FALSE)
2012-03-29 00:43:03 +02:00
Martin Plicht
397557f1e1
mac: Gamma: Don't maintain conversion table (what was I thinking?)
2012-03-29 13:30:36 +02:00
Martin Plicht
c02f334d15
mac: Switch to game window when application activated
2012-03-28 22:38:33 +02:00
Martin Plicht
50e6e497b1
mac: Lion: Fix mouse movement when scrolling (grunt)
2012-03-28 15:03:25 +02:00
Martin Plicht
e25351ed04
mac: Lion: More mouse shenanigans to suppress hot corner actions when in fullscreen mode
2012-03-28 14:50:50 +02:00
Martin Plicht
f1c7ceeb75
mac: Lion: Restore not redrawing the window when in fullscreen mode and inactive
2012-03-24 19:43:50 +01:00
Martin Plicht
ef289a0c60
mac: le typo
2012-03-25 12:52:48 +02:00
Martin Plicht
01530ea3b1
mac: Add key codes for "Backslash", "Comma_US" and "Less"
2012-03-23 18:11:46 +01:00
Martin Plicht
db6009d8b1
mac: Fix exclusive dialogs not clickable in game mode
2012-03-25 12:08:06 +02:00
Günther Brammer
40de33ca3c
win32: Make sdl-mainloop option work
...
As it doesn't have the editor, this is only useful for compiling
more of our code on more platforms.
2012-03-23 22:53:56 +01:00
Günther Brammer
25bbaef7d2
sdl-mainloop: Draw things again
2012-03-25 01:54:07 +01:00
Martin Plicht
160e214196
mac: Silly pinch gesture in mainmenu to toggle fullscreen mode Lion-compatible
2012-03-23 00:21:03 +01:00
Martin Plicht
aaa5a71e4b
mac: Support Lion FullScreen
2012-03-23 00:03:05 +01:00
Martin Plicht
62f7540b2d
mac: Turns out, shift+mouse actions were never properly processed. Whoops
2012-03-22 21:08:19 +01:00
Martin Plicht
9177c3e515
mac: Fix some Xcode warnings
2012-03-22 01:19:10 +01:00
Martin Plicht
a8cadb8723
Amazing fixes to make it compile for Mac again
2012-03-20 16:38:45 +01:00
Martin Plicht
379836f32c
cmake: mac: Don't require rt library
2012-02-14 16:25:23 +01:00
Martin Plicht
12af060162
ClonkAppDelegate: Config.Load without parameters
2011-10-16 16:25:38 +02:00
Martin Plicht
5b67e90830
mac: Game window: Zoom to actual backing store size
2011-10-16 16:14:35 +02:00
Martin Plicht
d86b7d36b0
Mac: Handle various quit messages gracefully
...
*Not quitting immediately when in a game but just showing the Exit dialog
*React to Dock Quit menu item and Tab-Switcher Cmd+Q
2011-10-16 16:12:37 +02:00
Martin Plicht
e7878038c8
mac: Use standard localization facility for addon installation dialogs + put addons into preferred installation location (Library/Application Support)
2011-10-16 16:09:05 +02:00
Martin Plicht
12f2ca9c2e
mac: Restore addon-installation behaviour + Open scenarios contained in Reloc paths
2011-03-20 07:04:49 +01:00
Sven Eberhardt
6b203c2fe1
MSVC compile warning fix
2012-03-18 17:25:27 +01:00
Günther Brammer
9f0370f26c
win32: fix infinite recursion in editor viewport initialization
...
Even the most trivial of code moving can result in bugs.
2012-03-15 15:58:32 +01:00
Günther Brammer
b895bbad31
Consolidate some random platform abstraction functions into a single file
...
That way, the windows variants can be used without requiring the Win32
C4Window implementation.
2012-03-12 20:43:27 +01:00
Günther Brammer
1929e8d779
linux: add CLOEXEC flag to miscellaneous calls
2012-03-05 02:48:27 +01:00
Günther Brammer
b4fd8fcd15
linux: Add O_CLOEXEC to various open calls
...
This should prevent some file descriptor leakage from forks that
some libraries we use do.
2012-03-05 01:33:02 +01:00
Günther Brammer
4bc309122d
Refactor C4Viewport::Init and C4ViewportWindow::Init a bit
2012-03-04 22:45:00 +01:00
Günther Brammer
ea66890086
win32: Move fullscreen and viewport WndProcs to C4WindowWin32.cpp
2012-03-04 22:41:35 +01:00
Günther Brammer
8e8e965b8b
win32: #define _UNICODE
...
We apparently do not use any of the C library function this affects, so
this only silences some warnings some versions of some windows headers
produce when only UNICODE is defined.
2012-03-04 19:16:30 +01:00
Günther Brammer
ae322aa847
Remove some dead code
2012-03-04 21:44:20 +01:00
Günther Brammer
19eefbc777
Move Gammaramp code from CStdGL to C4AbstractApp
...
The windows code now has to delegate to StdD3D like it does for the
resolution setting, but for the other ports the code fits much better in
the app source files.
2012-02-28 20:40:19 +01:00
Günther Brammer
b7f7c933b1
Remove unused Application.DoNotDelay
2012-03-11 23:06:23 +01:00
Günther Brammer
afe5411709
linux: Replace Application.Location with readlink("/proc/self/exe")
2012-03-11 23:01:21 +01:00
Günther Brammer
b4439ac1b7
Remove unused C4AbstractApp::ClearClipboard
2012-02-28 01:37:26 +01:00
Günther Brammer
dfea0914a9
Merge the functions pointer branch
2012-03-09 17:42:48 +01:00
Julius Michaelis
ed5d615aab
Check for OpenGL Version 1.2 and two functions from 1.3 instead of requiring full 1.3 ( #692 )
2012-03-03 23:25:50 +01:00
Armin Burgmeier
fa7e922321
Fix rendering of mesh pictures to non-square target rectangles
...
This is still not perfect yet, but I suppose to get better we'd need
to compute the bounding box of the transformed mesh.
2012-03-03 01:45:46 +01:00
Armin Burgmeier
7f5f916e76
Draw only partial set of faces for buildings in construction
2012-02-26 01:09:42 +01:00
Armin Burgmeier
de67769065
Fix crash when C4Draw::Blit was called with NULL source surface ( #721 )
2012-02-26 01:01:55 +01:00
Armin Burgmeier
9d94b1da6e
For scaled sprite graphics, don't interpret Picture coordinates as scaled
...
Otherwise an object with a scale of 5 and a picture of 64x64 (such as the
Metal and the GoldBar objects) cannot properly set the picture rectangle.
2012-02-25 17:35:24 +01:00
Armin Burgmeier
f710c68b9a
Reset AlphaToCoverage GL state after having rendered a mesh
2012-02-19 17:49:02 +01:00
Armin Burgmeier
8dae8c111d
Implement XML loading support for geometry shared between submeshes
...
The new OGRE blender exporter (2.6) creates meshes which make use of this
feature.
2012-02-15 23:04:19 +01:00
Armin Burgmeier
e52d914638
Read but ignore some more "pass" options in material scripts
...
These are the ones that the blender 2.6 exporter sets automatically. We don't
support them yet but we want to be able to load the material script
nevertheless. Many of the additional options are set to their default values
anyway.
2012-02-13 23:40:47 +01:00
Günther Brammer
90f4f7f77b
Work around crash bug in SDL_mixer 1.2.12
...
See http://bugzilla.libsdl.org/show_bug.cgi?id=1418 for details
2012-02-12 21:28:17 +01:00
Günther Brammer
9f180dffee
Script: Remove ScriptGo, ScriptCounter, goto and the ScriptN callbacks
...
No scenario uses them, and ScheduleCall provides an alternative.
2011-09-19 21:33:05 +02:00
Günther Brammer
a9e1af7226
unix: Use clock_gettime(CLOCK_MONOTONIC, ...) instead of gettimeofday
...
gettimeofday returns wall clock time, which can jump around, which is bad for
our purposes. clock_gettime(CLOCK_MONOTONIC, ...) does exactly what we need - a
stable measurement of time since an arbitrary point.
2011-06-27 01:52:39 +02:00
Armin Burgmeier
de4a93cfc5
win32: Actually use the new delay when the timer delay is updated
...
Instead of just re-creating the timer with the old value. This fixes using
/speed to make the game faster than the default.
2012-02-12 15:54:36 +01:00
Armin Burgmeier
70a67204cb
win32: Scheduler runs timeouted procs also when flooded by event inputs ( #256 )
2012-02-12 15:15:03 +01:00
Armin Burgmeier
86bc3ac417
Don't print an error message for ERROR_PATH_NOT_FOUND in DirectoryIterator::Read
...
We do the same already for ERROR_FILE_NOT_FOUND. This fixes a harmless warning
when running the engine in a release directory where there is no planet/
directory.
2012-01-28 18:15:51 +01:00
Nicolas Hake
3738069ecd
MinGW: Define UPnPNAT CLSID/IID values
2012-01-15 23:22:01 +01:00
Nicolas Hake
683800c33c
win32: Add UPnP port mapping support
2012-01-15 21:27:16 +01:00
Armin Burgmeier
6afadc6397
Allow mesh graphics images in messages
2012-01-10 22:40:46 +01:00
Armin Burgmeier
9682cec2ed
Make MOD2 rendering for meshes work properly
...
It will still fail for multi-textured meshes or textures with special
drawing options. This could be fixed eventually using a shader or
applying colormod/MOD2 in an additional texture unit.
2011-12-25 18:55:45 +01:00
Günther Brammer
91e3a0ca07
Remove unused EraseFiles and EraseItems functions
2011-11-02 21:34:04 +01:00
Günther Brammer
5f2f995852
Unify the #include blocks a little bit
...
One line for C4Include.h, one for the .h corresponding to the .cpp, one
empty line, the other C4* includes, another empty line, external headers.
2011-11-01 23:17:41 +01:00
Nicolas Hake
af8cc1320f
Do not throw from DirectoryIterator::Read ( #681 )
2011-10-29 01:16:13 +02:00
Günther Brammer
5f5f2f3975
Fix definition drag-n-drop from file manager to editor viewport
2011-10-21 22:56:26 +02:00
Julius Michaelis
926e251931
Fix SoundSystem, attempt #4
2011-10-15 14:43:18 +02:00
Julius Michaelis
eda64786fc
Fix Windows build (C4VidePlayback vs f1202c46e544)
2011-10-15 12:55:24 +02:00
Julius Michaelis
74af3071e3
C4SoundSystem: Load all sounds statically
...
Enable true wildcards in sound names
Fix #680 / 115b63d14d54
2011-10-13 17:05:40 +02:00
Günther Brammer
4aa119af21
Make C4SoundSystem.cpp utf-8 again
2011-10-13 02:09:50 +02:00
Julius Michaelis
0f12b3485e
Find sounds with all extensions instead of only wav, so Sound() does no longer require .ogg extensions
...
Do not replace * with ? in sound name wildcards anymore, adjust scripts
2011-10-12 23:09:22 +02:00
Günther Brammer
fa1cab4896
Clean up some obsolete Config.General.ExePath usages
2011-10-10 23:28:01 +02:00
Sven Eberhardt
452f34ffd9
Debug: Add thread checking for CStdFile
2011-10-09 20:11:18 +02:00
Martin Plicht
d5c94ae089
Mac: Fix some compiler errors caused by class renamings (C4AbstractApp etc)
2011-10-09 19:33:14 +02:00
Peter Wortmann
ad79ece074
Mac: Put game data into bundle
...
This makes it possible to ship the bundle stand-alone. Also
note that CMake will automatically pack the game data for
release builds, but sym-link the game data for debug builds.
Note this means you will only see the parts of planet/ that
are mentioned in OC_C4GROUPS in CMakeList.txt! This is equivalent
to the behaviour of the shipped build, so I don't see this as
a problem.
2011-10-09 17:09:48 +01:00
Günther Brammer
20b71f030a
Clean up StdDDraw2.h a little
2011-10-03 17:19:51 +02:00
Günther Brammer
1cafba4be8
Rename files implementing C4AbstractApp and C4Window
2011-10-03 17:19:24 +02:00
Günther Brammer
c2908d5bd5
Rename CStdDDraw to C4Draw
2011-10-03 16:34:08 +02:00
Günther Brammer
2b6f4432de
Rename lpDDraw to pDraw
2011-10-03 16:30:18 +02:00
Günther Brammer
ad89e12a2c
Rename CTexMgr and CTexRef to C4TexMgr and C4TexRef
2011-10-03 16:16:38 +02:00
Günther Brammer
68d6b34f72
Replace SURFACE with C4Surface *
2011-10-03 16:07:07 +02:00