mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-19 19:59:09 +00:00
Change appearance of UruLiveIntro (Yeesha) movie to post-avatar setup
Also small whitespace cleanup
This commit is contained in:
@ -870,6 +870,9 @@ hsBool plClient::MsgReceive(plMessage* msg)
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
hsBool plClient::IHandleMovieMsg(plMovieMsg* mov)
|
hsBool plClient::IHandleMovieMsg(plMovieMsg* mov)
|
||||||
{
|
{
|
||||||
|
if (mov != nullptr)
|
||||||
|
hsStatusMessageF("MovieMsg received 0x%x", mov->GetCmd());
|
||||||
|
|
||||||
if( !(mov->GetFileName() && *mov->GetFileName()) )
|
if( !(mov->GetFileName() && *mov->GetFileName()) )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -1517,6 +1520,8 @@ hsBool plClient::StartInit()
|
|||||||
|
|
||||||
plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), pLMod->GetKey());
|
plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), pLMod->GetKey());
|
||||||
plgDispatch::Dispatch()->RegisterForExactType(plAudioSysMsg::Index(), pLMod->GetKey());
|
plgDispatch::Dispatch()->RegisterForExactType(plAudioSysMsg::Index(), pLMod->GetKey());
|
||||||
|
|
||||||
|
// Init the movie player handler
|
||||||
plgDispatch::Dispatch()->RegisterForExactType(plMovieMsg::Index(), GetKey());
|
plgDispatch::Dispatch()->RegisterForExactType(plMovieMsg::Index(), GetKey());
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1549,7 +1554,6 @@ hsBool plClient::StartInit()
|
|||||||
|
|
||||||
IPlayIntroMovie("avi/intro1.webm", 0.f, 0.f, 0.f, 1.f, 1.f, 0.75);
|
IPlayIntroMovie("avi/intro1.webm", 0.f, 0.f, 0.f, 1.f, 1.f, 0.75);
|
||||||
IPlayIntroMovie("avi/EventIntro.webm", 0.f, 0.f, 0.f, 1.f, 1.f, 0.75);
|
IPlayIntroMovie("avi/EventIntro.webm", 0.f, 0.f, 0.f, 1.f, 1.f, 0.75);
|
||||||
IPlayIntroMovie("avi/URULiveIntro.webm", 0.f, 0.f, 0.f, 1.f, 1.f, 0.75);
|
|
||||||
|
|
||||||
plSynchedObject::PushSynchDisabled(false); // enable dirty tracking
|
plSynchedObject::PushSynchDisabled(false); // enable dirty tracking
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ plMoviePlayer::plMoviePlayer()
|
|||||||
fPosition(hsPoint2()),
|
fPosition(hsPoint2()),
|
||||||
fPlaying(false),
|
fPlaying(false),
|
||||||
fPaused(false),
|
fPaused(false),
|
||||||
fMoviePath(nullptr)
|
fMoviePath(nullptr)
|
||||||
{
|
{
|
||||||
fScale.Set(1.0f, 1.0f);
|
fScale.Set(1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
@ -193,7 +193,7 @@ plMoviePlayer::~plMoviePlayer()
|
|||||||
delete fReader;
|
delete fReader;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
delete[] fMoviePath;
|
delete[] fMoviePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool plMoviePlayer::IOpenMovie()
|
bool plMoviePlayer::IOpenMovie()
|
||||||
@ -247,9 +247,9 @@ bool plMoviePlayer::ILoadAudio()
|
|||||||
#ifdef PLASMA_USE_WEBM
|
#ifdef PLASMA_USE_WEBM
|
||||||
// Fetch audio track information
|
// Fetch audio track information
|
||||||
if (!fAudioTrack.get()) {
|
if (!fAudioTrack.get()) {
|
||||||
hsStatusMessage("Movie ILoadAudio fAudioTrack NIL\n");
|
hsStatusMessage("Movie ILoadAudio fAudioTrack NIL\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const mkvparser::AudioTrack* audio = static_cast<const mkvparser::AudioTrack*>(fAudioTrack->GetTrack());
|
const mkvparser::AudioTrack* audio = static_cast<const mkvparser::AudioTrack*>(fAudioTrack->GetTrack());
|
||||||
plWAVHeader header;
|
plWAVHeader header;
|
||||||
header.fFormatTag = plWAVHeader::kPCMFormatTag;
|
header.fFormatTag = plWAVHeader::kPCMFormatTag;
|
||||||
@ -312,9 +312,9 @@ void plMoviePlayer::IProcessVideoFrame(const std::vector<blkbuf_t>& frames)
|
|||||||
vpx_image_t* img = nullptr;
|
vpx_image_t* img = nullptr;
|
||||||
|
|
||||||
// We have to decode all the frames, but we only want to display the most recent one to the user.
|
// We have to decode all the frames, but we only want to display the most recent one to the user.
|
||||||
for (std::vector<blkbuf_t>::const_iterator frame = frames.begin(); frame != frames.end(); frame++) {
|
for (std::vector<blkbuf_t>::const_iterator frame = frames.begin(); frame != frames.end(); frame++) {
|
||||||
const std::auto_ptr<UInt8>& buf = frame->first;
|
const std::auto_ptr<UInt8>& buf = frame->first;
|
||||||
UInt32 size = static_cast<UInt32>(frame->second);
|
UInt32 size = static_cast<UInt32>(frame->second);
|
||||||
img = fVpx->Decode(buf.get(), size);
|
img = fVpx->Decode(buf.get(), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ void plMoviePlayer::IProcessVideoFrame(const std::vector<blkbuf_t>& frames)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
hsAssert(false, "image format");
|
hsAssert(false, "image format");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flush new data to the device
|
// Flush new data to the device
|
||||||
@ -349,6 +349,7 @@ bool plMoviePlayer::Start()
|
|||||||
if (!IOpenMovie())
|
if (!IOpenMovie())
|
||||||
return false;
|
return false;
|
||||||
hsAssert(fVideoTrack.get(), "nil video track -- expect bad things to happen!");
|
hsAssert(fVideoTrack.get(), "nil video track -- expect bad things to happen!");
|
||||||
|
plStatusLog::AddLineS("movie.log", "%s: Start movie playback", fMoviePath);
|
||||||
hsStatusMessageF("Opened movie %s\n", fMoviePath);
|
hsStatusMessageF("Opened movie %s\n", fMoviePath);
|
||||||
|
|
||||||
// Initialize VPX
|
// Initialize VPX
|
||||||
@ -365,8 +366,8 @@ bool plMoviePlayer::Start()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Decode the audio track and load it into a sound buffer
|
// Decode the audio track and load it into a sound buffer
|
||||||
if (!ILoadAudio()) {
|
if (!ILoadAudio()) {
|
||||||
hsStatusMessage("... movie audio track load failed\n");
|
hsStatusMessage("... movie audio track load failed\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
hsStatusMessage("... movie audio track buffered\n");
|
hsStatusMessage("... movie audio track buffered\n");
|
||||||
@ -376,7 +377,7 @@ bool plMoviePlayer::Start()
|
|||||||
fAudioSound->Play();
|
fAudioSound->Play();
|
||||||
fPlaying = true;
|
fPlaying = true;
|
||||||
|
|
||||||
hsStatusMessage("... plMoviePlayer::Start() returns\n");
|
hsStatusMessage("... movie start success\n");
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
@ -103,10 +103,10 @@ public:
|
|||||||
|
|
||||||
const char *GetFileName() const { return fMoviePath; }
|
const char *GetFileName() const { return fMoviePath; }
|
||||||
void SetFileName(const char* filename)
|
void SetFileName(const char* filename)
|
||||||
{
|
{
|
||||||
delete[] fMoviePath;
|
delete[] fMoviePath;
|
||||||
fMoviePath = hsStrcpy(filename);
|
fMoviePath = hsStrcpy(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetColor(const hsColorRGBA& c) { }
|
void SetColor(const hsColorRGBA& c) { }
|
||||||
const hsColorRGBA GetColor() const { return hsColorRGBA(); }
|
const hsColorRGBA GetColor() const { return hsColorRGBA(); }
|
||||||
|
@ -59,7 +59,7 @@ plWin32VideoSound::plWin32VideoSound(const plWAVHeader& header) : plWin32Sound()
|
|||||||
uniqueID++;
|
uniqueID++;
|
||||||
|
|
||||||
char keyName[32];
|
char keyName[32];
|
||||||
StrPrintf(keyName, arrsize(keyName), "VoiceSound_%d", uniqueID);
|
StrPrintf(keyName, arrsize(keyName), "VideoSound_%d", uniqueID);
|
||||||
|
|
||||||
hsgResMgr::ResMgr()->NewKey(keyName, this, plLocation::kGlobalFixedLoc);
|
hsgResMgr::ResMgr()->NewKey(keyName, this, plLocation::kGlobalFixedLoc);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user