FS2_Open
Open source remastering of the Freespace 2 engine
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
cfilearchive.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) Volition, Inc. 1999. All rights reserved.
3
*
4
* All source code herein is the property of Volition, Inc. You may not sell
5
* or otherwise commercially exploit the source or things you created based on the
6
* source.
7
*
8
*/
9
10
11
12
#ifndef _CFILEARCHIVE_H
13
#define _CFILEARCHIVE_H
14
15
#ifndef _CFILE_INTERNAL
16
#error This file should only be included internally in CFILE!!
17
#endif
18
19
// The following Cfile_block data is private to cfile.cpp
20
// DO NOT MOVE the Cfile_block* information to cfile.h / do not extern this data
21
//
22
#define CFILE_BLOCK_UNUSED 0
23
#define CFILE_BLOCK_USED 1
24
25
typedef
struct
Cfile_block
{
26
int
type
;
// CFILE_BLOCK_UNUSED, CFILE_BLOCK_USED
27
int
dir_type
;
// directory location
28
FILE *
fp
;
// File pointer if opening an individual file
29
void
*
data
;
// Pointer for memory-mapped file access. NULL if not mem-mapped.
30
#ifdef _WIN32
31
HANDLE
hInFile;
// Handle from CreateFile()
32
HANDLE
hMapFile;
// Handle from CreateFileMapping()
33
#else
34
// int fd; // file descriptor
35
size_t
data_length
;
// length of data for mmap
36
#endif
37
int
lib_offset
;
38
int
raw_position
;
39
int
size
;
// for packed files
40
41
size_t
max_read_len
;
// max read offset, for special error handling
42
43
const
char
*
source_file
;
44
int
line_num
;
45
}
Cfile_block
;
46
47
#define MAX_CFILE_BLOCKS 64
48
extern
Cfile_block
Cfile_block_list
[
MAX_CFILE_BLOCKS
];
49
50
// Called once to setup the low-level reading code.
51
void
cf_init_lowlevel_read_code
(
CFILE
*
cfile
,
int
lib_offset,
int
size
,
int
pos
);
52
53
#endif
MAX_CFILE_BLOCKS
#define MAX_CFILE_BLOCKS
Definition:
cfilearchive.h:47
Cfile_block::raw_position
int raw_position
Definition:
cfilearchive.h:38
cf_init_lowlevel_read_code
void cf_init_lowlevel_read_code(CFILE *cfile, int lib_offset, int size, int pos)
Definition:
cfilearchive.cpp:36
Cfile_block::fp
FILE * fp
Definition:
cfilearchive.h:28
CFILE
Definition:
cfile.h:28
Cfile_block::max_read_len
size_t max_read_len
Definition:
cfilearchive.h:41
size
GLsizeiptr size
Definition:
Glext.h:5496
Cfile_block::data
void * data
Definition:
cfilearchive.h:29
Cfile_block::data_length
size_t data_length
Definition:
cfilearchive.h:35
Cfile_block::line_num
int line_num
Definition:
cfilearchive.h:44
cfile
Definition:
cfile.h:354
Cfile_block::dir_type
int dir_type
Definition:
cfilearchive.h:27
Cfile_block::size
int size
Definition:
cfilearchive.h:39
Cfile_block
struct Cfile_block Cfile_block
Cfile_block::source_file
const char * source_file
Definition:
cfilearchive.h:43
pos
hull_check pos
Definition:
lua.cpp:5050
Cfile_block
Definition:
cfilearchive.h:25
Cfile_block::lib_offset
int lib_offset
Definition:
cfilearchive.h:37
Cfile_block_list
Cfile_block Cfile_block_list[MAX_CFILE_BLOCKS]
Definition:
cfile.cpp:99
HANDLE
void * HANDLE
Definition:
config.h:106
Cfile_block::type
int type
Definition:
cfilearchive.h:26
code
cfile
cfilearchive.h
Generated on Sun May 1 2016 16:22:09 for FS2_Open by
1.8.10