VMUPro SDK v1.0.0
Application Development SDK for the VMUPro
Loading...
Searching...
No Matches
vmupro_display.h File Reference

VMUPro Display and Graphics API. More...

#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  vmupro_sprite_t
 Sprite structure for batch rendering. More...
 
struct  vmupro_layer_t
 Layer structure for multi-layer rendering. More...
 

Macros

#define VMUPRO_MAX_LAYERS   8
 

Enumerations

enum  vmupro_color_t {
  VMUPRO_COLOR_RED = 0x00f8 , VMUPRO_COLOR_ORANGE = 0xa0fb , VMUPRO_COLOR_YELLOW = 0x80ff , VMUPRO_COLOR_YELLOWGREEN = 0x807f ,
  VMUPRO_COLOR_GREEN = 0x0005 , VMUPRO_COLOR_BLUE = 0x5f04 , VMUPRO_COLOR_NAVY = 0x0c00 , VMUPRO_COLOR_VIOLET = 0x1f78 ,
  VMUPRO_COLOR_MAGENTA = 0x0d78 , VMUPRO_COLOR_GREY = 0xb6b5 , VMUPRO_COLOR_BLACK = 0x0000 , VMUPRO_COLOR_WHITE = 0xffff ,
  VMUPRO_COLOR_VMUGREEN = 0xd26c , VMUPRO_COLOR_VMUINK = 0x8a28
}
 Predefined color values for VMUPro display. More...
 

Functions

void vmupro_display_clear (vmupro_color_t color)
 Clear the display with a solid color.
 
void vmupro_display_refresh ()
 Refresh the display.
 
int vmupro_get_global_brightness (void)
 
void vmupro_set_global_brightness (int brightness)
 
uint8_t * vmupro_get_front_fb ()
 Get pointer to the front framebuffer.
 
uint8_t * vmupro_get_back_fb ()
 Get pointer to the back framebuffer.
 
uint8_t * vmupro_get_back_buffer ()
 Get pointer to the back buffer.
 
void vmupro_start_double_buffer_renderer ()
 Start the double buffer renderer.
 
void vmupro_stop_double_buffer_renderer ()
 Stop the double buffer renderer.
 
void vmupro_pause_double_buffer_renderer ()
 Pause the double buffer renderer.
 
void vmupro_resume_double_buffer_renderer ()
 Resume the double buffer renderer.
 
void vmupro_push_double_buffer_frame ()
 Swap and display the current framebuffer.
 
void vmupro_draw_rect (int x1, int y1, int x2, int y2, vmupro_color_t color)
 Draw a rectangle outline.
 
void vmupro_draw_fill_rect (int x1, int y1, int x2, int y2, vmupro_color_t color)
 Draw a filled rectangle.
 
void vmupro_blit_buffer_at (uint8_t *buffer, int x, int y, int width, int height)
 Blit a buffer to the display at specified coordinates.
 
void vmupro_blit_buffer_with_palette (uint8_t *buffer, int16_t *palette)
 Blit a paletted buffer to the display.
 
void vmupro_blit_buffer_transparent (uint8_t *buffer, int x, int y, int width, int height, vmupro_color_t transparent_color)
 Blit a buffer with transparency support.
 
void vmupro_blit_buffer_blended (uint8_t *buffer, int x, int y, int width, int height, uint8_t alpha_level)
 Blit a buffer with alpha blending.
 
void vmupro_blit_buffer_dithered (uint8_t *buffer, int x, int y, int width, int height, int dither_strength)
 Blit a buffer with dithering effect.
 
void vmupro_blit_buffer_flip_h (uint8_t *buffer, int x, int y, int width, int height)
 Blit a buffer with horizontal flipping.
 
void vmupro_blit_buffer_flip_v (uint8_t *buffer, int x, int y, int width, int height)
 Blit a buffer with vertical flipping.
 
void vmupro_blit_buffer_scaled (uint8_t *buffer, int buffer_width, int src_x, int src_y, int src_width, int src_height, int dest_x, int dest_y, int dest_width, int dest_height)
 Blit a buffer with scaling support.
 
void vmupro_blit_buffer_rotated_90 (uint8_t *buffer, int x, int y, int width, int height, int rotation)
 Blit a buffer with 90-degree rotation increments.
 
void vmupro_blit_buffer_rotated_precise (uint8_t *buffer, int x, int y, int width, int height, int rotation_degrees)
 Blit a buffer with precise rotation (1-degree increments)
 
void vmupro_blit_tile_pattern (uint8_t *tile_buffer, int tile_width, int tile_height, int dest_x, int dest_y, int dest_width, int dest_height)
 Blit a tiled pattern to fill an area.
 
void vmupro_blit_buffer_advanced (uint8_t *buffer, int buffer_width, int src_x, int src_y, int src_width, int src_height, int dest_x, int dest_y, int dest_width, int dest_height, int flip_h, int flip_v, int transparent_color)
 Advanced blit with multiple effects combined.
 
void vmupro_draw_line (int x1, int y1, int x2, int y2, vmupro_color_t color)
 Draw a line between two points.
 
void vmupro_draw_circle (int cx, int cy, int radius, vmupro_color_t color)
 Draw a circle outline.
 
void vmupro_draw_circle_filled (int cx, int cy, int radius, vmupro_color_t color)
 Draw a filled circle.
 
void vmupro_draw_ellipse (int cx, int cy, int rx, int ry, vmupro_color_t color)
 Draw an ellipse outline.
 
void vmupro_draw_ellipse_filled (int cx, int cy, int rx, int ry, vmupro_color_t color)
 Draw a filled ellipse.
 
void vmupro_draw_polygon (int *points, int num_points, vmupro_color_t color)
 Draw a polygon outline.
 
void vmupro_draw_polygon_filled (int *points, int num_points, vmupro_color_t color)
 Draw a filled polygon.
 
