rnd-20090721-2-src
[rocksndiamonds.git] / src / game_sp / init.c
index 5a234b3c8150953f63b859d1aa1f174707e8d3f5..c1fbcc7bb222e9ecd9ad4d8ce9000784a4c25b50 100644 (file)
@@ -13,11 +13,20 @@ static void BlitScreenToBitmap_SP__Stage_Blt()
   BlitScreenToBitmap_SP(window);
 }
 
+static void init_struct_functions()
+{
+  Stage.Blt = &BlitScreenToBitmap_SP__Stage_Blt;
+
+  Stage.ScrollTo      = &DDScrollBuffer_ScrollTo;
+  Stage.ScrollTowards = &DDScrollBuffer_ScrollTowards;
+  Stage.SoftScrollTo  = &DDScrollBuffer_SoftScrollTo;
+
+  StretchedSprites.BltEx = &DDSpriteBuffer_BltEx;
+}
+
 void sp_open_all()
 {
-#if 1
-  printf("::: sp_open_all ...\n");
-#endif
+  init_struct_functions();
 
   Form_Load();
 
@@ -26,15 +35,7 @@ void sp_open_all()
   screenBitmap = CreateBitmap(MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY,
                               DEFAULT_DEPTH);
 
-  StretchedSprites.BltEx = &DDSpriteBuffer_BltEx;
-
   DDSpriteBuffer_CreateFromFile("[NONE]", 16, 16);
-
-  Stage.Blt = &BlitScreenToBitmap_SP__Stage_Blt;
-
-#if 1
-  printf("::: sp_open_all done\n");
-#endif
 }
 
 void sp_close_all()