Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (23 sloc) 627 Bytes
/*
* Copyright (c) 2012 Evgeny Proydakov <lord.tiran@gmail.com>
*/
#ifndef _LIGHT_H_
#define _LIGHT_H_
#include "defines.h"
#define FLOOR_NULL 0
#define FLOOR_WHITE 1
#define FLOOR_BLACK 2
#define LIGHT_WHITE_MIN 6
#define LIGHT_WHITE_MAX 12
#define LIGHT_BLACK_MIN 0
#define LIGHT_BLACK_MAX 5
int floor_from_light(int light_value)
{
if(light_value >= LIGHT_WHITE_MIN && light_value <= LIGHT_WHITE_MAX)
return FLOOR_WHITE;
else if(light_value >= LIGHT_BLACK_MIN && light_value <= LIGHT_BLACK_MAX)
return FLOOR_BLACK;
else
return FLOOR_NULL;
}
#endif // _LIGHT_H_
Jump to Line
Something went wrong with that request. Please try again.