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