Fix a very nasty bug

This commit is contained in:
Miloslav Ciz 2025-06-18 03:53:35 +02:00
parent abd68ce0ae
commit dae47de5f9
4 changed files with 24 additions and 18 deletions

View file

@ -14,8 +14,8 @@
#define LCR_SETTING_MUSIC 0
#define LCR_SETTING_GHOST_MAX_SAMPLES 0
#define LCR_SETTING_MAP_MAX_BLOCKS 512
#define LCR_SETTING_MAX_MAP_VERTICES 800
#define LCR_SETTING_MAX_MAP_TRIANGLES 900
#define LCR_SETTING_MAX_MAP_VERTICES 1024
#define LCR_SETTING_MAX_MAP_TRIANGLES 1500
#define LCR_SETTING_REPLAY_MAX_SIZE 0
#define LCR_SETTING_CAR_SHADOW 0
#define LCR_SETTING_PARTICLES 0
@ -23,9 +23,10 @@
#define LCR_SETTING_LOD_DISTANCE 100
#define LCR_SETTING_CAR_ANIMATION_SUBDIVIDE 0
#define LCR_SETTING_FPS 25
#define LCR_SETTING_TEXTURE_SUBSAMPLE 8
#define LCR_SETTING_TEXTURE_SUBSAMPLE 4
#define LCR_SETTING_ENABLE_DATA_FILE 0
#define LCR_SETTING_ONLY_SMALL_MAPS 1
#define S3L_PERSPECTIVE_CORRECTION 0
#include "game.h"
@ -48,12 +49,12 @@ uint8_t LCR_keyPressed(uint8_t key)
{
#define b(button) (mp.buttons.timeHeld(button) > 0)
case LCR_KEY_UP: return arrows & 0x04; break;
case LCR_KEY_DOWN: return arrows & 0x08; break;
case LCR_KEY_RIGHT: return arrows & 0x01; break;
case LCR_KEY_LEFT: return arrows & 0x02; break;
case LCR_KEY_A: return b(BTN_A); break;
case LCR_KEY_B: return b(BTN_B); break;
case LCR_KEY_UP: return (arrows & 0x04) | b(BTN_2); break;
case LCR_KEY_DOWN: return (arrows & 0x08) | b(BTN_8) | b(BTN_5); break;
case LCR_KEY_RIGHT: return (arrows & 0x01) | b(BTN_6); break;
case LCR_KEY_LEFT: return (arrows & 0x02) | b(BTN_4); break;
case LCR_KEY_A: return b(BTN_A) | b(BTN_HASHTAG); break;
case LCR_KEY_B: return b(BTN_B) | b(BTN_ASTERISK); break;
default: return 0; break;
#undef b