text encoding fixed
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
#include <sstream>
|
||||
#include "../../libgame/include/targa.h"
|
||||
#include "../../libgame/include/attribute.h"
|
||||
@@ -77,8 +77,8 @@ LPSECTREE SECTREE_MAP::Find(DWORD x, DWORD y)
|
||||
|
||||
void SECTREE_MAP::Build()
|
||||
{
|
||||
// 클라이언트에게 반경 150m 캐릭터의 정보를 주기위해
|
||||
// 3x3칸 -> 5x5 칸으로 주변sectree 확대(한국)
|
||||
// 클라이언트에게 반경 150m 캐릭터의 정보를 주기위해
|
||||
// 3x3칸 -> 5x5 칸으로 주변sectree 확대(한국)
|
||||
if (LC_IsYMIR() || LC_IsKorea())
|
||||
{
|
||||
#define NEIGHBOR_LENGTH 5
|
||||
@@ -107,7 +107,7 @@ void SECTREE_MAP::Build()
|
||||
}
|
||||
|
||||
//
|
||||
// 모든 sectree에 대해 주위 sectree들 리스트를 만든다.
|
||||
// 모든 sectree에 대해 주위 sectree들 리스트를 만든다.
|
||||
//
|
||||
MapType::iterator it = map_.begin();
|
||||
|
||||
@@ -115,7 +115,7 @@ void SECTREE_MAP::Build()
|
||||
{
|
||||
LPSECTREE tree = it->second;
|
||||
|
||||
tree->m_neighbor_list.push_back(tree); // 자신을 넣는다.
|
||||
tree->m_neighbor_list.push_back(tree); // 자신을 넣는다.
|
||||
|
||||
sys_log(3, "%dx%d", tree->m_id.coord.x, tree->m_id.coord.y);
|
||||
|
||||
@@ -154,7 +154,7 @@ void SECTREE_MAP::Build()
|
||||
};
|
||||
|
||||
//
|
||||
// 모든 sectree에 대해 주위 sectree들 리스트를 만든다.
|
||||
// 모든 sectree에 대해 주위 sectree들 리스트를 만든다.
|
||||
//
|
||||
MapType::iterator it = map_.begin();
|
||||
|
||||
@@ -162,7 +162,7 @@ void SECTREE_MAP::Build()
|
||||
{
|
||||
LPSECTREE tree = it->second;
|
||||
|
||||
tree->m_neighbor_list.push_back(tree); // 자신을 넣는다.
|
||||
tree->m_neighbor_list.push_back(tree); // 자신을 넣는다.
|
||||
|
||||
sys_log(3, "%dx%d", tree->m_id.coord.x, tree->m_id.coord.y);
|
||||
|
||||
@@ -231,7 +231,7 @@ LPSECTREE SECTREE_MANAGER::Get(DWORD dwIndex, DWORD x, DWORD y)
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Setting.txt 로 부터 SECTREE 만들기
|
||||
// Setting.txt 로 부터 SECTREE 만들기
|
||||
// -----------------------------------------------------------------------------
|
||||
int SECTREE_MANAGER::LoadSettingFile(long lMapIndex, const char * c_pszSettingFileName, TMapSetting & r_setting)
|
||||
{
|
||||
@@ -366,10 +366,10 @@ void SECTREE_MANAGER::LoadDungeon(int iIndex, const char * c_pszFileName)
|
||||
}
|
||||
|
||||
// Fix me
|
||||
// 현재 Town.txt에서 x, y를 그냥 받고, 그걸 이 코드 내에서 base 좌표를 더해주기 때문에
|
||||
// 다른 맵에 있는 타운으로 절대 이동할 수 없게 되어있다.
|
||||
// 앞에 map이라거나, 기타 다른 식별자가 있으면,
|
||||
// 다른 맵의 타운으로도 이동할 수 있게 하자.
|
||||
// 현재 Town.txt에서 x, y를 그냥 받고, 그걸 이 코드 내에서 base 좌표를 더해주기 때문에
|
||||
// 다른 맵에 있는 타운으로 절대 이동할 수 없게 되어있다.
|
||||
// 앞에 map이라거나, 기타 다른 식별자가 있으면,
|
||||
// 다른 맵의 타운으로도 이동할 수 있게 하자.
|
||||
// by rtsummit
|
||||
bool SECTREE_MANAGER::LoadMapRegion(const char * c_pszFileName, TMapSetting & r_setting, const char * c_pszMapName)
|
||||
{
|
||||
@@ -478,7 +478,7 @@ bool SECTREE_MANAGER::LoadAttribute(LPSECTREE_MAP pkMapSectree, const char * c_p
|
||||
for (int y = 0; y < iHeight; ++y)
|
||||
for (int x = 0; x < iWidth; ++x)
|
||||
{
|
||||
// UNION 으로 좌표를 합쳐만든 DWORD값을 아이디로 사용한다.
|
||||
// UNION 으로 좌표를 합쳐만든 DWORD값을 아이디로 사용한다.
|
||||
SECTREEID id;
|
||||
id.coord.x = (r_setting.iBaseX / SECTREE_SIZE) + x;
|
||||
id.coord.y = (r_setting.iBaseY / SECTREE_SIZE) + y;
|
||||
@@ -553,7 +553,7 @@ bool SECTREE_MANAGER::GetRecallPositionByEmpire(int iMapIndex, BYTE bEmpire, PIX
|
||||
{
|
||||
std::vector<TMapRegion>::iterator it = m_vec_mapRegion.begin();
|
||||
|
||||
// 10000을 넘는 맵은 인스턴스 던전에만 한정되어있다.
|
||||
// 10000을 넘는 맵은 인스턴스 던전에만 한정되어있다.
|
||||
if (iMapIndex >= 10000)
|
||||
{
|
||||
iMapIndex /= 10000;
|
||||
@@ -687,7 +687,7 @@ const TMapRegion * SECTREE_MANAGER::FindRegionByPartialName(const char* szMapNam
|
||||
//if (rRegion.index == lMapIndex)
|
||||
//return &rRegion;
|
||||
if (rRegion.strMapName.find(szMapName))
|
||||
return &rRegion; // 캐싱 해서 빠르게 하자
|
||||
return &rRegion; // 캐싱 해서 빠르게 하자
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -782,7 +782,7 @@ int SECTREE_MANAGER::Build(const char * c_pszListFileName, const char* c_pszMapB
|
||||
if (true == test_server)
|
||||
sys_log ( 0,"[BUILD] Build %s %s %d ",c_pszMapBasePath, szMapName, iIndex );
|
||||
|
||||
// 먼저 이 서버에서 이 맵의 몬스터를 스폰해야 하는가 확인 한다.
|
||||
// 먼저 이 서버에서 이 맵의 몬스터를 스폰해야 하는가 확인 한다.
|
||||
if (map_allow_find(iIndex))
|
||||
{
|
||||
LPSECTREE_MAP pkMapSectree = BuildSectreeFromSetting(setting);
|
||||
@@ -981,7 +981,7 @@ bool SECTREE_MANAGER::GetRandomLocation(long lMapIndex, PIXEL_POSITION & r_pos,
|
||||
|
||||
long SECTREE_MANAGER::CreatePrivateMap(long lMapIndex)
|
||||
{
|
||||
if (lMapIndex >= 10000) // 10000번 이상의 맵은 없다. (혹은 이미 private 이다)
|
||||
if (lMapIndex >= 10000) // 10000번 이상의 맵은 없다. (혹은 이미 private 이다)
|
||||
return 0;
|
||||
|
||||
LPSECTREE_MAP pkMapSectree = GetMap(lMapIndex);
|
||||
@@ -1092,7 +1092,7 @@ struct FDestroyPrivateMapEntity
|
||||
|
||||
void SECTREE_MANAGER::DestroyPrivateMap(long lMapIndex)
|
||||
{
|
||||
if (lMapIndex < 10000) // private map 은 인덱스가 10000 이상 이다.
|
||||
if (lMapIndex < 10000) // private map 은 인덱스가 10000 이상 이다.
|
||||
return;
|
||||
|
||||
LPSECTREE_MAP pkMapSectree = GetMap(lMapIndex);
|
||||
@@ -1100,11 +1100,11 @@ void SECTREE_MANAGER::DestroyPrivateMap(long lMapIndex)
|
||||
if (!pkMapSectree)
|
||||
return;
|
||||
|
||||
// 이 맵 위에 현재 존재하는 것들을 전부 없앤다.
|
||||
// 이 맵 위에 현재 존재하는 것들을 전부 없앤다.
|
||||
// WARNING:
|
||||
// 이 맵에 있지만 어떤 Sectree에도 존재하지 않을 수 있음
|
||||
// 따라서 여기서 delete 할 수 없으므로 포인터가 깨질 수 있으니
|
||||
// 별도 처리를 해야함
|
||||
// 이 맵에 있지만 어떤 Sectree에도 존재하지 않을 수 있음
|
||||
// 따라서 여기서 delete 할 수 없으므로 포인터가 깨질 수 있으니
|
||||
// 별도 처리를 해야함
|
||||
FDestroyPrivateMapEntity f;
|
||||
pkMapSectree->for_each(f);
|
||||
|
||||
@@ -1120,7 +1120,7 @@ TAreaMap& SECTREE_MANAGER::GetDungeonArea(long lMapIndex)
|
||||
|
||||
if (it == m_map_pkArea.end())
|
||||
{
|
||||
return m_map_pkArea[-1]; // 임시로 빈 Area를 리턴
|
||||
return m_map_pkArea[-1]; // 임시로 빈 Area를 리턴
|
||||
}
|
||||
return it->second;
|
||||
}
|
||||
@@ -1143,7 +1143,7 @@ void SECTREE_MANAGER::SendNPCPosition(LPCHARACTER ch)
|
||||
|
||||
TNPCPosition np;
|
||||
|
||||
// TODO m_mapNPCPosition[lMapIndex] 를 보내주세요
|
||||
// TODO m_mapNPCPosition[lMapIndex] 를 보내주세요
|
||||
itertype(m_mapNPCPosition[lMapIndex]) it;
|
||||
|
||||
for (it = m_mapNPCPosition[lMapIndex].begin(); it != m_mapNPCPosition[lMapIndex].end(); ++it)
|
||||
@@ -1379,7 +1379,7 @@ bool SECTREE_MANAGER::ForAttrRegion(long lMapIndex, long lStartX, long lStartY,
|
||||
}
|
||||
|
||||
//
|
||||
// 영역의 좌표를 Cell 의 크기에 맞춰 확장한다.
|
||||
// 영역의 좌표를 Cell 의 크기에 맞춰 확장한다.
|
||||
//
|
||||
|
||||
lStartX -= lStartX % CELL_SIZE;
|
||||
@@ -1388,7 +1388,7 @@ bool SECTREE_MANAGER::ForAttrRegion(long lMapIndex, long lStartX, long lStartY,
|
||||
lEndY += lEndY % CELL_SIZE;
|
||||
|
||||
//
|
||||
// Cell 좌표를 구한다.
|
||||
// Cell 좌표를 구한다.
|
||||
//
|
||||
|
||||
long lCX = lStartX / CELL_SIZE;
|
||||
|
||||
Reference in New Issue
Block a user