painfull-success-cg/src/tiles.c

40 lines
942 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 "tiles.h"
2021-05-01 02:23:11 +02:00
#include "lazyint.h"
#include <gint/display.h>
2021-03-02 00:44:58 +01:00
2021-05-01 02:23:11 +02:00
u32
tile_color(tile_t tile)
{
2021-03-02 00:44:58 +01:00
int color = 0;
switch (tile) {
2021-05-01 02:23:11 +02:00
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;
2021-03-02 00:44:58 +01:00
}
return color;
}