battle/actor flags and more (#1119)

* battle documentation

* mostly startup stuff

* battle file names

* minor reorg

* actor rendering

* few extras

* file renames and camera unks

* py fix

* fio cleanup

* sounds progress

---------

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2023-10-14 15:43:12 -04:00 committed by GitHub
parent 3293216356
commit ce4ab34def
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
575 changed files with 11900 additions and 11469 deletions

View File

@ -164,14 +164,16 @@ typedef struct HeapNode {
/* 0x0C */ u32 capacity;
} HeapNode; // size = 0x10
#define NPC_BLUR_FRAMES 20
/// Ring buffer of an NPC's position over the past 20 frames.
typedef struct NpcMotionBlur {
/* 0x00 */ s8 unk_00;
/* 0x00 */ s8 unused;
/* 0x01 */ s8 index; ///< Current blur ring buffer index
/* 0x02 */ char unk_02[2]; // padding?
/* 0x04 */ f32 x[20];
/* 0x54 */ f32 y[20];
/* 0xA4 */ f32 z[20];
/* 0x04 */ f32 posX[NPC_BLUR_FRAMES];
/* 0x54 */ f32 posY[NPC_BLUR_FRAMES];
/* 0xA4 */ f32 posZ[NPC_BLUR_FRAMES];
} NpcMotionBlur; // size = 0xF4
typedef struct NpcChompBlur {
@ -212,6 +214,8 @@ typedef struct NpcFollowData {
/* 0x2A0 */ f32 walkRadius;
} NpcFollowData; // size = 0x2A4
#define MAX_NPC_DECORATIONS 2
typedef struct Npc {
/* 0x000 */ s32 flags;
/* 0x004 */ void (*onUpdate)(struct Npc*); ///< Run before anything else for this NPC in update_npcs()
@ -270,32 +274,32 @@ typedef struct Npc {
/* 0x0B0 */ AnimID* extraAnimList;
/* 0x0B4 */ s8 palSwapType; // 0..4 inclusive
/* 0x0B5 */ s8 palSwapPrevType;
/* 0x0B6 */ s8 dirtyPalettes;
/* 0x0B7 */ s8 palSwapState;
/* 0x0B6 */ s8 resetPalAdjust;
/* 0x0B7 */ s8 palAnimState;
/* 0x0B8 */ char unk_B8[4];
/* 0x0BC */ s16 palSwapTimer;
/* 0x0BE */ s16 palSwapLerpAlpha;
/* 0x0C0 */ s8 unk_C0;
/* 0x0C1 */ s8 paletteCount;
/* 0x0BC */ s16 nextPalTime;
/* 0x0BE */ s16 palBlendAlpha;
/* 0x0C0 */ s8 spriteColorVariations;
/* 0x0C1 */ s8 originalPalettesCount;
/* 0x0C2 */ char unk_C2[2];
/* 0x0C4 */ PAL_PTR* spritePaletteList;
/* 0x0C8 */ PAL_BIN localPaletteData[16][16];
/* 0x2C8 */ PAL_PTR localPalettes[16];
/* 0x308 */ s16 unk_308;
/* 0x30A */ s16 unk_30A;
/* 0x30C */ u16 unk_30C;
/* 0x30E */ s16 unk_30E;
/* 0x310 */ s16 unk_310;
/* 0x312 */ s16 unk_312;
/* 0x314 */ s16 unk_314;
/* 0x316 */ s16 unk_316;
/* 0x0C4 */ PAL_PTR* originalPalettesList;
/* 0x0C8 */ PAL_BIN copiedPalettes[16][SPR_PAL_SIZE];
/* 0x2C8 */ PAL_PTR adjustedPalettes[16];
/* 0x308 */ s16 blendPalA;
/* 0x30A */ s16 blendPalB;
/* 0x30C */ u16 palswapTimeHoldA;
/* 0x30E */ s16 palswapTimeAtoB;
/* 0x310 */ s16 palswapTimeHoldB;
/* 0x312 */ s16 palswapTimeBtoA;
/* 0x314 */ s16 blendPalC;
/* 0x316 */ s16 blendPalD;
/* 0x318 */ f32 screenSpaceOffset2D[2];
/* 0x320 */ f32 verticalStretch;
/* 0x324 */ struct EffectInstance* decorations[2];
/* 0x32C */ s8 decorationType[2];
/* 0x32E */ s8 changedDecoration[2];
/* 0x330 */ s8 decorationInitialised[2];
/* 0x332 */ s16 decorationUnk[2];
/* 0x324 */ struct EffectInstance* decorations[MAX_NPC_DECORATIONS];
/* 0x32C */ s8 decorationType[MAX_NPC_DECORATIONS];
/* 0x32E */ s8 changedDecoration[MAX_NPC_DECORATIONS];
/* 0x330 */ s8 decorationInitialized[MAX_NPC_DECORATIONS];
/* 0x332 */ s16 decorationGlowPhase[MAX_NPC_DECORATIONS];
/* 0x336 */ char unk_336[10];
} Npc; // size = 0x340
@ -823,31 +827,31 @@ typedef struct Camera {
/* 0x488 */ f32 linearInterp;
/* 0x48C */ f32 linearInterpScale; /* 3.0? */
/* 0x490 */ f32 moveSpeed;
/* 0x494 */ f32 unk_494;
/* 0x498 */ f32 unk_498;
/* 0x49C */ f32 unk_49C;
/* 0x4A0 */ f32 savedTargetY;
/* 0x494 */ f32 yinterpGoal;
/* 0x498 */ f32 yinterpAlpha;
/* 0x49C */ f32 yinterpRate; // smaller is faster; not valid for values less than 1.0, unstable below 0.5
/* 0x4A0 */ f32 yinterpCur;
/* 0x4A4 */ Vec3f prevTargetPos;
/* 0x4B0 */ Vec3f movePos;
/* 0x4BC */ Vec3f prevPrevMovePos;
/* 0x4C8 */ Vec3f prevMovePos;
/* 0x4D4 */ u16 prevPrevFollowFlags;
/* 0x4D6 */ u16 prevFollowFlags;
/* 0x4D4 */ u16 prevPrevFollowPlayer;
/* 0x4D6 */ u16 prevFollowPlayer;
/* 0x4D8 */ CameraControlSettings controlSettings;
/* 0x504 */ u16 followPlayer;
/* 0x506 */ u16 panActive;
/* 0x508 */ f32 panPhase;
/* 0x50C */ f32 leadAmount;
/* 0x510 */ f32 unk_510;
/* 0x514 */ f32 unk_514;
/* 0x518 */ f32 unk_518;
/* 0x51C */ s32 unk_51C;
/* 0x510 */ f32 targetLeadAmount;
/* 0x514 */ f32 leadInterpAlpha;
/* 0x518 */ f32 accumulatedStickLead;
/* 0x51C */ s32 increasingLeadInterp;
/* 0x520 */ f32 unk_520;
/* 0x524 */ f32 unk_524;
/* 0x528 */ f32 unk_528;
/* 0x524 */ f32 leadUnkX;
/* 0x528 */ f32 leadUnkZ;
/* 0x52C */ s32 unk_52C;
/* 0x530 */ s32 unk_530;
/* 0x534 */ CameraControlSettings* aabbForZoneBelow;
/* 0x534 */ CameraControlSettings* leadControlSettings;
/* 0x538 */ char unk_538[0x18];
/* 0x550 */ f32 unk_550;
/* 0x554 */ s16 unk_554;
@ -898,7 +902,7 @@ typedef struct BattleStatus {
/* 0x092 */ s8 reflectFlags;
/* 0x093 */ s8 unk_93;
/* 0x094 */ s8 unk_94;
/* 0x095 */ s8 unk_95;
/* 0x095 */ s8 waitForState;
/* 0x096 */ s8 hammerCharge;
/* 0x097 */ s8 jumpCharge;
/* 0x098 */ char unk_98;
@ -929,8 +933,8 @@ typedef struct BattleStatus {
/* 0x0CC */ Vec3f camLookatObjPos;
/* 0x0D8 */ struct Actor* playerActor;
/* 0x0DC */ struct Actor* partnerActor;
/* 0x0E0 */ struct Actor* enemyActors[24];
/* 0x140 */ s16 enemyIDs[24];
/* 0x0E0 */ struct Actor* enemyActors[MAX_ENEMY_ACTORS];
/* 0x140 */ s16 enemyIDs[MAX_ENEMY_ACTORS];
/* 0x170 */ s8 nextEnemyIndex; /* (during enemy turn) who should go next */
/* 0x171 */ s8 numEnemyActors;
/* 0x172 */ s16 activeEnemyActorID; /* (during enemy turn) enemy currently using their move */
@ -949,7 +953,7 @@ typedef struct BattleStatus {
/* 0x194 */ u8 statusChance;
/* 0x195 */ s8 statusDuration;
/* 0x196 */ char unk_196;
/* 0x197 */ s8 targetHomeIndex; /* some sort of home index used for target list construction */
/* 0x197 */ s8 sampleTargetHomeIndex;
/* 0x198 */ s8 powerBounceCounter;
/* 0x199 */ s8 wasStatusInflicted; /* during last attack */
/* 0x19A */ u8 curDamageSource;
@ -1405,24 +1409,24 @@ typedef struct GameStatus {
/* 0x073 */ u8 contBitPattern;
/* 0x074 */ s8 debugEnemyContact;
/* 0x075 */ s8 debugQuizmo;
/* 0x076 */ s8 unk_76;
/* 0x077 */ char unk_77;
/* 0x078 */ s8 disableScripts;
/* 0x076 */ b8 debugUnused1;
/* 0x077 */ b8 debugUnused2;
/* 0x078 */ s8 debugScripts;
/* 0x079 */ char unk_79;
/* 0x07A */ s8 musicEnabled;
/* 0x07A */ b8 musicEnabled;
/* 0x07B */ char unk_7B;
/* 0x07C */ s8 unk_7C;
/* 0x07D */ s8 keepUsingPartnerOnMapChange;
/* 0x07C */ b8 healthBarsEnabled;
/* 0x07D */ b8 keepUsingPartnerOnMapChange;
/* 0x07E */ u8 peachFlags; /* (1 = isPeach, 2 = isTransformed, 4 = hasUmbrella) */
/* 0x07F */ s8 peachDisguise; /* (1 = koopatrol, 2 = hammer bros, 3 = clubba) */
/* 0x080 */ u8 peachBakingIngredient; ///< @see enum PeachBakingItems
/* 0x081 */ s8 multiplayerEnabled;
/* 0x082 */ Vec2b unk_82;
/* 0x081 */ b8 multiplayerEnabled;
/* 0x082 */ Vec2b altViewportOffset;
/* 0x084 */ s8 playerSpriteSet;
/* 0x085 */ char unk_85;
/* 0x086 */ s16 areaID;
/* 0x088 */ s16 prevArea;
/* 0x08A */ s16 didAreaChange;
/* 0x08A */ b16 didAreaChange;
/* 0x08C */ s16 mapID;
/* 0x08E */ s16 entryID;
/* 0x090 */ u16 unk_90;
@ -1430,20 +1434,20 @@ typedef struct GameStatus {
/* 0x094 */ f32 exitTangent;
/* 0x098 */ Vec3f playerPos;
/* 0x0A4 */ f32 playerYaw;
/* 0x0A8 */ s8 creditsViewportMode;
/* 0x0A8 */ s8 introPart;
/* 0x0A9 */ s8 unk_A9; // selected language?
/* 0x0AA */ s8 demoBattleFlags;
/* 0x0AB */ u8 soundOutputMode;
/* 0x0AC */ s8 introState;
/* 0x0AD */ s8 introCounter;
/* 0x0AE */ s8 bSkipIntro;
/* 0x0AF */ s8 unk_AF;
/* 0x0B0 */ s8 unk_B0;
/* 0x0AC */ s8 startupState; // used for various startup states like logos, title screen, intro, and demo
/* 0x0AD */ s8 logoTime;
/* 0x0AE */ b8 skipLogos;
/* 0x0AF */ s8 titleScreenTimer;
/* 0x0B0 */ s8 titleScreenDismissTime;
/* 0x0B1 */ char unk_B1[0x5];
/* 0x0B6 */ s16 bootAlpha;
/* 0x0B8 */ s16 bootBlue;
/* 0x0BA */ s16 bootGreen;
/* 0x0BC */ s16 bootRed;
/* 0x0B6 */ s16 screenColorA;
/* 0x0B8 */ s16 screenColorR;
/* 0x0BA */ s16 screenColorG;
/* 0x0BC */ s16 screenColorB;
/* 0x0BE */ char unk_BE[94];
/* 0x11C */ Vec3f playerGroundTraceAngles;
/* 0x128 */ Vec3f playerGroundTraceNormal;
@ -1518,13 +1522,13 @@ typedef struct RenderTask {
typedef struct SelectableTarget {
/* 0x00 */ s16 actorID;
/* 0x02 */ s16 partID; /* sometimes loaded as byte from 0x3 */
/* 0x04 */ Vec3s posA;
/* 0x0A */ Vec3s posB;
/* 0x10 */ s8 unk_10;
/* 0x11 */ s8 homeCol; /* from xpos --> 0-3 */
/* 0x12 */ s8 homeRow; /* from ypos --> 0-3 */
/* 0x13 */ s8 layer; /* from zpos? --> 0-1 */
/* 0x02 */ s16 partID;
/* 0x04 */ Vec3s truePos; // position where the cursor will be drawn
/* 0x0A */ Vec3s sortPos; // effective position used for sorting, includes priority-based x offsets
/* 0x10 */ s8 priorityOffset;
/* 0x11 */ s8 column; // from xpos --> 0-3
/* 0x12 */ s8 row; // from ypos --> 0-3
/* 0x13 */ s8 layer; // from zpos --> 0-1
} SelectableTarget; // size = 0x14
typedef struct ActorPartMovement {
@ -1639,19 +1643,55 @@ typedef struct CollisionStatus {
/* 0x1C */ Vec3f bombetteExplosionPos;
} CollisionStatus; // size = 0x28
// seems to be a union differing for each decoration
typedef struct DecorationUnk {
/* 0x00 */ s16 unk00;
/* 0x02 */ s16 unk02;
/* 0x04 */ s16 unk04;
/* 0x06 */ s16 unk06;
/* 0x08 */ s16 unk08;
/* 0x0A */ s16 unk0A;
/* 0x0C */ s16 unk0C;
/* 0x0E */ s16 unk0E;
} DecorationUnk; // size = 0x10
typedef struct DecorFireTrail {
/* 0x00 */ s16 scale;
} DecorFireTrail;
typedef struct DecorGoldenFlames {
/* 0x00 */ s16 scaleX;
/* 0x02 */ s16 scaleY;
/* 0x04 */ s16 offsetX;
} DecorGoldenFlames;
typedef struct DecorRedFlames {
/* 0x00 */ s16 scaleX;
/* 0x02 */ s16 scaleY;
/* 0x04 */ s16 alpha;
/* 0x06 */ s16 offsetZ;
/* 0x08 */ s16 unused1;
/* 0x0A */ s16 unused2;
/* 0x0C */ s16 unused3;
} DecorRedFlames;
typedef struct DecorBowserAura {
/* 0x00 */ s16 scaleX;
/* 0x02 */ s16 scaleY;
/* 0x04 */ s16 alpha;
/* 0x06 */ s16 offsetZ;
} DecorBowserAura;
typedef struct DecorDataSparkles {
/* 0x00 */ s16 spawnInterval;
} DecorDataSparkles;
typedef struct DecorDataStars {
/* 0x00 */ s16 scalePct;
/* 0x02 */ s16 offsetY;
} DecorDataStars;
// data for any type of decoration can be stored here
typedef union DecorationData {
s16 raw[8];
DecorFireTrail fireTrail;
DecorRedFlames redFlames;
DecorGoldenFlames goldenFlames;
DecorBowserAura bowserAura;
DecorDataSparkles sparkles;
DecorDataStars stars;
} DecorationData; // size = 0x10
#define MAX_ACTOR_DECORATIONS 2
#define ACTOR_BLUR_FRAMES 16
typedef struct DecorationTable {
/* 0x000 */ PAL_BIN copiedPalettes[2][27][SPR_PAL_SIZE];
@ -1674,35 +1714,35 @@ typedef struct DecorationTable {
/* 0x74A */ s16 palswapTimeBtoA;
/* 0x74C */ s16 palswapUnused1; // presumably palswapTimeHoldC for unimplemented triple cycling (A->B->C->A)
/* 0x74E */ s16 palswapUnused2; // presumably palswapTimeCtoA for unimplemented triple cycling (A->B->C->A)
/* 0x750 */ s8 unk_750;
/* 0x751 */ s8 unk_751;
/* 0x752 */ s8 unk_752;
/* 0x750 */ s8 glowState;
/* 0x751 */ b8 glowStateChanged;
/* 0x752 */ s8 glowUnk1;
/* 0x753 */ char pad753[5];
/* 0x758 */ s16 unk758;
/* 0x75A */ s16 unk75A;
/* 0x75C */ s16 unk75C;
/* 0x758 */ s16 glowUnk2;
/* 0x75A */ s16 glowUnk3;
/* 0x75C */ s16 glowPhase;
/* 0x75E */ char pad75E[6];
/* 0x764 */ s8 unk_764;
/* 0x765 */ s8 unk_765;
/* 0x766 */ s8 unk_766;
/* 0x767 */ s8 unk_767;
/* 0x768 */ u8 unk_768;
/* 0x764 */ s8 flashState;
/* 0x765 */ s8 flashStateChanged;
/* 0x766 */ s8 flashMode;
/* 0x767 */ s8 flashFramesLeft;
/* 0x768 */ u8 flashEnabled;
/* 0x769 */ char unk_769[3];
/* 0x76C */ PAL_PTR unk_76C[16];
/* 0x76C */ PAL_PTR flashPalettes[16];
/* 0x78C */ char unk_7AC[0x2C];
/* 0x7D8 */ s8 unk_7D8;
/* 0x7D8 */ s8 blurUnused;
/* 0x7D9 */ s8 blurBufferPos;
/* 0x7DA */ s8 blurDrawCount;
/* 0x7DB */ s8 blurEnableCount;
/* 0x7DC */ s16 yaw[16];
/* 0x7FC */ s16 posX[16];
/* 0x81C */ s16 posY[16];
/* 0x83C */ s16 posZ[16];
/* 0x85C */ s8 rotPivotOffsetX[16];
/* 0x86C */ s8 rotPivotOffsetY[16];
/* 0x87C */ u8 rotX[16];
/* 0x88C */ u8 rotY[16];
/* 0x89C */ u8 rotZ[16];
/* 0x7DC */ s16 yaw[ACTOR_BLUR_FRAMES];
/* 0x7FC */ s16 posX[ACTOR_BLUR_FRAMES];
/* 0x81C */ s16 posY[ACTOR_BLUR_FRAMES];
/* 0x83C */ s16 posZ[ACTOR_BLUR_FRAMES];
/* 0x85C */ s8 rotPivotOffsetX[ACTOR_BLUR_FRAMES];
/* 0x86C */ s8 rotPivotOffsetY[ACTOR_BLUR_FRAMES];
/* 0x87C */ u8 rotX[ACTOR_BLUR_FRAMES];
/* 0x88C */ u8 rotY[ACTOR_BLUR_FRAMES];
/* 0x89C */ u8 rotZ[ACTOR_BLUR_FRAMES];
/* 0x8AC */ s8 blurDisableDelay; // infinite when zero
/* 0x8AD */ char unk_8AD[3];
/* substruct for decorations? */
@ -1712,7 +1752,7 @@ typedef struct DecorationTable {
/* 0x8BC */ s8 state[MAX_ACTOR_DECORATIONS];
/* 0x8BE */ s16 stateResetTimer[MAX_ACTOR_DECORATIONS];
/* 0x8C2 */ char unk_8C0[4];
/* 0x8C6 */ DecorationUnk unk_8C6[MAX_ACTOR_DECORATIONS];
/* 0x8C6 */ DecorationData decorData[MAX_ACTOR_DECORATIONS];
} DecorationTable; // size = 0x8E8
typedef struct PlayerPathElement {
@ -1799,7 +1839,7 @@ typedef struct ActorState { // TODO: Make the first field of this an ActorMoveme
/* 0x24 */ f32 unk_24;
/* 0x28 */ f32 unk_28;
/* 0x2C */ f32 unk_2C;
/* 0x30 */ Vec3f unk_30;
/* 0x30 */ Vec3f velStep;
/* 0x3C */ f32 acceleration;
/* 0x40 */ f32 speed;
/* 0x44 */ f32 vel;
@ -1912,9 +1952,9 @@ typedef struct Actor {
/* 0x224 */ s8 chillOutTurns;
/* 0x225 */ char unk_225[3];
/* 0x228 */ struct EffectInstance* icePillarEffect;
/* 0x22C */ struct SelectableTarget targetData[24];
/* 0x22C */ struct SelectableTarget targetData[MAX_ENEMY_ACTORS];
/* 0x40C */ s8 targetListLength;
/* 0x40D */ s8 targetIndexList[24]; /* into targetData */
/* 0x40D */ s8 targetIndexList[MAX_ENEMY_ACTORS]; /* into targetData */
/* 0x425 */ s8 selectedTargetIndex; /* into target index list */
/* 0x426 */ s8 targetPartIndex;
/* 0x427 */ char unk_427[1];
@ -1981,7 +2021,7 @@ typedef struct PlayerStatus {
/* 0x064 */ f32 overlapPushAmount;
/* 0x068 */ f32 groundNormalPitch;
/* 0x06C */ f32 maxJumpSpeed;
/* 0x070 */ f32 gravityIntegrator[4];
/* 0x070 */ f32 gravityIntegrator[4]; // derivatives of y; 0 = velocity, 1 = accel, etc
/* 0x080 */ f32 targetYaw;
/* 0x084 */ f32 curYaw;
/* 0x088 */ f32 overlapPushYaw;
@ -2026,25 +2066,23 @@ typedef struct PlayerStatus {
/* 0x281 */ char unk_281[7];
} PlayerStatus; // size = 0x288
typedef struct SaveDataHeader {
/* 0x0000 */ char magicString[16]; /* "Mario Story 006" string */
/* 0x0010 */ s8 pad[0x20]; /* always zero */
/* 0x0030 */ s32 crc1;
/* 0x0034 */ s32 crc2;
/* 0x0038 */ s32 saveSlot;
/* 0x003C */ u32 saveCount;
/* 0x0040 */ s8 ignored[0x40];
} SaveDataHeader;
typedef struct SaveGlobals {
/* 0x00 */ char magicString[16]; /* "Mario Story 006" string */
/* 0x10 */ s8 pad[32]; /* always zero */
/* 0x30 */ s32 crc1;
/* 0x34 */ s32 crc2;
/* 0x38 */ s32 useMonoSound;
/* 0x3C */ u32 lastFileSelected;
/* 0x40 */ s8 reserved[64]; // unused
} SaveGlobals; // size = 0x80
typedef struct SaveMetadata {
/* 0x00 */ s32 timePlayed;
/* 0x04 */ u8 spiritsRescued;
/* 0x05 */ char unk_05[0x1];
/* 0x05 */ char unk_05[1];
/* 0x06 */ s8 level;
/* 0x07 */ unsigned char filename[8];
/* 0x0F */ char unk_0F[0x1];
/* 0x10 */ s32 unk_10;
/* 0x14 */ s32 unk_14;
/* 0x0F */ char unk_0F[9];
} SaveMetadata; // size = 0x18
typedef struct SaveData {
@ -2065,12 +2103,12 @@ typedef struct SaveData {
/* 0x12B0 */ s32 areaFlags[8];
/* 0x12D0 */ s8 areaBytes[16];
/* 0x12E0 */ s8 debugEnemyContact;
/* 0x12E0 */ s8 unk_12E1;
/* 0x12E0 */ s8 unk_12E2;
/* 0x12E0 */ s8 musicEnabled;
/* 0x12E0 */ b8 debugUnused1;
/* 0x12E0 */ b8 debugUnused2;
/* 0x12E0 */ b8 musicEnabled;
/* 0x12E4 */ char unk_12E4[0x2];
/* 0x12E6 */ Vec3s savePos;
/* 0x12EC */ SaveMetadata unk_12EC;
/* 0x12EC */ SaveMetadata metadata;
/* 0x1304 */ char unk_1304[0x7C];
} SaveData; // size = 0x1380

View File

@ -992,6 +992,13 @@ typedef struct ShimmerWaveFXData {
/* 0x68 */ f32 unk_68;
} ShimmerWaveFXData; // size = 0x6C
enum AuraFXTypes {
FX_AURA_CAPTURE = 0, // star spirit being captured in the intro
FX_AURA_RED = 1, // used by Kooper's Fire Shell
FX_AURA_BLUE = 2, // used by Final Bowser
FX_AURA_GOLD = 3, // used by The Master (final form)
};
typedef struct AuraFXData {
/* 0x00 */ s32 type;
/* 0x04 */ Vec3f posA;
@ -1533,18 +1540,20 @@ typedef struct SquirtFXData {
/* 0x1D8 */ u8 unk_1D8[12];
} SquirtFXData; // size = 0x1E4
enum WaterBlockFXTypes {
FX_WATER_BLOCK_CREATE = 0,
FX_WATER_BLOCK_DESTROY = 1,
};
#define NUM_WATER_BLOCK_COMPONENTS 4
typedef struct WaterBlockFXData {
/* 0x00 */ s32 unk_00;
/* 0x00 */ s32 type;
/* 0x04 */ Vec3f pos;
/* 0x10 */ s32 unk_10;
/* 0x14 */ s32 unk_14;
/* 0x18 */ s32 unk_18;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x24 */ s32 unk_24;
/* 0x28 */ s32 unk_28;
/* 0x10 */ s32 timeLeft;
/* 0x14 */ s32 lifetime;
/* 0x18 */ Color4i color;
/* 0x28 */ s32 alpha;
/* 0x2C */ f32 unk_2C;
/* 0x30 */ f32 unk_30;
/* 0x34 */ f32 unk_34;
@ -2317,7 +2326,7 @@ typedef struct BuffData {
typedef struct PartnerBuffFXData {
/* 0x00 */ s16 useRandomValues;
/* 0x02 */ s16 unk_02;
/* 0x02 */ s16 visible;
/* 0x04 */ s32 timeLeft;
/* 0x08 */ s32 lifeTime;
/* 0x0C */ BuffData unk_0C[3];

View File

@ -6,6 +6,8 @@
typedef s32 EntityScript[];
typedef s32 EntityModelScript[];
extern s32 CreateEntityVarArgBuffer[4];
enum {
ENTITY_SCRIPT_OP_End,
ENTITY_SCRIPT_OP_Jump,

File diff suppressed because it is too large Load Diff

View File

@ -54,9 +54,9 @@ s32 is_picking_up_item(void);
f32 integrate_gravity(void);
void gravity_use_fall_parms(void);
f32 get_clamped_angle_diff(f32, f32);
s32 intro_logos_fade_in(s16 subtractAlpha);
s32 intro_logos_fade_out(s16 addAlpha);
void intro_logos_update_fade(void);
b32 startup_fade_screen_in(s16 subtractAlpha);
b32 startup_fade_screen_out(s16 addAlpha);
void startup_fade_screen_update(void);
u32 get_entity_type(s32 arg0);
Entity* get_entity_by_index(s32 index);
@ -216,7 +216,6 @@ void set_time_freeze_mode(s32);
s32 get_map_IDs_by_name(const char* mapName, s16* areaID, s16* mapID);
void get_dpad_input_radial(f32* angle, f32* magnitude);
void transform_point(Matrix4f mtx, f32 inX, f32 inY, f32 inZ, f32 inS, f32* outX, f32* outY, f32* outZ, f32* outW);
void try_player_footstep_sounds(s32 arg0);
void phys_update_interact_collider(void);
@ -267,7 +266,7 @@ f32 atan2(f32 startX, f32 startZ, f32 endX, f32 endZ);
f32 clamp_angle(f32 theta);
s32 sign(s32 value);
s32 game_scripts_disabled(void);
b32 check_player_action_debug(void);
s32 battle_heap_create(void);
@ -280,8 +279,8 @@ s32 test_ray_entities(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f3
void mem_clear(void* data, s32 numBytes);
void intro_logos_set_fade_color(s16 color);
void intro_logos_set_fade_alpha(s16 alpha);
void startup_set_fade_screen_color(s16 color);
void startup_set_fade_screen_alpha(s16 alpha);
f32 get_xz_dist_to_player(f32, f32);
void func_800E06C0(s32);
@ -373,7 +372,7 @@ void btl_draw_upgrade_windows(s32);
void btl_state_draw_celebration(void);
void btl_bonk_cleanup(void);
void func_80263E08(Actor*, ActorPart*, AnimID);
void set_actor_anim_by_ref(Actor*, ActorPart*, AnimID);
void update_action_ratings(void);
void update_health_bars(void);
s32 btl_cam_is_moving_done(void);
@ -381,7 +380,7 @@ void btl_popup_messages_update(void);
void btl_popup_messages_draw_world_geometry(void);
void func_80255FD8(void);
void func_80266EE8(Actor* actor, s32 arg1);
void set_actor_pal_effect(Actor* actor, s32 arg1);
void btl_set_popup_duration(s32 duration);
void switch_to_partner(s32 arg0);
@ -443,8 +442,8 @@ void set_npc_shadow_scale(Shadow* shadow, f32 height, f32 npcRadius);
void set_npc_animation(Npc* npc, u32 animID);
void set_peach_shadow_scale(Shadow* shadow, f32 scale);
s32 is_block_on_ground(Entity* block);
void set_animation(s32 actorID, s32 partID, AnimID animID);
void set_animation_rate(s32 actorID, s32 partID, f32 rate);
void set_actor_anim(s32 actorID, s32 partID, AnimID animID);
void set_actor_anim_rate(s32 actorID, s32 partID, f32 rate);
void set_model_group_visibility(u16, s32, s32);
void init_enter_world_shared(void);
s16 update_enter_map_screen_overlay(s16* progress);
@ -503,8 +502,8 @@ void disable_player_shadow(void);
void move_player(s32 duration, f32 heading, f32 speed);
s32 enable_player_input(void);
s32 enable_player_static_collisions(void);
s32 check_input_jump(void);
s32 check_input_hammer(void);
b32 check_input_jump(void);
b32 check_input_hammer(void);
Npc* resolve_npc(Evt* script, s32 npcIdOrPtr);
void enable_npc_blur(Npc* npc);
@ -541,8 +540,8 @@ void basic_window_update(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32*
void basic_hidden_window_update(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, f32* scaleX, f32* scaleY,
f32* rotX, f32* rotY, f32* rotZ, s32* darkening, s32* opacity);
void player_create_target_list(Actor* actor);
void enemy_create_target_list(Actor* actor);
void create_current_pos_target_list(Actor* actor);
void create_home_target_list(Actor* actor);
void set_actor_yaw(s32 actorID, s32 yaw);
void set_part_yaw(s32 actorID, s32 partID, s32 value);
@ -796,9 +795,9 @@ void basic_ai_loiter_init(Evt* script, MobileAISettings* aiSettings, EnemyDetect
void PatrolAI_LoiterInit(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory);
s32 func_80263230(Actor*, Actor*);
void func_80266EA8(ActorPart*, s32);
void set_part_pal_effect(ActorPart*, s32);
void func_80266E40(Actor*);
void func_80267018(Actor* actor, s32 arg1);
void set_actor_flash_mode(Actor* actor, s32 arg1);
void remove_player_buffs(s32);
s32 is_actor_health_bar_visible(Actor*);
@ -960,22 +959,23 @@ void disable_actor_blur(Actor*);
void reset_actor_blur(Actor*);
void enable_actor_blur(Actor*);
void apply_shock_effect(Actor*);
void func_8025C8A0(s32, ActorPart*, s32 yaw, s32 arg3);
void func_8025CD28(s32, ActorPart*, s32 yaw, s32 arg3);
void part_glow_off(s32, ActorPart*, s32 yaw, b32 arg3);
void part_flash_off(b32 isNpcSprite, ActorPart* part, s32 yaw, b32 isReflection);
void part_flash_on(b32 isNpcSprite, ActorPart* part, s32 yaw, b32 isReflection);
void _add_part_decoration(ActorPart*);
void _remove_part_decoration(ActorPart* part, s32 decorationIndex);
void func_8025D158(ActorPart*, s32);
void func_8025D290(ActorPart*, s32);
void func_8025D3C4(ActorPart*, s32);
void func_8025D4A0(ActorPart*, s32);
void func_8025D620(ActorPart*, s32);
void func_8025D6FC(ActorPart*, s32);
void func_8025D810(ActorPart*, s32);
void func_8025D8EC(ActorPart*, s32);
void func_8025DA60(ActorPart*, s32);
void func_8025DBC8(ActorPart*, s32);
void func_8025DD40(ActorPart*, s32);
void func_8025DE88(ActorPart*, s32);
void remove_part_decor_none(ActorPart*, s32);
void remove_part_decor_golden_flames(ActorPart*, s32);
void remove_part_decor_sweat(ActorPart*, s32);
void remove_part_decor_seeing_stars(ActorPart*, s32);
void remove_part_decor_red_flames(ActorPart*, s32);
void remove_part_decor_smoky_trail(ActorPart*, s32);
void remove_part_decor_fiery_trail(ActorPart*, s32);
void remove_part_decor_whirlwind(ActorPart*, s32);
void remove_part_decor_steam(ActorPart*, s32);
void remove_part_decor_sparkles(ActorPart*, s32);
void remove_part_decor_bowser_aura(ActorPart*, s32);
void remove_part_decor_radiating_stars(ActorPart*, s32);
void status_bar_ignore_changes(void);
void imgfx_release_instance(u32);
@ -1035,7 +1035,7 @@ void func_80266970(Actor*);
void show_actor_health_bar(Actor*);
void hide_actor_health_bar(Actor*);
void clear_part_pal_adjustment(ActorPart*);
void func_800E24F8(void);
void calculate_camera_yinterp_rate(void);
void load_tattle_flags(s32);
s32 use_consumable(s32 invSlot);
void remove_consumable(void);
@ -1069,7 +1069,7 @@ void clear_sprite_shading_data(void);
void clear_character_set(void);
void clear_trigger_data(void);
void clear_script_list(void);
void clear_entity_data(s32);
void clear_entity_data(b32);
void clear_effect_data(void);
void clear_saved_variables(void);

View File

@ -85,6 +85,7 @@
#define MAX_MAPVARS 16
#define MAX_MAPFLAGS 3
#define MAX_ENEMY_ACTORS 24
#define MAX_ANIMATED_MODELS 16
#define MAX_ANIMATED_MESHES 16
@ -142,6 +143,7 @@
#define SPR_PAL_SIZE 16
#define BATTLE_ID_BIT 0x800
#define BATTLE_NPC_ID_BIT 0x800
#define BATTLE_ENTITY_ID_BIT 0x800

View File

@ -504,7 +504,7 @@ void npc_set_palswap_mode_A(Npc* npc, s32 arg1);
void npc_set_palswap_mode_B(Npc* npc, s32 arg1);
void func_8003B420(Npc* npc);
void npc_revert_palswap_mode(Npc* npc);
void npc_set_palswap_1(Npc* npc, s32 palIndexA, s32 palIndexB, s32 timeHoldA, s32 timeAB);
@ -512,15 +512,15 @@ void npc_set_palswap_2(Npc* npc, s32 timeHoldB, s32 timeBA, s32 palIndexC, s32 p
void npc_draw_with_palswap(Npc* npc, s32 arg1, Matrix4f mtx);
void npc_draw_palswap_mode_0(Npc* npc, s32 arg1, Matrix4f mtx);
void npc_render_without_adjusted_palettes(Npc* npc, s32 arg1, Matrix4f mtx);
s32 npc_draw_palswap_mode_1(Npc*, s32, Matrix4f mtx);
s32 npc_render_with_watt_idle_palettes(Npc*, s32, Matrix4f mtx);
u16 npc_blend_palette_colors(u16 colorA, u16 colorB, s32 lerpAlpha);
s32 npc_draw_palswap_mode_2(Npc*, s32, s32, Matrix4f mtx);
s32 npc_render_with_single_pal_blending(Npc*, s32, s32, Matrix4f mtx);
s32 npc_draw_palswap_mode_4(Npc*, s32, Matrix4f mtx);
s32 npc_render_with_double_pal_blending(Npc*, s32, Matrix4f mtx);
void npc_set_decoration(Npc* npc, s32 idx, s32 decorationType);

View File

@ -50,8 +50,8 @@ ApiStatus MultiplyVec3ByActorScale(Evt* script, s32 isInitialCall);
ApiStatus ApplyShrinkFromOwner(Evt* script, s32 isInitialCall);
ApiStatus StartRumble(Evt* script, s32 isInitialCall);
ApiStatus HasMerleeCastsLeft(Evt* script, s32 isInitialCall);
ApiStatus FXRecoverHP(Evt* script, s32 isInitialCall);
ApiStatus FXRecoverFP(Evt* script, s32 isInitialCall);
ApiStatus SpawnRecoverHeartFX(Evt* script, s32 isInitialCall);
ApiStatus SpawnRecoverFlowerFX(Evt* script, s32 isInitialCall);
ApiStatus IncrementPlayerHP(Evt* script, s32 isInitialCall);
ApiStatus IncrementPlayerFP(Evt* script, s32 isInitialCall);
ApiStatus StartRumbleWithParams(Evt* script, s32 isInitialCall);
@ -67,7 +67,7 @@ ApiStatus SetIdleGoalToHome(Evt* script, s32 isInitialCall);
ApiStatus SetGoalToIndex(Evt* script, s32 isInitialCall);
ApiStatus GetIndexFromPos(Evt* script, s32 isInitialCall);
ApiStatus GetIndexFromHome(Evt* script, s32 isInitialCall);
ApiStatus CountPlayerTargets(Evt* script, s32 isInitialCall);
ApiStatus CountTargets(Evt* script, s32 isInitialCall);
ApiStatus ForceHomePos(Evt* script, s32 isInitialCall);
ApiStatus SetHomePos(Evt* script, s32 isInitialCall);
ApiStatus SetGoalToTarget(Evt* script, s32 isInitialCall);
@ -154,8 +154,8 @@ ApiStatus CheckButtonPress(Evt* script, s32 isInitialCall);
ApiStatus CheckButtonHeld(Evt* script, s32 isInitialCall);
ApiStatus CheckButtonDown(Evt* script, s32 isInitialCall);
ApiStatus GetBattleState(Evt* script, s32 isInitialCall);
ApiStatus PlayerCreateTargetList(Evt* script, s32 isInitialCall);
ApiStatus EnemyCreateTargetList(Evt* script, s32 isInitialCall);
ApiStatus CreateCurrentPosTargetList(Evt* script, s32 isInitialCall);
ApiStatus CreateHomeTargetList(Evt* script, s32 isInitialCall);
ApiStatus InitTargetIterator(Evt* script, s32 isInitialCall);
ApiStatus SetOwnerTarget(Evt* script, s32 isInitialCall);
ApiStatus ChooseNextTarget(Evt* script, s32 isInitialCall);
@ -206,7 +206,7 @@ ApiStatus EnablePlayerBlur(Evt* script, s32 isInitialCall);
ApiStatus func_80274A18(Evt* script, s32 isInitialCall);
ApiStatus func_802752AC(Evt* script, s32 isInitialCall);
ApiStatus func_80275F00(Evt* script, s32 isInitialCall);
ApiStatus DidActionSucceed(Evt* script, s32 isInitialCall);
ApiStatus GetPlayerActionSuccess(Evt* script, s32 isInitialCall);
ApiStatus BindTakeTurn(Evt* script, s32 isInitialCall);
ApiStatus PauseTakeTurn(Evt* script, s32 isInitialCall);
ApiStatus ResumeTakeTurn(Evt* script, s32 isInitialCall);
@ -296,7 +296,7 @@ ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall);
ApiStatus UseBattleCamPresetImmediately(Evt* script, s32 isInitialCall);
ApiStatus UseBattleCamPresetWait(Evt* script, s32 isInitialCall);
ApiStatus HideHealthBar(Evt* script, s32 isInitialCall);
ApiStatus GetActionCommandResult(Evt* script, s32 isInitialCall);
ApiStatus GetPartnerActionSuccess(Evt* script, s32 isInitialCall);
ApiStatus CreateNpc(Evt* script, s32 isInitialCall);
ApiStatus EnableBattleStatusBar(Evt* script, s32 isInitialCall);
ApiStatus PlayerYieldTurn(Evt* script, s32 isInitialCall);

View File

@ -91,7 +91,7 @@ ApiStatus SetRenderMode(Evt* script, s32 isInitialCall);
ApiStatus PlaySoundAtModel(Evt* script, s32 isInitialCall);
ApiStatus PlaySoundAtCollider(Evt* script, s32 isInitialCall);
ApiStatus SetCamEnabled(Evt* script, s32 isInitialCall);
ApiStatus SetCamFlag80(Evt* script, s32 isInitialCall);
ApiStatus SetCamNoDraw(Evt* script, s32 isInitialCall);
ApiStatus SetCamPerspective(Evt* script, s32 isInitialCall);
ApiStatus SetCamViewport(Evt* script, s32 isInitialCall);
ApiStatus func_802CABE8(Evt* script, s32 isInitialCall);

View File

@ -41,8 +41,6 @@ extern HiddenPanelsData gCurrentHiddenPanels;
extern BackgroundHeader gBackgroundImage;
extern s32 CreateEntityVarArgBuffer[4];
extern f32 D_800F7B74;
extern CollisionData gZoneCollisionData;
@ -84,13 +82,13 @@ extern Entity* TweesterTouchingPlayer;
extern s32 PrevPlayerDirection;
extern s32 PeachDisguiseNpcIndex;
extern s32 D_8010C980;
extern s32 PlayerRunStateTime;
extern s32 PrevPlayerCamRelativeYaw;
extern s32 D_800F7B44;
extern f32 D_8010C938;
extern f32 D_8010C990;
extern f32 PlayerNormalYaw;
extern f32 PlayerNormalPitch;
extern s32 NpcHitQueryColliderID;
extern Vec3s btl_actorHomePositions[];
extern Vec3s StandardActorHomePositions[];
extern SaveData gCurrentSaveFile;
@ -98,7 +96,7 @@ extern s32 gEncounterSubState;
extern s32 timeFreezeMode;
extern s32 D_8009A678;
extern u8 D_800779B0;
extern u8 IntroMessageIdx;
extern s32 PartnerIDFromMenuIndex[12]; // partner IDs
// Scripts

View File

@ -12,6 +12,12 @@ void set_map_change_fade_rate(s16 fadeRate) {
gMapTransitionFadeRate = fadeRate;
}
enum EnterWorldStates {
ENTER_WORLD_LOAD_MAP = 0,
ENTER_WORLD_AWAIT_MAIN = 1,
ENTER_WORLD_FADE_IN = 2,
};
void state_init_enter_demo(void) {
gLoadedFromFileSelect = FALSE;
init_enter_world_shared();
@ -24,14 +30,14 @@ void state_init_enter_world(void) {
}
void init_enter_world_shared(void) {
gMapTransitionState = 0;
gMapTransitionState = ENTER_WORLD_LOAD_MAP;
gMapTransitionStateTime = 4;
gGameStatusPtr->exitTangent = 0.0f;
gMapTransitionAlpha = 255;
nuContRmbForceStopEnd();
update_exit_map_screen_overlay(&gMapTransitionAlpha);
gOverrideFlags |= GLOBAL_OVERRIDES_8;
gOverrideFlags |= GLOBAL_OVERRIDES_DISABLE_DRAW_FRAME;
evt_set_variable(NULL, GB_Unused_EVT_01, gGameStatusPtr->unk_A9);
timeFreezeMode = 0;
@ -39,30 +45,31 @@ void init_enter_world_shared(void) {
void state_step_enter_world(void) {
switch (gMapTransitionState) {
case 0:
if (gMapTransitionStateTime == 0) {
gGameStatusPtr->isBattle = FALSE;
gGameStatusPtr->disableScripts = FALSE;
if (!gLoadedFromFileSelect) {
load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, LOAD_FROM_MAP);
} else {
load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, LOAD_FROM_FILE_SELECT);
}
gGameStatusPtr->prevArea = gGameStatusPtr->areaID;
set_time_freeze_mode(TIME_FREEZE_NORMAL);
if (gGameStatusPtr->demoState == DEMO_STATE_NONE) {
disable_player_input();
}
update_cameras();
gMapTransitionStateTime = 2;
gMapTransitionState++;
} else {
case ENTER_WORLD_LOAD_MAP:
if (gMapTransitionStateTime != 0) {
gMapTransitionStateTime--;
break;
}
gGameStatusPtr->isBattle = FALSE;
gGameStatusPtr->debugScripts = DEBUG_SCRIPTS_NONE;
if (!gLoadedFromFileSelect) {
load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, LOAD_FROM_MAP);
} else {
load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, LOAD_FROM_FILE_SELECT);
}
gGameStatusPtr->prevArea = gGameStatusPtr->areaID;
set_time_freeze_mode(TIME_FREEZE_NORMAL);
if (gGameStatusPtr->demoState == DEMO_STATE_NONE) {
disable_player_input();
}
update_cameras();
gMapTransitionStateTime = 2;
gMapTransitionState++;
break;
case 1:
case ENTER_WORLD_AWAIT_MAIN:
update_encounters();
update_npcs();
update_player();
@ -70,12 +77,14 @@ void state_step_enter_world(void) {
if (gMapTransitionStateTime != 0) {
gMapTransitionStateTime--;
} else if (!does_script_exist(gGameStatusPtr->mainScriptID)) {
gOverrideFlags &= ~GLOBAL_OVERRIDES_8;
break;
}
if (!does_script_exist(gGameStatusPtr->mainScriptID)) {
gOverrideFlags &= ~GLOBAL_OVERRIDES_DISABLE_DRAW_FRAME;
gMapTransitionState++;
}
break;
case 2:
case ENTER_WORLD_FADE_IN:
update_npcs();
update_player();
update_effects();
@ -93,15 +102,24 @@ void state_step_enter_world(void) {
}
void state_drawUI_enter_world(void) {
if (gGameStatusPtr->introState == INTRO_STATE_2) {
// startupState is being used as a timer here
if (gGameStatusPtr->startupState == 2) {
draw_status_ui();
}
}
enum ChangeMapStates {
CHANGE_MAP_INIT = 0,
CHANGE_MAP_DELAY = 1,
CHANGE_MAP_LOAD_MAP = 2,
CHANGE_MAP_AWAIT_MAIN = 3,
CHANGE_MAP_FADE_IN = 4,
};
void state_init_change_map(void) {
gMapTransitionAlpha = 0x00;
gMapTransitionAlpha = 0;
gMapTransitionFadeRate = 20;
gMapTransitionState = 0;
gMapTransitionState = CHANGE_MAP_INIT;
if (gGameStatusPtr->prevArea != gGameStatusPtr->areaID) {
gGameStatusPtr->didAreaChange = TRUE;
@ -113,7 +131,7 @@ void state_init_change_map(void) {
void state_step_change_map(void) {
switch (gMapTransitionState) {
case 0:
case CHANGE_MAP_INIT:
update_npcs();
update_player();
update_effects();
@ -123,13 +141,13 @@ void state_step_change_map(void) {
gMapTransitionState++;
}
break;
case 1:
gOverrideFlags |= GLOBAL_OVERRIDES_8;
case CHANGE_MAP_DELAY:
gOverrideFlags |= GLOBAL_OVERRIDES_DISABLE_DRAW_FRAME;
nuContRmbForceStop();
gMapTransitionStateTime = 4;
gMapTransitionState++;
break;
case 2:
case CHANGE_MAP_LOAD_MAP:
if (gGameStatusPtr->demoState != DEMO_STATE_NONE) {
set_game_mode(GAME_MODE_DEMO);
}
@ -138,8 +156,8 @@ void state_step_change_map(void) {
gMapTransitionStateTime--;
} else {
gGameStatusPtr->isBattle = FALSE;
gGameStatusPtr->disableScripts = FALSE;
load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, 0);
gGameStatusPtr->debugScripts = DEBUG_SCRIPTS_NONE;
load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, LOAD_FROM_MAP);
set_time_freeze_mode(TIME_FREEZE_NORMAL);
nuContRmbForceStopEnd();
if (gGameStatusPtr->demoState == DEMO_STATE_NONE) {
@ -150,7 +168,7 @@ void state_step_change_map(void) {
gMapTransitionState++;
}
break;
case 3:
case CHANGE_MAP_AWAIT_MAIN:
update_encounters();
update_npcs();
update_player();
@ -159,11 +177,11 @@ void state_step_change_map(void) {
if (gMapTransitionStateTime != 0) {
gMapTransitionStateTime--;
} else if (!does_script_exist(gGameStatusPtr->mainScriptID)) {
gOverrideFlags &= ~GLOBAL_OVERRIDES_8;
gOverrideFlags &= ~GLOBAL_OVERRIDES_DISABLE_DRAW_FRAME;
gMapTransitionState++;
}
break;
case 4:
case CHANGE_MAP_FADE_IN:
update_npcs();
update_player();
update_effects();
@ -181,47 +199,54 @@ void state_step_change_map(void) {
}
void state_drawUI_change_map(void) {
if (gMapTransitionState == 4 || gMapTransitionState == 0) {
if (gMapTransitionState == CHANGE_MAP_FADE_IN || gMapTransitionState == CHANGE_MAP_INIT) {
draw_status_ui();
}
}
enum GameOverStates {
GAME_OVER_INIT = 1,
GAME_OVER_LOAD_MAP = 2,
GAME_OVER_AWAIT_MAIN = 3,
GAME_OVER_FADE_IN = 4,
};
void state_init_game_over(void) {
gMapTransitionAlpha = 255;
gMapTransitionFadeRate = 20;
gMapTransitionState = 0x01;
gMapTransitionState = GAME_OVER_INIT;
gPlayerStatus.flags |= PS_FLAG_NO_STATIC_COLLISION;
}
void state_step_game_over(void) {
switch (gMapTransitionState) {
case 1:
gOverrideFlags |= GLOBAL_OVERRIDES_8;
case GAME_OVER_INIT:
gOverrideFlags |= GLOBAL_OVERRIDES_DISABLE_DRAW_FRAME;
nuContRmbForceStop();
gMapTransitionStateTime = 4;
gMapTransitionState++;
break;
case 2:
case GAME_OVER_LOAD_MAP:
if (gMapTransitionStateTime != 0) {
gMapTransitionStateTime--;
} else {
gGameStatusPtr->isBattle = FALSE;
gGameStatusPtr->disableScripts = FALSE;
load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, 0);
gGameStatusPtr->debugScripts = DEBUG_SCRIPTS_NONE;
load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, LOAD_FROM_MAP);
nuContRmbForceStopEnd();
gMapTransitionState++;
}
break;
case 3:
case GAME_OVER_AWAIT_MAIN:
update_encounters();
update_npcs();
if (!does_script_exist(gGameStatusPtr->mainScriptID)) {
gOverrideFlags &= ~GLOBAL_OVERRIDES_8;
gOverrideFlags &= ~GLOBAL_OVERRIDES_DISABLE_DRAW_FRAME;
gMapTransitionState++;
break;
}
return;
case 4:
case GAME_OVER_FADE_IN:
gMapTransitionAlpha -= gMapTransitionFadeRate;
if (gMapTransitionAlpha < 0) {
gMapTransitionAlpha = 0;

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +0,0 @@
#include "common.h"
extern s32 D_8010C968;
extern s32 D_8010C98C;
s32 func_80262130(f32 inX, f32 inY, f32 inZ, f32 height, f32 radius) {
f32 x = inX;
f32 y = inY;
f32 z = inZ;
f32 hitDepth = height;
s32 ret = FALSE;
s32 phi_s0 = 0;
if (npc_raycast_down_around(0, &x, &y, &z, &hitDepth, 90.0f, radius) && hitDepth <= height) {
s32 colliderFlagsA = get_collider_flags(D_8010C98C & 0xFF);
s32 colliderFlagsB = get_collider_flags(D_8010C968 & 0xFF);
phi_s0 = colliderFlagsA & colliderFlagsB;
if (phi_s0 != (D_8010C98C & 0xFF)) {
phi_s0 = 0;
}
}
if (phi_s0 == 1) {
ret = TRUE;
}
return ret;
}
s32 func_8026220C(f32 arg0, f32 arg1) {
return (arg1 > 100.0f) ? 28 : 0;
}

View File

@ -331,73 +331,73 @@ s32 MenuIndexFromPartnerID[] = {
PartnerPopupProperties gPartnerPopupProperties[] = {
[PARTNER_NONE] {
(s32) "なし",
0x00000000,
0x00000000,
0x00000000,
0,
MSG_NONE,
MSG_NONE,
},
[PARTNER_GOOMBARIO] {
MSG_Menus_Party_Goombario,
0x00000002,
2,
MSG_PartnerDesc_Goombario_World,
MSG_PartnerDesc_Goombario_Battle,
},
[PARTNER_KOOPER] {
MSG_Menus_Party_Kooper,
0x00000003,
3,
MSG_PartnerDesc_Kooper_World,
MSG_PartnerDesc_Kooper_Battle,
},
[PARTNER_BOMBETTE] {
MSG_Menus_Party_Bombette,
0x00000004,
4,
MSG_PartnerDesc_Bombette_World,
MSG_PartnerDesc_Bombette_Battle,
},
[PARTNER_PARAKARRY] {
MSG_Menus_Party_Parakarry,
0x00000005,
5,
MSG_PartnerDesc_Parakarry_World,
MSG_PartnerDesc_Parakarry_Battle,
},
[PARTNER_GOOMPA] {
MSG_Menus_Party_Goompa,
0x00000001,
1,
MSG_PartnerDesc_Goompa_World,
MSG_PartnerDesc_Goompa_Battle,
},
[PARTNER_WATT] {
MSG_Menus_Party_Watt,
0x00000007,
7,
MSG_PartnerDesc_Watt_World,
MSG_PartnerDesc_Watt_Battle,
},
[PARTNER_SUSHIE] {
MSG_Menus_Party_Sushie,
0x00000008,
8,
MSG_PartnerDesc_Sushie_World,
MSG_PartnerDesc_Sushie_Battle,
},
[PARTNER_LAKILESTER] {
MSG_Menus_Party_Lakilester,
0x00000009,
9,
MSG_PartnerDesc_Lakilester_World,
MSG_PartnerDesc_Lakilester_Battle,
},
[PARTNER_BOW] {
MSG_Menus_Party_Bow,
0x00000006,
6,
MSG_PartnerDesc_Bow_World,
MSG_PartnerDesc_Bow_Battle,
},
[PARTNER_GOOMBARIA] {
MSG_Menus_Party_Goombaria,
0x00000001,
1,
MSG_PartnerDesc_Goombaria_World,
MSG_PartnerDesc_Goombaria_Battle,
},
[PARTNER_TWINK] {
MSG_Menus_Party_Twink,
0x00000001,
1,
MSG_PartnerDesc_Twink_World,
MSG_PartnerDesc_Twink_Battle,
}

View File

@ -223,8 +223,8 @@ s32 player_raycast_down(f32* x, f32* y, f32* z, f32* length) {
gGameStatusPtr->playerGroundTraceNormal.x = hitNx;
gGameStatusPtr->playerGroundTraceNormal.y = hitNy;
gGameStatusPtr->playerGroundTraceNormal.z = hitNz;
D_8010C938 = get_player_normal_yaw();
D_8010C990 = get_player_normal_pitch();
PlayerNormalYaw = get_player_normal_yaw();
PlayerNormalPitch = get_player_normal_pitch();
gGameStatusPtr->playerGroundTraceAngles.x = atan2(0.0f, 0.0f, hitNz * 100.0, hitNy * 100.0);
gGameStatusPtr->playerGroundTraceAngles.y = 0.0f;
gGameStatusPtr->playerGroundTraceAngles.z = atan2(0.0f, 0.0f, hitNx * 100.0, hitNy * 100.0);
@ -600,6 +600,7 @@ s32 player_test_move_with_slipping(PlayerStatus* playerStatus, f32* x, f32* y, f
return ret;
}
// main function for player physics called from state step functions
void update_player(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
CollisionStatus* collisionStatus = &gCollisionStatus;
@ -640,7 +641,7 @@ void update_player(void) {
if (playerStatus->flags & PS_FLAG_NO_STATIC_COLLISION) {
phys_update_action_state();
if (!game_scripts_disabled()) {
if (!check_player_action_debug()) {
collision_main_lateral();
}
} else if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) {
@ -675,6 +676,7 @@ void update_player(void) {
}
update_player_shadow();
check_for_interactables();
check_for_conversation_prompt();
check_for_pulse_stone();
@ -777,7 +779,7 @@ void player_reset_data(void) {
mem_clear(playerStatus, sizeof(PlayerStatus));
playerStatus->flags = PS_FLAG_HAS_REFLECTION;
reset_player_status();
playerStatus->shadowID = create_shadow_type(0, playerStatus->pos.x, playerStatus->pos.y,
playerStatus->shadowID = create_shadow_type(SHADOW_VARYING_CIRCLE, playerStatus->pos.x, playerStatus->pos.y,
playerStatus->pos.z);
func_800E6B68();
func_800E0B14();
@ -840,8 +842,9 @@ s32 get_overriding_player_anim(s32 anim) {
return -1;
}
} else if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) {
if ((playerStatus->peachItemHeld != 0)
&& (anim == ANIM_Peach2_RaiseArms || anim == ANIM_Peach2_Talk || anim == ANIM_Peach2_LowerArms)) {
if (playerStatus->peachItemHeld != PEACH_BAKING_NONE
&& (anim == ANIM_Peach2_RaiseArms || anim == ANIM_Peach2_Talk || anim == ANIM_Peach2_LowerArms)
) {
anim = ANIM_Peach3_PresentCompleteCake;
}
}
@ -860,7 +863,7 @@ void suggest_player_anim_allow_backward(AnimID anim) {
if (newAnim != -1) {
playerStatus->anim = newAnim;
playerStatus->animNotifyValue = 0;
playerStatus->flags &= ~PS_FLAG_FACE_FORWARDS;
playerStatus->flags &= ~PS_FLAG_FACE_FORWARD;
}
}
@ -869,7 +872,7 @@ void force_player_anim(AnimID anim) {
playerStatus->anim = anim;
playerStatus->animNotifyValue = 0;
playerStatus->flags &= ~PS_FLAG_FACE_FORWARDS;
playerStatus->flags &= ~PS_FLAG_FACE_FORWARD;
}
void suggest_player_anim_always_forward(AnimID anim) {
@ -879,7 +882,7 @@ void suggest_player_anim_always_forward(AnimID anim) {
if (newAnim != -1) {
playerStatus->anim = newAnim;
playerStatus->animNotifyValue = 0;
playerStatus->flags |= PS_FLAG_FACE_FORWARDS;
playerStatus->flags |= PS_FLAG_FACE_FORWARD;
}
}
@ -980,10 +983,10 @@ void func_800E01DC(void) {
}
}
s32 game_scripts_disabled(void) {
s32 ret = FALSE;
b32 check_player_action_debug(void) {
b32 ret = FALSE;
if (gGameStatusPtr->disableScripts && (gGameStatusPtr->curButtons[0] & BUTTON_R)) {
if (gGameStatusPtr->debugScripts != DEBUG_SCRIPTS_NONE && (gGameStatusPtr->curButtons[0] & BUTTON_R)) {
if (gPartnerStatus.partnerActionState == PARTNER_ACTION_NONE) {
set_action_state(ACTION_STATE_IDLE);
}
@ -1380,7 +1383,7 @@ void player_update_sprite(void) {
if (playerStatus->actionState != ACTION_STATE_TORNADO_JUMP && !(playerStatus->flags & PS_FLAG_ROTATION_LOCKED)) {
playerStatus->spriteFacingAngle = angle + D_800F7B48;
trueAnim = playerStatus->anim;
if (!(playerStatus->flags & PS_FLAG_FACE_FORWARDS)
if (!(playerStatus->flags & PS_FLAG_FACE_FORWARD)
&& (sprIndex == SPR_Mario1 || sprIndex == SPR_MarioW1 || sprIndex == SPR_Peach1)
&& fabsf(get_clamped_angle_diff(cameraYaw, playerStatus->curYaw)) < 60.0f
) {
@ -1390,7 +1393,7 @@ void player_update_sprite(void) {
playerStatus->curYaw = playerStatus->targetYaw;
} else {
trueAnim = playerStatus->anim;
if (!(playerStatus->flags & PS_FLAG_FACE_FORWARDS)
if (!(playerStatus->flags & PS_FLAG_FACE_FORWARD)
&& (sprIndex == SPR_Mario1 || sprIndex == SPR_MarioW1 || sprIndex == SPR_Peach1)
&& playerStatus->spriteFacingAngle < 350.0f && playerStatus->spriteFacingAngle > 190.0f
) {
@ -1459,7 +1462,7 @@ s32 get_player_back_anim(s32 anim) {
}
void render_player(void) {
if (!gGameStatusPtr->disableScripts) {
if (gGameStatusPtr->debugScripts == DEBUG_SCRIPTS_NONE) {
render_player_model();
}
}

View File

@ -4,11 +4,11 @@ SHIFT_BSS s32 PeachDisguiseNpcIndex;
SHIFT_BSS Entity* TweesterTouchingPartner;
SHIFT_BSS Entity* TweesterTouchingPlayer;
SHIFT_BSS s32 PrevPlayerDirection;
SHIFT_BSS s32 D_8010C980;
SHIFT_BSS f32 D_8010C938;
SHIFT_BSS f32 D_8010C990;
SHIFT_BSS s32 PlayerRunStateTime;
SHIFT_BSS f32 PlayerNormalYaw;
SHIFT_BSS f32 PlayerNormalPitch;
SHIFT_BSS PlayerSpinState gPlayerSpinState;
SHIFT_BSS s32 D_8010C9A0;
SHIFT_BSS s32 PlayerYInterpUpdateDelay;
void update_player_input(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
@ -59,11 +59,11 @@ void reset_player_status(void) {
InteractNotificationCallback = NULL;
D_8010C92C = 0;
PrevPlayerDirection = 0;
D_8010C980 = 0;
PlayerRunStateTime = 0;
PrevPlayerCamRelativeYaw = 0;
D_800F7B44 = 0;
D_8010C938 = 0;
D_8010C990 = 0.0f;
PlayerNormalYaw = 0;
PlayerNormalPitch = 0.0f;
playerStatus->availableDisguiseType = 1;
playerStatus->renderMode = RENDER_MODE_ALPHATEST;
@ -86,7 +86,7 @@ void reset_player_status(void) {
} else {
playerStatus->colliderHeight = 37;
playerStatus->colliderDiameter = 26;
gGameStatusPtr->peachBakingIngredient = 0;
gGameStatusPtr->peachBakingIngredient = PEACH_BAKING_NONE;
}
// TODO required to match
@ -131,35 +131,32 @@ void reset_player_status(void) {
mem_clear(&gPlayerSpinState, sizeof(gPlayerSpinState));
}
void get_packed_buttons(s32* arg0) {
void get_packed_buttons(s32* out) {
PlayerStatus* playerStatus = &gPlayerStatus;
*arg0 = (u16)playerStatus->curButtons | (playerStatus->pressedButtons << 16);
*out = (playerStatus->curButtons & 0xFFFF) | (playerStatus->pressedButtons << 16);
}
void player_input_to_move_vector(f32* angle, f32* magnitude) {
void player_input_to_move_vector(f32* outAngle, f32* outMagnitude) {
PlayerStatus* playerStatus = &gPlayerStatus;
f32 stickAxisX;
f32 stickAxisY;
f32 ang;
f32 mag;
f32 magMax = 70.0f;
f32 stickAxisX = playerStatus->stickAxis[0];
f32 stickAxisY = -playerStatus->stickAxis[1];
f32 maxRadius = 70.0f;
f32 magnitude;
f32 angle;
stickAxisX = playerStatus->stickAxis[0];
stickAxisY = -playerStatus->stickAxis[1];
mag = dist2D(0.0f, 0.0f, stickAxisX, stickAxisY);
if (mag >= magMax) {
mag = magMax;
magnitude = dist2D(0.0f, 0.0f, stickAxisX, stickAxisY);
if (magnitude >= maxRadius) {
magnitude = maxRadius;
}
ang = clamp_angle(atan2(0.0f, 0.0f, stickAxisX, stickAxisY) + gCameras[CAM_DEFAULT].curYaw);
if (mag == 0.0f) {
ang = playerStatus->targetYaw;
angle = clamp_angle(atan2(0.0f, 0.0f, stickAxisX, stickAxisY) + gCameras[CAM_DEFAULT].curYaw);
if (magnitude == 0.0f) {
angle = playerStatus->targetYaw;
}
*angle = ang;
*magnitude = mag;
*outAngle = angle;
*outMagnitude = magnitude;
}
void game_input_to_move_vector(f32* outAngle, f32* outMagnitude) {
@ -184,45 +181,46 @@ void game_input_to_move_vector(f32* outAngle, f32* outMagnitude) {
*outMagnitude = magnitude;
}
void func_800E24F8(void) {
void calculate_camera_yinterp_rate(void) {
Shadow* shadow = get_shadow_by_index(gPlayerStatus.shadowID);
f32 x = shadow->rot.x + 180.0;
f32 z = shadow->rot.z + 180.0;
Camera* camera = &gCameras[CAM_DEFAULT];
f32 temp;
f32 rate;
if (x != 0.0f || z != 0.0f) {
switch (gPlayerStatus.actionState) {
case ACTION_STATE_JUMP:
case ACTION_STATE_FALLING:
temp = 32.0f;
camera->unk_49C = temp;
rate = 32.0f;
camera->yinterpRate = rate;
break;
case ACTION_STATE_WALK:
case ACTION_STATE_RUN:
if (camera->targetScreenCoords.y < 130) {
camera->unk_49C = 3.0f;
camera->yinterpRate = 3.0f;
break;
}
temp = 3.0f;
if (D_8010C9A0++ > 10) {
D_8010C9A0 = 10;
camera->unk_49C -= 2.0f;
if (camera->unk_49C < temp) {
camera->unk_49C = temp;
}
rate = 3.0f;
if (PlayerYInterpUpdateDelay++ <= 10) {
return;
}
PlayerYInterpUpdateDelay = 10;
camera->yinterpRate -= 2.0f;
if (camera->yinterpRate < rate) {
camera->yinterpRate = rate;
}
break;
case ACTION_STATE_SLIDING:
temp = 3.0f;
camera->unk_49C = temp;
rate = 3.0f;
camera->yinterpRate = rate;
break;
default:
temp = 3.0f;
D_8010C9A0 = 0;
camera->unk_49C -= 2.0f;
if (camera->unk_49C < temp) {
camera->unk_49C = temp;
rate = 3.0f;
PlayerYInterpUpdateDelay = 0;
camera->yinterpRate -= 2.0f;
if (camera->yinterpRate < rate) {
camera->yinterpRate = rate;
}
break;
}
@ -232,13 +230,13 @@ void func_800E24F8(void) {
case ACTION_STATE_RUN:
case ACTION_STATE_JUMP:
case ACTION_STATE_SLIDING:
temp = 7.2f;
rate = 7.2f;
break;
default:
temp = 24.0f;
rate = 24.0f;
break;
}
camera->unk_49C = temp;
camera->yinterpRate = rate;
}
}

View File

@ -245,7 +245,7 @@ void phys_update_action_state(void) {
LastMidairPlayerVelY = playerStatus->gravityIntegrator[0];
}
func_800E24F8();
calculate_camera_yinterp_rate();
if (playerSpinState->stopSoundTimer != 0) {
playerSpinState->stopSoundTimer--;
if (playerSpinState->stopSoundTimer == 0) {
@ -289,7 +289,7 @@ void phys_update_action_state(void) {
void phys_peach_update(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
func_800E24F8();
calculate_camera_yinterp_rate();
do {
if (!(playerStatus->flags & PS_FLAG_PAUSED) && check_conversation_trigger()) {
@ -448,7 +448,7 @@ void start_bounce_b(void) {
playerStatus->flags |= PS_FLAG_SCRIPTED_FALL;
}
s32 check_input_hammer(void) {
b32 check_input_hammer(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
PlayerData* playerData = &gPlayerData;
@ -471,7 +471,7 @@ s32 check_input_hammer(void) {
return FALSE;
}
s32 check_input_jump(void) {
b32 check_input_jump(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
CollisionStatus* collisionStatus = &gCollisionStatus;
s32 surfaceType;

View File

@ -120,7 +120,7 @@ s32 collision_main_above(void) {
return hitResult;
}
void handle_switch_hit(void) {
void handle_jumping_land_on_switch(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
s32 colliderID;
f32 groundPosY;
@ -166,7 +166,7 @@ void handle_switch_hit(void) {
}
}
void func_800E2BB0(void) {
void handle_jumping_launch(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
s32 cond = FALSE;
@ -205,10 +205,10 @@ void phys_update_jump(void) {
if (playerStatus->timeInAir != 0) {
switch (playerStatus->actionState) {
case ACTION_STATE_LAUNCH:
func_800E2BB0();
handle_jumping_launch();
return;
case ACTION_STATE_LANDING_ON_SWITCH:
handle_switch_hit();
handle_jumping_land_on_switch();
return;
case ACTION_STATE_BOUNCE:
integrate_gravity();
@ -463,7 +463,7 @@ f32 integrate_gravity(void) {
f32 player_fall_distance(void) {
f32 velocity = integrate_gravity();
if (game_scripts_disabled()) {
if (check_player_action_debug()) {
velocity = 0.0f;
}
return velocity;
@ -908,7 +908,7 @@ void phys_main_collision_below(void) {
playerStatus->groundAnglesXZ.y = hitDirZ;
}
if (game_scripts_disabled()) {
if (check_player_action_debug()) {
return;
}

View File

@ -192,10 +192,10 @@ void check_input_open_menus(void) {
playerData = &gPlayerData;
popup = &D_8010C9C8;
if (gGameStatusPtr->disableScripts ||
(gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH) ||
evt_get_variable(NULL, GB_StoryProgress) == STORY_INTRO)
{
if (gGameStatusPtr->debugScripts != DEBUG_SCRIPTS_NONE
|| (gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH)
|| evt_get_variable(NULL, GB_StoryProgress) == STORY_INTRO
) {
return;
}

View File

@ -182,7 +182,8 @@ s32 find_item(s32 itemID) {
ItemData* item = &gItemTable[itemID];
s32 i;
if ((item->typeFlags & ITEM_TYPE_FLAG_KEY) != 0) {
if (item->typeFlags & ITEM_TYPE_FLAG_KEY) {
// check key items
for (i = 0; i < ARRAY_COUNT(playerData->keyItems); i++) {
if (playerData->keyItems[i] == itemID) {
break;
@ -194,19 +195,20 @@ s32 find_item(s32 itemID) {
}
return i;
}
for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
if (playerData->invItems[i] == itemID) {
break;
} else {
// check consumable items
for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
if (playerData->invItems[i] == itemID) {
break;
}
}
}
if (i == ARRAY_COUNT(playerData->invItems)) {
return -1;
}
if (i == ARRAY_COUNT(playerData->invItems)) {
return -1;
}
return i;
return i;
}
}
/// Bubbles up player inventory items such that all ITEM_NONE values are at the bottom.
@ -216,13 +218,16 @@ void sort_items(void) {
s32 i;
for (i = ARRAY_COUNT(playerData->invItems) - 2; i >= 0; i--) {
if (playerData->invItems[i] != ITEM_NONE) {
for (j = ARRAY_COUNT(playerData->invItems) - 1; i < j; j--) {
if (playerData->invItems[j] == ITEM_NONE) {
playerData->invItems[j] = playerData->invItems[i];
playerData->invItems[i] = ITEM_NONE;
break;
}
// leave ITEM_NONE at the end of the list alone
if (playerData->invItems[i] == ITEM_NONE) {
continue;
}
// swap any other ITEM_NONE to the end of the list
for (j = ARRAY_COUNT(playerData->invItems) - 1; i < j; j--) {
if (playerData->invItems[j] == ITEM_NONE) {
playerData->invItems[j] = playerData->invItems[i];
playerData->invItems[i] = ITEM_NONE;
break;
}
}
}
@ -560,7 +565,7 @@ void update_status_bar(void) {
s32 spBars;
s32 maxStarPower;
if (gGameStatusPtr->creditsViewportMode >= 0
if (gGameStatusPtr->introPart >= INTRO_PART_0
|| gGameStatusPtr->demoState != DEMO_STATE_NONE
|| (gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH)
|| evt_get_variable(NULL, GB_StoryProgress) >= STORY_EPILOGUE

View File

@ -310,7 +310,7 @@ s32 create_model_animator(s16* animPos) {
}
if (gGameStatusPtr->isBattle) {
i |= 0x800;
i |= BATTLE_ID_BIT;
}
return i;
}
@ -350,7 +350,7 @@ s32 create_mesh_animator(s16* animPos, s16* animBuffer) {
}
if (gGameStatusPtr->isBattle) {
i |= 0x800;
i |= BATTLE_ID_BIT;
}
return i;
}
@ -428,114 +428,128 @@ AnimatorNode* add_anim_node(ModelAnimator* animator, s32 parentNodeID, AnimatorN
}
void update_model_animator(s32 animatorID) {
if (!gGameStatusPtr->isBattle || animatorID & 0x800) {
ModelAnimator* animator;
ModelAnimator* animator;
s32 temp;
s32 i;
animatorID &= ~0x800;
animator = (*gCurrentAnimMeshListPtr)[animatorID];
if (gGameStatusPtr->isBattle && !(animatorID & BATTLE_ID_BIT)) {
return;
}
if (animator != NULL && animator->flags != 0) {
s32 temp = 0;
animatorID &= ~BATTLE_ID_BIT;
animator = (*gCurrentAnimMeshListPtr)[animatorID];
if (!(animator->flags & MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION)) {
animator->flags &= ~MODEL_ANIMATOR_FLAG_UPDATE_PENDING;
animator->nextUpdateTime -= animator->timeScale;
if (animator->nextUpdateTime <= 0.0f) {
if (!(animator->flags & MODEL_ANIMATOR_FLAG_MESH)) {
do {
temp = step_model_animator(animator);
} while (temp > 0);
} else {
animator->nextUpdateTime = 1.0f;
reload_mesh_animator_tree(animator);
do {
temp = step_mesh_animator(animator);
} while (temp > 0);
}
}
if (animator == NULL || animator->flags == 0) {
return;
}
if (temp != -1) {
s32 i;
if (animator->flags & MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION) {
return;
}
animator->flags &= ~MODEL_ANIMATOR_FLAG_UPDATE_PENDING;
animator->nextUpdateTime -= animator->timeScale;
animator_update_model_transforms(animator, NULL);
temp = 0;
if (animator->nextUpdateTime <= 0.0f) {
if (!(animator->flags & MODEL_ANIMATOR_FLAG_MESH)) {
do {
temp = step_model_animator(animator);
} while (temp > 0);
} else {
animator->nextUpdateTime = 1.0f;
reload_mesh_animator_tree(animator);
do {
temp = step_mesh_animator(animator);
} while (temp > 0);
}
}
if (temp == -1) {
return;
}
for (i = 0; i < ARRAY_COUNT(D_801533C0); i++) {
if (D_801533C0[i].ttl >= 0) {
D_801533C0[i].ttl--;
if (D_801533C0[i].ttl == 0) {
D_801533C0[i].ttl = -1;
general_heap_free(D_801533C0[i].addr);
}
}
}
animator_update_model_transforms(animator, NULL);
for (i = 0; i < ARRAY_COUNT(D_801536C0); i++) {
if (D_801536C0[i].ttl >= 0) {
D_801536C0[i].ttl--;
if (D_801536C0[i].ttl == 0) {
D_801536C0[i].ttl = -1;
general_heap_free(D_801536C0[i].addr);
}
}
}
}
for (i = 0; i < ARRAY_COUNT(D_801533C0); i++) {
if (D_801533C0[i].ttl >= 0) {
D_801533C0[i].ttl--;
if (D_801533C0[i].ttl == 0) {
D_801533C0[i].ttl = -1;
general_heap_free(D_801533C0[i].addr);
}
}
}
for (i = 0; i < ARRAY_COUNT(D_801536C0); i++) {
if (D_801536C0[i].ttl >= 0) {
D_801536C0[i].ttl--;
if (D_801536C0[i].ttl == 0) {
D_801536C0[i].ttl = -1;
general_heap_free(D_801536C0[i].addr);
}
}
}
}
void update_model_animator_with_transform(s32 animatorID, Mtx* mtx) {
if (!gGameStatusPtr->isBattle || animatorID & 0x800) {
ModelAnimator* animator;
ModelAnimator* animator;
s32 temp;
s32 i;
animatorID &= ~0x800;
animator = (*gCurrentAnimMeshListPtr)[animatorID];
if (gGameStatusPtr->isBattle && !(animatorID & BATTLE_ID_BIT)) {
return;
}
if (animator != NULL && animator->flags != 0) {
s32 temp = 0;
animatorID &= ~BATTLE_ID_BIT;
animator = (*gCurrentAnimMeshListPtr)[animatorID];
if (!(animator->flags & MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION)) {
animator->flags &= ~MODEL_ANIMATOR_FLAG_UPDATE_PENDING;
animator->nextUpdateTime -= animator->timeScale;
if (animator->nextUpdateTime <= 0.0f) {
if (!(animator->flags & MODEL_ANIMATOR_FLAG_MESH)) {
do {
temp = step_model_animator(animator);
} while (temp > 0);
} else {
animator->nextUpdateTime = 1.0f;
reload_mesh_animator_tree(animator);
do {
temp = step_mesh_animator(animator);
} while (temp > 0);
}
}
if (animator == NULL || animator->flags == 0) {
return;
}
if (temp != -1) {
s32 i;
if (animator->flags & MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION) {
return;
}
animator_update_model_transforms(animator, mtx);
animator->flags &= ~MODEL_ANIMATOR_FLAG_UPDATE_PENDING;
animator->nextUpdateTime -= animator->timeScale;
for (i = 0; i < ARRAY_COUNT(D_801533C0); i++) {
if (D_801533C0[i].ttl >= 0) {
D_801533C0[i].ttl--;
if (D_801533C0[i].ttl == 0) {
D_801533C0[i].ttl = -1;
general_heap_free(D_801533C0[i].addr);
}
}
}
temp = 0;
if (animator->nextUpdateTime <= 0.0f) {
if (!(animator->flags & MODEL_ANIMATOR_FLAG_MESH)) {
do {
temp = step_model_animator(animator);
} while (temp > 0);
} else {
animator->nextUpdateTime = 1.0f;
reload_mesh_animator_tree(animator);
do {
temp = step_mesh_animator(animator);
} while (temp > 0);
}
}
if (temp == -1) {
return;
}
for (i = 0; i < ARRAY_COUNT(D_801536C0); i++) {
if (D_801536C0[i].ttl >= 0) {
D_801536C0[i].ttl--;
if (D_801536C0[i].ttl == 0) {
D_801536C0[i].ttl = -1;
general_heap_free(D_801536C0[i].addr);
}
}
}
}
animator_update_model_transforms(animator, mtx);
for (i = 0; i < ARRAY_COUNT(D_801533C0); i++) {
if (D_801533C0[i].ttl >= 0) {
D_801533C0[i].ttl--;
if (D_801533C0[i].ttl == 0) {
D_801533C0[i].ttl = -1;
general_heap_free(D_801533C0[i].addr);
}
}
}
for (i = 0; i < ARRAY_COUNT(D_801536C0); i++) {
if (D_801536C0[i].ttl >= 0) {
D_801536C0[i].ttl--;
if (D_801536C0[i].ttl == 0) {
D_801536C0[i].ttl = -1;
general_heap_free(D_801536C0[i].addr);
}
}
}
@ -697,49 +711,63 @@ void animator_node_update_model_transform(ModelAnimator* animator, f32 (*flipMtx
}
void render_animated_model(s32 animatorID, Mtx* rootTransform) {
ModelAnimator* animator;
RenderTask rt;
RenderTask* rtPtr = &rt;
if (!gGameStatusPtr->isBattle || animatorID & 0x800) {
ModelAnimator* animator;
if (gGameStatusPtr->isBattle && !(animatorID & BATTLE_ID_BIT)) {
return;
}
animatorID &= ~BATTLE_ID_BIT;
animator = (*gCurrentAnimMeshListPtr)[animatorID];
animatorID &= ~0x800;
animator = (*gCurrentAnimMeshListPtr)[animatorID];
if (animator != NULL && animator->flags != 0 && !(animator->flags & MODEL_ANIMATOR_FLAG_UPDATE_PENDING) &&
animator->flags & (1 << gCurrentCamID) && !(animator->flags & MODEL_ANIMATOR_FLAG_HIDDEN))
{
animator->mtx = *rootTransform;
animator->baseAddr = NULL;
rtPtr->appendGfxArg = animator;
rtPtr->appendGfx = (void (*)(void*))appendGfx_animator;
rtPtr->dist = 0;
rtPtr->renderMode = animator->renderMode;
queue_render_task(rtPtr);
}
if (animator == NULL || animator->flags == 0) {
return;
}
if (!(animator->flags & MODEL_ANIMATOR_FLAG_UPDATE_PENDING)
&& animator->flags & (1 << gCurrentCamID)
&& !(animator->flags & MODEL_ANIMATOR_FLAG_HIDDEN)
) {
animator->mtx = *rootTransform;
animator->baseAddr = NULL;
rtPtr->appendGfxArg = animator;
rtPtr->appendGfx = (void (*)(void*))appendGfx_animator;
rtPtr->dist = 0;
rtPtr->renderMode = animator->renderMode;
queue_render_task(rtPtr);
}
}
void render_animated_model_with_vertices(s32 animatorID, Mtx* rootTransform, s32 segment, void* baseAddr) {
ModelAnimator* animator;
RenderTask rt;
RenderTask* rtPtr = &rt;
if (!gGameStatusPtr->isBattle || animatorID & 0x800) {
ModelAnimator* animator;
if (gGameStatusPtr->isBattle && !(animatorID & BATTLE_ID_BIT)) {
return;
}
animatorID &= ~0x800;
animator = (*gCurrentAnimMeshListPtr)[animatorID];
if (animator != NULL && animator->flags != 0 && !(animator->flags & MODEL_ANIMATOR_FLAG_UPDATE_PENDING) &&
animator->flags & (1 << gCurrentCamID) && !(animator->flags & MODEL_ANIMATOR_FLAG_HIDDEN))
{
animator->mtx = *rootTransform;
gAnimVtxSegment = segment;
animator->baseAddr = baseAddr;
rtPtr->appendGfxArg = animator;
rtPtr->appendGfx = (void (*)(void*))appendGfx_animator;
rtPtr->dist = 0;
rtPtr->renderMode = animator->renderMode;
queue_render_task(rtPtr);
}
animatorID &= ~BATTLE_ID_BIT;
animator = (*gCurrentAnimMeshListPtr)[animatorID];
if (animator == NULL || animator->flags == 0) {
return;
}
if (!(animator->flags & MODEL_ANIMATOR_FLAG_UPDATE_PENDING)
&& animator->flags & (1 << gCurrentCamID)
&& !(animator->flags & MODEL_ANIMATOR_FLAG_HIDDEN)
) {
animator->mtx = *rootTransform;
gAnimVtxSegment = segment;
animator->baseAddr = baseAddr;
rtPtr->appendGfxArg = animator;
rtPtr->appendGfx = (void (*)(void*))appendGfx_animator;
rtPtr->dist = 0;
rtPtr->renderMode = animator->renderMode;
queue_render_task(rtPtr);
}
}
@ -959,11 +987,11 @@ void set_animator_tree_to_node_map(ModelAnimator* animator, s32* nodeIDs, s32 co
}
ModelAnimator* get_animator_by_index(s32 animModelID) {
return (*gCurrentAnimMeshListPtr)[animModelID & ~0x800];
return (*gCurrentAnimMeshListPtr)[animModelID & ~BATTLE_ID_BIT];
}
ModelAnimator* set_animator_render_callback(s32 animModelID, void* callbackArg, void (*callbackFunc)(void*)) {
ModelAnimator* ret = (*gCurrentAnimMeshListPtr)[animModelID & ~0x800];
ModelAnimator* ret = (*gCurrentAnimMeshListPtr)[animModelID & ~BATTLE_ID_BIT];
ret->fpRenderCallback = callbackFunc;
ret->renderCallbackArg = callbackArg;
@ -1007,19 +1035,19 @@ void get_anim_model_fog_color(s32* r, s32* g, s32* b, s32* a) {
}
void set_animator_flags(s32 index, s32 bits) {
ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[index & ~0x800];
ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[index & ~BATTLE_ID_BIT];
animator->flags |= bits;
}
void clear_animator_flags(s32 index, s32 bits) {
ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[index & ~0x800];
ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[index & ~BATTLE_ID_BIT];
animator->flags &= ~bits;
}
void play_model_animation(s32 index, s16* animPos) {
ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[index & ~0x800];
ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[index & ~BATTLE_ID_BIT];
if (animator->animationBuffer != NULL) {
animPos = (s16*) (((s32)animPos & 0xFFFFFF) + (s32)animator->animationBuffer); // TODO: array access? / cleanup
@ -1031,7 +1059,7 @@ void play_model_animation(s32 index, s16* animPos) {
}
void play_model_animation_starting_from(s32 index, s16* animPos, s32 framesToSkip) {
s32 indexMasked = index & ~0x800;
s32 indexMasked = index & ~BATTLE_ID_BIT;
ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[indexMasked];
s32 i;
@ -1089,14 +1117,16 @@ void load_model_animator_node(StaticAnimatorNode* node, ModelAnimator* animator,
}
void load_model_animator_tree(s32 index, StaticAnimatorNode** tree) {
ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[index & ~0x800];
ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[index & ~BATTLE_ID_BIT];
s32 nodeIDs[ARRAY_COUNT(animator->staticNodeIDs)];
if (animator != NULL && animator->flags != 0) {
gAnimTreeRoot = tree;
load_model_animator_node(*tree, animator, 0, nodeIDs);
set_animator_tree_to_node_map(animator, nodeIDs, ARRAY_COUNT(animator->staticNodeIDs));
if (animator == NULL || animator->flags == 0) {
return;
}
gAnimTreeRoot = tree;
load_model_animator_node(*tree, animator, 0, nodeIDs);
set_animator_tree_to_node_map(animator, nodeIDs, ARRAY_COUNT(animator->staticNodeIDs));
}
void load_mesh_animator_node(StaticAnimatorNode* node, ModelAnimator* animator, s32 parentNodeID, s32* treeIndexToNodeIDs) {
@ -1114,29 +1144,31 @@ void load_mesh_animator_node(StaticAnimatorNode* node, ModelAnimator* animator,
}
void load_mesh_animator_tree(s32 index, StaticAnimatorNode** tree) {
s32 indexMasked = index & ~0x800;
s32 indexMasked = index & ~BATTLE_ID_BIT;
ModelAnimator* animator = (*gCurrentAnimMeshListPtr)[indexMasked];
s32 nodeIDs[ARRAY_COUNT(animator->staticNodeIDs)];
s32 i;
if (animator != NULL && animator->flags != 0) {
if ((*tree)->vertexStartOffset == 0) {
load_model_animator_tree(indexMasked, tree);
return;
}
gAnimTreeRoot = tree;
animator->staticRoot = tree;
animator->treeIndexPos = 0;
animator->savedTreePos = 0;
for (i = 0; i < ARRAY_COUNT(animator->staticNodes); i++) {
animator->staticNodes[i] = NULL;
}
load_mesh_animator_node(*gAnimTreeRoot, animator, 0, nodeIDs);
animator->flags |= MODEL_ANIMATOR_FLAG_MESH;
if (animator == NULL || animator->flags == 0) {
return;
}
if ((*tree)->vertexStartOffset == 0) {
load_model_animator_tree(indexMasked, tree);
return;
}
gAnimTreeRoot = tree;
animator->staticRoot = tree;
animator->treeIndexPos = 0;
animator->savedTreePos = 0;
for (i = 0; i < ARRAY_COUNT(animator->staticNodes); i++) {
animator->staticNodes[i] = NULL;
}
load_mesh_animator_node(*gAnimTreeRoot, animator, 0, nodeIDs);
animator->flags |= MODEL_ANIMATOR_FLAG_MESH;
}
void reload_mesh_animator_node(StaticAnimatorNode* node, ModelAnimator* animator, s32 parentNodeID, s32* treeIndexToNodeIDs) {

View File

@ -61,7 +61,6 @@ typedef u8* WaveData;
typedef u32 SegData;
typedef enum AuPriority {
AU_PRIORITY_FREE = 0,
AU_PRIORITY_BGM_PLAYER_MAIN = 1,

View File

@ -19,12 +19,12 @@ s32 LoopingSounds[] = {
[SOUND_LOOP_IDX(SOUND_LOOP_TRD_FLOWING_WATER)] SOUND_LRAW_TRD_FLOWING_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TRD_RAISE_STAIRS)] SOUND_LRAW_TRD_RAISE_STAIRS,
[SOUND_LOOP_IDX(SOUND_LOOP_CHEERING)] SOUND_LRAW_CHEERING,
[SOUND_LOOP_IDX(SOUND_LOOP_09)] SOUND_LRAW_0273,
[SOUND_LOOP_IDX(SOUND_LOOP_0A)] SOUND_LRAW_0275,
[SOUND_LOOP_IDX(SOUND_LOOP_0B)] SOUND_LRAW_0275,
[SOUND_LOOP_IDX(SOUND_LOOP_0C)] SOUND_LRAW_0274,
[SOUND_LOOP_IDX(SOUND_LOOP_0D)] SOUND_LRAW_0273,
[SOUND_LOOP_IDX(SOUND_LOOP_0E)] SOUND_LRAW_0274,
[SOUND_LOOP_IDX(SOUND_LOOP_IWA10_FLOW1)] SOUND_LRAW_WATER_FLOWING_1,
[SOUND_LOOP_IDX(SOUND_LOOP_IWA_UNUSED_FLOW3)] SOUND_LRAW_WATER_FLOWING_3,
[SOUND_LOOP_IDX(SOUND_LOOP_IWA00_FLOW3)] SOUND_LRAW_WATER_FLOWING_3,
[SOUND_LOOP_IDX(SOUND_LOOP_IWA00_FLOW2)] SOUND_LRAW_WATER_FLOWING_2,
[SOUND_LOOP_IDX(SOUND_LOOP_IWA01_FLOW1)] SOUND_LRAW_WATER_FLOWING_1,
[SOUND_LOOP_IDX(SOUND_LOOP_IWA01_FLOW2)] SOUND_LRAW_WATER_FLOWING_2,
[SOUND_LOOP_IDX(SOUND_LOOP_OBK_LOWER_CHAIN)] SOUND_LRAW_OBK_LOWER_CHAIN,
[SOUND_LOOP_IDX(SOUND_LOOP_MOVE_STATUE)] SOUND_LRAW_MOVE_STATUE,
[SOUND_LOOP_IDX(SOUND_LOOP_SENTINEL_ALARM)] SOUND_LRAW_SENTINEL_ALARM,
@ -40,50 +40,50 @@ s32 LoopingSounds[] = {
[SOUND_LOOP_IDX(SOUND_LOOP_TROMP_ROLL)] SOUND_LRAW_TROMP_ROLL,
[SOUND_LOOP_IDX(SOUND_LOOP_JAN_SMALL_GEYSER)] SOUND_LRAW_JAN_SMALL_GEYSER,
[SOUND_LOOP_IDX(SOUND_LOOP_JAN_LARGE_GEYSER)] SOUND_LRAW_JAN_LARGE_GEYSER,
[SOUND_LOOP_IDX(SOUND_LOOP_1E)] SOUND_LRAW_0189,
[SOUND_LOOP_IDX(SOUND_LOOP_1F)] SOUND_NONE,
[SOUND_LOOP_IDX(SOUND_LOOP_20)] SOUND_NONE,
[SOUND_LOOP_IDX(SOUND_LOOP_21)] SOUND_LRAW_0198,
[SOUND_LOOP_IDX(SOUND_LOOP_22)] SOUND_LRAW_0199,
[SOUND_LOOP_IDX(SOUND_LOOP_23)] SOUND_LRAW_0194,
[SOUND_LOOP_IDX(SOUND_LOOP_24)] SOUND_LRAW_019A,
[SOUND_LOOP_IDX(SOUND_LOOP_JAN_CONSTRUCTION)] SOUND_LRAW_JAN_CONSTRUCTION,
[SOUND_LOOP_IDX(SOUND_LOOP_NOTHING_1F)] SOUND_NONE,
[SOUND_LOOP_IDX(SOUND_LOOP_NOTHING_20)] SOUND_NONE,
[SOUND_LOOP_IDX(SOUND_LOOP_FLO_WATER_FLOW_1)] SOUND_LRAW_FLO_WATER_FLOW_1,
[SOUND_LOOP_IDX(SOUND_LOOP_FLO_WATER_FLOW_2)] SOUND_LRAW_FLO_WATER_FLOW_2,
[SOUND_LOOP_IDX(SOUND_LOOP_BUBBLE_DRIFT)] SOUND_LRAW_BUBBLE_DRIFT,
[SOUND_LOOP_IDX(SOUND_LOOP_FLO_RELEASE_FOUNTAIN)] SOUND_LRAW_FLO_RELEASE_FOUNTAIN,
[SOUND_LOOP_IDX(SOUND_LOOP_PUFF_PUFF_MACHINE)] SOUND_LRAW_PUFF_PUFF_MACHINE,
[SOUND_LOOP_IDX(SOUND_LOOP_26)] SOUND_LRAW_0164,
[SOUND_LOOP_IDX(SOUND_LOOP_27)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_28)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_29)] SOUND_LRAW_0274,
[SOUND_LOOP_IDX(SOUND_LOOP_2A)] SOUND_LRAW_0275,
[SOUND_LOOP_IDX(SOUND_LOOP_2B)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_2C)] SOUND_LRAW_0273,
[SOUND_LOOP_IDX(SOUND_LOOP_2D)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_2E)] SOUND_LRAW_0273,
[SOUND_LOOP_IDX(SOUND_LOOP_2F)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_30)] SOUND_LRAW_0274,
[SOUND_LOOP_IDX(SOUND_LOOP_31)] SOUND_LRAW_0275,
[SOUND_LOOP_IDX(SOUND_LOOP_32)] SOUND_LRAW_0276,
[SOUND_LOOP_IDX(SOUND_LOOP_33)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_34)] SOUND_LRAW_0273,
[SOUND_LOOP_IDX(SOUND_LOOP_35)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_36)] SOUND_LRAW_0274,
[SOUND_LOOP_IDX(SOUND_LOOP_37)] SOUND_LRAW_0276,
[SOUND_LOOP_IDX(SOUND_LOOP_38)] SOUND_LRAW_0275,
[SOUND_LOOP_IDX(SOUND_LOOP_39)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_3A)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_3B)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_3C)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_3D)] SOUND_LRAW_0276,
[SOUND_LOOP_IDX(SOUND_LOOP_3E)] SOUND_LRAW_0275,
[SOUND_LOOP_IDX(SOUND_LOOP_3F)] SOUND_LRAW_0274,
[SOUND_LOOP_IDX(SOUND_LOOP_NOTHING_26)] SOUND_LRAW_NOTHING_26,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK01_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK02_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK02_FLOW2)] SOUND_LRAW_WATER_FLOWING_2,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK02_FLOW3)] SOUND_LRAW_WATER_FLOWING_3,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK03_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK03_FLOW1)] SOUND_LRAW_WATER_FLOWING_1,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK05_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK05_FLOW1)] SOUND_LRAW_WATER_FLOWING_1,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK06_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK06_FLOW2)] SOUND_LRAW_WATER_FLOWING_2,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK06_FLOW3)] SOUND_LRAW_WATER_FLOWING_3,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK06_FLOW4)] SOUND_LRAW_WATER_FLOWING_4,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK08_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK08_FLOW1)] SOUND_LRAW_WATER_FLOWING_1,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK09_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK09_FLOW2)] SOUND_LRAW_WATER_FLOWING_2,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK09_FLOW4)] SOUND_LRAW_WATER_FLOWING_4,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK09_FLOW3)] SOUND_LRAW_WATER_FLOWING_3,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK10_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK_UNUSED1_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK_UNUSED2_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK_UNUSED3_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK_UNUSED3_FLOW4)] SOUND_LRAW_WATER_FLOWING_4,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK_UNUSED3_FLOW3)] SOUND_LRAW_WATER_FLOWING_3,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK_UNUSED3_FLOW2)] SOUND_LRAW_WATER_FLOWING_2,
[SOUND_LOOP_IDX(SOUND_LOOP_SAM_STAIRS_RISE)] SOUND_LRAW_SAM_STAIRS_RISE,
[SOUND_LOOP_IDX(SOUND_LOOP_CHARGE_BAR)] SOUND_LRAW_CHARGE_BAR,
[SOUND_LOOP_IDX(SOUND_LOOP_CRYSTAL_BALL_GLOW)] SOUND_LRAW_CRYSTAL_BALL_GLOW,
[SOUND_LOOP_IDX(SOUND_LOOP_43)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_44)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_45)] SOUND_LRAW_0275,
[SOUND_LOOP_IDX(SOUND_LOOP_46)] SOUND_LRAW_0276,
[SOUND_LOOP_IDX(SOUND_LOOP_47)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_48)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_49)] SOUND_LRAW_0271,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK18_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK19_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK19_FLOW3)] SOUND_LRAW_WATER_FLOWING_3,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK19_FLOW4)] SOUND_LRAW_WATER_FLOWING_4,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK20_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK23_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_TIK24_WATER)] SOUND_LRAW_TIK_WATER,
[SOUND_LOOP_IDX(SOUND_LOOP_WINDMILL_EXT)] SOUND_LRAW_WINDMILL_EXT,
[SOUND_LOOP_IDX(SOUND_LOOP_WINDMILL_GEARS)] SOUND_LRAW_WINDMILL_GEARS,
[SOUND_LOOP_IDX(SOUND_LOOP_SHY_GUY_CROWD_1)] SOUND_LRAW_SHY_GUY_CROWD_1,
@ -116,11 +116,11 @@ s32 LoopingSounds[] = {
[SOUND_LOOP_IDX(SOUND_LOOP_STAR_ORB_RISING)] SOUND_LRAW_STAR_ORB_RISING,
[SOUND_LOOP_IDX(SOUND_LOOP_USE_STAR_BEAM)] SOUND_LRAW_USE_STAR_BEAM,
[SOUND_LOOP_IDX(SOUND_LOOP_USE_PEACH_BEAM)] SOUND_LRAW_USE_PEACH_BEAM,
[SOUND_LOOP_IDX(SOUND_LOOP_6A)] SOUND_LRAW_0391,
[SOUND_LOOP_IDX(SOUND_LOOP_6B)] SOUND_LRAW_03BC,
[SOUND_LOOP_IDX(SOUND_LOOP_6C)] SOUND_LRAW_03AD,
[SOUND_LOOP_IDX(SOUND_LOOP_6D)] SOUND_LRAW_022C,
[SOUND_LOOP_IDX(SOUND_LOOP_6E)] SOUND_LRAW_022D,
[SOUND_LOOP_IDX(SOUND_LOOP_SPINNING_FLOWER)] SOUND_LRAW_SPINNING_FLOWER,
[SOUND_LOOP_IDX(SOUND_LOOP_RUMBLE)] SOUND_LRAW_RUMBLE,
[SOUND_LOOP_IDX(SOUND_LOOP_FIGHTING)] SOUND_LRAW_FIGHTING,
[SOUND_LOOP_IDX(SOUND_LOOP_KPA_ARENA_TURN_ON)] SOUND_LRAW_KPA_ARENA_TURN_ON,
[SOUND_LOOP_IDX(SOUND_LOOP_KPA_ARENA_ACTIVE)] SOUND_LRAW_KPA_ARENA_ACTIVE,
};
// all sound IDs for alternating sounds
@ -151,8 +151,8 @@ s32 FuzzyHopSounds[] = { SOUND_FUZZY_HOP_A, SOUND_FUZZY_HOP_B, SOUND_FUZZY_HOP_C
s32 BulletBillExplodeSounds[] = { SOUND_BULLET_BILL_EXPLODE_A, SOUND_BULLET_BILL_EXPLODE_B };
s32 LuigiStepSounds[] = { SOUND_LUIGI_STEP_A, SOUND_LUIGI_STEP_B };
s32 TrainChugSounds[] = { SOUND_TRAIN_CHUG_A, SOUND_TRAIN_CHUG_B };
s32 FinaleBridgeCollapseSounds[] = { SOUND_FINALE_BRIDGE_COLLAPSE_A, SOUND_FINALE_BRIDGE_COLLAPSE_B };
s32 FinaleExplosionSounds[] = { SOUND_FINALE_EXPLOSION_A, SOUND_FINALE_EXPLOSION_B };
s32 FinaleBridgeCollapseSounds[] = { SOUND_KPA_BRIDGE_COLLAPSE_A, SOUND_KPA_BRIDGE_COLLAPSE_B };
s32 FinaleExplosionSounds[] = { SOUND_KPA_EXPLOSION_A, SOUND_KPA_EXPLOSION_B };
s32 CardShuffleSounds[] = { SOUND_SHUFFLE_CARD_A, SOUND_SHUFFLE_CARD_B };
s32 StarSpiritAppearSounds[] = { SOUND_STAR_SPIRIT_APPEAR_A, SOUND_STAR_SPIRIT_APPEAR_B };
s32 StarSpiritCastSounds[] = { SOUND_STAR_SPIRIT_CAST_A, SOUND_STAR_SPIRIT_CAST_B };
@ -297,8 +297,8 @@ void sfx_compute_spatialized_sound_params_full(f32 x, f32 y, f32 z, s16* volume,
}
void sfx_reset_door_sounds(void) {
gCurrentDoorSounds = 0;
gCurrentRoomDoorSounds = 0;
gCurrentDoorSounds = DOOR_SOUNDS_BASIC;
gCurrentRoomDoorSounds = DOOR_SOUNDS_BASIC;
}
void sfx_clear_sounds(void) {

View File

@ -305,7 +305,7 @@ void func_80027BAC(s32 arg0, s32 arg1) {
// * Draws the saved framebuffer to the current framebuffer while the pause screen is opened, fading it in over time.
void gfx_draw_background(void) {
Camera* camera;
s32 bgFlags;
s32 bgRenderState;
s32 backgroundMinX;
s32 backgroundMaxX;
s32 backgroundMinY;
@ -317,10 +317,10 @@ void gfx_draw_background(void) {
gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
camera = &gCameras[gCurrentCameraID];
bgFlags = gGameStatusPtr->backgroundFlags & BACKGROUND_RENDER_STATE_MASK;
bgRenderState = gGameStatusPtr->backgroundFlags & BACKGROUND_RENDER_STATE_MASK;
switch (bgFlags) {
case BACKGROUND_RENDER_STATE_1:
switch (bgRenderState) {
case BACKGROUND_RENDER_STATE_BEGIN_PAUSED:
// Save coverage to nunGfxCfb[1] using the VISCVG render mode
gDPPipeSync(gMainGfxPos++);
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxCfb[1]);
@ -333,16 +333,16 @@ void gfx_draw_background(void) {
gDPPipeSync(gMainGfxPos++);
gDPSetDepthSource(gMainGfxPos++, G_ZS_PIXEL);
gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK;
gGameStatusPtr->backgroundFlags |= BACKGROUND_RENDER_STATE_2;
gGameStatusPtr->backgroundFlags |= BACKGROUND_RENDER_STATE_FILTER_PAUSED;
break;
case BACKGROUND_RENDER_STATE_2:
case BACKGROUND_RENDER_STATE_FILTER_PAUSED:
// Save the framebuffer into the depth buffer and run a filter on it based on the saved coverage values
gfx_transfer_frame_to_depth(nuGfxCfb[0], nuGfxCfb[1], nuGfxZBuffer); // applies filters to the framebuffer
gPauseBackgroundFade = 0;
gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK;
gGameStatusPtr->backgroundFlags |= BACKGROUND_RENDER_STATE_3;
gGameStatusPtr->backgroundFlags |= BACKGROUND_RENDER_STATE_SHOW_PAUSED;
// fallthrough
case BACKGROUND_RENDER_STATE_3:
case BACKGROUND_RENDER_STATE_SHOW_PAUSED:
// Draw the saved framebuffer to the background, fading in at a rate of 16 opacity per frame until reaching 128 opacity
gPauseBackgroundFade += 16;
if (gPauseBackgroundFade > 128) {
@ -385,7 +385,7 @@ void gfx_draw_background(void) {
break;
default:
// Draw the scene's background as normal
if (gOverrideFlags & GLOBAL_OVERRIDES_8) {
if (gOverrideFlags & GLOBAL_OVERRIDES_DISABLE_DRAW_FRAME) {
gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
return;
}

View File

@ -17,14 +17,14 @@ BSS s32 bSavedPartner;
BSS s32 bSavedOverrideFlags;
BSS s32 D_8029DA38; // unused?
BSS s32 D_8029DA3C; // unused?
BSS s32 D_8029DA40;
BSS s32 D_8029DA44;
BSS s32 D_8029DA48;
BSS s32 StarPointsBasePosX;
BSS s32 StarPointsBasePosY;
BSS s32 StarPointsMoveInterpAmt;
BSS s32 D_8029DA4C;
BSS Camera D_8029DA50[ARRAY_COUNT(gCameras)];
BSS f32 D_8029EFB0;
BSS f32 D_8029EFB4;
BSS f32 D_8029EFB8;
BSS Camera SavedWorldCameras[ARRAY_COUNT(gCameras)];
BSS f32 SavedWorldPlayerPosX;
BSS f32 SavedWorldPlayerPosY;
BSS f32 SavedWorldPlayerPosZ;
BSS s32 D_8029EFBC;
BSS s32 BtlStarPointTensHIDs[10];
BSS s32 BtlStarPointShinesHIDs[10];
@ -48,7 +48,7 @@ HudScript* bHPDigitHudScripts[] = {
NULL, NULL, NULL,
};
s32 BattleScreenFadeAmt = 0xFF;
s32 BattleScreenFadeAmt = 255;
EvtScript BtlPutPartnerAway = {
EVT_CALL(DispatchEvent, ACTOR_PARTNER, EVENT_PUT_PARTNER_AWAY)
@ -103,7 +103,7 @@ extern HudScript HES_StatusSPShine;
void btl_render_actors(void);
void tattle_cam_pre_render(Camera*);
void func_8023FF84(Camera*);
void tattle_cam_post_render(Camera*);
void btl_draw_enemy_health_bars(void);
void btl_update_starpoints_display(void);
@ -172,7 +172,7 @@ void initialize_battle(void) {
battleStatus->inputBufferPos = 0;
battleStatus->holdInputBufferPos = 0;
battleStatus->unk_95 = 0;
battleStatus->waitForState = BATTLE_STATE_0;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
battleStatus->enemyActors[i] = NULL;
@ -223,7 +223,7 @@ void initialize_battle(void) {
}
tattleCam->fpDoPreRender = tattle_cam_pre_render;
tattleCam->fpDoPostRender = func_8023FF84;
tattleCam->fpDoPostRender = tattle_cam_post_render;
if (playerData->battlesCount < 9999) {
playerData->battlesCount++;
@ -254,7 +254,7 @@ void btl_update(void) {
s32 cond;
if (battleStatus->inputBitmask != -1) {
if ((battleStatus->flags1 & BS_FLAGS1_PARTNER_ACTING) && gGameStatusPtr->multiplayerEnabled != 0) {
if ((battleStatus->flags1 & BS_FLAGS1_PARTNER_ACTING) && gGameStatusPtr->multiplayerEnabled) {
s32 inputBitmask = battleStatus->inputBitmask;
battleStatus->curButtonsDown = gGameStatusPtr->curButtons[1] & inputBitmask;
@ -289,7 +289,7 @@ void btl_update(void) {
}
cond = TRUE;
if (battleStatus->unk_95 == 0 || battleStatus->unk_95 != gBattleState) {
if (battleStatus->waitForState == BATTLE_STATE_0 || battleStatus->waitForState != gBattleState) {
switch (gBattleState) {
case BATTLE_STATE_NEGATIVE_1:
case BATTLE_STATE_0:
@ -470,8 +470,8 @@ void btl_update(void) {
set_screen_overlay_params_front(OVERLAY_SCREEN_COLOR, D_802809F6);
set_screen_overlay_color(SCREEN_LAYER_FRONT, 208, 208, 208);
intro_logos_set_fade_alpha(255);
intro_logos_set_fade_color(224);
startup_set_fade_screen_alpha(255);
startup_set_fade_screen_color(224);
}
}
}
@ -633,7 +633,7 @@ void btl_render_actors(void) {
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL && !(actor->flags & ACTOR_FLAG_DISABLED)) {
if (actor != NULL && !(actor->flags & ACTOR_FLAG_INVISIBLE)) {
renderTaskPtr->appendGfxArg = (void*)i;
renderTaskPtr->appendGfx = appendGfx_enemy_actor;
renderTaskPtr->dist = actor->curPos.z;
@ -659,7 +659,7 @@ void btl_render_actors(void) {
}
actor = battleStatus->partnerActor;
if (actor != NULL && !(actor->flags & ACTOR_FLAG_DISABLED)) {
if (actor != NULL && !(actor->flags & ACTOR_FLAG_INVISIBLE)) {
renderTaskPtr->appendGfxArg = NULL;
renderTaskPtr->appendGfx = appendGfx_partner_actor;
renderTaskPtr->dist = actor->curPos.z;
@ -684,7 +684,7 @@ void btl_render_actors(void) {
}
actor = battleStatus->playerActor;
if (actor != NULL && !(actor->flags & ACTOR_FLAG_DISABLED)) {
if (actor != NULL && !(actor->flags & ACTOR_FLAG_INVISIBLE)) {
renderTaskPtr->appendGfxArg = NULL;
renderTaskPtr->appendGfx = appendGfx_player_actor;
renderTaskPtr->dist = actor->curPos.z;
@ -712,8 +712,8 @@ void btl_render_actors(void) {
}
}
u16 blend_background_channel_COPY(u16 arg0, s32 arg1, s32 alpha) {
return arg0 + (arg1 - arg0) * alpha / 256;
u16 blend_tattle_background_channel(u16 a, s32 b, s32 alpha) {
return a + (b - a) * alpha / 256;
}
void tattle_cam_pre_render(Camera* camera) {
@ -745,9 +745,9 @@ void tattle_cam_pre_render(Camera* camera) {
} else {
for (i = 0; i < ARRAY_COUNT(gTattleBgPalette); i++) {
u16 palColor = gGameStatusPtr->backgroundPalette[i];
u16 blendedB = blend_background_channel_COPY(UNPACK_PAL_B(palColor), fogB >> 3, fogA);
u16 blendedG = blend_background_channel_COPY(UNPACK_PAL_G(palColor), fogG >> 3, fogA);
u16 blendedR = blend_background_channel_COPY(UNPACK_PAL_R(palColor), fogR >> 3, fogA);
u16 blendedB = blend_tattle_background_channel(UNPACK_PAL_B(palColor), fogB >> 3, fogA);
u16 blendedG = blend_tattle_background_channel(UNPACK_PAL_G(palColor), fogG >> 3, fogA);
u16 blendedR = blend_tattle_background_channel(UNPACK_PAL_R(palColor), fogR >> 3, fogA);
gTattleBgPalette[i] = blendedB << 1 | blendedG << 6 | blendedR << 11 | 1;
}
}
@ -849,88 +849,90 @@ void tattle_cam_pre_render(Camera* camera) {
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
}
void func_8023FF84(Camera* camera) {
void tattle_cam_post_render(Camera* camera) {
show_foreground_models_unchecked();
}
void btl_draw_enemy_health_bars(void) {
BattleStatus* battleStatus = &gBattleStatus;
if (gGameStatusPtr->unk_7C != 0) {
if (gBattleStatus.flags1 & BS_FLAGS1_ACTORS_VISIBLE) {
s32 i;
if (!gGameStatusPtr->healthBarsEnabled) {
return;
}
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
Actor* enemy = battleStatus->enemyActors[i];
if (gBattleStatus.flags1 & BS_FLAGS1_ACTORS_VISIBLE) {
s32 i;
if (enemy != NULL) {
s32 currentHP;
s32 temp;
s32 ones;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
Actor* enemy = battleStatus->enemyActors[i];
currentHP = enemy->curHP;
temp = (currentHP * 25) / enemy->maxHP;
if (enemy != NULL) {
s32 currentHP;
s32 temp;
s32 ones;
if (temp < enemy->healthFraction) {
enemy->healthFraction -= 2;
if (enemy->healthFraction < temp) {
enemy->healthFraction = temp;
}
}
currentHP = enemy->curHP;
temp = (currentHP * 25) / enemy->maxHP;
if (temp < enemy->healthFraction) {
enemy->healthFraction -= 2;
if (enemy->healthFraction < temp) {
enemy->healthFraction += 2;
if (enemy->healthFraction > temp) {
enemy->healthFraction = temp;
}
enemy->healthFraction = temp;
}
}
if (!(enemy->flags & (ACTOR_FLAG_NO_HEALTH_BAR | ACTOR_FLAG_TARGET_ONLY))
&& ((gBattleStatus.flags1 & BS_FLAGS1_MENU_OPEN) || (enemy->flags & ACTOR_FLAG_HEALTH_BAR_HIDDEN))
&& is_actor_health_bar_visible(enemy)
) {
f32 x = enemy->healthBarPos.x;
f32 y = enemy->healthBarPos.y;
f32 z = enemy->healthBarPos.z;
if (enemy->healthFraction < temp) {
enemy->healthFraction += 2;
if (enemy->healthFraction > temp) {
enemy->healthFraction = temp;
}
}
if (enemy->healthBarPos.y >= -500) {
s32 screenX, screenY, screenZ;
s32 id;
if (!(enemy->flags & (ACTOR_FLAG_NO_HEALTH_BAR | ACTOR_FLAG_TARGET_ONLY))
&& ((gBattleStatus.flags1 & BS_FLAGS1_MENU_OPEN) || (enemy->flags & ACTOR_FLAG_HEALTH_BAR_HIDDEN))
&& is_actor_health_bar_visible(enemy)
) {
f32 x = enemy->healthBarPos.x;
f32 y = enemy->healthBarPos.y;
f32 z = enemy->healthBarPos.z;
get_screen_coords(1, x, y, z, &screenX, &screenY, &screenZ);
screenY += 16;
if (enemy->healthBarPos.y >= -500) {
s32 screenX, screenY, screenZ;
s32 id;
get_screen_coords(CAM_BATTLE, x, y, z, &screenX, &screenY, &screenZ);
screenY += 16;
id = D_8029EFBC;
hud_element_set_render_depth(id, 10);
hud_element_set_script(id, &HES_HPBar);
hud_element_set_render_pos(id, screenX, screenY);
hud_element_draw_clipped(id);
temp = currentHP / 10;
ones = currentHP % 10;
// tens digit
if (temp > 0) {
id = D_8029EFBC;
hud_element_set_render_depth(id, 10);
hud_element_set_script(id, &HES_HPBar);
hud_element_set_render_pos(id, screenX, screenY);
hud_element_draw_clipped(id);
temp = currentHP / 10;
ones = currentHP % 10;
// tens digit
if (temp > 0) {
id = D_8029EFBC;
hud_element_set_render_depth(id, 10);
hud_element_set_script(id, bHPDigitHudScripts[temp]);
btl_draw_prim_quad(0, 0, 0, 0, screenX, screenY + 2, 8, 8);
hud_element_set_render_pos(id, screenX + 4, screenY + 6);
hud_element_draw_next(id);
}
// ones digit
id = D_8029EFBC;
hud_element_set_render_depth(id, 10);
hud_element_set_script(id, bHPDigitHudScripts[ones]);
btl_draw_prim_quad(0, 0, 0, 0, screenX + 6, screenY + 2, 8, 8);
hud_element_set_render_pos(id, screenX + 10, screenY + 6);
hud_element_set_script(id, bHPDigitHudScripts[temp]);
btl_draw_prim_quad(0, 0, 0, 0, screenX, screenY + 2, 8, 8);
hud_element_set_render_pos(id, screenX + 4, screenY + 6);
hud_element_draw_next(id);
temp = enemy->healthFraction;
temp = 25 - temp;
btl_draw_prim_quad(168, 0, 0, 255, screenX + 11 - temp, screenY - 7, temp, 1);
btl_draw_prim_quad(255, 0, 0, 255, screenX + 11 - temp, screenY - 6, temp, 4);
}
// ones digit
id = D_8029EFBC;
hud_element_set_render_depth(id, 10);
hud_element_set_script(id, bHPDigitHudScripts[ones]);
btl_draw_prim_quad(0, 0, 0, 0, screenX + 6, screenY + 2, 8, 8);
hud_element_set_render_pos(id, screenX + 10, screenY + 6);
hud_element_draw_next(id);
temp = enemy->healthFraction;
temp = 25 - temp;
btl_draw_prim_quad(168, 0, 0, 255, screenX + 11 - temp, screenY - 7, temp, 1);
btl_draw_prim_quad(255, 0, 0, 255, screenX + 11 - temp, screenY - 6, temp, 4);
}
}
}
@ -946,17 +948,17 @@ void btl_update_starpoints_display(void) {
s32 i;
if (gBattleStatus.flags1 & BS_FLAGS1_ACTORS_VISIBLE) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_1)) {
D_8029DA40 = 292;
D_8029DA44 = 196;
D_8029DA48 = 6;
if (!(gBattleStatus.flags2 & BS_FLAGS2_AWARDING_STAR_POINTS)) {
StarPointsBasePosX = 292;
StarPointsBasePosY = 196;
StarPointsMoveInterpAmt = 6;
D_8029DA4C = battleStatus->totalStarPoints % 10;
} else {
D_8029DA40 += (202 - D_8029DA40) / D_8029DA48;
D_8029DA44 += (120 - D_8029DA44) / D_8029DA48;
D_8029DA48--;
if (D_8029DA48 < 1) {
D_8029DA48 = 1;
StarPointsBasePosX += (202 - StarPointsBasePosX) / StarPointsMoveInterpAmt;
StarPointsBasePosY += (120 - StarPointsBasePosY) / StarPointsMoveInterpAmt;
StarPointsMoveInterpAmt--;
if (StarPointsMoveInterpAmt < 1) {
StarPointsMoveInterpAmt = 1;
}
}
@ -1006,8 +1008,8 @@ void btl_update_starpoints_display(void) {
}
}
posX = D_8029DA40;
posY = D_8029DA44;
posX = StarPointsBasePosX;
posY = StarPointsBasePosY;
tens = battleStatus->totalStarPoints / 10;
ones = battleStatus->totalStarPoints % 10;
@ -1035,9 +1037,9 @@ void btl_update_starpoints_display(void) {
hud_element_set_flags(BtlStarPointShinesHIDs[i], HUD_ELEMENT_FLAG_DISABLED);
}
posX = D_8029DA40;
posY = D_8029DA44 + (one * 14.0f);
if (gBattleStatus.flags2 & BS_FLAGS2_1) {
posX = StarPointsBasePosX;
posY = StarPointsBasePosY + (one * 14.0f);
if (gBattleStatus.flags2 & BS_FLAGS2_AWARDING_STAR_POINTS) {
if (ones != 0) {
draw_box(0, WINDOW_STYLE_4, posX - 100, posY - 5, 0, 110, 12, 120, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL,
NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
@ -1067,12 +1069,12 @@ void btl_save_world_cameras(void) {
s32 i;
for (i = 0; i < ARRAY_COUNT(gCameras); i++) {
D_8029DA50[i] = gCameras[i];
SavedWorldCameras[i] = gCameras[i];
}
D_8029EFB0 = playerStatus->pos.x;
D_8029EFB4 = playerStatus->pos.y;
D_8029EFB8 = playerStatus->pos.z;
SavedWorldPlayerPosX = playerStatus->pos.x;
SavedWorldPlayerPosY = playerStatus->pos.y;
SavedWorldPlayerPosZ = playerStatus->pos.z;
playerStatus->pos.x = NPC_DISPOSE_POS_X;
playerStatus->pos.y = NPC_DISPOSE_POS_Y;
playerStatus->pos.z = NPC_DISPOSE_POS_Z;
@ -1084,13 +1086,13 @@ void btl_restore_world_cameras(void) {
s32 i;
for (i = 0; i < ARRAY_COUNT(gCameras); i++) {
gCameras[i] = D_8029DA50[i];
gCameras[i] = SavedWorldCameras[i];
}
gCurrentCameraID = CAM_DEFAULT;
playerStatus->pos.x = D_8029EFB0;
playerStatus->pos.y = D_8029EFB4;
playerStatus->pos.z = D_8029EFB8;
playerStatus->pos.x = SavedWorldPlayerPosX;
playerStatus->pos.y = SavedWorldPlayerPosY;
playerStatus->pos.z = SavedWorldPlayerPosZ;
if (bSavedOverrideFlags & GLOBAL_OVERRIDES_ENABLE_FLOOR_REFLECTION) {
gOverrideFlags |= GLOBAL_OVERRIDES_ENABLE_FLOOR_REFLECTION;
@ -1122,12 +1124,12 @@ void btl_delete_actor(Actor* actor) {
if (actor->takeTurnScript != NULL) {
kill_script_by_ID(actor->takeTurnScriptID);
}
func_80266EE8(actor, UNK_PAL_EFFECT_0);
set_actor_pal_effect(actor, GLOW_PAL_OFF);
part = actor->partsTable;
while (part != NULL) {
if (!(part->flags & ACTOR_PART_FLAG_4)) {
if (!(part->flags & ACTOR_PART_FLAG_NO_SHADOW)) {
delete_shadow(part->shadowIndex);
}
@ -1136,11 +1138,11 @@ void btl_delete_actor(Actor* actor) {
ASSERT(spr_free_sprite(part->spriteInstanceID) == 0);
if (!(part->flags & ACTOR_PART_FLAG_80000000)) {
if (!(part->flags & ACTOR_PART_FLAG_SKIP_MOVEMENT_ALLOC)) {
heap_free(part->movement);
}
if (!(part->flags & ACTOR_PART_FLAG_2)) {
if (!(part->flags & ACTOR_PART_FLAG_NO_DECORATIONS)) {
heap_free(part->decorationTable);
}
}
@ -1171,7 +1173,7 @@ void btl_delete_actor(Actor* actor) {
void btl_delete_player_actor(Actor* player) {
ActorPart* partsTable;
ActorPartMovement* movement;
DecorationTable* decorationTable;
DecorationTable* decorations;
s32 i;
for (i = 0; i < 2; i++) {
@ -1189,7 +1191,7 @@ void btl_delete_player_actor(Actor* player) {
}
partsTable = player->partsTable;
decorationTable = partsTable->decorationTable;
decorations = partsTable->decorationTable;
movement = partsTable->movement;
delete_shadow(player->shadow.id);
@ -1201,7 +1203,7 @@ void btl_delete_player_actor(Actor* player) {
}
heap_free(movement);
heap_free(decorationTable);
heap_free(decorations);
heap_free(partsTable);
heap_free(player);
}

View File

@ -111,7 +111,7 @@ u8* ActorTypesLists[] = {
NULL,
};
ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) {
API_CALLABLE(ActorSpeak) {
Bytecode* args = script->ptrReadPos;
Actor* actor;
ActorPart* part;
@ -158,7 +158,7 @@ ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) {
script->functionTemp[0] = 0;
gOverrideFlags |= GLOBAL_OVERRIDES_10;
if (gSpeakingActorTalkAnim >= 0) {
func_80263E08(actor, part, gSpeakingActorTalkAnim);
set_actor_anim_by_ref(actor, part, gSpeakingActorTalkAnim);
}
increment_status_bar_disabled();
}
@ -184,14 +184,14 @@ ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE1;
}
if (gSpeakingActorPrintCtx->stateFlags & MSG_STATE_FLAG_80) { // "is talking" flag
if (gSpeakingActorPrintCtx->stateFlags & MSG_STATE_FLAG_SPEAKING) {
anim = gSpeakingActorTalkAnim;
} else {
anim = gSpeakingActorIdleAnim;
}
if (anim >= 0) {
func_80263E08(actor, part, anim);
set_actor_anim_by_ref(actor, part, anim);
}
if (gSpeakingActorPrintIsDone == TRUE) {
@ -203,36 +203,38 @@ ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK;
}
ApiStatus EndActorSpeech(Evt* script, s32 isInitialCall) {
API_CALLABLE(EndActorSpeech) {
Bytecode* args = script->ptrReadPos;
s32 flags;
ActorPart* actorPart;
Actor* actor;
s32 anim;
f32 x, y, z;
s32 screenX, screenY, screenZ;
if (isInitialCall) {
s32 actor = evt_get_variable(script, *args++);
s32 actorID = evt_get_variable(script, *args++);
s32 partID = evt_get_variable(script, *args++);
ActorPart* actorPart;
gSpeakingActorTalkAnim = evt_get_variable(script, *args++);
gSpeakingActorIdleAnim = evt_get_variable(script, *args++);
if (actor == ACTOR_SELF) {
actor = script->owner1.actorID;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
actor = (s32) get_actor(actor);
actorPart = get_actor_part((Actor*)actor, partID);
gSpeakingActor = (Actor*) actor;
actor = get_actor(actorID);
actorPart = get_actor_part(actor, partID);
gSpeakingActor = actor;
gSpeakingActorPart = actorPart;
close_message(gSpeakingActorPrintCtx);
script->functionTemp[0] = 0;
increment_status_bar_disabled();
}
if (script->functionTemp[0] == 0) {
Actor* actor = gSpeakingActor;
ActorPart* actorPart = gSpeakingActorPart;
actor = gSpeakingActor;
actorPart = gSpeakingActorPart;
x = actor->curPos.x + actor->headOffset.x;
if (!(gSpeakingActor->flags & ACTOR_FLAG_HALF_HEIGHT)) {
@ -244,20 +246,19 @@ ApiStatus EndActorSpeech(Evt* script, s32 isInitialCall) {
get_screen_coords(CAM_BATTLE, x, y, z, &screenX, &screenY, &screenZ);
msg_printer_set_origin_pos(gSpeakingActorPrintCtx, screenX, screenY);
flags = gSpeakingActorPrintCtx->stateFlags;
if (flags & 0x40) {
if (gSpeakingActorPrintCtx->stateFlags & MSG_STATE_FLAG_40) {
decrement_status_bar_disabled();
return ApiStatus_DONE1;
}
if (flags & 0x80) {
if (gSpeakingActorPrintCtx->stateFlags & MSG_STATE_FLAG_SPEAKING) {
anim = gSpeakingActorTalkAnim;
} else {
anim = gSpeakingActorIdleAnim;
}
if (anim >= 0) {
func_80263E08(actor, actorPart, anim);
set_actor_anim_by_ref(actor, actorPart, anim);
}
if (gSpeakingActorPrintIsDone == TRUE) {
@ -270,7 +271,7 @@ ApiStatus EndActorSpeech(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK;
}
ApiStatus ShowBattleChoice(Evt* script, s32 isInitialCall) {
API_CALLABLE(ShowBattleChoice) {
Bytecode* args = script->ptrReadPos;
if (isInitialCall) {
@ -292,7 +293,7 @@ ApiStatus ShowBattleChoice(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK;
}
ApiStatus EnableBattleStatusBar(Evt* script, s32 isInitialCall) {
API_CALLABLE(EnableBattleStatusBar) {
Bytecode* args = script->ptrReadPos;
b32 shouldEnable = evt_get_variable(script, *args++);
@ -304,12 +305,12 @@ ApiStatus EnableBattleStatusBar(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus OverrideBattleDmaDest(Evt* script, s32 isInitialCall) {
API_CALLABLE(OverrideBattleDmaDest) {
gBattleDmaDest = (u8*) evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
ApiStatus LoadBattleDmaData(Evt* script, s32 isInitialCall) {
API_CALLABLE(LoadBattleDmaData) {
s32 dmaIndex = evt_get_variable(script, *script->ptrReadPos);
BattleArea* battleArea = &gBattleAreas[UNPACK_BTL_AREA(gCurrentBattleID)];
DmaTable* dmaEntry = &battleArea->dmaTable[dmaIndex];
@ -319,15 +320,15 @@ ApiStatus LoadBattleDmaData(Evt* script, s32 isInitialCall) {
}
if (gBattleDmaDest == NULL) {
dma_copy(dmaEntry->start, dmaEntry->end, dmaEntry->dest);
} else {
dma_copy(dmaEntry->start, dmaEntry->end, gBattleDmaDest);
dma_copy(dmaEntry->start, dmaEntry->end, dmaEntry->dest);
} else {
dma_copy(dmaEntry->start, dmaEntry->end, gBattleDmaDest);
}
return ApiStatus_DONE2;
}
ApiStatus EnableBattleFloorReflections(Evt* script, s32 isInitialCall) {
API_CALLABLE(EnableBattleFloorReflections) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
@ -342,7 +343,7 @@ ApiStatus EnableBattleFloorReflections(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus SetDarknessMode(Evt* script, s32 isInitialCall) {
API_CALLABLE(SetDarknessMode) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
s32 darknessMode = evt_get_variable(script, *args++);
@ -365,7 +366,7 @@ ApiStatus SetDarknessMode(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus GetDarknessStatus(Evt* script, s32 isInitialCall) {
API_CALLABLE(GetDarknessStatus) {
Bytecode* args = script->ptrReadPos;
s32 out1 = *args++;
s32 out2 = *args++;
@ -373,7 +374,7 @@ ApiStatus GetDarknessStatus(Evt* script, s32 isInitialCall) {
f32 amt;
s32 isLight;
// While loop may not be necessary in the future
//TODO While loop may not be necessary in the future
do { get_screen_overlay_params(SCREEN_LAYER_BACK, &type, &amt); } while (0);
if (amt < 128.0f) {
@ -388,7 +389,7 @@ ApiStatus GetDarknessStatus(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus PlaySoundAtActor(Evt* script, s32 isInitialCall) {
API_CALLABLE(PlaySoundAtActor) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
Bytecode soundID = *args++;
@ -404,7 +405,7 @@ ApiStatus PlaySoundAtActor(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus PlaySoundAtPart(Evt* script, s32 isInitialCall) {
API_CALLABLE(PlaySoundAtPart) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 partID = evt_get_variable(script, *args++);
@ -421,7 +422,7 @@ ApiStatus PlaySoundAtPart(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus PlayLoopingSoundAtActor(Evt* script, s32 isInitialCall) {
API_CALLABLE(PlayLoopingSoundAtActor) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 idx = evt_get_variable(script, *args++);
@ -439,7 +440,7 @@ ApiStatus PlayLoopingSoundAtActor(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus StopLoopingSoundAtActor(Evt* script, s32 isInitialCall) {
API_CALLABLE(StopLoopingSoundAtActor) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 idx = evt_get_variable(script, *args++);
@ -460,7 +461,7 @@ ApiStatus StopLoopingSoundAtActor(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus SetForegroundModelsVisibleUnchecked(Evt* script, s32 isInitialCall) {
API_CALLABLE(SetForegroundModelsVisibleUnchecked) {
if (evt_get_variable(script, *script->ptrReadPos)) {
show_foreground_models_unchecked();
} else {
@ -469,7 +470,7 @@ ApiStatus SetForegroundModelsVisibleUnchecked(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus SetForegroundModelsVisible(Evt* script, s32 isInitialCall) {
API_CALLABLE(SetForegroundModelsVisible) {
if (evt_get_variable(script, *script->ptrReadPos)) {
show_foreground_models();
} else {
@ -478,7 +479,7 @@ ApiStatus SetForegroundModelsVisible(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus MakeIgnoreResStatusField(Evt* script, s32 isInitialCall) {
API_CALLABLE(MakeIgnoreResStatusField) {
Bytecode* args = script->ptrReadPos;
Bytecode outVar = *args++;
Bytecode typeFlag = *args++; // STATUS_FLAG_*
@ -488,7 +489,7 @@ ApiStatus MakeIgnoreResStatusField(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus MakeStatusField(Evt* script, s32 isInitialCall) {
API_CALLABLE(MakeStatusField) {
Bytecode* args = script->ptrReadPos;
s32 outVar = *args++;
s32 typeFlag = *args++; // STATUS_FLAG_*
@ -601,14 +602,14 @@ void load_tattle_flags(s32 actorType) {
battleStatus->tattleFlags[actorType / 8] |= gb;
}
ApiStatus SetEnemiesFled(Evt* script, s32 isInitialCall) {
API_CALLABLE(SetEnemiesFled) {
gCurrentEncounter.battleOutcome = OUTCOME_ENEMY_FLED;
btl_set_state(BATTLE_STATE_END_BATTLE);
return ApiStatus_DONE2;
}
ApiStatus MultiplyByActorScale(Evt* script, s32 isInitialCall) {
API_CALLABLE(MultiplyByActorScale) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID);
@ -616,7 +617,7 @@ ApiStatus MultiplyByActorScale(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus MultiplyVec2ByActorScale(Evt* script, s32 isInitialCall) {
API_CALLABLE(MultiplyVec2ByActorScale) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID);
@ -626,7 +627,7 @@ ApiStatus MultiplyVec2ByActorScale(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus MultiplyVec3ByActorScale(Evt* script, s32 isInitialCall) {
API_CALLABLE(MultiplyVec3ByActorScale) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID);
@ -637,7 +638,7 @@ ApiStatus MultiplyVec3ByActorScale(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus ApplyShrinkFromOwner(Evt* script, s32 isInitialCall) {
API_CALLABLE(ApplyShrinkFromOwner) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID);
s32 amt = evt_get_variable(script, *args);
@ -650,7 +651,7 @@ ApiStatus ApplyShrinkFromOwner(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus StartRumble(Evt* script, s32 isInitialCall) {
API_CALLABLE(StartRumble) {
start_rumble_type(evt_get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2;
}

33
src/battle/190A10.c Normal file
View File

@ -0,0 +1,33 @@
#include "common.h"
extern s32 NpcHitQueryBehindCollider;
extern s32 NpcHitQueryAheadCollider;
s32 func_80262130(f32 inX, f32 inY, f32 inZ, f32 height, f32 radius) {
f32 x = inX;
f32 y = inY;
f32 z = inZ;
f32 hitDepth = height;
s32 ret = FALSE;
s32 combinedFlags = 0;
if (npc_raycast_down_around(0, &x, &y, &z, &hitDepth, 90.0f, radius) && hitDepth <= height) {
s32 colliderAheadFlags = get_collider_flags(NpcHitQueryAheadCollider & 0xFF);
s32 colliderBehindFlags = get_collider_flags(NpcHitQueryBehindCollider & 0xFF);
combinedFlags = colliderAheadFlags & colliderBehindFlags;
if (combinedFlags != (NpcHitQueryAheadCollider & 0xFF)) {
combinedFlags = 0;
}
}
if (combinedFlags == 1) {
ret = TRUE;
}
return ret;
}
s32 func_8026220C(f32 arg0, f32 arg1) {
return (arg1 > 100.0f) ? 28 : 0;
}

File diff suppressed because it is too large Load Diff

View File

@ -289,8 +289,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
}
if (target->transparentStatus == STATUS_KEY_TRANSPARENT
|| targetPart->eventFlags & ACTOR_EVENT_FLAG_800
&& !(battleStatus->curAttackElement & DAMAGE_TYPE_QUAKE)
|| (targetPart->eventFlags & ACTOR_EVENT_FLAG_BURIED && !(battleStatus->curAttackElement & DAMAGE_TYPE_QUAKE))
) {
return HIT_RESULT_MISS;
}
@ -347,10 +346,13 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
}
// begin calulating damage
// ------------------------------------------------------------------------
// damage calculation
gBattleStatus.flags1 &= ~BS_FLAGS1_ATK_BLOCKED;
// determine target defense
defense = get_defense(target, targetPart->defenseTable, battleStatus->curAttackElement);
if (!(battleStatus->curAttackElement & DAMAGE_TYPE_IGNORE_DEFENSE)) {
@ -371,6 +373,8 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
}
}
// apply attacker damage modifiers
damage = battleStatus->curAttackDamage;
switch (actorClass) {
@ -404,6 +408,8 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
target->hpChangeCounter = 0;
damage -= defense;
// apply damage mitigation from defensive badges
isPlayer = actorClass == ACTOR_CLASS_PLAYER;
if (isPlayer) {
if (player_team_is_ability_active(target, ABILITY_FIRE_SHIELD)) {
@ -423,10 +429,15 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
}
}
// apply damage mitigation from blocking
switch (actorClass) {
case ACTOR_CLASS_PLAYER:
// TODO figure out how to better write target->debuff >= STATUS_KEY_POISON
if ((target->debuff == 0 || target->debuff >= STATUS_KEY_POISON) && (target->stoneStatus == 0) && !(battleStatus->curAttackElement & DAMAGE_TYPE_UNBLOCKABLE)) {
if ((target->debuff == 0 || target->debuff >= STATUS_KEY_POISON)
&& (target->stoneStatus == 0)
&& !(battleStatus->curAttackElement & DAMAGE_TYPE_UNBLOCKABLE)
) {
s32 blocked;
if (player_team_is_ability_active(target, ABILITY_BERSERKER)) {
@ -438,7 +449,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
if (blocked) {
damage--;
damage -= player_team_is_ability_active(target, ABILITY_DAMAGE_DODGE);
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_DAMAGE_STARS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
gBattleStatus.flags1 |= BS_FLAGS1_ATK_BLOCKED;
break;
@ -451,7 +462,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
if (target->koStatus == 0 && !(battleStatus->curAttackElement & DAMAGE_TYPE_UNBLOCKABLE)) {
if (check_block_input(BUTTON_A)) {
damage = 0;
sfx_play_sound_at_position(SOUND_0231, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_DAMAGE_STARS, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
gBattleStatus.flags1 |= BS_FLAGS1_ATK_BLOCKED;
break;
@ -487,7 +498,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
target->hpChangeCounter -= damage;
battleStatus->lastAttackDamage = 0;
hitResult = HIT_RESULT_HIT;
if (!(targetPart->flags & ACTOR_PART_FLAG_2000)
if (!(targetPart->flags & ACTOR_PART_FLAG_DAMAGE_IMMUNE)
&& !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE)
) {
if (!(target->flags & ACTOR_FLAG_NO_DMG_APPLY)) {
@ -589,7 +600,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
&& event != EVENT_SPIN_SMASH_DEATH
&& event != EVENT_EXPLODE_TRIGGER
&& !(gBattleStatus.flags1 & BS_FLAGS1_ATK_BLOCKED)
&& !(gBattleStatus.flags2 & BS_FLAGS2_1000000)
&& !(gBattleStatus.flags2 & BS_FLAGS2_IS_FIRST_STRIKE)
&& !(actorClass == ACTOR_PLAYER && is_ability_active(ABILITY_HEALTHY_HEALTHY) && (rand_int(100) < 50)))
{
if (battleStatus->curAttackStatus & STATUS_FLAG_SHRINK && try_inflict_status(target, STATUS_KEY_SHRINK, STATUS_TURN_MOD_SHRINK)) {
@ -715,7 +726,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
if (battleStatus->lastAttackDamage > 0) {
u32 hitSound;
func_80267018(target, 1);
set_actor_flash_mode(target, 1);
if (attacker->actorTypeData1[5] != SOUND_NONE) {
sfx_play_sound_at_position(attacker->actorTypeData1[5], SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
@ -732,7 +743,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
play_hit_sound(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, hitSound);
}
if ((battleStatus->lastAttackDamage < 1 && !statusInflicted2 && !madeElectricContact) || targetPart->flags & ACTOR_PART_FLAG_2000) {
if ((battleStatus->lastAttackDamage < 1 && !statusInflicted2 && !madeElectricContact) || targetPart->flags & ACTOR_PART_FLAG_DAMAGE_IMMUNE) {
sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_DEFAULT, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
@ -857,22 +868,21 @@ s32 dispatch_damage_event_actor(Actor* actor, s32 damageAmount, s32 originalEven
}
if (!stopMotion) {
s32 oldTargetActorID = actor->targetActorID;
s32 savedTargetActorID = actor->targetActorID;
if (func_80263230(actor, actor) != 0) {
show_next_damage_popup(actor->targetData[0].posA.x, actor->targetData[0].posA.y, actor->targetData[0].posA.z, battleStatus->lastAttackDamage, 0);
show_damage_fx(actor, actor->targetData[0].posA.x, actor->targetData[0].posA.y, actor->targetData[0].posA.z, battleStatus->lastAttackDamage);
actor->targetActorID = oldTargetActorID;
} else {
actor->targetActorID = oldTargetActorID;
show_next_damage_popup(actor->targetData[0].truePos.x, actor->targetData[0].truePos.y, actor->targetData[0].truePos.z, battleStatus->lastAttackDamage, 0);
show_damage_fx(actor, actor->targetData[0].truePos.x, actor->targetData[0].truePos.y, actor->targetData[0].truePos.z, battleStatus->lastAttackDamage);
}
actor->targetActorID = savedTargetActorID;
} else {
show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
show_damage_fx(actor, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
}
if (battleStatus->lastAttackDamage > 0) {
func_80267018(actor, 1);
set_actor_flash_mode(actor, 1);
}
actor->flags |= ACTOR_FLAG_HEALTH_BAR_HIDDEN;
dispatch_event_actor(actor, dispatchEvent);
@ -1077,7 +1087,7 @@ ApiStatus JumpToGoal(Evt* script, s32 isInitialCall) {
actorState->speed += (moveDist / actorState->moveTime);
if (script->functionTemp[2] != 0) {
set_animation(actor->actorID, (s8) actor->state.jumpPartIndex, actor->state.animJumpRise);
set_actor_anim(actor->actorID, (s8) actor->state.jumpPartIndex, actor->state.animJumpRise);
}
if (!(script->functionTemp[3] & 2) && (actor->actorTypeData1[4] != 0)) {
sfx_play_sound_at_position(actor->actorTypeData1[4], SOUND_SPACE_DEFAULT, actor->curPos.x, actor->curPos.y, actor->curPos.z);
@ -1092,7 +1102,7 @@ ApiStatus JumpToGoal(Evt* script, s32 isInitialCall) {
actorState->vel -= actorState->acceleration;
if ((script->functionTemp[2] != 0) && (actorState->vel < 0.0f)) {
set_animation(actor->actorID, (s8) actorState->jumpPartIndex, actorState->animJumpFall);
set_actor_anim(actor->actorID, (s8) actorState->jumpPartIndex, actorState->animJumpFall);
}
if (actorState->vel < 0.0f) {
if (actorState->curPos.y < actorState->goalPos.y) {
@ -1117,7 +1127,7 @@ ApiStatus JumpToGoal(Evt* script, s32 isInitialCall) {
actor->curPos.y = actorState->goalPos.y;
actor->curPos.z = actorState->goalPos.z;
if (script->functionTemp[2] != 0) {
set_animation(actor->actorID, (s8) actorState->jumpPartIndex, actorState->animJumpLand);
set_actor_anim(actor->actorID, (s8) actorState->jumpPartIndex, actorState->animJumpLand);
}
return ApiStatus_DONE1;
}
@ -3347,7 +3357,7 @@ ApiStatus EnableActorGlow(Evt* script, s32 isInitialCall) {
}
it = it->nextPart;
}
func_80266EE8(actor, UNK_PAL_EFFECT_0);
set_actor_pal_effect(actor, GLOW_PAL_OFF);
}
return ApiStatus_DONE2;

View File

@ -8,9 +8,9 @@ extern s8 ApplyingBuff;
s32 count_targets(Actor* actor, s32 targetHomeIndex, s32 targetSelectionFlags) {
BattleStatus* battleStatus = &gBattleStatus;
battleStatus->targetHomeIndex = targetHomeIndex;
battleStatus->sampleTargetHomeIndex = targetHomeIndex;
battleStatus->curTargetListFlags = targetSelectionFlags;
player_create_target_list(actor);
create_current_pos_target_list(actor);
return actor->targetListLength;
}
@ -61,7 +61,7 @@ void set_goal_pos_to_part(ActorState* state, s32 actorID, s32 partID) {
part = get_actor_part(actor, partID);
if (!(part->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
state->goalPos.x = actor->curPos.x + (part->partOffset.x + part->targetOffset.x) * actor->scalingFactor;
if (!(actor->flags & ACTOR_PART_FLAG_800)) {
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
state->goalPos.y = actor->curPos.y + (part->partOffset.y + part->targetOffset.y) * actor->scalingFactor;
} else {
state->goalPos.y = actor->curPos.y + (-part->partOffset.y - part->targetOffset.y) * actor->scalingFactor;
@ -69,7 +69,7 @@ void set_goal_pos_to_part(ActorState* state, s32 actorID, s32 partID) {
state->goalPos.z = actor->curPos.z + part->partOffset.z + 10.0f;
} else {
state->goalPos.x = part->absolutePos.x + part->targetOffset.x;
if (!(actor->flags & ACTOR_PART_FLAG_800)) {
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
state->goalPos.y = part->absolutePos.y + part->targetOffset.y * actor->scalingFactor;
} else {
state->goalPos.y = part->absolutePos.y - part->targetOffset.y * actor->scalingFactor;
@ -97,7 +97,7 @@ void set_part_goal_to_actor_part(ActorPartMovement* movement, s32 actorID, s32 p
part = get_actor_part(actor, partID);
if (!(part->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
part->movement->goalPos.x = actor->curPos.x + (part->partOffset.x + part->targetOffset.x) * actor->scalingFactor;
if (!(actor->flags & ACTOR_PART_FLAG_800)) {
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
part->movement->goalPos.y = actor->curPos.y + (part->partOffset.y + part->targetOffset.y) * actor->scalingFactor;
} else {
part->movement->goalPos.y = actor->curPos.y + (-part->partOffset.y - part->targetOffset.y) * actor->scalingFactor;
@ -105,7 +105,7 @@ void set_part_goal_to_actor_part(ActorPartMovement* movement, s32 actorID, s32 p
part->movement->goalPos.z = actor->curPos.z + part->partOffset.z;
} else {
part->movement->goalPos.x = part->absolutePos.x + part->targetOffset.x;
if (!(actor->flags & ACTOR_PART_FLAG_800)) {
if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
part->movement->goalPos.y = part->absolutePos.y + part->targetOffset.y * actor->scalingFactor;
} else {
part->movement->goalPos.y = part->absolutePos.y - part->targetOffset.y * actor->scalingFactor;
@ -245,9 +245,9 @@ ApiStatus SetGoalToIndex(Evt* script, s32 isInitialCall) {
}
actor = get_actor(actorID);
actor->state.goalPos.x = btl_actorHomePositions[index].x;
actor->state.goalPos.y = btl_actorHomePositions[index].y;
actor->state.goalPos.z = btl_actorHomePositions[index].z;
actor->state.goalPos.x = StandardActorHomePositions[index].x;
actor->state.goalPos.y = StandardActorHomePositions[index].y;
actor->state.goalPos.z = StandardActorHomePositions[index].z;
return ApiStatus_DONE2;
}
@ -255,15 +255,17 @@ ApiStatus SetGoalToIndex(Evt* script, s32 isInitialCall) {
ApiStatus GetIndexFromPos(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 a1 = *args++;
s32 outVar = *args++;
Actor* actor;
s32 homeIdx;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
actor = get_actor(actorID);
evt_set_variable(script, a1, get_nearest_home_index(actor->curPos.x, actor->curPos.y, actor->curPos.z));
homeIdx = get_nearest_home_index(actor->curPos.x, actor->curPos.y, actor->curPos.z);
evt_set_variable(script, outVar, homeIdx);
return ApiStatus_DONE2;
}
@ -273,31 +275,36 @@ ApiStatus GetIndexFromHome(Evt* script, s32 isInitialCall) {
s32 actorID = evt_get_variable(script, *args++);
s32 outVar = *args++;
Actor* actor;
s32 homeIdx;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
actor = get_actor(actorID);
evt_set_variable(script, outVar, get_nearest_home_index(actor->homePos.x, actor->homePos.y, actor->homePos.z));
homeIdx = get_nearest_home_index(actor->homePos.x, actor->homePos.y, actor->homePos.z);
evt_set_variable(script, outVar, homeIdx);
return ApiStatus_DONE2;
}
ApiStatus CountPlayerTargets(Evt* script, s32 isInitialCall) {
ApiStatus CountTargets(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 targetSelectionFlags = *args++;
s32 outVar = *args++;
Actor* actor;
s32 homeIdx;
s32 numTargets;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
actor = get_actor(actorID);
evt_set_variable(script, outVar, count_targets(actor, get_nearest_home_index(actor->curPos.x, actor->curPos.y,
actor->curPos.z), targetSelectionFlags));
homeIdx = get_nearest_home_index(actor->curPos.x, actor->curPos.y, actor->curPos.z);
numTargets = count_targets(actor, homeIdx, targetSelectionFlags);
evt_set_variable(script, outVar, numTargets);
return ApiStatus_DONE2;
}
@ -317,12 +324,9 @@ ApiStatus ForceHomePos(Evt* script, s32 isInitialCall) {
z = evt_get_variable(script, *args++);
actor = get_actor(actorID);
actor->homePos.x = x;
actor->curPos.x = x;
actor->homePos.y = y;
actor->curPos.y = y;
actor->homePos.z = z;
actor->curPos.z = z;
actor->curPos.x = actor->homePos.x = x;
actor->curPos.y = actor->homePos.y = y;
actor->curPos.z = actor->homePos.z = z;
return ApiStatus_DONE2;
}
@ -820,7 +824,7 @@ ApiStatus SetAnimation(Evt* script, s32 isInitialCall) {
partID = evt_get_variable(script, *args++);
animID = evt_get_variable(script, *args++);
set_animation(actorID, partID, animID);
set_actor_anim(actorID, partID, animID);
return ApiStatus_DONE2;
}
@ -860,7 +864,7 @@ ApiStatus SetAnimationRate(Evt* script, s32 isInitialCall) {
partID = evt_get_variable(script, *args++);
rate = evt_get_float_variable(script, *args++);
set_animation_rate(actorID, partID, rate);
set_actor_anim_rate(actorID, partID, rate);
return ApiStatus_DONE2;
}
@ -2282,31 +2286,35 @@ ApiStatus SetBattleState(Evt* script, s32 isInitialCall) {
ApiStatus WaitForState(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
BattleStatus* battleStatus = &gBattleStatus;
s32 temp_v0;
s32 waitForState;
if (isInitialCall) {
temp_v0 = evt_get_variable(script, *args++);
if (temp_v0 == 0) {
battleStatus->unk_95 = 0;
waitForState = evt_get_variable(script, *args++);
if (waitForState == BATTLE_STATE_0) {
battleStatus->waitForState = BATTLE_STATE_0;
return ApiStatus_DONE2;
}
battleStatus->unk_95 = temp_v0;
battleStatus->waitForState = waitForState;
}
temp_v0 = battleStatus->unk_95;
if (temp_v0) {
return (gBattleState == temp_v0) * ApiStatus_DONE2;
waitForState = battleStatus->waitForState;
if (waitForState == BATTLE_STATE_0) {
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
if (gBattleState == waitForState) {
return ApiStatus_DONE2;
} else {
return ApiStatus_BLOCK;
}
}
ApiStatus CancelEnemyTurn(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
BattleStatus* battleStatus = &gBattleStatus;
s32 temp_v0 = evt_get_variable(script, *args++);
s32 cancelMode = evt_get_variable(script, *args++);
switch (temp_v0) {
switch (cancelMode) {
case 0:
battleStatus->unk_94 = 1;
break;
@ -2331,22 +2339,22 @@ ApiStatus func_8026E260(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus PlayerCreateTargetList(Evt* script, s32 isInitialCall) {
ApiStatus CreateCurrentPosTargetList(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID);
gBattleStatus.curTargetListFlags = *args;
player_create_target_list(actor);
create_current_pos_target_list(actor);
return ApiStatus_DONE2;
}
ApiStatus EnemyCreateTargetList(Evt* script, s32 isInitialCall) {
ApiStatus CreateHomeTargetList(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID);
gBattleStatus.curTargetListFlags = *args;
enemy_create_target_list(actor);
create_home_target_list(actor);
return ApiStatus_DONE2;
}
@ -2376,14 +2384,14 @@ ApiStatus SetOwnerTarget(Evt* script, s32 isInitialCall) {
ApiStatus ChooseNextTarget(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Actor* actor = get_actor(script->owner1.actorID);
s32 temp_v0 = evt_get_variable(script, *args++);
s32 mode = evt_get_variable(script, *args++);
s32 temp = *args++;
SelectableTarget* target;
s32 temp_v0_3;
s32 phi_v1;
s32 phi_a2;
s32 length;
s32 curIdx;
s32 retVal;
if (temp_v0 == -1) {
if (mode == ITER_FIRST) {
actor->selectedTargetIndex = 0;
target = &actor->targetData[actor->targetIndexList[0]];
actor->targetActorID = target->actorID;
@ -2391,7 +2399,7 @@ ApiStatus ChooseNextTarget(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
if (temp_v0 == 0xA) {
if (mode == ITER_LAST) {
actor->selectedTargetIndex = actor->targetListLength - 1;
target = &actor->targetData[actor->targetIndexList[actor->selectedTargetIndex]];
actor->targetActorID = target->actorID;
@ -2399,31 +2407,31 @@ ApiStatus ChooseNextTarget(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
phi_v1 = actor->selectedTargetIndex;
temp_v0_3 = actor->targetListLength;
phi_a2 = 0;
curIdx = actor->selectedTargetIndex;
length = actor->targetListLength;
retVal = ITER_HAS_MORE;
if (temp_v0 == 0) {
phi_v1++;
if (mode == ITER_NEXT) {
curIdx++;
} else {
phi_v1--;
curIdx--;
}
if (phi_v1 < 0) {
phi_v1 = temp_v0_3 - 1;
phi_a2 = -1;
if (curIdx < 0) {
curIdx = length - 1;
retVal = ITER_NO_MORE;
}
if (phi_v1 >= temp_v0_3) {
phi_v1 = 0;
phi_a2 = -1;
if (curIdx >= length) {
curIdx = 0;
retVal = ITER_NO_MORE;
}
actor->selectedTargetIndex = phi_v1;
actor->selectedTargetIndex = curIdx;
target = &actor->targetData[actor->targetIndexList[actor->selectedTargetIndex]];
actor->targetActorID = target->actorID;
actor->targetPartIndex = target->partID;
evt_set_variable(script, temp, phi_a2);
evt_set_variable(script, temp, retVal);
return ApiStatus_DONE2;
}
@ -2487,7 +2495,7 @@ s32 func_8026E558(Evt* script, s32 isInitialCall) {
for (i = 0; i < actor->targetListLength; i++) {
target = &actor->targetData[actor->targetIndexList[i]];
if (target->homeCol == column && target->layer == layer && target->homeRow < row) {
if (target->column == column && target->layer == layer && target->row < row) {
actor->targetActorID = target->actorID;
actor->targetPartIndex = target->partID;
outVal = 0;
@ -2498,7 +2506,7 @@ s32 func_8026E558(Evt* script, s32 isInitialCall) {
for (i = 0; i < actor->targetListLength; i++) {
target = &actor->targetData[actor->targetIndexList[i]];
if (target->homeCol == column && target->layer == layer && target->homeRow < row) {
if (target->column == column && target->layer == layer && target->row < row) {
actor->targetActorID = target->actorID;
actor->targetPartIndex = target->partID;
outVal = 0;
@ -2509,7 +2517,7 @@ s32 func_8026E558(Evt* script, s32 isInitialCall) {
for (i = 0; i < actor->targetListLength; i++) {
target = &actor->targetData[actor->targetIndexList[i]];
if (target->homeCol == column && target->layer == layer && target->homeRow < row) {
if (target->column == column && target->layer == layer && target->row < row) {
actor->targetActorID = target->actorID;
actor->targetPartIndex = target->partID;
outVal = 0;
@ -2611,19 +2619,19 @@ ApiStatus SetActorPaletteSwapTimes(Evt* script, s32 isInitialCall) {
s32 partID = evt_get_variable(script, *args++);
Actor* actor;
ActorPart* actorPart;
DecorationTable* decorationTable;
DecorationTable* decorations;
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
actor = get_actor(actorID);
actorPart = get_actor_part(actor, partID);
decorationTable = actorPart->decorationTable;
decorations = actorPart->decorationTable;
decorationTable->blendPalA = evt_get_variable(script, *args++);
decorationTable->blendPalB = evt_get_variable(script, *args++);
decorationTable->palswapTimeHoldA = evt_get_variable(script, *args++);
decorationTable->palswapTimeAtoB = evt_get_variable(script, *args++);
decorations->blendPalA = evt_get_variable(script, *args++);
decorations->blendPalB = evt_get_variable(script, *args++);
decorations->palswapTimeHoldA = evt_get_variable(script, *args++);
decorations->palswapTimeAtoB = evt_get_variable(script, *args++);
return ApiStatus_DONE2;
}
@ -2692,7 +2700,7 @@ ApiStatus func_8026EDE4(Evt* script, s32 isInitialCall) {
actor = get_actor(actorID);
actorPart = get_actor_part(actor, partID);
func_80266EA8(actorPart, temp_s3);
set_part_pal_effect(actorPart, temp_s3);
return ApiStatus_DONE2;
}
@ -2738,7 +2746,7 @@ ApiStatus ModifyActorDecoration(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 partID = evt_get_variable(script, *args++);
s32 temp_s4 = evt_get_variable(script, *args++);
s32 idx = evt_get_variable(script, *args++);
ActorPart* actorPart;
DecorationTable* decorationtable;
Actor* actor;
@ -2750,10 +2758,10 @@ ApiStatus ModifyActorDecoration(Evt* script, s32 isInitialCall) {
actorPart = get_actor_part(actor, partID);
decorationtable = actorPart->decorationTable;
decorationtable->unk_8C6[temp_s4].unk00 = evt_get_variable(script, *args++);
decorationtable->unk_8C6[temp_s4].unk02 = evt_get_variable(script, *args++);
decorationtable->unk_8C6[temp_s4].unk04 = evt_get_variable(script, *args++);
decorationtable->unk_8C6[temp_s4].unk06 = evt_get_variable(script, *args++);
decorationtable->decorData[idx].raw[0] = evt_get_variable(script, *args++);
decorationtable->decorData[idx].raw[1] = evt_get_variable(script, *args++);
decorationtable->decorData[idx].raw[2] = evt_get_variable(script, *args++);
decorationtable->decorData[idx].raw[3] = evt_get_variable(script, *args++);
return ApiStatus_DONE2;
}
@ -2761,19 +2769,19 @@ ApiStatus UseIdleAnimation(Evt* script, s32 isInitialCall) {
Actor* actor;
s32* args = script->ptrReadPos;
s32 actorID = evt_get_variable(script, *args++);
s32 temp_s0_3 = evt_get_variable(script, *args++);
s32 useIdle = evt_get_variable(script, *args++);
if (actorID == ACTOR_SELF) {
actorID = script->owner1.actorID;
}
actor = get_actor(actorID);
if (temp_s0_3 == 0) {
actor->flags &= ~ACTOR_FLAG_4000000;
actor->flags &= ~ACTOR_FLAG_8000000;
if (!useIdle) {
actor->flags &= ~ACTOR_FLAG_USING_IDLE_ANIM;
actor->flags &= ~ACTOR_FLAG_SHOW_STATUS_ICONS;
func_80266E40(actor);
} else {
actor->flags |= ACTOR_FLAG_4000000;
actor->flags |= ACTOR_FLAG_USING_IDLE_ANIM;
}
return ApiStatus_DONE2;
@ -2792,7 +2800,7 @@ ApiStatus func_8026F1A0(Evt* script, s32 isInitialCall) {
actor = get_actor(actorID);
if (temp_s0_3 == 0) {
actor->flags &= ~ACTOR_FLAG_8000000;
actor->flags &= ~ACTOR_FLAG_SHOW_STATUS_ICONS;
func_80266E40(actor);
}

File diff suppressed because it is too large Load Diff

213
src/battle/actors.c Normal file
View File

@ -0,0 +1,213 @@
#include "common.h"
#include "battle/battle.h"
#include "sprite/player.h"
PlayerCelebrationAnimOptions bPlayerCelebrations = {
10, 90,
{
50, ANIM_MarioB1_JumpForJoy,
50, ANIM_Mario1_Chuckle,
0, 0,
0, 0,
0, 0,
0, 0,
0, 0,
0, 0,
50, ANIM_Mario1_DustOff,
50, ANIM_Mario1_DustOff,
0, 0,
0, 0,
0, 0,
0, 0,
0, 0,
0, 0,
50, ANIM_Mario1_ThumbsUp,
50, ANIM_Mario1_ThumbsUp,
0, 0,
0, 0,
0, 0,
0, 0,
0, 0,
0, 0,
50, ANIM_MarioB1_FingerWag,
50, ANIM_MarioB1_FingerWag,
0, 0,
0, 0,
0, 0,
0, 0,
0, 0,
0, 0,
80, ANIM_MarioB1_FingerWag,
20, ANIM_MarioB1_JumpForJoy,
0, 0,
0, 0,
0, 0,
0, 0,
0, 0,
0, 0,
}
};
#include "battle/actor_types.inc.c"
u32 bMarioIdleAnims[] = {
STATUS_KEY_NORMAL, ANIM_Mario1_Walk,
STATUS_KEY_DANGER, ANIM_Mario1_TiredIdle,
STATUS_KEY_STONE, ANIM_MarioB3_Petrified,
STATUS_KEY_SLEEP, ANIM_MarioB1_Sleep,
STATUS_KEY_DIZZY, ANIM_MarioB1_Sick,
STATUS_KEY_STOP, ANIM_Mario1_Still,
STATUS_KEY_HUSTLE, ANIM_Mario1_Run,
STATUS_KEY_BERSERK, ANIM_MarioB2_BerserkIdle,
STATUS_KEY_PARALYZE, ANIM_MarioB1_Sleep,
STATUS_KEY_FROZEN, ANIM_Mario1_Frozen,
STATUS_KEY_TRANSPARENT, ANIM_Mario1_Idle,
STATUS_KEY_INACTIVE, ANIM_Mario1_Still,
STATUS_KEY_INACTIVE_BERSERK, ANIM_MarioB2_BerserkStill,
STATUS_KEY_14, ANIM_MarioB2_Inert,
STATUS_KEY_INACTIVE_SLEEP, ANIM_MarioB1_SleepStill,
STATUS_KEY_INACTIVE_DIZZY, ANIM_MarioB1_SickStill,
STATUS_KEY_INACTIVE_WEARY, ANIM_Mario1_TiredStill,
STATUS_KEY_THINKING, ANIM_Mario1_Thinking,
STATUS_KEY_WEARY, ANIM_Mario1_SpinLand,
STATUS_END
};
s32 bMarioDefendAnims[] = {
STATUS_KEY_NORMAL, ANIM_Mario1_Crouch,
STATUS_KEY_DANGER, ANIM_Mario1_TiredIdle,
STATUS_KEY_STONE, ANIM_MarioB3_Petrified,
STATUS_KEY_SLEEP, ANIM_MarioB1_Sleep,
STATUS_KEY_DIZZY, ANIM_MarioB1_Sick,
STATUS_KEY_STOP, ANIM_Mario1_Still,
STATUS_KEY_HUSTLE, ANIM_Mario1_Crouch,
STATUS_KEY_BERSERK, ANIM_Mario1_Crouch,
STATUS_KEY_PARALYZE, ANIM_MarioB1_Sleep,
STATUS_KEY_FROZEN, ANIM_Mario1_Frozen,
STATUS_KEY_TRANSPARENT, ANIM_Mario1_Idle,
STATUS_KEY_INACTIVE, ANIM_Mario1_Still,
STATUS_KEY_INACTIVE_BERSERK, ANIM_MarioB2_BerserkStill,
STATUS_KEY_14, ANIM_MarioB2_Inert,
STATUS_KEY_INACTIVE_SLEEP, ANIM_MarioB1_SleepStill,
STATUS_KEY_INACTIVE_DIZZY, ANIM_MarioB1_SickStill,
STATUS_KEY_INACTIVE_WEARY, ANIM_Mario1_TiredStill,
STATUS_KEY_THINKING, ANIM_Mario1_Thinking,
STATUS_KEY_WEARY, ANIM_Mario1_SpinLand,
STATUS_END
};
s32 bMarioHideAnims[] = {
STATUS_KEY_NORMAL, ANIM_Mario1_Crouch,
STATUS_KEY_DANGER, ANIM_Mario1_TiredIdle,
STATUS_KEY_STONE, ANIM_MarioB3_Petrified,
STATUS_KEY_SLEEP, ANIM_MarioB1_Sleep,
STATUS_KEY_DIZZY, ANIM_MarioB1_Sick,
STATUS_KEY_STOP, ANIM_Mario1_Still,
STATUS_KEY_HUSTLE, ANIM_MarioW2_RideLaki,
STATUS_KEY_BERSERK, ANIM_MarioW2_RideLaki,
STATUS_KEY_PARALYZE, ANIM_MarioB1_Sleep,
STATUS_KEY_FROZEN, ANIM_Mario1_Frozen,
STATUS_KEY_TRANSPARENT, ANIM_Mario1_Idle,
STATUS_KEY_INACTIVE, ANIM_Mario1_Crouch,
STATUS_KEY_INACTIVE_BERSERK, ANIM_MarioB2_BerserkStill,
STATUS_KEY_14, ANIM_MarioB2_Inert,
STATUS_KEY_INACTIVE_SLEEP, ANIM_MarioB1_SleepStill,
STATUS_KEY_INACTIVE_DIZZY, ANIM_MarioB1_SickStill,
STATUS_KEY_INACTIVE_WEARY, ANIM_Mario1_TiredStill,
STATUS_KEY_THINKING, ANIM_Mario1_Thinking,
STATUS_KEY_WEARY, ANIM_Mario1_SpinLand,
STATUS_END
};
s32 bPeachIdleAnims[] = {
STATUS_KEY_NORMAL, ANIM_Peach1_Walk,
STATUS_KEY_INACTIVE, ANIM_Peach2_Inert,
STATUS_END
};
s32 bMarioDefenseTable[] = {
ELEMENT_NORMAL, 0,
ELEMENT_END
};
s32 bPlayerStatusTable[] = {
STATUS_KEY_NORMAL, 100,
STATUS_KEY_DEFAULT, 100,
STATUS_KEY_SLEEP, 100,
STATUS_KEY_POISON, 100,
STATUS_KEY_FROZEN, 100,
STATUS_KEY_DIZZY, 100,
STATUS_KEY_FEAR, 100,
STATUS_KEY_STATIC, 100,
STATUS_KEY_PARALYZE, 100,
STATUS_KEY_SHRINK, 100,
STATUS_KEY_STOP, 100,
STATUS_TURN_MOD_DEFAULT, 0,
STATUS_TURN_MOD_SLEEP, 0,
STATUS_TURN_MOD_POISON, 0,
STATUS_TURN_MOD_FROZEN, 0,
STATUS_TURN_MOD_DIZZY, 0,
STATUS_TURN_MOD_FEAR, 0,
STATUS_TURN_MOD_STATIC, 0,
STATUS_TURN_MOD_PARALYZE, 0,
STATUS_TURN_MOD_SHRINK, 0,
STATUS_TURN_MOD_STOP, 0,
STATUS_END
};
ActorBlueprint bPlayerActorBlueprint = {
.type = ACTOR_TYPE_PLAYER,
.maxHP = 99,
.statusTable = bPlayerStatusTable,
.escapeChance = 0,
.airLiftChance = 0,
.hurricaneChance = 0,
.spookChance = 0,
.upAndAwayChance = 0,
.spinSmashReq = 4,
.powerBounceChance = 80,
.size = { 33, 43 },
.healthBarOffset = { 0, 0 },
.statusIconOffset = { -10, 30 },
.statusTextOffset = { 10, 30 },
};
ActorPartBlueprint bMarioParts[] = {
{
.index = 1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 32 },
.opacity = 255,
.idleAnimations = bMarioIdleAnims,
.defenseTable = bMarioDefenseTable,
},
};
Vec3s StandardActorHomePositions[] = {
[BTL_POS_GROUND_A] { 5, 0, -20 },
[BTL_POS_GROUND_B] { 45, 0, -5 },
[BTL_POS_GROUND_C] { 85, 0, 10 },
[BTL_POS_GROUND_D] { 125, 0, 25 },
[BTL_POS_AIR_A] { 10, 50, -20 },
[BTL_POS_AIR_B] { 50, 45, -5 },
[BTL_POS_AIR_C] { 90, 50, 10 },
[BTL_POS_AIR_D] { 130, 55, 25 },
[BTL_POS_HIGH_A] { 15, 85, -20 },
[BTL_POS_HIGH_B] { 55, 80, -5 },
[BTL_POS_HIGH_C] { 95, 85, 10 },
[BTL_POS_HIGH_D] { 135, 90, 25 },
[BTL_POS_TOP_A] { 15, 125, -20 },
[BTL_POS_TOP_B] { 55, 120, -5 },
[BTL_POS_TOP_C] { 95, 125, 10 },
[BTL_POS_TOP_D] { 135, 130, 25 },
[BTL_POS_CENTER] { 105, 0, 0 },
};
// TODO: what is this, and look into warnings that are silenced via casts
s32* D_8028358C[] = {
(s32*)-1, (s32*)-1, (s32*)-1, (s32*)-1, (s32*)-1, (s32*)-1, (s32*)-1, (s32*)-1,
(s32*)D_8028358C, (s32*)D_8028358C, (s32*)D_8028358C, (s32*)D_8028358C, (s32*)D_8028358C, (s32*)D_8028358C,
(s32*)D_8028358C, (s32*)D_8028358C, 0
};

View File

@ -71,7 +71,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -15, 75 },
@ -137,7 +137,7 @@ EvtScript N(EVS_PlayFootstepQuaking) = {
EVT_END_IF
EVT_GOTO(0)
EVT_LABEL(1)
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5))
EVT_WAIT(1)
EVT_GOTO(0)
@ -303,7 +303,7 @@ EvtScript N(EVS_Attack_SlamFist) = {
EVT_SET(LVar1, 0)
EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0)
EVT_THREAD
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(15.0))
EVT_END_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20EA)
@ -403,7 +403,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_END_THREAD
EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP)
@ -414,7 +414,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0)
@ -478,7 +478,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_END_THREAD
EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP)
@ -489,7 +489,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0)
@ -500,7 +500,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
EVT_WAIT(3)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0)
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_END_IF
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -514,7 +514,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK)
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0)

View File

@ -113,7 +113,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, -10 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET | ACTOR_PART_FLAG_SKIP_MOVEMENT_ALLOC,
.index = PRT_TARGET,
.posOffset = { 0, 54, 0 },
.targetOffset = { 0, -30 },
@ -159,7 +159,7 @@ EvtScript N(EVS_Init) = {
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_TARGET_FLAG_2, TRUE)
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_TARGET_NO_SMASH, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -77,7 +77,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_2000 | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -15, 75 },
@ -150,7 +150,7 @@ EvtScript N(EVS_PlayFootstepQuaking) = {
EVT_END_IF
EVT_GOTO(0)
EVT_LABEL(1)
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5))
EVT_WAIT(1)
EVT_GOTO(0)
@ -429,7 +429,7 @@ EvtScript N(EVS_Attack_SlamFist) = {
EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0)
EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, LVar1, LVar2, 0)
EVT_THREAD
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(15.0))
EVT_END_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20EA)
@ -525,7 +525,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_END_THREAD
EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP)
@ -536,7 +536,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0)
@ -603,7 +603,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_END_THREAD
EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP)
@ -614,7 +614,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0))
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0)
@ -625,7 +625,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
EVT_WAIT(3)
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0)
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_END_IF
EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -639,7 +639,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE)
EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK)
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0)

View File

@ -76,7 +76,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_2000 | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -15, 75 },

View File

@ -14,7 +14,7 @@ API_CALLABLE(N(SetupDemoPlayerMove)) {
battleStatus->moveArgument = gCurrentEncounter.hitTier;
battleStatus->curTargetListFlags = gMoveTable[MOVE_HAMMER1].flags;
player_create_target_list(player);
create_current_pos_target_list(player);
player->selectedTargetIndex = 0;
selectableTarget = &player->targetData[player->targetIndexList[player->selectedTargetIndex]];
player->targetActorID = selectableTarget->actorID;

View File

@ -12,7 +12,7 @@ API_CALLABLE(N(SetupDemoPlayerMove)) {
battleStatus->moveArgument = gCurrentEncounter.hitTier;
battleStatus->curTargetListFlags = gMoveTable[MOVE_POWER_BOUNCE].flags;
player_create_target_list(player);
create_current_pos_target_list(player);
player->selectedTargetIndex = 1;
selectableTarget = &player->targetData[player->targetIndexList[player->selectedTargetIndex]];
player->targetActorID = selectableTarget->actorID;

View File

@ -12,7 +12,7 @@ API_CALLABLE(N(SetupDemoPlayerMove)) {
battleStatus->selectedMoveID = MOVE_SHELL_SHOT;
battleStatus->curTargetListFlags = gMoveTable[MOVE_SHELL_SHOT].flags;
player_create_target_list(partner);
create_current_pos_target_list(partner);
partner->selectedTargetIndex = 0;
selectableTarget = &partner->targetData[partner->targetIndexList[partner->selectedTargetIndex]];
partner->targetActorID = selectableTarget->actorID;

View File

@ -15,9 +15,9 @@ API_CALLABLE(N(SetupDemoPlayerMove)) {
battleStatus->selectedMoveID = 0;
battleStatus->curAttackElement = 0;
playerData->invItems[0] = selectedItemID;
battleStatus->curTargetListFlags = gItemTable[playerData->invItems[0]].targetFlags | TARGET_FLAG_8000;
battleStatus->curTargetListFlags = gItemTable[selectedItemID].targetFlags | TARGET_FLAG_PRIMARY_ONLY;
player_create_target_list(player);
create_current_pos_target_list(player);
player->selectedTargetIndex = 0;
selectableTarget = &player->targetData[player->targetIndexList[player->selectedTargetIndex]];
player->targetActorID = selectableTarget->actorID;

View File

@ -401,7 +401,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_8 | ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_DEFAULT_TARGET | ACTOR_PART_FLAG_IGNORE_BELOW_CHECK | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -10, 40 },
@ -1816,7 +1816,7 @@ EvtScript N(EVS_Move_HurricaneBreath) = {
EVT_END_SWITCH
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STONE)
EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_03, 180)
EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 180)
EVT_CALL(ShowActionHud, TRUE)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_WHIRLWIND)
EVT_CALL(action_command_whirlwind_init, 0)
@ -2980,14 +2980,14 @@ EvtScript N(EVS_Attack_TuffPuffSwarm) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_ELSE
EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_03, 180)
EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 180)
EVT_CALL(ShowActionHud, TRUE)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_STOP_LEECH)
EVT_CALL(action_command_stop_leech_init)
EVT_CALL(SetupMashMeter, 1, 25, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE)
EVT_CALL(action_command_stop_leech_start, 0, 0x7FFF, 3)
EVT_CALL(action_command_stop_leech_start, 0, 32767, 3)
EVT_SET(LVarB, LVarA)
EVT_DIV(LVarB, 2)
EVT_WAIT(LVarB)

View File

@ -70,7 +70,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, -7 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET | ACTOR_PART_FLAG_SKIP_MOVEMENT_ALLOC,
.index = PRT_TARGET,
.posOffset = { 0, 0, -15 },
.targetOffset = { 0, 16 },
@ -149,7 +149,7 @@ s32 N(LeapAnims)[] = {
ActorPartBlueprint N(HoleParts)[] = {
{
.flags = ACTOR_PART_FLAG_2000 | ACTOR_PART_FLAG_NO_TARGET,
.flags = ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_NO_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },

View File

@ -67,7 +67,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -5, 35 },

View File

@ -91,7 +91,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_NO_TARGET,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_IGNORE_BELOW_CHECK | ACTOR_PART_FLAG_NO_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -103,7 +103,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_IGNORE_BELOW_CHECK | ACTOR_PART_FLAG_PRIMARY_TARGET | ACTOR_PART_FLAG_SKIP_MOVEMENT_ALLOC,
.index = PRT_TARGET,
.posOffset = { 0, 50, 0 },
.targetOffset = { 0, -50 },

View File

@ -65,7 +65,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -4, 24 },
@ -191,7 +191,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0)
EVT_CALL(GetBattleFlags2, LVar0)
EVT_IF_FLAG(LVar0, BS_FLAGS2_200)
EVT_IF_FLAG(LVar0, BS_FLAGS2_DOING_JUMP_TUTORIAL)
EVT_CALL(AddGoalPos, ACTOR_SELF, 5, 10, 0)
EVT_END_IF
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.1))
@ -326,7 +326,7 @@ EvtScript N(EVS_ManageTutorial) = {
EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 20, EASING_COS_IN_OUT)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(WaitForState, BATTLE_STATE_0)
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_200, TRUE)
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DOING_JUMP_TUTORIAL, TRUE)
EVT_LOOP(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_NE(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
@ -366,7 +366,7 @@ EvtScript N(EVS_ManageTutorial) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_WAIT(15)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, MSG_HOS_001E, BS_FLAGS2_200, 1, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle)
EVT_CALL(ActorSpeak, MSG_HOS_001E, ACTOR_ENEMY0, 1, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(WaitForState, BATTLE_STATE_0)
@ -494,7 +494,7 @@ EvtScript N(EVS_ManageTutorial) = {
EVT_CALL(ActorSpeak, MSG_HOS_0028, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FirstTurn, FALSE)
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_200, FALSE)
EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DOING_JUMP_TUTORIAL, FALSE)
EVT_LABEL(10)
EVT_CALL(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_JUMP | BTL_MENU_ENABLED_SMASH | BTL_MENU_ENABLED_STRATEGIES)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL)

View File

@ -131,7 +131,7 @@ s32 N(FlyingStatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_GROUND,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 35 },
@ -158,7 +158,7 @@ ActorPartBlueprint N(FlyingParts)[] = {
.projectileTargetOffset = { -5, -12 },
},
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_FLYING,
.posOffset = { 0, 0, 0 },
.targetOffset = { -10, 35 },
@ -272,7 +272,7 @@ EvtScript N(EVS_Idle) = {
EvtScript N(EVS_KnockDownCheck) = {
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING)
EVT_IF_FLAG(LVar0, BS_FLAGS1_200 | BS_FLAGS1_40)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE)
EVT_END_IF
EVT_ELSE
@ -283,7 +283,7 @@ EvtScript N(EVS_KnockDownCheck) = {
EVT_CASE_OR_EQ(MOVE_HEADBONK3)
EVT_CASE_OR_EQ(MOVE_MULTIBONK)
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_FLAG(LVar0, BS_FLAGS1_200 | BS_FLAGS1_40)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE)
EVT_END_IF
EVT_END_CASE_GROUP
@ -314,10 +314,10 @@ EvtScript N(EVS_KnockDown) = {
EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BROOM, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4))
EVT_END_IF
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_MULTI_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -918,7 +918,7 @@ EvtScript N(EVS_Move_HealAll) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01)
EVT_END_IF
EVT_WAIT(5)
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_SET(LFlag0, FALSE)
@ -945,7 +945,7 @@ EvtScript N(EVS_Move_HealAll) = {
EVT_END_THREAD
EVT_END_IF
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_IF_NE(LVar0, ITER_NO_MORE)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(WaitForBuffDone)
@ -1176,7 +1176,7 @@ EvtScript N(EVS_Attack_MagicBlast) = {
};
EvtScript N(EVS_GetAvailableColumn) = {
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
@ -1193,7 +1193,7 @@ EvtScript N(EVS_GetAvailableColumn) = {
EVT_SET(LFlagE, TRUE)
EVT_END_SWITCH
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_IF_NE(LVar0, ITER_NO_MORE)
EVT_GOTO(0)
EVT_END_IF
EVT_SET(LVar0, -1)
@ -1314,7 +1314,7 @@ s32 N(FlyingCloneStatusTable)[] = {
ActorPartBlueprint N(CloneParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_GROUND,
.posOffset = { 0, 0, 0 },
.targetOffset = { 2, 35 },
@ -1329,7 +1329,7 @@ ActorPartBlueprint N(CloneParts)[] = {
ActorPartBlueprint N(FlyingCloneParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_GROUND,
.posOffset = { 0, 0, 0 },
.targetOffset = { -10, 35 },
@ -1399,7 +1399,7 @@ Formation N(FlyingCloneFormation) = {
};
EvtScript N(EVS_Move_MakeClone) = {
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_EXEC_WAIT(N(EVS_Flee))
EVT_RETURN
@ -1453,7 +1453,7 @@ EvtScript N(EVS_Move_MakeClone) = {
EVT_CALL(MoveBattleCamOver, 30)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST4)
EVT_CALL(PlaySoundAtActor, LVar9, SOUND_SPELL_CAST4)
EVT_CALL(SetPartFlagBits, LVar9, 1, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, LVar9, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
EVT_CALL(RandInt, 1000, LVar0)
EVT_IF_LT(LVar0, 500)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0))
@ -1466,7 +1466,7 @@ EvtScript N(EVS_Move_MakeClone) = {
EVT_CALL(SetGoalToIndex, LVar9, LVar0)
EVT_CALL(FlyToGoal, LVar9, 0, 0, EASING_LINEAR)
EVT_END_IF
EVT_CALL(SetPartFlagBits, LVar9, 1, ACTOR_PART_FLAG_MULTI_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, LVar9, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
EVT_CALL(GetActorHP, ACTOR_SELF, LVar0)
EVT_CALL(SetEnemyHP, LVar9, LVar0)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
@ -1498,7 +1498,7 @@ EvtScript N(EVS_Move_MakeClone) = {
EvtScript N(EVS_Move_TryBoostAttack) = {
EVT_SET(LFlag0, FALSE)
EVT_LABEL(10)
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
@ -1516,7 +1516,7 @@ EvtScript N(EVS_Move_TryBoostAttack) = {
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_IF_NE(LVar0, ITER_NO_MORE)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LFlag0, FALSE)
@ -1524,7 +1524,7 @@ EvtScript N(EVS_Move_TryBoostAttack) = {
EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_EXEC_WAIT(N(EVS_Flee))
EVT_RETURN
@ -1611,7 +1611,7 @@ EvtScript N(EVS_Move_TryBoostAttack) = {
EvtScript N(EVS_Move_TryBoostDefense) = {
EVT_SET(LFlag0, FALSE)
EVT_LABEL(10)
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
@ -1629,7 +1629,7 @@ EvtScript N(EVS_Move_TryBoostDefense) = {
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_IF_NE(LVar0, ITER_NO_MORE)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LFlag0, FALSE)
@ -1637,7 +1637,7 @@ EvtScript N(EVS_Move_TryBoostDefense) = {
EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_EXEC_WAIT(N(EVS_Flee))
EVT_RETURN
@ -1724,7 +1724,7 @@ EvtScript N(EVS_Move_TryBoostDefense) = {
EvtScript N(EVS_Move_TryElectrify) = {
EVT_SET(LFlag0, FALSE)
EVT_LABEL(10)
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
@ -1742,7 +1742,7 @@ EvtScript N(EVS_Move_TryElectrify) = {
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_IF_NE(LVar0, ITER_NO_MORE)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LFlag0, FALSE)
@ -1750,7 +1750,7 @@ EvtScript N(EVS_Move_TryElectrify) = {
EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_EXEC_WAIT(N(EVS_Flee))
EVT_RETURN
@ -1842,7 +1842,7 @@ EvtScript N(EVS_Move_TryElectrify) = {
EvtScript N(EVS_Move_TryTransparent) = {
EVT_SET(LFlag0, FALSE)
EVT_LABEL(10)
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerTarget, LVar0, LVar1)
@ -1860,7 +1860,7 @@ EvtScript N(EVS_Move_TryTransparent) = {
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_IF_NE(LVar0, ITER_NO_MORE)
EVT_GOTO(0)
EVT_END_IF
EVT_IF_EQ(LFlag0, FALSE)
@ -1868,7 +1868,7 @@ EvtScript N(EVS_Move_TryTransparent) = {
EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_EXEC_WAIT(N(EVS_Flee))
EVT_RETURN
@ -1971,7 +1971,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_END_IF
// first (dummy) heal check
EVT_SET(LVarA, 0)
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(LBL_LOOP_COUNT_INJURED_1)
EVT_SET(LFlag0, FALSE)
@ -1998,7 +1998,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_IF_NE(LVar0, ITER_NO_MORE)
EVT_GOTO(LBL_LOOP_COUNT_INJURED_1)
EVT_END_IF
EVT_IF_GT(LVarA, 0)
@ -2006,7 +2006,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_END_IF
// second (dummy) heal check
EVT_SET(LVarA, 0)
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(LBL_LOOP_COUNT_INJURED_2)
EVT_SET(LFlag0, FALSE)
@ -2033,7 +2033,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_IF_NE(LVar0, ITER_NO_MORE)
EVT_GOTO(LBL_LOOP_COUNT_INJURED_2)
EVT_END_IF
EVT_IF_GT(LVarA, 0)
@ -2041,7 +2041,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_END_IF
// third (dummy) heal check
EVT_SET(LVarA, 0)
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(LBL_LOOP_COUNT_INJURED_3)
EVT_SET(LFlag0, FALSE)
@ -2068,7 +2068,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_IF_NE(LVar0, ITER_NO_MORE)
EVT_GOTO(LBL_LOOP_COUNT_INJURED_3)
EVT_END_IF
EVT_IF_GT(LVarA, 0)
@ -2077,7 +2077,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_GOTO(LBL_TRY_MOVES)
// try healing spells
EVT_LABEL(LBL_TRY_HEALING)
EVT_CALL(CountPlayerTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_8000, LVar0)
EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_EXEC_WAIT(N(EVS_Flee))
EVT_RETURN
@ -2115,7 +2115,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealOneCount, LVar0)
EVT_IF_LT(LVar0, MAX_HEAL_ONE)
EVT_SETF(LVar9, EVT_FLOAT(100.0))
EVT_CALL(EnemyCreateTargetList, TARGET_FLAG_2 | TARGET_FLAG_8000)
EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(LBL_LOOP_CHOOSE_BEST_HEAL)
EVT_SET(LFlag0, FALSE)
@ -2138,7 +2138,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_END_IF
EVT_END_IF
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_IF_NE(LVar0, ITER_NO_MORE)
EVT_GOTO(LBL_LOOP_CHOOSE_BEST_HEAL)
EVT_END_IF
EVT_CALL(RandInt, 1000, LVar0)

View File

@ -136,7 +136,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_TARGET,
.posOffset = { 0, 0, 0 },
.targetOffset = { -13, 40 },
@ -148,7 +148,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, -16 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_4000 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_TARGET_ONLY | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_CHAIN_1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 12 },
@ -160,7 +160,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_4000 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_TARGET_ONLY | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_CHAIN_2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 12 },
@ -172,7 +172,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_4000 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_TARGET_ONLY | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_CHAIN_3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 12 },
@ -184,7 +184,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_4000 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_TARGET_ONLY | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_CHAIN_4,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 12 },
@ -196,7 +196,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_4000 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_TARGET_ONLY | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_CHAIN_5,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 12 },
@ -208,7 +208,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_4000 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_TARGET_ONLY | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_CHAIN_6,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 12 },
@ -220,7 +220,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_4000 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_TARGET_ONLY | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_CHAIN_7,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 12 },
@ -232,7 +232,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_4000 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_TARGET_ONLY | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_CHAIN_8,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 12 },

View File

@ -150,7 +150,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_TARGET,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 39 },
@ -162,7 +162,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { -5, -15 },
},
{
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_40000000,
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_SKIP_SHOCK_EFFECT,
.index = PRT_SHELL_1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -174,7 +174,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_40000000,
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_SKIP_SHOCK_EFFECT,
.index = PRT_SHELL_2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -186,7 +186,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_40000000,
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_SKIP_SHOCK_EFFECT,
.index = PRT_SHELL_3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -505,7 +505,7 @@ EvtScript N(EVS_TemporaryKnockout) = {
EVT_WAIT(1)
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20E4)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Fall)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0))
@ -736,7 +736,7 @@ EvtScript N(EVS_Attack_DropDebris) = {
EVT_WAIT(8)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Crouch)
EVT_WAIT(5)
EVT_CALL(StartRumble, 10)
EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME)
EVT_CALL(PlaySound, SOUND_20EA)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(4.0))
EVT_WAIT(20)
@ -749,7 +749,7 @@ EvtScript N(EVS_Attack_DropDebris) = {
EVT_WAIT(50)
EVT_CALL(PlaySound, SOUND_20E9)
EVT_WAIT(18)
EVT_CALL(StartRumble, 10)
EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME)
EVT_CALL(PlaySound, SOUND_20EA)
EVT_WAIT(20)
EVT_CALL(PlaySound, SOUND_ILLUSION_DISSOLVE)
@ -995,7 +995,7 @@ EvtScript N(EVS_Move_SummonChomp) = {
EVT_THREAD
// rumble while gate is opening
EVT_LABEL(0)
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5))
EVT_WAIT(1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVar0)
@ -1003,7 +1003,7 @@ EvtScript N(EVS_Move_SummonChomp) = {
EVT_GOTO(0)
EVT_END_IF
EVT_END_THREAD
EVT_CALL(PlaySound, SOUND_026B)
EVT_CALL(PlaySound, SOUND_LARGE_GATE_OPEN)
EVT_LABEL(10)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVarD)
EVT_CALL(TranslateModel, 31, 0, LVarD, 0)
@ -1013,7 +1013,7 @@ EvtScript N(EVS_Move_SummonChomp) = {
EVT_IF_LT(LVarD, 60)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(StopSound, SOUND_026B)
EVT_CALL(StopSound, SOUND_LARGE_GATE_OPEN)
EVT_WAIT(10)
// create the chomp and have him exit the gate
EVT_CALL(SummonEnemy, EVT_PTR(N(SummonedChomp)), FALSE)
@ -1092,7 +1092,7 @@ EvtScript N(EVS_Move_SummonChomp) = {
EVT_THREAD
// rumble while gate is opening
EVT_LABEL(40)
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5))
EVT_WAIT(1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVar0)
@ -1100,7 +1100,7 @@ EvtScript N(EVS_Move_SummonChomp) = {
EVT_GOTO(40)
EVT_END_IF
EVT_END_THREAD
EVT_CALL(PlaySound, SOUND_026B)
EVT_CALL(PlaySound, SOUND_LARGE_GATE_OPEN)
EVT_LABEL(50)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVarD)
EVT_CALL(TranslateModel, 31, 0, LVarD, 0)
@ -1110,8 +1110,8 @@ EvtScript N(EVS_Move_SummonChomp) = {
EVT_IF_GT(LVarD, 0)
EVT_GOTO(50)
EVT_END_IF
EVT_CALL(StopSound, SOUND_026B)
EVT_CALL(PlaySound, SOUND_026C)
EVT_CALL(StopSound, SOUND_LARGE_GATE_OPEN)
EVT_CALL(PlaySound, SOUND_LARGE_GATE_CLOSE)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.5))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasSummoned, TRUE)
EVT_RETURN

View File

@ -109,7 +109,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_TARGET,
.posOffset = { 0, 31, 0 },
.targetOffset = { -14, 20 },
@ -383,7 +383,7 @@ EvtScript N(EVS_Attack_WindBlast) = {
EVT_RETURN
EVT_CASE_DEFAULT
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_13, 90)
EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_REDUCE_DAMAGE, 90)
EVT_CALL(ShowActionHud, TRUE)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_WHIRLWIND)
EVT_CALL(action_command_whirlwind_init, 1)
@ -448,7 +448,7 @@ EvtScript N(EVS_Attack_WindBlast) = {
EVT_END_SWITCH
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_13, 90)
EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_REDUCE_DAMAGE, 90)
EVT_CALL(ShowActionHud, TRUE)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_WHIRLWIND)
EVT_CALL(action_command_whirlwind_init, 1)
@ -931,7 +931,7 @@ EvtScript N(EVS_Attack_GrappleDrop) = {
EVT_CALL(N(StartRumbleWithParams), 180, 20)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail)
EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_12, 90)
EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_BREAK_FREE, 90)
EVT_THREAD
EVT_LOOP(90)
EVT_CALL(SetMessageBoxDuration, 99)

View File

@ -107,7 +107,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { -2, -10 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_80000000,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET | ACTOR_PART_FLAG_SKIP_MOVEMENT_ALLOC,
.index = PRT_OFFSET,
.posOffset = { 0, 40, 0 },
.targetOffset = { 2, -16 },
@ -206,9 +206,9 @@ EvtScript N(EVS_HopOntoCrate) = {
EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 24)
EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -2, -10)
EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_MULTI_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_NO_TARGET, FALSE)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
@ -231,9 +231,9 @@ EvtScript N(EVS_HopToGround) = {
EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 24)
EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -2, -10)
EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_MULTI_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_NO_TARGET, TRUE)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN
@ -290,9 +290,9 @@ EvtScript N(EVS_ClimbOntoCeiling) = {
EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 24)
EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 8)
EVT_CALL(N(SetAbsoluteStatusOffsets), -10, -25, 10, -30)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_MULTI_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_NO_TARGET, TRUE)
EVT_CALL(HPBarToHome, ACTOR_SELF)
EVT_RETURN

View File

@ -70,7 +70,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -10, 35 },
@ -344,7 +344,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_END_LOOP
EVT_CALL(N(DropBlock))
EVT_CHILD_THREAD
EVT_CALL(StartRumble, 5)
EVT_CALL(StartRumble, BTL_RUMBLE_HIT_EXTREME)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0))
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0))
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(6.0))

View File

@ -58,7 +58,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },

View File

@ -49,7 +49,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },

View File

@ -116,7 +116,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_NO_TARGET,
.flags = ACTOR_PART_FLAG_IGNORE_BELOW_CHECK | ACTOR_PART_FLAG_NO_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -25, 15 },
@ -128,7 +128,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_IGNORE_BELOW_CHECK | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_TARGET,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 80 },
@ -495,7 +495,7 @@ EvtScript N(EVS_Attack_GroundStomp) = {
EVT_CALL(MoveBattleCamOver, 30)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Still)
EVT_THREAD
EVT_CALL(StartRumble, 11)
EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MAX)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(4.0))
@ -721,7 +721,7 @@ EvtScript N(EVS_ShakeScreenWhileWalking) = {
EVT_IF_NE(LVar0, ANIM_GoombaKing_Run)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(StartRumble, 1)
EVT_CALL(StartRumble, BTL_RUMBLE_LONG)
EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IncreaseShaking, LVar0)

View File

@ -72,7 +72,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 10 },
@ -179,7 +179,7 @@ EvtScript N(EVS_Init) = {
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_TREE_NUT_1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_TREE_NUT_2, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_CALL(SetPartScale, ACTOR_SELF, PRT_TREE_NUT_3, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_TARGET_FLAG_4, TRUE)
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_TARGET_NO_DAMAGE, TRUE)
EVT_RETURN
EVT_END
};

View File

@ -57,7 +57,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },

View File

@ -49,7 +49,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },

View File

@ -87,7 +87,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -6, 18 },

View File

@ -200,7 +200,7 @@ s32 N(MageStatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_BASE,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 26 },
@ -270,7 +270,7 @@ EvtScript N(EVS_SetupFearReaction) = {
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar2, MOVE_SPOOK)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0263)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 30)
EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 30, EMOTER_POS, LVar0, LVar1, LVar2, 5)
@ -655,9 +655,9 @@ EvtScript N(EVS_Transform_Flying) = {
EVT_CALL(ActorSpeak, MSG_CH8_005E, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_TiredTalk, ANIM_JrTroopa_TiredTalk)
EVT_EXEC_WAIT(N(EVS_TransformFX))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_MULTI_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
EVT_WAIT(10)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2))
@ -685,9 +685,9 @@ EvtScript N(EVS_Transform_Mage) = {
EVT_CALL(MoveBattleCamOver, 120)
EVT_EXEC_WAIT(N(EVS_TransformFX))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_MULTI_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0))
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8))
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)

View File

@ -75,7 +75,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 30 },

View File

@ -111,7 +111,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_BASE,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 28 },
@ -169,7 +169,7 @@ EvtScript N(EVS_SetupFearReaction) = {
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar2, MOVE_SPOOK)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0263)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 30)
EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 30, EMOTER_POS, LVar0, LVar1, LVar2, 5)

View File

@ -90,7 +90,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_GROUND,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 35 },
@ -148,7 +148,7 @@ EvtScript N(EVS_SetupFearReaction) = {
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar2, MOVE_SPOOK)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0263)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 30)
EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 30, EMOTER_POS, LVar0, LVar1, LVar2, 5)

View File

@ -89,7 +89,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_GROUND,
.posOffset = { 0, 0, 0 },
.targetOffset = { -5, 32 },
@ -147,7 +147,7 @@ EvtScript N(EVS_SetupFearReaction) = {
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar2, MOVE_SPOOK)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0263)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 30)
EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 30, EMOTER_POS, LVar0, LVar1, LVar2, 5)

View File

@ -102,7 +102,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, -10 },
},
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_FLYING,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -492,10 +492,10 @@ EvtScript N(EVS_TakeTurn) = {
EvtScript N(EVS_KnockDown) = {
EVT_CALL(HideHealthBar, ACTOR_SELF)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_NO_TARGET)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_MULTI_TARGET)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2)
EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2)

View File

@ -51,7 +51,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },

View File

@ -139,7 +139,7 @@ s32 N(BoostedStatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -27, 108 },
@ -203,7 +203,7 @@ EvtScript N(EVS_Init) = {
EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 150, 0, 0, 0)
EVT_EXEC(N(EVS_AnimateImgFX))
EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 150, 150, 0, 0)
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_A)
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_BOWSER_AURA)
EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn)))
EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle)))
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))

View File

@ -142,7 +142,7 @@ s32 N(BoostedStatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -27, 108 },
@ -251,7 +251,7 @@ EvtScript N(EVS_Init) = {
EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 150, 0, 0, 0)
EVT_EXEC(N(EVS_AnimateImgFX))
EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 150, 150, 0, 0)
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_A)
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_BOWSER_AURA)
EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED, TRUE)
EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 1, ACTOR_DECORATION_RADIAL_STAR_EMITTER)
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BoostedDefense)))

View File

@ -142,7 +142,7 @@ s32 N(BoostedStatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -18, 72 },

View File

@ -114,7 +114,7 @@ s32 N(BoostedStatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -18, 72 },

View File

@ -81,7 +81,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -18, 72 },

View File

@ -58,7 +58,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 16 },
@ -307,7 +307,7 @@ EvtScript N(EVS_MakeExplosionFX) = {
EVT_ADD(LVar2, 2)
EVT_PLAY_EFFECT(EFFECT_BLAST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(3.0), 30, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BULLET_BILL_EXPLODE_A)
EVT_CALL(StartRumble, 11)
EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MAX)
EVT_THREAD
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0))
EVT_END_THREAD

View File

@ -60,7 +60,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -6, 29 },
@ -209,7 +209,7 @@ EvtScript N(EVS_Move_FireBullet) = {
EVT_THREAD
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_CALL(StartRumble, 9)
EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BULLET_BILL_FIRE)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 33)

View File

@ -144,7 +144,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, -8 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_IGNORE_BELOW_CHECK | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_TARGET,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -625,7 +625,7 @@ EvtScript N(EVS_Death) = {
EVT_WAIT(14)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_DEAD)
EVT_EXEC_WAIT(N(EVS_PlayIdleAnimation))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_2000 | ACTOR_PART_FLAG_NO_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_NO_TARGET, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR, TRUE)
EVT_ELSE
EVT_EXEC_WAIT(N(EVS_Hit))

View File

@ -244,7 +244,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, -8 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_8 | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_DEFAULT_TARGET | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_TARGET,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 40 },
@ -723,7 +723,7 @@ EvtScript N(EVS_Scene_KoloradoToTheRescue) = {
EVT_CALL(SetNpcSpeed, NPC_BTL_COMPANION, EVT_FLOAT(8.0))
EVT_CALL(NpcMoveTo, NPC_BTL_COMPANION, -60, 0, 0)
EVT_CALL(SpeakToPlayer, NPC_BTL_COMPANION, ANIM_BattleKolorado_Shout, ANIM_BattleKolorado_ShoutStill, 5, MSG_CH5_0106)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0174)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RUN_AWAY)
EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_BattleKolorado_Run)
EVT_CALL(SetNpcSpeed, NPC_BTL_COMPANION, EVT_FLOAT(6.0))
EVT_CALL(NpcMoveTo, NPC_BTL_COMPANION, -300, 0, 0)
@ -1435,9 +1435,9 @@ EvtScript N(EVS_Death) = {
EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE)
EVT_WAIT(4)
EVT_THREAD
EVT_CALL(PlaySound, SOUND_LRAW_03BC)
EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 119, EVT_FLOAT(0.3))
EVT_CALL(PlaySound, SOUND_LRAW_03BC | SOUND_ID_TRIGGER_CHANGE_SOUND)
EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND)
EVT_END_THREAD
EVT_CALL(N(StartRumbleWithParams), 80, 234)
EVT_CALL(HideHealthBar, ACTOR_SELF)
@ -1533,15 +1533,15 @@ EvtScript N(EVS_Death) = {
EVT_END_THREAD
EVT_WAIT(80)
EVT_THREAD
EVT_CALL(PlaySound, SOUND_LRAW_03BC)
EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 165, EVT_FLOAT(1.2))
EVT_CALL(PlaySound, SOUND_LRAW_03BC | SOUND_ID_TRIGGER_CHANGE_SOUND)
EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND)
EVT_END_THREAD
EVT_CALL(N(StartRumbleWithParams), 80, 300)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp)
EVT_WAIT(20)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_0263)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EMOTE_QUESTION)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 20)
EVT_PLAY_EFFECT(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 20, 315, 30, 0, 0)
@ -1608,8 +1608,8 @@ EvtScript N(EVS_Death) = {
EVT_CALL(SetPartImmunityBits, ACTOR_BUD_1, PRT_TARGET, ELEMENT_FIRE, 1)
EVT_CALL(SetPartImmunityBits, ACTOR_BUD_2, PRT_MAIN, ELEMENT_FIRE, 1)
EVT_CALL(SetPartImmunityBits, ACTOR_BUD_2, PRT_TARGET, ELEMENT_FIRE, 1)
EVT_CALL(SetPartFlagBits, ACTOR_BUD_1, PRT_TARGET, ACTOR_PART_FLAG_2000, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_BUD_2, PRT_TARGET, ACTOR_PART_FLAG_2000, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_BUD_1, PRT_TARGET, ACTOR_PART_FLAG_DAMAGE_IMMUNE, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_BUD_2, PRT_TARGET, ACTOR_PART_FLAG_DAMAGE_IMMUNE, FALSE)
EVT_SET(LVar0, ACTOR_BOSS)
EVT_EXEC_WAIT(N(EVS_Ignite))
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim04)
@ -1705,10 +1705,10 @@ EvtScript N(EVS_Death) = {
EVT_CALL(LoadBattleDmaData, VINE_ANIM_EXTRA_DEATH)
EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE)
EVT_THREAD
EVT_CALL(PlaySound, SOUND_LRAW_03BC)
EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE)
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 100, EVT_FLOAT(0.5))
EVT_CALL(ShakeCam, CAM_BATTLE, 0, 8, EVT_FLOAT(0.2))
EVT_CALL(PlaySound, SOUND_LRAW_03BC | SOUND_ID_TRIGGER_CHANGE_SOUND)
EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND)
EVT_END_THREAD
EVT_CALL(N(StartRumbleWithParams), 80, 216)
EVT_THREAD

View File

@ -69,7 +69,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_20 | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_IGNORE_BELOW_CHECK | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },

View File

@ -62,7 +62,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },

View File

@ -73,7 +73,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 16 },

View File

@ -183,7 +183,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -5, 25 },
@ -461,7 +461,7 @@ EvtScript A(EVS_Lee_LoseDisguise) = {
EVT_CALL(CopyBuffs, ACTOR_SELF, LVarA)
EVT_CALL(GetActorPos, ACTOR_SELF, LVarB, LVarC, LVarD)
EVT_CALL(SetActorPos, LVarA, LVarB, LVarC, LVarD)
EVT_CALL(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_MULTI_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, FALSE)
EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY, FALSE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE)
@ -666,7 +666,7 @@ EvtScript N(EVS_Move_CopyPartner) = {
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetActorPos, LVarA, LVar0, LVar1, LVar2)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
EVT_CALL(SetActorFlagBits, ACTOR_SELF, (ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY), TRUE)
EVT_CALL(GetActorHP, ACTOR_SELF, LVar0)
EVT_CALL(SetEnemyHP, LVarA, LVar0)

View File

@ -51,7 +51,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 22 },

View File

@ -63,7 +63,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, -10 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_TARGET,
.posOffset = { 0, 50, 0 },
.targetOffset = { 0, -26 },

View File

@ -51,7 +51,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 20 },
@ -524,7 +524,7 @@ EvtScript N(EVS_Move_Tattle) = {
EVT_WAIT(12)
// enable the tattle viewport
EVT_CALL(SetCamEnabled, CAM_TATTLE, TRUE)
EVT_CALL(SetCamFlag80, CAM_TATTLE, FALSE)
EVT_CALL(SetCamNoDraw, CAM_TATTLE, FALSE)
EVT_CALL(SetCamPerspective, CAM_TATTLE, CAM_UPDATE_MODE_6, 25, 16, 1024)
EVT_CALL(SetCamViewport, CAM_TATTLE, 37, 95, 138, 99)
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
@ -537,7 +537,7 @@ EvtScript N(EVS_Move_Tattle) = {
EVT_CALL(func_802CABE8, CAM_TATTLE, 0, LVar3, 100, 4)
EVT_WAIT(2)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TATTLE_WINDOW_OPEN)
EVT_CALL(SetCamFlag80, CAM_TATTLE, TRUE)
EVT_CALL(SetCamNoDraw, CAM_TATTLE, TRUE)
EVT_WAIT(10)
EVT_CALL(ActorSpeak, MSG_EnemyTattle_Mario, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle)
EVT_CALL(N(CloseTattleWindow), LVar5)

View File

@ -69,7 +69,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -2, 32 },

View File

@ -56,7 +56,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -3, 33 },

View File

@ -63,7 +63,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, -16 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_TARGET,
.posOffset = { 0, 50, 0 },
.targetOffset = { -3, -18 },

View File

@ -51,7 +51,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },

View File

@ -64,7 +64,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, -8 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_TARGET,
.posOffset = { 0, 50, 0 },
.targetOffset = { -1, -30 },
@ -416,7 +416,7 @@ EvtScript N(EVS_TakeTurn) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle)
EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, PAL_ADJUST_WATT_IDLE)
EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_IDLE)
EVT_CALL(AddBattleCamZoom, 75)
EVT_CALL(MoveBattleCamOver, 5)
EVT_THREAD

View File

@ -72,7 +72,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -5, 28 },
@ -366,7 +366,7 @@ EvtScript N(EVS_HandleEvent) = {
EVT_RETURN
EVT_END_IF
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_FLAG(LVar0, BS_FLAGS1_200 | BS_FLAGS1_40)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0)
EVT_IF_GT(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WasHit, TRUE)

View File

@ -87,7 +87,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -5, 28 },
@ -593,7 +593,7 @@ EvtScript N(EVS_HandleEvent) = {
EVT_RETURN
EVT_END_IF
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_FLAG(LVar0, BS_FLAGS1_200 | BS_FLAGS1_40)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0)
EVT_IF_GT(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WasHit, TRUE)

View File

@ -94,7 +94,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { -5, 28 },
@ -992,7 +992,7 @@ EvtScript N(EVS_HandleEvent) = {
EVT_RETURN
EVT_END_IF
EVT_CALL(GetBattleFlags, LVar0)
EVT_IF_FLAG(LVar0, BS_FLAGS1_200 | BS_FLAGS1_40)
EVT_IF_FLAG(LVar0, BS_FLAGS1_40 | BS_FLAGS1_200)
EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0)
EVT_IF_GT(LVar0, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WasHit, TRUE)

View File

@ -117,7 +117,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 60 },
@ -153,7 +153,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_DUMMY_COIN_1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -165,7 +165,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_DUMMY_COIN_2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -177,7 +177,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_DUMMY_COIN_3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -189,7 +189,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_DUMMY_COIN_4,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -201,7 +201,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_DUMMY_COIN_5,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -213,7 +213,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_DUMMY_COIN_6,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -585,9 +585,9 @@ EvtScript N(EVS_TakeTurn) = {
EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(NormalDefense)))
EVT_CALL(SetEnemyTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 60)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_NO_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLIPPED, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_4)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_4)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLIPPED, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_NO_SHADOW)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET | ACTOR_PART_FLAG_NO_SHADOW)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims)))
EVT_CALL(N(SetAbsoluteStatusOffsets), -26, 38, 2, 63)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE)
@ -1066,9 +1066,9 @@ EvtScript N(EVS_FlipOver) = {
EVT_WAIT(1)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim1E)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_NO_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_MULTI_TARGET, TRUE)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLIPPED, ACTOR_PART_FLAG_4)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_4)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLIPPED, ACTOR_PART_FLAG_NO_SHADOW)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_NO_SHADOW)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, 1)
EVT_WAIT(8)
EVT_RETURN

View File

@ -69,7 +69,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_20000000,
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_PRIMARY_TARGET | ACTOR_PART_FLAG_NO_STATUS_ANIMS,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 30 },
@ -81,7 +81,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { -1, -10 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_20000000,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_NO_STATUS_ANIMS,
.index = PRT_BOMB,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },

View File

@ -63,7 +63,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 35 },
@ -77,7 +77,7 @@ ActorPartBlueprint N(ActorParts)[] = {
};
ActorBlueprint NAMESPACE = {
.flags = ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_80 | ACTOR_FLAG_NO_HEALTH_BAR,
.flags = ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_TATTLE | ACTOR_FLAG_NO_HEALTH_BAR,
.type = ACTOR_TYPE_LIGHT_BULB,
.level = ACTOR_LEVEL_LIGHT_BULB,
.maxHP = 8,

View File

@ -119,7 +119,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_2,
.posOffset = { 0, 30, 0 },
.targetOffset = { 0, 50 },
@ -189,7 +189,7 @@ EvtScript N(EVS_Init) = {
EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_Idle))
EVT_CALL(EnableModel, MODEL_shy, FALSE)
EVT_CALL(SetAnimatedModelRootPosition, 0, 200, 0, 0)
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_3, ACTOR_PART_TARGET_FLAG_1, TRUE)
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_3, ACTOR_PART_TARGET_NO_JUMP, TRUE)
EVT_CALL(GetModelCenter, MODEL_kyu3)
EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), LVar5, 0)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_BulbGlowEffect, LVar5)
@ -743,7 +743,7 @@ EvtScript N(EVS_BeginWave_Tank) = {
EVT_CALL(ActorSpeak, MSG_CH4_0071, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim00, ANIM_GeneralGuy_Anim00)
EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05)
EVT_CALL(EndActorSpeech, ACTOR_GENERAL, PRT_MAIN, -1, -1)
EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_20000000, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_NO_STATUS_ANIMS, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_BULB, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_TANK, PRT_2, ACTOR_PART_FLAG_NO_TARGET, FALSE)
EVT_CALL(SetActorFlagBits, ACTOR_TANK, ACTOR_FLAG_NO_HEALTH_BAR, FALSE)

View File

@ -119,7 +119,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -131,7 +131,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_01,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -143,7 +143,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_02,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -155,7 +155,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_03,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -167,7 +167,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_04,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -179,7 +179,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_05,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -191,7 +191,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_06,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -203,7 +203,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_07,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -215,7 +215,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_08,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -227,7 +227,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_09,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -239,7 +239,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_10,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -251,7 +251,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_11,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -263,7 +263,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_12,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -275,7 +275,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_13,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -287,7 +287,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_14,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -299,7 +299,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_15,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -979,7 +979,7 @@ EvtScript N(EVS_ReduceCrowdSize) = {
EVT_ADD(LVar0, LVar1)
EVT_IF_NE(LVar0, NUM_MEMBERS + 1)
EVT_THREAD
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_20000000, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_NO_STATUS_ANIMS, TRUE)
EVT_CALL(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3)
EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HIT_OFFSET_X, LVar7)
EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HIT_OFFSET_Z, LVar8)
@ -1236,7 +1236,7 @@ EvtScript N(EVS_Attack_Swarm) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0)
EVT_SUB(LVarE, LVar0)
EVT_SET(LVarD, LVarE)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_03AD)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_FIGHTING)
EVT_LOOP(LVarD)
EVT_IF_GT(LVarE, 1)
EVT_SET(LVar0, BS_FLAGS1_40)
@ -1262,7 +1262,7 @@ EvtScript N(EVS_Attack_Swarm) = {
EVT_END_IF
EVT_WAIT(10)
EVT_END_LOOP
EVT_CALL(StopSound, SOUND_LRAW_03AD)
EVT_CALL(StopSound, SOUND_LRAW_FIGHTING)
EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT)
EVT_CALL(MoveBattleCamOver, 30)
EVT_WAIT(20)
@ -1367,9 +1367,9 @@ EvtScript N(EVS_Flee) = {
EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE)
EVT_WAIT(40)
EVT_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0173)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RUN_AWAY_BUILDUP)
EVT_WAIT(20)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_0174)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RUN_AWAY)
EVT_END_THREAD
EVT_SET(LVar0, PRT_MEMBER_01)
EVT_SET(LVar1, ANIM_ShySquadGuy_Anim08)

View File

@ -162,7 +162,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { -1, -5 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_TARGET,
.posOffset = { 0, 74, 0 },
.targetOffset = { 0, -8 },
@ -174,7 +174,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { -1, -3 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2000 | ACTOR_PART_FLAG_NO_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_NO_TARGET,
.index = PRT_4,
.posOffset = { -2, 0, 0 },
.targetOffset = { 0, 24 },
@ -186,7 +186,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { -1, 5 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_20000000,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_NO_STATUS_ANIMS,
.index = PRT_UNFOLD_1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -198,7 +198,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_20000000,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_NO_STATUS_ANIMS,
.index = PRT_UNFOLD_2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -210,7 +210,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_20000000,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_NO_STATUS_ANIMS,
.index = PRT_UNFOLD_3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -222,7 +222,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_20000000,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION | ACTOR_PART_FLAG_NO_STATUS_ANIMS,
.index = PRT_UNFOLD_4,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -264,7 +264,7 @@ EvtScript N(EVS_Init) = {
EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent)))
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasFallen, FALSE)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, FALSE)
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_4, ACTOR_PART_TARGET_FLAG_1, TRUE)
EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_4, ACTOR_PART_TARGET_NO_JUMP, TRUE)
EVT_CALL(SetPartSize, ACTOR_SELF, PRT_GUY, 24, 30)
EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE)
@ -435,7 +435,7 @@ EvtScript N(EVS_Init) = {
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_UNFOLD_1, ANIM_StiltGuyUnfold_Anim05)
EVT_CALL(EnableActorPaletteEffects, ACTOR_SELF, PRT_UNFOLD_1, TRUE)
EVT_CALL(SetActorPaletteSwapParams, ACTOR_SELF, PRT_UNFOLD_1, SPR_PAL_StiltGuyUnfold_Alt, SPR_PAL_StiltGuyUnfold, 0, 36, 0, 255, 0, 0)
EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_UNFOLD_1, PAL_ADJUST_BLEND_PALSETS)
EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_UNFOLD_1, ACTOR_PAL_ADJUST_BLEND_PALSETS)
EVT_WAIT(18)
EVT_CALL(EnableActorPaletteEffects, ACTOR_SELF, PRT_UNFOLD_1, FALSE)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_UNFOLD_1, ANIM_StiltGuyUnfold_Anim04)
@ -766,9 +766,9 @@ EvtScript N(EVS_Attack_Leap) = {
EvtScript N(EVS_FallDown) = {
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasFallen, TRUE)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_GUY, ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_MULTI_TARGET)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_NO_TARGET)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_4, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_NO_TARGET)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_GUY, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_4, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET)
EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim0C)
EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3)
@ -790,7 +790,7 @@ EvtScript N(EVS_FallDown) = {
EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_STILTS, 0, 0, LVar0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_STILTS, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_NO_TARGET)
EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_STILTS, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET)
EVT_END_THREAD
EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_STILTS, SOUND_FALL_QUICK)
EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5))
@ -856,7 +856,7 @@ EvtScript N(EVS_ShyGuy_SpinSmash) = {
EVT_EXEC_GET_TID(N(EVS_ShyGuy_SpinAround), LVarE)
EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVarA)
EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1)
EVT_CALL(PlayerCreateTargetList, TARGET_FLAG_4 | TARGET_FLAG_10000)
EVT_CALL(CreateCurrentPosTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_ALLOW_TARGET_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerID, LVar1)
@ -868,7 +868,7 @@ EvtScript N(EVS_ShyGuy_SpinSmash) = {
EVT_LABEL(1)
EVT_ADD(LVarF, 1)
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_IF_EQ(LVar0, -1)
EVT_IF_EQ(LVar0, ITER_NO_MORE)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(GetOwnerTarget, LVar0, LVar9)

View File

@ -118,7 +118,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_STACK_1,
.posOffset = { 0, 0, 0 },
.targetOffset = { -2, 67 },
@ -166,7 +166,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, -8 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_ROCK_1,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -178,7 +178,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_ROCK_2,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -190,7 +190,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_ROCK_3,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -202,7 +202,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_ROCK_4,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -214,7 +214,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_KNOCKOFF,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 0 },
@ -922,7 +922,7 @@ EvtScript N(EVS_SpinSmashHit_Top) = {
EVT_EXEC_GET_TID(N(EVS_SpinAround), LVarE)
EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVarA)
EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1)
EVT_CALL(PlayerCreateTargetList, TARGET_FLAG_4 | TARGET_FLAG_10000)
EVT_CALL(CreateCurrentPosTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_ALLOW_TARGET_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerID, LVar1)
@ -934,7 +934,7 @@ EvtScript N(EVS_SpinSmashHit_Top) = {
EVT_LABEL(1)
EVT_ADD(LVarF, 1)
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_IF_EQ(LVar0, -1)
EVT_IF_EQ(LVar0, ITER_NO_MORE)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(GetOwnerTarget, LVar0, LVar9)
@ -1010,10 +1010,10 @@ EvtScript N(fall_apart) = {
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_ShyStackGuy_Anim15)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Attack, ANIM_ShyStackGuy_Anim1C)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ThreeStackAnims)))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_1, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_1, ACTOR_PART_FLAG_NO_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_NO_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_MULTI_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
EVT_CALL(SetActorSize, ACTOR_SELF, 62, EVT_IGNORE_ARG)
EVT_CALL(SetActorStatusOffsets, ACTOR_SELF, 0, -20, 0, -20)
EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 57, 30)
@ -1026,10 +1026,10 @@ EvtScript N(fall_apart) = {
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_ShyStackGuy_Anim16)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Attack, ANIM_ShyStackGuy_Anim1D)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(TwoStackAnims)))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_NO_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_NO_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_MULTI_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
EVT_CALL(SetActorSize, ACTOR_SELF, 44, EVT_IGNORE_ARG)
EVT_CALL(SetActorStatusOffsets, ACTOR_SELF, 0, -40, 0, -40)
EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 39, 30)
@ -1042,10 +1042,10 @@ EvtScript N(fall_apart) = {
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_ShyStackGuy_Anim17)
EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Attack, ANIM_ShyStackGuy_Anim1E)
EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(OneStackAnims)))
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_MULTI_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_NO_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_4, ACTOR_PART_FLAG_NO_TARGET, FALSE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_4, ACTOR_PART_FLAG_MULTI_TARGET, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_4, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE)
EVT_CALL(SetActorSize, ACTOR_SELF, 26, EVT_IGNORE_ARG)
EVT_CALL(SetActorStatusOffsets, ACTOR_SELF, 0, -60, 0, -60)
EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 21, 30)
@ -1115,7 +1115,7 @@ EvtScript N(EVS_SpinSmashHit_Stack) = {
EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1)
EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1)
EVT_EXEC_WAIT(N(lower_actor_pos))
EVT_CALL(PlayerCreateTargetList, TARGET_FLAG_4 | TARGET_FLAG_8000 | TARGET_FLAG_10000)
EVT_CALL(CreateCurrentPosTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY | TARGET_FLAG_ALLOW_TARGET_ONLY)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)
EVT_CALL(GetOwnerID, LVar1)
@ -1128,7 +1128,7 @@ EvtScript N(EVS_SpinSmashHit_Stack) = {
EVT_ADD(LVarF, 1)
EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0)
EVT_CALL(N(PrintDebugValue), EVT_PTR("T"), LVar0)
EVT_IF_EQ(LVar0, -1)
EVT_IF_EQ(LVar0, ITER_NO_MORE)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(GetOwnerTarget, LVar0, LVar9)

View File

@ -48,7 +48,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_MULTI_TARGET | ACTOR_PART_FLAG_20000000,
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_PRIMARY_TARGET | ACTOR_PART_FLAG_NO_STATUS_ANIMS,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },

View File

@ -103,7 +103,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_4 | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -115,7 +115,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_01,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -127,7 +127,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_02,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -139,7 +139,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_03,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -151,7 +151,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_04,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -163,7 +163,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_05,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -175,7 +175,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_06,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -187,7 +187,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_07,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -199,7 +199,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_08,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -211,7 +211,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_09,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -223,7 +223,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_10,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -235,7 +235,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_11,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -247,7 +247,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_12,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -259,7 +259,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_13,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -271,7 +271,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_14,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -283,7 +283,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { 0, 0 },
},
{
.flags = ACTOR_PART_FLAG_2 | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.flags = ACTOR_PART_FLAG_NO_DECORATIONS | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION,
.index = PRT_MEMBER_15,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },
@ -885,7 +885,7 @@ EvtScript N(EVS_ReduceCrowdSize) = {
EVT_ADD(LVar0, LVar1)
EVT_IF_NE(LVar0, NUM_MEMBERS + 1)
EVT_THREAD
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_20000000, TRUE)
EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_NO_STATUS_ANIMS, TRUE)
EVT_CALL(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3)
EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HIT_OFFSET_X, LVar7)
EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HIT_OFFSET_Z, LVar8)

View File

@ -66,7 +66,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 24 },

View File

@ -81,7 +81,7 @@ s32 N(StatusTable)[] = {
ActorPartBlueprint N(ActorParts)[] = {
{
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_MULTI_TARGET,
.flags = ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
.posOffset = { 0, 0, 0 },
.targetOffset = { 0, 54 },
@ -93,7 +93,7 @@ ActorPartBlueprint N(ActorParts)[] = {
.projectileTargetOffset = { -5, -10 },
},
{
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_2000,
.flags = ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_DAMAGE_IMMUNE,
.index = PRT_2,
.posOffset = { -40, 0, 0 },
.targetOffset = { 0, 0 },

Some files were not shown because too many files have changed in this diff Show More