Compare commits
16
Commits
88f545867c
..
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb8bc40c13 | ||
|
|
0737ed92a8 | ||
|
|
4f60b29fc4 | ||
|
|
657b97c4a8 | ||
|
|
f5b2925bdf | ||
|
|
2a29f0dceb | ||
|
|
7e7cbaf0e2 | ||
|
|
adca5dea55 | ||
|
|
bfcce7ce70 | ||
|
|
c602fda775 | ||
|
|
efa67b2189 | ||
|
|
d14c999cdf | ||
|
|
9aa0cfadd6 | ||
|
|
5974b9d325 | ||
|
|
8a351b03b4 | ||
|
|
90483a0c71 |
No files matched your search
+6
-1
@@ -1,3 +1,8 @@
|
|||||||
main.d
|
main.d
|
||||||
|
title.d
|
||||||
obj/*
|
obj/*
|
||||||
Shot-Gun-Pete
|
ShotGun-Pete
|
||||||
|
banner.txt
|
||||||
|
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 +1,5 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include "intro.h"
|
||||||
|
#include "title.h"
|
||||||
|
#include <cstdlib>
|
||||||
|
using namespace std;
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
class Print{
|
||||||
|
public:
|
||||||
|
Print (){
|
||||||
|
|
||||||
|
};
|
||||||
|
~Print(){
|
||||||
|
|
||||||
|
};
|
||||||
|
void printl(string text);
|
||||||
|
void println(string text);
|
||||||
|
|
||||||
|
};
|
||||||
@@ -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);
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#include <iostream>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include "include/print.h"
|
||||||
|
#include "include/sleep.h"
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
class Title{
|
||||||
|
private:
|
||||||
|
protected:
|
||||||
|
public:
|
||||||
|
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
-1
@@ -1,6 +1,8 @@
|
|||||||
#include "include/main.h"
|
#include "include/main.h"
|
||||||
|
|
||||||
int main (){
|
int main (){
|
||||||
|
system("clear");
|
||||||
|
Title::mainTitle();
|
||||||
|
Intro::mainIntro();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#include "include/print.h"
|
||||||
|
|
||||||
|
void Print::printl(string text){
|
||||||
|
cout << text;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Print::println(string text){
|
||||||
|
cout << text << endl;
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#include "include/title.h"
|
||||||
|
|
||||||
|
void Title::mainTitle(){
|
||||||
|
int time = 700;
|
||||||
|
cout << "███████╗██╗ ██╗ ██████╗ ████████╗ ██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ███████╗████████╗███████╗" << endl;
|
||||||
|
Sleep::delay(time);
|
||||||
|
cout << "██╔════╝██║ ██║██╔═══██╗╚══██╔══╝██╔════╝ ██║ ██║████╗ ██║ ██╔══██╗██╔════╝╚══██╔══╝██╔════╝" << endl;
|
||||||
|
Sleep::delay(time);
|
||||||
|
cout << "███████╗███████║██║ ██║ ██║ ██║ ███╗██║ ██║██╔██╗ ██║ ██████╔╝█████╗ ██║ █████╗ " << endl;
|
||||||
|
Sleep::delay(time);
|
||||||
|
cout << "╚════██║██╔══██║██║ ██║ ██║ ██║ ██║██║ ██║██║╚██╗██║ ██╔═══╝ ██╔══╝ ██║ ██╔══╝ " << endl;
|
||||||
|
Sleep::delay(time);
|
||||||
|
cout << "███████║██║ ██║╚██████╔╝ ██║ ╚██████╔╝╚██████╔╝██║ ╚████║ ██║ ███████╗ ██║ ███████╗" << endl;
|
||||||
|
Sleep::delay(time);
|
||||||
|
cout << "╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in new issue
Block a user