Demo_Kankyo (Lost Woods Sparkles) (#380)

* Demo_Kankyo

* DemoKankyo: docs

* DemoKankyo: documenting this is a pain...

* found bug

* DemoKankyo: docs

* DemoKankyo: function renamed

* DemoKankyo: docs

* DemoKankyo: more docks

* DemoKankyo: more docks

* DemoKankyo: docs and format

* DemoKankyo: requested changes

* DemoKankyo: bug documented

* PR feedback via docs

* DemoKankyo: minor documentation and format

* DemoKankyo: requested changes

* DemoKankyo: removed some old comments

Co-authored-by: Maide <eeeedddccc@hotmail.co.uk>
Co-authored-by: isghj8 <isghj8@gmail.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
This commit is contained in:
Isghj
2021-11-03 12:10:54 -03:00
committed by GitHub
co-authored by Maide isghj8 engineer124
parent fcbd524b5d
commit 60b9cd789e
5 changed files with 692 additions and 21 deletions
+1 -1
View File
@@ -4034,7 +4034,7 @@ extern Gfx D_04075B30[];
extern Gfx D_04076BC0[];
extern Gfx D_04077480[];
extern UNK_TYPE D_04079B10;
extern Gfx D_0407AB10[];
extern Gfx D_0407AB10[]; // sun (sparkles when small) displaylist
extern Gfx D_0407AB58[];
extern UNK_TYPE D_0407AFB0;
extern Gfx D_0407D590[];
+1 -1
View File
@@ -942,7 +942,7 @@ typedef struct {
/* 0xEC */ u8 unk_EC;
/* 0xED */ u8 unk_ED;
/* 0xEE */ u8 unk_EE[4];
/* 0xF2 */ u8 unk_F2[8];
/* 0xF2 */ u8 unk_F2[8]; // [3] is used by both DemoKankyo and ObjectKankyo particle count
/* 0xFA */ u8 unk_FA[4];
} EnvironmentContext; // size = 0x100
+1 -2
View File
@@ -1156,8 +1156,7 @@ beginseg
name "ovl_Demo_Kankyo"
compress
include "build/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.o"
include "build/data/ovl_Demo_Kankyo/ovl_Demo_Kankyo.data.o"
include "build/data/ovl_Demo_Kankyo/ovl_Demo_Kankyo.reloc.o"
include "build/src/overlays/actors/ovl_Demo_Kankyo/ovl_Demo_Kankyo_reloc.o"
endseg
beginseg
File diff suppressed because it is too large Load Diff
@@ -7,13 +7,47 @@ struct DemoKankyo;
typedef void (*DemoKankyoActionFunc)(struct DemoKankyo*, GlobalContext*);
typedef struct {
/* 0x000 */ u8 state;
/* 0x004 */ Vec3f posOffset;
/* 0x010 */ Vec3f posOffsetPrev;
/* 0x01C */ Vec3f posBase;
/* 0x028 */ Vec3f speedClock; // cycles in radians
/* 0x034 */ f32 speed;
/* 0x038 */ f32 speedTarget;
/* 0x03C */ u16 alphaClock;
/* 0x03E */ u16 LostWoodsSkyFishSpeedXZClock;
/* 0x040 */ u8 alpha;
/* 0x044 */ f32 scale; // size of the particle
/* 0x048 */ u16 LostWoodsSkyFishSpeedXZ; // the x-z speed (angular velocity) the lost woods skyfish oscillates around player. pos or neg 200-400
/* 0x04A */ u16 LostWoodsSkyFishPosOffsetMax; // The x-z range the lost woods skyfish oscillates around player. random value between 15-65
/* 0x04C */ f32 LostWoodsSkyFishSpeedY; // the y speed (angular velocity) the lost woods skyfish oscillates around player.
/* 0x050 */ u16 pad50; // unused, always assigned to 0, nothing else in this actor uses it
} DemoKankyoParticle; // size = 0x54
#define DEMOKANKYO_PARTICLE_COUNT 64
typedef struct DemoKankyo {
/* 0x0000 */ Actor actor;
/* 0x0144 */ char unk_144[0x1500];
/* 0x0144 */ DemoKankyoParticle particles[DEMOKANKYO_PARTICLE_COUNT];
/* 0x1644 */ DemoKankyoActionFunc actionFunc;
/* 0x1648 */ char unk_1648[0x8];
/* 0x1648 */ s32 objectId;
/* 0x164C */ u8 isSafeToDrawGiants;
} DemoKankyo; // size = 0x1650
typedef enum {
/* 0 */ DEMO_KANKYO_TYPE_LOSTWOODS,
/* 1 */ DEMO_KANKYO_TYPE_GIANTS,
/* 2 */ DEMO_KANKYO_TYPE_MOON,
} DemoKankyoType;
typedef enum {
/* 0 */ DEMO_KANKYO_STATE_INIT,
/* 1 */ DEMO_KANKYO_STATE_SINGLE,
/* 2 */ DEMO_KANKYO_STATE_SKYFISH,
/* 3 */ DEMO_KANKYO_STATE_DISABLED,
} DemoKankyoStateType;
extern const ActorInit Demo_Kankyo_InitVars;
#endif // Z_DEMO_KANKYO_H