Commit Graph

8826 Commits (eabca223f5e7c237f5d3bb88183d38a41cb9bced)
 

Author SHA1 Message Date
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
Maikel de Vries 1ebdc31182 add tutorial 6
Still intro, outro and some NPCs missing.
2016-02-07 21:29:27 +01:00
Maikel de Vries 2a4fa85583 tutorials: fix some descriptions and control strings 2016-02-07 21:29:27 +01:00
Sven Eberhardt 8273dcdf45 Fix cargo attachment vertex in balloon 2016-02-07 14:49:05 -05:00
Sven Eberhardt 3d3e848aeb Target balloon: Allow deployment of any items. 2016-02-07 14:27:51 -05:00
Sven Eberhardt 35fcc0ff51 Fix scenario saving of array-typed visibility. Fix ItemSpawn saving and spawn def re-setting. 2016-02-07 13:21:01 -05:00
Sven Eberhardt ef032c60fa ItemSpawn: Simplify script, add team-only spawns, add scenario saving and add sound on collection.
The script now just sets visibility per player (VIS_Select) instead of creating one dummy object per player. It also uses the object directly instead of indirecting everything through an effect (the effect couldn't be used on other objects anyway).
2016-02-07 12:21:13 -05:00
Sven Eberhardt 79897ce777 Move ItemSpawn from Aerobatics to main Objects. 2016-02-07 10:43:24 -05:00
David Dormagen 28ffc3d3b1 Library_Constructor: use normal single-use instead of holding-use
..because the library wasn't actually USING the holding callback at all. And it had/has its own CON_Aim hackery anyway. No need for the control-library internal CON_Aim stuff then (I could imagine this might just lead to issues at some point).
2016-02-07 10:47:33 +01:00
David Dormagen d9760cdab6 controls: properly set noholdingcallbacks to false when using ControlUseStart (#1327)
Otherwise the situation could arise where you used a ControlUseStart object (the wallkit) but noholdingcallbacks was still set to true (because e.g. you used a hammer before). Then you would not be able to move the preview.
This is described in a comment to the referenced bug.
2016-02-07 10:47:33 +01:00
David Dormagen 59739b5cf6 script GUIs: do not catch mouse-up without prior mouse-down (#1327)
Otherwise, you could open a menu on mouse-down, which would then block the mouse-up event. The control system (not the script but the engine!) would then never know that the button was released and issue a key event with repeated=1 when you pressed the button the next time.
This could lead to issues.
2016-02-07 10:47:33 +01:00
Maikel de Vries 148b217003 jet stream: do not attempt to move stuck objects 2016-02-07 10:24:36 +01:00
Maikel de Vries a44b759472 snap digging angle to straight lines with 5 degree margin 2016-02-07 10:24:36 +01:00
Maikel de Vries 978b236596 clean up shovel script 2016-02-07 10:24:36 +01:00
Maikel de Vries 145b902f65 correctly handle SetDir for the catapult
Ideally the script is fully changed to correctly use dir.
2016-02-07 10:19:11 +01:00
Maikel de Vries 0a928d4a11 tutorials: various small fixes 2016-02-07 10:19:11 +01:00
Sven Eberhardt 1e5b04e2d1 WallKit preview: Add function to update independent of position. 2016-02-06 23:53:45 -05:00
Sven Eberhardt d213115103 Add function to CTF flag to disable pickup.
To be used by scenarios that use the flag differently.
2016-02-06 22:45:53 -05:00
Sven Eberhardt 775533a8da Catapult and cannon: Add functions to rotate instantly.
Useful for scenario designers.
2016-02-06 22:45:14 -05:00
Sven Eberhardt 439b1f481c Register Objects.c script as global constant to make it accessible from outside 2016-02-06 21:12:22 -05:00
Sven Eberhardt 43451a4242 HotIce: Lower spawn position on explosive mode with small islands 2016-02-06 20:40:44 -05:00
Günther Brammer b129e5f210 gtk: Remove unused variable 2016-02-06 23:48:13 +01:00
Günther Brammer 23d34f75ec Remove some dead graphics code 2016-02-06 23:46:58 +01:00
Günther Brammer 2434b22b20 Improve SDL2 OpenGL context error message 2016-02-06 23:46:58 +01:00
Sven Eberhardt 44121a00eb MAPALGO_Scale: Fix scaling coordinates for common case of blitting scaled surfaces from one surface to another. 2016-02-06 16:10:34 -05:00
Günther Brammer 4b4b8781a0 Make GTK+ and SDL2 work together
If the gamepad code initialized the SDL video subsystem, GTK+ crashed in
libX11. Or something along those lines.

Making the optional subsystems using SDL for gamepads and audio use
SDL_InitSubSystem and only the SDL Application port do the full SDL_Init
is the proper way to do things in any case.
2016-02-06 21:12:56 +01:00
Sven Eberhardt 623f838799 Add sounds: Hits::BucketHit*, Structures::DoorOpen*, Structures::DoorClose* by ala 2016-02-06 14:37:18 -05:00
Günther Brammer 32d8d0db76 Finish the update from SDL_Mixer to SDL2_Mixer 2016-02-06 17:28:15 +01:00
Günther Brammer 408dfff96e Fix indentation of the KeyCodeMap table
It used a mix of tabs and spaces for indentation, and tabs to separate the
columns, which doesn't work with variable tab sizes and variable column
widths. Use tabs for indentation and spaces for column separation.
2016-02-06 16:50:47 +01:00
Günther Brammer 934b519bb4 Update the SDL port to SDL2
SDL2 is a much closer match to the other platform code, and
allows the creation of OpenGL 3 core contexts, which is
now required.
2016-02-06 16:48:21 +01:00