mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-08 07:05:40 +12:00
Change some function specifiers
This commit is contained in:
parent
85bbd713b0
commit
d610cfa826
1 changed files with 4 additions and 4 deletions
|
@ -24,13 +24,13 @@ namespace RomFS {
|
|||
u32 fileDataOffset;
|
||||
};
|
||||
|
||||
inline uintptr_t align(uintptr_t value, uintptr_t alignment) {
|
||||
inline constexpr uintptr_t alignUp(uintptr_t value, uintptr_t alignment) {
|
||||
if (value % alignment == 0) return value;
|
||||
|
||||
return value + (alignment - (value % alignment));
|
||||
}
|
||||
|
||||
inline void printNode(const RomFSNode& node, int indentation) {
|
||||
void printNode(const RomFSNode& node, int indentation) {
|
||||
for (int i = 0; i < indentation; i++) {
|
||||
printf(" ");
|
||||
}
|
||||
|
@ -159,11 +159,11 @@ namespace RomFS {
|
|||
return {};
|
||||
}
|
||||
|
||||
uintptr_t masterHashOffset = RomFS::align(ivfcSize, 0x10);
|
||||
uintptr_t masterHashOffset = RomFS::alignUp(ivfcSize, 0x10);
|
||||
// For a weird reason, the level 3 offset is not the one in the IVFC, instead it's
|
||||
// the first block after the master hash
|
||||
// TODO: Find out why and explain in the comment
|
||||
uintptr_t level3Offset = RomFS::align(masterHashOffset + ivfc.masterHashSize, ivfc.levels[2].blockSize);
|
||||
uintptr_t level3Offset = RomFS::alignUp(masterHashOffset + ivfc.masterHashSize, ivfc.levels[2].blockSize);
|
||||
uintptr_t level3Base = (uintptr_t)romFS + level3Offset;
|
||||
u32* level3Ptr = (u32*)level3Base;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue