#pragma once

#include <stdint.h>
#include "demo/scene.hpp"
#include "physics/particle.hpp"

namespace demo {
  struct ballistics : scene {

    enum struct projectile_type {
      NONE,
      PISTOL,
      ARTILLERY,
      FIREBALL,
      LASER
    };

    struct projectile
    {
      physics::particle particle;
      projectile_type type;
      int32_t start_time;

      void draw(ta_parameter_writer& writer, const mat4x4& trans);
    };

    constexpr static int max_projectiles = 32;
    projectile projectiles[max_projectiles];
    projectile_type current_projectile_type;
    int32_t tick;

    mat4x4 init() override;
    void a() override;
    void x() override;
    void update() override;
    void draw(ta_parameter_writer& writer, const mat4x4& trans) override;
    void draw_hud(ta_parameter_writer& writer);
  };
};
