diff --git a/legacy/lol/algorithm/aabb_tree.h b/legacy/lol/algorithm/aabb_tree.h index e5178ddb..038988ec 100644 --- a/legacy/lol/algorithm/aabb_tree.h +++ b/legacy/lol/algorithm/aabb_tree.h @@ -1,7 +1,7 @@ // // Lol Engine // -// Copyright © 2010—2015 Sam Hocevar +// Copyright © 2010—2020 Sam Hocevar // © 2013—2015 Benjamin “Touky” Huet // // Lol Engine is free software. It comes without any warranty, to @@ -34,7 +34,7 @@ void DrawInner(TREE *tree, array &boxes, array &elements, array &leaves, int children, vec4 color) { - boxes.push(tree->GetAABB(), Color::white); + boxes.push(tree->GetAABB(), color::white); leaves.push(0, boxes.last().m1); while (leaves.count() > 0) { @@ -51,7 +51,7 @@ void DrawInner(TREE *tree, array &boxes, } } 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++) diff --git a/legacy/lol/base/avl_tree.h b/legacy/lol/base/avl_tree.h index a921dd64..9a4696d7 100644 --- a/legacy/lol/base/avl_tree.h +++ b/legacy/lol/base/avl_tree.h @@ -1,9 +1,9 @@ // // Lol Engine // -// Copyright © 2010-2015 Sam Hocevar -// © 2013-2015 Benjamin “Touky” Huet -// © 2013-2015 Guillaume Bittoun +// Copyright © 2010—2020 Sam Hocevar +// © 2013—2015 Benjamin “Touky” Huet +// © 2013—2015 Guillaume Bittoun // // Lol Engine is free software. It comes without any warranty, to // the extent permitted by applicable law. You can redistribute it @@ -14,11 +14,11 @@ #pragma once +#include + namespace lol { -#include - template class avl_tree { diff --git a/legacy/lol/base/types.h b/legacy/lol/base/types.h index 888eed33..a90e793f 100644 --- a/legacy/lol/base/types.h +++ b/legacy/lol/base/types.h @@ -1,11 +1,13 @@ // -// Lol Engine +// Lol Engine // -// Copyright: (c) 2010-2013 Sam Hocevar -// 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 +// +// 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 @@ -15,15 +17,12 @@ 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; -/* The “real” type used for real numbers. It’s a specialisation of the - * “Real” template class. */ -template class Real; -typedef Real real; +template class real_t; +typedef real_t real; -/* The “half” type used for 16-bit floating point numbers. */ class half; /* diff --git a/legacy/lol/image/pixel.h b/legacy/lol/image/pixel.h index 9ee21f35..497d4533 100644 --- a/legacy/lol/image/pixel.h +++ b/legacy/lol/image/pixel.h @@ -1,7 +1,7 @@ // // Lol Engine // -// Copyright © 2004—2015 Sam Hocevar +// Copyright © 2004—2020 Sam Hocevar // // Lol Engine is free software. It comes without any warranty, to // the extent permitted by applicable law. You can redistribute it @@ -17,7 +17,7 @@ // ------------------------- // -#include +#include <../legacy/lol/base/types.h> #include namespace lol diff --git a/legacy/lol/math/arraynd.h b/legacy/lol/math/arraynd.h index 5e126257..0cb2923d 100644 --- a/legacy/lol/math/arraynd.h +++ b/legacy/lol/math/arraynd.h @@ -1,7 +1,7 @@ // // Lol Engine // -// Copyright © 2010—2018 Sam Hocevar +// Copyright © 2010—2020 Sam Hocevar // © 2013—2014 Benjamin “Touky” Huet // © 2013—2014 Guillaume Bittoun // @@ -25,7 +25,7 @@ // #include -#include +#include <../legacy/lol/base/assert.h> #include #include diff --git a/legacy/lol/math/functions.h b/legacy/lol/math/functions.h index 68207b36..60ccd895 100644 --- a/legacy/lol/math/functions.h +++ b/legacy/lol/math/functions.h @@ -1,7 +1,7 @@ // // Lol Engine // -// Copyright © 2010—2019 Sam Hocevar +// Copyright © 2010—2020 Sam Hocevar // // Lol Engine is free software. It comes without any warranty, to // the extent permitted by applicable law. You can redistribute it @@ -18,6 +18,7 @@ // #include +#include <../legacy/lol/base/types.h> // ldouble #include #include diff --git a/legacy/lol/math/geometry.h b/legacy/lol/math/geometry.h index 030910d2..b18a37b4 100644 --- a/legacy/lol/math/geometry.h +++ b/legacy/lol/math/geometry.h @@ -19,6 +19,7 @@ // #include +#include // vec_t #include #include diff --git a/legacy/lol/math/interp.h b/legacy/lol/math/interp.h index 697e6f82..d49d0f67 100644 --- a/legacy/lol/math/interp.h +++ b/legacy/lol/math/interp.h @@ -1,15 +1,19 @@ // -// Lol Engine +// Lol Engine // -// Copyright: (c) 2010-2013 Sam Hocevar -// 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 +// +// 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 +#include <../legacy/lol/math/functions.h> + // // Interpolator classes // -------------------- diff --git a/legacy/lol/math/noise/gradient.h b/legacy/lol/math/noise/gradient.h index f2457d85..15788d6d 100644 --- a/legacy/lol/math/noise/gradient.h +++ b/legacy/lol/math/noise/gradient.h @@ -1,13 +1,15 @@ // -// Lol Engine +// Lol Engine // -// Copyright: (c) 2010-2014 Sam Hocevar -// (c) 2013-2014 Benjamin "Touky" Huet -// (c) 2013-2014 Guillaume Bittoun -// 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 +// © 2013—2015 Benjamin “Touky” Huet +// © 2013—2015 Guillaume Bittoun +// +// 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 diff --git a/legacy/lol/math/noise/perlin.h b/legacy/lol/math/noise/perlin.h index b53478fd..4b0c4c8c 100644 --- a/legacy/lol/math/noise/perlin.h +++ b/legacy/lol/math/noise/perlin.h @@ -1,18 +1,20 @@ // -// Lol Engine +// Lol Engine // -// Copyright: (c) 2010-2014 Sam Hocevar -// (c) 2013-2014 Benjamin "Touky" Huet -// (c) 2013-2014 Guillaume Bittoun -// 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 +// © 2013—2015 Benjamin “Touky” Huet +// © 2013—2015 Guillaume Bittoun +// +// 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 -#include +#include <../legacy/lol/math/noise/gradient.h> namespace lol { diff --git a/legacy/lol/math/noise/simplex.h b/legacy/lol/math/noise/simplex.h index 035a9f81..54ba3b72 100644 --- a/legacy/lol/math/noise/simplex.h +++ b/legacy/lol/math/noise/simplex.h @@ -14,7 +14,7 @@ #pragma once -#include +#include <../legacy/lol/math/noise/gradient.h> namespace lol { diff --git a/legacy/math/geometry.cpp b/legacy/math/geometry.cpp index 2568328a..228fbaa0 100644 --- a/legacy/math/geometry.cpp +++ b/legacy/math/geometry.cpp @@ -1,12 +1,14 @@ // -// Lol Engine +// Lol Engine // -// Copyright: (c) 2010-2013 Sam Hocevar -// (c) 2010-2013 Benjamin "Touky" Huet -// 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 +// © 2010—2013 Benjamin “Touky” Huet +// +// 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 diff --git a/legacy/numeric.h b/legacy/numeric.h index 66fa1388..6ecc2f5b 100644 --- a/legacy/numeric.h +++ b/legacy/numeric.h @@ -1,18 +1,20 @@ // -// Lol Engine +// Lol Engine // -// Copyright: (c) 2010-2013 Sam Hocevar -// 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 +// +// 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 // -// The Matrix classes -// ------------------ +// Various math utility functions +// —————————————————————————————— // #include