Debian Codegraph @

manage/megapage.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
19 #ifndef MEGACELLPAGE_H
20 #define MEGACELLPAGE_Hcxx . . $ `manage/megapage.h:20:9`!
21
22 #include "manage.h"cxx . . $ `<file>/lib/manage.h`/
23 #include "megacell.h"cxx . . $ `<file>/lib/megacell.h`/
24 #include "cfile.h"cxx . . $ `<file>/cfile/cfile.h`/
25 #include "pstypes.h"cxx . . $ `<file>/lib/pstypes.h`/
26
27 struct mngs_megacell_pagecxx . . $ mngs_megacell_page# {
28 megacellcxx . . $ megacell# megacell_structcxx . . $ mngs_megacell_page#megacell_struct.;
29 char cellnamecxx . . $ mngs_megacell_page#cellname.[MAX_MEGACELL_WIDTHcxx . . $ `lib/megacell.h:31:9`! * MAX_MEGACELL_HEIGHTcxx . . $ `lib/megacell.h:32:9`!][PAGENAME_LENcxx . . $ `lib/manage_external.h:49:9`!];
30 };
31
32 // Megacell page functions
33 //---------------------------------------------------------------
34
35 // Given an open file pointer and a megacell_page struct, writes that megacellpage out
36 void mng_WriteMegacellPagecxx . . $ mng_WriteMegacellPage(7620e86f5f7cdcdf).(CFILEcxx . . $ CFILE# *outfile, mngs_megacell_pagecxx . . $ mngs_megacell_page# *megacellpage);
37
38 // Reads a megacell page from an open file. Returns 0 on error.
39 int mng_ReadMegacellPagecxx . . $ mng_ReadMegacellPage(5dec59790525c329).(CFILEcxx . . $ CFILE# *infile, mngs_megacell_pagecxx . . $ mngs_megacell_page# *megacellpage);
40
41 // Given an open file pointer and a megacell_page struct, writes that megacellpage out
42 void mng_WriteNewMegacellPagecxx . . $ mng_WriteNewMegacellPage(7620e86f5f7cdcdf).(CFILEcxx . . $ CFILE# *outfile, mngs_megacell_pagecxx . . $ mngs_megacell_page# *megacellpage);
43
44 // Reads a megacell page from an open file. Returns 0 on error.
45 int mng_ReadNewMegacellPagecxx . . $ mng_ReadNewMegacellPage(5dec59790525c329).(CFILEcxx . . $ CFILE# *infile, mngs_megacell_pagecxx . . $ mngs_megacell_page# *megacellpage);
46
47 // Reads in the megacellpage named "name" into megacellpage struct
48 // Returns 0 on error or couldn't find, else 1 if all is good
49 int mng_FindSpecificMegacellPagecxx . . $ mng_FindSpecificMegacellPage(da122377c59e4dac).(char *name, mngs_megacell_pagecxx . . $ mngs_megacell_page# *megacellpage, int local);
50
51 // Given a megacell page, allocs a megacell and calls AssignMegacellPageToMegacell to actually
52 // load model and values. Rturns megacell handle on success, -1 if fail
53 int mng_SetAndLoadMegacellcxx . . $ mng_SetAndLoadMegacell(ac545ba2fe660cd0).(mngs_megacell_pagecxx . . $ mngs_megacell_page# *megacellpage);
54
55 // Given a megacellpage and a megacell handle, attempts to make megacell n correspond to
56 // to the megacellpage.
57 // Returns 1 on success, 0 otherwise
58 int mng_AssignMegacellPageToMegacellcxx . . $ mng_AssignMegacellPageToMegacell(89d3a0491605feda).(mngs_megacell_pagecxx . . $ mngs_megacell_page# *megacellpage, int n);
59
60 // Copies values from a Megacell into a megacell_page
61 void mng_AssignMegacellToMegacellPagecxx . . $ mng_AssignMegacellToMegacellPage(9daa74137d083c5a).(int n, mngs_megacell_pagecxx . . $ mngs_megacell_page# *megacellpage);
62
63 // Reads in a megacell page from the local table file, superseding any megacell
64 // already in RAM with that same name
65 void mng_LoadLocalMegacellPagecxx . . $ mng_LoadLocalMegacellPage(3639e799710acb68).(CFILEcxx . . $ CFILE# *);
66
67 // Reads in a page off the net
68 void mng_LoadNetMegacellPagecxx . . $ mng_LoadNetMegacellPage(3639e799710acb68).(CFILEcxx . . $ CFILE# *);
69
70 #endif