Revision: 48486
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48486
Author:   campbellbarton
Date:     2012-07-02 09:07:34 +0000 (Mon, 02 Jul 2012)
Log Message:
-----------
code cleanup

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_playanim.c

Modified: 
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_playanim.c
===================================================================
--- branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_playanim.c  
2012-07-02 08:37:59 UTC (rev 48485)
+++ branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_playanim.c  
2012-07-02 09:07:34 UTC (rev 48486)
@@ -234,18 +234,17 @@
 
 static void build_pict_list(char *first, int totframes, int fstep)
 {
-       int size, pic, file;
        char *mem, filepath[FILE_MAX];
 //     short val;
        PlayAnimPict *picture = NULL;
        struct ImBuf *ibuf = NULL;
-       int count = 0;
        char str[32 + FILE_MAX];
        struct anim *anim;
 
        if (IMB_isanim(first)) {
                anim = IMB_open_anim(first, IB_rect, 0);
                if (anim) {
+                       int pic;
                        ibuf = IMB_anim_absolute(anim, 0, IMB_TC_NONE, 
IMB_PROXY_NONE);
                        if (ibuf) {
                                toscreen(NULL, ibuf);
@@ -267,6 +266,7 @@
                }
        }
        else {
+               int count = 0;
 
                BLI_strncpy(filepath, first, sizeof(filepath));
 
@@ -285,6 +285,9 @@
                 */
 
                while (IMB_ispic(filepath) && totframes) {
+                       size_t size;
+                       int file;
+
                        file = open(filepath, O_BINARY | O_RDONLY, 0);
                        if (file < 0) return;
                        picture = (PlayAnimPict 
*)MEM_callocN(sizeof(PlayAnimPict), "picture");
@@ -410,8 +413,8 @@
 
 void playanim(int argc, const char **argv)
 {
-       struct ImBuf *ibuf = 0;
-       PlayAnimPict *picture = 0;
+       struct ImBuf *ibuf = NULL;
+       PlayAnimPict *picture = NULL;
        char filepath[FILE_MAX];
        short val = 0, go = TRUE, ibufx = 0, ibufy = 0;
        int event, stopped = FALSE;
@@ -419,9 +422,9 @@
        /* short c233 = FALSE, yuvx = FALSE; */ /* UNUSED */
        short once = FALSE, sstep = FALSE, wait2 = FALSE, /*  resetmap = FALSE, 
*/ pause = 0;
        short pingpong = FALSE, direction = 1, next = 1, turbo = FALSE, /*  
doubleb = TRUE, */ noskip = FALSE;
-       int sizex, sizey, ofsx, ofsy, i;
+       int sizex, sizey, i;
        /* This was done to disambiguate the name for use under c++. */
-       struct anim *anim = 0;
+       struct anim *anim = NULL;
        int start_x = 0, start_y = 0;
        int sfra = -1;
        int efra = -1;
@@ -772,8 +775,6 @@
                                                        next = 0;
                                                }
                                                break;
-                                               go = FALSE;
-                                               break;
                                        case EQUALKEY:
                                                if (val) {
                                                        if (qualN & SHIFT) {
@@ -800,7 +801,7 @@
                                                if (val) {
                                                        if (once) once = wait2 
= FALSE;
                                                        else {
-                                                               picture = 0;
+                                                               picture = NULL;
                                                                once = TRUE;
                                                                wait2 = FALSE;
                                                        }
@@ -856,20 +857,24 @@
                                                zoomx += 2.0;
                                                zoomy += 2.0;
                                        case PADMINUS:
+                                       {
+                                               /* int ofsx, ofsy; */ /* UNUSED 
*/
+
                                                if (val == 0) break;
                                                if (zoomx > 1.0) zoomx -= 1.0;
                                                if (zoomy > 1.0) zoomy -= 1.0;
                                                // 
playanim_window_get_position(&ofsx, &ofsy);
                                                
playanim_window_get_size(&sizex, &sizey);
-                                               ofsx += sizex / 2;
-                                               ofsy += sizey / 2;
+                                               /* ofsx += sizex / 2; */ /* 
UNUSED */
+                                               /* ofsy += sizey / 2; */ /* 
UNUSED */
                                                sizex = zoomx * ibufx;
                                                sizey = zoomy * ibufy;
-                                               ofsx -= sizex / 2;
-                                               ofsy -= sizey / 2;
+                                               /* ofsx -= sizex / 2; */ /* 
UNUSED */
+                                               /* ofsy -= sizey / 2; */ /* 
UNUSED */
                                                // 
window_set_position(g_window,sizex,sizey);
                                                GHOST_SetClientSize(g_window, 
sizex, sizey);
                                                break;
+                                       }
                                        case RESHAPE:
                                        case REDRAW:
                                                
playanim_window_get_size(&sizey, &sizey);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to