BINSIZE.BIN
BINSIZE.BIN stores the record size in bytes for other lumps, so that future versions of the OHRRPGCE can resize lumps without breaking backwards compatability. Unfortunately this lump was implemented very late, and currently only contains information on a couple of lumps.
Offset | Data | Meaning | Default (backwards compatability) |
---|---|---|---|
0 | INT | Length of record in ATTACK.BIN | N/A |
1 | INT | Length of each record in STF | 64 |
2 | INT | Length of each record in SONGDATA.BIN | N/A |
3 | INT | Length of each record in SFXDATA.BIN | N/A |
4 | INT | Length of each record in MAP lump | 40 |
5 | INT | Length of each record in MENUS.BIN | N/A |
6 | INT | Length of each record in MENUITEM.BIN | N/A |
7 | INT | Length of each record in UICOLORS.BIN | N/A |
8 | INT | Length of each record in SAY | 400 |
9 | INT | Length of each record in .N## | 30 |
10 | INT | Length of each record in .DT0 | 636 |
11 | INT | Length of each record in .DT1 | 320 |
12 | INT | Length of each record in .ITM | 200 |
Any binary record lumps that are added in the future will also have their record size stored in BINSIZE.BIN. Current lumps can be extended by modifying the lump reading/writing routines to check BINSIZE.BIN.
Default[edit]
Older RPG files may not have all these values set. If a record size is not present, use the backwards compatability Default record size.
Programming Interface[edit]
four functions are provided for accessing binsize information
getbinsize() returns the current size in BYTES of the records in the specific binary file you are working with curbinsize() returns the correct size in BYTES for of the records for the version of the OHRRPGCE you are running defbinsize() returns the default size in BYTES to use for getbinsize() when no BINSIZE data is available at all dimbinsize() returns the upper bound for the array (of INTs) you will be loading the record into
ARCHINYM.LMP . ATTACK.BIN . BINSIZE.BIN . BROWSE.TXT . DEFPAL#.BIN . DEFPASS.BIN . distrib.reld . FIXBITS.BIN . heroes.reld . heroform.reld . LOOKUP1.BIN . MENUS.BIN . MENUITEM.BIN . PALETTES.BIN . PLOTSCR.LST . SFXDATA.BIN . slicetree_#_#.reld . SLICELOOKUP.TXT . SONGDATA.BIN . UICOLORS.BIN . GEN . general.reld . BAM . Map Format . T . P . E . D . L . N . Z . DOR . DOX . DT0 . DT1 . DT6 . EFS . FOR . FNT . HSP . HSZ . ITM . MAP . MAS . MN . MXS . PAL . PT0 . PT1 . PT2 . PT3 . PT4 . PT5 . PT6 . PT7 . PT8 . SAY . SHO . SNG . STF . STT . TAP . TIL . TMN . VEH