Hi guys, im new to this forum but congratulations, i looks great

Im making a game for a TAFE class (which i will gladly send to any1). The game is a text based Role Playing Game. I am finished early so i am going to improve my current game. I was wondering whether i could add some sounds and pictures to my monsters.

struct monster
{
int strength;
int dexterity;
int hp;
char name[32];
};

That is my struct and i have an array of 4 monsters and a boss! Could i add something to the array, maybe monsterArray[].picture or monsterArray[].sound . Are there commands that allow pictures and sounds in a console application, if so can someone please tell me of them. Also feel free to get me to send you that game and/or source code!

Cheers, Peter :p

I think that is helpful to you .

# Microsoft Developer Studio Project File - Name="Sarien" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00

# TARGTYPE "Win32 (x86) Console Application" 0x0103

CFG=Sarien - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE 
!MESSAGE NMAKE /f "Sarien.mak".
!MESSAGE 
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE /f "Sarien.mak" CFG="Sarien - Win32 Debug"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "Sarien - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "Sarien - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE 

# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe

!IF  "$(CFG)" == "Sarien - Win32 Release"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /Zi /O1 /I "..\src\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "NATIVE_WIN32" /FR /YX /FD /c
# ADD BASE RSC /l 0x416 /d "NDEBUG"
# ADD RSC /l 0x416 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib /nologo /subsystem:windows /debug /machine:I386 /FIXED:NO
# SUBTRACT LINK32 /pdb:none

!ELSEIF  "$(CFG)" == "Sarien - Win32 Debug"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /Zi /Od /I "..\SRC\INCLUDE" /D "DEBUG" /D "WIN32" /D "_WINDOWS" /D "NATIVE_WIN32" /FR /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x416 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winmm.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no /debug /machine:I386 /pdbtype:sept /FIXED:NO
# SUBTRACT LINK32 /pdb:none

!ENDIF 

# Begin Target

# Name "Sarien - Win32 Release"
# Name "Sarien - Win32 Debug"
# Begin Group "Source Files"

# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Group "CORE_AGI"

# PROP Default_Filter "*.C"
# Begin Source File

SOURCE=..\src\core\agi.c
# End Source File
# Begin Source File

SOURCE=..\src\core\agi_v2.c
# End Source File
# Begin Source File

SOURCE=..\src\core\agi_v3.c
# End Source File
# Begin Source File

SOURCE=..\SRC\CORE\AGI_V4.C
# End Source File
# Begin Source File

SOURCE=..\src\core\checks.c
# End Source File
# Begin Source File

SOURCE=..\src\core\console.c
# End Source File
# Begin Source File

SOURCE=..\src\core\cycle.c
# End Source File
# Begin Source File

SOURCE=..\src\core\font.c
# End Source File
# Begin Source File

SOURCE=..\src\core\global.c
# End Source File
# Begin Source File

SOURCE=..\src\core\graphics.c
# End Source File
# Begin Source File

SOURCE=..\src\core\id.c
# End Source File
# Begin Source File

SOURCE=..\SRC\CORE\INV.C
# End Source File
# Begin Source File

SOURCE=..\src\core\keyboard.c
# End Source File
# Begin Source File

SOURCE=..\src\core\logic.c
# End Source File
# Begin Source File

SOURCE=..\src\core\lzw.c
# End Source File
# Begin Source File

SOURCE=..\src\core\menu.c
# End Source File
# Begin Source File

SOURCE=..\src\core\motion.c
# End Source File
# Begin Source File

SOURCE=..\src\core\objects.c
# End Source File
# Begin Source File

SOURCE=..\src\core\op_cmd.c
# End Source File
# Begin Source File

SOURCE=..\src\core\op_dbg.c
# End Source File
# Begin Source File

SOURCE=..\src\core\op_test.c
# End Source File
# Begin Source File

SOURCE=..\src\core\patches.c
# End Source File
# Begin Source File

SOURCE=..\src\core\picture.c
# End Source File
# Begin Source File

SOURCE=..\src\core\picview.c
# End Source File
# Begin Source File

