Fix whitespace: Convert tabs to spaces and remove trailing whitespace.

This commit is contained in:
binary1248 2015-04-01 04:08:23 +02:00 committed by Lukas Dürrenberger
parent 075d7b3b50
commit e80bf0ba92
54 changed files with 262 additions and 262 deletions

View File

@ -29,9 +29,9 @@ IF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)
execute_process(COMMAND pkg-config --atleast-version=143 libudev RESULT_VARIABLE UDEV_STABLE) 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... # retvale is 0 of the condition is "true" so we need to negate the value...
if (UDEV_STABLE) if (UDEV_STABLE)
set(UDEV_STABLE 0) set(UDEV_STABLE 0)
else (UDEV_STABLE) else (UDEV_STABLE)
set(UDEV_STABLE 1) set(UDEV_STABLE 1)
endif (UDEV_STABLE) endif (UDEV_STABLE)
message(STATUS "libudev stable: ${UDEV_STABLE}") message(STATUS "libudev stable: ${UDEV_STABLE}")
ENDIF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR) ENDIF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)

View File

@ -51,7 +51,7 @@ int main(int argc, char *argv[])
} }
window.clear(sf::Color::White); window.clear(sf::Color::White);
window.draw(image); window.draw(image);
window.display(); window.display();
} }
} }

View File

@ -5,5 +5,5 @@ void main()
{ {
vec4 pixel = gl_Color; vec4 pixel = gl_Color;
pixel.a = blink_alpha; pixel.a = blink_alpha;
gl_FragColor = pixel; gl_FragColor = pixel;
} }

View File

@ -3,10 +3,10 @@ uniform float blur_radius;
void main() void main()
{ {
vec2 offx = vec2(blur_radius, 0.0); vec2 offx = vec2(blur_radius, 0.0);
vec2 offy = vec2(0.0, blur_radius); 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 + offx) * 2.0 + texture2D(texture, gl_TexCoord[0].xy + offx) * 2.0 +
texture2D(texture, gl_TexCoord[0].xy - offy) * 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 +
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);
} }

View File

@ -4,17 +4,17 @@ uniform float edge_threshold;
void main() void main()
{ {
const float offset = 1.0 / 512.0; const float offset = 1.0 / 512.0;
vec2 offx = vec2(offset, 0.0); vec2 offx = vec2(offset, 0.0);
vec2 offy = vec2(0.0, offset); 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 + 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 +
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) * -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 +
@ -28,5 +28,5 @@ void main()
pixel.rgb = vec3(0.0, 0.0, 0.0); pixel.rgb = vec3(0.0, 0.0, 0.0);
else else
pixel.a = edge_threshold; pixel.a = edge_threshold;
gl_FragColor = pixel; gl_FragColor = pixel;
} }

View File

@ -4,6 +4,6 @@ uniform float pixel_threshold;
void main() void main()
{ {
float factor = 1.0 / (pixel_threshold + 0.001); float factor = 1.0 / (pixel_threshold + 0.001);
vec2 pos = floor(gl_TexCoord[0].xy * factor + 0.5) / factor; vec2 pos = floor(gl_TexCoord[0].xy * factor + 0.5) / factor;
gl_FragColor = texture2D(texture, pos) * gl_Color; gl_FragColor = texture2D(texture, pos) * gl_Color;
} }

View File

@ -13,7 +13,7 @@ void main()
vertex.xy = storm_position + normalize(offset) * push_distance; vertex.xy = storm_position + normalize(offset) * push_distance;
} }
gl_Position = gl_ProjectionMatrix * vertex; gl_Position = gl_ProjectionMatrix * vertex;
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
gl_FrontColor = gl_Color; gl_FrontColor = gl_Color;
} }

View File

