2019-03-24 00:28:43 -07:00
|
|
|
#ifndef USEFUL_H
|
|
|
|
#define USEFUL_H
|
|
|
|
|
|
|
|
#include <switch.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2019-05-28 15:36:33 -05:00
|
|
|
#define LOAD64 *(u64 *)
|
2019-05-27 21:48:19 -05:00
|
|
|
|
2019-06-08 20:11:06 -07:00
|
|
|
#define LINKABLE __attribute__ ((weak))
|
|
|
|
|
|
|
|
#define debug_log(...) \
|
|
|
|
{char log_buf[0x200]; snprintf(log_buf, 0x200, __VA_ARGS__); \
|
|
|
|
svcOutputDebugString(log_buf, strlen(log_buf));}
|
2019-05-27 21:48:19 -05:00
|
|
|
|
2019-07-06 11:53:06 -07:00
|
|
|
u64 is_training_mode(void) asm("_ZN3app9smashball16is_training_modeEv") LINKABLE;
|
|
|
|
|
2019-05-28 15:36:33 -05:00
|
|
|
typedef struct Hash40 {
|
|
|
|
uint64_t hash : 40;
|
|
|
|
} Hash40;
|
2019-05-27 21:48:19 -05:00
|
|
|
|
2019-06-08 20:11:06 -07:00
|
|
|
typedef struct Vector2f {
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
} Vector2f;
|
|
|
|
|
2019-05-28 15:36:33 -05:00
|
|
|
typedef struct Vector3f {
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float z;
|
|
|
|
} Vector3f;
|
2019-06-08 20:11:06 -07:00
|
|
|
|
|
|
|
typedef struct Vector4f {
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float z;
|
|
|
|
float w;
|
|
|
|
}Vector4f;
|
2019-05-27 14:33:40 -05:00
|
|
|
|
2019-03-24 00:28:43 -07:00
|
|
|
#endif // USEFUL_H
|