SOURCE=..\src\core\rand.c
# End Source File
# Begin Source File

SOURCE=..\src\core\savegame.c
# End Source File
# Begin Source File

SOURCE=..\src\core\silent.c
# End Source File
# Begin Source File

SOURCE=..\src\core\sound.c
# End Source File
# Begin Source File

SOURCE=..\src\core\sprite.c
# End Source File
# Begin Source File

SOURCE=..\SRC\CORE\TEXT.C
# End Source File
# Begin Source File

SOURCE=..\src\core\view.c
# End Source File
# Begin Source File

SOURCE=..\src\core\win32\winmain.c
# End Source File
# Begin Source File

SOURCE=..\src\core\words.c
# End Source File
# End Group
# Begin Group "CONSOLE"

# PROP Default_Filter "*.c"
# Begin Source File

SOURCE=..\src\graphics\win32\win32.c
# End Source File
# End Group
# Begin Group "SOUND"

# PROP Default_Filter "*.C"
# Begin Source File

SOURCE=..\src\sound\win32\sound_win32.c
# End Source File
# End Group
# Begin Group "FILESYS"

# PROP Default_Filter "*.C"
# Begin Source File

SOURCE=..\src\filesys\win32\fileglob.c
# End Source File
# Begin Source File

SOURCE=..\src\filesys\win32\path.c
# End Source File
# End Group
# End Group
# Begin Group "Header Files"

# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File

SOURCE=..\src\include\agi.h
# End Source File
# Begin Source File

SOURCE=..\src\include\cli.h
# End Source File
# Begin Source File

SOURCE=..\src\include\config.h
# End Source File
# Begin Source File

SOURCE=..\src\include\console.h
# End Source File
# Begin Source File

SOURCE=..\src\include\defines.h
# End Source File
# Begin Source File

SOURCE=..\src\include\enums.h
# End Source File
# Begin Source File

SOURCE=..\src\include\font.h
# End Source File
# Begin Source File

SOURCE=..\src\include\getopt.h
# End Source File
# Begin Source File

SOURCE=..\src\include\graphics.h
# End Source File
# Begin Source File

SOURCE=..\src\include\id.h
# End Source File
# Begin Source File

SOURCE=..\src\include\includes.h
# End Source File
# Begin Source File

SOURCE=..\src\include\keyboard.h
# End Source File
# Begin Source File

SOURCE=..\src\include\logic.h
# End Source File
# Begin Source File

SOURCE=..\src\include\lzw.h
# End Source File
# Begin Source File

SOURCE=..\src\include\machine.h
# End Source File
# Begin Source File

SOURCE=..\src\include\menu.h
# End Source File
# Begin Source File

SOURCE=..\src\include\objects.h
# End Source File
# Begin Source File

SOURCE="..\src\include\op-cmd.h"
# End Source File
# Begin Source File

SOURCE="..\src\include\op-dbg.h"
# End Source File
# Begin Source File

SOURCE="..\src\include\op-misc.h"
# End Source File
# Begin Source File

SOURCE="..\src\include\op-test.h"
# End Source File
# Begin Source File

SOURCE=..\src\include\picture.h
# End Source File
# Begin Source File

SOURCE=..\src\include\rand.h
# End Source File
# Begin Source File

SOURCE=..\src\include\savegame.h
# End Source File
# Begin Source File

SOURCE=..\src\include\sound.h
# End Source File
# Begin Source File

SOURCE=..\src\include\typedef.h
# End Source File
# Begin Source File

SOURCE=..\src\include\view.h
# End Source File
# Begin Source File

SOURCE=..\src\include\win32.h
# End Source File
# Begin Source File

SOURCE=..\src\include\words.h
# End Source File
# End Group
# Begin Group "Resource Files"

# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File

SOURCE=..\src\core\win32\winres.rc
# End Source File
# End Group
# End Target
# End Project

Introduction
This article focuses on giving an example of using the DirectX API in PC game software development by using a DirectSound wrapper class.

