(Accidentally sent previous commit without message... is same stuff)
authorTon Roosendaal <ton@blender.org>
Wed, 8 Jun 2005 18:55:49 +0000 (18:55 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 8 Jun 2005 18:55:49 +0000 (18:55 +0000)
gcc4 error fixes for compiling in OSX Tiger

Also; make using python framework default in makefiles

intern/SoundSystem/openal/SND_OpenALDevice.cpp
intern/bmfont/intern/BMF_BitmapFont.cpp
intern/ghost/intern/GHOST_WindowCarbon.cpp
source/blender/quicktime/quicktime_import.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp
source/nan_definitions.mk

index fdad75db767b2bf9544d8dfbba27323c7588d595..2a320568e2a31ee725b6b4b860c9301d47e62b70 100644 (file)
@@ -430,9 +430,9 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
                                else
                                {
 #ifdef __APPLE__
-                                       alutLoadWAVFile((signed char*)samplename.Ptr(), &sampleformat, &data, &numberofsamples, &samplerate);
+                                       alutLoadWAVFile((ALbyte *)samplename.Ptr(), &sampleformat, &data, &numberofsamples, &samplerate);
 #else
-                                       alutLoadWAVFile((signed char*)samplename.Ptr(), &sampleformat, &data, &numberofsamples, &samplerate, &loop);
+                                       alutLoadWAVFile((ALbyte *)samplename.Ptr(), &sampleformat, &data, &numberofsamples, &samplerate, &loop);
 #endif
                                        /* put it in the buffer */
                                        alBufferData(m_buffers[buffer], sampleformat, data, numberofsamples, samplerate);
index 521cd67a3251a59c07a93bf3774ff889f35d31bd..6af8e9eaa2cf06cf6ef2d9f3f5a7aa9b0bd2c88a 100644 (file)
@@ -76,7 +76,7 @@ static int is_a_really_crappy_nvidia_card(void) {
        
        /* Do you understand the implication? Do you? */
        if (well_is_it==-1) {
-               well_is_it= (strncmp(glGetString(GL_RENDERER), "NVIDIA GeForce 6800", 18) == 0);
+               well_is_it= (strncmp((char *)glGetString(GL_RENDERER), "NVIDIA GeForce 6800", 18) == 0);
        }
        return well_is_it;
 }
index ad19f08c950aa117929fa2a8ed3b0b1fd577ab66..bd271fd0c8dc0f2d5d3d53487b10efd43bfa4940 100644 (file)
@@ -115,8 +115,14 @@ GHOST_WindowCarbon::GHOST_WindowCarbon(
        
        //fprintf(stderr," main screen top %i left %i height %i width %i\n", top, left, height, width);
        
-       if (state >= 8 ) {
-               state = state - 8;
+       if (state >= GHOST_kWindowState8Normal ) {
+               if(state == GHOST_kWindowState8Normal) state= GHOST_kWindowStateNormal;
+               else if(state == GHOST_kWindowState8Maximized) state= GHOST_kWindowStateMaximized;
+               else if(state == GHOST_kWindowState8Minimized) state= GHOST_kWindowStateMinimized;
+               else if(state == GHOST_kWindowState8FullScreen) state= GHOST_kWindowStateFullScreen;
+               
+               // state = state - 8;   this was the simple version of above code, doesnt work in gcc 4.0
+               
                setMac_windowState(1);
        } else 
                setMac_windowState(0);
index 39434a92a852da201eec0f4739f268e893c10c5c..f8fe178a04f2971314a6e71a7af4285ac184db04 100644 (file)
@@ -49,6 +49,7 @@
 #ifdef _WIN32
 #include <Movies.h>
 #elif defined(__APPLE__)
+#import <Carbon/Carbon.h>
 #include <QuickTime/Movies.h>
 #endif
 #endif
index cd7fb7f2c45a1da0618fbdef8ef04a9bbd4f9ef7..cd37fbec502a80582cf6d23c9a6d0a69c7f4747b 100644 (file)
@@ -110,32 +110,32 @@ static OSStatus bglInitEntryPoints (void)
     err = FindFolder (kSystemDomain, kFrameworksFolderType, false,
                       &fileRefParam.ioVRefNum, &fileRefParam.ioDirID);
     if (noErr != err) {
-        DebugStr ("\pCould not find frameworks folder");
+        DebugStr ((unsigned char *)"\pCould not find frameworks folder");
         return err;
     }
     err = PBMakeFSRefSync (&fileRefParam); // make FSRef for folder
     if (noErr != err) {
-        DebugStr ("\pCould make FSref to frameworks folder");
+        DebugStr ((unsigned char *)"\pCould make FSref to frameworks folder");
         return err;
     }
     // create URL to folder
     bundleURLOpenGL = CFURLCreateFromFSRef (kCFAllocatorDefault,
                                             &fileRef);
     if (!bundleURLOpenGL) {
-        DebugStr ("\pCould create OpenGL Framework bundle URL");
+        DebugStr ((unsigned char *)"\pCould create OpenGL Framework bundle URL");
         return paramErr;
     }
     // create ref to GL's bundle
     gBundleRefOpenGL = CFBundleCreate (kCFAllocatorDefault,
                                        bundleURLOpenGL);
     if (!gBundleRefOpenGL) {
-        DebugStr ("\pCould not create OpenGL Framework bundle");
+        DebugStr ((unsigned char *)"\pCould not create OpenGL Framework bundle");
         return paramErr;
     }
     CFRelease (bundleURLOpenGL); // release created bundle
     // if the code was successfully loaded, look for our function.
     if (!CFBundleLoadExecutable (gBundleRefOpenGL)) {
-        DebugStr ("\pCould not load MachO executable");
+        DebugStr ((unsigned char *)"\pCould not load MachO executable");
         return paramErr;
     }
     return err;
index 83eb5c27abcea38aee590b14aa9b43d849f8747e..a01aa0c77e3a4f68eafd13685df3778895f1bb00 100644 (file)
@@ -139,7 +139,7 @@ endif
     export ID = $(shell whoami)
     export HOST = $(shell hostname -s)
 
-#    export PY_FRAMEWORK       = 1    
+    export PY_FRAMEWORK        = 1    
 
     ifdef PY_FRAMEWORK
        export NAN_PYTHON ?= /System/Library/Frameworks/Python.framework/Versions/2.3