|
|
|
@ -895,6 +895,7 @@ void AiL::RenderWorld(float fElapsedTime){ |
|
|
|
|
if(!IsForegroundTile(tileSheet,tileSheetIndex)&&!IsUpperForegroundTile(tileSheetIndex)&&!IsReflectiveTile(tileSheet,tileSheetIndex)){ |
|
|
|
|
if(layer.tag.data["class"]!="CollisionOnly"){visibleTiles.erase({x,y});} |
|
|
|
|
RenderTile({x,y},tileSheet,tileSheetIndex,{tileSheetX,tileSheetY}); |
|
|
|
|
#pragma region Debug Collision boxes |
|
|
|
|
#ifdef _DEBUG |
|
|
|
|
if("debug_collision_boxes"_I){ |
|
|
|
|
if(tileSheet.tileset->collision.find(tileSheetIndex)!=tileSheet.tileset->collision.end()){ |
|
|
|
@ -904,6 +905,7 @@ void AiL::RenderWorld(float fElapsedTime){ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
#pragma endregion |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -948,6 +950,9 @@ void AiL::RenderWorld(float fElapsedTime){ |
|
|
|
|
} |
|
|
|
|
}break; |
|
|
|
|
} |
|
|
|
|
#pragma region Debug A* Tiles |
|
|
|
|
#ifdef _DEBUG |
|
|
|
|
if(DEBUG_PATHFINDING){ |
|
|
|
|
for(int y2=0;y2<2;y2++){ |
|
|
|
|
for(int x2=0;x2<2;x2++){ |
|
|
|
|
vf2d tilePos=vf2d{float(x),float(y)}*24; |
|
|
|
@ -959,6 +964,9 @@ void AiL::RenderWorld(float fElapsedTime){ |
|
|
|
|
view.FillRectDecal(gridPos,pathfinder.gridSpacing,{col.r,col.g,col.b,128}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
#pragma endregion |
|
|
|
|
}else{ |
|
|
|
|
if(GetCurrentMap().backdrop.length()>0){ |
|
|
|
|
vf2d tileWorldPos=vi2d{x,y}*GetCurrentMapData().tilewidth; |
|
|
|
@ -977,7 +985,6 @@ void AiL::RenderWorld(float fElapsedTime){ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
#pragma endregion |
|
|
|
|
//DrawDecal({0,0},MAP_TILESETS["assets/maps/"+MAP_DATA[LEVEL1].TilesetData[1].data["source"]]->Decal());
|
|
|
|
|
|
|
|
|
|
for(Monster&m:MONSTER_LIST){ |
|
|
|
|
m.strategyDraw(this); |
|
|
|
|