corregides cridades a SDL3 i migrat casi tot de int a float. Falta jail_shader

This commit is contained in:
2025-10-15 12:16:50 +02:00
parent 7c102e42cc
commit e4a08d2ec7
52 changed files with 879 additions and 823 deletions

View File

@@ -64,9 +64,9 @@ void Title::checkEvents() {
globalEvents::check(event);
// Solo se comprueban estas teclas si no está activo el menu de logros
if (event.type == SDL_KEYDOWN) {
if (event.type == SDL_EVENT_KEY_DOWN) {
if (!show_cheevos_) {
switch (event.key.keysym.scancode) {
switch (event.key.key) {
case SDL_SCANCODE_1:
options.section.section = Section::GAME;
options.section.subsection = Subsection::NONE;
@@ -242,8 +242,8 @@ void Title::moveCheevosList(int direction) {
cheevos_surface_view_.y = direction == 0 ? cheevos_surface_view_.y - SPEED : cheevos_surface_view_.y + SPEED;
// Ajusta los limites
const int BOTTOM = cheevos_surface_->getHeight() - cheevos_surface_view_.h;
cheevos_surface_view_.y = std::clamp(cheevos_surface_view_.y, 0, BOTTOM);
const float BOTTOM = cheevos_surface_->getHeight() - cheevos_surface_view_.h;
cheevos_surface_view_.y = std::clamp(cheevos_surface_view_.y, 0.0F, BOTTOM);
cheevos_sprite_->setClip(cheevos_surface_view_);
}