port InitialiseBaldy

This commit is contained in:
rr- 2021-03-05 21:05:01 +01:00
parent d795442250
commit 05d8f0815f
4 changed files with 26 additions and 8 deletions

View file

@ -104,6 +104,16 @@ typedef enum {
COWBOY_SHOOT = 6,
} COWBOY_ANIM;
typedef enum {
BALDY_EMPTY = 0,
BALDY_STOP = 1,
BALDY_WALK = 2,
BALDY_RUN = 3,
BALDY_AIM = 4,
BALDY_DEATH = 5,
BALDY_SHOOT = 6,
} BALDY_ANIM;
static BITE_INFO LarsonGun = { -60, 170, 0, 14 };
static BITE_INFO PierreGun1 = { 60, 200, 0, 11 };
static BITE_INFO PierreGun2 = { -57, 200, 0, 14 };
@ -949,6 +959,12 @@ void CowboyControl(int16_t item_num)
CreatureAnimation(item_num, angle, 0);
}
void InitialiseBaldy(int16_t item_num)
{
InitialiseCreature(item_num);
Items[item_num].current_anim_state = BALDY_RUN;
}
void T1MInjectGamePeople()
{
INJECT(0x00430D80, Targetable);
@ -964,4 +980,5 @@ void T1MInjectGamePeople()
INJECT(0x004320E0, SkateKidControl);
INJECT(0x00432550, DrawSkateKid);
INJECT(0x004325A0, CowboyControl);
INJECT(0x00432B60, InitialiseBaldy);
}

View file

@ -5,7 +5,6 @@
#include <stdint.h>
// clang-format off
#define InitialiseBaldy ((void (*)(int16_t item_num))0x00432B60)
#define BaldyControl ((void (*)(int16_t item_num))0x00432B90)
// clang-format on
@ -35,6 +34,8 @@ void DrawSkateKid(ITEM_INFO* item);
void CowboyControl(int16_t item_num);
void InitialiseBaldy(int16_t item_num);
void T1MInjectGamePeople();
#endif