@ -9,7 +9,7 @@ void main()
vertex.y += sin(gl_Vertex.x * 0.02 + wave_phase * 2.4) * wave_amplitude.y 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; + cos(gl_Vertex.x * 0.02 + wave_phase * 5.2) * wave_amplitude.y * 0.3;
gl_Position = gl_ModelViewProjectionMatrix * vertex; gl_Position = gl_ModelViewProjectionMatrix * vertex;
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
gl_FrontColor = gl_Color; gl_FrontColor = gl_Color;
} }

View File

@ -174,10 +174,10 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
struct SensorEvent struct SensorEvent
{ {
Sensor::Type type; ///< Type of the sensor Sensor::Type type; ///< Type of the sensor
float x; ///< Current value of the sensor on X axis float x; ///< Current value of the sensor on X axis
float y; ///< Current value of the sensor on Y axis float y; ///< Current value of the sensor on Y axis
float z; ///< Current value of the sensor on Z axis float z; ///< Current value of the sensor on Z axis
}; };
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -74,9 +74,9 @@ bool SoundFileWriterFlac::open(const std::string& filename, unsigned int sampleR
} }
// Setup the encoder // Setup the encoder
FLAC__stream_encoder_set_channels(m_encoder, channelCount); FLAC__stream_encoder_set_channels(m_encoder, channelCount);
FLAC__stream_encoder_set_bits_per_sample(m_encoder, 16); FLAC__stream_encoder_set_bits_per_sample(m_encoder, 16);
FLAC__stream_encoder_set_sample_rate(m_encoder, sampleRate); FLAC__stream_encoder_set_sample_rate(m_encoder, sampleRate);
// Initialize the output stream // Initialize the output stream
if (FLAC__stream_encoder_init_file(m_encoder, filename.c_str(), NULL, NULL) != FLAC__STREAM_ENCODER_INIT_STATUS_OK) if (FLAC__stream_encoder_init_file(m_encoder, filename.c_str(), NULL, NULL) != FLAC__STREAM_ENCODER_INIT_STATUS_OK)

View File

@ -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 # from depending on shared libraries), we need a boostrap activity which
# will load our shared libraries manually # will load our shared libraries manually
if(SFML_OS_ANDROID) 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() endif()

View File

@ -171,7 +171,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+ (Class)layerClass + (Class)layerClass
{ {
return [CAEAGLLayer class]; return [CAEAGLLayer class];
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -181,7 +181,7 @@
self.contentScaleFactor = factor; self.contentScaleFactor = factor;
if (self) if (self)
{ {
self.context = NULL; self.context = NULL;
self.touches = [NSMutableArray array]; self.touches = [NSMutableArray array];
@ -199,7 +199,7 @@
self.multipleTouchEnabled = true; self.multipleTouchEnabled = true;
} }
return self; return self;
} }

View File

@ -14,23 +14,23 @@ export LDFLAGS=$7
if [ "$1" = "arm" ] if [ "$1" = "arm" ]
then then
ARCH=arm-linux ARCH=arm-linux
ANDROID_ABI=armeabi ANDROID_ABI=armeabi
elif [ "$1" = "arm-v7a" ] elif [ "$1" = "arm-v7a" ]
then then
ARCH=arm-linux ARCH=arm-linux
ANDROID_ABI=armeabi-v7a ANDROID_ABI=armeabi-v7a
elif [ "$1" = "x86" ] elif [ "$1" = "x86" ]
then then
ARCH=i686-linux ARCH=i686-linux
ANDROID_ABI=x86 ANDROID_ABI=x86
elif [ "$1" = "mips" ] elif [ "$1" = "mips" ]
then then
ARCH=mips-linux ARCH=mips-linux
ANDROID_ABI=mips ANDROID_ABI=mips
fi fi
HOST="--host=$ARCH" HOST="--host=$ARCH"

View File