void vmupro_flood_fill (int x, int y, vmupro_color_t fill_color, vmupro_color_t boundary_color)
 Flood fill an area with color.
 
void vmupro_flood_fill_tolerance (int x, int y, vmupro_color_t fill_color, int tolerance)
 Flood fill with color tolerance.
 
void vmupro_blit_scrolling_background (uint8_t *bg_buffer, int bg_width, int bg_height, int scroll_x, int scroll_y, int dest_width, int dest_height)
 Blit a scrolling background.
 
void vmupro_blit_infinite_scrolling_background (uint8_t *tile_buffer, int tile_width, int tile_height, int scroll_x, int scroll_y, int dest_width, int dest_height)
 Blit an infinitely scrolling tiled background.
 
void vmupro_blit_parallax_background (uint8_t *bg_buffer, int bg_width, int bg_height, int scroll_x, int scroll_y, int parallax_factor_x, int parallax_factor_y)
 Blit background with parallax effect.
 
void vmupro_blit_multi_parallax (uint8_t **bg_layers, int *layer_widths, int *layer_heights, int num_layers, int *parallax_factors_x, int *parallax_factors_y, int scroll_x, int scroll_y)
 Blit multiple parallax layers.
 
void vmupro_blit_line_scroll_background (uint8_t *bg_buffer, int bg_width, int bg_height, int *scroll_x_per_line, int *scroll_y_per_line)
 Blit background with per-line scrolling (Mega Drive style)
 
void vmupro_blit_column_scroll_background (uint8_t *bg_buffer, int bg_width, int bg_height, int *scroll_x_per_column, int *scroll_y_per_column)
 Blit background with per-column scrolling.
 
void vmupro_blit_buffer_mosaic (uint8_t *buffer, int x, int y, int width, int height, int mosaic_size)
 Apply mosaic effect to buffer.
 
void vmupro_blit_buffer_blurred (uint8_t *buffer, int x, int y, int width, int height, int blur_radius)
 Apply blur effect to buffer.
 
void vmupro_apply_mosaic_to_screen (int x, int y, int width, int height, int mosaic_size)
 Apply mosaic effect directly to screen.
 
void vmupro_blit_buffer_shadow_highlight (uint8_t *buffer, int x, int y, int width, int height, int mode)
 Apply shadow/highlight effect to buffer.
 
void vmupro_blit_buffer_color_multiply (uint8_t *buffer, int x, int y, int width, int height, vmupro_color_t color_filter)
 Apply color multiplication filter.
 
void vmupro_blit_buffer_color_add (uint8_t *buffer, int x, int y, int width, int height, vmupro_color_t color_offset)
 Apply color addition filter.
 
int vmupro_sprite_collision_check (int sprite1_x, int sprite1_y, int sprite1_w, int sprite1_h, int sprite2_x, int sprite2_y, int sprite2_w, int sprite2_h)
 Check rectangular sprite collision.
 
int vmupro_sprite_pixel_collision (uint8_t *sprite1, uint8_t *sprite2, int x1, int y1, int x2, int y2, int width1, int height1, int width2, int height2)
 Check pixel-perfect sprite collision.
 
void vmupro_blit_buffer_fixed_alpha (uint8_t *buffer, int x, int y, int width, int height, int alpha_mode)
 Apply fixed alpha blending.
 
void vmupro_blend_layers_additive (uint8_t *layer1, uint8_t *layer2, int width, int height)
 Blend two layers additively.
 
void vmupro_blend_layers_multiply (uint8_t *layer1, uint8_t *layer2, int width, int height)
 Blend two layers multiplicatively.
 
void vmupro_blend_layers_screen (uint8_t *layer1, uint8_t *layer2, int width, int height)
 Blend two layers using screen mode.
 
void vmupro_set_color_window (int x1, int y1, int x2, int y2, vmupro_color_t mask_color)
 Set a color window for masking.
 
void vmupro_blit_buffer_masked (uint8_t *buffer, uint8_t *mask, int x, int y, int width, int height)
 Blit buffer using mask.
 
void vmupro_clear_color_window (void)
 Clear the color window.
 
void vmupro_blit_buffer_palette_swap (uint8_t *buffer, int x, int y, int width, int height, uint16_t *old_palette, uint16_t *new_palette, int palette_size)
 Swap palette colors in buffer.
 
void vmupro_animate_palette_range (uint16_t *palette, int start_index, int end_index, int shift_amount)
 Animate palette color cycling.
 
void vmupro_interpolate_palette (uint16_t *palette1, uint16_t *palette2, uint16_t *result, int size, int factor_256)
 Interpolate between two palettes.
 
void vmupro_sprite_batch_render (vmupro_sprite_t *sprites, int num_sprites)
 Render multiple sprites in priority order.
 
void vmupro_layer_create (int layer_id, int width, int height)
 Create a new layer.
 
void vmupro_layer_destroy (int layer_id)
 Destroy a layer.
 
void vmupro_layer_set_scroll (int layer_id, int scroll_x, int scroll_y)
 Set layer scroll position.
 
void vmupro_layer_set_priority (int layer_id, int priority)
 Set layer rendering priority.
 
void vmupro_layer_set_alpha (int layer_id, uint8_t alpha)
 Set layer alpha transparency.
 
void vmupro_layer_blit_background (int layer_id, uint8_t *bg_buffer, int bg_width, int bg_height)
 Blit background to layer.
 
void vmupro_render_all_layers (void)
 Render all active layers.
 
void vmupro_blit_tile (uint8_t *buffer, int x, int y, int src_x, int src_y, int width, int height, int tilemap_width)
 Blit a single tile from a tilemap/tileset.
 
uint8_t vmupro_get_last_blitted_fb_side ()
 

Detailed Description

VMUPro Display and Graphics API.

