Fix whitespace: Convert tabs to spaces and remove trailing whitespace.
This commit is contained in:
parent
075d7b3b50
commit
e80bf0ba92
54 changed files with 262 additions and 262 deletions
|
@ -19,8 +19,8 @@
|
|||
android:label="@string/app_name"
|
||||
android:icon="@drawable/sfml_logo"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize">
|
||||
|
||||
<meta-data android:name="android.app.lib_name" android:value="sfml-activity" />
|
||||
|
||||
<meta-data android:name="android.app.lib_name" android:value="sfml-activity" />
|
||||
<meta-data android:name="sfml.app.lib_name" android:value="sfml-example" />
|
||||
|
||||
<intent-filter>
|
||||
|
|
|
@ -51,7 +51,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
window.clear(sf::Color::White);
|
||||
window.draw(image);
|
||||
window.draw(image);
|
||||
window.display();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ set_source_files_properties(${RESOURCES} PROPERTIES
|
|||
MACOSX_PACKAGE_LOCATION Resources)
|
||||
set_target_properties(cocoa PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${SRCROOT}/resources/Cocoa-Info.plist)
|
||||
target_link_libraries(cocoa "-framework Cocoa -framework Foundation"
|
||||
target_link_libraries(cocoa "-framework Cocoa -framework Foundation"
|
||||
sfml-system sfml-window sfml-graphics)
|
||||
|
||||
# set the target's folder (for IDEs that support it, e.g. Visual Studio)
|
||||
|
@ -42,10 +42,10 @@ set(XIB_OUTPUT_PATH "${RESOURCE_PATH}/")
|
|||
set(XIB_INPUT_PATH "${SRCROOT}/")
|
||||
foreach(XIB ${XIBS})
|
||||
add_custom_command(TARGET cocoa
|
||||
POST_BUILD
|
||||
POST_BUILD
|
||||
COMMAND ${IBTOOL} --errors
|
||||
--output-format human-readable-text
|
||||
--compile ${XIB_OUTPUT_PATH}/${XIB}.nib
|
||||
--output-format human-readable-text
|
||||
--compile ${XIB_OUTPUT_PATH}/${XIB}.nib
|
||||
${XIB_INPUT_PATH}/${XIB}.xib
|
||||
COMMENT "Compiling ${XIB}.xib")
|
||||
# deactivated options: --warnings --notices
|
||||
|
|
|
@ -6,10 +6,10 @@ This is a small example of the integration of SFML in a Cocoa application.
|
|||
Features
|
||||
--------
|
||||
|
||||
* This example shows how basic UI elements can interact with SFML
|
||||
render areas such as sf::RenderWindow (you can use sf::Window and
|
||||
* This example shows how basic UI elements can interact with SFML
|
||||
render areas such as sf::RenderWindow (you can use sf::Window and
|
||||
OpenGL code too, of course).
|
||||
* It also provides tools for converting NSString to and from
|
||||
* It also provides tools for converting NSString to and from
|
||||
std::[w]string in an Objective-C Category of NSString.
|
||||
* Moreover, it shows how you can prevent annoying the system alerts
|
||||
produced when the SFML view has focus and the user press a key
|
||||
|
|
|
@ -91,7 +91,7 @@ int main()
|
|||
while (window.pollEvent(event))
|
||||
{
|
||||
// Window closed or escape key pressed: exit
|
||||
if ((event.type == sf::Event::Closed) ||
|
||||
if ((event.type == sf::Event::Closed) ||
|
||||
((event.type == sf::Event::KeyPressed) && (event.key.code == sf::Keyboard::Escape)))
|
||||
{
|
||||
window.close();
|
||||
|
@ -188,7 +188,7 @@ int main()
|
|||
|
||||
// Check the collisions between the ball and the paddles
|
||||
// Left Paddle
|
||||
if (ball.getPosition().x - ballRadius < leftPaddle.getPosition().x + paddleSize.x / 2 &&
|
||||
if (ball.getPosition().x - ballRadius < leftPaddle.getPosition().x + paddleSize.x / 2 &&
|
||||
ball.getPosition().x - ballRadius > leftPaddle.getPosition().x &&
|
||||
ball.getPosition().y + ballRadius >= leftPaddle.getPosition().y - paddleSize.y / 2 &&
|
||||
ball.getPosition().y - ballRadius <= leftPaddle.getPosition().y + paddleSize.y / 2)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ int main()
|
|||
|
||||
// Play music from an ogg file
|
||||
playMusic("orchestral.ogg");
|
||||
|
||||
|
||||
// Play music from a flac file
|
||||
playMusic("ding.flac");
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ LRESULT CALLBACK onEvent(HWND handle, UINT message, WPARAM wParam, LPARAM lParam
|
|||
int main()
|
||||
{
|
||||
HINSTANCE instance = GetModuleHandle(NULL);
|
||||
|
||||
|
||||
// Define a class for our main window
|
||||
WNDCLASS windowClass;
|
||||
windowClass.style = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue