Commit Graph

709 Commits (master)

Author SHA1 Message Date
Sven Eberhardt d9b8de9ea2 Win32: Fix file deletion from scenario selection dialogue 2016-01-24 00:43:09 -05:00
Sven Eberhardt 28e794654c Add network option to disable UPnP.
Also add some more UPnP failure messages to log.
2016-01-24 00:11:14 -05:00
Sven Eberhardt e94c0e38fc Add scenario core field "Mode" (in [Game]) to allow setting game mode independent of goal objects.
To be used by the league so you can properly host race scenarios in the open melee league.
2016-01-23 21:19:22 -05:00
Günther Brammer 93f12150c4 CMake: Remove obsolete USE_X11 option and add USE_WIN32_WINDOWS
USE_WIN32_WINDOWS was previously defined in PlatformAbstraction.h. Move it
to CMakeLists.txt and config.h like its peers. Replace USE_X11 with USE_GTK
or GDK_WINDOWING_X11 as appropriate.
2016-01-23 20:36:34 +01:00
David Dormagen 8418da86d6 custom GUIs: fixed scrollbar offset with active upper board (#1612)
I guess the UI elements expect their position to already be corrected by cgo.X/Y. Or they never cared because they were in front of the upper board.
I am not sure, maybe the correct solution would be to actually position all elements lower (instead of adjusting for it when passing mouse input or drawing)? Currently the position is relative to the upper board's edge.

Anyway, this works for now.
2016-01-21 22:17:47 +01:00
David Dormagen 8ba1e042a0 script GUIs: fixed clipping with active upper board
I know that the issue was noticable starting from https://git.openclonk.org/openclonk.git/commit/cd57e474935b283e58c7ae7edd137c049f87f90c
I don't know WHY it was not noticable before, though. It had probably always been a defect.
2016-01-20 22:30:35 +01:00
David Dormagen 9292718ca5 script GUIs: fix auto-height window size with pure text windows
Otherwise, if a window was GUI_FitChildren and the text would NOT trigger a scrollbar, the window height was set to 0 (because the text height was only taken into account when rawTextHeight - 1 > rcBounds.Hgt).
2016-01-20 10:33:11 +01:00
David Dormagen cd57e47493 script GUIs: fixed text clipping and scrolling (#1605, related to #1612)
Previously, text windows would just change their own size and leave cropping and scrolling to their parent. This made the code easier, but was apparently unintuitive for scripters.
Now text windows do not change their size but show a scrollbar themselves (unless GUI_FitChildren or GUI_NoCrop of course).

This implied some other changes, because now parents without a scroll bar need to clip, too. (Or the clipping needs to be moved to the child window. But then it would have to be made sure that menu decoration can still go out of the bounds.)
And this also needed some script fixes where scripters assumed the text windows would not scroll (and thus made them smaller than 1em).

related to https://git.openclonk.org/openclonk.git/commit/46ad28ea652fad34814a866f3b9c305aa7cc6faa
2016-01-18 21:39:54 +01:00
Sven Eberhardt 47add34d8f Use less annoying lobby countdown sounds 2016-01-17 22:35:59 -05:00
Sven Eberhardt afab6ef464 func PlayerControl: Send nil instead of 0 for non-mouse controls.
The main script function always assumed this, but it was not actually implemented that way.
2016-01-16 22:06:19 -05:00
David Dormagen ba2cf8f096 fix incorrect clipping in script GUI windows (#1592)
I am not sure why the 'isMainWindow' was there. It wasn't there in 7319f7b3cc and got introduced in the major rework in 049088be78 - I guess it was just an oversight that was not noticed because usually the UI windows have the text or other things that need to scroll on a deeper level.

Anyway, checking whether the window is a script-root window does not make any sense as far as I can see now.
2016-01-12 22:18:57 +01:00
Armin Burgmeier bb39597711 main menu: limit player selection to one player (#1529) 2016-01-11 18:33:08 -08:00
Armin Burgmeier 7e19070ef3 Allow to only select a single player in the menu (#1529)
Due to the lack of gamepad support, splitscreen support is somewhat pointless
at the moment.
2016-01-11 18:28:23 -08:00
Armin Burgmeier b6393a7a15 remove windows-specific fonts from default font list on linux and mac (#1573)
Otherwise the font chooser in the startup options shows those fonts, but
loading them will fail. Ideally we replace this by enumerating the system
fonts at some point.
2016-01-10 20:51:17 -08:00
Sven Eberhardt 889bba299e Fix /todo as network client.
It would write into a TODO file in the temporary network file.
2016-01-09 21:42:32 -05:00
Sven Eberhardt dd25f85e6d Warn when assigning duplicate keys #1170 2016-01-09 17:00:21 -04:00
Sven Eberhardt e89779a8c7 Handle key-up events corresponding to keys that were down even if scope is not matched #1145 2016-01-09 00:19:38 -04:00
Günther Brammer 5db59e8665 Fix C4MessageBoard key binding lifetime
I think C4Game::InitKeyboard relies on the callback targets outliving the
keybindings and every other class is prepared to be deleted before
C4KeyboardInput::Clear(), so needs to hold a ref to the keybinding to
delete that in its destructor.

C4KeyBinding is the class that is used for that, and it sets the reference
count to 1 in the constructor, to represent the reference held in the
owning class.

On the other hand, C4CustomKey gets immediately forgotten by C4Game and the
only reference is held in the keymap.

To prevent this from happening again, make the C4CustomKey constructors
protected and C4Game a friend of the class.

Also remove an unused C4CustomKey constructor.
2016-01-01 16:24:43 +01:00
Nicolas Hake c0befc6ba0 Remove C4RTF
The only use of C4RTF in its final moments was parsing out plain text
from RTF files anyway, so why even go to all the trouble instead of just
storing plain text in the beginning?
2015-12-29 17:51:43 +01:00
Günther Brammer 6a53066c36 Include config.h only from PlatformAbstraction.h
In order to avoid duplication, PlatformAbstraction.h has to be included at
the start of every source file, so that various headers can rely on it
being there. To avoid confusion, always rely on that, instead of sometimes
randomly including it or parts of it again.
2015-12-28 18:50:31 +01:00
Nicolas Hake d737dc1b05 Remove C4Video, StdVideo
Video recording and playback only worked on Windows, and recording only
handled video, not game audio. As such, it was of fairly limited use,
and there's lots of software available these days that handle both.
2015-12-28 11:43:41 +01:00
Nicolas Hake 7475b89bd2 C4MessageBoard: Merge Default/Clear into ctor/dtor 2015-12-28 11:43:40 +01:00
Nicolas Hake 24a7c75a1b C4MessageBoard: Remove unimplemented member DrawLoader 2015-12-28 11:43:39 +01:00
Nicolas Hake fc1189dfe4 C4UpperBoard: Remove empty Default/Clear 2015-12-28 11:43:38 +01:00
Nicolas Hake 3c625a00dd C4Game: Turn some owned pointers into std::unique_ptr
Using std::unique_ptr instead of raw pointers makes ownership clear and
avoids leaks.
2015-12-28 11:43:37 +01:00
David Dormagen 65dc58c77d fixed wrong positioning of script GUI windows with the GUI_Multiple flag on startup (#1477)
GUI_Multiple windows are supposed to be updated from the root window in a full refresh. However, they also had the "dirty" flag set (that is only used for non GUI_Multiple windows after the initial startup), but they did not unset it when updating.
So they were first updated with the correct parent width (full screen) and then, because of the dirty flag, were updated again like a non GUI_Multiple window with the parent's size. That was incorrect. Only another update would then fix it again (because the "dirty" flag would then have been unset).
2015-12-27 15:48:32 +01:00
Nicolas Hake f0eeb3f6b3 Make headless build compile again 2015-12-15 19:45:32 +01:00
Sven Eberhardt e0bcaf8d7d Sound UI::Confirmed (instead of Objects::Connect) 2015-12-15 01:41:25 -05:00
Sven Eberhardt 1d7c5c00c8 Add some missing UI sounds.
Still missing UI::Error.
2015-12-15 00:25:44 -05:00
David Dormagen dcfb986e34 moved sounds into subfolders
This completes http://forum.openclonk.org/topic_show.pl?tid=3215
2015-12-13 22:14:55 +01:00
Sven Eberhardt 499959fa14 Fix team distribution of savegame resume and initial script players #1494 2015-12-12 14:09:42 -05:00
Sven Eberhardt 019cc0d583 Enable immediate tooltips on mouse-over-event for unlabeled icons in lobby and scenario selection (#1132). 2015-12-06 21:03:54 -05:00
Sven Eberhardt 6e4c7a2c2d Lobby ready button: Prevent message spam, improve icon updating and some small fixes.
* Show max one message per second per client
* Do not show ready message locally
* Fix observer flag reset by ready state change
* Reflect ready state change in client list immediately
2015-11-21 23:58:40 -05:00
dylanstrategie d284f49b6b Add "ready" button for clients in game lobby.
Signed-off-by: Sven Eberhardt <sven2@goldwipf.de>
2015-11-18 22:49:59 -05:00
Nicolas Hake 24b54211c5 Drop Min, Max, Swap for std::min, std::max, std::swap
The C++ standard library comes with perfectly fine implementations of
these functions, so there's no point in reimplementing them just for the
hell of it.
2015-11-15 13:53:01 +01:00
David Dormagen 8af7897c52 fixed wrong mouse cursor offset in developers mode (#646)
Steps: open player menu (F), hover over entries -> mouse cursor was drawn at a wrong position.
2015-11-09 10:48:34 +01:00
Armin Burgmeier 12ae83cfe4 Re-initialize shaders after changing anti-alias setting (#1286) 2015-10-31 21:12:45 -06:00
Armin Burgmeier bbdec40075 Fix a free/delete/g_free mismatch 2015-10-18 14:45:52 -04:00
Armin Burgmeier ef4ea2d931 Drop support for GTK+ 2
The minimum GTK version is now GTK+ 3.4, which is available since 2012.
It's part of Ubuntu LTS 12.04, and so should be available on any halfway
modern linux distribution.

This should allow getting rid of using deprecated GTK+ API much easier.
2015-10-18 14:45:52 -04:00
David Dormagen a6d11d67f5 custom GUI: grid layout now checks remaining row length before adding another element
Previously it was checked after adding an element. Long elements would thus be in the same row as the other elements even if they wouldn't fit. Not long elements get their own row.
2015-10-13 07:35:04 +02:00
Nicolas Hake 0c1abe69f9 Get rid of FMOD
Not only is FMOD neither free (libre) nor free (gratis), the version we
support(ed) is also impossible to legally obtain anymore. So there's no
reason we should keep code around that (pretends to) support a library
nobody can use or test.
2015-10-12 17:34:26 +02:00
Sven Eberhardt f5a0ff3d8f Script GUI: Process double click as second single click. 2015-10-03 22:43:06 -04:00
Peter Wortmann f0030e33e0 Warning fixes
Actually pretty sure a few of them were bugs. Hopefully no new
ones were introduced here.
2015-10-03 15:32:39 +01:00
Julius Michaelis 2ad045f8d6 Replace strtod with stringstreams in C4ScriptGuiWindow::SetPositionStringProperties to avoid locale problems (second attempt)
Also added warnings and fixed a few whitespacing errors.
2015-10-03 13:17:17 +02:00
Nicolas Hake c8e1a38950 Revert "Replace strtod with strtof_l ..."
This reverts commit 139dee9874.

The commit introduced a memory leak on glibc, and broke the build on all
other platforms.
2015-10-01 20:50:40 +02:00
Julius Michaelis 139dee9874 Replace strtod with strtof_l in C4ScriptGuiWindow::SetPositionStringProperties to avoid locale problems
(That function could still use some more love, though: Error messages and not accepting ridiculous things when parsing.)
2015-10-01 19:50:05 +02:00
Sven Eberhardt 17e0e2f423 Add breaks between music. 2015-09-30 22:50:18 -04:00
Sven Eberhardt 737b1fd8fd Save screenshots in background thread (#998, #1104).
Also ensure music keeps streaming while collecting data for full map screenshot.
2015-09-29 20:48:34 -04:00
David Dormagen 6756db2768 C4ScriptGuiWindow: fix copyright header
The remaining old header has now been adjusted to the new one.
See e0dc30c59a for details.
2015-09-29 19:13:12 +02:00
Sven Eberhardt 59d7c761fc Screenshot fixes and optimizations.
* There was an off-by-one-error causing a blank line at the screen upper screen border.
* Remove ApplyGamma. It is always applied because Gamma is just part of the drawing shaders now.
* Save by copying rows instead of pixels for whole map screenshots.
2015-09-28 18:54:34 -04:00
David Dormagen 439cfac129 custom GUIs: do not break text when style flag NoCrop is set and set NoCrop for HP display 2015-09-25 15:01:24 +02:00
Sven Eberhardt 88167a03a8 Add support for hidden scenarios.
If C4S.Head.Secret is set and mission access to the scenario has not been gained, it is hidden in the scenario selection list.
2015-09-24 23:51:16 -04:00
Sven Eberhardt 9d5d8f7506 Fix control mode display and availability in lobby. 2015-09-23 21:48:37 -04:00
Sven Eberhardt 5b19294d76 Use ANY_OWNER instead of INT_MAX to label GUI elements shown to everyone.
Mostly to make the code more readable because there's no way to know that INT_MAX means "anyone".
2015-09-23 18:08:44 -04:00
David Dormagen f4f9afa477 custom guis: for the Player property, distinguish between NO_OWNER and nil
NO_OWNER means the message will be visible for noone (can f.e. be used to hide a ui window). nil means the message won't have visibility restrictions. This is probably what the scripter expects.
Previously, a value of "nil" would have been read as 0. So not setting the Player property and setting it to nil would mean two different things.
2015-09-23 22:03:29 +02:00
Nicolas Hake 6a11e3e811 Stop checking for rvalue ref support
We already require support for std::unique_ptr, which itself requires
support for rvalue references. As such, we know we can use rvalue
references, and thus don't have to keep carrying dead code around.
2015-09-20 13:27:14 +02:00
Armin Burgmeier fd285f6656 Create mipmaps only for static textures that are expected to be zoomed
Hopefully fixes #1403.
2015-09-18 21:10:39 -04:00
Sven Eberhardt 3ff1bbf5f6 Fix /todo fallback on write error. 2015-09-14 21:39:51 -04:00
Sven Eberhardt 288de8c89f Fix /todo failing when launching from program folder without proper access permissions.
Write the TODO.txt at user path instead.
2015-09-13 00:14:42 -04:00
Armin Burgmeier 20eb0615ee Custom shader for drawing sky
Add a C4ShaderCall parameter to tho most important drawing functions, and
make C4DrawGL's CreateSpriteShader public with additional parameters to
specify additional defines and shader slices. C4Sky uses this to compile its
own shader with OC_SKY defined.
2015-09-12 18:15:34 -04:00
Armin Burgmeier e0d7d44948 Optimize drawing of tiled surfaces
Instead of one draw call for each tile, do the whole operation with a single
draw call by setting GL_REPEAT on the texture. This affects sky, the upper
board and the background.

This also allows to remove some code that was making sure surfaces are big
enough.
2015-09-12 16:11:50 -04:00
Sven Eberhardt d6751bff84 Fix crash on context or dropdown menu in GUI dialogues in editor mode (#856). 2015-09-12 02:51:55 -04:00
Sven Eberhardt 80fe1aa658 Avoid some C4Group rewinds in scenario list and player loading. 2015-09-10 22:32:51 -04:00
David Dormagen cc3452bd0d custom guis: properly scale with font size now
Previously, the em <-> pixels conversion was a hardcoded value. Now the GUI scales with the font size that can be selected in the options.
Sadly, all scales were off since the hardcoded value was too low.
2015-09-06 19:02:31 +02:00
Sven Eberhardt ec0b9a0dd1 Fix deleted object usage when script gui close call is issued in response to deleted parent object. 2015-09-05 20:37:12 -04:00
David Dormagen 4682b6c668 script GUIs: fixed a fistful of memory leaks
There are some ownership rules (PropList::GetProperties, Ui::Element..) which are not very clear imo. But there also was at least one clear oversight (name retaining, that is).
The only issue would be an assertion firing at game exit.
2015-09-05 11:01:58 +02:00
Sven Eberhardt cb995eb158 Fix several memory leaks in script gui. 2015-09-04 21:08:28 -04:00
Sven Eberhardt 8f4494745d Fix C4ScriptGuiWindow MouseInput/MouseEnter/MouseLeave overloads.
MouseInput silently shadowed the variant in C4GUI::Element and MouseEnter/MouseLeave were never called without parameters.
2015-09-03 23:27:20 -04:00
Sven Eberhardt 3edcc2b043 GUI: Readded "using Window::MouseInput;" in Screen to make the overload clear.
It got lost when moving some functions from protected to public.
2015-09-03 23:04:26 -04:00
Sven Eberhardt 3e4b30b2ba Added parentheses to clarify when an assignment result was intentionally used as truth value.
To silence some warnings.
2015-09-03 22:54:08 -04:00
Sven Eberhardt 36fbbb34a4 Change deactivated MenuDebugLogF to a definition that does not evaluate its parameters. 2015-09-03 22:50:58 -04:00
Sven Eberhardt 9e6f7896ac Make MouseInput, MouseEnter and MouseLeave public in GUI elements.
They were public in some and protected in other classes and they're also called from several places outside the GUI.
2015-09-03 22:42:29 -04:00
Sven Eberhardt 20d3de46cd Fix some unused variables. 2015-09-03 21:26:49 -04:00
David Dormagen ac738735b2 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Vehicles.ocd/Airplane.ocd/Script.c
	src/game/C4Game.cpp
	src/game/C4GraphicsSystem.cpp
	src/gamescript/C4GameScript.cpp
2015-09-02 08:19:34 +02:00
Sven Eberhardt 15a1a62521 Automatically deduce shift state in combo keys with Control/Shift combo. 2015-09-01 19:11:13 -04:00
Sven Eberhardt 95baaa7934 Enable usage of LeftControl, RightControl, LeftShift and RightShift as player control keys. 2015-08-31 20:50:54 -04:00
Sven Eberhardt 535fc79c0f Silence a few compiler warnings. 2015-08-29 08:33:00 -04:00
Nicolas Hake 8e5aed4bea Update TRADEMARK and add trademark reference to credits (#1370)
I don't like that the FMOD and Clonk trademarks are separated, but we
don't have enough space in the credits screen to do it differently.
2015-08-09 19:20:53 +02:00
Sven Eberhardt 8ec159d755 Remove some unnecessary restrictions from /script message board command (#1369). 2015-08-08 21:52:13 -04:00
David Dormagen f05345375c fixed wrong offset in scripted GUIs when upper-board is active 2015-08-02 23:19:28 +02:00
David Dormagen d5f4805f18 fixed desync
The desync was caused by PropList->GetProperties returning the properties in an arbitrary order. They are now sorted first.
The debug logs are left in place, because I assume that I will need them again and they prove to be helpful.
2015-08-02 19:12:09 +02:00
David Dormagen 196f528201 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/HUD.ocd/FancyGridMenu.ocd/DefCore.txt
	planet/Objects.ocd/HUD.ocd/GridMenu.ocd/DefCore.txt
	planet/Objects.ocd/Helpers.ocd/Dummy.ocd/Graphics.png
	planet/Objects.ocd/Items.ocd/Tools.ocd/WindBag.ocd/Script.c
	planet/Objects.ocd/Items.ocd/Weapons.ocd/Javelin.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
	planet/Objects.ocd/Libraries.ocd/Flag.ocd/Marker.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Flagpole.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Pump.ocd/Script.c
	src/game/C4Game.cpp
	src/gamescript/C4GameScript.cpp
	src/gui/C4GameMessage.cpp
	src/landscape/C4Landscape.cpp
2015-06-03 22:32:36 +02:00
Sven Eberhardt d3a9a3bc39 Change mission unlock key to Ctrl+M (from Alt+M).
Alt+Key was problematic for some Linux people. Also most other combinations have been changed to Ctrl+Key already.
2015-05-22 21:41:34 +02:00
David Dormagen 9968b0000c custom GUIs: restrict the maximum size of a menu window to 100em x ~62em
Fullscreen GUIs on wide-screen monitors look stupid. This patch tackles this by restricting the maximum size to something that can still be seen with a glance.
For very high-DPI or low-DPI screens, the user would most likely adjust the font size in the options (todo) anyway and thus also change the maximum menu size.
2015-03-27 11:33:57 +01:00
Nicolas Hake 5562b09dc4 Remove a lot of disabled legacy code, round 2
Maybe at some point we'll be rid of all the commented-out code that
nobody has looked at in years.
2015-03-25 20:02:53 +01:00
David Dormagen dae7f11a70 custom GUIs: added property GraphicsName to specify graphics of Symbol (if Symbol is a definition)
f.e. {Symbol = Icon_Number, GraphicsName = "Inf"}
2015-03-23 15:34:09 +01:00
David Dormagen ebcc397221 add proper support (inventory & interaction-menu contents) for extra slot library
Also fix bug with GuiScriptWindow where scrollbars would not be hidden in some cases (f.e. no-crop parent and negative-top child).
2015-03-19 16:22:06 +01:00
Sven Eberhardt 922a87527c Use magic STL instead of magic numbers for TODO file location count. 2015-03-05 16:19:50 +01:00
Sven Eberhardt 90cca08d63 Add /todo message board command.
Adds text to local TODO.txt file. Useful for taking notes quickly e.g. when testing new scenarios in a network game.

TODO filenames are configurable. Default file is TODO.txt in the scenario file (if it's unpacked) and TODO.txt on the current path if access to the first location failed.
2015-03-05 16:04:07 +01:00
Nicolas Hake ceeb322a87 Win32: Keep GL error dialog from immediately closing
GL startup failures call Application.Clear(), which will at some point
before creating the error dialog post a WM_QUIT. When the dialog box's
message loop retrieves that message, it will shut down the dialog box,
thus ensuring that the user will never see it.
So before showing the dialog box, we have to dispatch any pending
messages, then retrieve the WM_QUIT ourselves, run the dialog box, then
re-post the WM_QUIT.
2015-02-18 23:02:34 +01:00
Nicolas Hake 4db690b0c6 Add copyright header to files that were missing it 2015-02-16 18:40:52 +01:00
Nicolas Hake e21a5bdd44 Rename BoundBy to Clamp
"BoundBy" sounds like a predicate. "Clamp" is a common function name for
the operation in graphics processing, so it should be familiar to users.
2015-02-12 23:05:55 +01:00
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
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
David Dormagen 4c69e19219 custom guis: correctly respect margins in grid layout and vertical layout 2015-01-20 20:44:13 +01:00
Nicolas Hake 2ef2c637a7 Remove several instances of disabled legacy code 2015-01-18 22:59:45 +01:00
Sven Eberhardt 8dddbe5a10 Allow definitions without graphics. 2015-01-17 18:10:21 +01:00
David Dormagen 8146e3e748 C4GUI::C4Scrollbar: corrected friend-declaration (ck)
This was no error on VS 2013, though..
2015-01-15 21:06:58 +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
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 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 d9e3d9db3d Require filenames to be in unicode, remove iconv usage
Every modern operating system and Clonk uses UTF-8, and windows uses UTF-16
and has its own conversion code.
2015-01-03 20:41:03 +01:00
Sven Eberhardt 98093961ec Add packet logging option.
This should reduce log spam in network games.
2015-01-03 18:15:41 +01:00
David Dormagen c42d94e3cf Script GUI: fixed a bug where a GUI's rectangle was incorrect 2015-01-03 15:30:30 +01:00
David Dormagen 64e092cd3e custom guis: fixed text alignment
C4ScriptGuiWindowStyleFlag should probably be a class enum. Or at least put in a separate namespace. This is TODO to prevent further name collisions. However, it's not completely trivial.
2014-12-26 12:18:17 +01:00
David Dormagen a2a1778092 mouse tooltip: fixed possible crash when object has no tooltip 2014-12-26 11:51:02 +01:00
David Dormagen c2c80b94db custom gui: fixed FitChildren style flag 2014-12-26 11:50:40 +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
Tobias Zwick 4981182cf8 Merge remote-tracking branch '_origin/master' into lights
Conflicts:
	src/c4group/C4Components.h
2014-12-15 21:16:40 +01:00
Nicolas Hake 9089f6857f Remove Sort field from C4FolderHead
This field apparently was intended to be used in folder maps, but was
already unused in Clonk Rage, and has never been used in OC either.
2014-12-12 22:54:42 +01:00
Tobias Zwick d59b1e5e5b reduce version numbering from x.y.z (x does never changes) to y.z 2014-12-12 21:57:52 +01:00
Armin Burgmeier 00447dd524 Merge branch 'master' into lights 2014-11-12 08:47:43 -05:00
Armin Burgmeier c3bcedfbf9 Don't attempt mouse hover callbacks when mouse control is passive (github #5) 2014-11-07 20:16:30 -05:00
Armin Burgmeier aed907e30d Remove old fog of war 2014-11-07 11:53:10 -05:00
Armin Burgmeier f89058f094 Remove config entries that are no longer used 2014-11-02 16:57:50 -05:00
Armin Burgmeier b0f2f507b1 Fix execl invocation in C4UpdateDlg 2014-10-29 00:35:13 -04:00
David Dormagen 6476b0b026 Script GUIs: fixed saving & loading 2014-10-23 23:29:14 +02:00
David Dormagen c09e9880e2 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
2014-10-13 18:54:05 +02:00
David Dormagen 2a78b77bda renamed C4GuiWindow to C4ScriptGuiWindow to increase expressivness and reduce similarity with C4Gui* 2014-10-13 18:48:03 +02:00
David Dormagen 049088be78 CustomGUIs: major rework of layouting & controls; better integration of C4GUI 2014-10-11 11:29:02 +02:00
Sven Eberhardt ca64fad8b5 Fix lobby team distribution settings hotkeys (#1133) 2014-10-09 20:40:01 +02:00
David Dormagen 7319f7b3cc rewrite of C4GuiWindow to use C4GUI stuff wherever possible 2014-10-05 16:46:14 +02:00
Sven Eberhardt ee80b46841 Fix possible race condition on update check in network game list.
Also avoid repeated parsing of update reply on every network event.
2014-10-05 15:11:06 +02:00
Sven Eberhardt e740938bbb Fix .ocu updates and allow direct download of installer for future updates. 2014-10-05 14:32:23 +02:00
Sven Eberhardt f8f232a275 Fix build without automatic updates. 2014-10-04 23:01:53 +02:00
Tobias Zwick 90b86dbf69 seperate update server from masterserver
Don't query the masterserver for a new version, instead ask the update server directly.
2014-10-04 22:50:46 +02:00
Sven Eberhardt ffdd2f37eb Fix recursions caused by modal league dialogues during game execution and game end (#1118). 2014-10-04 00:16:03 +02:00
Sven Eberhardt f815613ce8 Don't force league settings on scenario parameters if league is enabled during single player scenario selection (#1120). 2014-10-03 21:25:25 +02:00
Sven Eberhardt 3c731729b4 Fix bogus warning about missing AchvDone.png files (#1119) 2014-10-03 20:58:49 +02:00
Sven Eberhardt 91800fcfec Implement setting for forced values of parameters in league games. 2014-10-03 14:02:28 +02:00
Sven Eberhardt 05631742c8 Allow definition of achievements in parent (.ocf) folders.
Note that regular scenario parameters cannot be defined in folders because that would complicate savegames, records, etc.
2014-10-03 12:17:12 +02:00
Sven Eberhardt cd9d655ad9 Fix local scenario achievement graphics for achievement values larger than 1. 2014-10-03 00:49:03 +02:00
David Dormagen 952f06b173 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
2014-09-29 11:47:09 +02:00
Sven Eberhardt 3fc1f02c6d Implement custom scenario parameter selection in startup scenario selection dialogue and by command line. 2014-09-27 16:05:32 +02:00
Sven Eberhardt abab7be591 Added scenario achievements displayed as small symbols beside the scenario name in the startup selection screen.
They can be used e.g. to show that you have finished a scenario on different difficulty levels.
2014-09-24 23:08:40 +02:00
Sven Eberhardt 378bda5546 Added custom scenario parameters (SCENPAR_*).
Can currently only be set in network games in the lobby. In the future, maybe we can find a place somewhere in the scenario selection dialogue.
2014-09-23 23:02:52 +02:00
Sven Eberhardt ecdcb58bf6 Fix mouse cursor graphics when scrolling and outside viewport.
Cursor indexes were off by one.
2014-09-21 23:59:50 +02:00
David Dormagen 5722339e83 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Structure.ocd/Script.c
	src/gamescript/C4GameScript.cpp
	src/gui/C4GameMessage.cpp
	src/gui/C4Gui.h
	src/gui/C4GuiDialogs.cpp
	src/gui/C4GuiWindow.cpp
2014-08-13 11:52:41 +02:00
Sven Eberhardt b1db0c7918 (Re)implement text completion in dialogue text windows as an async control. Default to Space, i.e. MenuOK. 2014-08-10 20:58:26 +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
Sven Eberhardt ac395ba65f Increase display time of global messages.
Global messages are usually important and contain story elements, game goals, etc. So they should stay for a bit longer than e.g. object status messages.
2014-07-05 16:44:48 +02:00
Sven Eberhardt 5cd9b915b0 Added some dialogue functions and speaker portraits. UpdatedAddMenuItem and CustomMessage to allow more customization for picture graphics.
I would prefer to render the models for speaker portraits directly. However, it seems like it's not currently possible to clip or render models to offscreen surfaces.
2014-07-05 15:25:30 +02:00
Günther Brammer 22016e075f Replace some usages of C4ID with C4Def*
In particular those that made the c4script shell depend on C4Id.cpp.
2014-04-19 19:02:22 +02:00
David Dormagen ed858e0273 C4GuiWindow.cpp: include correct header (cmath) for std::isnan 2014-04-05 14:53:41 +02:00
Julius Michaelis ccb6bfbc81 Remove obsolete effect level slider and configuration option 2014-04-03 23:02:00 +02:00
Julius Michaelis e5b7ef5b80 AutoFrameSkip: Graphics option to reduce lag by slow
Skips drawing every second frame if drawing the previous frame was too slow
Setting is controlled by game host
Default: on

Imported from Clonk Rage

From e6e680f49ac50a352e9a051ee21622e7f00648b6 Mon Sep 17 00:00:00 2001
From: sven2 <sven2@786b8e90-9c09-0410-89a9-bccc6ef1e79b>
Date: Sat, 21 Sep 2013 21:34:44 +0000
Subject: [PATCH] + AutoFrameSkip: Graphics option to reduce lag by slow
 clients in network games

git-svn-id: https://www.clonk.de:83/svn/clonk/stable@14501 786b8e90-9c09-0410-89a9-bccc6ef1e79b
2014-04-03 14:53:12 +02:00
Julius Michaelis a06b7e3c23 Fix use after free and conditional jump on uninitialized 2014-03-31 12:07:58 +02:00
Julius Michaelis cfc5af7f9d Do not exit round on closing game over dialoge with ✗-button 2014-03-30 16:03:26 +02:00
David Dormagen 5c17b48bc2 Merge branch 'master' into Controls 2014-03-26 23:58:24 +01:00