From b6f9db8264da398774eba7074a0d9f3b64506548 Mon Sep 17 00:00:00 2001 From: Mark B Date: Sun, 8 Aug 2021 09:32:35 -0400 Subject: [PATCH 1/3] added header and other cpp files --- Makefile | 2 +- README.md | 4 +++- src/RPG.cpp | 38 ++++++++++++++++++++++++++++++++++++++ src/TobeeRPG.h | 1 + src/main.cpp | 36 +----------------------------------- 5 files changed, 44 insertions(+), 37 deletions(-) create mode 100644 src/RPG.cpp create mode 100644 src/TobeeRPG.h diff --git a/Makefile b/Makefile index 15ae2f3..5f9ede6 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ #files to compile -OBJS = src/main.cpp +OBJS = src/main.cpp src/TobeeRPG.h src/RPG.cpp #compiler to use diff --git a/README.md b/README.md index 7d65abc..193c030 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +THIS GAME/CODE CONTAINS CURSE WORDS AND OTHER OBSCENITIES + This is game I made for my good friend Tobi To build you need git,make, and g++ @@ -9,7 +11,7 @@ Building To run -linux +*nix ./TobeeRPG windows diff --git a/src/RPG.cpp b/src/RPG.cpp new file mode 100644 index 0000000..df5d2f2 --- /dev/null +++ b/src/RPG.cpp @@ -0,0 +1,38 @@ +#include +#include "TobeeRPG.h" +using namespace std; + +void RPG(){ + int TobiHP = 10; + int BadGuyHP = 5; + // makes a variable for user input + int UsrIn; + cout << "'GIMME YO FUCKIN' MONEY' said the badguy\n"; + cout << "You need to help him\n"; + // this is an infinite loop + while (true){ + cout << "Tobi's HP is: " << TobiHP << endl; + cout << "BadDude's HP is: " << BadGuyHP << endl; + cout << "You can type 1 to kick the guys dick or type 2 to do nothing: "; + // this reads the number you typed and then writes it to the variable UsrIn + cin >> UsrIn; + if(UsrIn==1){ + cout << "Tobi used dick kick\n"; + BadGuyHP -= 2; + cout << "BadDude says 'Ow My fuckin dick'\n"; + } else if(UsrIn==2){ + cout << "BadDude used FUCKING LEAD TO THE HEAD!!!!!!\n"; + TobiHP -= 999999; + cout << "BadDude says 'Fuckin loser scrub cunt wanker bitch'\n"; + } + if (TobiHP<=0) { + cout << "Tobi fucking died 'Best ending' \n" << endl; + // break ends the loop + break; + } else if (BadGuyHP<=0) { + cout << "Tobi killed a man 'Good ending' \n" << endl; + break; + } + } + +} diff --git a/src/TobeeRPG.h b/src/TobeeRPG.h new file mode 100644 index 0000000..1936e48 --- /dev/null +++ b/src/TobeeRPG.h @@ -0,0 +1 @@ +void RPG(); diff --git a/src/main.cpp b/src/main.cpp index 840a987..ae12443 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,43 +3,9 @@ */ #include +#include "TobeeRPG.h" using namespace std; -void RPG(){ - int TobiHP = 10; - int BadGuyHP = 5; - // makes a variable for user input - int UsrIn; - cout << "'GIMME YO FUCKIN' MONEY' said the badguy\n"; - cout << "You need to help him\n"; - // this is an infinite loop - while (true){ - cout << "Tobi's HP is: " << TobiHP << endl; - cout << "BadDude's HP is: " << BadGuyHP << endl; - cout << "You can type 1 to kick the guys dick or type 2 to do nothing: "; - // this reads the number you typed and then writes it to the variable UsrIn - cin >> UsrIn; - if(UsrIn==1){ - cout << "Tobi used dick kick\n"; - BadGuyHP -= 4; - cout << "BadDude says 'Ow My fuckin dick'\n"; - } else if(UsrIn==2){ - cout << "BadDude used FUCKING LEAD TO THE HEAD!!!!!!\n"; - TobiHP -= 999999; - cout << "BadDude says 'Fuckin loser scrub cunt wanker bitch'\n"; - } - if (TobiHP<=0) { - cout << "Tobi fucking died 'Best ending' \n" << endl; - // break ends the loop - break; - } else if (BadGuyHP<=0) { - cout << "Tobi killed a man 'Good ending' \n" << endl; - break; - } - } - -} - void PrgEnd() { string Name; // this makes a string called name cout << "To exit the program please type your name: "; From 98e9aef96528b58027b9262f37dadce9771e0f55 Mon Sep 17 00:00:00 2001 From: Mark B Date: Thu, 12 Aug 2021 14:05:34 -0400 Subject: [PATCH 2/3] added an icon on windows --- Makefile | 36 +++++----- README.md | 36 +++++----- compileWindows.bat | 2 + res/icon.ico | Bin 0 -> 16958 bytes res/icon.o | Bin 0 -> 17238 bytes res/main.rc | 1 + res_src/Tobi RPG Ico-20210812-132500.piskel | 1 + res_src/Tobi RPG Ico.png | Bin 0 -> 456 bytes src/RPG.cpp | 76 ++++++++++---------- src/TobeeRPG.h | 2 +- src/main.cpp | 50 ++++++------- 11 files changed, 104 insertions(+), 100 deletions(-) create mode 100644 compileWindows.bat create mode 100644 res/icon.ico create mode 100644 res/icon.o create mode 100644 res/main.rc create mode 100644 res_src/Tobi RPG Ico-20210812-132500.piskel create mode 100644 res_src/Tobi RPG Ico.png diff --git a/Makefile b/Makefile index 5f9ede6..44bc658 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,18 @@ -#COPYRIGHT no one cares lol - -#files to compile - -OBJS = src/main.cpp src/TobeeRPG.h src/RPG.cpp - -#compiler to use - -CC = g++ - -#name of muh bin lel - -OBJ_NAME = TobeeRPG - -#no regerts cuz its all together now - -all : $(OBJS) - $(CC) $(OBJS) -o $(OBJ_NAME) +#COPYRIGHT no one cares lol + +#files to compile + +OBJS = src/main.cpp src/TobeeRPG.h src/RPG.cpp + +#compiler to use + +CC = g++ + +#name of muh bin lel + +OBJ_NAME = TobeeRPG + +#no regerts cuz its all together now + +all : $(OBJS) + $(CC) $(OBJS) -o $(OBJ_NAME) diff --git a/README.md b/README.md index 193c030..1962041 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ -THIS GAME/CODE CONTAINS CURSE WORDS AND OTHER OBSCENITIES - -This is game I made for my good friend Tobi -To build you need git,make, and g++ - -Building - -1. git clone https://gitdab.com/Canneddonuts/Tobee_RPG -2. cd Tobee_RPG -3. make - -To run - -*nix -./TobeeRPG - -windows -TobeeRPG.exe +THIS GAME/CODE CONTAINS CURSE WORDS AND OTHER OBSCENITIES + +This is game I made for my good friend Tobi +To build you need git,make, and g++ + +Building + +1. git clone https://gitdab.com/Canneddonuts/Tobee_RPG +2. cd Tobee_RPG +3. make + +To run + +*nix +./TobeeRPG + +windows +TobeeRPG.exe diff --git a/compileWindows.bat b/compileWindows.bat new file mode 100644 index 0000000..1fa08ca --- /dev/null +++ b/compileWindows.bat @@ -0,0 +1,2 @@ +@echo off +g++ src/main.cpp src/TobeeRPG.h src/RPG.cpp res/icon.o -o TobeeRPG.exe \ No newline at end of file diff --git a/res/icon.ico b/res/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..6eb4ad14397dafd4867257057af7af2fb90aa84c GIT binary patch literal 16958 zcmeI4QEnSC3`FJj4*l+DjuG@^y?Ed*TM&3*NQ%;`&c?e59F54CA*r>EB#WfA+xGeT z+P1Gh+sm)kezewJw#OD~zqg0P|9-swTln>M`+h&`qusu}pS_v=v!Bh`<~7%|nf+N` z2j`vpWUu$@`TqX>{yLA7pT}cg|8H;iyFR|kd#?5?Yu0mxSK(weJ|kD@nH<4UpX5cH zqs4nYGp{(BLG!XkoTJ6Fo|#je^{*URGv1MMQO}Gk?)9xaS$o{0=n0XStDjnUCb?)#Eb% zXkApBeFz?%$?AK1?Zfgk-dm~baicsvh?UQnV2yjL<@WaKVR;&lR?C-t#O=j8q5(#HAdnU zKXL>|{^X5vD%!|%PrOo>9KlgN@a+;_0f2BwfdQTwU+X-8p^4z)~l*hp4HFn)vLN@HL4!Ui@Y@7TO<7y zKgvD-$Nv8P!*y>*Iftu{57%b;>zdgGhKhqLY$pfm6v&Z zc8)W6IO~u6jCbT5XUMQO1NmOQ5?kS+b?Bv7bJ40iSuH2a3AdNGe%^ky2mOe>+PxWi z`d&V&$@m@*YO9#FpKX3So1IV2$Z~jYBRT7BwbgxAKl7l@n~U0v%N#X=vs@)_{k(mz zhNqdS9o32Al^U5g>f6R=JZ3b}Jeilx+57i4Z)dCQXFO&!mHFvwu{R4jUcM5W@tDzE z^ZV~-Jj)Dw*OGiMUy03l%xEgtpZ!*9R50QCIbt<~gs9&i`PGyc+4(miX@+RNq1b^>JT?M<|i|$wLsZZ_y o>~XpGqWiG>=ePHx?cUsv+uL{Wd|ZCM(Q|X_pZ^Qs!sk1IKSH3-1poj5 literal 0 HcmV?d00001 diff --git a/res/icon.o b/res/icon.o new file mode 100644 index 0000000000000000000000000000000000000000..a9e944c1bf557532192a7a8263de1ccf7885c8a6 GIT binary patch literal 17238 zcmeHPL2eUK4E@tYs@SmN04%#eh$Raa0ai$WxC0y3pP%hNNmLkhJ`O{oWAi?x16mI+ufJb^-Fpu&zu%?wCc_t*L&rrv zH|f<+!vBtow91R;DQ%x-`z70K;28G$uND83bxJ>gNsxNk=AUl{|0c)R=~H@}KBUhX z({Y>6tK2IezcPNti)^p*xyk1?p96JD$7cU}^fC;q-CWN!TpZ7y#QNO#W^VI}>zTxQ zuAhVX&ONiw`|^H2{=Q%KW9IvD+Ry*p-EPO{WBJbIe#v@0M|csASK}dKk)Dx5*yME?DU^-8^HHP9!uFy>**YsH?v7ptk~=}-){ zN?eSeI?t+&eGsmlN#>W<+=t|`zhp75#I@q6ftdN|Bg}ryN^WV*8j{C;%St}2EpEwQ z(vopcPjX9Z)Iu)$31iH{GAFv0dRiWGv^e`BJd0!bNgHDp<{oM->RGuFj_k8m%d3Gg z#8! zryJpo^zJ@7mla_$9^m)k9QSUS|MA^l?D;-Dr|XZi zAolhv%JVcHI)*c7*y|7Z9&gGqoWaA|49M5w5nm4tu7g^PIc8brk(C@TM%+?d>S^oV z8mNa@t6iF*lwXQlHPJst19PJoYoFWvayB_1?UCf*zSYE}w#<#Lz51R8=4o?buE)g~ z<`DK`k+{^;)}cH|6a!BY>{<~MoUg)e$>4C@8!Cb;xKP3*vG2ikdrw1NW2XmuX_KbNLv;4^EfqT?J z4GUYnA|E-HA2~g6&pN2ZxYQ%_$RgMBBc~Okb_BQ9iR3**{YXvZMCNGaU>yrv+Q?Tq z#^1YQUIeS!o$gnSsgJq;v&Zh*o$kYqpI_dOmTPf8ZfxJi`?34}TJO!=|Ixz$mc0FZc`0g?+L#lPj60?=q<69Ck$R9a&x z03^pO0A;WL%UuG1lg|M_Y8L^JL<<1$@C<+eSP-C|pXLBS#vzB@v>i}tT{PD$Kr2Em zXDI;WFf$E6foK_P7T_NQWy}zO(SdFqHvnk&m;tCkxB=jz1wa4rP`XiCRnoNYp z4o7i-w@GIOXju=s3?l8{TBr$t>x4Z3sIA=v;GC3Om<9l4%Zc6zN)*(49Qi6R8UPJ3 z0PU9S3y|>p00aRAkU$XafVYA)0knd3CrCwD4uFcVBtQwl9RLC~`hzzENQQfW*&=%f yaNhv|;2j{&fB?At8XW%L+?^wPe>|SIbbJ9FLCl#|%JJX;0000 -#include "TobeeRPG.h" -using namespace std; - -void RPG(){ - int TobiHP = 10; - int BadGuyHP = 5; - // makes a variable for user input - int UsrIn; - cout << "'GIMME YO FUCKIN' MONEY' said the badguy\n"; - cout << "You need to help him\n"; - // this is an infinite loop - while (true){ - cout << "Tobi's HP is: " << TobiHP << endl; - cout << "BadDude's HP is: " << BadGuyHP << endl; - cout << "You can type 1 to kick the guys dick or type 2 to do nothing: "; - // this reads the number you typed and then writes it to the variable UsrIn - cin >> UsrIn; - if(UsrIn==1){ - cout << "Tobi used dick kick\n"; - BadGuyHP -= 2; - cout << "BadDude says 'Ow My fuckin dick'\n"; - } else if(UsrIn==2){ - cout << "BadDude used FUCKING LEAD TO THE HEAD!!!!!!\n"; - TobiHP -= 999999; - cout << "BadDude says 'Fuckin loser scrub cunt wanker bitch'\n"; - } - if (TobiHP<=0) { - cout << "Tobi fucking died 'Best ending' \n" << endl; - // break ends the loop - break; - } else if (BadGuyHP<=0) { - cout << "Tobi killed a man 'Good ending' \n" << endl; - break; - } - } - -} +#include +#include "TobeeRPG.h" +using namespace std; + +void RPG(){ + int TobiHP = 10; + int BadGuyHP = 5; + // makes a variable for user input + int UsrIn; + cout << "'GIMME YO FUCKIN' MONEY' said the badguy\n"; + cout << "You need to help him\n"; + // this is an infinite loop + while (true){ + cout << "Tobi's HP is: " << TobiHP << endl; + cout << "BadDude's HP is: " << BadGuyHP << endl; + cout << "You can type 1 to kick the guys dick or type 2 to do nothing: "; + // this reads the number you typed and then writes it to the variable UsrIn + cin >> UsrIn; + if(UsrIn==1){ + cout << "Tobi used dick kick\n"; + BadGuyHP -= 2; + cout << "BadDude says 'Ow My fuckin dick'\n"; + } else if(UsrIn==2){ + cout << "BadDude used FUCKING LEAD TO THE HEAD!!!!!!\n"; + TobiHP -= 999999; + cout << "BadDude says 'Fuckin loser scrub cunt wanker bitch'\n"; + } + if (TobiHP<=0) { + cout << "Tobi fucking died 'Best ending' \n" << endl; + // break ends the loop + break; + } else if (BadGuyHP<=0) { + cout << "Tobi killed a man 'Good ending' \n" << endl; + break; + } + } + +} diff --git a/src/TobeeRPG.h b/src/TobeeRPG.h index 1936e48..ff89617 100644 --- a/src/TobeeRPG.h +++ b/src/TobeeRPG.h @@ -1 +1 @@ -void RPG(); +void RPG(); diff --git a/src/main.cpp b/src/main.cpp index ae12443..8cc0ed5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,25 +1,25 @@ -/* This code has no license so you can do whatever you want with it. - made by M-C-O-B 2021 - */ - -#include -#include "TobeeRPG.h" -using namespace std; - -void PrgEnd() { - string Name; // this makes a string called name - cout << "To exit the program please type your name: "; - cin >> Name; // this gets what you typed - cout << "Thanks for playing: " << Name << endl;// this displays what you type -} - -int main(){ - cout << "Tobi was walking home from his long ass walk" << endl; - cout << "Then FROM OUTTA NOWHERE HE GOT JUMPED BY SOME ASSHOLE\n" << endl; - cout << "To play just type a number then hit enter" << endl; - cout << "Oh yeah if you type a letter the game fuckin breaks, enjoy\n" << endl; - RPG(); - cout << "Happy Birthday Tobi\n"; - PrgEnd(); - return 0; -} +/* This code has no license so you can do whatever you want with it. + made by M-C-O-B 2021 + */ + +#include +#include "TobeeRPG.h" +using namespace std; + +void PrgEnd() { + string Name; // this makes a string called name + cout << "To exit the program please type your name: "; + cin >> Name; // this gets what you typed + cout << "Thanks for playing: " << Name << endl;// this displays what you type +} + +int main(){ + cout << "Tobi was walking home from his long ass walk" << endl; + cout << "Then FROM OUTTA NOWHERE HE GOT JUMPED BY SOME ASSHOLE\n" << endl; + cout << "To play just type a number then hit enter" << endl; + cout << "Oh yeah if you type a letter the game fuckin breaks, enjoy\n" << endl; + RPG(); + cout << "Happy Birthday Tobi\n"; + PrgEnd(); + return 0; +} From cdf022c8ce2cd16f675c150e9f74c416b4f44495 Mon Sep 17 00:00:00 2001 From: Mark B Date: Sat, 30 Oct 2021 16:48:46 -0400 Subject: [PATCH 3/3] fixed dumb mistake in the Makefile --- .gitignore | 1 + Makefile | 2 +- README.md | 17 +++++++++-------- compileWindows.bat | 2 +- src/{main.cpp => Main.cpp} | 20 ++++++++++++-------- src/RPG.cpp | 1 - src/RPG.h | 3 +++ src/TobeeRPG.h | 1 - 8 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 .gitignore rename src/{main.cpp => Main.cpp} (63%) create mode 100644 src/RPG.h delete mode 100644 src/TobeeRPG.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ccfea4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +TobeeRPG diff --git a/Makefile b/Makefile index 44bc658..d277d1a 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ #files to compile -OBJS = src/main.cpp src/TobeeRPG.h src/RPG.cpp +OBJS = src/Main.cpp src/RPG.cpp #compiler to use diff --git a/README.md b/README.md index 1962041..b1a7e0a 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,19 @@ +# TobeeRPG THIS GAME/CODE CONTAINS CURSE WORDS AND OTHER OBSCENITIES -This is game I made for my good friend Tobi -To build you need git,make, and g++ +

