This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "Allocator/Allocator.h" | |
#include "Closure/Function.h" | |
#include "LambdaView.h" | |
#include "Meta/MetaFunction.h" | |
#include "Meta/MetaFunctor.h" | |
#include "Meta/MetaParameterPack.h" | |
namespace SE { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline constexpr u64 _wyrot(u64 x) { | |
return (x >> 32) | (x << 32); | |
} | |
// 128bit multiply function. | |
inline constexpr void _wymum(u64 *A, u64 *B) { | |
#if defined(__SIZEOF_INT128__) | |
__uint128_t r = *A; | |
r *= *B; | |
*A = (u64)r; | |
*B = (u64)(r >> 64); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "Allocator/Allocator.h" | |
#include "Closure/Function.h" | |
#include "TypeMeta/TypeMeta.h" | |
namespace SE { | |
template<typename TAllocator> | |
class TTypeErasedArray; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Collision.h" | |
#include "Modules/DebugPrimitives/DebugPrimitives.h" | |
#include "Modules/Environment/Environment.h" | |
#include "Modules/Health/Health.h" | |
#include "Modules/Movement/Movement.h" | |
#include "Modules/Primitives/PrimitivesTypes.h" | |
#include "Modules/Transform/Transform.h" | |
namespace SE { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This class is at least 32 bytes long. | |
template<typename... Ts> | |
class cref { | |
public: | |
using TPrimaryType = Meta::TParameterPackFirstType<Ts...>; | |
cref() { | |
Clear(); | |
} | |
cref(entity_view InEntity) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static double accum = 0.0; | |
static ecs_time_t last_time; | |
static int counter = 0; | |
int ecs_term_finalize( | |
const ecs_world_t *world, | |
const char *name, | |
ecs_term_t *term) | |
{ | |
static bool initialized = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Main-threaded systems are always executed after the ECS tick, that's why such systems are listed in the end. | |
Impl::MultiThreadedSection([&]() { | |
/// Logic | |
Import<MLifespanSystemsMT>(ECS); | |
Import<MGeometryFluctuationSystemsMT>(ECS); | |
SetModuleEnabled<MGeometryFluctuationSystemsMT>(ECS, false); | |
// Update game state debug text. | |
Import<MGameStateSystemsMT>(ECS); | |
/// Physics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
int main() { | |
ofstream Out("Result.h"); | |
Out << "template<typename... Ts>\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "flecs.h" | |
#include "inttypes.h" | |
#include <atomic> | |
#include <cstdio> | |
#include <ctime> | |
constexpr int ENTITIES = 1000; | |
constexpr int MILLION = 1000000; | |
constexpr int SAMPLE_COUNT = 10000; | |
constexpr bool MILTI_THREADED = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "flecs.h" | |
#include "inttypes.h" | |
#include <cstdio> | |
#include <ctime> | |
#include <atomic> | |
constexpr int ENTITIES = 1000; | |
constexpr int MILLION = 1000000; | |
constexpr int SAMPLE_COUNT = 10000; | |
constexpr bool MILTI_THREADED = true; |
NewerOlder