index d3cb67e0d7e221191a3f367026351f06be8a0e4f..c2327594645bd7ab45d5c6ee5cfc66a5c57f2f05 100644 (file)
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*)
-{$MODE DELPHI}
+{$INCLUDE ../shared/a_modes.inc}
unit e_graphics;
interface
uses
- SysUtils, Classes, Math, e_log, e_textures, SDL2, GL, GLExt, MAPDEF, ImagingTypes, Imaging, ImagingUtility;
+ SysUtils, Classes, Math, e_log, e_texture, SDL2, GL, GLExt, MAPDEF, ImagingTypes, Imaging, ImagingUtility;
type
TMirrorType=(M_NONE, M_HORIZONTAL, M_VERTICAL);
sign[2] := 68;
sign[3] := 82;
st.writeBuffer(sign, 4);
- crc := crc32(0, @sign, 4);
+ crc := crc32(0, @sign[0], 4);
hbuf[0] := 0;
hbuf[1] := 0;
hbuf[2] := (Width shr 8) and $ff;
hbuf[10] := 0; // compression method
hbuf[11] := 0; // filter method
hbuf[12] := 0; // no interlace
- crc := crc32(crc, @hbuf, 13);
+ crc := crc32(crc, @hbuf[0], 13);
st.writeBuffer(hbuf, 13);
writeIntBE(st, crc);
//e_WriteLog('PNG: header written', MSG_NOTIFY);
sign[2] := 65;
sign[3] := 84;
st.writeBuffer(sign, 4);
- crc := crc32(0, @sign, 4);
+ crc := crc32(0, @sign[0], 4);
crc := crc32(crc, obuf, dlen);
st.writeBuffer(obuf^, dlen);
writeIntBE(st, crc);
sign[2] := 78;
sign[3] := 68;
st.writeBuffer(sign, 4);
- crc := crc32(0, @sign, 4);
+ crc := crc32(0, @sign[0], 4);
writeIntBE(st, crc);
//e_WriteLog('PNG: end marker written', MSG_NOTIFY);
finally