Fase 0: eliminar tot el codi llegacy (polars + primitives + bool dibuixar)
Aplicada la directiva "res llegacy" abans d'arrencar la migracio a fisica vectorial + SDL3 GPU. Cada bossa de cruft que arrossegava el port de Pascal queda eliminada. Borrats (huerfanos): - source/core/rendering/primitives.hpp/.cpp (modul/diferencia/angle_punt/ crear_poligon_regular) - source/core/rendering/polygon_renderer.hpp/.cpp (rota_tri/rota_pol) - core::types::Triangle, Poligon, IPunt - Defaults::Entities::MAX_IPUNTS i alias a constants.hpp - EscenaJoc::chatarra_cosmica_ (mai usat) - Bresenham comentat dins de Rendering::linea() Simplificat (parametre 'dibuixar' llegacy que sempre era true): - Rendering::linea(...): treta la signatura bool dibuixar, retorn void - Rendering::render_shape(...): treta la signatura bool dibuixar - 11 callsites de linea() actualitzats (escena_joc, debris_manager) - 12 callsites de render_shape() actualitzats Modernitzats: - 5 fitxers .shp netejats de comentaris polar->cartesia historics - types.hpp queda nomes amb Punt (l'unica coordenada del joc) - debris_manager.hpp afegit include explicit de defaults.hpp Net: 452 linies eliminades, 56 afegides. Compila i enllaca correctament. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -77,7 +77,6 @@ void render_shape(SDL_Renderer* renderer,
|
||||
const Punt& posicio,
|
||||
float angle,
|
||||
float escala,
|
||||
bool dibuixar,
|
||||
float progress,
|
||||
float brightness,
|
||||
const Rotation3D* rotation_3d) {
|
||||
@@ -102,7 +101,8 @@ void render_shape(SDL_Renderer* renderer,
|
||||
Punt p1 = transform_point(primitive.points[i], shape_centre, posicio, angle, escala, rotation_3d);
|
||||
Punt p2 = transform_point(primitive.points[i + 1], shape_centre, posicio, angle, escala, rotation_3d);
|
||||
|
||||
linea(renderer, static_cast<int>(p1.x), static_cast<int>(p1.y), static_cast<int>(p2.x), static_cast<int>(p2.y), dibuixar, brightness);
|
||||
linea(renderer, static_cast<int>(p1.x), static_cast<int>(p1.y),
|
||||
static_cast<int>(p2.x), static_cast<int>(p2.y), brightness);
|
||||
}
|
||||
} else { // PrimitiveType::LINE
|
||||
// LINE: exactament 2 punts
|
||||
@@ -110,7 +110,8 @@ void render_shape(SDL_Renderer* renderer,
|
||||
Punt p1 = transform_point(primitive.points[0], shape_centre, posicio, angle, escala, rotation_3d);
|
||||
Punt p2 = transform_point(primitive.points[1], shape_centre, posicio, angle, escala, rotation_3d);
|
||||
|
||||
linea(renderer, static_cast<int>(p1.x), static_cast<int>(p1.y), static_cast<int>(p2.x), static_cast<int>(p2.y), dibuixar, brightness);
|
||||
linea(renderer, static_cast<int>(p1.x), static_cast<int>(p1.y),
|
||||
static_cast<int>(p2.x), static_cast<int>(p2.y), brightness);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user