crocparty/sys/sys_data.h

38 lines
868 B
C
Raw Permalink Normal View History

2024-02-26 01:54:57 +00:00
#ifndef CROCPARTY_SYS_DATA_H
#define CROCPARTY_SYS_DATA_H
#include <stdint.h>
2024-02-27 00:01:47 +00:00
#define SYS_COLOR_TRANSPARENT 255
#define SYS_COLOR_N 256
#define SYS_SPRITE_H 8
#define SYS_SPRITE_W 8
2024-02-26 01:54:57 +00:00
typedef int32_t sys_i32;
typedef uint8_t sys_color;
2024-02-27 03:51:26 +00:00
typedef uint8_t sys_maptile;
2024-02-26 01:54:57 +00:00
typedef uint32_t sys_screen_color;
2024-02-26 20:42:07 +00:00
typedef uint64_t sys_glyph;
2024-02-27 00:01:47 +00:00
typedef struct {
sys_color pixels[SYS_SPRITE_H][SYS_SPRITE_W];
} sys_sprite;
typedef struct {
sys_sprite* sprites;
uint32_t width;
uint32_t height;
} sys_spritesheet;
2024-02-27 03:51:26 +00:00
typedef struct {
sys_maptile* tiles;
uint32_t width;
uint32_t height;
} sys_map;
2024-02-26 01:54:57 +00:00
sys_screen_color sys_make_screen_color(uint8_t r, uint8_t g, uint8_t b);
sys_i32 sys_max_i32(sys_i32 x, sys_i32 y);
sys_i32 sys_min_i32(sys_i32 x, sys_i32 y);
2024-02-26 06:23:43 +00:00
sys_i32 sys_abs_i32(sys_i32 x);
sys_i32 sys_sgn_i32(sys_i32 x);
2024-02-27 03:51:26 +00:00
#endif // CROCPARTY_SYS_DATA_H