TargetInspector.h 846 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include "../EmulatorComponent.h"
  3. #include "../Input/InputEmulator.h"
  4. #include "../../Constants.h"
  5. #include "TargetHitStates.h"
  6. #include "TargetState.h"
  7. namespace TLAC::Components
  8. {
  9. const int maxTargetSlots = 64;
  10. class TargetInspector : public EmulatorComponent
  11. {
  12. public:
  13. TargetInspector();
  14. ~TargetInspector();
  15. static bool repressTbl[maxTargetSlots];
  16. virtual void Initialize(ComponentsManager*) override;
  17. virtual void Update() override;
  18. virtual const char* GetDisplayName() override;
  19. static bool IsAnyRepress();
  20. static bool ShouldVibrate;
  21. private:
  22. //const uint64_t offset = 0x4A8;
  23. const float timingThreshold = 0.13f; // PS4 estimate
  24. TargetState* tgtStates;
  25. bool IsSlide(int);
  26. bool IsWithinRange(float);
  27. bool HasNotBeenHit(int);
  28. void UpdateRepressTbl();
  29. void UpdateShouldVibrate();
  30. };
  31. }