set_xres

Prototypes:
Arguments:
Returns:
Description:

This function changes the horizontal resolution. The 'xres' argument sets the new resolution in pixels. This changes the video controller's registers to display more pixels on the screen, and it does not affect virtual calculations.

color_correct_flag indicates what kind of smoothing must be used, XRES_SHARP or XRES_SOFT. XRES_SHARP is the default.

Complete Example:

#include "huc.h"

main()
{
  set_xres(512); /* set a new horizontal resolution of 512 pixels */
  set_color(1, 511); /* set color 1 to pure white */
  set_font_color(1, 0); /* set the font color */
  set_font_pal(0); /* set the font palette */
  load_default_font(); /* load the default font */

  put_string("512 pixel mode! woohoo!", 0, 0); /* print a message on the screen */
}

Sample Output:



Notes:

The 5MHz dot clock will be used up to horizontal resolutions of 268. 7 MHz dot clock will be used up to 356. 10MHz dot clock will be used beyond this. Maximum visible resolution seems to be about 512.

The first form of this function was introduced in version 1.5. The second form was introduced in version 3.11.

Unless you specifically need to set XRES_SOFT, use the first form of the function.

See Also:

HuC header file