Changeset 150

Show
Ignore:
Timestamp:
09/03/10 16:08:16 (17 months ago)
Author:
Carsten
Message:

Even more 64-bit Windows build fixes.
These changes complete the port of Cafu to 64-bit Windows! :-D

Location:
cafu/trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • cafu/trunk/Ca3DE/Cafu.rc

    r36 r150  
    3939        BEGIN 
    4040            VALUE "CompanyName", "Carsten Fuchs Software" 
    41             VALUE "FileDescription", "The Cafu Engine executable" 
     41            VALUE "FileDescription", "Cafu Engine" 
    4242            VALUE "FileVersion", "1.0.0.0" 
    4343            VALUE "InternalName", "Cafu" 
  • cafu/trunk/CaWE/CaWE.rc

    r36 r150  
    3939        BEGIN 
    4040            VALUE "CompanyName", "Carsten Fuchs Software" 
    41             VALUE "FileDescription", "The Cafu World Editor application" 
     41            VALUE "FileDescription", "CaWE - Cafu World Editor" 
    4242            VALUE "FileVersion", "1.0.0.0" 
    4343            VALUE "InternalName", "CaWE" 
  • cafu/trunk/Libs/Fonts/Font.cpp

    r144 r150  
    9898        const float Size  =16.0/256.0; 
    9999 
    100         TextMesh.Vertices[4*c+0].SetOrigin( 0+c*10,  0); TextMesh.Vertices[4*c+0].SetTextureCoord(CoordX     , CoordY     ); 
    101         TextMesh.Vertices[4*c+1].SetOrigin(16+c*10,  0); TextMesh.Vertices[4*c+1].SetTextureCoord(CoordX+Size, CoordY     ); 
    102         TextMesh.Vertices[4*c+2].SetOrigin(16+c*10, 16); TextMesh.Vertices[4*c+2].SetTextureCoord(CoordX+Size, CoordY+Size); 
    103         TextMesh.Vertices[4*c+3].SetOrigin( 0+c*10, 16); TextMesh.Vertices[4*c+3].SetTextureCoord(CoordX     , CoordY+Size); 
     100        // Under the LLP64 data model, the 64-bit Windows compilers warn that the conversion from 
     101        // size_t to unsigned long and size_t to double loses data, thus cast c to unsigned int here. 
     102        const unsigned int i=(unsigned int)c; 
     103 
     104        TextMesh.Vertices[4*i+0].SetOrigin( 0+i*10,  0); TextMesh.Vertices[4*i+0].SetTextureCoord(CoordX     , CoordY     ); 
     105        TextMesh.Vertices[4*i+1].SetOrigin(16+i*10,  0); TextMesh.Vertices[4*i+1].SetTextureCoord(CoordX+Size, CoordY     ); 
     106        TextMesh.Vertices[4*i+2].SetOrigin(16+i*10, 16); TextMesh.Vertices[4*i+2].SetTextureCoord(CoordX+Size, CoordY+Size); 
     107        TextMesh.Vertices[4*i+3].SetOrigin( 0+i*10, 16); TextMesh.Vertices[4*i+3].SetTextureCoord(CoordX     , CoordY+Size); 
    104108    } 
    105109 
  • cafu/trunk/Libs/PlatformAux.cpp

    r149 r150  
    182182    typedef MatSys::RendererI* (__stdcall *GetRendererT)(cf::ConsoleI* Console_, cf::FileSys::FileManI* FileMan_); 
    183183 
    184     #ifdef _WIN32 
     184    #if defined(_WIN32) && !defined(_WIN64) 
    185185        GetRendererT GetRendererFunc=(GetRendererT)GetProcAddress(OutRendererDLL, "_GetRenderer@8"); 
    186186    #else 
     
    279279    typedef MatSys::TextureMapManagerI* (__stdcall *GetTMMT)(); 
    280280 
    281     #ifdef _WIN32 
     281    #if defined(_WIN32) && !defined(_WIN64) 
    282282        GetTMMT GetTMM=(GetTMMT)GetProcAddress(RendererDLL, "_GetTextureMapManager@0"); 
    283283    #else 
     
    308308    typedef SoundSysI* (__stdcall *GetSoundSys)(cf::ConsoleI* Console_, cf::FileSys::FileManI* FileMan_); 
    309309 
    310     #ifdef _WIN32 
     310    #if defined(_WIN32) && !defined(_WIN64) 
    311311        GetSoundSys GetSoundSysFunc=(GetSoundSys)GetProcAddress(OutSoundSysDLL, "_GetSoundSys@8"); 
    312312    #else 
  • cafu/trunk/SConscript

    r149 r150  
    6363    wxPath="#/ExtLibs/wxWidgets"; 
    6464 
    65     wxEnv.Append(CPPPATH=[wxPath+'/include']) 
    66     wxEnv.Append(LIBS=Split("advapi32 comctl32 comdlg32 gdi32 ole32 oleaut32 opengl32 rpcrt4 shell32 user32 winspool wsock32")) 
    67  
    6865    # TODO: Move this into the SConstruct file (including the wx include path above). 
    6966    #   Note that we only (want to) determine the right library path matching the used compiler here. 
     
    8683        wxEnv.Append(CPPPATH=[wxPath+LibPath+"/mswu"]) 
    8784        wxEnv.Append(LIBS=Split("wxbase29u wxbase29u_net wxjpeg wxmsw29u_adv wxmsw29u_core wxmsw29u_gl wxmsw29u_aui wxmsw29u_propgrid wxregexu")) 
     85 
     86    wxEnv.Append(CPPPATH=[wxPath+'/include'])   # This must be appended *after* the LibPath-specific paths. 
     87    wxEnv.Append(LIBS=Split("advapi32 comctl32 comdlg32 gdi32 ole32 oleaut32 opengl32 rpcrt4 shell32 user32 winspool wsock32")) 
    8888 
    8989elif sys.platform=="linux2": 
  • cafu/trunk/SConstruct

    r140 r150  
    265265# debug builds are available (i.e. the code below fails if neither "d" nor "r" is in BVs). 
    266266if sys.platform=="win32": 
    267     envRelease.Install(".", ["#/ExtLibs/Cg/bin/cg.dll", "#/ExtLibs/Cg/bin/cgGL.dll"]); 
    268     envRelease.Install(".", ["#/ExtLibs/fmod/api/fmod.dll"]); 
     267    if envCommon["TARGET_ARCH"]=="x86": 
     268        envRelease.Install(".", ["#/ExtLibs/Cg/bin/cg.dll", "#/ExtLibs/Cg/bin/cgGL.dll"]); 
     269        envRelease.Install(".", ["#/ExtLibs/fmod/api/fmod.dll"]); 
     270    else: 
     271        envRelease.Install(".", ["#/ExtLibs/Cg/bin.x64/cg.dll", "#/ExtLibs/Cg/bin.x64/cgGL.dll"]); 
     272 
    269273    envRelease.Install(".", ["#/ExtLibs/openal-win/OpenAL32.dll", "#/ExtLibs/openal-win/wrap_oal.dll"]); 
    270274