BITMAP ENABLE BITMAP ENABLE (colors) BITMAP ENABLE (width, height) BITMAP ENABLE (width, height, colors)
The BITMAP ENABLE' command is a fundamental tool, since it allows to
configure the graphics mode of the screen, that is, to define how data
was displayed on the screen, determining aspects such as the number of
horizontal and vertical pixels that make up the image on the screen, and
the color palette available for drawing images.
In 8-bit computers, memory was limited and processing power was much
lower than modern computers. The
BITMAP ENABLE allows you to optimize
the use of resources by choosing the graphics mode best suited to the
needs of the program and, at the same time, to generalize if the
program must be ported on other hardware.
Given the great variety of hardware that ugBASIC supports and the
isomorphic approach adopted, this commands can be used to require a
specific resolution, color depth and other characteristics in a
hardware independent way.
In this regard, the following approach has been adopted. It is possible
to ask for specific chacteristics, such as height and width of the
screen. However ugBASIC will choose the closest resolution, based
on the hardware on which it will runs.
Likewise, if no type of resolution constraint is set, the best is offered.
To change resolution and colors, you can use the
([width],[height],[colors]),
([width],[height]) or the
([colors]) syntax after
BITMAP ENABLE command.
So, if you omit a parameters, it means thatit is not important to set.
==== EXAMPLE ====
BITMAP ENABLE
BITMAP ENABLE (320,200,16)
BITMAP ENABLE (160,200,2)
See also the following example files:
*
screens_resolution_01.bas''
BmEn
If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please open an issue for this keyword on GitHub. Thank you!