interference/include/main.h

42 lines
676 B
C
Raw Normal View History

2021-12-19 14:47:01 +01:00
#pragma once
#define PLAYER_SIZE 16
2021-12-20 15:44:38 +01:00
#define TILE_S 8
2021-12-20 15:29:54 +01:00
#define TILESET_W 12
#define TILESET_H 6
2021-12-19 14:47:01 +01:00
/* Yup, it's exactly the code from frozen frenzy™. */
2021-12-20 15:29:54 +01:00
/* used for tiles */
typedef int tile_t;
2021-12-19 14:47:01 +01:00
/* struct for a pair of int values */
typedef struct Vec2 {
int x, y;
} Vec2;
/* struct for a pair of float values */
typedef struct FVec2 {
float x, y;
} FVec2;
/* struct for player's data */
typedef struct Player {
Vec2 pos;
Vec2 spawn;
FVec2 spd;
} Player;
/* dynamic level data */
typedef struct Level {
int width, height;
2021-12-20 15:29:54 +01:00
tile_t data[];
2021-12-19 14:47:01 +01:00
} Level;
2021-12-20 15:29:54 +01:00
/* struct for rem movement and collision check */
typedef struct Res_Mov {
Player player;
Vec2 moved;
} Res_Mov;