Debian Codegraph @

Descent3/d3serial.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
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 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/main/d3serial.h $
21 * $Revision: 5 $
22 * $Date: 10/11/98 2:58a $
23 * $Author: Jeff $
24 *
25 * file header for serialization
26 *
27 * $Log: /DescentIII/main/d3serial.h $
28 *
29 * 5 10/11/98 2:58a Jeff
30 * fixed serialization code
31 *
32 * 4 9/29/98 3:04p Jeff
33 *
34 * 3 7/13/98 12:41p Jeff
35 * added serial number support
36 *
37 * 2 2/07/98 6:35p Jeff
38 *
39 * $NoKeywords: $
40 */
41
42 #ifndef __SERIALIZE_H_
43 #define __SERIALIZE_H_cxx . . $ `Descent3/d3serial.h:43:9`!
44
45 #include <cstdint>
46 #include <ctime>
47
48 #define DESC_ID_LENcxx . . $ `Descent3/d3serial.h:48:9`! 40 // how long the id string can be
49 #define DESC_CHECKSUM_LENcxx . . $ `Descent3/d3serial.h:49:9`! 4 // checksum is 4 bytes
50 #define DESC_SERIALNUM_LENcxx . . $ `Descent3/d3serial.h:50:9`! 4 // serialnum is 4 bytes
51 #define DESC_DEAD_TIME_LENcxx . . $ `Descent3/d3serial.h:51:9`! 8 // dead time is 8 bytes
52
53 #define DESC_ID_TAGcxx . . $ `Descent3/d3serial.h:53:9`! "Midway in our life's journey, I went astray"
54 #define DESC_ID_TAG_LENcxx . . $ `Descent3/d3serial.h:54:9`! 43
55
56 #define DESC_CHKSUM_TAGcxx . . $ `Descent3/d3serial.h:56:9`! "alone in a dark wood."
57 #define DESC_CHKSUM_TAG_LENcxx . . $ `Descent3/d3serial.h:57:9`! 21
58
59 #define DESC_SERIALNUM_TAGcxx . . $ `Descent3/d3serial.h:59:9`! "You've entered Lord Spam's Pleasure Dome"
60 #define DESC_SERIALNUM_TAG_LENcxx . . $ `Descent3/d3serial.h:60:9`! 40
61
62 #define DESC_DEAD_TIME_TAGcxx . . $ `Descent3/d3serial.h:62:9`! "from the straight road and woke to find myself"
63 #define DESC_DEAD_TIME_TAG_LENcxx . . $ `Descent3/d3serial.h:63:9`! 46
64
65 // checks exectuable (returns !0 on error)
66 int SerialCheckcxx . . $ SerialCheck(b126dc7c1de90089).(void);
67
68 // given return value from SerialCheck() it reports the error
69 void SerialErrorcxx . . $ SerialError(d4f767463ce0a6b3).(int error);
70
71 // returns the serialnumber of the user
72 uint32_tcxx . . $ uint32_t# SerialGetSerialNumcxx . . $ SerialGetSerialNum(db52760e79bf9054).(void);
73
74 /////////////////////////////////////////////////////////////////////////////
75 // These are the functions used for serialization
76 // if this function returns:
77 // 1 : than it's a serialized exe, num will be given the serial num
78 // 0 : than it isn't a serialized exe
79 // -1 : detected a hacked exe
80 char GetInternalSerializationNumbercxx . . $ GetInternalSerializationNumber(c936d4c31c50eb30).(int *num);
81
82 #endif