1 /* $Id: pixel.c,v 1.7 2005-08-02 06:15:08 chris Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
16 * Graphical routines for setting a pixel.
37 void gr_upixel( int x, int y )
43 ogl_upixelc(x,y,COLOR);
47 DATA[ ROWSIZE*y+x ] = COLOR;
51 gr_modex_setplane( (x+XOFFSET) & 3 );
52 gr_video_memory[(ROWSIZE * (y+YOFFSET)) + ((x+XOFFSET)>>2)] = COLOR;
55 gr_vesa_pixel( COLOR, (unsigned int)DATA + (unsigned int)ROWSIZE * y + x);
61 void gr_pixel( int x, int y )
63 if ((x<0) || (y<0) || (x>=GWIDTH) || (y>=GHEIGHT)) return;
67 inline void gr_bm_upixel( grs_bitmap * bm, int x, int y, unsigned char color )
73 ogl_upixelc(bm->bm_x+x,bm->bm_y+y,color);
77 bm->bm_data[ bm->bm_rowsize*y+x ] = color;
83 gr_modex_setplane( x & 3 );
84 gr_video_memory[(bm->bm_rowsize * y) + (x/4)] = color;
87 gr_vesa_pixel(color,(unsigned int)bm->bm_data + (unsigned int)bm->bm_rowsize * y + x);
93 void gr_bm_pixel( grs_bitmap * bm, int x, int y, unsigned char color )
95 if ((x<0) || (y<0) || (x>=bm->bm_w) || (y>=bm->bm_h)) return;
96 gr_bm_upixel (bm, x, y, color);