The DirectSound wrapper class
The wrapper class has the functionality to handle various aspects of sound playback.

The structure of the wrapper class
The DirectSound object uses double buffers to manipulate the sound data processing and playback. The DirectSound object creates a single primary buffer to deal with output devices to play the sound data. The DirectSound object creates multiple second buffers to load, store various sound data, and configure sound data performance. The object loads and mixes sound data from the secondary buffers and sends the processed sound data to the primary buffer to play it through the output device.

The wrapper class contains a pointer to the DirectSound object, a primary buffer object (a pointer of type DirectSoundBuffer), and the secondary buffer array (DirectSoundBuffer object array)

DirectSound object in the wrapper class
DirectSound is a COM interface, so the DirectSound object is the COM component object (a pointer to DirectSound). The DirectSound object is the core of sound playback and all of buffers, both primary buffer and secondary buffers are created by it, so it must be instantiated before doing any sound play back.

Because the DirectSound object is a COM object, it can be instantiated by either the generic way of creation COM components, or by calling DirectSoundCreate. In my wrapper class, I find the generic method of creating a COM object is more reliable. Remember: The DirectX interfaces are a subset of the COM interfaces, so before you use them, call CoInitialize/ CoInitializeEx, and call CoUninitialize at the end of your application.

// To start...
BOOL CSoundManager::CoInitializeDSound(void)
{
    HRESULT  hr;
    GUID     guID;

    // Clear the GUID
    ::memset(&guID, 0, sizeof(GUID));
 
    // Initialize COM service, create STA 
    hr = ::CoInitialize(NULL);
    ................................. 
    .................................
    // Create the IDirectSound object with the realiable way (create
    // standard COM object)
    hr = CoCreateInstance(CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER,
              IID_IDirectSound, (void**)&m_pIDS);
    ................................. 
    ................................
    // Initialize the IDirectSound object
    hr = IDirectSound_Initialize(m_pIDS, &guID);
    ................................. 
    .................................
    return TRUE;
}

// To finish up...
void CSoundManager::CoUnInitializeDSound(void)
{
    if(m_pIDS)
    {
        m_pIDS->Release();
        m_pIDS = NULL;
        ::CoUninitialize();
    }	
}

Primary Buffer
The primary buffer is a DirectSoundBuffer object, and its main task is to receive the processed sound data from the DirectSound object and send it to the output device to play. The primary’s format settings determine the sound play effect of the output device. The primary’s format is a WAVEFORMATEX structure and must be set before play.

Second Buffer
The second buffer loads sound data and sets the sound performance, then sends the sound to the DirectSound object. The second buffer is a DirectSoundBuffer object and is created by the DirectSound object.

In my library, I use a wrapper class of DirectSoundBuffer for the second buffer. This wrapper class has the DirectSoundBuffer object, and the methods to set sound performances, such as adjustment of volume, frequency and channel.

A special feature of the DirectSoundBuffer wrapper class is the special sound effect of Fade-In (volume up step by step) and Fade-Out (volume down step by step).

To avoid the concurrency of incoming function calls, a mutex object is used in the DirectSoundBuffer wrapper class to synchronize the function calls.

Timer Event
The DirectSound wrapper class needs a timer to monitor and manipulate the sound status and performance in a special time interval. The DirectSound wrapper class is a generic class, so it is hard to use a windows timer in the class. As an alternative, a waitable timer is used in the class. A thread is created to check the timer event when the class object is instantiated.

The test program
The test program is a Dialog box application written in MFC. It tests the various wrapper class features, such as volume, frequency, channel, looping, mixing and fade-in and fade-out, etc.

Introduction
Loading images under windows can always be a painful process, especially if the image formats are like JPEG, GIF or PNG. There's always the Imgdecmp library, that does a good job, but its also a bit of a bother with the documentation being so thin and all that. The other day I was trying to load a bitmap from my device using LoadImage, but somehow I kept getting the dreaded "The handle is invalid" error. So I did a search on the MFC code that ships with the PPC SDK in hope of finding a piece of code that will help me solve the puzzle.

