#include #include "physics.h" #include "player.h" void add_player(float xpos, float ypos) { struct entity player = { .flags = (ENTITY_ACTIVE | ENTITY_VISIBLE), .type = Player_Entity, .position = (Vector2) {xpos, ypos}, .velocity = {100.0, 100.0}, .texture = LoadTexture("assets/Graphics/spritesheet-characters-double.png"), .sprite_source_rect = (Rectangle) { .x = 0, .y = 0, .width = 257, .height = 257 }, .sprite_dest_rect = (Rectangle) { .x = -50, .y = -50, .width = 100, .height = 100 } }; add_entity(&player); } void update_player(struct entity* entity, float dt) { move_and_collide(entity, dt); }