heinrich5991
9911759314
Revert "Don't divide by 0"
...
This reverts commit 03faa51e28
.
Dividing floats by zero isn't undefined behavior and results in +inf or
-inf depending on the sign of the first operand.
#include <math.h>
#include <stdio.h>
#define PRINT(x) printf("%s = %f\n", #x, x)
int main()
{
PRINT(1.0 / 0.0);
PRINT(-1.0 / 0.0);
PRINT(atanf(1.0 / 0.0));
PRINT(atanf(-1.0 / 0.0));
return 0;
}
prints
1.0 / 0.0 = inf
-1.0 / 0.0 = -inf
atanf(1.0 / 0.0) = 1.570796
atanf(-1.0 / 0.0) = -1.570796
The changed function was problematic for values like (0,1), (-1,0),
(0,-1) where it always returned an angle of 0°.
2017-09-16 18:33:10 +02:00
def
03faa51e28
Don't divide by 0
2017-09-16 12:06:07 +02:00
def
75d3eeaa09
Try linking against security framework on macosx
2017-09-16 11:39:09 +02:00
Dennis Felsing
81f704516f
Merge pull request #857 from heinrich5991/pr_ddnet_fix_msvs_warnings
...
Fix MSVS warnings, activate /WX for CI on Windows
2017-09-16 11:19:53 +02:00
Dennis Felsing
f60eb5658f
Merge pull request #836 from heinrich5991/pr_ddnet_unify_icons
...
Unify icons for gcc and MSVC, fix server icon
2017-09-16 11:18:40 +02:00
Dennis Felsing
43d0299a45
Merge branch 'master' into pr_ddnet_fix_msvs_warnings
2017-09-16 11:17:39 +02:00
Dennis Felsing
455bcdd160
Merge pull request #863 from Learath2/dd_pr_circleartifact
...
Tidy up circle.yml, test artifact collection
2017-09-16 11:16:04 +02:00
Jupeyy
fc706a820c
only check gametiles for DDNet server type
2017-09-16 03:45:24 +02:00
Jupeyy
26607cfd47
at texture upload, check if we have enough space in the command buffer
...
too
2017-09-15 03:50:06 +02:00
Jupeyy
31844d3353
set max width for custom text texture upload and fixing alignments for
...
texture updates
2017-09-15 03:01:26 +02:00
Learath2
10909205e7
Typos everywhere
2017-09-15 00:57:04 +02:00
Learath2
c3fcbd53ca
Fix typo
2017-09-15 00:43:43 +02:00
Learath2
dd762d360c
AppVeyor doesn't like pushd/popd
2017-09-15 00:35:27 +02:00
Learath2
1597a0e21f
Try getting both arches
2017-09-15 00:30:29 +02:00
Learath2
66d0784f0d
Compile with Release config, fix path for artifact
2017-09-15 00:06:39 +02:00
Learath2
ffeb76cbe0
Let cmake determine what to run
2017-09-14 23:59:38 +02:00
Learath2
aaf58acbf5
Revert OCD for AppVeyor
2017-09-14 23:47:50 +02:00
Learath2
1e869c0557
Test packaging and artifact collection on AppVeyor
2017-09-14 23:44:57 +02:00
Learath2
f4c51d4387
Use curl instead of wget
2017-09-14 22:16:21 +02:00
Learath2
461958828b
Update cmake before building
2017-09-14 22:08:59 +02:00
Jupeyy
f2820ea392
use 4*4 array instead of declearing a full matrix class
2017-09-14 19:47:04 +02:00
Jupeyy
f48e186bfd
use CLineReader instead of fgets, also delete program at destruct
2017-09-14 19:35:31 +02:00
Jupeyy
b6e4b4b4a6
detach shaders automatically after linking
2017-09-14 19:34:14 +02:00
Learath2
9543b05e31
Fix globbing mistake, install xz-utils
2017-09-14 16:03:38 +02:00
Learath2
71a15f39c6
Tidy up circle.yml, test artifact collection
2017-09-14 16:03:38 +02:00
Learath2
fdac17ceb4
Merge pull request #864 from heinrich5991/pr_ddnet_older_cmake_package
...
Add compatibility with older CMake for `package`
2017-09-14 15:54:42 +02:00
Jupeyy
4fec86a354
support old opengl version with only 2 vertex coordinates
2017-09-14 08:03:33 +02:00
Jupeyy
3bdd8c19ac
delete primitive index buffer at shutdown too
2017-09-14 03:54:22 +02:00
Jupeyy
1df1731b01
use glDeleteVertexArrays instead of glDeleteBuffers
2017-09-14 03:50:42 +02:00
Jupeyy
211f8a6b11
only allow changing to use single/multiple texture units at restart
2017-09-14 02:58:13 +02:00
Jupeyy
1167ab822c
reduce upload since of vertices if drawing quads
2017-09-14 02:50:31 +02:00
Jupeyy
77b3c39553
allow disabling texture unit optimization by command, also use
...
drawelements instead of drawarrays for quads
2017-09-14 02:49:35 +02:00
Jupeyy
a530764ec1
only upload vec2 for vertex
2017-09-14 02:48:39 +02:00
heinrich5991
a34b1f4dd7
Add compatibility with older CMake for package
2017-09-13 22:38:25 +02:00
Jupeyy
5c7c09d380
fixing most wrong code pattern
2017-09-13 20:33:58 +02:00
Jupeyy
7e0146be97
replace tabs with spaces
2017-09-13 20:09:40 +02:00
Jupeyy
948d768c9c
out the frag color
2017-09-13 18:49:43 +02:00
Jupeyy
a3658e5526
store alpha textures always as RGBA
2017-09-13 18:32:08 +02:00
Jupeyy
74cccdeed0
output use_maxosxframework
2017-09-13 17:42:09 +02:00
Dennis Felsing
e68992518d
Merge pull request #862 from ChillerDragon/master
...
removed crypto lib from bam.lua (macOS compile improvement)
2017-09-13 13:39:46 +02:00
Chiller Dragon
939ea3c918
removed crypto lib from bam.lua (macOS compile improvement)
2017-09-13 12:30:07 +02:00
Jupeyy
cf7878f46a
update shaders to not use any decrecated GLSL function/variable
2017-09-13 01:36:17 +02:00
Jupeyy
fd83d2834d
dont draw layer if our view is out of the layers range
2017-09-12 23:16:01 +02:00
Jupeyy
c437b5bb89
use 64 bit variable
2017-09-12 21:06:12 +02:00
Jupeyy
de43d410fe
merged cmakelist
2017-09-12 21:03:27 +02:00
Jupeyy
629bf2c5f9
Merge branch 'master' of https://github.com/ddnet/ddnet
2017-09-12 20:24:58 +02:00
Jupeyy
0caa70f0a1
support buffering of tile layers, draw them with the buffer objects and
...
some optimazations to border drawing
2017-09-12 20:22:18 +02:00
Jupeyy
9d2a625363
create overlay textures for entity overlays, instead of rendering glyphs
2017-09-12 20:15:37 +02:00
Jupeyy
6dc4d1e578
only allow a maximal zoom factor to make sure no bufferoverflow happens
2017-09-12 20:14:34 +02:00
Jupeyy
93138c1fba
make background class inherited from maplayers and change some things in
...
maplayers instead, so the background class can profit from buffering
2017-09-12 20:13:53 +02:00