mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-30 03:15:34 -05:00
MxStillPresenter::ParseExtra (#248)
* MxStillPresenter::ParseExtra * resolve clang-format complaints
This commit is contained in:
parent
20c4f832ca
commit
24c9f8b9ed
4 changed files with 44 additions and 0 deletions
|
@ -8,3 +8,6 @@ const char* g_strWORLD = "WORLD";
|
||||||
|
|
||||||
// 0x10102040
|
// 0x10102040
|
||||||
const char* g_strACTION = "ACTION";
|
const char* g_strACTION = "ACTION";
|
||||||
|
|
||||||
|
// 0x101020cc
|
||||||
|
const char* g_strVISIBILITY = "VISIBILITY";
|
||||||
|
|
|
@ -4,5 +4,6 @@
|
||||||
extern const char* g_parseExtraTokens;
|
extern const char* g_parseExtraTokens;
|
||||||
extern const char* g_strWORLD;
|
extern const char* g_strWORLD;
|
||||||
extern const char* g_strACTION;
|
extern const char* g_strACTION;
|
||||||
|
extern const char* g_strVISIBILITY;
|
||||||
|
|
||||||
#endif // DEFINE_H
|
#endif // DEFINE_H
|
||||||
|
|
|
@ -1,5 +1,43 @@
|
||||||
#include "mxstillpresenter.h"
|
#include "mxstillpresenter.h"
|
||||||
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
|
#include "define.h"
|
||||||
|
#include "legoomni.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxStillPresenter, 0x6c);
|
DECOMP_SIZE_ASSERT(MxStillPresenter, 0x6c);
|
||||||
|
|
||||||
|
// 0x10101eb0
|
||||||
|
const char* g_strBMP_ISMAP = "BMP_ISMAP";
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100ba1e0
|
||||||
|
void MxStillPresenter::ParseExtra()
|
||||||
|
{
|
||||||
|
MxPresenter::ParseExtra();
|
||||||
|
|
||||||
|
if (m_action->GetFlags() & MxDSAction::Flag_Bit5)
|
||||||
|
m_flags |= 0x8;
|
||||||
|
|
||||||
|
MxU32 len = m_action->GetExtraLength();
|
||||||
|
|
||||||
|
if (len == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
len &= MAXWORD;
|
||||||
|
|
||||||
|
char buf[512];
|
||||||
|
memcpy(buf, m_action->GetExtraData(), len);
|
||||||
|
buf[len] = '\0';
|
||||||
|
|
||||||
|
char output[512];
|
||||||
|
if (KeyValueStringParse(output, g_strVISIBILITY, buf)) {
|
||||||
|
if (strcmpi(output, "FALSE") == 0) {
|
||||||
|
Enable(FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (KeyValueStringParse(output, g_strBMP_ISMAP, buf)) {
|
||||||
|
m_flags |= 0x10;
|
||||||
|
m_flags &= ~0x2;
|
||||||
|
m_flags &= ~0x4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// SIZE 0x6c
|
// SIZE 0x6c
|
||||||
class MxStillPresenter : public MxVideoPresenter {
|
class MxStillPresenter : public MxVideoPresenter {
|
||||||
public:
|
public:
|
||||||
|
virtual void ParseExtra() override; // vtable+0x30
|
||||||
|
|
||||||
MxStillPresenter() { m_unk68 = 0; }
|
MxStillPresenter() { m_unk68 = 0; }
|
||||||
undefined4 m_unk64;
|
undefined4 m_unk64;
|
||||||
undefined4 m_unk68;
|
undefined4 m_unk68;
|
||||||
|
|
Loading…
Reference in a new issue