painfull-success-cg/src/tiles.c

23 lines
811 B
C

/* SPDX-License-Identifier: MIT
* Copyright (c) 2021 KikooDX
* This file is part of
* [Painfull Success CG](https://git.sr.ht/~kikoodx/painfull-success-cg),
* which is MIT licensed. The MIT license requires this copyright notice to be
* included in all copies and substantial portions of the software. */
#include <gint/display.h>
#include "tiles.h"
int tile_color(tile_t tile) {
int color = 0;
switch (tile) {
case AIR_TILE: color = C_RGB(0, 0, 0); break;
case SOLID_TILE: color = C_RGB(10, 210, 180); break;
case PAIN_TILE: color = C_RGB(210, 10, 180); break;
case SPAWN_TILE: color = C_RGB(20, 220, 20); break;
case EXIT_TILE: color = C_RGB(250, 220, 10); break;
case KEY_TILE: color = C_RGB(210, 210, 210); break;
case SEMI_SOLID: color = C_RGB(5, 105, 90); break;
}
return color;
}