|
1 | | -/* |
2 | | -Copyright (C) 1997-2001 Id Software, Inc. |
3 | | -Copyright (C) 2019 Mark Sowden <markelswo@gmail.com> |
4 | | -
|
5 | | -This program is free software; you can redistribute it and/or |
6 | | -modify it under the terms of the GNU General Public License |
7 | | -as published by the Free Software Foundation; either version 2 |
8 | | -of the License, or (at your option) any later version. |
| 1 | +/****************************************************************************** |
| 2 | + Copyright © 1997-2001 Id Software, Inc. |
| 3 | + Copyright © 2020-2025 Mark E Sowden <hogsy@oldtimes-software.com> |
9 | 4 |
|
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. |
| 5 | + This program is free software; you can redistribute it and/or |
| 6 | + modify it under the terms of the GNU General Public License |
| 7 | + as published by the Free Software Foundation; either version 2 |
| 8 | + of the License, or (at your option) any later version. |
13 | 9 |
|
14 | | -See the GNU General Public License for more details. |
| 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. |
15 | 13 |
|
16 | | -You should have received a copy of the GNU General Public License |
17 | | -along with this program; if not, write to the Free Software |
18 | | -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | | -
|
20 | | -*/ |
| 14 | + See the GNU General Public License for more details. |
21 | 15 |
|
| 16 | + You should have received a copy of the GNU General Public License |
| 17 | + along with this program; if not, write to the Free Software |
| 18 | + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 19 | +******************************************************************************/ |
22 | 20 | // q_shared.h -- included first by ALL program modules |
23 | 21 |
|
24 | | -#if defined( _MSC_VER ) |
25 | | -// unknown pragmas are SUPPOSED to be ignored, but.... |
26 | | -# pragma warning( disable : 4244 )// MIPS |
27 | | -# pragma warning( disable : 4136 )// X86 |
28 | | -# pragma warning( disable : 4051 )// ALPHA |
29 | | - |
30 | | -# pragma warning( disable : 4018 )// signed/unsigned mismatch |
31 | | -# pragma warning( disable : 4305 )// truncation from const double to float |
32 | | -#endif |
| 22 | +#pragma once |
33 | 23 |
|
34 | 24 | #include <cassert> |
35 | 25 | #include <cmath> |
@@ -59,8 +49,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
59 | 49 |
|
60 | 50 | namespace chr |
61 | 51 | { |
62 | | - typedef unsigned int uint; |
63 | | -} |
| 52 | + typedef unsigned char uchar; |
| 53 | + typedef unsigned short ushort; |
| 54 | + typedef unsigned int uint; |
| 55 | +}// namespace chr |
64 | 56 |
|
65 | 57 | typedef unsigned char byte;// todo: move this into our own namespace... |
66 | 58 |
|
@@ -159,7 +151,7 @@ namespace chr |
159 | 151 |
|
160 | 152 | static inline ColourF32 ConvertColourU8ToColourF32( const ColourU8 &src ) |
161 | 153 | { |
162 | | - return ( ColourF32 ){ |
| 154 | + return ( ColourF32 ) { |
163 | 155 | ( ( float ) src.r ) / 255.0f, |
164 | 156 | ( ( float ) src.g ) / 255.0f, |
165 | 157 | ( ( float ) src.b ) / 255.0f, |
|
0 commit comments