mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-10-26 22:06:06 +03:00
feat(ui): add stubs for CSimpleMovieFrame::StartMovie method
This commit is contained in:
parent
92a3925797
commit
967408b2e7
@ -65,8 +65,27 @@ CSimpleMovieFrame::CSimpleMovieFrame(CSimpleFrame* parent)
|
||||
}
|
||||
|
||||
int32_t CSimpleMovieFrame::StartMovie(const char* filename, int32_t volume) {
|
||||
return 0;
|
||||
if (!this->ParseAVIFile(filename) || !this->OpenVideo()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
SStrCopy(this->m_filename, filename, 256);
|
||||
this->m_volume = volume;
|
||||
|
||||
// this->OpenAudio(this, filename, volume, 0);
|
||||
// this->OpenCaptions(this, filename);
|
||||
|
||||
this->m_isPlaying = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void CSimpleMovieFrame::StopMovie() {
|
||||
}
|
||||
|
||||
int32_t CSimpleMovieFrame::ParseAVIFile(const char* filename) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t CSimpleMovieFrame::OpenVideo() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -19,6 +19,10 @@ class CSimpleMovieFrame : public CSimpleFrame {
|
||||
static void RegisterScriptMethods(lua_State* L);
|
||||
|
||||
// Member variables
|
||||
int32_t m_isPlaying = 0;
|
||||
int32_t m_enableSubtitles = 0;
|
||||
char m_filename[256];
|
||||
int32_t m_volume = 100;
|
||||
ScriptIx m_onMovieFinished;
|
||||
ScriptIx m_onMovieShowSubtitle;
|
||||
ScriptIx m_onMovieHideSubtitle;
|
||||
@ -33,6 +37,8 @@ class CSimpleMovieFrame : public CSimpleFrame {
|
||||
CSimpleMovieFrame(CSimpleFrame* parent);
|
||||
int32_t StartMovie(const char* filename, int32_t volume);
|
||||
void StopMovie();
|
||||
int32_t ParseAVIFile(const char* filename);
|
||||
int32_t OpenVideo();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -36,8 +36,7 @@ int32_t CSimpleMovieFrame_StopMovie(lua_State* L) {
|
||||
int32_t CSimpleMovieFrame_EnableSubtitles(lua_State* L) {
|
||||
auto type = CSimpleMovieFrame::GetObjectType();
|
||||
auto movieFrame = static_cast<CSimpleMovieFrame*>(FrameScript_GetObjectThis(L, type));
|
||||
bool enabled = StringToBOOL(L, 2, 1);
|
||||
// *(movieFrame + 680) = enabled;
|
||||
movieFrame->m_enableSubtitles = StringToBOOL(L, 2, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user