mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-12-18 11:52:23 -05:00
Implement/match Act3Shark::Animate
(#1231)
* Implement/match `Act3Shark::Animate` * Add BETA annotation * Raise max functions * Mark as FUNCTION
This commit is contained in:
parent
ace2a9f047
commit
661c76c6e0
4 changed files with 58 additions and 7 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -139,7 +139,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
reccmp-reccmp -S CONFIGPROGRESS.SVG --svg-icon assets/config.png --target CONFIG | tee CONFIGPROGRESS.TXT
|
reccmp-reccmp -S CONFIGPROGRESS.SVG --svg-icon assets/config.png --target CONFIG | tee CONFIGPROGRESS.TXT
|
||||||
reccmp-reccmp -S ISLEPROGRESS.SVG --svg-icon assets/isle.png --target ISLE | tee ISLEPROGRESS.TXT
|
reccmp-reccmp -S ISLEPROGRESS.SVG --svg-icon assets/isle.png --target ISLE | tee ISLEPROGRESS.TXT
|
||||||
reccmp-reccmp -S LEGO1PROGRESS.SVG -T 4340 --svg-icon assets/lego1.png --target LEGO1 | tee LEGO1PROGRESS.TXT
|
reccmp-reccmp -S LEGO1PROGRESS.SVG -T 4345 --svg-icon assets/lego1.png --target LEGO1 | tee LEGO1PROGRESS.TXT
|
||||||
|
|
||||||
- name: Compare Accuracy With Current Master
|
- name: Compare Accuracy With Current Master
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -156,7 +156,7 @@ class Act3Shark : public LegoAnimActor {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
list<Act3Ammo*> m_unk0x1c; // 0x1c
|
list<Act3Ammo*> m_unk0x1c; // 0x1c
|
||||||
undefined4 m_unk0x28; // 0x28
|
Act3Ammo* m_unk0x28; // 0x28
|
||||||
MxFloat m_unk0x2c; // 0x2c
|
MxFloat m_unk0x2c; // 0x2c
|
||||||
LegoWorld* m_world; // 0x30
|
LegoWorld* m_world; // 0x30
|
||||||
LegoAnimActorStruct* m_unk0x34; // 0x34
|
LegoAnimActorStruct* m_unk0x34; // 0x34
|
||||||
|
@ -173,6 +173,9 @@ class Act3Shark : public LegoAnimActor {
|
||||||
// TEMPLATE: LEGO1 0x10042c90
|
// TEMPLATE: LEGO1 0x10042c90
|
||||||
// List<Act3Ammo *>::~List<Act3Ammo *>
|
// List<Act3Ammo *>::~List<Act3Ammo *>
|
||||||
|
|
||||||
|
// TEMPLATE: LEGO1 0x10042ee0
|
||||||
|
// list<Act3Ammo *,allocator<Act3Ammo *> >::erase
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100d7660
|
// GLOBAL: LEGO1 0x100d7660
|
||||||
// Act3Actor::`vbtable'
|
// Act3Actor::`vbtable'
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "act3.h"
|
#include "act3.h"
|
||||||
#include "act3ammo.h"
|
#include "act3ammo.h"
|
||||||
|
#include "anim/legoanim.h"
|
||||||
#include "define.h"
|
#include "define.h"
|
||||||
#include "legocachesoundmanager.h"
|
#include "legocachesoundmanager.h"
|
||||||
#include "legolocomotionanimpresenter.h"
|
#include "legolocomotionanimpresenter.h"
|
||||||
|
@ -299,6 +300,7 @@ void Act3Brickster::ParseAction(char* p_extra)
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10041050
|
// STUB: LEGO1 0x10041050
|
||||||
|
// STUB: BETA10 0x100197d7
|
||||||
void Act3Brickster::Animate(float p_time)
|
void Act3Brickster::Animate(float p_time)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
|
@ -386,7 +388,7 @@ MxResult Act3Brickster::VTable0x9c()
|
||||||
Act3Shark::Act3Shark()
|
Act3Shark::Act3Shark()
|
||||||
{
|
{
|
||||||
m_unk0x2c = 0.0f;
|
m_unk0x2c = 0.0f;
|
||||||
m_unk0x28 = 0;
|
m_unk0x28 = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10042ce0
|
// FUNCTION: LEGO1 0x10042ce0
|
||||||
|
@ -397,10 +399,56 @@ MxResult Act3Shark::FUN_10042ce0(Act3Ammo* p_ammo)
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10042d40
|
// FUNCTION: LEGO1 0x10042d40
|
||||||
void Act3Shark::Animate(float p_time)
|
void Act3Shark::Animate(float p_time)
|
||||||
{
|
{
|
||||||
// TODO
|
LegoROI** roiMap = m_unk0x34->GetROIMap();
|
||||||
|
|
||||||
|
if (m_unk0x28 == NULL) {
|
||||||
|
if (m_unk0x1c.size() > 0) {
|
||||||
|
m_unk0x28 = m_unk0x1c.front();
|
||||||
|
m_unk0x1c.pop_front();
|
||||||
|
m_unk0x2c = p_time;
|
||||||
|
roiMap[1] = m_unk0x28->GetROI();
|
||||||
|
m_unk0x3c = roiMap[1]->GetLocal2World()[3];
|
||||||
|
roiMap[1]->SetVisibility(TRUE);
|
||||||
|
roiMap[2]->SetVisibility(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_unk0x28 == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float time = m_unk0x2c + m_unk0x34->GetDuration();
|
||||||
|
|
||||||
|
if (time > p_time) {
|
||||||
|
float duration = p_time - m_unk0x2c;
|
||||||
|
|
||||||
|
if (duration < 0) {
|
||||||
|
duration = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_unk0x34->GetDuration() < duration) {
|
||||||
|
duration = m_unk0x34->GetDuration();
|
||||||
|
}
|
||||||
|
|
||||||
|
MxMatrix mat;
|
||||||
|
mat.SetIdentity();
|
||||||
|
|
||||||
|
Vector3 vec(mat[3]);
|
||||||
|
vec = m_unk0x3c;
|
||||||
|
|
||||||
|
LegoTreeNode* node = m_unk0x34->GetAnimTreePtr()->GetRoot();
|
||||||
|
LegoROI::FUN_100a8e80(node, mat, duration, m_unk0x34->GetROIMap());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
roiMap[1] = m_unk0x38;
|
||||||
|
((Act3*) m_world)->RemovePizza(*m_unk0x28);
|
||||||
|
m_unk0x28 = NULL;
|
||||||
|
roiMap[1]->SetVisibility(FALSE);
|
||||||
|
roiMap[2]->SetVisibility(FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10042f30
|
// FUNCTION: LEGO1 0x10042f30
|
||||||
|
@ -408,7 +456,7 @@ void Act3Shark::ParseAction(char* p_extra)
|
||||||
{
|
{
|
||||||
LegoPathActor::ParseAction(p_extra);
|
LegoPathActor::ParseAction(p_extra);
|
||||||
|
|
||||||
m_world = (LegoWorld*) CurrentWorld();
|
m_world = CurrentWorld();
|
||||||
|
|
||||||
char value[256];
|
char value[256];
|
||||||
if (KeyValueStringParse(value, g_strANIMATION, p_extra)) {
|
if (KeyValueStringParse(value, g_strANIMATION, p_extra)) {
|
||||||
|
|
|
@ -153,7 +153,7 @@ LegoTextureInfo* LegoTextureInfo::Create(const char* p_name, LegoTexture* p_text
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10065f60
|
// FUNCTION: LEGO1 0x10065f60
|
||||||
BOOL LegoTextureInfo::SetGroupTexture(Tgl::Mesh* pMesh, LegoTextureInfo* p_textureInfo)
|
BOOL LegoTextureInfo::SetGroupTexture(Tgl::Mesh* pMesh, LegoTextureInfo* p_textureInfo)
|
||||||
{
|
{
|
||||||
TglImpl::MeshImpl::MeshData* data = ((TglImpl::MeshImpl*) pMesh)->ImplementationData();
|
TglImpl::MeshImpl::MeshData* data = ((TglImpl::MeshImpl*) pMesh)->ImplementationData();
|
||||||
|
|
Loading…
Reference in a new issue