mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
feat(ui): add stubs for CSimpleMovieFrame::StartMovie method
This commit is contained in:
parent
92a3925797
commit
967408b2e7
3 changed files with 27 additions and 3 deletions
|
|
@ -65,8 +65,27 @@ CSimpleMovieFrame::CSimpleMovieFrame(CSimpleFrame* parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CSimpleMovieFrame::StartMovie(const char* filename, int32_t volume) {
|
int32_t CSimpleMovieFrame::StartMovie(const char* filename, int32_t volume) {
|
||||||
|
if (!this->ParseAVIFile(filename) || !this->OpenVideo()) {
|
||||||
return 0;
|
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() {
|
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);
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
// Member variables
|
// 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_onMovieFinished;
|
||||||
ScriptIx m_onMovieShowSubtitle;
|
ScriptIx m_onMovieShowSubtitle;
|
||||||
ScriptIx m_onMovieHideSubtitle;
|
ScriptIx m_onMovieHideSubtitle;
|
||||||
|
|
@ -33,6 +37,8 @@ class CSimpleMovieFrame : public CSimpleFrame {
|
||||||
CSimpleMovieFrame(CSimpleFrame* parent);
|
CSimpleMovieFrame(CSimpleFrame* parent);
|
||||||
int32_t StartMovie(const char* filename, int32_t volume);
|
int32_t StartMovie(const char* filename, int32_t volume);
|
||||||
void StopMovie();
|
void StopMovie();
|
||||||
|
int32_t ParseAVIFile(const char* filename);
|
||||||
|
int32_t OpenVideo();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,7 @@ int32_t CSimpleMovieFrame_StopMovie(lua_State* L) {
|
||||||
int32_t CSimpleMovieFrame_EnableSubtitles(lua_State* L) {
|
int32_t CSimpleMovieFrame_EnableSubtitles(lua_State* L) {
|
||||||
auto type = CSimpleMovieFrame::GetObjectType();
|
auto type = CSimpleMovieFrame::GetObjectType();
|
||||||
auto movieFrame = static_cast<CSimpleMovieFrame*>(FrameScript_GetObjectThis(L, type));
|
auto movieFrame = static_cast<CSimpleMovieFrame*>(FrameScript_GetObjectThis(L, type));
|
||||||
bool enabled = StringToBOOL(L, 2, 1);
|
movieFrame->m_enableSubtitles = StringToBOOL(L, 2, 1);
|
||||||
// *(movieFrame + 680) = enabled;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue