version 1.2 | | version 1.3 |
---|
| | |
* Save game information | | * Save game information |
* | | * |
* $Log$ | | * $Log$ |
| | * Revision 1.3 2003/03/09 06:34:10 donut |
| | * change byte typedef to sbyte to avoid conflict with win32 byte which is unsigned |
| | * |
* Revision 1.2 1999/09/02 13:50:13 sekmu | | * Revision 1.2 1999/09/02 13:50:13 sekmu |
* remove warnings for editor compile | | * remove warnings for editor compile |
* | | * |
| | |
//Start old wall structures | | //Start old wall structures |
| | |
typedef struct v16_wall { | | typedef struct v16_wall { |
byte type; // What kind of special wall. | | sbyte type; // What kind of special wall. |
byte flags; // Flags for the wall. | | sbyte flags; // Flags for the wall. |
fix hps; // "Hit points" of the wall. | | fix hps; // "Hit points" of the wall. |
byte trigger; // Which trigger is associated with the wall. | | sbyte trigger; // Which trigger is associated with the wall. |
byte clip_num; // Which animation associated with the wall. | | sbyte clip_num; // Which animation associated with the wall. |
byte keys; | | sbyte keys; |
} __pack__ v16_wall; | | } __pack__ v16_wall; |
| | |
typedef struct v19_wall { | | typedef struct v19_wall { |
int segnum,sidenum; // Seg & side for this wall | | int segnum,sidenum; // Seg & side for this wall |
byte type; // What kind of special wall. | | sbyte type; // What kind of special wall. |
byte flags; // Flags for the wall. | | sbyte flags; // Flags for the wall. |
fix hps; // "Hit points" of the wall. | | fix hps; // "Hit points" of the wall. |
byte trigger; // Which trigger is associated with the wall. | | sbyte trigger; // Which trigger is associated with the wall. |
byte clip_num; // Which animation associated with the wall. | | sbyte clip_num; // Which animation associated with the wall. |
byte keys; | | sbyte keys; |
int linked_wall; // number of linked wall | | int linked_wall; // number of linked wall |
} __pack__ v19_wall; | | } __pack__ v19_wall; |
| | |
| | |
return f; | | return f; |
} | | } |
| | |
/*static*/ byte read_byte(CFILE *file) | | /*static*/ sbyte 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 gamesave.c" ); | | Error( "Error reading byte in gamesave.c" ); |
| | |
| | |
} | | } |
| | |
static void gs_write_byte(byte b,FILE *file) | | static void gs_write_byte(sbyte b,FILE *file) |
{ | | { |
if (fwrite( &b, sizeof(b), 1, file) != 1) | | if (fwrite( &b, sizeof(b), 1, file) != 1) |
Error( "Error reading byte in gamesave.c" ); | | Error( "Error reading byte in gamesave.c" ); |