mirror of
https://github.com/zeldaret/ss
synced 2026-07-09 14:15:23 -04:00
Expand dAcBase work
This commit is contained in:
+27
-22
@@ -12,9 +12,14 @@
|
||||
#include "toBeSorted/room_manager.h"
|
||||
|
||||
class dAcBase_c;
|
||||
|
||||
struct SoundSource {
|
||||
// TODO
|
||||
};
|
||||
|
||||
struct SoundInfo {
|
||||
dAcBase_c *actor;
|
||||
void *obj_sound;
|
||||
SoundSource *sound_source;
|
||||
mVec3_c *obj_pos;
|
||||
SoundInfo *next;
|
||||
SoundInfo *prev;
|
||||
@@ -29,13 +34,13 @@ public:
|
||||
/* 0x88 */ void *sound_info_tail;
|
||||
/* 0x8c */ void *sound_info_next;
|
||||
/* 0x90 */ int count;
|
||||
/* 0x94 */ void *obj_sound;
|
||||
/* 0x94 */ SoundSource *sound_source;
|
||||
/* 0x9C */ mVec3_c *obj_pos;
|
||||
/* 0x9c */ mVec3_c pos_copy;
|
||||
/* 0xa8 */ u32 params2;
|
||||
/* 0xAC */ mAng3_c rot_copy;
|
||||
/* 0xB2 */ u16 obj_id; // enemydefeat flag / id on obj-map
|
||||
/* 0xB4 */ u8 room_id_copy;
|
||||
/* 0xB4 */ s8 room_id_copy;
|
||||
/* 0xB5 */ u8 viewclip_index;
|
||||
/* 0xB6 */ u8 subtype;
|
||||
/* 0xB8 */ mAng3_c rotation;
|
||||
@@ -44,7 +49,7 @@ public:
|
||||
/* 0xD8 */ u32 actor_properties;
|
||||
/* 0xDC */ fLiNdBa_c actor_node;
|
||||
/* 0xE8 */ u32 field_0xe8;
|
||||
/* 0xEC */ u8 roomid;
|
||||
/* 0xEC */ s8 roomid;
|
||||
/* 0xED */ u8 actor_subtype;
|
||||
/* 0xF0 */ u32 JStudio_actor;
|
||||
/* 0xF4 */ char someStr[4];
|
||||
@@ -101,29 +106,29 @@ public:
|
||||
/* 8002c650 */ static void setTempCreateParams(mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, s32 roomId, u32 params2,
|
||||
dAcBase_c *parent, u8 subtype, s16 unkFlag, u8 viewClipIdx, ObjInfo *objInfo);
|
||||
|
||||
/* 8002c690 */ void *FUN_8002c690();
|
||||
/* 8002c690 */ SoundSource *FUN_8002c690();
|
||||
/* 8002c710 */ int initAllocatorWork1Heap(int size, char *name, int align);
|
||||
/* 8002c720 */ int initAllocator(int size, char *name, EGG::Heap *heap, int align);
|
||||
/* 8002c7b0 */ bool addActorToRoom(s32 roomId);
|
||||
/* 8002c840 */ void setBit_field_0xE8(s32);
|
||||
/* 8002cf10 */ u32 itemDroppingAndGivingRelated(Vec3f *spawnPos, int subtype);
|
||||
/* 8002cf10 */ u32 itemDroppingAndGivingRelated(mVec3_c *spawnPos, int subtype);
|
||||
/* 8002cf90 */ void fillUpperParams2Byte();
|
||||
/* 8002cfa0 */ u32 getParams2_ignoreLower();
|
||||
/* 8002cfb0 */ void setParams2Upper_ignoreLower(u32 val);
|
||||
/* 8002cfc0 */ u8 getParams2UpperByte();
|
||||
/* 8002cfd0 */ void setParams2UpperByte(u32 val);
|
||||
/* 8002cff0 */ static u32 buildParams2(u32 lower, u8 upper);
|
||||
/* 8002cff0 */ static u32 buildParams2(u32 lower, u32 upper);
|
||||
/* 8002d010 */ u32 getParams2Lower();
|
||||
/* 8002d020 */ static dAcBase_c *findActor(char *objName, dAcBase_c *parent);
|
||||
/* 8002d0a0 */ static dAcBase_c *searchActor(dAcBase_c &optionalParent);
|
||||
/* 8002d0a0 */ static dAcBase_c *searchActor(dAcBase_c *parent);
|
||||
// Kinda performs the code of the first param on every actor (second param is optional parent)
|
||||
/* 8002d130 */ static void forEachActor(void *, dAcBase_c &);
|
||||
/* 8002d130 */ static void forEveryActor(void *func(dAcBase_c *, dAcBase_c *), dAcBase_c *parent);
|
||||
// Not really static, but we currently dont have a type for the return (not just simply a s16)
|
||||
/* 8002d190 */ mAng getXZAngleToPlayer();
|
||||
/* 8002d190 */ void getXZAngleToPlayer(s16 *angle);
|
||||
// returns true if under the distThresh, False if not. the actual distance is returned in outDist
|
||||
/* 8002d1d0 */ bool getDistanceToActor(dAcBase_c &actor, f32 distThresh, f32 *outDist);
|
||||
/* 8002d1d0 */ bool getDistanceToActor(dAcBase_c *actor, f32 distThresh, f32 *outDist);
|
||||
// same concept as above
|
||||
/* 8002d290 */ bool getDistanceAndAngleToActor(dAcBase_c &actor, f32 distThresh, s16 yAngle, s16 xAngle,
|
||||
/* 8002d290 */ bool getDistanceAndAngleToActor(dAcBase_c *actor, f32 distThresh, s16 yAngle, s16 xAngle,
|
||||
f32 *outDist, s16 *outDiffAngleY, s16 *outDiffAngleX);
|
||||
/* 8002d3e0 */ bool isWithinPlayerRadius(f32 radius);
|
||||
/* 8002d440 */ bool getDistanceAndAngleToPlayer(f32 distThresh, s16 yAngle, s16 xAngle, f32 *outDist,
|
||||
@@ -132,7 +137,8 @@ public:
|
||||
/* 8002d4a0 */ f32 getSquareDistToPlayer();
|
||||
/* 8002d4b0 */ void updateRoomId(f32 yOffs);
|
||||
/* 8002d540 */ bool isRoomFlags_0x6_Set();
|
||||
// Begin Sound Effect Related
|
||||
|
||||
// Start of SoundSource stuff
|
||||
/* 8002d590 */ void FUN_8002d590();
|
||||
/* 8002d5b0 */ void FUN_8002d5b0();
|
||||
/* 8002d5d0 */ void playSound();
|
||||
@@ -148,20 +154,19 @@ public:
|
||||
/* 8002d810 */ void FUN_8002d810();
|
||||
/* 8002d830 */ void FUN_8002d830();
|
||||
/* 8002d860 */ void FUN_8002d860();
|
||||
/* 8002d880 */ void FUN_8002d880();
|
||||
// End Sound Effect Related
|
||||
/* 8002d880 */ SoundSource *getSoundSource();
|
||||
// End of SoundSource stuff
|
||||
|
||||
/* 8002d890 */ void FUN_8002d890();
|
||||
/* 8002d920 */ void setActorRef(dBase_c *);
|
||||
// next three funcs are related
|
||||
/* 8002d930 */ void setUnkFlag();
|
||||
/* 8002d940 */ void FUN_8002d940();
|
||||
/* 8002d960 */ void FUN_8002d960();
|
||||
/* 8002d930 */ void setEnemyDefeatFlag();
|
||||
/* 8002d940 */ void changeLoadedEntitiesWithSet();
|
||||
/* 8002d960 */ void changeLoadedEntitiesNoSet();
|
||||
|
||||
/* 8002d980 */ static dAcBase_c createActor(ProfileName actorId, u32 params1, Vec3f *pos, Vec3s *rot, Vec3f *scale,
|
||||
u32 params2, s32 roomId, dBase_c *ref);
|
||||
/* 8002d980 */ dAcBase_c *createActor(ProfileName actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2, s32 roomId, dBase_c *ref);
|
||||
|
||||
/* 8002da80 */ static dAcBase_c createActorUnkGroup3(ProfileName actorId, u32 params1, Vec3f *pos, Vec3s *rot,
|
||||
Vec3f *scale, u32 params2, s32 roomId, dBase_c *ref);
|
||||
/* 8002da80 */ dAcBase_c *createActorStage(ProfileName actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2, s32 roomId, dBase_c *ref);
|
||||
|
||||
/* 8002dc20 */ void FUN_8002dc20(s16 *, s16 *);
|
||||
/* 8002dc50 */ void incrementKillCounter();
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
class dAcObjBase_c : public dAcBase_c {
|
||||
public:
|
||||
// Data Members
|
||||
f32 yoffset;
|
||||
char _0[4];
|
||||
f32 unkfloat;
|
||||
char _1[12];
|
||||
s16 targetFiTextId;
|
||||
u8 unkByteTargetFiRelated;
|
||||
mVec3_c poscopy1;
|
||||
mVec3_c poscopy2;
|
||||
mVec3_c poscopy3;
|
||||
mAng3_c rotcopy1;
|
||||
f32 forwardSpeed;
|
||||
f32 forwardAccel;
|
||||
f32 forwardMaxSpeed;
|
||||
// TODO: add the rest
|
||||
|
||||
public:
|
||||
// could be their own thing?
|
||||
@@ -72,4 +86,5 @@ public:
|
||||
/* 8002f260 */ static dAcBase_c createActorUnkGroup3(char *name, u32 roomId, u32 params1, mVec3_c *pos,
|
||||
mAng3_c *rot, mVec3_c *scale, u32 params2, u16 id, u8 viewclipId);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef D_PLAYER_H
|
||||
#define D_PLAYER_H
|
||||
|
||||
#include <common.h>
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
|
||||
class dPlayer: public dAcObjBase_c {
|
||||
public:
|
||||
static dPlayer *LINK;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user