feat(postfx): redisseny sistema PostFX (X/F5/F6, --postfx CLI)
- X cicla 4 efectes (Vinyeta/Scanlines/Cromàtica/Complet), sempre activa PostFX - F5 fa toggle PostFX on/off mantenint l'efecte seleccionat - F6 hereta el toggle d'integer scaling (abans F5) - Arrencada per defecte sense postprocés (tot a 0) - --postfx <vinyeta|scanlines|cromatica|complet> per activar des de CLI Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,7 @@ void printHelp() {
|
||||
std::cout << " --custom-balls <n> Activa escenario custom (tecla 9) con N pelotas\n";
|
||||
std::cout << " --skip-benchmark Salta el benchmark y usa el máximo de bolas (50000)\n";
|
||||
std::cout << " --max-balls <n> Limita el máximo de bolas en modos DEMO/DEMO_LITE\n";
|
||||
std::cout << " --postfx <efecto> Arrancar con PostFX activo: vinyeta, scanlines, cromatica, complet\n";
|
||||
std::cout << " --help Mostrar esta ayuda\n\n";
|
||||
std::cout << "Ejemplos:\n";
|
||||
std::cout << " vibe3_physics # 320x240 zoom 3 (ventana 960x720)\n";
|
||||
@@ -45,6 +46,7 @@ int main(int argc, char* argv[]) {
|
||||
bool kiosk_mode = false;
|
||||
bool skip_benchmark = false;
|
||||
int max_balls_override = 0;
|
||||
int initial_postfx = -1;
|
||||
AppMode initial_mode = AppMode::SANDBOX; // Modo inicial (default: SANDBOX)
|
||||
|
||||
// Parsear argumentos
|
||||
@@ -124,6 +126,25 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
} else if (strcmp(argv[i], "--skip-benchmark") == 0) {
|
||||
skip_benchmark = true;
|
||||
} else if (strcmp(argv[i], "--postfx") == 0) {
|
||||
if (i + 1 < argc) {
|
||||
std::string fx = argv[++i];
|
||||
if (fx == "vinyeta") {
|
||||
initial_postfx = 0;
|
||||
} else if (fx == "scanlines") {
|
||||
initial_postfx = 1;
|
||||
} else if (fx == "cromatica") {
|
||||
initial_postfx = 2;
|
||||
} else if (fx == "complet") {
|
||||
initial_postfx = 3;
|
||||
} else {
|
||||
std::cerr << "Error: --postfx '" << fx << "' no válido. Usa: vinyeta, scanlines, cromatica, complet\n";
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
std::cerr << "Error: --postfx requiere un valor\n";
|
||||
return -1;
|
||||
}
|
||||
} else if (strcmp(argv[i], "--max-balls") == 0) {
|
||||
if (i + 1 < argc) {
|
||||
int n = atoi(argv[++i]);
|
||||
@@ -158,6 +179,9 @@ int main(int argc, char* argv[]) {
|
||||
else if (skip_benchmark)
|
||||
engine.setSkipBenchmark();
|
||||
|
||||
if (initial_postfx >= 0)
|
||||
engine.setInitialPostFX(initial_postfx);
|
||||
|
||||
if (!engine.initialize(width, height, zoom, fullscreen, initial_mode)) {
|
||||
std::cout << "¡Error al inicializar el engine!" << std::endl;
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user