change byte to sbyte

This commit is contained in:
Bradley Bell 2003-10-04 02:58:23 +00:00
parent 4d8844c285
commit 73b92beeac
16 changed files with 99 additions and 92 deletions

View file

@ -1,4 +1,4 @@
/* $Id: bitblt.c,v 1.10 2002-09-07 07:15:50 btb Exp $ */ /* $Id: bitblt.c,v 1.11 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -2113,11 +2113,11 @@ void gr_bm_ubitbltm(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * s
// rescalling bitmaps, 10/14/99 Jan Bobrowski jb@wizard.ae.krakow.pl // rescalling bitmaps, 10/14/99 Jan Bobrowski jb@wizard.ae.krakow.pl
inline void scale_line(byte *in, byte *out, int ilen, int olen) inline void scale_line(sbyte *in, sbyte *out, int ilen, int olen)
{ {
int a = olen/ilen, b = olen%ilen; int a = olen/ilen, b = olen%ilen;
int c = 0, i; int c = 0, i;
byte *end = out + olen; sbyte *end = out + olen;
while(out<end) { while(out<end) {
i = a; i = a;
c += b; c += b;
@ -2135,8 +2135,8 @@ inline void scale_line(byte *in, byte *out, int ilen, int olen)
void gr_bitmap_scale_to(grs_bitmap *src, grs_bitmap *dst) void gr_bitmap_scale_to(grs_bitmap *src, grs_bitmap *dst)
{ {
byte *s = src->bm_data; sbyte *s = src->bm_data;
byte *d = dst->bm_data; sbyte *d = dst->bm_data;
int h = src->bm_h; int h = src->bm_h;
int a = dst->bm_h/h, b = dst->bm_h%h; int a = dst->bm_h/h, b = dst->bm_h%h;
int c = 0, i, y; int c = 0, i, y;

View file

@ -1,5 +1,10 @@
2003-10-03 Bradley Bell <btb@icculus.org> 2003-10-03 Bradley Bell <btb@icculus.org>
* 2d/bitblt.c, cfile/cfile.c, include/cfile.h, main/ai.c,
main/ai.h, main/gamemine.c, main/gauges.c, main/kconfig.c,
main/menu.c, main/multi.c, main/multi.h, main/multibot.c,
main/newdemo.h, main/render.c, main/scores.c: change byte to sbyte
* configure.ac: better checking for timeval * configure.ac: better checking for timeval
2003-10-03 Martin Schaffner <maschaffner@gmx.ch> 2003-10-03 Martin Schaffner <maschaffner@gmx.ch>

View file

@ -1,4 +1,4 @@
/* $Id: cfile.c,v 1.17 2003-08-02 07:39:32 btb Exp $ */ /* $Id: cfile.c,v 1.18 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -745,9 +745,9 @@ short cfile_read_short(CFILE *file)
return s; return s;
} }
byte cfile_read_byte(CFILE *file) sbyte cfile_read_byte(CFILE *file)
{ {
byte b; sbyte b;
if (cfread( &b, sizeof(b), 1, file) != 1) if (cfread( &b, sizeof(b), 1, file) != 1)
Error( "Error reading byte in cfile_read_byte()" ); Error( "Error reading byte in cfile_read_byte()" );
@ -830,7 +830,7 @@ int cfile_write_short(short s, CFILE *file)
} }
int cfile_write_byte(byte b, CFILE *file) int cfile_write_byte(sbyte b, CFILE *file)
{ {
return cfwrite(&b, sizeof(b), 1, file); return cfwrite(&b, sizeof(b), 1, file);
} }

View file

@ -1,4 +1,4 @@
/* $Id: cfile.h,v 1.9 2003-06-15 04:14:53 btb Exp $ */ /* $Id: cfile.h,v 1.10 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -127,7 +127,7 @@ void cfile_set_critical_error_counter_ptr(int *ptr);
// prototypes for reading basic types from cfile // prototypes for reading basic types from cfile
int cfile_read_int(CFILE *file); int cfile_read_int(CFILE *file);
short cfile_read_short(CFILE *file); short cfile_read_short(CFILE *file);
byte cfile_read_byte(CFILE *file); sbyte cfile_read_byte(CFILE *file);
fix cfile_read_fix(CFILE *file); fix cfile_read_fix(CFILE *file);
fixang cfile_read_fixang(CFILE *file); fixang cfile_read_fixang(CFILE *file);
void cfile_read_vector(vms_vector *v, CFILE *file); void cfile_read_vector(vms_vector *v, CFILE *file);
@ -141,7 +141,7 @@ void cfile_read_string(char *buf, int n, CFILE *file);
// functions for writing cfiles // functions for writing cfiles
int cfile_write_int(int i, CFILE *file); int cfile_write_int(int i, CFILE *file);
int cfile_write_short(short s, CFILE *file); int cfile_write_short(short s, CFILE *file);
int cfile_write_byte(byte u, CFILE *file); int cfile_write_byte(sbyte u, CFILE *file);
// writes variable length, null-termined string. // writes variable length, null-termined string.
int cfile_write_string(char *buf, CFILE *file); int cfile_write_string(char *buf, CFILE *file);

View file

@ -1,4 +1,4 @@
/* $Id: ai.c,v 1.6 2003-06-16 06:57:34 btb Exp $ */ /* $Id: ai.c,v 1.7 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -268,7 +268,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include <conf.h> #include <conf.h>
#endif #endif
char ai_rcsid[] = "$Id: ai.c,v 1.6 2003-06-16 06:57:34 btb Exp $"; char ai_rcsid[] = "$Id: ai.c,v 1.7 2003-10-04 02:58:23 btb Exp $";
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -340,7 +340,7 @@ fix Last_gate_time = 0;
fix Gate_interval = F1_0*6; fix Gate_interval = F1_0*6;
fix Boss_dying_start_time; fix Boss_dying_start_time;
fix Boss_hit_time; fix Boss_hit_time;
byte Boss_dying, Boss_dying_sound_playing, unused123, unused234; sbyte Boss_dying, Boss_dying_sound_playing, unused123, unused234;
// -- MK, 10/21/95, unused! -- int Boss_been_hit=0; // -- MK, 10/21/95, unused! -- int Boss_been_hit=0;
@ -360,7 +360,7 @@ ubyte Boss_invulnerable_spot[NUM_D2_BOSSES] = {0,0,0,0,0,1, 0,1}; // Set byte
int ai_evaded=0; int ai_evaded=0;
// -- byte Super_boss_gate_list[MAX_GATE_INDEX] = {0, 1, 8, 9, 10, 11, 12, 15, 16, 18, 19, 20, 22, 0, 8, 11, 19, 20, 8, 20, 8}; // -- sbyte Super_boss_gate_list[MAX_GATE_INDEX] = {0, 1, 8, 9, 10, 11, 12, 15, 16, 18, 19, 20, 22, 0, 8, 11, 19, 20, 8, 20, 8};
int Robot_firing_enabled = 1; int Robot_firing_enabled = 1;
int Animation_enabled = 1; int Animation_enabled = 1;
@ -437,7 +437,7 @@ char state_text[8][5] = {
// Third dimension is goal state. // Third dimension is goal state.
// Result is new goal state. // Result is new goal state.
// ERR_ means something impossible has happened. // ERR_ means something impossible has happened.
byte Ai_transition_table[AI_MAX_EVENT][AI_MAX_STATE][AI_MAX_STATE] = { sbyte Ai_transition_table[AI_MAX_EVENT][AI_MAX_STATE][AI_MAX_STATE] = {
{ {
// Event = AIE_FIRE, a nearby object fired // Event = AIE_FIRE, a nearby object fired
// none rest srch lock flin fire reco // CURRENT is rows, GOAL is columns // none rest srch lock flin fire reco // CURRENT is rows, GOAL is columns
@ -1675,7 +1675,7 @@ void create_awareness_event(object *objp, int type)
} }
} }
byte New_awareness[MAX_SEGMENTS]; sbyte New_awareness[MAX_SEGMENTS];
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
void pae_aux(int segnum, int type, int level) void pae_aux(int segnum, int type, int level)

View file

@ -1,4 +1,4 @@
/* $Id: ai.h,v 1.6 2003-06-16 06:57:34 btb Exp $ */ /* $Id: ai.h,v 1.7 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -357,7 +357,7 @@ extern void ai_multi_send_robot_position(int objnum, int force);
extern int Flinch_scale; extern int Flinch_scale;
extern int Attack_scale; extern int Attack_scale;
extern byte Mike_to_matt_xlate[]; extern sbyte Mike_to_matt_xlate[];
// Amount of time since the current robot was last processed for things such as movement. // Amount of time since the current robot was last processed for things such as movement.
// It is not valid to use FrameTime because robots do not get moved every frame. // It is not valid to use FrameTime because robots do not get moved every frame.
@ -384,14 +384,14 @@ extern fix Boss_cloak_duration;
extern fix Last_gate_time; extern fix Last_gate_time;
extern fix Gate_interval; extern fix Gate_interval;
extern fix Boss_dying_start_time; extern fix Boss_dying_start_time;
extern byte Boss_dying, Boss_dying_sound_playing; extern sbyte Boss_dying, Boss_dying_sound_playing;
extern fix Boss_hit_time; extern fix Boss_hit_time;
// -- extern int Boss_been_hit; // -- extern int Boss_been_hit;
// ------ John: End of variables which must be saved as part of gamesave. ----- // ------ John: End of variables which must be saved as part of gamesave. -----
extern int ai_evaded; extern int ai_evaded;
extern byte Super_boss_gate_list[]; extern sbyte Super_boss_gate_list[];
#define MAX_GATE_INDEX 25 #define MAX_GATE_INDEX 25
extern int Ai_info_enabled; extern int Ai_info_enabled;

View file

@ -1,4 +1,4 @@
/* $Id: gamemine.c,v 1.24 2003-08-03 22:00:14 btb Exp $ */ /* $Id: gamemine.c,v 1.25 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -142,7 +142,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#endif #endif
#ifdef RCS #ifdef RCS
static char rcsid[] = "$Id: gamemine.c,v 1.24 2003-08-03 22:00:14 btb Exp $"; static char rcsid[] = "$Id: gamemine.c,v 1.25 2003-10-04 02:58:23 btb Exp $";
#endif #endif
#include <stdio.h> #include <stdio.h>
@ -203,7 +203,7 @@ typedef struct v16_segment {
#endif #endif
short objects; // pointer to objects in this segment short objects; // pointer to objects in this segment
ubyte special; // what type of center this is ubyte special; // what type of center this is
byte matcen_num; // which center segment is associated with. sbyte matcen_num; // which center segment is associated with.
short value; short value;
fix static_light; // average static light in segment fix static_light; // average static light in segment
#ifndef EDITOR #ifndef EDITOR
@ -1206,7 +1206,7 @@ int load_mine_data_compiled(CFILE *LoadFile)
int objects; // pointer to objects in this segment int objects; // pointer to objects in this segment
for (j = 0; j < MAX_SIDES_PER_SEGMENT; j++) { for (j = 0; j < MAX_SIDES_PER_SEGMENT; j++) {
byte type; // replaces num_faces and tri_edge, 1 = quad, 2 = 0:2 triangulation, 3 = 1:3 triangulation sbyte type; // replaces num_faces and tri_edge, 1 = quad, 2 = 0:2 triangulation, 3 = 1:3 triangulation
ubyte pad; //keep us longword alligned ubyte pad; //keep us longword alligned
short wall_num; short wall_num;
short tmap_num; short tmap_num;

View file

@ -1,4 +1,4 @@
/* $Id: gauges.c,v 1.8 2003-06-06 23:51:21 btb Exp $ */ /* $Id: gauges.c,v 1.9 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -640,7 +640,7 @@ fix weapon_box_fade_values[2];
#define FADE_SCALE (2*i2f(GR_FADE_LEVELS)/REARM_TIME) // fade out and back in REARM_TIME, in fade levels per seconds (int) #define FADE_SCALE (2*i2f(GR_FADE_LEVELS)/REARM_TIME) // fade out and back in REARM_TIME, in fade levels per seconds (int)
typedef struct span { typedef struct span {
byte l,r; sbyte l,r;
} span; } span;
//store delta x values from left of box //store delta x values from left of box
@ -3201,7 +3201,9 @@ rgb player_rgb[] = {
extern ubyte Newdemo_flying_guided; extern ubyte Newdemo_flying_guided;
extern int max_window_w; extern int max_window_w;
typedef struct {byte x,y;} xy; typedef struct {
sbyte x, y;
} xy;
//offsets for reticle parts: high-big high-sml low-big low-sml //offsets for reticle parts: high-big high-sml low-big low-sml
xy cross_offsets[4] = { {-8,-5}, {-4,-2}, {-4,-2}, {-2,-1} }; xy cross_offsets[4] = { {-8,-5}, {-4,-2}, {-4,-2}, {-2,-1} };

View file

@ -1,4 +1,4 @@
/* $Id: kconfig.c,v 1.22 2003-06-06 23:51:21 btb Exp $ */ /* $Id: kconfig.c,v 1.23 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -346,7 +346,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#endif #endif
#ifdef RCS #ifdef RCS
static char rcsid[] = "$Id: kconfig.c,v 1.22 2003-06-06 23:51:21 btb Exp $"; static char rcsid[] = "$Id: kconfig.c,v 1.23 2003-10-04 02:58:23 btb Exp $";
#endif #endif
#ifdef WINDOWS #ifdef WINDOWS
@ -418,7 +418,7 @@ ubyte ExtYVibrateClear=0;
#define TABLE_CREATION 1 #define TABLE_CREATION 1
// Array used to 'blink' the cursor while waiting for a keypress. // Array used to 'blink' the cursor while waiting for a keypress.
byte fades[64] = { 1,1,1,2,2,3,4,4,5,6,8,9,10,12,13,15,16,17,19,20,22,23,24,26,27,28,28,29,30,30,31,31,31,31,31,30,30,29,28,28,27,26,24,23,22,20,19,17,16,15,13,12,10,9,8,6,5,4,4,3,2,2,1,1 }; sbyte fades[64] = { 1,1,1,2,2,3,4,4,5,6,8,9,10,12,13,15,16,17,19,20,22,23,24,26,27,28,28,29,30,30,31,31,31,31,31,30,30,29,28,28,27,26,24,23,22,20,19,17,16,15,13,12,10,9,8,6,5,4,4,3,2,2,1,1 };
//char * invert_text[2] = { "N", "Y" }; //char * invert_text[2] = { "N", "Y" };
//char * joybutton_text[28] = { "BTN 1", "BTN 2", "BTN 3", "BTN 4", "", "TRIG", "LEFT", "HAT <20>", "RIGHT", "", "", "HAT €", "MID", "", "", "HAT ", "", "", "", "HAT ", "TRIG", "LEFT", "RIGHT", "", "UP","DOWN","LEFT", "RIGHT" }; //char * joybutton_text[28] = { "BTN 1", "BTN 2", "BTN 3", "BTN 4", "", "TRIG", "LEFT", "HAT <20>", "RIGHT", "", "", "HAT €", "MID", "", "", "HAT ", "", "", "", "HAT ", "TRIG", "LEFT", "RIGHT", "", "UP","DOWN","LEFT", "RIGHT" };

View file

@ -1,4 +1,4 @@
/* $Id: menu.c,v 1.25 2003-10-03 07:58:15 btb Exp $ */ /* $Id: menu.c,v 1.26 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -553,17 +553,17 @@ int do_difficulty_menu()
int Max_debris_objects, Max_objects_onscreen_detailed; int Max_debris_objects, Max_objects_onscreen_detailed;
int Max_linear_depth_objects; int Max_linear_depth_objects;
byte Object_complexity=2, Object_detail=2; sbyte Object_complexity=2, Object_detail=2;
byte Wall_detail=2, Wall_render_depth=2, Debris_amount=2, SoundChannels = 2; sbyte Wall_detail=2, Wall_render_depth=2, Debris_amount=2, SoundChannels = 2;
byte Render_depths[NUM_DETAIL_LEVELS-1] = { 6, 9, 12, 15, 50}; sbyte Render_depths[NUM_DETAIL_LEVELS-1] = { 6, 9, 12, 15, 50};
byte Max_perspective_depths[NUM_DETAIL_LEVELS-1] = { 1, 2, 3, 5, 8}; sbyte Max_perspective_depths[NUM_DETAIL_LEVELS-1] = { 1, 2, 3, 5, 8};
byte Max_linear_depths[NUM_DETAIL_LEVELS-1] = { 3, 5, 7, 10, 50}; sbyte Max_linear_depths[NUM_DETAIL_LEVELS-1] = { 3, 5, 7, 10, 50};
byte Max_linear_depths_objects[NUM_DETAIL_LEVELS-1] = { 1, 2, 3, 7, 20}; sbyte Max_linear_depths_objects[NUM_DETAIL_LEVELS-1] = { 1, 2, 3, 7, 20};
byte Max_debris_objects_list[NUM_DETAIL_LEVELS-1] = { 2, 4, 7, 10, 15}; sbyte Max_debris_objects_list[NUM_DETAIL_LEVELS-1] = { 2, 4, 7, 10, 15};
byte Max_objects_onscreen_detailed_list[NUM_DETAIL_LEVELS-1] = { 2, 4, 7, 10, 15}; sbyte Max_objects_onscreen_detailed_list[NUM_DETAIL_LEVELS-1] = { 2, 4, 7, 10, 15};
byte Smts_list[NUM_DETAIL_LEVELS-1] = { 2, 4, 8, 16, 50}; // threshold for models to go to lower detail model, gets multiplied by obj->size sbyte Smts_list[NUM_DETAIL_LEVELS-1] = { 2, 4, 8, 16, 50}; // threshold for models to go to lower detail model, gets multiplied by obj->size
byte Max_sound_channels[NUM_DETAIL_LEVELS-1] = { 2, 4, 8, 12, 16}; sbyte Max_sound_channels[NUM_DETAIL_LEVELS-1] = { 2, 4, 8, 12, 16};
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Set detail level based stuff. // Set detail level based stuff.

View file

@ -1,4 +1,4 @@
/* $Id: multi.c,v 1.12 2003-10-03 07:58:15 btb Exp $ */ /* $Id: multi.c,v 1.13 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -136,7 +136,7 @@ char multibuf[MAX_MULTI_MESSAGE_LEN+4]; // This is where multiplayer
short remote_to_local[MAX_NUM_NET_PLAYERS][MAX_OBJECTS]; // Remote object number for each local object short remote_to_local[MAX_NUM_NET_PLAYERS][MAX_OBJECTS]; // Remote object number for each local object
short local_to_remote[MAX_OBJECTS]; short local_to_remote[MAX_OBJECTS];
byte object_owner[MAX_OBJECTS]; // Who created each object in my universe, -1 = loaded at start sbyte object_owner[MAX_OBJECTS]; // Who created each object in my universe, -1 = loaded at start
int Net_create_objnums[MAX_NET_CREATE_OBJECTS]; // For tracking object creation that will be sent to remote int Net_create_objnums[MAX_NET_CREATE_OBJECTS]; // For tracking object creation that will be sent to remote
int Net_create_loc = 0; // pointer into previous array int Net_create_loc = 0; // pointer into previous array
@ -307,7 +307,7 @@ int objnum_remote_to_local(int remote_objnum, int owner)
return(result); return(result);
} }
int objnum_local_to_remote(int local_objnum, byte *owner) int objnum_local_to_remote(int local_objnum, sbyte *owner)
{ {
// Map a local object number to a remote + owner // Map a local object number to a remote + owner
@ -1527,7 +1527,7 @@ multi_do_fire(char *buf)
{ {
ubyte weapon; ubyte weapon;
char pnum; char pnum;
byte flags; sbyte flags;
//static dum=0; //static dum=0;
// Act out the actual shooting // Act out the actual shooting
@ -1823,7 +1823,7 @@ multi_do_kill(char *buf)
GET_INTEL_SHORT(killer, buf+count); GET_INTEL_SHORT(killer, buf+count);
if (killer > 0) if (killer > 0)
killer = objnum_remote_to_local(killer, (byte)buf[count+2]); killer = objnum_remote_to_local(killer, (sbyte)buf[count+2]);
#ifdef SHAREWARE #ifdef SHAREWARE
if ((Objects[killed].type != OBJ_PLAYER) && (Objects[killed].type != OBJ_GHOST)) if ((Objects[killed].type != OBJ_PLAYER) && (Objects[killed].type != OBJ_GHOST))
@ -1843,7 +1843,7 @@ multi_do_kill(char *buf)
// which means not a controlcen object, but contained in another object // which means not a controlcen object, but contained in another object
void multi_do_controlcen_destroy(char *buf) void multi_do_controlcen_destroy(char *buf)
{ {
byte who; sbyte who;
short objnum; short objnum;
GET_INTEL_SHORT(objnum, buf+1); GET_INTEL_SHORT(objnum, buf+1);
@ -1901,7 +1901,7 @@ multi_do_remobj(char *buf)
{ {
short objnum; // which object to remove short objnum; // which object to remove
short local_objnum; short local_objnum;
byte obj_owner; // which remote list is it entered in sbyte obj_owner; // which remote list is it entered in
GET_INTEL_SHORT(objnum, buf+1); GET_INTEL_SHORT(objnum, buf+1);
obj_owner = buf[3]; obj_owner = buf[3];
@ -2032,7 +2032,7 @@ void
multi_do_door_open(char *buf) multi_do_door_open(char *buf)
{ {
int segnum; int segnum;
byte side; sbyte side;
segment *seg; segment *seg;
wall *w; wall *w;
ubyte flag; ubyte flag;
@ -2896,7 +2896,7 @@ multi_send_kill(int objnum)
if (killer_objnum > -1) { if (killer_objnum > -1) {
short s; // do it with variable since INTEL_SHORT won't work on return val from function. short s; // do it with variable since INTEL_SHORT won't work on return val from function.
s = (short)objnum_local_to_remote(killer_objnum, (byte *)&multibuf[count+2]); s = (short)objnum_local_to_remote(killer_objnum, (sbyte *)&multibuf[count+2]);
PUT_INTEL_SHORT(multibuf+count, s); PUT_INTEL_SHORT(multibuf+count, s);
} }
else else
@ -2918,7 +2918,7 @@ multi_send_remobj(int objnum)
{ {
// Tell the other guy to remove an object from his list // Tell the other guy to remove an object from his list
byte obj_owner; sbyte obj_owner;
short remote_objnum; short remote_objnum;
if (Objects[objnum].type==OBJ_POWERUP && (Game_mode & GM_NETWORK)) if (Objects[objnum].type==OBJ_POWERUP && (Game_mode & GM_NETWORK))
@ -3005,7 +3005,7 @@ multi_send_door_open(int segnum, int side,ubyte flag)
multibuf[0] = MULTI_DOOR_OPEN; multibuf[0] = MULTI_DOOR_OPEN;
PUT_INTEL_SHORT(multibuf+1, segnum ); PUT_INTEL_SHORT(multibuf+1, segnum );
multibuf[3] = (byte)side; multibuf[3] = (sbyte)side;
multibuf[4] = flag; multibuf[4] = flag;
multi_send_data(multibuf, 5, 2); multi_send_data(multibuf, 5, 2);
@ -3023,7 +3023,7 @@ multi_send_door_open_specific(int pnum,int segnum, int side,ubyte flag)
multibuf[0] = MULTI_DOOR_OPEN; multibuf[0] = MULTI_DOOR_OPEN;
PUT_INTEL_SHORT(multibuf+1, segnum); PUT_INTEL_SHORT(multibuf+1, segnum);
multibuf[3] = (byte)side; multibuf[3] = (sbyte)side;
multibuf[4] = flag; multibuf[4] = flag;
network_send_naked_packet(multibuf, 5, pnum); network_send_naked_packet(multibuf, 5, pnum);
@ -3043,7 +3043,7 @@ multi_send_create_explosion(int pnum)
int count = 0; int count = 0;
multibuf[count] = MULTI_CREATE_EXPLOSION; count += 1; multibuf[count] = MULTI_CREATE_EXPLOSION; count += 1;
multibuf[count] = (byte)pnum; count += 1; multibuf[count] = (sbyte)pnum; count += 1;
// ----------- // -----------
// Total size = 2 // Total size = 2
@ -4768,7 +4768,7 @@ extern fix robot_last_send_time[MAX_ROBOTS_CONTROLLED];
extern fix robot_last_message_time[MAX_ROBOTS_CONTROLLED]; extern fix robot_last_message_time[MAX_ROBOTS_CONTROLLED];
extern int robot_send_pending[MAX_ROBOTS_CONTROLLED]; extern int robot_send_pending[MAX_ROBOTS_CONTROLLED];
extern int robot_fired[MAX_ROBOTS_CONTROLLED]; extern int robot_fired[MAX_ROBOTS_CONTROLLED];
extern byte robot_fire_buf[MAX_ROBOTS_CONTROLLED][18+3]; extern sbyte robot_fire_buf[MAX_ROBOTS_CONTROLLED][18+3];
void multi_send_robot_controls (char pnum) void multi_send_robot_controls (char pnum)

View file

@ -1,4 +1,4 @@
/* $Id: multi.h,v 1.9 2003-10-03 06:44:11 btb Exp $ */ /* $Id: multi.h,v 1.10 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -373,7 +373,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
// Exported functions // Exported functions
int objnum_remote_to_local(int remote_obj, int owner); int objnum_remote_to_local(int remote_obj, int owner);
int objnum_local_to_remote(int local_obj, byte *owner); int objnum_local_to_remote(int local_obj, sbyte *owner);
void map_objnum_local_to_remote(int local, int remote, int owner); void map_objnum_local_to_remote(int local, int remote, int owner);
void map_objnum_local_to_local(int objnum); void map_objnum_local_to_local(int objnum);
@ -473,7 +473,7 @@ extern int Network_message_reciever;
extern short remote_to_local[MAX_NUM_NET_PLAYERS][MAX_OBJECTS]; // Network object num for each extern short remote_to_local[MAX_NUM_NET_PLAYERS][MAX_OBJECTS]; // Network object num for each
extern short local_to_remote[MAX_OBJECTS]; // Local object num for each network objnum extern short local_to_remote[MAX_OBJECTS]; // Local object num for each network objnum
extern byte object_owner[MAX_OBJECTS]; // Who 'owns' each local object for network purposes extern sbyte object_owner[MAX_OBJECTS]; // Who 'owns' each local object for network purposes
extern int multi_in_menu; // Flag to tell if we're executing GameLoop from within a newmenu. extern int multi_in_menu; // Flag to tell if we're executing GameLoop from within a newmenu.
extern int multi_leave_menu; extern int multi_leave_menu;
@ -529,7 +529,7 @@ typedef struct netplayer_info {
ubyte version_major; ubyte version_major;
ubyte version_minor; ubyte version_minor;
enum comp_type computer_type; enum comp_type computer_type;
byte connected; sbyte connected;
ushort socket; ushort socket;

View file

@ -1,4 +1,4 @@
/* $Id: multibot.c,v 1.4 2003-10-03 08:21:28 btb Exp $ */ /* $Id: multibot.c,v 1.5 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -79,7 +79,7 @@ fix robot_last_send_time[MAX_ROBOTS_CONTROLLED];
fix robot_last_message_time[MAX_ROBOTS_CONTROLLED]; fix robot_last_message_time[MAX_ROBOTS_CONTROLLED];
int robot_send_pending[MAX_ROBOTS_CONTROLLED]; int robot_send_pending[MAX_ROBOTS_CONTROLLED];
int robot_fired[MAX_ROBOTS_CONTROLLED]; int robot_fired[MAX_ROBOTS_CONTROLLED];
byte robot_fire_buf[MAX_ROBOTS_CONTROLLED][18+3]; sbyte robot_fire_buf[MAX_ROBOTS_CONTROLLED][18+3];
#define MULTI_ROBOT_PRIORITY(objnum, pnum) (((objnum % 4) + pnum) % N_players) #define MULTI_ROBOT_PRIORITY(objnum, pnum) (((objnum % 4) + pnum) % N_players)
@ -371,7 +371,7 @@ multi_send_claim_robot(int objnum)
multibuf[0] = (char)MULTI_ROBOT_CLAIM; multibuf[0] = (char)MULTI_ROBOT_CLAIM;
multibuf[1] = Player_num; multibuf[1] = Player_num;
s = objnum_local_to_remote(objnum, (byte *)&multibuf[4]); s = objnum_local_to_remote(objnum, (sbyte *)&multibuf[4]);
PUT_INTEL_SHORT(multibuf+2, s); PUT_INTEL_SHORT(multibuf+2, s);
multi_send_data(multibuf, 5, 2); multi_send_data(multibuf, 5, 2);
@ -401,7 +401,7 @@ multi_send_release_robot(int objnum)
multibuf[0] = (char)MULTI_ROBOT_RELEASE; multibuf[0] = (char)MULTI_ROBOT_RELEASE;
multibuf[1] = Player_num; multibuf[1] = Player_num;
s = objnum_local_to_remote(objnum, (byte *)&multibuf[4]); s = objnum_local_to_remote(objnum, (sbyte *)&multibuf[4]);
PUT_INTEL_SHORT(multibuf+2, s); PUT_INTEL_SHORT(multibuf+2, s);
multi_send_data(multibuf, 5, 2); multi_send_data(multibuf, 5, 2);
@ -460,7 +460,7 @@ multi_send_robot_position_sub(int objnum)
multibuf[loc] = MULTI_ROBOT_POSITION; loc += 1; multibuf[loc] = MULTI_ROBOT_POSITION; loc += 1;
multibuf[loc] = Player_num; loc += 1; multibuf[loc] = Player_num; loc += 1;
s = objnum_local_to_remote(objnum, (byte *)&multibuf[loc+2]); s = objnum_local_to_remote(objnum, (sbyte *)&multibuf[loc+2]);
PUT_INTEL_SHORT(multibuf+loc, s); PUT_INTEL_SHORT(multibuf+loc, s);
loc += 3; loc += 3;
@ -523,7 +523,7 @@ multi_send_robot_fire(int objnum, int gun_num, vms_vector *fire)
multibuf[loc] = MULTI_ROBOT_FIRE; loc += 1; multibuf[loc] = MULTI_ROBOT_FIRE; loc += 1;
multibuf[loc] = Player_num; loc += 1; multibuf[loc] = Player_num; loc += 1;
s = objnum_local_to_remote(objnum, (byte *)&multibuf[loc+2]); s = objnum_local_to_remote(objnum, (sbyte *)&multibuf[loc+2]);
PUT_INTEL_SHORT(multibuf+loc, s); PUT_INTEL_SHORT(multibuf+loc, s);
loc += 3; loc += 3;
multibuf[loc] = gun_num; loc += 1; multibuf[loc] = gun_num; loc += 1;
@ -571,10 +571,10 @@ multi_send_robot_explode(int objnum, int killer,char isthief)
multibuf[loc] = MULTI_ROBOT_EXPLODE; loc += 1; multibuf[loc] = MULTI_ROBOT_EXPLODE; loc += 1;
multibuf[loc] = Player_num; loc += 1; multibuf[loc] = Player_num; loc += 1;
s = (short)objnum_local_to_remote(killer, (byte *)&multibuf[loc+2]); s = (short)objnum_local_to_remote(killer, (sbyte *)&multibuf[loc+2]);
PUT_INTEL_SHORT(multibuf+loc, s); loc += 3; PUT_INTEL_SHORT(multibuf+loc, s); loc += 3;
s = (short)objnum_local_to_remote(objnum, (byte *)&multibuf[loc+2]); s = (short)objnum_local_to_remote(objnum, (sbyte *)&multibuf[loc+2]);
PUT_INTEL_SHORT(multibuf+loc, s); loc += 3; PUT_INTEL_SHORT(multibuf+loc, s); loc += 3;
multibuf[loc]=isthief; loc++; multibuf[loc]=isthief; loc++;
@ -593,7 +593,7 @@ multi_send_create_robot(int station, int objnum, int type)
multibuf[loc] = MULTI_CREATE_ROBOT; loc += 1; multibuf[loc] = MULTI_CREATE_ROBOT; loc += 1;
multibuf[loc] = Player_num; loc += 1; multibuf[loc] = Player_num; loc += 1;
multibuf[loc] = (byte)station; loc += 1; multibuf[loc] = (sbyte)station; loc += 1;
PUT_INTEL_SHORT(multibuf+loc, objnum); loc += 2; PUT_INTEL_SHORT(multibuf+loc, objnum); loc += 2;
multibuf[loc] = type; loc += 1; multibuf[loc] = type; loc += 1;
@ -612,8 +612,8 @@ multi_send_boss_actions(int bossobjnum, int action, int secondary, int objnum)
multibuf[loc] = MULTI_BOSS_ACTIONS; loc += 1; multibuf[loc] = MULTI_BOSS_ACTIONS; loc += 1;
multibuf[loc] = Player_num; loc += 1; // Which player is controlling the boss multibuf[loc] = Player_num; loc += 1; // Which player is controlling the boss
PUT_INTEL_SHORT(multibuf+loc, bossobjnum); loc += 2; // We won't network map this objnum since it's the boss PUT_INTEL_SHORT(multibuf+loc, bossobjnum); loc += 2; // We won't network map this objnum since it's the boss
multibuf[loc] = (byte)action; loc += 1; // What is the boss doing? multibuf[loc] = (sbyte)action; loc += 1; // What is the boss doing?
multibuf[loc] = (byte)secondary; loc += 1; // More info for what he is doing multibuf[loc] = (sbyte)secondary; loc += 1; // More info for what he is doing
PUT_INTEL_SHORT(multibuf+loc, objnum); loc += 2; // Objnum of object created by gate-in action PUT_INTEL_SHORT(multibuf+loc, objnum); loc += 2; // Objnum of object created by gate-in action
if (action == 3) { if (action == 3) {
PUT_INTEL_SHORT(multibuf+loc, Objects[objnum].segnum); loc += 2; // Segment number object created in (for gate only) PUT_INTEL_SHORT(multibuf+loc, Objects[objnum].segnum); loc += 2; // Segment number object created in (for gate only)
@ -694,7 +694,7 @@ multi_do_claim_robot(char *buf)
pnum = buf[1]; pnum = buf[1];
GET_INTEL_SHORT(remote_botnum, buf+2); GET_INTEL_SHORT(remote_botnum, buf+2);
botnum = objnum_remote_to_local(remote_botnum, (byte)buf[4]); botnum = objnum_remote_to_local(remote_botnum, (sbyte)buf[4]);
if ((botnum > Highest_object_index) || (botnum < 0)) { if ((botnum > Highest_object_index) || (botnum < 0)) {
mprintf((1, "Ignoring claim message for object I don't have.\n")); mprintf((1, "Ignoring claim message for object I don't have.\n"));
@ -736,7 +736,7 @@ multi_do_release_robot(char *buf)
pnum = buf[1]; pnum = buf[1];
GET_INTEL_SHORT(remote_botnum, buf+2); GET_INTEL_SHORT(remote_botnum, buf+2);
botnum = objnum_remote_to_local(remote_botnum, (byte)buf[4]); botnum = objnum_remote_to_local(remote_botnum, (sbyte)buf[4]);
if ((botnum < 0) || (botnum > Highest_object_index)) { if ((botnum < 0) || (botnum > Highest_object_index)) {
mprintf((1, "Ignoring release message for object I don't have.\n")); mprintf((1, "Ignoring release message for object I don't have.\n"));
@ -778,7 +778,7 @@ multi_do_robot_position(char *buf)
pnum = buf[loc]; loc += 1; pnum = buf[loc]; loc += 1;
GET_INTEL_SHORT(remote_botnum, buf+loc); GET_INTEL_SHORT(remote_botnum, buf+loc);
botnum = objnum_remote_to_local(remote_botnum, (byte)buf[loc+2]); loc += 3; botnum = objnum_remote_to_local(remote_botnum, (sbyte)buf[loc+2]); loc += 3;
if ((botnum < 0) || (botnum > Highest_object_index)) { if ((botnum < 0) || (botnum > Highest_object_index)) {
mprintf((1, "Got robot position for object I don't have.\n")); mprintf((1, "Got robot position for object I don't have.\n"));
@ -836,8 +836,8 @@ multi_do_robot_fire(char *buf)
pnum = buf[loc]; loc += 1; pnum = buf[loc]; loc += 1;
GET_INTEL_SHORT(remote_botnum, buf+loc); GET_INTEL_SHORT(remote_botnum, buf+loc);
botnum = objnum_remote_to_local(remote_botnum, (byte)buf[loc+2]); loc += 3; botnum = objnum_remote_to_local(remote_botnum, (sbyte)buf[loc+2]); loc += 3;
gun_num = (byte)buf[loc]; loc += 1; gun_num = (sbyte)buf[loc]; loc += 1;
memcpy(&fire, buf+loc, sizeof(vms_vector)); memcpy(&fire, buf+loc, sizeof(vms_vector));
fire.x = (fix)INTEL_INT((int)fire.x); fire.x = (fix)INTEL_INT((int)fire.x);
fire.y = (fix)INTEL_INT((int)fire.y); fire.y = (fix)INTEL_INT((int)fire.y);
@ -960,9 +960,9 @@ multi_do_robot_explode(char *buf)
pnum = buf[loc]; loc += 1; pnum = buf[loc]; loc += 1;
GET_INTEL_SHORT(remote_killer, buf+loc); GET_INTEL_SHORT(remote_killer, buf+loc);
killer = objnum_remote_to_local(remote_killer, (byte)buf[loc+2]); loc += 3; killer = objnum_remote_to_local(remote_killer, (sbyte)buf[loc+2]); loc += 3;
GET_INTEL_SHORT(remote_botnum, buf+loc); GET_INTEL_SHORT(remote_botnum, buf+loc);
botnum = objnum_remote_to_local(remote_botnum, (byte)buf[loc+2]); loc += 3; botnum = objnum_remote_to_local(remote_botnum, (sbyte)buf[loc+2]); loc += 3;
thief=buf[loc]; thief=buf[loc];
if ((botnum < 0) || (botnum > Highest_object_index)) { if ((botnum < 0) || (botnum > Highest_object_index)) {
@ -1276,7 +1276,7 @@ multi_drop_robot_powerups(int objnum)
void multi_robot_request_change(object *robot, int player_num) void multi_robot_request_change(object *robot, int player_num)
{ {
int slot, remote_objnum; int slot, remote_objnum;
byte dummy; sbyte dummy;
if (!(Game_mode & GM_MULTI_ROBOTS)) if (!(Game_mode & GM_MULTI_ROBOTS))
return; return;

View file

@ -1,4 +1,4 @@
/* $Id: newdemo.h,v 1.3 2003-03-17 07:59:11 btb Exp $ */ /* $Id: newdemo.h,v 1.4 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -191,7 +191,7 @@ extern int NewdemoFrameCount;
extern int Newdemo_game_mode; extern int Newdemo_game_mode;
extern int Newdemo_vcr_state; extern int Newdemo_vcr_state;
extern byte Newdemo_do_interpolate; extern sbyte Newdemo_do_interpolate;
//Does demo start automatically? //Does demo start automatically?
extern int Auto_demo; extern int Auto_demo;
@ -232,7 +232,7 @@ extern void newdemo_set_new_level(int level_num);
extern void newdemo_record_restore_rearview(void); extern void newdemo_record_restore_rearview(void);
extern void newdemo_record_multi_death(int pnum); extern void newdemo_record_multi_death(int pnum);
extern void newdemo_record_multi_kill(int pnum, byte kill); extern void newdemo_record_multi_kill(int pnum, sbyte kill);
extern void newdemo_record_multi_connect(int pnum, int new_player, char *new_callsign); extern void newdemo_record_multi_connect(int pnum, int new_player, char *new_callsign);
extern void newdemo_record_multi_reconnect(int pnum); extern void newdemo_record_multi_reconnect(int pnum);
extern void newdemo_record_multi_disconnect(int pnum); extern void newdemo_record_multi_disconnect(int pnum);
@ -241,7 +241,7 @@ extern void newdemo_record_multi_score(int pnum, int score);
extern void newdemo_record_primary_ammo(int old_ammo, int new_ammo); extern void newdemo_record_primary_ammo(int old_ammo, int new_ammo);
extern void newdemo_record_secondary_ammo(int old_ammo, int new_ammo); extern void newdemo_record_secondary_ammo(int old_ammo, int new_ammo);
extern void newdemo_record_door_opening(int segnum, int side); extern void newdemo_record_door_opening(int segnum, int side);
extern void newdemo_record_laser_level(byte old_level, byte new_level); extern void newdemo_record_laser_level(sbyte old_level, sbyte new_level);
extern void newdemo_record_cloaking_wall(int front_wall_num, int back_wall_num, ubyte type, ubyte state, fix cloak_value, fix l0, fix l1, fix l2, fix l3); extern void newdemo_record_cloaking_wall(int front_wall_num, int back_wall_num, ubyte type, ubyte state, fix cloak_value, fix l0, fix l1, fix l2, fix l3);
extern void newdemo_record_secret_exit_blown(int truth); extern void newdemo_record_secret_exit_blown(int truth);

View file

@ -1,4 +1,4 @@
/* $Id: render.c,v 1.16 2003-04-24 18:15:36 btb Exp $ */ /* $Id: render.c,v 1.17 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -2185,7 +2185,7 @@ void build_segment_list(int start_seg_num, int window_num)
if ( (window_check || !visited[ch]) && (wid & WID_RENDPAST_FLAG) ) { if ( (window_check || !visited[ch]) && (wid & WID_RENDPAST_FLAG) ) {
if (behind_check) { if (behind_check) {
byte *sv = Side_to_verts[c]; sbyte *sv = Side_to_verts[c];
ubyte codes_and=0xff; ubyte codes_and=0xff;
int i; int i;

View file

@ -1,4 +1,4 @@
/* $Id: scores.c,v 1.4 2003-06-16 06:57:34 btb Exp $ */ /* $Id: scores.c,v 1.5 2003-10-04 02:58:23 btb Exp $ */
/* /*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
@ -283,9 +283,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
typedef struct stats_info { typedef struct stats_info {
char name[CALLSIGN_LEN+1]; char name[CALLSIGN_LEN+1];
int score; int score;
byte starting_level; sbyte starting_level;
byte ending_level; sbyte ending_level;
byte diff_level; sbyte diff_level;
short kill_ratio; // 0-100 short kill_ratio; // 0-100
short hostage_ratio; // short hostage_ratio; //
int seconds; // How long it took in seconds... int seconds; // How long it took in seconds...
@ -293,7 +293,7 @@ typedef struct stats_info {
typedef struct all_scores { typedef struct all_scores {
char signature[3]; // DHS char signature[3]; // DHS
byte version; // version sbyte version; // version
char cool_saying[COOL_MESSAGE_LEN]; char cool_saying[COOL_MESSAGE_LEN];
stats_info stats[MAX_HIGH_SCORES]; stats_info stats[MAX_HIGH_SCORES];
} all_scores; } all_scores;
@ -585,7 +585,7 @@ void scores_view(int citem)
fix t1; fix t1;
int i,done,looper; int i,done,looper;
int k; int k;
byte fades[64] = { 1,1,1,2,2,3,4,4,5,6,8,9,10,12,13,15,16,17,19,20,22,23,24,26,27,28,28,29,30,30,31,31,31,31,31,30,30,29,28,28,27,26,24,23,22,20,19,17,16,15,13,12,10,9,8,6,5,4,4,3,2,2,1,1 }; sbyte fades[64] = { 1,1,1,2,2,3,4,4,5,6,8,9,10,12,13,15,16,17,19,20,22,23,24,26,27,28,28,29,30,30,31,31,31,31,31,30,30,29,28,28,27,26,24,23,22,20,19,17,16,15,13,12,10,9,8,6,5,4,4,3,2,2,1,1 };
ReshowScores: ReshowScores:
scores_read(); scores_read();