player bounding box almost there

This commit is contained in:
Andrew Haynes Macbook
2026-01-23 09:22:39 -05:00
parent 06d3f27b1e
commit a3589fd93d
12 changed files with 679 additions and 490 deletions
+14 -8
View File
@@ -10,8 +10,7 @@
#define DEFAULT 1
#define PLATFORM1 2
#define CHECKERED 3
#include "globals.hpp"
#define BASE 4
#include <SFML/Graphics/Color.hpp>
#include <SFML/System/Vector2.hpp>
@@ -19,7 +18,10 @@
#include <string>
#include <vector>
struct ObjectData {
#include "globals.hpp"
struct ObjectData
{
sf::Vector2<float> size { TILESIZE, TILESIZE };
sf::Vector2<float> pos { TILESIZE, TILESIZE };
sf::Color interior_color { sf::Color::Black };
@@ -27,20 +29,24 @@ struct ObjectData {
float edge { -2.0f };
};
struct EntityData : ObjectData {
struct EntityData : ObjectData
{
sf::Vector2<float> velocity { 0, 0 };
};
struct PlayerData : EntityData {
float dash_length { 0.0f };
struct PlayerData : EntityData
{
float max_dash_acceleration { 0.0f };
float max_vertical_acceleration { 0.0f };
};
struct LevelData {
struct LevelData
{
std::array<std::array<char, MAX_COLS>, MAX_ROWS> data {};
};
struct TimerData {
struct TimerData
{
std::string name { "NULL" };
float max_time { 1.f };
};