Well, you want to know how to switch to mode 13h and plot a single pixel?
I''ll give you the sample code using DJGPP and Allegro:
#include "allegro.h"int main(int argc, char *argv[]){ BITMAP *buffer; allegro_init(); install_keyboard(); // setting up graphics mode. let it be detected by allegro, // because it searches for the best (fastest) available set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0); // resolution: 320x200, 8bpp...we don''t need any virtual // screen, so don''t intitialize it // now we''ll create a back surface (no virtual screen!) // we''ll blit this back surface onto the screen later on. buffer=create_bitmap(320,200); clear(buffer); // clear it in order to prevent distorted pictures (weird // pixels) put_pixel(buffer, 1, 1, 15); // now one pixel (usually white with default palette) was // plotted onto a buffer bitmap // now blit the buffer bitmap onto the screen blit(buffer, screen, 0, 0, 0, 0, 320, 200); destroy_bitmap(buffer); // we don''t need it anymore while (!key[KEY_ESC]) {} // wait until ESC is pressed allegro_exit(); return 0;}
So. That''s it
![](smile.gif)
Yours,
Indeterminatus
--si tacuisses, philosophus mansisses--