-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 908cf15
Showing
54 changed files
with
6,011 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1"?> | ||
<map> | ||
<room> | ||
<name>Entrance</name> | ||
<description>Room - Entrance</description> | ||
<border> | ||
<direction>north</direction> | ||
<name>Main</name> | ||
</border> | ||
<item>axe</item> | ||
</room> | ||
<room> | ||
<name>Main</name> | ||
<creature>dragon</creature> | ||
<item>sword</item> | ||
<description>Room - Main</description> | ||
<border> | ||
<direction>south</direction> | ||
<name>Entrance</name> | ||
</border> | ||
<border> | ||
<direction>north</direction> | ||
<name>Staircase</name> | ||
</border> | ||
</room> | ||
<room> | ||
<type>exit</type> | ||
<name>Staircase</name> | ||
<description>Room - Staircase (exit)</description> | ||
<border> | ||
<name>Main</name> | ||
<direction>south</direction> | ||
</border> | ||
<container>bottle</container> | ||
</room> | ||
<item> | ||
<name>sword</name> | ||
</item> | ||
<item> | ||
<name>note</name> | ||
<writing>You found the exit :-)</writing> | ||
</item> | ||
<item> | ||
<name>axe</name> | ||
</item> | ||
<container> | ||
<name>bottle</name> | ||
<item>note</item> | ||
</container> | ||
<creature> | ||
<name>giant</name> | ||
<vulnerability>sword</vulnerability> | ||
<vulnerability>axe</vulnerability> | ||
<attack> | ||
<action>Game Over</action> | ||
</attack> | ||
</creature> | ||
<creature> | ||
<name>dragon</name> | ||
<vulnerability>sword</vulnerability> | ||
<vulnerability>axe</vulnerability> | ||
<attack> | ||
<action>Add giant to Main</action> | ||
<action>s</action> | ||
<print>Giant scares you away</print> | ||
<action>Delete dragon</action> | ||
</attack> | ||
</creature> | ||
</map> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "Condition.h" | ||
|
||
Condition::Condition(rapidxml::xml_node<>* conditionNode) { | ||
string xmlname; | ||
string xmldata; | ||
|
||
conditionNode = conditionNode->first_node(); | ||
while (conditionNode != NULL) { | ||
xmlname = conditionNode->name(); | ||
xmldata = conditionNode->value(); | ||
|
||
|
||
if (xmlname == "object") | ||
this->object = xmldata; | ||
|
||
else if (xmlname == "status") | ||
this->status = xmldata; | ||
|
||
else if (xmlname == "has" ) | ||
this->has = xmldata; | ||
|
||
else if (xmlname == "owner") | ||
this->owner = xmldata; | ||
|
||
conditionNode = conditionNode->next_sibling(); | ||
} | ||
|
||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef CONDITION_H_ | ||
#define CONDITION_H_ | ||
|
||
#include <vector> | ||
#include <string> | ||
#include <stdio.h> | ||
#include <iostream> | ||
#include "rapidxml.hpp" | ||
#include <map> | ||
|
||
using namespace std; | ||
class Condition { | ||
public: | ||
string has; | ||
string object; | ||
string owner; | ||
string status; | ||
|
||
Condition(rapidxml::xml_node<>*); | ||
|
||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#include "Container.h" | ||
|
||
Container::Container(rapidxml::xml_node<>* containerNode) { | ||
|
||
string xmlname; | ||
string xmldata; | ||
opened = false; | ||
this->trigger = new Trigger(); | ||
containerNode = containerNode->first_node(); | ||
while (containerNode != NULL) { | ||
xmlname = containerNode->name(); | ||
xmldata = containerNode->value(); | ||
|
||
|
||
if (xmlname == "name") | ||
this->name = xmldata; | ||
|
||
else if (xmlname == "status") | ||
this->status = xmldata; | ||
|
||
else if (xmlname == "description") | ||
this->description = xmldata; | ||
|
||
else if (xmlname == "item") | ||
this->items.push_back(xmldata); | ||
|
||
else if (xmlname == "accept") | ||
this->accepted.push_back(xmldata); | ||
else if (xmlname == "trigger") | ||
this->trigger = new Trigger(containerNode); | ||
|
||
containerNode = containerNode->next_sibling(); | ||
} | ||
|
||
|
||
|
||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#ifndef CONTAINER_H_ | ||
#define CONTAINER_H_ | ||
|
||
#include <vector> | ||
#include <string> | ||
#include <stdio.h> | ||
#include <iostream> | ||
#include "rapidxml.hpp" | ||
#include <map> | ||
#include "Trigger.h" | ||
|
||
using namespace std; | ||
|
||
class Container { | ||
|
||
public: | ||
Container(rapidxml::xml_node<>*); | ||
//virtual ~Container(); | ||
|
||
string name; | ||
string description; | ||
string status; | ||
bool opened; | ||
Trigger* trigger; | ||
|
||
vector<string> accepted; | ||
vector<string> items; | ||
//trigger | ||
|
||
|
||
|
||
|
||
|
||
|
||
}; | ||
|
||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#include "Creature.h" | ||
|
||
Creature::Creature(rapidxml::xml_node<>* creatureNode) { | ||
|
||
string xmlname; | ||
string xmldata; | ||
rapidxml::xml_node<> * attacknode; | ||
this->trigger = new Trigger(); | ||
creatureNode = creatureNode->first_node(); | ||
while (creatureNode != NULL) { | ||
xmlname = creatureNode->name(); | ||
xmldata = creatureNode->value(); | ||
|
||
|
||
if (xmlname == "name") | ||
this->name = xmldata; | ||
|
||
else if (xmlname == "status") | ||
this->status = xmldata; | ||
|
||
else if (xmlname == "description") | ||
this->description = xmldata; | ||
else if (xmlname == "vulnerability") | ||
this->vulnerabilities.push_back(xmldata); | ||
|
||
else if (xmlname == "attack") { | ||
attacknode = creatureNode->first_node(); | ||
while (attacknode != NULL) { | ||
xmlname = attacknode->name(); | ||
xmldata = attacknode->value(); | ||
if (xmlname == "print") | ||
this->attackPrints.push_back(xmldata); | ||
else if (xmlname == "action") | ||
this->attackActions.push_back(xmldata); | ||
else if (xmlname == "condition") | ||
{ | ||
this->conditions.push_back(new Condition(attacknode)); | ||
|
||
} | ||
attacknode = attacknode->next_sibling(); | ||
|
||
} | ||
|
||
|
||
} | ||
else if (xmlname == "trigger") { | ||
this->trigger = new Trigger(creatureNode); | ||
|
||
} | ||
|
||
creatureNode = creatureNode->next_sibling(); | ||
} | ||
|
||
|
||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#ifndef CREATURE_H_ | ||
#define CREATURE_H_ | ||
|
||
#include <vector> | ||
#include <string> | ||
#include <stdio.h> | ||
#include <iostream> | ||
#include "rapidxml.hpp" | ||
#include <map> | ||
#include "Condition.h" | ||
#include "Trigger.h" | ||
|
||
using namespace std; | ||
|
||
class Creature { | ||
|
||
public: | ||
Creature(rapidxml::xml_node<>*); | ||
//virtual ~Creature(); | ||
|
||
string name; | ||
string description; | ||
string status; | ||
|
||
Trigger* trigger; | ||
|
||
vector<string> vulnerabilities; | ||
vector<string> attackPrints; | ||
vector<string> attackActions; | ||
vector<Condition*> conditions; | ||
//trigger | ||
|
||
|
||
|
||
|
||
|
||
|
||
}; | ||
|
||
|
||
#endif | ||
|
||
#pragma once |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\vc140.pdb | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\vc140.idb | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\condition.obj | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\container.obj | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\creature.obj | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\item.obj | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\main.obj | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\room.obj | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\trigger.obj | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\zork_gameengine.obj | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\zork_resourcemanager.obj | ||
c:\users\scott\documents\visual studio 2015\projects\zork\debug\zork.ilk | ||
c:\users\scott\documents\visual studio 2015\projects\zork\debug\zork.exe | ||
c:\users\scott\documents\visual studio 2015\projects\zork\debug\zork.pdb | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\zork.tlog\cl.command.1.tlog | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\zork.tlog\cl.read.1.tlog | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\zork.tlog\cl.write.1.tlog | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\zork.tlog\link.command.1.tlog | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\zork.tlog\link.read.1.tlog | ||
c:\users\scott\documents\visual studio 2015\projects\zork\zork\debug\zork.tlog\link.write.1.tlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Zork.vcxproj -> C:\Users\scott\Documents\Visual Studio 2015\Projects\Zork\Debug\Zork.exe |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 | ||
Debug|Win32|C:\Users\scott\Documents\Visual Studio 2015\Projects\Zork\| |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.