mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
Merge #5875
5875: Move `src/game/bezier.cpp/h` to `src/base/bezier.cpp/h` r=def- a=Robyt3 As those functions are not game specific per se, they can be part of base instead. Closes #3334. <!-- What is the motivation for the changes of this pull request? --> <!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. --> ## Checklist - [X] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Robert Müller <robytemueller@gmail.com>
This commit is contained in:
commit
0f6594f10b
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue