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




ShadowFlare [Sun, 10 Sep 2006 05:43:42 +0000 (05:43 +0000)]
drawgrp/drawgrp.cpp

index 8d61736..e2f41c8 100644 (file)
@@ -40,7 +40,10 @@ void WINAPI WritePixelToBuffer(BufferInfo *pBI, int X, int Y, COLORREF clrColor)
        if (pBI->nFrame == 0xFFFF)\r
                pBI->pBuffer[(Y * pBI->nWidth) + X] = (signed short)clrColor;\r
        else\r
-               pBI->pBuffer[(pBI->nFrame * pBI->nWidth * pBI->nHeight) + (Y * pBI->nWidth) + X] = (signed short)clrColor;\r
+               //if (clrColor < 1 || clrColor > 13)\r
+               //      pBI->pBuffer[(pBI->nFrame * pBI->nWidth * pBI->nHeight) + (Y * pBI->nWidth) + X] = (signed short)((BYTE)-clrColor);\r
+               //else\r
+                       pBI->pBuffer[(pBI->nFrame * pBI->nWidth * pBI->nHeight) + (Y * pBI->nWidth) + X] = (signed short)clrColor;\r
 }\r
 \r
 int main(int argc, char* argv[])\r
@@ -98,13 +101,13 @@ int main(int argc, char* argv[])
                BI.nFrame = i;\r
                for (y = 0; y < BI.nHeight; y++) {\r
                        for (x = 0; x < BI.nWidth; x++) {\r
-                               WritePixelToBuffer(&BI, x, y, 8);\r
+                               WritePixelToBuffer(&BI, x, y, -1);\r
                        }\r
                }\r
                DrawGrp(hGrp,(HDC)&BI,0,0,i,0,USE_INDEX,0);\r
        }\r
        hGrp2 = hGrp;\r
-       hGrp = CreateGrp(BI.pBuffer, GrpInfo.nFrames, GrpInfo.wMaxWidth, GrpInfo.wMaxHeight, &nGrpSize);\r
+       hGrp = CreateGrp(BI.pBuffer, GrpInfo.nFrames, GrpInfo.wMaxWidth, GrpInfo.wMaxHeight, FALSE, &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