summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1fffc4a)
raw | patch | inline | side by side (parent: 1fffc4a)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 17 Apr 2016 15:34:59 +0000 (18:34 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 17 Apr 2016 15:34:59 +0000 (18:34 +0300) |
src/engine/e_graphics.pas | patch | blob | history | |
src/game/g_game.pas | patch | blob | history |
index 5b760c29274b77e5fe6fe2e397b045a4d54b3f20..f2afd54004adf64ac075f26888dab9c23298e371 100644 (file)
implementation
+type
+ LONG = LongInt;
+ BITMAPINFOHEADER = record
+ biSize : DWORD;
+ biWidth : LONG;
+ biHeight : LONG;
+ biPlanes : WORD;
+ biBitCount : WORD;
+ biCompression : DWORD;
+ biSizeImage : DWORD;
+ biXPelsPerMeter : LONG;
+ biYPelsPerMeter : LONG;
+ biClrUsed : DWORD;
+ biClrImportant : DWORD;
+ end;
+ LPBITMAPINFOHEADER = ^BITMAPINFOHEADER;
+ TBITMAPINFOHEADER = BITMAPINFOHEADER;
+ PBITMAPINFOHEADER = ^BITMAPINFOHEADER;
+
+ RGBQUAD = record
+ rgbBlue : BYTE;
+ rgbGreen : BYTE;
+ rgbRed : BYTE;
+ rgbReserved : BYTE;
+ end;
+ tagRGBQUAD = RGBQUAD;
+ TRGBQUAD = RGBQUAD;
+ PRGBQUAD = ^RGBQUAD;
+
+ BITMAPINFO = record
+ bmiHeader : BITMAPINFOHEADER;
+ bmiColors : array[0..0] of RGBQUAD;
+ end;
+ LPBITMAPINFO = ^BITMAPINFO;
+ PBITMAPINFO = ^BITMAPINFO;
+ TBITMAPINFO = BITMAPINFO;
+
+ BITMAPFILEHEADER = packed record
+ bfType : Word;
+ bfSize : DWord;
+ bfReserved1 : Word;
+ bfReserved2 : Word;
+ bfOffBits : DWord;
+ end;
+ tagBITMAPFILEHEADER = BITMAPFILEHEADER;
+
type
TTexture = record
//ID: DWORD;
end;
procedure e_MakeScreenshot(FileName: String; Width, Height: Word);
-begin
- if e_NoGraphics then Exit;
-end;
-
-{type
+type
aRGB = Array [0..1] of TRGB;
PaRGB = ^aRGB;
-
TByteArray = Array [0..1] of Byte;
PByteArray = ^TByteArray;
-
var
FILEHEADER: BITMAPFILEHEADER;
INFOHEADER: BITMAPINFOHEADER;
tmp: Byte;
i: Integer;
F: File of Byte;
-
begin
+ if e_NoGraphics then Exit;
+
if (Width mod 4) > 0 then
Width := Width + 4 - (Width mod 4);
biClrImportant := 0;
end;
+ //writeln('shot: ', FileName);
AssignFile(F, FileName);
Rewrite(F);
CloseFile(F);
FreeMem(pixels);
-end;}
+end;
function e_GetGamma(win: PSDL_Window): Byte;
var
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index f678380c6b6a494b975f62a5669cefa8b21edee1..e65dc764ae52fd0ec5d1a9eb2251f58b89bb08d4 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
begin
for a := 1 to High(Word) do
begin
- FileName := Format(GameDir+'/Screenshots/Screenshot%.3d.bmp', [a]);
+ FileName := Format(GameDir+'/screenshots/screenshot%.3d.bmp', [a]);
if not FileExists(FileName) then
begin
e_MakeScreenshot(FileName, gScreenWidth, gScreenHeight);