mirror of
https://github.com/zeldaret/ss
synced 2026-07-03 12:30:07 -04:00
Merge pull request #118 from robojumper/d_a_obj_dungeon_ship
An attempt at d_a_obj_dungeon_ship
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_base.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "toBeSorted/event.h"
|
||||
|
||||
class ActorEventRelated {
|
||||
@@ -16,6 +17,9 @@ public:
|
||||
void advanceNext();
|
||||
bool isAdvance();
|
||||
|
||||
int getSingleFloatData(f32 *result, u32 code, u32);
|
||||
int getSingleVecData(mVec3_c *result, u32 code, u32);
|
||||
|
||||
private:
|
||||
u8 field_0x00[0x50 - 0x00];
|
||||
};
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define ACTOR_ON_RAIL_H
|
||||
|
||||
#include "common.h"
|
||||
#include "m/m_vec.h"
|
||||
|
||||
class ActorOnRail {
|
||||
private:
|
||||
@@ -19,6 +20,57 @@ public:
|
||||
bool init(int pathIndex, int roomId, int pathSubtype);
|
||||
/* 800A68B0 */
|
||||
mVec3_c *getPntPosForIndex(int index);
|
||||
|
||||
void fn_800A7C80(int segmentIndex, mVec3_c &vec, f32 segmentFraction);
|
||||
};
|
||||
|
||||
class ActorOnRail_Ext : public ActorOnRail {
|
||||
public:
|
||||
ActorOnRail_Ext();
|
||||
virtual ~ActorOnRail_Ext();
|
||||
|
||||
void setSegment(u16 segmentIndex, f32 segmentFraction);
|
||||
bool initExt(int pathIndex, int roomId, int, int pathSegment, int pathSubtype, f32, f32, f32);
|
||||
void fn_800A9650();
|
||||
|
||||
s32 getSegmentIndex() const {
|
||||
return mSegmentIndex;
|
||||
}
|
||||
|
||||
f32 getSegmentFraction() const {
|
||||
return mSegmentFraction;
|
||||
}
|
||||
|
||||
bool CheckFlag(u32 flag) const {
|
||||
return (field_0x1C & flag) != 0;
|
||||
}
|
||||
|
||||
void ClearFlag(u32 flag) {
|
||||
field_0x1C &= ~flag;
|
||||
}
|
||||
|
||||
void SetFlag(u32 flag) {
|
||||
field_0x1C |= flag;
|
||||
}
|
||||
|
||||
const mVec3_c &getPosition() const {
|
||||
return mPosition;
|
||||
}
|
||||
|
||||
void setSpeed(f32 speed) {
|
||||
mSpeed = speed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
s32 mSegmentIndex;
|
||||
f32 mSegmentFraction;
|
||||
f32 mSpeed;
|
||||
u32 field_0x1C;
|
||||
f32 field_0x20;
|
||||
UNKWORD field_0x24;
|
||||
mVec3_c mPosition;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#ifndef TIME_PROC_H
|
||||
#define TIME_PROC_H
|
||||
|
||||
/**
|
||||
* A callback implementation that controls ???
|
||||
*/
|
||||
|
||||
#include "m/m3d/m_proc.h"
|
||||
#include "m/m3d/m_smdl.h"
|
||||
#include "nw4r/g3d/g3d_scnobj.h"
|
||||
|
||||
class TimeCallback_c : public nw4r::g3d::IScnObjCallback {
|
||||
public:
|
||||
TimeCallback_c() : field_0x04(0), field_0x08(0), field_0x09(0) {}
|
||||
virtual ~TimeCallback_c() {}
|
||||
virtual void ExecCallback_CALC_VIEW(
|
||||
nw4r::g3d::ScnObj::Timing /* timing */, nw4r::g3d::ScnObj * /* pObj */, u32 /* param */, void * /* pInfo */
|
||||
) override;
|
||||
|
||||
/* 0x04 */ u32 field_0x04;
|
||||
/* 0x08 */ u8 field_0x08;
|
||||
/* 0x09 */ u8 field_0x09;
|
||||
};
|
||||
|
||||
class TimeProcBase : public m3d::proc_c {
|
||||
public:
|
||||
virtual ~TimeProcBase() {}
|
||||
};
|
||||
|
||||
class TimeProc : public TimeProcBase {
|
||||
public:
|
||||
TimeProc() {}
|
||||
virtual ~TimeProc() {}
|
||||
|
||||
TimeCallback_c mCallback;
|
||||
};
|
||||
|
||||
class MdlWithTimeProc : public m3d::smdl_c {
|
||||
public:
|
||||
int fn_8001F3B0(nw4r::g3d::ResMdl mdl, mAllocator_c *alloc, u32 bufferOption);
|
||||
|
||||
TimeProc mProc;
|
||||
};
|
||||
|
||||
#endif // TIME_PROC_H
|
||||
Reference in New Issue
Block a user