This is game I made for my good friend Tobi

+

To build you need git, make, and g++

-Building +## Building -1. git clone https://gitdab.com/Canneddonuts/Tobee_RPG +1. git clone https://gitdab.com/Canneddonuts/Tobee_RPG.git 2. cd Tobee_RPG -3. make +3. make "or run the compileWindows.bat file on windows" -To run +## To run -*nix +### *nix ./TobeeRPG -windows +### Windows TobeeRPG.exe diff --git a/compileWindows.bat b/compileWindows.bat index 1fa08ca..b901db4 100644 --- a/compileWindows.bat +++ b/compileWindows.bat @@ -1,2 +1,2 @@ @echo off -g++ src/main.cpp src/TobeeRPG.h src/RPG.cpp res/icon.o -o TobeeRPG.exe \ No newline at end of file +g++ src/Main.cpp src/RPG.cpp res/icon.o -o TobeeRPG.exe diff --git a/src/main.cpp b/src/Main.cpp similarity index 63% rename from src/main.cpp rename to src/Main.cpp index 8cc0ed5..c107a5b 100644 --- a/src/main.cpp +++ b/src/Main.cpp @@ -1,17 +1,14 @@ /* This code has no license so you can do whatever you want with it. made by M-C-O-B 2021 */ - #include -#include "TobeeRPG.h" using namespace std; -void PrgEnd() { - string Name; // this makes a string called name - cout << "To exit the program please type your name: "; - cin >> Name; // this gets what you typed - cout << "Thanks for playing: " << Name << endl;// this displays what you type -} +#include "RPG.h" + + +// makes a function called PrgEnd +void PrgEnd(); int main(){ cout << "Tobi was walking home from his long ass walk" << endl; @@ -23,3 +20,10 @@ int main(){ PrgEnd(); return 0; } + +void PrgEnd(){ + string Name; // this makes a string called name + cout << "To exit the program please type your name: "; + cin >> Name; // this gets what you typed + cout << "Thanks for playing: " << Name << endl;// this displays what you type +} diff --git a/src/RPG.cpp b/src/RPG.cpp index fb26f14..9241c39 100644 --- a/src/RPG.cpp +++ b/src/RPG.cpp @@ -1,5 +1,4 @@ #include -#include "TobeeRPG.h" using namespace std; void RPG(){ diff --git a/src/RPG.h b/src/RPG.h new file mode 100644 index 0000000..44d5b82 --- /dev/null +++ b/src/RPG.h @@ -0,0 +1,3 @@ +#pragma once + +void RPG(); diff --git a/src/TobeeRPG.h b/src/TobeeRPG.h deleted file mode 100644 index ff89617..0000000 --- a/src/TobeeRPG.h +++ /dev/null @@ -1 +0,0 @@ -void RPG();