diff options
Diffstat (limited to 'src/BlockEntities/NoteEntity.h')
-rw-r--r-- | src/BlockEntities/NoteEntity.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/BlockEntities/NoteEntity.h b/src/BlockEntities/NoteEntity.h index 30dea8811..c5da3b44e 100644 --- a/src/BlockEntities/NoteEntity.h +++ b/src/BlockEntities/NoteEntity.h @@ -40,13 +40,12 @@ public: // tolua_export /** Creates a new note entity. a_World may be nullptr */ cNoteEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World); - virtual ~cNoteEntity() override {} // tolua_begin - char GetPitch(void); - void SetPitch(char a_Pitch); - void IncrementPitch(void); + unsigned char GetNote(void); + void SetNote(unsigned char a_Note); + void IncrementNote(void); void MakeSound(void); // tolua_end @@ -56,10 +55,11 @@ public: // tolua_export virtual bool UsedBy(cPlayer * a_Player) override; virtual void SendTo(cClientHandle &) override {} -private: - char m_Pitch; -} ; // tolua_export - - + /** Returns the relative pitch (used in the protocol) + from a note value between 0 and 24 (used in m_Note). */ + static float PitchFromNote(unsigned char a_Note); +private: + unsigned char m_Note; +} ; // tolua_export |