src/misc.h

changeset 30
6b82f6a3ad53
parent 25
256bb5c6b77f
child 37
c82a86ea87be
equal deleted inserted replaced
29:251b121ab6c0 30:6b82f6a3ad53
1 /* 1 /*
2 * ZanDemo: Zandronum demo launcher 2 * ZCinema: Zandronum demo launcher
3 * Copyright (C) 2013 Santeri Piippo 3 * Copyright (C) 2013 Santeri Piippo
4 * 4 *
5 * This program is free software: you can redistribute it and/or modify 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 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 7 * the Free Software Foundation, either version 3 of the License, or
14 * 14 *
15 * You should have received a copy of the GNU General Public License 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/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19 #ifndef ZANDEMO_MISC_H 19 #ifndef ZCINEMA_MISC_H
20 #define ZANDEMO_MISC_H 20 #define ZCINEMA_MISC_H
21 21
22 #include "types.h" 22 #include "types.h"
23 23
24 uint32 makeByteID (uint8 a, uint8 b, uint8 c, uint8 d); 24 uint32 makeByteID (uint8 a, uint8 b, uint8 c, uint8 d);
25 str binaryConfigName (str ver); 25 str binaryConfigName (str ver);
48 // Templated absolute value 48 // Templated absolute value
49 template<class T> static inline T abs (T a) { 49 template<class T> static inline T abs (T a) {
50 return (a >= 0) ? a : -a; 50 return (a >= 0) ? a : -a;
51 } 51 }
52 52
53 #endif // ZANDEMO_MISC_H 53 #endif // ZCINEMA_MISC_H

mercurial