Made level editor to use the draw_bg() that Ryan added to level. This way the backgro...
authorRicardo Cruz <rick2@aeiou.pt>
Sat, 15 May 2004 18:26:48 +0000 (18:26 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Sat, 15 May 2004 18:26:48 +0000 (18:26 +0000)
SVN-Revision: 1198

src/leveleditor.cpp

index d57b68c..9b4b100 100644 (file)
@@ -642,6 +642,7 @@ void apply_level_settings_menu()
 {
   int i;
   i = false;
+  le_level_changed = true;
 
   le_world->get_level()->name = level_settings_menu->get_item_by_id(MNID_NAME).input;
   le_world->get_level()->author = level_settings_menu->get_item_by_id(MNID_AUTHOR).input;
@@ -922,22 +923,14 @@ void le_drawinterface()
 
 void le_drawlevel()
 {
-  unsigned int y,x,s;
+  unsigned int y,x;
   Uint8 a;
 
   /* Draw the real background */
-  if(le_world->get_level()->bkgd_image[0] != '\0')
-  {
-    s = (int)((float)pos_x * ((float)le_world->get_level()->bkgd_speed/100.0f)) % screen->w;
-    le_world->get_level()->img_bkgd->draw_part(s,0,0,0,
-        le_world->get_level()->img_bkgd->w - s - 32, le_world->get_level()->img_bkgd->h);
-    le_world->get_level()->img_bkgd->draw_part(0,0,screen->w - s - 32 ,0,s,
-        le_world->get_level()->img_bkgd->h);
-  }
+  if (le_world->get_level()->img_bkgd)
+    le_world->get_level()->draw_bg();
   else
-  {
     drawgradient(le_world->get_level()->bkgd_top, le_world->get_level()->bkgd_bottom);
-  }
 
   if(le_current.IsTile())
   {