Fixed function names in the documentation's code sample

This commit is contained in:
Laurent Gomila committed 2012-04-12 22:16:39 +02:00
1 parent e32420b01f
commit 1bfc30eafb
1 file changed
+25 -25
+25 -25
View File
@@ -28,65 +28,65 @@
/// sfEvent event; /// sfEvent event;
/// ///
/// /* Create the main window */ /// /* Create the main window */
/// window = sfRenderWindow_Create(mode, "SFML window", sfResize | sfClose, NULL); /// window = sfRenderWindow_create(mode, "SFML window", sfResize | sfClose, NULL);
/// if (!window) /// if (!window)
/// return EXIT_FAILURE; /// return EXIT_FAILURE;
/// ///
/// /* Load a sprite to display */ /// /* Load a sprite to display */
/// texture = sfTexture_CreateFromFile("cute_image.jpg"); /// texture = sfTexture_createFromFile("cute_image.jpg");
/// if (!texture) /// if (!texture)
/// return EXIT_FAILURE; /// return EXIT_FAILURE;
/// sprite = sfSprite_Create(); /// sprite = sfSprite_create();
/// sfSprite_SetTexture(sprite, texture, sfTrue); /// sfSprite_setTexture(sprite, texture, sfTrue);
/// ///
/// /* Create a graphical text to display */ /// /* Create a graphical text to display */
/// font = sfFont_CreateFromFile("arial.ttf"); /// font = sfFont_createFromFile("arial.ttf");
/// if (!font) /// if (!font)
/// return EXIT_FAILURE; /// return EXIT_FAILURE;
/// text = sfText_Create(); /// text = sfText_create();
/// sfText_SetString(text, "Hello SFML"); /// sfText_setString(text, "Hello SFML");
/// sfText_SetFont(text, font); /// sfText_setFont(text, font);
/// sfText_SetCharacterSize(text, 50); /// sfText_setCharacterSize(text, 50);
/// ///
/// /* Load a music to play */ /// /* Load a music to play */
/// music = sfMusic_CreateFromFile("nice_music.ogg"); /// music = sfMusic_createFromFile("nice_music.ogg");
/// if (!music) /// if (!music)
/// return EXIT_FAILURE; /// return EXIT_FAILURE;
/// ///
/// /* Play the music */ /// /* Play the music */
/// sfMusic_Play(music); /// sfMusic_play(music);
/// ///
/// /* Start the game loop */ /// /* Start the game loop */
/// while (sfRenderWindow_IsOpen(window)) /// while (sfRenderWindow_isOpen(window))
/// { /// {
/// /* Process events */ /// /* Process events */
/// while (sfRenderWindow_PollEvent(window, &event)) /// while (sfRenderWindow_pollEvent(window, &event))
/// { /// {
/// /* Close window : exit */ /// /* Close window : exit */
/// if (event.Type == sfEvtClosed) /// if (event.type == sfEvtClosed)
/// sfRenderWindow_Close(window); /// sfRenderWindow_close(window);
/// } /// }
/// ///
/// /* Clear the screen */ /// /* Clear the screen */
/// sfRenderWindow_Clear(window, sfBlack); /// sfRenderWindow_clear(window, sfBlack);
/// ///
/// /* Draw the sprite */ /// /* Draw the sprite */
/// sfRenderWindow_DrawSprite(window, sprite, NULL); /// sfRenderWindow_drawSprite(window, sprite, NULL);
/// ///
/// /* Draw the text */ /// /* Draw the text */
/// sfRenderWindow_DrawText(window, text, NULL); /// sfRenderWindow_drawText(window, text, NULL);
/// ///
/// /* Update the window */ /// /* Update the window */
/// sfRenderWindow_Display(window); /// sfRenderWindow_display(window);
/// } /// }
/// ///
/// /* Cleanup resources */ /// /* Cleanup resources */
/// sfMusic_Destroy(music); /// sfMusic_destroy(music);
/// sfText_Destroy(text); /// sfText_destroy(text);
/// sfFont_Destroy(font); /// sfFont_destroy(font);
/// sfSprite_Destroy(sprite); /// sfSprite_destroy(sprite);
/// sfTexture_Destroy(texture); /// sfTexture_destroy(texture);
/// sfRenderWindow_Destroy(window); /// sfRenderWindow_destroy(window);
/// ///
/// return EXIT_SUCCESS; /// return EXIT_SUCCESS;
/// } /// }