Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

itofix(3alleg4) [opendarwin man page]

itofix(3alleg4) 						  Allegro manual						   itofix(3alleg4)

NAME
itofix - Converts an integer to fixed point. Allegro game programming library. SYNOPSIS
#include <allegro.h> fixed itofix(int x); DESCRIPTION
Converts an integer to fixed point. This is the same thing as x<<16. Remember that overflows (trying to convert an integer greater than 32767) and underflows (trying to convert an integer lesser than -32768) are not detected even in debug builds! The values simply "wrap around". Example: fixed number; /* This conversion is OK. */ number = itofix(100); ASSERT(fixtoi(number) == 100); number = itofix(64000); /* This check will fail in debug builds. */ ASSERT(fixtoi(number) == 64000); RETURN VALUE
Returns the value of the integer converted to fixed point ignoring overflows. SEE ALSO
fixtoi(3alleg4), ftofix(3alleg4), fixtof(3alleg4), ex12bit(3alleg4), ex3buf(3alleg4), ex3d(3alleg4), exblend(3alleg4), excustom(3alleg4), exfixed(3alleg4), exlights(3alleg4), exspline(3alleg4), exsprite(3alleg4), exstars(3alleg4) Allegro version 4.4.2 itofix(3alleg4)

Check Out this Related Man Page

ex3d(3alleg4)							  Allegro manual						     ex3d(3alleg4)

NAME
ex3d - 3d 'bouncy cubes' demo. Allegro game programming library. SYNOPSIS
#include <allegro.h> Example ex3d DESCRIPTION
This program demonstrates how to use the 3d matrix functions. It isn't a very elegant or efficient piece of code, but it does show the stuff in action. It is left to the reader as an exercise to design a proper model structure and rendering pipeline: after all, the best way to do that sort of stuff varies hugely from one game to another. The example first shows a screen resolution selection dialog. Then, a number of bouncing 3d cubes are animated. Pressing a key modifies the rendering of the cubes, which can be wireframe, the more complex transparent perspective correct texture mapped version, and many other. SEE ALSO
BITMAP(3alleg4), COLOR_MAP(3alleg4), END_OF_MAIN(3alleg4), MATRIX(3alleg4), PALETTE(3alleg4), POLYTYPE_ATEX(3alleg4), POLY- TYPE_ATEX_LIT(3alleg4), POLYTYPE_ATEX_MASK(3alleg4), POLYTYPE_ATEX_MASK_LIT(3alleg4), POLYTYPE_ATEX_MASK_TRANS(3alleg4), POLY- TYPE_ATEX_TRANS(3alleg4), POLYTYPE_FLAT(3alleg4), POLYTYPE_GCOL(3alleg4), POLYTYPE_GRGB(3alleg4), POLYTYPE_PTEX(3alleg4), POLY- TYPE_PTEX_LIT(3alleg4), POLYTYPE_PTEX_MASK(3alleg4), POLYTYPE_PTEX_MASK_LIT(3alleg4), POLYTYPE_PTEX_MASK_TRANS(3alleg4), POLY- TYPE_PTEX_TRANS(3alleg4), RGB(3alleg4), RGB_MAP(3alleg4), SCREEN_H(3alleg4), SCREEN_W(3alleg4), V3D(3alleg4), allegro_error(3alleg4), alle- gro_exit(3alleg4), allegro_init(3alleg4), allegro_message(3alleg4), apply_matrix(3alleg4), bitmap_color_depth(3alleg4), bit- map_mask_color(3alleg4), blit(3alleg4), clear_bitmap(3alleg4), clear_to_color(3alleg4), color_map(3alleg4), create_bitmap(3alleg4), cre- ate_light_table(3alleg4), create_rgb_table(3alleg4), create_trans_table(3alleg4), desktop_palette(3alleg4), destroy_bitmap(3alleg4), fixed(3alleg4), fixtoi(3alleg4), font(3alleg4), get_transformation_matrix(3alleg4), gfx_mode_select_ex(3alleg4), install_keyboard(3alleg4), install_mouse(3alleg4), install_timer(3alleg4), itofix(3alleg4), key(3alleg4), keypressed(3alleg4), line(3alleg4), palette_color(3alleg4), persp_project(3alleg4), polygon_z_normal(3alleg4), quad3d(3alleg4), readkey(3alleg4), rect(3alleg4), retrace_count(3alleg4), rgb_map(3alleg4), screen(3alleg4), set_color_depth(3alleg4), set_gfx_mode(3alleg4), set_palette(3alleg4), set_projection_viewport(3alleg4), set_trans_blender(3alleg4), textout_ex(3alleg4), textprintf_ex(3alleg4), vsync(3alleg4) Allegro version 4.4.2 ex3d(3alleg4)
Man Page