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