diff --git a/DoxygenLayout.xml b/DoxygenLayout.xml
new file mode 100644
index 0000000..804bff9
--- /dev/null
+++ b/DoxygenLayout.xml
@@ -0,0 +1,226 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doxygen.cfg b/doxygen.cfg
index c87012c..2d4f8f1 100644
--- a/doxygen.cfg
+++ b/doxygen.cfg
@@ -275,7 +275,7 @@ TCL_SUBST =
# members will be omitted, etc.
# The default value is: NO.
-OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_FOR_C = YES
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
# Python sources only. Doxygen will then generate output that is more tailored
diff --git a/src/picovga.h b/src/picovga.h
index a7e37ac..0e0d996 100644
--- a/src/picovga.h
+++ b/src/picovga.h
@@ -12,8 +12,8 @@
#ifndef _PICOVGA_H
#define _PICOVGA_H
-//!@addtogroup VideoInit Video Initialization
-//!@addtogroup VideoMode Video mode configuration
+//!@addtogroup VideoInit Video/Library Initialization
+//!@addtogroup VideoMode Configurating Video Mode
//!@addtogroup Screen Screen layout
typedef signed char s8;
diff --git a/src/vga.h b/src/vga.h
index e8109a2..2812827 100644
--- a/src/vga.h
+++ b/src/vga.h
@@ -114,9 +114,10 @@ void ScanlineTypePrint(const u8* scan, int lines);
// - All layer modes must use same layer program (LAYERMODE_BASE = overlapped layers are OFF)
void VgaInit(const sVmode* vmode); //, u8 layer1mode=LAYERMODE_BASE, u8 layer2mode=LAYERMODE_BASE, u8 layer3mode=LAYERMODE_BASE);
-//!@addtogroup VideoInit Video Initialization
-//!@brief Functions for initialzing the library
-//!@{
+//! @addtogroup VideoInit
+//! @brief Functions for initialzing the library
+//! @details The video mode can be initialized either simply by the Video() function or in more detail by the following functions.
+//! @{
/**
* @brief Start the VGA processing on core1
@@ -126,25 +127,25 @@ void StartVgaCore();
/**
* @brief Request to initialize VGA videomode
- * @details This function passes the library a pointer to the format descriptor generated by the VgaCfg function.
+ * @details This function passes the library a pointer to the format descriptor generated by the VgaCfg() function.
* This function does not actually initialize the video mode, it just passes the pointer to the library in the 2nd
* processor core and then waits for confirmation that the initialization is complete. If the video mode needs to
* be changed (this refers to changing the timing of the video signal and changing the type of overlay layers), it
* is necessary to first stop the video generation by calling the VgaInitReq function with the NULL parameter, and
* only then call the function with the new video mode setting.
- * @param vmode Video format description generated by VgaCfg or NULL to stop driver.
+ * @param vmode Video format description generated by VgaCfg() or NULL to stop driver.
*/
void VgaInitReq(const sVmode* vmode);
-//!@}
+//! @}
-//!@addtogroup Core Second core
-//!@brief Execute functions on the second core
-//!@details If the 2nd core is not too busy generating the video, it can be passed a request to perform the function.
+//! @addtogroup Core Second core
+//! @brief Execute functions on the second core
+//! @details If the 2nd core is not too busy generating the video, it can be passed a request to perform the function.
//! This does not affect the video generation, it may just happen that the requested function runs slowly when the
//! generator is heavily loaded. The function cannot use interrupts, cannot disable interrupts, and may be restricted
//! from using the hardware interpolator (video interrupt does not save its state).
-//!@{
+//! @{
/**
* @brief Execute remote function on second core
diff --git a/src/vga_screen.h b/src/vga_screen.h
index b3b6d00..cff0d5e 100644
--- a/src/vga_screen.h
+++ b/src/vga_screen.h
@@ -8,7 +8,7 @@
#ifndef _VGA_SCREEN_H
#define _VGA_SCREEN_H
-//!@addtogroup Screen Screen layout
+//!@addtogroup Screen
//!@brief Defining the layout of the display
//!@details When displaying screen image, the default pointer is pScreen for the library. It points to the sScreen structure that
//!describes the contents of the display. The Raspberry Pico has a limited RAM size and cannot accommodate a high resolution image. Therefore, the image must be composed of smaller segments to minimize the memory-intensive parts.
@@ -124,7 +124,7 @@ void ScreenSegmGraph8(sSegm* segm, const void* data, int wb);
/**
* @brief Generate 16-color palette translation table
- * @details Generates a palette translation table for the @link ScreenSegmGraph4() function. The translation table is 256 entries of
+ * @details Generates a palette translation table for the ScreenSegmGraph4() function. The translation table is 256 entries of
* 16 bits, so it takes 512 bytes in memory. The table is used during display for internal purposes, must be aligned to 4 bytes,
* and must be available for the entire time the segment is displayed. The input to the function is the palette table, which is
* 16 color entries of 1 byte.
@@ -147,7 +147,7 @@ void ScreenSegmGraph4(sSegm* segm, const void* data, const void* trans, int wb);
/**
* @brief Generate palette 4 translation table for function
- * @details Generate a palette translation table for the @link ScreenSegmGraph2() function. The translation table is 256 entries with
+ * @details Generate a palette translation table for the ScreenSegmGraph2() function. The translation table is 256 entries with
* a size of 32 bits, so it takes 1024 bytes in memory. The table is used during display for internal purposes, must be aligned
* to 4 bytes, and must be available for the entire time the segment is displayed. The input to the function is the palette table,
* which is 4 color entries of 1 byte.
@@ -290,7 +290,7 @@ void ScreenSegmTile(sSegm* segm, const void* data, const void* tiles, int w, int
/**
* @brief Set video segment to alternate tiles
- * @details Tiles in a row (GF_TILE2). This function is an alternative to @link ScreenSegmTile(), except that the tile patterns
+ * @details Tiles in a row (GF_TILE2). This function is an alternative to ScreenSegmTile(), except that the tile patterns
* are arranged in a single row in the image. This may be more convenient when creating a tile image, however, you must
* additionally specify the parameter 'tilewb' representing the line length of the tile image.
* Usually tilewb = number of tiles * tile width.
@@ -360,8 +360,8 @@ void ScreenSegmOscil(sSegm* segm, const void* data, u8 bg, u8 fg, int pixh);
void ScreenSegmOscLine(sSegm* segm, const void* data, u8 bg, u8 fg);
/**
- * @brief Generate palette 4-color translation table for function @link ScreenSegmPlane2()
- * @details Generate a palette translation table for the @link ScreenSegmPlane2() function. The translation table is 256 entries of
+ * @brief Generate palette 4-color translation table for function ScreenSegmPlane2()
+ * @details Generate a palette translation table for the ScreenSegmPlane2() function. The translation table is 256 entries of
* 32 bits, so it takes 1024 bytes in memory. The table is used during display for internal purposes, must be aligned to 4 bytes,
* and must be available for the entire time the segment is displayed. The input to the function is the palette table, which is
* 4 color entries of 1 byte. Although there is no program in the PicoVGA library utilities that prepares an image in 2-plane
@@ -372,102 +372,177 @@ void ScreenSegmOscLine(sSegm* segm, const void* data, u8 bg, u8 fg);
*/
void GenPal4Plane(u32* trans, const u8* pal);
-// set video segment to 4-color on 2-planes graphics
-// data = pointer to data buffer
-// plane = offset of 2nd graphics plane (in bytes), size of one graphics plane
-// trans = pointer to 4-color palette translation table (generated with GenPal4Plane function)
-// wb = pitch - number of bytes between lines
-// To scroll image, set virtual dimension wrapx and wrapy, then shift offx and offy.
+/**
+ * @brief Set video segment to 4-color on 2-planes graphics
+ * @details 2-bit palette graphics 4 colors in 2 planes (GF_PLANE2). The mode is functionally similar to the 2-bit color
+ * graphics mode, but the individual pixel bits are stored in 2 separate color planes. This mode is similar to the CGA
+ * graphics mode of PC computers. The individual planes correspond to two separate monochrome graphics modes. Each byte
+ * of the plane contains 8 pixels (the first pixel in the highest bit). The parameter 'plane' is the relative offset of
+ * the second plane from the first plane, given by the parameter 'data'. The function requires a palette translation table,
+ * which is generated by the GenPal4Plane() function.
+ * @note To scroll image, set virtual dimension wrapx and wrapy, then shift offx and offy.
+ * @param segm Segment to configure
+ * @param data Pointer to data buffer
+ * @param plane Offset of 2nd graphics plane (in bytes), size of one graphics plane
+ * @param trans Pointer to 4-color palette translation table (generated with GenPal4Plane function)
+ * @param wb Number of bytes between lines
+*/
void ScreenSegmPlane2(sSegm* segm, const void* data, int plane, const void* trans, int wb);
-// set video segment to 2x4 bit color attribute per 8x8 pixel sample graphics
-// data = pointer to data buffer with mono pixels
-// attr = pointer to color attributes
-// pal = pointer to 16-color palette table
-// wb = pitch - number of bytes between lines
-// To scroll image, set virtual dimension wrapx and wrapy, then shift offx and offy.
+/**
+ * @brief Set video segment to 2x4 bit color attribute per 8x8 pixel sample graphics
+ * @details Graphical mode with attributes (GF_ATTRIB8). This mode is known from ZX Spectrum computers. The 'data' parameter
+ * is a pointer to the pixel data. This corresponds to the monochrome display mode, where each bit distinguishes whether
+ * foreground or background color is used. The 'attr' parameter is a pointer to an array of color attributes. The color
+ * attribute is a byte, where the lower 4 bits represent the foreground color and the upper 4 bits the background color.
+ * The attribute is converted to a colored pixel using the palette table 'pal', which is an array of 16 bytes of colors.
+ * Each attribute specifies the foreground and background colors for a group of 8 x 8 pixels. Thus, for every 8 bytes of pixels,
+ * there is 1 byte of color attributes. The 'wb' parameter here specifies the line width in bytes for both the pixel array and
+ * the attribute array. The difference is that the address in the attributes array is not incremented after each line, but after
+ * 8 lines.
+ * Although there is no program in the PicoVGA library utilities that prepares an image in attribute mode, there is an internal
+ * function Attr8Conv that converts an image in 16 colors to attribute mode. Thus, the image is attached to the program as a
+ * 16-color image, and the conversion function is used to prepare a copy in RAM.
+ * @note To scroll image, set virtual dimension wrapx and wrapy, then shift offx and offy.
+ * @param segm Segment to configure
+ * @param data Pointer to data buffer with mono pixels
+ * @param attr Pointer to color attributes
+ * @param pal Pointer to 16-color palette table
+ * @param wb Number of bytes between lines
+*/
void ScreenSegmAttrib8(sSegm* segm, const void* data, const void* attr, const u8* pal, int wb);
-// set video segment to horizontal progress indicator GF_PROGRESS
-// data = pointer to buffer with values 0..255 of 4-pixels in rows
-// sample1 = scanline sample < data
-// sample2 = scanline sample >= data
+/**
+ * @brief Set video segment to horizontal progress indicator GF_PROGRESS
+ * @details Progress indicator (GF_PROGRESS). Progress indicator is a horizontal indicator. The parameter 'data' is an array of
+ * bytes of length corresponding to the height of the segment. The byte value indicates the line length in multiples of 4 pixels.
+ * Thus, a value of 0 to 255 represents an indicator length of 0 to 1020 pixels. For the first part of the indicator (< data)
+ * the colour gradient 'sample1' is displayed, for the second part (>= data) 'sample2' is displayed.
+ * @param segm Segment to configure
+ * @param data Pointer to buffer with values 0..255 of 4-pixels in rows
+ * @param sample1 Scanline sample < data
+ * @param sample2 Scanline sample >= data
+*/
void ScreenSegmProgress(sSegm* segm, const void* data, const void* sample1, const void* sample2);
-// set video segment to 8-bit graphics with 2D matrix transformation
-// data = pointer to image data (width and height of image must be power of 2)
-// mat = pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
-// xbits = number of bits of image width (image width must be power of 2 and must be = pitch width bytes)
-// ybits = number of bits of image height (image height must be power of 2)
-// Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+/**
+ * @brief Set video segment to 8-bit graphics with 2D matrix transformation
+ * @details 8-bit graphics with 2D matrix transformation. This segment displays an 8-bit image with transformations - rotate,
+ * scale, skew and shift. The image must have width and height as a power of 2. The width and height of the image are specified
+ * using the xbits and ybits parameters as the number of bits of the dimension. For example, for a 512 x 256 pixel image,
+ * xbits = 9, ybits = 8. The 'mat' parameter is a pointer to an array of 6 integer transformation matrix parameters - see the
+ * Transformation matrix section. The segment does not support parameters for image shifting and wrapping, they must be left at
+ * default values.
+ * @note Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+ * @param segm Segment to configure
+ * @param data Pointer to image data (width and height of image must be power of 2)
+ * @param mat Pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
+ * @param xbits Number of bits of image width (image width must be power of 2 and must be = pitch width bytes)
+ * @param ybits Number of bits of image height (image height must be power of 2)
+*/
void ScreenSegmGraph8Mat(sSegm* segm, const void* data, const int* mat, u16 xbits, u16 ybits);
-// set video segment to 8-bit graphics with perspective projection
-// data = pointer to image data (width and height of image must be power of 2)
-// mat = pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
-// xbits = number of bits of image width (image width must be power of 2 and must be = pitch width bytes)
-// ybits = number of bits of image height (image height must be power of 2)
-// horiz = horizon offset
-// Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+/**
+ * @brief Set video segment to 8-bit graphics with perspective projection
+ * @note Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+ * @param segm Segment to configure
+ * @param data Pointer to image data (width and height of image must be power of 2)
+ * @param mat Pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
+ * @param xbits Number of bits of image width (image width must be power of 2 and must be = pitch width bytes)
+ * @param ybits Number of bits of image height (image height must be power of 2)
+ * @param horiz Horizon offset
+*/
void ScreenSegmGraph8Persp(sSegm* segm, const void* data, const int* mat, u16 xbits, u16 ybits, u16 horiz);
-// set video segment to tiles with perspective
-// map = pointer to tile map with tile indices (width and height must be power of 2)
-// tiles = pointer to 1 column of square tiles, 1 pixel = 8 bits (width and height must be power of 2)
-// mat = pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
-// mapwbits = number of bits of tile map width
-// maphbits = number of bits of tile map height
-// tilebits = number of bits of tile width and height
-// horizon = horizon offset/4 (0=do not use perspective projection, <0=vertical flip to display ceiling)
-// Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+/**
+ * @brief Set video segment to tiles with perspective
+ * @details Tile graphics with 3D perspective. Similar to the previous function, it is used to display terrain with 3D projection.
+ * It uses tile definition instead of 8-bit graphics. This allows the display of very large terrains. The 'map' parameter is a
+ * pointer to a map of tiles - tile indices 0 to 255. The width and height of the map must be powers of 2 and are specified as the
+ * number of mapwbits and maphbits. Tiles must have a square dimension, which must also be a power of 2. The tile dimension is
+ * specified by the tilebits parameter as the number of dimension bits. The 'tiles' parameter is a pointer to an image with a
+ * pattern of tiles arranged in 1 column of tiles. The 'horizon' parameter specifies the horizon offset over the segment boundary
+ * / 4. A positive number represents the horizon offset, a negative number will invert the perspective (can be used to display
+ * the sky). A zero value turns off the perspective - in this case the function is similar to the function for displaying an image
+ * with a transformation matrix (the array of tiles can be rotated, skewed, etc).
+ * @note Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+ * @param segm Segment to configure
+ * @param map Pointer to tile map with tile indices (width and height must be power of 2)
+ * @param tiles Pointer to 1 column of square tiles, 1 pixel = 8 bits (width and height must be power of 2)
+ * @param mat Pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
+ * @param mapwbits Number of bits of tile map width
+ * @param maphbits Number of bits of tile map height
+ * @param tilebits Number of bits of tile width and height
+ * @param horizon Horizon offset/4 (0=do not use perspective projection, <0=vertical flip to display ceiling)
+*/
void ScreenSegmTilePersp(sSegm* segm, const u8* map, const u8* tiles, const int* mat,
u8 mapwbits, u8 maphbits, u8 tilebits, s8 horizon);
-// set video segment to tiles with perspective, 1.5 pixels
-// map = pointer to tile map with tile indices (width and height must be power of 2)
-// tiles = pointer to 1 column of square tiles, 1 pixel = 8 bits (width and height must be power of 2)
-// mat = pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
-// mapwbits = number of bits of tile map width
-// maphbits = number of bits of tile map height
-// tilebits = number of bits of tile width and height
-// horizon = horizon offset/4 (0=do not use perspective projection, <0=vertical flip to display ceiling)
-// Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+/**
+ * @brief Set video segment to tiles with perspective, 1.5 pixels
+ * @details Similar to ScreenSegmTilePersp(), but the pixels are rendered 1.5 pixels wide. This function can be used if
+ * the previous function does not keep up with the rendering speed.
+ * @note Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+ * @param segm Segment to configure
+ * @param map Pointer to tile map with tile indices (width and height must be power of 2)
+ * @param tiles Pointer to 1 column of square tiles, 1 pixel = 8 bits (width and height must be power of 2)
+ * @param mat Pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
+ * @param mapwbits Number of bits of tile map width
+ * @param maphbits Number of bits of tile map height
+ * @param tilebits Number of bits of tile width and height
+ * @param horizon Horizon offset/4 (0=do not use perspective projection, <0=vertical flip to display ceiling)
+*/
void ScreenSegmTilePersp15(sSegm* segm, const u8* map, const u8* tiles, const int* mat,
u8 mapwbits, u8 maphbits, u8 tilebits, s8 horizon);
-// set video segment to tiles with perspective, double pixels
-// map = pointer to tile map with tile indices (width and height must be power of 2)
-// tiles = pointer to 1 column of square tiles, 1 pixel = 8 bits (width and height must be power of 2)
-// mat = pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
-// mapwbits = number of bits of tile map width
-// maphbits = number of bits of tile map height
-// tilebits = number of bits of tile width and height
-// horizon = horizon offset/4 (0=do not use perspective projection, <0=vertical flip to display ceiling)
-// Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+/**
+ * @brief Set video segment to tiles with perspective, double pixels
+ * @details Similar to ScreenSegmTilePersp(), but the pixels are rendered 2 pixels wide. This function can be used if
+ * the previous function does not keep up with the rendering speed.
+ * @note Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+ * @param segm Segment to configure
+ * @param map Pointer to tile map with tile indices (width and height must be power of 2)
+ * @param tiles Pointer to 1 column of square tiles, 1 pixel = 8 bits (width and height must be power of 2)
+ * @param mat Pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
+ * @param mapwbits Number of bits of tile map width
+ * @param maphbits Number of bits of tile map height
+ * @param tilebits Number of bits of tile width and height
+ * @param horizon Horizon offset/4 (0=do not use perspective projection, <0=vertical flip to display ceiling)
+*/
void ScreenSegmTilePersp2(sSegm* segm, const u8* map, const u8* tiles, const int* mat,
u8 mapwbits, u8 maphbits, u8 tilebits, s8 horizon);
-// set video segment to tiles with perspective, triple pixels
-// map = pointer to tile map with tile indices (width and height must be power of 2)
-// tiles = pointer to 1 column of square tiles, 1 pixel = 8 bits (width and height must be power of 2)
-// mat = pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
-// mapwbits = number of bits of tile map width
-// maphbits = number of bits of tile map height
-// tilebits = number of bits of tile width and height
-// horizon = horizon offset/4 (0=do not use perspective projection, <0=vertical flip to display ceiling)
-// Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+/**
+ * @brief Set video segment to tiles with perspective, triple pixels
+ * @details Similar to ScreenSegmTilePersp(), but the pixels are rendered 3 pixels wide. This function can be used if
+ * the previous function does not keep up with the rendering speed.
+ * @note Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+ * @param segm Segment to configure
+ * @param map Pointer to tile map with tile indices (width and height must be power of 2)
+ * @param tiles Pointer to 1 column of square tiles, 1 pixel = 8 bits (width and height must be power of 2)
+ * @param mat Pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
+ * @param mapwbits Number of bits of tile map width
+ * @param maphbits Number of bits of tile map height
+ * @param tilebits Number of bits of tile width and height
+ * @param horizon Horizon offset/4 (0=do not use perspective projection, <0=vertical flip to display ceiling)
+*/
void ScreenSegmTilePersp3(sSegm* segm, const u8* map, const u8* tiles, const int* mat,
u8 mapwbits, u8 maphbits, u8 tilebits, s8 horizon);
-// set video segment to tiles with perspective, quadruple pixels
-// map = pointer to tile map with tile indices (width and height must be power of 2)
-// tiles = pointer to 1 column of square tiles, 1 pixel = 8 bits (width and height must be power of 2)
-// mat = pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
-// mapwbits = number of bits of tile map width
-// maphbits = number of bits of tile map height
-// tilebits = number of bits of tile width and height
-// horizon = horizon offset/4 (0=do not use perspective projection, <0=vertical flip to display ceiling)
-// Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+/**
+ * @brief Set video segment to tiles with perspective, quadruple pixels
+ * @details Similar to ScreenSegmTilePersp(), but the pixels are rendered 4 pixels wide. This function can be used if
+ * the previous function does not keep up with the rendering speed.
+ * @note Use default settings of parameters: offx = 0, offy = 0, wrapx = segment width, wrapy = segment height
+ * @param segm Segment to configure
+ * @param map Pointer to tile map with tile indices (width and height must be power of 2)
+ * @param tiles Pointer to 1 column of square tiles, 1 pixel = 8 bits (width and height must be power of 2)
+ * @param mat Pointer to array of 6 matrix integer parameters m11, m12...m23 (exported with ExportInt function)
+ * @param mapwbits Number of bits of tile map width
+ * @param maphbits Number of bits of tile map height
+ * @param tilebits Number of bits of tile width and height
+ * @param horizon Horizon offset/4 (0=do not use perspective projection, <0=vertical flip to display ceiling)
+*/
void ScreenSegmTilePersp4(sSegm* segm, const u8* map, const u8* tiles, const int* mat,
u8 mapwbits, u8 maphbits, u8 tilebits, s8 horizon);
diff --git a/src/vga_vmode.h b/src/vga_vmode.h
index 364a731..7151ad4 100644
--- a/src/vga_vmode.h
+++ b/src/vga_vmode.h
@@ -8,10 +8,20 @@
#ifndef _VGA_VMODE_H
#define _VGA_VMODE_H
-//!@addtogroup VideoMode Video mode configuration
-//!@brief Structures and functions for video modes
-//!@details The video mode can be initialized either simply by the Video function or in more detail by the other functions.
-//!@{
+//! @addtogroup VideoMode
+//! @brief Structures and functions for configuring video modes
+//! @details The sVgaCfg structure contains the required properties of the video mode: the display resolution,
+//! the minimum processor frequency and the timing of the sVideo signal, possibly also the required overlay mode.
+//! You can first call the VgaCfgDef() function, which presets the structure to the default parameters. The VgaCfg()
+//! function prepares the sVmode descriptor structure, which is later passed to the VgaInitReq() function.
+//! At this point no operations are taking place only the necessary settings are being calculated. After the calculation,
+//! some items of the sVmode structure can be adjusted. In the library there are global structures Cfg and Vmode that can
+//! be used for the function. The required screen resolution and signal timing are two independent properties.
+//! For timing, you are limited only by the number of video lines of the image, but otherwise you can set any screen resolution
+//! within them. For example, for PAL and NTSC video, you can set a VGA video resolution. To make the program versatile so that
+//! it can be run on both a VGA monitor and a TV, use a VGA resolution of 640x480 or 320x240 (or 512x400 and 256x192, due to RAM
+//! limitations). When changing the display, just select VGA/PAL or NTSC timing, the resolution does not change for the program.
+//! @{
#define VIDEO_NAME_LEN 5 //!< length of video timing name
@@ -232,22 +242,16 @@ void VgaPrintCfg(const sVmode* vmode);
/**
* @brief Calculate the structure for setting up the video mode.
- * @details The sVgaCfg structure contains the required properties of the video mode: the display resolution,
- * the minimum processor frequency and the timing of the sVideo signal, possibly also the required overlay mode.
- * You can first call the VgaCfgDef function, which presets the structure to the default parameters. The VgaCfg
- * function prepares the sVmode descriptor structure, which is later passed to the init function.
- * At this point no operations are taking place only the necessary settings are being calculated. After the calculation,
- * some items of the sVmode structure can be adjusted. In the library there are global structures Cfg and Vmode that can
- * be used for the function. The required screen resolution and signal timing are two independent properties.
- * For timing, you are limited only by the number of video lines of the image, but otherwise you can set any screen resolution
- * within them. For example, for PAL and NTSC video, you can set a VGA video resolution. To make the program versatile so that
- * it can be run on both a VGA monitor and a TV, use a VGA resolution of 640x480 or 320x240 (or 512x400 and 256x192, due to RAM
- * limitations). When changing the display, just select VGA/PAL or NTSC timing, the resolution does not change for the program.
* @param cfg Source configuration structure
* @param vmode Destination videomode setup for driver
*/
void VgaCfg(const sVgaCfg* cfg, sVmode* vmode);
+//! @}
+
+//! @addtogroup VideoInit
+//! @{
+
/**
* @brief Simplified initialization of the video mode
* @details This function incorporates all the video initialization and configuration functions -- this one call initializes the
@@ -267,6 +271,7 @@ void VgaCfg(const sVgaCfg* cfg, sVmode* vmode);
*/
void Video(u8 dev, u8 res, u8 form, u8* buf, const void* buf2 = FontBoldB8x16);
-//!@}
+//! @}
+
#endif // _VGA_VMODE_H