Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
simpdib.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19/***********************************************************************************************
20 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
21 ***********************************************************************************************
22 * *
23 * Project Name : Command & Conquer *
24 * *
25 * $Archive:: /Commando/Code/Tools/max2w3d/simpdib.h $*
26 * *
27 * $Author:: Greg_h $*
28 * *
29 * $Modtime:: 10/14/97 3:07p $*
30 * *
31 * $Revision:: 3 $*
32 * *
33 *---------------------------------------------------------------------------------------------*
34 * Functions: *
35 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
36
37#ifndef SIMPDIB_H
38#define SIMPDIB_H
39
40#ifndef ALWAYS_H
41#include "always.h"
42#endif
43
44#include <Max.h>
45
46#ifndef WIN_H
47#include "win.h"
48#endif
49
50#ifndef PALETTE_H
51#include "palette.h"
52#endif
53
55{
56public:
57
58 SimpleDIBClass(HWND hwnd,int width, int height,PaletteClass & pal);
59 ~SimpleDIBClass(void);
60
61 HBITMAP Get_Handle() { return Handle; }
62 int Get_Width(void) { return Width; }
63 int Get_Height(void) { return Height; }
64
65 void Clear(unsigned char color);
66 void Set_Pixel(int i,int j,unsigned char color);
67
68private:
69
70 bool IsZombie; // object constructor failed, its a living-dead object!
71 BITMAPINFO * Info; // info used in creating the dib + the palette.
72 HBITMAP Handle; // handle to the actual dib
73 unsigned char * Pixels; // address of memory containing the pixel data
74 int Width; // width of the dib
75 int Height; // height of the dib
76 unsigned char * PixelBase; // address of upper left pixel (this and DIBPitch abstract up/down DIBS)
77 int Pitch; // offset from DIBPixelBase to next row (can be negative for bottom-up DIBS)
78
79};
80
81
82#endif /*SIMPDIB_H*/
int Get_Width(void)
Definition simpdib.h:62
SimpleDIBClass(HWND hwnd, int width, int height, PaletteClass &pal)
Definition simpdib.cpp:40
void Clear(unsigned char color)
Definition simpdib.cpp:116
HBITMAP Get_Handle()
Definition simpdib.h:61
int Get_Height(void)
Definition simpdib.h:63
~SimpleDIBClass(void)
Definition simpdib.cpp:109
void Set_Pixel(int i, int j, unsigned char color)
Definition simpdib.cpp:123