Scarab
A thin, game-agnostic 2D engine host built on the sunlight tile-map engine
Loading...
Searching...
No Matches
Scarab::Engine::Lua::LuaSoundApi Class Reference

Sound Lua primitives. sound_* wrap SoundManager's immediate playback state directly; the *_song/sp_*_song forms (direct and queued respectively) instead go through the ScriptProcessor/EngineHost, since "which song is the tracked BGM" is state EngineHost::OnCommand owns, not SoundManager. More...

#include <luasoundapi.h>

Static Public Member Functions

static void Register (lua_State *pLuaState)
 Register the sound Lua-callable functions.
 

Detailed Description

Sound Lua primitives. sound_* wrap SoundManager's immediate playback state directly; the *_song/sp_*_song forms (direct and queued respectively) instead go through the ScriptProcessor/EngineHost, since "which song is the tracked BGM" is state EngineHost::OnCommand owns, not SoundManager.

Both sound_* and the sp_*_song/*_song forms live in this one file.

All sound ids are plain integers you choose (Caravellius keeps its own names for them in caravellius/src/soundids.lua) — the engine never interprets what a specific id means, it's just a key into SoundManager.

Member Function Documentation

◆ Register()

void Scarab::Engine::Lua::LuaSoundApi::Register ( lua_State *  pLuaState)
static

Register the sound Lua-callable functions.


The documentation for this class was generated from the following files: