summary refs log tree commit diff stats
path: root/src/consts.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/consts.h')
-rw-r--r--src/consts.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/consts.h b/src/consts.h index 804c761..581018d 100644 --- a/src/consts.h +++ b/src/consts.h
@@ -7,8 +7,20 @@ const int GAME_WIDTH = 320;
7const int GAME_HEIGHT = 200; 7const int GAME_HEIGHT = 200;
8const int MAP_WIDTH = GAME_WIDTH/TILE_WIDTH; 8const int MAP_WIDTH = GAME_WIDTH/TILE_WIDTH;
9const int MAP_HEIGHT = GAME_HEIGHT/TILE_HEIGHT - 1; 9const int MAP_HEIGHT = GAME_HEIGHT/TILE_HEIGHT - 1;
10const int WALL_GAP = 6;
11const int TILESET_COLS = 8;
12const int FONT_COLS = 16;
10 13
11const int FRAMES_PER_SECOND = 60; 14const int FRAMES_PER_SECOND = 60;
12const double SECONDS_PER_FRAME = 1.0 / FRAMES_PER_SECOND; 15const double SECONDS_PER_FRAME = 1.0 / FRAMES_PER_SECOND;
13 16
17#define CALC_VELOCITY(h, l) (-2 * (h) / (l))
18#define CALC_GRAVITY(h, l) (2 * ((h) / (l)) / (l))
19
20const double NORMAL_GRAVITY = CALC_GRAVITY(TILE_HEIGHT*3.5, 0.233);
21const double JUMP_GRAVITY = CALC_GRAVITY(TILE_HEIGHT*4.5, 0.3);
22const double JUMP_VELOCITY = CALC_VELOCITY(TILE_HEIGHT*4.5, 0.3);
23
24const double WALK_SPEED = 90;
25
14#endif 26#endif