ignore null named objects
							parent
							
								
									bb12dc03b7
								
							
						
					
					
						commit
						5fae32d9f9
					
				
							
								
								
									
										12
									
								
								src/main.cpp
								
								
								
								
							
							
						
						
									
										12
									
								
								src/main.cpp
								
								
								
								
							| 
						 | 
					@ -71,24 +71,24 @@ bool Loop() {
 | 
				
			||||||
  auto paint_objects = [&](const auto &objects, uint8_t r, uint8_t g,
 | 
					  auto paint_objects = [&](const auto &objects, uint8_t r, uint8_t g,
 | 
				
			||||||
                           uint8_t b) {
 | 
					                           uint8_t b) {
 | 
				
			||||||
    for (const auto &obj : objects) {
 | 
					    for (const auto &obj : objects) {
 | 
				
			||||||
 | 
					      std::stringstream ss;
 | 
				
			||||||
      const auto name = obj.GetName();
 | 
					      const auto name = obj.GetName();
 | 
				
			||||||
      if (name == "")
 | 
					      if (name == "" || name == "null")
 | 
				
			||||||
        continue;
 | 
					        continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      ss << name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      const auto tile = obj.GetTile();
 | 
					      const auto tile = obj.GetTile();
 | 
				
			||||||
      if (!tile)
 | 
					      if (!tile)
 | 
				
			||||||
        continue;
 | 
					        continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      ss << ": (" << tile.X << ", " << tile.Y << ", " << tile.Plane << ")";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      const auto w2s = Internal::TileToMainscreen(tile, 0, 0, 0);
 | 
					      const auto w2s = Internal::TileToMainscreen(tile, 0, 0, 0);
 | 
				
			||||||
      if (!w2s)
 | 
					      if (!w2s)
 | 
				
			||||||
        continue;
 | 
					        continue;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
      paint_object(obj, r, g, b, 255);
 | 
					      paint_object(obj, r, g, b, 255);
 | 
				
			||||||
 | 
					 | 
				
			||||||
      std::stringstream ss;
 | 
					 | 
				
			||||||
      ss << name;
 | 
					 | 
				
			||||||
      ss << ": (" << tile.X << ", " << tile.Y << ", " << tile.Plane << ")";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      Paint::DrawString(ss.str(), w2s, 255, 255, 255, 255);
 | 
					      Paint::DrawString(ss.str(), w2s, 255, 255, 255, 255);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue