+@@ -219,6 +218,8 @@
+ DrawingContext::draw_filled_rect(const Rect& rect, const Color& color,
+ int layer)
+ {
++ if(target != NORMAL) return;
++
+ DrawingRequest request;
+
+ request.type = FILLRECT;
+@@ -238,39 +239,20 @@
+ }
+
+ void
+-DrawingContext::get_light(const Vector& position, Color* color)
++DrawingContext::get_light(const Vector& , Color* color)
+ {
+- if( ambient_color.red == 1.0f && ambient_color.green == 1.0f
+- && ambient_color.blue == 1.0f ) {
+- *color = Color( 1.0f, 1.0f, 1.0f);
+- return;
++ static int i = 0;
++ i += 1; i &= 0xFFFF;
++ if (i & 0x8000) {
++ *color = Color(0.0f, 0.0f, 0.0f);
++ } else {
++ *color = Color(1.0f, 1.0f, 1.0f);
+ }
+- DrawingRequest request;
+- request.type = GETLIGHT;
+- request.pos = transform.apply(position);
+- request.layer = LAYER_GUI; //make sure all get_light requests are handled last.
+-
+- GetLightRequest* getlightrequest = new GetLightRequest;
+- getlightrequest->color_ptr = color;
+- request.request_data = getlightrequest;
+- lightmap_requests.push_back(request);
+ }
+
+ void
+-DrawingContext::get_light(DrawingRequest& request)
++DrawingContext::get_light(DrawingRequest& )
+ {
+- GetLightRequest* getlightrequest = (GetLightRequest*) request.request_data;
+-
+- float pixels[3];
+- for( int i = 0; i<3; i++)
+- pixels[i] = 0.0f; //set to black
+-
+- //TODO: hacky. Make coordinate conversion more generic
+- glReadPixels((GLint) request.pos.x / 4, 600-(GLint)request.pos.y / 4, 1, 1, GL_RGB, GL_FLOAT, pixels);
+- *(getlightrequest->color_ptr) = Color( pixels[0], pixels[1], pixels[2]);
+- //printf("get_light %f/%f r%f g%f b%f\n", request.pos.x, request.pos.y, pixels[0], pixels[1], pixels[2]);
+-
+- delete getlightrequest;
+ }
+
+ void
+@@ -288,6 +264,45 @@