summaryrefslogtreecommitdiff
path: root/WorldSegment.cpp
diff options
context:
space:
mode:
authorJapa2010-05-16 09:02:17 +0000
committerJapa2010-05-16 09:02:17 +0000
commit2525b740d814f3ce8694effd840e6f30905d0d0a (patch)
tree49d17d27ec401b1883c06f17f7e4e04dab7a12b4 /WorldSegment.cpp
parent10376966821a08383a046bf9e3427913aea49f97 (diff)
downloadstonesense-2525b740d814f3ce8694effd840e6f30905d0d0a.tar.gz
stonesense-2525b740d814f3ce8694effd840e6f30905d0d0a.tar.bz2
stonesense-2525b740d814f3ce8694effd840e6f30905d0d0a.tar.xz
added a day/night cycle.
need to make it optional.
Diffstat (limited to 'WorldSegment.cpp')
-rw-r--r--WorldSegment.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/WorldSegment.cpp b/WorldSegment.cpp
index 94af9a0..29d0619 100644
--- a/WorldSegment.cpp
+++ b/WorldSegment.cpp
@@ -1,6 +1,7 @@
#include "common.h"
#include "WorldSegment.h"
#include "GUI.h"
+#include "ContentLoader.h"
ALLEGRO_BITMAP * level = 0;
@@ -187,6 +188,7 @@ void WorldSegment::drawAllBlocks(){
{
if (config.show_osd) DrawCurrentLevelOutline(true);
}
+ al_set_separate_blender(op, src, dst, alpha_op, alpha_src, alpha_dst, color*getDayShade(contentLoader.currentHour, contentLoader.currentTickRel));
al_hold_bitmap_drawing(true);
for(int32_t vsx=1; vsx < vsxmax; vsx++)
{
@@ -210,6 +212,7 @@ void WorldSegment::drawAllBlocks(){
}
}
al_hold_bitmap_drawing(false);
+ al_set_separate_blender(op, src, dst, alpha_op, alpha_src, alpha_dst, color);
al_hold_bitmap_drawing(true);
for(int32_t vsx=1; vsx < vsxmax; vsx++)
{