From c2a2445897af17adb56a32dcf111312763a575d4 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Mon, 2 Jul 2018 01:06:39 +0200 Subject: initial commit Signed-off-by: Toni Uhlig --- .../CSFML-2.1/doc/html/index.htm | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100755 libghack/CSFML-2.1-windows-64bits/CSFML-2.1/doc/html/index.htm (limited to 'libghack/CSFML-2.1-windows-64bits/CSFML-2.1/doc/html/index.htm') diff --git a/libghack/CSFML-2.1-windows-64bits/CSFML-2.1/doc/html/index.htm b/libghack/CSFML-2.1-windows-64bits/CSFML-2.1/doc/html/index.htm new file mode 100755 index 0000000..59ba767 --- /dev/null +++ b/libghack/CSFML-2.1-windows-64bits/CSFML-2.1/doc/html/index.htm @@ -0,0 +1,123 @@ + + + + CSFML - C binding of the Simple and Fast Multimedia Library + + + + + + +
+ + +
+
+
+
SFML Documentation
+
+
+

+Welcome

+

Welcome to the official SFML documentation for C. Here you will find a detailed view of all the SFML functions.
+ If you are looking for tutorials, you can visit the official website at www.sfml-dev.org.

+

+Short example

+

Here is a short example, to show you how simple it is to use SFML in C :

+
#include <SFML/Audio.h>
+
#include <SFML/Graphics.h>
+
+
int main()
+
{
+
sfVideoMode mode = {800, 600, 32};
+
sfRenderWindow* window;
+
sfTexture* texture;
+
sfSprite* sprite;
+
sfFont* font;
+
sfText* text;
+
sfMusic* music;
+
sfEvent event;
+
+
/* Create the main window */
+
window = sfRenderWindow_create(mode, "SFML window", sfResize | sfClose, NULL);
+
if (!window)
+
return EXIT_FAILURE;
+
+
/* Load a sprite to display */
+
texture = sfTexture_createFromFile("cute_image.jpg", NULL);
+
if (!texture)
+
return EXIT_FAILURE;
+
sprite = sfSprite_create();
+
sfSprite_setTexture(sprite, texture, sfTrue);
+
+
/* Create a graphical text to display */
+
font = sfFont_createFromFile("arial.ttf");
+
if (!font)
+
return EXIT_FAILURE;
+
text = sfText_create();
+
sfText_setString(text, "Hello SFML");
+
sfText_setFont(text, font);
+ +
+
/* Load a music to play */
+
music = sfMusic_createFromFile("nice_music.ogg");
+
if (!music)
+
return EXIT_FAILURE;
+
+
/* Play the music */
+
sfMusic_play(music);
+
+
/* Start the game loop */
+
while (sfRenderWindow_isOpen(window))
+
{
+
/* Process events */
+
while (sfRenderWindow_pollEvent(window, &event))
+
{
+
/* Close window : exit */
+
if (event.type == sfEvtClosed)
+ +
}
+
+
/* Clear the screen */
+ +
+
/* Draw the sprite */
+
sfRenderWindow_drawSprite(window, sprite, NULL);
+
+
/* Draw the text */
+
sfRenderWindow_drawText(window, text, NULL);
+
+
/* Update the window */
+ +
}
+
+
/* Cleanup resources */
+ + + + + + +
+
return EXIT_SUCCESS;
+
}
+
+ + + + -- cgit v1.2.3