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.
|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.
Older RPG files may not have all these values set. If a record size is not present, use the backwards compatability Default record size.
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