Commit fc56be42 authored by Erik Faye-Lund's avatar Erik Faye-Lund
Browse files

removed pimp_gba.h dependency by shuffeling around some definitions quite a bit..

git-svn-id: https://pimpmobile.svn.sourceforge.net/svnroot/pimpmobile/trunk@420 3d5ecaf0-f903-0410-b953-c2c1a4d75763
parent 7fac11f4
......@@ -34,7 +34,7 @@ extern "C"
{
#endif
struct pimp_module;
#include "pimp_types.h"
void pimp_init(const struct pimp_module *module, const void *sample_bank);
void pimp_close(void);
......@@ -47,17 +47,7 @@ int pimp_get_row(void);
int pimp_get_order(void);
void pimp_set_pos(int row, int order);
enum pimp_callback_type
{
PIMP_CALLBACK_LOOP = 0,
PIMP_CALLBACK_SYNC = 1,
PIMP_CALLBACK_NOTE = 2,
PIMP_CALLBACK_UNSUPPORTED_EFFECT = 3,
PIMP_CALLBACK_UNSUPPORTED_VOLUME_EFFECT = 4
};
/* callback system (for music sync) */
typedef void (*pimp_callback)(int, int);
void pimp_set_callback(pimp_callback callback);
#ifdef __cplusplus
......
/*
pimp_types.h -- The type-definitions of Pimpmobile, a module playback library
targeting the Nintendo GameBoy Advance
Copyright (c) 2005 Jørn Nystad and Erik Faye-Lund
This software is provided 'as-is', without any express or implied warranty. In
no event will the authors be held liable for any damages arising from the use
of this software.
Permission is granted to anyone to use this software for any purpose, including
commercial applications, and to alter it and redistribute it freely, subject to
the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef PIMP_TYPES_H
#define PIMP_TYPES_H
#ifdef __cplusplus
extern "C"
{
#endif
struct pimp_module;
typedef void (*pimp_callback)(int, int);
enum pimp_callback_type
{
PIMP_CALLBACK_LOOP = 0,
PIMP_CALLBACK_SYNC = 1,
PIMP_CALLBACK_NOTE = 2,
PIMP_CALLBACK_UNSUPPORTED_EFFECT = 3,
PIMP_CALLBACK_UNSUPPORTED_VOLUME_EFFECT = 4
};
#ifdef __cplusplus
}
#endif
#endif /* PIMP_TYPES_H */
......@@ -6,7 +6,20 @@
#ifndef PIMP_BASE_H
#define PIMP_BASE_H
#include "pimp_types.h"
#ifndef PIMP_DONT_DECLARE_BASIC_TYPES
typedef signed char s8;
typedef unsigned char u8;
typedef signed short s16;
typedef unsigned short u16;
typedef signed int s32;
typedef unsigned int u32;
#endif
typedef signed long long s64;
typedef unsigned long long u64;
#include <stddef.h>
typedef size_t pimp_size_t;
typedef ptrdiff_t pimp_rel_ptr;
#ifndef NULL
#define NULL ((void*)0)
......
......@@ -6,7 +6,7 @@
#ifndef PIMP_CHANNEL_STATE_H
#define PIMP_CHANNEL_STATE_H
#include "pimp_types.h"
#include "pimp_base.h"
#include "pimp_envelope.h"
#ifdef __cplusplus
......
......@@ -5,7 +5,7 @@
#include <gba_base.h>
#define PIMP_DONT_DECLARE_BASIC_TYPES /* prevent pimp_types.h from declaring types conflicting with the types in gba_base.h in libgba */
#define PIMP_DONT_DECLARE_BASIC_TYPES /* prevent pimp_base.h from declaring types conflicting with the types in gba_base.h in libgba */
#include "pimp_render.h"
#include "pimp_debug.h"
......
......@@ -6,7 +6,7 @@
#ifndef PIMP_INSTRUMENT_H
#define PIMP_INSTRUMENT_H
#include "pimp_types.h"
#include "pimp_base.h"
struct pimp_instrument
{
......
......@@ -3,8 +3,8 @@
* For conditions of distribution and use, see copyright notice in LICENSE.TXT
*/
#include "pimp_types.h"
#include "pimp_math.h"
#include "pimp_base.h"
#include "pimp_debug.h"
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
......
......@@ -6,7 +6,7 @@
#ifndef PIMP_MOD_CONTEXT_H
#define PIMP_MOD_CONTEXT_H
#include "../include/pimp_gba.h" /* needed for pimp_callback */
#include "../include/pimp_types.h" /* needed for pimp_callback */
#include "pimp_module.h"
#include "pimp_mixer.h"
......
......@@ -5,7 +5,6 @@
extern "C" {
#endif
#include "pimp_types.h"
#include "pimp_base.h"
#include "pimp_debug.h"
......
/* pimp_types.h -- Base types for use internally in Pimpmobile
* Copyright (C) 2006 Jrn Nystad and Erik Faye-Lund
* For conditions of distribution and use, see copyright notice in LICENSE.TXT
*/
#ifndef PIMP_TYPES_H
#define PIMP_TYPES_H
#include "pimp_debug.h"
#include <stddef.h>
#ifndef PIMP_DONT_DECLARE_BASIC_TYPES
typedef signed char s8;
typedef unsigned char u8;
typedef signed short s16;
typedef unsigned short u16;
typedef signed int s32;
typedef unsigned int u32;
#endif
typedef signed long long s64;
typedef unsigned long long u64;
typedef size_t pimp_size_t;
typedef ptrdiff_t pimp_rel_ptr;
#endif /* PIMP_TYPES_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment