Miscellaneous functions
Functions for other useful staff.
- Structures and Enumerations
- Error functions
Set and get error messages. - VG3_seterror()
Set an errno-value and an error text. - VG3_error()
Return last error text. - VG3_errmsg()
Return last errno-value and error text. - Various functions
- VG3_version()
Return version of VgaGames3. - VG3_wait_time()
Called once a game-loop, wait until the loop consumed a defined time. - VG3_pause()
Pause the game (if no network-game). - VG3_get_xy_direction_from_angle()
Return x-/y-directions of a given angle. - VG3_get_angle_from_xy_direction()
Return the angle of given x-/y-directions. - VG3_uint_of_buffer()
Calculate a number of an arbitrary byte-buffer using the Horner's scheme. - VG3_time_delta()
Return the time-difference in milliseconds since last call. - Color- and brightness functions
- VG3_color_brightness()
Return a color of reduced or enlightened brightness. - VG3_colordef_colorize_to()
Return a window-attributes setting value for colorizing the window. - VG3_colordef_colorize_from()
Return colorname, colordepth and brightness-overdriving from a window-attributes setting value for colorizing the window. - Complexer handling with text and input
- VG3_utf8_to_iso()
Convert a UTF-8 text into a ISO-8859-1 text (to use fontfiles). - VG3_draw_textline()
Draw a line of text at current position and update position for drawing next line. - VG3_input_box()
Show an input-box for entering a textline. - VG3_input_select()
Show a menu-box for selecting an element. - VG3_input_image_select()
Show a set of images for selecting an element. - VG3_output_text()
Show a box containing text. - VG3_text_simpledraw()
Draw simplified a text onto an image or the window. - VG3_text_with_images()
Create an image containing text and images. - Simplifying key-handling with System-menu (and networking)
- VG3_keys_new()
Return an initialized empty keys-struct. - VG3_keys_free()
Destroy the keys-struct. - VG3_keys_menu_insert()
Insert an entry into keyboard-menu and gamecontroller-/joystick-menu
of the system-menu for all found devices and respect individual saved values. - VG3_keys_nw_addkeys()
Add all keys from the system-menu for a given device into the network structure,
defining them as network-keys. - VG3_keys_key_ispressed()
Check if a specific key from the system-menu is pressed,
and for a specific client if using network. - Calculating image positions
- VG3_correct_imageposition()
Adjust rectangle of a resized image for being drawn onto the same position. - VG3_line_positions()
Set an array with positions on a line between a start- and end-position. - VG3_init_windowpos_on_bgimage()
Drawing a section of the background-image which is larger than the window:
Initialize the positioning structure. - VG3_get_windowpos_on_bgimage()
Drawing a section of the background-image which is larger than the window:
Return delta x-/y-coordinates which have to be added when drawing the background-image. - Object moving and collision detecting function
- VG3_move_object_check_collision()
Function to simplify moving an instance of a VgaGames3-object and checking for collisions.