mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Move src/game/bezier.cpp/h
to src/base/bezier.cpp/h
As those functions are not game specific per se, they can be part of base instead. Closes #3334.
This commit is contained in:
parent
3d1583d9a5
commit
727b147268
|
@ -1686,6 +1686,8 @@ add_custom_command(OUTPUT "src/game/generated/wordlist.h"
|
||||||
|
|
||||||
# Sources
|
# Sources
|
||||||
set_src(BASE GLOB_RECURSE src/base
|
set_src(BASE GLOB_RECURSE src/base
|
||||||
|
bezier.cpp
|
||||||
|
bezier.h
|
||||||
color.h
|
color.h
|
||||||
detect.h
|
detect.h
|
||||||
dynamic.h
|
dynamic.h
|
||||||
|
@ -1824,8 +1826,6 @@ set_src(ENGINE_GFX GLOB src/engine/gfx
|
||||||
image_manipulation.h
|
image_manipulation.h
|
||||||
)
|
)
|
||||||
set_src(GAME_SHARED GLOB src/game
|
set_src(GAME_SHARED GLOB src/game
|
||||||
bezier.cpp
|
|
||||||
bezier.h
|
|
||||||
collision.cpp
|
collision.cpp
|
||||||
collision.h
|
collision.h
|
||||||
ddracechat.h
|
ddracechat.h
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef GAME_BEZIER_H
|
#ifndef BASE_BEZIER_H
|
||||||
#define GAME_BEZIER_H
|
#define BASE_BEZIER_H
|
||||||
|
|
||||||
// Evaluates the Bernstein polynomial of degree 3/a one-dimensional Bezier curve
|
// Evaluates the Bernstein polynomial of degree 3/a one-dimensional Bezier curve
|
||||||
//
|
//
|
||||||
|
@ -24,4 +24,4 @@ public:
|
||||||
static CCubicBezier With(float Start, float StartDerivative, float EndDerivative, float End);
|
static CCubicBezier With(float Start, float StartDerivative, float EndDerivative, float End);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GAME_BEZIER_H
|
#endif // BASE_BEZIER_H
|
|
@ -2,12 +2,12 @@
|
||||||
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
||||||
#ifndef GAME_CLIENT_COMPONENTS_CAMERA_H
|
#ifndef GAME_CLIENT_COMPONENTS_CAMERA_H
|
||||||
#define GAME_CLIENT_COMPONENTS_CAMERA_H
|
#define GAME_CLIENT_COMPONENTS_CAMERA_H
|
||||||
|
#include <base/bezier.h>
|
||||||
#include <base/vmath.h>
|
#include <base/vmath.h>
|
||||||
|
|
||||||
#include <engine/client.h>
|
#include <engine/client.h>
|
||||||
#include <engine/console.h>
|
#include <engine/console.h>
|
||||||
|
|
||||||
#include <game/bezier.h>
|
|
||||||
#include <game/client/component.h>
|
#include <game/client/component.h>
|
||||||
|
|
||||||
class CCamera : public CComponent
|
class CCamera : public CComponent
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include <game/bezier.h>
|
#include <base/bezier.h>
|
||||||
|
|
||||||
// Due to the implementation, derivatives must be divisible by 3 to be exactly
|
// Due to the implementation, derivatives must be divisible by 3 to be exactly
|
||||||
// represented.
|
// represented.
|
||||||
|
|
Loading…
Reference in a new issue