mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 18:51:16 +00:00
Implement LegoCameraController::Notify & TimeROI::FUN_100a9b40
This commit is contained in:
parent
770da22a1d
commit
397c2fd48b
@ -11,6 +11,13 @@
|
||||
// SIZE 0x20
|
||||
class LegoEventNotificationParam : public MxNotificationParam {
|
||||
public:
|
||||
enum {
|
||||
c_lButtonState = 1,
|
||||
c_rButtonState = 2,
|
||||
c_modKey1 = 4,
|
||||
c_modKey2 = 8,
|
||||
};
|
||||
|
||||
// FUNCTION: LEGO1 0x10028690
|
||||
MxNotificationParam* Clone() override
|
||||
{
|
||||
@ -58,4 +65,10 @@ class LegoEventNotificationParam : public MxNotificationParam {
|
||||
// SYNTHETIC: LEGO1 0x100287e0
|
||||
// LegoEventNotificationParam::~LegoEventNotificationParam
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10012190
|
||||
// LegoEventNotificationParam::GetX
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100121a0
|
||||
// LegoEventNotificationParam::GetY
|
||||
|
||||
#endif // LEGOEVENTNOTIFICATIONPARAM_H
|
||||
|
||||
@ -31,11 +31,43 @@ MxResult LegoCameraController::Create()
|
||||
return LegoPointOfViewController::Create(VideoManager()->Get3DManager()->GetLego3DView());
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10012020
|
||||
// FUNCTION: LEGO1 0x10012020
|
||||
MxLong LegoCameraController::Notify(MxParam& p_param)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||
case c_notificationDragEnd: {
|
||||
if ((((LegoEventNotificationParam&) p_param).GetModifier()) & LegoEventNotificationParam::c_lButtonState)
|
||||
OnLButtonDown(MxPoint32(
|
||||
((LegoEventNotificationParam&) p_param).GetX(),
|
||||
((LegoEventNotificationParam&) p_param).GetY()
|
||||
));
|
||||
else if ((((LegoEventNotificationParam&) p_param).GetModifier()) & LegoEventNotificationParam::c_rButtonState)
|
||||
OnRButtonDown(MxPoint32(
|
||||
((LegoEventNotificationParam&) p_param).GetX(),
|
||||
((LegoEventNotificationParam&) p_param).GetY()
|
||||
));
|
||||
} break;
|
||||
case c_notificationDragStart: {
|
||||
OnMouseMove(
|
||||
((LegoEventNotificationParam&) p_param).GetModifier(),
|
||||
MxPoint32(((LegoEventNotificationParam&) p_param).GetX(), ((LegoEventNotificationParam&) p_param).GetY())
|
||||
);
|
||||
} break;
|
||||
case c_notificationDrag: {
|
||||
if (((((LegoEventNotificationParam&) p_param).GetModifier()) & LegoEventNotificationParam::c_lButtonState) == 0)
|
||||
OnLButtonUp(MxPoint32(
|
||||
((LegoEventNotificationParam&) p_param).GetX(),
|
||||
((LegoEventNotificationParam&) p_param).GetY()
|
||||
));
|
||||
else if (((((LegoEventNotificationParam&) p_param).GetModifier()) & LegoEventNotificationParam::c_rButtonState) == 0)
|
||||
OnRButtonUp(MxPoint32(
|
||||
((LegoEventNotificationParam&) p_param).GetX(),
|
||||
((LegoEventNotificationParam&) p_param).GetY()
|
||||
));
|
||||
|
||||
} break;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100121b0
|
||||
@ -81,7 +113,7 @@ void LegoCameraController::SetWorldTransform(const Vector3& p_at, const Vector3&
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100123e0
|
||||
void LegoCameraController::FUN_100123e0(const Matrix4& p_transform, MxU32)
|
||||
void LegoCameraController::FUN_100123e0(const Matrix4& p_transform, MxU32 p_un)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -477,16 +477,28 @@ TimeROI::TimeROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList, LegoTime p_t
|
||||
m_time = p_time;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100a9b40
|
||||
// FUNCTION: LEGO1 0x100a9b40
|
||||
void TimeROI::FUN_100a9b40(Matrix4& p_matrix, LegoTime p_time)
|
||||
{
|
||||
// TODO
|
||||
LegoTime time = p_time - m_time;
|
||||
if (time) {
|
||||
m_time = p_time;
|
||||
|
||||
Mx3DPointFloat targetPosition(p_matrix[3]);
|
||||
|
||||
Vector3 worldPosition(GetWorldPosition());
|
||||
targetPosition.Sub(&worldPosition);
|
||||
|
||||
float division = time * 0.001;
|
||||
targetPosition.Div(division);
|
||||
|
||||
FUN_100a5a30(targetPosition);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a9bf0
|
||||
LegoBool LegoROI::FUN_100a9bf0(const LegoChar* p_param, float& p_red, float& p_green, float& p_blue, float& p_alpha)
|
||||
{
|
||||
// TODO
|
||||
if (p_param == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -30,4 +30,7 @@ class MxPoint32 {
|
||||
MxS32 m_y; // 0x04
|
||||
};
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10012170
|
||||
// MxPoint32::MxPoint32
|
||||
|
||||
#endif // MXPOINT32_H
|
||||
|
||||
Loading…
Reference in New Issue
Block a user