SHAREWARE fixes

This commit is contained in:
Bradley Bell 2002-07-30 04:52:45 +00:00
parent c592b9d5fb
commit 18eeeb657e
4 changed files with 25 additions and 9 deletions

View file

@ -16,7 +16,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#endif
#ifdef RCS
static char rcsid[] = "$Id: gamemine.c,v 1.5 2002-07-30 04:52:01 btb Exp $";
static char rcsid[] = "$Id: gamemine.c,v 1.6 2002-07-30 04:52:45 btb Exp $";
#endif
#include <stdio.h>
@ -656,6 +656,7 @@ int load_mine_data_compiled(CFILE *LoadFile)
for (i = 0; i < Num_vertices; i++)
cfile_read_vector( &(Vertices[i]), LoadFile);
for (segnum=0; segnum<Num_segments; segnum++ ) {
#ifdef EDITOR
@ -663,8 +664,6 @@ int load_mine_data_compiled(CFILE *LoadFile)
Segments[segnum].group = 0;
#endif
printf("%4x ", cftell(LoadFile));
bit_mask = cfile_read_byte(LoadFile);
#if defined(SHAREWARE) && !defined(MACINTOSH)
@ -679,9 +678,8 @@ int load_mine_data_compiled(CFILE *LoadFile)
Segments[segnum].objects = -1;
// Read fix Segments[segnum].static_light (shift down 5 bits, write as short)
#ifdef SHAREWARE
// Read fix Segments[segnum].static_light (shift down 5 bits, write as short)
temp_ushort = cfile_read_short(LoadFile);
Segment2s[segnum].static_light = ((fix)temp_ushort) << 4;
#endif

View file

@ -16,7 +16,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#endif
#ifdef RCS
static char rcsid[] = "$Id: piggy.c,v 1.11 2002-07-30 04:52:01 btb Exp $";
static char rcsid[] = "$Id: piggy.c,v 1.12 2002-07-30 04:52:45 btb Exp $";
#endif
@ -1000,7 +1000,6 @@ int read_hamfile()
//Read sounds
printf("%#4x: reading %d x DiskSoundHeader\n", cftell(ham_fp), N_sounds);
for (i=0; i<N_sounds; i++ ) {
DiskSoundHeader_read(&sndh, ham_fp);
temp_sound.length = sndh.length;
@ -1077,7 +1076,6 @@ int read_sndfile()
//Read sounds
printf("%#4x: reading %d x DiskSoundHeader\n", cftell(snd_fp), N_sounds);
for (i=0; i<N_sounds; i++ ) {
DiskSoundHeader_read(&sndh, snd_fp);
//size -= sizeof(DiskSoundHeader);

View file

@ -48,6 +48,15 @@ typedef struct DiskBitmapHeader {
#define DISKBITMAPHEADER_SIZE 18 // for disk i/o
typedef struct DiskSoundHeader {
char name[8];
int length;
int data_length;
int offset;
} DiskSoundHeader;
#define DISKSOUNDHEADER_SIZE 20 // for disk i/o
int piggy_init();
void piggy_close();
void piggy_dump_all();
@ -114,4 +123,9 @@ void bitmap_index_read(bitmap_index *bi, CFILE *fp);
*/
void DiskBitmapHeader_read(DiskBitmapHeader *dbh, CFILE *fp);
/*
* reads a DiskSoundHeader structure from a CFILE
*/
void DiskSoundHeader_read(DiskSoundHeader *dsh, CFILE *fp);
#endif

View file

@ -16,7 +16,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#endif
#ifdef RCS
static char rcsid[] = "$Id: weapon.c,v 1.3 2002-07-26 09:22:05 btb Exp $";
static char rcsid[] = "$Id: weapon.c,v 1.4 2002-07-30 04:52:01 btb Exp $";
#endif
#include <stdlib.h>
@ -1334,12 +1334,16 @@ extern void weapon_info_read(weapon_info *wi, CFILE *fp)
wi->flash = cfile_read_byte(fp);
wi->afterburner_size = cfile_read_byte(fp);
#ifndef SHAREWARE
wi->children = cfile_read_byte(fp);
#endif
wi->energy_usage = cfile_read_fix(fp);
wi->fire_wait = cfile_read_fix(fp);
#ifndef SHAREWARE
wi->multi_damage_scale = cfile_read_fix(fp);
#endif
wi->bitmap.index = cfile_read_short(fp); // bitmap_index = short
@ -1358,5 +1362,7 @@ extern void weapon_info_read(weapon_info *wi, CFILE *fp)
wi->lifetime = cfile_read_fix(fp);
wi->damage_radius = cfile_read_fix(fp);
wi->picture.index = cfile_read_short(fp); // bitmap_index is a short
#ifndef SHAREWARE
wi->hires_picture.index = cfile_read_short(fp); // bitmap_index is a short
#endif
}