/usr/share/doc/allegro4-doc/html/dat2c.html is in allegro4-doc 2:4.4.2-10.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><title>
dat2c
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" title="Default" type="text/css" href="allegro.css"></head><body bgcolor=white text=black link="#0000ee" alink="#ff0000" vlink="#551a8b">
<center><h1><b>
The dat2c utility
</b></h1></center>
<hr>
<p><br>
<h1><a name="Contents">Contents</a></h1>
<ul>
<li><a href="#Introduction">Introduction</a>
<li><a href="#Commandline Options">Commandline Options</a>
<li><a href="#Notes">Notes</a>
</ul>
<p>
<h1><a name="Introduction">Introduction</a></h1>
<p><br>
The utility dat2c can be used in much the same way as dat2s, above, except
that it writes C code rather than assembler. This has the advantage that it
is portable - you can compile it anywhere you can use Allegro.
<p><br>
<h1><a name="Commandline Options">Commandline Options</a></h1>
<p><br>
Each option may appear only once. To specify which datafile to convert,
give the filename without a preceding option.
<p>
--cfile, -o
Arguments: filename
<p>
Gives the name of the C source file to output. Won't add a .c
extension, even if you don't specify one. By default, dat2c will
write to stdout.
<p>
--hfile, -h
Arguments: filename
<p>
Gives the name of the C header file to output. Won't add a .h
extension, even if you don't specify one.
<p>
--prefix, -p
Arguments: prefix (must be a valid macro name)
<p>
If you specify a prefix, then this will be used when constructing a
macro name for each object in the datafile. This is the same as the
grabber; if you don't specify a prefix, the macro name is simply
<obj_name>, but if you do, then the macro name becomes
<prefix>_<obj_name> .
<p>
--crlf, -C
Arguments: none
<p>
Forces the file to be output in CRLF (DOS) format. This is the
default on DOS/Windows platforms.
<p>
--unix, -U
Arguments: none
<p>
Sets the output to be in Unix (LF only) text format. This is the
default on non-DOS non-Mac platforms.
<p>
--mac, -M
Arguments: none
<p>
Sets the output to be in Macintosh (CR only) text format. This is
the default on Mac platforms.
<p>
--global, -g
Arguments: none
<p>
Specifies that the objects should be globally visible (default is
for objects to be local to the compilation unit). If they are
globally visible, then you can refer to them in your code.
<p>
--convert-compiled-sprites, -S
Arguments: none
<p>
(See note below for more info on compiled sprites). Tells dat2c to
convert any compiled sprite objects it finds into bitmap objects.
More a convenience feature for lazy people :-)
<p>
--datafile-name, -n
Arguments: C identifier
<p>
By default, the datafile is exported as:
PREFIX_data
or data
But with this option, you can change 'data' to be something else.
<p><br>
<h1><a name="Notes">Notes</a></h1>
<p>
- If your datafile contains truecolor images, be sure to call
fixup_datafile() after you have set the graphics mode. You must
also call fixup_datafile() if your platform does not support
constructors (currently any non GCC-based platform).
<p>
- Compiled sprites are *not* supported (but see the commandline option
--convert-compiled-sprites , above). This is because Allegro silently
switches to an RLE_SPRITE implementation on platforms which don't
support compiled sprites, and to get dat2c to implement that behaviour
would be more effort than it is worth (especially since you can just
call get_compiled_sprite() anyway!).
</body>
</html>
|