mirror of
https://github.com/phoboslab/wipeout-rewrite
synced 2024-12-26 09:59:04 +01:00
Whitespace
This commit is contained in:
parent
13d1463112
commit
ba2222775a
6 changed files with 33 additions and 33 deletions
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
20
src/types.c
20
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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue