diff --git a/src/input.h b/src/input.h index 3e38a1a..6105f48 100644 --- a/src/input.h +++ b/src/input.h @@ -102,7 +102,7 @@ typedef enum { INPUT_KEY_KP_0 = 98, INPUT_KEY_KP_PERIOD = 99, - INPUT_KEY_LCTRL = 100, + INPUT_KEY_LCTRL = 100, INPUT_KEY_LSHIFT = 101, INPUT_KEY_LALT = 102, INPUT_KEY_LGUI = 103, diff --git a/src/platform_sdl.c b/src/platform_sdl.c index 8e3f51a..7ed51f0 100755 --- a/src/platform_sdl.c +++ b/src/platform_sdl.c @@ -34,12 +34,12 @@ uint8_t platform_sdl_gamepad_map[] = { uint8_t platform_sdl_axis_map[] = { [SDL_CONTROLLER_AXIS_LEFTX] = INPUT_GAMEPAD_L_STICK_LEFT, - [SDL_CONTROLLER_AXIS_LEFTY] = INPUT_GAMEPAD_L_STICK_UP, - [SDL_CONTROLLER_AXIS_RIGHTX] = INPUT_GAMEPAD_R_STICK_LEFT, - [SDL_CONTROLLER_AXIS_RIGHTY] = INPUT_GAMEPAD_R_STICK_UP, - [SDL_CONTROLLER_AXIS_TRIGGERLEFT] = INPUT_GAMEPAD_L_TRIGGER, - [SDL_CONTROLLER_AXIS_TRIGGERRIGHT] = INPUT_GAMEPAD_R_TRIGGER, - [SDL_CONTROLLER_AXIS_MAX] = INPUT_INVALID + [SDL_CONTROLLER_AXIS_LEFTY] = INPUT_GAMEPAD_L_STICK_UP, + [SDL_CONTROLLER_AXIS_RIGHTX] = INPUT_GAMEPAD_R_STICK_LEFT, + [SDL_CONTROLLER_AXIS_RIGHTY] = INPUT_GAMEPAD_R_STICK_UP, + [SDL_CONTROLLER_AXIS_TRIGGERLEFT] = INPUT_GAMEPAD_L_TRIGGER, + [SDL_CONTROLLER_AXIS_TRIGGERRIGHT] = INPUT_GAMEPAD_R_TRIGGER, + [SDL_CONTROLLER_AXIS_MAX] = INPUT_INVALID }; @@ -219,11 +219,11 @@ void platform_set_audio_mix_cb(void (*cb)(float *buffer, uint32_t len)) { SDL_GLContext platform_gl; void platform_video_init() { - #if defined(USE_GLES2) - SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); - #endif + #if defined(USE_GLES2) + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); + #endif platform_gl = SDL_GL_CreateContext(window); SDL_GL_SetSwapInterval(1); diff --git a/src/types.c b/src/types.c index 2c40bfd..af2ff9c 100644 --- a/src/types.c +++ b/src/types.c @@ -53,11 +53,11 @@ void mat4_set_translation(mat4_t *mat, vec3_t pos) { void mat4_set_yaw_pitch_roll(mat4_t *mat, vec3_t rot) { float sx = sin( rot.x); - float sy = sin(-rot.y); - float sz = sin(-rot.z); - float cx = cos( rot.x); - float cy = cos(-rot.y); - float cz = cos(-rot.z); + float sy = sin(-rot.y); + float sz = sin(-rot.z); + float cx = cos( rot.x); + float cy = cos(-rot.y); + float cz = cos(-rot.z); mat->cols[0][0] = cy * cz + sx * sy * sz; mat->cols[1][0] = cz * sx * sy - cy * sz; @@ -72,11 +72,11 @@ void mat4_set_yaw_pitch_roll(mat4_t *mat, vec3_t rot) { void mat4_set_roll_pitch_yaw(mat4_t *mat, vec3_t rot) { float sx = sin( rot.x); - float sy = sin(-rot.y); - float sz = sin(-rot.z); - float cx = cos( rot.x); - float cy = cos(-rot.y); - float cz = cos(-rot.z); + float sy = sin(-rot.y); + float sz = sin(-rot.z); + float cx = cos( rot.x); + float cy = cos(-rot.y); + float cz = cos(-rot.z); mat->cols[0][0] = cy * cz - sx * sy * sz; mat->cols[1][0] = -cx * sz; diff --git a/src/utils.c b/src/utils.c index 2a213a6..b6eeb4b 100644 --- a/src/utils.c +++ b/src/utils.c @@ -14,8 +14,8 @@ char *get_path(const char *dir, const char *file) { bool file_exists(char *path) { - struct stat s; - return (stat(path, &s) == 0); + struct stat s; + return (stat(path, &s) == 0); } uint8_t *file_load(char *path, uint32_t *bytes_read) { @@ -50,7 +50,7 @@ uint32_t file_store(char *path, void *bytes, int32_t len) { if (fwrite(bytes, 1, len, f) != len) { die("Could not write file file %s", path); } - + fclose(f); return len; } diff --git a/src/wasm-index.html b/src/wasm-index.html index 9379a4c..f739147 100644 --- a/src/wasm-index.html +++ b/src/wasm-index.html @@ -151,13 +151,13 @@ ev.preventDefault(); // Hide select-version, show loader - document.getElementById('select-version').style.display = 'none'; - document.getElementById('loading').style.display = 'block'; + document.getElementById('select-version').style.display = 'none'; + document.getElementById('loading').style.display = 'block'; - // Load the requested script - var s = document.createElement('script'); - s.setAttribute('src', src); - document.head.appendChild(s); + // Load the requested script + var s = document.createElement('script'); + s.setAttribute('src', src); + document.head.appendChild(s); // Attemp to unlock Audio :( var audioCtx = new AudioContext(); diff --git a/src/wipeout/image.c b/src/wipeout/image.c index ef3595c..2a8bd5e 100755 --- a/src/wipeout/image.c +++ b/src/wipeout/image.c @@ -51,8 +51,8 @@ image_t *image_load_from_bytes(uint8_t *bytes, bool transparent) { uint16_t *palette = NULL; if ( - type == TIM_TYPE_PALETTED_4_BPP || - type == TIM_TYPE_PALETTED_8_BPP + type == TIM_TYPE_PALETTED_4_BPP || + type == TIM_TYPE_PALETTED_8_BPP ) { uint32_t header_length = get_i32_le(bytes, &p); uint16_t palette_x = get_i16_le(bytes, &p);