This repository has been archived on 2022-01-13. You can view files and clone it, but cannot push or open issues or pull requests.
2021-01-09 16:52:03 +01:00
|
|
|
#include "player_modifiers.h"
|
2021-01-09 14:28:14 +01:00
|
|
|
#include "player.h"
|
|
|
|
|
2021-01-15 18:37:43 +01:00
|
|
|
void player_mod_ice(Player *player, uint8_t sides) {
|
|
|
|
if (sides & D_FLOOR) {
|
|
|
|
player->vars.acceleration /= 4;
|
|
|
|
player->vars.friction /= 4;
|
|
|
|
}
|
2021-01-09 14:28:14 +01:00
|
|
|
}
|
|
|
|
|
2021-01-15 18:37:43 +01:00
|
|
|
void player_mod_glue(Player *player, uint8_t sides) {
|
|
|
|
if (sides & D_FLOOR) {
|
|
|
|
player->vars.acceleration = 1;
|
|
|
|
player->vars.friction = 1;
|
|
|
|
}
|
|
|
|
if (sides & (D_LEFT | D_RIGHT | D_CEIL)) {
|
2021-01-16 10:43:39 +01:00
|
|
|
player->spd.y = 0;
|
2021-01-15 18:37:43 +01:00
|
|
|
}
|
2021-01-09 14:28:14 +01:00
|
|
|
}
|