Commit Graph

1751 Commits (15b07ca7171bb80ab12d6023a9dd52866bb85f63)

Author SHA1 Message Date
Armin Burgmeier 6a0b0d95b7 Treat embedded images as one entity for text progress 2012-03-13 21:28:09 +01:00
Armin Burgmeier e0d56c48a0 Fix a crash when showing umlauts in menu items with text progress
Multibyte UTF-8 sequences were torn apart but the text progress advancement.
2012-03-13 21:24:24 +01:00
Armin Burgmeier 462574f681 Remove debug log in C4ValueProviderLinear::CompileFunc 2012-03-12 23:41:34 +01:00
Armin Burgmeier 86af00a313 Fix the build 2012-03-12 23:41:07 +01:00
Armin Burgmeier 2de0a031c4 Fix loading mesh animations in scenario saves 2012-03-11 22:49:59 +01:00
Armin Burgmeier 97cfd81133 Support mesh graphics and ingame objects as menu item graphics 2012-03-11 00:06:44 +01:00
Günther Brammer 5c235cc23e Savegames: Fix loading of global variables (#726)
The global variables ended up with the temporary name list created during
load that didn't necessarily contain all variables or even in the right
order. As far as I can tell, this happened since 2005, but nobody noticed
because the list of global variables didn't tend to change between save and
load.
2012-03-10 22:45:42 +01:00
Günther Brammer dfea0914a9 Merge the functions pointer branch 2012-03-09 17:42:48 +01:00
Julius Michaelis 5716bb1e47 C4AulScript::DirectExec: Throw on parsing errors, too, when fPassErrors is set. 2012-03-09 11:45:25 +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
Günther Brammer 71e108f16a Start of a C4Script API third party programs could use
This is very experimental, subject to change, and the single function not
at all useful yet.
2012-03-04 21:23:11 +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
Maikel de Vries d1b8057382 Fix build for 8ac3339bf901 2012-03-02 22:48:25 +01:00
Julius Michaelis cb6eb060cc Add a dialogue for windows which can be displayed when the graphics engine initialisation failed
The dialogue has fields for resolution and a checkbox for fullscreen mode
2012-02-28 18:28:16 +01:00
Armin Burgmeier 893fb4bbed Make overlays on picture graphics work again
This was partly broken by 427cf61d729a. However, already before that,
the size of the overlay was depending on the ingame size of the object
on whose picture the overlay was being drawn. This didn't make much sense
and now the size of the overlay is equal to the area on which the picture is
drawn in the first place.
2012-02-26 21:44:00 +01:00
Armin Burgmeier fea6209365 Fix drawing of non-default graphics in picture overlays
This was broken by 427cf61d729a.
2012-02-26 21:09:42 +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 8f7f5cc1f1 Allow dragging of objects from FoW if they have C4D_IgnoreFoW set (#720) 2012-02-25 22:15:39 +01:00
Günther Brammer 6486ea9e19 Script: Disallow "new Clonk {}" for now
Eventually, "new Clonk {}" will create a C4Object. Prevent anyone from
using it before then.
2012-02-25 22:10:03 +01:00
Armin Burgmeier 09e0e48290 When starting to drag an object, use the object at mouse down time
and not at the time the drag is started, which is a bit later, after the mouse
has been moved a few pixels in order. This makes it easier to start dragging
when hitting the drag object on an edge.
2012-02-25 22:05:47 +01:00
Armin Burgmeier 7f5b7bcdd6 Make a MouseHover callback when the object being hovered by the mouse changes 2012-02-25 21:56:11 +01:00
David Dormagen 4169a9232c swapped parameters of GetIndexOf 2012-02-25 21:57:39 +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 8eb76cef8c Unify overlay drawing of pictures
Instead of having custom code drawing the picture in C4DefGraphics.cpp,
re-use C4Def::Draw().

This changeset changes the coordinate system on which draw transformations
are applied to sprite picture overlays. The transformation is no longer
applied in the frame of the overlay picture but in the frame of the object on
which the overlay is drawn. This was already the case before for mesh
graphics, so this change unifies the interpretation of draw transformations
for sprite and mesh graphics.

The Tools Workshop has been changed accordingly so that object is production
are properly displayed on the sign. This also fixes the pictures of some
objects being off the sign.
2012-02-25 16:54:51 +01:00
Sven Eberhardt bdd053e2dc Fix compilation with zlib 1.2.6
Include zlib.h instead of just copying the definition for gzFile
2012-02-21 17:12:00 +01:00
Armin Burgmeier 94f552bbb8 Fix earth material initialization to work when texture is given
This fixes misplaced InEarth objects when the Material= option in Scenario.txt
contains a material-texture combination instead of a material only.
2012-02-19 19:33:35 +01:00
Armin Burgmeier e8e1c4b9d8 Check only 3 version numbers when checking whether an update exists 2012-02-19 18:31:09 +01:00
David Dormagen 5341ec1c3d removed the ignore_sky parameter of Draw*Map - now always ignores sky 2012-02-19 17:57:33 +01:00
Armin Burgmeier f710c68b9a Reset AlphaToCoverage GL state after having rendered a mesh 2012-02-19 17:49:02 +01:00
Armin Burgmeier 9dc9ad4ca7 Fix initialization of AlphaToCoverage material property 2012-02-19 17:45:01 +01:00
Günther Brammer ce27d42ac7 Remove unused C4AulScript::Owner
C4AulScript::Translate referenced it, but used it only when called from
eval, which is not done.
2012-02-17 01:04:05 +01:00
Günther Brammer 464d372034 Make C4GameScriptHost save to call again for (c4script standalone) 2012-02-17 00:30:00 +01:00
Günther Brammer cd46cf9914 C4SimpleLog defaults to on 2012-02-17 00:25:20 +01:00
Günther Brammer 1b5ee016d4 Fix build without OpenGL 2012-02-16 22:58:45 +01:00
Nicolas Hake db9ff85116 Binary mesh loader: Do not reject meshes with multi texturing
We don't support multi texturing in the rendering code, so emit a warning when
this happens
2012-02-16 00:45:48 +01:00
Nicolas Hake ac8edd6e20 Binary mesh loader: Support animations without tracks 2012-02-16 00:34:31 +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 c09b24125c linux: Fix a crash when getifaddrs returns NULL for an address (#713) 2012-02-14 21:17:26 +01:00
Günther Brammer acee9242f0 Log some savegame errors instead of crashing with an uncaught exception 2012-02-14 00:17:07 +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 67d8ac47e9 Keep functions across script reloads
For functions that are not appended/included, this is done by reusing them.
Functions that are not in the new script version are left with their code
raising and error. Appended/included functions are handled by a reference count.
2012-02-02 01:16:14 +01:00
Günther Brammer 1e7f32af48 Move C4AulFunc to its own header file
This is necessary since C4Value.h will call a function from C4AulFunc.
2012-02-13 18:00:35 +01:00
Günther Brammer 8091dff419 Clean up C4AulScriptFunc API 2012-02-01 03:49:50 +01:00
Günther Brammer 65801a5188 Remove C4AulFunc::LinkedTo
The parser doesn't need it to find the functions it has to parse anymore.

And the global proplist can be cleared before removing the functions,
instead of having engine functions deregister themselves and script
functions being deregistered when their linked function is removed.
2012-02-13 22:20:10 +01:00
Günther Brammer 30c843925f Script: Include each script at most once
If a script includes two others which each include the same fourth, the
script only gets one copy. Which one is arbitrary and subject to change.
2012-01-25 03:50:24 +01:00
Günther Brammer 42679e48fb Script: Inherit local variable initialization from #included scripts
This is done by creating their values in the parser. Global constants are
still created in the preparser so that they are available to the parser.
2012-01-25 00:36:11 +01:00
Günther Brammer 378e502c85 C4Script parser goes through the entire script instead of only functions
This should not change anything about which functions are created
by include/appendto and what inherited calls.
2012-01-27 00:42:41 +01:00
Günther Brammer 18038f45d3 Implement the function overload tree using the proplists
Instead of carefully inserting functions at the start or end of the list,
build the list just before the parser runs, at the same time as filling
the proplist where the functions are looked up.

This way, the overloaded function is simply the one that was previously in
the proplist, is not needed outside of the overloading function, and can thus
be replaced in the proplist.
2012-01-27 00:20:55 +01:00
Günther Brammer f61ebfc453 Replace C4AulScript tree structure with a list 2012-01-25 04:15:39 +01:00
Günther Brammer a7008e8a77 Script: Add "new p {}" syntactic sugar for "{ Prototype = p }" 2011-11-07 01:39:43 +01:00
Günther Brammer 4a3e692962 System.ocg scripts have a proplist for parsing purposes 2011-10-24 17:02:27 +02:00
Günther Brammer 24031a94bd Simplify the C4Script tokenizer a bit
This shouldn't change any user-visible behaviour.
2012-01-24 18:35:21 +01:00
Günther Brammer d07cc0c168 Some slight parser refactoring 2011-12-22 21:57:17 +01:00
Günther Brammer dc7ca92936 Some parser code cleanups 2011-10-24 01:00:29 +02:00
Günther Brammer ae11dfd1e4 Remove #strict infrastructure
The next incompatible changes to C4Script will probably use something else
anyway.
2012-01-25 04:15:53 +01:00
Günther Brammer f3854e87f8 Replace C4AulScript::GetFunc with C4PropList::GetFunc/Call 2011-10-15 22:07:45 +02:00
Günther Brammer 497cd5cffc Script: '->' also works with proplists 2011-10-15 02:30:30 +02:00
Günther Brammer 04e512fe00 Replace C4AulScript::GetFuncRecursive with C4PropList::GetFunc/Call 2011-10-15 02:27:02 +02:00
Günther Brammer b6fb634bd3 Replace the other C4AulScript::GetSFunc with C4PropList::GetFunc/Call 2011-10-15 02:06:21 +02:00
Günther Brammer db926e3f53 Replace C4AulScript::GetSFunc with C4PropList::GetFunc/Call 2011-10-15 02:05:10 +02:00
Günther Brammer f7b3642bc6 Replace C4DefScriptHost::Call with C4PropList::Call 2011-10-15 02:03:04 +02:00
Günther Brammer f8f588f641 Replace C4Object::Call with C4PropList::Call 2011-10-15 02:00:56 +02:00
Günther Brammer a01bb2cf9c Remove function cache from C4DefScriptHost 2011-10-15 01:59:15 +02:00
Günther Brammer bb3861d4f1 Replace C4AulScript::GetSFuncWarn with C4PropList::GetFunc 2011-10-15 02:11:57 +02:00
Günther Brammer 406b7c4eca Savegames: (De)serialize functions in c4values 2012-02-13 18:12:08 +01:00
Günther Brammer 38c1bb3976 Add C4PropList::GetFunc and C4PropList::Call 2011-10-04 23:04:06 +02:00
Günther Brammer 0403bed306 Put functions into their proplists 2011-10-15 01:38:59 +02:00
Günther Brammer a684ab4aba Script: Infrastructure for functions as a value type 2011-09-25 01:20:18 +02:00
Günther Brammer 35a16421f1 Always compare C4Set entries with C4Set::Equals 2011-10-18 21:57:52 +02:00
Günther Brammer 34b8d2c8e7 Add C4Set::C4Set(const C4Set&) and C4Set::C4Set& operator=(const C4Set&) 2011-10-18 21:56:10 +02:00
Günther Brammer f52b0d248f Hash properties to c4string pointer, not the contents of the string
this might even make a difference, as the strings shouldn't have to be
dereferenced anymore.
2011-10-05 21:38:42 +02:00
Günther Brammer bf86e81aa7 Clean category code up a tiny bit 2011-12-29 15:56:51 +01:00
Günther Brammer b3aff643f3 Script reloading does not clear local variable defaults
The defaults are filled in by the preparser, which is only invoked for
changed scripts.
2011-10-04 22:16:27 +02:00
Günther Brammer 8185d318bf Script: Add a proplist representing the global scope, named "Global" 2011-10-04 22:12:45 +02:00
Günther Brammer f166fdaed7 Move Parser from C4AulScript to C4ScriptHost 2011-10-13 18:01:02 +02:00
Günther Brammer 843642271d Script: local variables work for the Scenario and definition calls
This requires replacing C4AulScript::Def with C4AulScript::GetPropList() and
C4DefScriptHost::Def, and making C4GameScriptHost::GetPropList return the
scenario proplist prototype.

Definition calls won't be able to change the local variables, of course.

Other proplists will be able to use local variables once they can have
functions.
2011-09-29 03:49:21 +02:00
Günther Brammer 769c1083b6 Store C4AulFunc::Name in a C4String 2011-09-25 21:09:16 +02:00
Günther Brammer ca4da88137 Script: Scenario functions get the Scenario proplist in "this" 2011-09-25 23:25:13 +02:00
Günther Brammer a24ebc4936 Script: Add a proplist representing the scenario, named "Scenario"
The proplist is accessible from script via a global constant.
2011-09-25 23:24:29 +02: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 6f1057c69f Script: this returns the definition in a definition call 2011-09-25 23:48:06 +02:00
Günther Brammer b4021015f7 Make C4AulFunc::Exec take a proplist instead of an object 2011-09-25 23:49:17 +02:00
Günther Brammer d723d43d92 Make C4AulContext::Def a proplist 2011-10-13 23:39:35 +02:00
Günther Brammer 2afeb25df6 Script: remove redundant check for 0 in object call
0 is neither object nor definition, so the ordinary typecheck suffices.

Also change the error message to use '->' instead of object or definition
call.
2011-09-26 20:29:32 +02:00
Günther Brammer c63b66e909 Script: Add def and effect parameter types 2011-09-24 18:37:28 +02:00
Günther Brammer dbaa638166 Clean up C4Value::CompileFunc 2011-09-26 21:57:25 +02:00
Günther Brammer 32e7eb2904 Only use C4V_C4Object as typecheck target, tag the values with C4V_Proplist
This simplifies a few places which had to check for both tags before.
2011-09-26 20:22:31 +02:00
Günther Brammer 0fa37ef35d Optimize if(!...) from two bytecodes to one 2011-10-14 00:28:32 +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
Nicolas Hake 08d71bcd74 Drop PIF_HasRes flag from player info read from replays
C4PlayerInfo stores the PIF_HasRes flag for savegames and network synch. The
resource system isn't used in replays however, so the flag is wrong there. Clear
it when loading a replay, so a later assertion in the cleanup code doesn't fail.
2012-02-12 14:01:12 +01:00
Armin Burgmeier f349a97919 Correctly honor game speed if delay is below MaxRefreshDelay (#260) 2012-02-12 13:49:02 +01:00
Armin Burgmeier 06dc47cb09 Make sure sector list order always matches main list order
So actually be29346165d6 turned out to be an incorrect fix. The actual
problem is much more subtle: the ordering of objects within the same
plane by their ID could cause the sector list order to not match the
main list order anymore. This has been fixed by re-arranging the code in
question.

I hope this really fixes #711.
2012-02-12 04:26:33 +01:00
Armin Burgmeier b16fc0ccf3 Ignore Status==0 objects in C4ObjectList::CheckSort 2012-02-12 04:21:42 +01:00
Armin Burgmeier 612f14016e Also check order of last list entry in C4ObjectList::CheckCategorySort 2012-02-12 04:21:18 +01:00
David Dormagen b359373f5d clearing of landscape is now done in C4Landscape::MapToLandscape instead of MapToSurface 2012-02-11 23:24:53 +01:00
David Dormagen 2a53b55a45 added parameter for DrawMap and DrawDefMap to retain old material if sky is drawn 2012-02-10 21:48:48 +01:00
Günther Brammer 286a32f47d Remove C4GroupEntryCore::(Has)CRC, calculate the CRC on demand
The CRC was basically only used to decide which files to include in update
groups, but calculated for every group and then stored in the file on disc.
And for some unknown reason, updates themself didn't produce the right
numbers in the file.

This means that c4groups with this change cannot reproduce groups written
by older c4groups and vice versa, but this isn't necessary for updates, and
reading is compatible both ways.

Except for the ways that C4Update fails to remove the CRCs.
2012-02-08 00:12:44 +01:00
Armin Burgmeier 2092baaa18 Fix possible double close when attempting to open uncompressed files 2012-02-05 20:00:47 +01:00
Armin Burgmeier fb27b9c1c3 Reset Unsorted flag only after sorting has been fully finished
This not only seems more correct but might also fix #711
2012-02-05 17:28:55 +01:00
Armin Burgmeier f50ebf6441 Update C4Group packing order
This speeds up loading of packed files significantly. It's not optimal,
though, because the order in which textures are loaded by the engine
is not known by c4group (it depends on their occurence in the Scene.material
file). This could be fixed by specifying custom packing orders for every
object we have. But then again maybe switching to a different format which
allows for random access might be more worth it.
2012-02-04 22:08:38 +01:00
Armin Burgmeier 8e5b9262df Fix a possible file leak in CStdFile::Open
This happened if open() worked but c4_gzdopen failed. This bug prevented
Objects.ocd being packed because of "Too many files open."
2012-02-04 21:28:17 +01:00
Armin Burgmeier 139184c540 Set system data path to exepath for binaries with automatic updates
Updates work only when the game data is at the same location as the binary.
If this is not the case then the game was probably installed differently,
for example via the distribution or with make install. In this case we
cannot do automatic updates but we also want to use a different system path.

This fixes the linux development snapshots and release tarballs. They were
broken in the sense that they didn't find their game data.
2012-02-03 23:43:18 +01:00
Nicolas Hake f3ae992f33 Fix dangling pointer on temporary pack of player file on join (#706)
I hate StdStrBuf. It's just close enough to any sane string class that you think
it does reasonable things, then when you don't look it will turn around and stab
you in the back with a rusty fork.
2012-02-03 14:36:17 +01:00
Günther Brammer fea377f196 win32: Fill in Games Explorer XML data from Version.txt 2011-10-31 01:31:56 +01:00
Günther Brammer d995490137 win32: register with the Game Explorer 2011-10-30 16:16:14 +01:00
Sven Eberhardt 95582747db Fix random team distribution when a player leaves during lobby time
Also allow random/random surprise teams in AutoGenerateTeam mode
(always creates two teams)
2011-11-08 17:27:32 +00:00
Sven Eberhardt 05e7aa1568 Fix EliminatePlayer(..., true) inactive client activation 2011-11-08 16:16:31 +00:00
Peter Wortmann fec07accd7 Save more minimal players on remote clients 2011-08-15 09:25:37 +00:00
Peter Wortmann 8b9ace23c9 Fixed the surrender dialog showing after declined kick vote 2011-05-08 22:36:48 +02:00
Armin Burgmeier 0749dcdb9d Replace std::sort by timsort for Face ordering
The usage of timsort instead of std::sort at this point is twofold.  First,
it's faster in our case where the array is already sorted in many cases
(remember this is called at least once a frame). And it's not just a bit
faster either but a lot. I have measured a factor of 7 on my system.

Second, in our Windows autobuilds there is a crash within std::sort which is
very hard to debug because it's hardly reproducible with anything other than
the autobuilds (I tried hard). If the crash goes away with timsort then
great, if not then maybe it's easier to debug since the code is in our tree.
2012-02-01 22:11:46 +01:00
Armin Burgmeier 18c96d4987 C4MouseControl: Don't set TargetObject to non-selectable objects in crosshair mode
This makes mouse click controls not being delivered to MD_NoClick objects.
2012-01-31 23:46:15 +01:00
Julius Michaelis 9b781f9882 Fix ForPolygon scanlining to exclude pixels on right bound 2012-01-30 20:54:17 +01:00
Julius Michaelis b4dba5b255 Add an option to select an arbitrary object under the cursor via context menu to gtk console mode 2012-01-27 23:01:37 +01:00
Armin Burgmeier dc2ee736d1 Build fix 2012-01-29 14:38:18 +01:00
Felix Wagner c92ca7d766 Typo 2012-01-29 02:17:11 +00:00
Felix Wagner 5a28794482 +GetPlrClonkSkin(iPlr) 2012-01-29 02:17:00 +00:00
Felix Wagner d468862159 Player options dialogue, let the player choose a clonk skin 2012-01-29 02:16:22 +00:00
Felix Wagner af699844de Removed some old mouse control related stuff 2012-01-29 02:13:55 +00:00
Armin Burgmeier b032b6c3e3 Use std::sort again instead of a custom implemantion for debugging purposes
This was committed accidentally. I blame hg for having a crappy ui.
Fixes the display of trees again.
2012-01-28 21:48:07 +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
Armin Burgmeier a1370c2954 Rename our custom gz* functions to avoid conflicts with zlib.dll
This fixes the build with native mingw for me.
2012-01-28 17:02:37 +01:00
Armin Burgmeier f4bc45c4a3 Don't do wildcard matching and other fancy stuff in C4DefList::Load
Instead just attempt to load the filename given. This function is only
used from two places: C4Game::InitDefs and C4Game::DropFile. In both
cases segments and wildcard matching is neither needed nor desired.

This fixes a problem with loading definitions when the Clonk installation
resides in a directory with paretheses, such as C:\Program Files (x86)\.
This might well fix the problem in http://forum.openclonk.org/topic_show.pl?tid=905.
2012-01-28 00:33:28 +01:00
Armin Burgmeier b2e26700cf Win32: Allow forward slash as separator when loading local definitions
This leads to an obscure error otherwise where local definitions are skipped
from loading when running the scenario as clonk.exe Tutorial.ocf/Tutorial01.ocs.
The scenario loads fine as such but some definitions are missing and therefore
it doesn't work properly. See also http://forum.openclonk.org/topic_show.pl?tid=905.
2012-01-27 23:21:03 +01:00
David Dormagen 42e5c6cbec The mass mover clears its data when loading fails
Happened in some cases when changing a scenario section.
2011-07-16 21:57:14 +00:00
Felix Wagner 9c82958fa1 Little tweaks for the player options dialogue 2012-01-25 04:53:59 +00:00
Peter Wortmann 790b9d6af6 Ensure that even with workarounds #version is always first directive in shader
This fixes workarounds for some drivers. Most notably mine. Now if only
it wouldn't fail silently...
2012-01-24 00:17:37 +00:00
Peter Wortmann 70de47bc1c Cap material store once objects can't be collect any more
This means that if the Clonk digs Earth but has a full inventory at the time
(so we can't generate Earth chunks), digging another material later can never
yield more than one Earth chunk.
2012-01-21 17:33:00 +00:00
Armin Burgmeier 23d54ea2c9 Implement UPnP for Linux using libupnp 2012-01-21 02:04:14 +01:00
Nicolas Hake 3738069ecd MinGW: Define UPnPNAT CLSID/IID values 2012-01-15 23:22:01 +01:00
Nicolas Hake 33b8fa83d3 Correct file path capitalization 2012-01-15 22:45:04 +01:00
Nicolas Hake cca86151fd Move #include to .h to avoid defining a function with an incomplete type parameter 2012-01-15 22:36:27 +01:00
Nicolas Hake 067456d213 Remove superfluous includes 2012-01-15 22:35:22 +01:00
Nicolas Hake 683800c33c win32: Add UPnP port mapping support 2012-01-15 21:27:16 +01:00
Armin Burgmeier 687c1f4920 Print the location of the mesh in the error message when failing to load a mesh 2012-01-13 23:44:05 +01:00
Armin Burgmeier c46f406943 Smoother movements on objects on moving solidmasks
The behavior is still not perfect yet since the attachment of the object
to the SolidMask may re-position the object by 1 pixel. I am not sure
this can be solved correctly since there are three coordinates involved
who can be (and, generally, are) different on a sub-pixel level. These
are the object's position itself the position of the solidmask object
and the position of the solidmask (which is constrained to pixel boundaries).
However, the attachment code only knows the object and the solidmask, not
the solidmask object, so it possibly cannot properly account for this.
2012-01-12 00:49:12 +01:00
Armin Burgmeier 6afadc6397 Allow mesh graphics images in messages 2012-01-10 22:40:46 +01:00
Nicolas Hake bf89f9531d C4FO: Make sure object has an action before testing its properties (#704) 2012-01-10 16:17:37 +01:00
Armin Burgmeier 5195cbe6d4 Fix build against recent zlib 2012-01-09 21:28:07 +01:00
Maikel de Vries d6f936850e Removed all senseless font sizes
These font sizes don't work well ingame and are too ugly to show to the player, all remaining font sizes work well enough with resolutions ranging from 800x600 to 1920x1080.
2012-01-08 20:03:09 +01:00
Nicolas Hake faf62abf9c Aul: Make sure CreateConstruction id parameter is valid (#702) 2012-01-03 21:57:55 +01:00
Armin Burgmeier 98f4b6f1c6 Print a warning instead of a failed assertion if C4Network2IO broadcast fails 2011-12-29 21:51:52 +01:00
Armin Burgmeier c17e272b38 Allow PID_ConnRe packets from not-yet-accepted connections
This fixes joining games in local networks where the PID_ConnRe
packet can arrive earlier than the main thread manages to flag
the connection as accepted.
2011-12-29 19:39:25 +01:00
Maikel de Vries 241315762d LandscapeRender: fixed off by one for shader warning
By PeterW
2011-12-29 18:24:55 +01:00
Armin Burgmeier b63adda52f Synchronize the order of Definition() calls 2011-12-29 17:04:57 +01:00
Armin Burgmeier 1eff3d7661 Add another DebugRec for the Definition() call 2011-12-29 17:02:26 +01:00
Armin Burgmeier 7e532c2bd6 Split math functions into StdMeshMath.{h,cpp} 2011-12-29 15:41:52 +01:00
Armin Burgmeier 1f8cd31fa2 Fix a crash when enabling a non-mesh definition picture for drag+drop 2011-12-29 17:32:40 +01:00
Sven Eberhardt c2ccf20509 Some new debugrecs 2011-12-29 00:12:21 +01:00
Armin Burgmeier cc62b169c8 Add "MouseDrag" property for finer control of script-implemented drag+drop 2011-12-28 19:33:19 +01:00
Günther Brammer c49ef4abf9 Add a few missing "new"s to "throw NeedObjectContext" statements
The catch in C4AulExec only catches pointers, so without the new the
exception isn't caught.
2011-10-14 02:51:20 +02:00
Günther Brammer 4830eb4162 reloc: Exepath should not override the planet folder
The planet folder is used to develop the game data and should come first.
The pure exepath is only used on windows, where it is the system data path
and should come last.
2011-12-28 18:39:20 +01:00
Armin Burgmeier fa9654c4e8 Enable dragging of mesh pictures in mouse control 2011-12-25 19:16:50 +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
Sven Eberhardt c287c093cc PlayerControl: Mouse coordinate space (viewport vs landscape) is now a control property; not an assignment property.
This is in preparation for proper custom control assignments
2011-11-20 21:49:38 +01:00
Armin Burgmeier dda29e2dcd Remove some dead code 2011-11-20 20:50:23 +01:00
Armin Burgmeier 934637f8f0 Linux: Obtain local addresses by enumerating network devices
Instead of resolving local hostname. This makes network work with erroneous
or missing entries in /etc/hosts.
2011-11-20 20:45:58 +01:00
Nicolas Hake 0dcfe72148 MSVC: Build all binaries directly in build dir
With this change, MSVC will build binaries in ${CMAKE_CURRENT_BINARY_DIR}
without adding any more subdirectories. It will also expect its data in a
directory called "planet" immediately below the binary directory.
Since MSVC allows building multiple configurations from the same input file,
the resulting binaries will be suffixed by the configuration type. An exception
is RelWithDebInfo, which will have no suffix; this was chosen over plain Release
to aid in debugging.

Building OpenClonk will work out of the box for in-source builds, but
out-of-source builds will have to create a symlink or a directory junction.
We consider this an acceptable drawback; it was proposed that if you use the
non-default option of an out-of-tree build, you will also know how to create a
link or a junction to, or copy the planet directory.

This changeset also revives looking for game data in the same directory as the
binary, which was part of c3fc1ee1ec8c [Peter Wortmann].
2011-11-10 02:01:21 +01:00
Nicolas Hake 74620be240 Backed out changeset: c3fc1ee1ec8c 2011-11-10 02:17:00 +01:00
Peter Wortmann d5c075ade8 Yet another variant on how to find data files
This time, the relocation code checks for a "System.c4g" in either
the executable path or a "data" folder directly below. CMake makes
sure that this points somewhere sensible for normal builds.

TODO:
* Check whether this actually works under Unixes. Can "ln -sf"
  delete important stuff? Is there a safe alternative?
* Further unify with the Mac Os solution. Other platforms might
  auto-pack for release builds too, for example - and it might
  be a good idea to have a proper data subdirectory in Mac bundles
  as well.
2011-11-09 00:45:07 +00:00
Peter Wortmann 638cb919d4 Fixed line drawing coordinate rounding 2011-11-08 16:22:39 +00:00
Günther Brammer 91e3a0ca07 Remove unused EraseFiles and EraseItems functions 2011-11-02 21:34:04 +01:00
Günther Brammer cb3ae45c2f c4group -t: remove destination before packing group 2011-11-02 21:33:38 +01:00
Günther Brammer ccbf4d1d45 Consolidate duplicated simple Log functions
The various small utilities do not use the engine Log implementation but
one that simply prints to stdout. Instead of duplicating that one, link a
common one into the utilities.
2011-11-02 21:36:39 +01:00
Günther Brammer 283876696d Optimize away STACK 0 bytecodes
They got created for this without parentheses.
2011-05-07 00:18:00 +02:00
Günther Brammer 0c2ea0b6b5 C4AulParseState::AddBCC returns the position of the added chunk 2011-10-14 00:28:29 +02:00
Günther Brammer c1d1424a56 Annotate Bytecode debug output with jump target labels 2011-05-07 00:19:01 +02:00
Günther Brammer 0cd46a2ebc Wrap C4AulFunc::Name in C4AulFunc::GetName() 2011-10-14 00:40:55 +02:00
Günther Brammer 725f0e0f5a Remove GuessType from a comment 2011-08-21 17:10:45 +02:00
Günther Brammer 8758e35255 Remove redundant C4Value::GetTypeInfo 2011-08-21 14:40:29 +02:00
Günther Brammer 39ba48ee54 Rename C4Value::ConvertTo(NoNil) to C4Value::Check(Par)Conversion
The NoNil variant thus has the shorter name, because most code should
use it. Conversion checks mostly secure code that uses the value and would
crash with a nullpointer. The exception are function parameters, which all
also accept nil and 0 and check for nullpointers in the function itself.
2011-08-21 01:47:38 +02:00
Günther Brammer c82debf5f1 Remove almost unused C4AulScript::GetSFunc(int)
This also transforms a O(n^2) loop into a O(n) one. Though the n were small
and the loop seldomly called.
2011-09-30 01:39:12 +02:00
Günther Brammer b80315b182 Script: Remove unused PrivateCall and ProtectedCall 2011-09-30 01:47:06 +02:00
Günther Brammer 65a11ef1c3 Script: Remove unused function "descs" 2011-09-29 02:46:26 +02:00
Günther Brammer b911630578 Replace OpenSSL SHA1 implementation with one copied from boost/uuid
Although the code already uses boost, boost/uuid hides the sha1
implementation in a deeply nested namespace, which is just too bizarre to
use. Also the name of that namespace suggests that it is just an
implementation detail that could go away without notice.
2011-01-10 21:30:40 +01:00
Günther Brammer 3c41310fa3 Remove C4ConfigShareware to reduce OpenSSL dependency 2011-11-02 00:07:29 +01:00
Günther Brammer 7a63fc0ade C4ChatDlg: Use EnsureUnicode() instead of a custom half-implementation 2011-11-01 23:19:03 +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 7c34fa9121 Replace RGB player color selection with an HSV chooser (#679) 2011-10-30 20:43:45 +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
Armin Burgmeier e44b216230 Enable face ordering individually for all submeshes 2011-10-15 21:35:39 +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
Armin Burgmeier f67b20f3f2 Fix a crash when a mirrored animation has a track for only one pair of bones 2011-10-12 21:13:13 +02:00
Günther Brammer 469eb4ddbc editor: Do copy the scenario before saving as a scenario
The deletion only happened when saving as a savegame.

C4Console::SaveScenario also is a much more natural place to do the
copying, since it already contained the part where the new path was copied
to Game.ScenarioFilename.
2011-10-12 20:47:08 +02:00
Armin Burgmeier 8b3a96dcdb Apply animation mirror to bone translation of all keyframes 2011-10-12 20:50:27 +02:00
Maikel de Vries 8e27ffd5c7 Engine: PlaceVegetation now respects bounding box for C4D_Place_Surface 2011-10-12 17:17:04 +02:00
Günther Brammer 52b87fa64f Do not change the working directory
Build and release engines in either installed or uninstalled locations
should find the game data without this now.
2011-10-11 02:08:04 +02:00
Günther Brammer f1cedd5420 Look in the planet folder for game data, too
This replaces the BUILD_TO_PLANET option and makes in-tree Makefile builds
run without further work. Out-of-tree builds need a symlink to planet from
the build directory.
2011-10-11 15:15:41 +02:00
Günther Brammer 8da7abc12f Mac: Use the SystemDataPath for the "GameDataPath" like the other platforms 2011-10-11 15:14:05 +02:00
Günther Brammer fa1cab4896 Clean up some obsolete Config.General.ExePath usages 2011-10-10 23:28:01 +02:00
Peter Wortmann 1388591644 Landscape: Dig2ObjectCollect shouldn't stop other materials from spawning [#678]
Thanks to Maikel for the accurate report.
2011-10-10 20:25:35 +01:00
Nicolas Hake 5ae60485fc Make OC build again 2011-10-09 20:52:13 +02:00