Changed SDL_DrawLine to SDL_DrawLineF in physics_entity_debug_draw and added input to player
This commit is contained in:
parent
36d378ec37
commit
2b1aa6236f
3 changed files with 43 additions and 7 deletions
|
|
@ -18,11 +18,11 @@ void physics_entity_debug_draw(PhysicsEntity self) {
|
|||
lhs = camera_world_to_pixel_point(&g_camera, lhs);
|
||||
rhs = camera_world_to_pixel_point(&g_camera, rhs);
|
||||
SDL_SetRenderDrawColor(g_renderer, 0, 255, 0, 255);
|
||||
SDL_RenderDrawLine(g_renderer, lhs.x, lhs.y, rhs.x, rhs.y);
|
||||
SDL_RenderDrawLineF(g_renderer, lhs.x, lhs.y, rhs.x, rhs.y);
|
||||
|
||||
rhs = camera_world_to_pixel_point(&g_camera, vaddf(transform->position, rigidbody_get_force(body)));
|
||||
SDL_SetRenderDrawColor(g_renderer, 0, 255, 255, 255);
|
||||
SDL_RenderDrawLine(g_renderer, lhs.x, lhs.y, rhs.x, rhs.y);
|
||||
SDL_RenderDrawLineF(g_renderer, lhs.x, lhs.y, rhs.x, rhs.y);
|
||||
}
|
||||
static inline
|
||||
Vector _internal_calculate_contact_force(RigidBody* self, Contact* contact) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue