1
This commit is contained in:
parent
1d91b94715
commit
5d3979e30c
@ -18,8 +18,8 @@ else()
|
|||||||
message(LIB_DIR: ${LIB_DIR} )
|
message(LIB_DIR: ${LIB_DIR} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++1z -DGAME_ID=${GAME_ID} -DNDEBUG -DNEWGS -DPVE -DATTR")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++1z -DGAME_ID=${GAME_ID} -DNDEBUG -DNEWGS -DPVE -DMAP3D")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++1z -DGAME_ID=${GAME_ID} -DDEBUG -DNEWGS -DPVE -DATTR")
|
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++1z -DGAME_ID=${GAME_ID} -DDEBUG -DNEWGS -DPVE -DMAP3D")
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
AFTER
|
AFTER
|
||||||
|
@ -89,6 +89,22 @@ void MapInstance::AttachRoom(Room* room, RoomInitInfo& init_info)
|
|||||||
void MapInstance::CreateThings()
|
void MapInstance::CreateThings()
|
||||||
{
|
{
|
||||||
map_tpl_name_ = map_meta_->RandTemplate();
|
map_tpl_name_ = map_meta_->RandTemplate();
|
||||||
|
#ifdef MAP3D
|
||||||
|
{
|
||||||
|
for (int i = 1; i < 100; i++) {
|
||||||
|
MetaData::MapTplThing* p = new MetaData::MapTplThing();
|
||||||
|
auto p2 = new metatable::MapTplThingJson;
|
||||||
|
p2->set_x(10);
|
||||||
|
p2->set_y(10);
|
||||||
|
|
||||||
|
p->i = p2;
|
||||||
|
p->param1_int = 3;
|
||||||
|
normal_room_spawn_points_.push_back(p);
|
||||||
|
mini_room_spawn_points_.push_back(p);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
std::map<std::string, MetaData::MapTplThing*> spawn_points_hash;
|
std::map<std::string, MetaData::MapTplThing*> spawn_points_hash;
|
||||||
std::vector<MetaData::MapTplThing>* things = MetaMgr::Instance()->GetMapTplThing(map_tpl_name_);
|
std::vector<MetaData::MapTplThing>* things = MetaMgr::Instance()->GetMapTplThing(map_tpl_name_);
|
||||||
if (things) {
|
if (things) {
|
||||||
@ -176,6 +192,9 @@ void MapInstance::CreateThings()
|
|||||||
|
|
||||||
void MapInstance::CreateTerrain()
|
void MapInstance::CreateTerrain()
|
||||||
{
|
{
|
||||||
|
#ifdef DMAP3D
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
metatable::TerrainJson* terrain = MetaMgr::Instance()->GetTerrainJson(map_id);
|
metatable::TerrainJson* terrain = MetaMgr::Instance()->GetTerrainJson(map_id);
|
||||||
std::list<metatable::MapLayerJson>* layers = MetaMgr::Instance()->GetMapLayer(map_meta_->i->map_pic());
|
std::list<metatable::MapLayerJson>* layers = MetaMgr::Instance()->GetMapLayer(map_meta_->i->map_pic());
|
||||||
if (!terrain || !layers) {
|
if (!terrain || !layers) {
|
||||||
@ -309,6 +328,9 @@ void MapInstance::CreateTerrain()
|
|||||||
|
|
||||||
void MapInstance::CreateBlock()
|
void MapInstance::CreateBlock()
|
||||||
{
|
{
|
||||||
|
#ifdef MAP3D
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
std::list<metatable::MapBlockJson>* blocks = MetaMgr::Instance()->GetMapBlock(map_meta_->i->map_pic());
|
std::list<metatable::MapBlockJson>* blocks = MetaMgr::Instance()->GetMapBlock(map_meta_->i->map_pic());
|
||||||
DummyEntity* dummy = EntityFactory::Instance()->MakeDummy(AllocUniid());
|
DummyEntity* dummy = EntityFactory::Instance()->MakeDummy(AllocUniid());
|
||||||
dummy->SetPos(a8::Vec2());
|
dummy->SetPos(a8::Vec2());
|
||||||
|
@ -36,7 +36,9 @@ void MapMgr::Init()
|
|||||||
if (mode_hash_.find(kChiJiMode) == mode_hash_.end()) {
|
if (mode_hash_.find(kChiJiMode) == mode_hash_.end()) {
|
||||||
A8_ABORT();
|
A8_ABORT();
|
||||||
}
|
}
|
||||||
|
#ifdef DMAP3D
|
||||||
MetaMgr::Instance()->CheckMapSpawnPoint();
|
MetaMgr::Instance()->CheckMapSpawnPoint();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapMgr::UnInit()
|
void MapMgr::UnInit()
|
||||||
@ -77,6 +79,10 @@ void MapMgr::AttachRoom(Room* room, RoomInitInfo& init_info)
|
|||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#ifdef MAP3D
|
||||||
|
init_info.init_map_id = 2001;
|
||||||
|
MapInstance* map_instance = GetMapInstance(init_info.init_map_id);
|
||||||
|
#else
|
||||||
MapInstance* map_instance = init_info.init_map_id == 0 ?
|
MapInstance* map_instance = init_info.init_map_id == 0 ?
|
||||||
RandMapInstance(init_info.room_mode) : GetMapInstance(init_info.init_map_id);
|
RandMapInstance(init_info.room_mode) : GetMapInstance(init_info.init_map_id);
|
||||||
if (!map_instance) {
|
if (!map_instance) {
|
||||||
@ -89,6 +95,7 @@ void MapMgr::AttachRoom(Room* room, RoomInitInfo& init_info)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!map_instance) {
|
if (!map_instance) {
|
||||||
A8_ABORT();
|
A8_ABORT();
|
||||||
|
@ -86,10 +86,14 @@ void Room::Init()
|
|||||||
|
|
||||||
frame_event.room = this;
|
frame_event.room = this;
|
||||||
|
|
||||||
|
#ifdef MAP3D
|
||||||
|
CreateSpawnPoints();
|
||||||
|
#else
|
||||||
CreateSpawnPoints();
|
CreateSpawnPoints();
|
||||||
CreateMonsterSpawnPoints();
|
CreateMonsterSpawnPoints();
|
||||||
CreateLoots();
|
CreateLoots();
|
||||||
CreateDropObjs();
|
CreateDropObjs();
|
||||||
|
#endif
|
||||||
InitObstacleDatas();
|
InitObstacleDatas();
|
||||||
ShuaAndroid();
|
ShuaAndroid();
|
||||||
incubator_ = new Incubator();
|
incubator_ = new Incubator();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user