Current News Archived News Search News Discussion Forum Old Forum Install Programs More Downloads... Troubleshooting Source Code Format Specs. Misc. Information Non-SF Stuff Links Small banner for links to this site: |
diff --git a/drawgrp/drawgrp.cpp b/drawgrp/drawgrp.cpp
--- a/drawgrp/drawgrp.cpp
+++ b/drawgrp/drawgrp.cpp
\r
#define _CRT_RAND_S\r
#include <stdlib.h>\r
+#include <stdio.h>\r
#include "stdafx.h"\r
\r
\r
}\r
hGrp2 = hGrp;\r
hGrp = CreateGrp(BI.pBuffer, GrpInfo.nFrames, GrpInfo.wMaxWidth, GrpInfo.wMaxHeight, &nGrpSize);\r
+ /*HANDLE hFile;\r
+ hFile = CreateFile("generated ultralisk.grp", GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0);\r
+ if (hFile != INVALID_HANDLE_VALUE) {\r
+ WriteFile(hFile, hGrp, nGrpSize, &j, 0);\r
+ CloseHandle(hFile);\r
+ }*/\r
BI.nFrame = 0xFFFF;\r
- for (i=13;i<14;i+=17) {\r
- rect.left = rect.top = i;\r
+ j=0;\r
+ for (i=0;i<GrpInfo.nFrames;i+=1) {\r
+ rect.left = rect.top = 0;\r
rect.right = rect.left + BI.nWidth;\r
rect.bottom = rect.top + BI.nHeight;\r
for (x = 0; x < BI.nWidth * BI.nHeight; x++)\r
BI.pBuffer[x] = -1;\r
- for (j=0;j<(32 * 25);j++) {\r
+ //for (j=0;j<(1 * 1);j++) {\r
// DrawGrp(hGrp,(HDC)&BI,i,0,i % (17*8),dwPalette,ALPHA_BLEND,0x401020);\r
- DrawGrp(hGrp2,(HDC)&BI,0,0,i % (17*8),0,USE_INDEX,0x401020);\r
- u = memcmp(BI.pBuffer, &BI.pBuffer[(i % (17*8)) * BI.nWidth * BI.nHeight], BI.nWidth * BI.nHeight * sizeof(short));\r
- DrawGrp(hGrp,(HDC)&BI,0,0,i % (17*8),0,USE_INDEX,0x401020);\r
- u = memcmp(BI.pBuffer, &BI.pBuffer[(i % (17*8)) * BI.nWidth * BI.nHeight], BI.nWidth * BI.nHeight * sizeof(short));\r
+ //DrawGrp(hGrp2,(HDC)&BI,0,0,i,0,USE_INDEX,0x401020);\r
+ //u = memcmp(BI.pBuffer, &BI.pBuffer[i * BI.nWidth * BI.nHeight], BI.nWidth * BI.nHeight * sizeof(short));\r
+ DrawGrp(hGrp,(HDC)&BI,0,0,i,0,USE_INDEX,0x401020);\r
+ u = memcmp(BI.pBuffer, &BI.pBuffer[i * BI.nWidth * BI.nHeight], BI.nWidth * BI.nHeight * sizeof(short));\r
for (x = 0; x < BI.nWidth; x++)\r
for (y = 0; y < BI.nHeight; y++) {\r
clrPixel = BI.pBuffer[(y * BI.nWidth) + x];\r
- if (clrPixel != -1) SetPixelV(hDC, i + x, i + y, dwPalette[clrPixel]);\r
+ if (clrPixel != -1) SetPixelV(hDC, x, y, dwPalette[clrPixel]);\r
}\r
- }\r
+ //}\r
if (u) {\r
- MessageBox(0, "Output of re-encoded graphic does not match original!", 0, 0);\r
- break;\r
+ printf("Output of re-encoded graphic for frame %d does not match original! Total %d\n", i, ++j);\r
+ //break;\r
}\r
FillRect(hDC, &rect, (HBRUSH) (COLOR_WINDOW+1));\r
}\r
|