/* Function: FDV_PIXEL_SLOW Purpose: Plot a pixel to the VGA Screen (320x200x256) Parameters: x = Horizontal Screen Position ( Value: 0 < x < 320 ) y = Vertical Screen Position ( Value: 0 < y < 200 ) cor = pixel color (Value: 0 < cor < 256) Compiler: Watcom C/C++ 11.0 (32bit Protected Mode - DOS4GW) Author: Fabio D. Vecchia Extracted from Fabio Vecchia's Game Library (c) 1995 - (FDV_LB95) */ // Initializing the screen buffer unsigned char *buf_tela=(unsigned char *)0x0a0000; void fdv_pixel_slow(long x, long y, unsigned char cor) { buf_tela[y*320+x]=cor; } /* Comment: The expression y*320+x shows the location (x,y) where the pixel (cor) will be plotted. This happens because the VGA screen (Mode 0x13) is 64000 bytes long (320x200=64000). So, to plot a pixel at the (x,y) position, (y*320) will skip the rows (320 pixel per row) and (+x) will add the pixel to the right column. */