Browse Source

Various compilation fixes.

wip/core-clipp
Sam Hocevar 5 years ago
parent
commit
2235ce1635
13 changed files with 77 additions and 64 deletions
  1. +3
    -3
      legacy/lol/algorithm/aabb_tree.h
  2. +5
    -5
      legacy/lol/base/avl_tree.h
  3. +11
    -12
      legacy/lol/base/types.h
  4. +2
    -2
      legacy/lol/image/pixel.h
  5. +2
    -2
      legacy/lol/math/arraynd.h
  6. +2
    -1
      legacy/lol/math/functions.h
  7. +1
    -0
      legacy/lol/math/geometry.h
  8. +10
    -6
      legacy/lol/math/interp.h
  9. +10
    -8
      legacy/lol/math/noise/gradient.h
  10. +11
    -9
      legacy/lol/math/noise/perlin.h
  11. +1
    -1
      legacy/lol/math/noise/simplex.h
  12. +9
    -7
      legacy/math/geometry.cpp
  13. +10
    -8
      legacy/numeric.h

+ 3
- 3
legacy/lol/algorithm/aabb_tree.h View File

@@ -1,7 +1,7 @@
// //
// Lol Engine // Lol Engine
// //
// Copyright © 2010—2015 Sam Hocevar <sam@hocevar.net>
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// © 2013—2015 Benjamin “Touky” Huet <huet.benjamin@gmail.com> // © 2013—2015 Benjamin “Touky” Huet <huet.benjamin@gmail.com>
// //
// Lol Engine is free software. It comes without any warranty, to // Lol Engine is free software. It comes without any warranty, to
@@ -34,7 +34,7 @@ void DrawInner(TREE *tree, array<TBB, vec4> &boxes,
array<TE *, int, vec4> &elements, array<TE *, int, vec4> &elements,
array<int, TBB> &leaves, int children, vec4 color) array<int, TBB> &leaves, int children, vec4 color)
{ {
boxes.push(tree->GetAABB(), Color::white);
boxes.push(tree->GetAABB(), color::white);
leaves.push(0, boxes.last().m1); leaves.push(0, boxes.last().m1);
while (leaves.count() > 0) while (leaves.count() > 0)
{ {
@@ -51,7 +51,7 @@ void DrawInner(TREE *tree, array<TBB, vec4> &boxes,
} }
} }
if (!done) if (!done)
elements.push(tree->GetElements()[tree->GetTree()[leaves[0].m1].m_elements[j]].m_element, 1, Color::red);
elements.push(tree->GetElements()[tree->GetTree()[leaves[0].m1].m_elements[j]].m_element, 1, color::red);
} }


for (int i = 0; i < children; i++) for (int i = 0; i < children; i++)


+ 5
- 5
legacy/lol/base/avl_tree.h View File

@@ -1,9 +1,9 @@
// //
// Lol Engine // Lol Engine
// //
// Copyright © 2010-2015 Sam Hocevar <sam@hocevar.net>
// © 2013-2015 Benjamin “Touky” Huet <huet.benjamin@gmail.com>
// © 2013-2015 Guillaume Bittoun <guillaume.bittoun@gmail.com>
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// © 20132015 Benjamin “Touky” Huet <huet.benjamin@gmail.com>
// © 20132015 Guillaume Bittoun <guillaume.bittoun@gmail.com>
// //
// Lol Engine is free software. It comes without any warranty, to // Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it // the extent permitted by applicable law. You can redistribute it
@@ -14,11 +14,11 @@


#pragma once #pragma once


#include <lol/base/all.h>

