You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
825 B
C
64 lines
825 B
C
6 years ago
|
#pragma once
|
||
6 years ago
|
|
||
|
#define SCREEN_W 640
|
||
|
#define SCREEN_H 480
|
||
6 years ago
|
#define SCREEN_R_B 560
|
||
|
#define SCREEN_L_B 80
|
||
6 years ago
|
#define TILE_SIZE 40
|
||
|
#define LEVEL_LEN 120
|
||
6 years ago
|
|
||
6 years ago
|
//State machine states
|
||
6 years ago
|
enum State {
|
||
|
Start,
|
||
|
Gameplay,
|
||
6 years ago
|
Win,
|
||
|
Lose,
|
||
6 years ago
|
Exit
|
||
6 years ago
|
};
|
||
|
|
||
6 years ago
|
//Movement directions
|
||
6 years ago
|
enum Direction {
|
||
|
U,
|
||
|
D,
|
||
|
L,
|
||
|
R,
|
||
|
UR,
|
||
|
UL,
|
||
|
DR,
|
||
|
DL
|
||
6 years ago
|
};
|
||
|
|
||
6 years ago
|
//Game object behaviors
|
||
6 years ago
|
enum Behavior {
|
||
|
Player,
|
||
|
Enemy
|
||
6 years ago
|
};
|
||
|
|
||
6 years ago
|
//Define current background layer for scrolling
|
||
6 years ago
|
enum BgLayer {
|
||
|
Front,
|
||
|
Middle,
|
||
|
Back
|
||
|
};
|
||
|
|
||
6 years ago
|
//Game object hitbox for collision detection
|
||
6 years ago
|
struct Hitbox {
|
||
|
int x;
|
||
|
int y;
|
||
|
int height;
|
||
|
int width;
|
||
|
};
|
||
|
|
||
6 years ago
|
//Struct for enemy queue
|
||
6 years ago
|
struct NewEnemy {
|
||
|
int x;
|
||
|
Behavior e_type;
|
||
|
int when;
|
||
6 years ago
|
};
|
||
|
|
||
6 years ago
|
//When inputs must be delayed by a number of frames (no longer used, kept for possible future use
|
||
6 years ago
|
struct InputDelay {
|
||
|
bool input_hit;
|
||
|
int delay_sec;
|
||
|
int max_delay;
|
||
6 years ago
|
};
|