diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-05-17 15:55:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-17 15:55:37 -0400 |
commit | 90aadf3844386824140a20d7fbb847bc16009a94 (patch) | |
tree | 6f83fce90e71abb22b1a8f3e09c79963b2a34d5d /src/consts.h | |
parent | bc63fa57ced1c7329f7fdcfd168eaf7e290158bc (diff) | |
parent | 86f0106d0523825549f1e74b835688c78a10cf6c (diff) | |
download | therapy-90aadf3844386824140a20d7fbb847bc16009a94.tar.gz therapy-90aadf3844386824140a20d7fbb847bc16009a94.tar.bz2 therapy-90aadf3844386824140a20d7fbb847bc16009a94.zip |
Merge pull request #7 from hatkirby/es-rewrite
The ECS rewrite exceeds the original branch in functionality, so it is time to merge it in.
Diffstat (limited to 'src/consts.h')
-rw-r--r-- | src/consts.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/consts.h b/src/consts.h index 804c761..f3f777f 100644 --- a/src/consts.h +++ b/src/consts.h | |||
@@ -7,8 +7,21 @@ const int GAME_WIDTH = 320; | |||
7 | const int GAME_HEIGHT = 200; | 7 | const int GAME_HEIGHT = 200; |
8 | const int MAP_WIDTH = GAME_WIDTH/TILE_WIDTH; | 8 | const int MAP_WIDTH = GAME_WIDTH/TILE_WIDTH; |
9 | const int MAP_HEIGHT = GAME_HEIGHT/TILE_HEIGHT - 1; | 9 | const int MAP_HEIGHT = GAME_HEIGHT/TILE_HEIGHT - 1; |
10 | const int WALL_GAP = 5; | ||
11 | const int TILESET_COLS = 8; | ||
12 | const int FONT_COLS = 16; | ||
10 | 13 | ||
11 | const int FRAMES_PER_SECOND = 60; | 14 | const int FRAMES_PER_SECOND = 60; |
12 | const double SECONDS_PER_FRAME = 1.0 / FRAMES_PER_SECOND; | 15 | const 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 | |||
20 | const double NORMAL_GRAVITY = CALC_GRAVITY(TILE_HEIGHT*3.5, 0.233); | ||
21 | const double JUMP_GRAVITY = CALC_GRAVITY(TILE_HEIGHT*4.5, 0.3); | ||
22 | const double JUMP_VELOCITY = CALC_VELOCITY(TILE_HEIGHT*4.5, 0.3); | ||
23 | |||
24 | const double WALK_SPEED = 90; | ||
25 | const double TERMINAL_VELOCITY = 240; | ||
26 | |||
14 | #endif | 27 | #endif |