diff --git a/CMakeLists.txt b/CMakeLists.txt index e5aada1..9e01ee3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ # # Define the project name -project(basic-c-sdl-project) +project(basic-c-sdl-project-tunisia-flag) # Set the cmake minimum version to 3.5.1 cmake_minimum_required(VERSION 3.5.1) diff --git a/IDE_USAGE.md b/IDE_USAGE.md index d3619b5..52b8672 100644 --- a/IDE_USAGE.md +++ b/IDE_USAGE.md @@ -44,7 +44,7 @@ sudo apt install codeblocks ```sh # Create a folder for the Code::Blocks project -cd basic-c-sdl-project +cd basic-c-sdl-project-tunisia-flag mkdir -p build/codeblocks cd build/codeblocks @@ -53,7 +53,7 @@ cmake ../.. -G "CodeBlocks - Unix Makefiles" ``` *Open the project:*
-Run Code::Blocks, and open the project in `basic-c-sdl-project/build/codeblocks`.
+Run Code::Blocks, and open the project in `basic-c-sdl-project-tunisia-flag/build/codeblocks`.
Finally, build and run the project. @@ -72,15 +72,15 @@ Offline package: https://www.eclipse.org/downloads/packages ```sh # Create a folder for the Eclipse project outside this project -cd basic-c-sdl-project -mkdir ../eclipse-basic-c-sdl-project -cd ../eclipse-basic-c-sdl-project +cd basic-c-sdl-project-tunisia-flag +mkdir ../eclipse-basic-c-sdl-project-tunisia-flag +cd ../eclipse-basic-c-sdl-project-tunisia-flag # Generate an Eclipse project -cmake ../basic-c-sdl-project -G "Eclipse CDT4 - Unix Makefiles" +cmake ../basic-c-sdl-project-tunisia-flag -G "Eclipse CDT4 - Unix Makefiles" ``` *Open the project:*
-Run Eclipse, and open the project in `eclipse-basic-c-sdl-project`.
+Run Eclipse, and open the project in `eclipse-basic-c-sdl-project-tunisia-flag`.
Create a new run configuration: Go to `Run` > `Run configurations` > `C\C++ Application` and specify the C/C++ Application using `Search Project...`
Finally, build and run the project. diff --git a/README.md b/README.md index b6c3106..18225f9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ -# Basic C SDL project +# Basic C SDL project : Tunisia flag This project is a basic C [SDL][] project that uses [CMake][] as a build system. +It draws the flag of [Tunisia][] using basic graphics primitives. ## Dependencies @@ -29,8 +30,8 @@ sudo apt install libsdl2-image-dev libsdl2-ttf-dev libsdl2-gfx-dev ```sh # Clone this repo -git clone https://gitlab.com/aminosbh/basic-c-sdl-project.git -cd basic-c-sdl-project +git clone https://gitlab.com/aminosbh/basic-c-sdl-project-tunisia-flag.git +cd basic-c-sdl-project-tunisia-flag # Create a build folder mkdir build @@ -41,7 +42,7 @@ cmake .. make # Run -./basic-c-sdl-project +./basic-c-sdl-project-tunisia-flag ``` ***Note:*** To use SDL2_image, SDL2_ttf or SDL2_gfx, you should uncomment @@ -66,3 +67,4 @@ This project is distributed under the terms of the MIT license [SDL2_image]: https://www.libsdl.org/projects/SDL_image [SDL2_ttf]: https://www.libsdl.org/projects/SDL_ttf [SDL2_gfx]: http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx +[Tunisia]: https://en.wikipedia.org/wiki/Tunisia diff --git a/src/main.c b/src/main.c index afeca89..88c8381 100644 --- a/src/main.c +++ b/src/main.c @@ -52,7 +52,7 @@ int main(int argc, char* args[]) } // Create window - SDL_Window *window = SDL_CreateWindow("Basic C SDL project", + SDL_Window *window = SDL_CreateWindow("Basic C SDL project: Tunisia Flag", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT,