X-Git-Url: https://sfsrealm.hopto.org/projects/gitweb.cgi?a=blobdiff_plain;f=drawgrp%2Fdrawgrp.cpp;h=e2f41c80af2d5b2a97582ed2511ac5422b71bc5a;hb=9492b9e609e5b7aaabd76022b65a7363a189bc72;hp=8d617368347469bfb7ba4c143c131dcb36879600;hpb=d1874f14b0ef294d396244b8d2e8da5a9079c365;p=grpapi.git diff --git a/drawgrp/drawgrp.cpp b/drawgrp/drawgrp.cpp index 8d61736..e2f41c8 100644 --- a/drawgrp/drawgrp.cpp +++ b/drawgrp/drawgrp.cpp @@ -40,7 +40,10 @@ void WINAPI WritePixelToBuffer(BufferInfo *pBI, int X, int Y, COLORREF clrColor) if (pBI->nFrame == 0xFFFF) pBI->pBuffer[(Y * pBI->nWidth) + X] = (signed short)clrColor; else - pBI->pBuffer[(pBI->nFrame * pBI->nWidth * pBI->nHeight) + (Y * pBI->nWidth) + X] = (signed short)clrColor; + //if (clrColor < 1 || clrColor > 13) + // pBI->pBuffer[(pBI->nFrame * pBI->nWidth * pBI->nHeight) + (Y * pBI->nWidth) + X] = (signed short)((BYTE)-clrColor); + //else + pBI->pBuffer[(pBI->nFrame * pBI->nWidth * pBI->nHeight) + (Y * pBI->nWidth) + X] = (signed short)clrColor; } int main(int argc, char* argv[]) @@ -98,13 +101,13 @@ int main(int argc, char* argv[]) BI.nFrame = i; for (y = 0; y < BI.nHeight; y++) { for (x = 0; x < BI.nWidth; x++) { - WritePixelToBuffer(&BI, x, y, 8); + WritePixelToBuffer(&BI, x, y, -1); } } DrawGrp(hGrp,(HDC)&BI,0,0,i,0,USE_INDEX,0); } hGrp2 = hGrp; - hGrp = CreateGrp(BI.pBuffer, GrpInfo.nFrames, GrpInfo.wMaxWidth, GrpInfo.wMaxHeight, &nGrpSize); + hGrp = CreateGrp(BI.pBuffer, GrpInfo.nFrames, GrpInfo.wMaxWidth, GrpInfo.wMaxHeight, FALSE, &nGrpSize); /*HANDLE hFile; hFile = CreateFile("generated ultralisk.grp", GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0); if (hFile != INVALID_HANDLE_VALUE) {