all repos — mgba @ c11551a1f7809c4f434230fb18b624f6cddea062

mGBA Game Boy Advance Emulator

include/mgba/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 <mgba-util/common.h>
10
11CXX_GUARD_START
12
13#include <mgba/core/core.h>
14#include <mgba-util/vector.h>
15
16struct mLibraryEntry {
17	char* filename;
18	char* title;
19	char internalTitle[17];
20	char internalCode[9];
21	size_t filesize;
22	enum mPlatform platform;
23};
24
25DECLARE_VECTOR(mLibraryListing, struct mLibraryEntry);
26
27struct mLibrary {
28	struct mLibraryListing listing;
29};
30
31void mLibraryInit(struct mLibrary*);
32void mLibraryDeinit(struct mLibrary*);
33
34struct VDir;
35struct VFile;
36void mLibraryLoadDirectory(struct mLibrary* library, struct VDir* dir);
37void mLibraryAddEntry(struct mLibrary* library, const char* filename, struct VFile* vf);
38
39CXX_GUARD_END
40
41#endif