feat: complete native client rendering parity updates

This commit is contained in:
shen
2026-09-27 19:44:41 -07:00
parent 9a9dc6d224
commit 25dd65f2ce
99 changed files with 21121 additions and 921 deletions
+60 -3
View File
@@ -49,10 +49,12 @@
#include "GameLib/FlyingData.h"
#include "GameLib/FlyingObjectManager.h"
#include "EffectLib/EffectManager.h"
#include "EffectLib/EffectInstance.h"
#include "EterLib/Camera.h"
#include "GameLib/ItemManager.h"
#include "UserInterface/PythonItem.h"
#include "UserInterface/StdAfx.h"
#include "UserInterface/PythonPlayer.h"
#include "UserInterface/PythonExchange.h"
#include "UserInterface/PythonTextTail.h"
#include "UserInterface/PythonCharacterManager.h"
@@ -674,11 +676,11 @@ int main(int argc, char** argv)
const size_t moves_before = server ? server->Events().size() : 0;
if (main_instance)
main_instance->NEW_GetPixelPosition(&start);
PythonBoot::UIMouseButton(1, true, 400, 520);
PythonBoot::UIMouseButton(1, true, 400, 220);
pump_until(0.1, [] { return false; });
PythonBoot::UIMouseButton(1, false, 400, 520);
PythonBoot::UIMouseButton(1, false, 400, 220);
CHECK(main_instance && pump_until(3, [&] { return walked() > 100.0f; }));
CHECK(main_instance && pump_until(5, [&] { return !main_instance->IsWalking(); }));
CHECK(main_instance && pump_until(10, [&] { return !main_instance->IsWalking(); }));
std::printf("port_login_flow_test: click walked %.0f cm\n", main_instance ? walked() : 0.0f);
if (server)
{
@@ -746,6 +748,61 @@ int main(int argc, char** argv)
++attacks;
std::printf("port_login_flow_test: %zu attack(s) until the stray dog died\n", attacks);
CHECK(attacks >= (size_t) FakeLoginServer::kMobHits);
// Camera mouse wheel zoom test:
// Test zooming in (Wheel UP, positive delta) and zooming out (Wheel DOWN, negative delta).
{
CCamera* pkCmrCur = CCameraManager::Instance().GetCurrentCamera();
CHECK(pkCmrCur != nullptr);
if (pkCmrCur)
{
const float initial_dist = pkCmrCur->GetDistance();
std::printf("port_login_flow_test: initial camera distance = %f\n", initial_dist);
// Zoom IN: positive wheel delta
PythonBoot::UIMouseWheel(120);
pump_until(0.1, [] { return false; });
const float zoomed_in_dist = pkCmrCur->GetDistance();
std::printf("port_login_flow_test: zoomed in camera distance = %f\n", zoomed_in_dist);
CHECK(zoomed_in_dist < initial_dist);
// Zoom OUT: negative wheel delta
PythonBoot::UIMouseWheel(-240);
pump_until(0.1, [] { return false; });
const float zoomed_out_dist = pkCmrCur->GetDistance();
std::printf("port_login_flow_test: zoomed out camera distance = %f\n", zoomed_out_dist);
CHECK(zoomed_out_dist > zoomed_in_dist);
}
}
// P-grade skill test: verify P-grade skill (geomgyeong / Aura of the Sword) uses Grade 3 motion (geomgyeong_4.msa),
// spawns effect instances (geom_4_badak.mse, geom_4_sword_making.mse), and renders them.
{
CPythonPlayer& rkPlayer = CPythonPlayer::Instance();
rkPlayer.SetStatus(POINT_SP, 1000);
rkPlayer.SetStatus(POINT_MAX_SP, 1000);
rkPlayer.SetStatus(POINT_HP, 1000);
rkPlayer.SetStatus(POINT_MAX_HP, 1000);
CInstanceBase* pkInstMain = rkPlayer.NEW_GetMainActorPtr();
CHECK(pkInstMain != nullptr);
if (pkInstMain)
{
pkInstMain->ChangeWeapon(19);
rkPlayer.SetSkill(4, 4); // slot 4 = geomgyeong
rkPlayer.SetSkillLevel_(4, 3, 40); // Grade 3 (P), Level 40
CHECK(rkPlayer.GetSkillGrade(4) == 3);
rkPlayer.ClickSkillSlot(4);
CHECK(pkInstMain->IsUsingSkill());
bool has_effects = false;
for (int step = 0; step < 10; ++step)
{
pump_until(0.1, [] { return false; });
if (CEffectInstance::GetRenderingEffectCount() > 0)
has_effects = true;
}
CHECK(has_effects);
}
}
}
}
// 10. (批次 4-c) NPC shop: a click on the general store walks up to it (__OnClickActor) and sends CG_ON_CLICK;