Skip to content

Commit

Permalink
EyeBeamer header
Browse files Browse the repository at this point in the history
  • Loading branch information
shibbo committed Nov 27, 2024
1 parent f260b6e commit 8648afb
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 4 deletions.
58 changes: 58 additions & 0 deletions include/Game/Enemy/EyeBeamer.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#pragma once

#include "Game/LiveActor/LiveActor.hpp"
#include "JSystem/JGeometry/TMatrix.hpp"

class VolumeModelDrawer;
class ModelObj;
class MapPartsRailMover;

class EyeBeamer : public LiveActor {
public:
EyeBeamer(const char *);

virtual ~EyeBeamer();
virtual void init(const JMapInfoIter &);
virtual void initAfterPlacement();
virtual void draw() const;
virtual void calcAnim();
virtual void startClipped();
virtual void endClipped();
virtual void control();
virtual void calcAndSetBaseMtx();
virtual void attackSensor(HitSensor *, HitSensor *);

void initStartNerve(const JMapInfoIter &);
void initModel();
void initRailMoveFunction(const JMapInfoIter &);
void updatePoseAndTrans();
void updateWaterSurfaceMtx();
void requestStartPatrol();
bool tryGotoPatrol();
bool tryPatrol();
void exeDemoTurn();
void exeDemoGotoPatrol();
void exeTurn();
void exeGotoPatrol();
void exePatrol();
bool isInBeamRange(const TVec3f &) const;
bool isOnBeam() const;

MapPartsRailMover* mRailMover; // 0x8C
ModelObj* mBeamBloom; // 0x90
ModelObj* mBeamMdl; // 0x94
VolumeModelDrawer* mBeamVolumeDrawer; // 0x98
TMtx34f _9C;
TQuat4f _CC;
TQuat4f _DC;
TVec3f _EC;
TVec3f _F8;
TVec3f _104;
TRot3f mWaterSurfaceMtx; // 0x110
TVec3f _140;

f32 _15C;
f32 _160;

bool mIsInMercatorCube; // 0x164
};
7 changes: 4 additions & 3 deletions libs/JSystem/include/JSystem/JGeometry/TVec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,22 +104,23 @@ namespace JGeometry {
setInline(rSrc);
}*/

#ifdef __MWERKS__
inline TVec3<T>(const register Vec &rSrc) NO_INLINE
{
register TVec3<T> *dst = this;
register const Vec *src = &rSrc;
register f32 z;
register f32 xy;

#if __MWERKS__
__asm {
psq_l xy, 0(src), 0, 0
lfs z, 8(src)
psq_st xy, 0(dst), 0, 0
stfs z, 8(dst)
};
#endif
}
#else
inline TVec3<T>(const Vec &rSrc) NO_INLINE;
#endif

/* General operations */
void set(const Vec &rSrc);
Expand Down
6 changes: 5 additions & 1 deletion libs/RVL_SDK/include/revolution/os/OSContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,14 @@ void OSSaveFPUContext(OSContext *);

void __OSContextInit(void);

#ifdef __MWERKS__
void OSFillFPUContext(register OSContext* context);
#else
void OSFillFPUContext(OSContext* context);
#endif

#ifdef __cplusplus
}
#endif

#endif // OSCONTEXT_H
#endif // OSCONTEXT_H

0 comments on commit 8648afb

Please sign in to comment.