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
if (argc>1)\r
hGrp = LoadGrp(argv[1]);\r
else\r
- hGrp = LoadGrp("game\\icons.grp");\r
+ hGrp = LoadGrp("unit\\zerg\\ultra.grp");\r
HDC hDC = GetDC(0);\r
GRPHEADER GrpInfo;\r
if (GetGrpInfo(hGrp,&GrpInfo)==0) {GrpInfo.nFrames=0;GrpInfo.wMaxWidth=0;GrpInfo.wMaxHeight=0;}\r
}*/\r
COLORREF clrPixel;\r
RECT rect;\r
- for (i=0;i<400;i+=1) {\r
+ for (i=13;i<400;i+=17) {\r
rect.left = rect.top = i;\r
rect.right = rect.left + BI.nWidth;\r
rect.bottom = rect.top + BI.nHeight;\r
BI.pBuffer[x] = 0xFFFFFFFF;\r
for (j=0;j<32;j++) {\r
// DrawGrp(hGrp,(HDC)&BI,i,0,i % (17*8),dwPalette,ALPHA_BLEND,0x401020);\r
- DrawGrp(hGrp,(HDC)&BI,0,0,i % (17*8),dwPalette,0,0x401020);\r
+ DrawGrp(hGrp,(HDC)&BI,0,0,i % (17*8),dwPalette,USE_INDEX,0x401020);\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 != 0xFFFFFFFF) SetPixelV(hDC, i + x, i + y, clrPixel);\r
+ if (clrPixel != 0xFFFFFFFF) SetPixelV(hDC, i + x, i + y, dwPalette[clrPixel]);\r
}\r
}\r
FillRect(hDC, &rect, (HBRUSH) (COLOR_WINDOW+1));\r
}\r
- for (i=0;i<400;i+=1) {\r
+ for (i=4;i<400;i+=17) {\r
rect.left = rect.top = 400-i;\r
rect.right = rect.left + BI.nWidth;\r
rect.bottom = rect.top + BI.nHeight;\r
BI.pBuffer[x] = 0xFFFFFFFF;\r
for (j=0;j<32;j++) {\r
// DrawGrp(hGrp,(HDC)&BI,400-i,0,i % (17*8),dwPalette,HORIZONTAL_FLIP|ALPHA_BLEND,0x401020);\r
- DrawGrp(hGrp,(HDC)&BI,0,0,i % (17*8),dwPalette,HORIZONTAL_FLIP,0x401020);\r
+ DrawGrp(hGrp,(HDC)&BI,0,0,i % (17*8),dwPalette,HORIZONTAL_FLIP|USE_INDEX,0x401020);\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 != 0xFFFFFFFF) SetPixelV(hDC, 400-i + x, 400-i + y, clrPixel);\r
+ if (clrPixel != 0xFFFFFFFF) SetPixelV(hDC, 400-i + x, 400-i + y, dwPalette[clrPixel]);\r
}\r
}\r
FillRect(hDC, &rect, (HBRUSH) (COLOR_WINDOW+1));\r
for (i = 0; i < BI.nWidth; i++)\r
for (j = 0; j < BI.nHeight; j++) {\r
clrPixel = BI.pBuffer[(j * BI.nWidth) + i];\r
- if (clrPixel != 0xFFFFFFFF) SetPixelV(hDC, 400 + i, 300 + j, clrPixel);\r
+ if (clrPixel != 0xFFFFFFFF) SetPixelV(hDC, 400 + i, 300 + j, dwPalette[clrPixel]);\r
}\r
//}\r
ReleaseDC(0,hDC);\r
|