all repos — mgba @ daaa2fa5236df5e8976e7e0ba7ac39e0d9233422

mGBA Game Boy Advance Emulator

src/core/library.h (view raw)

 1/* Copyright (c) 2013-2016 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef M_LIBRARY_H
 7#define M_LIBRARY_H
 8
 9#include "util/common.h"
10
11#include "core/core.h"
12#include "util/vector.h"
13
14struct mLibraryEntry {
15	char* filename;
16	char* title;
17	char internalTitle[17];
18	char internalCode[9];
19	size_t filesize;
20	enum mPlatform platform;
21};
22
23DECLARE_VECTOR(mLibraryListing, struct mLibraryEntry);
24
25struct mLibrary {
26	struct mLibraryListing listing;
27};
28
29void mLibraryInit(struct mLibrary*);
30void mLibraryDeinit(struct mLibrary*);
31
32struct VDir;
33struct VFile;
34void mLibraryLoadDirectory(struct mLibrary* library, struct VDir* dir);
35void mLibraryAddEntry(struct mLibrary* library, const char* filename, struct VFile* vf);
36
37#endif