Skip to content

Commit

Permalink
Directory structure changed
Browse files Browse the repository at this point in the history
  • Loading branch information
aayushacharya committed Mar 11, 2022
1 parent 20e6cfb commit 6d1d0da
Show file tree
Hide file tree
Showing 360 changed files with 184 additions and 159 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
92 changes: 46 additions & 46 deletions Sky-Bomber/HUD.cpp → HUD.cpp
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
#include "../HUD.h"
#include <SFML/Audio.hpp>
#include <iostream>
#include <sstream>
using namespace std;
LifeFuel::LifeFuel(float width, float height, int fuel, int life)
{

// << "The value is :" << fuel << "\n";
if (!font.loadFromFile("resources/numberfont.ttf"))
{
std::cout << "Loading Failed" << std::endl;
}

stringstream FuelStatus, Lifes;

FuelStatus.str("");
Lifes << life;
FuelStatus << fuel;

Lifefuel[0].setFont(font);
Lifefuel[0].setColor(sf::Color::Black);
Lifefuel[0].setString(Lifes.str());
Lifefuel[0].setScale(1.5, 1.5);
Lifefuel[0].setPosition(sf::Vector2f(width - 1346.0f, height - 738.0f));

Lifefuel[1].setFont(font);
Lifefuel[1].setColor(sf::Color::Black);
Lifefuel[1].setString(FuelStatus.str());
Lifefuel[1].setScale(1.5, 1.5);
Lifefuel[1].setPosition(sf::Vector2f(width - 66.0f, height - 738.0f));

}


LifeFuel::~LifeFuel()
{
}

void LifeFuel::draw(sf::RenderWindow &window)
{
for (int i = 0; i < MAX_NUMBER_OF_ITEMS; i++)
{
window.draw(Lifefuel[i]);
}
}
#include "../HUD.h"
#include <SFML/Audio.hpp>
#include <iostream>
#include <sstream>
using namespace std;
LifeFuel::LifeFuel(float width, float height, int fuel, int life)
{

// << "The value is :" << fuel << "\n";
if (!font.loadFromFile("resources/numberfont.ttf"))
{
std::cout << "Loading Failed" << std::endl;
}

stringstream FuelStatus, Lifes;

FuelStatus.str("");
Lifes << life;
FuelStatus << fuel;

Lifefuel[0].setFont(font);
Lifefuel[0].setColor(sf::Color::Black);
Lifefuel[0].setString(Lifes.str());
Lifefuel[0].setScale(1.5, 1.5);
Lifefuel[0].setPosition(sf::Vector2f(width - 1346.0f, height - 738.0f));

Lifefuel[1].setFont(font);
Lifefuel[1].setColor(sf::Color::Black);
Lifefuel[1].setString(FuelStatus.str());
Lifefuel[1].setScale(1.5, 1.5);
Lifefuel[1].setPosition(sf::Vector2f(width - 66.0f, height - 738.0f));

}


LifeFuel::~LifeFuel()
{
}

void LifeFuel::draw(sf::RenderWindow &window)
{
for (int i = 0; i < MAX_NUMBER_OF_ITEMS; i++)
{
window.draw(Lifefuel[i]);
}
}
44 changes: 22 additions & 22 deletions Sky-Bomber/HUD.h → HUD.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#pragma once
#pragma warning(disable : 4996)
#pragma warning(disable : 4244)
#include "SFML/Graphics.hpp"
#include <iostream>

#define MAX_NUMBER_OF_ITEMS 2

class LifeFuel
{
public:
LifeFuel(float width, float height, int fuel, int life);
~LifeFuel();

void draw(sf::RenderWindow &window);

private:
sf::Font font;
sf::Text Lifefuel[MAX_NUMBER_OF_ITEMS];

};

#pragma once
#pragma warning(disable : 4996)
#pragma warning(disable : 4244)
#include "SFML/Graphics.hpp"
#include <iostream>

#define MAX_NUMBER_OF_ITEMS 2

class LifeFuel
{
public:
LifeFuel(float width, float height, int fuel, int life);
~LifeFuel();

void draw(sf::RenderWindow &window);

private:
sf::Font font;
sf::Text Lifefuel[MAX_NUMBER_OF_ITEMS];

};

