Permalink
Fetching contributors…
Cannot retrieve contributors at this time
12328 lines (11039 sloc) 325 KB
#include "ring.h"
/* Copyright (c) 2013-2016 Mahmoud Fayed <msfclipper@yahoo.com> */
#define ALLEGRO_NO_MAGIC_MAIN
#include <allegro5/allegro.h>
#include "allegro5/allegro_image.h"
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>
#include <allegro5/allegro_audio.h>
#include <allegro5/allegro_acodec.h>
#include <allegro5/allegro_opengl.h>
#include <allegro5/allegro_direct3d.h>
#include <allegro5/allegro_color.h>
#include <allegro5/allegro_memfile.h>
#include "allegro5/allegro_native_dialog.h"
#include <allegro5/allegro_physfs.h>
#include <allegro5/allegro_primitives.h>
RING_FUNC(ring_al_new_allegro_event)
{
ALLEGRO_EVENT *pMyPointer ;
pMyPointer = (ALLEGRO_EVENT *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(ALLEGRO_EVENT)) ;
if (pMyPointer == NULL)
{
RING_API_ERROR(RING_OOM);
return ;
}
RING_API_RETCPOINTER(pMyPointer,"ALLEGRO_EVENT");
}
RING_FUNC(ring_al_destroy_allegro_event)
{
ALLEGRO_EVENT *pMyPointer ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA) ;
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pMyPointer = RING_API_GETCPOINTER(1,"ALLEGRO_EVENT");
if (pMyPointer != NULL) {
ring_state_free(((VM *) pPointer)->pRingState,pMyPointer) ;
RING_API_SETNULLPOINTER(1);
}
}
RING_FUNC(ring_al_get_allegro_event_type)
{
ALLEGRO_EVENT *pMyPointer ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA) ;
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pMyPointer = RING_API_GETCPOINTER(1,"ALLEGRO_EVENT");
RING_API_RETNUMBER(pMyPointer->type);
}
RING_FUNC(ring_al_set_allegro_event_type)
{
ALLEGRO_EVENT *pMyPointer ;
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA) ;
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pMyPointer = RING_API_GETCPOINTER(1,"ALLEGRO_EVENT");
pMyPointer->type = RING_API_GETNUMBER(2);
}
RING_FUNC(ring_al_get_allegro_event_keyboard_keycode)
{
ALLEGRO_EVENT *pMyPointer ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA) ;
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pMyPointer = RING_API_GETCPOINTER(1,"ALLEGRO_EVENT");
RING_API_RETNUMBER(pMyPointer->keyboard.keycode);
}
RING_FUNC(ring_al_set_allegro_event_keyboard_keycode)
{
ALLEGRO_EVENT *pMyPointer ;
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA) ;
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pMyPointer = RING_API_GETCPOINTER(1,"ALLEGRO_EVENT");
pMyPointer->keyboard.keycode = RING_API_GETNUMBER(2);
}
RING_FUNC(ring_al_get_allegro_event_mouse_x)
{
ALLEGRO_EVENT *pMyPointer ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA) ;
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pMyPointer = RING_API_GETCPOINTER(1,"ALLEGRO_EVENT");
RING_API_RETNUMBER(pMyPointer->mouse.x);
}
RING_FUNC(ring_al_set_allegro_event_mouse_x)
{
ALLEGRO_EVENT *pMyPointer ;
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA) ;
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pMyPointer = RING_API_GETCPOINTER(1,"ALLEGRO_EVENT");
pMyPointer->mouse.x = RING_API_GETNUMBER(2);
}
RING_FUNC(ring_al_get_allegro_event_mouse_y)
{
ALLEGRO_EVENT *pMyPointer ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA) ;
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pMyPointer = RING_API_GETCPOINTER(1,"ALLEGRO_EVENT");
RING_API_RETNUMBER(pMyPointer->mouse.y);
}
RING_FUNC(ring_al_set_allegro_event_mouse_y)
{
ALLEGRO_EVENT *pMyPointer ;
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA) ;
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pMyPointer = RING_API_GETCPOINTER(1,"ALLEGRO_EVENT");
pMyPointer->mouse.y = RING_API_GETNUMBER(2);
}
RING_FUNC(ring_al_new_allegro_timeout)
{
ALLEGRO_TIMEOUT *pMyPointer ;
pMyPointer = (ALLEGRO_TIMEOUT *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(ALLEGRO_TIMEOUT)) ;
if (pMyPointer == NULL)
{
RING_API_ERROR(RING_OOM);
return ;
}
RING_API_RETCPOINTER(pMyPointer,"ALLEGRO_TIMEOUT");
}
RING_FUNC(ring_al_destroy_allegro_timeout)
{
ALLEGRO_TIMEOUT *pMyPointer ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA) ;
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pMyPointer = RING_API_GETCPOINTER(1,"ALLEGRO_TIMEOUT");
if (pMyPointer != NULL) {
ring_state_free(((VM *) pPointer)->pRingState,pMyPointer) ;
RING_API_SETNULLPOINTER(1);
}
}
RING_FUNC(ring_al_new_allegro_sample_id)
{
ALLEGRO_SAMPLE_ID *pMyPointer ;
pMyPointer = (ALLEGRO_SAMPLE_ID *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(ALLEGRO_SAMPLE_ID)) ;
if (pMyPointer == NULL)
{
RING_API_ERROR(RING_OOM);
return ;
}
RING_API_RETCPOINTER(pMyPointer,"ALLEGRO_SAMPLE_ID");
}
RING_FUNC(ring_al_destroy_allegro_sample_id)
{
ALLEGRO_SAMPLE_ID *pMyPointer ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA) ;
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pMyPointer = RING_API_GETCPOINTER(1,"ALLEGRO_SAMPLE_ID");
if (pMyPointer != NULL) {
ring_state_free(((VM *) pPointer)->pRingState,pMyPointer) ;
RING_API_SETNULLPOINTER(1);
}
}
RING_FUNC(ring_al_new_allegro_color)
{
ALLEGRO_COLOR *pMyPointer ;
pMyPointer = (ALLEGRO_COLOR *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(ALLEGRO_COLOR)) ;
if (pMyPointer == NULL)
{
RING_API_ERROR(RING_OOM);
return ;
}
RING_API_RETCPOINTER(pMyPointer,"ALLEGRO_COLOR");
}
RING_FUNC(ring_al_destroy_allegro_color)
{
ALLEGRO_COLOR *pMyPointer ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA) ;
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pMyPointer = RING_API_GETCPOINTER(1,"ALLEGRO_COLOR");
if (pMyPointer != NULL) {
ring_state_free(((VM *) pPointer)->pRingState,pMyPointer) ;
RING_API_SETNULLPOINTER(1);
}
}
RING_FUNC(ring_al_exit)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
exit(0);
}
VM *globalVM ;
int al_usr_main(int argc, char **argv)
{
ring_vm_runcode(globalVM,"al_game_start()");
exit(0);
return 0;
}
RING_FUNC(ring_al_run_main)
{
globalVM = (VM *) pPointer ;
al_run_main(globalVM->pRingState->argc,globalVM->pRingState->argv,al_usr_main);
}
RING_FUNC(ring_al_init)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETNUMBER(al_init());
}
RING_FUNC(ring_al_create_config)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETCPOINTER(al_create_config(),"ALLEGRO_CONFIG");
}
RING_FUNC(ring_al_destroy_config)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_destroy_config((ALLEGRO_CONFIG *) RING_API_GETCPOINTER(1,"ALLEGRO_CONFIG"));
}
RING_FUNC(ring_al_load_config_file)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_load_config_file(RING_API_GETSTRING(1)),"ALLEGRO_CONFIG");
}
RING_FUNC(ring_al_load_config_file_f)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_load_config_file_f((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")),"ALLEGRO_CONFIG");
}
RING_FUNC(ring_al_save_config_file)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_save_config_file(RING_API_GETSTRING(1),(ALLEGRO_CONFIG *) RING_API_GETCPOINTER(2,"ALLEGRO_CONFIG")));
}
RING_FUNC(ring_al_save_config_file_f)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_save_config_file_f((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"),(ALLEGRO_CONFIG *) RING_API_GETCPOINTER(2,"ALLEGRO_CONFIG")));
}
RING_FUNC(ring_al_add_config_section)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_add_config_section((ALLEGRO_CONFIG *) RING_API_GETCPOINTER(1,"ALLEGRO_CONFIG"),RING_API_GETSTRING(2));
}
RING_FUNC(ring_al_add_config_comment)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_add_config_comment((ALLEGRO_CONFIG *) RING_API_GETCPOINTER(1,"ALLEGRO_CONFIG"),RING_API_GETSTRING(2),RING_API_GETSTRING(3));
}
RING_FUNC(ring_al_get_config_value)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETSTRING(al_get_config_value((ALLEGRO_CONFIG *) RING_API_GETCPOINTER(1,"ALLEGRO_CONFIG"),RING_API_GETSTRING(2),RING_API_GETSTRING(3)));
}
RING_FUNC(ring_al_set_config_value)
{
if ( RING_API_PARACOUNT != 4 ) {
RING_API_ERROR(RING_API_MISS4PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_config_value((ALLEGRO_CONFIG *) RING_API_GETCPOINTER(1,"ALLEGRO_CONFIG"),RING_API_GETSTRING(2),RING_API_GETSTRING(3),RING_API_GETSTRING(4));
}
RING_FUNC(ring_al_get_first_config_section)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETSTRING(al_get_first_config_section((ALLEGRO_CONFIG *) RING_API_GETCPOINTER(1,"ALLEGRO_CONFIG"),(ALLEGRO_CONFIG_SECTION **) RING_API_GETCPOINTER2POINTER(2,"ALLEGRO_CONFIG_SECTION")));
}
RING_FUNC(ring_al_get_next_config_section)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETSTRING(al_get_next_config_section((ALLEGRO_CONFIG_SECTION **) RING_API_GETCPOINTER2POINTER(1,"ALLEGRO_CONFIG_SECTION")));
}
RING_FUNC(ring_al_get_first_config_entry)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETSTRING(al_get_first_config_entry((ALLEGRO_CONFIG *) RING_API_GETCPOINTER(1,"ALLEGRO_CONFIG"),RING_API_GETSTRING(2),(ALLEGRO_CONFIG_ENTRY **) RING_API_GETCPOINTER2POINTER(3,"ALLEGRO_CONFIG_ENTRY")));
}
RING_FUNC(ring_al_get_next_config_entry)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETSTRING(al_get_next_config_entry((ALLEGRO_CONFIG_ENTRY **) RING_API_GETCPOINTER2POINTER(1,"ALLEGRO_CONFIG_ENTRY")));
}
RING_FUNC(ring_al_merge_config)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_merge_config((ALLEGRO_CONFIG *) RING_API_GETCPOINTER(1,"ALLEGRO_CONFIG"),(ALLEGRO_CONFIG *) RING_API_GETCPOINTER(2,"ALLEGRO_CONFIG")),"ALLEGRO_CONFIG");
}
RING_FUNC(ring_al_merge_config_into)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_merge_config_into((ALLEGRO_CONFIG *) RING_API_GETCPOINTER(1,"ALLEGRO_CONFIG"),(ALLEGRO_CONFIG *) RING_API_GETCPOINTER(2,"ALLEGRO_CONFIG"));
}
RING_FUNC(ring_al_create_display)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_create_display( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2)),"ALLEGRO_DISPLAY");
}
RING_FUNC(ring_al_destroy_display)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_destroy_display((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"));
}
RING_FUNC(ring_al_get_new_display_flags)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETNUMBER(al_get_new_display_flags());
}
RING_FUNC(ring_al_set_new_display_flags)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_new_display_flags( (int ) RING_API_GETNUMBER(1));
}
RING_FUNC(ring_al_get_new_display_option)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_new_display_option( (int ) RING_API_GETNUMBER(1),RING_API_GETINTPOINTER(2)));
RING_API_ACCEPTINTVALUE(2) ;
}
RING_FUNC(ring_al_set_new_display_option)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_new_display_option( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3));
}
RING_FUNC(ring_al_reset_new_display_options)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
al_reset_new_display_options();
}
RING_FUNC(ring_al_get_new_window_position)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_get_new_window_position(RING_API_GETINTPOINTER(1),RING_API_GETINTPOINTER(2));
RING_API_ACCEPTINTVALUE(1) ;
RING_API_ACCEPTINTVALUE(2) ;
}
RING_FUNC(ring_al_set_new_window_position)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_new_window_position( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2));
}
RING_FUNC(ring_al_get_new_display_refresh_rate)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETNUMBER(al_get_new_display_refresh_rate());
}
RING_FUNC(ring_al_set_new_display_refresh_rate)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_new_display_refresh_rate( (int ) RING_API_GETNUMBER(1));
}
RING_FUNC(ring_al_get_display_event_source)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_get_display_event_source((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY")),"ALLEGRO_EVENT_SOURCE");
}
RING_FUNC(ring_al_get_backbuffer)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_get_backbuffer((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY")),"ALLEGRO_BITMAP");
}
RING_FUNC(ring_al_flip_display)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
al_flip_display();
}
RING_FUNC(ring_al_update_display_region)
{
if ( RING_API_PARACOUNT != 4 ) {
RING_API_ERROR(RING_API_MISS4PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_update_display_region( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4));
}
RING_FUNC(ring_al_wait_for_vsync)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETNUMBER(al_wait_for_vsync());
}
RING_FUNC(ring_al_get_display_width)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_display_width((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY")));
}
RING_FUNC(ring_al_get_display_height)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_display_height((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY")));
}
RING_FUNC(ring_al_resize_display)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_resize_display((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3)));
}
RING_FUNC(ring_al_acknowledge_resize)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_acknowledge_resize((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY")));
}
RING_FUNC(ring_al_get_window_position)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_get_window_position((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"),RING_API_GETINTPOINTER(2),RING_API_GETINTPOINTER(3));
RING_API_ACCEPTINTVALUE(2) ;
RING_API_ACCEPTINTVALUE(3) ;
}
RING_FUNC(ring_al_set_window_position)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_window_position((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3));
}
RING_FUNC(ring_al_get_display_flags)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_display_flags((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY")));
}
RING_FUNC(ring_al_set_display_flag)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_set_display_flag((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"), (int ) RING_API_GETNUMBER(2), (bool ) RING_API_GETNUMBER(3)));
}
RING_FUNC(ring_al_get_display_option)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_display_option((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"), (int ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_get_display_format)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_display_format((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY")));
}
RING_FUNC(ring_al_get_display_refresh_rate)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_display_refresh_rate((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY")));
}
RING_FUNC(ring_al_set_window_title)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_window_title((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"),RING_API_GETSTRING(2));
}
RING_FUNC(ring_al_set_display_icon)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_display_icon((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"),(ALLEGRO_BITMAP *) RING_API_GETCPOINTER(2,"ALLEGRO_BITMAP"));
}
RING_FUNC(ring_al_set_display_icons)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_display_icons((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"), (int ) RING_API_GETNUMBER(2),(ALLEGRO_BITMAP *) RING_API_GETCPOINTER(3,"ALLEGRO_BITMAP"));
}
RING_FUNC(ring_al_inhibit_screensaver)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_inhibit_screensaver( (bool ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_acknowledge_drawing_halt)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_acknowledge_drawing_halt((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"));
}
RING_FUNC(ring_al_acknowledge_drawing_resume)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_acknowledge_drawing_resume((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"));
}
RING_FUNC(ring_al_get_display_orientation)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_display_orientation((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY")));
}
RING_FUNC(ring_al_set_display_option)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_display_option((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3));
}
RING_FUNC(ring_al_get_window_constraints)
{
if ( RING_API_PARACOUNT != 5 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_window_constraints((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"),RING_API_GETINTPOINTER(2),RING_API_GETINTPOINTER(3),RING_API_GETINTPOINTER(4),RING_API_GETINTPOINTER(5)));
RING_API_ACCEPTINTVALUE(2) ;
RING_API_ACCEPTINTVALUE(3) ;
RING_API_ACCEPTINTVALUE(4) ;
RING_API_ACCEPTINTVALUE(5) ;
}
RING_FUNC(ring_al_set_window_constraints)
{
if ( RING_API_PARACOUNT != 5 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_set_window_constraints((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4), (int ) RING_API_GETNUMBER(5)));
}
RING_FUNC(ring_al_create_event_queue)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETCPOINTER(al_create_event_queue(),"ALLEGRO_EVENT_QUEUE");
}
RING_FUNC(ring_al_destroy_event_queue)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_destroy_event_queue((ALLEGRO_EVENT_QUEUE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_QUEUE"));
}
RING_FUNC(ring_al_register_event_source)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_register_event_source((ALLEGRO_EVENT_QUEUE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_QUEUE"),(ALLEGRO_EVENT_SOURCE *) RING_API_GETCPOINTER(2,"ALLEGRO_EVENT_SOURCE"));
}
RING_FUNC(ring_al_unregister_event_source)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_unregister_event_source((ALLEGRO_EVENT_QUEUE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_QUEUE"),(ALLEGRO_EVENT_SOURCE *) RING_API_GETCPOINTER(2,"ALLEGRO_EVENT_SOURCE"));
}
RING_FUNC(ring_al_is_event_queue_empty)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_is_event_queue_empty((ALLEGRO_EVENT_QUEUE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_QUEUE")));
}
RING_FUNC(ring_al_get_next_event)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_next_event((ALLEGRO_EVENT_QUEUE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_QUEUE"),(ALLEGRO_EVENT *) RING_API_GETCPOINTER(2,"ALLEGRO_EVENT")));
}
RING_FUNC(ring_al_peek_next_event)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_peek_next_event((ALLEGRO_EVENT_QUEUE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_QUEUE"),(ALLEGRO_EVENT *) RING_API_GETCPOINTER(2,"ALLEGRO_EVENT")));
}
RING_FUNC(ring_al_drop_next_event)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_drop_next_event((ALLEGRO_EVENT_QUEUE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_QUEUE")));
}
RING_FUNC(ring_al_flush_event_queue)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_flush_event_queue((ALLEGRO_EVENT_QUEUE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_QUEUE"));
}
RING_FUNC(ring_al_wait_for_event)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_wait_for_event((ALLEGRO_EVENT_QUEUE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_QUEUE"),(ALLEGRO_EVENT *) RING_API_GETCPOINTER(2,"ALLEGRO_EVENT"));
}
RING_FUNC(ring_al_wait_for_event_timed)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_wait_for_event_timed((ALLEGRO_EVENT_QUEUE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_QUEUE"),(ALLEGRO_EVENT *) RING_API_GETCPOINTER(2,"ALLEGRO_EVENT"), (float ) RING_API_GETNUMBER(3)));
}
RING_FUNC(ring_al_wait_for_event_until)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_wait_for_event_until((ALLEGRO_EVENT_QUEUE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_QUEUE"),(ALLEGRO_EVENT *) RING_API_GETCPOINTER(2,"ALLEGRO_EVENT"),(ALLEGRO_TIMEOUT *) RING_API_GETCPOINTER(3,"ALLEGRO_TIMEOUT")));
}
RING_FUNC(ring_al_init_user_event_source)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_init_user_event_source((ALLEGRO_EVENT_SOURCE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_SOURCE"));
}
RING_FUNC(ring_al_destroy_user_event_source)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_destroy_user_event_source((ALLEGRO_EVENT_SOURCE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_SOURCE"));
}
RING_FUNC(ring_al_unref_user_event)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_unref_user_event((ALLEGRO_USER_EVENT *) RING_API_GETCPOINTER(1,"ALLEGRO_USER_EVENT"));
}
RING_FUNC(ring_al_get_event_source_data)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
{
intptr_t *pValue ;
pValue = (intptr_t *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(intptr_t)) ;
*pValue = al_get_event_source_data((ALLEGRO_EVENT_SOURCE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_SOURCE"));
RING_API_RETCPOINTER(pValue,"intptr_t");
}
}
RING_FUNC(ring_al_set_event_source_data)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_event_source_data((ALLEGRO_EVENT_SOURCE *) RING_API_GETCPOINTER(1,"ALLEGRO_EVENT_SOURCE"),* (intptr_t *) RING_API_GETCPOINTER(2,"intptr_t"));
if (RING_API_ISCPOINTERNOTASSIGNED(2))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"intptr_t"));
}
RING_FUNC(ring_al_fopen)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_fopen(RING_API_GETSTRING(1),RING_API_GETSTRING(2)),"ALLEGRO_FILE");
}
RING_FUNC(ring_al_fopen_interface)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_fopen_interface((ALLEGRO_FILE_INTERFACE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE_INTERFACE"),RING_API_GETSTRING(2),RING_API_GETSTRING(3)),"ALLEGRO_FILE");
}
RING_FUNC(ring_al_fopen_slice)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_fopen_slice((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"), (size_t ) RING_API_GETNUMBER(2),RING_API_GETSTRING(3)),"ALLEGRO_FILE");
}
RING_FUNC(ring_al_fclose)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_fclose((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"));
}
RING_FUNC(ring_al_fread)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fread((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"),(void *) RING_API_GETCPOINTER(2,"void"), (size_t ) RING_API_GETNUMBER(3)));
}
RING_FUNC(ring_al_fwrite)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fwrite((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"),(void *) RING_API_GETCPOINTER(2,"void"), (size_t ) RING_API_GETNUMBER(3)));
}
RING_FUNC(ring_al_fflush)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fflush((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")));
}
RING_FUNC(ring_al_ftell)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_ftell((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")));
}
RING_FUNC(ring_al_fseek)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fseek((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"), (int64_t ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3)));
}
RING_FUNC(ring_al_feof)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_feof((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")));
}
RING_FUNC(ring_al_ferror)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_ferror((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")));
}
RING_FUNC(ring_al_fclearerr)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_fclearerr((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"));
}
RING_FUNC(ring_al_fungetc)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fungetc((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"), (int ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_fsize)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fsize((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")));
}
RING_FUNC(ring_al_fgetc)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fgetc((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")));
}
RING_FUNC(ring_al_fputc)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fputc((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"), (int ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_fread16le)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fread16le((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")));
}
RING_FUNC(ring_al_fread16be)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fread16be((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")));
}
RING_FUNC(ring_al_fwrite16le)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fwrite16le((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"), (int16_t ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_fwrite16be)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fwrite16be((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"), (int16_t ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_fread32le)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fread32le((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")));
}
RING_FUNC(ring_al_fread32be)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fread32be((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")));
}
RING_FUNC(ring_al_fwrite32le)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fwrite32le((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"), (int32_t ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_fwrite32be)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fwrite32be((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"), (int32_t ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_fgets)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETSTRING(al_fgets((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"),* (char * const *) RING_API_GETCPOINTER(2,"char * const"), (size_t ) RING_API_GETNUMBER(3)));
if (RING_API_ISCPOINTERNOTASSIGNED(2))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"char"));
}
RING_FUNC(ring_al_fget_ustr)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_fget_ustr((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")),"ALLEGRO_USTR");
}
RING_FUNC(ring_al_fputs)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fputs((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE"),RING_API_GETSTRING(2)));
}
RING_FUNC(ring_al_fopen_fd)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_fopen_fd( (int ) RING_API_GETNUMBER(1),RING_API_GETSTRING(2)),"ALLEGRO_FILE");
}
RING_FUNC(ring_al_make_temp_file)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_make_temp_file(RING_API_GETSTRING(1),(ALLEGRO_PATH **) RING_API_GETCPOINTER2POINTER(2,"ALLEGRO_PATH")),"ALLEGRO_FILE");
}
RING_FUNC(ring_al_set_new_file_interface)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_new_file_interface((ALLEGRO_FILE_INTERFACE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE_INTERFACE"));
}
RING_FUNC(ring_al_set_standard_file_interface)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
al_set_standard_file_interface();
}
RING_FUNC(ring_al_get_new_file_interface)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETCPOINTER(al_get_new_file_interface(),"ALLEGRO_FILE_INTERFACE");
}
RING_FUNC(ring_al_create_file_handle)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_create_file_handle((ALLEGRO_FILE_INTERFACE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE_INTERFACE"),(void *) RING_API_GETCPOINTER(2,"void")),"ALLEGRO_FILE");
}
RING_FUNC(ring_al_get_file_userdata)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_get_file_userdata((ALLEGRO_FILE *) RING_API_GETCPOINTER(1,"ALLEGRO_FILE")),"void");
}
RING_FUNC(ring_al_create_fs_entry)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_create_fs_entry(RING_API_GETSTRING(1)),"ALLEGRO_FS_ENTRY");
}
RING_FUNC(ring_al_destroy_fs_entry)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_destroy_fs_entry((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY"));
}
RING_FUNC(ring_al_get_fs_entry_name)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETSTRING(al_get_fs_entry_name((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY")));
}
RING_FUNC(ring_al_update_fs_entry)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_update_fs_entry((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY")));
}
RING_FUNC(ring_al_get_fs_entry_mode)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_fs_entry_mode((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY")));
}
RING_FUNC(ring_al_get_fs_entry_atime)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
{
time_t *pValue ;
pValue = (time_t *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(time_t)) ;
*pValue = al_get_fs_entry_atime((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY"));
RING_API_RETCPOINTER(pValue,"time_t");
}
}
RING_FUNC(ring_al_get_fs_entry_ctime)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
{
time_t *pValue ;
pValue = (time_t *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(time_t)) ;
*pValue = al_get_fs_entry_ctime((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY"));
RING_API_RETCPOINTER(pValue,"time_t");
}
}
RING_FUNC(ring_al_get_fs_entry_mtime)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
{
time_t *pValue ;
pValue = (time_t *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(time_t)) ;
*pValue = al_get_fs_entry_mtime((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY"));
RING_API_RETCPOINTER(pValue,"time_t");
}
}
RING_FUNC(ring_al_get_fs_entry_size)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
{
off_t *pValue ;
pValue = (off_t *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(off_t)) ;
*pValue = al_get_fs_entry_size((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY"));
RING_API_RETCPOINTER(pValue,"off_t");
}
}
RING_FUNC(ring_al_fs_entry_exists)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fs_entry_exists((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY")));
}
RING_FUNC(ring_al_remove_fs_entry)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_remove_fs_entry((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY")));
}
RING_FUNC(ring_al_filename_exists)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_filename_exists(RING_API_GETSTRING(1)));
}
RING_FUNC(ring_al_remove_filename)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_remove_filename(RING_API_GETSTRING(1)));
}
RING_FUNC(ring_al_open_directory)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_open_directory((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY")));
}
RING_FUNC(ring_al_read_directory)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_read_directory((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY")),"ALLEGRO_FS_ENTRY");
}
RING_FUNC(ring_al_close_directory)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_close_directory((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY")));
}
RING_FUNC(ring_al_get_current_directory)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETSTRING(al_get_current_directory());
}
RING_FUNC(ring_al_change_directory)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_change_directory(RING_API_GETSTRING(1)));
}
RING_FUNC(ring_al_make_directory)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_make_directory(RING_API_GETSTRING(1)));
}
RING_FUNC(ring_al_open_fs_entry)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_open_fs_entry((ALLEGRO_FS_ENTRY *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_ENTRY"),RING_API_GETSTRING(2)),"ALLEGRO_FILE");
}
RING_FUNC(ring_al_set_fs_interface)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_fs_interface((ALLEGRO_FS_INTERFACE *) RING_API_GETCPOINTER(1,"ALLEGRO_FS_INTERFACE"));
}
RING_FUNC(ring_al_set_standard_fs_interface)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
al_set_standard_fs_interface();
}
RING_FUNC(ring_al_get_fs_interface)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETCPOINTER(al_get_fs_interface(),"ALLEGRO_FS_INTERFACE");
}
RING_FUNC(ring_al_itofix)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_itofix( (int ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_fixtoi)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixtoi( (al_fixed ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_fixfloor)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixfloor( (al_fixed ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_fixceil)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixceil( (al_fixed ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_ftofix)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_ftofix( (double ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_fixtof)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixtof( (al_fixed ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_fixmul)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixmul( (al_fixed ) RING_API_GETNUMBER(1), (al_fixed ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_fixdiv)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixdiv( (al_fixed ) RING_API_GETNUMBER(1), (al_fixed ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_fixadd)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixadd( (al_fixed ) RING_API_GETNUMBER(1), (al_fixed ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_fixsub)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixsub( (al_fixed ) RING_API_GETNUMBER(1), (al_fixed ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_fixsin)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixsin( (al_fixed ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_fixcos)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixcos( (al_fixed ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_fixtan)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixtan( (al_fixed ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_fixasin)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixasin( (al_fixed ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_fixacos)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixacos( (al_fixed ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_fixatan)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixatan( (al_fixed ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_fixatan2)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixatan2( (al_fixed ) RING_API_GETNUMBER(1), (al_fixed ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_fixsqrt)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixsqrt( (al_fixed ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_fixhypot)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_fixhypot( (al_fixed ) RING_API_GETNUMBER(1), (al_fixed ) RING_API_GETNUMBER(2)));
}
RING_FUNC(ring_al_get_display_mode)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_get_display_mode( (int ) RING_API_GETNUMBER(1),(ALLEGRO_DISPLAY_MODE *) RING_API_GETCPOINTER(2,"ALLEGRO_DISPLAY_MODE")),"ALLEGRO_DISPLAY_MODE");
}
RING_FUNC(ring_al_get_num_display_modes)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETNUMBER(al_get_num_display_modes());
}
RING_FUNC(ring_al_map_rgb)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
{
ALLEGRO_COLOR *pValue ;
pValue = (ALLEGRO_COLOR *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(ALLEGRO_COLOR)) ;
*pValue = al_map_rgb( (unsigned char ) RING_API_GETNUMBER(1), (unsigned char ) RING_API_GETNUMBER(2), (unsigned char ) RING_API_GETNUMBER(3));
RING_API_RETCPOINTER(pValue,"ALLEGRO_COLOR");
}
}
RING_FUNC(ring_al_map_rgb_f)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
{
ALLEGRO_COLOR *pValue ;
pValue = (ALLEGRO_COLOR *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(ALLEGRO_COLOR)) ;
*pValue = al_map_rgb_f( (float ) RING_API_GETNUMBER(1), (float ) RING_API_GETNUMBER(2), (float ) RING_API_GETNUMBER(3));
RING_API_RETCPOINTER(pValue,"ALLEGRO_COLOR");
}
}
RING_FUNC(ring_al_map_rgba)
{
if ( RING_API_PARACOUNT != 4 ) {
RING_API_ERROR(RING_API_MISS4PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
{
ALLEGRO_COLOR *pValue ;
pValue = (ALLEGRO_COLOR *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(ALLEGRO_COLOR)) ;
*pValue = al_map_rgba( (unsigned char ) RING_API_GETNUMBER(1), (unsigned char ) RING_API_GETNUMBER(2), (unsigned char ) RING_API_GETNUMBER(3), (unsigned char ) RING_API_GETNUMBER(4));
RING_API_RETCPOINTER(pValue,"ALLEGRO_COLOR");
}
}
RING_FUNC(ring_al_map_rgba_f)
{
if ( RING_API_PARACOUNT != 4 ) {
RING_API_ERROR(RING_API_MISS4PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
{
ALLEGRO_COLOR *pValue ;
pValue = (ALLEGRO_COLOR *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(ALLEGRO_COLOR)) ;
*pValue = al_map_rgba_f( (float ) RING_API_GETNUMBER(1), (float ) RING_API_GETNUMBER(2), (float ) RING_API_GETNUMBER(3), (float ) RING_API_GETNUMBER(4));
RING_API_RETCPOINTER(pValue,"ALLEGRO_COLOR");
}
}
RING_FUNC(ring_al_unmap_rgb)
{
if ( RING_API_PARACOUNT != 4 ) {
RING_API_ERROR(RING_API_MISS4PARA);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_unmap_rgb(* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(1,"ALLEGRO_COLOR"),(unsigned char *) RING_API_GETCPOINTER(2,"unsigned char"),(unsigned char *) RING_API_GETCPOINTER(3,"unsigned char"),(unsigned char *) RING_API_GETCPOINTER(4,"unsigned char"));
if (RING_API_ISCPOINTERNOTASSIGNED(1))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_unmap_rgb_f)
{
if ( RING_API_PARACOUNT != 4 ) {
RING_API_ERROR(RING_API_MISS4PARA);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_unmap_rgb_f(* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(1,"ALLEGRO_COLOR"),(float *) RING_API_GETCPOINTER(2,"float"),(float *) RING_API_GETCPOINTER(3,"float"),(float *) RING_API_GETCPOINTER(4,"float"));
if (RING_API_ISCPOINTERNOTASSIGNED(1))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_unmap_rgba)
{
if ( RING_API_PARACOUNT != 5 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_unmap_rgba(* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(1,"ALLEGRO_COLOR"),(unsigned char *) RING_API_GETCPOINTER(2,"unsigned char"),(unsigned char *) RING_API_GETCPOINTER(3,"unsigned char"),(unsigned char *) RING_API_GETCPOINTER(4,"unsigned char"),(unsigned char *) RING_API_GETCPOINTER(5,"unsigned char"));
if (RING_API_ISCPOINTERNOTASSIGNED(1))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_unmap_rgba_f)
{
if ( RING_API_PARACOUNT != 5 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISPOINTER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_unmap_rgba_f(* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(1,"ALLEGRO_COLOR"),(float *) RING_API_GETCPOINTER(2,"float"),(float *) RING_API_GETCPOINTER(3,"float"),(float *) RING_API_GETCPOINTER(4,"float"),(float *) RING_API_GETCPOINTER(5,"float"));
if (RING_API_ISCPOINTERNOTASSIGNED(1))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_get_pixel_size)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_pixel_size( (int ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_get_pixel_format_bits)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_pixel_format_bits( (int ) RING_API_GETNUMBER(1)));
}
RING_FUNC(ring_al_lock_bitmap)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_lock_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3)),"ALLEGRO_LOCKED_REGION");
}
RING_FUNC(ring_al_lock_bitmap_region)
{
if ( RING_API_PARACOUNT != 7 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(6) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(7) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_lock_bitmap_region((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4), (int ) RING_API_GETNUMBER(5), (int ) RING_API_GETNUMBER(6), (int ) RING_API_GETNUMBER(7)),"ALLEGRO_LOCKED_REGION");
}
RING_FUNC(ring_al_unlock_bitmap)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_unlock_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"));
}
RING_FUNC(ring_al_create_bitmap)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_create_bitmap( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2)),"ALLEGRO_BITMAP");
}
RING_FUNC(ring_al_create_sub_bitmap)
{
if ( RING_API_PARACOUNT != 5 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_create_sub_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4), (int ) RING_API_GETNUMBER(5)),"ALLEGRO_BITMAP");
}
RING_FUNC(ring_al_clone_bitmap)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_clone_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP")),"ALLEGRO_BITMAP");
}
RING_FUNC(ring_al_destroy_bitmap)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_destroy_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"));
}
RING_FUNC(ring_al_get_new_bitmap_flags)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETNUMBER(al_get_new_bitmap_flags());
}
RING_FUNC(ring_al_get_new_bitmap_format)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETNUMBER(al_get_new_bitmap_format());
}
RING_FUNC(ring_al_set_new_bitmap_flags)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_new_bitmap_flags( (int ) RING_API_GETNUMBER(1));
}
RING_FUNC(ring_al_add_new_bitmap_flag)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_add_new_bitmap_flag( (int ) RING_API_GETNUMBER(1));
}
RING_FUNC(ring_al_set_new_bitmap_format)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_new_bitmap_format( (int ) RING_API_GETNUMBER(1));
}
RING_FUNC(ring_al_get_bitmap_flags)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_bitmap_flags((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP")));
}
RING_FUNC(ring_al_get_bitmap_format)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_bitmap_format((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP")));
}
RING_FUNC(ring_al_get_bitmap_height)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_bitmap_height((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP")));
}
RING_FUNC(ring_al_get_bitmap_width)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_get_bitmap_width((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP")));
}
RING_FUNC(ring_al_get_pixel)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
{
ALLEGRO_COLOR *pValue ;
pValue = (ALLEGRO_COLOR *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(ALLEGRO_COLOR)) ;
*pValue = al_get_pixel((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3));
RING_API_RETCPOINTER(pValue,"ALLEGRO_COLOR");
}
}
RING_FUNC(ring_al_is_bitmap_locked)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_is_bitmap_locked((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP")));
}
RING_FUNC(ring_al_is_compatible_bitmap)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_is_compatible_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP")));
}
RING_FUNC(ring_al_is_sub_bitmap)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETNUMBER(al_is_sub_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP")));
}
RING_FUNC(ring_al_get_parent_bitmap)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
RING_API_RETCPOINTER(al_get_parent_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP")),"ALLEGRO_BITMAP");
}
RING_FUNC(ring_al_clear_to_color)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
al_clear_to_color(* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(1,"ALLEGRO_COLOR"));
if (RING_API_ISCPOINTERNOTASSIGNED(1))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_draw_bitmap)
{
if ( RING_API_PARACOUNT != 4 ) {
RING_API_ERROR(RING_API_MISS4PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_draw_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"), (float ) RING_API_GETNUMBER(2), (float ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4));
}
RING_FUNC(ring_al_draw_tinted_bitmap)
{
if ( RING_API_PARACOUNT != 5 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_draw_tinted_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"),* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(2,"ALLEGRO_COLOR"), (float ) RING_API_GETNUMBER(3), (float ) RING_API_GETNUMBER(4), (int ) RING_API_GETNUMBER(5));
if (RING_API_ISCPOINTERNOTASSIGNED(2))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_draw_bitmap_region)
{
if ( RING_API_PARACOUNT != 8 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(6) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(7) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(8) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_draw_bitmap_region((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"), (float ) RING_API_GETNUMBER(2), (float ) RING_API_GETNUMBER(3), (float ) RING_API_GETNUMBER(4), (float ) RING_API_GETNUMBER(5), (float ) RING_API_GETNUMBER(6), (float ) RING_API_GETNUMBER(7), (int ) RING_API_GETNUMBER(8));
}
RING_FUNC(ring_al_draw_tinted_bitmap_region)
{
if ( RING_API_PARACOUNT != 9 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(6) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(7) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(8) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(9) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_draw_tinted_bitmap_region((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"),* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(2,"ALLEGRO_COLOR"), (float ) RING_API_GETNUMBER(3), (float ) RING_API_GETNUMBER(4), (float ) RING_API_GETNUMBER(5), (float ) RING_API_GETNUMBER(6), (float ) RING_API_GETNUMBER(7), (float ) RING_API_GETNUMBER(8), (int ) RING_API_GETNUMBER(9));
if (RING_API_ISCPOINTERNOTASSIGNED(2))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_draw_pixel)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_draw_pixel( (float ) RING_API_GETNUMBER(1), (float ) RING_API_GETNUMBER(2),* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(3,"ALLEGRO_COLOR"));
if (RING_API_ISCPOINTERNOTASSIGNED(3))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_draw_rotated_bitmap)
{
if ( RING_API_PARACOUNT != 7 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(6) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(7) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_draw_rotated_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"), (float ) RING_API_GETNUMBER(2), (float ) RING_API_GETNUMBER(3), (float ) RING_API_GETNUMBER(4), (float ) RING_API_GETNUMBER(5), (float ) RING_API_GETNUMBER(6), (int ) RING_API_GETNUMBER(7));
}
RING_FUNC(ring_al_draw_tinted_rotated_bitmap)
{
if ( RING_API_PARACOUNT != 8 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(6) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(7) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(8) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_draw_tinted_rotated_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"),* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(2,"ALLEGRO_COLOR"), (float ) RING_API_GETNUMBER(3), (float ) RING_API_GETNUMBER(4), (float ) RING_API_GETNUMBER(5), (float ) RING_API_GETNUMBER(6), (float ) RING_API_GETNUMBER(7), (int ) RING_API_GETNUMBER(8));
if (RING_API_ISCPOINTERNOTASSIGNED(2))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_draw_scaled_rotated_bitmap)
{
if ( RING_API_PARACOUNT != 9 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(6) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(7) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(8) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(9) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_draw_scaled_rotated_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"), (float ) RING_API_GETNUMBER(2), (float ) RING_API_GETNUMBER(3), (float ) RING_API_GETNUMBER(4), (float ) RING_API_GETNUMBER(5), (float ) RING_API_GETNUMBER(6), (float ) RING_API_GETNUMBER(7), (float ) RING_API_GETNUMBER(8), (int ) RING_API_GETNUMBER(9));
}
RING_FUNC(ring_al_draw_tinted_scaled_rotated_bitmap)
{
if ( RING_API_PARACOUNT != 10 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(6) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(7) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(8) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(9) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(10) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_draw_tinted_scaled_rotated_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"),* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(2,"ALLEGRO_COLOR"), (float ) RING_API_GETNUMBER(3), (float ) RING_API_GETNUMBER(4), (float ) RING_API_GETNUMBER(5), (float ) RING_API_GETNUMBER(6), (float ) RING_API_GETNUMBER(7), (float ) RING_API_GETNUMBER(8), (float ) RING_API_GETNUMBER(9), (int ) RING_API_GETNUMBER(10));
if (RING_API_ISCPOINTERNOTASSIGNED(2))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_draw_tinted_scaled_rotated_bitmap_region)
{
if ( RING_API_PARACOUNT != 14 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(7) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(8) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(9) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(10) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(11) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(12) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(13) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(14) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_draw_tinted_scaled_rotated_bitmap_region((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"), (float ) RING_API_GETNUMBER(2), (float ) RING_API_GETNUMBER(3), (float ) RING_API_GETNUMBER(4), (float ) RING_API_GETNUMBER(5),* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(6,"ALLEGRO_COLOR"), (float ) RING_API_GETNUMBER(7), (float ) RING_API_GETNUMBER(8), (float ) RING_API_GETNUMBER(9), (float ) RING_API_GETNUMBER(10), (float ) RING_API_GETNUMBER(11), (float ) RING_API_GETNUMBER(12), (float ) RING_API_GETNUMBER(13), (int ) RING_API_GETNUMBER(14));
if (RING_API_ISCPOINTERNOTASSIGNED(6))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(6,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_draw_scaled_bitmap)
{
if ( RING_API_PARACOUNT != 10 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(6) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(7) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(8) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(9) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(10) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_draw_scaled_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"), (float ) RING_API_GETNUMBER(2), (float ) RING_API_GETNUMBER(3), (float ) RING_API_GETNUMBER(4), (float ) RING_API_GETNUMBER(5), (float ) RING_API_GETNUMBER(6), (float ) RING_API_GETNUMBER(7), (float ) RING_API_GETNUMBER(8), (float ) RING_API_GETNUMBER(9), (int ) RING_API_GETNUMBER(10));
}
RING_FUNC(ring_al_draw_tinted_scaled_bitmap)
{
if ( RING_API_PARACOUNT != 11 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(6) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(7) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(8) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(9) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(10) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(11) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_draw_tinted_scaled_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"),* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(2,"ALLEGRO_COLOR"), (float ) RING_API_GETNUMBER(3), (float ) RING_API_GETNUMBER(4), (float ) RING_API_GETNUMBER(5), (float ) RING_API_GETNUMBER(6), (float ) RING_API_GETNUMBER(7), (float ) RING_API_GETNUMBER(8), (float ) RING_API_GETNUMBER(9), (float ) RING_API_GETNUMBER(10), (int ) RING_API_GETNUMBER(11));
if (RING_API_ISCPOINTERNOTASSIGNED(2))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_get_target_bitmap)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETCPOINTER(al_get_target_bitmap(),"ALLEGRO_BITMAP");
}
RING_FUNC(ring_al_put_pixel)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_put_pixel( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2),* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(3,"ALLEGRO_COLOR"));
if (RING_API_ISCPOINTERNOTASSIGNED(3))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_put_blended_pixel)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_put_blended_pixel( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2),* (ALLEGRO_COLOR *) RING_API_GETCPOINTER(3,"ALLEGRO_COLOR"));
if (RING_API_ISCPOINTERNOTASSIGNED(3))
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"ALLEGRO_COLOR"));
}
RING_FUNC(ring_al_set_target_bitmap)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_target_bitmap((ALLEGRO_BITMAP *) RING_API_GETCPOINTER(1,"ALLEGRO_BITMAP"));
}
RING_FUNC(ring_al_set_target_backbuffer)
{
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_target_backbuffer((ALLEGRO_DISPLAY *) RING_API_GETCPOINTER(1,"ALLEGRO_DISPLAY"));
}
RING_FUNC(ring_al_get_current_display)
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
RING_API_RETCPOINTER(al_get_current_display(),"ALLEGRO_DISPLAY");
}
RING_FUNC(ring_al_get_blender)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_get_blender(RING_API_GETINTPOINTER(1),RING_API_GETINTPOINTER(2),RING_API_GETINTPOINTER(3));
RING_API_ACCEPTINTVALUE(1) ;
RING_API_ACCEPTINTVALUE(2) ;
RING_API_ACCEPTINTVALUE(3) ;
}
RING_FUNC(ring_al_get_separate_blender)
{
if ( RING_API_PARACOUNT != 6 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(6) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_get_separate_blender(RING_API_GETINTPOINTER(1),RING_API_GETINTPOINTER(2),RING_API_GETINTPOINTER(3),RING_API_GETINTPOINTER(4),RING_API_GETINTPOINTER(5),RING_API_GETINTPOINTER(6));
RING_API_ACCEPTINTVALUE(1) ;
RING_API_ACCEPTINTVALUE(2) ;
RING_API_ACCEPTINTVALUE(3) ;
RING_API_ACCEPTINTVALUE(4) ;
RING_API_ACCEPTINTVALUE(5) ;
RING_API_ACCEPTINTVALUE(6) ;
}
RING_FUNC(ring_al_set_blender)
{
if ( RING_API_PARACOUNT != 3 ) {
RING_API_ERROR(RING_API_MISS3PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_blender( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3));
}
RING_FUNC(ring_al_set_separate_blender)
{
if ( RING_API_PARACOUNT != 6 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(5) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISNUMBER(6) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_set_separate_blender( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4), (int ) RING_API_GETNUMBER(5), (int ) RING_API_GETNUMBER(6));
}
RING_FUNC(ring_al_get_clipping_rectangle)
{
if ( RING_API_PARACOUNT != 4 ) {
RING_API_ERROR(RING_API_MISS4PARA);
return ;
}
if ( ! RING_API_ISSTRING(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(3) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(4) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
al_get_clipping_rectangle(RING_API_GETINTPOINTER(1),RING_API_GETINTPOINTER(2),RING_API_GETINTPOINTER(3),RING_API_GETINTPOINTER(4));
RING_API_ACCEPTINTVALUE(1) ;
RING_API_ACCEPTINTVALUE(2) ;
RING_API_ACCEPTINTVALUE(3) ;
RING_API_ACCEPTINTVALUE(4) ;
}
RING_FUNC(ring_al_set_clipping_rectangle)
{
if ( RING_API_PARACOUNT != 4 ) {
RING_API_ERROR(RING_API_MISS4PARA);
return ;
}