2.5 audio cleanup:
[blender.git] / source / blender / editors / screen / screen_edit.c
index 6da00f12a256d09e04b0246136a4642168c2f8f0..5519b2609a1494dda08edc354fee7278d5fcafa9 100644 (file)
@@ -54,6 +54,7 @@
 #include "ED_screen.h"
 #include "ED_screen_types.h"
 
+/* XXX actually should be not here... solve later */
 #include "wm_subwindow.h"
 
 #include "screen_intern.h"     /* own module include */
@@ -404,7 +405,7 @@ ScrArea *area_split(wmWindow *win, bScreen *sc, ScrArea *sa, char dir, float fac
 
 /* empty screen, with 1 dummy area without spacedata */
 /* uses window size */
-bScreen *screen_add(wmWindow *win, Scene *scene, char *name)
+bScreen *ED_screen_add(wmWindow *win, Scene *scene, char *name)
 {
        bScreen *sc;
        ScrVert *sv1, *sv2, *sv3, *sv4;
@@ -465,7 +466,6 @@ static void screen_copy(bScreen *to, bScreen *from)
                sa->spacedata.first= sa->spacedata.last= NULL;
                sa->regionbase.first= sa->regionbase.last= NULL;
                sa->actionzones.first= sa->actionzones.last= NULL;
-               sa->scriptlink.totscript= 0;
                
                area_copy_data(sa, saf, 0);
        }
@@ -920,7 +920,7 @@ bScreen *ED_screen_duplicate(wmWindow *win, bScreen *sc)
        if(sc->full != SCREENNORMAL) return NULL; /* XXX handle this case! */
        
        /* make new empty screen: */
-       newsc= screen_add(win, sc->scene, sc->id.name+2);
+       newsc= ED_screen_add(win, sc->scene, sc->id.name+2);
        /* copy all data */
        screen_copy(newsc, sc);
        /* set in window */
@@ -1341,8 +1341,6 @@ void ED_screen_set_scene(bContext *C, Scene *scene)
        
        ED_update_for_newframe(C, 1);
        
-//     set_radglobal();
-       
        /* complete redraw */
        WM_event_add_notifier(C, NC_WINDOW, NULL);
        
@@ -1407,7 +1405,7 @@ void ed_screen_fullarea(bContext *C, ScrArea *sa)
                
                oldscreen->full = SCREENFULL;
                
-               sc= screen_add(CTX_wm_window(C), CTX_data_scene(C), "temp");
+               sc= ED_screen_add(CTX_wm_window(C), CTX_data_scene(C), "temp");
                sc->full = SCREENFULL; // XXX
                
                /* timer */
@@ -1479,7 +1477,7 @@ void ED_screen_animation_timer(bContext *C, int redraws, int enable)
                screen->animtimer= WM_event_add_window_timer(win, TIMER0, (1.0/FPS));
                sad->ar= CTX_wm_region(C);
                sad->redraws= redraws;
-               sad->reverse= (enable < 0);
+               sad->flag= (enable < 0) ? ANIMPLAY_FLAG_REVERSE : 0;
                screen->animtimer->customdata= sad;
                
        }
@@ -1505,7 +1503,6 @@ unsigned int ED_screen_view3d_layers(bScreen *screen)
 
 
 /* results in fully updated anim system */
-/* in future sound should be on WM level, only 1 sound can play! */
 void ED_update_for_newframe(const bContext *C, int mute)
 {
        bScreen *screen= CTX_wm_screen(C);