Allegro Folder Renamed

This commit is contained in:
Asrın Doğan
2019-09-10 12:50:01 +03:00
parent 881a08e94b
commit cea9e179ef
271 changed files with 8 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
#ifndef __al_included_allegro5_aintiphone_h
#define __al_included_allegro5_aintiphone_h
#include "allegro5/internal/aintern_display.h"
#include "allegro5/internal/aintern_bitmap.h"
#include "allegro5/internal/aintern_system.h"
#include "allegro5/system.h"
#include "allegro5/platform/aintunix.h"
ALLEGRO_DISPLAY_INTERFACE *_al_display_iphone(void);
ALLEGRO_SYSTEM_INTERFACE *_al_system_iphone(void);
ALLEGRO_PATH *_al_iphone_get_path(int id);
#endif

View File

@@ -0,0 +1,100 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Some definitions for internal use by the Linux console code.
*
* By George Foot.
*
* See readme.txt for copyright information.
*/
#ifndef __al_included_allegro5_aintlnx_h
#define __al_included_allegro5_aintlnx_h
#ifdef __cplusplus
extern "C" {
#endif
/**************************************/
/************ Driver lists ************/
/**************************************/
extern _AL_DRIVER_INFO _al_linux_keyboard_driver_list[];
extern _AL_DRIVER_INFO _al_linux_mouse_driver_list[];
/****************************************/
/************ Memory mapping ************/ /* (src/linux/lmemory.c) */
/****************************************/
/* struct MAPPED_MEMORY: Used to describe a block of memory mapped
* into our address space (in particular, the video memory).
*/
struct MAPPED_MEMORY {
unsigned int base, size; /* linear address and size of block */
int perms; /* PROT_READ | PROT_WRITE, etc */
void *data; /* pointer to block after mapping */
};
extern int __al_linux_have_ioperms;
int __al_linux_init_memory (void);
int __al_linux_shutdown_memory (void);
int __al_linux_map_memory (struct MAPPED_MEMORY *info);
int __al_linux_unmap_memory (struct MAPPED_MEMORY *info);
/******************************************/
/************ Console routines ************/ /* (src/linux/lconsole.c) */
/******************************************/
extern int __al_linux_vt;
extern int __al_linux_console_fd;
extern int __al_linux_prev_vt;
extern int __al_linux_got_text_message;
extern struct termios __al_linux_startup_termio;
extern struct termios __al_linux_work_termio;
int __al_linux_use_console (void);
int __al_linux_leave_console (void);
int __al_linux_console_graphics (void);
int __al_linux_console_text (void);
int __al_linux_wait_for_display (void);
/**************************************/
/************ VT switching ************/ /* (src/linux/vtswitch.c) */
/**************************************/
/* signals for VT switching */
#define SIGRELVT SIGUSR1
#define SIGACQVT SIGUSR2
int __al_linux_init_vtswitch (void);
int __al_linux_done_vtswitch (void);
int __al_linux_set_display_switch_mode (int mode);
void __al_linux_display_switch_lock (int lock, int foreground);
extern volatile int __al_linux_switching_blocked;
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,162 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Internal header file for the MacOS X Allegro library port.
*
* By Angelo Mottola.
*
* See readme.txt for copyright information.
*/
#ifndef __al_included_allegro5_aintosx_h
#define __al_included_allegro5_aintosx_h
#include "allegro5/internal/aintern.h"
#include "allegro5/internal/aintern_system.h"
#include "allegro5/internal/aintern_events.h"
#include "allegro5/internal/aintern_display.h"
#include "allegro5/internal/aintern_joystick.h"
#include "allegro5/internal/aintern_keyboard.h"
#include "allegro5/internal/aintern_mouse.h"
#include "allegro5/platform/aintunix.h"
#ifdef __OBJC__
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
#include <pthread.h>
#ifndef NSAppKitVersionNumber10_1
#define NSAppKitVersionNumber10_1 620
#endif
#ifndef NSAppKitVersionNumber10_2
#define NSAppKitVersionNumber10_2 663
#endif
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1040
#error Cannot target OS X versions before 10.4
#endif
/* We include code to detect a "dead bootstrap context" and fail
* gracefully if that situation is detected, but some of the code uses
* deprecated functions and it isn't generally clear what "dead bootstrap
* context" means (google's first result points back to Allegro). It is
* also not clear if the problem this aims to solve still occurs on recent
* versions of OS X.
* Define OSX_BOOTSTRAP_DETECTION to compile this check in. It can
* be brought back/reactivated when someone finds out how.
*/
//#define OSX_BOOTSTRAP_DETECTION
#define HID_MAX_DEVICES MAX_JOYSTICKS
#define HID_MOUSE 0
#define HID_JOYSTICK 1
#define HID_GAMEPAD 2
#define HID_MAX_DEVICE_ELEMENTS ((MAX_JOYSTICK_AXIS * MAX_JOYSTICK_STICKS) + MAX_JOYSTICK_BUTTONS)
#define HID_ELEMENT_BUTTON 0
#define HID_ELEMENT_AXIS 1
#define HID_ELEMENT_AXIS_PRIMARY_X 2
#define HID_ELEMENT_AXIS_PRIMARY_Y 3
#define HID_ELEMENT_STANDALONE_AXIS 4
#define HID_ELEMENT_HAT 5
typedef struct HID_ELEMENT
{
int type;
IOHIDElementCookie cookie;
int max, min;
int app;
int col;
int index;
char *name;
} HID_ELEMENT;
typedef struct HID_DEVICE
{
int type;
char *manufacturer;
char *product;
int num_elements;
int capacity;
HID_ELEMENT *element;
IOHIDDeviceInterface **interface;
int cur_app;
} HID_DEVICE;
typedef struct
{
int count;
int capacity;
HID_DEVICE* devices;
} HID_DEVICE_COLLECTION;
int _al_osx_bootstrap_ok(void);
void _al_osx_keyboard_handler(int pressed, NSEvent *event, ALLEGRO_DISPLAY*);
void _al_osx_keyboard_modifiers(unsigned int new_mods, ALLEGRO_DISPLAY*);
void _al_osx_keyboard_focused(int focused, int state);
void _al_osx_mouse_generate_event(NSEvent*, ALLEGRO_DISPLAY*);
void _al_osx_mouse_handler(NSEvent*);
int _al_osx_mouse_set_sprite(ALLEGRO_BITMAP *sprite, int x, int y);
int _al_osx_mouse_show(ALLEGRO_BITMAP *bmp, int x, int y);
void _al_osx_mouse_hide(void);
void _al_osx_mouse_move(int x, int y);
HID_DEVICE_COLLECTION *_al_osx_hid_scan(int type, HID_DEVICE_COLLECTION*);
void _al_osx_hid_free(HID_DEVICE_COLLECTION *);
// Record in the keyboard state that the main window has changed
void _al_osx_switch_keyboard_focus(ALLEGRO_DISPLAY *, bool switch_in);
// Record in the mouse state that the main window has changed
void _al_osx_switch_mouse_focus(ALLEGRO_DISPLAY *, bool switch_in);
// Clear the mouse state when a dialog closes in the dialog addon
void _al_osx_clear_mouse_state(void);
// Notify the display that the mouse driver was installed/uninstalled.
void _al_osx_mouse_was_installed(BOOL);
// Create and destroy mouse cursors
ALLEGRO_MOUSE_CURSOR *_al_osx_create_mouse_cursor(ALLEGRO_BITMAP *bmp, int x_focus, int y_focus);
void _al_osx_destroy_mouse_cursor(ALLEGRO_MOUSE_CURSOR *curs);
// Notify the display that the keyboard driver was installed/uninstalled.
void _al_osx_keyboard_was_installed(BOOL);
// Notify that the quit menu was clicked
void _al_osx_post_quit(void);
// Get the underlying view
NSView* _al_osx_view_from_display(ALLEGRO_DISPLAY*);
// Create an image from an allegro bitmap
NSImage* NSImageFromAllegroBitmap(ALLEGRO_BITMAP* bmp);
// Drivers
AL_FUNC(ALLEGRO_KEYBOARD_DRIVER*, _al_osx_get_keyboard_driver, (void));
AL_FUNC(ALLEGRO_DISPLAY_INTERFACE*, _al_osx_get_display_driver, (void));
AL_FUNC(ALLEGRO_MOUSE_DRIVER*, _al_osx_get_mouse_driver, (void));
AL_FUNC(ALLEGRO_JOYSTICK_DRIVER*, _al_osx_get_joystick_driver, (void));
#endif
AL_FUNC(int, _al_osx_run_main, (int argc, char **argv,
int (*real_main)(int, char **)));
#endif
/* Local variables: */
/* mode: objc */
/* c-basic-offset: 3 */
/* indent-tabs-mode: nil */
/* End: */

View File

@@ -0,0 +1,82 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Some definitions for internal use by the Unix library code.
*
* By Shawn Hargreaves.
*
* See readme.txt for copyright information.
*/
#ifndef __al_included_allegro5_aintunix_h
#define __al_included_allegro5_aintunix_h
#include "allegro5/path.h"
#include "allegro5/internal/aintern_driver.h"
/* Need right now for XKeyEvent --pw */
#ifdef ALLEGRO_WITH_XWINDOWS
#include <X11/Xlib.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
AL_FUNC(ALLEGRO_PATH *, _al_unix_get_path, (int id));
#ifdef __cplusplus
}
#endif
#ifdef ALLEGRO_LINUX
#include "allegro5/platform/aintlnx.h"
#endif
/*----------------------------------------------------------------------*
* *
* New stuff *
* *
*----------------------------------------------------------------------*/
/* TODO: integrate this above */
#include "allegro5/platform/aintuthr.h"
#ifdef __cplusplus
extern "C" {
#endif
/* time */
AL_FUNC(void, _al_unix_init_time, (void));
/* fdwatch */
void _al_unix_start_watching_fd(int fd, void (*callback)(void *), void *cb_data);
void _al_unix_stop_watching_fd(int fd);
/* ljoynu.c */
/* This isn't in aintlnx.h because it's needed for the X11 port as well. */
#define _ALLEGRO_JOYDRV_LINUX AL_ID('L','N','X','A')
#ifdef ALLEGRO_HAVE_LINUX_JOYSTICK_H
AL_VAR(struct ALLEGRO_JOYSTICK_DRIVER, _al_joydrv_linux);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,101 @@
/*
* UNIX threads
*/
#ifndef __al_included_allegro5_aintuthr_h
#define __al_included_allegro5_aintuthr_h
#include <pthread.h>
#include "allegro5/internal/aintern_thread.h"
#ifdef __cplusplus
extern "C" {
#endif
/* threads */
struct _AL_THREAD
{
/* private: */
pthread_t thread;
pthread_mutex_t mutex;
bool should_stop;
void (*proc)(struct _AL_THREAD *self, void *arg);
void *arg;
};
struct _AL_MUTEX
{
bool inited;
pthread_mutex_t mutex;
};
#define _AL_MUTEX_UNINITED { false, PTHREAD_MUTEX_INITIALIZER }
/* makes no sense, but shuts gcc up */
#define _AL_MARK_MUTEX_UNINITED(M) do { M.inited = false; } while (0)
struct _AL_COND
{
pthread_cond_t cond;
};
typedef struct ALLEGRO_TIMEOUT_UNIX ALLEGRO_TIMEOUT_UNIX;
struct ALLEGRO_TIMEOUT_UNIX
{
struct timespec abstime;
};
AL_INLINE(bool, _al_get_thread_should_stop, (struct _AL_THREAD *t),
{
bool ret;
pthread_mutex_lock(&t->mutex);
ret = t->should_stop;
pthread_mutex_unlock(&t->mutex);
return ret;
})
AL_FUNC(void, _al_mutex_init, (struct _AL_MUTEX*));
AL_FUNC(void, _al_mutex_destroy, (struct _AL_MUTEX*));
AL_INLINE(void, _al_mutex_lock, (struct _AL_MUTEX *m),
{
if (m->inited)
pthread_mutex_lock(&m->mutex);
})
AL_INLINE(void, _al_mutex_unlock, (struct _AL_MUTEX *m),
{
if (m->inited)
pthread_mutex_unlock(&m->mutex);
})
AL_INLINE(void, _al_cond_init, (struct _AL_COND *cond),
{
pthread_cond_init(&cond->cond, NULL);
})
AL_INLINE(void, _al_cond_destroy, (struct _AL_COND *cond),
{
pthread_cond_destroy(&cond->cond);
})
AL_INLINE(void, _al_cond_wait, (struct _AL_COND *cond, struct _AL_MUTEX *mutex),
{
pthread_cond_wait(&cond->cond, &mutex->mutex);
})
AL_INLINE(void, _al_cond_broadcast, (struct _AL_COND *cond),
{
pthread_cond_broadcast(&cond->cond);
})
AL_INLINE(void, _al_cond_signal, (struct _AL_COND *cond),
{
pthread_cond_signal(&cond->cond);
})
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,209 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Some definitions for internal use by the Windows library code.
*
* By Stefan Schimanski.
*
* See readme.txt for copyright information.
*/
#ifndef __al_included_allegro5_aintwin_h
#define __al_included_allegro5_aintwin_h
#ifndef __al_included_allegro5_allegro_h
#error must include allegro.h first
#endif
#ifndef ALLEGRO_WINDOWS
#error bad include
#endif
#include "allegro5/platform/aintwthr.h"
#include "allegro5/internal/aintern_display.h"
#include "allegro5/internal/aintern_system.h"
#include "allegro5/system.h"
#define WINDOWS_RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16)))
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ALLEGRO_DISPLAY_WIN ALLEGRO_DISPLAY_WIN;
struct ALLEGRO_DISPLAY_WIN
{
ALLEGRO_DISPLAY display;
HWND window;
HCURSOR mouse_selected_hcursor;
bool mouse_cursor_shown;
UINT adapter;
/*
* The display thread must communicate with the main thread
* through these variables.
*/
volatile bool end_thread; /* The display thread should end */
volatile bool thread_ended; /* The display thread has ended */
/* For internal use by drivers, when this has been set to true
* after al_resize_display called you can call acknowledge_resize
*/
bool can_acknowledge;
/* For internal use by the windows driver. When this is set and a Windows
* window resize event is received by the window procedure, the event is
* ignored and this value is set to false.
*/
bool ignore_resize;
/* Size to reset to when al_set_display_flag(FULLSCREEN_WINDOW, false)
* is called.
*/
int toggle_w;
int toggle_h;
};
/* standard path */
ALLEGRO_PATH *_al_win_get_path(int id);
/* thread routines */
void _al_win_thread_init(void);
void _al_win_thread_exit(void);
/* input routines */
void _al_win_grab_input(ALLEGRO_DISPLAY_WIN *win_disp);
/* keyboard routines */
void _al_win_kbd_handle_key_press(int scode, int vcode, bool extended,
bool repeated, ALLEGRO_DISPLAY_WIN *win_disp);
void _al_win_kbd_handle_key_release(int scode, int vcode, bool extended,
ALLEGRO_DISPLAY_WIN *win_disp);
void _al_win_fix_modifiers(void);
/* mouse routines */
void _al_win_mouse_handle_move(int x, int y, bool abs, ALLEGRO_DISPLAY_WIN *win_disp);
void _al_win_mouse_handle_wheel(int d, bool abs, ALLEGRO_DISPLAY_WIN *win_disp);
void _al_win_mouse_handle_hwheel(int d, bool abs, ALLEGRO_DISPLAY_WIN *win_disp);
void _al_win_mouse_handle_button(int button, bool down, int x, int y, bool abs, ALLEGRO_DISPLAY_WIN *win_disp);
void _al_win_mouse_handle_leave(ALLEGRO_DISPLAY_WIN *win_display);
void _al_win_mouse_handle_enter(ALLEGRO_DISPLAY_WIN *win_display);
/* joystick routines */
void _al_win_joystick_dinput_unacquire(void *unused);
void _al_win_joystick_dinput_grab(void *ALLEGRO_DISPLAY_WIN);
/* custom Allegro messages */
extern UINT _al_win_msg_call_proc;
extern UINT _al_win_msg_suicide;
/* main window routines */
AL_FUNC(void, _al_win_wnd_schedule_proc, (HWND wnd, void (*proc)(void*), void *param));
AL_FUNC(void, _al_win_wnd_call_proc, (HWND wnd, void (*proc)(void*), void *param));
int _al_win_determine_adapter(void);
extern bool _al_win_disable_screensaver;
/* dynamic library loading */
HMODULE _al_win_safe_load_library(const char *filename);
/* time */
void _al_win_init_time(void);
void _al_win_shutdown_time(void);
/* This is used to stop MinGW from complaining about type-punning */
#define MAKE_UNION(ptr, t) \
union { \
LPVOID *v; \
t p; \
} u; \
u.p = (ptr);
typedef struct ALLEGRO_SYSTEM_WIN ALLEGRO_SYSTEM_WIN;
/* This is our version of ALLEGRO_SYSTEM with driver specific extra data. */
struct ALLEGRO_SYSTEM_WIN
{
ALLEGRO_SYSTEM system; /* This must be the first member, we "derive" from it. */
ALLEGRO_DISPLAY *mouse_grab_display; /* May be inaccurate. */
int toggle_mouse_grab_keycode; /* Disabled if zero. */
unsigned int toggle_mouse_grab_modifiers;
};
/* helpers to create windows */
HWND _al_win_create_window(ALLEGRO_DISPLAY *display, int width, int height, int flags);
HWND _al_win_create_faux_fullscreen_window(LPCTSTR devname, ALLEGRO_DISPLAY *display,
int x1, int y1, int width, int height,
int refresh_rate, int flags);
int _al_win_init_window(void);
HWND _al_win_create_hidden_window(void);
/* icon helpers */
void _al_win_set_display_icons(ALLEGRO_DISPLAY *display, int num_icons, ALLEGRO_BITMAP *bitmap[]);
HICON _al_win_create_icon(HWND wnd, ALLEGRO_BITMAP *sprite, int xfocus, int yfocus, bool is_cursor, bool resize);
/* window decorations */
void _al_win_set_window_position(HWND window, int x, int y);
void _al_win_get_window_position(HWND window, int *x, int *y);
void _al_win_set_window_frameless(ALLEGRO_DISPLAY *display, HWND window, bool frameless);
bool _al_win_set_display_flag(ALLEGRO_DISPLAY *display, int flag, bool onoff);
void _al_win_set_window_title(ALLEGRO_DISPLAY *display, const char *title);
/* cursor routines */
typedef struct ALLEGRO_MOUSE_CURSOR_WIN ALLEGRO_MOUSE_CURSOR_WIN;
struct ALLEGRO_MOUSE_CURSOR_WIN
{
HCURSOR hcursor;
};
ALLEGRO_MOUSE_CURSOR* _al_win_create_mouse_cursor(ALLEGRO_BITMAP *sprite, int xfocus, int yfocus);
void _al_win_destroy_mouse_cursor(ALLEGRO_MOUSE_CURSOR *cursor);
bool _al_win_set_mouse_cursor(ALLEGRO_DISPLAY *display, ALLEGRO_MOUSE_CURSOR *cursor);
bool _al_win_set_system_mouse_cursor(ALLEGRO_DISPLAY *display, ALLEGRO_SYSTEM_MOUSE_CURSOR cursor_id);
bool _al_win_show_mouse_cursor(ALLEGRO_DISPLAY *display);
bool _al_win_hide_mouse_cursor(ALLEGRO_DISPLAY *display);
/* driver specific functions */
#if defined ALLEGRO_CFG_D3D
ALLEGRO_DISPLAY_INTERFACE* _al_display_d3d_driver(void);
int _al_d3d_get_num_display_modes(int format, int refresh_rate, int flags);
ALLEGRO_DISPLAY_MODE* _al_d3d_get_display_mode(int index, int format,
int refresh_rate, int flags,
ALLEGRO_DISPLAY_MODE *mode);
bool _al_d3d_init_display(void);
#endif /* defined ALLEGRO_CFG_D3D */
#if defined ALLEGRO_CFG_OPENGL
ALLEGRO_DISPLAY_INTERFACE *_al_display_wgl_driver(void);
int _al_wgl_get_num_display_modes(int format, int refresh_rate, int flags);
ALLEGRO_DISPLAY_MODE* _al_wgl_get_display_mode(int index, int format,
int refresh_rate, int flags,
ALLEGRO_DISPLAY_MODE *mode);
bool _al_wgl_init_display(void);
#endif /* defined ALLEGRO_CFG_OPENGL */
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,16 @@
#ifndef __al_included_allegro5_aintwiz_h
#define __al_included_allegro5_aintwiz_h
#include "allegro5/internal/aintern_display.h"
#include "allegro5/internal/aintern_bitmap.h"
#include "allegro5/internal/aintern_system.h"
#include "allegro5/system.h"
#include "allegro5/platform/aintunix.h"
ALLEGRO_DISPLAY_INTERFACE *_al_display_gp2xwiz_opengl_driver(void);
ALLEGRO_DISPLAY_INTERFACE *_al_display_gp2xwiz_framebuffer_driver(void);
ALLEGRO_SYSTEM_INTERFACE *_al_system_gp2xwiz_driver(void);
ALLEGRO_BITMAP_INTERFACE *_al_bitmap_gp2xwiz_driver(void);
#endif

View File

@@ -0,0 +1,75 @@
/*
* Windows threads
*/
#ifndef __al_included_allegro5_aintwthr_h
#define __al_included_allegro5_aintwthr_h
#include <windows.h>
#ifdef __cplusplus
extern "C" {
#endif
/* threads */
struct _AL_THREAD
{
/* private: */
HANDLE thread;
CRITICAL_SECTION cs;
bool should_stop; /* XXX: use a dedicated terminate Event object? */
void (*proc)(struct _AL_THREAD *self, void *arg);
void *arg;
};
struct _AL_MUTEX
{
PCRITICAL_SECTION cs;
};
#define _AL_MUTEX_UNINITED { NULL }
#define _AL_MARK_MUTEX_UNINITED(M) do { M.cs = NULL; } while (0)
struct _AL_COND
{
long nWaitersBlocked;
long nWaitersGone;
long nWaitersToUnblock;
HANDLE semBlockQueue;
CRITICAL_SECTION semBlockLock;
CRITICAL_SECTION mtxUnblockLock;
};
typedef struct ALLEGRO_TIMEOUT_WIN ALLEGRO_TIMEOUT_WIN;
struct ALLEGRO_TIMEOUT_WIN
{
DWORD abstime;
};
AL_INLINE(bool, _al_get_thread_should_stop, (struct _AL_THREAD *t),
{
bool ret;
EnterCriticalSection(&t->cs);
ret = t->should_stop;
LeaveCriticalSection(&t->cs);
return ret;
})
AL_INLINE(void, _al_mutex_lock, (struct _AL_MUTEX *m),
{
if (m->cs)
EnterCriticalSection(m->cs);
})
AL_INLINE(void, _al_mutex_unlock, (struct _AL_MUTEX *m),
{
if (m->cs)
LeaveCriticalSection(m->cs);
})
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,7 @@
#ifndef __al_included_allegro5_aintxglx_h
#define __al_included_allegro5_aintxglx_h
ALLEGRO_DISPLAY_INTERFACE *_al_display_xglx_driver(void);
ALLEGRO_SYSTEM_INTERFACE *_al_system_xglx_driver(void);
#endif

View File

@@ -0,0 +1,98 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Configuration defines for use with Borland C++Builder.
*
* By Greg Hackmann.
*
* See readme.txt for copyright information.
*/
/*
#ifdef ALLEGRO_SRC
#error Currently BCC32 cannot build the library
#endif
*/
#include <io.h>
#include <fcntl.h>
#include <direct.h>
#include <malloc.h>
#pragma warn -8004 /* unused assigned value */
#pragma warn -8008 /* condition always met */
#pragma warn -8057 /* unused parameter */
#pragma warn -8066 /* unreachable code */
/* describe this platform */
#define ALLEGRO_PLATFORM_STR "BCC32"
#define ALLEGRO_WINDOWS
#define ALLEGRO_I386
#define ALLEGRO_LITTLE_ENDIAN
#define ALLEGRO_GUESS_INTTYPES_OK
/* TODO: check if BCC has inttypes.h and/or stdint.h */
#ifdef ALLEGRO_USE_CONSOLE
#define ALLEGRO_NO_MAGIC_MAIN
#endif
/* describe how function prototypes look to BCC32 */
#if (defined ALLEGRO_STATICLINK)
#define _AL_DLL
#elif (defined ALLEGRO_SRC)
#define _AL_DLL __declspec(dllexport)
#else
#define _AL_DLL __declspec(dllimport)
#endif
#define AL_VAR(type, name) extern _AL_DLL type name
#define AL_ARRAY(type, name) extern _AL_DLL type name[]
#define AL_FUNC(type, name, args) extern _AL_DLL type name args
#define AL_METHOD(type, name, args) type (*name) args
#define AL_FUNCPTR(type, name, args) extern _AL_DLL type (*name) args
#define END_OF_INLINE(name)
//#define AL_INLINE(type, name, args, code) extern __inline type name args code END_OF_INLINE(name)
#define INLINE __inline
#undef AL_INLINE
#undef AL_INLINE_STATIC
#define AL_INLINE(type, name, args, code) extern __inline type __cdecl name args code END_OF_INLINE(name)
#define AL_INLINE_STATIC(type, name, args, code) static __inline type name args code END_OF_INLINE(name)
#define LONG_LONG __int64
#define int64_t signed __int64
#define uint64_t unsigned __int64
#define __func__ "FIXME"
#define _wfindfirst __wfindfirst
#define _wfindnext __wfindnext
#define WinMain _main
/* windows specific defines */
#ifdef NONAMELESSUNION
#undef NONAMELESSUNION
#endif
/* This fixes 99.999999% of Borland C++Builder's problems with structs. */
/* arrange for other headers to be included later on */
#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alwin.h"
#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintwin.h"
#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintwthr.h"

View File

@@ -0,0 +1,85 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Configuration defines for use with Digital Mars C compiler.
*
* By Matthew Leverton.
*
* See readme.txt for copyright information.
*/
#include <io.h>
#include <fcntl.h>
#include <stdint.h>
/* a static auto config */
#define ALLEGRO_HAVE_INTTYPES_H
#define ALLEGRO_HAVE_STDINT_H
#define LONG_LONG long long
/* describe this platform */
#ifdef ALLEGRO_STATICLINK
#define ALLEGRO_PLATFORM_STR "DMC.s"
#else
#define ALLEGRO_PLATFORM_STR "DMC"
#endif
#define ALLEGRO_WINDOWS
#define ALLEGRO_I386
#define ALLEGRO_LITTLE_ENDIAN
#ifdef ALLEGRO_USE_CONSOLE
#define ALLEGRO_NO_MAGIC_MAIN
#endif
/* describe how function prototypes look to DMC */
#if (defined ALLEGRO_STATICLINK) || (defined ALLEGRO_SRC)
#define _AL_DLL
#else
#define _AL_DLL __declspec(dllimport)
#endif
#define AL_VAR(type, name) extern _AL_DLL type name
#define AL_ARRAY(type, name) extern _AL_DLL type name[]
#define AL_FUNC(type, name, args) extern type name args
#define AL_METHOD(type, name, args) type (*name) args
#define AL_FUNCPTR(type, name, args) extern _AL_DLL type (*name) args
/* Windows specific defines */
#if (defined ALLEGRO_SRC)
#if (!defined S_IRUSR)
#define S_IRUSR S_IREAD
#define S_IWUSR S_IWRITE
#endif
typedef unsigned long _fsize_t;
struct _wfinddata_t {
unsigned attrib;
time_t time_create; /* -1 for FAT file systems */
time_t time_access; /* -1 for FAT file systems */
time_t time_write;
_fsize_t size;
wchar_t name[260]; /* may include spaces. */
};
#endif /* ALLEGRO_SRC */
/* arrange for other headers to be included later on */
#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alwin.h"
#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintwin.h"

View File

@@ -0,0 +1,11 @@
#ifndef ALLEGRO_IPHONE
#error bad include
#endif
#ifndef ALLEGRO_LIB_BUILD
#define ALLEGRO_MAGIC_MAIN
#define main _al_mangled_main
#ifdef __cplusplus
extern "C" int _al_mangled_main(int, char **);
#endif
#endif

View File

@@ -0,0 +1,33 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Configuration defines for use on iOS.
*
* See readme.txt for copyright information.
*/
#include <fcntl.h>
#include <unistd.h>
/* Describe this platform. */
#define ALLEGRO_PLATFORM_STR "IPHONE"
#define ALLEGRO_EXTRA_HEADER "allegro5/platform/aliphone.h"
#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintiphone.h"
#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintuthr.h"
#define ALLEGRO_EXCLUDE_GLX
#ifndef AL_INLINE
#define AL_INLINE(type, name, args, code) \
static __inline__ type name args; \
static __inline__ type name args code
#endif

View File

@@ -0,0 +1,84 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Configuration defines for use with Mingw32.
*
* By Michael Rickmann.
*
* Native build version by Henrik Stokseth.
*
* See readme.txt for copyright information.
*/
#include <io.h>
#include <fcntl.h>
#include <direct.h>
#include <malloc.h>
#include "allegro5/platform/alplatf.h"
/* describe this platform */
#ifdef ALLEGRO_STATICLINK
#define ALLEGRO_PLATFORM_STR "MinGW32.s"
#else
#define ALLEGRO_PLATFORM_STR "MinGW32"
#endif
#define ALLEGRO_WINDOWS
#define ALLEGRO_I386
#define ALLEGRO_LITTLE_ENDIAN
#ifdef ALLEGRO_USE_CONSOLE
#define ALLEGRO_NO_MAGIC_MAIN
#endif
/* describe how function prototypes look to MINGW32 */
#if (defined ALLEGRO_STATICLINK) || (defined ALLEGRO_SRC)
#define _AL_DLL
#else
#define _AL_DLL __declspec(dllimport)
#endif
#define AL_VAR(type, name) extern _AL_DLL type name
#define AL_ARRAY(type, name) extern _AL_DLL type name[]
#define AL_FUNC(type, name, args) extern type name args
#define AL_METHOD(type, name, args) type (*name) args
#define AL_FUNCPTR(type, name, args) extern _AL_DLL type (*name) args
/* windows specific defines */
#if (defined ALLEGRO_SRC)
/* pathches to handle DX7 headers on a win9x system */
/* should WINNT be defined on win9x systems? */
#ifdef WINNT
#undef WINNT
#endif
/* defined in windef.h */
#ifndef HMONITOR_DECLARED
#define HMONITOR_DECLARED 1
#endif
#endif /* ALLEGRO_SRC */
/* another instance of missing constants in the mingw32 headers */
#ifndef ENUM_CURRENT_SETTINGS
#define ENUM_CURRENT_SETTINGS ((DWORD)-1)
#endif
/* arrange for other headers to be included later on */
#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alwin.h"
#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintwin.h"
#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintwthr.h"

View File

@@ -0,0 +1,107 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Configuration defines for use with MSVC.
*
* By Shawn Hargreaves.
*
* See readme.txt for copyright information.
*/
#include <io.h>
#include <fcntl.h>
#include <direct.h>
#include <malloc.h>
#include "allegro5/platform/alplatf.h"
#pragma warning (disable: 4200 4244 4305 4800)
/* describe this platform */
#ifdef ALLEGRO_STATICLINK
#define ALLEGRO_PLATFORM_STR "MSVC.s"
#else
#define ALLEGRO_PLATFORM_STR "MSVC"
#endif
#define ALLEGRO_WINDOWS
#define ALLEGRO_I386
#define ALLEGRO_LITTLE_ENDIAN
#define ALLEGRO_GUESS_INTTYPES_OK
#ifdef ALLEGRO_USE_CONSOLE
#define ALLEGRO_NO_MAGIC_MAIN
#endif
/* describe how function prototypes look to MSVC */
#ifndef ALLEGRO_STATICLINK
#ifdef ALLEGRO_SRC
#define _AL_DLL __declspec(dllexport)
#else
#define _AL_DLL __declspec(dllimport)
#endif
#else
#define _AL_DLL
#endif
#define AL_VAR(type, name) extern _AL_DLL type name
#define AL_ARRAY(type, name) extern _AL_DLL type name[]
#define AL_FUNC(type, name, args) _AL_DLL type __cdecl name args
#define AL_METHOD(type, name, args) type (__cdecl *name) args
#define AL_FUNCPTR(type, name, args) extern _AL_DLL type (__cdecl *name) args
#ifdef AL_INLINE
#define END_OF_INLINE(name) void *_force_instantiate_##name = name;
#else
#define END_OF_INLINE(name)
#endif
#undef AL_INLINE
#undef AL_INLINE_STATIC
#define AL_INLINE(type, name, args, code) __inline _AL_DLL type __cdecl name args code END_OF_INLINE(name)
#define AL_INLINE_STATIC(type, name, args, code) __inline type __cdecl name args code END_OF_INLINE(name)
#define INLINE __inline
#define LONG_LONG __int64
/* VC10 is the first version to define int64_t and uint64_t */
#if _MSC_VER < 1600
#define int64_t signed __int64
#define uint64_t unsigned __int64
#endif
/* __func__ is C99 */
#ifndef __func__
/* MSVC versions before VC7 don't have __FUNCTION__ */
#if _MSC_VER < 1300
#define __func__ "???"
#else
#define __func__ __FUNCTION__
#endif
#endif
/* life would be so easy if compilers would all use the same names! */
#if (!defined S_IRUSR)
#define S_IRUSR S_IREAD
#define S_IWUSR S_IWRITE
#define S_IXUSR S_IEXEC
#endif
/* arrange for other headers to be included later on */
#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alwin.h"
#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintwin.h"
#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintwthr.h"

View File

@@ -0,0 +1,77 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* MacOS X specific header defines.
*
* By Angelo Mottola.
*
* See readme.txt for copyright information.
*/
#ifndef __al_included_allegro5_alosx_h
#define __al_included_allegro5_alosx_h
#ifndef ALLEGRO_MACOSX
#error bad include
#endif
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
#include <pthread.h>
#if defined __OBJC__ && defined ALLEGRO_SRC
#import <mach/mach.h>
#import <mach/mach_error.h>
#import <AppKit/AppKit.h>
#import <ApplicationServices/ApplicationServices.h>
#import <Cocoa/Cocoa.h>
#import <CoreAudio/CoreAudio.h>
#import <AudioUnit/AudioUnit.h>
#import <AudioToolbox/AudioToolbox.h>
#import <QuickTime/QuickTime.h>
#import <IOKit/IOKitLib.h>
#import <IOKit/IOCFPlugIn.h>
#import <IOKit/hid/IOHIDLib.h>
#import <IOKit/hid/IOHIDKeys.h>
#import <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>
#endif
ALLEGRO_PATH *_al_osx_get_path(int id);
#ifndef ALLEGRO_LIB_BUILD
#ifndef ALLEGRO_NO_MAGIC_MAIN
#define ALLEGRO_MAGIC_MAIN
#if __GNUC__ >= 4
#define main __attribute__ ((visibility("default"))) _al_mangled_main
#else
#define main _al_mangled_main
#endif
#ifdef __cplusplus
extern "C" int _al_mangled_main(int, char **);
#endif
#endif
#endif
/* Keyboard driver */
#define KEYBOARD_MACOSX AL_ID('O','S','X','K')
#endif
/* Local variables: */
/* mode: objc */
/* c-basic-offset: 3 */
/* indent-tabs-mode: nil */
/* End: */
/* vim: set sts=3 sw=3 et: */

View File

@@ -0,0 +1,36 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Configuration defines for use with MacOS X.
*
* By Angelo Mottola.
*
* See readme.txt for copyright information.
*/
#ifndef __al_included_allegro5_alosxcfg_h
#define __al_included_allegro5_alosxcfg_h
/* Include configuration information. */
#include "allegro5/platform/alplatf.h"
#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintuthr.h"
/* Describe this platform */
#define ALLEGRO_PLATFORM_STR "MacOS X"
/* Arrange for other headers to be included later on */
#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alosx.h"
#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintosx.h"
#endif

View File

@@ -0,0 +1,198 @@
/* alplatf.h is generated from alplatf.h.cmake */
#define ALLEGRO_MINGW32
/* #undef ALLEGRO_UNIX */
/* #undef ALLEGRO_MSVC */
#define ALLEGRO_CFG_D3D
/* #undef ALLEGRO_CFG_D3D9EX */
#define ALLEGRO_CFG_OPENGL
/* #undef ALLEGRO_MACOSX */
/* #undef ALLEGRO_BCC32 */
/* #undef ALLEGRO_GP2XWIZ */
/* #undef ALLEGRO_IPHONE */
/* #undef ALLEGRO_ANDROID */
/* #undef ALLEGRO_RASPBERRYPI */
#define ALLEGRO_CFG_ALLOW_SSE
#define ALLEGRO_NO_ASM
/* #undef ALLEGRO_CFG_NO_FPU */
/* #undef ALLEGRO_CFG_DLL_TLS */
/* #undef ALLEGRO_CFG_PTHREADS_TLS */
#define ALLEGRO_CFG_RELEASE_LOGGING
/* #undef ALLEGRO_CFG_GLSL_SHADERS */
/* #undef ALLEGRO_CFG_HLSL_SHADERS */
/* #undef ALLEGRO_CFG_CG_SHADERS */
/* #undef ALLEGRO_CFG_OPENGLES */
/* #undef ALLEGRO_CFG_NO_GLES2 */
/* #undef ALLEGRO_CFG_ANDROID_LEGACY */
#ifdef ALLEGRO_ANDROID
#define ALLEGRO_CFG_ANDROID_APP_NAME ${ANDROID_APP_NAME}
#define ALLEGRO_CFG_ANDROID_APP_NAME_SLASH "${ANDROID_APP_NAME_SLASH}"
#endif
/*---------------------------------------------------------------------------*/
/* TODO: rename this */
#define RETSIGTYPE void
/* This is defined on the command-line in the autotools build. */
#define ALLEGRO_MODULES_PATH
/*---------------------------------------------------------------------------*/
/* Define to 1 if you have the corresponding header file. */
#define ALLEGRO_HAVE_DIRENT_H
#define ALLEGRO_HAVE_INTTYPES_H
/* #undef ALLEGRO_HAVE_LINUX_AWE_VOICE_H */
/* #undef ALLEGRO_HAVE_LINUX_INPUT_H */
/* #undef ALLEGRO_HAVE_LINUX_JOYSTICK_H */
/* #undef ALLEGRO_HAVE_LINUX_SOUNDCARD_H */
/* #undef ALLEGRO_HAVE_MACHINE_SOUNDCARD_H */
/* #undef ALLEGRO_HAVE_SOUNDCARD_H */
#define ALLEGRO_HAVE_STDBOOL_H
#define ALLEGRO_HAVE_STDINT_H
/* #undef ALLEGRO_HAVE_SV_PROCFS_H */
/* #undef ALLEGRO_HAVE_SYS_IO_H */
/* #undef ALLEGRO_HAVE_SYS_SOUNDCARD_H */
#define ALLEGRO_HAVE_SYS_STAT_H
#define ALLEGRO_HAVE_SYS_TIME_H
#define ALLEGRO_HAVE_TIME_H
/* #undef ALLEGRO_HAVE_SYS_UTSNAME_H */
#define ALLEGRO_HAVE_SYS_TYPES_H
/* #undef ALLEGRO_HAVE_OSATOMIC_H */
/* #undef ALLEGRO_HAVE_SYS_INOTIFY_H */
/* #undef ALLEGRO_HAVE_SYS_TIMERFD_H */
/* Define to 1 if the corresponding functions are available. */
/* #undef ALLEGRO_HAVE_GETEXECNAME */
/* #undef ALLEGRO_HAVE_MKSTEMP */
/* #undef ALLEGRO_HAVE_MMAP */
#define ALLEGRO_HAVE_MPROTECT
/* #undef ALLEGRO_HAVE_SCHED_YIELD */
/* #undef ALLEGRO_HAVE_SYSCONF */
/* #undef ALLEGRO_HAVE_FSEEKO */
/* #undef ALLEGRO_HAVE_FTELLO */
#define ALLEGRO_HAVE_VA_COPY
/* Define to 1 if procfs reveals argc and argv */
/* #undef ALLEGRO_HAVE_PROCFS_ARGCV */
/*---------------------------------------------------------------------------*/
/* Define if target machine is little endian. */
#define ALLEGRO_LITTLE_ENDIAN
/* Define if target machine is big endian. */
/* #undef ALLEGRO_BIG_ENDIAN */
/* Define for Unix platforms, to use C convention for bank switching. */
#define ALLEGRO_NO_ASM
/* Define if compiler prepends underscore to symbols. */
/* #undef ALLEGRO_ASM_PREFIX */
/* Define if assembler supports MMX. */
/* #undef ALLEGRO_MMX */
/* Define if assembler supports SSE. */
/* #undef ALLEGRO_SSE */
/* Define if target platform is Darwin. */
/* #undef ALLEGRO_DARWIN */
/* Define if you have the pthread library. */
/* #undef ALLEGRO_HAVE_LIBPTHREAD */
/* Define if constructor attribute is supported. */
#define ALLEGRO_USE_CONSTRUCTOR
/* Define if dynamically loaded modules are supported. */
/* #undef ALLEGRO_WITH_MODULES */
/*---------------------------------------------------------------------------*/
/* Define if you need support for X-Windows. */
/* #undef ALLEGRO_WITH_XWINDOWS */
/* Define if MIT-SHM extension is supported. */
/* #undef ALLEGRO_XWINDOWS_WITH_SHM */
/* Define if XCursor ARGB extension is available. */
/* #undef ALLEGRO_XWINDOWS_WITH_XCURSOR */
/* Define if DGA version 2.0 or newer is supported */
/* #undef ALLEGRO_XWINDOWS_WITH_XF86DGA2 */
/* Define if XF86VidMode extension is supported. */
/* #undef ALLEGRO_XWINDOWS_WITH_XF86VIDMODE */
/* Define if Xinerama extension is supported. */
/* #undef ALLEGRO_XWINDOWS_WITH_XINERAMA */
/* Define if XRandR extension is supported. */
/* #undef ALLEGRO_XWINDOWS_WITH_XRANDR */
/* Define if XIM extension is supported. */
/* #undef ALLEGRO_XWINDOWS_WITH_XIM */
/* Define if xpm bitmap support is available. */
/* #undef ALLEGRO_XWINDOWS_WITH_XPM */
/*---------------------------------------------------------------------------*/
/* Define if target platform is linux. */
/* #undef ALLEGRO_LINUX */
/* Define to enable Linux console fbcon driver. */
/* #undef ALLEGRO_LINUX_FBCON */
/* Define to enable Linux console SVGAlib driver. */
/* #undef ALLEGRO_LINUX_SVGALIB */
/* Define if SVGAlib driver can check vga_version. */
/* #undef ALLEGRO_LINUX_SVGALIB_HAVE_VGA_VERSION */
/* Define to enable Linux console VBE/AF driver. */
/* #undef ALLEGRO_LINUX_VBEAF */
/* Define to enable Linux console VGA driver. */
/* #undef ALLEGRO_LINUX_VGA */
/*---------------------------------------------------------------------------*/
/* Define to the installed ALSA version. */
/* #undef ALLEGRO_ALSA_VERSION */
/* Define if ALSA DIGI driver is supported. */
/* #undef ALLEGRO_WITH_ALSADIGI */
/* Define if ALSA MIDI driver is supported. */
/* #undef ALLEGRO_WITH_ALSAMIDI */
/* Define if aRts DIGI driver is supported. */
/* #undef ALLEGRO_WITH_ARTSDIGI */
/* Define if ESD DIGI driver is supported. */
/* #undef ALLEGRO_WITH_ESDDIGI */
/* Define if JACK DIGI driver is supported. */
/* #undef ALLEGRO_WITH_JACKDIGI */
/* Define if OSS DIGI driver is supported. */
/* #undef ALLEGRO_WITH_OSSDIGI */
/* Define if OSS MIDI driver is supported. */
/* #undef ALLEGRO_WITH_OSSMIDI */
/* Define if SGI AL DIGI driver is supported. */
/* #undef ALLEGRO_WITH_SGIALDIGI */
/*---------------------------------------------------------------------------*/
/* TODO: Define to (void *)-1, if MAP_FAILED is not defined. */
/* TODO: rename this */
/* # cmakedefine MAP_FAILED */
/*---------------------------------------------------------------------------*/
/* vi: set ft=c ts=3 sts=3 sw=3 et: */

View File

@@ -0,0 +1,40 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Configuration defines for use on Unix platforms.
*
* By Michael Bukin.
*
* See readme.txt for copyright information.
*/
#include <fcntl.h>
#include <unistd.h>
/* Describe this platform. */
#define ALLEGRO_PLATFORM_STR "Unix"
#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alunix.h"
#ifdef _this_is_a_hack_to_fool_scons
#include "alunix.h"
#endif
#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintunix.h"
#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintuthr.h"
/* Include configuration information. */
#include "allegro5/platform/alplatf.h"
/* Enable OpenGL if GLX is available. */
#ifdef ALLEGRO_GLX
#define ALLEGRO_CFG_OPENGL
#endif

View File

@@ -0,0 +1,23 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Unix-specific header defines.
*
* See readme.txt for copyright information.
*/
#ifndef ALLEGRO_UNIX
#error bad include
#endif
/* Nothing left */

View File

@@ -0,0 +1,182 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Configuration defines for use with Watcom.
*
* By Shawn Hargreaves.
*
* See readme.txt for copyright information.
*/
#ifndef __SW_3S
#error Allegro only supports stack based calling convention
#endif
#ifndef __SW_S
#error Stack overflow checking must be disabled
#endif
#include <io.h>
#include <i86.h>
#include <conio.h>
#include <fcntl.h>
#include <direct.h>
#include <malloc.h>
#pragma disable_message (120 201 202)
/* these are available in OpenWatcom 1.3 (12.3) */
#if __WATCOMC__ >= 1230
#define ALLEGRO_HAVE_INTTYPES_H 1
#define ALLEGRO_HAVE_STDINT_H 1
#else
#define ALLEGRO_GUESS_INTTYPES_OK
#endif
/* describe this platform */
#define ALLEGRO_PLATFORM_STR "Watcom"
#define ALLEGRO_DOS
#define ALLEGRO_I386
#define ALLEGRO_LITTLE_ENDIAN
#define LONG_LONG long long
#ifdef ALLEGRO_GUESS_INTTYPES_OK
#define int64_t signed long long
#define uint64_t unsigned long long
#endif
/* emulate some important djgpp routines */
#define inportb(port) inp(port)
#define inportw(port) inpw(port)
#define outportb(port, val) outp(port, val)
#define outportw(port, val) outpw(port, val)
#define ffblk find_t
#define ff_name name
#define ff_attrib attrib
#define ff_fsize size
#define ff_ftime wr_time
#define ff_fdate wr_date
#define findfirst(name, dta, attrib) _dos_findfirst(name, attrib, dta)
#define findnext(dta) _dos_findnext(dta)
#define random() rand()
#define srandom(n) srand(n)
#define _dos_ds _default_ds()
#define dosmemget(offset, length, buffer) memcpy(buffer, (void *)(offset), length)
#define dosmemput(buffer, length, offset) memcpy((void *)(offset), buffer, length)
#define __djgpp_nearptr_enable() 1
#define __djgpp_nearptr_disable()
#define __djgpp_base_address 0
#define __djgpp_conventional_base 0
#define _crt0_startup_flags 1
#define _CRT0_FLAG_NEARPTR 1
#ifdef __cplusplus
extern "C" {
#endif
typedef union __dpmi_regs
{
struct {
unsigned long edi, esi, ebp, res, ebx, edx, ecx, eax;
} d;
struct {
unsigned short di, di_hi, si, si_hi, bp, bp_hi, res, res_hi;
unsigned short bx, bx_hi, dx, dx_hi, cx, cx_hi, ax, ax_hi;
unsigned short flags, es, ds, fs, gs, ip, cs, sp, ss;
} x;
struct {
unsigned char edi[4], esi[4], ebp[4], res[4];
unsigned char bl, bh, ebx_b2, ebx_b3, dl, dh, edx_b2, edx_b3;
unsigned char cl, ch, ecx_b2, ecx_b3, al, ah, eax_b2, eax_b3;
} h;
} __dpmi_regs;
typedef struct __dpmi_meminfo
{
unsigned long handle;
unsigned long size;
unsigned long address;
} __dpmi_meminfo;
typedef struct __dpmi_free_mem_info
{
unsigned long largest_available_free_block_in_bytes;
unsigned long maximum_unlocked_page_allocation_in_pages;
unsigned long maximum_locked_page_allocation_in_pages;
unsigned long linear_address_space_size_in_pages;
unsigned long total_number_of_unlocked_pages;
unsigned long total_number_of_free_pages;
unsigned long total_number_of_physical_pages;
unsigned long free_linear_address_space_in_pages;
unsigned long size_of_paging_file_partition_in_pages;
unsigned long reserved[3];
} __dpmi_free_mem_info;
extern unsigned long __tb;
int __dpmi_int(int vector, __dpmi_regs *regs);
int __dpmi_allocate_dos_memory(int paragraphs, int *ret);
int __dpmi_free_dos_memory(int selector);
int __dpmi_physical_address_mapping(__dpmi_meminfo *info);
int __dpmi_free_physical_address_mapping(__dpmi_meminfo *info);
int __dpmi_lock_linear_region(__dpmi_meminfo *info);
int __dpmi_unlock_linear_region(__dpmi_meminfo *info);
int __dpmi_allocate_ldt_descriptors(int count);
int __dpmi_free_ldt_descriptor(int descriptor);
int __dpmi_get_segment_base_address(int selector, unsigned long *addr);
int __dpmi_set_segment_base_address(int selector, unsigned long address);
int __dpmi_set_segment_limit(int selector, unsigned long limit);
int __dpmi_get_free_memory_information(__dpmi_free_mem_info *info);
int __dpmi_simulate_real_mode_interrupt(int vector, __dpmi_regs *regs);
int __dpmi_simulate_real_mode_procedure_retf(__dpmi_regs *regs);
int _go32_dpmi_lock_data(void *lockaddr, unsigned long locksize);
int _go32_dpmi_lock_code(void *lockaddr, unsigned long locksize);
long _allocate_real_mode_callback(void (*handler)(__dpmi_regs *r), __dpmi_regs *regs);
/* memory locking macros */
void _unlock_dpmi_data(void *addr, int size);
#ifdef __cplusplus
}
#endif
#define END_OF_FUNCTION(x) void x##_end(void) { }
#define END_OF_STATIC_FUNCTION(x) static void x##_end(void) { }
#define LOCK_DATA(d, s) _go32_dpmi_lock_data(d, s)
#define LOCK_CODE(c, s) _go32_dpmi_lock_code(c, s)
#define UNLOCK_DATA(d,s) _unlock_dpmi_data(d, s)
#define LOCK_VARIABLE(x) LOCK_DATA((void *)&x, sizeof(x))
#define LOCK_FUNCTION(x) LOCK_CODE((void *)FP_OFF(x), (long)FP_OFF(x##_end) - (long)FP_OFF(x))
/* arrange for other headers to be included later on */
#define ALLEGRO_EXTRA_HEADER "allegro5/platform/aldos.h"
#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintdos.h"

View File

@@ -0,0 +1,58 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Windows-specific header defines.
*
* By Shawn Hargreaves.
*
* See readme.txt for copyright information.
*/
#ifndef ALLEGRO_WINDOWS
#error bad include
#endif
#include <windows.h>
/*******************************************/
/********** magic main emulation ***********/
/*******************************************/
#ifdef __cplusplus
extern "C" {
#endif
AL_FUNC(int, _WinMain, (void *_main, void *hInst, void *hPrev, char *Cmd, int nShow));
#ifdef __cplusplus
}
#endif
/* The following is due to torhu from A.cc (see
* http://www.allegro.cc/forums/thread/596872/756993#target)
*/
#ifndef ALLEGRO_NO_MAGIC_MAIN
#if defined _MSC_VER && !defined ALLEGRO_LIB_BUILD
#pragma comment(linker,"/ENTRY:mainCRTStartup")
#endif
#endif
/*******************************************/
/************ joystick drivers *************/
/*******************************************/
#define AL_JOY_TYPE_DIRECTX AL_ID('D','X',' ',' ')
AL_VAR(struct ALLEGRO_JOYSTICK_DRIVER, _al_joydrv_directx);
#define _AL_JOYSTICK_DRIVER_DIRECTX \
{ AL_JOY_TYPE_DIRECTX, &_al_joydrv_directx, true },

View File

@@ -0,0 +1,32 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Wiz-specific header defines.
*
* By Trent Gamblin
*
* See readme.txt for copyright information.
*/
#ifndef ALLEGRO_GP2XWIZ
#error bad include
#endif
#define AL_JOY_TYPE_GP2XWIZ AL_ID('W','I','Z',' ')
AL_VAR(struct ALLEGRO_JOYSTICK_DRIVER, _al_joydrv_gp2xwiz);
#define _AL_JOYSTICK_DRIVER_GP2XWIZ \
{ AL_JOY_TYPE_GP2XWIZ, &_al_joydrv_gp2xwiz, true },
#include "allegro5/platform/alunix.h"

View File

@@ -0,0 +1,33 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Configuration defines for use on GP2X Wiz
*
* By Trent Gamblin
*
* See readme.txt for copyright information.
*/
#include <fcntl.h>
#include <unistd.h>
/* Describe this platform. */
#define ALLEGRO_PLATFORM_STR "GP2XWIZ"
#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alwiz.h"
#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintwiz.h"
#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintuthr.h"
/* Include configuration information. */
#include "allegro5/platform/alplatf.h"
/* No GLX on the Wiz */
#define ALLEGRO_EXCLUDE_GLX

View File

@@ -0,0 +1,35 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* A header file to get C99's stdbool.h.
*
* By Peter Wang.
*
* See readme.txt for copyright information.
*/
#ifndef __al_included_allegro5_astdbool_h
#define __al_included_allegro5_astdbool_h
#ifndef __cplusplus
# ifdef ALLEGRO_HAVE_STDBOOL_H
# include <stdbool.h>
# else
# ifndef ALLEGRO_HAVE__BOOL
typedef unsigned char _Bool;
# endif
# define bool _Bool
# define false 0
# define true 1
# define __bool_true_false_are_defined 1
# endif
#endif
#endif

View File

@@ -0,0 +1,75 @@
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* A header file to get definitions of uint*_t and int*_t.
*
* By Peter Wang.
*
* See readme.txt for copyright information.
*/
#ifndef __al_included_allegro5_astdint_h
#define __al_included_allegro5_astdint_h
/* Please only include this file from include/allegro5/internal/alconfig.h
* and don't add more than inttypes.h/stdint.h emulation here. Thanks.
*/
#if defined ALLEGRO_HAVE_INTTYPES_H
#include <inttypes.h>
#elif defined ALLEGRO_HAVE_STDINT_H
#include <stdint.h>
#elif defined ALLEGRO_I386 && defined ALLEGRO_LITTLE_ENDIAN
#ifndef ALLEGRO_GUESS_INTTYPES_OK
#warning Guessing the definitions of fixed-width integer types.
#endif
#define int8_t signed char
#define uint8_t unsigned char
#define int16_t signed short
#define uint16_t unsigned short
#define int32_t signed int
#define uint32_t unsigned int
#ifdef ALLEGRO_WINDOWS
#ifndef _INTPTR_T_DEFINED
#ifdef _WIN64
#define intptr_t __int64
#else
#define intptr_t int
#endif
#define _INTPTR_T_DEFINED
#endif
#ifndef _UINTPTR_T_DEFINED
#ifdef _WIN64
#define uintptr_t unsigned __int64
#else
#define uintptr_t unsigned int
#endif
#define _UINTPTR_T_DEFINED
#endif
#else
#define intptr_t int32_t
#define uintptr_t uint32_t
#endif
#else
#error I dunno how to get the definitions of fixed-width integer types on your platform. Please report this to your friendly Allegro developer.
#endif
#endif