@ -2,43 +2,43 @@
create_toolchain () { create_toolchain () {
# abort if already created # abort if already created
if [ -d "$PWD/toolchains/$2" ] if [ -d "$PWD/toolchains/$2" ]
then then
return return
fi fi
# save the working directory and move to the NDK directory # save the working directory and move to the NDK directory
WORKING_DIRECTORY=$PWD WORKING_DIRECTORY=$PWD
cd $NDK cd $NDK
# prepare the command according to chosen options # prepare the command according to chosen options
PLATFORM=--platform=android-$1 PLATFORM=--platform=android-$1
DIR=--install-dir=$WORKING_DIRECTORY/toolchains/$2 DIR=--install-dir=$WORKING_DIRECTORY/toolchains/$2
MAKE=$NDK/build/tools/make-standalone-toolchain.sh MAKE=$NDK/build/tools/make-standalone-toolchain.sh
if [ "$2" = "arm" ] if [ "$2" = "arm" ]
then then
TOOLCHAIN=--toolchain=arm-linux-androideabi-4.8 TOOLCHAIN=--toolchain=arm-linux-androideabi-4.8
elif [ "$2" = "x86" ] elif [ "$2" = "x86" ]
then then
TOOLCHAIN=--toolchain=x86-4.8 TOOLCHAIN=--toolchain=x86-4.8
elif [ "$2" = "mips" ] elif [ "$2" = "mips" ]
then then
TOOLCHAIN=--toolchain=mipsel-linux-android-4.8 TOOLCHAIN=--toolchain=mipsel-linux-android-4.8
else else
echo "Abort." echo "Abort."
exit 1 exit 1
fi fi
# create the standalone toolchain # create the standalone toolchain
$MAKE $PLATFORM $TOOLCHAIN $DIR --stl=libc++ $MAKE $PLATFORM $TOOLCHAIN $DIR --stl=libc++
# go back to our working directory # go back to our working directory
cd $WORKING_DIRECTORY cd $WORKING_DIRECTORY
# move linux/soundcard.h to sys/soundcard.h # 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 mv $PWD/toolchains/$2/sysroot/usr/include/linux/soundcard.h $PWD/toolchains/$2/sysroot/usr/include/sys
} }
create_toolchain 9 arm create_toolchain 9 arm

View File

@ -22,43 +22,43 @@ mkdir build
wget -nc -P src http://downloads.xiph.org/releases/flac/$FLAC.tar.gz wget -nc -P src http://downloads.xiph.org/releases/flac/$FLAC.tar.gz
if [ ! -d "$PWD/tmp/$FLAC" ] if [ ! -d "$PWD/tmp/$FLAC" ]
then then
tar -C build -xf src/$FLAC.tar.gz tar -C build -xf src/$FLAC.tar.gz
fi fi
wget -nc -P src http://downloads.xiph.org/releases/vorbis/$VORBIS.tar.gz wget -nc -P src http://downloads.xiph.org/releases/vorbis/$VORBIS.tar.gz
if [ ! -d "$PWD/tmp/$VORBIS" ] if [ ! -d "$PWD/tmp/$VORBIS" ]
then then
tar -C build -xf src/$VORBIS.tar.gz tar -C build -xf src/$VORBIS.tar.gz
fi fi
wget -nc -P src http://downloads.xiph.org/releases/ogg/$OGG.tar.gz wget -nc -P src http://downloads.xiph.org/releases/ogg/$OGG.tar.gz
if [ ! -d "$PWD/tmp/$OGG" ] if [ ! -d "$PWD/tmp/$OGG" ]
then then
tar -C build -xf src/$OGG.tar.gz tar -C build -xf src/$OGG.tar.gz
fi fi
wget -nc -P src http://www.mega-nerd.com/libsndfile/files/$SNDFILE.tar.gz wget -nc -P src http://www.mega-nerd.com/libsndfile/files/$SNDFILE.tar.gz
if [ ! -d "$PWD/tmp/$SNDFILE" ] if [ ! -d "$PWD/tmp/$SNDFILE" ]
then then
tar -C build -xf src/$SNDFILE.tar.gz tar -C build -xf src/$SNDFILE.tar.gz
fi fi
wget -nc -P src http://www.ijg.org/files/jpegsrc.v$JPEG_VERSION.tar.gz wget -nc -P src http://www.ijg.org/files/jpegsrc.v$JPEG_VERSION.tar.gz
if [ ! -d "$PWD/tmp/$JPEG" ] if [ ! -d "$PWD/tmp/$JPEG" ]
then then
tar -C build -xf src/jpegsrc.v$JPEG_VERSION.tar.gz tar -C build -xf src/jpegsrc.v$JPEG_VERSION.tar.gz
fi fi
wget -nc -P src http://download.savannah.gnu.org/releases/freetype/$FREETYPE.tar.gz wget -nc -P src http://download.savannah.gnu.org/releases/freetype/$FREETYPE.tar.gz
if [ ! -d "$PWD/tmp/$FREETYPE" ] if [ ! -d "$PWD/tmp/$FREETYPE" ]
then then
tar -C build -xf src/$FREETYPE.tar.gz tar -C build -xf src/$FREETYPE.tar.gz
fi fi
wget -nc -P src https://github.com/AerialX/openal-soft-android/archive/master.tar.gz wget -nc -P src https://github.com/AerialX/openal-soft-android/archive/master.tar.gz
if [ ! -d "$PWD/tmp/openal-soft-android-master" ] if [ ! -d "$PWD/tmp/openal-soft-android-master" ]
then then
tar -C build -xf src/master.tar.gz tar -C build -xf src/master.tar.gz
fi fi
patch build/openal-soft-android-master/CMakeLists.txt patches/remove-so-version-suffix.diff patch build/openal-soft-android-master/CMakeLists.txt patches/remove-so-version-suffix.diff

