mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
60db0e5ef9
This updates `fmt` to the latest version and moves to just being a copy of their repo to make updating easier (no editing their cmake / figuring out which files to minimally include). The motivation for this is now that we switched to C++ 20, there were a ton of deprecated function usages that is going away in future compiler versions. This gets rid of all those warnings.
45 lines
795 B
C++
45 lines
795 B
C++
// Copyright: 2021 - 2024, Ziemas
|
|
// SPDX-License-Identifier: ISC
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <span>
|
|
#include <vector>
|
|
|
|
#include "soundbank.h"
|
|
|
|
#include "common/common_types.h"
|
|
#include "common/util/BinaryReader.h"
|
|
|
|
namespace snd {
|
|
|
|
using BankHandle = SoundBank*;
|
|
|
|
class FileAttributes {
|
|
public:
|
|
struct LocAndSize {
|
|
u32 offset;
|
|
u32 size;
|
|
};
|
|
|
|
u32 type;
|
|
u32 num_chunks;
|
|
std::vector<LocAndSize> where;
|
|
void Read(BinaryReader& data);
|
|
};
|
|
|
|
class Loader {
|
|
public:
|
|
SoundBank* GetBankByHandle(BankHandle id);
|
|
SoundBank* GetBankByName(const char* name);
|
|
SoundBank* GetBankWithSound(const char* name);
|
|
|
|
void UnloadBank(BankHandle id);
|
|
|
|
BankHandle BankLoad(std::span<u8> bank);
|
|
|
|
private:
|
|
std::vector<std::unique_ptr<SoundBank>> mBanks;
|
|
};
|
|
} // namespace snd
|