This header provides the comprehensive display and graphics API for the VMUPro SDK. It includes a complete suite of graphics functions for professional game development, matching the capabilities of retro console systems.

Core Features

  • Display Management: Double buffering, framebuffer access, and refresh control
  • Basic Drawing: Rectangles, lines, circles, ellipses, polygons, and pixel operations
  • Advanced Blitting: Transparency, scaling, rotation, flipping, and palette support
  • Background Systems: Scrolling, parallax effects, and infinite tiling
  • Visual Effects: Mosaic, shadow/highlight, color filters, and blending modes
  • Collision Detection: Rectangle and pixel-perfect collision testing
  • Sprite Management: Batch rendering with priority ordering and effects
  • Layer System: Multi-layer compositing with individual scroll, alpha, and priority
  • Palette Operations: Color swapping, animation, and interpolation
  • Windowing/Masking: Advanced clipping and masking operations

Color Format

All graphics operations use RGB565 format (16-bit color) for optimal performance and memory efficiency on the VMUPro hardware.

Performance Notes

  • Functions with "precise" in the name use floating-point math and are slower
  • 90-degree rotation functions are optimized for pixel-perfect, fast operation
  • Layer and sprite batch operations are optimized for rendering multiple objects
  • Double buffering eliminates screen tearing for smooth animation
Author
8BitMods
Version
1.0.0
Date
2025-06-24

Definition in file vmupro_display.h.

Macro Definition Documentation

◆ VMUPRO_MAX_LAYERS

#define VMUPRO_MAX_LAYERS   8

Definition at line 992 of file vmupro_display.h.

Enumeration Type Documentation

◆ vmupro_color_t

Predefined color values for VMUPro display.

This enumeration provides commonly used color values in RGB565 format for the VMUPro display system. Values are in big endian format.

Enumerator
VMUPRO_COLOR_RED 

Red color (RGB565 big endian: 0x00F8)

VMUPRO_COLOR_ORANGE 

Orange color (RGB565 big endian: 0xA0FB)

VMUPRO_COLOR_YELLOW 

Yellow color (RGB565 big endian: 0x80FF)

VMUPRO_COLOR_YELLOWGREEN 

Yellow-green color (RGB565 big endian: 0x807F)

VMUPRO_COLOR_GREEN 

Green color (RGB565 big endian: 0x0005)

VMUPRO_COLOR_BLUE 

Blue color (RGB565 big endian: 0x5F04)

VMUPRO_COLOR_NAVY 

Navy blue color (RGB565 big endian: 0x0C00)

VMUPRO_COLOR_VIOLET 

Violet color (RGB565 big endian: 0x1F78)

VMUPRO_COLOR_MAGENTA 

Magenta color (RGB565 big endian: 0x0D78)

VMUPRO_COLOR_GREY 

Grey color (RGB565 big endian: 0xB6B5)

VMUPRO_COLOR_BLACK 

Black color (RGB565 big endian: 0x0000)

VMUPRO_COLOR_WHITE 

White color (RGB565 big endian: 0xFFFF)

VMUPRO_COLOR_VMUGREEN 

VMU signature green color (RGB565 big endian: 0xD26C)

VMUPRO_COLOR_VMUINK 

VMU signature ink color (RGB565 big endian: 0x8A28)

Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

Definition at line 53 of file vmupro_display.h.

Function Documentation

◆ vmupro_animate_palette_range()

void vmupro_animate_palette_range ( uint16_t *  palette,
int  start_index,
int  end_index,
int  shift_amount 
)

Animate palette color cycling.

Shifts colors in a palette range for animation effects.

Parameters
palettePointer to the palette array
start_indexStarting palette index
end_indexEnding palette index
shift_amountNumber of positions to shift
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_apply_mosaic_to_screen()

void vmupro_apply_mosaic_to_screen ( int  x,
int  y,
int  width,
int  height,
int  mosaic_size 
)

Apply mosaic effect directly to screen.

Applies mosaic effect to a region of the current framebuffer.

Parameters
xX coordinate of the region
yY coordinate of the region
widthWidth of the region
heightHeight of the region
mosaic_sizeSize of mosaic blocks
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blend_layers_additive()

void vmupro_blend_layers_additive ( uint8_t *  layer1,
uint8_t *  layer2,
int  width,
int  height 
)

Blend two layers additively.

Adds color values of two layers together.

Parameters
layer1First layer buffer
layer2Second layer buffer
widthWidth of the layers
heightHeight of the layers
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blend_layers_multiply()

void vmupro_blend_layers_multiply ( uint8_t *  layer1,
uint8_t *  layer2,
int  width,
int  height 
)

Blend two layers multiplicatively.

Multiplies color values of two layers.

Parameters
layer1First layer buffer
layer2Second layer buffer
widthWidth of the layers
heightHeight of the layers
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blend_layers_screen()

void vmupro_blend_layers_screen ( uint8_t *  layer1,
uint8_t *  layer2,
int  width,
int  height 
)

Blend two layers using screen mode.

Applies screen blending mode between two layers.

Parameters
layer1First layer buffer
layer2Second layer buffer
widthWidth of the layers
heightHeight of the layers
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_advanced()

void vmupro_blit_buffer_advanced ( uint8_t *  buffer,
int  buffer_width,
int  src_x,
int  src_y,
int  src_width,
int  src_height,
int  dest_x,
int  dest_y,
int  dest_width,
int  dest_height,
int  flip_h,
int  flip_v,
int  transparent_color 
)

Advanced blit with multiple effects combined.

Copies pixel data with support for transparency, flipping, and scaling combined. This is the most flexible blitting function for complex sprite operations.

