Compare commits
6 Commits
v2024.12.1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52a6e9bdf3 | ||
|
|
909f075695 | ||
|
|
3033f56820 | ||
| 565dd66b02 | |||
| b72aceb55f | |||
| 933fa18cc6 |
@@ -25,17 +25,17 @@ void Player::draw(SDL_Renderer* renderer) {
|
||||
case 0:
|
||||
this->currentSprite = PLAYER_SPRITE_1;
|
||||
break;
|
||||
case 5:
|
||||
case 50:
|
||||
this->currentSprite = PLAYER_SPRITE_2;
|
||||
break;
|
||||
case 8:
|
||||
case 150:
|
||||
this->currentSprite = PLAYER_SPRITE_3;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->ticks >= 8) {
|
||||
if (this->ticks >= 150) {
|
||||
this->ticks = 0;
|
||||
} else {
|
||||
this->ticks++;
|
||||
@@ -55,11 +55,12 @@ void Player::handlePlayerMovement(int ENV_WIDTH, int ENV_HEIGHT, int windowWidth
|
||||
int tempY = this->y;
|
||||
int speed = this->playerSpeed;
|
||||
bool isSprinting = false;
|
||||
/*
|
||||
if (keystate[SDL_SCANCODE_LSHIFT]) {
|
||||
speed = this->playerSpeed * 2;
|
||||
isSprinting = true;
|
||||
}
|
||||
|
||||
*/
|
||||
bool moved = false;
|
||||
if (this->energy != 0) {
|
||||
if (isPlayingOnline) {
|
||||
|
||||
@@ -56,7 +56,7 @@ int pas_la_fontion_main_enfin_ce_nest_pas_la_fontion_principale_du_programme_mai
|
||||
//std::thread quit_thread = createThread("Quit thread", handleQuitThread);
|
||||
|
||||
// Offline
|
||||
players.emplace_back(Player(windowWidth / 2, windowHeight / 2, 5, renderer, 0));
|
||||
players.emplace_back(Player(windowWidth / 2, windowHeight / 2, 3, renderer, 0));
|
||||
std::thread player_thread = createThread("Player thread", playerMovementThread, std::ref(players[0]));
|
||||
|
||||
|
||||
|
||||
10
README.md
@@ -6,7 +6,6 @@ Le jeu est codé en C++ avec la librairie SDL2.
|
||||
# 🌱 Branches en développement
|
||||
- `main` : La branche principale du projet
|
||||
- `WII-U` : La branche pour la version Wii-U du jeu
|
||||
- `SDL3-2.0` : La branche pour la version SDL3 du jeu
|
||||
|
||||
# 🚀 Installation et configuration
|
||||
## Prérequis
|
||||
@@ -20,15 +19,6 @@ Le jeu est codé en C++ avec la librairie SDL2.
|
||||
- [GCC](https://gcc.gnu.org/)
|
||||
- [Make](https://www.gnu.org/software/make/)
|
||||
|
||||
## Lancement avec la binaire
|
||||
1. Téléchargez la dernière version de l'application
|
||||
```bash
|
||||
https://github.com/BreizhHardware/bloubloulespoissons/releases
|
||||
```
|
||||
2. Executez le fichier .exe
|
||||
|
||||
3. Jouez
|
||||
|
||||
## Compilation et lancement
|
||||
1. Clonez le dépôt
|
||||
```bash
|
||||
|
||||
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 130 KiB |
BIN
img/player/playerV2-full.pdn
Normal file
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 60 KiB |
25
xxd_convert.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Vérifie si un argument de dossier est fourni
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <dossier>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Vérifie si le dossier existe
|
||||
DIR=$1
|
||||
if [ ! -d "$DIR" ]; then
|
||||
echo "Erreur : Le dossier '$DIR' n'existe pas."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Parcourt tous les fichiers .png du dossier et sous-dossiers
|
||||
find "$DIR" -type f -name "*.ttf" | while read -r file; do
|
||||
# Récupère le nom du fichier sans extension
|
||||
base_name=$(basename "$file" .ttf)
|
||||
# Définit le nom de sortie avec extension .h
|
||||
output_file="${file%/*}/${base_name}.h"
|
||||
# Exécute la commande xxd -i
|
||||
xxd -i "$file" > "$output_file"
|
||||
echo "Converti : $file -> $output_file"
|
||||
done
|
||||