View File

@ -3,9 +3,9 @@
# Abort if no known installation of NDK # Abort if no known installation of NDK
if [ "$NDK" == "" ] if [ "$NDK" == "" ]
then then
echo "Where is the NDK location ?" echo "Where is the NDK location ?"
echo -n "NDK: "; read NDK echo -n "NDK: "; read NDK
export NDK=$NDK export NDK=$NDK
fi fi
export ANDROID_NDK=$NDK export ANDROID_NDK=$NDK
@ -13,9 +13,9 @@ export ANDROID_NDK=$NDK
# Abort if we don't know the Android CMake toolchain location # Abort if we don't know the Android CMake toolchain location
if [ "$ANDROID_CMAKE_TOOLCHAIN" == "" ] if [ "$ANDROID_CMAKE_TOOLCHAIN" == "" ]
then then
echo "Where is the Android CMake toolchain ?" echo "Where is the Android CMake toolchain ?"
echo -n "ANDROID_CMAKE_TOOLCHAIN: "; read ANDROID_CMAKE_TOOLCHAIN echo -n "ANDROID_CMAKE_TOOLCHAIN: "; read ANDROID_CMAKE_TOOLCHAIN
export ANDROID_CMAKE_TOOLCHAIN=$ANDROID_CMAKE_TOOLCHAIN export ANDROID_CMAKE_TOOLCHAIN=$ANDROID_CMAKE_TOOLCHAIN
fi fi
./clean_all.sh ./clean_all.sh

View File

@ -1,5 +1,5 @@
--- CMakeLists.txt.orig 2013-09-21 15:23:49.305453804 +0200 --- CMakeLists.txt.orig 2013-09-21 15:23:49.305453804 +0200
+++ CMakeLists.txt 2013-09-21 15:24:08.621454210 +0200 +++ CMakeLists.txt 2013-09-21 15:24:08.621454210 +0200
@@ -717,9 +717,7 @@ @@ -717,9 +717,7 @@
# Build a library # Build a library
ADD_LIBRARY(${LIBNAME} ${LIBTYPE} ${OPENAL_OBJS} ${ALC_OBJS}) ADD_LIBRARY(${LIBNAME} ${LIBTYPE} ${OPENAL_OBJS} ${ALC_OBJS})