Cleanup light.h

This commit is contained in:
Alexander Batalov 2022-06-18 17:44:17 +03:00
parent c656668f57
commit dd2f882bc2
2 changed files with 6 additions and 10 deletions

View File

@ -1,17 +1,21 @@
#include "light.h"
#include "map_defs.h"
#include "perk.h"
#include "tile.h"
#include "object.h"
#include <math.h>
// 20% of max light per "Night Vision" rank
#define LIGHT_LEVEL_NIGHT_VISION_BONUS (65536 / 5)
// 0x51923C
int gLightLevel = LIGHT_LEVEL_MAX;
static int gLightLevel = LIGHT_LEVEL_MAX;
// light intensity per elevation per tile
// 0x59E994
int gLightIntensity[ELEVATION_COUNT][HEX_GRID_SIZE];
static int gLightIntensity[ELEVATION_COUNT][HEX_GRID_SIZE];
// 0x47A8F0
int lightInit()

View File

@ -1,19 +1,11 @@
#ifndef LIGHT_H
#define LIGHT_H
#include "map_defs.h"
#define LIGHT_LEVEL_MIN (65536 / 4)
#define LIGHT_LEVEL_MAX 65536
// 20% of max light per "Night Vision" rank
#define LIGHT_LEVEL_NIGHT_VISION_BONUS (65536 / 5)
typedef void AdjustLightIntensityProc(int elevation, int tile, int intensity);
extern int gLightLevel;
extern int gLightIntensity[ELEVATION_COUNT][HEX_GRID_SIZE];
int lightInit();
int lightGetLightLevel();
void lightSetLightLevel(int lightLevel, bool shouldUpdateScreen);