mirror of
https://github.com/pmret/papermario.git
synced 2024-09-19 16:01:48 +02:00
comment goomba_npc movement
This commit is contained in:
parent
056fbac32c
commit
26f0cee254
@ -121,6 +121,9 @@ typedef struct StatDrop {
|
|||||||
|
|
||||||
#define ANIMATION(sprite, palette, anim) (sprite << 16) + (palette << 8) + anim
|
#define ANIMATION(sprite, palette, anim) (sprite << 16) + (palette << 8) + anim
|
||||||
|
|
||||||
|
#define OVERRIDE_MOVEMENT_SPEED(speed) (speed * 32767)
|
||||||
|
#define NO_OVERRIDE_MOVEMENT_SPEED OVERRIDE_MOVEMENT_SPEED(-1)
|
||||||
|
|
||||||
typedef struct StaticNPC {
|
typedef struct StaticNPC {
|
||||||
/* 0x000 */ NpcId id;
|
/* 0x000 */ NpcId id;
|
||||||
/* 0x004 */ NpcSettings* settings;
|
/* 0x004 */ NpcSettings* settings;
|
||||||
@ -137,7 +140,7 @@ typedef struct StaticNPC {
|
|||||||
/* 0x0DA */ s16 minCoinBonus;
|
/* 0x0DA */ s16 minCoinBonus;
|
||||||
/* 0x0DC */ s16 maxCoinBonus;
|
/* 0x0DC */ s16 maxCoinBonus;
|
||||||
/* 0x0DE */ char unk_DE[2];
|
/* 0x0DE */ char unk_DE[2];
|
||||||
/* 0x0E0 */ s32 movement[48];
|
/* 0x0E0 */ s32 movement[48]; // TODO: type
|
||||||
/* 0x1A0 */ s32 animations[16];
|
/* 0x1A0 */ s32 animations[16];
|
||||||
/* 0x1E0 */ char unk_1E0[8];
|
/* 0x1E0 */ char unk_1E0[8];
|
||||||
/* 0x1E8 */ UNK_PTR extraAnimations;
|
/* 0x1E8 */ UNK_PTR extraAnimations;
|
||||||
|
@ -169,7 +169,20 @@ static StaticNpc goomba_npc = {
|
|||||||
.itemDrops = { { ItemId_MUSHROOM, 10 } },
|
.itemDrops = { { ItemId_MUSHROOM, 10 } },
|
||||||
.heartDrops = GENEROUS_WHEN_LOW_HEART_DROPS(2),
|
.heartDrops = GENEROUS_WHEN_LOW_HEART_DROPS(2),
|
||||||
.flowerDrops = GENEROUS_WHEN_LOW_FLOWER_DROPS(2),
|
.flowerDrops = GENEROUS_WHEN_LOW_FLOWER_DROPS(2),
|
||||||
.movement = { 0xFFFFFFDF, 0x0, 0x1E, 0x28, 0x14, 0xFFFF8001, 0x1, 0xC8, 0x0, 0x0, 0x190, 0x3C, 0x1, 0x1 },
|
.movement = {
|
||||||
|
// Wander
|
||||||
|
/* center x, y, z */ -33, 0, 30,
|
||||||
|
/* size x, z */ 40, 20,
|
||||||
|
/* speed */ NO_OVERRIDE_MOVEMENT_SPEED,
|
||||||
|
/* box? */ TRUE,
|
||||||
|
|
||||||
|
// Detect
|
||||||
|
/* center x, y, z */ 200, 0, 0,
|
||||||
|
/* size x, z */ 400, 60,
|
||||||
|
/* box? */ TRUE,
|
||||||
|
|
||||||
|
/* flying? */ TRUE,
|
||||||
|
},
|
||||||
.animations = {
|
.animations = {
|
||||||
ANIMATION(SpriteId_GOOMBA, 0, 1),
|
ANIMATION(SpriteId_GOOMBA, 0, 1),
|
||||||
ANIMATION(SpriteId_GOOMBA, 0, 2),
|
ANIMATION(SpriteId_GOOMBA, 0, 2),
|
||||||
|
Loading…
Reference in New Issue
Block a user