Files
ogre-prototype/src/gamedata/Components.h
2025-12-27 16:05:32 +03:00

83 lines
1.3 KiB
C++

#ifndef COMPONENTS_H_
#define COMPONENTS_H_
#include <flecs.h>
#include <Ogre.h>
namespace Ogre
{
class ImGuiOverlay;
}
namespace OgreBites
{
class ApplicationContextSDL;
class InputListenerChain;
class InputListener;
}
namespace ECS
{
struct GameData {
int tmp;
};
struct EngineData {
Ogre::SceneManager *mScnMgr;
float delta;
float startupDelay;
int width;
int height;
bool enableDbgDraw;
};
struct Vector3 {
float x;
float y;
float z;
bool zeroLength() const;
};
struct Vector2 {
float x, y;
};
struct Input {
uint32_t control;
uint32_t control_prev;
Vector3 motion;
Vector2 mouse;
Vector2 mouse_abs;
float wheel_y;
bool mouse_moved;
bool wheel_moved;
bool fast;
bool act;
bool act_pressed;
bool act2;
bool act2_pressed;
Input()
: control(0)
, control_prev(0)
, motion({ 0, 0, 0 })
, fast(false)
{
}
};
struct Camera {
Ogre::SceneNode *mCameraNode;
Ogre::Camera *mCamera;
bool configured;
Ogre::SceneNode *mCameraPivot;
Ogre::SceneNode *mCameraGoal;
Ogre::Real mPivotPitch;
};
struct RenderWindow {
Ogre::RenderWindow *window;
float dpi;
};
struct CollisionShape {
void *shape;
};
struct GroundCheckReady {};
struct Body2Entity {
/* std::unordered_map<btCollisionObject *, flecs::entity> entities; */
};
struct EditorSceneSwitch {
int scene;
};
}
#endif