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
|
```sh
|
||||||
# Create a folder for the Code::Blocks project
|
# Create a folder for the Code::Blocks project
|
||||||
cd basic-c-sdl-project
|
cd basic-c-sdl-game
|
||||||
mkdir -p build/codeblocks
|
mkdir -p build/codeblocks
|
||||||
cd build/codeblocks
|
cd build/codeblocks
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ cmake ../.. -G "CodeBlocks - Unix Makefiles"
|
|||||||
```
|
```
|
||||||
|
|
||||||
*Open the project:*<br>
|
*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.
|
Finally, build and run the project.
|
||||||
|
|
||||||
|
|
||||||
@@ -72,15 +72,15 @@ Offline package: https://www.eclipse.org/downloads/packages
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Create a folder for the Eclipse project outside this project
|
# Create a folder for the Eclipse project outside this project
|
||||||
cd basic-c-sdl-project
|
cd basic-c-sdl-game
|
||||||
mkdir ../eclipse-basic-c-sdl-project
|
mkdir ../eclipse-basic-c-sdl-game
|
||||||
cd ../eclipse-basic-c-sdl-project
|
cd ../eclipse-basic-c-sdl-game
|
||||||
|
|
||||||
# Generate an Eclipse project
|
# 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>
|
*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` >
|
Create a new run configuration: Go to `Run` > `Run configurations` >
|
||||||
`C\C++ Application` and specify the C/C++ Application using `Search Project...`<br>
|
`C\C++ Application` and specify the C/C++ Application using `Search Project...`<br>
|
||||||
Finally, build and run the project.
|
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
|
## Dependencies
|
||||||
|
|
||||||
@@ -29,8 +30,8 @@ sudo apt install libsdl2-image-dev libsdl2-ttf-dev libsdl2-gfx-dev
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Clone this repo
|
# Clone this repo
|
||||||
git clone https://gitlab.com/aminosbh/basic-c-sdl-project.git
|
git clone https://gitlab.com/aminosbh/basic-c-sdl-game.git
|
||||||
cd basic-c-sdl-project
|
cd basic-c-sdl-game
|
||||||
|
|
||||||
# Create a build folder
|
# Create a build folder
|
||||||
mkdir build
|
mkdir build
|
||||||
@@ -41,7 +42,7 @@ cmake ..
|
|||||||
make
|
make
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
./basic-c-sdl-project
|
./basic-c-sdl-game
|
||||||
```
|
```
|
||||||
|
|
||||||
***Note:*** To use SDL2_image, SDL2_ttf or SDL2_gfx, you should uncomment
|
***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
|
// 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,
|
||||||
SDL_WINDOWPOS_UNDEFINED,
|
SDL_WINDOWPOS_UNDEFINED,
|
||||||
SCREEN_WIDTH, SCREEN_HEIGHT,
|
SCREEN_WIDTH, SCREEN_HEIGHT,
|
||||||
|
|||||||
Reference in New Issue
Block a user