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:
Robert Müller 2022-09-24 20:53:59 +02:00
parent 3d1583d9a5
commit 727b147268
5 changed files with 7 additions and 7 deletions

View file

@ -1686,6 +1686,8 @@ add_custom_command(OUTPUT "src/game/generated/wordlist.h"
# Sources
set_src(BASE GLOB_RECURSE src/base
bezier.cpp
bezier.h
color.h
detect.h
dynamic.h
@ -1824,8 +1826,6 @@ set_src(ENGINE_GFX GLOB src/engine/gfx
image_manipulation.h
)
set_src(GAME_SHARED GLOB src/game
bezier.cpp
bezier.h
collision.cpp
collision.h
ddracechat.h

View file

@ -1,5 +1,5 @@
#ifndef GAME_BEZIER_H
#define GAME_BEZIER_H
#ifndef BASE_BEZIER_H
#define BASE_BEZIER_H
// 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);
};
#endif // GAME_BEZIER_H
#endif // BASE_BEZIER_H

View file

@ -2,12 +2,12 @@
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#ifndef GAME_CLIENT_COMPONENTS_CAMERA_H
#define GAME_CLIENT_COMPONENTS_CAMERA_H
#include <base/bezier.h>
#include <base/vmath.h>
#include <engine/client.h>
#include <engine/console.h>
#include <game/bezier.h>
#include <game/client/component.h>
class CCamera : public CComponent

View file

@ -1,7 +1,7 @@
#include "test.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
// represented.