Index: trunk/src/world_entities/scrolling_screen.cc
===================================================================
--- trunk/src/world_entities/scrolling_screen.cc	(revision 10467)
+++ trunk/src/world_entities/scrolling_screen.cc	(revision 10468)
@@ -26,7 +26,13 @@
 #include "camera.h"
 
+#include "script_class.h"
+
+
 ObjectListDefinition(ScrollingScreen);
 CREATE_FACTORY(ScrollingScreen);
 
+CREATE_SCRIPTABLE_CLASS(ScrollingScreen,
+                        addMethod("start", Executor0<ScrollingScreen, lua_State*>(&ScrollingScreen::start))
+                       );
 
 
@@ -58,4 +64,8 @@
 {}
 
+void ScrollingScreen::start()
+{
+  this->bRun = true;
+}
 
 /**
@@ -78,4 +88,5 @@
   this->ySize = 0.;
   this->mode = SCSC_VIEW;
+  this->bRun = false;
 }
 
@@ -119,4 +130,7 @@
 void ScrollingScreen::draw() const
 {
+
+  if( this->offset - this->ratio > 1.|| this->offset < -1. || !this->bRun)
+    return;
 
   if( this->mode == SCSC_FULL)
@@ -147,19 +161,19 @@
   glBegin(GL_QUADS);
 
-    // unten links
-    glTexCoord2f(0., 1.);
-    glVertex3f(0., -this->xSize*0.5, -this->ySize*0.5);
-
-    // unten rechts
-    glTexCoord2f(1., 1.);
-    glVertex3f(0., -this->xSize*0.5, this->ySize*0.5);
-
-    // oben rechts
-    glTexCoord2f(1., 0.);
-    glVertex3f(0., this->xSize*0.5, this->ySize*0.5);
-
-    // oben links
-    glTexCoord2f(0., 0.);
-    glVertex3f(0., this->xSize*0.5, -this->ySize*0.5);
+  // unten links
+  glTexCoord2f(0., 1.);
+  glVertex3f(0., -this->xSize*0.5, -this->ySize*0.5);
+
+  // unten rechts
+  glTexCoord2f(1., 1.);
+  glVertex3f(0., -this->xSize*0.5, this->ySize*0.5);
+
+  // oben rechts
+  glTexCoord2f(1., 0.);
+  glVertex3f(0., this->xSize*0.5, this->ySize*0.5);
+
+  // oben links
+  glTexCoord2f(0., 0.);
+  glVertex3f(0., this->xSize*0.5, -this->ySize*0.5);
 
   glEnd();
@@ -201,4 +215,5 @@
   }
 
+  float ratShift = 0.;
   float borderTex = this->offset + ratio;
   // we are above/below
@@ -206,22 +221,23 @@
   {
     borderTex = 1.0;
+    ratShift = 1. - (1.-offset)/ratio;
   }
 
   glBegin(GL_QUADS);
-    // unten links
-    glTexCoord2f(0., borderTex);
-    glVertex3f(0., -x*0.5, -y*0.5);
-
-    // unten rechts
-    glTexCoord2f(1., borderTex);
-    glVertex3f(0., -x*0.5, y*0.5);
-
-    // oben rechts
-    glTexCoord2f(1., this->offset);
-    glVertex3f(0., x*0.5, y*0.5);
-
-    // oben links
-    glTexCoord2f(0., this->offset);
-    glVertex3f(0., x*0.5, -y*0.5);
+  // unten links
+  glTexCoord2f(0., borderTex);
+  glVertex3f(0., -(x*0.5 - x*ratShift), -y*0.5);
+
+  // unten rechts
+  glTexCoord2f(1., borderTex);
+  glVertex3f(0., -(x*0.5 - x*ratShift), y*0.5);
+
+  // oben rechts
+  glTexCoord2f(1., this->offset);
+  glVertex3f(0., x*0.5, y*0.5);
+
+  // oben links
+  glTexCoord2f(0., this->offset);
+  glVertex3f(0., x*0.5, -y*0.5);
 
   glEnd();
@@ -238,34 +254,27 @@
 {
 
-    CameraMan* cm = State::getCameraman();
-    const Camera* cam = cm->getCurrentCam();
-    PNode* tar = cam->getTargetNode();
-
-    Vector dir = tar->getAbsCoor() - cam->getAbsCoor();
-    dir = dir.getNormalized();
-
-    float offset = 4.;
-
-    this->setAbsCoor( cam->getAbsCoor() + dir * offset);
-
-
-    Vector ddir = dir.cross( cam->getAbsDirV());
-    Quaternion q(ddir, cam->getAbsDirY());
-    this->setAbsDir( q);
-
-    // scroll the texture
-    this->offset += time * this->scrollingSpeed;
-    if( this->offset > 1.|| this->offset < -1.)
-      this->offset = 0.;
-
-/*    PRINTF(0)("offset %f, offset: %f\n", this->offset, time * this->scrollingSpeed);*/
-
-//     if( this->getParent() != cam)
-//     {
-//       this->setParent( cam);
-//       this->setRelCoor( 4.0, 0., 0.);
-//       this->setRelDir();
-//     }
-
+  if( !this->bRun)
+    return;
+
+  CameraMan* cm = State::getCameraman();
+  const Camera* cam = cm->getCurrentCam();
+  PNode* tar = cam->getTargetNode();
+
+  Vector dir = tar->getAbsCoor() - cam->getAbsCoor();
+  dir = dir.getNormalized();
+
+  float offset = 6.;
+
+  this->setAbsCoor( cam->getAbsCoor() + dir * offset);
+
+
+  Vector ddir = dir.cross( cam->getAbsDirV());
+  Quaternion q(ddir, cam->getAbsDirY());
+  this->setAbsDir( q);
+
+  // scroll the texture
+  this->offset += time * this->scrollingSpeed;
+  //     if( this->offset - this->ratio > 1.|| this->offset < -1.)
+  //       this->offset = 0.;
 
 }
@@ -273,9 +282,7 @@
 void ScrollingScreen::fadeIn(float speed)
 {
-
 }
 
 void ScrollingScreen::fadeOut(float speed)
 {
-
-}
+}
Index: trunk/src/world_entities/scrolling_screen.h
===================================================================
--- trunk/src/world_entities/scrolling_screen.h	(revision 10467)
+++ trunk/src/world_entities/scrolling_screen.h	(revision 10468)
@@ -27,4 +27,6 @@
   void init();
   virtual void loadParams(const TiXmlElement* root);
+
+  void start();
 
   void fadeIn(float speed);
@@ -61,4 +63,5 @@
   int             mode;
 
+  bool            bRun;
 };
 