Parameters
bufferPointer to the source pixel buffer
buffer_widthWidth of the source buffer in pixels (stride/pitch)
src_xSource X coordinate within the buffer
src_ySource Y coordinate within the buffer
src_widthWidth of the source region in pixels
src_heightHeight of the source region in pixels
dest_xDestination X coordinate on the display
dest_yDestination Y coordinate on the display
dest_widthDestination width in pixels (for scaling)
dest_heightDestination height in pixels (for scaling)
flip_hSet to 1 to flip horizontally, 0 for normal
flip_vSet to 1 to flip vertically, 0 for normal
transparent_colorColor value to treat as transparent (-1 for no transparency)
Note
Combines the functionality of multiple specialized blit functions
Use -1 for transparent_color to disable transparency
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_at()

void vmupro_blit_buffer_at ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height 
)

Blit a buffer to the display at specified coordinates.

Copies pixel data from a source buffer to the display framebuffer at the specified position. The buffer should contain pixel data in the display's native format.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the top-left corner where the buffer will be placed
yY coordinate of the top-left corner where the buffer will be placed
widthWidth of the source buffer in pixels
heightHeight of the source buffer in pixels
Note
The buffer data is copied directly without any format conversion
Coordinates outside the display boundaries will be clipped
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_blended()

void vmupro_blit_buffer_blended ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height,
uint8_t  alpha_level 
)

Blit a buffer with alpha blending.

Copies pixel data from a source buffer to the display framebuffer with alpha blending. Each pixel is blended with the existing framebuffer content based on the specified alpha level.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the top-left corner where the buffer will be placed
yY coordinate of the top-left corner where the buffer will be placed
widthWidth of the source buffer in pixels
heightHeight of the source buffer in pixels
alpha_levelAlpha blending level (0=fully transparent, 255=fully opaque)
Note
Alpha blending formula: result = (source * alpha + dest * (255-alpha)) / 255
Performance intensive operation due to read-modify-write operations
alpha_level of 0 makes the source invisible, 255 makes it fully opaque
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_blurred()

void vmupro_blit_buffer_blurred ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height,
int  blur_radius 
)

Apply blur effect to buffer.

Applies a Gaussian blur effect to the specified region of a buffer. Creates smooth, softened edges and depth-of-field effects.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the region
yY coordinate of the region
widthWidth of the region
heightHeight of the region
blur_radiusBlur intensity (higher = more blurred, 0 = no blur)
Note
Performance intensive operation, especially with large blur radius
Blur radius of 1-3 provides subtle effects, 4-8 for dramatic blur
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_color_add()

void vmupro_blit_buffer_color_add ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height,
vmupro_color_t  color_offset 
)

Apply color addition filter.

Adds a color offset to each pixel.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the region
yY coordinate of the region
widthWidth of the region
heightHeight of the region
color_offsetColor offset to add (RGB565 big endian format)
Note
Color values should be in big endian format (e.g., use VMUPRO_COLOR_* constants)
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_color_multiply()

void vmupro_blit_buffer_color_multiply ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height,
vmupro_color_t  color_filter 
)

Apply color multiplication filter.

Multiplies each pixel by a color filter value.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the region
yY coordinate of the region
widthWidth of the region
heightHeight of the region
color_filterColor multiplier (RGB565 big endian format)
Note
Color values should be in big endian format (e.g., use VMUPRO_COLOR_* constants)
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_dithered()

void vmupro_blit_buffer_dithered ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height,
int  dither_strength 
)

Blit a buffer with dithering effect.

Applies dithering to a buffer when blitting to the screen. Dithering creates the illusion of additional colors by using patterns of existing pixels. This is particularly useful for creating smooth gradients and reducing color banding on displays with limited color palettes.

Parameters
bufferPointer to the source pixel buffer
xX coordinate where to blit the buffer
yY coordinate where to blit the buffer
widthWidth of the buffer
heightHeight of the buffer
dither_strengthDithering intensity (0 = no dithering, higher values = more dithering)
Note
Dithering helps create smoother gradients on limited color displays
Higher dither_strength values create more visible patterns but better color approximation
Recommended dither_strength range: 1-8 for most applications
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_fixed_alpha()

void vmupro_blit_buffer_fixed_alpha ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height,
int  alpha_mode 
)

Apply fixed alpha blending.

Blends buffer with background using predefined alpha modes.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the region
yY coordinate of the region
widthWidth of the region
heightHeight of the region
alpha_modeAlpha blending mode (0=25%, 1=50%, 2=75%)
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_flip_h()

void vmupro_blit_buffer_flip_h ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height 
)

Blit a buffer with horizontal flipping.

Copies pixel data from a source buffer to the display framebuffer, flipping the image horizontally during the copy operation.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the top-left corner where the buffer will be placed
yY coordinate of the top-left corner where the buffer will be placed
widthWidth of the source buffer in pixels
heightHeight of the source buffer in pixels
Note
Useful for character sprites facing different directions
The rightmost pixel of the source becomes the leftmost in the destination
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_flip_v()

void vmupro_blit_buffer_flip_v ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height 
)

Blit a buffer with vertical flipping.

Copies pixel data from a source buffer to the display framebuffer, flipping the image vertically during the copy operation.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the top-left corner where the buffer will be placed
yY coordinate of the top-left corner where the buffer will be placed
widthWidth of the source buffer in pixels
heightHeight of the source buffer in pixels
Note
The bottom row of the source becomes the top row in the destination
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_masked()

void vmupro_blit_buffer_masked ( uint8_t *  buffer,
uint8_t *  mask,
int  x,
int  y,
int  width,
int  height 
)

Blit buffer using mask.

Copies pixels only where the mask allows.

Parameters
bufferPointer to the source pixel buffer
maskPointer to the mask buffer (0=block, non-zero=allow)
xX coordinate of the region
yY coordinate of the region
widthWidth of the region
heightHeight of the region
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_mosaic()

void vmupro_blit_buffer_mosaic ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height,
int  mosaic_size 
)

