Files

68 lines
2.5 KiB
C++
Raw Permalink Normal View History

2024-03-20 19:48:26 +01:00
#pragma once
#include "global.h"
#include "types.h"
2024-03-30 12:10:44 +01:00
#include "Item/Item.hpp"
#include "Physics/Cylinder.hpp"
2024-10-12 16:16:32 +02:00
#include "Player/EquipShield.hpp"
#include "Player/EquipSword.hpp"
2024-03-30 12:10:44 +01:00
#include "Render/FadeControl.hpp"
2024-03-20 19:48:26 +01:00
#include "System/SysNew.hpp"
2024-03-26 21:25:52 +01:00
class PlayerBase : public SysObject {
2024-03-30 12:10:44 +01:00
public:
2024-03-20 19:48:26 +01:00
/* 00 (vtable) */
2024-03-30 12:10:44 +01:00
/* 04 */ FadeControl *mFadeControl;
/* 08 */ s16 mInvincibleFrames;
2024-03-20 19:48:26 +01:00
/* 0a */ s16 mHealth;
/* 0c */ unk8 mUnk_0c[2];
2025-07-22 17:54:33 +02:00
/* 0e */ u16 mEntranceId;
2024-03-26 22:02:16 +01:00
/* 10 */ bool mUpdatePos;
/* 11 */ bool mVisible;
2024-03-30 12:10:44 +01:00
/* 12 */ bool mInvincible;
2024-03-20 19:48:26 +01:00
/* 13 */
2024-03-30 12:10:44 +01:00
/* 00 */ virtual s32 GetMaxHealth() = 0;
/* 04 */ virtual bool vfunc_04();
/* 08 */ virtual ItemFlag GetEquipId();
/* 0c */ virtual bool CanMove();
2024-10-12 16:16:32 +02:00
/* 10 */ virtual void vfunc_10(Cylinder *param1) = 0;
/* 14 */ virtual void vfunc_14(Cylinder *param1) = 0;
2025-03-08 12:35:55 +01:00
/* 18 */ virtual bool vfunc_18(s32 param1) = 0;
2024-10-12 16:16:32 +02:00
/* 1c */ virtual void Init() = 0;
/* 20 */ virtual void vfunc_20() = 0;
2025-01-31 21:38:50 +01:00
/* 24 */ virtual void UpdatePos() = 0;
2024-10-12 16:16:32 +02:00
/* 28 */ virtual void vfunc_28(s32 param1) = 0;
/* 2c */ virtual void vfunc_2c(s32 param1, unk8 param2) = 0;
2024-04-14 11:27:14 +02:00
/* 30 */ virtual bool vfunc_30(s32 param1, Vec3p *param2, s32 param3) = 0;
2024-03-30 12:10:44 +01:00
/* 34 */ virtual bool Teleport(Vec3p *pos, s16 angle, unk32 param3, bool param4, bool param5);
/* 38 */ virtual bool TeleportToEntrance(unk32 entranceId, bool param2);
/* 3c */ virtual bool TeleportToLastEntrance(bool param1);
/* 40 */ virtual void AddHealth(s16 amount);
/* 44 */ virtual void vfunc_44() = 0;
/* 48 */ virtual void vfunc_48() = 0;
/* 4c */ virtual void vfunc_4c() = 0;
/* 50 */ virtual ~PlayerBase();
/* 58 */
void SetUpdatePos(bool updatePos);
void SetVisible(bool visible);
2025-05-10 20:42:30 +02:00
static EquipSword *GetEquipSword();
static EquipShield *GetEquipShield();
2024-03-30 12:10:44 +01:00
void LookAt(Vec3p *target);
bool func_ov00_020a7c00(s32 param1);
2024-05-19 13:04:14 +02:00
bool CollidesWith(Cylinder *cylinder);
2024-03-30 12:10:44 +01:00
bool func_ov00_020a7c60(Vec3p *param1, Vec3p *param2, s32 param3);
bool EquipCollidesWith(Cylinder *cylinder, ItemFlag equipId);
2024-05-26 10:49:32 +02:00
s32 EquipItem_vfunc_2c();
2024-03-30 12:10:44 +01:00
void SetHealth(s16 health);
2025-01-25 14:35:02 +01:00
PlayerBase();
2024-03-20 19:48:26 +01:00
};
2024-05-19 10:24:21 +02:00
extern PlayerBase *gPlayer;
2024-05-19 10:56:05 +02:00
extern Vec3p gPlayerPos;
2024-05-23 18:32:24 +02:00
extern Vec3p gPlayerVel;
2025-02-16 16:07:22 +01:00
extern u16 gPlayerAngle;