]> icculus.org git repositories - taylor/freespace2.git/blob - src/graphics/pixel.cpp
Initial revision
[taylor/freespace2.git] / src / graphics / pixel.cpp
1 /*
2  * $Logfile: /Freespace2/code/Graphics/Pixel.cpp $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * Routines to plot a dot.
8  *
9  * $Log$
10  * Revision 1.1  2002/05/03 03:28:09  root
11  * Initial revision
12  *
13  * 
14  * 3     12/02/98 5:47p Dave
15  * Put in interface xstr code. Converted barracks screen to new format.
16  * 
17  * 2     10/07/98 10:53a Dave
18  * Initial checkin.
19  * 
20  * 1     10/07/98 10:49a Dave
21  * 
22  * 14    5/06/98 5:30p John
23  * Removed unused cfilearchiver.  Removed/replaced some unused/little used
24  * graphics functions, namely gradient_h and _v and pixel_sp.   Put in new
25  * DirectX header files and libs that fixed the Direct3D alpha blending
26  * problems.
27  * 
28  * 13    3/10/98 4:18p John
29  * Cleaned up graphics lib.  Took out most unused gr functions.   Made D3D
30  * & Glide have popups and print screen.  Took out all >8bpp software
31  * support.  Made Fred zbuffer.  Made zbuffer allocate dynamically to
32  * support Fred.  Made zbuffering key off of functions rather than one
33  * global variable.
34  * 
35  * 12    1/13/98 10:20a John
36  * Added code to support "glass" in alphacolors
37  * 
38  * 11    10/19/97 12:55p John
39  * new code to lock / unlock surfaces for smooth directx integration.
40  * 
41  * 10    10/14/97 8:08a John
42  * added a bunch more 16 bit support
43  * 
44  * 9     10/09/97 5:23p John
45  * Added support for more 16-bpp functions
46  * 
47  * 8     6/06/97 2:40p John
48  * Made all the radar dim in/out
49  * 
50  * 7     5/29/97 3:09p John
51  * Took out debug menu.  
52  * Made software scaler draw larger bitmaps.
53  * Optimized Direct3D some.
54  * 
55  * 6     5/12/97 12:27p John
56  * Restructured Graphics Library to add support for multiple renderers.
57  * 
58  * 5     1/09/97 11:35a John
59  * Added some 2d functions to get/put screen images.
60  * 
61  * 4     11/07/96 6:19p John
62  * Added a bunch of 16bpp primitives so the game sort of runs in 16bpp
63  * mode.
64  * 
65  * 3     10/26/96 1:40p John
66  * Added some now primitives to the 2d library and
67  * cleaned up some old ones.
68  *
69  * $NoKeywords: $
70  */
71
72 #include "2d.h"
73 #include "grinternal.h"
74 #include "pixel.h"
75 #include "palman.h"
76
77 void gr8_pixel( int x, int y )
78 {
79         ubyte * dptr;
80
81         if ( x < gr_screen.clip_left ) return;
82         if ( x > gr_screen.clip_right ) return;
83         if ( y < gr_screen.clip_top ) return;
84         if ( y > gr_screen.clip_bottom ) return;
85
86         gr_lock();
87
88         dptr = GR_SCREEN_PTR(ubyte,x, y);
89         if ( Current_alphacolor )       {
90                 // *dptr = Current_alphacolor->table.lookup[14][*dptr];
91         } else {
92                 *dptr = gr_screen.current_color.raw8;
93         }
94
95         gr_unlock();
96 }
97
98
99