namespace lol namespace lol
{ {


#include <lol/base/all.h>

template<typename K, typename V> template<typename K, typename V>
class avl_tree class avl_tree
{ {


+ 11
- 12
legacy/lol/base/types.h View File

@@ -1,11 +1,13 @@
// //
// Lol Engine
// Lol Engine
// //
// Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
// This program is free software; you can redistribute it and/or
// modify it under the terms of the Do What The Fuck You Want To
// Public License, Version 2, as published by Sam Hocevar. See
// http://www.wtfpl.net/ for more details.
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
//
// Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What the Fuck You Want
// to Public License, Version 2, as published by the WTFPL Task Force.
// See http://www.wtfpl.net/ for more details.
// //


#pragma once #pragma once
@@ -15,15 +17,12 @@
namespace lol namespace lol
{ {


/* It’s nice to have single-word type names, so define this. */
// It’s sometimes nice to have single-word type names, so define this.
typedef long double ldouble; typedef long double ldouble;


/* The “real” type used for real numbers. It’s a specialisation of the
* “Real” template class. */
template<typename T> class Real;
typedef Real<uint32_t> real;
template<typename T> class real_t;
typedef real_t<uint32_t> real;


/* The “half” type used for 16-bit floating point numbers. */
class half; class half;


/* /*


+ 2
- 2
legacy/lol/image/pixel.h View File

@@ -1,7 +1,7 @@
// //
// Lol Engine // Lol Engine
// //
// Copyright © 2004—2015 Sam Hocevar <sam@hocevar.net>
// Copyright © 2004—2020 Sam Hocevar <sam@hocevar.net>
// //
// Lol Engine is free software. It comes without any warranty, to // Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it // the extent permitted by applicable law. You can redistribute it
@@ -17,7 +17,7 @@
// ------------------------- // -------------------------
// //


#include <lol/base/types.h>
#include <../legacy/lol/base/types.h>
#include <lol/math/vector.h> #include <lol/math/vector.h>


namespace lol namespace lol


+ 2
- 2
legacy/lol/math/arraynd.h View File

@@ -1,7 +1,7 @@
// //
// Lol Engine // Lol Engine
// //
// Copyright © 2010—2018 Sam Hocevar <sam@hocevar.net>
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// © 2013—2014 Benjamin “Touky” Huet <huet.benjamin@gmail.com> // © 2013—2014 Benjamin “Touky” Huet <huet.benjamin@gmail.com>
// © 2013—2014 Guillaume Bittoun <guillaume.bittoun@gmail.com> // © 2013—2014 Guillaume Bittoun <guillaume.bittoun@gmail.com>
// //
@@ -25,7 +25,7 @@
// //


#include <lol/base/array.h> #include <lol/base/array.h>
#include <lol/base/assert.h>
#include <../legacy/lol/base/assert.h>


#include <cstddef> #include <cstddef>
#include <climits> #include <climits>


+ 2
- 1
legacy/lol/math/functions.h View File

@@ -1,7 +1,7 @@
// //
// Lol Engine // Lol Engine
// //
// Copyright © 2010—2019 Sam Hocevar <sam@hocevar.net>
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// //
// Lol Engine is free software. It comes without any warranty, to // Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it // the extent permitted by applicable law. You can redistribute it
@@ -18,6 +18,7 @@
// //


#include <lol/math/constants.h> #include <lol/math/constants.h>
#include <../legacy/lol/base/types.h> // ldouble


#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>


+ 1
- 0
legacy/lol/math/geometry.h View File

@@ -19,6 +19,7 @@
// //


#include <lol/base/enum.h> #include <lol/base/enum.h>
#include <lol/math/vector.h> // vec_t


#include <algorithm> #include <algorithm>
#include <map> #include <map>


+ 10
- 6
legacy/lol/math/interp.h View File

@@ -1,15 +1,19 @@
// //
// Lol Engine
// Lol Engine
// //
// Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
// This program is free software; you can redistribute it and/or
// modify it under the terms of the Do What The Fuck You Want To
// Public License, Version 2, as published by Sam Hocevar. See
// http://www.wtfpl.net/ for more details.
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
//
// Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What the Fuck You Want
// to Public License, Version 2, as published by the WTFPL Task Force.
// See http://www.wtfpl.net/ for more details.
// //


#pragma once #pragma once


#include <../legacy/lol/math/functions.h>

// //
// Interpolator classes // Interpolator classes
// -------------------- // --------------------


+ 10
- 8
legacy/lol/math/noise/gradient.h View File

@@ -1,13 +1,15 @@
// //
// Lol Engine
// Lol Engine
// //
// Copyright: (c) 2010-2014 Sam Hocevar <sam@hocevar.net>
// (c) 2013-2014 Benjamin "Touky" Huet <huet.benjamin@gmail.com>
// (c) 2013-2014 Guillaume Bittoun <guillaume.bittoun@gmail.com>
// This program is free software; you can redistribute it and/or
// modify it under the terms of the Do What The Fuck You Want To
// Public License, Version 2, as published by Sam Hocevar. See
// http://www.wtfpl.net/ for more details.
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// © 2013—2015 Benjamin “Touky” Huet <huet.benjamin@gmail.com>
// © 2013—2015 Guillaume Bittoun <guillaume.bittoun@gmail.com>
//
// Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What the Fuck You Want
// to Public License, Version 2, as published by the WTFPL Task Force.
// See http://www.wtfpl.net/ for more details.
// //


#pragma once #pragma once


+ 11
- 9
legacy/lol/math/noise/perlin.h View File

@@ -1,18 +1,20 @@
// //
// Lol Engine
// Lol Engine
// //
// Copyright: (c) 2010-2014 Sam Hocevar <sam@hocevar.net>
// (c) 2013-2014 Benjamin "Touky" Huet <huet.benjamin@gmail.com>
// (c) 2013-2014 Guillaume Bittoun <guillaume.bittoun@gmail.com>
// This program is free software; you can redistribute it and/or
// modify it under the terms of the Do What The Fuck You Want To
// Public License, Version 2, as published by Sam Hocevar. See
// http://www.wtfpl.net/ for more details.
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// © 2013—2015 Benjamin “Touky” Huet <huet.benjamin@gmail.com>
// © 2013—2015 Guillaume Bittoun <guillaume.bittoun@gmail.com>
//
// Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What the Fuck You Want
// to Public License, Version 2, as published by the WTFPL Task Force.
// See http://www.wtfpl.net/ for more details.
// //


#pragma once #pragma once


#include <lol/math/noise/gradient.h>
#include <../legacy/lol/math/noise/gradient.h>


namespace lol namespace lol
{ {


+ 1
- 1
legacy/lol/math/noise/simplex.h View File

@@ -14,7 +14,7 @@


#pragma once #pragma once


#include <lol/math/noise/gradient.h>
#include <../legacy/lol/math/noise/gradient.h>


namespace lol namespace lol
{ {


+ 9
- 7
legacy/math/geometry.cpp View File

@@ -1,12 +1,14 @@
// //
// Lol Engine
// Lol Engine
// //
// Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
// (c) 2010-2013 Benjamin "Touky" Huet <huet.benjamin@gmail.com>
// This program is free software; you can redistribute it and/or
// modify it under the terms of the Do What The Fuck You Want To
// Public License, Version 2, as published by Sam Hocevar. See
// http://www.wtfpl.net/ for more details.
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// © 2010—2013 Benjamin “Touky” Huet <huet.benjamin@gmail.com>
//
// Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What the Fuck You Want
// to Public License, Version 2, as published by the WTFPL Task Force.
// See http://www.wtfpl.net/ for more details.
// //


#include <lol/engine-internal.h> #include <lol/engine-internal.h>


+ 10
- 8
legacy/numeric.h View File

@@ -1,18 +1,20 @@
// //
// Lol Engine
// Lol Engine
// //
// Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
// This program is free software; you can redistribute it and/or
// modify it under the terms of the Do What The Fuck You Want To
// Public License, Version 2, as published by Sam Hocevar. See
// http://www.wtfpl.net/ for more details.
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
//
// Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What the Fuck You Want
// to Public License, Version 2, as published by the WTFPL Task Force.
// See http://www.wtfpl.net/ for more details.
// //


#pragma once #pragma once


// //
// The Matrix classes
// ------------------
// Various math utility functions
// ——————————————————————————————
// //


#include <lol/math/functions.h> #include <lol/math/functions.h>


Loading…
Cancel
Save