mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-17 03:57:38 +01:00
oops
This commit is contained in:
parent
a8f9adeaf5
commit
416db8e751
@ -1,46 +0,0 @@
|
||||
#include "global.h"
|
||||
#include "global.fieldmap.h"
|
||||
#include "sprite.h"
|
||||
#include "event_object_movement.h"
|
||||
#include "bike.h"
|
||||
|
||||
static u8 EventObjectCB2_NoMovement2();
|
||||
void sub_808C280(struct EventObject *); //struct EventObject *playerEventObj
|
||||
bool8 TryInterruptEventObjectSpecialAnim(struct EventObject *, u8);
|
||||
void npc_clear_strange_bits(struct EventObject *);
|
||||
void DoPlayerAvatarTransition(void);
|
||||
bool8 TryDoMetatileBehaviorForcedMovement();
|
||||
void MovePlayerAvatarUsingKeypadInput(u8, u16, u16);
|
||||
void PlayerAllowForcedMovementIfMovingSameDirection();
|
||||
|
||||
void MovementType_Player(struct Sprite *sprite)
|
||||
{
|
||||
// ((Sprite->data[0] << 3) + Sprite->data[0]) << 2
|
||||
UpdateEventObjectCurrentMovement(&gEventObjects[sprite->data[0]], sprite, EventObjectCB2_NoMovement2);
|
||||
}
|
||||
|
||||
static u8 EventObjectCB2_NoMovement2()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void player_step(u8 direction, u16 newKeys, u16 heldKeys)
|
||||
{
|
||||
struct EventObject *playerEventObj = &gEventObjects[gPlayerAvatar.eventObjectId];
|
||||
|
||||
sub_808C280(playerEventObj);
|
||||
if (gPlayerAvatar.preventStep == FALSE)
|
||||
{
|
||||
Bike_TryAcroBikeHistoryUpdate(newKeys, heldKeys);
|
||||
if (TryInterruptEventObjectSpecialAnim(playerEventObj, direction) == 0)
|
||||
{
|
||||
npc_clear_strange_bits(playerEventObj);
|
||||
DoPlayerAvatarTransition();
|
||||
if (TryDoMetatileBehaviorForcedMovement() == 0)
|
||||
{
|
||||
MovePlayerAvatarUsingKeypadInput(direction, newKeys, heldKeys);
|
||||
PlayerAllowForcedMovementIfMovingSameDirection();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user