mirror of
https://github.com/Michael2-3B/Isometric-Minecraft-CE.git
synced 2024-11-12 01:20:47 +01:00
small lighting fix
This commit is contained in:
parent
baaf2a9a54
commit
4a556617ab
10
src/main.c
10
src/main.c
@ -489,11 +489,7 @@ void main(void) {
|
|||||||
srand(rtc_Time(NULL));
|
srand(rtc_Time(NULL));
|
||||||
|
|
||||||
worldTime = 0; //0 is day, 8 is night
|
worldTime = 0; //0 is day, 8 is night
|
||||||
if(worldTime == 0){
|
skyColor = worldTime+5;
|
||||||
skyColor = 5;
|
|
||||||
} else {
|
|
||||||
skyColor = 13;
|
|
||||||
}
|
|
||||||
|
|
||||||
dbg_sprintf(dbgout, "Beginning...\n");
|
dbg_sprintf(dbgout, "Beginning...\n");
|
||||||
|
|
||||||
@ -810,6 +806,8 @@ void generateMap(int mapNum){
|
|||||||
map[a][b][c] = DIRT;
|
map[a][b][c] = DIRT;
|
||||||
} else if(c==3){
|
} else if(c==3){
|
||||||
map[a][b][c] = GRASS_BLOCK;
|
map[a][b][c] = GRASS_BLOCK;
|
||||||
|
} else if(c==sizeY-1 && a>0 && a<sizeX-1 && b>0 && b<sizeZ-1){
|
||||||
|
map[a][b][c] = BRICK;
|
||||||
} else {
|
} else {
|
||||||
map[a][b][c] = AIR;
|
map[a][b][c] = AIR;
|
||||||
}
|
}
|
||||||
@ -992,7 +990,7 @@ int min(int n1, int n2){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int calculateBlockLight(int blockX, int blockZ, int blockY){
|
int calculateBlockLight(int blockX, int blockZ, int blockY){
|
||||||
return max(0, min(8, blockLightMap[blockX][blockZ][blockY] + skyLightMap[blockX][blockZ][blockY] - worldTime + brightness));
|
return max(0, min(8, max(blockLightMap[blockX][blockZ][blockY], skyLightMap[blockX][blockZ][blockY]-worldTime) + brightness));
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawMap(int startX, int startZ, int startY, int angle){
|
void drawMap(int startX, int startZ, int startY, int angle){
|
||||||
|
Loading…
Reference in New Issue
Block a user