40 lines
942 B
C
40 lines
942 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 "tiles.h"
|
|
#include "lazyint.h"
|
|
#include <gint/display.h>
|
|
|
|
u32
|
|
tile_color(tile_t tile)
|
|
{
|
|
int color = 0;
|
|
switch (tile) {
|
|
case AIR_TILE:
|
|
color = C_RGB(0 / 8, 0 / 8, 0 / 8);
|
|
break;
|
|
case SOLID_TILE:
|
|
color = C_RGB(10 / 8, 210 / 8, 180 / 8);
|
|
break;
|
|
case PAIN_TILE:
|
|
color = C_RGB(210 / 8, 10 / 8, 180 / 8);
|
|
break;
|
|
case SPAWN_TILE:
|
|
color = C_RGB(20 / 8, 220 / 8, 20 / 8);
|
|
break;
|
|
case EXIT_TILE:
|
|
color = C_RGB(250 / 8, 220 / 8, 10 / 8);
|
|
break;
|
|
case KEY_TILE:
|
|
color = C_RGB(210 / 8, 210 / 8, 210 / 8);
|
|
break;
|
|
case SEMI_SOLID_TILE:
|
|
color = C_RGB(5 / 8, 105 / 8, 90 / 8);
|
|
break;
|
|
}
|
|
return color;
|
|
}
|