DEADSOFTWARE

render: remove from render some common types
[d2df-sdl.git] / src / game / g_base.pas
1 (* Copyright (C) Doom 2D: Forever Developers
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, version 3 of the License ONLY.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 *)
15 {$INCLUDE ../shared/a_modes.inc}
16 unit g_base;
18 interface
20 type
21 TMirrorType = (None, Horizontal, Vertical);
22 TBlending = (None, Blend, Filter, Invert);
24 TPoint2i = record
25 X, Y: Integer;
26 end;
28 TPoint2f = record
29 X, Y: Double;
30 end;
32 TRect = record
33 Left, Top, Right, Bottom: Integer;
34 end;
36 TRectWH = record
37 X, Y: Integer;
38 Width, Height: Word;
39 end;
41 TRGB = packed record
42 R, G, B: Byte;
43 end;
45 PPoint2f = ^TPoint2f;
46 PRect = ^TRect;
47 PRectWH = ^TRectWH;
49 function _RGB (Red, Green, Blue: Byte): TRGB;
50 function _Point (X, Y: Integer): TPoint2i;
51 function _Rect (X, Y: Integer; Width, Height: Word): TRectWH;
52 function _TRect (L, T, R, B: LongInt): TRect;
54 implementation
56 function _RGB (Red, Green, Blue: Byte): TRGB;
57 begin
58 Result.R := Red;
59 Result.G := Green;
60 Result.B := Blue;
61 end;
63 function _Point (X, Y: Integer): TPoint2i;
64 begin
65 Result.X := X;
66 Result.Y := Y;
67 end;
69 function _Rect (X, Y: Integer; Width, Height: Word): TRectWH;
70 begin
71 Result.X := X;
72 Result.Y := Y;
73 Result.Width := Width;
74 Result.Height := Height;
75 end;
77 function _TRect (L, T, R, B: LongInt): TRect;
78 begin
79 Result.Top := T;
80 Result.Left := L;
81 Result.Right := R;
82 Result.Bottom := B;
83 end;
85 end.