chore: initial commit

This commit is contained in:
fallenoak 2023-01-02 13:17:18 -06:00
commit 70b00c5c38
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
965 changed files with 264882 additions and 0 deletions

16
src/sound/CMakeLists.txt Normal file
View file

@ -0,0 +1,16 @@
file(GLOB PRIVATE_SOURCES "*.cpp")
add_library(sound STATIC
${PRIVATE_SOURCES}
)
target_include_directories(sound
PRIVATE
${CMAKE_SOURCE_DIR}/src
)
target_link_libraries(sound
PRIVATE
ui
util
)

11
src/sound/SI2.cpp Normal file
View file

@ -0,0 +1,11 @@
#include "sound/SI2.hpp"
#include "ui/FrameScript.hpp"
void SI2::RegisterScriptFunctions() {
for (int32_t i = 0; i < NUM_SCRIPT_FUNCTIONS_SI2; ++i) {
FrameScript_RegisterFunction(
SI2::s_ScriptFunctions[i].name,
SI2::s_ScriptFunctions[i].method
);
}
}

17
src/sound/SI2.hpp Normal file
View file

@ -0,0 +1,17 @@
#ifndef SOUND_SI2_HPP
#define SOUND_SI2_HPP
#include "sound/SI2Script.hpp"
#include "ui/Types.hpp"
#include <cstdint>
class SI2 {
public:
// Static variables
static FrameScript_Method s_ScriptFunctions[NUM_SCRIPT_FUNCTIONS_SI2];
// Static functions
static void RegisterScriptFunctions(void);
};
#endif

123
src/sound/SI2Script.cpp Normal file
View file

@ -0,0 +1,123 @@
#include "sound/SI2Script.hpp"
#include "sound/SI2.hpp"
#include "ui/Types.hpp"
#include "util/Lua.hpp"
#include "util/Unimplemented.hpp"
int32_t Script_PlaySound(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_PlayMusic(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_PlaySoundFile(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_StopMusic(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_Sound_GameSystem_GetNumInputDrivers(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_Sound_GameSystem_GetInputDriverNameByIndex(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_Sound_GameSystem_GetNumOutputDrivers(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_Sound_GameSystem_GetOutputDriverNameByIndex(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_Sound_GameSystem_RestartSoundSystem(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_Sound_ChatSystem_GetNumInputDrivers(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_Sound_ChatSystem_GetInputDriverNameByIndex(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_Sound_ChatSystem_GetNumOutputDrivers(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_Sound_ChatSystem_GetOutputDriverNameByIndex(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_VoiceChat_StartCapture(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_VoiceChat_StopCapture(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_VoiceChat_RecordLoopbackSound(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_VoiceChat_StopRecordingLoopbackSound(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_VoiceChat_PlayLoopbackSound(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_VoiceChat_StopPlayingLoopbackSound(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_VoiceChat_IsRecordingLoopbackSound(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_VoiceChat_IsPlayingLoopbackSound(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_VoiceChat_GetCurrentMicrophoneSignalLevel(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
int32_t Script_VoiceChat_ActivatePrimaryCaptureCallback(lua_State* L) {
WHOA_UNIMPLEMENTED();
}
FrameScript_Method SI2::s_ScriptFunctions[NUM_SCRIPT_FUNCTIONS_SI2] = {
{ "PlaySound", &Script_PlaySound },
{ "PlayMusic", &Script_PlayMusic },
{ "PlaySoundFile", &Script_PlaySoundFile },
{ "StopMusic", &Script_StopMusic },
{ "Sound_GameSystem_GetNumInputDrivers", &Script_Sound_GameSystem_GetNumInputDrivers },
{ "Sound_GameSystem_GetInputDriverNameByIndex", &Script_Sound_GameSystem_GetInputDriverNameByIndex },
{ "Sound_GameSystem_GetNumOutputDrivers", &Script_Sound_GameSystem_GetNumOutputDrivers },
{ "Sound_GameSystem_GetOutputDriverNameByIndex", &Script_Sound_GameSystem_GetOutputDriverNameByIndex },
{ "Sound_GameSystem_RestartSoundSystem", &Script_Sound_GameSystem_RestartSoundSystem },
{ "Sound_ChatSystem_GetNumInputDrivers", &Script_Sound_ChatSystem_GetNumInputDrivers },
{ "Sound_ChatSystem_GetInputDriverNameByIndex", &Script_Sound_ChatSystem_GetInputDriverNameByIndex },
{ "Sound_ChatSystem_GetNumOutputDrivers", &Script_Sound_ChatSystem_GetNumOutputDrivers },
{ "Sound_ChatSystem_GetOutputDriverNameByIndex", &Script_Sound_ChatSystem_GetOutputDriverNameByIndex },
{ "VoiceChat_StartCapture", &Script_VoiceChat_StartCapture },
{ "VoiceChat_StopCapture", &Script_VoiceChat_StopCapture },
{ "VoiceChat_RecordLoopbackSound", &Script_VoiceChat_RecordLoopbackSound },
{ "VoiceChat_StopRecordingLoopbackSound", &Script_VoiceChat_StopRecordingLoopbackSound },
{ "VoiceChat_PlayLoopbackSound", &Script_VoiceChat_PlayLoopbackSound },
{ "VoiceChat_StopPlayingLoopbackSound", &Script_VoiceChat_StopPlayingLoopbackSound },
{ "VoiceChat_IsRecordingLoopbackSound", &Script_VoiceChat_IsRecordingLoopbackSound },
{ "VoiceChat_IsPlayingLoopbackSound", &Script_VoiceChat_IsPlayingLoopbackSound },
{ "VoiceChat_GetCurrentMicrophoneSignalLevel", &Script_VoiceChat_GetCurrentMicrophoneSignalLevel },
{ "VoiceChat_ActivatePrimaryCaptureCallback", &Script_VoiceChat_ActivatePrimaryCaptureCallback }
};

6
src/sound/SI2Script.hpp Normal file
View file

@ -0,0 +1,6 @@
#ifndef SOUND_SI2_SCRIPT_HPP
#define SOUND_SI2_SCRIPT_HPP
#define NUM_SCRIPT_FUNCTIONS_SI2 23
#endif