// src/assets/obstacle_crawl_frames.h
#pragma once
#include <cstring>

// Crawl obstacle for CRAWL1 (2 lines tall)
static const char *OBSTACLE_CRAWL1_FRAME[] = {
    "#########",
    ".######",
    "..#####",
    "..####",
    "...###",
    "...###"
};

// Crawl obstacle for CRAWL2 (4 lines tall)
static const char *OBSTACLE_CRAWL2_FRAME[] = {
    "###",
    "###",
    "###",
    "###",
    "###",
    "###",
    "###",
    "###"
};

enum class CrawlObstacleType { Crawl1 = 0, Crawl2, COUNT };

static const char **OBSTACLE_CRAWL_FRAMES[] = { OBSTACLE_CRAWL1_FRAME, OBSTACLE_CRAWL2_FRAME };

// Crawl1 dimensions and collision
static const int OBSTACLE_CRAWL1_FRAME_HEIGHT = sizeof(OBSTACLE_CRAWL1_FRAME) / sizeof(OBSTACLE_CRAWL1_FRAME[0]);
static const int OBSTACLE_CRAWL1_FRAME_WIDTH = std::strlen(OBSTACLE_CRAWL1_FRAME[0]);
static const int OBSTACLE_CRAWL1_COLLISION_LEFT_OFFSET = 3;
static const int OBSTACLE_CRAWL1_COLLISION_RIGHT_OFFSET = 3;
static const int OBSTACLE_CRAWL1_COLLISION_WIDTH = OBSTACLE_CRAWL1_FRAME_WIDTH - (OBSTACLE_CRAWL1_COLLISION_LEFT_OFFSET + OBSTACLE_CRAWL1_COLLISION_RIGHT_OFFSET);
static const int OBSTACLE_CRAWL1_COLLISION_TOP_OFFSET = 4; // first 4 rows are just empty ('.')
// collision box height = bottom 2 rows
static const int OBSTACLE_CRAWL1_COLLISION_HEIGHT = 2;

// Crawl2 dimensions and collision
static const int OBSTACLE_CRAWL2_FRAME_HEIGHT = sizeof(OBSTACLE_CRAWL2_FRAME) / sizeof(OBSTACLE_CRAWL2_FRAME[0]);
static const int OBSTACLE_CRAWL2_FRAME_WIDTH = std::strlen(OBSTACLE_CRAWL2_FRAME[0]);
static const int OBSTACLE_CRAWL2_COLLISION_LEFT_OFFSET = 0;
static const int OBSTACLE_CRAWL2_COLLISION_RIGHT_OFFSET = 0;
static const int OBSTACLE_CRAWL2_COLLISION_WIDTH = OBSTACLE_CRAWL2_FRAME_WIDTH - (OBSTACLE_CRAWL2_COLLISION_LEFT_OFFSET + OBSTACLE_CRAWL2_COLLISION_RIGHT_OFFSET);
static const int OBSTACLE_CRAWL2_COLLISION_HEIGHT = OBSTACLE_CRAWL2_FRAME_HEIGHT;