One thing led to another. I suddenly came across HBITMAP SHLoadImageFile(LPCTSTR pszFileName) in aygshell.h. Bingo! I had suddenly uncovered an undocumented API! No trace of it in MSDN, a search in Google produced nothing!! Since then, I've tried this API with gif's and bmp's also and I guess it will work fine for jpeg's and png's too. Here's a code sample...

// assuming code is in the OnDraw method of a view....

CBitmap bitmap;

// Attach the bitmap object to the HBITMAP returned by SHLoadImageFile
bitmap.Attach(SHLoadImageFile(_T("/My Documents/mcdonalds.gif")));

BITMAP bmpInfo;
bitmap.GetBitmap(&bmpInfo);

CDC bitmapDC;
bitmapDC.CreateCompatibleDC(pDC);
CBitmap* pOldBitmap = bitmapDC.SelectObject(&bitmap);

pDC->BitBlt(0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, &bitmapDC, 
            0, 0, SRCCOPY);

bitmapDC.SelectObject(pOldBitmap);
bitmap.DeleteObject();

That's all for now.

umm... THX a lot for trying mate but im not really that advanced at programming yet (im makinging a DOS 32 app thing). Ive included my source code (so far), if anyone could have a look and tell me if i could do this i would really appreciate it! Also any other suggestions to improve it would be greatly appreciated!

Attachments
# include <iostream>
#include<ctime>
#include<cstdlib>
using namespace std;

struct monster
{
	int strength;
	int dexterity;
	int hp;
	char name[32];
};

struct player
{
	char name[32];
    int strength;
    int dexterity;
    int hp;
    int exp;
	int weapon;
	int armour;
	int shield;
};

struct equipment
{
	char type[16];
	char name[32];
	int bonus;
};

struct rooms
{
    char description[500];
	char name[32];
	int north;
	int south;
	int east;
	int west;
};

void initializeMonsters();
void initializeEquipment();
void initializeRooms();
void initializeBattle();
void initializePlayer();
void giveItem();
int randomNumber(int);
rooms roomsArray[11];
equipment equipmentArray[9];
player character;
monster monsterArray[6];

int main()
{
	initializeMonsters();
	initializeEquipment();
    initializePlayer();
    initializeRooms();
    char move;
    int currentroom = 0;
	cout << "You emerge in the " <<roomsArray[currentroom].name;
	cout << roomsArray[currentroom].description;
    while (character.hp > 0)
	{
    if (roomsArray[currentroom].north != -1)
    {
       cout << "You may move north \n";
    }
    if (roomsArray[currentroom].south != -1)
    {
       cout << "You may move south \n";
    }
    if (roomsArray[currentroom].east != -1)
    {
       cout << "You may move east \n";
    }
    if (roomsArray[currentroom].west != -1)
    {
       cout << "You may move west \n";
    }
    cout << "please enter your move: " << endl;
    cin >> move;
    if (move == 'E')
	currentroom = roomsArray[currentroom].east;
    if (move == 'W')
       currentroom = roomsArray[currentroom].west;
    if (move == 'N')
       currentroom = roomsArray[currentroom].north;
    if (move == 'S')
       currentroom = roomsArray[currentroom].south;
   if (move == 'C')
       cout << "You have " << character.hp << " HP." << endl;
       cout << "You have " << character.strength << " strength." << endl;
       cout << "You have " << character.dexterity << " dexterity." << endl;
    if (move != 'E' && move != 'W' && move != 'S' && move!= 'N')
    cout << "Please insert either 'N', 'E', 'S' or 'W'! " << endl;
    cout << "You emerge in the " << roomsArray[currentroom].name << endl;
    cout << roomsArray[currentroom].description << endl;
    initializeBattle();
    giveItem();
    }
    cout << "You have failed to beat Hannibal and his minions. You have also "
         << "failed to avenge your Grandfather. What where you thinking going "
         << "into the castle so weak (*hint make stats higher)!" << endl;
    return 0;
}

