Commit Graph

8678 Commits (544c1cbb4bb6da97d30571ff28772660c7ad5969)
 

Author SHA1 Message Date
Günther Brammer 544c1cbb4b CMake: Remove unused HAVE_X11_KEYSYM_H 2016-02-13 22:36:41 +01:00
Nicolas Hake ec0055f260 Link to terminfo or one of its compat libraries in add'n to readline
Unmodified readline relies on, but doesn't link to, a termcap library.
Several Linux distributions patch this, but others don't; to avoid build
failures, we'll just link to a library that provides termcap symbols
even though we don't use them ourselves. Fixes Github #15.
2016-02-13 22:15:35 +01:00
Nicolas Hake acafce33b0 CMake: Use target_compile_definitions instead of setting the property 2016-02-13 21:56:34 +01:00
Sven Eberhardt a69958554f Melting Castle: Add IceWallKit spawn
To promote more waling attacks and walling defenses.
2016-02-13 10:43:42 -05:00
Lukas Werling 97f06fd0cd Fix openclonk-server build 2016-02-12 22:40:55 +01:00
Günther Brammer c332fe940b Merge branch 'sdl-mouse' 2016-02-12 21:11:21 +01:00
Lukas Werling 24ef8b43af Grab the mouse while in-game (#1637)
This only implements this for the SDL port for now.
2016-02-12 21:09:40 +01:00
Günther Brammer 92217e51e0 GLX: Use gdk instead of XLib to make glXCreateContextAttribsARB not exit 2016-02-12 20:39:39 +01:00
Günther Brammer 0c0c64642a Remove unused #define in C4AulParse 2016-02-12 17:15:46 +01:00
Lukas Werling f505b31032 SDL: Fix mouse button handling
- The right mouse button didn't work at all.

 - The left mouse button stopped working when clicking multiple times
   without moving the cursor.
2016-02-11 22:29:10 +01:00
Lukas Werling 392b7bab72 SDL: Add support for the mouse wheel
Fixes #0001682
2016-02-11 22:17:42 +01:00
Mark 5224eb5b18 Goal Resource: Variable amounts of exploitation
It is possible to set the amount of resources to be extracted with an additional parameter in SetResource() now. The default amount to be extracted is 95 percent, which is the same behaviour as before the changes.
2016-02-11 22:16:19 +01:00
Mark 3993a41cea Goal Resource: Code comments
Some more fine tuning, code comments.
2016-02-11 22:04:22 +01:00
Mark 03d4662811 Goal Resource: Readability
Made the lines more readable.
2016-02-11 21:56:14 +01:00
Mark f122346241 Goal Resource: exploitable_units
Renamed mat_cnt. Will make the lines more readable in the next commit.
2016-02-11 21:50:50 +01:00
Mark 9fa4632a48 Goal Resource: ExploitableObjectCount()
Extracted the division by blast_ratio to a function. This should help again when expanding to diggable materials.
2016-02-11 21:42:19 +01:00
Mark a4d2edd0d2 Goal Resource: ObjectCount2MaterialCount()
Deciphered what some of the functions are good for, since the original code is kind of cryptic. This should help again when expanding to diggable materials.
2016-02-11 21:35:59 +01:00
Mark 50b4d6bae8 Goal Resource: AvailableObjectCount()
Replaced the ObjectCount() calls with a function. This should make it easier to expand the script to diggable materials later.
2016-02-11 21:20:13 +01:00
Mark d9e75aaaba Goal Resource: Improved variable names
Renamed indices, removed unused variables.
2016-02-11 21:06:38 +01:00
Mark 5c2dcf41a3 Goal Resource: Improved variable names
Extracted functions that were used multiple times and use consistend naming for material.
2016-02-11 21:02:16 +01:00
Maikel de Vries b7766780c5 fix plane for several C4D_None objects which where C4D_Structure before 2016-02-10 22:40:44 +01:00
David Dormagen 77bdc8e841 disallow collection via shift when contained (#1677) 2016-02-10 18:12:09 +01:00
Nicolas Hake 5f895c14fc Materials: Fix misspelling of "Incendiary" (#1680)
The wrong spelling will still be accepted as a material value, as long
as no value with the correct spelling exists.
2016-02-09 23:45:02 +01:00
Nicolas Hake 6f669e7b49 Merge remote-tracking branch 'github/pull/11' 2016-02-09 22:18:49 +01:00
David Dormagen 91391c64af draw global particles on plane 900
Previously, global particles would be drawn even in front of Plane 1000+ (GUI) objects. Additionally, it was impossible to specify particles that were supposed to always be in front of all other particles (e.g. fog, clouds, emulated FoW, ...).
Now, you can attach particles to an object on plane 901+ and have them be in front of everything else.
2016-02-09 20:43:23 +01:00
Maikel de Vries 99d5a7c8c9 lorry: play a sound when dumping contents 2016-02-09 19:33:30 +01:00
Armin Burgmeier 582cba01ed Build Fix 2016-02-08 21:28:44 -08:00
Nicolas Hake 43aa11623a Fix off-by-one error in FoW renderer (#1678)
The FoW renderer would try drawing to texture coordinates one pixel
too high (i.e. if the texture was 256 pixels high, it would draw to
pixels with 1 <= y <= 256 instead of 0..255).
2016-02-08 22:58:18 +01:00
Nicolas Hake a204439f80 C4FontLoader: Stop manually managing memory
Instead of implementing a dynamically growable array with new and delete
and memcpy like cavemen, we'll use a vector of smart pointers.
2016-02-08 22:58:17 +01:00
Maikel de Vries 47d6f2d75a disable contact calls for dead bats (#1676) 2016-02-08 21:25:43 +01:00
Maikel de Vries 159dbf071f make ContactCalls a property instead of DefCore entry
This allows for useful runtime changes, like disabling contact calls when an animal dies.
2016-02-08 21:25:43 +01:00
Nicolas Hake 3fb3f45a35 MSVC: Disable non-conforming conversion from string literal to char*
C++11 forbids conforming compilers from performing the deprecated
conversion from a string literal to non-const char* or wchar_t*. Most
compilers however still do it by default because not doing it breaks
lots of legacy code. We don't have any of this legacy code anymore, so
we can disable the conversion.
2016-02-08 17:36:50 +01:00
Nicolas Hake 142b7ea7c3 RegCreateKeyEx: Pass NULL as lpClass
The lpClass parameter isn't used, and it is valid to pass NULL for it.
It is, however, not valid to pass a string literal, because the
conversion to nonconst char* has been deprecated in C++ for a long time
and doesn't exist anymore in C++11.
2016-02-08 17:36:50 +01:00
Nicolas Hake d5dbcb71da ShowGfxErrorDialog: Fix handle leak
CreateProcessW will return a handle the main thread and a process handle
to the child process. These handles must be closed to avoid a resource
leak.
2016-02-08 17:36:50 +01:00
Nicolas Hake 3d9b322f51 Fix incorrect CreateProcessW call
Quoth MSDN: "The Unicode version of this function, CreateProcessW, can
modify the contents of this string. Therefore, this parameter cannot be
a pointer to read-only memory (such as a const variable or a literal
string). If this parameter is a constant string, the function may cause
an access violation."

It can, however, be NULL, which does the right thing automatically.
2016-02-08 17:36:50 +01:00
Nicolas Hake 64a5388d4d C4Surface: Remove broken "support" for split textures
Most code already didn't handle textures larger than GL_MAX_TEXTURE_SIZE
and only used the first one in case of a split texture.
2016-02-08 17:36:50 +01:00
Nicolas Hake 7b04914fc4 C4Surface: Make dbg_index unsigned int instead of int*
It seems like an odd decision to add a layer of indirection to this,
especially since it's just a pointer to int instead of a pointer to a
larger structure.
2016-02-08 17:36:50 +01:00
Nicolas Hake 059e9e7060 C4Surface: Explicitly mark copy ctor/assignment op deleted 2016-02-08 17:36:50 +01:00
Maikel de Vries 3e5bec1ffd tutorial 7: add interaction to call the airship (#1595) 2016-02-08 17:32:30 +01:00
Maikel de Vries c4c8362ef8 tutorial 3: ensure progress if sawmill is completed in a diffent way (#1674)
for example if the pieces of rock are put into the site one by one.
2016-02-08 15:27:58 +01:00
Maikel de Vries a88a890960 tutorial 7: explain cycling through multiple interactions (#1599) 2016-02-08 15:27:58 +01:00
Maikel de Vries 0d358ce45b tutorial 4: make sure player hacks out ore at the right location (#1675) 2016-02-08 15:27:58 +01:00
Maikel de Vries 04877e33da do not test permeable solid mask on the elevator case in master
This messes up so many things as one could have expected. Instead we do the sensible thing and enable it only in the test scenario. For future reference all sequences involving an elevator and NPC clonks are broken with this feature.
2016-02-08 15:27:58 +01:00
Maikel de Vries 933314165b tutorial 2: fix confusing formulation for dropping items (#1633) 2016-02-08 15:27:58 +01:00
Maikel de Vries 8128b8db33 tutorial 2: improve message to make loam bridge (#1634) 2016-02-08 15:27:58 +01:00
David Dormagen 76f971e9d9 interaction highlight: limit highlight's Plane for objects behind the Clonk
Otherwise, a catapult might appear to shine through the Clonk. This might look odd.
For objects in front the the Clonk, the GUI-Plane is kept.
2016-02-08 12:35:42 +01:00
David Dormagen c6da7d54aa interaction highlight: create selector particle with a slight delay
Only on first selection, though.
http://forum.openclonk.org/topic_show.pl?pid=31112#pid31112
2016-02-08 12:31:54 +01:00
Nicolas Hake 5fe327663f Fix signed int overflow in BltAlpha (#1661)
The red color channel calculation could overflow into the sign bit,
which is undefined behavior. At least one compiler takes advantage of
this and assumes it cannot happen, resulting in incorrect results.

BltAlphaAdd looks similar, but does in fact not have this bug because it
shifts the color channel far enough that multiplication can't overflow.
2016-02-08 02:39:54 +01:00
Nicolas Hake 4fdafbc78a Move StdColors.h ref from C4Surface.h to files that actually need it
C4Surface.h doesn't require anything from StdColors.h, so there's no
reason to reference the latter there.
2016-02-08 02:13:18 +01:00
Sven Eberhardt c9d3cd7417 Add MeltingCastle team melee 2016-02-07 17:21:14 -05:00