From 6a6bfa0dbb15b73cdf6c50ae3888f98d85f489a7 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Tue, 25 Apr 2017 17:32:54 -0700 Subject: [PATCH] FifoPlayer: subsume FifoFileStruct.h into FifoDataFile.cpp There's no reason for it to be in its own file, and it's confusing. --- Source/Core/Core/Core.vcxproj | 1 - Source/Core/Core/Core.vcxproj.filters | 3 - Source/Core/Core/FifoPlayer/FifoDataFile.cpp | 54 ++++++++++++++++- Source/Core/Core/FifoPlayer/FifoFileStruct.h | 63 -------------------- 4 files changed, 52 insertions(+), 69 deletions(-) delete mode 100644 Source/Core/Core/FifoPlayer/FifoFileStruct.h diff --git a/Source/Core/Core/Core.vcxproj b/Source/Core/Core/Core.vcxproj index 50f452c4a3..db5b6fcaa2 100644 --- a/Source/Core/Core/Core.vcxproj +++ b/Source/Core/Core/Core.vcxproj @@ -339,7 +339,6 @@ - diff --git a/Source/Core/Core/Core.vcxproj.filters b/Source/Core/Core/Core.vcxproj.filters index e61dae56fa..2c4ecbe798 100644 --- a/Source/Core/Core/Core.vcxproj.filters +++ b/Source/Core/Core/Core.vcxproj.filters @@ -958,9 +958,6 @@ FifoPlayer - - FifoPlayer - FifoPlayer diff --git a/Source/Core/Core/FifoPlayer/FifoDataFile.cpp b/Source/Core/Core/FifoPlayer/FifoDataFile.cpp index 5a1fd476a3..dd90da5da7 100644 --- a/Source/Core/Core/FifoPlayer/FifoDataFile.cpp +++ b/Source/Core/Core/FifoPlayer/FifoDataFile.cpp @@ -9,9 +9,59 @@ #include "Common/FileUtil.h" #include "Core/FifoPlayer/FifoDataFile.h" -#include "Core/FifoPlayer/FifoFileStruct.h" -using namespace FifoFileStruct; +enum +{ + FILE_ID = 0x0d01f1f0, + VERSION_NUMBER = 4, + MIN_LOADER_VERSION = 1, +}; + +#pragma pack(push, 1) + +struct FileHeader +{ + u32 fileId; + u32 file_version; + u32 min_loader_version; + u64 bpMemOffset; + u32 bpMemSize; + u64 cpMemOffset; + u32 cpMemSize; + u64 xfMemOffset; + u32 xfMemSize; + u64 xfRegsOffset; + u32 xfRegsSize; + u64 frameListOffset; + u32 frameCount; + u32 flags; + u64 texMemOffset; + u32 texMemSize; + u8 reserved[40]; +}; + +struct FileFrameInfo +{ + u64 fifoDataOffset; + u32 fifoDataSize; + u32 fifoStart; + u32 fifoEnd; + u64 memoryUpdatesOffset; + u32 numMemoryUpdates; + u8 reserved[32]; +}; + +struct FileMemoryUpdate +{ + u32 fifoPosition; + u32 address; + u64 dataOffset; + u32 dataSize; + u8 type; + u8 reserved[3]; +}; + +#pragma pack(pop) FifoDataFile::FifoDataFile() = default; diff --git a/Source/Core/Core/FifoPlayer/FifoFileStruct.h b/Source/Core/Core/FifoPlayer/FifoFileStruct.h deleted file mode 100644 index d40f8f6a1f..0000000000 --- a/Source/Core/Core/FifoPlayer/FifoFileStruct.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2011 Dolphin Emulator Project -// Licensed under GPLv2+ -// Refer to the license.txt file included. - -#pragma once - -#include "Common/CommonTypes.h" - -namespace FifoFileStruct -{ -enum -{ - FILE_ID = 0x0d01f1f0, - VERSION_NUMBER = 4, - MIN_LOADER_VERSION = 1, -}; - -#pragma pack(push, 1) - -struct FileHeader -{ - u32 fileId; - u32 file_version; - u32 min_loader_version; - u64 bpMemOffset; - u32 bpMemSize; - u64 cpMemOffset; - u32 cpMemSize; - u64 xfMemOffset; - u32 xfMemSize; - u64 xfRegsOffset; - u32 xfRegsSize; - u64 frameListOffset; - u32 frameCount; - u32 flags; - u64 texMemOffset; - u32 texMemSize; - u8 reserved[40]; -}; - -struct FileFrameInfo -{ - u64 fifoDataOffset; - u32 fifoDataSize; - u32 fifoStart; - u32 fifoEnd; - u64 memoryUpdatesOffset; - u32 numMemoryUpdates; - u8 reserved[32]; -}; - -struct FileMemoryUpdate -{ - u32 fifoPosition; - u32 address; - u64 dataOffset; - u32 dataSize; - u8 type; - u8 reserved[3]; -}; - -#pragma pack(pop) -}