summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/progs/wolf3d/id_ca.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sdl/progs/wolf3d/id_ca.h')
-rw-r--r--apps/plugins/sdl/progs/wolf3d/id_ca.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/apps/plugins/sdl/progs/wolf3d/id_ca.h b/apps/plugins/sdl/progs/wolf3d/id_ca.h
new file mode 100644
index 0000000000..87a8886417
--- /dev/null
+++ b/apps/plugins/sdl/progs/wolf3d/id_ca.h
@@ -0,0 +1,60 @@
1#ifndef __ID_CA__
2#define __ID_CA__
3
4//===========================================================================
5
6#define NUMMAPS 60
7#ifdef USE_FLOORCEILINGTEX
8 #define MAPPLANES 3
9#else
10 #define MAPPLANES 2
11#endif
12
13#define UNCACHEGRCHUNK(chunk) {if(grsegs[chunk]) {free(grsegs[chunk]); grsegs[chunk]=NULL;}}
14#define UNCACHEAUDIOCHUNK(chunk) {if(audiosegs[chunk]) {free(audiosegs[chunk]); audiosegs[chunk]=NULL;}}
15
16//===========================================================================
17
18typedef struct
19{
20 int32_t planestart[3];
21 word planelength[3];
22 word width,height;
23 char name[16];
24} maptype;
25
26//===========================================================================
27
28extern int mapon;
29
30extern word *mapsegs[MAPPLANES];
31extern byte *audiosegs[NUMSNDCHUNKS];
32extern byte *grsegs[NUMCHUNKS];
33
34extern char extension[5];
35extern char graphext[5];
36extern char audioext[5];
37
38//===========================================================================
39
40boolean CA_LoadFile (const char *filename, memptr *ptr);
41boolean CA_WriteFile (const char *filename, void *ptr, int32_t length);
42
43int32_t CA_RLEWCompress (word *source, int32_t length, word *dest, word rlewtag);
44
45void CA_RLEWexpand (word *source, word *dest, int32_t length, word rlewtag);
46
47void CA_Startup (void);
48void CA_Shutdown (void);
49
50int32_t CA_CacheAudioChunk (int chunk);
51void CA_LoadAllSounds (void);
52
53void CA_CacheGrChunk (int chunk);
54void CA_CacheMap (int mapnum);
55
56void CA_CacheScreen (int chunk);
57
58void CA_CannotOpen(const char *name);
59
60#endif