Apply mosaic effect to buffer.

Creates a mosaic/pixelation effect by averaging pixel blocks.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the region
yY coordinate of the region
widthWidth of the region
heightHeight of the region
mosaic_sizeSize of mosaic blocks (higher = more pixelated)
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_palette_swap()

void vmupro_blit_buffer_palette_swap ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height,
uint16_t *  old_palette,
uint16_t *  new_palette,
int  palette_size 
)

Swap palette colors in buffer.

Replaces colors in a buffer using palette mapping.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the region
yY coordinate of the region
widthWidth of the region
heightHeight of the region
old_paletteArray of original color values
new_paletteArray of replacement color values
palette_sizeNumber of colors in the palettes
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_rotated_90()

void vmupro_blit_buffer_rotated_90 ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height,
int  rotation 
)

Blit a buffer with 90-degree rotation increments.

Copies pixel data from a source buffer to the display framebuffer with rotation in 90-degree increments. This is a fast rotation method that preserves pixel-perfect quality.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the top-left corner where the buffer will be placed
yY coordinate of the top-left corner where the buffer will be placed
widthWidth of the source buffer in pixels
heightHeight of the source buffer in pixels
rotationRotation steps: 0=none, 1=90°, 2=180°, 3=270°
Note
Rotation is clockwise
Buffer dimensions may be swapped depending on rotation angle
Fast operation with no quality loss - pixel perfect
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_rotated_precise()

void vmupro_blit_buffer_rotated_precise ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height,
int  rotation_degrees 
)

Blit a buffer with precise rotation (1-degree increments)

Copies pixel data from a source buffer to the display framebuffer with precise rotation at any angle. Uses interpolation for smooth rotation.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the center point for rotation
yY coordinate of the center point for rotation
widthWidth of the source buffer in pixels
heightHeight of the source buffer in pixels
rotation_degreesRotation angle in degrees (0-359, clockwise)
Note
Rotation is clockwise around the center point (x, y)
Uses bilinear interpolation for smooth edges
PERFORMANCE WARNING: Significantly slower than 90-degree rotation
Final dimensions may be larger due to rotation bounds
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_scaled()

void vmupro_blit_buffer_scaled ( uint8_t *  buffer,
int  buffer_width,
int  src_x,
int  src_y,
int  src_width,
int  src_height,
int  dest_x,
int  dest_y,
int  dest_width,
int  dest_height 
)

Blit a buffer with scaling support.

Copies pixel data from a source buffer to the display framebuffer with scaling. Supports both upscaling and downscaling using nearest-neighbor filtering.

Parameters
bufferPointer to the source pixel buffer
buffer_widthWidth of the source buffer in pixels (stride/pitch)
src_xSource X coordinate within the buffer
src_ySource Y coordinate within the buffer
src_widthWidth of the source region in pixels
src_heightHeight of the source region in pixels
dest_xDestination X coordinate on the display
dest_yDestination Y coordinate on the display
dest_widthDestination width in pixels (scaled size)
dest_heightDestination height in pixels (scaled size)
Note
Uses nearest-neighbor filtering for pixel-perfect scaling
Scale factors are calculated automatically from source/destination dimensions
buffer_width specifies the stride/pitch of the source buffer for proper indexing
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_shadow_highlight()

void vmupro_blit_buffer_shadow_highlight ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height,
int  mode 
)

Apply shadow/highlight effect to buffer.

Creates shadow or highlight effects on sprites.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the region
yY coordinate of the region
widthWidth of the region
heightHeight of the region
modeEffect mode (0=shadow, 1=highlight)
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_transparent()

void vmupro_blit_buffer_transparent ( uint8_t *  buffer,
int  x,
int  y,
int  width,
int  height,
vmupro_color_t  transparent_color 
)

Blit a buffer with transparency support.

Copies pixel data from a source buffer to the display framebuffer with transparency support. Pixels matching the transparent color are skipped.

Parameters
bufferPointer to the source pixel buffer
xX coordinate of the top-left corner where the buffer will be placed
yY coordinate of the top-left corner where the buffer will be placed
widthWidth of the source buffer in pixels
heightHeight of the source buffer in pixels
transparent_colorColor value to treat as transparent (will not be drawn)
Note
Essential for sprite rendering with transparent backgrounds
Transparent pixels preserve the existing framebuffer content
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_buffer_with_palette()

void vmupro_blit_buffer_with_palette ( uint8_t *  buffer,
int16_t *  palette 
)

Blit a paletted buffer to the display.

Copies pixel data from a paletted source buffer to the display framebuffer. Each pixel in the buffer is used as an index into the provided palette to determine the final color value.

Parameters
bufferPointer to the source paletted pixel buffer (indices into palette)
palettePointer to the color palette array (RGB565 format values)
Note
The buffer contains palette indices, not direct color values
Palette entries should be in RGB565 format
Buffer size and position are determined by the current rendering context
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_column_scroll_background()

void vmupro_blit_column_scroll_background ( uint8_t *  bg_buffer,
int  bg_width,
int  bg_height,
int *  scroll_x_per_column,
int *  scroll_y_per_column 
)

Blit background with per-column scrolling.

Advanced scrolling where each column can have different scroll offsets.

Parameters
bg_bufferPointer to the background image buffer
bg_widthWidth of the background image
bg_heightHeight of the background image
scroll_x_per_columnArray of horizontal scroll offsets for each column
scroll_y_per_columnArray of vertical scroll offsets for each column
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_infinite_scrolling_background()

void vmupro_blit_infinite_scrolling_background ( uint8_t *  tile_buffer,
int  tile_width,
int  tile_height,
int  scroll_x,
int  scroll_y,
int  dest_width,
int  dest_height 
)

Blit an infinitely scrolling tiled background.

Creates an infinite scrolling effect by tiling a background pattern.

