mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-23 05:19:47 +00:00
Implement/match LegoFlcTexturePresenter (#1015)
* Implement/match LegoFlcTexturePresenter * Move files
This commit is contained in:
parent
1c430f894d
commit
c22c6f3379
@ -289,6 +289,7 @@ add_library(lego1 SHARED
|
||||
LEGO1/lego/legoomni/src/actors/act3shark.cpp
|
||||
LEGO1/lego/legoomni/src/actors/ambulance.cpp
|
||||
LEGO1/lego/legoomni/src/actors/bike.cpp
|
||||
LEGO1/lego/legoomni/src/actors/buildingentity.cpp
|
||||
LEGO1/lego/legoomni/src/actors/buildings.cpp
|
||||
LEGO1/lego/legoomni/src/actors/bumpbouy.cpp
|
||||
LEGO1/lego/legoomni/src/actors/doors.cpp
|
||||
@ -312,8 +313,6 @@ add_library(lego1 SHARED
|
||||
LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp
|
||||
LEGO1/lego/legoomni/src/audio/legosoundmanager.cpp
|
||||
LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp
|
||||
LEGO1/lego/legoomni/src/build/buildingentity.cpp
|
||||
LEGO1/lego/legoomni/src/build/legobuildingmanager.cpp
|
||||
LEGO1/lego/legoomni/src/build/legocarbuild.cpp
|
||||
LEGO1/lego/legoomni/src/build/legocarbuildpresenter.cpp
|
||||
LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp
|
||||
@ -321,6 +320,7 @@ add_library(lego1 SHARED
|
||||
LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp
|
||||
LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp
|
||||
LEGO1/lego/legoomni/src/common/legobackgroundcolor.cpp
|
||||
LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp
|
||||
LEGO1/lego/legoomni/src/common/legocharactermanager.cpp
|
||||
LEGO1/lego/legoomni/src/common/legofullscreenmovie.cpp
|
||||
LEGO1/lego/legoomni/src/common/legogamestate.cpp
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "decomp.h"
|
||||
#include "mxflcpresenter.h"
|
||||
|
||||
class LegoTextureInfo;
|
||||
|
||||
// VTABLE: LEGO1 0x100d89e0
|
||||
// SIZE 0x70
|
||||
class LegoFlcTexturePresenter : public MxFlcPresenter {
|
||||
@ -34,8 +36,8 @@ public:
|
||||
private:
|
||||
void Init();
|
||||
|
||||
undefined4 m_unk0x68; // 0x68
|
||||
undefined4 m_unk0x6c; // 0x6c
|
||||
MxS32 m_rectCount; // 0x68
|
||||
LegoTextureInfo* m_texture; // 0x6c
|
||||
};
|
||||
|
||||
#endif // LEGOFLCTEXTUREPRESENTER_H
|
||||
|
@ -1,5 +1,9 @@
|
||||
#include "legoflctexturepresenter.h"
|
||||
|
||||
#include "misc.h"
|
||||
#include "misc/legocontainer.h"
|
||||
#include "mxdsaction.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoFlcTexturePresenter, 0x70)
|
||||
|
||||
// FUNCTION: LEGO1 0x1005de80
|
||||
@ -11,24 +15,56 @@ LegoFlcTexturePresenter::LegoFlcTexturePresenter()
|
||||
// FUNCTION: LEGO1 0x1005df70
|
||||
void LegoFlcTexturePresenter::Init()
|
||||
{
|
||||
this->m_unk0x68 = 0;
|
||||
this->m_unk0x6c = 0;
|
||||
m_rectCount = 0;
|
||||
m_texture = NULL;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1005df80
|
||||
// FUNCTION: LEGO1 0x1005df80
|
||||
// FUNCTION: BETA10 0x100833a7
|
||||
void LegoFlcTexturePresenter::StartingTickle()
|
||||
{
|
||||
// TODO
|
||||
MxU16 extraLength;
|
||||
char* pp;
|
||||
char extraCopy[128];
|
||||
m_action->GetExtra(extraLength, pp);
|
||||
|
||||
if (pp != NULL) {
|
||||
strcpy(extraCopy, pp);
|
||||
strcat(extraCopy, ".gif");
|
||||
m_texture = TextureContainer()->Get(extraCopy);
|
||||
}
|
||||
|
||||
MxFlcPresenter::StartingTickle();
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1005e0c0
|
||||
// FUNCTION: LEGO1 0x1005e0c0
|
||||
// FUNCTION: BETA10 0x100834ce
|
||||
void LegoFlcTexturePresenter::LoadFrame(MxStreamChunk* p_chunk)
|
||||
{
|
||||
// TODO
|
||||
MxU8* data = p_chunk->GetData();
|
||||
|
||||
m_rectCount = *(MxS32*) data;
|
||||
data += sizeof(MxS32);
|
||||
|
||||
MxRect32* rects = (MxRect32*) data;
|
||||
data += m_rectCount * sizeof(MxRect32);
|
||||
|
||||
MxBool decodedColorMap;
|
||||
DecodeFLCFrame(
|
||||
&m_frameBitmap->GetBitmapInfo()->m_bmiHeader,
|
||||
m_frameBitmap->GetImage(),
|
||||
m_flcHeader,
|
||||
(FLIC_FRAME*) data,
|
||||
&decodedColorMap
|
||||
);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1005e100
|
||||
// FUNCTION: LEGO1 0x1005e100
|
||||
// FUNCTION: BETA10 0x10083562
|
||||
void LegoFlcTexturePresenter::PutFrame()
|
||||
{
|
||||
// TODO
|
||||
if (m_texture != NULL && m_rectCount != 0) {
|
||||
m_texture->FUN_10066010(m_frameBitmap->GetImage());
|
||||
m_rectCount = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user