File: DATAFILE

package info (click to toggle)
luola 1.3.2-13
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,700 kB
  • sloc: ansic: 14,480; sh: 2,932; makefile: 128
file content (33 lines) | stat: -rw-r--r-- 1,005 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Luola datafile format ver 1.0
-----------------------------

This is a generic datafile used by Luola.

Header format
-------------

/* Initial headers, tells what this file is */
(Uint8*4)	Header magic to identify this as a luola datafile ("LDAT")
(Uint8)		Major version number of the datafile (0x01)
(Uint8)		Minor version number of the datafile (0x00)
(Uint16)	Number of items in catalog

/* Catalog headers, tells what is in this file */
/* This header is made out of blocks like this */
(Uint8)		file identifier string length
(uint8)*len	file identifier string
(Uint16)	index number
(Uint32)	position of file inside this one
(Uint32)	length of the file

Explanations
------------

The major version number of the file changes when backwards compatability
is broken.

The data header block loops for all the entries stored in the file.
The files are looked up by the IDs assigned to them.
You can also store an array of files under the same ID.
(Useful for storing individual frames of an animation)