painfull-success-cg/src/tiles.c

24 lines
879 B
C
Raw Normal View History

2021-03-02 11:17:40 +01:00
/* 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. */
2021-03-02 00:44:58 +01:00
#include <gint/display.h>
2021-03-04 10:38:50 +01:00
#include "lazyint.h"
2021-03-02 00:44:58 +01:00
#include "tiles.h"
2021-03-04 10:38:50 +01:00
u32 tile_color(tile_t tile) {
2021-03-02 00:44:58 +01:00
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;
2021-03-02 00:44:58 +01:00
}
return color;
}