Refactorizar estilo del proyecto: .h → .hpp, #pragma once, includes desde raíz

Modernizar convenciones de código C++ aplicando las siguientes directivas:

## Cambios principales

**1. Renombrar headers (.h → .hpp)**
- 36 archivos renombrados a extensión .hpp (estándar C++)
- Mantenidos como .h: stb_image.h, stb_image_resize2.h (librerías C externas)

**2. Modernizar include guards (#ifndef → #pragma once)**
- resource_manager.hpp: #ifndef RESOURCE_MANAGER_H → #pragma once
- resource_pack.hpp: #ifndef RESOURCE_PACK_H → #pragma once
- spatial_grid.hpp: #ifndef SPATIAL_GRID_H → #pragma once

**3. Sistema de includes desde raíz del proyecto**
- CMakeLists.txt: añadido include_directories(${CMAKE_SOURCE_DIR}/source)
- Eliminadas rutas relativas (../) en todos los includes
- Includes ahora usan rutas absolutas desde source/

**Antes:**
```cpp
#include "../defines.h"
#include "../text/textrenderer.h"
```

**Ahora:**
```cpp
#include "defines.hpp"
#include "text/textrenderer.hpp"
```

## Archivos afectados

- 1 archivo CMakeLists.txt modificado
- 36 archivos renombrados (.h → .hpp)
- 32 archivos .cpp actualizados (includes)
- 36 archivos .hpp actualizados (includes + guards)
- 1 archivo tools/ actualizado

**Total: 70 archivos modificados**

## Verificación

 Proyecto compila sin errores
 Todas las rutas de includes correctas
 Include guards modernizados
 Librerías externas C mantienen extensión .h

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-23 13:49:58 +02:00
parent a929df6b73
commit a9d7b66e83
70 changed files with 158 additions and 164 deletions

View File

@@ -1,25 +1,25 @@
#include "shape_manager.h"
#include "shape_manager.hpp"
#include <algorithm> // for std::min, std::max
#include <cstdlib> // for rand
#include <string> // for std::string
#include "../ball.h" // for Ball
#include "../defines.h" // for constantes
#include "../scene/scene_manager.h" // for SceneManager
#include "../state/state_manager.h" // for StateManager
#include "../ui/ui_manager.h" // for UIManager
#include "ball.hpp" // for Ball
#include "defines.hpp" // for constantes
#include "scene/scene_manager.hpp" // for SceneManager
#include "state/state_manager.hpp" // for StateManager
#include "ui/ui_manager.hpp" // for UIManager
// Includes de todas las shapes (necesario para creación polimórfica)
#include "../shapes/atom_shape.h"
#include "../shapes/cube_shape.h"
#include "../shapes/cylinder_shape.h"
#include "../shapes/helix_shape.h"
#include "../shapes/icosahedron_shape.h"
#include "../shapes/lissajous_shape.h"
#include "../shapes/png_shape.h"
#include "../shapes/sphere_shape.h"
#include "../shapes/torus_shape.h"
#include "shapes/atom_shape.hpp"
#include "shapes/cube_shape.hpp"
#include "shapes/cylinder_shape.hpp"
#include "shapes/helix_shape.hpp"
#include "shapes/icosahedron_shape.hpp"
#include "shapes/lissajous_shape.hpp"
#include "shapes/png_shape.hpp"
#include "shapes/sphere_shape.hpp"
#include "shapes/torus_shape.hpp"
ShapeManager::ShapeManager()
: engine_(nullptr)