Parameters
tile_bufferPointer to the tile buffer
tile_widthWidth of a single tile
tile_heightHeight of a single tile
scroll_xHorizontal scroll offset
scroll_yVertical scroll offset
dest_widthDestination width to fill
dest_heightDestination height to fill
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_line_scroll_background()

void vmupro_blit_line_scroll_background ( uint8_t *  bg_buffer,
int  bg_width,
int  bg_height,
int *  scroll_x_per_line,
int *  scroll_y_per_line 
)

Blit background with per-line scrolling (Mega Drive style)

Advanced scrolling where each scanline can have different scroll offsets.

Parameters
bg_bufferPointer to the background image buffer
bg_widthWidth of the background image
bg_heightHeight of the background image
scroll_x_per_lineArray of horizontal scroll offsets for each line
scroll_y_per_lineArray of vertical scroll offsets for each line
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_multi_parallax()

void vmupro_blit_multi_parallax ( uint8_t **  bg_layers,
int *  layer_widths,
int *  layer_heights,
int  num_layers,
int *  parallax_factors_x,
int *  parallax_factors_y,
int  scroll_x,
int  scroll_y 
)

Blit multiple parallax layers.

Renders multiple background layers with different parallax speeds.

Parameters
bg_layersArray of background layer buffers
layer_widthsArray of layer widths
layer_heightsArray of layer heights
num_layersNumber of layers to render
parallax_factors_xArray of horizontal parallax factors
parallax_factors_yArray of vertical parallax factors
scroll_xBase horizontal scroll offset
scroll_yBase vertical scroll offset
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_parallax_background()

void vmupro_blit_parallax_background ( uint8_t *  bg_buffer,
int  bg_width,
int  bg_height,
int  scroll_x,
int  scroll_y,
int  parallax_factor_x,
int  parallax_factor_y 
)

Blit background with parallax effect.

Creates parallax scrolling effect by applying scaling factors to scroll offsets.

Parameters
bg_bufferPointer to the background image buffer
bg_widthWidth of the background image
bg_heightHeight of the background image
scroll_xBase horizontal scroll offset
scroll_yBase vertical scroll offset
parallax_factor_xHorizontal parallax multiplier (256 = 1.0x speed)
parallax_factor_yVertical parallax multiplier (256 = 1.0x speed)
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_scrolling_background()

void vmupro_blit_scrolling_background ( uint8_t *  bg_buffer,
int  bg_width,
int  bg_height,
int  scroll_x,
int  scroll_y,
int  dest_width,
int  dest_height 
)

Blit a scrolling background.

Copies a background image with scrolling offset support.

Parameters
bg_bufferPointer to the background image buffer
bg_widthWidth of the background image
bg_heightHeight of the background image
scroll_xHorizontal scroll offset
scroll_yVertical scroll offset
dest_widthDestination width to fill
dest_heightDestination height to fill
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_tile()

void vmupro_blit_tile ( uint8_t *  buffer,
int  x,
int  y,
int  src_x,
int  src_y,
int  width,
int  height,
int  tilemap_width 
)

Blit a single tile from a tilemap/tileset.

Copies a rectangular region from a source tilemap buffer to the display. Optimized for tile-based graphics rendering common in 2D games.

Parameters
bufferPointer to the source tilemap buffer
xDestination X coordinate on the display
yDestination Y coordinate on the display
src_xSource X coordinate within the tilemap (in pixels)
src_ySource Y coordinate within the tilemap (in pixels)
widthWidth of the tile in pixels
heightHeight of the tile in pixels
tilemap_widthWidth of the source tilemap in pixels (stride/pitch)
Note
For optimal performance, use tile dimensions that are powers of 2 (8x8, 16x16, 32x32, etc.)
The function cannot read past the edge of the source image - ensure src coordinates are valid
tilemap_width parameter specifies the full width of the source tilemap in pixels, not tiles
Ensure proper memory alignment for best performance
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_blit_tile_pattern()

void vmupro_blit_tile_pattern ( uint8_t *  tile_buffer,
int  tile_width,
int  tile_height,
int  dest_x,
int  dest_y,
int  dest_width,
int  dest_height 
)

Blit a tiled pattern to fill an area.

Copies a small tile buffer repeatedly to fill the specified rectangular area. Commonly used for backgrounds and texture patterns.

Parameters
tile_bufferPointer to the tile pixel buffer
tile_widthWidth of the tile in pixels
tile_heightHeight of the tile in pixels
dest_xDestination X coordinate on the display
dest_yDestination Y coordinate on the display
dest_widthWidth of the area to fill in pixels
dest_heightHeight of the area to fill in pixels
Note
The tile is repeated both horizontally and vertically
Partial tiles at edges are clipped automatically
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_clear_color_window()

void vmupro_clear_color_window ( void  )

Clear the color window.

Removes any active color window masking.

Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_display_clear()

void vmupro_display_clear ( vmupro_color_t  color)

Clear the display with a solid color.

Fills the entire display with the specified color.

Parameters
colorThe color to fill the display with
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_display_refresh()

void vmupro_display_refresh ( )

Refresh the display.

Updates the physical display with the current framebuffer contents. This function should be called after drawing operations to make changes visible on the screen.

Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_draw_circle()

void vmupro_draw_circle ( int  cx,
int  cy,
int  radius,
vmupro_color_t  color 
)

Draw a circle outline.

Draws a circle outline centered at (cx,cy) with the specified radius and color.

Parameters
cxCenter X coordinate
cyCenter Y coordinate
radiusRadius of the circle in pixels
colorColor of the circle outline
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_draw_circle_filled()

void vmupro_draw_circle_filled ( int  cx,
int  cy,
int  radius,
vmupro_color_t  color 
)

Draw a filled circle.

Draws a filled circle centered at (cx,cy) with the specified radius and color.

