Bläddra i källkod

Major header refactoring.

legacy
Sam Hocevar 4 år sedan
förälder
incheckning
9e982a51a7
61 ändrade filer med 148 tillägg och 158 borttagningar
  1. +1
    -1
      doc/samples/benchmark/real.cpp
  2. +1
    -1
      doc/samples/btphystest.cpp
  3. +1
    -1
      doc/samples/math/pi.cpp
  4. +1
    -1
      doc/samples/math/poly.cpp
  5. +3
    -2
      doc/samples/sandbox/sample.cpp
  6. +1
    -1
      doc/samples/simplex.cpp
  7. +1
    -1
      doc/tutorial/02_cube.cpp
  8. +4
    -4
      doc/tutorial/11_fractal.cpp
  9. +3
    -2
      doc/tutorial/16_movie.cpp
  10. +1
    -1
      lol-core
  11. +9
    -7
      src/application/android-app.h
  12. +9
    -7
      src/application/egl-app.h
  13. +2
    -2
      src/application/sdl-app.h
  14. +2
    -2
      src/base/log.cpp
  15. +2
    -2
      src/camera.h
  16. +1
    -1
      src/debug/lines.cpp
  17. +1
    -1
      src/engine/worldentity.h
  18. +1
    -2
      src/gpu/shader.cpp
  19. +2
    -2
      src/image/codec/imlib2-image.cpp
  20. +1
    -1
      src/image/filter/yuv.cpp
  21. +2
    -1
      src/lol/base/all.h
  22. +4
    -5
      src/lol/base/enum.h
  23. +2
    -3
      src/lol/base/log.h
  24. +9
    -7
      src/lol/debug/lines.h
  25. +1
    -1
      src/lol/gpu/vertexbuffer.h
  26. +1
    -1
      src/lol/image/image.h
  27. +1
    -1
      src/lol/image/resource.h
  28. +9
    -8
      src/numeric.h
  29. +1
    -1
      src/scene.h
  30. +1
    -1
      src/t/base/array.cpp
  31. +1
    -1
      src/t/base/avl_tree.cpp
  32. +1
    -1
      src/t/base/enum.cpp
  33. +2
    -3
      src/t/base/map.cpp
  34. +2
    -2
      src/t/base/string.cpp
  35. +5
    -5
      src/t/base/types.cpp
  36. +1
    -1
      src/t/entity/camera.cpp
  37. +2
    -2
      src/t/image/color.cpp
  38. +2
    -2
      src/t/image/image.cpp
  39. +1
    -1
      src/t/math/array2d.cpp
  40. +1
    -1
      src/t/math/array3d.cpp
  41. +1
    -1
      src/t/math/arraynd.cpp
  42. +2
    -2
      src/t/math/bigint.cpp
  43. +2
    -2
      src/t/math/box.cpp
  44. +2
    -2
      src/t/math/cmplx.cpp
  45. +4
    -4
      src/t/math/half.cpp
  46. +1
    -1
      src/t/math/interp.cpp
  47. +4
    -4
      src/t/math/matrix.cpp
  48. +2
    -2
      src/t/math/noise/simplex.cpp
  49. +2
    -2
      src/t/math/numbers.cpp
  50. +3
    -3
      src/t/math/polynomial.cpp
  51. +4
    -5
      src/t/math/quat.cpp
  52. +3
    -3
      src/t/math/rand.cpp
  53. +3
    -3
      src/t/math/real.cpp
  54. +4
    -4
      src/t/math/rotation.cpp
  55. +3
    -3
      src/t/math/sqt.cpp
  56. +2
    -17
      src/t/math/trig.cpp
  57. +2
    -2
      src/t/math/vector.cpp
  58. +2
    -2
      src/t/sys/thread.cpp
  59. +2
    -2
      src/t/sys/timer.cpp
  60. +2
    -2
      src/t/test-common.cpp
  61. +2
    -2
      src/utils.h

+ 1
- 1
doc/samples/benchmark/real.cpp Visa fil

