summaryrefslogtreecommitdiff
path: root/src/player.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/player.c b/src/player.c
index 36788aa..fccbcee 100644
--- a/src/player.c
+++ b/src/player.c
@@ -18,6 +18,8 @@
#define TOP_SPEEDY 100
#define ACCEL_X 200
+#define JUMP_SPEEDY 250
+
#define WALK_FRAME_TIME 0.2
extern Texture character_spritesheet;
@@ -32,12 +34,6 @@ void add_player(float xpos, float ypos) {
.position = (Vector2) {xpos, ypos},
.texture = character_spritesheet,
- .sprite_source_rect = (Rectangle) {
- .x = 0,
- .y = 0,
- .width = 128,
- .height = 128
- },
.collider = (Rectangle) {
.x = -COLLIDER_WIDTH / 2 + COLLIDER_XOFF,
.y = -COLLIDER_HEIGHT / 2 + COLLIDER_YOFF,
@@ -88,7 +84,7 @@ void handle_movement(struct entity* player, float dt) {
}
void jump(struct entity* player) {
- player->velocity.y = -200;
+ player->velocity.y = -JUMP_SPEEDY;
if (IsKeyDown(KEY_A) && player->velocity.x > 0)
player->velocity.x = 0;