all repos — mgba @ 65b4a76952d5e1cb5e9c3cd031517622851891f1

mGBA Game Boy Advance Emulator

opt/libgba/mgba.h (view raw)

 1/*
 2 mgba.h
 3 Copyright (c) 2016 Jeffrey Pfau
 4
 5 Redistribution and use in source and binary forms, with or without modification,
 6 are permitted provided that the following conditions are met:
 7  1. Redistributions of source code must retain the above copyright notice,
 8     this list of conditions and the following disclaimer.
 9  2. Redistributions in binary form must reproduce the above copyright notice,
10     this list of conditions and the following disclaimer in the documentation and/or
11     other materials provided with the distribution.
12 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
14 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
15 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
20 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21*/
22
23#ifndef MGBA_H
24#define MGBA_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#define MGBA_LOG_FATAL 0
31#define MGBA_LOG_ERROR 1
32#define MGBA_LOG_WARN 2
33#define MGBA_LOG_INFO 3
34#define MGBA_LOG_DEBUG 4
35
36bool mgba_open(void);
37void mgba_close(void);
38
39void mgba_printf(int level, const char* string, ...);
40bool mgba_console_open(void);
41
42#ifdef __cplusplus
43}
44#endif
45
46#endif