VgaGames2 ========= Thematical index of functions - Initalizing, window-, key- and mouse-functions (used to create and use a window and to process key- and mouse-input) see intro-window.html: understanding window and key vg_init_vgagames(): initialize VgaGames vg_window_open(): create window/switch to graphic-mode vg_window_flush(): flush out window to visible screen vg_window_close(): close window/restore text-mode vg_key_discard(): discard input from key and mouse vg_key_update(): get input from key and mouse vg_key_pressed(): check whether a key is pressed vg_mouse_found(): check whether a mouse is found vg_mouse_x(): return mouse x-position vg_mouse_y(): return mouse y-position vg_mouse_pressed(): check whether a mouse-button is pressed vg_mouse_speed(): set mouse-speed - color functions (used to modify your 256 colors) see intro-color.html: understanding colormap vg_load_colormap(): load a colormap vg_color_index(): return best color-index of predefined colorname vg_brightness(): change brightness of actual colormap - font and text functions (fonts are loaded by vg_bitmap_createfromtext() and vg_draw_text()) see intro-font.html: understanding fonts and text vg_font_width(): return font-width of given fontname vg_font_height(): return font-height of given fontname vg_get_textformat(): translate text - bitmap functions (bitmaps are the essential objects, your predefined pictures. The recommended format is VgaGames-format because of speedness. You can use the program "vgag-bitmap", shipped with this library, to convert windows-bitmap (.bmp) or PPM-fileformat into VgaGames-format and vice versa, or to show the colormap of a VgaGames-bitmap. Use the "netpbm" package (see sourceforge.net) to convert PPM into many other formats and vice versa. The window instead of a bitmap is represented by the "NULL"-bitmap. ) see intro-bitmap.html: understanding bitmaps vg_bitmap_createnew(): create an empty bitmap vg_bitmap_createfromfile(): load a bitmap from file vg_bitmap_createfromtext(): create a bitmap containing text vg_bitmap_duplicate(): duplicate a bitmap vg_bitmap_width(): return width of a bitmap vg_bitmap_height(): return height of a bitmap vg_bitmap_getpixel(): return color-index of a pixel of a bitmap vg_bitmap_clear(): clear a bitmap vg_bitmap_copyto(): copy a (part of a) bitmap into another one vg_bitmap_save(): save a bitmap into a file vg_bitmap_rotate(): rotate a bitmap vg_bitmap_zoom(): zoom a bitmap vg_bitmap_mirror(): mirror a bitmap vertically or horizontally vg_bitmap_overlap(): check whether two bitmaps overlap vg_bitmap_free(): destroy a bitmap - drawing functions (modify bitmaps or draw directly into the window) see intro-drawing.html: understanding drawing vg_draw_text(): draw a text vg_draw_pixel(): draw a pixel vg_draw_line(): draw a line vg_draw_box(): draw a (not) filled rectangle vg_draw_circle(): draw a circle vg_draw_fillout(): fill an area with a color - sprite functions (a sprite can be considered as an animated bitmap. It consists of a number of bitmaps each with a number of how many loops to exist. Sound is also possible. vg_sprite_getnext() returns these bitmaps in the right order. One bitmap lasting one or more loops, eventually with a sound, is called a sprite-element. ) see intro-sprite.html: understanding sprites vg_sprite_createnew(): create an empty sprite vg_sprite_createfromfile(): load a sprite from file vg_sprite_add(): add a sprite-element to a sprite vg_sprite_duplicate(): duplicate a sprite vg_sprite_rotate(): rotate a sprite vg_sprite_zoom(): zoom a sprite vg_sprite_mirror(): mirror a sprite vertically or horizontally vg_sprite_getnext(): return next sprite-bitmap vg_sprite_getcurrent(): return current sprite-bitmap vg_sprite_reset(): reset a sprite to the beginning vg_sprite_free(): destroy a sprite - film functions (a film is a sequence of pictures and sounds without your interaction, it can't be created on-the-fly, only loaded from file. ) see intro-film.html: understanding film vg_film_play(): load and play a film vg_film_position(): get exact position of a running film - sound functions (sound is played in the background, more than one are mixed together) see intro-sound.html: understanding sound vg_sound_startserver(): start sound-server vg_sound_endserver(): exit sound-server vg_sound_attach(): load a soundfile vg_sound_play(): play a loaded soundfile vg_sound_paus(): pause a playing soundfile vg_sound_cont(): continue a paused soundfile vg_sound_pate(): pause a soundfile when it ended vg_sound_catb(): continue an ended paused soundfile vg_sound_stop(): stop a playing soundfile vg_sound_gclr(): clear a soundfile-group vg_sound_gadd(): add a soundfile to a soundfile-group vg_sound_gdel(): delete a soundfile from a soundfile-group vg_sound_volm(): change volume vg_sound_volumename(): install volumename (for menu) - network functions (support for multiplayer) see intro-network.html: understanding network vg_nw_setplayer(): only master: set number vg_nw_startserver(): only master: start network-server vg_nw_connect(): only clients: connect to network-server vg_nw_waitforconnects(): wait for all other connects vg_nw_setvar(): define a network variable for player-data vg_nw_getvar(): return a network variable for player-data vg_nw_setcommon(): define a network variable for common-block vg_nw_getcommon(): return a network variable for common-block vg_nw_dumppacket(): debugging: dump network variables to stdout vg_nw_sendinit(): only master: send initial data vg_nw_recvinit(): only clients: receive initial data vg_nw_myplayer(): return number of own player vg_nw_maxplayer(): return number of players vg_nw_virtualplayer(): return number of beginning of virtual players vg_nw_isalive(): return whether a player is alive vg_nw_recvkeys(): only master: get keystrokes from client vg_nw_keypressed(): only master: check pressed keys of client vg_nw_mousepressed(): only master: check pressed mouse-buttons of client vg_nw_mousex(): only master: return mouse x-position of client vg_nw_mousey(): only master: return mouse y-position of client vg_nw_senddata(): only master: send data for a client vg_nw_sendcommon(): only master: send common-block vg_nw_setdead(): set player dead vg_nw_dumpsprite(): master: return dump of sprite vg_nw_undumpsprite(): clients: set sprite counter according to dump vg_nw_close(): close connection to network-server - miscellanous functions vg_wait_time(): wait rest of loop-time vg_menu_volume(): call a menu to set sound-volume vg_menu_language(): call a menu to set language vg_timestamp(): return actual time (min,sec,millisec) - compiling your game with VgaGames see intro-compile.html