diff --git a/config/implemented.csv b/config/implemented.csv index 29eef4f7..69d701d6 100644 --- a/config/implemented.csv +++ b/config/implemented.csv @@ -12,6 +12,8 @@ th06::AsciiManager::AddFormatText th06::AsciiManager::CreatePopup1 th06::AsciiManager::CreatePopup2 th06::AsciiManager::DrawStrings +th06::AsciiManager::DrawPopupsWithHwVertexProcessing +th06::AsciiManager::DrawPopupsWithoutHwVertexProcessing th06::ZunTimer::Initialize th06::ZunTimer::Increment th06::ZunTimer::Decrement diff --git a/config/stubbed.csv b/config/stubbed.csv index d6dcb712..74972854 100644 --- a/config/stubbed.csv +++ b/config/stubbed.csv @@ -1,6 +1,4 @@ th06::EclManager::Unload -th06::AsciiManager::DrawPopupsWithHwVertexProcessing -th06::AsciiManager::DrawPopupsWithoutHwVertexProcessing th06::AnmManager::DrawEndingRect th06::MidiOutput::OnTimerElapsed th06::MidiOutput::ParseFile diff --git a/src/AsciiManager.cpp b/src/AsciiManager.cpp index 6142af6a..4d4852f3 100644 --- a/src/AsciiManager.cpp +++ b/src/AsciiManager.cpp @@ -41,7 +41,7 @@ ChainCallbackResult AsciiManager::OnUpdate(AsciiManager *mgr) curPopup->position.y -= 0.5f * g_Supervisor.effectiveFramerateMultiplier; curPopup->timer.Tick(); - if ((i32)(curPopup->timer.current > 60)) + if (curPopup->timer > 60) { curPopup->inUse = false; } @@ -835,4 +835,107 @@ void StageMenu::OnDrawRetryMenu() return; } +#pragma var_order(currentPopup, j, i, currentDigit, unusedVec3) +void AsciiManager::DrawPopupsWithHwVertexProcessing() +{ + u8 *currentDigit; + AsciiManagerPopup *currentPopup; + i32 i; + i32 j; + D3DXVECTOR3 unusedVec3; + + currentPopup = this->popups; + g_Supervisor.viewport.X = g_GameManager.arcadeRegionTopLeftPos.x; + g_Supervisor.viewport.Y = g_GameManager.arcadeRegionTopLeftPos.y; + g_Supervisor.viewport.Width = g_GameManager.arcadeRegionSize.x; + g_Supervisor.viewport.Height = g_GameManager.arcadeRegionSize.y; + g_Supervisor.d3dDevice->SetViewport(&g_Supervisor.viewport); + + for (i = 0; i < ARRAY_SIZE_SIGNED(this->popups); i++, currentPopup++) + { + if (currentPopup->inUse == 0) + { + continue; + } + + this->vm1.pos.x = currentPopup->position.x - (currentPopup->characterCount * 4); + this->vm1.pos.y = currentPopup->position.y; + this->vm1.color = currentPopup->color; + + currentDigit = (u8 *)currentPopup->digits + currentPopup->characterCount - 1; + for (j = currentPopup->characterCount; 0 < j; j--) + { + this->vm1.sprite = g_AnmManager->sprites + *currentDigit; + if (*currentDigit >= '\n') + { + this->vm1.matrix.m[0][0] = 0.1875f; + this->vm1.matrix.m[1][1] = 0.03125f; + g_AnmManager->Draw2(&this->vm1); + this->vm1.matrix.m[0][0] = 0.03125f; + this->vm1.matrix.m[1][1] = 0.03125f; + } + else + { + g_AnmManager->Draw2(&this->vm1); + } + + this->vm1.pos.x += 8.0f; + currentDigit--; + } + } + + return; +} + +#pragma var_order(currentPopup, j, i, currentDigit, unusedVec3) +void AsciiManager::DrawPopupsWithoutHwVertexProcessing() +{ + u8 *currentDigit; + AsciiManagerPopup *currentPopup; + i32 i; + i32 j; + D3DXVECTOR3 unusedVec3; + + currentPopup = this->popups; + g_Supervisor.viewport.X = g_GameManager.arcadeRegionTopLeftPos.x; + g_Supervisor.viewport.Y = g_GameManager.arcadeRegionTopLeftPos.y; + g_Supervisor.viewport.Width = g_GameManager.arcadeRegionSize.x; + g_Supervisor.viewport.Height = g_GameManager.arcadeRegionSize.y; + g_Supervisor.d3dDevice->SetViewport(&g_Supervisor.viewport); + + for (i = 0; i < ARRAY_SIZE_SIGNED(this->popups); i++, currentPopup++) + { + if (currentPopup->inUse == 0) + { + continue; + } + + this->vm1.pos.x = currentPopup->position.x - (currentPopup->characterCount * 4); + this->vm1.pos.y = currentPopup->position.y; + this->vm1.color = currentPopup->color; + + currentDigit = (u8 *)currentPopup->digits + currentPopup->characterCount - 1; + for (j = currentPopup->characterCount; 0 < j; j--) + { + this->vm1.sprite = g_AnmManager->sprites + *currentDigit; + if (*currentDigit >= '\n') + { + this->vm1.matrix.m[0][0] = 0.1875f; + this->vm1.matrix.m[1][1] = 0.03125f; + g_AnmManager->DrawNoRotation(&this->vm1); + this->vm1.matrix.m[0][0] = 0.03125f; + this->vm1.matrix.m[1][1] = 0.03125f; + } + else + { + g_AnmManager->Draw2(&this->vm1); + } + + this->vm1.pos.x += 8.0f; + currentDigit--; + } + } + + return; +} }; // namespace th06