| 2102 | } |
| 2103 | |
| 2104 | void InvalidateInternalFiles(TMPQArchive * ha) |
| 2105 | { |
| 2106 | // Do nothing if we are in the middle of saving internal files |
| 2107 | if(!(ha->dwFlags & MPQ_FLAG_SAVING_TABLES)) |
| 2108 | { |
| 2109 | // |
| 2110 | // We clear the file entries for (listfile), (attributes) and (signature) |
| 2111 | // For each internal file cleared, we increment the number |
| 2112 | // of reserved entries in the file table. |
| 2113 | // |
| 2114 | |
| 2115 | // Invalidate the (listfile), if not done yet |
| 2116 | if((ha->dwFlags & (MPQ_FLAG_LISTFILE_NONE | MPQ_FLAG_LISTFILE_NEW)) == 0) |
| 2117 | { |
| 2118 | ha->dwFileFlags1 = InvalidateInternalFile(ha, LISTFILE_NAME, MPQ_FLAG_LISTFILE_NONE, MPQ_FLAG_LISTFILE_NEW); |
| 2119 | } |
| 2120 | |
| 2121 | // Invalidate the (attributes), if not done yet |
| 2122 | if((ha->dwFlags & (MPQ_FLAG_ATTRIBUTES_NONE | MPQ_FLAG_ATTRIBUTES_NEW)) == 0) |
| 2123 | { |
| 2124 | ha->dwFileFlags2 = InvalidateInternalFile(ha, ATTRIBUTES_NAME, MPQ_FLAG_ATTRIBUTES_NONE, MPQ_FLAG_ATTRIBUTES_NEW); |
| 2125 | } |
| 2126 | |
| 2127 | // Invalidate the (signature), if not done yet |
| 2128 | if((ha->dwFlags & (MPQ_FLAG_SIGNATURE_NONE | MPQ_FLAG_SIGNATURE_NEW)) == 0) |
| 2129 | { |
| 2130 | ha->dwFileFlags3 = InvalidateInternalFile(ha, SIGNATURE_NAME, MPQ_FLAG_SIGNATURE_NONE, MPQ_FLAG_SIGNATURE_NEW); |
| 2131 | } |
| 2132 | |
| 2133 | // Remember that the MPQ has been changed |
| 2134 | ha->dwFlags |= MPQ_FLAG_CHANGED; |
| 2135 | } |
| 2136 | } |
| 2137 | |
| 2138 | //----------------------------------------------------------------------------- |
| 2139 | // Support for file tables - hash table, block table, hi-block table |
nothing calls this directly
no test coverage detected