Update the project name and description
This commit is contained in:
14
IDE_USAGE.md
14
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-game
|
||||
mkdir -p build/codeblocks
|
||||
cd build/codeblocks
|
||||
|
||||
@@ -53,7 +53,7 @@ cmake ../.. -G "CodeBlocks - Unix Makefiles"
|
||||
```
|
||||
|
||||
*Open the project:*<br>
|
||||
Run Code::Blocks, and open the project in `basic-c-sdl-project/build/codeblocks`.<br>
|
||||
Run Code::Blocks, and open the project in `basic-c-sdl-game/build/codeblocks`.<br>
|
||||
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-game
|
||||
mkdir ../eclipse-basic-c-sdl-game
|
||||
cd ../eclipse-basic-c-sdl-game
|
||||
|
||||
# Generate an Eclipse project
|
||||
cmake ../basic-c-sdl-project -G "Eclipse CDT4 - Unix Makefiles"
|
||||
cmake ../basic-c-sdl-game -G "Eclipse CDT4 - Unix Makefiles"
|
||||
```
|
||||
*Open the project:*<br>
|
||||
Run Eclipse, and open the project in `eclipse-basic-c-sdl-project`.<br>
|
||||
Run Eclipse, and open the project in `eclipse-basic-c-sdl-game`.<br>
|
||||
Create a new run configuration: Go to `Run` > `Run configurations` >
|
||||
`C\C++ Application` and specify the C/C++ Application using `Search Project...`<br>
|
||||
Finally, build and run the project.
|
||||
|
||||
11
README.md
11
README.md
@@ -1,6 +1,7 @@
|
||||
# Basic C SDL project
|
||||
# Basic C SDL game
|
||||
|
||||
This project is a basic C [SDL][] project that uses [CMake][] as a build system.
|
||||
This project is a basic C [SDL][] game that uses [CMake][] as a build system.<br>
|
||||
It shows how we can develop a basic grid-based game.
|
||||
|
||||
## 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-game.git
|
||||
cd basic-c-sdl-game
|
||||
|
||||
# Create a build folder
|
||||
mkdir build
|
||||
@@ -41,7 +42,7 @@ cmake ..
|
||||
make
|
||||
|
||||
# Run
|
||||
./basic-c-sdl-project
|
||||
./basic-c-sdl-game
|
||||
```
|
||||
|
||||
***Note:*** To use SDL2_image, SDL2_ttf or SDL2_gfx, you should uncomment
|
||||
|
||||
@@ -52,7 +52,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
// Create window
|
||||
SDL_Window *window = SDL_CreateWindow("Basic C SDL project",
|
||||
SDL_Window *window = SDL_CreateWindow("Basic C SDL game",
|
||||
SDL_WINDOWPOS_UNDEFINED,
|
||||
SDL_WINDOWPOS_UNDEFINED,
|
||||
SCREEN_WIDTH, SCREEN_HEIGHT,
|
||||
|
||||
Reference in New Issue
Block a user