40 lines
651 B
C
40 lines
651 B
C
#pragma once
|
|
|
|
#define TILE_S 8
|
|
#define TILESET_W 12
|
|
#define TILESET_H 6
|
|
|
|
/* Yup, it's exactly the code from frozen frenzy™. */
|
|
|
|
/* used for tiles */
|
|
typedef int tile_t;
|
|
|
|
/* 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;
|
|
tile_t *data;
|
|
} Level;
|
|
|
|
/* struct for rem movement and collision check */
|
|
typedef struct Res_Mov {
|
|
Player player;
|
|
Vec2 moved;
|
|
} Res_Mov;
|