From 6d4cd2ea1acc07ad5a25a422f430fa1159a3e872 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Wed, 29 Dec 2010 15:26:47 +0200 Subject: A bit longer day and a bit shorter night. Client-side. --- src/main.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index f9022de64..a5b9ba0d5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -181,7 +181,9 @@ TODO: There has to be some better way to handle static objects than to TODO: When server sees that client is removing an inexistent block or adding a block to an existent position, resend the MapBlock. -TODO: Map generator: add other materials underground (mud) +TODO: When player dies, throw items on map + +TODO: Map generator version 2 Doing now: ====================================================================== @@ -2275,11 +2277,18 @@ int main(int argc, char *argv[]) camera->setAspectRatio((f32)screensize.X / (f32)screensize.Y); u32 daynight_ratio = client.getDayNightRatio(); - video::SColor bgcolor = video::SColor( + /*video::SColor bgcolor = video::SColor( 255, skycolor.getRed() * daynight_ratio / 1000, skycolor.getGreen() * daynight_ratio / 1000, - skycolor.getBlue() * daynight_ratio / 1000); + skycolor.getBlue() * daynight_ratio / 1000);*/ + + u8 l = decode_light((daynight_ratio * LIGHT_SUN) / 1000); + video::SColor bgcolor = video::SColor( + 255, + skycolor.getRed() * l / 255, + skycolor.getGreen() * l / 255, + skycolor.getBlue() * l / 255); /* Fog -- cgit v1.2.3