make use of my new small utility library
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <MemoryHelpers.hpp>
|
||||
#include <ircolib/mem_access.hpp>
|
||||
#include <log.hpp>
|
||||
|
||||
namespace Util {
|
||||
@@ -29,17 +29,17 @@ FORCE_INLINE void SwapN64Rom(std::vector<u8> &rom, u32 endianness) {
|
||||
|
||||
switch (endianness) {
|
||||
case V64:
|
||||
SwapBuffer<u16>(rom);
|
||||
ircolib::SwapBuffer<u16>(rom);
|
||||
if constexpr (!toBE)
|
||||
SwapBuffer<u32>(rom);
|
||||
ircolib::SwapBuffer<u32>(rom);
|
||||
break;
|
||||
case N64:
|
||||
if constexpr (toBE)
|
||||
SwapBuffer<u32>(rom);
|
||||
ircolib::SwapBuffer<u32>(rom);
|
||||
break;
|
||||
case Z64:
|
||||
if constexpr (!toBE)
|
||||
SwapBuffer<u32>(rom);
|
||||
ircolib::SwapBuffer<u32>(rom);
|
||||
break;
|
||||
default:
|
||||
Error::GetInstance().Throw({Error::Severity::UNRECOVERABLE}, {Error::Type::ROM_LOAD_ERROR}, {}, {}, "Unrecognized rom format! Make sure this is a valid Nintendo 64 ROM dump!");
|
||||
|
||||
Reference in New Issue
Block a user