3f59fc8b77
This is a port of Wolf4SDL, which is derived from the original id software source release. The port runs on top of the SDL plugin runtime and is loaded as an overlay. Licensing of the game code is not an issue, as discussed below (essentially, the Debian project treats Wolf4SDL as GPLv2, with an email from John Carmack backing it up): http://forums.rockbox.org/index.php?topic=52872 Included is a copy of MAME's Yamaha OPL sound chip emulator (fmopl_gpl.c). This file was not part of the original Wolf4SDL source (which includes a non-GPL'd version), but was rather rebased from from a later MAME source which had been relicensed to GPLv2. Change-Id: I64c2ba035e0be7e2f49252f40640641416613439
60 lines
1.5 KiB
C
60 lines
1.5 KiB
C
#ifndef __ID_CA__
|
|
#define __ID_CA__
|
|
|
|
//===========================================================================
|
|
|
|
#define NUMMAPS 60
|
|
#ifdef USE_FLOORCEILINGTEX
|
|
#define MAPPLANES 3
|
|
#else
|
|
#define MAPPLANES 2
|
|
#endif
|
|
|
|
#define UNCACHEGRCHUNK(chunk) {if(grsegs[chunk]) {free(grsegs[chunk]); grsegs[chunk]=NULL;}}
|
|
#define UNCACHEAUDIOCHUNK(chunk) {if(audiosegs[chunk]) {free(audiosegs[chunk]); audiosegs[chunk]=NULL;}}
|
|
|
|
//===========================================================================
|
|
|
|
typedef struct
|
|
{
|
|
int32_t planestart[3];
|
|
word planelength[3];
|
|
word width,height;
|
|
char name[16];
|
|
} maptype;
|
|
|
|
//===========================================================================
|
|
|
|
extern int mapon;
|
|
|
|
extern word *mapsegs[MAPPLANES];
|
|
extern byte *audiosegs[NUMSNDCHUNKS];
|
|
extern byte *grsegs[NUMCHUNKS];
|
|
|
|
extern char extension[5];
|
|
extern char graphext[5];
|
|
extern char audioext[5];
|
|
|
|
//===========================================================================
|
|
|
|
boolean CA_LoadFile (const char *filename, memptr *ptr);
|
|
boolean CA_WriteFile (const char *filename, void *ptr, int32_t length);
|
|
|
|
int32_t CA_RLEWCompress (word *source, int32_t length, word *dest, word rlewtag);
|
|
|
|
void CA_RLEWexpand (word *source, word *dest, int32_t length, word rlewtag);
|
|
|
|
void CA_Startup (void);
|
|
void CA_Shutdown (void);
|
|
|
|
int32_t CA_CacheAudioChunk (int chunk);
|
|
void CA_LoadAllSounds (void);
|
|
|
|
void CA_CacheGrChunk (int chunk);
|
|
void CA_CacheMap (int mapnum);
|
|
|
|
void CA_CacheScreen (int chunk);
|
|
|
|
void CA_CannotOpen(const char *name);
|
|
|
|
#endif
|