# HG changeset patch # User koda # Date 1246920393 0 # Node ID d6963f72d21a657a522c9f348f4bb9be00883f10 # Parent 081081a61a16ef127498d701b4c677dc9cfedfb5 once again, trying to restore windows compatibility from nemo's experiments diff -r 081081a61a16 -r d6963f72d21a QTfrontend/CMakeLists.txt --- a/QTfrontend/CMakeLists.txt Mon Jul 06 11:37:03 2009 +0000 +++ b/QTfrontend/CMakeLists.txt Mon Jul 06 22:46:33 2009 +0000 @@ -171,23 +171,22 @@ openalbridge ) -#since openalbridge is linked statically with non-m$ compilers we need to explicitly link dependencies -#moreover in windows they need to be compiled in a particular order -if(NOT MSVC AND NOT APPLE) +#openalbridge is linked statically in unix, dynamically in windows; for static we need to explicitly link dependencies -- if we ever change this remember that in windows library order counts +if(NOT WIN32 AND NOT APPLE) set(HW_LINK_LIBS + ${HW_LINK_LIBS} ${OPENAL_LIBRARY} + ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY} - ${OGG_LIBRARY} - ${HW_LINK_LIBS} ) -endif(NOT MSVC AND NOT APPLE) -#no vorbisfile required here +endif() +#no vorbisfile required for MacOS X if(APPLE) set(HW_LINK_LIBS ${OPENAL_LIBRARY} + ${OGG_LIBRARY} ${VORBIS_LIBRARY} - ${OGG_LIBRARY} ${HW_LINK_LIBS} ) endif(APPLE) diff -r 081081a61a16 -r d6963f72d21a hedgewars/uSound.pas --- a/hedgewars/uSound.pas Mon Jul 06 11:37:03 2009 +0000 +++ b/hedgewars/uSound.pas Mon Jul 06 22:46:33 2009 +0000 @@ -27,7 +27,12 @@ {$linkframework Vorbis} {$ELSE} {$IFNDEF MSVC} + {$linklib openalbridge} +{$IFNDEF WIN32} {$linklib openal} +{$ELSE} + {$linklib openal32} +{$ENDIF} {$linklib ogg} {$linklib vorbis} {$linklib vorbisfile} @@ -43,7 +48,7 @@ chunks: array [TSound] of LongInt; end; -const OpenALBridge = 'openalbridge'; +const OpenALBridge = 'libopenalbridge'; procedure InitSound; procedure ReleaseSound; @@ -74,7 +79,7 @@ implementation -uses uMisc, uConsole, uStore; +uses uMisc, uConsole; const chanTPU = 12; var lastChan: array [TSound] of LongInt; @@ -148,8 +153,6 @@ else WriteLnToConsole(msgOK) end; - -AddProgress; end; procedure PlaySound(snd: TSound; infinite: boolean; voicepack: PVoicepack); diff -r 081081a61a16 -r d6963f72d21a hedgewars/uStore.pas --- a/hedgewars/uStore.pas Mon Jul 06 11:37:03 2009 +0000 +++ b/hedgewars/uStore.pas Mon Jul 06 22:46:33 2009 +0000 @@ -526,10 +526,7 @@ procedure DrawSpriteClipped(Sprite: TSprite; X, Y, TopY, RightX, BottomY, LeftX: LongInt); var r: TSDL_Rect; - numFramesFirstCol: LongInt; begin -numFramesFirstCol:= SpritesData[Sprite].imageHeight div SpritesData[Sprite].Height; - r.x:= 0; r.y:= 0; r.w:= SpritesData[Sprite].Width; @@ -547,6 +544,7 @@ dec(r.h, r.y); dec(r.w, r.x); + DrawFromRect(X + r.x, Y + r.y, @r, SpritesData[Sprite].Texture) end; diff -r 081081a61a16 -r d6963f72d21a openalbridge/CMakeLists.txt --- a/openalbridge/CMakeLists.txt Mon Jul 06 11:37:03 2009 +0000 +++ b/openalbridge/CMakeLists.txt Mon Jul 06 22:46:33 2009 +0000 @@ -19,8 +19,8 @@ #build a static library for human systems set (build_type STATIC) -#visualstudio doesn't like static linking, so we're building a shared library just for it -if(MSVC) +#visualstudio and windows in general doesn't like static linking, so we're building the library in shared mode +if(WIN32) #workaround for visualstudio (wants headers in the source list) set(openal_src openalwrap.h loaders.h endianness.h wrappers.h globals.h oggvorbis.h ${openal_src} @@ -32,7 +32,7 @@ link_libraries(${VORBISFILE_LIBRARY}) #build a shared library set (build_type SHARED) -endif(MSVC) +endif() #compiles and links actual library add_library (openalbridge ${build_type} ${openal_src})