void initializeMonsters()
    {
	monsterArray[0].strength = 40;
	monsterArray[0].dexterity = 10;
	monsterArray[0].hp = 30;
	strcpy(monsterArray[0].name, "Orc");

	monsterArray[1].strength = 10;
	monsterArray[1].dexterity = 40;
	monsterArray[1].hp = 30;
	strcpy(monsterArray[0].name, "Elven Archer");

	monsterArray[2].strength = 20;
	monsterArray[2].dexterity = 30;
	monsterArray[2].hp = 30;
	strcpy(monsterArray[0].name, "Undead Corpse");

	monsterArray[3].strength = 30;
	monsterArray[3].dexterity = 30;
	monsterArray[3].hp = 20;
	strcpy(monsterArray[0].name, "Marine");
	
	monsterArray[4].strength = 30;
	monsterArray[4].dexterity = 30;
	monsterArray[4].hp = 30;
	strcpy(monsterArray[0].name, "Elite Marksman");

	monsterArray[5].strength = 70;
	monsterArray[5].dexterity = 50;
	monsterArray[5].hp = 10;
	strcpy(monsterArray[5].name, "Hannibal");
}

void initializePlayer()
{
	char username[32];
    
    char move;
    int currentroom = 0;
	cout << "What is your name??? \n" << endl;
	cin >> username;
    cout << "------------------------------------------ \n" << endl;
	strcpy(character.name, username);
	character.hp = 100;
	character.armour=0;
	character.shield=0;
	character.weapon=0;
	cout << endl << username << " Please insert your strength. This will determine the ammount of damage you will inflict. 30-40 is a good ammount. However you may make this number ludacrisly high! \n" <<endl;
    cin >> character.strength;
    cout << "------------------------------------------ \n" << endl;
    cout << endl << username << " Please insert your dexterity. This will determine the ammount of damage that you will have inflicted upon you. The more dexterity, the less total damage. 30 - 40 is a good ammount. Once again you can make this ludacrisly high! \n" << endl;
    cin >> character.dexterity;
    cout << "------------------------------------------ \n" << endl;
    cout << "==========================================" << endl;
	cout << "Brave " << username << " you have just returned from a recent holiday,"
		 << "only to find that your village has been pillaged and destroyed."
		 << "Upon returning to your hut you see your father, mother and sister" 
		 << " laying lifeless in pools of their own blood. Without hesitation"
		 << " you start sprinting towards Sir Lucifer Hannible's castle." 
		 << "The castle rests upon a hill that overlooks your town. " 
		 << "You know that by the end of today you will kill "
		 << " hannible and his minions and burn his csatle to cinders."
		 << " It is your duty to yourslef and the many villages that surrround yours to"
		 << " assasinate this threat. I wish you luck " << username << ". Who am I you ask?"
 		 << "I am your dead grandfather that died to the merciless hand of Hannible. "
         << "Now go grandson."
         << "At any time (except during battle) you may press 'c' to display your stats!"
         << "Simply use 'e','w','n' or 's' to navigate, where and as appropriate." << endl;
	cout << "========================================== \n" << endl;
}

void initializeEquipment()
{
	strcpy(equipmentArray[0].type, "Gun");
	strcpy(equipmentArray[0].name, "Berreta");
	equipmentArray[0].bonus = 10;

	strcpy(equipmentArray[1].type, "Gun");
	strcpy(equipmentArray[1].name, "M4 Carbine Rifle");
	equipmentArray[1].bonus = 30;

	strcpy(equipmentArray[2].type, "Gun");
	strcpy(equipmentArray[2].name, "Flamethrower");
	equipmentArray[2].bonus = 50;

	strcpy(equipmentArray[3].type, "Shield");
	strcpy(equipmentArray[3].name, "Homemade wooden sheild");
	equipmentArray[3].bonus = 10;

	strcpy(equipmentArray[4].type, "Shield");
	strcpy(equipmentArray[4].name, "Roman sheild");
	equipmentArray[4].bonus = 30;

	strcpy(equipmentArray[5].type, "Shield");
	strcpy(equipmentArray[5].name, "Heavenly Protection");
	equipmentArray[5].bonus = 50;

	strcpy(equipmentArray[6].type, "Armour");
	strcpy(equipmentArray[6].name, "Flak Jacket");
	equipmentArray[6].bonus = 10;

	strcpy(equipmentArray[7].type, "Armour");
	strcpy(equipmentArray[7].name, "Kevlar SWAT vest");
	equipmentArray[7].bonus = 10;

	strcpy(equipmentArray[8].type, "Gun");
	strcpy(equipmentArray[8].name, "Possesed Armour");
	equipmentArray[8].bonus = 10;
}

