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