@@ -17,7 +17,7 @@
#include <cstdio>

#include <lol/engine.h>
#include <lol/types/real.h>
#include <lol/real>

using namespace lol;



+ 1
- 1
doc/samples/btphystest.cpp Visa fil

@@ -16,7 +16,7 @@
#endif

#include <lol/engine.h>
#include <lol/image/color.h>
#include <lol/color>
#include "loldebug.h"

using namespace lol;


+ 1
- 1
doc/samples/math/pi.cpp Visa fil

@@ -18,7 +18,7 @@
#include <iomanip>

#include <lol/engine.h>
#include <lol/types/real.h>
#include <lol/real>

using lol::real;



+ 1
- 1
doc/samples/math/poly.cpp Visa fil

@@ -14,7 +14,7 @@
# include "config.h"
#endif

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

using namespace lol;



+ 3
- 2
doc/samples/sandbox/sample.cpp Visa fil

@@ -14,8 +14,9 @@
# include "config.h"
#endif

#include <lol/engine.h>
#include <lol/types/bigint.h>
#include <lol/engine.h> // FIXME: for now this is required for SDL_main
#include <lol/thread>
#include <lol/bigint>

using namespace lol;



+ 1
- 1
doc/samples/simplex.cpp Visa fil

@@ -16,7 +16,7 @@
#endif

#include <lol/engine.h>
#include <lol/math/noise.h>
#include <lol/noise>

using namespace lol;



+ 1
- 1
doc/tutorial/02_cube.cpp Visa fil

@@ -15,7 +15,7 @@
#endif

#include <lol/engine.h>
#include <lol/image/color.h>
#include <lol/color>
#include "loldebug.h"

using namespace lol;


+ 4
- 4
doc/tutorial/11_fractal.cpp Visa fil

@@ -18,10 +18,10 @@
#include <sstream>

#include <lol/engine.h>
#include <lol/types/real.h>
#include <lol/math/vector.h>
#include <lol/math/transform.h>
#include <lol/image/color.h>
#include <lol/real>
#include <lol/vector>
#include <lol/transform>
#include <lol/color>

#include "loldebug.h"



+ 3
- 2
doc/tutorial/16_movie.cpp Visa fil

@@ -1,7 +1,7 @@
//
// Lol Engine — GIF encoding sample
//
// Copyright © 2016—2019 Sam Hocevar <sam@hocevar.net>
// Copyright © 2016—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
@@ -15,8 +15,9 @@
#endif

#include <lol/engine.h>
#include <lol/vector>
#include <lol/noise>
#include <lol/image/movie.h>
#include <lol/math/noise.h>

