Skip to content

Commit

Permalink
add missing updates from backup + compiled alpha 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
paullaffitte committed Aug 26, 2022
1 parent ed3ca25 commit 75576eb
Show file tree
Hide file tree
Showing 15 changed files with 197 additions and 37 deletions.
56 changes: 56 additions & 0 deletions Releases et setups/script de création de setup.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Shoot The Aliens"
#define MyAppVersion "beta_1.0"
#define MyAppPublisher "Paul Laffitte"
#define MyAppURL "http://paulof64.itch.io/shootthealiens"
#define MyAppExeName "shootthealiens.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{4E0FAC6E-7755-42AB-95F4-38ECD9AFC191}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
InfoAfterFile=E:\Utilisateurs\PtitPaul\Documents\Développement\CodeBlocks C++\Shoot The Aliens\shootthealiens_beta_1.0\README.txt
OutputDir=E:\Utilisateurs\PtitPaul\Desktop\STA install
OutputBaseFilename=shootthealiens_{#MyAppVersion}_setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Files]
Source: "E:\Utilisateurs\PtitPaul\Documents\Développement\CodeBlocks C++\Shoot The Aliens\shootthealiens_beta_1.0\shootthealiens.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Utilisateurs\PtitPaul\Documents\Développement\CodeBlocks C++\Shoot The Aliens\shootthealiens_beta_1.0\highscore"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Utilisateurs\PtitPaul\Documents\Développement\CodeBlocks C++\Shoot The Aliens\shootthealiens_beta_1.0\history"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Utilisateurs\PtitPaul\Documents\Développement\CodeBlocks C++\Shoot The Aliens\shootthealiens_beta_1.0\libsndfile-1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Utilisateurs\PtitPaul\Documents\Développement\CodeBlocks C++\Shoot The Aliens\shootthealiens_beta_1.0\LISEZMOI.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Utilisateurs\PtitPaul\Documents\Développement\CodeBlocks C++\Shoot The Aliens\shootthealiens_beta_1.0\openal32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Utilisateurs\PtitPaul\Documents\Développement\CodeBlocks C++\Shoot The Aliens\shootthealiens_beta_1.0\README.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Utilisateurs\PtitPaul\Documents\Développement\CodeBlocks C++\Shoot The Aliens\shootthealiens_beta_1.0\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\ressources\images\64x64.ico"

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

Binary file not shown.
Empty file.
Empty file.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
119 changes: 99 additions & 20 deletions Shoot The Aliens.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-std=c++11" />
<Add option="-g" />
<Add option="-DSFML_STATIC" />
<Add directory="C:/Program Files (x86)/CodeBlocks 13/mingw64/x86_64-w64-mingw32/include/SFML" />
</Compiler>
<Linker>
<Add library="libsfml-audio-s-d" />
<Add library="libsfml-graphics-s-d" />
<Add library="libsfml-window-s-d" />
<Add library="libsfml-system-s-d" />
<Add directory="C:/Program Files (x86)/CodeBlocks 13/mingw64/x86_64-w64-mingw32/lib/SFML" />
</Linker>
</Target>
<Target title="Release">
Expand All @@ -40,31 +43,107 @@
<Add library="libsfml-system-s" />
</Linker>
</Target>
<Target title="Updater">
<Option output="bin/Updater/updater" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Updater/" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-DSFML_STATIC" />
</Compiler>
<Unit filename="alien.cpp" />
<Unit filename="alien.h" />
<Unit filename="explosion.cpp" />
<Unit filename="explosion.h" />
<Unit filename="fond.cpp" />
<Unit filename="fond.h" />
<Unit filename="gameengine.cpp" />
<Unit filename="gameengine.h" />
<Unit filename="gamestate.h" />
<Unit filename="jeu.cpp" />
<Unit filename="jeu.h" />
<Unit filename="joueur.cpp" />
<Unit filename="joueur.h" />
<Unit filename="main.cpp" />
<Unit filename="soundmanager.cpp" />
<Unit filename="soundmanager.h" />
<Unit filename="tir.cpp" />
<Unit filename="tir.h" />
<Unit filename="vaisseau.cpp" />
<Unit filename="vaisseau.h" />
<Unit filename="alien.cpp">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="alien.h">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="explosion.cpp">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="explosion.h">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="fond.cpp">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="fond.h">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="gameengine.cpp">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="gameengine.h">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="gamestate.h">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="jeu.cpp">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="jeu.h">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="joueur.cpp">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="joueur.h">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="main.cpp">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="soundmanager.cpp">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="soundmanager.h">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="tir.cpp">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="tir.h">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="updater.cpp">
<Option target="Updater" />
</Unit>
<Unit filename="vaisseau.cpp">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Unit filename="vaisseau.h">
<Option target="Debug" />
<Option target="Release" />
</Unit>
<Extensions>
<code_completion />
<envvars />
Expand Down
3 changes: 2 additions & 1 deletion gameengine.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <vector>
#include <SFML/Graphics.hpp>

using namespace std;

class GameState;
Expand All @@ -28,7 +29,7 @@ class GameEngine
sf::RenderWindow* getFenetre() {return m_fenetre;}

private:
// la pile d'états
//La pile d'�tats
vector<GameState*> states;

bool m_running;
Expand Down
38 changes: 23 additions & 15 deletions jeu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ struct AABB

bool Collision(AABB objet1, AABB objet2)
{
if((objet2.x >= objet1.x + objet1.largeur) // trop à droite
|| (objet2.x + objet2.largeur <= objet1.x) // trop à gauche
if((objet2.x >= objet1.x + objet1.largeur) // trop droite
|| (objet2.x + objet2.largeur <= objet1.x) // trop gauche
|| (objet2.y >= objet1.y + objet1.hauteur) // trop en bas
|| (objet2.y + objet2.hauteur <= objet1.y)) // trop en haut
return false;
Expand Down Expand Up @@ -44,7 +44,7 @@ void Jeu::Init()
m_highscore = 0;
m_finPartie = false;

m_police.loadFromFile("ressources/BNMachine.ttf");
m_police.loadFromFile("ressources/bnmachine.ttf");
m_start.setFont(m_police);
m_start.setString("I Wanna Kill Aliens !");
m_start.setCharacterSize(32);
Expand Down Expand Up @@ -99,21 +99,22 @@ void Jeu::Resume()

void Jeu::HandleEvents(GameEngine* shootTheAliens)
{
// On inspecte tous les évènements de la fenêtre qui ont été émis depuis la précédente itération
// On inspecte tous les �v�nements de la fen�tre qui ont �t� �mis depuis la pr�c�dente it�ration
m_shootTheAliens = shootTheAliens;
sf::Event event;
while(shootTheAliens->getFenetre()->pollEvent(event))
{
//Evènement "fermeture demandée" : on ferme la fenêtre
//Ev�nement "fermeture demand�e" : on ferme la fen�tre
if(event.type == sf::Event::Closed)
{
shootTheAliens->getFenetre()->close();
shootTheAliens->Quit();
}

//On attrape les évènements de redimensionnement
//On attrape les �v�nements de redimensionnement
if(event.type == sf::Event::Resized)
{
//On met à jour la vue, avec la nouvelle taille de la fenêtre
//On met jour la vue, avec la nouvelle taille de la fen�tre
sf::FloatRect visibleArea(0, 0, event.size.width, event.size.height);
shootTheAliens->getFenetre()->setView(sf::View(visibleArea));
}
Expand Down Expand Up @@ -166,7 +167,7 @@ void Jeu::HandleEvents(GameEngine* shootTheAliens)

if(m_dansLeJeu)
{
//Déplacement du joueur
//D�placement du joueur
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Left))
{
m_deplacerJoueur = GAUCHE;
Expand Down Expand Up @@ -218,7 +219,7 @@ void Jeu::Update(GameEngine* shootTheAliens)
m_texteScore.setPosition(m_dimensionsJeu.x - m_rectangle.width - 5, -5);


//Déplacements du joueur
//D�placements du joueur
m_joueur.deplacer(horlogePrincipale.getElapsedTime() - tempsPassePause, m_deplacerJoueur);
m_sprite_joueur.setPosition(m_joueur.get_position());
if(m_deplacerJoueur == GAUCHE || m_deplacerJoueur == DROITE) SoundManager::getInstance()->jouerStrafe(false, horlogePrincipale.getElapsedTime() - tempsPassePause);
Expand All @@ -243,14 +244,14 @@ void Jeu::Update(GameEngine* shootTheAliens)
m_sprite_alien.back().setPosition(sf::Vector2f(m_alien.back().get_position()));
m_aliensTotal++;
}
//Alien dans l'écran
//Alien dans l'�cran
sf::Vector2f posAlien = m_alien.front().get_position();
if(posAlien.y < m_dimensionsJeu.y)
{
//Actions
for(unsigned int i = 0 ; i < m_alien.size() && m_alien.size() > 0 ; i++)
{
//Déplacements alien
//D�placements alien
m_sprite_alien[i].setPosition(sf::Vector2f(m_alien[i].get_position()));
m_alien[i].avancer(horlogePrincipale.getElapsedTime() - tempsPassePause);
//Tir des aliens
Expand All @@ -263,18 +264,18 @@ void Jeu::Update(GameEngine* shootTheAliens)
}
}
}else{
//Destruction de l'alien sorti de l'écran
//Destruction de l'alien sorti de l'�cran
m_alien.erase(m_alien.begin());
m_sprite_alien.erase(m_sprite_alien.begin());
}

//Déplacement tirs
//D�placement tirs
for(unsigned int i = 0 ; i < m_tir.size() && m_tir.size() > 0 ; i++)
{
m_tir[i].avancer(horlogePrincipale.getElapsedTime() - tempsPassePause);
m_sprite_tir[i].setPosition(m_tir[i].get_position());
}
//Destruction des tirs sortis de l'écran
//Destruction des tirs sortis de l'�cran
if(m_tir.size() > 1)
{
sf::Vector2f posTir = m_tir.front().get_position();
Expand Down Expand Up @@ -450,7 +451,7 @@ void Jeu::Update(GameEngine* shootTheAliens)
historique.close();
}

//Réinitialisation pour une nouvelle partie
//R�initialisation pour une nouvelle partie
m_score = 0;
m_niveau = 1;
m_mortsNiveauPrec = 0;
Expand Down Expand Up @@ -548,3 +549,10 @@ void Jeu::Draw(GameEngine* shootTheAliens)
shootTheAliens->getFenetre()->draw(m_version);
shootTheAliens->getFenetre()->display();
}

//THREAD

void Jeu::EventFenetre()
{

}
7 changes: 6 additions & 1 deletion jeu.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class Jeu : public GameState
void Update(GameEngine* shootTheAliens);
void Draw(GameEngine* shootTheAliens);

void EventFenetre();

static Jeu* Instance() {
return &m_Jeu;
}
Expand All @@ -39,6 +41,9 @@ class Jeu : public GameState
Jeu() { }

private:
sf::Event m_event;
GameEngine* m_shootTheAliens;

static Jeu m_Jeu;
sf::View m_vuePrincipale;
sf::Vector2u m_dimensionsFenetre;
Expand All @@ -61,7 +66,7 @@ class Jeu : public GameState
bool m_dansLeJeu;
bool m_pause;
float m_difficulte;
int m_niveau; // Float pour éviter les résultat de division incohérents
int m_niveau; // Float pour �viter les r�sultat de division incoh�rents
// A voir si possible de remettre en int sans bug
int m_mortsNiveauPrec;
int m_morts;
Expand Down
Binary file modified ressources_travail/autre/Itch.io/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ressources_travail/autre/Itch.io/cover.psd
Binary file not shown.
11 changes: 11 additions & 0 deletions updater.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <iostream>

using namespace std;

int main()
{
int test;
cout << "bienvenu dans l'updater ! :D" << endl;
cin >> test;
return 0;
}

0 comments on commit 75576eb

Please sign in to comment.