mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-15 10:54:18 +00:00
Compare commits
39 Commits
working_su
...
OPENURU_BU
Author | SHA1 | Date | |
---|---|---|---|
b2521e0777 | |||
f9d629cfc5 | |||
aba5e2562c | |||
bff8203fbe | |||
23ded3210f | |||
9f9d510958 | |||
ea4bb43623 | |||
40bcaba9d8 | |||
e93db035ba | |||
94fab5996f | |||
da7d2d0e5c | |||
2e8dc81bf3 | |||
838e3e51ad | |||
40f200e066 | |||
2f1bb87056 | |||
e512dd0c68 | |||
4c76549fb3 | |||
1a930cb47f | |||
b9af23e458 | |||
9e2e2d02e1 | |||
7a73c2d8e3 | |||
933cbe2fe7 | |||
fe88f2e8a2 | |||
9e308cbebe | |||
126d7511e0 | |||
64323c6073 | |||
8a2534dff6 | |||
9a1b37e7f6 | |||
1012251d9a | |||
1d65c78097 | |||
c50bb08e8d | |||
229883654e | |||
51b6b4750b | |||
69dac251b6 | |||
e81af06584 | |||
5f3a8644a7 | |||
62089be53f | |||
391bbaa4e7 | |||
b00c7729cc |
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug_Internal|Win32">
|
||||
@ -121,6 +121,8 @@
|
||||
<MapFileName>$(OutDir)$(TargetName).map</MapFileName>
|
||||
<MapExports>true</MapExports>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<HeapReserveSize>0x140000</HeapReserveSize>
|
||||
<StackReserveSize>0x140000</StackReserveSize>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -177,6 +179,8 @@
|
||||
<MapFileName>$(OutDir)$(TargetName).map</MapFileName>
|
||||
<MapExports>true</MapExports>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<HeapReserveSize>0x140000</HeapReserveSize>
|
||||
<StackReserveSize>0x140000</StackReserveSize>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -237,6 +241,8 @@
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<MapExports>true</MapExports>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<HeapReserveSize>0x140000</HeapReserveSize>
|
||||
<StackReserveSize>0x140000</StackReserveSize>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -298,6 +304,8 @@
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<MapExports>true</MapExports>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<HeapReserveSize>0x140000</HeapReserveSize>
|
||||
<StackReserveSize>0x140000</StackReserveSize>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -802,4 +810,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
@ -2313,7 +2313,7 @@ void plClient::IDetectAudioVideoSettings()
|
||||
WriteInt(stream, "Audio.SetChannelVolume Ambience", 1);
|
||||
WriteInt(stream, "Audio.SetChannelVolume NPCVoice", 1);
|
||||
WriteInt(stream, "Audio.EnableVoiceRecording", 1);
|
||||
WriteInt(stream, "Audio.EnableSubtitles", false);
|
||||
WriteInt(stream, "Audio.EnableSubtitles", true);
|
||||
WriteString(stream, "Audio.SetDeviceName", deviceName );
|
||||
stream->Close();
|
||||
delete stream;
|
||||
|
@ -777,4 +777,4 @@ void cyMisc::AddPlasmaMethods3(std::vector<PyMethodDef> &methods)
|
||||
|
||||
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetUserPath);
|
||||
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetInitPath);
|
||||
}
|
||||
}
|
@ -853,4 +853,4 @@ void cyMisc::AddPlasmaMethods4(std::vector<PyMethodDef> &methods)
|
||||
PYTHON_GLOBAL_METHOD(methods, PtGetAIAvatarsByModelName);
|
||||
PYTHON_GLOBAL_METHOD(methods, PtForceVaultNodeUpdate);
|
||||
PYTHON_GLOBAL_METHOD(methods, PtVaultDownload);
|
||||
}
|
||||
}
|
@ -587,16 +587,17 @@ std::wstring pyGUIControlListBox::GetElementW( UInt16 idx )
|
||||
{
|
||||
// if its a text element type then it should be safe to cast it to a pfGUIListText
|
||||
pfGUIListText* letext = (pfGUIListText*)le;
|
||||
return letext->GetText();
|
||||
return (letext->GetText() != nullptr) ? letext->GetText() : L"";
|
||||
}
|
||||
else if ( le->GetType() == pfGUIListElement::kTreeRoot )
|
||||
{
|
||||
pfGUIListTreeRoot* elroot = (pfGUIListTreeRoot*)le;
|
||||
return elroot->GetTitle();
|
||||
return (elroot->GetTitle() != nullptr) ? elroot->GetTitle() : L"";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return L"";
|
||||
}
|
||||
|
||||
|
@ -994,7 +994,7 @@ hsBool plgAudioSys::fInit = false;
|
||||
hsBool plgAudioSys::fActive = false;
|
||||
hsBool plgAudioSys::fUseHardware = false;
|
||||
hsBool plgAudioSys::fMuted = true;
|
||||
bool plgAudioSys::fEnableSubtitles = false;
|
||||
bool plgAudioSys::fEnableSubtitles = true;
|
||||
hsBool plgAudioSys::fDelayedActivate = false;
|
||||
hsBool plgAudioSys::fEnableEAX = false;
|
||||
hsWindowHndl plgAudioSys::fWnd = nil;
|
||||
|
@ -111,14 +111,18 @@ void plWin32Sound::IFreeBuffers( void )
|
||||
void plWin32Sound::Update()
|
||||
{
|
||||
plSoundBuffer* buf = GetDataBuffer();
|
||||
if (plgAudioSys::AreSubtitlesEnabled() && buf != nullptr) {
|
||||
if (buf != nullptr) {
|
||||
plSrtFileReader* srtReader = buf->GetSrtReader();
|
||||
if (srtReader != nullptr) {
|
||||
uint32_t currentTimeMs = (uint32_t)(GetActualTimeSec() * 1000.0f);
|
||||
while (plSrtEntry* nextEntry = srtReader->GetNextEntryStartingBeforeTime(currentTimeMs)) {
|
||||
// add a plSubtitleMsg to go... to whoever is listening (probably the KI)
|
||||
plSubtitleMsg* msg = new plSubtitleMsg(nextEntry->GetSubtitleText(), nextEntry->GetSpeakerName());
|
||||
msg->Send();
|
||||
if (currentTimeMs <= srtReader->GetLastEntryEndTime()) {
|
||||
while (plSrtEntry* nextEntry = srtReader->GetNextEntryStartingBeforeTime(currentTimeMs)) {
|
||||
if (plgAudioSys::AreSubtitlesEnabled()) {
|
||||
// add a plSubtitleMsg to go... to whoever is listening (probably the KI)
|
||||
plSubtitleMsg* msg = new plSubtitleMsg(nextEntry->GetSubtitleText(), nextEntry->GetSpeakerName());
|
||||
msg->Send();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,4 +184,13 @@ plSrtEntry* plSrtFileReader::GetNextEntryEndingBeforeTime(uint32_t timeMs)
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
uint32_t plSrtFileReader::GetLastEntryEndTime()
|
||||
{
|
||||
if (!fEntries.empty()) {
|
||||
return fEntries.back().GetEndTimeMs();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -95,6 +95,7 @@ public:
|
||||
void AdvanceToTime(uint32_t timeMs);
|
||||
plSrtEntry* GetNextEntryStartingBeforeTime(uint32_t timeMs);
|
||||
plSrtEntry* GetNextEntryEndingBeforeTime(uint32_t timeMs);
|
||||
uint32_t GetLastEntryEndTime();
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -176,16 +176,19 @@ void plKeyboardDevice::HandleKeyEvent(plOSMsg message, plKeyDef key, bool bKeyDo
|
||||
if (key == KEY_SHIFT)
|
||||
{
|
||||
fShiftKeyDown = bKeyDown;
|
||||
// return;
|
||||
}
|
||||
if (key == KEY_CTRL)
|
||||
{
|
||||
fCtrlKeyDown = bKeyDown;
|
||||
// return;
|
||||
}
|
||||
if (key == KEY_CAPSLOCK)
|
||||
{
|
||||
if (!bKeyRepeat)
|
||||
// Keyboards toggle the light on key-down, so I'm going with that.
|
||||
if (bKeyDown && !bKeyRepeat)
|
||||
{
|
||||
fCapsLockLock = (GetKeyState(KEY_CAPSLOCK) & 1) == 1;
|
||||
fCapsLockLock = !fCapsLockLock;
|
||||
plAvatarInputInterface::GetInstance()->ForceAlwaysRun(fCapsLockLock);
|
||||
}
|
||||
}
|
||||
@ -205,8 +208,7 @@ void plKeyboardDevice::HandleWindowActivate(bool bActive, HWND hWnd)
|
||||
{
|
||||
if (bActive)
|
||||
{
|
||||
// Refresh the caps lock state
|
||||
HandleKeyEvent(KEYDOWN, KEY_CAPSLOCK, nil, false);
|
||||
fCtrlKeyDown = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -504,25 +504,56 @@ bool plNetLinkingMgr::IProcessVaultNotifyMsg(plVaultNotifyMsg* msg)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cVaultLink != nil)
|
||||
{
|
||||
// This is something that Cyan does... >.<
|
||||
// It's very useful though...
|
||||
if (cVaultLink != nil) {
|
||||
// Verify that if the Age vault already exists that it matches the requested
|
||||
// deferred link. If it doesn't exist, well, I hope you're happy with the result.
|
||||
VaultAgeLinkNode accLink(cVaultLink);
|
||||
accLink.CopyTo(cur);
|
||||
if (RelVaultNode* rvnInfo = cVaultLink->GetChildNodeIncRef(plVault::kNodeType_AgeInfo, 1))
|
||||
{
|
||||
if (RelVaultNode* rvnInfo = cVaultLink->GetChildNodeIncRef(plVault::kNodeType_AgeInfo, 1)) {
|
||||
plAgeInfoStruct dest;
|
||||
|
||||
VaultAgeInfoNode accInfo(rvnInfo);
|
||||
accInfo.CopyTo(cur->GetAgeInfo());
|
||||
accInfo.CopyTo(&dest);
|
||||
if (!dest.IsEqualTo(fDeferredLink->GetAgeLink()->GetAgeInfo())) {
|
||||
hsLogEntry(
|
||||
plNetClientMgr::GetInstance()->DebugMsg(
|
||||
"Waiting for a deferred link to '%s' but got AgeInfo for '%s' instead.",
|
||||
fDeferredLink->GetAgeLink()->AsStdString().c_str(),
|
||||
dest.AsStdString().c_str()
|
||||
);
|
||||
);
|
||||
|
||||
rvnInfo->DecRef();
|
||||
return false;
|
||||
}
|
||||
|
||||
rvnInfo->DecRef();
|
||||
}
|
||||
|
||||
// If we're still here, that means the links match. Set the vault copy as our current
|
||||
// AgeLink and AgeInfo. Note this mainly copies the AgeInfo.
|
||||
accLink.CopyTo(cur);
|
||||
hsLogEntry(
|
||||
plNetClientMgr::GetInstance()->DebugMsg(
|
||||
"Performing deferred link to '%s'",
|
||||
cur->AsStdString().c_str()
|
||||
);
|
||||
);
|
||||
|
||||
// Steals fDeferredLink
|
||||
IDoLink(fDeferredLink);
|
||||
fDeferredLink = nil;
|
||||
return true;
|
||||
|
||||
cVaultLink->DecRef();
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
hsLogEntry(
|
||||
plNetClientMgr::GetInstance()->ErrorMsg(
|
||||
"Waiting for a deferred link to '%s' but got a garbage link?",
|
||||
fDeferredLink->GetAgeLink()->AsStdString().c_str()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user