mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-23 02:40:11 +00:00
Add INT32 and fixed_t to DataWrap.
This commit is contained in:
parent
c389d0c965
commit
ed83928896
2 changed files with 21 additions and 6 deletions
|
@ -43,6 +43,18 @@ INT16 DW_ReadINT16(DataWrap dw)
|
|||
return READINT16(dw->p);
|
||||
}
|
||||
|
||||
INT32 DW_ReadINT32(DataWrap dw)
|
||||
{
|
||||
CheckEOF(dw, 4);
|
||||
return READINT32(dw->p);
|
||||
}
|
||||
|
||||
fixed_t DW_ReadFixed(DataWrap dw)
|
||||
{
|
||||
CheckEOF(dw, 4);
|
||||
return READFIXED(dw->p);
|
||||
}
|
||||
|
||||
char *DW_ReadStringn(DataWrap dw, size_t n)
|
||||
{
|
||||
char *string = ZZ_Alloc(n+1);
|
||||
|
|
|
@ -7,13 +7,16 @@ typedef struct DataWrap_s {
|
|||
jmp_buf *eofjmp;
|
||||
} *DataWrap;
|
||||
|
||||
UINT8 DW_ReadUINT8(struct DataWrap_s *);
|
||||
UINT16 DW_ReadUINT16(struct DataWrap_s *);
|
||||
UINT32 DW_ReadUINT32(struct DataWrap_s *);
|
||||
UINT8 DW_ReadUINT8(DataWrap);
|
||||
UINT16 DW_ReadUINT16(DataWrap);
|
||||
UINT32 DW_ReadUINT32(DataWrap);
|
||||
|
||||
SINT8 DW_ReadSINT8(struct DataWrap_s *);
|
||||
INT16 DW_ReadINT16(struct DataWrap_s *);
|
||||
SINT8 DW_ReadSINT8(DataWrap);
|
||||
INT16 DW_ReadINT16(DataWrap);
|
||||
INT32 DW_ReadINT32(DataWrap);
|
||||
|
||||
char *DW_ReadStringn(struct DataWrap_s *, size_t n);
|
||||
fixed_t DW_ReadFixed(DataWrap);
|
||||
|
||||
char *DW_ReadStringn(DataWrap, size_t n);
|
||||
|
||||
DataWrap D_NewDataWrap(const void *data, size_t len, jmp_buf *eofjmp);
|
||||
|
|
Loading…
Reference in a new issue