Rev 5985 | Rev 6176 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5985 | Rev 5997 | ||
---|---|---|---|
Line 175... | Line 175... | ||
175 | gray = sqrt(gray) / 3; |
175 | gray = sqrt(gray) / 3; |
176 | DSBYTE[i] = DSBYTE[i+1] = DSBYTE[i+2] = gray; |
176 | DSBYTE[i] = DSBYTE[i+1] = DSBYTE[i+2] = gray; |
177 | } |
177 | } |
178 | } |
178 | } |
Line 179... | Line 179... | ||
179 | 179 | ||
180 | :void ShadowPixel(dword color_image, strength) |
180 | :dword ShadowPixel(dword dwColor, strength) |
181 | { |
181 | { |
182 | dword to = color_image + 3; |
182 | dword iB, iG, iR; |
- | 183 | strength = 10 - strength; |
|
- | 184 | ||
- | 185 | iB = dwColor & 0xFF; dwColor >>= 8; |
|
183 | strength = 10 - strength; |
186 | iG = dwColor & 0xFF; dwColor >>= 8; |
184 | for ( ; color_image < to; color_image++) |
187 | iR = dwColor & 0xFF; dwColor >>= 8; |
185 | { |
188 | |
186 | ESI = strength * DSBYTE[color_image] / 10; |
189 | iB = strength * iB / 10 << 16; |
- | 190 | iG = strength * iG / 10 << 8; |
|
187 | DSBYTE[color_image] = ESI; |
191 | iR = strength * iR / 10; |
- | 192 | ||
188 | } |
193 | return iR + iG + iB; |
189 | } |
194 | } |
190 | :void ShadowImage(dword color_image, w, h, strength) |
195 | :void ShadowImage(dword color_image, w, h, strength) |
191 | { |
196 | { |
192 | dword col, to; |
197 | dword col, to; |