| 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 MANAGE_H |
| 20 | #define MANAGE_Hcxx . . $ `lib/manage.h:20:9`! |
| 21 | |
| 22 | #include <cstdio> |
| 23 | #include <filesystem> |
| 24 | |
| 25 | #include "cfile.h"cxx . . $ `<file>/cfile/cfile.h`/ |
| 26 | #include "bitmap.h"cxx . . $ `<file>/lib/bitmap.h`/ |
| 27 | #include "manage_external.h"cxx . . $ `<file>/lib/manage_external.h`/ |
| 28 | |
| 29 | #if defined(POSIXcxx . . $ `<built-in>:480:9`!) |
| 30 | #include "linux_fix.h"cxx . . $ `<file>/linux/linux_fix.h`/ //for strnicmp,etc. |
| 31 | #endif |
| 32 | |
| 33 | #define LOCAL_TABLEcxx . . $ `lib/manage.h:33:9`! "Table.loc" |
| 34 | #define TEMP_LOCAL_TABLEcxx . . $ `lib/manage.h:34:9`! "Tablr.loc" |
| 35 | |
| 36 | #define NET_TABLEcxx . . $ `lib/manage.h:36:9`! "Table.gam" |
| 37 | #define TEMP_NET_TABLEcxx . . $ `lib/manage.h:37:9`! "Tablr.tmp" |
| 38 | |
| 39 | // Notes: Pagelocks are for keeping track of what pages are locked by which users |
| 40 | // Tracklocks are for keeping track of what pages the local user is working on or has locked |
| 41 | |
| 42 | #define PAGELOCK_NAME_LENcxx . . $ `lib/manage.h:42:9`! 30 |
| 43 | #define TABLE_NAME_LENcxx . . $ `lib/manage.h:43:9`! _MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`! |
| 44 | #define INFO_STRING_LENcxx . . $ `lib/manage.h:44:9`! 100 |
| 45 | #define MAX_PAGELOCKScxx . . $ `lib/manage.h:45:9`! 1000 |
| 46 | #define MAX_TRACKLOCKScxx . . $ `lib/manage.h:46:9`! 5000 |
| 47 | |
| 48 | #define PAGETYPE_UNKNOWNcxx . . $ `lib/manage.h:48:9`! 0 |
| 49 | #define PAGETYPE_TEXTUREcxx . . $ `lib/manage.h:49:9`! 1 |
| 50 | #define PAGETYPE_WEAPONcxx . . $ `lib/manage.h:50:9`! 2 |
| 51 | #define PAGETYPE_ROBOTcxx . . $ `lib/manage.h:51:9`! 3 |
| 52 | #define PAGETYPE_POWERUPcxx . . $ `lib/manage.h:52:9`! 4 |
| 53 | #define PAGETYPE_DOORcxx . . $ `lib/manage.h:53:9`! 5 |
| 54 | #define PAGETYPE_SHIPcxx . . $ `lib/manage.h:54:9`! 6 |
| 55 | #define PAGETYPE_SOUNDcxx . . $ `lib/manage.h:55:9`! 7 |
| 56 | #define PAGETYPE_MEGACELLcxx . . $ `lib/manage.h:56:9`! 8 |
| 57 | #define PAGETYPE_GAMEFILEcxx . . $ `lib/manage.h:57:9`! 9 |
| 58 | #define PAGETYPE_GENERICcxx . . $ `lib/manage.h:58:9`! 10 |
| 59 | |
| 60 | struct mngs_Pagelockcxx . . $ mngs_Pagelock# { |
| 61 | uint8_tcxx . . $ uint8_t# pagetypecxx . . $ mngs_Pagelock#pagetype.; // of type PAGETYPE above |
| 62 | char namecxx . . $ mngs_Pagelock#name.[PAGENAME_LENcxx . . $ `lib/manage_external.h:49:9`!]; |
| 63 | char holdercxx . . $ mngs_Pagelock#holder.[PAGENAME_LENcxx . . $ `lib/manage_external.h:49:9`!]; |
| 64 | }; |
| 65 | |
| 66 | struct mngs_track_lockcxx . . $ mngs_track_lock# { |
| 67 | uint8_tcxx . . $ uint8_t# usedcxx . . $ mngs_track_lock#used.; |
| 68 | uint8_tcxx . . $ uint8_t# overlaycxx . . $ mngs_track_lock#overlay.; |
| 69 | uint8_tcxx . . $ uint8_t# pagetypecxx . . $ mngs_track_lock#pagetype.; |
| 70 | uint8_tcxx . . $ uint8_t# __padcxx . . $ mngs_track_lock#__pad.; |
| 71 | int stack_fileposcxx . . $ mngs_track_lock#stack_filepos.; // file position of this page in the tablefile (the value we are |
| 72 | // pushing, for addon tables) |
| 73 | char namecxx . . $ mngs_track_lock#name.[PAGENAME_LENcxx . . $ `lib/manage_external.h:49:9`!]; |
| 74 | }; |
| 75 | |
| 76 | // For addon data |
| 77 | #define MAX_ADDON_TRACKLOCKScxx . . $ `lib/manage.h:77:9`! 1000 |
| 78 | #define MAX_ADDON_TABLEScxx . . $ `lib/manage.h:78:9`! 2 |
| 79 | |
| 80 | struct AddOnTablefilecxx . . $ AddOnTablefile# { |
| 81 | char AddOnTableFilenamecxx . . $ AddOnTablefile#AddOnTableFilename.[TABLE_NAME_LENcxx . . $ `lib/manage.h:43:9`!]; |
| 82 | int Num_addon_tracklockscxx . . $ AddOnTablefile#Num_addon_tracklocks.; |
| 83 | mngs_track_lockcxx . . $ mngs_track_lock# *Addon_tracklockscxx . . $ AddOnTablefile#Addon_tracklocks.; |
| 84 | }; |
| 85 | extern AddOnTablefilecxx . . $ AddOnTablefile# AddOnDataTablescxx . . $ AddOnDataTables.[MAX_ADDON_TABLEScxx . . $ `lib/manage.h:78:9`!]; |
| 86 | extern int Num_addon_tablescxx . . $ Num_addon_tables.; |
| 87 | |
| 88 | // Takes our addon pages and frees/restores our data to the appropriate pages |
| 89 | void mng_PopAddonPagescxx . . $ mng_PopAddonPages(49f6e7a06ebc5aa8).(); |
| 90 | |
| 91 | // Simply sets no addon data to be loaded |
| 92 | void mng_ClearAddonTablescxx . . $ mng_ClearAddonTables(49f6e7a06ebc5aa8).(); |
| 93 | |
| 94 | // Push the given table file as an addon table file |
| 95 | // returns true on success |
| 96 | bool mng_SetAddonTablecxx . . $ mng_SetAddonTable(c6b7e35ff6de5671).(char *name); |
| 97 | |
| 98 | // Pushes an addon pack onto the stack so we can keep track of it |
| 99 | void mng_PushAddonPagecxx . . $ mng_PushAddonPage(99469d7ff9a1485a).(int pagetype, char *name, int overlay); |
| 100 | |
| 101 | // Loads and allocs all pages found locally |
| 102 | void mng_LoadAddonPagescxx . . $ mng_LoadAddonPages(49f6e7a06ebc5aa8).(); |
| 103 | |
| 104 | // signifies whether or not the network is up |
| 105 | extern int Network_upcxx . . $ Network_up., Stand_alonecxx . . $ Stand_alone.; |
| 106 | |
| 107 | // Starting editor? |
| 108 | extern int Starting_editorcxx . . $ Starting_editor., Loading_localscxx . . $ Loading_locals., Loading_addon_tablecxx . . $ Loading_addon_table.; |
| 109 | |
| 110 | extern char LocalD3Dircxx . . $ LocalD3Dir.[]; |
| 111 | extern char NetD3Dircxx . . $ NetD3Dir.[]; |
| 112 | extern char TableFilenamecxx . . $ TableFilename.[]; |
| 113 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# TableLockFilenamecxx . . $ TableLockFilename.; |
| 114 | extern char LocalTableFilenamecxx . . $ LocalTableFilename.[]; |
| 115 | extern char LocalTempTableFilenamecxx . . $ LocalTempTableFilename.[]; |
| 116 | extern char LocalLevelsDircxx . . $ LocalLevelsDir.[]; |
| 117 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# ManageGraphicsDircxx . . $ ManageGraphicsDir.; |
| 118 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# LocalManageGraphicsDircxx . . $ LocalManageGraphicsDir.; |
| 119 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# LocalModelsDircxx . . $ LocalModelsDir.; |
| 120 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# NetModelsDircxx . . $ NetModelsDir.; |
| 121 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# LocalSoundsDircxx . . $ LocalSoundsDir.; |
| 122 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# NetSoundsDircxx . . $ NetSoundsDir.; |
| 123 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# LocalRoomsDircxx . . $ LocalRoomsDir.; |
| 124 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# NetRoomsDircxx . . $ NetRoomsDir.; |
| 125 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# LocalTableDircxx . . $ LocalTableDir.; |
| 126 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# NetMiscDircxx . . $ NetMiscDir.; |
| 127 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# LocalMiscDircxx . . $ LocalMiscDir.; |
| 128 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# NetMusicDircxx . . $ NetMusicDir.; |
| 129 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# LocalMusicDircxx . . $ LocalMusicDir.; |
| 130 | extern char NetScriptDircxx . . $ NetScriptDir.[]; |
| 131 | extern char LocalScriptDircxx . . $ LocalScriptDir.[]; |
| 132 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# NetArtDircxx . . $ NetArtDir.; |
| 133 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# LocalArtDircxx . . $ LocalArtDir.; |
| 134 | |
| 135 | extern char LocalCustomGraphicsDircxx . . $ LocalCustomGraphicsDir.[]; |
| 136 | extern char LocalCustomSoundsDircxx . . $ LocalCustomSoundsDir.[]; |
| 137 | |
| 138 | extern char TempTableFilenamecxx . . $ TempTableFilename.[]; |
| 139 | extern char TempTableLockFilenamecxx . . $ TempTableLockFilename.[]; |
| 140 | extern char ErrorStringcxx . . $ ErrorString.[INFO_STRING_LENcxx . . $ `lib/manage.h:44:9`!]; |
| 141 | extern char InfoStringcxx . . $ InfoString.[INFO_STRING_LENcxx . . $ `lib/manage.h:44:9`!]; |
| 142 | extern char TableUsercxx . . $ TableUser.[]; |
| 143 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# LockerFilecxx . . $ LockerFile.; |
| 144 | extern stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# VersionFilecxx . . $ VersionFile.; |
| 145 | extern mngs_Pagelockcxx . . $ mngs_Pagelock# GlobalPagelockscxx . . $ GlobalPagelocks.[]; |
| 146 | extern mngs_track_lockcxx . . $ mngs_track_lock# GlobalTrackLockscxx . . $ GlobalTrackLocks.[]; |
| 147 | |
| 148 | int mng_InitTableFilescxx . . $ mng_InitTableFiles(b126dc7c1de90089).(); |
| 149 | |
| 150 | // Loads our tables |
| 151 | int mng_LoadTableFilescxx . . $ mng_LoadTableFiles(7864480464b09eea).(int show_progress); |
| 152 | |
| 153 | int mng_InitLocalTablescxx . . $ mng_InitLocalTables(b126dc7c1de90089).(); |
| 154 | int mng_InitNetTablescxx . . $ mng_InitNetTables(b126dc7c1de90089).(); |
| 155 | |
| 156 | // Checks to see if there is a table file...if not, create one with a dummy page |
| 157 | void mng_CheckToCreateLocalTablescxx . . $ mng_CheckToCreateLocalTables(49f6e7a06ebc5aa8).(); |
| 158 | void mng_CheckToCreateNetTablescxx . . $ mng_CheckToCreateNetTables(49f6e7a06ebc5aa8).(); |
| 159 | |
| 160 | // Creates directories if needed |
| 161 | void mng_InitLocalDirectoriescxx . . $ mng_InitLocalDirectories(49f6e7a06ebc5aa8).(); |
| 162 | void mng_InitNetDirectoriescxx . . $ mng_InitNetDirectories(49f6e7a06ebc5aa8).(); |
| 163 | |
| 164 | void mng_ReadDummyPagecxx . . $ mng_ReadDummyPage(7b459838246254f2).(CFILEcxx . . $ CFILE# *infile, uint8_tcxx . . $ uint8_t# pagetype); |
| 165 | void mng_ReadWriteDummyPagecxx . . $ mng_ReadWriteDummyPage(3a9ef30e80ec550).(CFILEcxx . . $ CFILE# *infile, CFILEcxx . . $ CFILE# *outfile, uint8_tcxx . . $ uint8_t# pagetype); |
| 166 | |
| 167 | // Function for writing out "undefined" page...useful for placeholding |
| 168 | void mng_WriteUnknownPagecxx . . $ mng_WriteUnknownPage(3639e799710acb68).(CFILEcxx . . $ CFILE# *outfile); |
| 169 | |
| 170 | // Lock functions |
| 171 | //----------------------------------------------- |
| 172 | |
| 173 | // If table lock file not found, create a dummy one |
| 174 | void mng_InitPagelockscxx . . $ mng_InitPagelocks(49f6e7a06ebc5aa8).(); |
| 175 | |
| 176 | // Writes a pagelock to an open file |
| 177 | void mng_WritePagelockcxx . . $ mng_WritePagelock(ff2922c737f3239c).(CFILEcxx . . $ CFILE# *fp, mngs_Pagelockcxx . . $ mngs_Pagelock# *pl); |
| 178 | |
| 179 | // Reads a pagelock from the fp file. Returns 1 if successfully read, 0 if eof was encountered. |
| 180 | int mng_ReadPagelockcxx . . $ mng_ReadPagelock(3ecdf56edd8e796c).(CFILEcxx . . $ CFILE# *, mngs_Pagelockcxx . . $ mngs_Pagelock# *); |
| 181 | |
| 182 | // Given a page name, checks to see if it is locked. |
| 183 | // Returns 1 if locked, 0 if not. |
| 184 | int mng_CheckIfPageLockedcxx . . $ mng_CheckIfPageLocked(3a5f8d799798b818).(mngs_Pagelockcxx . . $ mngs_Pagelock# *); |
| 185 | |
| 186 | // Given a page name, checks to see if it is locked by owner. |
| 187 | // Returns 1 if locked, 0 if not. |
| 188 | int mng_CheckIfPageOwnedcxx . . $ mng_CheckIfPageOwned(36c4fbc4bece4f16).(mngs_Pagelockcxx . . $ mngs_Pagelock# *, char *owner); |
| 189 | |
| 190 | // Given a pagelock, replaces the one already inside the lock file, or if not present, adds it to |
| 191 | // the lock file. Returns 0 on error, or 1 if successful. |
| 192 | int mng_ReplacePagelockcxx . . $ mng_ReplacePagelock(6129c99dc712daa0).(char *, mngs_Pagelockcxx . . $ mngs_Pagelock# *); |
| 193 | |
| 194 | int mng_GetListOfLockscxx . . $ mng_GetListOfLocks(1efb1472e1428b14).(mngs_Pagelockcxx . . $ mngs_Pagelock# *pl, int max, char *who); |
| 195 | |
| 196 | // Given a name and a pagetype, deletes the one already inside the lock file |
| 197 | int mng_DeletePagelockcxx . . $ mng_DeletePagelock(6abd07ddb1a912f0).(char *name, int pagetype); |
| 198 | |
| 199 | // Call this before any chokepoint functions are executed. |
| 200 | // Locks the whole table system for our exclusive use |
| 201 | // Returns 0 if can't lock |
| 202 | int mng_MakeLockercxx . . $ mng_MakeLocker(b126dc7c1de90089).(); |
| 203 | |
| 204 | // Given a list of names and a pagetype, deletes the ones already inside the lock file |
| 205 | int mng_DeletePagelockSeriescxx . . $ mng_DeletePagelockSeries(6f6099c1eba6c17c).(char *names[], int num, int pagetype); |
| 206 | |
| 207 | // Simply erases the Lockerfile |
| 208 | void mng_EraseLockercxx . . $ mng_EraseLocker(49f6e7a06ebc5aa8).(); |
| 209 | |
| 210 | // Open the net table file and read in all pages |
| 211 | int mng_LoadNetPagescxx . . $ mng_LoadNetPages(7864480464b09eea).(int show_progress); |
| 212 | int mng_LoadLocalPagescxx . . $ mng_LoadLocalPages(b126dc7c1de90089).(); |
| 213 | |
| 214 | //--------------------------------------------------------------- |
| 215 | |
| 216 | // Clear out tracklocks |
| 217 | void mng_InitTrackLockscxx . . $ mng_InitTrackLocks(49f6e7a06ebc5aa8).(); |
| 218 | |
| 219 | // Given a name, returns the index of the tracklock with that name |
| 220 | // -1 indicates that it wasn't found |
| 221 | int mng_FindTrackLockcxx . . $ mng_FindTrackLock(6abd07ddb1a912f0).(char *name, int pagetype); |
| 222 | |
| 223 | // Searches through global array of tracklocks and returns first free one |
| 224 | // returns -1 if none free |
| 225 | int mng_AllocTrackLockcxx . . $ mng_AllocTrackLock(6abd07ddb1a912f0).(char *name, int pagetype); |
| 226 | |
| 227 | // Frees a tracklock |
| 228 | void mng_FreeTrackLockcxx . . $ mng_FreeTrackLock(d4f767463ce0a6b3).(int n); |
| 229 | |
| 230 | //---------------------------------------------------------------- |
| 231 | |
| 232 | // Displays all the locks of "name" |
| 233 | void mng_DisplayLockListcxx . . $ mng_DisplayLockList(fda57c8427c60377).(char *name); |
| 234 | |
| 235 | // Renames a page on the network |
| 236 | int mng_RenamePagecxx . . $ mng_RenamePage(60b24ab836da28f5).(char *oldname, char *newname, int pagetype); |
| 237 | |
| 238 | // Removes a file, then renames another file to be the removed file. Get it? |
| 239 | // Returns 1 on success, else 0 on fail |
| 240 | int SwitcherooFilescxx . . $ SwitcherooFiles(2f051e3560ff300f).(const char *name, char *tempname); |
| 241 | |
| 242 | // Returns true if the passed in pagelock is in the LockList, else false |
| 243 | bool InLockListcxx . . $ InLockList(73051fa1db1ebefd).(mngs_Pagelockcxx . . $ mngs_Pagelock# *pl); |
| 244 | |
| 245 | // Takes a pagelock and sets its holder name to UNLOCKED |
| 246 | void mng_OverrideToUnlockedcxx . . $ mng_OverrideToUnlocked(25670cb995833605).(mngs_Pagelockcxx . . $ mngs_Pagelock# *temp_pl); |
| 247 | |
| 248 | // Returns true if the passed in primitive is old (ie needs to be updated from the network) |
| 249 | bool IsPrimitiveOldcxx . . $ IsPrimitiveOld(c6b7e35ff6de5671).(char *name); |
| 250 | |
| 251 | // Updates a primitive if needed |
| 252 | // Localname = local version of the primname (with path) |
| 253 | // Netname = Network version of the primname (with path) |
| 254 | void UpdatePrimitivecxx . . $ UpdatePrimitive(563e7f6fc320b4cb).(const stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# &localname, const stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# &netname, char *primname, |
| 255 | int pagetype, char *pagename); |
| 256 | |
| 257 | // Writes a chunk header. Writes chunk id & placeholder length. Returns chunk start pos |
| 258 | int StartManagePagecxx . . $ StartManagePage(d1801a78c3072b68).(CFILEcxx . . $ CFILE# *ofile, uint8_tcxx . . $ uint8_t# pagetype); |
| 259 | |
| 260 | // Fill in page length when done writing |
| 261 | void EndManagePagecxx . . $ EndManagePage(966989f25543eb13).(CFILEcxx . . $ CFILE# *ofile, int chunk_start_pos); |
| 262 | |
| 263 | struct physics_infocxx . . $ physics_info#; |
| 264 | struct otype_wb_infocxx . . $ otype_wb_info#; |
| 265 | |
| 266 | // Reads a physics chunk in from the table file |
| 267 | void mng_ReadPhysicsChunkcxx . . $ mng_ReadPhysicsChunk(94fabf1e8396697f).(physics_infocxx . . $ physics_info# *phys_info, CFILEcxx . . $ CFILE# *infile); |
| 268 | void mng_WritePhysicsChunkcxx . . $ mng_WritePhysicsChunk(94fabf1e8396697f).(physics_infocxx . . $ physics_info# *phys_info, CFILEcxx . . $ CFILE# *outfile); |
| 269 | |
| 270 | // Writes out weapon battery info |
| 271 | void mng_WriteWeaponBatteryChunkcxx . . $ mng_WriteWeaponBatteryChunk(ad20a081f57bd899).(otype_wb_infocxx . . $ otype_wb_info# *static_wb, CFILEcxx . . $ CFILE# *outfile); |
| 272 | |
| 273 | // Reads in weapon battery info |
| 274 | void mng_ReadWeaponBatteryChunkcxx . . $ mng_ReadWeaponBatteryChunk(14ef5bf56b093803).(otype_wb_infocxx . . $ otype_wb_info# *static_wb, CFILEcxx . . $ CFILE# *infile, int version); |
| 275 | |
| 276 | // Given a texture handle, searches the table file and replaces the texture with the same name |
| 277 | // If local=1, then does it to the users local copy |
| 278 | // Returns 0 on error, else 1 if all is good |
| 279 | int mng_ReplacePagecxx . . $ mng_ReplacePage(80ec76f00b6174b2).(char *srcname, char *destname, int handle, int dest_pagetype, int local); |
| 280 | |
| 281 | // Given a texture name, finds it in the table file and deletes it |
| 282 | // If local is 1, deletes from the local table file |
| 283 | int mng_DeletePagecxx . . $ mng_DeletePage(fa3df6d5de4c4541).(char *name, int dest_pagetype, int local); |
| 284 | |
| 285 | void mng_FreePagetypePrimitivescxx . . $ mng_FreePagetypePrimitives(99469d7ff9a1485a).(int pagetype, char *name, int freetype); |
| 286 | |
| 287 | extern int Old_table_methodcxx . . $ Old_table_method.; |
| 288 | |
| 289 | // Error reporting |
| 290 | void DataErrorcxx . . $ DataError(326aeb464d16410c).(const char *fmt, ...); |
| 291 | |
| 292 | #endif |