Replace module-level audio functions with proper OOP API: - mcrfpy.Sound: Wraps sf::SoundBuffer + sf::Sound for short effects - mcrfpy.Music: Wraps sf::Music for streaming long tracks - Both support: volume, loop, playing, duration, play/pause/stop - Music adds position property for seeking Add mcrfpy.keyboard singleton for real-time modifier state: - shift, ctrl, alt, system properties (bool, read-only) - Queries sf::Keyboard::isKeyPressed() directly Add mcrfpy.__version__ = "1.0.0" for version identity Remove old audio API entirely (no deprecation - unused in codebase): - createSoundBuffer, loadMusic, playSound - setMusicVolume, getMusicVolume, setSoundVolume, getSoundVolume closes #66, closes #160, closes #164 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
335efc5514
commit
c025cd7da3
11 changed files with 1110 additions and 201 deletions
|
|
@ -37,19 +37,6 @@ public:
|
|||
static void REPL_device(FILE * fp, const char *filename);
|
||||
static void REPL();
|
||||
|
||||
static std::vector<sf::SoundBuffer>* soundbuffers;
|
||||
static sf::Music* music;
|
||||
static sf::Sound* sfx;
|
||||
|
||||
|
||||
static PyObject* _createSoundBuffer(PyObject*, PyObject*);
|
||||
static PyObject* _loadMusic(PyObject*, PyObject*);
|
||||
static PyObject* _setMusicVolume(PyObject*, PyObject*);
|
||||
static PyObject* _setSoundVolume(PyObject*, PyObject*);
|
||||
static PyObject* _playSound(PyObject*, PyObject*);
|
||||
static PyObject* _getMusicVolume(PyObject*, PyObject*);
|
||||
static PyObject* _getSoundVolume(PyObject*, PyObject*);
|
||||
|
||||
static PyObject* _sceneUI(PyObject*, PyObject*);
|
||||
|
||||
// scene control
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue