From 6be16a213c31cca9397b19d8ac83883402ff31a8 Mon Sep 17 00:00:00 2001 From: Tyrel Souza <923113+tyrelsouza@users.noreply.github.com> Date: Thu, 21 May 2020 12:29:50 -0400 Subject: [PATCH] Initial commit --- Hallo.dev | 159 ++++++++++++++++++++++++++ Hallo.layout | 80 +++++++++++++ Makefile.win | 45 ++++++++ exits.cpp | 1 + exits.h | 6 + exits.o | Bin 0 -> 288 bytes items.cpp | 1 + items.h | 10 ++ items.o | Bin 0 -> 288 bytes main.cpp | 315 +++++++++++++++++++++++++++++++++++++++++++++++++++ main.o | Bin 0 -> 43541 bytes monsters.cpp | 1 + monsters.h | 9 ++ monsters.o | Bin 0 -> 288 bytes room.cpp | 1 + room.h | 82 ++++++++++++++ room.o | Bin 0 -> 1587 bytes secrets.cpp | 1 + secrets.h | 6 + secrets.o | Bin 0 -> 288 bytes 20 files changed, 717 insertions(+) create mode 100755 Hallo.dev create mode 100755 Hallo.layout create mode 100755 Makefile.win create mode 100755 exits.cpp create mode 100755 exits.h create mode 100755 exits.o create mode 100755 items.cpp create mode 100755 items.h create mode 100755 items.o create mode 100755 main.cpp create mode 100755 main.o create mode 100755 monsters.cpp create mode 100755 monsters.h create mode 100755 monsters.o create mode 100755 room.cpp create mode 100755 room.h create mode 100755 room.o create mode 100755 secrets.cpp create mode 100755 secrets.h create mode 100755 secrets.o diff --git a/Hallo.dev b/Hallo.dev new file mode 100755 index 0000000..ed362cf --- /dev/null +++ b/Hallo.dev @@ -0,0 +1,159 @@ +[Project] +FileName=Hallo.dev +Name=Hallo +UnitCount=11 +Type=1 +Ver=1 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker= +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +OverrideOutput=0 +OverrideOutputName= +HostApplication= +Folders= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings= + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + +[Unit2] +FileName=room.h +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=room.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=monsters.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=monsters.h +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit6] +FileName=secrets.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit7] +FileName=secrets.h +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit8] +FileName=exits.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit9] +FileName=exits.h +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit10] +FileName=items.h +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit11] +FileName=items.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/Hallo.layout b/Hallo.layout new file mode 100755 index 0000000..0aa202f --- /dev/null +++ b/Hallo.layout @@ -0,0 +1,80 @@ +[Editor_10] +CursorCol=1 +CursorRow=1 +TopLine=1 +LeftChar=1 +Open=0 +Top=0 +[Editor_9] +CursorCol=1 +CursorRow=3 +TopLine=1 +LeftChar=1 +Open=0 +Top=0 +[Editor_7] +CursorCol=19 +CursorRow=1 +TopLine=1 +LeftChar=1 +Open=0 +Top=0 +[Editor_8] +CursorCol=1 +CursorRow=3 +TopLine=1 +LeftChar=1 +Open=0 +Top=0 +[Editor_5] +CursorCol=21 +CursorRow=1 +TopLine=1 +LeftChar=1 +Open=0 +Top=0 +[Editor_6] +CursorCol=1 +CursorRow=3 +TopLine=1 +LeftChar=1 +Open=0 +Top=0 +[Editor_3] +CursorCol=22 +CursorRow=1 +TopLine=1 +LeftChar=1 +Open=0 +Top=0 +[Editor_4] +CursorCol=1 +CursorRow=3 +TopLine=1 +LeftChar=1 +Open=0 +Top=0 +[Editor_2] +CursorCol=1 +CursorRow=1 +TopLine=1 +LeftChar=1 +Open=1 +Top=0 +[Editor_1] +CursorCol=47 +CursorRow=46 +TopLine=28 +LeftChar=1 +Open=1 +Top=1 +[Editors] +Focused=1 +Order=0,1,2 +[Editor_0] +Open=1 +Top=0 +CursorCol=37 +CursorRow=191 +TopLine=182 +LeftChar=1 diff --git a/Makefile.win b/Makefile.win new file mode 100755 index 0000000..e165649 --- /dev/null +++ b/Makefile.win @@ -0,0 +1,45 @@ +# Project: Hallo +# Makefile created by Dev-C++ 4.9.9.2 + +CPP = g++.exe +CC = gcc.exe +WINDRES = windres.exe +RES = +OBJ = main.o room.o monsters.o secrets.o exits.o items.o $(RES) +LINKOBJ = main.o room.o monsters.o secrets.o exits.o items.o $(RES) +LIBS = -L"C:/Dev-Cpp/lib" +INCS = -I"C:/Dev-Cpp/include" +CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" +BIN = Hallo.exe +CXXFLAGS = $(CXXINCS) +CFLAGS = $(INCS) +RM = rm -f + +.PHONY: all all-before all-after clean clean-custom + +all: all-before Hallo.exe all-after + + +clean: clean-custom + ${RM} $(OBJ) $(BIN) + +$(BIN): $(OBJ) + $(CPP) $(LINKOBJ) -o "Hallo.exe" $(LIBS) + +main.o: main.cpp + $(CPP) -c main.cpp -o main.o $(CXXFLAGS) + +room.o: room.cpp + $(CPP) -c room.cpp -o room.o $(CXXFLAGS) + +monsters.o: monsters.cpp + $(CPP) -c monsters.cpp -o monsters.o $(CXXFLAGS) + +secrets.o: secrets.cpp + $(CPP) -c secrets.cpp -o secrets.o $(CXXFLAGS) + +exits.o: exits.cpp + $(CPP) -c exits.cpp -o exits.o $(CXXFLAGS) + +items.o: items.cpp + $(CPP) -c items.cpp -o items.o $(CXXFLAGS) diff --git a/exits.cpp b/exits.cpp new file mode 100755 index 0000000..3e80ec6 --- /dev/null +++ b/exits.cpp @@ -0,0 +1 @@ +#include "exits.h" diff --git a/exits.h b/exits.h new file mode 100755 index 0000000..f756147 --- /dev/null +++ b/exits.h @@ -0,0 +1,6 @@ +#ifndef EXITS_H_ +#define EXITS_H_ + + + +#endif diff --git a/exits.o b/exits.o new file mode 100755 index 0000000000000000000000000000000000000000..a4ad2af478b3929ab47be2ace29aa6885832d0a4 GIT binary patch literal 288 zcmeZaWM%+?9w6obvsfARN>VFIz--)v0s}*WUP@v~B5oyM83zW21A0lt#RQZwG=S8l zW#*(p75@9rz>vVFIz--)v0s}*WUP@v~B5oyM83zW21A0lt#RQZwG=S8l zW#*(p75@9rz>v +#include +#include +#include +#include + +#ifdef _WIN32 //windows includes + #include +#endif //end windows includes + +#include "room.cpp" +#include "monsters.cpp" +#include "secrets.cpp" +#include "exits.cpp" +#include "items.cpp" +using namespace std; + + +//VARIABLES + +const int NORTH = 8; +const int SOUTH = 4; +const int EAST = 2; +const int WEST = 1; + +const int OPEN = 1; +const int CLOSE = 2; + +bool gameRun = true; +string PROMPT; +string prompt; +int currentX,currentY; +vector > room(5, vector(5)); +// END VARIABLES + + +//FUNCTIONS +void cls(); +void move(int dir); +void checkMove(int dir); +void showMap(); +void checkPrompt(string pmp); +void showHelp(); +void initialize(); +void ShowExits(); +void jumpTo(int x,int y); +void openCloseExit(int dir, int oc); +//END FUNCTIONS + + + + + +int main(int argc, char *argv[]) +{ + initialize(); + + while(gameRun){ + cout<0){ + cout<<"There are exits to the..."; + if((room[currentX][currentY].Exits() & NORTH) == NORTH){cout<<"\nnorth"; } + if((room[currentX][currentY].Exits() & SOUTH) == SOUTH){cout<<"\nsouth"; } + if((room[currentX][currentY].Exits() & EAST) == EAST){cout<<"\neast"; } + if((room[currentX][currentY].Exits() & WEST) == WEST){cout<<"\nwest"; } + cout<<"\n"; + } else { + cout << "All of the doors are closed."; + } +} + + +void openCloseExit(int dir, int oc){ + + int state = room[currentX][currentY].opencloseExit(dir,oc); + // cout << state; + + switch (oc) + { + case 1: + switch (state){ + case 1: + cout <<"Something clicks..."; + break; + case 2: + cout <<"Dude... that's a wall."; + break; + case 3: + cout <<"Nothing Happened."; + break; + } + break; + case 2: + switch (state){ + case 1: + cout <<"...Thud..."; + break; + case 2: + cout <<"Dude... that's a wall."; + break; + case 3: + cout <<"Nothing Happened."; + break; + } + break; + } +} + + + + + + + +void showHelp(){ + cls(); + cout<<"Welcome Tyrel's Game\n" + <<"\t-To Begin, Try going in a direction\n" + <<"\t\t\"north\",\"south\",\"east\" or \"west\"\n" + <<"\t-There is also a \"map\"\n" + <<"\tIf you are lost, try \"look\""; + +} + +void showMap(){ + cls(); + for(int y=0; y<5;y++){ + for (int x = 0; x <5;x++){ + if(room[x][y].InRoom()){ + cout<< "(X)\t"; + } else { + cout << "(.)\t";//room[x][y].Exits() << "\t"; + } + } + cout << "\n\n"; + } +} + + + +//this will clear the screen +void cls() +{ + #ifdef _WIN32 + HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + COORD coord = {0, 0}; + DWORD count; + CONSOLE_SCREEN_BUFFER_INFO csbi; + GetConsoleScreenBufferInfo(hStdOut, &csbi); + FillConsoleOutputCharacter(hStdOut, ' ', + csbi.dwSize.X * csbi.dwSize.Y, + coord, &count); + SetConsoleCursorPosition(hStdOut, coord); + #else + cout << "\f"; + #endif +} + +void initialize(){ + + room[0][0] = Room(false,SOUTH, 0, 0, 0); + room[0][1] = Room(false,NORTH+ SOUTH, 0, 0, 0); + room[0][2] = Room(false,NORTH+ EAST, 0, 0, 0); + room[0][3] = Room(false,SOUTH+ EAST, 0, 0, 0); + room[0][4] = Room(false,NORTH+ EAST, 0, 0, 0); + + room[1][0] = Room(false,SOUTH+ EAST, 0, 0, 0); + room[1][1] = Room(false,NORTH+ EAST, 0, 0, 0); + room[1][2] = Room(false,WEST + SOUTH, 0, 0, 0); + room[1][3] = Room(false,NORTH+ WEST, 0, 0, 0); + room[1][4] = Room(false,WEST + EAST, 0, 0, 0); + + room[2][0] = Room(false,WEST + EAST, 0, 0, 0); + room[2][1] = Room(false,WEST + SOUTH, 0, 0, 0); + room[2][2] = Room(false,NORTH+ SOUTH, 0, 0, 0); + room[2][3] = Room(false,NORTH+ SOUTH, 0, 0, 0); + room[2][4] = Room(false,NORTH+ WEST, 0, 0, 0); + + room[3][0] = Room(false,WEST + SOUTH, 0, 0, 0); + room[3][1] = Room(false,NORTH+ SOUTH, 0, 0, 0); + room[3][2] = Room(false,NORTH+ SOUTH, 0, 0, 0); + room[3][3] = Room(false,NORTH+ SOUTH, 0, 0, 0); + room[3][4] = Room(false,NORTH+ EAST, 0, 0, 0); + + room[4][0] = Room(true,SOUTH, 0, 0, 0); + room[4][1] = Room(false,NORTH+SOUTH, 0, 0, 0); + room[4][2] = Room(false,NORTH+SOUTH, 0, 0, 0); + room[4][3] = Room(false,NORTH+SOUTH, 0, 0, 0); + room[4][4] = Room(false,NORTH+WEST, 0, 0, 0); + + + currentX = 0; + currentY = 0; + PROMPT = "\nAction: "; + + room[currentX][currentY].enterRoom(); + cout <<"Hello, try \"help\" to get started.\n"; + +} diff --git a/main.o b/main.o new file mode 100755 index 0000000000000000000000000000000000000000..d9a1b3641553d54dd060a714ca5241d17ad80f2d GIT binary patch literal 43541 zcmdUY3t(JTwf31zC~1kL$Oy$-WvE;z2qBNjqXi^=9BBTQ5}O1ng3~mamXstDl1V8_ z<&mNthX`EZiWkHx2#CGfA1hXFl>)Uzey=>N{(uO*UWC+CsXU~5tG(aaYwvZQlTOmY zfByq>vd-GyT6?Xv*M6OIX1XA9u|>y%ODt?$j<>86kF>1J9A-QP zT->sjly|gc+6)MPC*#v`x{Cp_!LqiLFYWJlb1U2zn!XmeGZNl{CAiE4^);0Dc`M#i zWLY~xaA#Cic@&o7YOAmE_+)G68Ht(z?&&aGT~ObPVYnGH0{Vu-aFt#IH$mzx;J(nx z;&97S_Epw+3?x6+S2D(&8CU12m~flIa8(u6Mvne2z-MbHuBz6Jn~sag-Vm^TRW+WL zI}5ma;O^3XL~*U`tFG`!6D|YJ<^ZnR;|GOq18^^B9HlAin^6x^jyR~Dz`f$fC2Bm; zSH>a&fAr&Os_R4<2#R0A6DeJ9t+(Ccz%>B3*RQX()+0^zE&-?LLJ&B_kGg7)A5`zH z9!XtqeWj2@M;&jGhDh@0V#ANjEl zIQPMEuBmeSu>*kOTFaVn5hI=UsHq2A4r-6*z*rK%)h68fD9*RSkcTx+^0~6EDk0h| zi*WY?w>5~Xb(>9b-VEH&1GxHxU*9XhJr}^u@N`Vlw->nI263K&V>fVdIJR5kj-YFr z7pf{|xa*CBUy6pjcrgeZ;%`-D!W}@2;izJ{qbu8t|y4Ah1qg!0@VTBDvgtN ztE#SY<0ucN&J;04upiZ)yl;WwCj$4Z)<@%m#?`yKHN|h$nU>Y}3D)WOo0#G5M=dB` z2i(;fS1kH!tK9vU>Uj$|_rdkndg6Q;0L7Rb?g`XeSM827jgwt8iMS5dS6}HKho}u# z0rwrPPv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ietNu_ZGG+zG8J@rOeSzTfOL|-#IuH~fS7@cap|ybOd=iCL z(=Lib|&1Iq3hFvcbEs#A)z}6WAtlOlpP1JMGOjAveErNc?ihKXx?S> zB)(uo*@5f|sf_M?_}AS9hkY#i4z-bEXpRES^uH(Ph~>LqC@tV^r31oEEb>2Jaq5;P zrgc?pR9$K2?CC9Dv^aaW7Mh@Oaya~14JivjsZzYssn z6CPL)+@AWz!~=>Sgb4+V^!chUbnMS3U%+fIs;KcA%e{C1#TwN~-h+CKQ+Z$R&~I5# zf64cHfd55|d^peGb3l;WGG9NH5r!t7%D@wUZR^;C+|`9nUgjl;(IR0mMw$D5qW6tT z)xNIB7|JE})|u;tjQqo-f(O_7v=SV*Y%vxDRNfoMup;pYUU-RTdU&CXud3crTRjEx~%WVCH^7JUUkJ! zeCN==v`P@yv(|CElCK(d%rEjos*Y?rzYQiij>)ps(`f2j11flQcTckO=PAhrNClDC9Vw|LL+jt3sv{ zeoXFpOM})V;Sr}7IwkW)#W?@4E_O7^d)2w<0Y_TzgmK6YzQAHFlA3t(8H9sguAFl1vpeqk$l zUMka^>6nMNHM&v_33W~H4X3+O&Fy`uRL|@IdReZqXIZ+T-b$W}*Ryr;1p}Ghfy^9y z&8Mv$_0DRjf=SJ(j4qxt0Bif2()}2W(mfhO;m_u`)w#8e*<3Vdy84mF{%;xCi|Ec6-Xg`@C~3Uh9?aq7)!%G7N$?YXhVY#TPHHCfnOG?U%tg#ZX_S(yadm Da1>Q> literal 0 HcmV?d00001 diff --git a/monsters.cpp b/monsters.cpp new file mode 100755 index 0000000..d9d18e4 --- /dev/null +++ b/monsters.cpp @@ -0,0 +1 @@ +#include "monsters.h" diff --git a/monsters.h b/monsters.h new file mode 100755 index 0000000..dcc1d52 --- /dev/null +++ b/monsters.h @@ -0,0 +1,9 @@ +#ifndef MONSTERS_H_ +#define MONSTERS_H_ + + + + + + +#endif diff --git a/monsters.o b/monsters.o new file mode 100755 index 0000000000000000000000000000000000000000..38ba955b19ddd5a4682124030f45713fab727eea GIT binary patch literal 288 zcmeZaWM%+?9w6obvsfARN>VFIz--)v0s}*WUP@v~B5oyM83zW21A0lt#RQZwG=S8l zW#*(p75@9rz>v +using namespace std; +class Room { + bool isEnd; + int exits,newExits; + int secrets; + int monsters; + int items; + bool inRoom; + + public: + Room(bool ie,int e,int s,int m,int i) + { + isEnd = ie; + exits = e; + secrets = s; + monsters = m; + items = i; + inRoom=false; + newExits = e; + } + Room(){} + //facilitates opening and closing a door + + int opencloseExit(int ex, int oc){ + /* * * * * * * * * * * * * * * + * TO DO: + * FIX THE OPENING ALREADY OPEN/CLOSE + * + * + * * * * * * * * * * * * * * */ + + + + + if (oc == 2){ //close + if((oExits() & ex ) == ex ){ + if(newExits > exits ) { + + newExits = exits; + } + + newExits = newExits - ex; + + return 1; + } else { + return 2; + } + } + + if (oc==1){ //open + if((oExits() & ex ) == ex ){ + + newExits = newExits + ex; + + if(newExits > exits ) { + + newExits = exits; + + } + return 1; + + } else { + return 2; + } + } + } + void leaveRoom(){inRoom=false;} + void enterRoom(){inRoom = true;} + bool InRoom(){return inRoom;} + bool IsEnd(){return isEnd;} + int Exits(){return newExits;} + int nExits(){return newExits;} + int oExits(){return exits;} + int Secrets(){return secrets;} + int Monsters(){return monsters;} + int Items(){return items;} +}; +#endif /*FUNCS_H_*/ diff --git a/room.o b/room.o new file mode 100755 index 0000000000000000000000000000000000000000..05777b40ec2ff324d7e44e0525777c5c30d2137f GIT binary patch literal 1587 zcmah|%}*0i5P#dQq-wRq_<=Ddjj0Lou!^lvBr$ySp#&nt%7x3Lw1qqZUDDkWBx!`y z1I^mRgLkhSJa{l%MM)rB^k3j&Xi}5*z<~pCoq5}B7q{r7Z{EyrelzdQ>&}?eMo{i} z3ArgOSyJ@$iY{zRtx1H)us(Y%|2%9#LZ+2eLQh!GnYy2lZDmH&oP>6#Q@7WEcRzAE z&y7v5;J%Cw9;vMS5(2PiwohD(z8`V$gCQJ=S{H@>QaT4O+u2N6F$> zgZhlgvh*#mB|Y{8-fwTvYKhiNUx}7YQu$KI*N7ew>B^bu$L{pX?jD?kw|1Xq(_i}o zTeMm@kT&RHMc$={1pGs|0K)q_qJQ6d-fxFM;Wh zhRrt+1Y$lZo6*@0SU`I5*nueS|ysb?F literal 0 HcmV?d00001 diff --git a/secrets.cpp b/secrets.cpp new file mode 100755 index 0000000..f80eea9 --- /dev/null +++ b/secrets.cpp @@ -0,0 +1 @@ +#include "secrets.h" diff --git a/secrets.h b/secrets.h new file mode 100755 index 0000000..5eedf2e --- /dev/null +++ b/secrets.h @@ -0,0 +1,6 @@ +#ifndef SECRETS_H_ +#define SECRETS_H_ + + + +#endif diff --git a/secrets.o b/secrets.o new file mode 100755 index 0000000000000000000000000000000000000000..ab8c57a88271093649046ca4125fe8f88128bd9a GIT binary patch literal 288 zcmeZaWM%+?9w6obvsfARN>VFIz--)v0s}*WUP@v~B5oyM83zW21A0lt#RQZwG=S8l zW#*(p75@9rz>v;ZoSIyeT2ic+Tu=ZNM|K+{P>dNwpaEoeF#+YUszGuSC