| Description | Uses | Classes, Interfaces, Objects and Records | Functions and Procedures | Types | Constants | Variables |
Data files and low-level packed file.
Datafiles are created by the grabber utility, and have a .dat extension. They can contain bitmaps, palettes, fonts, samples, MIDI music, FLI/FLC animations, and any other binary data that you import. You could distribute your bitmaps and samples in a myriad of separate files, but packing them in a few .dat binaries has a few advantages:
On some platforms loading a single big datafile at once is faster than loading individual resources one by one.
Instead of several loops for your resources, you can write a single line of code with just a single point of failure to take care of.
You can potentially reduce the size of your data by enabling compression on your datafiles. Less download time for your end users, less wait during loading screens!
If you don't need to load the whole datafile at once, you can still enable individual file compression. It is slightly worse than global compression, but it is very fast with loading times because Allegro can easily seek inside the datafile to find a specific object.
Even without encryption, most end users of your application won't be able to look at or modify the resources for your game. A missing sound file or a modified bitmap could potentially crash the game if you haven't considered this in your loading code!
It looks much more professional and convenient to distribute levels! For example, if you found a bug in a level of your game, just distribute your new level4.dat and tell users to overwrite their old version.
Allegro allows you to load datafiles once and forget about them. But if you have many levels it can be wise to load only the resources required for the current level. You can accomplish the later by separating levels in different datafiles, or using functions like al_load_datafile_object to avoid loading everything at once. You can even read directly from a specific datafile object with the al_pack_fopen function.
Remember that with Allegro truecolor images can only be loaded after you have set a graphics mode. This is true for datafiles too. Load all your data after you have set the graphics mode, otherwise the pixel format (RGB or BGR) will not be known and the datafile may be converted wrongly.
Note: even though Allegro datafiles provide encryption, you should consider it weak, so don't plan on hiding there the plans for a Death Star or something. Determinate knowledgeable users will be able to rip your resources no matter how hard you try to hide them! Use the encryption only as a slight deterrent towards unwanted tampering of your data. How to crack an encrypted datafile is left as an exercise to the reader, though.
See also al_load_datafile
Also this module implement a fast buffered file I/O system, which supports the reading and writing of compressed files using a ring buffer algorithm based on the LZSS compressor by Haruhiko Okumura. This does not achieve quite such good compression as programs like zip and lha, but unpacking is very fast and it does not require much memory. Packed files always begin with the 32-bit value AL_F_PACK_MAGIC, and autodetect files with the value F_NOPACK_MAGIC.
See also al_pack_fopen
| Name | Description |
|---|---|
record AL_PACKFILE_VTABLE |
Packfile vtable structure, for custom packfiles. |
record AL_DATAFILE_PROPERTY |
|
record AL_DATAFILE_OBJECT |
Datafile object. |
PROCEDURE al_packfile_password (CONST aPassword: STRING); INLINE; |
FUNCTION al_pack_fopen (CONST filename, mode: STRING): AL_PACKFILEptr; INLINE; |
FUNCTION al_pack_fopen_vtable (CONST vtable: AL_PACKFILE_VTABLEptr; userdata: AL_VOIDptr): AL_PACKFILEptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_fopen_vtable'; |
FUNCTION al_pack_fclose (f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_fclose'; |
FUNCTION al_pack_fseek (f: AL_PACKFILEptr; offset: AL_INT): BOOLEAN; INLINE; |
FUNCTION al_pack_fopen_chunk (f: AL_PACKFILEptr; pack: BOOLEAN): AL_PACKFILEptr; INLINE; |
FUNCTION al_pack_fclose_chunk (f: AL_PACKFILEptr): AL_PACKFILEptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_fclose_chunk'; |
FUNCTION al_pack_getc (f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_getc'; |
FUNCTION al_pack_putc (c: AL_INT; f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_putc'; |
FUNCTION al_pack_feof (f: AL_PACKFILEptr): BOOLEAN; INLINE; |
FUNCTION al_pack_ferror (f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_ferror'; |
FUNCTION al_pack_igetw (f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_igetw'; |
FUNCTION al_pack_igetl (f: AL_PACKFILEptr): AL_LONG; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_igetl'; |
FUNCTION al_pack_iputw (w: AL_INT; f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_iputw'; |
FUNCTION al_pack_iputl (l: AL_LONG; f: AL_PACKFILEptr): AL_LONG; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_iputl'; |
FUNCTION al_pack_mgetw (f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_mgetw'; |
FUNCTION al_pack_mgetl (f: AL_PACKFILEptr): AL_LONG; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_mgetl'; |
FUNCTION al_pack_mputw (w: AL_INT; f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_mputw'; |
FUNCTION al_pack_mputl (l: AL_LONG; f: AL_PACKFILEptr): AL_LONG; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_mputl'; |
FUNCTION al_pack_fread (p: AL_VOIDptr; n: AL_LONG; f: AL_PACKFILEptr): AL_LONG; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_fread'; |
FUNCTION al_pack_fwrite (CONST p: AL_VOIDptr; n: AL_LONG; f: AL_PACKFILEptr): AL_LONG; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_fwrite'; |
FUNCTION al_pack_ungetc (c: AL_INT; f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_ungetc'; |
FUNCTION al_pack_fgets (max: AL_INT; f: AL_PACKFILEptr): STRING; |
FUNCTION al_pack_fputs (p: STRING; f: AL_PACKFILEptr): BOOLEAN; INLINE; |
FUNCTION al_load_datafile (CONST filename: STRING): AL_DATAFILEptr; INLINE; |
PROCEDURE al_unload_datafile (dat: AL_DATAFILEptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'unload_datafile'; |
FUNCTION al_load_datafile_object (CONST filename, objectname: STRING): AL_DATAFILE_OBJECTptr; INLINE; |
PROCEDURE al_unload_datafile_object (dat: AL_DATAFILE_OBJECTptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'unload_datafile_object'; |
FUNCTION al_find_datafile_object (CONST dat: AL_DATAFILEptr; CONST ObjectName: STRING): AL_DATAFILE_OBJECTptr; INLINE; |
FUNCTION al_load_bmp_pf (f: AL_PACKFILEptr; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_bmp_pf'; |
FUNCTION al_load_pcx_pf (f: AL_PACKFILEptr; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_pcx_pf'; |
FUNCTION al_load_tga_pf (f: AL_PACKFILEptr; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_tga_pf'; |
FUNCTION al_save_bmp_pf (f: AL_PACKFILEptr; bmp: AL_BITMAPptr; palette: AL_PALETTEptr): BOOLEAN; INLINE; |
FUNCTION al_save_pcx_pf (f: AL_PACKFILEptr; bmp: AL_BITMAPptr; palette: AL_PALETTEptr): BOOLEAN; INLINE; |
FUNCTION al_save_tga_pf (f: AL_PACKFILEptr; bmp: AL_BITMAPptr; palette: AL_PALETTEptr): BOOLEAN; INLINE; |
FUNCTION al_load_wav_pf (f: AL_PACKFILEptr): AL_SAMPLEptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_wav_pf'; |
FUNCTION al_load_voc_pf (f: AL_PACKFILEptr): AL_SAMPLEptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_voc_pf'; |
AL_PACKFILEptr = AL_POINTER; |
AL_PACKFILE_VTABLEptr = ˆAL_PACKFILE_VTABLE; |
AL_DATAFILE_PROPERTY_LISTptr = ˆAL_DATAFILE_PROPERTY_LIST; |
AL_DATAFILE_PROPERTY_LIST = ARRAY [0..AL_UNKNOWN_SIZE] OF AL_DATAFILE_PROPERTY; |
AL_DATAFILE_OBJECTptr = ˆAL_DATAFILE_OBJECT; |
AL_DATAFILEptr = ˆAL_DATAFILE; |
AL_DATAFILE = ARRAY [0..AL_UNKNOWN_SIZE] OF AL_DATAFILE_OBJECT; |
AL_F_WRITE = 'w'; |
AL_F_READ_PACKED = 'rp'; |
AL_F_WRITE_PACKED = 'wp'; |
AL_F_WRITE_NOPACK = 'w!'; |
AL_F_PACK_MAGIC = $736C6821; |
AL_F_NOPACK_MAGIC = $736C682E; |
AL_F_EXE_MAGIC = $736C682B; |
PROCEDURE al_packfile_password (CONST aPassword: STRING); INLINE; |
|
Sets the global I/O encryption password. Sets the encryption password to be used for all read/write operations on files opened in future using Allegro's packfile functions (whether they are compressed or not), including all the save, load and config routines. Files written with an encryption password cannot be read unless the same password is selected, so be careful: if you forget the key, nobody can make your data come back again! Pass an empty string to return to the normal, non-encrypted mode. If you are using this function to prevent people getting access to your datafiles, be careful not to store an obvious copy of the password in your executable: if there are any strings like "I'm the password for the datafile", it would be fairly easy to get access to your data :-) Note #1: when writing a packfile, you can change the password to whatever you want after opening the file, without affecting the write operation. On the contrary, when writing a sub-chunk of a packfile, you must make sure that the password that was active at the time the sub-chunk was opened is still active before closing the sub-chunk. This is guaranteed to be true if you didn't call the Note #2: as explained above, the password is used for all read/write operations on files, including for several functions of the library that operate on files without explicitly using packfiles (e.g. See also
|
FUNCTION al_pack_fopen (CONST filename, mode: STRING): AL_PACKFILEptr; INLINE; |
|
Opens a file according to mode. The mode may contain any of the flags:
Instead of these flags, one of the constants The packfile functions also understand several "magic" filenames that are used for special purposes. These are in the form filename.dat#object_name and opens a specific object from a datafile, and read from it as if it was a regular file. You can treat nested datafiles exactly like a normal directory structure, for example you could open With these special filenames, the contents of a datafile object or appended file can be read in an identical way to a normal disk file, so any of the file access functions in Allegro (eg. al_set_config_file) can be used to read from them. Note that you can't write to these special files, though: the fake file is read only. Also, you must save your datafile uncompressed or with per-object compression if you are planning on loading individual objects from it (otherwise there will be an excessive amount of seeking when it is read). Finally, be aware that the special Allegro object types aren't the same format as the files you import the data from. When you import data like bitmaps or samples into the grabber, they are converted into a special Allegro-specific format, but the
Returnson success, a pointer of type AL_PACKFILEptr, and on error a See also
|
FUNCTION al_pack_fopen_vtable (CONST vtable: AL_PACKFILE_VTABLEptr; userdata: AL_VOIDptr): AL_PACKFILEptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_fopen_vtable'; |
|
Creates a new packfile structure that uses the functions specified in the vtable instead of the standard functions. The data pointer by `vtable' and `userdata' must remain available for the lifetime of the created packfile. While the created packfile structure can be used with other Allegro functions, there are two limitations. First, opening chunks using al_pack_fopen_chunk on top of the returned packfile is not possible at this time. And al_packfile_password does not have any effect on packfiles opened with Returnson success,a pointer to a AL_PACKFILEptr structure, and on error it returns See also
|
FUNCTION al_pack_fclose (f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_fclose'; |
|
Closes the stream Returnszero on success or an error code which is also stored in al_errno. This function can fail only when writing to files: if the file was opened in read mode, it will always succeed. |
FUNCTION al_pack_fseek (f: AL_PACKFILEptr; offset: AL_INT): BOOLEAN; INLINE; |
|
Moves the position indicator of the stream Returns( See also
|
FUNCTION al_pack_fopen_chunk (f: AL_PACKFILEptr; pack: BOOLEAN): AL_PACKFILEptr; INLINE; |
|
Opens a sub-chunk of a file. Chunks are primarily intended for use by the datafile code, but they may also be useful for your own file routines. A chunk provides a logical view of part of a file, which can be compressed as an individual entity and will automatically insert and check length counts to prevent reading past the end of the chunk. The AL_PACKFILEptr parameter is a previously opened file, and VAR OutputFile: AL_PACKFILEptr; BEGIN OutputFile := al_pack_fopen ('out.raw', 'w!'); ... OutputFile := al_pack_fopen_chunk (OutputFile, TRUE); IF OutputFile = NIL THEN abort_on_error ('Error saving data!'); ... OutputFile := al_pack_fclose_chunk (OutputFile); The data written to the chunk will be prefixed with two length counts (32-bit, a.k.a. big-endian). For uncompressed chunks these will both be set to the size of the data in the chunk. For compressed chunks (created by setting the To read the chunk, use the following code: VAR InputFile: AL_PACKFILEptr; BEGIN InputFile := al_pack_fopen ('out.raw', 'rp'); ... InputFile := al_pack_fopen_chunk (InputFile, TRUE); ... InputFile := al_pack_fclose_chunk (InputFile); This sequence will read the length counts created when the chunk was written, and automatically decompress the contents of the chunk if it was compressed. The length will also be used to prevent reading past the end of the chunk (Allegro will return EOF if you attempt this), and to automatically skip past any unread chunk data when you call al_pack_fclose_chunk. Chunks can be nested inside each other by making repeated calls to Returnsa pointer to the sub-chunked See also
|
FUNCTION al_pack_fclose_chunk (f: AL_PACKFILEptr): AL_PACKFILEptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_fclose_chunk'; |
|
Closes a sub-chunk of a file, previously obtained by calling al_pack_fopen_chunk. Returns a pointer to the parent of the sub-chunk you just closed. Returns
|
FUNCTION al_pack_getc (f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_getc'; |
|
Returns the next character from the stream See also
|
FUNCTION al_pack_putc (c: AL_INT; f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_putc'; |
|
Puts a character in the stream f. Returnsthe character written on success, or EOF on error. See also
|
FUNCTION al_pack_feof (f: AL_PACKFILEptr): BOOLEAN; INLINE; |
|
Finds out if you have reached the end of the file. It does not wait for you to attempt to read beyond the end of the file, contrary to the ISO C Returns
See also
|
FUNCTION al_pack_ferror (f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_ferror'; |
|
Tells if an error occurred during an operation on the stream. Since EOF is used to report errors by some functions, it's often better to use the al_pack_feof function to check explicitly for end of file and Returnsnonzero if the error indicator for the stream is set, meaning that an error has occurred during a previous operation on the stream. |
FUNCTION al_pack_igetw (f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_igetw'; |
|
Like al_pack_getc, but reads a 16-bit word from a file, using Intel byte ordering (least significant byte first, a.k.a. little-endian). |
FUNCTION al_pack_igetl (f: AL_PACKFILEptr): AL_LONG; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_igetl'; |
|
Like al_pack_getc, but reads a 32-bit word from a file, using Intel byte ordering (least significant byte first, a.k.a. little-endian). |
FUNCTION al_pack_iputw (w: AL_INT; f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_iputw'; |
|
Like al_pack_putc, but writes a 16-bit word to a file, using Intel byte ordering (least significant byte first, a.k.a. little-endian). |
FUNCTION al_pack_iputl (l: AL_LONG; f: AL_PACKFILEptr): AL_LONG; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_iputl'; |
|
Like al_pack_putc, but writes a 32-bit word to a file, using Intel byte ordering (least significant byte first, a.k.a. little-endian). |
FUNCTION al_pack_mgetw (f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_mgetw'; |
|
Like al_pack_getc, but reads a 16-bit word from a file, using Motorola byte ordering (most significant byte first, a.k.a. big-endian). |
FUNCTION al_pack_mgetl (f: AL_PACKFILEptr): AL_LONG; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_mgetl'; |
|
Like al_pack_getc, but reads a 32-bit word from a file, using Motorola byte ordering (most significant byte first, a.k.a. big-endian). |
FUNCTION al_pack_mputw (w: AL_INT; f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_mputw'; |
|
Like al_pack_putc, but writes a 16-bit word from a file, using Motorola byte ordering (most significant byte first, a.k.a. big-endian). |
FUNCTION al_pack_mputl (l: AL_LONG; f: AL_PACKFILEptr): AL_LONG; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_mputl'; |
|
Like al_pack_putc, but writes a 32-bit word from a file, using Motorola byte ordering (most significant byte first, a.k.a. big-endian). |
FUNCTION al_pack_fread (p: AL_VOIDptr; n: AL_LONG; f: AL_PACKFILEptr): AL_LONG; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_fread'; |
|
Reads Returnsthe number of bytes read, which will be less than See also
|
FUNCTION al_pack_fwrite (CONST p: AL_VOIDptr; n: AL_LONG; f: AL_PACKFILEptr): AL_LONG; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_fwrite'; |
|
Writes Returnsthe number of bytes written, which will be less than See also
|
FUNCTION al_pack_ungetc (c: AL_INT; f: AL_PACKFILEptr): AL_INT; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'pack_ungetc'; |
|
Puts a character back to the file's input buffer. Like with Note: al_pack_fgets internally uses Returns
See also
|
FUNCTION al_pack_fgets (max: AL_INT; f: AL_PACKFILEptr): STRING; |
|
Reads a line from the stream Note: This function internally may make calls to al_pack_ungetc, so you cannot use See also
|
FUNCTION al_pack_fputs (p: STRING; f: AL_PACKFILEptr): BOOLEAN; INLINE; |
|
Writes a string to the stream Returns
See also
|
FUNCTION al_load_datafile (CONST filename: STRING): AL_DATAFILEptr; INLINE; |
|
Loads a datafile into memory in one go. If the datafile contains truecolor graphics, you must set the video mode or call al_set_color_conversion before loading it. Remember to free this datafile to avoid memory leaks. Returnsa pointer to the See also
|
PROCEDURE al_unload_datafile (dat: AL_DATAFILEptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'unload_datafile'; |
|
Frees all the objects in a datafile. Use this to avoid memory leaks in your program. See also
|
FUNCTION al_load_datafile_object (CONST filename, objectname: STRING): AL_DATAFILE_OBJECTptr; INLINE; |
|
Loads a specific object from a datafile. This won't work if you strip the object names from the file, and it will be very slow if you save the file with global compression. Example: VAR MusicObject: AL_DATAFILE_OBJECTptr; ... MusicObject := al_load_datafile_object ('datafile.dat', 'MUSIC'); al_play_midi (MusicObjectˆ.dat); al_unload_datafile_object (MusicObject); Remember to free this DATAFILE later to avoid memory leaks, but use the correct unloading function! Returnsa pointer to a single See also
|
PROCEDURE al_unload_datafile_object (dat: AL_DATAFILE_OBJECTptr); CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'unload_datafile_object'; |
|
Frees an object previously loaded by |
FUNCTION al_find_datafile_object (CONST dat: AL_DATAFILEptr; CONST ObjectName: STRING): AL_DATAFILE_OBJECTptr; INLINE; |
|
Searches an already loaded datafile for an object with the specified name. In the name you can use `/' and `#' separators for nested datafile paths. Example: VAR DataFile: AL_DATAFILEptr; Level: AL_DATAFILE_OBJECTptr; BEGIN ... Level := al_find_datafile_object (DataFile, Format ('LEVEL_%02d', [LevelNumber])); IF Level = NIL THEN abort_on_error ('That level doesn't exist!
Returns a pointer to a AL_DATAFILE_OBJECTptr whose See also
|
FUNCTION al_load_bmp_pf (f: AL_PACKFILEptr; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_bmp_pf'; |
|
A version of al_load_bmp which reads a BMP file from a packfile. |
FUNCTION al_load_pcx_pf (f: AL_PACKFILEptr; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_pcx_pf'; |
|
A version of al_load_pcx which reads a PCX file from a packfile. |
FUNCTION al_load_tga_pf (f: AL_PACKFILEptr; palette: AL_PALETTEptr): AL_BITMAPptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_tga_pf'; |
|
A version of al_load_tga which reads a TGA file from a packfile. |
FUNCTION al_save_bmp_pf (f: AL_PACKFILEptr; bmp: AL_BITMAPptr; palette: AL_PALETTEptr): BOOLEAN; INLINE; |
|
A version of |
FUNCTION al_save_pcx_pf (f: AL_PACKFILEptr; bmp: AL_BITMAPptr; palette: AL_PALETTEptr): BOOLEAN; INLINE; |
|
A version of |
FUNCTION al_save_tga_pf (f: AL_PACKFILEptr; bmp: AL_BITMAPptr; palette: AL_PALETTEptr): BOOLEAN; INLINE; |
|
A version of |
FUNCTION al_load_wav_pf (f: AL_PACKFILEptr): AL_SAMPLEptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_wav_pf'; |
|
A version of al_load_wav which reads from a packfile. |
FUNCTION al_load_voc_pf (f: AL_PACKFILEptr): AL_SAMPLEptr; CDECL; EXTERNAL ALLEGRO_SHARED_LIBRARY_NAME NAME 'load_voc_pf'; |
|
A version of al_load_voc which reads from a packfile. |
AL_PACKFILEptr = AL_POINTER; |
|
To be used to identify an opened file. |
AL_PACKFILE_VTABLEptr = ˆAL_PACKFILE_VTABLE; |
|
Pointer to |
AL_DATAFILE_PROPERTY_LISTptr = ˆAL_DATAFILE_PROPERTY_LIST; |
|
property type |
AL_DATAFILE_PROPERTY_LIST = ARRAY [0..AL_UNKNOWN_SIZE] OF AL_DATAFILE_PROPERTY; |
AL_DATAFILE_OBJECTptr = ˆAL_DATAFILE_OBJECT; |
|
Pointer to |
AL_DATAFILEptr = ˆAL_DATAFILE; |
|
Pointer to |
AL_DATAFILE = ARRAY [0..AL_UNKNOWN_SIZE] OF AL_DATAFILE_OBJECT; |
|
Datafile content. |
AL_F_WRITE = 'w'; |
AL_F_READ_PACKED = 'rp'; |
AL_F_WRITE_PACKED = 'wp'; |
AL_F_WRITE_NOPACK = 'w!'; |
AL_F_PACK_MAGIC = $736C6821; |
|
magic number for packed files |
AL_F_NOPACK_MAGIC = $736C682E; |
|
magic number for autodetect |
AL_F_EXE_MAGIC = $736C682B; |
|
magic number for appended data |
AL_DAT_MAGIC: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_FILE: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_DATA: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_FONT: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_SAMPLE: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_MIDI: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_PATCH: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_FLI: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_BITMAP: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_RLE_SPRITE: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_C_SPRITE: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_XC_SPRITE: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_PALETTE: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_PROPERTY: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_NAME: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |
AL_DAT_END: AL_INT; |
|
Mnemonics for data object types. You must assume they're constants. They're variables for technical reasons. |