Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 47 additions & 2 deletions Space-Invaders/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
#include <SFML/Graphics.hpp>

int main() {

// Define the video mode (dimensions)
sf::VideoMode videoMode = *(new sf::VideoMode(800, 600));

// Create a window object with specific dimensions and a title
sf::RenderWindow* window = new sf::RenderWindow(videoMode, "SFML Window");

// Game loop to keep the window open
while (window->isOpen()) {
sf::Event event;
while (window->pollEvent(event)) {
// Check for window closure
if (event.type == sf::Event::Closed)
window->close();
}

// Clear the window
window->clear(sf::Color::Blue);


// Draw

sf::Texture outscal_texture;
outscal_texture.loadFromFile("assets/textures/outscal_logo.png");

sf::Sprite outscal_sprite;
outscal_sprite.setTexture(outscal_texture);

outscal_sprite.setPosition(300, 200); // Position
outscal_sprite.setRotation(45); // Rotation in degrees
outscal_sprite.setScale(0.3, 0.3); // Scale factor

window->draw(outscal_sprite);

sf::Font font;
font.loadFromFile("assets/fonts/OpenSans.ttf");
sf::Text text("Hello SFML!", font, 30);
text.setFillColor(sf::Color::Red);
window->draw(text);


// Display what was drawn
window->display();
}

int main()
{
return 0;
}
2 changes: 1 addition & 1 deletion Space-Invaders/sfml/include/SFML/Config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
////////////////////////////////////////////////////////////
#define SFML_VERSION_MAJOR 2
#define SFML_VERSION_MINOR 6
#define SFML_VERSION_PATCH 0
#define SFML_VERSION_PATCH 1


////////////////////////////////////////////////////////////
Expand Down
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-audio-s-d.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-audio-s.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-audio.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-graphics-s-d.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-graphics-s.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-graphics.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-main-d.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-main-s.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-network-s-d.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-network-s.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-network.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-system-s-d.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-system-s.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-system.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-window-s-d.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-window-s.pdb
Binary file not shown.
Binary file modified Space-Invaders/sfml/lib/Debug/sfml-window.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion Space-Invaders/sfml/lib/cmake/SFML/SFMLConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ if (NOT SFML_FOUND)
endif()

if (SFML_FOUND AND NOT SFML_FIND_QUIETLY)
message(STATUS "Found SFML 2.6.0 in ${CMAKE_CURRENT_LIST_DIR}")
message(STATUS "Found SFML 2.6.1 in ${CMAKE_CURRENT_LIST_DIR}")
endif()
6 changes: 3 additions & 3 deletions Space-Invaders/sfml/lib/cmake/SFML/SFMLConfigVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
# The variable CVF_VERSION must be set before calling configure_file().


set(PACKAGE_VERSION "2.6.0")
set(PACKAGE_VERSION "2.6.1")

if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()

if("2.6.0" MATCHES "^([0-9]+)\\.")
if("2.6.1" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
endif()
else()
set(CVF_VERSION_MAJOR "2.6.0")
set(CVF_VERSION_MAJOR "2.6.1")
endif()

if(PACKAGE_FIND_VERSION_RANGE)
Expand Down
2 changes: 1 addition & 1 deletion Space-Invaders/sfml/lib/cmake/SFML/SFMLSharedTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.8.3...3.24)
cmake_policy(VERSION 2.8.3...3.25)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Space-Invaders/sfml/lib/cmake/SFML/SFMLStaticTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.8.3...3.24)
cmake_policy(VERSION 2.8.3...3.25)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
Expand Down