main/piggy.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include "types.h"
#include "inferno.h"
#include "gr.h"
#include "u_mem.h"
#include "mono.h"
#include "error.h"
#include "sounds.h"
#include "bm.h"
#include "hash.h"
#include "args.h"
#include "palette.h"
#include "gamefont.h"
#include "rle.h"
#include "screens.h"
#include "piggy.h"
#include "texmerge.h"
#include "paging.h"
#include "game.h"
#include "text.h"
#include "cfile.h"
#include "newmenu.h"
#include "custom.h"

Classes

struct  BitmapFile
struct  SoundFile
struct  DiskBitmapHeader
struct  DiskSoundHeader

Defines

#define DBM_FLAG_LARGE   128
#define DBM_FLAG_ABM   64
#define PIGGY_BUFFER_SIZE   (2048*1024)
#define NUM_GAUGE_BITMAPS   10

Functions

int piggy_is_substitutable_bitmap (char *name, char *subst_name)
void piggy_get_bitmap_name (int i, char *name)
bitmap_index piggy_register_bitmap (grs_bitmap *bmp, char *name, int in_file)
int piggy_register_sound (digi_sound *snd, char *name, int in_file)
bitmap_index piggy_find_bitmap (char *name)
int piggy_find_sound (char *name)
void piggy_close_file ()
void bm_read_all (CFILE *fp)
int piggy_init ()
int piggy_is_needed (int soundnum)
void piggy_read_sounds ()
void piggy_critical_error ()
void piggy_bitmap_page_in (bitmap_index bitmap)
void piggy_bitmap_page_out_all ()
void piggy_load_level_data ()
void piggy_close ()
int piggy_does_bitmap_exist_slow (char *name)
int piggy_is_gauge_bitmap (char *base_name)

Variables

ubyteBitmapBits = NULL
ubyteSoundBits = NULL
hashtable AllBitmapsNames
hashtable AllDigiSndNames
int Num_bitmap_files = 0
int Num_sound_files = 0
digi_sound GameSounds [MAX_SOUND_FILES]
int SoundOffset [MAX_SOUND_FILES]
grs_bitmap GameBitmaps [MAX_BITMAP_FILES]
int Num_bitmap_files_new = 0
int Num_sound_files_new = 0
static BitmapFile AllBitmaps [MAX_BITMAP_FILES]
static SoundFile AllSounds [MAX_SOUND_FILES]
int piggy_low_memory = 0
int Piggy_bitmap_cache_size = 0
int Piggy_bitmap_cache_next = 0
ubytePiggy_bitmap_cache_data = NULL
int GameBitmapOffset [MAX_BITMAP_FILES]
ubyte GameBitmapFlags [MAX_BITMAP_FILES]
ushort GameBitmapXlat [MAX_BITMAP_FILES]
int piggy_page_flushed = 0
ubyte BigPig = 0
CFILEPiggy_fp = NULL
ubyte bogus_data [64 *64]
grs_bitmap bogus_bitmap
ubyte bogus_bitmap_initialized = 0
digi_sound bogus_sound
int descent_critical_error
unsigned descent_critical_deverror
unsigned descent_critical_errcode
char * crit_errors [13]
char * gauge_bitmap_names [NUM_GAUGE_BITMAPS] = { "gauge01", "gauge02", "gauge06", "targ01", "targ02", "targ03", "targ04", "targ05", "targ06", "gauge18" }

Define Documentation

#define DBM_FLAG_ABM   64
 

#define DBM_FLAG_LARGE   128
 

#define NUM_GAUGE_BITMAPS   10
 

#define PIGGY_BUFFER_SIZE   (2048*1024)
 


Function Documentation

void bm_read_all CFILE fp  ) 
 

void piggy_bitmap_page_in bitmap_index  bitmap  ) 
 

void piggy_bitmap_page_out_all  ) 
 

void piggy_close  ) 
 

void piggy_close_file  ) 
 

void piggy_critical_error  ) 
 

int piggy_does_bitmap_exist_slow char *  name  ) 
 

bitmap_index piggy_find_bitmap char *  name  ) 
 

int piggy_find_sound char *  name  ) 
 

void piggy_get_bitmap_name int  i,
char *  name
 

int piggy_init  ) 
 

int piggy_is_gauge_bitmap char *  base_name  ) 
 

int piggy_is_needed int  soundnum  ) 
 

int piggy_is_substitutable_bitmap char *  name,
char *  subst_name
 

void piggy_load_level_data  ) 
 

void piggy_read_sounds  ) 
 

bitmap_index piggy_register_bitmap grs_bitmap bmp,
char *  name,
int  in_file
 

int piggy_register_sound digi_sound snd,
char *  name,
int  in_file
 


Variable Documentation

BitmapFile AllBitmaps[MAX_BITMAP_FILES] [static]
 

hashtable AllBitmapsNames
 

hashtable AllDigiSndNames
 

SoundFile AllSounds[MAX_SOUND_FILES] [static]
 

ubyte BigPig = 0
 

ubyte* BitmapBits = NULL
 

grs_bitmap bogus_bitmap
 

ubyte bogus_bitmap_initialized = 0
 

ubyte bogus_data[64 *64]
 

digi_sound bogus_sound
 

char* crit_errors[13]
 

Initial value:

 { "Write Protected", "Unknown Unit", "Drive Not Ready", "Unknown Command", "CRC Error",
"Bad struct length", "Seek Error", "Unknown media type", "Sector not found", "Printer out of paper", "Write Fault",
"Read fault", "General Failure" }

unsigned descent_critical_deverror
 

unsigned descent_critical_errcode
 

int descent_critical_error
 

ubyte GameBitmapFlags[MAX_BITMAP_FILES]
 

int GameBitmapOffset[MAX_BITMAP_FILES]
 

grs_bitmap GameBitmaps[MAX_BITMAP_FILES]
 

ushort GameBitmapXlat[MAX_BITMAP_FILES]
 

digi_sound GameSounds[MAX_SOUND_FILES]
 

char* gauge_bitmap_names[NUM_GAUGE_BITMAPS] = { "gauge01", "gauge02", "gauge06", "targ01", "targ02", "targ03", "targ04", "targ05", "targ06", "gauge18" }
 

int Num_bitmap_files = 0
 

int Num_bitmap_files_new = 0
 

int Num_sound_files = 0
 

int Num_sound_files_new = 0
 

ubyte* Piggy_bitmap_cache_data = NULL
 

int Piggy_bitmap_cache_next = 0
 

int Piggy_bitmap_cache_size = 0
 

CFILE* Piggy_fp = NULL
 

int piggy_low_memory = 0
 

int piggy_page_flushed = 0
 

ubyte* SoundBits = NULL
 

int SoundOffset[MAX_SOUND_FILES]
 


Generated on Mon Aug 28 20:55:33 2006 for D1X-Rebirth by  doxygen 1.4.6