int main(int argc, char **argv)
{


+ 1
- 1
lol-core

@@ -1 +1 @@
Subproject commit 342c9ea0fd04e69c086d090b7bede0413eb086f5
Subproject commit b85c7adfe6d9fe0779548736bf5140569e48e919

+ 9
- 7
src/application/android-app.h Visa fil

@@ -1,11 +1,13 @@
//
// Lol Engine
// Lol Engine
//
// Copyright: (c) 2010-2011 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
@@ -15,7 +17,7 @@
// --------------------
//

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

namespace lol
{


+ 9
- 7
src/application/egl-app.h Visa fil

@@ -1,11 +1,13 @@
//
// Lol Engine
// Lol Engine
//
// Copyright: (c) 2010-2011 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
@@ -15,7 +17,7 @@
// ----------------
//

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

namespace lol
{


+ 2
- 2
src/application/sdl-app.h Visa fil

@@ -1,7 +1,7 @@
//
// 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
// the extent permitted by applicable law. You can redistribute it
@@ -17,7 +17,7 @@
// ----------------
//

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

#if LOL_USE_SDL
# if HAVE_SDL2_SDL_H


+ 2
- 2
src/base/log.cpp Visa fil

@@ -1,7 +1,7 @@
//
// 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
// the extent permitted by applicable law. You can redistribute it
@@ -80,7 +80,7 @@ void msg::helper(message_type type, char const *fmt, va_list ap)
#if !defined LOL_BUILD_DEBUG && !_DEBUG
if (type == message_type::debug)
{
static bool const disable_debug = os::getenv("LOL_DEBUG").size() > 0;
static bool const disable_debug = sys::getenv("LOL_DEBUG").size() > 0;
if (disable_debug)
return;
}


+ 2
- 2
src/camera.h Visa fil

@@ -1,7 +1,7 @@
//
// Lol Engine
//
// Copyright © 2010—2018 Sam Hocevar <sam@hocevar.net>
// 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
@@ -17,7 +17,7 @@
// ----------------
//

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

#include "engine/worldentity.h"



+ 1
- 1
src/debug/lines.cpp Visa fil

@@ -11,7 +11,7 @@
//

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

namespace lol
{


+ 1
- 1
src/engine/worldentity.h Visa fil

@@ -17,7 +17,7 @@
// -----------------------
//

#include <lol/math/transform.h>
#include <lol/transform>
#include <../legacy/lol/math/geometry.h> // box3

#include "engine/entity.h"


+ 1
- 2
src/gpu/shader.cpp Visa fil

@@ -11,6 +11,7 @@
//

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

#include <string>
#include <memory>
@@ -25,8 +26,6 @@
# undef WIN32_LEAN_AND_MEAN
#endif

#include <lol/base/pegtl.h>

#include "lolgl.h"

// FIXME: fine-tune this define


+ 2
- 2
src/image/codec/imlib2-image.cpp Visa fil

@@ -83,7 +83,7 @@ ResourceCodecData *Imlib2ImageCodec::Load(std::string const &path)

for (int i = 0; i < size.x * size.y; i++)
{
if (os::is_big_endian())
if (sys::is_big_endian())
dstdata[i] = srcdata[i].argb;
else
dstdata[i] = srcdata[i].bgra;
@@ -113,7 +113,7 @@ bool Imlib2ImageCodec::Save(std::string const &path, ResourceCodecData *data)

for (int i = 0; i < size.x * size.y; i++)
{
if (os::is_big_endian())
if (sys::is_big_endian())
dstdata[i] = srcdata[i].argb;
else
dstdata[i] = srcdata[i].bgra;


+ 1
- 1
src/image/filter/yuv.cpp Visa fil

@@ -11,7 +11,7 @@
//

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

/*
* YUV conversion functions


+ 2
- 1
src/lol/base/all.h Visa fil

@@ -12,11 +12,12 @@

#pragma once

#include <lol/utils>

#include <../legacy/lol/base/types.h>
#include <lol/base/log.h>
#include <../legacy/lol/base/assert.h>
#include <lol/base/array.h>
#include <../legacy/lol/base/avl_tree.h>
#include <lol/base/utils.h>
#include <lol/base/enum.h>


+ 4
- 5
src/lol/base/enum.h Visa fil

@@ -1,7 +1,7 @@
//
// Lol Engine
//
// Copyright © 2010—2018 Sam Hocevar <sam@hocevar.net>
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// © 2013—2015 Guillaume Bittoun <guillaume.bittoun@gmail.com>
//
// Lol Engine is free software. It comes without any warranty, to
@@ -13,10 +13,9 @@

#pragma once

#include <lol/base/utils.h> // has_key()

#include <string>
#include <map>
#include <lol/utils> // has_key()
#include <string> // std::string
#include <map> // std::map

namespace lol
{


+ 2
- 3
src/lol/base/log.h Visa fil

@@ -18,9 +18,8 @@
// The central logging system.
//

#include <lol/base/private/features.h>

#include <cstdarg> // va_list
#include <lol/utils> // lol_attr_printf_format
#include <cstdarg> // va_list

namespace lol
{


+ 9
- 7
src/lol/debug/lines.h Visa fil

@@ -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
@@ -16,7 +18,7 @@
//

#include <../legacy/lol/math/geometry.h> // box3
#include <lol/math/vector.h> // vec3, vec4 etc.
#include <lol/vector> // vec3, vec4 etc.

#include <stdint.h>



+ 1
- 1
src/lol/gpu/vertexbuffer.h Visa fil

@@ -17,7 +17,7 @@
// ----------------------------------------------
//

#include <lol/types/half.h>
#include <lol/half>

#include <cstring>
#include <map>


+ 1
- 1
src/lol/image/image.h Visa fil

@@ -18,7 +18,7 @@
//

#include <../legacy/lol/math/arraynd.h>
#include <lol/math/vector.h>
#include <lol/vector>
#include <../legacy/lol/image/pixel.h>
#include <../legacy/lol/math/geometry.h> // ibox2



+ 1
- 1
src/lol/image/resource.h Visa fil

@@ -18,7 +18,7 @@
// ——————————————————
//

#include <lol/math/vector.h>
#include <lol/vector>
#include <../legacy/lol/math/geometry.h>
#include <lol/image/image.h>
#include <../legacy/lol/image/pixel.h>


+ 9
- 8
src/numeric.h Visa fil

@@ -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
@@ -15,8 +17,7 @@
// ------------------
//

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

#include <lol/math>
#include <cstdlib>
#include <stdint.h>



+ 1
- 1
src/scene.h Visa fil

@@ -24,7 +24,7 @@

#include <lol/gpu/renderer.h>
#include <lol/gpu/framebuffer.h>
#include <lol/base/thread.h>
#include <lol/thread>

#include <vector> // std::vector
#include <memory> // std::shared_ptr


+ 1
- 1
src/t/base/array.cpp Visa fil

@@ -14,7 +14,7 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/unit_test>
#include <lol/base/array.h>

namespace lol


+ 1
- 1
src/t/base/avl_tree.cpp Visa fil

@@ -15,7 +15,7 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/unit_test>
#include <../legacy/lol/base/avl_tree.h>

namespace lol


+ 1
- 1
src/t/base/enum.cpp Visa fil

@@ -14,7 +14,7 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/unit_test>
#include <lol/base/enum.h>

#include <string>


+ 2
- 3
src/t/base/map.cpp Visa fil

@@ -14,9 +14,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/base/utils.h>

#include <lol/unit_test>
#include <lol/utils>
#include <map>

namespace lol


+ 2
- 2
src/t/base/string.cpp Visa fil

@@ -15,8 +15,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/base/utils.h>
#include <lol/unit_test>
#include <lol/utils>

#include <string>



+ 5
- 5
src/t/base/types.cpp Visa fil

@@ -14,12 +14,12 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/unit_test>
#include <../legacy/lol/base/types.h>
#include <../legacy/lol/math/functions.h>
#include <lol/math/vector.h>
#include <lol/math/transform.h>
#include <lol/types/half.h>
#include <lol/math>
#include <lol/vector>
#include <lol/transform>
#include <lol/half>

namespace lol
{


+ 1
- 1
src/t/entity/camera.cpp Visa fil

@@ -15,7 +15,7 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/unit_test>
#include <lol/../camera.h>
#include <lol/../engine/ticker.h>



+ 2
- 2
src/t/image/color.cpp Visa fil

@@ -14,8 +14,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/image/color.h>
#include <lol/unit_test>
#include <lol/color>

namespace lol
{


+ 2
- 2
src/t/image/image.cpp Visa fil

@@ -14,8 +14,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/math/vector.h>
#include <lol/unit_test>
#include <lol/vector>
#include <lol/image/image.h>

namespace lol


+ 1
- 1
src/t/math/array2d.cpp Visa fil

@@ -14,7 +14,7 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/unit_test>
#include <../legacy/lol/math/arraynd.h>

namespace lol


+ 1
- 1
src/t/math/array3d.cpp Visa fil

@@ -14,7 +14,7 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/unit_test>
#include <../legacy/lol/math/arraynd.h>

namespace lol


+ 1
- 1
src/t/math/arraynd.cpp Visa fil

@@ -14,7 +14,7 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/unit_test>
#include <../legacy/lol/math/arraynd.h>

namespace lol


+ 2
- 2
src/t/math/bigint.cpp Visa fil

@@ -14,8 +14,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/types/bigint.h>
#include <lol/unit_test>
#include <lol/bigint>

namespace lol
{


+ 2
- 2
src/t/math/box.cpp Visa fil

@@ -14,8 +14,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/math/vector.h>
#include <lol/unit_test>
#include <lol/vector>
#include <../legacy/lol/math/geometry.h>

namespace lol


+ 2
- 2
src/t/math/cmplx.cpp Visa fil

@@ -14,8 +14,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/math/transform.h>
#include <lol/unit_test>
#include <lol/transform>

namespace lol
{


+ 4
- 4
src/t/math/half.cpp Visa fil

@@ -14,10 +14,10 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/types/half.h>
#include <lol/math/vector.h> // for the sizeof(f16vec2) etc. tests
#include <lol/math/transform.h> // for the sizeof(f16mat2) etc. tests
#include <lol/unit_test>
#include <lol/half>
#include <lol/vector> // for the sizeof(f16vec2) etc. tests
#include <lol/transform> // for the sizeof(f16mat2) etc. tests

namespace lol
{


+ 1
- 1
src/t/math/interp.cpp Visa fil

@@ -14,7 +14,7 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/unit_test>
#include <../legacy/lol/math/interp.h>

namespace lol


+ 4
- 4
src/t/math/matrix.cpp Visa fil

@@ -14,10 +14,10 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/math/vector.h> // vec_t
#include <lol/math/transform.h> // mat_t
#include <lol/math/rand.h> // lol::rand
#include <lol/unit_test>
#include <lol/math> // lol::rand
#include <lol/vector> // vec_t
#include <lol/transform> // mat_t

#include <cfloat> // FLT_MAX



+ 2
- 2
src/t/math/noise/simplex.cpp Visa fil

@@ -14,8 +14,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/math/noise.h>
#include <lol/unit_test>
#include <lol/noise>

namespace lol
{


+ 2
- 2
src/t/math/numbers.cpp Visa fil

@@ -14,8 +14,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <../legacy/lol/math/functions.h>
#include <lol/unit_test>
#include <lol/math>

namespace lol
{


+ 3
- 3
src/t/math/polynomial.cpp Visa fil

@@ -14,9 +14,9 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/types/real.h>
#include <lol/math/polynomial.h>
#include <lol/unit_test>
#include <lol/real>
#include <lol/math>

namespace lol
{


+ 4
- 5
src/t/math/quat.cpp Visa fil

@@ -14,11 +14,10 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/math/vector.h> // vec_t
#include <lol/math/transform.h> // quat_t
#include <lol/math/rand.h> // rand()
#include <../legacy/lol/math/functions.h> // radians()
#include <lol/unit_test>
#include <lol/vector> // vec_t
#include <lol/transform> // quat_t
#include <lol/math> // rand(), radians()

#include <cstring> // memset
#include <tuple> // std::tuple


+ 3
- 3
src/t/math/rand.cpp Visa fil

@@ -14,10 +14,10 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/math/rand.h>
#include <lol/unit_test>

#include <cfloat> // FLT_MAX
#include <lol/math> // lol::rand
#include <cfloat> // FLT_MAX

namespace lol
{


+ 3
- 3
src/t/math/real.cpp Visa fil

@@ -14,10 +14,10 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/types/real.h>
#include <lol/math/transform.h> // for rcmplx
#include <lol/unit_test>

#include <lol/real>
#include <lol/transform> // for rcmplx
#include <cmath>

namespace lol


+ 4
- 4
src/t/math/rotation.cpp Visa fil

@@ -14,10 +14,10 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/math/vector.h>
#include <lol/math/transform.h>
#include <../legacy/lol/math/functions.h>
#include <lol/unit_test>
#include <lol/vector>
#include <lol/transform>
#include <lol/math>

namespace lol
{


+ 3
- 3
src/t/math/sqt.cpp Visa fil

@@ -14,9 +14,9 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/math/vector.h>
#include <lol/math/transform.h>
#include <lol/unit_test>
#include <lol/vector>
#include <lol/transform>

namespace lol
{


+ 2
- 17
src/t/math/trig.cpp Visa fil

@@ -14,8 +14,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <../legacy/lol/math/functions.h>
#include <lol/unit_test>
#include <lol/math>

namespace lol
{
@@ -41,25 +41,10 @@ lolunit_declare_fixture(trig_test)
{
lolunit_assert_doubles_equal(radians(90), radians(90.0), 1e-5);

lolunit_assert_doubles_equal(radians((uint8_t)90), radians(90.0), 1e-5);
lolunit_assert_doubles_equal(radians((int8_t)90), radians(90.0), 1e-5);
lolunit_assert_doubles_equal(radians((uint16_t)90), radians(90.0), 1e-5);
lolunit_assert_doubles_equal(radians((int16_t)90), radians(90.0), 1e-5);
lolunit_assert_doubles_equal(radians((uint32_t)90), radians(90.0), 1e-5);
lolunit_assert_doubles_equal(radians((int32_t)90), radians(90.0), 1e-5);
lolunit_assert_doubles_equal(radians((uint64_t)90), radians(90.0), 1e-5);
lolunit_assert_doubles_equal(radians((int64_t)90), radians(90.0), 1e-5);

lolunit_assert_doubles_equal(degrees(1), degrees(1.0), 1e-5);

lolunit_assert_doubles_equal(degrees((uint8_t)1), degrees(1.0), 1e-5);
lolunit_assert_doubles_equal(degrees((int8_t)1), degrees(1.0), 1e-5);
lolunit_assert_doubles_equal(degrees((uint16_t)1), degrees(1.0), 1e-5);
lolunit_assert_doubles_equal(degrees((int16_t)1), degrees(1.0), 1e-5);
lolunit_assert_doubles_equal(degrees((uint32_t)1), degrees(1.0), 1e-5);
lolunit_assert_doubles_equal(degrees((int32_t)1), degrees(1.0), 1e-5);
lolunit_assert_doubles_equal(degrees((uint64_t)1), degrees(1.0), 1e-5);
lolunit_assert_doubles_equal(degrees((int64_t)1), degrees(1.0), 1e-5);
}
};



+ 2
- 2
src/t/math/vector.cpp Visa fil

@@ -14,8 +14,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/math/vector.h>
#include <lol/unit_test>
#include <lol/vector>

namespace lol
{


+ 2
- 2
src/t/sys/thread.cpp Visa fil

@@ -15,8 +15,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/base/thread.h>
#include <lol/unit_test>
#include <lol/thread>

namespace lol
{


+ 2
- 2
src/t/sys/timer.cpp Visa fil

@@ -14,8 +14,8 @@
# include "config.h"
#endif

#include <lol/base/lolunit.h>
#include <lol/base/thread.h>
#include <lol/unit_test>
#include <lol/thread>

namespace lol
{


+ 2
- 2
src/t/test-common.cpp Visa fil

@@ -14,8 +14,8 @@
# include "config.h"
#endif

#include <lol/engine.h> // this is required for SDL_main
#include <lol/base/lolunit.h>
#include <lol/engine.h> // FIXME: for now this is required for SDL_main
#include <lol/unit_test>

#include <cstdio>
#include <cstdlib>


+ 2
- 2
src/utils.h Visa fil

@@ -18,8 +18,8 @@
// -----------------------------------
//

#include <lol/base/utils.h>
#include <lol/math/rand.h>
#include <lol/utils>
#include <lol/math> // lol::rand

#include <string>



Laddar…
Avbryt
Spara