mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Fix whitespace: Convert tabs to spaces and remove trailing whitespace.
This commit is contained in:
parent
075d7b3b50
commit
e80bf0ba92
@ -29,9 +29,9 @@ IF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)
|
||||
execute_process(COMMAND pkg-config --atleast-version=143 libudev RESULT_VARIABLE UDEV_STABLE)
|
||||
# retvale is 0 of the condition is "true" so we need to negate the value...
|
||||
if (UDEV_STABLE)
|
||||
set(UDEV_STABLE 0)
|
||||
set(UDEV_STABLE 0)
|
||||
else (UDEV_STABLE)
|
||||
set(UDEV_STABLE 1)
|
||||
set(UDEV_STABLE 1)
|
||||
endif (UDEV_STABLE)
|
||||
message(STATUS "libudev stable: ${UDEV_STABLE}")
|
||||
ENDIF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)
|
||||
|
@ -51,7 +51,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
window.clear(sf::Color::White);
|
||||
window.draw(image);
|
||||
window.draw(image);
|
||||
window.display();
|
||||
}
|
||||
}
|
||||
|
@ -5,5 +5,5 @@ void main()
|
||||
{
|
||||
vec4 pixel = gl_Color;
|
||||
pixel.a = blink_alpha;
|
||||
gl_FragColor = pixel;
|
||||
gl_FragColor = pixel;
|
||||
}
|
||||
|
@ -3,10 +3,10 @@ uniform float blur_radius;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 offx = vec2(blur_radius, 0.0);
|
||||
vec2 offy = vec2(0.0, blur_radius);
|
||||
vec2 offx = vec2(blur_radius, 0.0);
|
||||
vec2 offy = vec2(0.0, blur_radius);
|
||||
|
||||
vec4 pixel = texture2D(texture, gl_TexCoord[0].xy) * 4.0 +
|
||||
vec4 pixel = texture2D(texture, gl_TexCoord[0].xy) * 4.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy - offx) * 2.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy + offx) * 2.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy - offy) * 2.0 +
|
||||
@ -16,5 +16,5 @@ void main()
|
||||
texture2D(texture, gl_TexCoord[0].xy + offx - offy) * 1.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy + offx + offy) * 1.0;
|
||||
|
||||
gl_FragColor = gl_Color * (pixel / 16.0);
|
||||
gl_FragColor = gl_Color * (pixel / 16.0);
|
||||
}
|
||||
|
@ -4,17 +4,17 @@ uniform float edge_threshold;
|
||||
void main()
|
||||
{
|
||||
const float offset = 1.0 / 512.0;
|
||||
vec2 offx = vec2(offset, 0.0);
|
||||
vec2 offy = vec2(0.0, offset);
|
||||
vec2 offx = vec2(offset, 0.0);
|
||||
vec2 offy = vec2(0.0, offset);
|
||||
|
||||
vec4 hEdge = texture2D(texture, gl_TexCoord[0].xy - offy) * -2.0 +
|
||||
vec4 hEdge = texture2D(texture, gl_TexCoord[0].xy - offy) * -2.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy + offy) * 2.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy - offx - offy) * -1.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy - offx + offy) * 1.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy + offx - offy) * -1.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy + offx + offy) * 1.0;
|
||||
|
||||
vec4 vEdge = texture2D(texture, gl_TexCoord[0].xy - offx) * 2.0 +
|
||||
vec4 vEdge = texture2D(texture, gl_TexCoord[0].xy - offx) * 2.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy + offx) * -2.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy - offx - offy) * 1.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy - offx + offy) * -1.0 +
|
||||
@ -28,5 +28,5 @@ void main()
|
||||
pixel.rgb = vec3(0.0, 0.0, 0.0);
|
||||
else
|
||||
pixel.a = edge_threshold;
|
||||
gl_FragColor = pixel;
|
||||
gl_FragColor = pixel;
|
||||
}
|
||||
|
@ -4,6 +4,6 @@ uniform float pixel_threshold;
|
||||
void main()
|
||||
{
|
||||
float factor = 1.0 / (pixel_threshold + 0.001);
|
||||
vec2 pos = floor(gl_TexCoord[0].xy * factor + 0.5) / factor;
|
||||
gl_FragColor = texture2D(texture, pos) * gl_Color;
|
||||
vec2 pos = floor(gl_TexCoord[0].xy * factor + 0.5) / factor;
|
||||
gl_FragColor = texture2D(texture, pos) * gl_Color;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ void main()
|
||||
vertex.xy = storm_position + normalize(offset) * push_distance;
|
||||
}
|
||||
|
||||
gl_Position = gl_ProjectionMatrix * vertex;
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
gl_FrontColor = gl_Color;
|
||||
gl_Position = gl_ProjectionMatrix * vertex;
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
gl_FrontColor = gl_Color;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ void main()
|
||||
vertex.y += sin(gl_Vertex.x * 0.02 + wave_phase * 2.4) * wave_amplitude.y
|
||||
+ cos(gl_Vertex.x * 0.02 + wave_phase * 5.2) * wave_amplitude.y * 0.3;
|
||||
|
||||
gl_Position = gl_ModelViewProjectionMatrix * vertex;
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
gl_FrontColor = gl_Color;
|
||||
gl_Position = gl_ModelViewProjectionMatrix * vertex;
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
gl_FrontColor = gl_Color;
|
||||
}
|
||||
|
@ -174,10 +174,10 @@ public:
|
||||
////////////////////////////////////////////////////////////
|
||||
struct SensorEvent
|
||||
{
|
||||
Sensor::Type type; ///< Type of the sensor
|
||||
float x; ///< Current value of the sensor on X axis
|
||||
float y; ///< Current value of the sensor on Y axis
|
||||
float z; ///< Current value of the sensor on Z axis
|
||||
Sensor::Type type; ///< Type of the sensor
|
||||
float x; ///< Current value of the sensor on X axis
|
||||
float y; ///< Current value of the sensor on Y axis
|
||||
float z; ///< Current value of the sensor on Z axis
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -74,9 +74,9 @@ bool SoundFileWriterFlac::open(const std::string& filename, unsigned int sampleR
|
||||
}
|
||||
|
||||
// Setup the encoder
|
||||
FLAC__stream_encoder_set_channels(m_encoder, channelCount);
|
||||
FLAC__stream_encoder_set_bits_per_sample(m_encoder, 16);
|
||||
FLAC__stream_encoder_set_sample_rate(m_encoder, sampleRate);
|
||||
FLAC__stream_encoder_set_channels(m_encoder, channelCount);
|
||||
FLAC__stream_encoder_set_bits_per_sample(m_encoder, 16);
|
||||
FLAC__stream_encoder_set_sample_rate(m_encoder, sampleRate);
|
||||
|
||||
// Initialize the output stream
|
||||
if (FLAC__stream_encoder_init_file(m_encoder, filename.c_str(), NULL, NULL) != FLAC__STREAM_ENCODER_INIT_STATUS_OK)
|
||||
|
@ -33,5 +33,5 @@ install(TARGETS sfml-main ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT devel)
|
||||
# from depending on shared libraries), we need a boostrap activity which
|
||||
# will load our shared libraries manually
|
||||
if(SFML_OS_ANDROID)
|
||||
sfml_add_library(sfml-activity SOURCES ${PROJECT_SOURCE_DIR}/src/SFML/Main/SFMLActivity.cpp)
|
||||
sfml_add_library(sfml-activity SOURCES ${PROJECT_SOURCE_DIR}/src/SFML/Main/SFMLActivity.cpp)
|
||||
endif()
|
||||
|
@ -171,7 +171,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
+ (Class)layerClass
|
||||
{
|
||||
return [CAEAGLLayer class];
|
||||
return [CAEAGLLayer class];
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@ -181,7 +181,7 @@
|
||||
|
||||
self.contentScaleFactor = factor;
|
||||
|
||||
if (self)
|
||||
if (self)
|
||||
{
|
||||
self.context = NULL;
|
||||
self.touches = [NSMutableArray array];
|
||||
@ -199,7 +199,7 @@
|
||||
self.multipleTouchEnabled = true;
|
||||
}
|
||||
|
||||
return self;
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
|
@ -14,23 +14,23 @@ export LDFLAGS=$7
|
||||
|
||||
if [ "$1" = "arm" ]
|
||||
then
|
||||
ARCH=arm-linux
|
||||
ANDROID_ABI=armeabi
|
||||
ARCH=arm-linux
|
||||
ANDROID_ABI=armeabi
|
||||
|
||||
elif [ "$1" = "arm-v7a" ]
|
||||
then
|
||||
ARCH=arm-linux
|
||||
ANDROID_ABI=armeabi-v7a
|
||||
ARCH=arm-linux
|
||||
ANDROID_ABI=armeabi-v7a
|
||||
|
||||
elif [ "$1" = "x86" ]
|
||||
then
|
||||
ARCH=i686-linux
|
||||
ANDROID_ABI=x86
|
||||
ARCH=i686-linux
|
||||
ANDROID_ABI=x86
|
||||
|
||||
elif [ "$1" = "mips" ]
|
||||
then
|
||||
ARCH=mips-linux
|
||||
ANDROID_ABI=mips
|
||||
ARCH=mips-linux
|
||||
ANDROID_ABI=mips
|
||||
fi
|
||||
|
||||
HOST="--host=$ARCH"
|
||||
|
@ -2,43 +2,43 @@
|
||||
|
||||
create_toolchain () {
|
||||
|
||||
# abort if already created
|
||||
if [ -d "$PWD/toolchains/$2" ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
# abort if already created
|
||||
if [ -d "$PWD/toolchains/$2" ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
# save the working directory and move to the NDK directory
|
||||
WORKING_DIRECTORY=$PWD
|
||||
cd $NDK
|
||||
# save the working directory and move to the NDK directory
|
||||
WORKING_DIRECTORY=$PWD
|
||||
cd $NDK
|
||||
|
||||
# prepare the command according to chosen options
|
||||
PLATFORM=--platform=android-$1
|
||||
DIR=--install-dir=$WORKING_DIRECTORY/toolchains/$2
|
||||
MAKE=$NDK/build/tools/make-standalone-toolchain.sh
|
||||
# prepare the command according to chosen options
|
||||
PLATFORM=--platform=android-$1
|
||||
DIR=--install-dir=$WORKING_DIRECTORY/toolchains/$2
|
||||
MAKE=$NDK/build/tools/make-standalone-toolchain.sh
|
||||
|
||||
if [ "$2" = "arm" ]
|
||||
then
|
||||
TOOLCHAIN=--toolchain=arm-linux-androideabi-4.8
|
||||
elif [ "$2" = "x86" ]
|
||||
then
|
||||
TOOLCHAIN=--toolchain=x86-4.8
|
||||
elif [ "$2" = "mips" ]
|
||||
then
|
||||
TOOLCHAIN=--toolchain=mipsel-linux-android-4.8
|
||||
else
|
||||
echo "Abort."
|
||||
exit 1
|
||||
fi
|
||||
if [ "$2" = "arm" ]
|
||||
then
|
||||
TOOLCHAIN=--toolchain=arm-linux-androideabi-4.8
|
||||
elif [ "$2" = "x86" ]
|
||||
then
|
||||
TOOLCHAIN=--toolchain=x86-4.8
|
||||
elif [ "$2" = "mips" ]
|
||||
then
|
||||
TOOLCHAIN=--toolchain=mipsel-linux-android-4.8
|
||||
else
|
||||
echo "Abort."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# create the standalone toolchain
|
||||
$MAKE $PLATFORM $TOOLCHAIN $DIR --stl=libc++
|
||||
# create the standalone toolchain
|
||||
$MAKE $PLATFORM $TOOLCHAIN $DIR --stl=libc++
|
||||
|
||||
# go back to our working directory
|
||||
cd $WORKING_DIRECTORY
|
||||
# go back to our working directory
|
||||
cd $WORKING_DIRECTORY
|
||||
|
||||
# move linux/soundcard.h to sys/soundcard.h
|
||||
mv $PWD/toolchains/$2/sysroot/usr/include/linux/soundcard.h $PWD/toolchains/$2/sysroot/usr/include/sys
|
||||
# move linux/soundcard.h to sys/soundcard.h
|
||||
mv $PWD/toolchains/$2/sysroot/usr/include/linux/soundcard.h $PWD/toolchains/$2/sysroot/usr/include/sys
|
||||
}
|
||||
|
||||
create_toolchain 9 arm
|
||||
|
@ -22,43 +22,43 @@ mkdir build
|
||||
wget -nc -P src http://downloads.xiph.org/releases/flac/$FLAC.tar.gz
|
||||
if [ ! -d "$PWD/tmp/$FLAC" ]
|
||||
then
|
||||
tar -C build -xf src/$FLAC.tar.gz
|
||||
tar -C build -xf src/$FLAC.tar.gz
|
||||
fi
|
||||
|
||||
wget -nc -P src http://downloads.xiph.org/releases/vorbis/$VORBIS.tar.gz
|
||||
if [ ! -d "$PWD/tmp/$VORBIS" ]
|
||||
then
|
||||
tar -C build -xf src/$VORBIS.tar.gz
|
||||
tar -C build -xf src/$VORBIS.tar.gz
|
||||
fi
|
||||
|
||||
wget -nc -P src http://downloads.xiph.org/releases/ogg/$OGG.tar.gz
|
||||
if [ ! -d "$PWD/tmp/$OGG" ]
|
||||
then
|
||||
tar -C build -xf src/$OGG.tar.gz
|
||||
tar -C build -xf src/$OGG.tar.gz
|
||||
fi
|
||||
|
||||
wget -nc -P src http://www.mega-nerd.com/libsndfile/files/$SNDFILE.tar.gz
|
||||
if [ ! -d "$PWD/tmp/$SNDFILE" ]
|
||||
then
|
||||
tar -C build -xf src/$SNDFILE.tar.gz
|
||||
tar -C build -xf src/$SNDFILE.tar.gz
|
||||
fi
|
||||
|
||||
wget -nc -P src http://www.ijg.org/files/jpegsrc.v$JPEG_VERSION.tar.gz
|
||||
if [ ! -d "$PWD/tmp/$JPEG" ]
|
||||
then
|
||||
tar -C build -xf src/jpegsrc.v$JPEG_VERSION.tar.gz
|
||||
tar -C build -xf src/jpegsrc.v$JPEG_VERSION.tar.gz
|
||||
fi
|
||||
|
||||
wget -nc -P src http://download.savannah.gnu.org/releases/freetype/$FREETYPE.tar.gz
|
||||
if [ ! -d "$PWD/tmp/$FREETYPE" ]
|
||||
then
|
||||
tar -C build -xf src/$FREETYPE.tar.gz
|
||||
tar -C build -xf src/$FREETYPE.tar.gz
|
||||
fi
|
||||
|
||||
wget -nc -P src https://github.com/AerialX/openal-soft-android/archive/master.tar.gz
|
||||
if [ ! -d "$PWD/tmp/openal-soft-android-master" ]
|
||||
then
|
||||
tar -C build -xf src/master.tar.gz
|
||||
tar -C build -xf src/master.tar.gz
|
||||
fi
|
||||
|
||||
patch build/openal-soft-android-master/CMakeLists.txt patches/remove-so-version-suffix.diff
|
||||
|
@ -3,9 +3,9 @@
|
||||
# Abort if no known installation of NDK
|
||||
if [ "$NDK" == "" ]
|
||||
then
|
||||
echo "Where is the NDK location ?"
|
||||
echo -n "NDK: "; read NDK
|
||||
export NDK=$NDK
|
||||
echo "Where is the NDK location ?"
|
||||
echo -n "NDK: "; read NDK
|
||||
export NDK=$NDK
|
||||
fi
|
||||
|
||||
export ANDROID_NDK=$NDK
|
||||
@ -13,9 +13,9 @@ export ANDROID_NDK=$NDK
|
||||
# Abort if we don't know the Android CMake toolchain location
|
||||
if [ "$ANDROID_CMAKE_TOOLCHAIN" == "" ]
|
||||
then
|
||||
echo "Where is the Android CMake toolchain ?"
|
||||
echo -n "ANDROID_CMAKE_TOOLCHAIN: "; read ANDROID_CMAKE_TOOLCHAIN
|
||||
export ANDROID_CMAKE_TOOLCHAIN=$ANDROID_CMAKE_TOOLCHAIN
|
||||
echo "Where is the Android CMake toolchain ?"
|
||||
echo -n "ANDROID_CMAKE_TOOLCHAIN: "; read ANDROID_CMAKE_TOOLCHAIN
|
||||
export ANDROID_CMAKE_TOOLCHAIN=$ANDROID_CMAKE_TOOLCHAIN
|
||||
fi
|
||||
|
||||
./clean_all.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- CMakeLists.txt.orig 2013-09-21 15:23:49.305453804 +0200
|
||||
+++ CMakeLists.txt 2013-09-21 15:24:08.621454210 +0200
|
||||
--- CMakeLists.txt.orig 2013-09-21 15:23:49.305453804 +0200
|
||||
+++ CMakeLists.txt 2013-09-21 15:24:08.621454210 +0200
|
||||
@@ -717,9 +717,7 @@
|
||||
# Build a library
|
||||
ADD_LIBRARY(${LIBNAME} ${LIBTYPE} ${OPENAL_OBJS} ${ALC_OBJS})
|
||||
|
Loading…
Reference in New Issue
Block a user