2023-07-22 16:27:40 +02:00
|
|
|
#ifndef UTIL_H_
|
|
|
|
#define UTIL_H_
|
2023-07-22 16:15:57 +02:00
|
|
|
|
2023-07-23 01:18:24 +02:00
|
|
|
#include <stdint.h>
|
2023-07-22 16:15:57 +02:00
|
|
|
#include "sdk.h"
|
|
|
|
#include "globals.h"
|
|
|
|
|
|
|
|
/* Vector 2 for 2d points */
|
|
|
|
typedef float vec2_t[2];
|
|
|
|
|
2023-07-23 01:18:24 +02:00
|
|
|
/* RGB color */
|
|
|
|
typedef struct {
|
|
|
|
uint8_t r, g, b;
|
|
|
|
} rgb_t;
|
|
|
|
|
2023-07-22 16:15:57 +02:00
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
bool is_alive(cl_entity_t* ent);
|
|
|
|
bool valid_client(cl_entity_t* ent);
|
|
|
|
char* get_name(int ent_idx);
|
2023-07-23 00:27:16 +02:00
|
|
|
vec3_t vec3(float x, float y, float z);
|
2023-07-22 16:15:57 +02:00
|
|
|
bool vec_is_zero(vec3_t v);
|
|
|
|
bool world_to_screen(vec3_t vec, vec2_t screen);
|
2023-07-23 01:18:24 +02:00
|
|
|
void gl_drawline(int x0, int y0, int x1, int y1, float w, rgb_t col);
|
2023-07-22 16:15:57 +02:00
|
|
|
|
2023-07-22 16:27:40 +02:00
|
|
|
#endif /* UTIL_H_ */
|