Use gint.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 lines
497 B

#include <gint/keyboard.h>
#include "player.h"
void jump_test(char *jump_pressed, char *jump_buffer, unsigned int *jump_hold)
{
if (keydown(KEY_SHIFT))
{
if (!*jump_pressed)
{
*jump_pressed = 1;
*jump_buffer = 3;
}
}
else {
*jump_hold = 0;
*jump_pressed = 0;
}
if (*jump_buffer) *jump_buffer -= 1;
}
void set_start_pos(int *start_x, int *start_y, int x, int y)
{
*start_x = x;
*start_y = y;
}
void reset_old_pos(int *old_x, int *old_y)
{
*old_x = -16;
*old_y = -16;
}