linters
This commit is contained in:
@@ -4,9 +4,10 @@
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <memory> // Para shared_ptr, unique_ptr
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
#include <cstdint> // Para uint8_t
|
||||
#include <memory> // Para shared_ptr, unique_ptr
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "game/editor/mini_map.hpp" // Para MiniMap
|
||||
#include "game/editor/tile_picker.hpp" // Para TilePicker
|
||||
@@ -23,7 +24,7 @@
|
||||
class EditorStatusBar;
|
||||
|
||||
// Tipo de entidad editable en el editor
|
||||
enum class EntityType { NONE,
|
||||
enum class EntityType : std::uint8_t { NONE,
|
||||
ENEMY,
|
||||
ITEM,
|
||||
PLATFORM,
|
||||
@@ -106,7 +107,7 @@ class MapEditor {
|
||||
auto deleteRoom() -> std::string;
|
||||
|
||||
// Opciones del editor (llamados desde console_commands / teclas)
|
||||
auto showInfo(bool show) -> std::string;
|
||||
static auto showInfo(bool show) -> std::string;
|
||||
auto showGrid(bool show) -> std::string;
|
||||
auto setEditingCollision(bool collision) -> std::string;
|
||||
[[nodiscard]] auto isGridEnabled() const -> bool { return settings_.grid; }
|
||||
@@ -164,7 +165,7 @@ class MapEditor {
|
||||
void saveSettings() const;
|
||||
|
||||
// Tipos para drag & drop
|
||||
enum class DragTarget { NONE,
|
||||
enum class DragTarget : std::uint8_t { NONE,
|
||||
PLAYER,
|
||||
ENTITY_INITIAL,
|
||||
ENTITY_BOUND1,
|
||||
@@ -183,18 +184,19 @@ class MapEditor {
|
||||
|
||||
// Métodos internos
|
||||
void updateMousePosition();
|
||||
void renderCollisionOverlay() const;
|
||||
void renderEntityBoundaries();
|
||||
static void renderBoundaryMarker(float x, float y, Uint8 color);
|
||||
void renderSelectionHighlight();
|
||||
void renderBrushPreview();
|
||||
void renderEyedropperRect();
|
||||
void renderGrid() const;
|
||||
void renderEyedropperRect() const;
|
||||
static void renderGrid();
|
||||
void handleMouseDown(float game_x, float game_y);
|
||||
void handleMouseUp();
|
||||
void stampBrushAt(int tile_x, int tile_y);
|
||||
void commitEyedropper();
|
||||
[[nodiscard]] auto sampleBrush(int x1, int y1, int x2, int y2) const -> BrushPattern;
|
||||
[[nodiscard]] auto buildPatternFromTileset(const std::string& tileset_name, int col, int row, int width, int height) const -> BrushPattern;
|
||||
[[nodiscard]] static auto buildPatternFromTileset(const std::string& tileset_name, int col, int row, int width, int height) -> BrushPattern;
|
||||
|
||||
// Reconstruye todas las puertas vivas desde room_data_, limpiando primero
|
||||
// los WALLs antiguos del CollisionMap. Lo usa setDoorProperty cuando un
|
||||
@@ -213,12 +215,12 @@ class MapEditor {
|
||||
struct BoundaryData {
|
||||
int x1, y1, x2, y2;
|
||||
};
|
||||
auto entityCount(EntityType type) const -> int;
|
||||
[[nodiscard]] auto entityCount(EntityType type) const -> int;
|
||||
auto entityRect(EntityType type, int index) -> SDL_FRect;
|
||||
static auto entityHasBoundaries(EntityType type) -> bool;
|
||||
auto entityBoundaries(EntityType type, int index) const -> BoundaryData;
|
||||
auto entityPosition(EntityType type, int index) const -> std::pair<float, float>;
|
||||
auto entityDataCount(EntityType type) const -> int;
|
||||
[[nodiscard]] auto entityBoundaries(EntityType type, int index) const -> BoundaryData;
|
||||
[[nodiscard]] auto entityPosition(EntityType type, int index) const -> std::pair<float, float>;
|
||||
[[nodiscard]] auto entityDataCount(EntityType type) const -> int;
|
||||
static auto entityLabel(EntityType type) -> const char*;
|
||||
|
||||
// Estado del editor
|
||||
|
||||
Reference in New Issue
Block a user