sm64coopdx/src/pc/utils/misc.h
Blockyyy 94028254e5
Button to open the website, buttons to open mod/dynos folder (#1208)
new "Browse mods" button, which opens the website, this also adds an "open mods folder" button and a "open dynos folder" button
two new functions also have been created for this "open_folder" and "open_url"
2026-05-25 21:35:52 +10:00

47 lines
No EOL
2.1 KiB
C

#ifndef UTILS_MISC_H
#define UTILS_MISC_H
#include <stdio.h>
#include "types.h"
#include "PR/gbi.h"
/* |description|Smoothly steps between `edge0` and `edge1` with `x` as delta|descriptionEnd| */
float smooth_step(float edge0, float edge1, float x);
/* |description|Updates every Mario state's star count with the save file total star count|descriptionEnd| */
void update_all_mario_stars(void);
/* |description|Gets the current clock elapsed time|descriptionEnd| */
f32 clock_elapsed(void);
/* |description|Gets the current clock elapsed time with double precision|descriptionEnd| */
f64 clock_elapsed_f64(void);
/* |description|Gets the current clock elapsed time in frames|descriptionEnd| */
u32 clock_elapsed_ticks(void);
/* |description|Checks whether it is the day given|descriptionEnd| */
bool clock_is_date(u8 month, u8 day);
void precise_delay_f64(f64 delaySec);
void file_get_line(char* buffer, size_t maxLength, FILE* fp);
/* |description|Linearly interpolates between `a` and `b` with `delta`|descriptionEnd| */
f32 delta_interpolate_f32(f32 a, f32 b, f32 delta);
/* |description|Linearly interpolates between `a` and `b` with `delta`|descriptionEnd| */
s32 delta_interpolate_s32(s32 a, s32 b, f32 delta);
/* |description|Linearly interpolates `res` between `a` and `b` with `delta`|descriptionEnd| */
void delta_interpolate_vec3f(VEC_OUT Vec3f res, Vec3f a, Vec3f b, f32 delta);
/* |description|Linearly interpolates `res` between `a` and `b` with `delta`|descriptionEnd| */
void delta_interpolate_vec3s(VEC_OUT Vec3s res, Vec3s a, Vec3s b, f32 delta);
void delta_interpolate_normal(s8* res, s8* a, s8* b, f32 delta);
void delta_interpolate_rgba(u8* res, u8* a, u8* b, f32 delta);
void delta_interpolate_mtx(Mtx* out, Mtx* a, Mtx* b, f32 delta);
void detect_and_skip_mtx_interpolation(Mtx** mtxPrev, Mtx** mtx);
void str_seperator_concat(char *output_buffer, int buffer_size, char** strings, int num_strings, char* seperator);
void open_url(const char* url);
void open_folder(const char* path);
const char *strstr_lowercased(const char *haystack, const char *needle);
bool can_update_game(void);
void update_game(void);
#endif