File renamed without changes.
File renamed without changes.
164 changes: 82 additions & 82 deletions Sky-Bomber/HighScoreScreen.cpp → HighScoreScreen.cpp
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
#include <iostream>
#include <string>
#include "../HighScoreScreen.h"
#include <SFML/Graphics.hpp>
#include "../GameEngine.h"
#include "../HighScore.h"
#define width 1366
#define height 768
void Screen::HighScore()
{
sf::Texture highscoreTexture;
if (!highscoreTexture.loadFromFile("resources/background.png"))
std::cout << "Not working" << std::endl;

sf::Sprite HST;
HST.setTexture(highscoreTexture);

sf::RenderWindow app(sf::VideoMode(1366, 768), "High Score");
sf::Font font;
if (!font.loadFromFile("resources/numberfont.ttf"))
{
std::cout << "Couldn't load font";
}
sf::Text heading;
sf::Text text[3];
std::string getName[3];
std::string getScore[3];
Highscore::Get(getName, getScore);
while (app.isOpen())
{
sf::Event event;
while (app.pollEvent(event))
{
if (event.type == sf::Event::Closed)
app.close();

if (sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
{
app.close();
Game::start();
}


}
for (int i = 0;i < 3;i++)
{

std::transform(getName[i].begin(), getName[i].end(), getName[i].begin(), ::toupper);
}
heading.setFont(font);
heading.setColor(sf::Color::Black);
heading.setString("HIGHSCORES");
heading.setScale(3, 3);
heading.setPosition(sf::Vector2f(width / 4, height / 6));

text[0].setFont(font);
text[0].setColor(sf::Color::Red);
text[0].setString(getName[0] +"\t\t\t" +getScore[0]);
text[0].setScale(2, 2);
text[0].setPosition(sf::Vector2f(width / 8, height / 3));

text[1].setFont(font);
text[1].setColor(sf::Color::Blue);
text[1].setString(getName[1] + "\t\t\t" + getScore[1]);
text[1].setScale(2, 2);
text[1].setPosition(sf::Vector2f(width / 8, height / 2));

text[2].setFont(font);
text[2].setColor(sf::Color::Yellow);
text[2].setString(getName[2] + "\t\t\t" + getScore[2]);
text[2].setScale(2, 2);
text[2].setPosition(sf::Vector2f(width / 8, height / 1.5));

app.clear();
app.draw(HST);
app.draw(heading);
app.draw(text[0]);
app.draw(text[1]);
app.draw(text[2]);
app.display();
}

#include <iostream>
#include <string>
#include "../HighScoreScreen.h"
#include <SFML/Graphics.hpp>
#include "../GameEngine.h"
#include "../HighScore.h"
#define width 1366
#define height 768
void Screen::HighScore()
{
sf::Texture highscoreTexture;
if (!highscoreTexture.loadFromFile("resources/background.png"))
std::cout << "Not working" << std::endl;

sf::Sprite HST;
HST.setTexture(highscoreTexture);

sf::RenderWindow app(sf::VideoMode(1366, 768), "High Score");
sf::Font font;
if (!font.loadFromFile("resources/numberfont.ttf"))
{
std::cout << "Couldn't load font";
}
sf::Text heading;
sf::Text text[3];
std::string getName[3];
std::string getScore[3];
Highscore::Get(getName, getScore);
while (app.isOpen())
{
sf::Event event;
while (app.pollEvent(event))
{
if (event.type == sf::Event::Closed)
app.close();

if (sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
{
app.close();
Game::start();
}


}
for (int i = 0;i < 3;i++)
{

std::transform(getName[i].begin(), getName[i].end(), getName[i].begin(), ::toupper);
}
heading.setFont(font);
heading.setColor(sf::Color::Black);
heading.setString("HIGHSCORES");
heading.setScale(3, 3);
heading.setPosition(sf::Vector2f(width / 4, height / 6));

text[0].setFont(font);
text[0].setColor(sf::Color::Red);
text[0].setString(getName[0] +"\t\t\t" +getScore[0]);
text[0].setScale(2, 2);
text[0].setPosition(sf::Vector2f(width / 8, height / 3));

text[1].setFont(font);
text[1].setColor(sf::Color::Blue);
text[1].setString(getName[1] + "\t\t\t" + getScore[1]);
text[1].setScale(2, 2);
text[1].setPosition(sf::Vector2f(width / 8, height / 2));

text[2].setFont(font);
text[2].setColor(sf::Color::Yellow);
text[2].setString(getName[2] + "\t\t\t" + getScore[2]);
text[2].setScale(2, 2);
text[2].setPosition(sf::Vector2f(width / 8, height / 1.5));

app.clear();
app.draw(HST);
app.draw(heading);
app.draw(text[0]);
app.draw(text[1]);
app.draw(text[2]);
app.display();
}

}
16 changes: 8 additions & 8 deletions Sky-Bomber/HighScoreScreen.h → HighScoreScreen.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once
#pragma warning(disable : 4996)
#pragma warning(disable : 4244)
namespace Screen {

void HighScore();

}
#pragma once
#pragma warning(disable : 4996)
#pragma warning(disable : 4244)
namespace Screen {

void HighScore();

}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed OOP final report.docx
Binary file not shown.
Binary file removed OOP final reportedit.docx
Binary file not shown.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Sky Bomber

## Abstract

You are the only remaining pilot of a fighter jet assigned to obliterate everything and anything within your sight. Apply your projectile motion wits and be as accurate as possible while throwing the missiles. But beware ! The fuel is running low.

## Build instructions

Please utilize the ``C++Project.sln`` file to create a Visual Studio project and build in *x86* environment.

## Screenshots

![splash screen](Screenshots/splashscreen.png)
![intro](Screenshots/intro.png)
![gameplay](Screenshots/gameplay.png)
![team](Screenshots/team.png)

## Contributors

Aayush Acharya
Anjil Bishwokarma
Nirajan Basnet

## Special thanks

Rabin Adhikari
Binary file added Screenshots/gameplay.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 Screenshots/intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
1 change: 0 additions & 1 deletion Sky-Bomber/README.md

This file was deleted.

Binary file removed Slides.pptm
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit 6d1d0da

Please sign in to comment.