Compare commits

..
16 Commits
Author SHA1 Message Date
Justin bb8bc40c13 Cleaned up the code 2025-05-11 02:15:36 -05:00
Justin 0737ed92a8 Changed the items to static that was need to be. 2025-05-10 23:54:16 -05:00
Justin 4f60b29fc4 Working on entering intro text 2025-05-10 23:06:15 -05:00
Justin 657b97c4a8 Working on the typing output. 2025-05-10 22:48:06 -05:00
Justin f5b2925bdf Working on the sleep 2025-05-10 21:30:10 -05:00
Justin 2a29f0dceb Working on the intro 2025-05-10 17:23:55 -05:00
Justin 7e7cbaf0e2 Fixed some errors and typo 2025-05-10 16:54:00 -05:00
Justin adca5dea55 Adding the print to the intro. 2025-05-09 23:20:52 -05:00
Justin bfcce7ce70 Added a line to the ignored 2025-05-09 23:13:41 -05:00
Justin c602fda775 added the header file for intro. 2025-05-09 23:08:12 -05:00
Justin efa67b2189 init intro 2025-05-09 22:01:57 -05:00
Justin d14c999cdf Changed the name of the compile 2025-05-09 21:29:57 -05:00
Justin 9aa0cfadd6 changed the name of the program 2025-05-09 21:13:21 -05:00
Justin 5974b9d325 added the files 2025-05-09 19:15:51 -05:00
Justin 8a351b03b4 Anding title and fixing 2025-05-04 13:51:00 -05:00
Justin 90483a0c71 Add the title compiled file. 2025-05-04 13:49:25 -05:00
13 changed files with 146 additions and 3 deletions

No files matched your search

+6 -1
View File
@@ -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
+1 -1
View File
@@ -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
+14
View File
@@ -0,0 +1,14 @@
#include <iostream>
#include <thread>
#include "print.h"
#include "sleep.h"
using namespace std;
class Intro {
public:
static void mainIntro();
private:
};
+4
View File
@@ -1 +1,5 @@
#include <iostream> #include <iostream>
#include "intro.h"
#include "title.h"
#include <cstdlib>
using namespace std;
+16
View File
@@ -0,0 +1,16 @@
#include <iostream>
#include <string>
using namespace std;
class Print{
public:
Print (){
};
~Print(){
};
void printl(string text);
void println(string text);
};
+13
View File
@@ -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);
};
+12
View File
@@ -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();
};
+12
View File
@@ -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 ");
}
+13
View File
@@ -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
View File
@@ -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;
} }
+9
View File
@@ -0,0 +1,9 @@
#include "include/print.h"
void Print::printl(string text){
cout << text;
}
void Print::println(string text){
cout << text << endl;
}
+25
View File
@@ -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;
}
+18
View File
@@ -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;
}