Browse Source

win32: the GDI+ byte swapping was wrong; fix that.

legacy
Sam Hocevar sam 12 years ago
parent
commit
d855e72198
2 changed files with 16 additions and 5 deletions
  1. +4
    -5
      src/image/codec/gdiplus-image.cpp
  2. +12
    -0
      win32/mrpigeon.vcxproj

+ 4
- 5
src/image/codec/gdiplus-image.cpp View File

@@ -102,11 +102,10 @@ bool GdiPlusImageData::Open(char const *path)
for (int y = 0; y < size.y; y++)
for (int x = 0; x < size.x; x++)
{
uint8_t tmp = p[0];
*p++ = p[1];
*p++ = p[1];
*p++ = p[1];
*p++ = tmp;
uint8_t tmp = p[2];
p[2] = p[0];
p[0] = tmp;
p += 4;
}

return true;


+ 12
- 0
win32/mrpigeon.vcxproj View File

@@ -18,12 +18,24 @@
<Platform>Xbox 360</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\mrpigeon\enemy.h" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\mrpigeon\mrpigeon.h" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\mrpigeon\player.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\mrpigeon\enemy.cpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\mrpigeon\mrpigeon.cpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\mrpigeon\player.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="lolcore.vcxproj">
<Project>{9e62f2fe-3408-4eae-8238-fd84238ceeda}</Project>


Loading…
Cancel
Save