Refactor PR #151

This commit is contained in:
Colton Rushton 2020-05-19 10:14:44 -03:00
parent 3a204f25c2
commit b0081e8d60
4 changed files with 13 additions and 1 deletions

View file

@ -1,6 +1,8 @@
#ifndef STDLIB_H
#define STDLIB_H
#ifndef TARGET_WEB
typedef struct lldiv_t
{
long long quot;
@ -16,4 +18,10 @@ typedef struct ldiv_t
lldiv_t lldiv(long long num, long long denom);
ldiv_t ldiv(long num, long denom);
#else
#include <stdlib.h>
#endif
#endif

View file

@ -29,7 +29,11 @@ extern f32 gCosineTable[];
#define sqr(x) ((x) * (x))
#ifndef TARGET_WEB
#define abs(x) ((x) < 0 ? -(x) : (x))
#else
#include "../../include/libc/stdlib.h"
#endif
void *vec3f_copy(Vec3f dest, Vec3f src);
void *vec3f_set(Vec3f dest, f32 x, f32 y, f32 z);

View file

@ -3,7 +3,6 @@
#include "prevent_bss_reordering.h"
#include "sm64.h"
#include "gfx_dimensions.h"
//#include "game.h"
#include "game_init.h"
#include "sound_init.h"
#include "level_update.h"

View file

@ -23,6 +23,7 @@
#include "pc/controller/controller_api.h"
#include <stdbool.h>
#include "../../include/libc/stdlib.h"
u8 optmenu_open = 0;