mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
effect organization (#745)
* isk + warning patrol * minor reorg * effect data union * structs sorted and dummy structs added * effect data cleanup + some end funcs * two more PAL_PTR* Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
parent
b04187c149
commit
ba183f35b5
@ -17,7 +17,11 @@ typedef void NoArgCallback(void*);
|
|||||||
|
|
||||||
#define MSG_PTR u8*
|
#define MSG_PTR u8*
|
||||||
#define IMG_PTR u8*
|
#define IMG_PTR u8*
|
||||||
#define PAL_PTR u16*
|
#define PAL_PTR u16*
|
||||||
|
|
||||||
|
#define MSG_BIN u8
|
||||||
|
#define IMG_BIN u8
|
||||||
|
#define PAL_BIN u16
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 r, g, b, a;
|
u8 r, g, b, a;
|
||||||
@ -197,7 +201,7 @@ typedef struct Npc {
|
|||||||
/* 0x0AC */ u8 alpha;
|
/* 0x0AC */ u8 alpha;
|
||||||
/* 0x0AD */ u8 alpha2; ///< Multiplied with Npc::alpha
|
/* 0x0AD */ u8 alpha2; ///< Multiplied with Npc::alpha
|
||||||
/* 0x0AE */ char unk_AE[2];
|
/* 0x0AE */ char unk_AE[2];
|
||||||
/* 0x0B0 */ s32** extraAnimList;
|
/* 0x0B0 */ u32** extraAnimList;
|
||||||
/* 0x0B4 */ s8 palSwapType; // 0..4 inclusive
|
/* 0x0B4 */ s8 palSwapType; // 0..4 inclusive
|
||||||
/* 0x0B5 */ s8 palSwapPrevType;
|
/* 0x0B5 */ s8 palSwapPrevType;
|
||||||
/* 0x0B6 */ s8 dirtyPalettes;
|
/* 0x0B6 */ s8 dirtyPalettes;
|
||||||
@ -208,7 +212,7 @@ typedef struct Npc {
|
|||||||
/* 0x0C0 */ s8 unk_C0;
|
/* 0x0C0 */ s8 unk_C0;
|
||||||
/* 0x0C1 */ s8 paletteCount;
|
/* 0x0C1 */ s8 paletteCount;
|
||||||
/* 0x0C2 */ char unk_C2[2];
|
/* 0x0C2 */ char unk_C2[2];
|
||||||
/* 0x0C4 */ s32* spritePaletteList;
|
/* 0x0C4 */ PAL_PTR* spritePaletteList;
|
||||||
/* 0x0C8 */ Palette16 localPaletteData[16];
|
/* 0x0C8 */ Palette16 localPaletteData[16];
|
||||||
/* 0x2C8 */ Palette16* localPalettes[16];
|
/* 0x2C8 */ Palette16* localPalettes[16];
|
||||||
/* 0x308 */ s16 unk_308;
|
/* 0x308 */ s16 unk_308;
|
||||||
@ -461,6 +465,33 @@ typedef struct EntityBlueprint {
|
|||||||
/* 0x21 */ u8 aabbSize[3];
|
/* 0x21 */ u8 aabbSize[3];
|
||||||
} EntityBlueprint; // size = 0x24
|
} EntityBlueprint; // size = 0x24
|
||||||
|
|
||||||
|
typedef union {
|
||||||
|
s32* any;
|
||||||
|
struct SaveBlockData* saveBlock;
|
||||||
|
struct SwitchData* swtch;
|
||||||
|
struct ShatteringBlockData* shatteringBlock;
|
||||||
|
struct BlockData* block;
|
||||||
|
struct WoodenCrateData* crate;
|
||||||
|
struct ChestData* chest;
|
||||||
|
struct BlueWarpPipeData* bluePipe;
|
||||||
|
struct HeartBlockContentData* heartBlockContent;
|
||||||
|
struct SuperBlockContentData* superBlockContent;
|
||||||
|
struct SimpleSpringData* simpleSpring;
|
||||||
|
struct HiddenPanelData* hiddenPanel;
|
||||||
|
struct SignpostData* signPost;
|
||||||
|
struct PadlockData* padlock;
|
||||||
|
struct BoardedFloorData* boardedFloor;
|
||||||
|
struct BombableRockData* bombableRock;
|
||||||
|
struct TweesterData* tweester;
|
||||||
|
struct StarBoxLauncherData* starBoxLauncher;
|
||||||
|
struct CymbalPlantData* cymbalPlant;
|
||||||
|
struct PinkFlowerData* pinkFlower;
|
||||||
|
struct SpinningFlowerData* spinningFlower;
|
||||||
|
struct TrumpetPlantData* trumpetPlant;
|
||||||
|
struct MunchlesiaData* munchlesia;
|
||||||
|
struct ArrowSignData* arrowSign;
|
||||||
|
} EntityData;
|
||||||
|
|
||||||
typedef struct Entity {
|
typedef struct Entity {
|
||||||
/* 0x00 */ s32 flags;
|
/* 0x00 */ s32 flags;
|
||||||
/* 0x04 */ u8 listIndex;
|
/* 0x04 */ u8 listIndex;
|
||||||
@ -483,32 +514,7 @@ typedef struct Entity {
|
|||||||
/* 0x2C */ s32* savedReadPos[3];
|
/* 0x2C */ s32* savedReadPos[3];
|
||||||
/* 0x38 */ EntityBlueprint* blueprint;
|
/* 0x38 */ EntityBlueprint* blueprint;
|
||||||
/* 0x3C */ void (*renderSetupFunc)(s32);
|
/* 0x3C */ void (*renderSetupFunc)(s32);
|
||||||
/* 0x40 */ union {
|
/* 0x40 */ EntityData dataBuf;
|
||||||
s32* any;
|
|
||||||
struct SaveBlockData* saveBlock;
|
|
||||||
struct SwitchData* swtch;
|
|
||||||
struct ShatteringBlockData* shatteringBlock;
|
|
||||||
struct BlockData* block;
|
|
||||||
struct WoodenCrateData* crate;
|
|
||||||
struct ChestData* chest;
|
|
||||||
struct BlueWarpPipeData* bluePipe;
|
|
||||||
struct HeartBlockContentData* heartBlockContent;
|
|
||||||
struct SuperBlockContentData* superBlockContent;
|
|
||||||
struct SimpleSpringData* simpleSpring;
|
|
||||||
struct HiddenPanelData* hiddenPanel;
|
|
||||||
struct SignpostData* signPost;
|
|
||||||
struct PadlockData* padlock;
|
|
||||||
struct BoardedFloorData* boardedFloor;
|
|
||||||
struct BombableRockData* bombableRock;
|
|
||||||
struct TweesterData* tweester;
|
|
||||||
struct StarBoxLauncherData* starBoxLauncher;
|
|
||||||
struct CymbalPlantData* cymbalPlant;
|
|
||||||
struct PinkFlowerData* pinkFlower;
|
|
||||||
struct SpinningFlowerData* spinningFlower;
|
|
||||||
struct TrumpetPlantData* trumpetPlant;
|
|
||||||
struct MunchlesiaData* munchlesia;
|
|
||||||
struct ArrowSignData* arrowSign;
|
|
||||||
} dataBuf;
|
|
||||||
/* 0x44 */ void* gfxBaseAddr;
|
/* 0x44 */ void* gfxBaseAddr;
|
||||||
/* 0x48 */ Vec3f position;
|
/* 0x48 */ Vec3f position;
|
||||||
/* 0x54 */ Vec3f scale;
|
/* 0x54 */ Vec3f scale;
|
||||||
@ -1104,8 +1110,8 @@ typedef struct ItemEntity {
|
|||||||
/* 0x40 */ s32* sparkleReadPos;
|
/* 0x40 */ s32* sparkleReadPos;
|
||||||
/* 0x44 */ s32 sparkleUnk44;
|
/* 0x44 */ s32 sparkleUnk44;
|
||||||
/* 0x48 */ s32* sparkleSavedPos;
|
/* 0x48 */ s32* sparkleSavedPos;
|
||||||
/* 0x4C */ s8* sparkleRaster;
|
/* 0x4C */ IMG_PTR sparkleRaster;
|
||||||
/* 0x50 */ s8* sparklePalette;
|
/* 0x50 */ PAL_PTR sparklePalette;
|
||||||
/* 0x54 */ s32 sparkleWidth;
|
/* 0x54 */ s32 sparkleWidth;
|
||||||
/* 0x58 */ s32 sparkleHeight;
|
/* 0x58 */ s32 sparkleHeight;
|
||||||
} ItemEntity; // size = 0x5C
|
} ItemEntity; // size = 0x5C
|
||||||
@ -1196,10 +1202,10 @@ typedef struct MessagePrintState {
|
|||||||
/* 0x53C */ u8 maxLinesPerPage;
|
/* 0x53C */ u8 maxLinesPerPage;
|
||||||
/* 0x53D */ char unk_53D[0x3];
|
/* 0x53D */ char unk_53D[0x3];
|
||||||
/* 0x540 */ f32 sizeScale;
|
/* 0x540 */ f32 sizeScale;
|
||||||
/* 0x544 */ s32* letterBackgroundImg;
|
/* 0x544 */ IMG_PTR letterBackgroundImg;
|
||||||
/* 0x548 */ s32* letterBackgroundPal;
|
/* 0x548 */ PAL_PTR letterBackgroundPal;
|
||||||
/* 0x54C */ s32* letterContentImg;
|
/* 0x54C */ IMG_PTR letterContentImg;
|
||||||
/* 0x550 */ s32* letterContentPal;
|
/* 0x550 */ PAL_PTR letterContentPal;
|
||||||
/* 0x554 */ char unk_554[0x4];
|
/* 0x554 */ char unk_554[0x4];
|
||||||
} MessagePrintState; // size = 0x558
|
} MessagePrintState; // size = 0x558
|
||||||
|
|
||||||
@ -1235,7 +1241,7 @@ typedef struct MessageDrawState {
|
|||||||
} MessageDrawState; // size = 0x54
|
} MessageDrawState; // size = 0x54
|
||||||
|
|
||||||
typedef struct MessageCharData {
|
typedef struct MessageCharData {
|
||||||
/* 0x0 */ s8* raster;
|
/* 0x0 */ IMG_PTR raster;
|
||||||
/* 0x4 */ u8* charWidthTable;
|
/* 0x4 */ u8* charWidthTable;
|
||||||
/* 0x8 */ u8 monospaceWidth;
|
/* 0x8 */ u8 monospaceWidth;
|
||||||
/* 0x9 */ u8 baseHeightOffset;
|
/* 0x9 */ u8 baseHeightOffset;
|
||||||
@ -1260,8 +1266,8 @@ typedef struct MesasgeFontGlyphData {
|
|||||||
} MesasgeFontGlyphData; // size = 0xC
|
} MesasgeFontGlyphData; // size = 0xC
|
||||||
|
|
||||||
typedef struct MessageImageData {
|
typedef struct MessageImageData {
|
||||||
/* 0x00 */ s32* raster;
|
/* 0x00 */ IMG_PTR raster;
|
||||||
/* 0x04 */ s32* palette;
|
/* 0x04 */ PAL_PTR palette;
|
||||||
/* 0x08 */ u16 width;
|
/* 0x08 */ u16 width;
|
||||||
/* 0x0A */ u16 height;
|
/* 0x0A */ u16 height;
|
||||||
/* 0x0C */ s32 format;
|
/* 0x0C */ s32 format;
|
||||||
@ -1269,7 +1275,7 @@ typedef struct MessageImageData {
|
|||||||
} MessageImageData; // size = 0x14
|
} MessageImageData; // size = 0x14
|
||||||
|
|
||||||
typedef struct MessageNumber {
|
typedef struct MessageNumber {
|
||||||
/* 0x00 */ s32* rasters;
|
/* 0x00 */ IMG_PTR rasters;
|
||||||
/* 0x04 */ s8 texSize;
|
/* 0x04 */ s8 texSize;
|
||||||
/* 0x05 */ u8 texWidth;
|
/* 0x05 */ u8 texWidth;
|
||||||
/* 0x06 */ u8 texHeight;
|
/* 0x06 */ u8 texHeight;
|
||||||
@ -1603,8 +1609,8 @@ typedef struct DecorationTable {
|
|||||||
/* 0x6CC */ s8 unk_6CC;
|
/* 0x6CC */ s8 unk_6CC;
|
||||||
/* 0x6CD */ s8 numPalettes;
|
/* 0x6CD */ s8 numPalettes;
|
||||||
/* 0x6CE */ char unk_6CE[2];
|
/* 0x6CE */ char unk_6CE[2];
|
||||||
/* 0x6D0 */ u16** palettes;
|
/* 0x6D0 */ PAL_PTR* palettes;
|
||||||
/* 0x6D4 */ s16* unk_6D4[27];
|
/* 0x6D4 */ PAL_PTR unk_6D4[27];
|
||||||
/* 0x740 */ s16 unk_740;
|
/* 0x740 */ s16 unk_740;
|
||||||
/* 0x742 */ s16 unk_742;
|
/* 0x742 */ s16 unk_742;
|
||||||
/* 0x744 */ s16 unk_744;
|
/* 0x744 */ s16 unk_744;
|
||||||
@ -1623,7 +1629,7 @@ typedef struct DecorationTable {
|
|||||||
/* 0x767 */ s8 unk_767;
|
/* 0x767 */ s8 unk_767;
|
||||||
/* 0x768 */ u8 unk_768;
|
/* 0x768 */ u8 unk_768;
|
||||||
/* 0x769 */ char unk_769[3];
|
/* 0x769 */ char unk_769[3];
|
||||||
/* 0x76C */ s16* unk_76C[16];
|
/* 0x76C */ PAL_PTR unk_76C[16];
|
||||||
/* 0x78C */ char unk_7AC[0x2C];
|
/* 0x78C */ char unk_7AC[0x2C];
|
||||||
/* 0x7D8 */ s8 unk_7D8;
|
/* 0x7D8 */ s8 unk_7D8;
|
||||||
/* 0x7D9 */ s8 unk_7D9;
|
/* 0x7D9 */ s8 unk_7D9;
|
||||||
@ -1643,7 +1649,7 @@ typedef struct DecorationTable {
|
|||||||
/* 0x8B0 */ struct EffectInstance* unk_8B0[2];
|
/* 0x8B0 */ struct EffectInstance* unk_8B0[2];
|
||||||
/* 0x8B8 */ s8 decorationType[2];
|
/* 0x8B8 */ s8 decorationType[2];
|
||||||
/* 0x8BA */ u8 unk_8BA[2];
|
/* 0x8BA */ u8 unk_8BA[2];
|
||||||
/* 0x8BC */ u8 unk_8BC[2];
|
/* 0x8BC */ s8 unk_8BC[2];
|
||||||
/* 0x8C0 */ s16 unk_8C0[4];
|
/* 0x8C0 */ s16 unk_8C0[4];
|
||||||
/* 0x8C6 */ DecorationUnk unk_8C6[2];
|
/* 0x8C6 */ DecorationUnk unk_8C6[2];
|
||||||
} DecorationTable; // size = 0x8E8
|
} DecorationTable; // size = 0x8E8
|
||||||
@ -1845,8 +1851,8 @@ typedef struct Actor {
|
|||||||
} Actor; // size = 0x444
|
} Actor; // size = 0x444
|
||||||
|
|
||||||
typedef struct BackgroundHeader {
|
typedef struct BackgroundHeader {
|
||||||
/* 0x00 */ void* raster;
|
/* 0x00 */ IMG_PTR raster;
|
||||||
/* 0x04 */ void* palette;
|
/* 0x04 */ PAL_PTR palette;
|
||||||
/* 0x08 */ u16 startX;
|
/* 0x08 */ u16 startX;
|
||||||
/* 0x0A */ u16 startY;
|
/* 0x0A */ u16 startY;
|
||||||
/* 0x0C */ u16 width;
|
/* 0x0C */ u16 width;
|
||||||
@ -2149,8 +2155,8 @@ typedef struct PartnerActionStatus {
|
|||||||
} PartnerActionStatus; // size = 0x360
|
} PartnerActionStatus; // size = 0x360
|
||||||
|
|
||||||
typedef struct SpriteRasterInfo {
|
typedef struct SpriteRasterInfo {
|
||||||
/* 0x00 */ void* raster;
|
/* 0x00 */ IMG_PTR raster;
|
||||||
/* 0x04 */ void* defaultPal;
|
/* 0x04 */ PAL_PTR defaultPal;
|
||||||
/* 0x08 */ s32 width;
|
/* 0x08 */ s32 width;
|
||||||
/* 0x0C */ s32 height;
|
/* 0x0C */ s32 height;
|
||||||
} SpriteRasterInfo; // size = 0x10
|
} SpriteRasterInfo; // size = 0x10
|
||||||
@ -2292,28 +2298,6 @@ typedef struct SpriteShadingProfile {
|
|||||||
/* 0xAF */ s8 ambientPower; // ?
|
/* 0xAF */ s8 ambientPower; // ?
|
||||||
} SpriteShadingProfile; // size = 0xB0
|
} SpriteShadingProfile; // size = 0xB0
|
||||||
|
|
||||||
typedef struct WattEffectData {
|
|
||||||
/* 0x00 */ s32 flags;
|
|
||||||
/* 0x04 */ s32 unk_04;
|
|
||||||
/* 0x08 */ s32 angle;
|
|
||||||
/* 0x0C */ s32 unk_0C;
|
|
||||||
/* 0x10 */ s32 unk_10;
|
|
||||||
/* 0x14 */ struct EffectInstance* effect1;
|
|
||||||
/* 0x18 */ struct EffectInstance* effect2;
|
|
||||||
/* 0x1C */ s32 debuff;
|
|
||||||
} WattEffectData;
|
|
||||||
|
|
||||||
typedef struct UnkStruct1 {
|
|
||||||
/* 0x00 */ char unk_00[8];
|
|
||||||
/* 0x08 */ f32 unk_08;
|
|
||||||
} UnkStruct1;
|
|
||||||
|
|
||||||
typedef struct UnkStruct0 {
|
|
||||||
/* 0x00 */ s32 flags;
|
|
||||||
/* 0x04 */ char unk_04[8];
|
|
||||||
/* 0x0C */ UnkStruct1* unk_0C;
|
|
||||||
} UnkStruct0;
|
|
||||||
|
|
||||||
typedef struct FoldImageRecPart {
|
typedef struct FoldImageRecPart {
|
||||||
/* 0x00 */ IMG_PTR raster;
|
/* 0x00 */ IMG_PTR raster;
|
||||||
/* 0x04 */ PAL_PTR palette;
|
/* 0x04 */ PAL_PTR palette;
|
||||||
@ -2322,12 +2306,13 @@ typedef struct FoldImageRecPart {
|
|||||||
/* 0x0C */ s16 xOffset;
|
/* 0x0C */ s16 xOffset;
|
||||||
/* 0x0E */ s16 yOffset;
|
/* 0x0E */ s16 yOffset;
|
||||||
/* 0x10 */ u8 opacity; // alpha?
|
/* 0x10 */ u8 opacity; // alpha?
|
||||||
/* 0x11 */ char unk_11[0x7];
|
/* 0x11 */ char unk_11[3];
|
||||||
|
/* 0x14 */ Gfx* dlist;
|
||||||
} FoldImageRecPart; // size = 0x18
|
} FoldImageRecPart; // size = 0x18
|
||||||
|
|
||||||
typedef struct FoldImageRec {
|
typedef struct FoldImageRec {
|
||||||
/* 0x00 */ s8* raster;
|
/* 0x00 */ IMG_PTR raster;
|
||||||
/* 0x04 */ s8* palette;
|
/* 0x04 */ PAL_PTR palette;
|
||||||
/* 0x08 */ u16 width;
|
/* 0x08 */ u16 width;
|
||||||
/* 0x0A */ u16 height;
|
/* 0x0A */ u16 height;
|
||||||
/* 0x0C */ s16 xOffset;
|
/* 0x0C */ s16 xOffset;
|
||||||
|
1124
include/effects.h
1124
include/effects.h
File diff suppressed because it is too large
Load Diff
@ -1416,6 +1416,7 @@ enum EncounterOutcomes {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum DecorationIDs {
|
enum DecorationIDs {
|
||||||
|
DECORATION_0 = 0x00000000,
|
||||||
DECORATION_GOLDEN_FLAMES = 0x00000001,
|
DECORATION_GOLDEN_FLAMES = 0x00000001,
|
||||||
DECORATION_SWEAT = 0x00000002,
|
DECORATION_SWEAT = 0x00000002,
|
||||||
DECORATION_SEEING_STARS = 0x00000003,
|
DECORATION_SEEING_STARS = 0x00000003,
|
||||||
@ -1424,6 +1425,8 @@ enum DecorationIDs {
|
|||||||
DECORATION_FIRE_SMOKE_TRAIL = 0x00000006,
|
DECORATION_FIRE_SMOKE_TRAIL = 0x00000006,
|
||||||
DECORATION_WHIRLWIND = 0x00000007,
|
DECORATION_WHIRLWIND = 0x00000007,
|
||||||
DECORATION_STEAM_EMITTER = 0x00000008,
|
DECORATION_STEAM_EMITTER = 0x00000008,
|
||||||
|
DECORATION_9 = 0x00000009,
|
||||||
|
DECORATION_A = 0x0000000A,
|
||||||
DECORATION_RADIAL_STAR_EMITTER = 0x0000000B,
|
DECORATION_RADIAL_STAR_EMITTER = 0x0000000B,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1569,7 +1572,7 @@ enum Events {
|
|||||||
EVENT_RECOVER_STATUS = 0x00000031,
|
EVENT_RECOVER_STATUS = 0x00000031,
|
||||||
EVENT_32 = 0x00000032,
|
EVENT_32 = 0x00000032,
|
||||||
EVENT_33 = 0x00000033,
|
EVENT_33 = 0x00000033,
|
||||||
EVENT_34 = 0x00000034,
|
EVENT_RECOVER_PARTNER = 0x00000034,
|
||||||
EVENT_END_FIRST_STRIKE = 0x00000035,
|
EVENT_END_FIRST_STRIKE = 0x00000035,
|
||||||
EVENT_LUCKY = 0x00000037,
|
EVENT_LUCKY = 0x00000037,
|
||||||
EVENT_BEGIN_FIRST_STRIKE = 0x00000038,
|
EVENT_BEGIN_FIRST_STRIKE = 0x00000038,
|
||||||
@ -3780,6 +3783,13 @@ typedef enum FoldType {
|
|||||||
FOLD_TYPE_8 = 0x8,
|
FOLD_TYPE_8 = 0x8,
|
||||||
FOLD_TYPE_9 = 0x9,
|
FOLD_TYPE_9 = 0x9,
|
||||||
FOLD_TYPE_A = 0xA,
|
FOLD_TYPE_A = 0xA,
|
||||||
|
FOLD_TYPE_B = 0xB,
|
||||||
|
FOLD_TYPE_C = 0xC,
|
||||||
|
FOLD_TYPE_D = 0xD,
|
||||||
|
FOLD_TYPE_E = 0xE,
|
||||||
|
FOLD_TYPE_F = 0xF,
|
||||||
|
FOLD_TYPE_10 = 0x10,
|
||||||
|
FOLD_TYPE_11 = 0x11,
|
||||||
} FoldType;
|
} FoldType;
|
||||||
|
|
||||||
enum MoveType {
|
enum MoveType {
|
||||||
|
@ -89,7 +89,7 @@ void load_mesh_animator_tree(s32 index, StaticAnimatorNode** tree);
|
|||||||
|
|
||||||
void setup_pause_menu_tab(MenuWindowBP* bpArray, s32 arraySize);
|
void setup_pause_menu_tab(MenuWindowBP* bpArray, s32 arraySize);
|
||||||
|
|
||||||
s32 draw_ci_image_with_clipping(s32* raster, s32 width, s32 height, s32 fmt, s32 bitDepth, s32* palette, s16 posX,
|
s32 draw_ci_image_with_clipping(IMG_PTR raster, s32 width, s32 height, s32 fmt, s32 bitDepth, PAL_PTR palette, s16 posX,
|
||||||
s16 posY, u16 clipULx, u16 clipULy, u16 clipLRx, u16 clipRLy, u8 opacity);
|
s16 posY, u16 clipULx, u16 clipULy, u16 clipLRx, u16 clipRLy, u8 opacity);
|
||||||
|
|
||||||
void render_frame(s32 flag);
|
void render_frame(s32 flag);
|
||||||
|
@ -75,7 +75,8 @@
|
|||||||
#define TAU 6.28318f
|
#define TAU 6.28318f
|
||||||
#define PI_S 3.14159f // Shorter PI
|
#define PI_S 3.14159f // Shorter PI
|
||||||
|
|
||||||
#define SPRITE_WORLD_SCALE 0.71428573f
|
#define SPRITE_WORLD_SCALE (5.0f/7.0f)
|
||||||
|
#define SPRITE_WORLD_SCALE_D (5.0/7.0)
|
||||||
|
|
||||||
#define BATTLE_ENTITY_ID_MASK 0x800
|
#define BATTLE_ENTITY_ID_MASK 0x800
|
||||||
|
|
||||||
|
@ -81,10 +81,10 @@ typedef struct ModelTreeInfo {
|
|||||||
typedef struct TextureHandle {
|
typedef struct TextureHandle {
|
||||||
/* 0x00 */ Gfx* gfx;
|
/* 0x00 */ Gfx* gfx;
|
||||||
/* 0x04 */ TextureHeader header;
|
/* 0x04 */ TextureHeader header;
|
||||||
/* 0x34 */ s32* raster;
|
/* 0x34 */ IMG_PTR raster;
|
||||||
/* 0x38 */ s32* palette;
|
/* 0x38 */ PAL_PTR palette;
|
||||||
/* 0x3C */ s32* auxRaster;
|
/* 0x3C */ IMG_PTR auxRaster;
|
||||||
/* 0x40 */ s32* auxPalette;
|
/* 0x40 */ PAL_PTR auxPalette;
|
||||||
} TextureHandle; // size = 0x44
|
} TextureHandle; // size = 0x44
|
||||||
|
|
||||||
typedef struct ModelBlueprint {
|
typedef struct ModelBlueprint {
|
||||||
|
@ -359,11 +359,11 @@ void init_npc_list(void);
|
|||||||
/// Presumably did something once upon a time but got commented out.
|
/// Presumably did something once upon a time but got commented out.
|
||||||
void npc_iter_no_op(void);
|
void npc_iter_no_op(void);
|
||||||
|
|
||||||
s32 _create_npc(NpcBlueprint* blueprint, s32** animList, s32 skipLoadingAnims);
|
s32 _create_npc(NpcBlueprint* blueprint, u32** animList, s32 skipLoadingAnims);
|
||||||
|
|
||||||
s32 _create_npc_basic(NpcBlueprint* blueprint);
|
s32 _create_npc_basic(NpcBlueprint* blueprint);
|
||||||
|
|
||||||
s32 _create_npc_standard(NpcBlueprint* blueprint, s32** animList);
|
s32 _create_npc_standard(NpcBlueprint* blueprint, u32** animList);
|
||||||
|
|
||||||
void _create_npc_partner(NpcBlueprint* blueprint);
|
void _create_npc_partner(NpcBlueprint* blueprint);
|
||||||
|
|
||||||
|
36
src/16F740.c
36
src/16F740.c
@ -424,11 +424,11 @@ void btl_state_update_begin_player_turn(void) {
|
|||||||
player->koDuration = debuffDuration;
|
player->koDuration = debuffDuration;
|
||||||
if ((s8) debuffDuration > 0) {
|
if ((s8) debuffDuration > 0) {
|
||||||
player->koStatus = 0xD;
|
player->koStatus = 0xD;
|
||||||
((DisableXFXData*)player->debuffEffect->data)->unk_3C = player->koDuration;
|
player->debuffEffect->data.disableX->unk_3C = player->koDuration;
|
||||||
} else if (koDuration != (s8) debuffDuration) {
|
} else if (koDuration != (s8) debuffDuration) {
|
||||||
player->koStatus = 0;
|
player->koStatus = 0;
|
||||||
player->koDuration = 0;
|
player->koDuration = 0;
|
||||||
((DisableXFXData*)player->debuffEffect->data)->unk_3C = 0;
|
player->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -606,15 +606,11 @@ void btl_state_update_begin_partner_turn(void) {
|
|||||||
D_8029F254 = 1;
|
D_8029F254 = 1;
|
||||||
D_8029F258 = 20;
|
D_8029F258 = 20;
|
||||||
if (partner->koDuration > 0) {
|
if (partner->koDuration > 0) {
|
||||||
// TODO: We believe these are DebuffFXData*,
|
partner->debuffEffect->data.disableX->unk_3C = partner->koDuration;
|
||||||
// but unk_3C is a u8 for these and we need it to be an s32...
|
|
||||||
((s32*)(partner->debuffEffect->data))[15] = partner->koDuration;
|
|
||||||
} else {
|
} else {
|
||||||
partner->koStatus = 0;
|
partner->koStatus = 0;
|
||||||
dispatch_event_partner(EVENT_34);
|
dispatch_event_partner(EVENT_RECOVER_PARTNER);
|
||||||
// TODO: We believe these are DebuffFXData*,
|
partner->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
// but unk_3C is a u8 for these and we need it to be an s32...
|
|
||||||
((s32*)(partner->debuffEffect->data))[15] = 0;
|
|
||||||
gBattleStatus.flags2 |= BS_FLAGS2_8;
|
gBattleStatus.flags2 |= BS_FLAGS2_8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -814,7 +810,7 @@ void btl_state_update_victory(void) {
|
|||||||
|
|
||||||
gBattleStatus.flags1 &= ~BS_FLAGS1_8;
|
gBattleStatus.flags1 &= ~BS_FLAGS1_8;
|
||||||
if (player->koStatus == STATUS_DAZE) {
|
if (player->koStatus == STATUS_DAZE) {
|
||||||
dispatch_event_player(EVENT_34);
|
dispatch_event_player(EVENT_RECOVER_PARTNER);
|
||||||
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
|
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
|
||||||
}
|
}
|
||||||
player->debuff = 0;
|
player->debuff = 0;
|
||||||
@ -823,11 +819,11 @@ void btl_state_update_victory(void) {
|
|||||||
player->transStatus = 0;
|
player->transStatus = 0;
|
||||||
player->koStatus = 0;
|
player->koStatus = 0;
|
||||||
player->koDuration = 0;
|
player->koDuration = 0;
|
||||||
((DisableXFXData*)player->debuffEffect->data)->unk_3C = 0;
|
player->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
|
|
||||||
if (partner != NULL) {
|
if (partner != NULL) {
|
||||||
if (partner->koStatus == STATUS_DAZE) {
|
if (partner->koStatus == STATUS_DAZE) {
|
||||||
dispatch_event_partner(EVENT_34);
|
dispatch_event_partner(EVENT_RECOVER_PARTNER);
|
||||||
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
|
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
|
||||||
}
|
}
|
||||||
partner->debuff = 0;
|
partner->debuff = 0;
|
||||||
@ -836,7 +832,7 @@ void btl_state_update_victory(void) {
|
|||||||
partner->transStatus = 0;
|
partner->transStatus = 0;
|
||||||
partner->koStatus = 0;
|
partner->koStatus = 0;
|
||||||
partner->koDuration = 0;
|
partner->koDuration = 0;
|
||||||
((DisableXFXData*)partner->debuffEffect->data)->unk_3C = 0;
|
partner->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BATTLE_STATE2_PLAYER_DEFEATED:
|
case BATTLE_STATE2_PLAYER_DEFEATED:
|
||||||
@ -984,7 +980,7 @@ void btl_state_update_end_training_battle(void) {
|
|||||||
gBattleStatus.flags2 &= ~BS_FLAGS2_10;
|
gBattleStatus.flags2 &= ~BS_FLAGS2_10;
|
||||||
|
|
||||||
if (player->koStatus == STATUS_DAZE) {
|
if (player->koStatus == STATUS_DAZE) {
|
||||||
dispatch_event_player(EVENT_34);
|
dispatch_event_player(EVENT_RECOVER_PARTNER);
|
||||||
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
|
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
|
||||||
}
|
}
|
||||||
player->debuff = 0;
|
player->debuff = 0;
|
||||||
@ -993,10 +989,10 @@ void btl_state_update_end_training_battle(void) {
|
|||||||
player->transStatus = 0;
|
player->transStatus = 0;
|
||||||
player->koStatus = 0;
|
player->koStatus = 0;
|
||||||
player->koDuration = 0;
|
player->koDuration = 0;
|
||||||
((DisableXFXData*)player->debuffEffect->data)->unk_3C = 0;
|
player->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
if (partner != NULL) {
|
if (partner != NULL) {
|
||||||
if (partner->koStatus == STATUS_DAZE) {
|
if (partner->koStatus == STATUS_DAZE) {
|
||||||
dispatch_event_partner(EVENT_34);
|
dispatch_event_partner(EVENT_RECOVER_PARTNER);
|
||||||
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
|
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
|
||||||
}
|
}
|
||||||
partner->debuff = 0;
|
partner->debuff = 0;
|
||||||
@ -1005,7 +1001,7 @@ void btl_state_update_end_training_battle(void) {
|
|||||||
partner->transStatus = 0;
|
partner->transStatus = 0;
|
||||||
partner->koStatus = 0;
|
partner->koStatus = 0;
|
||||||
partner->koDuration = 0;
|
partner->koDuration = 0;
|
||||||
((DisableXFXData*)partner->debuffEffect->data)->unk_3C = 0;
|
partner->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BATTLE_STATE2_PLAYER_DEFEATED:
|
case BATTLE_STATE2_PLAYER_DEFEATED:
|
||||||
@ -1274,7 +1270,7 @@ void btl_state_update_run_away(void) {
|
|||||||
player->state.varTable[0] = 100;
|
player->state.varTable[0] = 100;
|
||||||
}
|
}
|
||||||
battleStatus->battlePhase = 3;
|
battleStatus->battlePhase = 3;
|
||||||
script = start_script(PlayerScriptDispatcher, EVT_PRIORITY_A, 0);
|
script = start_script(&PlayerScriptDispatcher, EVT_PRIORITY_A, 0);
|
||||||
player->takeTurnScript = script;
|
player->takeTurnScript = script;
|
||||||
player->takeTurnID = script->id;
|
player->takeTurnID = script->id;
|
||||||
script->owner1.actorID = ACTOR_PLAYER;
|
script->owner1.actorID = ACTOR_PLAYER;
|
||||||
@ -1353,7 +1349,7 @@ void btl_state_update_run_away(void) {
|
|||||||
switch (gBattleState2) {
|
switch (gBattleState2) {
|
||||||
case BATTLE_STATE2_UNK_3:
|
case BATTLE_STATE2_UNK_3:
|
||||||
battleStatus->battlePhase = 7;
|
battleStatus->battlePhase = 7;
|
||||||
script = start_script(PlayerScriptDispatcher, EVT_PRIORITY_A, 0);
|
script = start_script(&PlayerScriptDispatcher, EVT_PRIORITY_A, 0);
|
||||||
player->takeTurnScript = script;
|
player->takeTurnScript = script;
|
||||||
player->takeTurnID = script->id;
|
player->takeTurnID = script->id;
|
||||||
script->owner1.actorID = ACTOR_PLAYER;
|
script->owner1.actorID = ACTOR_PLAYER;
|
||||||
@ -1410,7 +1406,7 @@ void btl_state_update_defeat(void) {
|
|||||||
remove_status_debuff(player->hudElementDataIndex);
|
remove_status_debuff(player->hudElementDataIndex);
|
||||||
player->koStatus = 0;
|
player->koStatus = 0;
|
||||||
player->koDuration = 0;
|
player->koDuration = 0;
|
||||||
((DisableXFXData*)player->debuffEffect->data)->unk_3C = 0;
|
player->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
btl_cam_use_preset(BTL_CAM_PRESET_25);
|
btl_cam_use_preset(BTL_CAM_PRESET_25);
|
||||||
|
@ -1026,7 +1026,7 @@ void btl_delete_actor(Actor* actor) {
|
|||||||
remove_effect(actor->debuffEffect);
|
remove_effect(actor->debuffEffect);
|
||||||
|
|
||||||
if (actor->unk_200 != NULL) {
|
if (actor->unk_200 != NULL) {
|
||||||
((AttackResultTextFXData*)actor->unk_200->data)->unk_24 = 0;
|
actor->unk_200->data.attackResultText->unk_24 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
battleStatus = &gBattleStatus;
|
battleStatus = &gBattleStatus;
|
||||||
@ -1069,7 +1069,7 @@ void btl_delete_player_actor(Actor* player) {
|
|||||||
remove_effect(player->debuffEffect);
|
remove_effect(player->debuffEffect);
|
||||||
|
|
||||||
if (player->unk_200 != NULL) {
|
if (player->unk_200 != NULL) {
|
||||||
((AttackResultTextFXData*)player->unk_200->data)->unk_24 = 0;
|
player->unk_200->data.attackResultText->unk_24 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
heap_free(movement);
|
heap_free(movement);
|
||||||
|
119
src/182B30.c
119
src/182B30.c
@ -1946,40 +1946,40 @@ void func_8025CEC8(ActorPart* actorPart) {
|
|||||||
decorationTable = actorPart->decorationTable;
|
decorationTable = actorPart->decorationTable;
|
||||||
for (i = 0; i < ARRAY_COUNT(decorationTable->decorationType); i++) {
|
for (i = 0; i < ARRAY_COUNT(decorationTable->decorationType); i++) {
|
||||||
switch (decorationTable->decorationType[i]) {
|
switch (decorationTable->decorationType[i]) {
|
||||||
case 0:
|
case DECORATION_0:
|
||||||
func_8025D150(actorPart, i);
|
func_8025D150(actorPart, i);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case DECORATION_GOLDEN_FLAMES:
|
||||||
func_8025D160(actorPart, i);
|
func_8025D160(actorPart, i);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case DECORATION_SWEAT:
|
||||||
func_8025D2B0(actorPart, i);
|
func_8025D2B0(actorPart, i);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case DECORATION_SEEING_STARS:
|
||||||
func_8025D3CC(actorPart, i);
|
func_8025D3CC(actorPart, i);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case DECORATION_RED_FLAMES:
|
||||||
func_8025D4C8(actorPart, i);
|
func_8025D4C8(actorPart, i);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case DECORATION_GREY_SMOKE_TRAIL:
|
||||||
func_8025D640(actorPart, i);
|
func_8025D640(actorPart, i);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case DECORATION_FIRE_SMOKE_TRAIL:
|
||||||
func_8025D71C(actorPart, i);
|
func_8025D71C(actorPart, i);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case DECORATION_WHIRLWIND:
|
||||||
func_8025D830(actorPart, i);
|
func_8025D830(actorPart, i);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case DECORATION_STEAM_EMITTER:
|
||||||
func_8025D90C(actorPart, i);
|
func_8025D90C(actorPart, i);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case DECORATION_9:
|
||||||
func_8025DA68(actorPart, i);
|
func_8025DA68(actorPart, i);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case DECORATION_A:
|
||||||
func_8025DBD0(actorPart, i);
|
func_8025DBD0(actorPart, i);
|
||||||
break;
|
break;
|
||||||
case 11:
|
case DECORATION_RADIAL_STAR_EMITTER:
|
||||||
func_8025DD60(actorPart, i);
|
func_8025DD60(actorPart, i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1987,45 +1987,44 @@ void func_8025CEC8(ActorPart* actorPart) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void _remove_part_decoration(ActorPart* part, s32 decorationIndex) {
|
void _remove_part_decoration(ActorPart* part, s32 decorationIndex) {
|
||||||
DecorationTable* decorationTable = part->decorationTable;
|
DecorationTable* decorationTable = part->decorationTable;
|
||||||
|
|
||||||
switch (decorationTable->decorationType[decorationIndex]) {
|
switch (decorationTable->decorationType[decorationIndex]) {
|
||||||
case 0:
|
case DECORATION_0:
|
||||||
func_8025D158(part, decorationIndex);
|
func_8025D158(part, decorationIndex);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case DECORATION_GOLDEN_FLAMES:
|
||||||
func_8025D290(part, decorationIndex);
|
func_8025D290(part, decorationIndex);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case DECORATION_SWEAT:
|
||||||
func_8025D3C4(part, decorationIndex);
|
func_8025D3C4(part, decorationIndex);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case DECORATION_SEEING_STARS:
|
||||||
func_8025D4A0(part, decorationIndex);
|
func_8025D4A0(part, decorationIndex);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case DECORATION_RED_FLAMES:
|
||||||
func_8025D620(part, decorationIndex);
|
func_8025D620(part, decorationIndex);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case DECORATION_GREY_SMOKE_TRAIL:
|
||||||
func_8025D6FC(part, decorationIndex);
|
func_8025D6FC(part, decorationIndex);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case DECORATION_FIRE_SMOKE_TRAIL:
|
||||||
func_8025D810(part, decorationIndex);
|
func_8025D810(part, decorationIndex);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case DECORATION_WHIRLWIND:
|
||||||
func_8025D8EC(part, decorationIndex);
|
func_8025D8EC(part, decorationIndex);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case DECORATION_STEAM_EMITTER:
|
||||||
func_8025DA60(part, decorationIndex);
|
func_8025DA60(part, decorationIndex);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case DECORATION_9:
|
||||||
func_8025DBC8(part, decorationIndex);
|
func_8025DBC8(part, decorationIndex);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case DECORATION_A:
|
||||||
func_8025DD40(part, decorationIndex);
|
func_8025DD40(part, decorationIndex);
|
||||||
break;
|
break;
|
||||||
case 11:
|
case DECORATION_RADIAL_STAR_EMITTER:
|
||||||
func_8025DE88(part, decorationIndex);
|
func_8025DE88(part, decorationIndex);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2039,11 +2038,38 @@ void func_8025D150(ActorPart* actorPart, s32 i) {
|
|||||||
void func_8025D158(ActorPart* part, s32 decorationIndex) {
|
void func_8025D158(ActorPart* part, s32 decorationIndex) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// float reg swapping
|
||||||
|
#ifdef NON_MATCHING
|
||||||
|
void func_8025D160(ActorPart* arg0, s32 arg1) {
|
||||||
|
DecorationTable* table = arg0->decorationTable;
|
||||||
|
EffectInstance* effect;
|
||||||
|
AuraFXData* data;
|
||||||
|
|
||||||
|
switch (table->unk_8BC[arg1]) {
|
||||||
|
case 0:
|
||||||
|
fx_aura(3, arg0->currentPos.x, arg0->currentPos.y, arg0->currentPos.z, 0.4f, &table->unk_8B0[arg1]);
|
||||||
|
table->unk_8BC[arg1] = 1;
|
||||||
|
table->unk_8C6[arg1].unk00 = 0x28;
|
||||||
|
table->unk_8C6[arg1].unk02 = 0x28;
|
||||||
|
table->unk_8C6[arg1].unk04 = 0;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
effect = table->unk_8B0[arg1];
|
||||||
|
data = effect->data.aura;
|
||||||
|
data->posA.x = arg0->currentPos.x + table->unk_8C6[arg1].unk04;
|
||||||
|
data->posA.y = arg0->currentPos.y;
|
||||||
|
data->posA.z = arg0->currentPos.z;
|
||||||
|
effect->data.aura->scale.x = table->unk_8C6[arg1].unk00 / 100.0f;
|
||||||
|
effect->data.aura->scale.y = table->unk_8C6[arg1].unk02 / 100.0f;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
INCLUDE_ASM(s32, "182B30", func_8025D160);
|
INCLUDE_ASM(s32, "182B30", func_8025D160);
|
||||||
|
#endif
|
||||||
|
|
||||||
void func_8025D290(ActorPart* part, s32 decorationIndex) {
|
void func_8025D290(ActorPart* part, s32 decorationIndex) {
|
||||||
// TODO cast to appropriate struct data type once we know what it is
|
part->decorationTable->unk_8B0[decorationIndex]->data.aura->fadeTime = 5;
|
||||||
((s32*) part->decorationTable->unk_8B0[decorationIndex]->data)[11] = 5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "182B30", func_8025D2B0);
|
INCLUDE_ASM(s32, "182B30", func_8025D2B0);
|
||||||
@ -2057,11 +2083,43 @@ void func_8025D4A0(ActorPart* part, s32 decorationIndex) {
|
|||||||
remove_effect(part->decorationTable->unk_8B0[decorationIndex]);
|
remove_effect(part->decorationTable->unk_8B0[decorationIndex]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// float reg swapping
|
||||||
|
#ifdef NON_MATCHING
|
||||||
|
void func_8025D4C8(ActorPart* arg0, s32 arg1) {
|
||||||
|
DecorationTable* decor = arg0->decorationTable;
|
||||||
|
EffectInstance* effect;
|
||||||
|
AuraFXData* data;
|
||||||
|
|
||||||
|
switch (decor->unk_8BC[arg1]) {
|
||||||
|
case 0:
|
||||||
|
fx_aura(1, arg0->currentPos.x, arg0->currentPos.y, arg0->currentPos.z, 0.4f, &decor->unk_8B0[arg1]);
|
||||||
|
decor->unk_8BC[arg1] = 1;
|
||||||
|
decor->unk_8C6[arg1].unk00 = 0x28;
|
||||||
|
decor->unk_8C6[arg1].unk02 = 0x28;
|
||||||
|
decor->unk_8C6[arg1].unk04 = 0xFF;
|
||||||
|
decor->unk_8C6[arg1].unk06 = 0;
|
||||||
|
decor->unk_8C6[arg1].unk08 = 0xFF;
|
||||||
|
decor->unk_8C6[arg1].unk0A = 0;
|
||||||
|
decor->unk_8C6[arg1].unk0C = 0;
|
||||||
|
// fall through
|
||||||
|
case 1:
|
||||||
|
effect = decor->unk_8B0[arg1];
|
||||||
|
data = effect->data.aura;
|
||||||
|
data->posA.x = arg0->currentPos.x;
|
||||||
|
data->posA.y = arg0->currentPos.y;
|
||||||
|
data->posA.z = arg0->currentPos.z + decor->unk_8C6[arg1].unk06;
|
||||||
|
effect->data.aura->scale.x = decor->unk_8C6[arg1].unk00 / 100.0f;
|
||||||
|
effect->data.aura->scale.y = decor->unk_8C6[arg1].unk02 / 100.0f;
|
||||||
|
effect->data.aura->primA = decor->unk_8C6[arg1].unk04;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
INCLUDE_ASM(s32, "182B30", func_8025D4C8);
|
INCLUDE_ASM(s32, "182B30", func_8025D4C8);
|
||||||
|
#endif
|
||||||
|
|
||||||
void func_8025D620(ActorPart* part, s32 decorationIndex) {
|
void func_8025D620(ActorPart* part, s32 decorationIndex) {
|
||||||
// TODO cast to appropriate struct data type once we know what it is
|
part->decorationTable->unk_8B0[decorationIndex]->data.aura->fadeTime = 5;
|
||||||
((s32*) part->decorationTable->unk_8B0[decorationIndex]->data)[11] = 5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "182B30", func_8025D640);
|
INCLUDE_ASM(s32, "182B30", func_8025D640);
|
||||||
@ -2095,8 +2153,7 @@ void func_8025DBC8(ActorPart* part, s32 decorationIndex) {
|
|||||||
INCLUDE_ASM(s32, "182B30", func_8025DBD0);
|
INCLUDE_ASM(s32, "182B30", func_8025DBD0);
|
||||||
|
|
||||||
void func_8025DD40(ActorPart* part, s32 decorationIndex) {
|
void func_8025DD40(ActorPart* part, s32 decorationIndex) {
|
||||||
// TODO cast to appropriate struct data type once we know what it is
|
part->decorationTable->unk_8B0[decorationIndex]->data.aura->fadeTime = 5;
|
||||||
((s32*) part->decorationTable->unk_8B0[decorationIndex]->data)[11] = 5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "182B30", func_8025DD60);
|
INCLUDE_ASM(s32, "182B30", func_8025DD60);
|
||||||
|
71
src/18F340.c
71
src/18F340.c
@ -7,8 +7,8 @@ extern HudScript HES_HPDrain;
|
|||||||
|
|
||||||
extern s32 D_8029FB90;
|
extern s32 D_8029FB90;
|
||||||
extern f32 D_8029FB94;
|
extern f32 D_8029FB94;
|
||||||
extern EffectInstance* D_8029FB98;
|
extern EffectInstance* BattleMerleeOrbEffect;
|
||||||
extern EffectInstance* D_8029FB9C;
|
extern EffectInstance* BattleMerleeWaveEffect;
|
||||||
extern s32 D_8029FBA0;
|
extern s32 D_8029FBA0;
|
||||||
extern s16 D_8029FBA4;
|
extern s16 D_8029FBA4;
|
||||||
extern s32 D_8029FBA8;
|
extern s32 D_8029FBA8;
|
||||||
@ -242,7 +242,7 @@ ApiStatus func_802613A8(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_802613BC(Evt* script, s32 isInitialCall) {
|
ApiStatus PlayBattleMerleeGatherFX(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = evt_get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = evt_get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
@ -252,7 +252,7 @@ ApiStatus func_802613BC(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_80261478(Evt* script, s32 isInitialCall) {
|
ApiStatus PlayBattleMerleeOrbFX(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = evt_get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = evt_get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
@ -262,7 +262,7 @@ ApiStatus func_80261478(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_80261530(Evt* script, s32 isInitialCall) {
|
ApiStatus BattleMerleeFadeStageToBlack(Evt* script, s32 isInitialCall) {
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
mdl_set_all_fog_mode(1);
|
mdl_set_all_fog_mode(1);
|
||||||
*D_801512F0 = 1;
|
*D_801512F0 = 1;
|
||||||
@ -271,13 +271,16 @@ ApiStatus func_80261530(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_background_color_blend(0, 0, 0, ((25 - script->functionTemp[0]) * 10) & 0xFE);
|
set_background_color_blend(0, 0, 0, ((25 - script->functionTemp[0]) * 10) & 0xFE);
|
||||||
|
|
||||||
script->functionTemp[0]--;
|
script->functionTemp[0]--;
|
||||||
do {} while(0); // TODO required to match
|
|
||||||
return (script->functionTemp[0] == 0) * ApiStatus_DONE2;
|
if (script->functionTemp[0] == 0) {
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
} else {
|
||||||
|
return ApiStatus_BLOCK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_802615C8(Evt* script, s32 isInitialCall) {
|
ApiStatus BattleMerleeFadeStageFromBlack(Evt* script, s32 isInitialCall) {
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
script->functionTemp[0] = 25;
|
script->functionTemp[0] = 25;
|
||||||
}
|
}
|
||||||
@ -293,7 +296,7 @@ ApiStatus func_802615C8(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_BLOCK;
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_80261648(Evt* script, s32 isInitialCall) {
|
ApiStatus BattleFadeInMerlee(Evt* script, s32 isInitialCall) {
|
||||||
Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE);
|
Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE);
|
||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
@ -310,7 +313,7 @@ ApiStatus func_80261648(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_BLOCK;
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_802616B4(Evt* script, s32 isInitialCall) {
|
ApiStatus BattleFadeOutMerlee(Evt* script, s32 isInitialCall) {
|
||||||
Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE);
|
Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE);
|
||||||
|
|
||||||
merlee->alpha -= 17;
|
merlee->alpha -= 17;
|
||||||
@ -322,15 +325,15 @@ ApiStatus func_802616B4(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_BLOCK;
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_802616F4(Evt* script, s32 isInitialCall) {
|
ApiStatus BattleMerleeUpdateFX(Evt* script, s32 isInitialCall) {
|
||||||
Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE);
|
Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE);
|
||||||
EffectInstanceData* effectInstanceData;
|
EnergyOrbWaveFXData* data;
|
||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
script->functionTemp[1] = 0;
|
script->functionTemp[1] = 0;
|
||||||
D_8029FB94 = merlee->pos.y;
|
D_8029FB94 = merlee->pos.y;
|
||||||
D_8029FB98 = fx_energy_orb_wave(0, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.4f, 0);
|
BattleMerleeOrbEffect = fx_energy_orb_wave(0, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.4f, 0);
|
||||||
D_8029FB9C = fx_energy_orb_wave(3, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.00001f, 0);
|
BattleMerleeWaveEffect = fx_energy_orb_wave(3, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.00001f, 0);
|
||||||
D_8029FBA4 = 0;
|
D_8029FBA4 = 0;
|
||||||
D_8029FB90 = 12;
|
D_8029FB90 = 12;
|
||||||
sfx_play_sound(SOUND_2074);
|
sfx_play_sound(SOUND_2074);
|
||||||
@ -340,37 +343,37 @@ ApiStatus func_802616F4(Evt* script, s32 isInitialCall) {
|
|||||||
script->functionTemp[1] += 10;
|
script->functionTemp[1] += 10;
|
||||||
script->functionTemp[1] = clamp_angle(script->functionTemp[1]);
|
script->functionTemp[1] = clamp_angle(script->functionTemp[1]);
|
||||||
|
|
||||||
effectInstanceData = D_8029FB98->data;
|
data = BattleMerleeOrbEffect->data.energyOrbWave;
|
||||||
effectInstanceData->pos.x = merlee->pos.x;
|
data->pos.x = merlee->pos.x;
|
||||||
effectInstanceData->pos.y = merlee->pos.y + 16.0f;
|
data->pos.y = merlee->pos.y + 16.0f;
|
||||||
effectInstanceData->pos.z = merlee->pos.z;
|
data->pos.z = merlee->pos.z;
|
||||||
|
|
||||||
effectInstanceData = D_8029FB9C->data;
|
data = BattleMerleeWaveEffect->data.energyOrbWave;
|
||||||
effectInstanceData->pos.x = merlee->pos.x;
|
data->pos.x = merlee->pos.x;
|
||||||
effectInstanceData->pos.y = merlee->pos.y + 16.0f;
|
data->pos.y = merlee->pos.y + 16.0f;
|
||||||
effectInstanceData->pos.z = merlee->pos.z + 5.0f;
|
data->pos.z = merlee->pos.z + 5.0f;
|
||||||
|
|
||||||
if (D_8029FBA4 == 2) {
|
if (D_8029FBA4 == 2) {
|
||||||
((EffectInstanceData*)D_8029FB98->data)->unk_30 = 0.00001f;
|
BattleMerleeOrbEffect->data.energyOrbWave->scale = 0.00001f;
|
||||||
((EffectInstanceData*)D_8029FB9C->data)->unk_30 = 0.00001f;
|
BattleMerleeWaveEffect->data.energyOrbWave->scale = 0.00001f;
|
||||||
D_8029FB98->flags |= 0x10;
|
BattleMerleeOrbEffect->flags |= 0x10;
|
||||||
D_8029FB9C->flags |= 0x10;
|
BattleMerleeWaveEffect->flags |= 0x10;
|
||||||
return ApiStatus_DONE1;
|
return ApiStatus_DONE1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_8029FBA4 == 1) {
|
if (D_8029FBA4 == 1) {
|
||||||
effectInstanceData = D_8029FB98->data;
|
data = BattleMerleeOrbEffect->data.energyOrbWave;
|
||||||
effectInstanceData->unk_30 += 0.35;
|
data->scale += 0.35;
|
||||||
if (effectInstanceData->unk_30 > 3.5) {
|
if (data->scale > 3.5) {
|
||||||
effectInstanceData->unk_30 = 3.5f;
|
data->scale = 3.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_8029FB90 != 0) {
|
if (D_8029FB90 != 0) {
|
||||||
D_8029FB90--;
|
D_8029FB90--;
|
||||||
} else {
|
} else {
|
||||||
effectInstanceData = D_8029FB9C->data;
|
data = BattleMerleeWaveEffect->data.energyOrbWave;
|
||||||
effectInstanceData->unk_30 += 0.5;
|
data->scale += 0.5;
|
||||||
if (effectInstanceData->unk_30 > 5.0) {
|
if (data->scale > 5.0) {
|
||||||
D_8029FBA4 = 2;
|
D_8029FBA4 = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
54
src/190B20.c
54
src/190B20.c
@ -1676,7 +1676,7 @@ s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) {
|
|||||||
if (target->debuff != statusTypeKey) {
|
if (target->debuff != statusTypeKey) {
|
||||||
target->status = statusTypeKey;
|
target->status = statusTypeKey;
|
||||||
}
|
}
|
||||||
((DisableXFXData*)target->debuffEffect->data)->unk_3C = 0;
|
target->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
target->debuff = statusTypeKey;
|
target->debuff = statusTypeKey;
|
||||||
target->debuffDuration = duration;
|
target->debuffDuration = duration;
|
||||||
if ((s8)duration > 9) {
|
if ((s8)duration > 9) {
|
||||||
@ -1796,68 +1796,67 @@ s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags) {
|
|||||||
s32 minDefense = 255;
|
s32 minDefense = 255;
|
||||||
|
|
||||||
if (defenseTable != NULL) {
|
if (defenseTable != NULL) {
|
||||||
if (elementFlags & 2) {
|
if (elementFlags & DAMAGE_TYPE_FIRE) {
|
||||||
defense = lookup_defense(defenseTable, ELEMENT_FIRE);
|
defense = lookup_defense(defenseTable, ELEMENT_FIRE);
|
||||||
if (defense < minDefense) {
|
if (defense < minDefense) {
|
||||||
minDefense = defense;
|
minDefense = defense;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (elementFlags & 4) {
|
if (elementFlags & DAMAGE_TYPE_WATER) {
|
||||||
defense = lookup_defense(defenseTable, ELEMENT_WATER);
|
defense = lookup_defense(defenseTable, ELEMENT_WATER);
|
||||||
if (defense < minDefense) {
|
if (defense < minDefense) {
|
||||||
minDefense = defense;
|
minDefense = defense;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (elementFlags & 8) {
|
if (elementFlags & DAMAGE_TYPE_ICE) {
|
||||||
defense = lookup_defense(defenseTable, ELEMENT_ICE);
|
defense = lookup_defense(defenseTable, ELEMENT_ICE);
|
||||||
if (defense < minDefense) {
|
if (defense < minDefense) {
|
||||||
minDefense = defense;
|
minDefense = defense;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ELEMENT_MYSTERY missing?
|
if (elementFlags & DAMAGE_TYPE_MAGIC) {
|
||||||
if (elementFlags & 0x10) {
|
|
||||||
defense = lookup_defense(defenseTable, ELEMENT_MAGIC);
|
defense = lookup_defense(defenseTable, ELEMENT_MAGIC);
|
||||||
if (defense < minDefense) {
|
if (defense < minDefense) {
|
||||||
minDefense = defense;
|
minDefense = defense;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (elementFlags & 0x40) {
|
if (elementFlags & DAMAGE_TYPE_SMASH) {
|
||||||
defense = lookup_defense(defenseTable, ELEMENT_HAMMER);
|
defense = lookup_defense(defenseTable, ELEMENT_HAMMER);
|
||||||
if (defense < minDefense) {
|
if (defense < minDefense) {
|
||||||
minDefense = defense;
|
minDefense = defense;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (elementFlags & 0x80) {
|
if (elementFlags & DAMAGE_TYPE_JUMP) {
|
||||||
defense = lookup_defense(defenseTable, ELEMENT_JUMP);
|
defense = lookup_defense(defenseTable, ELEMENT_JUMP);
|
||||||
if (defense < minDefense) {
|
if (defense < minDefense) {
|
||||||
minDefense = defense;
|
minDefense = defense;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (elementFlags & 0x100) {
|
if (elementFlags & DAMAGE_TYPE_COSMIC) {
|
||||||
defense = lookup_defense(defenseTable, ELEMENT_COSMIC);
|
defense = lookup_defense(defenseTable, ELEMENT_COSMIC);
|
||||||
if (defense < minDefense) {
|
if (defense < minDefense) {
|
||||||
minDefense = defense;
|
minDefense = defense;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (elementFlags & 0x200) {
|
if (elementFlags & DAMAGE_TYPE_BLAST) {
|
||||||
defense = lookup_defense(defenseTable, ELEMENT_BLAST);
|
defense = lookup_defense(defenseTable, ELEMENT_BLAST);
|
||||||
if (defense < minDefense) {
|
if (defense < minDefense) {
|
||||||
minDefense = defense;
|
minDefense = defense;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (elementFlags & 0x20) {
|
if (elementFlags & DAMAGE_TYPE_ELECTRIC) {
|
||||||
defense = lookup_defense(defenseTable, ELEMENT_SHOCK);
|
defense = lookup_defense(defenseTable, ELEMENT_SHOCK);
|
||||||
if (defense < minDefense) {
|
if (defense < minDefense) {
|
||||||
minDefense = defense;
|
minDefense = defense;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (elementFlags & 0x800) {
|
if (elementFlags & DAMAGE_TYPE_QUAKE) {
|
||||||
defense = lookup_defense(defenseTable, ELEMENT_QUAKE);
|
defense = lookup_defense(defenseTable, ELEMENT_QUAKE);
|
||||||
if (defense < minDefense) {
|
if (defense < minDefense) {
|
||||||
minDefense = defense;
|
minDefense = defense;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (elementFlags & 0x40000) {
|
if (elementFlags & DAMAGE_TYPE_THROW) {
|
||||||
defense = lookup_defense(defenseTable, ELEMENT_THROW);
|
defense = lookup_defense(defenseTable, ELEMENT_THROW);
|
||||||
if (defense < minDefense) {
|
if (defense < minDefense) {
|
||||||
minDefense = defense;
|
minDefense = defense;
|
||||||
@ -1873,7 +1872,7 @@ s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elementFlags & 0x8000000) { // "ignore defense" flag
|
if (elementFlags & DAMAGE_TYPE_IGNORE_DEFENSE) {
|
||||||
if (minDefense == 99) {
|
if (minDefense == 99) {
|
||||||
// Immune
|
// Immune
|
||||||
minDefense = 999;
|
minDefense = 999;
|
||||||
@ -1896,8 +1895,7 @@ void func_802664DC(f32 x, f32 y, f32 z, s32 attack, s32 a) {
|
|||||||
|
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
i = 0;
|
i = 0;
|
||||||
// TODO use actual effect instance struct when we know what it is
|
gDamageCountEffects[i]->data.damageIndicator->effectDurationTimer = 5;
|
||||||
((s32*)gDamageCountEffects[i]->data)[12] = 5;
|
|
||||||
gDamageCountEffects[i] = NULL;
|
gDamageCountEffects[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1922,8 +1920,7 @@ void show_damage_popup(f32 x, f32 y, f32 z, s32 attack, s32 a) {
|
|||||||
|
|
||||||
if (i > ARRAY_COUNT(gDamageCountEffects) - 1) {
|
if (i > ARRAY_COUNT(gDamageCountEffects) - 1) {
|
||||||
i = 0;
|
i = 0;
|
||||||
// TODO use actual effect instance struct when we know what it is
|
gDamageCountEffects[i]->data.damageIndicator->effectDurationTimer = 5;
|
||||||
((s32*)gDamageCountEffects[i]->data)[12] = 5;
|
|
||||||
gDamageCountEffects[i] = NULL;
|
gDamageCountEffects[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1944,8 +1941,7 @@ void func_80266684(void) {
|
|||||||
if (gDamageCountEffects[i] != NULL) {
|
if (gDamageCountEffects[i] != NULL) {
|
||||||
gDamageCountTimers[i]--;
|
gDamageCountTimers[i]--;
|
||||||
if (gDamageCountTimers[i] == 0) {
|
if (gDamageCountTimers[i] == 0) {
|
||||||
// TODO use actual effect instance struct when we know what it is
|
gDamageCountEffects[i]->data.damageIndicator->effectDurationTimer = 5;
|
||||||
((s32**)gDamageCountEffects[i])[3][12] = 5;
|
|
||||||
gDamageCountEffects[i] = NULL;
|
gDamageCountEffects[i] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2070,12 +2066,12 @@ void func_80266978(void) {
|
|||||||
if (actor != NULL) {
|
if (actor != NULL) {
|
||||||
if (actor->unk_205 == 0x3C) {
|
if (actor->unk_205 == 0x3C) {
|
||||||
if (actor->unk_200 != 0) {
|
if (actor->unk_200 != 0) {
|
||||||
((AttackResultTextFXData*)actor->unk_200->data)->unk_24 = 0;
|
actor->unk_200->data.attackResultText->unk_24 = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (actor->unk_205 == 5) {
|
if (actor->unk_205 == 5) {
|
||||||
if (actor->unk_200 != 0) {
|
if (actor->unk_200 != 0) {
|
||||||
((AttackResultTextFXData*)actor->unk_200->data)->unk_18 = 0;
|
actor->unk_200->data.attackResultText->unk_18 = 0;
|
||||||
actor->unk_200 = NULL;
|
actor->unk_200 = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2089,12 +2085,12 @@ void func_80266978(void) {
|
|||||||
if (actor != NULL) {
|
if (actor != NULL) {
|
||||||
if (actor->unk_205 == 60) {
|
if (actor->unk_205 == 60) {
|
||||||
if (actor->unk_200 != NULL) {
|
if (actor->unk_200 != NULL) {
|
||||||
((AttackResultTextFXData*)actor->unk_200->data)->unk_24 = 0;
|
actor->unk_200->data.attackResultText->unk_24 = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (actor->unk_205 == 5) {
|
if (actor->unk_205 == 5) {
|
||||||
if (actor->unk_200 != NULL) {
|
if (actor->unk_200 != NULL) {
|
||||||
((AttackResultTextFXData*)actor->unk_200->data)->unk_18 = 0;
|
actor->unk_200->data.attackResultText->unk_18 = 0;
|
||||||
actor->unk_200 = NULL;
|
actor->unk_200 = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2107,12 +2103,12 @@ void func_80266978(void) {
|
|||||||
if (actor != NULL) {
|
if (actor != NULL) {
|
||||||
if (actor->unk_205 == 60) {
|
if (actor->unk_205 == 60) {
|
||||||
if (actor->unk_200 != NULL) {
|
if (actor->unk_200 != NULL) {
|
||||||
((AttackResultTextFXData*)actor->unk_200->data)->unk_24 = 0;
|
actor->unk_200->data.attackResultText->unk_24 = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (actor->unk_205 == 5) {
|
if (actor->unk_205 == 5) {
|
||||||
if (actor->unk_200 != NULL) {
|
if (actor->unk_200 != NULL) {
|
||||||
((AttackResultTextFXData*)actor->unk_200->data)->unk_18 = 0;
|
actor->unk_200->data.attackResultText->unk_18 = 0;
|
||||||
actor->unk_200 = NULL;
|
actor->unk_200 = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2524,7 +2520,7 @@ void btl_update_ko_status(void) {
|
|||||||
player->koDuration = player->debuffDuration;
|
player->koDuration = player->debuffDuration;
|
||||||
if (player->koDuration > 0) {
|
if (player->koDuration > 0) {
|
||||||
player->koStatus = STATUS_DAZE;
|
player->koStatus = STATUS_DAZE;
|
||||||
((DisableXFXData*)player->debuffEffect->data)->unk_3C = player->koDuration;
|
player->debuffEffect->data.disableX->unk_3C = player->koDuration;
|
||||||
|
|
||||||
if (koDuration == 0) {
|
if (koDuration == 0) {
|
||||||
sfx_play_sound(SOUND_2107);
|
sfx_play_sound(SOUND_2107);
|
||||||
@ -2539,7 +2535,7 @@ void btl_update_ko_status(void) {
|
|||||||
|
|
||||||
if (partner->koDuration > 0) {
|
if (partner->koDuration > 0) {
|
||||||
partner->koStatus = STATUS_DAZE;
|
partner->koStatus = STATUS_DAZE;
|
||||||
((DisableXFXData*)partner->debuffEffect->data)->unk_3C = partner->koDuration;
|
partner->debuffEffect->data.disableX->unk_3C = partner->koDuration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2550,7 +2546,7 @@ void btl_update_ko_status(void) {
|
|||||||
enemy->koDuration = enemy->debuffDuration;
|
enemy->koDuration = enemy->debuffDuration;
|
||||||
if (enemy->koDuration > 0) {
|
if (enemy->koDuration > 0) {
|
||||||
enemy->koStatus = STATUS_DAZE;
|
enemy->koStatus = STATUS_DAZE;
|
||||||
((DisableXFXData*)enemy->debuffEffect->data)->unk_3C = enemy->koDuration;
|
enemy->debuffEffect->data.disableX->unk_3C = enemy->koDuration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
36
src/19FAF0.c
36
src/19FAF0.c
@ -18,36 +18,36 @@ ApiStatus func_80271258(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus func_802712A0(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802712A0(Evt* script, s32 isInitialCall) {
|
||||||
EffectInstance* debuffEffect = fx_debuff(2, script->varTable[0], script->varTable[1], script->varTable[2]);
|
EffectInstance* debuffEffect = fx_debuff(2, script->varTable[0], script->varTable[1], script->varTable[2]);
|
||||||
|
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_38 = 200;
|
debuffEffect->data.debuff->unk_38 = 200;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_39 = 120;
|
debuffEffect->data.debuff->unk_39 = 120;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_3A = 0;
|
debuffEffect->data.debuff->unk_3A = 0;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_3B = 234;
|
debuffEffect->data.debuff->unk_3B = 234;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_3C = 193;
|
debuffEffect->data.debuff->unk_3C = 193;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_3D = 0;
|
debuffEffect->data.debuff->unk_3D = 0;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_80271328(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80271328(Evt* script, s32 isInitialCall) {
|
||||||
EffectInstance* debuffEffect = fx_debuff(2, script->varTable[0], script->varTable[1], script->varTable[2]);
|
EffectInstance* debuffEffect = fx_debuff(2, script->varTable[0], script->varTable[1], script->varTable[2]);
|
||||||
|
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_38 = 60;
|
debuffEffect->data.debuff->unk_38 = 60;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_39 = 160;
|
debuffEffect->data.debuff->unk_39 = 160;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_3A = 0;
|
debuffEffect->data.debuff->unk_3A = 0;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_3B = 90;
|
debuffEffect->data.debuff->unk_3B = 90;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_3C = 240;
|
debuffEffect->data.debuff->unk_3C = 240;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_3D = 0;
|
debuffEffect->data.debuff->unk_3D = 0;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_802713B0(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802713B0(Evt* script, s32 isInitialCall) {
|
||||||
EffectInstance* debuffEffect = fx_debuff(2, script->varTable[0], script->varTable[1], script->varTable[2]);
|
EffectInstance* debuffEffect = fx_debuff(2, script->varTable[0], script->varTable[1], script->varTable[2]);
|
||||||
|
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_38 = 205;
|
debuffEffect->data.debuff->unk_38 = 205;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_39 = 0;
|
debuffEffect->data.debuff->unk_39 = 0;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_3A = 40;
|
debuffEffect->data.debuff->unk_3A = 40;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_3B = 205;
|
debuffEffect->data.debuff->unk_3B = 205;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_3C = 32;
|
debuffEffect->data.debuff->unk_3C = 32;
|
||||||
((DebuffFXData*)debuffEffect->data)->unk_3D = 242;
|
debuffEffect->data.debuff->unk_3D = 242;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2593,7 +2593,7 @@ ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
actor->koStatus = 0;
|
actor->koStatus = 0;
|
||||||
actor->koDuration = 0;
|
actor->koDuration = 0;
|
||||||
((DisableXFXData*)actor->debuffEffect->data)->unk_3C = 0;
|
actor->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
actor->attackBoost = 0;
|
actor->attackBoost = 0;
|
||||||
actor->defenseBoost = 0;
|
actor->defenseBoost = 0;
|
||||||
actor->isGlowing = 0;
|
actor->isGlowing = 0;
|
||||||
|
@ -23,9 +23,9 @@ ApiStatus AddEffectOffset(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
|
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
|
||||||
|
|
||||||
((EffectInstanceData*)effect->data)->pos.x += evt_get_variable(script, *args++);
|
effect->data.flashingBoxShockwave->pos.x += evt_get_variable(script, *args++);
|
||||||
((EffectInstanceData*)effect->data)->pos.y += evt_get_variable(script, *args++);
|
effect->data.flashingBoxShockwave->pos.y += evt_get_variable(script, *args++);
|
||||||
((EffectInstanceData*)effect->data)->pos.z += evt_get_variable(script, *args++);
|
effect->data.flashingBoxShockwave->pos.z += evt_get_variable(script, *args++);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,8 @@ extern s8 D_8009A654;
|
|||||||
extern s16 D_8009A668;
|
extern s16 D_8009A668;
|
||||||
extern s32 D_800A0BA0;
|
extern s32 D_800A0BA0;
|
||||||
extern f32 D_800A0BA4;
|
extern f32 D_800A0BA4;
|
||||||
extern EffectInstance* D_800A0BA8;
|
extern EffectInstance* WorldMerleeOrbEffect;
|
||||||
extern EffectInstance* D_800A0BAC;
|
extern EffectInstance* WorldMerleeWaveEffect;
|
||||||
|
|
||||||
s32 get_defeated(s32 mapID, s32 encounterID) {
|
s32 get_defeated(s32 mapID, s32 encounterID) {
|
||||||
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
||||||
@ -45,14 +45,24 @@ ApiStatus ShowMerleeCoinMessage(Evt* script, s32 isInitialCall) {
|
|||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
show_merlee_message(0, 60);
|
show_merlee_message(0, 60);
|
||||||
}
|
}
|
||||||
return (is_merlee_message_done() == 0) * ApiStatus_DONE2;
|
|
||||||
|
if (is_merlee_message_done()) {
|
||||||
|
return ApiStatus_BLOCK;
|
||||||
|
} else {
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus ShowMerleeRanOutMessage(Evt* script, s32 isInitialCall) {
|
ApiStatus ShowMerleeRanOutMessage(Evt* script, s32 isInitialCall) {
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
show_merlee_message(1, 60);
|
show_merlee_message(1, 60);
|
||||||
}
|
}
|
||||||
return (is_merlee_message_done() == 0) * ApiStatus_DONE2;
|
|
||||||
|
if (is_merlee_message_done()) {
|
||||||
|
return ApiStatus_BLOCK;
|
||||||
|
} else {
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus FadeBackgroundToBlack(Evt* script, s32 isInitialCall) {
|
ApiStatus FadeBackgroundToBlack(Evt* script, s32 isInitialCall) {
|
||||||
@ -65,12 +75,12 @@ ApiStatus FadeBackgroundToBlack(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
set_background_color_blend(0, 0, 0, ((25 - script->functionTemp[0]) * 10) & 254);
|
set_background_color_blend(0, 0, 0, ((25 - script->functionTemp[0]) * 10) & 254);
|
||||||
script->functionTemp[0]--;
|
script->functionTemp[0]--;
|
||||||
do {} while (0);
|
|
||||||
|
|
||||||
if (script->functionTemp[0] == 0) {
|
if (script->functionTemp[0] == 0) {
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
} else {
|
||||||
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus UnfadeBackgroundFromBlack(Evt* script, s32 isInitialCall) {
|
ApiStatus UnfadeBackgroundFromBlack(Evt* script, s32 isInitialCall) {
|
||||||
@ -102,8 +112,9 @@ ApiStatus FadeInMerlee(Evt* script, s32 isInitialCall) {
|
|||||||
if ((u32)(npc->alpha & 0xFF) >= 0xFF) {
|
if ((u32)(npc->alpha & 0xFF) >= 0xFF) {
|
||||||
npc->alpha = 0xFF;
|
npc->alpha = 0xFF;
|
||||||
return ApiStatus_DONE1;
|
return ApiStatus_DONE1;
|
||||||
|
} else {
|
||||||
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus FadeOutMerlee(Evt* script, s32 isInitialCall) {
|
ApiStatus FadeOutMerlee(Evt* script, s32 isInitialCall) {
|
||||||
@ -113,21 +124,21 @@ ApiStatus FadeOutMerlee(Evt* script, s32 isInitialCall) {
|
|||||||
if (npc->alpha == 0) {
|
if (npc->alpha == 0) {
|
||||||
npc->alpha = 0;
|
npc->alpha = 0;
|
||||||
return ApiStatus_DONE1;
|
return ApiStatus_DONE1;
|
||||||
|
} else {
|
||||||
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// same as func_802616F4 aside from syms
|
// same as BattleMerleeUpdateFX aside from syms
|
||||||
ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall) {
|
ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall) {
|
||||||
Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE);
|
Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE);
|
||||||
EffectInstanceData* effectInstanceData;
|
EnergyOrbWaveFXData* effectData;
|
||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
script->functionTemp[1] = 0;
|
script->functionTemp[1] = 0;
|
||||||
D_800A0BA4 = merlee->pos.y;
|
D_800A0BA4 = merlee->pos.y;
|
||||||
D_800A0BA8 = fx_energy_orb_wave(0, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.4f, 0);
|
WorldMerleeOrbEffect = fx_energy_orb_wave(0, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.4f, 0);
|
||||||
D_800A0BAC = fx_energy_orb_wave(3, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.00001f, 0);
|
WorldMerleeWaveEffect = fx_energy_orb_wave(3, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.00001f, 0);
|
||||||
D_800A0BB8 = 0;
|
D_800A0BB8 = 0;
|
||||||
D_800A0BA0 = 12;
|
D_800A0BA0 = 12;
|
||||||
sfx_play_sound(SOUND_2074);
|
sfx_play_sound(SOUND_2074);
|
||||||
@ -138,37 +149,37 @@ ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall) {
|
|||||||
script->functionTemp[1] += 10;
|
script->functionTemp[1] += 10;
|
||||||
script->functionTemp[1] = clamp_angle(script->functionTemp[1]);
|
script->functionTemp[1] = clamp_angle(script->functionTemp[1]);
|
||||||
|
|
||||||
effectInstanceData = D_800A0BA8->data;
|
effectData = WorldMerleeOrbEffect->data.energyOrbWave;
|
||||||
effectInstanceData->pos.x = merlee->pos.x;
|
effectData->pos.x = merlee->pos.x;
|
||||||
effectInstanceData->pos.y = merlee->pos.y + 16.0f;
|
effectData->pos.y = merlee->pos.y + 16.0f;
|
||||||
effectInstanceData->pos.z = merlee->pos.z;
|
effectData->pos.z = merlee->pos.z;
|
||||||
|
|
||||||
effectInstanceData = D_800A0BAC->data;
|
effectData = WorldMerleeWaveEffect->data.energyOrbWave;
|
||||||
effectInstanceData->pos.x = merlee->pos.x;
|
effectData->pos.x = merlee->pos.x;
|
||||||
effectInstanceData->pos.y = merlee->pos.y + 16.0f;
|
effectData->pos.y = merlee->pos.y + 16.0f;
|
||||||
effectInstanceData->pos.z = merlee->pos.z + 5.0f;
|
effectData->pos.z = merlee->pos.z + 5.0f;
|
||||||
|
|
||||||
if (D_800A0BB8 == 2) {
|
if (D_800A0BB8 == 2) {
|
||||||
((EffectInstanceData*)D_800A0BA8->data)->unk_30 = 0.00001f;
|
WorldMerleeOrbEffect->data.energyOrbWave->scale = 0.00001f;
|
||||||
((EffectInstanceData*)D_800A0BAC->data)->unk_30 = 0.00001f;
|
WorldMerleeWaveEffect->data.energyOrbWave->scale = 0.00001f;
|
||||||
D_800A0BA8->flags |= EFFECT_INSTANCE_FLAGS_10;
|
WorldMerleeOrbEffect->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||||
D_800A0BAC->flags |= EFFECT_INSTANCE_FLAGS_10;
|
WorldMerleeWaveEffect->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||||
return ApiStatus_DONE1;
|
return ApiStatus_DONE1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_800A0BB8 == 1) {
|
if (D_800A0BB8 == 1) {
|
||||||
effectInstanceData = D_800A0BA8->data;
|
effectData = WorldMerleeOrbEffect->data.energyOrbWave;
|
||||||
effectInstanceData->unk_30 += 0.35;
|
effectData->scale += 0.35;
|
||||||
if (effectInstanceData->unk_30 > 3.5) {
|
if (effectData->scale > 3.5) {
|
||||||
effectInstanceData->unk_30 = 3.5f;
|
effectData->scale = 3.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_800A0BA0 != 0) {
|
if (D_800A0BA0 != 0) {
|
||||||
D_800A0BA0--;
|
D_800A0BA0--;
|
||||||
} else {
|
} else {
|
||||||
effectInstanceData = D_800A0BAC->data;
|
effectData = WorldMerleeWaveEffect->data.energyOrbWave;
|
||||||
effectInstanceData->unk_30 += 0.5;
|
effectData->scale += 0.5;
|
||||||
if (effectInstanceData->unk_30 > 5.0) {
|
if (effectData->scale > 5.0) {
|
||||||
D_800A0BB8 = 2;
|
D_800A0BB8 = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -392,7 +392,7 @@ void set_action_state(s32 actionState) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->unk_D8 != NULL) {
|
if (playerStatus->unk_D8 != NULL) {
|
||||||
((Effect46FXData*)playerStatus->unk_D8->data)->unk_24 = 10;
|
playerStatus->unk_D8->data.unk_46->unk_24 = 10;
|
||||||
playerStatus->unk_D8 = NULL;
|
playerStatus->unk_D8 = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ void func_801356C4(ItemEntity*);
|
|||||||
void func_801356CC(ItemEntity*);
|
void func_801356CC(ItemEntity*);
|
||||||
void func_801356D4(ItemEntity*);
|
void func_801356D4(ItemEntity*);
|
||||||
void update_item_entity_temp(ItemEntity*);
|
void update_item_entity_temp(ItemEntity*);
|
||||||
s32 draw_image_with_clipping(s32* raster, s32 width, s32 height, s32 fmt, s32 bitDepth, s16 posX, s16 posY, u16 clipULx,
|
s32 draw_image_with_clipping(IMG_PTR raster, s32 width, s32 height, s32 fmt, s32 bitDepth, s16 posX, s16 posY, u16 clipULx,
|
||||||
u16 clipULy, u16 clipLRx, u16 clipRLy);
|
u16 clipULy, u16 clipLRx, u16 clipRLy);
|
||||||
void func_8013673C(ItemEntity* itemEntity, s32 posX, s32 posY);
|
void func_8013673C(ItemEntity* itemEntity, s32 posX, s32 posY);
|
||||||
void func_801369D0(ItemEntity* itemEntity, s32 posX, s32 posY);
|
void func_801369D0(ItemEntity* itemEntity, s32 posX, s32 posY);
|
||||||
@ -101,7 +101,7 @@ Lights1 D_8014C6C8 = gdSPDefLights1(255, 255, 255, 0, 0, 0, 0, 0, 0);
|
|||||||
s16 D_8014C6E0[] = { 32, 40 };
|
s16 D_8014C6E0[] = { 32, 40 };
|
||||||
s16 D_8014C6E4[] = { 8, 4 };
|
s16 D_8014C6E4[] = { 8, 4 };
|
||||||
|
|
||||||
s32 draw_ci_image_with_clipping(s32* raster, s32 width, s32 height, s32 fmt, s32 bitDepth, s32* palette, s16 posX,
|
s32 draw_ci_image_with_clipping(IMG_PTR raster, s32 width, s32 height, s32 fmt, s32 bitDepth, PAL_PTR palette, s16 posX,
|
||||||
s16 posY, u16 clipULx, u16 clipULy, u16 clipLRx, u16 clipRLy, u8 opacity) {
|
s16 posY, u16 clipULx, u16 clipULy, u16 clipLRx, u16 clipRLy, u8 opacity) {
|
||||||
s32 ret;
|
s32 ret;
|
||||||
|
|
||||||
@ -180,8 +180,8 @@ s32 sparkle_script_step(ItemEntity* itemEntity) {
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
case SPARKLE_OP_SetCI:
|
case SPARKLE_OP_SetCI:
|
||||||
itemEntity->sparkleNextUpdate = *readPos++;
|
itemEntity->sparkleNextUpdate = *readPos++;
|
||||||
itemEntity->sparkleRaster = (s8*)*readPos++;
|
itemEntity->sparkleRaster = (IMG_PTR)*readPos++;
|
||||||
itemEntity->sparklePalette = (s8*)*readPos++;
|
itemEntity->sparklePalette = (PAL_PTR)*readPos++;
|
||||||
itemEntity->sparkleWidth = *readPos++;
|
itemEntity->sparkleWidth = *readPos++;
|
||||||
itemEntity->sparkleHeight = *readPos++;
|
itemEntity->sparkleHeight = *readPos++;
|
||||||
itemEntity->sparkleReadPos = readPos;
|
itemEntity->sparkleReadPos = readPos;
|
||||||
|
12
src/EC71B0.c
12
src/EC71B0.c
@ -12,11 +12,11 @@
|
|||||||
ApiStatus func_80240344_EC74F4(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80240344_EC74F4(Evt* script, s32 isInitialCall) {
|
||||||
EffectInstance* effect = fx_misc_particles(3, -272.0f, 80.0f, 20.0f, 200.0f, 120.0f, 4.0f, 8, 0);
|
EffectInstance* effect = fx_misc_particles(3, -272.0f, 80.0f, 20.0f, 200.0f, 120.0f, 4.0f, 8, 0);
|
||||||
|
|
||||||
((MiscParticlesFXData*)effect->data)->unk_38 = 240;
|
effect->data.miscParticles->unk_38 = 240;
|
||||||
((MiscParticlesFXData*)effect->data)->unk_3C = 240;
|
effect->data.miscParticles->unk_3C = 240;
|
||||||
((MiscParticlesFXData*)effect->data)->unk_40 = 240;
|
effect->data.miscParticles->unk_40 = 240;
|
||||||
((MiscParticlesFXData*)effect->data)->unk_48 = 230;
|
effect->data.miscParticles->unk_48 = 230;
|
||||||
((MiscParticlesFXData*)effect->data)->unk_4C = 230;
|
effect->data.miscParticles->unk_4C = 230;
|
||||||
((MiscParticlesFXData*)effect->data)->unk_50 = 240;
|
effect->data.miscParticles->unk_50 = 240;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -392,7 +392,7 @@ Gfx D_8014B400[21][5] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
u32 mdl_textureBaseAddress = 0x8028E000;
|
void* mdl_textureBaseAddress = 0x8028E000;
|
||||||
|
|
||||||
u8 mdl_bgMultiplyColorA = 0;
|
u8 mdl_bgMultiplyColorA = 0;
|
||||||
u8 mdl_bgMultiplyColorR = 0;
|
u8 mdl_bgMultiplyColorR = 0;
|
||||||
@ -1063,7 +1063,7 @@ extern s32 texPannerMainU[MAX_TEX_PANNERS];
|
|||||||
extern s32 texPannerMainV[MAX_TEX_PANNERS];
|
extern s32 texPannerMainV[MAX_TEX_PANNERS];
|
||||||
extern s32 texPannerAuxU[MAX_TEX_PANNERS];
|
extern s32 texPannerAuxU[MAX_TEX_PANNERS];
|
||||||
extern s32 texPannerAuxV[MAX_TEX_PANNERS];
|
extern s32 texPannerAuxV[MAX_TEX_PANNERS];
|
||||||
extern u8* mdl_nextTextureAddress;
|
extern void* mdl_nextTextureAddress;
|
||||||
extern u16 mdl_currentTransformGroupChildIndex;
|
extern u16 mdl_currentTransformGroupChildIndex;
|
||||||
extern u16 D_80153226;
|
extern u16 D_80153226;
|
||||||
extern ModelNode* D_80153370;
|
extern ModelNode* D_80153370;
|
||||||
@ -2971,9 +2971,9 @@ void appendGfx_model(Model* model);
|
|||||||
INCLUDE_ASM(void, "a5dd0_len_114e0", appendGfx_model, Model*);
|
INCLUDE_ASM(void, "a5dd0_len_114e0", appendGfx_model, Model*);
|
||||||
|
|
||||||
void func_80114B58(u32 romOffset, TextureHandle* handle, TextureHeader* header, s32 mainSize, s32 mainPalSize, s32 auxSize, s32 auxPalSize) {
|
void func_80114B58(u32 romOffset, TextureHandle* handle, TextureHeader* header, s32 mainSize, s32 mainPalSize, s32 auxSize, s32 auxPalSize) {
|
||||||
handle->raster = (u32*) mdl_nextTextureAddress;
|
handle->raster = (IMG_PTR) mdl_nextTextureAddress;
|
||||||
if (mainPalSize != 0) {
|
if (mainPalSize != 0) {
|
||||||
handle->palette = (u32*) (mdl_nextTextureAddress + mainSize);
|
handle->palette = (PAL_PTR) (mdl_nextTextureAddress + mainSize);
|
||||||
} else {
|
} else {
|
||||||
handle->palette = NULL;
|
handle->palette = NULL;
|
||||||
}
|
}
|
||||||
@ -2981,9 +2981,9 @@ void func_80114B58(u32 romOffset, TextureHandle* handle, TextureHeader* header,
|
|||||||
romOffset += mainSize + mainPalSize;
|
romOffset += mainSize + mainPalSize;
|
||||||
mdl_nextTextureAddress += mainSize + mainPalSize;
|
mdl_nextTextureAddress += mainSize + mainPalSize;
|
||||||
if (auxSize != 0) {
|
if (auxSize != 0) {
|
||||||
handle->auxRaster = (u32*) mdl_nextTextureAddress;
|
handle->auxRaster = (IMG_PTR) mdl_nextTextureAddress;
|
||||||
if (auxPalSize != 0) {
|
if (auxPalSize != 0) {
|
||||||
handle->auxPalette = (u32*) (mdl_nextTextureAddress + auxSize);
|
handle->auxPalette = (PAL_PTR) (mdl_nextTextureAddress + auxSize);
|
||||||
} else {
|
} else {
|
||||||
handle->auxPalette = NULL;
|
handle->auxPalette = NULL;
|
||||||
}
|
}
|
||||||
|
@ -151,10 +151,10 @@ ApiStatus func_80218680_4FF0D0(Evt* script, s32 isInitialCall) {
|
|||||||
s32 z = evt_get_variable(script, *args++);
|
s32 z = evt_get_variable(script, *args++);
|
||||||
f32 scale = evt_get_float_variable(script, *args++);
|
f32 scale = evt_get_float_variable(script, *args++);
|
||||||
|
|
||||||
((Effect6BFXData*)effect->data)->pos.x = x;
|
effect->data.energyInOut->pos.x = x;
|
||||||
((Effect6BFXData*)effect->data)->pos.y = y;
|
effect->data.energyInOut->pos.y = y;
|
||||||
((Effect6BFXData*)effect->data)->pos.z = z;
|
effect->data.energyInOut->pos.z = z;
|
||||||
((Effect6BFXData*)effect->data)->scale = scale;
|
effect->data.energyInOut->scale = scale;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -229,9 +229,9 @@ ApiStatus func_8021875C_4EFBFC(Evt* script, s32 isInitialCall) {
|
|||||||
s32 var3 = evt_get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
EffectInstance* effect = fx_floating_rock(2, var1, 150.0f, var3, var2, -0.5f, -0.9f, 0.5f, 60);
|
EffectInstance* effect = fx_floating_rock(2, var1, 150.0f, var3, var2, -0.5f, -0.9f, 0.5f, 60);
|
||||||
|
|
||||||
((EffectInstanceData*)effect->data)->unk_30 = 0;
|
effect->data.floatingRock->unk_30.x = 0;
|
||||||
((EffectInstanceData*)effect->data)->unk_38 = 0;
|
effect->data.floatingRock->unk_30.z = 0;
|
||||||
((EffectInstanceData*)effect->data)->unk_34 = 0;
|
effect->data.floatingRock->unk_30.y = 0;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,17 +12,17 @@
|
|||||||
|
|
||||||
ApiStatus func_80218BC4_6BC754(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80218BC4_6BC754(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
UnkStruct0* unkStruct0 = (UnkStruct0*)evt_get_variable(script, *args++);
|
EffectInstance* tattleEffect = (EffectInstance*) evt_get_variable(script, *args++);
|
||||||
|
|
||||||
unkStruct0->unk_0C->unk_08 = -1000.0f;
|
tattleEffect->data.tattleWindow->pos.y = -1000.0f;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_80218BFC_6BC78C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80218BFC_6BC78C(Evt* script, s32 isInitialCall) {
|
||||||
UnkStruct0* unkStruct0 = (UnkStruct0*)evt_get_variable(script, *script->ptrReadPos);
|
EffectInstance* tattleEffect = (EffectInstance*) evt_get_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
unkStruct0->unk_0C->unk_08 = 144.0f;
|
tattleEffect->data.tattleWindow->pos.y = 144.0f;
|
||||||
unkStruct0->flags |= 0x10;
|
tattleEffect->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -922,17 +922,17 @@ EvtScript N(8021F6E0) = {
|
|||||||
|
|
||||||
ApiStatus func_80218DF4_465284(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80218DF4_465284(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
UnkStruct0* unkStruct0 = (UnkStruct0*)evt_get_variable(script, *args++);
|
EffectInstance* tattleEffect = (EffectInstance*) evt_get_variable(script, *args++);
|
||||||
|
|
||||||
unkStruct0->unk_0C->unk_08 = -1000.0f;
|
tattleEffect->data.tattleWindow->pos.y = -1000.0f;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_80218E2C_4652BC(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80218E2C_4652BC(Evt* script, s32 isInitialCall) {
|
||||||
UnkStruct0* unkStruct0 = (UnkStruct0*) evt_get_variable(script, *script->ptrReadPos);
|
EffectInstance* tattleEffect = (EffectInstance*) evt_get_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
unkStruct0->unk_0C->unk_08 = 144.0f;
|
tattleEffect->data.tattleWindow->pos.y = 144.0f;
|
||||||
unkStruct0->flags |= 0x10;
|
tattleEffect->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2848,25 +2848,25 @@ EvtScript N(idle_80225B68) = {
|
|||||||
|
|
||||||
ApiStatus func_80219658_465AE8(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80219658_465AE8(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
WattEffectData* wattEffects = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
||||||
|
|
||||||
unkDuplighost->unk_04 = evt_get_variable(script, *args++);
|
wattEffects->unk_04 = evt_get_variable(script, *args++);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_802196A4_465B34(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802196A4_465B34(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
WattEffectData* wattEffects = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
||||||
|
|
||||||
unkDuplighost->unk_0C = evt_get_variable(script, *args++);
|
wattEffects->unk_0C = evt_get_variable(script, *args++);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_802196F0_465B80(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802196F0_465B80(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
WattEffectData* unkDuplighost = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
WattEffectData* wattEffects = (WattEffectData*)get_actor(script->owner1.enemyID)->state.varTable[3];
|
||||||
|
|
||||||
unkDuplighost->unk_10 = evt_get_variable(script, *args++);
|
wattEffects->unk_10 = evt_get_variable(script, *args++);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,10 +370,10 @@ ApiStatus func_80218250_52B8F0(Evt* script, s32 isInitialCall) {
|
|||||||
for (i = 0; i < ARRAY_COUNT(bpArray); i++) {
|
for (i = 0; i < ARRAY_COUNT(bpArray); i++) {
|
||||||
EffectInstance* effect = fx_ice_shard(bpArray[i].unk_00, bpArray[i].unk_04, bpArray[i].unk_08,
|
EffectInstance* effect = fx_ice_shard(bpArray[i].unk_00, bpArray[i].unk_04, bpArray[i].unk_08,
|
||||||
bpArray[i].unk_0C, bpArray[i].unk_10, bpArray[i].unk_14);
|
bpArray[i].unk_0C, bpArray[i].unk_10, bpArray[i].unk_14);
|
||||||
((IceShardFXData*)effect->data)->unk_4C = bpArray[i].unk_18;
|
effect->data.iceShard->unk_4C = bpArray[i].unk_18;
|
||||||
((IceShardFXData*)effect->data)->unk_50 = bpArray[i].unk_1C;
|
effect->data.iceShard->unk_50 = bpArray[i].unk_1C;
|
||||||
((IceShardFXData*)effect->data)->unk_54 = bpArray[i].unk_20;
|
effect->data.iceShard->unk_54 = bpArray[i].unk_20;
|
||||||
((IceShardFXData*)effect->data)->unk_58 = bpArray[i].unk_24;
|
effect->data.iceShard->unk_58 = bpArray[i].unk_24;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -46,7 +46,7 @@ ApiStatus N(UpdateBulbGlow)(Evt* script, s32 isInitialCall) {
|
|||||||
s32 y = evt_get_variable(script, *args++);
|
s32 y = evt_get_variable(script, *args++);
|
||||||
s32 z = evt_get_variable(script, *args++);
|
s32 z = evt_get_variable(script, *args++);
|
||||||
s32 rotation = evt_get_variable(script, *args++);
|
s32 rotation = evt_get_variable(script, *args++);
|
||||||
BulbGlowFXData* effectData = ((EffectInstance*) evt_get_variable(script, *args++))->data;
|
BulbGlowFXData* effectData = ((EffectInstance*) evt_get_variable(script, *args++))->data.bulbGlow;
|
||||||
|
|
||||||
effectData->pos.x = x;
|
effectData->pos.x = x;
|
||||||
effectData->pos.y = y;
|
effectData->pos.y = y;
|
||||||
|
@ -230,16 +230,16 @@ ApiStatus UpdateCrystalBitEffect(Evt* script, s32 isInitialCall) {
|
|||||||
ActorPart* actorPart = get_actor_part(actor, 1);
|
ActorPart* actorPart = get_actor_part(actor, 1);
|
||||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args);
|
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args);
|
||||||
|
|
||||||
((MiscParticlesFXData*)effect->data)->scaleX = actorPart->scale.x * 24.0f;
|
effect->data.miscParticles->scaleX = actorPart->scale.x * 24.0f;
|
||||||
((MiscParticlesFXData*)effect->data)->scaleY = actorPart->scale.y * 24.0f;
|
effect->data.miscParticles->scaleY = actorPart->scale.y * 24.0f;
|
||||||
if (actorPart->flags & ACTOR_PART_FLAG_INVISIBLE) {
|
if (actorPart->flags & ACTOR_PART_FLAG_INVISIBLE) {
|
||||||
((MiscParticlesFXData*)effect->data)->pos.x = actor->currentPos.x;
|
effect->data.miscParticles->pos.x = actor->currentPos.x;
|
||||||
((MiscParticlesFXData*)effect->data)->pos.y = -1000.0f;
|
effect->data.miscParticles->pos.y = -1000.0f;
|
||||||
((MiscParticlesFXData*)effect->data)->pos.z = actor->currentPos.z;
|
effect->data.miscParticles->pos.z = actor->currentPos.z;
|
||||||
} else {
|
} else {
|
||||||
((MiscParticlesFXData*)effect->data)->pos.x = actor->currentPos.x;
|
effect->data.miscParticles->pos.x = actor->currentPos.x;
|
||||||
((MiscParticlesFXData*)effect->data)->pos.y = actor->currentPos.y;
|
effect->data.miscParticles->pos.y = actor->currentPos.y;
|
||||||
((MiscParticlesFXData*)effect->data)->pos.z = actor->currentPos.z;
|
effect->data.miscParticles->pos.z = actor->currentPos.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
return ApiStatus_BLOCK;
|
||||||
|
@ -171,12 +171,12 @@ ApiStatus func_80218280_6609D0(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args);
|
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args);
|
||||||
|
|
||||||
((HuffPuffBreathFXData*)effect->data)->unk_18 = 0xF8;
|
effect->data.huffPuffBreath->unk_18 = 0xF8;
|
||||||
((HuffPuffBreathFXData*)effect->data)->unk_1C = 0xF8;
|
effect->data.huffPuffBreath->unk_1C = 0xF8;
|
||||||
((HuffPuffBreathFXData*)effect->data)->unk_20 = 0xFF;
|
effect->data.huffPuffBreath->unk_20 = 0xFF;
|
||||||
((HuffPuffBreathFXData*)effect->data)->unk_28 = 0x80;
|
effect->data.huffPuffBreath->unk_28 = 0x80;
|
||||||
((HuffPuffBreathFXData*)effect->data)->unk_2C = 0xE0;
|
effect->data.huffPuffBreath->unk_2C = 0xE0;
|
||||||
((HuffPuffBreathFXData*)effect->data)->unk_30 = 0xFF;
|
((HuffPuffBreathFXData*)effect->data.huffPuffBreath)->unk_30 = 0xFF;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,12 +184,12 @@ ApiStatus func_802182E4_660A34(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args);
|
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args);
|
||||||
|
|
||||||
((LightningBoltFXData*)effect->data)->unk_30 = 0xFF;
|
effect->data.lightningBolt->unk_30 = 0xFF;
|
||||||
((LightningBoltFXData*)effect->data)->unk_34 = 0xFF;
|
effect->data.lightningBolt->unk_34 = 0xFF;
|
||||||
((LightningBoltFXData*)effect->data)->unk_38 = 0xFF;
|
effect->data.lightningBolt->unk_38 = 0xFF;
|
||||||
((LightningBoltFXData*)effect->data)->unk_40 = 0xC8;
|
effect->data.lightningBolt->unk_40 = 0xC8;
|
||||||
((LightningBoltFXData*)effect->data)->unk_44 = 0xF0;
|
effect->data.lightningBolt->unk_44 = 0xF0;
|
||||||
((LightningBoltFXData*)effect->data)->unk_48 = 0xFF;
|
effect->data.lightningBolt->unk_48 = 0xFF;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,12 +197,12 @@ ApiStatus func_80218344_660A94(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
|
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
|
||||||
|
|
||||||
((ColdBreathFXData*)effect->data)->unk_18 = 0xFF;
|
effect->data.coldBreath->unk_18 = 0xFF;
|
||||||
((ColdBreathFXData*)effect->data)->unk_1C = 0xFF;
|
effect->data.coldBreath->unk_1C = 0xFF;
|
||||||
((ColdBreathFXData*)effect->data)->unk_20 = 0xFF;
|
effect->data.coldBreath->unk_20 = 0xFF;
|
||||||
((ColdBreathFXData*)effect->data)->unk_28 = 0xC8;
|
effect->data.coldBreath->unk_28 = 0xC8;
|
||||||
((ColdBreathFXData*)effect->data)->unk_2C = 0xF0;
|
effect->data.coldBreath->unk_2C = 0xF0;
|
||||||
((ColdBreathFXData*)effect->data)->unk_30 = 0xFF;
|
effect->data.coldBreath->unk_30 = 0xFF;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,17 +8,6 @@
|
|||||||
|
|
||||||
#define NAMESPACE b_area_sam2_monstar
|
#define NAMESPACE b_area_sam2_monstar
|
||||||
|
|
||||||
// probably the same as FoldImageRecPart
|
|
||||||
typedef struct UnknownMonstarStruct {
|
|
||||||
/* 0x00 */ u8* raster;
|
|
||||||
/* 0x04 */ u8* palette;
|
|
||||||
/* 0x08 */ u16 width;
|
|
||||||
/* 0x0A */ u16 height;
|
|
||||||
/* 0x0C */ s32 unk_0C;
|
|
||||||
/* 0x10 */ s32 unk_10;
|
|
||||||
/* 0x14 */ Gfx* dlist;
|
|
||||||
} UnknownMonstarStruct; // size = 0x18;
|
|
||||||
|
|
||||||
extern Gfx N(dlist)[];
|
extern Gfx N(dlist)[];
|
||||||
|
|
||||||
extern EvtScript N(init);
|
extern EvtScript N(init);
|
||||||
@ -148,13 +137,14 @@ EvtScript N(init) = {
|
|||||||
#include "battle/area_sam2/actor/img.png.inc.c"
|
#include "battle/area_sam2/actor/img.png.inc.c"
|
||||||
#include "battle/area_sam2/actor/img.pal.inc.c"
|
#include "battle/area_sam2/actor/img.pal.inc.c"
|
||||||
|
|
||||||
UnknownMonstarStruct D_8021A2B8_63F498 = {
|
FoldImageRecPart D_8021A2B8_63F498 = {
|
||||||
.raster = battle_area_sam2_actor_img_png,
|
.raster = battle_area_sam2_actor_img_png,
|
||||||
.palette = battle_area_sam2_actor_img_pal,
|
.palette = battle_area_sam2_actor_img_pal,
|
||||||
.width = battle_area_sam2_actor_img_png_width,
|
.width = battle_area_sam2_actor_img_png_width,
|
||||||
.height = battle_area_sam2_actor_img_png_height,
|
.height = battle_area_sam2_actor_img_png_height,
|
||||||
.unk_0C = -4,
|
.xOffset = -1,
|
||||||
.unk_10 = 0,
|
.yOffset = -4,
|
||||||
|
.opacity = 0,
|
||||||
.dlist = N(dlist),
|
.dlist = N(dlist),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ ApiStatus N(UnkTattleEffectFunc1)(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
||||||
|
|
||||||
((EffectInstanceData*)effect->data)->pos.y = -1000.0f;
|
effect->data.tattleWindow->pos.y = -1000.0f;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ ApiStatus N(UnkTattleEffectFunc2)(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
||||||
|
|
||||||
((EffectInstanceData*)effect->data)->pos.y = 144.0f;
|
effect->data.tattleWindow->pos.y = 144.0f;
|
||||||
effect->flags |= EFFECT_INSTANCE_FLAGS_10;
|
effect->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -45,9 +45,9 @@ ApiStatus N(UnkWattEffectFunc1)(Evt* script, s32 isInitialCall) {
|
|||||||
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
|
wattEffectData->effect2->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||||
wattEffectData->effect2 = NULL;
|
wattEffectData->effect2 = NULL;
|
||||||
}
|
}
|
||||||
((StaticStatusFXData*)wattEffectData->effect1->data)->unk_04 = x;
|
wattEffectData->effect1->data.staticStatus->unk_04 = x;
|
||||||
((StaticStatusFXData*)wattEffectData->effect1->data)->unk_08 = y;
|
wattEffectData->effect1->data.staticStatus->unk_08 = y;
|
||||||
((StaticStatusFXData*)wattEffectData->effect1->data)->unk_0C = z;
|
wattEffectData->effect1->data.staticStatus->unk_0C = z;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (wattEffectData->effect1 != NULL) {
|
if (wattEffectData->effect1 != NULL) {
|
||||||
@ -58,9 +58,9 @@ ApiStatus N(UnkWattEffectFunc1)(Evt* script, s32 isInitialCall) {
|
|||||||
wattEffectData->effect2 = fx_static_status(1, x, y, z, (actor->debuff != STATUS_SHRINK) ? 1.0f : 0.4f, 5, 0);
|
wattEffectData->effect2 = fx_static_status(1, x, y, z, (actor->debuff != STATUS_SHRINK) ? 1.0f : 0.4f, 5, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
((StaticStatusFXData*)wattEffectData->effect2->data)->unk_04 = x;
|
wattEffectData->effect2->data.staticStatus->unk_04 = x;
|
||||||
((StaticStatusFXData*)wattEffectData->effect2->data)->unk_08 = y;
|
wattEffectData->effect2->data.staticStatus->unk_08 = y;
|
||||||
((StaticStatusFXData*)wattEffectData->effect2->data)->unk_0C = z;
|
wattEffectData->effect2->data.staticStatus->unk_0C = z;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_7333BC)(Evt* script, s32 isInitialCall) {
|
|||||||
partner->koDuration = 0;
|
partner->koDuration = 0;
|
||||||
}
|
}
|
||||||
if (partner->koDuration > 0) {
|
if (partner->koDuration > 0) {
|
||||||
((DisableXFXData*)partner->debuffEffect->data)->unk_3C = partner->koDuration;
|
partner->debuffEffect->data.disableX->unk_3C = partner->koDuration;
|
||||||
} else {
|
} else {
|
||||||
partner->koStatus = 0;
|
partner->koStatus = 0;
|
||||||
dispatch_event_partner(EVENT_34);
|
dispatch_event_partner(EVENT_RECOVER_PARTNER);
|
||||||
((DisableXFXData*)partner->debuffEffect->data)->unk_3C = 0;
|
partner->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -38,12 +38,12 @@ ApiStatus N(func_802A12E0_72AA30)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
effect = fx_cold_breath(0, a, b, c, 1.0f, 30);
|
effect = fx_cold_breath(0, a, b, c, 1.0f, 30);
|
||||||
|
|
||||||
((ColdBreathFXData*)effect->data)->unk_18 = 244;
|
effect->data.coldBreath->unk_18 = 244;
|
||||||
((ColdBreathFXData*)effect->data)->unk_1C = 244;
|
effect->data.coldBreath->unk_1C = 244;
|
||||||
((ColdBreathFXData*)effect->data)->unk_20 = 220;
|
effect->data.coldBreath->unk_20 = 220;
|
||||||
((ColdBreathFXData*)effect->data)->unk_28 = 210;
|
effect->data.coldBreath->unk_28 = 210;
|
||||||
((ColdBreathFXData*)effect->data)->unk_2C = 210;
|
effect->data.coldBreath->unk_2C = 210;
|
||||||
((ColdBreathFXData*)effect->data)->unk_30 = 190;
|
effect->data.coldBreath->unk_30 = 190;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_72E81C)(Evt* script, s32 isInitialCall) {
|
|||||||
partner->koDuration = 0;
|
partner->koDuration = 0;
|
||||||
}
|
}
|
||||||
if (partner->koDuration > 0) {
|
if (partner->koDuration > 0) {
|
||||||
((DisableXFXData*)partner->debuffEffect->data)->unk_3C = partner->koDuration;
|
partner->debuffEffect->data.disableX->unk_3C = partner->koDuration;
|
||||||
} else {
|
} else {
|
||||||
partner->koStatus = 0;
|
partner->koStatus = 0;
|
||||||
dispatch_event_partner(EVENT_34);
|
dispatch_event_partner(EVENT_RECOVER_PARTNER);
|
||||||
((DisableXFXData*)partner->debuffEffect->data)->unk_3C = 0;
|
partner->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_715B3C)(Evt* script, s32 isInitialCall) {
|
|||||||
partner->koDuration = 0;
|
partner->koDuration = 0;
|
||||||
}
|
}
|
||||||
if (partner->koDuration > 0) {
|
if (partner->koDuration > 0) {
|
||||||
((DisableXFXData*)partner->debuffEffect->data)->unk_3C = partner->koDuration;
|
partner->debuffEffect->data.disableX->unk_3C = partner->koDuration;
|
||||||
} else {
|
} else {
|
||||||
partner->koStatus = 0;
|
partner->koStatus = 0;
|
||||||
dispatch_event_partner(EVENT_34);
|
dispatch_event_partner(EVENT_RECOVER_PARTNER);
|
||||||
((DisableXFXData*)partner->debuffEffect->data)->unk_3C = 0;
|
partner->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_724FCC)(Evt* script, s32 isInitialCall) {
|
|||||||
partner->koDuration = 0;
|
partner->koDuration = 0;
|
||||||
}
|
}
|
||||||
if (partner->koDuration > 0) {
|
if (partner->koDuration > 0) {
|
||||||
((DisableXFXData*)partner->debuffEffect->data)->unk_3C = partner->koDuration;
|
partner->debuffEffect->data.disableX->unk_3C = partner->koDuration;
|
||||||
} else {
|
} else {
|
||||||
partner->koStatus = 0;
|
partner->koStatus = 0;
|
||||||
dispatch_event_partner(EVENT_34);
|
dispatch_event_partner(EVENT_RECOVER_PARTNER);
|
||||||
((DisableXFXData*)partner->debuffEffect->data)->unk_3C = 0;
|
partner->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -64,7 +64,7 @@ ApiStatus N(func_802A1378_725058)(Evt* script, s32 isInitialCall) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
((DisableXFXData*)actor->debuffEffect->data)->unk_3C = 0;
|
actor->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
btl_update_ko_status();
|
btl_update_ko_status();
|
||||||
|
@ -24,7 +24,7 @@ ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall) {
|
|||||||
case ACTOR_CLASS_PARTNER:
|
case ACTOR_CLASS_PARTNER:
|
||||||
dispatch_event_partner(EVENT_RECOVER_STATUS);
|
dispatch_event_partner(EVENT_RECOVER_STATUS);
|
||||||
}
|
}
|
||||||
((DisableXFXData*)actor->debuffEffect->data)->unk_3C = 0;
|
actor->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -560,7 +560,7 @@ EvtScript N(handleEvent_802387F0) = {
|
|||||||
EVT_CASE_EQ(EVENT_33)
|
EVT_CASE_EQ(EVENT_33)
|
||||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_12)
|
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_12)
|
||||||
EVT_EXEC_WAIT(D_80296014)
|
EVT_EXEC_WAIT(D_80296014)
|
||||||
EVT_CASE_EQ(EVENT_34)
|
EVT_CASE_EQ(EVENT_RECOVER_PARTNER)
|
||||||
EVT_SET_CONST(LW(0), 1)
|
EVT_SET_CONST(LW(0), 1)
|
||||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_4)
|
EVT_SET_CONST(LW(1), NPC_ANIM_battle_bombette_Palette_00_Anim_4)
|
||||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_bombette_Palette_00_Anim_8)
|
EVT_SET_CONST(LW(2), NPC_ANIM_battle_bombette_Palette_00_Anim_8)
|
||||||
|
@ -177,7 +177,7 @@ ApiStatus func_80238E04_6F1EE4(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus func_80238E48_6F1F28(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80238E48_6F1F28(Evt* script, s32 isInitialCall) {
|
||||||
EffectInstance* effect = D_8023CDA0;
|
EffectInstance* effect = D_8023CDA0;
|
||||||
|
|
||||||
((EffectInstanceData*)effect->data)->pos.y = 144.0f;
|
effect->data.tattleWindow->pos.y = 144.0f;
|
||||||
effect->flags |= EFFECT_INSTANCE_FLAGS_10;
|
effect->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -123,7 +123,7 @@ EvtScript N(handleEvent_8023819C) = {
|
|||||||
EVT_SET_CONST(LW(1), NPC_ANIM_goompa_Palette_00_Anim_7)
|
EVT_SET_CONST(LW(1), NPC_ANIM_goompa_Palette_00_Anim_7)
|
||||||
EVT_EXEC_WAIT(DoNormalHit)
|
EVT_EXEC_WAIT(DoNormalHit)
|
||||||
EVT_CASE_EQ(EVENT_33)
|
EVT_CASE_EQ(EVENT_33)
|
||||||
EVT_CASE_EQ(EVENT_34)
|
EVT_CASE_EQ(EVENT_RECOVER_PARTNER)
|
||||||
EVT_SET_CONST(LW(0), 1)
|
EVT_SET_CONST(LW(0), 1)
|
||||||
EVT_SET_CONST(LW(1), NPC_ANIM_goompa_Palette_00_Anim_1)
|
EVT_SET_CONST(LW(1), NPC_ANIM_goompa_Palette_00_Anim_1)
|
||||||
EVT_SET_CONST(LW(2), NPC_ANIM_goompa_Palette_00_Anim_3)
|
EVT_SET_CONST(LW(2), NPC_ANIM_goompa_Palette_00_Anim_3)
|
||||||
|
@ -317,7 +317,7 @@ EvtScript N(handleEvent_802385E0) = {
|
|||||||
EVT_CASE_EQ(EVENT_33)
|
EVT_CASE_EQ(EVENT_33)
|
||||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_11)
|
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_11)
|
||||||
EVT_EXEC_WAIT(D_80296014)
|
EVT_EXEC_WAIT(D_80296014)
|
||||||
EVT_CASE_EQ(EVENT_34)
|
EVT_CASE_EQ(EVENT_RECOVER_PARTNER)
|
||||||
EVT_SET_CONST(LW(0), 1)
|
EVT_SET_CONST(LW(0), 1)
|
||||||
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_4)
|
EVT_SET_CONST(LW(1), NPC_ANIM_battle_kooper_Palette_00_Anim_4)
|
||||||
EVT_SET_CONST(LW(2), NPC_ANIM_battle_kooper_Palette_00_Anim_6)
|
EVT_SET_CONST(LW(2), NPC_ANIM_battle_kooper_Palette_00_Anim_6)
|
||||||
|
@ -53,7 +53,6 @@ ApiStatus func_80238C14_70C924(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus func_80238C58_70C968(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80238C58_70C968(Evt* script, s32 isInitialCall) {
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
Actor* actor = battleStatus->playerActor;
|
Actor* actor = battleStatus->playerActor;
|
||||||
EffectInstanceData* effectData; // TODO remove this struct and replace it with the effect-specific one
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
script->functionTemp[0] = 0;
|
script->functionTemp[0] = 0;
|
||||||
@ -69,8 +68,7 @@ ApiStatus func_80238C58_70C968(Evt* script, s32 isInitialCall) {
|
|||||||
if (D_8023D1E0 >= 1.0) {
|
if (D_8023D1E0 >= 1.0) {
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
effectData = battleStatus->cloudNineEffect->data;
|
battleStatus->cloudNineEffect->data.endingDecals->unk_10 += 0.2;
|
||||||
effectData->rotation.x += 0.2;
|
|
||||||
D_8023D1E0 += 0.2;
|
D_8023D1E0 += 0.2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ ApiStatus func_8023859C_70408C(Evt* script, s32 isInitialCall) {
|
|||||||
ThunderboltRingFXData* data;
|
ThunderboltRingFXData* data;
|
||||||
|
|
||||||
D_8023C1B4 = fx_thunderbolt_ring(0, var1, var2, var3, 1.0f, 10);
|
D_8023C1B4 = fx_thunderbolt_ring(0, var1, var2, var3, 1.0f, 10);
|
||||||
data = D_8023C1B4->data;
|
data = D_8023C1B4->data.thunderboltRing;
|
||||||
data->unk_30 = 3;
|
data->unk_30 = 3;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -106,7 +106,7 @@ ApiStatus func_80238668_704158(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
script->functionTemp[0]--;
|
script->functionTemp[0]--;
|
||||||
if (script->functionTemp[0] == 0) {
|
if (script->functionTemp[0] == 0) {
|
||||||
((BulbGlowFXData*)D_8023C1B0->data)->unk_14 = 5;
|
D_8023C1B0->data.bulbGlow->unk_14 = 5;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ ApiStatus func_80238B3C_70462C(Evt* script, s32 isInitialCall) {
|
|||||||
ThunderboltRingFXData* data;
|
ThunderboltRingFXData* data;
|
||||||
|
|
||||||
D_8023C1B4 = fx_thunderbolt_ring(0, var1, var2, var3, 1.0f, 60);
|
D_8023C1B4 = fx_thunderbolt_ring(0, var1, var2, var3, 1.0f, 60);
|
||||||
data = D_8023C1B4->data;
|
data = D_8023C1B4->data.thunderboltRing;
|
||||||
data->unk_30 = 2;
|
data->unk_30 = 2;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -22,7 +22,7 @@ ApiStatus func_802A17D4_78BDD4(Evt* script, s32 isInitialCall) {
|
|||||||
if (actor->koStatus != 0) {
|
if (actor->koStatus != 0) {
|
||||||
actor->koDuration = 0;
|
actor->koDuration = 0;
|
||||||
actor->koStatus = 0;
|
actor->koStatus = 0;
|
||||||
((DisableXFXData*)actor->debuffEffect->data)->unk_3C = 0;
|
actor->debuffEffect->data.disableX->unk_3C = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
btl_update_ko_status();
|
btl_update_ko_status();
|
||||||
|
@ -151,8 +151,8 @@ BSS s8 D_800A0B94;
|
|||||||
BSS char D_800A0B98[0x8];
|
BSS char D_800A0B98[0x8];
|
||||||
BSS s32 D_800A0BA0;
|
BSS s32 D_800A0BA0;
|
||||||
BSS float D_800A0BA4;
|
BSS float D_800A0BA4;
|
||||||
BSS s32 D_800A0BA8;
|
BSS s32 WorldMerleeOrbEffect;
|
||||||
BSS s32 D_800A0BAC;
|
BSS s32 WorldMerleeWaveEffect;
|
||||||
BSS s32 D_800A0BB0;
|
BSS s32 D_800A0BB0;
|
||||||
BSS s32 D_800A0BB4;
|
BSS s32 D_800A0BB4;
|
||||||
BSS s16 D_800A0BB8;
|
BSS s16 D_800A0BB8;
|
||||||
|
@ -95,7 +95,7 @@ BSS s8 texPannerMainU[0x40];
|
|||||||
BSS s8 texPannerMainV[0x40];
|
BSS s8 texPannerMainV[0x40];
|
||||||
BSS s8 texPannerAuxU[0x40];
|
BSS s8 texPannerAuxU[0x40];
|
||||||
BSS s8 texPannerAuxV[0x40];
|
BSS s8 texPannerAuxV[0x40];
|
||||||
BSS s32 mdl_nextTextureAddress;
|
BSS void* mdl_nextTextureAddress;
|
||||||
BSS s16 mdl_currentTransformGroupChildIndex;
|
BSS s16 mdl_currentTransformGroupChildIndex;
|
||||||
BSS s16 D_8015336E;
|
BSS s16 D_8015336E;
|
||||||
BSS s32 D_80153370;
|
BSS s32 D_80153370;
|
||||||
|
@ -14,7 +14,7 @@ ApiStatus N(ShrinkActor)(Evt* script, s32 isInitialCall) {
|
|||||||
EffectInstance* effect = fx_shape_spell(0, var1, (f32) var2 + 5.0, var3, var4, var5, var6, var7);
|
EffectInstance* effect = fx_shape_spell(0, var1, (f32) var2 + 5.0, var3, var4, var5, var6, var7);
|
||||||
|
|
||||||
if (actor->debuff == STATUS_SHRINK) {
|
if (actor->debuff == STATUS_SHRINK) {
|
||||||
((FootprintFXData*)effect->data)->unk_28 = 0.4f;
|
effect->data.footprint->unk_28 = 0.4f;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -15,12 +15,12 @@ ApiStatus N(UnkEffect6FFunc)(Evt* script, s32 isInitialCall) {
|
|||||||
s32 temp_s0_9 = evt_get_variable(script, *args++);
|
s32 temp_s0_9 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
effect = fx_cold_breath(1, temp_s6, temp_s5, temp_s4, temp_f20, temp_s2);
|
effect = fx_cold_breath(1, temp_s6, temp_s5, temp_s4, temp_f20, temp_s2);
|
||||||
((Effect6FFXData*)effect->data)->rotation.z = temp_s3;
|
effect->data.coldBreath->unk_18 = temp_s3;
|
||||||
((Effect6FFXData*)effect->data)->scale.x = temp_s1;
|
effect->data.coldBreath->unk_1C = temp_s1;
|
||||||
((Effect6FFXData*)effect->data)->scale.y = temp_s0_9;
|
effect->data.coldBreath->unk_20 = temp_s0_9;
|
||||||
((Effect6FFXData*)effect->data)->color.x = 255;
|
effect->data.coldBreath->unk_28 = 255;
|
||||||
((Effect6FFXData*)effect->data)->color.y = 255;
|
effect->data.coldBreath->unk_2C = 255;
|
||||||
((Effect6FFXData*)effect->data)->color.z = 255;
|
effect->data.coldBreath->unk_30 = 255;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "effects.h"
|
||||||
|
|
||||||
ApiStatus N(UnkFireBreathFXFunc)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkFireBreathFXFunc)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
|
||||||
FireBreathFXData* data = (FireBreathFXData*)effect->data;
|
FireBreathFXData* data = effect->data.fireBreath;
|
||||||
|
|
||||||
data->scale = 0.04f;
|
data->scale = 0.04f;
|
||||||
data->unk_30 = 0.04f;
|
data->unk_30 = 0.04f;
|
||||||
((FireBreathFXData*)effect->data)->unk_34 = 1.875f;
|
effect->data.fireBreath->unk_34 = 1.875f;
|
||||||
((FireBreathFXData*)effect->data)->scaleChangeFactor = 0.05f;
|
effect->data.fireBreath->scaleChangeFactor = 0.05f;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "effects.h"
|
||||||
|
|
||||||
ApiStatus N(UnkLightningFXFunc)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkLightningFXFunc)(Evt* script, s32 isInitialCall) {
|
||||||
EffectInstance* effect = (EffectInstance*)script->varTable[15];
|
EffectInstance* effect = (EffectInstance*)script->varTable[15];
|
||||||
|
|
||||||
((LightningFXData*)effect->data)->unk_30 = 85;
|
effect->data.lightning->unk_30 = 85;
|
||||||
((LightningFXData*)effect->data)->unk_34 = 42;
|
effect->data.lightning->unk_34 = 42;
|
||||||
((LightningFXData*)effect->data)->unk_38 = 255;
|
effect->data.lightning->unk_38 = 255;
|
||||||
((LightningFXData*)effect->data)->unk_40 = 255;
|
effect->data.lightning->unk_40 = 255;
|
||||||
((LightningFXData*)effect->data)->unk_44 = 175;
|
effect->data.lightning->unk_44 = 175;
|
||||||
((LightningFXData*)effect->data)->unk_48 = 239;
|
effect->data.lightning->unk_48 = 239;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,12 @@ ApiStatus N(UnkWaterFountainFunc)(Evt* script, s32 isInitialCall) {
|
|||||||
temp_f20_2 = atan2(temp_f28, temp_f26, temp_f20, temp_f22 + 40.0f);
|
temp_f20_2 = atan2(temp_f28, temp_f26, temp_f20, temp_f22 + 40.0f);
|
||||||
|
|
||||||
effect = fx_water_fountain(0, temp_f20 - 10.0f, temp_f22 + 60.0f, temp_f24 + 20.0f, 2.5f, 40);
|
effect = fx_water_fountain(0, temp_f20 - 10.0f, temp_f22 + 60.0f, temp_f24 + 20.0f, 2.5f, 40);
|
||||||
((WaterFountainFXData*)effect->data)->unk_38 = temp_f20_2;
|
effect->data.waterFountain->unk_38 = temp_f20_2;
|
||||||
((WaterFountainFXData*)effect->data)->unk_18 = 2;
|
effect->data.waterFountain->unk_18 = 2;
|
||||||
((WaterFountainFXData*)effect->data)->unk_1C = 2;
|
effect->data.waterFountain->unk_1C = 2;
|
||||||
((WaterFountainFXData*)effect->data)->unk_20 = 2;
|
effect->data.waterFountain->unk_20 = 2;
|
||||||
((WaterFountainFXData*)effect->data)->unk_28 = 80;
|
effect->data.waterFountain->unk_28 = 80;
|
||||||
((WaterFountainFXData*)effect->data)->unk_2C = 80;
|
effect->data.waterFountain->unk_2C = 80;
|
||||||
((WaterFountainFXData*)effect->data)->unk_30 = 80;
|
effect->data.waterFountain->unk_30 = 80;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -397,7 +397,7 @@ void fold_init_state(FoldState* state) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void fold_update(u32 idx, FoldType arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6) {
|
void fold_update(u32 idx, FoldType type, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6) {
|
||||||
FoldState* state = &(*D_80156954)[idx];
|
FoldState* state = &(*D_80156954)[idx];
|
||||||
s32 oldFlags;
|
s32 oldFlags;
|
||||||
s32 t1;
|
s32 t1;
|
||||||
@ -406,9 +406,9 @@ void fold_update(u32 idx, FoldType arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (arg1) {
|
switch (type) {
|
||||||
case 0:
|
case FOLD_TYPE_NONE:
|
||||||
case 3:
|
case FOLD_TYPE_3:
|
||||||
oldFlags = state->flags;
|
oldFlags = state->flags;
|
||||||
fold_clear_state_gfx(state);
|
fold_clear_state_gfx(state);
|
||||||
fold_init_state(state);
|
fold_init_state(state);
|
||||||
@ -427,38 +427,38 @@ void fold_update(u32 idx, FoldType arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5,
|
|||||||
state->flags = state->flags; // required to match
|
state->flags = state->flags; // required to match
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 1:
|
case FOLD_TYPE_1:
|
||||||
state->unk_05 = 0;
|
state->unk_05 = 0;
|
||||||
state->renderType = 0;
|
state->renderType = 0;
|
||||||
state->unk_1C[0][0] = -1;
|
state->unk_1C[0][0] = -1;
|
||||||
return;
|
return;
|
||||||
case 2:
|
case FOLD_TYPE_2:
|
||||||
state->unk_06 = 0;
|
state->unk_06 = 0;
|
||||||
state->meshType = 0;
|
state->meshType = 0;
|
||||||
state->unk_1C[1][0] = -1;
|
state->unk_1C[1][0] = -1;
|
||||||
return;
|
return;
|
||||||
case 17:
|
case FOLD_TYPE_11:
|
||||||
if (state->buf != NULL) {
|
if (state->buf != NULL) {
|
||||||
heap_free(state->buf);
|
heap_free(state->buf);
|
||||||
}
|
}
|
||||||
state->bufSize = arg2 * 4;
|
state->bufSize = arg2 * 4;
|
||||||
state->buf = heap_malloc(state->bufSize);
|
state->buf = heap_malloc(state->bufSize);
|
||||||
return;
|
return;
|
||||||
case 15:
|
case FOLD_TYPE_F:
|
||||||
case 16:
|
case FOLD_TYPE_10:
|
||||||
if (arg1 == state->unk_06 && arg2 == state->unk_1C[1][0] && arg3 == state->unk_1C[1][1]) {
|
if (type == state->unk_06 && arg2 == state->unk_1C[1][0] && arg3 == state->unk_1C[1][1]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case FOLD_TYPE_5:
|
||||||
if (state->unk_05 == arg1 && state->unk_1C[0][0] == arg2 && state->unk_1C[0][1] == arg3 &&
|
if (state->unk_05 == type && state->unk_1C[0][0] == arg2 && state->unk_1C[0][1] == arg3 &&
|
||||||
state->unk_1C[0][2] == arg4)
|
state->unk_1C[0][2] == arg4)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (arg1 != 0xD && state->unk_06 == 0xD) {
|
if (type != FOLD_TYPE_D && state->unk_06 == 0xD) {
|
||||||
state->meshType = 0;
|
state->meshType = 0;
|
||||||
state->subdivX = 1;
|
state->subdivX = 1;
|
||||||
state->subdivY = 1;
|
state->subdivY = 1;
|
||||||
@ -466,18 +466,18 @@ void fold_update(u32 idx, FoldType arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg1 != 5 && state->unk_05 == 5) {
|
if (type != FOLD_TYPE_5 && state->unk_05 == 5) {
|
||||||
state->unk_05 = 0;
|
state->unk_05 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg1 == 4 || arg1 == 5) {
|
if (type == FOLD_TYPE_4 || type == FOLD_TYPE_5) {
|
||||||
state->unk_05 = arg1;
|
state->unk_05 = type;
|
||||||
state->unk_1C[0][0] = arg2;
|
state->unk_1C[0][0] = arg2;
|
||||||
state->unk_1C[0][1] = arg3;
|
state->unk_1C[0][1] = arg3;
|
||||||
state->unk_1C[0][2] = arg4;
|
state->unk_1C[0][2] = arg4;
|
||||||
state->unk_1C[0][3] = arg5;
|
state->unk_1C[0][3] = arg5;
|
||||||
} else if (arg1 >= 6 && arg1 <= 16) {
|
} else if (type >= FOLD_TYPE_6 && type <= FOLD_TYPE_10) {
|
||||||
state->unk_06 = arg1;
|
state->unk_06 = type;
|
||||||
state->unk_1C[1][0] = arg2;
|
state->unk_1C[1][0] = arg2;
|
||||||
state->unk_1C[1][1] = arg3;
|
state->unk_1C[1][1] = arg3;
|
||||||
state->unk_1C[1][2] = arg4;
|
state->unk_1C[1][2] = arg4;
|
||||||
@ -490,27 +490,27 @@ void fold_update(u32 idx, FoldType arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5,
|
|||||||
}
|
}
|
||||||
state->meshType = 0;
|
state->meshType = 0;
|
||||||
|
|
||||||
switch (arg1) {
|
switch (type) {
|
||||||
case 3:
|
case FOLD_TYPE_3:
|
||||||
state->meshType = 0;
|
state->meshType = 0;
|
||||||
state->renderType = 0;
|
state->renderType = 0;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case FOLD_TYPE_4:
|
||||||
state->subdivX = 4;
|
state->subdivX = 4;
|
||||||
state->subdivY = 4;
|
state->subdivY = 4;
|
||||||
state->meshType = 1;
|
state->meshType = 1;
|
||||||
func_8013EE48(state);
|
func_8013EE48(state);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case FOLD_TYPE_5:
|
||||||
state->meshType = 2;
|
state->meshType = 2;
|
||||||
state->renderType = 0xB;
|
state->renderType = 0xB;
|
||||||
state->unk_3C[0][0] = 0.0f;
|
state->unk_3C[0][0] = 0.0f;
|
||||||
state->unk_3C[0][1] = 0.0f;
|
state->unk_3C[0][1] = 0.0f;
|
||||||
state->flags |= FOLD_STATE_FLAG_200;
|
state->flags |= FOLD_STATE_FLAG_200;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case FOLD_TYPE_6:
|
||||||
case 7:
|
case FOLD_TYPE_7:
|
||||||
case 8:
|
case FOLD_TYPE_8:
|
||||||
if (arg2 >= 0xFF && arg3 >= 0xFF && arg4 >= 0xFF && arg5 >= 0xFF) {
|
if (arg2 >= 0xFF && arg3 >= 0xFF && arg4 >= 0xFF && arg5 >= 0xFF) {
|
||||||
state->renderType = 0;
|
state->renderType = 0;
|
||||||
} else if (arg5 >= 0xFF) {
|
} else if (arg5 >= 0xFF) {
|
||||||
@ -521,15 +521,15 @@ void fold_update(u32 idx, FoldType arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5,
|
|||||||
state->renderType = 3;
|
state->renderType = 3;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 9:
|
case FOLD_TYPE_9:
|
||||||
case 10:
|
case FOLD_TYPE_A:
|
||||||
if (arg5 == 255.0) {
|
if (arg5 == 255.0) {
|
||||||
state->renderType = 4;
|
state->renderType = 4;
|
||||||
} else {
|
} else {
|
||||||
state->renderType = 5;
|
state->renderType = 5;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 11:
|
case FOLD_TYPE_B:
|
||||||
if (arg2 < state->bufSize) {
|
if (arg2 < state->bufSize) {
|
||||||
t1 = (u32) arg3 >> 0x18; // required to match
|
t1 = (u32) arg3 >> 0x18; // required to match
|
||||||
state->buf[arg2 * 4 + 0] = (u32) arg3 >> 0x18;
|
state->buf[arg2 * 4 + 0] = (u32) arg3 >> 0x18;
|
||||||
@ -548,7 +548,7 @@ void fold_update(u32 idx, FoldType arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 12:
|
case FOLD_TYPE_C:
|
||||||
if (arg2 < state->bufSize) {
|
if (arg2 < state->bufSize) {
|
||||||
t1 = (u32) arg3 >> 0x18; // required to match
|
t1 = (u32) arg3 >> 0x18; // required to match
|
||||||
state->buf[arg2 * 4 + 0] = t1;
|
state->buf[arg2 * 4 + 0] = t1;
|
||||||
@ -567,14 +567,14 @@ void fold_update(u32 idx, FoldType arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 13:
|
case FOLD_TYPE_D:
|
||||||
state->renderType = 0xC;
|
state->renderType = 0xC;
|
||||||
break;
|
break;
|
||||||
case 14:
|
case FOLD_TYPE_E:
|
||||||
state->renderType = 0xD;
|
state->renderType = 0xD;
|
||||||
break;
|
break;
|
||||||
case 15:
|
case FOLD_TYPE_F:
|
||||||
case 16:
|
case FOLD_TYPE_10:
|
||||||
state->meshType = 4;
|
state->meshType = 4;
|
||||||
if (arg3 >= 0xFF) {
|
if (arg3 >= 0xFF) {
|
||||||
state->renderType = 0xE;
|
state->renderType = 0xE;
|
||||||
|
@ -173,15 +173,16 @@ s32 D_8007FEB8[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// Used for unbound function points in effect structs.
|
/// Used for unbound function points in effect structs.
|
||||||
void stub_effect_delegate(EffectInstance* effectInst) {
|
void stub_effect_delegate(EffectInstance* effect) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_effect_pos_offset(EffectGraphics* effect, f32 x, f32 y, f32 z) {
|
|
||||||
EffectInstanceData* instanceData = effect->freeDelay;
|
|
||||||
|
|
||||||
instanceData->pos.x = x;
|
void set_effect_pos_offset(EffectInstance* effect, f32 x, f32 y, f32 z) {
|
||||||
instanceData->pos.y = y;
|
s32* data = effect->data.any;
|
||||||
instanceData->pos.z = z;
|
|
||||||
|
((f32*)data)[1] = x;
|
||||||
|
((f32*)data)[2] = y;
|
||||||
|
((f32*)data)[3] = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
void clear_effect_data(void) {
|
void clear_effect_data(void) {
|
||||||
@ -391,23 +392,23 @@ EffectInstance* create_effect_instance(EffectBlueprint* effectBp) {
|
|||||||
return newEffectInst;
|
return newEffectInst;
|
||||||
}
|
}
|
||||||
|
|
||||||
void remove_effect(EffectInstance* effectInstsance) {
|
void remove_effect(EffectInstance* effectInstance) {
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gEffectInstances); i++) {
|
for (i = 0; i < ARRAY_COUNT(gEffectInstances); i++) {
|
||||||
if (gEffectInstances[i] == effectInstsance) {
|
if (gEffectInstances[i] == effectInstance) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(i < ARRAY_COUNT(gEffectInstances));
|
ASSERT(i < ARRAY_COUNT(gEffectInstances));
|
||||||
|
|
||||||
if (effectInstsance->data == NULL) {
|
if (effectInstance->data.any == NULL) {
|
||||||
general_heap_free(effectInstsance);
|
general_heap_free(effectInstance);
|
||||||
gEffectInstances[i] = NULL;
|
gEffectInstances[i] = NULL;
|
||||||
} else {
|
} else {
|
||||||
general_heap_free(effectInstsance->data);
|
general_heap_free(effectInstance->data.any);
|
||||||
general_heap_free(effectInstsance);
|
general_heap_free(effectInstance);
|
||||||
gEffectInstances[i] = NULL;
|
gEffectInstances[i] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -419,8 +420,8 @@ void remove_all_effects(void) {
|
|||||||
EffectInstance* effect = gEffectInstances[i];
|
EffectInstance* effect = gEffectInstances[i];
|
||||||
|
|
||||||
if (effect != NULL && effect->flags & 4) {
|
if (effect != NULL && effect->flags & 4) {
|
||||||
if (effect->data != NULL) {
|
if (effect->data.any != NULL) {
|
||||||
general_heap_free(effect->data);
|
general_heap_free(effect->data.any);
|
||||||
}
|
}
|
||||||
general_heap_free(effect);
|
general_heap_free(effect);
|
||||||
gEffectInstances[i] = NULL;
|
gEffectInstances[i] = NULL;
|
||||||
|
@ -50,7 +50,7 @@ EffectInstance* attack_result_text_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3,
|
|||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
data = effect->data = shim_general_heap_malloc(effect->numParts * sizeof(*data));
|
data = effect->data.attackResultText = shim_general_heap_malloc(effect->numParts * sizeof(*data));
|
||||||
|
|
||||||
ASSERT(data != NULL);
|
ASSERT(data != NULL);
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ void attack_result_text_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void attack_result_text_update(EffectInstance* effect) {
|
void attack_result_text_update(EffectInstance* effect) {
|
||||||
AttackResultTextFXData* data = effect->data;
|
AttackResultTextFXData* data = effect->data.attackResultText;
|
||||||
s32 unk_00 = data->unk_00;
|
s32 unk_00 = data->unk_00;
|
||||||
s32 old_unk_1C;
|
s32 old_unk_1C;
|
||||||
s32 unk_1C;
|
s32 unk_1C;
|
||||||
|
@ -19,7 +19,7 @@ Gfx* D_E0076EB0[] = { D_090023B0, D_090023B0, D_09002410, D_09002410 };
|
|||||||
Gfx* D_E0076EC0[] = { D_090023C8, D_090023C8, D_09002428, D_09002428 };
|
Gfx* D_E0076EC0[] = { D_090023C8, D_090023C8, D_09002428, D_09002428 };
|
||||||
Gfx* D_E0076ED0[] = { D_09002000, D_09002000, D_090020E8, D_090021D0 };
|
Gfx* D_E0076ED0[] = { D_09002000, D_09002000, D_090020E8, D_090021D0 };
|
||||||
|
|
||||||
void aura_appendGfx(void* effect);
|
void aura_appendGfx(void* argEffect);
|
||||||
void aura_init(EffectInstance* effect);
|
void aura_init(EffectInstance* effect);
|
||||||
void aura_update(EffectInstance* effect);
|
void aura_update(EffectInstance* effect);
|
||||||
void aura_render(EffectInstance* effect);
|
void aura_render(EffectInstance* effect);
|
||||||
@ -42,25 +42,25 @@ void aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstance*
|
|||||||
effect = shim_create_effect_instance(bpPtr);
|
effect = shim_create_effect_instance(bpPtr);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = effect->data.aura = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.aura != NULL);
|
||||||
|
|
||||||
part->unk_64.s = 0;
|
part->renderYaw = 0.0f;
|
||||||
|
|
||||||
zero = part->unk_64.f;
|
zero = 0.0f;
|
||||||
part->unk_40 = zero;
|
part->unk_40 = zero;
|
||||||
part->unk_34 = zero;
|
part->unk_34 = zero;
|
||||||
part->unk_58 = zero;
|
part->unk_58 = zero;
|
||||||
part->unk_4C = zero;
|
part->unk_4C = zero;
|
||||||
|
|
||||||
part->unk_2C = 100;
|
part->fadeTime = 100;
|
||||||
part->type = arg0;
|
part->type = arg0;
|
||||||
part->unk_30 = 0;
|
part->lifeTime = 0;
|
||||||
part->primA = 0;
|
part->primA = 0;
|
||||||
part->pos.x = arg1;
|
part->posA.x = arg1;
|
||||||
part->pos.y = arg2;
|
part->posA.y = arg2;
|
||||||
part->pos.z = arg3;
|
part->posA.z = arg3;
|
||||||
|
|
||||||
switch (arg0) {
|
switch (arg0) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -71,9 +71,9 @@ void aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstance*
|
|||||||
part->envG = 247;
|
part->envG = 247;
|
||||||
part->engB = 155;
|
part->engB = 155;
|
||||||
part->engA = 0;
|
part->engA = 0;
|
||||||
|
part->scale.x = arg4 * 2.0;
|
||||||
|
part->scale.y = arg4 * 0.6;
|
||||||
part->unk_24 = arg4;
|
part->unk_24 = arg4;
|
||||||
part->unk_20 = arg4 * 0.6;
|
|
||||||
part->unk_1C = arg4 * 2.0;
|
|
||||||
part->unk_38 = -0.9f;
|
part->unk_38 = -0.9f;
|
||||||
part->unk_44 = 0.04f;
|
part->unk_44 = 0.04f;
|
||||||
part->unk_3C = 0.04f;
|
part->unk_3C = 0.04f;
|
||||||
@ -91,8 +91,8 @@ void aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstance*
|
|||||||
part->envG = 0;
|
part->envG = 0;
|
||||||
part->engB = 0;
|
part->engB = 0;
|
||||||
part->engA = 0;
|
part->engA = 0;
|
||||||
part->unk_1C = arg4;
|
part->scale.x = arg4;
|
||||||
part->unk_20 = arg4;
|
part->scale.y = arg4;
|
||||||
part->unk_24 = arg4;
|
part->unk_24 = arg4;
|
||||||
part->unk_38 = zero;
|
part->unk_38 = zero;
|
||||||
part->unk_50 = zero;
|
part->unk_50 = zero;
|
||||||
@ -111,8 +111,8 @@ void aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstance*
|
|||||||
part->engB = 255;
|
part->engB = 255;
|
||||||
part->envG = 0;
|
part->envG = 0;
|
||||||
part->engA = 81;
|
part->engA = 81;
|
||||||
part->unk_1C = arg4;
|
part->scale.x = arg4;
|
||||||
part->unk_20 = arg4;
|
part->scale.y = arg4;
|
||||||
part->unk_24 = arg4;
|
part->unk_24 = arg4;
|
||||||
part->unk_38 = zero;
|
part->unk_38 = zero;
|
||||||
part->unk_50 = zero;
|
part->unk_50 = zero;
|
||||||
@ -131,8 +131,8 @@ void aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstance*
|
|||||||
part->engB = 255;
|
part->engB = 255;
|
||||||
part->envG = 0;
|
part->envG = 0;
|
||||||
part->engA = 63;
|
part->engA = 63;
|
||||||
part->unk_1C = arg4;
|
part->scale.x = arg4;
|
||||||
part->unk_20 = arg4;
|
part->scale.y = arg4;
|
||||||
part->unk_24 = arg4;
|
part->unk_24 = arg4;
|
||||||
part->unk_38 = 0.0f;
|
part->unk_38 = 0.0f;
|
||||||
part->unk_50 = 0.0f;
|
part->unk_50 = 0.0f;
|
||||||
@ -145,9 +145,9 @@ void aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstance*
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
part->unk_10 = part->pos.x;
|
part->posB.x = part->posA.x;
|
||||||
part->unk_14 = part->pos.y;
|
part->posB.y = part->posA.y;
|
||||||
part->unk_18 = part->pos.z;
|
part->posB.z = part->posA.z;
|
||||||
|
|
||||||
*outEffect = effect;
|
*outEffect = effect;
|
||||||
}
|
}
|
||||||
@ -158,52 +158,52 @@ void aura_init(EffectInstance* effect) {
|
|||||||
void aura_update(EffectInstance* effect) {
|
void aura_update(EffectInstance* effect) {
|
||||||
AuraFXData* data;
|
AuraFXData* data;
|
||||||
s32 type;
|
s32 type;
|
||||||
s32 unk_2C;
|
s32 fadeTime;
|
||||||
s32 unk_30;
|
s32 lifeTime;
|
||||||
|
|
||||||
data = effect->data;
|
data = effect->data.aura;
|
||||||
if (effect->flags & 0x10) {
|
if (effect->flags & 0x10) {
|
||||||
effect->flags &= ~0x10;
|
effect->flags &= ~0x10;
|
||||||
data->unk_2C = 5;
|
data->fadeTime = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
data->unk_30++;
|
data->lifeTime++;
|
||||||
if (data->unk_30 > 324000) {
|
if (data->lifeTime > 90*60*60) {
|
||||||
data->unk_30 = 256;
|
data->lifeTime = 256;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->unk_2C <= 10) {
|
if (data->fadeTime <= 10) {
|
||||||
data->unk_2C--;
|
data->fadeTime--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->unk_2C < 0) {
|
if (data->fadeTime < 0) {
|
||||||
shim_remove_effect(effect);
|
shim_remove_effect(effect);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
type = data->type;
|
type = data->type;
|
||||||
unk_2C = data->unk_2C;
|
fadeTime = data->fadeTime;
|
||||||
unk_30 = data->unk_30;
|
lifeTime = data->lifeTime;
|
||||||
|
|
||||||
if (type < 2) {
|
if (type < 2) {
|
||||||
if (unk_30 <= 10) {
|
if (lifeTime <= 10) {
|
||||||
data->primA += (128 - data->primA) * 0.5;
|
data->primA += (128 - data->primA) * 0.5;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (unk_30 <= 10) {
|
if (lifeTime <= 10) {
|
||||||
data->primA = (unk_30 * 0xFF) / 10;
|
data->primA = (lifeTime * 0xFF) / 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unk_2C < 10) {
|
if (fadeTime < 10) {
|
||||||
data->primA *= 0.5;
|
data->primA *= 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
data->unk_38 += (data->unk_3C - data->unk_38) * 0.02;
|
data->unk_38 += (data->unk_3C - data->unk_38) * 0.02;
|
||||||
data->unk_44 += (data->unk_48 - data->unk_44) * 0.02;
|
data->unk_44 += (data->unk_48 - data->unk_44) * 0.02;
|
||||||
data->unk_1C += (data->unk_24 - data->unk_1C) * 0.04;
|
data->scale.x += (data->unk_24 - data->scale.x) * 0.04;
|
||||||
data->unk_20 += (data->unk_24 - data->unk_20) * 0.04;
|
data->scale.y += (data->unk_24 - data->scale.y) * 0.04;
|
||||||
} else {
|
} else {
|
||||||
data->unk_38 += (data->unk_3C - data->unk_38) * 0.02;
|
data->unk_38 += (data->unk_3C - data->unk_38) * 0.02;
|
||||||
data->unk_44 += (data->unk_48 - data->unk_44) * 0.02;
|
data->unk_44 += (data->unk_48 - data->unk_44) * 0.02;
|
||||||
@ -239,9 +239,9 @@ void aura_update(EffectInstance* effect) {
|
|||||||
data->unk_58 -= 128.0f;
|
data->unk_58 -= 128.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
data->unk_10 += (data->pos.x - data->unk_10) * 0.1;
|
data->posB.x += (data->posA.x - data->posB.x) * 0.1;
|
||||||
data->unk_14 += (data->pos.y - data->unk_14) * 0.1;
|
data->posB.y += (data->posA.y - data->posB.y) * 0.1;
|
||||||
data->unk_18 += (data->pos.z - data->unk_18) * 0.1;
|
data->posB.z += (data->posA.z - data->posB.z) * 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void aura_render(EffectInstance* effect) {
|
void aura_render(EffectInstance* effect) {
|
||||||
@ -263,50 +263,50 @@ void func_E007684C(void) {
|
|||||||
void func_E0076854(void) {
|
void func_E0076854(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void aura_appendGfx(void* effect) {
|
void aura_appendGfx(void* argEffect) {
|
||||||
Matrix4f sp18, sp58, sp98;
|
Matrix4f translateMtx, tempMtx, transformMtx;
|
||||||
EffectInstance* eff = (EffectInstance*)effect;
|
EffectInstance* effect = argEffect;
|
||||||
AuraFXData* data = ((EffectInstance*)effect)->data;
|
AuraFXData* data = effect->data.aura;
|
||||||
s32 type = data->type;
|
s32 type = data->type;
|
||||||
s32 primA = data->primA;
|
s32 primA = data->primA;
|
||||||
s32 v1, v2;
|
s32 v1, v2;
|
||||||
|
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0076ED0[type]);
|
gSPDisplayList(gMasterGfxPos++, D_E0076ED0[type]);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->unk_10, data->unk_14, data->unk_18);
|
shim_guTranslateF(translateMtx, data->posB.x, data->posB.y, data->posB.z);
|
||||||
if (type == 2) {
|
if (type == 2) {
|
||||||
shim_guRotateF(sp58, data->unk_64.f, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(tempMtx, data->renderYaw, 0.0f, 1.0f, 0.0f);
|
||||||
} else {
|
} else {
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(tempMtx, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
}
|
}
|
||||||
shim_guMtxCatF(sp58, sp18, sp98);
|
shim_guMtxCatF(tempMtx, translateMtx, transformMtx);
|
||||||
shim_guScaleF(sp58, data->unk_1C, data->unk_20, 1.0f);
|
shim_guScaleF(tempMtx, data->scale.x, data->scale.y, 1.0f);
|
||||||
shim_guMtxCatF(sp58, sp98, sp98);
|
shim_guMtxCatF(tempMtx, transformMtx, transformMtx);
|
||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
shim_guTranslateF(sp58, (-(data->unk_1C - data->unk_24) / data->unk_24) * 10.0f, 0.0f, 0.0f);
|
shim_guTranslateF(tempMtx, (-(data->scale.x - data->unk_24) / data->unk_24) * 10.0f, 0.0f, 0.0f);
|
||||||
shim_guMtxCatF(sp58, sp98, sp98);
|
shim_guMtxCatF(tempMtx, transformMtx, transformMtx);
|
||||||
}
|
}
|
||||||
shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0076EC0[type]);
|
gSPDisplayList(gMasterGfxPos++, D_E0076EC0[type]);
|
||||||
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
shim_guTranslateF(translateMtx, data->posA.x, data->posA.y, data->posA.z);
|
||||||
if (type == 2) {
|
if (type == 2) {
|
||||||
shim_guRotateF(sp58, data->unk_64.f, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(tempMtx, data->renderYaw, 0.0f, 1.0f, 0.0f);
|
||||||
} else {
|
} else {
|
||||||
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
shim_guRotateF(tempMtx, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
}
|
}
|
||||||
shim_guMtxCatF(sp58, sp18, sp98);
|
shim_guMtxCatF(tempMtx, translateMtx, transformMtx);
|
||||||
shim_guScaleF(sp58, data->unk_1C, data->unk_20, 1.0f);
|
shim_guScaleF(tempMtx, data->scale.x, data->scale.y, 1.0f);
|
||||||
shim_guMtxCatF(sp58, sp98, sp98);
|
shim_guMtxCatF(tempMtx, transformMtx, transformMtx);
|
||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
shim_guTranslateF(sp58, (-(data->unk_1C - data->unk_24) / data->unk_24) * 10.0f, 0.0f, 0.0f);
|
shim_guTranslateF(tempMtx, (-(data->scale.x - data->unk_24) / data->unk_24) * 10.0f, 0.0f, 0.0f);
|
||||||
shim_guMtxCatF(sp58, sp98, sp98);
|
shim_guMtxCatF(tempMtx, transformMtx, transformMtx);
|
||||||
}
|
}
|
||||||
shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);
|
shim_guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_E0076EB0[type]);
|
gSPDisplayList(gMasterGfxPos++, D_E0076EB0[type]);
|
||||||
|
@ -31,7 +31,7 @@ EffectInstance* balloon_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s
|
|||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
||||||
effect->data = data;
|
effect->data.balloon = data;
|
||||||
part = data;
|
part = data;
|
||||||
|
|
||||||
ASSERT(data != NULL);
|
ASSERT(data != NULL);
|
||||||
@ -53,7 +53,7 @@ void balloon_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void balloon_update(EffectInstance* effect) {
|
void balloon_update(EffectInstance* effect) {
|
||||||
BalloonFXData* part = (BalloonFXData*)effect->data;
|
BalloonFXData* part = effect->data.balloon;
|
||||||
|
|
||||||
part->unk_1C--;
|
part->unk_1C--;
|
||||||
part->unk_20++;
|
part->unk_20++;
|
||||||
@ -86,7 +86,7 @@ void balloon_render(EffectInstance* effect) {
|
|||||||
void balloon_appendGfx(void* effect) {
|
void balloon_appendGfx(void* effect) {
|
||||||
Matrix4f sp18;
|
Matrix4f sp18;
|
||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
BalloonFXData* data = ((EffectInstance*)effect)->data;
|
BalloonFXData* data = ((EffectInstance*)effect)->data.balloon;
|
||||||
s32 idx = data->unk_00;
|
s32 idx = data->unk_00;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
|
@ -46,7 +46,7 @@ void big_smoke_puff_main(f32 x, f32 y, f32 z) {
|
|||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
data = shim_general_heap_malloc(effect->numParts * sizeof(*data));
|
data = shim_general_heap_malloc(effect->numParts * sizeof(*data));
|
||||||
effect->data = data;
|
effect->data.bigSmokePuff = data;
|
||||||
|
|
||||||
ASSERT(data != NULL);
|
ASSERT(data != NULL);
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ void big_smoke_puff_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void big_smoke_puff_update(EffectInstance* effect) {
|
void big_smoke_puff_update(EffectInstance* effect) {
|
||||||
BigSmokePuffFXData* data = effect->data;
|
BigSmokePuffFXData* data = effect->data.bigSmokePuff;
|
||||||
s32 cond = FALSE;
|
s32 cond = FALSE;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ void big_smoke_puff_render(EffectInstance* effect) {
|
|||||||
|
|
||||||
void big_smoke_puff_appendGfx(void* effect) {
|
void big_smoke_puff_appendGfx(void* effect) {
|
||||||
EffectInstance* eff = (EffectInstance*)effect;
|
EffectInstance* eff = (EffectInstance*)effect;
|
||||||
BigSmokePuffFXData* data = ((EffectInstance*)effect)->data;
|
BigSmokePuffFXData* data = ((EffectInstance*)effect)->data.bigSmokePuff;
|
||||||
Matrix4f mtx;
|
Matrix4f mtx;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ void big_snowflakes_appendGfx(void* effect);
|
|||||||
void big_snowflakes_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
void big_snowflakes_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
||||||
EffectBlueprint bp;
|
EffectBlueprint bp;
|
||||||
EffectInstance* effect;
|
EffectInstance* effect;
|
||||||
BigSnowflakeFXData* data;
|
BigSnowflakesFXData* data;
|
||||||
s32 numParts = 9;
|
s32 numParts = 9;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ void big_snowflakes_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
|||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
data = shim_general_heap_malloc(effect->numParts * sizeof(*data));
|
data = shim_general_heap_malloc(effect->numParts * sizeof(*data));
|
||||||
effect->data = data;
|
effect->data.bigSnowflakes = data;
|
||||||
|
|
||||||
ASSERT(data != NULL);
|
ASSERT(data != NULL);
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ void big_snowflakes_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void big_snowflakes_update(EffectInstance* effect) {
|
void big_snowflakes_update(EffectInstance* effect) {
|
||||||
BigSnowflakeFXData* data = effect->data;
|
BigSnowflakesFXData* data = effect->data.bigSnowflakes;
|
||||||
s32 unk_28;
|
s32 unk_28;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ void big_snowflakes_render(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void big_snowflakes_appendGfx(void* effect) {
|
void big_snowflakes_appendGfx(void* effect) {
|
||||||
BigSnowflakeFXData* data = ((EffectInstance*)effect)->data;
|
BigSnowflakesFXData* data = ((EffectInstance*)effect)->data.bigSnowflakes;
|
||||||
Matrix4f sp18;
|
Matrix4f sp18;
|
||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
Matrix4f sp98;
|
Matrix4f sp98;
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects_internal.h"
|
#include "effects_internal.h"
|
||||||
|
|
||||||
void blast_appendGfx(void* effect);
|
|
||||||
void blast_init(EffectInstance* effect);
|
void blast_init(EffectInstance* effect);
|
||||||
void blast_update(EffectInstance* effect);
|
void blast_update(EffectInstance* effect);
|
||||||
void blast_render(EffectInstance* effect);
|
void blast_render(EffectInstance* effect);
|
||||||
|
void blast_appendGfx(void* effect);
|
||||||
|
|
||||||
void blast_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
|
void blast_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
|
||||||
EffectBlueprint bp;
|
EffectBlueprint bp;
|
||||||
@ -24,9 +25,9 @@ void blast_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
|
|||||||
effect = shim_create_effect_instance(bpPtr);
|
effect = shim_create_effect_instance(bpPtr);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = effect->data.blast = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.blast != NULL);
|
||||||
|
|
||||||
shim_mem_clear(part, numParts * sizeof(*part));
|
shim_mem_clear(part, numParts * sizeof(*part));
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ void blast_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void blast_update(EffectInstance* effect) {
|
void blast_update(EffectInstance* effect) {
|
||||||
BlastFXData* part = effect->data;
|
BlastFXData* part = effect->data.blast;
|
||||||
|
|
||||||
part->unk_20 = part->unk_18++ * 9.0f / part->unk_1C;
|
part->unk_20 = part->unk_18++ * 9.0f / part->unk_1C;
|
||||||
part->timeLeft--;
|
part->timeLeft--;
|
||||||
|
@ -11,14 +11,14 @@ void bulb_glow_init(void) {
|
|||||||
INCLUDE_ASM(s32, "effects/bulb_glow", bulb_glow_update);
|
INCLUDE_ASM(s32, "effects/bulb_glow", bulb_glow_update);
|
||||||
|
|
||||||
void bulb_glow_render(EffectInstance* effect) {
|
void bulb_glow_render(EffectInstance* effect) {
|
||||||
BulbGlowFXData* effect60 = effect->data;
|
BulbGlowFXData* data = effect->data.bulbGlow;
|
||||||
RenderTask renderTask;
|
RenderTask renderTask;
|
||||||
RenderTask* renderTaskPtr = &renderTask;
|
RenderTask* renderTaskPtr = &renderTask;
|
||||||
RenderTask* retTask;
|
RenderTask* retTask;
|
||||||
|
|
||||||
renderTask.appendGfxArg = effect;
|
renderTask.appendGfxArg = effect;
|
||||||
renderTask.appendGfx = bulb_glow_appendGfx;
|
renderTask.appendGfx = bulb_glow_appendGfx;
|
||||||
if (effect60->unk_00 == 5) {
|
if (data->unk_00 == 5) {
|
||||||
renderTask.distance = 0;
|
renderTask.distance = 0;
|
||||||
renderTaskPtr->renderMode = RENDER_MODE_SURFACE_OPA;
|
renderTaskPtr->renderMode = RENDER_MODE_SURFACE_OPA;
|
||||||
} else {
|
} else {
|
||||||
|
@ -32,7 +32,7 @@ void butterflies_appendGfx(void* effect);
|
|||||||
EffectInstance* butterflies_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
EffectInstance* butterflies_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
||||||
EffectBlueprint bp;
|
EffectBlueprint bp;
|
||||||
EffectInstance* effect;
|
EffectInstance* effect;
|
||||||
ButterflyFXData* part;
|
ButterfliesFXData* part;
|
||||||
s32 numParts = 1;
|
s32 numParts = 1;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@ -45,8 +45,8 @@ EffectInstance* butterflies_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
|||||||
|
|
||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = effect->data.butterflies = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.butterflies != NULL);
|
||||||
|
|
||||||
part->unk_04 = 1000;
|
part->unk_04 = 1000;
|
||||||
part->unk_00 = arg0;
|
part->unk_00 = arg0;
|
||||||
@ -69,7 +69,7 @@ void butterflies_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void butterflies_update(EffectInstance* effect) {
|
void butterflies_update(EffectInstance* effect) {
|
||||||
ButterflyFXData* temp_s0;
|
ButterfliesFXData* temp_s0;
|
||||||
f32 temp_f20;
|
f32 temp_f20;
|
||||||
f32 temp_f20_2;
|
f32 temp_f20_2;
|
||||||
f32 temp_f22;
|
f32 temp_f22;
|
||||||
@ -82,7 +82,7 @@ void butterflies_update(EffectInstance* effect) {
|
|||||||
f32 var_f22;
|
f32 var_f22;
|
||||||
f32 var_f24;
|
f32 var_f24;
|
||||||
|
|
||||||
temp_s0 = effect->data;
|
temp_s0 = effect->data.butterflies;
|
||||||
if (effect->flags & 0x10) {
|
if (effect->flags & 0x10) {
|
||||||
effect->flags &= ~0x10;
|
effect->flags &= ~0x10;
|
||||||
temp_s0->unk_04 = 900;
|
temp_s0->unk_04 = 900;
|
||||||
@ -163,7 +163,7 @@ void butterflies_render(EffectInstance* effect) {
|
|||||||
|
|
||||||
void butterflies_appendGfx(void* effect) {
|
void butterflies_appendGfx(void* effect) {
|
||||||
EffectInstance* effectTemp = effect;
|
EffectInstance* effectTemp = effect;
|
||||||
ButterflyFXData* data = effectTemp->data;
|
ButterfliesFXData* data = effectTemp->data.butterflies;
|
||||||
Matrix4f sp18;
|
Matrix4f sp18;
|
||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ void cloud_puff_main(f32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
|||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
part = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
effect->data = part;
|
effect->data.cloudPuff = part;
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.cloudPuff != NULL);
|
||||||
|
|
||||||
shim_mem_clear(part, numParts * sizeof(*part));
|
shim_mem_clear(part, numParts * sizeof(*part));
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ void cloud_puff_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cloud_puff_update(EffectInstance* effect) {
|
void cloud_puff_update(EffectInstance* effect) {
|
||||||
CloudPuffFXData* part = (CloudPuffFXData*)effect->data;
|
CloudPuffFXData* part = effect->data.cloudPuff;
|
||||||
s32 cond = FALSE;
|
s32 cond = FALSE;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ void cloud_puff_render(EffectInstance* effect) {
|
|||||||
|
|
||||||
void cloud_puff_appendGfx(void* effect) {
|
void cloud_puff_appendGfx(void* effect) {
|
||||||
EffectInstance* effectTemp = effect;
|
EffectInstance* effectTemp = effect;
|
||||||
CloudPuffFXData* part = effectTemp->data;
|
CloudPuffFXData* part = effectTemp->data.cloudPuff;
|
||||||
Matrix4f sp20;
|
Matrix4f sp20;
|
||||||
Matrix4f sp60;
|
Matrix4f sp60;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
@ -26,9 +26,9 @@ void cloud_trail_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
|||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = 1;
|
effect->numParts = 1;
|
||||||
part = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
effect->data = part;
|
effect->data.cloudTrail = part;
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.cloudTrail != NULL);
|
||||||
|
|
||||||
shim_mem_clear(part, numParts * sizeof(*part));
|
shim_mem_clear(part, numParts * sizeof(*part));
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ void cloud_trail_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cloud_trail_update(EffectInstance* effect) {
|
void cloud_trail_update(EffectInstance* effect) {
|
||||||
CloudTrailFXData* part = (CloudTrailFXData*)effect->data;
|
CloudTrailFXData* part = effect->data.cloudTrail;
|
||||||
s32 cond = FALSE;
|
s32 cond = FALSE;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ void cloud_trail_render(EffectInstance* effect) {
|
|||||||
|
|
||||||
void cloud_trail_appendGfx(void* effect) {
|
void cloud_trail_appendGfx(void* effect) {
|
||||||
EffectInstance* effectTemp = effect;
|
EffectInstance* effectTemp = effect;
|
||||||
CloudTrailFXData* part = effectTemp->data;
|
CloudTrailFXData* part = effectTemp->data.cloudTrail;
|
||||||
Matrix4f sp20;
|
Matrix4f sp20;
|
||||||
Matrix4f sp60;
|
Matrix4f sp60;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
@ -96,8 +96,8 @@ void damage_indicator_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32
|
|||||||
effect = shim_create_effect_instance(bpPtr);
|
effect = shim_create_effect_instance(bpPtr);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
effect->data = part = shim_general_heap_malloc(numParts * sizeof(*part));
|
effect->data.damageIndicator = part = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.damageIndicator != NULL);
|
||||||
|
|
||||||
part->unk_00 = arg0;
|
part->unk_00 = arg0;
|
||||||
part->unk_04.x = arg1;
|
part->unk_04.x = arg1;
|
||||||
@ -133,7 +133,7 @@ void damage_indicator_update(EffectInstance* effect) {
|
|||||||
s32 temp_a2;
|
s32 temp_a2;
|
||||||
s32 temp_t0;
|
s32 temp_t0;
|
||||||
s32 duration;
|
s32 duration;
|
||||||
DamageIndicatorFXData* part = effect->data;
|
DamageIndicatorFXData* part = effect->data.damageIndicator;
|
||||||
f32 phi_f12;
|
f32 phi_f12;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ EffectInstance* debuff_main(s32 arg0, f32 x, f32 y, f32 z) {
|
|||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
effect->data = data = shim_general_heap_malloc(numParts * sizeof(*data));
|
effect->data.debuff = data = shim_general_heap_malloc(numParts * sizeof(*data));
|
||||||
|
|
||||||
ASSERT(data != NULL);
|
ASSERT(data != NULL);
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ void debuff_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void debuff_update(EffectInstance* effect) {
|
void debuff_update(EffectInstance* effect) {
|
||||||
DebuffFXData* data = effect->data;
|
DebuffFXData* data = effect->data.debuff;
|
||||||
s32 temp;
|
s32 temp;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ void debuff_render(EffectInstance* effect) {
|
|||||||
|
|
||||||
void debuff_appendGfx(void* effect) {
|
void debuff_appendGfx(void* effect) {
|
||||||
EffectInstance* eff = (EffectInstance*)effect;
|
EffectInstance* eff = (EffectInstance*)effect;
|
||||||
DebuffFXData* data = eff->data;
|
DebuffFXData* data = eff->data.debuff;
|
||||||
Gfx* dlist = D_E00628C0[0];
|
Gfx* dlist = D_E00628C0[0];
|
||||||
Gfx* dlist2 = D_E00628C4[0];
|
Gfx* dlist2 = D_E00628C4[0];
|
||||||
Matrix4f sp18;
|
Matrix4f sp18;
|
||||||
|
@ -50,8 +50,8 @@ EffectInstance* disable_x_main(s32 type, f32 x, f32 y, f32 z, s32 arg4) {
|
|||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
||||||
effect->data = data;
|
effect->data.disableX = data;
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.disableX != NULL);
|
||||||
|
|
||||||
data->type = type;
|
data->type = type;
|
||||||
data->scale = 1.0f;
|
data->scale = 1.0f;
|
||||||
@ -102,7 +102,7 @@ void disable_x_init(EffectInstance* effect) {
|
|||||||
void disable_x_update(EffectInstance* effect) {
|
void disable_x_update(EffectInstance* effect) {
|
||||||
static const f32 D_E0082D30[12] = { 5.0f, 4.0f, 4.0f, 3.0f, 2.0f, 1.0f, 0.7f, 1.2f, 1.0f, 0.0f, 0.0f, 0.0f };
|
static const f32 D_E0082D30[12] = { 5.0f, 4.0f, 4.0f, 3.0f, 2.0f, 1.0f, 0.7f, 1.2f, 1.0f, 0.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
DisableXFXData* data = effect->data;
|
DisableXFXData* data = effect->data.disableX;
|
||||||
s32 unk_28;
|
s32 unk_28;
|
||||||
s32 unk_2C;
|
s32 unk_2C;
|
||||||
f32 unk_34;
|
f32 unk_34;
|
||||||
@ -202,7 +202,7 @@ void disable_x_render(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_E0082528(EffectInstance* effect) {
|
void func_E0082528(EffectInstance* effect) {
|
||||||
DisableXFXData* data = effect->data;
|
DisableXFXData* data = effect->data.disableX;
|
||||||
|
|
||||||
if (data->unk_04 != 0) {
|
if (data->unk_04 != 0) {
|
||||||
func_E00828B4(effect);
|
func_E00828B4(effect);
|
||||||
@ -254,7 +254,7 @@ void func_E00826C4(DisableXFXData* data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_E00828B4(EffectInstance* effect) {
|
void func_E00828B4(EffectInstance* effect) {
|
||||||
DisableXFXData* data = effect->data;
|
DisableXFXData* data = effect->data.disableX;
|
||||||
s32 type;
|
s32 type;
|
||||||
s32 unk_38;
|
s32 unk_38;
|
||||||
s32 i;
|
s32 i;
|
||||||
@ -283,7 +283,7 @@ void func_E00828B4(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_E0082A84(EffectInstance* effect) {
|
void func_E0082A84(EffectInstance* effect) {
|
||||||
DisableXFXData* data = effect->data;
|
DisableXFXData* data = effect->data.disableX;
|
||||||
s32 unk_38;
|
s32 unk_38;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ void fx_75_init(void) {
|
|||||||
INCLUDE_ASM(s32, "effects/effect_75", fx_75_update);
|
INCLUDE_ASM(s32, "effects/effect_75", fx_75_update);
|
||||||
|
|
||||||
void fx_75_render(EffectInstance* effect) {
|
void fx_75_render(EffectInstance* effect) {
|
||||||
Effect75FXData* data = effect->data;
|
Effect75FXData* data = effect->data.unk_75;
|
||||||
RenderTask renderTask;
|
RenderTask renderTask;
|
||||||
RenderTask* renderTaskPtr = &renderTask;
|
RenderTask* renderTaskPtr = &renderTask;
|
||||||
RenderTask* retTask;
|
RenderTask* retTask;
|
||||||
|
@ -30,8 +30,8 @@ void fx_86_appendGfx(void* effect);
|
|||||||
EffectInstance* fx_86_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
|
EffectInstance* fx_86_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
|
||||||
EffectBlueprint bp;
|
EffectBlueprint bp;
|
||||||
EffectInstance* effect;
|
EffectInstance* effect;
|
||||||
Effect134* data;
|
Effect86FXData* data;
|
||||||
Effect134* part;
|
Effect86FXData* part;
|
||||||
s32 numParts = 1;
|
s32 numParts = 1;
|
||||||
|
|
||||||
bp.init = fx_86_init;
|
bp.init = fx_86_init;
|
||||||
@ -45,7 +45,7 @@ EffectInstance* fx_86_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32
|
|||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
||||||
effect->data = data;
|
effect->data.unk_86 = data;
|
||||||
part = data;
|
part = data;
|
||||||
|
|
||||||
ASSERT(data != NULL);
|
ASSERT(data != NULL);
|
||||||
@ -76,7 +76,7 @@ void fx_86_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void fx_86_update(EffectInstance* effect) {
|
void fx_86_update(EffectInstance* effect) {
|
||||||
Effect134* data = effect->data;
|
Effect86FXData* data = effect->data.unk_86;
|
||||||
|
|
||||||
if (effect->flags & 0x10) {
|
if (effect->flags & 0x10) {
|
||||||
effect->flags &= ~0x10;
|
effect->flags &= ~0x10;
|
||||||
@ -109,7 +109,7 @@ void fx_86_render(EffectInstance* effect) {
|
|||||||
void fx_86_appendGfx(void* effect) {
|
void fx_86_appendGfx(void* effect) {
|
||||||
Matrix4f sp10;
|
Matrix4f sp10;
|
||||||
Matrix4f sp50;
|
Matrix4f sp50;
|
||||||
Effect134* part = ((EffectInstance*)effect)->data;
|
Effect86FXData* part = ((EffectInstance*)effect)->data.unk_86;
|
||||||
Camera* camera = &gCameras[gCurrentCameraID];
|
Camera* camera = &gCameras[gCurrentCameraID];
|
||||||
s32 primAlpha = part->unk_24;
|
s32 primAlpha = part->unk_24;
|
||||||
s32 dlistIdx = part->unk_00;
|
s32 dlistIdx = part->unk_00;
|
||||||
|
@ -55,7 +55,7 @@ INCLUDE_ASM(s32, "effects/emote", func_E0020000);
|
|||||||
void emote_main(s32 arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, s32 arg7, EffectInstance** arg8) {
|
void emote_main(s32 arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, s32 arg7, EffectInstance** arg8) {
|
||||||
EffectBlueprint bp;
|
EffectBlueprint bp;
|
||||||
EffectBlueprint* bpPtr = &bp;
|
EffectBlueprint* bpPtr = &bp;
|
||||||
EmoteFXData* part;
|
EmoteFXData* data;
|
||||||
EffectInstance* effect;
|
EffectInstance* effect;
|
||||||
s32 numParts;
|
s32 numParts;
|
||||||
|
|
||||||
@ -74,39 +74,39 @@ void emote_main(s32 arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32
|
|||||||
|
|
||||||
effect = shim_create_effect_instance(bpPtr);
|
effect = shim_create_effect_instance(bpPtr);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
data = effect->data.emote = shim_general_heap_malloc(numParts * sizeof(*data));
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.emote != NULL);
|
||||||
part->unk_3C = arg1;
|
data->unk_3C = arg1;
|
||||||
part->unk_00 = arg0;
|
data->unk_00 = arg0;
|
||||||
part->unk_30 = arg0;
|
data->unk_30 = arg0;
|
||||||
|
|
||||||
if (arg7 <= 0) {
|
if (arg7 <= 0) {
|
||||||
arg7 = 10000;
|
arg7 = 10000;
|
||||||
}
|
}
|
||||||
part->unk_2C = arg7;
|
data->unk_2C = arg7;
|
||||||
part->unk_34 = 0;
|
data->unk_34 = 0;
|
||||||
|
|
||||||
if (arg0 == 1) {
|
if (arg0 == 1) {
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < numParts; i++, part++) {
|
for (i = 0; i < numParts; i++, data++) {
|
||||||
part->unk_10 = arg2;
|
data->unk_10 = arg2;
|
||||||
part->unk_14 = arg3;
|
data->unk_14 = arg3;
|
||||||
part->unk_18 = arg4;
|
data->unk_18 = arg4;
|
||||||
part->unk_1C = arg6;
|
data->unk_1C = arg6;
|
||||||
part->unk_20 = arg5;
|
data->unk_20 = arg5;
|
||||||
part->unk_3C = arg1;
|
data->unk_3C = arg1;
|
||||||
func_E0020000(part, i);
|
func_E0020000(data, i);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
part->unk_10 = arg2;
|
data->unk_10 = arg2;
|
||||||
part->unk_14 = arg3;
|
data->unk_14 = arg3;
|
||||||
part->unk_18 = arg4;
|
data->unk_18 = arg4;
|
||||||
part->unk_1C = arg6;
|
data->unk_1C = arg6;
|
||||||
part->unk_20 = arg5;
|
data->unk_20 = arg5;
|
||||||
part->unk_3C = arg1;
|
data->unk_3C = arg1;
|
||||||
func_E0020000(part, 1);
|
func_E0020000(data, 1);
|
||||||
}
|
}
|
||||||
*arg8 = effect;
|
*arg8 = effect;
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ void emote_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void emote_update(EffectInstance* effect) {
|
void emote_update(EffectInstance* effect) {
|
||||||
EmoteFXData* part = effect->data;
|
EmoteFXData* part = effect->data.emote;
|
||||||
s32 temp_a0 = D_E0020D80[part->unk_30][part->unk_34];
|
s32 temp_a0 = D_E0020D80[part->unk_30][part->unk_34];
|
||||||
s32 type = part->unk_00;
|
s32 type = part->unk_00;
|
||||||
|
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects_internal.h"
|
#include "effects_internal.h"
|
||||||
|
|
||||||
typedef struct EndingDecalsFXData {
|
|
||||||
/* 0x00 */ s32 unk_00;
|
|
||||||
} EndingDecalsFXData; // size = 0x??
|
|
||||||
|
|
||||||
void ending_decals_appendGfx(void* effect);
|
void ending_decals_appendGfx(void* effect);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "effects/ending_decals", ending_decals_main);
|
INCLUDE_ASM(s32, "effects/ending_decals", ending_decals_main);
|
||||||
@ -15,7 +11,7 @@ void ending_decals_init(void) {
|
|||||||
INCLUDE_ASM(s32, "effects/ending_decals", ending_decals_update);
|
INCLUDE_ASM(s32, "effects/ending_decals", ending_decals_update);
|
||||||
|
|
||||||
void ending_decals_render(EffectInstance* effect) {
|
void ending_decals_render(EffectInstance* effect) {
|
||||||
EndingDecalsFXData* effect52 = effect->data;
|
EndingDecalsFXData* data = effect->data.endingDecals;
|
||||||
RenderTask renderTask;
|
RenderTask renderTask;
|
||||||
RenderTask* renderTaskPtr = &renderTask;
|
RenderTask* renderTaskPtr = &renderTask;
|
||||||
RenderTask* retTask;
|
RenderTask* retTask;
|
||||||
@ -23,7 +19,7 @@ void ending_decals_render(EffectInstance* effect) {
|
|||||||
renderTask.appendGfxArg = effect;
|
renderTask.appendGfxArg = effect;
|
||||||
renderTask.appendGfx = ending_decals_appendGfx;
|
renderTask.appendGfx = ending_decals_appendGfx;
|
||||||
renderTask.distance = 10;
|
renderTask.distance = 10;
|
||||||
if (effect52->unk_00 == 0) {
|
if (data->unk_00 == 0) {
|
||||||
renderTaskPtr->renderMode = RENDER_MODE_SURFACE_OPA;
|
renderTaskPtr->renderMode = RENDER_MODE_SURFACE_OPA;
|
||||||
} else {
|
} else {
|
||||||
renderTaskPtr->renderMode = RENDER_MODE_2D;
|
renderTaskPtr->renderMode = RENDER_MODE_2D;
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects_internal.h"
|
#include "effects_internal.h"
|
||||||
|
|
||||||
typedef struct EnergyOrbWaveFXData {
|
|
||||||
/* 0x00 */ s32 unk_00;
|
|
||||||
} EnergyOrbWaveFXData; // size = ??
|
|
||||||
|
|
||||||
void energy_orb_wave_appendGfx(void* effect);
|
void energy_orb_wave_appendGfx(void* effect);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "effects/energy_orb_wave", energy_orb_wave_main);
|
INCLUDE_ASM(s32, "effects/energy_orb_wave", energy_orb_wave_main);
|
||||||
@ -15,7 +11,7 @@ void energy_orb_wave_init(void) {
|
|||||||
INCLUDE_ASM(s32, "effects/energy_orb_wave", energy_orb_wave_update);
|
INCLUDE_ASM(s32, "effects/energy_orb_wave", energy_orb_wave_update);
|
||||||
|
|
||||||
void energy_orb_wave_render(EffectInstance* effect) {
|
void energy_orb_wave_render(EffectInstance* effect) {
|
||||||
EnergyOrbWaveFXData* effect82 = effect->data;
|
EnergyOrbWaveFXData* effect82 = effect->data.energyOrbWave;
|
||||||
RenderTask renderTask;
|
RenderTask renderTask;
|
||||||
RenderTask* retTask;
|
RenderTask* retTask;
|
||||||
RenderTask* renderTaskPointer = &renderTask;
|
RenderTask* renderTaskPointer = &renderTask;
|
||||||
|
@ -36,8 +36,8 @@ EffectInstance* fire_breath_main(
|
|||||||
|
|
||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
data = effect->data = shim_general_heap_malloc(numParts * sizeof(*data));
|
data = effect->data.fireBreath = shim_general_heap_malloc(numParts * sizeof(*data));
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.fireBreath != NULL);
|
||||||
|
|
||||||
data->type = type;
|
data->type = type;
|
||||||
data->numChildren = numExtra;
|
data->numChildren = numExtra;
|
||||||
@ -92,7 +92,7 @@ void fire_breath_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void fire_breath_update(EffectInstance* effect) {
|
void fire_breath_update(EffectInstance* effect) {
|
||||||
FireBreathFXData* data = effect->data;
|
FireBreathFXData* data = effect->data.fireBreath;
|
||||||
s32 maxLifetime;
|
s32 maxLifetime;
|
||||||
s32 lifetime;
|
s32 lifetime;
|
||||||
s32 spawnTimer;
|
s32 spawnTimer;
|
||||||
@ -132,15 +132,15 @@ void fire_breath_update(EffectInstance* effect) {
|
|||||||
data->endPos.z, data->numChildren - 1, data->spawnDelay, maxLifetime
|
data->endPos.z, data->numChildren - 1, data->spawnDelay, maxLifetime
|
||||||
);
|
);
|
||||||
|
|
||||||
((FireBreathFXData*)spawned->data)->primR = data->primR;
|
spawned->data.fireBreath->primR = data->primR;
|
||||||
((FireBreathFXData*)spawned->data)->primG = data->primG;
|
spawned->data.fireBreath->primG = data->primG;
|
||||||
((FireBreathFXData*)spawned->data)->primB = data->primB;
|
spawned->data.fireBreath->primB = data->primB;
|
||||||
((FireBreathFXData*)spawned->data)->envR = data->envR;
|
spawned->data.fireBreath->envR = data->envR;
|
||||||
((FireBreathFXData*)spawned->data)->envG = data->envG;
|
spawned->data.fireBreath->envG = data->envG;
|
||||||
((FireBreathFXData*)spawned->data)->envB = data->envB;
|
spawned->data.fireBreath->envB = data->envB;
|
||||||
((FireBreathFXData*)spawned->data)->unk_30 = ((FireBreathFXData*)spawned->data)->scale = data->unk_30;
|
spawned->data.fireBreath->unk_30 = spawned->data.fireBreath->scale = data->unk_30;
|
||||||
((FireBreathFXData*)spawned->data)->unk_34 = data->unk_34;
|
spawned->data.fireBreath->unk_34 = data->unk_34;
|
||||||
((FireBreathFXData*)spawned->data)->scaleChangeFactor = data->scaleChangeFactor;
|
spawned->data.fireBreath->scaleChangeFactor = data->scaleChangeFactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lifetime < 10 && data->type == FIRE_BREATH_LARGE) {
|
if (lifetime < 10 && data->type == FIRE_BREATH_LARGE) {
|
||||||
@ -159,7 +159,7 @@ void fire_breath_update(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void fire_breath_render(EffectInstance* effect) {
|
void fire_breath_render(EffectInstance* effect) {
|
||||||
FireBreathFXData* data = effect->data;
|
FireBreathFXData* data = effect->data.fireBreath;
|
||||||
RenderTask renderTask;
|
RenderTask renderTask;
|
||||||
RenderTask* retTask;
|
RenderTask* retTask;
|
||||||
RenderTask* renderTaskPointer = &renderTask;
|
RenderTask* renderTaskPointer = &renderTask;
|
||||||
@ -181,7 +181,7 @@ void fire_breath_render(EffectInstance* effect) {
|
|||||||
void fire_breath_appendGfx(void* effect) {
|
void fire_breath_appendGfx(void* effect) {
|
||||||
Matrix4f sp18;
|
Matrix4f sp18;
|
||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
FireBreathFXData* data = ((EffectInstance*)effect)->data;
|
FireBreathFXData* data = ((EffectInstance*)effect)->data.fireBreath;
|
||||||
s32 type = data->type;
|
s32 type = data->type;
|
||||||
s32 envAlpha = (data->unk_5C - (s32)data->unk_5C) * 256.0f;
|
s32 envAlpha = (data->unk_5C - (s32)data->unk_5C) * 256.0f;
|
||||||
Gfx* dlist = D_E006EC00[type];
|
Gfx* dlist = D_E006EC00[type];
|
||||||
|
@ -27,9 +27,9 @@ EffectInstance* fire_flower_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg
|
|||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
part = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
effect->data = part;
|
effect->data.fireFlower = part;
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.fireFlower != NULL);
|
||||||
|
|
||||||
part->unk_04 = 0;
|
part->unk_04 = 0;
|
||||||
part->unk_00 = arg0;
|
part->unk_00 = arg0;
|
||||||
|
@ -1,13 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects_internal.h"
|
#include "effects_internal.h"
|
||||||
|
|
||||||
typedef struct FlameFXData {
|
|
||||||
/* 0x00 */ s32 unk_00;
|
|
||||||
/* 0x04 */ f32 unk_04;
|
|
||||||
/* 0x08 */ f32 unk_08;
|
|
||||||
/* 0x0C */ f32 unk_0C;
|
|
||||||
} FlameFXData; // size = 0x??
|
|
||||||
|
|
||||||
void flame_appendGfx(void* effect);
|
void flame_appendGfx(void* effect);
|
||||||
|
|
||||||
u32 D_E0040840[2] = { 0xFF6DFF5C, 0x66BFFF4B };
|
u32 D_E0040840[2] = { 0xFF6DFF5C, 0x66BFFF4B };
|
||||||
@ -24,7 +17,7 @@ void flame_init(void) {
|
|||||||
INCLUDE_ASM(s32, "effects/flame", flame_update);
|
INCLUDE_ASM(s32, "effects/flame", flame_update);
|
||||||
|
|
||||||
void flame_render(EffectInstance* effect) {
|
void flame_render(EffectInstance* effect) {
|
||||||
FlameFXData* effect32 = effect->data;
|
FlameFXData* data = effect->data.flame;
|
||||||
RenderTask renderTask;
|
RenderTask renderTask;
|
||||||
RenderTask* renderTaskPtr = &renderTask;
|
RenderTask* renderTaskPtr = &renderTask;
|
||||||
RenderTask* retTask;
|
RenderTask* retTask;
|
||||||
@ -34,7 +27,7 @@ void flame_render(EffectInstance* effect) {
|
|||||||
f32 outZ;
|
f32 outZ;
|
||||||
f32 outS;
|
f32 outS;
|
||||||
|
|
||||||
shim_transform_point(gCameras[gCurrentCameraID].perspectiveMatrix[0], effect32->unk_04, effect32->unk_08, effect32->unk_0C, 1.0f, &outX, &outY, &outZ, &outS);
|
shim_transform_point(gCameras[gCurrentCameraID].perspectiveMatrix[0], data->unk_04, data->unk_08, data->unk_0C, 1.0f, &outX, &outY, &outZ, &outS);
|
||||||
|
|
||||||
outDist = outZ + 5000;
|
outDist = outZ + 5000;
|
||||||
if (outDist < 0) {
|
if (outDist < 0) {
|
||||||
|
@ -26,9 +26,9 @@ void floating_flower_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) {
|
|||||||
|
|
||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = 1;
|
effect->numParts = 1;
|
||||||
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = effect->data.floatingFlower = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.floatingFlower != NULL);
|
||||||
|
|
||||||
part->unk_00 = arg0;
|
part->unk_00 = arg0;
|
||||||
part->unk_04 = arg1;
|
part->unk_04 = arg1;
|
||||||
@ -76,7 +76,7 @@ void floating_flower_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void floating_flower_update(EffectInstance* effect) {
|
void floating_flower_update(EffectInstance* effect) {
|
||||||
FloatingFlowerFXData* data = effect->data;
|
FloatingFlowerFXData* data = effect->data.floatingFlower;
|
||||||
s32 unk_00 = data->unk_00;
|
s32 unk_00 = data->unk_00;
|
||||||
|
|
||||||
if (data->unk_34 < 150) {
|
if (data->unk_34 < 150) {
|
||||||
@ -143,7 +143,7 @@ void floating_flower_render(EffectInstance* effect) {
|
|||||||
void floating_flower_appendGfx(void* effect) {
|
void floating_flower_appendGfx(void* effect) {
|
||||||
Matrix4f sp20, other;
|
Matrix4f sp20, other;
|
||||||
EffectInstance* effectTemp = effect;
|
EffectInstance* effectTemp = effect;
|
||||||
FloatingFlowerFXData* part = effectTemp->data;
|
FloatingFlowerFXData* part = effectTemp->data.floatingFlower;
|
||||||
u32 alpha;
|
u32 alpha;
|
||||||
u8 rgb, a;
|
u8 rgb, a;
|
||||||
|
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects_internal.h"
|
#include "effects_internal.h"
|
||||||
|
|
||||||
typedef struct FloatingRockFXData {
|
|
||||||
/* 0x00 */ char unk_00[0xC];
|
|
||||||
/* 0x0C */ f32 unk_0C;
|
|
||||||
} FloatingRockFXData; // size = 0x??
|
|
||||||
|
|
||||||
void floating_rock_appendGfx(void* effect);
|
void floating_rock_appendGfx(void* effect);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "effects/floating_rock", floating_rock_main);
|
INCLUDE_ASM(s32, "effects/floating_rock", floating_rock_main);
|
||||||
@ -16,7 +11,7 @@ void floating_rock_init(void) {
|
|||||||
INCLUDE_ASM(s32, "effects/floating_rock", floating_rock_update);
|
INCLUDE_ASM(s32, "effects/floating_rock", floating_rock_update);
|
||||||
|
|
||||||
void floating_rock_render(EffectInstance *effect) {
|
void floating_rock_render(EffectInstance *effect) {
|
||||||
FloatingRockFXData* effect76 = effect->data;
|
FloatingRockFXData* effect76 = effect->data.floatingRock;
|
||||||
RenderTask renderTask;
|
RenderTask renderTask;
|
||||||
RenderTask* retTask;
|
RenderTask* retTask;
|
||||||
|
|
||||||
|
@ -62,8 +62,8 @@ void flower_splash_main(f32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
|||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
||||||
effect->data = data;
|
effect->data.flowerSplash = data;
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.flowerSplash != NULL);
|
||||||
|
|
||||||
shim_mem_clear(data, numParts * sizeof(*data));
|
shim_mem_clear(data, numParts * sizeof(*data));
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ void flower_splash_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void flower_splash_update(EffectInstance* effect) {
|
void flower_splash_update(EffectInstance* effect) {
|
||||||
FlowerFXData* data = (FlowerFXData*)effect->data;
|
FlowerFXData* data = effect->data.flowerSplash;
|
||||||
s32 cond = FALSE;
|
s32 cond = FALSE;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ void func_E00104F4(EffectInstance* effect) {
|
|||||||
|
|
||||||
void flower_splash_appendGfx(void* effect) {
|
void flower_splash_appendGfx(void* effect) {
|
||||||
EffectInstance* effectTemp = effect;
|
EffectInstance* effectTemp = effect;
|
||||||
FlowerFXData* data = effectTemp->data;
|
FlowerFXData* data = effectTemp->data.flowerSplash;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
|
@ -64,8 +64,8 @@ void flower_trail_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg
|
|||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
part = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
effect->data = part;
|
effect->data.flowerTrail = part;
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.flowerTrail != NULL);
|
||||||
|
|
||||||
shim_mem_clear(part, numParts * sizeof(*part));
|
shim_mem_clear(part, numParts * sizeof(*part));
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ void flower_trail_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void flower_trail_update(EffectInstance* effect) {
|
void flower_trail_update(EffectInstance* effect) {
|
||||||
FlowerFXData* part = (FlowerFXData*)effect->data;
|
FlowerFXData* part = effect->data.flowerTrail;
|
||||||
s32 cond = FALSE;
|
s32 cond = FALSE;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ void func_E0012548(EffectInstance* effect) {
|
|||||||
|
|
||||||
void flower_trail_appendGfx(void* effect) {
|
void flower_trail_appendGfx(void* effect) {
|
||||||
EffectInstance* effectTemp = effect;
|
EffectInstance* effectTemp = effect;
|
||||||
FlowerFXData* part = effectTemp->data;
|
FlowerFXData* part = effectTemp->data.flowerTrail;
|
||||||
Gfx* dlist;
|
Gfx* dlist;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
|
@ -38,9 +38,9 @@ void footprint_main(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5,
|
|||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = 1;
|
effect->numParts = 1;
|
||||||
part = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
effect->data = part;
|
effect->data.footprint = part;
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.footprint != NULL);
|
||||||
|
|
||||||
shim_mem_clear(part, numParts * sizeof(*part));
|
shim_mem_clear(part, numParts * sizeof(*part));
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ void footprint_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void footprint_update(EffectInstance* effect) {
|
void footprint_update(EffectInstance* effect) {
|
||||||
FootprintFXData* part = (FootprintFXData*)effect->data;
|
FootprintFXData* part = effect->data.footprint;
|
||||||
s32 cond = FALSE;
|
s32 cond = FALSE;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ void func_E00183BC(EffectInstance* effect) {
|
|||||||
|
|
||||||
void footprint_appendGfx(void* effect) {
|
void footprint_appendGfx(void* effect) {
|
||||||
EffectInstance* effectTemp = effect;
|
EffectInstance* effectTemp = effect;
|
||||||
FootprintFXData* part = effectTemp->data;
|
FootprintFXData* part = effectTemp->data.footprint;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
|
@ -23,8 +23,8 @@ EffectInstance* gather_magic_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 ar
|
|||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
||||||
effect->data = data;
|
effect->data.gatherMagic = data;
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.gatherMagic != NULL);
|
||||||
|
|
||||||
data->unk_04 = arg0;
|
data->unk_04 = arg0;
|
||||||
data->unk_1C = 0;
|
data->unk_1C = 0;
|
||||||
|
@ -105,8 +105,8 @@ void landing_dust_main(s32 type, f32 x, f32 y, f32 z, f32 arg4) {
|
|||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
||||||
effect->data = data;
|
effect->data.landingDust = data;
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.landingDust != NULL);
|
||||||
|
|
||||||
shim_mem_clear(data, numParts * sizeof(*data));
|
shim_mem_clear(data, numParts * sizeof(*data));
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ void landing_dust_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void landing_dust_update(EffectInstance* effect) {
|
void landing_dust_update(EffectInstance* effect) {
|
||||||
LandingDustFXData* data = effect->data;
|
LandingDustFXData* data = effect->data.landingDust;
|
||||||
|
|
||||||
data->unk_40 = D_E000CD24[data->unk_38][data->unk_3C++];
|
data->unk_40 = D_E000CD24[data->unk_38][data->unk_3C++];
|
||||||
|
|
||||||
@ -258,7 +258,7 @@ void landing_dust_render(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void landing_dust_appendGfx(void* effect) {
|
void landing_dust_appendGfx(void* effect) {
|
||||||
LandingDustFXData* part = ((EffectInstance*)effect)->data;
|
LandingDustFXData* part = ((EffectInstance*)effect)->data.landingDust;
|
||||||
s32 type = part->type;
|
s32 type = part->type;
|
||||||
s32 temp_t0 = part->unk_40;
|
s32 temp_t0 = part->unk_40;
|
||||||
Matrix4f mtx1;
|
Matrix4f mtx1;
|
||||||
|
@ -21,7 +21,7 @@ f32 func_E00BC1D8(f32 arg0) {
|
|||||||
INCLUDE_ASM(s32, "effects/lightning_bolt", lightning_bolt_update);
|
INCLUDE_ASM(s32, "effects/lightning_bolt", lightning_bolt_update);
|
||||||
|
|
||||||
void lightning_bolt_render(EffectInstance *effect) {
|
void lightning_bolt_render(EffectInstance *effect) {
|
||||||
LightningBoltFXData* effect94 = effect->data;
|
LightningBoltFXData* effect94 = effect->data.lightningBolt;
|
||||||
RenderTask renderTask;
|
RenderTask renderTask;
|
||||||
RenderTask* retTask;
|
RenderTask* retTask;
|
||||||
RenderTask* renderTaskPointer = &renderTask;
|
RenderTask* renderTaskPointer = &renderTask;
|
||||||
|
@ -18,20 +18,6 @@ Gfx* D_E004C660[] = { D_09001038, D_090010C0, D_09001148, D_090011D0, D_09001258
|
|||||||
|
|
||||||
s8 D_E004C67C[] = { 0xFE, 0xAC, 0xAC, 0xFE, 0xAC, 0xD5, 0xFE, 0xB4, 0x9A, 0xD5, 0xB4, 0xFE, 0xB4, 0xB4, 0xFE, 0xB4, 0xDD, 0xFE, 0xB4, 0xFE, 0xFE, 0xB4, 0xFE, 0xD5, 0xB4, 0xFE, 0xB4, 0xD5, 0xFE, 0xB4, 0xFE, 0xFE, 0xB4, 0xFE, 0xD5, 0xAC, };
|
s8 D_E004C67C[] = { 0xFE, 0xAC, 0xAC, 0xFE, 0xAC, 0xD5, 0xFE, 0xB4, 0x9A, 0xD5, 0xB4, 0xFE, 0xB4, 0xB4, 0xFE, 0xB4, 0xDD, 0xFE, 0xB4, 0xFE, 0xFE, 0xB4, 0xFE, 0xD5, 0xB4, 0xFE, 0xB4, 0xD5, 0xFE, 0xB4, 0xFE, 0xFE, 0xB4, 0xFE, 0xD5, 0xAC, };
|
||||||
|
|
||||||
typedef struct MusicNoteFXData {
|
|
||||||
/* 0x00 */ s32 unk_00;
|
|
||||||
/* 0x04 */ Vec3f pos;
|
|
||||||
/* 0x10 */ f32 unk_10;
|
|
||||||
/* 0x14 */ s32 unk_14;
|
|
||||||
/* 0x18 */ s32 timeLeft;
|
|
||||||
/* 0x1C */ s32 unk_1C;
|
|
||||||
/* 0x20 */ s32 unk_20;
|
|
||||||
/* 0x24 */ f32 unk_24;
|
|
||||||
/* 0x28 */ f32 unk_28;
|
|
||||||
/* 0x2C */ f32 unk_2C;
|
|
||||||
/* 0x30 */ f32 unk_30;
|
|
||||||
} MusicNoteFXData; // size = 0x34
|
|
||||||
|
|
||||||
void music_note_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
void music_note_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
||||||
EffectBlueprint bp;
|
EffectBlueprint bp;
|
||||||
EffectBlueprint* bpPtr = &bp;
|
EffectBlueprint* bpPtr = &bp;
|
||||||
@ -50,9 +36,9 @@ void music_note_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
|||||||
effect = shim_create_effect_instance(bpPtr);
|
effect = shim_create_effect_instance(bpPtr);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = effect->data.musicNote = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.musicNote != NULL);
|
||||||
|
|
||||||
part->unk_00 = arg0;
|
part->unk_00 = arg0;
|
||||||
part->pos.x = arg1;
|
part->pos.x = arg1;
|
||||||
@ -91,7 +77,7 @@ void music_note_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void music_note_update(EffectInstance* effect) {
|
void music_note_update(EffectInstance* effect) {
|
||||||
MusicNoteFXData* part = effect->data;
|
MusicNoteFXData* part = effect->data.musicNote;
|
||||||
s32 timeLeft;
|
s32 timeLeft;
|
||||||
|
|
||||||
part->timeLeft--;
|
part->timeLeft--;
|
||||||
|
@ -1,21 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects_internal.h"
|
#include "effects_internal.h"
|
||||||
|
|
||||||
typedef struct ShapeSpellFXData {
|
|
||||||
/* 0x00 */ s32 isChild;
|
|
||||||
/* 0x04 */ Vec3f pos;
|
|
||||||
/* 0x10 */ f32 unk_10;
|
|
||||||
/* 0x14 */ f32 unk_14;
|
|
||||||
/* 0x18 */ f32 unk_18;
|
|
||||||
/* 0x1C */ f32 unk_1C;
|
|
||||||
/* 0x20 */ f32 unk_20;
|
|
||||||
/* 0x24 */ f32 unk_24;
|
|
||||||
/* 0x28 */ f32 unk_28;
|
|
||||||
/* 0x2C */ s32 unk_2C;
|
|
||||||
/* 0x30 */ s32 timeLeft;
|
|
||||||
/* 0x34 */ s32 unk_34;
|
|
||||||
} ShapeSpellFXData; // size = 0x38
|
|
||||||
|
|
||||||
s32 D_E0024CC0[] = { 0x00FFD01A, 0x09001128, 0x090011A0, 0x784DD0FE, 0x09001150, 0x090011C8, 0xF0FE4C6E, 0x09001178, 0x090011F0, 0x00000000, 0x00000000, 0x00000000 };
|
s32 D_E0024CC0[] = { 0x00FFD01A, 0x09001128, 0x090011A0, 0x784DD0FE, 0x09001150, 0x090011C8, 0xF0FE4C6E, 0x09001178, 0x090011F0, 0x00000000, 0x00000000, 0x00000000 };
|
||||||
|
|
||||||
void shape_spell_appendGfx(void* effect);
|
void shape_spell_appendGfx(void* effect);
|
||||||
@ -39,9 +24,9 @@ EffectInstance* shape_spell_main(s32 isChild, f32 x, f32 y, f32 z, f32 arg4, f32
|
|||||||
|
|
||||||
effect = shim_create_effect_instance(bpPtr);
|
effect = shim_create_effect_instance(bpPtr);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = effect->data.shapeSpell = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.shapeSpell != NULL);
|
||||||
|
|
||||||
part->unk_2C = 0;
|
part->unk_2C = 0;
|
||||||
part->isChild = isChild;
|
part->isChild = isChild;
|
||||||
@ -76,7 +61,7 @@ void shape_spell_init(EffectInstance* effect) {
|
|||||||
|
|
||||||
void shape_spell_update(EffectInstance* effect) {
|
void shape_spell_update(EffectInstance* effect) {
|
||||||
s32 flags = effect->flags;
|
s32 flags = effect->flags;
|
||||||
ShapeSpellFXData* part = effect->data;
|
ShapeSpellFXData* part = effect->data.shapeSpell;
|
||||||
s32 isChild;
|
s32 isChild;
|
||||||
|
|
||||||
if (flags & 0x10) {
|
if (flags & 0x10) {
|
||||||
@ -101,7 +86,7 @@ void shape_spell_update(EffectInstance* effect) {
|
|||||||
part->pos.y + part->unk_14,
|
part->pos.y + part->unk_14,
|
||||||
part->pos.z + part->unk_18,
|
part->pos.z + part->unk_18,
|
||||||
0.0f, 0.0f, 0.0f, 0x18
|
0.0f, 0.0f, 0.0f, 0x18
|
||||||
)->data;
|
)->data.shapeSpell;
|
||||||
newPart->unk_28 = part->unk_28;
|
newPart->unk_28 = part->unk_28;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,9 +24,9 @@ void sleep_bubble_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg
|
|||||||
|
|
||||||
effect = shim_create_effect_instance(bpPtr);
|
effect = shim_create_effect_instance(bpPtr);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = effect->data.sleepBubble = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.sleepBubble != NULL);
|
||||||
|
|
||||||
part->unk_00 = arg0;
|
part->unk_00 = arg0;
|
||||||
part->pos.x = arg1;
|
part->pos.x = arg1;
|
||||||
@ -46,7 +46,7 @@ void sleep_bubble_init(EffectInstance* effect) {
|
|||||||
|
|
||||||
// seems extremely fake
|
// seems extremely fake
|
||||||
void sleep_bubble_update(EffectInstance* effect) {
|
void sleep_bubble_update(EffectInstance* effect) {
|
||||||
SleepBubbleFXData* part = effect->data;
|
SleepBubbleFXData* part = effect->data.sleepBubble;
|
||||||
f32* xPtr = &part->points->x;
|
f32* xPtr = &part->points->x;
|
||||||
f32* yPtr;
|
f32* yPtr;
|
||||||
s32 xAngle, yAngle, i, timeLeft, unk_20;
|
s32 xAngle, yAngle, i, timeLeft, unk_20;
|
||||||
|
@ -42,7 +42,7 @@ EffectInstance* small_gold_sparkle_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3,
|
|||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
||||||
effect->data = data;
|
effect->data.smallGoldSparkle = data;
|
||||||
part = data;
|
part = data;
|
||||||
|
|
||||||
ASSERT(data != NULL);
|
ASSERT(data != NULL);
|
||||||
@ -70,7 +70,7 @@ void small_gold_sparkle_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void small_gold_sparkle_update(EffectInstance* effect) {
|
void small_gold_sparkle_update(EffectInstance* effect) {
|
||||||
SmallGoldSparkleFXData* part = (SmallGoldSparkleFXData*) effect->data;
|
SmallGoldSparkleFXData* part = effect->data.smallGoldSparkle;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
part->unk_14--;
|
part->unk_14--;
|
||||||
@ -110,7 +110,7 @@ void small_gold_sparkle_render(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void small_gold_sparkle_appendGfx(void* effect) {
|
void small_gold_sparkle_appendGfx(void* effect) {
|
||||||
SmallGoldSparkleFXData* part = ((EffectInstance*)effect)->data;
|
SmallGoldSparkleFXData* part = ((EffectInstance*)effect)->data.smallGoldSparkle;
|
||||||
Matrix4f sp18;
|
Matrix4f sp18;
|
||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
Matrix4f sp98;
|
Matrix4f sp98;
|
||||||
|
@ -27,9 +27,9 @@ void snowflake_main(f32 arg0, f32 arg1, f32 arg2, s32 arg3, s32 arg4) {
|
|||||||
|
|
||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = 1;
|
effect->numParts = 1;
|
||||||
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = effect->data.snowflake = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.snowflake != NULL);
|
||||||
|
|
||||||
part->xPos = arg0;
|
part->xPos = arg0;
|
||||||
part->yPos = arg1;
|
part->yPos = arg1;
|
||||||
@ -58,7 +58,7 @@ void snowflake_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void snowflake_update(EffectInstance* effect) {
|
void snowflake_update(EffectInstance* effect) {
|
||||||
SnowflakeFXData* data = effect->data;
|
SnowflakeFXData* data = effect->data.snowflake;
|
||||||
|
|
||||||
data->unk_28--;
|
data->unk_28--;
|
||||||
if (data->unk_28 < 0) {
|
if (data->unk_28 < 0) {
|
||||||
@ -83,7 +83,7 @@ void snowflake_update(EffectInstance* effect) {
|
|||||||
|
|
||||||
void snowflake_render(EffectInstance* effect) {
|
void snowflake_render(EffectInstance* effect) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
SnowflakeFXData* effect14 = effect->data;
|
SnowflakeFXData* effect14 = effect->data.snowflake;
|
||||||
RenderTask renderTask;
|
RenderTask renderTask;
|
||||||
RenderTask* renderTaskPtr = &renderTask;
|
RenderTask* renderTaskPtr = &renderTask;
|
||||||
RenderTask* retTask;
|
RenderTask* retTask;
|
||||||
@ -120,7 +120,7 @@ void snowflake_render(EffectInstance* effect) {
|
|||||||
void snowflake_appendGfx(void* effect) {
|
void snowflake_appendGfx(void* effect) {
|
||||||
Matrix4f sp18, sp58, sp98, spD8, sp118;
|
Matrix4f sp18, sp58, sp98, spD8, sp118;
|
||||||
EffectInstance* effectTemp = effect;
|
EffectInstance* effectTemp = effect;
|
||||||
SnowflakeFXData* part = effectTemp->data;
|
SnowflakeFXData* part = effectTemp->data.snowflake;
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
||||||
|
@ -40,9 +40,9 @@ EffectInstance* star_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32
|
|||||||
|
|
||||||
effect = shim_create_effect_instance(&bp);
|
effect = shim_create_effect_instance(&bp);
|
||||||
effect->numParts = 1;
|
effect->numParts = 1;
|
||||||
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = effect->data.star = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.star != NULL);
|
||||||
part->unk_00 = 1;
|
part->unk_00 = 1;
|
||||||
part->unk_04 = arg1;
|
part->unk_04 = arg1;
|
||||||
part->unk_08 = arg2;
|
part->unk_08 = arg2;
|
||||||
@ -117,7 +117,7 @@ void star_init(EffectInstance* effect) {
|
|||||||
|
|
||||||
void star_update(EffectInstance* effect) {
|
void star_update(EffectInstance* effect) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
StarFXData* data = effect->data;
|
StarFXData* data = effect->data.star;
|
||||||
f32 x, y, z, length;
|
f32 x, y, z, length;
|
||||||
f32 xTemp, yTemp, zTemp;
|
f32 xTemp, yTemp, zTemp;
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ void star_update(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void star_render(EffectInstance* effect) {
|
void star_render(EffectInstance* effect) {
|
||||||
StarFXData* effect15 = effect->data;
|
StarFXData* effect15 = effect->data.star;
|
||||||
RenderTask renderTask;
|
RenderTask renderTask;
|
||||||
RenderTask* renderTaskPtr = &renderTask;
|
RenderTask* renderTaskPtr = &renderTask;
|
||||||
RenderTask* retTask;
|
RenderTask* retTask;
|
||||||
|
@ -7,24 +7,6 @@ enum ArrowType {
|
|||||||
ARROW_TYPE_DEF_UP = 2,
|
ARROW_TYPE_DEF_UP = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct StatChangeFXData {
|
|
||||||
/* 0x00 */ s32 unk_00;
|
|
||||||
/* 0x04 */ Vec3f pos;
|
|
||||||
/* 0x10 */ f32 scale;
|
|
||||||
/* 0x14 */ s32 timeLeft;
|
|
||||||
/* 0x18 */ s32 unk_18;
|
|
||||||
/* 0x1C */ s32 arrowType;
|
|
||||||
/* 0x20 */ s32 arrowValue;
|
|
||||||
/* 0x24 */ s32 unk_24;
|
|
||||||
/* 0x28 */ f32 scaleX;
|
|
||||||
/* 0x2C */ f32 scaleY;
|
|
||||||
/* 0x30 */ f32 unk_30;
|
|
||||||
/* 0x34 */ f32 unk_34;
|
|
||||||
/* 0x38 */ f32 unk_38;
|
|
||||||
/* 0x3C */ s32 unk_3C;
|
|
||||||
/* 0x40 */ s32 unk_40;
|
|
||||||
} StatChangeFXData;
|
|
||||||
|
|
||||||
typedef struct ExtraArrowDataEntry {
|
typedef struct ExtraArrowDataEntry {
|
||||||
u8 unk_00;
|
u8 unk_00;
|
||||||
u8 unk_01;
|
u8 unk_01;
|
||||||
@ -148,9 +130,9 @@ EffectInstance* stat_change_main(s32 arg0, f32 x, f32 y, f32 z, f32 scale, s32 t
|
|||||||
|
|
||||||
effect = shim_create_effect_instance(bpPtr);
|
effect = shim_create_effect_instance(bpPtr);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = effect->data.statChange = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.statChange != NULL);
|
||||||
|
|
||||||
part->unk_00 = arg0;
|
part->unk_00 = arg0;
|
||||||
part->pos.x = x;
|
part->pos.x = x;
|
||||||
@ -177,7 +159,7 @@ void stat_change_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void stat_change_update(EffectInstance* effect) {
|
void stat_change_update(EffectInstance* effect) {
|
||||||
StatChangeFXData* part = effect->data;
|
StatChangeFXData* part = effect->data.statChange;
|
||||||
s32 old_unk18;
|
s32 old_unk18;
|
||||||
|
|
||||||
part->timeLeft--;
|
part->timeLeft--;
|
||||||
|
@ -7,22 +7,6 @@ void tattle_window_render(EffectInstance* effect);
|
|||||||
void func_E00D8264(EffectInstance* effect);
|
void func_E00D8264(EffectInstance* effect);
|
||||||
void func_E00D8630(EffectInstance* effect);
|
void func_E00D8630(EffectInstance* effect);
|
||||||
|
|
||||||
typedef struct TattleWindowFXData {
|
|
||||||
/* 0x00 */ s32 unk_00;
|
|
||||||
/* 0x04 */ Vec3f pos;
|
|
||||||
/* 0x10 */ s32 unk_10;
|
|
||||||
/* 0x14 */ s32 unk_14;
|
|
||||||
/* 0x18 */ f32 unk_18;
|
|
||||||
/* 0x1C */ f32 unk_1C;
|
|
||||||
/* 0x20 */ s32 unk_20;
|
|
||||||
/* 0x24 */ s32 unk_24;
|
|
||||||
/* 0x28 */ f32 unk_28;
|
|
||||||
/* 0x2C */ f32 unk_2C;
|
|
||||||
/* 0x30 */ f32 unk_30;
|
|
||||||
/* 0x34 */ u8 unk_34;
|
|
||||||
/* 0x35 */ u8 unk_35;
|
|
||||||
} TattleWindowFXData; // size = 0x38
|
|
||||||
|
|
||||||
typedef struct D_E00D8818_Entry {
|
typedef struct D_E00D8818_Entry {
|
||||||
s16 unk_00;
|
s16 unk_00;
|
||||||
u8 unk_02;
|
u8 unk_02;
|
||||||
@ -72,9 +56,9 @@ EffectInstance* tattle_window_main(s32 arg0, f32 x, f32 y, f32 z, f32 arg4, s32
|
|||||||
|
|
||||||
effect = shim_create_effect_instance(bpPtr);
|
effect = shim_create_effect_instance(bpPtr);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
part = effect->data.tattleWindow = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
|
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.tattleWindow != NULL);
|
||||||
|
|
||||||
part->unk_00 = arg0;
|
part->unk_00 = arg0;
|
||||||
part->unk_14 = 0;
|
part->unk_14 = 0;
|
||||||
@ -104,7 +88,7 @@ void tattle_window_init(EffectInstance* effect) {
|
|||||||
void tattle_window_update(EffectInstance* effect) {
|
void tattle_window_update(EffectInstance* effect) {
|
||||||
s32 unk_10, unk_10_2;
|
s32 unk_10, unk_10_2;
|
||||||
s32 old_unk_14;
|
s32 old_unk_14;
|
||||||
TattleWindowFXData* part = effect->data;
|
TattleWindowFXData* part = effect->data.tattleWindow;
|
||||||
|
|
||||||
if (effect->flags & 0x10) {
|
if (effect->flags & 0x10) {
|
||||||
effect->flags &= ~0x10;
|
effect->flags &= ~0x10;
|
||||||
|
@ -17,34 +17,6 @@ Gfx* D_E00C8710[2] = { D_09000800_3D02F0, D_090008D8_3D03C8 };
|
|||||||
u8 D_E00C8718[8] = { 110, 150, 130, 110, 100, 95, 100, 0 };
|
u8 D_E00C8718[8] = { 110, 150, 130, 110, 100, 95, 100, 0 };
|
||||||
u8 D_E00C8720[8] = { 80, 60, 80, 100, 120, 110, 100, 0 };
|
u8 D_E00C8720[8] = { 80, 60, 80, 100, 120, 110, 100, 0 };
|
||||||
|
|
||||||
typedef struct ThrowSpinyFXData {
|
|
||||||
/* 0x00 */ s32 unk_00;
|
|
||||||
/* 0x04 */ Vec3f pos;
|
|
||||||
/* 0x10 */ f32 unk_10;
|
|
||||||
/* 0x14 */ f32 unk_14;
|
|
||||||
/* 0x18 */ f32 unk_18;
|
|
||||||
/* 0x1C */ f32 unk_1C;
|
|
||||||
/* 0x20 */ f32 unk_20;
|
|
||||||
/* 0x24 */ f32 unk_24;
|
|
||||||
/* 0x28 */ s32 life;
|
|
||||||
/* 0x2C */ s32 lifeDuration;
|
|
||||||
/* 0x30 */ s32 unk_30;
|
|
||||||
/* 0x34 */ s32 unk_34;
|
|
||||||
/* 0x38 */ s32 unk_38;
|
|
||||||
/* 0x3C */ s32 rgba;
|
|
||||||
/* 0x40 */ f32 unk_40;
|
|
||||||
/* 0x44 */ f32 unk_44;
|
|
||||||
/* 0x48 */ f32 gravity;
|
|
||||||
/* 0x4C */ f32 unk_4C;
|
|
||||||
/* 0x50 */ f32 yaw;
|
|
||||||
/* 0x54 */ f32 rotationSpeed;
|
|
||||||
/* 0x58 */ f32 xScale;
|
|
||||||
/* 0x5C */ f32 yScale;
|
|
||||||
/* 0x60 */ u32 state;
|
|
||||||
/* 0x64 */ s32 unk_64;
|
|
||||||
/* 0x68 */ s32 timeUntilFall; //how long until spiny falls to ground?
|
|
||||||
} ThrowSpinyFXData; //sizeof 0x6C
|
|
||||||
|
|
||||||
//during spiny surge
|
//during spiny surge
|
||||||
EffectInstance* throw_spiny_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, s32 time) {
|
EffectInstance* throw_spiny_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, s32 time) {
|
||||||
EffectBlueprint bp;
|
EffectBlueprint bp;
|
||||||
@ -63,8 +35,8 @@ EffectInstance* throw_spiny_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg
|
|||||||
|
|
||||||
effect = (EffectInstance*)shim_create_effect_instance(bpPtr);
|
effect = (EffectInstance*)shim_create_effect_instance(bpPtr);
|
||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
spinyObject = effect->data = shim_general_heap_malloc(numParts * sizeof(*spinyObject));
|
spinyObject = effect->data.throwSpiny = shim_general_heap_malloc(numParts * sizeof(*spinyObject));
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.throwSpiny != NULL);
|
||||||
spinyObject->unk_00 = arg0;
|
spinyObject->unk_00 = arg0;
|
||||||
spinyObject->lifeDuration = 0;
|
spinyObject->lifeDuration = 0;
|
||||||
|
|
||||||
@ -114,7 +86,7 @@ void throw_spiny_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void throw_spiny_update(EffectInstance* effectInstance) {
|
void throw_spiny_update(EffectInstance* effectInstance) {
|
||||||
ThrowSpinyFXData* spinyObject = effectInstance->data;
|
ThrowSpinyFXData* spinyObject = effectInstance->data.throwSpiny;
|
||||||
u32 state;
|
u32 state;
|
||||||
f32 gravity;
|
f32 gravity;
|
||||||
s32 lifeDuration;
|
s32 lifeDuration;
|
||||||
@ -188,7 +160,7 @@ void throw_spiny_appendGfx(void* effect) {
|
|||||||
Matrix4f sp18;
|
Matrix4f sp18;
|
||||||
Matrix4f sp58;
|
Matrix4f sp58;
|
||||||
Camera* camera = &gCameras[gCurrentCameraID];
|
Camera* camera = &gCameras[gCurrentCameraID];
|
||||||
ThrowSpinyFXData* data = ((EffectInstance*)effect)->data;
|
ThrowSpinyFXData* data = ((EffectInstance*)effect)->data.throwSpiny;
|
||||||
s32 temp_s5 = data->rgba;
|
s32 temp_s5 = data->rgba;
|
||||||
s32 temp_s6 = data->unk_00;
|
s32 temp_s6 = data->unk_00;
|
||||||
f32 scale = data->unk_40 * SPRITE_PIXEL_SCALE;
|
f32 scale = data->unk_40 * SPRITE_PIXEL_SCALE;
|
||||||
|
@ -36,8 +36,8 @@ void walking_dust_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg
|
|||||||
effect->numParts = numParts;
|
effect->numParts = numParts;
|
||||||
|
|
||||||
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
data = shim_general_heap_malloc(numParts * sizeof(*data));
|
||||||
effect->data = data;
|
effect->data.walkingDust = data;
|
||||||
ASSERT(effect->data != NULL);
|
ASSERT(effect->data.walkingDust != NULL);
|
||||||
|
|
||||||
shim_mem_clear(data, numParts * sizeof(*data));
|
shim_mem_clear(data, numParts * sizeof(*data));
|
||||||
data->unk_6C = arg0 == 2;
|
data->unk_6C = arg0 == 2;
|
||||||
@ -61,7 +61,7 @@ void walking_dust_init(EffectInstance* effect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void walking_dust_update(EffectInstance* effect) {
|
void walking_dust_update(EffectInstance* effect) {
|
||||||
WalkingDustFXData* data = (WalkingDustFXData*)effect->data;
|
WalkingDustFXData* data = effect->data.walkingDust;
|
||||||
|
|
||||||
data->unk_74 = D_E000E684[data->unk_6C][data->unk_70++];
|
data->unk_74 = D_E000E684[data->unk_6C][data->unk_70++];
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ void walking_dust_render(EffectInstance* effect) {
|
|||||||
|
|
||||||
void walking_dust_appendGfx(void* effect) {
|
void walking_dust_appendGfx(void* effect) {
|
||||||
EffectInstance* effectTemp = effect;
|
EffectInstance* effectTemp = effect;
|
||||||
WalkingDustFXData* data = effectTemp->data;
|
WalkingDustFXData* data = effectTemp->data.walkingDust;
|
||||||
s32 temp_t3 = data->unk_04;
|
s32 temp_t3 = data->unk_04;
|
||||||
s32 temp_t4 = data->unk_74;
|
s32 temp_t4 = data->unk_74;
|
||||||
s32 cond = FALSE;
|
s32 cond = FALSE;
|
||||||
|
@ -255,7 +255,7 @@ void entity_GiantChest_hide_effect(Entity* entity) {
|
|||||||
EffectInstance* effect = chest->gotItemEffect;
|
EffectInstance* effect = chest->gotItemEffect;
|
||||||
|
|
||||||
if (effect != NULL) {
|
if (effect != NULL) {
|
||||||
((GotItemOutlineFXData*)effect->data)->unk_14 = 10;
|
effect->data.gotItemOutline->unk_14 = 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,19 +131,20 @@ ApiStatus func_802D7B10(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO fix this!
|
|
||||||
ApiStatus func_802D7B44(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802D7B44(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
||||||
((s32*)(effect->data))[5] = 10; // offset 0x14 in GotItemOutline effect data
|
|
||||||
|
effect->data.gotItemOutline->unk_14 = 10;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO fix this!
|
|
||||||
ApiStatus func_802D7B74(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802D7B74(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
||||||
((s32*)(effect->data))[12] = 5; // offset 0x30 in unknown effect data
|
|
||||||
|
// function is never called, so the effect type is assumed
|
||||||
|
effect->data.gotItemOutline->unk_30 = 5;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,7 +303,7 @@ ApiStatus SetSleepBubbleTimeLeft(Evt* script, s32 isInitialCall) {
|
|||||||
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *args++);
|
||||||
s32 value = evt_get_variable(script, *args++);
|
s32 value = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
((SleepBubbleFXData*)(effect->data))->timeLeft = value;
|
effect->data.sleepBubble->timeLeft = value;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
76
src/msg.c
76
src/msg.c
@ -12,7 +12,7 @@ typedef struct UnkMsgStruct8 {
|
|||||||
|
|
||||||
typedef MessageImageData* MessageImageDataList[1];
|
typedef MessageImageData* MessageImageDataList[1];
|
||||||
|
|
||||||
extern s32 D_802EF0D0;
|
extern IMG_BIN D_802EF0D0;
|
||||||
|
|
||||||
s32 D_8014C280[] = { 0x028001E0, 0x01FF0000, 0x028001E0, 0x01FF0000, };
|
s32 D_8014C280[] = { 0x028001E0, 0x01FF0000, 0x028001E0, 0x01FF0000, };
|
||||||
|
|
||||||
@ -133,8 +133,8 @@ u8 D_8014C588[] = { 105, 100, 77, 57, 40, 27, 16, 8, 3, 0, 0, 0, 0, 0, 0, 0, 0,
|
|||||||
// unsorted
|
// unsorted
|
||||||
extern s32 D_8015131C;
|
extern s32 D_8015131C;
|
||||||
extern MessageDrawState D_80155D20;
|
extern MessageDrawState D_80155D20;
|
||||||
extern s32 D_80159B50;
|
extern IMG_BIN D_80159B50[];
|
||||||
extern s32 D_8015C7E0;
|
extern PAL_BIN D_8015C7E0[];
|
||||||
|
|
||||||
// BSS
|
// BSS
|
||||||
extern s32 gMsgBGScrollAmtX;
|
extern s32 gMsgBGScrollAmtX;
|
||||||
@ -150,25 +150,25 @@ extern MessageDrawState* msg_drawState;
|
|||||||
|
|
||||||
// another file?
|
// another file?
|
||||||
extern s16 D_802EB644[22];
|
extern s16 D_802EB644[22];
|
||||||
extern s32 D_802EB670;
|
extern IMG_BIN D_802EB670[];
|
||||||
extern s32 D_802EBA70;
|
extern IMG_BIN D_802EBA70[];
|
||||||
extern s32 D_802EBB70;
|
extern IMG_BIN D_802EBB70[];
|
||||||
extern s32 D_802EC3F0;
|
extern PAL_BIN D_802EC3F0[]; // array of several in series
|
||||||
extern s32 D_802EC5F0;
|
extern IMG_BIN D_802EC5F0[];
|
||||||
extern s32 D_802EC670;
|
extern IMG_BIN D_802EC670[];
|
||||||
extern s32 D_802EC6F0;
|
extern IMG_BIN D_802EC6F0[];
|
||||||
extern s32 D_802EC770;
|
extern IMG_BIN D_802EC770[];
|
||||||
extern s32 D_802EC7F0;
|
extern IMG_BIN D_802EC7F0[];
|
||||||
extern s32 D_802EC870[];
|
extern IMG_BIN D_802EC870[];
|
||||||
extern s32 D_802EC970[];
|
extern IMG_BIN D_802EC970[];
|
||||||
extern s32 D_802ECAB0[];
|
extern IMG_BIN D_802ECAB0[];
|
||||||
extern s32 D_802ECBF0[];
|
extern IMG_BIN D_802ECBF0[];
|
||||||
extern s32 D_802ECCF0[];
|
extern IMG_BIN D_802ECCF0[];
|
||||||
extern s32 D_802ECD10;
|
extern PAL_BIN D_802ECD10[];
|
||||||
extern s32 D_802ECD30;
|
extern PAL_BIN D_802ECD30[];
|
||||||
|
|
||||||
extern s32 D_802ED550;
|
extern IMG_BIN D_802ED550[];
|
||||||
extern s32 D_802ED670;
|
extern PAL_BIN D_802ED670[];
|
||||||
extern s32 D_802ED970;
|
extern s32 D_802ED970;
|
||||||
extern s32 D_802EE8D0;
|
extern s32 D_802EE8D0;
|
||||||
extern MessageCharset* gMsgCharsets[5];
|
extern MessageCharset* gMsgCharsets[5];
|
||||||
@ -1012,7 +1012,7 @@ void draw_msg(s32 msgID, s32 posX, s32 posY, s32 opacity, s32 palette, u8 style)
|
|||||||
mallocSpace = general_heap_malloc(0x400);
|
mallocSpace = general_heap_malloc(0x400);
|
||||||
dma_load_msg(msgID, mallocSpace);
|
dma_load_msg(msgID, mallocSpace);
|
||||||
printer->srcBuffer = mallocSpace;
|
printer->srcBuffer = mallocSpace;
|
||||||
get_msg_properties((s32)printer->srcBuffer, 0, &width, 0, 0, 0, 0, charset);
|
get_msg_properties((s32) printer->srcBuffer, 0, &width, 0, 0, 0, 0, charset);
|
||||||
printer->msgWidth = width;
|
printer->msgWidth = width;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1059,7 +1059,7 @@ void msg_draw_rewind_arrow(s32 printerIndex) {
|
|||||||
MessagePrintState* printer = &gMessagePrinters[printerIndex];
|
MessagePrintState* printer = &gMessagePrinters[printerIndex];
|
||||||
|
|
||||||
if (printer->rewindArrowBlinkCounter < 6) {
|
if (printer->rewindArrowBlinkCounter < 6) {
|
||||||
draw_ci_image_with_clipping(&D_802ED550, 24, 24, G_IM_FMT_CI, G_IM_SIZ_4b, &D_802ED670, printer->rewindArrowPos.x,
|
draw_ci_image_with_clipping(D_802ED550, 24, 24, G_IM_FMT_CI, G_IM_SIZ_4b, D_802ED670, printer->rewindArrowPos.x,
|
||||||
printer->rewindArrowPos.y, 10, 10, SCREEN_WIDTH - 20, SCREEN_HEIGHT - 20, 255);
|
printer->rewindArrowPos.y, 10, 10, SCREEN_WIDTH - 20, SCREEN_HEIGHT - 20, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1150,7 +1150,6 @@ void appendGfx_message(MessagePrintState* printer, s16 posX, s16 posY, u16 addit
|
|||||||
u16 spB6;
|
u16 spB6;
|
||||||
u8 spB8;
|
u8 spB8;
|
||||||
f32 windowScaleX;
|
f32 windowScaleX;
|
||||||
s32* spC0;
|
|
||||||
MessageCharset* msgCharset;
|
MessageCharset* msgCharset;
|
||||||
f32 temp_f10;
|
f32 temp_f10;
|
||||||
f32 temp_f20;
|
f32 temp_f20;
|
||||||
@ -1199,7 +1198,8 @@ void appendGfx_message(MessagePrintState* printer, s16 posX, s16 posY, u16 addit
|
|||||||
s32 frameAlpha;
|
s32 frameAlpha;
|
||||||
u16 fading;
|
u16 fading;
|
||||||
s32 phi_s0_5;
|
s32 phi_s0_5;
|
||||||
s32* phi_s6;
|
IMG_PTR signRaster;
|
||||||
|
PAL_PTR signPalette;
|
||||||
s8 phi_s2_4;
|
s8 phi_s2_4;
|
||||||
s32 phi_s3_2;
|
s32 phi_s3_2;
|
||||||
s32 phi_v0_3;
|
s32 phi_v0_3;
|
||||||
@ -1577,14 +1577,14 @@ void appendGfx_message(MessagePrintState* printer, s16 posX, s16 posY, u16 addit
|
|||||||
msg_drawState->framePalette = 15;
|
msg_drawState->framePalette = 15;
|
||||||
temp_s1_5 = 0xFF;
|
temp_s1_5 = 0xFF;
|
||||||
if (printer->style == MSG_STYLE_SIGN) {
|
if (printer->style == MSG_STYLE_SIGN) {
|
||||||
spC0 = &D_802EC770;
|
signRaster = D_802EC770;
|
||||||
printer->windowSize.y = 72;
|
printer->windowSize.y = 72;
|
||||||
msg_drawState->textColor = MSG_PAL_18;
|
msg_drawState->textColor = MSG_PAL_18;
|
||||||
phi_s6 = &D_802ECD10;
|
signPalette = D_802ECD10;
|
||||||
} else {
|
} else {
|
||||||
spC0 = &D_802EC7F0;
|
signRaster = D_802EC7F0;
|
||||||
msg_drawState->textColor = MSG_PAL_1C;
|
msg_drawState->textColor = MSG_PAL_1C;
|
||||||
phi_s6 = &D_802ECD30;
|
signPalette = D_802ECD30;
|
||||||
}
|
}
|
||||||
msg_drawState->clipX[0] = 34;
|
msg_drawState->clipX[0] = 34;
|
||||||
msg_drawState->clipY[0] = 40;
|
msg_drawState->clipY[0] = 40;
|
||||||
@ -1611,11 +1611,11 @@ void appendGfx_message(MessagePrintState* printer, s16 posX, s16 posY, u16 addit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
spAE = (u8)temp_s1_5;
|
spAE = (u8)temp_s1_5;
|
||||||
draw_ci_image_with_clipping(&D_802EC5F0, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, phi_s6, 20, 28, 10, 10, 310, 230, temp_s1_5);
|
draw_ci_image_with_clipping(D_802EC5F0, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, signPalette, 20, 28, 10, 10, 310, 230, temp_s1_5);
|
||||||
draw_ci_image_with_clipping(&D_802EC670, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, phi_s6, 284, 28, 10, 10, 310, 230, temp_s1_5);
|
draw_ci_image_with_clipping(D_802EC670, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, signPalette, 284, 28, 10, 10, 310, 230, temp_s1_5);
|
||||||
draw_ci_image_with_clipping(&D_802EC6F0, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, phi_s6, 20, printer->windowSize.y + 12, 10, 10, 310, 230,
|
draw_ci_image_with_clipping(D_802EC6F0, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, signPalette, 20, printer->windowSize.y + 12, 10, 10, 310, 230,
|
||||||
temp_s1_5);
|
temp_s1_5);
|
||||||
draw_ci_image_with_clipping(spC0, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, phi_s6, 284, printer->windowSize.y + 12, 10, 10, 310, 230, temp_s1_5);
|
draw_ci_image_with_clipping(signRaster, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, signPalette, 284, printer->windowSize.y + 12, 10, 10, 310, 230, temp_s1_5);
|
||||||
gDPLoadTextureTile_4b(gMasterGfxPos++, D_802EC870, G_IM_FMT_CI, 32, 0, 0, 0, 31, 15, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
gDPLoadTextureTile_4b(gMasterGfxPos++, D_802EC870, G_IM_FMT_CI, 32, 0, 0, 0, 31, 15, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, 5, 4, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_WRAP, 5, 4, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPTextureRectangle(gMasterGfxPos++, 0x0090, 0x0070, 0x0470, 0x00B0, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
|
gSPTextureRectangle(gMasterGfxPos++, 0x0090, 0x0070, 0x0470, 0x00B0, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
|
||||||
@ -1870,7 +1870,7 @@ void appendGfx_message(MessagePrintState* printer, s16 posX, s16 posY, u16 addit
|
|||||||
imgDrawPosY = (s16)((msg_drawState->nextPos[1] + (msg_drawState->textStartPos[1] + (printer->windowBasePos.y + posY))) -
|
imgDrawPosY = (s16)((msg_drawState->nextPos[1] + (msg_drawState->textStartPos[1] + (printer->windowBasePos.y + posY))) -
|
||||||
additionalOffsetY);
|
additionalOffsetY);
|
||||||
|
|
||||||
draw_ci_image_with_clipping(&D_80159B50, 32, 32, G_IM_FMT_CI, G_IM_SIZ_4b, &D_8015C7E0, imgDrawPosX, imgDrawPosY, msg_drawState->clipX[0],
|
draw_ci_image_with_clipping(D_80159B50, 32, 32, G_IM_FMT_CI, G_IM_SIZ_4b, D_8015C7E0, imgDrawPosX, imgDrawPosY, msg_drawState->clipX[0],
|
||||||
msg_drawState->clipY[0], msg_drawState->clipX[1] - msg_drawState->clipX[0],
|
msg_drawState->clipY[0], msg_drawState->clipX[1] - msg_drawState->clipX[0],
|
||||||
msg_drawState->clipY[1] - msg_drawState->clipY[0], phi_t3);
|
msg_drawState->clipY[1] - msg_drawState->clipY[0], phi_t3);
|
||||||
msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10;
|
msg_drawState->printModeFlags |= MSG_PRINT_FLAG_10;
|
||||||
@ -2585,22 +2585,22 @@ void msg_draw_speech_bubble(
|
|||||||
|
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16);
|
gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16);
|
||||||
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1,
|
gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1,
|
||||||
(msg_drawState->framePalette << 5) + (s8*)&D_802EC3F0); // TODO fix (array?)
|
&D_802EC3F0[16 * msg_drawState->framePalette]);
|
||||||
gDPTileSync(gMasterGfxPos++);
|
gDPTileSync(gMasterGfxPos++);
|
||||||
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0100, G_TX_LOADTILE, 0,
|
gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0100, G_TX_LOADTILE, 0,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||||
gDPLoadSync(gMasterGfxPos++);
|
gDPLoadSync(gMasterGfxPos++);
|
||||||
gDPLoadTLUTCmd(gMasterGfxPos++, G_TX_LOADTILE, 15);
|
gDPLoadTLUTCmd(gMasterGfxPos++, G_TX_LOADTILE, 15);
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
gDPLoadTextureTile_4b(gMasterGfxPos++, &D_802EB670, G_IM_FMT_CI, 32, 0, 0, 0, 31, 63, 0,
|
gDPLoadTextureTile_4b(gMasterGfxPos++, D_802EB670, G_IM_FMT_CI, 32, 0, 0, 0, 31, 63, 0,
|
||||||
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPVertex(gMasterGfxPos++, gMsgSpeechBoxLQuad, 4, 0);
|
gSPVertex(gMasterGfxPos++, gMsgSpeechBoxLQuad, 4, 0);
|
||||||
gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
||||||
gDPLoadTextureTile_4b(gMasterGfxPos++, &D_802EBA70, G_IM_FMT_CI, 8, 0, 0, 0, 7, 63, 0,
|
gDPLoadTextureTile_4b(gMasterGfxPos++, D_802EBA70, G_IM_FMT_CI, 8, 0, 0, 0, 7, 63, 0,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 3, 6, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 3, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPVertex(gMasterGfxPos++, gMsgSpeechBoxMQuad, 4, 0);
|
gSPVertex(gMasterGfxPos++, gMsgSpeechBoxMQuad, 4, 0);
|
||||||
gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
||||||
gDPLoadTextureTile_4b(gMasterGfxPos++, &D_802EBB70, G_IM_FMT_CI, 32, 0, 0, 0, 31, 63, 0,
|
gDPLoadTextureTile_4b(gMasterGfxPos++, D_802EBB70, G_IM_FMT_CI, 32, 0, 0, 0, 31, 63, 0,
|
||||||
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPVertex(gMasterGfxPos++, gMsgSpeechBoxRQuad, 4, 0);
|
gSPVertex(gMasterGfxPos++, gMsgSpeechBoxRQuad, 4, 0);
|
||||||
gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
|
||||||
|
64
src/npc.c
64
src/npc.c
@ -66,7 +66,7 @@ void npc_iter_no_op(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 _create_npc(NpcBlueprint* blueprint, s32** animList, s32 skipLoadingAnims) {
|
s32 _create_npc(NpcBlueprint* blueprint, u32** animList, s32 skipLoadingAnims) {
|
||||||
Npc* npc;
|
Npc* npc;
|
||||||
s32 i;
|
s32 i;
|
||||||
s32 j;
|
s32 j;
|
||||||
@ -172,7 +172,7 @@ s32 _create_npc_basic(NpcBlueprint* blueprint) {
|
|||||||
return _create_npc(blueprint, NULL, FALSE);
|
return _create_npc(blueprint, NULL, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 _create_npc_standard(NpcBlueprint* blueprint, s32** animList) {
|
s32 _create_npc_standard(NpcBlueprint* blueprint, u32** animList) {
|
||||||
_create_npc(blueprint, animList, FALSE);
|
_create_npc(blueprint, animList, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -935,7 +935,7 @@ void disable_npc_shadow(Npc* npc) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_npc_sprite(Npc* npc, s32 anim, s32** extraAnimList) {
|
void set_npc_sprite(Npc* npc, s32 anim, u32** extraAnimList) {
|
||||||
ASSERT((npc->flags & NPC_FLAG_1000000) || spr_free_sprite(npc->spriteInstanceID) == 0);
|
ASSERT((npc->flags & NPC_FLAG_1000000) || spr_free_sprite(npc->spriteInstanceID) == 0);
|
||||||
|
|
||||||
npc->extraAnimList = extraAnimList;
|
npc->extraAnimList = extraAnimList;
|
||||||
@ -1247,7 +1247,7 @@ void npc_remove_decoration_none(Npc* npc, s32 idx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void npc_update_decoration_bowser_aura(Npc* npc, s32 idx) {
|
void npc_update_decoration_bowser_aura(Npc* npc, s32 idx) {
|
||||||
EffectInstanceData* instanceData;
|
AuraFXData* data;
|
||||||
|
|
||||||
switch (npc->decorationInitialised[idx]) {
|
switch (npc->decorationInitialised[idx]) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -1260,17 +1260,17 @@ void npc_update_decoration_bowser_aura(Npc* npc, s32 idx) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
instanceData = npc->decorations[idx]->data;
|
data = npc->decorations[idx]->data.aura;
|
||||||
instanceData->pos.x = npc->pos.x;
|
data->posA.x = npc->pos.x;
|
||||||
instanceData->pos.y = npc->pos.y;
|
data->posA.y = npc->pos.y;
|
||||||
instanceData->pos.z = npc->pos.z;
|
data->posA.z = npc->pos.z;
|
||||||
instanceData->scale.x = (npc->scale.x * npc->collisionRadius) * 0.01;
|
data->scale.x = (npc->scale.x * npc->collisionRadius) * 0.01;
|
||||||
instanceData->scale.y = (npc->scale.y * npc->collisionHeight) * 0.01;
|
data->scale.y = (npc->scale.y * npc->collisionHeight) * 0.01;
|
||||||
instanceData->unk_64 = npc->renderYaw;
|
data->renderYaw = npc->renderYaw;
|
||||||
}
|
}
|
||||||
|
|
||||||
void npc_remove_decoration_bowser_aura(Npc* npc, s32 idx) {
|
void npc_remove_decoration_bowser_aura(Npc* npc, s32 idx) {
|
||||||
((EffectInstanceData*)npc->decorations[idx]->data)->unk_2C = 5;
|
npc->decorations[idx]->data.aura->fadeTime = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
void npc_update_decoration_sweat(Npc* npc, s32 idx) {
|
void npc_update_decoration_sweat(Npc* npc, s32 idx) {
|
||||||
@ -1298,7 +1298,7 @@ void npc_remove_decoration_sweat(Npc* npc, s32 idx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void npc_update_decoration_seeing_stars(Npc* npc, s32 idx) {
|
void npc_update_decoration_seeing_stars(Npc* npc, s32 idx) {
|
||||||
EffectInstanceData* instanceData;
|
StarsOrbitingFXData* data;
|
||||||
|
|
||||||
switch (npc->decorationInitialised[idx]) {
|
switch (npc->decorationInitialised[idx]) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -1312,10 +1312,10 @@ void npc_update_decoration_seeing_stars(Npc* npc, s32 idx) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
instanceData = npc->decorations[idx]->data;
|
data = npc->decorations[idx]->data.starsOrbiting;
|
||||||
instanceData->pos.x = npc->pos.x;
|
data->pos.x = npc->pos.x;
|
||||||
instanceData->pos.y = npc->pos.y + npc->collisionHeight;
|
data->pos.y = npc->pos.y + npc->collisionHeight;
|
||||||
instanceData->pos.z = npc->pos.z;
|
data->pos.z = npc->pos.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
void npc_remove_decoration_seeing_stars(Npc* npc, s32 idx) {
|
void npc_remove_decoration_seeing_stars(Npc* npc, s32 idx) {
|
||||||
@ -1323,20 +1323,19 @@ void npc_remove_decoration_seeing_stars(Npc* npc, s32 idx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void npc_update_decoration_glow_in_front(Npc* npc, s32 idx) {
|
void npc_update_decoration_glow_in_front(Npc* npc, s32 idx) {
|
||||||
EffectInstanceData* instanceData;
|
EnergyOrbWaveFXData* data;
|
||||||
|
|
||||||
switch (npc->decorationInitialised[idx]) {
|
switch (npc->decorationInitialised[idx]) {
|
||||||
case 0:
|
case 0:
|
||||||
npc->decorations[idx] = fx_energy_orb_wave(2, npc->pos.x, npc->pos.y + npc->collisionHeight * 0.5, npc->pos.z,
|
npc->decorations[idx] = fx_energy_orb_wave(2, npc->pos.x, npc->pos.y + npc->collisionHeight * 0.5, npc->pos.z, npc->scale.x * 0.8 + 0.2f, -1);
|
||||||
npc->scale.x * 0.8 + 0.2f, -1);
|
|
||||||
npc->decorationInitialised[idx] = 1;
|
npc->decorationInitialised[idx] = 1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
instanceData = npc->decorations[idx]->data;
|
data = npc->decorations[idx]->data.energyOrbWave;
|
||||||
instanceData->pos.x = npc->pos.x;
|
data->pos.x = npc->pos.x;
|
||||||
instanceData->pos.y = npc->pos.y + npc->collisionHeight * 0.5 * npc->scale.x;
|
data->pos.y = npc->pos.y + npc->collisionHeight * 0.5 * npc->scale.x;
|
||||||
instanceData->pos.z = npc->pos.z;
|
data->pos.z = npc->pos.z;
|
||||||
instanceData->unk_30 = npc->scale.x * 0.8 + 0.2f;
|
data->scale = npc->scale.x * 0.8 + 0.2f;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1346,20 +1345,19 @@ void npc_remove_decoration_glow_in_front(Npc* npc, s32 idx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void npc_update_decoration_glow_behind(Npc* npc, s32 idx) {
|
void npc_update_decoration_glow_behind(Npc* npc, s32 idx) {
|
||||||
EffectInstanceData* instanceData;
|
EnergyOrbWaveFXData* data;
|
||||||
|
|
||||||
switch (npc->decorationInitialised[idx]) {
|
switch (npc->decorationInitialised[idx]) {
|
||||||
case 0:
|
case 0:
|
||||||
npc->decorations[idx] = fx_energy_orb_wave(2, npc->pos.x, npc->pos.y + npc->collisionHeight * 0.5, npc->pos.z - 5.0f, 1.0f,
|
npc->decorations[idx] = fx_energy_orb_wave(2, npc->pos.x, npc->pos.y + npc->collisionHeight * 0.5, npc->pos.z - 5.0f, 1.0f, 0);
|
||||||
0);
|
|
||||||
npc->decorationInitialised[idx] = 1;
|
npc->decorationInitialised[idx] = 1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
instanceData = npc->decorations[idx]->data;
|
data = npc->decorations[idx]->data.energyOrbWave;
|
||||||
instanceData->pos.x = npc->pos.x;
|
data->pos.x = npc->pos.x;
|
||||||
instanceData->pos.y = npc->pos.y + npc->collisionHeight * 0.5;
|
data->pos.y = npc->pos.y + npc->collisionHeight * 0.5;
|
||||||
instanceData->pos.z = npc->pos.z - 5.0f;
|
data->pos.z = npc->pos.z - 5.0f;
|
||||||
instanceData->unk_30 = 1.0f;
|
data->scale = 1.0f;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ PlayerSpriteSet spr_playerSpriteSets[] = {
|
|||||||
|
|
||||||
void spr_appendGfx_component_flat(
|
void spr_appendGfx_component_flat(
|
||||||
Quad* vertices,
|
Quad* vertices,
|
||||||
void* raster, void* palette,
|
IMG_PTR raster, PAL_PTR palette,
|
||||||
s32 width, s32 height,
|
s32 width, s32 height,
|
||||||
f32 arg5,
|
f32 arg5,
|
||||||
Matrix4f mtx,
|
Matrix4f mtx,
|
||||||
@ -702,7 +702,7 @@ s32 spr_get_npc_raster_info(SpriteRasterInfo* out, s32 npcSpriteID, s32 rasterIn
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
u16** spr_get_npc_palettes(s32 npcSpriteID) {
|
PAL_PTR* spr_get_npc_palettes(s32 npcSpriteID) {
|
||||||
SpriteAnimData* sprite = spr_npcSprites[npcSpriteID];
|
SpriteAnimData* sprite = spr_npcSprites[npcSpriteID];
|
||||||
|
|
||||||
if (sprite != NULL) {
|
if (sprite != NULL) {
|
||||||
|
@ -70,7 +70,7 @@ typedef struct PlayerSpriteSet {
|
|||||||
/// Sprite data header.
|
/// Sprite data header.
|
||||||
typedef struct SpriteAnimData {
|
typedef struct SpriteAnimData {
|
||||||
/* 0x00 */ SpriteRasterCacheEntry** rastersOffset;
|
/* 0x00 */ SpriteRasterCacheEntry** rastersOffset;
|
||||||
/* 0x04 */ u16** palettesOffset;
|
/* 0x04 */ PAL_PTR* palettesOffset;
|
||||||
/* 0x08 */ s32 maxComponents;
|
/* 0x08 */ s32 maxComponents;
|
||||||
/* 0x0C */ s32 colorVariations;
|
/* 0x0C */ s32 colorVariations;
|
||||||
} SpriteAnimData; // size = 0x10
|
} SpriteAnimData; // size = 0x10
|
||||||
@ -104,7 +104,7 @@ void spr_update_player_raster_cache(void);
|
|||||||
|
|
||||||
s32 spr_update_player_sprite(s32 arg0, s32 arg1, f32 arg2);
|
s32 spr_update_player_sprite(s32 arg0, s32 arg1, f32 arg2);
|
||||||
|
|
||||||
s32 spr_draw_player_sprite(s32 spriteInstanceID, s32 yaw, s32 arg2, s16** paletteList, Matrix4f mtx);
|
s32 spr_draw_player_sprite(s32 spriteInstanceID, s32 yaw, s32 arg2, PAL_PTR* paletteList, Matrix4f mtx);
|
||||||
|
|
||||||
s32 func_802DDEC4(s32 arg0);
|
s32 func_802DDEC4(s32 arg0);
|
||||||
|
|
||||||
@ -119,11 +119,11 @@ void spr_get_player_raster_info(SpriteRasterInfo* out, s32 playerSpriteID, s32 r
|
|||||||
u16** spr_get_player_palettes(s32 spriteIndex);
|
u16** spr_get_player_palettes(s32 spriteIndex);
|
||||||
|
|
||||||
/// @param animID - Set MSB for tail allocation (i.e. `0x80XXYYZZ`)
|
/// @param animID - Set MSB for tail allocation (i.e. `0x80XXYYZZ`)
|
||||||
s32 spr_load_npc_sprite(s32 animID, s32* extraAnimList);
|
s32 spr_load_npc_sprite(s32 animID, u32* extraAnimList);
|
||||||
|
|
||||||
s32 spr_update_sprite(s32 spriteInstanceID, s32 animID, f32 timeScale);
|
s32 spr_update_sprite(s32 spriteInstanceID, s32 animID, f32 timeScale);
|
||||||
|
|
||||||
s32 spr_draw_npc_sprite(s32 spriteInstanceID, s32 yaw, s32 arg2, s16** paletteList, Matrix4f mtx);
|
s32 spr_draw_npc_sprite(s32 spriteInstanceID, s32 yaw, s32 arg2, PAL_PTR* paletteList, Matrix4f mtx);
|
||||||
|
|
||||||
s32 func_802DE5C8(s32 arg0);
|
s32 func_802DE5C8(s32 arg0);
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ extern u8 N(CreditsMessageBuffers)[23][256];
|
|||||||
extern Mtx N(CreditsProjMatrices)[2];
|
extern Mtx N(CreditsProjMatrices)[2];
|
||||||
|
|
||||||
s32 msg_get_print_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u8 flags);
|
s32 msg_get_print_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u8 flags);
|
||||||
|
void msg_get_glyph(s32 font, s32 variation, s32 charIndex, s32 palette, MesasgeFontGlyphData* out);
|
||||||
void dma_load_msg(u32 msgID, void* dest);
|
void dma_load_msg(u32 msgID, void* dest);
|
||||||
|
|
||||||
#include "world/common/atomic/Credits_1.inc.c"
|
#include "world/common/atomic/Credits_1.inc.c"
|
||||||
@ -40,7 +41,7 @@ void N(credits_update_line)(CreditsLine* line) {
|
|||||||
line->state = 0;
|
line->state = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
get_msg_properties(line->message, &msgHeight, &msgWidth, &msgMaxLineChars, NULL, NULL, NULL, 0);
|
get_msg_properties((s32) line->message, &msgHeight, &msgWidth, &msgMaxLineChars, NULL, NULL, NULL, 0);
|
||||||
|
|
||||||
curChar->font = 0;
|
curChar->font = 0;
|
||||||
curChar->variation = 0;
|
curChar->variation = 0;
|
||||||
@ -235,7 +236,7 @@ void N(credits_update_line)(CreditsLine* line) {
|
|||||||
|
|
||||||
if ((line->state == CREDITS_LINE_APPEARING) && doneCurrentState) {
|
if ((line->state == CREDITS_LINE_APPEARING) && doneCurrentState) {
|
||||||
s32 temp = 0;
|
s32 temp = 0;
|
||||||
get_msg_properties(line->message, NULL, NULL, &temp, NULL, NULL, NULL, 0);
|
get_msg_properties((s32) line->message, NULL, NULL, &temp, NULL, NULL, NULL, 0);
|
||||||
line->time = 0;
|
line->time = 0;
|
||||||
line->state++;
|
line->state++;
|
||||||
if (line->holdTime <= 0) {
|
if (line->holdTime <= 0) {
|
||||||
@ -281,7 +282,7 @@ ApiStatus func_80242744_DF9144(Evt* script, s32 isInitialCall) {
|
|||||||
s32 heapSize = evt_get_variable(script, *args++);
|
s32 heapSize = evt_get_variable(script, *args++);
|
||||||
s32 outVar = *args++;
|
s32 outVar = *args++;
|
||||||
|
|
||||||
evt_set_variable(script, outVar, _heap_malloc(&gSpriteHeapPtr, heapSize));
|
evt_set_variable(script, outVar, (s32) _heap_malloc(&gSpriteHeapPtr, heapSize));
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,7 +290,7 @@ ApiStatus func_802427A4_DF91A4(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 pointer = *args++;
|
s32 pointer = *args++;
|
||||||
|
|
||||||
_heap_free(&gSpriteHeapPtr, evt_get_variable(script, pointer));
|
_heap_free(&gSpriteHeapPtr, (void*) evt_get_variable(script, pointer));
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,14 +1,3 @@
|
|||||||
#include "end_00.h"
|
#include "end_00.h"
|
||||||
#include "battle/battle.h"
|
|
||||||
#include "world/common/PlayFX3D.inc.c"
|
#include "world/common/PlayFX3D.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_end/end_00/DF9300", func_80242A30_DF9430);
|
|
||||||
|
|
||||||
ApiStatus func_80242AD4_DF94D4(Evt *script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
|
|
||||||
|
|
||||||
// TODO figure out the correct effect data struct
|
|
||||||
((s32*) effect->data)[1] = 1;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user