Parameters
cxCenter X coordinate
cyCenter Y coordinate
radiusRadius of the circle in pixels
colorFill color of the circle
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_draw_ellipse()

void vmupro_draw_ellipse ( int  cx,
int  cy,
int  rx,
int  ry,
vmupro_color_t  color 
)

Draw an ellipse outline.

Draws an ellipse outline centered at (cx,cy) with specified radii and color.

Parameters
cxCenter X coordinate
cyCenter Y coordinate
rxHorizontal radius
ryVertical radius
colorColor of the ellipse outline
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_draw_ellipse_filled()

void vmupro_draw_ellipse_filled ( int  cx,
int  cy,
int  rx,
int  ry,
vmupro_color_t  color 
)

Draw a filled ellipse.

Draws a filled ellipse centered at (cx,cy) with specified radii and color.

Parameters
cxCenter X coordinate
cyCenter Y coordinate
rxHorizontal radius
ryVertical radius
colorFill color of the ellipse
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_draw_fill_rect()

void vmupro_draw_fill_rect ( int  x1,
int  y1,
int  x2,
int  y2,
vmupro_color_t  color 
)

Draw a filled rectangle.

Draws a filled rectangle with the specified coordinates and color. The rectangle is drawn from (x1,y1) to (x2,y2).

Parameters
x1Left coordinate of the rectangle
y1Top coordinate of the rectangle
x2Right coordinate of the rectangle
y2Bottom coordinate of the rectangle
colorFill color of the rectangle
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_draw_line()

void vmupro_draw_line ( int  x1,
int  y1,
int  x2,
int  y2,
vmupro_color_t  color 
)

Draw a line between two points.

Draws a line from point (x1,y1) to point (x2,y2) using the specified color.

Parameters
x1Starting X coordinate
y1Starting Y coordinate
x2Ending X coordinate
y2Ending Y coordinate
colorColor of the line
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_draw_polygon()

void vmupro_draw_polygon ( int *  points,
int  num_points,
vmupro_color_t  color 
)

Draw a polygon outline.

Draws a polygon outline connecting the specified points.

Parameters
pointsArray of x,y coordinates (x1,y1,x2,y2,...)
num_pointsNumber of points in the polygon
colorColor of the polygon outline
Note
The points array should contain num_points * 2 values (x,y pairs)
The polygon is automatically closed (last point connects to first)
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_draw_polygon_filled()

void vmupro_draw_polygon_filled ( int *  points,
int  num_points,
vmupro_color_t  color 
)

Draw a filled polygon.

Draws a filled polygon using the specified points and color.

Parameters
pointsArray of x,y coordinates (x1,y1,x2,y2,...)
num_pointsNumber of points in the polygon
colorFill color of the polygon
Note
The points array should contain num_points * 2 values (x,y pairs)
Uses scan-line filling algorithm for solid fill
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_draw_rect()

void vmupro_draw_rect ( int  x1,
int  y1,
int  x2,
int  y2,
vmupro_color_t  color 
)

Draw a rectangle outline.

Draws a rectangle outline with the specified coordinates and color. The rectangle is drawn from (x1,y1) to (x2,y2).

Parameters
x1Left coordinate of the rectangle
y1Top coordinate of the rectangle
x2Right coordinate of the rectangle
y2Bottom coordinate of the rectangle
colorColor of the rectangle outline
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_flood_fill()

void vmupro_flood_fill ( int  x,
int  y,
vmupro_color_t  fill_color,
vmupro_color_t  boundary_color 
)

Flood fill an area with color.

Fills a connected area starting from (x,y) with the specified color. The fill spreads to all connected pixels of the same color as the starting pixel.

Parameters
xStarting X coordinate
yStarting Y coordinate
fill_colorColor to fill with
boundary_colorColor that acts as boundary for the fill
Note
Uses a stack-based flood fill algorithm
Performance scales with the size of the filled area
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_flood_fill_tolerance()

void vmupro_flood_fill_tolerance ( int  x,
int  y,
vmupro_color_t  fill_color,
int  tolerance 
)

Flood fill with color tolerance.

Fills a connected area with tolerance for color matching. Colors within the tolerance range are considered the same.

Parameters
xStarting X coordinate
yStarting Y coordinate
fill_colorColor to fill with
toleranceColor difference tolerance (0-255)
Note
Higher tolerance values fill more area
Performance intensive operation
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_get_back_buffer()

uint8_t * vmupro_get_back_buffer ( )

Get pointer to the back buffer.

Returns a pointer to the back buffer used in double buffering. This is an alias or alternative function for accessing the back framebuffer, maintaining compatibility with different naming conventions.

Returns
Pointer to the current back buffer data
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_get_back_fb()

uint8_t * vmupro_get_back_fb ( )

Get pointer to the back framebuffer.

Returns a pointer to one of the alternating framebuffers used in double buffering. The front/back designation alternates with each buffer swap operation.

Returns
Pointer to the current back framebuffer data
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_get_front_fb()

uint8_t * vmupro_get_front_fb ( )

Get pointer to the front framebuffer.

Returns a pointer to one of the alternating framebuffers used in double buffering. The front/back designation alternates with each buffer swap operation.

Returns
Pointer to the current front framebuffer data
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_get_global_brightness()

int vmupro_get_global_brightness ( void  )

◆ vmupro_get_last_blitted_fb_side()

uint8_t vmupro_get_last_blitted_fb_side ( )

◆ vmupro_interpolate_palette()

void vmupro_interpolate_palette ( uint16_t *  palette1,
uint16_t *  palette2,
uint16_t *  result,
int  size,
int  factor_256 
)

Interpolate between two palettes.

Creates smooth color transitions between palettes.

Parameters
palette1First palette
palette2Second palette
resultOutput palette buffer
sizeNumber of colors in palettes
factor_256Interpolation factor (0-256, where 256 = full palette2)
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_layer_blit_background()

