Compare commits
13
Commits
5974b9d325
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb8bc40c13 | ||
|
|
0737ed92a8 | ||
|
|
4f60b29fc4 | ||
|
|
657b97c4a8 | ||
|
|
f5b2925bdf | ||
|
|
2a29f0dceb | ||
|
|
7e7cbaf0e2 | ||
|
|
adca5dea55 | ||
|
|
bfcce7ce70 | ||
|
|
c602fda775 | ||
|
|
efa67b2189 | ||
|
|
d14c999cdf | ||
|
|
9aa0cfadd6 |
No files matched your search
+3
-1
@@ -1,6 +1,8 @@
|
|||||||
main.d
|
main.d
|
||||||
title.d
|
title.d
|
||||||
obj/*
|
obj/*
|
||||||
Shot-Gun-Pete
|
ShotGun-Pete
|
||||||
banner.txt
|
banner.txt
|
||||||
print.d
|
print.d
|
||||||
|
intro.d
|
||||||
|
sleep.d
|
||||||
@@ -8,7 +8,7 @@ CXXFLAGS = -std=c++11 -Wall
|
|||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
# Makefile settings - Can be customized.
|
# Makefile settings - Can be customized.
|
||||||
APPNAME = Shot-Gun-Pete
|
APPNAME = ShotGun-Pete
|
||||||
EXT = .cpp
|
EXT = .cpp
|
||||||
SRCDIR = src
|
SRCDIR = src
|
||||||
OBJDIR = obj
|
OBJDIR = obj
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#include <iostream>
|
||||||
|
#include <thread>
|
||||||
|
#include "print.h"
|
||||||
|
#include "sleep.h"
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
class Intro {
|
||||||
|
public:
|
||||||
|
|
||||||
|
static void mainIntro();
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
@@ -1,2 +1,5 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include "intro.h"
|
||||||
|
#include "title.h"
|
||||||
|
#include <cstdlib>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#include <chrono>
|
||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
#include <cstring>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
class Sleep{
|
||||||
|
public:
|
||||||
|
static void delay(int milliseconds);
|
||||||
|
static void type(string text);
|
||||||
|
};
|
||||||
+3
-1
@@ -1,10 +1,12 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include "include/print.h"
|
||||||
|
#include "include/sleep.h"
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
class Title{
|
class Title{
|
||||||
private:
|
private:
|
||||||
protected:
|
protected:
|
||||||
public:
|
public:
|
||||||
void mainTitle();
|
static void mainTitle();
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#include "include/intro.h"
|
||||||
|
|
||||||
|
void Intro::mainIntro(){
|
||||||
|
int time = 1000;
|
||||||
|
cout << endl;
|
||||||
|
cout << endl;
|
||||||
|
Sleep::type("");
|
||||||
|
Sleep::delay(time);
|
||||||
|
Sleep::type("The world didn't end with a bang. It ended with a groan.. and the scratching of death fingers against steel shutters.");
|
||||||
|
Sleep::delay(time);
|
||||||
|
Sleep::type("Pete used to sell shotgun, slug, and survival tips to deer hunters and doomsday preppers out of his rundown gun store ");
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
[INTRO – Shotgun Pete]
|
||||||
|
|
||||||
|
The world didn’t end with a bang. It ended with a groan... and the scratching of dead fingers against steel shutters.
|
||||||
|
|
||||||
|
Pete used to sell shotguns, slugs, and survival tips to deer hunters and doomsday preppers out of his rundown gun store on the edge of town. Folks called him Shotgun Pete. They laughed at his bunker in the basement and his endless stockpile of beans and buckshot.
|
||||||
|
|
||||||
|
They’re not laughing now.
|
||||||
|
|
||||||
|
It’s been 47 days since the dead started walking. The city’s overrun. The power’s gone. The roads are broken and the rules are worse.
|
||||||
|
|
||||||
|
But Pete? Pete’s still here. Armed to the teeth. Ready to take back what’s his, one shell at a time.
|
||||||
|
|
||||||
|
Welcome to Shotgun Pete. Lock and load.
|
||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
#include "include/main.h"
|
#include "include/main.h"
|
||||||
#include "include/title.h"
|
|
||||||
|
|
||||||
int main (){
|
int main (){
|
||||||
Title title;
|
system("clear");
|
||||||
title.mainTitle();
|
Title::mainTitle();
|
||||||
|
Intro::mainIntro();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#include "include/sleep.h"
|
||||||
|
|
||||||
|
void Sleep::delay(int milliseconds){
|
||||||
|
auto start = std::chrono::high_resolution_clock::now();
|
||||||
|
auto duration = std::chrono::milliseconds(milliseconds);
|
||||||
|
|
||||||
|
while (std::chrono::high_resolution_clock::now() - start < duration) {
|
||||||
|
// Do nothing, just wait
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void Sleep::type(string text){
|
||||||
|
int a = text.size();
|
||||||
|
char* charArray = new char[a+1];
|
||||||
|
strcpy(charArray, text.c_str());
|
||||||
|
int i = 0;
|
||||||
|
int time = 300;
|
||||||
|
|
||||||
|
while(i < a+1){
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(time));
|
||||||
|
cout << charArray[i] << flush;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
cout << endl;
|
||||||
|
delete[] charArray;
|
||||||
|
}
|
||||||
+12
-15
@@ -1,21 +1,18 @@
|
|||||||
#include "include/title.h"
|
#include "include/title.h"
|
||||||
#include "include/print.h"
|
|
||||||
|
|
||||||
|
|
||||||
void Title::mainTitle(){
|
void Title::mainTitle(){
|
||||||
int s = 2000;
|
int time = 700;
|
||||||
Print print;
|
cout << "███████╗██╗ ██╗ ██████╗ ████████╗ ██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ███████╗████████╗███████╗" << endl;
|
||||||
print.println("███████╗██╗ ██╗ ██████╗ ████████╗ ██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ███████╗████████╗███████╗");
|
Sleep::delay(time);
|
||||||
usleep(s);
|
cout << "██╔════╝██║ ██║██╔═══██╗╚══██╔══╝██╔════╝ ██║ ██║████╗ ██║ ██╔══██╗██╔════╝╚══██╔══╝██╔════╝" << endl;
|
||||||
print.println("██╔════╝██║ ██║██╔═══██╗╚══██╔══╝██╔════╝ ██║ ██║████╗ ██║ ██╔══██╗██╔════╝╚══██╔══╝██╔════╝");
|
Sleep::delay(time);
|
||||||
usleep(s);
|
cout << "███████╗███████║██║ ██║ ██║ ██║ ███╗██║ ██║██╔██╗ ██║ ██████╔╝█████╗ ██║ █████╗ " << endl;
|
||||||
print.println("███████╗███████║██║ ██║ ██║ ██║ ███╗██║ ██║██╔██╗ ██║ ██████╔╝█████╗ ██║ █████╗ ");
|
Sleep::delay(time);
|
||||||
usleep(s);
|
cout << "╚════██║██╔══██║██║ ██║ ██║ ██║ ██║██║ ██║██║╚██╗██║ ██╔═══╝ ██╔══╝ ██║ ██╔══╝ " << endl;
|
||||||
print.println("╚════██║██╔══██║██║ ██║ ██║ ██║ ██║██║ ██║██║╚██╗██║ ██╔═══╝ ██╔══╝ ██║ ██╔══╝ ");
|
Sleep::delay(time);
|
||||||
usleep(s);
|
cout << "███████║██║ ██║╚██████╔╝ ██║ ╚██████╔╝╚██████╔╝██║ ╚████║ ██║ ███████╗ ██║ ███████╗" << endl;
|
||||||
print.println("███████║██║ ██║╚██████╔╝ ██║ ╚██████╔╝╚██████╔╝██║ ╚████║ ██║ ███████╗ ██║ ███████╗");
|
Sleep::delay(time);
|
||||||
usleep(s);
|
cout << "╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝" << endl;
|
||||||
print.println("╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in new issue
Block a user