void initializeRooms()
{

    strcpy(roomsArray[0].description, "This room is extravagant. There are gold chandaliers on the roof, and a table with gold goblets and plates. There are no windows, and a fireplace to the north illuminates the room. There is a door at the eastern side of the room\n");
	strcpy(roomsArray[0].name, "Foyer Room\n");
    roomsArray[0].north = -1;
    roomsArray[0].south = -1;
    roomsArray[0].east = 1;
    roomsArray[0].west = -1;
    strcpy(roomsArray[1].description, "You emerge into a dark hallway with a single torch in the middle. There are no distinguishing features about this room, and there is a door in the eastern side of the room.\n");
	strcpy(roomsArray[1].name, "Dark Hallway\n");
    roomsArray[1].north = -1;
    roomsArray[1].south = -1;
    roomsArray[1].east = 2;
    roomsArray[1].west = 0;
    strcpy(roomsArray[2].description, "There is a massive fountain in the middle of the room. Its water glows some sort of a heavenly radiance. Upon drinking it you feel revitalised and like a new man. Your HP is restored to its maximum level. There are doors on the northern, eastern and southern sides of the room. \n");
    strcpy(roomsArray[2].name, "Foutain Room\n");
    roomsArray[2].north = 3;
    roomsArray[2].south = 4;
    roomsArray[2].east = 6;
    roomsArray[2].west = 1;
    strcpy(roomsArray[3].description, "Upon stumbling onto this room, you are drenched to your knees in water. As well as being wet, it is also dark and has no distincitive features or items. There are door in on the eastern and southern sides of the room.\n");
    strcpy(roomsArray[3].name, "Swamp\n");
    roomsArray[3].north = -1;
    roomsArray[3].south = 2;
    roomsArray[3].east = 5;
    roomsArray[3].west = -1;
    strcpy(roomsArray[4].description, "A bright lantern illuminates this beatiful room. There are exotic flowers on either sides of it and a treasure chest full of dublons in the top right hand corner. There are doors on the eastern, southern and western sides of the room.\n");
	strcpy(roomsArray[4].name, "Treasure Room\n");
    roomsArray[4].north = 2;
    roomsArray[4].south = -1;
    roomsArray[4].east = 7;
    roomsArray[4].west = -1;
	strcpy(roomsArray[5].description, "Another lusicious and overdone room. Crystals that are on the ground reflect the portraits on the walls. There are doors on the southern and western sides of this room. \n");
	strcpy(roomsArray[5].name, "Counting Room\n");
    roomsArray[5].north = -1;
    roomsArray[5].south = 6;
    roomsArray[5].east = 8;
    roomsArray[5].west = 3;
	strcpy(roomsArray[6].description, "The total opposite of the beatiful fountain room. It reeks of a peculiar smell and is bare with nothing interesting in it. There are doors on every corner of this room. \n");
	strcpy(roomsArray[6].name, "Barn \n");
    roomsArray[6].north = 5;
    roomsArray[6].south = 7;
    roomsArray[6].east = 2;
    roomsArray[6].west = 9;
	strcpy(roomsArray[7].description, "This majestic room has treasure scattered everywhere. In the middle is a large four post king sized bed. There are doors on every corner of this room.\n");
    strcpy(roomsArray[7].name, "Master Bedroom \n");
    roomsArray[7].north = 6;
    roomsArray[7].south = -1;
This article has been dead for over six months. Start a new discussion instead.