void vmupro_layer_blit_background ( int  layer_id,
uint8_t *  bg_buffer,
int  bg_width,
int  bg_height 
)

Blit background to layer.

Copies background image data to a specific layer.

Parameters
layer_idTarget layer ID
bg_bufferBackground image buffer
bg_widthWidth of background image
bg_heightHeight of background image
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_layer_create()

void vmupro_layer_create ( int  layer_id,
int  width,
int  height 
)

Create a new layer.

Allocates and initializes a rendering layer.

Parameters
layer_idLayer ID (0 to VMUPRO_MAX_LAYERS-1)
widthWidth of the layer in pixels
heightHeight of the layer in pixels
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_layer_destroy()

void vmupro_layer_destroy ( int  layer_id)

Destroy a layer.

Deallocates a rendering layer and frees its memory.

Parameters
layer_idLayer ID to destroy
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_layer_set_alpha()

void vmupro_layer_set_alpha ( int  layer_id,
uint8_t  alpha 
)

Set layer alpha transparency.

Controls the transparency level of a layer.

Parameters
layer_idLayer ID
alphaAlpha value (0=transparent, 255=opaque)
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_layer_set_priority()

void vmupro_layer_set_priority ( int  layer_id,
int  priority 
)

Set layer rendering priority.

Controls the draw order of layers.

Parameters
layer_idLayer ID
priorityPriority value (higher = drawn last)
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_layer_set_scroll()

void vmupro_layer_set_scroll ( int  layer_id,
int  scroll_x,
int  scroll_y 
)

Set layer scroll position.

Updates the scroll offset for a layer.

Parameters
layer_idLayer ID
scroll_xHorizontal scroll offset
scroll_yVertical scroll offset
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_pause_double_buffer_renderer()

void vmupro_pause_double_buffer_renderer ( )

Pause the double buffer renderer.

Temporarily pauses the double buffering system without stopping it completely. This allows you to suspend automatic buffer swapping while maintaining the double buffer state. Useful for pause menus, loading screens, or when you need to temporarily halt rendering updates.

Note
The renderer can be resumed with vmupro_resume_double_buffer_renderer()
Pausing does not clear or reset the buffers
Must be called after vmupro_start_double_buffer_renderer()
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_push_double_buffer_frame()

void vmupro_push_double_buffer_frame ( )

Swap and display the current framebuffer.

Swaps the front and back framebuffers and displays the newly swapped front buffer. This alternates which buffer is used for drawing and which is displayed, enabling smooth double-buffered rendering.

Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_render_all_layers()

void vmupro_render_all_layers ( void  )

Render all active layers.

Composites all active layers to the framebuffer in priority order.

Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_resume_double_buffer_renderer()

void vmupro_resume_double_buffer_renderer ( )

Resume the double buffer renderer.

Resumes the double buffering system after it has been paused. This restores automatic buffer swapping and rendering operations.

Note
Must be called after vmupro_pause_double_buffer_renderer()
Resuming continues from the current buffer state
Double buffer system must have been started first
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_set_color_window()

void vmupro_set_color_window ( int  x1,
int  y1,
int  x2,
int  y2,
vmupro_color_t  mask_color 
)

Set a color window for masking.

Defines a rectangular region where only specific colors are drawn.

Parameters
x1Left coordinate of the window
y1Top coordinate of the window
x2Right coordinate of the window
y2Bottom coordinate of the window
mask_colorColor that passes through the mask
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_set_global_brightness()

void vmupro_set_global_brightness ( int  brightness)

◆ vmupro_sprite_batch_render()

void vmupro_sprite_batch_render ( vmupro_sprite_t sprites,
int  num_sprites 
)

Render multiple sprites in priority order.

Efficiently renders multiple sprites with proper priority sorting.

Parameters
spritesArray of sprite structures
num_spritesNumber of sprites to render
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_sprite_collision_check()

int vmupro_sprite_collision_check ( int  sprite1_x,
int  sprite1_y,
int  sprite1_w,
int  sprite1_h,
int  sprite2_x,
int  sprite2_y,
int  sprite2_w,
int  sprite2_h 
)

Check rectangular sprite collision.

Tests if two rectangular sprites overlap.

Parameters
sprite1_xFirst sprite X position
sprite1_yFirst sprite Y position
sprite1_wFirst sprite width
sprite1_hFirst sprite height
sprite2_xSecond sprite X position
sprite2_ySecond sprite Y position
sprite2_wSecond sprite width
sprite2_hSecond sprite height
Returns
1 if collision detected, 0 otherwise
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_sprite_pixel_collision()

int vmupro_sprite_pixel_collision ( uint8_t *  sprite1,
uint8_t *  sprite2,
int  x1,
int  y1,
int  x2,
int  y2,
int  width1,
int  height1,
int  width2,
int  height2 
)

Check pixel-perfect sprite collision.

Tests collision at the pixel level between two sprites.

Parameters
sprite1First sprite buffer
sprite2Second sprite buffer
x1First sprite X position
y1First sprite Y position
x2Second sprite X position
y2Second sprite Y position
width1First sprite width
height1First sprite height
width2Second sprite width
height2Second sprite height
Returns
1 if pixel collision detected, 0 otherwise
Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_start_double_buffer_renderer()

void vmupro_start_double_buffer_renderer ( )

Start the double buffer renderer.

Initializes and starts the double buffering system, allowing for smooth animation and flicker-free updates by alternating between two framebuffers.

Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.

◆ vmupro_stop_double_buffer_renderer()

void vmupro_stop_double_buffer_renderer ( )

Stop the double buffer renderer.

Stops the double buffering system and returns to single buffer mode.

Examples
/home/runner/work/vmupro-sdk/vmupro-sdk/sdk/include/vmupro_display.h.