hyperultra/src/exit.c

30 lines
559 B
C
Raw Normal View History

2023-03-17 20:51:15 +01:00
#include "exit.h"
#include "entity.h"
#include "game.h"
#include "cfg.h"
#include "lzy.h"
#include <string.h>
static void
exit_draw(Entity *this, Game *g)
{
(void)g;
LZY_DrawSetColor(BLACK);
LZY_DrawRect(this->pos[0] - this->width / 2,
this->pos[1] - this->height / 2,
this->width, this->height);
}
void
exit_init(Entity *this, int x, int y)
{
memset(this, 0, sizeof(*this));
this->pos[0] = x;
this->pos[1] = y;
this->type = ET_EXIT;
this->update = NULL;
this->draw = exit_draw;
this->width = 12;
this->height = 12;
}