#include "StdAfx.h" #include "EtRandomDungeonRoom.h" #ifdef _DEBUG #define new new(_NORMAL_BLOCK,__FILE__,__LINE__) #endif CEtRandomDungeonRoom::CEtRandomDungeonRoom( RoomType Type ) { m_RoomType = Type; m_Position = IntVec3( -1, -1, -1 ); m_nWidth = m_nHeight = -1; } CEtRandomDungeonRoom::~CEtRandomDungeonRoom() { SAFE_DELETE_VEC( m_VecDoorList ); } CEtRandomDungeonRoom::RoomType CEtRandomDungeonRoom::GetRoomType() { return m_RoomType; } void CEtRandomDungeonRoom::Initialize( int nX, int nY, int nZ, int nWidth, int nHeight ) { m_Position = IntVec3( nX, nY, nZ ); m_nWidth = nWidth; m_nHeight = nHeight; } bool CEtRandomDungeonRoom::AddDoor( int nX, int nY, DoorDirection Direction ) { // ¹®Àº »çÀ̵尡 ¾Æ´Ï¸é ¿Ã ¼ö ¾ø´Ù. if( !( nX == 0 || nX == m_nWidth - 1 || nY == 0 || nY == m_nHeight - 1 ) ) return false; for( DWORD i=0; i= (int)m_VecDoorList.size() ) return NULL; return &m_VecDoorList[nIndex]; } std::vector *CEtRandomDungeonRoom::GetDoorList() { return &m_VecDoorList; }