fix #260 and potentially more

This commit is contained in:
Lurs
2026-04-17 16:12:53 +02:00
parent e566202c26
commit edea6a1418
3 changed files with 15 additions and 2 deletions
+1 -1
@@ -314,10 +314,17 @@ void JStudio_JStage::TAdaptor_actor::getJSG_SRT_(JStudio::TControl const* pContr
}
void JStudio_JStage::TAdaptor_actor::TVVOutput_ANIMATION_FRAME_::operator()(
f32 param_1, JStudio::TAdaptor* adaptor) const {
f32 param_1, JStudio::TAdaptor* adaptor) const {
#if TARGET_PC
TAdaptor_actor* actor_adaptor = static_cast<TAdaptor_actor*>(adaptor);
JStage::TActor* actor = actor_adaptor->get_pJSG_();
// field_0x8 is always hardcoded to either 305 or 309
u32 idx = (field_0x8 == 305) ? actor_adaptor->field_0x130 : actor_adaptor->field_0x134;
#else
JStage::TActor* actor = static_cast<TAdaptor_actor*>(adaptor)->get_pJSG_();
// not sure what this bit is
u32 idx = *(u32*)(((uintptr_t)adaptor - 1) + field_0x8);
#endif
u8 idx_lowBytes = idx;
u8 idx_highBytes = idx >> 8;
+6
View File
@@ -4258,6 +4258,12 @@ int daAlink_c::createHeap() {
return 0;
}
#if TARGET_PC
// lets try to zero-initialize the arrays instead of having garbage values
std::memset(sp1C, 0, sizeof(J3DTransformInfo) * sp38);
std::memset(sp30, 0, sizeof(Quaternion) * sp38);
#endif
field_0x2060 = JKR_NEW mDoExt_MtxCalcOldFrame(sp1C, sp30);
if (field_0x2060 == NULL) {
return 0;