mirror of
https://github.com/zeldaret/botw
synced 2026-08-11 03:25:57 -04:00
Switch to subrepos
git subrepo clone https://github.com/open-ead/sead lib/sead subrepo: subdir: "lib/sead" merged: "1b66e825d" upstream: origin: "https://github.com/open-ead/sead" branch: "master" commit: "1b66e825d" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" git subrepo clone (merge) https://github.com/open-ead/nnheaders lib/NintendoSDK subrepo: subdir: "lib/NintendoSDK" merged: "9ee21399f" upstream: origin: "https://github.com/open-ead/nnheaders" branch: "master" commit: "9ee21399f" git-subrepo: version: "0.4.3" origin: "ssh://git@github.com/ingydotnet/git-subrepo" commit: "2f68596" git subrepo clone https://github.com/open-ead/agl lib/agl subrepo: subdir: "lib/agl" merged: "7c063271b" upstream: origin: "https://github.com/open-ead/agl" branch: "master" commit: "7c063271b" git-subrepo: version: "0.4.3" origin: "ssh://git@github.com/ingydotnet/git-subrepo" commit: "2f68596" git subrepo clone https://github.com/open-ead/EventFlow lib/EventFlow subrepo: subdir: "lib/EventFlow" merged: "c35d21b34" upstream: origin: "https://github.com/open-ead/EventFlow" branch: "master" commit: "c35d21b34" git-subrepo: version: "0.4.3" origin: "ssh://git@github.com/ingydotnet/git-subrepo" commit: "2f68596"
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#include "container/seadOffsetList.h"
|
||||
#include "controller/seadControllerBase.h"
|
||||
|
||||
namespace sead
|
||||
{
|
||||
class ControllerMgr;
|
||||
class ControllerAddon;
|
||||
|
||||
namespace ControllerDefine
|
||||
{
|
||||
enum AddonId : int
|
||||
{
|
||||
};
|
||||
enum ControllerId : int
|
||||
{
|
||||
_15 = 15,
|
||||
_16 = 16
|
||||
};
|
||||
enum DeviceId : int
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace ControllerDefine
|
||||
|
||||
class Controller : public ControllerBase
|
||||
{
|
||||
SEAD_RTTI_OVERRIDE(Controller, ControllerBase)
|
||||
public:
|
||||
Controller(ControllerMgr*);
|
||||
virtual ~Controller();
|
||||
virtual void calc();
|
||||
virtual bool isConnected();
|
||||
ControllerAddon* getAddonByOrder(ControllerDefine::AddonId, int);
|
||||
ControllerAddon* getAddon(ControllerDefine::AddonId);
|
||||
|
||||
protected:
|
||||
virtual void calcImpl_() = 0;
|
||||
virtual bool isIdle_();
|
||||
virtual void setIdle_();
|
||||
|
||||
private:
|
||||
int mControllerId;
|
||||
ControllerMgr* mMgr;
|
||||
OffsetList<ControllerAddon> mAddonList;
|
||||
OffsetList<void*> _160; // unknown type
|
||||
};
|
||||
|
||||
} // namespace sead
|
||||
@@ -0,0 +1,68 @@
|
||||
#pragma once
|
||||
|
||||
#include "math/seadBoundBox.h"
|
||||
#include "math/seadVector.h"
|
||||
#include "prim/seadBitFlag.h"
|
||||
#include "prim/seadRuntimeTypeInfo.h"
|
||||
|
||||
namespace sead
|
||||
{
|
||||
class ControllerBase
|
||||
{
|
||||
SEAD_RTTI_BASE(ControllerBase)
|
||||
public:
|
||||
ControllerBase(int, int, int, int);
|
||||
|
||||
void setRightStickCrossThreshold(float, float);
|
||||
void setPointerBound(const BoundBox2f& bound);
|
||||
void setPadRepeat(u32, u8, u8);
|
||||
void setLeftStickCrossThreshold(float, float);
|
||||
// unknown return type
|
||||
u32 getPadHoldCount(int) const;
|
||||
|
||||
BitFlag32 getButtonsTrigger() const { return mButtonsTrigger; }
|
||||
BitFlag32 getButtonsRelease() const { return mButtonsRelease; }
|
||||
BitFlag32 getButtonsRepeat() const { return mButtonsRepeat; }
|
||||
BitFlag32 getButtonsHold() const { return mButtonsHold; }
|
||||
const Vector2f& getTouchScreenPos() const { return mTouchScreenPos; }
|
||||
const Vector2f& getLeftJoy() const { return mLeftJoy; }
|
||||
const Vector2f& getRightJoy() const { return mRightJoy; }
|
||||
|
||||
protected:
|
||||
void updateDerivativeParams_(u32, bool);
|
||||
void setPointerWithBound_(bool, bool, const Vector2f& bound);
|
||||
void setIdleBase_();
|
||||
bool isIdleBase_();
|
||||
// unknown return type
|
||||
u32 getStickHold_(u32, const Vector2f&, float, float, int);
|
||||
// unknown return type
|
||||
u32 createStickCrossMask_();
|
||||
|
||||
private:
|
||||
BitFlag32 mButtonsTrigger;
|
||||
BitFlag32 mButtonsRelease;
|
||||
BitFlag32 mButtonsRepeat;
|
||||
unsigned int mFlags;
|
||||
int _18;
|
||||
int _1c;
|
||||
BoundBox2f mPointerBound;
|
||||
int mPadHoldCounts[32];
|
||||
char _b0[32];
|
||||
char _d0[32];
|
||||
float mLeftStickThresholdX;
|
||||
float mRightStickThresholdX;
|
||||
float mLeftStickThresholdY;
|
||||
float mRightStickThresholdY;
|
||||
int _100;
|
||||
int _104;
|
||||
int _108;
|
||||
int _10c;
|
||||
unsigned int mIdleCounter;
|
||||
sead::BitFlag32 mButtonsHold;
|
||||
Vector2f mTouchScreenPos;
|
||||
Vector2f mLeftJoy;
|
||||
Vector2f mRightJoy;
|
||||
Vector2f _130;
|
||||
};
|
||||
|
||||
} // namespace sead
|
||||
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include "container/seadOffsetList.h"
|
||||
#include "container/seadPtrArray.h"
|
||||
#include "controller/seadController.h"
|
||||
#include "framework/seadCalculateTask.h"
|
||||
#include "framework/seadTaskMgr.h"
|
||||
#include "heap/seadDisposer.h"
|
||||
|
||||
namespace sead
|
||||
{
|
||||
class Controller;
|
||||
class NinJoyNpadDevice;
|
||||
|
||||
class ControllerMgr : public CalculateTask
|
||||
{
|
||||
SEAD_TASK_SINGLETON(ControllerMgr)
|
||||
public:
|
||||
explicit ControllerMgr(const TaskConstructArg& arg);
|
||||
ControllerMgr();
|
||||
|
||||
void calc() override;
|
||||
void finalize();
|
||||
void finalizeDefault();
|
||||
int findControllerPort(const Controller* controller);
|
||||
NinJoyNpadDevice* getControlDevice(ControllerDefine::DeviceId device_id);
|
||||
// unknown return type
|
||||
void* getControllerAddon(int, ControllerDefine::AddonId addon_id);
|
||||
// unknown return type
|
||||
void* getControllerAddonByOrder(int, ControllerDefine::AddonId addon_id, int);
|
||||
Controller* getControllerByOrder(ControllerDefine::ControllerId controller_id, int);
|
||||
// unknown return type, probably inherited from TaskBase
|
||||
void* getFramework();
|
||||
void initialize(int, Heap* heap);
|
||||
void initializeDefault(Heap* heap);
|
||||
void prepare() override;
|
||||
|
||||
Controller* getController(int port) { return mArray[port]; }
|
||||
|
||||
private:
|
||||
OffsetList<NinJoyNpadDevice> mList;
|
||||
PtrArray<Controller> mArray;
|
||||
};
|
||||
|
||||
} // namespace sead
|
||||
Reference in New Issue
Block a user