Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

load_datafile_callback(3alleg4) [debian man page]

load_datafile_callback(3alleg4) 				  Allegro manual				   load_datafile_callback(3alleg4)

NAME
load_datafile_callback - Loads a datafile into memory, calling a hook per object. Allegro game programming library. SYNOPSIS
#include <allegro.h> DATAFILE *load_datafile_callback(const char *filename, void (*callback)(DATAFILE *d)); DESCRIPTION
Loads a datafile into memory, calling the specified hook function once for each object in the file, passing it a pointer to the object just read. You can use this to implement very simple loading screens where every time the hook is called, the screen is updated to let the user know your program is still loading from disk: void load_callback(DATAFILE *dat_obj) { static const char indicator[] = "-\|/-.oOXOo."; static int current = 0; /* Show a different character every time. */ textprintf_ex(screen, font, 0, 0, makecol(0, 0, 0), makecol(255, 255, 255), "%c Loading %c", indicator[current], indicator[current]); /* Increase index and check if we need to reset it. */ current++; if (!indicator[current]) current = 0; } ... dat = load_datafile_callback("data.dat", load_callback); RETURN VALUE
Returns a pointer to the DATAFILE or NULL on error. Remember to free this DATAFILE later to avoid memory leaks. SEE ALSO
load_datafile(3alleg4), unload_datafile(3alleg4), load_datafile_object(3alleg4), set_color_conversion(3alleg4), fixup_datafile(3alleg4), packfile_password(3alleg4), find_datafile_object(3alleg4), register_datafile_object(3alleg4) Allegro version 4.4.2 load_datafile_callback(3alleg4)

Check Out this Related Man Page

exmouse(3alleg4)                                                  Allegro manual                                                  exmouse(3alleg4)

NAME
exmouse - Getting input from the mouse. Allegro game programming library. SYNOPSIS
#include <allegro.h> Example exmouse DESCRIPTION
This program demonstrates how to get mouse input. The first part of the test retrieves the raw mouse input data and displays it on the screen without using any mouse cursor. When you press a key the standard arrow-like mouse cursor appears. You are not restricted to this shape, and a second key press modifies the cursor to be several concentric colored circles. They are not joined together, so you can still see bits of what's behind when you move the cursor over the printed text message. SEE ALSO
BITMAP(3alleg4), END_OF_MAIN(3alleg4), SCREEN_H(3alleg4), SCREEN_W(3alleg4), acquire_screen(3alleg4), allegro_error(3alleg4), alle- gro_init(3alleg4), allegro_message(3alleg4), bitmap_mask_color(3alleg4), circle(3alleg4), clear_keybuf(3alleg4), clear_to_color(3alleg4), create_bitmap(3alleg4), desktop_palette(3alleg4), destroy_bitmap(3alleg4), font(3alleg4), get_mouse_mickeys(3alleg4), install_key- board(3alleg4), install_mouse(3alleg4), install_timer(3alleg4), key(3alleg4), keypressed(3alleg4), makecol(3alleg4), mouse_b(3alleg4), mouse_w(3alleg4), mouse_x(3alleg4), mouse_y(3alleg4), mouse_z(3alleg4), palette_color(3alleg4), poll_mouse(3alleg4), readkey(3alleg4), release_screen(3alleg4), screen(3alleg4), set_gfx_mode(3alleg4), set_mouse_sprite(3alleg4), set_mouse_sprite_focus(3alleg4), set_pal- ette(3alleg4), show_mouse(3alleg4), textout_centre_ex(3alleg4), textout_ex(3alleg4), textprintf_centre_ex(3alleg4), textprintf_ex(3alleg4), textprintf_right_ex(3alleg4), vsync(3alleg4) Allegro version 4.4.2 exmouse(3alleg4)
Man Page