some small FileHolder changes and a ltitle MemoryUtil decompilation

This commit is contained in:
shibbo 2020-06-17 01:17:01 -04:00
parent 7210917e55
commit fc54b2d1f1
5 changed files with 14 additions and 27 deletions

View File

@ -1,6 +1,6 @@
#pragma once
#ifndef JMAPINFO_H
#define JMAPINFO_H
#include "bcsv.h"
#include <revolution.h>
struct JMapData
@ -56,4 +56,6 @@ public:
const JMapData* mData; // _0
const char* mName; // _4
};
};
#endif // JMAPINFO_H

View File

@ -18,6 +18,7 @@ namespace MR
void becomeCurrentHeap(JKRHeap *);
JKRHeap* getCurrentHeap();
bool isEqualCurrentHeap(JKRHeap *);
void zeroMemory(void *, u32);
s32 calcCheckSum(const void *, u32);

View File

@ -25,6 +25,9 @@ public:
class FileHolder
{
public:
FileHolder();
void add(const char *, JKRHeap *, void *);
bool isExist(const char *) const;
void* getContext(const char *) const;

View File

@ -1,24 +0,0 @@
#ifndef BCSV_H
#define BCSV_H
#include <revolution.h>
struct BCSVEntry
{
u32 mNameHash;
u32 mMask;
u16 mDataOffs;
u8 mShift;
u8 mField;
};
struct BCSVHeader
{
u32 mEntryCount;
u32 mFieldCount;
u32 mDataOffs;
u32 mEntrySize;
BCSVEntry** mEntries;
};
#endif // BCSV_H

View File

@ -15,4 +15,9 @@ namespace MR
MR::becomeCurrentHeap(mPreviousHeap);
OSUnlockMutex(&MutexHolder<1>::sMutex);
}
JKRHeap* getCurrentHeap()
{
return JKRHeap::sCurrentHeap;
}
};