mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-11-30 08:50:43 +00:00
some JMap decompilations
This commit is contained in:
parent
00b48a8f17
commit
2795a911ce
@ -7,6 +7,9 @@ class JMapInfoIter
|
||||
public:
|
||||
bool isValid() const;
|
||||
|
||||
template<typename T>
|
||||
bool getValue(const char *, T) const;
|
||||
|
||||
u32 _0;
|
||||
s32 _4;
|
||||
};
|
@ -3,13 +3,44 @@
|
||||
|
||||
#include "JMap/JMapInfoIter.h"
|
||||
|
||||
bool getJMapInfoArgNoInit(const JMapInfoIter &, const char *, s32 *);
|
||||
bool getJMapInfoArgNoInit(const JMapInfoIter &, const char *, f32 *);
|
||||
bool getJMapInfoArgNoInit(const JMapInfoIter &, const char *, bool *);
|
||||
|
||||
namespace MR
|
||||
{
|
||||
bool getJMapInfoArg0NoInit(const JMapInfoIter &, s32 *);
|
||||
bool getJMapInfoArg0NoInit(const JMapInfoIter &, f32 *);
|
||||
bool getJMapInfoArg0NoInit(const JMapInfoIter &, bool *);
|
||||
bool getJMapInfoArg1NoInit(const JMapInfoIter &, s32 *);
|
||||
bool getJMapInfoArg1NoInit(const JMapInfoIter &, f32 *);
|
||||
bool getJMapInfoArg1NoInit(const JMapInfoIter &, bool *);
|
||||
bool getJMapInfoArg2NoInit(const JMapInfoIter &, s32 *);
|
||||
bool getJMapInfoArg2NoInit(const JMapInfoIter &, f32 *);
|
||||
bool getJMapInfoArg2NoInit(const JMapInfoIter &, bool *);
|
||||
bool getJMapInfoArg3NoInit(const JMapInfoIter &, s32 *);
|
||||
bool getJMapInfoArg3NoInit(const JMapInfoIter &, f32 *);
|
||||
bool getJMapInfoArg3NoInit(const JMapInfoIter &, bool *);
|
||||
bool getJMapInfoArg4NoInit(const JMapInfoIter &, s32 *);
|
||||
bool getJMapInfoArg4NoInit(const JMapInfoIter &, f32 *);
|
||||
bool getJMapInfoArg4NoInit(const JMapInfoIter &, bool *);
|
||||
bool getJMapInfoArg5NoInit(const JMapInfoIter &, s32 *);
|
||||
bool getJMapInfoArg5NoInit(const JMapInfoIter &, f32 *);
|
||||
bool getJMapInfoArg5NoInit(const JMapInfoIter &, bool *);
|
||||
bool getJMapInfoArg6NoInit(const JMapInfoIter &, s32 *);
|
||||
bool getJMapInfoArg6NoInit(const JMapInfoIter &, f32 *);
|
||||
bool getJMapInfoArg6NoInit(const JMapInfoIter &, bool *);
|
||||
bool getJMapInfoArg7NoInit(const JMapInfoIter &, s32 *);
|
||||
bool getJMapInfoArg7NoInit(const JMapInfoIter &, f32 *);
|
||||
bool getJMapInfoArg7NoInit(const JMapInfoIter &, bool *);
|
||||
|
||||
bool getObjectName(const char **, const JMapInfoIter &);
|
||||
|
||||
void getJMapInfoClippingGroupID(const JMapInfoIter &, s64 *);
|
||||
void getJMapInfoDemoGroupID(const JMapInfoIter &, s64 *);
|
||||
void getJMapInfoLinkID(const JMapInfoIter &, s64 *);
|
||||
|
||||
bool isConnectedWIthRail(const JMapInfoIter &);
|
||||
bool isConnectedWithRail(const JMapInfoIter &);
|
||||
bool isExistStageSwitchA(const JMapInfoIter &);
|
||||
bool isExistStageSwitchB(const JMapInfoIter &);
|
||||
};
|
||||
|
154
source/MR/JMap/JMapUtil.cpp
Normal file
154
source/MR/JMap/JMapUtil.cpp
Normal file
@ -0,0 +1,154 @@
|
||||
#include "JMap/JMapInfoIter.h"
|
||||
#include "MR/JMap/JMapUtil.h"
|
||||
|
||||
/*
|
||||
// TODO -- this, for some reason, just won't invoke use of the stack
|
||||
bool getJMapInfoArgNoInit(const JMapInfoIter &iter, const char *name, s32 *out)
|
||||
{
|
||||
s32* val = out;
|
||||
bool valRes = iter.getValue<s32>(name, *val);
|
||||
|
||||
bool ret;
|
||||
|
||||
if (valRes == 0)
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*val != -1)
|
||||
{
|
||||
out = val;
|
||||
ret = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}*/
|
||||
|
||||
namespace MR
|
||||
{
|
||||
bool getJMapInfoArg0NoInit(const JMapInfoIter &iter, s32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg0", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg0NoInit(const JMapInfoIter &iter, f32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg0", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg0NoInit(const JMapInfoIter &iter, bool *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg0", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg1NoInit(const JMapInfoIter &iter, s32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg1", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg1NoInit(const JMapInfoIter &iter, f32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg1", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg1NoInit(const JMapInfoIter &iter, bool *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg1", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg2NoInit(const JMapInfoIter &iter, s32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg2", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg2NoInit(const JMapInfoIter &iter, f32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg2", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg2NoInit(const JMapInfoIter &iter, bool *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg2", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg3NoInit(const JMapInfoIter &iter, s32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg3", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg3NoInit(const JMapInfoIter &iter, f32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg3", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg3NoInit(const JMapInfoIter &iter, bool *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg3", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg4NoInit(const JMapInfoIter &iter, s32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg4", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg4NoInit(const JMapInfoIter &iter, f32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg4", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg4NoInit(const JMapInfoIter &iter, bool *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg4", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg5NoInit(const JMapInfoIter &iter, s32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg5", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg5NoInit(const JMapInfoIter &iter, f32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg5", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg5NoInit(const JMapInfoIter &iter, bool *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg5", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg6NoInit(const JMapInfoIter &iter, s32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg6", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg6NoInit(const JMapInfoIter &iter, f32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg6", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg6NoInit(const JMapInfoIter &iter, bool *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg6", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg7NoInit(const JMapInfoIter &iter, s32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg7", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg7NoInit(const JMapInfoIter &iter, f32 *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg7", out);
|
||||
}
|
||||
|
||||
bool getJMapInfoArg7NoInit(const JMapInfoIter &iter, bool *out)
|
||||
{
|
||||
return getJMapInfoArgNoInit(iter, "Obj_arg7", out);
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user