X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fengine%2Fe_graphics.pas;h=c2327594645bd7ab45d5c6ee5cfc66a5c57f2f05;hb=c81b3c085bea0e6ea549c54bfd9ad5b344c86b01;hp=f08957c5c3233e313d20f8ea778dcdf348b89819;hpb=8558702f560e3faf9be93f96dfffbf4b6ba34c90;p=d2df-sdl.git diff --git a/src/engine/e_graphics.pas b/src/engine/e_graphics.pas index f08957c..c232759 100644 --- a/src/engine/e_graphics.pas +++ b/src/engine/e_graphics.pas @@ -13,13 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . *) -{$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); @@ -1380,7 +1380,7 @@ begin glNewList(e_TextureFonts[id].Base+loop1, GL_COMPILE); glBegin(GL_QUADS); glTexCoord2f(cx, 1.0-cy-1/YCount); - glVertex2d(0, e_Textures[Tex].tx.Height div YCount); + glVertex2i(0, e_Textures[Tex].tx.Height div YCount); glTexCoord2f(cx+1/XCount, 1.0-cy-1/YCount); glVertex2i(e_Textures[Tex].tx.Width div XCount, e_Textures[Tex].tx.Height div YCount); @@ -1739,7 +1739,7 @@ begin 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; @@ -1753,7 +1753,7 @@ begin 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); @@ -1765,7 +1765,7 @@ begin 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); @@ -1778,7 +1778,7 @@ begin 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