Nicolas Hake
73862d8fcb
Move C4Group::View out of C4Group
...
C4Group::View is only used in the c4group command line tool, so the
right place for that code is inside the tool. Added two public constant
accessors to return the header data and entries.
2015-02-13 17:19:37 +01:00
Nicolas Hake
ff263e5433
Fix potential buffer overflow in ssprintf
...
If vsnprintf fails for other reasons than too small a buffer, it returns
a negative value. Comparing that with a size_t value promotes the
negative value to unsigned, which makes for a very large result, almost
guaranteed to be larger than the buffer size.
2015-02-12 23:55:38 +01:00
Nicolas Hake
95641b5fb0
Add a dummy declaration to ssprintf
...
G++ doesn't allow attributes on function definitions for reasons. Add a
declaration immediately before the definition so it works.
2015-02-12 23:14:16 +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
35e7ca509b
Replace NoPointer struct with template parameter deduction
...
We're trying to ensure that no caller passes a char* to ssprintf, but a
char array instead. This is way easier done by using template parameter
deduction than a specialized class template.
2015-02-12 22:25:36 +01:00
Nicolas Hake
69cdae5ef2
Use find_package instead of raw include to find libraries
2015-02-12 20:09:58 +01:00
Maikel de Vries
de8ee9d840
fix flag removal effect on power network
2015-02-11 22:42:35 +01:00
Nicolas Hake
ea354218bb
Remove unused private field StdMeshMaterialShader::Type
...
We'll keep the parameter just in case we'll ever need the info.
2015-02-11 20:48:18 +01:00
Nicolas Hake
2d1e4caabc
Remove a superfluous endianness test
...
We're not supporting BE systems, and even when we did, I'm not sure this
test could ever have done something.
2015-02-11 20:41:35 +01:00
Maikel de Vries
cba73bafca
implement flag ownership and network change on team switch and hostility change
2015-02-11 00:02:45 +01:00
Maikel de Vries
45a8c02cd0
clean up the animal library
2015-02-11 00:02:45 +01:00
Armin Burgmeier
8825b2c2fb
Interpret normal maps for meshes in Clonk coordinates, not OGRE coordinates
2015-02-09 21:18:47 -05:00
Armin Burgmeier
bcaa2399eb
Fix shader compilation on old Intel drivers
...
See http://forum.openclonk.org/topic_show.pl?pid=28313#pid28313
2015-02-09 20:10:40 -05:00
Maikel de Vries
7f79caade5
flag library: fix on owner change and clean up
2015-02-09 19:32:15 +01:00
Maikel de Vries
b7b6b187f7
clean up gold seller library
2015-02-09 19:32:15 +01:00
Nicolas Hake
81f9ee1c85
Reset C4Group search after Add() to invalidate stale directory cache
...
Adding a file to an on-disk unpacked C4Group file needs to reset the
directory cache so C4Group doesn't return old state later.
2015-02-08 22:28:33 +01:00
Nicolas Hake
06d86f7666
Split a return into multiple statements to make it less unreadable
...
IOCCC is that way ------->
2015-02-08 22:28:32 +01:00
Maikel de Vries
e47a08aaf7
clean up more flag related libraries
2015-02-08 15:28:13 +01:00
Nicolas Hake
3f5efe65ad
Tests: Link winmm
2015-02-08 15:05:14 +01:00
Nicolas Hake
849f8fe98d
GTest: Also accept fused sources
2015-02-08 15:05:12 +01:00
Nicolas Hake
1a1cecadd4
Update license texts
...
Some files, most notably ObjC and test cases, hadn't been updated to use
the new license header. Fix this.
2015-02-08 15:05:11 +01:00
Nicolas Hake
0076fc7d7b
Fix DbgHelp check
...
CMake didn't always find the correct DbgHelp.lib on Win64. Somehow,
nobody seems to have noticed!
2015-02-08 15:03:08 +01:00
Maikel de Vries
37eb7a0095
make flag marker id consistent with other libraries
2015-02-08 13:35:26 +01:00
Maikel de Vries
f2794d335f
move ownable library into flag group
2015-02-08 13:35:26 +01:00
Sven Eberhardt
bcd821a786
Fix construction menu opened at wrong position. ( #982 ).
...
It was always opened at the last mouse position of the owner of the hammer. Fixed it to use the controlling player instead.
2015-02-08 13:31:51 +01:00
Maikel de Vries
ce37dc181e
clean up of the flag library
...
This might have fixed the appearance of flag markers at the flag's center.
2015-02-08 13:07:56 +01:00
Sven Eberhardt
cd3b969fc4
Silence a few warnings in render and SolidMask code.
2015-02-08 12:37:00 +01:00
Sven Eberhardt
4e65dccb1f
Fix memory leak on CID_Animation_BaseInfo mesh chunk type.
...
Detected by a -Wunused warning.
2015-02-08 12:35:45 +01:00
Sven Eberhardt
e05c7de976
Flag UPnP includes as system to suppress warnings.
2015-02-07 22:46:52 +01:00
Sven Eberhardt
f032662052
Mark getopt and tinyxml thirdparty includes as system libraries.
...
This should silence some warnings occuring in thirdparty code so warnings in our own code get the exposition they deserve.
2015-02-07 22:02:42 +01:00
Maikel de Vries
38e0e0d299
add a test for testing power system performance
2015-02-07 18:17:49 +01:00
Nicolas Hake
3136c90ded
Solve the problem of Wsign-compare from timsort.h
2015-02-07 17:41:57 +01:00
Nicolas Hake
e4fea50a9a
Mark thirdparty as system headers so we don't get warnings from there
...
thirdparty needs to be pristine code so we can update those libraries
without having to figure out whether we need to apply some more patches.
This means we can't easily fix warnings in there; telling GCC that these
are system headers means it won't emit any.
2015-02-07 17:39:15 +01:00
Nicolas Hake
bf1e02872d
Revert "Avoid signed/unsigned comparison in mesh sorting."
...
This reverts commit 01b47bae8e
.
2015-02-07 17:35:11 +01:00
Sven Eberhardt
01b47bae8e
Avoid signed/unsigned comparison in mesh sorting.
2015-02-07 17:02:17 +01:00
Sven Eberhardt
df97b485f9
Fix group loading order for definitions, sounds and graphics ( #1253 ).
...
Graphics are now pre-loaded and may then be accessed in random order. Reduces Objects.ocd load time from 20 seconds to 1 second for me.
Some ordering is still broken (e.g. material.ocg and player files).
2015-02-07 14:01:15 +01:00
Sven Eberhardt
91fdb82720
Remove dupliocate sound loading.
2015-02-07 14:01:15 +01:00
Sven Eberhardt
c94814f374
Fix signed/unsigned comparison warning.
2015-02-07 14:01:14 +01:00
Maikel de Vries
df58032aa8
deactivate producers of higher priority on overproduction
2015-02-06 21:16:48 +01:00
Maikel de Vries
1336bb36ee
libraries clean-up: remove graphics and clean defcores
2015-02-06 19:44:22 +01:00
Sven Eberhardt
9600eec5bd
Crash Landing: Fix them Englishs in Gyro's dialogue [Fluff]
2015-02-05 20:54:11 +01:00
Sven Eberhardt
68b1f55a56
Experimental: Fix ambience execution with player counts divisible by three.
2015-02-05 20:50:12 +01:00
Sven Eberhardt
51d34c0c66
Fix typo in raid mission.
2015-02-05 20:50:06 +01:00
Maikel de Vries
5c29121600
correct inherited call in structure library
2015-02-05 17:56:14 +01:00
Maikel de Vries
4d773f4ee9
fixed mine rescue goal
2015-02-05 17:40:13 +01:00
Maikel de Vries
b81774c8c4
remove gamma from tutorial 2
2015-02-04 22:17:54 +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
Martin Plicht
2ca9a77cc4
mac: Do #include guessing dance until compile success
2015-02-04 21:52:04 +01:00
Maikel de Vries
b59141f905
remove debug logging from power library
2015-02-04 15:56:02 +01:00
Maikel de Vries
a5155f6d88
fixed no power need rule
2015-02-04 12:40:29 +01:00