kubo/kubo_wall.h

31 lines
604 B
C

#ifndef KUBO_WALL_H
#define KUBO_WALL_H
#include <stdlib.h>
#include <raylib.h>
#include "kubo_dynarray.h"
#define KUBO_WALL_INIT_VERTICES 4
enum kubo_wall_state {
KUBO_WALL_INIT,
KUBO_WALL_DRAWING,
KUBO_WALL_DONE
};
KUBO_DYNARRAY_REGISTER(kubo_vector2_arr, Vector2)
struct kubo_wall {
struct kubo_vector2_arr vertices;
enum kubo_wall_state state;
};
struct kubo_wall *kubo_wall_init();
void kubo_wall_cleanup(struct kubo_wall *wall);
bool kubo_wall_add_vertex(struct kubo_wall *wall, Vector2 vec);
Vector2 kubo_wall_get_vertex(struct kubo_wall *wall, size_t index);
#endif