style cleanup: indentation
authorCampbell Barton <ideasman42@gmail.com>
Thu, 6 Sep 2012 02:20:03 +0000 (02:20 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 6 Sep 2012 02:20:03 +0000 (02:20 +0000)
intern/ghost/intern/GHOST_DisplayManagerCocoa.mm
source/blender/compositor/intern/COM_Converter.cpp
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

index 9050c3f946f3d6041e00b04f339e41cfc10b14ef..c5a2fecd3b87b078b446deef27095f3c1e310ff2 100644 (file)
@@ -101,7 +101,7 @@ GHOST_TSuccess GHOST_DisplayManagerCocoa::getCurrentDisplaySetting(GHOST_TUns8 d
        NSScreen *askedDisplay;
        
        GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCocoa::getCurrentDisplaySetting(): only main display is supported");
-    
+
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];     
 
        if (display == kMainDisplay) //Screen #0 may not be the main one
@@ -162,6 +162,6 @@ GHOST_TSuccess GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(GHOST_TUns8 d
 #endif // GHOST_DEBUG
 
        //CGDisplayErr err = ::CGDisplaySwitchToMode(m_displayIDs[display], displayModeValues);
-        
+
        return /*err == CGDisplayNoErr ?*/ GHOST_kSuccess /*: GHOST_kFailure*/;
 }
index d4fad80ed07d542fe1864350a1ed5405871f21c6..71067ac8f152f72f7c3553209ca4a4e073186d27 100644 (file)
@@ -500,7 +500,8 @@ void Converter::convertResolution(SocketConnection *connection, ExecutionSystem
                        system->addOperation(sxop);
                        system->addOperation(syop);
 
-                       unsigned int resolution[2] = {fromWidth, fromHeight};
+                       unsigned int resolution[2] = {fromOperation->getWidth(),
+                                                     fromOperation->getHeight()};
                        scaleOperation->setResolution(resolution);
                        sxop->setResolution(resolution);
                        syop->setResolution(resolution);
@@ -522,7 +523,8 @@ void Converter::convertResolution(SocketConnection *connection, ExecutionSystem
                system->addOperation(xop);
                system->addOperation(yop);
 
-               unsigned int resolution[2] = {toWidth, toHeight};
+               unsigned int resolution[2] = {toOperation->getWidth(),
+                                             toOperation->getHeight()};
                translateOperation->setResolution(resolution);
                xop->setResolution(resolution);
                yop->setResolution(resolution);
index ed8a6cc7220b0cbc2da6841616f4cc2bf8640a4b..3a06fe979e1cf9b5b907ff603811e304869e7d65 100644 (file)
@@ -125,68 +125,66 @@ static BlendFileData *load_game_data(char *filename)
        return bfd;
 }
 
-int BL_KetsjiNextFrame(struct KX_KetsjiEngine* ketsjiengine, struct bContext *C, struct wmWindow* win, struct Scene* scene, struct ARegion *ar,
-                    KX_BlenderKeyboardDevice* keyboarddevice, KX_BlenderMouseDevice* mousedevice, int draw_letterbox)
+int BL_KetsjiNextFrame(KX_KetsjiEngine *ketsjiengine, bContext *C, wmWindow *win, Scene *scene, ARegion *ar,
+                       KX_BlenderKeyboardDevice* keyboarddevice, KX_BlenderMouseDevice* mousedevice, int draw_letterbox)
 {
-    int exitrequested;
-
-    // first check if we want to exit
-    exitrequested = ketsjiengine->GetExitCode();
-
-    // kick the engine
-    bool render = ketsjiengine->NextFrame();
-
-    if (render)
-    {
-        if(draw_letterbox) {
-            // Clear screen to border color
-            // We do this here since we set the canvas to be within the frames. This means the engine
-            // itself is unaware of the extra space, so we clear the whole region for it.
-            glClearColor(scene->gm.framing.col[0], scene->gm.framing.col[1], scene->gm.framing.col[2], 1.0f);
-            glViewport(ar->winrct.xmin, ar->winrct.ymin,
+       int exitrequested;
+
+       // first check if we want to exit
+       exitrequested = ketsjiengine->GetExitCode();
+
+       // kick the engine
+       bool render = ketsjiengine->NextFrame();
+
+       if (render) {
+               if (draw_letterbox) {
+                       // Clear screen to border color
+                       // We do this here since we set the canvas to be within the frames. This means the engine
+                       // itself is unaware of the extra space, so we clear the whole region for it.
+                       glClearColor(scene->gm.framing.col[0], scene->gm.framing.col[1], scene->gm.framing.col[2], 1.0f);
+                       glViewport(ar->winrct.xmin, ar->winrct.ymin,
                                   BLI_RCT_SIZE_X(&ar->winrct), BLI_RCT_SIZE_Y(&ar->winrct));
-            glClear(GL_COLOR_BUFFER_BIT);
-        }
-
-        // render the frame
-        ketsjiengine->Render();
-    }
-
-    wm_window_process_events_nosleep();
-
-    // test for the ESC key
-    //XXX while (qtest())
-    while(wmEvent *event= (wmEvent *)win->queue.first)
-    {
-        short val = 0;
-        //unsigned short event = 0; //XXX extern_qread(&val);
-
-        if (keyboarddevice->ConvertBlenderEvent(event->type,event->val))
-            exitrequested = KX_EXIT_REQUEST_BLENDER_ESC;
-
-            /* Coordinate conversion... where
-            * should this really be?
-        */
-        if (event->type==MOUSEMOVE) {
-            /* Note, not nice! XXX 2.5 event hack */
-            val = event->x - ar->winrct.xmin;
-            mousedevice->ConvertBlenderEvent(MOUSEX, val);
-
-            val = ar->winy - (event->y - ar->winrct.ymin) - 1;
-            mousedevice->ConvertBlenderEvent(MOUSEY, val);
-        }
-        else {
-            mousedevice->ConvertBlenderEvent(event->type,event->val);
-        }
-
-        BLI_remlink(&win->queue, event);
-        wm_event_free(event);
-    }
-
-    if(win != CTX_wm_window(C)) {
-        exitrequested= KX_EXIT_REQUEST_OUTSIDE; /* window closed while bge runs */
-    }
-    return exitrequested;
+                       glClear(GL_COLOR_BUFFER_BIT);
+               }
+
+               // render the frame
+               ketsjiengine->Render();
+       }
+
+       wm_window_process_events_nosleep();
+
+       // test for the ESC key
+       //XXX while (qtest())
+       while (wmEvent *event= (wmEvent *)win->queue.first) {
+               short val = 0;
+               //unsigned short event = 0; //XXX extern_qread(&val);
+
+               if (keyboarddevice->ConvertBlenderEvent(event->type,event->val))
+                       exitrequested = KX_EXIT_REQUEST_BLENDER_ESC;
+
+               /* Coordinate conversion... where
+                * should this really be?
+                */
+               if (event->type == MOUSEMOVE) {
+                       /* Note, not nice! XXX 2.5 event hack */
+                       val = event->x - ar->winrct.xmin;
+                       mousedevice->ConvertBlenderEvent(MOUSEX, val);
+
+                       val = ar->winy - (event->y - ar->winrct.ymin) - 1;
+                       mousedevice->ConvertBlenderEvent(MOUSEY, val);
+               }
+               else {
+                       mousedevice->ConvertBlenderEvent(event->type,event->val);
+               }
+
+               BLI_remlink(&win->queue, event);
+               wm_event_free(event);
+       }
+
+       if (win != CTX_wm_window(C)) {
+               exitrequested= KX_EXIT_REQUEST_OUTSIDE; /* window closed while bge runs */
+       }
+       return exitrequested;
 }
 
 struct BL_KetsjiNextFrameState {
index 6e1e8f5a8ec389436104ce11777be01c6ba2fc38..d8b07fd50d9058a1323aee2908132d2db516bd62 100644 (file)
@@ -334,17 +334,16 @@ static BlendFileData *load_game_data(const char *progname, char *filename = NULL
 
 bool GPG_NextFrame(GHOST_ISystem* system, GPG_Application *app, int &exitcode, STR_String &exitstring, GlobalSettings *gs)
 {
-    bool run = true;
-    system->processEvents(false);
-    system->dispatchEvents();
+       bool run = true;
+       system->processEvents(false);
+       system->dispatchEvents();
        app->EngineNextFrame();
-    if ((exitcode = app->getExitRequested()))
-    {
-        run = false;
-        exitstring = app->getExitString();
-        *gs = *app->getGlobalSettings();
-    }
-    return run;
+       if ((exitcode = app->getExitRequested())) {
+               run = false;
+               exitstring = app->getExitString();
+               *gs = *app->getGlobalSettings();
+       }
+       return run;
 }
 
 struct GPG_NextFrameState {